From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:48:06 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- dcoprss/article.cpp | 6 +- dcoprss/cache.cpp | 46 +- dcoprss/cache.h | 30 +- dcoprss/client.cpp | 34 +- dcoprss/document.cpp | 66 +- dcoprss/feedbrowser.cpp | 62 +- dcoprss/feedbrowser.h | 28 +- dcoprss/query.cpp | 90 +-- dcoprss/query.h | 38 +- dcoprss/rssnewsfeed.h | 94 +-- dcoprss/service.cpp | 22 +- dcoprss/service.h | 82 +-- dcoprss/xmlrpciface.cpp | 202 +++--- dcoprss/xmlrpciface.h | 132 ++-- filesharing/advanced/kcm_sambaconf/common.cpp | 14 +- filesharing/advanced/kcm_sambaconf/common.h | 6 +- filesharing/advanced/kcm_sambaconf/dictmanager.cpp | 66 +- filesharing/advanced/kcm_sambaconf/dictmanager.h | 24 +- .../advanced/kcm_sambaconf/filemodedlgimpl.cpp | 18 +- .../advanced/kcm_sambaconf/filemodedlgimpl.h | 8 +- .../advanced/kcm_sambaconf/groupselectdlg.ui.h | 16 +- .../advanced/kcm_sambaconf/hiddenfileview.cpp | 146 ++-- .../advanced/kcm_sambaconf/hiddenfileview.h | 38 +- .../advanced/kcm_sambaconf/joindomaindlg.ui.h | 2 +- .../advanced/kcm_sambaconf/kcmprinterdlg.ui.h | 4 +- .../advanced/kcm_sambaconf/kcmsambaconf.cpp | 234 +++---- filesharing/advanced/kcm_sambaconf/kcmsambaconf.h | 32 +- .../kcm_sambaconf/linuxpermissionchecker.cpp | 36 +- .../kcm_sambaconf/linuxpermissionchecker.h | 14 +- filesharing/advanced/kcm_sambaconf/passwd.cpp | 24 +- filesharing/advanced/kcm_sambaconf/passwd.h | 22 +- .../advanced/kcm_sambaconf/printerdlgimpl.cpp | 42 +- .../advanced/kcm_sambaconf/printerdlgimpl.h | 2 +- .../advanced/kcm_sambaconf/qmultichecklistitem.cpp | 36 +- .../advanced/kcm_sambaconf/qmultichecklistitem.h | 16 +- filesharing/advanced/kcm_sambaconf/sambafile.cpp | 154 ++--- filesharing/advanced/kcm_sambaconf/sambafile.h | 60 +- filesharing/advanced/kcm_sambaconf/sambashare.cpp | 82 +-- filesharing/advanced/kcm_sambaconf/sambashare.h | 64 +- filesharing/advanced/kcm_sambaconf/share.ui.h | 8 +- .../advanced/kcm_sambaconf/sharedlgimpl.cpp | 84 +-- filesharing/advanced/kcm_sambaconf/sharedlgimpl.h | 8 +- .../advanced/kcm_sambaconf/smbconfconfigwidget.cpp | 26 +- .../advanced/kcm_sambaconf/smbconfconfigwidget.h | 8 +- .../advanced/kcm_sambaconf/smbpasswdfile.cpp | 52 +- filesharing/advanced/kcm_sambaconf/smbpasswdfile.h | 22 +- .../advanced/kcm_sambaconf/socketoptionsdlg.ui.h | 14 +- .../advanced/kcm_sambaconf/userselectdlg.ui.h | 10 +- filesharing/advanced/kcm_sambaconf/usertabimpl.cpp | 154 ++--- filesharing/advanced/kcm_sambaconf/usertabimpl.h | 48 +- filesharing/advanced/nfs/nfsdialog.cpp | 50 +- filesharing/advanced/nfs/nfsdialog.h | 6 +- filesharing/advanced/nfs/nfsentry.cpp | 46 +- filesharing/advanced/nfs/nfsentry.h | 46 +- filesharing/advanced/nfs/nfsfile.cpp | 46 +- filesharing/advanced/nfs/nfsfile.h | 12 +- filesharing/advanced/nfs/nfshostdlg.cpp | 38 +- filesharing/advanced/nfs/nfshostdlg.h | 10 +- .../advanced/propsdlgplugin/propertiespage.cpp | 70 +- .../advanced/propsdlgplugin/propertiespage.h | 14 +- .../propsdlgplugin/propsdlgshareplugin.cpp | 28 +- .../advanced/propsdlgplugin/propsdlgshareplugin.h | 2 +- filesharing/simple/fileshare.cpp | 116 ++-- filesharing/simple/fileshare.h | 14 +- filesharing/simple/groupconfigdlg.cpp | 132 ++-- filesharing/simple/groupconfigdlg.h | 16 +- filesharing/simple/groupconfiggui.ui.h | 2 +- filesharing/simple/krichtextlabel.cpp | 42 +- filesharing/simple/krichtextlabel.h | 18 +- kdict/actions.cpp | 56 +- kdict/actions.h | 44 +- kdict/applet/kdictapplet.cpp | 120 ++-- kdict/applet/kdictapplet.h | 26 +- kdict/application.cpp | 4 +- kdict/application.h | 4 +- kdict/dcopinterface.h | 18 +- kdict/dict.cpp | 100 +-- kdict/dict.h | 56 +- kdict/matchview.cpp | 144 ++-- kdict/matchview.h | 48 +- kdict/options.cpp | 254 +++---- kdict/options.h | 124 ++-- kdict/queryview.cpp | 142 ++-- kdict/queryview.h | 46 +- kdict/sets.cpp | 78 +-- kdict/sets.h | 10 +- kdict/toplevel.cpp | 174 ++--- kdict/toplevel.h | 36 +- kdnssd/ioslave/dnssd.cpp | 62 +- kdnssd/ioslave/dnssd.h | 30 +- kdnssd/kdedmodule/dnssdwatcher.cpp | 14 +- kdnssd/kdedmodule/dnssdwatcher.h | 14 +- kdnssd/kdedmodule/watcher.cpp | 16 +- kdnssd/kdedmodule/watcher.h | 10 +- kfile-plugins/torrent/bbase.h | 6 +- kfile-plugins/torrent/bdict.cpp | 22 +- kfile-plugins/torrent/bdict.h | 22 +- kfile-plugins/torrent/bint.cpp | 18 +- kfile-plugins/torrent/bint.h | 10 +- kfile-plugins/torrent/blist.cpp | 6 +- kfile-plugins/torrent/blist.h | 16 +- kfile-plugins/torrent/bstring.cpp | 22 +- kfile-plugins/torrent/bstring.h | 28 +- kfile-plugins/torrent/bytetape.cpp | 2 +- kfile-plugins/torrent/bytetape.h | 14 +- kfile-plugins/torrent/kfile_torrent.cpp | 72 +- kfile-plugins/torrent/kfile_torrent.h | 2 +- kget/dlgAdvanced.cpp | 8 +- kget/dlgAdvanced.h | 2 +- kget/dlgAutomation.cpp | 10 +- kget/dlgAutomation.h | 8 +- kget/dlgConnection.cpp | 10 +- kget/dlgConnection.h | 4 +- kget/dlgDirectories.cpp | 52 +- kget/dlgDirectories.h | 4 +- kget/dlgIndividual.cpp | 70 +- kget/dlgIndividual.h | 26 +- kget/dlgLimits.cpp | 6 +- kget/dlgLimits.h | 2 +- kget/dlgPreferences.cpp | 34 +- kget/dlgPreferences.h | 6 +- kget/dlgSystem.cpp | 10 +- kget/dlgSystem.h | 2 +- kget/dockindividual.cpp | 12 +- kget/dockindividual.h | 4 +- kget/docking.cpp | 28 +- kget/docking.h | 20 +- kget/droptarget.cpp | 44 +- kget/droptarget.h | 22 +- kget/kfileio.cpp | 52 +- kget/kfileio.h | 6 +- kget/kget_iface.h | 6 +- kget/kget_plug_in/kget_linkview.cpp | 38 +- kget/kget_plug_in/kget_linkview.h | 14 +- kget/kget_plug_in/kget_plug_in.cpp | 22 +- kget/kget_plug_in/kget_plug_in.h | 10 +- kget/kget_plug_in/links.cpp | 4 +- kget/kget_plug_in/links.h | 6 +- kget/kmainwidget.cpp | 246 +++---- kget/kmainwidget.h | 28 +- kget/logwindow.cpp | 72 +- kget/logwindow.h | 24 +- kget/main.cpp | 6 +- kget/safedelete.cpp | 4 +- kget/settings.cpp | 22 +- kget/settings.h | 28 +- kget/slave.cpp | 32 +- kget/slave.h | 24 +- kget/slaveevent.cpp | 10 +- kget/slaveevent.h | 8 +- kget/transfer.cpp | 66 +- kget/transfer.h | 26 +- kget/transferlist.cpp | 34 +- kget/transferlist.h | 30 +- knewsticker/common/configaccess.cpp | 482 ++++++------- knewsticker/common/configaccess.h | 60 +- knewsticker/common/configiface.h | 16 +- knewsticker/common/newsengine.cpp | 42 +- knewsticker/common/newsengine.h | 46 +- knewsticker/common/newsiconmgr.cpp | 74 +- knewsticker/common/newsiconmgr.h | 22 +- knewsticker/common/xmlnewsaccess.cpp | 52 +- knewsticker/common/xmlnewsaccess.h | 32 +- knewsticker/knewsticker.cpp | 122 ++-- knewsticker/knewsticker.h | 28 +- knewsticker/knewstickerconfig.cpp | 188 ++--- knewsticker/knewstickerconfig.h | 44 +- knewsticker/knewstickerstub/knewstickerstub.cpp | 10 +- .../kntsrcfilepropsdlg/kntsrcfilepropsdlg.cpp | 42 +- .../kntsrcfilepropsdlg/kntsrcfilepropsdlg.h | 10 +- knewsticker/newsscroller.cpp | 126 ++-- knewsticker/newsscroller.h | 44 +- knewsticker/newssourcedlgimpl.cpp | 72 +- knewsticker/newssourcedlgimpl.h | 18 +- .../kopete/addaccountwizard/addaccountwizard.cpp | 44 +- kopete/kopete/addaccountwizard/addaccountwizard.h | 10 +- .../kopete/addcontactwizard/addcontactwizard.cpp | 76 +- kopete/kopete/addcontactwizard/addcontactwizard.h | 20 +- .../addcontactwizard/fastaddcontactwizard.cpp | 32 +- .../kopete/addcontactwizard/fastaddcontactwizard.h | 14 +- kopete/kopete/chatwindow/chatmemberslistwidget.cpp | 74 +- kopete/kopete/chatwindow/chatmemberslistwidget.h | 20 +- kopete/kopete/chatwindow/chatmessagepart.cpp | 366 +++++----- kopete/kopete/chatwindow/chatmessagepart.h | 36 +- kopete/kopete/chatwindow/chattexteditpart.cpp | 114 +-- kopete/kopete/chatwindow/chattexteditpart.h | 16 +- kopete/kopete/chatwindow/chatview.cpp | 252 +++---- kopete/kopete/chatwindow/chatview.h | 54 +- kopete/kopete/chatwindow/emoticonselector.cpp | 50 +- kopete/kopete/chatwindow/emoticonselector.h | 28 +- kopete/kopete/chatwindow/kopetechatwindow.cpp | 294 ++++---- kopete/kopete/chatwindow/kopetechatwindow.h | 36 +- kopete/kopete/chatwindow/kopetechatwindowstyle.cpp | 148 ++-- kopete/kopete/chatwindow/kopetechatwindowstyle.h | 36 +- .../chatwindow/kopetechatwindowstylemanager.cpp | 68 +- .../chatwindow/kopetechatwindowstylemanager.h | 16 +- kopete/kopete/chatwindow/kopeteemailwindow.cpp | 156 ++--- kopete/kopete/chatwindow/kopeteemailwindow.h | 8 +- kopete/kopete/chatwindow/kopeteemoticonaction.cpp | 46 +- kopete/kopete/chatwindow/kopeteemoticonaction.h | 8 +- kopete/kopete/chatwindow/krichtexteditpart.cpp | 128 ++-- kopete/kopete/chatwindow/krichtexteditpart.h | 32 +- .../chatwindow/tests/chatwindowstyle_test.cpp | 34 +- .../tests/chatwindowstylerendering_test.cpp | 98 +-- .../kopete/config/accounts/kopeteaccountconfig.cpp | 48 +- .../kopete/config/accounts/kopeteaccountconfig.h | 8 +- .../kopete/config/appearance/appearanceconfig.cpp | 290 ++++---- kopete/kopete/config/appearance/appearanceconfig.h | 8 +- .../config/appearance/emoticonseditdialog.cpp | 102 +-- .../kopete/config/appearance/emoticonseditdialog.h | 28 +- .../kopete/config/appearance/tooltipeditdialog.cpp | 72 +- .../kopete/config/appearance/tooltipeditdialog.h | 8 +- kopete/kopete/config/avdevice/avdeviceconfig.cpp | 52 +- kopete/kopete/config/avdevice/avdeviceconfig.h | 20 +- kopete/kopete/config/behavior/behaviorconfig.cpp | 166 ++--- kopete/kopete/config/behavior/behaviorconfig.h | 8 +- .../config/identity/globalidentitiesmanager.cpp | 72 +- .../config/identity/globalidentitiesmanager.h | 26 +- .../config/identity/kopeteidentityconfig.cpp | 130 ++-- .../kopete/config/identity/kopeteidentityconfig.h | 6 +- .../kopete/config/plugins/kopetepluginconfig.cpp | 16 +- kopete/kopete/config/plugins/kopetepluginconfig.h | 2 +- .../kopete/contactlist/customnotificationprops.cpp | 28 +- .../kopete/contactlist/customnotificationprops.h | 6 +- kopete/kopete/contactlist/kabcexport.cpp | 60 +- kopete/kopete/contactlist/kabcexport.h | 8 +- kopete/kopete/contactlist/kopeteaddrbookexport.cpp | 46 +- kopete/kopete/contactlist/kopeteaddrbookexport.h | 18 +- .../kopete/contactlist/kopetecontactlistview.cpp | 352 +++++----- kopete/kopete/contactlist/kopetecontactlistview.h | 62 +- .../kopete/contactlist/kopetegrouplistaction.cpp | 18 +- kopete/kopete/contactlist/kopetegrouplistaction.h | 6 +- kopete/kopete/contactlist/kopetegroupviewitem.cpp | 36 +- kopete/kopete/contactlist/kopetegroupviewitem.h | 16 +- kopete/kopete/contactlist/kopetelviprops.cpp | 148 ++-- kopete/kopete/contactlist/kopetelviprops.h | 10 +- kopete/kopete/contactlist/kopetemetacontactlvi.cpp | 226 +++--- kopete/kopete/contactlist/kopetemetacontactlvi.h | 40 +- .../contactlist/kopetestatusgroupviewitem.cpp | 6 +- .../kopete/contactlist/kopetestatusgroupviewitem.h | 4 +- .../kconf_update/kopete-account-kconf_update.cpp | 64 +- kopete/kopete/kconf_update/kopete-nameTracking.cpp | 74 +- .../kopete/kconf_update/kopete-pluginloader2.cpp | 30 +- kopete/kopete/kimiface.h | 48 +- kopete/kopete/kimifaceimpl.cpp | 120 ++-- kopete/kopete/kimifaceimpl.h | 50 +- kopete/kopete/kopeteaccountstatusbaricon.cpp | 20 +- kopete/kopete/kopeteaccountstatusbaricon.h | 14 +- kopete/kopete/kopeteapplication.cpp | 44 +- kopete/kopete/kopeteapplication.h | 6 +- kopete/kopete/kopeteballoon.cpp | 104 +-- kopete/kopete/kopeteballoon.h | 14 +- kopete/kopete/kopeteeditglobalidentitywidget.cpp | 74 +- kopete/kopete/kopeteeditglobalidentitywidget.h | 14 +- kopete/kopete/kopeteiface.cpp | 78 +-- kopete/kopete/kopeteiface.h | 50 +- kopete/kopete/kopetewindow.cpp | 304 ++++---- kopete/kopete/kopetewindow.h | 54 +- kopete/kopete/systemtray.cpp | 92 +-- kopete/kopete/systemtray.h | 32 +- kopete/libkopete/avdevice/kxv.cpp | 32 +- kopete/libkopete/avdevice/kxv.h | 40 +- kopete/libkopete/avdevice/qvideo.cpp | 4 +- kopete/libkopete/avdevice/qvideostream.cpp | 82 +-- kopete/libkopete/avdevice/qvideostream.h | 24 +- kopete/libkopete/avdevice/videocontrol.h | 6 +- kopete/libkopete/avdevice/videodevice.cpp | 44 +- kopete/libkopete/avdevice/videodevice.h | 36 +- kopete/libkopete/avdevice/videodevicemodelpool.cpp | 2 +- kopete/libkopete/avdevice/videodevicemodelpool.h | 10 +- kopete/libkopete/avdevice/videodevicepool.cpp | 78 +-- kopete/libkopete/avdevice/videodevicepool.h | 16 +- kopete/libkopete/avdevice/videoinput.h | 8 +- kopete/libkopete/clientiface.h | 14 +- .../compat/kpixmapregionselectordialog.cpp | 50 +- .../libkopete/compat/kpixmapregionselectordialog.h | 12 +- .../compat/kpixmapregionselectorwidget.cpp | 104 +-- .../libkopete/compat/kpixmapregionselectorwidget.h | 40 +- kopete/libkopete/connectionmanager.cpp | 18 +- kopete/libkopete/connectionmanager.h | 16 +- kopete/libkopete/kabcpersistence.cpp | 96 +-- kopete/libkopete/kabcpersistence.h | 6 +- kopete/libkopete/kautoconfig.cpp | 224 +++--- kopete/libkopete/kautoconfig.h | 44 +- kopete/libkopete/kcautoconfigmodule.cpp | 30 +- kopete/libkopete/kcautoconfigmodule.h | 14 +- kopete/libkopete/knotification.cpp | 150 ++-- kopete/libkopete/knotification.h | 40 +- kopete/libkopete/kopeteaccount.cpp | 116 ++-- kopete/libkopete/kopeteaccount.h | 64 +- kopete/libkopete/kopeteaccountmanager.cpp | 84 +-- kopete/libkopete/kopeteaccountmanager.h | 22 +- kopete/libkopete/kopeteaway.cpp | 52 +- kopete/libkopete/kopeteaway.h | 24 +- kopete/libkopete/kopeteawayaction.cpp | 42 +- kopete/libkopete/kopeteawayaction.h | 18 +- kopete/libkopete/kopeteawaydialog.cpp | 10 +- kopete/libkopete/kopeteawaydialog.h | 8 +- kopete/libkopete/kopeteblacklister.cpp | 26 +- kopete/libkopete/kopeteblacklister.h | 18 +- kopete/libkopete/kopetechatsession.cpp | 92 +-- kopete/libkopete/kopetechatsession.h | 32 +- kopete/libkopete/kopetechatsessionmanager.cpp | 44 +- kopete/libkopete/kopetechatsessionmanager.h | 18 +- kopete/libkopete/kopetecommandhandler.cpp | 152 ++-- kopete/libkopete/kopetecommandhandler.h | 60 +- kopete/libkopete/kopetecontact.cpp | 220 +++--- kopete/libkopete/kopetecontact.h | 76 +- kopete/libkopete/kopetecontactlist.cpp | 496 ++++++------- kopete/libkopete/kopetecontactlist.h | 66 +- kopete/libkopete/kopetecontactlistelement.cpp | 120 ++-- kopete/libkopete/kopetecontactlistelement.h | 30 +- kopete/libkopete/kopetecontactproperty.cpp | 20 +- kopete/libkopete/kopetecontactproperty.h | 26 +- kopete/libkopete/kopeteeventpresentation.cpp | 18 +- kopete/libkopete/kopeteeventpresentation.h | 12 +- kopete/libkopete/kopeteglobal.cpp | 92 +-- kopete/libkopete/kopeteglobal.h | 18 +- kopete/libkopete/kopetegroup.cpp | 80 +-- kopete/libkopete/kopetegroup.h | 20 +- kopete/libkopete/kopetemessage.cpp | 262 +++---- kopete/libkopete/kopetemessage.h | 82 +-- kopete/libkopete/kopetemessageevent.cpp | 6 +- kopete/libkopete/kopetemessageevent.h | 4 +- kopete/libkopete/kopetemessagehandler.cpp | 6 +- kopete/libkopete/kopetemessagehandler.h | 8 +- kopete/libkopete/kopetemessagehandlerchain.cpp | 16 +- kopete/libkopete/kopetemessagehandlerchain.h | 4 +- kopete/libkopete/kopetemetacontact.cpp | 334 ++++----- kopete/libkopete/kopetemetacontact.h | 72 +- kopete/libkopete/kopetemimesourcefactory.cpp | 32 +- kopete/libkopete/kopetemimesourcefactory.h | 4 +- kopete/libkopete/kopetemimetypehandler.cpp | 40 +- kopete/libkopete/kopetemimetypehandler.h | 16 +- kopete/libkopete/kopetenotifydataobject.cpp | 86 +-- kopete/libkopete/kopetenotifydataobject.h | 16 +- kopete/libkopete/kopetenotifyevent.cpp | 34 +- kopete/libkopete/kopetenotifyevent.h | 10 +- kopete/libkopete/kopeteonlinestatus.cpp | 50 +- kopete/libkopete/kopeteonlinestatus.h | 42 +- kopete/libkopete/kopeteonlinestatusmanager.cpp | 90 +-- kopete/libkopete/kopeteonlinestatusmanager.h | 16 +- kopete/libkopete/kopetepassword.cpp | 98 +-- kopete/libkopete/kopetepassword.h | 28 +- kopete/libkopete/kopetepasswordedaccount.cpp | 22 +- kopete/libkopete/kopetepasswordedaccount.h | 10 +- kopete/libkopete/kopetepicture.cpp | 50 +- kopete/libkopete/kopetepicture.h | 40 +- kopete/libkopete/kopeteplugin.cpp | 30 +- kopete/libkopete/kopeteplugin.h | 26 +- kopete/libkopete/kopetepluginmanager.cpp | 124 ++-- kopete/libkopete/kopetepluginmanager.h | 30 +- kopete/libkopete/kopeteprefs.cpp | 92 +-- kopete/libkopete/kopeteprefs.h | 108 +-- kopete/libkopete/kopeteproperties.cpp | 12 +- kopete/libkopete/kopeteproperties.h | 42 +- kopete/libkopete/kopeteprotocol.cpp | 98 +-- kopete/libkopete/kopeteprotocol.h | 16 +- kopete/libkopete/kopetesimplemessagehandler.cpp | 8 +- kopete/libkopete/kopetesimplemessagehandler.h | 2 +- kopete/libkopete/kopetetask.cpp | 26 +- kopete/libkopete/kopetetask.h | 12 +- kopete/libkopete/kopetetransfermanager.cpp | 48 +- kopete/libkopete/kopetetransfermanager.h | 44 +- kopete/libkopete/kopeteuiglobal.cpp | 8 +- kopete/libkopete/kopeteuiglobal.h | 6 +- kopete/libkopete/kopeteutils.cpp | 52 +- kopete/libkopete/kopeteutils.h | 36 +- kopete/libkopete/kopetewalletmanager.cpp | 26 +- kopete/libkopete/kopetewalletmanager.h | 4 +- kopete/libkopete/managedconnectionaccount.cpp | 14 +- kopete/libkopete/managedconnectionaccount.h | 10 +- kopete/libkopete/networkstatuscommon.cpp | 4 +- kopete/libkopete/networkstatuscommon.h | 12 +- kopete/libkopete/private/kopetecommand.cpp | 34 +- kopete/libkopete/private/kopetecommand.h | 30 +- kopete/libkopete/private/kopeteemoticons.cpp | 170 ++--- kopete/libkopete/private/kopeteemoticons.h | 36 +- kopete/libkopete/private/kopeteutils_private.cpp | 6 +- kopete/libkopete/private/kopeteutils_private.h | 14 +- kopete/libkopete/private/kopeteviewmanager.cpp | 62 +- kopete/libkopete/private/kopeteviewmanager.h | 2 +- kopete/libkopete/tests/kopetecontactlist_test.cpp | 10 +- kopete/libkopete/tests/kopeteemoticontest.cpp | 42 +- kopete/libkopete/tests/kopetemessage_test.cpp | 110 +-- .../libkopete/tests/kopetepasswordtest_program.cpp | 32 +- .../libkopete/tests/kopetepasswordtest_program.h | 6 +- kopete/libkopete/tests/kopetepropertiestest.cpp | 12 +- .../libkopete/tests/kopetewallettest_program.cpp | 24 +- kopete/libkopete/tests/kopetewallettest_program.h | 2 +- kopete/libkopete/tests/mock/kopeteaccount_mock.cpp | 6 +- kopete/libkopete/tests/mock/kopeteaccount_mock.h | 6 +- kopete/libkopete/tests/mock/kopetecontact_mock.cpp | 2 +- kopete/libkopete/tests/mock/kopetecontact_mock.h | 2 +- .../libkopete/tests/mock/kopeteprotocol_mock.cpp | 8 +- kopete/libkopete/tests/mock/kopeteprotocol_mock.h | 8 +- kopete/libkopete/ui/accountselector.cpp | 36 +- kopete/libkopete/ui/accountselector.h | 8 +- kopete/libkopete/ui/addcontactpage.cpp | 2 +- kopete/libkopete/ui/addcontactpage.h | 4 +- kopete/libkopete/ui/addressbooklinkwidget.cpp | 22 +- kopete/libkopete/ui/addressbooklinkwidget.h | 8 +- kopete/libkopete/ui/addressbookselectordialog.cpp | 22 +- kopete/libkopete/ui/addressbookselectordialog.h | 6 +- kopete/libkopete/ui/addressbookselectorwidget.cpp | 46 +- kopete/libkopete/ui/addressbookselectorwidget.h | 8 +- kopete/libkopete/ui/addresseeitem.cpp | 18 +- kopete/libkopete/ui/addresseeitem.h | 8 +- kopete/libkopete/ui/contactaddednotifydialog.cpp | 38 +- kopete/libkopete/ui/contactaddednotifydialog.h | 14 +- kopete/libkopete/ui/editaccountwidget.h | 2 +- kopete/libkopete/ui/kopetecontactaction.cpp | 8 +- kopete/libkopete/ui/kopetecontactaction.h | 2 +- kopete/libkopete/ui/kopetefileconfirmdialog.cpp | 22 +- kopete/libkopete/ui/kopetefileconfirmdialog.h | 8 +- kopete/libkopete/ui/kopetelistview.cpp | 60 +- kopete/libkopete/ui/kopetelistview.h | 10 +- kopete/libkopete/ui/kopetelistviewitem.cpp | 246 +++---- kopete/libkopete/ui/kopetelistviewitem.h | 70 +- kopete/libkopete/ui/kopetelistviewsearchline.cpp | 18 +- kopete/libkopete/ui/kopetelistviewsearchline.h | 12 +- kopete/libkopete/ui/kopetepasswordwidget.cpp | 32 +- kopete/libkopete/ui/kopetepasswordwidget.h | 8 +- kopete/libkopete/ui/kopetestdaction.cpp | 50 +- kopete/libkopete/ui/kopetestdaction.h | 46 +- kopete/libkopete/ui/kopeteview.cpp | 4 +- kopete/libkopete/ui/kopeteview.h | 20 +- kopete/libkopete/ui/kopeteviewplugin.cpp | 2 +- kopete/libkopete/ui/kopeteviewplugin.h | 2 +- kopete/libkopete/ui/kopetewidgets.cpp | 92 +-- kopete/libkopete/ui/metacontactselectorwidget.cpp | 74 +- kopete/libkopete/ui/metacontactselectorwidget.h | 12 +- kopete/libkopete/ui/userinfodialog.cpp | 82 +-- kopete/libkopete/ui/userinfodialog.h | 32 +- kopete/libkopete/webcamwidget.cpp | 36 +- kopete/libkopete/webcamwidget.h | 18 +- kopete/plugins/addbookmarks/addbookmarksplugin.cpp | 48 +- kopete/plugins/addbookmarks/addbookmarksplugin.h | 20 +- .../addbookmarks/addbookmarkspreferences.cpp | 42 +- .../plugins/addbookmarks/addbookmarkspreferences.h | 2 +- .../addbookmarks/addbookmarksprefssettings.cpp | 6 +- .../addbookmarks/addbookmarksprefssettings.h | 14 +- kopete/plugins/alias/aliasplugin.cpp | 2 +- kopete/plugins/alias/aliasplugin.h | 2 +- kopete/plugins/alias/aliaspreferences.cpp | 142 ++-- kopete/plugins/alias/aliaspreferences.h | 14 +- kopete/plugins/alias/editaliasdialog.cpp | 14 +- kopete/plugins/alias/editaliasdialog.h | 2 +- kopete/plugins/autoreplace/autoreplaceconfig.cpp | 18 +- kopete/plugins/autoreplace/autoreplaceconfig.h | 10 +- kopete/plugins/autoreplace/autoreplaceplugin.cpp | 28 +- kopete/plugins/autoreplace/autoreplaceplugin.h | 10 +- .../plugins/autoreplace/autoreplacepreferences.cpp | 62 +- .../plugins/autoreplace/autoreplacepreferences.h | 6 +- .../connectionstatus/connectionstatusplugin.cpp | 18 +- .../connectionstatus/connectionstatusplugin.h | 6 +- kopete/plugins/contactnotes/contactnotesedit.cpp | 12 +- kopete/plugins/contactnotes/contactnotesedit.h | 10 +- kopete/plugins/contactnotes/contactnotesplugin.cpp | 14 +- kopete/plugins/contactnotes/contactnotesplugin.h | 12 +- .../plugins/cryptography/cryptographyguiclient.cpp | 10 +- .../plugins/cryptography/cryptographyguiclient.h | 4 +- kopete/plugins/cryptography/cryptographyplugin.cpp | 88 +-- kopete/plugins/cryptography/cryptographyplugin.h | 16 +- .../cryptography/cryptographypreferences.cpp | 8 +- .../plugins/cryptography/cryptographypreferences.h | 2 +- .../cryptography/cryptographyselectuserkey.cpp | 16 +- .../cryptography/cryptographyselectuserkey.h | 6 +- kopete/plugins/cryptography/kgpginterface.cpp | 48 +- kopete/plugins/cryptography/kgpginterface.h | 24 +- kopete/plugins/cryptography/kgpgselkey.cpp | 58 +- kopete/plugins/cryptography/kgpgselkey.h | 32 +- kopete/plugins/cryptography/popuppublic.cpp | 170 ++--- kopete/plugins/cryptography/popuppublic.h | 18 +- kopete/plugins/highlight/filter.h | 14 +- kopete/plugins/highlight/highlightconfig.cpp | 104 +-- kopete/plugins/highlight/highlightconfig.h | 8 +- kopete/plugins/highlight/highlightplugin.cpp | 16 +- kopete/plugins/highlight/highlightplugin.h | 8 +- kopete/plugins/highlight/highlightpreferences.cpp | 64 +- kopete/plugins/highlight/highlightpreferences.h | 6 +- kopete/plugins/history/converter.cpp | 140 ++-- kopete/plugins/history/historydialog.cpp | 208 +++--- kopete/plugins/history/historydialog.h | 30 +- kopete/plugins/history/historyguiclient.cpp | 22 +- kopete/plugins/history/historyguiclient.h | 4 +- kopete/plugins/history/historylogger.cpp | 276 ++++---- kopete/plugins/history/historylogger.h | 42 +- kopete/plugins/history/historyplugin.cpp | 38 +- kopete/plugins/history/historyplugin.h | 10 +- kopete/plugins/history/historypreferences.cpp | 24 +- kopete/plugins/history/historypreferences.h | 6 +- kopete/plugins/latex/latexguiclient.cpp | 18 +- kopete/plugins/latex/latexguiclient.h | 4 +- kopete/plugins/latex/latexplugin.cpp | 88 +-- kopete/plugins/latex/latexplugin.h | 14 +- kopete/plugins/latex/latexpreferences.cpp | 10 +- kopete/plugins/latex/latexpreferences.h | 4 +- kopete/plugins/motionautoaway/motionawayplugin.cpp | 16 +- kopete/plugins/motionautoaway/motionawayplugin.h | 18 +- .../motionautoaway/motionawaypreferences.cpp | 16 +- .../plugins/motionautoaway/motionawaypreferences.h | 2 +- kopete/plugins/netmeeting/netmeetingguiclient.cpp | 8 +- kopete/plugins/netmeeting/netmeetingguiclient.h | 4 +- kopete/plugins/netmeeting/netmeetinginvitation.cpp | 44 +- kopete/plugins/netmeeting/netmeetinginvitation.h | 16 +- kopete/plugins/netmeeting/netmeetingplugin.cpp | 20 +- kopete/plugins/netmeeting/netmeetingplugin.h | 4 +- .../plugins/netmeeting/netmeetingpreferences.cpp | 10 +- kopete/plugins/netmeeting/netmeetingpreferences.h | 4 +- kopete/plugins/nowlistening/nlamarok.cpp | 26 +- kopete/plugins/nowlistening/nljuk.cpp | 42 +- kopete/plugins/nowlistening/nlkaffeine.cpp | 18 +- kopete/plugins/nowlistening/nlkscd.cpp | 22 +- kopete/plugins/nowlistening/nlmediaplayer.h | 16 +- kopete/plugins/nowlistening/nlnoatun.cpp | 36 +- kopete/plugins/nowlistening/nlnoatun.h | 4 +- kopete/plugins/nowlistening/nlxmms.cpp | 2 +- .../plugins/nowlistening/nowlisteningguiclient.cpp | 10 +- .../plugins/nowlistening/nowlisteningguiclient.h | 4 +- kopete/plugins/nowlistening/nowlisteningplugin.cpp | 102 +-- kopete/plugins/nowlistening/nowlisteningplugin.h | 16 +- .../nowlistening/nowlisteningpreferences.cpp | 24 +- .../plugins/nowlistening/nowlisteningpreferences.h | 2 +- kopete/plugins/smpppdcs/detectordcop.cpp | 4 +- kopete/plugins/smpppdcs/detectordcop.h | 4 +- kopete/plugins/smpppdcs/detectornetstat.cpp | 12 +- kopete/plugins/smpppdcs/detectornetstat.h | 6 +- kopete/plugins/smpppdcs/detectornetworkstatus.cpp | 6 +- kopete/plugins/smpppdcs/detectornetworkstatus.h | 6 +- kopete/plugins/smpppdcs/detectorsmpppd.cpp | 2 +- kopete/plugins/smpppdcs/detectorsmpppd.h | 2 +- kopete/plugins/smpppdcs/kinternetiface.h | 2 +- .../smpppdcs/libsmpppdclient/smpppdclient.cpp | 22 +- .../smpppdcs/libsmpppdclient/smpppdclient.h | 24 +- .../smpppdcs/libsmpppdclient/smpppdready.cpp | 24 +- .../plugins/smpppdcs/libsmpppdclient/smpppdready.h | 4 +- .../smpppdcs/libsmpppdclient/smpppdstate.cpp | 18 +- .../plugins/smpppdcs/libsmpppdclient/smpppdstate.h | 18 +- .../smpppdcs/libsmpppdclient/smpppdunsettled.cpp | 36 +- .../smpppdcs/libsmpppdclient/smpppdunsettled.h | 4 +- kopete/plugins/smpppdcs/smpppdcsiface.h | 2 +- kopete/plugins/smpppdcs/smpppdcsplugin.cpp | 30 +- kopete/plugins/smpppdcs/smpppdcsplugin.h | 8 +- kopete/plugins/smpppdcs/smpppdcspreferences.cpp | 58 +- kopete/plugins/smpppdcs/smpppdcspreferences.h | 10 +- kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp | 32 +- kopete/plugins/smpppdcs/smpppdcsprefsimpl.h | 6 +- kopete/plugins/smpppdcs/smpppdlocationwidget.cpp | 4 +- kopete/plugins/smpppdcs/smpppdlocationwidget.h | 4 +- kopete/plugins/smpppdcs/smpppdsearcher.cpp | 30 +- kopete/plugins/smpppdcs/smpppdsearcher.h | 6 +- kopete/plugins/smpppdcs/unittest/clienttest.cpp | 10 +- kopete/plugins/statistics/statisticscontact.cpp | 128 ++-- kopete/plugins/statistics/statisticscontact.h | 40 +- kopete/plugins/statistics/statisticsdb.cpp | 36 +- kopete/plugins/statistics/statisticsdb.h | 4 +- kopete/plugins/statistics/statisticsdcopiface.h | 20 +- kopete/plugins/statistics/statisticsdialog.cpp | 164 ++--- kopete/plugins/statistics/statisticsdialog.h | 12 +- kopete/plugins/statistics/statisticsplugin.cpp | 98 +-- kopete/plugins/statistics/statisticsplugin.h | 36 +- kopete/plugins/texteffect/texteffectconfig.cpp | 10 +- kopete/plugins/texteffect/texteffectconfig.h | 8 +- kopete/plugins/texteffect/texteffectplugin.cpp | 18 +- kopete/plugins/texteffect/texteffectplugin.h | 8 +- .../plugins/texteffect/texteffectpreferences.cpp | 66 +- kopete/plugins/texteffect/texteffectpreferences.h | 4 +- kopete/plugins/translator/translatordialog.cpp | 4 +- kopete/plugins/translator/translatordialog.h | 6 +- kopete/plugins/translator/translatorguiclient.cpp | 22 +- kopete/plugins/translator/translatorguiclient.h | 6 +- kopete/plugins/translator/translatorlanguages.cpp | 6 +- kopete/plugins/translator/translatorlanguages.h | 34 +- kopete/plugins/translator/translatorplugin.cpp | 108 +-- kopete/plugins/translator/translatorplugin.h | 30 +- kopete/plugins/translator/translatorprefs.cpp | 8 +- kopete/plugins/webpresence/webpresenceplugin.cpp | 98 +-- kopete/plugins/webpresence/webpresenceplugin.h | 16 +- .../plugins/webpresence/webpresencepreferences.cpp | 10 +- .../plugins/webpresence/webpresencepreferences.h | 2 +- kopete/protocols/gadu/gaduaccount.cpp | 226 +++--- kopete/protocols/gadu/gaduaccount.h | 32 +- kopete/protocols/gadu/gaduaddcontactpage.cpp | 34 +- kopete/protocols/gadu/gaduaddcontactpage.h | 10 +- kopete/protocols/gadu/gaduaway.cpp | 10 +- kopete/protocols/gadu/gaduaway.h | 6 +- kopete/protocols/gadu/gaducommands.cpp | 46 +- kopete/protocols/gadu/gaducommands.h | 34 +- kopete/protocols/gadu/gaducontact.cpp | 42 +- kopete/protocols/gadu/gaducontact.h | 24 +- kopete/protocols/gadu/gaducontactlist.cpp | 44 +- kopete/protocols/gadu/gaducontactlist.h | 36 +- kopete/protocols/gadu/gadudcc.cpp | 20 +- kopete/protocols/gadu/gadudcc.h | 8 +- kopete/protocols/gadu/gadudccserver.cpp | 18 +- kopete/protocols/gadu/gadudccserver.h | 16 +- kopete/protocols/gadu/gadudcctransaction.cpp | 40 +- kopete/protocols/gadu/gadudcctransaction.h | 16 +- kopete/protocols/gadu/gadueditaccount.cpp | 56 +- kopete/protocols/gadu/gadueditaccount.h | 4 +- kopete/protocols/gadu/gadueditcontact.cpp | 34 +- kopete/protocols/gadu/gadueditcontact.h | 6 +- kopete/protocols/gadu/gaduprotocol.cpp | 28 +- kopete/protocols/gadu/gaduprotocol.h | 14 +- kopete/protocols/gadu/gadupubdir.cpp | 78 +-- kopete/protocols/gadu/gadupubdir.h | 8 +- kopete/protocols/gadu/gaduregisteraccount.cpp | 54 +- kopete/protocols/gadu/gaduregisteraccount.h | 16 +- kopete/protocols/gadu/gadurichtextformat.cpp | 74 +- kopete/protocols/gadu/gadurichtextformat.h | 14 +- kopete/protocols/gadu/gadusession.cpp | 62 +- kopete/protocols/gadu/gadusession.h | 66 +- kopete/protocols/groupwise/gwaccount.cpp | 262 +++---- kopete/protocols/groupwise/gwaccount.h | 44 +- kopete/protocols/groupwise/gwbytestream.cpp | 20 +- kopete/protocols/groupwise/gwbytestream.h | 4 +- kopete/protocols/groupwise/gwconnector.cpp | 14 +- kopete/protocols/groupwise/gwconnector.h | 8 +- kopete/protocols/groupwise/gwcontact.cpp | 30 +- kopete/protocols/groupwise/gwcontact.h | 24 +- kopete/protocols/groupwise/gwcontactlist.cpp | 80 +-- kopete/protocols/groupwise/gwcontactlist.h | 24 +- kopete/protocols/groupwise/gwmessagemanager.cpp | 88 +-- kopete/protocols/groupwise/gwmessagemanager.h | 8 +- kopete/protocols/groupwise/gwprotocol.cpp | 60 +- kopete/protocols/groupwise/gwprotocol.h | 16 +- .../groupwise/libgroupwise/bytestream.cpp | 34 +- .../protocols/groupwise/libgroupwise/bytestream.h | 28 +- .../groupwise/libgroupwise/chatroommanager.cpp | 26 +- .../groupwise/libgroupwise/chatroommanager.h | 4 +- kopete/protocols/groupwise/libgroupwise/client.cpp | 182 ++--- kopete/protocols/groupwise/libgroupwise/client.h | 52 +- .../protocols/groupwise/libgroupwise/connector.cpp | 10 +- .../protocols/groupwise/libgroupwise/connector.h | 14 +- .../groupwise/libgroupwise/coreprotocol.cpp | 84 +-- .../groupwise/libgroupwise/coreprotocol.h | 22 +- .../groupwise/libgroupwise/eventprotocol.cpp | 32 +- .../groupwise/libgroupwise/eventprotocol.h | 8 +- .../groupwise/libgroupwise/eventtransfer.cpp | 14 +- .../groupwise/libgroupwise/eventtransfer.h | 26 +- .../protocols/groupwise/libgroupwise/gwchatrooms.h | 34 +- .../groupwise/libgroupwise/gwclientstream.cpp | 96 +-- .../groupwise/libgroupwise/gwclientstream.h | 26 +- .../protocols/groupwise/libgroupwise/gwerror.cpp | 6 +- kopete/protocols/groupwise/libgroupwise/gwerror.h | 46 +- .../protocols/groupwise/libgroupwise/gwfield.cpp | 34 +- kopete/protocols/groupwise/libgroupwise/gwfield.h | 50 +- .../protocols/groupwise/libgroupwise/gwglobal.cpp | 6 +- .../groupwise/libgroupwise/inputprotocolbase.cpp | 18 +- .../groupwise/libgroupwise/inputprotocolbase.h | 14 +- .../groupwise/libgroupwise/privacymanager.cpp | 64 +- .../groupwise/libgroupwise/privacymanager.h | 34 +- .../groupwise/libgroupwise/qca/src/qca.cpp | 298 ++++---- .../protocols/groupwise/libgroupwise/qca/src/qca.h | 150 ++-- .../groupwise/libgroupwise/qca/src/qcaprovider.h | 92 +-- .../groupwise/libgroupwise/qcatlshandler.cpp | 20 +- .../groupwise/libgroupwise/qcatlshandler.h | 8 +- .../protocols/groupwise/libgroupwise/request.cpp | 4 +- kopete/protocols/groupwise/libgroupwise/request.h | 6 +- .../groupwise/libgroupwise/requestfactory.cpp | 2 +- .../groupwise/libgroupwise/requestfactory.h | 4 +- .../protocols/groupwise/libgroupwise/response.cpp | 2 +- .../groupwise/libgroupwise/responseprotocol.cpp | 54 +- .../groupwise/libgroupwise/responseprotocol.h | 8 +- kopete/protocols/groupwise/libgroupwise/rtf.cc | 42 +- kopete/protocols/groupwise/libgroupwise/rtf2html.h | 20 +- .../groupwise/libgroupwise/safedelete.cpp | 16 +- .../protocols/groupwise/libgroupwise/safedelete.h | 16 +- .../groupwise/libgroupwise/securestream.cpp | 108 +-- .../groupwise/libgroupwise/securestream.h | 40 +- kopete/protocols/groupwise/libgroupwise/stream.cpp | 4 +- kopete/protocols/groupwise/libgroupwise/stream.h | 22 +- kopete/protocols/groupwise/libgroupwise/task.cpp | 42 +- kopete/protocols/groupwise/libgroupwise/task.h | 14 +- .../libgroupwise/tasks/chatcountstask.cpp | 6 +- .../groupwise/libgroupwise/tasks/chatcountstask.h | 6 +- .../libgroupwise/tasks/chatpropertiestask.cpp | 4 +- .../libgroupwise/tasks/chatpropertiestask.h | 30 +- .../libgroupwise/tasks/conferencetask.cpp | 32 +- .../groupwise/libgroupwise/tasks/conferencetask.h | 6 +- .../libgroupwise/tasks/createconferencetask.cpp | 6 +- .../libgroupwise/tasks/createconferencetask.h | 2 +- .../tasks/createcontactinstancetask.cpp | 14 +- .../libgroupwise/tasks/createcontactinstancetask.h | 16 +- .../libgroupwise/tasks/createcontacttask.cpp | 24 +- .../libgroupwise/tasks/createcontacttask.h | 20 +- .../libgroupwise/tasks/createfoldertask.cpp | 6 +- .../libgroupwise/tasks/createfoldertask.h | 2 +- .../libgroupwise/tasks/deleteitemtask.cpp | 4 +- .../groupwise/libgroupwise/tasks/eventtask.h | 4 +- .../tasks/getchatsearchresultstask.cpp | 2 +- .../libgroupwise/tasks/getchatsearchresultstask.h | 6 +- .../libgroupwise/tasks/getdetailstask.cpp | 14 +- .../groupwise/libgroupwise/tasks/getdetailstask.h | 2 +- .../groupwise/libgroupwise/tasks/getstatustask.cpp | 6 +- .../groupwise/libgroupwise/tasks/getstatustask.h | 6 +- .../groupwise/libgroupwise/tasks/joinchattask.cpp | 12 +- .../groupwise/libgroupwise/tasks/joinchattask.h | 14 +- .../libgroupwise/tasks/joinconferencetask.cpp | 24 +- .../libgroupwise/tasks/joinconferencetask.h | 10 +- .../groupwise/libgroupwise/tasks/logintask.cpp | 24 +- .../groupwise/libgroupwise/tasks/logintask.h | 4 +- .../libgroupwise/tasks/movecontacttask.cpp | 6 +- .../groupwise/libgroupwise/tasks/movecontacttask.h | 6 +- .../libgroupwise/tasks/needfoldertask.cpp | 8 +- .../groupwise/libgroupwise/tasks/needfoldertask.h | 2 +- .../libgroupwise/tasks/pollsearchresultstask.cpp | 16 +- .../libgroupwise/tasks/pollsearchresultstask.h | 8 +- .../libgroupwise/tasks/privacyitemtask.cpp | 10 +- .../groupwise/libgroupwise/tasks/privacyitemtask.h | 14 +- .../groupwise/libgroupwise/tasks/requesttask.cpp | 4 +- .../groupwise/libgroupwise/tasks/requesttask.h | 2 +- .../libgroupwise/tasks/searchchattask.cpp | 14 +- .../groupwise/libgroupwise/tasks/searchchattask.h | 6 +- .../libgroupwise/tasks/searchusertask.cpp | 20 +- .../groupwise/libgroupwise/tasks/searchusertask.h | 10 +- .../libgroupwise/tasks/sendinvitetask.cpp | 6 +- .../groupwise/libgroupwise/tasks/sendinvitetask.h | 4 +- .../libgroupwise/tasks/sendmessagetask.cpp | 6 +- .../groupwise/libgroupwise/tasks/sendmessagetask.h | 2 +- .../groupwise/libgroupwise/tasks/setstatustask.cpp | 8 +- .../groupwise/libgroupwise/tasks/setstatustask.h | 10 +- .../groupwise/libgroupwise/tasks/statustask.cpp | 2 +- .../groupwise/libgroupwise/tasks/statustask.h | 2 +- .../groupwise/libgroupwise/tasks/typingtask.cpp | 2 +- .../libgroupwise/tasks/updatecontacttask.cpp | 10 +- .../libgroupwise/tasks/updatecontacttask.h | 6 +- .../libgroupwise/tasks/updatefoldertask.cpp | 2 +- .../libgroupwise/tasks/updatefoldertask.h | 2 +- .../libgroupwise/tests/clientstream_test.cpp | 14 +- .../libgroupwise/tests/clientstream_test.h | 6 +- .../libgroupwise/tests/coreprotocol_test.cpp | 2 +- .../groupwise/libgroupwise/tests/field_test.cpp | 12 +- .../groupwise/libgroupwise/tlshandler.cpp | 4 +- .../protocols/groupwise/libgroupwise/tlshandler.h | 26 +- .../protocols/groupwise/libgroupwise/transfer.cpp | 2 +- .../groupwise/libgroupwise/userdetailsmanager.cpp | 42 +- .../groupwise/libgroupwise/userdetailsmanager.h | 24 +- kopete/protocols/groupwise/ui/gwaddcontactpage.cpp | 34 +- kopete/protocols/groupwise/ui/gwaddcontactpage.h | 8 +- .../protocols/groupwise/ui/gwchatpropsdialog.cpp | 38 +- kopete/protocols/groupwise/ui/gwchatpropsdialog.h | 4 +- .../protocols/groupwise/ui/gwchatsearchdialog.cpp | 28 +- kopete/protocols/groupwise/ui/gwchatsearchdialog.h | 2 +- .../protocols/groupwise/ui/gwcontactproperties.cpp | 42 +- .../protocols/groupwise/ui/gwcontactproperties.h | 10 +- .../protocols/groupwise/ui/gweditaccountwidget.cpp | 28 +- .../protocols/groupwise/ui/gweditaccountwidget.h | 8 +- kopete/protocols/groupwise/ui/gwprivacydialog.cpp | 90 +-- kopete/protocols/groupwise/ui/gwprivacydialog.h | 4 +- .../groupwise/ui/gwreceiveinvitationdialog.cpp | 14 +- .../groupwise/ui/gwreceiveinvitationdialog.h | 2 +- kopete/protocols/groupwise/ui/gwsearch.cpp | 52 +- kopete/protocols/groupwise/ui/gwsearch.h | 10 +- kopete/protocols/irc/ircaccount.cpp | 224 +++--- kopete/protocols/irc/ircaccount.h | 108 +-- kopete/protocols/irc/ircaddcontactpage.cpp | 30 +- kopete/protocols/irc/ircaddcontactpage.h | 6 +- kopete/protocols/irc/ircchannelcontact.cpp | 122 ++-- kopete/protocols/irc/ircchannelcontact.h | 60 +- kopete/protocols/irc/irccontact.cpp | 134 ++-- kopete/protocols/irc/irccontact.h | 38 +- kopete/protocols/irc/irccontactmanager.cpp | 90 +-- kopete/protocols/irc/irccontactmanager.h | 48 +- kopete/protocols/irc/ircguiclient.cpp | 18 +- kopete/protocols/irc/ircguiclient.h | 6 +- kopete/protocols/irc/ircprotocol.cpp | 488 ++++++------- kopete/protocols/irc/ircprotocol.h | 86 +-- kopete/protocols/irc/ircservercontact.cpp | 64 +- kopete/protocols/irc/ircservercontact.h | 22 +- kopete/protocols/irc/ircsignalhandler.cpp | 88 +-- kopete/protocols/irc/ircsignalhandler.h | 100 +-- kopete/protocols/irc/irctransferhandler.cpp | 36 +- kopete/protocols/irc/irctransferhandler.h | 6 +- kopete/protocols/irc/ircusercontact.cpp | 146 ++-- kopete/protocols/irc/ircusercontact.h | 52 +- kopete/protocols/irc/kcodecaction.cpp | 38 +- kopete/protocols/irc/kcodecaction.h | 14 +- kopete/protocols/irc/ksparser.cpp | 96 +-- kopete/protocols/irc/ksparser.h | 38 +- kopete/protocols/irc/libkirc/kircengine.cpp | 110 +-- kopete/protocols/irc/libkirc/kircengine.h | 336 ++++----- .../protocols/irc/libkirc/kircengine_commands.cpp | 102 +-- kopete/protocols/irc/libkirc/kircengine_ctcp.cpp | 134 ++-- .../irc/libkirc/kircengine_numericreplies.cpp | 132 ++-- kopete/protocols/irc/libkirc/kircentity.cpp | 34 +- kopete/protocols/irc/libkirc/kircentity.h | 52 +- kopete/protocols/irc/libkirc/kircmessage.cpp | 118 ++-- kopete/protocols/irc/libkirc/kircmessage.h | 84 +-- .../irc/libkirc/kircmessageredirector.cpp | 16 +- .../protocols/irc/libkirc/kircmessageredirector.h | 24 +- kopete/protocols/irc/libkirc/kirctransfer.cpp | 100 +-- kopete/protocols/irc/libkirc/kirctransfer.h | 58 +- .../protocols/irc/libkirc/kirctransferhandler.cpp | 22 +- kopete/protocols/irc/libkirc/kirctransferhandler.h | 24 +- .../protocols/irc/libkirc/kirctransferserver.cpp | 44 +- kopete/protocols/irc/libkirc/kirctransferserver.h | 16 +- kopete/protocols/irc/libkirc/ksslsocket.cpp | 82 +-- kopete/protocols/irc/libkirc/ksslsocket.h | 12 +- kopete/protocols/irc/ui/channellist.cpp | 166 ++--- kopete/protocols/irc/ui/channellist.h | 38 +- kopete/protocols/irc/ui/channellistdialog.cpp | 16 +- kopete/protocols/irc/ui/channellistdialog.h | 4 +- kopete/protocols/irc/ui/irceditaccountwidget.cpp | 116 ++-- kopete/protocols/irc/ui/irceditaccountwidget.h | 12 +- kopete/protocols/irc/ui/networkconfig.ui.h | 4 +- kopete/protocols/jabber/jabberaccount.cpp | 190 ++--- kopete/protocols/jabber/jabberaccount.h | 34 +- kopete/protocols/jabber/jabberbasecontact.cpp | 68 +- kopete/protocols/jabber/jabberbasecontact.h | 8 +- kopete/protocols/jabber/jabberbookmarks.cpp | 38 +- kopete/protocols/jabber/jabberbookmarks.h | 14 +- kopete/protocols/jabber/jabberbytestream.cpp | 20 +- kopete/protocols/jabber/jabberbytestream.h | 4 +- .../protocols/jabber/jabbercapabilitiesmanager.cpp | 148 ++-- .../protocols/jabber/jabbercapabilitiesmanager.h | 36 +- kopete/protocols/jabber/jabberchatsession.cpp | 44 +- kopete/protocols/jabber/jabberchatsession.h | 8 +- kopete/protocols/jabber/jabberclient.cpp | 218 +++--- kopete/protocols/jabber/jabberclient.h | 70 +- kopete/protocols/jabber/jabberconnector.cpp | 14 +- kopete/protocols/jabber/jabberconnector.h | 8 +- kopete/protocols/jabber/jabbercontact.cpp | 192 ++--- kopete/protocols/jabber/jabbercontact.h | 24 +- kopete/protocols/jabber/jabbercontactpool.cpp | 14 +- kopete/protocols/jabber/jabbercontactpool.h | 6 +- kopete/protocols/jabber/jabberfiletransfer.cpp | 32 +- kopete/protocols/jabber/jabberfiletransfer.h | 10 +- kopete/protocols/jabber/jabberformlineedit.cpp | 4 +- kopete/protocols/jabber/jabberformlineedit.h | 12 +- kopete/protocols/jabber/jabberformtranslator.cpp | 20 +- kopete/protocols/jabber/jabberformtranslator.h | 6 +- kopete/protocols/jabber/jabbergroupchatmanager.cpp | 12 +- kopete/protocols/jabber/jabbergroupchatmanager.h | 2 +- kopete/protocols/jabber/jabbergroupcontact.cpp | 34 +- kopete/protocols/jabber/jabbergroupcontact.h | 10 +- .../protocols/jabber/jabbergroupmembercontact.cpp | 18 +- kopete/protocols/jabber/jabbergroupmembercontact.h | 4 +- kopete/protocols/jabber/jabberprotocol.cpp | 92 +-- kopete/protocols/jabber/jabberprotocol.h | 22 +- kopete/protocols/jabber/jabberresource.cpp | 16 +- kopete/protocols/jabber/jabberresource.h | 8 +- kopete/protocols/jabber/jabberresourcepool.cpp | 20 +- kopete/protocols/jabber/jabberresourcepool.h | 6 +- kopete/protocols/jabber/jabbertransport.cpp | 46 +- kopete/protocols/jabber/jabbertransport.h | 10 +- kopete/protocols/jabber/jingle/jinglesession.cpp | 4 +- kopete/protocols/jabber/jingle/jinglesession.h | 12 +- .../jabber/jingle/jinglesessionmanager.cpp | 16 +- .../protocols/jabber/jingle/jinglesessionmanager.h | 14 +- .../protocols/jabber/jingle/jinglevoicecaller.cpp | 48 +- kopete/protocols/jabber/jingle/jinglevoicecaller.h | 6 +- .../protocols/jabber/jingle/jinglevoicesession.cpp | 32 +- .../protocols/jabber/jingle/jinglevoicesession.h | 8 +- .../jabber/jingle/jinglevoicesessiondialog.cpp | 46 +- .../jabber/jingle/jinglevoicesessiondialog.h | 2 +- .../jabber/jingle/jinglewatchsessiontask.cpp | 12 +- .../jabber/jingle/jinglewatchsessiontask.h | 4 +- kopete/protocols/jabber/kioslave/jabberdisco.cpp | 32 +- kopete/protocols/jabber/kioslave/jabberdisco.h | 16 +- .../jabber/libiris/cutestuff/network/bsocket.cpp | 74 +- .../jabber/libiris/cutestuff/network/bsocket.h | 20 +- .../libiris/cutestuff/network/httpconnect.cpp | 68 +- .../jabber/libiris/cutestuff/network/httpconnect.h | 10 +- .../jabber/libiris/cutestuff/network/httppoll.cpp | 158 ++--- .../jabber/libiris/cutestuff/network/httppoll.h | 22 +- .../jabber/libiris/cutestuff/network/ndns.cpp | 68 +- .../jabber/libiris/cutestuff/network/ndns.h | 24 +- .../jabber/libiris/cutestuff/network/servsock.cpp | 12 +- .../jabber/libiris/cutestuff/network/servsock.h | 6 +- .../jabber/libiris/cutestuff/network/socks.cpp | 234 +++---- .../jabber/libiris/cutestuff/network/socks.h | 46 +- .../libiris/cutestuff/network/srvresolver.cpp | 70 +- .../jabber/libiris/cutestuff/network/srvresolver.h | 14 +- .../jabber/libiris/cutestuff/util/base64.cpp | 36 +- .../jabber/libiris/cutestuff/util/base64.h | 12 +- .../jabber/libiris/cutestuff/util/bytestream.cpp | 34 +- .../jabber/libiris/cutestuff/util/bytestream.h | 28 +- .../jabber/libiris/cutestuff/util/cipher.cpp | 68 +- .../jabber/libiris/cutestuff/util/cipher.h | 24 +- .../jabber/libiris/cutestuff/util/qrandom.cpp | 6 +- .../jabber/libiris/cutestuff/util/qrandom.h | 4 +- .../jabber/libiris/cutestuff/util/safedelete.cpp | 16 +- .../jabber/libiris/cutestuff/util/safedelete.h | 16 +- .../jabber/libiris/cutestuff/util/sha1.cpp | 16 +- .../protocols/jabber/libiris/cutestuff/util/sha1.h | 8 +- .../jabber/libiris/cutestuff/util/showtextdlg.cpp | 32 +- .../jabber/libiris/cutestuff/util/showtextdlg.h | 4 +- kopete/protocols/jabber/libiris/iris/include/im.h | 388 +++++------ .../protocols/jabber/libiris/iris/include/xmpp.h | 224 +++--- .../jabber/libiris/iris/jabber/filetransfer.cpp | 190 ++--- .../jabber/libiris/iris/jabber/filetransfer.h | 34 +- .../protocols/jabber/libiris/iris/jabber/s5b.cpp | 386 +++++------ kopete/protocols/jabber/libiris/iris/jabber/s5b.h | 112 +-- .../jabber/libiris/iris/jabber/xmpp_ibb.cpp | 134 ++-- .../jabber/libiris/iris/jabber/xmpp_ibb.h | 58 +- .../jabber/libiris/iris/jabber/xmpp_jidlink.cpp | 34 +- .../jabber/libiris/iris/jabber/xmpp_jidlink.h | 10 +- .../jabber/libiris/iris/xmpp-core/connector.cpp | 88 +-- .../jabber/libiris/iris/xmpp-core/hash.cpp | 8 +- .../jabber/libiris/iris/xmpp-core/jid.cpp | 102 +-- .../jabber/libiris/iris/xmpp-core/parser.cpp | 174 ++--- .../jabber/libiris/iris/xmpp-core/parser.h | 32 +- .../jabber/libiris/iris/xmpp-core/protocol.cpp | 322 ++++----- .../jabber/libiris/iris/xmpp-core/protocol.h | 132 ++-- .../jabber/libiris/iris/xmpp-core/qcaprovider.h | 92 +-- .../jabber/libiris/iris/xmpp-core/securestream.cpp | 116 ++-- .../jabber/libiris/iris/xmpp-core/securestream.h | 24 +- .../jabber/libiris/iris/xmpp-core/simplesasl.cpp | 122 ++-- .../jabber/libiris/iris/xmpp-core/stream.cpp | 298 ++++---- .../protocols/jabber/libiris/iris/xmpp-core/td.h | 12 +- .../jabber/libiris/iris/xmpp-core/tlshandler.cpp | 24 +- .../jabber/libiris/iris/xmpp-core/xmlprotocol.cpp | 108 +-- .../jabber/libiris/iris/xmpp-core/xmlprotocol.h | 54 +- .../jabber/libiris/iris/xmpp-im/client.cpp | 304 ++++---- .../jabber/libiris/iris/xmpp-im/types.cpp | 414 +++++------ .../jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp | 406 +++++------ .../jabber/libiris/iris/xmpp-im/xmpp_tasks.h | 114 +-- .../jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp | 294 ++++---- .../jabber/libiris/iris/xmpp-im/xmpp_vcard.h | 178 ++--- .../jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp | 176 ++--- .../jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h | 60 +- kopete/protocols/jabber/libiris/qca/src/qca.cpp | 298 ++++---- kopete/protocols/jabber/libiris/qca/src/qca.h | 150 ++-- .../protocols/jabber/libiris/qca/src/qcaprovider.h | 92 +-- kopete/protocols/jabber/ui/dlgjabberbrowse.cpp | 18 +- kopete/protocols/jabber/ui/dlgjabberbrowse.h | 4 +- .../jabber/ui/dlgjabberchangepassword.cpp | 14 +- .../protocols/jabber/ui/dlgjabberchangepassword.h | 2 +- kopete/protocols/jabber/ui/dlgjabberchatjoin.cpp | 10 +- kopete/protocols/jabber/ui/dlgjabberchatjoin.h | 2 +- .../protocols/jabber/ui/dlgjabberchatroomslist.cpp | 16 +- .../protocols/jabber/ui/dlgjabberchatroomslist.h | 10 +- kopete/protocols/jabber/ui/dlgjabberregister.cpp | 12 +- kopete/protocols/jabber/ui/dlgjabberregister.h | 10 +- kopete/protocols/jabber/ui/dlgjabbersendraw.cpp | 22 +- kopete/protocols/jabber/ui/dlgjabbersendraw.h | 6 +- kopete/protocols/jabber/ui/dlgjabberservices.cpp | 38 +- kopete/protocols/jabber/ui/dlgjabberservices.h | 16 +- kopete/protocols/jabber/ui/dlgjabbervcard.cpp | 72 +- kopete/protocols/jabber/ui/dlgjabbervcard.h | 6 +- .../protocols/jabber/ui/jabberaddcontactpage.cpp | 32 +- kopete/protocols/jabber/ui/jabberaddcontactpage.h | 8 +- kopete/protocols/jabber/ui/jabberchooseserver.cpp | 22 +- kopete/protocols/jabber/ui/jabberchooseserver.h | 6 +- .../jabber/ui/jabbereditaccountwidget.cpp | 40 +- .../protocols/jabber/ui/jabbereditaccountwidget.h | 4 +- .../protocols/jabber/ui/jabberregisteraccount.cpp | 52 +- kopete/protocols/jabber/ui/jabberregisteraccount.h | 10 +- kopete/protocols/meanwhile/meanwhileaccount.cpp | 36 +- kopete/protocols/meanwhile/meanwhileaccount.h | 20 +- .../meanwhile/meanwhileaddcontactpage.cpp | 16 +- .../protocols/meanwhile/meanwhileaddcontactpage.h | 4 +- kopete/protocols/meanwhile/meanwhilecontact.cpp | 24 +- kopete/protocols/meanwhile/meanwhilecontact.h | 14 +- .../meanwhile/meanwhileeditaccountwidget.cpp | 22 +- .../meanwhile/meanwhileeditaccountwidget.h | 4 +- kopete/protocols/meanwhile/meanwhileplugin.cpp | 10 +- kopete/protocols/meanwhile/meanwhileplugin.h | 6 +- kopete/protocols/meanwhile/meanwhileprotocol.cpp | 30 +- kopete/protocols/meanwhile/meanwhileprotocol.h | 14 +- kopete/protocols/meanwhile/meanwhilesession.cpp | 54 +- kopete/protocols/meanwhile/meanwhilesession.h | 14 +- kopete/protocols/msn/config/msnpreferences.cpp | 2 +- kopete/protocols/msn/dispatcher.cpp | 166 ++--- kopete/protocols/msn/dispatcher.h | 42 +- kopete/protocols/msn/incomingtransfer.cpp | 66 +- kopete/protocols/msn/incomingtransfer.h | 4 +- kopete/protocols/msn/messageformatter.cpp | 36 +- kopete/protocols/msn/messageformatter.h | 8 +- kopete/protocols/msn/msnaccount.cpp | 324 ++++----- kopete/protocols/msn/msnaccount.h | 82 +-- kopete/protocols/msn/msnaddcontactpage.cpp | 16 +- kopete/protocols/msn/msnaddcontactpage.h | 10 +- kopete/protocols/msn/msnchallengehandler.cpp | 38 +- kopete/protocols/msn/msnchallengehandler.h | 18 +- kopete/protocols/msn/msnchatsession.cpp | 182 ++--- kopete/protocols/msn/msnchatsession.h | 34 +- kopete/protocols/msn/msncontact.cpp | 108 +-- kopete/protocols/msn/msncontact.h | 40 +- kopete/protocols/msn/msndebugrawcmddlg.cpp | 14 +- kopete/protocols/msn/msndebugrawcmddlg.h | 8 +- kopete/protocols/msn/msnfiletransfersocket.cpp | 102 +-- kopete/protocols/msn/msnfiletransfersocket.h | 34 +- kopete/protocols/msn/msninvitation.cpp | 34 +- kopete/protocols/msn/msninvitation.h | 20 +- kopete/protocols/msn/msnnotifysocket.cpp | 256 +++---- kopete/protocols/msn/msnnotifysocket.h | 84 +-- kopete/protocols/msn/msnprotocol.cpp | 44 +- kopete/protocols/msn/msnprotocol.h | 20 +- kopete/protocols/msn/msnsecureloginhandler.cpp | 28 +- kopete/protocols/msn/msnsecureloginhandler.h | 14 +- kopete/protocols/msn/msnsocket.cpp | 170 ++--- kopete/protocols/msn/msnsocket.h | 68 +- kopete/protocols/msn/msnswitchboardsocket.cpp | 298 ++++---- kopete/protocols/msn/msnswitchboardsocket.h | 70 +- kopete/protocols/msn/outgoingtransfer.cpp | 68 +- kopete/protocols/msn/outgoingtransfer.h | 16 +- kopete/protocols/msn/p2p.cpp | 50 +- kopete/protocols/msn/p2p.h | 36 +- kopete/protocols/msn/sha1.cpp | 16 +- kopete/protocols/msn/sha1.h | 8 +- kopete/protocols/msn/transport.cpp | 60 +- kopete/protocols/msn/transport.h | 34 +- kopete/protocols/msn/ui/msneditaccountwidget.cpp | 90 +-- kopete/protocols/msn/ui/msneditaccountwidget.h | 6 +- kopete/protocols/msn/webcam.cpp | 196 +++--- kopete/protocols/msn/webcam.h | 20 +- kopete/protocols/msn/webcam/mimicwrapper.cpp | 28 +- kopete/protocols/msn/webcam/mimicwrapper.h | 6 +- kopete/protocols/msn/webcam/msnwebcamdialog.cpp | 24 +- kopete/protocols/msn/webcam/msnwebcamdialog.h | 6 +- kopete/protocols/oscar/aim/aimaccount.cpp | 222 +++--- kopete/protocols/oscar/aim/aimaccount.h | 46 +- kopete/protocols/oscar/aim/aimchatsession.cpp | 6 +- kopete/protocols/oscar/aim/aimchatsession.h | 8 +- kopete/protocols/oscar/aim/aimcontact.cpp | 172 ++--- kopete/protocols/oscar/aim/aimcontact.h | 36 +- kopete/protocols/oscar/aim/aimjoinchat.cpp | 26 +- kopete/protocols/oscar/aim/aimjoinchat.h | 16 +- kopete/protocols/oscar/aim/aimprotocol.cpp | 54 +- kopete/protocols/oscar/aim/aimprotocol.h | 14 +- kopete/protocols/oscar/aim/aimuserinfo.cpp | 70 +- kopete/protocols/oscar/aim/aimuserinfo.h | 8 +- .../protocols/oscar/aim/ui/aimaddcontactpage.cpp | 14 +- kopete/protocols/oscar/aim/ui/aimaddcontactpage.h | 10 +- .../oscar/aim/ui/aimeditaccountwidget.cpp | 34 +- .../protocols/oscar/aim/ui/aimeditaccountwidget.h | 6 +- kopete/protocols/oscar/icq/icqaccount.cpp | 88 +-- kopete/protocols/oscar/icq/icqaccount.h | 24 +- kopete/protocols/oscar/icq/icqcontact.cpp | 154 ++--- kopete/protocols/oscar/icq/icqcontact.h | 30 +- kopete/protocols/oscar/icq/icqpresence.cpp | 14 +- kopete/protocols/oscar/icq/icqprotocol.cpp | 98 +-- kopete/protocols/oscar/icq/icqprotocol.h | 50 +- kopete/protocols/oscar/icq/icqreadaway.cpp | 36 +- kopete/protocols/oscar/icq/icqreadaway.h | 8 +- .../protocols/oscar/icq/ui/icqaddcontactpage.cpp | 30 +- kopete/protocols/oscar/icq/ui/icqaddcontactpage.h | 8 +- .../protocols/oscar/icq/ui/icqauthreplydialog.cpp | 14 +- kopete/protocols/oscar/icq/ui/icqauthreplydialog.h | 8 +- .../oscar/icq/ui/icqeditaccountwidget.cpp | 32 +- .../protocols/oscar/icq/ui/icqeditaccountwidget.h | 8 +- kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp | 72 +- kopete/protocols/oscar/icq/ui/icqsearchdialog.h | 2 +- .../protocols/oscar/icq/ui/icquserinfowidget.cpp | 84 +-- kopete/protocols/oscar/icq/ui/icquserinfowidget.h | 2 +- kopete/protocols/oscar/liboscar/aimlogintask.cpp | 24 +- kopete/protocols/oscar/liboscar/aimlogintask.h | 18 +- kopete/protocols/oscar/liboscar/blmlimitstask.cpp | 2 +- kopete/protocols/oscar/liboscar/buddyicontask.cpp | 28 +- kopete/protocols/oscar/liboscar/buddyicontask.h | 16 +- kopete/protocols/oscar/liboscar/buffer.cpp | 74 +- kopete/protocols/oscar/liboscar/buffer.h | 42 +- kopete/protocols/oscar/liboscar/bytestream.cpp | 34 +- kopete/protocols/oscar/liboscar/bytestream.h | 28 +- .../oscar/liboscar/changevisibilitytask.cpp | 16 +- .../oscar/liboscar/chatnavservicetask.cpp | 36 +- .../protocols/oscar/liboscar/chatnavservicetask.h | 12 +- .../protocols/oscar/liboscar/chatservicetask.cpp | 48 +- kopete/protocols/oscar/liboscar/chatservicetask.h | 14 +- kopete/protocols/oscar/liboscar/client.cpp | 308 ++++----- kopete/protocols/oscar/liboscar/client.h | 154 ++--- .../protocols/oscar/liboscar/clientreadytask.cpp | 8 +- kopete/protocols/oscar/liboscar/clientreadytask.h | 8 +- .../oscar/liboscar/closeconnectiontask.cpp | 20 +- .../protocols/oscar/liboscar/closeconnectiontask.h | 16 +- kopete/protocols/oscar/liboscar/connection.cpp | 22 +- kopete/protocols/oscar/liboscar/connection.h | 22 +- .../protocols/oscar/liboscar/connectionhandler.cpp | 32 +- .../protocols/oscar/liboscar/connectionhandler.h | 14 +- kopete/protocols/oscar/liboscar/connector.cpp | 10 +- kopete/protocols/oscar/liboscar/connector.h | 14 +- kopete/protocols/oscar/liboscar/coreprotocol.cpp | 38 +- kopete/protocols/oscar/liboscar/coreprotocol.h | 18 +- kopete/protocols/oscar/liboscar/flapprotocol.cpp | 12 +- kopete/protocols/oscar/liboscar/flapprotocol.h | 4 +- kopete/protocols/oscar/liboscar/icbmparamstask.cpp | 2 +- kopete/protocols/oscar/liboscar/icqlogintask.cpp | 8 +- kopete/protocols/oscar/liboscar/icqlogintask.h | 2 +- kopete/protocols/oscar/liboscar/icqtask.cpp | 10 +- kopete/protocols/oscar/liboscar/icquserinfo.cpp | 18 +- kopete/protocols/oscar/liboscar/icquserinfo.h | 98 +-- .../protocols/oscar/liboscar/icquserinfotask.cpp | 16 +- kopete/protocols/oscar/liboscar/icquserinfotask.h | 42 +- .../protocols/oscar/liboscar/inputprotocolbase.cpp | 14 +- .../protocols/oscar/liboscar/inputprotocolbase.h | 12 +- .../oscar/liboscar/locationrightstask.cpp | 2 +- kopete/protocols/oscar/liboscar/logintask.cpp | 24 +- kopete/protocols/oscar/liboscar/logintask.h | 28 +- .../oscar/liboscar/messagereceivertask.cpp | 32 +- .../protocols/oscar/liboscar/messagereceivertask.h | 10 +- .../oscar/liboscar/offlinemessagestask.cpp | 12 +- .../oscar/liboscar/onlinenotifiertask.cpp | 4 +- .../protocols/oscar/liboscar/onlinenotifiertask.h | 4 +- .../protocols/oscar/liboscar/oscarbytestream.cpp | 20 +- kopete/protocols/oscar/liboscar/oscarbytestream.h | 4 +- .../protocols/oscar/liboscar/oscarclientstream.cpp | 74 +- .../protocols/oscar/liboscar/oscarclientstream.h | 16 +- kopete/protocols/oscar/liboscar/oscarconnector.cpp | 14 +- kopete/protocols/oscar/liboscar/oscarconnector.h | 8 +- kopete/protocols/oscar/liboscar/oscarmessage.cpp | 56 +- kopete/protocols/oscar/liboscar/oscarmessage.h | 56 +- .../protocols/oscar/liboscar/oscartypeclasses.cpp | 56 +- kopete/protocols/oscar/liboscar/oscartypeclasses.h | 40 +- kopete/protocols/oscar/liboscar/oscartypes.h | 28 +- kopete/protocols/oscar/liboscar/oscarutils.cpp | 38 +- kopete/protocols/oscar/liboscar/oscarutils.h | 26 +- .../protocols/oscar/liboscar/ownuserinfotask.cpp | 10 +- kopete/protocols/oscar/liboscar/ownuserinfotask.h | 4 +- kopete/protocols/oscar/liboscar/prmparamstask.cpp | 2 +- kopete/protocols/oscar/liboscar/profiletask.cpp | 12 +- kopete/protocols/oscar/liboscar/profiletask.h | 8 +- kopete/protocols/oscar/liboscar/rateclass.cpp | 18 +- kopete/protocols/oscar/liboscar/rateclass.h | 18 +- .../protocols/oscar/liboscar/rateclassmanager.cpp | 24 +- kopete/protocols/oscar/liboscar/rateclassmanager.h | 8 +- kopete/protocols/oscar/liboscar/rateinfotask.cpp | 18 +- kopete/protocols/oscar/liboscar/rateinfotask.h | 4 +- kopete/protocols/oscar/liboscar/rtf.cc | 40 +- kopete/protocols/oscar/liboscar/rtf2html.h | 20 +- kopete/protocols/oscar/liboscar/safedelete.cpp | 16 +- kopete/protocols/oscar/liboscar/safedelete.h | 16 +- kopete/protocols/oscar/liboscar/senddcinfotask.cpp | 2 +- .../protocols/oscar/liboscar/sendidletimetask.cpp | 2 +- .../protocols/oscar/liboscar/sendmessagetask.cpp | 12 +- kopete/protocols/oscar/liboscar/sendmessagetask.h | 2 +- .../oscar/liboscar/serverredirecttask.cpp | 14 +- .../protocols/oscar/liboscar/serverredirecttask.h | 22 +- .../oscar/liboscar/serverversionstask.cpp | 4 +- .../protocols/oscar/liboscar/serverversionstask.h | 4 +- .../protocols/oscar/liboscar/servicesetuptask.cpp | 20 +- kopete/protocols/oscar/liboscar/snacprotocol.cpp | 12 +- kopete/protocols/oscar/liboscar/snacprotocol.h | 4 +- .../protocols/oscar/liboscar/ssiactivatetask.cpp | 2 +- kopete/protocols/oscar/liboscar/ssiauthtask.cpp | 26 +- kopete/protocols/oscar/liboscar/ssiauthtask.h | 14 +- kopete/protocols/oscar/liboscar/ssilisttask.cpp | 14 +- kopete/protocols/oscar/liboscar/ssimanager.cpp | 96 +-- kopete/protocols/oscar/liboscar/ssimanager.h | 42 +- kopete/protocols/oscar/liboscar/ssimodifytask.cpp | 54 +- kopete/protocols/oscar/liboscar/ssimodifytask.h | 12 +- kopete/protocols/oscar/liboscar/ssiparamstask.cpp | 4 +- kopete/protocols/oscar/liboscar/stream.cpp | 4 +- kopete/protocols/oscar/liboscar/stream.h | 6 +- kopete/protocols/oscar/liboscar/task.cpp | 36 +- kopete/protocols/oscar/liboscar/task.h | 10 +- .../oscar/liboscar/tests/clientstream_test.cpp | 10 +- .../oscar/liboscar/tests/clientstream_test.h | 6 +- .../protocols/oscar/liboscar/tests/ipaddrtest.cpp | 8 +- kopete/protocols/oscar/liboscar/tests/ipaddrtest.h | 6 +- .../protocols/oscar/liboscar/tests/kunittest.cpp | 30 +- kopete/protocols/oscar/liboscar/tests/kunittest.h | 12 +- .../protocols/oscar/liboscar/tests/logintest.cpp | 8 +- kopete/protocols/oscar/liboscar/tests/logintest.h | 6 +- .../oscar/liboscar/tests/redirecttest.cpp | 6 +- .../protocols/oscar/liboscar/tests/redirecttest.h | 8 +- .../oscar/liboscar/tests/ssigrouptest.cpp | 16 +- .../protocols/oscar/liboscar/tests/ssigrouptest.h | 6 +- kopete/protocols/oscar/liboscar/tests/ssitest.cpp | 24 +- kopete/protocols/oscar/liboscar/tests/ssitest.h | 6 +- kopete/protocols/oscar/liboscar/tests/tester.h | 32 +- .../oscar/liboscar/tests/userinfotest.cpp | 14 +- .../protocols/oscar/liboscar/tests/userinfotest.h | 6 +- kopete/protocols/oscar/liboscar/transfer.cpp | 36 +- kopete/protocols/oscar/liboscar/transfer.h | 12 +- .../protocols/oscar/liboscar/typingnotifytask.cpp | 8 +- kopete/protocols/oscar/liboscar/typingnotifytask.h | 10 +- kopete/protocols/oscar/liboscar/userdetails.cpp | 56 +- kopete/protocols/oscar/liboscar/userdetails.h | 24 +- kopete/protocols/oscar/liboscar/userinfotask.cpp | 22 +- kopete/protocols/oscar/liboscar/userinfotask.h | 16 +- kopete/protocols/oscar/liboscar/usersearchtask.cpp | 4 +- kopete/protocols/oscar/liboscar/usersearchtask.h | 8 +- kopete/protocols/oscar/liboscar/warningtask.cpp | 8 +- kopete/protocols/oscar/liboscar/warningtask.h | 8 +- kopete/protocols/oscar/oscaraccount.cpp | 222 +++--- kopete/protocols/oscar/oscaraccount.h | 40 +- kopete/protocols/oscar/oscarcontact.cpp | 44 +- kopete/protocols/oscar/oscarcontact.h | 24 +- .../oscar/oscarencodingselectiondialog.cpp | 12 +- .../protocols/oscar/oscarencodingselectiondialog.h | 4 +- .../protocols/oscar/oscarlistnonservercontacts.cpp | 10 +- .../protocols/oscar/oscarlistnonservercontacts.h | 8 +- kopete/protocols/oscar/oscarmyselfcontact.cpp | 2 +- kopete/protocols/oscar/oscarversionupdater.cpp | 62 +- kopete/protocols/oscar/oscarversionupdater.h | 12 +- kopete/protocols/oscar/oscarvisibilitydialog.cpp | 42 +- kopete/protocols/oscar/oscarvisibilitydialog.h | 10 +- kopete/protocols/sms/serviceloader.cpp | 6 +- kopete/protocols/sms/serviceloader.h | 8 +- kopete/protocols/sms/services/gsmlib.cpp | 72 +- kopete/protocols/sms/services/gsmlib.h | 46 +- .../protocols/sms/services/kopete_unix_serial.cpp | 6 +- kopete/protocols/sms/services/kopete_unix_serial.h | 6 +- kopete/protocols/sms/services/smsclient.cpp | 60 +- kopete/protocols/sms/services/smsclient.h | 16 +- kopete/protocols/sms/services/smssend.cpp | 68 +- kopete/protocols/sms/services/smssend.h | 22 +- kopete/protocols/sms/services/smssendprovider.cpp | 68 +- kopete/protocols/sms/services/smssendprovider.h | 36 +- kopete/protocols/sms/smsaccount.cpp | 32 +- kopete/protocols/sms/smsaccount.h | 14 +- kopete/protocols/sms/smsaddcontactpage.cpp | 12 +- kopete/protocols/sms/smsaddcontactpage.h | 6 +- kopete/protocols/sms/smscontact.cpp | 32 +- kopete/protocols/sms/smscontact.h | 22 +- kopete/protocols/sms/smseditaccountwidget.cpp | 42 +- kopete/protocols/sms/smseditaccountwidget.h | 12 +- kopete/protocols/sms/smsprotocol.cpp | 26 +- kopete/protocols/sms/smsprotocol.h | 22 +- kopete/protocols/sms/smsservice.cpp | 4 +- kopete/protocols/sms/smsservice.h | 16 +- kopete/protocols/sms/smsuserpreferences.cpp | 2 +- kopete/protocols/sms/smsuserpreferences.h | 4 +- kopete/protocols/testbed/testbedaccount.cpp | 22 +- kopete/protocols/testbed/testbedaccount.h | 10 +- kopete/protocols/testbed/testbedaddcontactpage.cpp | 16 +- kopete/protocols/testbed/testbedaddcontactpage.h | 2 +- kopete/protocols/testbed/testbedcontact.cpp | 22 +- kopete/protocols/testbed/testbedcontact.h | 14 +- .../protocols/testbed/testbededitaccountwidget.cpp | 12 +- .../protocols/testbed/testbededitaccountwidget.h | 6 +- kopete/protocols/testbed/testbedfakeserver.cpp | 12 +- kopete/protocols/testbed/testbedfakeserver.h | 12 +- .../protocols/testbed/testbedincomingmessage.cpp | 2 +- kopete/protocols/testbed/testbedincomingmessage.h | 6 +- kopete/protocols/testbed/testbedprotocol.cpp | 30 +- kopete/protocols/testbed/testbedprotocol.h | 12 +- .../protocols/testbed/ui/testbedwebcamdialog.cpp | 30 +- kopete/protocols/testbed/ui/testbedwebcamdialog.h | 16 +- .../protocols/winpopup/libwinpopup/libwinpopup.cpp | 106 +-- .../protocols/winpopup/libwinpopup/libwinpopup.h | 46 +- kopete/protocols/winpopup/wpaccount.cpp | 34 +- kopete/protocols/winpopup/wpaccount.h | 26 +- kopete/protocols/winpopup/wpaddcontact.cpp | 30 +- kopete/protocols/winpopup/wpaddcontact.h | 4 +- kopete/protocols/winpopup/wpcontact.cpp | 30 +- kopete/protocols/winpopup/wpcontact.h | 20 +- kopete/protocols/winpopup/wpeditaccount.cpp | 12 +- kopete/protocols/winpopup/wpeditaccount.h | 2 +- kopete/protocols/winpopup/wpprotocol.cpp | 42 +- kopete/protocols/winpopup/wpprotocol.h | 28 +- kopete/protocols/winpopup/wpuserinfo.cpp | 20 +- kopete/protocols/winpopup/wpuserinfo.h | 6 +- kopete/protocols/yahoo/libkyahoo/bytestream.cpp | 34 +- kopete/protocols/yahoo/libkyahoo/bytestream.h | 28 +- .../protocols/yahoo/libkyahoo/changestatustask.cpp | 2 +- .../protocols/yahoo/libkyahoo/changestatustask.h | 4 +- .../protocols/yahoo/libkyahoo/chatsessiontask.cpp | 4 +- kopete/protocols/yahoo/libkyahoo/chatsessiontask.h | 4 +- kopete/protocols/yahoo/libkyahoo/client.cpp | 360 +++++----- kopete/protocols/yahoo/libkyahoo/client.h | 182 ++--- .../protocols/yahoo/libkyahoo/conferencetask.cpp | 68 +- kopete/protocols/yahoo/libkyahoo/conferencetask.h | 22 +- kopete/protocols/yahoo/libkyahoo/connector.cpp | 10 +- kopete/protocols/yahoo/libkyahoo/connector.h | 14 +- kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp | 36 +- kopete/protocols/yahoo/libkyahoo/coreprotocol.h | 14 +- .../yahoo/libkyahoo/filetransfernotifiertask.cpp | 32 +- .../yahoo/libkyahoo/filetransfernotifiertask.h | 4 +- .../yahoo/libkyahoo/inputprotocolbase.cpp | 14 +- .../protocols/yahoo/libkyahoo/inputprotocolbase.h | 12 +- kopete/protocols/yahoo/libkyahoo/listtask.cpp | 16 +- kopete/protocols/yahoo/libkyahoo/listtask.h | 4 +- kopete/protocols/yahoo/libkyahoo/logintask.cpp | 92 +-- kopete/protocols/yahoo/libkyahoo/logintask.h | 42 +- kopete/protocols/yahoo/libkyahoo/logofftask.cpp | 2 +- .../protocols/yahoo/libkyahoo/mailnotifiertask.cpp | 14 +- .../protocols/yahoo/libkyahoo/mailnotifiertask.h | 2 +- .../yahoo/libkyahoo/messagereceivertask.cpp | 26 +- .../yahoo/libkyahoo/messagereceivertask.h | 10 +- .../protocols/yahoo/libkyahoo/modifybuddytask.cpp | 8 +- kopete/protocols/yahoo/libkyahoo/modifybuddytask.h | 22 +- kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp | 42 +- kopete/protocols/yahoo/libkyahoo/modifyyabtask.h | 6 +- kopete/protocols/yahoo/libkyahoo/oscartypes.h | 2 +- .../yahoo/libkyahoo/picturenotifiertask.cpp | 8 +- .../yahoo/libkyahoo/picturenotifiertask.h | 10 +- kopete/protocols/yahoo/libkyahoo/pingtask.cpp | 2 +- .../protocols/yahoo/libkyahoo/receivefiletask.cpp | 32 +- kopete/protocols/yahoo/libkyahoo/receivefiletask.h | 14 +- .../yahoo/libkyahoo/requestpicturetask.cpp | 2 +- .../protocols/yahoo/libkyahoo/requestpicturetask.h | 4 +- kopete/protocols/yahoo/libkyahoo/safedelete.cpp | 16 +- kopete/protocols/yahoo/libkyahoo/safedelete.h | 16 +- .../protocols/yahoo/libkyahoo/sendauthresptask.cpp | 6 +- .../protocols/yahoo/libkyahoo/sendauthresptask.h | 8 +- kopete/protocols/yahoo/libkyahoo/sendfiletask.cpp | 34 +- kopete/protocols/yahoo/libkyahoo/sendfiletask.h | 22 +- .../protocols/yahoo/libkyahoo/sendmessagetask.cpp | 6 +- kopete/protocols/yahoo/libkyahoo/sendmessagetask.h | 8 +- .../protocols/yahoo/libkyahoo/sendnotifytask.cpp | 2 +- kopete/protocols/yahoo/libkyahoo/sendnotifytask.h | 4 +- .../protocols/yahoo/libkyahoo/sendpicturetask.cpp | 40 +- kopete/protocols/yahoo/libkyahoo/sendpicturetask.h | 18 +- .../yahoo/libkyahoo/statusnotifiertask.cpp | 32 +- .../protocols/yahoo/libkyahoo/statusnotifiertask.h | 12 +- kopete/protocols/yahoo/libkyahoo/stealthtask.cpp | 4 +- kopete/protocols/yahoo/libkyahoo/stealthtask.h | 4 +- kopete/protocols/yahoo/libkyahoo/stream.cpp | 4 +- kopete/protocols/yahoo/libkyahoo/stream.h | 6 +- kopete/protocols/yahoo/libkyahoo/task.cpp | 40 +- kopete/protocols/yahoo/libkyahoo/task.h | 14 +- .../yahoo/libkyahoo/tests/clientstream_test.cpp | 10 +- .../yahoo/libkyahoo/tests/clientstream_test.h | 6 +- .../protocols/yahoo/libkyahoo/tests/logintest.cpp | 8 +- kopete/protocols/yahoo/libkyahoo/tests/logintest.h | 6 +- kopete/protocols/yahoo/libkyahoo/webcamtask.cpp | 118 ++-- kopete/protocols/yahoo/libkyahoo/webcamtask.h | 44 +- kopete/protocols/yahoo/libkyahoo/yabentry.cpp | 32 +- kopete/protocols/yahoo/libkyahoo/yabentry.h | 10 +- kopete/protocols/yahoo/libkyahoo/yabtask.cpp | 30 +- kopete/protocols/yahoo/libkyahoo/yabtask.h | 4 +- .../yahoo/libkyahoo/yahoobuddyiconloader.cpp | 14 +- .../yahoo/libkyahoo/yahoobuddyiconloader.h | 18 +- .../protocols/yahoo/libkyahoo/yahoobytestream.cpp | 20 +- kopete/protocols/yahoo/libkyahoo/yahoobytestream.h | 4 +- kopete/protocols/yahoo/libkyahoo/yahoochattask.cpp | 50 +- kopete/protocols/yahoo/libkyahoo/yahoochattask.h | 28 +- .../yahoo/libkyahoo/yahooclientstream.cpp | 76 +- .../protocols/yahoo/libkyahoo/yahooclientstream.h | 16 +- .../protocols/yahoo/libkyahoo/yahooconnector.cpp | 14 +- kopete/protocols/yahoo/libkyahoo/yahooconnector.h | 8 +- kopete/protocols/yahoo/libkyahoo/yahootypes.h | 10 +- kopete/protocols/yahoo/libkyahoo/ymsgprotocol.cpp | 34 +- kopete/protocols/yahoo/libkyahoo/ymsgprotocol.h | 4 +- kopete/protocols/yahoo/libkyahoo/ymsgtransfer.cpp | 36 +- kopete/protocols/yahoo/libkyahoo/ymsgtransfer.h | 18 +- kopete/protocols/yahoo/ui/yahooinvitelistimpl.cpp | 36 +- kopete/protocols/yahoo/ui/yahooinvitelistimpl.h | 24 +- kopete/protocols/yahoo/ui/yahoouserinfodialog.cpp | 60 +- kopete/protocols/yahoo/ui/yahoouserinfodialog.h | 2 +- kopete/protocols/yahoo/ui/yahoowebcamdialog.cpp | 40 +- kopete/protocols/yahoo/ui/yahoowebcamdialog.h | 12 +- kopete/protocols/yahoo/yahooaccount.cpp | 770 ++++++++++----------- kopete/protocols/yahoo/yahooaccount.h | 156 ++--- kopete/protocols/yahoo/yahooaddcontact.cpp | 8 +- kopete/protocols/yahoo/yahooaddcontact.h | 2 +- kopete/protocols/yahoo/yahoochatsession.cpp | 54 +- kopete/protocols/yahoo/yahoochatsession.h | 2 +- .../yahoo/yahooconferencemessagemanager.cpp | 20 +- .../yahoo/yahooconferencemessagemanager.h | 6 +- kopete/protocols/yahoo/yahoocontact.cpp | 144 ++-- kopete/protocols/yahoo/yahoocontact.h | 28 +- kopete/protocols/yahoo/yahooeditaccount.cpp | 44 +- kopete/protocols/yahoo/yahooeditaccount.h | 2 +- kopete/protocols/yahoo/yahooprotocol.cpp | 92 +-- kopete/protocols/yahoo/yahooprotocol.h | 16 +- kopete/protocols/yahoo/yahooverifyaccount.cpp | 18 +- kopete/protocols/yahoo/yahooverifyaccount.h | 4 +- kopete/protocols/yahoo/yahoowebcam.cpp | 28 +- kopete/protocols/yahoo/yahoowebcam.h | 16 +- kpf/src/ActiveMonitor.cpp | 44 +- kpf/src/ActiveMonitor.h | 22 +- kpf/src/ActiveMonitorItem.cpp | 22 +- kpf/src/ActiveMonitorItem.h | 18 +- kpf/src/ActiveMonitorWindow.cpp | 6 +- kpf/src/ActiveMonitorWindow.h | 6 +- kpf/src/Applet.cpp | 86 +-- kpf/src/Applet.h | 24 +- kpf/src/AppletItem.cpp | 58 +- kpf/src/AppletItem.h | 10 +- kpf/src/BandwidthGraph.cpp | 60 +- kpf/src/BandwidthGraph.h | 28 +- kpf/src/ByteRange.cpp | 16 +- kpf/src/ByteRange.h | 10 +- kpf/src/ConfigDialogPage.cpp | 100 +-- kpf/src/ConfigDialogPage.h | 26 +- kpf/src/Defaults.cpp | 28 +- kpf/src/Defaults.h | 6 +- kpf/src/DirSelectWidget.cpp | 32 +- kpf/src/DirSelectWidget.h | 10 +- kpf/src/DirectoryLister.cpp | 76 +- kpf/src/DirectoryLister.h | 6 +- kpf/src/ErrorMessageConfigDialog.cpp | 38 +- kpf/src/ErrorMessageConfigDialog.h | 14 +- kpf/src/Help.cpp | 2 +- kpf/src/Help.h | 4 +- kpf/src/KPFInterface.cpp | 16 +- kpf/src/KPFInterface.h | 16 +- kpf/src/PortValidator.cpp | 12 +- kpf/src/PortValidator.h | 6 +- kpf/src/PropertiesDialogPlugin.cpp | 200 +++--- kpf/src/PropertiesDialogPlugin.h | 10 +- kpf/src/Request.cpp | 56 +- kpf/src/Request.h | 44 +- kpf/src/Resource.cpp | 40 +- kpf/src/Resource.h | 10 +- kpf/src/Response.cpp | 40 +- kpf/src/Response.h | 4 +- kpf/src/RootValidator.cpp | 18 +- kpf/src/RootValidator.h | 6 +- kpf/src/Server.cpp | 68 +- kpf/src/Server.h | 18 +- kpf/src/ServerPrivate.h | 20 +- kpf/src/ServerSocket.cpp | 6 +- kpf/src/ServerSocket.h | 4 +- kpf/src/ServerWizard.cpp | 124 ++-- kpf/src/ServerWizard.h | 30 +- kpf/src/SingleServerConfigDialog.cpp | 8 +- kpf/src/SingleServerConfigDialog.h | 2 +- kpf/src/StartingKPFDialog.cpp | 28 +- kpf/src/StartingKPFDialog.h | 4 +- kpf/src/Utils.cpp | 70 +- kpf/src/Utils.h | 44 +- kpf/src/WebServer.cpp | 76 +- kpf/src/WebServer.h | 18 +- kpf/src/WebServerManager.cpp | 40 +- kpf/src/WebServerManager.h | 32 +- kpf/src/WebServerSocket.cpp | 2 +- kpf/src/WebServerSocket.h | 2 +- kppp/accounting.cpp | 94 +-- kppp/accounting.h | 42 +- kppp/accounts.cpp | 148 ++-- kppp/accounts.h | 46 +- kppp/acctselect.cpp | 112 +-- kppp/acctselect.h | 36 +- kppp/connect.cpp | 182 ++--- kppp/connect.h | 58 +- kppp/conwindow.cpp | 86 +-- kppp/conwindow.h | 60 +- kppp/debug.cpp | 34 +- kppp/debug.h | 30 +- kppp/docking.cpp | 18 +- kppp/docking.h | 18 +- kppp/edit.cpp | 376 +++++----- kppp/edit.h | 160 ++--- kppp/general.cpp | 280 ++++---- kppp/general.h | 78 +-- kppp/iplined.cpp | 10 +- kppp/iplined.h | 4 +- kppp/kpppwidget.cpp | 260 +++---- kppp/kpppwidget.h | 72 +- kppp/loginterm.cpp | 30 +- kppp/loginterm.h | 22 +- kppp/logview/export.cpp | 92 +-- kppp/logview/export.h | 102 +-- kppp/logview/log.cpp | 22 +- kppp/logview/log.h | 10 +- kppp/logview/loginfo.cpp | 18 +- kppp/logview/loginfo.h | 18 +- kppp/logview/main.cpp | 20 +- kppp/logview/main.h | 6 +- kppp/logview/monthly.cpp | 198 +++--- kppp/logview/monthly.h | 34 +- kppp/macros.h | 2 +- kppp/main.cpp | 44 +- kppp/main.h | 2 +- kppp/miniterm.cpp | 66 +- kppp/miniterm.h | 52 +- kppp/modem.cpp | 66 +- kppp/modem.h | 16 +- kppp/modemcmds.cpp | 154 ++--- kppp/modemcmds.h | 100 +-- kppp/modemdb.cpp | 74 +- kppp/modemdb.h | 28 +- kppp/modeminfo.cpp | 60 +- kppp/modeminfo.h | 40 +- kppp/modems.cpp | 84 +-- kppp/modems.h | 32 +- kppp/newwidget.cpp | 4 +- kppp/newwidget.h | 6 +- kppp/pppdargs.cpp | 70 +- kppp/pppdargs.h | 20 +- kppp/pppdata.cpp | 296 ++++---- kppp/pppdata.h | 256 +++---- kppp/ppplog.cpp | 72 +- kppp/ppplog.h | 4 +- kppp/pppstatdlg.cpp | 94 +-- kppp/pppstatdlg.h | 86 +-- kppp/pppstats.cpp | 4 +- kppp/pppstats.h | 10 +- kppp/providerdb.cpp | 184 ++--- kppp/providerdb.h | 60 +- kppp/pwentry.cpp | 38 +- kppp/pwentry.h | 26 +- kppp/requester.cpp | 22 +- kppp/requester.h | 12 +- kppp/ruleset.cpp | 110 +-- kppp/ruleset.h | 50 +- kppp/runtests.cpp | 10 +- kppp/scriptedit.cpp | 24 +- kppp/scriptedit.h | 14 +- krdc/events.h | 22 +- krdc/hostpreferences.cpp | 50 +- krdc/hostpreferences.h | 34 +- krdc/hostprofiles.ui.h | 12 +- krdc/keycapturedialog.cpp | 14 +- krdc/keycapturedialog.h | 2 +- krdc/kfullscreenpanel.cpp | 22 +- krdc/kfullscreenpanel.h | 30 +- krdc/krdc.cpp | 238 +++---- krdc/krdc.h | 78 +-- krdc/kremoteview.cpp | 4 +- krdc/kremoteview.h | 12 +- krdc/kservicelocator.cpp | 142 ++-- krdc/kservicelocator.h | 74 +- krdc/main.cpp | 54 +- krdc/main.h | 18 +- krdc/maindialog.cpp | 10 +- krdc/maindialog.h | 6 +- krdc/maindialogwidget.cpp | 114 +-- krdc/maindialogwidget.h | 20 +- krdc/preferencesdialog.cpp | 16 +- krdc/preferencesdialog.h | 2 +- krdc/rdp/krdpview.cpp | 62 +- krdc/rdp/krdpview.h | 34 +- krdc/rdp/rdphostpref.cpp | 16 +- krdc/rdp/rdphostpref.h | 20 +- krdc/smartptr.h | 6 +- krdc/vnc/kvncview.cpp | 132 ++-- krdc/vnc/kvncview.h | 52 +- krdc/vnc/pointerlatencyometer.h | 4 +- krdc/vnc/threads.cpp | 40 +- krdc/vnc/threads.h | 42 +- krdc/vnc/vnchostpref.cpp | 14 +- krdc/vnc/vnchostpref.h | 8 +- krfb/kcm_krfb/kcm_krfb.cpp | 62 +- krfb/kcm_krfb/kcm_krfb.h | 8 +- krfb/kinetd/kinetd.cpp | 130 ++-- krfb/kinetd/kinetd.h | 74 +- krfb/krfb/configuration.cc | 98 +-- krfb/krfb/configuration.h | 28 +- krfb/krfb/connectiondialog.cc | 8 +- krfb/krfb/connectiondialog.h | 4 +- krfb/krfb/invitation.cc | 34 +- krfb/krfb/invitation.h | 20 +- krfb/krfb/invitedialog.cc | 18 +- krfb/krfb/invitedialog.h | 2 +- krfb/krfb/krfbifaceimpl.h | 4 +- krfb/krfb/main.cpp | 66 +- krfb/krfb/manageinvitations.ui.h | 2 +- krfb/krfb/personalinvitedialog.cc | 12 +- krfb/krfb/personalinvitedialog.h | 10 +- krfb/krfb/rfbcontroller.cc | 82 +-- krfb/krfb/rfbcontroller.h | 40 +- krfb/krfb/trayicon.cpp | 32 +- krfb/krfb/trayicon.h | 16 +- krfb/krfb/xupdatescanner.cc | 6 +- krfb/krfb/xupdatescanner.h | 8 +- krfb/libvncserver/main.c | 6 +- krfb/libvncserver/rfb.h | 6 +- krfb/libvncserver/rfbserver.c | 4 +- krfb/libvncserver/sockets.c | 2 +- krfb/srvloc/kinetinterface.cpp | 20 +- krfb/srvloc/kinetinterface.h | 14 +- krfb/srvloc/kinetinterfacewatcher.cpp | 10 +- krfb/srvloc/kinetinterfacewatcher.h | 26 +- krfb/srvloc/kserviceregistry.cpp | 40 +- krfb/srvloc/kserviceregistry.h | 28 +- krfb/srvloc/uuid.cpp | 4 +- krfb/srvloc/uuid.h | 4 +- ksirc/FilterRuleEditor.cpp | 62 +- ksirc/FilterRuleEditor.h | 8 +- ksirc/KSOpenkSirc/enter_combo.cpp | 4 +- ksirc/KSOpenkSirc/enter_combo.h | 24 +- ksirc/KSOpenkSirc/open_ksirc.cpp | 100 +-- ksirc/KSOpenkSirc/open_ksirc.h | 16 +- ksirc/KSOpenkSirc/serverDataType.h | 46 +- ksirc/KSOpenkSirc/serverFileParser.cpp | 26 +- ksirc/KSOpenkSirc/serverFileParser.h | 2 +- ksirc/KSPrefs/ksprefs.cpp | 72 +- ksirc/KSPrefs/ksprefs.h | 2 +- ksirc/KSPrefs/page_autoconnect.cpp | 84 +-- ksirc/KSPrefs/page_autoconnect.h | 4 +- ksirc/KSPrefs/page_colors.cpp | 44 +- ksirc/KSPrefs/page_colors.h | 12 +- ksirc/KSPrefs/page_font.cpp | 12 +- ksirc/KSPrefs/page_font.h | 6 +- ksirc/KSPrefs/page_general.cpp | 10 +- ksirc/KSPrefs/page_general.h | 2 +- ksirc/KSPrefs/page_irccolors.cpp | 6 +- ksirc/KSPrefs/page_irccolors.h | 2 +- ksirc/KSPrefs/page_looknfeel.cpp | 18 +- ksirc/KSPrefs/page_looknfeel.h | 4 +- ksirc/KSPrefs/page_rmbmenu.cpp | 48 +- ksirc/KSPrefs/page_rmbmenu.h | 2 +- ksirc/KSPrefs/page_servchan.cpp | 30 +- ksirc/KSPrefs/page_servchan.h | 2 +- ksirc/KSPrefs/page_shortcuts.cpp | 8 +- ksirc/KSPrefs/page_shortcuts.h | 2 +- ksirc/KSPrefs/page_startup.cpp | 24 +- ksirc/KSPrefs/page_startup.h | 2 +- ksirc/KSProgress/ksprogress.cpp | 8 +- ksirc/KSProgress/ksprogress.h | 12 +- ksirc/KSProgress/ksprogressdata.cpp | 10 +- ksirc/KSProgress/ksprogressdata.h | 10 +- ksirc/KSTicker/kspainter.cpp | 22 +- ksirc/KSTicker/kspainter.h | 20 +- ksirc/KSTicker/ksticker.cpp | 112 +-- ksirc/KSTicker/ksticker.h | 60 +- ksirc/KSTicker/ksttest.cpp | 24 +- ksirc/KSTicker/ksttest.h | 2 +- ksirc/KSTicker/speeddialog.cpp | 10 +- ksirc/KSTicker/speeddialog.h | 2 +- ksirc/KSTicker/speeddialogData.cpp | 50 +- ksirc/KSTicker/speeddialogData.h | 16 +- ksirc/NewWindowDialog.cpp | 24 +- ksirc/NewWindowDialog.h | 4 +- ksirc/ahistlineedit.cpp | 98 +-- ksirc/ahistlineedit.h | 30 +- ksirc/alistbox.cpp | 86 +-- ksirc/alistbox.h | 54 +- ksirc/baserules.cpp | 24 +- ksirc/baserules.h | 4 +- ksirc/boundscheckingarray.h | 8 +- ksirc/chanButtons.cpp | 110 +-- ksirc/chanButtons.h | 30 +- ksirc/chanparser.cpp | 226 +++--- ksirc/chanparser.h | 68 +- ksirc/charSelector.cpp | 30 +- ksirc/charSelector.h | 14 +- ksirc/colorpicker.cpp | 140 ++-- ksirc/colorpicker.h | 34 +- ksirc/dccManager.cpp | 80 +-- ksirc/dccManager.h | 50 +- ksirc/dccMgrTest.cpp | 2 +- ksirc/dccNew.cpp | 58 +- ksirc/dccNew.h | 10 +- ksirc/dccToplevel.cpp | 14 +- ksirc/dccToplevel.h | 6 +- ksirc/displayMgr.h | 14 +- ksirc/displayMgrMDI.cpp | 68 +- ksirc/displayMgrMDI.h | 18 +- ksirc/displayMgrSDI.cpp | 14 +- ksirc/displayMgrSDI.h | 12 +- ksirc/dockservercontroller.cpp | 144 ++-- ksirc/dockservercontroller.h | 68 +- ksirc/ioBroadcast.cpp | 10 +- ksirc/ioBroadcast.h | 4 +- ksirc/ioDCC.cpp | 276 ++++---- ksirc/ioDCC.h | 36 +- ksirc/ioDiscard.cpp | 4 +- ksirc/ioDiscard.h | 4 +- ksirc/ioLAG.cpp | 12 +- ksirc/ioLAG.h | 12 +- ksirc/ioNotify.cpp | 10 +- ksirc/ioNotify.h | 12 +- ksirc/iocontroller.cpp | 66 +- ksirc/iocontroller.h | 14 +- ksirc/ksirc.cpp | 26 +- ksirc/ksircchannel.h | 32 +- ksirc/ksircprocess.cpp | 132 ++-- ksirc/ksircprocess.h | 44 +- ksirc/ksircserver.h | 28 +- ksirc/ksopts.cpp | 74 +- ksirc/ksopts.h | 108 +-- ksirc/ksparser.cpp | 52 +- ksirc/ksparser.h | 24 +- ksirc/kstextview.cpp | 314 ++++----- ksirc/kstextview.h | 192 ++--- ksirc/kstextviewtest.cpp | 28 +- ksirc/ksview.cpp | 118 ++-- ksirc/ksview.h | 30 +- ksirc/logfile.cpp | 32 +- ksirc/logfile.h | 16 +- ksirc/mditoplevel.cpp | 84 +-- ksirc/mditoplevel.h | 48 +- ksirc/messageReceiver.cpp | 14 +- ksirc/messageReceiver.h | 24 +- ksirc/nickColourMaker.cpp | 10 +- ksirc/nickColourMaker.h | 16 +- ksirc/objFinder.cpp | 62 +- ksirc/objFinder.h | 20 +- ksirc/puke/commands.h | 10 +- ksirc/puke/controller.cpp | 60 +- ksirc/puke/controller.h | 46 +- ksirc/puke/palistbox.cpp | 4 +- ksirc/puke/palistbox.h | 2 +- ksirc/puke/pbutton.cpp | 34 +- ksirc/puke/pbutton.h | 8 +- ksirc/puke/pframe.cpp | 16 +- ksirc/puke/pframe.h | 8 +- ksirc/puke/pkfiledialog.cpp | 6 +- ksirc/puke/pkfiledialog.h | 2 +- ksirc/puke/plabel.cpp | 24 +- ksirc/puke/plabel.h | 8 +- ksirc/puke/playout.cpp | 18 +- ksirc/puke/playout.h | 12 +- ksirc/puke/plined.cpp | 24 +- ksirc/puke/plined.h | 8 +- ksirc/puke/plistbox.cpp | 32 +- ksirc/puke/plistbox.h | 8 +- ksirc/puke/pmenudta.cpp | 14 +- ksirc/puke/pmenudta.h | 18 +- ksirc/puke/pmessage.h | 6 +- ksirc/puke/pobject.cpp | 26 +- ksirc/puke/pobject.h | 20 +- ksirc/puke/pobjfinder.cpp | 14 +- ksirc/puke/pobjfinder.h | 4 +- ksirc/puke/ppopmenu.cpp | 26 +- ksirc/puke/ppopmenu.h | 8 +- ksirc/puke/pprogress.cpp | 12 +- ksirc/puke/pprogress.h | 2 +- ksirc/puke/ppushbt.cpp | 14 +- ksirc/puke/ppushbt.h | 8 +- ksirc/puke/ptabdialog.cpp | 20 +- ksirc/puke/ptabdialog.h | 10 +- ksirc/puke/ptablevw.cpp | 8 +- ksirc/puke/ptablevw.h | 8 +- ksirc/puke/pwidget.cpp | 66 +- ksirc/puke/pwidget.h | 34 +- ksirc/servercontroller.cpp | 250 +++---- ksirc/servercontroller.h | 66 +- ksirc/ssfeprompt.cpp | 12 +- ksirc/ssfeprompt.h | 6 +- ksirc/ssfepromptdata.cpp | 14 +- ksirc/ssfepromptdata.h | 12 +- ksirc/stringparserstate.h | 2 +- ksirc/topic.cpp | 108 +-- ksirc/topic.h | 34 +- ksirc/toplevel.cpp | 526 +++++++------- ksirc/toplevel.h | 116 ++-- ksirc/usercontrolmenu.cpp | 14 +- ksirc/usercontrolmenu.h | 16 +- ktalkd/kcmktalkd/answmachpage.cpp | 56 +- ktalkd/kcmktalkd/answmachpage.h | 46 +- ktalkd/kcmktalkd/forwmachpage.cpp | 30 +- ktalkd/kcmktalkd/forwmachpage.h | 32 +- ktalkd/kcmktalkd/main.cpp | 26 +- ktalkd/kcmktalkd/main.h | 6 +- ktalkd/kcmktalkd/soundpage.cpp | 78 +-- ktalkd/kcmktalkd/soundpage.h | 32 +- ktalkd/ktalkd/machines/forwmach.cpp | 2 +- ktalkd/ktalkd/machines/talkconn.cpp | 4 +- ktalkd/ktalkd/readcfg++.cpp | 30 +- ktalkd/ktalkd/unixsock.cpp | 18 +- ktalkd/ktalkdlg/ktalkdlg.cpp | 44 +- lanbrowsing/kcmlisa/findnic.cpp | 26 +- lanbrowsing/kcmlisa/findnic.h | 24 +- lanbrowsing/kcmlisa/kcmkiolan.cpp | 42 +- lanbrowsing/kcmlisa/kcmkiolan.h | 8 +- lanbrowsing/kcmlisa/kcmlisa.cpp | 182 ++--- lanbrowsing/kcmlisa/kcmlisa.h | 28 +- lanbrowsing/kcmlisa/kcmreslisa.cpp | 130 ++-- lanbrowsing/kcmlisa/kcmreslisa.h | 22 +- lanbrowsing/kcmlisa/main.cpp | 12 +- lanbrowsing/kcmlisa/portsettingsbar.cpp | 12 +- lanbrowsing/kcmlisa/portsettingsbar.h | 8 +- lanbrowsing/kcmlisa/setupwizard.cpp | 152 ++-- lanbrowsing/kcmlisa/setupwizard.h | 60 +- lanbrowsing/kio_lan/kio_lan.cpp | 36 +- lanbrowsing/kio_lan/kio_lan.h | 24 +- librss/article.cpp | 42 +- librss/article.h | 24 +- librss/document.cpp | 332 ++++----- librss/document.h | 30 +- librss/global.h | 4 +- librss/image.cpp | 48 +- librss/image.h | 22 +- librss/loader.cpp | 52 +- librss/loader.h | 18 +- librss/testlibrss.cpp | 4 +- librss/testlibrss.h | 2 +- librss/textinput.cpp | 26 +- librss/textinput.h | 16 +- librss/tools_p.cpp | 12 +- librss/tools_p.h | 2 +- wifi/interface_dcop.h | 2 +- wifi/interface_wireless.cpp | 26 +- wifi/interface_wireless.h | 38 +- wifi/interface_wireless_wirelessextensions.cpp | 70 +- wifi/interface_wireless_wirelessextensions.h | 18 +- wifi/kcmwifi/configcrypto.ui.h | 8 +- wifi/kcmwifi/ifconfigpage.cpp | 76 +- wifi/kcmwifi/ifconfigpage.h | 2 +- wifi/kcmwifi/kcmwifi.cpp | 42 +- wifi/kcmwifi/kcmwifi.h | 6 +- wifi/kcmwifi/mainconfig.cpp | 16 +- wifi/kcmwifi/mainconfig.h | 2 +- wifi/kcmwifi/vendorconfig.cpp | 34 +- wifi/kcmwifi/wificonfig.cpp | 66 +- wifi/kcmwifi/wificonfig.h | 52 +- wifi/kwifimanager.cpp | 176 ++--- wifi/kwifimanager.h | 32 +- wifi/kwireless/kwireless.cpp | 8 +- wifi/kwireless/kwireless.h | 8 +- wifi/kwireless/kwirelesswidget.cpp | 76 +- wifi/kwireless/kwirelesswidget.h | 48 +- wifi/kwireless/linuxwirelesswidget.cpp | 18 +- wifi/kwireless/linuxwirelesswidget.h | 4 +- wifi/kwireless/propertytable.cpp | 30 +- wifi/kwireless/propertytable.h | 12 +- wifi/locator.cpp | 16 +- wifi/locator.h | 14 +- wifi/networkscanning.cpp | 46 +- wifi/networkscanning.h | 8 +- wifi/picture.cpp | 24 +- wifi/picture.h | 10 +- wifi/speed.cpp | 10 +- wifi/speed.h | 6 +- wifi/statistics.cpp | 20 +- wifi/statistics.h | 4 +- wifi/status.cpp | 38 +- wifi/status.h | 20 +- wifi/strength.cpp | 50 +- wifi/strength.h | 14 +- 1799 files changed, 37520 insertions(+), 37520 deletions(-) diff --git a/dcoprss/article.cpp b/dcoprss/article.cpp index d191bd74..4d06a7d8 100644 --- a/dcoprss/article.cpp +++ b/dcoprss/article.cpp @@ -32,18 +32,18 @@ RSSArticle::~RSSArticle() delete m_Art; } -QString RSSArticle::title() +TQString RSSArticle::title() { //kdDebug() << "Get title " << m_Art->title() << endl; return m_Art->title(); } -QString RSSArticle::description() +TQString RSSArticle::description() { return m_Art->description(); } -QString RSSArticle::link() +TQString RSSArticle::link() { return m_Art->link().prettyURL(); } diff --git a/dcoprss/cache.cpp b/dcoprss/cache.cpp index 9c80a9a3..c4a566aa 100644 --- a/dcoprss/cache.cpp +++ b/dcoprss/cache.cpp @@ -28,14 +28,14 @@ #include #include -#include -#include +#include +#include bool CacheEntry::isValid() const { // Cache entries get invalid after on hour. One shouldn't hardcode this // but for now it'll do. - return m_timeStamp.secsTo( QDateTime::currentDateTime() ) < 3600; + return m_timeStamp.secsTo( TQDateTime::currentDateTime() ) < 3600; } Cache *Cache::m_instance = 0; @@ -47,14 +47,14 @@ Cache &Cache::self() return *m_instance; } -QString Cache::getCacheKey( const QString &server, const QString &method, - const QValueList &args ) +TQString Cache::getCacheKey( const TQString &server, const TQString &method, + const TQValueList &args ) { - QString key; - key = server + QString::fromLatin1( "__" ); - key += method + QString::fromLatin1( "__" ); - QValueList::ConstIterator it = args.begin(); - QValueList::ConstIterator end = args.end(); + TQString key; + key = server + TQString::fromLatin1( "__" ); + key += method + TQString::fromLatin1( "__" ); + TQValueList::ConstIterator it = args.begin(); + TQValueList::ConstIterator end = args.end(); for ( ; it != end; ++it ) key += KXMLRPC::Query::marshal( *it ); @@ -73,56 +73,56 @@ Cache::~Cache() void Cache::load() { - QFile file( cacheFileName() ); + TQFile file( cacheFileName() ); if ( !file.open( IO_ReadOnly ) ) { kdDebug() << "Failed to open cache file " << cacheFileName() << endl; return; } - QDataStream stream( &file ); + TQDataStream stream( &file ); while ( !stream.atEnd() ) { - QString key; + TQString key; stream >> key; CacheEntry *entry = new CacheEntry; stream >> *entry; - QDict::insert( key, entry ); + TQDict::insert( key, entry ); } } void Cache::save() { - QFile file( cacheFileName() ); + TQFile file( cacheFileName() ); if ( !file.open( IO_WriteOnly ) ) { kdDebug() << "Failed to open cache file " << cacheFileName() << endl; return; } - QDataStream stream( &file ); + TQDataStream stream( &file ); - QDictIterator it( *this ); + TQDictIterator it( *this ); for ( ; it.current() != 0; ++it ) stream << it.currentKey() << *it.current(); } -void Cache::touch( const QString &key ) +void Cache::touch( const TQString &key ) { CacheEntry *entry = find( key ); if ( !entry ) return; - entry->m_timeStamp = QDateTime::currentDateTime(); + entry->m_timeStamp = TQDateTime::currentDateTime(); } -void Cache::insert( const QString &key, const KXMLRPC::Query::Result &result ) +void Cache::insert( const TQString &key, const KXMLRPC::Query::Result &result ) { CacheEntry *entry = new CacheEntry; - entry->m_timeStamp = QDateTime::currentDateTime(); + entry->m_timeStamp = TQDateTime::currentDateTime(); entry->m_result = result; - QDict::insert( key, entry ); + TQDict::insert( key, entry ); } -QString Cache::cacheFileName() const +TQString Cache::cacheFileName() const { return locateLocal( "appdata", "cache/dcoprss.cache" ); } diff --git a/dcoprss/cache.h b/dcoprss/cache.h index 8248b609..3bf73e12 100644 --- a/dcoprss/cache.h +++ b/dcoprss/cache.h @@ -25,41 +25,41 @@ #ifndef CACHE_H #define CACHE_H -#include -#include -#include +#include +#include +#include #include class CacheEntry { friend class Cache; - friend QDataStream &operator>>( QDataStream &s, CacheEntry &e ); + friend TQDataStream &operator>>( TQDataStream &s, CacheEntry &e ); public: - const QDateTime &timeStamp() const { return m_timeStamp; } + const TQDateTime &timeStamp() const { return m_timeStamp; } const KXMLRPC::Query::Result result() const { return m_result; } bool isValid() const; private: - QDateTime m_timeStamp; + TQDateTime m_timeStamp; KXMLRPC::Query::Result m_result; }; -class Cache : public QDict +class Cache : public TQDict { public: static Cache &self(); - static QString getCacheKey( const QString &server, - const QString &method, - const QValueList &args ); + static TQString getCacheKey( const TQString &server, + const TQString &method, + const TQValueList &args ); void load(); void save(); - void touch( const QString &key ); + void touch( const TQString &key ); - void insert( const QString &key, const KXMLRPC::Query::Result &result ); + void insert( const TQString &key, const KXMLRPC::Query::Result &result ); private: Cache(); @@ -67,17 +67,17 @@ class Cache : public QDict Cache &operator=( const Cache &rhs ); // disabled ~Cache(); - QString cacheFileName() const; + TQString cacheFileName() const; static Cache *m_instance; }; -inline QDataStream &operator<<( QDataStream &s, const CacheEntry &e ) +inline TQDataStream &operator<<( TQDataStream &s, const CacheEntry &e ) { return s << e.timeStamp() << e.result(); } -inline QDataStream &operator>>( QDataStream &s, CacheEntry &e ) +inline TQDataStream &operator>>( TQDataStream &s, CacheEntry &e ) { return s >> e.m_timeStamp >> e.m_result; } diff --git a/dcoprss/client.cpp b/dcoprss/client.cpp index b74894de..f84fc0f9 100644 --- a/dcoprss/client.cpp +++ b/dcoprss/client.cpp @@ -2,10 +2,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include /* @@ -19,13 +19,13 @@ public: // get our DCOP client and attach so that we may use it DCOPClient *client = app->dcopClient(); client->attach(); - QString error; - QCString appID; + TQString error; + TQCString appID; kdDebug() << "Looking for rss service..." << endl; if (!client->isApplicationRegistered("rssservice")) { kdDebug() << "Could not find service so I am starting it..." << endl; - if(KApplication::startServiceByName("rssservice",QStringList(), &error, &appID )) + if(KApplication::startServiceByName("rssservice",TQStringList(), &error, &appID )) { kdDebug() << "Starting rssservice failed with message: " << error << endl; exit(0); @@ -39,14 +39,14 @@ public: else kdDebug() << "attached dcop signals..." << endl; - QString url("http://freshmeat.net/backend/fm.rdf"); + TQString url("http://freshmeat.net/backend/fm.rdf"); DCOPRef m_rssservice("rssservice","RSSService"); - m_rssservice.call("load(QString)", url); - QStringList returnList = m_rssservice.call("list()"); - DCOPRef doc = m_rssservice.call("document(QString)", returnList[0]); - QString title = doc.call("title()"); - QString link = doc.call("link()"); - QString description = doc.call("description()"); + m_rssservice.call("load(TQString)", url); + TQStringList returnList = m_rssservice.call("list()"); + DCOPRef doc = m_rssservice.call("document(TQString)", returnList[0]); + TQString title = doc.call("title()"); + TQString link = doc.call("link()"); + TQString description = doc.call("description()"); kdDebug() << title << endl; kdDebug() << link << endl; kdDebug() << description << endl; @@ -55,9 +55,9 @@ public: k_dcop: virtual void refresh(DCOPRef doc) { - QString title = doc.call("title()"); - QString link = doc.call("link()"); - QString description = doc.call("description()"); + TQString title = doc.call("title()"); + TQString link = doc.call("link()"); + TQString description = doc.call("description()"); kdDebug() << title << endl; kdDebug() << link << endl; kdDebug() << description << endl; diff --git a/dcoprss/document.cpp b/dcoprss/document.cpp index b43f600e..fb5cd904 100644 --- a/dcoprss/document.cpp +++ b/dcoprss/document.cpp @@ -16,20 +16,20 @@ * * ***************************************************************************/ #include -#include +#include #include #include "service.h" -RSSDocument::RSSDocument(const QString& url) : - QObject(), DCOPObject(), m_Url(url) +RSSDocument::RSSDocument(const TQString& url) : + TQObject(), DCOPObject(), m_Url(url) { m_list.setAutoDelete( true ); m_Doc = 0L; - m_pix = QPixmap(); + m_pix = TQPixmap(); m_isLoading = false; m_maxAge = 60; - m_Timeout = QDateTime::currentDateTime(); + m_Timeout = TQDateTime::currentDateTime(); m_state.clear(); } @@ -79,8 +79,8 @@ void RSSDocument::loadingComplete(Loader *ldr, Document doc, Status stat) Image *img = m_Doc->image(); if ( img ) { - connect(img, SIGNAL(gotPixmap(const QPixmap &)), - SLOT(pixmapLoaded(const QPixmap &))); + connect(img, TQT_SIGNAL(gotPixmap(const TQPixmap &)), + TQT_SLOT(pixmapLoaded(const TQPixmap &))); img->getPixmap(); pixmapUpdating(DCOPRef(this)); } @@ -94,13 +94,13 @@ void RSSDocument::loadingComplete(Loader *ldr, Document doc, Status stat) } } -void RSSDocument::pixmapLoaded(const QPixmap &pix ) +void RSSDocument::pixmapLoaded(const TQPixmap &pix ) { m_pix = pix; pixmapUpdated(DCOPRef(this)); } -QString RSSDocument::webMaster() +TQString RSSDocument::webMaster() { if( m_Doc != 0L) return m_Doc->webMaster(); @@ -108,7 +108,7 @@ QString RSSDocument::webMaster() return ""; } -QString RSSDocument::managingEditor() +TQString RSSDocument::managingEditor() { if( m_Doc != 0L) return m_Doc->managingEditor(); @@ -116,7 +116,7 @@ QString RSSDocument::managingEditor() return ""; } -QString RSSDocument::rating() +TQString RSSDocument::rating() { if( m_Doc != 0L) return m_Doc->rating(); @@ -124,23 +124,23 @@ QString RSSDocument::rating() return ""; } -QDateTime RSSDocument::lastBuildDate() +TQDateTime RSSDocument::lastBuildDate() { if( m_Doc != 0L) return m_Doc->lastBuildDate(); else - return QDateTime::currentDateTime(); + return TQDateTime::currentDateTime(); } -QDateTime RSSDocument::pubDate() +TQDateTime RSSDocument::pubDate() { if( m_Doc != 0L) return m_Doc->pubDate(); else - return QDateTime::currentDateTime(); + return TQDateTime::currentDateTime(); } -QString RSSDocument::copyright() +TQString RSSDocument::copyright() { if( m_Doc != 0L) return m_Doc->copyright(); @@ -148,20 +148,20 @@ QString RSSDocument::copyright() return ""; } -QStringList RSSDocument::articles() +TQStringList RSSDocument::articles() { if( m_Doc != 0L) { kdDebug() << "Document giving articles..." << endl; Article::List list = m_Doc->articles(); - QStringList stringList; + TQStringList stringList; for(Article::List::ConstIterator it = list.begin(); it != list.end(); ++it) stringList.append((*it).title()); return stringList; } else - return QStringList(); + return TQStringList(); } DCOPRef RSSDocument::article(int idx) @@ -179,7 +179,7 @@ int RSSDocument::count() return 0; } -QString RSSDocument::link() +TQString RSSDocument::link() { if( m_Doc != 0L) return m_Doc->link().prettyURL(); @@ -187,7 +187,7 @@ QString RSSDocument::link() return ""; } -QString RSSDocument::description() +TQString RSSDocument::description() { if( m_Doc != 0L) return m_Doc->description(); @@ -195,7 +195,7 @@ QString RSSDocument::description() return ""; } -QString RSSDocument::title() +TQString RSSDocument::title() { if( m_Doc != 0L) return m_Doc->title(); @@ -203,7 +203,7 @@ QString RSSDocument::title() return ""; } -QString RSSDocument::verbVersion() +TQString RSSDocument::verbVersion() { if( m_Doc != 0L) return m_Doc->verbVersion(); @@ -211,7 +211,7 @@ QString RSSDocument::verbVersion() return ""; } -QString RSSDocument::pixmapURL() +TQString RSSDocument::pixmapURL() { if( m_Doc != 0L) if( m_Doc->image() ) @@ -222,7 +222,7 @@ QString RSSDocument::pixmapURL() return ""; } -QPixmap RSSDocument::pixmap() +TQPixmap RSSDocument::pixmap() { return m_pix; } @@ -243,14 +243,14 @@ bool RSSDocument::pixmapValid() void RSSDocument::refresh() { kdDebug() << "Mod time " << m_Timeout.toString() << endl; - kdDebug() << "Current time " << QDateTime::currentDateTime().toString() << endl; + kdDebug() << "Current time " << TQDateTime::currentDateTime().toString() << endl; - if(!m_isLoading && (QDateTime::currentDateTime() >= m_Timeout)) + if(!m_isLoading && (TQDateTime::currentDateTime() >= m_Timeout)) { kdDebug() << "Document going to refresh" << endl; m_isLoading = true; Loader *loader = Loader::create(this, - SLOT(loadingComplete(Loader *, Document, Status))); + TQT_SLOT(loadingComplete(Loader *, Document, Status))); loader->loadFrom(KURL( m_Url ), new FileRetriever()); documentUpdating(DCOPRef(this)); } @@ -266,8 +266,8 @@ void RSSDocument::refresh() Image *img = m_Doc->image(); if ( img ) { - connect(img, SIGNAL(gotPixmap(const QPixmap &)), - SLOT(pixmapLoaded(const QPixmap &))); + connect(img, TQT_SIGNAL(gotPixmap(const TQPixmap &)), + TQT_SLOT(pixmapLoaded(const TQPixmap &))); img->getPixmap(); pixmapUpdating(DCOPRef(this)); } @@ -289,17 +289,17 @@ void RSSDocument::setMaxAge(int _min) m_Timeout.addSecs(m_maxAge); } -int RSSDocument::state( const QString &title) const +int RSSDocument::state( const TQString &title) const { return m_state[title]; } -void RSSDocument::setState( const QString &title, int s ) +void RSSDocument::setState( const TQString &title, int s ) { m_state[title] = s; } -void RSSDocument::read( const QString &title) +void RSSDocument::read( const TQString &title) { m_state[title] = 3; } diff --git a/dcoprss/feedbrowser.cpp b/dcoprss/feedbrowser.cpp index 59a55040..eae10f63 100644 --- a/dcoprss/feedbrowser.cpp +++ b/dcoprss/feedbrowser.cpp @@ -9,18 +9,18 @@ #include #include -#include -#include -#include +#include +#include +#include -CategoryItem::CategoryItem( KListView *parent, const QString &category ) +CategoryItem::CategoryItem( KListView *parent, const TQString &category ) : KListViewItem( parent ), m_category( category ) { init(); } -CategoryItem::CategoryItem( KListViewItem *parent, const QString &category ) +CategoryItem::CategoryItem( KListViewItem *parent, const TQString &category ) : KListViewItem( parent ), m_category( category ) { @@ -47,18 +47,18 @@ void CategoryItem::setOpen( bool open ) void CategoryItem::populate() { m_dcopIface = new DCOPRSSIface( this, "m_dcopIface" ); - connect( m_dcopIface, SIGNAL( gotCategories( const QStringList & ) ), - this, SLOT( gotCategories( const QStringList & ) ) ); + connect( m_dcopIface, TQT_SIGNAL( gotCategories( const TQStringList & ) ), + this, TQT_SLOT( gotCategories( const TQStringList & ) ) ); m_dcopIface->getCategories( m_category ); } -void CategoryItem::gotCategories( const QStringList &categories ) +void CategoryItem::gotCategories( const TQStringList &categories ) { delete m_dcopIface; m_dcopIface = 0; - QStringList::ConstIterator it = categories.begin(); - QStringList::ConstIterator end = categories.end(); + TQStringList::ConstIterator it = categories.begin(); + TQStringList::ConstIterator end = categories.end(); for ( ; it != end; ++it ) new CategoryItem( this, *it ); @@ -66,45 +66,45 @@ void CategoryItem::gotCategories( const QStringList &categories ) KListViewItem::setOpen( true ); } -DCOPRSSIface::DCOPRSSIface( QObject *parent, const char *name ) : - QObject( parent, name ), DCOPObject( "FeedBrowser" ) +DCOPRSSIface::DCOPRSSIface( TQObject *parent, const char *name ) : + TQObject( parent, name ), DCOPObject( "FeedBrowser" ) { - connectDCOPSignal( "rssservice", "RSSQuery", "gotCategories(QStringList)", - "slotGotCategories(QStringList)", false ); + connectDCOPSignal( "rssservice", "RSSQuery", "gotCategories(TQStringList)", + "slotGotCategories(TQStringList)", false ); } -void DCOPRSSIface::getCategories( const QString &cat ) +void DCOPRSSIface::getCategories( const TQString &cat ) { - QByteArray data; - QDataStream stream( data, IO_WriteOnly ); + TQByteArray data; + TQDataStream stream( data, IO_WriteOnly ); stream << cat; kapp->dcopClient()->send( "rssservice", "RSSQuery", - "getCategories(QString)", data ); + "getCategories(TQString)", data ); } -void DCOPRSSIface::slotGotCategories( const QStringList &categories ) +void DCOPRSSIface::slotGotCategories( const TQStringList &categories ) { emit gotCategories( categories ); } -FeedBrowserDlg::FeedBrowserDlg( QWidget *parent, const char *name ) +FeedBrowserDlg::FeedBrowserDlg( TQWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n( "DCOPRSS Feed Browser" ), Close, Close, true ) { m_dcopIface = new DCOPRSSIface( this, "m_dcopIface" ); - connect( m_dcopIface, SIGNAL( gotCategories( const QStringList & ) ), - this, SLOT( gotTopCategories( const QStringList & ) ) ); + connect( m_dcopIface, TQT_SIGNAL( gotCategories( const TQStringList & ) ), + this, TQT_SLOT( gotTopCategories( const TQStringList & ) ) ); - QVBox *mainWidget = makeVBoxMainWidget(); + TQVBox *mainWidget = makeVBoxMainWidget(); m_feedList = new KListView( mainWidget, "m_feedList" ); m_feedList->setAllColumnsShowFocus( true ); m_feedList->setRootIsDecorated( true ); m_feedList->addColumn( i18n( "Name" ) ); - connect( m_feedList, SIGNAL( executed( QListViewItem * ) ), - this, SLOT( itemSelected( QListViewItem * ) ) ); - connect( m_feedList, SIGNAL( returnPressed( QListViewItem * ) ), - this, SLOT( itemSelected( QListViewItem * ) ) ); + connect( m_feedList, TQT_SIGNAL( executed( TQListViewItem * ) ), + this, TQT_SLOT( itemSelected( TQListViewItem * ) ) ); + connect( m_feedList, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), + this, TQT_SLOT( itemSelected( TQListViewItem * ) ) ); resize( 500, 400 ); @@ -116,15 +116,15 @@ void FeedBrowserDlg::getTopCategories() m_dcopIface->getCategories( "Top" ); } -void FeedBrowserDlg::gotTopCategories( const QStringList &categories ) +void FeedBrowserDlg::gotTopCategories( const TQStringList &categories ) { - QStringList::ConstIterator it = categories.begin(); - QStringList::ConstIterator end = categories.end(); + TQStringList::ConstIterator it = categories.begin(); + TQStringList::ConstIterator end = categories.end(); for ( ; it != end; ++it ) new CategoryItem( m_feedList, *it ); } -void FeedBrowserDlg::itemSelected( QListViewItem *item ) +void FeedBrowserDlg::itemSelected( TQListViewItem *item ) { item->setOpen( !item->isOpen() ); } diff --git a/dcoprss/feedbrowser.h b/dcoprss/feedbrowser.h index 829ecd5e..9b8ce86f 100644 --- a/dcoprss/feedbrowser.h +++ b/dcoprss/feedbrowser.h @@ -1,45 +1,45 @@ #ifndef FEEDBROWSER_H #define FEEDBROWSER_H -#include +#include #include #include #include -class DCOPRSSIface : public QObject, public DCOPObject +class DCOPRSSIface : public TQObject, public DCOPObject { K_DCOP Q_OBJECT public: - DCOPRSSIface( QObject *parent, const char *name = 0 ); + DCOPRSSIface( TQObject *parent, const char *name = 0 ); k_dcop: - void slotGotCategories( const QStringList &categories ); + void slotGotCategories( const TQStringList &categories ); public slots: - void getCategories( const QString &cat = "Top" ); + void getCategories( const TQString &cat = "Top" ); signals: - void gotCategories( const QStringList &categories ); + void gotCategories( const TQStringList &categories ); }; -class CategoryItem : public QObject, public KListViewItem +class CategoryItem : public TQObject, public KListViewItem { Q_OBJECT public: - CategoryItem( KListView *parent, const QString &category ); - CategoryItem( KListViewItem *parent, const QString &category ); + CategoryItem( KListView *parent, const TQString &category ); + CategoryItem( KListViewItem *parent, const TQString &category ); virtual void setOpen( bool open ); private slots: - void gotCategories( const QStringList &categories ); + void gotCategories( const TQStringList &categories ); private: void populate(); void init(); - QString m_category; + TQString m_category; bool m_populated; DCOPRSSIface *m_dcopIface; }; @@ -49,11 +49,11 @@ class FeedBrowserDlg : public KDialogBase Q_OBJECT friend class CategoryItem; public: - FeedBrowserDlg( QWidget *parent, const char *name = 0 ); + FeedBrowserDlg( TQWidget *parent, const char *name = 0 ); private slots: - void itemSelected( QListViewItem *item ); - void gotTopCategories( const QStringList &categories ); + void itemSelected( TQListViewItem *item ); + void gotTopCategories( const TQStringList &categories ); private: void getTopCategories(); diff --git a/dcoprss/query.cpp b/dcoprss/query.cpp index b2c29fdf..9c324890 100644 --- a/dcoprss/query.cpp +++ b/dcoprss/query.cpp @@ -27,35 +27,35 @@ using KXMLRPC::Server; -void SlotCaller::call( QObject *object, const char *slot, +void SlotCaller::call( TQObject *object, const char *slot, const KXMLRPC::Query::Result &result ) { SlotCaller caller; - connect( &caller, SIGNAL( signal( const KXMLRPC::Query::Result &) ), + connect( &caller, TQT_SIGNAL( signal( const KXMLRPC::Query::Result &) ), object, slot ); emit caller.signal( result ); } -QueryService::QueryService( RSSService *service ) : QObject(), DCOPObject( "RSSQuery" ), +QueryService::QueryService( RSSService *service ) : TQObject(), DCOPObject( "RSSQuery" ), m_service( service ) { m_xmlrpcServer = new KXMLRPC::Server( KURL( "http://www.syndic8.com/xmlrpc.php"), this ); } -QStringList QueryService::listActive() +TQStringList QueryService::listActive() { if ( !m_service ) - return QStringList(); + return TQStringList(); return m_service->list(); } -void QueryService::cachedCall( const QString &method, - const QValueList &args, +void QueryService::cachedCall( const TQString &method, + const TQValueList &args, const char *slot ) { kdDebug() << "Calling " << method << endl; - const QString cacheKey = Cache::getCacheKey( m_xmlrpcServer->url().url(), + const TQString cacheKey = Cache::getCacheKey( m_xmlrpcServer->url().url(), method, args ); CacheEntry *cacheEntry = Cache::self().find( cacheKey ); @@ -70,7 +70,7 @@ void QueryService::cachedCall( const QString &method, void QueryService::updateCache( const KXMLRPC::Query::Result &result ) { - const QString cacheKey = Cache::getCacheKey( result.server(), + const TQString cacheKey = Cache::getCacheKey( result.server(), result.method(), result.args() ); @@ -81,57 +81,57 @@ void QueryService::updateCache( const KXMLRPC::Query::Result &result ) } } -void QueryService::findFeeds( const QString &query ) +void QueryService::findFeeds( const TQString &query ) { kdDebug() << "QueryService::findFeeds()" << endl; - QStringList args; + TQStringList args; args << query << "headlines_rank"; cachedCall( "syndic8.FindFeeds", Server::toVariantList( args ), - SLOT( slotFoundFeeds( const KXMLRPC::Query::Result & ) ) ); + TQT_SLOT( slotFoundFeeds( const KXMLRPC::Query::Result & ) ) ); } -void QueryService::findSites( const QString& query ) +void QueryService::findSites( const TQString& query ) { kdDebug() << "QueryService::findSites()" << endl; cachedCall( "syndic8.FindSites", Server::toVariantList( query ), - SLOT( slotFoundFeeds( const KXMLRPC::Query::Result & ) ) ); + TQT_SLOT( slotFoundFeeds( const KXMLRPC::Query::Result & ) ) ); } -void QueryService::getFeedInfo( const QVariant& ids ) +void QueryService::getFeedInfo( const TQVariant& ids ) { kdDebug() << "QueryService::getFeedInfo()" << endl; cachedCall( "syndic8.GetFeedInfo", Server::toVariantList( ids ), - SLOT( slotGotFeedInfo( const KXMLRPC::Query::Result & ) ) ); + TQT_SLOT( slotGotFeedInfo( const KXMLRPC::Query::Result & ) ) ); } -void QueryService::getCategories( const QString &category ) +void QueryService::getCategories( const TQString &category ) { kdDebug() << "QueryService::getCategories()" << endl; if ( category == "Top" ) { - cachedCall( "syndic8.GetCategoryRoots", Server::toVariantList( QString::fromLatin1( "DMOZ" ) ), - SLOT( slotGotCategories( const KXMLRPC::Query::Result & ) ) ); + cachedCall( "syndic8.GetCategoryRoots", Server::toVariantList( TQString::fromLatin1( "DMOZ" ) ), + TQT_SLOT( slotGotCategories( const KXMLRPC::Query::Result & ) ) ); } else { - QStringList args; + TQStringList args; args << "DMOZ" << category; cachedCall( "syndic8.GetCategoryChildren", Server::toVariantList( args ), - SLOT( slotGotCategories( const KXMLRPC::Query::Result & ) ) ); + TQT_SLOT( slotGotCategories( const KXMLRPC::Query::Result & ) ) ); } } -void QueryService::getFeedsInCategory( const QString &category ) +void QueryService::getFeedsInCategory( const TQString &category ) { kdDebug() << "QueryService::getFeedsInCategory()" << endl; - QStringList args; + TQStringList args; args << "DMOZ" << category; cachedCall( "syndic8.GetFeedsInCategory", Server::toVariantList( args ), - SLOT( slotGotFeedsInCategory( const KXMLRPC::Query::Result & ) ) ); + TQT_SLOT( slotGotFeedsInCategory( const KXMLRPC::Query::Result & ) ) ); } void QueryService::slotFoundFeeds( const KXMLRPC::Query::Result &result ) @@ -144,11 +144,11 @@ void QueryService::slotFoundFeeds( const KXMLRPC::Query::Result &result ) updateCache( result ); - QValueList ids; + TQValueList ids; - const QValueList values = result.data()[ 0 ].toList(); - QValueList::ConstIterator it = values.begin(); - QValueList::ConstIterator end = values.end(); + const TQValueList values = result.data()[ 0 ].toList(); + TQValueList::ConstIterator it = values.begin(); + TQValueList::ConstIterator end = values.end(); for ( ; it != end; ++it ) { ids << ( *it ).toInt(); kdDebug() << "Found feed #" << ( *it ).toInt() << endl; @@ -166,17 +166,17 @@ void QueryService::slotGotFeedInfo( const KXMLRPC::Query::Result &result ) updateCache( result ); - QMap links; - QValueList feeds; + TQMap links; + TQValueList feeds; - const QValueList feedInfos = result.data(); - QValueList::ConstIterator it = feedInfos.begin(); - QValueList::ConstIterator end = feedInfos.end(); + const TQValueList feedInfos = result.data(); + TQValueList::ConstIterator it = feedInfos.begin(); + TQValueList::ConstIterator end = feedInfos.end(); for ( ; it != end; ++it ) { - const QMap feedInfo = ( *it ).toMap(); + const TQMap feedInfo = ( *it ).toMap(); - const QString name = feedInfo[ "sitename" ].toString(); - const QString link = feedInfo[ "dataurl" ].toString(); + const TQString name = feedInfo[ "sitename" ].toString(); + const TQString link = feedInfo[ "dataurl" ].toString(); links[ name ] = link; RSSNewsFeed feed; @@ -189,7 +189,7 @@ void QueryService::slotGotFeedInfo( const KXMLRPC::Query::Result &result ) feed.m_editor = feedInfo[ "editor" ].toString(); feed.m_publisher = feedInfo[ "publisher" ].toString(); feed.m_creator = feedInfo[ "creator" ].toString(); - QDateTime dateTime; + TQDateTime dateTime; dateTime.setTime_t( KRFCDate::parseDate( feedInfo[ "date_created" ].toString() ) ); feed.m_dateCreated = dateTime; dateTime.setTime_t( KRFCDate::parseDate( feedInfo[ "date_approved" ].toString() ) ); @@ -231,11 +231,11 @@ void QueryService::slotGotCategories( const KXMLRPC::Query::Result &result ) updateCache( result ); - QStringList categories; + TQStringList categories; - const QValueList cats = result.data()[ 0 ].toList(); - QValueList::ConstIterator it = cats.begin(); - QValueList::ConstIterator end = cats.end(); + const TQValueList cats = result.data()[ 0 ].toList(); + TQValueList::ConstIterator it = cats.begin(); + TQValueList::ConstIterator end = cats.end(); for ( ; it != end; ++it ) categories << ( *it ).toString(); @@ -254,11 +254,11 @@ void QueryService::slotGotFeedsInCategory( const KXMLRPC::Query::Result &result updateCache( result ); - QValueList ids; + TQValueList ids; - const QValueList values = result.data()[ 0 ].toList(); - QValueList::ConstIterator it = values.begin(); - QValueList::ConstIterator end = values.end(); + const TQValueList values = result.data()[ 0 ].toList(); + TQValueList::ConstIterator it = values.begin(); + TQValueList::ConstIterator end = values.end(); for ( ; it != end; ++it ) { ids << ( *it ).toInt(); kdDebug() << "Got feed in category: #" << ( *it ).toInt() << endl; diff --git a/dcoprss/query.h b/dcoprss/query.h index d87e0505..dbaf5093 100644 --- a/dcoprss/query.h +++ b/dcoprss/query.h @@ -24,10 +24,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include class RSSService; @@ -39,7 +39,7 @@ class SlotCaller : public QObject { Q_OBJECT public: - static void call( QObject *object, const char *slot, + static void call( TQObject *object, const char *slot, const KXMLRPC::Query::Result &value ); signals: @@ -49,7 +49,7 @@ class SlotCaller : public QObject SlotCaller() { } }; -class QueryService : public QObject, public DCOPObject +class QueryService : public TQObject, public DCOPObject { K_DCOP Q_OBJECT @@ -57,23 +57,23 @@ class QueryService : public QObject, public DCOPObject QueryService( RSSService *service ); k_dcop_signals: - void feedIds( QValueList ids ); - void feedInfo(QMap links); - void feedInfo(QValueList feeds); - void gotCategories( const QStringList &categories ); - void gotFeedsInCategory( const QValueList &ids ); + void feedIds( TQValueList ids ); + void feedInfo(TQMap links); + void feedInfo(TQValueList feeds); + void gotCategories( const TQStringList &categories ); + void gotFeedsInCategory( const TQValueList &ids ); k_dcop: /** * Lists the active feeds in use... **/ - QStringList listActive(); // just for testing... + TQStringList listActive(); // just for testing... /** * Query the www.syndic8.com XML-RPC interface for the * string. The RSS ids are treturned in a integer list. **/ - void findFeeds( const QString& query ); + void findFeeds( const TQString& query ); /** * Query the www.syndic8.com XML-RPC interface for the @@ -81,26 +81,26 @@ class QueryService : public QObject, public DCOPObject * each feed in the feed list. The RSS ids are treturned * in a integer list. **/ - void findSites( const QString& query ); + void findSites( const TQString& query ); /** * Query the www.syndic8.com XML-RPC interface for the - * requested RSS feed(s). Returned is a QMap with the format + * requested RSS feed(s). Returned is a TQMap with the format * of Name (Site URL), RSS URL **/ - void getFeedInfo( const QVariant& ids ); + void getFeedInfo( const TQVariant& ids ); /** * Returns the list of subcategories in the specified category. * If no "Top" is specified, the root categories are returned. */ - void getCategories( const QString &category ); + void getCategories( const TQString &category ); /** * Queries the database for the list of needsfeed ID's which are * associated with the given category. */ - void getFeedsInCategory( const QString &category ); + void getFeedsInCategory( const TQString &category ); private slots: @@ -110,7 +110,7 @@ class QueryService : public QObject, public DCOPObject void slotGotFeedsInCategory( const KXMLRPC::Query::Result &result ); private: - void cachedCall( const QString &method, const QValueList &args, + void cachedCall( const TQString &method, const TQValueList &args, const char *slot ); void updateCache( const KXMLRPC::Query::Result &result ); diff --git a/dcoprss/rssnewsfeed.h b/dcoprss/rssnewsfeed.h index 3c2e04b5..ee300655 100644 --- a/dcoprss/rssnewsfeed.h +++ b/dcoprss/rssnewsfeed.h @@ -11,76 +11,76 @@ #ifndef RSSNEWSFEED_H #define RSSNEWSFEED_H -#include -#include -#include +#include +#include +#include #include class QueryService; class RSSNewsFeed { - friend QDataStream &operator>>( QDataStream &stream, RSSNewsFeed &feed ); - friend QDataStream &operator<<( QDataStream &stream, const RSSNewsFeed &feed ); + friend TQDataStream &operator>>( TQDataStream &stream, RSSNewsFeed &feed ); + friend TQDataStream &operator<<( TQDataStream &stream, const RSSNewsFeed &feed ); friend class QueryService; public: unsigned int id() const { return m_id; } - QString name() const { return m_name; } - QString description() const { return m_description; } - QString origin() const { return m_origin; } - QString languageCode() const { return m_languageCode; } - QString status() const { return m_status; } - QString version() const { return m_version; } - QString homePage() const { return m_homePage; } - QString sourceFile() const { return m_sourceFile; } - QString imageUrl() const { return m_imageUrl; } - QString webmaster() const { return m_webmaster; } - QString editor() const { return m_editor; } - QString publisher() const { return m_publisher; } - QString creator() const { return m_creator; } - const QDateTime &dateCreated() const { return m_dateCreated; } - const QDateTime &dateApproved() const { return m_dateApproved; } - const QDateTime dateXmlChanged() const { return m_dateXmlChanged; } + TQString name() const { return m_name; } + TQString description() const { return m_description; } + TQString origin() const { return m_origin; } + TQString languageCode() const { return m_languageCode; } + TQString status() const { return m_status; } + TQString version() const { return m_version; } + TQString homePage() const { return m_homePage; } + TQString sourceFile() const { return m_sourceFile; } + TQString imageUrl() const { return m_imageUrl; } + TQString webmaster() const { return m_webmaster; } + TQString editor() const { return m_editor; } + TQString publisher() const { return m_publisher; } + TQString creator() const { return m_creator; } + const TQDateTime &dateCreated() const { return m_dateCreated; } + const TQDateTime &dateApproved() const { return m_dateApproved; } + const TQDateTime dateXmlChanged() const { return m_dateXmlChanged; } bool fetchable() const { return m_fetchable; } unsigned int views() const { return m_views; } unsigned int headlinesPerDay() const { return m_headlinesPerDay; } unsigned int headlinesRank() const { return m_headlinesRank; } - QString toolkit() const { return m_toolkit; } - QString toolkitVersion() const { return m_toolkitVersion; } + TQString toolkit() const { return m_toolkit; } + TQString toolkitVersion() const { return m_toolkitVersion; } unsigned int pollingInterval() const { return m_pollingInterval; } - const QDateTime &lastPoll() const { return m_lastPoll; } - QStringList categories() const { return m_categories; } + const TQDateTime &lastPoll() const { return m_lastPoll; } + TQStringList categories() const { return m_categories; } private: unsigned int m_id; - QString m_name; - QString m_description; - QString m_origin; - QString m_languageCode; - QString m_status; - QString m_version; - QString m_homePage; - QString m_sourceFile; - QString m_imageUrl; - QString m_webmaster; - QString m_editor; - QString m_publisher; - QString m_creator; - QDateTime m_dateCreated; - QDateTime m_dateApproved; - QDateTime m_dateXmlChanged; + TQString m_name; + TQString m_description; + TQString m_origin; + TQString m_languageCode; + TQString m_status; + TQString m_version; + TQString m_homePage; + TQString m_sourceFile; + TQString m_imageUrl; + TQString m_webmaster; + TQString m_editor; + TQString m_publisher; + TQString m_creator; + TQDateTime m_dateCreated; + TQDateTime m_dateApproved; + TQDateTime m_dateXmlChanged; bool m_fetchable; unsigned int m_views; unsigned int m_headlinesPerDay; unsigned int m_headlinesRank; - QString m_toolkit; - QString m_toolkitVersion; + TQString m_toolkit; + TQString m_toolkitVersion; unsigned int m_pollingInterval; - QDateTime m_lastPoll; - QStringList m_categories; + TQDateTime m_lastPoll; + TQStringList m_categories; }; -inline QDataStream &operator<<( QDataStream &stream, const RSSNewsFeed &feed ) +inline TQDataStream &operator<<( TQDataStream &stream, const RSSNewsFeed &feed ) { return stream << feed.m_id << feed.m_name << feed.m_description << feed.m_origin << feed.m_languageCode << feed.m_status @@ -94,7 +94,7 @@ inline QDataStream &operator<<( QDataStream &stream, const RSSNewsFeed &feed ) << feed.m_categories; } -inline QDataStream &operator>>( QDataStream &stream, RSSNewsFeed &feed ) +inline TQDataStream &operator>>( TQDataStream &stream, RSSNewsFeed &feed ) { int i; stream >> feed.m_id >> feed.m_name >> feed.m_description diff --git a/dcoprss/service.cpp b/dcoprss/service.cpp index 74544dc1..54e987b2 100644 --- a/dcoprss/service.cpp +++ b/dcoprss/service.cpp @@ -34,16 +34,16 @@ RSSService::~RSSService() } -QStringList RSSService::list() +TQStringList RSSService::list() { - QStringList lst; - QDictIterator itr(m_list); + TQStringList lst; + TQDictIterator itr(m_list); for(; itr.current(); ++itr) lst.append(itr.currentKey()); return lst; } -DCOPRef RSSService::add(QString id) +DCOPRef RSSService::add(TQString id) { if(m_list.find(id) == 0L) { // add a new one only if we need to m_list.insert(id, new RSSDocument(id)); @@ -53,14 +53,14 @@ DCOPRef RSSService::add(QString id) return document(id); } -void RSSService::remove(QString id) +void RSSService::remove(TQString id) { m_list.remove(id); removed(id); saveLinks(); } -DCOPRef RSSService::document(QString id) +DCOPRef RSSService::document(TQString id) { if( m_list[id] ) return DCOPRef(m_list[id]); @@ -81,9 +81,9 @@ void RSSService::loadLinks() { KConfig *conf = kapp->config(); conf->setGroup("RSS Links"); - const QStringList links = conf->readListEntry ("links"); - QStringList::ConstIterator it = links.begin(); - QStringList::ConstIterator end = links.end(); + const TQStringList links = conf->readListEntry ("links"); + TQStringList::ConstIterator it = links.begin(); + TQStringList::ConstIterator end = links.end(); for ( ; it != end; ++it ) add( *it ); } @@ -92,8 +92,8 @@ void RSSService::saveLinks() { KConfig *conf = kapp->config(); conf->setGroup("RSS Links"); - QStringList lst; - QDictIterator itr(m_list); + TQStringList lst; + TQDictIterator itr(m_list); for(; itr.current(); ++itr) lst.append(itr.currentKey()); diff --git a/dcoprss/service.h b/dcoprss/service.h index 35cf229e..64a3589e 100644 --- a/dcoprss/service.h +++ b/dcoprss/service.h @@ -21,12 +21,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -47,7 +47,7 @@ class RSSService : public DCOPObject private: - QDict m_list; + TQDict m_list; public: RSSService(); @@ -59,14 +59,14 @@ class RSSService : public DCOPObject k_dcop_signals: /** * Emmitted when a new document has been added. You can then - * use document(QString) to get the dcop ref for the object. + * use document(TQString) to get the dcop ref for the object. * Note: this document may or may not be valid at this * point so you should connect your dcop signals and then * do a documentValid() on the dcop ref to make sure of its * state. **/ - void added(QString); + void added(TQString); /** * Emmitted when the document has been removed. * note at this point the DCOPRef for this object is @@ -75,7 +75,7 @@ class RSSService : public DCOPObject * process of loading the document call will be safely ignored * and you will be notified of the updates. **/ - void removed(QString); + void removed(TQString); k_dcop: /** * Add a new rdf file resource. This will return a dcop reference to the resource. If its a new @@ -83,50 +83,50 @@ class RSSService : public DCOPObject * once this reference has been returned you may connect dcop signals and then call * refresh on the RSSDocument. The document will not be updated until refresh is called. **/ - DCOPRef add(QString url); + DCOPRef add(TQString url); /** * Return a list of current rss documents **/ - QStringList list(); + TQStringList list(); /** * Remove an rss document resource. NOTE: Be aware that others may be using this * resource and if you remove it they may break. Likewise be aware that someone may * decide to remove your resource on you so you should always check to see if the resource * is valid before you access it. **/ - void remove(QString url); + void remove(TQString url); /** * Return the reference to a requested resource. If this resource is not present a null dcopref is * returned. **/ - DCOPRef document(QString url); + DCOPRef document(TQString url); /** * Exit the RSSService. This will clean everything up and exit. **/ void exit(); }; -class RSSDocument : public QObject, public DCOPObject +class RSSDocument : public TQObject, public DCOPObject { Q_OBJECT K_DCOP private: bool m_isLoading; - QString m_Url; + TQString m_Url; Document *m_Doc; - QPixmap m_pix; - QPtrList m_list; - QMap m_state; - QDateTime m_Timeout; + TQPixmap m_pix; + TQPtrList m_list; + TQMap m_state; + TQDateTime m_Timeout; int m_maxAge; private slots: - void pixmapLoaded(const QPixmap&); + void pixmapLoaded(const TQPixmap&); void loadingComplete(Loader *, Document, Status); public: - RSSDocument(const QString& url); + RSSDocument(const TQString& url); ~RSSDocument(); k_dcop_signals: @@ -161,31 +161,31 @@ class RSSDocument : public QObject, public DCOPObject /** * Return the webmaster information from the RSS::Document **/ - QString webMaster(); + TQString webMaster(); /** * Return the manageing editor from the RSS::Document **/ - QString managingEditor(); + TQString managingEditor(); /** * Returns the rating of the RSS::Document **/ - QString rating(); + TQString rating(); /** * Returns the last build date from the RSS::Document **/ - QDateTime lastBuildDate(); + TQDateTime lastBuildDate(); /** * Returns the publication date from the RSS::Document **/ - QDateTime pubDate(); + TQDateTime pubDate(); /** * Returns the copyright information from the RSS::Document **/ - QString copyright(); + TQString copyright(); /** * Returns a list of article titles **/ - QStringList articles(); + TQStringList articles(); /** * Returns the number of articles **/ @@ -197,27 +197,27 @@ class RSSDocument : public QObject, public DCOPObject /** * Returns the link from the RSS::Document **/ - QString link(); + TQString link(); /** * Returns the description from the RSS::Document **/ - QString description(); + TQString description(); /** * Returns the title from the RSS::Document **/ - QString title(); + TQString title(); /** * Returns the text version from the RSS::Document **/ - QString verbVersion(); + TQString verbVersion(); /** * Returns the url for the pixmap from the RSS::Document **/ - QString pixmapURL(); + TQString pixmapURL(); /** * Returns the actual pixmap from the RSS::Document's RSS::Image **/ - QPixmap pixmap(); + TQPixmap pixmap(); /** * Returns if the RSSDocument contains a valid RSS::Document yet. **/ @@ -249,17 +249,17 @@ class RSSDocument : public QObject, public DCOPObject * 2 - unread * 3 - read */ - int state( const QString &title) const; + int state( const TQString &title) const; /** * Set the article state */ - void setState( const QString &title, int s ); + void setState( const TQString &title, int s ); /** * Convience method that will set a title to read. */ - void read( const QString &title); + void read( const TQString &title); }; class RSSArticle : public DCOPObject @@ -277,14 +277,14 @@ class RSSArticle : public DCOPObject /** * Return the articles title **/ - QString title(); + TQString title(); /** * Return the articles description **/ - QString description(); + TQString description(); /** * Return the link to the article **/ - QString link(); + TQString link(); }; #endif diff --git a/dcoprss/xmlrpciface.cpp b/dcoprss/xmlrpciface.cpp index e86639eb..64259bbb 100644 --- a/dcoprss/xmlrpciface.cpp +++ b/dcoprss/xmlrpciface.cpp @@ -29,46 +29,46 @@ #include #include -#include +#include using namespace KXMLRPC; -Query *Query::create( QObject *parent, const char *name ) +Query *Query::create( TQObject *parent, const char *name ) { return new Query( parent, name ); } -void Query::call( const QString &server, const QString &method, - const QValueList &args, const QString &userAgent ) +void Query::call( const TQString &server, const TQString &method, + const TQValueList &args, const TQString &userAgent ) { m_buffer.open( IO_ReadWrite ); m_server = server; m_method = method; m_args = args; - const QString xmlMarkup = markupCall( method, args ); + const TQString xmlMarkup = markupCall( method, args ); - QByteArray postData; - QDataStream stream( postData, IO_WriteOnly ); + TQByteArray postData; + TQDataStream stream( postData, IO_WriteOnly ); stream.writeRawBytes( xmlMarkup.utf8(), xmlMarkup.length() ); KIO::TransferJob *job = KIO::http_post( KURL( server ), postData, false ); job->addMetaData( "UserAgent", userAgent ); job->addMetaData( "content-type", "Content-Type: text/xml; charset=utf-8" ); - connect( job, SIGNAL( infoMessage( KIO::Job *, const QString & ) ), - this, SLOT( slotInfoMessage( KIO::Job *, const QString & ) ) ); - connect( job, SIGNAL( data( KIO::Job *, const QByteArray & ) ), - this, SLOT( slotData( KIO::Job *, const QByteArray & ) ) ); - connect( job, SIGNAL( result( KIO::Job * ) ), - this, SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( infoMessage( KIO::Job *, const TQString & ) ), + this, TQT_SLOT( slotInfoMessage( KIO::Job *, const TQString & ) ) ); + connect( job, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), + this, TQT_SLOT( slotData( KIO::Job *, const TQByteArray & ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + this, TQT_SLOT( slotResult( KIO::Job * ) ) ); } -void Query::slotInfoMessage( KIO::Job *, const QString &msg ) +void Query::slotInfoMessage( KIO::Job *, const TQString &msg ) { emit infoMessage( msg ); } -void Query::slotData( KIO::Job *, const QByteArray &data ) +void Query::slotData( KIO::Job *, const TQByteArray &data ) { m_buffer.writeBlock( data ); } @@ -90,7 +90,7 @@ void Query::slotResult( KIO::Job *job ) return; } - QDomDocument doc; + TQDomDocument doc; if ( !doc.setContent( m_buffer.buffer() ) ) { response.m_errorCode = -1; response.m_errorString = i18n( "Received invalid XML markup" ); @@ -119,17 +119,17 @@ void Query::slotResult( KIO::Job *job ) delete this; } -bool Query::isMessageResponse( const QDomDocument &doc ) const +bool Query::isMessageResponse( const TQDomDocument &doc ) const { return doc.documentElement().firstChild().toElement().tagName().lower() == "params"; } -Query::Result Query::parseMessageResponse( const QDomDocument &doc ) const +Query::Result Query::parseMessageResponse( const TQDomDocument &doc ) const { Result response; response.m_success = true; - QDomNode paramNode = doc.documentElement().firstChild().firstChild(); + TQDomNode paramNode = doc.documentElement().firstChild().firstChild(); while ( !paramNode.isNull() ) { response.m_data << demarshal( paramNode.firstChild().toElement() ); paramNode = paramNode.nextSibling(); @@ -138,35 +138,35 @@ Query::Result Query::parseMessageResponse( const QDomDocument &doc ) const return response; } -bool Query::isFaultResponse( const QDomDocument &doc ) const +bool Query::isFaultResponse( const TQDomDocument &doc ) const { return doc.documentElement().firstChild().toElement().tagName().lower() == "fault"; } -Query::Result Query::parseFaultResponse( const QDomDocument &doc ) const +Query::Result Query::parseFaultResponse( const TQDomDocument &doc ) const { Result response; response.m_success = false; - QDomNode errorNode = doc.documentElement().firstChild().firstChild(); - const QVariant errorVariant = demarshal( errorNode.toElement() ); + TQDomNode errorNode = doc.documentElement().firstChild().firstChild(); + const TQVariant errorVariant = demarshal( errorNode.toElement() ); response.m_errorCode = errorVariant.toMap()[ "faultCode" ].toInt(); response.m_errorString = errorVariant.toMap()[ "faultString" ].toString(); return response; } -QString Query::markupCall( const QString &cmd, - const QValueList &args ) const +TQString Query::markupCall( const TQString &cmd, + const TQValueList &args ) const { - QString markup = ""; + TQString markup = ""; markup += "" + cmd + ""; if ( !args.isEmpty() ) { markup += ""; - QValueList::ConstIterator it = args.begin(); - QValueList::ConstIterator end = args.end(); + TQValueList::ConstIterator it = args.begin(); + TQValueList::ConstIterator end = args.end(); for ( ; it != end; ++it ) markup += "" + marshal( *it ) + ""; markup += ""; @@ -177,46 +177,46 @@ QString Query::markupCall( const QString &cmd, return markup; } -QString Query::marshal( const QVariant &arg ) +TQString Query::marshal( const TQVariant &arg ) { - QString s = ""; + TQString s = ""; switch ( arg.type() ) { - case QVariant::String: - case QVariant::CString: + case TQVariant::String: + case TQVariant::CString: s += "" + arg.toString() + ""; break; - case QVariant::Int: - s += "" + QString::number( arg.toInt() ) + ""; + case TQVariant::Int: + s += "" + TQString::number( arg.toInt() ) + ""; break; - case QVariant::Double: - s += "" + QString::number( arg.toDouble() ) + ""; + case TQVariant::Double: + s += "" + TQString::number( arg.toDouble() ) + ""; break; - case QVariant::Bool: + case TQVariant::Bool: s += ""; s += arg.toBool() ? "true" : "false"; s += ""; break; - case QVariant::ByteArray: + case TQVariant::ByteArray: s += "" + KCodecs::base64Encode( arg.toByteArray() ) + ""; break; - case QVariant::DateTime: + case TQVariant::DateTime: s += "" + arg.toDateTime().toString( Qt::ISODate ) + ""; break; - case QVariant::List: { + case TQVariant::List: { s += ""; - const QValueList args = arg.toList(); - QValueList::ConstIterator it = args.begin(); - QValueList::ConstIterator end = args.end(); + const TQValueList args = arg.toList(); + TQValueList::ConstIterator it = args.begin(); + TQValueList::ConstIterator end = args.end(); for ( ; it != end; ++it ) s += marshal( *it ); s += ""; break; } - case QVariant::Map: { + case TQVariant::Map: { s += ""; - QMap map = arg.toMap(); - QMap::ConstIterator it = map.begin(); - QMap::ConstIterator end = map.end(); + TQMap map = arg.toMap(); + TQMap::ConstIterator it = map.begin(); + TQMap::ConstIterator end = map.end(); for ( ; it != end; ++it ) { s += ""; s += "" + it.key() + ""; @@ -233,127 +233,127 @@ QString Query::marshal( const QVariant &arg ) return s + ""; } -QVariant Query::demarshal( const QDomElement &elem ) +TQVariant Query::demarshal( const TQDomElement &elem ) { Q_ASSERT( elem.tagName().lower() == "value" ); if ( !elem.firstChild().isElement() ) - return QVariant( elem.text() ); + return TQVariant( elem.text() ); - const QDomElement typeElement = elem.firstChild().toElement(); - const QString typeName = typeElement.tagName().lower(); + const TQDomElement typeElement = elem.firstChild().toElement(); + const TQString typeName = typeElement.tagName().lower(); if ( typeName == "string" ) - return QVariant( typeElement.text() ); + return TQVariant( typeElement.text() ); else if ( typeName == "i4" || typeName == "int" ) - return QVariant( typeElement.text().toInt() ); + return TQVariant( typeElement.text().toInt() ); else if ( typeName == "double" ) - return QVariant( typeElement.text().toDouble() ); + return TQVariant( typeElement.text().toDouble() ); else if ( typeName == "boolean" ) { if ( typeElement.text().lower() == "true" || typeElement.text() == "1" ) - return QVariant( true ); + return TQVariant( true ); else - return QVariant( false ); + return TQVariant( false ); } else if ( typeName == "base64" ) - return QVariant( KCodecs::base64Decode( typeElement.text().latin1() ) ); + return TQVariant( KCodecs::base64Decode( typeElement.text().latin1() ) ); else if ( typeName == "datetime" || typeName == "datetime.iso8601" ) - return QVariant( QDateTime::fromString( typeElement.text(), Qt::ISODate ) ); + return TQVariant( TQDateTime::fromString( typeElement.text(), Qt::ISODate ) ); else if ( typeName == "array" ) { - QValueList values; - QDomNode valueNode = typeElement.firstChild().firstChild(); + TQValueList values; + TQDomNode valueNode = typeElement.firstChild().firstChild(); while ( !valueNode.isNull() ) { values << demarshal( valueNode.toElement() ); valueNode = valueNode.nextSibling(); } - return QVariant( values ); + return TQVariant( values ); } else if ( typeName == "struct" ) { - QMap map; - QDomNode memberNode = typeElement.firstChild(); + TQMap map; + TQDomNode memberNode = typeElement.firstChild(); while ( !memberNode.isNull() ) { - const QString key = memberNode.toElement().elementsByTagName( "name" ).item( 0 ).toElement().text(); - const QVariant data = demarshal( memberNode.toElement().elementsByTagName( "value" ).item( 0 ).toElement() ); + const TQString key = memberNode.toElement().elementsByTagName( "name" ).item( 0 ).toElement().text(); + const TQVariant data = demarshal( memberNode.toElement().elementsByTagName( "value" ).item( 0 ).toElement() ); map[ key ] = data; memberNode = memberNode.nextSibling(); } - return QVariant( map ); + return TQVariant( map ); } else kdWarning() << "Cannot demarshal unknown type " << typeName << endl; - return QVariant(); + return TQVariant(); } -Query::Query( QObject *parent, const char *name ) : QObject( parent, name ) +Query::Query( TQObject *parent, const char *name ) : TQObject( parent, name ) { } -QValueList Server::toVariantList( const QVariant &arg ) +TQValueList Server::toVariantList( const TQVariant &arg ) { - QValueList args; + TQValueList args; args << arg ; return args; } -QValueList Server::toVariantList( int arg ) +TQValueList Server::toVariantList( int arg ) { - QValueList args; + TQValueList args; args << arg ; return args; } -QValueList Server::toVariantList( bool arg ) +TQValueList Server::toVariantList( bool arg ) { - QValueList args; + TQValueList args; args << arg ; return args; } -QValueList Server::toVariantList( double arg ) +TQValueList Server::toVariantList( double arg ) { - QValueList args; + TQValueList args; args << arg ; return args; } -QValueList Server::toVariantList( const QString &arg ) +TQValueList Server::toVariantList( const TQString &arg ) { - QValueList args; + TQValueList args; args << arg ; return args; } -QValueList Server::toVariantList( const QCString &arg ) +TQValueList Server::toVariantList( const TQCString &arg ) { - QValueList args; + TQValueList args; args << arg ; return args; } -QValueList Server::toVariantList( const QByteArray &arg ) +TQValueList Server::toVariantList( const TQByteArray &arg ) { - QValueList args; + TQValueList args; args << arg ; return args; } -QValueList Server::toVariantList( const QDateTime &arg ) +TQValueList Server::toVariantList( const TQDateTime &arg ) { - QValueList args; + TQValueList args; args << arg ; return args; } -QValueList Server::toVariantList( const QStringList &arg ) +TQValueList Server::toVariantList( const TQStringList &arg ) { - QValueList args; - QStringList::ConstIterator it = arg.begin(); - QStringList::ConstIterator end = arg.end(); + TQValueList args; + TQStringList::ConstIterator it = arg.begin(); + TQStringList::ConstIterator end = arg.end(); for ( ; it != end; ++it ) - args << QVariant( *it ); + args << TQVariant( *it ); return args; } -Server::Server( const KURL &url, QObject *parent, const char *name ) - : QObject( parent, name ) +Server::Server( const KURL &url, TQObject *parent, const char *name ) + : TQObject( parent, name ) { if ( url.isValid() ) m_url = url; @@ -364,8 +364,8 @@ void Server::setUrl( const KURL &url ) m_url = url.isValid() ? url : KURL(); } -void Server::call( const QString &method, const QValueList &args, - QObject *receiver, const char *slot ) +void Server::call( const TQString &method, const TQValueList &args, + TQObject *receiver, const char *slot ) { if ( m_url.isEmpty() ) { kdWarning() << "Cannot execute call to " << method << ": empty server URL" << endl; @@ -373,16 +373,16 @@ void Server::call( const QString &method, const QValueList &args, } Query *query = Query::create( this ); - connect( query, SIGNAL( infoMessage( const QString & ) ), - this, SIGNAL( infoMessage( const QString & ) ) ); - connect( query, SIGNAL( finished( const KXMLRPC::Query::Result & ) ), + connect( query, TQT_SIGNAL( infoMessage( const TQString & ) ), + this, TQT_SIGNAL( infoMessage( const TQString & ) ) ); + connect( query, TQT_SIGNAL( finished( const KXMLRPC::Query::Result & ) ), receiver, slot ); query->call( m_url.url(), method, args, m_userAgent ); } -void Server::call( const QString &method, const QValueList &args, - QObject *receiver, const char *slot, - QObject *infoObject, const char *infoSlot ) +void Server::call( const TQString &method, const TQValueList &args, + TQObject *receiver, const char *slot, + TQObject *infoObject, const char *infoSlot ) { if ( m_url.isEmpty() ) { kdWarning() << "Cannot execute call to " << method << ": empty server URL" << endl; @@ -390,9 +390,9 @@ void Server::call( const QString &method, const QValueList &args, } Query *query = Query::create( this ); - connect( query, SIGNAL( infoMessage( const QString &msg ) ), + connect( query, TQT_SIGNAL( infoMessage( const TQString &msg ) ), infoObject, infoSlot ); - connect( query, SIGNAL( finished( const KXMLRPC::Query::Result & ) ), + connect( query, TQT_SIGNAL( finished( const KXMLRPC::Query::Result & ) ), receiver, slot ); query->call( m_url.url(), method, args, m_userAgent ); } diff --git a/dcoprss/xmlrpciface.h b/dcoprss/xmlrpciface.h index f7897e10..d3b1a4b0 100644 --- a/dcoprss/xmlrpciface.h +++ b/dcoprss/xmlrpciface.h @@ -27,11 +27,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class QDomDocument; class QDomElement; @@ -54,62 +54,62 @@ namespace KXMLRPC class Result { friend class Query; - friend QDataStream &operator>>( QDataStream &s, Query::Result &r ); + friend TQDataStream &operator>>( TQDataStream &s, Query::Result &r ); public: Result() { } bool success() const { return m_success; } int errorCode() const { return m_errorCode; } - QString errorString() const { return m_errorString; } - QValueList data() const { return m_data; } - QString server() const { return m_server; } - QString method() const { return m_method; } - QValueList args() const { return m_args; } + TQString errorString() const { return m_errorString; } + TQValueList data() const { return m_data; } + TQString server() const { return m_server; } + TQString method() const { return m_method; } + TQValueList args() const { return m_args; } private: bool m_success; int m_errorCode; - QString m_errorString; - QValueList m_data; - QString m_server; - QString m_method; - QValueList m_args; + TQString m_errorString; + TQValueList m_data; + TQString m_server; + TQString m_method; + TQValueList m_args; }; - static Query *create( QObject *parent = 0, const char *name = 0 ); - static QString marshal( const QVariant &v ); - static QVariant demarshal( const QDomElement &e ); + static Query *create( TQObject *parent = 0, const char *name = 0 ); + static TQString marshal( const TQVariant &v ); + static TQVariant demarshal( const TQDomElement &e ); public slots: - void call( const QString &server, const QString &method, - const QValueList &args = QValueList(), - const QString &userAgent = "KDE-XMLRPC" ); + void call( const TQString &server, const TQString &method, + const TQValueList &args = TQValueList(), + const TQString &userAgent = "KDE-XMLRPC" ); signals: - void infoMessage( const QString &msg ); + void infoMessage( const TQString &msg ); void finished( const KXMLRPC::Query::Result &result ); private slots: - void slotInfoMessage( KIO::Job *job, const QString &msg ); - void slotData( KIO::Job *job, const QByteArray &data ); + void slotInfoMessage( KIO::Job *job, const TQString &msg ); + void slotData( KIO::Job *job, const TQByteArray &data ); void slotResult( KIO::Job *job ); private: - bool isMessageResponse( const QDomDocument &doc ) const; - bool isFaultResponse( const QDomDocument &doc ) const; + bool isMessageResponse( const TQDomDocument &doc ) const; + bool isFaultResponse( const TQDomDocument &doc ) const; - Result parseMessageResponse( const QDomDocument &doc ) const; - Result parseFaultResponse( const QDomDocument &doc ) const; + Result parseMessageResponse( const TQDomDocument &doc ) const; + Result parseFaultResponse( const TQDomDocument &doc ) const; - QString markupCall( const QString &method, - const QValueList &args ) const; + TQString markupCall( const TQString &method, + const TQValueList &args ) const; - Query( QObject *parent = 0, const char *name = 0 ); + Query( TQObject *parent = 0, const char *name = 0 ); - QBuffer m_buffer; - QString m_server; - QString m_method; - QValueList m_args; + TQBuffer m_buffer; + TQString m_server; + TQString m_method; + TQValueList m_args; }; class Server : public QObject @@ -117,44 +117,44 @@ namespace KXMLRPC Q_OBJECT public: Server( const KURL &url = KURL(), - QObject *parent = 0, const char *name = 0 ); + TQObject *parent = 0, const char *name = 0 ); const KURL &url() const { return m_url; } void setUrl( const KURL &url ); - QString userAgent() const { return m_userAgent; } - void setUserAgent( const QString &userAgent) { m_userAgent = userAgent; } + TQString userAgent() const { return m_userAgent; } + void setUserAgent( const TQString &userAgent) { m_userAgent = userAgent; } template - void call( const QString &method, const QValueList &arg, - QObject *object, const char *slot ); - - static QValueList toVariantList( const QVariant &arg ); - static QValueList toVariantList( int arg ); - static QValueList toVariantList( bool arg ); - static QValueList toVariantList( double arg ); - static QValueList toVariantList( const QString &arg ); - static QValueList toVariantList( const QCString &arg ); - static QValueList toVariantList( const QByteArray &arg ); - static QValueList toVariantList( const QDateTime &arg ); - static QValueList toVariantList( const QStringList &arg ); + void call( const TQString &method, const TQValueList &arg, + TQObject *object, const char *slot ); + + static TQValueList toVariantList( const TQVariant &arg ); + static TQValueList toVariantList( int arg ); + static TQValueList toVariantList( bool arg ); + static TQValueList toVariantList( double arg ); + static TQValueList toVariantList( const TQString &arg ); + static TQValueList toVariantList( const TQCString &arg ); + static TQValueList toVariantList( const TQByteArray &arg ); + static TQValueList toVariantList( const TQDateTime &arg ); + static TQValueList toVariantList( const TQStringList &arg ); signals: - void infoMessage( const QString &msg ); + void infoMessage( const TQString &msg ); public slots: - void call( const QString &method, const QValueList &args, - QObject *object, const char *slot ); - void call( const QString &method, const QValueList &args, - QObject *object, const char *slot, - QObject *infoObject, const char *infoSlot ); + void call( const TQString &method, const TQValueList &args, + TQObject *object, const char *slot ); + void call( const TQString &method, const TQValueList &args, + TQObject *object, const char *slot, + TQObject *infoObject, const char *infoSlot ); private: KURL m_url; - QString m_userAgent; + TQString m_userAgent; }; - inline QDataStream &operator>>( QDataStream &s, Query::Result &r ) + inline TQDataStream &operator>>( TQDataStream &s, Query::Result &r ) { return s >> r.m_errorCode >> r.m_errorString >> r.m_data >> r.m_server >> r.m_method >> r.m_args; @@ -162,20 +162,20 @@ namespace KXMLRPC } template -void KXMLRPC::Server::call( const QString &method, const QValueList &arg, - QObject *object, const char *slot ) +void KXMLRPC::Server::call( const TQString &method, const TQValueList &arg, + TQObject *object, const char *slot ) { - QValueList args; + TQValueList args; - typename QValueList::ConstIterator it = arg.begin(); - typename QValueList::ConstIterator end = arg.end(); + typename TQValueList::ConstIterator it = arg.begin(); + typename TQValueList::ConstIterator end = arg.end(); for ( ; it != end; ++it ) - args << QVariant( *it ); + args << TQVariant( *it ); call( method, args, object, slot ); } -inline QDataStream &operator<<( QDataStream &s, const KXMLRPC::Query::Result &r ) +inline TQDataStream &operator<<( TQDataStream &s, const KXMLRPC::Query::Result &r ) { return s << r.errorCode() << r.errorString() << r.data() << r.server() << r.method() << r.args(); diff --git a/filesharing/advanced/kcm_sambaconf/common.cpp b/filesharing/advanced/kcm_sambaconf/common.cpp index 74a6ddd3..cac856f0 100644 --- a/filesharing/advanced/kcm_sambaconf/common.cpp +++ b/filesharing/advanced/kcm_sambaconf/common.cpp @@ -26,21 +26,21 @@ * * ******************************************************************************/ -#include -#include -#include +#include +#include +#include #include "common.h" -void setComboToString(QComboBox* combo,const QString & s) +void setComboToString(TQComboBox* combo,const TQString & s) { int i = combo->listBox()->index(combo->listBox()->findItem(s,Qt::ExactMatch)); combo->setCurrentItem(i); } -bool boolFromText(const QString & value, bool testTrue) +bool boolFromText(const TQString & value, bool testTrue) { - QString lower = value.lower(); + TQString lower = value.lower(); if (testTrue) { if (lower=="yes" || @@ -61,7 +61,7 @@ bool boolFromText(const QString & value, bool testTrue) } } -QString textFromBool(bool value) +TQString textFromBool(bool value) { if (value) return "yes"; diff --git a/filesharing/advanced/kcm_sambaconf/common.h b/filesharing/advanced/kcm_sambaconf/common.h index 4da6dccc..52d0a4a4 100644 --- a/filesharing/advanced/kcm_sambaconf/common.h +++ b/filesharing/advanced/kcm_sambaconf/common.h @@ -33,8 +33,8 @@ class QString; class QComboBox; -void setComboToString(QComboBox*,const QString &); -bool boolFromText(const QString & value,bool testTrue=true); -QString textFromBool(bool value); +void setComboToString(TQComboBox*,const TQString &); +bool boolFromText(const TQString & value,bool testTrue=true); +TQString textFromBool(bool value); #endif diff --git a/filesharing/advanced/kcm_sambaconf/dictmanager.cpp b/filesharing/advanced/kcm_sambaconf/dictmanager.cpp index 1b252ed5..c2437f04 100644 --- a/filesharing/advanced/kcm_sambaconf/dictmanager.cpp +++ b/filesharing/advanced/kcm_sambaconf/dictmanager.cpp @@ -27,12 +27,12 @@ ******************************************************************************/ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -56,73 +56,73 @@ DictManager::DictManager(SambaShare* share): DictManager::~DictManager() { } -void DictManager::handleUnsupportedWidget(const QString & s, QWidget* w) { +void DictManager::handleUnsupportedWidget(const TQString & s, TQWidget* w) { w->setEnabled(false); - QToolTip::add(w,i18n("The option %1 is not supported by your Samba version").arg(s)); + TQToolTip::add(w,i18n("The option %1 is not supported by your Samba version").arg(s)); } -void DictManager::add(const QString & key, QLineEdit* lineEdit) { +void DictManager::add(const TQString & key, TQLineEdit* lineEdit) { if (_share->optionSupported(key)) { lineEditDict.insert(key,lineEdit); - connect(lineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(changedSlot())); + connect(lineEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changedSlot())); } else handleUnsupportedWidget(key,lineEdit); } -void DictManager::add(const QString & key, QCheckBox* checkBox){ +void DictManager::add(const TQString & key, TQCheckBox* checkBox){ if (_share->optionSupported(key)) { checkBoxDict.insert(key,checkBox); - connect(checkBox, SIGNAL(clicked()), this, SLOT(changedSlot())); + connect(checkBox, TQT_SIGNAL(clicked()), this, TQT_SLOT(changedSlot())); } else handleUnsupportedWidget(key,checkBox); } -void DictManager::add(const QString & key, KURLRequester* urlRq){ +void DictManager::add(const TQString & key, KURLRequester* urlRq){ if (_share->optionSupported(key)) { urlRequesterDict.insert(key,urlRq); - connect(urlRq, SIGNAL(textChanged(const QString &)), this, SLOT(changedSlot())); + connect(urlRq, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changedSlot())); } else handleUnsupportedWidget(key,urlRq); } -void DictManager::add(const QString & key, QSpinBox* spinBox){ +void DictManager::add(const TQString & key, TQSpinBox* spinBox){ if (_share->optionSupported(key)) { spinBoxDict.insert(key,spinBox); - connect(spinBox, SIGNAL(valueChanged(int)), this, SLOT(changedSlot())); + connect(spinBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changedSlot())); } else handleUnsupportedWidget(key,spinBox); } -void DictManager::add(const QString & key, QComboBox* comboBox, QStringList* values){ +void DictManager::add(const TQString & key, TQComboBox* comboBox, TQStringList* values){ if (_share->optionSupported(key)) { comboBoxDict.insert(key,comboBox); comboBoxValuesDict.insert(key,values); - connect(comboBox, SIGNAL(activated(int)), this, SLOT(changedSlot())); + connect(comboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changedSlot())); } else handleUnsupportedWidget(key,comboBox); } void DictManager::load(SambaShare* share, bool globalValue, bool defaultValue){ - QDictIterator checkBoxIt( checkBoxDict ); + TQDictIterator checkBoxIt( checkBoxDict ); for( ; checkBoxIt.current(); ++checkBoxIt ) { checkBoxIt.current()->setChecked(share->getBoolValue(checkBoxIt.currentKey(),globalValue,defaultValue)); } - QDictIterator lineEditIt( lineEditDict ); + TQDictIterator lineEditIt( lineEditDict ); for( ; lineEditIt.current(); ++lineEditIt ) { lineEditIt.current()->setText(share->getValue(lineEditIt.currentKey(),globalValue,defaultValue)); } - QDictIterator urlRequesterIt( urlRequesterDict ); + TQDictIterator urlRequesterIt( urlRequesterDict ); for( ; urlRequesterIt.current(); ++urlRequesterIt ) { urlRequesterIt.current()->setURL(share->getValue(urlRequesterIt.currentKey(),globalValue,defaultValue)); } - QDictIterator spinBoxIt( spinBoxDict ); + TQDictIterator spinBoxIt( spinBoxDict ); for( ; spinBoxIt.current(); ++spinBoxIt ) { spinBoxIt.current()->setValue(share->getValue(spinBoxIt.currentKey(),globalValue,defaultValue).toInt()); @@ -133,11 +133,11 @@ void DictManager::load(SambaShare* share, bool globalValue, bool defaultValue){ } void DictManager::loadComboBoxes(SambaShare* share, bool globalValue, bool defaultValue) { - QDictIterator comboBoxIt( comboBoxDict ); + TQDictIterator comboBoxIt( comboBoxDict ); for( ; comboBoxIt.current(); ++comboBoxIt ) { - QStringList *v = comboBoxValuesDict[comboBoxIt.currentKey()]; - QString value = share->getValue(comboBoxIt.currentKey(),globalValue,defaultValue); + TQStringList *v = comboBoxValuesDict[comboBoxIt.currentKey()]; + TQString value = share->getValue(comboBoxIt.currentKey(),globalValue,defaultValue); if (value.isNull()) continue; @@ -147,9 +147,9 @@ void DictManager::loadComboBoxes(SambaShare* share, bool globalValue, bool defau int comboIndex = 0; - QStringList::iterator it; + TQStringList::iterator it; for ( it = v->begin(); it != v->end(); ++it ) { - QString lower = (*it).lower(); + TQString lower = (*it).lower(); if ( lower == "yes" && boolFromText(value)) break; @@ -170,34 +170,34 @@ void DictManager::loadComboBoxes(SambaShare* share, bool globalValue, bool defau void DictManager::save(SambaShare* share, bool globalValue, bool defaultValue){ - QDictIterator checkBoxIt( checkBoxDict ); + TQDictIterator checkBoxIt( checkBoxDict ); for( ; checkBoxIt.current(); ++checkBoxIt ) { share->setValue(checkBoxIt.currentKey(),checkBoxIt.current()->isChecked(), globalValue, defaultValue ); } - QDictIterator lineEditIt( lineEditDict ); + TQDictIterator lineEditIt( lineEditDict ); for( ; lineEditIt.current(); ++lineEditIt ) { share->setValue(lineEditIt.currentKey(),lineEditIt.current()->text(), globalValue, defaultValue ); } - QDictIterator urlRequesterIt( urlRequesterDict ); + TQDictIterator urlRequesterIt( urlRequesterDict ); for( ; urlRequesterIt.current(); ++urlRequesterIt ) { share->setValue(urlRequesterIt.currentKey(),urlRequesterIt.current()->url(), globalValue, defaultValue ); } - QDictIterator spinBoxIt( spinBoxDict ); + TQDictIterator spinBoxIt( spinBoxDict ); for( ; spinBoxIt.current(); ++spinBoxIt ) { share->setValue(spinBoxIt.currentKey(),spinBoxIt.current()->value(), globalValue, defaultValue ); } - QDictIterator comboBoxIt( comboBoxDict ); + TQDictIterator comboBoxIt( comboBoxDict ); for( ; comboBoxIt.current(); ++comboBoxIt ) { - QStringList* values = comboBoxValuesDict[comboBoxIt.currentKey()]; + TQStringList* values = comboBoxValuesDict[comboBoxIt.currentKey()]; int i = comboBoxIt.current()->currentItem(); share->setValue(comboBoxIt.currentKey(),(*values)[i], globalValue, defaultValue ); diff --git a/filesharing/advanced/kcm_sambaconf/dictmanager.h b/filesharing/advanced/kcm_sambaconf/dictmanager.h index 3f053330..90c9be22 100644 --- a/filesharing/advanced/kcm_sambaconf/dictmanager.h +++ b/filesharing/advanced/kcm_sambaconf/dictmanager.h @@ -48,26 +48,26 @@ Q_OBJECT DictManager(SambaShare *share); virtual ~DictManager(); - void add(const QString &, QLineEdit*); - void add(const QString &, QCheckBox*); - void add(const QString &, KURLRequester*); - void add(const QString &, QSpinBox*); - void add(const QString &, QComboBox*, QStringList*); + void add(const TQString &, TQLineEdit*); + void add(const TQString &, TQCheckBox*); + void add(const TQString &, KURLRequester*); + void add(const TQString &, TQSpinBox*); + void add(const TQString &, TQComboBox*, TQStringList*); void load(SambaShare* share, bool globalValue=true, bool defaultValue=true); void save(SambaShare* share, bool globalValue=true, bool defaultValue=true); protected : - QDict lineEditDict; - QDict checkBoxDict; - QDict urlRequesterDict; - QDict spinBoxDict; - QDict comboBoxDict; - QDict comboBoxValuesDict; + TQDict lineEditDict; + TQDict checkBoxDict; + TQDict urlRequesterDict; + TQDict spinBoxDict; + TQDict comboBoxDict; + TQDict comboBoxValuesDict; SambaShare* _share; - void handleUnsupportedWidget(const QString &, QWidget*); + void handleUnsupportedWidget(const TQString &, TQWidget*); void loadComboBoxes(SambaShare*, bool, bool); protected slots: diff --git a/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.cpp b/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.cpp index faa94479..53b7c812 100644 --- a/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.cpp +++ b/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.cpp @@ -30,12 +30,12 @@ #include -#include -#include +#include +#include #include "filemodedlgimpl.h" -FileModeDlgImpl::FileModeDlgImpl(QWidget* parent, QLineEdit* edit) +FileModeDlgImpl::FileModeDlgImpl(TQWidget* parent, TQLineEdit* edit) : FileModeDlg(parent) { assert(edit); @@ -76,27 +76,27 @@ void FileModeDlgImpl::init() void FileModeDlgImpl::accept() { - QString s = ""; + TQString s = ""; - s += QString::number( + s += TQString::number( (stickyBitChk->isChecked() ? 1 : 0) + (setGIDChk->isChecked() ? 2 : 0) + (setUIDChk->isChecked() ? 4 : 0) ); - s += QString::number( + s += TQString::number( (ownerExecChk->isChecked() ? 1 : 0) + (ownerWriteChk->isChecked() ? 2 : 0) + (ownerReadChk->isChecked() ? 4 : 0) ); - s += QString::number( + s += TQString::number( (groupExecChk->isChecked() ? 1 : 0) + (groupWriteChk->isChecked() ? 2 : 0) + (groupReadChk->isChecked() ? 4 : 0) ); - s += QString::number( + s += TQString::number( (othersExecChk->isChecked() ? 1 : 0) + (othersWriteChk->isChecked() ? 2 : 0) + (othersReadChk->isChecked() ? 4 : 0) @@ -104,7 +104,7 @@ void FileModeDlgImpl::accept() // it's an octal number so start with a 0 // but remove all the other trailing 0's - s = QString::number( s.toInt()); + s = TQString::number( s.toInt()); s = "0"+s; _edit->setText(s); diff --git a/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.h b/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.h index 3ad39ea6..60652330 100644 --- a/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.h +++ b/filesharing/advanced/kcm_sambaconf/filemodedlgimpl.h @@ -39,8 +39,8 @@ class QLineEdit; /** * Small dialog to change the UNIX access rights - * It is called with a QLineEdit as parameter. - * The class then takes the text from the QLineEdit and + * It is called with a TQLineEdit as parameter. + * The class then takes the text from the TQLineEdit and * interprets it as an oktal UNIX access right string * e.g. 0744 * After the user has changed the access rights with the dialog @@ -52,10 +52,10 @@ class FileModeDlgImpl : public FileModeDlg { Q_OBJECT public: - FileModeDlgImpl(QWidget* parent, QLineEdit* edit); + FileModeDlgImpl(TQWidget* parent, TQLineEdit* edit); ~FileModeDlgImpl(); protected: - QLineEdit* _edit; + TQLineEdit* _edit; void init(); protected slots: virtual void accept(); diff --git a/filesharing/advanced/kcm_sambaconf/groupselectdlg.ui.h b/filesharing/advanced/kcm_sambaconf/groupselectdlg.ui.h index 090e270f..550c6d33 100644 --- a/filesharing/advanced/kcm_sambaconf/groupselectdlg.ui.h +++ b/filesharing/advanced/kcm_sambaconf/groupselectdlg.ui.h @@ -8,20 +8,20 @@ *****************************************************************************/ -void GroupSelectDlg::init(const QStringList & specifiedGroups) +void GroupSelectDlg::init(const TQStringList & specifiedGroups) { - QStringList unixGroups = getUnixGroups(); + TQStringList unixGroups = getUnixGroups(); - for (QStringList::Iterator it = unixGroups.begin(); it != unixGroups.end(); ++it) + for (TQStringList::Iterator it = unixGroups.begin(); it != unixGroups.end(); ++it) { if ( ! specifiedGroups.contains(*it)) - new QListViewItem(groupListView, *it, QString::number(getGroupGID(*it))); + new TQListViewItem(groupListView, *it, TQString::number(getGroupGID(*it))); } } void GroupSelectDlg::accept() { - QListViewItemIterator it( groupListView); + TQListViewItemIterator it( groupListView); for ( ; it.current(); ++it ) { if ( it.current()->isSelected() ) @@ -39,13 +39,13 @@ void GroupSelectDlg::accept() if (bothRadio->isChecked()) groupKind = "@"; - QDialog::accept(); + TQDialog::accept(); } -QStringList GroupSelectDlg::getSelectedGroups() +TQStringList GroupSelectDlg::getSelectedGroups() { return selectedGroups; } @@ -57,7 +57,7 @@ int GroupSelectDlg::getAccess() } -QString GroupSelectDlg::getGroupKind() +TQString GroupSelectDlg::getGroupKind() { return groupKind; } diff --git a/filesharing/advanced/kcm_sambaconf/hiddenfileview.cpp b/filesharing/advanced/kcm_sambaconf/hiddenfileview.cpp index 2b35b4af..b4ced9f9 100644 --- a/filesharing/advanced/kcm_sambaconf/hiddenfileview.cpp +++ b/filesharing/advanced/kcm_sambaconf/hiddenfileview.cpp @@ -28,12 +28,12 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include @@ -62,7 +62,7 @@ #define HIDDENTABINDEX 5 -HiddenListViewItem::HiddenListViewItem( QListView *parent, KFileItem *fi, bool hidden=false, bool veto=false, bool vetoOplock=false ) +HiddenListViewItem::HiddenListViewItem( TQListView *parent, KFileItem *fi, bool hidden=false, bool veto=false, bool vetoOplock=false ) : QMultiCheckListItem( parent ) { setPixmap( COL_NAME, fi->pixmap(KIcon::SizeSmall)); @@ -91,15 +91,15 @@ KFileItem* HiddenListViewItem::getFileItem() } -void HiddenListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) +void HiddenListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) { - QColorGroup _cg = cg; + TQColorGroup _cg = cg; if (isOn(COL_VETO)) - _cg.setColor(QColorGroup::Base,lightGray); + _cg.setColor(TQColorGroup::Base,lightGray); if (isOn(COL_HIDDEN)) - _cg.setColor(QColorGroup::Text,gray); + _cg.setColor(TQColorGroup::Text,gray); QMultiCheckListItem::paintCell(p, _cg, column, width, alignment); } @@ -121,45 +121,45 @@ HiddenFileView::HiddenFileView(ShareDlgImpl* shareDlg, SambaShare* share) _dlg->hiddenChk->setTristate(true); _dlg->vetoChk->setTristate(true); - connect( _dlg->hiddenChk, SIGNAL(toggled(bool)), this, SLOT( hiddenChkClicked(bool) )); - connect( _dlg->vetoChk, SIGNAL(toggled(bool)), this, SLOT( vetoChkClicked(bool) )); - connect( _dlg->vetoOplockChk, SIGNAL(toggled(bool)), this, SLOT( vetoOplockChkClicked(bool) )); + connect( _dlg->hiddenChk, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT( hiddenChkClicked(bool) )); + connect( _dlg->vetoChk, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT( vetoChkClicked(bool) )); + connect( _dlg->vetoOplockChk, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT( vetoOplockChkClicked(bool) )); _dlg->hiddenEdit->setText( _share->getValue("hide files") ); - connect( _dlg->hiddenEdit, SIGNAL(textChanged(const QString &)), this, SLOT(updateView())); + connect( _dlg->hiddenEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(updateView())); _dlg->vetoEdit->setText( _share->getValue("veto files") ); - connect( _dlg->vetoEdit, SIGNAL(textChanged(const QString &)), this, SLOT(updateView())); + connect( _dlg->vetoEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(updateView())); _dlg->vetoOplockEdit->setText( _share->getValue("veto oplock files") ); - connect( _dlg->vetoOplockEdit, SIGNAL(textChanged(const QString &)), this, SLOT(updateView())); + connect( _dlg->vetoOplockEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(updateView())); -// new QLabel(i18n("Hint")+" : ",grid); -// new QLabel(i18n("You have to separate the entries with a '/'. You can use the wildcards '*' and '?'"),grid); -// new QLabel(i18n("Example")+" : ",grid); -// new QLabel(i18n("*.tmp/*SECRET*/.*/file?.*/"),grid); +// new TQLabel(i18n("Hint")+" : ",grid); +// new TQLabel(i18n("You have to separate the entries with a '/'. You can use the wildcards '*' and '?'"),grid); +// new TQLabel(i18n("Example")+" : ",grid); +// new TQLabel(i18n("*.tmp/*SECRET*/.*/file?.*/"),grid); _dir = new KDirLister(true); _dir->setShowingDotFiles(true); - connect( _dir, SIGNAL(newItems(const KFileItemList &)), - this, SLOT(insertNewFiles(const KFileItemList &))); + connect( _dir, TQT_SIGNAL(newItems(const KFileItemList &)), + this, TQT_SLOT(insertNewFiles(const KFileItemList &))); - connect( _dir, SIGNAL(deleteItem(KFileItem*)), - this, SLOT(deleteItem(KFileItem*))); + connect( _dir, TQT_SIGNAL(deleteItem(KFileItem*)), + this, TQT_SLOT(deleteItem(KFileItem*))); - connect( _dir, SIGNAL(refreshItems(const KFileItemList &)), - this, SLOT(refreshItems(const KFileItemList &))); + connect( _dir, TQT_SIGNAL(refreshItems(const KFileItemList &)), + this, TQT_SLOT(refreshItems(const KFileItemList &))); - connect( _hiddenActn, SIGNAL(toggled(bool)), this, SLOT(hiddenChkClicked(bool))); - connect( _vetoActn, SIGNAL(toggled(bool)), this, SLOT(vetoChkClicked(bool))); - connect( _vetoOplockActn, SIGNAL(toggled(bool)), this, SLOT(vetoOplockChkClicked(bool))); + connect( _hiddenActn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(hiddenChkClicked(bool))); + connect( _vetoActn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(vetoChkClicked(bool))); + connect( _vetoOplockActn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(vetoOplockChkClicked(bool))); } void HiddenFileView::initListView() { _dlg->hiddenListView->setMultiSelection(true); - _dlg->hiddenListView->setSelectionMode(QListView::Extended); + _dlg->hiddenListView->setSelectionMode(TQListView::Extended); _dlg->hiddenListView->setAllColumnsShowFocus(true); _hiddenList = createRegExpList(_share->getValue("hide files")); @@ -172,15 +172,15 @@ void HiddenFileView::initListView() _vetoActn->plug(_popup); _vetoOplockActn->plug(_popup); - connect( _dlg->hiddenListView, SIGNAL(selectionChanged()), this, SLOT(selectionChanged())); - connect( _dlg->hiddenListView, SIGNAL(contextMenu(KListView*,QListViewItem*,const QPoint&)), - this, SLOT(showContextMenu())); + connect( _dlg->hiddenListView, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged())); + connect( _dlg->hiddenListView, TQT_SIGNAL(contextMenu(KListView*,TQListViewItem*,const TQPoint&)), + this, TQT_SLOT(showContextMenu())); - connect( _dlg->hideDotFilesChk, SIGNAL(toggled(bool)), this, SLOT(hideDotFilesChkClicked(bool))); - connect( _dlg->hideUnreadableChk, SIGNAL(toggled(bool)), this, SLOT(hideUnreadableChkClicked(bool))); + connect( _dlg->hideDotFilesChk, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(hideDotFilesChkClicked(bool))); + connect( _dlg->hideUnreadableChk, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(hideUnreadableChkClicked(bool))); - connect( _dlg->hiddenListView, SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint &,int)), - this, SLOT(slotMouseButtonPressed(int,QListViewItem*,const QPoint &,int))); + connect( _dlg->hiddenListView, TQT_SIGNAL(mouseButtonPressed(int,TQListViewItem*,const TQPoint &,int)), + this, TQT_SLOT(slotMouseButtonPressed(int,TQListViewItem*,const TQPoint &,int))); } HiddenFileView::~HiddenFileView() @@ -198,7 +198,7 @@ void HiddenFileView::load() void HiddenFileView::save() { - QString s = _dlg->hiddenEdit->text().stripWhiteSpace(); + TQString s = _dlg->hiddenEdit->text().stripWhiteSpace(); // its important that the string ends with an '/' // otherwise Samba won't recognize the last entry if ( (!s.isEmpty()) && (s.right(1)!="/")) @@ -279,7 +279,7 @@ void HiddenFileView::refreshItems( const KFileItemList& /*items*/ ) void HiddenFileView::showContextMenu() { - _popup->exec(QCursor::pos()); + _popup->exec(TQCursor::pos()); } @@ -360,7 +360,7 @@ void HiddenFileView::selectionChanged() } } -void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLineEdit* edit, int column,QPtrList & reqExpList,bool b) { +void HiddenFileView::checkBoxClicked(TQCheckBox* chkBox,KToggleAction* action,TQLineEdit* edit, int column,TQPtrList & reqExpList,bool b) { // We don't save the old state so // disable the tristate mode chkBox->setTristate(false); @@ -378,7 +378,7 @@ void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLi continue; if (!b) { - QRegExp* rx = getRegExpListMatch(item->text(0),reqExpList); + TQRegExp* rx = getRegExpListMatch(item->text(0),reqExpList); // Perhaps the file was hidden because it started with a dot if (!rx && item->text(0)[0]=='.' && _dlg->hideDotFilesChk->isChecked()) { @@ -387,7 +387,7 @@ void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLi "do you want to uncheck all files starting with a dot?"),i18n("Files Starting With Dot"),i18n("Uncheck Hidden"), i18n("Keep Hidden")); if (result == KMessageBox::No) { - QPtrList lst = getMatchingItems(QRegExp(".*",false,true)); + TQPtrList lst = getMatchingItems(TQRegExp(".*",false,true)); deselect(lst); } else { _dlg->hideDotFilesChk->setChecked(false); @@ -396,7 +396,7 @@ void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLi } else { if (rx) { // perhaps it is matched by a wildcard string - QString p = rx->pattern(); + TQString p = rx->pattern(); if ( p.find("*") > -1 || p.find("?") > -1 ) { @@ -407,7 +407,7 @@ void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLi "do you want to uncheck all files matching '%1'?").arg(rx->pattern()).arg(rx->pattern()).arg(rx->pattern()), i18n("Wildcarded String"),i18n("Uncheck Matches"),i18n("Keep Selected")); - QPtrList lst = getMatchingItems( *rx ); + TQPtrList lst = getMatchingItems( *rx ); if (result == KMessageBox::No) { deselect(lst); @@ -425,7 +425,7 @@ void HiddenFileView::checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLi } } else { - reqExpList.append( new QRegExp(item->text(0)) ); + reqExpList.append( new TQRegExp(item->text(0)) ); updateEdit(edit, reqExpList); } @@ -451,24 +451,24 @@ void HiddenFileView::vetoChkClicked(bool b) } /** - * Sets the text of the QLineEdit edit to the entries of the passed QRegExp-List + * Sets the text of the TQLineEdit edit to the entries of the passed QRegExp-List **/ -void HiddenFileView::updateEdit(QLineEdit* edit, QPtrList & lst) +void HiddenFileView::updateEdit(TQLineEdit* edit, TQPtrList & lst) { - QString s=""; + TQString s=""; - QRegExp* rx; - for(rx = static_cast(lst.first()); rx; - rx = static_cast(lst.next()) ) + TQRegExp* rx; + for(rx = static_cast(lst.first()); rx; + rx = static_cast(lst.next()) ) { - s+= rx->pattern()+QString("/"); + s+= rx->pattern()+TQString("/"); } edit->setText(s); } -void HiddenFileView::setState(QPtrList & lst, int column, bool b) { +void HiddenFileView::setState(TQPtrList & lst, int column, bool b) { HiddenListViewItem* item; for(item = static_cast(lst.first()); item; item = static_cast(lst.next()) ) @@ -478,7 +478,7 @@ void HiddenFileView::setState(QPtrList & lst, int column, bo } -void HiddenFileView::deselect(QPtrList & lst) +void HiddenFileView::deselect(TQPtrList & lst) { HiddenListViewItem* item; for(item = static_cast(lst.first()); item; @@ -489,9 +489,9 @@ void HiddenFileView::deselect(QPtrList & lst) } -QPtrList HiddenFileView::getMatchingItems(const QRegExp & rx) +TQPtrList HiddenFileView::getMatchingItems(const TQRegExp & rx) { - QPtrList lst; + TQPtrList lst; HiddenListViewItem* item; for (item = static_cast(_dlg->hiddenListView->firstChild());item; @@ -523,44 +523,44 @@ void HiddenFileView::updateView() } -QPtrList HiddenFileView::createRegExpList(const QString & s) +TQPtrList HiddenFileView::createRegExpList(const TQString & s) { - QPtrList lst; + TQPtrList lst; bool cs = _share->getBoolValue("case sensitive"); if (!s.isEmpty()) { - QStringList l = QStringList::split("/",s); + TQStringList l = TQStringList::split("/",s); - for ( QStringList::Iterator it = l.begin(); it != l.end(); ++it ) { - lst.append( new QRegExp(*it,cs,true) ); + for ( TQStringList::Iterator it = l.begin(); it != l.end(); ++it ) { + lst.append( new TQRegExp(*it,cs,true) ); } } return lst; } -bool HiddenFileView::matchHidden(const QString & s) +bool HiddenFileView::matchHidden(const TQString & s) { - QPtrList hiddenList(_hiddenList); + TQPtrList hiddenList(_hiddenList); if (_dlg->hideDotFilesChk->isChecked()) - hiddenList.append( new QRegExp(".*",false,true) ); + hiddenList.append( new TQRegExp(".*",false,true) ); return matchRegExpList(s,hiddenList); } -bool HiddenFileView::matchVeto(const QString & s) +bool HiddenFileView::matchVeto(const TQString & s) { return matchRegExpList(s,_vetoList); } -bool HiddenFileView::matchVetoOplock(const QString & s) +bool HiddenFileView::matchVetoOplock(const TQString & s) { return matchRegExpList(s,_vetoOplockList); } -bool HiddenFileView::matchRegExpList(const QString & s, QPtrList & lst) +bool HiddenFileView::matchRegExpList(const TQString & s, TQPtrList & lst) { if (getRegExpListMatch(s,lst)) return true; @@ -569,19 +569,19 @@ bool HiddenFileView::matchRegExpList(const QString & s, QPtrList & lst) } -QRegExp* HiddenFileView::getHiddenMatch(const QString & s) +TQRegExp* HiddenFileView::getHiddenMatch(const TQString & s) { return getRegExpListMatch(s,_hiddenList); } -QRegExp* HiddenFileView::getVetoMatch(const QString & s) +TQRegExp* HiddenFileView::getVetoMatch(const TQString & s) { return getRegExpListMatch(s,_vetoList); } -QRegExp* HiddenFileView::getRegExpListMatch(const QString & s, QPtrList & lst) +TQRegExp* HiddenFileView::getRegExpListMatch(const TQString & s, TQPtrList & lst) { - QRegExp* rx; + TQRegExp* rx; for ( rx = lst.first(); rx; rx = lst.next() ) { @@ -602,7 +602,7 @@ void HiddenFileView::hideUnreadableChkClicked(bool) updateView(); } -void HiddenFileView::slotMouseButtonPressed( int, QListViewItem*, const QPoint&, int c ) { +void HiddenFileView::slotMouseButtonPressed( int, TQListViewItem*, const TQPoint&, int c ) { columnClicked(c); } diff --git a/filesharing/advanced/kcm_sambaconf/hiddenfileview.h b/filesharing/advanced/kcm_sambaconf/hiddenfileview.h index ca3cb1c3..a2ec3468 100644 --- a/filesharing/advanced/kcm_sambaconf/hiddenfileview.h +++ b/filesharing/advanced/kcm_sambaconf/hiddenfileview.h @@ -43,10 +43,10 @@ class HiddenListViewItem : public QMultiCheckListItem { Q_OBJECT public: - HiddenListViewItem( QListView *parent, KFileItem *fi, bool hidden, bool veto, bool vetoOplock ); + HiddenListViewItem( TQListView *parent, KFileItem *fi, bool hidden, bool veto, bool vetoOplock ); ~HiddenListViewItem(); - virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment); + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment); KFileItem* getFileItem(); protected: @@ -89,9 +89,9 @@ protected: ShareDlgImpl* _dlg; KDirLister* _dir; - QPtrList _hiddenList; - QPtrList _vetoList; - QPtrList _vetoOplockList; + TQPtrList _hiddenList; + TQPtrList _vetoList; + TQPtrList _vetoOplockList; KToggleAction* _hiddenActn; KToggleAction* _vetoActn; @@ -101,22 +101,22 @@ protected: void initListView(); - QPtrList createRegExpList(const QString & s); - bool matchHidden(const QString & s); - bool matchVeto(const QString & s); - bool matchVetoOplock(const QString & s); - bool matchRegExpList(const QString & s, QPtrList & lst); + TQPtrList createRegExpList(const TQString & s); + bool matchHidden(const TQString & s); + bool matchVeto(const TQString & s); + bool matchVetoOplock(const TQString & s); + bool matchRegExpList(const TQString & s, TQPtrList & lst); - QRegExp* getHiddenMatch(const QString & s); - QRegExp* getVetoMatch(const QString & s); - QRegExp* getRegExpListMatch(const QString & s, QPtrList & lst); + TQRegExp* getHiddenMatch(const TQString & s); + TQRegExp* getVetoMatch(const TQString & s); + TQRegExp* getRegExpListMatch(const TQString & s, TQPtrList & lst); - QPtrList getMatchingItems(const QRegExp & rx); + TQPtrList getMatchingItems(const TQRegExp & rx); - void setState(QPtrList & lst,int column, bool b); - void deselect(QPtrList & lst); + void setState(TQPtrList & lst,int column, bool b); + void deselect(TQPtrList & lst); - void updateEdit(QLineEdit* edit, QPtrList & lst); + void updateEdit(TQLineEdit* edit, TQPtrList & lst); protected slots: // slots for KDirListener : @@ -128,13 +128,13 @@ protected slots: void hiddenChkClicked(bool b); void vetoChkClicked(bool b); void vetoOplockChkClicked(bool b); - void checkBoxClicked(QCheckBox* chkBox,KToggleAction* action,QLineEdit* edit,int column,QPtrList &reqExpList,bool b); + void checkBoxClicked(TQCheckBox* chkBox,KToggleAction* action,TQLineEdit* edit,int column,TQPtrList &reqExpList,bool b); void columnClicked(int column); void showContextMenu(); void updateView(); void hideDotFilesChkClicked(bool); void hideUnreadableChkClicked(bool); - void slotMouseButtonPressed( int button, QListViewItem * item, const QPoint & pos, int c ); + void slotMouseButtonPressed( int button, TQListViewItem * item, const TQPoint & pos, int c ); }; #endif diff --git a/filesharing/advanced/kcm_sambaconf/joindomaindlg.ui.h b/filesharing/advanced/kcm_sambaconf/joindomaindlg.ui.h index bcc5fe53..8af0c9ab 100644 --- a/filesharing/advanced/kcm_sambaconf/joindomaindlg.ui.h +++ b/filesharing/advanced/kcm_sambaconf/joindomaindlg.ui.h @@ -13,5 +13,5 @@ void JoinDomainDlg::accept() { return; } - QDialog::accept(); + TQDialog::accept(); } diff --git a/filesharing/advanced/kcm_sambaconf/kcmprinterdlg.ui.h b/filesharing/advanced/kcm_sambaconf/kcmprinterdlg.ui.h index 56debcde..51c9c5d4 100644 --- a/filesharing/advanced/kcm_sambaconf/kcmprinterdlg.ui.h +++ b/filesharing/advanced/kcm_sambaconf/kcmprinterdlg.ui.h @@ -33,12 +33,12 @@ void KcmPrinterDlg::init() void KcmPrinterDlg::accept() { - QDialog::accept(); + TQDialog::accept(); } void KcmPrinterDlg::reject() { - QDialog::reject(); + TQDialog::reject(); } void KcmPrinterDlg::printersChkToggled( bool ) diff --git a/filesharing/advanced/kcm_sambaconf/kcmsambaconf.cpp b/filesharing/advanced/kcm_sambaconf/kcmsambaconf.cpp index eb073c0c..78f3c7fb 100644 --- a/filesharing/advanced/kcm_sambaconf/kcmsambaconf.cpp +++ b/filesharing/advanced/kcm_sambaconf/kcmsambaconf.cpp @@ -32,17 +32,17 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -75,8 +75,8 @@ #define COL_NOPASSWORD 3 -ShareListViewItem::ShareListViewItem(QListView * parent, SambaShare* share) - : QListViewItem(parent) +ShareListViewItem::ShareListViewItem(TQListView * parent, SambaShare* share) + : TQListViewItem(parent) { setShare(share); } @@ -120,7 +120,7 @@ void ShareListViewItem::updateShare() setPixmap(3,createPropertyPixmap()); } -QPixmap ShareListViewItem::createPropertyPixmap() +TQPixmap ShareListViewItem::createPropertyPixmap() { // Create a big pixmap wich holds the // icons which are needed @@ -133,11 +133,11 @@ QPixmap ShareListViewItem::createPropertyPixmap() int totalWidth = (w+margin)*numberOfPix; - QPixmap pix(totalWidth,h); + TQPixmap pix(totalWidth,h); pix.fill(); // Fill with white - QPainter p(&pix); + TQPainter p(&pix); int x = 0; @@ -171,10 +171,10 @@ QPixmap ShareListViewItem::createPropertyPixmap() p.end(); - return QPixmap(pix); + return TQPixmap(pix); } -KcmSambaConf::KcmSambaConf(QWidget *parent, const char *name) +KcmSambaConf::KcmSambaConf(TQWidget *parent, const char *name) : KCModule(parent,name) { _dictMngr = 0L; @@ -182,10 +182,10 @@ KcmSambaConf::KcmSambaConf(QWidget *parent, const char *name) m_smbConfConfigWidget = 0L; - QBoxLayout * l = new QHBoxLayout( this ); + TQBoxLayout * l = new TQHBoxLayout( this ); l->setAutoAdd( TRUE ); - QString smbFile = SambaFile::findSambaConf(); + TQString smbFile = SambaFile::findSambaConf(); if (smbFile.isNull()) { createSmbConfigWidget(); return; @@ -202,11 +202,11 @@ KcmSambaConf::~KcmSambaConf() { void KcmSambaConf::createSmbConfigWidget() { m_smbConfConfigWidget = new SmbConfConfigWidget(this); - connect( m_smbConfConfigWidget, SIGNAL(smbConfChoosed(const QString &)), - this, SLOT(slotSpecifySmbConf(const QString &))); + connect( m_smbConfConfigWidget, TQT_SIGNAL(smbConfChoosed(const TQString &)), + this, TQT_SLOT(slotSpecifySmbConf(const TQString &))); } -void KcmSambaConf::slotSpecifySmbConf(const QString & smbConf) { +void KcmSambaConf::slotSpecifySmbConf(const TQString & smbConf) { if (m_smbConfConfigWidget) { m_smbConfConfigWidget->hide(); } @@ -218,7 +218,7 @@ void KcmSambaConf::slotSpecifySmbConf(const QString & smbConf) { if (getuid() != 0) { for (int i=0;i<_interface->mainTab->count();i++) { - QWidget* w = _interface->mainTab->page(i); + TQWidget* w = _interface->mainTab->page(i); w->setEnabled(false); } } @@ -231,61 +231,61 @@ void KcmSambaConf::init() { _interface = new KcmInterface(this); - connect ( _interface->sambaUserPasswordBtn, SIGNAL(clicked()), this, SLOT(sambaUserPasswordBtnClicked())); + connect ( _interface->sambaUserPasswordBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(sambaUserPasswordBtnClicked())); - connect ( _interface->editShareBtn, SIGNAL(clicked()), this, SLOT(editShare())); - connect ( _interface->addShareBtn, SIGNAL(clicked()), this, SLOT(addShare())); - connect ( _interface->removeShareBtn, SIGNAL(clicked()), this, SLOT(removeShare())); + connect ( _interface->editShareBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(editShare())); + connect ( _interface->addShareBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(addShare())); + connect ( _interface->removeShareBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeShare())); - connect ( _interface->editPrinterBtn, SIGNAL(clicked()), this, SLOT(editPrinter())); - connect ( _interface->addPrinterBtn, SIGNAL(clicked()), this, SLOT(addPrinter())); - connect ( _interface->removePrinterBtn, SIGNAL(clicked()), this, SLOT(removePrinter())); + connect ( _interface->editPrinterBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(editPrinter())); + connect ( _interface->addPrinterBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(addPrinter())); + connect ( _interface->removePrinterBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(removePrinter())); - connect ( _interface->editDefaultPrinterBtn, SIGNAL(clicked()), this, SLOT(editPrinterDefaults())); - connect ( _interface->editDefaultShareBtn, SIGNAL(clicked()), this, SLOT(editShareDefaults())); + connect ( _interface->editDefaultPrinterBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(editPrinterDefaults())); + connect ( _interface->editDefaultShareBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(editShareDefaults())); - connect( _interface->domainRadio, SIGNAL(toggled(bool)), - _interface->joinADomainBtn, SLOT( setEnabled(bool) )); + connect( _interface->domainRadio, TQT_SIGNAL(toggled(bool)), + _interface->joinADomainBtn, TQT_SLOT( setEnabled(bool) )); - connect(_interface->nullPasswordsChk,SIGNAL(toggled(bool)), - this, SLOT(nullPasswordsEnabled(bool))); + connect(_interface->nullPasswordsChk,TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(nullPasswordsEnabled(bool))); - connect( _interface->addSambaUserBtn, SIGNAL(clicked()), - this, SLOT( addSambaUserBtnClicked() )); + connect( _interface->addSambaUserBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT( addSambaUserBtnClicked() )); - connect( _interface->removeSambaUserBtn, SIGNAL(clicked()), - this, SLOT( removeSambaUserBtnClicked() )); + connect( _interface->removeSambaUserBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT( removeSambaUserBtnClicked() )); _interface->removeSambaUserBtn->setIconSet(SmallIconSet("1rightarrow")); _interface->addSambaUserBtn->setIconSet(SmallIconSet("1leftarrow")); - connect( _interface->sambaUsersListView, SIGNAL(mouseButtonPressed(int,QListViewItem*,const QPoint &,int)), - this, SLOT(slotMouseButtonPressed(int,QListViewItem*,const QPoint &,int))); + connect( _interface->sambaUsersListView, TQT_SIGNAL(mouseButtonPressed(int,TQListViewItem*,const TQPoint &,int)), + this, TQT_SLOT(slotMouseButtonPressed(int,TQListViewItem*,const TQPoint &,int))); - connect( _interface->joinADomainBtn, SIGNAL(clicked()), - this, SLOT( joinADomainBtnClicked() )); + connect( _interface->joinADomainBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT( joinADomainBtnClicked() )); - connect( _interface->loadBtn, SIGNAL(clicked()), - this, SLOT( loadBtnClicked() )); + connect( _interface->loadBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT( loadBtnClicked() )); - connect( _interface, SIGNAL(changed()), this, SLOT(configChanged())); + connect( _interface, TQT_SIGNAL(changed()), this, TQT_SLOT(configChanged())); } void KcmSambaConf::initAdvancedTab() { - QVBoxLayout *l = new QVBoxLayout(_interface->advancedFrame); + TQVBoxLayout *l = new TQVBoxLayout(_interface->advancedFrame); l->setAutoAdd(true); l->setMargin(0); _janus = new KJanusWidget(_interface->advancedFrame,0,KJanusWidget::TreeList); _janus->setRootIsDecorated(false); _janus->setShowIconsInTreeList(true); - QWidget *w; - QFrame *f; - QString label; - QPixmap icon; + TQWidget *w; + TQFrame *f; + TQString label; + TQPixmap icon; for (int i=0;i<_interface->advancedTab->count();) { @@ -334,19 +334,19 @@ void KcmSambaConf::initAdvancedTab() if (label == i18n("Commands")) icon = SmallIcon("konsole"); else { - icon = QPixmap(16,16); + icon = TQPixmap(16,16); icon.fill(); } //SmallIcon("empty2"); f = _janus->addPage( label,label,icon ); - l = new QVBoxLayout(f); + l = new TQVBoxLayout(f); l->setAutoAdd(true); l->setMargin(0); _interface->advancedTab->removePage(w); - w->reparent(f,QPoint(1,1),TRUE); + w->reparent(f,TQPoint(1,1),TRUE); } @@ -366,11 +366,11 @@ void KcmSambaConf::editShare() return; ShareDlgImpl* dlg = new ShareDlgImpl(_interface,item->getShare()); - connect(dlg, SIGNAL(changed()), this, SLOT(configChanged())); + connect(dlg, TQT_SIGNAL(changed()), this, TQT_SLOT(configChanged())); dlg->exec(); item->updateShare(); - disconnect(dlg, SIGNAL(changed()), this, SLOT(configChanged())); + disconnect(dlg, TQT_SIGNAL(changed()), this, TQT_SLOT(configChanged())); delete dlg; @@ -385,7 +385,7 @@ void KcmSambaConf::addShare() ShareDlgImpl* dlg = new ShareDlgImpl(_interface,share); dlg->exec(); - if (dlg->result() == QDialog::Rejected ) + if (dlg->result() == TQDialog::Rejected ) removeShare(); else { item->updateShare(); @@ -435,7 +435,7 @@ void KcmSambaConf::addPrinter() PrinterDlgImpl* dlg = new PrinterDlgImpl(_interface,share); dlg->exec(); - if (dlg->result() == QDialog::Rejected ) + if (dlg->result() == TQDialog::Rejected ) removePrinter(); else { @@ -493,7 +493,7 @@ void KcmSambaConf::loadBtnClicked() { load( _interface->configUrlRq->url()); } -void KcmSambaConf::load(const QString & smbFile) +void KcmSambaConf::load(const TQString & smbFile) { kdDebug(5009) << "loading " << smbFile << endl; _smbconf = smbFile; @@ -504,14 +504,14 @@ void KcmSambaConf::load(const QString & smbFile) _sambaFile = new SambaFile(_smbconf,false); - connect( _sambaFile, SIGNAL(completed()), this, SLOT(fillFields())); - connect( _sambaFile, SIGNAL(canceled(const QString &)), this, SLOT(loadCanceled(const QString &))); + connect( _sambaFile, TQT_SIGNAL(completed()), this, TQT_SLOT(fillFields())); + connect( _sambaFile, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(loadCanceled(const TQString &))); _sambaFile->load(); } -void KcmSambaConf::loadCanceled(const QString & msg) { +void KcmSambaConf::loadCanceled(const TQString & msg) { KMessageBox::sorry(0L,msg,i18n("Error while opening file")); } @@ -579,7 +579,7 @@ void KcmSambaConf::fillFields() loadUserTab(); - connect(_dictMngr, SIGNAL(changed()), this, SLOT(configChanged())); + connect(_dictMngr, TQT_SIGNAL(changed()), this, TQT_SLOT(configChanged())); } @@ -597,7 +597,7 @@ void KcmSambaConf::loadBaseSettings(SambaShare* share) _interface->guestAccountCombo->insertStringList( getUnixUsers() ); setComboIndexToValue(_interface->guestAccountCombo,"guest account",share); - QString value = share->getValue("map to guest",false,true); + TQString value = share->getValue("map to guest",false,true); _interface->allowGuestLoginsChk->setChecked( value.lower()!="never" ); @@ -605,7 +605,7 @@ void KcmSambaConf::loadBaseSettings(SambaShare* share) _dictMngr->add("bind interfaces only",_interface->bindInterfacesOnlyChk); - QString s = share->getValue("security",false,true).lower(); + TQString s = share->getValue("security",false,true).lower(); int i = 0; if ( s == "share" ) i = 0; else @@ -624,7 +624,7 @@ void KcmSambaConf::loadSecurity(SambaShare*) { _dictMngr->add("map to guest",_interface->mapToGuestCombo, - new QStringList(QStringList() << "Never" << "Bad User" << "Bad Password" )); + new TQStringList(TQStringList() << "Never" << "Bad User" << "Bad Password" )); _dictMngr->add("password server", _interface->passwordServerEdit); @@ -667,18 +667,18 @@ void KcmSambaConf::loadSecurity(SambaShare*) _dictMngr->add("ntlm auth",_interface->ntlmAuthChk); _dictMngr->add("use spnego",_interface->useSpnegoChk); _dictMngr->add("server schannel",_interface->serverSchannelCombo, - new QStringList(QStringList() << "Yes" << "No" << "Auto" )); + new TQStringList(TQStringList() << "Yes" << "No" << "Auto" )); _dictMngr->add("server signing",_interface->serverSigningCombo, - new QStringList(QStringList() << "Auto" << "Mandatory" << "Disabled" )); + new TQStringList(TQStringList() << "Auto" << "Mandatory" << "Disabled" )); _dictMngr->add("client lanman auth",_interface->clientLanmanAuthChk); _dictMngr->add("client plaintext auth",_interface->clientPlaintextAuthChk); _dictMngr->add("client ntlmv2 auth",_interface->clientNTLMv2AuthChk); _dictMngr->add("client use spnego",_interface->clientUseSpnegoChk); _dictMngr->add("client schannel",_interface->clientSchannelCombo, - new QStringList(QStringList() << "Yes" << "No" << "Auto" )); + new TQStringList(TQStringList() << "Yes" << "No" << "Auto" )); _dictMngr->add("client signing",_interface->clientSigningCombo, - new QStringList(QStringList() << "Auto" << "Mandatory" << "Disabled" )); + new TQStringList(TQStringList() << "Auto" << "Mandatory" << "Disabled" )); @@ -813,16 +813,16 @@ void KcmSambaConf::loadProtocol(SambaShare*) _dictMngr->add("smb ports", _interface->smbPortsEdit); _dictMngr->add("announce as", _interface->announceAsCombo, - new QStringList(QStringList() << "NT" << "NT workstation" << "win95" << "WfW")); + new TQStringList(TQStringList() << "NT" << "NT workstation" << "win95" << "WfW")); _dictMngr->add("protocol", _interface->protocolCombo, - new QStringList(QStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus" )); + new TQStringList(TQStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus" )); _dictMngr->add("max protocol", _interface->maxProtocolCombo, - new QStringList(QStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus")); + new TQStringList(TQStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus")); _dictMngr->add("min protocol", _interface->minProtocolCombo, - new QStringList(QStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus")); + new TQStringList(TQStringList() << "NT" << "lanman2" << "lanman1" << "core" << "coreplus")); } @@ -832,7 +832,7 @@ void KcmSambaConf::loadSocket(SambaShare* share) _dictMngr->add("socket address", _interface->socketAddressEdit); - QString s = share->getValue("socket options"); + TQString s = share->getValue("socket options"); s = s.simplifyWhiteSpace(); // The string s has now the form : @@ -862,7 +862,7 @@ void KcmSambaConf::loadSSL(SambaShare*) // SSL _dictMngr->add("ssl version",_interface->sslVersionCombo, - new QStringList(QStringList() << "ssl2" << "ssl3" << "ssl2or3" << "tls1" )); + new TQStringList(TQStringList() << "ssl2" << "ssl3" << "ssl2or3" << "tls1" )); _dictMngr->add("ssl",_interface->sslChk); _dictMngr->add("ssl require server cert",_interface->sslRequireServercertChk); @@ -933,7 +933,7 @@ void KcmSambaConf::loadWinbind(SambaShare* ) _dictMngr->add("winbind cache time", _interface->winbindCacheTimeSpin); _dictMngr->add("acl compatibility",_interface->aclCompatibilityCombo, - new QStringList(QStringList() << "winnt" << "win2k" << "")); + new TQStringList(TQStringList() << "winnt" << "win2k" << "")); _dictMngr->add("winbind enum users",_interface->winbindEnumUsersChk); _dictMngr->add("winbind enum groups",_interface->winbindEnumGroupsChk); @@ -975,10 +975,10 @@ void KcmSambaConf::loadLDAP(SambaShare*) _dictMngr->add("ldap delete dn",_interface->ldapDeleteDnChk); _dictMngr->add("ldap ssl", _interface->ldapSslCombo, - new QStringList(QStringList() << "No" << "Start_tls" << "Yes")); + new TQStringList(TQStringList() << "No" << "Start_tls" << "Yes")); _dictMngr->add("ldap sync", _interface->ldapSyncCombo, - new QStringList(QStringList() << "Yes" << "No" << "Only")); + new TQStringList(TQStringList() << "Yes" << "No" << "Only")); } @@ -992,7 +992,7 @@ void KcmSambaConf::loadBrowsing(SambaShare*) _dictMngr->add("preload", _interface->preloadEdit); _dictMngr->add("lm announce", _interface->lmAnnounceCombo, - new QStringList(QStringList() << "Yes" << "No" << "Auto")); + new TQStringList(TQStringList() << "Yes" << "No" << "Auto")); } void KcmSambaConf::loadCommands(SambaShare*) @@ -1008,7 +1008,7 @@ void KcmSambaConf::loadCommands(SambaShare*) } -void KcmSambaConf::setComboIndexToValue(QComboBox* box, const QString & value, SambaShare* share) +void KcmSambaConf::setComboIndexToValue(TQComboBox* box, const TQString & value, SambaShare* share) { int i = box->listBox()->index(box->listBox()->findItem(share->getValue(value,false,true),Qt::ExactMatch)); box->setCurrentItem(i); @@ -1048,7 +1048,7 @@ void KcmSambaConf::loadUserTab() SambaShare* share = _sambaFile->getShare("global"); - QStringList added; + TQStringList added; SmbPasswdFile passwd( KURL(share->getValue("smb passwd file",true,true)) ); SambaUserList sambaList = passwd.getSambaUserList(); @@ -1058,7 +1058,7 @@ void KcmSambaConf::loadUserTab() { QMultiCheckListItem* item = new QMultiCheckListItem(_interface->sambaUsersListView); item->setText(0,user->name); - item->setText(1,QString::number(user->uid)); + item->setText(1,TQString::number(user->uid)); item->setOn(COL_DISABLED,user->isDisabled); item->setOn(COL_NOPASSWORD,user->hasNoPassword); @@ -1076,15 +1076,15 @@ void KcmSambaConf::loadUserTab() UnixUser *unixUser; for ( unixUser = unixList.first(); unixUser; unixUser = unixList.next() ) { - QStringList::Iterator it; + TQStringList::Iterator it; it=added.find(unixUser->name); if (it == added.end()) - new KListViewItem(_interface->unixUsersListView, unixUser->name, QString::number(unixUser->uid)); + new KListViewItem(_interface->unixUsersListView, unixUser->name, TQString::number(unixUser->uid)); } - _interface->unixUsersListView->setSelectionMode(QListView::Extended); - _interface->sambaUsersListView->setSelectionMode(QListView::Extended); + _interface->unixUsersListView->setSelectionMode(TQListView::Extended); + _interface->sambaUsersListView->setSelectionMode(TQListView::Extended); } @@ -1095,7 +1095,7 @@ void KcmSambaConf::joinADomainBtnClicked() { int result = dlg->exec(); - if (result == QDialog::Accepted) { + if (result == TQDialog::Accepted) { SmbPasswdFile passwd; if (!passwd.joinADomain(dlg->domainEdit->text(), dlg->domainControllerEdit->text(), @@ -1109,7 +1109,7 @@ void KcmSambaConf::joinADomainBtnClicked() { } -void KcmSambaConf::slotMouseButtonPressed(int,QListViewItem* item,const QPoint &,int col) { +void KcmSambaConf::slotMouseButtonPressed(int,TQListViewItem* item,const TQPoint &,int col) { if (col < 2) return; @@ -1146,7 +1146,7 @@ void KcmSambaConf::slotMouseButtonPressed(int,QListViewItem* item,const QPoint & void KcmSambaConf::nullPasswordsEnabled(bool b) { - QListViewItemIterator it( _interface->sambaUsersListView ); + TQListViewItemIterator it( _interface->sambaUsersListView ); for ( ; it.current(); ++it ) { QMultiCheckListItem* sambaItem = static_cast(it.current()); sambaItem->setDisabled(COL_NOPASSWORD,!b); @@ -1160,17 +1160,17 @@ void KcmSambaConf::saveUserTab() void KcmSambaConf::addSambaUserBtnClicked() { - QPtrList list = _interface->unixUsersListView->selectedItems(); + TQPtrList list = _interface->unixUsersListView->selectedItems(); SambaShare* share = _sambaFile->getShare("global"); SmbPasswdFile passwd( KURL(share->getValue("smb passwd file",true,true)) ); - QListViewItem* item; + TQListViewItem* item; for ( item = list.first(); item; item = list.first() ) { SambaUser user( item->text(0), item->text(1).toInt() ); - QCString password; + TQCString password; int passResult = KPasswordDialog::getNewPassword(password, i18n("Please enter a password for the user %1").arg(user.name)); if (passResult != KPasswordDialog::Accepted) { @@ -1186,7 +1186,7 @@ void KcmSambaConf::addSambaUserBtnClicked() QMultiCheckListItem* sambaItem = new QMultiCheckListItem(_interface->sambaUsersListView); sambaItem->setText(0,user.name); - sambaItem->setText(1,QString::number(user.uid)); + sambaItem->setText(1,TQString::number(user.uid)); sambaItem->setOn(COL_DISABLED,false); sambaItem->setOn(COL_NOPASSWORD,false); if ( ! _interface->nullPasswordsChk->isOn()) @@ -1200,12 +1200,12 @@ void KcmSambaConf::addSambaUserBtnClicked() void KcmSambaConf::removeSambaUserBtnClicked() { - QPtrList list = _interface->sambaUsersListView->selectedItems(); + TQPtrList list = _interface->sambaUsersListView->selectedItems(); SambaShare* share = _sambaFile->getShare("global"); SmbPasswdFile passwd( KURL(share->getValue("smb passwd file",true,true)) ); - QListViewItem* item; + TQListViewItem* item; for ( item = list.first(); item; item = list.first() ) { SambaUser user( item->text(0), item->text(1).toInt() ); @@ -1223,17 +1223,17 @@ void KcmSambaConf::removeSambaUserBtnClicked() void KcmSambaConf::sambaUserPasswordBtnClicked() { - QPtrList list = _interface->sambaUsersListView->selectedItems(); + TQPtrList list = _interface->sambaUsersListView->selectedItems(); SambaShare* share = _sambaFile->getShare("global"); SmbPasswdFile passwd( KURL(share->getValue("smb passwd file",true,true)) ); - QListViewItem* item; + TQListViewItem* item; for ( item = list.first(); item; item = list.next() ) { SambaUser user( item->text(0), item->text(1).toInt() ); - QCString password; + TQCString password; int passResult = KPasswordDialog::getNewPassword(password, i18n("Please enter a password for the user %1").arg(user.name)); if (passResult != KPasswordDialog::Accepted) @@ -1267,13 +1267,13 @@ void KcmSambaConf::save() { // Base settings _smbconf = _interface->configUrlRq->url(); - KSimpleConfig config(QString::fromLatin1(FILESHARECONF),false); + KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),false); config.writeEntry("SMBCONF",_smbconf); config.sync(); // Security - QString s; + TQString s; switch (_interface->securityLevelBtnGrp->id(_interface->securityLevelBtnGrp->selected())) { case 0 : s = "share";break; @@ -1294,7 +1294,7 @@ void KcmSambaConf::save() { if (_interface->otherWinsRadio->isChecked()) share->setValue("wins server",_interface->winsServerEdit->text(), false,true); else - share->setValue("wins server",QString(""), false,true); + share->setValue("wins server",TQString(""), false,true); // socket options @@ -1308,14 +1308,14 @@ void KcmSambaConf::save() { } -bool KcmSambaConf::getSocketBoolValue( const QString & str, const QString & name ) +bool KcmSambaConf::getSocketBoolValue( const TQString & str, const TQString & name ) { - QString s = str; + TQString s = str; int i = s.find(name ,0,false); if (i > -1) { - s = s.remove(0,i+1+QString(name).length()); + s = s.remove(0,i+1+TQString(name).length()); if ( s.startsWith("=") ) { @@ -1332,9 +1332,9 @@ bool KcmSambaConf::getSocketBoolValue( const QString & str, const QString & name return false; } -int KcmSambaConf::getSocketIntValue( const QString & str, const QString & name ) +int KcmSambaConf::getSocketIntValue( const TQString & str, const TQString & name ) { - QString s = str; + TQString s = str; int i = s.find(name ,0,false); if (i > -1) @@ -1361,9 +1361,9 @@ int KcmSambaConf::getSocketIntValue( const QString & str, const QString & name ) return 0; } -QString KcmSambaConf::socketOptions() +TQString KcmSambaConf::socketOptions() { - QString s = ""; + TQString s = ""; if ( _interface->SO_KEEPALIVEChk->isChecked() ) s+="SO_KEEPALIVE "; @@ -1385,25 +1385,25 @@ QString KcmSambaConf::socketOptions() if ( _interface->SO_SNDBUFChk->isChecked() ) { s+= "SO_SNDBUF="; - s+= QString::number( _interface->SO_SNDBUFSpin->value() ); + s+= TQString::number( _interface->SO_SNDBUFSpin->value() ); s+= " "; } if ( _interface->SO_RCVBUFChk->isChecked() ) { s+= "SO_RCVBUF="; - s+= QString::number( _interface->SO_RCVBUFSpin->value() ); + s+= TQString::number( _interface->SO_RCVBUFSpin->value() ); s+= " "; } if ( _interface->SO_SNDLOWATChk->isChecked() ) { s+= "SO_SNDLOWAT="; - s+= QString::number( _interface->SO_SNDLOWATSpin->value() ); + s+= TQString::number( _interface->SO_SNDLOWATSpin->value() ); s+= " "; } if ( _interface->SO_RCVLOWATChk->isChecked() ) { s+= "SO_RCVLOWAT="; - s+= QString::number( _interface->SO_RCVLOWATSpin->value() ); + s+= TQString::number( _interface->SO_RCVLOWATSpin->value() ); s+= " "; } @@ -1423,7 +1423,7 @@ void KcmSambaConf::configChanged() { emit changed(true); } -QString KcmSambaConf::quickHelp() const +TQString KcmSambaConf::quickHelp() const { return i18n("

Samba Configuration

here you can configure your SAMBA server."); } @@ -1432,7 +1432,7 @@ QString KcmSambaConf::quickHelp() const extern "C" { - KDE_EXPORT KCModule *create_KcmSambaConf(QWidget *parent, const char *name) + KDE_EXPORT KCModule *create_KcmSambaConf(TQWidget *parent, const char *name) { KGlobal::locale()->insertCatalogue("kfileshare"); return new KcmSambaConf(parent, name); diff --git a/filesharing/advanced/kcm_sambaconf/kcmsambaconf.h b/filesharing/advanced/kcm_sambaconf/kcmsambaconf.h index c17ec3b0..8d281555 100644 --- a/filesharing/advanced/kcm_sambaconf/kcmsambaconf.h +++ b/filesharing/advanced/kcm_sambaconf/kcmsambaconf.h @@ -34,20 +34,20 @@ #include #include #include -#include -#include +#include +#include class SambaShare; class SambaFile; class QPixmap; /** -* A QListViewItem which holds a SambaShare object +* A TQListViewItem which holds a SambaShare object **/ class ShareListViewItem : public QListViewItem { public: - ShareListViewItem(QListView * parent, SambaShare* share); + ShareListViewItem(TQListView * parent, SambaShare* share); SambaShare* getShare() const; void setShare(SambaShare* share); @@ -55,7 +55,7 @@ public: protected: SambaShare* _share; - QPixmap createPropertyPixmap(); + TQPixmap createPropertyPixmap(); }; @@ -70,14 +70,14 @@ class KcmSambaConf: public KCModule { Q_OBJECT public: - KcmSambaConf(QWidget *parent = 0L, const char *name = 0L); + KcmSambaConf(TQWidget *parent = 0L, const char *name = 0L); virtual ~KcmSambaConf(); - void load(const QString &); + void load(const TQString &); void save(); void defaults(); int buttons(); - QString quickHelp() const; + TQString quickHelp() const; public slots: void configChanged(); @@ -98,7 +98,7 @@ class KcmSambaConf: public KCModule /** * The path of the smb.conf file **/ - QString _smbconf; + TQString _smbconf; SambaFile* _sambaFile; DictManager* _dictMngr; @@ -106,10 +106,10 @@ class KcmSambaConf: public KCModule void init(); void loadUserTab(); void saveUserTab(); - bool getSocketBoolValue( const QString & str, const QString & name ); - int getSocketIntValue( const QString & str, const QString & name ); - QString socketOptions(); - void setComboIndexToValue(QComboBox* box, const QString & value, SambaShare* share); + bool getSocketBoolValue( const TQString & str, const TQString & name ); + int getSocketIntValue( const TQString & str, const TQString & name ); + TQString socketOptions(); + void setComboIndexToValue(TQComboBox* box, const TQString & value, SambaShare* share); void loadBaseSettings(SambaShare*s=0L); void loadSecurity(SambaShare* ); @@ -142,13 +142,13 @@ class KcmSambaConf: public KCModule void addSambaUserBtnClicked(); void removeSambaUserBtnClicked(); void sambaUserPasswordBtnClicked(); - void slotMouseButtonPressed(int,QListViewItem*,const QPoint &,int); + void slotMouseButtonPressed(int,TQListViewItem*,const TQPoint &,int); void joinADomainBtnClicked(); void nullPasswordsEnabled(bool); void loadBtnClicked(); - void loadCanceled(const QString & msg); + void loadCanceled(const TQString & msg); void fillFields(); - void slotSpecifySmbConf(const QString &); + void slotSpecifySmbConf(const TQString &); private: KcmInterface* _interface; diff --git a/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp b/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp index af763729..83ea5180 100644 --- a/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp +++ b/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.cpp @@ -23,8 +23,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * * ******************************************************************************/ -#include -#include +#include +#include #include #include @@ -34,7 +34,7 @@ #include "sambashare.h" #include "linuxpermissionchecker.h" -LinuxPermissionChecker::LinuxPermissionChecker(SambaShare* share,QWidget* parent = 0L) +LinuxPermissionChecker::LinuxPermissionChecker(SambaShare* share,TQWidget* parent = 0L) { m_sambaShare = share; m_parent = parent; @@ -44,7 +44,7 @@ LinuxPermissionChecker::LinuxPermissionChecker(SambaShare* share,QWidget* parent return; } - m_fi = QFileInfo(share->getValue("path")); + m_fi = TQFileInfo(share->getValue("path")); if ( ! m_fi.exists()) { kdDebug(5009) << "LinuxPermissionChecker: path does not exists !" << endl; @@ -80,17 +80,17 @@ bool LinuxPermissionChecker::checkAllUserPermissions() { if ( ! m_fi.exists()) return true; - QStringList readList = QStringList::split(QRegExp("[,\\s]+"),m_sambaShare->getValue("read list")); + TQStringList readList = TQStringList::split(TQRegExp("[,\\s]+"),m_sambaShare->getValue("read list")); - for ( QStringList::Iterator it = readList.begin(); it != readList.end(); ++it ) + for ( TQStringList::Iterator it = readList.begin(); it != readList.end(); ++it ) { if (!checkUserReadPermissions(*it)) return false; } - QStringList writeList = QStringList::split(QRegExp("[,\\s]+"),m_sambaShare->getValue("write list")); + TQStringList writeList = TQStringList::split(TQRegExp("[,\\s]+"),m_sambaShare->getValue("write list")); - for ( QStringList::Iterator it = writeList.begin(); it != writeList.end(); ++it ) + for ( TQStringList::Iterator it = writeList.begin(); it != writeList.end(); ++it ) { if (!checkUserWritePermissions(*it)) return false; @@ -107,7 +107,7 @@ bool LinuxPermissionChecker::checkPublicPermissions() { if (!isPublic) return true; - QString guestAccount = m_sambaShare->getValue("guest account"); + TQString guestAccount = m_sambaShare->getValue("guest account"); if ( ! checkUserReadPermissions(guestAccount,false)) { @@ -139,7 +139,7 @@ bool LinuxPermissionChecker::checkPublicPermissions() { return true; } -bool LinuxPermissionChecker::checkUserPermissions(const QString & user) { +bool LinuxPermissionChecker::checkUserPermissions(const TQString & user) { if ( ! checkUserReadPermissions(user)) return false; @@ -149,14 +149,14 @@ bool LinuxPermissionChecker::checkUserPermissions(const QString & user) { return true; } -bool LinuxPermissionChecker::checkUserWritePermissions(const QString & user, bool showMessageBox) { +bool LinuxPermissionChecker::checkUserWritePermissions(const TQString & user, bool showMessageBox) { // If no write permissions are given, we don't need to check them. if (m_sambaShare->getBoolValue("read only")) return true; - if (! ((m_fi.permission(QFileInfo::WriteOther)) || - (m_fi.permission(QFileInfo::WriteUser) && user == m_fi.owner()) || - (m_fi.permission(QFileInfo::WriteGroup) && isUserInGroup(user, m_fi.group()))) + if (! ((m_fi.permission(TQFileInfo::WriteOther)) || + (m_fi.permission(TQFileInfo::WriteUser) && user == m_fi.owner()) || + (m_fi.permission(TQFileInfo::WriteGroup) && isUserInGroup(user, m_fi.group()))) ) { if (!showMessageBox) @@ -176,10 +176,10 @@ bool LinuxPermissionChecker::checkUserWritePermissions(const QString & user, boo return true; } -bool LinuxPermissionChecker::checkUserReadPermissions(const QString & user, bool showMessageBox) { - if (! ((m_fi.permission(QFileInfo::ReadOther)) || - (m_fi.permission(QFileInfo::ReadUser) && user == m_fi.owner()) || - (m_fi.permission(QFileInfo::ReadGroup) && isUserInGroup(user, m_fi.group()))) +bool LinuxPermissionChecker::checkUserReadPermissions(const TQString & user, bool showMessageBox) { + if (! ((m_fi.permission(TQFileInfo::ReadOther)) || + (m_fi.permission(TQFileInfo::ReadUser) && user == m_fi.owner()) || + (m_fi.permission(TQFileInfo::ReadGroup) && isUserInGroup(user, m_fi.group()))) ) { if (!showMessageBox) diff --git a/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.h b/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.h index c4c1a6fc..2d2397d8 100644 --- a/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.h +++ b/filesharing/advanced/kcm_sambaconf/linuxpermissionchecker.h @@ -26,7 +26,7 @@ #ifndef LINUXPERMISSIONCHECKER_H #define LINUXPERMISSIONCHECKER_H -#include +#include class SambaShare; class QWidget; @@ -43,7 +43,7 @@ class QWidget; */ class LinuxPermissionChecker{ public: - LinuxPermissionChecker(SambaShare*,QWidget* parent ); + LinuxPermissionChecker(SambaShare*,TQWidget* parent ); ~LinuxPermissionChecker(); /** @@ -79,25 +79,25 @@ protected: * Checks all permissions of the given un?x user * @return @see #check */ - bool checkUserPermissions(const QString & user); + bool checkUserPermissions(const TQString & user); /** * Checks the write permissions of the given un?x user * Does not show a dialog if showMessageBox is false * @return @see #check */ - bool checkUserWritePermissions(const QString & user,bool showMessageBox = true); + bool checkUserWritePermissions(const TQString & user,bool showMessageBox = true); /** * Checks the read permissions of the given un?x user * Does not show a dialog if showMessageBox is false * @return @see #check */ - bool checkUserReadPermissions(const QString & user,bool showMessageBox = true); + bool checkUserReadPermissions(const TQString & user,bool showMessageBox = true); - QWidget* m_parent; + TQWidget* m_parent; SambaShare* m_sambaShare; - QFileInfo m_fi; + TQFileInfo m_fi; }; #endif diff --git a/filesharing/advanced/kcm_sambaconf/passwd.cpp b/filesharing/advanced/kcm_sambaconf/passwd.cpp index 78e9c8ad..eb3fe5b1 100644 --- a/filesharing/advanced/kcm_sambaconf/passwd.cpp +++ b/filesharing/advanced/kcm_sambaconf/passwd.cpp @@ -57,16 +57,16 @@ UnixUserList getUnixUserList() return list; } -QStringList getUnixUsers() +TQStringList getUnixUsers() { - QStringList list; + TQStringList list; struct passwd* p; while ((p = getpwent())) { if (p) - list.append(QString(p->pw_name)); + list.append(TQString(p->pw_name)); } endpwent(); @@ -76,16 +76,16 @@ QStringList getUnixUsers() return list; } -QStringList getUnixGroups() +TQStringList getUnixGroups() { - QStringList list; + TQStringList list; struct group* g; while ((g = getgrent())) { if (g) - list.append(QString(g->gr_name)); + list.append(TQString(g->gr_name)); } endgrent(); @@ -95,7 +95,7 @@ QStringList getUnixGroups() return list; } -int getUserUID(const QString & name) +int getUserUID(const TQString & name) { if (name.isNull()) return -1; @@ -109,7 +109,7 @@ int getUserUID(const QString & name) return -1; } -int getUserGID(const QString & name) +int getUserGID(const TQString & name) { if (name.isNull()) return -1; @@ -123,7 +123,7 @@ int getUserGID(const QString & name) return -1; } -int getGroupGID(const QString & name) +int getGroupGID(const TQString & name) { if (name.isNull()) return -1; @@ -137,19 +137,19 @@ int getGroupGID(const QString & name) return -1; } -bool isUserInGroup(const QString & user, const QString & group) { +bool isUserInGroup(const TQString & user, const TQString & group) { struct group* g; while ((g = getgrent())) { - if (g && QString(g->gr_name) == group) { + if (g && TQString(g->gr_name) == group) { char** names = g->gr_mem; int i = 0; char* name = names[0]; while (name != 0L) { i++; - if (QString(name) == user) { + if (TQString(name) == user) { endgrent(); return true; } diff --git a/filesharing/advanced/kcm_sambaconf/passwd.h b/filesharing/advanced/kcm_sambaconf/passwd.h index 8c9dba19..f5b5228e 100644 --- a/filesharing/advanced/kcm_sambaconf/passwd.h +++ b/filesharing/advanced/kcm_sambaconf/passwd.h @@ -29,28 +29,28 @@ #ifndef PASSWD_H #define PASSWD_H -#include -#include -#include +#include +#include +#include class UnixUser { public: - QString name; + TQString name; int uid; }; -typedef QPtrList UnixUserList; +typedef TQPtrList UnixUserList; UnixUserList getUnixUserList(); -QStringList getUnixUsers(); -QStringList getUnixGroups(); -int getUserUID(const QString &); -int getUserGID(const QString &); -int getGroupGID(const QString &); -bool isUserInGroup(const QString &, const QString &); +TQStringList getUnixUsers(); +TQStringList getUnixGroups(); +int getUserUID(const TQString &); +int getUserGID(const TQString &); +int getGroupGID(const TQString &); +bool isUserInGroup(const TQString &, const TQString &); #endif diff --git a/filesharing/advanced/kcm_sambaconf/printerdlgimpl.cpp b/filesharing/advanced/kcm_sambaconf/printerdlgimpl.cpp index 531e4673..3858101d 100644 --- a/filesharing/advanced/kcm_sambaconf/printerdlgimpl.cpp +++ b/filesharing/advanced/kcm_sambaconf/printerdlgimpl.cpp @@ -30,17 +30,17 @@ /** * @author Jan Schäfer **/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -61,7 +61,7 @@ #include "dictmanager.h" -PrinterDlgImpl::PrinterDlgImpl(QWidget* parent, SambaShare* share) +PrinterDlgImpl::PrinterDlgImpl(TQWidget* parent, SambaShare* share) : KcmPrinterDlg(parent,"sharedlgimpl") { if (!share) { @@ -81,9 +81,9 @@ void PrinterDlgImpl::initDialog() if (!_share) return; - QPtrList *printerList = KMManager::self()->printerListComplete(); + TQPtrList *printerList = KMManager::self()->printerListComplete(); - for (QPtrListIterator it(*printerList); it.current(); ++it) + for (TQPtrListIterator it(*printerList); it.current(); ++it) { if (!it.current()->isSpecial()){ queueCombo->insertItem(it.current()->printerName()); @@ -108,7 +108,7 @@ void PrinterDlgImpl::initDialog() _userTab = new UserTabImpl(this,_share); _tabs->insertTab(_userTab,i18n("&Users"),1); _userTab->load(); - connect(_userTab, SIGNAL(changed()), this, SLOT(changedSlot())); + connect(_userTab, TQT_SIGNAL(changed()), this, TQT_SLOT(changedSlot())); // Printing @@ -120,7 +120,7 @@ void PrinterDlgImpl::initDialog() _dictMngr->add("max print jobs",maxPrintJobsSpin); _dictMngr->add("max reported print jobs",maxReportedPrintJobsSpin); _dictMngr->add("printing",printingCombo, - new QStringList(QStringList() + new TQStringList(TQStringList() << "sysv" << "aix" << "hpux" << "bsd" << "qnx" << "plp" << "lprng" << "softq" << "cups" << "nt" << "os2")); @@ -156,7 +156,7 @@ void PrinterDlgImpl::initDialog() _dictMngr->add("root postexec",rootPostExecEdit); _dictMngr->load( _share ); - connect(_dictMngr, SIGNAL(changed()), this, SLOT(changedSlot())); + connect(_dictMngr, TQT_SIGNAL(changed()), this, TQT_SLOT(changedSlot())); } @@ -200,19 +200,19 @@ void PrinterDlgImpl::printersChkToggled(bool b) int w = 64 + dist; int h = 64 + 2*dist; - QPixmap pix(w,h); + TQPixmap pix(w,h); pix.fill(); // fill with white - QPixmap pix2 = DesktopIcon("printer1"); + TQPixmap pix2 = DesktopIcon("printer1"); // Draw the printericon three times - QPainter p(&pix); + TQPainter p(&pix); p.drawPixmap(dist+dist/2,0,pix2); p.drawPixmap(dist/2,dist,pix2); p.drawPixmap(dist+dist/2,2*dist,pix2); p.end(); - QBitmap mask(w,h); + TQBitmap mask(w,h); mask.fill(Qt::black); // everything is transparent diff --git a/filesharing/advanced/kcm_sambaconf/printerdlgimpl.h b/filesharing/advanced/kcm_sambaconf/printerdlgimpl.h index 6e473821..265429f8 100644 --- a/filesharing/advanced/kcm_sambaconf/printerdlgimpl.h +++ b/filesharing/advanced/kcm_sambaconf/printerdlgimpl.h @@ -50,7 +50,7 @@ Q_OBJECT public : - PrinterDlgImpl(QWidget* parent, SambaShare* share); + PrinterDlgImpl(TQWidget* parent, SambaShare* share); ~PrinterDlgImpl(); protected : diff --git a/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.cpp b/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.cpp index e7e0e260..19729e8d 100644 --- a/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.cpp +++ b/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.cpp @@ -26,10 +26,10 @@ * * ******************************************************************************/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -40,8 +40,8 @@ static const int BoxSize = 16; -QMultiCheckListItem::QMultiCheckListItem( QListView *parent=0) : - QListViewItem(parent) { +QMultiCheckListItem::QMultiCheckListItem( TQListView *parent=0) : + TQListViewItem(parent) { } void QMultiCheckListItem::setOn(int column, bool b) { @@ -83,56 +83,56 @@ void QMultiCheckListItem::setDisabled(int column, bool b) { } disableStates.setBit(column,b); -// KMessageBox::information(0L,QString("setDisabled"),QString("disable %1 ").arg(column)); +// KMessageBox::information(0L,TQString("setDisabled"),TQString("disable %1 ").arg(column)); repaint(); } -void QMultiCheckListItem::paintCell(QPainter *p,const QColorGroup & cg, int col, int width, int align) +void QMultiCheckListItem::paintCell(TQPainter *p,const TQColorGroup & cg, int col, int width, int align) { if ( !p ) return; - QListView *lv = listView(); + TQListView *lv = listView(); if ( !lv ) return; - QListViewItem::paintCell(p,cg,col,width,align ); + TQListViewItem::paintCell(p,cg,col,width,align ); int marg = lv->itemMargin(); // int width = BoxSize + marg*2; // use a provate color group and set the text/highlighted text colors - QColorGroup mcg = cg; + TQColorGroup mcg = cg; if (checkBoxColumns.testBit(col)) { // Bold/Italic/use default checkboxes // code allmost identical to QCheckListItem Q_ASSERT( lv ); //### // I use the text color of defaultStyles[0], normalcol in parent listview -// mcg.setColor( QColorGroup::Text, ((StyleListView*)lv)->normalcol ); +// mcg.setColor( TQColorGroup::Text, ((StyleListView*)lv)->normalcol ); int x = 0; if ( align == AlignCenter ) { - QFontMetrics fm( lv->font() ); + TQFontMetrics fm( lv->font() ); x = (width - BoxSize - fm.width(text(0)))/2; } int y = (height() - BoxSize) / 2; if ( !isEnabled() || disableStates.testBit(col)) - p->setPen( QPen( lv->palette().color( QPalette::Disabled, QColorGroup::Text ), 2 ) ); + p->setPen( TQPen( lv->palette().color( TQPalette::Disabled, TQColorGroup::Text ), 2 ) ); else - p->setPen( QPen( mcg.text(), 2 ) ); + p->setPen( TQPen( mcg.text(), 2 ) ); if ( isSelected() && lv->header()->mapToSection( 0 ) != 0 ) { p->fillRect( 0, 0, x + marg + BoxSize + 4, height(), - mcg.brush( QColorGroup::Highlight ) ); + mcg.brush( TQColorGroup::Highlight ) ); if ( isEnabled() ) - p->setPen( QPen( mcg.highlightedText(), 2 ) ); // FIXME! - use defaultstyles[0].selecol. luckily not used :) + p->setPen( TQPen( mcg.highlightedText(), 2 ) ); // FIXME! - use defaultstyles[0].selecol. luckily not used :) } p->drawRect( x+marg, y+2, BoxSize-4, BoxSize-4 ); x++; y++; if ( checkStates.testBit(col) ) { - QPointArray a( 7*2 ); + TQPointArray a( 7*2 ); int i, xx, yy; xx = x+1+marg; yy = y+5; diff --git a/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.h b/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.h index 48fa1727..ab4aa8b4 100644 --- a/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.h +++ b/filesharing/advanced/kcm_sambaconf/qmultichecklistitem.h @@ -29,15 +29,15 @@ #ifndef _QMULTICHECKLISTITEM_H_ #define _QMULTICHECKLISTITEM_H_ -#include +#include -#include +#include -class QMultiCheckListItem : public QObject, public QListViewItem { +class QMultiCheckListItem : public TQObject, public TQListViewItem { Q_OBJECT public: - QMultiCheckListItem( QListView *parent); + QMultiCheckListItem( TQListView *parent); ~QMultiCheckListItem() {}; virtual bool isOn(int column); @@ -46,7 +46,7 @@ Q_OBJECT protected: /* reimp */ - virtual void paintCell(QPainter *, const QColorGroup &, int, int, int); + virtual void paintCell(TQPainter *, const TQColorGroup &, int, int, int); public slots: virtual void setOn(int, bool); @@ -56,9 +56,9 @@ Q_OBJECT signals: void stateChanged(int, bool); private: - QBitArray checkStates; - QBitArray checkBoxColumns; - QBitArray disableStates; + TQBitArray checkStates; + TQBitArray checkBoxColumns; + TQBitArray disableStates; }; #endif diff --git a/filesharing/advanced/kcm_sambaconf/sambafile.cpp b/filesharing/advanced/kcm_sambaconf/sambafile.cpp index e8dbc5f8..25392514 100644 --- a/filesharing/advanced/kcm_sambaconf/sambafile.cpp +++ b/filesharing/advanced/kcm_sambaconf/sambafile.cpp @@ -17,13 +17,13 @@ */ -#include -#include -#include +#include +#include +#include #include #include -#include +#include #include #include #include @@ -41,20 +41,20 @@ SambaConfigFile::SambaConfigFile(SambaFile* sambaFile) { - QDict(10,false); + TQDict(10,false); setAutoDelete(true); _sambaFile = sambaFile; } -QString SambaConfigFile::getDefaultValue(const QString & name) +TQString SambaConfigFile::getDefaultValue(const TQString & name) { SambaShare* defaults = _sambaFile->getTestParmValues(); - QString s = defaults->getValue(name,false,false); + TQString s = defaults->getValue(name,false,false); return s; } -SambaShare* SambaConfigFile::addShare(const QString & name) +SambaShare* SambaConfigFile::addShare(const TQString & name) { SambaShare* newShare = new SambaShare(name,this); addShare(name,newShare); @@ -62,25 +62,25 @@ SambaShare* SambaConfigFile::addShare(const QString & name) } -void SambaConfigFile::addShare(const QString & name, SambaShare* share) +void SambaConfigFile::addShare(const TQString & name, SambaShare* share) { insert(name,share), _shareList.append(name); } -void SambaConfigFile::removeShare(const QString & name) +void SambaConfigFile::removeShare(const TQString & name) { remove(name); _shareList.remove(name); } -QStringList SambaConfigFile::getShareList() +TQStringList SambaConfigFile::getShareList() { return _shareList; } -SambaFile::SambaFile(const QString & _path, bool _readonly) +SambaFile::SambaFile(const TQString & _path, bool _readonly) : readonly(_readonly), changed(false), path(_path), @@ -105,9 +105,9 @@ bool SambaFile::isRemoteFile() { } /** No descriptions */ -QString SambaFile::findShareByPath(const QString & path) const +TQString SambaFile::findShareByPath(const TQString & path) const { - QDictIterator it(*_sambaConfig); + TQDictIterator it(*_sambaConfig); KURL url(path); url.adjustPath(-1); @@ -115,7 +115,7 @@ QString SambaFile::findShareByPath(const QString & path) const { SambaShare* share = it.current(); - QString *s = share->find("path"); + TQString *s = share->find("path"); if (s) { KURL curUrl(*s); curUrl.adjustPath(-1); @@ -127,7 +127,7 @@ QString SambaFile::findShareByPath(const QString & path) const } } - return QString::null; + return TQString::null; } bool SambaFile::save() { @@ -147,7 +147,7 @@ bool SambaFile::slotApply() // if not we have to save the results in // a temporary file and copy it afterwards // over the smb.conf file with kdesu. - if (QFileInfo(path).isWritable()) + if (TQFileInfo(path).isWritable()) { saveTo(path); changed = false; @@ -166,14 +166,14 @@ bool SambaFile::slotApply() return false; } - QFileInfo fi(path); + TQFileInfo fi(path); KURL url(path); if (KURL(path).isLocalFile()) { KProcess proc; kdDebug(5009) << "SambaFile::slotApply: is local file!" << endl; - QString suCommand=QString("cp %1 %2; rm %3") + TQString suCommand=TQString("cp %1 %2; rm %3") .arg(_tempFile->name()) .arg(path) .arg(_tempFile->name()); @@ -200,8 +200,8 @@ bool SambaFile::slotApply() srcURL.setPath( _tempFile->name() ); KIO::FileCopyJob * job = KIO::file_copy( srcURL, url, -1, true ); - connect( job, SIGNAL( result( KIO::Job * ) ), - this, SLOT( slotSaveJobFinished ( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + this, TQT_SLOT( slotSaveJobFinished ( KIO::Job * ) ) ); return (job->error()==0); } @@ -211,20 +211,20 @@ bool SambaFile::slotApply() /** * Returns a name which isn't already used for a share **/ -QString SambaFile::getUnusedName(const QString alreadyUsedName) const +TQString SambaFile::getUnusedName(const TQString alreadyUsedName) const { - QString init = i18n("Unnamed"); - if (alreadyUsedName != QString::null) + TQString init = i18n("Unnamed"); + if (alreadyUsedName != TQString::null) init = alreadyUsedName; - QString s = init; + TQString s = init; int i = 2; while (_sambaConfig->find(s)) { - s = init+QString::number(i); + s = init+TQString::number(i); i++; } @@ -233,7 +233,7 @@ QString SambaFile::getUnusedName(const QString alreadyUsedName) const -SambaShare* SambaFile::newShare(const QString & name) +SambaShare* SambaFile::newShare(const TQString & name) { if (_sambaConfig->find(name)) return 0L; @@ -247,7 +247,7 @@ SambaShare* SambaFile::newShare(const QString & name) } -SambaShare* SambaFile::newShare(const QString & name, const QString & path) +SambaShare* SambaFile::newShare(const TQString & name, const TQString & path) { SambaShare* share = newShare(name); if (share) @@ -258,7 +258,7 @@ SambaShare* SambaFile::newShare(const QString & name, const QString & path) return share; } -SambaShare* SambaFile::newPrinter(const QString & name, const QString & printer) +SambaShare* SambaFile::newPrinter(const TQString & name, const TQString & printer) { SambaShare* share = newShare(name); @@ -273,7 +273,7 @@ SambaShare* SambaFile::newPrinter(const QString & name, const QString & printer) /** No descriptions */ -void SambaFile::removeShare(const QString & share) +void SambaFile::removeShare(const TQString & share) { changed = true; @@ -285,13 +285,13 @@ void SambaFile::removeShare(SambaShare* share) removeShare(share->getName()); } -void SambaFile::removeShareByPath(const QString & path) { - QString share = findShareByPath(path); +void SambaFile::removeShareByPath(const TQString & path) { + TQString share = findShareByPath(path); removeShare(share); } /** No descriptions */ -SambaShare* SambaFile::getShare(const QString & share) const +SambaShare* SambaFile::getShare(const TQString & share) const { SambaShare *s = _sambaConfig->find(share); @@ -305,7 +305,7 @@ SambaShareList* SambaFile::getSharedDirs() const { SambaShareList* list = new SambaShareList(); - QDictIterator it(*_sambaConfig); + TQDictIterator it(*_sambaConfig); for( ; it.current(); ++it ) { @@ -326,7 +326,7 @@ SambaShareList* SambaFile::getSharedPrinters() const { SambaShareList* list = new SambaShareList(); - QDictIterator it(*_sambaConfig); + TQDictIterator it(*_sambaConfig); for( ; it.current(); ++it ) { @@ -344,11 +344,11 @@ int SambaFile::getSambaVersion() { KProcess testParam; testParam << "testparm"; testParam << "-V"; - _parmOutput = QString(""); + _parmOutput = TQString(""); _sambaVersion = 2; - connect( &testParam, SIGNAL(receivedStdout(KProcess*,char*,int)), - this, SLOT(testParmStdOutReceived(KProcess*,char*,int))); + connect( &testParam, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), + this, TQT_SLOT(testParmStdOutReceived(KProcess*,char*,int))); @@ -378,10 +378,10 @@ SambaShare* SambaFile::getTestParmValues(bool reload) testParam << "/dev/null"; - _parmOutput = QString(""); + _parmOutput = TQString(""); - connect( &testParam, SIGNAL(receivedStdout(KProcess*,char*,int)), - this, SLOT(testParmStdOutReceived(KProcess*,char*,int))); + connect( &testParam, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), + this, TQT_SLOT(testParmStdOutReceived(KProcess*,char*,int))); if (testParam.start(KProcess::Block,KProcess::Stdout)) { @@ -394,23 +394,23 @@ SambaShare* SambaFile::getTestParmValues(bool reload) void SambaFile::testParmStdOutReceived(KProcess *, char *buffer, int buflen) { - _parmOutput+=QString::fromLatin1(buffer,buflen); + _parmOutput+=TQString::fromLatin1(buffer,buflen); } void SambaFile::parseParmStdOutput() { - QTextIStream s(&_parmOutput); + TQTextIStream s(&_parmOutput); if (_testParmValues) delete _testParmValues; _testParmValues = new SambaShare(_sambaConfig); - QString section=""; + TQString section=""; while (!s.atEnd()) { - QString line = s.readLine().stripWhiteSpace(); + TQString line = s.readLine().stripWhiteSpace(); // empty lines if (line.isEmpty()) @@ -437,8 +437,8 @@ void SambaFile::parseParmStdOutput() int i = line.find('='); if (i>-1) { - QString name = line.left(i).stripWhiteSpace(); - QString value = line.mid(i+1).stripWhiteSpace(); + TQString name = line.left(i).stripWhiteSpace(); + TQString value = line.mid(i+1).stripWhiteSpace(); _testParmValues->setValue(name,value,false,false); } @@ -452,9 +452,9 @@ void SambaFile::parseParmStdOutput() * Try to find the samba config file position * First tries the config file, then checks * several common positions -* If nothing is found returns QString::null +* If nothing is found returns TQString::null **/ -QString SambaFile::findSambaConf() +TQString SambaFile::findSambaConf() { return KSambaShare::instance()->smbConfPath(); } @@ -490,7 +490,7 @@ bool SambaFile::load() destURL.setPath( localPath ); KIO::FileCopyJob * job = KIO::file_copy( url, destURL, 0600, true, false, true ); // emit started( d->m_job ); - connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotJobFinished ( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), this, TQT_SLOT( slotJobFinished ( KIO::Job * ) ) ); return true; } else { localPath = path; @@ -503,14 +503,14 @@ bool SambaFile::load() bool SambaFile::openFile() { - QFile f(localPath); + TQFile f(localPath); if (!f.open(IO_ReadOnly)) { - //throw SambaFileLoadException(QString("Could not open file %1 for reading.").arg(path)); + //throw SambaFileLoadException(TQString("Could not open file %1 for reading.").arg(path)); return false; } - QTextStream s(&f); + TQTextStream s(&f); delete _sambaConfig; @@ -518,12 +518,12 @@ bool SambaFile::openFile() { SambaShare *currentShare = 0L; bool continuedLine = false; // is true if the line before ended with a backslash - QString completeLine; - QStringList comments; + TQString completeLine; + TQStringList comments; while (!s.eof()) { - QString currentLine = s.readLine().stripWhiteSpace(); + TQString currentLine = s.readLine().stripWhiteSpace(); if (continuedLine) { @@ -555,7 +555,7 @@ bool SambaFile::openFile() { if ('[' == completeLine[0]) { // get the name of the section - QString section = completeLine.mid(1,completeLine.length()-2); + TQString section = completeLine.mid(1,completeLine.length()-2); currentShare = _sambaConfig->addShare(section); currentShare->setComments(comments); comments.clear(); @@ -568,8 +568,8 @@ bool SambaFile::openFile() { if (i>-1) { - QString name = completeLine.left(i).stripWhiteSpace(); - QString value = completeLine.mid(i+1).stripWhiteSpace(); + TQString name = completeLine.left(i).stripWhiteSpace(); + TQString value = completeLine.mid(i+1).stripWhiteSpace(); if (currentShare) { @@ -591,24 +591,24 @@ bool SambaFile::openFile() { return true; } -bool SambaFile::saveTo(const QString & path) +bool SambaFile::saveTo(const TQString & path) { - QFile f(path); + TQFile f(path); if (!f.open(IO_WriteOnly)) return false; - QTextStream s(&f); + TQTextStream s(&f); - QStringList shareList = _sambaConfig->getShareList(); + TQStringList shareList = _sambaConfig->getShareList(); - for ( QStringList::Iterator it = shareList.begin(); it != shareList.end(); ++it ) + for ( TQStringList::Iterator it = shareList.begin(); it != shareList.end(); ++it ) { SambaShare* share = _sambaConfig->find(*it); // First add all comments of the share to the file - QStringList comments = share->getComments(); - for ( QStringList::Iterator cmtIt = comments.begin(); cmtIt != comments.end(); ++cmtIt ) + TQStringList comments = share->getComments(); + for ( TQStringList::Iterator cmtIt = comments.begin(); cmtIt != comments.end(); ++cmtIt ) { s << *cmtIt << endl; @@ -624,14 +624,14 @@ bool SambaFile::saveTo(const QString & path) s << "[" << share->getName() << "]" << endl; // Add all options of the share - QStringList optionList = share->getOptionList(); + TQStringList optionList = share->getOptionList(); - for ( QStringList::Iterator optionIt = optionList.begin(); optionIt != optionList.end(); ++optionIt ) + for ( TQStringList::Iterator optionIt = optionList.begin(); optionIt != optionList.end(); ++optionIt ) { // Add the comments of the option comments = share->getComments(*optionIt); - for ( QStringList::Iterator cmtIt = comments.begin(); cmtIt != comments.end(); ++cmtIt ) + for ( TQStringList::Iterator cmtIt = comments.begin(); cmtIt != comments.end(); ++cmtIt ) { s << *cmtIt << endl; } @@ -651,21 +651,21 @@ bool SambaFile::saveTo(const QString & path) SambaConfigFile* SambaFile::getSambaConfigFile(KSimpleConfig* config) { - QStringList groups = config->groupList(); + TQStringList groups = config->groupList(); SambaConfigFile* samba = new SambaConfigFile(this); - for ( QStringList::Iterator it = groups.begin(); it != groups.end(); ++it ) + for ( TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it ) { - QMap entries = config->entryMap(*it); + TQMap entries = config->entryMap(*it); SambaShare *share = new SambaShare(*it,samba); samba->insert(*it,share); - for (QMap::Iterator it2 = entries.begin(); it2 != entries.end(); ++it2 ) + for (TQMap::Iterator it2 = entries.begin(); it2 != entries.end(); ++it2 ) { if (!it2.data().isEmpty()) - share->setValue(it2.key(),QString(it2.data()),false,false); + share->setValue(it2.key(),TQString(it2.data()),false,false); } } @@ -674,11 +674,11 @@ SambaConfigFile* SambaFile::getSambaConfigFile(KSimpleConfig* config) } -KSimpleConfig* SambaFile::getSimpleConfig(SambaConfigFile* sambaConfig, const QString & path) +KSimpleConfig* SambaFile::getSimpleConfig(SambaConfigFile* sambaConfig, const TQString & path) { KSimpleConfig *config = new KSimpleConfig(path,false); - QDictIterator it(*sambaConfig); + TQDictIterator it(*sambaConfig); for ( ; it.current(); ++it ) { @@ -686,7 +686,7 @@ KSimpleConfig* SambaFile::getSimpleConfig(SambaConfigFile* sambaConfig, const QS config->setGroup(it.currentKey()); - QDictIterator it2(*share); + TQDictIterator it2(*share); for (; it2.current(); ++it2 ) { diff --git a/filesharing/advanced/kcm_sambaconf/sambafile.h b/filesharing/advanced/kcm_sambaconf/sambafile.h index ab5d58c4..543082ba 100644 --- a/filesharing/advanced/kcm_sambaconf/sambafile.h +++ b/filesharing/advanced/kcm_sambaconf/sambafile.h @@ -21,9 +21,9 @@ #define SAMBAFILE_H -#include -#include -#include +#include +#include +#include #include #include "sambashare.h" @@ -39,49 +39,49 @@ class SambaFile; class SambaFileLoadException { public: - SambaFileLoadException(const QString & msg) { message = msg; }; + SambaFileLoadException(const TQString & msg) { message = msg; }; - QString getMessage() { return message; }; + TQString getMessage() { return message; }; protected: - QString message; + TQString message; }; -class SambaConfigFile : public QDict +class SambaConfigFile : public TQDict { public: SambaConfigFile(SambaFile*); - QString getDefaultValue(const QString & name); - QStringList getShareList(); - void addShare(const QString & name, SambaShare* share); - SambaShare* addShare(const QString & name); - void removeShare(const QString & name); + TQString getDefaultValue(const TQString & name); + TQStringList getShareList(); + void addShare(const TQString & name, SambaShare* share); + SambaShare* addShare(const TQString & name); + void removeShare(const TQString & name); protected: SambaFile* _sambaFile; - QStringList _shareList; + TQStringList _shareList; }; class SambaFile : public QObject { Q_OBJECT public: - SambaFile(const QString & _path, bool _readonly=true); + SambaFile(const TQString & _path, bool _readonly=true); ~SambaFile(); /** No descriptions */ - QString findShareByPath(const QString & path) const; - void removeShareByPath(const QString & path); + TQString findShareByPath(const TQString & path) const; + void removeShareByPath(const TQString & path); - SambaShare* newShare(const QString & name); - SambaShare* newShare(const QString & name, const QString & path); - SambaShare* newPrinter(const QString & name, const QString & printer); + SambaShare* newShare(const TQString & name); + SambaShare* newShare(const TQString & name, const TQString & path); + SambaShare* newPrinter(const TQString & name, const TQString & printer); - void removeShare(const QString & share); + void removeShare(const TQString & share); void removeShare(SambaShare* share); - void renameShare(const QString & oldName, const QString & newName); + void renameShare(const TQString & oldName, const TQString & newName); - SambaShare* getShare(const QString & share) const; + SambaShare* getShare(const TQString & share) const; /** * Returns a list of all shared directories @@ -100,7 +100,7 @@ public: * E.g.: if public is already used, the method could return * public2 **/ - QString getUnusedName(const QString alreadyUsedName=QString::null) const; + TQString getUnusedName(const TQString alreadyUsedName=TQString::null) const; /** * Returns all values of the global section @@ -111,7 +111,7 @@ public: **/ SambaShare* getTestParmValues(bool reload=false); - static QString findSambaConf(); + static TQString findSambaConf(); int getSambaVersion(); @@ -135,21 +135,21 @@ public: * Save all data to the specified file * if successful returns true otherwise false **/ - bool saveTo(const QString & path); + bool saveTo(const TQString & path); protected: bool readonly; bool changed; - QString path; - QString localPath; + TQString path; + TQString localPath; SambaConfigFile *_sambaConfig; SambaShare* _testParmValues; - QString _parmOutput; + TQString _parmOutput; int _sambaVersion; void parseParmStdOutput(); SambaConfigFile* getSambaConfigFile(KSimpleConfig* config); - KSimpleConfig* getSimpleConfig(SambaConfigFile* sambaConfig, const QString & filename); + KSimpleConfig* getSimpleConfig(SambaConfigFile* sambaConfig, const TQString & filename); @@ -170,7 +170,7 @@ protected slots: void slotSaveJobFinished( KIO::Job *); signals: - void canceled(const QString &); + void canceled(const TQString &); void completed(); }; diff --git a/filesharing/advanced/kcm_sambaconf/sambashare.cpp b/filesharing/advanced/kcm_sambaconf/sambashare.cpp index 68afef2a..a2c58565 100644 --- a/filesharing/advanced/kcm_sambaconf/sambashare.cpp +++ b/filesharing/advanced/kcm_sambaconf/sambashare.cpp @@ -27,34 +27,34 @@ ******************************************************************************/ #include -#include +#include #include "sambafile.h" #include "sambashare.h" #include "common.h" SambaShare::SambaShare(SambaConfigFile* sambaFile) - : QDict(10,false) + : TQDict(10,false) { _sambaFile = sambaFile; setName("defaults"); setAutoDelete(true); } -SambaShare::SambaShare(const QString & name, SambaConfigFile* sambaFile) - : QDict(10,false) +SambaShare::SambaShare(const TQString & name, SambaConfigFile* sambaFile) + : TQDict(10,false) { _sambaFile = sambaFile; setName(name); setAutoDelete(true); } -const QString& SambaShare::getName() const +const TQString& SambaShare::getName() const { return _name; } -bool SambaShare::setName(const QString & name, bool testWetherExists) +bool SambaShare::setName(const TQString & name, bool testWetherExists) { if ( testWetherExists && @@ -66,9 +66,9 @@ bool SambaShare::setName(const QString & name, bool testWetherExists) return true; } -bool SambaShare::optionSupported(const QString & name) +bool SambaShare::optionSupported(const TQString & name) { - QString defaultValue = _sambaFile->getDefaultValue(name); + TQString defaultValue = _sambaFile->getDefaultValue(name); // kdDebug(5009) << name << " = " << defaultValue << " null : " << defaultValue.isNull() << endl; return ! defaultValue.isNull(); } @@ -78,12 +78,12 @@ bool SambaShare::optionSupported(const QString & name) * if no value is set yet the default value * will be returned. **/ -QString SambaShare::getValue(const QString & name, bool globalValue, bool defaultValue) +TQString SambaShare::getValue(const TQString & name, bool globalValue, bool defaultValue) { - QString synonym = getSynonym(name); + TQString synonym = getSynonym(name); - QString* str = find(synonym); - QString ret; + TQString* str = find(synonym); + TQString ret; if (str) { ret = *str; @@ -102,20 +102,20 @@ QString SambaShare::getValue(const QString & name, bool globalValue, bool defaul return ret; } -bool SambaShare::getBoolValue(const QString & name, bool globalValue, bool defaultValue) +bool SambaShare::getBoolValue(const TQString & name, bool globalValue, bool defaultValue) { return boolFromText(getValue(name,globalValue,defaultValue)); } -QString SambaShare::getGlobalValue(const QString & name, bool defaultValue) +TQString SambaShare::getGlobalValue(const TQString & name, bool defaultValue) { if (!_sambaFile) return getValue(name,false,defaultValue); SambaShare* globals = _sambaFile->find("global"); - QString s = globals->getValue(name,false,defaultValue); + TQString s = globals->getValue(name,false,defaultValue); return s; } @@ -126,14 +126,14 @@ QString SambaShare::getGlobalValue(const QString & name, bool defaultValue) * if no synonym exists the original parameter in lower * case is returned **/ -QString SambaShare::getSynonym(const QString & name) const +TQString SambaShare::getSynonym(const TQString & name) const { // idmap config is an exception and shouldn't be set to lower - QString sname = name.left(12).stripWhiteSpace(); + TQString sname = name.left(12).stripWhiteSpace(); if ( sname == "idmap config" ) return name; - QString lname = name.lower().stripWhiteSpace(); + TQString lname = name.lower().stripWhiteSpace(); if (lname == "browsable") return "browseable"; if (lname == "allow hosts") return "hosts allow"; @@ -172,11 +172,11 @@ QString SambaShare::getSynonym(const QString & name) const return lname; } -void SambaShare::setValue(const QString & name, const QString & value, bool globalValue, bool defaultValue) +void SambaShare::setValue(const TQString & name, const TQString & value, bool globalValue, bool defaultValue) { - QString synonym = getSynonym(name); + TQString synonym = getSynonym(name); - QString newValue = value; + TQString newValue = value; if (newValue.isNull()) newValue = ""; @@ -190,7 +190,7 @@ void SambaShare::setValue(const QString & name, const QString & value, bool glob newValue = textFromBool(!boolFromText(value)); } - QString global = ""; + TQString global = ""; if (globalValue && !hasComments(synonym)) { @@ -224,32 +224,32 @@ void SambaShare::setValue(const QString & name, const QString & value, bool glob _optionList.append(synonym); } - replace(synonym,new QString(newValue)); + replace(synonym,new TQString(newValue)); } -void SambaShare::setValue(const QString & name, bool value, bool globalValue, bool defaultValue) +void SambaShare::setValue(const TQString & name, bool value, bool globalValue, bool defaultValue) { setValue(name,textFromBool(value),globalValue, defaultValue); } -void SambaShare::setValue(const QString & name, int value, bool globalValue, bool defaultValue) +void SambaShare::setValue(const TQString & name, int value, bool globalValue, bool defaultValue) { - setValue(name,QString::number(value),globalValue, defaultValue); + setValue(name,TQString::number(value),globalValue, defaultValue); } /** * Returns the default value of the parameter **/ -QString SambaShare::getDefaultValue(const QString & name) +TQString SambaShare::getDefaultValue(const TQString & name) { - QString defaultValue = _sambaFile->getDefaultValue(name); + TQString defaultValue = _sambaFile->getDefaultValue(name); if (defaultValue.isNull()) defaultValue = ""; return defaultValue; } -bool SambaShare::getDefaultBoolValue(const QString & name) +bool SambaShare::getDefaultBoolValue(const TQString & name) { return boolFromText(getDefaultValue(name)); @@ -258,32 +258,32 @@ bool SambaShare::getDefaultBoolValue(const QString & name) /** * Sets the comments for the passed option **/ -void SambaShare::setComments(const QString & name, const QStringList & commentList) +void SambaShare::setComments(const TQString & name, const TQStringList & commentList) { // Only add inempty lists if (commentList.empty()) return; - QString synonym = getSynonym(name); + TQString synonym = getSynonym(name); - _commentList.replace(name,new QStringList(commentList)); + _commentList.replace(name,new TQStringList(commentList)); } /** * Returns the comments of the passed option **/ -QStringList SambaShare::getComments(const QString & name) +TQStringList SambaShare::getComments(const TQString & name) { - QStringList* list = _commentList.find(getSynonym(name)); + TQStringList* list = _commentList.find(getSynonym(name)); if (list) - return QStringList(*list); + return TQStringList(*list); else - return QStringList(); + return TQStringList(); } -bool SambaShare::hasComments(const QString & name) +bool SambaShare::hasComments(const TQString & name) { return 0L != _commentList.find(getSynonym(name)); } @@ -292,7 +292,7 @@ bool SambaShare::hasComments(const QString & name) * Returns the comments of the share * e.g. the text above the [...] section **/ -QStringList SambaShare::getComments() +TQStringList SambaShare::getComments() { return _comments; } @@ -301,12 +301,12 @@ QStringList SambaShare::getComments() * Sets the comments for the share * e.g. the text above the [...] section **/ -void SambaShare::setComments(const QStringList & commentList) +void SambaShare::setComments(const TQStringList & commentList) { _comments = commentList; } -QStringList SambaShare::getOptionList() +TQStringList SambaShare::getOptionList() { return _optionList; } @@ -316,7 +316,7 @@ QStringList SambaShare::getOptionList() **/ bool SambaShare::isPrinter() { - QString* str = find("printable"); + TQString* str = find("printable"); if (!str) str = find("print ok"); diff --git a/filesharing/advanced/kcm_sambaconf/sambashare.h b/filesharing/advanced/kcm_sambaconf/sambashare.h index 78379dde..39107505 100644 --- a/filesharing/advanced/kcm_sambaconf/sambashare.h +++ b/filesharing/advanced/kcm_sambaconf/sambashare.h @@ -29,10 +29,10 @@ #ifndef SAMBASHARE_H #define SAMBASHARE_H -#include -#include -#include -#include +#include +#include +#include +#include class SambaConfigFile; class QStringList; @@ -41,7 +41,7 @@ class QStringList; * A class which represents a Samba share * @author Jan Schäfer **/ -class SambaShare :public QDict +class SambaShare :public TQDict { public: @@ -54,12 +54,12 @@ public: * Creates a new SambaShare with the given name * @param name the name of the share **/ - SambaShare(const QString & name, SambaConfigFile* sambaFile); + SambaShare(const TQString & name, SambaConfigFile* sambaFile); /** * Returns the name of the share **/ - const QString& getName() const; + const TQString& getName() const; /** @@ -67,13 +67,13 @@ public: * returns false if the name already exists and the testWetherExists * parameter is set to true **/ - bool setName(const QString & name, bool testWetherExists=true); + bool setName(const TQString & name, bool testWetherExists=true); /** * Tests wether or not the given option is supported by Samba. * It does this by testing the output of testparm for this option **/ - bool optionSupported(const QString & name); + bool optionSupported(const TQString & name); /** * Returns the value of the given parameter @@ -83,7 +83,7 @@ public: * @param gobalValue if the gobal value should be returend * @param defaultValue if the default value should be returned or a null string **/ - QString getValue(const QString & name, bool globalValue=true, bool defaultValue=true); + TQString getValue(const TQString & name, bool globalValue=true, bool defaultValue=true); /** * Same as above but for boolean parameters @@ -91,12 +91,12 @@ public: * because you can't distinguish an unset parameter * from a false parameter **/ - bool getBoolValue(const QString & name, bool globalValue=true, bool defaultValue=true); + bool getBoolValue(const TQString & name, bool globalValue=true, bool defaultValue=true); /** * Returns the value from the [globals] section **/ - QString getGlobalValue(const QString & name, bool defaultValue=true); + TQString getGlobalValue(const TQString & name, bool defaultValue=true); /** * Sets the parameter name to the given value @@ -108,70 +108,70 @@ public: * exists and it it is different to it. If no global value exists then it is only * set if different to the default value. **/ - void setValue(const QString & name,const QString & value, bool globalValue=true, bool defaultValue=true); + void setValue(const TQString & name,const TQString & value, bool globalValue=true, bool defaultValue=true); /** * Same as above but for boolean parameters **/ - void setValue(const QString & name, bool value, bool globalValue=true, bool defaultValue=true); + void setValue(const TQString & name, bool value, bool globalValue=true, bool defaultValue=true); /** * Same as above but for integer parameters **/ - void setValue(const QString & name, int value, bool globalValue=true, bool defaultValue=true); + void setValue(const TQString & name, int value, bool globalValue=true, bool defaultValue=true); /** * Returns the default value of the parameter * @param name the name of the parameter **/ - QString getDefaultValue(const QString & name); + TQString getDefaultValue(const TQString & name); /** * Same as above but for booleans **/ - bool getDefaultBoolValue(const QString & name); + bool getDefaultBoolValue(const TQString & name); /** * Returns the default synonym for the given parameter * if no synonym exists the original parameter in lower * case is returned **/ - QString getSynonym(const QString & name) const; + TQString getSynonym(const TQString & name) const; /** * Returns the comments of the share * e.g. the text above the [...] section **/ - QStringList getComments(); + TQStringList getComments(); /** * Sets the comments for the share * e.g. the text above the [...] section **/ - void setComments(const QStringList & commentList); + void setComments(const TQStringList & commentList); /** * Sets the comments for the passed option **/ - void setComments(const QString & name, const QStringList & commentList); + void setComments(const TQString & name, const TQStringList & commentList); /** * Returns the comments of the passed option **/ - QStringList getComments(const QString & name); + TQStringList getComments(const TQString & name); /** * Returns true if the passed option has comments * otherwise returns false **/ - bool hasComments(const QString & name); + bool hasComments(const TQString & name); /** * Returns the list of all options * the order of the options is exactly the * order of the insertion of the options **/ - QStringList getOptionList(); + TQStringList getOptionList(); /** * Returns true if this share is a printer @@ -190,7 +190,7 @@ protected: * The name of the share * could be also printers, global and homes **/ - QString _name; + TQString _name; SambaConfigFile* _sambaFile; /** @@ -198,34 +198,34 @@ protected: * the comments which stood above the option name * are stored in this QStringList **/ - QDict _commentList; + TQDict _commentList; /** * The comments for this share **/ - QStringList _comments; + TQStringList _comments; /** * An extra list which holds * all stored options * You might say, hey for what is this ? - * We have them already stored in the QDict. + * We have them already stored in the TQDict. * That's right, but there is a problem : - * QDict doesn't preserve the order of + * TQDict doesn't preserve the order of * the inserted items, but when saving * the options back to the smb.conf * we want to have exactly the same order - * so this QStringList is only for saving + * so this TQStringList is only for saving * the order of the options. * On the other side we need a very fast lookup * of the options, because we lookup very frequently * so this is the best way to do both. **/ - QStringList _optionList; + TQStringList _optionList; }; -typedef QPtrList SambaShareList; +typedef TQPtrList SambaShareList; #endif diff --git a/filesharing/advanced/kcm_sambaconf/share.ui.h b/filesharing/advanced/kcm_sambaconf/share.ui.h index 60f8194e..7de229bc 100644 --- a/filesharing/advanced/kcm_sambaconf/share.ui.h +++ b/filesharing/advanced/kcm_sambaconf/share.ui.h @@ -63,8 +63,8 @@ void KcmShareDlg::init() directoryPixLbl->setPixmap(DesktopIcon("folder")); PixmapLabel1->setPixmap(SmallIcon("messagebox_warning")); /* - QListBoxItem* item = 0; - QPtrList* selectedList = new QPtrList; + TQListBoxItem* item = 0; + TQPtrList* selectedList = new TQPtrList; selectedList->setAutoDelete(false); for (int i=0; i < possible->count(); i++){ item = possible->item(i); @@ -73,7 +73,7 @@ void KcmShareDlg::init() } } selected->clearSelection(); - for (QPtrListIterator it(*selectedList); it.current(); ++it){ + for (TQPtrListIterator it(*selectedList); it.current(); ++it){ possible->takeItem(it.current()); selected->insertItem(it.current()); } @@ -179,7 +179,7 @@ void KcmShareDlg::publicBaseChk_toggled( bool b) } -void KcmShareDlg::pathUrlRq_textChanged( const QString & ) +void KcmShareDlg::pathUrlRq_textChanged( const TQString & ) { } diff --git a/filesharing/advanced/kcm_sambaconf/sharedlgimpl.cpp b/filesharing/advanced/kcm_sambaconf/sharedlgimpl.cpp index 73ba4741..8640f41b 100644 --- a/filesharing/advanced/kcm_sambaconf/sharedlgimpl.cpp +++ b/filesharing/advanced/kcm_sambaconf/sharedlgimpl.cpp @@ -31,24 +31,24 @@ * @author Jan Schäfer **/ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -80,7 +80,7 @@ -ShareDlgImpl::ShareDlgImpl(QWidget* parent, SambaShare* share) +ShareDlgImpl::ShareDlgImpl(TQWidget* parent, SambaShare* share) : KcmShareDlg(parent,"sharedlgimpl") { if (!share) { @@ -122,12 +122,12 @@ void ShareDlgImpl::initDialog() _userTab = new UserTabImpl(this,_share); _tabs->insertTab(_userTab,i18n("&Users"),1); _userTab->load(); - connect(_userTab, SIGNAL(changed()), this, SLOT(changedSlot())); + connect(_userTab, TQT_SIGNAL(changed()), this, TQT_SLOT(changedSlot())); // Filename settings _dictMngr->add("case sensitive",caseSensitiveCombo, - new QStringList(QStringList() << "auto" << "yes" << "no")); + new TQStringList(TQStringList() << "auto" << "yes" << "no")); _dictMngr->add("preserve case",preserveCaseChk); _dictMngr->add("short preserve case",shortPreserveCaseChk); _dictMngr->add("mangled names",mangledNamesChk); @@ -137,10 +137,10 @@ void ShareDlgImpl::initDialog() _dictMngr->add("mangling method",manglingMethodCombo, - new QStringList(QStringList() << "hash" << "hash2")); + new TQStringList(TQStringList() << "hash" << "hash2")); _dictMngr->add("default case",defaultCaseCombo, - new QStringList(QStringList() << "Lower" << "Upper")); + new TQStringList(TQStringList() << "Lower" << "Upper")); _dictMngr->add("hide dot files",hideDotFilesChk); _dictMngr->add("strip dot",hideTrailingDotChk); @@ -202,7 +202,7 @@ void ShareDlgImpl::initDialog() _dictMngr->add("level2 oplocks",level2OplocksChk); _dictMngr->add("posix locking",posixLockingChk); _dictMngr->add("strict locking",strictLockingCombo, - new QStringList(QStringList() << "Auto" << "yes" << "no")); + new TQStringList(TQStringList() << "Auto" << "yes" << "no")); _dictMngr->add("share modes",shareModesChk); _dictMngr->add("oplocks",oplocksChk); @@ -223,7 +223,7 @@ void ShareDlgImpl::initDialog() _dictMngr->add("use sendfile",useSendfileChk); _dictMngr->add("csc policy",cscPolicyCombo, - new QStringList(QStringList() << "manual" << "documents" << "programs" << "disable")); + new TQStringList(TQStringList() << "manual" << "documents" << "programs" << "disable")); @@ -256,8 +256,8 @@ void ShareDlgImpl::initDialog() _dictMngr->load( _share ); - connect( _tabs, SIGNAL(currentChanged(QWidget*)), this, SLOT(tabChangedSlot(QWidget*))); - connect(_dictMngr, SIGNAL(changed()), this, SLOT(changedSlot())); + connect( _tabs, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(tabChangedSlot(TQWidget*))); + connect(_dictMngr, TQT_SIGNAL(changed()), this, TQT_SLOT(changedSlot())); } ShareDlgImpl::~ShareDlgImpl() @@ -268,17 +268,17 @@ ShareDlgImpl::~ShareDlgImpl() void ShareDlgImpl::initAdvancedTab() { - QVBoxLayout *l = new QVBoxLayout(advancedFrame); + TQVBoxLayout *l = new TQVBoxLayout(advancedFrame); l->setAutoAdd(true); l->setMargin(0); _janus = new KJanusWidget(advancedFrame,0,KJanusWidget::TreeList); _janus->setRootIsDecorated(false); _janus->setShowIconsInTreeList(true); - QWidget *w; - QFrame *f; - QString label; - QPixmap icon; + TQWidget *w; + TQFrame *f; + TQString label; + TQPixmap icon; for (int i=0;icount();) { @@ -321,19 +321,19 @@ void ShareDlgImpl::initAdvancedTab() if (label.lower() == "misc") icon = SmallIcon("misc"); else { - icon = QPixmap(16,16); + icon = TQPixmap(16,16); icon.fill(); } //SmallIcon("empty2"); f = _janus->addPage( label,label,icon ); - l = new QVBoxLayout(f); + l = new TQVBoxLayout(f); l->setAutoAdd(true); l->setMargin(0); advancedDumpTab->removePage(w); - w->reparent(f,QPoint(1,1),TRUE); + w->reparent(f,TQPoint(1,1),TRUE); } @@ -345,10 +345,10 @@ void ShareDlgImpl::initAdvancedTab() } -void ShareDlgImpl::tabChangedSlot(QWidget* w) +void ShareDlgImpl::tabChangedSlot(TQWidget* w) { // We are only interrested in the Hidden files tab - if ( QString(w->name()) == "hiddenFilesTab" ) + if ( TQString(w->name()) == "hiddenFilesTab" ) loadHiddenFilesView(); } @@ -418,15 +418,15 @@ void ShareDlgImpl::homeChkToggled(bool b) void ShareDlgImpl::accessModifierBtnClicked() { - if (!QObject::sender()) { - kdWarning() << "ShareDlgImpl::accessModifierBtnClicked() : QObject::sender() is null!" << endl; + if (!TQObject::sender()) { + kdWarning() << "ShareDlgImpl::accessModifierBtnClicked() : TQObject::sender() is null!" << endl; return; } - QString name = QObject::sender()->name(); + TQString name = TQObject::sender()->name(); - QLineEdit *edit = 0L; + TQLineEdit *edit = 0L; if (name == "forceCreateModeBtn") edit = forceCreateModeEdit; @@ -468,7 +468,7 @@ void ShareDlgImpl::changedSlot() { emit changed(); } -void ShareDlgImpl::pathUrlRq_textChanged( const QString & s) +void ShareDlgImpl::pathUrlRq_textChanged( const TQString & s) { if (_fileView && ! _share->isSpecialSection()) _fileView->load(); diff --git a/filesharing/advanced/kcm_sambaconf/sharedlgimpl.h b/filesharing/advanced/kcm_sambaconf/sharedlgimpl.h index 16c3f6d0..a3ef81c4 100644 --- a/filesharing/advanced/kcm_sambaconf/sharedlgimpl.h +++ b/filesharing/advanced/kcm_sambaconf/sharedlgimpl.h @@ -34,7 +34,7 @@ * @author Jan Schäfer **/ -#include +#include #include "share.h" @@ -57,7 +57,7 @@ Q_OBJECT public : - ShareDlgImpl(QWidget* parent, SambaShare* share); + ShareDlgImpl(TQWidget* parent, SambaShare* share); ~ShareDlgImpl(); bool hasChanged() { return m_changed; }; @@ -89,9 +89,9 @@ protected slots: virtual void homeChkToggled(bool); virtual void accessModifierBtnClicked(); virtual void changedSlot(); - virtual void pathUrlRq_textChanged( const QString & ); + virtual void pathUrlRq_textChanged( const TQString & ); - void tabChangedSlot(QWidget* w); + void tabChangedSlot(TQWidget* w); signals: void changed(); }; diff --git a/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.cpp b/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.cpp index 03a1e550..00181eaa 100644 --- a/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.cpp +++ b/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.cpp @@ -26,10 +26,10 @@ * * ******************************************************************************/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -39,19 +39,19 @@ #include "smbconfconfigwidget.h" -SmbConfConfigWidget::SmbConfConfigWidget(QWidget* parent) - : QWidget(parent,"configWidget") +SmbConfConfigWidget::SmbConfConfigWidget(TQWidget* parent) + : TQWidget(parent,"configWidget") { - QVBoxLayout *layout = new QVBoxLayout(this,5); + TQVBoxLayout *layout = new TQVBoxLayout(this,5); - QLabel *lbl = new QLabel(i18n("

The SAMBA configuration file 'smb.conf'" \ + TQLabel *lbl = new TQLabel(i18n("

The SAMBA configuration file 'smb.conf'" \ " could not be found;

" \ "make sure you have SAMBA installed.\n\n"), this); - QHBoxLayout *hbox = new QHBoxLayout(this); - QPushButton *btn = new QPushButton(i18n("Specify Location"), this); - connect(btn, SIGNAL(pressed()), this, SLOT( btnPressed())); + TQHBoxLayout *hbox = new TQHBoxLayout(this); + TQPushButton *btn = new TQPushButton(i18n("Specify Location"), this); + connect(btn, TQT_SIGNAL(pressed()), this, TQT_SLOT( btnPressed())); btn->setDefault(false); btn->setAutoDefault(false); @@ -65,13 +65,13 @@ SmbConfConfigWidget::SmbConfConfigWidget(QWidget* parent) } void SmbConfConfigWidget::btnPressed() { - QString smbConf = KFileDialog::getOpenFileName("/", + TQString smbConf = KFileDialog::getOpenFileName("/", "smb.conf|Samba conf. File\n" "*|All Files",0,i18n("Get smb.conf Location")); if (smbConf.isEmpty()) return; - if ( ! QFileInfo(smbConf).isReadable() ) { + if ( ! TQFileInfo(smbConf).isReadable() ) { KMessageBox::sorry(this,i18n("The file %1 could not be read.").arg(smbConf),i18n("Could Not Read File")); return; } diff --git a/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.h b/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.h index 063dd9e8..6af88aa2 100644 --- a/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.h +++ b/filesharing/advanced/kcm_sambaconf/smbconfconfigwidget.h @@ -29,17 +29,17 @@ #ifndef SMBCONFCONFIGWIDGET_H #define SMBCONFCONFIGWIDGET_H -#include +#include -class SmbConfConfigWidget : public QWidget { +class SmbConfConfigWidget : public TQWidget { Q_OBJECT public: - SmbConfConfigWidget(QWidget*); + SmbConfConfigWidget(TQWidget*); protected slots: void btnPressed(); signals: - void smbConfChoosed(const QString &); + void smbConfChoosed(const TQString &); }; diff --git a/filesharing/advanced/kcm_sambaconf/smbpasswdfile.cpp b/filesharing/advanced/kcm_sambaconf/smbpasswdfile.cpp index f7a2cdd9..8286cdf3 100644 --- a/filesharing/advanced/kcm_sambaconf/smbpasswdfile.cpp +++ b/filesharing/advanced/kcm_sambaconf/smbpasswdfile.cpp @@ -26,10 +26,10 @@ * * ******************************************************************************/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -42,9 +42,9 @@ #include "passwd.h" -QStringList SambaUserList::getUserNames() +TQStringList SambaUserList::getUserNames() { - QStringList list; + TQStringList list; SambaUser *user; for ( user = first(); user; user = next() ) @@ -79,14 +79,14 @@ void SmbPasswdFile::setUrl(const KURL & url) { **/ SambaUserList SmbPasswdFile::getSambaUserList() { - QFile f(_url.path()); + TQFile f(_url.path()); SambaUserList list; if ( f.open(IO_ReadOnly) ) { - QTextStream t( &f ); - QString s; + TQTextStream t( &f ); + TQString s; while ( !t.eof() ) { s = t.readLine().stripWhiteSpace(); @@ -95,7 +95,7 @@ SambaUserList SmbPasswdFile::getSambaUserList() if (s.left(1)=="#") continue; - QStringList l = QStringList::split(":",s); + TQStringList l = TQStringList::split(":",s); SambaUser* user = new SambaUser(l[0],l[1].toInt()); user->gid = getUserGID(l[0]); @@ -111,12 +111,12 @@ SambaUserList SmbPasswdFile::getSambaUserList() return list; } -bool SmbPasswdFile::executeSmbpasswd(const QStringList & args) { +bool SmbPasswdFile::executeSmbpasswd(const TQStringList & args) { KProcess p; p << "smbpasswd" << args; - connect( &p, SIGNAL(receivedStdout(KProcess*,char*,int)), - this, SLOT(smbpasswdStdOutReceived(KProcess*,char*,int))); + connect( &p, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), + this, TQT_SLOT(smbpasswdStdOutReceived(KProcess*,char*,int))); _smbpasswdOutput = ""; @@ -134,15 +134,15 @@ bool SmbPasswdFile::executeSmbpasswd(const QStringList & args) { * Tries to add the passed user to the smbpasswd file * returns true if successful otherwise false **/ -bool SmbPasswdFile::addUser(const SambaUser & user,const QString & password) +bool SmbPasswdFile::addUser(const SambaUser & user,const TQString & password) { KProcess p; p << "smbpasswd" << "-a" << user.name; p << password; - connect( &p, SIGNAL(receivedStdout(KProcess*,char*,int)), - this, SLOT(smbpasswdStdOutReceived(KProcess*,char*,int))); + connect( &p, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)), + this, TQT_SLOT(smbpasswdStdOutReceived(KProcess*,char*,int))); _smbpasswdOutput = ""; @@ -162,12 +162,12 @@ bool SmbPasswdFile::addUser(const SambaUser & user,const QString & password) **/ bool SmbPasswdFile::removeUser(const SambaUser & user) { - QStringList l; + TQStringList l; l << "-x" << user.name; return executeSmbpasswd(l); } -bool SmbPasswdFile::changePassword(const SambaUser & user, const QString & newPassword) +bool SmbPasswdFile::changePassword(const SambaUser & user, const TQString & newPassword) { return addUser(user,newPassword); } @@ -175,7 +175,7 @@ bool SmbPasswdFile::changePassword(const SambaUser & user, const QString & newPa void SmbPasswdFile::smbpasswdStdOutReceived(KProcess *, char *buffer, int buflen) { - _smbpasswdOutput+=QString::fromLatin1(buffer,buflen); + _smbpasswdOutput+=TQString::fromLatin1(buffer,buflen); } @@ -193,32 +193,32 @@ KURL SmbPasswdFile::getUrlFromSambaFile(const SambaFile * /*file*/) } bool SmbPasswdFile::enableUser(const SambaUser & user) { - QStringList l; + TQStringList l; l << "-e" << user.name; return executeSmbpasswd(l); } bool SmbPasswdFile::disableUser(const SambaUser & user) { - QStringList l; + TQStringList l; l << "-d" << user.name; return executeSmbpasswd(l); } bool SmbPasswdFile::setNoPassword(const SambaUser & user) { - QStringList l; + TQStringList l; l << "-n" << user.name; return executeSmbpasswd(l); } bool SmbPasswdFile::setMachineTrustAccount(const SambaUser & user) { - QStringList l; + TQStringList l; l << "-m" << user.name; return executeSmbpasswd(l); } -bool SmbPasswdFile::joinADomain(const QString & domain, const QString & server, - const QString & user, const QString & password) { - QStringList l; +bool SmbPasswdFile::joinADomain(const TQString & domain, const TQString & server, + const TQString & user, const TQString & password) { + TQStringList l; l << "-j" << domain; l << "-r" << server; l << "-U" << user << "%" << password; diff --git a/filesharing/advanced/kcm_sambaconf/smbpasswdfile.h b/filesharing/advanced/kcm_sambaconf/smbpasswdfile.h index 2542d3f6..88eb8594 100644 --- a/filesharing/advanced/kcm_sambaconf/smbpasswdfile.h +++ b/filesharing/advanced/kcm_sambaconf/smbpasswdfile.h @@ -34,7 +34,7 @@ *@author Jan Schäfer */ -#include +#include #include class SambaFile; @@ -46,9 +46,9 @@ class KProcess; class SambaUser { public: - SambaUser(const QString & aName = QString::null, int anUid = -1) {name = aName; uid = anUid;}; + SambaUser(const TQString & aName = TQString::null, int anUid = -1) {name = aName; uid = anUid;}; - QString name; + TQString name; int uid; int gid; bool isUserAccount; @@ -58,12 +58,12 @@ public: }; /** - * A QPtrList of SambaUser + * A TQPtrList of SambaUser **/ -class SambaUserList : public QPtrList +class SambaUserList : public TQPtrList { public: - QStringList getUserNames(); + TQStringList getUserNames(); }; /** @@ -92,13 +92,13 @@ public: /** * Calls smbpasswd with the given arguments **/ - bool executeSmbpasswd(const QStringList & args); + bool executeSmbpasswd(const TQStringList & args); /** * Tries to add the passed user to the smbpasswd file * returns true if successful otherwise false **/ - bool addUser(const SambaUser &, const QString & password); + bool addUser(const SambaUser &, const TQString & password); /** * Tries to remove the passed user from the smbpasswd file @@ -110,7 +110,7 @@ public: * Tries to change the password of the passed user * if it fails returns false otherwise true **/ - bool changePassword(const SambaUser &, const QString & password); + bool changePassword(const SambaUser &, const TQString & password); bool enableUser(const SambaUser &); @@ -120,7 +120,7 @@ public: bool setMachineTrustAccount(const SambaUser &); - bool joinADomain(const QString &, const QString &, const QString &, const QString &); + bool joinADomain(const TQString &, const TQString &, const TQString &, const TQString &); /** * Returns the Url of the smbpasswd file @@ -132,7 +132,7 @@ public: static KURL getUrlFromSambaFile(const SambaFile *file); protected: KURL _url; - QString _smbpasswdOutput; + TQString _smbpasswdOutput; protected slots: void smbpasswdStdOutReceived(KProcess*,char*,int); diff --git a/filesharing/advanced/kcm_sambaconf/socketoptionsdlg.ui.h b/filesharing/advanced/kcm_sambaconf/socketoptionsdlg.ui.h index 8a8fca3a..d403fec0 100644 --- a/filesharing/advanced/kcm_sambaconf/socketoptionsdlg.ui.h +++ b/filesharing/advanced/kcm_sambaconf/socketoptionsdlg.ui.h @@ -32,7 +32,7 @@ void SocketOptionsDlg::setShare( SambaShare * share ) _share = share; - QString s = _share->getValue("socket options"); + TQString s = _share->getValue("socket options"); s = s.simplifyWhiteSpace(); @@ -59,14 +59,14 @@ SO_RCVLOWATSpin->setValue( getIntValue( s, "SO_RCVLOWAT") ); -bool SocketOptionsDlg::getBoolValue( const QString & str, const QString & name ) +bool SocketOptionsDlg::getBoolValue( const TQString & str, const TQString & name ) { - QString s = str; + TQString s = str; int i = s.find(name ,0,false); if (i > -1) { - s = s.remove(0,i+1+QString(name).length()); + s = s.remove(0,i+1+TQString(name).length()); if ( s.startsWith("=") ) { s = s.remove(0,1); @@ -82,14 +82,14 @@ bool SocketOptionsDlg::getBoolValue( const QString & str, const QString & name ) return false; } -int SocketOptionsDlg::getIntValue( const QString & str, const QString & name ) +int SocketOptionsDlg::getIntValue( const TQString & str, const TQString & name ) { - QString s = str; + TQString s = str; int i = s.find(name ,0,false); if (i > -1) { - s = s.remove(0,i+1+QString(name).length()); + s = s.remove(0,i+1+TQString(name).length()); if ( s.startsWith("=") ) { s = s.remove(0,1); diff --git a/filesharing/advanced/kcm_sambaconf/userselectdlg.ui.h b/filesharing/advanced/kcm_sambaconf/userselectdlg.ui.h index af323fe6..48b07abe 100644 --- a/filesharing/advanced/kcm_sambaconf/userselectdlg.ui.h +++ b/filesharing/advanced/kcm_sambaconf/userselectdlg.ui.h @@ -8,7 +8,7 @@ *****************************************************************************/ -void UserSelectDlg::init(const QStringList & specifiedUsers, SambaShare* share) +void UserSelectDlg::init(const TQStringList & specifiedUsers, SambaShare* share) { SmbPasswdFile passwd( KURL(share->getValue("smb passwd file",true,true)) ); SambaUserList sambaList = passwd.getSambaUserList(); @@ -16,7 +16,7 @@ void UserSelectDlg::init(const QStringList & specifiedUsers, SambaShare* share) for (SambaUser * user = sambaList.first(); user; user = sambaList.next() ) { if (! specifiedUsers.contains(user->name)) - new QListViewItem(userListView, user->name, QString::number(user->uid), QString::number(user->gid)); + new TQListViewItem(userListView, user->name, TQString::number(user->uid), TQString::number(user->gid)); } } @@ -24,7 +24,7 @@ void UserSelectDlg::init(const QStringList & specifiedUsers, SambaShare* share) void UserSelectDlg::accept() { - QListViewItemIterator it( userListView); + TQListViewItemIterator it( userListView); for ( ; it.current(); ++it ) { if ( it.current()->isSelected() ) @@ -33,12 +33,12 @@ void UserSelectDlg::accept() access = accessBtnGrp->id(accessBtnGrp->selected()); - QDialog::accept(); + TQDialog::accept(); } -QStringList UserSelectDlg::getSelectedUsers() +TQStringList UserSelectDlg::getSelectedUsers() { return selectedUsers; } diff --git a/filesharing/advanced/kcm_sambaconf/usertabimpl.cpp b/filesharing/advanced/kcm_sambaconf/usertabimpl.cpp index ac23b47c..724518cf 100644 --- a/filesharing/advanced/kcm_sambaconf/usertabimpl.cpp +++ b/filesharing/advanced/kcm_sambaconf/usertabimpl.cpp @@ -28,14 +28,14 @@ #include // for getuid -#include -#include +#include +#include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -57,7 +57,7 @@ * @pre share is not null * @post _share = share */ -UserTabImpl::UserTabImpl(QWidget* parent, SambaShare* share) +UserTabImpl::UserTabImpl(TQWidget* parent, SambaShare* share) : UserTab(parent) { if (share == 0L) { @@ -88,18 +88,18 @@ void UserTabImpl::load() _share->getValue("invalid users")); } -void UserTabImpl::loadUsers(const QString & validUsersStr, - const QString & readListStr, - const QString & writeListStr, - const QString & adminUsersStr, - const QString & invalidUsersStr) +void UserTabImpl::loadUsers(const TQString & validUsersStr, + const TQString & readListStr, + const TQString & writeListStr, + const TQString & adminUsersStr, + const TQString & invalidUsersStr) { userTable->setNumRows(0); - QStringList validUsers = QStringList::split(QRegExp("[,\\s]+"),validUsersStr); - QStringList readList = QStringList::split(QRegExp("[,\\s]+"),readListStr); - QStringList writeList = QStringList::split(QRegExp("[,\\s]+"),writeListStr); - QStringList adminUsers = QStringList::split(QRegExp("[,\\s]+"),adminUsersStr); - QStringList invalidUsers = QStringList::split(QRegExp("[,\\s]+"),invalidUsersStr); + TQStringList validUsers = TQStringList::split(TQRegExp("[,\\s]+"),validUsersStr); + TQStringList readList = TQStringList::split(TQRegExp("[,\\s]+"),readListStr); + TQStringList writeList = TQStringList::split(TQRegExp("[,\\s]+"),writeListStr); + TQStringList adminUsers = TQStringList::split(TQRegExp("[,\\s]+"),adminUsersStr); + TQStringList invalidUsers = TQStringList::split(TQRegExp("[,\\s]+"),invalidUsersStr); // if the valid users list contains no entries // then all users are allowed, except those that are @@ -124,7 +124,7 @@ void UserTabImpl::loadForceCombos() { forceUserCombo->insertItem(""); forceGroupCombo->insertItem(""); - QStringList unixGroups = getUnixGroups(); + TQStringList unixGroups = getUnixGroups(); forceUserCombo->insertStringList( getUnixUsers() ); forceGroupCombo->insertStringList( unixGroups ); @@ -137,9 +137,9 @@ void UserTabImpl::loadForceCombos() { * Remove all duplicates of the different list, so that * all lists are disjunct. */ -void UserTabImpl::removeDuplicates( QStringList & validUsers, QStringList & readList, - QStringList & writeList, QStringList & adminUsers, - QStringList & invalidUsers) +void UserTabImpl::removeDuplicates( TQStringList & validUsers, TQStringList & readList, + TQStringList & writeList, TQStringList & adminUsers, + TQStringList & invalidUsers) { removeAll(adminUsers, writeList); @@ -159,31 +159,31 @@ void UserTabImpl::removeDuplicates( QStringList & validUsers, QStringList & read /** * Remove all entries of entryList from the fromList */ -void UserTabImpl::removeAll(QStringList & entryList, QStringList & fromList) { - for (QStringList::Iterator it = entryList.begin(); it != entryList.end(); ++it) { +void UserTabImpl::removeAll(TQStringList & entryList, TQStringList & fromList) { + for (TQStringList::Iterator it = entryList.begin(); it != entryList.end(); ++it) { fromList.remove((*it)); } } -void UserTabImpl::addListToUserTable(const QStringList & list, int accessRight) { +void UserTabImpl::addListToUserTable(const TQStringList & list, int accessRight) { - for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { + for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { addUserToUserTable(*it,accessRight); } } -void UserTabImpl::addUserToUserTable(const QString & user, int accessRight) { +void UserTabImpl::addUserToUserTable(const TQString & user, int accessRight) { int row = userTable->numRows(); userTable->setNumRows(row+1); setAllowedUser(row, user); - QComboTableItem* comboItem = static_cast(userTable->item(row,3)); + TQComboTableItem* comboItem = static_cast(userTable->item(row,3)); comboItem->setCurrentItem(accessRight); } -QString UserTabImpl::removeQuotationMarks(const QString & name) { - QString result = name; +TQString UserTabImpl::removeQuotationMarks(const TQString & name) { + TQString result = name; if (name.left(1) == "\"") { result = result.left(result.length()-1); result = result.right(result.length()-1); @@ -191,8 +191,8 @@ QString UserTabImpl::removeQuotationMarks(const QString & name) { return result; } -QString UserTabImpl::removeGroupTag(const QString & name) { - QString result = name; +TQString UserTabImpl::removeGroupTag(const TQString & name) { + TQString result = name; if (nameIsGroup(result)) { @@ -205,8 +205,8 @@ QString UserTabImpl::removeGroupTag(const QString & name) { } -bool UserTabImpl::nameIsGroup(const QString & name) { - QString quoteless = removeQuotationMarks(name); +bool UserTabImpl::nameIsGroup(const TQString & name) { + TQString quoteless = removeQuotationMarks(name); if (quoteless.left(1) == "@" || quoteless.left(1) == "+" || quoteless.left(1) == "&") @@ -216,27 +216,27 @@ bool UserTabImpl::nameIsGroup(const QString & name) { } -void UserTabImpl::setAllowedUser(int i, const QString & name) +void UserTabImpl::setAllowedUser(int i, const TQString & name) { - QStringList accessRights; + TQStringList accessRights; accessRights << i18n("Default") << i18n("Read only") << i18n("Writeable") << i18n("Admin") << i18n("Reject"); - QString uid; - QString gid; + TQString uid; + TQString gid; - QString name2 = name; + TQString name2 = name; if (nameIsGroup(name2)) { - QString name3 = removeGroupTag(name2); + TQString name3 = removeGroupTag(name2); uid = ""; - gid = QString::number(getGroupGID(name3)); + gid = TQString::number(getGroupGID(name3)); _specifiedGroups << name3; } else { - uid = QString::number(getUserUID(name2)); - gid = QString::number(getUserGID(name2)); + uid = TQString::number(getUserUID(name2)); + gid = TQString::number(getUserGID(name2)); _specifiedUsers << name2; } @@ -244,16 +244,16 @@ void UserTabImpl::setAllowedUser(int i, const QString & name) name2 = "\""+name2+"\""; - QTableItem* item = new QTableItem( userTable,QTableItem::Never, name2 ); + TQTableItem* item = new TQTableItem( userTable,TQTableItem::Never, name2 ); userTable->setItem(i,0,item); - item = new QTableItem( userTable,QTableItem::Never, uid ); + item = new TQTableItem( userTable,TQTableItem::Never, uid ); userTable->setItem(i,1,item); - item = new QTableItem( userTable,QTableItem::Never, gid ); + item = new TQTableItem( userTable,TQTableItem::Never, gid ); userTable->setItem(i,2,item); - QComboTableItem* comboItem = new QComboTableItem( userTable,accessRights); + TQComboTableItem* comboItem = new TQComboTableItem( userTable,accessRights); userTable->setItem(i,3,comboItem); } @@ -264,10 +264,10 @@ void UserTabImpl::addUserBtnClicked() UserSelectDlg *dlg = new UserSelectDlg(); dlg->init(_specifiedUsers,_share); - QStringList selectedUsers = dlg->getSelectedUsers(); + TQStringList selectedUsers = dlg->getSelectedUsers(); if (dlg->exec()) { - for (QStringList::Iterator it = selectedUsers.begin(); it != selectedUsers.end(); ++it) + for (TQStringList::Iterator it = selectedUsers.begin(); it != selectedUsers.end(); ++it) { addUserToUserTable(*it,dlg->getAccess()); } @@ -276,8 +276,8 @@ void UserTabImpl::addUserBtnClicked() delete dlg; } else { bool ok; - QString name = KInputDialog::getText(i18n("Add User"),i18n("Name:"), - QString::null,&ok ); + TQString name = KInputDialog::getText(i18n("Add User"),i18n("Name:"), + TQString::null,&ok ); if (ok) addUserToUserTable(name,0); @@ -286,7 +286,7 @@ void UserTabImpl::addUserBtnClicked() void UserTabImpl::removeSelectedBtnClicked() { - QMemArrayrows; + TQMemArrayrows; int j=0; @@ -313,12 +313,12 @@ void UserTabImpl::addGroupBtnClicked() { GroupSelectDlg *dlg = new GroupSelectDlg(); dlg->init(_specifiedGroups); - QStringList selectedGroups = dlg->getSelectedGroups(); + TQStringList selectedGroups = dlg->getSelectedGroups(); if (dlg->exec()) { - for (QStringList::Iterator it = selectedGroups.begin(); it != selectedGroups.end(); ++it) + for (TQStringList::Iterator it = selectedGroups.begin(); it != selectedGroups.end(); ++it) { kdDebug(5009) << "GroupKind: " << dlg->getGroupKind() << endl; - QString name = dlg->getGroupKind() + (*it); + TQString name = dlg->getGroupKind() + (*it); addUserToUserTable(name,dlg->getAccess()); } } @@ -328,11 +328,11 @@ void UserTabImpl::addGroupBtnClicked() void UserTabImpl::expertBtnClicked() { ExpertUserDlg *dlg = new ExpertUserDlg(); - QString validUsersStr; - QString readListStr; - QString writeListStr; - QString adminUsersStr; - QString invalidUsersStr; + TQString validUsersStr; + TQString readListStr; + TQString writeListStr; + TQString adminUsersStr; + TQString invalidUsersStr; saveUsers(validUsersStr,readListStr,writeListStr,adminUsersStr,invalidUsersStr); @@ -356,11 +356,11 @@ void UserTabImpl::expertBtnClicked() { void UserTabImpl::save() { - QString validUsersStr; - QString readListStr; - QString writeListStr; - QString adminUsersStr; - QString invalidUsersStr; + TQString validUsersStr; + TQString readListStr; + TQString writeListStr; + TQString adminUsersStr; + TQString invalidUsersStr; saveUsers(validUsersStr,readListStr,writeListStr,adminUsersStr,invalidUsersStr); @@ -374,24 +374,24 @@ void UserTabImpl::save() _share->setValue("force group",forceGroupCombo->currentText( ) ); } -void UserTabImpl::saveUsers(QString & validUsersStr, - QString & readListStr, - QString & writeListStr, - QString & adminUsersStr, - QString & invalidUsersStr) +void UserTabImpl::saveUsers(TQString & validUsersStr, + TQString & readListStr, + TQString & writeListStr, + TQString & adminUsersStr, + TQString & invalidUsersStr) { - QStringList validUsers; - QStringList writeList; - QStringList readList; - QStringList adminUsers; - QStringList invalidUsers; + TQStringList validUsers; + TQStringList writeList; + TQStringList readList; + TQStringList adminUsers; + TQStringList invalidUsers; bool allowAllUsers = allUnspecifiedUsersCombo->currentItem() == 0; for (int i=0; inumRows(); i++) { - QTableItem* item = userTable->item(i,0); - QComboTableItem* comboItem = static_cast(userTable->item(i,3)); + TQTableItem* item = userTable->item(i,0); + TQComboTableItem* comboItem = static_cast(userTable->item(i,3)); if (! allowAllUsers && comboItem->currentItem() < 4) validUsers.append(item->text()); diff --git a/filesharing/advanced/kcm_sambaconf/usertabimpl.h b/filesharing/advanced/kcm_sambaconf/usertabimpl.h index df8e4a34..408ef853 100644 --- a/filesharing/advanced/kcm_sambaconf/usertabimpl.h +++ b/filesharing/advanced/kcm_sambaconf/usertabimpl.h @@ -31,7 +31,7 @@ #include "usertab.h" #include "common.h" -#include "qstringlist.h" +#include "tqstringlist.h" /** *@author Jan Schäfer @@ -49,41 +49,41 @@ class UserTabImpl : public UserTab { Q_OBJECT public: - UserTabImpl(QWidget* parent, SambaShare* share); + UserTabImpl(TQWidget* parent, SambaShare* share); ~UserTabImpl(); void load(); void save(); private: SambaShare* _share; - QStringList _specifiedUsers; - QStringList _specifiedGroups; + TQStringList _specifiedUsers; + TQStringList _specifiedGroups; - void setAllowedUser(int, const QString &); - void removeDuplicates( QStringList & validUsers, QStringList & readList, - QStringList & writeList, QStringList & adminUsers, - QStringList & invalidUsers); + void setAllowedUser(int, const TQString &); + void removeDuplicates( TQStringList & validUsers, TQStringList & readList, + TQStringList & writeList, TQStringList & adminUsers, + TQStringList & invalidUsers); - void removeAll(QStringList & entryList, QStringList & fromList); - void addListToUserTable(const QStringList & list, int accessRight); + void removeAll(TQStringList & entryList, TQStringList & fromList); + void addListToUserTable(const TQStringList & list, int accessRight); void loadForceCombos(); - void loadUsers(const QString & validUsersStr, - const QString & readListStr, - const QString & writeListStr, - const QString & adminUsersStr, - const QString & invalidUsersStr); + void loadUsers(const TQString & validUsersStr, + const TQString & readListStr, + const TQString & writeListStr, + const TQString & adminUsersStr, + const TQString & invalidUsersStr); - void saveUsers(QString & validUsersStr, - QString & readListStr, - QString & writeListStr, - QString & adminUsersStr, - QString & invalidUsersStr); + void saveUsers(TQString & validUsersStr, + TQString & readListStr, + TQString & writeListStr, + TQString & adminUsersStr, + TQString & invalidUsersStr); - bool nameIsGroup(const QString & name); - QString removeGroupTag(const QString & name); - QString removeQuotationMarks(const QString & name); - void addUserToUserTable(const QString & user, int accessRight); + bool nameIsGroup(const TQString & name); + TQString removeGroupTag(const TQString & name); + TQString removeQuotationMarks(const TQString & name); + void addUserToUserTable(const TQString & user, int accessRight); protected slots: virtual void addUserBtnClicked(); diff --git a/filesharing/advanced/nfs/nfsdialog.cpp b/filesharing/advanced/nfs/nfsdialog.cpp index ecf7a90b..926e3229 100644 --- a/filesharing/advanced/nfs/nfsdialog.cpp +++ b/filesharing/advanced/nfs/nfsdialog.cpp @@ -18,12 +18,12 @@ */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -38,7 +38,7 @@ #include "nfsfile.h" #include "nfsdialoggui.h" -NFSDialog::NFSDialog(QWidget * parent, NFSEntry* entry) +NFSDialog::NFSDialog(TQWidget * parent, NFSEntry* entry) : KDialogBase(Plain, i18n("NFS Options"), Ok|Cancel, Ok, parent), m_nfsEntry(entry), m_modified(false) @@ -59,23 +59,23 @@ NFSDialog::~NFSDialog() } void NFSDialog::initGUI() { - QWidget* page = plainPage(); + TQWidget* page = plainPage(); m_gui = new NFSDialogGUI(page); - QVBoxLayout *layout = new QVBoxLayout( page ); + TQVBoxLayout *layout = new TQVBoxLayout( page ); layout->addWidget( m_gui ); KAccel* accel = new KAccel( m_gui->listView ); - accel->insert( "Delete", Qt::Key_Delete, this, SLOT(slotRemoveHost())); + accel->insert( "Delete", Qt::Key_Delete, this, TQT_SLOT(slotRemoveHost())); } void NFSDialog::initSlots() { - connect( m_gui->removeHostBtn, SIGNAL(clicked()), this, SLOT( slotRemoveHost())); - connect( m_gui->addHostBtn, SIGNAL(clicked()), this, SLOT( slotAddHost())); - connect( m_gui->modifyHostBtn, SIGNAL(clicked()), this, SLOT( slotModifyHost())); - connect( m_gui->listView, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT( slotModifyHost())); + connect( m_gui->removeHostBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotRemoveHost())); + connect( m_gui->addHostBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotAddHost())); + connect( m_gui->modifyHostBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotModifyHost())); + connect( m_gui->listView, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT( slotModifyHost())); } @@ -92,17 +92,17 @@ void NFSDialog::initListView() } } -QListViewItem* NFSDialog::createItemFromHost(NFSHost* host) +TQListViewItem* NFSDialog::createItemFromHost(NFSHost* host) { if (!host) return 0; - QListViewItem* item = new QListViewItem(m_gui->listView); + TQListViewItem* item = new TQListViewItem(m_gui->listView); updateItem(item, host); return item; } -void NFSDialog::updateItem(QListViewItem* item, NFSHost* host) +void NFSDialog::updateItem(TQListViewItem* item, NFSHost* host) { item->setText(0,host->name); item->setText(1,host->paramString()); @@ -123,7 +123,7 @@ void NFSDialog::slotAddHost() dlg->exec(); - if (dlg->result()==QDialog::Accepted) { + if (dlg->result()==TQDialog::Accepted) { m_workEntry->addHost(host); createItemFromHost(host); setModified(); @@ -143,13 +143,13 @@ void NFSDialog::slotOk() { void NFSDialog::slotRemoveHost() { - QPtrList items = m_gui->listView->selectedItems(); + TQPtrList items = m_gui->listView->selectedItems(); if (items.count()==0) return; - QListViewItem *item; + TQListViewItem *item; for ( item = items.first(); item; item = items.next() ) { - QString name = item->text(0); + TQString name = item->text(0); m_gui->listView->takeItem(item); NFSHost* host = m_workEntry->getHostByName(name); @@ -169,13 +169,13 @@ void NFSDialog::slotRemoveHost() void NFSDialog::slotModifyHost() { - QPtrList items = m_gui->listView->selectedItems(); + TQPtrList items = m_gui->listView->selectedItems(); if (items.count()==0) return; HostList hostList; - QListViewItem *item; + TQListViewItem *item; for ( item = items.first(); item; item = items.next() ) { NFSHost* host = m_workEntry->getHostByName(item->text(0)); @@ -187,7 +187,7 @@ void NFSDialog::slotModifyHost() } NFSHostDlg *dlg = new NFSHostDlg(this, &hostList, m_workEntry); - if (dlg->exec() == QDialog::Accepted && + if (dlg->exec() == TQDialog::Accepted && dlg->isModified()) { setModified(); diff --git a/filesharing/advanced/nfs/nfsdialog.h b/filesharing/advanced/nfs/nfsdialog.h index 1d6c2b02..571b262b 100644 --- a/filesharing/advanced/nfs/nfsdialog.h +++ b/filesharing/advanced/nfs/nfsdialog.h @@ -32,7 +32,7 @@ class NFSDialog : public KDialogBase { Q_OBJECT public: - NFSDialog(QWidget * parent, NFSEntry* entry); + NFSDialog(TQWidget * parent, NFSEntry* entry); ~NFSDialog(); bool modified(); protected: @@ -41,8 +41,8 @@ protected: NFSDialogGUI* m_gui; bool m_modified; - QListViewItem* createItemFromHost(NFSHost* host); - void updateItem(QListViewItem* item, NFSHost* host); + TQListViewItem* createItemFromHost(NFSHost* host); + void updateItem(TQListViewItem* item, NFSHost* host); void initGUI(); void initListView(); void initSlots(); diff --git a/filesharing/advanced/nfs/nfsentry.cpp b/filesharing/advanced/nfs/nfsentry.cpp index be741d0c..207e0eae 100644 --- a/filesharing/advanced/nfs/nfsentry.cpp +++ b/filesharing/advanced/nfs/nfsentry.cpp @@ -21,11 +21,11 @@ #include "nfsentry.h" -NFSHost::NFSHost(const QString & hostString) +NFSHost::NFSHost(const TQString & hostString) { readonly = true; - QString s = hostString; + TQString s = hostString; int l = s.find('('); int r = s.find(')'); @@ -42,7 +42,7 @@ NFSHost::NFSHost(const QString & hostString) if (l>=0 && r>=0) { - QString params = s.mid(l+1,r-l-1); + TQString params = s.mid(l+1,r-l-1); parseParamsString(params); } @@ -77,7 +77,7 @@ void NFSHost::initParams() } -void NFSHost::parseParamsString(const QString & s) +void NFSHost::parseParamsString(const TQString & s) { if (s.isEmpty()) @@ -85,8 +85,8 @@ void NFSHost::parseParamsString(const QString & s) int i; - QString rest = s; - QString p; + TQString rest = s; + TQString p; do { @@ -106,9 +106,9 @@ void NFSHost::parseParamsString(const QString & s) } -QString NFSHost::paramString() const +TQString NFSHost::paramString() const { - QString s; + TQString s; if (!readonly) s+="rw,"; if (!rootSquash) s+="no_root_squash,"; @@ -125,10 +125,10 @@ QString NFSHost::paramString() const if (!hide) s+="nohide,"; if (anongid!=65534) - s+=QString("anongid=%1,").arg(anongid); + s+=TQString("anongid=%1,").arg(anongid); if (anonuid!=65534) - s+=QString("anonuid=%1,").arg(anonuid); + s+=TQString("anonuid=%1,").arg(anonuid); // get rid of the last ',' s.truncate(s.length()-1); @@ -136,9 +136,9 @@ QString NFSHost::paramString() const return s; } -QString NFSHost::toString() const +TQString NFSHost::toString() const { - QString s = name; + TQString s = name; s+='('; s+=paramString(); @@ -173,9 +173,9 @@ bool NFSHost::isPublic() const { return name == "*"; } -void NFSHost::setParam(const QString & s) +void NFSHost::setParam(const TQString & s) { - QString p = s.lower(); + TQString p = s.lower(); if (p=="ro") { readonly = true; @@ -256,10 +256,10 @@ void NFSHost::setParam(const QString & s) // get anongid or anonuid if (i>-1) { - QString name = p.left(i).lower(); + TQString name = p.left(i).lower(); kdDebug(5009) << name << endl; - QString value = p.mid(i+1); + TQString value = p.mid(i+1); kdDebug(5009) << value << endl; if (name=="anongid") @@ -271,7 +271,7 @@ void NFSHost::setParam(const QString & s) } -NFSEntry::NFSEntry(const QString & path) +NFSEntry::NFSEntry(const TQString & path) { _hosts.setAutoDelete(true); setPath(path); @@ -302,9 +302,9 @@ void NFSEntry::copyFrom(NFSEntry* entry) { } } -QString NFSEntry::toString() const +TQString NFSEntry::toString() const { - QString s = _path.stripWhiteSpace(); + TQString s = _path.stripWhiteSpace(); if (_path.find(' ') > -1) { s = '"'+s+'"'; @@ -338,7 +338,7 @@ void NFSEntry::removeHost(NFSHost * host) _hosts.remove(host); } -NFSHost* NFSEntry::getHostByName(const QString & name) const +NFSHost* NFSEntry::getHostByName(const TQString & name) const { HostIterator it = getHosts(); NFSHost* host; @@ -360,7 +360,7 @@ NFSHost* NFSEntry::getPublicHost() const if (result) return result; - return getHostByName(QString::null); + return getHostByName(TQString::null); } @@ -369,12 +369,12 @@ HostIterator NFSEntry::getHosts() const return HostIterator(_hosts); } -QString NFSEntry::path() const +TQString NFSEntry::path() const { return _path; } -void NFSEntry::setPath(const QString & path) +void NFSEntry::setPath(const TQString & path) { _path = path; } diff --git a/filesharing/advanced/nfs/nfsentry.h b/filesharing/advanced/nfs/nfsentry.h index 42f3c5c5..43071504 100644 --- a/filesharing/advanced/nfs/nfsentry.h +++ b/filesharing/advanced/nfs/nfsentry.h @@ -21,14 +21,14 @@ #define NFSENTRY_H -#include -#include +#include +#include class NFSHost { public: - NFSHost(const QString & hostString); + NFSHost(const TQString & hostString); ~NFSHost(); NFSHost(); @@ -45,55 +45,55 @@ public: int anonuid; int anongid; - QString name; + TQString name; - QString paramString() const; - QString toString() const; + TQString paramString() const; + TQString toString() const; bool isPublic() const; /** returns a copy of this host */ NFSHost* copy() const; protected: - void parseParamsString(const QString &); - void setParam(const QString &); + void parseParamsString(const TQString &); + void setParam(const TQString &); void initParams(); }; -typedef QPtrList HostList; -typedef QPtrListIterator HostIterator; +typedef TQPtrList HostList; +typedef TQPtrListIterator HostIterator; class NFSLine { public: - virtual QString toString() const = 0; + virtual TQString toString() const = 0; }; -typedef QPtrList NFSLineList; -typedef QPtrListIterator NFSLineIterator; +typedef TQPtrList NFSLineList; +typedef TQPtrListIterator NFSLineIterator; class NFSEmptyLine : public NFSLine { public: - virtual QString toString() const { return QString::fromLatin1("\n"); } + virtual TQString toString() const { return TQString::fromLatin1("\n"); } virtual ~NFSEmptyLine() {}; }; class NFSComment : public NFSLine { public: - NFSComment(const QString & s) { comment = s; } + NFSComment(const TQString & s) { comment = s; } virtual ~NFSComment() {}; - QString comment; - virtual QString toString() const { return comment; } + TQString comment; + virtual TQString toString() const { return comment; } }; class NFSEntry : public NFSLine { public: - NFSEntry(const QString & path); + NFSEntry(const TQString & path); virtual ~NFSEntry(); void addHost(NFSHost * host); void removeHost(NFSHost * host); - NFSHost* getHostByName(const QString & name) const; + NFSHost* getHostByName(const TQString & name) const; NFSHost* getPublicHost() const; HostIterator getHosts() const; @@ -107,14 +107,14 @@ public: /** removes all hosts */ void clear(); - QString path() const; - void setPath(const QString &); + TQString path() const; + void setPath(const TQString &); - virtual QString toString() const; + virtual TQString toString() const; protected: HostList _hosts; - QString _path; + TQString _path; }; #endif diff --git a/filesharing/advanced/nfs/nfsfile.cpp b/filesharing/advanced/nfs/nfsfile.cpp index 79fc732e..c61a393c 100644 --- a/filesharing/advanced/nfs/nfsfile.cpp +++ b/filesharing/advanced/nfs/nfsfile.cpp @@ -21,10 +21,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -65,9 +65,9 @@ bool NFSFile::hasEntry(NFSEntry *entry) } -NFSEntry* NFSFile::getEntryByPath(const QString & path) +NFSEntry* NFSFile::getEntryByPath(const TQString & path) { - QString testPath = path.stripWhiteSpace(); + TQString testPath = path.stripWhiteSpace(); if ( testPath[testPath.length()-1] != '/' ) testPath += '/'; @@ -80,7 +80,7 @@ NFSEntry* NFSFile::getEntryByPath(const QString & path) return 0L; } -bool NFSFile::removeEntryByPath(const QString & path) { +bool NFSFile::removeEntryByPath(const TQString & path) { NFSEntry* entry = getEntryByPath(path); if (!entry) return false; @@ -99,7 +99,7 @@ EntryIterator NFSFile::getEntries() bool NFSFile::load() { - QFile f(_url.path()); + TQFile f(_url.path()); if ( !f.open(IO_ReadOnly) ) { kdError() << "NFSFile::load: Could not open " << _url.path() << endl; @@ -109,14 +109,14 @@ bool NFSFile::load() _entries.clear(); _lines.clear(); - QTextStream s( &f ); + TQTextStream s( &f ); bool continuedLine = false; // is true if the line before ended with a backslash - QString completeLine; + TQString completeLine; while ( !s.eof() ) { - QString currentLine = s.readLine().stripWhiteSpace(); + TQString currentLine = s.readLine().stripWhiteSpace(); if (continuedLine) { completeLine += currentLine; @@ -146,8 +146,8 @@ bool NFSFile::load() continue; } - QString path; - QString hosts; + TQString path; + TQString hosts; // Handle quotation marks if ( completeLine[0] == '"' ) { @@ -179,13 +179,13 @@ bool NFSFile::load() kdDebug(5009) << "KNFSShare: Found path: '" << path << "'" << endl; NFSEntry *entry = new NFSEntry(path); - QStringList hostList = QStringList::split(' ', hosts); + TQStringList hostList = TQStringList::split(' ', hosts); if (hostList.isEmpty()) { NFSHost* host = new NFSHost("*"); entry->addHost(host); } else { - QStringList::iterator it; + TQStringList::iterator it; for ( it = hostList.begin(); it != hostList.end(); ++it ) { NFSHost* host = new NFSHost((*it).stripWhiteSpace()); entry->addHost(host); @@ -205,8 +205,8 @@ bool NFSFile::load() } -void NFSFile::saveTo(QTextStream * stream) { - QPtrListIterator it(_lines); +void NFSFile::saveTo(TQTextStream * stream) { + TQPtrListIterator it(_lines); NFSLine *line; while ( (line = it.current()) != 0 ) { @@ -215,12 +215,12 @@ void NFSFile::saveTo(QTextStream * stream) { } } -bool NFSFile::saveTo(const QString& fileName) { - QFile file(fileName); +bool NFSFile::saveTo(const TQString& fileName) { + TQFile file(fileName); if (!file.open(IO_WriteOnly)) return false; - QTextStream stream(&file); + TQTextStream stream(&file); saveTo(&stream); file.close(); return true; @@ -228,7 +228,7 @@ bool NFSFile::saveTo(const QString& fileName) { bool NFSFile::save() { - if (QFileInfo(_url.path()).isWritable() ) { + if (TQFileInfo(_url.path()).isWritable() ) { saveTo(_url.path()); } else { @@ -240,14 +240,14 @@ bool NFSFile::save() KProcIO proc; - QString command = QString("cp %1 %2") + TQString command = TQString("cp %1 %2") .arg(KProcess::quote( tempFile.name() )) .arg(KProcess::quote( _url.path() )); if (restartNFSServer) command +=";exportfs -ra"; - if (!QFileInfo(_url.path()).isWritable() ) + if (!TQFileInfo(_url.path()).isWritable() ) proc<<"kdesu" << "-d" << "-c"< #include "nfsentry.h" -typedef QPtrList EntryList; -typedef QPtrListIterator EntryIterator; +typedef TQPtrList EntryList; +typedef TQPtrListIterator EntryIterator; class QTextStream; @@ -37,13 +37,13 @@ public: void addEntry(NFSEntry *); void removeEntry(NFSEntry *); bool hasEntry(NFSEntry *); - NFSEntry* getEntryByPath(const QString &); - bool removeEntryByPath(const QString &); + NFSEntry* getEntryByPath(const TQString &); + bool removeEntryByPath(const TQString &); EntryIterator getEntries(); bool save(); - bool saveTo(const QString& fileName); - void saveTo(QTextStream * stream); + bool saveTo(const TQString& fileName); + void saveTo(TQTextStream * stream); bool load(); bool restartNFSServer; diff --git a/filesharing/advanced/nfs/nfshostdlg.cpp b/filesharing/advanced/nfs/nfshostdlg.cpp index 073170d6..b2205f25 100644 --- a/filesharing/advanced/nfs/nfshostdlg.cpp +++ b/filesharing/advanced/nfs/nfshostdlg.cpp @@ -15,11 +15,11 @@ * * ***************************************************************************/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -32,19 +32,19 @@ #include "nfsentry.h" -NFSHostDlg::NFSHostDlg(QWidget* parent, HostList* hosts, NFSEntry* entry) +NFSHostDlg::NFSHostDlg(TQWidget* parent, HostList* hosts, NFSEntry* entry) : KDialogBase(Plain, i18n("Host Properties"), Ok|Cancel, Ok, parent), m_hosts(hosts), m_nfsEntry(entry), m_modified(false) { - QWidget* page = plainPage(); + TQWidget* page = plainPage(); m_gui = new HostProps(page); - QVBoxLayout *layout = new QVBoxLayout( page, 0, 6 ); + TQVBoxLayout *layout = new TQVBoxLayout( page, 0, 6 ); layout->addWidget( m_gui ); - connect( m_gui, SIGNAL(modified()), this, SLOT(setModified())); + connect( m_gui, TQT_SIGNAL(modified()), this, TQT_SLOT(setModified())); init(); @@ -96,11 +96,11 @@ void NFSHostDlg::setHostValues(NFSHost* host) { setCheckBoxValue(m_gui->syncChk, host->sync); setCheckBoxValue(m_gui->wdelayChk, ! host->wdelay); - setEditValue(m_gui->anonuidEdit,QString::number(host->anonuid)); - setEditValue(m_gui->anongidEdit,QString::number(host->anongid)); + setEditValue(m_gui->anonuidEdit,TQString::number(host->anonuid)); + setEditValue(m_gui->anongidEdit,TQString::number(host->anongid)); } -void NFSHostDlg::setEditValue(QLineEdit* edit, const QString & value) { +void NFSHostDlg::setEditValue(TQLineEdit* edit, const TQString & value) { if (edit->text().isEmpty()) return; @@ -108,11 +108,11 @@ void NFSHostDlg::setEditValue(QLineEdit* edit, const QString & value) { edit->setText(value); else if (edit->text() != value) - edit->setText(QString::null); + edit->setText(TQString::null); } -void NFSHostDlg::setCheckBoxValue(QCheckBox* chk, bool value) { - if (chk->state() == QButton::NoChange) +void NFSHostDlg::setCheckBoxValue(TQCheckBox* chk, bool value) { + if (chk->state() == TQButton::NoChange) return; if (chk->isChecked()) { @@ -153,7 +153,7 @@ bool NFSHostDlg::saveName(NFSHost* host) { } host->name="*"; } else { - QString name = m_gui->nameEdit->text().stripWhiteSpace(); + TQString name = m_gui->nameEdit->text().stripWhiteSpace(); if (name.isEmpty()) { KMessageBox::sorry(this, i18n("Please enter a hostname or an IP address.").arg(name), @@ -192,15 +192,15 @@ void NFSHostDlg::saveValues(NFSHost* host) { saveEditValue(host->anongid,m_gui->anongidEdit); } -void NFSHostDlg::saveEditValue(int & value, QLineEdit* edit) { +void NFSHostDlg::saveEditValue(int & value, TQLineEdit* edit) { if ( edit->text().isEmpty()) return; value = edit->text().toInt(); } -void NFSHostDlg::saveCheckBoxValue(bool & value, QCheckBox* chk, bool neg) { - if (chk->state() == QButton::NoChange) +void NFSHostDlg::saveCheckBoxValue(bool & value, TQCheckBox* chk, bool neg) { + if (chk->state() == TQButton::NoChange) return; if (neg) diff --git a/filesharing/advanced/nfs/nfshostdlg.h b/filesharing/advanced/nfs/nfshostdlg.h index 6580b2bd..9d1989e9 100644 --- a/filesharing/advanced/nfs/nfshostdlg.h +++ b/filesharing/advanced/nfs/nfshostdlg.h @@ -32,7 +32,7 @@ class NFSHostDlg : public KDialogBase { Q_OBJECT public: - NFSHostDlg(QWidget* parent, HostList* hosts, NFSEntry* entry); + NFSHostDlg(TQWidget* parent, HostList* hosts, NFSEntry* entry); virtual ~NFSHostDlg(); bool isModified(); protected: @@ -48,12 +48,12 @@ protected slots: private: void setHostValues(NFSHost* host); - void setEditValue(QLineEdit* edit, const QString & value); - void setCheckBoxValue(QCheckBox* chk, bool value); + void setEditValue(TQLineEdit* edit, const TQString & value); + void setCheckBoxValue(TQCheckBox* chk, bool value); bool saveName(NFSHost* host); void saveValues(NFSHost* host); - void saveEditValue(int & value, QLineEdit* edit); - void saveCheckBoxValue(bool & value, QCheckBox* chk, bool neg); + void saveEditValue(int & value, TQLineEdit* edit); + void saveCheckBoxValue(bool & value, TQCheckBox* chk, bool neg); }; #endif diff --git a/filesharing/advanced/propsdlgplugin/propertiespage.cpp b/filesharing/advanced/propsdlgplugin/propertiespage.cpp index 52d772d7..d0f23a07 100644 --- a/filesharing/advanced/propsdlgplugin/propertiespage.cpp +++ b/filesharing/advanced/propsdlgplugin/propertiespage.cpp @@ -17,13 +17,13 @@ */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include +#include #include #include @@ -52,7 +52,7 @@ #define FILESHARE_DEBUG 5009 -PropertiesPage::PropertiesPage(QWidget* parent, KFileItemList items,bool enterUrl) +PropertiesPage::PropertiesPage(TQWidget* parent, KFileItemList items,bool enterUrl) : PropertiesPageGUI(parent), m_enterUrl(enterUrl), m_items(items), @@ -78,8 +78,8 @@ PropertiesPage::PropertiesPage(QWidget* parent, KFileItemList items,bool enterUr KFile::ExistingOnly | KFile::LocalOnly ); urlRq->setURL(m_path); - connect( urlRq, SIGNAL(textChanged(const QString&)), - this, SLOT(urlRqTextChanged(const QString&))); + connect( urlRq, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(urlRqTextChanged(const TQString&))); } else { urlRq->hide(); folderLbl->hide(); @@ -90,7 +90,7 @@ PropertiesPage::PropertiesPage(QWidget* parent, KFileItemList items,bool enterUr enableNFS(false,i18n("Reading NFS configuration file ...")); - //QTimer::singleShot(1, this, SLOT(load)); + //TQTimer::singleShot(1, this, TQT_SLOT(load)); load(); } @@ -100,13 +100,13 @@ PropertiesPage::~PropertiesPage() delete m_sambaFile; } -void PropertiesPage::urlRqTextChanged(const QString&) { +void PropertiesPage::urlRqTextChanged(const TQString&) { if (!m_enterUrl) return; KURL url(urlRq->url()); if (url.isLocalFile()) { - QFileInfo info(url.path(1)); + TQFileInfo info(url.path(1)); if (info.exists() && info.isDir()) { @@ -134,18 +134,18 @@ void PropertiesPage::load() { m_loaded = true; } -void PropertiesPage::enableNFS(bool b, const QString & message) { +void PropertiesPage::enableNFS(bool b, const TQString & message) { nfsChk->setEnabled(b); nfsGrp->setEnabled(b); - QToolTip::add(nfsChk,message); - QToolTip::add(nfsGrp,message); + TQToolTip::add(nfsChk,message); + TQToolTip::add(nfsGrp,message); } -void PropertiesPage::enableSamba(bool b, const QString & message) { +void PropertiesPage::enableSamba(bool b, const TQString & message) { sambaChk->setEnabled(b); sambaGrp->setEnabled(b); - QToolTip::add(sambaChk,message); - QToolTip::add(sambaGrp,message); + TQToolTip::add(sambaChk,message); + TQToolTip::add(sambaGrp,message); } @@ -171,11 +171,11 @@ bool PropertiesPage::save() { bool PropertiesPage::save(NFSFile* nfsFile, SambaFile* sambaFile, bool nfs, bool samba) { - QString nfsFileName = KNFSShare::instance()->exportsPath(); + TQString nfsFileName = KNFSShare::instance()->exportsPath(); bool nfsNeedsKDEsu = false; if (nfs) { - if (QFileInfo(nfsFileName).isWritable()) { + if (TQFileInfo(nfsFileName).isWritable()) { nfsFile->saveTo(nfsFileName); } else { nfsNeedsKDEsu = true; @@ -185,10 +185,10 @@ bool PropertiesPage::save(NFSFile* nfsFile, SambaFile* sambaFile, bool nfs, bool kdDebug(FILESHARE_DEBUG) << "PropertiesPage::save: nfs has not changed." << endl; - QString sambaFileName = KSambaShare::instance()->smbConfPath(); + TQString sambaFileName = KSambaShare::instance()->smbConfPath(); bool sambaNeedsKDEsu = false; if (samba) { - if (QFileInfo(sambaFileName).isWritable()) { + if (TQFileInfo(sambaFileName).isWritable()) { sambaFile->saveTo(sambaFileName); } else { sambaNeedsKDEsu = true; @@ -206,18 +206,18 @@ bool PropertiesPage::save(NFSFile* nfsFile, SambaFile* sambaFile, bool nfs, bool KProcIO proc; - QString command; + TQString command; if (nfsNeedsKDEsu) { nfsFile->saveTo(nfsTempFile.name()); - command += QString("cp %1 %2;exportfs -ra;") + command += TQString("cp %1 %2;exportfs -ra;") .arg(KProcess::quote( nfsTempFile.name() )) .arg(KProcess::quote( nfsFileName )); } if (sambaNeedsKDEsu) { sambaFile->saveTo(sambaTempFile.name()); - command += QString("cp %1 %2;") + command += TQString("cp %1 %2;") .arg(KProcess::quote( sambaTempFile.name() )) .arg(KProcess::quote( sambaFileName )); } @@ -272,7 +272,7 @@ bool PropertiesPage::checkURL() { kdDebug(FILESHARE_DEBUG) << "PropertiesPage::checkURL: enterUrl=true" << endl; KURL url(urlRq->url()); - QString path = url.path(1); + TQString path = url.path(1); kdDebug(FILESHARE_DEBUG) << "PropertiesPage::checkURL: m_path='" << m_path << "'" << endl; @@ -306,7 +306,7 @@ bool PropertiesPage::checkURL() { kdDebug(FILESHARE_DEBUG) << "PropertiesPage::checkURL: url is local file" << endl; - QFileInfo info(path); + TQFileInfo info(path); if (!info.exists()) { @@ -425,7 +425,7 @@ void PropertiesPage::updateNFSEntry() { void PropertiesPage::moreNFSBtn_clicked() { updateNFSEntry(); NFSDialog* dlg = new NFSDialog(this,m_nfsEntry); - if (dlg->exec()==QDialog::Accepted && + if (dlg->exec()==TQDialog::Accepted && dlg->modified()) { kdDebug(FILESHARE_DEBUG) << "NFSDialog::ok" << endl; @@ -450,7 +450,7 @@ bool PropertiesPage::loadSamba() { } enableSamba(true,""); - QString shareName = m_sambaFile->findShareByPath(m_path); + TQString shareName = m_sambaFile->findShareByPath(m_path); if (shareName.isNull()) { sambaChk->setChecked(false); kdDebug(FILESHARE_DEBUG) << "PropertiesPage::loadSamba: shareName is null!" @@ -552,8 +552,8 @@ bool PropertiesPage::updateSambaShare() { return true; } -void PropertiesPage::setSambaShareBoolValue(const QString & value, - QCheckBox* chk) +void PropertiesPage::setSambaShareBoolValue(const TQString & value, + TQCheckBox* chk) { bool v = m_sambaShare->getBoolValue(value); if (v == chk->isChecked()) @@ -563,13 +563,13 @@ void PropertiesPage::setSambaShareBoolValue(const QString & value, m_sambaChanged = true; } -QString PropertiesPage::getNewSambaName() { - QString path = m_path; +TQString PropertiesPage::getNewSambaName() { + TQString path = m_path; if (path.isNull() && m_enterUrl) { path = urlRq->url(); } - QString shareName = KURL(path).fileName(); + TQString shareName = KURL(path).fileName(); if (!sambaNameEdit->text().isEmpty()) shareName = sambaNameEdit->text(); @@ -599,7 +599,7 @@ void PropertiesPage::moreSambaBtnClicked() { ShareDlgImpl* dlg = new ShareDlgImpl(this,m_sambaShare); dlg->directoryGrp->hide(); dlg->pixmapFrame->hide(); - if (dlg->exec() == QDialog::Accepted && + if (dlg->exec() == TQDialog::Accepted && dlg->hasChanged()) { m_sambaChanged = true; changedSlot(); diff --git a/filesharing/advanced/propsdlgplugin/propertiespage.h b/filesharing/advanced/propsdlgplugin/propertiespage.h index 832518c7..f03de5c1 100644 --- a/filesharing/advanced/propsdlgplugin/propertiespage.h +++ b/filesharing/advanced/propsdlgplugin/propertiespage.h @@ -33,7 +33,7 @@ class PropertiesPage : public PropertiesPageGUI { Q_OBJECT public: - PropertiesPage(QWidget* parent, KFileItemList items, bool enterUrl=false); + PropertiesPage(TQWidget* parent, KFileItemList items, bool enterUrl=false); virtual ~PropertiesPage(); bool save(); @@ -45,7 +45,7 @@ public slots: protected: bool m_enterUrl; - QString m_path; + TQString m_path; KFileItemList m_items; NFSFile *m_nfsFile; NFSEntry *m_nfsEntry; @@ -61,7 +61,7 @@ protected slots: virtual void moreNFSBtn_clicked(); virtual void moreSambaBtnClicked(); virtual void sambaChkToggled( bool b ); - virtual void urlRqTextChanged(const QString&); + virtual void urlRqTextChanged(const TQString&); private: bool loadNFS(); @@ -75,12 +75,12 @@ private: bool saveSamba(); bool checkURL(); - void setSambaShareBoolValue(const QString & value, QCheckBox* chk); + void setSambaShareBoolValue(const TQString & value, TQCheckBox* chk); void createNewSambaShare(); - QString getNewSambaName(); + TQString getNewSambaName(); - void enableNFS(bool b,const QString & message); - void enableSamba(bool b,const QString & message); + void enableNFS(bool b,const TQString & message); + void enableSamba(bool b,const TQString & message); }; diff --git a/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp b/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp index b5a2ef26..fafb4ece 100644 --- a/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp +++ b/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.cpp @@ -16,10 +16,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -46,7 +46,7 @@ class PropsDlgSharePlugin::Private }; PropsDlgSharePlugin::PropsDlgSharePlugin( KPropertiesDialog *dlg, - const char *, const QStringList & ) + const char *, const TQStringList & ) : KPropsDlgPlugin(dlg), d(0) { KGlobal::locale()->insertCatalogue("kfileshare"); @@ -57,30 +57,30 @@ PropsDlgSharePlugin::PropsDlgSharePlugin( KPropertiesDialog *dlg, } - QVBox* vbox = properties->addVBoxPage(i18n("&Share")); + TQVBox* vbox = properties->addVBoxPage(i18n("&Share")); properties->setFileSharingPage(vbox); if (KFileShare::authorization() == KFileShare::UserNotAllowed) { - QWidget* widget = new QWidget( vbox ); - QVBoxLayout * vLayout = new QVBoxLayout( widget ); + TQWidget* widget = new TQWidget( vbox ); + TQVBoxLayout * vLayout = new TQVBoxLayout( widget ); vLayout->setSpacing( KDialog::spacingHint() ); vLayout->setMargin( 0 ); if (KFileShare::sharingEnabled()) { vLayout->addWidget( - new QLabel( i18n("You need to be authorized to share directories."), + new TQLabel( i18n("You need to be authorized to share directories."), widget )); } else { vLayout->addWidget( - new QLabel( i18n("File sharing is disabled."), widget)); + new TQLabel( i18n("File sharing is disabled."), widget)); } KPushButton* btn = new KPushButton( i18n("Configure File Sharing..."), widget ); - connect( btn, SIGNAL( clicked() ), SLOT( slotConfigureFileSharing() ) ); + connect( btn, TQT_SIGNAL( clicked() ), TQT_SLOT( slotConfigureFileSharing() ) ); btn->setDefault(false); - QHBoxLayout* hBox = new QHBoxLayout( (QWidget *)0L ); + TQHBoxLayout* hBox = new TQHBoxLayout( (TQWidget *)0L ); hBox->addWidget( btn, 0, Qt::AlignLeft ); vLayout->addLayout(hBox); vLayout->addStretch( 10 ); // align items on top @@ -91,8 +91,8 @@ PropsDlgSharePlugin::PropsDlgSharePlugin( KPropertiesDialog *dlg, d = new Private(); d->page = new PropertiesPage(vbox, properties->items(),false); - connect(d->page, SIGNAL(changed()), - this, SIGNAL(changed())); + connect(d->page, TQT_SIGNAL(changed()), + this, TQT_SIGNAL(changed())); kdDebug(5009) << "Fileshare properties dialog plugin loaded" << endl; diff --git a/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h b/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h index 4604467e..56556dae 100644 --- a/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h +++ b/filesharing/advanced/propsdlgplugin/propsdlgshareplugin.h @@ -26,7 +26,7 @@ class PropsDlgSharePlugin : public KPropsDlgPlugin { Q_OBJECT public: - PropsDlgSharePlugin( KPropertiesDialog *dlg, const char *, const QStringList & ); + PropsDlgSharePlugin( KPropertiesDialog *dlg, const char *, const TQStringList & ); virtual ~PropsDlgSharePlugin(); virtual void applyChanges(); diff --git a/filesharing/simple/fileshare.cpp b/filesharing/simple/fileshare.cpp index 6572ef1a..5b796823 100644 --- a/filesharing/simple/fileshare.cpp +++ b/filesharing/simple/fileshare.cpp @@ -16,15 +16,15 @@ */ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -53,41 +53,41 @@ #include "fileshare.h" #include "groupconfigdlg.h" -typedef KGenericFactory ShareFactory; +typedef KGenericFactory ShareFactory; K_EXPORT_COMPONENT_FACTORY (kcm_fileshare, ShareFactory("kcmfileshare") ) #define FILESHARECONF "/etc/security/fileshare.conf" #define FILESHARE_DEBUG 5009 -KFileShareConfig::KFileShareConfig(QWidget *parent, const char *name, const QStringList &): +KFileShareConfig::KFileShareConfig(TQWidget *parent, const char *name, const TQStringList &): KCModule(ShareFactory::instance(), parent, name) { KGlobal::locale()->insertCatalogue("kfileshare"); - QBoxLayout* layout = new QVBoxLayout(this,0, + TQBoxLayout* layout = new TQVBoxLayout(this,0, KDialog::spacingHint()); /* - QVButtonGroup *box = new QVButtonGroup( i18n("File Sharing"), this ); + TQVButtonGroup *box = new TQVButtonGroup( i18n("File Sharing"), this ); box->layout()->setSpacing( KDialog::spacingHint() ); layout->addWidget(box); - noSharing=new QRadioButton( i18n("Do ¬ allow users to share files"), box ); - sharing=new QRadioButton( i18n("&Allow users to share files from their HOME folder"), box); + noSharing=new TQRadioButton( i18n("Do ¬ allow users to share files"), box ); + sharing=new TQRadioButton( i18n("&Allow users to share files from their HOME folder"), box); */ m_ccgui = new ControlCenterGUI(this); - connect( m_ccgui, SIGNAL( changed()), this, SLOT(configChanged())); - connect( m_ccgui->allowedUsersBtn, SIGNAL( clicked()), - this, SLOT(allowedUsersBtnClicked())); + connect( m_ccgui, TQT_SIGNAL( changed()), this, TQT_SLOT(configChanged())); + connect( m_ccgui->allowedUsersBtn, TQT_SIGNAL( clicked()), + this, TQT_SLOT(allowedUsersBtnClicked())); - QString path = QString::fromLocal8Bit( getenv( "PATH" ) ); - path += QString::fromLatin1(":/usr/sbin"); - QString sambaExec = KStandardDirs::findExe( QString::fromLatin1("smbd"), path ); - QString nfsExec = KStandardDirs::findExe( QString::fromLatin1("rpc.nfsd"), path ); + TQString path = TQString::fromLocal8Bit( getenv( "PATH" ) ); + path += TQString::fromLatin1(":/usr/sbin"); + TQString sambaExec = KStandardDirs::findExe( TQString::fromLatin1("smbd"), path ); + TQString nfsExec = KStandardDirs::findExe( TQString::fromLatin1("rpc.nfsd"), path ); if ( nfsExec.isEmpty() && sambaExec.isEmpty()) { - QMessageBox::critical( 0, "File Sharing", QString("SMB and NFS servers are not installed on this machine, to enable this module the servers must be installed.")); + TQMessageBox::critical( 0, "File Sharing", TQString("SMB and NFS servers are not installed on this machine, to enable this module the servers must be installed.")); m_ccgui->shareGrp->setDisabled(true); m_ccgui->sharedFoldersGroupBox->setDisabled(true); } @@ -96,22 +96,22 @@ KFileShareConfig::KFileShareConfig(QWidget *parent, const char *name, const QStr if (nfsExec.isEmpty()) { m_ccgui->nfsChk->setDisabled(true); m_ccgui->nfsChk->setChecked(false); - QToolTip::add(m_ccgui->nfsChk,i18n("No NFS server installed on this system")); + TQToolTip::add(m_ccgui->nfsChk,i18n("No NFS server installed on this system")); } if (sambaExec.isEmpty()) { m_ccgui->sambaChk->setDisabled(true); m_ccgui->sambaChk->setChecked(false); - QToolTip::add(m_ccgui->sambaChk,i18n("No Samba server installed on this system")); + TQToolTip::add(m_ccgui->sambaChk,i18n("No Samba server installed on this system")); } m_ccgui->infoLbl->hide(); layout->addWidget(m_ccgui); updateShareListView(); - connect( KNFSShare::instance(), SIGNAL( changed()), - this, SLOT(updateShareListView())); - connect( KSambaShare::instance(), SIGNAL( changed()), - this, SLOT(updateShareListView())); + connect( KNFSShare::instance(), TQT_SIGNAL( changed()), + this, TQT_SLOT(updateShareListView())); + connect( KSambaShare::instance(), TQT_SIGNAL( changed()), + this, TQT_SLOT(updateShareListView())); } @@ -120,13 +120,13 @@ KFileShareConfig::KFileShareConfig(QWidget *parent, const char *name, const QStr ((KFileShare::shareMode() == KFileShare::Advanced) && (KFileShare::authorization() == KFileShare::Authorized))) { - connect( m_ccgui->addShareBtn, SIGNAL(clicked()), - this, SLOT(addShareBtnClicked())); - connect( m_ccgui->changeShareBtn, SIGNAL(clicked()), - this, SLOT(changeShareBtnClicked())); - connect( m_ccgui->removeShareBtn, SIGNAL(clicked()), - this, SLOT(removeShareBtnClicked())); - m_ccgui->listView->setSelectionMode(QListView::Extended); + connect( m_ccgui->addShareBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT(addShareBtnClicked())); + connect( m_ccgui->changeShareBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT(changeShareBtnClicked())); + connect( m_ccgui->removeShareBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT(removeShareBtnClicked())); + m_ccgui->listView->setSelectionMode(TQListView::Extended); m_ccgui->shareBtnPnl->setEnabled(true); } @@ -147,10 +147,10 @@ void KFileShareConfig::updateShareListView() KNFSShare* nfs = KNFSShare::instance(); KSambaShare* samba = KSambaShare::instance(); - QStringList dirs = nfs->sharedDirectories(); - QStringList sambaDirs = samba->sharedDirectories(); + TQStringList dirs = nfs->sharedDirectories(); + TQStringList sambaDirs = samba->sharedDirectories(); - for ( QStringList::ConstIterator it = sambaDirs.begin(); it != sambaDirs.end(); ++it ) { + for ( TQStringList::ConstIterator it = sambaDirs.begin(); it != sambaDirs.end(); ++it ) { // Do not insert duplicates if (nfs->isDirectoryShared(*it)) continue; @@ -158,11 +158,11 @@ void KFileShareConfig::updateShareListView() dirs += *it; } - QPixmap folderPix = SmallIcon("folder",0,KIcon::ShareOverlay); - QPixmap okPix = SmallIcon("button_ok"); - QPixmap cancelPix = SmallIcon("button_cancel"); + TQPixmap folderPix = SmallIcon("folder",0,KIcon::ShareOverlay); + TQPixmap okPix = SmallIcon("button_ok"); + TQPixmap cancelPix = SmallIcon("button_cancel"); - for ( QStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it ) { + for ( TQStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it ) { KListViewItem* item = new KListViewItem(m_ccgui->listView); item->setText(0,*it); item->setPixmap(0, folderPix); @@ -184,7 +184,7 @@ void KFileShareConfig::updateShareListView() void KFileShareConfig::allowedUsersBtnClicked() { GroupConfigDlg dlg(this,m_fileShareGroup,m_restricted,m_rootPassNeeded, m_ccgui->simpleRadio->isChecked()); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { m_fileShareGroup = dlg.fileShareGroup().name(); m_restricted = dlg.restricted(); m_rootPassNeeded = dlg.rootPassNeeded(); @@ -196,7 +196,7 @@ void KFileShareConfig::allowedUsersBtnClicked() { void KFileShareConfig::load() { - KSimpleConfig config(QString::fromLatin1(FILESHARECONF),true); + KSimpleConfig config(TQString::fromLatin1(FILESHARECONF),true); m_ccgui->shareGrp->setChecked( config.readEntry("FILESHARING", "yes") == "yes" ); @@ -220,7 +220,7 @@ void KFileShareConfig::load() m_smbConf = KSambaShare::instance()->smbConfPath(); } -bool KFileShareConfig::addGroupAccessesToFile(const QString & file) { +bool KFileShareConfig::addGroupAccessesToFile(const TQString & file) { KProcess chgrp; chgrp << "chgrp" << m_fileShareGroup << file; KProcess chmod; @@ -241,7 +241,7 @@ bool KFileShareConfig::addGroupAccessesToFile(const QString & file) { } -bool KFileShareConfig::removeGroupAccessesFromFile(const QString & file) { +bool KFileShareConfig::removeGroupAccessesFromFile(const TQString & file) { KProcess chgrp; chgrp << "chgrp" << "root" << file; KProcess chmod; @@ -291,11 +291,11 @@ void KFileShareConfig::save() { setGroupAccesses(); - QDir dir("/etc/security"); + TQDir dir("/etc/security"); if ( !dir.exists()) dir.mkdir("/etc/security"); - QFile file(FILESHARECONF); + TQFile file(FILESHARECONF); if ( ! file.open(IO_WriteOnly)) { KMessageBox::detailedError(this, i18n("Could not save settings."), @@ -306,7 +306,7 @@ void KFileShareConfig::save() } - QTextStream stream(&file); + TQTextStream stream(&file); stream << "FILESHARING="; stream << (m_ccgui->shareGrp->isChecked() ? "yes" : "no"); @@ -340,7 +340,7 @@ void KFileShareConfig::defaults() m_ccgui->shareGrp->setChecked( false ); } -QString KFileShareConfig::quickHelp() const +TQString KFileShareConfig::quickHelp() const { return i18n("

File Sharing

This module can be used " "to enable file sharing over the network using " @@ -354,11 +354,11 @@ void KFileShareConfig::addShareBtnClicked() { } -PropertiesPageDlg::PropertiesPageDlg(QWidget*parent, KFileItemList files) +PropertiesPageDlg::PropertiesPageDlg(TQWidget*parent, KFileItemList files) : KDialogBase(parent, "sharedlg", true, i18n("Share Folder"), Ok|Cancel, Ok, true) { - QVBox* vbox = makeVBoxMainWidget(); + TQVBox* vbox = makeVBoxMainWidget(); m_page = new PropertiesPage(vbox,files,true); } @@ -380,7 +380,7 @@ void PropertiesPageDlg::slotOk() { void KFileShareConfig::showShareDialog(const KFileItemList & files) { PropertiesPageDlg* dlg = new PropertiesPageDlg(this,files); - if (dlg->exec() == QDialog::Accepted) { + if (dlg->exec() == TQDialog::Accepted) { if ( dlg->hasChanged() ) { updateShareListView(); } @@ -390,9 +390,9 @@ void KFileShareConfig::showShareDialog(const KFileItemList & files) { void KFileShareConfig::changeShareBtnClicked() { KFileItemList files; - QPtrList items = m_ccgui->listView->selectedItems(); + TQPtrList items = m_ccgui->listView->selectedItems(); - QListViewItem* item; + TQListViewItem* item; for ( item = items.first(); item; item = items.next() ) { files.append(new KFileItem(KURL::fromPathOrURL(item->text(0)),"",0)); } @@ -402,8 +402,8 @@ void KFileShareConfig::changeShareBtnClicked() { void KFileShareConfig::removeShareBtnClicked() { - QPtrList items = m_ccgui->listView->selectedItems(); - QListViewItem *item; + TQPtrList items = m_ccgui->listView->selectedItems(); + TQListViewItem *item; bool nfs = false; bool samba = false; diff --git a/filesharing/simple/fileshare.h b/filesharing/simple/fileshare.h index 1f5da9e7..d6e8719a 100644 --- a/filesharing/simple/fileshare.h +++ b/filesharing/simple/fileshare.h @@ -33,22 +33,22 @@ class KFileShareConfig : public KCModule Q_OBJECT public: - KFileShareConfig(QWidget *parent, const char *name, const QStringList &); + KFileShareConfig(TQWidget *parent, const char *name, const TQStringList &); virtual void load(); virtual void save(); virtual void defaults(); - virtual QString quickHelp() const; + virtual TQString quickHelp() const; protected: ControlCenterGUI* m_ccgui; - QString m_fileShareGroup; + TQString m_fileShareGroup; bool m_restricted; bool m_rootPassNeeded; - QString m_smbConf; + TQString m_smbConf; void showShareDialog(const KFileItemList & files); - bool addGroupAccessesToFile(const QString & file); - bool removeGroupAccessesFromFile(const QString & file); + bool addGroupAccessesToFile(const TQString & file); + bool removeGroupAccessesFromFile(const TQString & file); bool setGroupAccesses(); protected slots: @@ -66,7 +66,7 @@ class PropertiesPageDlg : public KDialogBase { Q_OBJECT public: - PropertiesPageDlg(QWidget * parent, KFileItemList files); + PropertiesPageDlg(TQWidget * parent, KFileItemList files); ~PropertiesPageDlg() {}; bool hasChanged(); protected: diff --git a/filesharing/simple/groupconfigdlg.cpp b/filesharing/simple/groupconfigdlg.cpp index f313719d..470f024f 100644 --- a/filesharing/simple/groupconfigdlg.cpp +++ b/filesharing/simple/groupconfigdlg.cpp @@ -18,13 +18,13 @@ */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -40,16 +40,16 @@ #include "groupconfigdlg.h" -static QString groupListToString(const QValueList & list); -static QString prettyString(const KUser &user); -static QString fromPrettyString(const QString & s); -static void removeList(QValueList & from, const QValueList & that); -static bool userMod(const QString & user, const QValueList & groups); +static TQString groupListToString(const TQValueList & list); +static TQString prettyString(const KUser &user); +static TQString fromPrettyString(const TQString & s); +static void removeList(TQValueList & from, const TQValueList & that); +static bool userMod(const TQString & user, const TQValueList & groups); -GroupConfigDlg::GroupConfigDlg(QWidget * parent, - const QString & fileShareGroup, bool restricted, +GroupConfigDlg::GroupConfigDlg(TQWidget * parent, + const TQString & fileShareGroup, bool restricted, bool rootPassNeeded, bool simpleSharing) : KDialogBase(parent,"groupconfigdlg", true, i18n("Allowed Users"), Ok|Cancel, Ok, true) , @@ -81,12 +81,12 @@ void GroupConfigDlg::initGUI() { m_gui->groupUsersRadio->setChecked(m_restricted); m_gui->writeAccessChk->setChecked(!m_rootPassNeeded); - connect( m_gui->addBtn, SIGNAL(clicked()), - this, SLOT(slotAddUser())); - connect( m_gui->removeBtn, SIGNAL(clicked()), - this, SLOT(slotRemoveUser())); - connect( m_gui->otherGroupBtn, SIGNAL(clicked()), - this, SLOT(slotChangeGroup())); + connect( m_gui->addBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddUser())); + connect( m_gui->removeBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveUser())); + connect( m_gui->otherGroupBtn, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotChangeGroup())); if (m_simpleSharing) { // if simple sharing users never need the root password @@ -96,23 +96,23 @@ void GroupConfigDlg::initGUI() { void GroupConfigDlg::updateListBox() { m_gui->listBox->clear(); - QValueList::iterator it; + TQValueList::iterator it; for ( it = m_users.begin(); it != m_users.end(); ++it ) { m_gui->listBox->insertItem(prettyString(*it)); kdDebug(5009) << "GroupConfigDlg::updateListBox: " << (*it).loginName() << endl; } } -QString prettyString(const KUser &user) { +TQString prettyString(const KUser &user) { return user.fullName()+" ("+user.loginName()+")"; } -QString fromPrettyString(const QString & s) { +TQString fromPrettyString(const TQString & s) { // Jan Schaefer (jan) // i j int i = s.find('('); int j = s.find(')'); - QString loginName = s.mid(i+1,j-i-1); + TQString loginName = s.mid(i+1,j-i-1); return loginName; } @@ -121,7 +121,7 @@ bool GroupConfigDlg::restricted() { } void GroupConfigDlg::slotAddUser() { - QValueList allUsers = KUser::allUsers(); + TQValueList allUsers = KUser::allUsers(); removeList(allUsers,m_users); @@ -132,18 +132,18 @@ void GroupConfigDlg::slotAddUser() { return; } - QStringList stringList; + TQStringList stringList; - QValueList::iterator it; + TQValueList::iterator it; for ( it = allUsers.begin(); it != allUsers.end(); ++it ) { - QString s = (*it).fullName()+" ("+(*it).loginName()+")"; + TQString s = (*it).fullName()+" ("+(*it).loginName()+")"; stringList.append(s); } stringList.sort(); bool ok; - QString userName = KInputDialog::getItem( + TQString userName = KInputDialog::getItem( i18n("Select User"), i18n("Select a user:"), stringList, @@ -154,14 +154,14 @@ void GroupConfigDlg::slotAddUser() { if (!ok) return; - QString loginName = fromPrettyString(userName); + TQString loginName = fromPrettyString(userName); KUser user(loginName); m_users.append(KUser(loginName)); updateListBox(); } -void removeList(QValueList & from, const QValueList & that) { - QValueList::ConstIterator it; +void removeList(TQValueList & from, const TQValueList & that) { + TQValueList::ConstIterator it; for ( it = that.begin(); it != that.end(); ++it ) { from.remove(*it); } @@ -169,7 +169,7 @@ void removeList(QValueList & from, const QValueList & that) { } bool GroupConfigDlg::addUser(const KUser & user, const KUserGroup & group) { - QValueList groups = user.groups(); + TQValueList groups = user.groups(); groups.append(group); if (!userMod(user.loginName(),groups)) { KMessageBox::sorry(this,i18n("Could not add user '%1' to group '%2'") @@ -181,7 +181,7 @@ bool GroupConfigDlg::addUser(const KUser & user, const KUserGroup & group) { bool GroupConfigDlg::removeUser(const KUser & user, const KUserGroup & group) { - QValueList groups = user.groups(); + TQValueList groups = user.groups(); groups.remove(group); if (!userMod(user.loginName(),groups)) { KMessageBox::sorry(this,i18n("Could not remove user '%1' from group '%2'") @@ -203,12 +203,12 @@ void GroupConfigDlg::slotOk() { return; } - QValueList addedUsers = m_users; + TQValueList addedUsers = m_users; removeList(addedUsers,m_origUsers); - QValueList removedUsers = m_origUsers; + TQValueList removedUsers = m_origUsers; removeList(removedUsers,m_users); - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for ( it = addedUsers.begin(); it != addedUsers.end(); ++it ) { addUser(*it, m_fileShareGroup); } @@ -221,27 +221,27 @@ void GroupConfigDlg::slotOk() { KDialogBase::slotOk(); } -bool userMod(const QString & user, const QValueList & groups) { +bool userMod(const TQString & user, const TQValueList & groups) { KProcess proc; proc << "usermod" << "-G" << groupListToString(groups) << user; return proc.start(KProcess::Block) && proc.normalExit(); } void GroupConfigDlg::slotRemoveUser() { - QListBoxItem* item = m_gui->listBox->selectedItem(); + TQListBoxItem* item = m_gui->listBox->selectedItem(); if (!item) return; - QString loginName = fromPrettyString(item->text()); + TQString loginName = fromPrettyString(item->text()); KUser user(loginName); m_users.remove(KUser(loginName)); updateListBox(); m_gui->removeBtn->setEnabled(false); } -QString groupListToString(const QValueList & list) { - QValueList::ConstIterator it; - QString result; +TQString groupListToString(const TQValueList & list) { + TQValueList::ConstIterator it; + TQString result; for ( it = list.begin(); it != list.end(); ++it ) { result+=(*it).name()+","; @@ -253,13 +253,13 @@ QString groupListToString(const QValueList & list) { } void GroupConfigDlg::slotChangeGroup() { - QValueList allGroups = KUserGroup::allGroups(); + TQValueList allGroups = KUserGroup::allGroups(); - QStringList stringList; + TQStringList stringList; - QValueList::iterator it; + TQValueList::iterator it; for ( it = allGroups.begin(); it != allGroups.end(); ++it ) { - QString s = (*it).name(); + TQString s = (*it).name(); stringList.append(s); } @@ -268,31 +268,31 @@ void GroupConfigDlg::slotChangeGroup() { KDialogBase* dlg = new KDialogBase(this,"groupconfigdlg", true, i18n("Allowed Users"), Ok|Cancel, Ok, true); - QVBox* vbox = dlg->makeVBoxMainWidget(); + TQVBox* vbox = dlg->makeVBoxMainWidget(); - QHBox* hbox = new QHBox(vbox); - QLabel* lbl = new QLabel(i18n("New file share group:"),hbox); + TQHBox* hbox = new TQHBox(vbox); + TQLabel* lbl = new TQLabel(i18n("New file share group:"),hbox); KComboBox* combo = new KComboBox(hbox); combo->insertStringList(stringList); combo->setEditable(true); combo->setCurrentText(m_fileShareGroup.name()); - QCheckBox* addChk = new QCheckBox( + TQCheckBox* addChk = new TQCheckBox( i18n("Add users from the old file share group to the new one"), vbox); - QCheckBox* removeUsersChk = new QCheckBox( + TQCheckBox* removeUsersChk = new TQCheckBox( i18n("Remove users from old file share group"), vbox); - QCheckBox* removeGroupChk = new QCheckBox( + TQCheckBox* removeGroupChk = new TQCheckBox( i18n("Delete the old file share group"), vbox); - if (dlg->exec() == QDialog::Accepted) { - QString groupName = combo->currentText(); + if (dlg->exec() == TQDialog::Accepted) { + TQString groupName = combo->currentText(); if (groupName != m_fileShareGroup.name()) { - QString oldGroup = m_fileShareGroup.name(); + TQString oldGroup = m_fileShareGroup.name(); if (allGroups.contains(KUserGroup(groupName))) setFileShareGroup(KUserGroup(groupName)); else { @@ -348,8 +348,8 @@ void GroupConfigDlg::setFileShareGroup(const KUserGroup & group) { } -bool GroupConfigDlg::addUsersToGroup(QValueList users,const KUserGroup & group) { - QValueList::ConstIterator it; +bool GroupConfigDlg::addUsersToGroup(TQValueList users,const KUserGroup & group) { + TQValueList::ConstIterator it; bool result = true; for ( it = users.begin(); it != users.end(); ++it ) { if (!addUser(*it, group)) @@ -358,16 +358,16 @@ bool GroupConfigDlg::addUsersToGroup(QValueList users,const KUserGroup & return result; } -bool GroupConfigDlg::emptyGroup(const QString & s) { +bool GroupConfigDlg::emptyGroup(const TQString & s) { if (KMessageBox::No == KMessageBox::questionYesNo(this, - i18n("Do you really want to remove all users from group '%1'?").arg(s), QString::null, KStdGuiItem::del(), KStdGuiItem::cancel())) { + i18n("Do you really want to remove all users from group '%1'?").arg(s), TQString::null, KStdGuiItem::del(), KStdGuiItem::cancel())) { return false; } - QValueList allUsers = KUser::allUsers(); + TQValueList allUsers = KUser::allUsers(); bool result = true; KUserGroup group(s); - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for ( it = allUsers.begin(); it != allUsers.end(); ++it ) { if (!removeUser(*it, group)) result = false; @@ -375,9 +375,9 @@ bool GroupConfigDlg::emptyGroup(const QString & s) { return result; } -bool GroupConfigDlg::deleteGroup(const QString & s) { +bool GroupConfigDlg::deleteGroup(const TQString & s) { if (KMessageBox::No == KMessageBox::questionYesNo(this, - i18n("Do you really want to delete group '%1'?").arg(s), QString::null, KStdGuiItem::del(), KStdGuiItem::cancel())) { + i18n("Do you really want to delete group '%1'?").arg(s), TQString::null, KStdGuiItem::del(), KStdGuiItem::cancel())) { return false; } @@ -391,14 +391,14 @@ bool GroupConfigDlg::deleteGroup(const QString & s) { return result; } -bool GroupConfigDlg::createFileShareGroup(const QString & s) { +bool GroupConfigDlg::createFileShareGroup(const TQString & s) { if (s.isEmpty()) { KMessageBox::sorry(this,i18n("Please choose a valid group.")); return false; } if (KMessageBox::No == KMessageBox::questionYesNo(this, - i18n("This group '%1' does not exist. Should it be created?").arg(s), QString::null, i18n("Create"), i18n("Do Not Create"))) + i18n("This group '%1' does not exist. Should it be created?").arg(s), TQString::null, i18n("Create"), i18n("Do Not Create"))) return false; //debug("CreateFileShareGroup: "+s); diff --git a/filesharing/simple/groupconfigdlg.h b/filesharing/simple/groupconfigdlg.h index eab24152..1258422c 100644 --- a/filesharing/simple/groupconfigdlg.h +++ b/filesharing/simple/groupconfigdlg.h @@ -21,7 +21,7 @@ #define GROUPCONFIGDLG_H #include -#include +#include #include class GroupConfigGUI; @@ -30,7 +30,7 @@ class GroupConfigDlg : public KDialogBase { Q_OBJECT public: - GroupConfigDlg(QWidget * parent, const QString & fileShareGroup, bool restricted, + GroupConfigDlg(TQWidget * parent, const TQString & fileShareGroup, bool restricted, bool rootPassNeeded, bool simpleSharing); ~GroupConfigDlg(); KUserGroup fileShareGroup() { return m_fileShareGroup; } @@ -49,16 +49,16 @@ protected slots: virtual void slotOk(); private: - bool createFileShareGroup(const QString & s); - bool deleteGroup(const QString & s); - bool emptyGroup(const QString & s); + bool createFileShareGroup(const TQString & s); + bool deleteGroup(const TQString & s); + bool emptyGroup(const TQString & s); bool addUser(const KUser & user, const KUserGroup & group); bool removeUser(const KUser & user, const KUserGroup & group); - bool addUsersToGroup(QValueList users,const KUserGroup & group); + bool addUsersToGroup(TQValueList users,const KUserGroup & group); void setFileShareGroup(const KUserGroup & group); - QValueList m_origUsers; - QValueList m_users; + TQValueList m_origUsers; + TQValueList m_users; KUserGroup m_fileShareGroup; bool m_restricted; bool m_rootPassNeeded; diff --git a/filesharing/simple/groupconfiggui.ui.h b/filesharing/simple/groupconfiggui.ui.h index 35e82f7f..055fd6c3 100644 --- a/filesharing/simple/groupconfiggui.ui.h +++ b/filesharing/simple/groupconfiggui.ui.h @@ -8,7 +8,7 @@ *****************************************************************************/ -void GroupConfigGUI::listBox_selectionChanged( QListBoxItem * i) +void GroupConfigGUI::listBox_selectionChanged( TQListBoxItem * i) { removeBtn->setEnabled(i); } diff --git a/filesharing/simple/krichtextlabel.cpp b/filesharing/simple/krichtextlabel.cpp index 458ade62..089635d7 100644 --- a/filesharing/simple/krichtextlabel.cpp +++ b/filesharing/simple/krichtextlabel.cpp @@ -18,35 +18,35 @@ #include "krichtextlabel.h" -#include -#include -#include +#include +#include +#include #include -static QString qrichtextify( const QString& text ) +static TQString qrichtextify( const TQString& text ) { if ( text.isEmpty() || text[0] == '<' ) return text; - QStringList lines = QStringList::split('\n', text); - for(QStringList::Iterator it = lines.begin(); it != lines.end(); ++it) + TQStringList lines = TQStringList::split('\n', text); + for(TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it) { - *it = QStyleSheet::convertFromPlainText( *it, QStyleSheetItem::WhiteSpaceNormal ); + *it = TQStyleSheet::convertFromPlainText( *it, TQStyleSheetItem::WhiteSpaceNormal ); } - return lines.join(QString::null); + return lines.join(TQString::null); } -KRichTextLabel::KRichTextLabel( const QString &text , QWidget *parent, const char *name ) - : QLabel ( parent, name ) { +KRichTextLabel::KRichTextLabel( const TQString &text , TQWidget *parent, const char *name ) + : TQLabel ( parent, name ) { m_defaultWidth = QMIN(400, KGlobalSettings::desktopGeometry(this).width()*2/5); setAlignment( Qt::WordBreak ); setText(text); } -KRichTextLabel::KRichTextLabel( QWidget *parent, const char *name ) - : QLabel ( parent, name ) { +KRichTextLabel::KRichTextLabel( TQWidget *parent, const char *name ) + : TQLabel ( parent, name ) { m_defaultWidth = QMIN(400, KGlobalSettings::desktopGeometry(this).width()*2/5); setAlignment( Qt::WordBreak ); } @@ -57,17 +57,17 @@ void KRichTextLabel::setDefaultWidth(int defaultWidth) updateGeometry(); } -QSizePolicy KRichTextLabel::sizePolicy() const +TQSizePolicy KRichTextLabel::sizePolicy() const { - return QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum, false); + return TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum, false); } -QSize KRichTextLabel::minimumSizeHint() const +TQSize KRichTextLabel::minimumSizeHint() const { - QString qt_text = qrichtextify( text() ); + TQString qt_text = qrichtextify( text() ); int pref_width = 0; int pref_height = 0; - QSimpleRichText rt(qt_text, font()); + TQSimpleRichText rt(qt_text, font()); pref_width = m_defaultWidth; rt.setWidth(pref_width); int used_width = rt.widthUsed(); @@ -94,16 +94,16 @@ QSize KRichTextLabel::minimumSizeHint() const pref_width = used_width; } - return QSize(pref_width, rt.height()); + return TQSize(pref_width, rt.height()); } -QSize KRichTextLabel::sizeHint() const +TQSize KRichTextLabel::sizeHint() const { return minimumSizeHint(); } -void KRichTextLabel::setText( const QString &text ) { - QLabel::setText(text); +void KRichTextLabel::setText( const TQString &text ) { + TQLabel::setText(text); } void KRichTextLabel::virtual_hook( int, void* ) diff --git a/filesharing/simple/krichtextlabel.h b/filesharing/simple/krichtextlabel.h index e03fe250..40ead037 100644 --- a/filesharing/simple/krichtextlabel.h +++ b/filesharing/simple/krichtextlabel.h @@ -19,12 +19,12 @@ #ifndef KRICHTEXTLABEL_H #define KRICHTEXTLABEL_H -#include +#include #include /** - * @short A replacement for QLabel that supports richtext and proper layout management + * @short A replacement for TQLabel that supports richtext and proper layout management * * @author Waldo Bastian */ @@ -32,25 +32,25 @@ /* * QLabel */ -class KDEUI_EXPORT KRichTextLabel : public QLabel { +class KDEUI_EXPORT KRichTextLabel : public TQLabel { Q_OBJECT public: /** * Default constructor. */ - KRichTextLabel( QWidget *parent, const char *name = 0 ); - KRichTextLabel( const QString &text, QWidget *parent, const char *name = 0 ); + KRichTextLabel( TQWidget *parent, const char *name = 0 ); + KRichTextLabel( const TQString &text, TQWidget *parent, const char *name = 0 ); int defaultWidth() const { return m_defaultWidth; } void setDefaultWidth(int defaultWidth); - virtual QSize minimumSizeHint() const; - virtual QSize sizeHint() const; - QSizePolicy sizePolicy() const; + virtual TQSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + TQSizePolicy sizePolicy() const; public slots: - void setText( const QString & ); + void setText( const TQString & ); protected: int m_defaultWidth; diff --git a/kdict/actions.cpp b/kdict/actions.cpp index 5ca1aade..2496d1b7 100644 --- a/kdict/actions.cpp +++ b/kdict/actions.cpp @@ -17,14 +17,14 @@ #include "actions.h" -#include -#include +#include +#include #include #include -DictComboAction::DictComboAction( const QString &text, QObject *parent, const char *name, +DictComboAction::DictComboAction( const TQString &text, TQObject *parent, const char *name, bool editable, bool autoSized ) : KAction( text, 0, parent, name ), m_editable(editable), m_autoSized(autoSized), m_compMode(KGlobalSettings::completionMode()) { @@ -36,7 +36,7 @@ DictComboAction::~DictComboAction() } -int DictComboAction::plug( QWidget *widget, int index ) +int DictComboAction::plug( TQWidget *widget, int index ) { if ( widget->inherits( "KToolBar" ) ) { @@ -50,15 +50,15 @@ int DictComboAction::plug( QWidget *widget, int index ) bar->setItemAutoSized(id_,m_autoSized); if ( m_combo ) { - connect(bar->getCombo(id_), SIGNAL(activated(const QString&)), SLOT(slotComboActivated(const QString&))); - connect(bar->getCombo(id_), SIGNAL(activated(int)), SLOT(slotComboActivated(int))); + connect(bar->getCombo(id_), TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotComboActivated(const TQString&))); + connect(bar->getCombo(id_), TQT_SIGNAL(activated(int)), TQT_SLOT(slotComboActivated(int))); if (m_editable) - m_combo->setInsertionPolicy( QComboBox::NoInsertion ); + m_combo->setInsertionPolicy( TQComboBox::NoInsertion ); } addContainer( bar, id_ ); - connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); return containerCount() - 1; } @@ -66,7 +66,7 @@ int DictComboAction::plug( QWidget *widget, int index ) } -void DictComboAction::unplug( QWidget *widget ) +void DictComboAction::unplug( TQWidget *widget ) { if ( widget->inherits( "KToolBar" ) ) { @@ -85,7 +85,7 @@ void DictComboAction::unplug( QWidget *widget ) } -QWidget* DictComboAction::widget() +TQWidget* DictComboAction::widget() { return m_combo; } @@ -98,12 +98,12 @@ void DictComboAction::setFocus() } -QString DictComboAction::currentText() const +TQString DictComboAction::currentText() const { if (m_combo) return m_combo->currentText(); else - return QString::null; + return TQString::null; } void DictComboAction::selectAll() @@ -116,7 +116,7 @@ void DictComboAction::selectAll() } -void DictComboAction::setEditText(const QString &s) +void DictComboAction::setEditText(const TQString &s) { if (m_combo && m_editable) m_combo->setEditText(s); @@ -147,7 +147,7 @@ void DictComboAction::clear() } -void DictComboAction::setList(QStringList items) +void DictComboAction::setList(TQStringList items) { if (m_combo) { m_combo->clear(); @@ -184,7 +184,7 @@ void DictComboAction::slotComboActivated(int i) } -void DictComboAction::slotComboActivated(const QString &s) +void DictComboAction::slotComboActivated(const TQString &s) { emit(activated(s)); } @@ -193,7 +193,7 @@ void DictComboAction::slotComboActivated(const QString &s) //********************************************************************************* -DictLabelAction::DictLabelAction( const QString &text, QObject *parent, const char *name ) +DictLabelAction::DictLabelAction( const TQString &text, TQObject *parent, const char *name ) : KAction( text, 0, parent, name ) { } @@ -204,7 +204,7 @@ DictLabelAction::~DictLabelAction() } -int DictLabelAction::plug( QWidget *widget, int index ) +int DictLabelAction::plug( TQWidget *widget, int index ) { if ( widget->inherits( "KToolBar" ) ) { @@ -212,7 +212,7 @@ int DictLabelAction::plug( QWidget *widget, int index ) int id = KAction::getToolButtonID(); - QLabel *label = new QLabel( text(), widget, "kde toolbar widget" ); + TQLabel *label = new TQLabel( text(), widget, "kde toolbar widget" ); label->setMinimumWidth(label->sizeHint().width()); label->setBackgroundMode( Qt::PaletteButton ); label->setAlignment(AlignCenter | AlignVCenter); @@ -222,7 +222,7 @@ int DictLabelAction::plug( QWidget *widget, int index ) addContainer( tb, id ); - connect( tb, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( tb, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); m_label = label; @@ -233,7 +233,7 @@ int DictLabelAction::plug( QWidget *widget, int index ) } -void DictLabelAction::unplug( QWidget *widget ) +void DictLabelAction::unplug( TQWidget *widget ) { if ( widget->inherits( "KToolBar" ) ) { @@ -252,7 +252,7 @@ void DictLabelAction::unplug( QWidget *widget ) } -void DictLabelAction::setBuddy(QWidget *buddy) +void DictLabelAction::setBuddy(TQWidget *buddy) { if (m_label && buddy) m_label->setBuddy(buddy); @@ -262,8 +262,8 @@ void DictLabelAction::setBuddy(QWidget *buddy) //********************************************************************************* -DictButtonAction::DictButtonAction( const QString& text, QObject* receiver, - const char* slot, QObject* parent, const char* name ) +DictButtonAction::DictButtonAction( const TQString& text, TQObject* receiver, + const char* slot, TQObject* parent, const char* name ) : KAction( text, 0, receiver, slot, parent, name ) { } @@ -274,7 +274,7 @@ DictButtonAction::~DictButtonAction() } -int DictButtonAction::plug( QWidget *widget, int index ) +int DictButtonAction::plug( TQWidget *widget, int index ) { if ( widget->inherits( "KToolBar" ) ) { @@ -282,14 +282,14 @@ int DictButtonAction::plug( QWidget *widget, int index ) int id = KAction::getToolButtonID(); - QPushButton *button = new QPushButton( text(), widget ); + TQPushButton *button = new TQPushButton( text(), widget ); button->adjustSize(); - connect(button,SIGNAL(clicked()),this,SLOT(activate())); + connect(button,TQT_SIGNAL(clicked()),this,TQT_SLOT(activate())); tb->insertWidget( id, button->width(), button, index ); addContainer( tb, id ); - connect( tb, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( tb, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); m_button = button; @@ -300,7 +300,7 @@ int DictButtonAction::plug( QWidget *widget, int index ) } -void DictButtonAction::unplug( QWidget *widget ) +void DictButtonAction::unplug( TQWidget *widget ) { if ( widget->inherits( "KToolBar" ) ) { diff --git a/kdict/actions.h b/kdict/actions.h index 568a9f7c..97759af4 100644 --- a/kdict/actions.h +++ b/kdict/actions.h @@ -18,8 +18,8 @@ #ifndef _ACTIONS_H_ #define _ACTIONS_H_ -#include -#include +#include +#include #include #include @@ -33,38 +33,38 @@ class DictComboAction : public KAction Q_OBJECT public: - DictComboAction( const QString& text, QObject* parent, + DictComboAction( const TQString& text, TQObject* parent, const char* name, bool editable, bool autoSized ); ~DictComboAction(); - virtual int plug( QWidget *w, int index = -1 ); - virtual void unplug( QWidget *w ); + virtual int plug( TQWidget *w, int index = -1 ); + virtual void unplug( TQWidget *w ); - QWidget* widget(); + TQWidget* widget(); void setFocus(); - QString currentText() const; + TQString currentText() const; void selectAll(); - void setEditText(const QString &s); + void setEditText(const TQString &s); void setCurrentItem(int index); void clearEdit(); void clear(); - void setList(QStringList items); + void setList(TQStringList items); KGlobalSettings::Completion completionMode(); void setCompletionMode(KGlobalSettings::Completion mode); signals: void activated(int); - void activated(const QString&); + void activated(const TQString&); private slots: void slotComboActivated(int); - void slotComboActivated(const QString&); + void slotComboActivated(const TQString&); private: - QGuardedPtr m_combo; + TQGuardedPtr m_combo; bool m_editable, m_autoSized; KGlobalSettings::Completion m_compMode; }; @@ -75,16 +75,16 @@ class DictLabelAction : public KAction Q_OBJECT public: - DictLabelAction( const QString &text, QObject *parent = 0, const char *name = 0 ); + DictLabelAction( const TQString &text, TQObject *parent = 0, const char *name = 0 ); ~DictLabelAction(); - virtual int plug( QWidget *widget, int index = -1 ); - virtual void unplug( QWidget *widget ); + virtual int plug( TQWidget *widget, int index = -1 ); + virtual void unplug( TQWidget *widget ); - void setBuddy(QWidget *buddy); + void setBuddy(TQWidget *buddy); private: - QGuardedPtr m_label; + TQGuardedPtr m_label; }; @@ -94,18 +94,18 @@ class DictButtonAction : public KAction Q_OBJECT public: - DictButtonAction( const QString& text, QObject* receiver, - const char* slot, QObject* parent, const char* name ); + DictButtonAction( const TQString& text, TQObject* receiver, + const char* slot, TQObject* parent, const char* name ); ~DictButtonAction(); - virtual int plug( QWidget *w, int index = -1 ); - virtual void unplug( QWidget *w ); + virtual int plug( TQWidget *w, int index = -1 ); + virtual void unplug( TQWidget *w ); int widthHint(); void setWidth(int width); private: - QGuardedPtr m_button; + TQGuardedPtr m_button; }; #endif diff --git a/kdict/applet/kdictapplet.cpp b/kdict/applet/kdictapplet.cpp index ad907864..6e45de52 100644 --- a/kdict/applet/kdictapplet.cpp +++ b/kdict/applet/kdictapplet.cpp @@ -17,11 +17,11 @@ ------------------------------------------------------------- */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -36,7 +36,7 @@ //********* PopupBox ******************************************** PopupBox::PopupBox() - : QHBox(0, 0, WStyle_Customize | WType_Popup ), popupEnabled(true) + : TQHBox(0, 0, WStyle_Customize | WType_Popup ), popupEnabled(true) { } @@ -56,11 +56,11 @@ bool PopupBox::showBox() } -void PopupBox::hideEvent(QHideEvent *) +void PopupBox::hideEvent(TQHideEvent *) { emit(hidden()); popupEnabled = false; - QTimer::singleShot(100, this, SLOT(enablePopup())); + TQTimer::singleShot(100, this, TQT_SLOT(enablePopup())); } @@ -74,7 +74,7 @@ void PopupBox::enablePopup() extern "C" { - KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString& configFile) + KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("kdictapplet"); return new DictApplet(configFile, KPanelApplet::Stretch, 0, parent, "kdictapplet"); @@ -82,56 +82,56 @@ extern "C" } -DictApplet::DictApplet(const QString& configFile, Type type, int actions, QWidget *parent, const char *name) +DictApplet::DictApplet(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name) : KPanelApplet(configFile, type, actions, parent, name), waiting(0) { // first the widgets for a horizontal panel - baseWidget = new QWidget(this); - QGridLayout *baseLay = new QGridLayout(baseWidget,2,6,0,1); + baseWidget = new TQWidget(this); + TQGridLayout *baseLay = new TQGridLayout(baseWidget,2,6,0,1); - textLabel = new QLabel(i18n("Dictionary:"), baseWidget); + textLabel = new TQLabel(i18n("Dictionary:"), baseWidget); textLabel->setBackgroundOrigin(AncestorOrigin); - QFont f(textLabel->font()); + TQFont f(textLabel->font()); f.setPixelSize(12); textLabel->setFont(f); baseLay->addWidget(textLabel,0,1); - QToolTip::add(textLabel,i18n("Look up a word or phrase with Kdict")); + TQToolTip::add(textLabel,i18n("Look up a word or phrase with Kdict")); - iconLabel = new QLabel(baseWidget); + iconLabel = new TQLabel(baseWidget); iconLabel->setBackgroundOrigin(AncestorOrigin); - QPixmap pm = KGlobal::iconLoader()->loadIcon("kdict", KIcon::Panel, KIcon::SizeSmall, KIcon::DefaultState, 0L, true); + TQPixmap pm = KGlobal::iconLoader()->loadIcon("kdict", KIcon::Panel, KIcon::SizeSmall, KIcon::DefaultState, 0L, true); iconLabel->setPixmap(pm); baseLay->addWidget(iconLabel,1,0); iconLabel->setAlignment(Qt::AlignCenter | Qt::AlignVCenter); iconLabel->setFixedWidth(pm.width()+4); - QToolTip::add(iconLabel,i18n("Look up a word or phrase with Kdict")); + TQToolTip::add(iconLabel,i18n("Look up a word or phrase with Kdict")); f.setPixelSize(10); - clipboardBtn = new QPushButton(i18n("C"),baseWidget); + clipboardBtn = new TQPushButton(i18n("C"),baseWidget); clipboardBtn->setBackgroundOrigin(AncestorOrigin); clipboardBtn->setFont(f); clipboardBtn->setFixedSize(16,16); - connect(clipboardBtn, SIGNAL(clicked()), SLOT(queryClipboard())); + connect(clipboardBtn, TQT_SIGNAL(clicked()), TQT_SLOT(queryClipboard())); baseLay->addWidget(clipboardBtn,0,3); - QToolTip::add(clipboardBtn,i18n("Define selected text")); + TQToolTip::add(clipboardBtn,i18n("Define selected text")); - defineBtn = new QPushButton(i18n("D"),baseWidget); + defineBtn = new TQPushButton(i18n("D"),baseWidget); defineBtn->setBackgroundOrigin(AncestorOrigin); defineBtn->setFont(f); defineBtn->setFixedSize(16,16); defineBtn->setEnabled(false); - connect(defineBtn, SIGNAL(clicked()), SLOT(startDefine())); + connect(defineBtn, TQT_SIGNAL(clicked()), TQT_SLOT(startDefine())); baseLay->addWidget(defineBtn,0,4); - QToolTip::add(defineBtn,i18n("Define word/phrase")); + TQToolTip::add(defineBtn,i18n("Define word/phrase")); - matchBtn = new QPushButton(i18n("M"),baseWidget); + matchBtn = new TQPushButton(i18n("M"),baseWidget); matchBtn->setBackgroundOrigin(AncestorOrigin); matchBtn->setFont(f); matchBtn->setFixedSize(16,16); matchBtn->setEnabled(false); - connect(matchBtn, SIGNAL(clicked()), SLOT(startMatch())); + connect(matchBtn, TQT_SIGNAL(clicked()), TQT_SLOT(startMatch())); baseLay->addWidget(matchBtn,0,5); - QToolTip::add(matchBtn,i18n("Find matching definitions")); + TQToolTip::add(matchBtn,i18n("Find matching definitions")); completionObject = new KCompletion(); @@ -141,37 +141,37 @@ DictApplet::DictApplet(const QString& configFile, Type type, int actions, QWidge internalCombo->setFocus(); internalCombo->clearEdit(); internalCombo->lineEdit()->installEventFilter( this ); - connect(internalCombo, SIGNAL(returnPressed(const QString&)), SLOT(startQuery(const QString&))); - connect(internalCombo, SIGNAL(textChanged(const QString&)), SLOT(comboTextChanged(const QString&))); - QToolTip::add(internalCombo,i18n("Look up a word or phrase with Kdict")); + connect(internalCombo, TQT_SIGNAL(returnPressed(const TQString&)), TQT_SLOT(startQuery(const TQString&))); + connect(internalCombo, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(comboTextChanged(const TQString&))); + TQToolTip::add(internalCombo,i18n("Look up a word or phrase with Kdict")); baseLay->addMultiCellWidget(internalCombo,1,1,1,5); baseLay->setColStretch(2,1); // widgets for a vertical panel - verticalBtn = new QPushButton(this); - connect(verticalBtn, SIGNAL(pressed()), SLOT(showExternalCombo())); - QToolTip::add(verticalBtn,i18n("Look up a word or phrase with Kdict")); + verticalBtn = new TQPushButton(this); + connect(verticalBtn, TQT_SIGNAL(pressed()), TQT_SLOT(showExternalCombo())); + TQToolTip::add(verticalBtn,i18n("Look up a word or phrase with Kdict")); popupBox = new PopupBox(); popupBox->setFixedSize(160, 22); - connect(popupBox, SIGNAL(hidden()), SLOT(externalComboHidden())); + connect(popupBox, TQT_SIGNAL(hidden()), TQT_SLOT(externalComboHidden())); externalCombo = new KHistoryCombo(popupBox); externalCombo->setCompletionObject(completionObject); - connect(externalCombo, SIGNAL(returnPressed(const QString&)), SLOT(startQuery(const QString&))); + connect(externalCombo, TQT_SIGNAL(returnPressed(const TQString&)), TQT_SLOT(startQuery(const TQString&))); externalCombo->setFixedSize(160, externalCombo->sizeHint().height()); - connect(internalCombo, SIGNAL(completionModeChanged(KGlobalSettings::Completion)), - this, SLOT(updateCompletionMode(KGlobalSettings::Completion))); - connect(externalCombo, SIGNAL(completionModeChanged(KGlobalSettings::Completion)), - this, SLOT(updateCompletionMode(KGlobalSettings::Completion))); + connect(internalCombo, TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)), + this, TQT_SLOT(updateCompletionMode(KGlobalSettings::Completion))); + connect(externalCombo, TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)), + this, TQT_SLOT(updateCompletionMode(KGlobalSettings::Completion))); // restore history and completion list KConfig *c = config(); c->setGroup("General"); - QStringList list = c->readListEntry("Completion list"); + TQStringList list = c->readListEntry("Completion list"); completionObject->setItems(list); int mode = c->readNumEntry("Completion mode", KGlobalSettings::completionMode()); @@ -190,7 +190,7 @@ DictApplet::~DictApplet() KConfig *c = config(); c->setGroup("General"); - QStringList list = completionObject->items(); + TQStringList list = completionObject->items(); c->writeEntry("Completion list", list); c->writeEntry("Completion mode", (int) internalCombo->completionMode()); @@ -217,7 +217,7 @@ int DictApplet::heightForWidth(int width) const } -void DictApplet::resizeEvent(QResizeEvent*) +void DictApplet::resizeEvent(TQResizeEvent*) { if (orientation() == Horizontal) { verticalBtn->hide(); @@ -252,22 +252,22 @@ void DictApplet::resizeEvent(QResizeEvent*) verticalBtn->setFixedSize(width(),width()); KIcon::StdSizes sz = width() < 32 ? KIcon::SizeSmall : (width() < 48 ? KIcon::SizeMedium : KIcon::SizeLarge); - QPixmap pm = KGlobal::iconLoader()->loadIcon("kdict", KIcon::Panel, sz, KIcon::DefaultState, 0L, true); + TQPixmap pm = KGlobal::iconLoader()->loadIcon("kdict", KIcon::Panel, sz, KIcon::DefaultState, 0L, true); verticalBtn->setPixmap(pm); } } -bool DictApplet::eventFilter( QObject *o, QEvent * e) +bool DictApplet::eventFilter( TQObject *o, TQEvent * e) { - if (e->type() == QEvent::MouseButtonRelease) + if (e->type() == TQEvent::MouseButtonRelease) emit requestFocus(); return KPanelApplet::eventFilter(o, e); } -void DictApplet::sendCommand(const QCString &fun, const QString &data) +void DictApplet::sendCommand(const TQCString &fun, const TQString &data) { if (waiting > 0) { waiting = 1; @@ -282,7 +282,7 @@ void DictApplet::sendCommand(const QCString &fun, const QString &data) waiting = 1; delayedFunc = fun.copy(); delayedData = data; - QTimer::singleShot(100, this, SLOT(sendDelayedCommand())); + TQTimer::singleShot(100, this, TQT_SLOT(sendDelayedCommand())); return; } else { QCStringList list = client->remoteObjects("kdict"); @@ -290,7 +290,7 @@ void DictApplet::sendCommand(const QCString &fun, const QString &data) waiting = 1; delayedFunc = fun.copy(); delayedData = data; - QTimer::singleShot(100, this, SLOT(sendDelayedCommand())); + TQTimer::singleShot(100, this, TQT_SLOT(sendDelayedCommand())); return; } } @@ -309,13 +309,13 @@ void DictApplet::sendDelayedCommand() DCOPClient *client = kapp->dcopClient(); if (!client->isApplicationRegistered("kdict")) { waiting++; - QTimer::singleShot(100, this, SLOT(sendDelayedCommand())); + TQTimer::singleShot(100, this, TQT_SLOT(sendDelayedCommand())); return; } else { QCStringList list = client->remoteObjects("kdict"); if (list.findIndex("KDictIface")==-1) { waiting++; - QTimer::singleShot(100, this, SLOT(sendDelayedCommand())); + TQTimer::singleShot(100, this, TQT_SLOT(sendDelayedCommand())); return; } } @@ -325,9 +325,9 @@ void DictApplet::sendDelayedCommand() } -void DictApplet::startQuery(const QString &s) +void DictApplet::startQuery(const TQString &s) { - QString query = s.stripWhiteSpace(); + TQString query = s.stripWhiteSpace(); if (query.isEmpty()) return; @@ -336,14 +336,14 @@ void DictApplet::startQuery(const QString &s) internalCombo->clearEdit(); externalCombo->clearEdit(); - sendCommand("definePhrase(QString)",query); + sendCommand("definePhrase(TQString)",query); if (orientation() == Vertical) popupBox->hide(); } -void DictApplet::comboTextChanged(const QString &s) +void DictApplet::comboTextChanged(const TQString &s) { defineBtn->setEnabled(!s.isEmpty()); matchBtn->setEnabled(!s.isEmpty()); @@ -352,7 +352,7 @@ void DictApplet::comboTextChanged(const QString &s) void DictApplet::queryClipboard() { - sendCommand("defineClipboardContent()",QString::null); + sendCommand("defineClipboardContent()",TQString::null); } @@ -364,23 +364,23 @@ void DictApplet::startDefine() void DictApplet::startMatch() { - QString query = internalCombo->currentText().stripWhiteSpace(); + TQString query = internalCombo->currentText().stripWhiteSpace(); internalCombo->addToHistory(query); externalCombo->addToHistory(query); internalCombo->clearEdit(); externalCombo->clearEdit(); - sendCommand("matchPhrase(QString)",query); + sendCommand("matchPhrase(TQString)",query); } void DictApplet::showExternalCombo() { - QPoint p; + TQPoint p; if (position() == pLeft) - p = mapToGlobal(QPoint(-popupBox->width()-1, 0)); + p = mapToGlobal(TQPoint(-popupBox->width()-1, 0)); else - p = mapToGlobal(QPoint(width()+1, 0)); + p = mapToGlobal(TQPoint(width()+1, 0)); popupBox->move(p); if (popupBox->showBox()) externalCombo->setFocus(); diff --git a/kdict/applet/kdictapplet.h b/kdict/applet/kdictapplet.h index a9738148..99a7cec4 100644 --- a/kdict/applet/kdictapplet.h +++ b/kdict/applet/kdictapplet.h @@ -20,7 +20,7 @@ #ifndef _DICTAPPLET_H_ #define _DICTAPPLET_H_ -#include +#include #include class QLabel; @@ -47,7 +47,7 @@ public slots: void enablePopup(); protected: - void hideEvent(QHideEvent *); + void hideEvent(TQHideEvent *); private: bool popupEnabled; @@ -61,22 +61,22 @@ class DictApplet : public KPanelApplet Q_OBJECT public: - DictApplet(const QString& configFile, Type t = Stretch, int actions = 0, QWidget *parent = 0, const char *name = 0); + DictApplet(const TQString& configFile, Type t = Stretch, int actions = 0, TQWidget *parent = 0, const char *name = 0); virtual ~DictApplet(); int widthForHeight(int height) const; int heightForWidth(int width) const; protected: - void resizeEvent(QResizeEvent*); - bool eventFilter( QObject *, QEvent * ); + void resizeEvent(TQResizeEvent*); + bool eventFilter( TQObject *, TQEvent * ); - void sendCommand(const QCString &fun, const QString &data); + void sendCommand(const TQCString &fun, const TQString &data); protected slots: void sendDelayedCommand(); - void startQuery(const QString&); - void comboTextChanged(const QString&); + void startQuery(const TQString&); + void comboTextChanged(const TQString&); void queryClipboard(); void startDefine(); void startMatch(); @@ -87,14 +87,14 @@ protected slots: private: KHistoryCombo *internalCombo, *externalCombo; KCompletion *completionObject; - QLabel *textLabel, *iconLabel; - QPushButton *verticalBtn, *clipboardBtn, *defineBtn, *matchBtn; - QWidget *baseWidget; + TQLabel *textLabel, *iconLabel; + TQPushButton *verticalBtn, *clipboardBtn, *defineBtn, *matchBtn; + TQWidget *baseWidget; PopupBox *popupBox; int waiting; - QCString delayedFunc; - QString delayedData; + TQCString delayedFunc; + TQString delayedData; }; diff --git a/kdict/application.cpp b/kdict/application.cpp index 28e3a398..b4239929 100644 --- a/kdict/application.cpp +++ b/kdict/application.cpp @@ -48,10 +48,10 @@ int Application::newInstance() { if (args->count()>0) { - QString phrase; + TQString phrase; for (int i=0;icount();i++) { - phrase += QString::fromLocal8Bit(args->arg(i)); + phrase += TQString::fromLocal8Bit(args->arg(i)); if (i+1 < args->count()) phrase += " "; } diff --git a/kdict/application.h b/kdict/application.h index eddb7f44..e5d46c67 100644 --- a/kdict/application.h +++ b/kdict/application.h @@ -13,7 +13,7 @@ #define APPLICATION_H #include -#include +#include #define KDICT_VERSION "0.6" @@ -32,7 +32,7 @@ class Application : public KUniqueApplication int newInstance(); private: - QGuardedPtr m_mainWindow; + TQGuardedPtr m_mainWindow; }; diff --git a/kdict/dcopinterface.h b/kdict/dcopinterface.h index f088a842..347a2e15 100644 --- a/kdict/dcopinterface.h +++ b/kdict/dcopinterface.h @@ -17,7 +17,7 @@ #define _DCOPINTERFACE_H #include -#include +#include class KDictIface : virtual public DCOPObject { @@ -30,20 +30,20 @@ k_dcop: virtual void makeActiveWindow() = 0; /** define/match a word/phrase **/ - virtual void definePhrase(QString phrase) = 0; - virtual void matchPhrase(QString phrase) = 0; + virtual void definePhrase(TQString phrase) = 0; + virtual void matchPhrase(TQString phrase) = 0; virtual void defineClipboardContent() = 0; virtual void matchClipboardContent() = 0; /** get info **/ - virtual QStringList getDatabases() = 0; - virtual QString currentDatabase() = 0; - virtual QStringList getStrategies() = 0; - virtual QString currentStrategy() = 0; + virtual TQStringList getDatabases() = 0; + virtual TQString currentDatabase() = 0; + virtual TQStringList getStrategies() = 0; + virtual TQString currentStrategy() = 0; /** set current database/strategy (returns true on success) **/ - virtual bool setDatabase(QString db) = 0; - virtual bool setStrategy(QString strategy) = 0; + virtual bool setDatabase(TQString db) = 0; + virtual bool setStrategy(TQString strategy) = 0; /** navigate in history **/ virtual bool historyGoBack() = 0; diff --git a/kdict/dict.cpp b/kdict/dict.cpp index b36f1ac1..74395d4a 100644 --- a/kdict/dict.cpp +++ b/kdict/dict.cpp @@ -22,8 +22,8 @@ #include "options.h" #include "dict.h" -#include -#include +#include +#include #include #include @@ -41,9 +41,9 @@ //********* JobData ****************************************** -JobData::JobData(QueryType Ntype,bool NnewServer,QString const& Nserver,int Nport, - int NidleHold, int Ntimeout, int NpipeSize, QString const& Nencoding, bool NAuthEnabled, - QString const& Nuser, QString const& Nsecret, unsigned int NheadLayout) +JobData::JobData(QueryType Ntype,bool NnewServer,TQString const& Nserver,int Nport, + int NidleHold, int Ntimeout, int NpipeSize, TQString const& Nencoding, bool NAuthEnabled, + TQString const& Nuser, TQString const& Nsecret, unsigned int NheadLayout) : type(Ntype), error(ErrNoErr), canceled(false), numFetched(0), newServer(NnewServer),server(Nserver), port(Nport), timeout(Ntimeout), pipeSize(NpipeSize), idleHold(NidleHold), encoding(Nencoding), authEnabled(NAuthEnabled), user(Nuser), secret(Nsecret), headLayout(NheadLayout) @@ -133,7 +133,7 @@ void DictAsyncClient::waitForWork() if ((tcpSocket!=-1)&&(job->newServer)) doQuit(); - codec = QTextCodec::codecForName(job->encoding.latin1()); + codec = TQTextCodec::codecForName(job->encoding.latin1()); input[0] = 0; //terminate string thisLine = input; nextLine = input; @@ -181,10 +181,10 @@ void DictAsyncClient::waitForWork() void DictAsyncClient::define() { - QString command; + TQString command; job->defines.clear(); - QStringList::iterator it; + TQStringList::iterator it; for (it = job->databases.begin(); it != job->databases.end(); ++it) { command = "define "; command += *it; @@ -201,7 +201,7 @@ void DictAsyncClient::define() job->strategy = "."; if (!match()) return; - job->result = QString::null; + job->result = TQString::null; if (job->numFetched == 0) { resultAppend("\n

\n"); resultAppend(i18n("No definitions found for \'%1'.").arg(job->query)); @@ -212,8 +212,8 @@ void DictAsyncClient::define() resultAppend(i18n("No definitions found for \'%1\'. Perhaps you mean:").arg(job->query)); resultAppend("

\n\n"); - QString lastDb; - QStringList::iterator it; + TQString lastDb; + TQStringList::iterator it; for (it = job->matches.begin(); it != job->matches.end(); ++it) { int pos = (*it).find(' '); if (pos != -1) { @@ -241,10 +241,10 @@ void DictAsyncClient::define() } -QString htmlString(const QString &raw) +TQString htmlString(const TQString &raw) { unsigned int len=raw.length(); - QString ret; + TQString ret; for (unsigned int i=0; i()\"|\\[\\]{}]+"); - QRegExp ftp("ftp://[^\\s<>()\"|\\[\\]{}]+"); + TQRegExp http("http://[^\\s<>()\"|\\[\\]{}]+"); + TQRegExp ftp("ftp://[^\\s<>()\"|\\[\\]{}]+"); int matchPos=0, matchLen=0; bool httpMatch=false; - QString ret; + TQString ret; matchPos = http.search(raw); matchLen = http.matchedLength(); @@ -305,8 +305,8 @@ QString generateDefineLink(const QString &raw) bool DictAsyncClient::getDefinitions() { - QCString lastDb,bracketBuff; - QStrList hashList; + TQCString lastDb,bracketBuff; + TQStrList hashList; char *s; int defCount,response; @@ -317,7 +317,7 @@ bool DictAsyncClient::getDefinitions() defCount = 0; cmdBuffer = ""; do { - QStringList::iterator it = job->defines.begin(); + TQStringList::iterator it = job->defines.begin(); cmdBuffer += codec->fromUnicode(*it); defCount++; job->defines.remove(it); @@ -352,7 +352,7 @@ bool DictAsyncClient::getDefinitions() } } else { job->error = JobData::ErrServerError; - job->result = QString::null; + job->result = TQString::null; resultAppend(thisLine); doQuit(); return false; @@ -390,7 +390,7 @@ bool DictAsyncClient::getDefinitions() bodyDone = true; } if (!bodyDone) { - context.update(QCString(line)); + context.update(TQCString(line)); if (!bracketBuff.isEmpty()) { s = strchr(line,'}'); if (!s) @@ -461,7 +461,7 @@ bool DictAsyncClient::getDefinitions() bool DictAsyncClient::match() { - QStringList::iterator it = job->databases.begin(); + TQStringList::iterator it = job->databases.begin(); int response; cmdBuffer = ""; @@ -792,13 +792,13 @@ void DictAsyncClient::openConnection() if (ks.status() == IO_LookupError) job->error = JobData::ErrBadHost; else if (ks.status() == IO_ConnectError) { - job->result = QString::null; + job->result = TQString::null; resultAppend(KExtendedSocket::strError(ks.status(), errno)); job->error = JobData::ErrConnect; } else if (ks.status() == IO_TimeOutError) job->error = JobData::ErrTimeout; else { - job->result = QString::null; + job->result = TQString::null; resultAppend(KExtendedSocket::strError(ks.status(), errno)); job->error = JobData::ErrCommunication; } @@ -827,7 +827,7 @@ void DictAsyncClient::openConnection() } KMD5 context; - context.update(QCString(msgId)); + context.update(TQCString(msgId)); context.update(job->secret.local8Bit()); cmdBuffer += "auth " + job->user.local8Bit() + " "; @@ -898,7 +898,7 @@ bool DictAsyncClient::waitForRead() if (ret == -1) { // select failed if (job) { - job->result = QString::null; + job->result = TQString::null; resultAppend(strerror(errno)); job->error = JobData::ErrCommunication; } @@ -918,7 +918,7 @@ bool DictAsyncClient::waitForRead() } if (FD_ISSET(tcpSocket,&fdsE)||FD_ISSET(fdPipeIn,&fdsE)) { // broken pipe, etc if (job) { - job->result = QString::null; + job->result = TQString::null; resultAppend(i18n("The connection is broken.")); job->error = JobData::ErrCommunication; } @@ -930,7 +930,7 @@ bool DictAsyncClient::waitForRead() } if (job) { - job->result = QString::null; + job->result = TQString::null; job->error = JobData::ErrCommunication; } closeSocket(); @@ -961,7 +961,7 @@ bool DictAsyncClient::waitForWrite() if (ret == -1) { // select failed if (job) { - job->result = QString::null; + job->result = TQString::null; resultAppend(strerror(errno)); job->error = JobData::ErrCommunication; } @@ -981,7 +981,7 @@ bool DictAsyncClient::waitForWrite() } if (FD_ISSET(tcpSocket,&fdsR)||FD_ISSET(tcpSocket,&fdsE)||FD_ISSET(fdPipeIn,&fdsE)) { // broken pipe, etc if (job) { - job->result = QString::null; + job->result = TQString::null; resultAppend(i18n("The connection is broken.")); job->error = JobData::ErrCommunication; } @@ -992,7 +992,7 @@ bool DictAsyncClient::waitForWrite() return true; } if (job) { - job->result = QString::null; + job->result = TQString::null; job->error = JobData::ErrCommunication; } closeSocket(); @@ -1032,7 +1032,7 @@ bool DictAsyncClient::sendBuffer() ret = KSocks::self()->write(tcpSocket,&cmdBuffer.data()[done],todo); if (ret <= 0) { if (job) { - job->result = QString::null; + job->result = TQString::null; resultAppend(strerror(errno)); job->error = JobData::ErrCommunication; } @@ -1077,7 +1077,7 @@ bool DictAsyncClient::getNextLine() } while ((received<0)&&(errno==EINTR)); // don't get tricked by signals if (received <= 0) { - job->result = QString::null; + job->result = TQString::null; resultAppend(i18n("The connection is broken.")); job->error = JobData::ErrCommunication; closeSocket(); @@ -1121,7 +1121,7 @@ void DictAsyncClient::handleErrors() int len = strlen(thisLine); if (len>80) len = 80; - job->result = QString::null; + job->result = TQString::null; resultAppend(codec->toUnicode(thisLine,len)); switch (strtol(thisLine,0L,0)) { @@ -1167,7 +1167,7 @@ void DictAsyncClient::resultAppend(const char* str) } -void DictAsyncClient::resultAppend(QString str) +void DictAsyncClient::resultAppend(TQString str) { if (job) job->result += str; @@ -1203,8 +1203,8 @@ DictInterface::DictInterface() kapp->exit(1); } - notifier = new QSocketNotifier(fdPipeIn[0],QSocketNotifier::Read,this); - connect(notifier,SIGNAL(activated(int)),this,SLOT(clientDone())); + notifier = new TQSocketNotifier(fdPipeIn[0],TQSocketNotifier::Read,this); + connect(notifier,TQT_SIGNAL(activated(int)),this,TQT_SLOT(clientDone())); // initialize the KSocks stuff in the main thread, otherwise we get // strange effects on FreeBSD @@ -1222,7 +1222,7 @@ DictInterface::DictInterface() DictInterface::~DictInterface() { - disconnect(notifier,SIGNAL(activated(int)),this,SLOT(clientDone())); + disconnect(notifier,TQT_SIGNAL(activated(int)),this,TQT_SLOT(clientDone())); if (0!=pthread_cancel(threadID)) kdWarning() << "pthread_cancel failed!" << endl; @@ -1271,7 +1271,7 @@ void DictInterface::stop() } -void DictInterface::define(const QString &query) +void DictInterface::define(const TQString &query) { JobData *newJob = generateQuery(JobData::TDefine,query); if (newJob) @@ -1279,7 +1279,7 @@ void DictInterface::define(const QString &query) } -void DictInterface::getDefinitions(QStringList query) +void DictInterface::getDefinitions(TQStringList query) { JobData *newjob = new JobData(JobData::TGetDefinitions,newServer,global->server,global->port, global->idleHold,global->timeout,global->pipeSize, global->encoding,global->authEnabled, @@ -1290,7 +1290,7 @@ void DictInterface::getDefinitions(QStringList query) } -void DictInterface::match(const QString &query) +void DictInterface::match(const TQString &query) { JobData *newJob = generateQuery(JobData::TMatch,query); @@ -1306,9 +1306,9 @@ void DictInterface::match(const QString &query) // fetch detailed db info -void DictInterface::showDbInfo(const QString &db) +void DictInterface::showDbInfo(const TQString &db) { - QString ndb = db.simplifyWhiteSpace(); // cleanup query string + TQString ndb = db.simplifyWhiteSpace(); // cleanup query string if (ndb.isEmpty()) return; if (ndb.length()>100) // shorten if necessary @@ -1362,7 +1362,7 @@ void DictInterface::updateServer() // client-thread ended void DictInterface::clientDone() { - QString message; + TQString message; cleanPipes(); // read from pipe so that notifier doesn´t fire again @@ -1372,7 +1372,7 @@ void DictInterface::clientDone() } clientDoneInProgress = true; - QStringList::iterator it; + TQStringList::iterator it; JobData* job = jobList.getFirst(); if (!job->canceled) { // non-interupted job? if (JobData::ErrNoErr == job->error) { @@ -1444,7 +1444,7 @@ void DictInterface::clientDone() emit resultReady(job->result, job->query); } } else { - QString errMsg; + TQString errMsg; switch (job->error) { case JobData::ErrCommunication: errMsg = i18n("Communication error:\n\n"); @@ -1514,14 +1514,14 @@ void DictInterface::clientDone() } -JobData* DictInterface::generateQuery(JobData::QueryType type, QString query) +JobData* DictInterface::generateQuery(JobData::QueryType type, TQString query) { query = query.simplifyWhiteSpace(); // cleanup query string if (query.isEmpty()) return 0L; if (query.length()>300) // shorten if necessary query.truncate(300); - query = query.replace(QRegExp("[\"\\]"), ""); // remove remaining illegal chars... + query = query.replace(TQRegExp("[\"\\]"), ""); // remove remaining illegal chars... if (query.isEmpty()) return 0L; @@ -1579,7 +1579,7 @@ void DictInterface::startClient() if (::write(fdPipeOut[1],&buf,1) == -1) ::perror( "startClient()" ); - QString message; + TQString message; switch (jobList.getFirst()->type) { case JobData::TDefine: case JobData::TGetDefinitions: diff --git a/kdict/dict.h b/kdict/dict.h index adb87ed9..53e5db3d 100644 --- a/kdict/dict.h +++ b/kdict/dict.h @@ -20,8 +20,8 @@ #define _DICT_H_ #include -#include -#include +#include +#include class QSocketNotifier; struct in_addr; @@ -65,29 +65,29 @@ public: ErrMsgTooLong }; - JobData(QueryType Ntype,bool NnewServer,QString const& Nserver,int Nport, - int NidleHold, int Ntimeout, int NpipeSize, QString const& Nencoding, bool NAuthEnabled, - QString const& Nuser, QString const& Nsecret, unsigned int NheadLayout); + JobData(QueryType Ntype,bool NnewServer,TQString const& Nserver,int Nport, + int NidleHold, int Ntimeout, int NpipeSize, TQString const& Nencoding, bool NAuthEnabled, + TQString const& Nuser, TQString const& Nsecret, unsigned int NheadLayout); QueryType type; ErrType error; bool canceled; int numFetched; - QString result; - QStringList matches; + TQString result; + TQStringList matches; - QString query; - QStringList defines; + TQString query; + TQStringList defines; bool newServer; - QString server; + TQString server; int port, timeout, pipeSize, idleHold; - QString encoding; + TQString encoding; bool authEnabled; - QString user, secret; - QStringList databases,strategies; - QString strategy; + TQString user, secret; + TQStringList databases,strategies; + TQString strategy; unsigned int headLayout; }; @@ -134,16 +134,16 @@ private: void handleErrors(); void resultAppend(const char* str); - void resultAppend(QString str); + void resultAppend(TQString str); JobData *job; char *input; - QCString cmdBuffer; + TQCString cmdBuffer; const unsigned int inputSize; char *thisLine, *nextLine, *inputEnd; int fdPipeIn,fdPipeOut; //IPC-Pipes to/from async thread int tcpSocket,timeout,idleHold; - QTextCodec *codec; + TQTextCodec *codec; }; @@ -163,10 +163,10 @@ public slots: void serverChanged(); // inform the client when server settings get changed void stop(); // cancel all pending jobs - void define(const QString &query); - void getDefinitions(QStringList query); - void match(const QString &query); - void showDbInfo(const QString &db); // fetch detailed db info + void define(const TQString &query); + void getDefinitions(TQStringList query); + void match(const TQString &query); + void showDbInfo(const TQString &db); // fetch detailed db info void showDatabases(); // fetch misc. info... void showStrategies(); void showInfo(); @@ -175,10 +175,10 @@ public slots: signals: void infoReady(); // updateServer done - void resultReady(const QString &result, const QString &query); // define done - void matchReady(const QStringList &result); // match done - void started(const QString &message); // Client is active now, activate indicator - void stopped(const QString &message); // Client is now halted, deactivate indicator + void resultReady(const TQString &result, const TQString &query); // define done + void matchReady(const TQStringList &result); // match done + void started(const TQString &message); // Client is active now, activate indicator + void stopped(const TQString &message); // Client is now halted, deactivate indicator private slots: @@ -186,16 +186,16 @@ private slots: private: - JobData* generateQuery(JobData::QueryType type, QString query); + JobData* generateQuery(JobData::QueryType type, TQString query); void insertJob(JobData* job); // insert in job list, if nesscary cancel/remove previous jobs void startClient(); // send start signal void cleanPipes(); // empty the pipes, so that notifier stops firing - QSocketNotifier *notifier; + TQSocketNotifier *notifier; int fdPipeIn[2],fdPipeOut[2]; //IPC-Pipes to/from async thread pthread_t threadID; DictAsyncClient *client; - QPtrList jobList; + TQPtrList jobList; bool newServer,clientDoneInProgress; }; diff --git a/kdict/matchview.cpp b/kdict/matchview.cpp index 32cd04dd..869ea383 100644 --- a/kdict/matchview.cpp +++ b/kdict/matchview.cpp @@ -13,13 +13,13 @@ ------------------------------------------------------------- */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -35,26 +35,26 @@ //********* MatchViewItem ******************************************** -MatchViewItem::MatchViewItem(QListView *view, const QString &text) - : QListViewItem(view,text) +MatchViewItem::MatchViewItem(TQListView *view, const TQString &text) + : TQListViewItem(view,text) { } -MatchViewItem::MatchViewItem(QListView *view,QListViewItem *after,const QString &text) - : QListViewItem(view,after,text) +MatchViewItem::MatchViewItem(TQListView *view,TQListViewItem *after,const TQString &text) + : TQListViewItem(view,after,text) { } -MatchViewItem::MatchViewItem(QListViewItem *item,const QString &text,const QString &commandStr) -: QListViewItem(item,text), command(commandStr) +MatchViewItem::MatchViewItem(TQListViewItem *item,const TQString &text,const TQString &commandStr) +: TQListViewItem(item,text), command(commandStr) { } -MatchViewItem::MatchViewItem(QListViewItem *item,QListViewItem *after,const QString &text,const QString &commandStr) -: QListViewItem(item,after,text), command(commandStr) +MatchViewItem::MatchViewItem(TQListViewItem *item,TQListViewItem *after,const TQString &text,const TQString &commandStr) +: TQListViewItem(item,after,text), command(commandStr) { } @@ -70,9 +70,9 @@ void MatchViewItem::setOpen(bool o) listView()->setUpdatesEnabled(false); MatchViewItem *sub=0; - QString command, label; - QRegExp exp("\"*\"", true, true); - QStringList::iterator it; + TQString command, label; + TQRegExp exp("\"*\"", true, true); + TQStringList::iterator it; for (it = subEntrys.begin(); it != subEntrys.end(); ++it) { command = "define "; command += (*it); @@ -92,71 +92,71 @@ void MatchViewItem::setOpen(bool o) } if (childCount()) - QListViewItem::setOpen(o); + TQListViewItem::setOpen(o); } -void MatchViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) +void MatchViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) { if(command.isEmpty()) { - QFont font=p->font(); + TQFont font=p->font(); font.setBold(true); p->setFont(font); } - QListViewItem::paintCell(p,cg,column,width,alignment); + TQListViewItem::paintCell(p,cg,column,width,alignment); } //********* MatchView ****************************************** -MatchView::MatchView(QWidget *parent, const char *name) - : QWidget(parent,name),getOn(false),getAllOn(false) +MatchView::MatchView(TQWidget *parent, const char *name) + : TQWidget(parent,name),getOn(false),getAllOn(false) { setCaption(kapp->makeStdCaption(i18n("Match List"))); - QVBoxLayout * boxLayout = new QVBoxLayout(this, 1, 0); + TQVBoxLayout * boxLayout = new TQVBoxLayout(this, 1, 0); boxLayout->addSpacing(1); - w_strat = new QComboBox(false,this); + w_strat = new TQComboBox(false,this); w_strat->setFixedHeight(w_strat->sizeHint().height()); - connect(w_strat,SIGNAL(activated(int)),this,SLOT(strategySelected(int))); + connect(w_strat,TQT_SIGNAL(activated(int)),this,TQT_SLOT(strategySelected(int))); boxLayout->addWidget(w_strat,0); boxLayout->addSpacing(1); - w_list = new QListView(this); - w_list->setFocusPolicy(QWidget::StrongFocus); + w_list = new TQListView(this); + w_list->setFocusPolicy(TQWidget::StrongFocus); w_list->header()->hide(); w_list->addColumn("foo"); - w_list->setColumnWidthMode(0,QListView::Maximum); + w_list->setColumnWidthMode(0,TQListView::Maximum); w_list->setColumnWidth(0,0); - w_list->setSelectionMode(QListView::Extended); + w_list->setSelectionMode(TQListView::Extended); w_list->setTreeStepSize(18); w_list->setSorting(-1); // disable sorting w_list->setMinimumHeight(w_strat->sizeHint().height()); - connect(w_list,SIGNAL(selectionChanged()),SLOT(enableGetButton())); - connect(w_list,SIGNAL(returnPressed(QListViewItem *)),SLOT(returnPressed(QListViewItem *))); - connect(w_list,SIGNAL(doubleClicked(QListViewItem *)),SLOT(getOneItem(QListViewItem *))); - connect(w_list,SIGNAL(mouseButtonPressed(int, QListViewItem *, const QPoint &, int)), - SLOT(mouseButtonPressed(int, QListViewItem *, const QPoint &, int))); - connect(w_list,SIGNAL(rightButtonPressed(QListViewItem *,const QPoint &,int)),SLOT(buildPopupMenu(QListViewItem *,const QPoint &,int))); + connect(w_list,TQT_SIGNAL(selectionChanged()),TQT_SLOT(enableGetButton())); + connect(w_list,TQT_SIGNAL(returnPressed(TQListViewItem *)),TQT_SLOT(returnPressed(TQListViewItem *))); + connect(w_list,TQT_SIGNAL(doubleClicked(TQListViewItem *)),TQT_SLOT(getOneItem(TQListViewItem *))); + connect(w_list,TQT_SIGNAL(mouseButtonPressed(int, TQListViewItem *, const TQPoint &, int)), + TQT_SLOT(mouseButtonPressed(int, TQListViewItem *, const TQPoint &, int))); + connect(w_list,TQT_SIGNAL(rightButtonPressed(TQListViewItem *,const TQPoint &,int)),TQT_SLOT(buildPopupMenu(TQListViewItem *,const TQPoint &,int))); boxLayout->addWidget(w_list,1); boxLayout->addSpacing(1); - w_get = new QPushButton(i18n("&Get Selected"),this); + w_get = new TQPushButton(i18n("&Get Selected"),this); w_get->setFixedHeight(w_get->sizeHint().height()-3); w_get->setMinimumWidth(w_get->sizeHint().width()-20); w_get->setEnabled(false); - connect(w_get, SIGNAL(clicked()), this, SLOT(getSelected())); + connect(w_get, TQT_SIGNAL(clicked()), this, TQT_SLOT(getSelected())); boxLayout->addWidget(w_get,0); - w_getAll = new QPushButton(i18n("Get &All"),this); + w_getAll = new TQPushButton(i18n("Get &All"),this); w_getAll->setFixedHeight(w_getAll->sizeHint().height()-3); w_getAll->setMinimumWidth(w_getAll->sizeHint().width()-20); w_getAll->setEnabled(false); - connect(w_getAll, SIGNAL(clicked()), this, SLOT(getAll())); + connect(w_getAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(getAll())); boxLayout->addWidget(w_getAll,0); - connect(interface,SIGNAL(matchReady(const QStringList &)),this,SLOT(newList(const QStringList &))); + connect(interface,TQT_SIGNAL(matchReady(const TQStringList &)),this,TQT_SLOT(newList(const TQStringList &))); rightBtnMenu = new KPopupMenu(); } @@ -174,7 +174,7 @@ void MatchView::updateStrategyCombo() } -bool MatchView::selectStrategy(const QString &strategy) const +bool MatchView::selectStrategy(const TQString &strategy) const { int newCurrent = global->strategies.findIndex(strategy); if (newCurrent == -1) @@ -187,13 +187,13 @@ bool MatchView::selectStrategy(const QString &strategy) const } -void MatchView::match(const QString &query) +void MatchView::match(const TQString &query) { interface->match(query.utf8()); } -void MatchView::closeEvent ( QCloseEvent * e ) +void MatchView::closeEvent ( TQCloseEvent * e ) { e->accept(); // hides the widget emit(windowClosed()); @@ -215,22 +215,22 @@ void MatchView::enableGetButton() } -void MatchView::mouseButtonPressed(int button, QListViewItem *, const QPoint &, int) +void MatchView::mouseButtonPressed(int button, TQListViewItem *, const TQPoint &, int) { if (button == MidButton) emit(clipboardRequested()); } -void MatchView::returnPressed(QListViewItem *) +void MatchView::returnPressed(TQListViewItem *) { getSelected(); } -void MatchView::getOneItem(QListViewItem *i) +void MatchView::getOneItem(TQListViewItem *i) { - QStringList defines; + TQStringList defines; if ((!i->childCount())&&(i->parent())) defines.append(((MatchViewItem *)(i))->command); @@ -248,14 +248,14 @@ void MatchView::getOneItem(QListViewItem *i) void MatchView::getSelected() { - QStringList defines; + TQStringList defines; MatchViewItem *top = static_cast(w_list->firstChild()); MatchViewItem *sub; while (top) { if (top->isSelected()&&(!top->subEntrys.isEmpty())) { - QString command; - QStringList::iterator it; + TQString command; + TQStringList::iterator it; for (it = top->subEntrys.begin(); it != top->subEntrys.end(); ++it) { command = "define "; command += (*it); @@ -278,14 +278,14 @@ void MatchView::getSelected() void MatchView::getAll() { - QStringList defines; + TQStringList defines; MatchViewItem *top = static_cast(w_list->firstChild()); MatchViewItem *sub; while (top) { if (!top->subEntrys.isEmpty()) { - QString command; - QStringList::iterator it; + TQString command; + TQStringList::iterator it; for (it = top->subEntrys.begin(); it != top->subEntrys.end(); ++it) { command = "define "; command += (*it); @@ -305,7 +305,7 @@ void MatchView::getAll() } -void MatchView::doGet(QStringList &defines) +void MatchView::doGet(TQStringList &defines) { if (defines.count() > 0) { if (defines.count() > global->maxDefinitions) { @@ -319,7 +319,7 @@ void MatchView::doGet(QStringList &defines) } -void MatchView::newList(const QStringList &matches) +void MatchView::newList(const TQStringList &matches) { MatchViewItem *top=0; bool initialOpen = (matches.count()<200); @@ -342,9 +342,9 @@ void MatchView::newList(const QStringList &matches) w_list->setRootIsDecorated(true); w_getAll->setEnabled(true); getAllOn = true; - QString lastDb, db, match; + TQString lastDb, db, match; - QStringList::const_iterator it; + TQStringList::const_iterator it; for (it = matches.begin(); it != matches.end(); ++it) { db = (*it).section(' ', 0, 0); @@ -374,42 +374,42 @@ void MatchView::newList(const QStringList &matches) // construct the right-mouse-button-popup-menu on demand -void MatchView::buildPopupMenu(QListViewItem *i, const QPoint &_point, int) +void MatchView::buildPopupMenu(TQListViewItem *i, const TQPoint &_point, int) { rightBtnMenu->clear(); if ((i!=0L)&&(i->isExpandable()||i->parent())) { popupCurrent = (MatchViewItem *)(i); - rightBtnMenu->insertItem(i18n("&Get"),this,SLOT(popupGetCurrent())); + rightBtnMenu->insertItem(i18n("&Get"),this,TQT_SLOT(popupGetCurrent())); if (!i->isExpandable()) { // toplevel item -> only "get" - rightBtnMenu->insertItem(i18n("&Match"),this,SLOT(popupMatchCurrent())); - rightBtnMenu->insertItem(i18n("&Define"),this,SLOT(popupDefineCurrent())); + rightBtnMenu->insertItem(i18n("&Match"),this,TQT_SLOT(popupMatchCurrent())); + rightBtnMenu->insertItem(i18n("&Define"),this,TQT_SLOT(popupDefineCurrent())); } rightBtnMenu->insertSeparator(); } kapp->clipboard()->setSelectionMode(false); - QString text = kapp->clipboard()->text(); + TQString text = kapp->clipboard()->text(); if (text.isEmpty()) { kapp->clipboard()->setSelectionMode(true); text = kapp->clipboard()->text(); } if (!text.isEmpty()) { popupClip = kapp->clipboard()->text(); - rightBtnMenu->insertItem(i18n("Match &Clipboard Content"),this,SLOT(popupMatchClip())); - rightBtnMenu->insertItem(SmallIcon("define_clip"),i18n("D&efine Clipboard Content"),this,SLOT(popupDefineClip())); + rightBtnMenu->insertItem(i18n("Match &Clipboard Content"),this,TQT_SLOT(popupMatchClip())); + rightBtnMenu->insertItem(SmallIcon("define_clip"),i18n("D&efine Clipboard Content"),this,TQT_SLOT(popupDefineClip())); rightBtnMenu->insertSeparator(); } - int ID = rightBtnMenu->insertItem(i18n("Get &Selected"),this,SLOT(getSelected())); + int ID = rightBtnMenu->insertItem(i18n("Get &Selected"),this,TQT_SLOT(getSelected())); rightBtnMenu->setItemEnabled(ID,getOn); - ID = rightBtnMenu->insertItem(i18n("Get &All"),this,SLOT(getAll())); + ID = rightBtnMenu->insertItem(i18n("Get &All"),this,TQT_SLOT(getAll())); rightBtnMenu->setItemEnabled(ID,getAllOn); if (w_list->childCount()) { rightBtnMenu->insertSeparator(); - rightBtnMenu->insertItem(i18n("E&xpand List"),this,SLOT(expandList())); - rightBtnMenu->insertItem(i18n("C&ollapse List"),this,SLOT(collapseList())); + rightBtnMenu->insertItem(i18n("E&xpand List"),this,TQT_SLOT(expandList())); + rightBtnMenu->insertItem(i18n("C&ollapse List"),this,TQT_SLOT(collapseList())); } rightBtnMenu->popup(_point); @@ -448,7 +448,7 @@ void MatchView::popupMatchClip() void MatchView::expandList() { - QListViewItem *top = w_list->firstChild(); + TQListViewItem *top = w_list->firstChild(); while (top) { w_list->setOpen(top,true); @@ -460,7 +460,7 @@ void MatchView::expandList() void MatchView::collapseList() { w_list->setCurrentItem(w_list->firstChild()); - QListViewItem *top = w_list->firstChild(); + TQListViewItem *top = w_list->firstChild(); while (top) { w_list->setOpen(top,false); diff --git a/kdict/matchview.h b/kdict/matchview.h index f619820e..7248c35c 100644 --- a/kdict/matchview.h +++ b/kdict/matchview.h @@ -17,7 +17,7 @@ #ifndef _MATCHVIEW_H_ #define _MATCHVIEW_H_ -#include +#include class KPopupMenu; @@ -28,17 +28,17 @@ class MatchViewItem : public QListViewItem public: - MatchViewItem(QListView *view,const QString &text); - MatchViewItem(QListView *view,QListViewItem *after,const QString &text); - MatchViewItem(QListViewItem *item,const QString &text,const QString &commandStr); - MatchViewItem(QListViewItem *item,QListViewItem *after,const QString &text,const QString &commandStr); + MatchViewItem(TQListView *view,const TQString &text); + MatchViewItem(TQListView *view,TQListViewItem *after,const TQString &text); + MatchViewItem(TQListViewItem *item,const TQString &text,const TQString &commandStr); + MatchViewItem(TQListViewItem *item,TQListViewItem *after,const TQString &text,const TQString &commandStr); ~MatchViewItem(); void setOpen(bool o); - void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment); + void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment); - QString command; - QStringList subEntrys; + TQString command; + TQStringList subEntrys; }; @@ -51,36 +51,36 @@ class MatchView : public QWidget public: - MatchView(QWidget *parent=0,const char *name=0); + MatchView(TQWidget *parent=0,const char *name=0); ~MatchView(); void updateStrategyCombo(); - bool selectStrategy(const QString &strategy) const; - void match(const QString &query); + bool selectStrategy(const TQString &strategy) const; + void match(const TQString &query); signals: - void defineRequested(const QString &query); - void matchRequested(const QString &query); + void defineRequested(const TQString &query); + void matchRequested(const TQString &query); void clipboardRequested(); void windowClosed(); protected: - void closeEvent ( QCloseEvent * e ); + void closeEvent ( TQCloseEvent * e ); private slots: void strategySelected(int num); void enableGetButton(); - void mouseButtonPressed(int, QListViewItem *, const QPoint &, int); - void returnPressed(QListViewItem *i); - void getOneItem(QListViewItem *i); + void mouseButtonPressed(int, TQListViewItem *, const TQPoint &, int); + void returnPressed(TQListViewItem *i); + void getOneItem(TQListViewItem *i); void getSelected(); void getAll(); - void doGet(QStringList &defines); - void newList(const QStringList &matches); - void buildPopupMenu(QListViewItem *, const QPoint &, int); + void doGet(TQStringList &defines); + void newList(const TQStringList &matches); + void buildPopupMenu(TQListViewItem *, const TQPoint &, int); void popupGetCurrent(); void popupDefineCurrent(); void popupMatchCurrent(); @@ -91,15 +91,15 @@ private slots: private: - QComboBox *w_strat; - QListView *w_list; - QPushButton *w_get,*w_getAll; + TQComboBox *w_strat; + TQListView *w_list; + TQPushButton *w_get,*w_getAll; bool getOn, getAllOn; KPopupMenu *rightBtnMenu; MatchViewItem *popupCurrent; - QString popupClip; // needed for rightbtn-popup menu + TQString popupClip; // needed for rightbtn-popup menu }; #endif diff --git a/kdict/options.cpp b/kdict/options.cpp index a157fbf5..3220b07c 100644 --- a/kdict/options.cpp +++ b/kdict/options.cpp @@ -17,14 +17,14 @@ ------------------------------------------------------------- */ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -67,7 +67,7 @@ void GlobalData::read() config->setGroup("Colors"); useCustomColors=config->readBoolEntry("customColors", false); - QColor defCol=KGlobalSettings::textColor(); + TQColor defCol=KGlobalSettings::textColor(); c_olors[Ctext]=config->readColorEntry("textColor",&defCol); c_olorNames[Ctext]=i18n("Text"); @@ -95,7 +95,7 @@ void GlobalData::read() config->setGroup("Fonts"); useCustomFonts=config->readBoolEntry("customFonts", false); - QFont defFont=KGlobalSettings::generalFont(); + TQFont defFont=KGlobalSettings::generalFont(); f_onts[Ftext]=config->readFontEntry("textFont",&defFont); f_ontNames[Ftext]=i18n("Text"); @@ -106,7 +106,7 @@ void GlobalData::read() // geometry... config->setGroup("Geometry"); - QSize invalid(-1,-1); + TQSize invalid(-1,-1); optSize = config->readSizeEntry("Opt_Size",&invalid); setsSize = config->readSizeEntry("Sets_Size",&invalid); matchSize = config->readSizeEntry("Match_Size",&invalid); @@ -157,10 +157,10 @@ void GlobalData::read() config->setGroup("Database_Sets"); databaseSets.setAutoDelete(true); int num = config->readNumEntry("Num_Sets",0); - QStringList* temp; - QString strNum; + TQStringList* temp; + TQString strNum; while (num > 0) { - temp = new QStringList(); + temp = new TQStringList(); strNum.setNum(num); *temp = config->readListEntry(strNum); if (!temp->isEmpty()) { @@ -217,7 +217,7 @@ void GlobalData::write() config->writeEntry("Completion_mode", (int)queryComboCompletionMode); config->setGroup("Query_History"); - QStringList copy; + TQStringList copy; if (saveHistory) copy = queryHistory; config->writeEntry("History",copy); @@ -239,13 +239,13 @@ void GlobalData::write() config->setGroup("Database_Sets"); config->writeEntry("Num_Sets",databaseSets.count()); - QString strNum; + TQString strNum; for (unsigned int i = 0;iwriteEntry(strNum.setNum(i+1),*databaseSets.at(i)); } -QColor GlobalData::defaultColor(int i) +TQColor GlobalData::defaultColor(int i) { switch(i) { case Ctext: @@ -278,7 +278,7 @@ QColor GlobalData::defaultColor(int i) } -QColor GlobalData::textColor() +TQColor GlobalData::textColor() { if(useCustomColors) return c_olors[Ctext]; @@ -287,7 +287,7 @@ QColor GlobalData::textColor() } -QColor GlobalData::backgroundColor() +TQColor GlobalData::backgroundColor() { if(useCustomColors) return c_olors[Cbackground]; @@ -296,7 +296,7 @@ QColor GlobalData::backgroundColor() } -QColor GlobalData::headingsTextColor() +TQColor GlobalData::headingsTextColor() { if(useCustomColors) return c_olors[CheadingsText]; @@ -305,7 +305,7 @@ QColor GlobalData::headingsTextColor() } -QColor GlobalData::headingsBackgroundColor() +TQColor GlobalData::headingsBackgroundColor() { if(useCustomColors) return c_olors[CheadingsBackground]; @@ -314,7 +314,7 @@ QColor GlobalData::headingsBackgroundColor() } -QColor GlobalData::linksColor() +TQColor GlobalData::linksColor() { if(useCustomColors) return c_olors[Clinks]; @@ -323,7 +323,7 @@ QColor GlobalData::linksColor() } -QColor GlobalData::visitedLinksColor() +TQColor GlobalData::visitedLinksColor() { if(useCustomColors) return c_olors[CvisitedLinks]; @@ -332,9 +332,9 @@ QColor GlobalData::visitedLinksColor() } -QFont GlobalData::defaultFont(int i) +TQFont GlobalData::defaultFont(int i) { - QFont font = KGlobalSettings::generalFont(); + TQFont font = KGlobalSettings::generalFont(); if (font.pointSize() < 5) font.setPointSize(12); @@ -346,7 +346,7 @@ QFont GlobalData::defaultFont(int i) } -QFont GlobalData::textFont() +TQFont GlobalData::textFont() { if(useCustomFonts) return f_onts[Ftext]; @@ -355,7 +355,7 @@ QFont GlobalData::textFont() } -QFont GlobalData::headingsFont() +TQFont GlobalData::headingsFont() { if(useCustomFonts) return f_onts[Fheadings]; @@ -365,10 +365,10 @@ QFont GlobalData::headingsFont() // simple password scrambling... -QString GlobalData::encryptStr(const QString& aStr) +TQString GlobalData::encryptStr(const TQString& aStr) { uint i,val,len = aStr.length(); - QString result; + TQString result; for (i=0; ikey()==Key_Enter)||(e->key()==Key_Return))) e->ignore(); else - QListBox::keyPressEvent(e); + TQListBox::keyPressEvent(e); } //********* OptionsDialog::ColorListItem ***************************** -OptionsDialog::ColorListItem::ColorListItem( const QString &text, const QColor &color ) - : QListBoxText(text), mColor( color ) +OptionsDialog::ColorListItem::ColorListItem( const TQString &text, const TQColor &color ) + : TQListBoxText(text), mColor( color ) { } @@ -418,9 +418,9 @@ OptionsDialog::ColorListItem::~ColorListItem() } -void OptionsDialog::ColorListItem::paint( QPainter *p ) +void OptionsDialog::ColorListItem::paint( TQPainter *p ) { - QFontMetrics fm = p->fontMetrics(); + TQFontMetrics fm = p->fontMetrics(); int h = fm.height(); p->drawText( 30+3*2, fm.ascent() + fm.leading()/2, text() ); @@ -431,13 +431,13 @@ void OptionsDialog::ColorListItem::paint( QPainter *p ) } -int OptionsDialog::ColorListItem::height(const QListBox *lb ) const +int OptionsDialog::ColorListItem::height(const TQListBox *lb ) const { return( lb->fontMetrics().lineSpacing()+1 ); } -int OptionsDialog::ColorListItem::width(const QListBox *lb ) const +int OptionsDialog::ColorListItem::width(const TQListBox *lb ) const { return( 30 + lb->fontMetrics().width( text() ) + 6 ); } @@ -446,10 +446,10 @@ int OptionsDialog::ColorListItem::width(const QListBox *lb ) const //********* OptionsDialog::FontListItem ***************************** -OptionsDialog::FontListItem::FontListItem( const QString &name, const QFont &font ) - : QListBoxText(name), f_ont(font) +OptionsDialog::FontListItem::FontListItem( const TQString &name, const TQFont &font ) + : TQListBoxText(name), f_ont(font) { - fontInfo = QString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize()); + fontInfo = TQString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize()); } @@ -458,28 +458,28 @@ OptionsDialog::FontListItem::~FontListItem() } -void OptionsDialog::FontListItem::setFont(const QFont &font) +void OptionsDialog::FontListItem::setFont(const TQFont &font) { f_ont = font; - fontInfo = QString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize()); + fontInfo = TQString("[%1 %2]").arg(f_ont.family()).arg(f_ont.pointSize()); } -void OptionsDialog::FontListItem::paint( QPainter *p ) +void OptionsDialog::FontListItem::paint( TQPainter *p ) { - QFont fnt = p->font(); - fnt.setWeight(QFont::Bold); + TQFont fnt = p->font(); + fnt.setWeight(TQFont::Bold); p->setFont(fnt); int fontInfoWidth = p->fontMetrics().width(fontInfo); int h = p->fontMetrics().ascent() + p->fontMetrics().leading()/2; p->drawText(2, h, fontInfo ); - fnt.setWeight(QFont::Normal); + fnt.setWeight(TQFont::Normal); p->setFont(fnt); p->drawText(5 + fontInfoWidth, h, text() ); } -int OptionsDialog::FontListItem::width(const QListBox *lb ) const +int OptionsDialog::FontListItem::width(const TQListBox *lb ) const { return( lb->fontMetrics().width(fontInfo) + lb->fontMetrics().width(text()) + 20 ); } @@ -488,90 +488,90 @@ int OptionsDialog::FontListItem::width(const QListBox *lb ) const //********* OptionsDialog ****************************************** -OptionsDialog::OptionsDialog(QWidget *parent, const char *name) +OptionsDialog::OptionsDialog(TQWidget *parent, const char *name) : KDialogBase(IconList, i18n("Configure"), Help|Default|Ok|Apply|Cancel, Ok, parent, name, false, true) { //******** Server ************************************ serverTab = addPage(i18n("Server"),i18n("DICT Server Configuration"), BarIcon("network", KIcon::SizeMedium )); - QGridLayout* grid = new QGridLayout(serverTab,10,3,0,spacingHint()); + TQGridLayout* grid = new TQGridLayout(serverTab,10,3,0,spacingHint()); w_server = new KLineEdit(serverTab); w_server->setText(global->server); - QLabel *l = new QLabel(w_server, i18n("Host&name:"), serverTab); + TQLabel *l = new TQLabel(w_server, i18n("Host&name:"), serverTab); grid->addWidget(l,0,0); grid->addMultiCellWidget(w_server,0,0,1,2); - connect( w_server, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) ); + connect( w_server, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) ); w_port = new KLineEdit(serverTab); w_port->setValidator(new KIntValidator(0,65536,this)); - w_port->setText(QString::number(global->port)); - l = new QLabel(w_port, i18n("&Port:"), serverTab); + w_port->setText(TQString::number(global->port)); + l = new TQLabel(w_port, i18n("&Port:"), serverTab); grid->addWidget(l,1,0); grid->addWidget(w_port,1,1); - connect( w_port, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) ); + connect( w_port, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) ); w_idleHold = new KIntSpinBox(0,300,5,0,10,serverTab); w_idleHold->setSuffix(i18n(" sec")); w_idleHold->setValue(global->idleHold); - l = new QLabel(w_idleHold, i18n("Hold conn&ection for:"), serverTab); + l = new TQLabel(w_idleHold, i18n("Hold conn&ection for:"), serverTab); grid->addWidget(l,2,0); grid->addWidget(w_idleHold,2,1); - connect( w_idleHold, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) ); + connect( w_idleHold, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotChanged() ) ); w_timeout = new KIntSpinBox(5,600,5,5,10,serverTab); w_timeout->setSuffix(i18n(" sec")); w_timeout->setValue(global->timeout); - l = new QLabel(w_timeout, i18n("T&imeout:"), serverTab); + l = new TQLabel(w_timeout, i18n("T&imeout:"), serverTab); grid->addWidget(l,3,0); grid->addWidget(w_timeout,3,1); - connect( w_timeout, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) ); + connect( w_timeout, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotChanged() ) ); w_pipesize = new KIntSpinBox(100,5000,2,2,10,serverTab); w_pipesize->setSuffix(i18n(" bytes")); w_pipesize->setValue(global->pipeSize); - l = new QLabel(w_pipesize, i18n("Command &buffer:"), serverTab); + l = new TQLabel(w_pipesize, i18n("Command &buffer:"), serverTab); grid->addWidget(l,4,0); grid->addWidget(w_pipesize,4,1); - connect( w_pipesize, SIGNAL( valueChanged(int) ), this, SLOT( slotChanged() ) ); + connect( w_pipesize, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotChanged() ) ); - QStringList encodingNames = KGlobal::charsets()->descriptiveEncodingNames(); + TQStringList encodingNames = KGlobal::charsets()->descriptiveEncodingNames(); int i=0,x=0; - for ( QStringList::Iterator it = encodingNames.begin(); it != encodingNames.end(); ++it ) { + for ( TQStringList::Iterator it = encodingNames.begin(); it != encodingNames.end(); ++it ) { if (KGlobal::charsets()->encodingForName(*it)==global->encoding) { x = i; break; } i++; } - w_encoding = new QComboBox(serverTab); + w_encoding = new TQComboBox(serverTab); w_encoding->insertStringList(encodingNames); w_encoding->setCurrentItem(x); - l = new QLabel(w_encoding, i18n("Encod&ing:"), serverTab); + l = new TQLabel(w_encoding, i18n("Encod&ing:"), serverTab); grid->addWidget(l,5,0); grid->addMultiCellWidget(w_encoding,5,5,1,2); - connect( w_encoding, SIGNAL( activated(int) ), this, SLOT( slotChanged() ) ); + connect( w_encoding, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( slotChanged() ) ); - w_auth = new QCheckBox(i18n("Server requires a&uthentication"),serverTab); + w_auth = new TQCheckBox(i18n("Server requires a&uthentication"),serverTab); w_auth->setChecked(global->authEnabled); grid->addMultiCellWidget(w_auth,6,6,0,2); - connect( w_auth, SIGNAL( toggled(bool) ), this, SLOT( slotChanged() ) ); - connect(w_auth,SIGNAL(toggled(bool)),SLOT(slotAuthRequiredToggled(bool))); + connect( w_auth, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotChanged() ) ); + connect(w_auth,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotAuthRequiredToggled(bool))); w_user = new KLineEdit(serverTab); w_user->setText(global->user); - l_user = new QLabel(w_user, i18n("U&ser:"),serverTab); + l_user = new TQLabel(w_user, i18n("U&ser:"),serverTab); grid->addWidget(l_user,7,0); grid->addMultiCellWidget(w_user,7,7,1,2); - connect( w_user, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) ); + connect( w_user, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) ); w_secret = new KLineEdit(serverTab); - w_secret->setEchoMode(QLineEdit::Password); + w_secret->setEchoMode(TQLineEdit::Password); w_secret->setText(global->secret); - l_secret = new QLabel(w_secret, i18n("Pass&word:"), serverTab); + l_secret = new TQLabel(w_secret, i18n("Pass&word:"), serverTab); grid->addWidget(l_secret,8,0); grid->addMultiCellWidget(w_secret,8,8,1,2); - connect( w_secret, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotChanged() ) ); + connect( w_secret, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotChanged() ) ); slotAuthRequiredToggled( w_auth->isChecked() ); @@ -581,53 +581,53 @@ OptionsDialog::OptionsDialog(QWidget *parent, const char *name) //************ Appearance *************************** appTab = addPage(i18n("Appearance"),i18n("Customize Visual Appearance"), BarIcon("appearance", KIcon::SizeMedium )); - QGridLayout *topL=new QGridLayout(appTab, 8, 3, 0, spacingHint()); + TQGridLayout *topL=new TQGridLayout(appTab, 8, 3, 0, spacingHint()); //color-list c_List = new DialogListBox(false, appTab); topL->addMultiCellWidget(c_List,1,3,0,1); - connect(c_List, SIGNAL(selected(QListBoxItem*)),SLOT(slotColItemSelected(QListBoxItem*))); - connect(c_List, SIGNAL(selectionChanged()), SLOT(slotColSelectionChanged())); + connect(c_List, TQT_SIGNAL(selected(TQListBoxItem*)),TQT_SLOT(slotColItemSelected(TQListBoxItem*))); + connect(c_List, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotColSelectionChanged())); - c_olorCB = new QCheckBox(i18n("&Use custom colors"),appTab); + c_olorCB = new TQCheckBox(i18n("&Use custom colors"),appTab); topL->addWidget(c_olorCB,0,0); - connect(c_olorCB, SIGNAL(toggled(bool)), this, SLOT(slotColCheckBoxToggled(bool))); - connect(c_olorCB, SIGNAL(toggled(bool) ), this, SLOT( slotChanged())); + connect(c_olorCB, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotColCheckBoxToggled(bool))); + connect(c_olorCB, TQT_SIGNAL(toggled(bool) ), this, TQT_SLOT( slotChanged())); - c_olChngBtn=new QPushButton(i18n("Cha&nge..."), appTab); - connect(c_olChngBtn, SIGNAL(clicked()), SLOT(slotColChangeBtnClicked())); + c_olChngBtn=new TQPushButton(i18n("Cha&nge..."), appTab); + connect(c_olChngBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotColChangeBtnClicked())); topL->addWidget(c_olChngBtn,1,2); - c_olDefBtn=new QPushButton(i18n("Default&s"), appTab); - connect(c_olDefBtn, SIGNAL(clicked()), SLOT(slotColDefaultBtnClicked())); + c_olDefBtn=new TQPushButton(i18n("Default&s"), appTab); + connect(c_olDefBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotColDefaultBtnClicked())); topL->addWidget(c_olDefBtn,2,2); - connect(c_olDefBtn, SIGNAL(clicked()), SLOT(slotChanged())); + connect(c_olDefBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged())); //font-list f_List = new DialogListBox(false, appTab); topL->addMultiCellWidget(f_List,5,7,0,1); - connect(f_List, SIGNAL(selected(QListBoxItem*)),SLOT(slotFontItemSelected(QListBoxItem*))); - connect(f_List, SIGNAL(selectionChanged()),SLOT(slotFontSelectionChanged())); + connect(f_List, TQT_SIGNAL(selected(TQListBoxItem*)),TQT_SLOT(slotFontItemSelected(TQListBoxItem*))); + connect(f_List, TQT_SIGNAL(selectionChanged()),TQT_SLOT(slotFontSelectionChanged())); - f_ontCB = new QCheckBox(i18n("Use custom &fonts"),appTab); + f_ontCB = new TQCheckBox(i18n("Use custom &fonts"),appTab); topL->addWidget(f_ontCB,4,0); - connect(f_ontCB, SIGNAL(toggled(bool)), SLOT(slotFontCheckBoxToggled(bool))); - connect(f_ontCB, SIGNAL(toggled(bool)), SLOT(slotChanged())); + connect(f_ontCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotFontCheckBoxToggled(bool))); + connect(f_ontCB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); - f_ntChngBtn=new QPushButton(i18n("Chang&e..."), appTab); - connect(f_ntChngBtn, SIGNAL(clicked()), SLOT(slotFontChangeBtnClicked())); + f_ntChngBtn=new TQPushButton(i18n("Chang&e..."), appTab); + connect(f_ntChngBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotFontChangeBtnClicked())); topL->addWidget(f_ntChngBtn,5,2); - f_ntDefBtn=new QPushButton(i18n("Defaul&ts"), appTab); - connect(f_ntDefBtn, SIGNAL(clicked()), SLOT(slotFontDefaultBtnClicked())); + f_ntDefBtn=new TQPushButton(i18n("Defaul&ts"), appTab); + connect(f_ntDefBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotFontDefaultBtnClicked())); topL->addWidget(f_ntDefBtn,6,2); - connect(f_ntDefBtn, SIGNAL(clicked()), SLOT(slotChanged())); + connect(f_ntDefBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotChanged())); topL->setColStretch(1,2); topL->setColStretch(2,0); topL->setRowStretch(3,1); topL->setRowStretch(7,1); - topL->setResizeMode(QLayout::Minimum); + topL->setResizeMode(TQLayout::Minimum); //init c_olorCB->setChecked(global->useCustomColors); @@ -643,24 +643,24 @@ OptionsDialog::OptionsDialog(QWidget *parent, const char *name) //************ Layout *************************** layoutTab = addPage(i18n("Layout"),i18n("Customize Output Format"), BarIcon("text_left", KIcon::SizeMedium )); - QVBoxLayout *vbox = new QVBoxLayout(layoutTab, 0, spacingHint()); + TQVBoxLayout *vbox = new TQVBoxLayout(layoutTab, 0, spacingHint()); - QButtonGroup *bGroup = new QButtonGroup(i18n("Headings"),layoutTab); - QVBoxLayout *bvbox = new QVBoxLayout(bGroup,8,5); + TQButtonGroup *bGroup = new TQButtonGroup(i18n("Headings"),layoutTab); + TQVBoxLayout *bvbox = new TQVBoxLayout(bGroup,8,5); bvbox->addSpacing(fontMetrics().lineSpacing()-4); - w_layout[0] = new QRadioButton(i18n("O&ne heading for each database"),bGroup); + w_layout[0] = new TQRadioButton(i18n("O&ne heading for each database"),bGroup); w_layout[0]->setChecked(global->headLayout == 0); bvbox->addWidget(w_layout[0],1); - w_layout[1] = new QRadioButton(i18n("A&s above, with separators between the definitions"),bGroup); + w_layout[1] = new TQRadioButton(i18n("A&s above, with separators between the definitions"),bGroup); w_layout[1]->setChecked(global->headLayout == 1); bvbox->addWidget(w_layout[1],1); - w_layout[2] = new QRadioButton(i18n("A separate heading for &each definition"),bGroup); + w_layout[2] = new TQRadioButton(i18n("A separate heading for &each definition"),bGroup); w_layout[2]->setChecked(global->headLayout == 2); bvbox->addWidget(w_layout[2],1); - connect(w_layout[0], SIGNAL(toggled(bool)), SLOT(slotChanged())); - connect(w_layout[1], SIGNAL(toggled(bool)), SLOT(slotChanged())); - connect(w_layout[2], SIGNAL(toggled(bool)), SLOT(slotChanged())); + connect(w_layout[0], TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); + connect(w_layout[1], TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); + connect(w_layout[2], TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); vbox->addWidget(bGroup,0); vbox->addStretch(1); @@ -668,53 +668,53 @@ OptionsDialog::OptionsDialog(QWidget *parent, const char *name) //************ Other *************************** otherTab = addPage(i18n("Miscellaneous"),i18n("Various Settings"), BarIcon("misc", KIcon::SizeMedium )); - vbox = new QVBoxLayout(otherTab, 0, spacingHint()); + vbox = new TQVBoxLayout(otherTab, 0, spacingHint()); - QGroupBox *group = new QGroupBox(i18n("Limits"),otherTab); + TQGroupBox *group = new TQGroupBox(i18n("Limits"),otherTab); - grid = new QGridLayout(group,4,2,8,5); + grid = new TQGridLayout(group,4,2,8,5); grid->addRowSpacing(0, fontMetrics().lineSpacing()-4); w_MaxDefinitions = new KIntSpinBox(100,10000,100,100,10,group); w_MaxDefinitions->setValue(global->maxDefinitions); - l = new QLabel(w_MaxDefinitions, i18n("De&finitions:"), group); + l = new TQLabel(w_MaxDefinitions, i18n("De&finitions:"), group); grid->addWidget(l,1,0); grid->addWidget(w_MaxDefinitions,1,1); - connect(w_MaxDefinitions, SIGNAL(valueChanged(int)), SLOT(slotChanged())); + connect(w_MaxDefinitions, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged())); w_Maxbrowse = new KIntSpinBox(1,100,1,1,10,group); w_Maxbrowse->setValue(global->maxBrowseListEntrys); - l = new QLabel(w_Maxbrowse, i18n("Cached &results:"), group); + l = new TQLabel(w_Maxbrowse, i18n("Cached &results:"), group); grid->addWidget(l,2,0); grid->addWidget(w_Maxbrowse,2,1); - connect(w_Maxbrowse, SIGNAL(valueChanged(int)), SLOT(slotChanged())); + connect(w_Maxbrowse, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged())); w_Maxhist = new KIntSpinBox(10,5000,10,10,10,group); w_Maxhist->setValue(global->maxHistEntrys); - l = new QLabel(w_Maxhist, i18n("Hi&story entries:"), group); + l = new TQLabel(w_Maxhist, i18n("Hi&story entries:"), group); grid->addWidget(l,3,0); grid->addWidget(w_Maxhist,3,1); - connect(w_Maxhist, SIGNAL(valueChanged(int)), SLOT(slotChanged())); + connect(w_Maxhist, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotChanged())); grid->setColStretch(1,1); vbox->addWidget(group,0); - group = new QGroupBox(i18n("Other"),otherTab); + group = new TQGroupBox(i18n("Other"),otherTab); - QVBoxLayout *vbox2 = new QVBoxLayout(group, 8, 5); + TQVBoxLayout *vbox2 = new TQVBoxLayout(group, 8, 5); vbox2->addSpacing(fontMetrics().lineSpacing()-4); - w_Savehist = new QCheckBox(i18n("Sa&ve history on exit"),group); + w_Savehist = new TQCheckBox(i18n("Sa&ve history on exit"),group); w_Savehist->setChecked(global->saveHistory); vbox2->addWidget(w_Savehist,0); - connect(w_Savehist, SIGNAL(toggled(bool)), SLOT(slotChanged())); + connect(w_Savehist, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); - w_Clipboard = new QCheckBox(i18n("D&efine selected text on start"),group); + w_Clipboard = new TQCheckBox(i18n("D&efine selected text on start"),group); w_Clipboard->setChecked(global->defineClipboard); vbox2->addWidget(w_Clipboard,1); - connect(w_Clipboard, SIGNAL(toggled(bool)), SLOT(slotChanged())); + connect(w_Clipboard, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotChanged())); vbox->addWidget(group,0); vbox->addStretch(2); @@ -782,7 +782,7 @@ void OptionsDialog::slotOk() void OptionsDialog::slotDefault() { - QStringList encodingNames; + TQStringList encodingNames; int i=0,x=0; switch(activePageIndex()) { @@ -793,7 +793,7 @@ void OptionsDialog::slotDefault() w_timeout->setValue(60); w_pipesize->setValue(256); encodingNames = KGlobal::charsets()->descriptiveEncodingNames(); - for ( QStringList::Iterator it = encodingNames.begin(); it != encodingNames.end(); ++it ) { + for ( TQStringList::Iterator it = encodingNames.begin(); it != encodingNames.end(); ++it ) { if (KGlobal::charsets()->encodingForName(*it)=="utf8") x = i; i++; @@ -845,11 +845,11 @@ void OptionsDialog::slotColCheckBoxToggled(bool b) // show color dialog for the entry -void OptionsDialog::slotColItemSelected(QListBoxItem *it) +void OptionsDialog::slotColItemSelected(TQListBoxItem *it) { if (it) { ColorListItem *colorItem = static_cast(it); - QColor col = colorItem->color(); + TQColor col = colorItem->color(); int result = KColorDialog::getColor(col,this); if (result == KColorDialog::Accepted) { @@ -896,11 +896,11 @@ void OptionsDialog::slotFontCheckBoxToggled(bool b) // show font dialog for the entry -void OptionsDialog::slotFontItemSelected(QListBoxItem *it) +void OptionsDialog::slotFontItemSelected(TQListBoxItem *it) { if (it) { FontListItem *fontItem = static_cast(it); - QFont font = fontItem->font(); + TQFont font = fontItem->font(); int result = KFontDialog::getFont(font,false,this); if (result == KFontDialog::Accepted) { diff --git a/kdict/options.h b/kdict/options.h index ecef7606..c37ee30e 100644 --- a/kdict/options.h +++ b/kdict/options.h @@ -18,7 +18,7 @@ #ifndef _KDICT_OPTIONS_H_ #define _KDICT_OPTIONS_H_ -#include +#include #include #include @@ -49,57 +49,57 @@ public: void write(); // colors... - const QColor& color(int i) { return c_olors[i]; } - const QString& colorName(int i) { return c_olorNames[i]; } + const TQColor& color(int i) { return c_olors[i]; } + const TQString& colorName(int i) { return c_olorNames[i]; } int colorCount() const { return COL_CNT; } - QColor defaultColor(int i); + TQColor defaultColor(int i); bool useCustomColors; - QColor textColor(); - QColor backgroundColor(); - QColor headingsTextColor(); - QColor headingsBackgroundColor(); - QColor linksColor(); - QColor visitedLinksColor(); + TQColor textColor(); + TQColor backgroundColor(); + TQColor headingsTextColor(); + TQColor headingsBackgroundColor(); + TQColor linksColor(); + TQColor visitedLinksColor(); // fonts... - const QFont& font(int i) { return f_onts[i]; } - const QString& fontName(int i) { return f_ontNames[i]; } + const TQFont& font(int i) { return f_onts[i]; } + const TQString& fontName(int i) { return f_ontNames[i]; } int fontCount() const { return FNT_CNT; } - QFont defaultFont(int); + TQFont defaultFont(int); bool useCustomFonts; - QFont textFont(); - QFont headingsFont(); + TQFont textFont(); + TQFont headingsFont(); - QString encryptStr(const QString& aStr); + TQString encryptStr(const TQString& aStr); bool defineClipboard; // define clipboard content on startup? - QSize optSize,setsSize,matchSize; // window geometry + TQSize optSize,setsSize,matchSize; // window geometry bool showMatchList; - QValueList splitterSizes; + TQValueList splitterSizes; KGlobalSettings::Completion queryComboCompletionMode; - QStringList queryHistory; + TQStringList queryHistory; bool saveHistory; // save query history to disk on exit? unsigned int maxHistEntrys, maxBrowseListEntrys, maxDefinitions; int headLayout; - QString server; // network client... + TQString server; // network client... int port,timeout,pipeSize,idleHold; - QString encoding; + TQString encoding; bool authEnabled; - QString user, secret; - QStringList serverDatabases, databases, strategies; - QPtrList databaseSets; + TQString user, secret; + TQStringList serverDatabases, databases, strategies; + TQPtrList databaseSets; unsigned int currentDatabase, currentStrategy; - QColor c_olors[COL_CNT]; - QString c_olorNames[COL_CNT]; - QFont f_onts[FNT_CNT]; - QString f_ontNames[FNT_CNT]; + TQColor c_olors[COL_CNT]; + TQString c_olorNames[COL_CNT]; + TQFont f_onts[FNT_CNT]; + TQString f_ontNames[FNT_CNT]; - QWidget *topLevel; + TQWidget *topLevel; }; extern GlobalData *global; @@ -114,59 +114,59 @@ class OptionsDialog : public KDialogBase public: - OptionsDialog(QWidget *parent=0, const char *name=0); + OptionsDialog(TQWidget *parent=0, const char *name=0); ~OptionsDialog(); //=================================================================================== - class DialogListBox : public QListBox { + class DialogListBox : public TQListBox { public: // alwaysIgnore==false: enter is ignored when the widget isn't visible/out of focus - DialogListBox(bool alwaysIgnore=false, QWidget * parent=0, const char * name=0); + DialogListBox(bool alwaysIgnore=false, TQWidget * parent=0, const char * name=0); ~DialogListBox(); protected: - void keyPressEvent( QKeyEvent *e ); + void keyPressEvent( TQKeyEvent *e ); bool a_lwaysIgnore; }; //=================================================================================== - class ColorListItem : public QListBoxText { + class ColorListItem : public TQListBoxText { public: - ColorListItem( const QString &text, const QColor &color=Qt::black ); + ColorListItem( const TQString &text, const TQColor &color=Qt::black ); ~ColorListItem(); - const QColor& color() { return mColor; } - void setColor( const QColor &color ) { mColor = color; } + const TQColor& color() { return mColor; } + void setColor( const TQColor &color ) { mColor = color; } protected: - virtual void paint( QPainter * ); - virtual int height( const QListBox * ) const; - virtual int width( const QListBox * ) const; + virtual void paint( TQPainter * ); + virtual int height( const TQListBox * ) const; + virtual int width( const TQListBox * ) const; private: - QColor mColor; + TQColor mColor; }; //=================================================================================== - class FontListItem : public QListBoxText { + class FontListItem : public TQListBoxText { public: - FontListItem( const QString &name, const QFont & ); + FontListItem( const TQString &name, const TQFont & ); ~FontListItem(); - const QFont& font() { return f_ont; } - void setFont( const QFont &); + const TQFont& font() { return f_ont; } + void setFont( const TQFont &); protected: - virtual void paint( QPainter * ); - virtual int width( const QListBox * ) const; + virtual void paint( TQPainter * ); + virtual int width( const TQListBox * ) const; private: - QFont f_ont; - QString fontInfo; + TQFont f_ont; + TQString fontInfo; }; //=================================================================================== @@ -186,42 +186,42 @@ protected slots: //colors void slotColCheckBoxToggled(bool b); - void slotColItemSelected(QListBoxItem *); // show color dialog for the entry + void slotColItemSelected(TQListBoxItem *); // show color dialog for the entry void slotColDefaultBtnClicked(); void slotColChangeBtnClicked(); void slotColSelectionChanged(); //fonts void slotFontCheckBoxToggled(bool b); - void slotFontItemSelected(QListBoxItem *); // show font dialog for the entry + void slotFontItemSelected(TQListBoxItem *); // show font dialog for the entry void slotFontDefaultBtnClicked(); void slotFontChangeBtnClicked(); void slotFontSelectionChanged(); private: - QFrame *serverTab; - QLabel *l_user, *l_secret; + TQFrame *serverTab; + TQLabel *l_user, *l_secret; KLineEdit *w_server, *w_user, *w_secret, *w_port; - QComboBox *w_encoding; - QCheckBox *w_auth; + TQComboBox *w_encoding; + TQCheckBox *w_auth; KIntSpinBox *w_idleHold,*w_timeout,*w_pipesize; - QFrame *appTab; + TQFrame *appTab; DialogListBox *c_List, *f_List; - QCheckBox *c_olorCB, + TQCheckBox *c_olorCB, *f_ontCB; - QPushButton *c_olDefBtn, + TQPushButton *c_olDefBtn, *c_olChngBtn, *f_ntDefBtn, *f_ntChngBtn; - QFrame *layoutTab; - QRadioButton *w_layout[3]; + TQFrame *layoutTab; + TQRadioButton *w_layout[3]; - QFrame *otherTab; - QCheckBox *w_Clipboard, *w_Savehist; + TQFrame *otherTab; + TQCheckBox *w_Clipboard, *w_Savehist; KIntSpinBox *w_Maxhist, *w_Maxbrowse, *w_MaxDefinitions; bool configChanged; }; diff --git a/kdict/queryview.cpp b/kdict/queryview.cpp index a2674d68..045b4e49 100644 --- a/kdict/queryview.cpp +++ b/kdict/queryview.cpp @@ -15,8 +15,8 @@ ------------------------------------------------------------- */ -#include -#include +#include +#include #include #include @@ -38,9 +38,9 @@ //******** SaveHelper ******************************************* -QString SaveHelper::lastPath; +TQString SaveHelper::lastPath; -SaveHelper::SaveHelper(const QString &saveName, const QString &filter, QWidget *parent) +SaveHelper::SaveHelper(const TQString &saveName, const TQString &filter, TQWidget *parent) : p_arent(parent), s_aveName(saveName), f_ilter(filter), file(0), tmpFile(0) { } @@ -61,7 +61,7 @@ SaveHelper::~SaveHelper() } -QFile* SaveHelper::getFile(const QString &dialogTitle) +TQFile* SaveHelper::getFile(const TQString &dialogTitle) { url = KFileDialog::getSaveURL(lastPath+s_aveName,f_ilter,p_arent,dialogTitle); @@ -72,14 +72,14 @@ QFile* SaveHelper::getFile(const QString &dialogTitle) lastPath.truncate(lastPath.length()-url.fileName().length()); if (url.isLocalFile()) { - if (QFileInfo(url.path()).exists() && + if (TQFileInfo(url.path()).exists() && (KMessageBox::warningContinueCancel(global->topLevel, i18n("A file named %1 already exists.\nDo you want to replace it?").arg(url.path()), dialogTitle, i18n("&Replace")) != KMessageBox::Continue)) { return 0; } - file = new QFile(url.path()); + file = new TQFile(url.path()); if(!file->open(IO_WriteOnly)) { KMessageBox::error(global->topLevel, i18n("Unable to save file.")); delete file; @@ -102,14 +102,14 @@ QFile* SaveHelper::getFile(const QString &dialogTitle) //**** BrowseData **************************************************** -BrowseData::BrowseData(const QString &Nhtml, const QString &NqueryText) +BrowseData::BrowseData(const TQString &Nhtml, const TQString &NqueryText) : html(Nhtml),queryText(NqueryText),xPos(0),yPos(0) {} //********* DictHTMLPart ****************************************** -DictHTMLPart::DictHTMLPart(QWidget *parentWidget, const char *widgetname) +DictHTMLPart::DictHTMLPart(TQWidget *parentWidget, const char *widgetname) : KHTMLPart(parentWidget,widgetname) {} @@ -130,8 +130,8 @@ void DictHTMLPart::khtmlMouseReleaseEvent(khtml::MouseReleaseEvent *event) //********* QueryView ****************************************** -QueryView::QueryView(QWidget *_parent) -: QVBox( _parent), actBack(0L), actForward(0L), actQueryCombo(0L), browsePos(0), isRendering(false) +QueryView::QueryView(TQWidget *_parent) +: TQVBox( _parent), actBack(0L), actForward(0L), actQueryCombo(0L), browsePos(0), isRendering(false) { browseList.setAutoDelete(true); @@ -140,16 +140,16 @@ QueryView::QueryView(QWidget *_parent) part->setJScriptEnabled(false); part->setJavaEnabled(false); part->setURLCursor(KCursor::handCursor()); - setFocusPolicy(QWidget::NoFocus); - connect(part, SIGNAL(completed()), SLOT(partCompleted())); - connect(part, SIGNAL(middleButtonClicked()), SLOT(middleButtonClicked())); + setFocusPolicy(TQWidget::NoFocus); + connect(part, TQT_SIGNAL(completed()), TQT_SLOT(partCompleted())); + connect(part, TQT_SIGNAL(middleButtonClicked()), TQT_SLOT(middleButtonClicked())); rightBtnMenu = new KPopupMenu(this); - connect(part,SIGNAL(popupMenu(const QString &, const QPoint &)),this,SLOT(buildPopupMenu(const QString &, const QPoint &))); - connect(part->browserExtension(),SIGNAL(openURLRequest(const KURL &,const KParts::URLArgs &)), - this,SLOT(slotURLRequest(const KURL &,const KParts::URLArgs &))); - connect(part->browserExtension(),SIGNAL(enableAction(const char *,bool)),this,SLOT(enableAction(const char *,bool))); - QTimer::singleShot( 0, this, SLOT(optionsChanged()) ); - connect(interface,SIGNAL(resultReady(const QString &, const QString &)), SLOT(resultReady(const QString &, const QString &))); + connect(part,TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)),this,TQT_SLOT(buildPopupMenu(const TQString &, const TQPoint &))); + connect(part->browserExtension(),TQT_SIGNAL(openURLRequest(const KURL &,const KParts::URLArgs &)), + this,TQT_SLOT(slotURLRequest(const KURL &,const KParts::URLArgs &))); + connect(part->browserExtension(),TQT_SIGNAL(enableAction(const char *,bool)),this,TQT_SLOT(enableAction(const char *,bool))); + TQTimer::singleShot( 0, this, TQT_SLOT(optionsChanged()) ); + connect(interface,TQT_SIGNAL(resultReady(const TQString &, const TQString &)), TQT_SLOT(resultReady(const TQString &, const TQString &))); } @@ -160,9 +160,9 @@ QueryView::~QueryView() void QueryView::setActions(KToolBarPopupAction* NactBack, KToolBarPopupAction* NactForward, DictComboAction* NactQueryCombo) { actBack = NactBack; - connect(actBack->popupMenu(),SIGNAL(activated(int)),SLOT(browseBack(int))); + connect(actBack->popupMenu(),TQT_SIGNAL(activated(int)),TQT_SLOT(browseBack(int))); actForward = NactForward; - connect(actForward->popupMenu(),SIGNAL(activated(int)),SLOT(browseForward(int))); + connect(actForward->popupMenu(),TQT_SIGNAL(activated(int)),TQT_SLOT(browseForward(int))); actQueryCombo = NactQueryCombo; } @@ -183,26 +183,26 @@ void QueryView::optionsChanged() { saveCurrentResultPos(); - currentHTMLHeader = QString("\n"); + currentHTMLHeader += TQString("font-weight:bold; "); + currentHTMLHeader += TQString("}\n"); + currentHTMLHeader += TQString("\n"); showResult(); // apply changes directly } @@ -230,14 +230,14 @@ void QueryView::saveQuery() { if (!browseList.isEmpty()) { BrowseData* brw = browseList.at(browsePos); - QString fName = brw->queryText+".html"; - fName.replace(QRegExp("[\\s/]"),"_"); + TQString fName = brw->queryText+".html"; + fName.replace(TQRegExp("[\\s/]"),"_"); SaveHelper helper(fName,"*.html",global->topLevel); - QFile *file = helper.getFile(QString::null); + TQFile *file = helper.getFile(TQString::null); if (file) { - QTextStream stream(file); - stream.setEncoding(QTextStream::Locale); + TQTextStream stream(file); + stream.setEncoding(TQTextStream::Locale); stream << currentHTMLHeader+brw->html; } } @@ -288,14 +288,14 @@ void QueryView::showFindDialog() } -void QueryView::paletteChange ( const QPalette & ) +void QueryView::paletteChange ( const TQPalette & ) { optionsChanged(); } -void QueryView::fontChange ( const QFont & ) +void QueryView::fontChange ( const TQFont & ) { optionsChanged(); } @@ -331,7 +331,7 @@ void QueryView::showResult() } -void QueryView::resultReady(const QString &result, const QString &query) +void QueryView::resultReady(const TQString &result, const TQString &query) { BrowseData* brw = new BrowseData(result,query); @@ -370,8 +370,8 @@ void QueryView::partCompleted() void QueryView::slotURLRequest (const KURL &url, const KParts::URLArgs &) { - QString type = url.host(); - QString urlText = url.prettyURL(); + TQString type = url.host(); + TQString urlText = url.prettyURL(); urlText.remove(0,8+type.length()); if (type.length()) { // valid url @@ -394,40 +394,40 @@ void QueryView::middleButtonClicked() // construct the right-mouse-button-popup-menu on demand -void QueryView::buildPopupMenu(const QString &url, const QPoint &point) +void QueryView::buildPopupMenu(const TQString &url, const TQPoint &point) { rightBtnMenu->clear(); if (!url.isEmpty()) { // menuitem if mouse is over link KURL u(url); - QString type = u.host(); + TQString type = u.host(); popupLink = u.prettyURL(); popupLink.remove(0,8+type.length()); if (type.length()) { // valid url if(type=="define") { rightBtnMenu->insertItem(i18n("Define &Synonym"), - this,SLOT(popupDefineLink())); + this,TQT_SLOT(popupDefineLink())); rightBtnMenu->insertItem(i18n("M&atch Synonym"), - this,SLOT(popupMatchLink())); + this,TQT_SLOT(popupMatchLink())); rightBtnMenu->insertSeparator(); } if(type=="dbinfo") { - rightBtnMenu->insertItem(i18n("D&atabase Information"),this,SLOT(popupDbInfo())); + rightBtnMenu->insertItem(i18n("D&atabase Information"),this,TQT_SLOT(popupDbInfo())); rightBtnMenu->insertSeparator(); } if(type=="realhttp") { popupLink.prepend("http://"); rightBtnMenu->insertItem(SmallIcon("fileopen"), i18n("&Open Link"), - this,SLOT(popupOpenLink())); + this,TQT_SLOT(popupOpenLink())); rightBtnMenu->insertSeparator(); } if(type=="realftp") { popupLink.prepend("ftp://"); rightBtnMenu->insertItem(SmallIcon("fileopen"), i18n("&Open Link"), - this,SLOT(popupOpenLink())); + this,TQT_SLOT(popupOpenLink())); rightBtnMenu->insertSeparator(); } } @@ -436,24 +436,24 @@ void QueryView::buildPopupMenu(const QString &url, const QPoint &point) if (part->hasSelection()) { popupSelect = part->selectedText(); rightBtnMenu->insertItem(i18n("&Define Selection"), - this,SLOT(popupDefineSelect())); + this,TQT_SLOT(popupDefineSelect())); rightBtnMenu->insertItem(i18n("&Match Selection"), - this,SLOT(popupMatchSelect())); + this,TQT_SLOT(popupMatchSelect())); rightBtnMenu->insertSeparator(); } else { kapp->clipboard()->setSelectionMode(false); - QString text = kapp->clipboard()->text(); + TQString text = kapp->clipboard()->text(); if (text.isEmpty()) { kapp->clipboard()->setSelectionMode(true); text = kapp->clipboard()->text(); } if (!text.isEmpty()) { - popupSelect = QApplication::clipboard()->text(); + popupSelect = TQApplication::clipboard()->text(); rightBtnMenu->insertItem(SmallIcon("define_clip"), i18n("&Define Clipboard Content"), - this,SLOT(popupDefineSelect())); + this,TQT_SLOT(popupDefineSelect())); rightBtnMenu->insertItem(i18n("&Match Clipboard Content"), - this,SLOT(popupMatchSelect())); + this,TQT_SLOT(popupMatchSelect())); rightBtnMenu->insertSeparator(); } } @@ -464,13 +464,13 @@ void QueryView::buildPopupMenu(const QString &url, const QPoint &point) if (browseList.at(browsePos-1)->queryText.isEmpty()) rightBtnMenu->insertItem(SmallIcon("back"), i18n("&Back: Information"), - this,SLOT(browseBack())); + this,TQT_SLOT(browseBack())); else rightBtnMenu->insertItem(SmallIcon("back"), i18n("&Back: '%1'").arg(getShortString(browseList.at(browsePos-1)->queryText,25)), - this,SLOT(browseBack())); + this,TQT_SLOT(browseBack())); } else { - ID = rightBtnMenu->insertItem(SmallIcon("back"), i18n("&Back"), this, SLOT(browseBack())); + ID = rightBtnMenu->insertItem(SmallIcon("back"), i18n("&Back"), this, TQT_SLOT(browseBack())); rightBtnMenu->setItemEnabled(ID,false); } @@ -478,13 +478,13 @@ void QueryView::buildPopupMenu(const QString &url, const QPoint &point) if (browseList.at(browsePos+1)->queryText.isEmpty()) rightBtnMenu->insertItem(SmallIcon("forward"), i18n("&Forward: Information"), - this,SLOT(browseForward())); + this,TQT_SLOT(browseForward())); else rightBtnMenu->insertItem(SmallIcon("forward"), i18n("&Forward: '%1'").arg(getShortString(browseList.at(browsePos+1)->queryText,25)), - this,SLOT(browseForward())); + this,TQT_SLOT(browseForward())); } else { - ID = rightBtnMenu->insertItem(SmallIcon("forward"),i18n("&Forward"),this,SLOT(browseForward())); + ID = rightBtnMenu->insertItem(SmallIcon("forward"),i18n("&Forward"),this,TQT_SLOT(browseForward())); rightBtnMenu->setItemEnabled(ID,false); } @@ -544,7 +544,7 @@ void QueryView::browseBack(int index) browsePos = x; actQueryCombo->setEditText(browseList.at(browsePos)->queryText); showResult(); - QTimer::singleShot(0, this, SLOT(updateBrowseActions())); // don't clear the menu in this slot + TQTimer::singleShot(0, this, TQT_SLOT(updateBrowseActions())); // don't clear the menu in this slot } } @@ -557,7 +557,7 @@ void QueryView::browseForward(int index) browsePos = x; actQueryCombo->setEditText(browseList.at(browsePos)->queryText); showResult(); - QTimer::singleShot(0, this, SLOT(updateBrowseActions())); // don't clear the menu in this slot + TQTimer::singleShot(0, this, TQT_SLOT(updateBrowseActions())); // don't clear the menu in this slot } } @@ -574,7 +574,7 @@ void QueryView::updateBrowseActions() actBack->popupMenu()->clear(); int i = browsePos-1; int num = 1; - QString s; + TQString s; while ((i>=0)&&(num<=10)) { s = browseList.at(i)->queryText; if (s.isEmpty()) s = i18n("Information"); @@ -598,7 +598,7 @@ void QueryView::updateBrowseActions() actForward->popupMenu()->clear(); int i = browsePos+1; int num = 1; - QString s; + TQString s; while ((i<(int)(browseList.count()))&&(num<=10)) { s = browseList.at(i)->queryText; if (s.isEmpty()) s = i18n("Information"); diff --git a/kdict/queryview.h b/kdict/queryview.h index e942d297..e87bd977 100644 --- a/kdict/queryview.h +++ b/kdict/queryview.h @@ -19,7 +19,7 @@ #ifndef _QUERYVIEW_H_ #define _QUERYVIEW_H_ -#include +#include #include class QFile; @@ -28,7 +28,7 @@ class KPopupMenu; class DictComboAction; -QString getShortString(QString str,unsigned int length); +TQString getShortString(TQString str,unsigned int length); //******** SaveHelper ******************************************* @@ -38,20 +38,20 @@ class SaveHelper { public: - SaveHelper(const QString &saveName, const QString &filter, QWidget *parent); + SaveHelper(const TQString &saveName, const TQString &filter, TQWidget *parent); ~SaveHelper(); // returns a file open for writing - QFile* getFile(const QString &dialogTitle); + TQFile* getFile(const TQString &dialogTitle); private: - QWidget *p_arent; - QString s_aveName, f_ilter; + TQWidget *p_arent; + TQString s_aveName, f_ilter; KURL url; - QFile* file; + TQFile* file; KTempFile* tmpFile; - static QString lastPath; + static TQString lastPath; }; @@ -64,10 +64,10 @@ class BrowseData public: - BrowseData(const QString &Nhtml, const QString &NqueryText); + BrowseData(const TQString &Nhtml, const TQString &NqueryText); - QString html; - QString queryText; + TQString html; + TQString queryText; int xPos,yPos; }; @@ -80,7 +80,7 @@ class DictHTMLPart : public KHTMLPart public: - DictHTMLPart(QWidget *parentWidget = 0, const char *widgetname = 0); + DictHTMLPart(TQWidget *parentWidget = 0, const char *widgetname = 0); ~DictHTMLPart(); signals: @@ -101,7 +101,7 @@ class QueryView : public QVBox public: - QueryView(QWidget *_parent = 0L); + QueryView(TQWidget *_parent = 0L); ~QueryView(); void setActions(KToolBarPopupAction* NactBack, KToolBarPopupAction* NactForward, DictComboAction* NactQueryCombo); @@ -123,30 +123,30 @@ public slots: signals: - void defineRequested(const QString &query); - void matchRequested(const QString &query); + void defineRequested(const TQString &query); + void matchRequested(const TQString &query); void clipboardRequested(); void enableCopy(bool selected); // emited when the user selects/deselects text void enablePrintSave(); void renderingStarted(); void renderingStopped(); - void newCaption(const QString&); + void newCaption(const TQString&); protected: - void paletteChange ( const QPalette & ); - void fontChange ( const QFont & ); + void paletteChange ( const TQPalette & ); + void fontChange ( const TQFont & ); void saveCurrentResultPos(); void showResult(); protected slots: - void resultReady(const QString &result, const QString &query); + void resultReady(const TQString &result, const TQString &query); void partCompleted(); void slotURLRequest (const KURL &url, const KParts::URLArgs &args); void middleButtonClicked(); - void buildPopupMenu(const QString &url, const QPoint &point); + void buildPopupMenu(const TQString &url, const TQPoint &point); void popupDefineLink(); void popupMatchLink(); void popupOpenLink(); @@ -166,11 +166,11 @@ private: DictComboAction *actQueryCombo; KPopupMenu *rightBtnMenu; - QString popupLink,popupSelect; // needed for rightbtn-popup menu + TQString popupLink,popupSelect; // needed for rightbtn-popup menu - QPtrList browseList; + TQPtrList browseList; unsigned int browsePos; // position in browseList - QString currentHTMLHeader; + TQString currentHTMLHeader; bool isRendering; }; diff --git a/kdict/sets.cpp b/kdict/sets.cpp index 0a252cec..513106da 100644 --- a/kdict/sets.cpp +++ b/kdict/sets.cpp @@ -13,10 +13,10 @@ ------------------------------------------------------------- */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -29,44 +29,44 @@ //********* DbSetsDialog ****************************************** -DbSetsDialog::DbSetsDialog(QWidget *parent, const char *name) +DbSetsDialog::DbSetsDialog(TQWidget *parent, const char *name) : KDialogBase(Plain, i18n("Database Sets"),Close | Help, Close, parent, name, false, true) { - QFrame* page=plainPage(); + TQFrame* page=plainPage(); - QStringList sets; + TQStringList sets; for(unsigned int i=1;idatabaseSets.count()+1;i++) sets.append(global->databases[i]); - QVBoxLayout * topLayout = new QVBoxLayout(page, 0, 0); + TQVBoxLayout * topLayout = new TQVBoxLayout(page, 0, 0); - QHBoxLayout * subLayout1 = new QHBoxLayout(5); + TQHBoxLayout * subLayout1 = new TQHBoxLayout(5); topLayout->addLayout(subLayout1,0); - w_set = new QComboBox(true,page); + w_set = new TQComboBox(true,page); w_set->setFixedHeight(w_set->sizeHint().height()); - w_set->setInsertionPolicy (QComboBox::NoInsertion); + w_set->setInsertionPolicy (TQComboBox::NoInsertion); w_set->insertStringList(sets); - connect(w_set, SIGNAL(activated(int)),this, SLOT(activateSet(int))); - QLabel *l = new QLabel(w_set, i18n("&Set:"),page); + connect(w_set, TQT_SIGNAL(activated(int)),this, TQT_SLOT(activateSet(int))); + TQLabel *l = new TQLabel(w_set, i18n("&Set:"),page); l->setMinimumSize(l->sizeHint()); subLayout1->addWidget(l,0); subLayout1->addWidget(w_set,1); subLayout1->addSpacing(8); - w_save = new QPushButton(i18n("S&ave"),page); - connect(w_save,SIGNAL(clicked()),this, SLOT(transferSet())); + w_save = new TQPushButton(i18n("S&ave"),page); + connect(w_save,TQT_SIGNAL(clicked()),this, TQT_SLOT(transferSet())); subLayout1->addWidget(w_save,0); - QPushButton *btn = new QPushButton(i18n("&New"),page); + TQPushButton *btn = new TQPushButton(i18n("&New"),page); btn->setMinimumSize(btn->sizeHint()); - connect(btn, SIGNAL(clicked()),this, SLOT(newPressed())); + connect(btn, TQT_SIGNAL(clicked()),this, TQT_SLOT(newPressed())); subLayout1->addWidget(btn,0); - w_delete = new QPushButton(i18n("&Delete"),page); + w_delete = new TQPushButton(i18n("&Delete"),page); w_delete->setMinimumSize(w_delete->sizeHint()); - connect(w_delete, SIGNAL(clicked()),this, SLOT(deletePressed())); + connect(w_delete, TQT_SIGNAL(clicked()),this, TQT_SLOT(deletePressed())); subLayout1->addWidget(w_delete,0); topLayout->addSpacing(8); @@ -76,41 +76,41 @@ DbSetsDialog::DbSetsDialog(QWidget *parent, const char *name) topLayout->addSpacing(8); - QGridLayout * subLayout2 = new QGridLayout(7,3,6); + TQGridLayout * subLayout2 = new TQGridLayout(7,3,6); topLayout->addLayout(subLayout2,1); - w_leftBox = new QListBox(page); - connect(w_leftBox, SIGNAL(selected(int)),this, SLOT(leftSelected(int))); - connect(w_leftBox, SIGNAL(highlighted(int)),this, SLOT(leftHighlighted(int))); - QLabel *leftLabel = new QLabel(w_leftBox, i18n("S&elected databases:"),page); + w_leftBox = new TQListBox(page); + connect(w_leftBox, TQT_SIGNAL(selected(int)),this, TQT_SLOT(leftSelected(int))); + connect(w_leftBox, TQT_SIGNAL(highlighted(int)),this, TQT_SLOT(leftHighlighted(int))); + TQLabel *leftLabel = new TQLabel(w_leftBox, i18n("S&elected databases:"),page); leftLabel->setMinimumSize(leftLabel->sizeHint()); subLayout2->addWidget(leftLabel,0,0); subLayout2->addMultiCellWidget(w_leftBox,1,6,0,0); - w_allLeft = new QPushButton(page); + w_allLeft = new TQPushButton(page); w_allLeft->setIconSet(BarIconSet("2leftarrow")); - connect(w_allLeft, SIGNAL(clicked()),this, SLOT(allLeftPressed())); + connect(w_allLeft, TQT_SIGNAL(clicked()),this, TQT_SLOT(allLeftPressed())); subLayout2->addWidget(w_allLeft,2,1); - w_left = new QPushButton(page); + w_left = new TQPushButton(page); w_left->setIconSet(BarIconSet("1leftarrow")); - connect(w_left, SIGNAL(clicked()),this, SLOT(leftPressed())); + connect(w_left, TQT_SIGNAL(clicked()),this, TQT_SLOT(leftPressed())); subLayout2->addWidget(w_left,3,1); - w_right = new QPushButton(page); + w_right = new TQPushButton(page); w_right->setIconSet(BarIconSet("1rightarrow")); - connect(w_right, SIGNAL(clicked()),this, SLOT(rightPressed())); + connect(w_right, TQT_SIGNAL(clicked()),this, TQT_SLOT(rightPressed())); subLayout2->addWidget(w_right,4,1); - w_allRight = new QPushButton(page); + w_allRight = new TQPushButton(page); w_allRight->setIconSet(BarIconSet("2rightarrow")); - connect(w_allRight, SIGNAL(clicked()),this, SLOT(allRightPressed())); + connect(w_allRight, TQT_SIGNAL(clicked()),this, TQT_SLOT(allRightPressed())); subLayout2->addWidget(w_allRight,5,1); - w_rightBox = new QListBox(page); - connect(w_rightBox, SIGNAL(selected(int)),this, SLOT(rightSelected(int))); - connect(w_rightBox, SIGNAL(highlighted(int)),this, SLOT(rightHighlighted(int))); - QLabel *rightLabel = new QLabel(w_rightBox, i18n("A&vailable databases:"),page); + w_rightBox = new TQListBox(page); + connect(w_rightBox, TQT_SIGNAL(selected(int)),this, TQT_SLOT(rightSelected(int))); + connect(w_rightBox, TQT_SIGNAL(highlighted(int)),this, TQT_SLOT(rightHighlighted(int))); + TQLabel *rightLabel = new TQLabel(w_rightBox, i18n("A&vailable databases:"),page); rightLabel->setMinimumSize(rightLabel->sizeHint()); subLayout2->addWidget(rightLabel,0,2); subLayout2->addMultiCellWidget(w_rightBox,1,6,2,2); @@ -135,7 +135,7 @@ DbSetsDialog::DbSetsDialog(QWidget *parent, const char *name) } -void DbSetsDialog::hideEvent(QHideEvent *) +void DbSetsDialog::hideEvent(TQHideEvent *) { global->setsSize = size(); emit(dialogClosed()); @@ -144,14 +144,14 @@ void DbSetsDialog::hideEvent(QHideEvent *) void DbSetsDialog::newPressed() { - QStringList *temp = new QStringList; + TQStringList *temp = new QStringList; temp->append(i18n("New Set")); global->databaseSets.append(temp); global->databases.insert(global->databases.at(global->databaseSets.count()),i18n("New Set")); if (global->currentDatabase >= global->databaseSets.count()) global->currentDatabase++; - QStringList sets; // reread sets, because w_sets internal list is not correct in all cases + TQStringList sets; // reread sets, because w_sets internal list is not correct in all cases for(unsigned int i=1;idatabaseSets.count()+1;i++) sets.append(global->databases[i]); w_set->clear(); diff --git a/kdict/sets.h b/kdict/sets.h index 3e874a6e..64c75de6 100644 --- a/kdict/sets.h +++ b/kdict/sets.h @@ -30,7 +30,7 @@ class DbSetsDialog : public KDialogBase public: - DbSetsDialog(QWidget *parent=0, const char *name=0); + DbSetsDialog(TQWidget *parent=0, const char *name=0); signals: @@ -38,7 +38,7 @@ signals: void dialogClosed(); protected: - void hideEvent(QHideEvent *); + void hideEvent(TQHideEvent *); private slots: @@ -60,9 +60,9 @@ private: void checkButtons(); - QComboBox *w_set; - QListBox *w_leftBox, *w_rightBox; - QPushButton *w_delete,*w_save,*w_allLeft,*w_left,*w_right,*w_allRight; + TQComboBox *w_set; + TQListBox *w_leftBox, *w_rightBox; + TQPushButton *w_delete,*w_save,*w_allLeft,*w_left,*w_right,*w_allRight; }; #endif diff --git a/kdict/toplevel.cpp b/kdict/toplevel.cpp index ee334cbd..f0842512 100644 --- a/kdict/toplevel.cpp +++ b/kdict/toplevel.cpp @@ -14,7 +14,7 @@ ------------------------------------------------------------- */ -#include +#include #include #include @@ -35,8 +35,8 @@ #include "toplevel.h" -// cut a QString and add "..." -QString getShortString(QString str,unsigned int length) +// cut a TQString and add "..." +TQString getShortString(TQString str,unsigned int length) { if (str.length()>length) { str.truncate(length-3); @@ -50,7 +50,7 @@ DictInterface *interface; GlobalData *global; -TopLevel::TopLevel(QWidget* parent, const char* name) +TopLevel::TopLevel(TQWidget* parent, const char* name) : DCOPObject("KDictIface"), KMainWindow(parent, name, WType_TopLevel), optDlg(0L), setsDlg(0L), stopRef(0) { @@ -61,26 +61,26 @@ TopLevel::TopLevel(QWidget* parent, const char* name) global->topLevel = this; global->read(); interface = new DictInterface(); - connect(interface,SIGNAL(infoReady()),SLOT(stratDbChanged())); - connect(interface,SIGNAL(started(const QString&)),SLOT(clientStarted(const QString&))); - connect(interface,SIGNAL(stopped(const QString&)),SLOT(clientStopped(const QString&))); + connect(interface,TQT_SIGNAL(infoReady()),TQT_SLOT(stratDbChanged())); + connect(interface,TQT_SIGNAL(started(const TQString&)),TQT_SLOT(clientStarted(const TQString&))); + connect(interface,TQT_SIGNAL(stopped(const TQString&)),TQT_SLOT(clientStopped(const TQString&))); queryView = new QueryView(this); - connect(queryView,SIGNAL(defineRequested(const QString&)),SLOT(define(const QString&))); - connect(queryView,SIGNAL(matchRequested(const QString&)),SLOT(match(const QString&))); - connect(queryView,SIGNAL(clipboardRequested()),SLOT(defineClipboard())); - connect(queryView,SIGNAL(enableCopy(bool)),SLOT(enableCopy(bool))); - connect(queryView,SIGNAL(enablePrintSave()),SLOT(enablePrintSave())); - connect(queryView,SIGNAL(renderingStarted()),SLOT(renderingStarted())); - connect(queryView,SIGNAL(renderingStopped()),SLOT(renderingStopped())); - connect(queryView,SIGNAL(newCaption(const QString&)),SLOT(newCaption(const QString&))); + connect(queryView,TQT_SIGNAL(defineRequested(const TQString&)),TQT_SLOT(define(const TQString&))); + connect(queryView,TQT_SIGNAL(matchRequested(const TQString&)),TQT_SLOT(match(const TQString&))); + connect(queryView,TQT_SIGNAL(clipboardRequested()),TQT_SLOT(defineClipboard())); + connect(queryView,TQT_SIGNAL(enableCopy(bool)),TQT_SLOT(enableCopy(bool))); + connect(queryView,TQT_SIGNAL(enablePrintSave()),TQT_SLOT(enablePrintSave())); + connect(queryView,TQT_SIGNAL(renderingStarted()),TQT_SLOT(renderingStarted())); + connect(queryView,TQT_SIGNAL(renderingStopped()),TQT_SLOT(renderingStopped())); + connect(queryView,TQT_SIGNAL(newCaption(const TQString&)),TQT_SLOT(newCaption(const TQString&))); matchView = new MatchView(); - connect(matchView,SIGNAL(defineRequested(const QString&)),SLOT(define(const QString&))); - connect(matchView,SIGNAL(matchRequested(const QString&)),SLOT(match(const QString&))); - connect(matchView,SIGNAL(clipboardRequested()),SLOT(matchClipboard())); - connect(matchView,SIGNAL(windowClosed()),SLOT(toggleMatchListShow())); - connect(&resetStatusbarTimer,SIGNAL(timeout()),SLOT(resetStatusbar())); + connect(matchView,TQT_SIGNAL(defineRequested(const TQString&)),TQT_SLOT(define(const TQString&))); + connect(matchView,TQT_SIGNAL(matchRequested(const TQString&)),TQT_SLOT(match(const TQString&))); + connect(matchView,TQT_SIGNAL(clipboardRequested()),TQT_SLOT(matchClipboard())); + connect(matchView,TQT_SIGNAL(windowClosed()),TQT_SLOT(toggleMatchListShow())); + connect(&resetStatusbarTimer,TQT_SIGNAL(timeout()),TQT_SLOT(resetStatusbar())); setupStatusBar(); setupActions(); @@ -89,12 +89,12 @@ TopLevel::TopLevel(QWidget* parent, const char* name) if (global->showMatchList) { // show splitter, html view & match list - splitter = new QSplitter(QSplitter::Horizontal,this); + splitter = new TQSplitter(TQSplitter::Horizontal,this); splitter->setOpaqueResize( KGlobalSettings::opaqueResize() ); queryView->reparent(splitter,0,queryView->pos(),true); matchView->reparent(splitter,0,matchView->pos(),true); setCentralWidget(splitter); - splitter->setResizeMode(matchView,QSplitter::KeepSize); + splitter->setResizeMode(matchView,TQSplitter::KeepSize); adjustMatchViewSize(); } else @@ -139,7 +139,7 @@ void TopLevel::makeActiveWindow() } -void TopLevel::definePhrase(QString phrase) +void TopLevel::definePhrase(TQString phrase) { kdDebug(5004) << "*DCOP call* TopLevel::definePhrase()" << endl; define(phrase); @@ -147,7 +147,7 @@ void TopLevel::definePhrase(QString phrase) } -void TopLevel::matchPhrase(QString phrase) +void TopLevel::matchPhrase(TQString phrase) { kdDebug(5004) << "*DCOP call* TopLevel::matchPhrase()" << endl; match(phrase); @@ -171,35 +171,35 @@ void TopLevel::matchClipboardContent() } -QStringList TopLevel::getDatabases() +TQStringList TopLevel::getDatabases() { kdDebug(5004) << "*DCOP call* TopLevel::getDatabases()" << endl; return global->databases; } -QString TopLevel::currentDatabase() +TQString TopLevel::currentDatabase() { kdDebug(5004) << "*DCOP call* TopLevel::currentDatabase()" << endl; return global->databases[global->currentDatabase]; } -QStringList TopLevel::getStrategies() +TQStringList TopLevel::getStrategies() { kdDebug(5004) << "*DCOP call* TopLevel::getStrategies()" << endl; return global->strategies; } -QString TopLevel::currentStrategy() +TQString TopLevel::currentStrategy() { kdDebug(5004) << "*DCOP call* TopLevel::currentStrategy()" << endl; return global->strategies[global->currentStrategy]; } -bool TopLevel::setDatabase(QString db) +bool TopLevel::setDatabase(TQString db) { kdDebug(5004) << "*DCOP call* TopLevel::setDatabase()" << endl; @@ -214,7 +214,7 @@ bool TopLevel::setDatabase(QString db) } -bool TopLevel::setStrategy(QString strategy) +bool TopLevel::setStrategy(TQString strategy) { kdDebug(5004) << "*DCOP call* TopLevel::setStrategy()" << endl; @@ -249,7 +249,7 @@ bool TopLevel::historyGoForward() // ******************************************************************************* -void TopLevel::define(const QString &query) +void TopLevel::define(const TQString &query) { kdDebug(5004) << "TopLevel::define()" << endl; actQueryCombo->setEditText(query); @@ -261,7 +261,7 @@ void TopLevel::defineClipboard() { kdDebug(5004) << "TopLevel::defineClipboard()" << endl; kapp->clipboard()->setSelectionMode(true); - QString text = kapp->clipboard()->text(); + TQString text = kapp->clipboard()->text(); if (text.isEmpty()) { kapp->clipboard()->setSelectionMode(false); text = kapp->clipboard()->text(); @@ -270,7 +270,7 @@ void TopLevel::defineClipboard() } -void TopLevel::match(const QString &query) +void TopLevel::match(const TQString &query) { kdDebug(5004) << "TopLevel::match()" << endl; actQueryCombo->setEditText(query); @@ -282,7 +282,7 @@ void TopLevel::matchClipboard() { kdDebug(5004) << "TopLevel::matchClipboard()" << endl; kapp->clipboard()->setSelectionMode(true); - QString text = kapp->clipboard()->text(); + TQString text = kapp->clipboard()->text(); if (text.isEmpty()) { kapp->clipboard()->setSelectionMode(false); text = kapp->clipboard()->text(); @@ -308,80 +308,80 @@ bool TopLevel::queryClose() void TopLevel::setupActions() { // file menu... - actSave = KStdAction::save(queryView, SLOT(saveQuery()), actionCollection()); + actSave = KStdAction::save(queryView, TQT_SLOT(saveQuery()), actionCollection()); actSave->setText(i18n("&Save As...")); actSave->setEnabled(false); - actPrint = KStdAction::print(queryView, SLOT(printQuery()), actionCollection()); + actPrint = KStdAction::print(queryView, TQT_SLOT(printQuery()), actionCollection()); actPrint->setEnabled(false); actStartQuery = new KAction(i18n("St&art Query"),"reload", 0 , this, - SLOT(doDefine()), actionCollection(), "start_query"); + TQT_SLOT(doDefine()), actionCollection(), "start_query"); actStopQuery = new KAction(i18n("St&op Query"),"stop", 0 , this, - SLOT(stopClients()), actionCollection(), "stop_query"); + TQT_SLOT(stopClients()), actionCollection(), "stop_query"); actStopQuery->setEnabled(false); - KStdAction::quit(kapp, SLOT(closeAllWindows()), actionCollection()); + KStdAction::quit(kapp, TQT_SLOT(closeAllWindows()), actionCollection()); // edit menu... - actCopy = KStdAction::copy(queryView, SLOT(copySelection()), actionCollection()); + actCopy = KStdAction::copy(queryView, TQT_SLOT(copySelection()), actionCollection()); actCopy->setEnabled(false); - KStdAction::selectAll(queryView, SLOT(selectAll()), actionCollection()); + KStdAction::selectAll(queryView, TQT_SLOT(selectAll()), actionCollection()); new KAction(i18n("&Define Clipboard Content"), "define_clip", 0 , this, - SLOT(defineClipboard()), actionCollection(), "define_clipboard"); + TQT_SLOT(defineClipboard()), actionCollection(), "define_clipboard"); new KAction(i18n("&Match Clipboard Content"), 0 , this, - SLOT(matchClipboard()), actionCollection(), "match_clipboard"); - KStdAction::find(queryView, SLOT(showFindDialog()), actionCollection()); + TQT_SLOT(matchClipboard()), actionCollection(), "match_clipboard"); + KStdAction::find(queryView, TQT_SLOT(showFindDialog()), actionCollection()); // history menu... actBack = new KToolBarPopupAction(i18n("&Back"), "back", KStdAccel::shortcut(KStdAccel::Back), - queryView, SLOT(browseBack()), actionCollection(),"browse_back"); + queryView, TQT_SLOT(browseBack()), actionCollection(),"browse_back"); actBack->setDelayed(true); actBack->setStickyMenu(false); actBack->setEnabled(false); actForward = new KToolBarPopupAction(i18n("&Forward"), "forward", KStdAccel::shortcut(KStdAccel::Forward), - queryView, SLOT(browseForward()), actionCollection(),"browse_forward"); + queryView, TQT_SLOT(browseForward()), actionCollection(),"browse_forward"); actForward->setDelayed(true); actForward->setStickyMenu(false); actForward->setEnabled(false); new KAction(i18n("&Clear History"), 0 , this, - SLOT(clearQueryHistory()), actionCollection(), "clear_history"); + TQT_SLOT(clearQueryHistory()), actionCollection(), "clear_history"); // server menu... new KAction(i18n("&Get Capabilities"), 0 , interface, - SLOT(updateServer()), actionCollection(), "get_capabilities"); + TQT_SLOT(updateServer()), actionCollection(), "get_capabilities"); new KAction(i18n("Edit &Database Sets..."), "edit", 0 , this, - SLOT(showSetsDialog()), actionCollection(), "edit_sets"); + TQT_SLOT(showSetsDialog()), actionCollection(), "edit_sets"); new KAction(i18n("&Summary"), 0 , interface, - SLOT(showDatabases()), actionCollection(), "db_summary"); + TQT_SLOT(showDatabases()), actionCollection(), "db_summary"); new KAction(i18n("S&trategy Information"), 0 , interface, - SLOT(showStrategies()), actionCollection(), "strategy_info"); + TQT_SLOT(showStrategies()), actionCollection(), "strategy_info"); new KAction(i18n("&Server Information"), 0 , interface, - SLOT(showInfo()), actionCollection(), "server_info"); + TQT_SLOT(showInfo()), actionCollection(), "server_info"); // settings menu... createStandardStatusBarAction(); setStandardToolBarMenuEnabled(true); actShowMatchList = new KToggleAction(i18n("Show &Match List"), 0 , this, - SLOT(toggleMatchListShow()), actionCollection(), "show_match"); + TQT_SLOT(toggleMatchListShow()), actionCollection(), "show_match"); actShowMatchList->setCheckedState(i18n("Hide &Match List")); actShowMatchList->setChecked(global->showMatchList); - KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), + KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); - KStdAction::configureToolbars(this, SLOT(slotConfToolbar()), actionCollection()); - KStdAction::preferences(this, SLOT(showOptionsDialog()), actionCollection()); + KStdAction::configureToolbars(this, TQT_SLOT(slotConfToolbar()), actionCollection()); + KStdAction::preferences(this, TQT_SLOT(showOptionsDialog()), actionCollection()); // toolbar... new KAction(i18n("Clear Input Field"), "query_erase", 0 , this, - SLOT(clearInput()), actionCollection(), "clear_query"); + TQT_SLOT(clearInput()), actionCollection(), "clear_query"); actQueryLabel = new DictLabelAction(i18n("&Look for:"), actionCollection(), "look_label"); actQueryCombo = new DictComboAction(i18n("Query"), actionCollection(), "query_combo",true,true); - connect(actQueryCombo,SIGNAL(activated(const QString &)), SLOT(define(const QString&))); + connect(actQueryCombo,TQT_SIGNAL(activated(const TQString &)), TQT_SLOT(define(const TQString&))); actQueryCombo->setCompletionMode(global->queryComboCompletionMode); actDbLabel = new DictLabelAction(i18n("&in"), actionCollection(), "in_label"); actDbCombo = new DictComboAction(i18n("Databases"), actionCollection(), "db_combo",false,false); - connect(actDbCombo,SIGNAL(activated(int)),SLOT(databaseSelected(int))); - actDefineBtn = new DictButtonAction(i18n("&Define"), this, SLOT(doDefine()), actionCollection(), "define_btn"); - actMatchBtn = new DictButtonAction(i18n("&Match"), this, SLOT(doMatch()), actionCollection(), "match_btn"); + connect(actDbCombo,TQT_SIGNAL(activated(int)),TQT_SLOT(databaseSelected(int))); + actDefineBtn = new DictButtonAction(i18n("&Define"), this, TQT_SLOT(doDefine()), actionCollection(), "define_btn"); + actMatchBtn = new DictButtonAction(i18n("&Match"), this, TQT_SLOT(doMatch()), actionCollection(), "match_btn"); queryView->setActions(actBack,actForward,actQueryCombo); } @@ -392,13 +392,13 @@ void TopLevel::setupStatusBar() statusBar()->insertItem(i18n(" Ready "),0,2); statusBar()->setItemAlignment(0,AlignLeft | AlignVCenter); - QString serverInfo; + TQString serverInfo; if (global->authEnabled) - serverInfo = QString(" %1@%2:%3 ").arg(getShortString(global->user,50)) + serverInfo = TQString(" %1@%2:%3 ").arg(getShortString(global->user,50)) .arg(getShortString(global->server,50)) .arg(global->port); else - serverInfo = QString(" %1:%3 ").arg(getShortString(global->server,50)) + serverInfo = TQString(" %1:%3 ").arg(getShortString(global->server,50)) .arg(global->port); statusBar()->insertItem(serverInfo, 1,3); statusBar()->setItemAlignment(1,AlignLeft | AlignVCenter); @@ -429,7 +429,7 @@ void TopLevel::recreateGUI() // add text in the query-combobox to the history void TopLevel::addCurrentInputToHistory() { - QString text(actQueryCombo->currentText()); + TQString text(actQueryCombo->currentText()); // maintain queryHistory global->queryHistory.remove(text); // no double entrys @@ -455,7 +455,7 @@ void TopLevel::clearInput() // define text in the combobox void TopLevel::doDefine() { - QString text(actQueryCombo->currentText()); + TQString text(actQueryCombo->currentText()); if (!text.isEmpty()) { @@ -468,7 +468,7 @@ void TopLevel::doDefine() void TopLevel::doMatch() { - QString text(actQueryCombo->currentText()); + TQString text(actQueryCombo->currentText()); if (!text.isEmpty()) { @@ -503,8 +503,8 @@ void TopLevel::buildHistMenu() unsigned int i = 0; while ((i<10)&&(iqueryHistory.count())) { - historyActionList.append( new KAction(getShortString(global->queryHistory[i],70), 0, this, SLOT(queryHistMenu()), - (QObject*)0, global->queryHistory[i].utf8().data()) ); + historyActionList.append( new KAction(getShortString(global->queryHistory[i],70), 0, this, TQT_SLOT(queryHistMenu()), + (TQObject*)0, global->queryHistory[i].utf8().data()) ); i++; } @@ -515,9 +515,9 @@ void TopLevel::buildHistMenu() // process a query via the history menu void TopLevel::queryHistMenu() { - QCString name = sender()->name(); + TQCString name = sender()->name(); if (!name.isEmpty()) - define(QString::fromUtf8(name)); + define(TQString::fromUtf8(name)); } @@ -542,8 +542,8 @@ void TopLevel::stratDbChanged() dbActionList.clear(); for (unsigned int i=0;iserverDatabases.count();i++) - dbActionList.append( new KAction(global->serverDatabases[i], 0, this, SLOT(dbInfoMenuClicked()), - (QObject*)0, global->serverDatabases[i].utf8().data()) ); + dbActionList.append( new KAction(global->serverDatabases[i], 0, this, TQT_SLOT(dbInfoMenuClicked()), + (TQObject*)0, global->serverDatabases[i].utf8().data()) ); plugActionList("db_detail", dbActionList); } @@ -551,7 +551,7 @@ void TopLevel::stratDbChanged() void TopLevel::dbInfoMenuClicked() { - QCString name = sender()->name(); + TQCString name = sender()->name(); if (!name.isEmpty()) interface->showDbInfo(name); } @@ -576,7 +576,7 @@ void TopLevel::enablePrintSave() } -void TopLevel::clientStarted(const QString &message) +void TopLevel::clientStarted(const TQString &message) { statusBar()->changeItem(message,0); resetStatusbarTimer.stop(); @@ -586,7 +586,7 @@ void TopLevel::clientStarted(const QString &message) } -void TopLevel::clientStopped(const QString &message) +void TopLevel::clientStopped(const TQString &message) { statusBar()->changeItem(message,0); resetStatusbarTimer.start(4000); @@ -621,7 +621,7 @@ void TopLevel::renderingStopped() } -void TopLevel::newCaption(const QString &s) +void TopLevel::newCaption(const TQString &s) { setCaption(s); } @@ -641,13 +641,13 @@ void TopLevel::toggleMatchListShow() else // list is not visible -> show it { global->showMatchList = true; - splitter = new QSplitter(QSplitter::Horizontal,this); + splitter = new TQSplitter(TQSplitter::Horizontal,this); splitter->setOpaqueResize( KGlobalSettings::opaqueResize() ); setCentralWidget(splitter); splitter->show(); queryView->reparent(splitter,0,queryView->pos(),true); matchView->reparent(splitter,0,matchView->pos(),true); - splitter->setResizeMode(matchView,QSplitter::KeepSize); + splitter->setResizeMode(matchView,TQSplitter::KeepSize); adjustMatchViewSize(); } @@ -677,7 +677,7 @@ void TopLevel::slotConfToolbar() { saveMainWindowSettings(KGlobal::config(),"toplevel_options"); KEditToolbar dlg(actionCollection(), "kdictui.rc"); - connect(&dlg,SIGNAL( newToolbarConfig() ), this, SLOT( slotNewToolbarConfig() )); + connect(&dlg,TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() )); dlg.exec(); } @@ -695,8 +695,8 @@ void TopLevel::showSetsDialog() { if (!setsDlg) { setsDlg = new DbSetsDialog(this); - connect(setsDlg,SIGNAL(setsChanged()),this,SLOT(setsChanged())); - connect(setsDlg,SIGNAL(dialogClosed()),this,SLOT(hideSetsDialog())); + connect(setsDlg,TQT_SIGNAL(setsChanged()),this,TQT_SLOT(setsChanged())); + connect(setsDlg,TQT_SIGNAL(dialogClosed()),this,TQT_SLOT(hideSetsDialog())); setsDlg->show(); } else { KWin::activateWindow(setsDlg->winId()); @@ -724,8 +724,8 @@ void TopLevel::showOptionsDialog() { if (!optDlg) { optDlg = new OptionsDialog(this); - connect(optDlg,SIGNAL(optionsChanged()),this,SLOT(optionsChanged())); - connect(optDlg,SIGNAL(finished()),this,SLOT(hideOptionsDialog())); + connect(optDlg,TQT_SIGNAL(optionsChanged()),this,TQT_SLOT(optionsChanged())); + connect(optDlg,TQT_SIGNAL(finished()),this,TQT_SLOT(hideOptionsDialog())); optDlg->show(); } else { KWin::activateWindow(optDlg->winId()); @@ -744,13 +744,13 @@ void TopLevel::hideOptionsDialog() void TopLevel::optionsChanged() { - QString serverInfo; + TQString serverInfo; if (global->authEnabled) - serverInfo = QString(" %1@%2:%3 ").arg(getShortString(global->user,50)) + serverInfo = TQString(" %1@%2:%3 ").arg(getShortString(global->user,50)) .arg(getShortString(global->server,50)) .arg(global->port); else - serverInfo = QString(" %1:%3 ").arg(getShortString(global->server,50)) + serverInfo = TQString(" %1:%3 ").arg(getShortString(global->server,50)) .arg(global->port); statusBar()->changeItem(serverInfo,1); interface->serverChanged(); // inform client diff --git a/kdict/toplevel.h b/kdict/toplevel.h index cd8fa25d..bc803f75 100644 --- a/kdict/toplevel.h +++ b/kdict/toplevel.h @@ -17,7 +17,7 @@ #ifndef _TOPLEVEL_H_ #define _TOPLEVEL_H_ -#include +#include #include #include "dcopinterface.h" @@ -43,7 +43,7 @@ class TopLevel : public KMainWindow, virtual public KDictIface public: - TopLevel(QWidget* parent = 0, const char* name = 0); + TopLevel(TQWidget* parent = 0, const char* name = 0); ~TopLevel(); void normalStartup(); // called when started without commandline parameters @@ -51,25 +51,25 @@ public: // DCOP-Interface... void quit(); void makeActiveWindow(); - void definePhrase(QString phrase); - void matchPhrase(QString phrase); + void definePhrase(TQString phrase); + void matchPhrase(TQString phrase); void defineClipboardContent(); void matchClipboardContent(); - QStringList getDatabases(); - QString currentDatabase(); - QStringList getStrategies(); - QString currentStrategy(); - bool setDatabase(QString db); - bool setStrategy(QString strategy); + TQStringList getDatabases(); + TQString currentDatabase(); + TQStringList getStrategies(); + TQString currentStrategy(); + bool setDatabase(TQString db); + bool setStrategy(TQString strategy); bool historyGoBack(); bool historyGoForward(); public slots: - void define(const QString &query); + void define(const TQString &query); void defineClipboard(); - void match(const QString &query); + void match(const TQString &query); void matchClipboard(); protected: @@ -103,13 +103,13 @@ private slots: void enableCopy(bool selected); void enablePrintSave(); - void clientStarted(const QString &message); - void clientStopped(const QString &message); + void clientStarted(const TQString &message); + void clientStopped(const TQString &message); void resetStatusbar(); void renderingStarted(); void renderingStopped(); - void newCaption(const QString&); + void newCaption(const TQString&); void toggleMatchListShow(); void saveMatchViewSize(); @@ -133,16 +133,16 @@ private: DictLabelAction *actQueryLabel, *actDbLabel; DictComboAction *actQueryCombo, *actDbCombo; DictButtonAction *actDefineBtn, *actMatchBtn; - QPtrList historyActionList, dbActionList; + TQPtrList historyActionList, dbActionList; KToolBarPopupAction *actBack, *actForward; - QSplitter *splitter; // widgets.... + TQSplitter *splitter; // widgets.... QueryView *queryView; MatchView *matchView; OptionsDialog *optDlg; DbSetsDialog *setsDlg; - QTimer resetStatusbarTimer; + TQTimer resetStatusbarTimer; int stopRef; // remember how many "clients" are running }; diff --git a/kdnssd/ioslave/dnssd.cpp b/kdnssd/ioslave/dnssd.cpp index b039298a..6508a13a 100644 --- a/kdnssd/ioslave/dnssd.cpp +++ b/kdnssd/ioslave/dnssd.cpp @@ -18,10 +18,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -43,9 +43,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include @@ -60,7 +60,7 @@ static const KCmdLineOptions options[] = KCmdLineLastOption }; -ZeroConfProtocol::ZeroConfProtocol(const QCString& protocol, const QCString &pool_socket, const QCString &app_socket) +ZeroConfProtocol::ZeroConfProtocol(const TQCString& protocol, const TQCString &pool_socket, const TQCString &app_socket) : SlaveBase(protocol, pool_socket, app_socket), browser(0),toResolve(0), configData(0) {} @@ -79,11 +79,11 @@ void ZeroConfProtocol::get(const KURL& url ) { resolveAndRedirect(url,true); mimeType("text/html"); - QString reply= "\n"; + TQString reply= "\n"; reply+="\n\n

"+i18n("Requested service has been launched in separate window."); reply+="

\n"; data(reply.utf8()); - data(QByteArray()); + data(TQByteArray()); finished(); break; } @@ -102,9 +102,9 @@ void ZeroConfProtocol::mimetype(const KURL& url ) UrlType ZeroConfProtocol::checkURL(const KURL& url) { if (url.path()=="/") return RootDir; - QString service, type, domain; + TQString service, type, domain; dissect(url,service,type,domain); - const QString& proto = type.section('.',1,-1); + const TQString& proto = type.section('.',1,-1); if (type[0]!='_' || (proto!="_udp" && proto!="_tcp")) return Invalid; if (service.isEmpty()) return ServiceDir; if (!domain.isEmpty()) { @@ -118,7 +118,7 @@ UrlType ZeroConfProtocol::checkURL(const KURL& url) // URL zeroconf://domain/_http._tcp/some%20service // URL invitation://host:port/_http._tcp/some%20service?u=username&root=directory -void ZeroConfProtocol::dissect(const KURL& url,QString& name,QString& type,QString& domain) +void ZeroConfProtocol::dissect(const KURL& url,TQString& name,TQString& type,TQString& domain) { type = url.path().section("/",1,1); domain = url.host(); @@ -159,7 +159,7 @@ void ZeroConfProtocol::stat(const KURL& url) break; case HelperProtocol: { - QString name,type,domain; + TQString name,type,domain; dissect(url,name,type,domain); buildServiceEntry(entry,name,type,domain); statEntry(entry); @@ -170,15 +170,15 @@ void ZeroConfProtocol::stat(const KURL& url) error(ERR_MALFORMED_URL,i18n("invalid URL")); } } -QString ZeroConfProtocol::getAttribute(const QString& name) +TQString ZeroConfProtocol::getAttribute(const TQString& name) { - QString entry = configData->readEntry(name); - return (entry.isNull()) ? QString::null : toResolve->textData()[entry]; + TQString entry = configData->readEntry(name); + return (entry.isNull()) ? TQString::null : toResolve->textData()[entry]; } void ZeroConfProtocol::resolveAndRedirect(const KURL& url, bool useKRun) { - QString name,type,domain; + TQString name,type,domain; dissect(url,name,type,domain); if (url.protocol()=="invitation") { delete toResolve; @@ -216,7 +216,7 @@ void ZeroConfProtocol::resolveAndRedirect(const KURL& url, bool useKRun) } } -bool ZeroConfProtocol::setConfig(const QString& type) +bool ZeroConfProtocol::setConfig(const TQString& type) { kdDebug() << "Setting config for " << type << endl; if (configData) @@ -233,7 +233,7 @@ bool ZeroConfProtocol::setConfig(const QString& type) return (configData->readEntry("Type")==type); } -inline void buildAtom(UDSEntry& entry,UDSAtomTypes type, const QString& data) +inline void buildAtom(UDSEntry& entry,UDSAtomTypes type, const TQString& data) { UDSAtom atom; atom.m_uds=type; @@ -249,7 +249,7 @@ inline void buildAtom(UDSEntry& entry,UDSAtomTypes type, long data) } -void ZeroConfProtocol::buildDirEntry(UDSEntry& entry,const QString& name,const QString& type, const QString& host) +void ZeroConfProtocol::buildDirEntry(UDSEntry& entry,const TQString& name,const TQString& type, const TQString& host) { entry.clear(); buildAtom(entry,UDS_NAME,name); @@ -259,23 +259,23 @@ void ZeroConfProtocol::buildDirEntry(UDSEntry& entry,const QString& name,const Q buildAtom(entry,UDS_MIME_TYPE,"inode/directory"); if (!type.isNull()) buildAtom(entry,UDS_URL,"zeroconf:/"+((!host.isNull()) ? "/"+host+"/" : "" )+type+"/"); } -QString ZeroConfProtocol::getProtocol(const QString& type) +TQString ZeroConfProtocol::getProtocol(const TQString& type) { setConfig(type); return configData->readEntry("Protocol",type.section(".",0,0).mid(1)); } -void ZeroConfProtocol::buildServiceEntry(UDSEntry& entry,const QString& name,const QString& type,const QString& domain) +void ZeroConfProtocol::buildServiceEntry(UDSEntry& entry,const TQString& name,const TQString& type,const TQString& domain) { setConfig(type); entry.clear(); buildAtom(entry,UDS_NAME,name); buildAtom(entry,UDS_ACCESS,0666); - QString icon=configData->readEntry("Icon",KProtocolInfo::icon(getProtocol(type))); + TQString icon=configData->readEntry("Icon",KProtocolInfo::icon(getProtocol(type))); if (!icon.isNull()) buildAtom(entry,UDS_ICON_NAME,icon); KURL protourl; protourl.setProtocol(getProtocol(type)); - QString encname = "zeroconf://" + domain +"/" +type+ "/" + name; + TQString encname = "zeroconf://" + domain +"/" +type+ "/" + name; if (KProtocolInfo::supportsListing(protourl)) { buildAtom(entry,UDS_FILE_TYPE,S_IFDIR); encname+="/"; @@ -294,15 +294,15 @@ void ZeroConfProtocol::listDir(const KURL& url ) if (allDomains=url.host().isEmpty()) browser = new ServiceBrowser(ServiceBrowser::AllServices); else browser = new ServiceBrowser(ServiceBrowser::AllServices,url.host()); - connect(browser,SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)), - this,SLOT(newType(DNSSD::RemoteService::Ptr))); + connect(browser,TQT_SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)), + this,TQT_SLOT(newType(DNSSD::RemoteService::Ptr))); break; case ServiceDir: if (url.host().isEmpty()) browser = new ServiceBrowser(url.path(-1).section("/",1,-1)); else browser = new ServiceBrowser(url.path(-1).section("/",1,-1),url.host()); - connect(browser,SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)), - this,SLOT(newService(DNSSD::RemoteService::Ptr))); + connect(browser,TQT_SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)), + this,TQT_SLOT(newService(DNSSD::RemoteService::Ptr))); break; case Service: resolveAndRedirect(url); @@ -311,7 +311,7 @@ void ZeroConfProtocol::listDir(const KURL& url ) error(ERR_MALFORMED_URL,i18n("invalid URL")); return; } - connect(browser,SIGNAL(finished()),this,SLOT(allReported())); + connect(browser,TQT_SIGNAL(finished()),this,TQT_SLOT(allReported())); browser->startBrowse(); kapp->eventLoop()->enterLoop(); } @@ -332,9 +332,9 @@ void ZeroConfProtocol::newType(DNSSD::RemoteService::Ptr srv) UDSEntry entry; kdDebug() << "Got new entry " << srv->type() << endl; if (!setConfig(srv->type())) return; - QString name = configData->readEntry("Name"); + TQString name = configData->readEntry("Name"); if (!name.isNull()) { - buildDirEntry(entry,name,srv->type(), (allDomains) ? QString::null : + buildDirEntry(entry,name,srv->type(), (allDomains) ? TQString::null : browser->browsedDomains()->domains()[0]); listEntry(entry,false); } diff --git a/kdnssd/ioslave/dnssd.h b/kdnssd/ioslave/dnssd.h index 1dc1dc05..8aaa90a8 100644 --- a/kdnssd/ioslave/dnssd.h +++ b/kdnssd/ioslave/dnssd.h @@ -21,16 +21,16 @@ #ifndef _dnssd_H_ #define _dnssd_H_ -#include -#include -#include +#include +#include +#include #include #include #include #include #include -#include +#include class QCString; @@ -39,11 +39,11 @@ using namespace DNSSD; enum UrlType { RootDir, ServiceDir, Service, HelperProtocol, Invalid }; -class ZeroConfProtocol : public QObject, public KIO::SlaveBase +class ZeroConfProtocol : public TQObject, public KIO::SlaveBase { Q_OBJECT public: - ZeroConfProtocol(const QCString& protocol, const QCString &pool_socket, const QCString &app_socket); + ZeroConfProtocol(const TQCString& protocol, const TQCString &pool_socket, const TQCString &app_socket); ~ZeroConfProtocol(); virtual void get(const KURL& url); virtual void mimetype(const KURL& url); @@ -51,26 +51,26 @@ public: virtual void listDir(const KURL& url ); private: // Create UDSEntry for zeroconf:/ or zeroconf:/type/ paths - void buildDirEntry(UDSEntry& entry,const QString& name,const QString& type=QString::null, - const QString& host=QString::null); + void buildDirEntry(UDSEntry& entry,const TQString& name,const TQString& type=TQString::null, + const TQString& host=TQString::null); // Create UDSEntry for single services: dnssd:/type/service - void buildServiceEntry(UDSEntry& entry,const QString& name,const QString& type, - const QString& domain); + void buildServiceEntry(UDSEntry& entry,const TQString& name,const TQString& type, + const TQString& domain); // Returns root dir, service dir, service or invalid UrlType checkURL(const KURL& url); // extract name, type and domain from URL - void dissect(const KURL& url,QString& name,QString& type,QString& domain); + void dissect(const KURL& url,TQString& name,TQString& type,TQString& domain); // resolve given service and redirect() to it or use KRun on it (used for helper protocols) void resolveAndRedirect(const KURL& url, bool useKRun = false); bool dnssdOK(); - QString getAttribute(const QString& name); - QString getProtocol(const QString& type); + TQString getAttribute(const TQString& name); + TQString getProtocol(const TQString& type); // try to load config file for given service type (or just return if already loaded) - bool setConfig(const QString& type); + bool setConfig(const TQString& type); ServiceBrowser* browser; // service types merged from all domains - to avoid duplicates - QStringList mergedtypes; + TQStringList mergedtypes; // last resolved or still being resolved services - acts as one-entry cache RemoteService *toResolve; // Config file for service - also acts as one-entry cache diff --git a/kdnssd/kdedmodule/dnssdwatcher.cpp b/kdnssd/kdedmodule/dnssdwatcher.cpp index a7eb256f..7e1ef6d2 100644 --- a/kdnssd/kdedmodule/dnssdwatcher.cpp +++ b/kdnssd/kdedmodule/dnssdwatcher.cpp @@ -26,7 +26,7 @@ #include "watcher.h" -DNSSDWatcher::DNSSDWatcher(const QCString& obj) +DNSSDWatcher::DNSSDWatcher(const TQCString& obj) : KDEDModule(obj) { connectDCOPSignal("","KDirNotify","enteredDirectory(KURL)","enteredDirectory(KURL)",false); @@ -34,12 +34,12 @@ DNSSDWatcher::DNSSDWatcher(const QCString& obj) watchers.setAutoDelete(true); } -QStringList DNSSDWatcher::watchedDirectories() +TQStringList DNSSDWatcher::watchedDirectories() { //TODO // return watchers.keys(); - QStringList keys; - for (QDictIterator it(watchers) ; it.current(); ++it ) { + TQStringList keys; + for (TQDictIterator it(watchers) ; it.current(); ++it ) { keys << it.currentKey(); kdDebug() << it.currentKey() << " " << (*it)->refcount << "\n"; } @@ -48,7 +48,7 @@ return keys; // from ioslave -void DNSSDWatcher::dissect(const KURL& url,QString& name,QString& type,QString& domain) +void DNSSDWatcher::dissect(const KURL& url,TQString& name,TQString& type,TQString& domain) { type = url.path().section("/",1,1); domain = url.host(); @@ -76,7 +76,7 @@ void DNSSDWatcher::leftDirectory(const KURL& dir) void DNSSDWatcher::createNotifier(const KURL& url) { - QString domain,type,name; + TQString domain,type,name; dissect(url,name,type,domain); if (type.isEmpty()) type = DNSSD::ServiceBrowser::AllServices; Watcher *w = new Watcher(type,domain); @@ -84,7 +84,7 @@ void DNSSDWatcher::createNotifier(const KURL& url) } extern "C" { - KDE_EXPORT KDEDModule *create_dnssdwatcher(const QCString &obj) + KDE_EXPORT KDEDModule *create_dnssdwatcher(const TQCString &obj) { KGlobal::locale()->insertCatalogue("dnssdwatcher"); return new DNSSDWatcher(obj); diff --git a/kdnssd/kdedmodule/dnssdwatcher.h b/kdnssd/kdedmodule/dnssdwatcher.h index eb2d7092..2baea9fe 100644 --- a/kdnssd/kdedmodule/dnssdwatcher.h +++ b/kdnssd/kdedmodule/dnssdwatcher.h @@ -19,10 +19,10 @@ #ifndef _DNSSDWATCHER_H_ #define _DNSSDWATCHER_H_ -#include +#include #include -#include -#include +#include +#include #include class Watcher; @@ -31,18 +31,18 @@ class DNSSDWatcher : public KDEDModule Q_OBJECT K_DCOP public: - DNSSDWatcher(const QCString& obj); + DNSSDWatcher(const TQCString& obj); k_dcop: - QStringList watchedDirectories(); + TQStringList watchedDirectories(); void enteredDirectory(const KURL& dir); void leftDirectory(const KURL& dir); private: - QDict watchers; + TQDict watchers; void createNotifier(const KURL& url); - void dissect(const KURL& url,QString& name,QString& type,QString& domain); + void dissect(const KURL& url,TQString& name,TQString& type,TQString& domain); }; diff --git a/kdnssd/kdedmodule/watcher.cpp b/kdnssd/kdedmodule/watcher.cpp index d4dcc95a..f6b7a973 100644 --- a/kdnssd/kdedmodule/watcher.cpp +++ b/kdnssd/kdedmodule/watcher.cpp @@ -21,20 +21,20 @@ #include #include -#include +#include -Watcher::Watcher(const QString& type, const QString& domain) +Watcher::Watcher(const TQString& type, const TQString& domain) : refcount(1), updateNeeded(false), m_type(type), m_domain(domain) { if (domain.isEmpty()) browser = new ServiceBrowser(type); else browser = new ServiceBrowser(type,domain); - connect(browser,SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)), - SLOT(serviceAdded(DNSSD::RemoteService::Ptr))); - connect(browser,SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr)), - SLOT(serviceRemoved(DNSSD::RemoteService::Ptr))); - connect(browser,SIGNAL(finished()),SLOT(finished())); + connect(browser,TQT_SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)), + TQT_SLOT(serviceAdded(DNSSD::RemoteService::Ptr))); + connect(browser,TQT_SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr)), + TQT_SLOT(serviceRemoved(DNSSD::RemoteService::Ptr))); + connect(browser,TQT_SIGNAL(finished()),TQT_SLOT(finished())); browser->startBrowse(); } @@ -59,7 +59,7 @@ void Watcher::finished() KDirNotify_stub st("*","*"); kdDebug() << "Finished for " << m_type << "@" << m_domain << "\n"; if (updateNeeded || removed.count()) { - QString url = "zeroconf:/"; + TQString url = "zeroconf:/"; if (!m_domain.isEmpty()) url+="/"+m_domain+"/"; if (m_type!=ServiceBrowser::AllServices) url+=m_type; kdDebug() << "Sending update: " << url << "\n"; diff --git a/kdnssd/kdedmodule/watcher.h b/kdnssd/kdedmodule/watcher.h index 84e9104e..64c5635c 100644 --- a/kdnssd/kdedmodule/watcher.h +++ b/kdnssd/kdedmodule/watcher.h @@ -19,7 +19,7 @@ #ifndef _WATCHER_H_ #define _WATCHER_H_ -#include +#include #include #include @@ -29,16 +29,16 @@ class Watcher : public QObject { Q_OBJECT public: - Watcher(const QString& type, const QString& domain); + Watcher(const TQString& type, const TQString& domain); ~Watcher(); unsigned int refcount; private: ServiceBrowser* browser; bool updateNeeded; - QString m_type; - QString m_domain; - QValueList removed; + TQString m_type; + TQString m_domain; + TQValueList removed; private slots: void serviceRemoved(DNSSD::RemoteService::Ptr srv); diff --git a/kfile-plugins/torrent/bbase.h b/kfile-plugins/torrent/bbase.h index 046bd545..36eccd39 100644 --- a/kfile-plugins/torrent/bbase.h +++ b/kfile-plugins/torrent/bbase.h @@ -79,11 +79,11 @@ class BBase : public KShared /** * Outputs the b-encoded representation of the object to the given - * QIODevice. - * @param device the QIODevice to write to + * TQIODevice. + * @param device the TQIODevice to write to * @return true on a successful write, false otherwise */ - virtual bool writeToDevice (QIODevice &device) = 0; + virtual bool writeToDevice (TQIODevice &device) = 0; }; #endif /* _BBASE_H */ diff --git a/kfile-plugins/torrent/bdict.cpp b/kfile-plugins/torrent/bdict.cpp index 2dd7457e..4819165c 100644 --- a/kfile-plugins/torrent/bdict.cpp +++ b/kfile-plugins/torrent/bdict.cpp @@ -16,8 +16,8 @@ * If not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include @@ -27,7 +27,7 @@ #include "bint.h" #include "blist.h" -BDict::BDict (QByteArray &dict, int start) +BDict::BDict (TQByteArray &dict, int start) : m_map(), m_valid(false) { ByteTape tape(dict, start); @@ -108,7 +108,7 @@ void BDict::init (ByteTape &tape) BDict::~BDict () { - // QDict will take care of deleting each entry that + // TQDict will take care of deleting each entry that // it holds. } @@ -152,7 +152,7 @@ BString *BDict::findStr (const char *key) return 0; } -bool BDict::writeToDevice(QIODevice &device) +bool BDict::writeToDevice(TQIODevice &device) { if (!isValid()) return false; @@ -172,25 +172,25 @@ bool BDict::writeToDevice(QIODevice &device) } // Strings are supposed to be written in the dictionary such that - // the keys are in sorted order. QDictIterator doesn't support an + // the keys are in sorted order. TQDictIterator doesn't support an // ordering, so we have to get a list of all the keys, sort it, and // then go by the list. BBaseHashIterator iter (m_map); - QStringList key_list; + TQStringList key_list; for ( ; iter.current(); ++iter) key_list.append(iter.currentKey()); key_list.sort(); - QStringList::Iterator key_iter; + TQStringList::Iterator key_iter; for (key_iter = key_list.begin(); key_iter != key_list.end(); ++key_iter) { - QCString utfString = (*key_iter).utf8(); - QString str = QString("%1:").arg(utfString.size() - 1); + TQCString utfString = (*key_iter).utf8(); + TQString str = TQString("%1:").arg(utfString.size() - 1); - QCString lenString = str.utf8(); + TQCString lenString = str.utf8(); // Write out length of key device.writeBlock(lenString.data(), lenString.size() - 1); diff --git a/kfile-plugins/torrent/bdict.h b/kfile-plugins/torrent/bdict.h index 4722b9ec..77516c7f 100644 --- a/kfile-plugins/torrent/bdict.h +++ b/kfile-plugins/torrent/bdict.h @@ -19,14 +19,14 @@ #ifndef _BDICT_H #define _BDICT_H -#include -#include // QByteArray +#include +#include // QByteArray #include "bytetape.h" #include "bbase.h" // Some useful typedefs -typedef QDict BBaseHash; -typedef QDictIterator BBaseHashIterator; +typedef TQDict BBaseHash; +typedef TQDictIterator BBaseHashIterator; // Forward declarations class BInt; @@ -53,7 +53,7 @@ class BDict : public BBase * @param dict the buffer containing the b-encoded dictionary * @param start the position of the data within the buffer */ - BDict (QByteArray &dict, int start = 0); + BDict (TQByteArray &dict, int start = 0); /** * Construct a dictionary from a ByteTape. The data and current @@ -166,17 +166,17 @@ class BDict : public BBase /** * Outputs the b-encoded representation of the object to the given - * QIODevice. - * @param device the QIODevice to write to + * TQIODevice. + * @param device the TQIODevice to write to * @return true on a successful write, false otherwise */ - virtual bool writeToDevice (QIODevice &device); + virtual bool writeToDevice (TQIODevice &device); /** - * Returns a QDictIterator that you can use to iterate through + * Returns a TQDictIterator that you can use to iterate through * the items in the dictionary. * - * @return QDictIterator, which can be used to iterate through + * @return TQDictIterator, which can be used to iterate through * the items in the dictionary. */ BBaseHashIterator iterator() const @@ -194,7 +194,7 @@ class BDict : public BBase */ void init (ByteTape &tape); - BBaseHash m_map; /// The QDict that actually store the data + BBaseHash m_map; /// The TQDict that actually store the data bool m_valid; /// Store initialization status }; diff --git a/kfile-plugins/torrent/bint.cpp b/kfile-plugins/torrent/bint.cpp index eb96fcba..567edece 100644 --- a/kfile-plugins/torrent/bint.cpp +++ b/kfile-plugins/torrent/bint.cpp @@ -16,16 +16,16 @@ * If not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include "bytetape.h" #include "bint.h" // A bencoded int is (approximately) as follows: // i(\d)+e -BInt::BInt (QByteArray &dict, int start) +BInt::BInt (TQByteArray &dict, int start) : m_value (0), m_valid(false) { ByteTape tape (dict, start); @@ -45,7 +45,7 @@ void BInt::init (ByteTape &tape) tape ++; // Move to start of digits - QByteArray &dict (tape.data()); + TQByteArray &dict (tape.data()); if (dict.find('e', tape.pos()) == -1) return; @@ -56,12 +56,12 @@ void BInt::init (ByteTape &tape) ptr += tape.pos(); // Advance to current position in tape // Allocate temporary data buffer - QByteArray buffer(length + 1); + TQByteArray buffer(length + 1); qmemmove (buffer.data(), ptr, length); buffer[length] = 0; // Null-terminate - QString numberString (buffer); + TQString numberString (buffer); bool a_isValid; // We want to make sure the string is a valid number m_value = numberString.toLongLong(&a_isValid); @@ -77,13 +77,13 @@ BInt::~BInt() /* Nothing yet */ } -bool BInt::writeToDevice (QIODevice &device) +bool BInt::writeToDevice (TQIODevice &device) { if (!m_valid) return false; /* Write out i234e, and such */ - QString str = QString("i%1e"). + TQString str = TQString("i%1e"). arg (m_value); Q_LONG written = 0, result = 0; diff --git a/kfile-plugins/torrent/bint.h b/kfile-plugins/torrent/bint.h index 02875bad..7e1fc582 100644 --- a/kfile-plugins/torrent/bint.h +++ b/kfile-plugins/torrent/bint.h @@ -19,7 +19,7 @@ #ifndef _BINT_H #define _BINT_H -#include +#include #include "bbase.h" #include "bytetape.h" @@ -42,7 +42,7 @@ class BInt : public BBase * @param start the position within the buffer of the beginning * of the b-encoded integer. */ - BInt (QByteArray &dict, int start = 0); + BInt (TQByteArray &dict, int start = 0); /** * Constructs a BInt by reading a b-encoded integer from @p tape. @@ -86,11 +86,11 @@ class BInt : public BBase /** * Outputs the b-encoded representation of the object to the given - * QIODevice. - * @param device the QIODevice to write to + * TQIODevice. + * @param device the TQIODevice to write to * @return true on a successful write, false otherwise */ - virtual bool writeToDevice (QIODevice &device); + virtual bool writeToDevice (TQIODevice &device); private: diff --git a/kfile-plugins/torrent/blist.cpp b/kfile-plugins/torrent/blist.cpp index d9d10021..8b11fbc6 100644 --- a/kfile-plugins/torrent/blist.cpp +++ b/kfile-plugins/torrent/blist.cpp @@ -16,7 +16,7 @@ * If not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include "bytetape.h" #include "blist.h" @@ -30,7 +30,7 @@ BList::BList (ByteTape &tape) init (tape); } -BList::BList (QByteArray &dict, unsigned int start) +BList::BList (TQByteArray &dict, unsigned int start) : m_valid(false), m_array() { ByteTape tape (dict, start); @@ -136,7 +136,7 @@ BString * BList::indexStr (unsigned int i) return 0; } -bool BList::writeToDevice(QIODevice &device) +bool BList::writeToDevice(TQIODevice &device) { if (!m_valid) return false; diff --git a/kfile-plugins/torrent/blist.h b/kfile-plugins/torrent/blist.h index a00cca87..4085ec39 100644 --- a/kfile-plugins/torrent/blist.h +++ b/kfile-plugins/torrent/blist.h @@ -19,13 +19,13 @@ #ifndef _BLIST_H #define _BLIST_H -#include -#include +#include +#include #include "bbase.h" #include "bytetape.h" -typedef QValueList BBaseVector; -typedef QValueList::iterator BBaseVectorIterator; +typedef TQValueList BBaseVector; +typedef TQValueList::iterator BBaseVectorIterator; // Predeclare the following classes class BDict; @@ -50,7 +50,7 @@ class BList : public BBase * @param start the position in the buffer to start * reading from */ - BList (QByteArray &dict, unsigned int start = 0); + BList (TQByteArray &dict, unsigned int start = 0); /** * Construct a BList from @p tape. Any changes made to @@ -175,11 +175,11 @@ class BList : public BBase /** * Outputs the b-encoded representation of the object to the given - * QIODevice. - * @param device the QIODevice to write to + * TQIODevice. + * @param device the TQIODevice to write to * @return true on a successful write, false otherwise */ - virtual bool writeToDevice (QIODevice &device); + virtual bool writeToDevice (TQIODevice &device); private: diff --git a/kfile-plugins/torrent/bstring.cpp b/kfile-plugins/torrent/bstring.cpp index 30be9704..924acdbc 100644 --- a/kfile-plugins/torrent/bstring.cpp +++ b/kfile-plugins/torrent/bstring.cpp @@ -16,15 +16,15 @@ * If not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include "bstring.h" #include "bytetape.h" -BString::BString (QByteArray &dict, int start) : +BString::BString (TQByteArray &dict, int start) : m_data(), m_valid(false) { ByteTape tape (dict, start); @@ -37,12 +37,12 @@ BString::BString (ByteTape &tape) init (tape); } -// The reason we don't store stuff in a QString is because BitTorrent +// The reason we don't store stuff in a TQString is because BitTorrent // b-encoded strings may contain zeroes within the string, which makes // a BString more of a buffer than a true string. void BString::init (ByteTape &tape) { - QByteArray &dict(tape.data()); + TQByteArray &dict(tape.data()); if (dict.find(':', tape.pos()) == -1) { @@ -57,11 +57,11 @@ void BString::init (ByteTape &tape) ptr += tape.pos(); - QByteArray buffer (length + 1); + TQByteArray buffer (length + 1); qmemmove (buffer.data(), ptr, length); buffer[length] = 0; - QString numberString (buffer); + TQString numberString (buffer); bool a_isValid; ulong len = numberString.toULong (&a_isValid); @@ -99,15 +99,15 @@ BString::~BString () { } -bool BString::writeToDevice(QIODevice &device) +bool BString::writeToDevice(TQIODevice &device) { if (!m_valid) return false; - QString str = QString("%1:"). + TQString str = TQString("%1:"). arg(get_len()); - QCString utfString = str.utf8(); + TQCString utfString = str.utf8(); /* Don't write null terminator */ device.writeBlock (utfString.data(), utfString.size() - 1); @@ -119,7 +119,7 @@ bool BString::writeToDevice(QIODevice &device) return true; } -bool BString::setValue (const QString &str) +bool BString::setValue (const TQString &str) { m_data = str.utf8(); return true; diff --git a/kfile-plugins/torrent/bstring.h b/kfile-plugins/torrent/bstring.h index 81b1b0b0..c51311fc 100644 --- a/kfile-plugins/torrent/bstring.h +++ b/kfile-plugins/torrent/bstring.h @@ -19,8 +19,8 @@ #ifndef _BSTRING_H #define _BSTRING_H -#include -#include +#include +#include #include "bytetape.h" #include "bbase.h" @@ -45,7 +45,7 @@ class BString : public BBase * @param start the position in the buffer to start * reading from */ - BString (QByteArray &dict, int start = 0); + BString (TQByteArray &dict, int start = 0); /** * Construct a BString from @p tape. Any changes made to @@ -67,14 +67,14 @@ class BString : public BBase virtual ~BString (); /** - * Returns a QString representation of the data in the + * Returns a TQString representation of the data in the * BString. It is the responsibility of the caller to ensure - * that the data is convertible to a QString. More specifically, + * that the data is convertible to a TQString. More specifically, * the data should not contain any embedded NULLs. * - * @return QString containing the data from this BString. + * @return TQString containing the data from this BString. */ - QString get_string() const { return QString::fromUtf8(m_data.data()); } + TQString get_string() const { return TQString::fromUtf8(m_data.data()); } /** * Returns the amount of data held by the string. It would be @@ -104,20 +104,20 @@ class BString : public BBase /** * Outputs the b-encoded representation of the object to the given - * QIODevice. - * @param device the QIODevice to write to + * TQIODevice. + * @param device the TQIODevice to write to * @return true on a successful write, false otherwise */ - virtual bool writeToDevice (QIODevice &device); + virtual bool writeToDevice (TQIODevice &device); /** - * Changes the value of the string to the given QString. + * Changes the value of the string to the given TQString. * - * @param str the QString containing the new value + * @param str the TQString containing the new value * @return true if the value was successfully changed, * false otherwise. */ - bool setValue (const QString &str); + bool setValue (const TQString &str); private: @@ -129,7 +129,7 @@ class BString : public BBase */ void init (ByteTape &tape); - QByteArray m_data; + TQByteArray m_data; bool m_valid; }; diff --git a/kfile-plugins/torrent/bytetape.cpp b/kfile-plugins/torrent/bytetape.cpp index 19c9d3d8..5d6b8099 100644 --- a/kfile-plugins/torrent/bytetape.cpp +++ b/kfile-plugins/torrent/bytetape.cpp @@ -21,7 +21,7 @@ #include "bytetape.h" -ByteTape::ByteTape (QByteArray &array, int pos) +ByteTape::ByteTape (TQByteArray &array, int pos) : m_array(array), m_shared(new ByteTapeShared) { m_shared->pos = pos; diff --git a/kfile-plugins/torrent/bytetape.h b/kfile-plugins/torrent/bytetape.h index 55fef4b5..4c803122 100644 --- a/kfile-plugins/torrent/bytetape.h +++ b/kfile-plugins/torrent/bytetape.h @@ -21,7 +21,7 @@ #include -#include +#include class ByteTapeShared : public KShared { @@ -31,7 +31,7 @@ class ByteTapeShared : public KShared }; /** - * Class to simulate a seekable byte stream. Very similar to QByteArray, + * Class to simulate a seekable byte stream. Very similar to TQByteArray, * but the difference is that this class "knows" what a current position * is. Also, the copy constructor will share the byte stream of the * ByteTape being copied. This means that any copies made of an object of @@ -54,7 +54,7 @@ class ByteTape * @param pos the initial position of the tape head. It must be * a position within the buffer contained in @p array. */ - ByteTape (QByteArray &array, int pos = 0); + ByteTape (TQByteArray &array, int pos = 0); /** * Creates a ByteTape as a copy of @p tape. The newly created @@ -177,15 +177,15 @@ class ByteTape bool setPos(unsigned int pos); /** - * Returns a reference to the QByteArray used to hold all the data. + * Returns a reference to the TQByteArray used to hold all the data. * - * @return the QByteArray used to hold the data + * @return the TQByteArray used to hold the data * @see QByteArray */ - QByteArray &data() { return m_array; } + TQByteArray &data() { return m_array; } private: - QByteArray &m_array; + TQByteArray &m_array; KSharedPtr m_shared; }; diff --git a/kfile-plugins/torrent/kfile_torrent.cpp b/kfile-plugins/torrent/kfile_torrent.cpp index 2d97915e..4aca75bc 100644 --- a/kfile-plugins/torrent/kfile_torrent.cpp +++ b/kfile-plugins/torrent/kfile_torrent.cpp @@ -16,11 +16,11 @@ * If not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -34,11 +34,11 @@ typedef KGenericFactory TorrentFactory; K_EXPORT_COMPONENT_FACTORY(kfile_torrent, TorrentFactory("kfile_torrent")) -QStringList filesList (BList *list); +TQStringList filesList (BList *list); Q_ULLONG filesLength (BList *list); -KTorrentPlugin::KTorrentPlugin (QObject *parent, const char *name, - const QStringList &args) +KTorrentPlugin::KTorrentPlugin (TQObject *parent, const char *name, + const TQStringList &args) : KFilePlugin (parent, name, args), m_failed(true), m_dict(0) { KFileMimeTypeInfo *info = addMimeTypeInfo ("application/x-bittorrent"); @@ -59,7 +59,7 @@ KTorrentPlugin::KTorrentPlugin (QObject *parent, const char *name, KFileMimeTypeInfo::ItemInfo *item = 0; - item = addItemInfo(group, "name", i18n("Name"), QVariant::String); + item = addItemInfo(group, "name", i18n("Name"), TQVariant::String); if (!item) { kdError() << "Error adding Name to group!\n"; @@ -68,7 +68,7 @@ KTorrentPlugin::KTorrentPlugin (QObject *parent, const char *name, setHint (item, KFileMimeTypeInfo::Name); setAttributes (item, KFileMimeTypeInfo::Modifiable); - item = addItemInfo(group, "length", i18n("Torrent Length"), QVariant::ULongLong); + item = addItemInfo(group, "length", i18n("Torrent Length"), TQVariant::ULongLong); if (!item) { kdError() << "Error adding Length to group!\n"; @@ -77,28 +77,28 @@ KTorrentPlugin::KTorrentPlugin (QObject *parent, const char *name, setHint (item, KFileMimeTypeInfo::Length); setUnit (item, KFileMimeTypeInfo::Bytes); - item = addItemInfo(group, "announce", i18n("Tracker URL"), QVariant::String); + item = addItemInfo(group, "announce", i18n("Tracker URL"), TQVariant::String); if (!item) { kdError() << "Error adding Announce to group!\n"; return; } - item = addItemInfo(group, "creation date", i18n("Date Created"), QVariant::DateTime); + item = addItemInfo(group, "creation date", i18n("Date Created"), TQVariant::DateTime); if (!item) { kdError() << "Error adding DateCreated to group!\n"; return; } - item = addItemInfo(group, "NumFiles", i18n("Number of Files"), QVariant::Int); + item = addItemInfo(group, "NumFiles", i18n("Number of Files"), TQVariant::Int); if (!item) { kdError() << "Error adding NumFiles to group!\n"; return; } - item = addItemInfo(group, "piece length", i18n("File Piece Length"), QVariant::Int); + item = addItemInfo(group, "piece length", i18n("File Piece Length"), TQVariant::Int); if (!item) { kdError() << "Error adding PieceLength to group!\n"; @@ -106,7 +106,7 @@ KTorrentPlugin::KTorrentPlugin (QObject *parent, const char *name, } setUnit (item, KFileMimeTypeInfo::Bytes); - item = addItemInfo(group, "comment", i18n("Comment"), QVariant::String); + item = addItemInfo(group, "comment", i18n("Comment"), TQVariant::String); if (!item) { kdError() << "Error adding Comment to group!\n"; @@ -129,7 +129,7 @@ bool KTorrentPlugin::readInfo (KFileMetaInfo &info, unsigned int) return false; } - QFile file (info.path()); + TQFile file (info.path()); if (!file.open(IO_ReadOnly)) { kdError() << "Unable to open given file!\n"; @@ -137,7 +137,7 @@ bool KTorrentPlugin::readInfo (KFileMetaInfo &info, unsigned int) } // We need to read in the entire file to parse the dictionary structure. - QByteArray buf = file.readAll(); + TQByteArray buf = file.readAll(); file.close(); if (!buf) @@ -171,20 +171,20 @@ bool KTorrentPlugin::readInfo (KFileMetaInfo &info, unsigned int) BString *str = m_dict->findStr ("announce"); if (!str) return false; - appendItem (group, "announce", QString(str->get_string())); + appendItem (group, "announce", TQString(str->get_string())); } if (m_dict->contains("creation date")) { BInt *the_data = m_dict->findInt ("creation date"); - QDateTime my_date; + TQDateTime my_date; if (!the_data) return false; unsigned int the_time = the_data->get_value(); - /* Hopefully the_time is UTC, because that's what QDateTime does. */ + /* Hopefully the_time is UTC, because that's what TQDateTime does. */ my_date.setTime_t (the_time); appendItem (group, "creation date", my_date); } @@ -229,7 +229,7 @@ bool KTorrentPlugin::readInfo (KFileMetaInfo &info, unsigned int) if (!str) return false; - QString real_str (str->get_string()); + TQString real_str (str->get_string()); if (num_files > 1 && !real_str.endsWith("/")) real_str.append('/'); @@ -253,18 +253,18 @@ bool KTorrentPlugin::readInfo (KFileMetaInfo &info, unsigned int) appendItem (group, "comment", comment->get_string()); } else - appendItem (group, "comment", QString()); + appendItem (group, "comment", TQString()); return true; } -/* Returns a QStringList containing file names within the list. The list +/* Returns a TQStringList containing file names within the list. The list * should be the one contained within the info dictionary of the torrent, * keyed by 'files' */ -QStringList filesList (BList *list) +TQStringList filesList (BList *list) { - QStringList str_list, failList; + TQStringList str_list, failList; for (unsigned int i = 0; i < list->count(); ++i) { @@ -283,7 +283,7 @@ QStringList filesList (BList *list) if (!list_path) return failList; - QString str; + TQString str; BString *temp_str; if (list_path->count() > 0) @@ -295,10 +295,10 @@ QStringList filesList (BList *list) str.append (temp_str->get_string()); } - /* Construct QString consisting of path and file name */ + /* Construct TQString consisting of path and file name */ for (unsigned int j = 1; j < list_path->count(); ++j) { - str.append (QDir::separator()); + str.append (TQDir::separator()); temp_str = list_path->indexStr (j); if (!temp_str) return failList; @@ -347,17 +347,17 @@ bool KTorrentPlugin::writeInfo(const KFileMetaInfo &info) const // The m_dict is ready, all we have to do is open a file, and // let 'er go. - QStringList list = info.groups(); - QStringList::Iterator it = list.begin(); + TQStringList list = info.groups(); + TQStringList::Iterator it = list.begin(); for (; it != list.end(); ++it) { - QStringList list2 = info[*it].keys(); - QStringList::Iterator it2 = list2.begin(); + TQStringList list2 = info[*it].keys(); + TQStringList::Iterator it2 = list2.begin(); for (; it2 != list2.end(); ++it2) { - QString key = *it2; + TQString key = *it2; if (info[*it][key].isModified()) { @@ -380,10 +380,10 @@ bool KTorrentPlugin::writeInfo(const KFileMetaInfo &info) const if (!name_str) return false; - QString the_name = info[*it][key].value().toString(); + TQString the_name = info[*it][key].value().toString(); // Remove trailing slashes - the_name.replace (QRegExp("/*$"), ""); + the_name.replace (TQRegExp("/*$"), ""); name_str->setValue (the_name); } @@ -391,7 +391,7 @@ bool KTorrentPlugin::writeInfo(const KFileMetaInfo &info) const } } - QFile output (info.path()); + TQFile output (info.path()); if (!output.open(IO_WriteOnly | IO_Truncate)) return false; diff --git a/kfile-plugins/torrent/kfile_torrent.h b/kfile-plugins/torrent/kfile_torrent.h index 282fda23..3c7fc83a 100644 --- a/kfile-plugins/torrent/kfile_torrent.h +++ b/kfile-plugins/torrent/kfile_torrent.h @@ -47,7 +47,7 @@ class KTorrentPlugin : public KFilePlugin * @param name the name of this object (not user-readable) * @param args unused by this class */ - KTorrentPlugin (QObject *parent, const char *name, const QStringList &args); + KTorrentPlugin (TQObject *parent, const char *name, const TQStringList &args); /** * Destructor that closes the dictionary holding the torrent information. diff --git a/kget/dlgAdvanced.cpp b/kget/dlgAdvanced.cpp index 43b0265c..e4dee980 100644 --- a/kget/dlgAdvanced.cpp +++ b/kget/dlgAdvanced.cpp @@ -24,8 +24,8 @@ * ***************************************************************************/ -#include -#include +#include +#include #include @@ -38,7 +38,7 @@ -DlgAdvanced::DlgAdvanced(QWidget * parent) +DlgAdvanced::DlgAdvanced(TQWidget * parent) : DlgAdvancedBase(parent) { cb_partial->hide(); @@ -84,7 +84,7 @@ void DlgAdvanced::applyData() ksettings.b_KonquerorIntegration=!ksettings.b_KonquerorIntegration; KConfig cfg("konquerorrc", false, false); cfg.setGroup("HTML Settings"); - cfg.writePathEntry("DownloadManager",QString((bIsKonquiEnable)?"kget":"")); + cfg.writePathEntry("DownloadManager",TQString((bIsKonquiEnable)?"kget":"")); cfg.sync(); } } diff --git a/kget/dlgAdvanced.h b/kget/dlgAdvanced.h index 5af58c2a..19c2e3f5 100644 --- a/kget/dlgAdvanced.h +++ b/kget/dlgAdvanced.h @@ -35,7 +35,7 @@ Q_OBJECT public: - DlgAdvanced(QWidget * parent); + DlgAdvanced(TQWidget * parent); ~DlgAdvanced() {} void applyData(); diff --git a/kget/dlgAutomation.cpp b/kget/dlgAutomation.cpp index 98ed4f3e..779cacf3 100644 --- a/kget/dlgAutomation.cpp +++ b/kget/dlgAutomation.cpp @@ -24,10 +24,10 @@ * ***************************************************************************/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -42,7 +42,7 @@ #include "dlgAutomation.h" -DlgAutomation::DlgAutomation(QWidget * parent) +DlgAutomation::DlgAutomation(TQWidget * parent) : DlgAutomationBase(parent) { } diff --git a/kget/dlgAutomation.h b/kget/dlgAutomation.h index e9f629bc..2a236094 100644 --- a/kget/dlgAutomation.h +++ b/kget/dlgAutomation.h @@ -28,8 +28,8 @@ #ifndef _DLGAUTOMATION_H #define _DLGAUTOMATION_H -#include -#include +#include +#include #include "dlgautomationbase.h" @@ -38,14 +38,14 @@ class DlgAutomation:public DlgAutomationBase Q_OBJECT public: - DlgAutomation(QWidget * parent); + DlgAutomation(TQWidget * parent); ~DlgAutomation() {} void applyData(); void setData(); private: - QDateTime disconnectDateTime; + TQDateTime disconnectDateTime; signals: void configChanged(); diff --git a/kget/dlgConnection.cpp b/kget/dlgConnection.cpp index c5ffae56..5530953b 100644 --- a/kget/dlgConnection.cpp +++ b/kget/dlgConnection.cpp @@ -25,10 +25,10 @@ ***************************************************************************/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -42,7 +42,7 @@ #include "dlgConnection.h" -DlgConnection::DlgConnection(QWidget * parent) +DlgConnection::DlgConnection(TQWidget * parent) :DlgConnectionBase(parent, "", 0) { // TODO: these are not supported yet, so hide them diff --git a/kget/dlgConnection.h b/kget/dlgConnection.h index 0420b4f0..d4fa58a1 100644 --- a/kget/dlgConnection.h +++ b/kget/dlgConnection.h @@ -28,7 +28,7 @@ #ifndef _DLGCONNECTION_H #define _DLGCONNECTION_H -#include +#include #include "dlgconnectionbase.h" @@ -37,7 +37,7 @@ class DlgConnection : public DlgConnectionBase Q_OBJECT public: - DlgConnection(QWidget * parent); + DlgConnection(TQWidget * parent); ~DlgConnection() {} void applyData(); void setData(); diff --git a/kget/dlgDirectories.cpp b/kget/dlgDirectories.cpp index 6c4c42e3..a373cc67 100644 --- a/kget/dlgDirectories.cpp +++ b/kget/dlgDirectories.cpp @@ -25,11 +25,11 @@ ***************************************************************************/ -#include -#include -#include +#include +#include +#include -#include +#include #include #include @@ -42,11 +42,11 @@ #include "dlgDirectories.h" #include -DlgDirectories::DlgDirectories(QWidget * parent) +DlgDirectories::DlgDirectories(TQWidget * parent) : DlgDirectoriesBase(parent) { - connect( le_ext, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotDirectoryChanged( ) ) ); - connect( le_dir, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotDirectoryChanged( ) ) ); + connect( le_ext, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotDirectoryChanged( ) ) ); + connect( le_dir, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotDirectoryChanged( ) ) ); le_dir->setMode( KFile::Directory ); lv_entries->setSortColumn( -1 ); @@ -59,7 +59,7 @@ void DlgDirectories::slotDirectoryChanged( ) pb_add->setEnabled(!le_ext->text().isEmpty() &&!le_dir->url().isEmpty() ); } -void DlgDirectories::selectEntry(QListViewItem * item) +void DlgDirectories::selectEntry(TQListViewItem * item) { if (item) { le_ext->setText(item->text(0)); @@ -75,7 +75,7 @@ void DlgDirectories::selectEntry(QListViewItem * item) void DlgDirectories::updateUpDown() { - QListViewItem *item = lv_entries->selectedItem(); + TQListViewItem *item = lv_entries->selectedItem(); pb_up->setEnabled( item && item->itemAbove() ); pb_down->setEnabled( item && item->itemBelow() ); @@ -83,22 +83,22 @@ void DlgDirectories::updateUpDown() void DlgDirectories::addEntry() { - QString ext = le_ext->text(); - QString dir = le_dir->url(); + TQString ext = le_ext->text(); + TQString dir = le_dir->url(); if (ext.contains(",") || dir.contains(",") || ext.isEmpty() || dir.isEmpty()) { KMessageBox::error(this, i18n("Each row consists of exactly one\nextension type and one folder."), i18n("Error")); return; } - QDir f(dir); + TQDir f(dir); if (!f.exists()) { KMessageBox::error(this, i18n("Folder does not exist:\n%1").arg(dir), i18n("Error")); return; } - new QListViewItem(lv_entries, ext, dir); + new TQListViewItem(lv_entries, ext, dir); updateUpDown(); emit configChanged(); @@ -107,7 +107,7 @@ void DlgDirectories::addEntry() void DlgDirectories::deleteEntry() { - QListViewItem *item = lv_entries->selectedItem(); + TQListViewItem *item = lv_entries->selectedItem(); delete item; updateUpDown(); emit configChanged(); @@ -116,25 +116,25 @@ void DlgDirectories::deleteEntry() void DlgDirectories::changeEntry() { - QListViewItem *old_item = lv_entries->selectedItem(); + TQListViewItem *old_item = lv_entries->selectedItem(); if (old_item) { - QString ext = le_ext->text(); - QString dir = le_dir->url(); + TQString ext = le_ext->text(); + TQString dir = le_dir->url(); if (ext.contains(",") || dir.contains(",") || ext.isEmpty() || dir.isEmpty()) { KMessageBox::error(this, i18n("Each row consists of exactly one\nextension type and one folder."), i18n("Error")); return; } - QDir f(dir); + TQDir f(dir); if (!f.exists()) { KMessageBox::error(this, i18n("Folder does not exist:\n%1").arg(dir), i18n("Error")); return; } - new QListViewItem(lv_entries, old_item, ext, dir); + new TQListViewItem(lv_entries, old_item, ext, dir); delete old_item; emit configChanged(); } @@ -143,7 +143,7 @@ void DlgDirectories::changeEntry() void DlgDirectories::downEntry() { - QListViewItem *item = lv_entries->selectedItem(); + TQListViewItem *item = lv_entries->selectedItem(); if ( !item ) return; @@ -157,7 +157,7 @@ void DlgDirectories::downEntry() void DlgDirectories::upEntry() { - QListViewItem *item = lv_entries->selectedItem(); + TQListViewItem *item = lv_entries->selectedItem(); if ( !item || !item->itemAbove() ) return; @@ -175,11 +175,11 @@ void DlgDirectories::setData() if (ksettings.defaultDirList.count() > 0) { // we need to insert items in the reverse order - // because "new QListViewItem" puts itself at the beginning + // because "new TQListViewItem" puts itself at the beginning for (it = ksettings.defaultDirList.fromLast(); it != ksettings.defaultDirList.begin(); it--) { - new QListViewItem(lv_entries, (*it).extRegexp, (*it).defaultDir); + new TQListViewItem(lv_entries, (*it).extRegexp, (*it).defaultDir); } - new QListViewItem(lv_entries, (*it).extRegexp, (*it).defaultDir); + new TQListViewItem(lv_entries, (*it).extRegexp, (*it).defaultDir); } } @@ -187,10 +187,10 @@ void DlgDirectories::setData() void DlgDirectories::applyData() { ksettings.defaultDirList.clear(); - QListViewItemIterator it(lv_entries); + TQListViewItemIterator it(lv_entries); for (; it.current(); ++it) { - QListViewItem *item = it.current(); + TQListViewItem *item = it.current(); DirItem ditem; diff --git a/kget/dlgDirectories.h b/kget/dlgDirectories.h index deb403e3..8d3c1cf5 100644 --- a/kget/dlgDirectories.h +++ b/kget/dlgDirectories.h @@ -37,7 +37,7 @@ Q_OBJECT public: - DlgDirectories(QWidget * parent); + DlgDirectories(TQWidget * parent); ~DlgDirectories() {} void applyData(); void setData(); @@ -46,7 +46,7 @@ signals: void configChanged(); protected slots: - void selectEntry(QListViewItem * item); + void selectEntry(TQListViewItem * item); void addEntry(); void deleteEntry(); void changeEntry(); diff --git a/kget/dlgIndividual.cpp b/kget/dlgIndividual.cpp index 72fc6c7d..9cb9690c 100644 --- a/kget/dlgIndividual.cpp +++ b/kget/dlgIndividual.cpp @@ -25,15 +25,15 @@ ***************************************************************************/ -#include +#include #include "dockindividual.h" -#include -#include +#include +#include #include -#include -#include +#include +#include #include #include #include @@ -53,7 +53,7 @@ DlgIndividual::DlgIndividual(Transfer * _item) - : QWidget(0, "dialog", WDestructiveClose) + : TQWidget(0, "dialog", WDestructiveClose) { item = _item; @@ -63,22 +63,22 @@ DlgIndividual::DlgIndividual(Transfer * _item) // Actions - m_paDock = new KToggleAction(i18n("&Dock"),"tool_dock.png", 0, this, SLOT(slotToggleDock()), this, "dockIndividual"); + m_paDock = new KToggleAction(i18n("&Dock"),"tool_dock.png", 0, this, TQT_SLOT(slotToggleDock()), this, "dockIndividual"); - QVBoxLayout *topLayout = new QVBoxLayout( this, KDialog::marginHint(),KDialog::spacingHint() ); + TQVBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(),KDialog::spacingHint() ); topLayout->addStrut( 360 ); // makes dlg at least that wide - QGridLayout *grid = new QGridLayout( 2, 3 ); + TQGridLayout *grid = new TQGridLayout( 2, 3 ); topLayout->addLayout(grid); grid->addColSpacing(1, KDialog::spacingHint()); - grid->addWidget(new QLabel(i18n("Source:"), this), 0, 0); + grid->addWidget(new TQLabel(i18n("Source:"), this), 0, 0); sourceLabel = new KSqueezedTextLabel(this); grid->addWidget(sourceLabel, 0, 2); sourceLabel->setText(i18n("Source Label")); - grid->addWidget(new QLabel(i18n("Destination:"), this), 1, 0); + grid->addWidget(new TQLabel(i18n("Destination:"), this), 1, 0); destLabel = new KSqueezedTextLabel(this); grid->addWidget(destLabel, 1, 2); @@ -88,15 +88,15 @@ DlgIndividual::DlgIndividual(Transfer * _item) topLayout->addWidget( m_pProgressBar ); // processed info - QHBoxLayout *hBox = new QHBoxLayout(); + TQHBoxLayout *hBox = new TQHBoxLayout(); topLayout->addLayout(hBox); - sizeLabel = new QLabel(this); + sizeLabel = new TQLabel(this); hBox->addWidget(sizeLabel); - resumeLabel = new QLabel(this); + resumeLabel = new TQLabel(this); hBox->addWidget(resumeLabel); - speedLabel = new QLabel(this); + speedLabel = new TQLabel(this); speedLabel->setText(i18n("0 B/s")); topLayout->addWidget(speedLabel); @@ -125,46 +125,46 @@ DlgIndividual::DlgIndividual(Transfer * _item) - QCheckBox * keepOpen = new QCheckBox( i18n("&Keep this window open after the operation is complete."), this); - connect( keepOpen, SIGNAL( toggled(bool) ), SLOT( slotKeepOpenToggled(bool) ) ); + TQCheckBox * keepOpen = new TQCheckBox( i18n("&Keep this window open after the operation is complete."), this); + connect( keepOpen, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotKeepOpenToggled(bool) ) ); topLayout->addWidget(keepOpen); - QFrame *line3 = new QFrame( this ); - line3->setFrameShape( QFrame::HLine ); - line3->setFrameShadow( QFrame::Sunken ); + TQFrame *line3 = new TQFrame( this ); + line3->setFrameShape( TQFrame::HLine ); + line3->setFrameShadow( TQFrame::Sunken ); topLayout->addWidget( line3 ); - hBox = new QHBoxLayout(); + hBox = new TQHBoxLayout(); topLayout->addLayout(hBox); openFile = new KPushButton( i18n("Open &File"), this ); - connect( openFile, SIGNAL( clicked() ), SLOT( slotOpenFile() ) ); + connect( openFile, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOpenFile() ) ); hBox->addWidget( openFile ); openFile->setEnabled(false); openLocation = new KPushButton( i18n("Open &Destination"), this ); - connect( openLocation, SIGNAL( clicked() ), SLOT( slotOpenLocation() ) ); + connect( openLocation, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOpenLocation() ) ); hBox->addWidget( openLocation ); hBox->addStretch(1); pbAdvanced = new KPushButton( i18n("Advanced"), this ); - connect(pbAdvanced, SIGNAL(clicked()), SLOT(slotToggleAdvanced())); + connect(pbAdvanced, TQT_SIGNAL(clicked()), TQT_SLOT(slotToggleAdvanced())); hBox->addWidget( pbAdvanced ); // setup tab dialog - panelAdvanced = new QTabWidget(this); + panelAdvanced = new TQTabWidget(this); // if the time was already set somewhere in the future, keep it // otherwise set it to the current time - QDateTime dt; + TQDateTime dt; - if (item->getStartTime() < QDateTime::currentDateTime() && item->getMode() != Transfer::MD_SCHEDULED) + if (item->getStartTime() < TQDateTime::currentDateTime() && item->getMode() != Transfer::MD_SCHEDULED) { - dt = QDateTime::currentDateTime(); + dt = TQDateTime::currentDateTime(); } else { @@ -176,15 +176,15 @@ DlgIndividual::DlgIndividual(Transfer * _item) panelAdvanced->addTab(spins, i18n("Timer")); panelAdvanced->hide(); - connect(spins, SIGNAL(valueChanged(const QDateTime &)), item, SLOT(slotStartTime(const QDateTime &))); + connect(spins, TQT_SIGNAL(valueChanged(const TQDateTime &)), item, TQT_SLOT(slotStartTime(const TQDateTime &))); // adding item log - ml_log = new QTextEdit(panelAdvanced); + ml_log = new TQTextEdit(panelAdvanced); ml_log->setTextFormat(LogText); ml_log->setReadOnly(true); // ml_log->setFixedSize(sizeHint()); - ml_log->setVScrollBarMode(QScrollView::Auto); - ml_log->setWordWrap(QTextEdit::NoWrap); + ml_log->setVScrollBarMode(TQScrollView::Auto); + ml_log->setWordWrap(TQTextEdit::NoWrap); // ml_log->setSizePolicy(policy); @@ -228,7 +228,7 @@ void DlgIndividual::setProcessedSize(KIO::filesize_t bytes) } -void DlgIndividual::setSpeed(QString speed) +void DlgIndividual::setSpeed(TQString speed) { speedLabel->setText(speed); m_pDockIndividual->setTip(speed); @@ -295,12 +295,12 @@ void DlgIndividual::slotToggleDock() /** Sets the whole log */ -void DlgIndividual::setLog(const QString & _msg) +void DlgIndividual::setLog(const TQString & _msg) { ml_log->setText(_msg); } -void DlgIndividual::appendLog(const QString & _msg) +void DlgIndividual::appendLog(const TQString & _msg) { ml_log->append(_msg); } diff --git a/kget/dlgIndividual.h b/kget/dlgIndividual.h index 73a233aa..e275608d 100644 --- a/kget/dlgIndividual.h +++ b/kget/dlgIndividual.h @@ -27,9 +27,9 @@ #ifndef __dlgprogress_h__ #define __dlgprogress_h__ -#include +#include -#include +#include #include @@ -54,8 +54,8 @@ public: DlgIndividual(Transfer * _item); ~DlgIndividual() {} - void setLog(const QString & _msg); - void appendLog(const QString & _msg); + void setLog(const TQString & _msg); + void appendLog(const TQString & _msg); void enableOpenFile(); public slots: @@ -63,7 +63,7 @@ public slots: void setProcessedSize(KIO::filesize_t bytes); - void setSpeed(QString speed); + void setSpeed(TQString speed); void setPercent(unsigned long percent); void setCopying(const KURL & src, const KURL & dest); @@ -79,12 +79,12 @@ protected slots: void slotToggleDock(); protected: - QLabel *sourceLabel; - QLabel *destLabel; - QLabel *speedLabel; - QLabel *sizeLabel; - QLabel *resumeLabel; - QTextEdit *ml_log; + TQLabel *sourceLabel; + TQLabel *destLabel; + TQLabel *speedLabel; + TQLabel *sizeLabel; + TQLabel *resumeLabel; + TQTextEdit *ml_log; KProgress *m_pProgressBar; DockIndividual * m_pDockIndividual; @@ -93,10 +93,10 @@ protected: KPushButton * openLocation; KPushButton * pbAdvanced ; - QTabWidget * panelAdvanced; + TQTabWidget * panelAdvanced; KToggleAction * m_paDock; - QDateTime qdt; + TQDateTime qdt; KDateTimeWidget *spins; Transfer *item; diff --git a/kget/dlgLimits.cpp b/kget/dlgLimits.cpp index e31326c7..8c6ded6d 100644 --- a/kget/dlgLimits.cpp +++ b/kget/dlgLimits.cpp @@ -25,8 +25,8 @@ ***************************************************************************/ -#include -#include +#include +#include #include #include @@ -37,7 +37,7 @@ #include "dlgLimits.h" -DlgLimits::DlgLimits(QWidget * parent) +DlgLimits::DlgLimits(TQWidget * parent) : DlgLimitsBase(parent) { // TODO: these are not supported yet, so hide them diff --git a/kget/dlgLimits.h b/kget/dlgLimits.h index a020f221..0c4aaa6f 100644 --- a/kget/dlgLimits.h +++ b/kget/dlgLimits.h @@ -35,7 +35,7 @@ class DlgLimits : public DlgLimitsBase Q_OBJECT public: - DlgLimits(QWidget * parent); + DlgLimits(TQWidget * parent); ~DlgLimits() {} void applyData(); void setData(); diff --git a/kget/dlgPreferences.cpp b/kget/dlgPreferences.cpp index f35b8add..cc5ebb43 100644 --- a/kget/dlgPreferences.cpp +++ b/kget/dlgPreferences.cpp @@ -25,7 +25,7 @@ ***************************************************************************/ -#include +#include #include #include @@ -49,62 +49,62 @@ #include "dlgPreferences.h" -DlgPreferences::DlgPreferences(QWidget * parent): +DlgPreferences::DlgPreferences(TQWidget * parent): KDialogBase(Tabbed, i18n("Configure"), Ok|Apply|Help|Cancel, Ok, parent, "DlgPreferences", true) { // add pages - QFrame *page = addPage(i18n("Connection")); - QVBoxLayout *topLayout = new QVBoxLayout(page, 0, spacingHint()); + TQFrame *page = addPage(i18n("Connection")); + TQVBoxLayout *topLayout = new TQVBoxLayout(page, 0, spacingHint()); conDlg = new DlgConnection(page); topLayout->addWidget(conDlg); page = addPage(i18n("Automation")); - topLayout = new QVBoxLayout(page, 0, spacingHint()); + topLayout = new TQVBoxLayout(page, 0, spacingHint()); autDlg = new DlgAutomation(page); topLayout->addWidget(autDlg); topLayout->addStretch(); page = addPage(i18n("Limits")); - topLayout = new QVBoxLayout(page, 0, spacingHint()); + topLayout = new TQVBoxLayout(page, 0, spacingHint()); limDlg = new DlgLimits(page); topLayout->addWidget(limDlg); topLayout->addStretch(); page = addPage(i18n("Advanced")); - topLayout = new QVBoxLayout(page, 0, spacingHint()); + topLayout = new TQVBoxLayout(page, 0, spacingHint()); advDlg = new DlgAdvanced(page); topLayout->addWidget(advDlg); topLayout->addStretch(); // page = addPage(i18n("Search")); - // topLayout = new QVBoxLayout(page, 0, spacingHint()); + // topLayout = new TQVBoxLayout(page, 0, spacingHint()); // seaDlg = new DlgSearch(page); // topLayout->addWidget(seaDlg); page = addPage(i18n("Folders")); - topLayout = new QVBoxLayout(page, 0, spacingHint()); + topLayout = new TQVBoxLayout(page, 0, spacingHint()); dirDlg = new DlgDirectories(page); topLayout->addWidget(dirDlg); topLayout->addStretch(); page = addPage(i18n("System")); - topLayout = new QVBoxLayout(page, 0, spacingHint()); + topLayout = new TQVBoxLayout(page, 0, spacingHint()); sysDlg = new DlgSystem(page); topLayout->addWidget(sysDlg); topLayout->addStretch(); // type of connection influences autoDisconnect & timedDisconnect features - connect(conDlg, SIGNAL(typeChanged(int)), autDlg, SLOT(slotTypeChanged(int))); + connect(conDlg, TQT_SIGNAL(typeChanged(int)), autDlg, TQT_SLOT(slotTypeChanged(int))); loadAllData(); - connect( conDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) ); - connect( autDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) ); - connect( limDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) ); - connect( advDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) ); - connect( dirDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) ); - connect( sysDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) ); + connect( conDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); + connect( autDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); + connect( limDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); + connect( advDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); + connect( dirDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); + connect( sysDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); } diff --git a/kget/dlgPreferences.h b/kget/dlgPreferences.h index 8e2e1307..b7881079 100644 --- a/kget/dlgPreferences.h +++ b/kget/dlgPreferences.h @@ -27,8 +27,8 @@ #ifndef _DLGPREFERENCES_H #define _DLGPREFERENCES_H -#include -#include +#include +#include #include @@ -46,7 +46,7 @@ class DlgPreferences:public KDialogBase Q_OBJECT public: - DlgPreferences(QWidget * parent); + DlgPreferences(TQWidget * parent); ~DlgPreferences() {} diff --git a/kget/dlgSystem.cpp b/kget/dlgSystem.cpp index d908724a..af33f966 100644 --- a/kget/dlgSystem.cpp +++ b/kget/dlgSystem.cpp @@ -25,8 +25,8 @@ ***************************************************************************/ -#include -#include +#include +#include #ifdef index #undef index @@ -38,11 +38,11 @@ #include "kmainwidget.h" #include "dlgSystem.h" -#include -#include +#include +#include -DlgSystem::DlgSystem(QWidget * parent) +DlgSystem::DlgSystem(TQWidget * parent) : DlgSystemBase(parent) { bg_window->hide(); diff --git a/kget/dlgSystem.h b/kget/dlgSystem.h index 677481b3..db740596 100644 --- a/kget/dlgSystem.h +++ b/kget/dlgSystem.h @@ -35,7 +35,7 @@ class DlgSystem : public DlgSystemBase { Q_OBJECT public: - DlgSystem(QWidget * parent); + DlgSystem(TQWidget * parent); ~DlgSystem() {} void applyData(); diff --git a/kget/dockindividual.cpp b/kget/dockindividual.cpp index 1ecf61fa..e8f02645 100644 --- a/kget/dockindividual.cpp +++ b/kget/dockindividual.cpp @@ -24,12 +24,12 @@ * ***************************************************************************/ -#include +#include #include #include "dockindividual.h" -DockIndividual::DockIndividual(QWidget *parent, const char *name ) : KSystemTray(parent,name) +DockIndividual::DockIndividual(TQWidget *parent, const char *name ) : KSystemTray(parent,name) { nPic=0; setPixmap( loadIcon("bar0") ); @@ -37,7 +37,7 @@ DockIndividual::DockIndividual(QWidget *parent, const char *name ) : KSystemTray DockIndividual::~DockIndividual() { - QToolTip::remove(this); + TQToolTip::remove(this); } @@ -66,7 +66,7 @@ void DockIndividual::setValue(int value){ if (tmpPic!=nPic) { nPic=tmpPic; - QString str = "bar" + QString::number( nPic ); + TQString str = "bar" + TQString::number( nPic ); setPixmap( loadIcon( str ) ); } @@ -77,14 +77,14 @@ void DockIndividual::setValue(int value){ -void DockIndividual::setTip(const QString & _tip) +void DockIndividual::setTip(const TQString & _tip) { #ifdef _DEBUG //sDebugIn<<"_tip="<<_tip< +#include #include #include @@ -68,27 +68,27 @@ DockWidget::~DockWidget() } -void DockWidget::dragEnterEvent(QDragEnterEvent * event) +void DockWidget::dragEnterEvent(TQDragEnterEvent * event) { event->accept(KURLDrag::canDecode(event) - || QTextDrag::canDecode(event)); + || TQTextDrag::canDecode(event)); } -void DockWidget::dropEvent(QDropEvent * event) +void DockWidget::dropEvent(TQDropEvent * event) { KURL::List list; - QString str; + TQString str; if (KURLDrag::decode(event, list)) { parent->addTransfers(list); - } else if (QTextDrag::decode(event, str)) { + } else if (TQTextDrag::decode(event, str)) { parent->addTransfer(str); } } -void DockWidget::mousePressEvent(QMouseEvent * e) +void DockWidget::mousePressEvent(TQMouseEvent * e) { if (e->button() == MidButton) { parent->slotPasteTransfer(); @@ -98,33 +98,33 @@ void DockWidget::mousePressEvent(QMouseEvent * e) } -void DockWidget::updateToolTip( const QString& _status ) +void DockWidget::updateToolTip( const TQString& _status ) { dtip->setStatus( _status ); } -void DockWidget::changeIcon( const QString& icon ) +void DockWidget::changeIcon( const TQString& icon ) { setPixmap( loadIcon( icon )); } -DynamicTip::DynamicTip( QWidget * parent ) - : QToolTip( parent ) +DynamicTip::DynamicTip( TQWidget * parent ) + : TQToolTip( parent ) { // no explicit initialization needed } -void DynamicTip::setStatus( const QString & _status ) +void DynamicTip::setStatus( const TQString & _status ) { status = _status; } -void DynamicTip::maybeTip( const QPoint & _pos ) +void DynamicTip::maybeTip( const TQPoint & _pos ) { - QRect r( parentWidget()->rect() ); + TQRect r( parentWidget()->rect() ); tip( r, status ); } diff --git a/kget/docking.h b/kget/docking.h index df4c75ec..ba9a88c1 100644 --- a/kget/docking.h +++ b/kget/docking.h @@ -31,7 +31,7 @@ #include -#include +#include #include @@ -41,15 +41,15 @@ class KMainWidget; class DynamicTip : public QToolTip { public: - DynamicTip( QWidget * parent ); + DynamicTip( TQWidget * parent ); virtual ~DynamicTip() {}//TODO workaround for qt-bug, can be removed after 4.0 - void setStatus( const QString & _status ); + void setStatus( const TQString & _status ); protected: - void maybeTip( const QPoint & ); + void maybeTip( const TQPoint & ); private: - QString status; + TQString status; }; class DockWidget:public KSystemTray @@ -59,18 +59,18 @@ Q_OBJECT public: DockWidget(KMainWidget * parent); ~DockWidget(); /** No descriptions */ - void updateToolTip( const QString& ); - void changeIcon( const QString& ); + void updateToolTip( const TQString& ); + void changeIcon( const TQString& ); private slots: - void mousePressEvent(QMouseEvent * e); + void mousePressEvent(TQMouseEvent * e); protected: // drag and drop - void dragEnterEvent(QDragEnterEvent *); - void dropEvent(QDropEvent *); + void dragEnterEvent(TQDragEnterEvent *); + void dropEvent(TQDropEvent *); private: KMainWidget *parent; diff --git a/kget/droptarget.cpp b/kget/droptarget.cpp index 97bb01e2..eeea1486 100644 --- a/kget/droptarget.cpp +++ b/kget/droptarget.cpp @@ -24,7 +24,7 @@ * ***************************************************************************/ -#include +#include #include #include @@ -38,7 +38,7 @@ #include #include "kmainwidget.h" -#include +#include #ifdef Q_WS_X11 #include #include @@ -50,13 +50,13 @@ #include "settings.h" #include "droptarget.h" -DropTarget::DropTarget(KMainWindow * mainWin):QWidget() +DropTarget::DropTarget(KMainWindow * mainWin):TQWidget() { int x = ksettings.dropPosition.x(); int y = ksettings.dropPosition.y(); - QRect desk = KGlobalSettings::desktopGeometry(this); - QPixmap bgnd = UserIcon( "target" ); + TQRect desk = KGlobalSettings::desktopGeometry(this); + TQPixmap bgnd = UserIcon( "target" ); if (x != -1 && x >= desk.left() && y >= desk.top() && @@ -89,10 +89,10 @@ DropTarget::DropTarget(KMainWindow * mainWin):QWidget() popupMenu->insertTitle(kapp->caption()); popupMenu->setCheckable(true); - pop_Max = popupMenu->insertItem(i18n("Maximize"), this, SLOT(toggleMinimizeRestore())); - pop_Min = popupMenu->insertItem(i18n("Minimize"), this, SLOT(toggleMinimizeRestore())); + pop_Max = popupMenu->insertItem(i18n("Maximize"), this, TQT_SLOT(toggleMinimizeRestore())); + pop_Min = popupMenu->insertItem(i18n("Minimize"), this, TQT_SLOT(toggleMinimizeRestore())); - pop_sticky = popupMenu->insertItem(i18n("Sticky"), this, SLOT(toggleSticky())); + pop_sticky = popupMenu->insertItem(i18n("Sticky"), this, TQT_SLOT(toggleSticky())); popupMenu->insertSeparator(); mainWin->action("drop_target")->plug(popupMenu); popupMenu->insertSeparator(); @@ -116,7 +116,7 @@ DropTarget::~DropTarget() void -DropTarget::mousePressEvent(QMouseEvent * e) +DropTarget::mousePressEvent(TQMouseEvent * e) { if (e->button() == LeftButton) { @@ -124,15 +124,15 @@ DropTarget::mousePressEvent(QMouseEvent * e) // oldX = 0; // oldY = 0; isdragging = true; - dx = QCursor::pos().x() - pos().x(); - dy = QCursor::pos().y() - pos().y(); + dx = TQCursor::pos().x() - pos().x(); + dy = TQCursor::pos().y() - pos().y(); } else if (e->button() == RightButton) { popupMenu->setItemEnabled(pop_Min, kmain->isVisible()); popupMenu->setItemEnabled(pop_Max, kmain->isHidden()); - popupMenu->popup(QCursor::pos()); + popupMenu->popup(TQCursor::pos()); } else if (e->button() == MidButton) { @@ -141,7 +141,7 @@ DropTarget::mousePressEvent(QMouseEvent * e) } -void DropTarget::resizeEvent(QResizeEvent *) +void DropTarget::resizeEvent(TQResizeEvent *) { #ifdef Q_WS_X11 XShapeCombineMask(x11Display(), winId(), ShapeBounding, 0, 0, mask.handle(), ShapeSet); @@ -149,23 +149,23 @@ void DropTarget::resizeEvent(QResizeEvent *) } -void DropTarget::dragEnterEvent(QDragEnterEvent * event) +void DropTarget::dragEnterEvent(TQDragEnterEvent * event) { event->accept(KURLDrag::canDecode(event) - || QTextDrag::canDecode(event)); + || TQTextDrag::canDecode(event)); } -void DropTarget::dropEvent(QDropEvent * event) +void DropTarget::dropEvent(TQDropEvent * event) { KURL::List list; - QString str; + TQString str; if (KURLDrag::decode(event, list)) { kmain->addTransfers(list); } - else if (QTextDrag::decode(event, str)) + else if (TQTextDrag::decode(event, str)) { kmain->addTransfer(str); } @@ -200,7 +200,7 @@ void DropTarget::toggleMinimizeRestore() } /** No descriptions */ -void DropTarget::mouseMoveEvent(QMouseEvent * e) +void DropTarget::mouseMoveEvent(TQMouseEvent * e) { /* if (oldX == 0) @@ -211,18 +211,18 @@ void DropTarget::mouseMoveEvent(QMouseEvent * e) } +*/ if (isdragging) - move( QCursor::pos().x() - dx, QCursor::pos().y() - dy ); + move( TQCursor::pos().x() - dx, TQCursor::pos().y() - dy ); // move(x() + (e->x() - oldX), y() + (e->y() - oldY)); // <<-- } -void DropTarget::mouseReleaseEvent(QMouseEvent *) +void DropTarget::mouseReleaseEvent(TQMouseEvent *) { isdragging = false; } /** No descriptions */ -void DropTarget::mouseDoubleClickEvent(QMouseEvent * e) +void DropTarget::mouseDoubleClickEvent(TQMouseEvent * e) { if (e->button() == LeftButton) toggleMinimizeRestore(); diff --git a/kget/droptarget.h b/kget/droptarget.h index debce208..a6276278 100644 --- a/kget/droptarget.h +++ b/kget/droptarget.h @@ -27,9 +27,9 @@ #ifndef _DROPTARGET_H #define _DROPTARGET_H -#include -#include -#include +#include +#include +#include class KPopupMenu; class KMainWidget; @@ -46,17 +46,17 @@ public: void updateStickyState(); protected: - virtual void resizeEvent(QResizeEvent *); + virtual void resizeEvent(TQResizeEvent *); // drag and drop - virtual void dragEnterEvent(QDragEnterEvent *); + virtual void dragEnterEvent(TQDragEnterEvent *); /** No descriptions */ - virtual void mouseDoubleClickEvent(QMouseEvent * e); - virtual void dropEvent(QDropEvent *); + virtual void mouseDoubleClickEvent(TQMouseEvent * e); + virtual void dropEvent(TQDropEvent *); /** No descriptions */ - virtual void mouseMoveEvent(QMouseEvent *); - virtual void mousePressEvent(QMouseEvent * e); - virtual void mouseReleaseEvent(QMouseEvent *); + virtual void mouseMoveEvent(TQMouseEvent *); + virtual void mousePressEvent(TQMouseEvent * e); + virtual void mouseReleaseEvent(TQMouseEvent *); private slots: void toggleSticky(); @@ -74,7 +74,7 @@ private: int size[4]; - QBitmap mask; + TQBitmap mask; public: // Public attributes /** */ // int oldX; diff --git a/kget/kfileio.cpp b/kget/kfileio.cpp index bfd03864..63f230bc 100644 --- a/kget/kfileio.cpp +++ b/kget/kfileio.cpp @@ -12,13 +12,13 @@ // Author: Stefan Taferner -#include -#include +#include +#include #include #include #include -#include -#include +#include +#include #include #include @@ -27,14 +27,14 @@ #include "kfileio.h" //----------------------------------------------------------------------------- -QString kFileToString(const QString & aFileName, bool aEnsureNL, bool aVerbose) +TQString kFileToString(const TQString & aFileName, bool aEnsureNL, bool aVerbose) { - QCString result; + TQCString result; - QFileInfo info(aFileName); + TQFileInfo info(aFileName); unsigned int readLen; unsigned int len = info.size(); - QFile file(aFileName); + TQFile file(aFileName); // assert(aFileName!=NULL); if (aFileName == NULL) @@ -43,20 +43,20 @@ QString kFileToString(const QString & aFileName, bool aEnsureNL, bool aVerbose) if (!info.exists()) { if (aVerbose) KMessageBox::error(qApp->mainWidget(), i18n("The specified file does not exist:\n%1").arg(aFileName)); - return QString::null; + return TQString::null; } if (info.isDir()) { if (aVerbose) KMessageBox::error(qApp->mainWidget(), i18n("This is a folder and not a file:\n%1").arg(aFileName)); - return QString::null; + return TQString::null; } if (!info.isReadable()) { if (aVerbose) KMessageBox::error(qApp->mainWidget(), i18n("You do not have read permission for the file:\n%1").arg(aFileName)); - return QString::null; + return TQString::null; } if (len <= 0) - return QString::null; + return TQString::null; if (!file.open(IO_Raw | IO_ReadOnly)) { if (aVerbose) @@ -70,7 +70,7 @@ QString kFileToString(const QString & aFileName, bool aEnsureNL, bool aVerbose) default: KMessageBox::error(qApp->mainWidget(), i18n("Error while reading file:\n%1").arg(aFileName)); } - return QString::null; + return TQString::null; } result.resize(len + (int) aEnsureNL + 1); @@ -82,11 +82,11 @@ QString kFileToString(const QString & aFileName, bool aEnsureNL, bool aVerbose) result[len] = '\0'; if (readLen < len) { - QString msg = i18n("Could only read %1 bytes of %2.").arg(KGlobal::locale()->formatNumber(readLen, + TQString msg = i18n("Could only read %1 bytes of %2.").arg(KGlobal::locale()->formatNumber(readLen, 0)).arg(KGlobal::locale()->formatNumber(len, 0)); KMessageBox::error(qApp->mainWidget(), msg); - return QString::null; + return TQString::null; } kdDebug() << "kFileToString: " << readLen << " bytes read" << endl; @@ -95,10 +95,10 @@ QString kFileToString(const QString & aFileName, bool aEnsureNL, bool aVerbose) //----------------------------------------------------------------------------- -static bool kBytesToFile(const char *aBuffer, int len, const QString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose) +static bool kBytesToFile(const char *aBuffer, int len, const TQString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose) { - QFile file(aFileName); - QFileInfo info(aFileName); + TQFile file(aFileName); + TQFileInfo info(aFileName); int writeLen, rc; // assert(aFileName!=NULL); @@ -107,19 +107,19 @@ static bool kBytesToFile(const char *aBuffer, int len, const QString & aFileName if (info.exists()) { if (aAskIfExists) { - QString str = i18n("File %1 exists.\nDo you want to replace it?").arg(aFileName); + TQString str = i18n("File %1 exists.\nDo you want to replace it?").arg(aFileName); - rc = KMessageBox::questionYesNo(qApp->mainWidget(), str, QString::null, i18n("Replace"),KStdGuiItem::cancel()); + rc = KMessageBox::questionYesNo(qApp->mainWidget(), str, TQString::null, i18n("Replace"),KStdGuiItem::cancel()); if (rc != KMessageBox::Yes) return FALSE; } if (aBackup) { // make a backup copy - QString bakName = aFileName; + TQString bakName = aFileName; bakName += '~'; - QFile::remove(bakName); - rc = rename(QFile::encodeName(aFileName), QFile::encodeName(bakName)); + TQFile::remove(bakName); + rc = rename(TQFile::encodeName(aFileName), TQFile::encodeName(bakName)); if (rc) { // failed to rename file if (!aVerbose) @@ -152,7 +152,7 @@ static bool kBytesToFile(const char *aBuffer, int len, const QString & aFileName KMessageBox::error(qApp->mainWidget(), i18n("Could not write to file:\n%1").arg(aFileName)); return FALSE; } else if (writeLen < len) { - QString msg = i18n("Could only write %1 bytes of %2.").arg(KGlobal::locale()->formatNumber(writeLen, + TQString msg = i18n("Could only write %1 bytes of %2.").arg(KGlobal::locale()->formatNumber(writeLen, 0)).arg(KGlobal::locale()->formatNumber(len, 0)); @@ -163,12 +163,12 @@ static bool kBytesToFile(const char *aBuffer, int len, const QString & aFileName return TRUE; } -bool kCStringToFile(const QCString & aBuffer, const QString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose) +bool kCStringToFile(const TQCString & aBuffer, const TQString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose) { return kBytesToFile(aBuffer, aBuffer.length(), aFileName, aAskIfExists, aBackup, aVerbose); } -bool kByteArrayToFile(const QByteArray & aBuffer, const QString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose) +bool kByteArrayToFile(const TQByteArray & aBuffer, const TQString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose) { return kBytesToFile(aBuffer, aBuffer.size(), aFileName, aAskIfExists, aBackup, aVerbose); } diff --git a/kget/kfileio.h b/kget/kfileio.h index 9b2780ad..84a50cd2 100644 --- a/kget/kfileio.h +++ b/kget/kfileio.h @@ -28,17 +28,17 @@ * byte longer than the file itself. * If ensureNewline is TRUE the string will always have a trailing newline. */ -QString kFileToString(const QString & fileName, bool ensureNewline = TRUE, bool withDialogs = TRUE); +TQString kFileToString(const TQString & fileName, bool ensureNewline = TRUE, bool withDialogs = TRUE); /** Save a file. If withDialogs is FALSE no warning dialogs are opened if * there are problems. Returns TRUE on success and FALSE on failure. * Replaces existing files without warning if askIfExists==FALSE. * Makes a copy if the file exists to filename~ if createBackup==TRUE. */ -bool kCStringToFile(const QCString & buffer, const QString & fileName, bool askIfExists = FALSE, bool createBackup = TRUE, bool withDialogs = TRUE); +bool kCStringToFile(const TQCString & buffer, const TQString & fileName, bool askIfExists = FALSE, bool createBackup = TRUE, bool withDialogs = TRUE); // Does not stop at NUL -bool kByteArrayToFile(const QByteArray & buffer, const QString & fileName, bool askIfExists = FALSE, bool createBackup = TRUE, bool withDialogs = TRUE); +bool kByteArrayToFile(const TQByteArray & buffer, const TQString & fileName, bool askIfExists = FALSE, bool createBackup = TRUE, bool withDialogs = TRUE); #endif /* kfileio_h */ diff --git a/kget/kget_iface.h b/kget/kget_iface.h index 015bef2f..df01375c 100644 --- a/kget/kget_iface.h +++ b/kget/kget_iface.h @@ -16,14 +16,14 @@ class KGetIface : public DCOPObject K_DCOP protected: - KGetIface( QCString objId ) : DCOPObject( objId ) {} + KGetIface( TQCString objId ) : DCOPObject( objId ) {} k_dcop: /** * @param src The urls to download - * @param destDir The destination direction or QString::null if unspecified + * @param destDir The destination direction or TQString::null if unspecified */ - virtual ASYNC addTransfers( const KURL::List& src, const QString& destDir = QString::null ) = 0; + virtual ASYNC addTransfers( const KURL::List& src, const TQString& destDir = TQString::null ) = 0; virtual bool isDropTargetVisible() const = 0; diff --git a/kget/kget_plug_in/kget_linkview.cpp b/kget/kget_plug_in/kget_linkview.cpp index 179cc81b..a9bab704 100644 --- a/kget/kget_plug_in/kget_linkview.cpp +++ b/kget/kget_plug_in/kget_linkview.cpp @@ -1,6 +1,6 @@ #include "kget_linkview.h" -#include +#include #include #include @@ -18,11 +18,11 @@ #define COL_MIME 2 #define COL_URL 3 -LinkViewItem::LinkViewItem( QListView *parent, const LinkItem *lnk ) - : QListViewItem( parent ), +LinkViewItem::LinkViewItem( TQListView *parent, const LinkItem *lnk ) + : TQListViewItem( parent ), link( lnk ) { - QString file = link->url.fileName(); + TQString file = link->url.fileName(); if ( file.isEmpty() ) file = link->url.host(); @@ -37,17 +37,17 @@ LinkViewItem::LinkViewItem( QListView *parent, const LinkItem *lnk ) /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// -KGetLinkView::KGetLinkView( QWidget *parent, const char *name ) +KGetLinkView::KGetLinkView( TQWidget *parent, const char *name ) : KMainWindow( parent, name ) { setPlainCaption( i18n( "KGet" ) ); KAction* actionDownload = new KAction( i18n("Download Selected Files"), "kget", CTRL+Key_D, - this, SLOT( slotStartLeech() ), + this, TQT_SLOT( slotStartLeech() ), actionCollection(), "startDownload" ); - KAction* actionSelectAll = KStdAction::selectAll( this, SLOT( slotSelectAll() ), + KAction* actionSelectAll = KStdAction::selectAll( this, TQT_SLOT( slotSelectAll() ), actionCollection() ); m_links.setAutoDelete( true ); @@ -55,12 +55,12 @@ KGetLinkView::KGetLinkView( QWidget *parent, const char *name ) toolBar()->insertLineSeparator(); actionSelectAll->plug( toolBar() ); - QWidget *mainWidget = new QWidget( this ); - QVBoxLayout *layout = new QVBoxLayout( mainWidget ); + TQWidget *mainWidget = new TQWidget( this ); + TQVBoxLayout *layout = new TQVBoxLayout( mainWidget ); setCentralWidget( mainWidget ); m_view = new KListView( mainWidget, "listview" ); - m_view->setSelectionMode( QListView::Extended ); + m_view->setSelectionMode( TQListView::Extended ); m_view->addColumn( i18n("File Name") ); m_view->addColumn( i18n("Description") ); m_view->addColumn( i18n("File Type") ); @@ -81,17 +81,17 @@ KGetLinkView::~KGetLinkView() { } -void KGetLinkView::setLinks( QPtrList& links ) +void KGetLinkView::setLinks( TQPtrList& links ) { m_links = links; // now we 0wn them showLinks( m_links ); } -void KGetLinkView::showLinks( const QPtrList& links ) +void KGetLinkView::showLinks( const TQPtrList& links ) { m_view->clear(); - QPtrListIterator it( links ); + TQPtrListIterator it( links ); for ( ; it.current(); ++it ) (void) new LinkViewItem( m_view, *it ); @@ -101,7 +101,7 @@ void KGetLinkView::showLinks( const QPtrList& links ) void KGetLinkView::slotStartLeech() { KURL::List urls; - QListViewItemIterator it( m_view->firstChild() ); + TQListViewItemIterator it( m_view->firstChild() ); for ( ; it.current(); ++it ) { if ( it.current()->isSelected() ) @@ -123,11 +123,11 @@ void KGetLinkView::slotStartLeech() } kapp->updateRemoteUserTimestamp( "kget" ); - QByteArray data; - QDataStream stream( data, IO_WriteOnly ); - stream << urls << QString::null; + TQByteArray data; + TQDataStream stream( data, IO_WriteOnly ); + stream << urls << TQString::null; bool ok = DCOPClient::mainClient()->send( "kget", "KGet-Interface", - "addTransfers(KURL::List, QString)", + "addTransfers(KURL::List, TQString)", data ); kdDebug() << "*** startDownload: " << ok << endl; @@ -137,7 +137,7 @@ void KGetLinkView::slotStartLeech() } } -void KGetLinkView::setPageURL( const QString& url ) +void KGetLinkView::setPageURL( const TQString& url ) { setPlainCaption( i18n( "Links in: %1 - KGet" ).arg( url ) ); } diff --git a/kget/kget_plug_in/kget_linkview.h b/kget/kget_plug_in/kget_linkview.h index a6d7961c..26ce28fc 100644 --- a/kget/kget_plug_in/kget_linkview.h +++ b/kget/kget_plug_in/kget_linkview.h @@ -8,7 +8,7 @@ #ifndef KGET_LINKVIEW_H #define KGET_LINKVIEW_H -#include +#include #include #include @@ -19,7 +19,7 @@ class LinkViewItem : public QListViewItem { public: - LinkViewItem( QListView *parent, const LinkItem * lnk ); + LinkViewItem( TQListView *parent, const LinkItem * lnk ); const LinkItem *link; }; @@ -29,11 +29,11 @@ class KGetLinkView : public KMainWindow Q_OBJECT public: - KGetLinkView( QWidget *parent = 0L, const char *name = 0L ); + KGetLinkView( TQWidget *parent = 0L, const char *name = 0L ); ~KGetLinkView(); - void setLinks( QPtrList& links ); - void setPageURL( const QString& url ); + void setLinks( TQPtrList& links ); + void setPageURL( const TQString& url ); signals: void leechURLs( const KURL::List& urls ); @@ -43,9 +43,9 @@ private slots: void slotSelectAll(); private: - void showLinks( const QPtrList& links ); + void showLinks( const TQPtrList& links ); - QPtrList m_links; + TQPtrList m_links; KListView *m_view; diff --git a/kget/kget_plug_in/kget_plug_in.cpp b/kget/kget_plug_in/kget_plug_in.cpp index dc5f5b9f..c73406a2 100644 --- a/kget/kget_plug_in/kget_plug_in.cpp +++ b/kget/kget_plug_in/kget_plug_in.cpp @@ -44,25 +44,25 @@ #include "links.h" #include "kget_linkview.h" -KGet_plug_in::KGet_plug_in( QObject* parent, const char* name ) +KGet_plug_in::KGet_plug_in( TQObject* parent, const char* name ) : Plugin( parent, name ) { - QPixmap pix = KGlobal::iconLoader()->loadIcon("kget", + TQPixmap pix = KGlobal::iconLoader()->loadIcon("kget", KIcon::MainToolbar); KActionMenu *menu = new KActionMenu( i18n("Download Manager"), pix, actionCollection(), "kget_menu" ); menu->setDelayed( false ); - connect( menu->popupMenu(), SIGNAL( aboutToShow() ), SLOT( showPopup() )); + connect( menu->popupMenu(), TQT_SIGNAL( aboutToShow() ), TQT_SLOT( showPopup() )); m_paToggleDropTarget=new KToggleAction(i18n("Show Drop Target"), KShortcut(), - this, SLOT(slotShowDrop()), + this, TQT_SLOT(slotShowDrop()), actionCollection(), "show_drop" ); menu->insert( m_paToggleDropTarget ); KAction *action = new KAction(i18n("List All Links"), KShortcut(), - this, SLOT( slotShowLinks() ), + this, TQT_SLOT( slotShowLinks() ), actionCollection(), "show_links"); menu->insert( action ); @@ -122,8 +122,8 @@ void KGet_plug_in::slotShowLinks() DOM::HTMLCollection links = doc.links(); - QPtrList linkList; - std::set dupeCheck; + TQPtrList linkList; + std::set dupeCheck; for ( uint i = 0; i < links.length(); i++ ) { DOM::Node link = links.item( i ); @@ -150,22 +150,22 @@ void KGet_plug_in::slotShowLinks() } KGetLinkView *view = new KGetLinkView(); - QString url = doc.URL().string(); + TQString url = doc.URL().string(); view->setPageURL( url ); view->setLinks( linkList ); view->show(); } -KPluginFactory::KPluginFactory( QObject* parent, const char* name ) +KPluginFactory::KPluginFactory( TQObject* parent, const char* name ) : KLibFactory( parent, name ) { s_instance = new KInstance("KPluginFactory"); } -QObject* KPluginFactory::createObject( QObject* parent, const char* name, const char*, const QStringList & ) +TQObject* KPluginFactory::createObject( TQObject* parent, const char* name, const char*, const TQStringList & ) { - QObject *obj = new KGet_plug_in( parent, name ); + TQObject *obj = new KGet_plug_in( parent, name ); return obj; } diff --git a/kget/kget_plug_in/kget_plug_in.h b/kget/kget_plug_in/kget_plug_in.h index 75888b10..b5cfea29 100644 --- a/kget/kget_plug_in/kget_plug_in.h +++ b/kget/kget_plug_in/kget_plug_in.h @@ -28,7 +28,7 @@ class KGet_plug_in : public KParts::Plugin { Q_OBJECT public: - KGet_plug_in( QObject* parent = 0, const char* name = 0 ); + KGet_plug_in( TQObject* parent = 0, const char* name = 0 ); KToggleAction *m_paToggleDropTarget ; DCOPClient* p_dcopServer; virtual ~KGet_plug_in(); @@ -44,12 +44,12 @@ class KPluginFactory : public KLibFactory { Q_OBJECT public: - KPluginFactory( QObject *parent = 0, const char *name = 0 ); + KPluginFactory( TQObject *parent = 0, const char *name = 0 ); ~KPluginFactory() ; - virtual QObject* createObject( QObject* parent = 0, const char* pname = 0, - const char* name = "QObject", - const QStringList &args = QStringList() ); + virtual TQObject* createObject( TQObject* parent = 0, const char* pname = 0, + const char* name = "TQObject", + const TQStringList &args = TQStringList() ); private: static KInstance* s_instance; diff --git a/kget/kget_plug_in/links.cpp b/kget/kget_plug_in/links.cpp index a597257d..12600353 100644 --- a/kget/kget_plug_in/links.cpp +++ b/kget/kget_plug_in/links.cpp @@ -14,7 +14,7 @@ LinkItem::LinkItem( DOM::Element link ) // qDebug("*** href: %s", href.nodeValue().string().latin1() ); - QString urlString = link.ownerDocument().completeURL( href.nodeValue() ).string(); + TQString urlString = link.ownerDocument().completeURL( href.nodeValue() ).string(); if ( urlString.isEmpty() ) return; @@ -34,7 +34,7 @@ LinkItem::LinkItem( DOM::Element link ) // force "local file" mimetype determination KMimeType::Ptr mt = KMimeType::findByURL( url, 0, true, true); - icon = mt->icon( QString::null, false ); // dummy parameters + icon = mt->icon( TQString::null, false ); // dummy parameters mimeType = mt->comment(); m_valid = true; diff --git a/kget/kget_plug_in/links.h b/kget/kget_plug_in/links.h index 89ba9ab5..9430dcc0 100644 --- a/kget/kget_plug_in/links.h +++ b/kget/kget_plug_in/links.h @@ -18,9 +18,9 @@ public: LinkItem( DOM::Element link ); KURL url; - QString icon; - QString text; - QString mimeType; + TQString icon; + TQString text; + TQString mimeType; bool isValid() const { return m_valid; } diff --git a/kget/kmainwidget.cpp b/kget/kmainwidget.cpp index 420d44a1..01fc48c4 100644 --- a/kget/kmainwidget.cpp +++ b/kget/kmainwidget.cpp @@ -38,15 +38,15 @@ #include #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -87,7 +87,7 @@ #include #include -#include +#include #include "version.h" #include "slave.h" @@ -129,7 +129,7 @@ KMainWidget::KMainWidget(bool bStartDocked) { KConfig cfg( "kioslaverc", false, false); - cfg.setGroup(QString::null); + cfg.setGroup(TQString::null); cfg.writeEntry("AutoResume", true); cfg.sync(); } @@ -142,16 +142,16 @@ KMainWidget::KMainWidget(bool bStartDocked) kmain = this; // Set log time, needed for the name of log file - QDate date = QDateTime::currentDateTime().date(); - QTime time = QDateTime::currentDateTime().time(); - QString tmp; + TQDate date = TQDateTime::currentDateTime().date(); + TQTime time = TQDateTime::currentDateTime().time(); + TQString tmp; tmp.sprintf("log%d:%d:%d-%d:%d:%d", date.day(), date.month(), date.year(), time.hour(), time.minute(), time.second()); logFileName = locateLocal("appdata", "logs/"); logFileName += tmp; - lastClipboard = QApplication::clipboard()->text( QClipboard::Clipboard ).stripWhiteSpace(); + lastClipboard = TQApplication::clipboard()->text( QClipboard::Clipboard ).stripWhiteSpace(); // Load all settings from KConfig ksettings.load(); @@ -169,14 +169,14 @@ KMainWidget::KMainWidget(bool bStartDocked) setCentralWidget(myTransferList); - connect(kapp, SIGNAL(saveYourself()), SLOT(slotSaveYourself())); + connect(kapp, TQT_SIGNAL(saveYourself()), TQT_SLOT(slotSaveYourself())); // Enable dropping setAcceptDrops(true); // Setup connection timer - connectionTimer = new QTimer(this); - connect(connectionTimer, SIGNAL(timeout()), SLOT(slotCheckConnection())); + connectionTimer = new TQTimer(this); + connect(connectionTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotCheckConnection())); // setup socket for checking connection if ((_sock = sockets_open()) < 0) { @@ -189,9 +189,9 @@ KMainWidget::KMainWidget(bool bStartDocked) ksettings.b_offline=( !b_connected || ksettings.b_offlineMode ); // Setup animation timer - animTimer = new QTimer(this); + animTimer = new TQTimer(this); animCounter = 0; - connect(animTimer, SIGNAL(timeout()), SLOT(slotAnimTimeout())); + connect(animTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotAnimTimeout())); if (ksettings.b_useAnimation) { animTimer->start(400); @@ -200,18 +200,18 @@ KMainWidget::KMainWidget(bool bStartDocked) } // Setup transfer timer for scheduled downloads and checkQueue() - transferTimer = new QTimer(this); - connect(transferTimer, SIGNAL(timeout()), SLOT(slotTransferTimeout())); + transferTimer = new TQTimer(this); + connect(transferTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTransferTimeout())); transferTimer->start(10000); // 10 secs time interval // Setup autosave timer - autosaveTimer = new QTimer(this); - connect(autosaveTimer, SIGNAL(timeout()), SLOT(slotAutosaveTimeout())); + autosaveTimer = new TQTimer(this); + connect(autosaveTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotAutosaveTimeout())); setAutoSave(); // Setup clipboard timer - clipboardTimer = new QTimer(this); - connect(clipboardTimer, SIGNAL(timeout()), SLOT(slotCheckClipboard())); + clipboardTimer = new TQTimer(this); + connect(clipboardTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotCheckClipboard())); if (ksettings.b_autoPaste) { clipboardTimer->start(1000); } @@ -221,7 +221,7 @@ KMainWidget::KMainWidget(bool bStartDocked) // Setup special windows kdrop = new DropTarget(this); kdock = new DockWidget(this); - connect(kdock, SIGNAL(quitSelected()), SLOT(slotQuit())); + connect(kdock, TQT_SIGNAL(quitSelected()), TQT_SLOT(slotQuit())); // Set geometry if (ksettings.mainPosition.x() != -1) { @@ -253,7 +253,7 @@ KMainWidget::KMainWidget(bool bStartDocked) setCaption(i18n("Offline"), false); log(i18n("Starting offline")); } else - setCaption(QString::null, false); + setCaption(TQString::null, false); m_paAutoPaste->setChecked(ksettings.b_autoPaste); m_paShowLog->setChecked(b_viewLogWindow); @@ -291,7 +291,7 @@ KMainWidget::~KMainWidget() } -void KMainWidget::log(const QString & message, bool statusbar) +void KMainWidget::log(const TQString & message, bool statusbar) { #ifdef _DEBUG sDebugIn <<" message= "<< message << endl; @@ -337,76 +337,76 @@ void KMainWidget::setupGUI() KActionCollection *coll = actionCollection(); - connect(myTransferList, SIGNAL(selectionChanged()), this, SLOT(slotUpdateActions())); - connect(myTransferList, SIGNAL(transferSelected(Transfer *)), this, SLOT(slotOpenIndividual())); - connect(myTransferList, SIGNAL(popupMenu(Transfer *)), this, SLOT(slotPopupMenu(Transfer *))); + connect(myTransferList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotUpdateActions())); + connect(myTransferList, TQT_SIGNAL(transferSelected(Transfer *)), this, TQT_SLOT(slotOpenIndividual())); + connect(myTransferList, TQT_SIGNAL(popupMenu(Transfer *)), this, TQT_SLOT(slotPopupMenu(Transfer *))); // file actions - m_paOpenTransfer = KStdAction::open(this, SLOT(slotOpenTransfer()), coll, "open_transfer"); - m_paPasteTransfer = KStdAction::paste(this, SLOT(slotPasteTransfer()), coll, "paste_transfer"); + m_paOpenTransfer = KStdAction::open(this, TQT_SLOT(slotOpenTransfer()), coll, "open_transfer"); + m_paPasteTransfer = KStdAction::paste(this, TQT_SLOT(slotPasteTransfer()), coll, "paste_transfer"); - m_paExportTransfers = new KAction(i18n("&Export Transfer List..."), 0, this, SLOT(slotExportTransfers()), coll, "export_transfers"); - m_paImportTransfers = new KAction(i18n("&Import Transfer List..."), 0, this, SLOT(slotImportTransfers()), coll, "import_transfers"); + m_paExportTransfers = new KAction(i18n("&Export Transfer List..."), 0, this, TQT_SLOT(slotExportTransfers()), coll, "export_transfers"); + m_paImportTransfers = new KAction(i18n("&Import Transfer List..."), 0, this, TQT_SLOT(slotImportTransfers()), coll, "import_transfers"); - m_paImportText = new KAction(i18n("Import Text &File..."), 0, this, SLOT(slotImportTextFile()), coll, "import_text"); + m_paImportText = new KAction(i18n("Import Text &File..."), 0, this, TQT_SLOT(slotImportTextFile()), coll, "import_text"); - m_paQuit = KStdAction::quit(this, SLOT(slotQuit()), coll, "quit"); + m_paQuit = KStdAction::quit(this, TQT_SLOT(slotQuit()), coll, "quit"); // transfer actions - m_paCopy = new KAction(i18n("&Copy URL to Clipboard"), 0, this, SLOT(slotCopyToClipboard()), coll, "copy_url"); - m_paIndividual = new KAction(i18n("&Open Individual Window"), 0, this, SLOT(slotOpenIndividual()), coll, "open_individual"); + m_paCopy = new KAction(i18n("&Copy URL to Clipboard"), 0, this, TQT_SLOT(slotCopyToClipboard()), coll, "copy_url"); + m_paIndividual = new KAction(i18n("&Open Individual Window"), 0, this, TQT_SLOT(slotOpenIndividual()), coll, "open_individual"); - m_paMoveToBegin = new KAction(i18n("Move to &Beginning"), 0, this, SLOT(slotMoveToBegin()), coll, "move_begin"); + m_paMoveToBegin = new KAction(i18n("Move to &Beginning"), 0, this, TQT_SLOT(slotMoveToBegin()), coll, "move_begin"); - m_paMoveToEnd = new KAction(i18n("Move to &End"), 0, this, SLOT(slotMoveToEnd()), coll, "move_end"); + m_paMoveToEnd = new KAction(i18n("Move to &End"), 0, this, TQT_SLOT(slotMoveToEnd()), coll, "move_end"); #ifdef _DEBUG sDebug << "Loading pics" << endl; #endif - m_paResume = new KAction(i18n("&Resume"),"tool_resume", 0, this, SLOT(slotResumeCurrent()), coll, "resume"); - m_paPause = new KAction(i18n("&Pause"),"tool_pause", 0, this, SLOT(slotPauseCurrent()), coll, "pause"); - m_paDelete = new KAction(i18n("&Delete"),"editdelete", Qt::Key_Delete, this, SLOT(slotDeleteCurrent()), coll, "delete"); - m_paRestart = new KAction(i18n("Re&start"),"tool_restart", 0, this, SLOT(slotRestartCurrent()), coll, "restart"); + m_paResume = new KAction(i18n("&Resume"),"tool_resume", 0, this, TQT_SLOT(slotResumeCurrent()), coll, "resume"); + m_paPause = new KAction(i18n("&Pause"),"tool_pause", 0, this, TQT_SLOT(slotPauseCurrent()), coll, "pause"); + m_paDelete = new KAction(i18n("&Delete"),"editdelete", Qt::Key_Delete, this, TQT_SLOT(slotDeleteCurrent()), coll, "delete"); + m_paRestart = new KAction(i18n("Re&start"),"tool_restart", 0, this, TQT_SLOT(slotRestartCurrent()), coll, "restart"); - m_paQueue = new KRadioAction(i18n("&Queue"),"tool_queue", 0, this, SLOT(slotQueueCurrent()), coll, "queue"); - m_paTimer = new KRadioAction(i18n("&Timer"),"tool_timer", 0, this, SLOT(slotTimerCurrent()), coll, "timer"); - m_paDelay = new KRadioAction(i18n("De&lay"),"tool_delay", 0, this, SLOT(slotDelayCurrent()), coll, "delay"); + m_paQueue = new KRadioAction(i18n("&Queue"),"tool_queue", 0, this, TQT_SLOT(slotQueueCurrent()), coll, "queue"); + m_paTimer = new KRadioAction(i18n("&Timer"),"tool_timer", 0, this, TQT_SLOT(slotTimerCurrent()), coll, "timer"); + m_paDelay = new KRadioAction(i18n("De&lay"),"tool_delay", 0, this, TQT_SLOT(slotDelayCurrent()), coll, "delay"); m_paQueue->setExclusiveGroup("TransferMode"); m_paTimer->setExclusiveGroup("TransferMode"); m_paDelay->setExclusiveGroup("TransferMode"); // options actions - m_paUseAnimation = new KToggleAction(i18n("Use &Animation"), 0, this, SLOT(slotToggleAnimation()), coll, "toggle_animation"); - m_paExpertMode = new KToggleAction(i18n("&Expert Mode"),"tool_expert", 0, this, SLOT(slotToggleExpertMode()), coll, "expert_mode"); - m_paUseLastDir = new KToggleAction(i18n("&Use-Last-Folder Mode"),"tool_uselastdir", 0, this, SLOT(slotToggleUseLastDir()), coll, "use_last_dir"); - m_paAutoDisconnect = new KToggleAction(i18n("Auto-&Disconnect Mode"),"tool_disconnect", 0, this, SLOT(slotToggleAutoDisconnect()), coll, "auto_disconnect"); - m_paAutoShutdown = new KToggleAction(i18n("Auto-S&hutdown Mode"), "tool_shutdown", 0, this, SLOT(slotToggleAutoShutdown()), coll, "auto_shutdown"); - m_paOfflineMode = new KToggleAction(i18n("&Offline Mode"),"tool_offline_mode_off", 0, this, SLOT(slotToggleOfflineMode()), coll, "offline_mode"); - m_paAutoPaste = new KToggleAction(i18n("Auto-Pas&te Mode"),"tool_clipboard", 0, this, SLOT(slotToggleAutoPaste()), coll, "auto_paste"); + m_paUseAnimation = new KToggleAction(i18n("Use &Animation"), 0, this, TQT_SLOT(slotToggleAnimation()), coll, "toggle_animation"); + m_paExpertMode = new KToggleAction(i18n("&Expert Mode"),"tool_expert", 0, this, TQT_SLOT(slotToggleExpertMode()), coll, "expert_mode"); + m_paUseLastDir = new KToggleAction(i18n("&Use-Last-Folder Mode"),"tool_uselastdir", 0, this, TQT_SLOT(slotToggleUseLastDir()), coll, "use_last_dir"); + m_paAutoDisconnect = new KToggleAction(i18n("Auto-&Disconnect Mode"),"tool_disconnect", 0, this, TQT_SLOT(slotToggleAutoDisconnect()), coll, "auto_disconnect"); + m_paAutoShutdown = new KToggleAction(i18n("Auto-S&hutdown Mode"), "tool_shutdown", 0, this, TQT_SLOT(slotToggleAutoShutdown()), coll, "auto_shutdown"); + m_paOfflineMode = new KToggleAction(i18n("&Offline Mode"),"tool_offline_mode_off", 0, this, TQT_SLOT(slotToggleOfflineMode()), coll, "offline_mode"); + m_paAutoPaste = new KToggleAction(i18n("Auto-Pas&te Mode"),"tool_clipboard", 0, this, TQT_SLOT(slotToggleAutoPaste()), coll, "auto_paste"); - m_paPreferences = KStdAction::preferences(this, SLOT(slotPreferences()), coll); + m_paPreferences = KStdAction::preferences(this, TQT_SLOT(slotPreferences()), coll); - KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), coll); - KStdAction::configureToolbars(this, SLOT(slotConfigureToolbars()), coll); - KStdAction::configureNotifications(this, SLOT(slotConfigureNotifications()), coll); + KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), coll); + KStdAction::configureToolbars(this, TQT_SLOT(slotConfigureToolbars()), coll); + KStdAction::configureNotifications(this, TQT_SLOT(slotConfigureNotifications()), coll); - m_menubarAction = KStdAction::showMenubar(this, SLOT(slotShowMenubar()), coll, "settings_showmenubar" ); + m_menubarAction = KStdAction::showMenubar(this, TQT_SLOT(slotShowMenubar()), coll, "settings_showmenubar" ); m_menubarAction->setChecked( !menuBar()->isHidden() ); // view actions createStandardStatusBarAction(); - m_paShowLog = new KToggleAction(i18n("Show &Log Window"),"tool_logwindow", 0, this, SLOT(slotToggleLogWindow()), coll, "toggle_log"); + m_paShowLog = new KToggleAction(i18n("Show &Log Window"),"tool_logwindow", 0, this, TQT_SLOT(slotToggleLogWindow()), coll, "toggle_log"); m_paShowLog->setCheckedState(i18n("Hide &Log Window")); - m_paDropTarget = new KAction(i18n("Show Drop &Target"),"tool_drop_target", 0, this, SLOT(slotToggleDropTarget()), coll, "drop_target"); - m_paKonquerorIntegration = new KAction(i18n("Enable &KGet as Konqueror Download Manager"), "konqueror", 0, this, SLOT(slotKonquerorIntegration()), coll, "konqueror_integration"); + m_paDropTarget = new KAction(i18n("Show Drop &Target"),"tool_drop_target", 0, this, TQT_SLOT(slotToggleDropTarget()), coll, "drop_target"); + m_paKonquerorIntegration = new KAction(i18n("Enable &KGet as Konqueror Download Manager"), "konqueror", 0, this, TQT_SLOT(slotKonquerorIntegration()), coll, "konqueror_integration"); if (ksettings.b_KonquerorIntegration) { m_paKonquerorIntegration->setText(i18n("Disable &KGet as Konqueror Download Manager")); } menuHelp = new KHelpMenu(this, KGlobal::instance()->aboutData()); - KStdAction::whatsThis(menuHelp, SLOT(contextHelpActivated()), coll, "whats_this"); + KStdAction::whatsThis(menuHelp, TQT_SLOT(contextHelpActivated()), coll, "whats_this"); createGUI("kgetui.rc"); @@ -435,7 +435,7 @@ void KMainWidget::setupWhatsThis() sDebugIn << endl; #endif - QString tmp; + TQString tmp; tmp = i18n("Resume button starts selected transfers\n" "and sets their mode to queued."); m_paResume->setWhatsThis(tmp); @@ -510,7 +510,7 @@ void KMainWidget::slotConfigureToolbars() saveMainWindowSettings( KGlobal::config(), "MainWindow" ); KEditToolbar edit(factory()); - connect(&edit, SIGNAL( newToolbarConfig() ), this, SLOT( slotNewToolbarConfig() )); + connect(&edit, TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() )); edit.exec(); #ifdef _DEBUG @@ -540,8 +540,8 @@ void KMainWidget::slotImportTextFile() sDebugIn << endl; #endif - QString tmpFile; - QString list; + TQString tmpFile; + TQString list; int i, j; KURL filename = KFileDialog::getOpenURL(ksettings.lastDirectory); @@ -556,7 +556,7 @@ void KMainWidget::slotImportTextFile() i = 0; while ((j = list.find('\n', i)) != -1) { - QString newtransfer = list.mid(i, j - i); + TQString newtransfer = list.mid(i, j - i); addTransfer(newtransfer); i = j + 1; } @@ -648,8 +648,8 @@ void KMainWidget::writeTransfers(bool ask_for_name) sDebugIn << endl; #endif - QString str; - QString txt; + TQString str; + TQString txt; if (ask_for_name) txt = KFileDialog::getSaveFileName(ksettings.lastDirectory, i18n("*.kgt|*.kgt\n*|All Files")); @@ -805,12 +805,12 @@ void KMainWidget::slotDeleteCurrent() m_paPause->setEnabled(false); update(); TransferIterator it(myTransferList); - QValueList > selectedItems; - QStringList itemNames; + TQValueList > selectedItems; + TQStringList itemNames; while (it.current()) { if (it.current()->isSelected()) { - selectedItems.append( QGuardedPtr( it.current() )); + selectedItems.append( TQGuardedPtr( it.current() )); itemNames.append( it.current()->getSrc().prettyURL() ); } ++it; @@ -823,7 +823,7 @@ void KMainWidget::slotDeleteCurrent() if (KMessageBox::warningContinueCancelList(this, i18n("Are you sure you want to delete these transfers?"), itemNames, i18n("Question"), KStdGuiItem::del(), - QString("multiple_delete_transfer")) + TQString("multiple_delete_transfer")) != KMessageBox::Continue) return; // keep 'em } @@ -831,7 +831,7 @@ void KMainWidget::slotDeleteCurrent() { if (KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to delete this transfer?"), i18n("Question"), KStdGuiItem::del(), - QString("delete_transfer")) + TQString("delete_transfer")) != KMessageBox::Continue) return; } @@ -839,10 +839,10 @@ void KMainWidget::slotDeleteCurrent() // If we reach this, we want to delete all selected transfers // Some of them might have finished in the meantime tho. Good that - // we used a QGuardedPtr :) + // we used a TQGuardedPtr :) int transferFinishedMeanwhile = 0; - QValueListConstIterator > lit = selectedItems.begin();; + TQValueListConstIterator > lit = selectedItems.begin();; while ( lit != selectedItems.end() ) { if ( *lit ) @@ -859,7 +859,7 @@ void KMainWidget::slotDeleteCurrent() KMessageBox::information(this, i18n("The transfer you wanted to delete completed before it could be deleted.", "%n transfers you wanted to delete completed before they could be deleted.", transferFinishedMeanwhile ), - QString::null, "completedBeforeDeletion" ); + TQString::null, "completedBeforeDeletion" ); #ifdef _DEBUG sDebugOut << endl; @@ -957,7 +957,7 @@ void KMainWidget::slotOpenTransfer() sDebugIn << endl; #endif - QString newtransfer; + TQString newtransfer; bool ok = false; #ifdef _DEBUG @@ -997,7 +997,7 @@ void KMainWidget::slotCheckClipboard() //sDebugIn << endl; #endif - QString clipData = QApplication::clipboard()->text( QClipboard::Clipboard ).stripWhiteSpace(); + TQString clipData = TQApplication::clipboard()->text( QClipboard::Clipboard ).stripWhiteSpace(); if (clipData != lastClipboard) { sDebug << "New clipboard event" << endl; @@ -1024,9 +1024,9 @@ void KMainWidget::slotPasteTransfer() sDebugIn << endl; #endif - QString newtransfer; + TQString newtransfer; - newtransfer = QApplication::clipboard()->text(); + newtransfer = TQApplication::clipboard()->text(); newtransfer = newtransfer.stripWhiteSpace(); if (!ksettings.b_expertMode) { @@ -1071,7 +1071,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile) if ( !destURL.isValid() ) { // Setup destination - QString destDir = getSaveDirectoryFor( url.fileName() ); + TQString destDir = getSaveDirectoryFor( url.fileName() ); bool b_expertMode = ksettings.b_expertMode; bool bDestisMalformed = true; @@ -1079,7 +1079,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile) { if (!b_expertMode) { // open the filedialog for confirmation - KFileDialog dlg( destDir, QString::null, + KFileDialog dlg( destDir, TQString::null, 0L, "save_as", true); dlg.setCaption(i18n("Save As")); dlg.setOperationMode(KFileDialog::Saving); @@ -1090,7 +1090,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile) else dlg.setSelection(destURL.url()); - if ( dlg.exec() == QDialog::Rejected ) + if ( dlg.exec() == TQDialog::Rejected ) { #ifdef _DEBUG sDebugOut << endl; @@ -1114,7 +1114,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile) //check if destination already exists if(KIO::NetAccess::exists(destURL, false, this)) { - if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL()), QString::null, i18n("Overwrite"), i18n("Do Not Overwrite") ) + if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL()), TQString::null, i18n("Overwrite"), i18n("Do Not Overwrite") ) == KMessageBox::Yes) { bDestisMalformed=false; @@ -1156,9 +1156,9 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile) } -void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) +void KMainWidget::addTransfers( const KURL::List& src, const TQString& destDir ) { - QValueList urls_orig; + TQValueList urls_orig; for ( KURL::List::ConstIterator it = src.begin(); it != src.end(); ++it ) { @@ -1181,7 +1181,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) { // create a proper destination file from destDir KURL destURL = KURL::fromPathOrURL( destDir ); - QString fileName = urls_orig.first().src.fileName(); + TQString fileName = urls_orig.first().src.fileName(); // in case the fileName is empty, we simply ask for a filename in // addTransferEx. Do NOT attempt to use an empty filename, that @@ -1192,7 +1192,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) destURL.setFileName( fileName ); if(KIO::NetAccess::exists(destURL, false, this)) { - if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL()), QString::null, i18n("Overwrite"), i18n("Do Not Overwrite") ) + if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL()), TQString::null, i18n("Overwrite"), i18n("Do Not Overwrite") ) == KMessageBox::Yes) { SafeDelete::deleteFile( destURL ); @@ -1213,8 +1213,8 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) // multiple files -> ask for directory, not for every single filename bool dir_accepted = false; - QValueList::Iterator it; - QValueList urls; + TQValueList::Iterator it; + TQValueList urls; KURL::List urlsToDelete; while ( !dir_accepted ) { @@ -1223,7 +1223,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) // we want to start again with the original list dir_accepted = true; //Set to false later when Cancel is pressed KURL dest; - if ( destDir.isEmpty() || !QFileInfo( destDir ).isDir() ) + if ( destDir.isEmpty() || !TQFileInfo( destDir ).isDir() ) { if ( !destDir.isEmpty() ) dest.setPath( destDir ); @@ -1231,9 +1231,9 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) dest.setPath( getSaveDirectoryFor( src.first().fileName() ) ); // ask in any case, when destDir is empty - if ( destDir.isEmpty() || !QFileInfo( dest.path() ).isDir() ) + if ( destDir.isEmpty() || !TQFileInfo( dest.path() ).isDir() ) { - QString dir = KFileDialog::getExistingDirectory( dest.path() ); + TQString dir = KFileDialog::getExistingDirectory( dest.path() ); if ( dir.isEmpty() ) // aborted return; @@ -1260,7 +1260,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) } (*it).dest = dest; - QString fileName = (*it).src.fileName(); + TQString fileName = (*it).src.fileName(); if ( fileName.isEmpty() ) // simply use the full url as filename fileName = KURL::encode_string_no_slash( (*it).src.prettyURL() ); @@ -1268,15 +1268,15 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) if( KIO::NetAccess::exists((*it).dest, false, this)) { - QString newdest; + TQString newdest; if (skip_all) result = KIO::R_SKIP; else if( overwrite_all ) result = KIO::R_OVERWRITE; else { - QFileInfo finfo( (*it).dest.path() ); - QString caption = i18n( "File Already exists" ) + " - KGet"; + TQFileInfo finfo( (*it).dest.path() ); + TQString caption = i18n( "File Already exists" ) + " - KGet"; result = KIO::open_RenameDlg( caption, (*it).src.url(), (*it).dest.url(), KIO::RenameDlg_Mode(KIO::M_OVERWRITE|KIO::M_SKIP|KIO::M_MULTI), newdest, (KIO::filesize_t) -1, (KIO::filesize_t)finfo.size(), (time_t) -1, (time_t) -1, (time_t) -1, finfo.lastModified().toTime_t()); } switch (result) @@ -1327,7 +1327,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) checkQueue(); } -void KMainWidget::addTransfer(const QString& src) +void KMainWidget::addTransfer(const TQString& src) { #ifdef _DEBUG sDebugIn << endl; @@ -1445,7 +1445,7 @@ void KMainWidget::slotTransferTimeout() for (; it.current(); ++it) { item = it.current(); - if (item->getMode() == Transfer::MD_SCHEDULED && item->getStartTime() <= QDateTime::currentDateTime()) { + if (item->getMode() == Transfer::MD_SCHEDULED && item->getStartTime() <= TQDateTime::currentDateTime()) { item->setMode(Transfer::MD_QUEUED); flag = true; } @@ -1455,7 +1455,7 @@ void KMainWidget::slotTransferTimeout() checkQueue(); } - if (ksettings.b_autoDisconnect && ksettings.b_timedDisconnect && ksettings.disconnectTime <= QTime::currentTime() && ksettings.disconnectDate == QDate::currentDate()) { + if (ksettings.b_autoDisconnect && ksettings.b_timedDisconnect && ksettings.disconnectTime <= TQTime::currentTime() && ksettings.disconnectDate == TQDate::currentDate()) { onlineDisconnect(); } @@ -1489,7 +1489,7 @@ void KMainWidget::slotStatusChanged(Transfer * item, int _operation) case Transfer::OP_FINISHED: { - QString srcurl = item->getSrc().prettyURL(); + TQString srcurl = item->getSrc().prettyURL(); if (ksettings.b_removeOnSuccess && !item->keepDialogOpen() ) { delete item; @@ -1551,13 +1551,13 @@ void KMainWidget::slotStatusChanged(Transfer * item, int _operation) } -void KMainWidget::dragEnterEvent(QDragEnterEvent * event) +void KMainWidget::dragEnterEvent(TQDragEnterEvent * event) { #ifdef _DEBUG //sDebugIn << endl; #endif - event->accept(KURLDrag::canDecode(event) || QTextDrag::canDecode(event)); + event->accept(KURLDrag::canDecode(event) || TQTextDrag::canDecode(event)); #ifdef _DEBUG sDebugOut << endl; @@ -1565,18 +1565,18 @@ void KMainWidget::dragEnterEvent(QDragEnterEvent * event) } -void KMainWidget::dropEvent(QDropEvent * event) +void KMainWidget::dropEvent(TQDropEvent * event) { #ifdef _DEBUG //sDebugIn << endl; #endif KURL::List list; - QString str; + TQString str; if (KURLDrag::decode(event, list)) { addTransfers(list); - } else if (QTextDrag::decode(event, str)) { + } else if (TQTextDrag::decode(event, str)) { addTransfer(str); } sDebugOut << endl; @@ -1592,8 +1592,8 @@ void KMainWidget::slotCopyToClipboard() Transfer *item = (Transfer *) myTransferList->currentItem(); if (item) { - QString url = item->getSrc().url(); - QClipboard *cb = QApplication::clipboard(); + TQString url = item->getSrc().url(); + QClipboard *cb = TQApplication::clipboard(); cb->setText( url, QClipboard::Selection ); cb->setText( url, QClipboard::Clipboard); myTransferList->clearSelection(); @@ -1766,7 +1766,7 @@ void KMainWidget::slotToggleOfflineMode() m_paOfflineMode->setIconSet(LOAD_ICON("tool_offline_mode_off")); } else { log(i18n("Offline mode off.")); - setCaption(QString::null, false); + setCaption(TQString::null, false); m_paOfflineMode->setIconSet(LOAD_ICON("tool_offline_mode_on")); } @@ -1923,7 +1923,7 @@ void KMainWidget::slotKonquerorIntegration() ksettings.b_KonquerorIntegration=!ksettings.b_KonquerorIntegration; KConfig cfg("konquerorrc", false, false); cfg.setGroup("HTML Settings"); - cfg.writePathEntry("DownloadManager",QString((bIsKonquiEnable)?"kget":"")); + cfg.writePathEntry("DownloadManager",TQString((bIsKonquiEnable)?"kget":"")); cfg.sync(); if (bIsKonquiEnable) { @@ -1953,8 +1953,8 @@ void KMainWidget::slotPopupMenu(Transfer * item) slotUpdateActions(); // popup transfer menu at the position - QWidget *menu = guiFactory()->container("transfer",this); - ((QPopupMenu *) menu)->popup(QCursor::pos()); + TQWidget *menu = guiFactory()->container("transfer",this); + ((TQPopupMenu *) menu)->popup(TQCursor::pos()); #ifdef _DEBUG @@ -2144,7 +2144,7 @@ void KMainWidget::updateStatusBar() #endif Transfer *item; - QString tmpstr; + TQString tmpstr; int totalFiles = 0; KIO::filesize_t totalSize = 0; @@ -2221,7 +2221,7 @@ void KMainWidget::onlineDisconnect() } } log(i18n("Disconnecting...")); - system(QFile::encodeName(ksettings.disconnectCommand)); + system(TQFile::encodeName(ksettings.disconnectCommand)); #ifdef _DEBUG sDebugOut << endl; @@ -2239,7 +2239,7 @@ void KMainWidget::slotCheckConnection() if (b_connected != old) { if (b_connected) { log(i18n("We are online.")); - setCaption(QString::null, false); + setCaption(TQString::null, false); ksettings.b_offline=ksettings.b_offlineMode; checkQueue(); } else { @@ -2351,7 +2351,7 @@ static int sockets_open() /** No descriptions */ -void KMainWidget::customEvent(QCustomEvent * _e) +void KMainWidget::customEvent(TQCustomEvent * _e) { #ifdef _DEBUG //sDebugIn << endl; @@ -2433,16 +2433,16 @@ void KMainWidget::customEvent(QCustomEvent * _e) #endif } -QString KMainWidget::getSaveDirectoryFor( const QString& filename ) const +TQString KMainWidget::getSaveDirectoryFor( const TQString& filename ) const { // first set destination directory to current directory ( which is also last used ) - QString destDir = ksettings.lastDirectory; + TQString destDir = ksettings.lastDirectory; if (!ksettings.b_useLastDir) { // check wildcards for default directory DirList::Iterator it; for (it = ksettings.defaultDirList.begin(); it != ksettings.defaultDirList.end(); ++it) { - QRegExp rexp((*it).extRegexp); + TQRegExp rexp((*it).extRegexp); rexp.setWildcard(true); diff --git a/kget/kmainwidget.h b/kget/kmainwidget.h index ce7c9ea8..363ca2f0 100644 --- a/kget/kmainwidget.h +++ b/kget/kmainwidget.h @@ -61,12 +61,12 @@ public: KMainWidget(bool bShowMain = false); ~KMainWidget(); - void addTransfer( const QString& src ); + void addTransfer( const TQString& src ); void addTransferEx( const KURL& url, const KURL& destFile = KURL()); // dcop interface - virtual void addTransfers( const KURL::List& src, const QString& destDir = QString::null ); + virtual void addTransfers( const KURL::List& src, const TQString& destDir = TQString::null ); virtual bool isDropTargetVisible() const; virtual void setDropTargetVisible( bool setVisible ); @@ -155,8 +155,8 @@ protected: void writeLog(); // drag and drop - virtual void dragEnterEvent(QDragEnterEvent *); - virtual void dropEvent(QDropEvent *); + virtual void dragEnterEvent(TQDragEnterEvent *); + virtual void dropEvent(TQDropEvent *); void readTransfers(bool ask_for_name = false); void writeTransfers(bool ask_for_name = false); @@ -175,24 +175,24 @@ protected: void onlineDisconnect(); void checkOnline(); void stopAll(); - void log(const QString & message, bool statusbar = true); + void log(const TQString & message, bool statusbar = true); /** No descriptions */ - virtual void customEvent(QCustomEvent * e); + virtual void customEvent(TQCustomEvent * e); // various timers - QTimer *animTimer; // animation timer - QTimer *connectionTimer; // timer that checks whether we are online - QTimer *transferTimer; // timer for scheduled transfers - QTimer *autosaveTimer; // timer for autosaving transfer list - QTimer *clipboardTimer; // timer for checking clipboard - autopaste function + TQTimer *animTimer; // animation timer + TQTimer *connectionTimer; // timer that checks whether we are online + TQTimer *transferTimer; // timer for scheduled transfers + TQTimer *autosaveTimer; // timer for autosaving transfer list + TQTimer *clipboardTimer; // timer for checking clipboard - autopaste function - QString logFileName; + TQString logFileName; private: - QString getSaveDirectoryFor( const QString& filename ) const; + TQString getSaveDirectoryFor( const TQString& filename ) const; bool sanityChecksSuccessful( const KURL& url ); TransferList * myTransferList; @@ -202,7 +202,7 @@ private: DlgPreferences *prefDlg; DockWidget *kdock; - QString lastClipboard; + TQString lastClipboard; uint animCounter; diff --git a/kget/logwindow.cpp b/kget/logwindow.cpp index 5d6f77ad..09490134 100644 --- a/kget/logwindow.cpp +++ b/kget/logwindow.cpp @@ -25,8 +25,8 @@ ***************************************************************************/ -#include -#include +#include +#include #include #include @@ -37,25 +37,25 @@ #include "logwindow.h" #include -#include +#include // // Replace regular space with nbsp -// QString replaceSpaces(const QString &str) { -// QString res = str; +// TQString replaceSpaces(const TQString &str) { +// TQString res = str; // res.simplifyWhiteSpace(); // int pos; // while ( (pos = res.find(' ')) != -1) { -// res.replace(pos, 1, new QChar( 0x00a0 ), 1); +// res.replace(pos, 1, new TQChar( 0x00a0 ), 1); // } // return res; // } -static QString removeHTML(const QString & str) +static TQString removeHTML(const TQString & str) { - QString res = str; + TQString res = str; int pos; // replace
with a newline @@ -77,18 +77,18 @@ static QString removeHTML(const QString & str) } -SeparatedLog::SeparatedLog(QWidget * parent):QWidget(parent) +SeparatedLog::SeparatedLog(TQWidget * parent):TQWidget(parent) { idSelected = 0; - QGridLayout *topGridLayout = new QGridLayout(this, 1, 2, 0, KDialog::spacingHint()); + TQGridLayout *topGridLayout = new TQGridLayout(this, 1, 2, 0, KDialog::spacingHint()); topGridLayout->setRowStretch(0, 5); topGridLayout->setColStretch(0, 3); topGridLayout->setColStretch(1, 10); - lv_log = new QListView(this); + lv_log = new TQListView(this); lv_log->setMultiSelection(false); lv_log->setAllColumnsShowFocus(true); lv_log->setSorting(-1); @@ -98,26 +98,26 @@ SeparatedLog::SeparatedLog(QWidget * parent):QWidget(parent) topGridLayout->addWidget(lv_log, 0, 0); - connect(lv_log, SIGNAL(selectionChanged(QListViewItem *)), SLOT(transferSelected(QListViewItem *))); + connect(lv_log, TQT_SIGNAL(selectionChanged(TQListViewItem *)), TQT_SLOT(transferSelected(TQListViewItem *))); - ml_log = new QTextEdit(this); + ml_log = new TQTextEdit(this); ml_log->setTextFormat(LogText); ml_log->setMinimumSize(300, 200); - ml_log->setVScrollBarMode(QScrollView::Auto); - ml_log->setWordWrap(QTextEdit::NoWrap); + ml_log->setVScrollBarMode(TQScrollView::Auto); + ml_log->setWordWrap(TQTextEdit::NoWrap); topGridLayout->addWidget(ml_log, 0, 1); } -void SeparatedLog::addLog(uint id, const QString & filename, const QString & message) +void SeparatedLog::addLog(uint id, const TQString & filename, const TQString & message) { if (!trMap.contains(id)) { trMap.insert(id, message); - QListViewItem *last=lv_log->lastItem(); - new QListViewItem(lv_log, last); + TQListViewItem *last=lv_log->lastItem(); + new TQListViewItem(lv_log, last); last=lv_log->lastItem(); - last->setText(0, QString::number(id)); + last->setText(0, TQString::number(id)); last->setText(1, filename); // if I don't do this, ID#10 gets sorted between ID#1 and ID#2, ugly. } else { @@ -130,7 +130,7 @@ void SeparatedLog::addLog(uint id, const QString & filename, const QString & mes } -void SeparatedLog::transferSelected(QListViewItem * item) +void SeparatedLog::transferSelected(TQListViewItem * item) { if (item) { idSelected = item->text(0).toUInt(); @@ -160,27 +160,27 @@ LogWindow::LogWindow():KDialogBase(Tabbed, i18n("Log Window"), Close, Close, 0, { // add pages - QFrame *page = addPage(i18n("Mixed")); - QVBoxLayout *topLayout = new QVBoxLayout(page, 0, spacingHint()); + TQFrame *page = addPage(i18n("Mixed")); + TQVBoxLayout *topLayout = new TQVBoxLayout(page, 0, spacingHint()); - mixed_log = new QTextEdit(page); + mixed_log = new TQTextEdit(page); mixed_log->setTextFormat(LogText); - mixed_log->setVScrollBarMode(QScrollView::Auto); - mixed_log->setWordWrap(QTextEdit::NoWrap); + mixed_log->setVScrollBarMode(TQScrollView::Auto); + mixed_log->setWordWrap(TQTextEdit::NoWrap); topLayout->addWidget(mixed_log); page = addPage(i18n("Separated")); - topLayout = new QVBoxLayout(page, 0, spacingHint()); + topLayout = new TQVBoxLayout(page, 0, spacingHint()); sep_log = new SeparatedLog(page); topLayout->addWidget(sep_log); - connect(this, SIGNAL(closeClicked()), this, SLOT(close())); + connect(this, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(close())); // resize( 500, 300 ); } -void LogWindow::closeEvent(QCloseEvent *e) +void LogWindow::closeEvent(TQCloseEvent *e) { kmain->m_paShowLog->setChecked(false); kmain->b_viewLogWindow = false; @@ -188,29 +188,29 @@ void LogWindow::closeEvent(QCloseEvent *e) } -void LogWindow::logGeneral(const QString & message) +void LogWindow::logGeneral(const TQString & message) { - QString tmps = "" + QTime::currentTime().toString() + " : " + message + ""; + TQString tmps = "" + TQTime::currentTime().toString() + " : " + message + ""; mixed_log->append(tmps); } -void LogWindow::logTransfer(uint id, const QString & filename, const QString & message) +void LogWindow::logTransfer(uint id, const TQString & filename, const TQString & message) { - QString mixed_msg, single_msg, job_id; + TQString mixed_msg, single_msg, job_id; - job_id = QString("Job[%1] : ").arg(id); - mixed_msg = "" + QTime::currentTime().toString() + " : " + job_id + message; + job_id = TQString("Job[%1] : ").arg(id); + mixed_msg = "" + TQTime::currentTime().toString() + " : " + job_id + message; - single_msg = "" + QTime::currentTime().toString() + " : " + message; + single_msg = "" + TQTime::currentTime().toString() + " : " + message; mixed_log->append(mixed_msg); sep_log->addLog(id, filename, single_msg); } -QString LogWindow::getText() const +TQString LogWindow::getText() const { return removeHTML(mixed_log->text()); } diff --git a/kget/logwindow.h b/kget/logwindow.h index a2aa13d5..2ac17941 100644 --- a/kget/logwindow.h +++ b/kget/logwindow.h @@ -28,7 +28,7 @@ #ifndef _LOGWINDOW_H #define _LOGWINDOW_H -#include +#include #include @@ -40,20 +40,20 @@ class SeparatedLog:public QWidget { Q_OBJECT public: - SeparatedLog(QWidget * parent); + SeparatedLog(TQWidget * parent); ~SeparatedLog() {} - void addLog(uint id, const QString & filename, const QString & message); + void addLog(uint id, const TQString & filename, const TQString & message); void refresh(); protected slots: - void transferSelected(QListViewItem * item); + void transferSelected(TQListViewItem * item); private: - QListView * lv_log; - QTextEdit *ml_log; + TQListView * lv_log; + TQTextEdit *ml_log; - typedef QMap < uint, QString > TransferMap; + typedef TQMap < uint, TQString > TransferMap; TransferMap trMap; uint idSelected; @@ -67,17 +67,17 @@ Q_OBJECT public: LogWindow(); ~LogWindow() {} - void logGeneral(const QString & message); - QString getText() const; + void logGeneral(const TQString & message); + TQString getText() const; public slots: - void logTransfer(uint id, const QString & filename, const QString & message); + void logTransfer(uint id, const TQString & filename, const TQString & message); protected: - void closeEvent(QCloseEvent *); + void closeEvent(TQCloseEvent *); private: - QTextEdit * mixed_log; + TQTextEdit * mixed_log; SeparatedLog *sep_log; }; diff --git a/kget/main.cpp b/kget/main.cpp index cd3341b5..f6ca1cb0 100644 --- a/kget/main.cpp +++ b/kget/main.cpp @@ -94,7 +94,7 @@ static void setSignalHandler(void (*handler) (int)) static void cleanup(void) { qInstallMsgHandler(0L /*oldMsgHandler*/); -// QString cmd; +// TQString cmd; } @@ -158,7 +158,7 @@ public: #ifdef _DEBUG sDebug <<"args(0)= "<arg(0) << endl; #endif - QString txt(args->arg(0)); + TQString txt(args->arg(0)); if ( txt.endsWith( ".kgt" ) ) kmain->readTransfersEx(KURL::fromPathOrURL( txt )); else @@ -179,7 +179,7 @@ public: } else { - kmain->addTransfers( urls, QString() ); + kmain->addTransfers( urls, TQString() ); } } args->clear(); diff --git a/kget/safedelete.cpp b/kget/safedelete.cpp index c4cb6915..16deb1dd 100644 --- a/kget/safedelete.cpp +++ b/kget/safedelete.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include "safedelete.h" @@ -11,7 +11,7 @@ bool SafeDelete::deleteFile( const KURL& url ) { if ( url.isLocalFile() ) { - QFileInfo info( url.path() ); + TQFileInfo info( url.path() ); if ( info.isDir() ) { KMessageBox::information(0L, diff --git a/kget/settings.cpp b/kget/settings.cpp index da066a6a..942acb09 100644 --- a/kget/settings.cpp +++ b/kget/settings.cpp @@ -33,7 +33,7 @@ #include #include -#include +#include #include "kmainwidget.h" #include "transferlist.h" @@ -44,7 +44,7 @@ static const unsigned long DEFAULT_DOCK_STATE = (NET::SkipTaskbar | NET::StaysOnTop); -QString ConnectionDevices[6] = { +TQString ConnectionDevices[6] = { "", "eth", "plip", @@ -91,7 +91,7 @@ Settings::load() b_timedDisconnect = config->readBoolEntry("TimedDisconnect", DEF_TimedDisconnect); disconnectTime.setHMS(config->readNumEntry("DisconnectTimeHour"), config->readNumEntry("DisconnectTimeMinute"), 0); - disconnectDate = QDate::currentDate(); // doesn't make sense to save it + disconnectDate = TQDate::currentDate(); // doesn't make sense to save it b_autoShutdown = config->readBoolEntry("AutoShutdown", DEF_AutoShutdown); b_autoPaste = config->readBoolEntry("AutoPaste", DEF_AutoPaste); @@ -120,7 +120,7 @@ Settings::load() KConfig *cfg = new KConfig("konquerorrc", false, false); cfg->setGroup("HTML Settings"); - QString downloadManager=cfg->readPathEntry("DownloadManager"); + TQString downloadManager=cfg->readPathEntry("DownloadManager"); b_KonquerorIntegration=(downloadManager==KGET_APP_NAME)?true:false; @@ -131,7 +131,7 @@ Settings::load() bool bAnswerYes = KMessageBox::questionYesNo(0L,i18n("This is the first time that you have run KGet.\nDo you want to use KGet as Download Manager for Konqueror?"), i18n("Konqueror Integration"), i18n("Enable"), i18n("Do Not Enable")) == KMessageBox::Yes; if (bAnswerYes) { - cfg->writePathEntry("DownloadManager", QString(KGET_APP_NAME)); + cfg->writePathEntry("DownloadManager", TQString(KGET_APP_NAME)); cfg->sync(); b_KonquerorIntegration=true; } @@ -151,14 +151,14 @@ Settings::load() b_useLastDir = config->readBoolEntry("UseLastDirectory", DEF_UseLastDir); lastDirectory = config->readPathEntry("LastDirectory", - QString("file:") + QDir::currentDirPath() ); + TQString("file:") + TQDir::currentDirPath() ); - QStringList strList; + TQStringList strList; strList = config->readPathListEntry("Items"); defaultDirList.clear(); - QStringList::Iterator it = strList.begin(); + TQStringList::Iterator it = strList.begin(); for (; it != strList.end(); ++it) { DirItem item; @@ -171,13 +171,13 @@ Settings::load() // read misc settings config->setGroup("Misc"); - QFont font = KGlobalSettings::generalFont(); + TQFont font = KGlobalSettings::generalFont(); listViewFont = config->readFontEntry("Font", &font); // read main window geometry settings config->setGroup("MainGeometry"); - const QPoint point(-1,-1); + const TQPoint point(-1,-1); mainPosition = config->readPointEntry("Position", &point); mainSize = config->readSizeEntry("Size"); mainState = config->readUnsignedLongNumEntry("State", 0); @@ -253,7 +253,7 @@ void Settings::save() config->writeEntry("UseLastDirectory", b_useLastDir); config->writePathEntry("LastDirectory", lastDirectory ); DirList::Iterator it; - QStringList lst; + TQStringList lst; for (it = defaultDirList.begin(); it != defaultDirList.end(); ++it) { lst.append((*it).extRegexp); diff --git a/kget/settings.h b/kget/settings.h index c66b00e6..7c02b166 100644 --- a/kget/settings.h +++ b/kget/settings.h @@ -31,7 +31,7 @@ // common connection types enum ConnectionType { PERMANENT = 0, ETHERNET, PLIP, SLIP, PPP, ISDN }; -extern QString ConnectionDevices[]; +extern TQString ConnectionDevices[]; // Connection settings @@ -86,17 +86,17 @@ extern QString ConnectionDevices[]; #define DEF_WindowStyle NORMAL -#include +#include #include -#include +#include struct DirItem { - QString extRegexp; - QString defaultDir; + TQString extRegexp; + TQString defaultDir; }; -typedef QValueList < DirItem > DirList; +typedef TQValueList < DirItem > DirList; class Settings { @@ -133,10 +133,10 @@ public: bool b_autoSave; uint autoSaveInterval; bool b_autoDisconnect; - QString disconnectCommand; + TQString disconnectCommand; bool b_timedDisconnect; - QDate disconnectDate; - QTime disconnectTime; + TQDate disconnectDate; + TQTime disconnectTime; bool b_autoShutdown; bool b_autoPaste; @@ -163,21 +163,21 @@ public: // directories options bool b_useLastDir; - QString lastDirectory; + TQString lastDirectory; DirList defaultDirList; // system options bool b_useAnimation; - QFont listViewFont; + TQFont listViewFont; // geometry settings - QPoint mainPosition; - QSize mainSize; + TQPoint mainPosition; + TQSize mainSize; unsigned long int mainState; - QPoint dropPosition; + TQPoint dropPosition; unsigned long int dropState; }; diff --git a/kget/slave.cpp b/kget/slave.cpp index 944a7f37..f8569e79 100644 --- a/kget/slave.cpp +++ b/kget/slave.cpp @@ -36,8 +36,8 @@ #include Slave::Slave(Transfer * _parent, const KURL & _src, const KURL & _dest) - : QObject(), - QThread() + : TQObject(), + TQThread() { mDebug << ">>>>Entering" << endl; copyjob = NULL; @@ -74,22 +74,22 @@ void Slave::PostMessage(SlaveResult _event, Q_ULLONG _data) { SlaveEvent *e1 = new SlaveEvent(m_parent, _event, _data); - QApplication::postEvent(kapp->mainWidget(), (QEvent *) e1); + TQApplication::postEvent(kapp->mainWidget(), (TQEvent *) e1); } -void Slave::PostMessage(SlaveResult _event, const QString & _msg) +void Slave::PostMessage(SlaveResult _event, const TQString & _msg) { SlaveEvent *e1 = new SlaveEvent(m_parent, _event, _msg); - QApplication::postEvent(kapp->mainWidget(), (QEvent *) e1); + TQApplication::postEvent(kapp->mainWidget(), (TQEvent *) e1); mDebug << "Msg:" << "_msg = " << _msg << endl; } -void Slave::InfoMessage(const QString & _msg) +void Slave::InfoMessage(const TQString & _msg) { SlaveEvent *e1 = new SlaveEvent(m_parent, SLV_INFO, _msg); - QApplication::postEvent(kapp->mainWidget(), (QEvent *) e1); + TQApplication::postEvent(kapp->mainWidget(), (TQEvent *) e1); mDebug << "Infor Msg:" << "_msg = " << _msg << endl; } @@ -218,17 +218,17 @@ void Slave::Connect() mDebugIn << endl; - connect(copyjob, SIGNAL(canceled(KIO::Job *)), SLOT(slotCanceled(KIO::Job *))); - connect(copyjob, SIGNAL(connected(KIO::Job *)), SLOT(slotConnected(KIO::Job *))); - connect(copyjob, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *))); + connect(copyjob, TQT_SIGNAL(canceled(KIO::Job *)), TQT_SLOT(slotCanceled(KIO::Job *))); + connect(copyjob, TQT_SIGNAL(connected(KIO::Job *)), TQT_SLOT(slotConnected(KIO::Job *))); + connect(copyjob, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *))); - connect(copyjob, SIGNAL(totalSize(KIO::Job *, KIO::filesize_t)), SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t))); + connect(copyjob, TQT_SIGNAL(totalSize(KIO::Job *, KIO::filesize_t)), TQT_SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t))); - connect(copyjob, SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)), SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t))); + connect(copyjob, TQT_SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)), TQT_SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t))); - connect(copyjob, SIGNAL(speed(KIO::Job *, unsigned long)), SLOT(slotSpeed(KIO::Job *, unsigned long))); + connect(copyjob, TQT_SIGNAL(speed(KIO::Job *, unsigned long)), TQT_SLOT(slotSpeed(KIO::Job *, unsigned long))); - connect(copyjob, SIGNAL(infoMessage(KIO::Job *, const QString &)), SLOT(slotInfoMessage(KIO::Job *, const QString &))); + connect(copyjob, TQT_SIGNAL(infoMessage(KIO::Job *, const TQString &)), TQT_SLOT(slotInfoMessage(KIO::Job *, const TQString &))); mDebugOut << endl; } @@ -266,7 +266,7 @@ void Slave::slotResult(KIO::Job * job) PostMessage(SLV_NOTINCACHE); return; } - QString tmsg=" " + job->errorString() + \ + TQString tmsg=" " + job->errorString() + \ ""; InfoMessage(tmsg); if (m_parent->retryOnError() && \ @@ -321,7 +321,7 @@ void Slave::slotProcessedSize(KIO::Job *, KIO::filesize_t _processed_size) // mDebugOut< stack; - QWaitCondition worker; - QMutex mutex; + TQValueStack < SlaveCommand > stack; + TQWaitCondition worker; + TQMutex mutex; KIO::GetFileJob * copyjob; }; diff --git a/kget/slaveevent.cpp b/kget/slaveevent.cpp index e0d41661..87d4c07a 100644 --- a/kget/slaveevent.cpp +++ b/kget/slaveevent.cpp @@ -26,18 +26,18 @@ #include "slaveevent.h" -#define EVENT_TYPE (QEvent::User + 252) +#define EVENT_TYPE (TQEvent::User + 252) -SlaveEvent::SlaveEvent(Transfer * _item, unsigned int _event, Q_ULLONG _ldata):QCustomEvent(EVENT_TYPE) +SlaveEvent::SlaveEvent(Transfer * _item, unsigned int _event, Q_ULLONG _ldata):TQCustomEvent(EVENT_TYPE) { m_event = _event; m_item = _item; m_ldata = _ldata; - m_msg = QString(""); + m_msg = TQString(""); } -SlaveEvent::SlaveEvent(Transfer * _item, unsigned int _event, const QString & _msg):QCustomEvent(EVENT_TYPE) +SlaveEvent::SlaveEvent(Transfer * _item, unsigned int _event, const TQString & _msg):TQCustomEvent(EVENT_TYPE) { m_event = _event; m_item = _item; @@ -66,7 +66,7 @@ Q_ULLONG SlaveEvent::getData() const return m_ldata; } -const QString & SlaveEvent::getMsg() const +const TQString & SlaveEvent::getMsg() const { return m_msg; } diff --git a/kget/slaveevent.h b/kget/slaveevent.h index 6fb5f96b..6f87bbbe 100644 --- a/kget/slaveevent.h +++ b/kget/slaveevent.h @@ -27,7 +27,7 @@ #ifndef SLAVEEVENT_H #define SLAVEEVENT_H -#include +#include class Transfer; @@ -39,20 +39,20 @@ class SlaveEvent:public QCustomEvent { public: SlaveEvent(Transfer * _item, unsigned int _event, Q_ULLONG _ldata = 0L); - SlaveEvent(Transfer * _item, unsigned int _event, const QString & _msg); + SlaveEvent(Transfer * _item, unsigned int _event, const TQString & _msg); ~SlaveEvent(); unsigned int getEvent() const; Transfer *getItem() const; Q_ULLONG getData() const; - const QString & getMsg() const; + const TQString & getMsg() const; private: unsigned int m_event; Transfer *m_item; Q_ULLONG m_ldata; - QString m_msg; + TQString m_msg; }; diff --git a/kget/transfer.cpp b/kget/transfer.cpp index 44e76fae..7569e52b 100644 --- a/kget/transfer.cpp +++ b/kget/transfer.cpp @@ -23,7 +23,7 @@ * ***************************************************************************/ -#include +#include #include #include @@ -54,7 +54,7 @@ extern Settings ksettings; Transfer::Transfer(TransferList * _view, const KURL & _src, const KURL & _dest, const uint _id) - : QObject( _view ), + : TQObject( _view ), KListViewItem(_view), dlgIndividual( 0 ) { @@ -71,8 +71,8 @@ Transfer::Transfer(TransferList * _view, const KURL & _src, const KURL & _dest, Transfer::Transfer(TransferList * _view, Transfer * after, const KURL & _src, const KURL & _dest, const uint _id) - : QObject( _view ), - KListViewItem(_view, (QListViewItem *) after), + : TQObject( _view ), + KListViewItem(_view, (TQListViewItem *) after), src(_src), dest(_dest), view(_view), dlgIndividual( 0 ) { @@ -109,7 +109,7 @@ Transfer::init(const uint _id) id = _id; m_pSlave = new Slave(this, src, dest); canResume = false; - startTime = QDateTime::currentDateTime(); + startTime = TQDateTime::currentDateTime(); speed = 0; // retryCount = ksettings.reconnectRetries-1; retryCount = 0; @@ -118,25 +118,25 @@ Transfer::init(const uint _id) status = ST_STOPPED; - connect(this, SIGNAL(statusChanged(Transfer *, int)), kmain, SLOT(slotStatusChanged(Transfer *, int))); - connect(this, SIGNAL(statusChanged(Transfer *, int)), this, SLOT(slotUpdateActions())); + connect(this, TQT_SIGNAL(statusChanged(Transfer *, int)), kmain, TQT_SLOT(slotStatusChanged(Transfer *, int))); + connect(this, TQT_SIGNAL(statusChanged(Transfer *, int)), this, TQT_SLOT(slotUpdateActions())); - connect(this, SIGNAL(log(uint, const QString &, const QString &)), kmain->logwin(), SLOT(logTransfer(uint, const QString &, const QString &))); + connect(this, TQT_SIGNAL(log(uint, const TQString &, const TQString &)), kmain->logwin(), TQT_SLOT(logTransfer(uint, const TQString &, const TQString &))); // setup actions - m_paResume = new KAction(i18n("&Resume"), "tool_resume", 0, this, SLOT(slotResume()), this, "resume"); + m_paResume = new KAction(i18n("&Resume"), "tool_resume", 0, this, TQT_SLOT(slotResume()), this, "resume"); - m_paPause = new KAction(i18n("&Pause"), "tool_pause", 0, this, SLOT(slotRequestPause()), this, "pause"); + m_paPause = new KAction(i18n("&Pause"), "tool_pause", 0, this, TQT_SLOT(slotRequestPause()), this, "pause"); - m_paDelete = new KAction(i18n("&Delete"), "editdelete", 0, this, SLOT(slotRequestRemove()), this, "delete"); + m_paDelete = new KAction(i18n("&Delete"), "editdelete", 0, this, TQT_SLOT(slotRequestRemove()), this, "delete"); - m_paRestart = new KAction(i18n("Re&start"), "tool_restart", 0, this, SLOT(slotRequestRestart()), this, "restart"); + m_paRestart = new KAction(i18n("Re&start"), "tool_restart", 0, this, TQT_SLOT(slotRequestRestart()), this, "restart"); - m_paQueue = new KRadioAction(i18n("&Queue"), "tool_queue", 0, this, SLOT(slotQueue()), this, "queue"); + m_paQueue = new KRadioAction(i18n("&Queue"), "tool_queue", 0, this, TQT_SLOT(slotQueue()), this, "queue"); - m_paTimer = new KRadioAction(i18n("&Timer"), "tool_timer", 0, this, SLOT(slotRequestSchedule()), this, "timer"); + m_paTimer = new KRadioAction(i18n("&Timer"), "tool_timer", 0, this, TQT_SLOT(slotRequestSchedule()), this, "timer"); - m_paDelay = new KRadioAction(i18n("De&lay"), "tool_delay", 0, this, SLOT(slotRequestDelay()), this, "delay"); + m_paDelay = new KRadioAction(i18n("De&lay"), "tool_delay", 0, this, TQT_SLOT(slotRequestDelay()), this, "delay"); m_paQueue->setExclusiveGroup("TransferMode"); m_paTimer->setExclusiveGroup("TransferMode"); @@ -144,7 +144,7 @@ Transfer::init(const uint _id) // Actions - // m_paDock = new KAction(i18n("&Dock"),"tool_dock", 0, this,SLOT(slotRequestDelay()), this, "dockIndividual"); + // m_paDock = new KAction(i18n("&Dock"),"tool_dock", 0, this,TQT_SLOT(slotRequestDelay()), this, "dockIndividual"); // setup individual transfer dialog @@ -307,7 +307,7 @@ bool Transfer::updateStatus(int counter) { //sDebug<< ">>>>Entering"<setUpdatesEnabled(false); @@ -339,14 +339,14 @@ bool Transfer::updateStatus(int counter) if(prevStatus!=status || prevMode != mode || status==ST_RUNNING || status==ST_TRYING) { - QRect rect = view->header()->sectionRect(view->lv_pixmap); + TQRect rect = view->header()->sectionRect(view->lv_pixmap); int x = rect.x(); int y = view->itemRect(this).y(); int w = rect.width(); int h = rect.height(); - view->QScrollView::updateContents(x,y,w,h); + view->TQScrollView::updateContents(x,y,w,h); prevStatus = status; prevMode = mode; @@ -358,8 +358,8 @@ bool Transfer::updateStatus(int counter) void Transfer::UpdateRetry() { - QString retry; - QString MaxRetry; + TQString retry; + TQString MaxRetry; retry.setNum(retryCount); MaxRetry.setNum(ksettings.reconnectRetries); @@ -455,8 +455,8 @@ void Transfer::slotRequestRemove() if (dlgIndividual && !ksettings.b_expertMode) { if (KMessageBox::warningContinueCancel(0, i18n("Are you sure you want to delete this transfer?"), - QString::null, KStdGuiItem::del(), - QString("delete_transfer")) + TQString::null, KStdGuiItem::del(), + TQString("delete_transfer")) != KMessageBox::Continue) return; } @@ -510,8 +510,8 @@ void Transfer::slotRequestSchedule() // if the time was already set somewhere in the future, keep it // otherwise set it to the current time + 60 seconds - if (startTime < QDateTime::currentDateTime()) { - QDateTime dt = QDateTime::currentDateTime(); + if (startTime < TQDateTime::currentDateTime()) { + TQDateTime dt = TQDateTime::currentDateTime(); startTime = dt.addSecs(60); } if (status == ST_RUNNING) { @@ -623,7 +623,7 @@ void Transfer::slotSpeed(unsigned long bytes_per_second) dlgIndividual->setSpeed(i18n("Stopped")); } else { - QString tmps = i18n("%1/s").arg(KIO::convertSize(speed)); + TQString tmps = i18n("%1/s").arg(KIO::convertSize(speed)); setText(view->lv_speed, tmps); setText(view->lv_remaining, remainingTime); if(dlgIndividual) @@ -699,7 +699,7 @@ void Transfer::slotProcessedSize(KIO::filesize_t bytes) dlgIndividual->setProcessedSize(processedSize); if (percent != old) { - QString tmps; + TQString tmps; if (percent == 100) { tmps = i18n("OK as in 'finished'","OK"); } else { @@ -750,13 +750,13 @@ void Transfer::showIndividual() } -void Transfer::logMessage(const QString & message) +void Transfer::logMessage(const TQString & message) { sDebugIn << message << endl; emit log(id, src.fileName(), message); - QString tmps = "" + QTime::currentTime().toString() + " : " + message; + TQString tmps = "" + TQTime::currentTime().toString() + " : " + message; transferLog.append(tmps + '\n'); @@ -773,7 +773,7 @@ bool Transfer::read(KSimpleConfig * config, int id) sDebugIn << endl; - QString str; + TQString str; str.sprintf("Item%d", id); config->setGroup(str); @@ -808,7 +808,7 @@ void Transfer::write(KSimpleConfig * config, int id) { sDebugIn << endl; - QString str; + TQString str; str.sprintf("Item%d", id); config->setGroup(str); @@ -851,7 +851,7 @@ void Transfer::slotExecError() status = ST_STOPPED; mode = MD_SCHEDULED; - startTime=QDateTime::currentDateTime().addSecs(ksettings.reconnectTime * 60); + startTime=TQDateTime::currentDateTime().addSecs(ksettings.reconnectTime * 60); emit statusChanged(this, OP_SCHEDULED); sDebugOut << endl; @@ -961,7 +961,7 @@ void Transfer::slotExecSchedule() } /** No descriptions */ -void Transfer::slotStartTime(const QDateTime & _startTime) +void Transfer::slotStartTime(const TQDateTime & _startTime) { sDebugIn << endl; diff --git a/kget/transfer.h b/kget/transfer.h index 845995d8..0dacd315 100644 --- a/kget/transfer.h +++ b/kget/transfer.h @@ -29,9 +29,9 @@ #define _Transfer_h #include -#include -#include -#include +#include +#include +#include #include #include @@ -50,7 +50,7 @@ class DlgIndividual; class TransferList; -class Transfer:public QObject, public KListViewItem +class Transfer:public TQObject, public KListViewItem { Q_OBJECT public: @@ -73,12 +73,12 @@ public: bool read(KSimpleConfig * config, int id); void write(KSimpleConfig * config, int id); - void logMessage(const QString & message); + void logMessage(const TQString & message); bool keepDialogOpen() const; - QDateTime getStartTime()const + TQDateTime getStartTime()const { return startTime; } @@ -130,7 +130,7 @@ public: { status = _status; }; - void setStartTime(QDateTime _startTime) + void setStartTime(TQDateTime _startTime) { startTime = _startTime; }; @@ -185,12 +185,12 @@ public slots: void slotTotalSize(KIO::filesize_t bytes); void slotProcessedSize(KIO::filesize_t); - void slotStartTime(const QDateTime &); + void slotStartTime(const TQDateTime &); void slotStop(); // stop all transfers when going offline signals: void statusChanged(Transfer *, int _operation); - void log(uint, const QString &, const QString &); + void log(uint, const TQString &, const TQString &); private: void init(const uint _id); @@ -206,10 +206,10 @@ private: static uint idcount; // log - QString transferLog; + TQString transferLog; // schedule time - QDateTime startTime; + TQDateTime startTime; KIO::filesize_t totalSize; KIO::filesize_t processedSize; @@ -217,7 +217,7 @@ private: int speed; unsigned int remainingTimeSec; - QString remainingTime; + TQString remainingTime; TransferStatus status; TransferMode mode; @@ -233,7 +233,7 @@ private: TransferList *view; // individual download window - QGuardedPtr dlgIndividual; + TQGuardedPtr dlgIndividual; }; diff --git a/kget/transferlist.cpp b/kget/transferlist.cpp index 1d9ed902..bf54cb87 100644 --- a/kget/transferlist.cpp +++ b/kget/transferlist.cpp @@ -52,11 +52,11 @@ static int defaultColumnWidth[] = { }; -TransferList::TransferList(QWidget * parent, const char *name) +TransferList::TransferList(TQWidget * parent, const char *name) : KListView(parent, name) { // enable selection of more than one item - setSelectionMode( QListView::Extended ); + setSelectionMode( TQListView::Extended ); // // disable sorting and clicking on headers // setSorting( -1 ); @@ -86,20 +86,20 @@ TransferList::TransferList(QWidget * parent, const char *name) else restoreLayout( KGlobal::config(), "ListView" ); - QString connectPath = "pics/connect%2.png"; - QString tryPath = "pics/try%2.png"; + TQString connectPath = "pics/connect%2.png"; + TQString tryPath = "pics/try%2.png"; // Load animations - QPixmap* curPix; + TQPixmap* curPix; if (animConn.count() == 0) { animConn.setAutoDelete(true); animTry.setAutoDelete(true); for (int i = 0; i < 8; i++) { - curPix = new QPixmap(); + curPix = new TQPixmap(); curPix->load(locate("appdata", connectPath.arg(i))); animConn.append(curPix); - curPix = new QPixmap(); + curPix = new TQPixmap(); curPix->load(locate("appdata", tryPath.arg(i))); animTry.append(curPix); } @@ -113,8 +113,8 @@ TransferList::TransferList(QWidget * parent, const char *name) phasesNum = animConn.count(); - connect(this, SIGNAL(doubleClicked(QListViewItem *)), SLOT(slotTransferSelected(QListViewItem *))); - connect(this, SIGNAL(rightButtonPressed(QListViewItem *, const QPoint &, int)), SLOT(slotPopupMenu(QListViewItem *))); + connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *)), TQT_SLOT(slotTransferSelected(TQListViewItem *))); + connect(this, TQT_SIGNAL(rightButtonPressed(TQListViewItem *, const TQPoint &, int)), TQT_SLOT(slotPopupMenu(TQListViewItem *))); } @@ -137,13 +137,13 @@ Transfer *TransferList::addTransfer(const KURL & _source, const KURL & _dest, } -void TransferList::slotTransferSelected(QListViewItem * item) +void TransferList::slotTransferSelected(TQListViewItem * item) { emit transferSelected((Transfer *) item); } -void TransferList::slotPopupMenu(QListViewItem * item) +void TransferList::slotPopupMenu(TQListViewItem * item) { if (!item) return; @@ -151,7 +151,7 @@ void TransferList::slotPopupMenu(QListViewItem * item) } -void TransferList::setSelected(QListViewItem * item, bool selected) +void TransferList::setSelected(TQListViewItem * item, bool selected) { bool tmpb = selected; @@ -159,7 +159,7 @@ void TransferList::setSelected(QListViewItem * item, bool selected) tmpb = false; } - QListView::setSelected(item, tmpb); + TQListView::setSelected(item, tmpb); } @@ -227,9 +227,9 @@ Transfer * TransferList::find(const KURL& _src) void TransferList::readTransfers(const KURL& file) { - QString tmpFile; + TQString tmpFile; - if (KIO::NetAccess::download(file, tmpFile, (QWidget*)parent())) { + if (KIO::NetAccess::download(file, tmpFile, (TQWidget*)parent())) { KSimpleConfig config(tmpFile); config.setGroup("Common"); @@ -240,7 +240,7 @@ void TransferList::readTransfers(const KURL& file) for ( int i = 0; i < num; i++ ) { - QString str; + TQString str; str.sprintf("Item%d", i); config.setGroup(str); @@ -261,7 +261,7 @@ void TransferList::readTransfers(const KURL& file) } } -void TransferList::writeTransfers(const QString& file) +void TransferList::writeTransfers(const TQString& file) { sDebug << ">>>>Entering with file =" << file << endl; diff --git a/kget/transferlist.h b/kget/transferlist.h index 0d5929d0..89f50e6a 100644 --- a/kget/transferlist.h +++ b/kget/transferlist.h @@ -28,7 +28,7 @@ #define _TransferList_h #include -#include +#include #include @@ -39,12 +39,12 @@ class TransferIterator:public QListViewItemIterator public: - TransferIterator(QListView * view):QListViewItemIterator(view) + TransferIterator(TQListView * view):TQListViewItemIterator(view) { } Transfer *current() const { - return (Transfer *) QListViewItemIterator::current(); + return (Transfer *) TQListViewItemIterator::current(); } void reset() { @@ -59,13 +59,13 @@ class TransferList:public KListView Q_OBJECT public: - TransferList(QWidget * parent = 0, const char *name = 0); + TransferList(TQWidget * parent = 0, const char *name = 0); virtual ~ TransferList(); Transfer *addTransfer(const KURL & _source, const KURL & _dest, bool canShow = true ); - virtual void setSelected(QListViewItem * item, bool selected); + virtual void setSelected(TQListViewItem * item, bool selected); void moveToBegin(Transfer * item); void moveToEnd(Transfer * item); @@ -79,7 +79,7 @@ Q_OBJECT public: bool areTransfersQueuedOrScheduled(); void readTransfers(const KURL& file); - void writeTransfers(const QString& file); + void writeTransfers(const TQString& file); friend class Transfer; @@ -88,8 +88,8 @@ signals: void popupMenu(Transfer * item); protected slots: - void slotTransferSelected(QListViewItem * item); - void slotPopupMenu(QListViewItem * item); + void slotTransferSelected(TQListViewItem * item); + void slotPopupMenu(TQListViewItem * item); protected: @@ -100,13 +100,13 @@ protected: int lv_pixmap, lv_filename, lv_resume, lv_count, lv_progress; int lv_total, lv_speed, lv_remaining, lv_url; - QPtrList < QPixmap > animConn; - QPtrList < QPixmap > animTry; - QPixmap pixQueued; - QPixmap pixScheduled; - QPixmap pixDelayed; - QPixmap pixFinished; - QPixmap pixRetrying; + TQPtrList < TQPixmap > animConn; + TQPtrList < TQPixmap > animTry; + TQPixmap pixQueued; + TQPixmap pixScheduled; + TQPixmap pixDelayed; + TQPixmap pixFinished; + TQPixmap pixRetrying; uint phasesNum; uint jobid; diff --git a/knewsticker/common/configaccess.cpp b/knewsticker/common/configaccess.cpp index 942b3f70..68b37f57 100644 --- a/knewsticker/common/configaccess.cpp +++ b/knewsticker/common/configaccess.cpp @@ -11,7 +11,7 @@ #include "configaccess.h" #include "newsengine.h" -#include +#include #include #include @@ -20,347 +20,347 @@ static NewsSourceBase::Data NewsSourceDefault[DEFAULT_NEWSSOURCES] = { // Arts --------------- NewsSourceBase::Data( - QString::fromLatin1("Bureau 42"), - QString::fromLatin1("http://www.bureau42.com/rdf/"), - QString::fromLatin1("http://www.bureau42.com/favicon.ico"), + TQString::fromLatin1("Bureau 42"), + TQString::fromLatin1("http://www.bureau42.com/rdf/"), + TQString::fromLatin1("http://www.bureau42.com/favicon.ico"), NewsSourceBase::Arts, 5, false, false), NewsSourceBase::Data( - QString::fromLatin1("eFilmCritic"), - QString::fromLatin1("http://efilmcritic.com/fo.rdf"), - QString::fromLatin1("http://efilmcritic.com/favicon.ico"), + TQString::fromLatin1("eFilmCritic"), + TQString::fromLatin1("http://efilmcritic.com/fo.rdf"), + TQString::fromLatin1("http://efilmcritic.com/favicon.ico"), NewsSourceBase::Arts, 3, false, false), NewsSourceBase::Data( - QString::fromLatin1("superhits.ch"), - QString::fromLatin1("http://www.superhits.ch/cgi-bin/superhits.cgi?page=rdf"), - QString::fromLatin1("http://www.superhits.ch/favicon.ico"), - NewsSourceBase::Arts, 10, false, false, QString::fromLatin1("de")), + TQString::fromLatin1("superhits.ch"), + TQString::fromLatin1("http://www.superhits.ch/cgi-bin/superhits.cgi?page=rdf"), + TQString::fromLatin1("http://www.superhits.ch/favicon.ico"), + NewsSourceBase::Arts, 10, false, false, TQString::fromLatin1("de")), // Business ----------- NewsSourceBase::Data( - QString::fromLatin1("Internet.com Business"), - QString::fromLatin1("http://headlines.internet.com/internetnews/bus-news/news.rss"), - QString::null, + TQString::fromLatin1("Internet.com Business"), + TQString::fromLatin1("http://headlines.internet.com/internetnews/bus-news/news.rss"), + TQString::null, NewsSourceBase::Business, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("TradeSims"), - QString::fromLatin1("http://www.tradesims.com/AEX.rdf"), - QString::null, + TQString::fromLatin1("TradeSims"), + TQString::fromLatin1("http://www.tradesims.com/AEX.rdf"), + TQString::null, NewsSourceBase::Business, 10, false, false), // Computers ---------- NewsSourceBase::Data( - QString::fromLatin1( "linuxartist.org" ), - QString::fromLatin1( "http://www.linuxartist.org/backend.php"), - QString::fromLatin1( "http://www.linuxartist.org/favicon.ico"), + TQString::fromLatin1( "linuxartist.org" ), + TQString::fromLatin1( "http://www.linuxartist.org/backend.php"), + TQString::fromLatin1( "http://www.linuxartist.org/favicon.ico"), NewsSourceBase::Computers, 10, false, false ), NewsSourceBase::Data( - QString::fromLatin1("KDE Deutschland"), - QString::fromLatin1("http://www.kde.de/nachrichten/nachrichten.rdf"), - QString::fromLatin1("http://www.kde.de/favicon.ico"), - NewsSourceBase::Computers, 10, true, false, QString::fromLatin1("de")), + TQString::fromLatin1("KDE Deutschland"), + TQString::fromLatin1("http://www.kde.de/nachrichten/nachrichten.rdf"), + TQString::fromLatin1("http://www.kde.de/favicon.ico"), + NewsSourceBase::Computers, 10, true, false, TQString::fromLatin1("de")), NewsSourceBase::Data( - QString::fromLatin1("KDE France"), - QString::fromLatin1("http://www.kde-france.org/backend-breves.php3"), - QString::null, - NewsSourceBase::Computers, 10, true, false, QString::fromLatin1("fr")), + TQString::fromLatin1("KDE France"), + TQString::fromLatin1("http://www.kde-france.org/backend-breves.php3"), + TQString::null, + NewsSourceBase::Computers, 10, true, false, TQString::fromLatin1("fr")), NewsSourceBase::Data( - QString::fromLatin1("FreeBSD Project News"), - QString::fromLatin1("http://www.freebsd.org/news/news.rdf"), - QString::fromLatin1("http://www.freebsd.org/favicon.ico"), + TQString::fromLatin1("FreeBSD Project News"), + TQString::fromLatin1("http://www.freebsd.org/news/news.rdf"), + TQString::fromLatin1("http://www.freebsd.org/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("dot.kde.org"), - QString::fromLatin1("http://www.kde.org/dotkdeorg.rdf"), - QString::fromLatin1("http://www.kde.org/favicon.ico"), + TQString::fromLatin1("dot.kde.org"), + TQString::fromLatin1("http://www.kde.org/dotkdeorg.rdf"), + TQString::fromLatin1("http://www.kde.org/favicon.ico"), NewsSourceBase::Computers, 10, true, false), NewsSourceBase::Data( - QString::fromLatin1("GNOME News"), - QString::fromLatin1("http://www.gnomedesktop.org/backend.php"), - QString::null, + TQString::fromLatin1("GNOME News"), + TQString::fromLatin1("http://www.gnomedesktop.org/backend.php"), + TQString::null, NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("Slashdot"), - QString::fromLatin1("http://slashdot.org/slashdot.rdf"), - QString::fromLatin1("http://slashdot.org/favicon.ico"), + TQString::fromLatin1("Slashdot"), + TQString::fromLatin1("http://slashdot.org/slashdot.rdf"), + TQString::fromLatin1("http://slashdot.org/favicon.ico"), NewsSourceBase::Computers, 10, true, false), NewsSourceBase::Data( - QString::fromLatin1("Ask Slashdot"), - QString::fromLatin1("http://slashdot.org/askslashdot.rdf"), - QString::fromLatin1("http://slashdot.org/favicon.ico"), + TQString::fromLatin1("Ask Slashdot"), + TQString::fromLatin1("http://slashdot.org/askslashdot.rdf"), + TQString::fromLatin1("http://slashdot.org/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("Slashdot: Features"), - QString::fromLatin1("http://slashdot.org/features.rdf"), - QString::fromLatin1("http://slashdot.org/favicon.ico"), + TQString::fromLatin1("Slashdot: Features"), + TQString::fromLatin1("http://slashdot.org/features.rdf"), + TQString::fromLatin1("http://slashdot.org/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("Slashdot: Apache"), - QString::fromLatin1("http://slashdot.org/apache.rdf"), - QString::fromLatin1("http://slashdot.org/favicon.ico"), + TQString::fromLatin1("Slashdot: Apache"), + TQString::fromLatin1("http://slashdot.org/apache.rdf"), + TQString::fromLatin1("http://slashdot.org/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("Slashdot: Books"), - QString::fromLatin1("http://slashdot.org/books.rdf"), - QString::fromLatin1("http://slashdot.org/favicon.ico"), + TQString::fromLatin1("Slashdot: Books"), + TQString::fromLatin1("http://slashdot.org/books.rdf"), + TQString::fromLatin1("http://slashdot.org/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("Jabber News"), - QString::fromLatin1("http://www.jabber.org/news/rss.xml"), - QString::null, + TQString::fromLatin1("Jabber News"), + TQString::fromLatin1("http://www.jabber.org/news/rss.xml"), + TQString::null, NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("Freshmeat"), - QString::fromLatin1("http://freshmeat.net/backend/fm.rdf"), - QString::fromLatin1("http://freshmeat.net/favicon.ico"), + TQString::fromLatin1("Freshmeat"), + TQString::fromLatin1("http://freshmeat.net/backend/fm.rdf"), + TQString::fromLatin1("http://freshmeat.net/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("Linux Weekly News"), - QString::fromLatin1("http://www.lwn.net/headlines/rss"), - QString::fromLatin1("http://www.lwn.net/favicon.ico"), + TQString::fromLatin1("Linux Weekly News"), + TQString::fromLatin1("http://www.lwn.net/headlines/rss"), + TQString::fromLatin1("http://www.lwn.net/favicon.ico"), NewsSourceBase::Computers, 10, true, false), NewsSourceBase::Data( - QString::fromLatin1("heise online news"), - QString::fromLatin1("http://www.heise.de/newsticker/heise.rdf"), - QString::fromLatin1("http://www.heise.de/favicon.ico"), - NewsSourceBase::Computers, 10, true, false, QString::fromLatin1("de")), + TQString::fromLatin1("heise online news"), + TQString::fromLatin1("http://www.heise.de/newsticker/heise.rdf"), + TQString::fromLatin1("http://www.heise.de/favicon.ico"), + NewsSourceBase::Computers, 10, true, false, TQString::fromLatin1("de")), NewsSourceBase::Data( - QString::fromLatin1("RUS-CERT Ticker"), - QString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert.rdf"), - QString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"), - NewsSourceBase::Computers, 10, true, false, QString::fromLatin1("de")), + TQString::fromLatin1("RUS-CERT Ticker"), + TQString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert.rdf"), + TQString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"), + NewsSourceBase::Computers, 10, true, false, TQString::fromLatin1("de")), NewsSourceBase::Data( - QString::fromLatin1("RUS-CERT Elsewhere"), - QString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert-elsewhere.rdf"), - QString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"), - NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")), + TQString::fromLatin1("RUS-CERT Elsewhere"), + TQString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert-elsewhere.rdf"), + TQString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"), + NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")), NewsSourceBase::Data( - QString::fromLatin1("Kuro5hin"), - QString::fromLatin1("http://kuro5hin.org/backend.rdf"), - QString::fromLatin1("http://kuro5hin.org/favicon.ico"), + TQString::fromLatin1("Kuro5hin"), + TQString::fromLatin1("http://kuro5hin.org/backend.rdf"), + TQString::fromLatin1("http://kuro5hin.org/favicon.ico"), NewsSourceBase::Computers, 10, true, false), NewsSourceBase::Data( - QString::fromLatin1("Prolinux"), - QString::fromLatin1("http://www.pl-forum.de/backend/pro-linux.rdf"), - QString::fromLatin1("http://www.prolinux.de/favicon.ico"), - NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")), + TQString::fromLatin1("Prolinux"), + TQString::fromLatin1("http://www.pl-forum.de/backend/pro-linux.rdf"), + TQString::fromLatin1("http://www.prolinux.de/favicon.ico"), + NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")), NewsSourceBase::Data( - QString::fromLatin1("Linuxde.org"), - QString::fromLatin1("http://www.linuxde.org/backends/news.rdf"), - QString::fromLatin1("http://www.linuxde.org/favicon.ico"), - NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")), + TQString::fromLatin1("Linuxde.org"), + TQString::fromLatin1("http://www.linuxde.org/backends/news.rdf"), + TQString::fromLatin1("http://www.linuxde.org/favicon.ico"), + NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")), NewsSourceBase::Data( - QString::fromLatin1("LinuxSecurity.com"), - QString::fromLatin1("http://www.linuxsecurity.com/linuxsecurity_hybrid.rdf"), - QString::null, + TQString::fromLatin1("LinuxSecurity.com"), + TQString::fromLatin1("http://www.linuxsecurity.com/linuxsecurity_hybrid.rdf"), + TQString::null, NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("Linux Game Tome"), - QString::fromLatin1("http://happypenguin.org/html/news.rdf"), - QString::null, + TQString::fromLatin1("Linux Game Tome"), + TQString::fromLatin1("http://happypenguin.org/html/news.rdf"), + TQString::null, NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("Telefragged"), - QString::fromLatin1("http://www.telefragged.com/cgi-bin/rdf.pl"), - QString::null, + TQString::fromLatin1("Telefragged"), + TQString::fromLatin1("http://www.telefragged.com/cgi-bin/rdf.pl"), + TQString::null, NewsSourceBase::Computers, 10, false, false), /* NewsSourceBase::Data( - QString::fromLatin1("Gimp News"), - QString::fromLatin1("http://www.xach.com/gimp/news/channel.rdf"), - QString::null, + TQString::fromLatin1("Gimp News"), + TQString::fromLatin1("http://www.xach.com/gimp/news/channel.rdf"), + TQString::null, NewsSourceBase::Computers, 10, false, false),*/ NewsSourceBase::Data( - QString::fromLatin1("Mozilla"), - QString::fromLatin1("http://www.mozilla.org/news.rdf"), - QString::fromLatin1("http://www.mozillazine.org/favicon.ico"), + TQString::fromLatin1("Mozilla"), + TQString::fromLatin1("http://www.mozilla.org/news.rdf"), + TQString::fromLatin1("http://www.mozillazine.org/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("MozillaZine"), - QString::fromLatin1("http://www.mozillazine.org/contents.rdf"), - QString::fromLatin1("http://www.mozillazine.org/favicon.ico"), + TQString::fromLatin1("MozillaZine"), + TQString::fromLatin1("http://www.mozillazine.org/contents.rdf"), + TQString::fromLatin1("http://www.mozillazine.org/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("Daemon News"), - QString::fromLatin1("http://daily.daemonnews.org/ddn.rdf.php3"), - QString::null, + TQString::fromLatin1("Daemon News"), + TQString::fromLatin1("http://daily.daemonnews.org/ddn.rdf.php3"), + TQString::null, NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("use Perl;"), - QString::fromLatin1("http://use.perl.org/useperl.rdf"), - QString::null, + TQString::fromLatin1("use Perl;"), + TQString::fromLatin1("http://use.perl.org/useperl.rdf"), + TQString::null, NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("desktopian.org"), - QString::fromLatin1("http://www.desktopian.org/includes/headlines.xml"), - QString::fromLatin1("http://www.desktopian.org/favicon.ico"), + TQString::fromLatin1("desktopian.org"), + TQString::fromLatin1("http://www.desktopian.org/includes/headlines.xml"), + TQString::fromLatin1("http://www.desktopian.org/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("Root prompt"), - QString::fromLatin1("http://www.rootprompt.org/rss/"), - QString::fromLatin1("http://www.rootprompt.org/favicon.ico"), + TQString::fromLatin1("Root prompt"), + TQString::fromLatin1("http://www.rootprompt.org/rss/"), + TQString::fromLatin1("http://www.rootprompt.org/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("SecurityFocus"), - QString::fromLatin1("http://www.securityfocus.com/rss/news.xml"), - QString::fromLatin1("http://www.securityfocus.com/favicon.ico"), + TQString::fromLatin1("SecurityFocus"), + TQString::fromLatin1("http://www.securityfocus.com/rss/news.xml"), + TQString::fromLatin1("http://www.securityfocus.com/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("LinuxNewbie"), - QString::fromLatin1("http://www.linuxnewbie.org/news.cdf"), - QString::fromLatin1("http://www.linuxnewbie.org/favicon.ico"), + TQString::fromLatin1("LinuxNewbie"), + TQString::fromLatin1("http://www.linuxnewbie.org/news.cdf"), + TQString::fromLatin1("http://www.linuxnewbie.org/favicon.ico"), NewsSourceBase::Computers, 5, false, false), NewsSourceBase::Data( - QString::fromLatin1("Arstechnica"), - QString::fromLatin1("http://arstechnica.com/etc/rdf/ars.rdf"), - QString::fromLatin1("http://arstechnica.com/favicon.ico"), + TQString::fromLatin1("Arstechnica"), + TQString::fromLatin1("http://arstechnica.com/etc/rdf/ars.rdf"), + TQString::fromLatin1("http://arstechnica.com/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("amiga-news.de - deutschsprachige Amiga Nachrichten"), - QString::fromLatin1("http://www.amiga-news.de/de/backends/news/index.rss"), - QString::fromLatin1("http://www.amiga-news.de/favicon.ico"), - NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")), + TQString::fromLatin1("amiga-news.de - deutschsprachige Amiga Nachrichten"), + TQString::fromLatin1("http://www.amiga-news.de/de/backends/news/index.rss"), + TQString::fromLatin1("http://www.amiga-news.de/favicon.ico"), + NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")), NewsSourceBase::Data( - QString::fromLatin1("amiga-news.de - english Amiga news"), - QString::fromLatin1("http://www.amiga-news.de/en/backends/news/index.rss"), - QString::fromLatin1("http://www.amiga-news.de/favicon.ico"), + TQString::fromLatin1("amiga-news.de - english Amiga news"), + TQString::fromLatin1("http://www.amiga-news.de/en/backends/news/index.rss"), + TQString::fromLatin1("http://www.amiga-news.de/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("RadioTux)"), - QString::fromLatin1("http://blog.radiotux.de/feed/"), - QString::null, - NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")), + TQString::fromLatin1("RadioTux)"), + TQString::fromLatin1("http://blog.radiotux.de/feed/"), + TQString::null, + NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")), NewsSourceBase::Data( - QString::fromLatin1("kdenews.unixcode.org"), - QString::fromLatin1("http://kdenews.unixcode.org/?node=news&action=rss"), - QString::null, + TQString::fromLatin1("kdenews.unixcode.org"), + TQString::fromLatin1("http://kdenews.unixcode.org/?node=news&action=rss"), + TQString::null, NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("FreshPorts - the place for ports"), - QString::fromLatin1("http://www.freshports.org/news.php"), - QString::fromLatin1("http://www.freshports.org/favicon.ico"), + TQString::fromLatin1("FreshPorts - the place for ports"), + TQString::fromLatin1("http://www.freshports.org/news.php"), + TQString::fromLatin1("http://www.freshports.org/favicon.ico"), NewsSourceBase::Computers, 20, false, false), NewsSourceBase::Data( - QString::fromLatin1("NetPhoenix"), - QString::fromLatin1("http://www.netphoenix.at/rss/netphoenix.php"), - QString::fromLatin1("http://www.netphoenix.at/favicon.ico"), - NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")), + TQString::fromLatin1("NetPhoenix"), + TQString::fromLatin1("http://www.netphoenix.at/rss/netphoenix.php"), + TQString::fromLatin1("http://www.netphoenix.at/favicon.ico"), + NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")), NewsSourceBase::Data( - QString::fromLatin1("ShortNews - by www.netphoenix.at"), - QString::fromLatin1("http://www.netphoenix.at/rss/shortnews.php"), - QString::fromLatin1("http://www.netphoenix.at/favicon.ico"), - NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")), + TQString::fromLatin1("ShortNews - by www.netphoenix.at"), + TQString::fromLatin1("http://www.netphoenix.at/rss/shortnews.php"), + TQString::fromLatin1("http://www.netphoenix.at/favicon.ico"), + NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")), NewsSourceBase::Data( - QString::fromLatin1("zez.org - about code "), - QString::fromLatin1("http://zez.org/article/rssheadlines"), - QString::null, + TQString::fromLatin1("zez.org - about code "), + TQString::fromLatin1("http://zez.org/article/rssheadlines"), + TQString::null, NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("BSDatwork.com"), - QString::fromLatin1("http://BSDatwork.com/backend.php"), - QString::fromLatin1("http://BSDatwork.com/favicon.ico"), + TQString::fromLatin1("BSDatwork.com"), + TQString::fromLatin1("http://BSDatwork.com/backend.php"), + TQString::fromLatin1("http://BSDatwork.com/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("FreshSource - the place for source"), - QString::fromLatin1("http://www.freshsource.org/news.php"), - QString::fromLatin1("http://www.freshsource.org/favicon.ico"), + TQString::fromLatin1("FreshSource - the place for source"), + TQString::fromLatin1("http://www.freshsource.org/news.php"), + TQString::fromLatin1("http://www.freshsource.org/favicon.ico"), NewsSourceBase::Computers, 20, false, false), NewsSourceBase::Data( - QString::fromLatin1("The FreeBSD Diary"), - QString::fromLatin1("http://www.freebsddiary.org/news.php"), - QString::fromLatin1("http://www.freebsddiary.org/favicon.ico"), + TQString::fromLatin1("The FreeBSD Diary"), + TQString::fromLatin1("http://www.freebsddiary.org/news.php"), + TQString::fromLatin1("http://www.freebsddiary.org/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("MaximumBSD"), - QString::fromLatin1("http://www.maximumbsd.com/backend/mb.rdf"), - QString::fromLatin1("http://www.maximumbsd.com/favicon.ico"), + TQString::fromLatin1("MaximumBSD"), + TQString::fromLatin1("http://www.maximumbsd.com/backend/mb.rdf"), + TQString::fromLatin1("http://www.maximumbsd.com/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("BR-Linux.org"), - QString::fromLatin1("http://br-linux.org/noticias/index.rdf"), - QString::fromLatin1("http://br-linux.org/noticias/favicon.ico"), + TQString::fromLatin1("BR-Linux.org"), + TQString::fromLatin1("http://br-linux.org/noticias/index.rdf"), + TQString::fromLatin1("http://br-linux.org/noticias/favicon.ico"), NewsSourceBase::Computers, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("OSNews.com"), - QString::fromLatin1("http://www.osnews.com/files/recent.rdf"), - QString::fromLatin1("http://www.osnews.com/favicon.ico"), + TQString::fromLatin1("OSNews.com"), + TQString::fromLatin1("http://www.osnews.com/files/recent.rdf"), + TQString::fromLatin1("http://www.osnews.com/favicon.ico"), NewsSourceBase::Computers, 10, false, false), // Miscellaneous ------ NewsSourceBase::Data( - QString::fromLatin1("tagesschau.de"), - QString::fromLatin1("http://www.tagesschau.de/newsticker.rdf"), - QString::fromLatin1("http://www.tagesschau.de/favicon.ico"), - NewsSourceBase::Misc, 10, true, false, QString::fromLatin1("de")), + TQString::fromLatin1("tagesschau.de"), + TQString::fromLatin1("http://www.tagesschau.de/newsticker.rdf"), + TQString::fromLatin1("http://www.tagesschau.de/favicon.ico"), + NewsSourceBase::Misc, 10, true, false, TQString::fromLatin1("de")), NewsSourceBase::Data( - QString::fromLatin1("N24.de"), - QString::fromLatin1("http://www.n24.de/rss/?rubrik=home"), - QString::fromLatin1("http://www.n24.de/favicon.ico"), - NewsSourceBase::Misc, 10, true, false, QString::fromLatin1("de")), + TQString::fromLatin1("N24.de"), + TQString::fromLatin1("http://www.n24.de/rss/?rubrik=home"), + TQString::fromLatin1("http://www.n24.de/favicon.ico"), + NewsSourceBase::Misc, 10, true, false, TQString::fromLatin1("de")), /* NewsSourceBase::Data( - QString::fromLatin1("CNN"), - QString::fromLatin1("http://www.cnn.com/cnn.rss"), - QString::fromLatin1("http://www.cnn.com/favicon.ico"), + TQString::fromLatin1("CNN"), + TQString::fromLatin1("http://www.cnn.com/cnn.rss"), + TQString::fromLatin1("http://www.cnn.com/favicon.ico"), NewsSourceBase::Misc, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("CNN Europe"), - QString::fromLatin1("http://europe.cnn.com/cnn.rss"), - QString::fromLatin1("http://europe.cnn.com/favicon.ico"), + TQString::fromLatin1("CNN Europe"), + TQString::fromLatin1("http://europe.cnn.com/cnn.rss"), + TQString::fromLatin1("http://europe.cnn.com/favicon.ico"), NewsSourceBase::Misc, 10, false, false), */ NewsSourceBase::Data( - QString::fromLatin1("HotWired"), - QString::fromLatin1("http://www.hotwired.com/webmonkey/meta/headlines.rdf"), - QString::fromLatin1("http://www.hotwired.com/favicon.ico"), + TQString::fromLatin1("HotWired"), + TQString::fromLatin1("http://www.hotwired.com/webmonkey/meta/headlines.rdf"), + TQString::fromLatin1("http://www.hotwired.com/favicon.ico"), NewsSourceBase::Misc, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1("The Register"), - QString::fromLatin1("http://www.theregister.co.uk/tonys/slashdot.rdf"), - QString::fromLatin1("http://www.theregister.co.uk/favicon.ico"), + TQString::fromLatin1("The Register"), + TQString::fromLatin1("http://www.theregister.co.uk/tonys/slashdot.rdf"), + TQString::fromLatin1("http://www.theregister.co.uk/favicon.ico"), NewsSourceBase::Misc, 10, false, false), NewsSourceBase::Data( - QString::fromLatin1( "Christian Science Monitor" ), - QString::fromLatin1( "http://www.csmonitor.com/rss/csm.rss"), - QString::fromLatin1( "http://www.csmonitor.com/favicon.ico"), + TQString::fromLatin1( "Christian Science Monitor" ), + TQString::fromLatin1( "http://www.csmonitor.com/rss/csm.rss"), + TQString::fromLatin1( "http://www.csmonitor.com/favicon.ico"), NewsSourceBase::Misc, 10, false, false ), // Magazines ------ NewsSourceBase::Data( - QString::fromLatin1("Revista do Linux"), - QString::fromLatin1("http://www.revistadolinux.com.br/noticias/arquivo/noticias.rdf"), - QString::fromLatin1("http://www.revistadolinux.com.br/favicon.ico"), - NewsSourceBase::Magazines, 10, false, false /*, QString::fromLatin1("br")*/ ), + TQString::fromLatin1("Revista do Linux"), + TQString::fromLatin1("http://www.revistadolinux.com.br/noticias/arquivo/noticias.rdf"), + TQString::fromLatin1("http://www.revistadolinux.com.br/favicon.ico"), + NewsSourceBase::Magazines, 10, false, false /*, TQString::fromLatin1("br")*/ ), NewsSourceBase::Data( - QString::fromLatin1("Spiegel.de"), - QString::fromLatin1("http://www.spiegel.de/schlagzeilen/rss/0,5291,,00.xml"), - QString::fromLatin1("http://www.spiegel.de/favicon.ico"), - NewsSourceBase::Magazines, 10, true, false, QString::fromLatin1("de")), + TQString::fromLatin1("Spiegel.de"), + TQString::fromLatin1("http://www.spiegel.de/schlagzeilen/rss/0,5291,,00.xml"), + TQString::fromLatin1("http://www.spiegel.de/favicon.ico"), + NewsSourceBase::Magazines, 10, true, false, TQString::fromLatin1("de")), NewsSourceBase::Data( - QString::fromLatin1("FAZ.de"), - QString::fromLatin1("http://www.faz.net/s/Rub/Tpl~Epartner~SRss_.xml"), - QString::fromLatin1("http://www.faz.net/favicon.ico"), - NewsSourceBase::Magazines, 10, true, false, QString::fromLatin1("de")), + TQString::fromLatin1("FAZ.de"), + TQString::fromLatin1("http://www.faz.net/s/Rub/Tpl~Epartner~SRss_.xml"), + TQString::fromLatin1("http://www.faz.net/favicon.ico"), + NewsSourceBase::Magazines, 10, true, false, TQString::fromLatin1("de")), // Recreation NewsSourceBase::Data( - QString::fromLatin1("Segfault"), - QString::fromLatin1("http://segfault.org/stories.xml"), - QString::fromLatin1("http://segfault.org/favicon.ico"), + TQString::fromLatin1("Segfault"), + TQString::fromLatin1("http://segfault.org/stories.xml"), + TQString::fromLatin1("http://segfault.org/favicon.ico"), NewsSourceBase::Recreation, 10, false, false), // Society NewsSourceBase::Data( - QString::fromLatin1("nippon.it"), - QString::fromLatin1("http://www.nippon.it/backend.it.php"), - QString::fromLatin1("http://www.nippon.it/favicon.ico"), - NewsSourceBase::Society, 10, false, false, QString::fromLatin1("it")), + TQString::fromLatin1("nippon.it"), + TQString::fromLatin1("http://www.nippon.it/backend.it.php"), + TQString::fromLatin1("http://www.nippon.it/favicon.ico"), + NewsSourceBase::Society, 10, false, false, TQString::fromLatin1("it")), NewsSourceBase::Data( - QString::fromLatin1( "gflash" ), - QString::fromLatin1( "http://www.gflash.de/backend.php"), - QString::fromLatin1( "http://www.gflash.de/favicon.ico"), - NewsSourceBase::Society, 10, false, false, QString::fromLatin1( "de" ) ), + TQString::fromLatin1( "gflash" ), + TQString::fromLatin1( "http://www.gflash.de/backend.php"), + TQString::fromLatin1( "http://www.gflash.de/favicon.ico"), + NewsSourceBase::Society, 10, false, false, TQString::fromLatin1( "de" ) ), NewsSourceBase::Data( - QString::fromLatin1( "Quintessenz" ), - QString::fromLatin1( "http://quintessenz.at/cgi-bin/rdf"), - QString::fromLatin1( "http://quintessenz.at/favicon.ico"), - NewsSourceBase::Society, 9, false, false, QString::fromLatin1( "de" ) ) + TQString::fromLatin1( "Quintessenz" ), + TQString::fromLatin1( "http://quintessenz.at/cgi-bin/rdf"), + TQString::fromLatin1( "http://quintessenz.at/favicon.ico"), + NewsSourceBase::Society, 9, false, false, TQString::fromLatin1( "de" ) ) }; -ArticleFilter::ArticleFilter(const QString &action, const QString &newsSource, - const QString &condition, const QString &expression, bool enabled) +ArticleFilter::ArticleFilter(const TQString &action, const TQString &newsSource, + const TQString &condition, const TQString &expression, bool enabled) : m_action(action), m_newsSource(newsSource), m_condition(condition), @@ -387,7 +387,7 @@ bool ArticleFilter::matches(Article::Ptr a) const else if (condition() == i18n("do not equal")) matches = (a->headline() != expression()); else { // condition() == i18n("match") - QRegExp regexp = QRegExp(expression()); + TQRegExp regexp = TQRegExp(expression()); matches = regexp.exactMatch(a->headline()); } @@ -398,7 +398,7 @@ bool ArticleFilter::matches(Article::Ptr a) const } ConfigAccess::ConfigAccess() - : m_defaultCfg(new KConfig(QString::null, true, false)) + : m_defaultCfg(new KConfig(TQString::null, true, false)) { m_cfg = m_defaultCfg; } @@ -436,13 +436,13 @@ void ConfigAccess::setMouseWheelSpeed(const unsigned int mouseWheelSpeed) m_cfg->sync(); } -QFont ConfigAccess::font() const +TQFont ConfigAccess::font() const { - QFont font = KGlobalSettings::fixedFont(); + TQFont font = KGlobalSettings::fixedFont(); return m_cfg->readFontEntry("Font", &font); } -void ConfigAccess::setFont(const QFont &font) +void ConfigAccess::setFont(const TQFont &font) { m_cfg->writeEntry("Font", font); m_cfg->sync(); @@ -481,9 +481,9 @@ void ConfigAccess::setOfflineMode(bool offlineMode) m_cfg->sync(); } -QStringList ConfigAccess::newsSources() const +TQStringList ConfigAccess::newsSources() const { - QStringList tempList = m_cfg->readListEntry("News sources"); + TQStringList tempList = m_cfg->readListEntry("News sources"); if (tempList.isEmpty()) for (unsigned int i = 0; i < DEFAULT_NEWSSOURCES; i++) tempList << NewsSourceDefault[i].name; @@ -495,7 +495,7 @@ ArticleFilter::List ConfigAccess::filters() const return m_cfg->readIntListEntry("Filters"); } -void ConfigAccess::setNewsSources(const QStringList &newsSources) +void ConfigAccess::setNewsSources(const TQStringList &newsSources) { m_cfg->writeEntry("News sources", newsSources); m_cfg->sync(); @@ -529,34 +529,34 @@ void ConfigAccess::setScrollingDirection(const unsigned int scrollingDirection) m_cfg->sync(); } -QColor ConfigAccess::foregroundColor() const +TQColor ConfigAccess::foregroundColor() const { return m_cfg->readColorEntry("Foreground color", &Qt::black); } -void ConfigAccess::setForegroundColor(const QColor &foregroundColor) +void ConfigAccess::setForegroundColor(const TQColor &foregroundColor) { m_cfg->writeEntry("Foreground color", foregroundColor); m_cfg->sync(); } -QColor ConfigAccess::backgroundColor() const +TQColor ConfigAccess::backgroundColor() const { return m_cfg->readColorEntry("Background color", &Qt::white); } -void ConfigAccess::setBackgroundColor(const QColor &backgroundColor) +void ConfigAccess::setBackgroundColor(const TQColor &backgroundColor) { m_cfg->writeEntry("Background color", backgroundColor); m_cfg->sync(); } -QColor ConfigAccess::highlightedColor() const +TQColor ConfigAccess::highlightedColor() const { return m_cfg->readColorEntry("Highlighted color", &Qt::red); } -void ConfigAccess::setHighlightedColor(const QColor &highlightedColor) +void ConfigAccess::setHighlightedColor(const TQColor &highlightedColor) { m_cfg->writeEntry("Highlighted color", highlightedColor); m_cfg->sync(); @@ -573,7 +573,7 @@ void ConfigAccess::setUnderlineHighlighted(bool underlineHighlighted) m_cfg->sync(); } -NewsSourceBase *ConfigAccess::newsSource(const QString &newsSource) +NewsSourceBase *ConfigAccess::newsSource(const TQString &newsSource) { NewsSourceBase::Data nsd; @@ -587,13 +587,13 @@ NewsSourceBase *ConfigAccess::newsSource(const QString &newsSource) nsd.icon = m_cfg->readEntry("Icon"); nsd.maxArticles = m_cfg->readNumEntry("Max articles", 10); nsd.enabled = m_cfg->readBoolEntry("Enabled", true); - nsd.language = m_cfg->readEntry("Language", QString::fromLatin1("C")); + nsd.language = m_cfg->readEntry("Language", TQString::fromLatin1("C")); m_cfg->setGroup("KNewsTicker"); } else for (unsigned int i = 0; i < DEFAULT_NEWSSOURCES; i++) if (NewsSourceDefault[i].name == newsSource) { nsd = NewsSourceDefault[i]; if (nsd.enabled) - nsd.enabled = (nsd.language == QString::fromLatin1("C") || + nsd.enabled = (nsd.language == TQString::fromLatin1("C") || KGlobal::locale()->languageList().contains(nsd.language)); break; } @@ -611,8 +611,8 @@ ArticleFilter ConfigAccess::filter(const unsigned int filterNo) const ArticleFilter f; f.setId(filterNo); - if (m_cfg->hasGroup(QString::fromLatin1("Filter #%1").arg(filterNo))) { - m_cfg->setGroup(QString::fromLatin1("Filter #%1").arg(filterNo)); + if (m_cfg->hasGroup(TQString::fromLatin1("Filter #%1").arg(filterNo))) { + m_cfg->setGroup(TQString::fromLatin1("Filter #%1").arg(filterNo)); f.setAction(m_cfg->readEntry("Action", i18n("Show"))); f.setNewsSource(m_cfg->readEntry("News source", i18n("all news sources"))); f.setCondition(m_cfg->readEntry("Condition", i18n("contain"))); @@ -640,7 +640,7 @@ void ConfigAccess::setNewsSource(const NewsSourceBase::Data &ns) void ConfigAccess::setFilter(const ArticleFilter &f) { - m_cfg->setGroup(QString::fromLatin1("Filter #%1").arg(f.id())); + m_cfg->setGroup(TQString::fromLatin1("Filter #%1").arg(f.id())); m_cfg->writeEntry("Action", f.action()); m_cfg->writeEntry("News source", f.newsSource()); m_cfg->writeEntry("Condition", f.condition()); diff --git a/knewsticker/common/configaccess.h b/knewsticker/common/configaccess.h index 3cdf80e5..8d2c8a50 100644 --- a/knewsticker/common/configaccess.h +++ b/knewsticker/common/configaccess.h @@ -18,8 +18,8 @@ #include #include -#include -#include +#include +#include #define DEFAULT_NEWSSOURCES 63 #define DEFAULT_SUBJECTS 13 @@ -30,25 +30,25 @@ class KURL; class ArticleFilter { public: - typedef QValueList List; + typedef TQValueList List; - ArticleFilter(const QString & = I18N_NOOP(QString::fromLatin1("Show")), - const QString & = I18N_NOOP(QString::fromLatin1("all newssources")), - const QString & = I18N_NOOP(QString::fromLatin1("contain")), - const QString & = QString::null, + ArticleFilter(const TQString & = I18N_NOOP(TQString::fromLatin1("Show")), + const TQString & = I18N_NOOP(TQString::fromLatin1("all newssources")), + const TQString & = I18N_NOOP(TQString::fromLatin1("contain")), + const TQString & = TQString::null, bool = true); - QString action() const { return m_action; } - void setAction(const QString &action) { m_action = action; } + TQString action() const { return m_action; } + void setAction(const TQString &action) { m_action = action; } - QString newsSource() const { return m_newsSource; } - void setNewsSource(const QString &newsSource) { m_newsSource = newsSource; } + TQString newsSource() const { return m_newsSource; } + void setNewsSource(const TQString &newsSource) { m_newsSource = newsSource; } - QString condition() const { return m_condition; } - void setCondition(const QString &condition) { m_condition = condition; } + TQString condition() const { return m_condition; } + void setCondition(const TQString &condition) { m_condition = condition; } - QString expression() const { return m_expression; } - void setExpression(const QString &expression) { m_expression = expression; } + TQString expression() const { return m_expression; } + void setExpression(const TQString &expression) { m_expression = expression; } bool enabled() const { return m_enabled; } void setEnabled(bool enabled) { m_enabled = enabled; } @@ -59,10 +59,10 @@ class ArticleFilter { bool matches(Article::Ptr) const; private: - QString m_action; - QString m_newsSource; - QString m_condition; - QString m_expression; + TQString m_action; + TQString m_newsSource; + TQString m_condition; + TQString m_expression; bool m_enabled; unsigned int m_id; }; @@ -84,12 +84,12 @@ class ConfigAccess : public ConfigIface virtual bool underlineHighlighted() const; virtual bool showIcons() const; virtual bool slowedScrolling() const; - virtual QColor foregroundColor() const; - virtual QColor backgroundColor() const; - virtual QColor highlightedColor() const; - QFont font() const; - virtual QStringList newsSources() const; - NewsSourceBase *newsSource(const QString &); + virtual TQColor foregroundColor() const; + virtual TQColor backgroundColor() const; + virtual TQColor highlightedColor() const; + TQFont font() const; + virtual TQStringList newsSources() const; + NewsSourceBase *newsSource(const TQString &); ArticleFilter::List filters() const; ArticleFilter filter(const unsigned int) const; @@ -117,11 +117,11 @@ class ConfigAccess : public ConfigIface virtual void setUnderlineHighlighted(bool); virtual void setShowIcons(bool); virtual void setSlowedScrolling(bool); - virtual void setForegroundColor(const QColor &); - virtual void setBackgroundColor(const QColor &); - virtual void setHighlightedColor(const QColor &); - void setFont(const QFont &); - virtual void setNewsSources(const QStringList &); + virtual void setForegroundColor(const TQColor &); + virtual void setBackgroundColor(const TQColor &); + virtual void setHighlightedColor(const TQColor &); + void setFont(const TQFont &); + virtual void setNewsSources(const TQStringList &); void setNewsSource(const NewsSourceBase::Data &); void setFilters(const ArticleFilter::List &); void setFilter(const ArticleFilter &); diff --git a/knewsticker/common/configiface.h b/knewsticker/common/configiface.h index 64bc312d..e5f425c9 100644 --- a/knewsticker/common/configiface.h +++ b/knewsticker/common/configiface.h @@ -32,10 +32,10 @@ class ConfigIface virtual bool underlineHighlighted() const = 0; virtual bool showIcons() const = 0; virtual bool slowedScrolling() const = 0; - virtual QColor foregroundColor() const = 0; - virtual QColor backgroundColor() const = 0; - virtual QColor highlightedColor() const = 0; - virtual QStringList newsSources() const = 0; + virtual TQColor foregroundColor() const = 0; + virtual TQColor backgroundColor() const = 0; + virtual TQColor highlightedColor() const = 0; + virtual TQStringList newsSources() const = 0; virtual void setInterval(const unsigned int) = 0; virtual void setScrollingSpeed(const unsigned int) = 0; @@ -47,10 +47,10 @@ class ConfigIface virtual void setUnderlineHighlighted(bool) = 0; virtual void setShowIcons(bool) = 0; virtual void setSlowedScrolling(bool) = 0; - virtual void setForegroundColor(const QColor &) = 0; - virtual void setBackgroundColor(const QColor &) = 0; - virtual void setHighlightedColor(const QColor &) = 0; - virtual void setNewsSources(const QStringList &) = 0; + virtual void setForegroundColor(const TQColor &) = 0; + virtual void setBackgroundColor(const TQColor &) = 0; + virtual void setHighlightedColor(const TQColor &) = 0; + virtual void setNewsSources(const TQStringList &) = 0; }; #endif // CONFIGIFACE_H diff --git a/knewsticker/common/newsengine.cpp b/knewsticker/common/newsengine.cpp index cce7895c..a283a68b 100644 --- a/knewsticker/common/newsengine.cpp +++ b/knewsticker/common/newsengine.cpp @@ -21,9 +21,9 @@ #include #include -#include +#include -Article::Article(NewsSourceBase *parent, const QString &headline, +Article::Article(NewsSourceBase *parent, const TQString &headline, const KURL &address) : XMLNewsArticle(headline, address), m_parent(parent), @@ -45,22 +45,22 @@ void Article::open() NewsSourceBase::NewsSourceBase(const Data &nsd, ConfigIface *config) : XMLNewsSource(), m_data(nsd), - m_icon(QPixmap()), + m_icon(TQPixmap()), m_cfg(dynamic_cast(config)), m_newsIconMgr(NewsIconMgr::self()) { - connect(this, SIGNAL(loadComplete(XMLNewsSource *, bool)), - SLOT(slotProcessArticles(XMLNewsSource *, bool))); + connect(this, TQT_SIGNAL(loadComplete(XMLNewsSource *, bool)), + TQT_SLOT(slotProcessArticles(XMLNewsSource *, bool))); } void NewsSourceBase::getIcon() { - connect(m_newsIconMgr, SIGNAL(gotIcon(const KURL &, const QPixmap &)), - this, SLOT(slotGotIcon(const KURL &, const QPixmap &))); + connect(m_newsIconMgr, TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)), + this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &))); m_newsIconMgr->getIcon( KURL( m_data.icon ) ); } -QString NewsSourceBase::newsSourceName() const +TQString NewsSourceBase::newsSourceName() const { if (m_cfg->customNames() || m_name.isEmpty()) return m_data.name; @@ -68,7 +68,7 @@ QString NewsSourceBase::newsSourceName() const return m_name; } -QString NewsSourceBase::subjectText(const Subject subject) +TQString NewsSourceBase::subjectText(const Subject subject) { switch (subject) { case Arts: return i18n("Arts"); @@ -144,7 +144,7 @@ void NewsSourceBase::slotProcessArticles(XMLNewsSource *, bool gotEm) emit newNewsAvailable(this, oldArticles != m_articles); } -Article::Ptr NewsSourceBase::article(const QString &headline) +Article::Ptr NewsSourceBase::article(const TQString &headline) { Article::List::ConstIterator it = m_articles.begin(); Article::List::ConstIterator end = m_articles.end(); @@ -155,13 +155,13 @@ Article::Ptr NewsSourceBase::article(const QString &headline) return 0L; } -void NewsSourceBase::slotGotIcon(const KURL &url, const QPixmap &pixmap) +void NewsSourceBase::slotGotIcon(const KURL &url, const TQPixmap &pixmap) { if (url.url() == m_data.icon) { m_icon = pixmap; - disconnect(m_newsIconMgr, SIGNAL(gotIcon(const KURL &, const QPixmap &)), - this, SLOT(slotGotIcon(const KURL &, const QPixmap &))); + disconnect(m_newsIconMgr, TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)), + this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &))); } } @@ -181,10 +181,10 @@ ProgramNewsSource::ProgramNewsSource(const NewsSourceBase::Data &nsd, m_program(new KProcess()), m_programOutput(0) { - connect(m_program, SIGNAL(processExited(KProcess *)), - SLOT(slotProgramExited(KProcess *))); - connect(m_program, SIGNAL(receivedStdout(KProcess *, char *, int)), - SLOT(slotGotProgramOutput(KProcess *, char *, int))); + connect(m_program, TQT_SIGNAL(processExited(KProcess *)), + TQT_SLOT(slotProgramExited(KProcess *))); + connect(m_program, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + TQT_SLOT(slotGotProgramOutput(KProcess *, char *, int))); m_data.sourceFile = KURL(m_data.sourceFile).encodedPathAndQuery(); } @@ -213,7 +213,7 @@ void ProgramNewsSource::slotProgramExited(KProcess *proc) { bool okSoFar = true; - QString errorMsg; + TQString errorMsg; if (!proc->normalExit()) { errorMsg = i18n("

The program '%1' was terminated abnormally.
This can" @@ -228,9 +228,9 @@ void ProgramNewsSource::slotProgramExited(KProcess *proc) } if (!okSoFar) { - QString output = QString(m_programOutput->buffer()); + TQString output = TQString(m_programOutput->buffer()); if (!output.isEmpty()) { - output = QString::fromLatin1("\"") + output + QString::fromLatin1("\""); + output = TQString::fromLatin1("\"") + output + TQString::fromLatin1("\""); errorMsg += i18n("

Program output:
%1
").arg(output); } KMessageBox::detailedError(0, i18n("An error occurred while updating the" @@ -244,7 +244,7 @@ void ProgramNewsSource::slotProgramExited(KProcess *proc) m_programOutput = 0; } -QString ProgramNewsSource::errorMessage(const ErrorCode errorCode) +TQString ProgramNewsSource::errorMessage(const ErrorCode errorCode) { switch (errorCode) { case EPERM: return i18n("The program '%1' could not be started at all."); diff --git a/knewsticker/common/newsengine.h b/knewsticker/common/newsengine.h index 342dd7fe..430efff7 100644 --- a/knewsticker/common/newsengine.h +++ b/knewsticker/common/newsengine.h @@ -18,9 +18,9 @@ #include "configiface.h" #include "xmlnewsaccess.h" -#include -#include -#include +#include +#include +#include #include #include @@ -40,9 +40,9 @@ class KDE_EXPORT Article : public XMLNewsArticle, public KShared { public: typedef KSharedPtr

Ptr; - typedef QValueList List; + typedef TQValueList List; - Article(NewsSourceBase *, const QString & = QString::null, + Article(NewsSourceBase *, const TQString & = TQString::null, const KURL & = KURL()); bool operator==(const Article &other) const; @@ -68,13 +68,13 @@ class KDE_EXPORT NewsSourceBase : public XMLNewsSource, public KShared Reference, Science, Shopping, Society, Sports, Misc, Magazines }; struct Data { - Data(const QString &_name = I18N_NOOP("Unknown"), - const QString &_sourceFile = QString::null, - const QString &_icon = QString::null, + Data(const TQString &_name = I18N_NOOP("Unknown"), + const TQString &_sourceFile = TQString::null, + const TQString &_icon = TQString::null, const Subject _subject = Computers, unsigned int _maxArticles = 10, bool _enabled = true, bool _isProgram = false, - const QString &_language = QString::fromLatin1("C")) + const TQString &_language = TQString::fromLatin1("C")) { name = _name; sourceFile = _sourceFile; @@ -86,32 +86,32 @@ class KDE_EXPORT NewsSourceBase : public XMLNewsSource, public KShared language = _language; } - QString name; - QString sourceFile; - QString icon; + TQString name; + TQString sourceFile; + TQString icon; Subject subject; unsigned int maxArticles; bool enabled; bool isProgram; - QString language; + TQString language; }; typedef KSharedPtr Ptr; - typedef QValueList List; + typedef TQValueList List; NewsSourceBase(const Data &, ConfigIface *); - virtual QString newsSourceName() const; - QString sourceFile() const { return m_data.sourceFile; } + virtual TQString newsSourceName() const; + TQString sourceFile() const { return m_data.sourceFile; } unsigned int maxArticles() const { return m_data.maxArticles; } - QPixmap icon() const { return m_icon; } + TQPixmap icon() const { return m_icon; } void getIcon(); Data data() const { return m_data; } Article::List articles() const { return m_articles; } - Article::Ptr article(const QString &); + Article::Ptr article(const TQString &); - static QString subjectText(const Subject); + static TQString subjectText(const Subject); signals: void newNewsAvailable(const NewsSourceBase::Ptr &, bool); @@ -122,11 +122,11 @@ class KDE_EXPORT NewsSourceBase : public XMLNewsSource, public KShared protected slots: void slotProcessArticles(XMLNewsSource *, bool); - void slotGotIcon(const KURL &, const QPixmap &); + void slotGotIcon(const KURL &, const TQPixmap &); protected: Data m_data; - QPixmap m_icon; + TQPixmap m_icon; ConfigAccess *m_cfg; NewsIconMgr *m_newsIconMgr; Article::List m_articles; @@ -194,10 +194,10 @@ class KDE_EXPORT ProgramNewsSource : public NewsSourceBase void slotProgramExited(KProcess *); private: - static QString errorMessage(const ErrorCode); + static TQString errorMessage(const ErrorCode); KProcess *m_program; - QBuffer *m_programOutput; + TQBuffer *m_programOutput; }; #endif // NEWSENGINE_H diff --git a/knewsticker/common/newsiconmgr.cpp b/knewsticker/common/newsiconmgr.cpp index 69617490..b6787dff 100644 --- a/knewsticker/common/newsiconmgr.cpp +++ b/knewsticker/common/newsiconmgr.cpp @@ -16,15 +16,15 @@ #include #include -#include -#include -#include +#include +#include +#include struct KIODownload { KURL url; - QByteArray data; - QIODevice::Offset dataOffset; + TQByteArray data; + TQIODevice::Offset dataOffset; }; NewsIconMgr *NewsIconMgr::m_instance = 0; @@ -37,13 +37,13 @@ NewsIconMgr *NewsIconMgr::self() return m_instance; } -NewsIconMgr::NewsIconMgr(QObject *parent, const char *name) - : QObject(parent, name), DCOPObject("NewsIconMgr"), - m_stdIcon(SmallIcon(QString::fromLatin1("news"))) +NewsIconMgr::NewsIconMgr(TQObject *parent, const char *name) + : TQObject(parent, name), DCOPObject("NewsIconMgr"), + m_stdIcon(SmallIcon(TQString::fromLatin1("news"))) { connectDCOPSignal("kded", - "favicons", "iconChanged(bool, QString, QString)", - "slotGotIcon(bool, QString, QString)", + "favicons", "iconChanged(bool, TQString, TQString)", + "slotGotIcon(bool, TQString, TQString)", false); } @@ -60,11 +60,11 @@ void NewsIconMgr::getIcon(const KURL &url) } if (url.isLocalFile()) { - if (QFile::exists(url.encodedPathAndQuery())) { - QPixmap icon(url.encodedPathAndQuery()); + if (TQFile::exists(url.encodedPathAndQuery())) { + TQPixmap icon(url.encodedPathAndQuery()); if (!icon.isNull()) { - if (icon.size() != QSize(16, 16)) { - if (!icon.convertFromImage(icon.convertToImage().smoothScale(16, 16, QImage::ScaleMin))) { + if (icon.size() != TQSize(16, 16)) { + if (!icon.convertFromImage(icon.convertToImage().smoothScale(16, 16, TQImage::ScaleMin))) { emit gotIcon(url, m_stdIcon); return; } @@ -79,19 +79,19 @@ void NewsIconMgr::getIcon(const KURL &url) if (url.encodedPathAndQuery() == "/favicon.ico") { if (favicon(url).isNull()) { - QByteArray data; - QDataStream ds(data, IO_WriteOnly); + TQByteArray data; + TQDataStream ds(data, IO_WriteOnly); ds << url; kapp->dcopClient()->send("kded", "favicons", "downloadHostIcon(KURL)", data); } else { - emit gotIcon(url, QPixmap(KGlobal::dirs()->findResource("cache", - QString::fromLatin1("favicons/%1.png").arg(url.host())))); + emit gotIcon(url, TQPixmap(KGlobal::dirs()->findResource("cache", + TQString::fromLatin1("favicons/%1.png").arg(url.host())))); } } else { KIO::Job *job = KIO::get(url, true, false); - connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), - SLOT(slotData(KIO::Job *, const QByteArray &))); - connect(job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *))); KIODownload download; download.url = url; @@ -100,7 +100,7 @@ void NewsIconMgr::getIcon(const KURL &url) } } -bool NewsIconMgr::isStdIcon(const QPixmap &pixmap) const +bool NewsIconMgr::isStdIcon(const TQPixmap &pixmap) const { if (!pixmap.isNull()) return pixmap.convertToImage() == m_stdIcon.convertToImage(); @@ -108,9 +108,9 @@ bool NewsIconMgr::isStdIcon(const QPixmap &pixmap) const return false; } -void NewsIconMgr::slotData(KIO::Job *job, const QByteArray &data) +void NewsIconMgr::slotData(KIO::Job *job, const TQByteArray &data) { - QBuffer buf(m_kioDownload[job].data); + TQBuffer buf(m_kioDownload[job].data); buf.open(IO_WriteOnly); buf.at(m_kioDownload[job].dataOffset); buf.writeBlock(data); @@ -119,41 +119,41 @@ void NewsIconMgr::slotData(KIO::Job *job, const QByteArray &data) void NewsIconMgr::slotResult(KIO::Job *job) { - emit gotIcon(m_kioDownload[job].url, QPixmap(m_kioDownload[job].data)); + emit gotIcon(m_kioDownload[job].url, TQPixmap(m_kioDownload[job].data)); m_kioDownload.remove(job); } -void NewsIconMgr::slotGotIcon(bool isHost, QString hostOrURL, QString iconName) +void NewsIconMgr::slotGotIcon(bool isHost, TQString hostOrURL, TQString iconName) { KURL url = KURL(hostOrURL); if (!isHost) - url.setProtocol(QString::fromLatin1("http")); + url.setProtocol(TQString::fromLatin1("http")); if (iconName.isNull()) emit gotIcon(url, m_stdIcon); else - emit gotIcon(url, QPixmap(KGlobal::dirs()->findResource("cache", - QString::fromLatin1("favicons/%1.png").arg(url.host())))); + emit gotIcon(url, TQPixmap(KGlobal::dirs()->findResource("cache", + TQString::fromLatin1("favicons/%1.png").arg(url.host())))); } -QString NewsIconMgr::favicon(const KURL &url) const +TQString NewsIconMgr::favicon(const KURL &url) const { - QByteArray data, reply; - QCString replyType; - QDataStream ds(data, IO_WriteOnly); + TQByteArray data, reply; + TQCString replyType; + TQDataStream ds(data, IO_WriteOnly); ds << url; kapp->dcopClient()->call("kded", "favicons", "iconForURL(KURL)", data, replyType, reply); - if (replyType == "QString") { - QDataStream replyStream(reply, IO_ReadOnly); - QString result; + if (replyType == "TQString") { + TQDataStream replyStream(reply, IO_ReadOnly); + TQString result; replyStream >> result; return result; } - return QString::null; + return TQString::null; } #include "newsiconmgr.moc" diff --git a/knewsticker/common/newsiconmgr.h b/knewsticker/common/newsiconmgr.h index e4c6b657..30071155 100644 --- a/knewsticker/common/newsiconmgr.h +++ b/knewsticker/common/newsiconmgr.h @@ -11,8 +11,8 @@ #ifndef NEWSICONMGR_H #define NEWSICONMGR_H -#include -#include +#include +#include #include #include @@ -21,9 +21,9 @@ class DCOPClient; struct KIODownload; -typedef QMap KIODownloadMap; +typedef TQMap KIODownloadMap; -class NewsIconMgr : public QObject, public DCOPObject +class NewsIconMgr : public TQObject, public DCOPObject { Q_OBJECT K_DCOP @@ -32,26 +32,26 @@ class NewsIconMgr : public QObject, public DCOPObject static NewsIconMgr *self(); void getIcon(const KURL &); - bool isStdIcon(const QPixmap &) const; + bool isStdIcon(const TQPixmap &) const; k_dcop: - void slotGotIcon(bool, QString, QString); + void slotGotIcon(bool, TQString, TQString); signals: - void gotIcon(const KURL &, const QPixmap &); + void gotIcon(const KURL &, const TQPixmap &); protected: - NewsIconMgr(QObject * = 0L, const char * = 0L); + NewsIconMgr(TQObject * = 0L, const char * = 0L); ~NewsIconMgr(); private slots: - void slotData(KIO::Job *, const QByteArray &); + void slotData(KIO::Job *, const TQByteArray &); void slotResult(KIO::Job *); private: - QString favicon(const KURL &) const; + TQString favicon(const KURL &) const; - QPixmap m_stdIcon; + TQPixmap m_stdIcon; KIODownloadMap m_kioDownload; static NewsIconMgr *m_instance; diff --git a/knewsticker/common/xmlnewsaccess.cpp b/knewsticker/common/xmlnewsaccess.cpp index 1c892e8e..b8998e0c 100644 --- a/knewsticker/common/xmlnewsaccess.cpp +++ b/knewsticker/common/xmlnewsaccess.cpp @@ -14,11 +14,11 @@ #include #include -#include -#include -#include +#include +#include +#include -XMLNewsArticle::XMLNewsArticle(const QString &headline, const KURL &address) +XMLNewsArticle::XMLNewsArticle(const TQString &headline, const KURL &address) : m_headline(headline), m_address(address) { @@ -36,10 +36,10 @@ bool XMLNewsArticle::operator==(const XMLNewsArticle &a) return m_headline == a.headline() && m_address == a.address(); } -XMLNewsSource::XMLNewsSource() : QObject(), - m_name(QString::null), - m_link(QString::null), - m_description(QString::null), +XMLNewsSource::XMLNewsSource() : TQObject(), + m_name(TQString::null), + m_link(TQString::null), + m_description(TQString::null), m_downloadData(0) { } @@ -60,14 +60,14 @@ void XMLNewsSource::loadFrom(const KURL &url) m_downloadData->open(IO_WriteOnly); KIO::Job *job = KIO::get(url, false, false); - job->addMetaData(QString::fromLatin1("UserAgent"), - QString::fromLatin1("KNewsTicker v0.2")); - connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), - SLOT(slotData(KIO::Job *, const QByteArray &))); - connect(job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *))); + job->addMetaData(TQString::fromLatin1("UserAgent"), + TQString::fromLatin1("KNewsTicker v0.2")); + connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *))); } -void XMLNewsSource::slotData(KIO::Job *, const QByteArray &data) +void XMLNewsSource::slotData(KIO::Job *, const TQByteArray &data) { m_downloadData->writeBlock(data.data(), data.size()); } @@ -80,7 +80,7 @@ void XMLNewsSource::slotResult(KIO::Job *job) m_downloadData = 0; } -void XMLNewsSource::processData(const QByteArray &data, bool okSoFar) +void XMLNewsSource::processData(const TQByteArray &data, bool okSoFar) { bool validContent = okSoFar; kdDebug(5005) << "XMLNewsSource::processData(): validContent = " << validContent << endl; @@ -90,7 +90,7 @@ void XMLNewsSource::processData(const QByteArray &data, bool okSoFar) * Some servers prepend whitespace before the declaration. * Since QDom doesn't like that we strip this first. */ - QDomDocument domDoc; + TQDomDocument domDoc; const char *charData = data.data(); int len = data.count(); @@ -100,25 +100,25 @@ void XMLNewsSource::processData(const QByteArray &data, bool okSoFar) charData++; } - QByteArray tmpData; + TQByteArray tmpData; tmpData.setRawData(charData, len); if (validContent = domDoc.setContent(tmpData)) { - QDomNode channelNode = domDoc.documentElement().namedItem(QString::fromLatin1("channel")); + TQDomNode channelNode = domDoc.documentElement().namedItem(TQString::fromLatin1("channel")); - m_name = channelNode.namedItem(QString::fromLatin1("title")).toElement().text().simplifyWhiteSpace(); + m_name = channelNode.namedItem(TQString::fromLatin1("title")).toElement().text().simplifyWhiteSpace(); kdDebug(5005) << "XMLNewsSource::processData(): Successfully updated " << m_name << endl; - m_link = channelNode.namedItem(QString::fromLatin1("link")).toElement().text().simplifyWhiteSpace(); - m_description = channelNode.namedItem(QString::fromLatin1("description")).toElement().text().simplifyWhiteSpace(); + m_link = channelNode.namedItem(TQString::fromLatin1("link")).toElement().text().simplifyWhiteSpace(); + m_description = channelNode.namedItem(TQString::fromLatin1("description")).toElement().text().simplifyWhiteSpace(); - QDomNodeList items = domDoc.elementsByTagName(QString::fromLatin1("item")); + TQDomNodeList items = domDoc.elementsByTagName(TQString::fromLatin1("item")); m_articles.clear(); - QDomNode itemNode; - QString headline, address; + TQDomNode itemNode; + TQString headline, address; for (unsigned int i = 0; i < items.count(); i++) { itemNode = items.item(i); - headline = KCharsets::resolveEntities(itemNode.namedItem(QString::fromLatin1("title")).toElement().text().simplifyWhiteSpace()); - address = KCharsets::resolveEntities(itemNode.namedItem(QString::fromLatin1("link")).toElement().text().simplifyWhiteSpace()); + headline = KCharsets::resolveEntities(itemNode.namedItem(TQString::fromLatin1("title")).toElement().text().simplifyWhiteSpace()); + address = KCharsets::resolveEntities(itemNode.namedItem(TQString::fromLatin1("link")).toElement().text().simplifyWhiteSpace()); m_articles.append(XMLNewsArticle(headline, KURL( address ))); } } diff --git a/knewsticker/common/xmlnewsaccess.h b/knewsticker/common/xmlnewsaccess.h index 91cbf77f..46cbab59 100644 --- a/knewsticker/common/xmlnewsaccess.h +++ b/knewsticker/common/xmlnewsaccess.h @@ -15,8 +15,8 @@ #include #endif -#include -#include +#include +#include #include #include @@ -28,15 +28,15 @@ class XMLNewsSource; class XMLNewsArticle { public: - typedef QValueList List; + typedef TQValueList List; XMLNewsArticle() {} - XMLNewsArticle(const QString &headline, const KURL &addresss); + XMLNewsArticle(const TQString &headline, const KURL &addresss); XMLNewsArticle(const XMLNewsArticle &other) { (*this) = other; } XMLNewsArticle &operator=(const XMLNewsArticle &other); - QString headline() const { return m_headline; } - void setHeadline(const QString &headline) { m_headline = headline; } + TQString headline() const { return m_headline; } + void setHeadline(const TQString &headline) { m_headline = headline; } KURL address() const { return m_address; } void setAddress(const KURL &address) { m_address = address; } @@ -45,7 +45,7 @@ class XMLNewsArticle bool operator!= (const XMLNewsArticle &a) { return !operator==(a); } private: - QString m_headline; + TQString m_headline; KURL m_address; }; @@ -59,28 +59,28 @@ class XMLNewsSource : public QObject void loadFrom(const KURL &); - virtual QString newsSourceName() const { return m_name; } - virtual QString link() const { return m_link; } - virtual QString description() const { return m_description; } + virtual TQString newsSourceName() const { return m_name; } + virtual TQString link() const { return m_link; } + virtual TQString description() const { return m_description; } const XMLNewsArticle::List &articles() const { return m_articles; } signals: void loadComplete(XMLNewsSource *, bool); protected: - void processData(const QByteArray &, bool = true); + void processData(const TQByteArray &, bool = true); - QString m_name; - QString m_link; - QString m_description; + TQString m_name; + TQString m_link; + TQString m_description; private slots: - void slotData(KIO::Job *, const QByteArray &); + void slotData(KIO::Job *, const TQByteArray &); void slotResult(KIO::Job *); private: XMLNewsArticle::List m_articles; - QBuffer *m_downloadData; + TQBuffer *m_downloadData; }; #endif // XMLNEWSACCESS_H diff --git a/knewsticker/knewsticker.cpp b/knewsticker/knewsticker.cpp index 6d2f90cb..9b15f5da 100644 --- a/knewsticker/knewsticker.cpp +++ b/knewsticker/knewsticker.cpp @@ -27,36 +27,36 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include -KNewsTicker::KNewsTicker(const QString &cfgFile, Type t, int actions, QWidget *parent, const char *name) +KNewsTicker::KNewsTicker(const TQString &cfgFile, Type t, int actions, TQWidget *parent, const char *name) : ConfigIface(), DCOPObject("KNewsTicker"), KPanelApplet(cfgFile, t, actions, parent, name), m_instance(new KInstance("knewsticker")), m_dcopClient(new DCOPClient()), m_cfg(new ConfigAccess(config())), - m_newsTimer(new QTimer(this)), - m_updateTimer(new QTimer(this)), + m_newsTimer(new TQTimer(this)), + m_updateTimer(new TQTimer(this)), m_newsIconMgr(NewsIconMgr::self()), m_aboutData(new KAboutData("knewsticker", I18N_NOOP("KNewsTicker"), "v0.2", I18N_NOOP("A news ticker applet."), KAboutData::License_BSD, I18N_NOOP("(c) 2000, 2001 The KNewsTicker developers"))) { - QHBoxLayout *layout = new QHBoxLayout(this); + TQHBoxLayout *layout = new TQHBoxLayout(this); m_contextMenu = new KNewsTickerMenu(this); - connect(m_contextMenu, SIGNAL(aboutToHide()), - SLOT(slotContextMenuAboutToHide())); + connect(m_contextMenu, TQT_SIGNAL(aboutToHide()), + TQT_SLOT(slotContextMenuAboutToHide())); setCustomMenu(m_contextMenu); m_arrowButton = new KArrowButton(this); - QToolTip::add(m_arrowButton, i18n("Show menu")); - connect(m_arrowButton, SIGNAL(clicked()), SLOT(slotArrowButtonPressed())); + TQToolTip::add(m_arrowButton, i18n("Show menu")); + connect(m_arrowButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotArrowButtonPressed())); m_arrowButton->setFocusPolicy(NoFocus); setupArrowButton(); layout->addWidget(m_arrowButton); @@ -66,12 +66,12 @@ KNewsTicker::KNewsTicker(const QString &cfgFile, Type t, int actions, QWidget *p m_dcopClient->registerAs("knewsticker", false); - QToolTip::add(m_scroller, QString::null); - connect(m_scroller, SIGNAL(contextMenu()), SLOT(slotOpenContextMenu())); + TQToolTip::add(m_scroller, TQString::null); + connect(m_scroller, TQT_SIGNAL(contextMenu()), TQT_SLOT(slotOpenContextMenu())); - connect(m_newsTimer, SIGNAL(timeout()), SLOT(slotUpdateNews())); + connect(m_newsTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotUpdateNews())); - connect(m_updateTimer, SIGNAL(timeout()), SLOT(slotNotifyOfFailures())); + connect(m_updateTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotNotifyOfFailures())); m_aboutData->addAuthor("Frerich Raabe", I18N_NOOP("Original author"), "raabe@kde.org"); @@ -106,7 +106,7 @@ int KNewsTicker::widthForHeight(int) const void KNewsTicker::preferences() { KNewsTickerConfig dlg(m_cfg, this); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { reparseConfig(); } } @@ -119,7 +119,7 @@ void KNewsTicker::about() void KNewsTicker::help() { - kapp->invokeHelp(QString::null, QString::fromLatin1("knewsticker")); + kapp->invokeHelp(TQString::null, TQString::fromLatin1("knewsticker")); } void KNewsTicker::reportBug() @@ -133,18 +133,18 @@ void KNewsTicker::reparseConfig() m_cfg->reparseConfiguration(); m_newsSources.clear(); - QStringList newsSources = m_cfg->newsSources(); - QStringList::ConstIterator it = newsSources.begin(); - QStringList::ConstIterator end = newsSources.end(); + TQStringList newsSources = m_cfg->newsSources(); + TQStringList::ConstIterator it = newsSources.begin(); + TQStringList::ConstIterator end = newsSources.end(); for (; it != end; ++it) { NewsSourceBase::Ptr ns = m_cfg->newsSource((*it)); if (!ns->data().enabled) continue; - connect(ns, SIGNAL(newNewsAvailable(const NewsSourceBase::Ptr &, bool)), - SLOT(slotNewsSourceUpdated(const NewsSourceBase::Ptr &, bool))); - connect(ns, SIGNAL(invalidInput(const NewsSourceBase::Ptr &)), - SLOT(slotNewsSourceFailed(const NewsSourceBase::Ptr &))); + connect(ns, TQT_SIGNAL(newNewsAvailable(const NewsSourceBase::Ptr &, bool)), + TQT_SLOT(slotNewsSourceUpdated(const NewsSourceBase::Ptr &, bool))); + connect(ns, TQT_SIGNAL(invalidInput(const NewsSourceBase::Ptr &)), + TQT_SLOT(slotNewsSourceFailed(const NewsSourceBase::Ptr &))); m_newsSources.append(ns); } @@ -212,7 +212,7 @@ void KNewsTicker::slotNewsSourceUpdated(const NewsSourceBase::Ptr &ns, if (m_newNews) { KNotifyClient::Instance instance(m_instance); - KNotifyClient::event(winId(), QString::fromLatin1("NewNews")); + KNotifyClient::event(winId(), TQString::fromLatin1("NewNews")); } } @@ -222,22 +222,22 @@ void KNewsTicker::slotNewsSourceFailed(const NewsSourceBase::Ptr &ns) slotNewsSourceUpdated(ns); } -void KNewsTicker::mousePressEvent(QMouseEvent *e) +void KNewsTicker::mousePressEvent(TQMouseEvent *e) { - if (e->button() == QMouseEvent::RightButton) + if (e->button() == TQMouseEvent::RightButton) slotOpenContextMenu(); } void KNewsTicker::slotOpenContextMenu() { m_contextMenu->setFullMenu(true); - m_contextMenu->exec(QCursor::pos()); + m_contextMenu->exec(TQCursor::pos()); } void KNewsTicker::slotArrowButtonPressed() { - QPoint pos(m_arrowButton->mapToGlobal(QPoint(0, 0))); - QSize size(m_arrowButton->size()); + TQPoint pos(m_arrowButton->mapToGlobal(TQPoint(0, 0))); + TQSize size(m_arrowButton->size()); if (position() == KPanelApplet::pTop) { pos.setY(pos.y() + size.height() + 2); @@ -259,12 +259,12 @@ void KNewsTicker::positionChange(Position) { delete layout(); - QBoxLayout *layout; + TQBoxLayout *layout; if (orientation() == Horizontal) - layout = new QHBoxLayout(this); + layout = new TQHBoxLayout(this); else - layout = new QVBoxLayout(this); + layout = new TQVBoxLayout(this); if (m_arrowButton) { layout->addWidget(m_arrowButton); @@ -283,7 +283,7 @@ void KNewsTicker::slotContextMenuAboutToHide() void KNewsTicker::slotNotifyOfFailures() { KNotifyClient::Instance instance(m_instance); - QString notification = QString::null; + TQString notification = TQString::null; if (m_failedNewsUpdates.count() == 1) notification = i18n("Could not update news site '%1'.
" @@ -292,16 +292,16 @@ void KNewsTicker::slotNotifyOfFailures() else if (m_failedNewsUpdates.count() > 1 && m_failedNewsUpdates.count() < 8) { notification = i18n("The following news sites had problems. Their" " resource files are probably invalid or broken.
    "); - QStringList::ConstIterator it = m_failedNewsUpdates.begin(); - QStringList::ConstIterator end = m_failedNewsUpdates.end(); + TQStringList::ConstIterator it = m_failedNewsUpdates.begin(); + TQStringList::ConstIterator end = m_failedNewsUpdates.end(); for (; it != end; ++it) - notification += QString::fromLatin1("
  • %1
  • ").arg(*it); - notification += QString::fromLatin1("
"); + notification += TQString::fromLatin1("
  • %1
  • ").arg(*it); + notification += TQString::fromLatin1("
    "); } else notification = i18n("Failed to update several news" " sites. The Internet connection might be cut."); - KNotifyClient::event(winId(), QString::fromLatin1("InvalidRDF"), notification); + KNotifyClient::event(winId(), TQString::fromLatin1("InvalidRDF"), notification); } void KNewsTicker::setInterval(const uint interval) @@ -367,19 +367,19 @@ void KNewsTicker::setSlowedScrolling(bool slowedScrolling) m_cfg->setSlowedScrolling(slowedScrolling); } -void KNewsTicker::setForegroundColor(const QColor &foregroundColor) +void KNewsTicker::setForegroundColor(const TQColor &foregroundColor) { m_cfg->setForegroundColor(foregroundColor); m_scroller->reset(false); } -void KNewsTicker::setBackgroundColor(const QColor &backgroundColor) +void KNewsTicker::setBackgroundColor(const TQColor &backgroundColor) { m_cfg->setBackgroundColor(backgroundColor); m_scroller->reset(false); } -void KNewsTicker::setHighlightedColor(const QColor &highlightedColor) +void KNewsTicker::setHighlightedColor(const TQColor &highlightedColor) { m_cfg->setHighlightedColor(highlightedColor); m_scroller->reset(false); @@ -417,10 +417,10 @@ void KNewsTickerMenu::populateMenu() * Perhaps this hardcoded stuff should be replaced by some kind of * themeing functionality? */ - const QPixmap lookIcon = SmallIcon(QString::fromLatin1("viewmag")); - const QPixmap newArticleIcon = SmallIcon(QString::fromLatin1("info")); - const QPixmap oldArticleIcon = SmallIcon(QString::fromLatin1("mime_empty")); - const QPixmap noArticlesIcon = SmallIcon(QString::fromLatin1("remove")); + const TQPixmap lookIcon = SmallIcon(TQString::fromLatin1("viewmag")); + const TQPixmap newArticleIcon = SmallIcon(TQString::fromLatin1("info")); + const TQPixmap oldArticleIcon = SmallIcon(TQString::fromLatin1("mime_empty")); + const TQPixmap noArticlesIcon = SmallIcon(TQString::fromLatin1("remove")); unsigned int articleIdx = 0; const NewsSourceBase::List sources = m_parent->m_newsSources; @@ -429,7 +429,7 @@ void KNewsTickerMenu::populateMenu() NewsSourceBase::Ptr ns = *nIt; KPopupMenu *submenu = new KPopupMenu; - int checkNewsId = submenu->insertItem(lookIcon, i18n("Check News"), this, SLOT(slotCheckNews(int)), 0, sources.findIndex(ns) + 1000); + int checkNewsId = submenu->insertItem(lookIcon, i18n("Check News"), this, TQT_SLOT(slotCheckNews(int)), 0, sources.findIndex(ns) + 1000); setItemParameter(checkNewsId, sources.findIndex(ns)); submenu->insertSeparator(); @@ -441,12 +441,12 @@ void KNewsTickerMenu::populateMenu() Article::List::ConstIterator artIt = articles.begin(); for (; artIt != articles.end(); ++artIt) { Article::Ptr a = *artIt; - QString headline = a->headline().replace('&', "&&"); + TQString headline = a->headline().replace('&', "&&"); int id; if ( a->read() ) - id = submenu->insertItem(oldArticleIcon, headline, this, SLOT(slotOpenArticle(int)), 0, articleIdx+2000); + id = submenu->insertItem(oldArticleIcon, headline, this, TQT_SLOT(slotOpenArticle(int)), 0, articleIdx+2000); else - id = submenu->insertItem(newArticleIcon, headline, this, SLOT(slotOpenArticle(int)), 0, articleIdx+2000); + id = submenu->insertItem(newArticleIcon, headline, this, TQT_SLOT(slotOpenArticle(int)), 0, articleIdx+2000); kdDebug( 5005 ) << "Setting articles index for " << a->headline() << " to " << articleIdx << endl; setItemParameter( id, articleIdx++ ); } @@ -460,23 +460,23 @@ void KNewsTickerMenu::populateMenu() if (!m_parent->m_cfg->newsSources().isEmpty()) insertSeparator(); - insertItem(lookIcon, i18n("Check News"), m_parent, SLOT(slotUpdateNews())); - int i = insertItem(i18n("Offline Mode"), this, SLOT(slotToggleOfflineMode()), 0, 4711 ); + insertItem(lookIcon, i18n("Check News"), m_parent, TQT_SLOT(slotUpdateNews())); + int i = insertItem(i18n("Offline Mode"), this, TQT_SLOT(slotToggleOfflineMode()), 0, 4711 ); setItemChecked(i, m_parent->m_cfg->offlineMode()); if (m_fullMenu) { insertSeparator(); - const QPixmap logoIcon = SmallIcon(QString::fromLatin1("knewsticker")); - const QPixmap helpIcon = SmallIcon(QString::fromLatin1("help")); - const QPixmap confIcon = SmallIcon(QString::fromLatin1("configure")); + const TQPixmap logoIcon = SmallIcon(TQString::fromLatin1("knewsticker")); + const TQPixmap helpIcon = SmallIcon(TQString::fromLatin1("help")); + const TQPixmap confIcon = SmallIcon(TQString::fromLatin1("configure")); insertTitle(logoIcon, i18n("KNewsTicker"), 0, 0); - insertItem(helpIcon, i18n("Help"), this, SLOT(slotShowHelp())); - insertItem(logoIcon, i18n("About KNewsTicker"), this, SLOT(slotShowAbout())); + insertItem(helpIcon, i18n("Help"), this, TQT_SLOT(slotShowHelp())); + insertItem(logoIcon, i18n("About KNewsTicker"), this, TQT_SLOT(slotShowAbout())); insertSeparator(); - insertItem(confIcon, i18n("Configure KNewsTicker..."), this, SLOT(slotConfigure())); + insertItem(confIcon, i18n("Configure KNewsTicker..."), this, TQT_SLOT(slotConfigure())); } } @@ -533,9 +533,9 @@ void KNewsTickerMenu::slotOpenArticle(int idx) extern "C" { - KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString &configFile) + KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString &configFile) { - KGlobal::locale()->insertCatalogue(QString::fromLatin1("knewsticker")); + KGlobal::locale()->insertCatalogue(TQString::fromLatin1("knewsticker")); return new KNewsTicker(configFile, KPanelApplet::Stretch, KPanelApplet::Preferences | KPanelApplet::About | KPanelApplet::Help | KPanelApplet::ReportBug, diff --git a/knewsticker/knewsticker.h b/knewsticker/knewsticker.h index bbb228f6..081918d7 100644 --- a/knewsticker/knewsticker.h +++ b/knewsticker/knewsticker.h @@ -17,7 +17,7 @@ #include -#include +#include #include #include @@ -43,7 +43,7 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface, friend class KNewsTickerMenu; public: - KNewsTicker(const QString &, Type, int, QWidget * = 0, const char * = 0); + KNewsTicker(const TQString &, Type, int, TQWidget * = 0, const char * = 0); virtual ~KNewsTicker(); virtual int widthForHeight(int) const; @@ -62,10 +62,10 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface, virtual bool underlineHighlighted() const { return m_cfg->underlineHighlighted(); } virtual bool showIcons() const { return m_cfg->showIcons(); } virtual bool slowedScrolling() const { return m_cfg->slowedScrolling(); } - virtual QColor foregroundColor() const { return m_cfg->foregroundColor(); } - virtual QColor backgroundColor() const { return m_cfg->backgroundColor(); } - virtual QColor highlightedColor() const { return m_cfg->highlightedColor(); } - virtual QStringList newsSources() const { return m_cfg->newsSources(); } + virtual TQColor foregroundColor() const { return m_cfg->foregroundColor(); } + virtual TQColor backgroundColor() const { return m_cfg->backgroundColor(); } + virtual TQColor highlightedColor() const { return m_cfg->highlightedColor(); } + virtual TQStringList newsSources() const { return m_cfg->newsSources(); } virtual void setInterval(const uint); virtual void setScrollingSpeed(const uint); virtual void setMouseWheelSpeed(const uint); @@ -76,10 +76,10 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface, virtual void setUnderlineHighlighted(bool); virtual void setShowIcons(bool); virtual void setSlowedScrolling(bool); - virtual void setForegroundColor(const QColor &); - virtual void setBackgroundColor(const QColor &); - virtual void setHighlightedColor(const QColor &); - virtual void setNewsSources(const QStringList &) {} + virtual void setForegroundColor(const TQColor &); + virtual void setBackgroundColor(const TQColor &); + virtual void setHighlightedColor(const TQColor &); + virtual void setNewsSources(const TQStringList &) {} public slots: void slotUpdateNews(); @@ -90,7 +90,7 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface, virtual void about(); virtual void help(); virtual void reportBug(); - virtual void mousePressEvent(QMouseEvent *); + virtual void mousePressEvent(TQMouseEvent *); virtual void positionChange(Position); protected slots: @@ -107,8 +107,8 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface, DCOPClient *m_dcopClient; ConfigAccess *m_cfg; KArrowButton *m_arrowButton; - QTimer *m_newsTimer; - QTimer *m_updateTimer; + TQTimer *m_newsTimer; + TQTimer *m_updateTimer; NewsIconMgr *m_newsIconMgr; NewsScroller *m_scroller; KAboutData *m_aboutData; @@ -116,7 +116,7 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface, bool m_newNews; NewsSourceBase::List m_newsSources; QStringList m_failedNewsUpdates; - QStringList m_pendingNewsUpdates; + TQStringList m_pendingNewsUpdates; }; class KNewsTickerMenu : public KPopupMenu diff --git a/knewsticker/knewstickerconfig.cpp b/knewsticker/knewstickerconfig.cpp index 528269a0..4aa04851 100644 --- a/knewsticker/knewstickerconfig.cpp +++ b/knewsticker/knewstickerconfig.cpp @@ -26,15 +26,15 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -CategoryItem::CategoryItem(QListView *parent, const QString &text) - : QListViewItem(parent, text) +CategoryItem::CategoryItem(TQListView *parent, const TQString &text) + : TQListViewItem(parent, text) { setOpen(true); } @@ -42,16 +42,16 @@ CategoryItem::CategoryItem(QListView *parent, const QString &text) void CategoryItem::setOpen(bool open) { if (open) - setPixmap(0, SmallIcon(QString::fromLatin1("folder_open"))); + setPixmap(0, SmallIcon(TQString::fromLatin1("folder_open"))); else - setPixmap(0, SmallIcon(QString::fromLatin1("folder"))); + setPixmap(0, SmallIcon(TQString::fromLatin1("folder"))); - QListViewItem::setOpen(open); + TQListViewItem::setOpen(open); } NewsSourceItem::NewsSourceItem(KNewsTickerConfig *kcm, CategoryItem *parent, const NewsSourceBase::Data &nsd) - : QCheckListItem(parent, QString::null, QCheckListItem::CheckBox), + : TQCheckListItem(parent, TQString::null, TQCheckListItem::CheckBox), m_parent(parent), m_kcm(kcm) { @@ -76,7 +76,7 @@ void NewsSourceItem::setData(const NewsSourceBase::Data &nsd) setOn(nsd.enabled); setText(0, nsd.name); setText(1, nsd.sourceFile); - setText(2, QString::number(nsd.maxArticles)); + setText(2, TQString::number(nsd.maxArticles)); m_icon = nsd.icon; m_isProgram = nsd.isProgram; @@ -84,12 +84,12 @@ void NewsSourceItem::setData(const NewsSourceBase::Data &nsd) m_kcm->getNewsIcon(this, KURL( m_icon )); } -void NewsSourceItem::setIcon(const QPixmap &pixmap) +void NewsSourceItem::setIcon(const TQPixmap &pixmap) { setPixmap(0, pixmap); } -KNewsTickerConfig::KNewsTickerConfig(ConfigAccess *cfg, QWidget *parent, const char *name) +KNewsTickerConfig::KNewsTickerConfig(ConfigAccess *cfg, TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Configuration"), Ok|Close), m_cfg(cfg), m_child(new KNewsTickerConfigWidget(this)), @@ -109,31 +109,31 @@ KNewsTickerConfig::KNewsTickerConfig(ConfigAccess *cfg, QWidget *parent, const m_child->lvNewsSources->viewport()->installEventFilter(this); m_child->lvNewsSources->installEventFilter(this); - connect(m_newsIconMgr, SIGNAL(gotIcon(const KURL &, const QPixmap &)), SLOT(slotGotNewsIcon(const KURL &, const QPixmap &))); - connect(m_child->bChooseFont, SIGNAL(clicked()), SLOT(slotChooseFont())); - - connect(m_child->lvNewsSources, SIGNAL(contextMenu(KListView *, QListViewItem *, const QPoint &)), - SLOT(slotNewsSourceContextMenu(KListView *, QListViewItem *, const QPoint &))); - connect(m_child->lvNewsSources, SIGNAL(selectionChanged()), - SLOT(slotNewsSourceSelectionChanged())); - connect(m_child->lvNewsSources, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)), - SLOT(slotModifyNewsSource(QListViewItem *, const QPoint &, int))); - connect(m_child->bAddNewsSource, SIGNAL(clicked()), SLOT(slotAddNewsSource())); - connect(m_child->bRemoveNewsSource, SIGNAL(clicked()), SLOT(slotRemoveNewsSource())); - connect(m_child->bModifyNewsSource, SIGNAL(clicked()), SLOT(slotModifyNewsSource())); - - connect(m_child->lvFilters, SIGNAL(selectionChanged(QListViewItem *)), - SLOT(slotFilterSelectionChanged(QListViewItem *))); - connect(m_child->comboFilterAction, SIGNAL(activated(const QString &)), - SLOT(slotFilterActionChanged(const QString &))); - connect(m_child->comboFilterNewsSource, SIGNAL(activated(const QString &)), - SLOT(slotFilterNewsSourceChanged(const QString &))); - connect(m_child->comboFilterCondition, SIGNAL(activated(const QString &)), - SLOT(slotFilterConditionChanged(const QString &))); - connect(m_child->leFilterExpression, SIGNAL(textChanged(const QString &)), - SLOT(slotFilterExpressionChanged(const QString &))); - connect(m_child->bAddFilter, SIGNAL(clicked()), SLOT(slotAddFilter())); - connect(m_child->bRemoveFilter, SIGNAL(clicked()), SLOT(slotRemoveFilter())); + connect(m_newsIconMgr, TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)), TQT_SLOT(slotGotNewsIcon(const KURL &, const TQPixmap &))); + connect(m_child->bChooseFont, TQT_SIGNAL(clicked()), TQT_SLOT(slotChooseFont())); + + connect(m_child->lvNewsSources, TQT_SIGNAL(contextMenu(KListView *, TQListViewItem *, const TQPoint &)), + TQT_SLOT(slotNewsSourceContextMenu(KListView *, TQListViewItem *, const TQPoint &))); + connect(m_child->lvNewsSources, TQT_SIGNAL(selectionChanged()), + TQT_SLOT(slotNewsSourceSelectionChanged())); + connect(m_child->lvNewsSources, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)), + TQT_SLOT(slotModifyNewsSource(TQListViewItem *, const TQPoint &, int))); + connect(m_child->bAddNewsSource, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddNewsSource())); + connect(m_child->bRemoveNewsSource, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveNewsSource())); + connect(m_child->bModifyNewsSource, TQT_SIGNAL(clicked()), TQT_SLOT(slotModifyNewsSource())); + + connect(m_child->lvFilters, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + TQT_SLOT(slotFilterSelectionChanged(TQListViewItem *))); + connect(m_child->comboFilterAction, TQT_SIGNAL(activated(const TQString &)), + TQT_SLOT(slotFilterActionChanged(const TQString &))); + connect(m_child->comboFilterNewsSource, TQT_SIGNAL(activated(const TQString &)), + TQT_SLOT(slotFilterNewsSourceChanged(const TQString &))); + connect(m_child->comboFilterCondition, TQT_SIGNAL(activated(const TQString &)), + TQT_SLOT(slotFilterConditionChanged(const TQString &))); + connect(m_child->leFilterExpression, TQT_SIGNAL(textChanged(const TQString &)), + TQT_SLOT(slotFilterExpressionChanged(const TQString &))); + connect(m_child->bAddFilter, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddFilter())); + connect(m_child->bRemoveFilter, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveFilter())); load(); @@ -162,8 +162,8 @@ void KNewsTickerConfig::load() m_child->cbShowIcons->setChecked(m_cfg->showIcons()); m_child->lvNewsSources->clear(); - QStringList nsList = m_cfg->newsSources(); - for (QStringList::Iterator it = nsList.begin(); it != nsList.end(); ++it) + TQStringList nsList = m_cfg->newsSources(); + for (TQStringList::Iterator it = nsList.begin(); it != nsList.end(); ++it) addNewsSource(m_cfg->newsSource((*it))->data()); ArticleFilter::List filterList = m_cfg->filters(); @@ -193,8 +193,8 @@ void KNewsTickerConfig::save() m_cfg->setUnderlineHighlighted(m_child->cbUnderlineHighlighted->isChecked()); m_cfg->setShowIcons(m_child->cbShowIcons->isChecked()); - QStringList newsSources; - for (QListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) + TQStringList newsSources; + for (TQListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) if (NewsSourceItem *item = dynamic_cast(it.current())) { newsSources += item->data().name; m_cfg->setNewsSource(item->data()); @@ -204,8 +204,8 @@ void KNewsTickerConfig::save() ArticleFilter::List filters; ArticleFilter f; unsigned int i = 0; - for (QListViewItemIterator it(m_child->lvFilters); it.current(); it++) - if (QCheckListItem *item = dynamic_cast(it.current())) { + for (TQListViewItemIterator it(m_child->lvFilters); it.current(); it++) + if (TQCheckListItem *item = dynamic_cast(it.current())) { filters.append(i); f.setAction(item->text(0)); f.setNewsSource(item->text(2)); @@ -218,30 +218,30 @@ void KNewsTickerConfig::save() m_cfg->setFilters(filters); } -bool KNewsTickerConfig::eventFilter(QObject *o, QEvent *e) +bool KNewsTickerConfig::eventFilter(TQObject *o, TQEvent *e) { // - // "if ( e->type() == QEvent::DragEnter ) {" shoult normaly be enough. but there must be a bug somewhere in KListView. - if ( e->type() == QEvent::DragMove ) { + // "if ( e->type() == TQEvent::DragEnter ) {" shoult normaly be enough. but there must be a bug somewhere in KListView. + if ( e->type() == TQEvent::DragMove ) { // - QDragEnterEvent *d = (QDragEnterEvent*)e; - d->accept(QTextDrag::canDecode(d)); + TQDragEnterEvent *d = (TQDragEnterEvent*)e; + d->accept(TQTextDrag::canDecode(d)); return true; // eat event } - else if ( e->type() == QEvent::Drop) { - QDropEvent *d = (QDropEvent*)e; - QString newSourceUrl; - if ( QTextDrag::decode(d, newSourceUrl) ) { + else if ( e->type() == TQEvent::Drop) { + TQDropEvent *d = (TQDropEvent*)e; + TQString newSourceUrl; + if ( TQTextDrag::decode(d, newSourceUrl) ) { // // This is just for http://www.webreference.com/services/news/ - newSourceUrl = newSourceUrl.replace( QRegExp("^view-source:http%3A//"), "http://" ); + newSourceUrl = newSourceUrl.replace( TQRegExp("^view-source:http%3A//"), "http://" ); // newSourceUrl = newSourceUrl.stripWhiteSpace(); //look for a new Name of Source: - QString name = i18n("Unknown"); + TQString name = i18n("Unknown"); bool validName = false; - for (QListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) { + for (TQListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) { if (it.current()->text(0) == name) { validName = false; break; @@ -252,7 +252,7 @@ bool KNewsTickerConfig::eventFilter(QObject *o, QEvent *e) int i = 0; while (validName == false) { name = i18n("Unknown %1").arg(i); - for (QListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) { + for (TQListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) { if (it.current()->text(0) == name) { i++; validName = false; @@ -265,17 +265,17 @@ bool KNewsTickerConfig::eventFilter(QObject *o, QEvent *e) NewsSourceBase::Data nsd(name, newSourceUrl, "" , NewsSourceBase::Computers , 10, true, false); NewsSourceDlgImpl nsDlg(this, 0L, true); - connect(&nsDlg, SIGNAL(newsSource(const NewsSourceBase::Data &)), - SLOT(slotAddNewsSource(const NewsSourceBase::Data &))); + connect(&nsDlg, TQT_SIGNAL(newsSource(const NewsSourceBase::Data &)), + TQT_SLOT(slotAddNewsSource(const NewsSourceBase::Data &))); nsDlg.setup(nsd, false); nsDlg.exec(); } return true; // eat event } - return QWidget::eventFilter( o, e ); + return TQWidget::eventFilter( o, e ); } -void KNewsTickerConfig::resizeEvent(QResizeEvent *) +void KNewsTickerConfig::resizeEvent(TQResizeEvent *) { m_child->resize(width(), height()); } @@ -285,7 +285,7 @@ void KNewsTickerConfig::addNewsSource(const NewsSourceBase::Data &nsd, { CategoryItem *catItem = 0L; - for (QListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) { + for (TQListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) { if (it.current()->text(0) == NewsSourceBase::subjectText(nsd.subject)) { catItem = static_cast(it.current()); break; @@ -305,7 +305,7 @@ void KNewsTickerConfig::addNewsSource(const NewsSourceBase::Data &nsd, void KNewsTickerConfig::addFilter(const ArticleFilter &fd) { - QCheckListItem *item = new QCheckListItem(m_child->lvFilters, fd.action(), QCheckListItem::CheckBox); + TQCheckListItem *item = new TQCheckListItem(m_child->lvFilters, fd.action(), TQCheckListItem::CheckBox); item->setOn(fd.enabled()); item->setText(1, m_child->lArticles->text()); item->setText(2, fd.newsSource()); @@ -320,11 +320,11 @@ void KNewsTickerConfig::removeNewsSource() " source?

    ", "

    Do you really want to remove these %n news" " sources?

    ", - m_child->lvNewsSources->selectedItems().count()), QString::null, KStdGuiItem::del()) == KMessageBox::Continue) { + m_child->lvNewsSources->selectedItems().count()), TQString::null, KStdGuiItem::del()) == KMessageBox::Continue) { int itemCount = m_child->lvNewsSources->selectedItems().count(); for (int j = 0; j < itemCount; j++) { if (m_child->lvNewsSources->selectedItems().isEmpty()) { break; } - QListViewItem *item = m_child->lvNewsSources->selectedItems().take(0); + TQListViewItem *item = m_child->lvNewsSources->selectedItems().take(0); for (int i = 0; i < m_child->comboFilterNewsSource->count(); i++) if (m_child->comboFilterNewsSource->text(i) == item->text(0)) { m_child->comboFilterNewsSource->removeItem(i); @@ -340,26 +340,26 @@ void KNewsTickerConfig::removeNewsSource() } } -void KNewsTickerConfig::removeFilter(QListViewItem *item) +void KNewsTickerConfig::removeFilter(TQListViewItem *item) { if (KMessageBox::warningContinueCancel(this, i18n("

    Do you really want to remove the selected" - " filter?

    "), QString::null, KStdGuiItem::del()) == KMessageBox::Continue) { + " filter?

    "), TQString::null, KStdGuiItem::del()) == KMessageBox::Continue) { delete item; m_child->bRemoveFilter->setEnabled(false); } } -void KNewsTickerConfig::slotNewsSourceContextMenu(KListView *, QListViewItem *item, const QPoint &) +void KNewsTickerConfig::slotNewsSourceContextMenu(KListView *, TQListViewItem *item, const TQPoint &) { if (!dynamic_cast(item)) return; KPopupMenu *menu = new KPopupMenu(); - QPixmap addIcon = SmallIcon(QString::fromLatin1("news_subscribe")); - QPixmap modifyIcon = SmallIcon(QString::fromLatin1("edit")); - QPixmap removeIcon = SmallIcon(QString::fromLatin1("news_unsubscribe")); - QPixmap logoIcon = SmallIcon(QString::fromLatin1("knewsticker")); + TQPixmap addIcon = SmallIcon(TQString::fromLatin1("news_subscribe")); + TQPixmap modifyIcon = SmallIcon(TQString::fromLatin1("edit")); + TQPixmap removeIcon = SmallIcon(TQString::fromLatin1("news_unsubscribe")); + TQPixmap logoIcon = SmallIcon(TQString::fromLatin1("knewsticker")); menu->insertTitle(logoIcon, i18n("Edit News Source")); menu->insertItem(addIcon, i18n("&Add News Source"), 0); @@ -377,7 +377,7 @@ void KNewsTickerConfig::slotNewsSourceContextMenu(KListView *, QListViewItem *it menu->setItemEnabled(2, false); } - switch (menu->exec(QCursor::pos())) { + switch (menu->exec(TQCursor::pos())) { case 0: slotAddNewsSource(); break; case 1: modifyNewsSource(item); break; case 2: removeNewsSource(); break; @@ -402,8 +402,8 @@ void KNewsTickerConfig::slotChooseFont() void KNewsTickerConfig::slotAddNewsSource() { NewsSourceDlgImpl nsDlg(this, 0L, true); - connect(&nsDlg, SIGNAL(newsSource(const NewsSourceBase::Data &)), - SLOT(slotAddNewsSource(const NewsSourceBase::Data &))); + connect(&nsDlg, TQT_SIGNAL(newsSource(const NewsSourceBase::Data &)), + TQT_SLOT(slotAddNewsSource(const NewsSourceBase::Data &))); nsDlg.exec(); } @@ -421,14 +421,14 @@ void KNewsTickerConfig::slotModifyNewsSource() void KNewsTickerConfig::slotModifyNewsSource(const NewsSourceBase::Data &nsd) { if (m_modifyItem->data().subject != nsd.subject) { - QListViewItem *parentItem = m_modifyItem->parentItem(); + TQListViewItem *parentItem = m_modifyItem->parentItem(); parentItem->takeItem(m_modifyItem); if (parentItem->childCount() == 0) delete parentItem; CategoryItem *catItem = 0L; - for (QListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) { + for (TQListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) { if (it.current()->text(0) == NewsSourceBase::subjectText(nsd.subject)) { catItem = static_cast(it.current()); break; @@ -445,13 +445,13 @@ void KNewsTickerConfig::slotModifyNewsSource(const NewsSourceBase::Data &nsd) m_modifyItem->setData(nsd); } -void KNewsTickerConfig::slotModifyNewsSource(QListViewItem *item, const QPoint &, int) +void KNewsTickerConfig::slotModifyNewsSource(TQListViewItem *item, const TQPoint &, int) { if (dynamic_cast(item)) modifyNewsSource(item); } -void KNewsTickerConfig::modifyNewsSource(QListViewItem *item) +void KNewsTickerConfig::modifyNewsSource(TQListViewItem *item) { if ((m_modifyItem = dynamic_cast(item))) openModifyDialog(); @@ -460,8 +460,8 @@ void KNewsTickerConfig::modifyNewsSource(QListViewItem *item) void KNewsTickerConfig::openModifyDialog() { NewsSourceDlgImpl nsDlg(this, 0L, true); - connect(&nsDlg, SIGNAL(newsSource(const NewsSourceBase::Data &)), - SLOT(slotModifyNewsSource(const NewsSourceBase::Data &))); + connect(&nsDlg, TQT_SIGNAL(newsSource(const NewsSourceBase::Data &)), + TQT_SLOT(slotModifyNewsSource(const NewsSourceBase::Data &))); nsDlg.setup(m_modifyItem->data(), true); nsDlg.exec(); } @@ -484,7 +484,7 @@ void KNewsTickerConfig::slotRemoveNewsSource() void KNewsTickerConfig::slotRemoveFilter() { - QListViewItem *item=m_child->lvFilters->selectedItem(); + TQListViewItem *item=m_child->lvFilters->selectedItem(); if(!item) return; removeFilter(item); @@ -496,7 +496,7 @@ void KNewsTickerConfig::slotNewsSourceSelectionChanged() m_child->bModifyNewsSource->setEnabled(m_child->lvNewsSources->selectedItems().count() == 1); } -void KNewsTickerConfig::slotFilterSelectionChanged(QListViewItem *item) +void KNewsTickerConfig::slotFilterSelectionChanged(TQListViewItem *item) { for (int i = 0; i < m_child->comboFilterAction->count(); i++) if (m_child->comboFilterAction->text(i) == item->text(0)) { @@ -521,36 +521,36 @@ void KNewsTickerConfig::slotFilterSelectionChanged(QListViewItem *item) m_child->bRemoveFilter->setEnabled(item); } -void KNewsTickerConfig::slotFilterActionChanged(const QString &action) +void KNewsTickerConfig::slotFilterActionChanged(const TQString &action) { - QListViewItem *item = m_child->lvFilters->selectedItem(); + TQListViewItem *item = m_child->lvFilters->selectedItem(); if (item) { item->setText(0, action); } } -void KNewsTickerConfig::slotFilterNewsSourceChanged(const QString &newsSource) +void KNewsTickerConfig::slotFilterNewsSourceChanged(const TQString &newsSource) { - QListViewItem *item = m_child->lvFilters->selectedItem(); + TQListViewItem *item = m_child->lvFilters->selectedItem(); if (item) { item->setText(2, newsSource); } } -void KNewsTickerConfig::slotFilterConditionChanged(const QString &condition) +void KNewsTickerConfig::slotFilterConditionChanged(const TQString &condition) { - QListViewItem *item = m_child->lvFilters->selectedItem(); + TQListViewItem *item = m_child->lvFilters->selectedItem(); if (item) { item->setText(4, condition); } } -void KNewsTickerConfig::slotFilterExpressionChanged(const QString &expression) +void KNewsTickerConfig::slotFilterExpressionChanged(const TQString &expression) { - QListViewItem *item = m_child->lvFilters->selectedItem(); + TQListViewItem *item = m_child->lvFilters->selectedItem(); if (item) { item->setText(5, expression); @@ -563,7 +563,7 @@ void KNewsTickerConfig::getNewsIcon(NewsSourceItem *item, const KURL &url) m_newsIconMgr->getIcon(url); } -void KNewsTickerConfig::slotGotNewsIcon(const KURL &url, const QPixmap &pixmap) +void KNewsTickerConfig::slotGotNewsIcon(const KURL &url, const TQPixmap &pixmap) { if (m_itemIconMap.find(url.url()) == m_itemIconMap.end()) { kdDebug(5005) << "Got unknown icon for URL " << url << endl; diff --git a/knewsticker/knewstickerconfig.h b/knewsticker/knewstickerconfig.h index ec475236..1280413d 100644 --- a/knewsticker/knewstickerconfig.h +++ b/knewsticker/knewstickerconfig.h @@ -17,9 +17,9 @@ #include -#include -#include -#include +#include +#include +#include class KNewsTickerConfig; class KNewsTickerConfigWidget; @@ -30,7 +30,7 @@ class ConfigAccess; class CategoryItem : public QListViewItem { public: - CategoryItem(QListView *, const QString &); + CategoryItem(TQListView *, const TQString &); void setOpen(bool); }; @@ -42,12 +42,12 @@ class NewsSourceItem : public QCheckListItem NewsSourceBase::Data data() const; void setData(const NewsSourceBase::Data &); - void setIcon(const QPixmap &); + void setIcon(const TQPixmap &); - QListViewItem *parentItem() { return QCheckListItem::parent(); } + TQListViewItem *parentItem() { return TQCheckListItem::parent(); } private: - QString m_icon; + TQString m_icon; bool m_isProgram; NewsSourceBase::Subject m_subject; CategoryItem *m_parent; @@ -59,7 +59,7 @@ class KNewsTickerConfig : public KDialogBase Q_OBJECT friend class NewsSourceItem; public: - KNewsTickerConfig(ConfigAccess *, QWidget * = 0, const char * = 0); + KNewsTickerConfig(ConfigAccess *, TQWidget * = 0, const char * = 0); void load(); void save(); @@ -67,17 +67,17 @@ class KNewsTickerConfig : public KDialogBase protected: void addNewsSource(const NewsSourceBase::Data &, bool = false); - void modifyNewsSource(QListViewItem *); + void modifyNewsSource(TQListViewItem *); void removeNewsSource(); void addFilter(const ArticleFilter &); - void removeFilter(QListViewItem *); - void resizeEvent(QResizeEvent *); + void removeFilter(TQListViewItem *); + void resizeEvent(TQResizeEvent *); void openModifyDialog(); - bool eventFilter(QObject *o, QEvent *e); + bool eventFilter(TQObject *o, TQEvent *e); void getNewsIcon(NewsSourceItem *, const KURL &); protected slots: - void slotNewsSourceContextMenu(KListView *, QListViewItem *, const QPoint &); + void slotNewsSourceContextMenu(KListView *, TQListViewItem *, const TQPoint &); void slotChooseFont(); void slotAddNewsSource(); void slotAddFilter(); @@ -86,25 +86,25 @@ class KNewsTickerConfig : public KDialogBase void slotRemoveFilter(); void slotModifyNewsSource(); void slotModifyNewsSource(const NewsSourceBase::Data &); - void slotModifyNewsSource(QListViewItem *, const QPoint &, int); + void slotModifyNewsSource(TQListViewItem *, const TQPoint &, int); void slotNewsSourceSelectionChanged(); - void slotFilterSelectionChanged(QListViewItem *); - void slotFilterActionChanged(const QString &); - void slotFilterNewsSourceChanged(const QString &); - void slotFilterConditionChanged(const QString &); - void slotFilterExpressionChanged(const QString &); + void slotFilterSelectionChanged(TQListViewItem *); + void slotFilterActionChanged(const TQString &); + void slotFilterNewsSourceChanged(const TQString &); + void slotFilterConditionChanged(const TQString &); + void slotFilterExpressionChanged(const TQString &); virtual void slotOk(); private slots: - void slotGotNewsIcon(const KURL &, const QPixmap &); + void slotGotNewsIcon(const KURL &, const TQPixmap &); private: ConfigAccess *m_cfg; KNewsTickerConfigWidget *m_child; - QFont m_font; + TQFont m_font; NewsSourceItem *m_modifyItem; NewsIconMgr *m_newsIconMgr; - QMap m_itemIconMap; + TQMap m_itemIconMap; }; #endif // KCMNEWSTICKER_H diff --git a/knewsticker/knewstickerstub/knewstickerstub.cpp b/knewsticker/knewstickerstub/knewstickerstub.cpp index 7f5960a4..ac4ddeeb 100644 --- a/knewsticker/knewstickerstub/knewstickerstub.cpp +++ b/knewsticker/knewstickerstub/knewstickerstub.cpp @@ -49,14 +49,14 @@ int main(int argc, char **argv) DCOPClient *dcopClient = app.dcopClient(); dcopClient->attach(); - KConfig cfg(QString::fromLatin1("knewsticker_panelappletrc"), false, false); + KConfig cfg(TQString::fromLatin1("knewsticker_panelappletrc"), false, false); ConfigAccess configFrontend(&cfg); if (args->isSet("addrdf")) { - QStringList newsSources = configFrontend.newsSources(); + TQStringList newsSources = configFrontend.newsSources(); // TODO: Use the "Suggest" functionality from addnewssourcedlgimpl.cpp here. - QString name = i18n("Unknown"); + TQString name = i18n("Unknown"); if (newsSources.contains(name)) for (unsigned int i = 0; ; i++) if (!newsSources.contains(i18n("Unknown %1").arg(i))) { @@ -66,11 +66,11 @@ int main(int argc, char **argv) newsSources += name; - QString sourceFile = QString(args->getOption("addrdf")); + TQString sourceFile = TQString(args->getOption("addrdf")); configFrontend.setNewsSource(NewsSourceBase::Data(name, sourceFile)); configFrontend.setNewsSources(newsSources); - QByteArray data; + TQByteArray data; dcopClient->send("knewsticker", "KNewsTicker", "reparseConfig()", data); } diff --git a/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.cpp b/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.cpp index 93bc71cc..14ca80d0 100644 --- a/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.cpp +++ b/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.cpp @@ -25,15 +25,15 @@ #include #include -#include -#include +#include +#include using namespace RSS; class ArticleListBoxItem : public QListBoxText { public: - ArticleListBoxItem( QListBox *listbox, const Article &article ); + ArticleListBoxItem( TQListBox *listbox, const Article &article ); const Article &article() const { return m_article; } @@ -41,8 +41,8 @@ class ArticleListBoxItem : public QListBoxText Article m_article; }; -ArticleListBoxItem::ArticleListBoxItem( QListBox *listbox, const Article &article ) - : QListBoxText( listbox ), +ArticleListBoxItem::ArticleListBoxItem( TQListBox *listbox, const Article &article ) + : TQListBoxText( listbox ), m_article( article ) { setText( article.title() ); @@ -52,18 +52,18 @@ KntSrcFilePropsDlg::KntSrcFilePropsDlg(KPropertiesDialog *props) : KPropsDlgPlugin(props) { m_child = new KntSrcFilePropsDlgWidget(properties->addVBoxPage(i18n("News Resource"))); - connect(m_child->urlName, SIGNAL(leftClickedURL(const QString &)), - SLOT(slotOpenURL(const QString &))); - connect(m_child->lbArticles, SIGNAL(executed(QListBoxItem *)), - SLOT(slotClickedArticle(QListBoxItem *))); + connect(m_child->urlName, TQT_SIGNAL(leftClickedURL(const TQString &)), + TQT_SLOT(slotOpenURL(const TQString &))); + connect(m_child->lbArticles, TQT_SIGNAL(executed(TQListBoxItem *)), + TQT_SLOT(slotClickedArticle(TQListBoxItem *))); Loader *loader = Loader::create(); - connect(loader, SIGNAL(loadingComplete(Loader *, Document, Status)), - SLOT(slotConstructUI(Loader *, Document, Status))); + connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)), + TQT_SLOT(slotConstructUI(Loader *, Document, Status))); loader->loadFrom(props->item()->url(), new FileRetriever); - connect(NewsIconMgr::self(), SIGNAL(gotIcon(const KURL &, const QPixmap &)), - SLOT(slotGotIcon(const KURL &, const QPixmap &))); + connect(NewsIconMgr::self(), TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)), + TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &))); m_child->show(); } @@ -74,7 +74,7 @@ void KntSrcFilePropsDlg::slotConstructUI(Loader *, Document doc, Status status) return; KURL iconURL = doc.link(); - iconURL.setEncodedPathAndQuery(QString::fromLatin1("/favicon.ico")); + iconURL.setEncodedPathAndQuery(TQString::fromLatin1("/favicon.ico")); NewsIconMgr::self()->getIcon(iconURL); m_child->urlName->setText(doc.title()); @@ -88,31 +88,31 @@ void KntSrcFilePropsDlg::slotConstructUI(Loader *, Document doc, Status status) new ArticleListBoxItem(m_child->lbArticles, *it); } -void KntSrcFilePropsDlg::slotOpenURL(const QString &url) +void KntSrcFilePropsDlg::slotOpenURL(const TQString &url) { kapp->invokeBrowser(url); } -void KntSrcFilePropsDlg::slotGotIcon(const KURL &, const QPixmap &pixmap) +void KntSrcFilePropsDlg::slotGotIcon(const KURL &, const TQPixmap &pixmap) { m_child->pixmapIcon->setPixmap(pixmap); } -void KntSrcFilePropsDlg::slotClickedArticle(QListBoxItem *item) +void KntSrcFilePropsDlg::slotClickedArticle(TQListBoxItem *item) { ArticleListBoxItem *articleItem = static_cast(item); slotOpenURL(articleItem->article().link().url()); } -QObject *KntSrcFilePropsFactory::createObject(QObject *parent, const char *, - const char *classname, const QStringList &) +TQObject *KntSrcFilePropsFactory::createObject(TQObject *parent, const char *, + const char *classname, const TQStringList &) { - if (QString::fromLatin1(classname) == "KPropsDlgPlugin") + if (TQString::fromLatin1(classname) == "KPropsDlgPlugin") { if (!parent->inherits("KPropertiesDialog")) return 0L; - QObject *obj = new KntSrcFilePropsDlg(static_cast(parent)); + TQObject *obj = new KntSrcFilePropsDlg(static_cast(parent)); return obj; } return 0L; diff --git a/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.h b/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.h index 8fe1be58..0d41682e 100644 --- a/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.h +++ b/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.h @@ -33,8 +33,8 @@ class KntSrcFilePropsFactory : public KLibFactory Q_OBJECT public: - virtual QObject *createObject(QObject * = 0, const char * = 0, - const char * = "QObject", const QStringList & = QStringList()); + virtual TQObject *createObject(TQObject * = 0, const char * = 0, + const char * = "TQObject", const TQStringList & = TQStringList()); }; class KntSrcFilePropsDlg : public KPropsDlgPlugin @@ -45,10 +45,10 @@ class KntSrcFilePropsDlg : public KPropsDlgPlugin KntSrcFilePropsDlg(KPropertiesDialog *); protected slots: - void slotOpenURL(const QString &); + void slotOpenURL(const TQString &); void slotConstructUI(Loader *loader, Document doc, Status status); - void slotGotIcon(const KURL &, const QPixmap &); - void slotClickedArticle(QListBoxItem *); + void slotGotIcon(const KURL &, const TQPixmap &); + void slotClickedArticle(TQListBoxItem *); private: KntSrcFilePropsDlgWidget *m_child; diff --git a/knewsticker/newsscroller.cpp b/knewsticker/newsscroller.cpp index 9d11f19e..060b7cd9 100644 --- a/knewsticker/newsscroller.cpp +++ b/knewsticker/newsscroller.cpp @@ -11,9 +11,9 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include @@ -46,11 +46,11 @@ public: int width() { return pixmap()->width(); } int height() { return pixmap()->height(); } - QPixmap *pixmap(bool highlighted = false, bool underlineHighlighted = true) + TQPixmap *pixmap(bool highlighted = false, bool underlineHighlighted = true) { - QPixmap *result = highlighted ? m_highlighted : m_normal; + TQPixmap *result = highlighted ? m_highlighted : m_normal; if (!result) { - const QFontMetrics &metrics = m_scroller->fontMetrics(); + const TQFontMetrics &metrics = m_scroller->fontMetrics(); int w, h; if (m_scroller->m_cfg->showIcons()) { @@ -62,13 +62,13 @@ public: } if (ConfigAccess::rotated(static_cast(m_scroller->m_cfg->scrollingDirection()))) - result = new QPixmap(h, w); + result = new TQPixmap(h, w); else - result = new QPixmap(w, h); + result = new TQPixmap(w, h); result->fill(m_scroller->m_cfg->backgroundColor()); - QPainter p(result); - QFont f = m_scroller->font(); + TQPainter p(result); + TQFont f = m_scroller->font(); if (highlighted) f.setUnderline(underlineHighlighted); @@ -124,14 +124,14 @@ public: private: NewsScroller *m_scroller; Article::Ptr m_article; - QPixmap *m_normal; - QPixmap *m_highlighted; + TQPixmap *m_normal; + TQPixmap *m_highlighted; }; -NewsScroller::NewsScroller(QWidget *parent, ConfigAccess *cfg, const char *name) - : QFrame(parent, name, WNoAutoErase), +NewsScroller::NewsScroller(TQWidget *parent, ConfigAccess *cfg, const char *name) + : TQFrame(parent, name, WNoAutoErase), m_cfg(cfg), - m_scrollTimer(new QTimer(this)), + m_scrollTimer(new TQTimer(this)), m_activeHeadline(0), m_mouseDrag(false), m_totalStepping(0.0) @@ -143,21 +143,21 @@ NewsScroller::NewsScroller(QWidget *parent, ConfigAccess *cfg, const char *name) m_headlines.setAutoDelete(true); - connect(m_scrollTimer, SIGNAL(timeout()), SLOT(slotTimeout())); + connect(m_scrollTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout())); setAcceptDrops(true); reset(); } -QSize NewsScroller::sizeHint() const +TQSize NewsScroller::sizeHint() const { - return QSize(fontMetrics().width(QString::fromLatin1("X")) * 20, fontMetrics().height() * 2); + return TQSize(fontMetrics().width(TQString::fromLatin1("X")) * 20, fontMetrics().height() * 2); } -QSizePolicy NewsScroller::sizePolicy() const +TQSizePolicy NewsScroller::sizePolicy() const { - return QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + return TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); } void NewsScroller::clear() @@ -166,30 +166,30 @@ void NewsScroller::clear() reset(); } -void NewsScroller::dragEnterEvent(QDragEnterEvent* event) +void NewsScroller::dragEnterEvent(TQDragEnterEvent* event) { - event->accept(QTextDrag::canDecode(event)); + event->accept(TQTextDrag::canDecode(event)); } -void NewsScroller::dropEvent(QDropEvent* event) +void NewsScroller::dropEvent(TQDropEvent* event) { - QString newSourceUrl; - if ( QTextDrag::decode(event, newSourceUrl) ) { + TQString newSourceUrl; + if ( TQTextDrag::decode(event, newSourceUrl) ) { // // This is just for http://www.webreference.com/services/news/ - newSourceUrl = newSourceUrl.replace(QRegExp( - QString::fromLatin1("^view-source:http%3A//")), - QString::fromLatin1("http://")); + newSourceUrl = newSourceUrl.replace(TQRegExp( + TQString::fromLatin1("^view-source:http%3A//")), + TQString::fromLatin1("http://")); // newSourceUrl = newSourceUrl.stripWhiteSpace(); if (!isHeadline(newSourceUrl) && KMessageBox::questionYesNo(this, i18n("

    Do you really want to add '%1' to" " the list of news sources?

    ") - .arg(newSourceUrl), QString::null, i18n("Add"), KStdGuiItem::cancel()) == KMessageBox::Yes) { - KConfig cfg(QString::fromLatin1("knewsticker_panelappletrc"), false, false); + .arg(newSourceUrl), TQString::null, i18n("Add"), KStdGuiItem::cancel()) == KMessageBox::Yes) { + KConfig cfg(TQString::fromLatin1("knewsticker_panelappletrc"), false, false); ConfigAccess configFrontend(&cfg); - QStringList newsSources = configFrontend.newsSources(); + TQStringList newsSources = configFrontend.newsSources(); - QString name = i18n("Unknown"); + TQString name = i18n("Unknown"); if (newsSources.contains(name)) for (unsigned int i = 0; ; i++) if (!newsSources.contains(i18n("Unknown %1").arg(i))) { @@ -201,13 +201,13 @@ void NewsScroller::dropEvent(QDropEvent* event) configFrontend.setNewsSource(NewsSourceBase::Data(name, newSourceUrl)); configFrontend.setNewsSources(newsSources); - QByteArray data; + TQByteArray data; kapp->dcopClient()->send("knewsticker", "KNewsTicker", "reparseConfig()", data); } } } -bool NewsScroller::isHeadline(const QString &location) const +bool NewsScroller::isHeadline(const TQString &location) const { for (Headline *h = m_headlines.first(); h; h = m_headlines.next()) if (h->article()->address() == location) @@ -254,7 +254,7 @@ void NewsScroller::scroll(int distance, bool interpret_directions) m_offset = m_offset + m_separator.height() - scrollHeight(); } - QPoint pt = mapFromGlobal(QCursor::pos()); + TQPoint pt = mapFromGlobal(TQCursor::pos()); if (contentsRect().contains(pt)) updateActive(pt); @@ -262,15 +262,15 @@ void NewsScroller::scroll(int distance, bool interpret_directions) update(); } -void NewsScroller::enterEvent(QEvent *) +void NewsScroller::enterEvent(TQEvent *) { if (m_cfg->slowedScrolling() && m_cfg->scrollingSpeed() > 1) m_scrollTimer->changeInterval(speedAsInterval(m_cfg->scrollingSpeed() / 2)); } -void NewsScroller::mousePressEvent(QMouseEvent *e) +void NewsScroller::mousePressEvent(TQMouseEvent *e) { - if (e->button() == QMouseEvent::LeftButton || e->button() == QMouseEvent::MidButton) { + if (e->button() == TQMouseEvent::LeftButton || e->button() == TQMouseEvent::MidButton) { m_dragPos = e->pos(); if (m_activeHeadline) @@ -278,16 +278,16 @@ void NewsScroller::mousePressEvent(QMouseEvent *e) } } -void NewsScroller::mouseReleaseEvent(QMouseEvent *e) +void NewsScroller::mouseReleaseEvent(TQMouseEvent *e) { - if ((e->button() == QMouseEvent::LeftButton || e->button() == QMouseEvent::MidButton) + if ((e->button() == TQMouseEvent::LeftButton || e->button() == TQMouseEvent::MidButton) && m_activeHeadline && m_activeHeadline->article()->headline() == m_tempHeadline && !m_mouseDrag) { m_activeHeadline->article()->open(); - m_tempHeadline = QString::null; + m_tempHeadline = TQString::null; } - if (e->button() == QMouseEvent::RightButton) + if (e->button() == TQMouseEvent::RightButton) emit(contextMenu()); if (m_mouseDrag) { @@ -297,7 +297,7 @@ void NewsScroller::mouseReleaseEvent(QMouseEvent *e) } } -void NewsScroller::mouseMoveEvent(QMouseEvent *e) +void NewsScroller::mouseMoveEvent(TQMouseEvent *e) { // Are we in a drag phase? if (!m_mouseDrag) { @@ -307,7 +307,7 @@ void NewsScroller::mouseMoveEvent(QMouseEvent *e) dragDistance = QABS(e->x() - m_dragPos.x()); else dragDistance = QABS(e->y() - m_dragPos.y()); - m_mouseDrag = (e->state() & QMouseEvent::LeftButton != 0) && + m_mouseDrag = (e->state() & TQMouseEvent::LeftButton != 0) && dragDistance >= KGlobal::config()->readNumEntry("StartDragDist", KApplication::startDragDistance()); if (m_mouseDrag) // Stop the scroller if we just started a drag. m_scrollTimer->stop(); @@ -327,7 +327,7 @@ void NewsScroller::mouseMoveEvent(QMouseEvent *e) if (createDrag && m_activeHeadline) { KURL::List url; url.append(m_activeHeadline->article()->address()); - QDragObject *drag = new KURLDrag(url, this); + TQDragObject *drag = new KURLDrag(url, this); drag->setPixmap(m_activeHeadline->article()->newsSource()->icon()); drag->drag(); m_mouseDrag = false; @@ -340,20 +340,20 @@ void NewsScroller::mouseMoveEvent(QMouseEvent *e) update(); } -void NewsScroller::wheelEvent(QWheelEvent *e) +void NewsScroller::wheelEvent(TQWheelEvent *e) { // ### This 11 - m_cfg->mouseWheelSpeed() could be eliminated by swapping - // the labels of the QSlider. :] + // the labels of the TQSlider. :] int distance = qRound(QABS(e->delta()) / (11 - m_cfg->mouseWheelSpeed())); int direction = e->delta() > 0 ? -1 : 1; for (int i = 0; i < distance; i++) scroll(direction); - QFrame::wheelEvent(e); + TQFrame::wheelEvent(e); } -void NewsScroller::leaveEvent(QEvent *) +void NewsScroller::leaveEvent(TQEvent *) { if (m_cfg->slowedScrolling() && m_cfg->scrollingSpeed() > 1) m_scrollTimer->changeInterval(speedAsInterval(m_cfg->scrollingSpeed())); @@ -364,13 +364,13 @@ void NewsScroller::leaveEvent(QEvent *) } } -void NewsScroller::drawContents(QPainter *p) +void NewsScroller::drawContents(TQPainter *p) { if (!scrollWidth() || // No news and no "No News Available": uninitialized m_headlines.isEmpty()) // Happens when we're currently fetching new news return; - QPixmap buffer(contentsRect().width(), contentsRect().height()); + TQPixmap buffer(contentsRect().width(), contentsRect().height()); buffer.fill(m_cfg->backgroundColor()); int pos = m_offset; @@ -393,7 +393,7 @@ void NewsScroller::drawContents(QPainter *p) // Now do the headlines themselves do { - QPtrListIterator it(m_headlines); + TQPtrListIterator it(m_headlines); for(; *it; ++it) { if (horizontal()) { if (pos + (*it)->width() >= 0) @@ -440,7 +440,7 @@ void NewsScroller::reset(bool bSeparatorOnly) if (m_cfg->scrollingSpeed()) m_scrollTimer->start(speedAsInterval(m_cfg->scrollingSpeed())); - QString sep = m_headlines.isEmpty() ? i18n(" +++ No News Available +++") : QString::fromLatin1(" +++ "); + TQString sep = m_headlines.isEmpty() ? i18n(" +++ No News Available +++") : TQString::fromLatin1(" +++ "); int w = fontMetrics().width(sep); int h = fontMetrics().height(); @@ -452,7 +452,7 @@ void NewsScroller::reset(bool bSeparatorOnly) m_separator.fill(m_cfg->backgroundColor()); - QPainter p(&m_separator); + TQPainter p(&m_separator); p.setFont(font()); p.setPen(m_cfg->foregroundColor()); @@ -469,7 +469,7 @@ void NewsScroller::reset(bool bSeparatorOnly) p.end(); if (!bSeparatorOnly) - for (QPtrListIterator it(m_headlines); *it; ++it) + for (TQPtrListIterator it(m_headlines); *it; ++it) (*it)->reset(); switch (m_cfg->scrollingDirection()) { @@ -495,7 +495,7 @@ int NewsScroller::scrollWidth() const { int result = (m_headlines.count() + 1) * m_separator.width(); - for (QPtrListIterator it(m_headlines); *it; ++it) + for (TQPtrListIterator it(m_headlines); *it; ++it) result += (*it)->width(); return result; @@ -505,13 +505,13 @@ int NewsScroller::scrollHeight() const { int result = (m_headlines.count() + 1) * m_separator.height(); - for (QPtrListIterator it(m_headlines); *it; ++it) + for (TQPtrListIterator it(m_headlines); *it; ++it) result += (*it)->height(); return result; } -bool NewsScroller::updateActive(const QPoint &pt) +bool NewsScroller::updateActive(const TQPoint &pt) { int pos = m_offset; @@ -525,19 +525,19 @@ bool NewsScroller::updateActive(const QPoint &pt) pos -= scrollHeight() - m_separator.height(); do { - QPtrListIterator it(m_headlines); + TQPtrListIterator it(m_headlines); for (; (headline = *it); ++it) { - QRect rect; + TQRect rect; if (horizontal()) { pos += m_separator.width(); - rect.moveTopLeft(QPoint(pos, (contentsRect().height() - (*it)->height()) / 2)); + rect.moveTopLeft(TQPoint(pos, (contentsRect().height() - (*it)->height()) / 2)); pos += (*it)->width(); } else { pos += m_separator.height(); - rect.moveTopLeft(QPoint((contentsRect().width() - (*it)->width()) / 2, pos)); + rect.moveTopLeft(TQPoint((contentsRect().width() - (*it)->width()) / 2, pos)); pos += (*it)->height(); } - rect.setSize(QSize((*it)->width(), (*it)->height())); + rect.setSize(TQSize((*it)->width(), (*it)->height())); if (m_mouseDrag) if (horizontal()) { diff --git a/knewsticker/newsscroller.h b/knewsticker/newsscroller.h index efe0c3c2..3d37dc8d 100644 --- a/knewsticker/newsscroller.h +++ b/knewsticker/newsscroller.h @@ -19,24 +19,24 @@ #include "configaccess.h" #include "newsengine.h" -#include -#include -#include +#include +#include +#include class QTimer; class Headline; template class QPtrList; -typedef QPtrList HeadlineList; +typedef TQPtrList HeadlineList; class NewsScroller : public QFrame { Q_OBJECT public: - NewsScroller(QWidget *, ConfigAccess *, const char * = 0); + NewsScroller(TQWidget *, ConfigAccess *, const char * = 0); - virtual QSize sizeHint() const; - virtual QSizePolicy sizePolicy() const; + virtual TQSize sizeHint() const; + virtual TQSizePolicy sizePolicy() const; // Convenience stuff. Somehow ugly, no? inline bool horizontal() const @@ -63,15 +63,15 @@ class NewsScroller : public QFrame void contextMenu(); protected: - virtual void enterEvent(QEvent *); - virtual void mousePressEvent(QMouseEvent *); - virtual void mouseReleaseEvent(QMouseEvent *); - virtual void mouseMoveEvent(QMouseEvent *); - virtual void wheelEvent(QWheelEvent *); - virtual void leaveEvent(QEvent *); - virtual void drawContents(QPainter *); - virtual void dragEnterEvent( QDragEnterEvent *); - virtual void dropEvent(QDropEvent *); + virtual void enterEvent(TQEvent *); + virtual void mousePressEvent(TQMouseEvent *); + virtual void mouseReleaseEvent(TQMouseEvent *); + virtual void mouseMoveEvent(TQMouseEvent *); + virtual void wheelEvent(TQWheelEvent *); + virtual void leaveEvent(TQEvent *); + virtual void drawContents(TQPainter *); + virtual void dragEnterEvent( TQDragEnterEvent *); + virtual void dropEvent(TQDropEvent *); protected slots: void scroll(int = 1, bool = true); @@ -80,21 +80,21 @@ class NewsScroller : public QFrame private: int scrollWidth() const; int scrollHeight() const; - bool updateActive(const QPoint &); - bool isHeadline(const QString &) const; + bool updateActive(const TQPoint &); + bool isHeadline(const TQString &) const; int speedAsInterval( int speed ); private: friend class Headline; ConfigAccess *m_cfg; - QTimer *m_scrollTimer; + TQTimer *m_scrollTimer; mutable HeadlineList m_headlines; Headline *m_activeHeadline; - QPixmap m_separator; + TQPixmap m_separator; int m_offset; - QPoint m_dragPos; + TQPoint m_dragPos; bool m_mouseDrag; - QString m_tempHeadline; + TQString m_tempHeadline; float m_totalStepping; float m_stepping; }; diff --git a/knewsticker/newssourcedlgimpl.cpp b/knewsticker/newssourcedlgimpl.cpp index 2cf39511..03704155 100644 --- a/knewsticker/newssourcedlgimpl.cpp +++ b/knewsticker/newssourcedlgimpl.cpp @@ -19,44 +19,44 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -SuggestProgressDlg::SuggestProgressDlg(const KURL &url, QWidget *parent, const char *name) +SuggestProgressDlg::SuggestProgressDlg(const KURL &url, TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Downloading Data"), Cancel, Cancel), m_gotSourceFile(false), m_gotIcon(false) { - QVBox *mainWidget = makeVBoxMainWidget(); + TQVBox *mainWidget = makeVBoxMainWidget(); - new QLabel(i18n("Please wait while KNewsTicker is downloading some " + new TQLabel(i18n("Please wait while KNewsTicker is downloading some " "data necessary to suggest reasonable values.
    " "
    " "This will not take longer than one minute.
    " ), mainWidget); - m_progressBar = new QProgressBar(60, mainWidget); + m_progressBar = new TQProgressBar(60, mainWidget); m_progressBar->setPercentageVisible(false); - m_timeoutTimer = new QTimer(this); - connect(m_timeoutTimer, SIGNAL(timeout()), this, SLOT(slotTimeoutTick())); + m_timeoutTimer = new TQTimer(this); + connect(m_timeoutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeoutTick())); m_timeoutTimer->start(1000); m_xmlSrc = new XMLNewsSource; - connect(m_xmlSrc, SIGNAL(loadComplete(XMLNewsSource *, bool)), - this, SLOT(slotLoadComplete(XMLNewsSource *, bool))); + connect(m_xmlSrc, TQT_SIGNAL(loadComplete(XMLNewsSource *, bool)), + this, TQT_SLOT(slotLoadComplete(XMLNewsSource *, bool))); m_xmlSrc->loadFrom(url); - connect(NewsIconMgr::self(), SIGNAL(gotIcon(const KURL &, const QPixmap &)), - this, SLOT(slotGotIcon(const KURL &, const QPixmap &))); + connect(NewsIconMgr::self(), TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)), + this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &))); KURL u = url; if (url.isLocalFile()) - u = QString::null; + u = TQString::null; else - u.setEncodedPathAndQuery(QString::fromLatin1("/favicon.ico")); + u.setEncodedPathAndQuery(TQString::fromLatin1("/favicon.ico")); NewsIconMgr::self()->getIcon(u); } @@ -82,25 +82,25 @@ void SuggestProgressDlg::slotLoadComplete(XMLNewsSource *, bool succeeded) m_succeeded = succeeded; if (m_gotIcon) - done(succeeded ? QDialog::Accepted : QDialog::Rejected); + done(succeeded ? TQDialog::Accepted : TQDialog::Rejected); } -void SuggestProgressDlg::slotGotIcon(const KURL &url, const QPixmap &pixmap) +void SuggestProgressDlg::slotGotIcon(const KURL &url, const TQPixmap &pixmap) { m_gotIcon = true; m_icon = pixmap; m_iconURL = url; if (m_gotIcon) - done(m_succeeded ? QDialog::Accepted : QDialog::Rejected); + done(m_succeeded ? TQDialog::Accepted : TQDialog::Rejected); } -NewsSourceDlgImpl::NewsSourceDlgImpl(QWidget *parent, const char *name, bool modal, WFlags fl) +NewsSourceDlgImpl::NewsSourceDlgImpl(TQWidget *parent, const char *name, bool modal, WFlags fl) : NewsSourceDlg(parent, name, modal, fl), m_modified(false) { - connect(NewsIconMgr::self(), SIGNAL(gotIcon(const KURL &, const QPixmap &)), - this, SLOT(slotGotIcon(const KURL &, const QPixmap &))); + connect(NewsIconMgr::self(), TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)), + this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &))); for (unsigned int i = 0; i < DEFAULT_SUBJECTS; i++) comboCategory->insertItem( @@ -138,12 +138,12 @@ void NewsSourceDlgImpl::slotOkClicked() KURL iconURL ( leIcon->text() ); if (iconURL.protocol().isEmpty()) - if (iconURL.host().startsWith(QString::fromLatin1("ftp."))) - iconURL.setProtocol(QString::fromLatin1("ftp")); - else if (iconURL.host().startsWith(QString::fromLatin1("www."))) - iconURL.setProtocol(QString::fromLatin1("http")); + if (iconURL.host().startsWith(TQString::fromLatin1("ftp."))) + iconURL.setProtocol(TQString::fromLatin1("ftp")); + else if (iconURL.host().startsWith(TQString::fromLatin1("www."))) + iconURL.setProtocol(TQString::fromLatin1("http")); else - iconURL.setProtocol(QString::fromLatin1("file")); + iconURL.setProtocol(TQString::fromLatin1("file")); NewsSourceBase::Data nsd(leName->text(), url.url(), iconURL.url(), subject, sbMaxArticles->value(), true, cbProgram->isChecked()); @@ -166,7 +166,7 @@ void NewsSourceDlgImpl::slotSuggestClicked() return; SuggestProgressDlg dlg(url, this); - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { pixmapIcon->setPixmap(dlg.icon()); if (NewsIconMgr::self()->isStdIcon(dlg.icon())) leIcon->clear(); @@ -191,8 +191,8 @@ void NewsSourceDlgImpl::setup(const NewsSourceBase::Data &nsd, bool modify) comboCategory->setCurrentItem(nsd.subject); sbMaxArticles->setValue(nsd.maxArticles); KURL iconURL ( nsd.icon ); - if (iconURL.protocol() == QString::fromLatin1("file")) - iconURL.setProtocol(QString::null); + if (iconURL.protocol() == TQString::fromLatin1("file")) + iconURL.setProtocol(TQString::null); leIcon->setText(iconURL.url()); NewsIconMgr::self()->getIcon(iconURL); if (modify == true) { @@ -205,10 +205,10 @@ KURL NewsSourceDlgImpl::polishedURL(const KURL &url) const KURL newURL = url; if (url.protocol().isEmpty()) - if (url.url().startsWith(QString::fromLatin1("ftp"))) - newURL = QString::fromLatin1("ftp://") + url.url(); + if (url.url().startsWith(TQString::fromLatin1("ftp"))) + newURL = TQString::fromLatin1("ftp://") + url.url(); else - newURL = QString::fromLatin1("http://") + url.url(); + newURL = TQString::fromLatin1("http://") + url.url(); return newURL; } @@ -222,7 +222,7 @@ bool NewsSourceDlgImpl::validateURL(const KURL &url) return false; } - if (!url.isValid() || !url.hasPath() || url.encodedPathAndQuery() == QString::fromLatin1("/")) { + if (!url.isValid() || !url.hasPath() || url.encodedPathAndQuery() == TQString::fromLatin1("/")) { KMessageBox::error(this, i18n("KNewsTicker needs a valid RDF or RSS file to" " suggest sensible values. The specified source file is invalid."), i18n("Invalid Source File")); @@ -232,7 +232,7 @@ bool NewsSourceDlgImpl::validateURL(const KURL &url) return true; } -void NewsSourceDlgImpl::slotGotIcon(const KURL &, const QPixmap &pixmap) +void NewsSourceDlgImpl::slotGotIcon(const KURL &, const TQPixmap &pixmap) { pixmapIcon->setPixmap(pixmap); } diff --git a/knewsticker/newssourcedlgimpl.h b/knewsticker/newssourcedlgimpl.h index 71bb6964..86ed7c24 100644 --- a/knewsticker/newssourcedlgimpl.h +++ b/knewsticker/newssourcedlgimpl.h @@ -16,7 +16,7 @@ #include #include -#include +#include class XMLNewsSource; class NewsIconMgr; @@ -28,27 +28,27 @@ class SuggestProgressDlg : public KDialogBase Q_OBJECT public: - SuggestProgressDlg(const KURL &url, QWidget *parent, const char *name = 0); + SuggestProgressDlg(const KURL &url, TQWidget *parent, const char *name = 0); virtual ~SuggestProgressDlg(); XMLNewsSource *xmlSrc() { return m_xmlSrc; } - QPixmap icon() const { return m_icon; } + TQPixmap icon() const { return m_icon; } const KURL &iconURL() const { return m_iconURL; } private slots: void slotTimeoutTick(); void slotLoadComplete(XMLNewsSource *, bool); - void slotGotIcon(const KURL &, const QPixmap &); + void slotGotIcon(const KURL &, const TQPixmap &); private: bool m_gotSourceFile; bool m_gotIcon; XMLNewsSource *m_xmlSrc; bool m_succeeded; - QPixmap m_icon; + TQPixmap m_icon; KURL m_iconURL; - QProgressBar *m_progressBar; - QTimer *m_timeoutTimer; + TQProgressBar *m_progressBar; + TQTimer *m_timeoutTimer; }; class NewsSourceDlgImpl : public NewsSourceDlg @@ -56,7 +56,7 @@ class NewsSourceDlgImpl : public NewsSourceDlg Q_OBJECT public: - NewsSourceDlgImpl(QWidget * = 0, const char * = 0, bool = FALSE, WFlags = 0); + NewsSourceDlgImpl(TQWidget * = 0, const char * = 0, bool = FALSE, WFlags = 0); void setup(const NewsSourceBase::Data &, bool); @@ -73,7 +73,7 @@ class NewsSourceDlgImpl : public NewsSourceDlg bool validateURL(const KURL &); private slots: - void slotGotIcon(const KURL &, const QPixmap &); + void slotGotIcon(const KURL &, const TQPixmap &); private: bool m_modified; diff --git a/kopete/kopete/addaccountwizard/addaccountwizard.cpp b/kopete/kopete/addaccountwizard/addaccountwizard.cpp index 5518c536..1c42acf2 100644 --- a/kopete/kopete/addaccountwizard/addaccountwizard.cpp +++ b/kopete/kopete/addaccountwizard/addaccountwizard.cpp @@ -18,8 +18,8 @@ #include "addaccountwizard.h" -#include -#include +#include +#include #include #include @@ -37,7 +37,7 @@ #include "kopeteprotocol.h" #include "kopetepluginmanager.h" -AddAccountWizard::AddAccountWizard( QWidget *parent, const char *name, bool modal, bool firstRun ) +AddAccountWizard::AddAccountWizard( TQWidget *parent, const char *name, bool modal, bool firstRun ) : KWizard(parent, name, modal, WDestructiveClose), m_accountPage(0), @@ -58,10 +58,10 @@ AddAccountWizard::AddAccountWizard( QWidget *parent, const char *name, bool moda setFinishEnabled(m_finish, true); // add the available messanger services to the dialogs list - QValueList protocols = Kopete::PluginManager::self()->availablePlugins("Protocols"); - for (QValueList::Iterator it = protocols.begin(); it != protocols.end(); ++it) + TQValueList protocols = Kopete::PluginManager::self()->availablePlugins("Protocols"); + for (TQValueList::Iterator it = protocols.begin(); it != protocols.end(); ++it) { - QListViewItem *pluginItem = new QListViewItem(m_selectService->protocolListView); + TQListViewItem *pluginItem = new TQListViewItem(m_selectService->protocolListView); pluginItem->setPixmap(0, SmallIcon((*it)->icon())); pluginItem->setText(0, (*it)->name()); pluginItem->setText(1, (*it)->comment()); @@ -70,7 +70,7 @@ AddAccountWizard::AddAccountWizard( QWidget *parent, const char *name, bool moda } // focus the ListView and select the first item - QListView &protocol_list = *m_selectService->protocolListView; + TQListView &protocol_list = *m_selectService->protocolListView; protocol_list.setFocus(); if (protocol_list.childCount() > 0) { @@ -78,21 +78,21 @@ AddAccountWizard::AddAccountWizard( QWidget *parent, const char *name, bool moda } // hook up the user input - connect(m_selectService->protocolListView, SIGNAL(clicked(QListViewItem *)), - this, SLOT(slotProtocolListClicked(QListViewItem *))); - connect(m_selectService->protocolListView, SIGNAL(selectionChanged(QListViewItem *)), - this, SLOT( slotProtocolListClicked(QListViewItem *))); - connect(m_selectService->protocolListView, SIGNAL(doubleClicked(QListViewItem *)), - this, SLOT(slotProtocolListDoubleClicked(QListViewItem *))); + connect(m_selectService->protocolListView, TQT_SIGNAL(clicked(TQListViewItem *)), + this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *))); + connect(m_selectService->protocolListView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT( slotProtocolListClicked(TQListViewItem *))); + connect(m_selectService->protocolListView, TQT_SIGNAL(doubleClicked(TQListViewItem *)), + this, TQT_SLOT(slotProtocolListDoubleClicked(TQListViewItem *))); } -void AddAccountWizard::slotProtocolListClicked( QListViewItem * ) +void AddAccountWizard::slotProtocolListClicked( TQListViewItem * ) { // Make sure a protocol is selected before allowing the user to continue setNextEnabled(m_selectService, m_selectService->protocolListView->selectedItem() != 0); } -void AddAccountWizard::slotProtocolListDoubleClicked( QListViewItem *lvi ) +void AddAccountWizard::slotProtocolListDoubleClicked( TQListViewItem *lvi ) { // proceed to the next wizard page if we double click a protocol next(); @@ -100,7 +100,7 @@ void AddAccountWizard::slotProtocolListDoubleClicked( QListViewItem *lvi ) void AddAccountWizard::back() { - if (currentPage() == dynamic_cast(m_accountPage)) + if (currentPage() == dynamic_cast(m_accountPage)) { // Deletes the accountPage, KWizard does not like deleting pages // using different pointers, it only seems to watch its own pointer @@ -122,7 +122,7 @@ void AddAccountWizard::next() if ( currentPage() == m_selectService && ( m_selectService->protocolListView->selectedItem() ) ) { - QListViewItem *lvi = m_selectService->protocolListView->selectedItem(); + TQListViewItem *lvi = m_selectService->protocolListView->selectedItem(); m_proto = dynamic_cast(Kopete::PluginManager::self()->loadPlugin(m_protocolItems[lvi]->pluginName())); if (!m_proto) @@ -142,10 +142,10 @@ void AddAccountWizard::next() return; } - insertPage(dynamic_cast(m_accountPage), i18n("Step Two: Account Information"), indexOf(m_finish)); + insertPage(dynamic_cast(m_accountPage), i18n("Step Two: Account Information"), indexOf(m_finish)); KWizard::next(); } - else if (currentPage() == dynamic_cast(m_accountPage)) + else if (currentPage() == dynamic_cast(m_accountPage)) { // check the data of the page is valid if (!m_accountPage->validateData()) @@ -153,7 +153,7 @@ void AddAccountWizard::next() return; } - QColor col = Kopete::AccountManager::self()->guessColor(m_proto); + TQColor col = Kopete::AccountManager::self()->guessColor(m_proto); m_finish->mColorButton->setColor(col); m_finish->mUseColor->setChecked(col.isValid()); @@ -186,7 +186,7 @@ void AddAccountWizard::accept() } // Make sure the protocol is correctly enabled. This is not really needed, but still good - const QString PROTO_NAME = m_proto->pluginId().remove("Protocol").lower(); + const TQString PROTO_NAME = m_proto->pluginId().remove("Protocol").lower(); Kopete::PluginManager::self()->setPluginEnabled(PROTO_NAME , true); // setup the custom colour @@ -209,7 +209,7 @@ void AddAccountWizard::reject() // if we have a protocol plugin loaded and its not being used, unload it if (m_proto && Kopete::AccountManager::self()->accounts(m_proto).isEmpty()) { - const QString PROTO_NAME = m_proto->pluginId().remove("Protocol").lower(); + const TQString PROTO_NAME = m_proto->pluginId().remove("Protocol").lower(); Kopete::PluginManager::self()->unloadPlugin(PROTO_NAME); } diff --git a/kopete/kopete/addaccountwizard/addaccountwizard.h b/kopete/kopete/addaccountwizard/addaccountwizard.h index f4d204ec..3f8cccbf 100644 --- a/kopete/kopete/addaccountwizard/addaccountwizard.h +++ b/kopete/kopete/addaccountwizard/addaccountwizard.h @@ -19,7 +19,7 @@ #ifndef ADDACCOUNTWIZARD_H #define ADDACCOUNTWIZARD_H -#include +#include #include @@ -44,11 +44,11 @@ class AddAccountWizard : public KWizard Q_OBJECT public: - AddAccountWizard( QWidget *parent = 0, const char *name = 0 , bool modal = false, bool firstRun = false ); + AddAccountWizard( TQWidget *parent = 0, const char *name = 0 , bool modal = false, bool firstRun = false ); private slots: - void slotProtocolListClicked( QListViewItem *item ); - void slotProtocolListDoubleClicked( QListViewItem *lvi ); + void slotProtocolListClicked( TQListViewItem *item ); + void slotProtocolListDoubleClicked( TQListViewItem *lvi ); protected slots: virtual void back(); @@ -57,7 +57,7 @@ protected slots: virtual void reject(); private: - QMap m_protocolItems; + TQMap m_protocolItems; KopeteEditAccountWidget *m_accountPage; AddAccountWizardPage1 *m_selectService; AddAccountWizardPage2 *m_finish; diff --git a/kopete/kopete/addcontactwizard/addcontactwizard.cpp b/kopete/kopete/addcontactwizard/addcontactwizard.cpp index 9b1ca28e..7198d53c 100644 --- a/kopete/kopete/addcontactwizard/addcontactwizard.cpp +++ b/kopete/kopete/addcontactwizard/addcontactwizard.cpp @@ -42,9 +42,9 @@ // Finish // true -#include -#include -#include +#include +#include +#include #include #include #include @@ -71,10 +71,10 @@ #include "kopeteaccount.h" #include "kopetegroup.h" -AddContactWizard::AddContactWizard( QWidget *parent, const char *name ) +AddContactWizard::AddContactWizard( TQWidget *parent, const char *name ) : AddContactWizard_Base( parent, name ) { - //QVBox *kabcPageVbox = new QVBox(this->page(1)); + //TQVBox *kabcPageVbox = new TQVBox(this->page(1)); m_addressbookSelectorWidget = new Kopete::UI::AddressBookSelectorWidget(this->page(1)); selectAddresseeLayout->addWidget(m_addressbookSelectorWidget); @@ -82,21 +82,21 @@ AddContactWizard::AddContactWizard( QWidget *parent, const char *name ) Kopete::GroupList groups=Kopete::ContactList::self()->groups(); for( Kopete::Group *it = groups.first(); it; it = groups.next() ) { - QString groupname = it->displayName(); + TQString groupname = it->displayName(); if ( !groupname.isEmpty() ) - m_groupItems.insert(new QCheckListItem( groupList, groupname, QCheckListItem::CheckBox) , it ) ; + m_groupItems.insert(new TQCheckListItem( groupList, groupname, TQCheckListItem::CheckBox) , it ) ; } protocolListView->clear(); m_accountItems.clear(); // Populate the accounts list - QCheckListItem* accountLVI = 0; - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQCheckListItem* accountLVI = 0; + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *i=accounts.first() ; i; i=accounts.next() ) { - accountLVI= new QCheckListItem( protocolListView, i->accountLabel(), QCheckListItem::CheckBox); - accountLVI->setText(1,i->protocol()->displayName() + QString::fromLatin1(" ") ); + accountLVI= new TQCheckListItem( protocolListView, i->accountLabel(), TQCheckListItem::CheckBox); + accountLVI->setText(1,i->protocol()->displayName() + TQString::fromLatin1(" ") ); //FIXME - I'm not sure the column 1 is a right place for the colored icon -Olivier accountLVI->setPixmap( 1, i->accountIcon() ); m_accountItems.insert(accountLVI,i); @@ -115,17 +115,17 @@ AddContactWizard::AddContactWizard( QWidget *parent, const char *name ) setFinishEnabled( finis, true ); // Addressee validation connections - connect( chkAddressee, SIGNAL( toggled( bool ) ), - SLOT( slotCheckAddresseeChoice( bool ) ) ); - connect( m_addressbookSelectorWidget, SIGNAL(addresseeListClicked( QListViewItem * )), SLOT(slotAddresseeListClicked( QListViewItem * )) ); + connect( chkAddressee, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( slotCheckAddresseeChoice( bool ) ) ); + connect( m_addressbookSelectorWidget, TQT_SIGNAL(addresseeListClicked( TQListViewItem * )), TQT_SLOT(slotAddresseeListClicked( TQListViewItem * )) ); // Group manipulation connection - connect( addGroupButton, SIGNAL(clicked()) , SLOT(slotAddGroupClicked()) ); + connect( addGroupButton, TQT_SIGNAL(clicked()) , TQT_SLOT(slotAddGroupClicked()) ); // Account choice validation connections - connect( protocolListView, SIGNAL(clicked(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *))); - connect( protocolListView, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *))); - connect( protocolListView, SIGNAL(spacePressed(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *))); + connect( protocolListView, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *))); + connect( protocolListView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *))); + connect( protocolListView, TQT_SIGNAL(spacePressed(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *))); // read sticky settings KConfig *config = kapp->config(); @@ -147,7 +147,7 @@ void AddContactWizard::slotCheckAddresseeChoice( bool on ) setAppropriate( selectAddressee, on ); } -void AddContactWizard::slotAddresseeListClicked( QListViewItem */*addressee*/ ) +void AddContactWizard::slotAddresseeListClicked( TQListViewItem */*addressee*/ ) { // enable next if a valid addressee is selected bool selected = m_addressbookSelectorWidget->addresseeSelected(); @@ -159,22 +159,22 @@ void AddContactWizard::slotAddresseeListClicked( QListViewItem */*addressee*/ ) void AddContactWizard::slotAddGroupClicked() { - QString groupName = KInputDialog::getText( + TQString groupName = KInputDialog::getText( i18n( "New Group" ), i18n( "Please enter the name for the new group:" ) ); if ( !groupName.isNull() ) - ( new QCheckListItem( groupList, groupName, QCheckListItem::CheckBox ) )->setOn( true ); + ( new TQCheckListItem( groupList, groupName, TQCheckListItem::CheckBox ) )->setOn( true ); } -void AddContactWizard::slotProtocolListClicked( QListViewItem *) +void AddContactWizard::slotProtocolListClicked( TQListViewItem *) { // Just makes sure a protocol is selected before allowing the user to continue bool oneIsChecked = false; - for (QListViewItemIterator it(protocolListView); it.current(); ++it) + for (TQListViewItemIterator it(protocolListView); it.current(); ++it) { - QCheckListItem *check = dynamic_cast(it.current()); + TQCheckListItem *check = dynamic_cast(it.current()); if (check && check->isOn()) { oneIsChecked = true; @@ -197,9 +197,9 @@ void AddContactWizard::accept() // set the metacontact's groups bool topLevel = true; - for ( QListViewItemIterator it( groupList ); it.current(); ++it ) + for ( TQListViewItemIterator it( groupList ); it.current(); ++it ) { - QCheckListItem *check = dynamic_cast( it.current() ); + TQCheckListItem *check = dynamic_cast( it.current() ); if ( check && check->isOn() ) { if(m_groupItems.contains(check)) @@ -215,7 +215,7 @@ void AddContactWizard::accept() bool ok = protocolPages.isEmpty(); // get each protocol's contact - QMap ::Iterator it; + TQMap ::Iterator it; for ( it = protocolPages.begin(); it != protocolPages.end(); ++it ) ok = ok || it.data()->apply( it.key(), metaContact ); @@ -246,7 +246,7 @@ void AddContactWizard::accept() void AddContactWizard::reject() { - QWizard::reject(); + TQWizard::reject(); } void AddContactWizard::next() @@ -257,11 +257,11 @@ void AddContactWizard::next() if (currentPage() == selectService || (currentPage() == intro && !appropriate( selectService ))) { - QStringList usedAccounts; + TQStringList usedAccounts; // We don't keep track of this pointer because it gets deleted when the wizard does (which is what we want) - for (QListViewItemIterator it(protocolListView); it.current(); ++it) + for (TQListViewItemIterator it(protocolListView); it.current(); ++it) { - QCheckListItem *item = dynamic_cast(it.current()); + TQCheckListItem *item = dynamic_cast(it.current()); if (item && item->isOn()) { Kopete::Account *i=m_accountItems[item]; @@ -278,8 +278,8 @@ void AddContactWizard::next() if (!addPage) continue; - connect(addPage, SIGNAL(dataValid( AddContactPage *, bool )), - this, SLOT( slotDataValid( AddContactPage *, bool ))); + connect(addPage, TQT_SIGNAL(dataValid( AddContactPage *, bool )), + this, TQT_SLOT( slotDataValid( AddContactPage *, bool ))); addPage->show(); insertPage( addPage, i18n( "The user has to select the contact to add to the given account name", @@ -289,7 +289,7 @@ void AddContactWizard::next() } //remove pages that were eventualy added previusely, and needs to be removed if the user pressed back. - QMap ::Iterator it; + TQMap ::Iterator it; for ( it = protocolPages.begin(); it != protocolPages.end(); ++it ) { Kopete::Account *i=it.key(); @@ -299,7 +299,7 @@ void AddContactWizard::next() protocolPages.remove(it); } } - QWizard::next(); + TQWizard::next(); return; } @@ -316,15 +316,15 @@ void AddContactWizard::next() return; } - QWizard::next(); + TQWizard::next(); } -void AddContactWizard::showPage( QWidget *page ) +void AddContactWizard::showPage( TQWidget *page ) { if ( page == intro ) setNextEnabled( page, true); // make sure the first page's Next is always enabled - QWizard::showPage( page ); + TQWizard::showPage( page ); if ( page == finis ) finishButton()->setFocus(); diff --git a/kopete/kopete/addcontactwizard/addcontactwizard.h b/kopete/kopete/addcontactwizard/addcontactwizard.h index 427bb1e3..646353a3 100644 --- a/kopete/kopete/addcontactwizard/addcontactwizard.h +++ b/kopete/kopete/addcontactwizard/addcontactwizard.h @@ -20,9 +20,9 @@ #ifndef ADDCONTACTWIZARD_H #define ADDCONTACTWIZARD_H -#include -#include -#include +#include +#include +#include #include #include @@ -52,30 +52,30 @@ class AddContactWizard : public AddContactWizard_Base Q_OBJECT public: - AddContactWizard( QWidget *parent = 0, const char *name = 0 ); + AddContactWizard( TQWidget *parent = 0, const char *name = 0 ); ~AddContactWizard(); - virtual void showPage( QWidget *page ); + virtual void showPage( TQWidget *page ); private: //Kopete::Protocol *currentProtocol; //AddContactPage *currentDataWidget; - QMap protocolPages; - QMap m_accountItems; - QMap m_groupItems; + TQMap protocolPages; + TQMap m_accountItems; + TQMap m_groupItems; Kopete::UI::AddressBookSelectorWidget *m_addressbookSelectorWidget; public slots: virtual void accept(); virtual void reject(); - void slotProtocolListClicked( QListViewItem * ); + void slotProtocolListClicked( TQListViewItem * ); void slotAddGroupClicked(); protected slots: virtual void next(); void slotCheckAddresseeChoice( bool on ); - void slotAddresseeListClicked( QListViewItem *addressee ); + void slotAddresseeListClicked( TQListViewItem *addressee ); void slotDataValid( AddContactPage *onPage, bool bOn); }; diff --git a/kopete/kopete/addcontactwizard/fastaddcontactwizard.cpp b/kopete/kopete/addcontactwizard/fastaddcontactwizard.cpp index 43c499d6..48e1b159 100644 --- a/kopete/kopete/addcontactwizard/fastaddcontactwizard.cpp +++ b/kopete/kopete/addcontactwizard/fastaddcontactwizard.cpp @@ -17,7 +17,7 @@ * * ************************************************************************* */ -#include +#include #include #include @@ -30,18 +30,18 @@ #include "fastaddcontactwizard.h" -FastAddContactWizard::FastAddContactWizard( QWidget *parent, const char *name ) +FastAddContactWizard::FastAddContactWizard( TQWidget *parent, const char *name ) : FastAddContactWizard_Base( parent, name ) { m_accountItems.clear(); // Populate the accounts list - QListViewItem* accountLVI = 0L; - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQListViewItem* accountLVI = 0L; + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *i=accounts.first() ; i; i=accounts.next() ) { - accountLVI= new QListViewItem( protocolListView, i->accountLabel() ); - accountLVI->setText(1,i->protocol()->displayName() + QString::fromLatin1(" ") ); + accountLVI= new TQListViewItem( protocolListView, i->accountLabel() ); + accountLVI->setText(1,i->protocol()->displayName() + TQString::fromLatin1(" ") ); accountLVI->setPixmap( 1, SmallIcon( i->protocol()->pluginIcon() ) ); m_accountItems.insert(accountLVI,i); } @@ -50,9 +50,9 @@ FastAddContactWizard::FastAddContactWizard( QWidget *parent, const char *name ) protocolListView->setCurrentItem( accountLVI ); // Account choice validation connections - connect( protocolListView, SIGNAL(clicked(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *))); - connect( protocolListView, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *))); - connect( protocolListView, SIGNAL(spacePressed(QListViewItem *)), this, SLOT(slotProtocolListClicked(QListViewItem *))); + connect( protocolListView, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *))); + connect( protocolListView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *))); + connect( protocolListView, TQT_SIGNAL(spacePressed(TQListViewItem *)), this, TQT_SLOT(slotProtocolListClicked(TQListViewItem *))); setNextEnabled( selectService, false ); setFinishEnabled(finis, true); @@ -62,7 +62,7 @@ FastAddContactWizard::~FastAddContactWizard() { } -void FastAddContactWizard::slotProtocolListClicked( QListViewItem *account) +void FastAddContactWizard::slotProtocolListClicked( TQListViewItem *account) { setNextEnabled( selectService, account? account->isSelected() : false ); } @@ -74,25 +74,25 @@ void FastAddContactWizard::next() // the chosen protocol if ( currentPage() == selectService ) { - QMap ::Iterator it; + TQMap ::Iterator it; for ( it = protocolPages.begin(); it != protocolPages.end(); ++it ) { delete it.data(); } protocolPages.clear(); - QListViewItem* item = protocolListView->selectedItem(); + TQListViewItem* item = protocolListView->selectedItem(); AddContactPage *addPage = m_accountItems[item]->protocol()->createAddContactWidget(this, m_accountItems[item] ); if (addPage) { - QString title = i18n( "The account name is prepended here", + TQString title = i18n( "The account name is prepended here", "%1 contact information" ) .arg( item->text(0) ); addPage->show(); insertPage( addPage, title, indexOf( finis ) ); protocolPages.insert( m_accountItems[item] , addPage ); } - QWizard::next(); + TQWizard::next(); return; } @@ -105,7 +105,7 @@ void FastAddContactWizard::next() return; } - QWizard::next(); + TQWizard::next(); } void FastAddContactWizard::accept() @@ -117,7 +117,7 @@ void FastAddContactWizard::accept() bool ok = protocolPages.isEmpty(); // get each protocol's contact - QMap ::Iterator it; + TQMap ::Iterator it; for ( it = protocolPages.begin(); it != protocolPages.end(); ++it ) ok |= it.data()->apply( it.key(), metaContact ); diff --git a/kopete/kopete/addcontactwizard/fastaddcontactwizard.h b/kopete/kopete/addcontactwizard/fastaddcontactwizard.h index ac8db23d..496a282f 100644 --- a/kopete/kopete/addcontactwizard/fastaddcontactwizard.h +++ b/kopete/kopete/addcontactwizard/fastaddcontactwizard.h @@ -23,9 +23,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -49,14 +49,14 @@ class FastAddContactWizard : public FastAddContactWizard_Base { Q_OBJECT public: - FastAddContactWizard( QWidget *parent = 0, const char *name = 0 ); + FastAddContactWizard( TQWidget *parent = 0, const char *name = 0 ); ~FastAddContactWizard(); private: - QMap protocolPages; - QMap m_accountItems; + TQMap protocolPages; + TQMap m_accountItems; public slots: virtual void accept(); - void slotProtocolListClicked( QListViewItem * ); + void slotProtocolListClicked( TQListViewItem * ); protected slots: virtual void next(); }; diff --git a/kopete/kopete/chatwindow/chatmemberslistwidget.cpp b/kopete/kopete/chatwindow/chatmemberslistwidget.cpp index 16e37991..b215bb66 100644 --- a/kopete/kopete/chatwindow/chatmemberslistwidget.cpp +++ b/kopete/kopete/chatwindow/chatmemberslistwidget.cpp @@ -32,8 +32,8 @@ #include #include -#include -#include +#include +#include //BEGIN ChatMembersListWidget::ToolTip @@ -41,7 +41,7 @@ class ChatMembersListWidget::ToolTip : public QToolTip { public: ToolTip( KListView *parent ) - : QToolTip( parent->viewport() ), m_listView ( parent ) + : TQToolTip( parent->viewport() ), m_listView ( parent ) { } @@ -50,11 +50,11 @@ public: remove( m_listView->viewport() ); } - void maybeTip( const QPoint &pos ) + void maybeTip( const TQPoint &pos ) { - if( QListViewItem *item = m_listView->itemAt( pos ) ) + if( TQListViewItem *item = m_listView->itemAt( pos ) ) { - QRect itemRect = m_listView->itemRect( item ); + TQRect itemRect = m_listView->itemRect( item ); if( itemRect.contains( pos ) ) tip( itemRect, static_cast( item )->contact()->toolTip() ); } @@ -72,21 +72,21 @@ private: ChatMembersListWidget::ContactItem::ContactItem( ChatMembersListWidget *parent, Kopete::Contact *contact ) : KListViewItem( parent ), m_contact( contact ) { - QString nick = m_contact->property(Kopete::Global::Properties::self()->nickName().key()).value().toString(); + TQString nick = m_contact->property(Kopete::Global::Properties::self()->nickName().key()).value().toString(); if ( nick.isEmpty() ) nick = m_contact->contactId(); setText( 0, nick ); setDragEnabled(true); - connect( m_contact, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; + connect( m_contact, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; setStatus( parent->session()->contactOnlineStatus(m_contact) ); reposition(); } void ChatMembersListWidget::ContactItem::slotPropertyChanged( Kopete::Contact*, - const QString &key, const QVariant&, const QVariant &newValue ) + const TQString &key, const TQVariant&, const TQVariant &newValue ) { if ( key == Kopete::Global::Properties::self()->nickName().key() ) { @@ -109,9 +109,9 @@ void ChatMembersListWidget::ContactItem::reposition() // In particular, this makes adding N items O(N^2) not O(N^2 log N). Kopete::ChatSession *session = static_cast( listView() )->session(); int ourWeight = session->contactOnlineStatus(m_contact).weight(); - QListViewItem *after = 0; + TQListViewItem *after = 0; - for ( QListViewItem *it = KListViewItem::listView()->firstChild(); it; it = it->nextSibling() ) + for ( TQListViewItem *it = KListViewItem::listView()->firstChild(); it; it = it->nextSibling() ) { ChatMembersListWidget::ContactItem *item = static_cast(it); int theirWeight = session->contactOnlineStatus(item->m_contact).weight(); @@ -133,7 +133,7 @@ void ChatMembersListWidget::ContactItem::reposition() //BEGIN ChatMembersListWidget -ChatMembersListWidget::ChatMembersListWidget( Kopete::ChatSession *session, QWidget *parent, const char *name ) +ChatMembersListWidget::ChatMembersListWidget( Kopete::ChatSession *session, TQWidget *parent, const char *name ) : KListView( parent, name ), m_session( session ) { // use our own custom tooltips @@ -142,7 +142,7 @@ ChatMembersListWidget::ChatMembersListWidget( Kopete::ChatSession *session, QWid // set up display: no header setAllColumnsShowFocus( true ); - addColumn( QString::null, -1 ); + addColumn( TQString::null, -1 ); header()->setStretchEnabled( true, 0 ); header()->hide(); @@ -151,32 +151,32 @@ ChatMembersListWidget::ChatMembersListWidget( Kopete::ChatSession *session, QWid // add chat members slotContactAdded( session->myself() ); - for ( QPtrListIterator it( session->members() ); it.current(); ++it ) + for ( TQPtrListIterator it( session->members() ); it.current(); ++it ) slotContactAdded( *it ); - connect( this, SIGNAL( contextMenu( KListView*, QListViewItem *, const QPoint &) ), - SLOT( slotContextMenu(KListView*, QListViewItem *, const QPoint & ) ) ); - connect( this, SIGNAL( executed( QListViewItem* ) ), - SLOT( slotExecute( QListViewItem * ) ) ); - - connect( session, SIGNAL( contactAdded(const Kopete::Contact*, bool) ), - this, SLOT( slotContactAdded(const Kopete::Contact*) ) ); - connect( session, SIGNAL( contactRemoved(const Kopete::Contact*, const QString&, Kopete::Message::MessageFormat, bool) ), - this, SLOT( slotContactRemoved(const Kopete::Contact*) ) ); - connect( session, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ), - this, SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & ) ) ); + connect( this, TQT_SIGNAL( contextMenu( KListView*, TQListViewItem *, const TQPoint &) ), + TQT_SLOT( slotContextMenu(KListView*, TQListViewItem *, const TQPoint & ) ) ); + connect( this, TQT_SIGNAL( executed( TQListViewItem* ) ), + TQT_SLOT( slotExecute( TQListViewItem * ) ) ); + + connect( session, TQT_SIGNAL( contactAdded(const Kopete::Contact*, bool) ), + this, TQT_SLOT( slotContactAdded(const Kopete::Contact*) ) ); + connect( session, TQT_SIGNAL( contactRemoved(const Kopete::Contact*, const TQString&, Kopete::Message::MessageFormat, bool) ), + this, TQT_SLOT( slotContactRemoved(const Kopete::Contact*) ) ); + connect( session, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ), + this, TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & ) ) ); } ChatMembersListWidget::~ChatMembersListWidget() { } -void ChatMembersListWidget::slotContextMenu( KListView*, QListViewItem *item, const QPoint &point ) +void ChatMembersListWidget::slotContextMenu( KListView*, TQListViewItem *item, const TQPoint &point ) { if ( ContactItem *contactItem = dynamic_cast(item) ) { KPopupMenu *p = contactItem->contact()->popupMenu( session() ); - connect( p, SIGNAL( aboutToHide() ), p, SLOT( deleteLater() ) ); + connect( p, TQT_SIGNAL( aboutToHide() ), p, TQT_SLOT( deleteLater() ) ); p->popup( point ); } } @@ -203,7 +203,7 @@ void ChatMembersListWidget::slotContactStatusChanged( Kopete::Contact *contact, m_members[contact]->setStatus( status ); } -void ChatMembersListWidget::slotExecute( QListViewItem *item ) +void ChatMembersListWidget::slotExecute( TQListViewItem *item ) { if ( ContactItem *contactItem = dynamic_cast(item ) ) { @@ -216,9 +216,9 @@ void ChatMembersListWidget::slotExecute( QListViewItem *item ) } } -QDragObject *ChatMembersListWidget::dragObject() +TQDragObject *ChatMembersListWidget::dragObject() { - QListViewItem *currentLVI = currentItem(); + TQListViewItem *currentLVI = currentItem(); if( !currentLVI ) return 0L; @@ -228,22 +228,22 @@ QDragObject *ChatMembersListWidget::dragObject() Kopete::Contact *c = lvi->contact(); KMultipleDrag *drag = new KMultipleDrag( this ); - drag->addDragObject( new QStoredDrag("application/x-qlistviewitem", 0L ) ); + drag->addDragObject( new TQStoredDrag("application/x-qlistviewitem", 0L ) ); - QStoredDrag *d = new QStoredDrag("kopete/x-contact", 0L ); - d->setEncodedData( QString( c->protocol()->pluginId()+QChar( 0xE000 )+c->account()->accountId()+QChar( 0xE000 )+ c->contactId() ).utf8() ); + TQStoredDrag *d = new TQStoredDrag("kopete/x-contact", 0L ); + d->setEncodedData( TQString( c->protocol()->pluginId()+TQChar( 0xE000 )+c->account()->accountId()+TQChar( 0xE000 )+ c->contactId() ).utf8() ); drag->addDragObject( d ); KABC::Addressee address = KABC::StdAddressBook::self()->findByUid(c->metaContact()->metaContactId()); if( !address.isEmpty() ) { - drag->addDragObject( new QTextDrag( address.fullEmail(), 0L ) ); + drag->addDragObject( new TQTextDrag( address.fullEmail(), 0L ) ); KABC::VCardConverter converter; - QString vcard = converter.createVCard( address ); + TQString vcard = converter.createVCard( address ); if( !vcard.isNull() ) { - QStoredDrag *vcardDrag = new QStoredDrag("text/x-vcard", 0L ); + TQStoredDrag *vcardDrag = new TQStoredDrag("text/x-vcard", 0L ); vcardDrag->setEncodedData( vcard.utf8() ); drag->addDragObject( vcardDrag ); } diff --git a/kopete/kopete/chatwindow/chatmemberslistwidget.h b/kopete/kopete/chatwindow/chatmemberslistwidget.h index 71084554..c8af44a4 100644 --- a/kopete/kopete/chatwindow/chatmemberslistwidget.h +++ b/kopete/kopete/chatwindow/chatmemberslistwidget.h @@ -20,7 +20,7 @@ #include -#include +#include namespace Kopete { @@ -36,7 +36,7 @@ class ChatMembersListWidget : public KListView { Q_OBJECT public: - ChatMembersListWidget( Kopete::ChatSession *session, QWidget *parent, const char *name = 0 ); + ChatMembersListWidget( Kopete::ChatSession *session, TQWidget *parent, const char *name = 0 ); virtual ~ChatMembersListWidget(); Kopete::ChatSession *session() { return m_session; } @@ -49,18 +49,18 @@ protected: /** * Start a drag operation * @return a KMultipleDrag containing: - * 1) A QStoredDrag of type "application/x-qlistviewitem", + * 1) A TQStoredDrag of type "application/x-qlistviewitem", * 2) If the contact is associated with a KABC entry, - * i) a QTextDrag containing their email address, and + * i) a TQTextDrag containing their email address, and * ii) their vCard representation. */ - virtual QDragObject *dragObject(); + virtual TQDragObject *dragObject(); private slots: /** * Show the context menu for @p item at @p point */ - void slotContextMenu( KListView*, QListViewItem *item, const QPoint &point ); + void slotContextMenu( KListView*, TQListViewItem *item, const TQPoint &point ); /** * Called when a contact is added to the chat session. @@ -87,15 +87,15 @@ private slots: * Called when a contact is clicked. * @param item The list view item representing the clicked contact */ - void slotExecute( QListViewItem *contact ); + void slotExecute( TQListViewItem *contact ); private: Kopete::ChatSession *m_session; - QMap m_members; + TQMap m_members; ToolTip *m_toolTip; }; -class ChatMembersListWidget::ContactItem : public QObject, public KListViewItem +class ChatMembersListWidget::ContactItem : public TQObject, public KListViewItem { Q_OBJECT public: @@ -103,7 +103,7 @@ public: Kopete::Contact *contact() const { return m_contact; } private slots: - void slotPropertyChanged( Kopete::Contact *contact, const QString &key, const QVariant &oldValue, const QVariant &newValue ); + void slotPropertyChanged( Kopete::Contact *contact, const TQString &key, const TQVariant &oldValue, const TQVariant &newValue ); private: friend class ChatMembersListWidget; diff --git a/kopete/kopete/chatwindow/chatmessagepart.cpp b/kopete/kopete/chatwindow/chatmessagepart.cpp index 3cf70b8a..379ead44 100644 --- a/kopete/kopete/chatwindow/chatmessagepart.cpp +++ b/kopete/kopete/chatwindow/chatmessagepart.cpp @@ -26,15 +26,15 @@ #include // Qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // KHTML::DOM includes #include @@ -43,7 +43,7 @@ #include #include #include -#include +#include // KDE includes @@ -155,32 +155,32 @@ public: Kopete::Message::MessageType latestType; // Yep I know it will take memory, but I don't have choice // to enable on-the-fly style changing. - QValueList allMessages; + TQValueList allMessages; }; class ChatMessagePart::ToolTip : public QToolTip { public: - ToolTip( ChatMessagePart *c ) : QToolTip( c->view()->viewport() ) + ToolTip( ChatMessagePart *c ) : TQToolTip( c->view()->viewport() ) { m_chat = c; } - void maybeTip( const QPoint &/*p*/ ) + void maybeTip( const TQPoint &/*p*/ ) { // FIXME: it's wrong to look for the node under the mouse - this makes too many // assumptions about how tooltips work. but there is no nodeAtPoint. DOM::Node node = m_chat->nodeUnderMouse(); Kopete::Contact *contact = m_chat->contactFromNode( node ); - QString toolTipText; + TQString toolTipText; if(node.isNull()) return; // this tooltip is attached to the viewport widget, so translate the node's rect // into its coordinates. - QRect rect = node.getRect(); - rect = QRect( m_chat->view()->contentsToViewport( rect.topLeft() ), + TQRect rect = node.getRect(); + rect = TQRect( m_chat->view()->contentsToViewport( rect.topLeft() ), m_chat->view()->contentsToViewport( rect.bottomRight() ) ); if( contact ) @@ -213,7 +213,7 @@ private: ChatMessagePart *m_chat; }; -ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, QWidget *parent, const char *name) +ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, TQWidget *parent, const char *name) : KHTMLPart( parent, name ), d( new Private ) { d->manager = mgr; @@ -231,40 +231,40 @@ ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, QWidget *parent, con // Write the template to KHTMLPart writeTemplate(); - view()->setFocusPolicy( QWidget::NoFocus ); + view()->setFocusPolicy( TQWidget::NoFocus ); d->tt=new ToolTip( this ); // It is not possible to drag and drop on our widget view()->setAcceptDrops(false); - connect( KopetePrefs::prefs(), SIGNAL(messageAppearanceChanged()), - this, SLOT( slotAppearanceChanged() ) ); - connect( KopetePrefs::prefs(), SIGNAL(windowAppearanceChanged()), - this, SLOT( slotRefreshView() ) ); - connect( KopetePrefs::prefs(), SIGNAL(styleChanged(const QString &)), - this, SLOT( setStyle(const QString &) ) ); - connect( KopetePrefs::prefs(), SIGNAL(styleVariantChanged(const QString &)), - this, SLOT( setStyleVariant(const QString &) ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL(messageAppearanceChanged()), + this, TQT_SLOT( slotAppearanceChanged() ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL(windowAppearanceChanged()), + this, TQT_SLOT( slotRefreshView() ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL(styleChanged(const TQString &)), + this, TQT_SLOT( setStyle(const TQString &) ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL(styleVariantChanged(const TQString &)), + this, TQT_SLOT( setStyleVariant(const TQString &) ) ); // Refresh the style if the display name change. - connect( d->manager, SIGNAL(displayNameChanged()), this, SLOT(slotUpdateHeaderDisplayName()) ); - connect( d->manager, SIGNAL(photoChanged()), this, SLOT(slotUpdateHeaderPhoto()) ); + connect( d->manager, TQT_SIGNAL(displayNameChanged()), this, TQT_SLOT(slotUpdateHeaderDisplayName()) ); + connect( d->manager, TQT_SIGNAL(photoChanged()), this, TQT_SLOT(slotUpdateHeaderPhoto()) ); - connect ( browserExtension(), SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), - this, SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) ); + connect ( browserExtension(), TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), + this, TQT_SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) ); - connect( this, SIGNAL(popupMenu(const QString &, const QPoint &)), - this, SLOT(slotRightClick(const QString &, const QPoint &)) ); - connect( view(), SIGNAL(contentsMoving(int,int)), - this, SLOT(slotScrollingTo(int,int)) ); + connect( this, TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)), + this, TQT_SLOT(slotRightClick(const TQString &, const TQPoint &)) ); + connect( view(), TQT_SIGNAL(contentsMoving(int,int)), + this, TQT_SLOT(slotScrollingTo(int,int)) ); //initActions - d->copyAction = KStdAction::copy( this, SLOT(copy()), actionCollection() ); - d->saveAction = KStdAction::saveAs( this, SLOT(save()), actionCollection() ); - d->printAction = KStdAction::print( this, SLOT(print()),actionCollection() ); - d->closeAction = KStdAction::close( this, SLOT(slotCloseView()),actionCollection() ); - d->importEmoticon = new KAction( i18n( "Import Emoticon"), QString::fromLatin1( "importemot" ), 0, this, SLOT( slotImportEmoticon() ), actionCollection() ); - d->copyURLAction = new KAction( i18n( "Copy Link Address" ), QString::fromLatin1( "editcopy" ), 0, this, SLOT( slotCopyURL() ), actionCollection() ); + d->copyAction = KStdAction::copy( this, TQT_SLOT(copy()), actionCollection() ); + d->saveAction = KStdAction::saveAs( this, TQT_SLOT(save()), actionCollection() ); + d->printAction = KStdAction::print( this, TQT_SLOT(print()),actionCollection() ); + d->closeAction = KStdAction::close( this, TQT_SLOT(slotCloseView()),actionCollection() ); + d->importEmoticon = new KAction( i18n( "Import Emoticon"), TQString::fromLatin1( "importemot" ), 0, this, TQT_SLOT( slotImportEmoticon() ), actionCollection() ); + d->copyURLAction = new KAction( i18n( "Copy Link Address" ), TQString::fromLatin1( "editcopy" ), 0, this, TQT_SLOT( slotCopyURL() ), actionCollection() ); // read formatting override flags readOverrides(); @@ -288,38 +288,38 @@ void ChatMessagePart::slotScrollingTo( int /*x*/, int y ) void ChatMessagePart::slotImportEmoticon() { - QString emoticonString = KInputDialog::getText( i18n("Import Emoticon"), + TQString emoticonString = KInputDialog::getText( i18n("Import Emoticon"), i18n("
    Insert the string for the emoticon
    separated by space if you want multiple strings
    ").arg( d->activeElement.getAttribute("src").string() ) ); if (emoticonString.isNull() ) return; - QString emo = d->activeElement.getAttribute("src").string(); - QString themeName = KopetePrefs::prefs()->iconTheme(); + TQString emo = d->activeElement.getAttribute("src").string(); + TQString themeName = KopetePrefs::prefs()->iconTheme(); KIO::copy(emo, KGlobal::dirs()->saveLocation( "emoticons", themeName, false )); - QFile *fp = new QFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml"); + TQFile *fp = new TQFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml"); - QDomDocument themeXml; + TQDomDocument themeXml; if(!fp->exists() || !fp->open( IO_ReadOnly ) || !themeXml.setContent(fp)) return; fp->close(); - QDomNode lc = themeXml.lastChild(); + TQDomNode lc = themeXml.lastChild(); if(lc.isNull()) return; - QDomElement emoticon = themeXml.createElement("emoticon"); - emoticon.setAttribute("file", QFileInfo(emo).baseName()); + TQDomElement emoticon = themeXml.createElement("emoticon"); + emoticon.setAttribute("file", TQFileInfo(emo).baseName()); lc.appendChild(emoticon); - QStringList splitted = QStringList::split(" ", emoticonString); - QStringList::const_iterator constIterator; + TQStringList splitted = TQStringList::split(" ", emoticonString); + TQStringList::const_iterator constIterator; for(constIterator = splitted.begin(); constIterator != splitted.end(); constIterator++) { - QDomElement emotext = themeXml.createElement("string"); - QDomText txt = themeXml.createTextNode((*constIterator).stripWhiteSpace()); + TQDomElement emotext = themeXml.createElement("string"); + TQDomText txt = themeXml.createTextNode((*constIterator).stripWhiteSpace()); emotext.appendChild(txt); emoticon.appendChild(emotext); } @@ -327,32 +327,32 @@ void ChatMessagePart::slotImportEmoticon() if(!fp->open( IO_WriteOnly )) return; - QTextStream emoStream(fp); + TQTextStream emoStream(fp); emoStream << themeXml.toString(4); fp->close(); - QTimer::singleShot( 1500, Kopete::Emoticons::self(), SLOT( reload() ) ); + TQTimer::singleShot( 1500, Kopete::Emoticons::self(), TQT_SLOT( reload() ) ); } void ChatMessagePart::save() { - KFileDialog dlg( QString::null, QString::fromLatin1( "text/html text/plain" ), view(), "fileSaveDialog", false ); + KFileDialog dlg( TQString::null, TQString::fromLatin1( "text/html text/plain" ), view(), "fileSaveDialog", false ); dlg.setCaption( i18n( "Save Conversation" ) ); dlg.setOperationMode( KFileDialog::Saving ); - if ( dlg.exec() != QDialog::Accepted ) + if ( dlg.exec() != TQDialog::Accepted ) return; KURL saveURL = dlg.selectedURL(); KTempFile tempFile; tempFile.setAutoDelete( true ); - QFile* file = tempFile.file(); + TQFile* file = tempFile.file(); - QTextStream stream ( file ); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream ( file ); + stream.setEncoding(TQTextStream::UnicodeUTF8); - if ( dlg.currentFilter() == QString::fromLatin1( "text/plain" ) ) + if ( dlg.currentFilter() == TQString::fromLatin1( "text/plain" ) ) { - QValueList::ConstIterator it, itEnd = d->allMessages.constEnd(); + TQValueList::ConstIterator it, itEnd = d->allMessages.constEnd(); for(it = d->allMessages.constBegin(); it != itEnd; ++it) { Kopete::Message tempMessage = *it; @@ -392,7 +392,7 @@ void ChatMessagePart::pageDown() void ChatMessagePart::slotOpenURLRequest(const KURL &url, const KParts::URLArgs &/*args*/) { kdDebug(14000) << k_funcinfo << "url=" << url.url() << endl; - if ( url.protocol() == QString::fromLatin1("kopetemessage") ) + if ( url.protocol() == TQString::fromLatin1("kopetemessage") ) { Kopete::Contact *contact = d->manager->account()->contacts()[ url.host() ]; if ( contact ) @@ -413,14 +413,14 @@ void ChatMessagePart::readOverrides() d->rtfOverride = KopetePrefs::prefs()->rtfOverride(); } -void ChatMessagePart::setStyle( const QString &stylePath ) +void ChatMessagePart::setStyle( const TQString &stylePath ) { // Create a new ChatWindowStyle d->currentChatStyle = ChatWindowStyleManager::self()->getStyleFromPool(stylePath); // Do the actual style switch // Wait for the event loop before switching the style - QTimer::singleShot( 0, this, SLOT(changeStyle()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(changeStyle()) ); } void ChatMessagePart::setStyle( ChatWindowStyle *style ) @@ -430,14 +430,14 @@ void ChatMessagePart::setStyle( ChatWindowStyle *style ) // Do the actual style switch // Wait for the event loop before switching the style - QTimer::singleShot( 0, this, SLOT(changeStyle()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(changeStyle()) ); } -void ChatMessagePart::setStyleVariant( const QString &variantPath ) +void ChatMessagePart::setStyleVariant( const TQString &variantPath ) { - DOM::HTMLElement variantNode = document().getElementById( QString::fromUtf8("mainStyle") ); + DOM::HTMLElement variantNode = document().getElementById( TQString::fromUtf8("mainStyle") ); if( !variantNode.isNull() ) - variantNode.setInnerText( QString("@import url(\"%1\");").arg(variantPath) ); + variantNode.setInnerText( TQString("@import url(\"%1\");").arg(variantPath) ); } void ChatMessagePart::slotAppearanceChanged() @@ -459,10 +459,10 @@ void ChatMessagePart::appendMessage( Kopete::Message &message, bool restoring ) message.setBody( message.parsedBody() , Kopete::Message::ParsedHTML ); #ifdef STYLE_TIMETEST - QTime beforeMessage = QTime::currentTime(); + TQTime beforeMessage = TQTime::currentTime(); #endif - QString formattedMessageHtml; + TQString formattedMessageHtml; bool isConsecutiveMessage = false; uint bufferLen = (uint)KopetePrefs::prefs()->chatViewBufferSize(); @@ -549,11 +549,11 @@ void ChatMessagePart::appendMessage( Kopete::Message &message, bool restoring ) // newMessageNode is common to both code path // FIXME: Find a better than to create a dummy span. - DOM::HTMLElement newMessageNode = document().createElement( QString::fromUtf8("span") ); + DOM::HTMLElement newMessageNode = document().createElement( TQString::fromUtf8("span") ); newMessageNode.setInnerHTML( formattedMessageHtml ); // Find the insert Node - DOM::HTMLElement insertNode = document().getElementById( QString::fromUtf8("insert") ); + DOM::HTMLElement insertNode = document().getElementById( TQString::fromUtf8("insert") ); if( isConsecutiveMessage && !insertNode.isNull() ) { @@ -593,16 +593,16 @@ void ChatMessagePart::appendMessage( Kopete::Message &message, bool restoring ) } if ( !d->scrollPressed ) - QTimer::singleShot( 1, this, SLOT( slotScrollView() ) ); + TQTimer::singleShot( 1, this, TQT_SLOT( slotScrollView() ) ); #ifdef STYLE_TIMETEST - kdDebug(14000) << "Message time: " << beforeMessage.msecsTo( QTime::currentTime()) << endl; + kdDebug(14000) << "Message time: " << beforeMessage.msecsTo( TQTime::currentTime()) << endl; #endif } void ChatMessagePart::slotRefreshView() { - DOM::HTMLElement kopeteNode = document().getElementById( QString::fromUtf8("KopeteStyle") ); + DOM::HTMLElement kopeteNode = document().getElementById( TQString::fromUtf8("KopeteStyle") ); if( !kopeteNode.isNull() ) kopeteNode.setInnerText( styleHTML() ); @@ -613,28 +613,28 @@ void ChatMessagePart::slotRefreshView() void ChatMessagePart::keepScrolledDown() { if ( !d->scrollPressed ) - QTimer::singleShot( 1, this, SLOT( slotScrollView() ) ); + TQTimer::singleShot( 1, this, TQT_SLOT( slotScrollView() ) ); } -const QString ChatMessagePart::styleHTML() const +const TQString ChatMessagePart::styleHTML() const { KopetePrefs *p = KopetePrefs::prefs(); int fontSize = 0; - QString fontSizeCss; - // Use correct font size unit, depending of how the QFont was build. + TQString fontSizeCss; + // Use correct font size unit, depending of how the TQFont was build. if( p->fontFace().pointSize() != -1 ) { fontSize = p->fontFace().pointSize(); - fontSizeCss = QString::fromUtf8("%1pt;").arg(fontSize); + fontSizeCss = TQString::fromUtf8("%1pt;").arg(fontSize); } else if( p->fontFace().pixelSize() != -1 ) { fontSize = p->fontFace().pixelSize(); - fontSizeCss = QString::fromUtf8("%1px;").arg(fontSize); + fontSizeCss = TQString::fromUtf8("%1px;").arg(fontSize); } - QString style = QString::fromLatin1( + TQString style = TQString::fromLatin1( "body{background-color:%1;font-family:%2;font-size:%3;color:%4}" "td{font-family:%5;font-size:%6;color:%7}" "a{color:%8}a.visited{color:%9}" @@ -682,15 +682,15 @@ Kopete::Contact *ChatMessagePart::contactFromNode( const DOM::Node &n ) const if ( element.hasAttribute( "contactid" ) ) { - QString contactId = element.getAttribute( "contactid" ).string(); - for ( QPtrListIterator it ( d->manager->members() ); it.current(); ++it ) + TQString contactId = element.getAttribute( "contactid" ).string(); + for ( TQPtrListIterator it ( d->manager->members() ); it.current(); ++it ) if ( (*it)->contactId() == contactId ) return *it; } else { - QString nick = element.innerText().string().stripWhiteSpace(); - for ( QPtrListIterator it ( d->manager->members() ); it.current(); ++it ) + TQString nick = element.innerText().string().stripWhiteSpace(); + for ( TQPtrListIterator it ( d->manager->members() ); it.current(); ++it ) if ( (*it)->property( Kopete::Global::Properties::self()->nickName().key() ).value().toString() == nick ) return *it; } @@ -698,7 +698,7 @@ Kopete::Contact *ChatMessagePart::contactFromNode( const DOM::Node &n ) const return 0; } -void ChatMessagePart::slotRightClick( const QString &, const QPoint &point ) +void ChatMessagePart::slotRightClick( const TQString &, const TQPoint &point ) { // look through parents until we find an Element DOM::Node activeNode = nodeUnderMouse(); @@ -715,7 +715,7 @@ void ChatMessagePart::slotRightClick( const QString &, const QPoint &point ) if ( Kopete::Contact *contact = contactFromNode( d->activeElement ) ) { chatWindowPopup = contact->popupMenu( d->manager ); - connect( chatWindowPopup, SIGNAL( aboutToHide() ), chatWindowPopup , SLOT( deleteLater() ) ); + connect( chatWindowPopup, TQT_SIGNAL( aboutToHide() ), chatWindowPopup , TQT_SLOT( deleteLater() ) ); } else { @@ -727,7 +727,7 @@ void ChatMessagePart::slotRightClick( const QString &, const QPoint &point ) chatWindowPopup->setItemEnabled( 1, false ); chatWindowPopup->insertSeparator(); } - else if ( d->activeElement.tagName().lower() == QString::fromLatin1( "a" ) ) + else if ( d->activeElement.tagName().lower() == TQString::fromLatin1( "a" ) ) { d->copyURLAction->plug( chatWindowPopup ); chatWindowPopup->insertSeparator(); @@ -741,7 +741,7 @@ void ChatMessagePart::slotRightClick( const QString &, const QPoint &point ) chatWindowPopup->insertSeparator(); d->closeAction->plug( chatWindowPopup ); - connect( chatWindowPopup, SIGNAL( aboutToHide() ), chatWindowPopup, SLOT( deleteLater() ) ); + connect( chatWindowPopup, TQT_SIGNAL( aboutToHide() ), chatWindowPopup, TQT_SLOT( deleteLater() ) ); chatWindowPopup->popup( point ); } @@ -751,26 +751,26 @@ void ChatMessagePart::slotRightClick( const QString &, const QPoint &point ) chatWindowPopup->popup( point ); } -QString ChatMessagePart::textUnderMouse() +TQString ChatMessagePart::textUnderMouse() { DOM::Node activeNode = nodeUnderMouse(); if( activeNode.nodeType() != DOM::Node::TEXT_NODE ) - return QString::null; + return TQString::null; DOM::Text textNode = activeNode; - QString data = textNode.data().string(); + TQString data = textNode.data().string(); //Ok, we have the whole node. Now, find the text under the mouse. - int mouseLeft = view()->mapFromGlobal( QCursor::pos() ).x(), + int mouseLeft = view()->mapFromGlobal( TQCursor::pos() ).x(), nodeLeft = activeNode.getRect().x(), cPos = 0, dataLen = data.length(); - QFontMetrics metrics( KopetePrefs::prefs()->fontFace() ); - QString buffer; + TQFontMetrics metrics( KopetePrefs::prefs()->fontFace() ); + TQString buffer; while( cPos < dataLen && nodeLeft < mouseLeft ) { - QChar c = data[cPos++]; + TQChar c = data[cPos++]; if( c.isSpace() ) buffer.truncate(0); else @@ -781,7 +781,7 @@ QString ChatMessagePart::textUnderMouse() if( cPos < dataLen ) { - QChar c = data[cPos++]; + TQChar c = data[cPos++]; while( cPos < dataLen && !c.isSpace() ) { buffer += c; @@ -797,8 +797,8 @@ void ChatMessagePart::slotCopyURL() DOM::HTMLAnchorElement a = d->activeElement; if ( !a.isNull() ) { - QApplication::clipboard()->setText( a.href().string(), QClipboard::Clipboard ); - QApplication::clipboard()->setText( a.href().string(), QClipboard::Selection ); + TQApplication::clipboard()->setText( a.href().string(), QClipboard::Clipboard ); + TQApplication::clipboard()->setText( a.href().string(), QClipboard::Selection ); } } @@ -818,8 +818,8 @@ void ChatMessagePart::copy(bool justselection /* default false */) * This also copies the text as type text/html * RangeImpl::toHTML was not implemented before KDE 3.4 */ - QString text; - QString htmltext; + TQString text; + TQString htmltext; #if KDE_IS_VERSION(3,3,90) htmltext = selectedTextAsHTML(); @@ -842,7 +842,7 @@ void ChatMessagePart::copy(bool justselection /* default false */) { if(n.nodeType() == DOM::Node::TEXT_NODE /*&& n.handle()->renderer()*/) { - QString str = n.nodeValue().string(); + TQString str = n.nodeValue().string(); hasNewLine = false; if(n == startNode && n == endNode) text = str.mid(startOffset, endOffset - startOffset); @@ -941,29 +941,29 @@ void ChatMessagePart::copy(bool justselection /* default false */) if(text.isEmpty()) return; - disconnect( kapp->clipboard(), SIGNAL( selectionChanged()), this, SLOT( slotClearSelection())); + disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), this, TQT_SLOT( slotClearSelection())); #ifndef QT_NO_MIMECLIPBOARD if(!justselection) { - QTextDrag *textdrag = new QTextDrag(text, 0L); + TQTextDrag *textdrag = new TQTextDrag(text, 0L); KMultipleDrag *drag = new KMultipleDrag( ); drag->addDragObject( textdrag ); if(!htmltext.isEmpty()) { - htmltext.replace( QChar( 0xa0 ), ' ' ); - QTextDrag *htmltextdrag = new QTextDrag(htmltext, 0L); + htmltext.replace( TQChar( 0xa0 ), ' ' ); + TQTextDrag *htmltextdrag = new TQTextDrag(htmltext, 0L); htmltextdrag->setSubtype("html"); drag->addDragObject( htmltextdrag ); } - QApplication::clipboard()->setData( drag, QClipboard::Clipboard ); + TQApplication::clipboard()->setData( drag, QClipboard::Clipboard ); } - QApplication::clipboard()->setText( text, QClipboard::Selection ); + TQApplication::clipboard()->setText( text, QClipboard::Selection ); #else if(!justselection) - QApplication::clipboard()->setText( text, QClipboard::Clipboard ); - QApplication::clipboard()->setText( text, QClipboard::Selection ); + TQApplication::clipboard()->setText( text, QClipboard::Clipboard ); + TQApplication::clipboard()->setText( text, QClipboard::Selection ); #endif - connect( kapp->clipboard(), SIGNAL( selectionChanged()), SLOT( slotClearSelection())); + connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), TQT_SLOT( slotClearSelection())); } @@ -982,17 +982,17 @@ void ChatMessagePart::slotCloseView( bool force ) d->manager->view()->closeView( force ); } -void ChatMessagePart::emitTooltipEvent( const QString &textUnderMouse, QString &toolTip ) +void ChatMessagePart::emitTooltipEvent( const TQString &textUnderMouse, TQString &toolTip ) { emit tooltipEvent( textUnderMouse, toolTip ); } // Style formatting for messages(incoming, outgoing, status) -QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const Kopete::Message &_message ) +TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML, const Kopete::Message &_message ) { Kopete::Message message=_message; //we will eventually need to modify it before showing it. - QString resultHTML = sourceHTML; - QString nick, contactId, service, protocolIcon, nickLink; + TQString resultHTML = sourceHTML; + TQString nick, contactId, service, protocolIcon, nickLink; if( message.from() ) { @@ -1014,8 +1014,8 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K // // Use default if protocol() and protocol()->displayName() is NULL. // For preview and unit tests. - QString iconName = QString::fromUtf8("kopete"); - service = QString::fromUtf8("Kopete"); + TQString iconName = TQString::fromUtf8("kopete"); + service = TQString::fromUtf8("Kopete"); if(message.from()->protocol() && !message.from()->protocol()->displayName().isNull()) { service = message.from()->protocol()->displayName(); @@ -1024,10 +1024,10 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K protocolIcon = KGlobal::iconLoader()->iconPath( iconName, KIcon::Small ); - nickLink=QString::fromLatin1("") - .arg( QStyleSheet::escape(message.from()->contactId()).replace('"',"""), - QStyleSheet::escape(message.from()->protocol()->pluginId()).replace('"',"""), - QStyleSheet::escape(message.from()->account()->accountId() ).replace('"',""")); + nickLink=TQString::fromLatin1("") + .arg( TQStyleSheet::escape(message.from()->contactId()).replace('"',"""), + TQStyleSheet::escape(message.from()->protocol()->pluginId()).replace('"',"""), + TQStyleSheet::escape(message.from()->account()->accountId() ).replace('"',""")); } else { @@ -1036,22 +1036,22 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K // Replace sender (contact nick) - resultHTML = resultHTML.replace( QString::fromUtf8("%sender%"), nickLink+nick+"" ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%sender%"), nickLink+nick+"" ); // Replace time, by default display only time and display seconds(that was true means). - resultHTML = resultHTML.replace( QString::fromUtf8("%time%"), KGlobal::locale()->formatTime(message.timestamp().time(), true) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%time%"), KGlobal::locale()->formatTime(message.timestamp().time(), true) ); // Replace %screenName% (contact ID) - resultHTML = resultHTML.replace( QString::fromUtf8("%senderScreenName%"), nickLink+QStyleSheet::escape(contactId)+"" ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%senderScreenName%"), nickLink+TQStyleSheet::escape(contactId)+"" ); // Replace service name (protocol name) - resultHTML = resultHTML.replace( QString::fromUtf8("%service%"), QStyleSheet::escape(service) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%service%"), TQStyleSheet::escape(service) ); // Replace protocolIcon (sender statusIcon) - resultHTML = resultHTML.replace( QString::fromUtf8("%senderStatusIcon%"), QStyleSheet::escape(protocolIcon).replace('"',""") ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%senderStatusIcon%"), TQStyleSheet::escape(protocolIcon).replace('"',""") ); // Look for %time{X}% - QRegExp timeRegExp("%time\\{([^}]*)\\}%"); + TQRegExp timeRegExp("%time\\{([^}]*)\\}%"); int pos=0; while( (pos=timeRegExp.search(resultHTML , pos) ) != -1 ) { - QString timeKeyword = formatTime( timeRegExp.cap(1), message.timestamp() ); + TQString timeKeyword = formatTime( timeRegExp.cap(1), message.timestamp() ); resultHTML = resultHTML.replace( pos , timeRegExp.cap(0).length() , timeKeyword ); } @@ -1059,13 +1059,13 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K // TODO: use the X value. // Replace with user-selected highlight color if to be highlighted or // with "inherit" otherwise to keep CSS clean - QString bgColor = QString::fromUtf8("inherit"); + TQString bgColor = TQString::fromUtf8("inherit"); if( message.importance() == Kopete::Message::Highlight && KopetePrefs::prefs()->highlightEnabled() ) { bgColor = KopetePrefs::prefs()->highlightBackground().name(); } - QRegExp textBackgroundRegExp("%textbackgroundcolor\\{([^}]*)\\}%"); + TQRegExp textBackgroundRegExp("%textbackgroundcolor\\{([^}]*)\\}%"); int textPos=0; while( (textPos=textBackgroundRegExp.search(resultHTML, textPos) ) != -1 ) { @@ -1075,30 +1075,30 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K // Replace userIconPath if( message.from() ) { - QString photoPath; + TQString photoPath; #if 0 photoPath = message.from()->property(Kopete::Global::Properties::self()->photo().key()).value().toString(); // If the photo path is empty, set the default buddy icon for the theme if( photoPath.isEmpty() ) { if(message.direction() == Kopete::Message::Inbound) - photoPath = QString::fromUtf8("Incoming/buddy_icon.png"); + photoPath = TQString::fromUtf8("Incoming/buddy_icon.png"); else if(message.direction() == Kopete::Message::Outbound) - photoPath = QString::fromUtf8("Outgoing/buddy_icon.png"); + photoPath = TQString::fromUtf8("Outgoing/buddy_icon.png"); } #endif if( !message.from()->metaContact()->picture().isNull() ) { - photoPath = QString( "data:image/png;base64," ) + message.from()->metaContact()->picture().base64(); + photoPath = TQString( "data:image/png;base64," ) + message.from()->metaContact()->picture().base64(); } else { if(message.direction() == Kopete::Message::Inbound) - photoPath = QString::fromUtf8("Incoming/buddy_icon.png"); + photoPath = TQString::fromUtf8("Incoming/buddy_icon.png"); else if(message.direction() == Kopete::Message::Outbound) - photoPath = QString::fromUtf8("Outgoing/buddy_icon.png"); + photoPath = TQString::fromUtf8("Outgoing/buddy_icon.png"); } - resultHTML = resultHTML.replace(QString::fromUtf8("%userIconPath%"), photoPath); + resultHTML = resultHTML.replace(TQString::fromUtf8("%userIconPath%"), photoPath); } // Replace messages. @@ -1107,13 +1107,13 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K { kdDebug(14000) << k_funcinfo << "Map Action message to Status template. " << endl; - QString boldNick = QString::fromUtf8("%1%2 ").arg(nickLink,nick); - QString newBody = boldNick + message.parsedBody(); + TQString boldNick = TQString::fromUtf8("%1%2 ").arg(nickLink,nick); + TQString newBody = boldNick + message.parsedBody(); message.setBody(newBody, Kopete::Message::ParsedHTML ); } // Set message direction("rtl"(Right-To-Left) or "ltr"(Left-to-right)) - resultHTML = resultHTML.replace( QString::fromUtf8("%messageDirection%"), message.isRightToLeft() ? "rtl" : "ltr" ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%messageDirection%"), message.isRightToLeft() ? "rtl" : "ltr" ); // These colors are used for coloring nicknames. I tried to use // colors both visible on light and dark background. @@ -1131,10 +1131,10 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K int hash = 0; for( uint f = 0; f < contactId.length(); ++f ) hash += contactId[f].unicode() * f; - const QString colorName = nameColors[ hash % nameColorsLen ]; - QString lightColorName; // Do not initialize, QColor::name() is expensive! + const TQString colorName = nameColors[ hash % nameColorsLen ]; + TQString lightColorName; // Do not initialize, TQColor::name() is expensive! kdDebug(14000) << k_funcinfo << "Hash " << hash << " has color " << colorName << endl; - QRegExp senderColorRegExp("%senderColor(?:\\{([^}]*)\\})?%"); + TQRegExp senderColorRegExp("%senderColor(?:\\{([^}]*)\\})?%"); textPos=0; while( (textPos=senderColorRegExp.search(resultHTML, textPos) ) != -1 ) { @@ -1147,14 +1147,14 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K // Lazily init light color if ( doLight && lightColorName.isNull() ) - lightColorName = QColor( colorName ).light( light ).name(); + lightColorName = TQColor( colorName ).light( light ).name(); resultHTML = resultHTML.replace( textPos , senderColorRegExp.cap(0).length(), doLight ? lightColorName : colorName ); } // Replace message at the end, maybe someone could put a Adium keyword in his message :P - resultHTML = resultHTML.replace( QString::fromUtf8("%message%"), formatMessageBody(message) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%message%"), formatMessageBody(message) ); // TODO: %status // resultHTML = addNickLinks( resultHTML ); @@ -1162,16 +1162,16 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML, const K } // Style formatting for header and footer. -QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML ) +TQString ChatMessagePart::formatStyleKeywords( const TQString &sourceHTML ) { - QString resultHTML = sourceHTML; + TQString resultHTML = sourceHTML; Kopete::Contact *remoteContact = d->manager->members().getFirst(); // Verify that all contacts are not null before doing anything if( remoteContact && d->manager->myself() ) { - QString sourceName, destinationName; + TQString sourceName, destinationName; // Use contact nickname for ourselfs, Myself metacontact display name isn't a reliable source. sourceName = d->manager->myself()->nickName(); if( remoteContact->metaContact() ) @@ -1180,64 +1180,64 @@ QString ChatMessagePart::formatStyleKeywords( const QString &sourceHTML ) destinationName = remoteContact->nickName(); // Replace %chatName%, create a internal span to update it by DOM when asked. - resultHTML = resultHTML.replace( QString::fromUtf8("%chatName%"), QString("%1").arg( formatName(d->manager->displayName()) ) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%chatName%"), TQString("%1").arg( formatName(d->manager->displayName()) ) ); // Replace %sourceName% - resultHTML = resultHTML.replace( QString::fromUtf8("%sourceName%"), formatName(sourceName) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%sourceName%"), formatName(sourceName) ); // Replace %destinationName% - resultHTML = resultHTML.replace( QString::fromUtf8("%destinationName%"), formatName(destinationName) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%destinationName%"), formatName(destinationName) ); // For %timeOpened%, display the date and time (also the seconds). - resultHTML = resultHTML.replace( QString::fromUtf8("%timeOpened%"), KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(), true, true ) ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%timeOpened%"), KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true, true ) ); // Look for %timeOpened{X}% - QRegExp timeRegExp("%timeOpened\\{([^}]*)\\}%"); + TQRegExp timeRegExp("%timeOpened\\{([^}]*)\\}%"); int pos=0; while( (pos=timeRegExp.search(resultHTML, pos) ) != -1 ) { - QString timeKeyword = formatTime( timeRegExp.cap(1), QDateTime::currentDateTime() ); + TQString timeKeyword = formatTime( timeRegExp.cap(1), TQDateTime::currentDateTime() ); resultHTML = resultHTML.replace( pos , timeRegExp.cap(0).length() , timeKeyword ); } // Get contact image paths #if 0 - QString photoIncomingPath, photoOutgoingPath; + TQString photoIncomingPath, photoOutgoingPath; photoIncomingPath = remoteContact->property( Kopete::Global::Properties::self()->photo().key()).value().toString(); photoOutgoingPath = d->manager->myself()->property(Kopete::Global::Properties::self()->photo().key()).value().toString(); if( photoIncomingPath.isEmpty() ) - photoIncomingPath = QString::fromUtf8("Incoming/buddy_icon.png"); + photoIncomingPath = TQString::fromUtf8("Incoming/buddy_icon.png"); if( photoOutgoingPath.isEmpty() ) - photoOutgoingPath = QString::fromUtf8("Outgoing/buddy_icon.png"); + photoOutgoingPath = TQString::fromUtf8("Outgoing/buddy_icon.png"); - resultHTML = resultHTML.replace( QString::fromUtf8("%incomingIconPath%"), photoIncomingPath); - resultHTML = resultHTML.replace( QString::fromUtf8("%outgoingIconPath%"), photoOutgoingPath); + resultHTML = resultHTML.replace( TQString::fromUtf8("%incomingIconPath%"), photoIncomingPath); + resultHTML = resultHTML.replace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoingPath); #endif - QString photoIncoming, photoOutgoing; + TQString photoIncoming, photoOutgoing; if( remoteContact->metaContact() && !remoteContact->metaContact()->picture().isNull() ) { - photoIncoming = QString("data:image/png;base64,%1").arg( remoteContact->metaContact()->picture().base64() ); + photoIncoming = TQString("data:image/png;base64,%1").arg( remoteContact->metaContact()->picture().base64() ); } else { - photoIncoming = QString::fromUtf8("Incoming/buddy_icon.png"); + photoIncoming = TQString::fromUtf8("Incoming/buddy_icon.png"); } if( d->manager->myself()->metaContact() && !d->manager->myself()->metaContact()->picture().isNull() ) { - photoOutgoing = QString("data:image/png;base64,%1").arg( d->manager->myself()->metaContact()->picture().base64() ); + photoOutgoing = TQString("data:image/png;base64,%1").arg( d->manager->myself()->metaContact()->picture().base64() ); } else { - photoOutgoing = QString::fromUtf8("Outgoing/buddy_icon.png"); + photoOutgoing = TQString::fromUtf8("Outgoing/buddy_icon.png"); } - resultHTML = resultHTML.replace( QString::fromUtf8("%incomingIconPath%"), photoIncoming); - resultHTML = resultHTML.replace( QString::fromUtf8("%outgoingIconPath%"), photoOutgoing ); + resultHTML = resultHTML.replace( TQString::fromUtf8("%incomingIconPath%"), photoIncoming); + resultHTML = resultHTML.replace( TQString::fromUtf8("%outgoingIconPath%"), photoOutgoing ); } return resultHTML; } -QString ChatMessagePart::formatTime(const QString &timeFormat, const QDateTime &dateTime) +TQString ChatMessagePart::formatTime(const TQString &timeFormat, const TQDateTime &dateTime) { char buffer[256]; @@ -1249,12 +1249,12 @@ QString ChatMessagePart::formatTime(const QString &timeFormat, const QDateTime & loctime = localtime (&timeT); strftime (buffer, 256, timeFormat.ascii(), loctime); - return QString(buffer); + return TQString(buffer); } -QString ChatMessagePart::formatName(const QString &sourceName) +TQString ChatMessagePart::formatName(const TQString &sourceName) { - QString formattedName = sourceName; + TQString formattedName = sourceName; // Escape the name. formattedName = Kopete::Message::escape(formattedName); @@ -1267,14 +1267,14 @@ QString ChatMessagePart::formatName(const QString &sourceName) return formattedName; } -QString ChatMessagePart::formatMessageBody(const Kopete::Message &message) +TQString ChatMessagePart::formatMessageBody(const Kopete::Message &message) { - QString formattedBody("%1").arg(message.parsedBody()); + formattedBody += TQString::fromUtf8("class=\"KopeteMessageBody\">%1").arg(message.parsedBody()); return formattedBody; } @@ -1282,7 +1282,7 @@ QString ChatMessagePart::formatMessageBody(const Kopete::Message &message) void ChatMessagePart::slotUpdateHeaderDisplayName() { kdDebug(14000) << k_funcinfo << endl; - DOM::HTMLElement kopeteChatNameNode = document().getElementById( QString::fromUtf8("KopeteHeaderChatNameInternal") ); + DOM::HTMLElement kopeteChatNameNode = document().getElementById( TQString::fromUtf8("KopeteHeaderChatNameInternal") ); if( !kopeteChatNameNode.isNull() ) kopeteChatNameNode.setInnerText( formatName(d->manager->displayName()) ); } @@ -1291,13 +1291,13 @@ void ChatMessagePart::slotUpdateHeaderPhoto() { // Do the actual style switch // Wait for the event loop before switching the style - QTimer::singleShot( 0, this, SLOT(changeStyle()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(changeStyle()) ); } void ChatMessagePart::changeStyle() { #ifdef STYLE_TIMETEST - QTime beforeChange = QTime::currentTime(); + TQTime beforeChange = TQTime::currentTime(); #endif // Make latestContact null to reset consecutives messages. d->latestContact = 0; @@ -1306,7 +1306,7 @@ void ChatMessagePart::changeStyle() writeTemplate(); // Readd all current messages. - QValueList::ConstIterator it, itEnd = d->allMessages.constEnd(); + TQValueList::ConstIterator it, itEnd = d->allMessages.constEnd(); for(it = d->allMessages.constBegin(); it != itEnd; ++it) { Kopete::Message tempMessage = *it; @@ -1314,7 +1314,7 @@ void ChatMessagePart::changeStyle() } kdDebug(14000) << k_funcinfo << "Finish changing style." << endl; #ifdef STYLE_TIMETEST - kdDebug(14000) << "Change time: " << beforeChange.msecsTo( QTime::currentTime()) << endl; + kdDebug(14000) << "Change time: " << beforeChange.msecsTo( TQTime::currentTime()) << endl; #endif } @@ -1323,7 +1323,7 @@ void ChatMessagePart::writeTemplate() kdDebug(14000) << k_funcinfo << endl; #ifdef STYLE_TIMETEST - QTime beforeHeader = QTime::currentTime(); + TQTime beforeHeader = TQTime::currentTime(); #endif // Clear all the page, and begin a new page. begin(); @@ -1338,8 +1338,8 @@ void ChatMessagePart::writeTemplate() // mainStyle: Currrent variant CSS url. // FIXME: Maybe this string should be load from a file, then parsed for args. - QString xhtmlBase; - xhtmlBase += QString("\n" + TQString xhtmlBase; + xhtmlBase += TQString("\n" "\n" "\n" @@ -1371,7 +1371,7 @@ void ChatMessagePart::writeTemplate() write(xhtmlBase); end(); #ifdef STYLE_TIMETEST - kdDebug(14000) << "Header time: " << beforeHeader.msecsTo( QTime::currentTime()) << endl; + kdDebug(14000) << "Header time: " << beforeHeader.msecsTo( TQTime::currentTime()) << endl; #endif } diff --git a/kopete/kopete/chatwindow/chatmessagepart.h b/kopete/kopete/chatwindow/chatmessagepart.h index ad14d3e3..5314d776 100644 --- a/kopete/kopete/chatwindow/chatmessagepart.h +++ b/kopete/kopete/chatwindow/chatmessagepart.h @@ -22,7 +22,7 @@ #include #include -#include +#include namespace Kopete { @@ -43,7 +43,7 @@ public: /** * Create a new ChatMessage Part. */ - ChatMessagePart( Kopete::ChatSession *manager, QWidget *parent, const char *name = 0); + ChatMessagePart( Kopete::ChatSession *manager, TQWidget *parent, const char *name = 0); ~ChatMessagePart(); /** @@ -104,7 +104,7 @@ public slots: * * @param stylePath absolute path to the style. */ - void setStyle( const QString &stylePath ); + void setStyle( const TQString &stylePath ); /** * Change the current style @@ -121,18 +121,18 @@ public slots: * Change the current variant for the current style * @param variantPath relative path to the style variant. */ - void setStyleVariant( const QString &variantPath ); + void setStyleVariant( const TQString &variantPath ); signals: /** * Emits before the context menu is about to show */ - void contextMenuEvent( const QString &textUnderMouse, KPopupMenu *popupMenu ); + void contextMenuEvent( const TQString &textUnderMouse, KPopupMenu *popupMenu ); /** * Emits before the tooltip is about to show */ - void tooltipEvent( const QString &textUnderMouse, QString &toolTip ); + void tooltipEvent( const TQString &textUnderMouse, TQString &toolTip ); private slots: void slotOpenURLRequest( const KURL &url, const KParts::URLArgs &args ); @@ -143,7 +143,7 @@ private slots: void slotRefreshView(); - void slotRightClick( const QString &, const QPoint &point ); + void slotRightClick( const TQString &, const TQPoint &point ); void slotCopyURL(); @@ -170,49 +170,49 @@ protected: private: void readOverrides(); - const QString styleHTML() const; + const TQString styleHTML() const; Kopete::Contact *contactFromNode( const DOM::Node &n ) const; /** * Emits before the tooltip is about to show */ - void emitTooltipEvent( const QString &textUnderMouse, QString &toolTipString ); + void emitTooltipEvent( const TQString &textUnderMouse, TQString &toolTipString ); /** * Returns the text currently under the mouse */ - QString textUnderMouse(); + TQString textUnderMouse(); /** * Format(replace) style keywords for messages (incoming, outgoing, internal) - * Use formatStyleKeywords(const QString &sourceHTML) for header and footer. + * Use formatStyleKeywords(const TQString &sourceHTML) for header and footer. * * @param sourceHTML the source html which contains the keywords * @param message the current Message. * * @return the resulting HTML with replaced keywords. */ - QString formatStyleKeywords( const QString &sourceHTML, const Kopete::Message &message ); + TQString formatStyleKeywords( const TQString &sourceHTML, const Kopete::Message &message ); /** * Format(replace) style keywords for header and footers. - * For messages, use formatStyleKeywords(const QString &sourceHTML, Kopete::Message &message) instead. + * For messages, use formatStyleKeywords(const TQString &sourceHTML, Kopete::Message &message) instead. * * @param sourceHTML HTML source needed to be replaced. * * @return the resulting HTML with replaced keywords. */ - QString formatStyleKeywords( const QString &sourceHTML ); + TQString formatStyleKeywords( const TQString &sourceHTML ); /** * Helper function to parse time in correct format. * Use glibc strftime function. * * @param timeFormat the time format to parse. - * @param dateTime the QDateTime which contains the datetime to format. + * @param dateTime the TQDateTime which contains the datetime to format. * @return the formatted time string. */ - QString formatTime(const QString &timeFormat, const QDateTime &dateTime); + TQString formatTime(const TQString &timeFormat, const TQDateTime &dateTime); /** * Format a nickname/displayname according to preferences. @@ -220,7 +220,7 @@ private: * @param sourceName Source name to format. * @return the formatted name. */ - QString formatName( const QString &sourceName ); + TQString formatName( const TQString &sourceName ); /** * Format a message body according to the style included @@ -229,7 +229,7 @@ private: * @param message Kopete::Message to format. * @return a span tag with a style attribute. */ - QString formatMessageBody( const Kopete::Message &message ); + TQString formatMessageBody( const Kopete::Message &message ); /** * Write the template file to KHTMLPart diff --git a/kopete/kopete/chatwindow/chattexteditpart.cpp b/kopete/kopete/chatwindow/chattexteditpart.cpp index bac31bcf..e284903d 100644 --- a/kopete/kopete/chatwindow/chattexteditpart.cpp +++ b/kopete/kopete/chatwindow/chattexteditpart.cpp @@ -28,10 +28,10 @@ #include #include -#include -#include +#include +#include -ChatTextEditPart::ChatTextEditPart( Kopete::ChatSession *session, QWidget *parent, const char *name ) +ChatTextEditPart::ChatTextEditPart( Kopete::ChatSession *session, TQWidget *parent, const char *name ) : KopeteRichTextEditPart( parent, name, session->protocol()->capabilities() ), m_session(session) { historyPos = -1; @@ -43,30 +43,30 @@ ChatTextEditPart::ChatTextEditPart( Kopete::ChatSession *session, QWidget *paren mComplete->setOrder( KCompletion::Weighted ); // set params on the edit widget - edit()->setMinimumSize( QSize( 75, 20 ) ); - edit()->setWordWrap( QTextEdit::WidgetWidth ); - edit()->setWrapPolicy( QTextEdit::AtWhiteSpace ); - edit()->setAutoFormatting( QTextEdit::AutoNone ); + edit()->setMinimumSize( TQSize( 75, 20 ) ); + edit()->setWordWrap( TQTextEdit::WidgetWidth ); + edit()->setWrapPolicy( TQTextEdit::AtWhiteSpace ); + edit()->setAutoFormatting( TQTextEdit::AutoNone ); // some signals and slots connections - connect( edit(), SIGNAL( textChanged()), this, SLOT( slotTextChanged() ) ); + connect( edit(), TQT_SIGNAL( textChanged()), this, TQT_SLOT( slotTextChanged() ) ); // timers for typing notifications - m_typingRepeatTimer = new QTimer(this, "m_typingRepeatTimer"); - m_typingStopTimer = new QTimer(this, "m_typingStopTimer"); - - connect( m_typingRepeatTimer, SIGNAL( timeout() ), this, SLOT( slotRepeatTypingTimer() ) ); - connect( m_typingStopTimer, SIGNAL( timeout() ), this, SLOT( slotStoppedTypingTimer() ) ); - - connect( session, SIGNAL( contactAdded(const Kopete::Contact*, bool) ), - this, SLOT( slotContactAdded(const Kopete::Contact*) ) ); - connect( session, SIGNAL( contactRemoved(const Kopete::Contact*, const QString&, Kopete::Message::MessageFormat, bool) ), - this, SLOT( slotContactRemoved(const Kopete::Contact*) ) ); - connect( session, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ), - this, SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + m_typingRepeatTimer = new TQTimer(this, "m_typingRepeatTimer"); + m_typingStopTimer = new TQTimer(this, "m_typingStopTimer"); + + connect( m_typingRepeatTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotRepeatTypingTimer() ) ); + connect( m_typingStopTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotStoppedTypingTimer() ) ); + + connect( session, TQT_SIGNAL( contactAdded(const Kopete::Contact*, bool) ), + this, TQT_SLOT( slotContactAdded(const Kopete::Contact*) ) ); + connect( session, TQT_SIGNAL( contactRemoved(const Kopete::Contact*, const TQString&, Kopete::Message::MessageFormat, bool) ), + this, TQT_SLOT( slotContactRemoved(const Kopete::Contact*) ) ); + connect( session, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ), + this, TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); slotContactAdded( session->myself() ); - for ( QPtrListIterator it( session->members() ); it.current(); ++it ) + for ( TQPtrListIterator it( session->members() ); it.current(); ++it ) slotContactAdded( *it ); } @@ -101,7 +101,7 @@ bool ChatTextEditPart::autoSpellCheckEnabled() const KDictSpellingHighlighter* ChatTextEditPart::spellHighlighter() { - QSyntaxHighlighter *qsh = edit()->syntaxHighlighter(); + TQSyntaxHighlighter *qsh = edit()->syntaxHighlighter(); KDictSpellingHighlighter* kdsh = dynamic_cast( qsh ); return kdsh; } @@ -112,9 +112,9 @@ class EvilTextEdit : public KTextEdit { public: // grab the paragraph as plain text - very very evil. - QString plainText( int para ) + TQString plainText( int para ) { - QString str = document()->paragAt( para )->string()->toString(); + TQString str = document()->paragAt( para )->string()->toString(); // str includes an extra space on the end (from the newline character?) - remove it return str.left( str.length() - 1 ); } @@ -126,24 +126,24 @@ void ChatTextEditPart::complete() edit()->getCursorPosition( ¶, &parIdx); // FIXME: strips out all formatting - QString txt = static_cast(edit())->plainText( para ); + TQString txt = static_cast(edit())->plainText( para ); if ( parIdx > 0 ) { - int firstSpace = txt.findRev( QRegExp( QString::fromLatin1("\\s\\S+") ), parIdx - 1 ) + 1; - int lastSpace = txt.find( QRegExp( QString::fromLatin1("[\\s\\:]") ), firstSpace ); + int firstSpace = txt.findRev( TQRegExp( TQString::fromLatin1("\\s\\S+") ), parIdx - 1 ) + 1; + int lastSpace = txt.find( TQRegExp( TQString::fromLatin1("[\\s\\:]") ), firstSpace ); if( lastSpace == -1 ) lastSpace = txt.length(); - QString word = txt.mid( firstSpace, lastSpace - firstSpace ); - QString match; + TQString word = txt.mid( firstSpace, lastSpace - firstSpace ); + TQString match; kdDebug(14000) << k_funcinfo << word << " from '" << txt << "'" << endl; if ( word != m_lastMatch ) { match = mComplete->makeCompletion( word ); - m_lastMatch = QString::null; + m_lastMatch = TQString::null; parIdx -= word.length(); } else @@ -154,11 +154,11 @@ void ChatTextEditPart::complete() if ( !match.isNull() && !match.isEmpty() ) { - QString rightText = txt.right( txt.length() - lastSpace ); + TQString rightText = txt.right( txt.length() - lastSpace ); - if ( para == 0 && firstSpace == 0 && rightText[0] != QChar(':') ) + if ( para == 0 && firstSpace == 0 && rightText[0] != TQChar(':') ) { - rightText = match + QString::fromLatin1(": ") + rightText; + rightText = match + TQString::fromLatin1(": ") + rightText; parIdx += 2; } else @@ -172,7 +172,7 @@ void ChatTextEditPart::complete() edit()->removeParagraph( para + 1 ); edit()->setCursorPosition( para, parIdx + match.length() ); edit()->setUpdatesEnabled( true ); - // must call this rather than update because QTextEdit is broken :( + // must call this rather than update because TQTextEdit is broken :( edit()->updateContents(); m_lastMatch = match; } @@ -183,8 +183,8 @@ void ChatTextEditPart::complete() } } -void ChatTextEditPart::slotPropertyChanged( Kopete::Contact*, const QString &key, - const QVariant& oldValue, const QVariant &newValue ) +void ChatTextEditPart::slotPropertyChanged( Kopete::Contact*, const TQString &key, + const TQVariant& oldValue, const TQVariant &newValue ) { if ( key == Kopete::Global::Properties::self()->nickName().key() ) { @@ -195,19 +195,19 @@ void ChatTextEditPart::slotPropertyChanged( Kopete::Contact*, const QString &key void ChatTextEditPart::slotContactAdded( const Kopete::Contact *contact ) { - connect( contact, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; + connect( contact, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; - QString contactName = contact->property(Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString contactName = contact->property(Kopete::Global::Properties::self()->nickName()).value().toString(); mComplete->addItem( contactName ); } void ChatTextEditPart::slotContactRemoved( const Kopete::Contact *contact ) { - disconnect( contact, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; + disconnect( contact, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; - QString contactName = contact->property(Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString contactName = contact->property(Kopete::Global::Properties::self()->nickName()).value().toString(); mComplete->removeItem( contactName ); } @@ -227,7 +227,7 @@ bool ChatTextEditPart::canSend() bool reachableContactFound = false; //TODO: does this perform badly in large / busy IRC channels? - no, doesn't seem to - QPtrListIterator it ( members ); + TQPtrListIterator it ( members ); for( ; it.current(); ++it ) { if ( (*it)->isReachable() ) @@ -257,17 +257,17 @@ void ChatTextEditPart::slotContactStatusChanged( Kopete::Contact *, const Kopete void ChatTextEditPart::sendMessage() { - QString txt = text( Qt::PlainText ); + TQString txt = text( Qt::PlainText ); // avoid sending emtpy messages or enter keys (see bug 100334) if ( txt.isEmpty() || txt == "\n" ) return; - if ( m_lastMatch.isNull() && ( txt.find( QRegExp( QString::fromLatin1("^\\w+:\\s") ) ) > -1 ) ) + if ( m_lastMatch.isNull() && ( txt.find( TQRegExp( TQString::fromLatin1("^\\w+:\\s") ) ) > -1 ) ) { //no last match and it finds something of the form of "word:" at the start of a line - QString search = txt.left( txt.find(':') ); + TQString search = txt.left( txt.find(':') ); if( !search.isEmpty() ) { - QString match = mComplete->makeCompletion( search ); + TQString match = mComplete->makeCompletion( search ); if( !match.isNull() ) edit()->setText( txt.replace(0,search.length(),match) ); } @@ -277,7 +277,7 @@ void ChatTextEditPart::sendMessage() { //FIXME: what is the next line for? mComplete->addItem( m_lastMatch ); - m_lastMatch = QString::null; + m_lastMatch = TQString::null; } slotStoppedTypingTimer(); @@ -291,9 +291,9 @@ void ChatTextEditPart::sendMessage() bool ChatTextEditPart::isTyping() { - QString txt = text( Qt::PlainText ); + TQString txt = text( Qt::PlainText ); - //Make sure the message is empty. QString::isEmpty() + //Make sure the message is empty. TQString::isEmpty() //returns false if a message contains just whitespace //which is the reason why we strip the whitespace return !txt.stripWhiteSpace().isEmpty(); @@ -322,7 +322,7 @@ void ChatTextEditPart::historyUp() if ( historyList.empty() || historyPos == historyList.count() - 1 ) return; - QString text = edit()->text(); + TQString text = edit()->text(); bool empty = text.stripWhiteSpace().isEmpty(); // got text? save it @@ -341,12 +341,12 @@ void ChatTextEditPart::historyUp() historyPos++; - QString newText = historyList[historyPos]; + TQString newText = historyList[historyPos]; TextFormat format=edit()->textFormat(); edit()->setTextFormat(AutoText); //workaround bug 115690 edit()->setText( newText ); edit()->setTextFormat(format); - edit()->moveCursor( QTextEdit::MoveEnd, false ); + edit()->moveCursor( TQTextEdit::MoveEnd, false ); } void ChatTextEditPart::historyDown() @@ -354,7 +354,7 @@ void ChatTextEditPart::historyDown() if ( historyList.empty() || historyPos == -1 ) return; - QString text = edit()->text(); + TQString text = edit()->text(); bool empty = text.stripWhiteSpace().isEmpty(); // got text? save it @@ -365,7 +365,7 @@ void ChatTextEditPart::historyDown() historyPos--; - QString newText = ( historyPos >= 0 ? historyList[historyPos] : QString::null ); + TQString newText = ( historyPos >= 0 ? historyList[historyPos] : TQString::null ); TextFormat format=edit()->textFormat(); @@ -375,10 +375,10 @@ void ChatTextEditPart::historyDown() - edit()->moveCursor( QTextEdit::MoveEnd, false ); + edit()->moveCursor( TQTextEdit::MoveEnd, false ); } -void ChatTextEditPart::addText( const QString &text ) +void ChatTextEditPart::addText( const TQString &text ) { edit()->insert( text ); } diff --git a/kopete/kopete/chatwindow/chattexteditpart.h b/kopete/kopete/chatwindow/chattexteditpart.h index 3391b8a7..d16567ad 100644 --- a/kopete/kopete/chatwindow/chattexteditpart.h +++ b/kopete/kopete/chatwindow/chattexteditpart.h @@ -20,7 +20,7 @@ #include "krichtexteditpart.h" -#include +#include class QTimer; @@ -48,7 +48,7 @@ class ChatTextEditPart : public KopeteRichTextEditPart { Q_OBJECT public: - ChatTextEditPart( Kopete::ChatSession *session, QWidget *parent, const char *name = 0 ); + ChatTextEditPart( Kopete::ChatSession *session, TQWidget *parent, const char *name = 0 ); ~ChatTextEditPart(); /** @@ -67,7 +67,7 @@ public: * Adds text into the edit area. Used when an emoticon is selected. * @param text The text to be inserted */ - void addText( const QString &text ); + void addText( const TQString &text ); /** * Can we send messages now? @@ -177,7 +177,7 @@ private slots: /** * Update completion to follow changes in users' nicknames */ - void slotPropertyChanged( Kopete::Contact *, const QString &key, const QVariant &oldValue, const QVariant &newValue ); + void slotPropertyChanged( Kopete::Contact *, const TQString &key, const TQVariant &oldValue, const TQVariant &newValue ); private: KDictSpellingHighlighter* spellHighlighter(); @@ -193,14 +193,14 @@ private: * index -1 is treated specially; when it is modified, changes are saved to * a new message placed at index 0. */ - QStringList historyList; + TQStringList historyList; int historyPos; KCompletion *mComplete; - QString m_lastMatch; + TQString m_lastMatch; - QTimer *m_typingRepeatTimer; - QTimer *m_typingStopTimer; + TQTimer *m_typingRepeatTimer; + TQTimer *m_typingStopTimer; bool m_autoSpellCheckEnabled; }; diff --git a/kopete/kopete/chatwindow/chatview.cpp b/kopete/kopete/chatwindow/chatview.cpp index 62c1206d..514aaac8 100644 --- a/kopete/kopete/chatwindow/chatview.cpp +++ b/kopete/kopete/chatwindow/chatview.cpp @@ -45,13 +45,13 @@ #include #include #include -#include -#include +#include +#include typedef KGenericFactory ChatWindowPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_chatwindow, ChatWindowPluginFactory( "kopete_chatwindow" ) ) -ChatWindowPlugin::ChatWindowPlugin(QObject *parent, const char *name, const QStringList &) : +ChatWindowPlugin::ChatWindowPlugin(TQObject *parent, const char *name, const TQStringList &) : Kopete::ViewPlugin( ChatWindowPluginFactory::instance(), parent, name ) {} @@ -63,8 +63,8 @@ KopeteView* ChatWindowPlugin::createView( Kopete::ChatSession *manager ) class KopeteChatViewPrivate { public: - QString captionText; - QString statusText; + TQString captionText; + TQString statusText; bool isActive; bool sendInProgress; bool visibleMembers; @@ -89,8 +89,8 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch hide(); //Create the view dock widget (KHTML Part), and set it to no docking (lock it in place) - viewDock = createDockWidget(QString::fromLatin1( "viewDock" ), QPixmap(), - 0L,QString::fromLatin1("viewDock"), QString::fromLatin1(" ")); + viewDock = createDockWidget(TQString::fromLatin1( "viewDock" ), TQPixmap(), + 0L,TQString::fromLatin1("viewDock"), TQString::fromLatin1(" ")); m_messagePart = new ChatMessagePart( mgr, viewDock, "m_messagePart" ); viewDock->setWidget(messagePart()->widget()); @@ -98,19 +98,19 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch viewDock->setEnableDocking(KDockWidget::DockNone); //Create the bottom dock widget, with the edit area, statusbar and send button - editDock = createDockWidget( QString::fromLatin1( "editDock" ), QPixmap(), - 0L, QString::fromLatin1("editDock"), QString::fromLatin1(" ") ); + editDock = createDockWidget( TQString::fromLatin1( "editDock" ), TQPixmap(), + 0L, TQString::fromLatin1("editDock"), TQString::fromLatin1(" ") ); m_editPart = new ChatTextEditPart( mgr, editDock, "kopeterichtexteditpart" ); // FIXME: is this used these days? it seems totally unnecessary - connect( editPart(), SIGNAL( toggleToolbar(bool)), this, SLOT(slotToggleRtfToolbar(bool)) ); + connect( editPart(), TQT_SIGNAL( toggleToolbar(bool)), this, TQT_SLOT(slotToggleRtfToolbar(bool)) ); - connect( editPart(), SIGNAL( messageSent( Kopete::Message & ) ), - this, SIGNAL( messageSent( Kopete::Message & ) ) ); - connect( editPart(), SIGNAL( canSendChanged( bool ) ), - this, SIGNAL( canSendChanged(bool) ) ); - connect( editPart(), SIGNAL( typing(bool) ), - mgr, SLOT( typing(bool) ) ); + connect( editPart(), TQT_SIGNAL( messageSent( Kopete::Message & ) ), + this, TQT_SIGNAL( messageSent( Kopete::Message & ) ) ); + connect( editPart(), TQT_SIGNAL( canSendChanged( bool ) ), + this, TQT_SIGNAL( canSendChanged(bool) ) ); + connect( editPart(), TQT_SIGNAL( typing(bool) ), + mgr, TQT_SLOT( typing(bool) ) ); //Make the edit area dockable for now editDock->setWidget( editPart()->widget() ); @@ -129,40 +129,40 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch m_remoteTypingMap.setAutoDelete( true ); //Manager signals - connect( mgr, SIGNAL( displayNameChanged() ), - this, SLOT( slotChatDisplayNameChanged() ) ); - connect( mgr, SIGNAL( contactAdded(const Kopete::Contact*, bool) ), - this, SLOT( slotContactAdded(const Kopete::Contact*, bool) ) ); - connect( mgr, SIGNAL( contactRemoved(const Kopete::Contact*, const QString&, Kopete::Message::MessageFormat, bool) ), - this, SLOT( slotContactRemoved(const Kopete::Contact*, const QString&, Kopete::Message::MessageFormat, bool) ) ); - connect( mgr, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ), - this, SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); - connect( mgr, SIGNAL( remoteTyping( const Kopete::Contact *, bool) ), - this, SLOT( remoteTyping(const Kopete::Contact *, bool) ) ); - connect( mgr, SIGNAL( eventNotification( const QString& ) ), - this, SLOT( setStatusText( const QString& ) ) ); + connect( mgr, TQT_SIGNAL( displayNameChanged() ), + this, TQT_SLOT( slotChatDisplayNameChanged() ) ); + connect( mgr, TQT_SIGNAL( contactAdded(const Kopete::Contact*, bool) ), + this, TQT_SLOT( slotContactAdded(const Kopete::Contact*, bool) ) ); + connect( mgr, TQT_SIGNAL( contactRemoved(const Kopete::Contact*, const TQString&, Kopete::Message::MessageFormat, bool) ), + this, TQT_SLOT( slotContactRemoved(const Kopete::Contact*, const TQString&, Kopete::Message::MessageFormat, bool) ) ); + connect( mgr, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & , const Kopete::OnlineStatus &) ), + this, TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + connect( mgr, TQT_SIGNAL( remoteTyping( const Kopete::Contact *, bool) ), + this, TQT_SLOT( remoteTyping(const Kopete::Contact *, bool) ) ); + connect( mgr, TQT_SIGNAL( eventNotification( const TQString& ) ), + this, TQT_SLOT( setStatusText( const TQString& ) ) ); //Connections to the manager and the ViewManager that every view should have - connect( this, SIGNAL( closing( KopeteView * ) ), - KopeteViewManager::viewManager(), SLOT( slotViewDestroyed( KopeteView * ) ) ); - connect( this, SIGNAL( activated( KopeteView * ) ), - KopeteViewManager::viewManager(), SLOT( slotViewActivated( KopeteView * ) ) ); - connect( this, SIGNAL( messageSent(Kopete::Message &) ), - mgr, SLOT( sendMessage(Kopete::Message &) ) ); - connect( mgr, SIGNAL( messageSuccess() ), - this, SLOT( messageSentSuccessfully() )); + connect( this, TQT_SIGNAL( closing( KopeteView * ) ), + KopeteViewManager::viewManager(), TQT_SLOT( slotViewDestroyed( KopeteView * ) ) ); + connect( this, TQT_SIGNAL( activated( KopeteView * ) ), + KopeteViewManager::viewManager(), TQT_SLOT( slotViewActivated( KopeteView * ) ) ); + connect( this, TQT_SIGNAL( messageSent(Kopete::Message &) ), + mgr, TQT_SLOT( sendMessage(Kopete::Message &) ) ); + connect( mgr, TQT_SIGNAL( messageSuccess() ), + this, TQT_SLOT( messageSentSuccessfully() )); // add contacts slotContactAdded( mgr->myself(), true ); - for ( QPtrListIterator it( mgr->members() ); it.current(); ++it ) + for ( TQPtrListIterator it( mgr->members() ); it.current(); ++it ) slotContactAdded( *it, true ); setFocusProxy( editPart()->widget() ); editPart()->widget()->setFocus(); // init actions - KStdAction::copy( this, SLOT(copy()), actionCollection() ); - KStdAction::close( this, SLOT(closeView()),actionCollection() ); + KStdAction::copy( this, TQT_SLOT(copy()), actionCollection() ); + KStdAction::close( this, TQT_SLOT(closeView()),actionCollection() ); setCaption( m_manager->displayName(), false ); @@ -187,7 +187,7 @@ KTextEdit *ChatView::editWidget() return editPart()->widget(); } -QWidget *ChatView::mainWidget() +TQWidget *ChatView::mainWidget() { return this; } @@ -230,7 +230,7 @@ void ChatView::nickComplete() return editPart()->complete(); } -void ChatView::addText( const QString &text ) +void ChatView::addText( const TQString &text ) { editPart()->addText( text ); } @@ -240,7 +240,7 @@ void ChatView::clear() messagePart()->clear(); } -void ChatView::setBgColor( const QColor &newColor ) +void ChatView::setBgColor( const TQColor &newColor ) { editPart()->setBgColor( newColor ); } @@ -250,17 +250,17 @@ void ChatView::setFont() editPart()->setFont(); } -QFont ChatView::font() +TQFont ChatView::font() { return editPart()->font(); } -void ChatView::setFont( const QFont &font ) +void ChatView::setFont( const TQFont &font ) { editPart()->setFont( font ); } -void ChatView::setFgColor( const QColor &newColor ) +void ChatView::setFgColor( const TQColor &newColor ) { editPart()->setFgColor( newColor ); } @@ -349,26 +349,26 @@ bool ChatView::closeView( bool force ) { if ( m_manager->members().count() > 1 ) { - QString shortCaption = d->captionText; + TQString shortCaption = d->captionText; shortCaption = KStringHandler::rsqueeze( shortCaption ); response = KMessageBox::warningContinueCancel( this, i18n("You are about to leave the group chat session %1.
    " "You will not receive future messages from this conversation.
    ").arg( shortCaption ), i18n( "Closing Group Chat" ), - i18n( "Cl&ose Chat" ), QString::fromLatin1( "AskCloseGroupChat" ) ); + i18n( "Cl&ose Chat" ), TQString::fromLatin1( "AskCloseGroupChat" ) ); } if ( !unreadMessageFrom.isNull() && ( response == KMessageBox::Continue ) ) { response = KMessageBox::warningContinueCancel( this, i18n("You have received a message from %1 in the last " "second. Are you sure you want to close this chat?").arg( unreadMessageFrom ), i18n( "Unread Message" ), - i18n( "Cl&ose Chat" ), QString::fromLatin1("AskCloseChatRecentMessage" ) ); + i18n( "Cl&ose Chat" ), TQString::fromLatin1("AskCloseChatRecentMessage" ) ); } if ( d->sendInProgress && ( response == KMessageBox::Continue ) ) { response = KMessageBox::warningContinueCancel( this, i18n( "You have a message send in progress, which will be " "aborted if this chat is closed. Are you sure you want to close this chat?" ), i18n( "Message in Transit" ), - i18n( "Cl&ose Chat" ), QString::fromLatin1( "AskCloseChatMessageInProgress" ) ); + i18n( "Cl&ose Chat" ), TQString::fromLatin1( "AskCloseChatMessageInProgress" ) ); } } @@ -418,8 +418,8 @@ void ChatView::createMembersList() if ( !membersDock ) { //Create the chat members list - membersDock = createDockWidget( QString::fromLatin1( "membersDock" ), QPixmap(), 0L, - QString::fromLatin1( "membersDock" ), QString::fromLatin1( " " ) ); + membersDock = createDockWidget( TQString::fromLatin1( "membersDock" ), TQPixmap(), 0L, + TQString::fromLatin1( "membersDock" ), TQString::fromLatin1( " " ) ); m_membersList = new ChatMembersListWidget( m_manager, this, "m_membersList" ); membersDock->setWidget( m_membersList ); @@ -431,7 +431,7 @@ void ChatView::createMembersList() membersStatus = static_cast ( members.first()->metaContact()->pluginData - ( m_manager->protocol(), QString::fromLatin1( "MembersListPolicy" ) ).toInt() + ( m_manager->protocol(), TQString::fromLatin1( "MembersListPolicy" ) ).toInt() ); } else @@ -459,7 +459,7 @@ void ChatView::toggleMembersVisibility() if ( members.first()->metaContact() ) { members.first()->metaContact()->setPluginData( m_manager->protocol(), - QString::fromLatin1( "MembersListPolicy" ), QString::number(membersStatus) ); + TQString::fromLatin1( "MembersListPolicy" ), TQString::number(membersStatus) ); } //refreshView(); } @@ -476,17 +476,17 @@ void ChatView::placeMembersList( KDockWidget::DockPosition dp ) // look up the dock width int dockWidth; - KGlobal::config()->setGroup( QString::fromLatin1( "ChatViewDock" ) ); + KGlobal::config()->setGroup( TQString::fromLatin1( "ChatViewDock" ) ); if( membersDockPosition == KDockWidget::DockLeft ) { dockWidth = KGlobal::config()->readNumEntry( - QString::fromLatin1( "membersDock,viewDock:sepPos" ), 30); + TQString::fromLatin1( "membersDock,viewDock:sepPos" ), 30); } else { dockWidth = KGlobal::config()->readNumEntry( - QString::fromLatin1( "viewDock,membersDock:sepPos" ), 70); + TQString::fromLatin1( "viewDock,membersDock:sepPos" ), 70); } // Make sure it is shown then place it wherever @@ -519,19 +519,19 @@ void ChatView::remoteTyping( const Kopete::Contact *contact, bool isTyping ) m_remoteTypingMap.remove( key ); if( isTyping ) { - m_remoteTypingMap.insert( key, new QTimer(this) ); - connect( m_remoteTypingMap[ key ], SIGNAL( timeout() ), SLOT( slotRemoteTypingTimeout() ) ); + m_remoteTypingMap.insert( key, new TQTimer(this) ); + connect( m_remoteTypingMap[ key ], TQT_SIGNAL( timeout() ), TQT_SLOT( slotRemoteTypingTimeout() ) ); m_remoteTypingMap[ key ]->start( 6000, true ); } // Loop through the map, constructing a string of people typing - QStringList typingList; - QPtrDictIterator it( m_remoteTypingMap ); + TQStringList typingList; + TQPtrDictIterator it( m_remoteTypingMap ); for( ; it.current(); ++it ) { Kopete::Contact *c = static_cast( it.currentKey() ); - QString nick; + TQString nick; if( c->metaContact() && c->metaContact() != Kopete::ContactList::self()->myself() ) { nick = c->metaContact()->displayName(); @@ -550,7 +550,7 @@ void ChatView::remoteTyping( const Kopete::Contact *contact, bool isTyping ) setStatusText( i18n( "%1 is typing a message" ).arg( typingList.first() ) ); else { - QString statusTyping = typingList.join( QString::fromLatin1( ", " ) ); + TQString statusTyping = typingList.join( TQString::fromLatin1( ", " ) ); setStatusText( i18n( "%1 is a list of names", "%1 are typing a message" ).arg( statusTyping ) ); } updateChatState( Typing ); @@ -561,14 +561,14 @@ void ChatView::remoteTyping( const Kopete::Contact *contact, bool isTyping ) } } -void ChatView::setStatusText( const QString &status ) +void ChatView::setStatusText( const TQString &status ) { d->statusText = status; if ( d->isActive ) m_mainWindow->setStatus( status ); } -const QString& ChatView::statusText() +const TQString& ChatView::statusText() { return d->statusText; } @@ -578,18 +578,18 @@ void ChatView::slotChatDisplayNameChanged() // This fires whenever a contact or MC changes displayName, so only // update the caption if it changed to avoid unneeded updates that // could cause flickering - QString chatName = m_manager->displayName(); + TQString chatName = m_manager->displayName(); if ( chatName != d->captionText ) setCaption( chatName, true ); } -void ChatView::slotPropertyChanged( Kopete::Contact*, const QString &key, - const QVariant& oldValue, const QVariant &newValue ) +void ChatView::slotPropertyChanged( Kopete::Contact*, const TQString &key, + const TQVariant& oldValue, const TQVariant &newValue ) { if ( key == Kopete::Global::Properties::self()->nickName().key() ) { - QString newName=newValue.toString(); - QString oldName=oldValue.toString(); + TQString newName=newValue.toString(); + TQString oldName=oldValue.toString(); if(KopetePrefs::prefs()->showEvents()) if ( oldName != newName && !oldName.isEmpty()) @@ -597,7 +597,7 @@ void ChatView::slotPropertyChanged( Kopete::Contact*, const QString &key, } } -void ChatView::slotDisplayNameChanged( const QString &oldValue, const QString &newValue ) +void ChatView::slotDisplayNameChanged( const TQString &oldValue, const TQString &newValue ) { if( KopetePrefs::prefs()->showEvents() ) { @@ -608,7 +608,7 @@ void ChatView::slotDisplayNameChanged( const QString &oldValue, const QString &n void ChatView::slotContactAdded(const Kopete::Contact *contact, bool suppress) { - QString contactName; + TQString contactName; // Myself metacontact is not a reliable source. if( contact->metaContact() && contact->metaContact() != Kopete::ContactList::self()->myself() ) { @@ -621,13 +621,13 @@ void ChatView::slotContactAdded(const Kopete::Contact *contact, bool suppress) if( contact->metaContact() && contact->metaContact() != Kopete::ContactList::self()->myself() ) { - connect( contact->metaContact(), SIGNAL( displayNameChanged(const QString&, const QString&) ), - this, SLOT( slotDisplayNameChanged(const QString &, const QString &) ) ); + connect( contact->metaContact(), TQT_SIGNAL( displayNameChanged(const TQString&, const TQString&) ), + this, TQT_SLOT( slotDisplayNameChanged(const TQString &, const TQString &) ) ); } else { - connect( contact, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; + connect( contact, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; } if( !suppress && m_manager->members().count() > 1 ) @@ -647,14 +647,14 @@ void ChatView::slotContactAdded(const Kopete::Contact *contact, bool suppress) emit updateStatusIcon( this ); } -void ChatView::slotContactRemoved( const Kopete::Contact *contact, const QString &reason, Kopete::Message::MessageFormat format, bool suppressNotification ) +void ChatView::slotContactRemoved( const Kopete::Contact *contact, const TQString &reason, Kopete::Message::MessageFormat format, bool suppressNotification ) { // kdDebug(14000) << k_funcinfo << endl; if ( contact != m_manager->myself() ) { m_remoteTypingMap.remove( const_cast( contact ) ); - QString contactName; + TQString contactName; if( contact->metaContact() && contact->metaContact() != Kopete::ContactList::self()->myself() ) { contactName = contact->metaContact()->displayName(); @@ -669,13 +669,13 @@ void ChatView::slotContactRemoved( const Kopete::Contact *contact, const QString { if( contact->metaContact() ) { - disconnect( contact->metaContact(), SIGNAL( displayNameChanged(const QString&, const QString&) ), - this, SLOT( slotDisplayNameChanged(const QString&, const QString&) ) ); + disconnect( contact->metaContact(), TQT_SIGNAL( displayNameChanged(const TQString&, const TQString&) ), + this, TQT_SLOT( slotDisplayNameChanged(const TQString&, const TQString&) ) ); } else { - disconnect(contact,SIGNAL(propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & )), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; + disconnect(contact,TQT_SIGNAL(propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & )), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; } } @@ -692,15 +692,15 @@ void ChatView::slotContactRemoved( const Kopete::Contact *contact, const QString emit updateStatusIcon( this ); } -QString& ChatView::caption() const +TQString& ChatView::caption() const { return d->captionText; } -void ChatView::setCaption( const QString &text, bool modified ) +void ChatView::setCaption( const TQString &text, bool modified ) { // kdDebug(14000) << k_funcinfo << endl; - QString newCaption = text; + TQString newCaption = text; //Save this caption d->captionText = text; @@ -711,7 +711,7 @@ void ChatView::setCaption( const QString &text, bool modified ) //Call the original set caption KDockMainWindow::setCaption( newCaption, false ); - emit updateChatTooltip( this, QString::fromLatin1("%1").arg( d->captionText ) ); + emit updateChatTooltip( this, TQString::fromLatin1("%1").arg( d->captionText ) ); emit updateChatLabel( this, newCaption ); //Blink icon if modified and not active if( !d->isActive && modified ) @@ -757,15 +757,15 @@ void ChatView::appendMessage(Kopete::Message &message) { unreadMessageFrom = message.from()->nickName(); } - QTimer::singleShot( 1000, this, SLOT( slotMarkMessageRead() ) ); + TQTimer::singleShot( 1000, this, TQT_SLOT( slotMarkMessageRead() ) ); } else - unreadMessageFrom = QString::null; + unreadMessageFrom = TQString::null; } void ChatView::slotMarkMessageRead() { - unreadMessageFrom = QString::null; + unreadMessageFrom = TQString::null; } void ChatView::slotToggleRtfToolbar( bool enabled ) @@ -796,7 +796,7 @@ void ChatView::slotContactStatusChanged( Kopete::Contact *contact, const Kopete: } else { - QString nick=contact->nickName(); + TQString nick=contact->nickName(); sendInternalMessage( i18n( "%2 is now %1." ) .arg( newStatus.description(), nick ) ); } @@ -808,7 +808,7 @@ void ChatView::slotContactStatusChanged( Kopete::Contact *contact, const Kopete: emit updateStatusIcon( this ); } -void ChatView::sendInternalMessage(const QString &msg, Kopete::Message::MessageFormat format ) +void ChatView::sendInternalMessage(const TQString &msg, Kopete::Message::MessageFormat format ) { // When closing kopete, some internal message may be sent because some contact are deleted // these contacts can already be deleted @@ -835,9 +835,9 @@ void ChatView::saveOptions() { KConfig *config = KGlobal::config(); - writeDockConfig ( config, QString::fromLatin1( "ChatViewDock" ) ); - config->setGroup( QString::fromLatin1( "ChatViewDock" ) ); - config->writeEntry( QString::fromLatin1( "membersDockPosition" ), membersDockPosition ); + writeDockConfig ( config, TQString::fromLatin1( "ChatViewDock" ) ); + config->setGroup( TQString::fromLatin1( "ChatViewDock" ) ); + config->writeEntry( TQString::fromLatin1( "membersDockPosition" ), membersDockPosition ); saveChatSettings(); config->sync(); } @@ -859,7 +859,7 @@ void ChatView::saveChatSettings() KConfig* config = KGlobal::config(); - QString contactListGroup = QString::fromLatin1("chatwindow_") + + TQString contactListGroup = TQString::fromLatin1("chatwindow_") + mc->metaContactId(); config->setGroup( contactListGroup ); @@ -875,7 +875,7 @@ void ChatView::loadChatSettings() return; //can't load with more than one other person in the chat //read settings for metacontact - QString contactListGroup = QString::fromLatin1("chatwindow_") + + TQString contactListGroup = TQString::fromLatin1("chatwindow_") + contacts.first()->metaContact()->metaContactId(); KConfig* config = KGlobal::config(); config->setGroup( contactListGroup ); @@ -891,24 +891,24 @@ void ChatView::readOptions() KConfig *config = KGlobal::config(); /** THIS IS BROKEN !!! */ - //dockManager->readConfig ( config, QString::fromLatin1("ChatViewDock") ); + //dockManager->readConfig ( config, TQString::fromLatin1("ChatViewDock") ); //Work-around to restore dock widget positions - config->setGroup( QString::fromLatin1( "ChatViewDock" ) ); + config->setGroup( TQString::fromLatin1( "ChatViewDock" ) ); membersDockPosition = static_cast( - config->readNumEntry( QString::fromLatin1( "membersDockPosition" ), KDockWidget::DockRight ) ); + config->readNumEntry( TQString::fromLatin1( "membersDockPosition" ), KDockWidget::DockRight ) ); - QString dockKey = QString::fromLatin1( "viewDock" ); + TQString dockKey = TQString::fromLatin1( "viewDock" ); if ( d->visibleMembers ) { if( membersDockPosition == KDockWidget::DockLeft ) - dockKey.prepend( QString::fromLatin1( "membersDock," ) ); + dockKey.prepend( TQString::fromLatin1( "membersDock," ) ); else if( membersDockPosition == KDockWidget::DockRight ) - dockKey.append( QString::fromLatin1( ",membersDock" ) ); + dockKey.append( TQString::fromLatin1( ",membersDock" ) ); } - dockKey.append( QString::fromLatin1( ",editDock:sepPos" ) ); + dockKey.append( TQString::fromLatin1( ",editDock:sepPos" ) ); //kdDebug(14000) << k_funcinfo << "reading splitterpos from key: " << dockKey << endl; int splitterPos = config->readNumEntry( dockKey, 70 ); editDock->manualDock( viewDock, KDockWidget::DockBottom, splitterPos ); @@ -928,23 +928,23 @@ void ChatView::setActive( bool value ) void ChatView::slotRemoteTypingTimeout() { - // Remove the topmost timer from the list. Why does QPtrDict use void* keys and not typed keys? *sigh* + // Remove the topmost timer from the list. Why does TQPtrDict use void* keys and not typed keys? *sigh* if ( !m_remoteTypingMap.isEmpty() ) - remoteTyping( reinterpret_cast( QPtrDictIterator(m_remoteTypingMap).currentKey() ), false ); + remoteTyping( reinterpret_cast( TQPtrDictIterator(m_remoteTypingMap).currentKey() ), false ); } -void ChatView::dragEnterEvent ( QDragEnterEvent * event ) +void ChatView::dragEnterEvent ( TQDragEnterEvent * event ) { if( event->provides( "kopete/x-contact" ) ) { - QStringList lst=QStringList::split( QChar( 0xE000 ) , QString::fromUtf8(event->encodedData ( "kopete/x-contact" )) ); + TQStringList lst=TQStringList::split( TQChar( 0xE000 ) , TQString::fromUtf8(event->encodedData ( "kopete/x-contact" )) ); if(m_manager->mayInvite() && m_manager->protocol()->pluginId() == lst[0] && m_manager->account()->accountId() == lst[1]) { - QString contact=lst[2]; + TQString contact=lst[2]; bool found =false; - QPtrList cts=m_manager->members(); - for ( QPtrListIterator it( cts ); it.current(); ++it ) + TQPtrList cts=m_manager->members(); + for ( TQPtrListIterator it( cts ); it.current(); ++it ) { if(it.current()->contactId() == contact) { @@ -959,13 +959,13 @@ void ChatView::dragEnterEvent ( QDragEnterEvent * event ) } else if( event->provides( "kopete/x-metacontact" ) ) { - QString metacontactID=QString::fromUtf8(event->encodedData ( "kopete/x-metacontact" )); + TQString metacontactID=TQString::fromUtf8(event->encodedData ( "kopete/x-metacontact" )); Kopete::MetaContact *m=Kopete::ContactList::self()->metaContact(metacontactID); if( m && m_manager->mayInvite()) { - QPtrList cts=m->contacts(); - for ( QPtrListIterator it( cts ); it.current(); ++it ) + TQPtrList cts=m->contacts(); + for ( TQPtrListIterator it( cts ); it.current(); ++it ) { Kopete::Contact *c=it.current(); if(c && c->account() == m_manager->account()) @@ -978,7 +978,7 @@ void ChatView::dragEnterEvent ( QDragEnterEvent * event ) } // make sure it doesn't come from the current chat view - then it's an emoticon else if ( event->provides( "text/uri-list" ) && m_manager->members().count() == 1 && - ( event->source() != (QWidget*)m_messagePart->view()->viewport() ) ) + ( event->source() != (TQWidget*)m_messagePart->view()->viewport() ) ) { Kopete::ContactPtrList members = m_manager->members(); Kopete::Contact *contact = members.first(); @@ -989,18 +989,18 @@ void ChatView::dragEnterEvent ( QDragEnterEvent * event ) KDockMainWindow::dragEnterEvent(event); } -void ChatView::dropEvent ( QDropEvent * event ) +void ChatView::dropEvent ( TQDropEvent * event ) { if( event->provides( "kopete/x-contact" ) ) { - QStringList lst=QStringList::split( QChar( 0xE000 ) , QString::fromUtf8(event->encodedData ( "kopete/x-contact" )) ); + TQStringList lst=TQStringList::split( TQChar( 0xE000 ) , TQString::fromUtf8(event->encodedData ( "kopete/x-contact" )) ); if(m_manager->mayInvite() && m_manager->protocol()->pluginId() == lst[0] && m_manager->account()->accountId() == lst[1]) { - QString contact=lst[2]; + TQString contact=lst[2]; bool found =false; - QPtrList cts=m_manager->members(); - for ( QPtrListIterator it( cts ); it.current(); ++it ) + TQPtrList cts=m_manager->members(); + for ( TQPtrListIterator it( cts ); it.current(); ++it ) { if(it.current()->contactId() == contact) { @@ -1014,12 +1014,12 @@ void ChatView::dropEvent ( QDropEvent * event ) } else if( event->provides( "kopete/x-metacontact" ) ) { - QString metacontactID=QString::fromUtf8(event->encodedData ( "kopete/x-metacontact" )); + TQString metacontactID=TQString::fromUtf8(event->encodedData ( "kopete/x-metacontact" )); Kopete::MetaContact *m=Kopete::ContactList::self()->metaContact(metacontactID); if(m && m_manager->mayInvite()) { - QPtrList cts=m->contacts(); - for ( QPtrListIterator it( cts ); it.current(); ++it ) + TQPtrList cts=m->contacts(); + for ( TQPtrListIterator it( cts ); it.current(); ++it ) { Kopete::Contact *c=it.current(); if(c && c->account() == m_manager->account() && c->isOnline()) @@ -1035,7 +1035,7 @@ void ChatView::dropEvent ( QDropEvent * event ) Kopete::ContactPtrList members = m_manager->members(); Kopete::Contact *contact = members.first(); - if ( !contact || !contact->canAcceptFiles() || !QUriDrag::canDecode( event ) ) + if ( !contact || !contact->canAcceptFiles() || !TQUriDrag::canDecode( event ) ) { event->ignore(); return; @@ -1063,19 +1063,19 @@ void ChatView::dropEvent ( QDropEvent * event ) } -void ChatView::registerContextMenuHandler( QObject *target, const char* slot ) +void ChatView::registerContextMenuHandler( TQObject *target, const char* slot ) { connect( m_messagePart, - SIGNAL( contextMenuEvent( Kopete::Message &, const QString &, KPopupMenu * ) ), + TQT_SIGNAL( contextMenuEvent( Kopete::Message &, const TQString &, KPopupMenu * ) ), target, slot ); } -void ChatView::registerTooltipHandler( QObject *target, const char* slot ) +void ChatView::registerTooltipHandler( TQObject *target, const char* slot ) { connect( m_messagePart, - SIGNAL( tooltipEvent( Kopete::Message &, const QString &, QString & ) ), + TQT_SIGNAL( tooltipEvent( Kopete::Message &, const TQString &, TQString & ) ), target, slot ); diff --git a/kopete/kopete/chatwindow/chatview.h b/kopete/kopete/chatwindow/chatview.h index ef10320b..7e083d80 100644 --- a/kopete/kopete/chatwindow/chatview.h +++ b/kopete/kopete/chatwindow/chatview.h @@ -22,7 +22,7 @@ #include "kopeteviewplugin.h" #include #include // for covariant return type of editWidget -#include +#include class QTimer; @@ -69,7 +69,7 @@ public: * Adds text into the edit area. Used when you select an emoticon * @param text The text to be inserted */ - void addText( const QString &text ); + void addText( const TQString &text ); /** * Saves window settings such as splitter positions @@ -101,7 +101,7 @@ public: /** * Sets the text to be displayed on tab label and window caption */ - void setCaption( const QString &text, bool modified ); + void setCaption( const TQString &text, bool modified ); /** * Changes the pointer to the chat window. Used to re-parent the view @@ -155,9 +155,9 @@ public: */ bool visibleMembersList(); - const QString &statusText(); + const TQString &statusText(); - QString &caption() const; + TQString &caption() const; bool sendInProgress(); @@ -171,17 +171,17 @@ public: virtual bool isVisible(); /** Reimplemented from KopeteView **/ - virtual QWidget *mainWidget(); + virtual TQWidget *mainWidget(); KTextEdit *editWidget(); bool canSend(); /** Reimplemented from KopeteView **/ - virtual void registerContextMenuHandler( QObject *target, const char* slot ); + virtual void registerContextMenuHandler( TQObject *target, const char* slot ); /** Reimplemented from KopeteView **/ - virtual void registerTooltipHandler( QObject *target, const char* slot ); + virtual void registerTooltipHandler( TQObject *target, const char* slot ); public slots: /** @@ -205,16 +205,16 @@ public slots: /** * Sets the foreground color of the entry area, and outgoing messages - * @param newColor The new foreground color. If this is QColor(), then + * @param newColor The new foreground color. If this is TQColor(), then * a color chooser dialog is opened */ - void setFgColor( const QColor &newColor = QColor() ); + void setFgColor( const TQColor &newColor = TQColor() ); /** * Sets the font of the edit area and outgoing messages to the specified value. * @param newFont The new font to use. */ - void setFont( const QFont &newFont ); + void setFont( const TQFont &newFont ); /** * show a Font dialog and set the font selected by the user @@ -224,14 +224,14 @@ public slots: /** * Get the font used in the format toolbar for Rich Text formatting */ - QFont font(); + TQFont font(); /** * Sets the background color of the entry area, and outgoing messages - * @param newColor The new background color. If this is QColor(), then + * @param newColor The new background color. If this is TQColor(), then * a color chooser dialog is opened */ - void setBgColor( const QColor &newColor = QColor() ); + void setBgColor( const TQColor &newColor = TQColor() ); /** * Sends the text currently entered into the edit area @@ -256,7 +256,7 @@ public slots: * Sets the text to be displayed on the status label * @param text The text to be displayed */ - void setStatusText( const QString &text ); + void setStatusText( const TQString &text ); /** Reimplemented from KopeteView **/ virtual void messageSentSuccessfully(); @@ -286,13 +286,13 @@ signals: void updateStatusIcon( ChatView* ); /** Emitted when a possible tab tooltip needs updating */ - void updateChatTooltip( ChatView*, const QString& ); + void updateChatTooltip( ChatView*, const TQString& ); /** Emitted when the state of the chat changes */ void updateChatState( ChatView*, int ); /** Emitted when a possible tab label needs updating */ - void updateChatLabel( ChatView*, const QString& ); + void updateChatLabel( ChatView*, const TQString& ); /** * Our send-button-enabled flag has changed @@ -316,7 +316,7 @@ private slots: /** * Show that a contact changed his nickname when a metacontact is not avaiable. */ - void slotPropertyChanged( Kopete::Contact *contact, const QString &key, const QVariant &oldValue, const QVariant &newValue ); + void slotPropertyChanged( Kopete::Contact *contact, const TQString &key, const TQVariant &oldValue, const TQVariant &newValue ); /** * Called when a contact is added to the chat session. @@ -334,7 +334,7 @@ private slots: * @param format The format of the reason message * @param suppressNotification mean that no notifications are showed */ - void slotContactRemoved( const Kopete::Contact *c, const QString& reason, Kopete::Message::MessageFormat format, bool suppressNotification=false ); + void slotContactRemoved( const Kopete::Contact *c, const TQString& reason, Kopete::Message::MessageFormat format, bool suppressNotification=false ); /** * Called when a contact changes status, updates the display name, status icon and tab bar state. @@ -357,11 +357,11 @@ private slots: /** * Show that a (meta)contact change his display name. */ - void slotDisplayNameChanged(const QString &oldValue, const QString &newValue); + void slotDisplayNameChanged(const TQString &oldValue, const TQString &newValue); protected: - virtual void dragEnterEvent ( QDragEnterEvent * ); - virtual void dropEvent ( QDropEvent * ); + virtual void dragEnterEvent ( TQDragEnterEvent * ); + virtual void dropEvent ( TQDropEvent * ); private: // widget stuff @@ -384,9 +384,9 @@ private: MembersListPolicy membersStatus; // miscellany - QPtrDict m_remoteTypingMap; - QString unreadMessageFrom; - QString m_status; + TQPtrDict m_remoteTypingMap; + TQString unreadMessageFrom; + TQString m_status; void updateChatState( KopeteTabState state = Undefined ); @@ -400,7 +400,7 @@ private: */ void readOptions(); - void sendInternalMessage( const QString &msg, Kopete::Message::MessageFormat format = Kopete::Message::PlainText ); + void sendInternalMessage( const TQString &msg, Kopete::Message::MessageFormat format = Kopete::Message::PlainText ); KopeteChatViewPrivate *d; }; @@ -411,7 +411,7 @@ private: class ChatWindowPlugin : public Kopete::ViewPlugin { public: - ChatWindowPlugin(QObject *parent, const char *name, const QStringList &args); + ChatWindowPlugin(TQObject *parent, const char *name, const TQStringList &args); KopeteView* createView( Kopete::ChatSession *manager ); }; diff --git a/kopete/kopete/chatwindow/emoticonselector.cpp b/kopete/kopete/chatwindow/emoticonselector.cpp index e6802b45..47dd1a59 100644 --- a/kopete/kopete/chatwindow/emoticonselector.cpp +++ b/kopete/kopete/chatwindow/emoticonselector.cpp @@ -24,25 +24,25 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -EmoticonLabel::EmoticonLabel(const QString &emoticonText, const QString &pixmapPath, QWidget *parent, const char *name) - : QLabel(parent,name) +EmoticonLabel::EmoticonLabel(const TQString &emoticonText, const TQString &pixmapPath, TQWidget *parent, const char *name) + : TQLabel(parent,name) { mText = emoticonText; - setMovie( QMovie(pixmapPath) ); + setMovie( TQMovie(pixmapPath) ); setAlignment(Qt::AlignCenter); - QToolTip::add(this,emoticonText); - // Somehow QLabel doesn't tell a reasonable size when you use setMovie + TQToolTip::add(this,emoticonText); + // Somehow TQLabel doesn't tell a reasonable size when you use setMovie // although it does it correctly for setPixmap. Therefore here is a little workaround // to tell our minimum size. - QPixmap p(pixmapPath); + TQPixmap p(pixmapPath); // // Some of the custom icons are rather large // so lets limit them to a maximum size for this display panel @@ -52,13 +52,13 @@ EmoticonLabel::EmoticonLabel(const QString &emoticonText, const QString &pixmapP setMinimumSize(p.size()); } -void EmoticonLabel::mouseReleaseEvent(QMouseEvent*) +void EmoticonLabel::mouseReleaseEvent(TQMouseEvent*) { emit clicked(mText); } -EmoticonSelector::EmoticonSelector(QWidget *parent, const char *name) - : QWidget(parent, name) +EmoticonSelector::EmoticonSelector(TQWidget *parent, const char *name) + : TQWidget(parent, name) { // kdDebug(14000) << k_funcinfo << "called." << endl; lay = 0L; @@ -69,13 +69,13 @@ void EmoticonSelector::prepareList(void) // kdDebug(14000) << k_funcinfo << "called." << endl; int row = 0; int col = 0; - QMap list = Kopete::Emoticons::self()->emoticonAndPicList(); + TQMap list = Kopete::Emoticons::self()->emoticonAndPicList(); int emoticonsPerRow = static_cast(sqrt(list.count())); //kdDebug(14000) << "emoticonsPerRow=" << emoticonsPerRow << endl; if ( lay ) { - QObjectList *objList = queryList( "EmoticonLabel" ); + TQObjectList *objList = queryList( "EmoticonLabel" ); //kdDebug(14000) << k_funcinfo << "There are " << objList->count() << " EmoticonLabels to delete." << endl; objList->setAutoDelete(true); objList->clear(); @@ -83,13 +83,13 @@ void EmoticonSelector::prepareList(void) delete lay; } - lay = new QGridLayout(this, 0, 0, 4, 4, "emoticonLayout"); + lay = new TQGridLayout(this, 0, 0, 4, 4, "emoticonLayout"); movieList.clear(); - for (QMap::const_iterator it = list.constBegin(); it != list.constEnd(); ++it ) + for (TQMap::const_iterator it = list.constBegin(); it != list.constEnd(); ++it ) { - QWidget *w = new EmoticonLabel(it.data().first(), it.key(), this); - movieList.push_back( ((QLabel*)w)->movie() ); - connect(w, SIGNAL(clicked(const QString&)), this, SLOT(emoticonClicked(const QString&))); + TQWidget *w = new EmoticonLabel(it.data().first(), it.key(), this); + movieList.push_back( ((TQLabel*)w)->movie() ); + connect(w, TQT_SIGNAL(clicked(const TQString&)), this, TQT_SLOT(emoticonClicked(const TQString&))); // kdDebug(14000) << "adding Emoticon to row=" << row << ", col=" << col << "." << endl; lay->addWidget(w, row, col); if ( col == emoticonsPerRow ) @@ -103,19 +103,19 @@ void EmoticonSelector::prepareList(void) resize(minimumSizeHint()); } -void EmoticonSelector::emoticonClicked(const QString &str) +void EmoticonSelector::emoticonClicked(const TQString &str) { // kdDebug(14000) << "selected emoticon '" << str << "'" << endl; // KDE4/Qt TODO: use qobject_cast instead. emit ItemSelected ( str ); if ( isVisible() && parentWidget() && - parentWidget()->inherits("QPopupMenu") ) + parentWidget()->inherits("TQPopupMenu") ) { parentWidget()->close(); } } -void EmoticonSelector::hideEvent( QHideEvent* ) +void EmoticonSelector::hideEvent( TQHideEvent* ) { kdDebug( 14000 ) << k_funcinfo << endl; MovieList::iterator it; @@ -125,7 +125,7 @@ void EmoticonSelector::hideEvent( QHideEvent* ) } } -void EmoticonSelector::showEvent( QShowEvent* ) +void EmoticonSelector::showEvent( TQShowEvent* ) { kdDebug( 14000 ) << k_funcinfo << endl; MovieList::iterator it; diff --git a/kopete/kopete/chatwindow/emoticonselector.h b/kopete/kopete/chatwindow/emoticonselector.h index 7d7b4842..df51a5b6 100644 --- a/kopete/kopete/chatwindow/emoticonselector.h +++ b/kopete/kopete/chatwindow/emoticonselector.h @@ -20,8 +20,8 @@ #ifndef __emoticonselector_h__ #define __emoticonselector_h__ -#include -#include +#include +#include class QGridLayout; class QHideEvent; class QShowEvent; @@ -31,15 +31,15 @@ class EmoticonLabel : public QLabel Q_OBJECT public: - EmoticonLabel(const QString &emoticonText, const QString &pixmapPath, QWidget *parent=0, const char *name=0); + EmoticonLabel(const TQString &emoticonText, const TQString &pixmapPath, TQWidget *parent=0, const char *name=0); // ~EmoticonLabel(); signals: - void clicked(const QString &text); + void clicked(const TQString &text); protected: - void mouseReleaseEvent(QMouseEvent*); - QString mText; + void mouseReleaseEvent(TQMouseEvent*); + TQString mText; }; class EmoticonSelector : public QWidget @@ -48,28 +48,28 @@ class EmoticonSelector : public QWidget public: - EmoticonSelector ( QWidget *parent = 0, const char *name = 0 ); + EmoticonSelector ( TQWidget *parent = 0, const char *name = 0 ); // ~EmoticonSelector(); - typedef QValueList MovieList; + typedef TQValueList MovieList; signals: /** * gets emitted when an emoticon has been selected from the list - * the QString holds the emoticon as a string or is 0L if nothing was selected + * the TQString holds the emoticon as a string or is 0L if nothing was selected **/ - void ItemSelected(const QString &); + void ItemSelected(const TQString &); public slots: void prepareList(); protected: - virtual void hideEvent( QHideEvent* ); - virtual void showEvent( QShowEvent* ); + virtual void hideEvent( TQHideEvent* ); + virtual void showEvent( TQShowEvent* ); MovieList movieList; - QGridLayout *lay; + TQGridLayout *lay; protected slots: - void emoticonClicked(const QString &); + void emoticonClicked(const TQString &); }; #endif diff --git a/kopete/kopete/chatwindow/kopetechatwindow.cpp b/kopete/kopete/chatwindow/kopetechatwindow.cpp index 2af1426d..ad002edc 100644 --- a/kopete/kopete/chatwindow/kopetechatwindow.cpp +++ b/kopete/kopete/chatwindow/kopetechatwindow.cpp @@ -19,12 +19,12 @@ ************************************************************************* */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -63,13 +63,13 @@ #include "kopetestdaction.h" #include "kopeteviewmanager.h" -#include +#include #include -typedef QMap AccountMap; -typedef QMap GroupMap; -typedef QMap MetaContactMap; -typedef QPtrList WindowList; +typedef TQMap AccountMap; +typedef TQMap GroupMap; +typedef TQMap MetaContactMap; +typedef TQPtrList WindowList; namespace { @@ -164,7 +164,7 @@ KopeteChatWindow *KopeteChatWindow::window( Kopete::ChatSession *manager ) return myWindow; } -KopeteChatWindow::KopeteChatWindow( QWidget *parent, const char* name ) +KopeteChatWindow::KopeteChatWindow( TQWidget *parent, const char* name ) : KParts::MainWindow( parent, name ) { m_activeView = 0L; @@ -175,28 +175,28 @@ KopeteChatWindow::KopeteChatWindow( QWidget *parent, const char* name ) initActions(); - QVBox *vBox = new QVBox( this ); + TQVBox *vBox = new TQVBox( this ); vBox->setLineWidth( 0 ); vBox->setSpacing( 0 ); - vBox->setFrameStyle( QFrame::NoFrame ); + vBox->setFrameStyle( TQFrame::NoFrame ); // set default window size. This could be removed by fixing the size hints of the contents resize( 500, 500 ); setCentralWidget( vBox ); - mainArea = new QFrame( vBox ); + mainArea = new TQFrame( vBox ); mainArea->setLineWidth( 0 ); - mainArea->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); - mainLayout = new QVBoxLayout( mainArea ); + mainArea->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); + mainLayout = new TQVBoxLayout( mainArea ); if ( KopetePrefs::prefs()->chatWShowSend() ) { //Send Button m_button_send = new KPushButton( i18n("Send"), statusBar() ); - m_button_send->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); + m_button_send->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); m_button_send->setEnabled( false ); m_button_send->setFont( statusBar()->font() ); m_button_send->setFixedHeight( statusBar()->sizeHint().height() ); - connect( m_button_send, SIGNAL( clicked() ), this, SLOT( slotSendMessage() ) ); + connect( m_button_send, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSendMessage() ) ); statusBar()->addWidget( m_button_send, 0, true ); } else @@ -214,9 +214,9 @@ KopeteChatWindow::KopeteChatWindow( QWidget *parent, const char* name ) windows.append( this ); windowListChanged(); - KGlobal::config()->setGroup( QString::fromLatin1("ChatWindowSettings") ); - m_alwaysShowTabs = KGlobal::config()->readBoolEntry( QString::fromLatin1("AlwaysShowTabs"), false ); - m_showFormatToolbar = KGlobal::config()->readBoolEntry( QString::fromLatin1("Show Format Toolbar"), true ); + KGlobal::config()->setGroup( TQString::fromLatin1("ChatWindowSettings") ); + m_alwaysShowTabs = KGlobal::config()->readBoolEntry( TQString::fromLatin1("AlwaysShowTabs"), false ); + m_showFormatToolbar = KGlobal::config()->readBoolEntry( TQString::fromLatin1("Show Format Toolbar"), true ); adjustingFormatToolbar = false; // kdDebug( 14010 ) << k_funcinfo << "Open Windows: " << windows.count() << endl; kapp->ref(); @@ -273,7 +273,7 @@ KopeteChatWindow::~KopeteChatWindow() void KopeteChatWindow::windowListChanged() { // update all windows' Move Tab to Window action - for ( QPtrListIterator it( windows ); *it; ++it ) + for ( TQPtrListIterator it( windows ); *it; ++it ) (*it)->checkDetachEnable(); } @@ -283,7 +283,7 @@ void KopeteChatWindow::slotNickComplete() m_activeView->nickComplete(); } -void KopeteChatWindow::slotTabContextMenu( QWidget *tab, const QPoint &pos ) +void KopeteChatWindow::slotTabContextMenu( TQWidget *tab, const TQPoint &pos ) { m_popupView = static_cast( tab ); @@ -313,101 +313,101 @@ void KopeteChatWindow::initActions(void) createStandardStatusBarAction(); - chatSend = new KAction( i18n( "&Send Message" ), QString::fromLatin1( "mail_send" ), QKeySequence(Key_Return) , - this, SLOT( slotSendMessage() ), coll, "chat_send" ); + chatSend = new KAction( i18n( "&Send Message" ), TQString::fromLatin1( "mail_send" ), TQKeySequence(Key_Return) , + this, TQT_SLOT( slotSendMessage() ), coll, "chat_send" ); chatSend->setEnabled( false ); - KStdAction::save ( this, SLOT(slotChatSave()), coll ); - KStdAction::print ( this, SLOT(slotChatPrint()), coll ); - KAction* quitAction = KStdAction::quit ( this, SLOT(close()), coll ); + KStdAction::save ( this, TQT_SLOT(slotChatSave()), coll ); + KStdAction::print ( this, TQT_SLOT(slotChatPrint()), coll ); + KAction* quitAction = KStdAction::quit ( this, TQT_SLOT(close()), coll ); quitAction->setText( i18n("Close All Chats") ); - tabClose = KStdAction::close ( this, SLOT(slotChatClosed()), coll, "tabs_close" ); + tabClose = KStdAction::close ( this, TQT_SLOT(slotChatClosed()), coll, "tabs_close" ); tabRight=new KAction( i18n( "&Activate Next Tab" ), 0, KStdAccel::tabNext(), - this, SLOT( slotNextTab() ), coll, "tabs_right" ); + this, TQT_SLOT( slotNextTab() ), coll, "tabs_right" ); tabLeft=new KAction( i18n( "&Activate Previous Tab" ), 0, KStdAccel::tabPrev(), - this, SLOT( slotPreviousTab() ), coll, "tabs_left" ); + this, TQT_SLOT( slotPreviousTab() ), coll, "tabs_left" ); tabLeft->setEnabled( false ); tabRight->setEnabled( false ); - nickComplete = new KAction( i18n( "Nic&k Completion" ), QString::null, 0, this, SLOT( slotNickComplete() ), coll , "nick_compete"); - nickComplete->setShortcut( QKeySequence( Key_Tab ) ); + nickComplete = new KAction( i18n( "Nic&k Completion" ), TQString::null, 0, this, TQT_SLOT( slotNickComplete() ), coll , "nick_compete"); + nickComplete->setShortcut( TQKeySequence( Key_Tab ) ); - tabDetach = new KAction( i18n( "&Detach Chat" ), QString::fromLatin1( "tab_breakoff" ), 0, - this, SLOT( slotDetachChat() ), coll, "tabs_detach" ); + tabDetach = new KAction( i18n( "&Detach Chat" ), TQString::fromLatin1( "tab_breakoff" ), 0, + this, TQT_SLOT( slotDetachChat() ), coll, "tabs_detach" ); tabDetach->setEnabled( false ); - actionDetachMenu = new KActionMenu( i18n( "&Move Tab to Window" ), QString::fromLatin1( "tab_breakoff" ), coll, "tabs_detachmove" ); + actionDetachMenu = new KActionMenu( i18n( "&Move Tab to Window" ), TQString::fromLatin1( "tab_breakoff" ), coll, "tabs_detachmove" ); actionDetachMenu->setDelayed( false ); - connect ( actionDetachMenu->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotPrepareDetachMenu()) ); - connect ( actionDetachMenu->popupMenu(), SIGNAL(activated(int)), this, SLOT(slotDetachChat(int)) ); + connect ( actionDetachMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotPrepareDetachMenu()) ); + connect ( actionDetachMenu->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDetachChat(int)) ); actionTabPlacementMenu = new KActionMenu( i18n( "&Tab Placement" ), coll, "tabs_placement" ); - connect ( actionTabPlacementMenu->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotPreparePlacementMenu()) ); - connect ( actionTabPlacementMenu->popupMenu(), SIGNAL(activated(int)), this, SLOT(slotPlaceTabs(int)) ); + connect ( actionTabPlacementMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotPreparePlacementMenu()) ); + connect ( actionTabPlacementMenu->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotPlaceTabs(int)) ); - tabDetach->setShortcut( QKeySequence(CTRL + SHIFT + Key_B) ); + tabDetach->setShortcut( TQKeySequence(CTRL + SHIFT + Key_B) ); - KStdAction::cut( this, SLOT(slotCut()), coll); - KStdAction::copy( this, SLOT(slotCopy()), coll); - KStdAction::paste( this, SLOT(slotPaste()), coll); + KStdAction::cut( this, TQT_SLOT(slotCut()), coll); + KStdAction::copy( this, TQT_SLOT(slotCopy()), coll); + KStdAction::paste( this, TQT_SLOT(slotPaste()), coll); - new KAction( i18n( "Set Default &Font..." ), QString::fromLatin1( "charset" ), 0, this, SLOT( slotSetFont() ), coll, "format_font" ); - new KAction( i18n( "Set Default Text &Color..." ), QString::fromLatin1( "pencil" ), 0, this, SLOT( slotSetFgColor() ), coll, "format_fgcolor" ); - new KAction( i18n( "Set &Background Color..." ), QString::fromLatin1( "fill" ), 0, this, SLOT( slotSetBgColor() ), coll, "format_bgcolor" ); + new KAction( i18n( "Set Default &Font..." ), TQString::fromLatin1( "charset" ), 0, this, TQT_SLOT( slotSetFont() ), coll, "format_font" ); + new KAction( i18n( "Set Default Text &Color..." ), TQString::fromLatin1( "pencil" ), 0, this, TQT_SLOT( slotSetFgColor() ), coll, "format_fgcolor" ); + new KAction( i18n( "Set &Background Color..." ), TQString::fromLatin1( "fill" ), 0, this, TQT_SLOT( slotSetBgColor() ), coll, "format_bgcolor" ); - historyUp = new KAction( i18n( "Previous History" ), QString::null, 0, - this, SLOT( slotHistoryUp() ), coll, "history_up" ); - historyUp->setShortcut( QKeySequence(CTRL + Key_Up) ); + historyUp = new KAction( i18n( "Previous History" ), TQString::null, 0, + this, TQT_SLOT( slotHistoryUp() ), coll, "history_up" ); + historyUp->setShortcut( TQKeySequence(CTRL + Key_Up) ); - historyDown = new KAction( i18n( "Next History" ), QString::null, 0, - this, SLOT( slotHistoryDown() ), coll, "history_down" ); - historyDown->setShortcut( QKeySequence(CTRL + Key_Down) ); + historyDown = new KAction( i18n( "Next History" ), TQString::null, 0, + this, TQT_SLOT( slotHistoryDown() ), coll, "history_down" ); + historyDown->setShortcut( TQKeySequence(CTRL + Key_Down) ); - KStdAction::prior( this, SLOT( slotPageUp() ), coll, "scroll_up" ); - KStdAction::next( this, SLOT( slotPageDown() ), coll, "scroll_down" ); + KStdAction::prior( this, TQT_SLOT( slotPageUp() ), coll, "scroll_up" ); + KStdAction::next( this, TQT_SLOT( slotPageDown() ), coll, "scroll_down" ); - KStdAction::showMenubar( this, SLOT(slotViewMenuBar()), coll ); + KStdAction::showMenubar( this, TQT_SLOT(slotViewMenuBar()), coll ); - membersLeft = new KToggleAction( i18n( "Place to Left of Chat Area" ), QString::null, 0, - this, SLOT( slotViewMembersLeft() ), coll, "options_membersleft" ); - membersRight = new KToggleAction( i18n( "Place to Right of Chat Area" ), QString::null, 0, - this, SLOT( slotViewMembersRight() ), coll, "options_membersright" ); - toggleMembers = new KToggleAction( i18n( "Show" ), QString::null, 0, - this, SLOT( slotToggleViewMembers() ), coll, "options_togglemembers" ); + membersLeft = new KToggleAction( i18n( "Place to Left of Chat Area" ), TQString::null, 0, + this, TQT_SLOT( slotViewMembersLeft() ), coll, "options_membersleft" ); + membersRight = new KToggleAction( i18n( "Place to Right of Chat Area" ), TQString::null, 0, + this, TQT_SLOT( slotViewMembersRight() ), coll, "options_membersright" ); + toggleMembers = new KToggleAction( i18n( "Show" ), TQString::null, 0, + this, TQT_SLOT( slotToggleViewMembers() ), coll, "options_togglemembers" ); toggleMembers->setCheckedState(i18n("Hide")); - toggleAutoSpellCheck = new KToggleAction( i18n( "Automatic Spell Checking" ), QString::null, 0, - this, SLOT( toggleAutoSpellChecking() ), coll, "enable_auto_spell_check" ); + toggleAutoSpellCheck = new KToggleAction( i18n( "Automatic Spell Checking" ), TQString::null, 0, + this, TQT_SLOT( toggleAutoSpellChecking() ), coll, "enable_auto_spell_check" ); toggleAutoSpellCheck->setChecked( true ); actionSmileyMenu = new KopeteEmoticonAction( coll, "format_smiley" ); actionSmileyMenu->setDelayed( false ); - connect(actionSmileyMenu, SIGNAL(activated(const QString &)), this, SLOT(slotSmileyActivated(const QString &))); + connect(actionSmileyMenu, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotSmileyActivated(const TQString &))); actionContactMenu = new KActionMenu(i18n("Co&ntacts"), coll, "contacts_menu" ); actionContactMenu->setDelayed( false ); - connect ( actionContactMenu->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(slotPrepareContactMenu()) ); + connect ( actionContactMenu->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotPrepareContactMenu()) ); // add configure key bindings menu item - KStdAction::keyBindings( guiFactory(), SLOT( configureShortcuts() ), coll ); + KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ), coll ); - KStdAction::configureToolbars(this, SLOT(slotConfToolbar()), coll); + KStdAction::configureToolbars(this, TQT_SLOT(slotConfToolbar()), coll); KopeteStdAction::preferences( coll , "settings_prefs" ); //The Sending movie - normalIcon = QPixmap( BarIcon( QString::fromLatin1( "kopete" ) ) ); - animIcon = KGlobal::iconLoader()->loadMovie( QString::fromLatin1( "newmessage" ), KIcon::Toolbar); + normalIcon = TQPixmap( BarIcon( TQString::fromLatin1( "kopete" ) ) ); + animIcon = KGlobal::iconLoader()->loadMovie( TQString::fromLatin1( "newmessage" ), KIcon::Toolbar); // Pause the animation because otherwise it's running even when we're not // showing it. This eats resources, and also triggers a pixmap leak in - // QMovie in at least Qt 3.1, Qt 3.2 and the current Qt 3.3 beta + // TQMovie in at least Qt 3.1, Qt 3.2 and the current Qt 3.3 beta if( !animIcon.isNull() ) //and another QT bug: it crash if we pause a null movie animIcon.pause(); // we can't set the tool bar as parent, if we do, it will be deleted when we configure toolbars - anim = new QLabel( QString::null, 0L ,"kde toolbar widget" ); + anim = new TQLabel( TQString::null, 0L ,"kde toolbar widget" ); anim->setMargin(5); anim->setPixmap( normalIcon ); @@ -418,20 +418,20 @@ void KopeteChatWindow::initActions(void) //toolBar()->alignItemRight( 99 ); setStandardToolBarMenuEnabled( true ); - setXMLFile( QString::fromLatin1( "kopetechatwindow.rc" ) ); + setXMLFile( TQString::fromLatin1( "kopetechatwindow.rc" ) ); createGUI( 0L ); // Special handling for remembering whether the format toolbar is visible or not - connect ( toolBar("formatToolBar"), SIGNAL(visibilityChanged(bool)), this, SLOT(slotToggleFormatToolbar(bool)) ); + connect ( toolBar("formatToolBar"), TQT_SIGNAL(visibilityChanged(bool)), this, TQT_SLOT(slotToggleFormatToolbar(bool)) ); } -const QString KopeteChatWindow::fileContents( const QString &path ) const +const TQString KopeteChatWindow::fileContents( const TQString &path ) const { - QString contents; - QFile file( path ); + TQString contents; + TQFile file( path ); if ( file.open( IO_ReadOnly ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); contents = stream.read(); file.close(); } @@ -581,7 +581,7 @@ void KopeteChatWindow::slotSetBgColor() m_activeView->setBgColor(); } -void KopeteChatWindow::setStatus(const QString &text) +void KopeteChatWindow::setStatus(const TQString &text) { m_status_text->setText(text); } @@ -590,28 +590,28 @@ void KopeteChatWindow::createTabBar() { if( !m_tabBar ) { - KGlobal::config()->setGroup( QString::fromLatin1("ChatWindowSettings") ); + KGlobal::config()->setGroup( TQString::fromLatin1("ChatWindowSettings") ); m_tabBar = new KTabWidget( mainArea ); - m_tabBar->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); - m_tabBar->setHoverCloseButton(KGlobal::config()->readBoolEntry( QString::fromLatin1("HoverClose"), false )); + m_tabBar->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); + m_tabBar->setHoverCloseButton(KGlobal::config()->readBoolEntry( TQString::fromLatin1("HoverClose"), false )); m_tabBar->setTabReorderingEnabled(true); #if KDE_IS_VERSION(3,4,0) m_tabBar->setAutomaticResizeTabs(true); #endif - connect( m_tabBar, SIGNAL( closeRequest( QWidget* )), this, SLOT( slotCloseChat( QWidget* ) ) ); + connect( m_tabBar, TQT_SIGNAL( closeRequest( TQWidget* )), this, TQT_SLOT( slotCloseChat( TQWidget* ) ) ); - QToolButton* m_rightWidget = new QToolButton( m_tabBar ); - connect( m_rightWidget, SIGNAL( clicked() ), this, SLOT( slotChatClosed() ) ); + TQToolButton* m_rightWidget = new TQToolButton( m_tabBar ); + connect( m_rightWidget, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotChatClosed() ) ); m_rightWidget->setIconSet( SmallIcon( "tab_remove" ) ); m_rightWidget->adjustSize(); - QToolTip::add( m_rightWidget, i18n("Close the current tab")); - m_tabBar->setCornerWidget( m_rightWidget, QWidget::TopRight ); + TQToolTip::add( m_rightWidget, i18n("Close the current tab")); + m_tabBar->setCornerWidget( m_rightWidget, TQWidget::TopRight ); mainLayout->addWidget( m_tabBar ); m_tabBar->show(); - connect ( m_tabBar, SIGNAL(currentChanged(QWidget *)), this, SLOT(setActiveView(QWidget *)) ); - connect ( m_tabBar, SIGNAL(contextMenu(QWidget *, const QPoint & )), this, SLOT(slotTabContextMenu( QWidget *, const QPoint & )) ); + connect ( m_tabBar, TQT_SIGNAL(currentChanged(TQWidget *)), this, TQT_SLOT(setActiveView(TQWidget *)) ); + connect ( m_tabBar, TQT_SIGNAL(contextMenu(TQWidget *, const TQPoint & )), this, TQT_SLOT(slotTabContextMenu( TQWidget *, const TQPoint & )) ); for( ChatView *view = chatViewList.first(); view; view = chatViewList.next() ) addTab( view ); @@ -621,35 +621,35 @@ void KopeteChatWindow::createTabBar() else setActiveView( chatViewList.first() ); - int tabPosition = KGlobal::config()->readNumEntry( QString::fromLatin1("Tab Placement") , 0 ); + int tabPosition = KGlobal::config()->readNumEntry( TQString::fromLatin1("Tab Placement") , 0 ); slotPlaceTabs( tabPosition ); } } -void KopeteChatWindow::slotCloseChat( QWidget *chatView ) +void KopeteChatWindow::slotCloseChat( TQWidget *chatView ) { static_cast( chatView )->closeView(); } void KopeteChatWindow::addTab( ChatView *view ) { - QPtrList chatMembers=view->msgManager()->members(); + TQPtrList chatMembers=view->msgManager()->members(); Kopete::Contact *c=0L; for ( Kopete::Contact *contact = chatMembers.first(); contact; contact = chatMembers.next() ) { if(!c || c->onlineStatus() < contact->onlineStatus()) c=contact; } - QPixmap pluginIcon = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c) : SmallIcon( view->msgManager()->protocol()->pluginIcon() ); + TQPixmap pluginIcon = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c) : SmallIcon( view->msgManager()->protocol()->pluginIcon() ); - view->reparent( m_tabBar, 0, QPoint(), true ); + view->reparent( m_tabBar, 0, TQPoint(), true ); m_tabBar->addTab( view, pluginIcon, view->caption() ); if( view == m_activeView ) view->show(); else view->hide(); - connect( view, SIGNAL( captionChanged( bool ) ), this, SLOT( updateChatLabel() ) ); - connect( view, SIGNAL( updateStatusIcon( ChatView* ) ), this, SLOT( slotUpdateCaptionIcons( ChatView* ) ) ); + connect( view, TQT_SIGNAL( captionChanged( bool ) ), this, TQT_SLOT( updateChatLabel() ) ); + connect( view, TQT_SIGNAL( updateStatusIcon( ChatView* ) ), this, TQT_SLOT( slotUpdateCaptionIcons( ChatView* ) ) ); view->setCaption( view->caption(), false ); } @@ -657,8 +657,8 @@ void KopeteChatWindow::setPrimaryChatView( ChatView *view ) { //TODO figure out what else we have to save here besides the font //reparent clears a lot of stuff out - QFont savedFont = view->font(); - view->reparent( mainArea, 0, QPoint(), true ); + TQFont savedFont = view->font(); + view->reparent( mainArea, 0, TQPoint(), true ); view->setFont( savedFont ); view->show(); @@ -670,8 +670,8 @@ void KopeteChatWindow::deleteTabBar() { if( m_tabBar ) { - disconnect ( m_tabBar, SIGNAL(currentChanged(QWidget *)), this, SLOT(setActiveView(QWidget *)) ); - disconnect ( m_tabBar, SIGNAL(contextMenu(QWidget *, const QPoint & )), this, SLOT(slotTabContextMenu( QWidget *, const QPoint & )) ); + disconnect ( m_tabBar, TQT_SIGNAL(currentChanged(TQWidget *)), this, TQT_SLOT(setActiveView(TQWidget *)) ); + disconnect ( m_tabBar, TQT_SIGNAL(contextMenu(TQWidget *, const TQPoint & )), this, TQT_SLOT(slotTabContextMenu( TQWidget *, const TQPoint & )) ); if( !chatViewList.isEmpty() ) setPrimaryChatView( chatViewList.first() ); @@ -700,17 +700,17 @@ void KopeteChatWindow::attachChatView( ChatView* newView ) newView->editWidget()->installEventFilter( this ); KCursor::setAutoHideCursor( newView->editWidget(), true, true ); - connect( newView, SIGNAL(captionChanged( bool)), this, SLOT(slotSetCaption(bool)) ); - connect( newView, SIGNAL(messageSuccess( ChatView* )), this, SLOT(slotStopAnimation( ChatView* )) ); - connect( newView, SIGNAL(rtfEnabled( ChatView*, bool ) ), this, SLOT( slotRTFEnabled( ChatView*, bool ) ) ); - connect( newView, SIGNAL(updateStatusIcon( ChatView* ) ), this, SLOT(slotUpdateCaptionIcons( ChatView* ) ) ); - connect( newView, SIGNAL(updateChatState( ChatView*, int ) ), this, SLOT( updateChatState( ChatView*, int ) ) ); + connect( newView, TQT_SIGNAL(captionChanged( bool)), this, TQT_SLOT(slotSetCaption(bool)) ); + connect( newView, TQT_SIGNAL(messageSuccess( ChatView* )), this, TQT_SLOT(slotStopAnimation( ChatView* )) ); + connect( newView, TQT_SIGNAL(rtfEnabled( ChatView*, bool ) ), this, TQT_SLOT( slotRTFEnabled( ChatView*, bool ) ) ); + connect( newView, TQT_SIGNAL(updateStatusIcon( ChatView* ) ), this, TQT_SLOT(slotUpdateCaptionIcons( ChatView* ) ) ); + connect( newView, TQT_SIGNAL(updateChatState( ChatView*, int ) ), this, TQT_SLOT( updateChatState( ChatView*, int ) ) ); updateSpellCheckAction(); checkDetachEnable(); newView->loadChatSettings(); - connect( newView, SIGNAL(autoSpellCheckEnabled( ChatView*, bool ) ), - this, SLOT( slotAutoSpellCheckEnabled( ChatView*, bool ) ) ); + connect( newView, TQT_SIGNAL(autoSpellCheckEnabled( ChatView*, bool ) ), + this, TQT_SLOT( slotAutoSpellCheckEnabled( ChatView*, bool ) ) ); } void KopeteChatWindow::checkDetachEnable() @@ -730,15 +730,15 @@ void KopeteChatWindow::detachChatView( ChatView *view ) if( !chatViewList.removeRef( view ) ) return; - disconnect( view, SIGNAL(captionChanged( bool)), this, SLOT(slotSetCaption(bool)) ); - disconnect( view, SIGNAL( updateStatusIcon( ChatView* ) ), this, SLOT( slotUpdateCaptionIcons( ChatView* ) ) ); - disconnect( view, SIGNAL( updateChatState( ChatView*, int ) ), this, SLOT( updateChatState( ChatView*, int ) ) ); + disconnect( view, TQT_SIGNAL(captionChanged( bool)), this, TQT_SLOT(slotSetCaption(bool)) ); + disconnect( view, TQT_SIGNAL( updateStatusIcon( ChatView* ) ), this, TQT_SLOT( slotUpdateCaptionIcons( ChatView* ) ) ); + disconnect( view, TQT_SIGNAL( updateChatState( ChatView*, int ) ), this, TQT_SLOT( updateChatState( ChatView*, int ) ) ); view->editWidget()->removeEventFilter( this ); if( m_tabBar ) { int curPage = m_tabBar->currentPageIndex(); - QWidget *page = m_tabBar->page( curPage ); + TQWidget *page = m_tabBar->page( curPage ); // if the current view is to be detached, switch to a different one if( page == view ) @@ -818,7 +818,7 @@ void KopeteChatWindow::slotSetCaption( bool active ) } } -void KopeteChatWindow::updateBackground( const QPixmap &pm ) +void KopeteChatWindow::updateBackground( const TQPixmap &pm ) { if( updateBg ) { @@ -829,13 +829,13 @@ void KopeteChatWindow::updateBackground( const QPixmap &pm ) backgroundFile->unlink(); } - backgroundFile = new KTempFile( QString::null, QString::fromLatin1( ".bmp" ) ); + backgroundFile = new KTempFile( TQString::null, TQString::fromLatin1( ".bmp" ) ); pm.save( backgroundFile->name(), "BMP" ); - QTimer::singleShot( 100, this, SLOT( slotEnableUpdateBg() ) ); + TQTimer::singleShot( 100, this, TQT_SLOT( slotEnableUpdateBg() ) ); } } -void KopeteChatWindow::setActiveView( QWidget *widget ) +void KopeteChatWindow::setActiveView( TQWidget *widget ) { ChatView *view = static_cast(widget); @@ -844,7 +844,7 @@ void KopeteChatWindow::setActiveView( QWidget *widget ) if(m_activeView) { - disconnect( m_activeView, SIGNAL( canSendChanged(bool) ), this, SLOT( slotUpdateSendEnabled() ) ); + disconnect( m_activeView, TQT_SIGNAL( canSendChanged(bool) ), this, TQT_SLOT( slotUpdateSendEnabled() ) ); guiFactory()->removeClient(m_activeView->msgManager()); m_activeView->saveChatSettings(); } @@ -860,7 +860,7 @@ void KopeteChatWindow::setActiveView( QWidget *widget ) if( !chatViewList.contains( view ) ) attachChatView( view ); - connect( m_activeView, SIGNAL( canSendChanged(bool) ), this, SLOT( slotUpdateSendEnabled() ) ); + connect( m_activeView, TQT_SIGNAL( canSendChanged(bool) ), this, TQT_SLOT( slotUpdateSendEnabled() ) ); //Tell it it is active m_activeView->setActive( true ); @@ -905,7 +905,7 @@ void KopeteChatWindow::slotUpdateCaptionIcons( ChatView *view ) if ( !view ) return; //(pas de charité) - QPtrList chatMembers=view->msgManager()->members(); + TQPtrList chatMembers=view->msgManager()->members(); Kopete::Contact *c=0L; for ( Kopete::Contact *contact = chatMembers.first(); contact; contact = chatMembers.next() ) { @@ -915,9 +915,9 @@ void KopeteChatWindow::slotUpdateCaptionIcons( ChatView *view ) if ( view == m_activeView ) { - QPixmap icon16 = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c , 16) : + TQPixmap icon16 = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c , 16) : SmallIcon( view->msgManager()->protocol()->pluginIcon() ); - QPixmap icon32 = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c , 32) : + TQPixmap icon32 = c ? view->msgManager()->contactOnlineStatus( c ).iconFor( c , 32) : SmallIcon( view->msgManager()->protocol()->pluginIcon() ); KWin::setIcons( winId(), icon32, icon16 ); } @@ -937,7 +937,7 @@ void KopeteChatWindow::slotChatClosed() void KopeteChatWindow::slotPrepareDetachMenu(void) { - QPopupMenu *detachMenu = actionDetachMenu->popupMenu(); + TQPopupMenu *detachMenu = actionDetachMenu->popupMenu(); detachMenu->clear(); for ( unsigned id=0; id < windows.count(); id++ ) @@ -963,7 +963,7 @@ void KopeteChatWindow::slotSendMessage() void KopeteChatWindow::slotPrepareContactMenu(void) { - QPopupMenu *contactsMenu = actionContactMenu->popupMenu(); + TQPopupMenu *contactsMenu = actionContactMenu->popupMenu(); contactsMenu->clear(); Kopete::Contact *contact; @@ -982,8 +982,8 @@ void KopeteChatWindow::slotPrepareContactMenu(void) for ( contact = m_them.first(); contact; contact = m_them.next() ) { KPopupMenu *p = contact->popupMenu(); - connect ( actionContactMenu->popupMenu(), SIGNAL(aboutToHide()), - p, SLOT(deleteLater() ) ); + connect ( actionContactMenu->popupMenu(), TQT_SIGNAL(aboutToHide()), + p, TQT_SLOT(deleteLater() ) ); if( contact->metaContact() ) contactsMenu->insertItem( contact->onlineStatus().iconFor( contact ) , contact->metaContact()->displayName(), p ); @@ -994,9 +994,9 @@ void KopeteChatWindow::slotPrepareContactMenu(void) if( ++contactCount == 15 && contact != m_them.getLast() ) { KActionMenu *moreMenu = new KActionMenu( i18n("More..."), - QString::fromLatin1("folder_open"), contactsMenu ); - connect ( actionContactMenu->popupMenu(), SIGNAL(aboutToHide()), - moreMenu, SLOT(deleteLater() ) ); + TQString::fromLatin1("folder_open"), contactsMenu ); + connect ( actionContactMenu->popupMenu(), TQT_SIGNAL(aboutToHide()), + moreMenu, TQT_SLOT(deleteLater() ) ); moreMenu->plug( contactsMenu ); contactsMenu = moreMenu->popupMenu(); contactCount = 0; @@ -1006,7 +1006,7 @@ void KopeteChatWindow::slotPrepareContactMenu(void) void KopeteChatWindow::slotPreparePlacementMenu() { - QPopupMenu *placementMenu = actionTabPlacementMenu->popupMenu(); + TQPopupMenu *placementMenu = actionTabPlacementMenu->popupMenu(); placementMenu->clear(); placementMenu->insertItem( i18n("Top"), 0 ); @@ -1019,9 +1019,9 @@ void KopeteChatWindow::slotPlaceTabs( int placement ) { if( placement == 0 ) - m_tabBar->setTabPosition( QTabWidget::Top ); + m_tabBar->setTabPosition( TQTabWidget::Top ); else - m_tabBar->setTabPosition( QTabWidget::Bottom ); + m_tabBar->setTabPosition( TQTabWidget::Bottom ); saveOptions(); } @@ -1032,9 +1032,9 @@ void KopeteChatWindow::readOptions() // load and apply config file settings affecting the appearance of the UI // kdDebug(14010) << k_funcinfo << endl; KConfig *config = KGlobal::config(); - applyMainWindowSettings( config, QString::fromLatin1( "KopeteChatWindow" ) ); - config->setGroup( QString::fromLatin1("ChatWindowSettings") ); - m_showFormatToolbar = config->readBoolEntry( QString::fromLatin1("Show Format Toolbar"), true ); + applyMainWindowSettings( config, TQString::fromLatin1( "KopeteChatWindow" ) ); + config->setGroup( TQString::fromLatin1("ChatWindowSettings") ); + m_showFormatToolbar = config->readBoolEntry( TQString::fromLatin1("Show Format Toolbar"), true ); } void KopeteChatWindow::saveOptions() @@ -1044,12 +1044,12 @@ void KopeteChatWindow::saveOptions() KConfig *config = KGlobal::config(); // saves menubar,toolbar and statusbar setting - saveMainWindowSettings( config, QString::fromLatin1( "KopeteChatWindow" ) ); - config->setGroup( QString::fromLatin1("ChatWindowSettings") ); + saveMainWindowSettings( config, TQString::fromLatin1( "KopeteChatWindow" ) ); + config->setGroup( TQString::fromLatin1("ChatWindowSettings") ); if( m_tabBar ) - config->writeEntry ( QString::fromLatin1("Tab Placement"), m_tabBar->tabPosition() ); + config->writeEntry ( TQString::fromLatin1("Tab Placement"), m_tabBar->tabPosition() ); - config->writeEntry( QString::fromLatin1("Show Format Toolbar"), m_showFormatToolbar ); + config->writeEntry( TQString::fromLatin1("Show Format Toolbar"), m_showFormatToolbar ); config->sync(); } @@ -1094,7 +1094,7 @@ void KopeteChatWindow::slotViewMenuBar() menuBar()->show(); } -void KopeteChatWindow::slotSmileyActivated(const QString &sm) +void KopeteChatWindow::slotSmileyActivated(const TQString &sm) { if ( !sm.isNull() ) m_activeView->addText( " " + sm + " " ); @@ -1130,10 +1130,10 @@ bool KopeteChatWindow::queryClose() bool canClose = true; // kdDebug( 14010 ) << " Windows left open:" << endl; -// for( QPtrListIterator it( chatViewList ); it; ++it) +// for( TQPtrListIterator it( chatViewList ); it; ++it) // kdDebug( 14010 ) << " " << *it << " (" << (*it)->caption() << ")" << endl; - for( QPtrListIterator it( chatViewList ); it; ) + for( TQPtrListIterator it( chatViewList ); it; ) { ChatView *view = *it; // move out of the way before view is removed @@ -1169,7 +1169,7 @@ bool KopeteChatWindow::queryExit() return false; } -void KopeteChatWindow::closeEvent( QCloseEvent * e ) +void KopeteChatWindow::closeEvent( TQCloseEvent * e ) { // if there's a system tray applet and we are not shutting down then just do what needs to be done if a // window is closed. @@ -1197,7 +1197,7 @@ void KopeteChatWindow::slotConfKeys() if( m_activeView ) { dlg.insert(m_activeView->msgManager()->actionCollection() , i18n("Plugin Actions") ); - QPtrListIterator it( *m_activeView->msgManager()->childClients() ); + TQPtrListIterator it( *m_activeView->msgManager()->childClients() ); KXMLGUIClient *c = 0; while( (c = it.current()) != 0 ) { @@ -1214,7 +1214,7 @@ void KopeteChatWindow::slotConfKeys() void KopeteChatWindow::slotConfToolbar() { - saveMainWindowSettings(KGlobal::config(), QString::fromLatin1( "KopeteChatWindow" )); + saveMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteChatWindow" )); KEditToolbar *dlg = new KEditToolbar(factory(), this ); if (dlg->exec()) { @@ -1222,7 +1222,7 @@ void KopeteChatWindow::slotConfToolbar() createGUI( m_activeView->editPart() ); else createGUI( 0L ); - applyMainWindowSettings(KGlobal::config(), QString::fromLatin1( "KopeteChatWindow" )); + applyMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteChatWindow" )); } delete dlg; } @@ -1256,7 +1256,7 @@ void KopeteChatWindow::updateChatState( ChatView* cv, int newState ) void KopeteChatWindow::updateChatTooltip( ChatView* cv ) { if ( m_tabBar ) - m_tabBar->setTabToolTip( cv, QString::fromLatin1("%1").arg( cv->caption() ) ); + m_tabBar->setTabToolTip( cv, TQString::fromLatin1("%1").arg( cv->caption() ) ); } void KopeteChatWindow::updateChatLabel() @@ -1269,7 +1269,7 @@ void KopeteChatWindow::updateChatLabel() if ( m_tabBar ) { m_tabBar->setTabLabel( chat, chat->caption() ); - if ( m_tabBar->count() < 2 || m_tabBar->currentPage() == static_cast(cv) ) + if ( m_tabBar->count() < 2 || m_tabBar->currentPage() == static_cast(cv) ) setCaption( chat->caption() ); } } diff --git a/kopete/kopete/chatwindow/kopetechatwindow.h b/kopete/kopete/chatwindow/kopetechatwindow.h index 39277d86..6b896d81 100644 --- a/kopete/kopete/chatwindow/kopetechatwindow.h +++ b/kopete/kopete/chatwindow/kopetechatwindow.h @@ -20,7 +20,7 @@ #define KOPETECHATWINDOW_H #include -#include +#include #include "kopetecontact.h" #include "kdeversion.h" @@ -48,7 +48,7 @@ class Message; class ChatSession; class Contact; class Protocol; -typedef QPtrList ContactPtrList; +typedef TQPtrList ContactPtrList; } class KopeteChatWindow : public KParts::MainWindow @@ -92,7 +92,7 @@ public: ChatView *activeView(); void updateMembersActions(); - void setStatus( const QString & ); + void setStatus( const TQString & ); /** * Reimplemented from KMainWindow - asks each ChatView in the window if it is ok to close the window @@ -102,11 +102,11 @@ public: virtual bool queryExit(); KTempFile *backgroundFile; - QPtrList chatViewList; + TQPtrList chatViewList; private: // All KopeteChatWindows are created by the window function - KopeteChatWindow( QWidget *parent = 0, const char* name = "KopeteChatWindow" ); + KopeteChatWindow( TQWidget *parent = 0, const char* name = "KopeteChatWindow" ); /** * The window list has changed: @@ -122,7 +122,7 @@ private: void deleteTabBar(); void addTab( ChatView* ); void setPrimaryChatView( ChatView* ); - const QString fileContents( const QString &file ) const; + const TQString fileContents( const TQString &file ) const; ChatView *m_activeView; ChatView *m_popupView; @@ -133,11 +133,11 @@ private: KTabWidget *m_tabBar; KPushButton *m_button_send; KSqueezedTextLabel *m_status_text; - QVBoxLayout *mainLayout; - QFrame *mainArea; - QLabel *anim; - QMovie animIcon; - QPixmap normalIcon; + TQVBoxLayout *mainLayout; + TQFrame *mainArea; + TQLabel *anim; + TQMovie animIcon; + TQPixmap normalIcon; KAction *chatSend; KAction *historyUp; @@ -161,15 +161,15 @@ private: KActionMenu *actionContactMenu; KActionMenu *actionDetachMenu; KActionMenu *actionTabPlacementMenu; - QString statusMsg; + TQString statusMsg; signals: void closing( KopeteChatWindow* ); public slots: - void slotSmileyActivated( const QString & ); - void setActiveView( QWidget *active ); - void updateBackground( const QPixmap &pm ); + void slotSmileyActivated( const TQString & ); + void setActiveView( TQWidget *active ); + void updateBackground( const TQPixmap &pm ); private slots: // void slotPrepareSmileyMenu(); @@ -219,10 +219,10 @@ private slots: void slotSetCaption( bool ); void slotUpdateCaptionIcons( ChatView * ); void slotChatClosed(); - void slotTabContextMenu( QWidget*, const QPoint & ); + void slotTabContextMenu( TQWidget*, const TQPoint & ); void slotStopAnimation( ChatView* ); void slotNickComplete(); - void slotCloseChat( QWidget* ); + void slotCloseChat( TQWidget* ); //slots for tabs from the chatview widget void updateChatState( ChatView* cv, int state ); @@ -233,7 +233,7 @@ private: void updateSpellCheckAction(); protected: - virtual void closeEvent( QCloseEvent *e ); + virtual void closeEvent( TQCloseEvent *e ); virtual void windowActivationChange( bool ); }; diff --git a/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp b/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp index 3e15281f..76e7fd54 100644 --- a/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp +++ b/kopete/kopete/chatwindow/kopetechatwindowstyle.cpp @@ -18,10 +18,10 @@ #include "kopetechatwindowstyle.h" // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include // KDE includes #include @@ -30,39 +30,39 @@ class ChatWindowStyle::Private { public: - QString stylePath; + TQString stylePath; StyleVariants variantsList; - QString baseHref; - QString currentVariantPath; + TQString baseHref; + TQString currentVariantPath; - QString headerHtml; - QString footerHtml; - QString incomingHtml; - QString nextIncomingHtml; - QString outgoingHtml; - QString nextOutgoingHtml; - QString statusHtml; - QString actionIncomingHtml; - QString actionOutgoingHtml; + TQString headerHtml; + TQString footerHtml; + TQString incomingHtml; + TQString nextIncomingHtml; + TQString outgoingHtml; + TQString nextOutgoingHtml; + TQString statusHtml; + TQString actionIncomingHtml; + TQString actionOutgoingHtml; }; -ChatWindowStyle::ChatWindowStyle(const QString &stylePath, int styleBuildMode) +ChatWindowStyle::ChatWindowStyle(const TQString &stylePath, int styleBuildMode) : d(new Private) { init(stylePath, styleBuildMode); } -ChatWindowStyle::ChatWindowStyle(const QString &stylePath, const QString &variantPath, int styleBuildMode) +ChatWindowStyle::ChatWindowStyle(const TQString &stylePath, const TQString &variantPath, int styleBuildMode) : d(new Private) { d->currentVariantPath = variantPath; init(stylePath, styleBuildMode); } -void ChatWindowStyle::init(const QString &stylePath, int styleBuildMode) +void ChatWindowStyle::init(const TQString &stylePath, int styleBuildMode) { d->stylePath = stylePath; - d->baseHref = stylePath + QString::fromUtf8("/Contents/Resources/"); + d->baseHref = stylePath + TQString::fromUtf8("/Contents/Resources/"); readStyleFiles(); if(styleBuildMode & StyleBuildNormal) { @@ -86,57 +86,57 @@ ChatWindowStyle::StyleVariants ChatWindowStyle::getVariants() return d->variantsList; } -QString ChatWindowStyle::getStylePath() const +TQString ChatWindowStyle::getStylePath() const { return d->stylePath; } -QString ChatWindowStyle::getStyleBaseHref() const +TQString ChatWindowStyle::getStyleBaseHref() const { return d->baseHref; } -QString ChatWindowStyle::getHeaderHtml() const +TQString ChatWindowStyle::getHeaderHtml() const { return d->headerHtml; } -QString ChatWindowStyle::getFooterHtml() const +TQString ChatWindowStyle::getFooterHtml() const { return d->footerHtml; } -QString ChatWindowStyle::getIncomingHtml() const +TQString ChatWindowStyle::getIncomingHtml() const { return d->incomingHtml; } -QString ChatWindowStyle::getNextIncomingHtml() const +TQString ChatWindowStyle::getNextIncomingHtml() const { return d->nextIncomingHtml; } -QString ChatWindowStyle::getOutgoingHtml() const +TQString ChatWindowStyle::getOutgoingHtml() const { return d->outgoingHtml; } -QString ChatWindowStyle::getNextOutgoingHtml() const +TQString ChatWindowStyle::getNextOutgoingHtml() const { return d->nextOutgoingHtml; } -QString ChatWindowStyle::getStatusHtml() const +TQString ChatWindowStyle::getStatusHtml() const { return d->statusHtml; } -QString ChatWindowStyle::getActionIncomingHtml() const +TQString ChatWindowStyle::getActionIncomingHtml() const { return d->actionIncomingHtml; } -QString ChatWindowStyle::getActionOutgoingHtml() const +TQString ChatWindowStyle::getActionOutgoingHtml() const { return d->actionOutgoingHtml; } @@ -148,131 +148,131 @@ bool ChatWindowStyle::hasActionTemplate() const void ChatWindowStyle::listVariants() { - QString variantDirPath = d->baseHref + QString::fromUtf8("Variants/"); - QDir variantDir(variantDirPath); + TQString variantDirPath = d->baseHref + TQString::fromUtf8("Variants/"); + TQDir variantDir(variantDirPath); - QStringList variantList = variantDir.entryList("*.css"); - QStringList::ConstIterator it, itEnd = variantList.constEnd(); + TQStringList variantList = variantDir.entryList("*.css"); + TQStringList::ConstIterator it, itEnd = variantList.constEnd(); for(it = variantList.constBegin(); it != itEnd; ++it) { - QString variantName = *it, variantPath; + TQString variantName = *it, variantPath; // Retrieve only the file name. variantName = variantName.left(variantName.findRev(".")); // variantPath is relative to baseHref. - variantPath = QString("Variants/%1").arg(*it); + variantPath = TQString("Variants/%1").arg(*it); d->variantsList.insert(variantName, variantPath); } } void ChatWindowStyle::readStyleFiles() { - QString headerFile = d->baseHref + QString("Header.html"); - QString footerFile = d->baseHref + QString("Footer.html"); - QString incomingFile = d->baseHref + QString("Incoming/Content.html"); - QString nextIncomingFile = d->baseHref + QString("Incoming/NextContent.html"); - QString outgoingFile = d->baseHref + QString("Outgoing/Content.html"); - QString nextOutgoingFile = d->baseHref + QString("Outgoing/NextContent.html"); - QString statusFile = d->baseHref + QString("Status.html"); - QString actionIncomingFile = d->baseHref + QString("Incoming/Action.html"); - QString actionOutgoingFile = d->baseHref + QString("Outgoing/Action.html"); + TQString headerFile = d->baseHref + TQString("Header.html"); + TQString footerFile = d->baseHref + TQString("Footer.html"); + TQString incomingFile = d->baseHref + TQString("Incoming/Content.html"); + TQString nextIncomingFile = d->baseHref + TQString("Incoming/NextContent.html"); + TQString outgoingFile = d->baseHref + TQString("Outgoing/Content.html"); + TQString nextOutgoingFile = d->baseHref + TQString("Outgoing/NextContent.html"); + TQString statusFile = d->baseHref + TQString("Status.html"); + TQString actionIncomingFile = d->baseHref + TQString("Incoming/Action.html"); + TQString actionOutgoingFile = d->baseHref + TQString("Outgoing/Action.html"); - QFile fileAccess; + TQFile fileAccess; // First load header file. - if( QFile::exists(headerFile) ) + if( TQFile::exists(headerFile) ) { fileAccess.setName(headerFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->headerHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "Header HTML: " << d->headerHtml << endl; fileAccess.close(); } // Load Footer file - if( QFile::exists(footerFile) ) + if( TQFile::exists(footerFile) ) { fileAccess.setName(footerFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->footerHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "Footer HTML: " << d->footerHtml << endl; fileAccess.close(); } // Load incoming file - if( QFile::exists(incomingFile) ) + if( TQFile::exists(incomingFile) ) { fileAccess.setName(incomingFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->incomingHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "Incoming HTML: " << d->incomingHtml << endl; fileAccess.close(); } // Load next Incoming file - if( QFile::exists(nextIncomingFile) ) + if( TQFile::exists(nextIncomingFile) ) { fileAccess.setName(nextIncomingFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->nextIncomingHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "NextIncoming HTML: " << d->nextIncomingHtml << endl; fileAccess.close(); } // Load outgoing file - if( QFile::exists(outgoingFile) ) + if( TQFile::exists(outgoingFile) ) { fileAccess.setName(outgoingFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->outgoingHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "Outgoing HTML: " << d->outgoingHtml << endl; fileAccess.close(); } // Load next outgoing file - if( QFile::exists(nextOutgoingFile) ) + if( TQFile::exists(nextOutgoingFile) ) { fileAccess.setName(nextOutgoingFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->nextOutgoingHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "NextOutgoing HTML: " << d->nextOutgoingHtml << endl; fileAccess.close(); } // Load status file - if( QFile::exists(statusFile) ) + if( TQFile::exists(statusFile) ) { fileAccess.setName(statusFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->statusHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "Status HTML: " << d->statusHtml << endl; fileAccess.close(); } // Load Action Incoming file - if( QFile::exists(actionIncomingFile) ) + if( TQFile::exists(actionIncomingFile) ) { fileAccess.setName(actionIncomingFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->actionIncomingHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "ActionIncoming HTML: " << d->actionIncomingHtml << endl; fileAccess.close(); } // Load Action Outgoing file - if( QFile::exists(actionOutgoingFile) ) + if( TQFile::exists(actionOutgoingFile) ) { fileAccess.setName(actionOutgoingFile); fileAccess.open(IO_ReadOnly); - QTextStream headerStream(&fileAccess); - headerStream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream headerStream(&fileAccess); + headerStream.setEncoding(TQTextStream::UnicodeUTF8); d->actionOutgoingHtml = headerStream.read(); kdDebug(14000) << k_funcinfo << "ActionOutgoing HTML: " << d->actionOutgoingHtml << endl; fileAccess.close(); diff --git a/kopete/kopete/chatwindow/kopetechatwindowstyle.h b/kopete/kopete/chatwindow/kopetechatwindowstyle.h index ca5a0863..43c54887 100644 --- a/kopete/kopete/chatwindow/kopetechatwindowstyle.h +++ b/kopete/kopete/chatwindow/kopetechatwindowstyle.h @@ -17,8 +17,8 @@ #ifndef KOPETECHATWINDOWSTYLE_H #define KOPETECHATWINDOWSTYLE_H -#include -#include +#include +#include /** @@ -35,7 +35,7 @@ public: * value = Path to variant CSS file. * Path is relative to Ressources directory. */ - typedef QMap StyleVariants; + typedef TQMap StyleVariants; /** * This enum specifies the mode of the constructor @@ -48,8 +48,8 @@ public: * @brief Build a single chat window style. * */ - ChatWindowStyle(const QString &stylePath, int styleBuildMode = StyleBuildNormal); - ChatWindowStyle(const QString &stylePath, const QString &variantPath, int styleBuildMode = StyleBuildFast); + ChatWindowStyle(const TQString &stylePath, int styleBuildMode = StyleBuildNormal); + ChatWindowStyle(const TQString &stylePath, const TQString &variantPath, int styleBuildMode = StyleBuildFast); ~ChatWindowStyle(); /** @@ -58,7 +58,7 @@ public: * before returning the list of the Variants. * If the variant are listed, it just return the cached * variant list. - * @return the StyleVariants QMap. + * @return the StyleVariants TQMap. */ StyleVariants getVariants(); @@ -69,7 +69,7 @@ public: * * @return the style path based. */ - QString getStylePath() const; + TQString getStylePath() const; /** * Get the style ressource directory. @@ -82,18 +82,18 @@ public: * * @return the path to the the ressource directory. */ - QString getStyleBaseHref() const; + TQString getStyleBaseHref() const; - QString getHeaderHtml() const; - QString getFooterHtml() const; - QString getIncomingHtml() const; - QString getNextIncomingHtml() const; - QString getOutgoingHtml() const; - QString getNextOutgoingHtml() const; - QString getStatusHtml() const; + TQString getHeaderHtml() const; + TQString getFooterHtml() const; + TQString getIncomingHtml() const; + TQString getNextIncomingHtml() const; + TQString getOutgoingHtml() const; + TQString getNextOutgoingHtml() const; + TQString getStatusHtml() const; - QString getActionIncomingHtml() const; - QString getActionOutgoingHtml() const; + TQString getActionIncomingHtml() const; + TQString getActionOutgoingHtml() const; /** * Check if the style has the support for Kopete Action template (Kopete extension) @@ -114,7 +114,7 @@ private: /** * Init this class */ - void init(const QString &stylePath, int styleBuildMode); + void init(const TQString &stylePath, int styleBuildMode); /** * List available variants for the current style. diff --git a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp index 71032ea3..cb3291e7 100644 --- a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp +++ b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.cpp @@ -18,7 +18,7 @@ #include "kopetechatwindowstylemanager.h" // Qt includes -#include +#include // KDE includes #include @@ -51,7 +51,7 @@ public: styleDirLister->deleteLater(); } - QMap::Iterator styleIt, styleItEnd = stylePool.end(); + TQMap::Iterator styleIt, styleItEnd = stylePool.end(); for(styleIt = stylePool.begin(); styleIt != styleItEnd; ++styleIt) { delete styleIt.data(); @@ -62,9 +62,9 @@ public: StyleList availableStyles; // key = style path, value = ChatWindowStyle instance - QMap stylePool; + TQMap stylePool; - QValueStack styleDirs; + TQValueStack styleDirs; }; static KStaticDeleter ChatWindowStyleManagerstaticDeleter; @@ -81,8 +81,8 @@ ChatWindowStyleManager *ChatWindowStyleManager::self() return s_self; } -ChatWindowStyleManager::ChatWindowStyleManager(QObject *parent, const char *name) - : QObject(parent, name), d(new Private()) +ChatWindowStyleManager::ChatWindowStyleManager(TQObject *parent, const char *name) + : TQObject(parent, name), d(new Private()) { kdDebug(14000) << k_funcinfo << endl; loadStyles(); @@ -96,12 +96,12 @@ ChatWindowStyleManager::~ChatWindowStyleManager() void ChatWindowStyleManager::loadStyles() { - QStringList chatStyles = KGlobal::dirs()->findDirs( "appdata", QString::fromUtf8( "styles" ) ); - QString localStyleDir( locateLocal( "appdata", QString::fromUtf8("styles/"),true) ); + TQStringList chatStyles = KGlobal::dirs()->findDirs( "appdata", TQString::fromUtf8( "styles" ) ); + TQString localStyleDir( locateLocal( "appdata", TQString::fromUtf8("styles/"),true) ); if( !chatStyles.contains(localStyleDir)) chatStyles<styleDirLister = new KDirLister(this); d->styleDirLister->setDirOnlyMode(true); - connect(d->styleDirLister, SIGNAL(newItems(const KFileItemList &)), this, SLOT(slotNewStyles(const KFileItemList &))); - connect(d->styleDirLister, SIGNAL(completed()), this, SLOT(slotDirectoryFinished())); + connect(d->styleDirLister, TQT_SIGNAL(newItems(const KFileItemList &)), this, TQT_SLOT(slotNewStyles(const KFileItemList &))); + connect(d->styleDirLister, TQT_SIGNAL(completed()), this, TQT_SLOT(slotDirectoryFinished())); if( !d->styleDirs.isEmpty() ) d->styleDirLister->openURL(d->styleDirs.pop(), true); @@ -123,9 +123,9 @@ ChatWindowStyleManager::StyleList ChatWindowStyleManager::getAvailableStyles() return d->availableStyles; } -int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) +int ChatWindowStyleManager::installStyle(const TQString &styleBundlePath) { - QString localStyleDir( locateLocal( "appdata", QString::fromUtf8("styles/") ) ); + TQString localStyleDir( locateLocal( "appdata", TQString::fromUtf8("styles/") ) ); KArchiveEntry *currentEntry = 0L; KArchiveDirectory* currentDir = 0L; @@ -137,7 +137,7 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) } // Find mimetype for current bundle. ZIP and KTar need separate constructor - QString currentBundleMimeType = KMimeType::findByPath(styleBundlePath, 0, false)->name(); + TQString currentBundleMimeType = KMimeType::findByPath(styleBundlePath, 0, false)->name(); if(currentBundleMimeType == "application/x-zip") { archive = new KZip(styleBundlePath); @@ -167,9 +167,9 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) // main.css, Footer.html, Header.html, Status.html files in Contents/Ressources. // So for a style bundle to be valid, it must have a result greather than 8, because we test for 8 required entry. int validResult = 0; - QStringList entries = rootDir->entries(); + TQStringList entries = rootDir->entries(); // Will be reused later. - QStringList::Iterator entriesIt, entriesItEnd = entries.end(); + TQStringList::Iterator entriesIt, entriesItEnd = entries.end(); for(entriesIt = entries.begin(); entriesIt != entries.end(); ++entriesIt) { currentEntry = const_cast(rootDir->entry(*entriesIt)); @@ -179,52 +179,52 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) currentDir = dynamic_cast( currentEntry ); if (currentDir) { - if( currentDir->entry(QString::fromUtf8("Contents")) ) + if( currentDir->entry(TQString::fromUtf8("Contents")) ) { // kdDebug() << k_funcinfo << "Contents found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources")) ) { // kdDebug() << k_funcinfo << "Contents/Resources found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Incoming")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Incoming")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Incoming found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Outgoing")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Outgoing")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Outgoing found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/main.css")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/main.css")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/main.css found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Footer.html")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Footer.html")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Footer.html found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Status.html")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Status.html")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Status.html found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Header.html")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Header.html")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Header.html found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Incoming/Content.html")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Incoming/Content.html")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Incoming/Content.html found" << endl; validResult += 1; } - if( currentDir->entry(QString::fromUtf8("Contents/Resources/Outgoing/Content.html")) ) + if( currentDir->entry(TQString::fromUtf8("Contents/Resources/Outgoing/Content.html")) ) { // kdDebug() << k_funcinfo << "Contents/Resources/Outgoing/Content.html found" << endl; validResult += 1; @@ -232,7 +232,7 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) } } } -// kdDebug() << k_funcinfo << "Valid result: " << QString::number(validResult) << endl; +// kdDebug() << k_funcinfo << "Valid result: " << TQString::number(validResult) << endl; // The archive is a valid style bundle. if(validResult >= 8) { @@ -243,7 +243,7 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) if(currentEntry && currentEntry->isDirectory()) { // Ignore this MacOS X "garbage" directory in zip. - if(currentEntry->name() == QString::fromUtf8("__MACOSX")) + if(currentEntry->name() == TQString::fromUtf8("__MACOSX")) { continue; } @@ -284,13 +284,13 @@ int ChatWindowStyleManager::installStyle(const QString &styleBundlePath) return StyleUnknow; } -bool ChatWindowStyleManager::removeStyle(const QString &stylePath) +bool ChatWindowStyleManager::removeStyle(const TQString &stylePath) { // Find for the current style in avaiableStyles map. KURL urlStyle(stylePath); - QString styleName=urlStyle.fileName(); + TQString styleName=urlStyle.fileName(); StyleList::Iterator foundStyle = d->availableStyles.find(styleName); - // QMap iterator return end() if it found no item. + // TQMap iterator return end() if it found no item. if(foundStyle != d->availableStyles.end()) { d->availableStyles.remove(foundStyle); @@ -312,7 +312,7 @@ bool ChatWindowStyleManager::removeStyle(const QString &stylePath) } } -ChatWindowStyle *ChatWindowStyleManager::getStyleFromPool(const QString &stylePath) +ChatWindowStyle *ChatWindowStyleManager::getStyleFromPool(const TQString &stylePath) { if( d->stylePool.contains(stylePath) ) { @@ -344,11 +344,11 @@ ChatWindowStyle *ChatWindowStyleManager::getStyleFromPool(const QString &stylePa void ChatWindowStyleManager::slotNewStyles(const KFileItemList &dirList) { KFileItem *item; - QPtrListIterator it( dirList ); + TQPtrListIterator it( dirList ); while( (item = it.current()) != 0 ) { // Ignore data dir(from deprecated XSLT themes) - if( !item->url().fileName().contains(QString::fromUtf8("data")) ) + if( !item->url().fileName().contains(TQString::fromUtf8("data")) ) { kdDebug(14000) << k_funcinfo << "Listing: " << item->url().fileName() << endl; // If the style path is already in the pool, that's mean the style was updated on disk diff --git a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.h b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.h index 4b21c79b..dcc56cf0 100644 --- a/kopete/kopete/chatwindow/kopetechatwindowstylemanager.h +++ b/kopete/kopete/chatwindow/kopetechatwindowstylemanager.h @@ -18,8 +18,8 @@ #ifndef KOPETECHATWINDOWSTYLEMANAGER_H #define KOPETECHATWINDOWSTYLEMANAGER_H -#include -#include +#include +#include #include #include @@ -46,11 +46,11 @@ class KOPETE_EXPORT ChatWindowStyleManager : public QObject Q_OBJECT public: /** - * StyleList typedef (a QMap) + * StyleList typedef (a TQMap) * key = Name of the style (currently the directory name) * value = Path to the style */ - typedef QMap StyleList; + typedef TQMap StyleList; /** * The StyleInstallStatus enum. It gives better return value for installStyle(). @@ -92,7 +92,7 @@ public slots: * @param styleBundlePath Path to the container file to install. * @return A status code from StyleInstallStatus enum. */ - int installStyle(const QString &styleBundlePath); + int installStyle(const TQString &styleBundlePath); /** * Remove a style from user style directory @@ -100,7 +100,7 @@ public slots: * @param stylePath the path of the style to remove. * @return true if the deletion went without problems. */ - bool removeStyle(const QString &stylePath); + bool removeStyle(const TQString &stylePath); /** * Get a instance of a ChatWindowStyle from the pool. @@ -110,7 +110,7 @@ public slots: * @param stylePath Path for the specified style. Name can be ambigous. * @return the instance of ChatWindow for the specified style. DO NOT DELETE IT. */ - ChatWindowStyle *getStyleFromPool(const QString &stylePath); + ChatWindowStyle *getStyleFromPool(const TQString &stylePath); signals: /** @@ -136,7 +136,7 @@ private: * Private constructor(it's a singleton class) * Call loadStyles() to list all avaiable styles. */ - ChatWindowStyleManager(QObject *parent = 0, const char *name = 0); + ChatWindowStyleManager(TQObject *parent = 0, const char *name = 0); static ChatWindowStyleManager *s_self; diff --git a/kopete/kopete/chatwindow/kopeteemailwindow.cpp b/kopete/kopete/chatwindow/kopeteemailwindow.cpp index 84b71b16..89f99eb9 100644 --- a/kopete/kopete/chatwindow/kopeteemailwindow.cpp +++ b/kopete/kopete/chatwindow/kopeteemailwindow.cpp @@ -54,15 +54,15 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include typedef KGenericFactory EmailWindowPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_emailwindow, EmailWindowPluginFactory( "kopete_emailwindow" ) ) -EmailWindowPlugin::EmailWindowPlugin(QObject *parent, const char *name, const QStringList &) : +EmailWindowPlugin::EmailWindowPlugin(TQObject *parent, const char *name, const TQStringList &) : Kopete::ViewPlugin( EmailWindowPluginFactory::instance(), parent, name ) {} @@ -75,7 +75,7 @@ KopeteView* EmailWindowPlugin::createView( Kopete::ChatSession *manager ) class KopeteEmailWindow::Private { public: - QValueList messageQueue; + TQValueList messageQueue; bool showingMessage; bool sendInProgress; bool visible; @@ -83,14 +83,14 @@ public: KPushButton *btnReplySend; KPushButton *btnReadNext; KPushButton *btnReadPrev; - QSplitter *split; + TQSplitter *split; ChatMessagePart *messagePart; KopeteEmailWindow::WindowMode mode; KAction *chatSend; - QLabel *anim; - QMovie animIcon; - QPixmap normalIcon; - QString unreadMessageFrom; + TQLabel *anim; + TQMovie animIcon; + TQPixmap normalIcon; + TQString unreadMessageFrom; ChatTextEditPart *editPart; KActionMenu *actionActionMenu; @@ -100,27 +100,27 @@ public: KopeteEmailWindow::KopeteEmailWindow( Kopete::ChatSession *manager, EmailWindowPlugin *parent, bool foreignMessage ) : KParts::MainWindow( ), KopeteView( manager, parent ), d( new Private ) { - QVBox *v = new QVBox( this ); + TQVBox *v = new TQVBox( this ); setCentralWidget( v ); - setMinimumSize( QSize( 75, 20 ) ); + setMinimumSize( TQSize( 75, 20 ) ); - d->split = new QSplitter( v ); - d->split->setOrientation( QSplitter::Vertical ); + d->split = new TQSplitter( v ); + d->split->setOrientation( TQSplitter::Vertical ); d->messagePart = new ChatMessagePart( manager, d->split, "messagePart" ); // FIXME: should this be in ChatView too? maybe move to ChatMessagePart? d->messagePart->view()->setMarginWidth( 4 ); d->messagePart->view()->setMarginHeight( 4 ); - d->messagePart->view()->setMinimumSize( QSize( 75, 20 ) ); + d->messagePart->view()->setMinimumSize( TQSize( 75, 20 ) ); d->editPart = new ChatTextEditPart( manager, d->split, "editPart" ); /* FIXME: dude, wtf? - QDomDocument doc = d->editPart->domDocument(); - QDomNode menu = doc.documentElement().firstChild(); + TQDomDocument doc = d->editPart->domDocument(); + TQDomNode menu = doc.documentElement().firstChild(); menu.removeChild( menu.firstChild() ); // Remove File menu.removeChild( menu.firstChild() ); // Remove Edit menu.removeChild( menu.firstChild() ); // Remove View @@ -129,40 +129,40 @@ KopeteEmailWindow::KopeteEmailWindow( Kopete::ChatSession *manager, EmailWindowP doc.documentElement().removeChild( doc.documentElement().childNodes().item(1) ); //Remove MainToolbar doc.documentElement().removeChild( doc.documentElement().lastChild() ); // Remove Edit popup */ - connect( d->editPart, SIGNAL( messageSent( Kopete::Message & ) ), - this, SIGNAL( messageSent( Kopete::Message & ) ) ); - connect( d->editPart, SIGNAL( canSendChanged( bool ) ), - this, SLOT( slotUpdateReplySend() ) ); - connect( d->editPart, SIGNAL( typing(bool) ), - manager, SIGNAL( typing(bool) ) ); + connect( d->editPart, TQT_SIGNAL( messageSent( Kopete::Message & ) ), + this, TQT_SIGNAL( messageSent( Kopete::Message & ) ) ); + connect( d->editPart, TQT_SIGNAL( canSendChanged( bool ) ), + this, TQT_SLOT( slotUpdateReplySend() ) ); + connect( d->editPart, TQT_SIGNAL( typing(bool) ), + manager, TQT_SIGNAL( typing(bool) ) ); //Connections to the manager and the ViewManager that every view should have - connect( this, SIGNAL( closing( KopeteView * ) ), - KopeteViewManager::viewManager(), SLOT( slotViewDestroyed( KopeteView * ) ) ); - connect( this, SIGNAL( activated( KopeteView * ) ), - KopeteViewManager::viewManager(), SLOT( slotViewActivated( KopeteView * ) ) ); - connect( this, SIGNAL( messageSent(Kopete::Message &) ), - manager, SLOT( sendMessage(Kopete::Message &) ) ); - connect( manager, SIGNAL( messageSuccess() ), - this, SLOT( messageSentSuccessfully() )); - - QWidget *containerWidget = new QWidget( v ); - containerWidget->setSizePolicy( QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum) ); - - QHBoxLayout *h = new QHBoxLayout( containerWidget, 4, 4 ); + connect( this, TQT_SIGNAL( closing( KopeteView * ) ), + KopeteViewManager::viewManager(), TQT_SLOT( slotViewDestroyed( KopeteView * ) ) ); + connect( this, TQT_SIGNAL( activated( KopeteView * ) ), + KopeteViewManager::viewManager(), TQT_SLOT( slotViewActivated( KopeteView * ) ) ); + connect( this, TQT_SIGNAL( messageSent(Kopete::Message &) ), + manager, TQT_SLOT( sendMessage(Kopete::Message &) ) ); + connect( manager, TQT_SIGNAL( messageSuccess() ), + this, TQT_SLOT( messageSentSuccessfully() )); + + TQWidget *containerWidget = new TQWidget( v ); + containerWidget->setSizePolicy( TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum) ); + + TQHBoxLayout *h = new TQHBoxLayout( containerWidget, 4, 4 ); h->addStretch(); d->btnReadPrev = new KPushButton( i18n( "<< Prev" ), containerWidget ); - connect( d->btnReadPrev, SIGNAL( pressed() ), this, SLOT( slotReadPrev() ) ); + connect( d->btnReadPrev, TQT_SIGNAL( pressed() ), this, TQT_SLOT( slotReadPrev() ) ); h->addWidget( d->btnReadPrev, 0, Qt::AlignRight | Qt::AlignVCenter ); d->btnReadPrev->setEnabled( false ); d->btnReadNext = new KPushButton( i18n( "(0) Next >>" ), containerWidget ); - connect( d->btnReadNext, SIGNAL( pressed() ), this, SLOT( slotReadNext() ) ); + connect( d->btnReadNext, TQT_SIGNAL( pressed() ), this, TQT_SLOT( slotReadNext() ) ); h->addWidget( d->btnReadNext, 0, Qt::AlignRight | Qt::AlignVCenter ); d->btnReplySend = new KPushButton( containerWidget ); - connect( d->btnReplySend, SIGNAL( pressed() ), this, SLOT( slotReplySend() ) ); + connect( d->btnReplySend, TQT_SIGNAL( pressed() ), this, TQT_SLOT( slotReplySend() ) ); h->addWidget( d->btnReplySend, 0, Qt::AlignRight | Qt::AlignVCenter ); initActions(); @@ -176,7 +176,7 @@ KopeteEmailWindow::KopeteEmailWindow( Kopete::ChatSession *manager, EmailWindowP toggleMode( Send ); KConfig *config = KGlobal::config(); - applyMainWindowSettings( config, QString::fromLatin1( "KopeteEmailWindow" ) ); + applyMainWindowSettings( config, TQString::fromLatin1( "KopeteEmailWindow" ) ); d->sendInProgress = false; @@ -196,7 +196,7 @@ KopeteEmailWindow::~KopeteEmailWindow() // saves menubar, toolbar and statusbar setting KConfig *config = KGlobal::config(); - saveMainWindowSettings( config, QString::fromLatin1( "KopeteEmailWindow" ) ); + saveMainWindowSettings( config, TQString::fromLatin1( "KopeteEmailWindow" ) ); config->sync(); delete d; @@ -206,54 +206,54 @@ void KopeteEmailWindow::initActions(void) { KActionCollection *coll = actionCollection(); - d->chatSend = new KAction( i18n( "&Send Message" ), QString::fromLatin1( "mail_send" ), 0, - this, SLOT( slotReplySend() ), coll, "chat_send" ); + d->chatSend = new KAction( i18n( "&Send Message" ), TQString::fromLatin1( "mail_send" ), 0, + this, TQT_SLOT( slotReplySend() ), coll, "chat_send" ); //Default to 'Return' for sending messages - d->chatSend->setShortcut( QKeySequence( Key_Return ) ); + d->chatSend->setShortcut( TQKeySequence( Key_Return ) ); - KStdAction::quit ( this, SLOT( slotCloseView() ), coll ); + KStdAction::quit ( this, TQT_SLOT( slotCloseView() ), coll ); - KStdAction::cut( d->editPart->widget(), SLOT( cut() ), coll ); - KStdAction::copy( this, SLOT(slotCopy()), coll); - KStdAction::paste( d->editPart->widget(), SLOT( paste() ), coll ); + KStdAction::cut( d->editPart->widget(), TQT_SLOT( cut() ), coll ); + KStdAction::copy( this, TQT_SLOT(slotCopy()), coll); + KStdAction::paste( d->editPart->widget(), TQT_SLOT( paste() ), coll ); - new KAction( i18n( "&Set Font..." ), QString::fromLatin1( "charset" ), 0, - d->editPart, SLOT( setFont() ), coll, "format_font" ); - new KAction( i18n( "Set Text &Color..." ), QString::fromLatin1( "pencil" ), 0, - d->editPart, SLOT( setFgColor() ), coll, "format_color" ); - new KAction( i18n( "Set &Background Color..." ), QString::fromLatin1( "fill" ), 0, - d->editPart, SLOT( setBgColor() ), coll, "format_bgcolor" ); + new KAction( i18n( "&Set Font..." ), TQString::fromLatin1( "charset" ), 0, + d->editPart, TQT_SLOT( setFont() ), coll, "format_font" ); + new KAction( i18n( "Set Text &Color..." ), TQString::fromLatin1( "pencil" ), 0, + d->editPart, TQT_SLOT( setFgColor() ), coll, "format_color" ); + new KAction( i18n( "Set &Background Color..." ), TQString::fromLatin1( "fill" ), 0, + d->editPart, TQT_SLOT( setBgColor() ), coll, "format_bgcolor" ); - KStdAction::showMenubar( this, SLOT( slotViewMenuBar() ), coll ); + KStdAction::showMenubar( this, TQT_SLOT( slotViewMenuBar() ), coll ); setStandardToolBarMenuEnabled( true ); d->actionSmileyMenu = new KopeteEmoticonAction( coll, "format_smiley" ); d->actionSmileyMenu->setDelayed( false ); - connect(d->actionSmileyMenu, SIGNAL(activated(const QString &)), this, SLOT(slotSmileyActivated(const QString &))); + connect(d->actionSmileyMenu, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotSmileyActivated(const TQString &))); // add configure key bindings menu item - KStdAction::keyBindings( guiFactory(), SLOT( configureShortcuts() ), coll ); - KStdAction::configureToolbars(this, SLOT( slotConfToolbar() ), coll); + KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ), coll ); + KStdAction::configureToolbars(this, TQT_SLOT( slotConfToolbar() ), coll); //FIXME: no longer works? KopeteStdAction::preferences( coll , "settings_prefs" ); // The animated toolbarbutton - d->normalIcon = QPixmap( BarIcon( QString::fromLatin1( "kopete" ) ) ); - d->animIcon = KGlobal::iconLoader()->loadMovie( QString::fromLatin1( "newmessage" ), KIcon::Toolbar); + d->normalIcon = TQPixmap( BarIcon( TQString::fromLatin1( "kopete" ) ) ); + d->animIcon = KGlobal::iconLoader()->loadMovie( TQString::fromLatin1( "newmessage" ), KIcon::Toolbar); d->animIcon.pause(); - d->anim = new QLabel( this, "kde toolbar widget" ); + d->anim = new TQLabel( this, "kde toolbar widget" ); d->anim->setMargin( 5 ); d->anim->setPixmap( d->normalIcon ); new KWidgetAction( d->anim, i18n("Toolbar Animation"), 0, 0, 0, coll, "toolbar_animation" ); - setXMLFile( QString::fromLatin1( "kopeteemailwindow.rc" ) ); + setXMLFile( TQString::fromLatin1( "kopeteemailwindow.rc" ) ); createGUI( d->editPart ); - //createGUI( QString::fromLatin1( "kopeteemailwindow.rc" ) ); + //createGUI( TQString::fromLatin1( "kopeteemailwindow.rc" ) ); guiFactory()->addClient(m_manager); } -void KopeteEmailWindow::closeEvent( QCloseEvent *e ) +void KopeteEmailWindow::closeEvent( TQCloseEvent *e ) { // DO NOT call base class's closeEvent - see comment in KopeteApplication constructor for reason @@ -272,7 +272,7 @@ void KopeteEmailWindow::slotViewMenuBar() menuBar()->show(); } -void KopeteEmailWindow::slotSmileyActivated(const QString &sm ) +void KopeteEmailWindow::slotSmileyActivated(const TQString &sm ) { if ( !sm.isNull() ) d->editPart->addText( sm ); @@ -280,12 +280,12 @@ void KopeteEmailWindow::slotSmileyActivated(const QString &sm ) void KopeteEmailWindow::slotConfToolbar() { - saveMainWindowSettings(KGlobal::config(), QString::fromLatin1( "KopeteEmailWindow" )); - KEditToolbar *dlg = new KEditToolbar(actionCollection(), QString::fromLatin1("kopeteemailwindow.rc") ); + saveMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteEmailWindow" )); + KEditToolbar *dlg = new KEditToolbar(actionCollection(), TQString::fromLatin1("kopeteemailwindow.rc") ); if (dlg->exec()) { createGUI( d->editPart ); - applyMainWindowSettings(KGlobal::config(), QString::fromLatin1( "KopeteEmailWindow" )); + applyMainWindowSettings(KGlobal::config(), TQString::fromLatin1( "KopeteEmailWindow" )); } delete dlg; } @@ -313,19 +313,19 @@ void KopeteEmailWindow::appendMessage(Kopete::Message &message) slotReadNext(); else { - d->btnReadNext->setPaletteForegroundColor( QColor("red") ); + d->btnReadNext->setPaletteForegroundColor( TQColor("red") ); updateNextButton(); } d->unreadMessageFrom = message.from()->metaContact() ? message.from()->metaContact()->displayName() : message.from()->contactId(); - QTimer::singleShot( 1000, this, SLOT(slotMarkMessageRead()) ); + TQTimer::singleShot( 1000, this, TQT_SLOT(slotMarkMessageRead()) ); } } void KopeteEmailWindow::slotMarkMessageRead() { - d->unreadMessageFrom = QString::null; + d->unreadMessageFrom = TQString::null; } void KopeteEmailWindow::updateNextButton() @@ -418,27 +418,27 @@ bool KopeteEmailWindow::closeView( bool force ) { if( m_manager->members().count() > 1 ) { - QString shortCaption = caption(); + TQString shortCaption = caption(); if( shortCaption.length() > 40 ) - shortCaption = shortCaption.left( 40 ) + QString::fromLatin1("..."); + shortCaption = shortCaption.left( 40 ) + TQString::fromLatin1("..."); response = KMessageBox::warningContinueCancel(this, i18n("You are about to leave the group chat session %1.
    " "You will not receive future messages from this conversation.
    ").arg(shortCaption), i18n("Closing Group Chat"), - i18n("Cl&ose Chat"), QString::fromLatin1("AskCloseGroupChat")); + i18n("Cl&ose Chat"), TQString::fromLatin1("AskCloseGroupChat")); } if( !d->unreadMessageFrom.isNull() && ( response == KMessageBox::Continue ) ) { response = KMessageBox::warningContinueCancel(this, i18n("You have received a message from %1 in the last " "second. Are you sure you want to close this chat?").arg(d->unreadMessageFrom), i18n("Unread Message"), - i18n("Cl&ose Chat"), QString::fromLatin1("AskCloseChatRecentMessage")); + i18n("Cl&ose Chat"), TQString::fromLatin1("AskCloseChatRecentMessage")); } if( d->sendInProgress && ( response == KMessageBox::Continue ) ) { response = KMessageBox::warningContinueCancel(this, i18n("You have a message send in progress, which will be " "aborted if this chat is closed. Are you sure you want to close this chat?"), i18n("Message in Transit"), - i18n("Cl&ose Chat"), QString::fromLatin1("AskCloseChatMessageInProgress") ); + i18n("Cl&ose Chat"), TQString::fromLatin1("AskCloseChatMessageInProgress") ); } } @@ -477,7 +477,7 @@ void KopeteEmailWindow::toggleMode( WindowMode newMode ) d->btnReadPrev->show(); break; case Reply: - QValueList splitPercent; + TQValueList splitPercent; // FIXME: should be saved and restored splitPercent.append(50); splitPercent.append(50); diff --git a/kopete/kopete/chatwindow/kopeteemailwindow.h b/kopete/kopete/chatwindow/kopeteemailwindow.h index 43908645..165ee53a 100644 --- a/kopete/kopete/chatwindow/kopeteemailwindow.h +++ b/kopete/kopete/chatwindow/kopeteemailwindow.h @@ -44,7 +44,7 @@ public: virtual void makeVisible(); virtual bool closeView( bool force = false ); virtual bool isVisible(); - virtual QWidget *mainWidget() { return this; } + virtual TQWidget *mainWidget() { return this; } public slots: virtual void sendMessage(); @@ -58,7 +58,7 @@ signals: virtual void activated( KopeteView *view ); protected: - virtual void closeEvent( QCloseEvent *e ); + virtual void closeEvent( TQCloseEvent *e ); virtual void windowActivationChange( bool activated ); private slots: @@ -68,7 +68,7 @@ private slots: void slotReadPrev(); void slotCloseView(); - void slotSmileyActivated( const QString & ); + void slotSmileyActivated( const TQString & ); void slotCopy(); void slotViewMenuBar(); @@ -94,7 +94,7 @@ private: class EmailWindowPlugin : public Kopete::ViewPlugin { public: - EmailWindowPlugin(QObject *parent, const char *name, const QStringList &args); + EmailWindowPlugin(TQObject *parent, const char *name, const TQStringList &args); KopeteView* createView( Kopete::ChatSession *manager ); }; diff --git a/kopete/kopete/chatwindow/kopeteemoticonaction.cpp b/kopete/kopete/chatwindow/kopeteemoticonaction.cpp index 3e14e66d..bb440ef2 100644 --- a/kopete/kopete/chatwindow/kopeteemoticonaction.cpp +++ b/kopete/kopete/chatwindow/kopeteemoticonaction.cpp @@ -22,7 +22,7 @@ #include -#include +#include #include #include @@ -46,7 +46,7 @@ public: emoticonSelector = new EmoticonSelector( m_popup, "KopeteEmoticonActionPrivate::emoticonSelector"); m_popup->insertItem( emoticonSelector ); // TODO: Maybe connect to kopeteprefs and redo list only on config changes - connect( m_popup, SIGNAL( aboutToShow() ), emoticonSelector, SLOT( prepareList() ) ); + connect( m_popup, TQT_SIGNAL( aboutToShow() ), emoticonSelector, TQT_SLOT( prepareList() ) ); } ~KopeteEmoticonActionPrivate() @@ -61,16 +61,16 @@ public: bool m_stickyMenu; }; -KopeteEmoticonAction::KopeteEmoticonAction( QObject* parent, const char* name ) +KopeteEmoticonAction::KopeteEmoticonAction( TQObject* parent, const char* name ) : KAction( i18n( "Add Smiley" ), 0, parent, name ) { d = new KopeteEmoticonActionPrivate; // Try to load the icon for our current emoticon theme, when it fails // fall back to our own default - QString icon; - QMap emoticonsMap = Kopete::Emoticons::self()->emoticonAndPicList(); - for( QMap::const_iterator it = emoticonsMap.constBegin(); + TQString icon; + TQMap emoticonsMap = Kopete::Emoticons::self()->emoticonAndPicList(); + for( TQMap::const_iterator it = emoticonsMap.constBegin(); it != emoticonsMap.constEnd(); ++it ) { if( ( *it ).contains( ":)" ) || ( *it ).contains( ":-)" ) ) @@ -83,11 +83,11 @@ KopeteEmoticonAction::KopeteEmoticonAction( QObject* parent, const char* name ) if ( icon.isNull() ) setIcon( "emoticon" ); else - setIconSet( QIconSet( icon ) ); + setIconSet( TQIconSet( icon ) ); setShortcutConfigurable( false ); - connect( d->emoticonSelector, SIGNAL( ItemSelected( const QString & ) ), - this, SIGNAL( activated( const QString & ) ) ); + connect( d->emoticonSelector, TQT_SIGNAL( ItemSelected( const TQString & ) ), + this, TQT_SIGNAL( activated( const TQString & ) ) ); } KopeteEmoticonAction::~KopeteEmoticonAction() @@ -98,7 +98,7 @@ KopeteEmoticonAction::~KopeteEmoticonAction() d = 0; } -void KopeteEmoticonAction::popup( const QPoint& global ) +void KopeteEmoticonAction::popup( const TQPoint& global ) { popupMenu()->popup( global ); } @@ -128,7 +128,7 @@ void KopeteEmoticonAction::setStickyMenu(bool sticky) d->m_stickyMenu = sticky; } -int KopeteEmoticonAction::plug( QWidget* widget, int index ) +int KopeteEmoticonAction::plug( TQWidget* widget, int index ) { if (kapp && !kapp->authorizeKAction(name())) return -1; @@ -136,9 +136,9 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index ) // kdDebug(14010) << "KopeteEmoticonAction::plug( " << widget << ", " << index << " )" << endl; // KDE4/Qt TODO: Use qobject_cast instead. - if ( widget->inherits("QPopupMenu") ) + if ( widget->inherits("TQPopupMenu") ) { - QPopupMenu* menu = static_cast( widget ); + TQPopupMenu* menu = static_cast( widget ); int id; if ( hasIcon() ) id = menu->insertItem( iconSet(KIcon::Small), text(), d->m_popup, -1, index ); @@ -149,7 +149,7 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index ) menu->setItemEnabled( id, false ); addContainer( menu, id ); - connect( menu, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); if ( m_parentCollection ) m_parentCollection->connectHighlight( menu, this ); @@ -166,8 +166,8 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index ) if ( icon().isEmpty() && !iconSet(KIcon::Small).isNull() ) { bar->insertButton( - iconSet(KIcon::Small).pixmap(), id_, SIGNAL(clicked()), this, - SLOT(slotActivated()), isEnabled(), plainText(), + iconSet(KIcon::Small).pixmap(), id_, TQT_SIGNAL(clicked()), this, + TQT_SLOT(slotActivated()), isEnabled(), plainText(), index ); } else @@ -179,17 +179,17 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index ) else instance = KGlobal::instance(); - bar->insertButton( icon(), id_, SIGNAL( clicked() ), this, - SLOT( slotActivated() ), isEnabled(), plainText(), + bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this, + TQT_SLOT( slotActivated() ), isEnabled(), plainText(), index, instance ); } addContainer( bar, id_ ); if (!whatsThis().isEmpty()) - QWhatsThis::add( bar->getButton(id_), whatsThis() ); + TQWhatsThis::add( bar->getButton(id_), whatsThis() ); - connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); if (delayed()) bar->setDelayedPopup(id_, popupMenu(), stickyMenu()); @@ -202,9 +202,9 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index ) return containerCount() - 1; } // KDE4/Qt TODO: Use qobject_cast instead. - else if ( widget->inherits( "QMenuBar" ) ) + else if ( widget->inherits( "TQMenuBar" ) ) { - QMenuBar *bar = static_cast( widget ); + TQMenuBar *bar = static_cast( widget ); int id; @@ -214,7 +214,7 @@ int KopeteEmoticonAction::plug( QWidget* widget, int index ) bar->setItemEnabled( id, false ); addContainer( bar, id ); - connect( bar, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); return containerCount() - 1; } diff --git a/kopete/kopete/chatwindow/kopeteemoticonaction.h b/kopete/kopete/chatwindow/kopeteemoticonaction.h index d420518a..15b1fd14 100644 --- a/kopete/kopete/chatwindow/kopeteemoticonaction.h +++ b/kopete/kopete/chatwindow/kopeteemoticonaction.h @@ -31,11 +31,11 @@ class KopeteEmoticonAction : public KAction Q_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu ) public: - KopeteEmoticonAction( QObject *parent = 0, const char *name = 0 ); + KopeteEmoticonAction( TQObject *parent = 0, const char *name = 0 ); virtual ~KopeteEmoticonAction(); KPopupMenu * popupMenu() const; - void popup( const QPoint &global ); + void popup( const TQPoint &global ); /** * Returns true if this action creates a delayed popup menu @@ -74,10 +74,10 @@ public: */ void setStickyMenu( bool sticky ); - virtual int plug( QWidget* widget, int index = -1 ); + virtual int plug( TQWidget* widget, int index = -1 ); signals: - void activated( const QString &item ); + void activated( const TQString &item ); private: class KopeteEmoticonActionPrivate; diff --git a/kopete/kopete/chatwindow/krichtexteditpart.cpp b/kopete/kopete/chatwindow/krichtexteditpart.cpp index 001096b9..a08fa7e3 100644 --- a/kopete/kopete/chatwindow/krichtexteditpart.cpp +++ b/kopete/kopete/chatwindow/krichtexteditpart.cpp @@ -6,9 +6,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -23,25 +23,25 @@ K_EXPORT_COMPONENT_FACTORY( libkopeterichtexteditpart, KopeteRichTextEditPartFac class KopeteTextEdit : public KTextEdit { public: - KopeteTextEdit( QWidget *parent ) : KTextEdit( parent ) {} + KopeteTextEdit( TQWidget *parent ) : KTextEdit( parent ) {} const QTextCursor * cursor() { return textCursor(); } - bool event(QEvent *event) + bool event(TQEvent *event) { - // don't allow QTextEdit to override accels - if ( event->type() == QEvent::AccelOverride ) - return QWidget::event(event); + // don't allow TQTextEdit to override accels + if ( event->type() == TQEvent::AccelOverride ) + return TQWidget::event(event); else return KTextEdit::event(event); } }; -KopeteRichTextEditPart::KopeteRichTextEditPart( QWidget *wparent, const char *wname, QObject*, const char*, const QStringList& ) +KopeteRichTextEditPart::KopeteRichTextEditPart( TQWidget *wparent, const char *wname, TQObject*, const char*, const TQStringList& ) : KParts::ReadOnlyPart( wparent, wname ? wname : "rich_text_part" ) { KopeteRichTextEditPart::KopeteRichTextEditPart( wparent, wname, false ); } -KopeteRichTextEditPart::KopeteRichTextEditPart( QWidget *parent, const char *name, int capabilities ) +KopeteRichTextEditPart::KopeteRichTextEditPart( TQWidget *parent, const char *name, int capabilities ) : KParts::ReadOnlyPart( parent, name ? name : "rich_text_part" ), m_capabilities( capabilities ), m_richTextEnabled( true ) @@ -127,86 +127,86 @@ void KopeteRichTextEditPart::createActions( KActionCollection *ac ) enableRichText = new KToggleAction(i18n("Enable &Rich Text"), "pencil", 0, ac, "enableRichText" ); enableRichText->setCheckedState(i18n("Disable &Rich Text")); - connect( enableRichText, SIGNAL( toggled(bool) ), - this, SLOT( slotSetRichTextEnabled(bool) ) ); + connect( enableRichText, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( slotSetRichTextEnabled(bool) ) ); checkSpelling = new KAction( i18n("Check &Spelling"), "spellcheck", 0, - editor, SLOT( checkSpelling() ), ac, "check_spelling" ); + editor, TQT_SLOT( checkSpelling() ), ac, "check_spelling" ); //Fg Color actionFgColor = new KAction( i18n("Text &Color..."), "color_line", 0, - this, SLOT( setFgColor() ), + this, TQT_SLOT( setFgColor() ), ac, "format_color" ); //BG Color actionBgColor = new KAction( i18n("Background Co&lor..."), "color_fill", 0, - this, SLOT( setBgColor() ), + this, TQT_SLOT( setBgColor() ), ac, "format_bgcolor" ); //Font Family action_font = new KFontAction( i18n("&Font"), 0, ac, "format_font" ); - connect( action_font, SIGNAL( activated( const QString & ) ), - this, SLOT( setFont( const QString & ) ) ); + connect( action_font, TQT_SIGNAL( activated( const TQString & ) ), + this, TQT_SLOT( setFont( const TQString & ) ) ); //Font Size action_font_size = new KFontSizeAction( i18n("Font &Size"), 0, ac, "format_font_size" ); - connect( action_font_size, SIGNAL( fontSizeChanged(int) ), - this, SLOT( setFontSize(int) ) ); + connect( action_font_size, TQT_SIGNAL( fontSizeChanged(int) ), + this, TQT_SLOT( setFontSize(int) ) ); //Formatting action_bold = new KToggleAction( i18n("&Bold"), "text_bold", CTRL+Key_B, ac, "format_bold" ); - connect( action_bold, SIGNAL( toggled(bool) ), - this, SLOT( setBold(bool) ) ); + connect( action_bold, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( setBold(bool) ) ); action_italic = new KToggleAction( i18n("&Italic"), "text_italic", CTRL+Key_I, ac, "format_italic" ); - connect( action_italic, SIGNAL( toggled(bool) ), - this, SLOT( setItalic(bool) ) ); + connect( action_italic, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( setItalic(bool) ) ); action_underline = new KToggleAction( i18n("&Underline"), "text_under", CTRL+Key_U, ac, "format_underline" ); - connect( action_underline, SIGNAL( toggled(bool) ), - this, SLOT( setUnderline(bool) ) ); + connect( action_underline, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( setUnderline(bool) ) ); - connect( editor, SIGNAL( currentFontChanged( const QFont & ) ), - this, SLOT( updateCharFmt() ) ); + connect( editor, TQT_SIGNAL( currentFontChanged( const TQFont & ) ), + this, TQT_SLOT( updateCharFmt() ) ); updateCharFmt(); - connect( editor, SIGNAL( currentFontChanged( const QFont & ) ), - this, SLOT( updateFont() ) ); + connect( editor, TQT_SIGNAL( currentFontChanged( const TQFont & ) ), + this, TQT_SLOT( updateFont() ) ); updateFont(); //Alignment action_align_left = new KToggleAction( i18n("Align &Left"), "text_left", 0, ac, "format_align_left" ); - connect( action_align_left, SIGNAL( toggled(bool) ), - this, SLOT( setAlignLeft(bool) ) ); + connect( action_align_left, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( setAlignLeft(bool) ) ); action_align_center = new KToggleAction( i18n("Align &Center"), "text_center", 0, ac, "format_align_center" ); - connect( action_align_center, SIGNAL( toggled(bool) ), - this, SLOT( setAlignCenter(bool) ) ); + connect( action_align_center, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( setAlignCenter(bool) ) ); action_align_right = new KToggleAction( i18n("Align &Right"), "text_right", 0, ac, "format_align_right" ); - connect( action_align_right, SIGNAL( toggled(bool) ), - this, SLOT( setAlignRight(bool) ) ); + connect( action_align_right, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( setAlignRight(bool) ) ); action_align_justify = new KToggleAction( i18n("&Justify"), "text_block", 0, ac, "format_align_justify" ); - connect( action_align_justify, SIGNAL( toggled(bool) ), - this, SLOT( setAlignJustify(bool) ) ); + connect( action_align_justify, TQT_SIGNAL( toggled(bool) ), + this, TQT_SLOT( setAlignJustify(bool) ) ); action_align_left->setExclusiveGroup( "alignment" ); action_align_center->setExclusiveGroup( "alignment" ); action_align_right->setExclusiveGroup( "alignment" ); action_align_justify->setExclusiveGroup( "alignment" ); - connect( editor, SIGNAL( cursorPositionChanged( int,int ) ), - this, SLOT( updateAligment() ) ); + connect( editor, TQT_SIGNAL( cursorPositionChanged( int,int ) ), + this, TQT_SLOT( updateAligment() ) ); updateAligment(); } @@ -248,7 +248,7 @@ void KopeteRichTextEditPart::updateCharFmt() void KopeteRichTextEditPart::clear() { - editor->setText( QString::null ); + editor->setText( TQString::null ); setFont( mFont ); setFgColor( mFgColor ); @@ -303,13 +303,13 @@ void KopeteRichTextEditPart::readConfig() KConfig *config = KGlobal::config(); config->setGroup("RichTextEditor"); - QColor tmpColor = KGlobalSettings::textColor(); + TQColor tmpColor = KGlobalSettings::textColor(); setFgColor( config->readColorEntry("FgColor", &tmpColor ) ); tmpColor = KGlobalSettings::baseColor(); setBgColor( config->readColorEntry("BgColor", &tmpColor ) ); - QFont tmpFont = KopetePrefs::prefs()->fontFace(); + TQFont tmpFont = KopetePrefs::prefs()->fontFace(); setFont( config->readFontEntry("Font", &tmpFont ) ); int tmp = KGlobalSettings::generalFont().pixelSize(); @@ -357,12 +357,12 @@ void KopeteRichTextEditPart::writeConfig() void KopeteRichTextEditPart::setFgColor() { - QColor col=editor->color(); + TQColor col=editor->color(); int s = KColorDialog::getColor( col, KGlobalSettings::textColor() , editor ); if(!col.isValid()) col= KGlobalSettings::textColor() ; - if ( s != QDialog::Accepted ) + if ( s != TQDialog::Accepted ) return; setFgColor( col ); @@ -370,17 +370,17 @@ void KopeteRichTextEditPart::setFgColor() writeConfig(); } -void KopeteRichTextEditPart::setFgColor( const QColor &newColor ) +void KopeteRichTextEditPart::setFgColor( const TQColor &newColor ) { mFgColor = newColor; if( !(m_capabilities & Kopete::Protocol::RichColor) ) { - QPalette pal = editor->palette(); - pal.setColor(QPalette::Active, QColorGroup::Text, mFgColor ); - pal.setColor(QPalette::Inactive, QColorGroup::Text, mFgColor ); + TQPalette pal = editor->palette(); + pal.setColor(TQPalette::Active, TQColorGroup::Text, mFgColor ); + pal.setColor(TQPalette::Inactive, TQColorGroup::Text, mFgColor ); - if ( pal == QApplication::palette( editor ) ) + if ( pal == TQApplication::palette( editor ) ) editor->unsetPalette(); else editor->setPalette(pal); @@ -389,16 +389,16 @@ void KopeteRichTextEditPart::setFgColor( const QColor &newColor ) editor->setColor( mFgColor ); } -QColor KopeteRichTextEditPart::fgColor() +TQColor KopeteRichTextEditPart::fgColor() { if( mFgColor == KGlobalSettings::textColor()) - return QColor(); + return TQColor(); return mFgColor; } void KopeteRichTextEditPart::setBgColor() { - QColor col=mBgColor; + TQColor col=mBgColor; int s = KColorDialog::getColor( col, KGlobalSettings::baseColor(), editor ); if(!col.isValid()) @@ -406,7 +406,7 @@ void KopeteRichTextEditPart::setBgColor() col=KGlobalSettings::baseColor(); } - if ( s != QDialog::Accepted ) + if ( s != TQDialog::Accepted ) return; setBgColor( col ); @@ -414,25 +414,25 @@ void KopeteRichTextEditPart::setBgColor() writeConfig(); } -void KopeteRichTextEditPart::setBgColor( const QColor &newColor ) +void KopeteRichTextEditPart::setBgColor( const TQColor &newColor ) { mBgColor = newColor; - QPalette pal = editor->palette(); - pal.setColor(QPalette::Active, QColorGroup::Base, mBgColor ); - pal.setColor(QPalette::Inactive, QColorGroup::Base, mBgColor ); - pal.setColor(QPalette::Disabled, QColorGroup::Base, mBgColor ); + TQPalette pal = editor->palette(); + pal.setColor(TQPalette::Active, TQColorGroup::Base, mBgColor ); + pal.setColor(TQPalette::Inactive, TQColorGroup::Base, mBgColor ); + pal.setColor(TQPalette::Disabled, TQColorGroup::Base, mBgColor ); - if ( pal == QApplication::palette( editor ) ) + if ( pal == TQApplication::palette( editor ) ) editor->unsetPalette(); else editor->setPalette(pal); } -QColor KopeteRichTextEditPart::bgColor() +TQColor KopeteRichTextEditPart::bgColor() { if( mBgColor == KGlobalSettings::baseColor()) - return QColor(); + return TQColor(); return mBgColor; } @@ -453,14 +453,14 @@ void KopeteRichTextEditPart::setFont() writeConfig(); } -void KopeteRichTextEditPart::setFont( const QFont &newFont ) +void KopeteRichTextEditPart::setFont( const TQFont &newFont ) { mFont = newFont; editor->setFont(mFont); updateFont(); } -void KopeteRichTextEditPart::setFont( const QString &newFont ) +void KopeteRichTextEditPart::setFont( const TQString &newFont ) { mFont.setFamily( newFont ); if( m_capabilities & Kopete::Protocol::RichFont) @@ -540,7 +540,7 @@ void KopeteRichTextEditPart::setAlignJustify( bool yes ) writeConfig(); } -QString KopeteRichTextEditPart::text( Qt::TextFormat fmt ) const +TQString KopeteRichTextEditPart::text( Qt::TextFormat fmt ) const { if( fmt == editor->textFormat() || fmt != Qt::PlainText ) return editor->text(); diff --git a/kopete/kopete/chatwindow/krichtexteditpart.h b/kopete/kopete/chatwindow/krichtexteditpart.h index cd32993c..06c4b80d 100644 --- a/kopete/kopete/chatwindow/krichtexteditpart.h +++ b/kopete/kopete/chatwindow/krichtexteditpart.h @@ -5,8 +5,8 @@ #include -#include -#include +#include +#include class KAboutData; class KTextEdit; @@ -16,7 +16,7 @@ class KToggleAction; class KopeteTextEdit; /** - * KParts wrapper for QTextEdit. + * KParts wrapper for TQTextEdit. * * Originally by Richard Moore, rich@kde.org * forked by Jason Keirstead @@ -26,21 +26,21 @@ class KopeteRichTextEditPart : public KParts::ReadOnlyPart Q_OBJECT public: - KopeteRichTextEditPart( QWidget *wparent, const char *wname, QObject*, const char*, const QStringList& ); - KopeteRichTextEditPart( QWidget *wparent, const char *wname, int capabilities ); + KopeteRichTextEditPart( TQWidget *wparent, const char *wname, TQObject*, const char*, const TQStringList& ); + KopeteRichTextEditPart( TQWidget *wparent, const char *wname, int capabilities ); /** * Returns the current editor widget. */ KTextEdit *widget() const { return (KTextEdit*)editor; } - QString text( Qt::TextFormat = Qt::AutoText ) const; + TQString text( Qt::TextFormat = Qt::AutoText ) const; - QFont font() { return mFont; } + TQFont font() { return mFont; } - QColor fgColor(); + TQColor fgColor(); - QColor bgColor(); + TQColor bgColor(); void clear(); @@ -57,14 +57,14 @@ class KopeteRichTextEditPart : public KParts::ReadOnlyPart public slots: void setFgColor(); - void setFgColor( const QColor & ); + void setFgColor( const TQColor & ); void setBgColor(); - void setBgColor( const QColor & ); + void setBgColor( const TQColor & ); void setFont(); - void setFont( const QFont & ); - void setFont( const QString & ); + void setFont( const TQFont & ); + void setFont( const TQString & ); void setFontSize( int ); @@ -131,9 +131,9 @@ class KopeteRichTextEditPart : public KParts::ReadOnlyPart bool m_configWriteLock; - QFont mFont; - QColor mBgColor; - QColor mFgColor; + TQFont mFont; + TQColor mBgColor; + TQColor mFgColor; }; #endif // KRICHTEXTEDITPART_H diff --git a/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp b/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp index 26dba26b..31535603 100644 --- a/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp +++ b/kopete/kopete/chatwindow/tests/chatwindowstyle_test.cpp @@ -20,8 +20,8 @@ #include -#include -#include +#include +#include #include @@ -30,10 +30,10 @@ KUNITTEST_MODULE_REGISTER_TESTER( ChatWindowStyle_Test ); void ChatWindowStyle_Test::allTests() { - testStyle = new ChatWindowStyle(QString(SRCDIR)+QString("/TestStyle")); + testStyle = new ChatWindowStyle(TQString(SRCDIR)+TQString("/TestStyle")); // change user data dir to avoid messing with user's .kde dir - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); testPaths(); testHtml(); @@ -43,8 +43,8 @@ void ChatWindowStyle_Test::allTests() void ChatWindowStyle_Test::testPaths() { - QString expectedStylePath = SRCDIR + QString::fromUtf8("/TestStyle"); - QString expectedBaseHref = expectedStylePath + QString::fromUtf8("/Contents/Resources/"); + TQString expectedStylePath = SRCDIR + TQString::fromUtf8("/TestStyle"); + TQString expectedBaseHref = expectedStylePath + TQString::fromUtf8("/Contents/Resources/"); CHECK(testStyle->getStylePath(), expectedStylePath); CHECK(testStyle->getStyleBaseHref(), expectedBaseHref); @@ -52,7 +52,7 @@ void ChatWindowStyle_Test::testPaths() void ChatWindowStyle_Test::testHtml() { - QString exceptedHeader = QString::fromUtf8( + TQString exceptedHeader = TQString::fromUtf8( "
    %chatName%
    \n" "
    %sourceName%
    \n" "
    %destinationName%
    \n" @@ -61,8 +61,8 @@ void ChatWindowStyle_Test::testHtml() "
    %timeOpened%
    \n" "
    %timeOpened{%H:%M}%
    "); // Footer is empty on purpose, this is to test if the file doesn't exist. - QString exceptedFooter; - QString exceptedIncoming = QString::fromUtf8( + TQString exceptedFooter; + TQString exceptedIncoming = TQString::fromUtf8( "Incoming:\n" "
    %userIconPath%
    \n" "
    %senderScreenName%
    \n" @@ -72,12 +72,12 @@ void ChatWindowStyle_Test::testHtml() "
    %time%
    \n" "
    %time{%H:%M}%
    \n" "
    "); - QString exceptedNextIncoming = QString::fromUtf8( + TQString exceptedNextIncoming = TQString::fromUtf8( "Incoming:\n" "
    %message%
    \n" "
    " ); - QString exceptedOutgoing = QString::fromUtf8( + TQString exceptedOutgoing = TQString::fromUtf8( "Outgoing:\n" "
    %userIconPath%
    \n" "
    %senderScreenName%
    \n" @@ -87,12 +87,12 @@ void ChatWindowStyle_Test::testHtml() "
    %time%
    \n" "
    %time{%H:%M}%
    \n" "
    "); - QString exceptedNextOutgoing = QString::fromUtf8( + TQString exceptedNextOutgoing = TQString::fromUtf8( "Outgoing:\n" "
    %message%
    \n" "
    " ); - QString exceptedStatus = QString::fromUtf8( + TQString exceptedStatus = TQString::fromUtf8( "
    %message%
    \n" "
    %time%
    \n" "
    %time{%H:%M}%
    "); @@ -113,10 +113,10 @@ void ChatWindowStyle_Test::testAction() void ChatWindowStyle_Test::testVariants() { - QString expectedNameResult("Variant1;Variant2"); - QString expectedPathResult("Variants/Variant1.css;Variants/Variant2.css"); - QStringList variantNameList; - QStringList variantPathList; + TQString expectedNameResult("Variant1;Variant2"); + TQString expectedPathResult("Variants/Variant1.css;Variants/Variant2.css"); + TQStringList variantNameList; + TQStringList variantPathList; ChatWindowStyle::StyleVariants variantList; ChatWindowStyle::StyleVariants::ConstIterator it; variantList = testStyle->getVariants(); diff --git a/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp b/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp index af0f6b81..9fe66c06 100644 --- a/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp +++ b/kopete/kopete/chatwindow/tests/chatwindowstylerendering_test.cpp @@ -21,10 +21,10 @@ #include // Qt includes -#include -#include -#include -#include +#include +#include +#include +#include // KDE includes #include @@ -53,7 +53,7 @@ KUNITTEST_MODULE_REGISTER_TESTER( ChatWindowStyleRendering_Test ); class FakeContact : public Kopete::Contact { public: - FakeContact (Kopete::Account *account, const QString &id, Kopete::MetaContact *mc ) : Kopete::Contact( account, id, mc ) {} + FakeContact (Kopete::Account *account, const TQString &id, Kopete::MetaContact *mc ) : Kopete::Contact( account, id, mc ) {} virtual Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags /*c*/) { return 0L; } virtual void slotUserInfo() {}; }; @@ -61,22 +61,22 @@ public: class FakeProtocol : public Kopete::Protocol { public: -FakeProtocol( KInstance *instance, QObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name) +FakeProtocol( KInstance *instance, TQObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name) { } -Account* createNewAccount( const QString &/*accountId*/ ) +Account* createNewAccount( const TQString &/*accountId*/ ) { return 0L; } -AddContactPage* createAddContactWidget( QWidget */*parent*/, Kopete::Account */*account*/) +AddContactPage* createAddContactWidget( TQWidget */*parent*/, Kopete::Account */*account*/) { return 0L; } -KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, QWidget */*parent */) +KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, TQWidget */*parent */) { return 0L; } @@ -86,7 +86,7 @@ KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, class FakeAccount : public Kopete::Account { public: -FakeAccount(Kopete::Protocol *parent, const QString &accountID, const char *name) : Kopete::Account(parent, accountID, name) +FakeAccount(Kopete::Protocol *parent, const TQString &accountID, const char *name) : Kopete::Account(parent, accountID, name) { } @@ -96,7 +96,7 @@ FakeAccount(Kopete::Protocol *parent, const QString &accountID, const char *name } -bool createContact( const QString &/*contactId*/, Kopete::MetaContact */*parentContact*/ ) +bool createContact( const TQString &/*contactId*/, Kopete::MetaContact */*parentContact*/ ) { return true; } @@ -111,7 +111,7 @@ void disconnect() // do nothing } -void setOnlineStatus( const Kopete::OnlineStatus& /*status*/ , const QString &/*reason*/) +void setOnlineStatus( const Kopete::OnlineStatus& /*status*/ , const TQString &/*reason*/) { // do nothing } @@ -122,8 +122,8 @@ class ChatWindowStyleRendering_Test::Private public: Private() { - protocol = new FakeProtocol( new KInstance(QCString("test-kopete-message")), 0L, "test-kopete-message"); - account = new FakeAccount(protocol, QString("testaccount"), 0); + protocol = new FakeProtocol( new KInstance(TQCString("test-kopete-message")), 0L, "test-kopete-message"); + account = new FakeAccount(protocol, TQString("testaccount"), 0); // Create fake meta/contacts myselfMetaContact = new Kopete::MetaContact(); @@ -144,7 +144,7 @@ public: fakeChatSession->setDisplayName("Test Session"); // Create testStyle - testStyle = new ChatWindowStyle(QString(SRCDIR)+QString("/TestStyle")); + testStyle = new ChatWindowStyle(TQString(SRCDIR)+TQString("/TestStyle")); } ~Private() { @@ -163,7 +163,7 @@ public: Kopete::ChatSession *fakeChatSession; ChatWindowStyle *testStyle; - QString resultHTML; + TQString resultHTML; }; @@ -181,7 +181,7 @@ ChatWindowStyleRendering_Test::~ChatWindowStyleRendering_Test() void ChatWindowStyleRendering_Test::allTests() { // change user data dir to avoid messing with user's .kde dir - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); KApplication::disableAutoDcopRegistration(); //KCmdLineArgs::init(argc,argv,"testkopetemessage", 0, 0, 0, 0); @@ -197,7 +197,7 @@ void ChatWindowStyleRendering_Test::allTests() void ChatWindowStyleRendering_Test::testHeaderRendering() { - QString expectedHtml = QString( + TQString expectedHtml = TQString( "
    Test Session
    \n" "
    Bob
    \n" "
    Audrey
    \n" @@ -205,11 +205,11 @@ void ChatWindowStyleRendering_Test::testHeaderRendering() "
    Outgoing/buddy_icon.png
    \n" "
    %1
    \n" "
    %2
    " - ).arg(KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(), true, true ) ) - .arg(QDateTime::currentDateTime().toString("hh:mm")); + ).arg(KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true, true ) ) + .arg(TQDateTime::currentDateTime().toString("hh:mm")); - QString headerHtml = d->testStyle->getHeaderHtml(); - QString resultHtml; + TQString headerHtml = d->testStyle->getHeaderHtml(); + TQString resultHtml; resultHtml = chatPart->formatStyleKeywords(headerHtml); @@ -220,7 +220,7 @@ void ChatWindowStyleRendering_Test::testHeaderRendering() void ChatWindowStyleRendering_Test::testMessageRendering() { - QString expectedIncomingHtml = QString( + TQString expectedIncomingHtml = TQString( "Incoming:\n" "
    Incoming/buddy_icon.png
    \n" "\n" @@ -230,9 +230,9 @@ void ChatWindowStyleRendering_Test::testMessageRendering() "
    %1
    \n" "
    %2
    \n" "
    " - ).arg( QDateTime::currentDateTime().toString( "hh:mm:ss" ), QDateTime::currentDateTime().toString( "hh:mm" ) ); + ).arg( TQDateTime::currentDateTime().toString( "hh:mm:ss" ), TQDateTime::currentDateTime().toString( "hh:mm" ) ); - QString expectedOutgoingHtml = QString( + TQString expectedOutgoingHtml = TQString( "Outgoing:\n" "
    Outgoing/buddy_icon.png
    \n" "\n" @@ -242,14 +242,14 @@ void ChatWindowStyleRendering_Test::testMessageRendering() "
    %1
    \n" "
    %2
    \n" "
    " - ).arg( QDateTime::currentDateTime().toString( "hh:mm:ss" ), QDateTime::currentDateTime().toString( "hh:mm" ) ); + ).arg( TQDateTime::currentDateTime().toString( "hh:mm:ss" ), TQDateTime::currentDateTime().toString( "hh:mm" ) ); - QString tempHtml; - QString resultHtml; + TQString tempHtml; + TQString resultHtml; - Kopete::Message msgIn(d->other, d->myself, QString::fromUtf8("Test"), Kopete::Message::Inbound ); - Kopete::Message msgOut(d->myself, d->other, QString::fromUtf8("Hello there"), Kopete::Message::Outbound); + Kopete::Message msgIn(d->other, d->myself, TQString::fromUtf8("Test"), Kopete::Message::Inbound ); + Kopete::Message msgOut(d->myself, d->other, TQString::fromUtf8("Hello there"), Kopete::Message::Outbound); tempHtml = d->testStyle->getIncomingHtml(); resultHtml = chatPart->formatStyleKeywords(tempHtml, msgIn); @@ -268,16 +268,16 @@ void ChatWindowStyleRendering_Test::testMessageRendering() void ChatWindowStyleRendering_Test::testStatusRendering() { - QString expectedStatusHtml = QString( + TQString expectedStatusHtml = TQString( "
    A contact went offline.
    \n" "
    %1
    \n" "
    %2
    " - ).arg( QDateTime::currentDateTime().toString( "hh:mm:ss" ), QDateTime::currentDateTime().toString( "hh:mm" ) ); + ).arg( TQDateTime::currentDateTime().toString( "hh:mm:ss" ), TQDateTime::currentDateTime().toString( "hh:mm" ) ); - QString statusHtml = d->testStyle->getStatusHtml(); - QString resultHtml; + TQString statusHtml = d->testStyle->getStatusHtml(); + TQString resultHtml; - Kopete::Message msgStatus(0,0, QString::fromUtf8("A contact went offline."), Kopete::Message::Internal); + Kopete::Message msgStatus(0,0, TQString::fromUtf8("A contact went offline."), Kopete::Message::Internal); resultHtml = chatPart->formatStyleKeywords(statusHtml, msgStatus); CHECK(resultHtml, expectedStatusHtml); @@ -285,17 +285,17 @@ void ChatWindowStyleRendering_Test::testStatusRendering() void ChatWindowStyleRendering_Test::testFullRendering() { - QString expectedFullHtml; - QString resultHtml; - - Kopete::Message msgIn1(d->myself, d->other, QString("Hello there !"), Kopete::Message::Inbound); - Kopete::Message msgIn2(d->myself, d->other, QString("How are you doing ?"), Kopete::Message::Inbound); - Kopete::Message msgOut1(d->other, d->myself, QString("Fine and you ?"), Kopete::Message::Outbound); - Kopete::Message msgStatus1(d->myself,d->other, QString("You are now marked as away."), Kopete::Message::Internal); - Kopete::Message msgStatus2(d->myself,d->other, QString("You are now marked as online."), Kopete::Message::Internal); - Kopete::Message msgIn3(d->myself, d->other, QString("Well, doing some tests."), Kopete::Message::Internal); - Kopete::Message msgOut2(d->other, d->myself, QString("All your bases are belong to us."), Kopete::Message::Outbound); - Kopete::Message msgOut3(d->other, d->myself, QString("You are on the way to destruction"), Kopete::Message::Outbound); + TQString expectedFullHtml; + TQString resultHtml; + + Kopete::Message msgIn1(d->myself, d->other, TQString("Hello there !"), Kopete::Message::Inbound); + Kopete::Message msgIn2(d->myself, d->other, TQString("How are you doing ?"), Kopete::Message::Inbound); + Kopete::Message msgOut1(d->other, d->myself, TQString("Fine and you ?"), Kopete::Message::Outbound); + Kopete::Message msgStatus1(d->myself,d->other, TQString("You are now marked as away."), Kopete::Message::Internal); + Kopete::Message msgStatus2(d->myself,d->other, TQString("You are now marked as online."), Kopete::Message::Internal); + Kopete::Message msgIn3(d->myself, d->other, TQString("Well, doing some tests."), Kopete::Message::Internal); + Kopete::Message msgOut2(d->other, d->myself, TQString("All your bases are belong to us."), Kopete::Message::Outbound); + Kopete::Message msgOut3(d->other, d->myself, TQString("You are on the way to destruction"), Kopete::Message::Outbound); // Change style on the fly in ChatMessagePart so this test would run chatPart->setStyle(d->testStyle); @@ -313,11 +313,11 @@ void ChatWindowStyleRendering_Test::testFullRendering() resultHtml = chatPart->htmlDocument().toHTML(); // Read the expected(sample) HTML from file. - QFile sampleHtml(QString(SRCDIR)+"sample.html"); + TQFile sampleHtml(TQString(SRCDIR)+"sample.html"); if(sampleHtml.open(IO_ReadOnly)) { - QTextStream stream(&sampleHtml); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream(&sampleHtml); + stream.setEncoding(TQTextStream::UnicodeUTF8); expectedFullHtml = stream.read(); sampleHtml.close(); } diff --git a/kopete/kopete/config/accounts/kopeteaccountconfig.cpp b/kopete/kopete/config/accounts/kopeteaccountconfig.cpp index 3d86fb8d..feaa88fd 100644 --- a/kopete/kopete/config/accounts/kopeteaccountconfig.cpp +++ b/kopete/kopete/config/accounts/kopeteaccountconfig.cpp @@ -18,9 +18,9 @@ #include "kopeteaccountconfig.h" -#include -#include -#include +#include +#include +#include #include #include @@ -47,31 +47,31 @@ class KopeteAccountLVI : public KListViewItem private: //need to be guarded because some accounts may be linked (that's the case of jabber transports) - QGuardedPtr m_account; + TQGuardedPtr m_account; }; -typedef KGenericFactory KopeteAccountConfigFactory; +typedef KGenericFactory KopeteAccountConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_accountconfig, KopeteAccountConfigFactory( "kcm_kopete_accountconfig" ) ) -KopeteAccountConfig::KopeteAccountConfig( QWidget *parent, const char * /* name */, const QStringList &args ) +KopeteAccountConfig::KopeteAccountConfig( TQWidget *parent, const char * /* name */, const TQStringList &args ) : KCModule( KopeteAccountConfigFactory::instance(), parent, args ) { - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); m_view = new KopeteAccountConfigBase( this, "KopeteAccountConfig::m_view" ); m_view->mButtonUp->setIconSet( SmallIconSet( "up" ) ); m_view->mButtonDown->setIconSet( SmallIconSet( "down" ) ); - connect( m_view->mButtonNew, SIGNAL( clicked() ), this, SLOT( slotAddAccount() ) ); - connect( m_view->mButtonEdit, SIGNAL( clicked() ), this, SLOT( slotEditAccount() ) ); - connect( m_view->mButtonRemove, SIGNAL( clicked() ), this, SLOT( slotRemoveAccount() ) ); - connect( m_view->mButtonUp, SIGNAL( clicked() ), this, SLOT( slotAccountUp() ) ); - connect( m_view->mButtonDown, SIGNAL( clicked() ), this, SLOT( slotAccountDown() ) ); - connect( m_view->mAccountList, SIGNAL( selectionChanged() ), this, SLOT( slotItemSelected() ) ); - connect( m_view->mAccountList, SIGNAL( doubleClicked( QListViewItem * ) ), this, SLOT( slotEditAccount() ) ); - connect( m_view->mUseColor, SIGNAL( toggled( bool ) ), this, SLOT( slotColorChanged() ) ); - connect( m_view->mColorButton, SIGNAL( changed( const QColor & ) ), this, SLOT( slotColorChanged() ) ); + connect( m_view->mButtonNew, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddAccount() ) ); + connect( m_view->mButtonEdit, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotEditAccount() ) ); + connect( m_view->mButtonRemove, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemoveAccount() ) ); + connect( m_view->mButtonUp, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAccountUp() ) ); + connect( m_view->mButtonDown, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAccountDown() ) ); + connect( m_view->mAccountList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotItemSelected() ) ); + connect( m_view->mAccountList, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), this, TQT_SLOT( slotEditAccount() ) ); + connect( m_view->mUseColor, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotColorChanged() ) ); + connect( m_view->mColorButton, TQT_SIGNAL( changed( const TQColor & ) ), this, TQT_SLOT( slotColorChanged() ) ); m_view->mAccountList->setSorting(-1); @@ -92,7 +92,7 @@ void KopeteAccountConfig::save() i = static_cast( i->nextSibling() ); } - QMap::Iterator it; + TQMap::Iterator it; for(it=m_newColors.begin() ; it != m_newColors.end() ; ++it) it.key()->setColor(it.data()); m_newColors.clear(); @@ -108,7 +108,7 @@ void KopeteAccountConfig::load() m_view->mAccountList->clear(); - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); for ( Kopete::Account *i = accounts.first() ; i; i = accounts.next() ) { // Insert the item after the previous one @@ -136,7 +136,7 @@ void KopeteAccountConfig::slotItemSelected() m_view->mButtonDown->setEnabled( itemSelected->itemBelow() ); Kopete::Account *account = itemSelected->account(); - QColor color= m_newColors.contains(account) ? m_newColors[account] : account->color(); + TQColor color= m_newColors.contains(account) ? m_newColors[account] : account->color(); m_view->mUseColor->setEnabled( true ); m_view->mUseColor->setChecked( color.isValid() ); m_view->mColorButton->setColor( color ); @@ -181,7 +181,7 @@ void KopeteAccountConfig::slotAccountDown() void KopeteAccountConfig::slotAddAccount() { AddAccountWizard *m_addwizard = new AddAccountWizard( this, "addAccountWizard", true ); - connect( m_addwizard, SIGNAL( destroyed( QObject * ) ), this, SLOT( slotAddWizardDone() ) ); + connect( m_addwizard, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( slotAddWizardDone() ) ); m_addwizard->show(); } @@ -204,15 +204,15 @@ void KopeteAccountConfig::slotEditAccount() // FIXME: Why the #### is EditAccountWidget not a QWidget?!? This sideways casting // is braindead and error-prone. Looking at MSN the only reason I can see is // because it allows direct subclassing of designer widgets. But what is - // wrong with embedding the designer widget in an empty QWidget instead? + // wrong with embedding the designer widget in an empty TQWidget instead? // Also, if this REALLY has to be a pure class and not a widget, then the // class should at least be renamed to EditAccountIface instead - Martijn - QWidget *w = dynamic_cast( m_accountWidget ); + TQWidget *w = dynamic_cast( m_accountWidget ); if ( !w ) return; editDialog->setMainWidget( w ); - if ( editDialog->exec() == QDialog::Accepted ) + if ( editDialog->exec() == TQDialog::Accepted ) { if( m_accountWidget->validateData() ) m_accountWidget->apply(); @@ -263,7 +263,7 @@ void KopeteAccountConfig::slotColorChanged() } else if(!m_view->mUseColor->isChecked()) { //the user disabled account coloring, but it was activated before - m_newColors[account]=QColor(); + m_newColors[account]=TQColor(); emit changed(true); return; } diff --git a/kopete/kopete/config/accounts/kopeteaccountconfig.h b/kopete/kopete/config/accounts/kopeteaccountconfig.h index 9aec2a60..cfaf1064 100644 --- a/kopete/kopete/config/accounts/kopeteaccountconfig.h +++ b/kopete/kopete/config/accounts/kopeteaccountconfig.h @@ -17,8 +17,8 @@ #define __ACCOUNTCONFIG_H #include -#include -#include +#include +#include namespace Kopete { @@ -35,7 +35,7 @@ class KopeteAccountConfig : public KCModule Q_OBJECT public: - KopeteAccountConfig(QWidget *parent, const char *name, const QStringList &args ); + KopeteAccountConfig(TQWidget *parent, const char *name, const TQStringList &args ); public slots: virtual void save(); @@ -43,7 +43,7 @@ public slots: private: KopeteAccountConfigBase *m_view; - QMap m_newColors; + TQMap m_newColors; bool m_protected; private slots: diff --git a/kopete/kopete/config/appearance/appearanceconfig.cpp b/kopete/kopete/config/appearance/appearanceconfig.cpp index d83b0801..2f7a5eaf 100644 --- a/kopete/kopete/config/appearance/appearanceconfig.cpp +++ b/kopete/kopete/config/appearance/appearanceconfig.cpp @@ -29,13 +29,13 @@ #include "tooltipeditdialog.h" #include "emoticonseditdialog.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -84,9 +84,9 @@ #include "kopeteemoticons.h" #include "kopeteglobal.h" -#include +#include -typedef KGenericFactory KopeteAppearanceConfigFactory; +typedef KGenericFactory KopeteAppearanceConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_appearanceconfig, KopeteAppearanceConfigFactory( "kcm_kopete_appearanceconfig" ) ) class FakeProtocol; @@ -102,7 +102,7 @@ public: styleChanged(false) {} - QTabWidget *mAppearanceTabCtl; + TQTabWidget *mAppearanceTabCtl; ChatMessagePart *preview; AppearanceConfig_Emoticons *mPrfsEmoticons; @@ -111,7 +111,7 @@ public: AppearanceConfig_ContactList *mPrfsContactList; // value is the style path - QMap styleItemMap; + TQMap styleItemMap; ChatWindowStyle::StyleVariants currentVariantMap; ChatWindowStyle *currentStyle; bool loading; @@ -130,16 +130,16 @@ public: class KopeteStyleNewStuff : public KNewStuff { public: - KopeteStyleNewStuff(const QString &type, QWidget *parentWidget = 0) + KopeteStyleNewStuff(const TQString &type, TQWidget *parentWidget = 0) : KNewStuff( type, parentWidget) {} - bool createUploadFile(const QString &) + bool createUploadFile(const TQString &) { return false; } - bool install(const QString &styleFilename) + bool install(const TQString &styleFilename) { int styleInstallReturn = 0; styleInstallReturn = ChatWindowStyleManager::self()->installStyle( styleFilename ); @@ -179,59 +179,59 @@ public: }; // TODO: Someday, this configuration dialog must(not should) use KConfigXT -AppearanceConfig::AppearanceConfig(QWidget *parent, const char* /*name*/, const QStringList &args ) +AppearanceConfig::AppearanceConfig(TQWidget *parent, const char* /*name*/, const TQStringList &args ) : KCModule( KopeteAppearanceConfigFactory::instance(), parent, args ) { d = new Private; - (new QVBoxLayout(this))->setAutoAdd(true); - d->mAppearanceTabCtl = new QTabWidget(this, "mAppearanceTabCtl"); + (new TQVBoxLayout(this))->setAutoAdd(true); + d->mAppearanceTabCtl = new TQTabWidget(this, "mAppearanceTabCtl"); KConfig *config = KGlobal::config(); config->setGroup( "ChatWindowSettings" ); // "Emoticons" TAB ========================================================== d->mPrfsEmoticons = new AppearanceConfig_Emoticons(d->mAppearanceTabCtl); - connect(d->mPrfsEmoticons->chkUseEmoticons, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsEmoticons->chkRequireSpaces, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsEmoticons->icon_theme_list, SIGNAL(selectionChanged()), - this, SLOT(slotSelectedEmoticonsThemeChanged())); - connect(d->mPrfsEmoticons->btnInstallTheme, SIGNAL(clicked()), - this, SLOT(installEmoticonTheme())); - - connect(d->mPrfsEmoticons->btnGetThemes, SIGNAL(clicked()), - this, SLOT(slotGetEmoticonThemes())); - connect(d->mPrfsEmoticons->btnRemoveTheme, SIGNAL(clicked()), - this, SLOT(removeSelectedEmoticonTheme())); - connect(d->mPrfsEmoticons->btnEditThemes, SIGNAL(clicked()), - this, SLOT(editSelectedEmoticonTheme())); + connect(d->mPrfsEmoticons->chkUseEmoticons, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsEmoticons->chkRequireSpaces, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsEmoticons->icon_theme_list, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(slotSelectedEmoticonsThemeChanged())); + connect(d->mPrfsEmoticons->btnInstallTheme, TQT_SIGNAL(clicked()), + this, TQT_SLOT(installEmoticonTheme())); + + connect(d->mPrfsEmoticons->btnGetThemes, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotGetEmoticonThemes())); + connect(d->mPrfsEmoticons->btnRemoveTheme, TQT_SIGNAL(clicked()), + this, TQT_SLOT(removeSelectedEmoticonTheme())); + connect(d->mPrfsEmoticons->btnEditThemes, TQT_SIGNAL(clicked()), + this, TQT_SLOT(editSelectedEmoticonTheme())); d->mAppearanceTabCtl->addTab(d->mPrfsEmoticons, i18n("&Emoticons")); // "Chat Window" TAB ======================================================== d->mPrfsChatWindow = new AppearanceConfig_ChatWindow(d->mAppearanceTabCtl); - connect(d->mPrfsChatWindow->styleList, SIGNAL(selectionChanged(QListBoxItem *)), - this, SLOT(slotChatStyleSelected())); - connect(d->mPrfsChatWindow->variantList, SIGNAL(activated(const QString&)), - this, SLOT(slotChatStyleVariantSelected(const QString &))); - connect(d->mPrfsChatWindow->deleteButton, SIGNAL(clicked()), - this, SLOT(slotDeleteChatStyle())); - connect(d->mPrfsChatWindow->installButton, SIGNAL(clicked()), - this, SLOT(slotInstallChatStyle())); - connect(d->mPrfsChatWindow->btnGetStyles, SIGNAL(clicked()), - this, SLOT(slotGetChatStyles())); - connect(d->mPrfsChatWindow->groupConsecutiveMessages, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); + connect(d->mPrfsChatWindow->styleList, TQT_SIGNAL(selectionChanged(TQListBoxItem *)), + this, TQT_SLOT(slotChatStyleSelected())); + connect(d->mPrfsChatWindow->variantList, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(slotChatStyleVariantSelected(const TQString &))); + connect(d->mPrfsChatWindow->deleteButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDeleteChatStyle())); + connect(d->mPrfsChatWindow->installButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotInstallChatStyle())); + connect(d->mPrfsChatWindow->btnGetStyles, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotGetChatStyles())); + connect(d->mPrfsChatWindow->groupConsecutiveMessages, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); // Show the available styles when the Manager has finish to load the styles. - connect(ChatWindowStyleManager::self(), SIGNAL(loadStylesFinished()), this, SLOT(slotLoadChatStyles())); + connect(ChatWindowStyleManager::self(), TQT_SIGNAL(loadStylesFinished()), this, TQT_SLOT(slotLoadChatStyles())); - d->mPrfsChatWindow->htmlFrame->setFrameStyle(QFrame::WinPanel | QFrame::Sunken); + d->mPrfsChatWindow->htmlFrame->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); // Create the fake Chat Session createPreviewChatSession(); - QVBoxLayout *l = new QVBoxLayout(d->mPrfsChatWindow->htmlFrame); + TQVBoxLayout *l = new TQVBoxLayout(d->mPrfsChatWindow->htmlFrame); d->preview = new ChatMessagePart(d->previewChatSession, d->mPrfsChatWindow->htmlFrame, "preview"); d->preview->setJScriptEnabled(false); d->preview->setJavaEnabled(false); @@ -242,7 +242,7 @@ AppearanceConfig::AppearanceConfig(QWidget *parent, const char* /*name*/, const htmlWidget->setMarginHeight(4); htmlWidget->setFocusPolicy(NoFocus); htmlWidget->setSizePolicy( - QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); + TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); l->addWidget(htmlWidget); // Add the preview message to the ChatMessagePart createPreviewMessages(); @@ -251,28 +251,28 @@ AppearanceConfig::AppearanceConfig(QWidget *parent, const char* /*name*/, const // "Contact List" TAB ======================================================= d->mPrfsContactList = new AppearanceConfig_ContactList(d->mAppearanceTabCtl); - connect(d->mPrfsContactList->mTreeContactList, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mSortByGroup, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mEditTooltips, SIGNAL(clicked()), - this, SLOT(slotEditTooltips())); - connect(d->mPrfsContactList->mIndentContacts, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mDisplayMode, SIGNAL(clicked(int)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mIconMode, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mAnimateChanges, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mFadeVisibility, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mFoldVisibility, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mAutoHide, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsContactList->mAutoHideTimeout, SIGNAL(valueChanged(int)), - this, SLOT(emitChanged())); + connect(d->mPrfsContactList->mTreeContactList, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mSortByGroup, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mEditTooltips, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotEditTooltips())); + connect(d->mPrfsContactList->mIndentContacts, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mDisplayMode, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mIconMode, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mAnimateChanges, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mFadeVisibility, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mFoldVisibility, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mAutoHide, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsContactList->mAutoHideTimeout, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(emitChanged())); // don't enable the checkbox if XRender is not available #ifdef HAVE_XRENDER @@ -285,37 +285,37 @@ AppearanceConfig::AppearanceConfig(QWidget *parent, const char* /*name*/, const // "Colors and Fonts" TAB =================================================== d->mPrfsColors = new AppearanceConfig_Colors(d->mAppearanceTabCtl); - connect(d->mPrfsColors->foregroundColor, SIGNAL(changed(const QColor &)), - this, SLOT(slotHighlightChanged())); - connect(d->mPrfsColors->backgroundColor, SIGNAL(changed(const QColor &)), - this, SLOT(slotHighlightChanged())); - connect(d->mPrfsColors->fontFace, SIGNAL(fontSelected(const QFont &)), - this, SLOT(slotChangeFont())); - connect(d->mPrfsColors->textColor, SIGNAL(changed(const QColor &)), - this, SLOT(slotUpdateChatPreview())); - connect(d->mPrfsColors->bgColor, SIGNAL(changed(const QColor &)), - this, SLOT(slotUpdateChatPreview())); - connect(d->mPrfsColors->linkColor, SIGNAL(changed(const QColor &)), - this, SLOT(slotUpdateChatPreview())); - connect(d->mPrfsColors->mGreyIdleMetaContacts, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->idleContactColor, SIGNAL(changed(const QColor &)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mUseCustomFonts, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mSmallFont, SIGNAL(fontSelected(const QFont &)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mNormalFont, SIGNAL(fontSelected(const QFont &)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mGroupNameColor, SIGNAL(changed(const QColor &)), - this, SLOT(emitChanged())); - - connect(d->mPrfsColors->mBgOverride, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mFgOverride, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); - connect(d->mPrfsColors->mRtfOverride, SIGNAL(toggled(bool)), - this, SLOT(emitChanged())); + connect(d->mPrfsColors->foregroundColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(slotHighlightChanged())); + connect(d->mPrfsColors->backgroundColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(slotHighlightChanged())); + connect(d->mPrfsColors->fontFace, TQT_SIGNAL(fontSelected(const TQFont &)), + this, TQT_SLOT(slotChangeFont())); + connect(d->mPrfsColors->textColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(slotUpdateChatPreview())); + connect(d->mPrfsColors->bgColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(slotUpdateChatPreview())); + connect(d->mPrfsColors->linkColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(slotUpdateChatPreview())); + connect(d->mPrfsColors->mGreyIdleMetaContacts, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->idleContactColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mUseCustomFonts, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mSmallFont, TQT_SIGNAL(fontSelected(const TQFont &)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mNormalFont, TQT_SIGNAL(fontSelected(const TQFont &)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mGroupNameColor, TQT_SIGNAL(changed(const TQColor &)), + this, TQT_SLOT(emitChanged())); + + connect(d->mPrfsColors->mBgOverride, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mFgOverride, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); + connect(d->mPrfsColors->mRtfOverride, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(emitChanged())); d->mAppearanceTabCtl->addTab(d->mPrfsColors, i18n("Colors && Fonts")); @@ -331,8 +331,8 @@ AppearanceConfig::~AppearanceConfig() void AppearanceConfig::updateEmoticonsButton(bool _b) { - QString themeName = d->mPrfsEmoticons->icon_theme_list->currentText(); - QFileInfo fileInf(KGlobal::dirs()->findResource("emoticons", themeName+"/")); + TQString themeName = d->mPrfsEmoticons->icon_theme_list->currentText(); + TQFileInfo fileInf(KGlobal::dirs()->findResource("emoticons", themeName+"/")); d->mPrfsEmoticons->btnRemoveTheme->setEnabled( _b && fileInf.isWritable()); d->mPrfsEmoticons->btnGetThemes->setEnabled( false ); } @@ -499,28 +499,28 @@ void AppearanceConfig::updateEmoticonlist() d->mPrfsEmoticons->icon_theme_list->clear(); // Wipe out old list // Get a list of directories in our icon theme dir - QStringList themeDirs = KGlobal::dirs()->findDirs("emoticons", ""); + TQStringList themeDirs = KGlobal::dirs()->findDirs("emoticons", ""); // loop adding themes from all dirs into theme-list for(unsigned int x = 0;x < themeDirs.count();x++) { - QDir themeQDir(themeDirs[x]); - themeQDir.setFilter( QDir::Dirs ); // only scan for subdirs - themeQDir.setSorting( QDir::Name ); // I guess name is as good as any + TQDir themeQDir(themeDirs[x]); + themeQDir.setFilter( TQDir::Dirs ); // only scan for subdirs + themeQDir.setSorting( TQDir::Name ); // I guess name is as good as any for(unsigned int y = 0; y < themeQDir.count(); y++) { - QStringList themes = themeQDir.entryList(QDir::Dirs, QDir::Name); + TQStringList themes = themeQDir.entryList(TQDir::Dirs, TQDir::Name); // We don't care for '.' and '..' if ( themeQDir[y] != "." && themeQDir[y] != ".." ) { // Add ourselves to the list, using our directory name FIXME: use the first emoticon of the theme. - QPixmap previewPixmap = QPixmap(locate("emoticons", themeQDir[y]+"/smile.png")); + TQPixmap previewPixmap = TQPixmap(locate("emoticons", themeQDir[y]+"/smile.png")); d->mPrfsEmoticons->icon_theme_list->insertItem(previewPixmap,themeQDir[y]); } } } // Where is that theme in our big-list-o-themes? - QListBoxItem *item = d->mPrfsEmoticons->icon_theme_list->findItem( p->iconTheme() ); + TQListBoxItem *item = d->mPrfsEmoticons->icon_theme_list->findItem( p->iconTheme() ); if (item) // found it... make it the currently selected theme d->mPrfsEmoticons->icon_theme_list->setCurrentItem( item ); @@ -530,18 +530,18 @@ void AppearanceConfig::updateEmoticonlist() void AppearanceConfig::slotSelectedEmoticonsThemeChanged() { - QString themeName = d->mPrfsEmoticons->icon_theme_list->currentText(); - QFileInfo fileInf(KGlobal::dirs()->findResource("emoticons", themeName+"/")); + TQString themeName = d->mPrfsEmoticons->icon_theme_list->currentText(); + TQFileInfo fileInf(KGlobal::dirs()->findResource("emoticons", themeName+"/")); d->mPrfsEmoticons->btnRemoveTheme->setEnabled( fileInf.isWritable() ); Kopete::Emoticons emoticons( themeName ); - QStringList smileys = emoticons.emoticonAndPicList().keys(); - QString newContentText = ""; + TQStringList smileys = emoticons.emoticonAndPicList().keys(); + TQString newContentText = ""; - for(QStringList::Iterator it = smileys.begin(); it != smileys.end(); ++it ) - newContentText += QString::fromLatin1(" ").arg(*it); + for(TQStringList::Iterator it = smileys.begin(); it != smileys.end(); ++it ) + newContentText += TQString::fromLatin1(" ").arg(*it); - newContentText += QString::fromLatin1(""); + newContentText += TQString::fromLatin1(""); d->mPrfsEmoticons->icon_theme_preview->setText(newContentText); emitChanged(); } @@ -563,7 +563,7 @@ void AppearanceConfig::slotChangeFont() void AppearanceConfig::slotChatStyleSelected() { // Retrieve variant list. - QString stylePath = d->styleItemMap[d->mPrfsChatWindow->styleList->selectedItem()]; + TQString stylePath = d->styleItemMap[d->mPrfsChatWindow->styleList->selectedItem()]; d->currentStyle = ChatWindowStyleManager::self()->getStyleFromPool( stylePath ); if(d->currentStyle) @@ -603,7 +603,7 @@ void AppearanceConfig::slotChatStyleSelected() } } -void AppearanceConfig::slotChatStyleVariantSelected(const QString &variantName) +void AppearanceConfig::slotChatStyleVariantSelected(const TQString &variantName) { // kdDebug(14000) << k_funcinfo << variantName << endl; // kdDebug(14000) << k_funcinfo << d->currentVariantMap[variantName] << endl; @@ -615,11 +615,11 @@ void AppearanceConfig::slotChatStyleVariantSelected(const QString &variantName) void AppearanceConfig::slotInstallChatStyle() { - KURL styleToInstall = KFileDialog::getOpenURL( QString::null, QString::fromUtf8("application/x-zip application/x-tgz application/x-tbz"), this, i18n("Choose Chat Window style to install.") ); + KURL styleToInstall = KFileDialog::getOpenURL( TQString::null, TQString::fromUtf8("application/x-zip application/x-tgz application/x-tbz"), this, i18n("Choose Chat Window style to install.") ); if( !styleToInstall.isEmpty() ) { - QString stylePath; + TQString stylePath; if( KIO::NetAccess::download( styleToInstall, stylePath, this ) ) { int styleInstallReturn = 0; @@ -660,14 +660,14 @@ void AppearanceConfig::slotInstallChatStyle() void AppearanceConfig::slotDeleteChatStyle() { - QString styleName = d->mPrfsChatWindow->styleList->selectedItem()->text(); - QString stylePathToDelete = d->styleItemMap[d->mPrfsChatWindow->styleList->selectedItem()]; + TQString styleName = d->mPrfsChatWindow->styleList->selectedItem()->text(); + TQString stylePathToDelete = d->styleItemMap[d->mPrfsChatWindow->styleList->selectedItem()]; if( ChatWindowStyleManager::self()->removeStyle(stylePathToDelete) ) { KMessageBox::queuedMessageBox(this, KMessageBox::Information, i18n("It's the deleted style name", "The style %1 was successfully deleted.").arg(styleName)); // Get the first item in the stye List. - QString stylePath = (*d->styleItemMap.begin()); + TQString stylePath = (*d->styleItemMap.begin()); d->currentStyle = ChatWindowStyleManager::self()->getStyleFromPool(stylePath); emitChanged(); } @@ -686,7 +686,7 @@ void AppearanceConfig::slotGetChatStyles() downloadDialog->setType( "kopete/chatstyle" ); // you have to do this by hand when providing your own Engine KNS::ProviderLoader *provider = new KNS::ProviderLoader( this ); - QObject::connect( provider, SIGNAL( providersLoaded(Provider::List*) ), downloadDialog, SLOT( slotProviders (Provider::List *) ) ); + TQObject::connect( provider, TQT_SIGNAL( providersLoaded(Provider::List*) ), downloadDialog, TQT_SLOT( slotProviders (Provider::List *) ) ); provider->load( "kopete/chatstyle", "http://download.kde.org/khotnewstuff/kopetestyles12-providers.xml" ); downloadDialog->exec(); } @@ -696,7 +696,7 @@ void AppearanceConfig::slotGetChatStyles() class FakeContact : public Kopete::Contact { public: - FakeContact (Kopete::Account *account, const QString &id, Kopete::MetaContact *mc ) : Kopete::Contact( account, id, mc ) {} + FakeContact (Kopete::Account *account, const TQString &id, Kopete::MetaContact *mc ) : Kopete::Contact( account, id, mc ) {} virtual Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags /*c*/) { return 0L; } virtual void slotUserInfo() {}; }; @@ -705,29 +705,29 @@ public: class FakeProtocol : public Kopete::Protocol { public: -FakeProtocol( KInstance *instance, QObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name){} -Kopete::Account* createNewAccount( const QString &/*accountId*/ ){return 0L;} -AddContactPage* createAddContactWidget( QWidget */*parent*/, Kopete::Account */*account*/){return 0L;} -KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, QWidget */*parent */){return 0L;} +FakeProtocol( KInstance *instance, TQObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name){} +Kopete::Account* createNewAccount( const TQString &/*accountId*/ ){return 0L;} +AddContactPage* createAddContactWidget( TQWidget */*parent*/, Kopete::Account */*account*/){return 0L;} +KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account */*account*/, TQWidget */*parent */){return 0L;} }; // This is for style preview. class FakeAccount : public Kopete::Account { public: -FakeAccount(Kopete::Protocol *parent, const QString &accountID, const char *name) : Kopete::Account(parent, accountID, name){} +FakeAccount(Kopete::Protocol *parent, const TQString &accountID, const char *name) : Kopete::Account(parent, accountID, name){} ~FakeAccount() {} -bool createContact( const QString &/*contactId*/, Kopete::MetaContact */*parentContact*/ ){return true;} +bool createContact( const TQString &/*contactId*/, Kopete::MetaContact */*parentContact*/ ){return true;} void connect( const Kopete::OnlineStatus& /*initialStatus*/){} void disconnect(){} -void setOnlineStatus( const Kopete::OnlineStatus& /*status*/ , const QString &/*reason*/){} +void setOnlineStatus( const Kopete::OnlineStatus& /*status*/ , const TQString &/*reason*/){} }; void AppearanceConfig::createPreviewChatSession() { - d->previewProtocol = new FakeProtocol( new KInstance(QCString("kopete-preview-chatwindowstyle")), 0L, "kopete-preview-chatwindowstyle"); - d->previewAccount = new FakeAccount(d->previewProtocol, QString("previewaccount"), 0); + d->previewProtocol = new FakeProtocol( new KInstance(TQCString("kopete-preview-chatwindowstyle")), 0L, "kopete-preview-chatwindowstyle"); + d->previewAccount = new FakeAccount(d->previewProtocol, TQString("previewaccount"), 0); // Create fake meta/contacts d->myselfMetaContact = new Kopete::MetaContact(); @@ -757,11 +757,11 @@ void AppearanceConfig::createPreviewMessages() Kopete::Message msgOut2( d->myself, d->jack, i18n( "Ok, a outgoing consecutive message." ), Kopete::Message::Outbound ); Kopete::Message msgCol( d->jack, d->myself, i18n( "Here is an incoming colored message" ), Kopete::Message::Inbound ); - msgCol.setFg( QColor( "DodgerBlue" ) ); - msgCol.setBg( QColor( "LightSteelBlue" ) ); + msgCol.setFg( TQColor( "DodgerBlue" ) ); + msgCol.setBg( TQColor( "LightSteelBlue" ) ); Kopete::Message msgInt( d->jack, d->myself, i18n( "This is an internal message" ), Kopete::Message::Internal ); Kopete::Message msgAct( d->jack, d->myself, i18n( "performed an action" ), Kopete::Message::Inbound, - Kopete::Message::PlainText, QString::null, Kopete::Message::TypeAction ); + Kopete::Message::PlainText, TQString::null, Kopete::Message::TypeAction ); Kopete::Message msgHigh( d->jack, d->myself, i18n( "This is a highlighted message" ), Kopete::Message::Inbound ); msgHigh.setImportance( Kopete::Message::Highlight ); // This is a UTF-8 string btw. @@ -801,7 +801,7 @@ void AppearanceConfig::emitChanged() void AppearanceConfig::installEmoticonTheme() { - KURL themeURL = KURLRequesterDlg::getURL(QString::null, this, + KURL themeURL = KURLRequesterDlg::getURL(TQString::null, this, i18n("Drag or Type Emoticon Theme URL")); if ( themeURL.isEmpty() ) return; @@ -820,13 +820,13 @@ void AppearanceConfig::installEmoticonTheme() void AppearanceConfig::removeSelectedEmoticonTheme() { - QListBoxItem *selected = d->mPrfsEmoticons->icon_theme_list->selectedItem(); + TQListBoxItem *selected = d->mPrfsEmoticons->icon_theme_list->selectedItem(); if(selected==0) return; - QString themeName = selected->text(); + TQString themeName = selected->text(); - QString question=i18n("Are you sure you want to remove the " + TQString question=i18n("Are you sure you want to remove the " "%1 emoticon theme?
    " "
    " "This will delete the files installed by this theme.
    "). @@ -864,18 +864,18 @@ void AppearanceConfig::slotGetEmoticonThemes() void AppearanceConfig::slotEditTooltips() { TooltipEditDialog *dlg = new TooltipEditDialog(this); - connect(dlg, SIGNAL(changed(bool)), this, SIGNAL(changed(bool))); + connect(dlg, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool))); dlg->exec(); delete dlg; } void AppearanceConfig::editSelectedEmoticonTheme() { - QListBoxItem *selected = d->mPrfsEmoticons->icon_theme_list->selectedItem(); + TQListBoxItem *selected = d->mPrfsEmoticons->icon_theme_list->selectedItem(); if(selected==0) return; - QString themeName = selected->text(); + TQString themeName = selected->text(); EmoticonsEditDialog *dlg = new EmoticonsEditDialog(this, themeName); dlg->exec(); diff --git a/kopete/kopete/config/appearance/appearanceconfig.h b/kopete/kopete/config/appearance/appearanceconfig.h index 747117c6..e380542d 100644 --- a/kopete/kopete/config/appearance/appearanceconfig.h +++ b/kopete/kopete/config/appearance/appearanceconfig.h @@ -20,8 +20,8 @@ #define __APPEARANCE_H #include "kcmodule.h" -#include -#include +#include +#include /** * @author Duncan Mac-Vicar P. @@ -34,7 +34,7 @@ class AppearanceConfig : public KCModule friend class KopeteStyleNewStuff; public: - AppearanceConfig( QWidget *parent, const char *name, const QStringList &args ); + AppearanceConfig( TQWidget *parent, const char *name, const TQStringList &args ); ~AppearanceConfig(); virtual void save(); @@ -48,7 +48,7 @@ private slots: void slotInstallChatStyle(); void slotDeleteChatStyle(); void slotChatStyleSelected(); - void slotChatStyleVariantSelected(const QString &variantName); + void slotChatStyleVariantSelected(const TQString &variantName); void slotEditTooltips(); void emitChanged(); void installEmoticonTheme(); diff --git a/kopete/kopete/config/appearance/emoticonseditdialog.cpp b/kopete/kopete/config/appearance/emoticonseditdialog.cpp index 21e12231..af62e4ff 100644 --- a/kopete/kopete/config/appearance/emoticonseditdialog.cpp +++ b/kopete/kopete/config/appearance/emoticonseditdialog.cpp @@ -25,19 +25,19 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include -EditDialog::EditDialog(QWidget *parent, const char* name) +EditDialog::EditDialog(TQWidget *parent, const char* name) : KDialogBase(parent, name, true, i18n(name), Ok|Cancel, Ok, true) { setupDlg(); } -EditDialog::EditDialog(QWidget *parent, const char* name, QPixmap emot, QString text, QString file) +EditDialog::EditDialog(TQWidget *parent, const char* name, TQPixmap emot, TQString text, TQString file) : KDialogBase(parent, name, true, i18n(name), Ok|Cancel, Ok, true) { setupDlg(); @@ -48,19 +48,19 @@ EditDialog::EditDialog(QWidget *parent, const char* name, QPixmap emot, QString void EditDialog::setupDlg() { - wdg = new QWidget(this); - QVBoxLayout *vl = new QVBoxLayout(wdg, 11, 6); - QHBoxLayout *hb = new QHBoxLayout(wdg, 0, 6); + wdg = new TQWidget(this); + TQVBoxLayout *vl = new TQVBoxLayout(wdg, 11, 6); + TQHBoxLayout *hb = new TQHBoxLayout(wdg, 0, 6); leText = new KLineEdit(wdg); btnIcon = new KPushButton(wdg); - btnIcon->setFixedSize(QSize(64, 64)); + btnIcon->setFixedSize(TQSize(64, 64)); - vl->addWidget(new QLabel(i18n("Insert the string for the emoticon\nseparated by space if you want multiple strings"), wdg)); + vl->addWidget(new TQLabel(i18n("Insert the string for the emoticon\nseparated by space if you want multiple strings"), wdg)); hb->addWidget(btnIcon); hb->addWidget(leText); vl->addLayout(hb); setMainWidget(wdg); - connect(btnIcon, SIGNAL(clicked()), this, SLOT(btnIconClicked())); + connect(btnIcon, TQT_SIGNAL(clicked()), this, TQT_SLOT(btnIconClicked())); } void EditDialog::btnIconClicked() @@ -75,17 +75,17 @@ void EditDialog::btnIconClicked() if(emoticon.isEmpty()) return; - btnIcon->setPixmap(QPixmap(emoticon)); + btnIcon->setPixmap(TQPixmap(emoticon)); } -EmoticonsEditDialog::EmoticonsEditDialog(QWidget *parent, QString theme, const char* name) +EmoticonsEditDialog::EmoticonsEditDialog(TQWidget *parent, TQString theme, const char* name) : KDialogBase(parent, name, true, i18n("Emoticons Editor"), Ok|Cancel, Ok, true) { themeName = theme; mMainWidget = new EmoticonsEditWidget(this, "EmoticonsEditDialog::mMainWidget"); setMainWidget(mMainWidget); - resize(QSize(450, 350)); + resize(TQSize(450, 350)); mMainWidget->btnAdd->setGuiItem(KStdGuiItem::add()); mMainWidget->btnEdit->setText(i18n("Edit...")); mMainWidget->btnRemove->setGuiItem(KStdGuiItem::remove()); @@ -96,22 +96,22 @@ EmoticonsEditDialog::EmoticonsEditDialog(QWidget *parent, QString theme, const c mMainWidget->klvEmoticons->addColumn("File", 0); mMainWidget->klvEmoticons->header()->hide(); Kopete::Emoticons emoticons( theme ); - QMap smileys = emoticons.emoticonAndPicList(); + TQMap smileys = emoticons.emoticonAndPicList(); - for(QMap::Iterator it = smileys.begin(); it != smileys.end(); ++it ) + for(TQMap::Iterator it = smileys.begin(); it != smileys.end(); ++it ) { KListViewItem *itm = new KListViewItem(mMainWidget->klvEmoticons); - itm->setPixmap(0, QPixmap(it.key())); - itm->setText(2, QFileInfo(it.key()).baseName()); - QString text = *it.data().at(0); + itm->setPixmap(0, TQPixmap(it.key())); + itm->setText(2, TQFileInfo(it.key()).baseName()); + TQString text = *it.data().at(0); for(uint i = 1; i < it.data().size(); i++) { text += " " + *it.data().at(i); } itm->setText(1, text); } - QFile *fp = new QFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml"); + TQFile *fp = new TQFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml"); if( !fp->exists() ) { kdWarning() << "EmoticonsEditDialog::EmoticonsEditDialog() " << fp->name() << " doesn't exist!" << endl; @@ -131,18 +131,18 @@ EmoticonsEditDialog::EmoticonsEditDialog(QWidget *parent, QString theme, const c fp->close(); - mMainWidget->klvEmoticons->setColumnWidth(0, QListView::Maximum); - mMainWidget->klvEmoticons->setColumnWidth(1, QListView::Maximum); + mMainWidget->klvEmoticons->setColumnWidth(0, TQListView::Maximum); + mMainWidget->klvEmoticons->setColumnWidth(1, TQListView::Maximum); - connect(this, SIGNAL(okClicked()), this, SLOT(slotOkClicked())); - connect(mMainWidget->btnAdd, SIGNAL(clicked()), this, SLOT(slotAddClicked())); - connect(mMainWidget->btnEdit, SIGNAL(clicked()), this, SLOT(slotEditClicked())); - connect(mMainWidget->btnRemove, SIGNAL(clicked()), this, SLOT(slotRemoveClicked())); + connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotOkClicked())); + connect(mMainWidget->btnAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddClicked())); + connect(mMainWidget->btnEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditClicked())); + connect(mMainWidget->btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveClicked())); } void EmoticonsEditDialog::slotOkClicked() { - QFile *fp = new QFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml"); + TQFile *fp = new TQFile(KGlobal::dirs()->saveLocation( "emoticons", themeName, false ) + "/emoticons.xml"); if( !fp->exists() ) { kdWarning() << "EmoticonsEditDialog::slotOkClicked() " << fp->name() << " doesn't exist!" << endl; @@ -154,7 +154,7 @@ void EmoticonsEditDialog::slotOkClicked() return; } - QTextStream emoStream(fp); + TQTextStream emoStream(fp); emoStream << themeXml.toString(4); fp->close(); } @@ -163,7 +163,7 @@ void EmoticonsEditDialog::slotAddClicked() { EditDialog *dlg = new EditDialog(this, "Add emoticon"); - if(dlg->exec() == QDialog::Rejected) + if(dlg->exec() == TQDialog::Rejected) return; if(dlg->getText().isEmpty() || !dlg->getEmoticon()) @@ -182,29 +182,29 @@ void EmoticonsEditDialog::slotEditClicked() dlg = new EditDialog(this, "Edit emoticon", *mMainWidget->klvEmoticons->selectedItem()->pixmap(0), mMainWidget->klvEmoticons->selectedItem()->text(1), mMainWidget->klvEmoticons->selectedItem()->text(2)); - if(dlg->exec() == QDialog::Rejected) + if(dlg->exec() == TQDialog::Rejected) return; if(dlg->getText().isEmpty() || !dlg->getEmoticon()) return; bool copy; - QString emo = dlg->getEmoticon(); + TQString emo = dlg->getEmoticon(); if(mMainWidget->klvEmoticons->selectedItem()->text(2) != dlg->getEmoticon()) { copy = true; } else { copy = false; - QString f = mMainWidget->klvEmoticons->selectedItem()->text(2); + TQString f = mMainWidget->klvEmoticons->selectedItem()->text(2); KStandardDirs *dir = KGlobal::dirs(); - emo = dir->findResource( "emoticons", themeName + QString::fromLatin1( "/" ) + f ); + emo = dir->findResource( "emoticons", themeName + TQString::fromLatin1( "/" ) + f ); if( emo.isNull() ) - emo = dir->findResource( "emoticons", themeName + QString::fromLatin1( "/" ) + f + QString::fromLatin1( ".mng" ) ); + emo = dir->findResource( "emoticons", themeName + TQString::fromLatin1( "/" ) + f + TQString::fromLatin1( ".mng" ) ); if ( emo.isNull() ) - emo = dir->findResource( "emoticons", themeName + QString::fromLatin1( "/" ) + f + QString::fromLatin1( ".png" ) ); + emo = dir->findResource( "emoticons", themeName + TQString::fromLatin1( "/" ) + f + TQString::fromLatin1( ".png" ) ); if ( emo.isNull() ) - emo = dir->findResource( "emoticons", themeName + QString::fromLatin1( "/" ) + f + QString::fromLatin1( ".gif" ) ); + emo = dir->findResource( "emoticons", themeName + TQString::fromLatin1( "/" ) + f + TQString::fromLatin1( ".gif" ) ); if ( emo.isNull() ) return; } @@ -223,44 +223,44 @@ void EmoticonsEditDialog::slotRemoveClicked() removeEmoticon(mMainWidget->klvEmoticons->selectedItem()->text(2)); } -void EmoticonsEditDialog::addEmoticon(QString emo, QString text, bool copy) +void EmoticonsEditDialog::addEmoticon(TQString emo, TQString text, bool copy) { if(copy) KIO::copy(emo, KGlobal::dirs()->saveLocation( "emoticons", themeName, false )); KListViewItem *itm = new KListViewItem(mMainWidget->klvEmoticons); - itm->setPixmap(0, QPixmap(emo)); + itm->setPixmap(0, TQPixmap(emo)); itm->setText(1, text); - itm->setText(2, QFileInfo(emo).baseName()); + itm->setText(2, TQFileInfo(emo).baseName()); - QDomNode lc = themeXml.lastChild(); + TQDomNode lc = themeXml.lastChild(); if(lc.isNull()) return; - QDomElement emoticon = themeXml.createElement("emoticon"); - emoticon.setAttribute("file", QFileInfo(emo).baseName()); + TQDomElement emoticon = themeXml.createElement("emoticon"); + emoticon.setAttribute("file", TQFileInfo(emo).baseName()); lc.appendChild(emoticon); - QStringList splitted = QStringList::split(" ", text); - QStringList::const_iterator constIterator; + TQStringList splitted = TQStringList::split(" ", text); + TQStringList::const_iterator constIterator; for(constIterator = splitted.begin(); constIterator != splitted.end(); constIterator++) { - QDomElement emotext = themeXml.createElement("string"); - QDomText txt = themeXml.createTextNode((*constIterator).stripWhiteSpace()); + TQDomElement emotext = themeXml.createElement("string"); + TQDomText txt = themeXml.createTextNode((*constIterator).stripWhiteSpace()); emotext.appendChild(txt); emoticon.appendChild(emotext); } } -void EmoticonsEditDialog::removeEmoticon(QString emo) +void EmoticonsEditDialog::removeEmoticon(TQString emo) { - QDomNode lc = themeXml.lastChild(); + TQDomNode lc = themeXml.lastChild(); if(lc.isNull()) return; - QDomNodeList nl = lc.childNodes(); + TQDomNodeList nl = lc.childNodes(); for(uint i = 0; i < nl.length(); i++) { - QDomElement de = nl.item(i).toElement(); + TQDomElement de = nl.item(i).toElement(); if(!de.isNull() && de.tagName() == "emoticon" && de.attribute("file") == emo) { lc.removeChild(de); delete mMainWidget->klvEmoticons->selectedItem(); diff --git a/kopete/kopete/config/appearance/emoticonseditdialog.h b/kopete/kopete/config/appearance/emoticonseditdialog.h index 4bbaccda..fe5b8426 100644 --- a/kopete/kopete/config/appearance/emoticonseditdialog.h +++ b/kopete/kopete/config/appearance/emoticonseditdialog.h @@ -17,12 +17,12 @@ #define EMOTICONSEDITDIALOG_H #include -#include +#include #include #include #include -#include -#include +#include +#include class EmoticonsEditWidget; @@ -31,18 +31,18 @@ class EditDialog : public KDialogBase Q_OBJECT public: - EditDialog(QWidget *parent, const char* name); - EditDialog(QWidget *parent, const char* name, QPixmap emot, QString text, QString file); - const QString getText() { return leText->text(); }; - const QString getEmoticon() { return emoticon; }; + EditDialog(TQWidget *parent, const char* name); + EditDialog(TQWidget *parent, const char* name, TQPixmap emot, TQString text, TQString file); + const TQString getText() { return leText->text(); }; + const TQString getEmoticon() { return emoticon; }; private slots: void btnIconClicked(); private: void setupDlg(); - QWidget *wdg; + TQWidget *wdg; KLineEdit *leText; KPushButton *btnIcon; - QString emoticon; + TQString emoticon; }; class EmoticonsEditDialog : public KDialogBase @@ -50,8 +50,8 @@ class EmoticonsEditDialog : public KDialogBase Q_OBJECT public: - EmoticonsEditDialog(QWidget *parent=0, QString theme = QString::null, const char* name="EmoticonsEditDialog"); - void addEmoticon(QString emo, QString text, bool copy); + EmoticonsEditDialog(TQWidget *parent=0, TQString theme = TQString::null, const char* name="EmoticonsEditDialog"); + void addEmoticon(TQString emo, TQString text, bool copy); private slots: void slotOkClicked(); @@ -60,11 +60,11 @@ class EmoticonsEditDialog : public KDialogBase void slotRemoveClicked(); private: - void removeEmoticon(QString emo); + void removeEmoticon(TQString emo); EmoticonsEditWidget *mMainWidget; - QString themeName; + TQString themeName; EditDialog *dlg; - QDomDocument themeXml; + TQDomDocument themeXml; }; #endif diff --git a/kopete/kopete/config/appearance/tooltipeditdialog.cpp b/kopete/kopete/config/appearance/tooltipeditdialog.cpp index c8ed8a5d..eef1ccb0 100644 --- a/kopete/kopete/config/appearance/tooltipeditdialog.cpp +++ b/kopete/kopete/config/appearance/tooltipeditdialog.cpp @@ -21,10 +21,10 @@ #include "kopeteglobal.h" #include "kopeteprefs.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -33,26 +33,26 @@ class TooltipItem : public KListViewItem { public: - TooltipItem(KListView *parent, const QString& label, const QString& propertyName) + TooltipItem(KListView *parent, const TQString& label, const TQString& propertyName) : KListViewItem(parent, label), mPropName(propertyName) { } - TooltipItem(KListView *parent, QListViewItem *item, const QString& label, const QString& propertyName) + TooltipItem(KListView *parent, TQListViewItem *item, const TQString& label, const TQString& propertyName) : KListViewItem(parent, item, label), mPropName(propertyName) { } - QString propertyName() const { return mPropName; } + TQString propertyName() const { return mPropName; } private: - QString mPropName; + TQString mPropName; }; -TooltipEditDialog::TooltipEditDialog(QWidget *parent, const char* name) +TooltipEditDialog::TooltipEditDialog(TQWidget *parent, const char* name) : KDialogBase(parent, name, true, i18n("Tooltip Editor"), Ok|Cancel, Ok, true) { mMainWidget = new TooltipEditWidget(this, "TooltipEditDialog::mMainWidget"); @@ -64,13 +64,13 @@ TooltipEditDialog::TooltipEditDialog(QWidget *parent, const char* name) const Kopete::ContactPropertyTmpl::Map propmap( Kopete::Global::Properties::self()->templateMap()); - QStringList usedKeys = KopetePrefs::prefs()->toolTipContents(); + TQStringList usedKeys = KopetePrefs::prefs()->toolTipContents(); - connect(mMainWidget->lstUnusedItems, SIGNAL(doubleClicked ( QListViewItem *, const QPoint &, int )), this, SLOT(slotAddButton())); - connect(mMainWidget->lstUsedItems, SIGNAL(doubleClicked ( QListViewItem *, const QPoint &, int )), this, SLOT(slotRemoveButton())); + connect(mMainWidget->lstUnusedItems, TQT_SIGNAL(doubleClicked ( TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT(slotAddButton())); + connect(mMainWidget->lstUsedItems, TQT_SIGNAL(doubleClicked ( TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT(slotRemoveButton())); // first fill the "used" list - QStringList::Iterator usedIt=usedKeys.end(); + TQStringList::Iterator usedIt=usedKeys.end(); do { usedIt--; @@ -91,45 +91,45 @@ TooltipEditDialog::TooltipEditDialog(QWidget *parent, const char* name) new TooltipItem(mMainWidget->lstUnusedItems, it.data().label(), it.key()); } - connect(mMainWidget->lstUnusedItems, SIGNAL(selectionChanged(QListViewItem *)), - this, SLOT(slotUnusedSelected(QListViewItem *))); - connect(mMainWidget->lstUsedItems, SIGNAL(selectionChanged(QListViewItem *)), - this, SLOT(slotUsedSelected(QListViewItem *))); + connect(mMainWidget->lstUnusedItems, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(slotUnusedSelected(TQListViewItem *))); + connect(mMainWidget->lstUsedItems, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(slotUsedSelected(TQListViewItem *))); - QIconSet iconSet; + TQIconSet iconSet; iconSet = SmallIconSet("up"); mMainWidget->tbUp->setIconSet(iconSet); mMainWidget->tbUp->setEnabled(false); mMainWidget->tbUp->setAutoRepeat(true); - connect(mMainWidget->tbUp, SIGNAL(clicked()), SLOT(slotUpButton())); + connect(mMainWidget->tbUp, TQT_SIGNAL(clicked()), TQT_SLOT(slotUpButton())); iconSet = SmallIconSet("down"); mMainWidget->tbDown->setIconSet(iconSet); mMainWidget->tbDown->setEnabled(false); mMainWidget->tbDown->setAutoRepeat(true); - connect(mMainWidget->tbDown, SIGNAL(clicked()), SLOT(slotDownButton())); + connect(mMainWidget->tbDown, TQT_SIGNAL(clicked()), TQT_SLOT(slotDownButton())); - iconSet = QApplication::reverseLayout() ? SmallIconSet("back") : SmallIconSet("forward"); + iconSet = TQApplication::reverseLayout() ? SmallIconSet("back") : SmallIconSet("forward"); mMainWidget->tbAdd->setIconSet(iconSet); mMainWidget->tbAdd->setEnabled(false); - connect(mMainWidget->tbAdd, SIGNAL(clicked()), SLOT(slotAddButton())); + connect(mMainWidget->tbAdd, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddButton())); - iconSet = QApplication::reverseLayout() ? SmallIconSet("forward") : SmallIconSet("back"); + iconSet = TQApplication::reverseLayout() ? SmallIconSet("forward") : SmallIconSet("back"); mMainWidget->tbRemove->setIconSet(iconSet); mMainWidget->tbRemove->setEnabled(false); - connect(mMainWidget->tbRemove, SIGNAL(clicked()), SLOT(slotRemoveButton())); + connect(mMainWidget->tbRemove, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveButton())); - connect(this, SIGNAL(okClicked()), this, SLOT(slotOkClicked())); + connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotOkClicked())); - resize(QSize(450, 450)); + resize(TQSize(450, 450)); } void TooltipEditDialog::slotOkClicked() { - QStringList oldList = KopetePrefs::prefs()->toolTipContents(); - QStringList newList; - QListViewItemIterator it(mMainWidget->lstUsedItems); - QString keyname; + TQStringList oldList = KopetePrefs::prefs()->toolTipContents(); + TQStringList newList; + TQListViewItemIterator it(mMainWidget->lstUsedItems); + TQString keyname; while(it.current()) { @@ -149,13 +149,13 @@ void TooltipEditDialog::slotOkClicked() } -void TooltipEditDialog::slotUnusedSelected(QListViewItem *item) +void TooltipEditDialog::slotUnusedSelected(TQListViewItem *item) { //mMainWidget->tbRemove->setEnabled(false); mMainWidget->tbAdd->setEnabled(item!=0); } -void TooltipEditDialog::slotUsedSelected(QListViewItem *item) +void TooltipEditDialog::slotUsedSelected(TQListViewItem *item) { mMainWidget->tbRemove->setEnabled(item!=0); //mMainWidget->tbAdd->setEnabled(false); @@ -173,8 +173,8 @@ void TooltipEditDialog::slotUsedSelected(QListViewItem *item) void TooltipEditDialog::slotUpButton() { - QListViewItem *item = mMainWidget->lstUsedItems->currentItem(); - QListViewItem *prev = item->itemAbove(); + TQListViewItem *item = mMainWidget->lstUsedItems->currentItem(); + TQListViewItem *prev = item->itemAbove(); if(prev == 0) // we are first item already return; @@ -184,8 +184,8 @@ void TooltipEditDialog::slotUpButton() void TooltipEditDialog::slotDownButton() { - QListViewItem *item = mMainWidget->lstUsedItems->currentItem(); - QListViewItem *next = item->itemBelow(); + TQListViewItem *item = mMainWidget->lstUsedItems->currentItem(); + TQListViewItem *next = item->itemBelow(); if(next == 0) // we are last item already return; diff --git a/kopete/kopete/config/appearance/tooltipeditdialog.h b/kopete/kopete/config/appearance/tooltipeditdialog.h index 92d75aa9..54807df4 100644 --- a/kopete/kopete/config/appearance/tooltipeditdialog.h +++ b/kopete/kopete/config/appearance/tooltipeditdialog.h @@ -18,7 +18,7 @@ #define TOOLTIPEDITDIALOG_H #include -#include +#include #include class TooltipEditWidget; @@ -27,11 +27,11 @@ class TooltipEditDialog : public KDialogBase Q_OBJECT public: - TooltipEditDialog(QWidget *parent=0, const char* name="ToolTipEditDialog"); + TooltipEditDialog(TQWidget *parent=0, const char* name="ToolTipEditDialog"); private slots: - void slotUnusedSelected(QListViewItem *); - void slotUsedSelected(QListViewItem *); + void slotUnusedSelected(TQListViewItem *); + void slotUsedSelected(TQListViewItem *); void slotUpButton(); void slotDownButton(); void slotAddButton(); diff --git a/kopete/kopete/config/avdevice/avdeviceconfig.cpp b/kopete/kopete/config/avdevice/avdeviceconfig.cpp index a2c474e0..dec03277 100644 --- a/kopete/kopete/config/avdevice/avdeviceconfig.cpp +++ b/kopete/kopete/config/avdevice/avdeviceconfig.cpp @@ -19,13 +19,13 @@ #include "avdeviceconfig_videoconfig.h" #include "videodevice.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -34,35 +34,35 @@ #include #include #include -#include -#include +#include +#include -#include +#include //#include "videodevice.h" -typedef KGenericFactory KopeteAVDeviceConfigFactory; +typedef KGenericFactory KopeteAVDeviceConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_avdeviceconfig, KopeteAVDeviceConfigFactory( "kcm_kopete_avdeviceconfig" ) ) -AVDeviceConfig::AVDeviceConfig(QWidget *parent, const char * name , const QStringList &args) +AVDeviceConfig::AVDeviceConfig(TQWidget *parent, const char * name , const TQStringList &args) : KCModule( KopeteAVDeviceConfigFactory::instance(), parent, args ) { kdDebug() << "kopete:config (avdevice): KopeteAVDeviceConfigFactory::instance() called. " << endl; - (new QVBoxLayout(this))->setAutoAdd(true); - mAVDeviceTabCtl = new QTabWidget(this, "mAVDeviceTabCtl"); + (new TQVBoxLayout(this))->setAutoAdd(true); + mAVDeviceTabCtl = new TQTabWidget(this, "mAVDeviceTabCtl"); // "Video" TAB ============================================================ mPrfsVideoDevice = new AVDeviceConfig_VideoDevice(mAVDeviceTabCtl); - connect(mPrfsVideoDevice->mDeviceKComboBox, SIGNAL(activated(int)), this, SLOT(slotDeviceKComboBoxChanged(int))); - connect(mPrfsVideoDevice->mInputKComboBox, SIGNAL(activated(int)), this, SLOT(slotInputKComboBoxChanged(int))); - connect(mPrfsVideoDevice->mStandardKComboBox, SIGNAL(activated(int)), this, SLOT(slotStandardKComboBoxChanged(int))); - connect(mPrfsVideoDevice->mBrightnessSlider, SIGNAL(valueChanged(int)), this, SLOT(slotBrightnessSliderChanged(int))); - connect(mPrfsVideoDevice->mContrastSlider, SIGNAL(valueChanged(int)), this, SLOT(slotContrastSliderChanged(int))); - connect(mPrfsVideoDevice->mSaturationSlider, SIGNAL(valueChanged(int)), this, SLOT(slotSaturationSliderChanged(int))); - connect(mPrfsVideoDevice->mWhitenessSlider, SIGNAL(valueChanged(int)), this, SLOT(slotWhitenessSliderChanged(int))); - connect(mPrfsVideoDevice->mHueSlider, SIGNAL(valueChanged(int)), this, SLOT(slotHueSliderChanged(int))); - connect(mPrfsVideoDevice->mImageAutoBrightnessContrast, SIGNAL(toggled(bool)), this, SLOT(slotImageAutoBrightnessContrastChanged(bool))); - connect(mPrfsVideoDevice->mImageAutoColorCorrection, SIGNAL(toggled(bool)), this, SLOT(slotImageAutoColorCorrectionChanged(bool))); - connect(mPrfsVideoDevice->mImageAsMirror, SIGNAL(toggled(bool)), this, SLOT(slotImageAsMirrorChanged(bool))); + connect(mPrfsVideoDevice->mDeviceKComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDeviceKComboBoxChanged(int))); + connect(mPrfsVideoDevice->mInputKComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInputKComboBoxChanged(int))); + connect(mPrfsVideoDevice->mStandardKComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotStandardKComboBoxChanged(int))); + connect(mPrfsVideoDevice->mBrightnessSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotBrightnessSliderChanged(int))); + connect(mPrfsVideoDevice->mContrastSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotContrastSliderChanged(int))); + connect(mPrfsVideoDevice->mSaturationSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSaturationSliderChanged(int))); + connect(mPrfsVideoDevice->mWhitenessSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotWhitenessSliderChanged(int))); + connect(mPrfsVideoDevice->mHueSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotHueSliderChanged(int))); + connect(mPrfsVideoDevice->mImageAutoBrightnessContrast, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotImageAutoBrightnessContrastChanged(bool))); + connect(mPrfsVideoDevice->mImageAutoColorCorrection, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotImageAutoColorCorrectionChanged(bool))); + connect(mPrfsVideoDevice->mImageAsMirror, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotImageAsMirrorChanged(bool))); // why is this here? // mPrfsVideoDevice->mVideoImageLabel->setPixmap(qpixmap); @@ -81,7 +81,7 @@ AVDeviceConfig::AVDeviceConfig(QWidget *parent, const char * name , const QStri mVideoDevicePool->getImage(&qimage); if (qpixmap.convertFromImage(qimage,0) == true) mPrfsVideoDevice->mVideoImageLabel->setPixmap(qpixmap); - connect(&qtimer, SIGNAL(timeout()), this, SLOT(slotUpdateImage()) ); + connect(&qtimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateImage()) ); qtimer.start(0,FALSE); } diff --git a/kopete/kopete/config/avdevice/avdeviceconfig.h b/kopete/kopete/config/avdevice/avdeviceconfig.h index d732b1a7..3648a913 100644 --- a/kopete/kopete/config/avdevice/avdeviceconfig.h +++ b/kopete/kopete/config/avdevice/avdeviceconfig.h @@ -20,12 +20,12 @@ #include "kcmodule.h" #include "videodevicepool.h" -#include -#include -#include +#include +#include +#include #ifdef HAVE_GL -# include +# include #endif class QFrame; @@ -41,7 +41,7 @@ class AVDeviceConfig : public KCModule { Q_OBJECT public: - AVDeviceConfig(QWidget *parent, const char * name , const QStringList &args); + AVDeviceConfig(TQWidget *parent, const char * name , const TQStringList &args); ~AVDeviceConfig(); virtual void save(); @@ -63,16 +63,16 @@ private slots: void slotImageAsMirrorChanged(bool); void slotUpdateImage(); private: - QTabWidget* mAVDeviceTabCtl; + TQTabWidget* mAVDeviceTabCtl; AVDeviceConfig_VideoDevice *mPrfsVideoDevice; AVDeviceConfig_AudioDevice *mPrfsAudioDevice; Kopete::AV::VideoDevicePool *mVideoDevicePool ; - QImage qimage; - QPixmap qpixmap; - QTimer qtimer; + TQImage qimage; + TQPixmap qpixmap; + TQTimer qtimer; void setVideoInputParameters(); #ifdef HAVE_GL - QGLWidget m_video_gl; + TQGLWidget m_video_gl; #endif }; diff --git a/kopete/kopete/config/behavior/behaviorconfig.cpp b/kopete/kopete/config/behavior/behaviorconfig.cpp index 379e762a..b133a64b 100644 --- a/kopete/kopete/config/behavior/behaviorconfig.cpp +++ b/kopete/kopete/config/behavior/behaviorconfig.cpp @@ -18,14 +18,14 @@ #include "behaviorconfig_events.h" #include "behaviorconfig_chat.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -42,17 +42,17 @@ #include "kopetepluginmanager.h" #include "kopeteaway.h" -#include +#include -typedef KGenericFactory KopeteBehaviorConfigFactory; +typedef KGenericFactory KopeteBehaviorConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_behaviorconfig, KopeteBehaviorConfigFactory( "kcm_kopete_behaviorconfig" ) ) -BehaviorConfig::BehaviorConfig(QWidget *parent, const char * /* name */, const QStringList &args) : +BehaviorConfig::BehaviorConfig(TQWidget *parent, const char * /* name */, const TQStringList &args) : KCModule( KopeteBehaviorConfigFactory::instance(), parent, args ) { - (new QVBoxLayout(this))->setAutoAdd(true); - mBehaviorTabCtl = new QTabWidget(this, "mBehaviorTabCtl"); + (new TQVBoxLayout(this))->setAutoAdd(true); + mBehaviorTabCtl = new TQTabWidget(this, "mBehaviorTabCtl"); // "General" TAB ============================================================ mPrfsGeneral = new BehaviorConfig_General(mBehaviorTabCtl); @@ -77,81 +77,81 @@ BehaviorConfig::BehaviorConfig(QWidget *parent, const char * /* name */, const Q // "General" TAB ============================================================ - connect(mPrfsGeneral->mShowTrayChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsGeneral->mStartDockedChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsGeneral->mUseQueueChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsGeneral->mUseStackChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsGeneral->mQueueUnreadMessagesChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsGeneral->mAutoConnect, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); + connect(mPrfsGeneral->mShowTrayChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsGeneral->mStartDockedChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsGeneral->mUseQueueChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsGeneral->mUseStackChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsGeneral->mQueueUnreadMessagesChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsGeneral->mAutoConnect, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); // "Events" TAB ============================================================ - connect(mPrfsEvents->mQueueOnlyHighlightedMessagesInGroupChatsChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mQueueOnlyMessagesOnAnotherDesktopChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mBalloonNotifyChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mBalloonNotifyIgnoreClosesChatViewChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mCloseBalloonChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mBalloonCloseDelay, SIGNAL(valueChanged(int)), - this, SLOT(slotValueChanged(int))); - connect(mPrfsEvents->mTrayflashNotifyChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mTrayflashNotifyLeftClickOpensMessageChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mTrayflashNotifySetCurrentDesktopToChatViewChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mSoundIfAwayChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mEventIfActive, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect(mPrfsEvents->mRaiseMsgWindowChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mQueueOnlyHighlightedMessagesInGroupChatsChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mQueueOnlyMessagesOnAnotherDesktopChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mBalloonNotifyChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mBalloonNotifyIgnoreClosesChatViewChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mCloseBalloonChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mBalloonCloseDelay, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotValueChanged(int))); + connect(mPrfsEvents->mTrayflashNotifyChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mTrayflashNotifyLeftClickOpensMessageChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mTrayflashNotifySetCurrentDesktopToChatViewChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mSoundIfAwayChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mEventIfActive, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect(mPrfsEvents->mRaiseMsgWindowChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); // "Chat" TAB =============================================================== - connect( mPrfsChat->cb_ShowEventsChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect( mPrfsChat->highlightEnabled, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect( mPrfsChat->cb_SpellCheckChk, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect( mPrfsChat->cmbChatGroupingPolicy, SIGNAL(activated(int)), - this, SLOT(slotValueChanged(int))); - connect( mPrfsChat->mChatViewBufferSize, SIGNAL(valueChanged(int)), - this, SLOT(slotValueChanged(int))); - connect( mPrfsChat->truncateContactNameEnabled, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect( mPrfsChat->mMaxContactNameLength, SIGNAL(valueChanged(int)), - this, SLOT(slotValueChanged(int))); - connect( mPrfsChat->viewPlugin, SIGNAL(activated(int)), - this, SLOT(slotValueChanged(int))); - connect( mPrfsChat->viewPlugin, SIGNAL(activated(int)), - this, SLOT(slotUpdatePluginLabel(int))); + connect( mPrfsChat->cb_ShowEventsChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect( mPrfsChat->highlightEnabled, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect( mPrfsChat->cb_SpellCheckChk, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect( mPrfsChat->cmbChatGroupingPolicy, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotValueChanged(int))); + connect( mPrfsChat->mChatViewBufferSize, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotValueChanged(int))); + connect( mPrfsChat->truncateContactNameEnabled, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect( mPrfsChat->mMaxContactNameLength, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotValueChanged(int))); + connect( mPrfsChat->viewPlugin, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotValueChanged(int))); + connect( mPrfsChat->viewPlugin, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotUpdatePluginLabel(int))); // "Away" TAB =============================================================== - connect( mAwayConfigUI->rememberedMessages, SIGNAL(valueChanged(int)), - this, SLOT(slotValueChanged(int))); - connect( mAwayConfigUI->mAutoAwayTimeout, SIGNAL(valueChanged(int)), - this, SLOT(slotValueChanged(int))); - connect( mAwayConfigUI->mGoAvailable, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect( mAwayConfigUI->mUseAutoAway, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect( mAwayConfigUI->mDisplayLastAwayMessage, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect( mAwayConfigUI->mDisplayCustomAwayMessage, SIGNAL(toggled(bool)), - this, SLOT(slotSettingsChanged(bool))); - connect( mAwayConfigUI->mAutoAwayMessageEdit, SIGNAL(textChanged(const QString&)), - this, SLOT(slotTextChanged(const QString&))); + connect( mAwayConfigUI->rememberedMessages, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotValueChanged(int))); + connect( mAwayConfigUI->mAutoAwayTimeout, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotValueChanged(int))); + connect( mAwayConfigUI->mGoAvailable, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect( mAwayConfigUI->mUseAutoAway, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect( mAwayConfigUI->mDisplayLastAwayMessage, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect( mAwayConfigUI->mDisplayCustomAwayMessage, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(slotSettingsChanged(bool))); + connect( mAwayConfigUI->mAutoAwayMessageEdit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotTextChanged(const TQString&))); } void BehaviorConfig::save() @@ -270,7 +270,7 @@ void BehaviorConfig::load() mPrfsChat->viewPlugin->clear(); int selectedIdx = 0, i = 0; - for( QValueList::iterator it = viewPlugins.begin(); it != viewPlugins.end(); ++it ) + for( TQValueList::iterator it = viewPlugins.begin(); it != viewPlugins.end(); ++it ) { if( (*it)->pluginName() == p->interfacePreference() ) selectedIdx = i; @@ -296,7 +296,7 @@ void BehaviorConfig::slotValueChanged(int) emit changed( true ); } -void BehaviorConfig::slotTextChanged(const QString&) +void BehaviorConfig::slotTextChanged(const TQString&) { emit changed( true ); } diff --git a/kopete/kopete/config/behavior/behaviorconfig.h b/kopete/kopete/config/behavior/behaviorconfig.h index 5a981784..8fead0ed 100644 --- a/kopete/kopete/config/behavior/behaviorconfig.h +++ b/kopete/kopete/config/behavior/behaviorconfig.h @@ -37,7 +37,7 @@ class BehaviorConfig : public KCModule Q_OBJECT public: - BehaviorConfig(QWidget *parent, const char * name , const QStringList &args) ; + BehaviorConfig(TQWidget *parent, const char * name , const TQStringList &args) ; virtual void save(); virtual void load(); @@ -46,15 +46,15 @@ class BehaviorConfig : public KCModule void slotSettingsChanged(bool); void slotValueChanged(int); void slotUpdatePluginLabel(int); - void slotTextChanged(const QString&); + void slotTextChanged(const TQString&); private: - QTabWidget* mBehaviorTabCtl; + TQTabWidget* mBehaviorTabCtl; BehaviorConfig_General *mPrfsGeneral; BehaviorConfig_Events *mPrfsEvents; BehaviorConfig_Chat *mPrfsChat; KopeteAwayConfigBaseUI *mAwayConfigUI; - QValueList viewPlugins; + TQValueList viewPlugins; Kopete::Away* awayInstance; }; #endif diff --git a/kopete/kopete/config/identity/globalidentitiesmanager.cpp b/kopete/kopete/config/identity/globalidentitiesmanager.cpp index 192849e4..52da32a7 100644 --- a/kopete/kopete/config/identity/globalidentitiesmanager.cpp +++ b/kopete/kopete/config/identity/globalidentitiesmanager.cpp @@ -17,9 +17,9 @@ #include "globalidentitiesmanager.h" // Qt includes -#include -#include -#include +#include +#include +#include // KDE includes #include @@ -37,7 +37,7 @@ class GlobalIdentitiesManager::Private { public: - QMap identitiesList; + TQMap identitiesList; }; GlobalIdentitiesManager *GlobalIdentitiesManager::s_self = 0L; @@ -49,8 +49,8 @@ GlobalIdentitiesManager *GlobalIdentitiesManager::self() return s_self; } -GlobalIdentitiesManager::GlobalIdentitiesManager(QObject *parent, const char *name) - : QObject(parent, name) +GlobalIdentitiesManager::GlobalIdentitiesManager(TQObject *parent, const char *name) + : TQObject(parent, name) { d = new Private; } @@ -62,7 +62,7 @@ GlobalIdentitiesManager::~GlobalIdentitiesManager() delete d; } -void GlobalIdentitiesManager::createNewIdentity(const QString &identityName) +void GlobalIdentitiesManager::createNewIdentity(const TQString &identityName) { // Create new identity metacontact based on myself to get the sub-contacts. Kopete::MetaContact *newIdentity = createNewMetaContact(); @@ -71,21 +71,21 @@ void GlobalIdentitiesManager::createNewIdentity(const QString &identityName) d->identitiesList.insert(identityName, newIdentity); } -void GlobalIdentitiesManager::copyIdentity(const QString ©IdentityName, const QString &sourceIdentity) +void GlobalIdentitiesManager::copyIdentity(const TQString ©IdentityName, const TQString &sourceIdentity) { Kopete::MetaContact *copyIdentity = createCopyMetaContact(d->identitiesList[sourceIdentity]); d->identitiesList.insert(copyIdentityName, copyIdentity); } -void GlobalIdentitiesManager::renameIdentity(const QString &oldName, const QString &newName) +void GlobalIdentitiesManager::renameIdentity(const TQString &oldName, const TQString &newName) { Kopete::MetaContact *renamedIdentity = d->identitiesList[oldName]; d->identitiesList.remove(oldName); d->identitiesList.insert(newName, renamedIdentity); } -void GlobalIdentitiesManager::removeIdentity(const QString &removedIdentity) +void GlobalIdentitiesManager::removeIdentity(const TQString &removedIdentity) { // Clear from memory the identity metacontact. delete d->identitiesList[removedIdentity]; @@ -93,15 +93,15 @@ void GlobalIdentitiesManager::removeIdentity(const QString &removedIdentity) d->identitiesList.remove(removedIdentity); } -void GlobalIdentitiesManager::updateIdentity(const QString &updatedIdentity, Kopete::MetaContact *sourceMetaContact) +void GlobalIdentitiesManager::updateIdentity(const TQString &updatedIdentity, Kopete::MetaContact *sourceMetaContact) { copyMetaContact(d->identitiesList[updatedIdentity], sourceMetaContact); } -bool GlobalIdentitiesManager::isIdentityPresent(const QString &identityName) +bool GlobalIdentitiesManager::isIdentityPresent(const TQString &identityName) { - QMapIterator it; - QMapIterator end = d->identitiesList.end(); + TQMapIterator it; + TQMapIterator end = d->identitiesList.end(); for(it = d->identitiesList.begin(); it != end; ++it) { @@ -114,7 +114,7 @@ bool GlobalIdentitiesManager::isIdentityPresent(const QString &identityName) return false; } -Kopete::MetaContact *GlobalIdentitiesManager::getIdentity(const QString &identityName) +Kopete::MetaContact *GlobalIdentitiesManager::getIdentity(const TQString &identityName) { // Check if the identity is present. return isIdentityPresent(identityName) ? d->identitiesList[identityName] : 0; @@ -124,26 +124,26 @@ void GlobalIdentitiesManager::loadXML() { kdDebug() << k_funcinfo << "Loading global identities list from XML." << endl; - QString filename = locateLocal( "appdata", QString::fromUtf8("global-identities.xml") ); + TQString filename = locateLocal( "appdata", TQString::fromUtf8("global-identities.xml") ); if( filename.isEmpty() ) { return; } - QDomDocument globalIdentitiesList( QString::fromUtf8( "kopete-global-identities-list" ) ); + TQDomDocument globalIdentitiesList( TQString::fromUtf8( "kopete-global-identities-list" ) ); - QFile globalIdentitiesListFile( filename ); + TQFile globalIdentitiesListFile( filename ); globalIdentitiesListFile.open( IO_ReadOnly ); globalIdentitiesList.setContent( &globalIdentitiesListFile ); - QDomElement list = globalIdentitiesList.documentElement(); - QDomElement element = list.firstChild().toElement(); + TQDomElement list = globalIdentitiesList.documentElement(); + TQDomElement element = list.firstChild().toElement(); while( !element.isNull() ) { - if( element.tagName() == QString::fromUtf8("identity") ) + if( element.tagName() == TQString::fromUtf8("identity") ) { Kopete::MetaContact *metaContact = createNewMetaContact(); - QString identityName = element.attribute(QString::fromUtf8("name")); + TQString identityName = element.attribute(TQString::fromUtf8("name")); if(!metaContact->fromXML(element)) { @@ -169,12 +169,12 @@ void GlobalIdentitiesManager::saveXML() { kdDebug() << k_funcinfo << "Saving global identities list to XML." << endl; - QString globalIdentitiesListFileName = locateLocal( "appdata", QString::fromUtf8("global-identities.xml") ); + TQString globalIdentitiesListFileName = locateLocal( "appdata", TQString::fromUtf8("global-identities.xml") ); KSaveFile globalIdentitiesListFile(globalIdentitiesListFileName); if( globalIdentitiesListFile.status() == 0 ) { - QTextStream *stream = globalIdentitiesListFile.textStream(); - stream->setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream *stream = globalIdentitiesListFile.textStream(); + stream->setEncoding( TQTextStream::UnicodeUTF8 ); toXML().save( *stream, 4 ); if ( globalIdentitiesListFile.close() ) @@ -193,20 +193,20 @@ void GlobalIdentitiesManager::saveXML() } } -const QDomDocument GlobalIdentitiesManager::toXML() +const TQDomDocument GlobalIdentitiesManager::toXML() { - QDomDocument doc; + TQDomDocument doc; - doc.appendChild(doc.createElement(QString::fromUtf8("kopete-global-identities-list"))); + doc.appendChild(doc.createElement(TQString::fromUtf8("kopete-global-identities-list"))); - QMapIterator it; - QMapIterator end = d->identitiesList.end(); + TQMapIterator it; + TQMapIterator end = d->identitiesList.end(); for(it = d->identitiesList.begin(); it != end; ++it) { kdDebug(14000) << k_funcinfo << "Saving " << it.key() << endl; - QDomElement identityMetaContactElement = it.data()->toXML(true); // Save minimal information. - identityMetaContactElement.setTagName(QString::fromUtf8("identity")); - identityMetaContactElement.setAttribute(QString::fromUtf8("name"), it.key()); + TQDomElement identityMetaContactElement = it.data()->toXML(true); // Save minimal information. + identityMetaContactElement.setTagName(TQString::fromUtf8("identity")); + identityMetaContactElement.setAttribute(TQString::fromUtf8("name"), it.key()); doc.documentElement().appendChild(doc.importNode(identityMetaContactElement, true)); } @@ -216,11 +216,11 @@ const QDomDocument GlobalIdentitiesManager::toXML() Kopete::MetaContact *GlobalIdentitiesManager::createNewMetaContact() { Kopete::MetaContact *newMetaContact = new Kopete::MetaContact(); - QPtrList contactList = Kopete::ContactList::self()->myself()->contacts(); + TQPtrList contactList = Kopete::ContactList::self()->myself()->contacts(); // Copy the contacts list to the new metacontact, so Kopete::Contact for SourceContact // will not be null. - QPtrListIterator it( contactList); + TQPtrListIterator it( contactList); for ( ; it.current(); ++it ) { newMetaContact->addContact(it.current()); @@ -252,7 +252,7 @@ void GlobalIdentitiesManager::copyMetaContact(Kopete::MetaContact *destination, destination->setPhotoSourceContact(source->photoSourceContact()); } -QMap GlobalIdentitiesManager::getGlobalIdentitiesList() +TQMap GlobalIdentitiesManager::getGlobalIdentitiesList() { return d->identitiesList; } diff --git a/kopete/kopete/config/identity/globalidentitiesmanager.h b/kopete/kopete/config/identity/globalidentitiesmanager.h index c188d497..71e890b0 100644 --- a/kopete/kopete/config/identity/globalidentitiesmanager.h +++ b/kopete/kopete/config/identity/globalidentitiesmanager.h @@ -18,8 +18,8 @@ #ifndef GLOBALIDENTITIESMANAGER_H #define GLOBALIDENTITIESMANAGER_H -#include -#include +#include +#include namespace Kopete { @@ -54,7 +54,7 @@ public: /** * @brief Create a new identity and add it to the internal list. */ - void createNewIdentity(const QString &identityName); + void createNewIdentity(const TQString &identityName); /** * @brief Copy a identity @@ -62,7 +62,7 @@ public: * @param copyIdentityName Name for the copy identity. * @param sourceIdentity Name of the source identity. */ - void copyIdentity(const QString ©IdentityName, const QString &sourceIdentity); + void copyIdentity(const TQString ©IdentityName, const TQString &sourceIdentity); /** * @brief Rename a identity @@ -70,14 +70,14 @@ public: * @param oldName Identity to rename. * @param newName New identity name. */ - void renameIdentity(const QString &oldName, const QString &newName); + void renameIdentity(const TQString &oldName, const TQString &newName); /** * @brief Delete identity * * @param removedIdentity Identity name to remove. */ - void removeIdentity(const QString &removedIdentity); + void removeIdentity(const TQString &removedIdentity); /** * @brief Update the specified identity using the source MetaContact @@ -85,7 +85,7 @@ public: * @param updatedIdentity Identity to update. * @param sourceMetaContact Source of data. */ - void updateIdentity(const QString &updatedIdentity, Kopete::MetaContact *sourceMetaContact); + void updateIdentity(const TQString &updatedIdentity, Kopete::MetaContact *sourceMetaContact); /** * @brief Check if the specified identityName exists. @@ -93,7 +93,7 @@ public: * This is a helper method to avoid duplicated entries. * @return if the identityName is in the internal list. */ - bool isIdentityPresent(const QString &identityName); + bool isIdentityPresent(const TQString &identityName); /** * @brief Return the specified identity. @@ -101,7 +101,7 @@ public: * @param identityName Identity to retrive. * @return Identity data as Kopete::MetaContact. */ - Kopete::MetaContact *getIdentity(const QString &identityName); + Kopete::MetaContact *getIdentity(const TQString &identityName); /** * @brief Load the XML file where global identities metacontacts are stored. @@ -117,17 +117,17 @@ public: * @brief Return the list of global identities metacontact. * @return The pointer list of metacontact as QValueList */ - QMap getGlobalIdentitiesList(); + TQMap getGlobalIdentitiesList(); private: - GlobalIdentitiesManager(QObject *parent = 0, const char *name = 0); + GlobalIdentitiesManager(TQObject *parent = 0, const char *name = 0); /** * @brief Return a XML representation of the global identities list. * - * @return the XML represention as QDomDocument. + * @return the XML represention as TQDomDocument. */ - const QDomDocument toXML(); + const TQDomDocument toXML(); Kopete::MetaContact *createNewMetaContact(); Kopete::MetaContact *createCopyMetaContact(Kopete::MetaContact *source); diff --git a/kopete/kopete/config/identity/kopeteidentityconfig.cpp b/kopete/kopete/config/identity/kopeteidentityconfig.cpp index 26613b87..0f718e70 100644 --- a/kopete/kopete/config/identity/kopeteidentityconfig.cpp +++ b/kopete/kopete/config/identity/kopeteidentityconfig.cpp @@ -18,15 +18,15 @@ #include "kopeteidentityconfig.h" // Qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE includes #include @@ -78,17 +78,17 @@ public: Kopete::MetaContact *myself; Kopete::MetaContact *currentIdentity; - QMap contactPhotoSourceList; - QString selectedIdentity; + TQMap contactPhotoSourceList; + TQString selectedIdentity; }; -typedef KGenericFactory KopeteIdentityConfigFactory; +typedef KGenericFactory KopeteIdentityConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_identityconfig, KopeteIdentityConfigFactory( "kcm_kopete_identityconfig" ) ) -KopeteIdentityConfig::KopeteIdentityConfig(QWidget *parent, const char */*name*/, const QStringList &args) : KCModule( KopeteIdentityConfigFactory::instance(), parent, args) +KopeteIdentityConfig::KopeteIdentityConfig(TQWidget *parent, const char */*name*/, const TQStringList &args) : KCModule( KopeteIdentityConfigFactory::instance(), parent, args) { d = new Private; - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); d->m_view = new KopeteIdentityConfigBase( this, "KopeteIdentityConfig::m_view" ); // Setup KConfigXT link with GUI. @@ -109,7 +109,7 @@ KopeteIdentityConfig::KopeteIdentityConfig(QWidget *parent, const char */*name*/ // If the latest selected Identity is not present anymore, use a fallback identity. if( !GlobalIdentitiesManager::self()->isIdentityPresent(d->selectedIdentity) ) { - QMapIterator it = GlobalIdentitiesManager::self()->getGlobalIdentitiesList().begin(); + TQMapIterator it = GlobalIdentitiesManager::self()->getGlobalIdentitiesList().begin(); d->selectedIdentity = it.key(); } else @@ -124,33 +124,33 @@ KopeteIdentityConfig::KopeteIdentityConfig(QWidget *parent, const char */*name*/ d->m_view->buttonCopyIdentity->setIconSet(SmallIconSet("editcopy")); d->m_view->buttonRenameIdentity->setIconSet(SmallIconSet("edit")); d->m_view->buttonRemoveIdentity->setIconSet(SmallIconSet("delete_user")); - d->m_view->buttonClearPhoto->setIconSet( SmallIconSet( QApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) ); + d->m_view->buttonClearPhoto->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) ); load(); // Load Configuration // Action signal/slots - connect(d->m_view->buttonChangeAddressee, SIGNAL(clicked()), this, SLOT(slotChangeAddressee())); - connect(d->m_view->comboSelectIdentity, SIGNAL(activated(const QString &)), this, SLOT(slotUpdateCurrentIdentity(const QString& ))); - connect(d->m_view->buttonNewIdentity, SIGNAL(clicked()), this, SLOT(slotNewIdentity())); - connect(d->m_view->buttonCopyIdentity, SIGNAL(clicked()), this, SLOT(slotCopyIdentity())); - connect(d->m_view->buttonRenameIdentity, SIGNAL(clicked()), this, SLOT(slotRenameIdentity())); - connect(d->m_view->buttonRemoveIdentity, SIGNAL(clicked()), this, SLOT(slotRemoveIdentity())); - connect(d->m_view->comboPhotoURL, SIGNAL(urlSelected(const QString& )), this, SLOT(slotChangePhoto(const QString& ))); - connect(d->m_view->buttonClearPhoto, SIGNAL(clicked()), this, SLOT(slotClearPhoto())); + connect(d->m_view->buttonChangeAddressee, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChangeAddressee())); + connect(d->m_view->comboSelectIdentity, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotUpdateCurrentIdentity(const TQString& ))); + connect(d->m_view->buttonNewIdentity, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewIdentity())); + connect(d->m_view->buttonCopyIdentity, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCopyIdentity())); + connect(d->m_view->buttonRenameIdentity, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRenameIdentity())); + connect(d->m_view->buttonRemoveIdentity, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveIdentity())); + connect(d->m_view->comboPhotoURL, TQT_SIGNAL(urlSelected(const TQString& )), this, TQT_SLOT(slotChangePhoto(const TQString& ))); + connect(d->m_view->buttonClearPhoto, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClearPhoto())); // Settings signal/slots - connect(d->m_view->radioNicknameContact, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets())); - connect(d->m_view->radioNicknameCustom, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets())); - connect(d->m_view->radioNicknameKABC, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets())); - - connect(d->m_view->radioPhotoContact, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets())); - connect(d->m_view->radioPhotoCustom, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets())); - connect(d->m_view->radioPhotoKABC, SIGNAL(toggled(bool )), this, SLOT(slotEnableAndDisableWidgets())); - - connect(d->m_view->checkSyncPhotoKABC, SIGNAL(toggled(bool )), this, SLOT(slotSettingsChanged())); - connect(d->m_view->lineNickname, SIGNAL(textChanged(const QString& )), this, SLOT(slotSettingsChanged())); - connect(d->m_view->comboNameContact, SIGNAL(activated(int )), this, SLOT(slotSettingsChanged())); - connect(d->m_view->comboPhotoContact, SIGNAL(activated(int )), this, SLOT(slotEnableAndDisableWidgets())); + connect(d->m_view->radioNicknameContact, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets())); + connect(d->m_view->radioNicknameCustom, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets())); + connect(d->m_view->radioNicknameKABC, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets())); + + connect(d->m_view->radioPhotoContact, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets())); + connect(d->m_view->radioPhotoCustom, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets())); + connect(d->m_view->radioPhotoKABC, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotEnableAndDisableWidgets())); + + connect(d->m_view->checkSyncPhotoKABC, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(slotSettingsChanged())); + connect(d->m_view->lineNickname, TQT_SIGNAL(textChanged(const TQString& )), this, TQT_SLOT(slotSettingsChanged())); + connect(d->m_view->comboNameContact, TQT_SIGNAL(activated(int )), this, TQT_SLOT(slotSettingsChanged())); + connect(d->m_view->comboPhotoContact, TQT_SIGNAL(activated(int )), this, TQT_SLOT(slotEnableAndDisableWidgets())); } KopeteIdentityConfig::~KopeteIdentityConfig() @@ -220,9 +220,9 @@ void KopeteIdentityConfig::loadIdentities() { d->m_view->comboSelectIdentity->clear(); - QMap identitiesList = GlobalIdentitiesManager::self()->getGlobalIdentitiesList(); - QMapIterator it; - QMapIterator end = identitiesList.end(); + TQMap identitiesList = GlobalIdentitiesManager::self()->getGlobalIdentitiesList(); + TQMapIterator it; + TQMapIterator end = identitiesList.end(); int count=0, selectedIndex=0; for(it = identitiesList.begin(); it != end; ++it) @@ -266,15 +266,15 @@ void KopeteIdentityConfig::slotLoadNameSources() { Kopete::Contact *nameSourceContact = d->currentIdentity->displayNameSourceContact(); - QPtrList contactList = d->myself->contacts(); // Use myself contact PtrList. Safer. - QPtrListIterator it(contactList); + TQPtrList contactList = d->myself->contacts(); // Use myself contact PtrList. Safer. + TQPtrListIterator it(contactList); d->m_view->comboNameContact->clear(); for(; it.current(); ++it) { - QString account = it.current()->property(Kopete::Global::Properties::self()->nickName()).value().toString() + " <" + it.current()->contactId() + ">"; - QPixmap accountIcon = it.current()->account()->accountIcon(); + TQString account = it.current()->property(Kopete::Global::Properties::self()->nickName()).value().toString() + " <" + it.current()->contactId() + ">"; + TQPixmap accountIcon = it.current()->account()->accountIcon(); d->m_view->comboNameContact->insertItem(accountIcon, account); // Select this item if it's the one we're tracking. @@ -297,8 +297,8 @@ void KopeteIdentityConfig::slotLoadPhotoSources() { Kopete::Contact *photoSourceContact = d->currentIdentity->photoSourceContact(); - QPtrList contactList = d->myself->contacts(); // Use myself contact PtrList. Safer. - QPtrListIterator it(contactList); + TQPtrList contactList = d->myself->contacts(); // Use myself contact PtrList. Safer. + TQPtrListIterator it(contactList); d->m_view->comboPhotoContact->clear(); d->m_view->comboPhotoURL->clear(); @@ -309,8 +309,8 @@ void KopeteIdentityConfig::slotLoadPhotoSources() Kopete::Contact *currentContact = it.current(); if(currentContact->hasProperty(Kopete::Global::Properties::self()->photo().key())) { - QString account = currentContact->property(Kopete::Global::Properties::self()->nickName()).value().toString() + " <" + currentContact->contactId() + ">"; - QPixmap accountIcon = currentContact->account()->accountIcon(); + TQString account = currentContact->property(Kopete::Global::Properties::self()->nickName()).value().toString() + " <" + currentContact->contactId() + ">"; + TQPixmap accountIcon = currentContact->account()->accountIcon(); d->m_view->comboPhotoContact->insertItem(accountIcon, account); d->contactPhotoSourceList.insert(d->m_view->comboPhotoContact->count() - 1, currentContact); @@ -368,7 +368,7 @@ void KopeteIdentityConfig::slotEnableAndDisableWidgets() d->m_view->comboPhotoContact->setEnabled(false); } - QImage photo; + TQImage photo; switch ( selectedPhotoSource() ) { case Kopete::MetaContact::SourceKABC: @@ -378,19 +378,19 @@ void KopeteIdentityConfig::slotEnableAndDisableWidgets() photo = Kopete::photoFromContact(selectedNameSourceContact()); break; case Kopete::MetaContact::SourceCustom: - photo = QImage(d->m_view->comboPhotoURL->url()); + photo = TQImage(d->m_view->comboPhotoURL->url()); break; } if(!photo.isNull()) - d->m_view->labelPhoto->setPixmap(QPixmap(photo.smoothScale(64, 92, QImage::ScaleMin))); + d->m_view->labelPhoto->setPixmap(TQPixmap(photo.smoothScale(64, 92, TQImage::ScaleMin))); else - d->m_view->labelPhoto->setPixmap(QPixmap()); + d->m_view->labelPhoto->setPixmap(TQPixmap()); emit changed(true); } -void KopeteIdentityConfig::slotUpdateCurrentIdentity(const QString &selectedIdentity) +void KopeteIdentityConfig::slotUpdateCurrentIdentity(const TQString &selectedIdentity) { kdDebug() << k_funcinfo << "Updating current identity." << endl; @@ -413,7 +413,7 @@ void KopeteIdentityConfig::slotUpdateCurrentIdentity(const QString &selectedIden void KopeteIdentityConfig::slotNewIdentity() { bool ok; - QString newIdentityName = KInputDialog::getText(i18n("New Identity"), i18n("Identity name:") , QString::null , &ok); + TQString newIdentityName = KInputDialog::getText(i18n("New Identity"), i18n("Identity name:") , TQString::null , &ok); if(newIdentityName.isEmpty() || !ok) return; @@ -428,7 +428,7 @@ void KopeteIdentityConfig::slotNewIdentity() void KopeteIdentityConfig::slotCopyIdentity() { bool ok; - QString copyName = KInputDialog::getText(i18n("Copy Identity"), i18n("Identity name:") , QString::null, &ok); + TQString copyName = KInputDialog::getText(i18n("Copy Identity"), i18n("Identity name:") , TQString::null, &ok); if(copyName.isEmpty() || !ok) return; @@ -453,7 +453,7 @@ void KopeteIdentityConfig::slotRenameIdentity() return; bool ok; - QString renamedName = KInputDialog::getText(i18n("Rename Identity"), i18n("Identity name:") , d->selectedIdentity, &ok); + TQString renamedName = KInputDialog::getText(i18n("Rename Identity"), i18n("Identity name:") , d->selectedIdentity, &ok); if(renamedName.isEmpty() || !ok) return; @@ -515,20 +515,20 @@ void KopeteIdentityConfig::slotChangeAddressee() emit changed(true); } -void KopeteIdentityConfig::slotChangePhoto(const QString &photoUrl) +void KopeteIdentityConfig::slotChangePhoto(const TQString &photoUrl) { - QString saveLocation; + TQString saveLocation; - QImage photo(photoUrl); + TQImage photo(photoUrl); // use KABC photo size 100x140 - photo = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(photo), 96, 96, this ); + photo = KPixmapRegionSelectorDialog::getSelectedImage( TQPixmap(photo), 96, 96, this ); if(!photo.isNull()) { if(photo.width() > 96 || photo.height() > 96) { // Scale and crop the picture. - photo = photo.smoothScale( 96, 96, QImage::ScaleMin ); + photo = photo.smoothScale( 96, 96, TQImage::ScaleMin ); // crop image if not square if(photo.width() < photo.height()) photo = photo.copy((photo.width()-photo.height())/2, 0, 96, 96); @@ -539,7 +539,7 @@ void KopeteIdentityConfig::slotChangePhoto(const QString &photoUrl) else if (photo.width() < 32 || photo.height() < 32) { // Scale and crop the picture. - photo = photo.smoothScale( 32, 32, QImage::ScaleMin ); + photo = photo.smoothScale( 32, 32, TQImage::ScaleMin ); // crop image if not square if(photo.width() < photo.height()) photo = photo.copy((photo.width()-photo.height())/2, 0, 32, 32); @@ -557,14 +557,14 @@ void KopeteIdentityConfig::slotChangePhoto(const QString &photoUrl) // Use MD5 hash to save the filename, so no problems will occur with the filename because of non-ASCII characters. // Bug 124175: My personnal picture doesn't appear cause of l10n - QByteArray tempArray; - QBuffer tempBuffer(tempArray); + TQByteArray tempArray; + TQBuffer tempBuffer(tempArray); tempBuffer.open( IO_WriteOnly ); photo.save(&tempBuffer, "PNG"); KMD5 context(tempArray); // Save the image to a file. saveLocation = context.hexDigest() + ".png"; - saveLocation = locateLocal( "appdata", QString::fromUtf8("globalidentitiespictures/%1").arg( saveLocation ) ); + saveLocation = locateLocal( "appdata", TQString::fromUtf8("globalidentitiespictures/%1").arg( saveLocation ) ); if(!photo.save(saveLocation, "PNG")) { @@ -585,7 +585,7 @@ void KopeteIdentityConfig::slotChangePhoto(const QString &photoUrl) void KopeteIdentityConfig::slotClearPhoto() { - d->m_view->comboPhotoURL->setURL( QString::null ); + d->m_view->comboPhotoURL->setURL( TQString::null ); slotEnableAndDisableWidgets(); } diff --git a/kopete/kopete/config/identity/kopeteidentityconfig.h b/kopete/kopete/config/identity/kopeteidentityconfig.h index f18c5a8c..88644be8 100644 --- a/kopete/kopete/config/identity/kopeteidentityconfig.h +++ b/kopete/kopete/config/identity/kopeteidentityconfig.h @@ -37,7 +37,7 @@ class KopeteIdentityConfig : public KCModule { Q_OBJECT public: - KopeteIdentityConfig(QWidget *parent, const char *name, const QStringList &args ); + KopeteIdentityConfig(TQWidget *parent, const char *name, const TQStringList &args ); ~KopeteIdentityConfig(); public slots: @@ -58,14 +58,14 @@ private slots: void slotLoadPhotoSources(); void slotEnableAndDisableWidgets(); - void slotUpdateCurrentIdentity(const QString &selectedIdentity); + void slotUpdateCurrentIdentity(const TQString &selectedIdentity); void slotNewIdentity(); void slotCopyIdentity(); void slotRenameIdentity(); void slotRemoveIdentity(); void slotChangeAddressee(); - void slotChangePhoto(const QString &photoUrl); + void slotChangePhoto(const TQString &photoUrl); void slotClearPhoto(); void slotSettingsChanged(); diff --git a/kopete/kopete/config/plugins/kopetepluginconfig.cpp b/kopete/kopete/config/plugins/kopetepluginconfig.cpp index 9949f70e..7f790a0b 100644 --- a/kopete/kopete/config/plugins/kopetepluginconfig.cpp +++ b/kopete/kopete/config/plugins/kopetepluginconfig.cpp @@ -17,8 +17,8 @@ #include "kopetepluginconfig.h" -#include -#include +#include +#include #include #include @@ -39,7 +39,7 @@ KopetePluginConfig::~KopetePluginConfig() delete d; } -KopetePluginConfig::KopetePluginConfig( QWidget *parent, const char *name ) +KopetePluginConfig::KopetePluginConfig( TQWidget *parent, const char *name ) : KDialogBase( Plain, i18n( "Configure Plugins" ), /*Help |*/ Cancel | Apply | Ok | User1, Ok, parent, name, false, true, KGuiItem( i18n( "&Reset" ), "undo" ) ) { @@ -50,14 +50,14 @@ KopetePluginConfig::KopetePluginConfig( QWidget *parent, const char *name ) // FIXME: Implement this - Martijn enableButton( KDialogBase::Help, false ); - setInitialSize( QSize( 640, 480 ) ); + setInitialSize( TQSize( 640, 480 ) ); - ( new QVBoxLayout( plainPage(), 0, 0 ) )->setAutoAdd( true ); + ( new TQVBoxLayout( plainPage(), 0, 0 ) )->setAutoAdd( true ); d->pluginSelector = new KPluginSelector( plainPage() ); setMainWidget( d->pluginSelector ); - connect( d->pluginSelector, SIGNAL( changed( bool ) ), this, SLOT( setChanged( bool ) ) ); - connect( d->pluginSelector, SIGNAL( configCommitted( const QCString & ) ), - KSettings::Dispatcher::self(), SLOT( reparseConfiguration( const QCString & ) ) ); + connect( d->pluginSelector, TQT_SIGNAL( changed( bool ) ), this, TQT_SLOT( setChanged( bool ) ) ); + connect( d->pluginSelector, TQT_SIGNAL( configCommitted( const TQCString & ) ), + KSettings::Dispatcher::self(), TQT_SLOT( reparseConfiguration( const TQCString & ) ) ); d->pluginSelector->addPlugins( Kopete::PluginManager::self()->availablePlugins( "Plugins" ), i18n( "General Plugins" ), "Plugins" ); } diff --git a/kopete/kopete/config/plugins/kopetepluginconfig.h b/kopete/kopete/config/plugins/kopetepluginconfig.h index e8853a1c..04d1cfa1 100644 --- a/kopete/kopete/config/plugins/kopetepluginconfig.h +++ b/kopete/kopete/config/plugins/kopetepluginconfig.h @@ -32,7 +32,7 @@ class KopetePluginConfig : public KDialogBase Q_OBJECT public: - KopetePluginConfig( QWidget *parent, const char *name = 0L ); + KopetePluginConfig( TQWidget *parent, const char *name = 0L ); ~KopetePluginConfig(); void apply(); diff --git a/kopete/kopete/contactlist/customnotificationprops.cpp b/kopete/kopete/contactlist/customnotificationprops.cpp index 87833fa7..2f341426 100644 --- a/kopete/kopete/contactlist/customnotificationprops.cpp +++ b/kopete/kopete/contactlist/customnotificationprops.cpp @@ -18,9 +18,9 @@ ************************************************************************* */ -#include -#include -#include +#include +#include +#include #include #include @@ -33,32 +33,32 @@ #include "customnotificationprops.h" -CustomNotificationProps::CustomNotificationProps( QWidget *parent, Kopete::NotifyDataObject* item, const char * name ) -: QObject( parent, name ) +CustomNotificationProps::CustomNotificationProps( TQWidget *parent, Kopete::NotifyDataObject* item, const char * name ) +: TQObject( parent, name ) { m_notifyWidget = new CustomNotificationWidget( parent, "notificationWidget" ); m_item = item; - QString path = "kopete/eventsrc"; + TQString path = "kopete/eventsrc"; KConfig eventsfile( path, true, false, "data" ); m_eventList = eventsfile.groupList(); - QStringList contactSpecificEvents; // we are only interested in events that relate to contacts - QStringList::Iterator it = m_eventList.begin(); - QStringList::Iterator end = m_eventList.end(); + TQStringList contactSpecificEvents; // we are only interested in events that relate to contacts + TQStringList::Iterator it = m_eventList.begin(); + TQStringList::Iterator end = m_eventList.end(); for ( ; it != end; ++it ) { - if ( !(*it).startsWith( QString::fromLatin1( "kopete_contact_" ) ) ) + if ( !(*it).startsWith( TQString::fromLatin1( "kopete_contact_" ) ) ) continue; contactSpecificEvents.append( *it ); - QMap entries = eventsfile.entryMap( *it ); + TQMap entries = eventsfile.entryMap( *it ); eventsfile.setGroup( *it ); - QString comment = eventsfile.readEntry( "Comment", QString::fromLatin1( "Found nothing!" ) ); + TQString comment = eventsfile.readEntry( "Comment", TQString::fromLatin1( "Found nothing!" ) ); m_notifyWidget->cmbEvents->insertItem( comment ); } m_eventList = contactSpecificEvents; slotEventsComboChanged( m_notifyWidget->cmbEvents->currentItem() ); // we have to do this after adding items - connect( m_notifyWidget->cmbEvents, SIGNAL( activated( int ) ), this, SLOT( slotEventsComboChanged( int ) ) ); + connect( m_notifyWidget->cmbEvents, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotEventsComboChanged( int ) ) ); } void CustomNotificationProps::slotEventsComboChanged( int itemNo ) @@ -152,7 +152,7 @@ void CustomNotificationProps::storeCurrentCustoms() evt->setPresentation( Kopete::EventPresentation::Message, eventNotify ); // set chat attributes eventNotify = new Kopete::EventPresentation( Kopete::EventPresentation::Chat, - QString::null, + TQString::null, m_notifyWidget->chkChatSS->isChecked(), m_notifyWidget->chkCustomChat->isChecked() ); evt->setPresentation( Kopete::EventPresentation::Chat, eventNotify ); diff --git a/kopete/kopete/contactlist/customnotificationprops.h b/kopete/kopete/contactlist/customnotificationprops.h index 5d6c1dea..f28ada4c 100644 --- a/kopete/kopete/contactlist/customnotificationprops.h +++ b/kopete/kopete/contactlist/customnotificationprops.h @@ -31,7 +31,7 @@ class CustomNotificationProps : public QObject { Q_OBJECT public: - CustomNotificationProps( QWidget *parent, Kopete::NotifyDataObject* item, const char * name = 0 ); + CustomNotificationProps( TQWidget *parent, Kopete::NotifyDataObject* item, const char * name = 0 ); ~CustomNotificationProps() {} void dumpData(); void resetEventWidgets(); @@ -44,8 +44,8 @@ protected slots: private: CustomNotificationWidget* m_notifyWidget; Kopete::NotifyDataObject * m_item; - QStringList m_eventList; - QString m_event; + TQStringList m_eventList; + TQString m_event; }; #endif diff --git a/kopete/kopete/contactlist/kabcexport.cpp b/kopete/kopete/contactlist/kabcexport.cpp index 73f67344..0051f585 100644 --- a/kopete/kopete/contactlist/kabcexport.cpp +++ b/kopete/kopete/contactlist/kabcexport.cpp @@ -19,11 +19,11 @@ ************************************************************************* */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -48,27 +48,27 @@ class ContactLVI : public QCheckListItem { public: - ContactLVI ( Kopete::MetaContact * mc, QListView * parent, const QString & text, Type tt = RadioButtonController ) : QCheckListItem( parent, text, tt ), mc( mc ) + ContactLVI ( Kopete::MetaContact * mc, TQListView * parent, const TQString & text, Type tt = RadioButtonController ) : TQCheckListItem( parent, text, tt ), mc( mc ) { } Kopete::MetaContact * mc; - QString uid; + TQString uid; }; // ctor populates the resource list and contact list, and enables the next button on the first page -KabcExportWizard::KabcExportWizard( QWidget *parent, const char *name ) +KabcExportWizard::KabcExportWizard( TQWidget *parent, const char *name ) : KabcExportWizard_Base( parent, name ) { - connect( m_addrBooks, SIGNAL( selectionChanged( QListBoxItem * ) ), SLOT( slotResourceSelectionChanged( QListBoxItem * ) ) ); + connect( m_addrBooks, TQT_SIGNAL( selectionChanged( TQListBoxItem * ) ), TQT_SLOT( slotResourceSelectionChanged( TQListBoxItem * ) ) ); - connect( m_btnSelectAll, SIGNAL( clicked() ), SLOT( slotSelectAll() ) ); - connect( m_btnDeselectAll, SIGNAL( clicked() ), SLOT( slotDeselectAll() ) ); + connect( m_btnSelectAll, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSelectAll() ) ); + connect( m_btnDeselectAll, TQT_SIGNAL( clicked() ), TQT_SLOT( slotDeselectAll() ) ); // fill resource selector m_addressBook = Kopete::KABCPersistence::self()->addressBook(); - QPtrList kabcResources = m_addressBook->resources(); + TQPtrList kabcResources = m_addressBook->resources(); - QPtrListIterator resIt( kabcResources ); + TQPtrListIterator resIt( kabcResources ); KABC::Resource *resource; uint counter = 0; @@ -82,8 +82,8 @@ KabcExportWizard::KabcExportWizard( QWidget *parent, const char *name ) counter++; } } - setNextEnabled( QWizard::page( 0 ), false ); - setFinishEnabled( QWizard::page( 1 ), true ); + setNextEnabled( TQWizard::page( 0 ), false ); + setFinishEnabled( TQWizard::page( 1 ), true ); // if there were no writable address books, tell the user if ( counter == 0 ) { @@ -96,15 +96,15 @@ KabcExportWizard::KabcExportWizard( QWidget *parent, const char *name ) m_addrBooks->setSelected( 0, true ); // fill contact list - QPtrList contacts = Kopete::ContactList::self()->metaContacts(); - QPtrListIterator it( contacts ); + TQPtrList contacts = Kopete::ContactList::self()->metaContacts(); + TQPtrListIterator it( contacts ); counter = 0; - QString alreadyIn = i18n( " (already in address book)" ); + TQString alreadyIn = i18n( " (already in address book)" ); for (; it.current(); ++it) { m_contactMap.insert( counter, it.current() ); - QCheckListItem * lvi = new ContactLVI( it.current(), m_contactList, - it.current()->displayName(), QCheckListItem::CheckBox ); + TQCheckListItem * lvi = new ContactLVI( it.current(), m_contactList, + it.current()->displayName(), TQCheckListItem::CheckBox ); lvi->setOn( false ); if ( it.current()->metaContactId().contains(':') ) { @@ -123,7 +123,7 @@ KabcExportWizard::~KabcExportWizard() void KabcExportWizard::slotDeselectAll() { - QListViewItemIterator it( m_contactList ); + TQListViewItemIterator it( m_contactList ); while ( it.current() ) { ContactLVI *item = static_cast( it.current() ); @@ -134,7 +134,7 @@ void KabcExportWizard::slotDeselectAll() void KabcExportWizard::slotSelectAll() { - QListViewItemIterator it( m_contactList ); + TQListViewItemIterator it( m_contactList ); while ( it.current() ) { ContactLVI *item = static_cast( it.current() ); @@ -145,9 +145,9 @@ void KabcExportWizard::slotSelectAll() } } -void KabcExportWizard::slotResourceSelectionChanged( QListBoxItem * lbi ) +void KabcExportWizard::slotResourceSelectionChanged( TQListBoxItem * lbi ) { - setNextEnabled( QWizard::page( 0 ), lbi->isSelected() ); + setNextEnabled( TQWizard::page( 0 ), lbi->isSelected() ); } // accept runs the export algorithm @@ -159,7 +159,7 @@ void KabcExportWizard::accept() m_resourceMap[ ( m_addrBooks->index( m_addrBooks->selectedItem() ) ) ]; // for each item checked { - QListViewItemIterator it( m_contactList ); + TQListViewItemIterator it( m_contactList ); while ( it.current() ) { ContactLVI *item = static_cast( it.current() ); @@ -175,7 +175,7 @@ void KabcExportWizard::accept() addr.setResource( selectedResource ); // set name - QPtrList contacts = item->mc->contacts(); + TQPtrList contacts = item->mc->contacts(); if ( contacts.count() == 1 ) { Kopete::ContactProperty prop; @@ -207,14 +207,14 @@ void KabcExportWizard::accept() } // request a write in case we only changed details on existing linked addressee Kopete::KABCPersistence::self()->writeAddressBook( selectedResource ); - QDialog::accept(); + TQDialog::accept(); } void KabcExportWizard::exportDetails( Kopete::MetaContact * mc, KABC::Addressee & addr ) { // for each contact - QPtrList contacts = mc->contacts(); - QPtrListIterator cit( contacts ); + TQPtrList contacts = mc->contacts(); + TQPtrListIterator cit( contacts ); for( ; cit.current(); ++cit ) { Kopete::ContactProperty prop; @@ -241,7 +241,7 @@ void KabcExportWizard::exportDetails( Kopete::MetaContact * mc, KABC::Addressee } // metacontact photo - QImage photo = mc->photo(); + TQImage photo = mc->photo(); if ( !photo.isNull() ) addr.setPhoto( KABC::Picture( photo ) ); } diff --git a/kopete/kopete/contactlist/kabcexport.h b/kopete/kopete/contactlist/kabcexport.h index bad1d8e6..0ebfb75b 100644 --- a/kopete/kopete/contactlist/kabcexport.h +++ b/kopete/kopete/contactlist/kabcexport.h @@ -37,20 +37,20 @@ class KabcExportWizard : public KabcExportWizard_Base { Q_OBJECT public: - KabcExportWizard( QWidget *parent = 0, const char *name = 0 ); + KabcExportWizard( TQWidget *parent = 0, const char *name = 0 ); ~KabcExportWizard(); public slots: void accept(); protected slots: void slotDeselectAll(); void slotSelectAll(); - void slotResourceSelectionChanged( QListBoxItem * lbi ); + void slotResourceSelectionChanged( TQListBoxItem * lbi ); protected: void exportDetails( Kopete::MetaContact * mc, KABC::Addressee & addr ); private: KABC::AddressBook* m_addressBook; - QMap m_resourceMap; - QMap m_contactMap; + TQMap m_resourceMap; + TQMap m_contactMap; }; #endif diff --git a/kopete/kopete/contactlist/kopeteaddrbookexport.cpp b/kopete/kopete/contactlist/kopeteaddrbookexport.cpp index d752f71e..bcb9c434 100644 --- a/kopete/kopete/contactlist/kopeteaddrbookexport.cpp +++ b/kopete/kopete/contactlist/kopeteaddrbookexport.cpp @@ -19,8 +19,8 @@ */ #include -#include -#include +#include +#include #include #include @@ -35,7 +35,7 @@ #include "kopeteaddrbookexport.h" #include "kopeteaddrbookexportui.h" -KopeteAddressBookExport::KopeteAddressBookExport( QWidget *parent, Kopete::MetaContact *mc ) : QObject( parent ) +KopeteAddressBookExport::KopeteAddressBookExport( TQWidget *parent, Kopete::MetaContact *mc ) : TQObject( parent ) { // instantiate dialog and populate widgets mParent = parent; @@ -69,30 +69,30 @@ void KopeteAddressBookExport::fetchKABCData() mAddrBookIcon = SmallIcon( "kaddressbook" ); // given name - QString given = mAddressee.givenName(); + TQString given = mAddressee.givenName(); if ( !given.isEmpty() ) mUI->mFirstName->insertItem( mAddrBookIcon, given ); else mUI->mFirstName->insertItem( mAddrBookIcon, i18n("") ); // family name - QString family = mAddressee.familyName(); + TQString family = mAddressee.familyName(); if ( !family.isEmpty() ) mUI->mLastName->insertItem( mAddrBookIcon, family ); else mUI->mLastName->insertItem( mAddrBookIcon, i18n("") ); // url - QString url = mAddressee.url().url(); + TQString url = mAddressee.url().url(); if ( !url.isEmpty() ) mUI->mUrl->insertItem( mAddrBookIcon, url ); else mUI->mUrl->insertItem( mAddrBookIcon, i18n("") ); // emails - QStringList emails = mAddressee.emails(); + TQStringList emails = mAddressee.emails(); numEmails = emails.count(); - for ( QStringList::Iterator it = emails.begin(); it != emails.end(); ++it ) + for ( TQStringList::Iterator it = emails.begin(); it != emails.end(); ++it ) mUI->mEmails->insertItem( mAddrBookIcon, *it ); if ( numEmails == 0 ) { @@ -123,13 +123,13 @@ void KopeteAddressBookExport::fetchPhoneNumbers( KListBox * listBox, int type, u void KopeteAddressBookExport::fetchIMData() { - QPtrList contacts = mMetaContact->contacts(); - QPtrListIterator cit( contacts ); + TQPtrList contacts = mMetaContact->contacts(); + TQPtrListIterator cit( contacts ); for( ; cit.current(); ++cit ) { // for each contact, get the property content Kopete::Contact* c = cit.current(); - QPixmap contactIcon = c->account()->accountIcon( 16 ); + TQPixmap contactIcon = c->account()->accountIcon( 16 ); // given name populateIM( c, contactIcon, mUI->mFirstName, Kopete::Global::Properties::self()->firstName() ); // family name @@ -147,7 +147,7 @@ void KopeteAddressBookExport::fetchIMData() } } -void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const QPixmap &icon, QComboBox *combo, const Kopete::ContactPropertyTmpl &property ) +void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const TQPixmap &icon, TQComboBox *combo, const Kopete::ContactPropertyTmpl &property ) { Kopete::ContactProperty prop = contact->property( property ); if ( !prop.isNull() ) @@ -156,7 +156,7 @@ void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const } } -void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const QPixmap &icon, KListBox *listBox, const Kopete::ContactPropertyTmpl &property ) +void KopeteAddressBookExport::populateIM( const Kopete::Contact *contact, const TQPixmap &icon, KListBox *listBox, const Kopete::ContactPropertyTmpl &property ) { Kopete::ContactProperty prop = contact->property( property ); if ( !prop.isNull() ) @@ -178,7 +178,7 @@ int KopeteAddressBookExport::showDialog() mUI = new AddressBookExportUI( mDialog ); mDialog->setMainWidget( mUI ); mDialog->setButtonOK( KGuiItem( i18n( "Export" ), - QString::null, i18n( "Set address book fields using the selected data from Kopete" ) ) ); + TQString::null, i18n( "Set address book fields using the selected data from Kopete" ) ) ); initLabels(); // fetch existing data from kabc @@ -189,7 +189,7 @@ int KopeteAddressBookExport::showDialog() return mDialog->exec(); } else - return QDialog::Rejected; + return TQDialog::Rejected; } void KopeteAddressBookExport::exportData() @@ -216,31 +216,31 @@ void KopeteAddressBookExport::exportData() mAddressee.setUrl( KURL( mUI->mUrl->currentText() ) ); } - QStringList newVals; + TQStringList newVals; // email newVals = newValues( mUI->mEmails, numEmails ); - for ( QStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) + for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) { dirty = true; mAddressee.insertEmail( *it ); } // home phone newVals = newValues( mUI->mHomePhones, numHomePhones ); - for ( QStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) + for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) { dirty = true; mAddressee.insertPhoneNumber( KABC::PhoneNumber( *it, KABC::PhoneNumber::Home ) ); } // work phone newVals = newValues( mUI->mWorkPhones, numWorkPhones ); - for ( QStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) + for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) { dirty = true; mAddressee.insertPhoneNumber( KABC::PhoneNumber( *it, KABC::PhoneNumber::Work ) ); } // mobile newVals = newValues( mUI->mMobilePhones, numMobilePhones ); - for ( QStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) + for ( TQStringList::Iterator it = newVals.begin(); it != newVals.end(); ++it ) { dirty = true; mAddressee.insertPhoneNumber( KABC::PhoneNumber( *it, KABC::PhoneNumber::Cell ) ); @@ -266,7 +266,7 @@ void KopeteAddressBookExport::exportData() } } -bool KopeteAddressBookExport::newValue( QComboBox *combo ) +bool KopeteAddressBookExport::newValue( TQComboBox *combo ) { // all data in position 0 is from KABC, so if position 0 is selected, // or if the selection is the same as the data at 0, return false @@ -274,9 +274,9 @@ bool KopeteAddressBookExport::newValue( QComboBox *combo ) ( combo->text( combo->currentItem() ) == combo->text( 0 ) ) ); } -QStringList KopeteAddressBookExport::newValues( KListBox *listBox, uint counter ) +TQStringList KopeteAddressBookExport::newValues( KListBox *listBox, uint counter ) { - QStringList newValues; + TQStringList newValues; // need to iterate all items except those from KABC and check if selected and not same as the first // counter is the number of KABC items, and hence the index of the first non KABC item for ( uint i = counter; i < listBox->count(); ++i ) diff --git a/kopete/kopete/contactlist/kopeteaddrbookexport.h b/kopete/kopete/contactlist/kopeteaddrbookexport.h index b4437c4e..131dad96 100644 --- a/kopete/kopete/contactlist/kopeteaddrbookexport.h +++ b/kopete/kopete/contactlist/kopeteaddrbookexport.h @@ -40,12 +40,12 @@ class MetaContact; class KopeteAddressBookExport : public QObject { public: - KopeteAddressBookExport( QWidget *parent, Kopete::MetaContact *mc ); + KopeteAddressBookExport( TQWidget *parent, Kopete::MetaContact *mc ); ~KopeteAddressBookExport(); /** * Display the dialog - * @return a QDialog return code + * @return a TQDialog return code */ int showDialog(); /** @@ -73,22 +73,22 @@ protected: /** * Populate a combobox with a contact's IM data */ - void populateIM( const Kopete::Contact *contact, const QPixmap &icon, - QComboBox *combo, const Kopete::ContactPropertyTmpl &property ); + void populateIM( const Kopete::Contact *contact, const TQPixmap &icon, + TQComboBox *combo, const Kopete::ContactPropertyTmpl &property ); /** * Populate a listbox with a contact's IM data */ - void populateIM( const Kopete::Contact *contact, const QPixmap &icon, + void populateIM( const Kopete::Contact *contact, const TQPixmap &icon, KListBox *combo, const Kopete::ContactPropertyTmpl &property ); /** Check the selected item is not the first (existing KABC) item, or the same as it */ - bool newValue( QComboBox *combo ); - QStringList newValues( KListBox *listBox, uint counter ); + bool newValue( TQComboBox *combo ); + TQStringList newValues( KListBox *listBox, uint counter ); // the GUI - QWidget *mParent; + TQWidget *mParent; KDialogBase * mDialog; - QPixmap mAddrBookIcon; + TQPixmap mAddrBookIcon; AddressBookExportUI *mUI; Kopete::MetaContact *mMetaContact; KABC::AddressBook *mAddressBook; diff --git a/kopete/kopete/contactlist/kopetecontactlistview.cpp b/kopete/kopete/contactlist/kopetecontactlistview.cpp index b6b01a2f..4e45f602 100644 --- a/kopete/kopete/contactlist/kopetecontactlistview.cpp +++ b/kopete/kopete/contactlist/kopetecontactlistview.cpp @@ -25,13 +25,13 @@ #include "kopetecontactlistview.h" #include "kopeteuiglobal.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -97,13 +97,13 @@ public: void addCurrentItems() { // Add the already existing groups now - QPtrList grps = Kopete::ContactList::self()->groups(); - for ( QPtrListIterator groupIt( grps ); groupIt.current(); ++groupIt ) + TQPtrList grps = Kopete::ContactList::self()->groups(); + for ( TQPtrListIterator groupIt( grps ); groupIt.current(); ++groupIt ) addGroup( groupIt.current() ); // Add the already existing meta contacts now - QPtrList metaContacts = Kopete::ContactList::self()->metaContacts(); - for ( QPtrListIterator it( metaContacts ); it.current(); ++it ) + TQPtrList metaContacts = Kopete::ContactList::self()->metaContacts(); + for ( TQPtrListIterator it( metaContacts ); it.current(); ++it ) addMetaContact( it.current() ); } @@ -119,13 +119,13 @@ public: virtual void metaContactStatusChanged( Kopete::MetaContact *mc ) = 0; protected: - // work around QListView design stupidity. + // work around TQListView design stupidity. // GroupViewItem will be QListView-derived, or QListViewItem-derived. template void addMetaContactToGroupInner( Kopete::MetaContact *mc, GroupViewItem *gpi ) { // check if the contact isn't already in the group - for( QListViewItem *item = gpi->firstChild(); item; item = item->nextSibling() ) + for( TQListViewItem *item = gpi->firstChild(); item; item = item->nextSibling() ) if ( KopeteMetaContactLVI *mci = dynamic_cast(item) ) if ( mci->metaContact() == mc ) return; @@ -136,7 +136,7 @@ protected: void removeMetaContactFromGroupInner( Kopete::MetaContact *mc, GroupViewItem *gpi ) { KopeteMetaContactLVI* mci; - QListViewItem* item = gpi->firstChild(); + TQListViewItem* item = gpi->firstChild(); while(item) { mci = dynamic_cast(item); item = item->nextSibling(); @@ -220,7 +220,7 @@ private: KopeteGroupViewItem *findGroupItem( Kopete::Group *gp ) { if ( gp->type() == Kopete::Group::TopLevel ) return 0; - for( QListViewItem *item = listView()->firstChild(); item; item = item->nextSibling() ) + for( TQListViewItem *item = listView()->firstChild(); item; item = item->nextSibling() ) if ( KopeteGroupViewItem *gvi = dynamic_cast(item) ) if ( gvi->group() == gp ) return gvi; @@ -327,15 +327,15 @@ private: } // check if the contact is already in the correct "group" - QListViewItem *currentGroup = mc->isOnline() ? m_onlineItem : m_offlineItem; - for( QListViewItem *lvi = currentGroup->firstChild(); lvi; lvi = lvi->nextSibling() ) + TQListViewItem *currentGroup = mc->isOnline() ? m_onlineItem : m_offlineItem; + for( TQListViewItem *lvi = currentGroup->firstChild(); lvi; lvi = lvi->nextSibling() ) if ( KopeteMetaContactLVI *kc = dynamic_cast( lvi ) ) if ( kc->metaContact() == mc ) return; // item not found in the right group; look for it in the other group - QListViewItem *oppositeGroup = mc->isOnline() ? m_offlineItem : m_onlineItem; - for( QListViewItem *lvi = oppositeGroup->firstChild(); lvi; lvi = lvi->nextSibling() ) + TQListViewItem *oppositeGroup = mc->isOnline() ? m_offlineItem : m_onlineItem; + for( TQListViewItem *lvi = oppositeGroup->firstChild(); lvi; lvi = lvi->nextSibling() ) { if ( KopeteMetaContactLVI *kc = dynamic_cast( lvi ) ) { @@ -354,7 +354,7 @@ private: } KopeteStatusGroupViewItem *m_onlineItem, *m_offlineItem; - QGuardedPtr m_temporaryItem; + TQGuardedPtr m_temporaryItem; }; void KopeteContactListViewPrivate::updateViewStrategy( KListView *view ) @@ -376,9 +376,9 @@ void KopeteContactListViewPrivate::updateViewStrategy( KListView *view ) // returns the next item in a depth-first descent of the list view. // much like QLVI::itemBelow but does not depend on visibility of items, etc. -static QListViewItem *nextItem( QListViewItem *item ) +static TQListViewItem *nextItem( TQListViewItem *item ) { - if ( QListViewItem *it = item->firstChild() ) + if ( TQListViewItem *it = item->firstChild() ) return it; while ( item && !item->nextSibling() ) item = item->parent(); @@ -389,7 +389,7 @@ static QListViewItem *nextItem( QListViewItem *item ) -KopeteContactListView::KopeteContactListView( QWidget *parent, const char *name ) +KopeteContactListView::KopeteContactListView( TQWidget *parent, const char *name ) : Kopete::UI::ListView::ListView( parent, name ) { d = new KopeteContactListViewPrivate; @@ -411,38 +411,38 @@ KopeteContactListView::KopeteContactListView( QWidget *parent, const char *name setFullWidth( true ); - connect( this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), - SLOT( slotContextMenu( KListView *, QListViewItem *, const QPoint & ) ) ); - connect( this, SIGNAL( expanded( QListViewItem * ) ), - SLOT( slotExpanded( QListViewItem * ) ) ); - connect( this, SIGNAL( collapsed( QListViewItem * ) ), - SLOT( slotCollapsed( QListViewItem * ) ) ); - connect( this, SIGNAL( executed( QListViewItem *, const QPoint &, int ) ), - SLOT( slotExecuted( QListViewItem *, const QPoint &, int ) ) ); - connect( this, SIGNAL( selectionChanged() ), SLOT( slotViewSelectionChanged() ) ); - connect( this, SIGNAL( itemRenamed( QListViewItem * ) ), - SLOT( slotItemRenamed( QListViewItem * ) ) ); - - connect( KopetePrefs::prefs(), SIGNAL( saved() ), SLOT( slotSettingsChanged() ) ); - - connect( Kopete::ContactList::self(), SIGNAL( selectionChanged() ), - SLOT( slotListSelectionChanged() ) ); + connect( this, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), + TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) ); + connect( this, TQT_SIGNAL( expanded( TQListViewItem * ) ), + TQT_SLOT( slotExpanded( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( collapsed( TQListViewItem * ) ), + TQT_SLOT( slotCollapsed( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( executed( TQListViewItem *, const TQPoint &, int ) ), + TQT_SLOT( slotExecuted( TQListViewItem *, const TQPoint &, int ) ) ); + connect( this, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotViewSelectionChanged() ) ); + connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem * ) ), + TQT_SLOT( slotItemRenamed( TQListViewItem * ) ) ); + + connect( KopetePrefs::prefs(), TQT_SIGNAL( saved() ), TQT_SLOT( slotSettingsChanged() ) ); + + connect( Kopete::ContactList::self(), TQT_SIGNAL( selectionChanged() ), + TQT_SLOT( slotListSelectionChanged() ) ); connect( Kopete::ContactList::self(), - SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), - SLOT( slotMetaContactAdded( Kopete::MetaContact * ) ) ); + TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), + TQT_SLOT( slotMetaContactAdded( Kopete::MetaContact * ) ) ); connect( Kopete::ContactList::self(), - SIGNAL( metaContactRemoved( Kopete::MetaContact * ) ), - SLOT( slotMetaContactDeleted( Kopete::MetaContact * ) ) ); - connect( Kopete::ContactList::self(), SIGNAL( groupAdded( Kopete::Group * ) ), - SLOT( slotGroupAdded( Kopete::Group * ) ) ); + TQT_SIGNAL( metaContactRemoved( Kopete::MetaContact * ) ), + TQT_SLOT( slotMetaContactDeleted( Kopete::MetaContact * ) ) ); + connect( Kopete::ContactList::self(), TQT_SIGNAL( groupAdded( Kopete::Group * ) ), + TQT_SLOT( slotGroupAdded( Kopete::Group * ) ) ); - connect( Kopete::ChatSessionManager::self(), SIGNAL( newEvent( Kopete::MessageEvent * ) ), - this, SLOT( slotNewMessageEvent( Kopete::MessageEvent * ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( newEvent( Kopete::MessageEvent * ) ), + this, TQT_SLOT( slotNewMessageEvent( Kopete::MessageEvent * ) ) ); - connect( this, SIGNAL( dropped( QDropEvent *, QListViewItem *, QListViewItem * ) ), - this, SLOT( slotDropped( QDropEvent *, QListViewItem *, QListViewItem * ) ) ); + connect( this, TQT_SIGNAL( dropped( TQDropEvent *, TQListViewItem *, TQListViewItem * ) ), + this, TQT_SLOT( slotDropped( TQDropEvent *, TQListViewItem *, TQListViewItem * ) ) ); - connect( &undoTimer, SIGNAL(timeout()) , this, SLOT (slotTimeout() ) ); + connect( &undoTimer, TQT_SIGNAL(timeout()) , this, TQT_SLOT (slotTimeout() ) ); addColumn( i18n( "Contacts" ), 0 ); //add an unique colums to add every contact header()->hide(); // and hide the ugly header which show the single word "Contacts" @@ -453,7 +453,7 @@ KopeteContactListView::KopeteContactListView( QWidget *parent, const char *name setItemsMovable( false ); setDropVisualizer( false ); setDropHighlighter( true ); - setSelectionMode( QListView::Extended ); + setSelectionMode( TQListView::Extended ); // Load in the user's initial settings slotSettingsChanged(); @@ -461,49 +461,49 @@ KopeteContactListView::KopeteContactListView( QWidget *parent, const char *name void KopeteContactListView::initActions( KActionCollection *ac ) { - actionUndo = KStdAction::undo( this , SLOT( slotUndo() ) , ac ); - actionRedo = KStdAction::redo( this , SLOT( slotRedo() ) , ac ); + actionUndo = KStdAction::undo( this , TQT_SLOT( slotUndo() ) , ac ); + actionRedo = KStdAction::redo( this , TQT_SLOT( slotRedo() ) , ac ); actionUndo->setEnabled(false); actionRedo->setEnabled(false); - new KAction( i18n( "Create New Group..." ), 0, 0, this, SLOT( addGroup() ), + new KAction( i18n( "Create New Group..." ), 0, 0, this, TQT_SLOT( addGroup() ), ac, "AddGroup" ); actionSendMessage = KopeteStdAction::sendMessage( - this, SLOT( slotSendMessage() ), ac, "contactSendMessage" ); - actionStartChat = KopeteStdAction::chat( this, SLOT( slotStartChat() ), + this, TQT_SLOT( slotSendMessage() ), ac, "contactSendMessage" ); + actionStartChat = KopeteStdAction::chat( this, TQT_SLOT( slotStartChat() ), ac, "contactStartChat" ); - actionMove = new KopeteGroupListAction( i18n( "&Move To" ), QString::fromLatin1( "editcut" ), - 0, this, SLOT( slotMoveToGroup() ), ac, "contactMove" ); - actionCopy = new KopeteGroupListAction( i18n( "&Copy To" ), QString::fromLatin1( "editcopy" ), 0, - this, SLOT( slotCopyToGroup() ), ac, "contactCopy" ); + actionMove = new KopeteGroupListAction( i18n( "&Move To" ), TQString::fromLatin1( "editcut" ), + 0, this, TQT_SLOT( slotMoveToGroup() ), ac, "contactMove" ); + actionCopy = new KopeteGroupListAction( i18n( "&Copy To" ), TQString::fromLatin1( "editcopy" ), 0, + this, TQT_SLOT( slotCopyToGroup() ), ac, "contactCopy" ); - actionRemove = KopeteStdAction::deleteContact( this, SLOT( slotRemove() ), + actionRemove = KopeteStdAction::deleteContact( this, TQT_SLOT( slotRemove() ), ac, "contactRemove" ); - actionSendEmail = new KAction( i18n( "Send Email..." ), QString::fromLatin1( "mail_generic" ), - 0, this, SLOT( slotSendEmail() ), ac, "contactSendEmail" ); + actionSendEmail = new KAction( i18n( "Send Email..." ), TQString::fromLatin1( "mail_generic" ), + 0, this, TQT_SLOT( slotSendEmail() ), ac, "contactSendEmail" ); /* this actionRename is buggy, and useless with properties, removed in kopeteui.rc*/ actionRename = new KAction( i18n( "Rename" ), "filesaveas", 0, - this, SLOT( slotRename() ), ac, "contactRename" ); - actionSendFile = KopeteStdAction::sendFile( this, SLOT( slotSendFile() ), + this, TQT_SLOT( slotRename() ), ac, "contactRename" ); + actionSendFile = KopeteStdAction::sendFile( this, TQT_SLOT( slotSendFile() ), ac, "contactSendFile" ); actionAddContact = new KActionMenu( i18n( "&Add Contact" ), - QString::fromLatin1( "add_user" ), ac , "contactAddContact" ); + TQString::fromLatin1( "add_user" ), ac , "contactAddContact" ); actionAddContact->popupMenu()->insertTitle( i18n("Select Account") ); actionAddTemporaryContact = new KAction( i18n( "Add to Your Contact List" ), "add_user", 0, - this, SLOT( slotAddTemporaryContact() ), ac, "contactAddTemporaryContact" ); + this, TQT_SLOT( slotAddTemporaryContact() ), ac, "contactAddTemporaryContact" ); - connect( Kopete::ContactList::self(), SIGNAL( metaContactSelected( bool ) ), this, SLOT( slotMetaContactSelected( bool ) ) ); + connect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactSelected( bool ) ), this, TQT_SLOT( slotMetaContactSelected( bool ) ) ); - connect( Kopete::AccountManager::self(), SIGNAL(accountRegistered( Kopete::Account* )), SLOT(slotAddSubContactActionNewAccount(Kopete::Account*))); - connect( Kopete::AccountManager::self(), SIGNAL(accountUnregistered( const Kopete::Account* )), SLOT(slotAddSubContactActionAccountDeleted(const Kopete::Account *))); + connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountRegistered( Kopete::Account* )), TQT_SLOT(slotAddSubContactActionNewAccount(Kopete::Account*))); + connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountUnregistered( const Kopete::Account* )), TQT_SLOT(slotAddSubContactActionAccountDeleted(const Kopete::Account *))); actionProperties = new KAction( i18n( "&Properties" ), "edit_user", Qt::Key_Alt + Qt::Key_Return, - this, SLOT( slotProperties() ), ac, "contactProperties" ); + this, TQT_SLOT( slotProperties() ), ac, "contactProperties" ); // Update enabled/disabled actions slotViewSelectionChanged(); @@ -516,7 +516,7 @@ KopeteContactListView::~KopeteContactListView() void KopeteContactListView::slotAddSubContactActionNewAccount(Kopete::Account* account) { - KAction *action = new KAction( account->accountLabel(), account->accountIcon(), 0 , this, SLOT(slotAddContact()), account); + KAction *action = new KAction( account->accountLabel(), account->accountIcon(), 0 , this, TQT_SLOT(slotAddContact()), account); m_accountAddContactMap.insert( account, action); actionAddContact->insert( action ); } @@ -536,14 +536,14 @@ void KopeteContactListView::slotMetaContactAdded( Kopete::MetaContact *mc ) { d->viewStrategy->addMetaContact( mc ); - connect( mc, SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), - SLOT( slotAddedToGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); - connect( mc, SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), - SLOT( slotRemovedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); - connect( mc, SIGNAL( movedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ), - SLOT( slotMovedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ) ); - connect( mc, SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), - SLOT( slotContactStatusChanged( Kopete::MetaContact * ) ) ); + connect( mc, TQT_SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), + TQT_SLOT( slotAddedToGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); + connect( mc, TQT_SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), + TQT_SLOT( slotRemovedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); + connect( mc, TQT_SIGNAL( movedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ), + TQT_SLOT( slotMovedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ) ); + connect( mc, TQT_SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), + TQT_SLOT( slotContactStatusChanged( Kopete::MetaContact * ) ) ); } void KopeteContactListView::slotMetaContactDeleted( Kopete::MetaContact *mc ) @@ -595,7 +595,7 @@ void KopeteContactListView::removeContact( Kopete::MetaContact *c ) void KopeteContactListView::addGroup() { - QString groupName = + TQString groupName = KInputDialog::getText( i18n( "New Group" ), i18n( "Please enter the name for the new group:" ) ); @@ -603,7 +603,7 @@ void KopeteContactListView::addGroup() addGroup( groupName ); } -void KopeteContactListView::addGroup( const QString &groupName ) +void KopeteContactListView::addGroup( const TQString &groupName ) { d->viewStrategy->addGroup( Kopete::ContactList::self()->findGroup(groupName) ); } @@ -613,7 +613,7 @@ void KopeteContactListView::slotGroupAdded( Kopete::Group *group ) d->viewStrategy->addGroup( group ); } -void KopeteContactListView::slotExpanded( QListViewItem *item ) +void KopeteContactListView::slotExpanded( TQListViewItem *item ) { KopeteGroupViewItem *groupLVI = dynamic_cast( item ); if ( groupLVI ) @@ -626,7 +626,7 @@ void KopeteContactListView::slotExpanded( QListViewItem *item ) delayedSort(); } -void KopeteContactListView::slotCollapsed( QListViewItem *item ) +void KopeteContactListView::slotCollapsed( TQListViewItem *item ) { KopeteGroupViewItem *groupLVI = dynamic_cast( item ); if ( groupLVI ) @@ -637,7 +637,7 @@ void KopeteContactListView::slotCollapsed( QListViewItem *item ) } void KopeteContactListView::slotContextMenu( KListView * /*listview*/, - QListViewItem *item, const QPoint &point ) + TQListViewItem *item, const TQPoint &point ) { // FIXME: this code should be moved to the various list view item classes. KopeteMetaContactLVI *metaLVI = dynamic_cast( item ); @@ -653,7 +653,7 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, { clearSelection(); //Clear selection doesn't update lists of selected contact if the item is onlt heilighted (see bug 106090) - Kopete::ContactList::self()->setSelectedItems( QPtrList() , QPtrList() ); + Kopete::ContactList::self()->setSelectedItems( TQPtrList() , TQPtrList() ); } int nb = Kopete::ContactList::self()->selectedMetaContacts().count() + @@ -674,11 +674,11 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, int py = mapFromGlobal( point ).y() - itemRect( item ).y() - (header()->isVisible() ? header()->height() : 0) ; //kdDebug( 14000 ) << k_funcinfo << "x: " << px << ", y: " << py << endl; - Kopete::Contact *c = metaLVI->contactForPoint( QPoint( px, py ) ) ; + Kopete::Contact *c = metaLVI->contactForPoint( TQPoint( px, py ) ) ; if ( c ) { KPopupMenu *p = c->popupMenu(); - connect( p, SIGNAL( aboutToHide() ), p, SLOT( deleteLater() ) ); + connect( p, TQT_SIGNAL( aboutToHide() ), p, TQT_SLOT( deleteLater() ) ); p->popup( point ); } else @@ -687,11 +687,11 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, window->factory()->container( "contact_popup", window ) ); if ( popup ) { - QString title = i18n( "Translators: format: ' ()'", "%1 (%2)" ). + TQString title = i18n( "Translators: format: ' ()'", "%1 (%2)" ). arg( metaLVI->metaContact()->displayName(), metaLVI->metaContact()->statusString() ); if ( title.length() > 43 ) - title = title.left( 40 ) + QString::fromLatin1( "..." ); + title = title.left( 40 ) + TQString::fromLatin1( "..." ); if ( popup->title( 0 ).isNull() ) popup->insertTitle ( title, 0, 0 ); @@ -700,7 +700,7 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, // Submenus for separate contact actions bool sep = false; //FIXME: find if there is already a separator in the end - Olivier - QPtrList it = metaLVI->metaContact()->contacts(); + TQPtrList it = metaLVI->metaContact()->contacts(); for( Kopete::Contact *c = it.first(); c; c = it.next() ) { if( sep ) @@ -710,13 +710,13 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, } KPopupMenu *contactMenu = it.current()->popupMenu(); - connect( popup, SIGNAL( aboutToHide() ), contactMenu, SLOT( deleteLater() ) ); - QString nick=c->property(Kopete::Global::Properties::self()->nickName()).value().toString(); - QString text= nick.isEmpty() ? c->contactId() : i18n( "Translators: format: ' ()'", "%2 <%1>" ). arg( c->contactId(), nick ); + connect( popup, TQT_SIGNAL( aboutToHide() ), contactMenu, TQT_SLOT( deleteLater() ) ); + TQString nick=c->property(Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString text= nick.isEmpty() ? c->contactId() : i18n( "Translators: format: ' ()'", "%2 <%1>" ). arg( c->contactId(), nick ); text=text.replace("&","&&"); // cf BUG 115449 if ( text.length() > 41 ) - text = text.left( 38 ) + QString::fromLatin1( "..." ); + text = text.left( 38 ) + TQString::fromLatin1( "..." ); popup->insertItem( c->onlineStatus().iconFor( c, 16 ), text , contactMenu ); } @@ -731,9 +731,9 @@ void KopeteContactListView::slotContextMenu( KListView * /*listview*/, window->factory()->container( "group_popup", window ) ); if ( popup ) { - QString title = groupvi->group()->displayName(); + TQString title = groupvi->group()->displayName(); if ( title.length() > 32 ) - title = title.left( 30 ) + QString::fromLatin1( "..." ); + title = title.left( 30 ) + TQString::fromLatin1( "..." ); if( popup->title( 0 ).isNull() ) popup->insertTitle( title, 0, 0 ); @@ -798,24 +798,24 @@ void KopeteContactListView::slotUpdateAllGroupIcons() { // FIXME: groups can (should?) do this for themselves // HACK: assume all groups are top-level. works for now, until the fixme above is dealt with - for ( QListViewItem *it = firstChild(); it; it = it->nextSibling() ) + for ( TQListViewItem *it = firstChild(); it; it = it->nextSibling() ) if ( KopeteGroupViewItem *gpi = dynamic_cast( it ) ) gpi->updateIcon(); } -void KopeteContactListView::slotExecuted( QListViewItem *item, const QPoint &p, int /* col */ ) +void KopeteContactListView::slotExecuted( TQListViewItem *item, const TQPoint &p, int /* col */ ) { item->setSelected( false ); KopeteMetaContactLVI *metaContactLVI = dynamic_cast( item ); - QPoint pos = viewport()->mapFromGlobal( p ); + TQPoint pos = viewport()->mapFromGlobal( p ); Kopete::Contact *c = 0L; if ( metaContactLVI ) { // Try if we are clicking a protocol icon. If so, open a direct // connection for that protocol - QRect r = itemRect( item ); - QPoint relativePos( pos.x() - r.left() - ( treeStepSize() * + TQRect r = itemRect( item ); + TQPoint relativePos( pos.x() - r.left() - ( treeStepSize() * ( item->depth() + ( rootIsDecorated() ? 1 : 0 ) ) + itemMargin() ), pos.y() - r.top() ); c = metaContactLVI->contactForPoint( relativePos ); @@ -831,7 +831,7 @@ void KopeteContactListView::slotContactStatusChanged( Kopete::MetaContact *mc ) d->viewStrategy->metaContactStatusChanged( mc ); } -void KopeteContactListView::slotDropped(QDropEvent *e, QListViewItem *, QListViewItem *after) +void KopeteContactListView::slotDropped(TQDropEvent *e, TQListViewItem *, TQListViewItem *after) { if(!acceptDrag(e)) return; @@ -839,9 +839,9 @@ void KopeteContactListView::slotDropped(QDropEvent *e, QListViewItem *, QListVie KopeteMetaContactLVI *dest_metaLVI=dynamic_cast(after); KopeteGroupViewItem *dest_groupLVI=dynamic_cast(after); - if( const_cast( e->source() ) == this ) + if( const_cast( e->source() ) == this ) { - QPtrListIterator it( m_selectedContacts ); + TQPtrListIterator it( m_selectedContacts ); while ( it.current() ) { @@ -905,17 +905,17 @@ void KopeteContactListView::slotDropped(QDropEvent *e, QListViewItem *, QListVie } else if( e->provides("kopete/x-contact") ) { - QString contactInfo = QString::fromUtf8( e->encodedData("kopete/x-contact") ); - QString protocolId = contactInfo.section( QChar( 0xE000 ), 0, 0 ); - QString accountId = contactInfo.section( QChar( 0xE000 ), 1, 1 ); - QString contactId = contactInfo.section( QChar( 0xE000 ), 2 ); + TQString contactInfo = TQString::fromUtf8( e->encodedData("kopete/x-contact") ); + TQString protocolId = contactInfo.section( TQChar( 0xE000 ), 0, 0 ); + TQString accountId = contactInfo.section( TQChar( 0xE000 ), 1, 1 ); + TQString contactId = contactInfo.section( TQChar( 0xE000 ), 2 ); addDraggedContactByInfo( protocolId, accountId, contactId, after ); } else if( e->provides("text/uri-list") ) { - if ( !QUriDrag::canDecode( e ) ) + if ( !TQUriDrag::canDecode( e ) ) { e->ignore(); return; @@ -927,7 +927,7 @@ void KopeteContactListView::slotDropped(QDropEvent *e, QListViewItem *, QListVie for ( KURL::List::Iterator it = urlList.begin(); it != urlList.end(); ++it ) { KURL url = (*it); - if( url.protocol() == QString::fromLatin1("kopetemessage") ) + if( url.protocol() == TQString::fromLatin1("kopetemessage") ) { //Add a contact addDraggedContactByInfo( url.queryItem("protocolId"), @@ -935,12 +935,12 @@ void KopeteContactListView::slotDropped(QDropEvent *e, QListViewItem *, QListVie } else if( dest_metaLVI ) { - QPoint p = contentsToViewport(e->pos()); + TQPoint p = contentsToViewport(e->pos()); int px = p.x() - ( header()->sectionPos( header()->mapToIndex( 0 ) ) + treeStepSize() * ( dest_metaLVI->depth() + ( rootIsDecorated() ? 1 : 0 ) ) + itemMargin() ); int py = p.y() - itemRect( dest_metaLVI ).y(); - Kopete::Contact *c = dest_metaLVI->contactForPoint( QPoint( px, py ) ); + Kopete::Contact *c = dest_metaLVI->contactForPoint( TQPoint( px, py ) ); if( url.isLocalFile() ) { @@ -1018,8 +1018,8 @@ void KopeteContactListView::addDraggedContactToMetaContact( Kopete::Contact *con } } -void KopeteContactListView::addDraggedContactByInfo( const QString &protocolId, const QString &accountId, - const QString &contactId, QListViewItem *after ) +void KopeteContactListView::addDraggedContactByInfo( const TQString &protocolId, const TQString &accountId, + const TQString &contactId, TQListViewItem *after ) { kdDebug(14000) << k_funcinfo << "protocolId=" << protocolId << ", accountId=" << accountId << ", contactId=" << contactId << endl; @@ -1027,7 +1027,7 @@ void KopeteContactListView::addDraggedContactByInfo( const QString &protocolId, Kopete::Account *account = Kopete::AccountManager::self()->findAccount( protocolId,accountId ); if( account ) { - QDict contacts = account->contacts(); + TQDict contacts = account->contacts(); Kopete::Contact *source_contact = contacts[ contactId ]; if( source_contact ) @@ -1061,11 +1061,11 @@ void KopeteContactListView::addDraggedContactByInfo( const QString &protocolId, } } -bool KopeteContactListView::acceptDrag(QDropEvent *e) const +bool KopeteContactListView::acceptDrag(TQDropEvent *e) const { - QListViewItem *source=currentItem(); - QListViewItem *parent; - QListViewItem *afterme; + TQListViewItem *source=currentItem(); + TQListViewItem *parent; + TQListViewItem *afterme; // Due to a little design problem in KListView::findDrop() we can't // call it directly from a const method until KDE 4.0, but as the // method is in fact const we can of course get away with a @@ -1074,7 +1074,7 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const KopeteMetaContactLVI *dest_metaLVI=dynamic_cast(afterme); - if( const_cast( e->source() ) == this ) + if( const_cast( e->source() ) == this ) { KopeteMetaContactLVI *source_metaLVI=dynamic_cast(source); KopeteGroupViewItem *dest_groupLVI=dynamic_cast(afterme); @@ -1143,11 +1143,11 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const //we are sending a file (or dragging from the chat view) if( dest_metaLVI ) { - QPoint p=contentsToViewport(e->pos()); + TQPoint p=contentsToViewport(e->pos()); int px = p.x() - ( header()->sectionPos( header()->mapToIndex( 0 ) ) + treeStepSize() * ( dest_metaLVI->depth() + ( rootIsDecorated() ? 1 : 0 ) ) + itemMargin() ); int py = p.y() - itemRect( dest_metaLVI ).y(); - Kopete::Contact *c = dest_metaLVI->contactForPoint( QPoint( px, py ) ) ; + Kopete::Contact *c = dest_metaLVI->contactForPoint( TQPoint( px, py ) ) ; if( c ? !c->isReachable() : !dest_metaLVI->metaContact()->isReachable() ) return false; //If the pointed contact is not reachable, abort @@ -1160,7 +1160,7 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const } } - if ( !QUriDrag::canDecode(e) ) + if ( !TQUriDrag::canDecode(e) ) return false; KURL::List urlList; @@ -1168,7 +1168,7 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const for ( KURL::List::Iterator it = urlList.begin(); it != urlList.end(); ++it ) { - if( (*it).protocol() != QString::fromLatin1("kopetemessage") && (*it).isLocalFile() ) + if( (*it).protocol() != TQString::fromLatin1("kopetemessage") && (*it).isLocalFile() ) return false; //we can't send links if a locale file is in link } @@ -1181,8 +1181,8 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const } else { - QString text; - QTextDrag::decode(e, text); + TQString text; + TQTextDrag::decode(e, text); kdDebug(14000) << k_funcinfo << "drop with mimetype:" << e->format() << " data as text:" << text << endl; } @@ -1191,24 +1191,24 @@ bool KopeteContactListView::acceptDrag(QDropEvent *e) const return false; } -void KopeteContactListView::findDrop(const QPoint &pos, QListViewItem *&parent, - QListViewItem *&after) +void KopeteContactListView::findDrop(const TQPoint &pos, TQListViewItem *&parent, + TQListViewItem *&after) { //Since KDE 3.1.1 , the original find Drop return 0L for afterme if the group is open. //This woraround allow us to keep the highlight of the item, and give always a correct position parent=0L; - QPoint p (contentsToViewport(pos)); + TQPoint p (contentsToViewport(pos)); after=itemAt(p); } -void KopeteContactListView::contentsMousePressEvent( QMouseEvent *e ) +void KopeteContactListView::contentsMousePressEvent( TQMouseEvent *e ) { KListView::contentsMousePressEvent( e ); if (e->button() == LeftButton ) { - QPoint p=contentsToViewport(e->pos()); - QListViewItem *i=itemAt( p ); + TQPoint p=contentsToViewport(e->pos()); + TQListViewItem *i=itemAt( p ); if( i ) { //Maybe we are starting a drag? @@ -1218,7 +1218,7 @@ void KopeteContactListView::contentsMousePressEvent( QMouseEvent *e ) treeStepSize() * ( i->depth() + ( rootIsDecorated() ? 1 : 0 ) ) + itemMargin() ); int py = p.y() - itemRect( i ).y(); - m_startDragPos = QPoint( px , py ); + m_startDragPos = TQPoint( px , py ); } } } @@ -1233,14 +1233,14 @@ void KopeteContactListView::slotNewMessageEvent(Kopete::MessageEvent *event) if(!m) return; - for ( QListViewItem *item = firstChild(); item; item = nextItem(item) ) + for ( TQListViewItem *item = firstChild(); item; item = nextItem(item) ) if ( KopeteMetaContactLVI *li = dynamic_cast(item) ) if ( li->metaContact() == m ) li->catchEvent(event); } } -QDragObject *KopeteContactListView::dragObject() +TQDragObject *KopeteContactListView::dragObject() { // Discover what the drag started on. // If it's a MetaContactLVI, it was either on the MCLVI itself @@ -1249,7 +1249,7 @@ QDragObject *KopeteContactListView::dragObject() // we set the pixmap for the drag to the MC's pixmap // or the child contact's small icon - QListViewItem *currentLVI = currentItem(); + TQListViewItem *currentLVI = currentItem(); if( !currentLVI ) return 0L; @@ -1257,19 +1257,19 @@ QDragObject *KopeteContactListView::dragObject() if( !metaLVI ) return 0L; - QPixmap pm; + TQPixmap pm; Kopete::Contact *c = metaLVI->contactForPoint( m_startDragPos ); KMultipleDrag *drag = new KMultipleDrag( this ); - drag->addDragObject( new QStoredDrag("application/x-qlistviewitem", 0L ) ); + drag->addDragObject( new TQStoredDrag("application/x-qlistviewitem", 0L ) ); - QStoredDrag *d = new QStoredDrag("kopete/x-metacontact", 0L ); + TQStoredDrag *d = new TQStoredDrag("kopete/x-metacontact", 0L ); d->setEncodedData( metaLVI->metaContact()->metaContactId().utf8() ); drag->addDragObject( d ); if ( c ) // dragging a contact { - QStoredDrag *d = new QStoredDrag("kopete/x-contact", 0L ); - d->setEncodedData( QString( c->protocol()->pluginId() +QChar( 0xE000 )+ c->account()->accountId() +QChar( 0xE000 )+ c->contactId() ).utf8() ); + TQStoredDrag *d = new TQStoredDrag("kopete/x-contact", 0L ); + d->setEncodedData( TQString( c->protocol()->pluginId() +TQChar( 0xE000 )+ c->account()->accountId() +TQChar( 0xE000 )+ c->contactId() ).utf8() ); drag->addDragObject( d ); pm = c->onlineStatus().iconFor( c, 12 ); // FIXME: fixed icon scaling @@ -1278,7 +1278,7 @@ QDragObject *KopeteContactListView::dragObject() { // FIXME: first start at rendering the whole MC incl small icons // into a pixmap to drag - anyone know how to complete this? - //QPainter p( pm ); + //TQPainter p( pm ); //source_metaLVI->paintCell( p, cg?, width(), 0, 0 ); pm = SmallIcon( metaLVI->metaContact()->statusIcon() ); } @@ -1289,35 +1289,35 @@ QDragObject *KopeteContactListView::dragObject() if( !address.isEmpty() ) { - drag->addDragObject( new QTextDrag( address.fullEmail(), 0L ) ); + drag->addDragObject( new TQTextDrag( address.fullEmail(), 0L ) ); KABC::VCardConverter converter; - QString vcard = converter.createVCard( address ); + TQString vcard = converter.createVCard( address ); if( !vcard.isNull() ) { - QStoredDrag *vcardDrag = new QStoredDrag("text/x-vcard", 0L ); + TQStoredDrag *vcardDrag = new TQStoredDrag("text/x-vcard", 0L ); vcardDrag->setEncodedData( vcard.utf8() ); drag->addDragObject( vcardDrag ); } } - //QSize s = pm.size(); - drag->setPixmap( pm /*, QPoint( s.width() , s.height() )*/ ); + //TQSize s = pm.size(); + drag->setPixmap( pm /*, TQPoint( s.width() , s.height() )*/ ); return drag; } void KopeteContactListView::slotViewSelectionChanged() { - QPtrList contacts; - QPtrList groups; + TQPtrList contacts; + TQPtrList groups; m_selectedContacts.clear(); m_selectedGroups.clear(); - QListViewItemIterator it( this ); + TQListViewItemIterator it( this ); while ( it.current() ) { - QListViewItem *item = it.current(); + TQListViewItem *item = it.current(); ++it; if ( item->isSelected() ) @@ -1346,8 +1346,8 @@ void KopeteContactListView::slotViewSelectionChanged() void KopeteContactListView::slotListSelectionChanged() { - QPtrList contacts = Kopete::ContactList::self()->selectedMetaContacts(); - QPtrList groups = Kopete::ContactList::self()->selectedGroups(); + TQPtrList contacts = Kopete::ContactList::self()->selectedMetaContacts(); + TQPtrList groups = Kopete::ContactList::self()->selectedGroups(); //TODO: update the list to select the items that should be selected. // make sure slotViewSelectionChanged is *not* called. @@ -1355,13 +1355,13 @@ void KopeteContactListView::slotListSelectionChanged() } void KopeteContactListView::updateActionsForSelection( - QPtrList contacts, QPtrList groups ) + TQPtrList contacts, TQPtrList groups ) { bool singleContactSelected = groups.isEmpty() && contacts.count() == 1; bool inkabc=false; if(singleContactSelected) { - QString kabcid=contacts.first()->metaContactId(); + TQString kabcid=contacts.first()->metaContactId(); inkabc= !kabcid.isEmpty() && !kabcid.contains(":"); } @@ -1439,11 +1439,11 @@ void KopeteContactListView::slotSendFile() KABC::Addressee addressee = KABC::StdAddressBook::self()->findByUid( m->metaContactId() ); if ( !addressee.isEmpty() ) { - QString emailAddr = addressee.fullEmail(); + TQString emailAddr = addressee.fullEmail(); kdDebug( 14000 ) << "Email: " << emailAddr << "!" << endl; if ( !emailAddr.isEmpty() ) - kapp->invokeMailer( emailAddr, QString::null ); + kapp->invokeMailer( emailAddr, TQString::null ); else KMessageBox::queuedMessageBox( this, KMessageBox::Sorry, i18n( "There is no email address set for this contact in the KDE address book." ), i18n( "No Email Address in Address Book" ) ); } @@ -1529,13 +1529,13 @@ void KopeteContactListView::slotCopyToGroup() void KopeteContactListView::slotRemove() { - QPtrList contacts = Kopete::ContactList::self()->selectedMetaContacts(); - QPtrList groups = Kopete::ContactList::self()->selectedGroups(); + TQPtrList contacts = Kopete::ContactList::self()->selectedMetaContacts(); + TQPtrList groups = Kopete::ContactList::self()->selectedGroups(); if(groups.count() + contacts.count() == 0) return; - QStringList items; + TQStringList items; for( Kopete::Group *it = groups.first(); it; it = groups.next() ) { if(!it->displayName().isEmpty()) @@ -1550,7 +1550,7 @@ void KopeteContactListView::slotRemove() if( items.count() <= 1 ) { // we are deleting an empty contact - QString msg; + TQString msg; if( !contacts.isEmpty() ) { msg = i18n( "Are you sure you want to remove the contact %1" \ @@ -1575,7 +1575,7 @@ void KopeteContactListView::slotRemove() } else { - QString msg = groups.isEmpty() ? + TQString msg = groups.isEmpty() ? i18n( "Are you sure you want to remove these contacts " \ "from your contact list?" ) : i18n( "Are you sure you want to remove these groups and " \ @@ -1598,10 +1598,10 @@ void KopeteContactListView::slotRemove() else { //try to guess from what group we are removing that contact. - QListViewItemIterator lvi_it( this ); + TQListViewItemIterator lvi_it( this ); while ( lvi_it.current() ) { - QListViewItem *item = lvi_it.current(); + TQListViewItem *item = lvi_it.current(); ++lvi_it; if ( item->isSelected() ) @@ -1630,7 +1630,7 @@ void KopeteContactListView::slotRemove() for( Kopete::Group *it = groups.first(); it; it = groups.next() ) { - QPtrList list = it->members(); + TQPtrList list = it->members(); for( list.first(); list.current(); list.next() ) { Kopete::MetaContact *mc = list.current(); @@ -1700,7 +1700,7 @@ void KopeteContactListView::slotAddContact() else { addDialog->setMainWidget( addContactPage ); - if( addDialog->exec() == QDialog::Accepted ) + if( addDialog->exec() == TQDialog::Accepted ) { if( addContactPage->validateData() ) { @@ -1786,7 +1786,7 @@ void KopeteContactListView::slotProperties() } } -void KopeteContactListView::slotItemRenamed( QListViewItem */*item*/ ) +void KopeteContactListView::slotItemRenamed( TQListViewItem */*item*/ ) { //everithing is now done in KopeteMetaContactLVI::rename @@ -1867,7 +1867,7 @@ void KopeteContactListView::slotUndo() if( m ) { // make a copy - QStringList undoArgs = m_undo->args; + TQStringList undoArgs = m_undo->args; Kopete::MetaContact::PropertySource undoSource = m_undo->nameSource; // set undo undo // set the source first @@ -1915,7 +1915,7 @@ void KopeteContactListView::slotUndo() { if( m_undo->group ) { - const QString old=m_undo->group->displayName(); + const TQString old=m_undo->group->displayName(); m_undo->group->setDisplayName( m_undo->args[0] ); m_undo->args[0]=old; success=true; @@ -2027,10 +2027,10 @@ void KopeteContactListView::slotRedo() Kopete::MetaContact *m=m_redo->metacontact; if( m ) { - const QString old=m->displayName(); + const TQString old=m->displayName(); if( m_redo->args[1].isEmpty() ) { - const QString name = m_redo->args[0]; + const TQString name = m_redo->args[0]; m_redo->args[0] = m->displayNameSource()->contactId(); m_redo->args[1] = m->displayNameSource()->protocol()->pluginId(); m_redo->args[2] = m->displayNameSource()->account()->accountId(); @@ -2038,9 +2038,9 @@ void KopeteContactListView::slotRedo() } else { - const QString oldName = m->displayName(); - QPtrList< Kopete::Contact > cList = m->contacts(); - QPtrListIterator< Kopete::Contact > it (cList); + const TQString oldName = m->displayName(); + TQPtrList< Kopete::Contact > cList = m->contacts(); + TQPtrListIterator< Kopete::Contact > it (cList); Kopete::Contact *c = Kopete::ContactList::self()->findContact( args[0], args[2], args[1]); if ( !c) return; @@ -2060,7 +2060,7 @@ void KopeteContactListView::slotRedo() { if( m_redo->group ) { - const QString old=m_redo->group->displayName(); + const TQString old=m_redo->group->displayName(); m_redo->group->setDisplayName( m_redo->args[0] ); m_redo->args[0]=old; success=true; diff --git a/kopete/kopete/contactlist/kopetecontactlistview.h b/kopete/kopete/contactlist/kopetecontactlistview.h index 43c60ebe..4c5a8d37 100644 --- a/kopete/kopete/contactlist/kopetecontactlistview.h +++ b/kopete/kopete/contactlist/kopetecontactlistview.h @@ -27,12 +27,12 @@ #include "kopetelistview.h" #include "kopetemetacontact.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include class KopeteMetaContactLVI; class KopeteGroupViewItem; @@ -61,7 +61,7 @@ class KopeteContactListView : public Kopete::UI::ListView::ListView Q_OBJECT public: - KopeteContactListView( QWidget *parent = 0, const char *name = 0 ); + KopeteContactListView( TQWidget *parent = 0, const char *name = 0 ); ~KopeteContactListView(); /** @@ -72,7 +72,7 @@ public: /** * Add a given group name and return it */ - void addGroup( const QString &groupName ); + void addGroup( const TQString &groupName ); /** * Are we displaying as a tree view (true), or in a flat list (false)? @@ -92,26 +92,26 @@ public slots: void addGroup(); protected: - virtual void contentsMousePressEvent( QMouseEvent *e ); + virtual void contentsMousePressEvent( TQMouseEvent *e ); - virtual bool acceptDrag(QDropEvent *e) const; + virtual bool acceptDrag(TQDropEvent *e) const; /** * Start a drag operation - * @return a KMultipleDrag containing: 1) A QStoredDrag of type "application/x-qlistviewitem", 2) If the MC is associated with a KABC entry, i) a QTextDrag containing their email address, and ii) their vCard representation. + * @return a KMultipleDrag containing: 1) A TQStoredDrag of type "application/x-qlistviewitem", 2) If the MC is associated with a KABC entry, i) a TQTextDrag containing their email address, and ii) their vCard representation. */ - virtual QDragObject *dragObject(); + virtual TQDragObject *dragObject(); /** * Since KDE 3.1.1 , the original find Drop return 0L for afterme if the group is open. * This woraround allow us to keep the highlight of the item, and give always a correct position */ - virtual void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after); + virtual void findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after); /** * The selected items have changed; update our actions to show what's possible. */ - void updateActionsForSelection( QPtrList contacts, QPtrList groups ); + void updateActionsForSelection( TQPtrList contacts, TQPtrList groups ); private slots: /** @@ -126,13 +126,13 @@ private slots: void slotViewSelectionChanged(); void slotListSelectionChanged(); - void slotContextMenu(KListView*,QListViewItem *item, const QPoint &point ); - void slotExpanded( QListViewItem *item ); - void slotCollapsed( QListViewItem *item ); + void slotContextMenu(KListView*,TQListViewItem *item, const TQPoint &point ); + void slotExpanded( TQListViewItem *item ); + void slotCollapsed( TQListViewItem *item ); void slotSettingsChanged( void ); void slotUpdateAllGroupIcons(); - void slotExecuted( QListViewItem *item, const QPoint &pos, int c ); + void slotExecuted( TQListViewItem *item, const TQPoint &pos, int c ); void slotAddedToGroup( Kopete::MetaContact *mc, Kopete::Group *to ); void slotRemovedFromGroup( Kopete::MetaContact *mc, Kopete::Group *from ); @@ -149,7 +149,7 @@ private slots: void slotContactStatusChanged( Kopete::MetaContact *mc ); - void slotDropped(QDropEvent *e, QListViewItem *parent, QListViewItem*); + void slotDropped(TQDropEvent *e, TQListViewItem *parent, TQListViewItem*); void slotShowAddContactDialog(); void slotNewMessageEvent(Kopete::MessageEvent *); @@ -157,7 +157,7 @@ private slots: /** * Handle renamed items by renaming the meta contact */ - void slotItemRenamed( QListViewItem *item ); + void slotItemRenamed( TQListViewItem *item ); /** Actions related slots **/ void slotSendMessage(); @@ -180,15 +180,15 @@ private: bool mShowAsTree; // TODO: do we really need to store these? - QPtrList m_selectedContacts; - QPtrList m_selectedGroups; + TQPtrList m_selectedContacts; + TQPtrList m_selectedGroups; bool mSortByGroup; KRootPixmap *root; - QRect m_onItem; + TQRect m_onItem; - QPoint m_startDragPos; + TQPoint m_startDragPos; /* ACTIONS */ KAction *actionSendMessage; @@ -209,29 +209,29 @@ private: void moveDraggedContactToGroup( Kopete::MetaContact *contact, Kopete::Group *from, Kopete::Group *to ); void addDraggedContactToGroup( Kopete::MetaContact *contact, Kopete::Group *group ); void addDraggedContactToMetaContact( Kopete::Contact *contact, Kopete::MetaContact *parent ); - void addDraggedContactByInfo( const QString &protocolId, const QString &accountId, - const QString &contactId, QListViewItem *after ); + void addDraggedContactByInfo( const TQString &protocolId, const TQString &accountId, + const TQString &contactId, TQListViewItem *after ); public: struct UndoItem; UndoItem *m_undo; UndoItem *m_redo; void insertUndoItem(UndoItem *u); - QTimer undoTimer; + TQTimer undoTimer; public: // This is public so the chatwinodw can handle sub actions // FIXME: do we not believe in accessor functions any more? KActionMenu *actionAddContact; - QMap m_accountAddContactMap; + TQMap m_accountAddContactMap; }; struct KopeteContactListView::UndoItem { enum Type { MetaContactAdd, MetaContactRemove , MetaContactCopy , MetaContactRename, MetaContactChange, ContactAdd, GroupRename } type; - QStringList args; - QGuardedPtr metacontact; - QGuardedPtr group; + TQStringList args; + TQGuardedPtr metacontact; + TQGuardedPtr group; UndoItem *next; bool isStep; Kopete::MetaContact::PropertySource nameSource; diff --git a/kopete/kopete/contactlist/kopetegrouplistaction.cpp b/kopete/kopete/contactlist/kopetegrouplistaction.cpp index 1556f9b6..802df117 100644 --- a/kopete/kopete/contactlist/kopetegrouplistaction.cpp +++ b/kopete/kopete/contactlist/kopetegrouplistaction.cpp @@ -29,15 +29,15 @@ #include "kopetecontactlist.h" #include "kopetegroup.h" -KopeteGroupListAction::KopeteGroupListAction( const QString &text, const QString &pix, const KShortcut &cut, const QObject *receiver, - const char *slot, QObject *parent, const char *name ) +KopeteGroupListAction::KopeteGroupListAction( const TQString &text, const TQString &pix, const KShortcut &cut, const TQObject *receiver, + const char *slot, TQObject *parent, const char *name ) : KListAction( text, pix, cut, parent, name ) { - connect( this, SIGNAL( activated() ), receiver, slot ); + connect( this, TQT_SIGNAL( activated() ), receiver, slot ); - connect( Kopete::ContactList::self(), SIGNAL( groupAdded( Kopete::Group * ) ), this, SLOT( slotUpdateList() ) ); - connect( Kopete::ContactList::self(), SIGNAL( groupRemoved( Kopete::Group * ) ), this, SLOT( slotUpdateList() ) ); - connect( Kopete::ContactList::self(), SIGNAL( groupRenamed(Kopete::Group*, const QString& ) ), this, SLOT( slotUpdateList() ) ); + connect( Kopete::ContactList::self(), TQT_SIGNAL( groupAdded( Kopete::Group * ) ), this, TQT_SLOT( slotUpdateList() ) ); + connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRemoved( Kopete::Group * ) ), this, TQT_SLOT( slotUpdateList() ) ); + connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRenamed(Kopete::Group*, const TQString& ) ), this, TQT_SLOT( slotUpdateList() ) ); slotUpdateList(); } @@ -47,10 +47,10 @@ KopeteGroupListAction::~KopeteGroupListAction() void KopeteGroupListAction::slotUpdateList() { - QStringList groupList; + TQStringList groupList; // Add groups to our list - QPtrList groups = Kopete::ContactList::self()->groups(); + TQPtrList groups = Kopete::ContactList::self()->groups(); for ( Kopete::Group *it = groups.first(); it; it = groups.next() ) { if(it->type() == Kopete::Group::Normal) @@ -58,7 +58,7 @@ void KopeteGroupListAction::slotUpdateList() } groupList.sort(); - groupList.prepend(QString::null); //add a separator; + groupList.prepend(TQString::null); //add a separator; groupList.prepend( i18n("Top Level") ); //the top-level group, with the id 0 setItems( groupList ); } diff --git a/kopete/kopete/contactlist/kopetegrouplistaction.h b/kopete/kopete/contactlist/kopetegrouplistaction.h index 3576f3ed..2b852632 100644 --- a/kopete/kopete/contactlist/kopetegrouplistaction.h +++ b/kopete/kopete/contactlist/kopetegrouplistaction.h @@ -31,14 +31,14 @@ class KopeteGroupListAction : public KListAction Q_OBJECT public: - KopeteGroupListAction( const QString &, const QString &, const KShortcut &, - const QObject *, const char *, QObject *, const char * ); + KopeteGroupListAction( const TQString &, const TQString &, const KShortcut &, + const TQObject *, const char *, TQObject *, const char * ); ~KopeteGroupListAction(); protected slots: void slotUpdateList(); private: - QStringList m_groupList; + TQStringList m_groupList; }; #endif diff --git a/kopete/kopete/contactlist/kopetegroupviewitem.cpp b/kopete/kopete/contactlist/kopetegroupviewitem.cpp index 21b1cf79..6b65b0ef 100644 --- a/kopete/kopete/contactlist/kopetegroupviewitem.cpp +++ b/kopete/kopete/contactlist/kopetegroupviewitem.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ -#include +#include #include #include @@ -55,7 +55,7 @@ public: : group( gp ) { } - QString operator()( ComponentBase *, const QPoint &, QRect & ) + TQString operator()( ComponentBase *, const TQPoint &, TQRect & ) { return group->toolTip(); } @@ -67,14 +67,14 @@ private: } // END namespace UI } // END namespace Kopete -KopeteGroupViewItem::KopeteGroupViewItem( Kopete::Group *group_, QListView *parent, const char *name ) +KopeteGroupViewItem::KopeteGroupViewItem( Kopete::Group *group_, TQListView *parent, const char *name ) : Kopete::UI::ListView::Item( parent, group_, name ) { m_group = group_; initLVI(); } -KopeteGroupViewItem::KopeteGroupViewItem( Kopete::Group *group_, QListViewItem *parent, const char *name ) +KopeteGroupViewItem::KopeteGroupViewItem( Kopete::Group *group_, TQListViewItem *parent, const char *name ) : Kopete::UI::ListView::Item( parent, group_, name ) { m_group = group_; @@ -102,14 +102,14 @@ void KopeteGroupViewItem::initLVI() d->name->setToolTipSource( d->toolTipSource.get() ); d->count->setToolTipSource( d->toolTipSource.get() ); - connect( m_group, SIGNAL( displayNameChanged( Kopete::Group*, const QString& ) ), - this, SLOT( refreshDisplayName() ) ); + connect( m_group, TQT_SIGNAL( displayNameChanged( Kopete::Group*, const TQString& ) ), + this, TQT_SLOT( refreshDisplayName() ) ); - connect( KopetePrefs::prefs(), SIGNAL( contactListAppearanceChanged() ), - SLOT( slotConfigChanged() ) ); - connect( kapp, SIGNAL( appearanceChanged() ), SLOT( slotConfigChanged() ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL( contactListAppearanceChanged() ), + TQT_SLOT( slotConfigChanged() ) ); + connect( kapp, TQT_SIGNAL( appearanceChanged() ), TQT_SLOT( slotConfigChanged() ) ); - connect( m_group, SIGNAL( iconAppearanceChanged() ), SLOT( updateIcon() ) ); + connect( m_group, TQT_SIGNAL( iconAppearanceChanged() ), TQT_SLOT( updateIcon() ) ); refreshDisplayName(); slotConfigChanged(); @@ -120,7 +120,7 @@ Kopete::Group* KopeteGroupViewItem::group() const return m_group; } -QString KopeteGroupViewItem::toolTip() const +TQString KopeteGroupViewItem::toolTip() const { // TODO: add icon, and some more information than that which // is already displayed in the list view item @@ -136,7 +136,7 @@ void KopeteGroupViewItem::slotConfigChanged() d->name->setColor( KopetePrefs::prefs()->contactListGroupNameColor() ); - QFont font = listView()->font(); + TQFont font = listView()->font(); if ( KopetePrefs::prefs()->contactListUseCustomFonts() ) font = KopetePrefs::prefs()->contactListCustomNormalFont(); d->name->setFont( font ); @@ -149,7 +149,7 @@ void KopeteGroupViewItem::refreshDisplayName() totalMemberCount = 0; onlineMemberCount = 0; - for ( QListViewItem *lvi = firstChild(); lvi; lvi = lvi->nextSibling() ) + for ( TQListViewItem *lvi = firstChild(); lvi; lvi = lvi->nextSibling() ) { if ( KopeteMetaContactLVI *kc = dynamic_cast( lvi ) ) { @@ -161,7 +161,7 @@ void KopeteGroupViewItem::refreshDisplayName() d->name->setText( m_group->displayName() ); d->count->setText( i18n( "(NUMBER OF ONLINE CONTACTS/NUMBER OF CONTACTS IN GROUP)", "(%1/%2)" ) - .arg( QString::number( onlineMemberCount ), QString::number( totalMemberCount ) ) ); + .arg( TQString::number( onlineMemberCount ), TQString::number( totalMemberCount ) ) ); updateVisibility(); @@ -175,7 +175,7 @@ void KopeteGroupViewItem::refreshDisplayName() listView()->sort(); } -QString KopeteGroupViewItem::key( int, bool ) const +TQString KopeteGroupViewItem::key( int, bool ) const { //Groups are placed after topLevel contact. //Exepted Temporary group which is the first group @@ -223,7 +223,7 @@ void KopeteGroupViewItem::updateVisibility() // When calling setVisible(true) EVERY child item will be shown, // even if they should be hidden. // We just re-update the visibility of all child items - for ( QListViewItem *lvi = firstChild(); lvi; lvi = lvi->nextSibling() ) + for ( TQListViewItem *lvi = firstChild(); lvi; lvi = lvi->nextSibling() ) { if ( KopeteMetaContactLVI *kmc = dynamic_cast( lvi ) ) kmc->updateVisibility(); @@ -255,7 +255,7 @@ void KopeteGroupViewItem::updateIcon() } } -QString KopeteGroupViewItem::text( int column ) const +TQString KopeteGroupViewItem::text( int column ) const { if ( column == 0 ) return d->name->text(); @@ -263,7 +263,7 @@ QString KopeteGroupViewItem::text( int column ) const return KListViewItem::text( column ); } -void KopeteGroupViewItem::setText( int column, const QString &text ) +void KopeteGroupViewItem::setText( int column, const TQString &text ) { if ( column == 0 ) { diff --git a/kopete/kopete/contactlist/kopetegroupviewitem.h b/kopete/kopete/contactlist/kopetegroupviewitem.h index 777ea2e8..8891f992 100644 --- a/kopete/kopete/contactlist/kopetegroupviewitem.h +++ b/kopete/kopete/contactlist/kopetegroupviewitem.h @@ -19,7 +19,7 @@ #define KOPETEGROUPVIEWITEM_H #include "kopetelistviewitem.h" -#include +#include #define KOPETE_GROUP_DEFAULT_OPEN_ICON "folder_open" #define KOPETE_GROUP_DEFAULT_CLOSED_ICON "folder" @@ -36,8 +36,8 @@ class KopeteGroupViewItem : public Kopete::UI::ListView::Item { Q_OBJECT public: - KopeteGroupViewItem( Kopete::Group *group , QListView *parent, const char *name = 0 ); - KopeteGroupViewItem( Kopete::Group *group , QListViewItem *parent, const char *name = 0 ); + KopeteGroupViewItem( Kopete::Group *group , TQListView *parent, const char *name = 0 ); + KopeteGroupViewItem( Kopete::Group *group , TQListViewItem *parent, const char *name = 0 ); ~KopeteGroupViewItem(); Kopete::Group * group() const; @@ -47,10 +47,10 @@ public: /** * reimplemented from KListViewItem to take into account our alternate text storage */ - virtual QString text( int column ) const; - virtual void setText( int column, const QString &text ); + virtual TQString text( int column ) const; + virtual void setText( int column, const TQString &text ); - QString toolTip() const; + TQString toolTip() const; public slots: void refreshDisplayName(); @@ -65,9 +65,9 @@ private: void initLVI(); Kopete::Group *m_group; - QPixmap open, closed; + TQPixmap open, closed; - QString key( int column, bool ascending ) const; + TQString key( int column, bool ascending ) const; unsigned int onlineMemberCount; unsigned int totalMemberCount; diff --git a/kopete/kopete/contactlist/kopetelviprops.cpp b/kopete/kopete/contactlist/kopetelviprops.cpp index bf5431bf..1867dea5 100644 --- a/kopete/kopete/contactlist/kopetelviprops.cpp +++ b/kopete/kopete/contactlist/kopetelviprops.cpp @@ -23,14 +23,14 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -65,7 +65,7 @@ const char MC_AW[] = "metacontact_away"; const char MC_UNK[] = "metacontact_unknown"; -KopeteGVIProps::KopeteGVIProps(KopeteGroupViewItem *gvi, QWidget *parent, const char *name) +KopeteGVIProps::KopeteGVIProps(KopeteGroupViewItem *gvi, TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Properties of Group %1").arg(gvi->group()->displayName()), Ok|Cancel, Ok, false) { mainWidget = new KopeteGVIPropsWidget(this, "mainWidget"); @@ -83,22 +83,22 @@ KopeteGVIProps::KopeteGVIProps(KopeteGroupViewItem *gvi, QWidget *parent, const mainWidget->chkUseCustomIcons->setChecked( item->group()->useCustomIcon() ); - QString openName = item->group()->icon( Kopete::ContactListElement::Open ); + TQString openName = item->group()->icon( Kopete::ContactListElement::Open ); if(openName.isEmpty()) openName = KOPETE_GROUP_DEFAULT_OPEN_ICON; - QString closeName = item->group()->icon( Kopete::ContactListElement::Closed ); + TQString closeName = item->group()->icon( Kopete::ContactListElement::Closed ); if(closeName.isEmpty()) closeName = KOPETE_GROUP_DEFAULT_CLOSED_ICON; mainWidget->icnbOpen->setIcon( openName ); mainWidget->icnbClosed->setIcon( closeName ); - connect( this, SIGNAL(okClicked()), this, SLOT( slotOkClicked() ) ); - connect( mainWidget->chkUseCustomIcons, SIGNAL( toggled( bool ) ), - this, SLOT( slotUseCustomIconsToggled( bool ) ) ); - connect( mainWidget->icnbOpen, SIGNAL( iconChanged( QString ) ), - SLOT( slotIconChanged() ) ); - connect( mainWidget->icnbClosed, SIGNAL( iconChanged( QString ) ), - SLOT( slotIconChanged() ) ); + connect( this, TQT_SIGNAL(okClicked()), this, TQT_SLOT( slotOkClicked() ) ); + connect( mainWidget->chkUseCustomIcons, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( slotUseCustomIconsToggled( bool ) ) ); + connect( mainWidget->icnbOpen, TQT_SIGNAL( iconChanged( TQString ) ), + TQT_SLOT( slotIconChanged() ) ); + connect( mainWidget->icnbClosed, TQT_SIGNAL( iconChanged( TQString ) ), + TQT_SLOT( slotIconChanged() ) ); slotUseCustomIconsToggled( mainWidget->chkUseCustomIcons->isChecked() ); } @@ -145,7 +145,7 @@ void KopeteGVIProps::slotIconChanged() // ============================================================================= -KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, QWidget *parent, const char *name) +KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Properties of Meta Contact %1").arg(lvi->metaContact()->displayName()), Ok|Cancel, Ok, false) { m_countPhotoCapable = 0; @@ -158,10 +158,10 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, QWidget *paren mNotificationProps = new CustomNotificationProps( this, lvi->metaContact() ); // add a button to the notification props to get the sound from KABC // the widget's vert box layout, horiz box layout containing button, spacer, followed by a spacer - QBoxLayout * vb = static_cast( mNotificationProps->widget()->layout() ); + TQBoxLayout * vb = static_cast( mNotificationProps->widget()->layout() ); - QHBoxLayout* hb = new QHBoxLayout( vb, -1, "soundFromKABClayout" ); - mFromKABC = new QPushButton( i18n( "Sync KABC..." ), mNotificationProps->widget(), "getSoundFromKABC" ); + TQHBoxLayout* hb = new TQHBoxLayout( vb, -1, "soundFromKABClayout" ); + mFromKABC = new TQPushButton( i18n( "Sync KABC..." ), mNotificationProps->widget(), "getSoundFromKABC" ); hb->addWidget( mFromKABC ); // [ [Button] <-xxxxx-> ] hb->addStretch(); vb->addStretch(); // vert spacer keeps the rest snug @@ -170,36 +170,36 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, QWidget *paren setMainWidget( mainWidget ); item = lvi; - connect( mainWidget->radioNameKABC, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( mainWidget->radioNameContact, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( mainWidget->radioNameCustom, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( mainWidget->radioPhotoKABC, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( mainWidget->radioPhotoContact, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( mainWidget->radioPhotoCustom, SIGNAL(toggled(bool)), SLOT(slotEnableAndDisableWidgets())); - connect( mainWidget->cmbPhotoUrl, SIGNAL(urlSelected(const QString &)), SLOT(slotEnableAndDisableWidgets())); - connect( mainWidget->cmbAccountPhoto, SIGNAL(activated ( int )), SLOT(slotEnableAndDisableWidgets())); + connect( mainWidget->radioNameKABC, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets())); + connect( mainWidget->radioNameContact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets())); + connect( mainWidget->radioNameCustom, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets())); + connect( mainWidget->radioPhotoKABC, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets())); + connect( mainWidget->radioPhotoContact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets())); + connect( mainWidget->radioPhotoCustom, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotEnableAndDisableWidgets())); + connect( mainWidget->cmbPhotoUrl, TQT_SIGNAL(urlSelected(const TQString &)), TQT_SLOT(slotEnableAndDisableWidgets())); + connect( mainWidget->cmbAccountPhoto, TQT_SIGNAL(activated ( int )), TQT_SLOT(slotEnableAndDisableWidgets())); - mainWidget->btnClearPhoto->setIconSet( SmallIconSet( QApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) ); - connect( mainWidget->btnClearPhoto, SIGNAL( clicked() ), this, SLOT( slotClearPhotoClicked() ) ); - connect( mainWidget->widAddresseeLink, SIGNAL( addresseeChanged( const KABC::Addressee & ) ), SLOT( slotAddresseeChanged( const KABC::Addressee & ) ) ); + mainWidget->btnClearPhoto->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? "locationbar_erase" : "clear_left" ) ); + connect( mainWidget->btnClearPhoto, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotClearPhotoClicked() ) ); + connect( mainWidget->widAddresseeLink, TQT_SIGNAL( addresseeChanged( const KABC::Addressee & ) ), TQT_SLOT( slotAddresseeChanged( const KABC::Addressee & ) ) ); mainWidget->chkUseCustomIcons->setChecked( item->metaContact()->useCustomIcon() ); - QString offlineName = item->metaContact()->icon( Kopete::ContactListElement::Offline ); + TQString offlineName = item->metaContact()->icon( Kopete::ContactListElement::Offline ); if(offlineName.isEmpty()) - offlineName = QString::fromLatin1(MC_OFF); // Default + offlineName = TQString::fromLatin1(MC_OFF); // Default - QString onlineName = item->metaContact()->icon( Kopete::ContactListElement::Online ); + TQString onlineName = item->metaContact()->icon( Kopete::ContactListElement::Online ); if(onlineName.isEmpty()) - onlineName = QString::fromLatin1(MC_ON); // Default + onlineName = TQString::fromLatin1(MC_ON); // Default - QString awayName = item->metaContact()->icon( Kopete::ContactListElement::Away ); + TQString awayName = item->metaContact()->icon( Kopete::ContactListElement::Away ); if(awayName.isEmpty()) - awayName = QString::fromLatin1(MC_AW); // Default + awayName = TQString::fromLatin1(MC_AW); // Default - QString unknownName = item->metaContact()->icon( Kopete::ContactListElement::Unknown ); + TQString unknownName = item->metaContact()->icon( Kopete::ContactListElement::Unknown ); if(unknownName.isEmpty()) - unknownName = QString::fromLatin1(MC_UNK); // Default + unknownName = TQString::fromLatin1(MC_UNK); // Default mainWidget->icnbOffline->setIcon( offlineName ); mainWidget->icnbOnline->setIcon( onlineName ); @@ -232,17 +232,17 @@ KopeteMetaLVIProps::KopeteMetaLVIProps(KopeteMetaContactLVI *lvi, QWidget *paren slotLoadNameSources(); slotLoadPhotoSources(); - connect( this, SIGNAL(okClicked()), this, SLOT( slotOkClicked() ) ); - connect( mainWidget->chkUseCustomIcons, SIGNAL( toggled( bool ) ), - this, SLOT( slotUseCustomIconsToggled( bool ) ) ); - connect( mainWidget->btnImportKABC, SIGNAL( clicked() ), - this, SLOT( slotImportClicked() ) ); - connect( mainWidget->btnExportKABC, SIGNAL( clicked() ), - this, SLOT( slotExportClicked() ) ); - connect( mFromKABC, SIGNAL( clicked() ), - this, SLOT( slotFromKABCClicked() ) ); - connect( mNotificationProps->widget()->customSound, SIGNAL( openFileDialog( KURLRequester * )), - SLOT( slotOpenSoundDialog( KURLRequester * ))); + connect( this, TQT_SIGNAL(okClicked()), this, TQT_SLOT( slotOkClicked() ) ); + connect( mainWidget->chkUseCustomIcons, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( slotUseCustomIconsToggled( bool ) ) ); + connect( mainWidget->btnImportKABC, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotImportClicked() ) ); + connect( mainWidget->btnExportKABC, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotExportClicked() ) ); + connect( mFromKABC, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotFromKABCClicked() ) ); + connect( mNotificationProps->widget()->customSound, TQT_SIGNAL( openFileDialog( KURLRequester * )), + TQT_SLOT( slotOpenSoundDialog( KURLRequester * ))); slotUseCustomIconsToggled( mainWidget->chkUseCustomIcons->isChecked() ); slotEnableAndDisableWidgets(); @@ -256,13 +256,13 @@ KopeteMetaLVIProps::~KopeteMetaLVIProps() void KopeteMetaLVIProps::slotLoadNameSources() { Kopete::Contact* trackingName = item->metaContact()->displayNameSourceContact(); - QPtrList< Kopete::Contact > cList = item->metaContact()->contacts(); - QPtrListIterator it( cList ); + TQPtrList< Kopete::Contact > cList = item->metaContact()->contacts(); + TQPtrListIterator it( cList ); mainWidget->cmbAccountName->clear(); for( ; it.current(); ++it ) { - QString acct = it.current()->property( Kopete::Global::Properties::self()->nickName() ).value().toString() + " <" + it.current()->contactId() + ">"; - QPixmap acctIcon = it.current()->account()->accountIcon(); + TQString acct = it.current()->property( Kopete::Global::Properties::self()->nickName() ).value().toString() + " <" + it.current()->contactId() + ">"; + TQPixmap acctIcon = it.current()->account()->accountIcon(); mainWidget->cmbAccountName->insertItem( acctIcon, acct ); // Select this item if it's the one we're tracking. @@ -285,18 +285,18 @@ void KopeteMetaLVIProps::slotLoadNameSources() void KopeteMetaLVIProps::slotLoadPhotoSources() { // fill photo contact sources - QPtrList< Kopete::Contact > cList = item->metaContact()->contacts(); + TQPtrList< Kopete::Contact > cList = item->metaContact()->contacts(); m_withPhotoContacts.clear(); Kopete::Contact* trackingPhoto = item->metaContact()->photoSourceContact(); mainWidget->cmbAccountPhoto->clear(); - QPtrListIterator itp( cList ); + TQPtrListIterator itp( cList ); for( ; itp.current(); ++itp ) { Kopete::Contact *citem = itp.current(); if ( citem->hasProperty( Kopete::Global::Properties::self()->photo().key() ) ) { - QString acct = citem->property( Kopete::Global::Properties::self()->nickName() ).value().toString() + " <" + citem->contactId() + ">"; - QPixmap acctIcon = citem->account()->accountIcon(); + TQString acct = citem->property( Kopete::Global::Properties::self()->nickName() ).value().toString() + " <" + citem->contactId() + ">"; + TQPixmap acctIcon = citem->account()->accountIcon(); mainWidget->cmbAccountPhoto->insertItem( acctIcon, acct ); // Select this item if it's the one we're tracking. @@ -358,7 +358,7 @@ void KopeteMetaLVIProps::slotEnableAndDisableWidgets() mainWidget->cmbAccountPhoto->setEnabled(false); } - QImage photo; + TQImage photo; switch ( selectedPhotoSource() ) { case Kopete::MetaContact::SourceKABC: @@ -368,13 +368,13 @@ void KopeteMetaLVIProps::slotEnableAndDisableWidgets() photo = Kopete::photoFromContact(selectedPhotoSourceContact()); break; case Kopete::MetaContact::SourceCustom: - photo = QImage(KURL::decode_string(mainWidget->cmbPhotoUrl->url())); + photo = TQImage(KURL::decode_string(mainWidget->cmbPhotoUrl->url())); break; } if( !photo.isNull() ) - mainWidget->photoLabel->setPixmap(QPixmap(photo.smoothScale( 64, 92, QImage::ScaleMin ))); + mainWidget->photoLabel->setPixmap(TQPixmap(photo.smoothScale( 64, 92, TQImage::ScaleMin ))); else - mainWidget->photoLabel->setPixmap( QPixmap() ); + mainWidget->photoLabel->setPixmap( TQPixmap() ); } Kopete::MetaContact::PropertySource KopeteMetaLVIProps::selectedNameSource() const @@ -489,7 +489,7 @@ void KopeteMetaLVIProps::slotAddresseeChanged( const KABC::Addressee & a ) { mainWidget->btnExportKABC->setEnabled( false ); mainWidget->btnImportKABC->setEnabled( false ); - mAddressBookUid = QString::null; + mAddressBookUid = TQString::null; mainWidget->radioNameContact->setChecked( true ); mainWidget->radioPhotoContact->setChecked( true ); } @@ -501,7 +501,7 @@ void KopeteMetaLVIProps::slotExportClicked() item->metaContact()->setMetaContactId( mAddressBookUid ); delete mExport; mExport = new KopeteAddressBookExport( this, item->metaContact() ); - if ( mExport->showDialog() == QDialog::Accepted ) + if ( mExport->showDialog() == TQDialog::Accepted ) mExport->exportData(); } @@ -523,26 +523,26 @@ void KopeteMetaLVIProps::slotOpenSoundDialog( KURLRequester *requester ) { // taken from kdelibs/kio/kfile/knotifydialog.cpp // only need to init this once - requester->disconnect( SIGNAL( openFileDialog( KURLRequester * )), - this, SLOT( slotOpenSoundDialog( KURLRequester * ))); + requester->disconnect( TQT_SIGNAL( openFileDialog( KURLRequester * )), + this, TQT_SLOT( slotOpenSoundDialog( KURLRequester * ))); KFileDialog *fileDialog = requester->fileDialog(); //fileDialog->setCaption( i18n("Select Sound File") ); - QStringList filters; + TQStringList filters; filters << "audio/x-wav" << "audio/x-mp3" << "application/ogg" << "audio/x-adpcm"; fileDialog->setMimeFilter( filters ); // find the first "sound"-resource that contains files - QStringList soundDirs = + TQStringList soundDirs = KGlobal::dirs()->findDirs("data", "kopete/sounds"); soundDirs += KGlobal::dirs()->resourceDirs( "sound" ); if ( !soundDirs.isEmpty() ) { KURL soundURL; - QDir dir; - dir.setFilter( QDir::Files | QDir::Readable ); - QStringList::ConstIterator it = soundDirs.begin(); + TQDir dir; + dir.setFilter( TQDir::Files | TQDir::Readable ); + TQStringList::ConstIterator it = soundDirs.begin(); while ( it != soundDirs.end() ) { dir = *it; if ( dir.isReadable() && dir.count() > 2 ) { @@ -560,7 +560,7 @@ void KopeteMetaLVIProps::slotClearPhotoClicked() #if KDE_IS_VERSION(3,4,0) mainWidget->cmbPhotoUrl->setKURL( KURL() ); #else - mainWidget->cmbPhotoUrl->setURL( QString::null ); + mainWidget->cmbPhotoUrl->setURL( TQString::null ); #endif item->metaContact()->setPhoto( KURL() ); diff --git a/kopete/kopete/contactlist/kopetelviprops.h b/kopete/kopete/contactlist/kopetelviprops.h index 9a2ebf34..de28e4b5 100644 --- a/kopete/kopete/contactlist/kopetelviprops.h +++ b/kopete/kopete/contactlist/kopetelviprops.h @@ -45,7 +45,7 @@ class KopeteGVIProps: public KDialogBase Q_OBJECT public: - KopeteGVIProps(KopeteGroupViewItem *gvi, QWidget *parent, const char *name=0L); + KopeteGVIProps(KopeteGroupViewItem *gvi, TQWidget *parent, const char *name=0L); ~KopeteGVIProps(); private: @@ -66,20 +66,20 @@ class KopeteMetaLVIProps: public KDialogBase Q_OBJECT public: - KopeteMetaLVIProps(KopeteMetaContactLVI *gvi, QWidget *parent, const char *name=0L); + KopeteMetaLVIProps(KopeteMetaContactLVI *gvi, TQWidget *parent, const char *name=0L); ~KopeteMetaLVIProps(); private: CustomNotificationProps * mNotificationProps; - QPushButton *mFromKABC; + TQPushButton *mFromKABC; KopeteMetaLVIPropsWidget *mainWidget; AddressBookLinkWidget *linkWidget; KopeteMetaContactLVI *item; KopeteAddressBookExport *mExport; KABC::Sound mSound; int m_countPhotoCapable; - QMap m_withPhotoContacts; - QString mAddressBookUid; // the currently selected addressbook UID + TQMap m_withPhotoContacts; + TQString mAddressBookUid; // the currently selected addressbook UID Kopete::MetaContact::PropertySource selectedNameSource() const; Kopete::MetaContact::PropertySource selectedPhotoSource() const; diff --git a/kopete/kopete/contactlist/kopetemetacontactlvi.cpp b/kopete/kopete/contactlist/kopetemetacontactlvi.cpp index 86dc4b40..b336a6cd 100644 --- a/kopete/kopete/contactlist/kopetemetacontactlvi.cpp +++ b/kopete/kopete/contactlist/kopetemetacontactlvi.cpp @@ -18,11 +18,11 @@ ************************************************************************* */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "knotification.h" #include @@ -78,27 +78,27 @@ public: : metaContact( mc ) { } - QString operator()( ComponentBase *, const QPoint &, QRect & ) + TQString operator()( ComponentBase *, const TQPoint &, TQRect & ) { // We begin with the meta contact display name at the top of the tooltip - QString toolTip = QString::fromLatin1("
    "); + TQString toolTip = TQString::fromLatin1("
    "); - toolTip += QString::fromLatin1("
    "); + toolTip += TQString::fromLatin1("
    "); if ( ! metaContact->photo().isNull() ) { - QString photoName = QString::fromLatin1("kopete-metacontact-photo:%1").arg( KURL::encode_string( metaContact->metaContactId() )); - //QMimeSourceFactory::defaultFactory()->setImage( "contactimg", metaContact->photo() ); - toolTip += QString::fromLatin1("").arg( photoName ); + TQString photoName = TQString::fromLatin1("kopete-metacontact-photo:%1").arg( KURL::encode_string( metaContact->metaContactId() )); + //TQMimeSourceFactory::defaultFactory()->setImage( "contactimg", metaContact->photo() ); + toolTip += TQString::fromLatin1("").arg( photoName ); } - toolTip += QString::fromLatin1(""); + toolTip += TQString::fromLatin1(""); - QString displayName; + TQString displayName; Kopete::Emoticons *e = Kopete::Emoticons::self(); - QValueList t = e->tokenize( metaContact->displayName()); - QValueList::iterator it; + TQValueList t = e->tokenize( metaContact->displayName()); + TQValueList::iterator it; for( it = t.begin(); it != t.end(); ++it ) { if( (*it).type == Kopete::Emoticons::Image ) @@ -106,25 +106,25 @@ public: displayName += (*it).picHTMLCode; } else if( (*it).type == Kopete::Emoticons::Text ) { - displayName += QStyleSheet::escape( (*it).text ); + displayName += TQStyleSheet::escape( (*it).text ); } } - toolTip += QString::fromLatin1("%1

    ").arg( displayName ); + toolTip += TQString::fromLatin1("%1

    ").arg( displayName ); - QPtrList contacts = metaContact->contacts(); + TQPtrList contacts = metaContact->contacts(); if ( contacts.count() == 1 ) { - return toolTip + contacts.first()->toolTip() + QString::fromLatin1("
    "); + return toolTip + contacts.first()->toolTip() + TQString::fromLatin1(""); } - toolTip += QString::fromLatin1(""); + toolTip += TQString::fromLatin1("
    "); // We are over a metacontact with > 1 child contacts, and not over a specific contact // Iterate through children and display a summary tooltip for(Contact *c = contacts.first(); c; c = contacts.next()) { - QString iconName = QString::fromLatin1("kopete-contact-icon:%1:%2:%3") + TQString iconName = TQString::fromLatin1("kopete-contact-icon:%1:%2:%3") .arg( KURL::encode_string( c->protocol()->pluginId() ), KURL::encode_string( c->account()->accountId() ), KURL::encode_string( c->contactId() ) @@ -135,7 +135,7 @@ public: .arg( iconName, Kopete::Emoticons::parseEmoticons(c->property(Kopete::Global::Properties::self()->nickName()).value().toString()) , c->contactId(), c->onlineStatus().description() ); } - return toolTip + QString::fromLatin1("
    "); + return toolTip + TQString::fromLatin1(""); } private: MetaContact *metaContact; @@ -163,12 +163,12 @@ public: int currentMode; int currentIconMode; - QPtrList events; + TQPtrList events; }; KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, KopeteGroupViewItem *parent ) : ListView::Item( parent, contact, "MetaContactLVI" ) -//: QObject( contact, "MetaContactLVI" ), KListViewItem( parent ) +//: TQObject( contact, "MetaContactLVI" ), KListViewItem( parent ) { m_metaContact = contact; m_isTopLevel = false; @@ -179,9 +179,9 @@ KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, Kopete parent->refreshDisplayName(); } -KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, QListViewItem *parent ) +KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, TQListViewItem *parent ) : ListView::Item( parent, contact, "MetaContactLVI" ) -//: QObject( contact, "MetaContactLVI" ), KListViewItem( parent ) +//: TQObject( contact, "MetaContactLVI" ), KListViewItem( parent ) { m_metaContact = contact; @@ -192,9 +192,9 @@ KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, QListV initLVI(); } -KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, QListView *parent ) +KopeteMetaContactLVI::KopeteMetaContactLVI( Kopete::MetaContact *contact, TQListView *parent ) : ListView::Item( parent, contact, "MetaContactLVI" ) -//: QObject( contact, "MetaContactLVI" ), KListViewItem( parent ) +//: TQObject( contact, "MetaContactLVI" ), KListViewItem( parent ) { m_metaContact = contact; @@ -213,47 +213,47 @@ void KopeteMetaContactLVI::initLVI() m_oldStatus = m_metaContact->status(); - connect( m_metaContact, SIGNAL( displayNameChanged( const QString &, const QString & ) ), - SLOT( slotDisplayNameChanged() ) ); + connect( m_metaContact, TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), + TQT_SLOT( slotDisplayNameChanged() ) ); - connect( m_metaContact, SIGNAL( photoChanged() ), - SLOT( slotPhotoChanged() ) ); + connect( m_metaContact, TQT_SIGNAL( photoChanged() ), + TQT_SLOT( slotPhotoChanged() ) ); - connect( m_metaContact, SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), - SLOT( slotPhotoChanged() ) ); + connect( m_metaContact, TQT_SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), + TQT_SLOT( slotPhotoChanged() ) ); - connect( m_metaContact, SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), - this, SLOT(slotIdleStateChanged( ) ) ); + connect( m_metaContact, TQT_SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), + this, TQT_SLOT(slotIdleStateChanged( ) ) ); - connect( m_metaContact, SIGNAL( contactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & ) ), - SLOT( slotContactStatusChanged( Kopete::Contact * ) ) ); + connect( m_metaContact, TQT_SIGNAL( contactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus & ) ), + TQT_SLOT( slotContactStatusChanged( Kopete::Contact * ) ) ); - connect( m_metaContact, SIGNAL( contactAdded( Kopete::Contact * ) ), - SLOT( slotContactAdded( Kopete::Contact * ) ) ); + connect( m_metaContact, TQT_SIGNAL( contactAdded( Kopete::Contact * ) ), + TQT_SLOT( slotContactAdded( Kopete::Contact * ) ) ); - connect( m_metaContact, SIGNAL( contactRemoved( Kopete::Contact * ) ), - SLOT( slotContactRemoved( Kopete::Contact * ) ) ); + connect( m_metaContact, TQT_SIGNAL( contactRemoved( Kopete::Contact * ) ), + TQT_SLOT( slotContactRemoved( Kopete::Contact * ) ) ); - connect( m_metaContact, SIGNAL( iconAppearanceChanged() ), - SLOT( slotUpdateMetaContact() ) ); + connect( m_metaContact, TQT_SIGNAL( iconAppearanceChanged() ), + TQT_SLOT( slotUpdateMetaContact() ) ); - connect( m_metaContact, SIGNAL( useCustomIconChanged( bool ) ), - SLOT( slotUpdateMetaContact() ) ); + connect( m_metaContact, TQT_SIGNAL( useCustomIconChanged( bool ) ), + TQT_SLOT( slotUpdateMetaContact() ) ); - connect( m_metaContact, SIGNAL( contactIdleStateChanged( Kopete::Contact * ) ), - SLOT( slotIdleStateChanged( Kopete::Contact * ) ) ); + connect( m_metaContact, TQT_SIGNAL( contactIdleStateChanged( Kopete::Contact * ) ), + TQT_SLOT( slotIdleStateChanged( Kopete::Contact * ) ) ); - connect( KopetePrefs::prefs(), SIGNAL( contactListAppearanceChanged() ), - SLOT( slotConfigChanged() ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL( contactListAppearanceChanged() ), + TQT_SLOT( slotConfigChanged() ) ); - connect( kapp, SIGNAL( appearanceChanged() ), SLOT( slotConfigChanged() ) ); + connect( kapp, TQT_SIGNAL( appearanceChanged() ), TQT_SLOT( slotConfigChanged() ) ); - mBlinkTimer = new QTimer( this, "mBlinkTimer" ); - connect( mBlinkTimer, SIGNAL( timeout() ), SLOT( slotBlink() ) ); + mBlinkTimer = new TQTimer( this, "mBlinkTimer" ); + connect( mBlinkTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotBlink() ) ); mIsBlinkIcon = false; //if ( !mBlinkIcon ) - // mBlinkIcon = new QPixmap( KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "newmsg" ), KIcon::Small ) ); + // mBlinkIcon = new TQPixmap( KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "newmsg" ), KIcon::Small ) ); slotConfigChanged(); // this calls slotIdleStateChanged(), which sets up the constituent components, spacing, fonts and indirectly, the contact icon slotDisplayNameChanged(); @@ -301,9 +301,9 @@ void KopeteMetaContactLVI::movedToDifferentGroup() } } -void KopeteMetaContactLVI::rename( const QString& newName ) +void KopeteMetaContactLVI::rename( const TQString& newName ) { - QString oldName = m_metaContact->displayName(); + TQString oldName = m_metaContact->displayName(); KopeteContactListView *lv = dynamic_cast( listView() ); if ( lv ) { @@ -380,9 +380,9 @@ void KopeteMetaContactLVI::slotContactStatusChanged( Kopete::Contact *c ) { //int winId = KopeteSystemTray::systemTray() ? KopeteSystemTray::systemTray()->winId() : 0; - QString text = i18n( "%1 is now %2." ) - .arg( Kopete::Emoticons::parseEmoticons( QStyleSheet::escape(m_metaContact->displayName()) ) , - QStyleSheet::escape(c->onlineStatus().description())); + TQString text = i18n( "%1 is now %2." ) + .arg( Kopete::Emoticons::parseEmoticons( TQStyleSheet::escape(m_metaContact->displayName()) ) , + TQStyleSheet::escape(c->onlineStatus().description())); // figure out what's happened enum ChangeType { noChange, noEvent, signedIn, changedStatus, signedOut }; @@ -438,11 +438,11 @@ void KopeteMetaContactLVI::slotContactStatusChanged( Kopete::Contact *c ) break; case signedIn: connect(KNotification::event(m_metaContact, "kopete_contact_online", text, m_metaContact->photo(), KopeteSystemTray::systemTray(), i18n( "Chat" )) , - SIGNAL(activated(unsigned int )) , this, SLOT( execute() ) ); + TQT_SIGNAL(activated(unsigned int )) , this, TQT_SLOT( execute() ) ); break; case changedStatus: connect(KNotification::event(m_metaContact, "kopete_contact_status_change", text, m_metaContact->photo(), KopeteSystemTray::systemTray(), i18n( "Chat" )) , - SIGNAL(activated(unsigned int )) , this, SLOT( execute() )); + TQT_SIGNAL(activated(unsigned int )) , this, TQT_SLOT( execute() )); break; case signedOut: KNotification::event(m_metaContact, "kopete_contact_offline", text, m_metaContact->photo(), KopeteSystemTray::systemTray()); @@ -463,7 +463,7 @@ void KopeteMetaContactLVI::slotContactStatusChanged( Kopete::Contact *c ) //So the olfStatusIcon will not be set to the real after the blink. //we set it now. if( !mBlinkTimer->isActive() ) - m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : QPixmap(); + m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : TQPixmap(); } // make a note of the current status for the next time we get a status change @@ -491,7 +491,7 @@ void KopeteMetaContactLVI::execute() const m_metaContact->execute(); //The selection is removed, but the contact still hihjlihted, remove the selection in the contactlist (see bug 106090) - Kopete::ContactList::self()->setSelectedItems( QPtrList() , QPtrList() ); + Kopete::ContactList::self()->setSelectedItems( TQPtrList() , TQPtrList() ); } void KopeteMetaContactLVI::slotDisplayNameChanged() @@ -513,14 +513,14 @@ void KopeteMetaContactLVI::slotPhotoChanged() if ( d->metaContactIcon && d->currentIconMode == KopetePrefs::PhotoPic ) { m_oldStatusIcon= d->metaContactIcon->pixmap(); - QPixmap photoPixmap; - //QPixmap defaultIcon( KGlobal::iconLoader()->loadIcon( "vcard", KIcon::Desktop ) ); - QImage photoImg = m_metaContact->photo(); + TQPixmap photoPixmap; + //TQPixmap defaultIcon( KGlobal::iconLoader()->loadIcon( "vcard", KIcon::Desktop ) ); + TQImage photoImg = m_metaContact->photo(); if ( !photoImg.isNull() && (photoImg.width() > 0) && (photoImg.height() > 0) ) { int photoSize = d->iconSize; - photoImg = photoImg.smoothScale( photoSize, photoSize, QImage::ScaleMin ); + photoImg = photoImg.smoothScale( photoSize, photoSize, TQImage::ScaleMin ); KImageEffect *effect = 0L; switch ( m_metaContact->status() ) @@ -640,7 +640,7 @@ void KopeteMetaContactLVI::slotAddToNewGroup() if ( m_metaContact->isTemporary() ) return; - QString groupName = KInputDialog::getText( + TQString groupName = KInputDialog::getText( i18n( "New Group" ), i18n( "Please enter the name for the new group:" ) ); if ( !groupName.isEmpty() ) @@ -668,7 +668,7 @@ void KopeteMetaContactLVI::slotConfigChanged() } else { - QFont font=listView()->font(); + TQFont font=listView()->font(); d->nameText->setFont( font ); if(d->extraText) { @@ -730,8 +730,8 @@ void KopeteMetaContactLVI::setDisplayMode( int mode, int iconmode ) new VSpacerComponent( imageBox ); if(!metaContact()->photoSource() && !Kopete::KABCPersistence::self()->addressBook()->findByUid( metaContact()->metaContactId() ).isEmpty() ) { //if the photo is the one of the kaddressbook, track every change in the adressbook, it might be the photo of our contact. - connect( Kopete::KABCPersistence::self()->addressBook() , SIGNAL(addressBookChanged (AddressBook *) ) , - this , SLOT(slotPhotoChanged())); + connect( Kopete::KABCPersistence::self()->addressBook() , TQT_SIGNAL(addressBookChanged (AddressBook *) ) , + this , TQT_SLOT(slotPhotoChanged())); } } else { d->metaContactIcon = new ImageComponent( hbox ); @@ -770,13 +770,13 @@ void KopeteMetaContactLVI::setDisplayMode( int mode, int iconmode ) slotIdleStateChanged( 0 ); // finally, re-add all contacts so their icons appear. remove them first for consistency. - QPtrList contacts = m_metaContact->contacts(); - for ( QPtrListIterator it( contacts ); it.current(); ++it ) + TQPtrList contacts = m_metaContact->contacts(); + for ( TQPtrListIterator it( contacts ); it.current(); ++it ) { slotContactRemoved( *it ); slotContactAdded( *it ); } - m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : QPixmap(); + m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : TQPixmap(); if( mBlinkTimer->isActive() ) m_originalBlinkIcon=m_oldStatusIcon; } @@ -792,11 +792,11 @@ void KopeteMetaContactLVI::updateVisibility() } void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact, - const QString &key, const QVariant &old, const QVariant &newVal ) + const TQString &key, const TQVariant &old, const TQVariant &newVal ) { -// if ( key == QString::fromLatin1("awayMessage") ) +// if ( key == TQString::fromLatin1("awayMessage") ) // kdDebug( 14000 ) << k_funcinfo << "contact=" << contact->contactId() << ", isonline=" << contact->isOnline() << ", alloffline=" << !m_metaContact->isOnline() << ", oldvalue=" << old.toString() << ", newvalue=" << newVal.toString() << endl; - if ( key == QString::fromLatin1("awayMessage") && d->extraText && old != newVal ) + if ( key == TQString::fromLatin1("awayMessage") && d->extraText && old != newVal ) { bool allOffline = !m_metaContact->isOnline(); if ( newVal.toString().isEmpty() || ( !contact->isOnline() && !allOffline ) ) @@ -805,11 +805,11 @@ void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact, // -new away message is empty or // -contact who set it is offline and there are contacts online in the metacontact bool allAwayMessagesEmpty = true; - QPtrList contacts = m_metaContact->contacts(); + TQPtrList contacts = m_metaContact->contacts(); for ( Kopete::Contact *c = contacts.first(); c; c = contacts.next() ) { // kdDebug( 14000 ) << k_funcinfo << "ccontact=" << c->contactId() << ", isonline=" << c->isOnline() << ", awaymsg=" << c->property( key ).value().toString() << endl; - QString awayMessage( c->property( key ).value().toString() ); + TQString awayMessage( c->property( key ).value().toString() ); if ( ( allOffline || c->isOnline() ) && !awayMessage.isEmpty() ) { // display this contact's away message when: @@ -821,7 +821,7 @@ void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact, } } if ( allAwayMessagesEmpty ) - d->extraText->setText( QString::null ); + d->extraText->setText( TQString::null ); } else { @@ -831,7 +831,7 @@ void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact, d->extraText->setText( newVal.toString() ); } } // wtf? KopeteMetaContact also connects this signals and emits photoChanged! why no connect photoChanged to slotPhotoChanged? - /*else if ( key == QString::fromLatin1("photo") && (m_metaContact->photoSourceContact() == contact) && (m_metaContact->photoSource() == Kopete::MetaContact::SourceContact)) + /*else if ( key == TQString::fromLatin1("photo") && (m_metaContact->photoSourceContact() == contact) && (m_metaContact->photoSource() == Kopete::MetaContact::SourceContact)) { slotPhotoChanged(); }*/ @@ -839,46 +839,46 @@ void KopeteMetaContactLVI::slotContactPropertyChanged( Kopete::Contact *contact, void KopeteMetaContactLVI::slotContactAdded( Kopete::Contact *c ) { - connect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, - const QVariant &, const QVariant & ) ), - this, SLOT( slotContactPropertyChanged( Kopete::Contact *, const QString &, - const QVariant &, const QVariant & ) ) ); - connect( c->account() , SIGNAL( colorChanged(const QColor& ) ) , this, SLOT( updateContactIcons() ) ); + connect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, + const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotContactPropertyChanged( Kopete::Contact *, const TQString &, + const TQVariant &, const TQVariant & ) ) ); + connect( c->account() , TQT_SIGNAL( colorChanged(const TQColor& ) ) , this, TQT_SLOT( updateContactIcons() ) ); updateContactIcon( c ); - slotContactPropertyChanged( c, QString::fromLatin1("awayMessage"), - QVariant(), c->property( QString::fromLatin1("awayMessage") ).value() ); + slotContactPropertyChanged( c, TQString::fromLatin1("awayMessage"), + TQVariant(), c->property( TQString::fromLatin1("awayMessage") ).value() ); } void KopeteMetaContactLVI::slotContactRemoved( Kopete::Contact *c ) { - disconnect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, - const QVariant &, const QVariant & ) ), - this, SLOT( slotContactPropertyChanged( Kopete::Contact *, - const QString &, const QVariant &, const QVariant & ) ) ); - disconnect( c->account() , SIGNAL( colorChanged(const QColor& ) ) , this, SLOT( updateContactIcons() ) ); + disconnect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, + const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotContactPropertyChanged( Kopete::Contact *, + const TQString &, const TQVariant &, const TQVariant & ) ) ); + disconnect( c->account() , TQT_SIGNAL( colorChanged(const TQColor& ) ) , this, TQT_SLOT( updateContactIcons() ) ); if ( ListView::Component *comp = contactComponent( c ) ) delete comp; - slotContactPropertyChanged( c, QString::fromLatin1("awayMessage"), - c->property( QString::fromLatin1("awayMessage") ).value(), QVariant() ); + slotContactPropertyChanged( c, TQString::fromLatin1("awayMessage"), + c->property( TQString::fromLatin1("awayMessage") ).value(), TQVariant() ); } void KopeteMetaContactLVI::updateContactIcons() { // show offline contacts setting may have changed - QPtrList contacts = m_metaContact->contacts(); - for ( QPtrListIterator it( contacts ); it.current(); ++it ) + TQPtrList contacts = m_metaContact->contacts(); + for ( TQPtrListIterator it( contacts ); it.current(); ++it ) updateContactIcon( *it ); } void KopeteMetaContactLVI::updateContactIcon( Kopete::Contact *c ) { - KGlobal::config()->setGroup( QString::fromLatin1("ContactList") ); + KGlobal::config()->setGroup( TQString::fromLatin1("ContactList") ); bool bHideOffline = KGlobal::config()->readBoolEntry( - QString::fromLatin1("HideOfflineContacts"), false ); + TQString::fromLatin1("HideOfflineContacts"), false ); if ( KopetePrefs::prefs()->showOffline() ) bHideOffline = false; @@ -892,7 +892,7 @@ void KopeteMetaContactLVI::updateContactIcon( Kopete::Contact *c ) comp->updatePixmap(); } -Kopete::Contact *KopeteMetaContactLVI::contactForPoint( const QPoint &p ) const +Kopete::Contact *KopeteMetaContactLVI::contactForPoint( const TQPoint &p ) const { if ( ListView::ContactComponent *comp = dynamic_cast( d->contactIconBox->componentAt( p ) ) ) return comp->contact(); @@ -912,11 +912,11 @@ ListView::ContactComponent *KopeteMetaContactLVI::contactComponent( const Kopete return 0; } -QRect KopeteMetaContactLVI::contactRect( const Kopete::Contact *c ) const +TQRect KopeteMetaContactLVI::contactRect( const Kopete::Contact *c ) const { if ( ListView::Component *comp = contactComponent( c ) ) return comp->rect(); - return QRect(); + return TQRect(); } Kopete::Group *KopeteMetaContactLVI::group() @@ -927,7 +927,7 @@ Kopete::Group *KopeteMetaContactLVI::group() return Kopete::Group::topLevel(); } -QString KopeteMetaContactLVI::key( int, bool ) const +TQString KopeteMetaContactLVI::key( int, bool ) const { char importanceChar; switch ( m_metaContact->status() ) @@ -988,10 +988,10 @@ void KopeteMetaContactLVI::slotIdleStateChanged( Kopete::Contact *c ) { m_oldStatusIcon=d->metaContactIcon->pixmap(); - QPixmap icon = SmallIcon( m_metaContact->statusIcon(), d->iconSize ); + TQPixmap icon = SmallIcon( m_metaContact->statusIcon(), d->iconSize ); if ( doWeHaveToGrayThatContact ) { - // TODO: QPixmapCache this result + // TODO: TQPixmapCache this result KIconEffect::semiTransparent( icon ); } @@ -1011,13 +1011,13 @@ void KopeteMetaContactLVI::catchEvent( Kopete::MessageEvent *event ) { d->events.append( event ); - connect( event, SIGNAL( done( Kopete::MessageEvent* ) ), - this, SLOT( slotEventDone( Kopete::MessageEvent * ) ) ); + connect( event, TQT_SIGNAL( done( Kopete::MessageEvent* ) ), + this, TQT_SLOT( slotEventDone( Kopete::MessageEvent * ) ) ); if ( mBlinkTimer->isActive() ) mBlinkTimer->stop(); - m_oldStatusIcon= d->metaContactIcon ? d->metaContactIcon->pixmap() : QPixmap(); + m_oldStatusIcon= d->metaContactIcon ? d->metaContactIcon->pixmap() : TQPixmap(); mBlinkTimer->start( 400, false ); @@ -1035,9 +1035,9 @@ void KopeteMetaContactLVI::slotBlink() if ( !haveEvent && m_blinkLeft <= 0 ) { mBlinkTimer->stop(); - m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : QPixmap(); + m_oldStatusIcon=d->metaContactIcon ? d->metaContactIcon->pixmap() : TQPixmap(); updateVisibility(); - m_originalBlinkIcon=QPixmap(); //i hope this help to reduce memory consuption + m_originalBlinkIcon=TQPixmap(); //i hope this help to reduce memory consuption } } else @@ -1076,12 +1076,12 @@ void KopeteMetaContactLVI::slotEventDone( Kopete::MessageEvent *event ) if(d->metaContactIcon) d->metaContactIcon->setPixmap( m_originalBlinkIcon ); - m_originalBlinkIcon=QPixmap(); //i hope this help to reduce memory consuption + m_originalBlinkIcon=TQPixmap(); //i hope this help to reduce memory consuption mIsBlinkIcon = false; } } -QString KopeteMetaContactLVI::text( int column ) const +TQString KopeteMetaContactLVI::text( int column ) const { if ( column == 0 ) return d->nameText->text(); @@ -1089,7 +1089,7 @@ QString KopeteMetaContactLVI::text( int column ) const return KListViewItem::text( column ); } -void KopeteMetaContactLVI::setText( int column, const QString &text ) +void KopeteMetaContactLVI::setText( int column, const TQString &text ) { if ( column == 0 ) rename( text ); diff --git a/kopete/kopete/contactlist/kopetemetacontactlvi.h b/kopete/kopete/contactlist/kopetemetacontactlvi.h index 767330ba..d795475f 100644 --- a/kopete/kopete/contactlist/kopetemetacontactlvi.h +++ b/kopete/kopete/contactlist/kopetemetacontactlvi.h @@ -23,9 +23,9 @@ #include "kopetelistviewitem.h" -#include -#include -#include +#include +#include +#include #include @@ -56,8 +56,8 @@ class KopeteMetaContactLVI : public Kopete::UI::ListView::Item public: KopeteMetaContactLVI( Kopete::MetaContact *contact, KopeteGroupViewItem *parent ); - KopeteMetaContactLVI( Kopete::MetaContact *contact, QListViewItem *parent ); - KopeteMetaContactLVI( Kopete::MetaContact *contact, QListView *parent ); + KopeteMetaContactLVI( Kopete::MetaContact *contact, TQListViewItem *parent ); + KopeteMetaContactLVI( Kopete::MetaContact *contact, TQListView *parent ); ~KopeteMetaContactLVI(); /** @@ -74,7 +74,7 @@ public: /** * parent when top-level */ - QListView *parentView() const { return m_parentView; }; + TQListView *parentView() const { return m_parentView; }; /** * parent when not top-level @@ -85,7 +85,7 @@ public: * call this when the item has been moved to a different group */ void movedToDifferentGroup(); - void rename( const QString& name ); + void rename( const TQString& name ); void startRename( int ); Kopete::Group *group(); @@ -97,28 +97,28 @@ public: * (This is used for e.g. the context-menu of a contact when * right-clicking an icon, or the tooltips) */ - Kopete::Contact *contactForPoint( const QPoint &p ) const; + Kopete::Contact *contactForPoint( const TQPoint &p ) const; /** - * Returns the QRect small little icon used for the Kopete::Contact. + * Returns the TQRect small little icon used for the Kopete::Contact. * The behavior is undefined if @param c doesn't point to a valid * Kopete::Contact for this list view item. - * The returned QRect is using the list view item's coordinate + * The returned TQRect is using the list view item's coordinate * system and should probably be transformed into the list view's * coordinates before being of any practical use. * Note that the returned Rect is always vertically stretched to fill * the full list view item's height, only the width is relative to * the actual icon width. */ - QRect contactRect( const Kopete::Contact *c ) const; + TQRect contactRect( const Kopete::Contact *c ) const; bool isGrouped() const; /** * reimplemented from KListViewItem to take into account our alternate text storage */ - virtual QString text( int column ) const; - virtual void setText( int column, const QString &text ); + virtual TQString text( int column ) const; + virtual void setText( int column, const TQString &text ); public slots: /** @@ -134,7 +134,7 @@ public slots: private slots: void slotUpdateMetaContact(); void slotContactStatusChanged( Kopete::Contact * ); - void slotContactPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ); + void slotContactPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ); void slotContactAdded( Kopete::Contact * ); void slotContactRemoved( Kopete::Contact * ); @@ -159,24 +159,24 @@ private: void initLVI(); void setDisplayMode( int mode, int iconMode ); void setMetaContactToolTipSourceForComponent( Kopete::UI::ListView::Component *comp ); - QString key( int column, bool ascending ) const; + TQString key( int column, bool ascending ) const; void updateContactIcon( Kopete::Contact * ); Kopete::UI::ListView::ContactComponent *contactComponent( const Kopete::Contact *c ) const; Kopete::MetaContact *m_metaContact; KopeteGroupViewItem *m_parentGroup; - QListView *m_parentView; + TQListView *m_parentView; bool m_isTopLevel; int m_pixelWide; Kopete::OnlineStatus m_oldStatus; - QPixmap m_oldStatusIcon; - QPixmap m_originalBlinkIcon; + TQPixmap m_oldStatusIcon; + TQPixmap m_originalBlinkIcon; - QTimer *mBlinkTimer; + TQTimer *mBlinkTimer; - QPtrDict m_addContactActions; + TQPtrDict m_addContactActions; bool mIsBlinkIcon; int m_blinkLeft; diff --git a/kopete/kopete/contactlist/kopetestatusgroupviewitem.cpp b/kopete/kopete/contactlist/kopetestatusgroupviewitem.cpp index 9dc910dd..6595e237 100644 --- a/kopete/kopete/contactlist/kopetestatusgroupviewitem.cpp +++ b/kopete/kopete/contactlist/kopetestatusgroupviewitem.cpp @@ -20,8 +20,8 @@ #include #include "kopetestatusgroupviewitem.h" -KopeteStatusGroupViewItem::KopeteStatusGroupViewItem( Kopete::OnlineStatus::StatusType status_ , QListView *parent, const char *name ) - : QListViewItem(parent,name) +KopeteStatusGroupViewItem::KopeteStatusGroupViewItem( Kopete::OnlineStatus::StatusType status_ , TQListView *parent, const char *name ) + : TQListViewItem(parent,name) { m_status = status_; } @@ -30,7 +30,7 @@ KopeteStatusGroupViewItem::~KopeteStatusGroupViewItem() { } -QString KopeteStatusGroupViewItem::key( int, bool ) const +TQString KopeteStatusGroupViewItem::key( int, bool ) const { switch (m_status) { diff --git a/kopete/kopete/contactlist/kopetestatusgroupviewitem.h b/kopete/kopete/contactlist/kopetestatusgroupviewitem.h index 8b1a930f..2f4f08b3 100644 --- a/kopete/kopete/contactlist/kopetestatusgroupviewitem.h +++ b/kopete/kopete/contactlist/kopetestatusgroupviewitem.h @@ -30,13 +30,13 @@ class KopeteStatusGroupViewItem : public QListViewItem { public: - KopeteStatusGroupViewItem( Kopete::OnlineStatus::StatusType status_ , QListView *parent, const char *name=0); + KopeteStatusGroupViewItem( Kopete::OnlineStatus::StatusType status_ , TQListView *parent, const char *name=0); ~KopeteStatusGroupViewItem(); private: Kopete::OnlineStatus::StatusType m_status; - QString key( int column, bool ascending ) const; + TQString key( int column, bool ascending ) const; }; diff --git a/kopete/kopete/kconf_update/kopete-account-kconf_update.cpp b/kopete/kopete/kconf_update/kopete-account-kconf_update.cpp index fe1c3351..5e35c9e2 100644 --- a/kopete/kopete/kconf_update/kopete-account-kconf_update.cpp +++ b/kopete/kopete/kconf_update/kopete-account-kconf_update.cpp @@ -17,41 +17,41 @@ ************************************************************************* */ -#include -#include -#include +#include +#include +#include -static QTextStream qcin ( stdin, IO_ReadOnly ); -static QTextStream qcout( stdout, IO_WriteOnly ); -static QTextStream qcerr( stderr, IO_WriteOnly ); +static TQTextStream qcin ( stdin, IO_ReadOnly ); +static TQTextStream qcout( stdout, IO_WriteOnly ); +static TQTextStream qcerr( stderr, IO_WriteOnly ); // Group cache. Yes, I know global vars are ugly :) bool needFlush = false; -QString accountId; -QString password; -QString autoConnect; -QString protocol; -QMap pluginData; +TQString accountId; +TQString password; +TQString autoConnect; +TQString protocol; +TQMap pluginData; // Global vars to hold separate IRC vars until we have read all of them -QString ircNick; -QString ircServer; -QString ircPort; +TQString ircNick; +TQString ircServer; +TQString ircPort; /* * Function for (en/de)crypting strings for config file, taken from KMail * Author: Stefan Taferner */ -QString cryptStr(const QString &aStr) +TQString cryptStr(const TQString &aStr) { - QString result; + TQString result; for (unsigned int i = 0; i < aStr.length(); i++) result += (aStr[i].unicode() < 0x20) ? aStr[i] : - QChar(0x1001F - aStr[i].unicode()); + TQChar(0x1001F - aStr[i].unicode()); return result; } -void parseGroup( const QString &group, const QString &rawLine ) +void parseGroup( const TQString &group, const TQString &rawLine ) { // Groups that are converted can almost certainly be removed entirely @@ -65,7 +65,7 @@ void parseGroup( const QString &group, const QString &rawLine ) else protocol = group + "Protocol"; - password = QString::null; + password = TQString::null; pluginData.clear(); needFlush = true; @@ -79,7 +79,7 @@ void parseGroup( const QString &group, const QString &rawLine ) } } -void parseKey( const QString &group, const QString &key, const QString &value, const QString &rawLine ) +void parseKey( const TQString &group, const TQString &key, const TQString &value, const TQString &rawLine ) { //qcerr << "*** group='" << group << "'" << endl; if ( group == "MSN" ) @@ -154,9 +154,9 @@ void parseKey( const QString &group, const QString &key, const QString &value, c !ircPort.isEmpty() ) { #if QT_VERSION < 0x030200 - accountId = QString::fromLatin1( "%1@%2:%3" ).arg( ircNick ).arg( ircServer ).arg( ircPort ); + accountId = TQString::fromLatin1( "%1@%2:%3" ).arg( ircNick ).arg( ircServer ).arg( ircPort ); #else - accountId = QString::fromLatin1( "%1@%2:%3" ).arg( ircNick, ircServer, ircPort ); + accountId = TQString::fromLatin1( "%1@%2:%3" ).arg( ircNick, ircServer, ircPort ); #endif } } @@ -165,7 +165,7 @@ void parseKey( const QString &group, const QString &key, const QString &value, c */ else if ( key == "Modules" ) { - QString newValue = value; + TQString newValue = value; newValue.replace ( ".plugin", ".desktop" ); qcout << "Plugins=" << newValue; } @@ -176,7 +176,7 @@ void parseKey( const QString &group, const QString &key, const QString &value, c } } -void flushData( const QString &group ) +void flushData( const TQString &group ) { qcout << "[Account_" << protocol << "_" << accountId << "]" << endl; @@ -190,7 +190,7 @@ void flushData( const QString &group ) qcout << "Password=" << cryptStr( password ) << endl; qcout << "AutoConnect=" << autoConnect << endl; - QMap::ConstIterator it; + TQMap::ConstIterator it; for ( it = pluginData.begin(); it != pluginData.end(); ++it ) qcout << "PluginData_" << protocol << "_" << it.key() << "=" << it.data() << endl; @@ -198,18 +198,18 @@ void flushData( const QString &group ) int main() { - qcin.setEncoding( QTextStream::UnicodeUTF8 ); - qcout.setEncoding( QTextStream::UnicodeUTF8 ); + qcin.setEncoding( TQTextStream::UnicodeUTF8 ); + qcout.setEncoding( TQTextStream::UnicodeUTF8 ); - QString curGroup; + TQString curGroup; - QRegExp groupRegExp( "^\\[(.*)\\]" ); - QRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" ); - QRegExp commentRegExp( "^(#.*)?$" ); + TQRegExp groupRegExp( "^\\[(.*)\\]" ); + TQRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" ); + TQRegExp commentRegExp( "^(#.*)?$" ); while ( !qcin.atEnd() ) { - QString line = qcin.readLine(); + TQString line = qcin.readLine(); if ( commentRegExp.exactMatch( line ) ) { diff --git a/kopete/kopete/kconf_update/kopete-nameTracking.cpp b/kopete/kopete/kconf_update/kopete-nameTracking.cpp index 391e5132..c0a556e7 100644 --- a/kopete/kopete/kconf_update/kopete-nameTracking.cpp +++ b/kopete/kopete/kconf_update/kopete-nameTracking.cpp @@ -14,60 +14,60 @@ ************************************************************************* */ -#include -#include -#include +#include +#include +#include #include -static QTextStream qcerr( stderr, IO_WriteOnly ); +static TQTextStream qcerr( stderr, IO_WriteOnly ); int main() { KInstance* inst = new KInstance( "Update script" ); - QString filename = locateLocal( "data", QString::fromLatin1( "kopete/contactlist.xml" ) ); + TQString filename = locateLocal( "data", TQString::fromLatin1( "kopete/contactlist.xml" ) ); // Load contact list & save backup. - QFile contactListFile( filename ); + TQFile contactListFile( filename ); contactListFile.open( IO_ReadOnly ); - QDomDocument contactList; + TQDomDocument contactList; contactList.setContent( &contactListFile ); contactListFile.close(); - QDir().rename( filename, filename + QString::fromLatin1( ".bak" ) ); + TQDir().rename( filename, filename + TQString::fromLatin1( ".bak" ) ); // parse the XML file - QDomElement list = contactList.documentElement(); - QDomElement mcElement = list.firstChild().toElement(); + TQDomElement list = contactList.documentElement(); + TQDomElement mcElement = list.firstChild().toElement(); while( !mcElement.isNull() ) { // update all the MetaContacts - if( mcElement.tagName() == QString::fromLatin1("meta-contact") ) + if( mcElement.tagName() == TQString::fromLatin1("meta-contact") ) { - QDomElement displayName; - QDomElement subcontact; + TQDomElement displayName; + TQDomElement subcontact; - QDomElement elem = mcElement.firstChild().toElement(); + TQDomElement elem = mcElement.firstChild().toElement(); while( !elem.isNull() ) { - if( elem.tagName() == QString::fromLatin1( "display-name" ) ) + if( elem.tagName() == TQString::fromLatin1( "display-name" ) ) displayName = elem; - if( elem.tagName() == QString::fromLatin1( "plugin-data" ) ) + if( elem.tagName() == TQString::fromLatin1( "plugin-data" ) ) { // check if it's a contact by checking for "protocol" substring in the tag, // and the presence of a contactId child element. - QString pluginId = elem.attribute( QString::fromLatin1( "plugin-id" ) ); + TQString pluginId = elem.attribute( TQString::fromLatin1( "plugin-id" ) ); bool isProtocol = ( pluginId.contains( "protocol", false ) > 0 ); // case-insensitive search bool hasContactId = false; - QDomNode field = elem.firstChild(); + TQDomNode field = elem.firstChild(); while( !field.isNull() ) { - QDomElement fieldElem = field.toElement(); + TQDomElement fieldElem = field.toElement(); if( !fieldElem.isNull() && - fieldElem.tagName() == QString::fromLatin1( "plugin-data-field" ) && - fieldElem.attribute( QString::fromLatin1( "key" ) ) == QString::fromLatin1( "contactId" ) ) + fieldElem.tagName() == TQString::fromLatin1( "plugin-data-field" ) && + fieldElem.attribute( TQString::fromLatin1( "key" ) ) == TQString::fromLatin1( "contactId" ) ) { hasContactId = true; break; @@ -85,35 +85,35 @@ int main() // check if we're even tracking the subcontact's name // if displayName.isNull(), it simply won't find the attribute; no harm done bool tracking = - ( displayName.attribute( QString::fromLatin1( "trackChildNameChanges" ), - QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) ); + ( displayName.attribute( TQString::fromLatin1( "trackChildNameChanges" ), + TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); if( !displayName.isNull() && !subcontact.isNull() && tracking ) { // collect info - QString nsCID; - QString nsPID; - QString nsAID; + TQString nsCID; + TQString nsPID; + TQString nsAID; - nsPID = subcontact.attribute( QString::fromLatin1( "plugin-id" ) ); - QDomNode field = subcontact.firstChild(); + nsPID = subcontact.attribute( TQString::fromLatin1( "plugin-id" ) ); + TQDomNode field = subcontact.firstChild(); while( !field.isNull() ) { - QDomElement fieldElem = field.toElement(); + TQDomElement fieldElem = field.toElement(); - if( !fieldElem.isNull() && fieldElem.tagName() == QString::fromLatin1( "plugin-data-field" ) ) + if( !fieldElem.isNull() && fieldElem.tagName() == TQString::fromLatin1( "plugin-data-field" ) ) { - if( fieldElem.attribute( QString::fromLatin1( "key" ) ) == QString::fromLatin1( "contactId" ) ) + if( fieldElem.attribute( TQString::fromLatin1( "key" ) ) == TQString::fromLatin1( "contactId" ) ) nsCID = fieldElem.text(); - if( fieldElem.attribute( QString::fromLatin1( "key" ) ) == QString::fromLatin1( "accountId" ) ) + if( fieldElem.attribute( TQString::fromLatin1( "key" ) ) == TQString::fromLatin1( "accountId" ) ) nsAID = fieldElem.text(); } field = field.nextSibling(); } // create the tracking info - displayName.setAttribute( QString::fromLatin1( "nameSourceContactId" ), nsCID ); - displayName.setAttribute( QString::fromLatin1( "nameSourcePluginId" ), nsPID ); - displayName.setAttribute( QString::fromLatin1( "nameSourceAccountId" ), nsAID ); + displayName.setAttribute( TQString::fromLatin1( "nameSourceContactId" ), nsCID ); + displayName.setAttribute( TQString::fromLatin1( "nameSourcePluginId" ), nsPID ); + displayName.setAttribute( TQString::fromLatin1( "nameSourceAccountId" ), nsAID ); } } @@ -122,8 +122,8 @@ int main() // Save converted contactlist contactListFile.open( IO_WriteOnly ); - QTextStream stream( &contactListFile ); - stream.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream stream( &contactListFile ); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); stream << contactList.toString( 4 ); contactListFile.flush(); contactListFile.close(); diff --git a/kopete/kopete/kconf_update/kopete-pluginloader2.cpp b/kopete/kopete/kconf_update/kopete-pluginloader2.cpp index af8daa69..d9b0fb39 100644 --- a/kopete/kopete/kconf_update/kopete-pluginloader2.cpp +++ b/kopete/kopete/kconf_update/kopete-pluginloader2.cpp @@ -16,23 +16,23 @@ ************************************************************************* */ -#include -#include +#include +#include -static QTextStream qcin ( stdin, IO_ReadOnly ); -static QTextStream qcout( stdout, IO_WriteOnly ); -static QTextStream qcerr( stderr, IO_WriteOnly ); +static TQTextStream qcin ( stdin, IO_ReadOnly ); +static TQTextStream qcout( stdout, IO_WriteOnly ); +static TQTextStream qcerr( stderr, IO_WriteOnly ); -void parseKey( const QString &group, const QString &key, const QString &value, const QString &rawLine ) +void parseKey( const TQString &group, const TQString &key, const TQString &value, const TQString &rawLine ) { //qcerr << "*** group='" << group << "'" << endl; if ( group.isEmpty() && key == "Plugins" ) { - QStringList plugins = QStringList::split( ',', value ); + TQStringList plugins = TQStringList::split( ',', value ); if ( !plugins.isEmpty() ) { qcout << "[Plugins]" << endl; - for ( QStringList::Iterator it = plugins.begin(); it != plugins.end(); ++it ) + for ( TQStringList::Iterator it = plugins.begin(); it != plugins.end(); ++it ) qcout << "kopete_" << ( *it ).remove( ".desktop" ) << "Enabled=true" << endl; } qcout << "# DELETE []Plugins" << endl; @@ -46,18 +46,18 @@ void parseKey( const QString &group, const QString &key, const QString &value, c int main() { - qcin.setEncoding( QTextStream::UnicodeUTF8 ); - qcout.setEncoding( QTextStream::UnicodeUTF8 ); + qcin.setEncoding( TQTextStream::UnicodeUTF8 ); + qcout.setEncoding( TQTextStream::UnicodeUTF8 ); - QString curGroup; + TQString curGroup; - QRegExp groupRegExp( "^\\[(.*)\\]" ); - QRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" ); - QRegExp commentRegExp( "^(#.*)?$" ); + TQRegExp groupRegExp( "^\\[(.*)\\]" ); + TQRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" ); + TQRegExp commentRegExp( "^(#.*)?$" ); while ( !qcin.atEnd() ) { - QString line = qcin.readLine(); + TQString line = qcin.readLine(); if ( commentRegExp.exactMatch( line ) ) { diff --git a/kopete/kopete/kimiface.h b/kopete/kopete/kimiface.h index 86711bf9..0ae3da9d 100644 --- a/kopete/kopete/kimiface.h +++ b/kopete/kopete/kimiface.h @@ -22,9 +22,9 @@ #ifndef KIMIFACE_H #define KIMIFACE_H -#include +#include #include -#include +#include #include /** @@ -45,25 +45,25 @@ k_dcop: * address book. * @return a list of KABC uids. */ - virtual QStringList allContacts() = 0; + virtual TQStringList allContacts() = 0; /** * Obtain a list of KDE address book entries who are * currently reachable. * @return a list of KABC uids who can receive a message, even if online. */ - virtual QStringList reachableContacts() = 0; + virtual TQStringList reachableContacts() = 0; /** * Obtain a list of KDE address book entries who are * currently online. * @return a list of KABC uids who are online with unspecified presence. */ - virtual QStringList onlineContacts() = 0; + virtual TQStringList onlineContacts() = 0; /** * Obtain a list of KDE address book entries who may * receive file transfers. * @return a list of KABC uids capable of file transfer. */ - virtual QStringList fileTransferContacts() = 0; + virtual TQStringList fileTransferContacts() = 0; // individual /** @@ -71,38 +71,38 @@ k_dcop: * @param uid the KABC uid you are interested in. * @return whether one of the chat programs KIMProxy talks to knows of this KABC uid. */ - virtual bool isPresent( const QString & uid ) = 0; + virtual bool isPresent( const TQString & uid ) = 0; /** * Obtain the IM app's idea of the contact's display name * Useful if KABC lookups may be too slow * @param KABC uid. * @return The corresponding display name. */ - virtual QString displayName( const QString & uid ) = 0; + virtual TQString displayName( const TQString & uid ) = 0; /** * Obtain the IM presence as a i18ned string for the specified addressee * @param uid the KABC uid you want the presence for. * @return the i18ned string describing presence. */ - virtual QString presenceString( const QString & uid ) = 0; + virtual TQString presenceString( const TQString & uid ) = 0; /** * Obtain the IM presence as a number (see KIMIface) for the specified addressee * @param uid the KABC uid you want the presence for. * @return a numeric representation of presence - currently one of 0 (Unknown), 1 (Offline), 2 (Connecting), 3 (Away), 4 (Online) */ - virtual int presenceStatus( const QString & uid ) = 0; + virtual int presenceStatus( const TQString & uid ) = 0; /** * Indicate if a given uid can receive files * @param uid the KABC uid you are interested in. * @return Whether the specified addressee can receive files. */ - virtual bool canReceiveFiles( const QString & uid ) = 0; + virtual bool canReceiveFiles( const TQString & uid ) = 0; /** * Some media are unidirectional (eg, sending SMS via a web interface). * @param uid the KABC uid you are interested in. * @return Whether the specified addressee can respond. */ - virtual bool canRespond( const QString & uid ) = 0; + virtual bool canRespond( const TQString & uid ) = 0; /** * Get the KABC uid corresponding to the supplied IM address * Protocols should be @@ -110,26 +110,26 @@ k_dcop: * @param protocol the protocol, eg one of "AIMProtocol", "MSNProtocol", "ICQProtocol", * @return a KABC uid or null if none found/ */ - virtual QString locate( const QString & contactId, const QString & protocol ) = 0; + virtual TQString locate( const TQString & contactId, const TQString & protocol ) = 0; // metadata /** * Obtain the icon representing IM presence for the specified addressee * @param uid the KABC uid you want the presence for. * @return a pixmap representing the uid's presence. */ - virtual QPixmap icon( const QString & uid ) = 0; + virtual TQPixmap icon( const TQString & uid ) = 0; /** * Get the supplied addressee's current context (home, work, or any). * @param uid the KABC uid you want the context for. - * @return A QString describing the context, or null if not supported. + * @return A TQString describing the context, or null if not supported. */ - virtual QString context( const QString & uid ) = 0; + virtual TQString context( const TQString & uid ) = 0; // App capabilities /** * Discover what protocols the application supports * @return the set of protocols that the application supports */ - virtual QStringList protocols() = 0; + virtual TQStringList protocols() = 0; // ACTORS /** @@ -139,18 +139,18 @@ k_dcop: * @param uid the KABC uid you want to chat with. * @param message the message to send them. */ - virtual void messageContact( const QString &uid, const QString& message ) = 0; + virtual void messageContact( const TQString &uid, const TQString& message ) = 0; /** * Open a chat to a contact, and optionally set some initial text */ - virtual void messageNewContact( const QString &contactId, const QString &protocol ) = 0; + virtual void messageNewContact( const TQString &contactId, const TQString &protocol ) = 0; /** * Start a chat session with the specified addressee * @param uid the KABC uid you want to chat with. */ - virtual void chatWithContact( const QString &uid ) = 0; + virtual void chatWithContact( const TQString &uid ) = 0; /** * Send the file to the contact @@ -159,8 +159,8 @@ k_dcop: * @param altFileName an alternate filename describing the file * @param fileSize file size in bytes */ - virtual void sendFile(const QString &uid, const KURL &sourceURL, - const QString &altFileName = QString::null, uint fileSize = 0) = 0; + virtual void sendFile(const TQString &uid, const KURL &sourceURL, + const TQString &altFileName = TQString::null, uint fileSize = 0) = 0; // MUTATORS // Contact list @@ -170,7 +170,7 @@ k_dcop: * @param protocol the protocol, eg one of "AIMProtocol", "MSNProtocol", "ICQProtocol", ... * @return whether the add succeeded. False may signal already present, protocol not supported, or add operation not supported. */ - virtual bool addContact( const QString &contactId, const QString &protocol ) = 0; + virtual bool addContact( const TQString &contactId, const TQString &protocol ) = 0; // SIGNALS k_dcop_signals: /** @@ -179,7 +179,7 @@ k_dcop_signals: * @param appId the dcop application id of the program the signal originates from. * @param presence the new numeric presence @ref presenceStatus */ - void contactPresenceChanged( QString uid, QCString appId, int presence ); + void contactPresenceChanged( TQString uid, TQCString appId, int presence ); }; #endif diff --git a/kopete/kopete/kimifaceimpl.cpp b/kopete/kopete/kimifaceimpl.cpp index dd1bd962..1b835438 100644 --- a/kopete/kopete/kimifaceimpl.cpp +++ b/kopete/kopete/kimifaceimpl.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include +#include #include #include @@ -40,22 +40,22 @@ #include "kimifaceimpl.h" -KIMIfaceImpl::KIMIfaceImpl() : DCOPObject( "KIMIface" ), QObject() +KIMIfaceImpl::KIMIfaceImpl() : DCOPObject( "KIMIface" ), TQObject() { connect( Kopete::ContactList::self(), - SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), - SLOT( slotMetaContactAdded( Kopete::MetaContact * ) ) ); + TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), + TQT_SLOT( slotMetaContactAdded( Kopete::MetaContact * ) ) ); } KIMIfaceImpl::~KIMIfaceImpl() { } -QStringList KIMIfaceImpl::allContacts() +TQStringList KIMIfaceImpl::allContacts() { - QStringList result; - QPtrList list = Kopete::ContactList::self()->metaContacts(); - QPtrListIterator it( list ); + TQStringList result; + TQPtrList list = Kopete::ContactList::self()->metaContacts(); + TQPtrListIterator it( list ); for( ; it.current(); ++it ) { if ( !it.current()->metaContactId().contains(':') ) @@ -65,11 +65,11 @@ QStringList KIMIfaceImpl::allContacts() return result; } -QStringList KIMIfaceImpl::reachableContacts() +TQStringList KIMIfaceImpl::reachableContacts() { - QStringList result; - QPtrList list = Kopete::ContactList::self()->metaContacts(); - QPtrListIterator it( list ); + TQStringList result; + TQPtrList list = Kopete::ContactList::self()->metaContacts(); + TQPtrListIterator it( list ); for( ; it.current(); ++it ) { if ( it.current()->isReachable() && !it.current()->metaContactId().contains(':') ) @@ -79,11 +79,11 @@ QStringList KIMIfaceImpl::reachableContacts() return result; } -QStringList KIMIfaceImpl::onlineContacts() +TQStringList KIMIfaceImpl::onlineContacts() { - QStringList result; - QPtrList list = Kopete::ContactList::self()->metaContacts(); - QPtrListIterator it( list ); + TQStringList result; + TQPtrList list = Kopete::ContactList::self()->metaContacts(); + TQPtrListIterator it( list ); for( ; it.current(); ++it ) { if ( it.current()->isOnline() && !it.current()->metaContactId().contains(':') ) @@ -93,11 +93,11 @@ QStringList KIMIfaceImpl::onlineContacts() return result; } -QStringList KIMIfaceImpl::fileTransferContacts() +TQStringList KIMIfaceImpl::fileTransferContacts() { - QStringList result; - QPtrList list = Kopete::ContactList::self()->metaContacts(); - QPtrListIterator it( list ); + TQStringList result; + TQPtrList list = Kopete::ContactList::self()->metaContacts(); + TQPtrListIterator it( list ); for( ; it.current(); ++it ) { if ( it.current()->canAcceptFiles() && !it.current()->metaContactId().contains(':') ) @@ -107,7 +107,7 @@ QStringList KIMIfaceImpl::fileTransferContacts() return result; } -bool KIMIfaceImpl::isPresent( const QString & uid ) +bool KIMIfaceImpl::isPresent( const TQString & uid ) { Kopete::MetaContact *mc; mc = Kopete::ContactList::self()->metaContact( uid ); @@ -116,18 +116,18 @@ bool KIMIfaceImpl::isPresent( const QString & uid ) } -QString KIMIfaceImpl::displayName( const QString & uid ) +TQString KIMIfaceImpl::displayName( const TQString & uid ) { Kopete::MetaContact *mc; mc = Kopete::ContactList::self()->metaContact( uid ); - QString name; + TQString name; if ( mc ) name = mc->displayName(); return name; } -int KIMIfaceImpl::presenceStatus( const QString & uid ) +int KIMIfaceImpl::presenceStatus( const TQString & uid ) { //kdDebug( 14000 ) << k_funcinfo << endl; int p = -1; @@ -158,10 +158,10 @@ int KIMIfaceImpl::presenceStatus( const QString & uid ) return p; } -QString KIMIfaceImpl::presenceString( const QString & uid ) +TQString KIMIfaceImpl::presenceString( const TQString & uid ) { //kdDebug( 14000 ) << "KIMIfaceImpl::presenceString" << endl; - QString p; + TQString p; Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid ); if ( m ) { @@ -172,12 +172,12 @@ QString KIMIfaceImpl::presenceString( const QString & uid ) else { kdDebug( 14000 ) << "Couldn't find MC: " << uid << endl;; - p = QString(); + p = TQString(); } return p; } -bool KIMIfaceImpl::canReceiveFiles( const QString & uid ) +bool KIMIfaceImpl::canReceiveFiles( const TQString & uid ) { Kopete::MetaContact *mc; mc = Kopete::ContactList::self()->metaContact( uid ); @@ -188,15 +188,15 @@ bool KIMIfaceImpl::canReceiveFiles( const QString & uid ) return false; } -bool KIMIfaceImpl::canRespond( const QString & uid ) +bool KIMIfaceImpl::canRespond( const TQString & uid ) { Kopete::MetaContact *mc; mc = Kopete::ContactList::self()->metaContact( uid ); if ( mc ) { - QPtrList list = mc->contacts(); - QPtrListIterator it( list ); + TQPtrList list = mc->contacts(); + TQPtrListIterator it( list ); Kopete::Contact *contact; while ( ( contact = it.current() ) != 0 ) { @@ -208,16 +208,16 @@ bool KIMIfaceImpl::canRespond( const QString & uid ) return false; } -QString KIMIfaceImpl::locate( const QString & contactId, const QString & protocolId ) +TQString KIMIfaceImpl::locate( const TQString & contactId, const TQString & protocolId ) { Kopete::MetaContact *mc = locateProtocolContact( contactId, protocolId ); if ( mc ) return mc->metaContactId(); else - return QString::null; + return TQString::null; } -Kopete::MetaContact * KIMIfaceImpl::locateProtocolContact( const QString & contactId, const QString & protocolId ) +Kopete::MetaContact * KIMIfaceImpl::locateProtocolContact( const TQString & contactId, const TQString & protocolId ) { Kopete::MetaContact *mc = 0; // find a matching protocol @@ -226,8 +226,8 @@ Kopete::MetaContact * KIMIfaceImpl::locateProtocolContact( const QString & conta if ( protocol ) { // find its accounts - QDict accounts = Kopete::AccountManager::self()->accounts( protocol ); - QDictIterator it( accounts ); + TQDict accounts = Kopete::AccountManager::self()->accounts( protocol ); + TQDictIterator it( accounts ); for( ; it.current(); ++it ) { Kopete::Contact *c = Kopete::ContactList::self()->findContact( protocolId, it.currentKey(), contactId ); @@ -241,35 +241,35 @@ Kopete::MetaContact * KIMIfaceImpl::locateProtocolContact( const QString & conta return mc; } -QPixmap KIMIfaceImpl::icon( const QString & uid ) +TQPixmap KIMIfaceImpl::icon( const TQString & uid ) { Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid ); - QPixmap p; + TQPixmap p; if ( m ) p = SmallIcon( m->statusIcon() ); return p; } -QString KIMIfaceImpl::context( const QString & uid ) +TQString KIMIfaceImpl::context( const TQString & uid ) { // TODO: support context // shush warning - QString myUid = uid; + TQString myUid = uid; - return QString::null; + return TQString::null; } -QStringList KIMIfaceImpl::protocols() +TQStringList KIMIfaceImpl::protocols() { - QValueList protocols = Kopete::PluginManager::self()->availablePlugins( "Protocols" ); - QStringList protocolList; - for ( QValueList::Iterator it = protocols.begin(); it != protocols.end(); ++it ) + TQValueList protocols = Kopete::PluginManager::self()->availablePlugins( "Protocols" ); + TQStringList protocolList; + for ( TQValueList::Iterator it = protocols.begin(); it != protocols.end(); ++it ) protocolList.append( (*it)->name() ); return protocolList; } -void KIMIfaceImpl::messageContact( const QString &uid, const QString& messageText ) +void KIMIfaceImpl::messageContact( const TQString &uid, const TQString& messageText ) { Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid ); if ( m ) @@ -285,14 +285,14 @@ void KIMIfaceImpl::messageContact( const QString &uid, const QString& messageTex unknown( uid ); } -void KIMIfaceImpl::messageNewContact( const QString &contactId, const QString &protocol ) +void KIMIfaceImpl::messageNewContact( const TQString &contactId, const TQString &protocol ) { Kopete::MetaContact *mc = locateProtocolContact( contactId, protocol ); if ( mc ) mc->sendMessage(); } -void KIMIfaceImpl::chatWithContact( const QString &uid ) +void KIMIfaceImpl::chatWithContact( const TQString &uid ) { Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid ); if ( m ) @@ -301,8 +301,8 @@ void KIMIfaceImpl::chatWithContact( const QString &uid ) unknown( uid ); } -void KIMIfaceImpl::sendFile(const QString &uid, const KURL &sourceURL, - const QString &altFileName, uint fileSize) +void KIMIfaceImpl::sendFile(const TQString &uid, const KURL &sourceURL, + const TQString &altFileName, uint fileSize) { Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( uid ); if ( m ) @@ -310,7 +310,7 @@ void KIMIfaceImpl::sendFile(const QString &uid, const KURL &sourceURL, // else, prompt to create a new MC associated with UID } -bool KIMIfaceImpl::addContact( const QString &contactId, const QString &protocolId ) +bool KIMIfaceImpl::addContact( const TQString &contactId, const TQString &protocolId ) { // find a matching protocol Kopete::Protocol *protocol = dynamic_cast( Kopete::PluginManager::self()->plugin( protocolId ) ); @@ -318,8 +318,8 @@ bool KIMIfaceImpl::addContact( const QString &contactId, const QString &protocol if ( protocol ) { // find its accounts - QDict accounts = Kopete::AccountManager::self()->accounts( protocol ); - QDictIterator it( accounts ); + TQDict accounts = Kopete::AccountManager::self()->accounts( protocol ); + TQDictIterator it( accounts ); Kopete::Account *ac = it.toFirst(); if ( ac ) { @@ -332,8 +332,8 @@ bool KIMIfaceImpl::addContact( const QString &contactId, const QString &protocol void KIMIfaceImpl::slotMetaContactAdded( Kopete::MetaContact *mc ) { - connect( mc, SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), - SLOT( slotContactStatusChanged( Kopete::MetaContact * ) ) ); + connect( mc, TQT_SIGNAL( onlineStatusChanged( Kopete::MetaContact *, Kopete::OnlineStatus::StatusType ) ), + TQT_SLOT( slotContactStatusChanged( Kopete::MetaContact * ) ) ); } void KIMIfaceImpl::slotContactStatusChanged( Kopete::MetaContact *mc ) @@ -363,16 +363,16 @@ void KIMIfaceImpl::slotContactStatusChanged( Kopete::MetaContact *mc ) } // tell anyone who's listening over DCOP contactPresenceChanged( mc->metaContactId(), kapp->name(), p ); -/* QByteArray params; - QDataStream stream(params, IO_WriteOnly); +/* TQByteArray params; + TQDataStream stream(params, IO_WriteOnly); stream << mc->metaContactId(); stream << kapp->name(); stream << p; - kapp->dcopClient()->emitDCOPSignal( "contactPresenceChanged( QString, QCString, int )", params );*/ + kapp->dcopClient()->emitDCOPSignal( "contactPresenceChanged( TQString, TQCString, int )", params );*/ } } -void KIMIfaceImpl::unknown( const QString &uid ) +void KIMIfaceImpl::unknown( const TQString &uid ) { // warn the user that the KABC contact associated with this UID isn't known to kopete, // either associate an existing contact with KABC or add a new one using the ACW. @@ -384,7 +384,7 @@ void KIMIfaceImpl::unknown( const QString &uid ) } else { - QString apology = i18n( "Translators: %1 is the name of a person taken from the KDE address book, who Kopete doesn't know about. Kopete must either be told that an existing contact in Kopete is this person, or add a new contact for them", + TQString apology = i18n( "Translators: %1 is the name of a person taken from the KDE address book, who Kopete doesn't know about. Kopete must either be told that an existing contact in Kopete is this person, or add a new contact for them", "

    The KDE Address Book has no instant messaging information for

    %1.

    If he/she is already present in the Kopete contact list, indicate the correct addressbook entry in their properties.

    Otherwise, add a new contact using the Add Contact wizard.

    " ); apology = apology.arg( addr.realName() ); KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Information, apology, i18n( "No Instant Messaging Address" ) ); diff --git a/kopete/kopete/kimifaceimpl.h b/kopete/kopete/kimifaceimpl.h index ff8c3611..e5635195 100644 --- a/kopete/kopete/kimifaceimpl.h +++ b/kopete/kopete/kimifaceimpl.h @@ -17,7 +17,7 @@ #ifndef KIMIFACEIMPL_H #define KIMIFACEIMPL_H -#include +#include #include "kimiface.h" namespace Kopete @@ -25,72 +25,72 @@ namespace Kopete class MetaContact; } -class KIMIfaceImpl : public QObject, public KIMIface +class KIMIfaceImpl : public TQObject, public KIMIface { Q_OBJECT public: KIMIfaceImpl(); ~KIMIfaceImpl(); - QStringList allContacts(); - QStringList reachableContacts(); - QStringList onlineContacts(); - QStringList fileTransferContacts(); + TQStringList allContacts(); + TQStringList reachableContacts(); + TQStringList onlineContacts(); + TQStringList fileTransferContacts(); // individual - bool isPresent( const QString &uid ); - QString displayName( const QString &uid ); - QString presenceString( const QString &uid ); - int presenceStatus( const QString &uid ); - bool canReceiveFiles( const QString &uid ); - bool canRespond( const QString &uid ); - QString locate( const QString &contactId, const QString &protocol ); + bool isPresent( const TQString &uid ); + TQString displayName( const TQString &uid ); + TQString presenceString( const TQString &uid ); + int presenceStatus( const TQString &uid ); + bool canReceiveFiles( const TQString &uid ); + bool canRespond( const TQString &uid ); + TQString locate( const TQString &contactId, const TQString &protocol ); // metadata - QPixmap icon( const QString &uid ); - QString context( const QString &uid ); + TQPixmap icon( const TQString &uid ); + TQString context( const TQString &uid ); // App capabilities - QStringList protocols(); + TQStringList protocols(); // ACTORS /** * Message a contact by their metaContactId, aka their uid in KABC. */ - void messageContact( const QString &uid, const QString& message ); + void messageContact( const TQString &uid, const TQString& message ); /** * Open a chat to a contact, and optionally set some initial text */ - void messageNewContact( const QString &contactId, const QString &protocolId ); + void messageNewContact( const TQString &contactId, const TQString &protocolId ); /** * Message a contact by their metaContactId, aka their uid in KABC. */ - void chatWithContact( const QString &uid ); + void chatWithContact( const TQString &uid ); /** * Send the file to the contact */ - void sendFile(const QString &uid, const KURL &sourceURL, - const QString &altFileName = QString::null, uint fileSize = 0); + void sendFile(const TQString &uid, const KURL &sourceURL, + const TQString &altFileName = TQString::null, uint fileSize = 0); // MUTATORS // Contact list - bool addContact( const QString &contactId, const QString &protocolId ); + bool addContact( const TQString &contactId, const TQString &protocolId ); // SIGNALS /** * DCOP Signal used to notify * external apps of status changes. */ - void contactStatusChanged( const QString &uid); + void contactStatusChanged( const TQString &uid); protected: - void unknown( const QString &uid ); + void unknown( const TQString &uid ); protected slots: void slotMetaContactAdded( Kopete::MetaContact *mc ); void slotContactStatusChanged( Kopete::MetaContact *mc ); private: - Kopete::MetaContact *locateProtocolContact( const QString & contactId, const QString & protocolId ); + Kopete::MetaContact *locateProtocolContact( const TQString & contactId, const TQString & protocolId ); }; #endif diff --git a/kopete/kopete/kopeteaccountstatusbaricon.cpp b/kopete/kopete/kopeteaccountstatusbaricon.cpp index 05855b63..a2a65355 100644 --- a/kopete/kopete/kopeteaccountstatusbaricon.cpp +++ b/kopete/kopete/kopeteaccountstatusbaricon.cpp @@ -16,23 +16,23 @@ */ #include "kopeteaccountstatusbaricon.h" -#include "qcursor.h" +#include "tqcursor.h" #include //#include -KopeteAccountStatusBarIcon::KopeteAccountStatusBarIcon( Kopete::Account *acc, QWidget *parent, +KopeteAccountStatusBarIcon::KopeteAccountStatusBarIcon( Kopete::Account *acc, TQWidget *parent, const char *name ) -: QLabel( parent, name ) +: TQLabel( parent, name ) { // kdDebug(14000) << "[KopeteAccountStatusBarIcon] Setting Initial Protocol Icon" << endl; //setMask(initialPixmap->mask()); - //setPixmap( Kopete::OnlineStatus( Kopete::OnlineStatus::Unknown, 0, proto, 0, "status_unknown", QString::null, QString::null ).protocolIcon() ); + //setPixmap( Kopete::OnlineStatus( Kopete::OnlineStatus::Unknown, 0, proto, 0, "status_unknown", TQString::null, TQString::null ).protocolIcon() ); //setPixmap( proto->status().protocolIcon() ); setFixedSize ( 16, 16 ); - setCursor(QCursor(Qt::PointingHandCursor)); + setCursor(TQCursor(Qt::PointingHandCursor)); show(); m_account = acc; @@ -42,15 +42,15 @@ KopeteAccountStatusBarIcon::~KopeteAccountStatusBarIcon() { } -void KopeteAccountStatusBarIcon::mousePressEvent( QMouseEvent *me ) +void KopeteAccountStatusBarIcon::mousePressEvent( TQMouseEvent *me ) { - if( me->button() == QEvent::RightButton ) + if( me->button() == TQEvent::RightButton ) { - emit rightClicked( m_account, QPoint( me->globalX(), me->globalY() ) ); + emit rightClicked( m_account, TQPoint( me->globalX(), me->globalY() ) ); } - else if( me->button() == QEvent::LeftButton ) + else if( me->button() == TQEvent::LeftButton ) { - emit leftClicked( m_account, QPoint( me->globalX(), me->globalY() ) ); + emit leftClicked( m_account, TQPoint( me->globalX(), me->globalY() ) ); } } diff --git a/kopete/kopete/kopeteaccountstatusbaricon.h b/kopete/kopete/kopeteaccountstatusbaricon.h index 7c3034c9..503008ff 100644 --- a/kopete/kopete/kopeteaccountstatusbaricon.h +++ b/kopete/kopete/kopeteaccountstatusbaricon.h @@ -18,9 +18,9 @@ #ifndef KOPETEACCOUNTSTATUSBARICON_H #define KOPETEACCOUNTSTATUSBARICON_H -#include -#include -#include +#include +#include +#include namespace Kopete { @@ -38,17 +38,17 @@ public: /** * Create a statusbar icon. */ - KopeteAccountStatusBarIcon( Kopete::Account *acc, QWidget *parent, + KopeteAccountStatusBarIcon( Kopete::Account *acc, TQWidget *parent, const char *name = 0 ); ~KopeteAccountStatusBarIcon(); signals: - void rightClicked( Kopete::Account *acc, const QPoint &p ); - void leftClicked( Kopete::Account *acc, const QPoint &p ); + void rightClicked( Kopete::Account *acc, const TQPoint &p ); + void leftClicked( Kopete::Account *acc, const TQPoint &p ); protected: - virtual void mousePressEvent( QMouseEvent *me ); + virtual void mousePressEvent( TQMouseEvent *me ); private: Kopete::Account *m_account; diff --git a/kopete/kopete/kopeteapplication.cpp b/kopete/kopete/kopeteapplication.cpp index 3a481d3f..3db6c51f 100644 --- a/kopete/kopete/kopeteapplication.cpp +++ b/kopete/kopete/kopeteapplication.cpp @@ -20,8 +20,8 @@ #include "kopeteapplication.h" -#include -#include +#include +#include #include #include @@ -65,11 +65,11 @@ KopeteApplication::KopeteApplication() * FIXME: This is a workaround for a quite odd problem: * When starting up kopete and the msn plugin gets loaded it can bring up * a messagebox, in case the msg configuration is missing. This messagebox - * will result in a QApplication::enter_loop() call, an event loop is + * will result in a TQApplication::enter_loop() call, an event loop is * created. At this point however the loop_level is 0, because this is all * still inside the KopeteApplication constructor, before the exec() call from main. * When the messagebox is finished the loop_level will drop down to zero and - * QApplication thinks the application shuts down (this is usually the case + * TQApplication thinks the application shuts down (this is usually the case * when the loop_level goes down to zero) . So it emits aboutToQuit(), to * which KApplication is connected and re-emits shutdown() , to which again * KMainWindow (a KopeteWindow instance exists already) is connected. KMainWindow's @@ -83,10 +83,10 @@ KopeteApplication::KopeteApplication() * Additionally, it makes the GUI appear less 'blocking' during startup, so * there is a secondary benefit as well here. (Martijn) */ - QTimer::singleShot( 0, this, SLOT( slotLoadPlugins() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadPlugins() ) ); m_mimeFactory = new Kopete::MimeSourceFactory; - QMimeSourceFactory::addFactory( m_mimeFactory ); + TQMimeSourceFactory::addFactory( m_mimeFactory ); //Create the emoticon installer m_emoticonHandler = new Kopete::EmoticonMimeTypeHandler; @@ -148,8 +148,8 @@ void KopeteApplication::slotLoadPlugins() */ // Prevent plugins from loading? (--disable=foo,bar) - QStringList disableArgs = QStringList::split( ',', args->getOption( "disable" ) ); - for ( QStringList::ConstIterator it = disableArgs.begin(); it != disableArgs.end(); ++it ) + TQStringList disableArgs = TQStringList::split( ',', args->getOption( "disable" ) ); + for ( TQStringList::ConstIterator it = disableArgs.begin(); it != disableArgs.end(); ++it ) { showConfigDialog = false; Kopete::PluginManager::self()->setPluginEnabled( *it, false ); @@ -160,8 +160,8 @@ void KopeteApplication::slotLoadPlugins() { config->deleteGroup( "Plugins", true ); showConfigDialog = false; - QStringList plugins = QStringList::split( ',', args->getOption( "load-plugins" ) ); - for ( QStringList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it ) + TQStringList plugins = TQStringList::split( ',', args->getOption( "load-plugins" ) ); + for ( TQStringList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it ) Kopete::PluginManager::self()->setPluginEnabled( *it, true ); } @@ -177,15 +177,15 @@ void KopeteApplication::slotLoadPlugins() showConfigDialog = false; // pretend all plugins were loaded :) - QTimer::singleShot(0, this, SLOT( slotAllPluginsLoaded() )); + TQTimer::singleShot(0, this, TQT_SLOT( slotAllPluginsLoaded() )); } else { Kopete::PluginManager::self()->loadAllPlugins(); } - connect( Kopete::PluginManager::self(), SIGNAL( allPluginsLoaded() ), - this, SLOT( slotAllPluginsLoaded() )); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( allPluginsLoaded() ), + this, TQT_SLOT( slotAllPluginsLoaded() )); if( showConfigDialog ) { @@ -217,24 +217,24 @@ void KopeteApplication::slotAllPluginsLoaded() // Handle things like '--autoconnect foo,bar --autoconnect foobar' QCStringList connectArgsC = args->getOptionList( "autoconnect" ); - QStringList connectArgs; + TQStringList connectArgs; for ( QCStringList::ConstIterator it = connectArgsC.begin(); it != connectArgsC.end(); ++it ) { - QStringList split = QStringList::split( ',', QString::fromLatin1( *it ) ); + TQStringList split = TQStringList::split( ',', TQString::fromLatin1( *it ) ); - for ( QStringList::ConstIterator it2 = split.begin(); it2 != split.end(); ++it2 ) + for ( TQStringList::ConstIterator it2 = split.begin(); it2 != split.end(); ++it2 ) { connectArgs.append( *it2 ); } } - for ( QStringList::ConstIterator i = connectArgs.begin(); i != connectArgs.end(); ++i ) + for ( TQStringList::ConstIterator i = connectArgs.begin(); i != connectArgs.end(); ++i ) { - QRegExp rx( QString::fromLatin1( "([^\\|]*)\\|\\|(.*)" ) ); + TQRegExp rx( TQString::fromLatin1( "([^\\|]*)\\|\\|(.*)" ) ); rx.search( *i ); - QString protocolId = rx.cap( 1 ); - QString accountId = rx.cap( 2 ); + TQString protocolId = rx.cap( 1 ); + TQString accountId = rx.cap( 2 ); if ( accountId.isEmpty() ) { @@ -244,7 +244,7 @@ void KopeteApplication::slotAllPluginsLoaded() continue; } - QPtrListIterator it( Kopete::AccountManager::self()->accounts() ); + TQPtrListIterator it( Kopete::AccountManager::self()->accounts() ); Kopete::Account *account; while ( ( account = it.current() ) != 0 ) { @@ -316,7 +316,7 @@ void KopeteApplication::quitKopete() m_isShuttingDown = true; // close all windows - QPtrListIterator it(*KMainWindow::memberList); + TQPtrListIterator it(*KMainWindow::memberList); for (it.toFirst(); it.current(); ++it) { if ( !it.current()->close() ) diff --git a/kopete/kopete/kopeteapplication.h b/kopete/kopete/kopeteapplication.h index 9634adca..d9264031 100644 --- a/kopete/kopete/kopeteapplication.h +++ b/kopete/kopete/kopeteapplication.h @@ -24,7 +24,7 @@ #include #endif -#include +#include #include @@ -79,10 +79,10 @@ private slots: private: // The main window might get deleted behind our back (W_DestructiveClose), // so use a guarded pointer - QGuardedPtr m_mainWindow; + TQGuardedPtr m_mainWindow; bool m_isShuttingDown; Kopete::MimeTypeHandler *m_emoticonHandler; - QMimeSourceFactory *m_mimeFactory; + TQMimeSourceFactory *m_mimeFactory; private: void handleURLArgs(); diff --git a/kopete/kopete/kopeteballoon.cpp b/kopete/kopete/kopeteballoon.cpp index cee42240..13696da1 100644 --- a/kopete/kopete/kopeteballoon.cpp +++ b/kopete/kopete/kopeteballoon.cpp @@ -18,11 +18,11 @@ ************************************************************************* */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -39,20 +39,20 @@ #include "systemtray.h" #include "kopeteprefs.h" -KopeteActiveLabel::KopeteActiveLabel( QWidget *parent, const char *name ) +KopeteActiveLabel::KopeteActiveLabel( TQWidget *parent, const char *name ) : KActiveLabel( parent, name ) { } -KopeteActiveLabel::KopeteActiveLabel( const QString& text, QWidget *parent, +KopeteActiveLabel::KopeteActiveLabel( const TQString& text, TQWidget *parent, const char *name ) : KActiveLabel( text, parent, name ) { } -void KopeteActiveLabel::openLink( const QString& link ) +void KopeteActiveLabel::openLink( const TQString& link ) { KURL url( link ); - QString protocol = url.protocol(); + TQString protocol = url.protocol(); if ( protocol == "mailto" ) kapp->invokeMailer(url); @@ -63,26 +63,26 @@ void KopeteActiveLabel::openLink( const QString& link ) } } -KopeteBalloon::KopeteBalloon(const QString &text, const QString &pix) -: QWidget(0L, "KopeteBalloon", WStyle_StaysOnTop | WStyle_Customize | +KopeteBalloon::KopeteBalloon(const TQString &text, const TQString &pix) +: TQWidget(0L, "KopeteBalloon", WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM) { setCaption(""); - QVBoxLayout *BalloonLayout = new QVBoxLayout(this, 22, + TQVBoxLayout *BalloonLayout = new TQVBoxLayout(this, 22, KDialog::spacingHint(), "BalloonLayout"); // BEGIN Layout1 - QHBoxLayout *Layout1 = new QHBoxLayout(BalloonLayout, + TQHBoxLayout *Layout1 = new TQHBoxLayout(BalloonLayout, KDialog::spacingHint(), "Layout1"); - //QLabel *mCaption = new QLabel(text, this, "mCaption"); + //TQLabel *mCaption = new TQLabel(text, this, "mCaption"); KopeteActiveLabel *mCaption = new KopeteActiveLabel(text, this, "mCaption"); - mCaption->setPalette(QToolTip::palette()); - mCaption->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ); + mCaption->setPalette(TQToolTip::palette()); + mCaption->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ); if (!pix.isEmpty()) { - QLabel *mImage = new QLabel(this, "mImage"); + TQLabel *mImage = new TQLabel(this, "mImage"); mImage->setScaledContents(FALSE); mImage->setPixmap(locate("data", pix)); @@ -93,11 +93,11 @@ KopeteBalloon::KopeteBalloon(const QString &text, const QString &pix) // BEGIN Layout2 - QHBoxLayout *Layout2 = new QHBoxLayout(BalloonLayout, + TQHBoxLayout *Layout2 = new TQHBoxLayout(BalloonLayout, KDialog::spacingHint(), "Layout2"); - QPushButton *mViewButton = new QPushButton(i18n("to view", "View"), this, + TQPushButton *mViewButton = new TQPushButton(i18n("to view", "View"), this, "mViewButton"); - QPushButton *mIgnoreButton = new QPushButton(i18n("Ignore"), this, + TQPushButton *mIgnoreButton = new TQPushButton(i18n("Ignore"), this, "mIgnoreButton"); Layout2->addStretch(); @@ -106,29 +106,29 @@ KopeteBalloon::KopeteBalloon(const QString &text, const QString &pix) Layout2->addStretch(); // END Layout2 - setPalette(QToolTip::palette()); + setPalette(TQToolTip::palette()); setAutoMask(TRUE); - connect(mViewButton, SIGNAL(clicked()), - this, SIGNAL(signalButtonClicked())); - connect(mViewButton, SIGNAL(clicked()), - this, SLOT(deleteLater())); - connect(mIgnoreButton, SIGNAL(clicked()), - this, SIGNAL(signalIgnoreButtonClicked())); - connect(mIgnoreButton, SIGNAL(clicked()), - this, SLOT(deleteLater())); - connect(mCaption, SIGNAL(linkClicked(const QString &)), - this, SIGNAL(signalIgnoreButtonClicked())); - connect(mCaption, SIGNAL(linkClicked(const QString &)), - this, SLOT(deleteLater())); + connect(mViewButton, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalButtonClicked())); + connect(mViewButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(deleteLater())); + connect(mIgnoreButton, TQT_SIGNAL(clicked()), + this, TQT_SIGNAL(signalIgnoreButtonClicked())); + connect(mIgnoreButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(deleteLater())); + connect(mCaption, TQT_SIGNAL(linkClicked(const TQString &)), + this, TQT_SIGNAL(signalIgnoreButtonClicked())); + connect(mCaption, TQT_SIGNAL(linkClicked(const TQString &)), + this, TQT_SLOT(deleteLater())); KopetePrefs *p = KopetePrefs::prefs(); // Autoclose balloon if (p->balloonClose()) - QTimer::singleShot( p->balloonCloseDelay() * 1000, this, SIGNAL( signalTimeout( ) ) ); + TQTimer::singleShot( p->balloonCloseDelay() * 1000, this, TQT_SIGNAL( signalTimeout( ) ) ); } -void KopeteBalloon::setAnchor(const QPoint &anchor) +void KopeteBalloon::setAnchor(const TQPoint &anchor) { mAnchor = anchor; updateMask(); @@ -136,22 +136,22 @@ void KopeteBalloon::setAnchor(const QPoint &anchor) void KopeteBalloon::updateMask() { - QRegion mask(10, 10, width() - 20, height() - 20); - - QPoint corners[8] = { - QPoint(width() - 50, 10), - QPoint(10, 10), - QPoint(10, height() - 50), - QPoint(width() - 50, height() - 50), - QPoint(width() - 10, 10), - QPoint(10, 10), - QPoint(10, height() - 10), - QPoint(width() - 10, height() - 10) + TQRegion mask(10, 10, width() - 20, height() - 20); + + TQPoint corners[8] = { + TQPoint(width() - 50, 10), + TQPoint(10, 10), + TQPoint(10, height() - 50), + TQPoint(width() - 50, height() - 50), + TQPoint(width() - 10, 10), + TQPoint(10, 10), + TQPoint(10, height() - 10), + TQPoint(width() - 10, height() - 10) }; for (int i = 0; i < 4; ++i) { - QPointArray corner; + TQPointArray corner; corner.makeArc(corners[i].x(), corners[i].y(), 40, 40, i * 16 * 90, 16 * 90); corner.resize(corner.size() + 1); @@ -161,16 +161,16 @@ void KopeteBalloon::updateMask() // get screen-geometry for screen our anchor is on // (geometry can differ from screen to screen! - QRect deskRect = KGlobalSettings::desktopGeometry(mAnchor); + TQRect deskRect = KGlobalSettings::desktopGeometry(mAnchor); bool bottom = (mAnchor.y() + height()) > ((deskRect.y() + deskRect.height()-48)); bool right = (mAnchor.x() + width()) > ((deskRect.x() + deskRect.width()-48)); - QPointArray arrow(4); - arrow.setPoint(0, QPoint(right ? width() : 0, bottom ? height() : 0)); - arrow.setPoint(1, QPoint(right ? width() - 10 : 10, + TQPointArray arrow(4); + arrow.setPoint(0, TQPoint(right ? width() : 0, bottom ? height() : 0)); + arrow.setPoint(1, TQPoint(right ? width() - 10 : 10, bottom ? height() - 30 : 30)); - arrow.setPoint(2, QPoint(right ? width() - 30 : 30, + arrow.setPoint(2, TQPoint(right ? width() - 30 : 30, bottom ? height() - 10 : 10)); arrow.setPoint(3, arrow[0]); mask += arrow; diff --git a/kopete/kopete/kopeteballoon.h b/kopete/kopete/kopeteballoon.h index 1c30a8e4..fca7fa80 100644 --- a/kopete/kopete/kopeteballoon.h +++ b/kopete/kopete/kopeteballoon.h @@ -21,7 +21,7 @@ #ifndef KOPETEBALLOON_H #define KOPETEBALLOON_H -#include +#include #include /** @@ -33,11 +33,11 @@ class KopeteActiveLabel : public KActiveLabel Q_OBJECT public: - KopeteActiveLabel( QWidget *parent = 0, const char* name = 0 ); - KopeteActiveLabel( const QString& text, QWidget *parent = 0, const char* name = 0 ); + KopeteActiveLabel( TQWidget *parent = 0, const char* name = 0 ); + KopeteActiveLabel( const TQString& text, TQWidget *parent = 0, const char* name = 0 ); public slots: - virtual void openLink( const QString &link ); + virtual void openLink( const TQString &link ); }; @@ -53,10 +53,10 @@ class KopeteBalloon : public QWidget Q_OBJECT public: - KopeteBalloon(const QString &text, const QString &pic); + KopeteBalloon(const TQString &text, const TQString &pic); // KopeteBalloon(); - void setAnchor(const QPoint &anchor); + void setAnchor(const TQPoint &anchor); signals: void signalButtonClicked(); @@ -68,7 +68,7 @@ protected: virtual void updateMask(); private: - QPoint mAnchor; + TQPoint mAnchor; }; #endif diff --git a/kopete/kopete/kopeteeditglobalidentitywidget.cpp b/kopete/kopete/kopeteeditglobalidentitywidget.cpp index 63357068..a9cd3c0c 100644 --- a/kopete/kopete/kopeteeditglobalidentitywidget.cpp +++ b/kopete/kopete/kopeteeditglobalidentitywidget.cpp @@ -18,11 +18,11 @@ #include "kopeteeditglobalidentitywidget.h" // Qt include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // KDE include #include @@ -42,13 +42,13 @@ #include "kopetemetacontact.h" -ClickableLabel::ClickableLabel(QWidget *parent, const char *name) - : QLabel(parent, name) +ClickableLabel::ClickableLabel(TQWidget *parent, const char *name) + : TQLabel(parent, name) { - setCursor(QCursor(Qt::PointingHandCursor)); + setCursor(TQCursor(Qt::PointingHandCursor)); } -void ClickableLabel::mouseReleaseEvent(QMouseEvent *event) +void ClickableLabel::mouseReleaseEvent(TQMouseEvent *event) { if(event->button() == Qt::LeftButton) { @@ -68,13 +68,13 @@ public: ClickableLabel *labelPicture; KLineEdit *lineNickname; KLineEdit *lineStatusMessage; - QHBoxLayout *mainLayout; + TQHBoxLayout *mainLayout; int iconSize; - QString lastNickname; + TQString lastNickname; }; -KopeteEditGlobalIdentityWidget::KopeteEditGlobalIdentityWidget(QWidget *parent, const char *name) - : QWidget(parent, name) +KopeteEditGlobalIdentityWidget::KopeteEditGlobalIdentityWidget(TQWidget *parent, const char *name) + : TQWidget(parent, name) { d = new Private; @@ -83,7 +83,7 @@ KopeteEditGlobalIdentityWidget::KopeteEditGlobalIdentityWidget(QWidget *parent, createGUI(); // Update the GUI when a global identity key change. - connect(Kopete::ContactList::self(), SIGNAL(globalIdentityChanged(const QString&, const QVariant& )), this, SLOT(updateGUI(const QString&, const QVariant&))); + connect(Kopete::ContactList::self(), TQT_SIGNAL(globalIdentityChanged(const TQString&, const TQVariant& )), this, TQT_SLOT(updateGUI(const TQString&, const TQVariant&))); } KopeteEditGlobalIdentityWidget::~KopeteEditGlobalIdentityWidget() @@ -97,10 +97,10 @@ void KopeteEditGlobalIdentityWidget::setIconSize(int size) // Update the picture (change the size of it) d->iconSize = size; - d->labelPicture->setMinimumSize(QSize(d->iconSize, d->iconSize)); - d->labelPicture->setMaximumSize(QSize(d->iconSize, d->iconSize)); + d->labelPicture->setMinimumSize(TQSize(d->iconSize, d->iconSize)); + d->labelPicture->setMaximumSize(TQSize(d->iconSize, d->iconSize)); if( !d->myself->photo().isNull() ) - d->labelPicture->setPixmap(QPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, QImage::ScaleMin))); + d->labelPicture->setPixmap(TQPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, TQImage::ScaleMin))); } void KopeteEditGlobalIdentityWidget::iconSizeChanged() @@ -112,35 +112,35 @@ void KopeteEditGlobalIdentityWidget::iconSizeChanged() { // Update the picture (change the size of it) d->iconSize = tb->iconSize(); - d->labelPicture->setMinimumSize(QSize(d->iconSize, d->iconSize)); - d->labelPicture->setMaximumSize(QSize(d->iconSize, d->iconSize)); + d->labelPicture->setMinimumSize(TQSize(d->iconSize, d->iconSize)); + d->labelPicture->setMaximumSize(TQSize(d->iconSize, d->iconSize)); if( !d->myself->photo().isNull() ) - d->labelPicture->setPixmap(QPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, QImage::ScaleMin))); + d->labelPicture->setPixmap(TQPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, TQImage::ScaleMin))); } } void KopeteEditGlobalIdentityWidget::createGUI() { - d->mainLayout = new QHBoxLayout(this); + d->mainLayout = new TQHBoxLayout(this); // The picture label d->labelPicture = new ClickableLabel(this); - d->labelPicture->setMinimumSize(QSize(d->iconSize, d->iconSize)); - d->labelPicture->setMaximumSize(QSize(d->iconSize, d->iconSize)); - d->labelPicture->setFrameShape(QFrame::Box); + d->labelPicture->setMinimumSize(TQSize(d->iconSize, d->iconSize)); + d->labelPicture->setMaximumSize(TQSize(d->iconSize, d->iconSize)); + d->labelPicture->setFrameShape(TQFrame::Box); d->mainLayout->addWidget(d->labelPicture); - connect(d->labelPicture, SIGNAL(clicked()), this, SLOT(photoClicked())); + connect(d->labelPicture, TQT_SIGNAL(clicked()), this, TQT_SLOT(photoClicked())); // The nickname lineEdit d->lineNickname = new KLineEdit(this); d->mainLayout->addWidget(d->lineNickname); // Update the nickname when the user press return. - connect(d->lineNickname, SIGNAL(returnPressed()), this, SLOT(changeNickname())); + connect(d->lineNickname, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(changeNickname())); // Show the nickname text in red when they are change. - connect(d->lineNickname, SIGNAL(textChanged(const QString&)), this, SLOT(lineNicknameTextChanged(const QString& ))); + connect(d->lineNickname, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(lineNicknameTextChanged(const TQString& ))); } -void KopeteEditGlobalIdentityWidget::updateGUI(const QString &key, const QVariant &value) +void KopeteEditGlobalIdentityWidget::updateGUI(const TQString &key, const TQVariant &value) { kdDebug(14000) << k_funcinfo << "Updating the GUI reflecting the global identity change." << endl; @@ -149,8 +149,8 @@ void KopeteEditGlobalIdentityWidget::updateGUI(const QString &key, const QVarian // Update the picture and the tooltip if( !d->myself->photo().isNull() ) { - d->labelPicture->setPixmap(QPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, QImage::ScaleMin))); - QToolTip::add(d->labelPicture, ""); + d->labelPicture->setPixmap(TQPixmap(d->myself->photo().smoothScale(d->iconSize, d->iconSize, TQImage::ScaleMin))); + TQToolTip::add(d->labelPicture, ""); } } else if(key == Kopete::Global::Properties::self()->nickName().key()) @@ -163,7 +163,7 @@ void KopeteEditGlobalIdentityWidget::updateGUI(const QString &key, const QVarian void KopeteEditGlobalIdentityWidget::photoClicked() { - KURL photoURL = KFileDialog::getImageOpenURL(QString::null, this, i18n("Global Photo")); + KURL photoURL = KFileDialog::getImageOpenURL(TQString::null, this, i18n("Global Photo")); if(photoURL.isEmpty()) return; @@ -174,16 +174,16 @@ void KopeteEditGlobalIdentityWidget::photoClicked() return; } - QString saveLocation(locateLocal("appdata", "global-photo.png")); - QImage photo(photoURL.path()); - photo = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(photo), 96, 96, this ); + TQString saveLocation(locateLocal("appdata", "global-photo.png")); + TQImage photo(photoURL.path()); + photo = KPixmapRegionSelectorDialog::getSelectedImage( TQPixmap(photo), 96, 96, this ); if(!photo.isNull()) { if(photo.width() > 96 || photo.height() > 96) { // Scale and crop the picture. - photo = photo.smoothScale( 96, 96, QImage::ScaleMin ); + photo = photo.smoothScale( 96, 96, TQImage::ScaleMin ); // crop image if not square if(photo.width() < photo.height()) photo = photo.copy((photo.width()-photo.height())/2, 0, 96, 96); @@ -194,7 +194,7 @@ void KopeteEditGlobalIdentityWidget::photoClicked() else if (photo.width() < 32 || photo.height() < 32) { // Scale and crop the picture. - photo = photo.smoothScale( 32, 32, QImage::ScaleMin ); + photo = photo.smoothScale( 32, 32, TQImage::ScaleMin ); // crop image if not square if(photo.width() < photo.height()) photo = photo.copy((photo.width()-photo.height())/2, 0, 32, 32); @@ -222,7 +222,7 @@ void KopeteEditGlobalIdentityWidget::photoClicked() d->myself->setPhoto(KURL(saveLocation)); } -void KopeteEditGlobalIdentityWidget::lineNicknameTextChanged(const QString &text) +void KopeteEditGlobalIdentityWidget::lineNicknameTextChanged(const TQString &text) { // Display the nickname in red if they are any change. if(text != d->lastNickname) diff --git a/kopete/kopete/kopeteeditglobalidentitywidget.h b/kopete/kopete/kopeteeditglobalidentitywidget.h index 731a2cc5..208d8316 100644 --- a/kopete/kopete/kopeteeditglobalidentitywidget.h +++ b/kopete/kopete/kopeteeditglobalidentitywidget.h @@ -18,8 +18,8 @@ #ifndef KOPETEEDITGLOBALIDENTITYWIDGET_H #define KOPETEEDITGLOBALIDENTITYWIDGET_H -#include -#include +#include +#include /** * This is a simple widget added to a toolbar in KopeteWindow. @@ -34,7 +34,7 @@ class KopeteEditGlobalIdentityWidget : public QWidget { Q_OBJECT public: - KopeteEditGlobalIdentityWidget(QWidget *parent = 0, const char *name = 0); + KopeteEditGlobalIdentityWidget(TQWidget *parent = 0, const char *name = 0); virtual ~KopeteEditGlobalIdentityWidget(); public slots: @@ -57,7 +57,7 @@ private slots: /** * When a global identity key is changed, update the GUI. */ - void updateGUI(const QString &key, const QVariant &value); + void updateGUI(const TQString &key, const TQVariant &value); /** * The photo label was clicked, show a ImageFileDialog. */ @@ -65,7 +65,7 @@ private slots: /** * The nickname was changed, display the text in red to display the change. */ - void lineNicknameTextChanged(const QString &text); + void lineNicknameTextChanged(const TQString &text); /** * User press Return/Enter in the KLineEdit, commit the new nickname. */ @@ -87,13 +87,13 @@ class ClickableLabel : public QLabel { Q_OBJECT public: - ClickableLabel(QWidget *parent = 0, const char *name = 0); + ClickableLabel(TQWidget *parent = 0, const char *name = 0); signals: void clicked(); protected: - void mouseReleaseEvent(QMouseEvent *event); + void mouseReleaseEvent(TQMouseEvent *event); }; #endif diff --git a/kopete/kopete/kopeteiface.cpp b/kopete/kopete/kopeteiface.cpp index 3895e271..426424ff 100644 --- a/kopete/kopete/kopeteiface.cpp +++ b/kopete/kopete/kopeteiface.cpp @@ -53,43 +53,43 @@ KopeteIface::KopeteIface() : DCOPObject( "KopeteIface" ) "KDE_stop_screensaver()", "setActive()", false); } -QStringList KopeteIface::contacts() +TQStringList KopeteIface::contacts() { return Kopete::ContactList::self()->contacts(); } -QStringList KopeteIface::reachableContacts() +TQStringList KopeteIface::reachableContacts() { return Kopete::ContactList::self()->reachableContacts(); } -QStringList KopeteIface::onlineContacts() +TQStringList KopeteIface::onlineContacts() { - QStringList result; - QPtrList list = Kopete::ContactList::self()->onlineContacts(); - QPtrListIterator it( list ); + TQStringList result; + TQPtrList list = Kopete::ContactList::self()->onlineContacts(); + TQPtrListIterator it( list ); for( ; it.current(); ++it ) result.append( it.current()->contactId() ); return result; } -QStringList KopeteIface::contactsStatus() +TQStringList KopeteIface::contactsStatus() { return Kopete::ContactList::self()->contactStatuses(); } -QStringList KopeteIface::fileTransferContacts() +TQStringList KopeteIface::fileTransferContacts() { return Kopete::ContactList::self()->fileTransferContacts(); } -QStringList KopeteIface::contactFileProtocols(const QString &displayName) +TQStringList KopeteIface::contactFileProtocols(const TQString &displayName) { return Kopete::ContactList::self()->contactFileProtocols(displayName); } -QString KopeteIface::messageContact( const QString &contactId, const QString &messageText ) +TQString KopeteIface::messageContact( const TQString &contactId, const TQString &messageText ) { Kopete::MetaContact *mc = Kopete::ContactList::self()->findMetaContactByContactId( contactId ); if ( !mc ) @@ -103,18 +103,18 @@ QString KopeteIface::messageContact( const QString &contactId, const QString &me return "The contact is not reachable"; //Default return value - return QString::null; + return TQString::null; } /* -void KopeteIface::sendFile(const QString &displayName, const KURL &sourceURL, - const QString &altFileName, uint fileSize) +void KopeteIface::sendFile(const TQString &displayName, const KURL &sourceURL, + const TQString &altFileName, uint fileSize) { return Kopete::ContactList::self()->sendFile(displayName, sourceURL, altFileName, fileSize); } */ -QString KopeteIface::onlineStatus( const QString &metaContactId ) +TQString KopeteIface::onlineStatus( const TQString &metaContactId ) { Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( metaContactId ); if( m ) @@ -126,7 +126,7 @@ QString KopeteIface::onlineStatus( const QString &metaContactId ) return "Unknown Contact"; } -void KopeteIface::messageContactById( const QString &metaContactId ) +void KopeteIface::messageContactById( const TQString &metaContactId ) { Kopete::MetaContact *m = Kopete::ContactList::self()->metaContact( metaContactId ); if( m ) @@ -135,15 +135,15 @@ void KopeteIface::messageContactById( const QString &metaContactId ) } } -bool KopeteIface::addContact( const QString &protocolName, const QString &accountId, const QString &contactId, - const QString &displayName, const QString &groupName ) +bool KopeteIface::addContact( const TQString &protocolName, const TQString &accountId, const TQString &contactId, + const TQString &displayName, const TQString &groupName ) { //Get the protocol instance Kopete::Account *myAccount = Kopete::AccountManager::self()->findAccount( protocolName, accountId ); if( myAccount ) { - QString contactName; + TQString contactName; Kopete::Group *realGroup=0L; //If the nickName isn't specified we need to display the userId in the prompt if( displayName.isEmpty() || displayName.isNull() ) @@ -180,11 +180,11 @@ bool KopeteIface::addContact( const QString &protocolName, const QString &accoun } } -QStringList KopeteIface::accounts() +TQStringList KopeteIface::accounts() { - QStringList list; - QPtrList m_accounts=Kopete::AccountManager::self()->accounts(); - QPtrListIterator it( m_accounts ); + TQStringList list; + TQPtrList m_accounts=Kopete::AccountManager::self()->accounts(); + TQPtrListIterator it( m_accounts ); Kopete::Account *account; while ( ( account = it.current() ) != 0 ) { @@ -197,9 +197,9 @@ QStringList KopeteIface::accounts() } -void KopeteIface::connect(const QString &protocolId, const QString &accountId ) +void KopeteIface::connect(const TQString &protocolId, const TQString &accountId ) { - QPtrListIterator it( Kopete::AccountManager::self()->accounts() ); + TQPtrListIterator it( Kopete::AccountManager::self()->accounts() ); Kopete::Account *account; while ( ( account = it.current() ) != 0 ) { @@ -216,9 +216,9 @@ void KopeteIface::connect(const QString &protocolId, const QString &accountId ) } } -void KopeteIface::disconnect(const QString &protocolId, const QString &accountId ) +void KopeteIface::disconnect(const TQString &protocolId, const TQString &accountId ) { - QPtrListIterator it( Kopete::AccountManager::self()->accounts() ); + TQPtrListIterator it( Kopete::AccountManager::self()->accounts() ); Kopete::Account *account; while ( ( account = it.current() ) != 0 ) { @@ -245,11 +245,11 @@ void KopeteIface::disconnectAll() Kopete::AccountManager::self()->disconnectAll(); } -bool KopeteIface::loadPlugin( const QString &name ) +bool KopeteIface::loadPlugin( const TQString &name ) { if ( Kopete::PluginManager::self()->setPluginEnabled( name ) ) { - QString argument = name; + TQString argument = name; if ( !argument.startsWith( "kopete_" ) ) argument.prepend( "kopete_" ); return Kopete::PluginManager::self()->loadPlugin( argument ); @@ -260,11 +260,11 @@ bool KopeteIface::loadPlugin( const QString &name ) } } -bool KopeteIface::unloadPlugin( const QString &name ) +bool KopeteIface::unloadPlugin( const TQString &name ) { if ( Kopete::PluginManager::self()->setPluginEnabled( name, false ) ) { - QString argument = name; + TQString argument = name; if ( !argument.startsWith( "kopete_" ) ) argument.prepend( "kopete_" ); return Kopete::PluginManager::self()->unloadPlugin( argument ); @@ -280,7 +280,7 @@ void KopeteIface::setAway() Kopete::AccountManager::self()->setAwayAll(); } -void KopeteIface::setAway(const QString &msg, bool away) +void KopeteIface::setAway(const TQString &msg, bool away) { Kopete::AccountManager::self()->setAwayAll(msg, away); } @@ -295,7 +295,7 @@ void KopeteIface::setAutoAway() Kopete::Away::getInstance()->setAutoAway(); } -void KopeteIface::setGlobalNickname( const QString &nickname ) +void KopeteIface::setGlobalNickname( const TQString &nickname ) { if( Kopete::Config::enableGlobalIdentity() ) { @@ -316,14 +316,14 @@ void KopeteIface::setGlobalPhoto( const KURL &photoUrl ) } } -QStringList KopeteIface::contactsForDisplayName( const QString & displayName ) +TQStringList KopeteIface::contactsForDisplayName( const TQString & displayName ) { Kopete::MetaContact * mc = Kopete::ContactList::self()->findMetaContactByDisplayName( displayName ); - QStringList contactIds; + TQStringList contactIds; if ( mc ) { - QPtrList contacts = mc->contacts(); - QPtrListIterator it( contacts ); + TQPtrList contacts = mc->contacts(); + TQPtrListIterator it( contacts ); for( ; it.current(); ++it ) { contactIds.append( (*it)->contactId() ); @@ -332,13 +332,13 @@ QStringList KopeteIface::contactsForDisplayName( const QString & displayName ) return contactIds; } -QStringList KopeteIface::metacontactsForContactId( const QString & contactId ) +TQStringList KopeteIface::metacontactsForContactId( const TQString & contactId ) { Kopete::MetaContact * mc = Kopete::ContactList::self()->findMetaContactByContactId( contactId ); if ( mc ) - return QStringList( mc->displayName() ); + return TQStringList( mc->displayName() ); else - return QStringList(); + return TQStringList(); } // vim: set noet ts=4 sts=4 sw=4: diff --git a/kopete/kopete/kopeteiface.h b/kopete/kopete/kopeteiface.h index 4ca4c4d1..46a52166 100644 --- a/kopete/kopete/kopeteiface.h +++ b/kopete/kopete/kopeteiface.h @@ -19,7 +19,7 @@ #define KopeteIface_h #include -#include +#include #include #include "kopeteonlinestatus.h" @@ -35,35 +35,35 @@ public: KopeteIface(); k_dcop: - QStringList contacts(); - QStringList reachableContacts(); - QStringList onlineContacts(); - QStringList fileTransferContacts(); - QStringList contactFileProtocols(const QString &displayName); + TQStringList contacts(); + TQStringList reachableContacts(); + TQStringList onlineContacts(); + TQStringList fileTransferContacts(); + TQStringList contactFileProtocols(const TQString &displayName); - /*void sendFile(const QString &displayName, const KURL &sourceURL, - const QString &altFileName = QString::null, uint fileSize = 0);*/ + /*void sendFile(const TQString &displayName, const KURL &sourceURL, + const TQString &altFileName = TQString::null, uint fileSize = 0);*/ // FIXME: Do we *need* this one? Sounds error prone to me, because // nicknames can contain parentheses too. - // Better add a contactStatus( const QString id ) I'd say - Martijn - QStringList contactsStatus(); + // Better add a contactStatus( const TQString id ) I'd say - Martijn + TQStringList contactsStatus(); /** * Open a chat to a contact, and optionally set some initial text */ - QString messageContact( const QString &contactId, const QString &messageText = QString::null ); + TQString messageContact( const TQString &contactId, const TQString &messageText = TQString::null ); /** * Describe the status of a contact by their metaContactId, * aka their uid in KABC. */ - QString onlineStatus( const QString &metaContactId ); + TQString onlineStatus( const TQString &metaContactId ); /** * Message a contact by their metaContactId, aka their uid in KABC. */ - void messageContactById( const QString &metaContactId ); + void messageContactById( const TQString &metaContactId ); /** * Adds a contact with the specified params. @@ -75,23 +75,23 @@ k_dcop: * @param groupName The name of the group to add the contact to * @return Weather or not the contact was added successfully */ - bool addContact( const QString &protocolName, const QString &accountId, const QString &contactId, - const QString &displayName, const QString &groupName = QString::null ); + bool addContact( const TQString &protocolName, const TQString &accountId, const TQString &contactId, + const TQString &displayName, const TQString &groupName = TQString::null ); /** * return a list of alls accounts. * form: XXXProtocol||AccountId */ - QStringList accounts(); + TQStringList accounts(); /** * connect a given account in the given protocol */ - void connect(const QString &protocolName, const QString &accountId); + void connect(const TQString &protocolName, const TQString &accountId); /** * disconnect a given account in the given protocol */ - void disconnect(const QString &protocolName, const QString &accountId); + void disconnect(const TQString &protocolName, const TQString &accountId); /** * Ask all accounts to connect @@ -108,13 +108,13 @@ k_dcop: * the name is the name of the library: example: kopete_msn * but you can ommit the kopete_ prefix */ - bool loadPlugin( const QString& name ); + bool loadPlugin( const TQString& name ); /** * unload a plugin * the name is the name of the library: example: kopete_msn * but you can ommit the kopete_ prefix */ - bool unloadPlugin( const QString& name ); + bool unloadPlugin( const TQString& name ); /** * set all account away using the global away function @@ -125,14 +125,14 @@ k_dcop: * set all account away using the global away function * and set an away message */ - void setAway( const QString &msg ) { setAway( msg, true ); } + void setAway( const TQString &msg ) { setAway( msg, true ); } /** * set all account away using the global away function * and set an away message. * @param away decides if the message is away/non-away */ - void setAway( const QString &msg, bool away ); + void setAway( const TQString &msg, bool away ); /** * set Available all accountes @@ -148,7 +148,7 @@ k_dcop: * set the global nickname if global identity is enabled. * @param nickname the new global nickname */ - void setGlobalNickname( const QString &nickname ); + void setGlobalNickname( const TQString &nickname ); /** * set the global photo if global identity is enabled. @@ -160,13 +160,13 @@ k_dcop: * get the contactIds for a given display name * @param displayName */ - QStringList contactsForDisplayName( const QString & displayName ); + TQStringList contactsForDisplayName( const TQString & displayName ); /** * get the metacontactIds that have the given contactId * @param contactId */ - QStringList metacontactsForContactId( const QString & contactId ); + TQStringList metacontactsForContactId( const TQString & contactId ); }; #endif diff --git a/kopete/kopete/kopetewindow.cpp b/kopete/kopete/kopetewindow.cpp index f3ec502e..e013a95c 100644 --- a/kopete/kopete/kopetewindow.cpp +++ b/kopete/kopete/kopetewindow.cpp @@ -21,14 +21,14 @@ #include "kopetewindow.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -82,11 +82,11 @@ #include "kopeteeditglobalidentitywidget.h" //BEGIN GlobalStatusMessageIconLabel -GlobalStatusMessageIconLabel::GlobalStatusMessageIconLabel(QWidget *parent, const char *name) - : QLabel(parent, name) +GlobalStatusMessageIconLabel::GlobalStatusMessageIconLabel(TQWidget *parent, const char *name) + : TQLabel(parent, name) {} -void GlobalStatusMessageIconLabel::mouseReleaseEvent( QMouseEvent *event ) +void GlobalStatusMessageIconLabel::mouseReleaseEvent( TQMouseEvent *event ) { if( event->button() == Qt::LeftButton || event->button() == Qt::RightButton ) { @@ -120,7 +120,7 @@ void GlobalStatusMessageIconLabel::mouseReleaseEvent( QMouseEvent *event ) * (session) quit. */ -KopeteWindow::KopeteWindow( QWidget *parent, const char *name ) +KopeteWindow::KopeteWindow( TQWidget *parent, const char *name ) : KMainWindow( parent, name, WType_TopLevel ) { // Applications should ensure that their StatusBar exists before calling createGUI() @@ -129,25 +129,25 @@ KopeteWindow::KopeteWindow( QWidget *parent, const char *name ) // This fixes a "statusbar drawn over the top of the toolbar" bug // e.g. it can happen when you switch desktops on Kopete startup - m_statusBarWidget = new QHBox(statusBar(), "m_statusBarWidget"); + m_statusBarWidget = new TQHBox(statusBar(), "m_statusBarWidget"); m_statusBarWidget->setMargin( 2 ); m_statusBarWidget->setSpacing( 1 ); statusBar()->addWidget(m_statusBarWidget, 0, true ); - QHBox *statusBarMessage = new QHBox(statusBar(), "m_statusBarWidget"); + TQHBox *statusBarMessage = new TQHBox(statusBar(), "m_statusBarWidget"); m_statusBarWidget->setMargin( 2 ); m_statusBarWidget->setSpacing( 1 ); GlobalStatusMessageIconLabel *label = new GlobalStatusMessageIconLabel( statusBarMessage, "statusmsglabel" ); label->setFixedSize( 16, 16 ); label->setPixmap( SmallIcon( "kopetestatusmessage" ) ); - connect(label, SIGNAL(iconClicked( const QPoint& )), - this, SLOT(slotGlobalStatusMessageIconClicked( const QPoint& ))); - QToolTip::add( label, i18n( "Global status message" ) ); + connect(label, TQT_SIGNAL(iconClicked( const TQPoint& )), + this, TQT_SLOT(slotGlobalStatusMessageIconClicked( const TQPoint& ))); + TQToolTip::add( label, i18n( "Global status message" ) ); m_globalStatusMessage = new KSqueezedTextLabel( statusBarMessage ); statusBar()->addWidget(statusBarMessage, 1, false ); m_pluginConfig = 0L; - m_autoHideTimer = new QTimer( this ); + m_autoHideTimer = new TQTimer( this ); // -------------------------------------------------------------------------------- initView(); @@ -157,22 +157,22 @@ KopeteWindow::KopeteWindow( QWidget *parent, const char *name ) // -------------------------------------------------------------------------------- // Trap all loaded plugins, so we can add their status bar icons accordingly , also used to add XMLGUIClient - connect( Kopete::PluginManager::self(), SIGNAL( pluginLoaded( Kopete::Plugin * ) ), - this, SLOT( slotPluginLoaded( Kopete::Plugin * ) ) ); - connect( Kopete::PluginManager::self(), SIGNAL( allPluginsLoaded() ), - this, SLOT( slotAllPluginsLoaded() )); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( pluginLoaded( Kopete::Plugin * ) ), + this, TQT_SLOT( slotPluginLoaded( Kopete::Plugin * ) ) ); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( allPluginsLoaded() ), + this, TQT_SLOT( slotAllPluginsLoaded() )); //Connect the appropriate account signals /* Please note that I tried to put this in the slotAllPluginsLoaded() function * but it seemed to break the account icons in the statusbar --Matt */ - connect( Kopete::AccountManager::self(), SIGNAL(accountRegistered(Kopete::Account*)), - this, SLOT(slotAccountRegistered(Kopete::Account*))); - connect( Kopete::AccountManager::self(), SIGNAL(accountUnregistered(const Kopete::Account*)), - this, SLOT(slotAccountUnregistered(const Kopete::Account*))); + connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountRegistered(Kopete::Account*)), + this, TQT_SLOT(slotAccountRegistered(Kopete::Account*))); + connect( Kopete::AccountManager::self(), TQT_SIGNAL(accountUnregistered(const Kopete::Account*)), + this, TQT_SLOT(slotAccountUnregistered(const Kopete::Account*))); - connect( m_autoHideTimer, SIGNAL( timeout() ), this, SLOT( slotAutoHide() ) ); - connect( KopetePrefs::prefs(), SIGNAL( contactListAppearanceChanged() ), - this, SLOT( slotContactListAppearanceChanged() ) ); + connect( m_autoHideTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoHide() ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL( contactListAppearanceChanged() ), + this, TQT_SLOT( slotContactListAppearanceChanged() ) ); createGUI ( "kopeteui.rc", false ); @@ -186,7 +186,7 @@ KopeteWindow::KopeteWindow( QWidget *parent, const char *name ) slotPluginLoaded( *it ); // If some account alrady loaded, build the status icon - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *a=accounts.first() ; a; a=accounts.next() ) slotAccountRegistered(a); @@ -209,22 +209,22 @@ void KopeteWindow::initActions() actionCollection(), "AddContact" ); actionAddContact->setDelayed( false ); // this signal mapper is needed to call slotAddContact with the correct arguments - addContactMapper = new QSignalMapper( this ); - connect( addContactMapper, SIGNAL( mapped( const QString & ) ), - this, SLOT( slotAddContactDialogInternal( const QString & ) ) ); + addContactMapper = new TQSignalMapper( this ); + connect( addContactMapper, TQT_SIGNAL( mapped( const TQString & ) ), + this, TQT_SLOT( slotAddContactDialogInternal( const TQString & ) ) ); /* ConnectAll is now obsolete. "Go online" has replaced it. actionConnect = new KAction( i18n( "&Connect Accounts" ), "connect_creating", - 0, Kopete::AccountManager::self(), SLOT( connectAll() ), + 0, Kopete::AccountManager::self(), TQT_SLOT( connectAll() ), actionCollection(), "ConnectAll" ); */ actionDisconnect = new KAction( i18n( "O&ffline" ), "connect_no", - 0, this, SLOT( slotDisconnectAll() ), + 0, this, TQT_SLOT( slotDisconnectAll() ), actionCollection(), "DisconnectAll" ); actionExportContacts = new KAction( i18n( "&Export Contacts..." ), "", 0, this, - SLOT( showExportDialog() ),actionCollection(), "ExportContacts" ); + TQT_SLOT( showExportDialog() ),actionCollection(), "ExportContacts" ); /* the connection menu has been replaced by the set status menu actionConnectionMenu = new KActionMenu( i18n("Connection"),"connect_established", @@ -238,28 +238,28 @@ void KopeteWindow::initActions() actionDisconnect->setEnabled(false); selectAway = new KAction( i18n("&Away"), SmallIcon("kopeteaway"), 0, - this, SLOT( slotGlobalAway() ), actionCollection(), + this, TQT_SLOT( slotGlobalAway() ), actionCollection(), "SetAwayAll" ); selectBusy = new KAction( i18n("&Busy"), SmallIcon("kopeteaway"), 0, - this, SLOT( slotGlobalBusy() ), actionCollection(), + this, TQT_SLOT( slotGlobalBusy() ), actionCollection(), "SetBusyAll" ); actionSetInvisible = new KAction( i18n( "&Invisible" ), "kopeteavailable", 0 , - this, SLOT( slotSetInvisibleAll() ), actionCollection(), + this, TQT_SLOT( slotSetInvisibleAll() ), actionCollection(), "SetInvisibleAll" ); /*actionSetAvailable = new KAction( i18n( "&Online" ), "kopeteavailable", 0 , Kopete::AccountManager::self(), - SLOT( setAvailableAll() ), actionCollection(), + TQT_SLOT( setAvailableAll() ), actionCollection(), "SetAvailableAll" );*/ actionSetAvailable = new KAction( i18n("&Online"), SmallIcon("kopeteavailable"), 0, this, - SLOT( slotGlobalAvailable() ), actionCollection(), + TQT_SLOT( slotGlobalAvailable() ), actionCollection(), "SetAvailableAll" ); actionAwayMenu = new KActionMenu( i18n("&Set Status"), "kopeteavailable", @@ -273,40 +273,40 @@ void KopeteWindow::initActions() actionPrefs = KopeteStdAction::preferences( actionCollection(), "settings_prefs" ); - KStdAction::quit(this, SLOT(slotQuit()), actionCollection()); + KStdAction::quit(this, TQT_SLOT(slotQuit()), actionCollection()); setStandardToolBarMenuEnabled(true); - menubarAction = KStdAction::showMenubar(this, SLOT(showMenubar()), actionCollection(), "settings_showmenubar" ); - statusbarAction = KStdAction::showStatusbar(this, SLOT(showStatusbar()), actionCollection(), "settings_showstatusbar"); + menubarAction = KStdAction::showMenubar(this, TQT_SLOT(showMenubar()), actionCollection(), "settings_showmenubar" ); + statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(showStatusbar()), actionCollection(), "settings_showstatusbar"); - KStdAction::keyBindings( guiFactory(), SLOT( configureShortcuts() ), actionCollection(), "settings_keys" ); + KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ), actionCollection(), "settings_keys" ); new KAction( i18n( "Configure Plugins..." ), "input_devices_settings", 0, this, - SLOT( slotConfigurePlugins() ), actionCollection(), "settings_plugins" ); + TQT_SLOT( slotConfigurePlugins() ), actionCollection(), "settings_plugins" ); new KAction( i18n( "Configure &Global Shortcuts..." ), "configure_shortcuts", 0, this, - SLOT( slotConfGlobalKeys() ), actionCollection(), "settings_global" ); + TQT_SLOT( slotConfGlobalKeys() ), actionCollection(), "settings_global" ); - KStdAction::configureToolbars( this, SLOT(slotConfToolbar()), actionCollection() ); - KStdAction::configureNotifications(this, SLOT(slotConfNotifications()), actionCollection(), "settings_notifications" ); + KStdAction::configureToolbars( this, TQT_SLOT(slotConfToolbar()), actionCollection() ); + KStdAction::configureNotifications(this, TQT_SLOT(slotConfNotifications()), actionCollection(), "settings_notifications" ); actionShowOffliners = new KToggleAction( i18n( "Show Offline &Users" ), "show_offliners", CTRL + Key_U, - this, SLOT( slotToggleShowOffliners() ), actionCollection(), "settings_show_offliners" ); + this, TQT_SLOT( slotToggleShowOffliners() ), actionCollection(), "settings_show_offliners" ); actionShowEmptyGroups = new KToggleAction( i18n( "Show Empty &Groups" ), "folder", CTRL + Key_G, - this, SLOT( slotToggleShowEmptyGroups() ), actionCollection(), "settings_show_empty_groups" ); + this, TQT_SLOT( slotToggleShowEmptyGroups() ), actionCollection(), "settings_show_empty_groups" ); actionShowOffliners->setCheckedState(i18n("Hide Offline &Users")); actionShowEmptyGroups->setCheckedState(i18n("Hide Empty &Groups")); // quick search bar - QLabel *searchLabel = new QLabel( i18n("Se&arch:"), 0, "kde toolbar widget" ); - QWidget *searchBar = new Kopete::UI::ListView::SearchLine( 0, contactlist, "quicksearch_bar" ); + TQLabel *searchLabel = new TQLabel( i18n("Se&arch:"), 0, "kde toolbar widget" ); + TQWidget *searchBar = new Kopete::UI::ListView::SearchLine( 0, contactlist, "quicksearch_bar" ); searchLabel->setBuddy( searchBar ); KWidgetAction *quickSearch = new KWidgetAction( searchBar, i18n( "Quick Search Bar" ), 0, 0, 0, actionCollection(), "quicksearch_bar" ); new KWidgetAction( searchLabel, i18n( "Search:" ), 0, 0, 0, actionCollection(), "quicksearch_label" ); quickSearch->setAutoSized( true ); // quick search bar - clear button KAction *resetQuickSearch = new KAction( i18n( "Reset Quick Search" ), - QApplication::reverseLayout() ? "clear_left" : "locationbar_erase", - 0, searchBar, SLOT( clear() ), actionCollection(), "quicksearch_reset" ); + TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase", + 0, searchBar, TQT_SLOT( clear() ), actionCollection(), "quicksearch_reset" ); resetQuickSearch->setWhatsThis( i18n( "Reset Quick Search\n" "Resets the quick search so that all contacts and groups are shown again." ) ); @@ -319,22 +319,22 @@ void KopeteWindow::initActions() // KActionMenu for selecting the global status message(kopeteonlinestatus_0) KActionMenu * setStatusMenu = new KActionMenu( i18n( "Set Status Message" ), "kopeteeditstatusmessage", actionCollection(), "SetStatusMessage" ); setStatusMenu->setDelayed( false ); - connect( setStatusMenu->popupMenu(), SIGNAL( aboutToShow() ), SLOT(slotBuildStatusMessageMenu() ) ); - connect( setStatusMenu->popupMenu(), SIGNAL( activated( int ) ), SLOT(slotStatusMessageSelected( int ) ) ); + connect( setStatusMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ), TQT_SLOT(slotBuildStatusMessageMenu() ) ); + connect( setStatusMenu->popupMenu(), TQT_SIGNAL( activated( int ) ), TQT_SLOT(slotStatusMessageSelected( int ) ) ); // sync actions, config and prefs-dialog - connect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) ); + connect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) ); slotConfigChanged(); globalAccel = new KGlobalAccel( this ); - globalAccel->insert( QString::fromLatin1("Read Message"), i18n("Read Message"), i18n("Read the next pending message"), - CTRL+SHIFT+Key_I, KKey::QtWIN+CTRL+Key_I, Kopete::ChatSessionManager::self(), SLOT(slotReadMessage()) ); + globalAccel->insert( TQString::fromLatin1("Read Message"), i18n("Read Message"), i18n("Read the next pending message"), + CTRL+SHIFT+Key_I, KKey::QtWIN+CTRL+Key_I, Kopete::ChatSessionManager::self(), TQT_SLOT(slotReadMessage()) ); - globalAccel->insert( QString::fromLatin1("Show/Hide Contact List"), i18n("Show/Hide Contact List"), i18n("Show or hide the contact list"), - CTRL+SHIFT+Key_S, KKey::QtWIN+CTRL+Key_S, this, SLOT(slotShowHide()) ); + globalAccel->insert( TQString::fromLatin1("Show/Hide Contact List"), i18n("Show/Hide Contact List"), i18n("Show or hide the contact list"), + CTRL+SHIFT+Key_S, KKey::QtWIN+CTRL+Key_S, this, TQT_SLOT(slotShowHide()) ); - globalAccel->insert( QString::fromLatin1("Set Away/Back"), i18n("Set Away/Back"), i18n("Sets away from keyboard or sets back"), - CTRL+SHIFT+Key_W, KKey::QtWIN+CTRL+SHIFT+Key_W, this, SLOT(slotToggleAway()) ); + globalAccel->insert( TQString::fromLatin1("Set Away/Back"), i18n("Set Away/Back"), i18n("Sets away from keyboard or sets back"), + CTRL+SHIFT+Key_W, KKey::QtWIN+CTRL+SHIFT+Key_W, this, TQT_SLOT(slotToggleAway()) ); globalAccel->readSettings(); globalAccel->updateConnections(); @@ -371,7 +371,7 @@ void KopeteWindow::slotToggleAway() } else { - QString awayReason = mAway->getMessage( 0 ); + TQString awayReason = mAway->getMessage( 0 ); slotGlobalAway(); } } @@ -391,9 +391,9 @@ void KopeteWindow::initSystray() //actionConnectionMenu->plug ( tm, 1 ); tm->insertSeparator( 1 ); - QObject::connect( m_tray, SIGNAL( aboutToShowMenu( KPopupMenu * ) ), - this, SLOT( slotTrayAboutToShowMenu( KPopupMenu * ) ) ); - QObject::connect( m_tray, SIGNAL( quitSelected() ), this, SLOT( slotQuit() ) ); + TQObject::connect( m_tray, TQT_SIGNAL( aboutToShowMenu( KPopupMenu * ) ), + this, TQT_SLOT( slotTrayAboutToShowMenu( KPopupMenu * ) ) ); + TQObject::connect( m_tray, TQT_SIGNAL( quitSelected() ), this, TQT_SLOT( slotQuit() ) ); } KopeteWindow::~KopeteWindow() @@ -401,7 +401,7 @@ KopeteWindow::~KopeteWindow() delete m_pluginConfig; } -bool KopeteWindow::eventFilter( QObject* target, QEvent* event ) +bool KopeteWindow::eventFilter( TQObject* target, TQEvent* event ) { KToolBar* toolBar = dynamic_cast( target ); KAction* resetAction = actionCollection()->action( "quicksearch_reset" ); @@ -409,7 +409,7 @@ bool KopeteWindow::eventFilter( QObject* target, QEvent* event ) if ( toolBar && resetAction && resetAction->isPlugged( toolBar ) ) { - if ( event->type() == QEvent::Hide ) + if ( event->type() == TQEvent::Hide ) { resetAction->activate(); return true; @@ -430,16 +430,16 @@ void KopeteWindow::loadOptions() // FIXME: HACK: Is there a way to do that automatic ? editGlobalIdentityWidget->setIconSize(toolBar("editGlobalIdentityBar")->iconSize()); - connect(toolBar("editGlobalIdentityBar"), SIGNAL(modechange()), editGlobalIdentityWidget, SLOT(iconSizeChanged())); + connect(toolBar("editGlobalIdentityBar"), TQT_SIGNAL(modechange()), editGlobalIdentityWidget, TQT_SLOT(iconSizeChanged())); applyMainWindowSettings( config, "General Options" ); config->setGroup("General Options"); - QPoint pos = config->readPointEntry("Position"); + TQPoint pos = config->readPointEntry("Position"); move(pos); - QSize size = config->readSizeEntry("Geometry"); + TQSize size = config->readSizeEntry("Geometry"); if(size.isEmpty()) // Default size - resize( QSize(220, 350) ); + resize( TQSize(220, 350) ); else resize(size); @@ -449,7 +449,7 @@ void KopeteWindow::loadOptions() m_autoHideTimeout = p->contactListAutoHideTimeout(); - QString tmp = config->readEntry("State", "Shown"); + TQString tmp = config->readEntry("State", "Shown"); if ( tmp == "Minimized" && p->showTray()) { showMinimized(); @@ -518,9 +518,9 @@ void KopeteWindow::slotToggleShowOffliners() KopetePrefs *p = KopetePrefs::prefs(); p->setShowOffline ( actionShowOffliners->isChecked() ); - disconnect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) ); + disconnect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) ); p->save(); - connect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) ); + connect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) ); } void KopeteWindow::slotToggleShowEmptyGroups() @@ -528,9 +528,9 @@ void KopeteWindow::slotToggleShowEmptyGroups() KopetePrefs *p = KopetePrefs::prefs(); p->setShowEmptyGroups ( actionShowEmptyGroups->isChecked() ); - disconnect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) ); + disconnect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) ); p->save(); - connect ( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged()) ); + connect ( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged()) ); } void KopeteWindow::slotConfigChanged() @@ -578,8 +578,8 @@ void KopeteWindow::slotConfToolbar() { saveMainWindowSettings(KGlobal::config(), "General Options"); KEditToolbar *dlg = new KEditToolbar(factory()); - connect( dlg, SIGNAL(newToolbarConfig()), this, SLOT(slotUpdateToolbar()) ); - connect( dlg, SIGNAL(finished()) , dlg, SLOT(deleteLater())); + connect( dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotUpdateToolbar()) ); + connect( dlg, TQT_SIGNAL(finished()) , dlg, TQT_SLOT(deleteLater())); dlg->show(); } @@ -612,7 +612,7 @@ void KopeteWindow::slotSetInvisibleAll() void KopeteWindow::slotDisconnectAll() { m_globalStatusMessage->setText( "" ); - m_globalStatusMessageStored = QString(); + m_globalStatusMessageStored = TQString(); Kopete::AccountManager::self()->disconnectAll(); } @@ -651,7 +651,7 @@ bool KopeteWindow::queryExit() return false; } -void KopeteWindow::closeEvent( QCloseEvent *e ) +void KopeteWindow::closeEvent( TQCloseEvent *e ) { // if there's a system tray applet and we are not shutting down then just do what needs to be done if a // window is closed. @@ -704,46 +704,46 @@ void KopeteWindow::slotAccountRegistered( Kopete::Account *account ) actionDisconnect->setEnabled(true); connect( account->myself(), - SIGNAL(onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ), - this, SLOT( slotAccountStatusIconChanged( Kopete::Contact * ) ) ); + TQT_SIGNAL(onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ), + this, TQT_SLOT( slotAccountStatusIconChanged( Kopete::Contact * ) ) ); -// connect( account, SIGNAL( iconAppearanceChanged() ), SLOT( slotAccountStatusIconChanged() ) ); - connect( account, SIGNAL( colorChanged(const QColor& ) ), SLOT( slotAccountStatusIconChanged() ) ); +// connect( account, TQT_SIGNAL( iconAppearanceChanged() ), TQT_SLOT( slotAccountStatusIconChanged() ) ); + connect( account, TQT_SIGNAL( colorChanged(const TQColor& ) ), TQT_SLOT( slotAccountStatusIconChanged() ) ); connect( account->myself(), - SIGNAL(propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotAccountStatusIconChanged( Kopete::Contact* ) ) ); + TQT_SIGNAL(propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotAccountStatusIconChanged( Kopete::Contact* ) ) ); KopeteAccountStatusBarIcon *sbIcon = new KopeteAccountStatusBarIcon( account, m_statusBarWidget ); - connect( sbIcon, SIGNAL( rightClicked( Kopete::Account *, const QPoint & ) ), - SLOT( slotAccountStatusIconRightClicked( Kopete::Account *, - const QPoint & ) ) ); - connect( sbIcon, SIGNAL( leftClicked( Kopete::Account *, const QPoint & ) ), - SLOT( slotAccountStatusIconRightClicked( Kopete::Account *, - const QPoint & ) ) ); + connect( sbIcon, TQT_SIGNAL( rightClicked( Kopete::Account *, const TQPoint & ) ), + TQT_SLOT( slotAccountStatusIconRightClicked( Kopete::Account *, + const TQPoint & ) ) ); + connect( sbIcon, TQT_SIGNAL( leftClicked( Kopete::Account *, const TQPoint & ) ), + TQT_SLOT( slotAccountStatusIconRightClicked( Kopete::Account *, + const TQPoint & ) ) ); m_accountStatusBarIcons.insert( account, sbIcon ); slotAccountStatusIconChanged( account->myself() ); // add an item for this account to the add contact actionmenu - QString s = "actionAdd%1Contact"; + TQString s = "actionAdd%1Contact"; s.arg( account->accountId() ); - KAction *action = new KAction( account->accountLabel(), account->accountIcon(), 0 , addContactMapper, SLOT( map() ), account, s.latin1() ); - addContactMapper->setMapping( action, account->protocol()->pluginId() + QChar(0xE000) + account->accountId() ); + KAction *action = new KAction( account->accountLabel(), account->accountIcon(), 0 , addContactMapper, TQT_SLOT( map() ), account, s.latin1() ); + addContactMapper->setMapping( action, account->protocol()->pluginId() + TQChar(0xE000) + account->accountId() ); actionAddContact->insert( action ); } void KopeteWindow::slotAccountUnregistered( const Kopete::Account *account) { // kdDebug(14000) << k_funcinfo << "Called." << endl; - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); if (accounts.isEmpty()) { // actionConnect->setEnabled(false); actionDisconnect->setEnabled(false); } - // the (void*) is to remove the const. i don't know why QPtrList doesn't accept const ptr as key. + // the (void*) is to remove the const. i don't know why TQPtrList doesn't accept const ptr as key. KopeteAccountStatusBarIcon *sbIcon = static_cast( m_accountStatusBarIcons[ (void*)account ] ); if( !sbIcon ) @@ -755,7 +755,7 @@ void KopeteWindow::slotAccountUnregistered( const Kopete::Account *account) makeTrayToolTip(); // update add contact actionmenu - QString s = "actionAdd%1Contact"; + TQString s = "actionAdd%1Contact"; s.arg( account->accountId() ); // KAction * action = actionCollection()->action( account->accountId() ); Kopete::Account * myAccount = const_cast< Kopete::Account * > ( account ); @@ -778,11 +778,11 @@ void KopeteWindow::slotAccountStatusIconChanged( Kopete::Contact *contact ) { kdDebug( 14000 ) << k_funcinfo << contact->property( Kopete::Global::Properties::self()->awayMessage() ).value() << endl; // update the global status label if the change doesn't -// QString newAwayMessage = contact->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString(); +// TQString newAwayMessage = contact->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString(); Kopete::OnlineStatus status = contact->onlineStatus(); /* if ( status.status() != Kopete::OnlineStatus::Connecting ) { - QString globalMessage = m_globalStatusMessage->text(); + TQString globalMessage = m_globalStatusMessage->text(); if ( newAwayMessage != globalMessage ) m_globalStatusMessage->setText( "" /* i18n("status message to show when different accounts have different status messages", "(multiple)" )*/ /*); }*/ @@ -799,8 +799,8 @@ void KopeteWindow::slotAccountStatusIconChanged( Kopete::Contact *contact ) else //If the account has not status message, it may be because the protocol doesn't support it (Bug 132609) { // or because the user just set an empty status to this account. // We will check if another account has still a status message, if yes, we will use it, if not, we will clear it. - QString statusMessageToUse; - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQString statusMessageToUse; + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *a = accounts.first(); a; a = accounts.next()) { Kopete::Contact *self = a->myself(); @@ -823,22 +823,22 @@ void KopeteWindow::slotAccountStatusIconChanged( Kopete::Contact *contact ) // Adds tooltip for each status icon, // useful in case you have many accounts // over one protocol - QToolTip::remove( i ); - QToolTip::add( i, contact->toolTip() ); + TQToolTip::remove( i ); + TQToolTip::add( i, contact->toolTip() ); // Because we want null pixmaps to detect the need for a loadMovie // we can't use the SmallIcon() method directly KIconLoader *loader = KGlobal::instance()->iconLoader(); - QMovie mv = loader->loadMovie( status.overlayIcons().first(), KIcon::Small ); + TQMovie mv = loader->loadMovie( status.overlayIcons().first(), KIcon::Small ); if ( mv.isNull() ) { // No movie found, fallback to pixmap // Get the icon for our status - //QPixmap pm = SmallIcon( icon ); - QPixmap pm = status.iconFor( contact->account() ); + //TQPixmap pm = SmallIcon( icon ); + TQPixmap pm = status.iconFor( contact->account() ); // No Pixmap found, fallback to Unknown if( pm.isNull() ) @@ -859,10 +859,10 @@ void KopeteWindow::makeTrayToolTip() //the tool-tip of the systemtray. if(m_tray) { - QToolTip::remove(m_tray); + TQToolTip::remove(m_tray); - QString tt = QString::fromLatin1(""); - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQString tt = TQString::fromLatin1(""); + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *a = accounts.first(); a; a = accounts.next()) { Kopete::Contact *self = a->myself(); @@ -871,45 +871,45 @@ void KopeteWindow::makeTrayToolTip() .arg( a->protocol()->displayName() ).arg( a->accountLabel(), KURL::encode_string( a->protocol()->pluginId() ), KURL::encode_string( a->accountId() ), self->onlineStatus().description() ); } - tt += QString::fromLatin1(""); - QToolTip::add(m_tray, tt); + tt += TQString::fromLatin1(""); + TQToolTip::add(m_tray, tt); } } -void KopeteWindow::slotAccountStatusIconRightClicked( Kopete::Account *account, const QPoint &p ) +void KopeteWindow::slotAccountStatusIconRightClicked( Kopete::Account *account, const TQPoint &p ) { KActionMenu *actionMenu = account->actionMenu(); if ( !actionMenu ) return; - connect( actionMenu->popupMenu(), SIGNAL( aboutToHide() ), actionMenu, SLOT( deleteLater() ) ); + connect( actionMenu->popupMenu(), TQT_SIGNAL( aboutToHide() ), actionMenu, TQT_SLOT( deleteLater() ) ); actionMenu->popupMenu()->popup( p ); } void KopeteWindow::slotTrayAboutToShowMenu( KPopupMenu * popup ) { - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *a=accounts.first() ; a; a=accounts.next() ) { KActionMenu *menu = a->actionMenu(); if( menu ) menu->plug(popup, 1 ); - connect(popup , SIGNAL(aboutToHide()) , menu , SLOT(deleteLater())); + connect(popup , TQT_SIGNAL(aboutToHide()) , menu , TQT_SLOT(deleteLater())); } } -/*void KopeteWindow::slotProtocolStatusIconRightClicked( Kopete::Protocol *proto, const QPoint &p ) +/*void KopeteWindow::slotProtocolStatusIconRightClicked( Kopete::Protocol *proto, const TQPoint &p ) { //kdDebug( 14000 ) << k_funcinfo << endl; if ( Kopete::AccountManager::self()->accounts( proto ).count() > 0 ) { KActionMenu *menu = proto->protocolActions(); - connect( menu->popupMenu(), SIGNAL( aboutToHide() ), menu, SLOT( deleteLater() ) ); + connect( menu->popupMenu(), TQT_SIGNAL( aboutToHide() ), menu, TQT_SLOT( deleteLater() ) ); menu->popupMenu()->popup( p ); } }*/ @@ -919,19 +919,19 @@ void KopeteWindow::showExportDialog() ( new KabcExportWizard( this, "export_contact_dialog" ) )->show(); } -void KopeteWindow::leaveEvent( QEvent * ) +void KopeteWindow::leaveEvent( TQEvent * ) { startAutoHideTimer(); } -void KopeteWindow::showEvent( QShowEvent * ) +void KopeteWindow::showEvent( TQShowEvent * ) { startAutoHideTimer(); } void KopeteWindow::slotAutoHide() { - if ( this->geometry().contains( QCursor::pos() ) == false ) + if ( this->geometry().contains( TQCursor::pos() ) == false ) { /* The autohide-timer doesn't need to emit * timeouts when the window is hidden already. */ @@ -948,10 +948,10 @@ void KopeteWindow::startAutoHideTimer() // Iterate each connected account, updating its status message bug keeping the // same onlinestatus. Then update Kopete::Away and the UI. -void KopeteWindow::setStatusMessage( const QString & message ) +void KopeteWindow::setStatusMessage( const TQString & message ) { bool changed = false; - for ( QPtrListIterator it( Kopete::AccountManager::self()->accounts() ); it.current(); ++it ) + for ( TQPtrListIterator it( Kopete::AccountManager::self()->accounts() ); it.current(); ++it ) { Kopete::Contact *self = it.current()->myself(); bool isInvisible = self && self->onlineStatus().status() == Kopete::OnlineStatus::Invisible; @@ -968,28 +968,28 @@ void KopeteWindow::setStatusMessage( const QString & message ) void KopeteWindow::slotBuildStatusMessageMenu() { - QObject * senderObj = const_cast( sender() ); + TQObject * senderObj = const_cast( sender() ); m_globalStatusMessageMenu = static_cast( senderObj ); m_globalStatusMessageMenu->clear(); // pop up a menu containing the away messages, and a lineedit // see kopeteaway //messageMenu = new KPopupMenu( this ); // messageMenu->insertTitle( i18n( "Status Message" ) ); - QHBox * newMessageBox = new QHBox( 0 ); + TQHBox * newMessageBox = new TQHBox( 0 ); newMessageBox->setMargin( 1 ); - QLabel * newMessagePix = new QLabel( newMessageBox ); + TQLabel * newMessagePix = new TQLabel( newMessageBox ); newMessagePix->setPixmap( SmallIcon( "edit" ) ); -/* QLabel * newMessageLabel = new QLabel( i18n( "Add " ), newMessageBox );*/ - m_newMessageEdit = new QLineEdit( newMessageBox, "newmessage" ); +/* TQLabel * newMessageLabel = new TQLabel( i18n( "Add " ), newMessageBox );*/ + m_newMessageEdit = new TQLineEdit( newMessageBox, "newmessage" ); newMessageBox->setFocusProxy( m_newMessageEdit ); - newMessageBox->setFocusPolicy( QWidget::ClickFocus ); + newMessageBox->setFocusPolicy( TQWidget::ClickFocus ); /* newMessageLabel->setFocusProxy( newMessageEdit ); newMessageLabel->setBuddy( newMessageEdit ); - newMessageLabel->setFocusPolicy( QWidget::ClickFocus );*/ + newMessageLabel->setFocusPolicy( TQWidget::ClickFocus );*/ newMessagePix->setFocusProxy( m_newMessageEdit ); - newMessagePix->setFocusPolicy( QWidget::ClickFocus ); - connect( m_newMessageEdit, SIGNAL( returnPressed() ), SLOT( slotNewStatusMessageEntered() ) ); + newMessagePix->setFocusPolicy( TQWidget::ClickFocus ); + connect( m_newMessageEdit, TQT_SIGNAL( returnPressed() ), TQT_SLOT( slotNewStatusMessageEntered() ) ); m_globalStatusMessageMenu->insertItem( newMessageBox ); @@ -998,13 +998,13 @@ void KopeteWindow::slotBuildStatusMessageMenu() m_globalStatusMessageMenu->insertItem( SmallIcon( "remove" ), i18n( "No Message" ), i++ ); m_globalStatusMessageMenu->insertSeparator(); - QStringList awayMessages = Kopete::Away::getInstance()->getMessages(); - for( QStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it, ++i ) + TQStringList awayMessages = Kopete::Away::getInstance()->getMessages(); + for( TQStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it, ++i ) { m_globalStatusMessageMenu->insertItem( KStringHandler::rsqueeze( *it ), i ); } -// connect( m_globalStatusMessageMenu, SIGNAL( activated( int ) ), SLOT( slotStatusMessageSelected( int ) ) ); -// connect( messageMenu, SIGNAL( aboutToHide() ), messageMenu, SLOT( deleteLater() ) ); +// connect( m_globalStatusMessageMenu, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotStatusMessageSelected( int ) ) ); +// connect( messageMenu, TQT_SIGNAL( aboutToHide() ), messageMenu, TQT_SLOT( deleteLater() ) ); m_newMessageEdit->setFocus(); @@ -1023,27 +1023,27 @@ void KopeteWindow::slotStatusMessageSelected( int i ) void KopeteWindow::slotNewStatusMessageEntered() { m_globalStatusMessageMenu->close(); - QString newMessage = m_newMessageEdit->text(); + TQString newMessage = m_newMessageEdit->text(); if ( !newMessage.isEmpty() ) Kopete::Away::getInstance()->addMessage( newMessage ); setStatusMessage( m_newMessageEdit->text() ); } -void KopeteWindow::slotGlobalStatusMessageIconClicked( const QPoint &position ) +void KopeteWindow::slotGlobalStatusMessageIconClicked( const TQPoint &position ) { KPopupMenu *statusMessageIconMenu = new KPopupMenu(this, "statusMessageIconMenu"); - connect(statusMessageIconMenu, SIGNAL( aboutToShow() ), - this, SLOT(slotBuildStatusMessageMenu())); - connect( statusMessageIconMenu, SIGNAL( activated( int ) ), - SLOT( slotStatusMessageSelected( int ) ) ); + connect(statusMessageIconMenu, TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT(slotBuildStatusMessageMenu())); + connect( statusMessageIconMenu, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotStatusMessageSelected( int ) ) ); statusMessageIconMenu->popup(position); } -void KopeteWindow::slotAddContactDialogInternal( const QString & accountIdentifier ) +void KopeteWindow::slotAddContactDialogInternal( const TQString & accountIdentifier ) { - QString protocolId = accountIdentifier.section( QChar(0xE000), 0, 0 ); - QString accountId = accountIdentifier.section( QChar(0xE000), 1, 1 ); + TQString protocolId = accountIdentifier.section( TQChar(0xE000), 0, 0 ); + TQString accountId = accountIdentifier.section( TQChar(0xE000), 1, 1 ); Kopete::Account *account = Kopete::AccountManager::self()->findAccount( protocolId, accountId ); showAddContactDialog( account ); } @@ -1059,7 +1059,7 @@ void KopeteWindow::showAddContactDialog( Kopete::Account * account ) i18n( "Add Contact" ), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ); - QVBox * mainWid = new QVBox( addDialog ); + TQVBox * mainWid = new TQVBox( addDialog ); AddContactPage *addContactPage = account->protocol()->createAddContactWidget( mainWid, account ); @@ -1068,10 +1068,10 @@ void KopeteWindow::showAddContactDialog( Kopete::Account * account ) // Populate the groups list Kopete::GroupList groups=Kopete::ContactList::self()->groups(); - QDict groupItems; + TQDict groupItems; for( Kopete::Group *it = groups.first(); it; it = groups.next() ) { - QString groupname = it->displayName(); + TQString groupname = it->displayName(); if ( !groupname.isEmpty() ) { groupItems.insert( groupname, it ); @@ -1087,7 +1087,7 @@ void KopeteWindow::showAddContactDialog( Kopete::Account * account ) else { addDialog->setMainWidget( mainWid ); - if( addDialog->exec() == QDialog::Accepted ) + if( addDialog->exec() == TQDialog::Accepted ) { if( addContactPage->validateData() ) { diff --git a/kopete/kopete/kopetewindow.h b/kopete/kopete/kopetewindow.h index cc466883..158b2805 100644 --- a/kopete/kopete/kopetewindow.h +++ b/kopete/kopete/kopetewindow.h @@ -20,10 +20,10 @@ #ifndef KOPETEWINDOW_H #define KOPETEWINDOW_H -#include +#include #include -#include +#include class QHBox; class QTimer; @@ -63,15 +63,15 @@ class KopeteWindow : public KMainWindow Q_OBJECT public: - KopeteWindow ( QWidget *parent = 0, const char *name = 0 ); + KopeteWindow ( TQWidget *parent = 0, const char *name = 0 ); ~KopeteWindow(); - virtual bool eventFilter( QObject* o, QEvent* e ); + virtual bool eventFilter( TQObject* o, TQEvent* e ); protected: - virtual void closeEvent( QCloseEvent *ev ); - virtual void leaveEvent( QEvent* ev ); - virtual void showEvent( QShowEvent* ev ); + virtual void closeEvent( TQCloseEvent *ev ); + virtual void leaveEvent( TQEvent* ev ); + virtual void showEvent( TQShowEvent* ev ); private slots: void showMenubar(); @@ -89,7 +89,7 @@ private slots: /* show the global status message selector menu */ - void setStatusMessage( const QString & ); + void setStatusMessage( const TQString & ); /** * Checks if the mousecursor is in the contact list. @@ -146,13 +146,13 @@ private slots: /** * Show a context menu for a protocol */ -// void slotProtocolStatusIconRightClicked( Kopete::Protocol *proto, const QPoint &p ); +// void slotProtocolStatusIconRightClicked( Kopete::Protocol *proto, const TQPoint &p ); /** * Show a context menu for an account */ void slotAccountStatusIconRightClicked( Kopete::Account *a, - const QPoint &p ); + const TQPoint &p ); void slotTrayAboutToShowMenu(KPopupMenu *); @@ -183,15 +183,15 @@ private slots: /** * Show the set global status message menu when clicking on the icon in the status bar. */ - void slotGlobalStatusMessageIconClicked( const QPoint &position ); + void slotGlobalStatusMessageIconClicked( const TQPoint &position ); /** - * Extracts protocolId and accountId from the single QString argument signalled by a QSignalMapper, + * Extracts protocolId and accountId from the single TQString argument signalled by a TQSignalMapper, * get the account, and call showAddContactDialog. - * @param accountIdentifer QString of protocolId and accountId, concatenated with QChar( 0xE000 ) - * We need both to uniquely identify an account, but QSignalMapper only emits one QString. + * @param accountIdentifer TQString of protocolId and accountId, concatenated with TQChar( 0xE000 ) + * We need both to uniquely identify an account, but TQSignalMapper only emits one TQString. */ - void slotAddContactDialogInternal( const QString & accountIdentifier ); + void slotAddContactDialogInternal( const TQString & accountIdentifier ); public: KopeteContactListView *contactlist; @@ -238,27 +238,27 @@ private: int docked; bool hidden; int deskRight; - QPoint position; - QHBox *m_statusBarWidget; + TQPoint position; + TQHBox *m_statusBarWidget; KopeteSystemTray *m_tray; bool m_autoHide; unsigned int m_autoHideTimeout; - QTimer* m_autoHideTimer; - QSignalMapper* addContactMapper; + TQTimer* m_autoHideTimer; + TQSignalMapper* addContactMapper; KopetePluginConfig *m_pluginConfig; /** * This is really a dictionary of KopeteAccountStatusBarIcon objects, but - * QPtrDict requires a full class definition to be known to make + * TQPtrDict requires a full class definition to be known to make * that work. And since I don't want to include that whole file here, - * use QObject instead. + * use TQObject instead. */ - QPtrDict m_accountStatusBarIcons; + TQPtrDict m_accountStatusBarIcons; KSqueezedTextLabel * m_globalStatusMessage; KPopupMenu * m_globalStatusMessageMenu; - QLineEdit * m_newMessageEdit; - QString m_globalStatusMessageStored; + TQLineEdit * m_newMessageEdit; + TQString m_globalStatusMessageStored; }; @@ -266,13 +266,13 @@ class GlobalStatusMessageIconLabel : public QLabel { Q_OBJECT public: - GlobalStatusMessageIconLabel(QWidget *parent = 0, const char *name = 0); + GlobalStatusMessageIconLabel(TQWidget *parent = 0, const char *name = 0); protected: - void mouseReleaseEvent(QMouseEvent *event); + void mouseReleaseEvent(TQMouseEvent *event); signals: - void iconClicked(const QPoint &position); + void iconClicked(const TQPoint &position); }; diff --git a/kopete/kopete/systemtray.cpp b/kopete/kopete/systemtray.cpp index 5ed018c5..d71b3816 100644 --- a/kopete/kopete/systemtray.cpp +++ b/kopete/kopete/systemtray.cpp @@ -19,9 +19,9 @@ #include "systemtray.h" -#include -#include -#include +#include +#include +#include #include #include @@ -41,7 +41,7 @@ KopeteSystemTray* KopeteSystemTray::s_systemTray = 0L; -KopeteSystemTray* KopeteSystemTray::systemTray( QWidget *parent, const char* name ) +KopeteSystemTray* KopeteSystemTray::systemTray( TQWidget *parent, const char* name ) { if( !s_systemTray ) s_systemTray = new KopeteSystemTray( parent, name ); @@ -49,27 +49,27 @@ KopeteSystemTray* KopeteSystemTray::systemTray( QWidget *parent, const char* nam return s_systemTray; } -KopeteSystemTray::KopeteSystemTray(QWidget* parent, const char* name) +KopeteSystemTray::KopeteSystemTray(TQWidget* parent, const char* name) : KSystemTray(parent,name) { // kdDebug(14010) << "Creating KopeteSystemTray" << endl; - QToolTip::add( this, kapp->aboutData()->shortDescription() ); + TQToolTip::add( this, kapp->aboutData()->shortDescription() ); mIsBlinkIcon = false; mIsBlinking = false; - mBlinkTimer = new QTimer(this, "mBlinkTimer"); + mBlinkTimer = new TQTimer(this, "mBlinkTimer"); mKopeteIcon = loadIcon("kopete"); - connect(mBlinkTimer, SIGNAL(timeout()), this, SLOT(slotBlink())); - connect(Kopete::ChatSessionManager::self() , SIGNAL(newEvent(Kopete::MessageEvent*)), - this, SLOT(slotNewEvent(Kopete::MessageEvent*))); - connect(KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(slotConfigChanged())); + connect(mBlinkTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotBlink())); + connect(Kopete::ChatSessionManager::self() , TQT_SIGNAL(newEvent(Kopete::MessageEvent*)), + this, TQT_SLOT(slotNewEvent(Kopete::MessageEvent*))); + connect(KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(slotConfigChanged())); connect(Kopete::AccountManager::self(), - SIGNAL(accountOnlineStatusChanged(Kopete::Account *, + TQT_SIGNAL(accountOnlineStatusChanged(Kopete::Account *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &)), - this, SLOT(slotReevaluateAccountStates())); + this, TQT_SLOT(slotReevaluateAccountStates())); // the slot called by default by the quit action, KSystemTray::maybeQuit(), // just closes the parent window, which is hard to distinguish in that window's closeEvent() @@ -81,7 +81,7 @@ KopeteSystemTray::KopeteSystemTray(QWidget* parent, const char* name) KAction *quit = actionCollection()->action( "file_quit" ); quit->disconnect(); KopeteWindow *myParent = static_cast( parent ); - connect( quit, SIGNAL( activated() ), myParent, SLOT( slotQuit() ) ); + connect( quit, TQT_SIGNAL( activated() ), myParent, TQT_SLOT( slotQuit() ) ); //setPixmap(mKopeteIcon); slotReevaluateAccountStates(); @@ -97,11 +97,11 @@ KopeteSystemTray::~KopeteSystemTray() Kopete::UI::Global::setSysTrayWId( 0 ); } -void KopeteSystemTray::mousePressEvent( QMouseEvent *me ) +void KopeteSystemTray::mousePressEvent( TQMouseEvent *me ) { if ( - (me->button() == QEvent::MidButton || - (me->button() == QEvent::LeftButton && KopetePrefs::prefs()->trayflashNotifyLeftClickOpensMessage())) && + (me->button() == TQEvent::MidButton || + (me->button() == TQEvent::LeftButton && KopetePrefs::prefs()->trayflashNotifyLeftClickOpensMessage())) && mIsBlinking ) { mouseDoubleClickEvent( me ); @@ -111,7 +111,7 @@ void KopeteSystemTray::mousePressEvent( QMouseEvent *me ) KSystemTray::mousePressEvent( me ); } -void KopeteSystemTray::mouseDoubleClickEvent( QMouseEvent *me ) +void KopeteSystemTray::mouseDoubleClickEvent( TQMouseEvent *me ) { if ( !mIsBlinking ) { @@ -130,12 +130,12 @@ void KopeteSystemTray::contextMenuAboutToShow( KPopupMenu *me ) emit aboutToShowMenu( me ); } -void KopeteSystemTray::startBlink( const QString &icon ) +void KopeteSystemTray::startBlink( const TQString &icon ) { startBlink( KGlobal::iconLoader()->loadIcon( icon , KIcon::Panel ) ); } -void KopeteSystemTray::startBlink( const QPixmap &icon ) +void KopeteSystemTray::startBlink( const TQPixmap &icon ) { mBlinkIcon = icon; if ( mBlinkTimer->isActive() == false ) @@ -153,10 +153,10 @@ void KopeteSystemTray::startBlink( const QPixmap &icon ) } } -void KopeteSystemTray::startBlink( const QMovie &movie ) +void KopeteSystemTray::startBlink( const TQMovie &movie ) { //kdDebug( 14010 ) << k_funcinfo << "starting movie." << endl; - const_cast( movie ).unpause(); + const_cast( movie ).unpause(); setMovie( movie ); mIsBlinking = true; } @@ -164,7 +164,7 @@ void KopeteSystemTray::startBlink( const QMovie &movie ) void KopeteSystemTray::startBlink() { if ( mMovie.isNull() ) - mMovie = KGlobal::iconLoader()->loadMovie( QString::fromLatin1( "newmessage" ), KIcon::Panel ); + mMovie = KGlobal::iconLoader()->loadMovie( TQString::fromLatin1( "newmessage" ), KIcon::Panel ); startBlink( mMovie ); } @@ -205,8 +205,8 @@ void KopeteSystemTray::slotNewEvent( Kopete::MessageEvent *event ) mBalloonEventList.append( event ); } - connect(event, SIGNAL(done(Kopete::MessageEvent*)), - this, SLOT(slotEventDone(Kopete::MessageEvent*))); + connect(event, TQT_SIGNAL(done(Kopete::MessageEvent*)), + this, TQT_SLOT(slotEventDone(Kopete::MessageEvent*))); if( event->message().manager() != 0 ) { @@ -262,7 +262,7 @@ void KopeteSystemTray::removeBalloonEvent(Kopete::MessageEvent *event) { //delay the addBalloon to let the time to event be deleted //in case a contact has been deleted cf Bug 100196 - QTimer::singleShot(0, this, SLOT(addBalloon())); + TQTimer::singleShot(0, this, TQT_SLOT(addBalloon())); } else { @@ -291,10 +291,10 @@ void KopeteSystemTray::addBalloon() if ( msg.from() ) { - QString msgText = squashMessage( msg ); + TQString msgText = squashMessage( msg ); kdDebug(14010) << k_funcinfo << "msg text=" << msgText << endl; - QString msgFrom; + TQString msgFrom; if( msg.from()->metaContact() ) msgFrom = msg.from()->metaContact()->displayName(); else @@ -302,11 +302,11 @@ void KopeteSystemTray::addBalloon() m_balloon = new KopeteBalloon( i18n( "New Message from %1:
    \"%2\"
    " ) - .arg( QStyleSheet::escape( msgFrom ), msgText ), QString::null ); - connect(m_balloon, SIGNAL(signalBalloonClicked()), mBalloonEventList.first() , SLOT(apply())); - connect(m_balloon, SIGNAL(signalButtonClicked()), mBalloonEventList.first() , SLOT(apply())); - connect(m_balloon, SIGNAL(signalIgnoreButtonClicked()), mBalloonEventList.first() , SLOT(ignore())); - connect(m_balloon, SIGNAL(signalTimeout()), this , SLOT(slotRemoveBalloon())); + .arg( TQStyleSheet::escape( msgFrom ), msgText ), TQString::null ); + connect(m_balloon, TQT_SIGNAL(signalBalloonClicked()), mBalloonEventList.first() , TQT_SLOT(apply())); + connect(m_balloon, TQT_SIGNAL(signalButtonClicked()), mBalloonEventList.first() , TQT_SLOT(apply())); + connect(m_balloon, TQT_SIGNAL(signalIgnoreButtonClicked()), mBalloonEventList.first() , TQT_SLOT(ignore())); + connect(m_balloon, TQT_SIGNAL(signalTimeout()), this , TQT_SLOT(slotRemoveBalloon())); m_balloon->setAnchor(mapToGlobal(pos())); m_balloon->show(); KWin::setOnAllDesktops(m_balloon->winId(), true); @@ -337,7 +337,7 @@ void KopeteSystemTray::slotReevaluateAccountStates() bool bOffline = false; Kopete::Contact *c = 0; - for (QPtrListIterator it(Kopete::AccountManager::self()->accounts()); it.current(); ++it) + for (TQPtrListIterator it(Kopete::AccountManager::self()->accounts()); it.current(); ++it) { c = it.current()->myself(); if (!c) @@ -383,11 +383,11 @@ void KopeteSystemTray::slotReevaluateAccountStates() } -QString KopeteSystemTray::squashMessage( const Kopete::Message& msg ) +TQString KopeteSystemTray::squashMessage( const Kopete::Message& msg ) { - QString msgText = msg.parsedBody(); + TQString msgText = msg.parsedBody(); - QRegExp rx( "(((http://)?(.+)))" ); + TQRegExp rx( "(((http://)?(.+)))" ); rx.setMinimal( true ); if ( rx.search( msgText ) == -1 ) { @@ -397,31 +397,31 @@ QString KopeteSystemTray::squashMessage( const Kopete::Message& msg ) // Escape it after snipping it to not snip entities msgText =msg.plainBody() ; if( msgText.length() > 30 ) - msgText = msgText.left( 30 ) + QString::fromLatin1( " ..." ); + msgText = msgText.left( 30 ) + TQString::fromLatin1( " ..." ); msgText=Kopete::Message::escape(msgText); } else { - QString plainText = msg.plainBody(); + TQString plainText = msg.plainBody(); if ( plainText.length() > 30 ) { - QString fullUrl = rx.cap( 2 ); - QString shorterUrl; + TQString fullUrl = rx.cap( 2 ); + TQString shorterUrl; if ( fullUrl.length() > 30 ) { - QString urlWithoutProtocol = rx.cap( 4 ); + TQString urlWithoutProtocol = rx.cap( 4 ); shorterUrl = urlWithoutProtocol.left( 27 ) - + QString::fromLatin1( "... " ); + + TQString::fromLatin1( "... " ); } else { shorterUrl = fullUrl.left( 27 ) - + QString::fromLatin1( "... " ); + + TQString::fromLatin1( "... " ); } // remove message text - msgText = QString::fromLatin1( "... " ) + + msgText = TQString::fromLatin1( "... " ) + rx.cap( 1 ) + - QString::fromLatin1( " ..." ); + TQString::fromLatin1( " ..." ); // find last occurrence of URL (the one inside the tag) int revUrlOffset = msgText.findRev( fullUrl ); msgText.replace( revUrlOffset, diff --git a/kopete/kopete/systemtray.h b/kopete/kopete/systemtray.h index 223cb173..997ebb9b 100644 --- a/kopete/kopete/systemtray.h +++ b/kopete/kopete/systemtray.h @@ -20,8 +20,8 @@ #ifndef SYSTEMTRAY_H #define SYSTEMTRAY_H -#include -#include +#include +#include #include @@ -47,14 +47,14 @@ public: /** * Retrieve the system tray instance */ - static KopeteSystemTray* systemTray( QWidget* parent = 0, const char* name = 0 ); + static KopeteSystemTray* systemTray( TQWidget* parent = 0, const char* name = 0 ); ~KopeteSystemTray(); // One method, multiple interfaces :-) - void startBlink( const QString &icon ); - void startBlink( const QPixmap &icon ); - void startBlink( const QMovie &movie ); + void startBlink( const TQString &icon ); + void startBlink( const TQPixmap &icon ); + void startBlink( const TQMovie &movie ); void startBlink(); void stopBlink(); @@ -62,8 +62,8 @@ public: KPopupMenu *contextMenu() const { return KSystemTray::contextMenu(); }; protected: - virtual void mousePressEvent( QMouseEvent *e ); - virtual void mouseDoubleClickEvent( QMouseEvent *me ); + virtual void mousePressEvent( TQMouseEvent *e ); + virtual void mouseDoubleClickEvent( TQMouseEvent *me ); virtual void contextMenuAboutToShow( KPopupMenu * ); signals: @@ -79,22 +79,22 @@ private slots: void addBalloon(); private: - KopeteSystemTray( QWidget* parent, const char* name ); - QString squashMessage( const Kopete::Message& msgText ); + KopeteSystemTray( TQWidget* parent, const char* name ); + TQString squashMessage( const Kopete::Message& msgText ); void removeBalloonEvent(Kopete::MessageEvent *); - QTimer *mBlinkTimer; - QPixmap mKopeteIcon; - QPixmap mBlinkIcon; - QMovie mMovie; + TQTimer *mBlinkTimer; + TQPixmap mKopeteIcon; + TQPixmap mBlinkIcon; + TQMovie mMovie; bool mIsBlinkIcon; bool mIsBlinking; static KopeteSystemTray* s_systemTray; - QPtrList mEventList; - QPtrList mBalloonEventList; + TQPtrList mEventList; + TQPtrList mBalloonEventList; KopeteBalloon *m_balloon; }; diff --git a/kopete/libkopete/avdevice/kxv.cpp b/kopete/libkopete/avdevice/kxv.cpp index 942a823b..f573bd50 100644 --- a/kopete/libkopete/avdevice/kxv.cpp +++ b/kopete/libkopete/avdevice/kxv.cpp @@ -21,8 +21,8 @@ #include -#include -#include +#include +#include #include @@ -177,7 +177,7 @@ bool KXv::init(Drawable d) #endif } -bool KXvDevice::grabStill(QImage* /*pix*/, int /*dw*/, int /*dh*/) +bool KXvDevice::grabStill(TQImage* /*pix*/, int /*dw*/, int /*dh*/) { #ifndef HAVE_LIBXV return false; @@ -186,14 +186,14 @@ bool KXvDevice::grabStill(QImage* /*pix*/, int /*dw*/, int /*dh*/) #endif } -int KXvDevice::displayImage(QWidget *widget, const unsigned char *const data, int w, int h, int dw, int dh) +int KXvDevice::displayImage(TQWidget *widget, const unsigned char *const data, int w, int h, int dw, int dh) { if (!widget) return -1; return displayImage(widget->winId(), data, w, h, 0, 0, w, h, dw, dh); } -int KXvDevice::displayImage(QWidget *widget, const unsigned char *const data, int w, int h, int x, int y, int sw, int sh, int dw, int dh) +int KXvDevice::displayImage(TQWidget *widget, const unsigned char *const data, int w, int h, int x, int y, int sw, int sh, int dw, int dh) { if (!widget) return -1; @@ -255,7 +255,7 @@ int KXvDevice::displayImage(Window win, const unsigned char *const data, int w, } -bool KXvDevice::startVideo(QWidget *w, int dw, int dh) +bool KXvDevice::startVideo(TQWidget *w, int dw, int dh) { if (!w) return false; return startVideo(w->winId(), dw, dh); @@ -338,7 +338,7 @@ KXvDevice::KXvDevice() xv_attr = NULL; xv_port = -1; xv_encoding = -1; - xv_name = QString::null; + xv_name = TQString::null; xv_type = -1; xv_adaptor = -1; _shm = false; @@ -443,7 +443,7 @@ bool KXvDevice::init() kdDebug() << "Image formats for port " << xv_port << endl; for (int i = 0; i < xv_formats; i++) { assert(fo); - QString imout; + TQString imout; imout.sprintf(" 0x%x (%c%c%c%c) %s", fo[i].id, fo[i].id & 0xff, @@ -463,7 +463,7 @@ bool KXvDevice::init() } -bool KXvDevice::supportsWidget(QWidget *w) +bool KXvDevice::supportsWidget(TQWidget *w) { #ifndef HAVE_LIBXV return false; @@ -509,7 +509,7 @@ const KXvDeviceAttributes& KXvDevice::attributes() } -bool KXvDevice::getAttributeRange(const QString& attribute, int *min, int *max) +bool KXvDevice::getAttributeRange(const TQString& attribute, int *min, int *max) { for (KXvDeviceAttribute *at = _attrs.first(); at != NULL; at = _attrs.next()) { if (at->name == attribute) { @@ -522,7 +522,7 @@ bool KXvDevice::getAttributeRange(const QString& attribute, int *min, int *max) } -bool KXvDevice::getAttribute(const QString& attribute, int *val) +bool KXvDevice::getAttribute(const TQString& attribute, int *val) { #ifndef HAVE_LIBXV return false; @@ -539,7 +539,7 @@ bool KXvDevice::getAttribute(const QString& attribute, int *val) } -bool KXvDevice::setAttribute(const QString& attribute, int val) +bool KXvDevice::setAttribute(const TQString& attribute, int val) { #ifndef HAVE_LIBXV return false; @@ -556,7 +556,7 @@ bool KXvDevice::setAttribute(const QString& attribute, int val) } -const QString& KXvDevice::name() const +const TQString& KXvDevice::name() const { return xv_name; } @@ -567,12 +567,12 @@ int KXvDevice::port() const return xv_port; } -const QStringList& KXvDevice::encodings() const +const TQStringList& KXvDevice::encodings() const { return _encodingList; } -bool KXvDevice::encoding(QString& encoding) +bool KXvDevice::encoding(TQString& encoding) { #ifndef HAVE_LIBXV return false; @@ -591,7 +591,7 @@ bool KXvDevice::encoding(QString& encoding) #endif } -bool KXvDevice::setEncoding(const QString& e) +bool KXvDevice::setEncoding(const TQString& e) { #ifdef HAVE_LIBXV for (unsigned int i = 0; i < xv_encodings; i++) { diff --git a/kopete/libkopete/avdevice/kxv.h b/kopete/libkopete/avdevice/kxv.h index 6f7602bf..8b3e14dd 100644 --- a/kopete/libkopete/avdevice/kxv.h +++ b/kopete/libkopete/avdevice/kxv.h @@ -24,9 +24,9 @@ #include #include -#include -#include -#include +#include +#include +#include class QWidget; class QImage; @@ -35,7 +35,7 @@ class KXvPrivate; class KXvDevice; class KXvDevicePrivate; -typedef QPtrList KXvDeviceList; +typedef TQPtrList KXvDeviceList; class KXv @@ -81,7 +81,7 @@ private: class KXvDeviceAttribute { public: - QString name; + TQString name; int min; int max; int flags; @@ -89,7 +89,7 @@ public: Atom atom(); }; -typedef QPtrList KXvDeviceAttributes; +typedef TQPtrList KXvDeviceAttributes; class KXvDevice @@ -108,41 +108,41 @@ public: /* * return the range for a given attribute */ - bool getAttributeRange(const QString& attribute, int *min, int *max); + bool getAttributeRange(const TQString& attribute, int *min, int *max); /* * get the current value of a given attribute */ - bool getAttribute(const QString& attribute, int *val); + bool getAttribute(const TQString& attribute, int *val); /* * set the current value of a given attribute */ - bool setAttribute(const QString& attribute, int val); + bool setAttribute(const TQString& attribute, int val); - bool grabStill(QImage *pix, int dw, int dh); + bool grabStill(TQImage *pix, int dw, int dh); /* * True if this device can operate on the given widget */ - bool supportsWidget(QWidget *w); + bool supportsWidget(TQWidget *w); /* * Display the given image with Xv. */ - int displayImage(QWidget *widget, const unsigned char *const data, int w, int h, int dw, int dh); + int displayImage(TQWidget *widget, const unsigned char *const data, int w, int h, int dw, int dh); int displayImage(Window win, const unsigned char *const data, int w, int h, int dw, int dh); /* * Display a portion of the given image with Xv. */ - int displayImage(QWidget *widget, const unsigned char *const data, int w, int h, int x, int y, int sw, int sh, int dw, int dh); + int displayImage(TQWidget *widget, const unsigned char *const data, int w, int h, int x, int y, int sw, int sh, int dw, int dh); int displayImage(Window win, const unsigned char *const data, int w, int h, int x, int y, int sw, int sh, int dw, int dh); /* * Start a video stream in widget w, width dw, height dh */ - bool startVideo(QWidget *w, int dw, int dh); + bool startVideo(TQWidget *w, int dw, int dh); bool startVideo(Window w, int dw, int dh); /* @@ -168,7 +168,7 @@ public: /* * Name of the device */ - const QString& name() const; + const TQString& name() const; /* * The Xv port for this device @@ -178,17 +178,17 @@ public: /* * The list of encodings/norms available */ - const QStringList& encodings() const; + const TQStringList& encodings() const; /* * get encoding */ - bool encoding(QString& encoding); + bool encoding(TQString& encoding); /* * Set the encoding to the given one. This should be taken from the list. */ - bool setEncoding(const QString& e); + bool setEncoding(const TQString& e); /* * Set the image format. (ex YUV) @@ -218,7 +218,7 @@ protected: KXvDeviceAttributes _attrs; int xv_type, xv_adaptor; - QString xv_name; + TQString xv_name; int xv_port; unsigned int xv_encodings; int xv_encoding; @@ -228,7 +228,7 @@ protected: GC xv_gc; Window xv_last_win; - QStringList _encodingList; + TQStringList _encodingList; int xv_formats; void *xv_formatvalues; diff --git a/kopete/libkopete/avdevice/qvideo.cpp b/kopete/libkopete/avdevice/qvideo.cpp index 8d153e58..d8d91602 100644 --- a/kopete/libkopete/avdevice/qvideo.cpp +++ b/kopete/libkopete/avdevice/qvideo.cpp @@ -27,7 +27,7 @@ #include "qvideo.h" #include -#include +#include #include #include @@ -71,7 +71,7 @@ bool QVideo::findDisplayProperties(ImageFormat& fmt, int& depth, unsigned int& b int bpp = 0; int d = 0; - vi_out.screen = QPaintDevice::x11AppScreen(); + vi_out.screen = TQPaintDevice::x11AppScreen(); vi_in = XGetVisualInfo(qt_xdisplay(), mask, &vi_out, &nvis); if (vi_in) { diff --git a/kopete/libkopete/avdevice/qvideostream.cpp b/kopete/libkopete/avdevice/qvideostream.cpp index 18773946..05bbf209 100644 --- a/kopete/libkopete/avdevice/qvideostream.cpp +++ b/kopete/libkopete/avdevice/qvideostream.cpp @@ -20,9 +20,9 @@ */ #include "qvideostream.h" -#include -#include -#include +#include +#include +#include #include #include "kxv.h" @@ -43,30 +43,30 @@ extern "C" { class QVideoStreamGLWidget : public QGLWidget { public: - QVideoStreamGLWidget(QWidget* parent = 0, const char* name = 0); + QVideoStreamGLWidget(TQWidget* parent = 0, const char* name = 0); virtual ~QVideoStreamGLWidget(); - void setInputSize(const QSize& sz); + void setInputSize(const TQSize& sz); void display(const unsigned char *const img, int x, int y, int sw, int sh); private: virtual void resizeGL(int w, int h); void initializeGL(); - virtual bool eventFilter( QObject *o, QEvent *e ); - void calc(QPoint& p, QPoint& v); + virtual bool eventFilter( TQObject *o, TQEvent *e ); + void calc(TQPoint& p, TQPoint& v); - QSize _inputSize; + TQSize _inputSize; GLuint _tex; int _tw, _th; - QWidget* _w; + TQWidget* _w; int _maxGL; - QSize _sz; + TQSize _sz; bool _glfun; - QPoint _ul, _ur, _ll, _lr; - QPoint _vul, _vur, _vll, _vlr; - QTimer* _glfunTimer; + TQPoint _ul, _ur, _ll, _lr; + TQPoint _vul, _vur, _vll, _vlr; + TQTimer* _glfunTimer; }; #endif @@ -98,8 +98,8 @@ QVideoStreamPrivate::~QVideoStreamPrivate() delete xvHandle; } -QVideoStream::QVideoStream(QWidget *widget, const char* name) - : QObject(widget, name), +QVideoStream::QVideoStream(TQWidget *widget, const char* name) + : TQObject(widget, name), d(new QVideoStreamPrivate), _w(widget), _methods(METHOD_NONE), @@ -127,7 +127,7 @@ QVideoStream::QVideoStream(QWidget *widget, const char* name) } #ifdef HAVE_GL - if (QGLFormat::hasOpenGL()) { + if (TQGLFormat::hasOpenGL()) { _methods = (VideoMethod)(_methods | METHOD_GL); } #endif @@ -309,7 +309,7 @@ QVideo::VideoMethod QVideoStream::setMethod(VideoMethod method) return _method; } -QSize QVideoStream::maxSize() const +TQSize QVideoStream::maxSize() const { return _size; } @@ -324,7 +324,7 @@ int QVideoStream::maxHeight() const return _size.height(); } -QSize QVideoStream::size() const +TQSize QVideoStream::size() const { return _size; } @@ -339,7 +339,7 @@ int QVideoStream::height() const return _size.height(); } -QSize QVideoStream::setSize(const QSize& sz) +TQSize QVideoStream::setSize(const TQSize& sz) { _size = sz; return _size; @@ -365,7 +365,7 @@ int QVideoStream::setHeight(int height) return _size.height(); } -QSize QVideoStream::inputSize() const +TQSize QVideoStream::inputSize() const { return _inputSize; } @@ -380,7 +380,7 @@ int QVideoStream::inputHeight() const return _inputSize.height(); } -QSize QVideoStream::setInputSize(const QSize& sz) +TQSize QVideoStream::setInputSize(const TQSize& sz) { if (sz == _inputSize) return _inputSize; @@ -532,19 +532,19 @@ QVideoStream& QVideoStream::operator<<(const unsigned char *const img) // --------------------------------------------------------------------------------------- #ifdef HAVE_GL -QVideoStreamGLWidget::QVideoStreamGLWidget(QWidget* parent, const char* name) - : QGLWidget(QGLFormat(QGL::DoubleBuffer | QGL::Rgba | QGL::DirectRendering), parent, name), +QVideoStreamGLWidget::QVideoStreamGLWidget(TQWidget* parent, const char* name) + : TQGLWidget(TQGLFormat(TQGL::DoubleBuffer | TQGL::Rgba | TQGL::DirectRendering), parent, name), _tex(0), _w(parent), _glfun(false) { kdDebug() << "QVideoStreamGLWidget::QVideoStreamGLWidget()" << endl; - connect(_w, SIGNAL(resized(int, int)), - this, SLOT(resize(int, int))); + connect(_w, TQT_SIGNAL(resized(int, int)), + this, TQT_SLOT(resize(int, int))); topLevelWidget()->installEventFilter(this); - _glfunTimer = new QTimer(); + _glfunTimer = new TQTimer(); } QVideoStreamGLWidget::~QVideoStreamGLWidget() @@ -558,12 +558,12 @@ QVideoStreamGLWidget::~QVideoStreamGLWidget() } } -bool QVideoStreamGLWidget::eventFilter(QObject*, QEvent* e) +bool QVideoStreamGLWidget::eventFilter(TQObject*, TQEvent* e) { - // For some reason, KeyPress does not work (yields 2), QEvent::KeyPress is unknown... What the f...???? + // For some reason, KeyPress does not work (yields 2), TQEvent::KeyPress is unknown... What the f...???? // I am too lazy to scan the header files for the reason. if(e->type() == 6) { - QKeyEvent* ke = static_cast(e); + TQKeyEvent* ke = static_cast(e); if(ke->key() == Qt::Key_Pause) { _glfunTimer->start(500, true); } else if (_glfunTimer->isActive() && (ke->key() == Qt::Key_Escape)) { @@ -578,7 +578,7 @@ void QVideoStreamGLWidget::initializeGL() kdDebug() << "QVideoStreamGLWidget::initializeGL()" << endl; setAutoBufferSwap(false); - QGLFormat f = format(); + TQGLFormat f = format(); glGetIntegerv(GL_MAX_TEXTURE_SIZE, &_maxGL); kdDebug() << "OpenGL capabilities (* = required):" << endl; kdDebug() << " Valid context*: " << isValid() << endl; @@ -598,15 +598,15 @@ void QVideoStreamGLWidget::initializeGL() glShadeModel(GL_FLAT); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - _vul = QPoint( 4, 10); - _vur = QPoint(-8, 4); - _vll = QPoint(10, -4); - _vlr = QPoint(-8, -10); + _vul = TQPoint( 4, 10); + _vur = TQPoint(-8, 4); + _vll = TQPoint(10, -4); + _vlr = TQPoint(-8, -10); } void QVideoStreamGLWidget::resizeGL(int w, int h) { - _sz = QSize(w, h); + _sz = TQSize(w, h); glViewport(0, 0, w, h); glMatrixMode(GL_PROJECTION); @@ -615,13 +615,13 @@ void QVideoStreamGLWidget::resizeGL(int w, int h) glMatrixMode(GL_MODELVIEW); glLoadIdentity(); - _ul = QPoint(0, 0); - _ur = QPoint(w, 0); - _ll = QPoint(0, h); - _lr = QPoint(w, h); + _ul = TQPoint(0, 0); + _ur = TQPoint(w, 0); + _ll = TQPoint(0, h); + _lr = TQPoint(w, h); } -void QVideoStreamGLWidget::setInputSize(const QSize& sz) +void QVideoStreamGLWidget::setInputSize(const TQSize& sz) { makeCurrent(); @@ -705,7 +705,7 @@ void QVideoStreamGLWidget::display(const unsigned char *const img, int x, int y, glDisable(GL_TEXTURE_2D); } -void QVideoStreamGLWidget::calc(QPoint& p, QPoint& v) +void QVideoStreamGLWidget::calc(TQPoint& p, TQPoint& v) { p += v; diff --git a/kopete/libkopete/avdevice/qvideostream.h b/kopete/libkopete/avdevice/qvideostream.h index f1b0ca24..24b7fb40 100644 --- a/kopete/libkopete/avdevice/qvideostream.h +++ b/kopete/libkopete/avdevice/qvideostream.h @@ -29,11 +29,11 @@ #endif #ifdef HAVE_GL -#include +#include #include #endif -#include +#include #include "qvideo.h" class QVideoStreamPrivate; @@ -41,12 +41,12 @@ class QVideoStreamPrivate; /** * QT-style video stream driver. */ -class QVideoStream : public QObject, public QVideo +class QVideoStream : public TQObject, public QVideo { Q_OBJECT public: - QVideoStream(QWidget *widget, const char* name = 0); + QVideoStream(TQWidget *widget, const char* name = 0); ~QVideoStream(); /* output method */ @@ -55,25 +55,25 @@ public: VideoMethod setMethod(VideoMethod method); /* max output sizes */ - QSize maxSize() const; + TQSize maxSize() const; int maxWidth() const; int maxHeight() const; /* output sizes */ - QSize size() const; + TQSize size() const; int width() const; int height() const; - QSize setSize(const QSize& sz); + TQSize setSize(const TQSize& sz); int setWidth(int width); int setHeight(int height); /* input sizes */ - QSize inputSize() const; + TQSize inputSize() const; int inputWidth() const; int inputHeight() const; - QSize setInputSize(const QSize& sz); + TQSize setInputSize(const TQSize& sz); int setInputWidth(int width); int setInputHeight(int height); @@ -95,12 +95,12 @@ public slots: private: QVideoStreamPrivate* d; - QWidget* _w; + TQWidget* _w; VideoMethod _methods; // list of methods VideoMethod _method; // the current method ImageFormat _format; - QSize _size; - QSize _inputSize; + TQSize _size; + TQSize _inputSize; bool _init; ImageFormat _xFormat; diff --git a/kopete/libkopete/avdevice/videocontrol.h b/kopete/libkopete/avdevice/videocontrol.h index 2675be6e..c4db3b9d 100644 --- a/kopete/libkopete/avdevice/videocontrol.h +++ b/kopete/libkopete/avdevice/videocontrol.h @@ -30,9 +30,9 @@ #define __s64 long long #endif // __s64 -#include +#include #include -#include +#include #include "kopete_export.h" namespace Kopete { @@ -67,7 +67,7 @@ public: protected: __u32 m_id; control_type m_type; - QString m_name; + TQString m_name; __s32 m_minimum; __s32 m_maximum; __s32 m_step; diff --git a/kopete/libkopete/avdevice/videodevice.cpp b/kopete/libkopete/avdevice/videodevice.cpp index ada02ae5..00ab8266 100644 --- a/kopete/libkopete/avdevice/videodevice.cpp +++ b/kopete/libkopete/avdevice/videodevice.cpp @@ -71,7 +71,7 @@ void VideoDevice::enumerateMenu (void) { if (0 == xioctl (VIDIOC_QUERYMENU, &querymenu)) { - kdDebug(14010) << k_funcinfo << " " << QString::fromLocal8Bit((const char*)querymenu.name) << endl; + kdDebug(14010) << k_funcinfo << " " << TQString::fromLocal8Bit((const char*)querymenu.name) << endl; } else { @@ -111,9 +111,9 @@ int VideoDevice::errnoReturn(const char* s) } /*! - \fn VideoDevice::setFileName(QString name) + \fn VideoDevice::setFileName(TQString name) */ -int VideoDevice::setFileName(QString filename) +int VideoDevice::setFileName(TQString filename) { /// @todo implement me full_filename=filename; @@ -133,7 +133,7 @@ int VideoDevice::open() kdDebug(14010) << k_funcinfo << "Device is already open" << endl; return EXIT_SUCCESS; } - descriptor = ::open (QFile::encodeName(full_filename), O_RDWR, 0); + descriptor = ::open (TQFile::encodeName(full_filename), O_RDWR, 0); if(isOpen()) { kdDebug(14010) << k_funcinfo << "File " << full_filename << " was opened successfuly" << endl; @@ -200,7 +200,7 @@ int VideoDevice::checkDevice() m_videocapture=true; kdDebug(14010) << k_funcinfo << "checkDevice(): " << full_filename << " is a V4L2 device." << endl; m_driver = VIDEODEV_DRIVER_V4L2; - m_model=QString::fromLocal8Bit((const char*)V4L2_capabilities.card); + m_model=TQString::fromLocal8Bit((const char*)V4L2_capabilities.card); // Detect maximum and minimum resolution supported by the V4L2 device @@ -259,7 +259,7 @@ int VideoDevice::checkDevice() if(inputisok==EXIT_SUCCESS) { VideoInput tempinput; - tempinput.name = QString::fromLocal8Bit((const char*)videoinput.name); + tempinput.name = TQString::fromLocal8Bit((const char*)videoinput.name); tempinput.hastuner = videoinput.type & V4L2_INPUT_TYPE_TUNER; tempinput.m_standards = videoinput.std; m_input.push_back(tempinput); @@ -300,8 +300,8 @@ for (currentid = V4L2_CID_BASE; currentid < V4L2_CID_LASTP1; currentid++) if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED) continue; -//kdDebug(14010) << k_funcinfo << " Control: " << QString::fromLocal8Bit((const char*)queryctrl.name) << endl; -kdDebug(14010) << k_funcinfo << " Control: " << QString::fromLocal8Bit((const char*)queryctrl.name) << " Values from " << queryctrl.minimum << " to " << queryctrl.maximum << " with steps of " << queryctrl.step << ". Default: " << queryctrl.default_value << endl; +//kdDebug(14010) << k_funcinfo << " Control: " << TQString::fromLocal8Bit((const char*)queryctrl.name) << endl; +kdDebug(14010) << k_funcinfo << " Control: " << TQString::fromLocal8Bit((const char*)queryctrl.name) << " Values from " << queryctrl.minimum << " to " << queryctrl.maximum << " with steps of " << queryctrl.step << ". Default: " << queryctrl.default_value << endl; /* switch (queryctrl.type) { @@ -332,7 +332,7 @@ for (currentid = V4L2_CID_PRIVATE_BASE;; currentid++) if (queryctrl.flags & V4L2_CTRL_FLAG_DISABLED) continue; -kdDebug(14010) << k_funcinfo << " Control: " << QString::fromLocal8Bit((const char*)queryctrl.name) << " Values from " << queryctrl.minimum << " to " << queryctrl.maximum << " with steps of " << queryctrl.step << ". Default: " << queryctrl.default_value << endl; +kdDebug(14010) << k_funcinfo << " Control: " << TQString::fromLocal8Bit((const char*)queryctrl.name) << " Values from " << queryctrl.minimum << " to " << queryctrl.maximum << " with steps of " << queryctrl.step << ". Default: " << queryctrl.default_value << endl; if (queryctrl.type == V4L2_CTRL_TYPE_MENU) enumerateMenu (); @@ -376,7 +376,7 @@ kdDebug(14010) << k_funcinfo << " Control: " << QString::fromLocal8Bit((const c { kdDebug(14010) << k_funcinfo << full_filename << " is a V4L device." << endl; m_driver = VIDEODEV_DRIVER_V4L; - m_model=QString::fromLocal8Bit((const char*)V4L_capabilities.name); + m_model=TQString::fromLocal8Bit((const char*)V4L_capabilities.name); if(V4L_capabilities.type & VID_TYPE_CAPTURE) m_videocapture=true; if(V4L_capabilities.type & VID_TYPE_CHROMAKEY) @@ -405,7 +405,7 @@ kdDebug(14010) << k_funcinfo << " Control: " << QString::fromLocal8Bit((const c if(inputisok==EXIT_SUCCESS) { VideoInput tempinput; - tempinput.name = QString::fromLocal8Bit((const char*)videoinput.name); + tempinput.name = TQString::fromLocal8Bit((const char*)videoinput.name); tempinput.hastuner=videoinput.flags & VIDEO_VC_TUNER; // TODO: The routine to detect the appropriate video standards for V4L must be placed here m_input.push_back(tempinput); @@ -1190,15 +1190,15 @@ int VideoDevice::getFrame(imagebuffer *imgbuffer) } /*! - \fn Kopete::AV::VideoDevice::getImage(const QImage *qimage) + \fn Kopete::AV::VideoDevice::getImage(const TQImage *qimage) */ -int VideoDevice::getImage(QImage *qimage) +int VideoDevice::getImage(TQImage *qimage) { /// @todo implement me // do NOT delete qimage here, as it is received as a parameter if (qimage->width() != width() || qimage->height() != height()) - qimage->create(width(), height(),32, QImage::IgnoreEndian); + qimage->create(width(), height(),32, TQImage::IgnoreEndian); uchar *bits=qimage->bits(); // kDebug() << "Capturing in " << pixelFormatName(m_currentbuffer.pixelformat); @@ -2106,9 +2106,9 @@ int VideoDevice::pixelFormatDepth(pixel_format pixelformat) return 0; } -QString VideoDevice::pixelFormatName(pixel_format pixelformat) +TQString VideoDevice::pixelFormatName(pixel_format pixelformat) { - QString returnvalue; + TQString returnvalue; returnvalue = "None"; switch(pixelformat) { @@ -2156,9 +2156,9 @@ QString VideoDevice::pixelFormatName(pixel_format pixelformat) return returnvalue; } -QString VideoDevice::pixelFormatName(int pixelformat) +TQString VideoDevice::pixelFormatName(int pixelformat) { - QString returnvalue; + TQString returnvalue; returnvalue = "None"; switch(m_driver) { @@ -2410,9 +2410,9 @@ __u64 VideoDevice::signalStandardCode(signal_standard standard) return STANDARD_NONE; } -QString VideoDevice::signalStandardName(signal_standard standard) +TQString VideoDevice::signalStandardName(signal_standard standard) { - QString returnvalue; + TQString returnvalue; returnvalue = "None"; switch(standard) { @@ -2455,9 +2455,9 @@ QString VideoDevice::signalStandardName(signal_standard standard) return returnvalue; } -QString VideoDevice::signalStandardName(int standard) +TQString VideoDevice::signalStandardName(int standard) { - QString returnvalue; + TQString returnvalue; returnvalue = "None"; switch(m_driver) { diff --git a/kopete/libkopete/avdevice/videodevice.h b/kopete/libkopete/avdevice/videodevice.h index 982ab5f3..2482c183 100644 --- a/kopete/libkopete/avdevice/videodevice.h +++ b/kopete/libkopete/avdevice/videodevice.h @@ -61,10 +61,10 @@ #endif // __linux__ -#include -#include -#include -#include +#include +#include +#include +#include #include #include "videoinput.h" @@ -191,7 +191,7 @@ struct imagebuffer int height; int width; pixel_format pixelformat; - QValueVector data; // maybe it should be a rawbuffer instead of it? It could make us avoid a memory copy + TQValueVector data; // maybe it should be a rawbuffer instead of it? It could make us avoid a memory copy }; struct rawbuffer // raw buffer { @@ -204,7 +204,7 @@ class VideoDevice{ public: VideoDevice(); ~VideoDevice(); - int setFileName(QString filename); + int setFileName(TQString filename); int open(); bool isOpen(); int checkDevice(); @@ -223,13 +223,13 @@ public: int pixelFormatCode(pixel_format pixelformat); pixel_format pixelFormatForPalette( int palette ); int pixelFormatDepth(pixel_format pixelformat); - QString pixelFormatName(pixel_format pixelformat); - QString pixelFormatName(int pixelformat); + TQString pixelFormatName(pixel_format pixelformat); + TQString pixelFormatName(int pixelformat); int detectPixelFormats(); __u64 signalStandardCode(signal_standard standard); - QString signalStandardName(signal_standard standard); - QString signalStandardName(int standard); + TQString signalStandardName(signal_standard standard); + TQString signalStandardName(int standard); int detectSignalStandards(); int currentInput(); @@ -238,7 +238,7 @@ public: int startCapturing(); int getFrame(); int getFrame(imagebuffer *imgbuffer); - int getImage(QImage *qimage); + int getImage(TQImage *qimage); int stopCapturing(); int close(); @@ -268,10 +268,10 @@ public: bool canAsyncIO(); bool canStream(); - QString m_model; - QString m_name; + TQString m_model; + TQString m_name; size_t m_modelindex; // Defines what's the number of a device when more than 1 device of a given model is present; - QString full_filename; + TQString full_filename; videodev_driver m_driver; int descriptor; @@ -292,16 +292,16 @@ void enumerateMenu (void); struct video_capability V4L_capabilities; struct video_buffer V4L_videobuffer; #endif - QValueVector m_input; - QValueVector m_control; -// QFile file; + TQValueVector m_input; + TQValueVector m_control; +// TQFile file; protected: int currentwidth, minwidth, maxwidth, currentheight, minheight, maxheight; bool m_disablemmap; bool m_workaroundbrokendriver; - QValueVector m_rawbuffers; + TQValueVector m_rawbuffers; unsigned int m_streambuffers; imagebuffer m_currentbuffer; int m_buffer_size; diff --git a/kopete/libkopete/avdevice/videodevicemodelpool.cpp b/kopete/libkopete/avdevice/videodevicemodelpool.cpp index c6fc533e..875d926b 100644 --- a/kopete/libkopete/avdevice/videodevicemodelpool.cpp +++ b/kopete/libkopete/avdevice/videodevicemodelpool.cpp @@ -40,7 +40,7 @@ size_t VideoDeviceModelPool::size() return m_devicemodel.size(); } -size_t VideoDeviceModelPool::addModel( QString newmodel ) +size_t VideoDeviceModelPool::addModel( TQString newmodel ) { VideoDeviceModel newdevicemodel; newdevicemodel.model=newmodel; diff --git a/kopete/libkopete/avdevice/videodevicemodelpool.h b/kopete/libkopete/avdevice/videodevicemodelpool.h index 54d801c4..76499033 100644 --- a/kopete/libkopete/avdevice/videodevicemodelpool.h +++ b/kopete/libkopete/avdevice/videodevicemodelpool.h @@ -18,8 +18,8 @@ #ifndef KOPETE_AVVIDEODEVICEMODELPOOL_H #define KOPETE_AVVIDEODEVICEMODELPOOL_H -#include -#include +#include +#include #include #include "kopete_export.h" @@ -34,16 +34,16 @@ class VideoDeviceModelPool{ struct VideoDeviceModel { - QString model; + TQString model; size_t count; }; - QValueVector m_devicemodel; + TQValueVector m_devicemodel; public: VideoDeviceModelPool(); ~VideoDeviceModelPool(); void clear(); size_t size(); - size_t addModel(QString newmodel); + size_t addModel(TQString newmodel); }; } diff --git a/kopete/libkopete/avdevice/videodevicepool.cpp b/kopete/libkopete/avdevice/videodevicepool.cpp index 2651addb..39f6a7c7 100644 --- a/kopete/libkopete/avdevice/videodevicepool.cpp +++ b/kopete/libkopete/avdevice/videodevicepool.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include "videodevice.h" #include "videodevicepool.h" @@ -414,9 +414,9 @@ int VideoDevicePool::getFrame() } /*! - \fn VideoDevicePool::getQImage(QImage *qimage) + \fn VideoDevicePool::getQImage(TQImage *qimage) */ -int VideoDevicePool::getImage(QImage *qimage) +int VideoDevicePool::getImage(TQImage *qimage) { // kdDebug(14010) << k_funcinfo << "VideoDevicePool::getImage() called." << endl; if(m_videodevice.size()) @@ -424,7 +424,7 @@ int VideoDevicePool::getImage(QImage *qimage) else { kdDebug(14010) << k_funcinfo << "VideoDevicePool::getImage() fallback for no device." << endl; - qimage->create(m_buffer.width, m_buffer.height,32, QImage::IgnoreEndian); + qimage->create(m_buffer.width, m_buffer.height,32, TQImage::IgnoreEndian); uchar *bits=qimage->bits(); switch(m_buffer.pixelformat) { @@ -609,9 +609,9 @@ int VideoDevicePool::scanDevices() kdDebug(14010) << k_funcinfo << "called" << endl; #if defined(__linux__) && defined(ENABLE_AV) - QDir videodevice_dir; - const QString videodevice_dir_path=QString::fromLocal8Bit("/dev/v4l/"); - const QString videodevice_dir_filter=QString::fromLocal8Bit("video*"); + TQDir videodevice_dir; + const TQString videodevice_dir_path=TQString::fromLocal8Bit("/dev/v4l/"); + const TQString videodevice_dir_filter=TQString::fromLocal8Bit("video*"); VideoDevice videodevice; m_videodevice.clear(); @@ -619,8 +619,8 @@ int VideoDevicePool::scanDevices() videodevice_dir.setPath(videodevice_dir_path); videodevice_dir.setNameFilter(videodevice_dir_filter); - videodevice_dir.setFilter( QDir::System | QDir::NoSymLinks | QDir::Readable | QDir::Writable ); - videodevice_dir.setSorting( QDir::Name ); + videodevice_dir.setFilter( TQDir::System | TQDir::NoSymLinks | TQDir::Readable | TQDir::Writable ); + videodevice_dir.setSorting( TQDir::Name ); kdDebug(14010) << k_funcinfo << "Looking for devices in " << videodevice_dir_path << endl; const QFileInfoList *list = videodevice_dir.entryInfoList(); @@ -628,15 +628,15 @@ int VideoDevicePool::scanDevices() if (!list) { kdDebug(14010) << k_funcinfo << "Found no suitable devices in " << videodevice_dir_path << endl; - QDir videodevice_dir; - const QString videodevice_dir_path=QString::fromLocal8Bit("/dev/"); - const QString videodevice_dir_filter=QString::fromLocal8Bit("video*"); + TQDir videodevice_dir; + const TQString videodevice_dir_path=TQString::fromLocal8Bit("/dev/"); + const TQString videodevice_dir_filter=TQString::fromLocal8Bit("video*"); VideoDevice videodevice; videodevice_dir.setPath(videodevice_dir_path); videodevice_dir.setNameFilter(videodevice_dir_filter); - videodevice_dir.setFilter( QDir::System | QDir::NoSymLinks | QDir::Readable | QDir::Writable ); - videodevice_dir.setSorting( QDir::Name ); + videodevice_dir.setFilter( TQDir::System | TQDir::NoSymLinks | TQDir::Readable | TQDir::Writable ); + videodevice_dir.setSorting( TQDir::Name ); kdDebug(14010) << k_funcinfo << "Looking for devices in " << videodevice_dir_path << endl; const QFileInfoList *list = videodevice_dir.entryInfoList(); @@ -648,7 +648,7 @@ int VideoDevicePool::scanDevices() } QFileInfoListIterator fileiterator ( *list ); - QFileInfo *fileinfo; + TQFileInfo *fileinfo; kdDebug(14010) << k_funcinfo << "scanning devices in " << videodevice_dir_path << "..." << endl; while ( (fileinfo = fileiterator.current()) != 0 ) @@ -676,7 +676,7 @@ int VideoDevicePool::scanDevices() } QFileInfoListIterator fileiterator ( *list ); - QFileInfo *fileinfo; + TQFileInfo *fileinfo; kdDebug(14010) << k_funcinfo << "scanning devices in " << videodevice_dir_path << "..." << endl; while ( (fileinfo = fileiterator.current()) != 0 ) @@ -760,7 +760,7 @@ void VideoDevicePool::loadConfig() { KConfig *config = KGlobal::config(); config->setGroup("Video Device Settings"); - const QString currentdevice = config->readEntry("Current Device", QString::null); + const TQString currentdevice = config->readEntry("Current Device", TQString::null); kdDebug(14010) << k_funcinfo << "Current device: " << currentdevice << endl; // m_current_device = 0; // Must check this thing because of the fact that multiple loadConfig in other methodas can do bad things. Watch out! @@ -768,28 +768,28 @@ void VideoDevicePool::loadConfig() VideoDeviceVector::iterator vditerator; for( vditerator = m_videodevice.begin(); vditerator != m_videodevice.end(); ++vditerator ) { - const QString modelindex = QString::fromLocal8Bit ( "Model %1 Device %2") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex); + const TQString modelindex = TQString::fromLocal8Bit ( "Model %1 Device %2") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex); if(modelindex == currentdevice) { m_current_device = vditerator - m_videodevice.begin(); // kdDebug(14010) << k_funcinfo << "This place will be used to set " << modelindex << " as the current device ( " << (vditerator - m_videodevice.begin()) << " )." << endl; } - const QString name = config->readEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Name") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex)), (*vditerator).m_model); - const int currentinput = config->readNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Current input") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex)), 0); + const TQString name = config->readEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Name") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex)), (*vditerator).m_model); + const int currentinput = config->readNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Current input") .arg ((*vditerator).m_name ) .arg ((*vditerator).m_modelindex)), 0); kdDebug(14010) << k_funcinfo << "Device name: " << name << endl; kdDebug(14010) << k_funcinfo << "Device current input: " << currentinput << endl; (*vditerator).selectInput(currentinput); for (size_t input = 0 ; input < (*vditerator).m_input.size(); input++) { - const float brightness = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Brightness").arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); - const float contrast = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Contrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); - const float saturation = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Saturation").arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); - const float whiteness = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Whiteness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); - const float hue = config->readDoubleNumEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Hue") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); - const bool autobrightnesscontrast = config->readBoolEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoBrightnessContrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); - const bool autocolorcorrection = config->readBoolEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoColorCorrection") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); - const bool imageasmirror = config->readBoolEntry((QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 mageAsMirror") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); + const float brightness = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Brightness").arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); + const float contrast = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Contrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); + const float saturation = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Saturation").arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); + const float whiteness = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Whiteness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); + const float hue = config->readDoubleNumEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Hue") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , 0.5 ); + const bool autobrightnesscontrast = config->readBoolEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoBrightnessContrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); + const bool autocolorcorrection = config->readBoolEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoColorCorrection") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); + const bool imageasmirror = config->readBoolEntry((TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 mageAsMirror") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input)) , false ); (*vditerator).setBrightness(brightness); (*vditerator).setContrast(contrast); (*vditerator).setSaturation(saturation); @@ -833,7 +833,7 @@ void VideoDevicePool::saveConfig() } */ // Stores what is the current video device in use - const QString currentdevice = QString::fromLocal8Bit ( "Model %1 Device %2" ) .arg(m_videodevice[m_current_device].m_model) .arg(m_videodevice[m_current_device].m_modelindex); + const TQString currentdevice = TQString::fromLocal8Bit ( "Model %1 Device %2" ) .arg(m_videodevice[m_current_device].m_model) .arg(m_videodevice[m_current_device].m_modelindex); config->writeEntry( "Current Device", currentdevice); VideoDeviceVector::iterator vditerator; @@ -843,8 +843,8 @@ void VideoDevicePool::saveConfig() kdDebug(14010) << "Model:" << (*vditerator).m_model << ":Index:" << (*vditerator).m_modelindex << ":Current input:" << (*vditerator).currentInput() << endl; // Stores current input for the given video device - const QString name = QString::fromLocal8Bit ( "Model %1 Device %2 Name") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex); - const QString currentinput = QString::fromLocal8Bit ( "Model %1 Device %2 Current input") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex); + const TQString name = TQString::fromLocal8Bit ( "Model %1 Device %2 Name") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex); + const TQString currentinput = TQString::fromLocal8Bit ( "Model %1 Device %2 Current input") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex); config->writeEntry( name, (*vditerator).m_name); config->writeEntry( currentinput, (*vditerator).currentInput()); @@ -859,14 +859,14 @@ void VideoDevicePool::saveConfig() kdDebug(14010) << "Model:" << (*vditerator).m_model << ":Index:" << (*vditerator).m_modelindex << ":Input:" << input << ":Automatic color correction : " << (*vditerator).m_input[input].getAutoColorCorrection() << endl; // Stores configuration about each channel - const QString brightness = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Brightness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString contrast = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Contrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString saturation = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Saturation") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString whiteness = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Whiteness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString hue = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Hue") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString autobrightnesscontrast = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoBrightnessContrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString autocolorcorrection = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoColorCorrection") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); - const QString imageasmirror = QString::fromLocal8Bit ( "Model %1 Device %2 Input %3 ImageAsMirror") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString brightness = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Brightness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString contrast = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Contrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString saturation = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Saturation") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString whiteness = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Whiteness") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString hue = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 Hue") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString autobrightnesscontrast = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoBrightnessContrast") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString autocolorcorrection = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 AutoColorCorrection") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); + const TQString imageasmirror = TQString::fromLocal8Bit ( "Model %1 Device %2 Input %3 ImageAsMirror") .arg ((*vditerator).m_model ) .arg ((*vditerator).m_modelindex) .arg (input); config->writeEntry( brightness, (*vditerator).m_input[input].getBrightness()); config->writeEntry( contrast, (*vditerator).m_input[input].getContrast()); config->writeEntry( saturation, (*vditerator).m_input[input].getSaturation()); diff --git a/kopete/libkopete/avdevice/videodevicepool.h b/kopete/libkopete/avdevice/videodevicepool.h index 1fbdb3e1..75ed9ed4 100644 --- a/kopete/libkopete/avdevice/videodevicepool.h +++ b/kopete/libkopete/avdevice/videodevicepool.h @@ -18,16 +18,16 @@ #ifndef KOPETE_AVVIDEODEVICE_H #define KOPETE_AVVIDEODEVICE_H -#include +#include #include #include "videoinput.h" #include "videodevicemodelpool.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include "videodevice.h" #include "kopete_export.h" @@ -45,7 +45,7 @@ This class allows kopete to check for the existence, open, configure, test, set @author Cláudio da Silveira Pinheiro */ -typedef QValueVector VideoDeviceVector; +typedef TQValueVector VideoDeviceVector; class VideoDevicePoolPrivate; @@ -68,7 +68,7 @@ public: int startCapturing(); int stopCapturing(); int readFrame(); - int getImage(QImage *qimage); + int getImage(TQImage *qimage); int selectInput(int newinput); int setInputParameters(); int scanDevices(); @@ -113,7 +113,7 @@ protected: unsigned int m_current_device; struct imagebuffer m_buffer; // only used when no devices were found - QMutex m_ready; + TQMutex m_ready; private: VideoDevicePool(); static VideoDevicePool* s_self; diff --git a/kopete/libkopete/avdevice/videoinput.h b/kopete/libkopete/avdevice/videoinput.h index 3381663e..9fc109ad 100644 --- a/kopete/libkopete/avdevice/videoinput.h +++ b/kopete/libkopete/avdevice/videoinput.h @@ -28,9 +28,9 @@ #define __u64 unsigned long long #endif // __u64*/ -#include +#include #include -#include +#include #include "kopete_export.h" #include "videocontrol.h" @@ -46,7 +46,7 @@ class KOPETE_EXPORT VideoInput{ public: VideoInput(); ~VideoInput(); - QString name; + TQString name; int hastuner; __u64 m_standards; @@ -69,7 +69,7 @@ public: bool setImageAsMirror(bool imageasmirror); protected: - QValueVector m_control; + TQValueVector m_control; float m_brightness; float m_contrast; float m_saturation; diff --git a/kopete/libkopete/clientiface.h b/kopete/libkopete/clientiface.h index 02162189..6a7229b7 100644 --- a/kopete/libkopete/clientiface.h +++ b/kopete/libkopete/clientiface.h @@ -10,31 +10,31 @@ class ClientIface : virtual public DCOPObject K_DCOP k_dcop: /** Get the set of networks that the daemon is aware of. Mostly for debug */ - virtual QStringList networks() = 0; + virtual TQStringList networks() = 0; /** * Get the status of the connection to the given host. * @param host * @return a NetworkStatus::EnumStatus representing the state of the connection to the given host */ - virtual int status( const QString & host = QString::null ) = 0; + virtual int status( const TQString & host = TQString::null ) = 0; /** * Request a connection to the named host, registering the application's usage of this connection * @param host The hostname the client wants to connect to. * @param userInitiated Indicates whether the connection is a direct result of a user action or is a background task. Used by the daemon to decide whether to create an on-demand connection. * @return An NetworkStatus::EnumRequestResult indicating whether the request was accepted */ - virtual int request( const QString & host, bool userInitiated ) = 0; + virtual int request( const TQString & host, bool userInitiated ) = 0; /** * Indicate that a previously registered connection to the given host is no longer needed by this client * @param host The hostname being relinquished. */ - virtual void relinquish( const QString & host ) = 0; + virtual void relinquish( const TQString & host ) = 0; /** * Indicate that a communication failure has occured for a given host * @param host The hostname for which the failure occurred. * @return True indicates the caller should try again to lookup the host, as the daemon has another IP address available. */ - virtual bool reportFailure( const QString & host ) = 0; + virtual bool reportFailure( const TQString & host ) = 0; /** * Utility method to check the daemon's status */ @@ -44,13 +44,13 @@ k_dcop_signals: * @param host The host which the application has indicated it is using * @param status The new status of the network used to reach host. */ - void statusChange( QString host, int status ); + void statusChange( TQString host, int status ); /** * The network would like to shut down - any clients using this host are to finish using it immediately and call * relinquish() when done. * @param host The host, registered as in use by applications, which is about to be disconnected. */ - void shutdownRequested( QString host ); + void shutdownRequested( TQString host ); }; #endif diff --git a/kopete/libkopete/compat/kpixmapregionselectordialog.cpp b/kopete/libkopete/compat/kpixmapregionselectordialog.cpp index ee9d185e..c394af0f 100644 --- a/kopete/libkopete/compat/kpixmapregionselectordialog.cpp +++ b/kopete/libkopete/compat/kpixmapregionselectordialog.cpp @@ -19,16 +19,16 @@ #include "kpixmapregionselectordialog.h" #include -#include -#include +#include +#include #include #include -KPixmapRegionSelectorDialog::KPixmapRegionSelectorDialog(QWidget *parent, +KPixmapRegionSelectorDialog::KPixmapRegionSelectorDialog(TQWidget *parent, const char *name, bool modal ) : KDialogBase(parent, name, modal, i18n("Select Region of Image"), Help|Ok|Cancel, Ok, true ) { - QVBox *vbox=new QVBox(this); - new QLabel(i18n("Please click and drag on the image to select the region of interest:"), vbox); + TQVBox *vbox=new TQVBox(this); + new TQLabel(i18n("Please click and drag on the image to select the region of interest:"), vbox); m_pixmapSelectorWidget= new KPixmapRegionSelectorWidget(vbox); vbox->setSpacing( KDialog::spacingHint() ); @@ -40,86 +40,86 @@ KPixmapRegionSelectorDialog::~KPixmapRegionSelectorDialog() { } -QRect KPixmapRegionSelectorDialog::getSelectedRegion(const QPixmap &pixmap, QWidget *parent ) +TQRect KPixmapRegionSelectorDialog::getSelectedRegion(const TQPixmap &pixmap, TQWidget *parent ) { KPixmapRegionSelectorDialog dialog(parent); dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap); - QDesktopWidget desktopWidget; - QRect screen=desktopWidget.availableGeometry(); + TQDesktopWidget desktopWidget; + TQRect screen=desktopWidget.availableGeometry(); dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize( (int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5)); int result = dialog.exec(); - QRect rect; + TQRect rect; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) rect = dialog.pixmapRegionSelectorWidget()->unzoomedSelectedRegion(); return rect; } -QRect KPixmapRegionSelectorDialog::getSelectedRegion(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent ) +TQRect KPixmapRegionSelectorDialog::getSelectedRegion(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent ) { KPixmapRegionSelectorDialog dialog(parent); dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap); dialog.pixmapRegionSelectorWidget()->setSelectionAspectRatio(aspectRatioWidth,aspectRatioHeight); - QDesktopWidget desktopWidget; - QRect screen=desktopWidget.availableGeometry(); + TQDesktopWidget desktopWidget; + TQRect screen=desktopWidget.availableGeometry(); dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize( (int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5)); int result = dialog.exec(); - QRect rect; + TQRect rect; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) rect = dialog.pixmapRegionSelectorWidget()->unzoomedSelectedRegion(); return rect; } -QImage KPixmapRegionSelectorDialog::getSelectedImage(const QPixmap &pixmap, QWidget *parent ) +TQImage KPixmapRegionSelectorDialog::getSelectedImage(const TQPixmap &pixmap, TQWidget *parent ) { KPixmapRegionSelectorDialog dialog(parent); dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap); - QDesktopWidget desktopWidget; - QRect screen=desktopWidget.availableGeometry(); + TQDesktopWidget desktopWidget; + TQRect screen=desktopWidget.availableGeometry(); dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize( (int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5)); int result = dialog.exec(); - QImage image; + TQImage image; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) image = dialog.pixmapRegionSelectorWidget()->selectedImage(); return image; } -QImage KPixmapRegionSelectorDialog::getSelectedImage(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent ) +TQImage KPixmapRegionSelectorDialog::getSelectedImage(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent ) { KPixmapRegionSelectorDialog dialog(parent); dialog.pixmapRegionSelectorWidget()->setPixmap(pixmap); dialog.pixmapRegionSelectorWidget()->setSelectionAspectRatio(aspectRatioWidth,aspectRatioHeight); - QDesktopWidget desktopWidget; - QRect screen=desktopWidget.availableGeometry(); + TQDesktopWidget desktopWidget; + TQRect screen=desktopWidget.availableGeometry(); dialog.pixmapRegionSelectorWidget()->setMaximumWidgetSize( (int)(screen.width()*4.0/5), (int)(screen.height()*4.0/5)); int result = dialog.exec(); - QImage image; + TQImage image; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) image = dialog.pixmapRegionSelectorWidget()->selectedImage(); return image; diff --git a/kopete/libkopete/compat/kpixmapregionselectordialog.h b/kopete/libkopete/compat/kpixmapregionselectordialog.h index 1c15067e..ffc5551e 100644 --- a/kopete/libkopete/compat/kpixmapregionselectordialog.h +++ b/kopete/libkopete/compat/kpixmapregionselectordialog.h @@ -20,7 +20,7 @@ #ifndef __KPIXMAPREGIONSELECTORDIALOG_H__ #define __KPIXMAPREGIONSELECTORDIALOG_H__ -#include +#include #include #include @@ -47,7 +47,7 @@ public: * later the setPixmap method of the KPixmapRegionSelectorWidget widget of * the new object. */ - KPixmapRegionSelectorDialog(QWidget *parent=0L, const char *name=0L, + KPixmapRegionSelectorDialog(TQWidget *parent=0L, const char *name=0L, bool modal = false ); /** * The destructor of the dialog @@ -68,7 +68,7 @@ public: * @returns the selected rectangle, or an invalid rectangle if the user * pressed the Cancel button. */ - static QRect getSelectedRegion(const QPixmap &pixmap, QWidget *parent = 0L ); + static TQRect getSelectedRegion(const TQPixmap &pixmap, TQWidget *parent = 0L ); /** * Creates a modal dialog, lets the user to select a region of the @p pixmap @@ -78,7 +78,7 @@ public: * @returns the selected rectangle, or an invalid rectangle if the user * pressed the Cancel button. */ - static QRect getSelectedRegion(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent = 0L ); + static TQRect getSelectedRegion(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent = 0L ); /** * Creates a modal dialog, lets the user to select a region of the @p pixmap @@ -87,7 +87,7 @@ public: * @returns the selected image, or an invalid image if the user * pressed the Cancel button. */ - static QImage getSelectedImage(const QPixmap &pixmap, QWidget *parent = 0L ); + static TQImage getSelectedImage(const TQPixmap &pixmap, TQWidget *parent = 0L ); /** * Creates a modal dialog, lets the user to select a region of the @p pixmap @@ -97,7 +97,7 @@ public: * @returns the selected image, or an invalid image if the user * pressed the Cancel button. */ - static QImage getSelectedImage(const QPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, QWidget *parent = 0L ); + static TQImage getSelectedImage(const TQPixmap &pixmap, int aspectRatioWidth, int aspectRatioHeight, TQWidget *parent = 0L ); protected: KPixmapRegionSelectorWidget *m_pixmapSelectorWidget; diff --git a/kopete/libkopete/compat/kpixmapregionselectorwidget.cpp b/kopete/libkopete/compat/kpixmapregionselectorwidget.cpp index da2be5f9..ada867bb 100644 --- a/kopete/libkopete/compat/kpixmapregionselectorwidget.cpp +++ b/kopete/libkopete/compat/kpixmapregionselectorwidget.cpp @@ -24,29 +24,29 @@ */ #include "kpixmapregionselectorwidget.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include #include #include -#include -#include +#include +#include -KPixmapRegionSelectorWidget::KPixmapRegionSelectorWidget( QWidget *parent, - const char *name) : QWidget( parent, name) +KPixmapRegionSelectorWidget::KPixmapRegionSelectorWidget( TQWidget *parent, + const char *name) : TQWidget( parent, name) { - QHBoxLayout * hboxLayout=new QHBoxLayout( this ); + TQHBoxLayout * hboxLayout=new TQHBoxLayout( this ); hboxLayout->addStretch(); - QVBoxLayout * vboxLayout=new QVBoxLayout( hboxLayout ); + TQVBoxLayout * vboxLayout=new TQVBoxLayout( hboxLayout ); vboxLayout->addStretch(); - m_label = new QLabel(this, "pixmapHolder"); + m_label = new TQLabel(this, "pixmapHolder"); m_label->setBackgroundMode( Qt::NoBackground ); m_label->installEventFilter( this ); @@ -64,7 +64,7 @@ KPixmapRegionSelectorWidget::~KPixmapRegionSelectorWidget() { } -void KPixmapRegionSelectorWidget::setPixmap( const QPixmap &pixmap ) +void KPixmapRegionSelectorWidget::setPixmap( const TQPixmap &pixmap ) { Q_ASSERT(!pixmap.isNull()); //This class isn't designed to deal with null pixmaps. m_originalPixmap = pixmap; @@ -79,12 +79,12 @@ void KPixmapRegionSelectorWidget::resetSelection() updatePixmap(); } -QRect KPixmapRegionSelectorWidget::selectedRegion() const +TQRect KPixmapRegionSelectorWidget::selectedRegion() const { return m_selectedRegion; } -void KPixmapRegionSelectorWidget::setSelectedRegion(const QRect &rect) +void KPixmapRegionSelectorWidget::setSelectedRegion(const TQRect &rect) { if (!rect.isValid()) resetSelection(); else @@ -92,7 +92,7 @@ void KPixmapRegionSelectorWidget::setSelectedRegion(const QRect &rect) m_selectedRegion=rect; updatePixmap(); - QRect r=unzoomedSelectedRegion(); + TQRect r=unzoomedSelectedRegion(); } } @@ -102,7 +102,7 @@ void KPixmapRegionSelectorWidget::updatePixmap() if (m_selectedRegion.width()>m_originalPixmap.width()) m_selectedRegion.setWidth( m_originalPixmap.width() ); if (m_selectedRegion.height()>m_originalPixmap.height()) m_selectedRegion.setHeight( m_originalPixmap.height() ); - QPainter painter; + TQPainter painter; if (m_linedPixmap.isNull()) { m_linedPixmap = m_originalPixmap; @@ -110,21 +110,21 @@ void KPixmapRegionSelectorWidget::updatePixmap() painter.begin(&m_linedPixmap); painter.setRasterOp( Qt::XorROP ); painter.fillRect(0,0,m_linedPixmap.width(), m_linedPixmap.height(), - QBrush( QColor(255,255,255), Qt::BDiagPattern) ); + TQBrush( TQColor(255,255,255), Qt::BDiagPattern) ); painter.end(); - QImage image=m_linedPixmap.convertToImage(); - image=KImageEffect::fade(image, (float)0.4, QColor(0,0,0)); + TQImage image=m_linedPixmap.convertToImage(); + image=KImageEffect::fade(image, (float)0.4, TQColor(0,0,0)); m_linedPixmap.convertFromImage(image); } - QPixmap pixmap = m_linedPixmap; + TQPixmap pixmap = m_linedPixmap; painter.begin(&pixmap); painter.drawPixmap( m_selectedRegion.topLeft(), m_originalPixmap, m_selectedRegion ); - painter.setPen( QColor(255,255,255) ); + painter.setPen( TQColor(255,255,255) ); painter.setRasterOp( Qt::XorROP ); painter.drawRect( m_selectedRegion ); @@ -141,12 +141,12 @@ KPopupMenu *KPixmapRegionSelectorWidget::createPopupMenu() popup->insertTitle(i18n("Image Operations")); KAction *action = new KAction(i18n("&Rotate Clockwise"), "rotate_cw", - 0, this, SLOT(rotateClockwise()), + 0, this, TQT_SLOT(rotateClockwise()), popup, "rotateclockwise"); action->plug(popup); action = new KAction(i18n("Rotate &Counterclockwise"), "rotate_ccw", - 0, this, SLOT(rotateCounterclockwise()), + 0, this, TQT_SLOT(rotateCounterclockwise()), popup, "rotatecounterclockwise"); action->plug(popup); @@ -161,7 +161,7 @@ void KPixmapRegionSelectorWidget::rotate(KImageEffect::RotateDirection direction { int w=m_originalPixmap.width(); int h=m_originalPixmap.height(); - QImage img=m_unzoomedPixmap.convertToImage(); + TQImage img=m_unzoomedPixmap.convertToImage(); img= KImageEffect::rotate(img, direction); m_unzoomedPixmap.convertFromImage(img); @@ -169,7 +169,7 @@ void KPixmapRegionSelectorWidget::rotate(KImageEffect::RotateDirection direction img= KImageEffect::rotate(img, direction); m_originalPixmap.convertFromImage(img); - m_linedPixmap=QPixmap(); + m_linedPixmap=TQPixmap(); if (m_forcedAspectRatio>0 && m_forcedAspectRatio!=1) resetSelection(); @@ -206,12 +206,12 @@ void KPixmapRegionSelectorWidget::rotateCounterclockwise() rotate(KImageEffect::Rotate270); } -bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev) +bool KPixmapRegionSelectorWidget::eventFilter(TQObject *obj, TQEvent *ev) { - if ( ev->type() == QEvent::MouseButtonPress ) + if ( ev->type() == TQEvent::MouseButtonPress ) { - QMouseEvent *mev= (QMouseEvent *)(ev); - //kdDebug() << QString("click at %1,%2").arg( mev->x() ).arg( mev->y() ) << endl; + TQMouseEvent *mev= (TQMouseEvent *)(ev); + //kdDebug() << TQString("click at %1,%2").arg( mev->x() ).arg( mev->y() ) << endl; if ( mev->button() == RightButton ) { @@ -221,7 +221,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev) return TRUE; }; - QCursor cursor; + TQCursor cursor; if ( m_selectedRegion.contains( mev->pos() ) && m_selectedRegion!=m_originalPixmap.rect() ) @@ -234,7 +234,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev) m_state=Resizing; cursor.setShape( Qt::CrossCursor ); } - QApplication::setOverrideCursor(cursor); + TQApplication::setOverrideCursor(cursor); m_tempFirstClick=mev->pos(); @@ -242,11 +242,11 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev) return TRUE; } - if ( ev->type() == QEvent::MouseMove ) + if ( ev->type() == TQEvent::MouseMove ) { - QMouseEvent *mev= (QMouseEvent *)(ev); + TQMouseEvent *mev= (TQMouseEvent *)(ev); - //kdDebug() << QString("move to %1,%2").arg( mev->x() ).arg( mev->y() ) << endl; + //kdDebug() << TQString("move to %1,%2").arg( mev->x() ).arg( mev->y() ) << endl; if ( m_state == Resizing ) { @@ -300,26 +300,26 @@ bool KPixmapRegionSelectorWidget::eventFilter(QObject *obj, QEvent *ev) return TRUE; } - if ( ev->type() == QEvent::MouseButtonRelease ) + if ( ev->type() == TQEvent::MouseButtonRelease ) { - QMouseEvent *mev= (QMouseEvent *)(ev); + TQMouseEvent *mev= (TQMouseEvent *)(ev); if ( m_state == Resizing && mev->pos() == m_tempFirstClick) resetSelection(); m_state=None; - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); return TRUE; } - QWidget::eventFilter(obj, ev); + TQWidget::eventFilter(obj, ev); return FALSE; } -QRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const QPoint & startPoint, const QPoint & _endPoint ) +TQRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const TQPoint & startPoint, const TQPoint & _endPoint ) { - QPoint endPoint = _endPoint; + TQPoint endPoint = _endPoint; if ( endPoint.x() < 0 ) endPoint.setX(0); else if ( endPoint.x() > m_originalPixmap.width() ) endPoint.setX(m_originalPixmap.width()); if ( endPoint.y() < 0 ) endPoint.setY(0); @@ -382,20 +382,20 @@ QRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const QPoint & startP x=startPoint.x()-w; } - return QRect(x,y,w,h); + return TQRect(x,y,w,h); } -QRect KPixmapRegionSelectorWidget::unzoomedSelectedRegion() const +TQRect KPixmapRegionSelectorWidget::unzoomedSelectedRegion() const { - return QRect((int)(m_selectedRegion.x()/m_zoomFactor), + return TQRect((int)(m_selectedRegion.x()/m_zoomFactor), (int)(m_selectedRegion.y()/m_zoomFactor), (int)(m_selectedRegion.width()/m_zoomFactor), (int)(m_selectedRegion.height()/m_zoomFactor)); } -QImage KPixmapRegionSelectorWidget::selectedImage() const +TQImage KPixmapRegionSelectorWidget::selectedImage() const { - QImage origImage=m_unzoomedPixmap.convertToImage(); + TQImage origImage=m_unzoomedPixmap.convertToImage(); return origImage.copy(unzoomedSelectedRegion()); } @@ -415,25 +415,25 @@ void KPixmapRegionSelectorWidget::setMaximumWidgetSize(int width, int height) m_maxHeight=height; m_originalPixmap=m_unzoomedPixmap; - if (m_selectedRegion == m_originalPixmap.rect()) m_selectedRegion=QRect(); + if (m_selectedRegion == m_originalPixmap.rect()) m_selectedRegion=TQRect(); -// kdDebug() << QString(" original Pixmap :") << m_originalPixmap.rect() << endl; -// kdDebug() << QString(" unzoomed Pixmap : %1 x %2 ").arg(m_unzoomedPixmap.width()).arg(m_unzoomedPixmap.height()) << endl; +// kdDebug() << TQString(" original Pixmap :") << m_originalPixmap.rect() << endl; +// kdDebug() << TQString(" unzoomed Pixmap : %1 x %2 ").arg(m_unzoomedPixmap.width()).arg(m_unzoomedPixmap.height()) << endl; if ( !m_originalPixmap.isNull() && ( m_originalPixmap.width() > m_maxWidth || m_originalPixmap.height() > m_maxHeight ) ) { /* We have to resize the pixmap to get it complete on the screen */ - QImage image=m_originalPixmap.convertToImage(); - m_originalPixmap.convertFromImage( image.smoothScale( width, height, QImage::ScaleMin ) ); + TQImage image=m_originalPixmap.convertToImage(); + m_originalPixmap.convertFromImage( image.smoothScale( width, height, TQImage::ScaleMin ) ); double oldZoomFactor = m_zoomFactor; m_zoomFactor=m_originalPixmap.width()/(double)m_unzoomedPixmap.width(); if (m_selectedRegion.isValid()) { m_selectedRegion= - QRect((int)(m_selectedRegion.x()*m_zoomFactor/oldZoomFactor), + TQRect((int)(m_selectedRegion.x()*m_zoomFactor/oldZoomFactor), (int)(m_selectedRegion.y()*m_zoomFactor/oldZoomFactor), (int)(m_selectedRegion.width()*m_zoomFactor/oldZoomFactor), (int)(m_selectedRegion.height()*m_zoomFactor/oldZoomFactor) ); @@ -442,7 +442,7 @@ void KPixmapRegionSelectorWidget::setMaximumWidgetSize(int width, int height) if (!m_selectedRegion.isValid()) m_selectedRegion = m_originalPixmap.rect(); - m_linedPixmap=QPixmap(); + m_linedPixmap=TQPixmap(); updatePixmap(); resize(m_label->width(), m_label->height()); } diff --git a/kopete/libkopete/compat/kpixmapregionselectorwidget.h b/kopete/libkopete/compat/kpixmapregionselectorwidget.h index a4a9cfcf..6b0a319b 100644 --- a/kopete/libkopete/compat/kpixmapregionselectorwidget.h +++ b/kopete/libkopete/compat/kpixmapregionselectorwidget.h @@ -19,10 +19,10 @@ #ifndef __KPIXMAPREGIONSELECTORWIDGET_H__ #define __KPIXMAPREGIONSELECTORWIDGET_H__ -#include -#include -#include -#include +#include +#include +#include +#include #include class KPopupMenu; @@ -48,7 +48,7 @@ public: /** * Constructor for a KPixmapRegionSelectorWidget. */ - KPixmapRegionSelectorWidget( QWidget *parent = 0L, const char *name=0L); + KPixmapRegionSelectorWidget( TQWidget *parent = 0L, const char *name=0L); /** * Destructor for a KPixmapRegionSelectorWidget @@ -60,28 +60,28 @@ public: * @param pixmap The pixmap. Must be non-null. * */ - void setPixmap( const QPixmap &pixmap ); + void setPixmap( const TQPixmap &pixmap ); /** * @return the original whole pixmap that we're using in this widget as the * pixmap the user is selecting a region from. */ - QPixmap pixmap() const { return m_unzoomedPixmap; }; + TQPixmap pixmap() const { return m_unzoomedPixmap; }; /** * Sets the selected region to be @p rect (in zoomed pixmap coordinates) */ - void setSelectedRegion(const QRect &rect); + void setSelectedRegion(const TQRect &rect); /** * Returns the selected region ( in zoomed pixmap coordinates ) */ - QRect selectedRegion() const; + TQRect selectedRegion() const; /** * Returns the selected region ( in unzoomed, original pixmap coordinates ) */ - QRect unzoomedSelectedRegion() const; + TQRect unzoomedSelectedRegion() const; /** * Resets the selection to use the whole image @@ -89,10 +89,10 @@ public: void resetSelection(); /** - * @returns a QImage object with just the region the user selected from the + * @returns a TQImage object with just the region the user selected from the * image */ - QImage selectedImage() const; + TQImage selectedImage() const; /** * Sets the aspect ration that the selected subimage should have. The way to @@ -140,7 +140,7 @@ protected: virtual KPopupMenu *createPopupMenu(); private: - bool eventFilter(QObject *obj, QEvent *ev); + bool eventFilter(TQObject *obj, TQEvent *ev); /** * Recalculates the pixmap that is shown based on the current selected area, @@ -148,18 +148,18 @@ private: */ void updatePixmap(); - QRect calcSelectionRectangle( const QPoint &startPoint, const QPoint & endPoint ); + TQRect calcSelectionRectangle( const TQPoint &startPoint, const TQPoint & endPoint ); enum CursorState { None=0, Resizing, Moving }; CursorState m_state; - QPixmap m_unzoomedPixmap; - QPixmap m_originalPixmap; - QPixmap m_linedPixmap; - QRect m_selectedRegion; - QLabel *m_label; + TQPixmap m_unzoomedPixmap; + TQPixmap m_originalPixmap; + TQPixmap m_linedPixmap; + TQRect m_selectedRegion; + TQLabel *m_label; - QPoint m_tempFirstClick; + TQPoint m_tempFirstClick; double m_forcedAspectRatio; int m_maxWidth, m_maxHeight; diff --git a/kopete/libkopete/connectionmanager.cpp b/kopete/libkopete/connectionmanager.cpp index b2dd7825..dcfa0ee1 100644 --- a/kopete/libkopete/connectionmanager.cpp +++ b/kopete/libkopete/connectionmanager.cpp @@ -20,13 +20,13 @@ class ConnectionManagerPrivate }; // Connection manager itself -ConnectionManager::ConnectionManager( QObject * parent, const char * name ) : DCOPObject( "ConnectionManager" ),QObject( parent, name ) +ConnectionManager::ConnectionManager( TQObject * parent, const char * name ) : DCOPObject( "ConnectionManager" ),TQObject( parent, name ) { d = new ConnectionManagerPrivate; d->m_stub = new ClientIface_stub( kapp->dcopClient(), "kded", "networkstatus" ); - connectDCOPSignal( "kded", "networkstatus", "statusChange(QString,int)", "slotStatusChanged(QString,int)", false ); + connectDCOPSignal( "kded", "networkstatus", "statusChange(TQString,int)", "slotStatusChanged(TQString,int)", false ); d->m_userInitiatedOnly = false; initialise(); } @@ -50,7 +50,7 @@ void ConnectionManager::initialise() void ConnectionManager::updateStatus() { - NetworkStatus::EnumStatus daemonStatus = (NetworkStatus::EnumStatus)d->m_stub->status( QString::null ); + NetworkStatus::EnumStatus daemonStatus = (NetworkStatus::EnumStatus)d->m_stub->status( TQString::null ); kdDebug() << k_funcinfo << endl; switch ( daemonStatus ) { @@ -87,7 +87,7 @@ ConnectionManager::~ConnectionManager() delete d; } -NetworkStatus::EnumStatus ConnectionManager::status( const QString & host ) +NetworkStatus::EnumStatus ConnectionManager::status( const TQString & host ) { // need also to check that the daemon hasn't died updateStatus(); @@ -100,7 +100,7 @@ NetworkStatus::EnumStatus ConnectionManager::status( const QString & host ) return NetworkStatus::NoNetworks; } -NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( QWidget * mainWidget, const QString & host, bool userInitiated ) +NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( TQWidget * mainWidget, const TQString & host, bool userInitiated ) { kdDebug() << k_funcinfo << endl; NetworkStatus::EnumRequestResult result; @@ -123,12 +123,12 @@ NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( QWidget * return result; } -void ConnectionManager::relinquishConnection( const QString & host ) +void ConnectionManager::relinquishConnection( const TQString & host ) { d->m_stub->relinquish( host ); } -void ConnectionManager::slotStatusChanged( QString host, int status ) +void ConnectionManager::slotStatusChanged( TQString host, int status ) { kdDebug() << k_funcinfo << endl; updateStatus(); @@ -139,7 +139,7 @@ void ConnectionManager::slotStatusChanged( QString host, int status ) emit statusChanged( host, (NetworkStatus::EnumStatus)status ); } -bool ConnectionManager::askToConnect( QWidget * mainWidget ) +bool ConnectionManager::askToConnect( TQWidget * mainWidget ) { i18n( "A network connection was disconnected. The application is now in offline mode. Do you want the application to resume network operations when the network is available again?" ); i18n( "This application is currently in offline mode. Do you want to connect?" ); @@ -147,7 +147,7 @@ bool ConnectionManager::askToConnect( QWidget * mainWidget ) i18n("This application is currently in offline mode. Do you want to connect in order to carry out this operation?"), i18n("Leave Offline Mode?"), i18n("Connect"), i18n("Stay Offline"), - QString::fromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes ); + TQString::fromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes ); } #include "connectionmanager.moc" diff --git a/kopete/libkopete/connectionmanager.h b/kopete/libkopete/connectionmanager.h index b78df8d4..63217183 100644 --- a/kopete/libkopete/connectionmanager.h +++ b/kopete/libkopete/connectionmanager.h @@ -23,7 +23,7 @@ class ConnectionManagerPrivate; -class KOPETE_EXPORT ConnectionManager : public QObject, virtual public DCOPObject +class KOPETE_EXPORT ConnectionManager : public TQObject, virtual public DCOPObject { Q_OBJECT K_DCOP @@ -31,25 +31,25 @@ class KOPETE_EXPORT ConnectionManager : public QObject, virtual public DCOPObjec static ConnectionManager* self(); enum State { Inactive, Online, Offline, Pending }; virtual ~ConnectionManager(); - NetworkStatus::EnumStatus status( const QString & host ); + NetworkStatus::EnumStatus status( const TQString & host ); // check if a hostname is available. Ask user if offline. Request host - NetworkStatus::EnumRequestResult requestConnection( QWidget* mainWidget, const QString & host, bool userInitiated ); + NetworkStatus::EnumRequestResult requestConnection( TQWidget* mainWidget, const TQString & host, bool userInitiated ); // method to relinquish a connection - void relinquishConnection( const QString & host ); + void relinquishConnection( const TQString & host ); signals: // signal that the network for a hostname is up/down - void statusChanged( const QString & host, NetworkStatus::EnumStatus status ); + void statusChanged( const TQString & host, NetworkStatus::EnumStatus status ); protected: // sets up internal state void initialise(); // reread the desktop status from the daemon and update internal state void updateStatus(); // ask if the user would like to reconnect - bool askToConnect( QWidget * mainWidget ); + bool askToConnect( TQWidget * mainWidget ); k_dcop: - void slotStatusChanged( QString host, int status ); + void slotStatusChanged( TQString host, int status ); private: - ConnectionManager( QObject *parent, const char * name ); + ConnectionManager( TQObject *parent, const char * name ); ConnectionManagerPrivate *d; static ConnectionManager * s_self; }; diff --git a/kopete/libkopete/kabcpersistence.cpp b/kopete/libkopete/kabcpersistence.cpp index 527a99a4..93d55b35 100644 --- a/kopete/libkopete/kabcpersistence.cpp +++ b/kopete/libkopete/kabcpersistence.cpp @@ -15,8 +15,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include #include @@ -47,19 +47,19 @@ namespace Kopete /** * utility function to merge two QStrings containing individual elements separated by 0xE000 */ -static QString unionContents( QString arg1, QString arg2 ) +static TQString unionContents( TQString arg1, TQString arg2 ) { - QChar separator( 0xE000 ); - QStringList outList = QStringList::split( separator, arg1 ); - QStringList arg2List = QStringList::split( separator, arg2 ); - for ( QStringList::iterator it = arg2List.begin(); it != arg2List.end(); ++it ) + TQChar separator( 0xE000 ); + TQStringList outList = TQStringList::split( separator, arg1 ); + TQStringList arg2List = TQStringList::split( separator, arg2 ); + for ( TQStringList::iterator it = arg2List.begin(); it != arg2List.end(); ++it ) if ( !outList.contains( *it ) ) outList.append( *it ); - QString out = outList.join( separator ); + TQString out = outList.join( separator ); return out; } -KABCPersistence::KABCPersistence( QObject * parent, const char * name ) : QObject( parent, name ) +KABCPersistence::KABCPersistence( TQObject * parent, const char * name ) : TQObject( parent, name ) { s_pendingResources.setAutoDelete( false ); } @@ -72,7 +72,7 @@ KABCPersistence *KABCPersistence::s_self = 0L; bool KABCPersistence::s_addrBookWritePending = false; -QPtrList KABCPersistence::s_pendingResources; +TQPtrList KABCPersistence::s_pendingResources; KABC::AddressBook* KABCPersistence::s_addressBook = 0; @@ -112,29 +112,29 @@ void KABCPersistence::write( MetaContact * mc ) else { // collate the instant messaging data to be inserted into the address book - QMap addressMap; - QPtrList contacts = mc->contacts(); - QPtrListIterator cIt( contacts ); + TQMap addressMap; + TQPtrList contacts = mc->contacts(); + TQPtrListIterator cIt( contacts ); while ( Contact * c = cIt.current() ) { - QStringList addresses = addressMap[ c->protocol()->addressBookIndexField() ]; + TQStringList addresses = addressMap[ c->protocol()->addressBookIndexField() ]; addresses.append( c->contactId() ); addressMap.insert( c->protocol()->addressBookIndexField(), addresses ); ++cIt; } // insert a custom field for each protocol - QMap::ConstIterator it = addressMap.begin(); + TQMap::ConstIterator it = addressMap.begin(); for ( ; it != addressMap.end(); ++it ) { // read existing data for this key - QString currentCustomForProtocol = theAddressee.custom( it.key(), QString::fromLatin1( "All" ) ); + TQString currentCustomForProtocol = theAddressee.custom( it.key(), TQString::fromLatin1( "All" ) ); // merge without duplicating - QString toWrite = unionContents( currentCustomForProtocol, it.data().join( QChar( 0xE000 ) ) ); + TQString toWrite = unionContents( currentCustomForProtocol, it.data().join( TQChar( 0xE000 ) ) ); // Note if nothing ends up in the KABC data, this is because insertCustom does nothing if any param is empty. kdDebug( 14010 ) << k_funcinfo << "Writing: " << it.key() << ", " << "All" << ", " << toWrite << endl; - theAddressee.insertCustom( it.key(), QString::fromLatin1( "All" ), toWrite ); - QString check = theAddressee.custom( it.key(), QString::fromLatin1( "All" ) ); + theAddressee.insertCustom( it.key(), TQString::fromLatin1( "All" ), toWrite ); + TQString check = theAddressee.custom( it.key(), TQString::fromLatin1( "All" ) ); } ab->insertAddressee( theAddressee ); //kdDebug( 14010 ) << k_funcinfo << "dumping addressbook before write " << endl; @@ -150,16 +150,16 @@ void KABCPersistence::write( MetaContact * mc ) kdDebug( 14010 ) << k_funcinfo << "...FOUND ONE!" << endl; // Store address book fields - QMap >::ConstIterator appIt = d->addressBook.begin(); + TQMap >::ConstIterator appIt = d->addressBook.begin(); for( ; appIt != d->addressBook.end(); ++appIt ) { - QMap::ConstIterator addrIt = appIt.data().begin(); + TQMap::ConstIterator addrIt = appIt.data().begin(); for( ; addrIt != appIt.data().end(); ++addrIt ) { // read existing data for this key - QString currentCustom = theAddressee.custom( appIt.key(), addrIt.key() ); + TQString currentCustom = theAddressee.custom( appIt.key(), addrIt.key() ); // merge without duplicating - QString toWrite = unionContents( currentCustom, addrIt.data() ); + TQString toWrite = unionContents( currentCustom, addrIt.data() ); // write the result // Note if nothing ends up in the KABC data, this is because insertCustom does nothing if any param is empty. kdDebug( 14010 ) << k_funcinfo << "Writing: " << appIt.key() << ", " << addrIt.key() << ", " << toWrite << endl; @@ -178,7 +178,7 @@ void KABCPersistence::writeAddressBook( const KABC::Resource * res) if ( !s_addrBookWritePending ) { s_addrBookWritePending = true; - QTimer::singleShot( 2000, this, SLOT( slotWriteAddressBook() ) ); + TQTimer::singleShot( 2000, this, TQT_SLOT( slotWriteAddressBook() ) ); } } @@ -186,7 +186,7 @@ void KABCPersistence::slotWriteAddressBook() { //kdDebug( 14010 ) << k_funcinfo << endl; KABC::AddressBook* ab = addressBook(); - QPtrListIterator it( s_pendingResources ); + TQPtrListIterator it( s_pendingResources ); for ( ; it.current(); ++it ) { //kdDebug( 14010 ) << "Writing resource " << it.current()->resourceName() << endl; @@ -229,16 +229,16 @@ void KABCPersistence::removeKABC( MetaContact *) { // remove the link //kdDebug( 14010 ) << k_funcinfo << "...not found." << endl; - d->metaContactId=QString::null; + d->metaContactId=TQString::null; } else { //kdDebug( 14010 ) << k_funcinfo << "...FOUND ONE!" << endl; // Remove address book fields - QMap >::ConstIterator appIt = d->addressBook.begin(); + TQMap >::ConstIterator appIt = d->addressBook.begin(); for( ; appIt != d->addressBook.end(); ++appIt ) { - QMap::ConstIterator addrIt = appIt.data().begin(); + TQMap::ConstIterator addrIt = appIt.data().begin(); for( ; addrIt != appIt.data().end(); ++addrIt ) { // FIXME: This assumes Kopete is the only app writing these fields @@ -265,29 +265,29 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) if ( !addr.isEmpty() ) // if we are associated with KABC { // load the set of addresses from KABC - QStringList customs = addr.customs(); + TQStringList customs = addr.customs(); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = customs.begin(); it != customs.end(); ++it ) { - QString app, name, value; + TQString app, name, value; splitField( *it, app, name, value ); kdDebug( 14010 ) << "app=" << app << " name=" << name << " value=" << value << endl; - if ( app.startsWith( QString::fromLatin1( "messaging/" ) ) ) + if ( app.startsWith( TQString::fromLatin1( "messaging/" ) ) ) { - if ( name == QString::fromLatin1( "All" ) ) + if ( name == TQString::fromLatin1( "All" ) ) { kdDebug( 14010 ) << " syncing \"" << app << ":" << name << " with contactlist " << endl; // Get the protocol name from the custom field // by chopping the 'messaging/' prefix from the custom field app name - QString protocolName = app.right( app.length() - 10 ); + TQString protocolName = app.right( app.length() - 10 ); // munge Jabber hack - if ( protocolName == QString::fromLatin1( "xmpp" ) ) - protocolName = QString::fromLatin1( "jabber" ); + if ( protocolName == TQString::fromLatin1( "xmpp" ) ) + protocolName = TQString::fromLatin1( "jabber" ); // Check Kopete supports it - Protocol * proto = dynamic_cast( PluginManager::self()->loadPlugin( QString::fromLatin1( "kopete_" ) + protocolName ) ); + Protocol * proto = dynamic_cast( PluginManager::self()->loadPlugin( TQString::fromLatin1( "kopete_" ) + protocolName ) ); if ( !proto ) { KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, @@ -297,20 +297,20 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) } // See if we need to add each contact in this protocol - QStringList addresses = QStringList::split( QChar( 0xE000 ), value ); - QStringList::iterator end = addresses.end(); - for ( QStringList::iterator it = addresses.begin(); it != end; ++it ) + TQStringList addresses = TQStringList::split( TQChar( 0xE000 ), value ); + TQStringList::iterator end = addresses.end(); + for ( TQStringList::iterator it = addresses.begin(); it != end; ++it ) { // check whether each one is present in Kopete // Is it in the contact list? // First discard anything after an 0xE120, this is used by IRC to separate nick and server group name, but // IRC doesn't support this properly yet, so the user will have to select an appropriate account manually - int separatorPos = (*it).find( QChar( 0xE120 ) ); + int separatorPos = (*it).find( TQChar( 0xE120 ) ); if ( separatorPos != -1 ) *it = (*it).left( separatorPos ); - QDict accounts = Kopete::AccountManager::self()->accounts( proto ); - QDictIterator acs(accounts); + TQDict accounts = Kopete::AccountManager::self()->accounts( proto ); + TQDictIterator acs(accounts); Kopete::MetaContact *otherMc = 0; for ( acs.toFirst(); acs.current(); ++acs ) { @@ -332,14 +332,14 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) } kdDebug( 14010 ) << *it << " already exists in OTHER metacontact, move here?" << endl; // find the Kopete::Contact and attempt to move it to this metacontact. - otherMc->findContact( proto->pluginId(), QString::null, *it )->setMetaContact( mc ); + otherMc->findContact( proto->pluginId(), TQString::null, *it )->setMetaContact( mc ); } else { // if not, prompt to add it kdDebug( 14010 ) << proto->pluginId() << "://" << *it << " was not found in the contact list. Prompting to add..." << endl; if ( KMessageBox::Yes == KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), - i18n( "An address was added to this contact by another application.
    Would you like to use it in Kopete?
    Protocol: %1
    Address: %2
    " ).arg( proto->displayName() ).arg( *it ), i18n( "Import Address From Address Book" ), i18n("Use"), i18n("Do Not Use"), QString::fromLatin1( "ImportFromKABC" ) ) ) + i18n( "An address was added to this contact by another application.
    Would you like to use it in Kopete?
    Protocol: %1
    Address: %2
    " ).arg( proto->displayName() ).arg( *it ), i18n( "Import Address From Address Book" ), i18n("Use"), i18n("Do Not Use"), TQString::fromLatin1( "ImportFromKABC" ) ) ) { // Check the accounts for this protocol are all connected // Most protocols do not allow you to add contacts while offline @@ -369,7 +369,7 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) AccountSelector *accSelector = new AccountSelector(proto, chooser, "accSelector"); chooser->setMainWidget(accSelector); - if ( chooser->exec() == QDialog::Rejected ) + if ( chooser->exec() == TQDialog::Rejected ) continue; chosen = accSelector->selectedItem(); @@ -418,11 +418,11 @@ bool KABCPersistence::syncWithKABC( MetaContact * mc ) } // FIXME: Remove when IM address API is in KABC (KDE 4) -void KABCPersistence::splitField( const QString &str, QString &app, QString &name, QString &value ) +void KABCPersistence::splitField( const TQString &str, TQString &app, TQString &name, TQString &value ) { int colon = str.find( ':' ); if ( colon != -1 ) { - QString tmp = str.left( colon ); + TQString tmp = str.left( colon ); value = str.mid( colon + 1 ); int dash = tmp.find( '-' ); diff --git a/kopete/libkopete/kabcpersistence.h b/kopete/libkopete/kabcpersistence.h index fa02fb64..f827270f 100644 --- a/kopete/libkopete/kabcpersistence.h +++ b/kopete/libkopete/kabcpersistence.h @@ -54,7 +54,7 @@ class KOPETE_EXPORT KABCPersistence : public QObject */ static KABCPersistence* self(); - KABCPersistence( QObject * parent = 0, const char * name = 0 ); + KABCPersistence( TQObject * parent = 0, const char * name = 0 ); ~KABCPersistence(); /** * @brief Access Kopete's KDE address book instance @@ -86,7 +86,7 @@ class KOPETE_EXPORT KABCPersistence : public QObject void writeAddressBook( const KABC::Resource * res ); protected: - static void splitField( const QString &str, QString &app, QString &name, QString &value ); + static void splitField( const TQString &str, TQString &app, TQString &name, TQString &value ); void dumpAB(); protected slots: @@ -98,7 +98,7 @@ class KOPETE_EXPORT KABCPersistence : public QObject static KABCPersistence * s_self; static KABC::AddressBook* s_addressBook; static bool s_addrBookWritePending; - static QPtrList s_pendingResources; + static TQPtrList s_pendingResources; }; } // end namespace Kopete diff --git a/kopete/libkopete/kautoconfig.cpp b/kopete/libkopete/kautoconfig.cpp index a1885537..d54e3123 100644 --- a/kopete/libkopete/kautoconfig.cpp +++ b/kopete/libkopete/kautoconfig.cpp @@ -21,8 +21,8 @@ #include "kautoconfig.h" #include -#include -#include +#include +#include #include #include #include @@ -63,12 +63,12 @@ public: { init(); } // Widgets to parse - QPtrList widgets; + TQPtrList widgets; // Name of the group that KConfig should be set to for each widget. - QMap groups; + TQMap groups; // Child widgets of widgets to ignore - QPtrList ignore; + TQPtrList ignore; // Reset to false after saveSettings returns true. bool changed; @@ -79,18 +79,18 @@ public: #endif // Known widgets that can be configured - QMap > autoWidgets; + TQMap > autoWidgets; // Default values for the widgets. - QMap defaultValues; - // Widgets to not get properties on (QLabel etc) - QAsciiDict ignoreTheseWidgets; + TQMap defaultValues; + // Widgets to not get properties on (TQLabel etc) + TQAsciiDict ignoreTheseWidgets; void init(){ - ignoreTheseWidgets.insert("QLabel", new int(1)); - ignoreTheseWidgets.insert("QFrame", new int(2)); - ignoreTheseWidgets.insert("QGroupBox", new int(3)); - ignoreTheseWidgets.insert("QButtonGroup", new int(4)); - ignoreTheseWidgets.insert("QWidget", new int(5)); + ignoreTheseWidgets.insert("TQLabel", new int(1)); + ignoreTheseWidgets.insert("TQFrame", new int(2)); + ignoreTheseWidgets.insert("TQGroupBox", new int(3)); + ignoreTheseWidgets.insert("TQButtonGroup", new int(4)); + ignoreTheseWidgets.insert("TQWidget", new int(5)); ignoreTheseWidgets.setAutoDelete(true); static bool defaultKDEPropertyMapInstalled = false; @@ -101,13 +101,13 @@ public: } }; -KAutoConfig::KAutoConfig(KConfig *kconfig, QObject *parent, - const char *name) : QObject(parent, name), config(kconfig) { +KAutoConfig::KAutoConfig(KConfig *kconfig, TQObject *parent, + const char *name) : TQObject(parent, name), config(kconfig) { d = new KAutoConfigPrivate(); } -KAutoConfig::KAutoConfig(QObject *parent, const char *name) : - QObject(parent, name), config(KGlobal::config()) { +KAutoConfig::KAutoConfig(TQObject *parent, const char *name) : + TQObject(parent, name), config(KGlobal::config()) { d = new KAutoConfigPrivate(); } @@ -115,15 +115,15 @@ KAutoConfig::~KAutoConfig(){ delete d; } -void KAutoConfig::addWidget(QWidget *widget, const QString &group){ +void KAutoConfig::addWidget(TQWidget *widget, const TQString &group){ functionCallPostOrderCheck("addWidget",); d->groups.insert(widget, group); d->widgets.append(widget); - QPtrList newAutoConfigWidget; + TQPtrList newAutoConfigWidget; d->autoWidgets.insert(widget, newAutoConfigWidget ); } -void KAutoConfig::ignoreSubWidget(QWidget *widget){ +void KAutoConfig::ignoreSubWidget(TQWidget *widget){ functionCallPostOrderCheck("ignoreSubWidget",); d->ignore.append(widget); } @@ -141,51 +141,51 @@ bool KAutoConfig::retrieveSettings(bool trackChanges){ if(trackChanges){ // QT - changedMap.insert(QString::fromLatin1("QButton"), SIGNAL(stateChanged(int))); - changedMap.insert(QString::fromLatin1("QCheckBox"), SIGNAL(stateChanged(int))); - changedMap.insert(QString::fromLatin1("QPushButton"), SIGNAL(stateChanged(int))); - changedMap.insert(QString::fromLatin1("QRadioButton"), SIGNAL(stateChanged(int))); - changedMap.insert(QString::fromLatin1("QComboBox"), SIGNAL(activated (int))); + changedMap.insert(TQString::fromLatin1("TQButton"), TQT_SIGNAL(stateChanged(int))); + changedMap.insert(TQString::fromLatin1("TQCheckBox"), TQT_SIGNAL(stateChanged(int))); + changedMap.insert(TQString::fromLatin1("TQPushButton"), TQT_SIGNAL(stateChanged(int))); + changedMap.insert(TQString::fromLatin1("TQRadioButton"), TQT_SIGNAL(stateChanged(int))); + changedMap.insert(TQString::fromLatin1("TQComboBox"), TQT_SIGNAL(activated (int))); //qsqlproperty map doesn't store the text, but the value! - //changedMap.insert(QString::fromLatin1("QComboBox"), SIGNAL(textChanged(const QString &))); - changedMap.insert(QString::fromLatin1("QDateEdit"), SIGNAL(valueChanged(const QDate &))); - changedMap.insert(QString::fromLatin1("QDateTimeEdit"), SIGNAL(valueChanged(const QDateTime &))); - changedMap.insert(QString::fromLatin1("QDial"), SIGNAL(valueChanged (int))); - changedMap.insert(QString::fromLatin1("QLineEdit"), SIGNAL(textChanged(const QString &))); - changedMap.insert(QString::fromLatin1("QSlider"), SIGNAL(valueChanged(int))); - changedMap.insert(QString::fromLatin1("QSpinBox"), SIGNAL(valueChanged(int))); - changedMap.insert(QString::fromLatin1("QTimeEdit"), SIGNAL(valueChanged(const QTime &))); - changedMap.insert(QString::fromLatin1("QTextEdit"), SIGNAL(textChanged())); - changedMap.insert(QString::fromLatin1("QTextBrowser"), SIGNAL(sourceChanged(const QString &))); - changedMap.insert(QString::fromLatin1("QMultiLineEdit"), SIGNAL(textChanged())); - changedMap.insert(QString::fromLatin1("QListBox"), SIGNAL(selectionChanged())); - changedMap.insert(QString::fromLatin1("QTabWidget"), SIGNAL(currentChanged(QWidget *))); + //changedMap.insert(TQString::fromLatin1("TQComboBox"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert(TQString::fromLatin1("QDateEdit"), TQT_SIGNAL(valueChanged(const TQDate &))); + changedMap.insert(TQString::fromLatin1("QDateTimeEdit"), TQT_SIGNAL(valueChanged(const TQDateTime &))); + changedMap.insert(TQString::fromLatin1("TQDial"), TQT_SIGNAL(valueChanged (int))); + changedMap.insert(TQString::fromLatin1("TQLineEdit"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert(TQString::fromLatin1("TQSlider"), TQT_SIGNAL(valueChanged(int))); + changedMap.insert(TQString::fromLatin1("TQSpinBox"), TQT_SIGNAL(valueChanged(int))); + changedMap.insert(TQString::fromLatin1("QTimeEdit"), TQT_SIGNAL(valueChanged(const TQTime &))); + changedMap.insert(TQString::fromLatin1("TQTextEdit"), TQT_SIGNAL(textChanged())); + changedMap.insert(TQString::fromLatin1("TQTextBrowser"), TQT_SIGNAL(sourceChanged(const TQString &))); + changedMap.insert(TQString::fromLatin1("TQMultiLineEdit"), TQT_SIGNAL(textChanged())); + changedMap.insert(TQString::fromLatin1("TQListBox"), TQT_SIGNAL(selectionChanged())); + changedMap.insert(TQString::fromLatin1("TQTabWidget"), TQT_SIGNAL(currentChanged(TQWidget *))); // KDE - changedMap.insert( QString::fromLatin1("KComboBox"), SIGNAL(activated (int))); - changedMap.insert( QString::fromLatin1("KFontCombo"), SIGNAL(activated (int))); - changedMap.insert( QString::fromLatin1("KFontRequester"), SIGNAL(fontSelected(const QFont &))); - changedMap.insert( QString::fromLatin1("KFontChooser"), SIGNAL(fontSelected(const QFont &))); - changedMap.insert( QString::fromLatin1("KHistoryCombo"), SIGNAL(activated (int))); - - changedMap.insert( QString::fromLatin1("KColorButton"), SIGNAL(changed(const QColor &))); - changedMap.insert( QString::fromLatin1("KDatePicker"), SIGNAL(dateSelected (QDate))); - changedMap.insert( QString::fromLatin1("KEditListBox"), SIGNAL(changed())); - changedMap.insert( QString::fromLatin1("KListBox"), SIGNAL(selectionChanged())); - changedMap.insert( QString::fromLatin1("KLineEdit"), SIGNAL(textChanged(const QString &))); - changedMap.insert( QString::fromLatin1("KPasswordEdit"), SIGNAL(textChanged(const QString &))); - changedMap.insert( QString::fromLatin1("KRestrictedLine"), SIGNAL(textChanged(const QString &))); - changedMap.insert( QString::fromLatin1("KTextBrowser"), SIGNAL(sourceChanged(const QString &))); - changedMap.insert( QString::fromLatin1("KTextEdit"), SIGNAL(textChanged())); - changedMap.insert( QString::fromLatin1("KURLRequester"), SIGNAL(textChanged (const QString& ))); - changedMap.insert( QString::fromLatin1("KIntNumInput"), SIGNAL(valueChanged (int))); - changedMap.insert( QString::fromLatin1("KIntSpinBox"), SIGNAL(valueChanged (int))); - changedMap.insert( QString::fromLatin1("KDoubleNumInput"), SIGNAL(valueChanged (double))); + changedMap.insert( TQString::fromLatin1("KComboBox"), TQT_SIGNAL(activated (int))); + changedMap.insert( TQString::fromLatin1("KFontCombo"), TQT_SIGNAL(activated (int))); + changedMap.insert( TQString::fromLatin1("KFontRequester"), TQT_SIGNAL(fontSelected(const TQFont &))); + changedMap.insert( TQString::fromLatin1("KFontChooser"), TQT_SIGNAL(fontSelected(const TQFont &))); + changedMap.insert( TQString::fromLatin1("KHistoryCombo"), TQT_SIGNAL(activated (int))); + + changedMap.insert( TQString::fromLatin1("KColorButton"), TQT_SIGNAL(changed(const TQColor &))); + changedMap.insert( TQString::fromLatin1("KDatePicker"), TQT_SIGNAL(dateSelected (TQDate))); + changedMap.insert( TQString::fromLatin1("KEditListBox"), TQT_SIGNAL(changed())); + changedMap.insert( TQString::fromLatin1("KListBox"), TQT_SIGNAL(selectionChanged())); + changedMap.insert( TQString::fromLatin1("KLineEdit"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert( TQString::fromLatin1("KPasswordEdit"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert( TQString::fromLatin1("KRestrictedLine"), TQT_SIGNAL(textChanged(const TQString &))); + changedMap.insert( TQString::fromLatin1("KTextBrowser"), TQT_SIGNAL(sourceChanged(const TQString &))); + changedMap.insert( TQString::fromLatin1("KTextEdit"), TQT_SIGNAL(textChanged())); + changedMap.insert( TQString::fromLatin1("KURLRequester"), TQT_SIGNAL(textChanged (const TQString& ))); + changedMap.insert( TQString::fromLatin1("KIntNumInput"), TQT_SIGNAL(valueChanged (int))); + changedMap.insert( TQString::fromLatin1("KIntSpinBox"), TQT_SIGNAL(valueChanged (int))); + changedMap.insert( TQString::fromLatin1("KDoubleNumInput"), TQT_SIGNAL(valueChanged (double))); } // Go through all of the children of the widgets and find all known widgets - QPtrListIterator it( d->widgets ); - QWidget *widget; + TQPtrListIterator it( d->widgets ); + TQWidget *widget; bool usingDefaultValues = false; while ( (widget = it.current()) != 0 ) { ++it; @@ -198,30 +198,30 @@ bool KAutoConfig::retrieveSettings(bool trackChanges){ bool KAutoConfig::saveSettings() { functionCallPreOrderCheck("saveSettings", false); - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); // Go through all of the widgets - QPtrListIterator it( d->widgets ); - QWidget *widget; + TQPtrListIterator it( d->widgets ); + TQWidget *widget; while ( (widget = it.current()) != 0 ) { ++it; config->setGroup(d->groups[widget]); // Go through the known autowidgets of this widget and save - QPtrListIterator it( d->autoWidgets[widget] ); - QWidget *groupWidget; + TQPtrListIterator it( d->autoWidgets[widget] ); + TQWidget *groupWidget; bool widgetChanged = false; while ( (groupWidget = it.current()) != 0 ){ ++it; - QVariant defaultValue = d->defaultValues[groupWidget]; - QVariant currentValue = propertyMap->property(groupWidget); + TQVariant defaultValue = d->defaultValues[groupWidget]; + TQVariant currentValue = propertyMap->property(groupWidget); #if KDE_IS_VERSION( 3, 1, 90 ) - if(!config->hasDefault(QString::fromLatin1(groupWidget->name())) && currentValue == defaultValue){ - config->revertToDefault(QString::fromLatin1(groupWidget->name())); + if(!config->hasDefault(TQString::fromLatin1(groupWidget->name())) && currentValue == defaultValue){ + config->revertToDefault(TQString::fromLatin1(groupWidget->name())); widgetChanged = true; } else{ #endif - QVariant savedValue = config->readPropertyEntry(groupWidget->name(), + TQVariant savedValue = config->readPropertyEntry(groupWidget->name(), defaultValue); if(savedValue != currentValue){ config->writeEntry(groupWidget->name(), currentValue); @@ -248,21 +248,21 @@ bool KAutoConfig::saveSettings() { bool KAutoConfig::hasChanged() const { functionCallPreOrderCheck("hasChanged", false); - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); // Go through all of the widgets - QPtrListIterator it( d->widgets ); - QWidget *widget; + TQPtrListIterator it( d->widgets ); + TQWidget *widget; while ( (widget = it.current()) != 0 ) { ++it; config->setGroup(d->groups[widget]); // Go through the known autowidgets of this widget and save - QPtrListIterator it( d->autoWidgets[widget] ); - QWidget *groupWidget; + TQPtrListIterator it( d->autoWidgets[widget] ); + TQWidget *groupWidget; while ( (groupWidget = it.current()) != 0 ){ ++it; - QVariant defaultValue = d->defaultValues[groupWidget]; - QVariant currentValue = propertyMap->property(groupWidget); - QVariant savedValue = config->readPropertyEntry(groupWidget->name(), + TQVariant defaultValue = d->defaultValues[groupWidget]; + TQVariant currentValue = propertyMap->property(groupWidget); + TQVariant savedValue = config->readPropertyEntry(groupWidget->name(), defaultValue); // Return once just one item is found to have changed. @@ -277,20 +277,20 @@ bool KAutoConfig::hasChanged() const { bool KAutoConfig::isDefault() const { functionCallPreOrderCheck("isDefault", false); - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); // Go through all of the widgets - QPtrListIterator it( d->widgets ); - QWidget *widget; + TQPtrListIterator it( d->widgets ); + TQWidget *widget; while ( (widget = it.current()) != 0 ) { ++it; config->setGroup(d->groups[widget]); // Go through the known autowidgets of this widget and save - QPtrListIterator it( d->autoWidgets[widget] ); - QWidget *groupWidget; + TQPtrListIterator it( d->autoWidgets[widget] ); + TQWidget *groupWidget; while ( (groupWidget = it.current()) != 0 ){ ++it; - QVariant defaultValue = d->defaultValues[groupWidget]; - QVariant currentValue = propertyMap->property(groupWidget); + TQVariant defaultValue = d->defaultValues[groupWidget]; + TQVariant currentValue = propertyMap->property(groupWidget); if(currentValue != defaultValue){ //qDebug("groupWidget %s, has changed: default: %s new: %s", groupWidget->name(), defaultValue.toString().latin1(), currentValue.toString().latin1()); return false; @@ -303,20 +303,20 @@ bool KAutoConfig::isDefault() const { void KAutoConfig::resetSettings() const { functionCallPreOrderCheck("resetSettings",); - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); // Go through all of the widgets - QPtrListIterator it( d->widgets ); - QWidget *widget; + TQPtrListIterator it( d->widgets ); + TQWidget *widget; while ( (widget = it.current()) != 0 ) { ++it; config->setGroup(d->groups[widget]); // Go through the known autowidgets of this widget and save - QPtrListIterator it( d->autoWidgets[widget] ); - QWidget *groupWidget; + TQPtrListIterator it( d->autoWidgets[widget] ); + TQWidget *groupWidget; while ( (groupWidget = it.current()) != 0 ){ ++it; - QVariant defaultValue = d->defaultValues[groupWidget]; + TQVariant defaultValue = d->defaultValues[groupWidget]; if(defaultValue != propertyMap->property(groupWidget)){ propertyMap->setProperty(groupWidget, defaultValue); d->changed = true; @@ -328,21 +328,21 @@ void KAutoConfig::resetSettings() const { void KAutoConfig::reloadSettings() const { functionCallPreOrderCheck("reloadSettings", ); - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); // Go through all of the widgets - QPtrListIterator it( d->widgets ); - QWidget *pageWidget; + TQPtrListIterator it( d->widgets ); + TQWidget *pageWidget; while ( (pageWidget = it.current()) != 0 ) { ++it; config->setGroup(d->groups[pageWidget]); // Go through the known widgets of this page and reload - QPtrListIterator it( d->autoWidgets[pageWidget] ); - QWidget *widget; + TQPtrListIterator it( d->autoWidgets[pageWidget] ); + TQWidget *widget; while ( (widget = it.current()) != 0 ){ ++it; - QVariant defaultSetting = d->defaultValues[widget]; - QVariant setting = + TQVariant defaultSetting = d->defaultValues[widget]; + TQVariant setting = config->readPropertyEntry(widget->name(), defaultSetting); propertyMap->setProperty(widget, setting); } @@ -350,23 +350,23 @@ void KAutoConfig::reloadSettings() const { d->changed = false; } -bool KAutoConfig::parseChildren(const QWidget *widget, - QPtrList& currentGroup, bool trackChanges){ +bool KAutoConfig::parseChildren(const TQWidget *widget, + TQPtrList& currentGroup, bool trackChanges){ bool valueChanged = false; - const QPtrList *listOfChildren = widget->children(); + const TQPtrList *listOfChildren = widget->children(); if(!listOfChildren) return valueChanged; - QSqlPropertyMap *propertyMap = QSqlPropertyMap::defaultMap(); - QPtrListIterator it( *listOfChildren ); - QObject *object; + TQSqlPropertyMap *propertyMap = TQSqlPropertyMap::defaultMap(); + TQPtrListIterator it( *listOfChildren ); + TQObject *object; while ( (object = it.current()) != 0 ) { ++it; if(!object->isWidgetType()){ continue; } - QWidget *childWidget = (QWidget *)object; + TQWidget *childWidget = (TQWidget *)object; if(d->ignore.containsRef(childWidget)){ continue; } @@ -385,12 +385,12 @@ bool KAutoConfig::parseChildren(const QWidget *widget, if( d->ignoreTheseWidgets[childWidget->className()] == 0 && childWidget->name(0) != NULL ) { - QVariant defaultSetting = propertyMap->property(childWidget); + TQVariant defaultSetting = propertyMap->property(childWidget); if(defaultSetting.isValid()) { parseTheChildren = false; // Disable the widget if it is immutable? - if(config->entryIsImmutable( QString::fromLatin1(childWidget->name()))) + if(config->entryIsImmutable( TQString::fromLatin1(childWidget->name()))) childWidget->setEnabled(false); else { @@ -401,22 +401,22 @@ bool KAutoConfig::parseChildren(const QWidget *widget, d->defaultValues.insert(childWidget, defaultSetting); } // Get/Set settings and connect up the changed signal - QVariant setting = + TQVariant setting = config->readPropertyEntry(childWidget->name(), defaultSetting); if(setting != defaultSetting) { propertyMap->setProperty(childWidget, setting); valueChanged = true; } - if(trackChanges && changedMap.find(QString::fromLatin1(childWidget->className())) != + if(trackChanges && changedMap.find(TQString::fromLatin1(childWidget->className())) != changedMap.end()) { - connect(childWidget, changedMap[QString::fromLatin1(childWidget->className())], - this, SIGNAL(widgetModified())); + connect(childWidget, changedMap[TQString::fromLatin1(childWidget->className())], + this, TQT_SIGNAL(widgetModified())); } #ifndef NDEBUG else if(trackChanges && - changedMap.find(QString::fromLatin1(childWidget->className())) == changedMap.end()) + changedMap.find(TQString::fromLatin1(childWidget->className())) == changedMap.end()) { // Without a signal kautoconfigdialog could incorectly // enable/disable the buttons diff --git a/kopete/libkopete/kautoconfig.h b/kopete/libkopete/kautoconfig.h index a4cd243b..f3122fee 100644 --- a/kopete/libkopete/kautoconfig.h +++ b/kopete/libkopete/kautoconfig.h @@ -20,8 +20,8 @@ #ifndef KAUTOCONFIG_H #define KAUTOCONFIG_H -#include -#include +#include +#include #include "kopete_export.h" @@ -53,11 +53,11 @@ class QWidget; * If one of the widgets needs special treatment it can be specified to be * ignored using the ignoreSubWidget() function. * - * KAutoConfig uses the QSqlPropertyMap class to determine if it can do + * KAutoConfig uses the TQSqlPropertyMap class to determine if it can do * anything to a widget. Note that KAutoConfig doesn't require a database, * it simply uses the functionality that is built into the QSqlPropertyMap * class. New widgets can be added to the map using - * QSqlPropertyMap::installDefaultMap(). Note that you can't just add any + * TQSqlPropertyMap::installDefaultMap(). Note that you can't just add any * class. The class must have a matching Q_PROPERTY(...) macro defined. * * For example (note that KColorButton is already added and it doesn't need to @@ -65,18 +65,18 @@ class QWidget; * * kcolorbutton.h defines the following property: * \code - * Q_PROPERTY( QColor color READ color WRITE setColor ) + * Q_PROPERTY( TQColor color READ color WRITE setColor ) * \endcode * * To add KColorButton the following code would be inserted in the main. * * \code - * QSqlPropertyMap *map = QSqlPropertyMap::defaultMap(); + * TQSqlPropertyMap *map = TQSqlPropertyMap::defaultMap(); * map.insert("KColorButton", "color"); - * QSqlPropertyMap::installDefaultMap(map); + * TQSqlPropertyMap::installDefaultMap(map); * \endcode * - * If you add a new widget to the QSqlPropertyMap and wish to be notified when + * If you add a new widget to the TQSqlPropertyMap and wish to be notified when * it is modified you should add its signal using addWidgetChangedSignal(). * If the Apply and Default buttons and enabled/disabled by KAutoConfigDialog * automatically then this must be done. @@ -85,7 +85,7 @@ class QWidget; * @since 3.2 * @author Benjamin C Meyer */ -class KOPETE_EXPORT KAutoConfig : public QObject { +class KOPETE_EXPORT KAutoConfig : public TQObject { Q_OBJECT @@ -103,7 +103,7 @@ signals: * contains the one or more modified setting. * @see settingsChanged() */ - void settingsChanged( QWidget *widget ); + void settingsChanged( TQWidget *widget ); /** * If retrieveSettings() was told to track changes then if @@ -123,7 +123,7 @@ public: * @param parent - Parent object. * @param name - Object name. */ - KAutoConfig( KConfig *kconfig, QObject *parent=0, const char *name=0 ); + KAutoConfig( KConfig *kconfig, TQObject *parent=0, const char *name=0 ); /** * Constructor. @@ -132,7 +132,7 @@ public: * @param parent - Parent object. * @param name - Object name. */ - KAutoConfig( QObject *parent=0, const char *name=0 ); + KAutoConfig( TQObject *parent=0, const char *name=0 ); /** * Destructor. Deletes private class. @@ -150,7 +150,7 @@ public: * group it should be added separately and also ignored. * @see ignoreSubWidget() */ - void addWidget( QWidget *widget, const QString &group ); + void addWidget( TQWidget *widget, const TQString &group ); /** * Ignore the specified child widget when performing an action. Doesn't @@ -159,7 +159,7 @@ public: * @param widget - Pointer to the widget that should be ignored. * Note: Widgets that don't have a name are ignored automatically. **/ - void ignoreSubWidget( QWidget *widget ); + void ignoreSubWidget( TQWidget *widget ); /** * Traverse the specified widgets to see if anything is different then the @@ -185,17 +185,17 @@ public: * * Example: * \code - * addWidgetChangedSignal( "QCheckbox", SIGNAL(stateChanged(int)) ); + * addWidgetChangedSignal( "QCheckbox", TQT_SIGNAL(stateChanged(int)) ); * \endcode * * This is generally used in conjunction with the addition of a class - * to QSqlPropertyMap so KAutoConfig can get/set its values. + * to TQSqlPropertyMap so KAutoConfig can get/set its values. * * @param widgetName - The class name of the widget (className()). - * @param signal - The signal (with "SIGNAL()" wrapper) that should be called. + * @param signal - The signal (with "TQT_SIGNAL()" wrapper) that should be called. */ - inline void addWidgetChangedSignal( const QString &widgetName, - const QCString &signal ){ + inline void addWidgetChangedSignal( const TQString &widgetName, + const TQCString &signal ){ changedMap.insert( widgetName, signal ); } @@ -248,7 +248,7 @@ protected: /** * Map of the classes and the signals that they emit when changed. */ - QMap changedMap; + TQMap changedMap; /** * Recursive function that finds all known children. @@ -262,8 +262,8 @@ protected: * @return bool - If a widget was set to something other then its default. * @see retrieveSettings() */ - bool parseChildren( const QWidget *widget, - QPtrList¤tGroup, bool trackChanges ); + bool parseChildren( const TQWidget *widget, + TQPtrList¤tGroup, bool trackChanges ); private: class KAutoConfigPrivate; diff --git a/kopete/libkopete/kcautoconfigmodule.cpp b/kopete/libkopete/kcautoconfigmodule.cpp index 9ef34be1..122a3e7b 100644 --- a/kopete/libkopete/kcautoconfigmodule.cpp +++ b/kopete/libkopete/kcautoconfigmodule.cpp @@ -19,7 +19,7 @@ #include "kcautoconfigmodule.h" -#include +#include #include @@ -30,41 +30,41 @@ class KCAutoConfigModule::KCAutoConfigModulePrivate }; -KCAutoConfigModule::KCAutoConfigModule( QWidget * parent, const char * name, const QStringList & args ) +KCAutoConfigModule::KCAutoConfigModule( TQWidget * parent, const char * name, const TQStringList & args ) : KCModule( parent, name, args ) , d( new KCAutoConfigModulePrivate ) { d->kautoconfig = new KAutoConfig( this ); - connect(d->kautoconfig, SIGNAL(widgetModified()), SLOT(slotWidgetModified())); - connect(d->kautoconfig, SIGNAL(settingsChanged()), SLOT(widgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(widgetModified()), TQT_SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(settingsChanged()), TQT_SLOT(widgetModified())); } -KCAutoConfigModule::KCAutoConfigModule( KInstance * instance, QWidget * parent, const QStringList & args ) +KCAutoConfigModule::KCAutoConfigModule( KInstance * instance, TQWidget * parent, const TQStringList & args ) : KCModule( instance, parent, args ) , d( new KCAutoConfigModulePrivate ) { d->kautoconfig = new KAutoConfig( this ); - connect(d->kautoconfig, SIGNAL(widgetModified()), SLOT(slotWidgetModified())); - connect(d->kautoconfig, SIGNAL(settingsChanged()), SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(widgetModified()), TQT_SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(settingsChanged()), TQT_SLOT(slotWidgetModified())); } -KCAutoConfigModule::KCAutoConfigModule( KConfig *config,QWidget * parent, const char * name, const QStringList & args ) +KCAutoConfigModule::KCAutoConfigModule( KConfig *config,TQWidget * parent, const char * name, const TQStringList & args ) : KCModule( parent, name, args ) , d( new KCAutoConfigModulePrivate ) { d->kautoconfig = new KAutoConfig( config, this ); - connect(d->kautoconfig, SIGNAL(widgetModified()), SLOT(slotWidgetModified())); - connect(d->kautoconfig, SIGNAL(settingsChanged()), SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(widgetModified()), TQT_SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(settingsChanged()), TQT_SLOT(slotWidgetModified())); } -KCAutoConfigModule::KCAutoConfigModule( KConfig *config , KInstance * instance, QWidget * parent, const QStringList & args ) +KCAutoConfigModule::KCAutoConfigModule( KConfig *config , KInstance * instance, TQWidget * parent, const TQStringList & args ) : KCModule( instance, parent, args ) , d( new KCAutoConfigModulePrivate ) { d->kautoconfig = new KAutoConfig( config, this ); - connect(d->kautoconfig, SIGNAL(widgetModified()), SLOT(slotWidgetModified())); - connect(d->kautoconfig, SIGNAL(settingsChanged()), SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(widgetModified()), TQT_SLOT(slotWidgetModified())); + connect(d->kautoconfig, TQT_SIGNAL(settingsChanged()), TQT_SLOT(slotWidgetModified())); } @@ -99,9 +99,9 @@ KAutoConfig *KCAutoConfigModule::autoConfig() return d->kautoconfig; } -void KCAutoConfigModule::setMainWidget(QWidget *widget, const QString& group ) +void KCAutoConfigModule::setMainWidget(TQWidget *widget, const TQString& group ) { - QBoxLayout * l = new QVBoxLayout( this ); + TQBoxLayout * l = new TQVBoxLayout( this ); l->addWidget( widget ); d->kautoconfig->addWidget(widget,group); diff --git a/kopete/libkopete/kcautoconfigmodule.h b/kopete/libkopete/kcautoconfigmodule.h index 6076b211..fcca6047 100644 --- a/kopete/libkopete/kcautoconfigmodule.h +++ b/kopete/libkopete/kcautoconfigmodule.h @@ -36,10 +36,10 @@ class KConfig; * config page with QDesigner, and add it to the module * This can be done using the setMainWidget() method: * \code - * typedef KGenericFactory MyPageConfigFactory; + * typedef KGenericFactory MyPageConfigFactory; * K_EXPORT_COMPONENT_FACTORY( kcm_mypageconfig, MyPageConfigFactory( "kcm_mypageconfig" ) ) * - * MyPageConfig( QWidget * parent, const char *, const QStringList & args ) + * MyPageConfig( TQWidget * parent, const char *, const TQStringList & args ) * : KCAutoConfigModule( MyPageConfigFactory::instance(), parent, args ) * { * setMainWidget( new MyPageConfigBase(this) , "MyGroup" ); @@ -57,12 +57,12 @@ class KOPETE_EXPORT KCAutoConfigModule : public KCModule /** * Standard KCModule constructor. Use KGlobal::config() */ - KCAutoConfigModule( QWidget * parent = 0, const char * name = 0, const QStringList & args = QStringList() ); + KCAutoConfigModule( TQWidget * parent = 0, const char * name = 0, const TQStringList & args = TQStringList() ); /** * Standard KCModule constructor. Use KGlobal::config() */ - KCAutoConfigModule( KInstance * instance, QWidget * parent = 0, const QStringList & args = QStringList() ); + KCAutoConfigModule( KInstance * instance, TQWidget * parent = 0, const TQStringList & args = TQStringList() ); /** * Constructor. @@ -73,7 +73,7 @@ class KOPETE_EXPORT KCAutoConfigModule : public KCModule * * @todo document what the args mean (inherited from KCModule?) */ - KCAutoConfigModule(KConfig* config, KInstance * instance, QWidget * parent = 0, const QStringList & args = QStringList() ); + KCAutoConfigModule(KConfig* config, KInstance * instance, TQWidget * parent = 0, const TQStringList & args = TQStringList() ); /** * Constructor, much like the one above, except with @@ -83,7 +83,7 @@ class KOPETE_EXPORT KCAutoConfigModule : public KCModule * @param name name of the object * @param args special arguments for this KCM */ - KCAutoConfigModule(KConfig* config, QWidget * parent = 0, const char * name=0 , const QStringList & args = QStringList() ); + KCAutoConfigModule(KConfig* config, TQWidget * parent = 0, const char * name=0 , const TQStringList & args = TQStringList() ); ~KCAutoConfigModule(); @@ -97,7 +97,7 @@ class KOPETE_EXPORT KCAutoConfigModule : public KCModule * @param widget the widget to place on the page and to add in the KAutoConfig * @param group the name of the group where settings are stored in the config file */ - void setMainWidget(QWidget *widget, const QString& group); + void setMainWidget(TQWidget *widget, const TQString& group); /** * @brief a reference to the KAutoConfig diff --git a/kopete/libkopete/knotification.cpp b/kopete/libkopete/knotification.cpp index 737fe102..4b41b48b 100644 --- a/kopete/libkopete/knotification.cpp +++ b/kopete/libkopete/knotification.cpp @@ -33,20 +33,20 @@ #include -#include +#include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include //TODO, make the KNotification aware of the systemtray. #include "kopeteuiglobal.h" -static WId checkWinId( const QString &/*appName*/, WId senderWinId ) +static WId checkWinId( const TQString &/*appName*/, WId senderWinId ) { if(senderWinId==0) senderWinId=Kopete::UI::Global::sysTrayWId(); @@ -57,14 +57,14 @@ static WId checkWinId( const QString &/*appName*/, WId senderWinId ) struct KNotification::Private { - QWidget *widget; - QString text; - QStringList actions; + TQWidget *widget; + TQString text; + TQStringList actions; int level; }; -KNotification::KNotification(QObject *parent) : - QObject(parent) , d(new Private) +KNotification::KNotification(TQObject *parent) : + TQObject(parent) , d(new Private) { m_linkClicked = false; } @@ -75,20 +75,20 @@ KNotification::~KNotification() } -void KNotification::notifyByExecute(const QString &command, const QString& event, - const QString& fromApp, const QString& text, +void KNotification::notifyByExecute(const TQString &command, const TQString& event, + const TQString& fromApp, const TQString& text, int winId, int eventId) { if (!command.isEmpty()) { // kdDebug() << "executing command '" << command << "'" << endl; - QMap subst; + TQMap subst; subst.insert( 'e', event ); subst.insert( 'a', fromApp ); subst.insert( 's', text ); - subst.insert( 'w', QString::number( winId )); - subst.insert( 'i', QString::number( eventId )); - QString execLine = KMacroExpander::expandMacrosShellQuote( command, subst ); + subst.insert( 'w', TQString::number( winId )); + subst.insert( 'i', TQString::number( eventId )); + TQString execLine = KMacroExpander::expandMacrosShellQuote( command, subst ); if ( execLine.isEmpty() ) execLine = command; // fallback @@ -108,7 +108,7 @@ void KNotification::notifyByMessagebox() if ( d->text.isEmpty() ) return; - QString action=d->actions[0]; + TQString action=d->actions[0]; WId winId=d->widget ? d->widget->topLevelWidget()->winId() : 0; if( action.isEmpty()) @@ -134,21 +134,21 @@ void KNotification::notifyByMessagebox() else { //we may show the specific action button int result=0; - QGuardedPtr _this=this; //this can be deleted + TQGuardedPtr _this=this; //this can be deleted switch( d->level ) { default: case KNotifyClient::Notification: - result = KMessageBox::questionYesNo(d->widget, d->text, i18n( "Notification" ), action, KStdGuiItem::cancel(), QString::null, false ); + result = KMessageBox::questionYesNo(d->widget, d->text, i18n( "Notification" ), action, KStdGuiItem::cancel(), TQString::null, false ); break; case KNotifyClient::Warning: - result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Warning" ), action, KStdGuiItem::cancel(), QString::null, false ); + result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Warning" ), action, KStdGuiItem::cancel(), TQString::null, false ); break; case KNotifyClient::Error: - result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Error" ), action, KStdGuiItem::cancel(), QString::null, false ); + result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Error" ), action, KStdGuiItem::cancel(), TQString::null, false ); break; case KNotifyClient::Catastrophe: - result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Fatal" ), action, KStdGuiItem::cancel(), QString::null, false ); + result = KMessageBox::warningYesNo( d->widget, d->text, i18n( "Fatal" ), action, KStdGuiItem::cancel(), TQString::null, false ); break; } if(result==KMessageBox::Yes && _this) @@ -160,30 +160,30 @@ void KNotification::notifyByMessagebox() -void KNotification::notifyByPassivePopup(const QPixmap &pix ) +void KNotification::notifyByPassivePopup(const TQPixmap &pix ) { - QString appName = QString::fromAscii( KNotifyClient::instance()->instanceName() ); + TQString appName = TQString::fromAscii( KNotifyClient::instance()->instanceName() ); KIconLoader iconLoader( appName ); - KConfig eventsFile( QString::fromAscii( KNotifyClient::instance()->instanceName()+"/eventsrc" ), true, false, "data"); + KConfig eventsFile( TQString::fromAscii( KNotifyClient::instance()->instanceName()+"/eventsrc" ), true, false, "data"); KConfigGroup config( &eventsFile, "!Global!" ); - QString iconName = config.readEntry( "IconName", appName ); - QPixmap icon = iconLoader.loadIcon( iconName, KIcon::Small ); - QString title = config.readEntry( "Comment", appName ); + TQString iconName = config.readEntry( "IconName", appName ); + TQPixmap icon = iconLoader.loadIcon( iconName, KIcon::Small ); + TQString title = config.readEntry( "Comment", appName ); //KPassivePopup::message(title, text, icon, senderWinId); WId winId=d->widget ? d->widget->topLevelWidget()->winId() : 0; KPassivePopup *pop = new KPassivePopup( checkWinId(appName, winId) ); - QObject::connect(this, SIGNAL(closed()), pop, SLOT(deleteLater())); + TQObject::connect(this, TQT_SIGNAL(closed()), pop, TQT_SLOT(deleteLater())); - QVBox *vb = pop->standardView( title, pix.isNull() ? d->text: QString::null , icon ); - QVBox *vb2=vb; + TQVBox *vb = pop->standardView( title, pix.isNull() ? d->text: TQString::null , icon ); + TQVBox *vb2=vb; if(!pix.isNull()) { - QHBox *hb = new QHBox(vb); + TQHBox *hb = new TQHBox(vb); hb->setSpacing(KDialog::spacingHint()); - QLabel *pil=new QLabel(hb); + TQLabel *pil=new TQLabel(hb); pil->setPixmap(pix); pil->setScaledContents(true); if(pix.height() > 80 && pix.height() > pix.width() ) @@ -196,27 +196,27 @@ void KNotification::notifyByPassivePopup(const QPixmap &pix ) pil->setMaximumWidth(80); pil->setMaximumHeight(80*pix.height()/pix.width()); } - vb=new QVBox(hb); - QLabel *msg = new QLabel( d->text, vb, "msg_label" ); + vb=new TQVBox(hb); + TQLabel *msg = new TQLabel( d->text, vb, "msg_label" ); msg->setAlignment( AlignLeft ); } if ( !d->actions.isEmpty() ) { - QString linkCode=QString::fromLatin1("

    "); + TQString linkCode=TQString::fromLatin1("

    "); int i=0; - for ( QStringList::ConstIterator it = d->actions.begin() ; it != d->actions.end(); ++it ) + for ( TQStringList::ConstIterator it = d->actions.begin() ; it != d->actions.end(); ++it ) { i++; - linkCode+=QString::fromLatin1(" %2 ").arg( QString::number(i) , QStyleSheet::escape(*it) ); + linkCode+=TQString::fromLatin1(" %2 ").arg( TQString::number(i) , TQStyleSheet::escape(*it) ); } - linkCode+=QString::fromLatin1("

    "); + linkCode+=TQString::fromLatin1("

    "); KActiveLabel *link = new KActiveLabel(linkCode , vb ); //link->setAlignment( AlignRight ); - QObject::disconnect(link, SIGNAL(linkClicked(const QString &)), link, SLOT(openLink(const QString &))); - QObject::connect(link, SIGNAL(linkClicked(const QString &)), this, SLOT(slotPopupLinkClicked(const QString &))); - QObject::connect(link, SIGNAL(linkClicked(const QString &)), pop, SLOT(hide())); + TQObject::disconnect(link, TQT_SIGNAL(linkClicked(const TQString &)), link, TQT_SLOT(openLink(const TQString &))); + TQObject::connect(link, TQT_SIGNAL(linkClicked(const TQString &)), this, TQT_SLOT(slotPopupLinkClicked(const TQString &))); + TQObject::connect(link, TQT_SIGNAL(linkClicked(const TQString &)), pop, TQT_SLOT(hide())); } pop->setAutoDelete( true ); @@ -227,7 +227,7 @@ void KNotification::notifyByPassivePopup(const QPixmap &pix ) } -void KNotification::slotPopupLinkClicked(const QString &adr) +void KNotification::slotPopupLinkClicked(const TQString &adr) { m_linkClicked = true; unsigned int action=adr.toUInt(); @@ -236,7 +236,7 @@ void KNotification::slotPopupLinkClicked(const QString &adr) activate(action); - // since we've hidden the message (KNotification::notifyByPassivePopup(const QPixmap &pix )) + // since we've hidden the message (KNotification::notifyByPassivePopup(const TQPixmap &pix )) // we must now schedule overselves for deletion close(); } @@ -274,7 +274,7 @@ void KNotification::raiseWidget() } -void KNotification::raiseWidget(QWidget *w) +void KNotification::raiseWidget(TQWidget *w) { //TODO this funciton is far from finished. if(w->isTopLevel()) @@ -284,10 +284,10 @@ void KNotification::raiseWidget(QWidget *w) } else { - QWidget *pw=w->parentWidget(); + TQWidget *pw=w->parentWidget(); raiseWidget(pw); - if( QTabWidget *tab_widget=dynamic_cast(pw)) + if( TQTabWidget *tab_widget=dynamic_cast(pw)) { tab_widget->showPage(w); } @@ -298,9 +298,9 @@ void KNotification::raiseWidget(QWidget *w) -KNotification *KNotification::event( const QString& message , const QString& text, - const QPixmap& pixmap, QWidget *widget, - const QStringList &actions, unsigned int flags) +KNotification *KNotification::event( const TQString& message , const TQString& text, + const TQPixmap& pixmap, TQWidget *widget, + const TQStringList &actions, unsigned int flags) { /* NOTE: this function still use the KNotifyClient, * in the future (KDE4) all the function of the knotifyclient will be moved there. @@ -308,15 +308,15 @@ KNotification *KNotification::event( const QString& message , const QString& tex */ int level=KNotifyClient::Default; - QString sound; - QString file; - QString commandline; + TQString sound; + TQString file; + TQString commandline; // get config file - KConfig eventsFile( QString::fromAscii( KNotifyClient::instance()->instanceName()+"/eventsrc" ), true, false, "data"); + KConfig eventsFile( TQString::fromAscii( KNotifyClient::instance()->instanceName()+"/eventsrc" ), true, false, "data"); eventsFile.setGroup(message); - KConfig configFile( QString::fromAscii( KNotifyClient::instance()->instanceName()+".eventsrc" ), true, false); + KConfig configFile( TQString::fromAscii( KNotifyClient::instance()->instanceName()+".eventsrc" ), true, false); configFile.setGroup(message); int present=KNotifyClient::getPresentation(message); @@ -327,7 +327,7 @@ KNotification *KNotification::event( const QString& message , const QString& tex // get sound file name if( present & KNotifyClient::Sound ) { - QString theSound = configFile.readPathEntry( "soundfile" ); + TQString theSound = configFile.readPathEntry( "soundfile" ); if ( theSound.isEmpty() ) theSound = eventsFile.readPathEntry( "default_sound" ); if ( !theSound.isEmpty() ) @@ -336,7 +336,7 @@ KNotification *KNotification::event( const QString& message , const QString& tex // get log file name if( present & KNotifyClient::Logfile ) { - QString theFile = configFile.readPathEntry( "logfile" ); + TQString theFile = configFile.readPathEntry( "logfile" ); if ( theFile.isEmpty() ) theFile = eventsFile.readPathEntry( "default_logfile" ); if ( !theFile.isEmpty() ) @@ -357,9 +357,9 @@ KNotification *KNotification::event( const QString& message , const QString& tex return userEvent( text, pixmap, widget, actions, present , level, sound, file, commandline, flags ); } -KNotification *KNotification::userEvent( const QString& text, const QPixmap& pixmap, QWidget *widget, - QStringList actions,int present, int level, const QString &sound, const QString &file, - const QString &commandline, unsigned int flags) +KNotification *KNotification::userEvent( const TQString& text, const TQPixmap& pixmap, TQWidget *widget, + TQStringList actions,int present, int level, const TQString &sound, const TQString &file, + const TQString &commandline, unsigned int flags) { /* NOTE: this function still use the KNotifyClient, @@ -391,17 +391,17 @@ KNotification *KNotification::userEvent( const QString& text, const QPixmap& pix } if ( present & KNotifyClient::Messagebox ) { - QTimer::singleShot(0,notify,SLOT(notifyByMessagebox())); + TQTimer::singleShot(0,notify,TQT_SLOT(notifyByMessagebox())); } else //not a message box (because closing the event when a message box is there is suicide) if(flags & CloseOnTimeout) { - QTimer::singleShot(6*1000, notify, SLOT(close())); + TQTimer::singleShot(6*1000, notify, TQT_SLOT(close())); } if ( present & KNotifyClient::Execute ) { - QString appname = QString::fromAscii( KNotifyClient::instance()->instanceName() ); - notify->notifyByExecute(commandline, QString::null,appname,text, winId, 0 ); + TQString appname = TQString::fromAscii( KNotifyClient::instance()->instanceName() ); + notify->notifyByExecute(commandline, TQString::null,appname,text, winId, 0 ); } return notify; @@ -422,10 +422,10 @@ KNotification *KNotification::userEvent( const QString& text, const QPixmap& pix #include "kopetenotifyevent.h" #include "kopetemetacontact.h" #include "kopeteuiglobal.h" -#include +#include -static KNotification *performCustomNotifications( QWidget *widget, Kopete::MetaContact * mc, const QString &message, bool& suppress) +static KNotification *performCustomNotifications( TQWidget *widget, Kopete::MetaContact * mc, const TQString &message, bool& suppress) { KNotification *n=0L; //kdDebug( 14010 ) << k_funcinfo << endl; @@ -445,8 +445,8 @@ static KNotification *performCustomNotifications( QWidget *widget, Kopete::MetaC bool checkingMetaContact = true; Kopete::NotifyDataObject * dataObj = mc; do { - QString sound; - QString text; + TQString sound; + TQString text; if ( dataObj ) { @@ -479,7 +479,7 @@ static KNotification *performCustomNotifications( QWidget *widget, Kopete::MetaC evt->firePresentation( Kopete::EventPresentation::Chat ); } // fire the event - n=KNotification::userEvent( text, mc->photo(), widget, QStringList() , present, 0, sound, QString::null, QString::null , KNotification::CloseOnTimeout); + n=KNotification::userEvent( text, mc->photo(), widget, TQStringList() , present, 0, sound, TQString::null, TQString::null , KNotification::CloseOnTimeout); } } @@ -502,9 +502,9 @@ static KNotification *performCustomNotifications( QWidget *widget, Kopete::MetaC -KNotification *KNotification::event( Kopete::MetaContact *mc, const QString& message , - const QString& text, const QPixmap& pixmap, QWidget *widget, - const QStringList &actions, unsigned int flags) +KNotification *KNotification::event( Kopete::MetaContact *mc, const TQString& message , + const TQString& text, const TQPixmap& pixmap, TQWidget *widget, + const TQStringList &actions, unsigned int flags) { if (message.isEmpty()) return 0; diff --git a/kopete/libkopete/knotification.h b/kopete/libkopete/knotification.h index 83752f2f..a99f70d2 100644 --- a/kopete/libkopete/knotification.h +++ b/kopete/libkopete/knotification.h @@ -21,9 +21,9 @@ #define KNOTIFICATION_H -#include -#include -#include +#include +#include +#include #include "kopete_export.h" class QWidget; @@ -91,7 +91,7 @@ public: * When the notification is activated, the widget might be raised. * Depending of the configuration, the taskbar entry of the window containing the widget may blink. */ - QWidget *widget(); + TQWidget *widget(); signals: /** @@ -139,21 +139,21 @@ public slots: private: struct Private; Private *d; - KNotification(QObject *parent=0L); + KNotification(TQObject *parent=0L); /** * recursive function that raise the widget. @p w * * @see raiseWidget() */ - static void raiseWidget(QWidget *w); + static void raiseWidget(TQWidget *w); bool m_linkClicked; private slots: void notifyByMessagebox(); - void notifyByPassivePopup(const QPixmap &pix); - void notifyByExecute(const QString &command, const QString& event,const QString& fromApp, const QString& text, int winId, int eventId); - void slotPopupLinkClicked(const QString &); + void notifyByPassivePopup(const TQPixmap &pix); + void notifyByExecute(const TQString &command, const TQString& event,const TQString& fromApp, const TQString& text, int winId, int eventId); + void slotPopupLinkClicked(const TQString &); public: @@ -168,7 +168,7 @@ public: * Make sure you use one of the CloseOnTimeOut or CloseWhenWidgetActivated, if not, * you have to close yourself the notification. * - * @note the text is shown in a QLabel, you should make sure to escape the html is needed. + * @note the text is shown in a TQLabel, you should make sure to escape the html is needed. * * @param eventId is the name of the event * @param text is the text of the notification to show in the popup. @@ -177,9 +177,9 @@ public: * @param actions is a list of action texts. * @param flags is a bitmask of NotificationsFlags */ - static KNotification *event( const QString& eventId , const QString& text=QString::null, - const QPixmap& pixmap=QPixmap(), QWidget *widget=0L, - const QStringList &actions=QStringList(), unsigned int flags=CloseOnTimeout); + static KNotification *event( const TQString& eventId , const TQString& text=TQString::null, + const TQPixmap& pixmap=TQPixmap(), TQWidget *widget=0L, + const TQStringList &actions=TQStringList(), unsigned int flags=CloseOnTimeout); /** @@ -196,19 +196,19 @@ public: * @param commandLine the command line to run if selected with @p parent * @param flags Indicates the way in which the notification should be handled */ - static KNotification *userEvent( const QString& text, const QPixmap& pixmap, - QWidget *widget, QStringList actions,int present, int level, - const QString &sound, const QString &file, - const QString &commandLine, unsigned int flags); + static KNotification *userEvent( const TQString& text, const TQPixmap& pixmap, + TQWidget *widget, TQStringList actions,int present, int level, + const TQString &sound, const TQString &file, + const TQString &commandLine, unsigned int flags); /** * @todo find a proper way to do context-dependent notifications */ - static KNotification *event( Kopete::MetaContact *mc, const QString& eventId , const QString& text=QString::null, - const QPixmap& pixmap=QPixmap(), QWidget *widget=0L, - const QStringList &actions=QStringList(),unsigned int flags=CloseOnTimeout); + static KNotification *event( Kopete::MetaContact *mc, const TQString& eventId , const TQString& text=TQString::null, + const TQPixmap& pixmap=TQPixmap(), TQWidget *widget=0L, + const TQStringList &actions=TQStringList(),unsigned int flags=CloseOnTimeout); }; diff --git a/kopete/libkopete/kopeteaccount.cpp b/kopete/libkopete/kopeteaccount.cpp index 52bb26bc..acce1da1 100644 --- a/kopete/libkopete/kopeteaccount.cpp +++ b/kopete/libkopete/kopeteaccount.cpp @@ -16,8 +16,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include #include @@ -54,7 +54,7 @@ namespace Kopete class Account::Private { public: - Private( Protocol *protocol, const QString &accountId ) + Private( Protocol *protocol, const TQString &accountId ) : protocol( protocol ), id( accountId ) , excludeconnect( true ), priority( 0 ), myself( 0 ) , suppressStatusTimer( 0 ), suppressStatusNotification( false ) @@ -66,38 +66,38 @@ public: ~Private() { delete blackList; } Protocol *protocol; - QString id; - QString accountLabel; + TQString id; + TQString accountLabel; bool excludeconnect; uint priority; - QDict contacts; - QColor color; + TQDict contacts; + TQColor color; Contact *myself; - QTimer suppressStatusTimer; + TQTimer suppressStatusTimer; bool suppressStatusNotification; Kopete::BlackLister *blackList; KConfigGroup *configGroup; uint connectionTry; - QString customIcon; + TQString customIcon; Kopete::OnlineStatus restoreStatus; - QString restoreMessage; + TQString restoreMessage; }; -Account::Account( Protocol *parent, const QString &accountId, const char *name ) - : QObject( parent, name ), d( new Private( parent, accountId ) ) +Account::Account( Protocol *parent, const TQString &accountId, const char *name ) + : TQObject( parent, name ), d( new Private( parent, accountId ) ) { - d->configGroup=new KConfigGroup(KGlobal::config(), QString::fromLatin1( "Account_%1_%2" ).arg( d->protocol->pluginId(), d->id )); + d->configGroup=new KConfigGroup(KGlobal::config(), TQString::fromLatin1( "Account_%1_%2" ).arg( d->protocol->pluginId(), d->id )); d->excludeconnect = d->configGroup->readBoolEntry( "ExcludeConnect", false ); d->color = d->configGroup->readColorEntry( "Color", &d->color ); - d->customIcon = d->configGroup->readEntry( "Icon", QString() ); + d->customIcon = d->configGroup->readEntry( "Icon", TQString() ); d->priority = d->configGroup->readNumEntry( "Priority", 0 ); d->restoreStatus = Kopete::OnlineStatus::Online; d->restoreMessage = ""; - QObject::connect( &d->suppressStatusTimer, SIGNAL( timeout() ), - this, SLOT( slotStopSuppression() ) ); + TQObject::connect( &d->suppressStatusTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( slotStopSuppression() ) ); } Account::~Account() @@ -106,7 +106,7 @@ Account::~Account() // Delete all registered child contacts first while ( !d->contacts.isEmpty() ) - delete *QDictIterator( d->contacts ); + delete *TQDictIterator( d->contacts ); kdDebug( 14010 ) << k_funcinfo << " account '" << d->id << "' about to emit accountDestroyed " << endl; emit accountDestroyed(this); @@ -128,14 +128,14 @@ void Account::disconnected( DisconnectReason reason ) //reconnect if needed if(reason == BadPassword ) { - QTimer::singleShot(0, this, SLOT(reconnect())); + TQTimer::singleShot(0, this, TQT_SLOT(reconnect())); } else if ( KopetePrefs::prefs()->reconnectOnDisconnect() == true && reason > Manual ) { d->connectionTry++; //use a timer to allow the plugins to clean up after return if(d->connectionTry < 3) - QTimer::singleShot(10000, this, SLOT(reconnect())); // wait 10 seconds before reconnect + TQTimer::singleShot(10000, this, TQT_SLOT(reconnect())); // wait 10 seconds before reconnect } if(reason== OtherClient) { @@ -148,17 +148,17 @@ Protocol *Account::protocol() const return d->protocol; } -QString Account::accountId() const +TQString Account::accountId() const { return d->id; } -const QColor Account::color() const +const TQColor Account::color() const { return d->color; } -void Account::setColor( const QColor &color ) +void Account::setColor( const TQColor &color ) { d->color = color; if ( d->color.isValid() ) @@ -180,12 +180,12 @@ uint Account::priority() const } -QPixmap Account::accountIcon(const int size) const +TQPixmap Account::accountIcon(const int size) const { - QString icon= d->customIcon.isEmpty() ? d->protocol->pluginIcon() : d->customIcon; + TQString icon= d->customIcon.isEmpty() ? d->protocol->pluginIcon() : d->customIcon; // FIXME: this code is duplicated with OnlineStatus, can we merge it somehow? - QPixmap base = KGlobal::instance()->iconLoader()->loadIcon( + TQPixmap base = KGlobal::instance()->iconLoader()->loadIcon( icon, KIcon::Small, size ); if ( d->color.isValid() ) @@ -196,7 +196,7 @@ QPixmap Account::accountIcon(const int size) const if ( size > 0 && base.width() != size ) { - base = QPixmap( base.convertToImage().smoothScale( size, size ) ); + base = TQPixmap( base.convertToImage().smoothScale( size, size ) ); } return base; @@ -207,12 +207,12 @@ KConfigGroup* Kopete::Account::configGroup() const return d->configGroup; } -void Account::setAccountLabel( const QString &label ) +void Account::setAccountLabel( const TQString &label ) { d->accountLabel = label; } -QString Account::accountLabel() const +TQString Account::accountLabel() const { if( d->accountLabel.isNull() ) return d->id; @@ -233,8 +233,8 @@ bool Account::excludeConnect() const void Account::registerContact( Contact *c ) { d->contacts.insert( c->contactId(), c ); - QObject::connect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), - SLOT( contactDestroyed( Kopete::Contact * ) ) ); + TQObject::connect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), + TQT_SLOT( contactDestroyed( Kopete::Contact * ) ) ); } void Account::contactDestroyed( Contact *c ) @@ -243,13 +243,13 @@ void Account::contactDestroyed( Contact *c ) } -const QDict& Account::contacts() +const TQDict& Account::contacts() { return d->contacts; } -Kopete::MetaContact* Account::addContact( const QString &contactId, const QString &displayName , Group *group, AddMode mode ) +Kopete::MetaContact* Account::addContact( const TQString &contactId, const TQString &displayName , Group *group, AddMode mode ) { if ( contactId == d->myself->contactId() ) @@ -316,7 +316,7 @@ Kopete::MetaContact* Account::addContact( const QString &contactId, const QStrin return parentContact; } -bool Account::addContact(const QString &contactId , MetaContact *parent, AddMode mode ) +bool Account::addContact(const TQString &contactId , MetaContact *parent, AddMode mode ) { if ( contactId == myself()->contactId() ) { @@ -362,7 +362,7 @@ KActionMenu * Account::actionMenu() { //default implementation KActionMenu *menu = new KActionMenu( accountId(), myself()->onlineStatus().iconFor( this ), this ); - QString nick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString nick = myself()->property( Kopete::Global::Properties::self()->nickName()).value().toString(); menu->popupMenu()->insertTitle( myself()->onlineStatus().iconFor( myself() ), nick.isNull() ? accountLabel() : i18n( "%2 <%1>" ).arg( accountLabel(), nick ) @@ -370,7 +370,7 @@ KActionMenu * Account::actionMenu() OnlineStatusManager::self()->createAccountStatusActions(this, menu); menu->popupMenu()->insertSeparator(); - menu->insert( new KAction ( i18n( "Properties" ), 0, this, SLOT( editAccount() ), menu, "actionAccountProperties" ) ); + menu->insert( new KAction ( i18n( "Properties" ), 0, this, TQT_SLOT( editAccount() ), menu, "actionAccountProperties" ) ); return menu; } @@ -397,20 +397,20 @@ void Account::setMyself( Contact *myself ) if ( d->myself ) { - QObject::disconnect( d->myself, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); - QObject::disconnect( d->myself, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotContactPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ); + TQObject::disconnect( d->myself, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + TQObject::disconnect( d->myself, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotContactPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ); } d->myself = myself; // d->contacts.remove( myself->contactId() ); - QObject::connect( d->myself, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); - QObject::connect( d->myself, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotContactPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ); + TQObject::connect( d->myself, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + TQObject::connect( d->myself, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotContactPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ); if ( isConnected() != wasConnected ) emit isConnectedChanged(); @@ -454,15 +454,15 @@ void Account::setAllContactsStatus( const Kopete::OnlineStatus &status ) d->suppressStatusNotification = true; d->suppressStatusTimer.start( 5000, true ); - for ( QDictIterator it( d->contacts ); it.current(); ++it ) + for ( TQDictIterator it( d->contacts ); it.current(); ++it ) if ( it.current() != d->myself ) it.current()->setOnlineStatus( status ); } void Account::slotContactPropertyChanged( Contact * /* contact */, - const QString &key, const QVariant &old, const QVariant &newVal ) + const TQString &key, const TQVariant &old, const TQVariant &newVal ) { - if ( key == QString::fromLatin1("awayMessage") && old != newVal && isConnected() ) + if ( key == TQString::fromLatin1("awayMessage") && old != newVal && isConnected() ) { d->restoreMessage = newVal.toString(); // kdDebug( 14010 ) << k_funcinfo << "account " << d->id << " restoreMessage " << d->restoreMessage << endl; @@ -493,22 +493,22 @@ BlackLister* Account::blackLister() return d->blackList; } -void Account::block( const QString &contactId ) +void Account::block( const TQString &contactId ) { d->blackList->addContact( contactId ); } -void Account::unblock( const QString &contactId ) +void Account::unblock( const TQString &contactId ) { d->blackList->removeContact( contactId ); } -bool Account::isBlocked( const QString &contactId ) +bool Account::isBlocked( const TQString &contactId ) { return d->blackList->isBlocked( contactId ); } -void Account::editAccount(QWidget *parent) +void Account::editAccount(TQWidget *parent) { KDialogBase *editDialog = new KDialogBase( parent, "KopeteAccountConfig::editDialog", true, i18n( "Edit Account" ), KDialogBase::Ok | KDialogBase::Cancel, @@ -521,15 +521,15 @@ void Account::editAccount(QWidget *parent) // FIXME: Why the #### is EditAccountWidget not a QWidget?!? This sideways casting // is braindead and error-prone. Looking at MSN the only reason I can see is // because it allows direct subclassing of designer widgets. But what is - // wrong with embedding the designer widget in an empty QWidget instead? + // wrong with embedding the designer widget in an empty TQWidget instead? // Also, if this REALLY has to be a pure class and not a widget, then the // class should at least be renamed to EditAccountIface instead - Martijn - QWidget *w = dynamic_cast( m_accountWidget ); + TQWidget *w = dynamic_cast( m_accountWidget ); if ( !w ) return; editDialog->setMainWidget( w ); - if ( editDialog->exec() == QDialog::Accepted ) + if ( editDialog->exec() == TQDialog::Accepted ) { if( m_accountWidget->validateData() ) m_accountWidget->apply(); @@ -538,22 +538,22 @@ void Account::editAccount(QWidget *parent) editDialog->deleteLater(); } -void Account::setPluginData( Plugin* /*plugin*/, const QString &key, const QString &value ) +void Account::setPluginData( Plugin* /*plugin*/, const TQString &key, const TQString &value ) { configGroup()->writeEntry(key,value); } -QString Account::pluginData( Plugin* /*plugin*/, const QString &key ) const +TQString Account::pluginData( Plugin* /*plugin*/, const TQString &key ) const { return configGroup()->readEntry(key); } -void Account::setAway(bool away, const QString& reason) +void Account::setAway(bool away, const TQString& reason) { setOnlineStatus( OnlineStatusManager::self()->onlineStatus(protocol() , away ? OnlineStatusManager::Away : OnlineStatusManager::Online) , reason ); } -void Account::setCustomIcon( const QString & i) +void Account::setCustomIcon( const TQString & i) { d->customIcon = i; if(!i.isEmpty()) @@ -563,7 +563,7 @@ void Account::setCustomIcon( const QString & i) emit colorChanged( color() ); } -QString Account::customIcon() const +TQString Account::customIcon() const { return d->customIcon; } diff --git a/kopete/libkopete/kopeteaccount.h b/kopete/libkopete/kopeteaccount.h index f3c2d338..4e905d31 100644 --- a/kopete/libkopete/kopeteaccount.h +++ b/kopete/libkopete/kopeteaccount.h @@ -23,8 +23,8 @@ #include "kopete_export.h" -#include -#include +#include +#include class QDomNode; class KActionMenu; @@ -68,10 +68,10 @@ class KOPETE_EXPORT Account : public QObject Q_OBJECT Q_ENUMS( AddMode ) - Q_PROPERTY( QString accountId READ accountId ) + Q_PROPERTY( TQString accountId READ accountId ) Q_PROPERTY( bool excludeConnect READ excludeConnect WRITE setExcludeConnect ) - Q_PROPERTY( QColor color READ color WRITE setColor ) - Q_PROPERTY( QPixmap accountIcon READ accountIcon ) + Q_PROPERTY( TQColor color READ color WRITE setColor ) + Q_PROPERTY( TQPixmap accountIcon READ accountIcon ) Q_PROPERTY( bool isConnected READ isConnected ) Q_PROPERTY( bool isAway READ isAway ) Q_PROPERTY( bool suppressStatusNotification READ suppressStatusNotification ) @@ -100,9 +100,9 @@ public: * @param parent the protocol for this account. The account is a child object of the * protocol, so it will be automatically deleted when the protocol is. * @param accountID the unique ID of this account. - * @param name the name of this QObject. + * @param name the name of this TQObject. */ - Account(Protocol *parent, const QString &accountID, const char *name=0L); + Account(Protocol *parent, const TQString &accountID, const char *name=0L); ~Account(); /** @@ -113,12 +113,12 @@ public: /** * \return the unique ID of this account used as the login */ - QString accountId() const; + TQString accountId() const; /** * \return The label of this account, for the GUI */ - QString accountLabel() const; + TQString accountLabel() const; /** * \brief Get the priority of this account. @@ -157,7 +157,7 @@ public: * * \return the user color for this account */ - const QColor color() const; + const TQColor color() const; /** * \brief Set the color for this account. @@ -166,7 +166,7 @@ public: * * @sa @ref color() */ - void setColor( const QColor &color); + void setColor( const TQColor &color); /** * \brief Get the icon for this account. @@ -176,23 +176,23 @@ public: * @param size the size of the icon. If the size is 0, the default size is used. * @return the icon for this account, colored if needed */ - QPixmap accountIcon( const int size = 0 ) const; + TQPixmap accountIcon( const int size = 0 ) const; /** * \brief change the account icon. * by default the icon of an account is the protocol one, but it may be overide it. - * Set QString::null to go back to the default (the protocol icon) + * Set TQString::null to go back to the default (the protocol icon) * * this call will emit colorChanged() */ - void setCustomIcon( const QString& ); + void setCustomIcon( const TQString& ); /** * \brief return the icon base * This is the custom account icon set with setIcon. if this icon is null, then the protocol icon is used * don't use this funciton to get the icon that need to be displayed, use accountIcon */ - QString customIcon() const; + TQString customIcon() const; @@ -229,7 +229,7 @@ public: * so you can safely use static_cast to your own derived contact class * if needed. */ - const QDict& contacts(); + const TQDict& contacts(); /** * Indicates whether or not we should suppress status notifications @@ -264,13 +264,13 @@ public: * If @p mode is @c DontChangeKABC, no additional action is carried out. * * @param contactId the @ref Contact::contactId of the contact to create - * @param displayName the displayname (alias) of the new metacontact. Leave as QString::null if + * @param displayName the displayname (alias) of the new metacontact. Leave as TQString::null if * no alias is known, then by default, the nick will be taken as alias and tracked if changed. * @param group the group to add the created metacontact to, or 0 for the top-level group. * @param mode the mode used to add the contact. Use DontChangeKABC when deserializing. * @return the new created metacontact or 0L if the operation failed */ - MetaContact* addContact( const QString &contactId, const QString &displayName = QString::null, Group *group = 0, AddMode mode = DontChangeKABC ) ; + MetaContact* addContact( const TQString &contactId, const TQString &displayName = TQString::null, Group *group = 0, AddMode mode = DontChangeKABC ) ; /** * @brief Create a new contact, adding it to an existing metacontact @@ -280,12 +280,12 @@ public: * * @param contactId the @ref Contact::contactId of the contact to create * @param parent the parent metacontact (must not be 0) - * @param mode the mode used to add the contact. See addContact(const QString&,const QString&,Group*,AddMode) for details. + * @param mode the mode used to add the contact. See addContact(const TQString&,const TQString&,Group*,AddMode) for details. * * @return @c true if creation of the contact succeeded or the contact was already in the list, * @c false otherwise. */ - bool addContact( const QString &contactId, MetaContact *parent, AddMode mode = DontChangeKABC ); + bool addContact( const TQString &contactId, MetaContact *parent, AddMode mode = DontChangeKABC ); /** * @brief Indicate whether the account is connected at all. @@ -338,7 +338,7 @@ public: /** * \return @c true if the contact with ID @p contactId is in the blacklist, @c false otherwise. */ - virtual bool isBlocked( const QString &contactId ); + virtual bool isBlocked( const TQString &contactId ); protected: /** @@ -372,7 +372,7 @@ protected: * @param parentContact the metacontact to add this contact to * @return @c true if creating the contact succeeded, @c false on failure. */ - virtual bool createContact( const QString &contactId, MetaContact *parentContact ) =0; + virtual bool createContact( const TQString &contactId, MetaContact *parentContact ) =0; /** @@ -380,7 +380,7 @@ protected: * * @param label The label to set */ - void setAccountLabel( const QString &label ); + void setAccountLabel( const TQString &label ); protected slots: /** @@ -417,7 +417,7 @@ signals: * also emited when the icon change * @todo probably rename to accountIconChanged */ - void colorChanged( const QColor & ); + void colorChanged( const TQColor & ); /** * Emitted when the account is deleted. @@ -470,7 +470,7 @@ public slots: * * @todo change ; make use of setOnlineStatus */ - virtual void setAway( bool away, const QString &reason = QString::null ); + virtual void setAway( bool away, const TQString &reason = TQString::null ); /** * Reimplement this function to set the online status @@ -478,12 +478,12 @@ public slots: * @param reason is the away message to set. * @note If needed, you need to connect. if the offline status is given, you should disconnect */ - virtual void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null ) = 0; + virtual void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null ) = 0; /** * Display the edit account widget for the account */ - void editAccount( QWidget* parent = 0L ); + void editAccount( TQWidget* parent = 0L ); /** * Add a user to the blacklist. The default implementation calls @@ -491,7 +491,7 @@ public slots: * * @param contactId the contact to be added to the blacklist */ - virtual void block( const QString &contactId ); + virtual void block( const TQString &contactId ); /** * Remove a user from the blacklist. The default implementation calls @@ -499,7 +499,7 @@ public slots: * * @param contactId the contact to be removed from the blacklist */ - virtual void unblock( const QString &contactId ); + virtual void unblock( const TQString &contactId ); private slots: /** @@ -520,7 +520,7 @@ private slots: /** * The @ref myself() contact's property changed. */ - void slotContactPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ); + void slotContactPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ); /** * Stop the suppression of status notification (connected to a timer) @@ -539,13 +539,13 @@ public: * @todo remove * @deprecated use configGroup */ - void setPluginData( Plugin* /*plugin*/, const QString &key, const QString &value ) KDE_DEPRECATED; + void setPluginData( Plugin* /*plugin*/, const TQString &key, const TQString &value ) KDE_DEPRECATED; /** * @todo remove * @deprecated use configGroup */ - QString pluginData( Plugin* /*plugin*/, const QString &key ) const KDE_DEPRECATED; + TQString pluginData( Plugin* /*plugin*/, const TQString &key ) const KDE_DEPRECATED; }; } //END namespace Kopete diff --git a/kopete/libkopete/kopeteaccountmanager.cpp b/kopete/libkopete/kopeteaccountmanager.cpp index b00f080e..d12aa7ce 100644 --- a/kopete/libkopete/kopeteaccountmanager.cpp +++ b/kopete/libkopete/kopeteaccountmanager.cpp @@ -18,9 +18,9 @@ #include "kopeteaccountmanager.h" -#include -#include -#include +#include +#include +#include #include #include @@ -44,7 +44,7 @@ class AccountManager::Private { public: - class AccountPtrList : public QPtrList + class AccountPtrList : public TQPtrList { protected: int compareItems( AccountPtrList::Item a, AccountPtrList::Item b ) @@ -75,7 +75,7 @@ AccountManager * AccountManager::self() AccountManager::AccountManager() -: QObject( qApp, "KopeteAccountManager" ) +: TQObject( qApp, "KopeteAccountManager" ) { d = new Private; } @@ -90,7 +90,7 @@ AccountManager::~AccountManager() bool AccountManager::isAnyAccountConnected() { - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { if(it.current()->isConnected()) return true; @@ -100,17 +100,17 @@ bool AccountManager::isAnyAccountConnected() void AccountManager::connectAll() { - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) if(!it.current()->excludeConnect()) it.current()->connect(); } -void AccountManager::setAvailableAll( const QString &awayReason ) +void AccountManager::setAvailableAll( const TQString &awayReason ) { Away::setGlobalAway( false ); bool anyConnected = isAnyAccountConnected(); - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { if ( anyConnected ) { @@ -125,16 +125,16 @@ void AccountManager::setAvailableAll( const QString &awayReason ) void AccountManager::disconnectAll() { - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) it.current()->disconnect(); } -void AccountManager::setAwayAll( const QString &awayReason, bool away ) +void AccountManager::setAwayAll( const TQString &awayReason, bool away ) { Away::setGlobalAway( true ); bool anyConnected = isAnyAccountConnected(); - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { // FIXME: ICQ's invisible online should be set to invisible away Contact *self = it.current()->myself(); @@ -152,12 +152,12 @@ void AccountManager::setAwayAll( const QString &awayReason, bool away ) } } -void AccountManager::setOnlineStatus( uint category , const QString& awayMessage, uint flags ) +void AccountManager::setOnlineStatus( uint category , const TQString& awayMessage, uint flags ) { OnlineStatusManager::Categories katgor=(OnlineStatusManager::Categories)category; bool anyConnected = isAnyAccountConnected(); - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { Account *account = it.current(); Kopete::OnlineStatus status = OnlineStatusManager::self()->onlineStatus(account->protocol() , katgor); @@ -175,25 +175,25 @@ void AccountManager::setOnlineStatus( uint category , const QString& awayMessage } -QColor AccountManager::guessColor( Protocol *protocol ) const +TQColor AccountManager::guessColor( Protocol *protocol ) const { // In a perfect wold, we should check if the color is actually not used by the account. // Anyway, this is not really required, It would be a difficult job for about nothing more. // -- Olivier int protocolCount = 0; - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { if ( it.current()->protocol()->pluginId() == protocol->pluginId() ) protocolCount++; } // let's figure a color - QColor color; + TQColor color; switch ( protocolCount % 7 ) { case 0: - color = QColor(); + color = TQColor(); break; case 1: color = Qt::red; @@ -230,7 +230,7 @@ Account* AccountManager::registerAccount( Account *account ) } // If this account already exists, do nothing - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { if ( ( account->protocol() == it.current()->protocol() ) && ( account->accountId() == it.current()->accountId() ) ) { @@ -243,12 +243,12 @@ Account* AccountManager::registerAccount( Account *account ) d->accounts.sort(); // Connect to the account's status changed signal - connect(account->myself(), SIGNAL(onlineStatusChanged(Kopete::Contact *, + connect(account->myself(), TQT_SIGNAL(onlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &)), - this, SLOT(slotAccountOnlineStatusChanged(Kopete::Contact *, + this, TQT_SLOT(slotAccountOnlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &))); - connect(account, SIGNAL(accountDestroyed(const Kopete::Account *)) , this, SLOT( unregisterAccount(const Kopete::Account *) )); + connect(account, TQT_SIGNAL(accountDestroyed(const Kopete::Account *)) , this, TQT_SLOT( unregisterAccount(const Kopete::Account *) )); emit accountRegistered( account ); return account; @@ -261,15 +261,15 @@ void AccountManager::unregisterAccount( const Account *account ) emit accountUnregistered( account ); } -const QPtrList& AccountManager::accounts() const +const TQPtrList& AccountManager::accounts() const { return d->accounts; } -QDict AccountManager::accounts( const Protocol *protocol ) const +TQDict AccountManager::accounts( const Protocol *protocol ) const { - QDict dict; - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + TQDict dict; + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { if ( it.current()->protocol() == protocol && !it.current()->accountId().isNull() ) dict.insert( it.current()->accountId(), it.current() ); @@ -278,9 +278,9 @@ QDict AccountManager::accounts( const Protocol *protocol ) const return dict; } -Account * AccountManager::findAccount( const QString &protocolId, const QString &accountId ) +Account * AccountManager::findAccount( const TQString &protocolId, const TQString &accountId ) { - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { if ( it.current()->protocol()->pluginId() == protocolId && it.current()->accountId() == accountId ) return it.current(); @@ -299,7 +299,7 @@ void AccountManager::removeAccount( Account *account ) KConfigGroup *configgroup = account->configGroup(); // Clean up the contact list - QDictIterator it( account->contacts() ); + TQDictIterator it( account->contacts() ); for ( ; it.current(); ++it ) { Contact* c = it.current(); @@ -312,7 +312,7 @@ void AccountManager::removeAccount( Account *account ) { //get the first group and it's members Group* group = mc->groups().first(); - QPtrList groupMembers = group->members(); + TQPtrList groupMembers = group->members(); ContactList::self()->removeMetaContact( mc ); if ( groupMembers.count() == 1 && groupMembers.findRef( mc ) != -1 ) ContactList::self()->removeGroup( group ); @@ -332,7 +332,7 @@ void AccountManager::removeAccount( Account *account ) { // FIXME: pluginId() should return the internal name and not the class name, so // we can get rid of this hack - Olivier/Martijn - QString protocolName = protocol->pluginId().remove( QString::fromLatin1( "Protocol" ) ).lower(); + TQString protocolName = protocol->pluginId().remove( TQString::fromLatin1( "Protocol" ) ).lower(); PluginManager::self()->setPluginEnabled( protocolName, false ); PluginManager::self()->unloadPlugin( protocolName ); @@ -344,7 +344,7 @@ void AccountManager::save() //kdDebug( 14010 ) << k_funcinfo << endl; d->accounts.sort(); - for ( QPtrListIterator it( d->accounts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->accounts ); it.current(); ++it ) { KConfigBase *config = it.current()->configGroup(); @@ -357,22 +357,22 @@ void AccountManager::save() void AccountManager::load() { - connect( PluginManager::self(), SIGNAL( pluginLoaded( Kopete::Plugin * ) ), - this, SLOT( slotPluginLoaded( Kopete::Plugin * ) ) ); + connect( PluginManager::self(), TQT_SIGNAL( pluginLoaded( Kopete::Plugin * ) ), + this, TQT_SLOT( slotPluginLoaded( Kopete::Plugin * ) ) ); // Iterate over all groups that start with "Account_" as those are accounts // and load the required protocols if the account is enabled. // Don't try to optimize duplicate calls out, the plugin queue is smart enough // (and fast enough) to handle that without adding complexity here KConfig *config = KGlobal::config(); - QStringList accountGroups = config->groupList().grep( QRegExp( QString::fromLatin1( "^Account_" ) ) ); - for ( QStringList::Iterator it = accountGroups.begin(); it != accountGroups.end(); ++it ) + TQStringList accountGroups = config->groupList().grep( TQRegExp( TQString::fromLatin1( "^Account_" ) ) ); + for ( TQStringList::Iterator it = accountGroups.begin(); it != accountGroups.end(); ++it ) { config->setGroup( *it ); - QString protocol = config->readEntry( "Protocol" ); - if ( protocol.endsWith( QString::fromLatin1( "Protocol" ) ) ) - protocol = QString::fromLatin1( "kopete_" ) + protocol.lower().remove( QString::fromLatin1( "protocol" ) ); + TQString protocol = config->readEntry( "Protocol" ); + if ( protocol.endsWith( TQString::fromLatin1( "Protocol" ) ) ) + protocol = TQString::fromLatin1( "kopete_" ) + protocol.lower().remove( TQString::fromLatin1( "protocol" ) ); if ( config->readBoolEntry( "Enabled", true ) ) PluginManager::self()->loadPlugin( protocol, PluginManager::LoadAsync ); @@ -388,8 +388,8 @@ void AccountManager::slotPluginLoaded( Plugin *plugin ) // Iterate over all groups that start with "Account_" as those are accounts // and parse them if they are from this protocol KConfig *config = KGlobal::config(); - QStringList accountGroups = config->groupList().grep( QRegExp( QString::fromLatin1( "^Account_" ) ) ); - for ( QStringList::Iterator it = accountGroups.begin(); it != accountGroups.end(); ++it ) + TQStringList accountGroups = config->groupList().grep( TQRegExp( TQString::fromLatin1( "^Account_" ) ) ); + for ( TQStringList::Iterator it = accountGroups.begin(); it != accountGroups.end(); ++it ) { config->setGroup( *it ); @@ -400,7 +400,7 @@ void AccountManager::slotPluginLoaded( Plugin *plugin ) if ( !config->readBoolEntry( "Enabled", true ) ) continue; - QString accountId = config->readEntry( "AccountId" ); + TQString accountId = config->readEntry( "AccountId" ); if ( accountId.isEmpty() ) { kdWarning( 14010 ) << k_funcinfo << diff --git a/kopete/libkopete/kopeteaccountmanager.h b/kopete/libkopete/kopeteaccountmanager.h index ed0c939a..75ebf667 100644 --- a/kopete/libkopete/kopeteaccountmanager.h +++ b/kopete/libkopete/kopeteaccountmanager.h @@ -19,9 +19,9 @@ #ifndef __kopeteaccountmanager_h__ #define __kopeteaccountmanager_h__ -#include -#include -#include +#include +#include +#include #include "kopete_export.h" @@ -65,16 +65,16 @@ public: * \brief Retrieve the list of accounts * \return a list of all the accounts */ - const QPtrList & accounts() const; + const TQPtrList & accounts() const; /** - * \brief Retrieve a QDict of accounts for the given protocol + * \brief Retrieve a TQDict of accounts for the given protocol * * The list is guaranteed to contain only accounts for the specified * protocol * \param p is the Protocol object you want accounts for */ - QDict accounts( const Protocol *p ) const; + TQDict accounts( const Protocol *p ) const; /** * \brief Return the account asked @@ -82,7 +82,7 @@ public: * \param accountId is the ID for the account you want * \return the Account object found or NULL if no account was found */ - Account* findAccount( const QString &protocolId, const QString &accountId ); + Account* findAccount( const TQString &protocolId, const TQString &accountId ); /** * \brief Delete the account and clean the config data @@ -97,7 +97,7 @@ public: * Guesses a color for the next account of a given protocol based on the already registered colors * \return the color guessed for the account */ - QColor guessColor( Protocol *protocol ) const ; + TQColor guessColor( Protocol *protocol ) const ; /** * @brief Register the account. @@ -142,7 +142,7 @@ public slots: * @param flags is a bitmask of SetOnlineStatusFlag */ void setOnlineStatus( /*Kopete::OnlineStatusManager::Categories*/ uint category, - const QString& awayMessage = QString::null, uint flags=0); + const TQString& awayMessage = TQString::null, uint flags=0); /** * \brief Set all accounts to away at once. @@ -152,7 +152,7 @@ public slots: * @param awayReason is the away message that will be set. * @param away decides whether the message is away/non-away */ - void setAwayAll( const QString &awayReason = QString::null, bool away=true ); + void setAwayAll( const TQString &awayReason = TQString::null, bool away=true ); /** * \brief Connect or make available every account. @@ -162,7 +162,7 @@ public slots: * This is a slot, so you can connect directly to it from e.g. a KAction. * @param awayReason is the away(status) message that will be set. */ - void setAvailableAll( const QString &awayReason = QString::null ); + void setAvailableAll( const TQString &awayReason = TQString::null ); /** * \internal diff --git a/kopete/libkopete/kopeteaway.cpp b/kopete/libkopete/kopeteaway.cpp index fa500e0c..1c920f31 100644 --- a/kopete/libkopete/kopeteaway.cpp +++ b/kopete/libkopete/kopeteaway.cpp @@ -30,7 +30,7 @@ #include "kopeteprefs.h" #include -#include +#include #include #include @@ -59,18 +59,18 @@ struct KopeteAwayPrivate { - QString awayMessage; - QString autoAwayMessage; + TQString awayMessage; + TQString autoAwayMessage; bool useAutoAwayMessage; bool globalAway; - QStringList awayMessageList; - QTime idleTime; - QTimer *timer; + TQStringList awayMessageList; + TQTime idleTime; + TQTimer *timer; bool autoaway; bool goAvailable; int awayTimeout; bool useAutoAway; - QPtrList autoAwayAccounts; + TQPtrList autoAwayAccounts; int mouse_x; int mouse_y; @@ -87,7 +87,7 @@ struct KopeteAwayPrivate Kopete::Away *Kopete::Away::instance = 0L; -Kopete::Away::Away() : QObject( kapp , "Kopete::Away") +Kopete::Away::Away() : TQObject( kapp , "Kopete::Away") { int dummy = 0; dummy = dummy; // shut up @@ -95,8 +95,8 @@ Kopete::Away::Away() : QObject( kapp , "Kopete::Away") d = new KopeteAwayPrivate; // Set up the away messages - d->awayMessage = QString::null; - d->autoAwayMessage = QString::null; + d->awayMessage = TQString::null; + d->autoAwayMessage = TQString::null; d->useAutoAwayMessage = false; d->globalAway = false; d->autoaway = false; @@ -143,7 +143,7 @@ Kopete::Away::Away() : QObject( kapp , "Kopete::Away") load(); - KSettings::Dispatcher::self()->registerInstance( KGlobal::instance(), this, SLOT( load() ) ); + KSettings::Dispatcher::self()->registerInstance( KGlobal::instance(), this, TQT_SLOT( load() ) ); // Set up the config object KConfig *config = KGlobal::config(); /* Load the saved away messages */ @@ -156,8 +156,8 @@ Kopete::Away::Away() : QObject( kapp , "Kopete::Away") } else if(config->hasKey("Titles")) // Old config format { - QStringList titles = config->readListEntry("Titles"); // Get the titles - for(QStringList::iterator i = titles.begin(); i != titles.end(); ++i) + TQStringList titles = config->readListEntry("Titles"); // Get the titles + for(TQStringList::iterator i = titles.begin(); i != titles.end(); ++i) { d->awayMessageList.append( config->readEntry(*i) ); // And add it to the list } @@ -188,8 +188,8 @@ Kopete::Away::Away() : QObject( kapp , "Kopete::Away") } // init the timer - d->timer = new QTimer(this, "AwayTimer"); - connect(d->timer, SIGNAL(timeout()), this, SLOT(slotTimerTimeout())); + d->timer = new TQTimer(this, "AwayTimer"); + connect(d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimerTimeout())); d->timer->start(4000); //init the time and other @@ -203,17 +203,17 @@ Kopete::Away::~Away() delete d; } -QString Kopete::Away::message() +TQString Kopete::Away::message() { return getInstance()->d->awayMessage; } -QString Kopete::Away::autoAwayMessage() +TQString Kopete::Away::autoAwayMessage() { return getInstance()->d->autoAwayMessage; } -void Kopete::Away::setGlobalAwayMessage(const QString &message) +void Kopete::Away::setGlobalAwayMessage(const TQString &message) { if( !message.isEmpty() ) { @@ -223,7 +223,7 @@ void Kopete::Away::setGlobalAwayMessage(const QString &message) } } -void Kopete::Away::setAutoAwayMessage(const QString &message) +void Kopete::Away::setAutoAwayMessage(const TQString &message) { if( !message.isEmpty() ) { @@ -275,17 +275,17 @@ void Kopete::Away::load() d->useAutoAwayMessage=config->readBoolEntry("UseAutoAwayMessage", false); } -QStringList Kopete::Away::getMessages() +TQStringList Kopete::Away::getMessages() { return d->awayMessageList; } -QString Kopete::Away::getMessage( uint messageNumber ) +TQString Kopete::Away::getMessage( uint messageNumber ) { - QStringList::iterator it = d->awayMessageList.at( messageNumber ); + TQStringList::iterator it = d->awayMessageList.at( messageNumber ); if( it != d->awayMessageList.end() ) { - QString str = *it; + TQString str = *it; d->awayMessageList.prepend( str ); d->awayMessageList.remove( it ); save(); @@ -293,11 +293,11 @@ QString Kopete::Away::getMessage( uint messageNumber ) } else { - return QString::null; + return TQString::null; } } -void Kopete::Away::addMessage(const QString &message) +void Kopete::Away::addMessage(const TQString &message) { d->awayMessageList.prepend( message ); if( (int)d->awayMessageList.count() > KopetePrefs::prefs()->rememberedMessages() ) @@ -496,7 +496,7 @@ void Kopete::Away::setAutoAway() // Set all accounts that are not away already to away. // We remember them so later we only set the accounts to // available that we set to away (and not the user). - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); for(Kopete::Account *i=accounts.first() ; i; i=accounts.next() ) { if(i->myself()->onlineStatus().status() == Kopete::OnlineStatus::Online) diff --git a/kopete/libkopete/kopeteaway.h b/kopete/libkopete/kopeteaway.h index 544dff75..b907f024 100644 --- a/kopete/libkopete/kopeteaway.h +++ b/kopete/libkopete/kopeteaway.h @@ -19,9 +19,9 @@ #ifndef KOPETEAWAY_HI #define KOPETEAWAY_HI -#include -#include -#include +#include +#include +#include #include "kopeteawaydialog.h" #include "kopete_export.h" @@ -72,13 +72,13 @@ public: * @brief Gets the current global away message * @return The global away message */ - static QString message(); + static TQString message(); /** * @brief Gets the current global auto away message * @return The global auto away message */ - static QString autoAwayMessage(); + static TQString autoAwayMessage(); /** * This method sets the global away message, @@ -86,7 +86,7 @@ public: * @brief Sets the global away message * @param message The message you want to set */ - void setGlobalAwayMessage(const QString &message); + void setGlobalAwayMessage(const TQString &message); /** * This method sets the global auto away message, @@ -94,7 +94,7 @@ public: * @brief Sets the global auto away message * @param message The message you want to set */ - void setAutoAwayMessage(const QString &message); + void setAutoAwayMessage(const TQString &message); /** * @brief Sets global away for all protocols @@ -111,11 +111,11 @@ public: * @brief Function to get the titles of user defined away messages * @return List of away message titles * - * This function can be used to retrieve a QStringList of the away message titles, - * these titles can be passed to getMessage(QString title) to retrieve the + * This function can be used to retrieve a TQStringList of the away message titles, + * these titles can be passed to getMessage(TQString title) to retrieve the * corresponding message. */ - QStringList getMessages(); + TQStringList getMessages(); /** * @brief Function to get an away message @@ -125,7 +125,7 @@ public: * This function retrieves the away message that corresponds to the ringbuffer index * passed in. */ - QString getMessage( uint messageNumber ); + TQString getMessage( uint messageNumber ); /** * @brief Adds an away message to the ringbuffer @@ -134,7 +134,7 @@ public: * This function will add an away message to the ringbuffer of user defined * away messages. */ - void addMessage(const QString &message); + void addMessage(const TQString &message); /** * time in seconds the user has been idle diff --git a/kopete/libkopete/kopeteawayaction.cpp b/kopete/libkopete/kopeteawayaction.cpp index 84622c7e..ded2a830 100644 --- a/kopete/libkopete/kopeteawayaction.cpp +++ b/kopete/libkopete/kopeteawayaction.cpp @@ -36,34 +36,34 @@ public: }; -AwayAction::AwayAction(const QString &text, const QIconSet &pix, const KShortcut &cut, - const QObject *receiver, const char *slot, QObject *parent, const char *name ) +AwayAction::AwayAction(const TQString &text, const TQIconSet &pix, const KShortcut &cut, + const TQObject *receiver, const char *slot, TQObject *parent, const char *name ) : KSelectAction(text, pix, cut, parent, name ) , d(new Private( OnlineStatus() ) ) { - QObject::connect( Kopete::Away::getInstance(), SIGNAL( messagesChanged() ), - this, SLOT( slotAwayChanged() ) ); + TQObject::connect( Kopete::Away::getInstance(), TQT_SIGNAL( messagesChanged() ), + this, TQT_SLOT( slotAwayChanged() ) ); - QObject::connect( this, SIGNAL( awayMessageSelected( const QString & ) ), + TQObject::connect( this, TQT_SIGNAL( awayMessageSelected( const TQString & ) ), receiver, slot ); - QObject::connect( this, SIGNAL( activated( int ) ), - this, SLOT( slotSelectAway( int ) ) ); + TQObject::connect( this, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotSelectAway( int ) ) ); slotAwayChanged(); } -AwayAction::AwayAction( const OnlineStatus& status, const QString &text, const QIconSet &pix, const KShortcut &cut, - const QObject *receiver, const char *slot, QObject *parent, const char *name ) +AwayAction::AwayAction( const OnlineStatus& status, const TQString &text, const TQIconSet &pix, const KShortcut &cut, + const TQObject *receiver, const char *slot, TQObject *parent, const char *name ) : KSelectAction(text, pix, cut, parent, name ) , d(new Private( status ) ) { - QObject::connect( Kopete::Away::getInstance(), SIGNAL( messagesChanged() ), - this, SLOT( slotAwayChanged() ) ); + TQObject::connect( Kopete::Away::getInstance(), TQT_SIGNAL( messagesChanged() ), + this, TQT_SLOT( slotAwayChanged() ) ); - QObject::connect( this, SIGNAL( awayMessageSelected( const Kopete::OnlineStatus &, const QString & ) ), + TQObject::connect( this, TQT_SIGNAL( awayMessageSelected( const Kopete::OnlineStatus &, const TQString & ) ), receiver, slot ); - QObject::connect( this, SIGNAL( activated( int ) ), - this, SLOT( slotSelectAway( int ) ) ); + TQObject::connect( this, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( slotSelectAway( int ) ) ); slotAwayChanged(); } @@ -75,16 +75,16 @@ AwayAction::~AwayAction() void AwayAction::slotAwayChanged() { - QStringList awayMessages = Kopete::Away::getInstance()->getMessages(); - for( QStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it ) + TQStringList awayMessages = Kopete::Away::getInstance()->getMessages(); + for( TQStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it ) { (*it) = KStringHandler::rsqueeze( *it ); } d->reasonCount = awayMessages.count(); - QStringList menu; + TQStringList menu; menu << i18n( "No Message" ); menu << i18n( "New Message..." ); - menu << QString::null ; //separator + menu << TQString::null ; //separator menu += awayMessages ; setItems( menu ); setCurrentItem( -1 ); @@ -96,7 +96,7 @@ void AwayAction::slotSelectAway( int index ) setCurrentItem( -1 ); Kopete::Away *mAway = Kopete::Away::getInstance(); - QString awayReason; + TQString awayReason; // Index == -1 means this is a result of Global Away all. // Use the last entered message (0) @@ -106,11 +106,11 @@ void AwayAction::slotSelectAway( int index ) switch(index) { case 0: - awayReason = QString::null; + awayReason = TQString::null; break; case 1: bool ok; - awayReason = KInputDialog::getText( i18n( "New Away Message" ), i18n( "Please enter your away reason:" ) , QString::null , &ok ); + awayReason = KInputDialog::getText( i18n( "New Away Message" ), i18n( "Please enter your away reason:" ) , TQString::null , &ok ); if(!ok) //the user canceled return; if( !awayReason.isEmpty() ) diff --git a/kopete/libkopete/kopeteawayaction.h b/kopete/libkopete/kopeteawayaction.h index f8ab9d64..c787e7e7 100644 --- a/kopete/libkopete/kopeteawayaction.h +++ b/kopete/libkopete/kopeteawayaction.h @@ -46,20 +46,20 @@ class KOPETE_EXPORT AwayAction : public KSelectAction * @p text, @p pix, @p cut, @p receiver, @p slot, @p parent and * @p name are all handled by KSelectAction. **/ - AwayAction(const QString &text, const QIconSet &pix, - const KShortcut &cut, const QObject *receiver, const char *slot, - QObject *parent, const char *name = 0); + AwayAction(const TQString &text, const TQIconSet &pix, + const KShortcut &cut, const TQObject *receiver, const char *slot, + TQObject *parent, const char *name = 0); /** * Constructor * @param status the OnlineStatus that appears in the signal - * @param slot must have the following signature: ( const OnlineStatus &, const QString & ) + * @param slot must have the following signature: ( const OnlineStatus &, const TQString & ) * @p text, @p pix, @p cut, @p receiver, @p slot, @p parent and * @p name are all handled by KSelectAction. **/ - AwayAction(const OnlineStatus &status, const QString &text, const QIconSet &pix, - const KShortcut &cut, const QObject *receiver, const char *slot, - QObject *parent, const char *name = 0); + AwayAction(const OnlineStatus &status, const TQString &text, const TQIconSet &pix, + const KShortcut &cut, const TQObject *receiver, const char *slot, + TQObject *parent, const char *name = 0); /** * Destructor. @@ -70,12 +70,12 @@ class KOPETE_EXPORT AwayAction : public KSelectAction /** * @brief Emits when the user selects an away message */ - void awayMessageSelected( const QString & ); + void awayMessageSelected( const TQString & ); /** * same as above, but with the saved status */ - void awayMessageSelected( const Kopete::OnlineStatus& , const QString & ); + void awayMessageSelected( const Kopete::OnlineStatus& , const TQString & ); private slots: void slotAwayChanged(); diff --git a/kopete/libkopete/kopeteawaydialog.cpp b/kopete/libkopete/kopeteawaydialog.cpp index 0dbb7023..19d9fb9c 100644 --- a/kopete/libkopete/kopeteawaydialog.cpp +++ b/kopete/libkopete/kopeteawaydialog.cpp @@ -33,7 +33,7 @@ public: KopeteAwayDialog_Base *base; }; -KopeteAwayDialog::KopeteAwayDialog( QWidget *parent, const char *name ) +KopeteAwayDialog::KopeteAwayDialog( TQWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n( "Global Away Message" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ) { @@ -44,7 +44,7 @@ KopeteAwayDialog::KopeteAwayDialog( QWidget *parent, const char *name ) d->base = new KopeteAwayDialog_Base( this ); setMainWidget( d->base ); - QObject::connect( d->base->cmbHistory, SIGNAL( activated( int ) ), this, SLOT( slotComboBoxSelection( int ) ) ); + TQObject::connect( d->base->cmbHistory, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotComboBoxSelection( int ) ) ); awayInstance = Kopete::Away::getInstance(); mExtendedAwayType = 0; @@ -99,8 +99,8 @@ void KopeteAwayDialog::cancelAway( int /* awayType */ ) void KopeteAwayDialog::init() { - QStringList awayMessages = awayInstance->getMessages(); - for( QStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it ) + TQStringList awayMessages = awayInstance->getMessages(); + for( TQStringList::iterator it = awayMessages.begin(); it != awayMessages.end(); ++it ) { *it = KStringHandler::rsqueeze( *it ); } @@ -113,7 +113,7 @@ void KopeteAwayDialog::init() d->base->txtOneShot->setCursorPosition( 0 ); } -QString KopeteAwayDialog::getSelectedAwayMessage() +TQString KopeteAwayDialog::getSelectedAwayMessage() { mLastUserAwayMessage = d->base->txtOneShot->text(); return mLastUserAwayMessage; diff --git a/kopete/libkopete/kopeteawaydialog.h b/kopete/libkopete/kopeteawaydialog.h index 313cafe2..517e419c 100644 --- a/kopete/libkopete/kopeteawaydialog.h +++ b/kopete/libkopete/kopeteawaydialog.h @@ -60,7 +60,7 @@ public: * @param parent The object that owns this * @param name Name for this object */ - KopeteAwayDialog( QWidget *parent = 0, const char *name = 0 ); + KopeteAwayDialog( TQWidget *parent = 0, const char *name = 0 ); /** * Destructor @@ -78,7 +78,7 @@ protected: * \brief Gets the last selected away message * @return An away message */ - QString getSelectedAwayMessage(); + TQString getSelectedAwayMessage(); /** * \brief Sets the user away @@ -178,13 +178,13 @@ private: * saved away message, whichever was * last chosen */ - QString mLastUserAwayMessage; + TQString mLastUserAwayMessage; /** * The last message that the user typed in the * line edit */ - QString mLastUserTypedMessage; + TQString mLastUserTypedMessage; /** * This is used to store the type of away that we're diff --git a/kopete/libkopete/kopeteblacklister.cpp b/kopete/libkopete/kopeteblacklister.cpp index 8ec5c54b..29dbf727 100644 --- a/kopete/libkopete/kopeteblacklister.cpp +++ b/kopete/libkopete/kopeteblacklister.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include namespace Kopete { @@ -28,21 +28,21 @@ namespace Kopete class BlackLister::Private { public: - QStringList blacklist; - QString owner; - QString protocol; + TQStringList blacklist; + TQString owner; + TQString protocol; }; -BlackLister::BlackLister(const QString &protocolId, const QString &accountId, QObject *parent, const char *name) - : QObject(parent, name), d( new Private ) +BlackLister::BlackLister(const TQString &protocolId, const TQString &accountId, TQObject *parent, const char *name) + : TQObject(parent, name), d( new Private ) { KConfig *config = KGlobal::config(); d->owner = accountId; d->protocol = protocolId; config->setGroup("BlackLister"); - d->blacklist = config->readListEntry( d->protocol + QString::fromLatin1("_") + d->owner ); + d->blacklist = config->readListEntry( d->protocol + TQString::fromLatin1("_") + d->owner ); } BlackLister::~BlackLister() @@ -51,7 +51,7 @@ BlackLister::~BlackLister() } -bool BlackLister::isBlocked(const QString &contactId) +bool BlackLister::isBlocked(const TQString &contactId) { return (d->blacklist.find( contactId ) != d->blacklist.end() ); } @@ -61,7 +61,7 @@ bool BlackLister::isBlocked(Contact *contact) return isBlocked(contact->contactId()); } -void BlackLister::addContact(const QString &contactId) +void BlackLister::addContact(const TQString &contactId) { if( !isBlocked(contactId) ) { @@ -73,14 +73,14 @@ void BlackLister::addContact(const QString &contactId) void BlackLister::addContact(Contact *contact) { - QString temp = contact->contactId(); + TQString temp = contact->contactId(); addContact( temp ); } void BlackLister::removeContact(Contact *contact) { - QString temp = contact->contactId(); + TQString temp = contact->contactId(); removeContact( temp ); } @@ -90,11 +90,11 @@ void BlackLister::saveToDisk() KConfig *config = KGlobal::config(); config->setGroup("BlackLister"); - config->writeEntry( d->protocol + QString::fromLatin1("_") + d->owner, d->blacklist ); + config->writeEntry( d->protocol + TQString::fromLatin1("_") + d->owner, d->blacklist ); config->sync(); } -void BlackLister::removeContact(const QString &contactId) +void BlackLister::removeContact(const TQString &contactId) { if( isBlocked(contactId) ) { diff --git a/kopete/libkopete/kopeteblacklister.h b/kopete/libkopete/kopeteblacklister.h index ed3e5566..c2df1bca 100644 --- a/kopete/libkopete/kopeteblacklister.h +++ b/kopete/libkopete/kopeteblacklister.h @@ -16,7 +16,7 @@ #ifndef KOPETEBLACKLISTER_H #define KOPETEBLACKLISTER_H -#include +#include namespace Kopete { @@ -51,10 +51,10 @@ public: * Create an instance, and read the blacklist from disk if it exists. * @param protocolId is the ID of the protocol owning accountId * @param accountId is the ID of the owning Account. - * @param parent The QObject parent for this class. - * @param name The QObject name for this class. + * @param parent The TQObject parent for this class. + * @param name The TQObject name for this class. */ - BlackLister( const QString &protocolId, const QString &accountId, QObject *parent = 0, const char *name = 0 ); + BlackLister( const TQString &protocolId, const TQString &accountId, TQObject *parent = 0, const char *name = 0 ); ~BlackLister(); /** @@ -65,7 +65,7 @@ public: /** * \return @c true if the contact with ID @p contactId is blocked, @c false otherwise. */ - bool isBlocked( const QString &contactId ); + bool isBlocked( const TQString &contactId ); public slots: /** @@ -74,7 +74,7 @@ public slots: * This function emits the @ref contactAdded() signal. * @param contactId is the ID of the contact to be added to the list. */ - void addContact( const QString &contactId ); + void addContact( const TQString &contactId ); /** * @overload @@ -93,7 +93,7 @@ public slots: /** * @overload */ - void removeContact( const QString &contactId ); + void removeContact( const TQString &contactId ); signals: /** @@ -102,7 +102,7 @@ signals: * Connect to this signal if you want to perform additional actions, * and you prefer not to derive from this class. */ - void contactAdded( const QString &contactId ); + void contactAdded( const TQString &contactId ); /** * \brief A contact has been removed from the list @@ -110,7 +110,7 @@ signals: * Connect to this signal if you want to perform additional actions, * and you prefer not to derive from this class. */ - void contactRemoved( const QString &contactId ); + void contactRemoved( const TQString &contactId ); private: void saveToDisk(); diff --git a/kopete/libkopete/kopetechatsession.cpp b/kopete/libkopete/kopetechatsession.cpp index 9ebf1d07..91866cce 100644 --- a/kopete/libkopete/kopetechatsession.cpp +++ b/kopete/libkopete/kopetechatsession.cpp @@ -22,8 +22,8 @@ #include "kopetechatsession.h" -#include -#include +#include +#include #include #include @@ -49,14 +49,14 @@ class KMMPrivate public: Kopete::ContactPtrList mContactList; const Kopete::Contact *mUser; - QMap contactStatus; + TQMap contactStatus; Kopete::Protocol *mProtocol; bool isEmpty; bool mCanBeDeleted; unsigned int refcount; bool customDisplayName; - QDateTime awayTime; - QString displayName; + TQDateTime awayTime; + TQString displayName; KopeteView *view; bool mayInvite; Kopete::MessageHandlerChain::Ptr chains[3]; @@ -64,7 +64,7 @@ public: Kopete::ChatSession::ChatSession( const Kopete::Contact *user, Kopete::ContactPtrList others, Kopete::Protocol *protocol, const char *name ) -: QObject( user->account(), name ) +: TQObject( user->account(), name ) { d = new KMMPrivate; d->mUser = user; @@ -79,11 +79,11 @@ Kopete::ChatSession::ChatSession( const Kopete::Contact *user, for ( Kopete::Contact *c = others.first(); c; c = others.next() ) addContact( c, true ); - connect( user, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), this, - SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + connect( user, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), this, + TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); if( user->metaContact() ) - connect( user->metaContact(), SIGNAL( photoChanged() ), this, SIGNAL( photoChanged() ) ); + connect( user->metaContact(), TQT_SIGNAL( photoChanged() ), this, TQT_SIGNAL( photoChanged() ) ); slotUpdateDisplayName(); } @@ -111,8 +111,8 @@ void Kopete::ChatSession::setContactOnlineStatus( const Kopete::Contact *contact { Kopete::OnlineStatus oldStatus = d->contactStatus[ contact ]; d->contactStatus[ contact ] = status; - disconnect( contact, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); + disconnect( contact, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); emit onlineStatusChanged( (Kopete::Contact*)contact, status, oldStatus ); } @@ -124,7 +124,7 @@ const Kopete::OnlineStatus Kopete::ChatSession::contactOnlineStatus( const Kopet return contact->onlineStatus(); } -const QString Kopete::ChatSession::displayName() +const TQString Kopete::ChatSession::displayName() { if ( d->displayName.isNull() ) { @@ -134,7 +134,7 @@ const QString Kopete::ChatSession::displayName() return d->displayName; } -void Kopete::ChatSession::setDisplayName( const QString &newName ) +void Kopete::ChatSession::setDisplayName( const TQString &newName ) { d->displayName = newName; d->customDisplayName = true; @@ -152,17 +152,17 @@ void Kopete::ChatSession::slotUpdateDisplayName() if ( !c ) return; - d->displayName=QString::null; + d->displayName=TQString::null; do { if(! d->displayName.isNull() ) - d->displayName.append( QString::fromLatin1( ", " ) ) ; + d->displayName.append( TQString::fromLatin1( ", " ) ) ; if ( c->metaContact() ) d->displayName.append( c->metaContact()->displayName() ); else { - QString nick=c->property(Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString nick=c->property(Kopete::Global::Properties::self()->nickName()).value().toString(); d->displayName.append( nick.isEmpty() ? c->contactId() : nick ); } c=d->mContactList.next(); @@ -171,7 +171,7 @@ void Kopete::ChatSession::slotUpdateDisplayName() //If we have only 1 contact, add the status of him if ( d->mContactList.count() == 1 ) { - d->displayName.append( QString::fromLatin1( " (%1)" ).arg( d->mContactList.first()->onlineStatus().description() ) ); + d->displayName.append( TQString::fromLatin1( " (%1)" ).arg( d->mContactList.first()->onlineStatus().description() ) ); } emit displayNameChanged(); @@ -248,7 +248,7 @@ void Kopete::ChatSession::sendMessage( Kopete::Message &message ) emit messageSent( sentMessage, this ); if ( !account()->isAway() || KopetePrefs::prefs()->soundIfAway() ) { - KNotification::event(QString::fromLatin1( "kopete_outgoing" ), i18n( "Outgoing Message Sent" ) ); + KNotification::event(TQString::fromLatin1( "kopete_outgoing" ), i18n( "Outgoing Message Sent" ) ); } } else @@ -264,7 +264,7 @@ void Kopete::ChatSession::messageSucceeded() void Kopete::ChatSession::emitNudgeNotification() { - KNotification::event( QString::fromLatin1("buzz_nudge"), i18n("A contact sent you a buzz/nudge.") ); + KNotification::event( TQString::fromLatin1("buzz_nudge"), i18n("A contact sent you a buzz/nudge.") ); } void Kopete::ChatSession::appendMessage( Kopete::Message &msg ) @@ -273,9 +273,9 @@ void Kopete::ChatSession::appendMessage( Kopete::Message &msg ) if ( msg.direction() == Kopete::Message::Inbound ) { - QString nick=myself()->property(Kopete::Global::Properties::self()->nickName()).value().toString(); + TQString nick=myself()->property(Kopete::Global::Properties::self()->nickName()).value().toString(); if ( KopetePrefs::prefs()->highlightEnabled() && !nick.isEmpty() && - msg.plainBody().contains( QRegExp( QString::fromLatin1( "\\b(%1)\\b" ).arg( nick ), false ) ) ) + msg.plainBody().contains( TQRegExp( TQString::fromLatin1( "\\b(%1)\\b" ).arg( nick ), false ) ) ) { msg.setImportance( Kopete::Message::Highlight ); } @@ -320,18 +320,18 @@ void Kopete::ChatSession::addContact( const Kopete::Contact *c, bool suppress ) d->mContactList.remove( old ); d->mContactList.append( c ); - disconnect( old, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); + disconnect( old, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); if ( old->metaContact() ) { - disconnect( old->metaContact(), SIGNAL( displayNameChanged( const QString &, const QString & ) ), this, SLOT( slotUpdateDisplayName() ) ); - disconnect( old->metaContact(), SIGNAL( photoChanged() ), this, SIGNAL( photoChanged() ) ); + disconnect( old->metaContact(), TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); + disconnect( old->metaContact(), TQT_SIGNAL( photoChanged() ), this, TQT_SIGNAL( photoChanged() ) ); } else - disconnect( old, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), this, SLOT( slotUpdateDisplayName() ) ); + disconnect( old, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); emit contactAdded( c, suppress ); - emit contactRemoved( old, QString::null ); + emit contactRemoved( old, TQString::null ); } else { @@ -339,24 +339,24 @@ void Kopete::ChatSession::addContact( const Kopete::Contact *c, bool suppress ) emit contactAdded( c, suppress ); } - connect( c, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); + connect( c, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); ; if ( c->metaContact() ) { - connect( c->metaContact(), SIGNAL( displayNameChanged( const QString &, const QString & ) ), this, SLOT( slotUpdateDisplayName() ) ); - connect( c->metaContact(), SIGNAL( photoChanged() ), this, SIGNAL( photoChanged() ) ); + connect( c->metaContact(), TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); + connect( c->metaContact(), TQT_SIGNAL( photoChanged() ), this, TQT_SIGNAL( photoChanged() ) ); } else - connect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), this, SLOT( slotUpdateDisplayName() ) ); - connect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), this, SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); + connect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); + connect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), this, TQT_SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); slotUpdateDisplayName(); } d->isEmpty = false; } -void Kopete::ChatSession::removeContact( const Kopete::Contact *c, const QString& reason, Kopete::Message::MessageFormat format, bool suppressNotification ) +void Kopete::ChatSession::removeContact( const Kopete::Contact *c, const TQString& reason, Kopete::Message::MessageFormat format, bool suppressNotification ) { kdDebug( 14010 ) << k_funcinfo << endl; if ( !c || !d->mContactList.contains( c ) ) @@ -371,17 +371,17 @@ void Kopete::ChatSession::removeContact( const Kopete::Contact *c, const QString { d->mContactList.remove( c ); - disconnect( c, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); + disconnect( c, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotOnlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) ) ); if ( c->metaContact() ) { - disconnect( c->metaContact(), SIGNAL( displayNameChanged( const QString &, const QString & ) ), this, SLOT( slotUpdateDisplayName() ) ); - disconnect( c->metaContact(), SIGNAL( photoChanged() ), this, SIGNAL( photoChanged() ) ); + disconnect( c->metaContact(), TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); + disconnect( c->metaContact(), TQT_SIGNAL( photoChanged() ), this, TQT_SIGNAL( photoChanged() ) ); } else - disconnect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), this, SLOT( slotUpdateDisplayName() ) ); - disconnect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), this, SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); + disconnect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), this, TQT_SLOT( slotUpdateDisplayName() ) ); + disconnect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), this, TQT_SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); slotUpdateDisplayName(); } @@ -396,7 +396,7 @@ void Kopete::ChatSession::receivedTypingMsg( const Kopete::Contact *c, bool t ) emit remoteTyping( c, t ); } -void Kopete::ChatSession::receivedTypingMsg( const QString &contactId, bool t ) +void Kopete::ChatSession::receivedTypingMsg( const TQString &contactId, bool t ) { for ( Kopete::Contact *it = d->mContactList.first(); it; it = d->mContactList.next() ) { @@ -413,7 +413,7 @@ void Kopete::ChatSession::typing( bool t ) emit myselfTyping( t ); } -void Kopete::ChatSession::receivedEventNotification( const QString& notificationText) +void Kopete::ChatSession::receivedEventNotification( const TQString& notificationText) { emit eventNotification( notificationText ); } @@ -436,14 +436,14 @@ void Kopete::ChatSession::deref () deleteLater(); } -KopeteView* Kopete::ChatSession::view( bool canCreate, const QString &requestedPlugin ) +KopeteView* Kopete::ChatSession::view( bool canCreate, const TQString &requestedPlugin ) { if ( !d->view && canCreate ) { d->view = Kopete::ChatSessionManager::self()->createView( this, requestedPlugin ); if ( d->view ) { - connect( d->view->mainWidget(), SIGNAL( closing( KopeteView * ) ), this, SLOT( slotViewDestroyed( ) ) ); + connect( d->view->mainWidget(), TQT_SIGNAL( closing( KopeteView * ) ), this, TQT_SLOT( slotViewDestroyed( ) ) ); } else { @@ -479,7 +479,7 @@ void Kopete::ChatSession::slotContactDestroyed( Kopete::Contact *contact ) // in the best case, we should ask the protocol to recreate a temporary contact. // (remember: the contact may be deleted when the users removes it from the contactlist, or when closing kopete ) d->mContactList.remove( contact ); - emit contactRemoved( contact, QString::null ); + emit contactRemoved( contact, TQString::null ); if ( d->mContactList.isEmpty() ) deleteLater(); @@ -490,7 +490,7 @@ bool Kopete::ChatSession::mayInvite() const return d->mayInvite; } -void Kopete::ChatSession::inviteContact(const QString& ) +void Kopete::ChatSession::inviteContact(const TQString& ) { //default implementation do nothing } diff --git a/kopete/libkopete/kopetechatsession.h b/kopete/libkopete/kopetechatsession.h index 86d5fa64..928ac7d5 100644 --- a/kopete/libkopete/kopetechatsession.h +++ b/kopete/libkopete/kopetechatsession.h @@ -23,9 +23,9 @@ #ifndef __KOPETECHATSESSION_H__ #define __KOPETECHATSESSION_H__ -#include -#include -#include +#include +#include +#include #include @@ -51,8 +51,8 @@ class ChatSessionManager; class MessageHandlerChain; class TemporaryKMMCallbackAppendMessageHandler; -typedef QPtrList ContactPtrList; -typedef QValueList MessageList; +typedef TQPtrList ContactPtrList; +typedef TQValueList MessageList; /** @@ -71,7 +71,7 @@ typedef QValueList MessageList; * so plugins can add childClients of this client to add their own actions in the * chatwindow. */ -class KOPETE_EXPORT ChatSession : public QObject , public KXMLGUIClient +class KOPETE_EXPORT ChatSession : public TQObject , public KXMLGUIClient { // friend class so the object factory can access the protected constructor friend class ChatSessionManager; @@ -114,14 +114,14 @@ public: * * Used for named chats */ - const QString displayName(); + const TQString displayName(); /** * @brief change the displayname * * change the display name of the chat */ - void setDisplayName( const QString &displayName ); + void setDisplayName( const TQString &displayName ); /** * @brief set a specified KOS for specified contact in this KMM @@ -148,7 +148,7 @@ public: * @param requestedPlugin Specifies the view plugin to use if we have to create one. */ // FIXME: canCreate should definitely be an enum and not a bool - Martijn - KopeteView* view( bool canCreate = false, const QString &requestedPlugin = QString::null ); + KopeteView* view( bool canCreate = false, const TQString &requestedPlugin = TQString::null ); /** * says if you may invite contact from the same account to this chat with @ref inviteContact @@ -166,7 +166,7 @@ public: * * the default implementaiton do nothing */ - virtual void inviteContact(const QString &contactId); + virtual void inviteContact(const TQString &contactId); /** * Returns the message handler chain for the message direction @p dir. @@ -216,7 +216,7 @@ signals: /** * @brief a contact is no longer in this chat */ - void contactRemoved( const Kopete::Contact *contact, const QString &reason, Kopete::Message::MessageFormat format = Message::PlainText, bool contactRemoved = false ); + void contactRemoved( const Kopete::Contact *contact, const TQString &reason, Kopete::Message::MessageFormat format = Message::PlainText, bool contactRemoved = false ); /** * @brief a contact in this chat has changed his status @@ -248,7 +248,7 @@ signals: * Signals that a an event has to be displayed in the statusbar. * The chatwindow connects to this signal to update the statusbar. */ - void eventNotification( const QString& notificationText); + void eventNotification( const TQString& notificationText); /** * @brief A contact within the chat session changed his photo. @@ -264,17 +264,17 @@ public slots: /** * Got a typing notification from a user. This is a convenience version - * of the above method that takes a QString contactId instead of a full + * of the above method that takes a TQString contactId instead of a full * Kopete::Contact */ - void receivedTypingMsg( const QString &contactId, bool isTyping = true ); + void receivedTypingMsg( const TQString &contactId, bool isTyping = true ); /** * @brief Got an event notification from a user. * It will emit the signal eventNotification(). Use this slot in your protocols * and plugins to change chatwindow statusBar text. */ - void receivedEventNotification( const QString& notificationText ); + void receivedEventNotification( const TQString& notificationText ); /** * Show a message to the chatwindow, or append it to the queue. @@ -310,7 +310,7 @@ public slots: * @param format The format of the message * @param suppressNotification prevents a notification of the removal in the chat view. See note in @ref addContact */ - void removeContact( const Kopete::Contact *contact, const QString& reason = QString::null, Kopete::Message::MessageFormat format = Message::PlainText, bool suppressNotification = false ); + void removeContact( const Kopete::Contact *contact, const TQString& reason = TQString::null, Kopete::Message::MessageFormat format = Message::PlainText, bool suppressNotification = false ); /** * Set if the KMM will be deleted when the chatwindow is deleted. It is useful if you want diff --git a/kopete/libkopete/kopetechatsessionmanager.cpp b/kopete/libkopete/kopetechatsessionmanager.cpp index 9b7dd489..4805927b 100644 --- a/kopete/libkopete/kopetechatsessionmanager.cpp +++ b/kopete/libkopete/kopetechatsessionmanager.cpp @@ -29,7 +29,7 @@ namespace Kopete { class ChatSessionManager::Private { public: - QValueList sessions; + TQValueList sessions; // UI::ChatView *activeView; }; @@ -43,9 +43,9 @@ ChatSessionManager* ChatSessionManager::self() return s_self; } -ChatSessionManager::ChatSessionManager( QObject* parent, +ChatSessionManager::ChatSessionManager( TQObject* parent, const char* name ) - : QObject( parent, name ) + : TQObject( parent, name ) { d=new Private; s_self = this; @@ -54,7 +54,7 @@ ChatSessionManager::ChatSessionManager( QObject* parent, ChatSessionManager::~ChatSessionManager() { s_self = 0L; - QValueListIterator it; + TQValueListIterator it; for ( it=d->sessions.begin() ; it!=d->sessions.end() ; ++it ) { kdDebug( 14010 ) << k_funcinfo << "Unloading KMM: Why this KMM isn't yet unloaded?" << endl; @@ -67,13 +67,13 @@ ChatSession* ChatSessionManager::findChatSession(const Contact *user, ContactPtrList chatContacts, Protocol *protocol) { ChatSession *result = 0L; - QValueList::Iterator it; + TQValueList::Iterator it; for ( it= d->sessions.begin(); it!=d->sessions.end() && !result ; ++it ) { ChatSession* cs=(*it); if ( cs->protocol() == protocol && user == cs->myself() ) { - QPtrList contactlist = cs->members(); + TQPtrList contactlist = cs->members(); // set this to false if chatContacts doesn't contain current cs's contactlist bool halfMatch = true; @@ -128,15 +128,15 @@ void ChatSessionManager::registerChatSession(ChatSession * result) * There's no need for a slot here... just add a public remove() * method and call from KMM's destructor */ - connect( result, SIGNAL( messageAppended( Kopete::Message &, Kopete::ChatSession * ) ), - SIGNAL( aboutToDisplay( Kopete::Message & ) ) ); - connect( result, SIGNAL( messageSent( Kopete::Message &, Kopete::ChatSession * ) ), - SIGNAL( aboutToSend(Kopete::Message & ) ) ); - connect( result, SIGNAL( messageReceived( Kopete::Message &, Kopete::ChatSession * ) ), - SIGNAL( aboutToReceive(Kopete::Message & ) ) ); + connect( result, TQT_SIGNAL( messageAppended( Kopete::Message &, Kopete::ChatSession * ) ), + TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ) ); + connect( result, TQT_SIGNAL( messageSent( Kopete::Message &, Kopete::ChatSession * ) ), + TQT_SIGNAL( aboutToSend(Kopete::Message & ) ) ); + connect( result, TQT_SIGNAL( messageReceived( Kopete::Message &, Kopete::ChatSession * ) ), + TQT_SIGNAL( aboutToReceive(Kopete::Message & ) ) ); - connect( result, SIGNAL(messageAppended( Kopete::Message &, Kopete::ChatSession *) ), - SIGNAL( display( Kopete::Message &, Kopete::ChatSession *) ) ); + connect( result, TQT_SIGNAL(messageAppended( Kopete::Message &, Kopete::ChatSession *) ), + TQT_SIGNAL( display( Kopete::Message &, Kopete::ChatSession *) ) ); emit chatSessionCreated(result); } @@ -148,12 +148,12 @@ void ChatSessionManager::removeSession( ChatSession *session) d->sessions.remove( session ); } -QValueList ChatSessionManager::sessions( ) +TQValueList ChatSessionManager::sessions( ) { return d->sessions; } -KopeteView * ChatSessionManager::createView( ChatSession *kmm , const QString &requestedPlugin ) +KopeteView * ChatSessionManager::createView( ChatSession *kmm , const TQString &requestedPlugin ) { KopeteView *newView = KopeteViewManager::viewManager()->view(kmm,requestedPlugin); if(!newView) @@ -162,17 +162,17 @@ KopeteView * ChatSessionManager::createView( ChatSession *kmm , const QString &r return 0L; } - QObject *viewObject = dynamic_cast(newView); + TQObject *viewObject = dynamic_cast(newView); if(viewObject) { - connect(viewObject, SIGNAL(activated(KopeteView *)), - this, SIGNAL(viewActivated(KopeteView *))); - connect(viewObject, SIGNAL(closing(KopeteView *)), - this, SIGNAL(viewClosing(KopeteView *))); + connect(viewObject, TQT_SIGNAL(activated(KopeteView *)), + this, TQT_SIGNAL(viewActivated(KopeteView *))); + connect(viewObject, TQT_SIGNAL(closing(KopeteView *)), + this, TQT_SIGNAL(viewClosing(KopeteView *))); } else { - kdWarning(14010) << "Failed to cast view to QObject *" << endl; + kdWarning(14010) << "Failed to cast view to TQObject *" << endl; } emit viewCreated( newView ) ; diff --git a/kopete/libkopete/kopetechatsessionmanager.h b/kopete/libkopete/kopetechatsessionmanager.h index e41eb14d..efabd604 100644 --- a/kopete/libkopete/kopetechatsessionmanager.h +++ b/kopete/libkopete/kopetechatsessionmanager.h @@ -18,10 +18,10 @@ #ifndef KOPETEMESSAGEMANAGERFACTORY_H #define KOPETEMESSAGEMANAGERFACTORY_H -#include -#include -#include -#include +#include +#include +#include +#include #include "kopetechatsession.h" #include "kopetemessage.h" @@ -37,8 +37,8 @@ class Contact; class Protocol; class MessageEvent; -typedef QPtrList ContactPtrList; -typedef QValueList MessageList; +typedef TQPtrList ContactPtrList; +typedef TQValueList MessageList; /** * @author Duncan Mac-Vicar Prett @@ -85,7 +85,7 @@ public: /** * Get a list of all open sessions. */ - QValueList sessions(); + TQValueList sessions(); /** * @internal @@ -97,7 +97,7 @@ public: * create a new view for the manager. * only the manager should call this function */ - KopeteView *createView( Kopete::ChatSession * , const QString &requestedPlugin = QString::null ); + KopeteView *createView( Kopete::ChatSession * , const TQString &requestedPlugin = TQString::null ); /** * Post a new event. this will emit the @ref newEvent signal @@ -175,7 +175,7 @@ public slots: void slotReadMessage(); private: - ChatSessionManager( QObject* parent = 0, const char* name = 0 ); + ChatSessionManager( TQObject* parent = 0, const char* name = 0 ); class Private; Private *d; diff --git a/kopete/libkopete/kopetecommandhandler.cpp b/kopete/libkopete/kopetecommandhandler.cpp index b761ec08..cd4dcd8c 100644 --- a/kopete/libkopete/kopetecommandhandler.cpp +++ b/kopete/libkopete/kopetecommandhandler.cpp @@ -15,14 +15,14 @@ */ #include -#include +#include #include #include #include #include #include #include -#include +#include #include "kopetechatsessionmanager.h" #include "kopeteprotocol.h" @@ -36,36 +36,36 @@ using Kopete::CommandList; -typedef QMap PluginCommandMap; -typedef QMap CommandMap; +typedef TQMap PluginCommandMap; +typedef TQMap CommandMap; typedef QPair ManagerPair; -class KopeteCommandGUIClient : public QObject, public KXMLGUIClient +class KopeteCommandGUIClient : public TQObject, public KXMLGUIClient { public: - KopeteCommandGUIClient( Kopete::ChatSession *manager ) : QObject(manager), KXMLGUIClient(manager) + KopeteCommandGUIClient( Kopete::ChatSession *manager ) : TQObject(manager), KXMLGUIClient(manager) { - setXMLFile( QString::fromLatin1("kopetecommandui.rc") ); + setXMLFile( TQString::fromLatin1("kopetecommandui.rc") ); - QDomDocument doc = domDocument(); - QDomNode menu = doc.documentElement().firstChild().firstChild().firstChild(); + TQDomDocument doc = domDocument(); + TQDomNode menu = doc.documentElement().firstChild().firstChild().firstChild(); CommandList mCommands = Kopete::CommandHandler::commandHandler()->commands( manager->protocol() ); - for( QDictIterator it( mCommands ); it.current(); ++it ) + for( TQDictIterator it( mCommands ); it.current(); ++it ) { KAction *a = static_cast( it.current() ); actionCollection()->insert( a ); - QDomElement newNode = doc.createElement( QString::fromLatin1("Action") ); - newNode.setAttribute( QString::fromLatin1("name"), - QString::fromLatin1( a->name() ) ); + TQDomElement newNode = doc.createElement( TQString::fromLatin1("Action") ); + newNode.setAttribute( TQString::fromLatin1("name"), + TQString::fromLatin1( a->name() ) ); bool added = false; - for( QDomElement n = menu.firstChild().toElement(); + for( TQDomElement n = menu.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { - if( QString::fromLatin1(a->name()) < n.attribute(QString::fromLatin1("name"))) + if( TQString::fromLatin1(a->name()) < n.attribute(TQString::fromLatin1("name"))) { menu.insertBefore( newNode, n ); added = true; @@ -87,14 +87,14 @@ struct CommandHandlerPrivate { PluginCommandMap pluginCommands; Kopete::CommandHandler *s_handler; - QMap processMap; + TQMap processMap; bool inCommand; - QPtrList m_commands; + TQPtrList m_commands; }; CommandHandlerPrivate *Kopete::CommandHandler::p = 0L; -Kopete::CommandHandler::CommandHandler() : QObject( qApp ) +Kopete::CommandHandler::CommandHandler() : TQObject( qApp ) { p->s_handler = this; p->inCommand = false; @@ -103,41 +103,41 @@ Kopete::CommandHandler::CommandHandler() : QObject( qApp ) mCommands.setAutoDelete( true ); p->pluginCommands.insert( this, mCommands ); - registerCommand( this, QString::fromLatin1("help"), SLOT( slotHelpCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("help"), TQT_SLOT( slotHelpCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /help [] - Used to list available commands, or show help for a specified command." ), 0, 1 ); - registerCommand( this, QString::fromLatin1("close"), SLOT( slotCloseCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("close"), TQT_SLOT( slotCloseCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /close - Closes the current view." ) ); // FIXME: What's the difference with /close? The help doesn't explain it - Martijn - registerCommand( this, QString::fromLatin1("part"), SLOT( slotPartCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("part"), TQT_SLOT( slotPartCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /part - Closes the current view." ) ); - registerCommand( this, QString::fromLatin1("clear"), SLOT( slotClearCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("clear"), TQT_SLOT( slotClearCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /clear - Clears the active view's chat buffer." ) ); - //registerCommand( this, QString::fromLatin1("me"), SLOT( slotMeCommand( const QString &, Kopete::ChatSession * ) ), + //registerCommand( this, TQString::fromLatin1("me"), TQT_SLOT( slotMeCommand( const TQString &, Kopete::ChatSession * ) ), // i18n( "USAGE: /me - Formats message as in ' went to the store'." ) ); - registerCommand( this, QString::fromLatin1("away"), SLOT( slotAwayCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("away"), TQT_SLOT( slotAwayCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /away [] - Marks you as away/back for the current account only." ) ); - registerCommand( this, QString::fromLatin1("awayall"), SLOT( slotAwayAllCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("awayall"), TQT_SLOT( slotAwayAllCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /awayall [] - Marks you as away/back for all accounts." ) ); - registerCommand( this, QString::fromLatin1("say"), SLOT( slotSayCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("say"), TQT_SLOT( slotSayCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /say - Say text in this chat. This is the same as just typing a message, but is very " "useful for scripts." ), 1 ); - registerCommand( this, QString::fromLatin1("exec"), SLOT( slotExecCommand( const QString &, Kopete::ChatSession * ) ), + registerCommand( this, TQString::fromLatin1("exec"), TQT_SLOT( slotExecCommand( const TQString &, Kopete::ChatSession * ) ), i18n( "USAGE: /exec [-o] - Executes the specified command and displays the output in the chat buffer. " "If -o is specified, the output is sent to all members of the chat."), 1 ); - connect( Kopete::PluginManager::self(), SIGNAL( pluginLoaded( Kopete::Plugin*) ), - this, SLOT(slotPluginLoaded(Kopete::Plugin*) ) ); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( pluginLoaded( Kopete::Plugin*) ), + this, TQT_SLOT(slotPluginLoaded(Kopete::Plugin*) ) ); - connect( Kopete::ChatSessionManager::self(), SIGNAL( viewCreated( KopeteView * ) ), - this, SLOT( slotViewCreated( KopeteView* ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( viewCreated( KopeteView * ) ), + this, TQT_SLOT( slotViewCreated( KopeteView* ) ) ); } Kopete::CommandHandler::~CommandHandler() @@ -156,45 +156,45 @@ Kopete::CommandHandler *Kopete::CommandHandler::commandHandler() return p->s_handler; } -void Kopete::CommandHandler::registerCommand( QObject *parent, const QString &command, const char* handlerSlot, - const QString &help, uint minArgs, int maxArgs, const KShortcut &cut, const QString &pix ) +void Kopete::CommandHandler::registerCommand( TQObject *parent, const TQString &command, const char* handlerSlot, + const TQString &help, uint minArgs, int maxArgs, const KShortcut &cut, const TQString &pix ) { - QString lowerCommand = command.lower(); + TQString lowerCommand = command.lower(); Kopete::Command *mCommand = new Kopete::Command( parent, lowerCommand, handlerSlot, help, - Normal, QString::null, minArgs, maxArgs, cut, pix); + Normal, TQString::null, minArgs, maxArgs, cut, pix); p->pluginCommands[ parent ].insert( lowerCommand, mCommand ); } -void Kopete::CommandHandler::unregisterCommand( QObject *parent, const QString &command ) +void Kopete::CommandHandler::unregisterCommand( TQObject *parent, const TQString &command ) { if( p->pluginCommands[ parent ].find(command) ) p->pluginCommands[ parent ].remove( command ); } -void Kopete::CommandHandler::registerAlias( QObject *parent, const QString &alias, const QString &formatString, - const QString &help, CommandType type, uint minArgs, int maxArgs, const KShortcut &cut, const QString &pix ) +void Kopete::CommandHandler::registerAlias( TQObject *parent, const TQString &alias, const TQString &formatString, + const TQString &help, CommandType type, uint minArgs, int maxArgs, const KShortcut &cut, const TQString &pix ) { - QString lowerAlias = alias.lower(); + TQString lowerAlias = alias.lower(); Kopete::Command *mCommand = new Kopete::Command( parent, lowerAlias, 0L, help, type, formatString, minArgs, maxArgs, cut, pix ); p->pluginCommands[ parent ].insert( lowerAlias, mCommand ); } -void Kopete::CommandHandler::unregisterAlias( QObject *parent, const QString &alias ) +void Kopete::CommandHandler::unregisterAlias( TQObject *parent, const TQString &alias ) { if( p->pluginCommands[ parent ].find(alias) ) p->pluginCommands[ parent ].remove( alias ); } -bool Kopete::CommandHandler::processMessage( const QString &msg, Kopete::ChatSession *manager ) +bool Kopete::CommandHandler::processMessage( const TQString &msg, Kopete::ChatSession *manager ) { if( p->inCommand ) return false; - QRegExp splitRx( QString::fromLatin1("^/([\\S]+)(.*)") ); - QString command; - QString args; + TQRegExp splitRx( TQString::fromLatin1("^/([\\S]+)(.*)") ); + TQString command; + TQString args; if(splitRx.search(msg) != -1) { command = splitRx.cap(1); @@ -222,21 +222,21 @@ bool Kopete::CommandHandler::processMessage( const QString &msg, Kopete::ChatSes bool Kopete::CommandHandler::processMessage( Kopete::Message &msg, Kopete::ChatSession *manager ) { - QString messageBody = msg.plainBody(); + TQString messageBody = msg.plainBody(); return processMessage( messageBody, manager ); } -void Kopete::CommandHandler::slotHelpCommand( const QString &args, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotHelpCommand( const TQString &args, Kopete::ChatSession *manager ) { - QString output; + TQString output; if( args.isEmpty() ) { int commandCount = 0; output = i18n( "Available Commands:\n" ); CommandList mCommands = commands( manager->myself()->protocol() ); - QDictIterator it( mCommands ); + TQDictIterator it( mCommands ); for( ; it.current(); ++it ) { output.append( it.current()->command().upper() + '\t' ); @@ -250,7 +250,7 @@ void Kopete::CommandHandler::slotHelpCommand( const QString &args, Kopete::ChatS } else { - QString command = parseArguments( args ).front().lower(); + TQString command = parseArguments( args ).front().lower(); Kopete::Command *c = commands( manager->myself()->protocol() )[ command ]; if( c && !c->help().isNull() ) output = c->help(); @@ -262,7 +262,7 @@ void Kopete::CommandHandler::slotHelpCommand( const QString &args, Kopete::ChatS manager->appendMessage(msg); } -void Kopete::CommandHandler::slotSayCommand( const QString &args, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotSayCommand( const TQString &args, Kopete::ChatSession *manager ) { //Just say whatever is passed Kopete::Message msg(manager->myself(), manager->members(), args, @@ -270,23 +270,23 @@ void Kopete::CommandHandler::slotSayCommand( const QString &args, Kopete::ChatSe manager->sendMessage(msg); } -void Kopete::CommandHandler::slotExecCommand( const QString &args, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotExecCommand( const TQString &args, Kopete::ChatSession *manager ) { if( !args.isEmpty() ) { KProcess *proc = 0L; - if ( kapp->authorize( QString::fromLatin1( "shell_access" ) ) ) + if ( kapp->authorize( TQString::fromLatin1( "shell_access" ) ) ) proc = new KProcess(manager); if( proc ) { - *proc << QString::fromLatin1("sh") << QString::fromLatin1("-c"); + *proc << TQString::fromLatin1("sh") << TQString::fromLatin1("-c"); - QStringList argsList = parseArguments( args ); - if( argsList.front() == QString::fromLatin1("-o") ) + TQStringList argsList = parseArguments( args ); + if( argsList.front() == TQString::fromLatin1("-o") ) { p->processMap.insert( proc, ManagerPair(manager, Kopete::Message::Outbound) ); - *proc << args.section(QRegExp(QString::fromLatin1("\\s+")), 1); + *proc << args.section(TQRegExp(TQString::fromLatin1("\\s+")), 1); } else { @@ -294,8 +294,8 @@ void Kopete::CommandHandler::slotExecCommand( const QString &args, Kopete::ChatS *proc << args; } - connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(slotExecReturnedData(KProcess *, char *, int))); - connect(proc, SIGNAL(receivedStderr(KProcess *, char *, int)), this, SLOT(slotExecReturnedData(KProcess *, char *, int))); + connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(slotExecReturnedData(KProcess *, char *, int))); + connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(slotExecReturnedData(KProcess *, char *, int))); proc->start( KProcess::NotifyOnExit, KProcess::AllOutput ); } else @@ -308,19 +308,19 @@ void Kopete::CommandHandler::slotExecCommand( const QString &args, Kopete::ChatS } } -void Kopete::CommandHandler::slotClearCommand( const QString &, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotClearCommand( const TQString &, Kopete::ChatSession *manager ) { if( manager->view() ) manager->view()->clear(); } -void Kopete::CommandHandler::slotPartCommand( const QString &, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotPartCommand( const TQString &, Kopete::ChatSession *manager ) { if( manager->view() ) manager->view()->closeView(); } -void Kopete::CommandHandler::slotAwayCommand( const QString &args, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotAwayCommand( const TQString &args, Kopete::ChatSession *manager ) { bool goAway = !manager->account()->isAway(); @@ -330,7 +330,7 @@ void Kopete::CommandHandler::slotAwayCommand( const QString &args, Kopete::ChatS manager->account()->setAway( goAway, args ); } -void Kopete::CommandHandler::slotAwayAllCommand( const QString &args, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotAwayAllCommand( const TQString &args, Kopete::ChatSession *manager ) { if( manager->account()->isAway() ) Kopete::AccountManager::self()->setAvailableAll(); @@ -344,7 +344,7 @@ void Kopete::CommandHandler::slotAwayAllCommand( const QString &args, Kopete::Ch } } -void Kopete::CommandHandler::slotCloseCommand( const QString &, Kopete::ChatSession *manager ) +void Kopete::CommandHandler::slotCloseCommand( const TQString &, Kopete::ChatSession *manager ) { if( manager->view() ) manager->view()->closeView(); @@ -353,7 +353,7 @@ void Kopete::CommandHandler::slotCloseCommand( const QString &, Kopete::ChatSess void Kopete::CommandHandler::slotExecReturnedData(KProcess *proc, char *buff, int bufflen ) { kdDebug(14010) << k_funcinfo << endl; - QString buffer = QString::fromLocal8Bit( buff, bufflen ); + TQString buffer = TQString::fromLocal8Bit( buff, bufflen ); ManagerPair mgrPair = p->processMap[ proc ]; Kopete::Message msg( mgrPair.first->myself(), mgrPair.first->members(), buffer, mgrPair.second, Kopete::Message::PlainText ); if( mgrPair.second == Kopete::Message::Outbound ) @@ -368,10 +368,10 @@ void Kopete::CommandHandler::slotExecFinished(KProcess *proc) p->processMap.remove( proc ); } -QStringList Kopete::CommandHandler::parseArguments( const QString &args ) +TQStringList Kopete::CommandHandler::parseArguments( const TQString &args ) { - QStringList arguments; - QRegExp quotedArgs( QString::fromLatin1("\"(.*)\"") ); + TQStringList arguments; + TQRegExp quotedArgs( TQString::fromLatin1("\"(.*)\"") ); quotedArgs.setMinimal( true ); if ( quotedArgs.search( args ) != -1 ) @@ -380,14 +380,14 @@ QStringList Kopete::CommandHandler::parseArguments( const QString &args ) arguments.append( quotedArgs.cap(i) ); } - QStringList otherArgs = QStringList::split( QRegExp(QString::fromLatin1("\\s+")), args.section( quotedArgs, 0 ) ); - for( QStringList::Iterator it = otherArgs.begin(); it != otherArgs.end(); ++it ) + TQStringList otherArgs = TQStringList::split( TQRegExp(TQString::fromLatin1("\\s+")), args.section( quotedArgs, 0 ) ); + for( TQStringList::Iterator it = otherArgs.begin(); it != otherArgs.end(); ++it ) arguments.append( *it ); return arguments; } -bool Kopete::CommandHandler::commandHandled( const QString &command ) +bool Kopete::CommandHandler::commandHandled( const TQString &command ) { for( PluginCommandMap::Iterator it = p->pluginCommands.begin(); it != p->pluginCommands.end(); ++it ) { @@ -398,7 +398,7 @@ bool Kopete::CommandHandler::commandHandled( const QString &command ) return false; } -bool Kopete::CommandHandler::commandHandledByProtocol( const QString &command, Kopete::Protocol *protocol ) +bool Kopete::CommandHandler::commandHandledByProtocol( const TQString &command, Kopete::Protocol *protocol ) { // Make sure the protocol is not NULL if(!protocol) @@ -406,7 +406,7 @@ bool Kopete::CommandHandler::commandHandledByProtocol( const QString &command, K // Fetch the commands for the protocol CommandList commandList = commands( protocol ); - QDictIterator it ( commandList ); + TQDictIterator it ( commandList ); // Loop through commands and check if they match the supplied command for( ; it.current(); ++it ) @@ -453,7 +453,7 @@ CommandList Kopete::CommandHandler::commands( Kopete::Protocol *protocol ) void Kopete::CommandHandler::addCommands( CommandList &from, CommandList &to, CommandType type ) { - QDictIterator itDict( from ); + TQDictIterator itDict( from ); for( ; itDict.current(); ++itDict ) { if( !to[ itDict.currentKey() ] && @@ -469,17 +469,17 @@ void Kopete::CommandHandler::slotViewCreated( KopeteView *view ) void Kopete::CommandHandler::slotPluginLoaded( Kopete::Plugin *plugin ) { - connect( plugin, SIGNAL( destroyed( QObject * ) ), this, SLOT( slotPluginDestroyed( QObject * ) ) ); + connect( plugin, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( slotPluginDestroyed( TQObject * ) ) ); if( !p->pluginCommands.contains( plugin ) ) { - //Create a QDict optomized for a larger # of commands, and case insensitive + //Create a TQDict optomized for a larger # of commands, and case insensitive CommandList mCommands(31, false); mCommands.setAutoDelete( true ); p->pluginCommands.insert( plugin, mCommands ); } } -void Kopete::CommandHandler::slotPluginDestroyed( QObject *plugin ) +void Kopete::CommandHandler::slotPluginDestroyed( TQObject *plugin ) { p->pluginCommands.remove( static_cast(plugin) ); } diff --git a/kopete/libkopete/kopetecommandhandler.h b/kopete/libkopete/kopetecommandhandler.h index f763ace6..9632f872 100644 --- a/kopete/libkopete/kopetecommandhandler.h +++ b/kopete/libkopete/kopetecommandhandler.h @@ -17,7 +17,7 @@ #ifndef _KOPETECOMMANDHANDLER_H_ #define _KOPETECOMMANDHANDLER_H_ -#include +#include #include #include "kopetemessage.h" @@ -38,7 +38,7 @@ class Plugin; class Protocol; class Command; -typedef QDict CommandList; +typedef TQDict CommandList; /** * @author Jason Keirstead @@ -76,7 +76,7 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param parent The plugin who owns this command * @param command The command we want to handle, not including the '/' * @param handlerSlot The slot used to handle the command. This slot must - * accept two parameters, a QString of arguments, and a Kopete::ChatSession + * accept two parameters, a TQString of arguments, and a Kopete::ChatSession * pointer to the manager under which the command was sent. * @param help An optional help string to be shown when the user uses * /help \ @@ -85,9 +85,9 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param cut a default keyboard shortcut * @param pix icon name, the icon will be shown in menus */ - void registerCommand( QObject *parent, const QString &command, const char* handlerSlot, - const QString &help = QString::null, uint minArgs = 0, int maxArgs = -1, - const KShortcut &cut = 0, const QString &pix = QString::null ); + void registerCommand( TQObject *parent, const TQString &command, const char* handlerSlot, + const TQString &help = TQString::null, uint minArgs = 0, int maxArgs = -1, + const KShortcut &cut = 0, const TQString &pix = TQString::null ); /** * \brief Register a command alias. @@ -106,15 +106,15 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param cut a default keyboard shortcut * @param pix icon name, the icon will be shown in menus */ - void registerAlias( QObject *parent, - const QString &alias, - const QString &formatString, - const QString &help = QString::null, + void registerAlias( TQObject *parent, + const TQString &alias, + const TQString &formatString, + const TQString &help = TQString::null, CommandType = SystemAlias, uint minArgs = 0, int maxArgs = -1, const KShortcut &cut = 0, - const QString &pix = QString::null ); + const TQString &pix = TQString::null ); /** * \brief Unregister a command. @@ -126,16 +126,16 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param parent The plugin who owns this command * @param command The command to unload */ - void unregisterCommand( QObject *parent, const QString &command ); + void unregisterCommand( TQObject *parent, const TQString &command ); /** * \brief Unregister an alias. * - * \see unregisterCommand( QObject *parent, const QString &command ) + * \see unregisterCommand( TQObject *parent, const TQString &command ) * @param parent The plugin who owns this alias * @param alias The alais to unload */ - void unregisterAlias( QObject *parent, const QString &alias ); + void unregisterAlias( TQObject *parent, const TQString &alias ); /** * \brief Process a message to see if any commands should be handled @@ -150,17 +150,17 @@ class KOPETE_EXPORT CommandHandler : public QObject * \brief Process a message to see if any commands should be handled * * \see processMessage( Kopete::Message &msg, Kopete::ChatSession *manager) - * \param msg A QString contain the message + * \param msg A TQString contain the message * \param manager the Kopete::ChatSession who will own the message * \return true if the command was handled, false if the command was not handled. */ - bool processMessage( const QString &msg, ChatSession *manager ); + bool processMessage( const TQString &msg, ChatSession *manager ); /** - * Parses a string of command arguments into a QStringList. Quoted + * Parses a string of command arguments into a TQStringList. Quoted * blocks within the arguments string are treated as one argument. */ - static QStringList parseArguments( const QString &args ); + static TQStringList parseArguments( const TQString &args ); /** * \brief Check if a command is already handled @@ -168,7 +168,7 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param command The command to check * @return True if the command is already being handled, False if not */ - bool commandHandled( const QString &command ); + bool commandHandled( const TQString &command ); /** * \brief Check if a command is already handled by a spesific protocol @@ -177,24 +177,24 @@ class KOPETE_EXPORT CommandHandler : public QObject * @param protocol The protocol to check * @return True if the command is already being handled, False if not */ - bool commandHandledByProtocol( const QString &command, Protocol *protocol); + bool commandHandledByProtocol( const TQString &command, Protocol *protocol); private slots: void slotPluginLoaded( Kopete::Plugin * ); - void slotPluginDestroyed( QObject * ); + void slotPluginDestroyed( TQObject * ); void slotExecReturnedData(KProcess *proc, char *buff, int bufflen ); void slotExecFinished(KProcess *proc); void slotViewCreated( KopeteView *view ); - void slotHelpCommand( const QString & args, Kopete::ChatSession *manager ); - void slotClearCommand( const QString & args, Kopete::ChatSession *manager ); - void slotPartCommand( const QString & args, Kopete::ChatSession *manager ); - void slotCloseCommand( const QString & args, Kopete::ChatSession *manager ); - //void slotMeCommand( const QString & args, Kopete::ChatSession *manager ); - void slotExecCommand( const QString & args, Kopete::ChatSession *manager ); - void slotAwayCommand( const QString & args, Kopete::ChatSession *manager ); - void slotAwayAllCommand( const QString & args, Kopete::ChatSession *manager ); - void slotSayCommand( const QString & args, Kopete::ChatSession *manager ); + void slotHelpCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotClearCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotPartCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotCloseCommand( const TQString & args, Kopete::ChatSession *manager ); + //void slotMeCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotExecCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotAwayCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotAwayAllCommand( const TQString & args, Kopete::ChatSession *manager ); + void slotSayCommand( const TQString & args, Kopete::ChatSession *manager ); private: /** diff --git a/kopete/libkopete/kopetecontact.cpp b/kopete/libkopete/kopetecontact.cpp index 15cb27df..546958ef 100644 --- a/kopete/libkopete/kopetecontact.cpp +++ b/kopete/libkopete/kopetecontact.cpp @@ -19,7 +19,7 @@ #include "kopetecontact.h" -#include +#include #include @@ -47,14 +47,14 @@ #include "kopeteemoticons.h" //For the moving to another metacontact dialog -#include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include -#include +#include +#include +#include namespace Kopete { @@ -68,19 +68,19 @@ public: MetaContact *metaContact; - QString contactId; - QString icon; + TQString contactId; + TQString icon; - QTime idleTimer; + TQTime idleTimer; unsigned long int idleTime; Kopete::ContactProperty::Map properties; }; -Contact::Contact( Account *account, const QString &contactId, - MetaContact *parent, const QString &icon ) - : QObject( parent ) +Contact::Contact( Account *account, const TQString &contactId, + MetaContact *parent, const TQString &icon ) + : TQObject( parent ) { d = new Private; @@ -98,7 +98,7 @@ Contact::Contact( Account *account, const QString &contactId, if ( account ) { account->registerContact( this ); - connect( account, SIGNAL( isConnectedChanged() ), SLOT( slotAccountIsConnectedChanged() ) ); + connect( account, TQT_SIGNAL( isConnectedChanged() ), TQT_SLOT( slotAccountIsConnectedChanged() ) ); } // Need to check this because myself() may have no parent @@ -106,8 +106,8 @@ Contact::Contact( Account *account, const QString &contactId, // (ex: for unit tests or chat window style preview) if( parent && protocol() ) { - connect( parent, SIGNAL( aboutToSave( Kopete::MetaContact * ) ), - protocol(), SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); + connect( parent, TQT_SIGNAL( aboutToSave( Kopete::MetaContact * ) ), + protocol(), TQT_SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); parent->addContact( this ); } @@ -146,7 +146,7 @@ void Contact::setOnlineStatus( const OnlineStatus &status ) if( oldStatus.status() == OnlineStatus::Offline && status.status() != OnlineStatus::Offline ) { - setProperty( globalProps->onlineSince(), QDateTime::currentDateTime() ); + setProperty( globalProps->onlineSince(), TQDateTime::currentDateTime() ); /*kdDebug(14010) << k_funcinfo << "REMOVING lastSeen property for " << d->displayName << endl;*/ removeProperty( globalProps->lastSeen() ); @@ -158,7 +158,7 @@ void Contact::setOnlineStatus( const OnlineStatus &status ) removeProperty( globalProps->onlineSince() ); /*kdDebug(14010) << k_funcinfo << "SETTING lastSeen property for " << d->displayName << endl;*/ - setProperty( globalProps->lastSeen(), QDateTime::currentDateTime() ); + setProperty( globalProps->lastSeen(), TQDateTime::currentDateTime() ); } if ( this == account()->myself() || account()->isConnected() ) @@ -177,7 +177,7 @@ void Contact::slotAccountIsConnectedChanged() } -void Contact::sendFile( const KURL &, const QString &, uint ) +void Contact::sendFile( const KURL &, const TQString &, uint ) { kdWarning( 14010 ) << k_funcinfo << "Plugin " << protocol()->pluginId() << " has enabled file sending, " @@ -199,18 +199,18 @@ KPopupMenu* Contact::popupMenu( ChatSession *manager ) KPopupMenu *menu = new KPopupMenu(); // insert title - QString titleText; - QString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString titleText; + TQString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if( nick.isEmpty() ) - titleText = QString::fromLatin1( "%1 (%2)" ).arg( contactId(), onlineStatus().description() ); + titleText = TQString::fromLatin1( "%1 (%2)" ).arg( contactId(), onlineStatus().description() ); else - titleText = QString::fromLatin1( "%1 <%2> (%3)" ).arg( nick, contactId(), onlineStatus().description() ); + titleText = TQString::fromLatin1( "%1 <%2> (%3)" ).arg( nick, contactId(), onlineStatus().description() ); menu->insertTitle( titleText ); if( metaContact() && metaContact()->isTemporary() && contactId() != account()->myself()->contactId() ) { - KAction *actionAddContact = new KAction( i18n( "&Add to Your Contact List" ), QString::fromLatin1( "add_user" ), - 0, this, SLOT( slotAddContact() ), menu, "actionAddContact" ); + KAction *actionAddContact = new KAction( i18n( "&Add to Your Contact List" ), TQString::fromLatin1( "add_user" ), + 0, this, TQT_SLOT( slotAddContact() ), menu, "actionAddContact" ); actionAddContact->plug( menu ); menu->insertSeparator(); } @@ -219,15 +219,15 @@ KPopupMenu* Contact::popupMenu( ChatSession *manager ) bool reach = account()->isConnected() && isReachable(); bool myself = (this == account()->myself()); - KAction *actionSendMessage = KopeteStdAction::sendMessage( this, SLOT( sendMessage() ), menu, "actionSendMessage" ); + KAction *actionSendMessage = KopeteStdAction::sendMessage( this, TQT_SLOT( sendMessage() ), menu, "actionSendMessage" ); actionSendMessage->setEnabled( reach && !myself ); actionSendMessage->plug( menu ); - KAction *actionChat = KopeteStdAction::chat( this, SLOT( startChat() ), menu, "actionChat" ); + KAction *actionChat = KopeteStdAction::chat( this, TQT_SLOT( startChat() ), menu, "actionChat" ); actionChat->setEnabled( reach && !myself ); actionChat->plug( menu ); - KAction *actionSendFile = KopeteStdAction::sendFile( this, SLOT( sendFile() ), menu, "actionSendFile" ); + KAction *actionSendFile = KopeteStdAction::sendFile( this, TQT_SLOT( sendFile() ), menu, "actionSendFile" ); actionSendFile->setEnabled( reach && d->fileCapable && !myself ); actionSendFile->plug( menu ); @@ -235,7 +235,7 @@ KPopupMenu* Contact::popupMenu( ChatSession *manager ) // through the use of the customContextMenuActions() function // Get the custom actions from the protocols ( pure virtual function ) - QPtrList *customActions = customContextMenuActions( manager ); + TQPtrList *customActions = customContextMenuActions( manager ); if( customActions && !customActions->isEmpty() ) { menu->insertSeparator(); @@ -248,19 +248,19 @@ KPopupMenu* Contact::popupMenu( ChatSession *manager ) menu->insertSeparator(); if( metaContact() && !metaContact()->isTemporary() ) - KopeteStdAction::changeMetaContact( this, SLOT( changeMetaContact() ), menu, "actionChangeMetaContact" )->plug( menu ); + KopeteStdAction::changeMetaContact( this, TQT_SLOT( changeMetaContact() ), menu, "actionChangeMetaContact" )->plug( menu ); - KopeteStdAction::contactInfo( this, SLOT( slotUserInfo() ), menu, "actionUserInfo" )->plug( menu ); + KopeteStdAction::contactInfo( this, TQT_SLOT( slotUserInfo() ), menu, "actionUserInfo" )->plug( menu ); #if 0 //this is not fully implemented yet (and doesn't work). disable for now - Olivier 2005-01-11 if ( account()->isBlocked( d->contactId ) ) - KopeteStdAction::unblockContact( this, SLOT( slotUnblock() ), menu, "actionUnblockContact" )->plug( menu ); + KopeteStdAction::unblockContact( this, TQT_SLOT( slotUnblock() ), menu, "actionUnblockContact" )->plug( menu ); else - KopeteStdAction::blockContact( this, SLOT( slotBlock() ), menu, "actionBlockContact" )->plug( menu ); + KopeteStdAction::blockContact( this, TQT_SLOT( slotBlock() ), menu, "actionBlockContact" )->plug( menu ); #endif if( metaContact() && !metaContact()->isTemporary() ) - KopeteStdAction::deleteContact( this, SLOT( slotDelete() ), menu, "actionDeleteContact" )->plug( menu ); + KopeteStdAction::deleteContact( this, TQT_SLOT( slotDelete() ), menu, "actionDeleteContact" )->plug( menu ); return menu; } @@ -270,19 +270,19 @@ void Contact::changeMetaContact() KDialogBase *moveDialog = new KDialogBase( Kopete::UI::Global::mainWidget(), "moveDialog", true, i18n( "Move Contact" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ); - QVBox *w = new QVBox( moveDialog ); + TQVBox *w = new TQVBox( moveDialog ); w->setSpacing( KDialog::spacingHint() ); Kopete::UI::MetaContactSelectorWidget *selector = new Kopete::UI::MetaContactSelectorWidget(w); selector->setLabelMessage(i18n( "Select the meta contact to which you want to move this contact:" )); // exclude this metacontact as a target metacontact for the move selector->excludeMetaContact( metaContact() ); - QCheckBox *chkCreateNew = new QCheckBox( i18n( "Create a new metacontact for this contact" ), w ); - QWhatsThis::add( chkCreateNew , i18n( "If you select this option, a new metacontact will be created in the top-level group " + TQCheckBox *chkCreateNew = new TQCheckBox( i18n( "Create a new metacontact for this contact" ), w ); + TQWhatsThis::add( chkCreateNew , i18n( "If you select this option, a new metacontact will be created in the top-level group " "with the name of this contact and the contact will be moved to it." ) ); - QObject::connect( chkCreateNew , SIGNAL( toggled(bool) ) , selector , SLOT ( setDisabled(bool) ) ) ; + TQObject::connect( chkCreateNew , TQT_SIGNAL( toggled(bool) ) , selector , TQT_SLOT ( setDisabled(bool) ) ) ; moveDialog->setMainWidget(w); - if( moveDialog->exec() == QDialog::Accepted ) + if( moveDialog->exec() == TQDialog::Accepted ) { Kopete::MetaContact *mc = selector->metaContact(); if(chkCreateNew->isChecked()) @@ -314,14 +314,14 @@ void Contact::setMetaContact( MetaContact *m ) { //only one contact, including this one, that mean the contact will be empty efter the move result = KMessageBox::questionYesNoCancel( Kopete::UI::Global::mainWidget(), i18n( "You are moving the contact `%1' to the meta contact `%2'.\n" "`%3' will be empty afterwards. Do you want to delete this contact?" ) - .arg(contactId(), m ? m->displayName() : QString::null, old->displayName()) - , i18n( "Move Contact" ), KStdGuiItem::del(), i18n( "&Keep" ) , QString::fromLatin1("delete_old_contact_when_move") ); + .arg(contactId(), m ? m->displayName() : TQString::null, old->displayName()) + , i18n( "Move Contact" ), KStdGuiItem::del(), i18n( "&Keep" ) , TQString::fromLatin1("delete_old_contact_when_move") ); if(result==KMessageBox::Cancel) return; } old->removeContact( this ); - disconnect( old, SIGNAL( aboutToSave( Kopete::MetaContact * ) ), - protocol(), SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); + disconnect( old, TQT_SIGNAL( aboutToSave( Kopete::MetaContact * ) ), + protocol(), TQT_SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); if(result==KMessageBox::Yes) { @@ -346,19 +346,19 @@ void Contact::setMetaContact( MetaContact *m ) // between adding completely new contacts (which should be written to kabc) and restoring upon restart // (where no write is needed). KABCPersistence::self()->write( m ); - connect( d->metaContact, SIGNAL( aboutToSave( Kopete::MetaContact * ) ), - protocol(), SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); + connect( d->metaContact, TQT_SIGNAL( aboutToSave( Kopete::MetaContact * ) ), + protocol(), TQT_SLOT( slotMetaContactAboutToSave( Kopete::MetaContact * ) ) ); } sync(); } -void Contact::serialize( QMap &/*serializedData*/, - QMap & /* addressBookData */ ) +void Contact::serialize( TQMap &/*serializedData*/, + TQMap & /* addressBookData */ ) { } -void Contact::serializeProperties(QMap &serializedData) +void Contact::serializeProperties(TQMap &serializedData) { Kopete::ContactProperty::Map::ConstIterator it;// = d->properties.ConstIterator; @@ -367,8 +367,8 @@ void Contact::serializeProperties(QMap &serializedData) if (!it.data().tmpl().persistent()) continue; - QVariant val = it.data().value(); - QString key = QString::fromLatin1("prop_%1_%2").arg(QString::fromLatin1(val.typeName()), it.key()); + TQVariant val = it.data().value(); + TQString key = TQString::fromLatin1("prop_%1_%2").arg(TQString::fromLatin1(val.typeName()), it.key()); serializedData[key] = val.toString(); @@ -376,28 +376,28 @@ void Contact::serializeProperties(QMap &serializedData) } // end serializeProperties() void Contact::deserializeProperties( - QMap &serializedData ) + TQMap &serializedData ) { - QMap::ConstIterator it; + TQMap::ConstIterator it; for ( it=serializedData.begin(); it != serializedData.end(); ++it ) { - QString key = it.key(); + TQString key = it.key(); - if ( !key.startsWith( QString::fromLatin1("prop_") ) ) // avoid parsing other serialized data + if ( !key.startsWith( TQString::fromLatin1("prop_") ) ) // avoid parsing other serialized data continue; - QStringList keyList = QStringList::split( QChar('_'), key, false ); + TQStringList keyList = TQStringList::split( TQChar('_'), key, false ); if( keyList.count() < 3 ) // invalid key, not enough parts in string "prop_X_Y" continue; key = keyList[2]; // overwrite key var with the real key name this property has - QString type( keyList[1] ); // needed for QVariant casting + TQString type( keyList[1] ); // needed for TQVariant casting - QVariant variant( it.data() ); - if( !variant.cast(QVariant::nameToType(type.latin1())) ) + TQVariant variant( it.data() ); + if( !variant.cast(TQVariant::nameToType(type.latin1())) ) { kdDebug(14010) << k_funcinfo << - "Casting QVariant to needed type FAILED" << + "Casting TQVariant to needed type FAILED" << "key=" << key << ", type=" << type << endl; continue; } @@ -425,14 +425,14 @@ bool Contact::isReachable() void Contact::startChat() { - KopeteView *v=manager( CanCreate )->view(true, QString::fromLatin1("kopete_chatwindow") ); + KopeteView *v=manager( CanCreate )->view(true, TQString::fromLatin1("kopete_chatwindow") ); if(v) v->raise(true); } void Contact::sendMessage() { - KopeteView *v=manager( CanCreate )->view(true, QString::fromLatin1("kopete_emailwindow") ); + KopeteView *v=manager( CanCreate )->view(true, TQString::fromLatin1("kopete_emailwindow") ); if(v) v->raise(true); } @@ -458,8 +458,8 @@ void Contact::slotDelete() { if ( KMessageBox::warningContinueCancel( Kopete::UI::Global::mainWidget(), i18n( "Are you sure you want to remove the contact '%1' from your contact list?" ). - arg( d->contactId ), i18n( "Remove Contact" ), KGuiItem(i18n("Remove"), QString::fromLatin1("delete_user") ), - QString::fromLatin1("askRemoveContact"), KMessageBox::Notify | KMessageBox::Dangerous ) + arg( d->contactId ), i18n( "Remove Contact" ), KGuiItem(i18n("Remove"), TQString::fromLatin1("delete_user") ), + TQString::fromLatin1("askRemoveContact"), KMessageBox::Notify | KMessageBox::Dangerous ) == KMessageBox::Continue ) { deleteContact(); @@ -478,7 +478,7 @@ MetaContact * Contact::metaContact() const return d->metaContact; } -QString Contact::contactId() const +TQString Contact::contactId() const { return d->contactId; } @@ -500,23 +500,23 @@ void Contact::sync(unsigned int) /* Default implementation does nothing */ } -QString& Contact::icon() const +TQString& Contact::icon() const { return d->icon; } -void Contact::setIcon( const QString& icon ) +void Contact::setIcon( const TQString& icon ) { d->icon = icon; return; } -QPtrList *Contact::customContextMenuActions() +TQPtrList *Contact::customContextMenuActions() { return 0L; } -QPtrList *Contact::customContextMenuActions( ChatSession * /* manager */ ) +TQPtrList *Contact::customContextMenuActions( ChatSession * /* manager */ ) { return customContextMenuActions(); } @@ -568,17 +568,17 @@ void Contact::setIdleTime( unsigned long int t ) } -QStringList Contact::properties() const +TQStringList Contact::properties() const { return d->properties.keys(); } -bool Contact::hasProperty(const QString &key) const +bool Contact::hasProperty(const TQString &key) const { return d->properties.contains(key); } -const ContactProperty &Contact::property(const QString &key) const +const ContactProperty &Contact::property(const TQString &key) const { if(hasProperty(key)) return d->properties[key]; @@ -597,7 +597,7 @@ const Kopete::ContactProperty &Contact::property( void Contact::setProperty(const Kopete::ContactPropertyTmpl &tmpl, - const QVariant &value) + const TQVariant &value) { if(tmpl.isNull() || tmpl.key().isEmpty()) { @@ -606,13 +606,13 @@ void Contact::setProperty(const Kopete::ContactPropertyTmpl &tmpl, return; } - if(value.isNull() || value.canCast(QVariant::String) && value.toString().isEmpty()) + if(value.isNull() || value.canCast(TQVariant::String) && value.toString().isEmpty()) { removeProperty(tmpl); } else { - QVariant oldValue = property(tmpl.key()).value(); + TQVariant oldValue = property(tmpl.key()).value(); if(oldValue != value) { @@ -629,29 +629,29 @@ void Contact::removeProperty(const Kopete::ContactPropertyTmpl &tmpl) if(!tmpl.isNull() && !tmpl.key().isEmpty()) { - QVariant oldValue = property(tmpl.key()).value(); + TQVariant oldValue = property(tmpl.key()).value(); d->properties.remove(tmpl.key()); - emit propertyChanged(this, tmpl.key(), oldValue, QVariant()); + emit propertyChanged(this, tmpl.key(), oldValue, TQVariant()); } } -QString Contact::toolTip() const +TQString Contact::toolTip() const { Kopete::ContactProperty p; - QString tip; - QStringList shownProps = KopetePrefs::prefs()->toolTipContents(); + TQString tip; + TQStringList shownProps = KopetePrefs::prefs()->toolTipContents(); // -------------------------------------------------------------------------- // Fixed part of tooltip - QString iconName = QString::fromLatin1("kopete-contact-icon:%1:%2:%3") + TQString iconName = TQString::fromLatin1("kopete-contact-icon:%1:%2:%3") .arg( KURL::encode_string( protocol()->pluginId() ), KURL::encode_string( account()->accountId() ), KURL::encode_string( contactId() ) ); // TODO: the nickname should be a configurable properties, like others. -Olivier - QString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if ( nick.isEmpty() ) { tip = i18n( "DISPLAY NAME
     CONTACT STATUS", @@ -671,39 +671,39 @@ QString Contact::toolTip() const // -------------------------------------------------------------------------- // Configurable part of tooltip - for(QStringList::Iterator it=shownProps.begin(); it!=shownProps.end(); ++it) + for(TQStringList::Iterator it=shownProps.begin(); it!=shownProps.end(); ++it) { - if((*it) == QString::fromLatin1("FormattedName")) + if((*it) == TQString::fromLatin1("FormattedName")) { - QString name = formattedName(); + TQString name = formattedName(); if(!name.isEmpty()) { tip += i18n("
    Full Name: FORMATTED NAME", - "
    Full Name: %1").arg(QStyleSheet::escape(name)); + "
    Full Name: %1").arg(TQStyleSheet::escape(name)); } } - else if ((*it) == QString::fromLatin1("FormattedIdleTime")) + else if ((*it) == TQString::fromLatin1("FormattedIdleTime")) { - QString time = formattedIdleTime(); + TQString time = formattedIdleTime(); if(!time.isEmpty()) { tip += i18n("
    Idle: FORMATTED IDLE TIME", "
    Idle: %1").arg(time); } } - else if ((*it) == QString::fromLatin1("homePage")) + else if ((*it) == TQString::fromLatin1("homePage")) { - QString url = property(*it).value().toString(); + TQString url = property(*it).value().toString(); if(!url.isEmpty()) { tip += i18n("
    Home Page: FORMATTED URL", "
    Home Page: %2"). - arg( KURL::encode_string( url ), Kopete::Message::escape( QStyleSheet::escape(url) ) ); + arg( KURL::encode_string( url ), Kopete::Message::escape( TQStyleSheet::escape(url) ) ); } } - else if ((*it) == QString::fromLatin1("awayMessage")) + else if ((*it) == TQString::fromLatin1("awayMessage")) { - QString awaymsg = property(*it).value().toString(); + TQString awaymsg = property(*it).value().toString(); if(!awaymsg.isEmpty()) { tip += i18n("
    Away Message: FORMATTED AWAY MESSAGE", @@ -715,20 +715,20 @@ QString Contact::toolTip() const p = property(*it); if(!p.isNull()) { - QVariant val = p.value(); - QString valueText; + TQVariant val = p.value(); + TQString valueText; switch(val.type()) { - case QVariant::DateTime: + case TQVariant::DateTime: valueText = KGlobal::locale()->formatDateTime(val.toDateTime()); valueText = Kopete::Message::escape( valueText ); break; - case QVariant::Date: + case TQVariant::Date: valueText = KGlobal::locale()->formatDate(val.toDate()); valueText = Kopete::Message::escape( valueText ); break; - case QVariant::Time: + case TQVariant::Time: valueText = KGlobal::locale()->formatTime(val.toTime()); valueText = Kopete::Message::escape( valueText ); break; @@ -745,7 +745,7 @@ QString Contact::toolTip() const tip += i18n("
    PROPERTY LABEL: PROPERTY VALUE", "
    %2: %1"). - arg( valueText, QStyleSheet::escape(p.tmpl().label()) ); + arg( valueText, TQStyleSheet::escape(p.tmpl().label()) ); } } } @@ -753,16 +753,16 @@ QString Contact::toolTip() const return tip; } -QString Kopete::Contact::formattedName() const +TQString Kopete::Contact::formattedName() const { - if( hasProperty(QString::fromLatin1("FormattedName")) ) - return property(QString::fromLatin1("FormattedName")).value().toString(); + if( hasProperty(TQString::fromLatin1("FormattedName")) ) + return property(TQString::fromLatin1("FormattedName")).value().toString(); - QString ret; + TQString ret; Kopete::ContactProperty first, last; - first = property(QString::fromLatin1("firstName")); - last = property(QString::fromLatin1("lastName")); + first = property(TQString::fromLatin1("firstName")); + last = property(TQString::fromLatin1("lastName")); if(!first.isNull()) { if(!last.isNull()) // contact has both first and last name @@ -784,9 +784,9 @@ QString Kopete::Contact::formattedName() const return ret; } -QString Kopete::Contact::formattedIdleTime() const +TQString Kopete::Contact::formattedIdleTime() const { - QString ret; + TQString ret; unsigned long int leftTime = idleTime(); if ( leftTime > 0 ) @@ -837,14 +837,14 @@ void Kopete::Contact::slotUnblock() account()->unblock( d->contactId ); } -void Kopete::Contact::setNickName( const QString &name ) +void Kopete::Contact::setNickName( const TQString &name ) { setProperty( Kopete::Global::Properties::self()->nickName(), name ); } -QString Kopete::Contact::nickName() const +TQString Kopete::Contact::nickName() const { - QString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if( !nick.isEmpty() ) return nick; diff --git a/kopete/libkopete/kopetecontact.h b/kopete/libkopete/kopetecontact.h index 8f02bfc2..e093c5eb 100644 --- a/kopete/libkopete/kopetecontact.h +++ b/kopete/libkopete/kopetecontact.h @@ -20,7 +20,7 @@ #ifndef __KOPETECONTACT_H__ #define __KOPETECONTACT_H__ -#include +#include #include #include #include "kopeteglobal.h" @@ -41,7 +41,7 @@ class OnlineStatus; class Plugin; class Protocol; class Account; -typedef QPtrList GroupList; +typedef TQPtrList GroupList; /** * @author Duncan Mac-Vicar P. @@ -56,16 +56,16 @@ class KOPETE_EXPORT Contact : public QObject Q_OBJECT Q_ENUMS( CanCreateFlags ) - Q_PROPERTY( QString formattedName READ formattedName ) - Q_PROPERTY( QString formattedIdleTime READ formattedIdleTime ) + Q_PROPERTY( TQString formattedName READ formattedName ) + Q_PROPERTY( TQString formattedIdleTime READ formattedIdleTime ) Q_PROPERTY( bool isOnline READ isOnline ) Q_PROPERTY( bool fileCapable READ isFileCapable WRITE setFileCapable ) Q_PROPERTY( bool canAcceptFiles READ canAcceptFiles ) //Q_PROPERTY( bool isReachable READ isReachable ) - Q_PROPERTY( QString contactId READ contactId ) - Q_PROPERTY( QString icon READ icon WRITE setIcon ) - Q_PROPERTY( QString toolTip READ toolTip ) - Q_PROPERTY( QString nickName READ nickName WRITE setNickName ) + Q_PROPERTY( TQString contactId READ contactId ) + Q_PROPERTY( TQString icon READ icon WRITE setIcon ) + Q_PROPERTY( TQString toolTip READ toolTip ) + Q_PROPERTY( TQString nickName READ nickName WRITE setNickName ) //Q_PROPERTY( unsigned long idleTime READ idleTime WRITE setIdleTime ) public: @@ -86,8 +86,8 @@ public: * @param parent is the parent @ref MetaContact this Contact is part of * @param icon is an optional icon */ - Contact( Account *account, const QString &id, MetaContact *parent, - const QString &icon = QString::null ); + Contact( Account *account, const TQString &id, MetaContact *parent, + const TQString &icon = TQString::null ); ~Contact(); @@ -110,7 +110,7 @@ public: * * @return The unique id of the contact */ - QString contactId() const; + TQString contactId() const; /** * \brief Get the protocol that the contact belongs to. @@ -172,17 +172,17 @@ public: * * Most plugins don't need more than these fields, so they only need * to set the address book fields themselves. If you have nothing to - * save at all you can clear the QMap, an empty map is treated as + * save at all you can clear the TQMap, an empty map is treated as * 'nothing to save'. * - * The provided addressBookFields QMap contains the index field as + * The provided addressBookFields TQMap contains the index field as * marked with @ref Plugin::addAddressBookField() with the - * contact id as value. If no index field is available the QMap is + * contact id as value. If no index field is available the TQMap is * simply passed as an empty map. * * @sa Protocol::deserializeContact */ - virtual void serialize( QMap &serializedData, QMap &addressBookData ); + virtual void serialize( TQMap &serializedData, TQMap &addressBookData ); /** * @brief Serialize the contacts persistent properties for storage in the contact list. @@ -192,12 +192,12 @@ public: * In contrary to @ref serialize() this does not need to be reimplemented. * */ - void serializeProperties(QMap &serializedData); + void serializeProperties(TQMap &serializedData); /** * @brief Deserialize the contacts persistent properties */ - void deserializeProperties(QMap &serializedData); + void deserializeProperties(TQMap &serializedData); /** * @brief Get the online status of the contact @@ -222,12 +222,12 @@ public: * @return Collection of menu items to be show on the context menu * @todo if possible, try to use KXMLGUI */ - virtual QPtrList *customContextMenuActions(); + virtual TQPtrList *customContextMenuActions(); /** * @todo What is this function for ? */ - virtual QPtrList *customContextMenuActions( ChatSession *manager ); + virtual TQPtrList *customContextMenuActions( ChatSession *manager ); /** * @brief Get the Context Menu for this contact @@ -288,7 +288,7 @@ public: * If null, the protocol icon need to be used. * The icon is not colored, nor has the status icon overloaded */ - QString& icon() const; + TQString& icon() const; /** * @brief Change the icon to use for this contact @@ -298,7 +298,7 @@ public: * * if you want to go back to the protocol icon, set a null string. */ - void setIcon( const QString& icon ); + void setIcon( const TQString& icon ); /** * \brief Get the time (in seconds) this contact has been idle @@ -322,25 +322,25 @@ public: void setIdleTime(unsigned long int); /** - * @return A QStringList containing all property keys + * @return A TQStringList containing all property keys **/ - QStringList properties() const; + TQStringList properties() const; /** * Check for existance of a certain property stored * using "key". * \param key the property to check for **/ - bool hasProperty(const QString &key) const; + bool hasProperty(const TQString &key) const; /** * \brief Get the value of a property with key "key". * - * If you don't know the type of the returned QVariant, you will need + * If you don't know the type of the returned TQVariant, you will need * to check for it. * \return the value of the property **/ - const Kopete::ContactProperty &property(const QString &key) const; + const Kopete::ContactProperty &property(const TQString &key) const; const Kopete::ContactProperty &property(const Kopete::ContactPropertyTmpl &tmpl) const; /** @@ -350,27 +350,27 @@ public: * taken from this one * @param value The value to store * - * \note Setting a NULL value or an empty QString castable value + * \note Setting a NULL value or an empty TQString castable value * removes the property if it already existed. * Don't abuse this for property-removal, instead use * @ref removeProperty() if you want to remove on purpose. * The Removal is done to clean up the list of properties and to purge them * from UI. **/ - void setProperty(const Kopete::ContactPropertyTmpl &tmpl, const QVariant &value); + void setProperty(const Kopete::ContactPropertyTmpl &tmpl, const TQVariant &value); /** * \brief Convenience method to set the nickName property to the specified value * @param name The nickname to set */ - void setNickName( const QString &name ); + void setNickName( const TQString &name ); /** * \brief Convenience method to retrieve the nickName property. * * This method will return the contactId if there has been no nickName property set */ - QString nickName() const; + TQString nickName() const; /** * \brief Remove a property if it exists @@ -384,20 +384,20 @@ public: * Makes use of formattedName() and formattedIdleTime(). * \return an RTF tooltip depending on KopetePrefs settings **/ - QString toolTip() const; + TQString toolTip() const; /** * Returns a formatted string of "firstName" and/or "lastName" properties * if present. * Suitable for GUI display **/ - QString formattedName() const; + TQString formattedName() const; /** * Returns a formatted string of idleTime(). * Suitable for GUI display **/ - QString formattedIdleTime() const; + TQString formattedIdleTime() const; /** * used in @ref sync() @@ -475,7 +475,7 @@ public slots: * file size (such as over asocket */ virtual void sendFile( const KURL &sourceURL = KURL(), - const QString &fileName = QString::null, uint fileSize = 0L ); + const TQString &fileName = TQString::null, uint fileSize = 0L ); private slots: @@ -532,11 +532,11 @@ signals: * One of the contact's properties has changed. * @param contact this contact, useful for listening to signals from more than one contact * @param key the key whose value has changed - * @param oldValue the value before the change, or an invalid QVariant if the property is new - * @param newValue the value after the change, or an invalid QVariant if the property was removed + * @param oldValue the value before the change, or an invalid TQVariant if the property is new + * @param newValue the value after the change, or an invalid TQVariant if the property was removed */ - void propertyChanged( Kopete::Contact *contact, const QString &key, - const QVariant &oldValue, const QVariant &newValue ); + void propertyChanged( Kopete::Contact *contact, const TQString &key, + const TQVariant &oldValue, const TQVariant &newValue ); protected: virtual void virtual_hook(uint id, void *data); diff --git a/kopete/libkopete/kopetecontactlist.cpp b/kopete/libkopete/kopetecontactlist.cpp index 9aab9f2f..6e33f257 100644 --- a/kopete/libkopete/kopetecontactlist.cpp +++ b/kopete/libkopete/kopetecontactlist.cpp @@ -20,9 +20,9 @@ #include "kopetecontactlist.h" -#include -#include -#include +#include +#include +#include #include #include @@ -51,12 +51,12 @@ class ContactList::Private /** Flag: do not save the contactlist until she is completely loaded */ bool loaded ; - QPtrList contacts; - QPtrList groups; - QPtrList selectedMetaContacts; - QPtrList selectedGroups; + TQPtrList contacts; + TQPtrList groups; + TQPtrList selectedMetaContacts; + TQPtrList selectedGroups; - QTimer *saveTimer; + TQTimer *saveTimer; MetaContact *myself; @@ -80,7 +80,7 @@ ContactList *ContactList::self() } ContactList::ContactList() - : QObject( kapp, "KopeteContactList" ) + : TQObject( kapp, "KopeteContactList" ) { d=new Private; @@ -92,14 +92,14 @@ ContactList::ContactList() d->loaded=false; // automatically save on changes to the list - d->saveTimer = new QTimer( this, "saveTimer" ); - connect( d->saveTimer, SIGNAL( timeout() ), SLOT ( save() ) ); - - connect( this, SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), SLOT( slotSaveLater() ) ); - connect( this, SIGNAL( metaContactRemoved( Kopete::MetaContact * ) ), SLOT( slotSaveLater() ) ); - connect( this, SIGNAL( groupAdded( Kopete::Group * ) ), SLOT( slotSaveLater() ) ); - connect( this, SIGNAL( groupRemoved( Kopete::Group * ) ), SLOT( slotSaveLater() ) ); - connect( this, SIGNAL( groupRenamed( Kopete::Group *, const QString & ) ), SLOT( slotSaveLater() ) ); + d->saveTimer = new TQTimer( this, "saveTimer" ); + connect( d->saveTimer, TQT_SIGNAL( timeout() ), TQT_SLOT ( save() ) ); + + connect( this, TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), TQT_SLOT( slotSaveLater() ) ); + connect( this, TQT_SIGNAL( metaContactRemoved( Kopete::MetaContact * ) ), TQT_SLOT( slotSaveLater() ) ); + connect( this, TQT_SIGNAL( groupAdded( Kopete::Group * ) ), TQT_SLOT( slotSaveLater() ) ); + connect( this, TQT_SIGNAL( groupRemoved( Kopete::Group * ) ), TQT_SLOT( slotSaveLater() ) ); + connect( this, TQT_SIGNAL( groupRenamed( Kopete::Group *, const TQString & ) ), TQT_SLOT( slotSaveLater() ) ); } ContactList::~ContactList() @@ -108,21 +108,21 @@ ContactList::~ContactList() delete d; } -QPtrList ContactList::metaContacts() const +TQPtrList ContactList::metaContacts() const { return d->contacts; } -QPtrList ContactList::groups() const +TQPtrList ContactList::groups() const { return d->groups; } -MetaContact *ContactList::metaContact( const QString &metaContactId ) const +MetaContact *ContactList::metaContact( const TQString &metaContactId ) const { - QPtrListIterator it( d->contacts ); + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { @@ -146,8 +146,8 @@ Group * ContactList::group(unsigned int groupId) const } -Contact *ContactList::findContact( const QString &protocolId, - const QString &accountId, const QString &contactId ) const +Contact *ContactList::findContact( const TQString &protocolId, + const TQString &accountId, const TQString &contactId ) const { //Browsing metacontacts is too slow, better to uses the Dict of the account. Account *i=AccountManager::self()->findAccount(protocolId,accountId); @@ -160,9 +160,9 @@ Contact *ContactList::findContact( const QString &protocolId, } -MetaContact *ContactList::findMetaContactByDisplayName( const QString &displayName ) const +MetaContact *ContactList::findMetaContactByDisplayName( const TQString &displayName ) const { - QPtrListIterator it( d->contacts ); + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { // kdDebug(14010) << "Display Name: " << it.current()->displayName() << "\n"; @@ -174,10 +174,10 @@ MetaContact *ContactList::findMetaContactByDisplayName( const QString &displayNa return 0L; } -MetaContact* ContactList::findMetaContactByContactId( const QString &contactId ) const +MetaContact* ContactList::findMetaContactByContactId( const TQString &contactId ) const { - QPtrList acts=AccountManager::self()->accounts(); - QPtrListIterator it( acts ); + TQPtrList acts=AccountManager::self()->accounts(); + TQPtrListIterator it( acts ); for ( ; it.current(); ++it ) { Contact *c=(*it)->contacts()[contactId]; @@ -187,7 +187,7 @@ MetaContact* ContactList::findMetaContactByContactId( const QString &contactId ) return 0L; } -Group * ContactList::findGroup(const QString& displayName, int type) +Group * ContactList::findGroup(const TQString& displayName, int type) { if( type == Group::Temporary ) return Group::temporary(); @@ -205,12 +205,12 @@ Group * ContactList::findGroup(const QString& displayName, int type) } -QPtrList ContactList::selectedMetaContacts() const +TQPtrList ContactList::selectedMetaContacts() const { return d->selectedMetaContacts; } -QPtrList ContactList::selectedGroups() const +TQPtrList ContactList::selectedGroups() const { return d->selectedGroups; } @@ -224,9 +224,9 @@ void ContactList::addMetaContact( MetaContact *mc ) d->contacts.append( mc ); emit metaContactAdded( mc ); - connect( mc, SIGNAL( persistentDataChanged( ) ), SLOT( slotSaveLater() ) ); - connect( mc, SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), SIGNAL( metaContactAddedToGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); - connect( mc, SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), SIGNAL( metaContactRemovedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); + connect( mc, TQT_SIGNAL( persistentDataChanged( ) ), TQT_SLOT( slotSaveLater() ) ); + connect( mc, TQT_SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), TQT_SIGNAL( metaContactAddedToGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); + connect( mc, TQT_SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), TQT_SIGNAL( metaContactRemovedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ) ); } @@ -245,7 +245,7 @@ void ContactList::removeMetaContact(MetaContact *m) } //removes subcontact from server here and now. - QPtrList cts=m->contacts(); + TQPtrList cts=m->contacts(); for( Contact *c = cts.first(); c; c = cts.next() ) { c->deleteContact(); @@ -263,7 +263,7 @@ void ContactList::addGroup( Group * g ) { d->groups.append( g ); emit groupAdded( g ); - connect( g , SIGNAL ( displayNameChanged(Kopete::Group* , const QString & )) , this , SIGNAL ( groupRenamed(Kopete::Group* , const QString & )) ) ; + connect( g , TQT_SIGNAL ( displayNameChanged(Kopete::Group* , const TQString & )) , this , TQT_SIGNAL ( groupRenamed(Kopete::Group* , const TQString & )) ) ; } } @@ -281,7 +281,7 @@ void ContactList::removeGroup( Group *g ) } -void ContactList::setSelectedItems(QPtrList metaContacts , QPtrList groups) +void ContactList::setSelectedItems(TQPtrList metaContacts , TQPtrList groups) { kdDebug( 14010 ) << k_funcinfo << metaContacts.count() << " metacontacts, " << groups.count() << " groups selected" << endl; d->selectedMetaContacts=metaContacts; @@ -304,11 +304,11 @@ void ContactList::loadGlobalIdentity() if(Kopete::Config::enableGlobalIdentity()) { // Disconnect to make sure it will not cause duplicate calls. - disconnect(myself(), SIGNAL(displayNameChanged(const QString&, const QString&)), this, SLOT(slotDisplayNameChanged())); - disconnect(myself(), SIGNAL(photoChanged()), this, SLOT(slotPhotoChanged())); + disconnect(myself(), TQT_SIGNAL(displayNameChanged(const TQString&, const TQString&)), this, TQT_SLOT(slotDisplayNameChanged())); + disconnect(myself(), TQT_SIGNAL(photoChanged()), this, TQT_SLOT(slotPhotoChanged())); - connect(myself(), SIGNAL(displayNameChanged(const QString&, const QString&)), this, SLOT(slotDisplayNameChanged())); - connect(myself(), SIGNAL(photoChanged()), this, SLOT(slotPhotoChanged())); + connect(myself(), TQT_SIGNAL(displayNameChanged(const TQString&, const TQString&)), this, TQT_SLOT(slotDisplayNameChanged())); + connect(myself(), TQT_SIGNAL(photoChanged()), this, TQT_SLOT(slotPhotoChanged())); // Ensure that the myself metaContactId is always the KABC whoAmI KABC::Addressee a = KABC::StdAddressBook::self()->whoAmI(); @@ -324,8 +324,8 @@ void ContactList::loadGlobalIdentity() } else { - disconnect(myself(), SIGNAL(displayNameChanged(const QString&, const QString&)), this, SLOT(slotDisplayNameChanged())); - disconnect(myself(), SIGNAL(photoChanged()), this, SLOT(slotPhotoChanged())); + disconnect(myself(), TQT_SIGNAL(displayNameChanged(const TQString&, const TQString&)), this, TQT_SLOT(slotDisplayNameChanged())); + disconnect(myself(), TQT_SIGNAL(photoChanged()), this, TQT_SLOT(slotPhotoChanged())); } } @@ -370,7 +370,7 @@ void ContactList::load() { loadXML(); // Apply the global identity when all the protocols plugins are loaded. - connect(PluginManager::self(), SIGNAL(allPluginsLoaded()), this, SLOT(loadGlobalIdentity())); + connect(PluginManager::self(), TQT_SIGNAL(allPluginsLoaded()), this, TQT_SLOT(loadGlobalIdentity())); } void ContactList::loadXML() @@ -378,25 +378,25 @@ void ContactList::loadXML() // don't save when we're in the middle of this... d->loaded = false; - QString filename = locateLocal( "appdata", QString::fromLatin1( "contactlist.xml" ) ); + TQString filename = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) ); if( filename.isEmpty() ) { d->loaded=true; return ; } - QDomDocument contactList( QString::fromLatin1( "kopete-contact-list" ) ); + TQDomDocument contactList( TQString::fromLatin1( "kopete-contact-list" ) ); - QFile contactListFile( filename ); + TQFile contactListFile( filename ); contactListFile.open( IO_ReadOnly ); contactList.setContent( &contactListFile ); - QDomElement list = contactList.documentElement(); + TQDomElement list = contactList.documentElement(); - QString versionString = list.attribute( QString::fromLatin1( "version" ), QString::null ); + TQString versionString = list.attribute( TQString::fromLatin1( "version" ), TQString::null ); uint version = 0; - if( QRegExp( QString::fromLatin1( "[0-9]+\\.[0-9]" ) ).exactMatch( versionString ) ) - version = versionString.replace( QString::fromLatin1( "." ), QString::null ).toUInt(); + if( TQRegExp( TQString::fromLatin1( "[0-9]+\\.[0-9]" ) ).exactMatch( versionString ) ) + version = versionString.replace( TQString::fromLatin1( "." ), TQString::null ).toUInt(); if( version < Private::ContactListVersion ) { @@ -410,7 +410,7 @@ void ContactList::loadXML() convertContactList( filename, version, Private::ContactListVersion ); - contactList = QDomDocument ( QString::fromLatin1( "kopete-contact-list" ) ); + contactList = TQDomDocument ( TQString::fromLatin1( "kopete-contact-list" ) ); contactListFile.open( IO_ReadOnly ); contactList.setContent( &contactListFile ); @@ -420,13 +420,13 @@ void ContactList::loadXML() addGroup( Kopete::Group::topLevel() ); - QDomElement element = list.firstChild().toElement(); + TQDomElement element = list.firstChild().toElement(); while( !element.isNull() ) { - if( element.tagName() == QString::fromLatin1("meta-contact") ) + if( element.tagName() == TQString::fromLatin1("meta-contact") ) { //TODO: id isn't used - //QString id = element.attribute( "id", QString::null ); + //TQString id = element.attribute( "id", TQString::null ); Kopete::MetaContact *metaContact = new Kopete::MetaContact(); if ( !metaContact->fromXML( element ) ) { @@ -439,7 +439,7 @@ void ContactList::loadXML() metaContact ); } } - else if( element.tagName() == QString::fromLatin1("kopete-group") ) + else if( element.tagName() == TQString::fromLatin1("kopete-group") ) { Kopete::Group *group = new Kopete::Group(); if( !group->fromXML( element ) ) @@ -453,7 +453,7 @@ void ContactList::loadXML() } } // Only load myself metacontact information when Global Identity is enabled. - else if( element.tagName() == QString::fromLatin1("myself-meta-contact") && Kopete::Config::enableGlobalIdentity() ) + else if( element.tagName() == TQString::fromLatin1("myself-meta-contact") && Kopete::Config::enableGlobalIdentity() ) { if( !myself()->fromXML( element ) ) { @@ -473,94 +473,94 @@ void ContactList::loadXML() d->loaded=true; } -void ContactList::convertContactList( const QString &fileName, uint /* fromVersion */, uint /* toVersion */ ) +void ContactList::convertContactList( const TQString &fileName, uint /* fromVersion */, uint /* toVersion */ ) { // For now, ignore fromVersion and toVersion. These are meant for future // changes to allow incremental (multi-pass) conversion so we don't have // to rewrite the whole conversion code for each change. - QDomDocument contactList( QString::fromLatin1( "messaging-contact-list" ) ); - QFile contactListFile( fileName ); + TQDomDocument contactList( TQString::fromLatin1( "messaging-contact-list" ) ); + TQFile contactListFile( fileName ); contactListFile.open( IO_ReadOnly ); contactList.setContent( &contactListFile ); - QDomElement oldList = contactList.documentElement(); + TQDomElement oldList = contactList.documentElement(); - QDomDocument newList( QString::fromLatin1( "kopete-contact-list" ) ); - newList.appendChild( newList.createProcessingInstruction( QString::fromLatin1( "xml" ), QString::fromLatin1( "version=\"1.0\"" ) ) ); + TQDomDocument newList( TQString::fromLatin1( "kopete-contact-list" ) ); + newList.appendChild( newList.createProcessingInstruction( TQString::fromLatin1( "xml" ), TQString::fromLatin1( "version=\"1.0\"" ) ) ); - QDomElement newRoot = newList.createElement( QString::fromLatin1( "kopete-contact-list" ) ); + TQDomElement newRoot = newList.createElement( TQString::fromLatin1( "kopete-contact-list" ) ); newList.appendChild( newRoot ); - newRoot.setAttribute( QString::fromLatin1( "version" ), QString::fromLatin1( "1.0" ) ); + newRoot.setAttribute( TQString::fromLatin1( "version" ), TQString::fromLatin1( "1.0" ) ); - QDomNode oldNode = oldList.firstChild(); + TQDomNode oldNode = oldList.firstChild(); while( !oldNode.isNull() ) { - QDomElement oldElement = oldNode.toElement(); + TQDomElement oldElement = oldNode.toElement(); if( !oldElement.isNull() ) { - if( oldElement.tagName() == QString::fromLatin1("meta-contact") ) + if( oldElement.tagName() == TQString::fromLatin1("meta-contact") ) { // Ignore ID, it is not used in the current list anyway - QDomElement newMetaContact = newList.createElement( QString::fromLatin1( "meta-contact" ) ); + TQDomElement newMetaContact = newList.createElement( TQString::fromLatin1( "meta-contact" ) ); newRoot.appendChild( newMetaContact ); // Plugin data is stored completely different, and requires // some bookkeeping to convert properly - QMap pluginData; - QStringList icqData; - QStringList gaduData; + TQMap pluginData; + TQStringList icqData; + TQStringList gaduData; // ICQ and Gadu can only be converted properly if the address book fields // are already parsed. Therefore, scan for those first and add the rest // afterwards - QDomNode oldContactNode = oldNode.firstChild(); + TQDomNode oldContactNode = oldNode.firstChild(); while( !oldContactNode.isNull() ) { - QDomElement oldContactElement = oldContactNode.toElement(); - if( !oldContactElement.isNull() && oldContactElement.tagName() == QString::fromLatin1("address-book-field") ) + TQDomElement oldContactElement = oldContactNode.toElement(); + if( !oldContactElement.isNull() && oldContactElement.tagName() == TQString::fromLatin1("address-book-field") ) { // Convert address book fields. // Jabber will be called "xmpp", Aim/Toc and Aim/Oscar both will // be called "aim". MSN, AIM, IRC, Oscar and SMS don't use address // book fields yet; Gadu and ICQ can be converted as-is. // As Yahoo is unfinished we won't try to convert at all. - QString id = oldContactElement.attribute( QString::fromLatin1( "id" ), QString::null ); - QString data = oldContactElement.text(); - - QString app, key, val; - QString separator = QString::fromLatin1( "," ); - if( id == QString::fromLatin1( "messaging/gadu" ) ) - separator = QString::fromLatin1( "\n" ); - else if( id == QString::fromLatin1( "messaging/icq" ) ) - separator = QString::fromLatin1( ";" ); - else if( id == QString::fromLatin1( "messaging/jabber" ) ) - id = QString::fromLatin1( "messaging/xmpp" ); - - if( id == QString::fromLatin1( "messaging/gadu" ) || id == QString::fromLatin1( "messaging/icq" ) || - id == QString::fromLatin1( "messaging/winpopup" ) || id == QString::fromLatin1( "messaging/xmpp" ) ) + TQString id = oldContactElement.attribute( TQString::fromLatin1( "id" ), TQString::null ); + TQString data = oldContactElement.text(); + + TQString app, key, val; + TQString separator = TQString::fromLatin1( "," ); + if( id == TQString::fromLatin1( "messaging/gadu" ) ) + separator = TQString::fromLatin1( "\n" ); + else if( id == TQString::fromLatin1( "messaging/icq" ) ) + separator = TQString::fromLatin1( ";" ); + else if( id == TQString::fromLatin1( "messaging/jabber" ) ) + id = TQString::fromLatin1( "messaging/xmpp" ); + + if( id == TQString::fromLatin1( "messaging/gadu" ) || id == TQString::fromLatin1( "messaging/icq" ) || + id == TQString::fromLatin1( "messaging/winpopup" ) || id == TQString::fromLatin1( "messaging/xmpp" ) ) { app = id; - key = QString::fromLatin1( "All" ); - val = data.replace( separator, QChar( 0xE000 ) ); + key = TQString::fromLatin1( "All" ); + val = data.replace( separator, TQChar( 0xE000 ) ); } if( !app.isEmpty() ) { - QDomElement addressBookField = newList.createElement( QString::fromLatin1( "address-book-field" ) ); + TQDomElement addressBookField = newList.createElement( TQString::fromLatin1( "address-book-field" ) ); newMetaContact.appendChild( addressBookField ); - addressBookField.setAttribute( QString::fromLatin1( "app" ), app ); - addressBookField.setAttribute( QString::fromLatin1( "key" ), key ); + addressBookField.setAttribute( TQString::fromLatin1( "app" ), app ); + addressBookField.setAttribute( TQString::fromLatin1( "key" ), key ); addressBookField.appendChild( newList.createTextNode( val ) ); // ICQ didn't store the contactId locally, only in the address // book fields, so we need to be able to access it later - if( id == QString::fromLatin1( "messaging/icq" ) ) - icqData = QStringList::split( QChar( 0xE000 ), val ); - else if( id == QString::fromLatin1("messaging/gadu") ) - gaduData = QStringList::split( QChar( 0xE000 ), val ); + if( id == TQString::fromLatin1( "messaging/icq" ) ) + icqData = TQStringList::split( TQChar( 0xE000 ), val ); + else if( id == TQString::fromLatin1("messaging/gadu") ) + gaduData = TQStringList::split( TQChar( 0xE000 ), val ); } } oldContactNode = oldContactNode.nextSibling(); @@ -570,172 +570,172 @@ void ContactList::convertContactList( const QString &fileName, uint /* fromVersi oldContactNode = oldNode.firstChild(); while( !oldContactNode.isNull() ) { - QDomElement oldContactElement = oldContactNode.toElement(); + TQDomElement oldContactElement = oldContactNode.toElement(); if( !oldContactElement.isNull() ) { - if( oldContactElement.tagName() == QString::fromLatin1("display-name") ) + if( oldContactElement.tagName() == TQString::fromLatin1("display-name") ) { - QDomElement displayName = newList.createElement( QString::fromLatin1( "display-name" ) ); + TQDomElement displayName = newList.createElement( TQString::fromLatin1( "display-name" ) ); displayName.appendChild( newList.createTextNode( oldContactElement.text() ) ); newMetaContact.appendChild( displayName ); } - else if( oldContactElement.tagName() == QString::fromLatin1("groups") ) + else if( oldContactElement.tagName() == TQString::fromLatin1("groups") ) { - QDomElement groups = newList.createElement( QString::fromLatin1( "groups" ) ); + TQDomElement groups = newList.createElement( TQString::fromLatin1( "groups" ) ); newMetaContact.appendChild( groups ); - QDomNode oldGroup = oldContactElement.firstChild(); + TQDomNode oldGroup = oldContactElement.firstChild(); while( !oldGroup.isNull() ) { - QDomElement oldGroupElement = oldGroup.toElement(); - if ( oldGroupElement.tagName() == QString::fromLatin1("group") ) + TQDomElement oldGroupElement = oldGroup.toElement(); + if ( oldGroupElement.tagName() == TQString::fromLatin1("group") ) { - QDomElement group = newList.createElement( QString::fromLatin1( "group" ) ); + TQDomElement group = newList.createElement( TQString::fromLatin1( "group" ) ); group.appendChild( newList.createTextNode( oldGroupElement.text() ) ); groups.appendChild( group ); } - else if ( oldGroupElement.tagName() == QString::fromLatin1("top-level") ) + else if ( oldGroupElement.tagName() == TQString::fromLatin1("top-level") ) { - QDomElement group = newList.createElement( QString::fromLatin1( "top-level" ) ); + TQDomElement group = newList.createElement( TQString::fromLatin1( "top-level" ) ); groups.appendChild( group ); } oldGroup = oldGroup.nextSibling(); } } - else if( oldContactElement.tagName() == QString::fromLatin1( "plugin-data" ) ) + else if( oldContactElement.tagName() == TQString::fromLatin1( "plugin-data" ) ) { // Convert the plugin data - QString id = oldContactElement.attribute( QString::fromLatin1( "plugin-id" ), QString::null ); - QString data = oldContactElement.text(); + TQString id = oldContactElement.attribute( TQString::fromLatin1( "plugin-id" ), TQString::null ); + TQString data = oldContactElement.text(); bool convertOldAim = false; uint fieldCount = 1; - QString addressBookLabel; - if( id == QString::fromLatin1("MSNProtocol") ) + TQString addressBookLabel; + if( id == TQString::fromLatin1("MSNProtocol") ) { fieldCount = 3; - addressBookLabel = QString::fromLatin1("msn"); + addressBookLabel = TQString::fromLatin1("msn"); } - else if( id == QString::fromLatin1("IRCProtocol") ) + else if( id == TQString::fromLatin1("IRCProtocol") ) { fieldCount = 3; - addressBookLabel = QString::fromLatin1("irc"); + addressBookLabel = TQString::fromLatin1("irc"); } - else if( id == QString::fromLatin1("OscarProtocol") ) + else if( id == TQString::fromLatin1("OscarProtocol") ) { fieldCount = 2; - addressBookLabel = QString::fromLatin1("aim"); + addressBookLabel = TQString::fromLatin1("aim"); } - else if( id == QString::fromLatin1("AIMProtocol") ) + else if( id == TQString::fromLatin1("AIMProtocol") ) { - id = QString::fromLatin1("OscarProtocol"); + id = TQString::fromLatin1("OscarProtocol"); convertOldAim = true; - addressBookLabel = QString::fromLatin1("aim"); + addressBookLabel = TQString::fromLatin1("aim"); } - else if( id == QString::fromLatin1("ICQProtocol") || id == QString::fromLatin1("WPProtocol") || id == QString::fromLatin1("GaduProtocol") ) + else if( id == TQString::fromLatin1("ICQProtocol") || id == TQString::fromLatin1("WPProtocol") || id == TQString::fromLatin1("GaduProtocol") ) { fieldCount = 1; } - else if( id == QString::fromLatin1("JabberProtocol") ) + else if( id == TQString::fromLatin1("JabberProtocol") ) { fieldCount = 4; } - else if( id == QString::fromLatin1("SMSProtocol") ) + else if( id == TQString::fromLatin1("SMSProtocol") ) { // SMS used a variable serializing using a dot as delimiter. // The minimal count is three though (id, name, delimiter). fieldCount = 2; - addressBookLabel = QString::fromLatin1("sms"); + addressBookLabel = TQString::fromLatin1("sms"); } if( pluginData[ id ].isNull() ) { - pluginData[ id ] = newList.createElement( QString::fromLatin1( "plugin-data" ) ); - pluginData[ id ].setAttribute( QString::fromLatin1( "plugin-id" ), id ); + pluginData[ id ] = newList.createElement( TQString::fromLatin1( "plugin-data" ) ); + pluginData[ id ].setAttribute( TQString::fromLatin1( "plugin-id" ), id ); newMetaContact.appendChild( pluginData[ id ] ); } // Do the actual conversion - if( id == QString::fromLatin1( "MSNProtocol" ) || id == QString::fromLatin1( "OscarProtocol" ) || - id == QString::fromLatin1( "AIMProtocol" ) || id == QString::fromLatin1( "IRCProtocol" ) || - id == QString::fromLatin1( "ICQProtocol" ) || id == QString::fromLatin1( "JabberProtocol" ) || - id == QString::fromLatin1( "SMSProtocol" ) || id == QString::fromLatin1( "WPProtocol" ) || - id == QString::fromLatin1( "GaduProtocol" ) ) + if( id == TQString::fromLatin1( "MSNProtocol" ) || id == TQString::fromLatin1( "OscarProtocol" ) || + id == TQString::fromLatin1( "AIMProtocol" ) || id == TQString::fromLatin1( "IRCProtocol" ) || + id == TQString::fromLatin1( "ICQProtocol" ) || id == TQString::fromLatin1( "JabberProtocol" ) || + id == TQString::fromLatin1( "SMSProtocol" ) || id == TQString::fromLatin1( "WPProtocol" ) || + id == TQString::fromLatin1( "GaduProtocol" ) ) { - QStringList strList = QStringList::split( QString::fromLatin1( "||" ), data ); + TQStringList strList = TQStringList::split( TQString::fromLatin1( "||" ), data ); // Unescape '||' - for( QStringList::iterator it = strList.begin(); it != strList.end(); ++it ) + for( TQStringList::iterator it = strList.begin(); it != strList.end(); ++it ) { - ( *it ).replace( QString::fromLatin1( "\\|;" ), QString::fromLatin1( "|" ) ). - replace( QString::fromLatin1( "\\\\" ), QString::fromLatin1( "\\" ) ); + ( *it ).replace( TQString::fromLatin1( "\\|;" ), TQString::fromLatin1( "|" ) ). + replace( TQString::fromLatin1( "\\\\" ), TQString::fromLatin1( "\\" ) ); } uint idx = 0; while( idx < strList.size() ) { - QDomElement dataField; + TQDomElement dataField; - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "contactId" ) ); - if( id == QString::fromLatin1("ICQProtocol") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "contactId" ) ); + if( id == TQString::fromLatin1("ICQProtocol") ) dataField.appendChild( newList.createTextNode( icqData[ idx ] ) ); - else if( id == QString::fromLatin1("GaduProtocol") ) + else if( id == TQString::fromLatin1("GaduProtocol") ) dataField.appendChild( newList.createTextNode( gaduData[ idx ] ) ); - else if( id == QString::fromLatin1("JabberProtocol") ) + else if( id == TQString::fromLatin1("JabberProtocol") ) dataField.appendChild( newList.createTextNode( strList[ idx + 1 ] ) ); else dataField.appendChild( newList.createTextNode( strList[ idx ] ) ); - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "displayName" ) ); - if( convertOldAim || id == QString::fromLatin1("ICQProtocol") || id == QString::fromLatin1("WPProtocol") || id == QString::fromLatin1("GaduProtocol") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "displayName" ) ); + if( convertOldAim || id == TQString::fromLatin1("ICQProtocol") || id == TQString::fromLatin1("WPProtocol") || id == TQString::fromLatin1("GaduProtocol") ) dataField.appendChild( newList.createTextNode( strList[ idx ] ) ); - else if( id == QString::fromLatin1("JabberProtocol") ) + else if( id == TQString::fromLatin1("JabberProtocol") ) dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); else dataField.appendChild( newList.createTextNode( strList[ idx + 1 ] ) ); - if( id == QString::fromLatin1("MSNProtocol") ) + if( id == TQString::fromLatin1("MSNProtocol") ) { - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "groups" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "groups" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); } - else if( id == QString::fromLatin1("IRCProtocol") ) + else if( id == TQString::fromLatin1("IRCProtocol") ) { - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "serverName" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "serverName" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); } - else if( id == QString::fromLatin1("JabberProtocol") ) + else if( id == TQString::fromLatin1("JabberProtocol") ) { - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "accountId" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "accountId" ) ); dataField.appendChild( newList.createTextNode( strList[ idx ] ) ); - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "groups" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "groups" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 3 ] ) ); } - else if( id == QString::fromLatin1( "SMSProtocol" ) && - ( idx + 2 < strList.size() ) && strList[ idx + 2 ] != QString::fromLatin1( "." ) ) + else if( id == TQString::fromLatin1( "SMSProtocol" ) && + ( idx + 2 < strList.size() ) && strList[ idx + 2 ] != TQString::fromLatin1( "." ) ) { - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "serviceName" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "serviceName" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 2 ] ) ); - dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "servicePrefs" ) ); + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "servicePrefs" ) ); dataField.appendChild( newList.createTextNode( strList[ idx + 3 ] ) ); // Add extra fields @@ -744,30 +744,30 @@ void ContactList::convertContactList( const QString &fileName, uint /* fromVersi // MSN, AIM, IRC, Oscar and SMS didn't store address book fields up // to now, so create one - if( id != QString::fromLatin1("ICQProtocol") && id != QString::fromLatin1("JabberProtocol") && id != QString::fromLatin1("WPProtocol") && id != QString::fromLatin1("GaduProtocol") ) + if( id != TQString::fromLatin1("ICQProtocol") && id != TQString::fromLatin1("JabberProtocol") && id != TQString::fromLatin1("WPProtocol") && id != TQString::fromLatin1("GaduProtocol") ) { - QDomElement addressBookField = newList.createElement( QString::fromLatin1( "address-book-field" ) ); + TQDomElement addressBookField = newList.createElement( TQString::fromLatin1( "address-book-field" ) ); newMetaContact.appendChild( addressBookField ); - addressBookField.setAttribute( QString::fromLatin1( "app" ), - QString::fromLatin1( "messaging/" ) + addressBookLabel ); - addressBookField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "All" ) ); + addressBookField.setAttribute( TQString::fromLatin1( "app" ), + TQString::fromLatin1( "messaging/" ) + addressBookLabel ); + addressBookField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "All" ) ); addressBookField.appendChild( newList.createTextNode( strList[ idx ] ) ); } idx += fieldCount; } } - else if( id == QString::fromLatin1("ContactNotesPlugin") || id == QString::fromLatin1("CryptographyPlugin") || id == QString::fromLatin1("TranslatorPlugin") ) + else if( id == TQString::fromLatin1("ContactNotesPlugin") || id == TQString::fromLatin1("CryptographyPlugin") || id == TQString::fromLatin1("TranslatorPlugin") ) { - QDomElement dataField = newList.createElement( QString::fromLatin1( "plugin-data-field" ) ); + TQDomElement dataField = newList.createElement( TQString::fromLatin1( "plugin-data-field" ) ); pluginData[ id ].appendChild( dataField ); - if( id == QString::fromLatin1("ContactNotesPlugin") ) - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "notes" ) ); - else if( id == QString::fromLatin1("CryptographyPlugin") ) - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "gpgKey" ) ); - else if( id == QString::fromLatin1("TranslatorPlugin") ) - dataField.setAttribute( QString::fromLatin1( "key" ), QString::fromLatin1( "languageKey" ) ); + if( id == TQString::fromLatin1("ContactNotesPlugin") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "notes" ) ); + else if( id == TQString::fromLatin1("CryptographyPlugin") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "gpgKey" ) ); + else if( id == TQString::fromLatin1("TranslatorPlugin") ) + dataField.setAttribute( TQString::fromLatin1( "key" ), TQString::fromLatin1( "languageKey" ) ); dataField.appendChild( newList.createTextNode( data ) ); } @@ -776,48 +776,48 @@ void ContactList::convertContactList( const QString &fileName, uint /* fromVersi oldContactNode = oldContactNode.nextSibling(); } } - else if( oldElement.tagName() == QString::fromLatin1("kopete-group") ) + else if( oldElement.tagName() == TQString::fromLatin1("kopete-group") ) { - QDomElement newGroup = newList.createElement( QString::fromLatin1( "kopete-group" ) ); + TQDomElement newGroup = newList.createElement( TQString::fromLatin1( "kopete-group" ) ); newRoot.appendChild( newGroup ); - QDomNode oldGroupNode = oldNode.firstChild(); + TQDomNode oldGroupNode = oldNode.firstChild(); while( !oldGroupNode.isNull() ) { - QDomElement oldGroupElement = oldGroupNode.toElement(); + TQDomElement oldGroupElement = oldGroupNode.toElement(); - if( oldGroupElement.tagName() == QString::fromLatin1("display-name") ) + if( oldGroupElement.tagName() == TQString::fromLatin1("display-name") ) { - QDomElement displayName = newList.createElement( QString::fromLatin1( "display-name" ) ); + TQDomElement displayName = newList.createElement( TQString::fromLatin1( "display-name" ) ); displayName.appendChild( newList.createTextNode( oldGroupElement.text() ) ); newGroup.appendChild( displayName ); } - if( oldGroupElement.tagName() == QString::fromLatin1("type") ) + if( oldGroupElement.tagName() == TQString::fromLatin1("type") ) { - if( oldGroupElement.text() == QString::fromLatin1("Temporary") ) - newGroup.setAttribute( QString::fromLatin1( "type" ), QString::fromLatin1( "temporary" ) ); - else if( oldGroupElement.text() == QString::fromLatin1( "TopLevel" ) ) - newGroup.setAttribute( QString::fromLatin1( "type" ), QString::fromLatin1( "top-level" ) ); + if( oldGroupElement.text() == TQString::fromLatin1("Temporary") ) + newGroup.setAttribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "temporary" ) ); + else if( oldGroupElement.text() == TQString::fromLatin1( "TopLevel" ) ) + newGroup.setAttribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "top-level" ) ); else - newGroup.setAttribute( QString::fromLatin1( "type" ), QString::fromLatin1( "standard" ) ); + newGroup.setAttribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "standard" ) ); } - if( oldGroupElement.tagName() == QString::fromLatin1("view") ) + if( oldGroupElement.tagName() == TQString::fromLatin1("view") ) { - if( oldGroupElement.text() == QString::fromLatin1("collapsed") ) - newGroup.setAttribute( QString::fromLatin1( "view" ), QString::fromLatin1( "collapsed" ) ); + if( oldGroupElement.text() == TQString::fromLatin1("collapsed") ) + newGroup.setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "collapsed" ) ); else - newGroup.setAttribute( QString::fromLatin1( "view" ), QString::fromLatin1( "expanded" ) ); + newGroup.setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "expanded" ) ); } - else if( oldGroupElement.tagName() == QString::fromLatin1("plugin-data") ) + else if( oldGroupElement.tagName() == TQString::fromLatin1("plugin-data") ) { // Per-group plugin data // FIXME: This needs updating too, ideally, convert this in a later // contactlist.xml version - QDomElement groupPluginData = newList.createElement( QString::fromLatin1( "plugin-data" ) ); + TQDomElement groupPluginData = newList.createElement( TQString::fromLatin1( "plugin-data" ) ); newGroup.appendChild( groupPluginData ); - groupPluginData.setAttribute( QString::fromLatin1( "plugin-id" ), - oldGroupElement.attribute( QString::fromLatin1( "plugin-id" ), QString::null ) ); + groupPluginData.setAttribute( TQString::fromLatin1( "plugin-id" ), + oldGroupElement.attribute( TQString::fromLatin1( "plugin-id" ), TQString::null ) ); groupPluginData.appendChild( newList.createTextNode( oldGroupElement.text() ) ); } @@ -836,13 +836,13 @@ void ContactList::convertContactList( const QString &fileName, uint /* fromVersi // Close the file, and save the new file contactListFile.close(); - QDir().rename( fileName, fileName + QString::fromLatin1( ".bak" ) ); + TQDir().rename( fileName, fileName + TQString::fromLatin1( ".bak" ) ); // kdDebug( 14010 ) << k_funcinfo << "XML output:\n" << newList.toString( 2 ) << endl; contactListFile.open( IO_WriteOnly ); - QTextStream stream( &contactListFile ); - stream.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream stream( &contactListFile ); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); stream << newList.toString( 2 ); contactListFile.flush(); @@ -862,12 +862,12 @@ void Kopete::ContactList::saveXML() return; } - QString contactListFileName = locateLocal( "appdata", QString::fromLatin1( "contactlist.xml" ) ); + TQString contactListFileName = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) ); KSaveFile contactListFile( contactListFileName ); if( contactListFile.status() == 0 ) { - QTextStream *stream = contactListFile.textStream(); - stream->setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream *stream = contactListFile.textStream(); + stream->setEncoding( TQTextStream::UnicodeUTF8 ); toXML().save( *stream, 4 ); if ( contactListFile.close() ) @@ -891,11 +891,11 @@ void Kopete::ContactList::saveXML() d->saveTimer->start( 60000, true /* single-shot: will get restarted by us next time if it's still failing */ ); } -const QDomDocument ContactList::toXML() +const TQDomDocument ContactList::toXML() { - QDomDocument doc; - doc.appendChild( doc.createElement( QString::fromLatin1("kopete-contact-list") ) ); - doc.documentElement().setAttribute( QString::fromLatin1("version"), QString::fromLatin1("1.0")); + TQDomDocument doc; + doc.appendChild( doc.createElement( TQString::fromLatin1("kopete-contact-list") ) ); + doc.documentElement().setAttribute( TQString::fromLatin1("version"), TQString::fromLatin1("1.0")); // Save group information. ie: Open/Closed, pehaps later icons? Who knows. for( Kopete::Group *g = d->groups.first(); g; g = d->groups.next() ) @@ -909,18 +909,18 @@ const QDomDocument ContactList::toXML() // Save myself metacontact information if( Kopete::Config::enableGlobalIdentity() ) { - QDomElement myselfElement = myself()->toXML(true); // Save minimal information. - myselfElement.setTagName( QString::fromLatin1("myself-meta-contact") ); + TQDomElement myselfElement = myself()->toXML(true); // Save minimal information. + myselfElement.setTagName( TQString::fromLatin1("myself-meta-contact") ); doc.documentElement().appendChild( doc.importNode( myselfElement, true ) ); } return doc; } -QStringList ContactList::contacts() const +TQStringList ContactList::contacts() const { - QStringList contacts; - QPtrListIterator it( d->contacts ); + TQStringList contacts; + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { contacts.append( it.current()->displayName() ); @@ -928,22 +928,22 @@ QStringList ContactList::contacts() const return contacts; } -QStringList ContactList::contactStatuses() const +TQStringList ContactList::contactStatuses() const { - QStringList meta_contacts; - QPtrListIterator it( d->contacts ); + TQStringList meta_contacts; + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { - meta_contacts.append( QString::fromLatin1( "%1 (%2)" ). + meta_contacts.append( TQString::fromLatin1( "%1 (%2)" ). arg( it.current()->displayName(), it.current()->statusString() )); } return meta_contacts; } -QStringList ContactList::reachableContacts() const +TQStringList ContactList::reachableContacts() const { - QStringList contacts; - QPtrListIterator it( d->contacts ); + TQStringList contacts; + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { if ( it.current()->isReachable() ) @@ -952,16 +952,16 @@ QStringList ContactList::reachableContacts() const return contacts; } -QPtrList ContactList::onlineContacts() const +TQPtrList ContactList::onlineContacts() const { - QPtrList result; - QPtrListIterator it( d->contacts ); + TQPtrList result; + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { if ( it.current()->isOnline() ) { - QPtrList contacts = it.current()->contacts(); - QPtrListIterator cit( contacts ); + TQPtrList contacts = it.current()->contacts(); + TQPtrListIterator cit( contacts ); for( ; cit.current(); ++cit ) { if ( cit.current()->isOnline() ) @@ -972,10 +972,10 @@ QPtrList ContactList::onlineContacts() const return result; } -QPtrList Kopete::ContactList::onlineMetaContacts() const +TQPtrList Kopete::ContactList::onlineMetaContacts() const { - QPtrList result; - QPtrListIterator it( d->contacts ); + TQPtrList result; + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { if ( it.current()->isOnline() ) @@ -984,17 +984,17 @@ QPtrList Kopete::ContactList::onlineMetaContacts() const return result; } -QPtrList Kopete::ContactList::onlineMetaContacts( const QString &protocolId ) const +TQPtrList Kopete::ContactList::onlineMetaContacts( const TQString &protocolId ) const { - QPtrList result; - QPtrListIterator it( d->contacts ); + TQPtrList result; + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { // FIXME: This loop is not very efficient :( if ( it.current()->isOnline() ) { - QPtrList contacts = it.current()->contacts(); - QPtrListIterator cit( contacts ); + TQPtrList contacts = it.current()->contacts(); + TQPtrListIterator cit( contacts ); for( ; cit.current(); ++cit ) { if( cit.current()->isOnline() && cit.current()->protocol()->pluginId() == protocolId ) @@ -1005,17 +1005,17 @@ QPtrList Kopete::ContactList::onlineMetaContacts( const QSt return result; } -QPtrList Kopete::ContactList::onlineContacts( const QString &protocolId ) const +TQPtrList Kopete::ContactList::onlineContacts( const TQString &protocolId ) const { - QPtrList result; - QPtrListIterator it( d->contacts ); + TQPtrList result; + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { // FIXME: This loop is not very efficient :( if ( it.current()->isOnline() ) { - QPtrList contacts = it.current()->contacts(); - QPtrListIterator cit( contacts ); + TQPtrList contacts = it.current()->contacts(); + TQPtrListIterator cit( contacts ); for( ; cit.current(); ++cit ) { if( cit.current()->isOnline() && cit.current()->protocol()->pluginId() == protocolId ) @@ -1026,10 +1026,10 @@ QPtrList Kopete::ContactList::onlineContacts( const QString &pr return result; } -QStringList Kopete::ContactList::fileTransferContacts() const +TQStringList Kopete::ContactList::fileTransferContacts() const { - QStringList contacts; - QPtrListIterator it( d->contacts ); + TQStringList contacts; + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { if ( it.current()->canAcceptFiles() ) @@ -1038,8 +1038,8 @@ QStringList Kopete::ContactList::fileTransferContacts() const return contacts; } -void Kopete::ContactList::sendFile( const QString &displayName, const KURL &sourceURL, - const QString &altFileName, const long unsigned int fileSize) +void Kopete::ContactList::sendFile( const TQString &displayName, const KURL &sourceURL, + const TQString &altFileName, const long unsigned int fileSize) { // kdDebug(14010) << "Send To Display Name: " << displayName << "\n"; @@ -1048,7 +1048,7 @@ void Kopete::ContactList::sendFile( const QString &displayName, const KURL &sour c->sendFile( sourceURL, altFileName, fileSize ); } -void Kopete::ContactList::messageContact( const QString &contactId, const QString &messageText ) +void Kopete::ContactList::messageContact( const TQString &contactId, const TQString &messageText ) { Kopete::MetaContact *mc = findMetaContactByContactId( contactId ); if (!mc) return; @@ -1062,17 +1062,17 @@ void Kopete::ContactList::messageContact( const QString &contactId, const QStrin } -QStringList Kopete::ContactList::contactFileProtocols(const QString &displayName) +TQStringList Kopete::ContactList::contactFileProtocols(const TQString &displayName) { // kdDebug(14010) << "Get contacts for: " << displayName << "\n"; - QStringList protocols; + TQStringList protocols; Kopete::MetaContact *c = findMetaContactByDisplayName( displayName ); if( c ) { - QPtrList mContacts = c->contacts(); + TQPtrList mContacts = c->contacts(); kdDebug(14010) << mContacts.count() << endl; - QPtrListIterator jt( mContacts ); + TQPtrListIterator jt( mContacts ); for ( ; jt.current(); ++jt ) { kdDebug(14010) << "1" << jt.current()->protocol()->pluginId() << endl; @@ -1083,7 +1083,7 @@ QStringList Kopete::ContactList::contactFileProtocols(const QString &displayName } return protocols; } - return QStringList(); + return TQStringList(); } diff --git a/kopete/libkopete/kopetecontactlist.h b/kopete/libkopete/kopetecontactlist.h index fc6dd5f9..405abb79 100644 --- a/kopete/libkopete/kopetecontactlist.h +++ b/kopete/libkopete/kopetecontactlist.h @@ -19,8 +19,8 @@ #ifndef KOPETECONTACTLIST_H__ #define KOPETECONTACTLIST_H__ -#include -#include +#include +#include #include "kopete_export.h" @@ -62,7 +62,7 @@ public: /** * @brief return a list of all metacontact of the contactlist * Retrieve the list of all available meta contacts. - * The returned QPtrList is not the internally used variable, so changes + * The returned TQPtrList is not the internally used variable, so changes * to it won't propagate into the actual contact list. This can be * useful if you need a subset of the contact list, because you can * simply filter the result set as you wish without worrying about @@ -70,18 +70,18 @@ public: * The contained MetaContacts are obviously _not_ duplicates, so * changing those *will* have the expected result :-) */ - QPtrList metaContacts() const; + TQPtrList metaContacts() const; /** * @return all groups */ - QPtrList groups() const; + TQPtrList groups() const; /** * Return the metacontact referenced by the given id. is none is found, return 0L * @sa MetaContact::metaContactId() */ - MetaContact *metaContact( const QString &metaContactId ) const; + MetaContact *metaContact( const TQString &metaContactId ) const; /** * return the group with the given unique id. if none is found return 0L @@ -97,17 +97,17 @@ public: * @param contactId the @ref Contact::contactId() * @return the contact with the parameters, or 0L if not found. */ - Contact *findContact( const QString &protocolId, const QString &accountId, const QString &contactId ) const; + Contact *findContact( const TQString &protocolId, const TQString &accountId, const TQString &contactId ) const; /** * Find a contact by display name. Returns the first match. */ - MetaContact *findMetaContactByDisplayName( const QString &displayName ) const; + MetaContact *findMetaContactByDisplayName( const TQString &displayName ) const; /** * Find a meta contact by its contact id. Returns the first match. */ - MetaContact *findMetaContactByContactId( const QString &contactId ) const; + MetaContact *findMetaContactByContactId( const TQString &contactId ) const; /** * @brief find a group with his displayName @@ -117,17 +117,17 @@ public: * @param type is the Group::GroupType to search, the default value is group::Normal * @return always a valid Group */ - Group * findGroup( const QString &displayName, int type = 0/*Group::Normal*/ ); + Group * findGroup( const TQString &displayName, int type = 0/*Group::Normal*/ ); /** * return the list of metacontact actually selected in the contactlist UI */ - QPtrList selectedMetaContacts() const; + TQPtrList selectedMetaContacts() const; /** * return the list of groups actualy selected in the contactlist UI */ - QPtrList selectedGroups() const ; + TQPtrList selectedGroups() const ; /** * return the metacontact that represent the user itself. @@ -171,7 +171,7 @@ public slots: * This method has to be called by the contactlist UI side. * it stores the selected items, and emits signals */ - void setSelectedItems(QPtrList metaContacts , QPtrList groups); + void setSelectedItems(TQPtrList metaContacts , TQPtrList groups); /** * Apply the global identity. @@ -204,7 +204,7 @@ signals: /** * A group has just been renamed */ - void groupRenamed(Kopete::Group *, const QString & oldname); + void groupRenamed(Kopete::Group *, const TQString & oldname); /** * A contact has been added to a group @@ -217,7 +217,7 @@ signals: /** * This signal is emit when the selection has changed, it is emitted after the following slot - * Warning: Do not delete any contacts in slots connected to this signal. (it is the warning in the QListView::selectionChanged() doc) + * Warning: Do not delete any contacts in slots connected to this signal. (it is the warning in the TQListView::selectionChanged() doc) */ void selectionChanged(); /** @@ -231,7 +231,7 @@ signals: * This signal is emitted each time a global identity field change. * HOWTO use: * - * - Connect signal globalIdentityChanged(const QString &key, const QVariant + * - Connect signal globalIdentityChanged(const TQString &key, const TQVariant * &value) to a slot in your derivate Account class (the best * place to put it). * - In the slot: @@ -242,12 +242,12 @@ signals: * * Connect signal in your Account constructor: * @code - * connect(Kopete::ContactList::self(), SIGNAL(globalIdentityChanged(const QString&, const QVariant&)), SLOT(slotglobalIdentityChanged(const QString&, const QVariant&))); + * connect(Kopete::ContactList::self(), TQT_SIGNAL(globalIdentityChanged(const TQString&, const TQVariant&)), TQT_SLOT(slotglobalIdentityChanged(const TQString&, const TQVariant&))); * @endcode * * Example of a typical implemented slot: * @code - * void slotGlobalIdentityChanged(const QString &key, const QVariant &value) + * void slotGlobalIdentityChanged(const TQString &key, const TQVariant &value) * { * if(key == Kopete::Global::Properties::self()->nickName().key()) * { @@ -262,7 +262,7 @@ signals: * } * @endcode */ - void globalIdentityChanged( const QString &key, const QVariant &value ); + void globalIdentityChanged( const TQString &key, const TQVariant &value ); private slots: /** @@ -289,7 +289,7 @@ private: /** * Convert the contact list from an older version */ - void convertContactList( const QString &fileName, uint fromVersion, uint toVersion ); + void convertContactList( const TQString &fileName, uint fromVersion, uint toVersion ); /** @@ -305,41 +305,41 @@ public: //TODO I think all theses method should be moved to the decop interface. /** * Return all meta contacts */ - QStringList contacts() const; + TQStringList contacts() const; /** * Return all meta contacts that are reachable */ - QStringList reachableContacts() const; + TQStringList reachableContacts() const; /** * Return all contacts that are online */ - QPtrList onlineContacts() const; + TQPtrList onlineContacts() const; /** * Overloaded method of @ref onlineContacts() that only returns * the online contacts for a single protocol */ - QPtrList onlineContacts( const QString &protocolId ) const; + TQPtrList onlineContacts( const TQString &protocolId ) const; /** * Return all meta contacts that are online */ - QPtrList onlineMetaContacts() const; + TQPtrList onlineMetaContacts() const; /** * Overloaded method of @ref onlineMetaContacts() that only returns * the online meta contacts for a single protocol */ - QPtrList onlineMetaContacts( const QString &protocolId ) const; + TQPtrList onlineMetaContacts( const TQString &protocolId ) const; /** * Returns all contacts which can accept file transfers */ - QStringList fileTransferContacts() const; + TQStringList fileTransferContacts() const; - QStringList contactFileProtocols( const QString &displayName); + TQStringList contactFileProtocols( const TQString &displayName); /** * Return all meta contacts with their current status @@ -347,7 +347,7 @@ public: //TODO I think all theses method should be moved to the decop interface. * FIXME: Do we *need* this one? Sounds error prone to me, because * nicknames can contain parentheses too. - Martijn */ - QStringList contactStatuses() const; + TQStringList contactStatuses() const; /** @@ -361,13 +361,13 @@ public: //TODO I think all theses method should be moved to the decop interface. * @param altFileName (Optional) An alternate filename for the file we are sending * @param fileSize (Optional) The size of the file */ - void sendFile(const QString &displayName, const KURL &sourceURL, - const QString &altFileName = QString::null, const long unsigned int fileSize = 0L); + void sendFile(const TQString &displayName, const KURL &sourceURL, + const TQString &altFileName = TQString::null, const long unsigned int fileSize = 0L); /** * Open a chat to a contact, and optionally set some initial text */ - void messageContact( const QString &displayName, const QString &messageText = QString::null ); + void messageContact( const TQString &displayName, const TQString &messageText = TQString::null ); public slots: /** @@ -384,7 +384,7 @@ private: /** * Return a XML representation of the contact list */ - const QDomDocument toXML(); + const TQDomDocument toXML(); /** * Load the contact list from XML file diff --git a/kopete/libkopete/kopetecontactlistelement.cpp b/kopete/libkopete/kopetecontactlistelement.cpp index 2474d1af..5a51da80 100644 --- a/kopete/libkopete/kopetecontactlistelement.cpp +++ b/kopete/libkopete/kopetecontactlistelement.cpp @@ -29,19 +29,19 @@ namespace Kopete { class ContactListElement::Private { public: - QMap > pluginData; - QMap icons; + TQMap > pluginData; + TQMap icons; bool useCustomIcon; }; -ContactListElement::ContactListElement( QObject *parent, const char *name ) -: QObject( parent, name ) +ContactListElement::ContactListElement( TQObject *parent, const char *name ) +: TQObject( parent, name ) { d = new Private; d->useCustomIcon = false; #if 0 //TODO - connect( Kopete::Global::onlineStatusIconCache(), SIGNAL( iconsChanged() ), SIGNAL( iconAppearanceChanged() ) ); + connect( Kopete::Global::onlineStatusIconCache(), TQT_SIGNAL( iconsChanged() ), TQT_SIGNAL( iconAppearanceChanged() ) ); #endif } @@ -50,7 +50,7 @@ ContactListElement::~ContactListElement() delete d; } -void ContactListElement::setPluginData( Plugin *plugin, const QMap &pluginData ) +void ContactListElement::setPluginData( Plugin *plugin, const TQMap &pluginData ) { if ( pluginData.isEmpty() ) { @@ -63,48 +63,48 @@ void ContactListElement::setPluginData( Plugin *plugin, const QMappluginData[ p->pluginId() ][ key ] = value; emit pluginDataChanged(); } -QMap ContactListElement::pluginData( Plugin *plugin ) const +TQMap ContactListElement::pluginData( Plugin *plugin ) const { if ( !d->pluginData.contains( plugin->pluginId() ) ) - return QMap(); + return TQMap(); return d->pluginData[ plugin->pluginId() ]; } -QString ContactListElement::pluginData( Plugin *plugin, const QString &key ) const +TQString ContactListElement::pluginData( Plugin *plugin, const TQString &key ) const { if ( !d->pluginData.contains( plugin->pluginId() ) || !d->pluginData[ plugin->pluginId() ].contains( key ) ) - return QString::null; + return TQString::null; return d->pluginData[ plugin->pluginId() ][ key ]; } -const QValueList ContactListElement::toXML() +const TQValueList ContactListElement::toXML() { - QDomDocument pluginData; - QValueList pluginNodes; - pluginData.appendChild( pluginData.createElement( QString::fromLatin1( "plugin-data" ) ) ); + TQDomDocument pluginData; + TQValueList pluginNodes; + pluginData.appendChild( pluginData.createElement( TQString::fromLatin1( "plugin-data" ) ) ); if ( !d->pluginData.isEmpty() ) { - QMap >::ConstIterator pluginIt; + TQMap >::ConstIterator pluginIt; for ( pluginIt = d->pluginData.begin(); pluginIt != d->pluginData.end(); ++pluginIt ) { - QDomElement pluginElement = pluginData.createElement( QString::fromLatin1( "plugin-data" ) ); - pluginElement.setAttribute( QString::fromLatin1( "plugin-id" ), pluginIt.key() ); + TQDomElement pluginElement = pluginData.createElement( TQString::fromLatin1( "plugin-data" ) ); + pluginElement.setAttribute( TQString::fromLatin1( "plugin-id" ), pluginIt.key() ); - QMap::ConstIterator it; + TQMap::ConstIterator it; for ( it = pluginIt.data().begin(); it != pluginIt.data().end(); ++it ) { - QDomElement pluginDataField = pluginData.createElement( QString::fromLatin1( "plugin-data-field" ) ); - pluginDataField.setAttribute( QString::fromLatin1( "key" ), it.key() ); + TQDomElement pluginDataField = pluginData.createElement( TQString::fromLatin1( "plugin-data-field" ) ); + pluginDataField.setAttribute( TQString::fromLatin1( "key" ), it.key() ); pluginDataField.appendChild( pluginData.createTextNode( it.data() ) ); pluginElement.appendChild( pluginDataField ); } @@ -115,39 +115,39 @@ const QValueList ContactListElement::toXML() } if ( !d->icons.isEmpty() ) { - QDomElement iconsElement = pluginData.createElement( QString::fromLatin1( "custom-icons" ) ); - iconsElement.setAttribute( QString::fromLatin1( "use" ), d->useCustomIcon ? QString::fromLatin1( "1" ) : QString::fromLatin1( "0" ) ); + TQDomElement iconsElement = pluginData.createElement( TQString::fromLatin1( "custom-icons" ) ); + iconsElement.setAttribute( TQString::fromLatin1( "use" ), d->useCustomIcon ? TQString::fromLatin1( "1" ) : TQString::fromLatin1( "0" ) ); - for ( QMap::ConstIterator it = d->icons.begin(); it != d->icons.end(); ++it ) + for ( TQMap::ConstIterator it = d->icons.begin(); it != d->icons.end(); ++it ) { - QDomElement iconElement = pluginData.createElement( QString::fromLatin1( "icon" ) ); - QString stateStr; + TQDomElement iconElement = pluginData.createElement( TQString::fromLatin1( "icon" ) ); + TQString stateStr; switch ( it.key() ) { case Open: - stateStr = QString::fromLatin1( "open" ); + stateStr = TQString::fromLatin1( "open" ); break; case Closed: - stateStr = QString::fromLatin1( "closed" ); + stateStr = TQString::fromLatin1( "closed" ); break; case Online: - stateStr = QString::fromLatin1( "online" ); + stateStr = TQString::fromLatin1( "online" ); break; case Away: - stateStr = QString::fromLatin1( "away" ); + stateStr = TQString::fromLatin1( "away" ); break; case Offline: - stateStr = QString::fromLatin1( "offline" ); + stateStr = TQString::fromLatin1( "offline" ); break; case Unknown: - stateStr = QString::fromLatin1( "unknown" ); + stateStr = TQString::fromLatin1( "unknown" ); break; case None: default: - stateStr = QString::fromLatin1( "none" ); + stateStr = TQString::fromLatin1( "none" ); break; } - iconElement.setAttribute( QString::fromLatin1( "state" ), stateStr ); + iconElement.setAttribute( TQString::fromLatin1( "state" ), stateStr ); iconElement.appendChild( pluginData.createTextNode( it.data() ) ); iconsElement.appendChild( iconElement ); } @@ -157,54 +157,54 @@ const QValueList ContactListElement::toXML() return pluginNodes; } -bool ContactListElement::fromXML( const QDomElement& element ) +bool ContactListElement::fromXML( const TQDomElement& element ) { - if ( element.tagName() == QString::fromLatin1( "plugin-data" ) ) + if ( element.tagName() == TQString::fromLatin1( "plugin-data" ) ) { - QMap pluginData; - QString pluginId = element.attribute( QString::fromLatin1( "plugin-id" ), QString::null ); + TQMap pluginData; + TQString pluginId = element.attribute( TQString::fromLatin1( "plugin-id" ), TQString::null ); //in kopete 0.6 the AIM protocol was called OSCAR - if ( pluginId == QString::fromLatin1( "OscarProtocol" ) ) - pluginId = QString::fromLatin1( "AIMProtocol" ); + if ( pluginId == TQString::fromLatin1( "OscarProtocol" ) ) + pluginId = TQString::fromLatin1( "AIMProtocol" ); - QDomNode field = element.firstChild(); + TQDomNode field = element.firstChild(); while( !field.isNull() ) { - QDomElement fieldElement = field.toElement(); - if ( fieldElement.tagName() == QString::fromLatin1( "plugin-data-field" ) ) + TQDomElement fieldElement = field.toElement(); + if ( fieldElement.tagName() == TQString::fromLatin1( "plugin-data-field" ) ) { - pluginData.insert( fieldElement.attribute( QString::fromLatin1( "key" ), - QString::fromLatin1( "undefined-key" ) ), fieldElement.text() ); + pluginData.insert( fieldElement.attribute( TQString::fromLatin1( "key" ), + TQString::fromLatin1( "undefined-key" ) ), fieldElement.text() ); } field = field.nextSibling(); } d->pluginData.insert( pluginId, pluginData ); } - else if ( element.tagName() == QString::fromLatin1( "custom-icons" ) ) + else if ( element.tagName() == TQString::fromLatin1( "custom-icons" ) ) { - d->useCustomIcon= element.attribute( QString::fromLatin1( "use" ), QString::fromLatin1( "1" ) ) == QString::fromLatin1( "1" ); - QDomNode ic = element.firstChild(); + d->useCustomIcon= element.attribute( TQString::fromLatin1( "use" ), TQString::fromLatin1( "1" ) ) == TQString::fromLatin1( "1" ); + TQDomNode ic = element.firstChild(); while( !ic.isNull() ) { - QDomElement iconElement = ic.toElement(); - if ( iconElement.tagName() == QString::fromLatin1( "icon" ) ) + TQDomElement iconElement = ic.toElement(); + if ( iconElement.tagName() == TQString::fromLatin1( "icon" ) ) { - QString stateStr = iconElement.attribute( QString::fromLatin1( "state" ), QString::null ); - QString icon = iconElement.text(); + TQString stateStr = iconElement.attribute( TQString::fromLatin1( "state" ), TQString::null ); + TQString icon = iconElement.text(); IconState state = None; - if ( stateStr == QString::fromLatin1( "open" ) ) + if ( stateStr == TQString::fromLatin1( "open" ) ) state = Open; - if ( stateStr == QString::fromLatin1( "closed" ) ) + if ( stateStr == TQString::fromLatin1( "closed" ) ) state = Closed; - if ( stateStr == QString::fromLatin1( "online" ) ) + if ( stateStr == TQString::fromLatin1( "online" ) ) state = Online; - if ( stateStr == QString::fromLatin1( "offline" ) ) + if ( stateStr == TQString::fromLatin1( "offline" ) ) state = Offline; - if ( stateStr == QString::fromLatin1( "away" ) ) + if ( stateStr == TQString::fromLatin1( "away" ) ) state = Away; - if ( stateStr == QString::fromLatin1( "unknown" ) ) + if ( stateStr == TQString::fromLatin1( "unknown" ) ) state = Unknown; d->icons[ state ] = icon; @@ -220,7 +220,7 @@ bool ContactListElement::fromXML( const QDomElement& element ) return true; } -QString ContactListElement::icon( ContactListElement::IconState state ) const +TQString ContactListElement::icon( ContactListElement::IconState state ) const { if ( d->icons.contains( state ) ) return d->icons[state]; @@ -228,7 +228,7 @@ QString ContactListElement::icon( ContactListElement::IconState state ) const return d->icons[ None ]; } -void ContactListElement::setIcon( const QString& icon , ContactListElement::IconState state ) +void ContactListElement::setIcon( const TQString& icon , ContactListElement::IconState state ) { if ( icon.isNull() ) d->icons.remove( state ); diff --git a/kopete/libkopete/kopetecontactlistelement.h b/kopete/libkopete/kopetecontactlistelement.h index b0f2eb69..6e9d1816 100644 --- a/kopete/libkopete/kopetecontactlistelement.h +++ b/kopete/libkopete/kopetecontactlistelement.h @@ -19,8 +19,8 @@ #ifndef KOPETEPLUGINDATAOBJECT_H #define KOPETEPLUGINDATAOBJECT_H -#include -#include +#include +#include #include "kopete_export.h" @@ -41,12 +41,12 @@ class Plugin; * * It also allow to store an icon for this element. */ -class KOPETE_EXPORT ContactListElement : public QObject /* public KopeteNotifyDataObject */ +class KOPETE_EXPORT ContactListElement : public TQObject /* public KopeteNotifyDataObject */ { Q_OBJECT protected: - ContactListElement( QObject *parent = 0L, const char *name = 0L ); + ContactListElement( TQObject *parent = 0L, const char *name = 0L ); ~ContactListElement(); @@ -54,7 +54,7 @@ public: /** * Set the plugin-specific data. - * The data in the provided QMap is a set of key/value pairs. + * The data in the provided TQMap is a set of key/value pairs. * Note that protocol plugins usually shouldn't use this method, but * reimplement @ref Contact::serialize() instead. This method * is called by @ref Protocol for those classes. @@ -63,7 +63,7 @@ public: * You may want to consider the @ref setPluginData() overload * that takes a single field as parameter. */ - void setPluginData( Plugin *plugin, const QMap &value ); + void setPluginData( Plugin *plugin, const TQMap &value ); /** * Convenience method to store or change only a single field of the @@ -73,7 +73,7 @@ public: * * Note that you should save the file after adding data or it will get lost. */ - void setPluginData( Plugin *plugin, const QString &key, const QString &value ); + void setPluginData( Plugin *plugin, const TQString &key, const TQString &value ); /** * Get the settings as stored previously by calls to @ref setPluginData() @@ -81,7 +81,7 @@ public: * Note that calling this method for protocol plugins that use the * @ref Contact::serialize() API may yield unexpected results. */ - QMap pluginData( Plugin *plugin ) const; + TQMap pluginData( Plugin *plugin ) const; /** * Convenience method to retrieve only a single field from the plugin @@ -91,7 +91,7 @@ public: * from the XML file. Don't call this method before then (e.g. in * constructors). */ - QString pluginData( Plugin *plugin, const QString &key ) const; + TQString pluginData( Plugin *plugin, const TQString &key ) const; /** * The various icon states. Some state are reserved for Groups, @@ -105,13 +105,13 @@ public: * if there is no icon registered for this state, the None icon is used * if available */ - QString icon( IconState state = None ) const; + TQString icon( IconState state = None ) const; /** * Set the icon in the given state - * To clear an entry, set a QString::null + * To clear an entry, set a TQString::null */ - void setIcon( const QString &icon, IconState = None ); + void setIcon( const TQString &icon, IconState = None ); /** * return if yes or no the user wants to display some custom icon. @@ -134,7 +134,7 @@ signals: /** * The icon to use for some state has changed */ - void iconChanged( Kopete::ContactListElement::IconState, const QString & ); + void iconChanged( Kopete::ContactListElement::IconState, const TQString & ); /** * The visual appearance of some of our icons has changed @@ -150,14 +150,14 @@ protected: /** * Return a XML representation of plugin data */ - const QValueList toXML(); + const TQValueList toXML(); /** * Load plugin data from one Dom Element: * It should be a element or a element. if not, nothing will happen * @return true if something has ben loaded. false if the element was not a fine */ - bool fromXML( const QDomElement &element ); + bool fromXML( const TQDomElement &element ); private: class Private; diff --git a/kopete/libkopete/kopetecontactproperty.cpp b/kopete/libkopete/kopetecontactproperty.cpp index 87e176af..e4478a27 100644 --- a/kopete/libkopete/kopetecontactproperty.cpp +++ b/kopete/libkopete/kopetecontactproperty.cpp @@ -25,9 +25,9 @@ namespace Kopete struct ContactPropertyTmplPrivate { - QString key; - QString label; - QString icon; + TQString key; + TQString label; + TQString icon; bool persistent; bool richText; bool privateProp; @@ -45,8 +45,8 @@ ContactPropertyTmpl::ContactPropertyTmpl() // Don't register empty template } -ContactPropertyTmpl::ContactPropertyTmpl(const QString &key, - const QString &label, const QString &icon, bool persistent, bool richText, bool privateProp) +ContactPropertyTmpl::ContactPropertyTmpl(const TQString &key, + const TQString &label, const TQString &icon, bool persistent, bool richText, bool privateProp) { ContactPropertyTmpl other = Kopete::Global::Properties::self()->tmpl(key); if(other.isNull()) @@ -124,17 +124,17 @@ bool ContactPropertyTmpl::operator!=(const ContactPropertyTmpl &other) const } -const QString &ContactPropertyTmpl::key() const +const TQString &ContactPropertyTmpl::key() const { return d->key; } -const QString &ContactPropertyTmpl::label() const +const TQString &ContactPropertyTmpl::label() const { return d->label; } -const QString &ContactPropertyTmpl::icon() const +const TQString &ContactPropertyTmpl::icon() const { return d->icon; } @@ -170,7 +170,7 @@ ContactProperty::ContactProperty() } ContactProperty::ContactProperty(const ContactPropertyTmpl &tmpl, - const QVariant &val) + const TQVariant &val) { mTemplate = tmpl; mValue = val; @@ -181,7 +181,7 @@ ContactProperty::~ContactProperty() //kdDebug(14000) << k_funcinfo << "this = " << (void *)this << endl; } -const QVariant &ContactProperty::value() const +const TQVariant &ContactProperty::value() const { return mValue; } diff --git a/kopete/libkopete/kopetecontactproperty.h b/kopete/libkopete/kopetecontactproperty.h index b5c8f060..f7213faa 100644 --- a/kopete/libkopete/kopetecontactproperty.h +++ b/kopete/libkopete/kopetecontactproperty.h @@ -19,7 +19,7 @@ #ifndef _KOPETECONTACTPROPERTY_H_ #define _KOPETECONTACTPROPERTY_H_ -#include +#include #include "kopete_export.h" @@ -56,9 +56,9 @@ class KOPETE_EXPORT ContactPropertyTmpl * @param privateProp if true, properties based on this template won't be * visible to the user **/ - ContactPropertyTmpl( const QString &key, - const QString &label, - const QString &icon = QString::null, + ContactPropertyTmpl( const TQString &key, + const TQString &label, + const TQString &icon = TQString::null, bool persistent = false, bool richText = false, bool privateProp = false ); @@ -80,17 +80,17 @@ class KOPETE_EXPORT ContactPropertyTmpl * Getter for the unique key. Properties based on this template will be * stored with this key **/ - const QString &key() const; + const TQString &key() const; /** * Getter for i18ned label **/ - const QString &label() const; + const TQString &label() const; /** * Getter for icon to show aside or instead of @p label() **/ - const QString &icon() const; + const TQString &icon() const; /** * Returns true if properties based on this template should @@ -119,9 +119,9 @@ class KOPETE_EXPORT ContactPropertyTmpl bool isNull() const; /** - * A Map of QString and ContactPropertyTmpl objects, based on QMap + * A Map of TQString and ContactPropertyTmpl objects, based on QMap **/ - typedef QMap Map; + typedef TQMap Map; private: ContactPropertyTmplPrivate *d; @@ -149,7 +149,7 @@ class KOPETE_EXPORT ContactProperty * @param tmpl The contact property template this property is based on * @param value The value this Property holds **/ - ContactProperty(const ContactPropertyTmpl &tmpl, const QVariant &value); + ContactProperty(const ContactPropertyTmpl &tmpl, const TQVariant &value); /** Destructor **/ ~ContactProperty(); @@ -162,7 +162,7 @@ class KOPETE_EXPORT ContactProperty /** * Getter for this properties value **/ - const QVariant &value() const; + const TQVariant &value() const; /** * The null, i.e. empty, ContactProperty @@ -183,10 +183,10 @@ class KOPETE_EXPORT ContactProperty /** * A map of key,ContactProperty items **/ - typedef QMap Map; + typedef TQMap Map; private: - QVariant mValue; + TQVariant mValue; ContactPropertyTmpl mTemplate; }; diff --git a/kopete/libkopete/kopeteeventpresentation.cpp b/kopete/libkopete/kopeteeventpresentation.cpp index f90a19e5..659b1b41 100644 --- a/kopete/libkopete/kopeteeventpresentation.cpp +++ b/kopete/libkopete/kopeteeventpresentation.cpp @@ -23,7 +23,7 @@ Kopete::EventPresentation::EventPresentation( const PresentationType type ) } Kopete::EventPresentation::EventPresentation( const PresentationType type, - const QString &content, const bool singleShot, const bool enabled ) + const TQString &content, const bool singleShot, const bool enabled ) { m_type = type; m_content = content; @@ -40,7 +40,7 @@ Kopete::EventPresentation::PresentationType Kopete::EventPresentation::type() return m_type; } -QString Kopete::EventPresentation::content() +TQString Kopete::EventPresentation::content() { return m_content; } @@ -55,7 +55,7 @@ bool Kopete::EventPresentation::singleShot() return m_singleShot; } -void Kopete::EventPresentation::setContent( const QString &content ) +void Kopete::EventPresentation::setContent( const TQString &content ) { m_content = content; } @@ -70,21 +70,21 @@ void Kopete::EventPresentation::setSingleShot( const bool singleShot ) m_singleShot = singleShot; } -QString Kopete::EventPresentation::toString() +TQString Kopete::EventPresentation::toString() { - QString type; + TQString type; switch ( m_type ) { case Sound: - type= QString::fromLatin1("sound"); + type= TQString::fromLatin1("sound"); break; case Message: - type= QString::fromLatin1("message"); + type= TQString::fromLatin1("message"); break; case Chat: - type= QString::fromLatin1("chat"); + type= TQString::fromLatin1("chat"); break; } - QString stringRep = QString::fromLatin1( "Presentation; type=%1; content=%2; enabled=%3; single shot=%4\n" ).arg(type).arg(m_content).arg(m_enabled).arg(m_singleShot); + TQString stringRep = TQString::fromLatin1( "Presentation; type=%1; content=%2; enabled=%3; single shot=%4\n" ).arg(type).arg(m_content).arg(m_enabled).arg(m_singleShot); return stringRep; } diff --git a/kopete/libkopete/kopeteeventpresentation.h b/kopete/libkopete/kopeteeventpresentation.h index ea30cb5d..0576a9b1 100644 --- a/kopete/libkopete/kopeteeventpresentation.h +++ b/kopete/libkopete/kopeteeventpresentation.h @@ -18,7 +18,7 @@ #ifndef KOPETEEVENTPRESENTATION_H #define KOPETEEVENTPRESENTATION_H -#include +#include #include "kopete_export.h" @@ -31,22 +31,22 @@ public: enum PresentationType { Sound, Message, Chat }; EventPresentation( const PresentationType type ); EventPresentation( const PresentationType type, - const QString &content = QString::null, + const TQString &content = TQString::null, const bool singleShot = false, const bool enabled = false ); ~EventPresentation(); PresentationType type(); - QString content(); + TQString content(); bool enabled(); bool singleShot(); - void setContent( const QString &content ); + void setContent( const TQString &content ); void setEnabled( const bool enabled ); void setSingleShot( const bool singleShot ); - QString toString(); + TQString toString(); private: PresentationType m_type; - QString m_content; + TQString m_content; bool m_enabled; bool m_singleShot; }; diff --git a/kopete/libkopete/kopeteglobal.cpp b/kopete/libkopete/kopeteglobal.cpp index a11dafdd..093be4df 100644 --- a/kopete/libkopete/kopeteglobal.cpp +++ b/kopete/libkopete/kopeteglobal.cpp @@ -67,7 +67,7 @@ Properties::~Properties() delete d; } -const ContactPropertyTmpl &Properties::tmpl(const QString &key) const +const ContactPropertyTmpl &Properties::tmpl(const TQString &key) const { if(d->mTemplates.contains(key)) { @@ -79,7 +79,7 @@ const ContactPropertyTmpl &Properties::tmpl(const QString &key) const return ContactPropertyTmpl::null; } -bool Properties::registerTemplate(const QString &key, +bool Properties::registerTemplate(const TQString &key, const ContactPropertyTmpl &tmpl) { if(d->mTemplates.contains(key)) @@ -95,104 +95,104 @@ bool Properties::registerTemplate(const QString &key, } } -void Properties::unregisterTemplate(const QString &key) +void Properties::unregisterTemplate(const TQString &key) { kdDebug(14000) << k_funcinfo << "called for key: '" << key << "'" << endl; d->mTemplates.remove(key); } -bool Properties::isRegistered(const QString &key) +bool Properties::isRegistered(const TQString &key) { return d->mTemplates.contains(key); } const ContactPropertyTmpl &Properties::fullName() const { - return createProp(QString::fromLatin1("FormattedName"), + return createProp(TQString::fromLatin1("FormattedName"), i18n("Full Name")); } const ContactPropertyTmpl &Properties::idleTime() const { - return createProp(QString::fromLatin1("idleTime"), + return createProp(TQString::fromLatin1("idleTime"), i18n("Idle Time")); } const ContactPropertyTmpl &Properties::onlineSince() const { - return createProp(QString::fromLatin1("onlineSince"), + return createProp(TQString::fromLatin1("onlineSince"), i18n("Online Since")); } const ContactPropertyTmpl &Properties::lastSeen() const { - return createProp(QString::fromLatin1("lastSeen"), - i18n("Last Seen"), QString::null, true); + return createProp(TQString::fromLatin1("lastSeen"), + i18n("Last Seen"), TQString::null, true); } const ContactPropertyTmpl &Properties::awayMessage() const { - return createProp(QString::fromLatin1("awayMessage"), + return createProp(TQString::fromLatin1("awayMessage"), i18n("Away Message")); } const ContactPropertyTmpl &Properties::firstName() const { - return createProp(QString::fromLatin1("firstName"), - i18n("First Name"), QString::null, true); + return createProp(TQString::fromLatin1("firstName"), + i18n("First Name"), TQString::null, true); } const ContactPropertyTmpl &Properties::lastName() const { - return createProp(QString::fromLatin1("lastName"), - i18n("Last Name"), QString::null, true); + return createProp(TQString::fromLatin1("lastName"), + i18n("Last Name"), TQString::null, true); } const ContactPropertyTmpl &Properties::privatePhone() const { - return createProp(QString::fromLatin1("privatePhoneNumber"), - i18n("Private Phone"), QString::null, true); + return createProp(TQString::fromLatin1("privatePhoneNumber"), + i18n("Private Phone"), TQString::null, true); } const ContactPropertyTmpl &Properties::privateMobilePhone() const { - return createProp(QString::fromLatin1("privateMobilePhoneNumber"), - i18n("Private Mobile Phone"), QString::null, true); + return createProp(TQString::fromLatin1("privateMobilePhoneNumber"), + i18n("Private Mobile Phone"), TQString::null, true); } const ContactPropertyTmpl &Properties::workPhone() const { - return createProp(QString::fromLatin1("workPhoneNumber"), - i18n("Work Phone"), QString::null, true); + return createProp(TQString::fromLatin1("workPhoneNumber"), + i18n("Work Phone"), TQString::null, true); } const ContactPropertyTmpl &Properties::workMobilePhone() const { - return createProp(QString::fromLatin1("workMobilePhoneNumber"), - i18n("Work Mobile Phone"), QString::null, true); + return createProp(TQString::fromLatin1("workMobilePhoneNumber"), + i18n("Work Mobile Phone"), TQString::null, true); } const ContactPropertyTmpl &Properties::emailAddress() const { - return createProp(QString::fromLatin1("emailAddress"), - i18n("Email Address"), QString::fromLatin1("mail_generic"), true); + return createProp(TQString::fromLatin1("emailAddress"), + i18n("Email Address"), TQString::fromLatin1("mail_generic"), true); } const ContactPropertyTmpl &Properties::nickName() const { - return createProp(QString::fromLatin1("nickName"), - i18n("Nick Name"), QString::null, true); + return createProp(TQString::fromLatin1("nickName"), + i18n("Nick Name"), TQString::null, true); } const ContactPropertyTmpl &Properties::photo() const { - return createProp(QString::fromLatin1("photo"), - i18n("Photo"), QString::null, true); + return createProp(TQString::fromLatin1("photo"), + i18n("Photo"), TQString::null, true); } -const ContactPropertyTmpl &Properties::createProp(const QString &key, - const QString &label, const QString &icon, bool persistent) const +const ContactPropertyTmpl &Properties::createProp(const TQString &key, + const TQString &label, const TQString &icon, bool persistent) const { /*kdDebug(14000) << k_funcinfo << "key = " << key << ", label = " << label << endl;*/ @@ -216,15 +216,15 @@ const ContactPropertyTmpl::Map &Properties::templateMap() const // ----------------------------------------------------------------------------- -void installEmoticonTheme(const QString &archiveName) +void installEmoticonTheme(const TQString &archiveName) { - QStringList foundThemes; + TQStringList foundThemes; KArchiveEntry *currentEntry = 0L; KArchiveDirectory* currentDir = 0L; KProgressDialog *progressDlg = 0L; KArchive *archive = 0L; - QString localThemesDir(locateLocal("emoticons", QString::null) ); + TQString localThemesDir(locateLocal("emoticons", TQString::null) ); if(localThemesDir.isEmpty()) { @@ -235,20 +235,20 @@ void installEmoticonTheme(const QString &archiveName) } progressDlg = new KProgressDialog(0 , "emoticonInstProgress", - i18n("Installing Emoticon Themes..."), QString::null, true); + i18n("Installing Emoticon Themes..."), TQString::null, true); progressDlg->progressBar()->setTotalSteps(foundThemes.count()); progressDlg->show(); kapp->processEvents(); - QString currentBundleMimeType = KMimeType::findByPath(archiveName, 0, false)->name(); - if( currentBundleMimeType == QString::fromLatin1("application/x-zip") ) + TQString currentBundleMimeType = KMimeType::findByPath(archiveName, 0, false)->name(); + if( currentBundleMimeType == TQString::fromLatin1("application/x-zip") ) archive = new KZip(archiveName); - else if( currentBundleMimeType == QString::fromLatin1("application/x-tgz") || - currentBundleMimeType == QString::fromLatin1("application/x-tbz") || - currentBundleMimeType == QString::fromLatin1("application/x-gzip") || - currentBundleMimeType == QString::fromLatin1("application/x-bzip2") ) + else if( currentBundleMimeType == TQString::fromLatin1("application/x-tgz") || + currentBundleMimeType == TQString::fromLatin1("application/x-tbz") || + currentBundleMimeType == TQString::fromLatin1("application/x-gzip") || + currentBundleMimeType == TQString::fromLatin1("application/x-bzip2") ) archive = new KTar(archiveName); - else if(archiveName.endsWith(QString::fromLatin1("jisp")) || archiveName.endsWith(QString::fromLatin1("zip")) ) + else if(archiveName.endsWith(TQString::fromLatin1("jisp")) || archiveName.endsWith(TQString::fromLatin1("zip")) ) archive = new KZip(archiveName); else archive = new KTar(archiveName); @@ -266,15 +266,15 @@ void installEmoticonTheme(const QString &archiveName) const KArchiveDirectory* rootDir = archive->directory(); // iterate all the dirs looking for an emoticons.xml file - QStringList entries = rootDir->entries(); - for (QStringList::Iterator it = entries.begin(); it != entries.end(); ++it) + TQStringList entries = rootDir->entries(); + for (TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it) { currentEntry = const_cast(rootDir->entry(*it)); if (currentEntry->isDirectory()) { currentDir = dynamic_cast( currentEntry ); - if (currentDir && ( currentDir->entry(QString::fromLatin1("emoticons.xml")) != NULL || - currentDir->entry(QString::fromLatin1("icondef.xml")) != NULL ) ) + if (currentDir && ( currentDir->entry(TQString::fromLatin1("emoticons.xml")) != NULL || + currentDir->entry(TQString::fromLatin1("icondef.xml")) != NULL ) ) foundThemes.append(currentDir->name()); } } @@ -290,7 +290,7 @@ void installEmoticonTheme(const QString &archiveName) return; } - for (QStringList::ConstIterator it = foundThemes.begin(); it != foundThemes.end(); ++it) + for (TQStringList::ConstIterator it = foundThemes.begin(); it != foundThemes.end(); ++it) { progressDlg->setLabel( i18n("Installing %1 emoticon theme") diff --git a/kopete/libkopete/kopeteglobal.h b/kopete/libkopete/kopeteglobal.h index aa6456f4..395d0eae 100644 --- a/kopete/libkopete/kopeteglobal.h +++ b/kopete/libkopete/kopeteglobal.h @@ -47,7 +47,7 @@ namespace Global * * TODO: If possible, port it to KIO instead of using ugly blocking KTar **/ - KOPETE_EXPORT void installEmoticonTheme(const QString &localPath); + KOPETE_EXPORT void installEmoticonTheme(const TQString &localPath); /** * \brief Global facility to query/store templates that are needed by KopeteContactProperty @@ -72,7 +72,7 @@ namespace Global * Return a template with defined by @p key, if no such template has * been registered ContactPropertyTmpl::null will be returned */ - const ContactPropertyTmpl &tmpl(const QString &key) const; + const ContactPropertyTmpl &tmpl(const TQString &key) const; /** * @return a ready-to-use template for a contact's full name. @@ -135,8 +135,8 @@ namespace Global /** * default template for a contact's photo. * - * It could be either a QString or a QImage. - * If it's a QString, it should points to the path the image is stored. + * It could be either a TQString or a TQImage. + * If it's a TQString, it should points to the path the image is stored. */ const ContactPropertyTmpl &photo() const; @@ -149,18 +149,18 @@ namespace Global * return true if a template with key @p key is already registered, * false otherwise */ - bool isRegistered(const QString &key); + bool isRegistered(const TQString &key); private: Properties(); ~Properties(); - bool registerTemplate(const QString &key, + bool registerTemplate(const TQString &key, const ContactPropertyTmpl &tmpl); - void unregisterTemplate(const QString &key); + void unregisterTemplate(const TQString &key); - const ContactPropertyTmpl &createProp(const QString &key, - const QString &label, const QString &icon=QString::null, + const ContactPropertyTmpl &createProp(const TQString &key, + const TQString &label, const TQString &icon=TQString::null, bool persistent = false) const; private: diff --git a/kopete/libkopete/kopetegroup.cpp b/kopete/libkopete/kopetegroup.cpp index f50eb08b..6206545a 100644 --- a/kopete/libkopete/kopetegroup.cpp +++ b/kopete/libkopete/kopetegroup.cpp @@ -30,7 +30,7 @@ namespace Kopete { class Group::Private { public: - QString displayName; + TQString displayName; Group::GroupType type; bool expanded; uint groupId; @@ -59,7 +59,7 @@ Group * Group::temporary() uint Group::Private::uniqueGroupId = 0; -Group::Group( const QString &_name, GroupType _type ) +Group::Group( const TQString &_name, GroupType _type ) : ContactListElement( ContactList::self() ) { d = new Private; @@ -87,9 +87,9 @@ Group::~Group() delete d; } -QPtrList Group::members() const +TQPtrList Group::members() const { - QPtrList members = ContactList::self()->metaContacts(); + TQPtrList members = ContactList::self()->metaContacts(); // members is a *copy* of the meta contacts, so using first(), next() and remove() is fine. for( members.first(); members.current(); ) { @@ -101,49 +101,49 @@ QPtrList Group::members() const return members; } -const QDomElement Group::toXML() +const TQDomElement Group::toXML() { - QDomDocument group; - group.appendChild( group.createElement( QString::fromLatin1( "kopete-group" ) ) ); - group.documentElement().setAttribute( QString::fromLatin1( "groupId" ), QString::number( groupId() ) ); + TQDomDocument group; + group.appendChild( group.createElement( TQString::fromLatin1( "kopete-group" ) ) ); + group.documentElement().setAttribute( TQString::fromLatin1( "groupId" ), TQString::number( groupId() ) ); - QString type; + TQString type; switch ( d->type ) { case Temporary: - type = QString::fromLatin1( "temporary" ); + type = TQString::fromLatin1( "temporary" ); break; case TopLevel: - type = QString::fromLatin1( "top-level" ); + type = TQString::fromLatin1( "top-level" ); break; default: - type = QString::fromLatin1( "standard" ); // == Normal + type = TQString::fromLatin1( "standard" ); // == Normal break; } - group.documentElement().setAttribute( QString::fromLatin1( "type" ), type ); - group.documentElement().setAttribute( QString::fromLatin1( "view" ), QString::fromLatin1( d->expanded ? "expanded" : "collapsed" ) ); + group.documentElement().setAttribute( TQString::fromLatin1( "type" ), type ); + group.documentElement().setAttribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( d->expanded ? "expanded" : "collapsed" ) ); - QDomElement displayName = group.createElement( QString::fromLatin1( "display-name" ) ); + TQDomElement displayName = group.createElement( TQString::fromLatin1( "display-name" ) ); displayName.appendChild( group.createTextNode( d->displayName ) ); group.documentElement().appendChild( displayName ); // Store other plugin data - QValueList pluginData = ContactListElement::toXML(); - for ( QValueList::Iterator it = pluginData.begin(); it != pluginData.end(); ++it ) + TQValueList pluginData = ContactListElement::toXML(); + for ( TQValueList::Iterator it = pluginData.begin(); it != pluginData.end(); ++it ) group.documentElement().appendChild( group.importNode( *it, true ) ); // Store custom notification data - QDomElement notifyData = Kopete::NotifyDataObject::notifyDataToXML(); + TQDomElement notifyData = Kopete::NotifyDataObject::notifyDataToXML(); if ( notifyData.hasChildNodes() ) group.documentElement().appendChild( group.importNode( notifyData, true ) ); return group.documentElement(); } -bool Group::fromXML( const QDomElement &data ) +bool Group::fromXML( const TQDomElement &data ) { - QString strGroupId = data.attribute( QString::fromLatin1( "groupId" ) ); + TQString strGroupId = data.attribute( TQString::fromLatin1( "groupId" ) ); if ( !strGroupId.isEmpty() ) { d->groupId = strGroupId.toUInt(); @@ -154,8 +154,8 @@ bool Group::fromXML( const QDomElement &data ) // Don't overwrite type for Temporary and TopLevel groups if ( d->type != Temporary && d->type != TopLevel ) { - QString type = data.attribute( QString::fromLatin1( "type" ), QString::fromLatin1( "standard" ) ); - if ( type == QString::fromLatin1( "temporary" ) ) + TQString type = data.attribute( TQString::fromLatin1( "type" ), TQString::fromLatin1( "standard" ) ); + if ( type == TQString::fromLatin1( "temporary" ) ) { if ( d->type != Temporary ) { @@ -163,7 +163,7 @@ bool Group::fromXML( const QDomElement &data ) return false; } } - else if ( type == QString::fromLatin1( "top-level" ) ) + else if ( type == TQString::fromLatin1( "top-level" ) ) { if ( d->type != TopLevel ) { @@ -177,20 +177,20 @@ bool Group::fromXML( const QDomElement &data ) } } - QString view = data.attribute( QString::fromLatin1( "view" ), QString::fromLatin1( "expanded" ) ); - d->expanded = ( view != QString::fromLatin1( "collapsed" ) ); + TQString view = data.attribute( TQString::fromLatin1( "view" ), TQString::fromLatin1( "expanded" ) ); + d->expanded = ( view != TQString::fromLatin1( "collapsed" ) ); - QDomNode groupData = data.firstChild(); + TQDomNode groupData = data.firstChild(); while ( !groupData.isNull() ) { - QDomElement groupElement = groupData.toElement(); - if ( groupElement.tagName() == QString::fromLatin1( "display-name" ) ) + TQDomElement groupElement = groupData.toElement(); + if ( groupElement.tagName() == TQString::fromLatin1( "display-name" ) ) { // Don't set display name for temporary or top-level items if ( d->type == Normal ) d->displayName = groupElement.text(); } - else if( groupElement.tagName() == QString::fromLatin1( "custom-notifications" ) ) + else if( groupElement.tagName() == TQString::fromLatin1( "custom-notifications" ) ) { Kopete::NotifyDataObject::notifyDataFromXML( groupElement ); } @@ -208,10 +208,10 @@ bool Group::fromXML( const QDomElement &data ) switch ( d->type ) { case Temporary: - d->displayName = QString::fromLatin1( "Temporary" ); + d->displayName = TQString::fromLatin1( "Temporary" ); break; case TopLevel: - d->displayName = QString::fromLatin1( "Top-Level" ); + d->displayName = TQString::fromLatin1( "Top-Level" ); break; default: d->displayName = i18n( "(Unnamed Group)" ); @@ -223,17 +223,17 @@ bool Group::fromXML( const QDomElement &data ) return ( d->type == Normal ); } -void Group::setDisplayName( const QString &s ) +void Group::setDisplayName( const TQString &s ) { if ( d->displayName != s ) { - QString oldname = d->displayName; + TQString oldname = d->displayName; d->displayName = s; emit displayNameChanged( this, oldname ); } } -QString Group::displayName() const +TQString Group::displayName() const { return d->displayName; } @@ -269,7 +269,7 @@ uint Group::groupId() const void Group::sendMessage() { - QPtrList list = onlineMembers(); + TQPtrList list = onlineMembers(); Kopete::MetaContact *mc = list.first(); Kopete::Contact *c; @@ -279,18 +279,18 @@ void Group::sendMessage() c->sendMessage(); if( c->manager( Contact::CanCreate ) ) { - connect( c->manager(), SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), this, SLOT( sendMessage( Kopete::Message& ) )); + connect( c->manager(), TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), this, TQT_SLOT( sendMessage( Kopete::Message& ) )); } } void Group::sendMessage( Message& msg ) { - QPtrList list = onlineMembers(); + TQPtrList list = onlineMembers(); Kopete::MetaContact *mc = list.first(); ChatSession *cs=msg.manager(); if( cs ) { - disconnect( cs, SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), this, SLOT( sendMessage( Kopete::Message& ) ) ); + disconnect( cs, TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession* ) ), this, TQT_SLOT( sendMessage( Kopete::Message& ) ) ); } else return; @@ -314,9 +314,9 @@ void Group::sendMessage( Message& msg ) } } -QPtrList Group::onlineMembers() const +TQPtrList Group::onlineMembers() const { - QPtrList list = members(); + TQPtrList list = members(); for( list.first(); list.current(); ) if( list.current()->isReachable() && list.current()->isOnline() ) diff --git a/kopete/libkopete/kopetegroup.h b/kopete/libkopete/kopetegroup.h index 37b8572d..e832e955 100644 --- a/kopete/libkopete/kopetegroup.h +++ b/kopete/libkopete/kopetegroup.h @@ -24,7 +24,7 @@ #include "kopete_export.h" -#include +#include class QDomElement; @@ -46,7 +46,7 @@ class Message; */ class KOPETE_EXPORT Group : public ContactListElement, public NotifyDataObject { - Q_PROPERTY( QString displayName READ displayName WRITE setDisplayName ) + Q_PROPERTY( TQString displayName READ displayName WRITE setDisplayName ) Q_PROPERTY( uint groupId READ groupId ) Q_PROPERTY( bool expanded READ isExpanded WRITE setExpanded ) @@ -69,7 +69,7 @@ public: * * Overloaded constructor to create a group with a display name of the specified type. */ - Group( const QString &displayName, GroupType type = Normal ); + Group( const TQString &displayName, GroupType type = Normal ); ~Group(); @@ -78,12 +78,12 @@ public: * * \return the display name of the group */ - QString displayName() const; + TQString displayName() const; /** * \brief Rename the group */ - void setDisplayName( const QString &newName ); + void setDisplayName( const TQString &newName ); /** * \return the group type @@ -105,7 +105,7 @@ public: * This function is not very efficient - it searches through all the metacontacts in the contact list * \return the members of this group */ - QPtrList members() const; + TQPtrList members() const; /** * \brief Set if the group is expanded. @@ -137,14 +137,14 @@ public: * @internal * Outputs the group data in XML */ - const QDomElement toXML(); + const TQDomElement toXML(); /** * @internal * Loads the group data from XML */ - bool fromXML( const QDomElement &data ); + bool fromXML( const TQDomElement &data ); @@ -160,7 +160,7 @@ signals: /** * \brief Emitted when the group has been renamed */ - void displayNameChanged( Kopete::Group *group , const QString &oldName ); + void displayNameChanged( Kopete::Group *group , const TQString &oldName ); private slots: @@ -177,7 +177,7 @@ private: /** * @internal used to get reachabe contact to send message to thom. */ - QPtrList onlineMembers() const; + TQPtrList onlineMembers() const; }; } //END namespace Kopete diff --git a/kopete/libkopete/kopetemessage.cpp b/kopete/libkopete/kopetemessage.cpp index 54761799..6f223748 100644 --- a/kopete/libkopete/kopetemessage.cpp +++ b/kopete/libkopete/kopetemessage.cpp @@ -18,18 +18,18 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include -#include +#include #include "kopetemessage.h" #include "kopetemetacontact.h" @@ -46,81 +46,81 @@ class Message::Private : public KShared { public: - Private( const QDateTime &timeStamp, const Contact *from, const ContactPtrList &to, - const QString &subject, MessageDirection direction, - const QString &requestedPlugin, MessageType type ); + Private( const TQDateTime &timeStamp, const Contact *from, const ContactPtrList &to, + const TQString &subject, MessageDirection direction, + const TQString &requestedPlugin, MessageType type ); - QGuardedPtr from; + TQGuardedPtr from; ContactPtrList to; ChatSession *manager; MessageDirection direction; MessageFormat format; MessageType type; - QString requestedPlugin; + TQString requestedPlugin; MessageImportance importance; bool bgOverride; bool fgOverride; bool rtfOverride; bool isRightToLeft; - QDateTime timeStamp; - QFont font; + TQDateTime timeStamp; + TQFont font; - QColor fgColor; - QColor bgColor; - QString body; - QString subject; + TQColor fgColor; + TQColor bgColor; + TQString body; + TQString subject; }; -Message::Private::Private( const QDateTime &timeStamp, const Contact *from, - const ContactPtrList &to, const QString &subject, - MessageDirection direction, const QString &requestedPlugin, MessageType type ) +Message::Private::Private( const TQDateTime &timeStamp, const Contact *from, + const ContactPtrList &to, const TQString &subject, + MessageDirection direction, const TQString &requestedPlugin, MessageType type ) : from( from ), to( to ), manager( 0 ), direction( direction ), format( PlainText ), type( type ), requestedPlugin( requestedPlugin ), importance( (to.count() <= 1) ? Normal : Low ), bgOverride( false ), fgOverride( false ), rtfOverride( false ), isRightToLeft( false ), - timeStamp( timeStamp ), body( QString::null ), subject( subject ) + timeStamp( timeStamp ), body( TQString::null ), subject( subject ) { } Message::Message() -: d( new Private( QDateTime::currentDateTime(), 0L, QPtrList(), QString::null, Internal, - QString::null, TypeNormal ) ) +: d( new Private( TQDateTime::currentDateTime(), 0L, TQPtrList(), TQString::null, Internal, + TQString::null, TypeNormal ) ) { } -Message::Message( const Contact *fromKC, const QPtrList &toKC, const QString &body, - MessageDirection direction, MessageFormat f, const QString &requestedPlugin, MessageType type ) -: d( new Private( QDateTime::currentDateTime(), fromKC, toKC, QString::null, direction, requestedPlugin, type ) ) +Message::Message( const Contact *fromKC, const TQPtrList &toKC, const TQString &body, + MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) +: d( new Private( TQDateTime::currentDateTime(), fromKC, toKC, TQString::null, direction, requestedPlugin, type ) ) { doSetBody( body, f ); } -Message::Message( const Contact *fromKC, const Contact *toKC, const QString &body, - MessageDirection direction, MessageFormat f, const QString &requestedPlugin, MessageType type ) +Message::Message( const Contact *fromKC, const Contact *toKC, const TQString &body, + MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) { - QPtrList to; + TQPtrList to; to.append(toKC); - d = new Private( QDateTime::currentDateTime(), fromKC, to, QString::null, direction, requestedPlugin, type ); + d = new Private( TQDateTime::currentDateTime(), fromKC, to, TQString::null, direction, requestedPlugin, type ); doSetBody( body, f ); } -Message::Message( const Contact *fromKC, const QPtrList &toKC, const QString &body, - const QString &subject, MessageDirection direction, MessageFormat f, const QString &requestedPlugin, MessageType type ) - : d( new Private( QDateTime::currentDateTime(), fromKC, toKC, subject, direction, requestedPlugin, type ) ) +Message::Message( const Contact *fromKC, const TQPtrList &toKC, const TQString &body, + const TQString &subject, MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) + : d( new Private( TQDateTime::currentDateTime(), fromKC, toKC, subject, direction, requestedPlugin, type ) ) { doSetBody( body, f ); } -Message::Message( const QDateTime &timeStamp, const Contact *fromKC, const QPtrList &toKC, - const QString &body, MessageDirection direction, MessageFormat f, const QString &requestedPlugin, MessageType type ) - : d( new Private( timeStamp, fromKC, toKC, QString::null, direction, requestedPlugin, type ) ) +Message::Message( const TQDateTime &timeStamp, const Contact *fromKC, const TQPtrList &toKC, + const TQString &body, MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) + : d( new Private( timeStamp, fromKC, toKC, TQString::null, direction, requestedPlugin, type ) ) { doSetBody( body, f ); } -Message::Message( const QDateTime &timeStamp, const Contact *fromKC, const QPtrList &toKC, - const QString &body, const QString &subject, MessageDirection direction, MessageFormat f, const QString &requestedPlugin, MessageType type ) +Message::Message( const TQDateTime &timeStamp, const Contact *fromKC, const TQPtrList &toKC, + const TQString &body, const TQString &subject, MessageDirection direction, MessageFormat f, const TQString &requestedPlugin, MessageType type ) : d( new Private( timeStamp, fromKC, toKC, subject, direction, requestedPlugin, type ) ) { doSetBody( body, f ); @@ -172,47 +172,47 @@ void Message::setRtfOverride( bool enabled ) d->rtfOverride = enabled; } -void Message::setFg( const QColor &color ) +void Message::setFg( const TQColor &color ) { detach(); d->fgColor=color; } -void Message::setBg( const QColor &color ) +void Message::setBg( const TQColor &color ) { detach(); d->bgColor=color; } -void Message::setFont( const QFont &font ) +void Message::setFont( const TQFont &font ) { detach(); d->font = font; } -void Message::doSetBody( const QString &_body, Message::MessageFormat f ) +void Message::doSetBody( const TQString &_body, Message::MessageFormat f ) { - QString body = _body; + TQString body = _body; //TODO: move that in ChatTextEditPart::contents if( f == RichText ) { //This is coming from the RichTextEditor component. //Strip off the containing HTML document - body.replace( QRegExp( QString::fromLatin1(".*]*>(.*).*") ), QString::fromLatin1("\\1") ); + body.replace( TQRegExp( TQString::fromLatin1(".*]*>(.*).*") ), TQString::fromLatin1("\\1") ); //Strip

    tags - body.replace( QString::fromLatin1("

    "), QString::null ); + body.replace( TQString::fromLatin1("

    "), TQString::null ); //Replace

    with a
    - body.replace( QString::fromLatin1("

    "), QString::fromLatin1("
    ") ); + body.replace( TQString::fromLatin1("

    "), TQString::fromLatin1("
    ") ); //Remove trailing
    - if ( body.endsWith( QString::fromLatin1("
    ") ) ) + if ( body.endsWith( TQString::fromLatin1("
    ") ) ) body.truncate( body.length() - 5 ); - body.remove( QString::fromLatin1("\n") ); - body.replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ), QString::fromLatin1( "  " ) ); + body.remove( TQString::fromLatin1("\n") ); + body.replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( "  " ) ); } /* else if( f == ParsedHTML ) @@ -229,7 +229,7 @@ void Message::doSetBody( const QString &_body, Message::MessageFormat f ) d->isRightToLeft = ( f & RichText ? unescape( d->body ).isRightToLeft() : d->body.isRightToLeft() ); } -void Message::setBody( const QString &body, MessageFormat f ) +void Message::setBody( const TQString &body, MessageFormat f ) { detach(); @@ -247,9 +247,9 @@ void Message::setImportance(Message::MessageImportance i) d->importance = i; } -QString Message::unescape( const QString &xml ) +TQString Message::unescape( const TQString &xml ) { - QString data = xml; + TQString data = xml; // Remove linebreak and multiple spaces. First return nbsp's to normal spaces :) data.simplifyWhiteSpace(); @@ -263,13 +263,13 @@ QString Message::unescape( const QString &xml ) // Take the part between < and >, and extract the element name from that int matchWidth = endPos - pos + 1; - QString match = data.mid( pos + 1, matchWidth - 2 ).simplifyWhiteSpace(); + TQString match = data.mid( pos + 1, matchWidth - 2 ).simplifyWhiteSpace(); int elemEndPos = match.find( ' ' ); - QString elem = ( elemEndPos == -1 ? match.lower() : match.left( elemEndPos ).lower() ); - if ( elem == QString::fromLatin1( "img" ) ) + TQString elem = ( elemEndPos == -1 ? match.lower() : match.left( elemEndPos ).lower() ); + if ( elem == TQString::fromLatin1( "img" ) ) { // Replace smileys with their original text' - const QString attrTitle = QString::fromLatin1( "title=\"" ); + const TQString attrTitle = TQString::fromLatin1( "title=\"" ); int titlePos = match.find( attrTitle, elemEndPos ); int titleEndPos = match.find( '"', titlePos + attrTitle.length() ); if( titlePos == -1 || titleEndPos == -1 ) @@ -280,14 +280,14 @@ QString Message::unescape( const QString &xml ) } else { - QString orig = match.mid( titlePos + attrTitle.length(), + TQString orig = match.mid( titlePos + attrTitle.length(), titleEndPos - titlePos - attrTitle.length() ); data.replace( pos, matchWidth, orig ); pos += orig.length(); } } - else if ( elem == QString::fromLatin1( "/p" ) || elem == QString::fromLatin1( "/div" ) || - elem == QString::fromLatin1( "br" ) ) + else if ( elem == TQString::fromLatin1( "/p" ) || elem == TQString::fromLatin1( "/div" ) || + elem == TQString::fromLatin1( "br" ) ) { // Replace paragraph, div and line breaks with a newline data.replace( pos, matchWidth, '\n' ); @@ -302,36 +302,36 @@ QString Message::unescape( const QString &xml ) } // Replace stuff starting with '&' - data.replace( QString::fromLatin1( ">" ), QString::fromLatin1( ">" ) ); - data.replace( QString::fromLatin1( "<" ), QString::fromLatin1( "<" ) ); - data.replace( QString::fromLatin1( """ ), QString::fromLatin1( "\"" ) ); - data.replace( QString::fromLatin1( " " ), QString::fromLatin1( " " ) ); - data.replace( QString::fromLatin1( "&" ), QString::fromLatin1( "&" ) ); - data.replace( QString::fromLatin1( " " ), QString::fromLatin1( " " ) ); //this one is used in jabber: note, we should escape all &#xx; + data.replace( TQString::fromLatin1( ">" ), TQString::fromLatin1( ">" ) ); + data.replace( TQString::fromLatin1( "<" ), TQString::fromLatin1( "<" ) ); + data.replace( TQString::fromLatin1( """ ), TQString::fromLatin1( "\"" ) ); + data.replace( TQString::fromLatin1( " " ), TQString::fromLatin1( " " ) ); + data.replace( TQString::fromLatin1( "&" ), TQString::fromLatin1( "&" ) ); + data.replace( TQString::fromLatin1( " " ), TQString::fromLatin1( " " ) ); //this one is used in jabber: note, we should escape all &#xx; return data; } -QString Message::escape( const QString &text ) +TQString Message::escape( const TQString &text ) { - QString html = QStyleSheet::escape( text ); + TQString html = TQStyleSheet::escape( text ); //Replace carriage returns inside the text - html.replace( QString::fromLatin1( "\n" ), QString::fromLatin1( "
    " ) ); + html.replace( TQString::fromLatin1( "\n" ), TQString::fromLatin1( "
    " ) ); //Replace a tab with 4 spaces - html.replace( QString::fromLatin1( "\t" ), QString::fromLatin1( "    " ) ); + html.replace( TQString::fromLatin1( "\t" ), TQString::fromLatin1( "    " ) ); //Replace multiple spaces with   //do not replace every space so we break the linebreak - html.replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ), QString::fromLatin1( "  " ) ); + html.replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( "  " ) ); return html; } -QString Message::plainBody() const +TQString Message::plainBody() const { - QString body=d->body; + TQString body=d->body; if( d->format & RichText ) { body = unescape( body ); @@ -339,9 +339,9 @@ QString Message::plainBody() const return body; } -QString Message::escapedBody() const +TQString Message::escapedBody() const { - QString escapedBody=d->body; + TQString escapedBody=d->body; // kdDebug(14000) << k_funcinfo << escapedBody << " " << d->rtfOverride << endl; if( d->format & PlainText ) @@ -357,7 +357,7 @@ QString Message::escapedBody() const return escapedBody; } -QString Message::parsedBody() const +TQString Message::parsedBody() const { //kdDebug(14000) << k_funcinfo << "messageformat: " << d->format << endl; @@ -371,16 +371,16 @@ QString Message::parsedBody() const } } -static QString makeRegExp( const char *pattern ) +static TQString makeRegExp( const char *pattern ) { - const QString urlChar = QString::fromLatin1( "\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); - const QString boundaryStart = QString::fromLatin1( "(^|[^%1])(" ).arg( urlChar ); - const QString boundaryEnd = QString::fromLatin1( ")([^%1]|$)" ).arg( urlChar ); + const TQString urlChar = TQString::fromLatin1( "\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); + const TQString boundaryStart = TQString::fromLatin1( "(^|[^%1])(" ).arg( urlChar ); + const TQString boundaryEnd = TQString::fromLatin1( ")([^%1]|$)" ).arg( urlChar ); - return boundaryStart + QString::fromLatin1(pattern) + boundaryEnd; + return boundaryStart + TQString::fromLatin1(pattern) + boundaryEnd; } -QString Message::parseLinks( const QString &message, MessageFormat format ) +TQString Message::parseLinks( const TQString &message, MessageFormat format ) { if ( format == ParsedHTML ) return message; @@ -388,9 +388,9 @@ QString Message::parseLinks( const QString &message, MessageFormat format ) if ( format & RichText ) { // < in HTML *always* means start-of-tag - QStringList entries = QStringList::split( QChar('<'), message, true ); + TQStringList entries = TQStringList::split( TQChar('<'), message, true ); - QStringList::Iterator it = entries.begin(); + TQStringList::Iterator it = entries.begin(); // first one is different: it doesn't start with an HTML tag. if ( it != entries.end() ) @@ -401,55 +401,55 @@ QString Message::parseLinks( const QString &message, MessageFormat format ) for ( ; it != entries.end(); ++it ) { - QString curr = *it; + TQString curr = *it; // > in HTML means start-of-tag if and only if it's the first one after a < - int tagclose = curr.find( QChar('>') ); + int tagclose = curr.find( TQChar('>') ); // no >: the HTML is broken, but we can cope if ( tagclose == -1 ) continue; - QString tag = curr.left( tagclose + 1 ); - QString body = curr.mid( tagclose + 1 ); + TQString tag = curr.left( tagclose + 1 ); + TQString body = curr.mid( tagclose + 1 ); *it = tag + parseLinks( body, PlainText ); } - return entries.join(QString::fromLatin1("<")); + return entries.join(TQString::fromLatin1("<")); } - QString result = message; + TQString result = message; // common subpatterns - may not contain matching parens! - const QString name = QString::fromLatin1( "[\\w\\+\\-=_\\.]+" ); - const QString userAndPassword = QString::fromLatin1( "(?:%1(?::%1)?\\@)" ).arg( name ); - const QString urlChar = QString::fromLatin1( "\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); - const QString urlSection = QString::fromLatin1( "[%1]+" ).arg( urlChar ); - const QString domain = QString::fromLatin1( "[\\-\\w_]+(?:\\.[\\-\\w_]+)+" ); + const TQString name = TQString::fromLatin1( "[\\w\\+\\-=_\\.]+" ); + const TQString userAndPassword = TQString::fromLatin1( "(?:%1(?::%1)?\\@)" ).arg( name ); + const TQString urlChar = TQString::fromLatin1( "\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); + const TQString urlSection = TQString::fromLatin1( "[%1]+" ).arg( urlChar ); + const TQString domain = TQString::fromLatin1( "[\\-\\w_]+(?:\\.[\\-\\w_]+)+" ); //Replace http/https/ftp links: // Replace (stuff)://[user:password@](linkstuff) with a link result.replace( - QRegExp( makeRegExp("\\w+://%1?\\w%2").arg( userAndPassword, urlSection ) ), - QString::fromLatin1("\\1\\2\\3" ) ); + TQRegExp( makeRegExp("\\w+://%1?\\w%2").arg( userAndPassword, urlSection ) ), + TQString::fromLatin1("\\1\\2\\3" ) ); // Replace www.X.Y(linkstuff) with a http: link result.replace( - QRegExp( makeRegExp("%1?www\\.%2%3").arg( userAndPassword, domain, urlSection ) ), - QString::fromLatin1("\\1\\2\\3" ) ); + TQRegExp( makeRegExp("%1?www\\.%2%3").arg( userAndPassword, domain, urlSection ) ), + TQString::fromLatin1("\\1\\2\\3" ) ); //Replace Email Links // Replace user@domain with a mailto: link result.replace( - QRegExp( makeRegExp("%1@%2").arg( name, domain ) ), - QString::fromLatin1("\\1\\2\\3") ); + TQRegExp( makeRegExp("%1@%2").arg( name, domain ) ), + TQString::fromLatin1("\\1\\2\\3") ); //Workaround for Bug 85061: Highlighted URLs adds a ' ' after the URL itself // the trailing   is included in the url. - result.replace( QRegExp( QString::fromLatin1("(timeStamp; } @@ -459,7 +459,7 @@ const Contact *Message::from() const return d->from; } -QPtrList Message::to() const +TQPtrList Message::to() const { return d->to; } @@ -469,29 +469,29 @@ Message::MessageType Message::type() const return d->type; } -QString Message::requestedPlugin() const +TQString Message::requestedPlugin() const { return d->requestedPlugin; } -QColor Message::fg() const +TQColor Message::fg() const { return d->fgColor; } -QColor Message::bg() const +TQColor Message::bg() const { return d->bgColor; } -QFont Message::font() const +TQFont Message::font() const { - //QDomElement bodyNode = d->xmlDoc.elementsByTagName( QString::fromLatin1("body") ).item(0).toElement(); - //return QFont( bodyNode.attribute( QString::fromLatin1("font") ), bodyNode.attribute( QString::fromLatin1("fontsize") ).toInt() ); + //TQDomElement bodyNode = d->xmlDoc.elementsByTagName( TQString::fromLatin1("body") ).item(0).toElement(); + //return TQFont( bodyNode.attribute( TQString::fromLatin1("font") ), bodyNode.attribute( TQString::fromLatin1("fontsize") ).toInt() ); return d->font; } -QString Message::subject() const +TQString Message::subject() const { return d->subject; } @@ -522,47 +522,47 @@ void Message::setManager(ChatSession *kmm) d->manager=kmm; } -QString Message::getHtmlStyleAttribute() const +TQString Message::getHtmlStyleAttribute() const { - QString styleAttribute; + TQString styleAttribute; - styleAttribute = QString::fromUtf8("style=\""); + styleAttribute = TQString::fromUtf8("style=\""); // Affect foreground(color) and background color to message. if( !d->fgOverride && d->fgColor.isValid() ) { - styleAttribute += QString::fromUtf8("color: %1; ").arg(d->fgColor.name()); + styleAttribute += TQString::fromUtf8("color: %1; ").arg(d->fgColor.name()); } if( !d->bgOverride && d->bgColor.isValid() ) { - styleAttribute += QString::fromUtf8("background-color: %1; ").arg(d->bgColor.name()); + styleAttribute += TQString::fromUtf8("background-color: %1; ").arg(d->bgColor.name()); } // Affect font parameters. - if( !d->rtfOverride && d->font!=QFont() ) + if( !d->rtfOverride && d->font!=TQFont() ) { - QString fontstr; + TQString fontstr; if(!d->font.family().isNull()) - fontstr+=QString::fromLatin1("font-family: ")+d->font.family()+QString::fromLatin1("; "); + fontstr+=TQString::fromLatin1("font-family: ")+d->font.family()+TQString::fromLatin1("; "); if(d->font.italic()) - fontstr+=QString::fromLatin1("font-style: italic; "); + fontstr+=TQString::fromLatin1("font-style: italic; "); if(d->font.strikeOut()) - fontstr+=QString::fromLatin1("text-decoration: line-through; "); + fontstr+=TQString::fromLatin1("text-decoration: line-through; "); if(d->font.underline()) - fontstr+=QString::fromLatin1("text-decoration: underline; "); + fontstr+=TQString::fromLatin1("text-decoration: underline; "); if(d->font.bold()) - fontstr+=QString::fromLatin1("font-weight: bold;"); + fontstr+=TQString::fromLatin1("font-weight: bold;"); styleAttribute += fontstr; } - styleAttribute += QString::fromUtf8("\""); + styleAttribute += TQString::fromUtf8("\""); return styleAttribute; } // KDE4: Move that to a utils class/namespace -QString Message::decodeString( const QCString &message, const QTextCodec *providedCodec, bool *success ) +TQString Message::decodeString( const TQCString &message, const TQTextCodec *providedCodec, bool *success ) { /* Note to everyone. This function is not the most efficient, that is for sure. @@ -575,7 +575,7 @@ QString Message::decodeString( const QCString &message, const QTextCodec *provid // Avoid heavy codec tests on empty message. if( message.isEmpty() ) - return QString::fromAscii( message ); + return TQString::fromAscii( message ); //Check first 128 chars int charsToCheck = message.length(); @@ -592,11 +592,11 @@ QString Message::decodeString( const QCString &message, const QTextCodec *provid if( KStringHandler::isUtf8(message) ) { //We have a UTF string almost for sure. At least we know it will be decoded. - return QString::fromUtf8( message ); + return TQString::fromUtf8( message ); } //Try codecForContent - exact match - QTextCodec *testCodec = QTextCodec::codecForContent(message, charsToCheck); + TQTextCodec *testCodec = TQTextCodec::codecForContent(message, charsToCheck); if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= 0 ) { //All chars decodable. @@ -610,7 +610,7 @@ QString Message::decodeString( const QCString &message, const QTextCodec *provid //We don't have any clues here. //Try local codec - testCodec = QTextCodec::codecForLocale(); + testCodec = TQTextCodec::codecForLocale(); if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= 0 ) { //All chars decodable. @@ -619,7 +619,7 @@ QString Message::decodeString( const QCString &message, const QTextCodec *provid } //Try latin1 codec - testCodec = QTextCodec::codecForMib(4); + testCodec = TQTextCodec::codecForMib(4); if( testCodec && testCodec->heuristicContentMatch( message, charsToCheck ) >= 0 ) { //All chars decodable. @@ -629,7 +629,7 @@ QString Message::decodeString( const QCString &message, const QTextCodec *provid kdDebug(14000) << k_funcinfo << "Using latin1 and cleaning string" << endl; //No codec decoded. Just decode latin1, and clean out any junk. - QString result = QString::fromLatin1( message ); + TQString result = TQString::fromLatin1( message ); const uint length = message.length(); for( uint i = 0; i < length; ++i ) { diff --git a/kopete/libkopete/kopetemessage.h b/kopete/libkopete/kopetemessage.h index 0737d2ae..03a09bd9 100644 --- a/kopete/libkopete/kopetemessage.h +++ b/kopete/libkopete/kopetemessage.h @@ -23,13 +23,13 @@ #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "kopete_export.h" @@ -117,9 +117,9 @@ public: * @param requestedPlugin Requested view plugin for the message * @param type Type of the message, see @ref MessageType */ - Message( const Contact *fromKC, const QPtrList &toKC, const QString &body, + Message( const Contact *fromKC, const TQPtrList &toKC, const TQString &body, MessageDirection direction, MessageFormat format = PlainText, - const QString &requestedPlugin = QString::null, MessageType type = TypeNormal ); + const TQString &requestedPlugin = TQString::null, MessageType type = TypeNormal ); /** * Constructs a new message. See @ref setBody() to more information about the format @@ -131,9 +131,9 @@ public: * @param requestedPlugin Requested view plugin for the message * @param type Type of the message, see @ref MessageType */ - Message( const Contact *fromKC, const Contact *toKC, const QString &body, + Message( const Contact *fromKC, const Contact *toKC, const TQString &body, MessageDirection direction, MessageFormat format = PlainText, - const QString &requestedPlugin = QString::null, MessageType type = TypeNormal ); + const TQString &requestedPlugin = TQString::null, MessageType type = TypeNormal ); /** * Constructs a new message. See @ref setBody() to more information about the format @@ -146,9 +146,9 @@ public: * @param requestedPlugin Requested view plugin for the message * @param type Type of the message, see @ref MessageType */ - Message( const Contact *fromKC, const QPtrList &toKC, const QString &body, - const QString &subject, MessageDirection direction, MessageFormat format = PlainText, - const QString &requestedPlugin = QString::null, MessageType type = TypeNormal ); + Message( const Contact *fromKC, const TQPtrList &toKC, const TQString &body, + const TQString &subject, MessageDirection direction, MessageFormat format = PlainText, + const TQString &requestedPlugin = TQString::null, MessageType type = TypeNormal ); /** * Constructs a new message. See @ref setBody() to more information about the format @@ -161,9 +161,9 @@ public: * @param requestedPlugin Requested view plugin for the message * @param type Type of the message, see @ref MessageType */ - Message( const QDateTime &timeStamp, const Contact *fromKC, const QPtrList &toKC, - const QString &body, MessageDirection direction, MessageFormat format = PlainText, - const QString &requestedPlugin = QString::null, MessageType type = TypeNormal ); + Message( const TQDateTime &timeStamp, const Contact *fromKC, const TQPtrList &toKC, + const TQString &body, MessageDirection direction, MessageFormat format = PlainText, + const TQString &requestedPlugin = TQString::null, MessageType type = TypeNormal ); /** * Constructs a new message. See @ref setBody() to more information about the format @@ -177,9 +177,9 @@ public: * @param requestedPlugin Requested view plugin for the message * @param type Type of the message, see @ref MessageType */ - Message( const QDateTime &timeStamp, const Contact *fromKC, const QPtrList &toKC, - const QString &body, const QString &subject, MessageDirection direction, - MessageFormat format = PlainText, const QString &requestedPlugin = QString::null, + Message( const TQDateTime &timeStamp, const Contact *fromKC, const TQPtrList &toKC, + const TQString &body, const TQString &subject, MessageDirection direction, + MessageFormat format = PlainText, const TQString &requestedPlugin = TQString::null, MessageType type = TypeNormal ); /** @@ -198,7 +198,7 @@ public: * Accessor method for the timestamp of the message * @return The message's timestamp */ - QDateTime timestamp() const; + TQDateTime timestamp() const; /** * Accessor method for the Contact that sent this message @@ -210,7 +210,7 @@ public: * Accessor method for the Contacts that this message was sent to * @return Pointer list of the Contacts this message was sent to */ - QPtrList to() const; + TQPtrList to() const; /** * @return the @ref MessageType of this message @@ -221,31 +221,31 @@ public: * @return the view plugin you would prefer to use to read this message. If * null, Kopete will use the user's preferred plugin. */ - QString requestedPlugin() const; + TQString requestedPlugin() const; /** * Accessor method for the foreground color * @return The message's foreground color */ - QColor fg() const; + TQColor fg() const; /** * Accessor method for the background color of the message * @return The message's background color */ - QColor bg() const; + TQColor bg() const; /** * Accessor method for the font of the message * @return The message's font */ - QFont font() const; + TQFont font() const; /** * Accessor method for the subject of the message * @return The message subject */ - QString subject() const; + TQString subject() const; /** * Accessor method for the format of the message @@ -276,19 +276,19 @@ public: * Sets the foreground color for the message * @param color The color */ - void setFg( const QColor &color ); + void setFg( const TQColor &color ); /** * Sets the background color for the message * @param color The color */ - void setBg( const QColor &color ); + void setBg( const TQColor &color ); /** * Sets the font for the message * @param font The font */ - void setFont( const QFont &font ); + void setFont( const TQFont &font ); /** * @brief Sets the body of the message @@ -296,13 +296,13 @@ public: * @param body The body * @param format The format of the message, @see MessageFormat */ - void setBody( const QString &body, MessageFormat format = PlainText ); + void setBody( const TQString &body, MessageFormat format = PlainText ); /** * Get the message body back as plain text * @return The message body as plain text */ - QString plainBody() const; + TQString plainBody() const; /** * Get the message body as escaped (X)HTML format. @@ -310,14 +310,14 @@ public: * and newlines (\\n) are converted to \
    * @return The message body as escaped text */ - QString escapedBody() const; + TQString escapedBody() const; /** * Get the message body as parsed HTML with Emoticons, and URL parsed * this should be ready to be shown in the chatwindow. * @return The HTML and Emoticon parsed message body */ - QString parsedBody() const; + TQString parsedBody() const; /** * Get the related message manager. @@ -356,7 +356,7 @@ public: * Return HTML style attribute for this message. * @return A string formatted like this: "style=attr" */ - QString getHtmlStyleAttribute() const; + TQString getHtmlStyleAttribute() const; public: /* static helpers */ @@ -368,7 +368,7 @@ public: /* static helpers */ * * @param xml The string you want to unescape */ - static QString unescape( const QString &xml ); + static TQString unescape( const TQString &xml ); /** * Indicate whether the string is right-to-left (Arabic or Hebrew are bidi locales) @@ -381,7 +381,7 @@ public: /* static helpers */ * @brief Transform a pleintext message to an html. * it escape main entity like > < add some <br /> or &nbsp; */ - static QString escape( const QString & ); + static TQString escape( const TQString & ); /** @@ -394,8 +394,8 @@ public: /* static helpers */ * is defined as a successfull decoding using either UTF8 or the codec you * provided. If a guess has to be taken, success will be false. */ - static QString decodeString( const QCString &message, - const QTextCodec *providedCodec = 0L, bool *success = 0L ); + static TQString decodeString( const TQCString &message, + const TQTextCodec *providedCodec = 0L, bool *success = 0L ); private: /** @@ -408,12 +408,12 @@ private: * Called internally by @ref setBody() and the constructor * Basically @ref setBody() without detach */ - void doSetBody( const QString &body, MessageFormat format = PlainText ); + void doSetBody( const TQString &body, MessageFormat format = PlainText ); class Private; KSharedPtr d; - static QString parseLinks( const QString &message, MessageFormat format ); + static TQString parseLinks( const TQString &message, MessageFormat format ); }; } diff --git a/kopete/libkopete/kopetemessageevent.cpp b/kopete/libkopete/kopetemessageevent.cpp index fb129837..d50c85e9 100644 --- a/kopete/libkopete/kopetemessageevent.cpp +++ b/kopete/libkopete/kopetemessageevent.cpp @@ -37,14 +37,14 @@ public: EventState state; }; -MessageEvent::MessageEvent( const Message& m, QObject *parent, const char *name ) - : QObject(parent,name), d( new Private ) +MessageEvent::MessageEvent( const Message& m, TQObject *parent, const char *name ) + : TQObject(parent,name), d( new Private ) { d->message = m; d->state = Nothing; const Contact *c=m.from(); if(c) - connect(c,SIGNAL(contactDestroyed( Kopete::Contact* )),this,SLOT(discard())); + connect(c,TQT_SIGNAL(contactDestroyed( Kopete::Contact* )),this,TQT_SLOT(discard())); } MessageEvent::~MessageEvent() diff --git a/kopete/libkopete/kopetemessageevent.h b/kopete/libkopete/kopetemessageevent.h index 7beb1aa2..9cfa1ea5 100644 --- a/kopete/libkopete/kopetemessageevent.h +++ b/kopete/libkopete/kopetemessageevent.h @@ -21,7 +21,7 @@ #ifndef KOPETEMESSAGEEVENT_H #define KOPETEMESSAGEEVENT_H -#include +#include #include "kopetemessage.h" @@ -44,7 +44,7 @@ class KOPETE_EXPORT MessageEvent : public QObject Q_OBJECT public: - MessageEvent(const Kopete::Message& , QObject* parent=0L, const char *name=0L); + MessageEvent(const Kopete::Message& , TQObject* parent=0L, const char *name=0L); ~MessageEvent(); /** diff --git a/kopete/libkopete/kopetemessagehandler.cpp b/kopete/libkopete/kopetemessagehandler.cpp index 89628d4f..28ef01bf 100644 --- a/kopete/libkopete/kopetemessagehandler.cpp +++ b/kopete/libkopete/kopetemessagehandler.cpp @@ -30,7 +30,7 @@ public: }; MessageHandler::MessageHandler() - : QObject( 0 ), d( new Private ) + : TQObject( 0 ), d( new Private ) { } @@ -56,7 +56,7 @@ int MessageHandler::capabilities() void MessageHandler::handleMessageInternal( MessageEvent *event ) { - connect( event, SIGNAL( accepted(Kopete::MessageEvent*) ), this, SLOT( messageAccepted(Kopete::MessageEvent*) ) ); + connect( event, TQT_SIGNAL( accepted(Kopete::MessageEvent*) ), this, TQT_SLOT( messageAccepted(Kopete::MessageEvent*) ) ); handleMessage( event ); } @@ -67,7 +67,7 @@ void MessageHandler::handleMessage( MessageEvent *event ) void MessageHandler::messageAccepted( MessageEvent *event ) { - disconnect( event, SIGNAL( accepted(Kopete::MessageEvent*) ), this, SLOT( messageAccepted(Kopete::MessageEvent*) ) ); + disconnect( event, TQT_SIGNAL( accepted(Kopete::MessageEvent*) ), this, TQT_SLOT( messageAccepted(Kopete::MessageEvent*) ) ); d->next->handleMessageInternal( event ); } diff --git a/kopete/libkopete/kopetemessagehandler.h b/kopete/libkopete/kopetemessagehandler.h index ba16184c..fa9c1f31 100644 --- a/kopete/libkopete/kopetemessagehandler.h +++ b/kopete/libkopete/kopetemessagehandler.h @@ -17,7 +17,7 @@ #ifndef KOPETEMESSAGEHANDLER_H #define KOPETEMESSAGEHANDLER_H -#include +#include //#include #include "kopete_export.h" @@ -25,7 +25,7 @@ // to avoid this being included everywhere #include "kopetemessage.h" -#include +#include namespace Kopete { @@ -78,7 +78,7 @@ public: * handler in the chain. * * @note If you store @p event, be aware that it could be deleted at any time, and either - * connect to the its discarded(Kopete::MessageEvent*) signal or store it in a QGuardedPtr. + * connect to the its discarded(Kopete::MessageEvent*) signal or store it in a TQGuardedPtr. */ virtual void handleMessage( MessageEvent *event ); @@ -124,7 +124,7 @@ public: */ virtual ~MessageHandlerFactory(); - typedef QValueList FactoryList; + typedef TQValueList FactoryList; /** * @return the list of registered message handler factories */ diff --git a/kopete/libkopete/kopetemessagehandlerchain.cpp b/kopete/libkopete/kopetemessagehandlerchain.cpp index fe1e96ab..ce119df0 100644 --- a/kopete/libkopete/kopetemessagehandlerchain.cpp +++ b/kopete/libkopete/kopetemessagehandlerchain.cpp @@ -21,9 +21,9 @@ #include -#include -#include -#include +#include +#include +#include namespace Kopete { @@ -62,8 +62,8 @@ MessageHandlerChain::Ptr MessageHandlerChain::create( ChatSession *manager, Mess FactoryList factories = MessageHandlerFactory::messageHandlerFactories(); // create a sorted list of handlers - typedef QValueList HandlerList; - typedef QMap HandlerMap; + typedef TQValueList HandlerList; + typedef TQMap HandlerMap; HandlerMap handlers; uint count = 0; for( FactoryList::Iterator it = factories.begin(); it != factories.end(); ++it ) @@ -107,7 +107,7 @@ MessageHandlerChain::Ptr MessageHandlerChain::create( ChatSession *manager, Mess } MessageHandlerChain::MessageHandlerChain() - : QObject( 0 ), d( new Private ) + : TQObject( 0 ), d( new Private ) { } @@ -151,8 +151,8 @@ public: ProcessMessageTask::ProcessMessageTask( MessageHandlerChain::Ptr chain, MessageEvent *event ) : d( new Private(chain, event) ) { - QTimer::singleShot( 0, this, SLOT( slotStart() ) ); - connect( event, SIGNAL( done( Kopete::MessageEvent* ) ), this, SLOT( slotDone() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotStart() ) ); + connect( event, TQT_SIGNAL( done( Kopete::MessageEvent* ) ), this, TQT_SLOT( slotDone() ) ); event->message().manager()->ref(); } diff --git a/kopete/libkopete/kopetemessagehandlerchain.h b/kopete/libkopete/kopetemessagehandlerchain.h index 5852c2da..a53e0600 100644 --- a/kopete/libkopete/kopetemessagehandlerchain.h +++ b/kopete/libkopete/kopetemessagehandlerchain.h @@ -17,7 +17,7 @@ #ifndef KOPETEFILTERCHAIN_H #define KOPETEFILTERCHAIN_H -#include +#include #include #include #include "kopetemessage.h" @@ -41,7 +41,7 @@ class ProcessMessageTask; * * @author Richard Smith */ -class MessageHandlerChain : public QObject, private KShared +class MessageHandlerChain : public TQObject, private KShared { Q_OBJECT public: diff --git a/kopete/libkopete/kopetemetacontact.cpp b/kopete/libkopete/kopetemetacontact.cpp index e181f52e..9a908f32 100644 --- a/kopete/libkopete/kopetemetacontact.cpp +++ b/kopete/libkopete/kopetemetacontact.cpp @@ -46,12 +46,12 @@ namespace Kopete { // this is just to save typing -const QString NSCID_ELEM = QString::fromUtf8("nameSourceContactId" ); -const QString NSPID_ELEM = QString::fromUtf8( "nameSourcePluginId" ); -const QString NSAID_ELEM = QString::fromUtf8( "nameSourceAccountId" ); -const QString PSCID_ELEM = QString::fromUtf8( "photoSourceContactId" ); -const QString PSPID_ELEM = QString::fromUtf8( "photoSourcePluginId" ); -const QString PSAID_ELEM = QString::fromUtf8( "photoSourceAccountId" ); +const TQString NSCID_ELEM = TQString::fromUtf8("nameSourceContactId" ); +const TQString NSPID_ELEM = TQString::fromUtf8( "nameSourcePluginId" ); +const TQString NSAID_ELEM = TQString::fromUtf8( "nameSourceAccountId" ); +const TQString PSCID_ELEM = TQString::fromUtf8( "photoSourceContactId" ); +const TQString PSPID_ELEM = TQString::fromUtf8( "photoSourcePluginId" ); +const TQString PSAID_ELEM = TQString::fromUtf8( "photoSourceAccountId" ); class MetaContact::Private { public: @@ -64,7 +64,7 @@ class MetaContact::Private ~Private() {} - QPtrList contacts; + TQPtrList contacts; // property sources PropertySource photoSource; @@ -75,22 +75,22 @@ class MetaContact::Private Contact *photoSourceContact; // used when source is kabc - QString metaContactId; + TQString metaContactId; // used when source is custom - QString displayName; + TQString displayName; KURL photoUrl; - QPtrList groups; - QMap > addressBook; + TQPtrList groups; + TQMap > addressBook; bool temporary; OnlineStatus::StatusType onlineStatus; bool photoSyncedWithKABC; // Used to set contact source at load. - QString nameSourcePID, nameSourceAID, nameSourceCID; - QString photoSourcePID, photoSourceAID, photoSourceCID; + TQString nameSourcePID, nameSourceAID, nameSourceCID; + TQString photoSourcePID, photoSourceAID, photoSourceCID; // The photo cache. Reduce disk access and CPU usage. Picture customPicture, contactPicture, kabcPicture; @@ -101,18 +101,18 @@ MetaContact::MetaContact() { d = new Private; - connect( this, SIGNAL( pluginDataChanged() ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( iconChanged( Kopete::ContactListElement::IconState, const QString & ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( useCustomIconChanged( bool ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( displayNameChanged( const QString &, const QString & ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( movedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( contactAdded( Kopete::Contact * ) ), SIGNAL( persistentDataChanged() ) ); - connect( this, SIGNAL( contactRemoved( Kopete::Contact * ) ), SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( pluginDataChanged() ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( iconChanged( Kopete::ContactListElement::IconState, const TQString & ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( useCustomIconChanged( bool ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( displayNameChanged( const TQString &, const TQString & ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( movedToGroup( Kopete::MetaContact *, Kopete::Group *, Kopete::Group * ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( removedFromGroup( Kopete::MetaContact *, Kopete::Group * ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( addedToGroup( Kopete::MetaContact *, Kopete::Group * ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( contactAdded( Kopete::Contact * ) ), TQT_SIGNAL( persistentDataChanged() ) ); + connect( this, TQT_SIGNAL( contactRemoved( Kopete::Contact * ) ), TQT_SIGNAL( persistentDataChanged() ) ); // Update the KABC picture when the KDE Address book change. - connect(KABCPersistence::self()->addressBook(), SIGNAL(addressBookChanged(AddressBook *)), this, SLOT(slotUpdateAddressBookPicture())); + connect(KABCPersistence::self()->addressBook(), TQT_SIGNAL(addressBookChanged(AddressBook *)), this, TQT_SLOT(slotUpdateAddressBookPicture())); // make sure MetaContact is at least in one group addToGroup( Group::topLevel() ); @@ -135,17 +135,17 @@ void MetaContact::addContact( Contact *c ) { d->contacts.append( c ); - connect( c, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + connect( c, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); - connect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; + connect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; - connect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), - this, SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); + connect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), + this, TQT_SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); - connect( c, SIGNAL( idleStateChanged( Kopete::Contact * ) ), - this, SIGNAL( contactIdleStateChanged( Kopete::Contact * ) ) ); + connect( c, TQT_SIGNAL( idleStateChanged( Kopete::Contact * ) ), + this, TQT_SIGNAL( contactIdleStateChanged( Kopete::Contact * ) ) ); emit contactAdded(c); @@ -174,7 +174,7 @@ void MetaContact::updateOnlineStatus() Kopete::OnlineStatus::StatusType newStatus = Kopete::OnlineStatus::Unknown; Kopete::OnlineStatus mostSignificantStatus; - for ( QPtrListIterator it( d->contacts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->contacts ); it.current(); ++it ) { // find most significant status if ( it.current()->onlineStatus() > mostSignificantStatus ) @@ -203,7 +203,7 @@ void MetaContact::removeContact(Contact *c, bool deleted) bool wasTrackingName = ( !displayNameSourceContact() && (displayNameSource() == SourceContact) ); bool wasTrackingPhoto = ( !photoSourceContact() && (photoSource() == SourceContact) ); // save for later use - QString currDisplayName = displayName(); + TQString currDisplayName = displayName(); d->contacts.remove( c ); @@ -258,14 +258,14 @@ void MetaContact::removeContact(Contact *c, bool deleted) if(!deleted) { //If this function is tell by slotContactRemoved, c is maybe just a QObject - disconnect( c, SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); - disconnect( c, SIGNAL( propertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ), - this, SLOT( slotPropertyChanged( Kopete::Contact *, const QString &, const QVariant &, const QVariant & ) ) ) ; - disconnect( c, SIGNAL( contactDestroyed( Kopete::Contact * ) ), - this, SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); - disconnect( c, SIGNAL( idleStateChanged( Kopete::Contact * ) ), - this, SIGNAL( contactIdleStateChanged( Kopete::Contact *) ) ); + disconnect( c, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + disconnect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ), + this, TQT_SLOT( slotPropertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ) ) ; + disconnect( c, TQT_SIGNAL( contactDestroyed( Kopete::Contact * ) ), + this, TQT_SLOT( slotContactDestroyed( Kopete::Contact * ) ) ); + disconnect( c, TQT_SIGNAL( idleStateChanged( Kopete::Contact * ) ), + this, TQT_SIGNAL( contactIdleStateChanged( Kopete::Contact *) ) ); kdDebug( 14010 ) << k_funcinfo << "Contact disconnected" << endl; @@ -280,10 +280,10 @@ void MetaContact::removeContact(Contact *c, bool deleted) updateOnlineStatus(); } -Contact *MetaContact::findContact( const QString &protocolId, const QString &accountId, const QString &contactId ) +Contact *MetaContact::findContact( const TQString &protocolId, const TQString &accountId, const TQString &contactId ) { //kdDebug( 14010 ) << k_funcinfo << "Num contacts: " << d->contacts.count() << endl; - QPtrListIterator it( d->contacts ); + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { //kdDebug( 14010 ) << k_funcinfo << "Trying " << it.current()->contactId() << ", proto " @@ -307,9 +307,9 @@ Contact *MetaContact::findContact( const QString &protocolId, const QString &acc void MetaContact::setDisplayNameSource(PropertySource source) { - QString oldName = displayName(); + TQString oldName = displayName(); d->displayNameSource = source; - QString newName = displayName(); + TQString newName = displayName(); if ( oldName != newName) emit displayNameChanged( oldName, newName ); } @@ -386,7 +386,7 @@ Contact *MetaContact::preferredContact() Contact *contact = 0; bool hasOpenView=false; //has the selected contact already an open chatwindow - for ( QPtrListIterator it( d->contacts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->contacts ); it.current(); ++it ) { Contact *c=it.current(); @@ -451,7 +451,7 @@ Contact *MetaContact::execute() unsigned long int MetaContact::idleTime() const { unsigned long int time = 0; - QPtrListIterator it( d->contacts ); + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { unsigned long int i = it.current()->idleTime(); @@ -463,7 +463,7 @@ unsigned long int MetaContact::idleTime() const return time; } -QString MetaContact::statusIcon() const +TQString MetaContact::statusIcon() const { switch( status() ) { @@ -471,31 +471,31 @@ QString MetaContact::statusIcon() const if( useCustomIcon() ) return icon( ContactListElement::Online ); else - return QString::fromUtf8( "metacontact_online" ); + return TQString::fromUtf8( "metacontact_online" ); case OnlineStatus::Away: if( useCustomIcon() ) return icon( ContactListElement::Away ); else - return QString::fromUtf8( "metacontact_away" ); + return TQString::fromUtf8( "metacontact_away" ); case OnlineStatus::Unknown: if( useCustomIcon() ) return icon( ContactListElement::Unknown ); if ( d->contacts.isEmpty() ) - return QString::fromUtf8( "metacontact_unknown" ); + return TQString::fromUtf8( "metacontact_unknown" ); else - return QString::fromUtf8( "metacontact_offline" ); + return TQString::fromUtf8( "metacontact_offline" ); case OnlineStatus::Offline: default: if( useCustomIcon() ) return icon( ContactListElement::Offline ); else - return QString::fromUtf8( "metacontact_offline" ); + return TQString::fromUtf8( "metacontact_offline" ); } } -QString MetaContact::statusString() const +TQString MetaContact::statusString() const { switch( status() ) { @@ -518,7 +518,7 @@ OnlineStatus::StatusType MetaContact::status() const bool MetaContact::isOnline() const { - QPtrListIterator it( d->contacts ); + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { if( it.current()->isOnline() ) @@ -532,7 +532,7 @@ bool MetaContact::isReachable() const if ( isOnline() ) return true; - for ( QPtrListIterator it( d->contacts ); it.current(); ++it ) + for ( TQPtrListIterator it( d->contacts ); it.current(); ++it ) { if ( it.current()->account()->isConnected() && it.current()->isReachable() ) return true; @@ -546,7 +546,7 @@ bool MetaContact::canAcceptFiles() const if( !isOnline() ) return false; - QPtrListIterator it( d->contacts ); + TQPtrListIterator it( d->contacts ); for( ; it.current(); ++it ) { if( it.current()->canAcceptFiles() ) @@ -556,7 +556,7 @@ bool MetaContact::canAcceptFiles() const } //Slot for sending files -void MetaContact::sendFile( const KURL &sourceURL, const QString &altFileName, unsigned long fileSize ) +void MetaContact::sendFile( const KURL &sourceURL, const TQString &altFileName, unsigned long fileSize ) { //If we can't send any files then exit if( d->contacts.isEmpty() || !canAcceptFiles() ) @@ -564,7 +564,7 @@ void MetaContact::sendFile( const KURL &sourceURL, const QString &altFileName, u //Find the highest ranked protocol that can accept files Contact *contact = d->contacts.first(); - for( QPtrListIterator it( d->contacts ) ; it.current(); ++it ) + for( TQPtrListIterator it( d->contacts ) ; it.current(); ++it ) { if( ( *it )->onlineStatus() > contact->onlineStatus() && ( *it )->canAcceptFiles() ) contact = *it; @@ -581,7 +581,7 @@ void MetaContact::slotContactStatusChanged( Contact * c, const OnlineStatus &sta emit contactStatusChanged( c, status ); } -void MetaContact::setDisplayName( const QString &name ) +void MetaContact::setDisplayName( const TQString &name ) { /*kdDebug( 14010 ) << k_funcinfo << "Change displayName from " << d->displayName << " to " << name << ", d->trackChildNameChanges=" << d->trackChildNameChanges << endl; @@ -590,22 +590,22 @@ void MetaContact::setDisplayName( const QString &name ) if( name == d->displayName ) return; - const QString old = d->displayName; + const TQString old = d->displayName; d->displayName = name; emit displayNameChanged( old , name ); - for( QPtrListIterator it( d->contacts ) ; it.current(); ++it ) + for( TQPtrListIterator it( d->contacts ) ; it.current(); ++it ) ( *it )->sync(Contact::DisplayNameChanged); } -QString MetaContact::customDisplayName() const +TQString MetaContact::customDisplayName() const { return d->displayName; } -QString MetaContact::displayName() const +TQString MetaContact::displayName() const { PropertySource source = displayNameSource(); if ( source == SourceKABC ) @@ -637,7 +637,7 @@ QString MetaContact::displayName() const return d->displayName; } -QString nameFromKABC( const QString &id ) /*const*/ +TQString nameFromKABC( const TQString &id ) /*const*/ { KABC::AddressBook* ab = KABCPersistence::self()->addressBook(); if ( ! id.isEmpty() && !id.contains(':') ) @@ -653,20 +653,20 @@ QString nameFromKABC( const QString &id ) /*const*/ } } // no kabc association, return null image - return QString::null; + return TQString::null; } -QString nameFromContact( Kopete::Contact *c) /*const*/ +TQString nameFromContact( Kopete::Contact *c) /*const*/ { if ( !c ) - return QString::null; + return TQString::null; - QString contactName; + TQString contactName; if ( c->hasProperty( Kopete::Global::Properties::self()->nickName().key() ) ) contactName = c->property( Global::Properties::self()->nickName()).value().toString(); //the replace is there to workaround the Bug 95444 - return contactName.isEmpty() ? c->contactId() : contactName.replace('\n',QString::fromUtf8("")); + return contactName.isEmpty() ? c->contactId() : contactName.replace('\n',TQString::fromUtf8("")); } KURL MetaContact::customPhoto() const @@ -685,12 +685,12 @@ void MetaContact::setPhoto( const KURL &url ) } } -QImage MetaContact::photo() const +TQImage MetaContact::photo() const { if( picture().image().width() > 96 && picture().image().height() > 96 ) { kdDebug( 14010 ) << k_funcinfo << "Resizing image from " << picture().image().width() << " x " << picture().image().height() << endl; - return picture().image().smoothScale(96,96,QImage::ScaleMin); + return picture().image().smoothScale(96,96,TQImage::ScaleMin); } else return picture().image(); @@ -710,33 +710,33 @@ Picture &MetaContact::picture() const return d->customPicture; } -QImage MetaContact::photoFromCustom() const +TQImage MetaContact::photoFromCustom() const { return d->customPicture.image(); } -QImage photoFromContact( Kopete::Contact *contact) /*const*/ +TQImage photoFromContact( Kopete::Contact *contact) /*const*/ { if ( contact == 0L ) - return QImage(); + return TQImage(); - QVariant photoProp; + TQVariant photoProp; if ( contact->hasProperty( Kopete::Global::Properties::self()->photo().key() ) ) photoProp = contact->property( Kopete::Global::Properties::self()->photo().key() ).value(); - QImage img; - if(photoProp.canCast( QVariant::Image )) + TQImage img; + if(photoProp.canCast( TQVariant::Image )) img=photoProp.toImage(); - else if(photoProp.canCast( QVariant::Pixmap )) + else if(photoProp.canCast( TQVariant::Pixmap )) img=photoProp.toPixmap().convertToImage(); else if(!photoProp.asString().isEmpty()) { - img=QPixmap( photoProp.toString() ).convertToImage(); + img=TQPixmap( photoProp.toString() ).convertToImage(); } return img; } -QImage photoFromKABC( const QString &id ) /*const*/ +TQImage photoFromKABC( const TQString &id ) /*const*/ { KABC::AddressBook* ab = KABCPersistence::self()->addressBook(); if ( ! id.isEmpty() && !id.contains(':') ) @@ -758,12 +758,12 @@ QImage photoFromKABC( const QString &id ) /*const*/ } else { - return QPixmap( pic.url() ).convertToImage(); + return TQPixmap( pic.url() ).convertToImage(); } } } // no kabc association, return null image - return QImage(); + return TQImage(); } Contact *MetaContact::displayNameSourceContact() const @@ -793,13 +793,13 @@ void MetaContact::setPhotoSourceContact( Contact *contact ) // Create a cache for the contact photo. if(d->photoSourceContact != 0L) { - QVariant photoProp; + TQVariant photoProp; if ( contact->hasProperty( Kopete::Global::Properties::self()->photo().key() ) ) photoProp = contact->property( Kopete::Global::Properties::self()->photo().key() ).value(); - if(photoProp.canCast( QVariant::Image )) + if(photoProp.canCast( TQVariant::Image )) d->contactPicture.setPicture(photoProp.toImage()); - else if(photoProp.canCast( QVariant::Pixmap )) + else if(photoProp.canCast( TQVariant::Pixmap )) d->contactPicture.setPicture(photoProp.toPixmap().convertToImage()); else if(!photoProp.asString().isEmpty()) { @@ -813,8 +813,8 @@ void MetaContact::setPhotoSourceContact( Contact *contact ) } } -void MetaContact::slotPropertyChanged( Contact* subcontact, const QString &key, - const QVariant &oldValue, const QVariant &newValue ) +void MetaContact::slotPropertyChanged( Contact* subcontact, const TQString &key, + const TQVariant &oldValue, const TQVariant &newValue ) { if ( displayNameSource() == SourceContact ) { @@ -932,7 +932,7 @@ void MetaContact::addToGroup( Group *to ) emit addedToGroup( this, to ); } -QPtrList MetaContact::groups() const +TQPtrList MetaContact::groups() const { return d->groups; } @@ -942,36 +942,36 @@ void MetaContact::slotContactDestroyed( Contact *contact ) removeContact(contact,true); } -const QDomElement MetaContact::toXML(bool minimal) +const TQDomElement MetaContact::toXML(bool minimal) { // This causes each Kopete::Protocol subclass to serialise its contacts' data into the metacontact's plugin data and address book data emit aboutToSave(this); - QDomDocument metaContact; - metaContact.appendChild( metaContact.createElement( QString::fromUtf8( "meta-contact" ) ) ); - metaContact.documentElement().setAttribute( QString::fromUtf8( "contactId" ), metaContactId() ); + TQDomDocument metaContact; + metaContact.appendChild( metaContact.createElement( TQString::fromUtf8( "meta-contact" ) ) ); + metaContact.documentElement().setAttribute( TQString::fromUtf8( "contactId" ), metaContactId() ); // the custom display name, used for the custom name source - QDomElement displayName = metaContact.createElement( QString::fromUtf8("display-name" ) ); + TQDomElement displayName = metaContact.createElement( TQString::fromUtf8("display-name" ) ); displayName.appendChild( metaContact.createTextNode( d->displayName ) ); metaContact.documentElement().appendChild( displayName ); - QDomElement photo = metaContact.createElement( QString::fromUtf8("photo" ) ); + TQDomElement photo = metaContact.createElement( TQString::fromUtf8("photo" ) ); KURL photoUrl = d->photoUrl; photo.appendChild( metaContact.createTextNode( photoUrl.url() ) ); metaContact.documentElement().appendChild( photo ); // Property sources - QDomElement propertySources = metaContact.createElement( QString::fromUtf8("property-sources" ) ); - QDomElement _nameSource = metaContact.createElement( QString::fromUtf8("name") ); - QDomElement _photoSource = metaContact.createElement( QString::fromUtf8("photo") ); + TQDomElement propertySources = metaContact.createElement( TQString::fromUtf8("property-sources" ) ); + TQDomElement _nameSource = metaContact.createElement( TQString::fromUtf8("name") ); + TQDomElement _photoSource = metaContact.createElement( TQString::fromUtf8("photo") ); // set the contact source for display name - _nameSource.setAttribute(QString::fromUtf8("source"), sourceToString(displayNameSource())); + _nameSource.setAttribute(TQString::fromUtf8("source"), sourceToString(displayNameSource())); // set contact source metadata if (displayNameSourceContact()) { - QDomElement contactNameSource = metaContact.createElement( QString::fromUtf8("contact-source") ); + TQDomElement contactNameSource = metaContact.createElement( TQString::fromUtf8("contact-source") ); contactNameSource.setAttribute( NSCID_ELEM, displayNameSourceContact()->contactId() ); contactNameSource.setAttribute( NSPID_ELEM, displayNameSourceContact()->protocol()->pluginId() ); contactNameSource.setAttribute( NSAID_ELEM, displayNameSourceContact()->account()->accountId() ); @@ -979,16 +979,16 @@ const QDomElement MetaContact::toXML(bool minimal) } // set the contact source for photo - _photoSource.setAttribute(QString::fromUtf8("source"), sourceToString(photoSource())); + _photoSource.setAttribute(TQString::fromUtf8("source"), sourceToString(photoSource())); if( !d->metaContactId.isEmpty() ) - photo.setAttribute( QString::fromUtf8("syncWithKABC") , QString::fromUtf8( d->photoSyncedWithKABC ? "true" : "false" ) ); + photo.setAttribute( TQString::fromUtf8("syncWithKABC") , TQString::fromUtf8( d->photoSyncedWithKABC ? "true" : "false" ) ); if (photoSourceContact()) { //kdDebug(14010) << k_funcinfo << "serializing photo source " << nameFromContact(photoSourceContact()) << endl; // set contact source metadata for photo - QDomElement contactPhotoSource = metaContact.createElement( QString::fromUtf8("contact-source") ); + TQDomElement contactPhotoSource = metaContact.createElement( TQString::fromUtf8("contact-source") ); contactPhotoSource.setAttribute( NSCID_ELEM, photoSourceContact()->contactId() ); contactPhotoSource.setAttribute( NSPID_ELEM, photoSourceContact()->protocol()->pluginId() ); contactPhotoSource.setAttribute( NSAID_ELEM, photoSourceContact()->account()->accountId() ); @@ -1006,31 +1006,31 @@ const QDomElement MetaContact::toXML(bool minimal) // Store groups if ( !d->groups.isEmpty() ) { - QDomElement groups = metaContact.createElement( QString::fromUtf8("groups") ); + TQDomElement groups = metaContact.createElement( TQString::fromUtf8("groups") ); Group *g; for ( g = d->groups.first(); g; g = d->groups.next() ) { - QDomElement group = metaContact.createElement( QString::fromUtf8("group") ); - group.setAttribute( QString::fromUtf8("id"), g->groupId() ); + TQDomElement group = metaContact.createElement( TQString::fromUtf8("group") ); + group.setAttribute( TQString::fromUtf8("id"), g->groupId() ); groups.appendChild( group ); } metaContact.documentElement().appendChild( groups ); } // Store other plugin data - QValueList pluginData = Kopete::ContactListElement::toXML(); - for( QValueList::Iterator it = pluginData.begin(); it != pluginData.end(); ++it ) + TQValueList pluginData = Kopete::ContactListElement::toXML(); + for( TQValueList::Iterator it = pluginData.begin(); it != pluginData.end(); ++it ) metaContact.documentElement().appendChild( metaContact.importNode( *it, true ) ); // Store custom notification data - QDomElement notifyData = NotifyDataObject::notifyDataToXML(); + TQDomElement notifyData = NotifyDataObject::notifyDataToXML(); if ( notifyData.hasChildNodes() ) metaContact.documentElement().appendChild( metaContact.importNode( notifyData, true ) ); } return metaContact.documentElement(); } -bool MetaContact::fromXML( const QDomElement& element ) +bool MetaContact::fromXML( const TQDomElement& element ) { if( !element.hasChildNodes() ) return false; @@ -1038,7 +1038,7 @@ bool MetaContact::fromXML( const QDomElement& element ) bool oldPhotoTracking = false; bool oldNameTracking = false; - QString strContactId = element.attribute( QString::fromUtf8("contactId") ); + TQString strContactId = element.attribute( TQString::fromUtf8("contactId") ); if( !strContactId.isEmpty() ) { d->metaContactId = strContactId; @@ -1046,11 +1046,11 @@ bool MetaContact::fromXML( const QDomElement& element ) slotUpdateAddressBookPicture(); } - QDomElement contactElement = element.firstChild().toElement(); + TQDomElement contactElement = element.firstChild().toElement(); while( !contactElement.isNull() ) { - if( contactElement.tagName() == QString::fromUtf8( "display-name" ) ) + if( contactElement.tagName() == TQString::fromUtf8( "display-name" ) ) { // custom display name, used for the custom name source // WTF, why were we not loading the metacontact if nickname was empty. @@ -1058,7 +1058,7 @@ bool MetaContact::fromXML( const QDomElement& element ) // return false; //the replace is there to workaround the Bug 95444 - d->displayName = contactElement.text().replace('\n',QString::fromUtf8("")); + d->displayName = contactElement.text().replace('\n',TQString::fromUtf8("")); if ( contactElement.hasAttribute(NSCID_ELEM) && contactElement.hasAttribute(NSPID_ELEM) && contactElement.hasAttribute(NSAID_ELEM)) { @@ -1073,12 +1073,12 @@ bool MetaContact::fromXML( const QDomElement& element ) // else // kdDebug(14010) << k_funcinfo << "no old name tracking" << endl; } - else if( contactElement.tagName() == QString::fromUtf8( "photo" ) ) + else if( contactElement.tagName() == TQString::fromUtf8( "photo" ) ) { // custom photo, used for custom photo source setPhoto( KURL(contactElement.text()) ); - d->photoSyncedWithKABC = (contactElement.attribute(QString::fromUtf8("syncWithKABC")) == QString::fromUtf8("1")) || (contactElement.attribute(QString::fromUtf8("syncWithKABC")) == QString::fromUtf8("true")); + d->photoSyncedWithKABC = (contactElement.attribute(TQString::fromUtf8("syncWithKABC")) == TQString::fromUtf8("1")) || (contactElement.attribute(TQString::fromUtf8("syncWithKABC")) == TQString::fromUtf8("true")); // retrieve deprecated data (now stored in property-sources) // save temporarely, we will find a Contact* with this later @@ -1093,23 +1093,23 @@ bool MetaContact::fromXML( const QDomElement& element ) // else // kdDebug(14010) << k_funcinfo << "no old photo tracking" << endl; } - else if( contactElement.tagName() == QString::fromUtf8( "property-sources" ) ) + else if( contactElement.tagName() == TQString::fromUtf8( "property-sources" ) ) { - QDomNode property = contactElement.firstChild(); + TQDomNode property = contactElement.firstChild(); while( !property.isNull() ) { - QDomElement propertyElement = property.toElement(); + TQDomElement propertyElement = property.toElement(); - if( propertyElement.tagName() == QString::fromUtf8( "name" ) ) + if( propertyElement.tagName() == TQString::fromUtf8( "name" ) ) { - QString source = propertyElement.attribute( QString::fromUtf8("source") ); + TQString source = propertyElement.attribute( TQString::fromUtf8("source") ); setDisplayNameSource(stringToSource(source)); // find contact sources now. - QDomNode propertyParam = propertyElement.firstChild(); + TQDomNode propertyParam = propertyElement.firstChild(); while( !propertyParam.isNull() ) { - QDomElement propertyParamElement = propertyParam.toElement(); - if( propertyParamElement.tagName() == QString::fromUtf8( "contact-source" ) ) + TQDomElement propertyParamElement = propertyParam.toElement(); + if( propertyParamElement.tagName() == TQString::fromUtf8( "contact-source" ) ) { d->nameSourceCID = propertyParamElement.attribute( NSCID_ELEM ); d->nameSourcePID = propertyParamElement.attribute( NSPID_ELEM ); @@ -1118,16 +1118,16 @@ bool MetaContact::fromXML( const QDomElement& element ) propertyParam = propertyParam.nextSibling(); } } - if( propertyElement.tagName() == QString::fromUtf8( "photo" ) ) + if( propertyElement.tagName() == TQString::fromUtf8( "photo" ) ) { - QString source = propertyElement.attribute( QString::fromUtf8("source") ); + TQString source = propertyElement.attribute( TQString::fromUtf8("source") ); setPhotoSource(stringToSource(source)); // find contact sources now. - QDomNode propertyParam = propertyElement.firstChild(); + TQDomNode propertyParam = propertyElement.firstChild(); while( !propertyParam.isNull() ) { - QDomElement propertyParamElement = propertyParam.toElement(); - if( propertyParamElement.tagName() == QString::fromUtf8( "contact-source" ) ) + TQDomElement propertyParamElement = propertyParam.toElement(); + if( propertyParamElement.tagName() == TQString::fromUtf8( "contact-source" ) ) { d->photoSourceCID = propertyParamElement.attribute( NSCID_ELEM ); d->photoSourcePID = propertyParamElement.attribute( NSPID_ELEM ); @@ -1139,39 +1139,39 @@ bool MetaContact::fromXML( const QDomElement& element ) property = property.nextSibling(); } } - else if( contactElement.tagName() == QString::fromUtf8( "groups" ) ) + else if( contactElement.tagName() == TQString::fromUtf8( "groups" ) ) { - QDomNode group = contactElement.firstChild(); + TQDomNode group = contactElement.firstChild(); while( !group.isNull() ) { - QDomElement groupElement = group.toElement(); + TQDomElement groupElement = group.toElement(); - if( groupElement.tagName() == QString::fromUtf8( "group" ) ) + if( groupElement.tagName() == TQString::fromUtf8( "group" ) ) { - QString strGroupId = groupElement.attribute( QString::fromUtf8("id") ); + TQString strGroupId = groupElement.attribute( TQString::fromUtf8("id") ); if( !strGroupId.isEmpty() ) addToGroup( Kopete::ContactList::self()->group( strGroupId.toUInt() ) ); else //kopete 0.6 contactlist addToGroup( Kopete::ContactList::self()->findGroup( groupElement.text() ) ); } - else if( groupElement.tagName() == QString::fromUtf8( "top-level" ) ) //kopete 0.6 contactlist + else if( groupElement.tagName() == TQString::fromUtf8( "top-level" ) ) //kopete 0.6 contactlist addToGroup( Kopete::Group::topLevel() ); group = group.nextSibling(); } } - else if( contactElement.tagName() == QString::fromUtf8( "address-book-field" ) ) + else if( contactElement.tagName() == TQString::fromUtf8( "address-book-field" ) ) { - QString app = contactElement.attribute( QString::fromUtf8( "app" ), QString::null ); - QString key = contactElement.attribute( QString::fromUtf8( "key" ), QString::null ); - QString val = contactElement.text(); + TQString app = contactElement.attribute( TQString::fromUtf8( "app" ), TQString::null ); + TQString key = contactElement.attribute( TQString::fromUtf8( "key" ), TQString::null ); + TQString val = contactElement.text(); d->addressBook[ app ][ key ] = val; } - else if( contactElement.tagName() == QString::fromUtf8( "custom-notifications" ) ) + else if( contactElement.tagName() == TQString::fromUtf8( "custom-notifications" ) ) { Kopete::NotifyDataObject::notifyDataFromXML( contactElement ); } - else //if( groupElement.tagName() == QString::fromUtf8( "plugin-data" ) || groupElement.tagName() == QString::fromUtf8("custom-icons" )) + else //if( groupElement.tagName() == TQString::fromUtf8( "plugin-data" ) || groupElement.tagName() == TQString::fromUtf8("custom-icons" )) { Kopete::ContactListElement::fromXML(contactElement); } @@ -1215,16 +1215,16 @@ bool MetaContact::fromXML( const QDomElement& element ) } // If a plugin is loaded, load data cached - connect( Kopete::PluginManager::self(), SIGNAL( pluginLoaded(Kopete::Plugin*) ), - this, SLOT( slotPluginLoaded(Kopete::Plugin*) ) ); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( pluginLoaded(Kopete::Plugin*) ), + this, TQT_SLOT( slotPluginLoaded(Kopete::Plugin*) ) ); // All plugins are already loaded, call manually the contact setting slot. if( Kopete::PluginManager::self()->isAllPluginsLoaded() ) slotAllPluginsLoaded(); else // When all plugins are loaded, set the source contact. - connect( Kopete::PluginManager::self(), SIGNAL( allPluginsLoaded() ), - this, SLOT( slotAllPluginsLoaded() ) ); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( allPluginsLoaded() ), + this, TQT_SLOT( slotAllPluginsLoaded() ) ); // track changes only works if ONE Contact is inside the MetaContact // if (d->contacts.count() > 1) // Does NOT work as intended @@ -1234,36 +1234,36 @@ bool MetaContact::fromXML( const QDomElement& element ) return true; } -QString MetaContact::sourceToString(PropertySource source) const +TQString MetaContact::sourceToString(PropertySource source) const { if ( source == SourceCustom ) - return QString::fromUtf8("custom"); + return TQString::fromUtf8("custom"); else if ( source == SourceKABC ) - return QString::fromUtf8("addressbook"); + return TQString::fromUtf8("addressbook"); else if ( source == SourceContact ) - return QString::fromUtf8("contact"); + return TQString::fromUtf8("contact"); else // recovery return sourceToString(SourceCustom); } -MetaContact::PropertySource MetaContact::stringToSource(const QString &name) const +MetaContact::PropertySource MetaContact::stringToSource(const TQString &name) const { - if ( name == QString::fromUtf8("custom") ) + if ( name == TQString::fromUtf8("custom") ) return SourceCustom; - else if ( name == QString::fromUtf8("addressbook") ) + else if ( name == TQString::fromUtf8("addressbook") ) return SourceKABC; - else if ( name == QString::fromUtf8("contact") ) + else if ( name == TQString::fromUtf8("contact") ) return SourceContact; else // recovery return SourceCustom; } -QString MetaContact::addressBookField( Kopete::Plugin * /* p */, const QString &app, const QString & key ) const +TQString MetaContact::addressBookField( Kopete::Plugin * /* p */, const TQString &app, const TQString & key ) const { return d->addressBook[ app ][ key ]; } -void Kopete::MetaContact::setAddressBookField( Kopete::Plugin * /* p */, const QString &app, const QString &key, const QString &value ) +void Kopete::MetaContact::setAddressBookField( Kopete::Plugin * /* p */, const TQString &app, const TQString &key, const TQString &value ) { d->addressBook[ app ][ key ] = value; } @@ -1273,7 +1273,7 @@ void MetaContact::slotPluginLoaded( Plugin *p ) if( !p ) return; - QMap map= pluginData( p ); + TQMap map= pluginData( p ); if(!map.isEmpty()) { p->deserialize(this,map); @@ -1290,7 +1290,7 @@ void MetaContact::slotAllPluginsLoaded() void MetaContact::slotUpdateAddressBookPicture() { KABC::AddressBook* ab = KABCPersistence::self()->addressBook(); - QString id = metaContactId(); + TQString id = metaContactId(); if ( !id.isEmpty() && !id.contains(':') ) { KABC::Addressee theAddressee = ab->findByUid(id); @@ -1332,19 +1332,19 @@ void MetaContact::setTemporary( bool isTemporary, Group *group ) moveToGroup(temporaryGroup, group ? group : Group::topLevel()); } -QString MetaContact::metaContactId() const +TQString MetaContact::metaContactId() const { if(d->metaContactId.isEmpty()) { Contact *c=d->contacts.first(); if(!c) - return QString::null; - return c->protocol()->pluginId()+QString::fromUtf8(":")+c->account()->accountId()+QString::fromUtf8(":") + c->contactId() ; + return TQString::null; + return c->protocol()->pluginId()+TQString::fromUtf8(":")+c->account()->accountId()+TQString::fromUtf8(":") + c->contactId() ; } return d->metaContactId; } -void MetaContact::setMetaContactId( const QString& newMetaContactId ) +void MetaContact::setMetaContactId( const TQString& newMetaContactId ) { if(newMetaContactId == d->metaContactId) return; @@ -1374,7 +1374,7 @@ void MetaContact::setPhotoSyncedWithKABC(bool b) d->photoSyncedWithKABC=b; if(b) { - QVariant newValue; + TQVariant newValue; switch( photoSource() ) { @@ -1402,10 +1402,10 @@ void MetaContact::setPhotoSyncedWithKABC(bool b) if ( !theAddressee.isEmpty() ) { - QImage img; - if(newValue.canCast( QVariant::Image )) + TQImage img; + if(newValue.canCast( TQVariant::Image )) img=newValue.toImage(); - else if(newValue.canCast( QVariant::Pixmap )) + else if(newValue.canCast( TQVariant::Pixmap )) img=newValue.toPixmap().convertToImage(); if(img.isNull()) @@ -1415,7 +1415,7 @@ void MetaContact::setPhotoSyncedWithKABC(bool b) // to sync with kabc but try first to embed the // photo data in the kabc addressee, because it could // be remote resource and the local url makes no sense - QImage fallBackImage = QImage(newValue.toString()); + TQImage fallBackImage = TQImage(newValue.toString()); if(fallBackImage.isNull()) theAddressee.setPhoto(newValue.toString()); else @@ -1431,7 +1431,7 @@ void MetaContact::setPhotoSyncedWithKABC(bool b) } } -QPtrList MetaContact::contacts() const +TQPtrList MetaContact::contacts() const { return d->contacts; } diff --git a/kopete/libkopete/kopetemetacontact.h b/kopete/libkopete/kopetemetacontact.h index 3bdaa33a..07be08ef 100644 --- a/kopete/libkopete/kopetemetacontact.h +++ b/kopete/libkopete/kopetemetacontact.h @@ -22,8 +22,8 @@ #define kopetemetacontact_h__ #include "kopetecontactlistelement.h" -#include -#include +#include +#include #include #include "kopete_export.h" @@ -58,15 +58,15 @@ class KOPETE_EXPORT MetaContact : public ContactListElement, public NotifyDataOb { Q_OBJECT - Q_PROPERTY( QString displayName READ displayName WRITE setDisplayName ) - Q_PROPERTY( QString statusString READ statusString ) - Q_PROPERTY( QString statusIcon READ statusIcon ) + Q_PROPERTY( TQString displayName READ displayName WRITE setDisplayName ) + Q_PROPERTY( TQString statusString READ statusString ) + Q_PROPERTY( TQString statusIcon READ statusIcon ) Q_PROPERTY( bool isOnline READ isOnline ) Q_PROPERTY( bool isReachable READ isReachable ) Q_PROPERTY( bool isTemporary READ isTemporary ) Q_PROPERTY( bool canAcceptFiles READ canAcceptFiles ) //Q_PROPERTY( ulong idleTime READ idleTime ) - Q_PROPERTY( QString metaContactId READ metaContactId WRITE setMetaContactId ) + Q_PROPERTY( TQString metaContactId READ metaContactId WRITE setMetaContactId ) Q_PROPERTY( bool photoSyncedWithKABC READ isPhotoSyncedWithKABC WRITE setPhotoSyncedWithKABC ) public: @@ -95,30 +95,30 @@ public: * Every metacontact has a unique id, set by when creating the contact, or reading the contactlist * TODO: make it real */ - QString metaContactId() const; + TQString metaContactId() const; /** * @brief Add or change the link to a KDE addressbook (KABC) Addressee. * FIXME: Use with care. You could create 1 to many relationships with the current implementation */ - void setMetaContactId( const QString& newMetaContactId ); + void setMetaContactId( const TQString& newMetaContactId ); /** * @brief Retrieve the list of contacts that are part of the meta contact */ - QPtrList contacts() const; + TQPtrList contacts() const; /** * @brief The groups the contact is stored in */ - QPtrList groups() const; + TQPtrList groups() const; /** * Find the Contact to a given contact. If contact * is not found, a null pointer is returned. * if @p protocolId or @p accountId are null, it is searched over all protocols/accounts */ - Contact *findContact( const QString &protocolId, const QString &accountId, const QString &contactId ); + Contact *findContact( const TQString &protocolId, const TQString &accountId, const TQString &contactId ); /** * @brief Set the source of metacontact displayName @@ -174,7 +174,7 @@ public: * * This displayName is obtained from the source set with @ref setDisplayNameSource */ - QString displayName() const; + TQString displayName() const; /** * @brief the photo showed in the contactlist window @@ -185,7 +185,7 @@ public: * * This photo is obtained from the source set with @ref setPhotoSource */ - QImage photo() const; + TQImage photo() const; /** * Return the correct Kopete::Picture object depending of the metacontact photo source. @@ -206,7 +206,7 @@ public: * @see displayName() * @see displayNameSource() */ - void setDisplayName( const QString &name ); + void setDisplayName( const TQString &name ); /** * @brief Returns the custom display name @@ -214,7 +214,7 @@ public: * @see displayName() * @see displayNameSource() */ - QString customDisplayName() const; + TQString customDisplayName() const; /** * @brief Returns the custom display photo @@ -305,7 +305,7 @@ public: * @brief The name of the icon associated with the contact's status * @todo improve with OnlineStatus */ - QString statusIcon() const; + TQString statusIcon() const; /** * @brief The status string of the contact @@ -313,7 +313,7 @@ public: * @see @ref status() * @todo improve with OnlineStatus */ - QString statusString() const; + TQString statusString() const; /** * Returns whether this contact can be reached online for at least one @@ -355,7 +355,7 @@ public: * @param minimal When true, it doesn't save the * plugins, groups and notification data. False by default. */ - const QDomElement toXML(bool minimal = false); + const TQDomElement toXML(bool minimal = false); /** * Creates a metacontact from XML @@ -364,7 +364,7 @@ public: * discarded. * @internal */ - bool fromXML( const QDomElement& cnode ); + bool fromXML( const TQDomElement& cnode ); /** * Get or set a field for the KDE address book backend. Fields not @@ -385,7 +385,7 @@ public: * Probably it requires once more some rewrites to get it working * properly :( - Martijn */ - QString addressBookField( Plugin *p, const QString &app, const QString &key ) const; + TQString addressBookField( Plugin *p, const TQString &app, const TQString &key ) const; /** * @brief set an address book field @@ -396,7 +396,7 @@ public: * @param key The name of the address book field to set * @param value The value of the address book field to set */ - void setAddressBookField( Plugin *p, const QString &app, const QString &key, const QString &value ); + void setAddressBookField( Plugin *p, const TQString &app, const TQString &key, const TQString &value ); public slots: @@ -414,7 +414,7 @@ public slots: * file size (such as over a socket) * */ - void sendFile( const KURL &sourceURL, const QString &altFileName = QString::null, + void sendFile( const KURL &sourceURL, const TQString &altFileName = TQString::null, unsigned long fileSize = 0L ); signals: /** @@ -507,7 +507,7 @@ signals: /** * @brief The meta contact's display name changed */ - void displayNameChanged( const QString &oldName, const QString &newName ); + void displayNameChanged( const TQString &oldName, const TQString &newName ); /** * @brief The meta contact's photo changed @@ -563,7 +563,7 @@ private slots: /** * One of the child contact's property changed */ - void slotPropertyChanged( Kopete::Contact *contact, const QString &key, const QVariant &oldValue, const QVariant &newValue ); + void slotPropertyChanged( Kopete::Contact *contact, const TQString &key, const TQVariant &oldValue, const TQVariant &newValue ); /** * A child contact was deleted, remove it from the list, if it's still @@ -587,24 +587,24 @@ private slots: void slotUpdateAddressBookPicture(); protected: - //QImage photoFromContact( Kopete::Contact *c) const; - //QImage photoFromKABC( const QString &id ) const; - QImage photoFromCustom() const; - //QString nameFromContact( Kopete::Contact *c) const; - //QString nameFromKABC( const QString &id ) const; - - QString sourceToString(PropertySource source) const; - PropertySource stringToSource(const QString &name) const; + //TQImage photoFromContact( Kopete::Contact *c) const; + //TQImage photoFromKABC( const TQString &id ) const; + TQImage photoFromCustom() const; + //TQString nameFromContact( Kopete::Contact *c) const; + //TQString nameFromKABC( const TQString &id ) const; + + TQString sourceToString(PropertySource source) const; + PropertySource stringToSource(const TQString &name) const; private: class Private; Private *d; }; // util functions shared with metacontact property dialog -KOPETE_EXPORT QImage photoFromContact( Kopete::Contact *c) /*const*/; -KOPETE_EXPORT QImage photoFromKABC( const QString &id ) /*const*/; -KOPETE_EXPORT QString nameFromContact( Kopete::Contact *c) /*const*/; -KOPETE_EXPORT QString nameFromKABC( const QString &id ) /*const*/; +KOPETE_EXPORT TQImage photoFromContact( Kopete::Contact *c) /*const*/; +KOPETE_EXPORT TQImage photoFromKABC( const TQString &id ) /*const*/; +KOPETE_EXPORT TQString nameFromContact( Kopete::Contact *c) /*const*/; +KOPETE_EXPORT TQString nameFromKABC( const TQString &id ) /*const*/; } //END namespace Kopete diff --git a/kopete/libkopete/kopetemimesourcefactory.cpp b/kopete/libkopete/kopetemimesourcefactory.cpp index a34d8aee..f21d875a 100644 --- a/kopete/libkopete/kopetemimesourcefactory.cpp +++ b/kopete/libkopete/kopetemimesourcefactory.cpp @@ -26,9 +26,9 @@ #include #include -#include -#include -#include +#include +#include +#include namespace Kopete { @@ -38,7 +38,7 @@ class MimeSourceFactory::Private public: Private() : lastMimeSource( 0 ) {} ~Private() { delete lastMimeSource; } - mutable QMimeSource *lastMimeSource; + mutable TQMimeSource *lastMimeSource; }; MimeSourceFactory::MimeSourceFactory() @@ -51,17 +51,17 @@ MimeSourceFactory::~MimeSourceFactory() delete d; } -const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const +const TQMimeSource *MimeSourceFactory::data( const TQString &abs_name ) const { // flag used to signal something went wrong when creating a mimesource bool completed = false; // extract and decode arguments - QStringList parts = QStringList::split( QChar(':'), abs_name ); - for ( QStringList::Iterator it = parts.begin(); it != parts.end(); ++it ) + TQStringList parts = TQStringList::split( TQChar(':'), abs_name ); + for ( TQStringList::Iterator it = parts.begin(); it != parts.end(); ++it ) *it = KURL::decode_string( *it ); - QPixmap img; - if ( parts[0] == QString::fromLatin1("kopete-contact-icon") ) + TQPixmap img; + if ( parts[0] == TQString::fromLatin1("kopete-contact-icon") ) { if ( parts.size() >= 4 ) { @@ -84,7 +84,7 @@ const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const kdDebug( 14010 ) << k_funcinfo << "kopete-contact-icon: insufficient information in abs_name: " << parts << endl; } - if ( parts[0] == QString::fromLatin1("kopete-account-icon") ) + if ( parts[0] == TQString::fromLatin1("kopete-account-icon") ) { if ( parts.size() >= 3 ) { @@ -101,7 +101,7 @@ const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const kdDebug( 14010 ) << k_funcinfo << "kopete-account-icon: insufficient information in abs_name: " << parts << endl; } - if ( parts[0] == QString::fromLatin1("kopete-metacontact-icon") ) + if ( parts[0] == TQString::fromLatin1("kopete-metacontact-icon") ) { if ( parts.size() >= 2 ) { @@ -116,16 +116,16 @@ const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const kdDebug( 14010 ) << k_funcinfo << "kopete-metacontact-icon: insufficient information in abs_name: " << parts << endl; } - if ( parts[0] == QString::fromLatin1("kopete-metacontact-photo") ) + if ( parts[0] == TQString::fromLatin1("kopete-metacontact-photo") ) { if ( parts.size() >= 2 ) { MetaContact *mc = ContactList::self()->metaContact( parts[1] ); if ( mc ) { - QImage photo = mc->photo(); + TQImage photo = mc->photo(); delete d->lastMimeSource; - d->lastMimeSource = new QImageDrag( photo ); + d->lastMimeSource = new TQImageDrag( photo ); return d->lastMimeSource; } } @@ -133,7 +133,7 @@ const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const kdDebug( 14010 ) << k_funcinfo << "kopete-metacontact-photo: insufficient information in abs_name: " << parts << endl; } - if ( parts[0] == QString::fromLatin1("kopete-onlinestatus-icon") ) + if ( parts[0] == TQString::fromLatin1("kopete-onlinestatus-icon") ) { if ( parts.size() >= 2 ) { @@ -164,7 +164,7 @@ const QMimeSource *MimeSourceFactory::data( const QString &abs_name ) const delete d->lastMimeSource; if ( completed ) - d->lastMimeSource = new QImageDrag( img.convertToImage() ); + d->lastMimeSource = new TQImageDrag( img.convertToImage() ); else d->lastMimeSource = 0; return d->lastMimeSource; diff --git a/kopete/libkopete/kopetemimesourcefactory.h b/kopete/libkopete/kopetemimesourcefactory.h index 76c2f188..e9df5994 100644 --- a/kopete/libkopete/kopetemimesourcefactory.h +++ b/kopete/libkopete/kopetemimesourcefactory.h @@ -18,7 +18,7 @@ #ifndef KOPETEMIMESOURCEFACTORY_H #define KOPETEMIMESOURCEFACTORY_H -#include +#include #include "kopete_export.h" @@ -42,7 +42,7 @@ public: MimeSourceFactory(); ~MimeSourceFactory(); - const QMimeSource *data( const QString &abs_name ) const; + const TQMimeSource *data( const TQString &abs_name ) const; private: class Private; diff --git a/kopete/libkopete/kopetemimetypehandler.cpp b/kopete/libkopete/kopetemimetypehandler.cpp index 04c4939b..5f336a6b 100644 --- a/kopete/libkopete/kopetemimetypehandler.cpp +++ b/kopete/libkopete/kopetemimetypehandler.cpp @@ -19,7 +19,7 @@ #include "kopeteglobal.h" #include "kopeteuiglobal.h" -#include +#include #include #include @@ -36,8 +36,8 @@ namespace Kopete namespace { - static QDict g_mimeHandlers; - static QDict g_protocolHandlers; + static TQDict g_mimeHandlers; + static TQDict g_protocolHandlers; } class MimeTypeHandler::Private @@ -45,8 +45,8 @@ class MimeTypeHandler::Private public: Private( bool carf ) : canAcceptRemoteFiles( carf ) {} bool canAcceptRemoteFiles; - QStringList mimeTypes; - QStringList protocols; + TQStringList mimeTypes; + TQStringList protocols; }; MimeTypeHandler::MimeTypeHandler( bool canAcceptRemoteFiles ) @@ -56,16 +56,16 @@ MimeTypeHandler::MimeTypeHandler( bool canAcceptRemoteFiles ) MimeTypeHandler::~MimeTypeHandler() { - for( QStringList::iterator it = d->mimeTypes.begin(); it != d->mimeTypes.end(); ++it ) + for( TQStringList::iterator it = d->mimeTypes.begin(); it != d->mimeTypes.end(); ++it ) g_mimeHandlers.remove( *it ); - for( QStringList::iterator it = d->protocols.begin(); it != d->protocols.end(); ++it ) + for( TQStringList::iterator it = d->protocols.begin(); it != d->protocols.end(); ++it ) g_protocolHandlers.remove( *it ); delete d; } -bool MimeTypeHandler::registerAsMimeHandler( const QString &mimeType ) +bool MimeTypeHandler::registerAsMimeHandler( const TQString &mimeType ) { if( g_mimeHandlers[ mimeType ] ) { @@ -80,7 +80,7 @@ bool MimeTypeHandler::registerAsMimeHandler( const QString &mimeType ) return true; } -bool MimeTypeHandler::registerAsProtocolHandler( const QString &protocol ) +bool MimeTypeHandler::registerAsProtocolHandler( const TQString &protocol ) { if( g_protocolHandlers[ protocol ] ) { @@ -95,12 +95,12 @@ bool MimeTypeHandler::registerAsProtocolHandler( const QString &protocol ) return true; } -const QStringList MimeTypeHandler::mimeTypes() const +const TQStringList MimeTypeHandler::mimeTypes() const { return d->mimeTypes; } -const QStringList MimeTypeHandler::protocols() const +const TQStringList MimeTypeHandler::protocols() const { return d->protocols; } @@ -115,7 +115,7 @@ bool MimeTypeHandler::dispatchURL( const KURL &url ) if( url.isEmpty() ) return false; - QString type = KMimeType::findByURL( url )->name(); + TQString type = KMimeType::findByURL( url )->name(); MimeTypeHandler *mimeHandler = g_mimeHandlers[ type ]; @@ -140,14 +140,14 @@ bool MimeTypeHandler::dispatchURL( const KURL &url ) } } -bool MimeTypeHandler::dispatchToHandler( const KURL &url, const QString &mimeType, MimeTypeHandler *handler ) +bool MimeTypeHandler::dispatchToHandler( const KURL &url, const TQString &mimeType, MimeTypeHandler *handler ) { if( !handler->canAcceptRemoteFiles() ) { - QString file; + TQString file; if( !KIO::NetAccess::download( url, file, Kopete::UI::Global::mainWidget() ) ) { - QString sorryText; + TQString sorryText; if ( url.isLocalFile() ) { sorryText = i18n( "Unable to find the file %1." ); @@ -190,7 +190,7 @@ void MimeTypeHandler::handleURL( const KURL &url ) const Q_UNUSED( url ); } -void MimeTypeHandler::handleURL( const QString &mimeType, const KURL &url ) const +void MimeTypeHandler::handleURL( const TQString &mimeType, const KURL &url ) const { Q_UNUSED( mimeType ); Q_UNUSED( url ); @@ -200,12 +200,12 @@ void MimeTypeHandler::handleURL( const QString &mimeType, const KURL &url ) cons EmoticonMimeTypeHandler::EmoticonMimeTypeHandler() : MimeTypeHandler( false ) { - registerAsMimeHandler( QString::fromLatin1("application/x-kopete-emoticons") ); - registerAsMimeHandler( QString::fromLatin1("application/x-tgz") ); - registerAsMimeHandler( QString::fromLatin1("application/x-tbz") ); + registerAsMimeHandler( TQString::fromLatin1("application/x-kopete-emoticons") ); + registerAsMimeHandler( TQString::fromLatin1("application/x-tgz") ); + registerAsMimeHandler( TQString::fromLatin1("application/x-tbz") ); } -void EmoticonMimeTypeHandler::handleURL( const QString &, const KURL &url ) const +void EmoticonMimeTypeHandler::handleURL( const TQString &, const KURL &url ) const { Global::installEmoticonTheme( url.path() ); } diff --git a/kopete/libkopete/kopetemimetypehandler.h b/kopete/libkopete/kopetemimetypehandler.h index 8f3235f0..206bcffa 100644 --- a/kopete/libkopete/kopetemimetypehandler.h +++ b/kopete/libkopete/kopetemimetypehandler.h @@ -51,12 +51,12 @@ public: /** * Returns a list of mime types this object is registered to handle */ - const QStringList mimeTypes() const; + const TQStringList mimeTypes() const; /** * Returns a list of protocols this object is registered to handle */ - const QStringList protocols() const; + const TQStringList protocols() const; /** * Returns true if this handler can accept remote files direcltly; @@ -78,7 +78,7 @@ public: * @param mimeType The mime type of the URL * @param url The url to handle */ - virtual void handleURL( const QString &mimeType, const KURL &url ) const; + virtual void handleURL( const TQString &mimeType, const KURL &url ) const; protected: /** @@ -87,7 +87,7 @@ protected: * @return true if registration succeeded, false if another handler is * already set for this mime type. */ - bool registerAsMimeHandler( const QString &mimeType ); + bool registerAsMimeHandler( const TQString &mimeType ); /** * Register this object as the handler of type @p protocol. @@ -95,7 +95,7 @@ protected: * @return true if registration succeeded, false if another handler is * already set for this protocol. */ - bool registerAsProtocolHandler( const QString &protocol ); + bool registerAsProtocolHandler( const TQString &protocol ); private: /** @@ -108,7 +108,7 @@ private: * * @return true if a handler was able to process the URL, false otherwise */ - static bool dispatchToHandler( const KURL &url, const QString &mimeType, MimeTypeHandler *handler ); + static bool dispatchToHandler( const KURL &url, const TQString &mimeType, MimeTypeHandler *handler ); class Private; Private *d; @@ -122,9 +122,9 @@ class KOPETE_EXPORT EmoticonMimeTypeHandler : public MimeTypeHandler public: EmoticonMimeTypeHandler(); - const QStringList mimeTypes() const; + const TQStringList mimeTypes() const; - void handleURL( const QString &mimeType, const KURL &url ) const; + void handleURL( const TQString &mimeType, const KURL &url ) const; }; } // Kopete diff --git a/kopete/libkopete/kopetenotifydataobject.cpp b/kopete/libkopete/kopetenotifydataobject.cpp index 9a0de544..7ba7ab80 100644 --- a/kopete/libkopete/kopetenotifydataobject.cpp +++ b/kopete/libkopete/kopetenotifydataobject.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include +#include #include #include "kopetenotifydataobject.h" #include "kopetenotifyevent.h" @@ -23,7 +23,7 @@ class Kopete::NotifyDataObject::Private { public: - QDict events; + TQDict events; }; Kopete::NotifyDataObject::NotifyDataObject() @@ -37,40 +37,40 @@ Kopete::NotifyDataObject::~NotifyDataObject() delete d; } -Kopete::NotifyEvent * Kopete::NotifyDataObject::notifyEvent( const QString &event ) const +Kopete::NotifyEvent * Kopete::NotifyDataObject::notifyEvent( const TQString &event ) const { Kopete::NotifyEvent *evt = d->events.find( event ); return evt; } -void Kopete::NotifyDataObject::setNotifyEvent( const QString& event, Kopete::NotifyEvent *notifyEvent ) +void Kopete::NotifyDataObject::setNotifyEvent( const TQString& event, Kopete::NotifyEvent *notifyEvent ) { d->events.replace( event, notifyEvent ); } -bool Kopete::NotifyDataObject::removeNotifyEvent( const QString &event ) +bool Kopete::NotifyDataObject::removeNotifyEvent( const TQString &event ) { return d->events.remove( event ); } -QDomElement Kopete::NotifyDataObject::notifyDataToXML() +TQDomElement Kopete::NotifyDataObject::notifyDataToXML() { - QDomDocument notify; - QDomElement notifications; + TQDomDocument notify; + TQDomElement notifications; if ( !d->events.isEmpty() ) { // - notifications = notify.createElement( QString::fromLatin1( "custom-notifications" ) ); - QDictIterator it( d->events ); + notifications = notify.createElement( TQString::fromLatin1( "custom-notifications" ) ); + TQDictIterator it( d->events ); for ( ; it.current(); ++it ) { // - QDomElement event = notify.createElement( QString::fromLatin1( "event" ) ); - event.setAttribute( QString::fromLatin1( "name" ), it.currentKey() ); - event.setAttribute( QString::fromLatin1( "suppress-common" ), QString::fromLatin1( it.current()->suppressCommon() ? "true" : "false" ) ); - QValueList presentations = it.current()->toXML(); + TQDomElement event = notify.createElement( TQString::fromLatin1( "event" ) ); + event.setAttribute( TQString::fromLatin1( "name" ), it.currentKey() ); + event.setAttribute( TQString::fromLatin1( "suppress-common" ), TQString::fromLatin1( it.current()->suppressCommon() ? "true" : "false" ) ); + TQValueList presentations = it.current()->toXML(); // - for ( QValueList::Iterator it = presentations.begin(); it != presentations.end(); ++it ) + for ( TQValueList::Iterator it = presentations.begin(); it != presentations.end(); ++it ) event.appendChild( notify.importNode( *it, true ) ); notifications.appendChild( event ); } @@ -78,59 +78,59 @@ QDomElement Kopete::NotifyDataObject::notifyDataToXML() return notifications; } -bool Kopete::NotifyDataObject::notifyDataFromXML( const QDomElement& element ) +bool Kopete::NotifyDataObject::notifyDataFromXML( const TQDomElement& element ) { - if ( element.tagName() == QString::fromLatin1( "custom-notifications" ) ) + if ( element.tagName() == TQString::fromLatin1( "custom-notifications" ) ) { - QDomNode field = element.firstChild(); + TQDomNode field = element.firstChild(); while( !field.isNull() ) { //read an event - QDomElement fieldElement = field.toElement(); - if ( fieldElement.tagName() == QString::fromLatin1( "event" ) ) + TQDomElement fieldElement = field.toElement(); + if ( fieldElement.tagName() == TQString::fromLatin1( "event" ) ) { // get its attributes - QString name = fieldElement.attribute( QString::fromLatin1( "name" ), QString::null ); - QString suppress = fieldElement.attribute( QString::fromLatin1( "suppress-common" ), QString::null ); - Kopete::NotifyEvent *evt = new Kopete::NotifyEvent( suppress == QString::fromLatin1( "true" ) ); + TQString name = fieldElement.attribute( TQString::fromLatin1( "name" ), TQString::null ); + TQString suppress = fieldElement.attribute( TQString::fromLatin1( "suppress-common" ), TQString::null ); + Kopete::NotifyEvent *evt = new Kopete::NotifyEvent( suppress == TQString::fromLatin1( "true" ) ); // get its children - QDomNode child = fieldElement.firstChild(); + TQDomNode child = fieldElement.firstChild(); while( !child.isNull() ) { - QDomElement childElement = child.toElement(); - if ( childElement.tagName() == QString::fromLatin1( "sound-presentation" ) ) + TQDomElement childElement = child.toElement(); + if ( childElement.tagName() == TQString::fromLatin1( "sound-presentation" ) ) { // kdDebug(14010) << k_funcinfo << "read: sound" << endl; - QString src = childElement.attribute( QString::fromLatin1( "src" ) ); - QString enabled = childElement.attribute( QString::fromLatin1( "enabled" ) ); - QString singleShot = childElement.attribute( QString::fromLatin1( "single-shot" ) ); + TQString src = childElement.attribute( TQString::fromLatin1( "src" ) ); + TQString enabled = childElement.attribute( TQString::fromLatin1( "enabled" ) ); + TQString singleShot = childElement.attribute( TQString::fromLatin1( "single-shot" ) ); Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Sound, src, - ( singleShot == QString::fromLatin1( "true" ) ), - ( enabled == QString::fromLatin1( "true" ) ) ); + ( singleShot == TQString::fromLatin1( "true" ) ), + ( enabled == TQString::fromLatin1( "true" ) ) ); evt->setPresentation( Kopete::EventPresentation::Sound, pres ); // kdDebug(14010) << k_funcinfo << "after sound: " << evt->toString() << endl; } - if ( childElement.tagName() == QString::fromLatin1( "message-presentation" ) ) + if ( childElement.tagName() == TQString::fromLatin1( "message-presentation" ) ) { // kdDebug(14010) << k_funcinfo << "read: msg" << endl; - QString src = childElement.attribute( QString::fromLatin1( "src" ) ); - QString enabled = childElement.attribute( QString::fromLatin1( "enabled" ) ); - QString singleShot = childElement.attribute( QString::fromLatin1( "single-shot" ) ); + TQString src = childElement.attribute( TQString::fromLatin1( "src" ) ); + TQString enabled = childElement.attribute( TQString::fromLatin1( "enabled" ) ); + TQString singleShot = childElement.attribute( TQString::fromLatin1( "single-shot" ) ); Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Message, src, - ( singleShot == QString::fromLatin1( "true" ) ), - ( enabled == QString::fromLatin1( "true" ) ) ); + ( singleShot == TQString::fromLatin1( "true" ) ), + ( enabled == TQString::fromLatin1( "true" ) ) ); evt->setPresentation( Kopete::EventPresentation::Message, pres ); // kdDebug(14010) << k_funcinfo << "after message: " << evt->toString() << endl; } - if ( childElement.tagName() == QString::fromLatin1( "chat-presentation" ) ) + if ( childElement.tagName() == TQString::fromLatin1( "chat-presentation" ) ) { // kdDebug(14010) << k_funcinfo << "read: chat" << endl; - QString enabled = childElement.attribute( QString::fromLatin1( "enabled" ) ); - QString singleShot = childElement.attribute( QString::fromLatin1( "single-shot" ) ); - Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Chat, QString::null, - ( singleShot == QString::fromLatin1( "true" ) ), - ( enabled == QString::fromLatin1( "true" ) ) ); + TQString enabled = childElement.attribute( TQString::fromLatin1( "enabled" ) ); + TQString singleShot = childElement.attribute( TQString::fromLatin1( "single-shot" ) ); + Kopete::EventPresentation *pres = new Kopete::EventPresentation( Kopete::EventPresentation::Chat, TQString::null, + ( singleShot == TQString::fromLatin1( "true" ) ), + ( enabled == TQString::fromLatin1( "true" ) ) ); evt->setPresentation( Kopete::EventPresentation::Chat, pres ); // kdDebug(14010) << k_funcinfo << "after chat: " << evt->toString() << endl; } diff --git a/kopete/libkopete/kopetenotifydataobject.h b/kopete/libkopete/kopetenotifydataobject.h index db253c60..298d542f 100644 --- a/kopete/libkopete/kopetenotifydataobject.h +++ b/kopete/libkopete/kopetenotifydataobject.h @@ -17,9 +17,9 @@ #ifndef KOPETENOTIFYDATAOBJECT_H #define KOPETENOTIFYDATAOBJECT_H -#include -#include -#include +#include +#include +#include #include "kopete_export.h" @@ -40,14 +40,14 @@ class KOPETE_EXPORT NotifyDataObject NotifyDataObject(); ~NotifyDataObject(); // Notify events - NotifyEvent *notifyEvent( const QString &event ) const; - void setNotifyEvent( const QString &event, + NotifyEvent *notifyEvent( const TQString &event ) const; + void setNotifyEvent( const TQString &event, NotifyEvent *notifyEvent ); - bool removeNotifyEvent( const QString &event ); + bool removeNotifyEvent( const TQString &event ); // Serialization protected: - QDomElement notifyDataToXML(); - bool notifyDataFromXML( const QDomElement& element ); + TQDomElement notifyDataToXML(); + bool notifyDataFromXML( const TQDomElement& element ); private: class Private; NotifyDataObject::Private* d; diff --git a/kopete/libkopete/kopetenotifyevent.cpp b/kopete/libkopete/kopetenotifyevent.cpp index 28c4ab15..4bd9fad7 100644 --- a/kopete/libkopete/kopetenotifyevent.cpp +++ b/kopete/libkopete/kopetenotifyevent.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include +#include #include #include "kopetenotifyevent.h" #include "kopeteeventpresentation.h" @@ -138,39 +138,39 @@ void Kopete::NotifyEvent::setSuppressCommon( const bool suppress ) m_suppressCommon = suppress; } -const QValueList Kopete::NotifyEvent::toXML() const +const TQValueList Kopete::NotifyEvent::toXML() const { - QDomDocument eventData; - QValueList eventNodes; + TQDomDocument eventData; + TQValueList eventNodes; if ( m_sound && !m_sound->content().isEmpty() ) { - QDomElement soundElmt = eventData.createElement( QString::fromLatin1( "sound-presentation" ) ); - soundElmt.setAttribute( QString::fromLatin1( "enabled" ), QString::fromLatin1( m_sound->enabled() ? "true" : "false" ) ); - soundElmt.setAttribute( QString::fromLatin1( "single-shot" ), QString::fromLatin1( m_sound->singleShot() ? "true" : "false" ) ); - soundElmt.setAttribute( QString::fromLatin1( "src" ), m_sound->content() ); + TQDomElement soundElmt = eventData.createElement( TQString::fromLatin1( "sound-presentation" ) ); + soundElmt.setAttribute( TQString::fromLatin1( "enabled" ), TQString::fromLatin1( m_sound->enabled() ? "true" : "false" ) ); + soundElmt.setAttribute( TQString::fromLatin1( "single-shot" ), TQString::fromLatin1( m_sound->singleShot() ? "true" : "false" ) ); + soundElmt.setAttribute( TQString::fromLatin1( "src" ), m_sound->content() ); eventNodes.append( soundElmt ); } if ( m_message && !m_message->content().isEmpty() ) { - QDomElement msgElmt = eventData.createElement( QString::fromLatin1( "message-presentation" ) ); - msgElmt.setAttribute( QString::fromLatin1( "enabled" ), QString::fromLatin1( m_message->enabled() ? "true" : "false" ) ); - msgElmt.setAttribute( QString::fromLatin1( "single-shot" ), QString::fromLatin1( m_message->singleShot() ? "true" : "false" ) ); - msgElmt.setAttribute( QString::fromLatin1( "src" ), m_message->content() ); + TQDomElement msgElmt = eventData.createElement( TQString::fromLatin1( "message-presentation" ) ); + msgElmt.setAttribute( TQString::fromLatin1( "enabled" ), TQString::fromLatin1( m_message->enabled() ? "true" : "false" ) ); + msgElmt.setAttribute( TQString::fromLatin1( "single-shot" ), TQString::fromLatin1( m_message->singleShot() ? "true" : "false" ) ); + msgElmt.setAttribute( TQString::fromLatin1( "src" ), m_message->content() ); eventNodes.append( msgElmt ); } if ( m_chat && m_chat->enabled() ) { - QDomElement chatElmt = eventData.createElement( QString::fromLatin1( "chat-presentation" ) ); - chatElmt.setAttribute( QString::fromLatin1( "enabled" ), QString::fromLatin1( "true" ) ); - chatElmt.setAttribute( QString::fromLatin1( "single-shot" ), QString::fromLatin1( m_chat->singleShot() ? "true" : "false" ) ); + TQDomElement chatElmt = eventData.createElement( TQString::fromLatin1( "chat-presentation" ) ); + chatElmt.setAttribute( TQString::fromLatin1( "enabled" ), TQString::fromLatin1( "true" ) ); + chatElmt.setAttribute( TQString::fromLatin1( "single-shot" ), TQString::fromLatin1( m_chat->singleShot() ? "true" : "false" ) ); eventNodes.append( chatElmt ); } return eventNodes; } -QString Kopete::NotifyEvent::toString() +TQString Kopete::NotifyEvent::toString() { - QString stringRep = QString::fromLatin1("Event; Suppress common=%1").arg( QString::fromLatin1( suppressCommon() ? "true" : "false" ) ); + TQString stringRep = TQString::fromLatin1("Event; Suppress common=%1").arg( TQString::fromLatin1( suppressCommon() ? "true" : "false" ) ); if ( m_sound) stringRep += m_sound->toString(); if ( m_message) diff --git a/kopete/libkopete/kopetenotifyevent.h b/kopete/libkopete/kopetenotifyevent.h index b7acd3c1..85d03c66 100644 --- a/kopete/libkopete/kopetenotifyevent.h +++ b/kopete/libkopete/kopetenotifyevent.h @@ -18,8 +18,8 @@ #ifndef KOPETENOTIFYEVENT_H #define KOPETENOTIFYEVENT_H -#include -#include +#include +#include #include "kopeteeventpresentation.h" #include "kopete_export.h" @@ -45,10 +45,10 @@ public: bool firePresentation( const EventPresentation::PresentationType type ); void setSuppressCommon( bool suppress ); - const QValueList toXML() const; - QString toString(); + const TQValueList toXML() const; + TQString toString(); private: - QString m_event; + TQString m_event; EventPresentation *m_sound; EventPresentation *m_message; EventPresentation *m_chat; diff --git a/kopete/libkopete/kopeteonlinestatus.cpp b/kopete/libkopete/kopeteonlinestatus.cpp index 8872f28b..da9bb5d5 100644 --- a/kopete/libkopete/kopeteonlinestatus.cpp +++ b/kopete/libkopete/kopeteonlinestatus.cpp @@ -43,13 +43,13 @@ public: unsigned weight; Protocol *protocol; unsigned internalStatus; - QStringList overlayIcons; - QString description; + TQStringList overlayIcons; + TQString description; unsigned refCount; - QString protocolIcon() const + TQString protocolIcon() const { - return protocol ? protocol->pluginIcon() : QString::fromLatin1( "unknown" ); + return protocol ? protocol->pluginIcon() : TQString::fromLatin1( "unknown" ); } }; @@ -71,7 +71,7 @@ static struct { OnlineStatus::Away, "Away" } }; OnlineStatus::OnlineStatus( StatusType status, unsigned weight, Protocol *protocol, - unsigned internalStatus, const QStringList &overlayIcons, const QString &description ) + unsigned internalStatus, const TQStringList &overlayIcons, const TQString &description ) : d( new Private ) { d->status = status; @@ -83,7 +83,7 @@ OnlineStatus::OnlineStatus( StatusType status, unsigned weight, Protocol *protoc } OnlineStatus::OnlineStatus( StatusType status, unsigned weight, Protocol *protocol, unsigned internalStatus, - const QStringList &overlayIcons, const QString &description, const QString &caption, unsigned int categories , unsigned int options ) + const TQStringList &overlayIcons, const TQString &description, const TQString &caption, unsigned int categories , unsigned int options ) : d( new Private ) { d->status = status; @@ -124,7 +124,7 @@ OnlineStatus::OnlineStatus( StatusType status ) case Unknown: default: d->description = i18n( "Unknown" ); - d->overlayIcons = QString::fromLatin1("status_unknown"); + d->overlayIcons = TQString::fromLatin1("status_unknown"); break; } @@ -137,7 +137,7 @@ OnlineStatus::OnlineStatus() d->internalStatus = 0; d->weight = 0; d->protocol = 0L; - d->overlayIcons = QString::fromLatin1( "status_unknown" ); + d->overlayIcons = TQString::fromLatin1( "status_unknown" ); } OnlineStatus::OnlineStatus( const OnlineStatus &other ) @@ -204,12 +204,12 @@ unsigned OnlineStatus::weight() const return d->weight; } -QStringList OnlineStatus::overlayIcons() const +TQStringList OnlineStatus::overlayIcons() const { return d->overlayIcons; } -QString OnlineStatus::description() const +TQString OnlineStatus::description() const { return d->description; } @@ -226,16 +226,16 @@ bool OnlineStatus::isDefinitelyOnline() const return true; } -QPixmap OnlineStatus::iconFor( const Contact *contact, int size ) const +TQPixmap OnlineStatus::iconFor( const Contact *contact, int size ) const { return OnlineStatusManager::self()->cacheLookupByMimeSource( mimeSourceFor( contact, size ) ); } -QString OnlineStatus::mimeSourceFor( const Contact *contact, int size ) const +TQString OnlineStatus::mimeSourceFor( const Contact *contact, int size ) const { // figure out what icon we should use for this contact - QString iconName = contact->icon(); + TQString iconName = contact->icon(); if ( iconName.isNull() ) iconName = contact->account()->customIcon(); if ( iconName.isNull() ) @@ -245,31 +245,31 @@ QString OnlineStatus::mimeSourceFor( const Contact *contact, int size ) const return mimeSource( iconName, size, contact->account()->color(),contact->idleTime() >= 10*60 ); } -QPixmap OnlineStatus::iconFor( const Account *account, int size ) const +TQPixmap OnlineStatus::iconFor( const Account *account, int size ) const { return OnlineStatusManager::self()->cacheLookupByMimeSource( mimeSourceFor( account, size ) ); } -QString OnlineStatus::mimeSourceFor( const Account *account, int size ) const +TQString OnlineStatus::mimeSourceFor( const Account *account, int size ) const { - QString iconName = account->customIcon(); + TQString iconName = account->customIcon(); if ( iconName.isNull() ) iconName = d->protocolIcon(); return mimeSource( iconName, size, account->color(), false ); } -QPixmap OnlineStatus::iconFor( const QString &mimeSource ) const +TQPixmap OnlineStatus::iconFor( const TQString &mimeSource ) const { return OnlineStatusManager::self()->cacheLookupByMimeSource( mimeSource ); } -QPixmap OnlineStatus::protocolIcon() const +TQPixmap OnlineStatus::protocolIcon() const { - return OnlineStatusManager::self()->cacheLookupByObject( *this, d->protocolIcon() , 16, QColor() ); + return OnlineStatusManager::self()->cacheLookupByObject( *this, d->protocolIcon() , 16, TQColor() ); } -QString OnlineStatus::mimeSource( const QString& icon, int size, QColor color, bool idle) const +TQString OnlineStatus::mimeSource( const TQString& icon, int size, TQColor color, bool idle) const { // make sure the item is in the cache OnlineStatusManager::self()->cacheLookupByObject( *this, icon, size, color, idle ); @@ -277,23 +277,23 @@ QString OnlineStatus::mimeSource( const QString& icon, int size, QColor color, b return OnlineStatusManager::self()->fingerprint( *this, icon, size, color, idle ); } -QString OnlineStatus::statusTypeToString(OnlineStatus::StatusType statusType) +TQString OnlineStatus::statusTypeToString(OnlineStatus::StatusType statusType) { const int size = sizeof(statusNames) / sizeof(statusNames[0]); for (int i=0; i< size; i++) if (statusNames[i].status == statusType) - return QString::fromLatin1(statusNames[i].name); + return TQString::fromLatin1(statusNames[i].name); - return QString::fromLatin1(statusNames[0].name); // Unknown + return TQString::fromLatin1(statusNames[0].name); // Unknown } -OnlineStatus::StatusType OnlineStatus::statusStringToType(QString& string) +OnlineStatus::StatusType OnlineStatus::statusStringToType(TQString& string) { int size = sizeof(statusNames) / sizeof(statusNames[0]); for (int i=0; i< size; i++) - if (QString::fromLatin1(statusNames[i].name) == string) + if (TQString::fromLatin1(statusNames[i].name) == string) return statusNames[i].status; return OnlineStatus::Unknown; diff --git a/kopete/libkopete/kopeteonlinestatus.h b/kopete/libkopete/kopeteonlinestatus.h index 2eed5164..8136b1da 100644 --- a/kopete/libkopete/kopeteonlinestatus.h +++ b/kopete/libkopete/kopeteonlinestatus.h @@ -26,7 +26,7 @@ #include #include -#include +#include class QString; class QPixmap; @@ -169,13 +169,13 @@ public: * by libkopete and should be unique per protocol. * @param overlayIcons is a list of QStrings which are the name of status * icons to be used by the KDE icon loader. (Statuses which don't have icons - * to overlay like Online and Offline should use QString::null as icon + * to overlay like Online and Offline should use TQString::null as icon * name ). NOTE if the string is a movie ( *.mng ) it must be the first string in the list. * TODO: KDE4 sort out movies and overlay icons. * @param description is a description in e.g. tooltips. */ OnlineStatus( StatusType status, unsigned weight, Protocol *protocol, - unsigned internalStatus, const QStringList &overlayIcons, const QString &description ); + unsigned internalStatus, const TQStringList &overlayIcons, const TQString &description ); /** * Constructor. @@ -203,15 +203,15 @@ public: * by libkopete and should be unique per protocol. * @param overlayIcon is a string returning the name of the status icon to be * used by the KDE icon loader. (Status whiwh doesn't have icon to overlay like - * Online and Offline should use QString::null as icon string) + * Online and Offline should use TQString::null as icon string) * @param description is a description in e.g. tooltips. * @param caption is the text of the action in the menu * @param categories the categories this online status is in * @param options the options of this online status * @see Kopete::OnlineStatusManager::registerOnlineStatus for more info about the categories and options parameters */ - OnlineStatus( StatusType status, unsigned weight, Protocol *protocol, unsigned internalStatus, const QStringList &overlayIcon, - const QString &description, const QString& caption, unsigned int categories=0x0 , unsigned int options=0x0 ); + OnlineStatus( StatusType status, unsigned weight, Protocol *protocol, unsigned internalStatus, const TQStringList &overlayIcon, + const TQString &description, const TQString& caption, unsigned int categories=0x0 , unsigned int options=0x0 ); /** @@ -254,12 +254,12 @@ public: /** * \brief Return the list of overlay icons */ - QStringList overlayIcons() const; + TQStringList overlayIcons() const; /** * \brief Return the description */ - QString description() const; + TQString description() const; /** * \brief Return the protocol this applies to @@ -283,7 +283,7 @@ public: * @param contact is the contact the icon should apply to. * @param size is the size we the icon should be scaled to - 16 is default and so costs nothing */ - QPixmap iconFor( const Contact *contact, int size = 16 ) const; + TQPixmap iconFor( const Contact *contact, int size = 16 ) const; /** * \brief Return the mime source for a status icon generated for the given Contact @@ -297,7 +297,7 @@ public: * @param contact is the contact the icon should apply to. * @param size is the size we the icon should be scaled to - 16 is default and so costs nothing */ - QString mimeSourceFor( const Contact *contact, int size = 16 ) const; + TQString mimeSourceFor( const Contact *contact, int size = 16 ) const; /** * \brief Return a status icon generated for the given Account @@ -307,10 +307,10 @@ public: * over the base icon. * A cache is employed to reduce CPU and memory usage. * @param account is the account the icon should apply to. - * The account's color causes tinting, if it's plain QColor(), no tinting takes place. + * The account's color causes tinting, if it's plain TQColor(), no tinting takes place. * @param size is the size we the icon should be scaled to - 16 is default and so costs nothing */ - QPixmap iconFor( const Account *account, int size = 16 ) const; + TQPixmap iconFor( const Account *account, int size = 16 ) const; /** * \brief Return the mime source for a status icon generated for the given Account @@ -322,10 +322,10 @@ public: * so no assumptions should be made about long-time availability * of the referenced data. * @param account is the account the icon should apply to. - * The account's color causes tinting, if it's plain QColor(), no tinting takes place. + * The account's color causes tinting, if it's plain TQColor(), no tinting takes place. * @param size is the size we the icon should be scaled to - 16 is default and so costs nothing */ - QString mimeSourceFor( const Account *account, int size = 16 ) const; + TQString mimeSourceFor( const Account *account, int size = 16 ) const; /** * \brief Return a previously rendered status icon for a mime source key @@ -336,14 +336,14 @@ public: * requesting the key (thus rendering the icon) and trying to access the * icon by key, an invalid pixmap will be returned. */ - QPixmap iconFor( const QString &mimeSource ) const; + TQPixmap iconFor( const TQString &mimeSource ) const; /** * \brief Returns the status icon for the protocol. * * A cache is employed to reduce CPU and memory usage. */ - QPixmap protocolIcon() const; + TQPixmap protocolIcon() const; /** * Assignment operator @@ -381,20 +381,20 @@ public: bool operator<( const OnlineStatus &other ) const; /** - * \brief returns a QString from a StatusType + * \brief returns a TQString from a StatusType * * Static method to convert a Kopete::OnlineStatus::StatusType to a string to avoid * many issues when saving StatusType to disk */ - static QString statusTypeToString(OnlineStatus::StatusType status); + static TQString statusTypeToString(OnlineStatus::StatusType status); /** * \brief returns a StatusType from a QString * - * Static method to convert a QString representing a StatusType to a StatusType to avoid + * Static method to convert a TQString representing a StatusType to a StatusType to avoid * many issues when saving StatusType to disk */ - static OnlineStatus::StatusType statusStringToType(QString& string); + static OnlineStatus::StatusType statusStringToType(TQString& string); @@ -403,7 +403,7 @@ private: class Private; KSharedPtr d; - QString mimeSource( const QString& icon, int size, QColor color, bool idle) const; + TQString mimeSource( const TQString& icon, int size, TQColor color, bool idle) const; }; diff --git a/kopete/libkopete/kopeteonlinestatusmanager.cpp b/kopete/libkopete/kopeteonlinestatusmanager.cpp index 61c41b83..67364e6b 100644 --- a/kopete/libkopete/kopeteonlinestatusmanager.cpp +++ b/kopete/libkopete/kopeteonlinestatusmanager.cpp @@ -41,16 +41,16 @@ class OnlineStatusManager::Private struct RegisteredStatusStruct { - QString caption; + TQString caption; unsigned int categories; unsigned int options; }; - typedef QMap< OnlineStatus , RegisteredStatusStruct > ProtocolMap ; + typedef TQMap< OnlineStatus , RegisteredStatusStruct > ProtocolMap ; - QPixmap *nullPixmap; - QMap registeredStatus; - QDict< QPixmap > iconCache; + TQPixmap *nullPixmap; + TQMap registeredStatus; + TQDict< TQPixmap > iconCache; }; OnlineStatusManager *OnlineStatusManager::s_self=0L; @@ -68,7 +68,7 @@ OnlineStatusManager::OnlineStatusManager() { d->iconCache.setAutoDelete( true ); d->nullPixmap = new QPixmap; - connect( kapp, SIGNAL( iconChanged(int) ), this, SLOT( slotIconsChanged() ) ); + connect( kapp, TQT_SIGNAL( iconChanged(int) ), this, TQT_SLOT( slotIconsChanged() ) ); } OnlineStatusManager::~OnlineStatusManager() @@ -83,7 +83,7 @@ void OnlineStatusManager::slotIconsChanged() emit iconsChanged(); } -void OnlineStatusManager::registerOnlineStatus( const OnlineStatus &status, const QString & caption, unsigned int categories, unsigned int options) +void OnlineStatusManager::registerOnlineStatus( const OnlineStatus &status, const TQString & caption, unsigned int categories, unsigned int options) { Private::RegisteredStatusStruct s; s.caption=caption; @@ -133,25 +133,25 @@ OnlineStatus OnlineStatusManager::onlineStatus(Protocol * protocol, Categories c return OnlineStatus(); } -QString OnlineStatusManager::fingerprint( const OnlineStatus &statusFor, const QString& icon, int size, QColor color, bool idle) +TQString OnlineStatusManager::fingerprint( const OnlineStatus &statusFor, const TQString& icon, int size, TQColor color, bool idle) { // create a 'fingerprint' to use as a hash key // fingerprint consists of description/icon name/color/overlay name/size/idle state - return QString::fromLatin1("%1/%2/%3/%4/%5/%6") + return TQString::fromLatin1("%1/%2/%3/%4/%5/%6") .arg( statusFor.description() ) .arg( icon ) .arg( color.name() ) - .arg( statusFor.overlayIcons().join( QString::fromLatin1( "," ) ) ) + .arg( statusFor.overlayIcons().join( TQString::fromLatin1( "," ) ) ) .arg( size ) .arg( idle ? 'i' : 'a' ); } -QPixmap OnlineStatusManager::cacheLookupByObject( const OnlineStatus &statusFor, const QString& icon, int size, QColor color, bool idle) +TQPixmap OnlineStatusManager::cacheLookupByObject( const OnlineStatus &statusFor, const TQString& icon, int size, TQColor color, bool idle) { - QString fp = fingerprint( statusFor, icon, size, color, idle ); + TQString fp = fingerprint( statusFor, icon, size, color, idle ); // look it up in the cache - QPixmap *theIcon= d->iconCache.find( fp ); + TQPixmap *theIcon= d->iconCache.find( fp ); if ( !theIcon ) { // cache miss @@ -162,10 +162,10 @@ QPixmap OnlineStatusManager::cacheLookupByObject( const OnlineStatus &statusFor, return *theIcon; } -QPixmap OnlineStatusManager::cacheLookupByMimeSource( const QString &mimeSource ) +TQPixmap OnlineStatusManager::cacheLookupByMimeSource( const TQString &mimeSource ) { // look it up in the cache - const QPixmap *theIcon= d->iconCache.find( mimeSource ); + const TQPixmap *theIcon= d->iconCache.find( mimeSource ); if ( !theIcon ) { // need to return an invalid pixmap @@ -176,7 +176,7 @@ QPixmap OnlineStatusManager::cacheLookupByMimeSource( const QString &mimeSource // This code was forked from the broken KImageEffect::blendOnLower, but it's // been so heavily fixed and rearranged it's hard to recognise that now. -static void blendOnLower( const QImage &upper_, QImage &lower, const QPoint &offset ) +static void blendOnLower( const TQImage &upper_, TQImage &lower, const TQPoint &offset ) { if ( upper_.width() <= 0 || upper_.height() <= 0 ) return; @@ -187,7 +187,7 @@ static void blendOnLower( const QImage &upper_, QImage &lower, const QPoint &off if ( offset.y() < 0 || offset.y() >= lower.height() ) return; - QImage upper = upper_; + TQImage upper = upper_; if ( upper.depth() != 32 ) upper = upper.convertDepth( 32 ); if ( lower.depth() != 32 ) @@ -223,12 +223,12 @@ static void blendOnLower( const QImage &upper_, QImage &lower, const QPoint &off } // Get bounding box of image via alpha channel -static QRect getBoundingBox( const QImage& image ) +static TQRect getBoundingBox( const TQImage& image ) { const int width = image.width(); const int height = image.height(); if ( width <= 0 || height <= 0 ) - return QRect(); + return TQRect(); // scan image from left to right and top to bottom // to get upper left corner of bounding box @@ -267,39 +267,39 @@ static QRect getBoundingBox( const QImage& image ) } } } - return QRect( x1, y1, std::max( 0, x2-x1+1 ), std::max( 0, y2-y1+1 ) ); + return TQRect( x1, y1, std::max( 0, x2-x1+1 ), std::max( 0, y2-y1+1 ) ); } // Get offset for upperImage to blend it in the i%4-th corner of lowerImage: // bottom right, bottom left, top left, top right -static QPoint getOffsetForCorner( const QImage& upperImage, const QImage& lowerImage, const int i ) +static TQPoint getOffsetForCorner( const TQImage& upperImage, const TQImage& lowerImage, const int i ) { const int dX = lowerImage.width() - upperImage.width(); const int dY = lowerImage.height() - upperImage.height(); const int corner = i % 4; - QPoint offset; + TQPoint offset; switch( corner ) { case 0: // bottom right - offset = QPoint( dX, dY ); + offset = TQPoint( dX, dY ); break; case 1: // bottom left - offset = QPoint( 0, dY ); + offset = TQPoint( 0, dY ); break; case 2: // top left - offset = QPoint( 0, 0 ); + offset = TQPoint( 0, 0 ); break; case 3: // top right - offset = QPoint( dX, 0 ); + offset = TQPoint( dX, 0 ); break; } return offset; } -QPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const QString& baseIcon, int size, QColor color, bool idle) const +TQPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const TQString& baseIcon, int size, TQColor color, bool idle) const { // create an icon suiting the status from the base icon // use reasonable defaults if not provided or protocol not set @@ -307,7 +307,7 @@ QPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const Q if ( baseIcon == statusFor.overlayIcons().first() ) kdWarning( 14010 ) << "Base and overlay icons are the same - icon effects will not be visible." << endl; - QPixmap* basis = new QPixmap( SmallIcon( baseIcon ) ); + TQPixmap* basis = new TQPixmap( SmallIcon( baseIcon ) ); // Colorize if ( color.isValid() ) @@ -317,19 +317,19 @@ QPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const Q // that to be colored in this case. if ( statusFor.internalStatus() == Kopete::OnlineStatus::AccountOffline || statusFor.status() == Kopete::OnlineStatus::Offline ) { - *basis = KIconEffect().apply( *basis, KIconEffect::ToGray , 0.85, QColor() , false ); + *basis = KIconEffect().apply( *basis, KIconEffect::ToGray , 0.85, TQColor() , false ); } //composite the iconOverlay for this status and the supplied baseIcon - QStringList overlays = statusFor.overlayIcons(); + TQStringList overlays = statusFor.overlayIcons(); if ( !( overlays.isEmpty() ) ) // otherwise leave the basis as-is { KIconLoader *loader = KGlobal::instance()->iconLoader(); int i = 0; - for( QStringList::iterator it = overlays.begin(), end = overlays.end(); it != end; ++it ) + for( TQStringList::iterator it = overlays.begin(), end = overlays.end(); it != end; ++it ) { - QPixmap overlay = loader->loadIcon(*it, KIcon::Small, 0 , + TQPixmap overlay = loader->loadIcon(*it, KIcon::Small, 0 , KIcon::DefaultState, 0L, /*canReturnNull=*/ true ); if ( !overlay.isNull() ) @@ -337,10 +337,10 @@ QPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const Q // we want to preserve the alpha channels of both basis and overlay. // there's no way to do this in Qt. In fact, there's no way to do this // in KDE since KImageEffect is so badly broken. - QImage basisImage = basis->convertToImage(); - QImage overlayImage = overlay.convertToImage(); - QPoint offset; - if ( (*it).endsWith( QString::fromLatin1( "_overlay" ) ) ) + TQImage basisImage = basis->convertToImage(); + TQImage overlayImage = overlay.convertToImage(); + TQPoint offset; + if ( (*it).endsWith( TQString::fromLatin1( "_overlay" ) ) ) { // it is possible to have more than one overlay icon // to avoid overlapping we place them in different corners @@ -357,8 +357,8 @@ QPixmap* OnlineStatusManager::renderIcon( const OnlineStatus &statusFor, const Q // no need to scale if the icon is already of the required size (assuming height == width!) if ( basis->width() != size ) { - QImage scaledImg = basis->convertToImage().smoothScale( size, size ); - *basis = QPixmap( scaledImg ); + TQImage scaledImg = basis->convertToImage().smoothScale( size, size ); + *basis = TQPixmap( scaledImg ); } // if idle, apply effects @@ -379,27 +379,27 @@ void OnlineStatusManager::createAccountStatusActions( Account *account , KAction continue; OnlineStatus status=it.key(); - QString caption=it.data().caption; + TQString caption=it.data().caption; KAction *action; // Any existing actions owned by the account are reused by recovering them // from the parent's child list. // The description of the onlinestatus is used as the qobject name // This is safe as long as OnlineStatus are immutable - QCString actionName = status.description().ascii(); + TQCString actionName = status.description().ascii(); if ( !( action = static_cast( account->child( actionName ) ) ) ) { if(options & OnlineStatusManager::HasAwayMessage) { action = new AwayAction( status, caption, status.iconFor(account), 0, account, - SLOT( setOnlineStatus( const Kopete::OnlineStatus&, const QString& ) ), + TQT_SLOT( setOnlineStatus( const Kopete::OnlineStatus&, const TQString& ) ), account, actionName ); } else { action=new OnlineStatusAction( status, caption, status.iconFor(account) , account, actionName ); - connect(action,SIGNAL(activated(const Kopete::OnlineStatus&)) , - account, SLOT(setOnlineStatus(const Kopete::OnlineStatus&))); + connect(action,TQT_SIGNAL(activated(const Kopete::OnlineStatus&)) , + account, TQT_SLOT(setOnlineStatus(const Kopete::OnlineStatus&))); } } @@ -416,10 +416,10 @@ void OnlineStatusManager::createAccountStatusActions( Account *account , KAction } -OnlineStatusAction::OnlineStatusAction( const OnlineStatus& status, const QString &text, const QIconSet &pix, QObject *parent, const char *name) +OnlineStatusAction::OnlineStatusAction( const OnlineStatus& status, const TQString &text, const TQIconSet &pix, TQObject *parent, const char *name) : KAction( text, pix, KShortcut() , parent, name) , m_status(status) { - connect(this,SIGNAL(activated()),this,SLOT(slotActivated())); + connect(this,TQT_SIGNAL(activated()),this,TQT_SLOT(slotActivated())); } void OnlineStatusAction::slotActivated() diff --git a/kopete/libkopete/kopeteonlinestatusmanager.h b/kopete/libkopete/kopeteonlinestatusmanager.h index d3369403..926ef3fc 100644 --- a/kopete/libkopete/kopeteonlinestatusmanager.h +++ b/kopete/libkopete/kopeteonlinestatusmanager.h @@ -18,7 +18,7 @@ #ifndef kopeteonlinestatusmanager_h__ #define kopeteonlinestatusmanager_h__ -#include +#include #include "kopeteonlinestatus.h" #include "kaction.h" @@ -102,11 +102,11 @@ public: * @param categories A bitflag of @ref Categories * @param options is a bitflag of @ref Options */ - void registerOnlineStatus(const OnlineStatus& status, const QString &caption, unsigned int categories=0x00 , unsigned int options=0x0); + void registerOnlineStatus(const OnlineStatus& status, const TQString &caption, unsigned int categories=0x00 , unsigned int options=0x0); /** * insert "setStatus" actions from the given account to the specified actionMenu. - * (actions have that menu as parent QObject) + * (actions have that menu as parent TQObject) * they are connected to the Account::setOnlineStatus signal * * Items are stored by status height. @@ -125,10 +125,10 @@ public: private: friend class OnlineStatus; - QPixmap cacheLookupByObject( const OnlineStatus &statusFor, const QString& icon, int size, QColor color, bool idle = false); - QPixmap cacheLookupByMimeSource( const QString &mimeSource ); - QString fingerprint( const OnlineStatus &statusFor, const QString& icon, int size, QColor color, bool idle = false); - QPixmap* renderIcon( const OnlineStatus &statusFor, const QString& baseicon, int size, QColor color, bool idle = false) const; + TQPixmap cacheLookupByObject( const OnlineStatus &statusFor, const TQString& icon, int size, TQColor color, bool idle = false); + TQPixmap cacheLookupByMimeSource( const TQString &mimeSource ); + TQString fingerprint( const OnlineStatus &statusFor, const TQString& icon, int size, TQColor color, bool idle = false); + TQPixmap* renderIcon( const OnlineStatus &statusFor, const TQString& baseicon, int size, TQColor color, bool idle = false) const; signals: void iconsChanged(); @@ -152,7 +152,7 @@ class OnlineStatusAction : public KAction { Q_OBJECT public: - OnlineStatusAction ( const OnlineStatus& status, const QString &text, const QIconSet &pix, QObject *parent=0, const char *name=0); + OnlineStatusAction ( const OnlineStatus& status, const TQString &text, const TQIconSet &pix, TQObject *parent=0, const char *name=0); signals: void activated( const Kopete::OnlineStatus& status ); private slots: diff --git a/kopete/libkopete/kopetepassword.cpp b/kopete/libkopete/kopetepassword.cpp index f0b788a9..5edc1b27 100644 --- a/kopete/libkopete/kopetepassword.cpp +++ b/kopete/libkopete/kopetepassword.cpp @@ -21,10 +21,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -40,7 +40,7 @@ class Kopete::Password::Private { public: - Private( const QString &group, uint maxLen, bool blanksAllowed ) + Private( const TQString &group, uint maxLen, bool blanksAllowed ) : refCount( 1 ), configGroup( group ), remembered( false ), maximumLength( maxLen ), isWrong( false ), allowBlankPassword( blanksAllowed ) { @@ -58,11 +58,11 @@ public: /** Reference count */ int refCount; /** Group to use for KConfig and KWallet */ - const QString configGroup; + const TQString configGroup; /** Is the password being remembered? */ bool remembered; - /** The current password in the KConfig file, or QString::null if no password there */ - QString passwordFromKConfig; + /** The current password in the KConfig file, or TQString::null if no password there */ + TQString passwordFromKConfig; /** The maximum length allowed for this password, or -1 if there is no limit */ uint maximumLength; /** Is the current password known to be wrong? */ @@ -70,7 +70,7 @@ public: /** Are we allowed to have blank passwords? */ bool allowBlankPassword; /** The cached password */ - QString cachedValue; + TQString cachedValue; }; /** @@ -81,8 +81,8 @@ public: class KopetePasswordRequest : public KopetePasswordRequestBase { public: - KopetePasswordRequest( QObject *owner, Kopete::Password &pass ) - : QObject( owner ), mPassword( pass ), mWallet( 0 ) + KopetePasswordRequest( TQObject *owner, Kopete::Password &pass ) + : TQObject( owner ), mPassword( pass ), mWallet( 0 ) { } @@ -92,7 +92,7 @@ public: void begin() { kdDebug( 14010 ) << k_funcinfo << endl; - Kopete::WalletManager::self()->openWallet( this, SLOT( walletReceived( KWallet::Wallet* ) ) ); + Kopete::WalletManager::self()->openWallet( this, TQT_SLOT( walletReceived( KWallet::Wallet* ) ) ); } void walletReceived( KWallet::Wallet *wallet ) @@ -123,16 +123,16 @@ protected: class KopetePasswordGetRequest : public KopetePasswordRequest { public: - KopetePasswordGetRequest( QObject *owner, Kopete::Password &pass ) + KopetePasswordGetRequest( TQObject *owner, Kopete::Password &pass ) : KopetePasswordRequest( owner, pass ) { } - QString grabPassword() + TQString grabPassword() { // Before trying to read from the wallet, check if the config file holds a password. // If so, remove it from the config and set it through KWallet instead. - QString pwd; + TQString pwd; if ( mPassword.d->remembered && !mPassword.d->passwordFromKConfig.isNull() ) { pwd = mPassword.d->passwordFromKConfig; @@ -146,10 +146,10 @@ public: if ( mPassword.d->remembered && !mPassword.d->passwordFromKConfig.isNull() ) return mPassword.d->passwordFromKConfig; - return QString::null; + return TQString::null; } - void finished( const QString &result ) + void finished( const TQString &result ) { mPassword.d->cachedValue = result; emit requestFinished( result ); @@ -160,14 +160,14 @@ public: class KopetePasswordGetRequestPrompt : public KopetePasswordGetRequest { public: - KopetePasswordGetRequestPrompt( QObject *owner, Kopete::Password &pass, const QPixmap &image, const QString &prompt, Kopete::Password::PasswordSource source ) + KopetePasswordGetRequestPrompt( TQObject *owner, Kopete::Password &pass, const TQPixmap &image, const TQString &prompt, Kopete::Password::PasswordSource source ) : KopetePasswordGetRequest( owner, pass ), mImage( image ), mPrompt( prompt ), mSource( source ), mView( 0 ) { } void processRequest() { - QString result = grabPassword(); + TQString result = grabPassword(); if ( mSource == Kopete::Password::FromUser || result.isNull() ) doPasswordDialog(); else @@ -198,15 +198,15 @@ public: mView->adjustSize(); passwdDialog->adjustSize(); - connect( passwdDialog, SIGNAL( okClicked() ), SLOT( slotOkPressed() ) ); - connect( passwdDialog, SIGNAL( cancelClicked() ), SLOT( slotCancelPressed() ) ); - connect( this, SIGNAL( destroyed() ), passwdDialog, SLOT( deleteLater() ) ); + connect( passwdDialog, TQT_SIGNAL( okClicked() ), TQT_SLOT( slotOkPressed() ) ); + connect( passwdDialog, TQT_SIGNAL( cancelClicked() ), TQT_SLOT( slotCancelPressed() ) ); + connect( this, TQT_SIGNAL( destroyed() ), passwdDialog, TQT_SLOT( deleteLater() ) ); passwdDialog->show(); } void slotOkPressed() { - QString result = QString::fromLocal8Bit( mView->m_password->password() ); + TQString result = TQString::fromLocal8Bit( mView->m_password->password() ); if ( mView->m_save_passwd->isChecked() ) mPassword.set( result ); @@ -215,12 +215,12 @@ public: void slotCancelPressed() { - finished( QString::null ); + finished( TQString::null ); } private: - QPixmap mImage; - QString mPrompt; + TQPixmap mImage; + TQString mPrompt; Kopete::Password::PasswordSource mSource; unsigned int mMaxLength; KopetePasswordDialog *mView; @@ -229,7 +229,7 @@ private: class KopetePasswordGetRequestNoPrompt : public KopetePasswordGetRequest { public: - KopetePasswordGetRequestNoPrompt( QObject *owner, Kopete::Password &pass ) + KopetePasswordGetRequestNoPrompt( TQObject *owner, Kopete::Password &pass ) : KopetePasswordGetRequest( owner, pass ) { } @@ -248,7 +248,7 @@ public: class KopetePasswordSetRequest : public KopetePasswordRequest { public: - KopetePasswordSetRequest( Kopete::Password &pass, const QString &newPass ) + KopetePasswordSetRequest( Kopete::Password &pass, const TQString &newPass ) : KopetePasswordRequest( 0, pass ), mNewPass( newPass ) { if ( KApplication *app = KApplication::kApplication() ) @@ -276,7 +276,7 @@ public: if ( mWallet && mWallet->writePassword( mPassword.d->configGroup, mNewPass ) == 0 ) { mPassword.d->remembered = true; - mPassword.d->passwordFromKConfig = QString::null; + mPassword.d->passwordFromKConfig = TQString::null; mPassword.writeConfig(); return true; } @@ -288,13 +288,13 @@ public: //NOTE: This will start a nested event loop. However, this is fine; the only code we // call after this point is in Kopete::Password, so as long as we've not been deleted - // everything should work out OK. We have no parent QObject, so we should survive. + // everything should work out OK. We have no parent TQObject, so we should survive. if ( KMessageBox::warningContinueCancel( Kopete::UI::Global::mainWidget(), i18n( "Kopete is unable to save your password securely in your wallet;
    " "do you want to save the password in the unsafe configuration file instead?
    " ), i18n( "Unable to Store Secure Password" ), - KGuiItem( i18n( "Store &Unsafe" ), QString::fromLatin1( "unlock" ) ), - QString::fromLatin1( "KWalletFallbackToKConfig" ) ) != KMessageBox::Continue ) + KGuiItem( i18n( "Store &Unsafe" ), TQString::fromLatin1( "unlock" ) ), + TQString::fromLatin1( "KWalletFallbackToKConfig" ) ) != KMessageBox::Continue ) { return false; } @@ -306,7 +306,7 @@ public: } private: - QString mNewPass; + TQString mNewPass; }; class KopetePasswordClearRequest : public KopetePasswordRequest @@ -329,7 +329,7 @@ public: if ( clearPassword() ) { mPassword.setWrong( true ); - mPassword.d->cachedValue = QString::null; + mPassword.d->cachedValue = TQString::null; } delete this; @@ -339,7 +339,7 @@ public: kdDebug( 14010 ) << k_funcinfo << " clearing password" << endl; mPassword.d->remembered = false; - mPassword.d->passwordFromKConfig = QString::null; + mPassword.d->passwordFromKConfig = TQString::null; mPassword.writeConfig(); if ( mWallet ) mWallet->removeEntry( mPassword.d->configGroup ); @@ -347,21 +347,21 @@ public: } }; -Kopete::Password::Password( const QString &configGroup, uint maximumLength, const char *name ) - : QObject( 0, name ), d( new Private( configGroup, maximumLength, false ) ) +Kopete::Password::Password( const TQString &configGroup, uint maximumLength, const char *name ) + : TQObject( 0, name ), d( new Private( configGroup, maximumLength, false ) ) { readConfig(); } -Kopete::Password::Password( const QString &configGroup, uint maximumLength, +Kopete::Password::Password( const TQString &configGroup, uint maximumLength, bool allowBlankPassword, const char *name ) - : QObject( 0, name ), d( new Private( configGroup, maximumLength, allowBlankPassword ) ) + : TQObject( 0, name ), d( new Private( configGroup, maximumLength, allowBlankPassword ) ) { readConfig(); } Kopete::Password::Password( Password &other, const char *name ) - : QObject( 0, name ), d( other.d->incRef() ) + : TQObject( 0, name ), d( other.d->incRef() ) { } @@ -383,9 +383,9 @@ void Kopete::Password::readConfig() KConfig *config = KGlobal::config(); config->setGroup( d->configGroup ); - QString passwordCrypted = config->readEntry( "Password" ); + TQString passwordCrypted = config->readEntry( "Password" ); if ( passwordCrypted.isNull() ) - d->passwordFromKConfig = QString::null; + d->passwordFromKConfig = TQString::null; else d->passwordFromKConfig = KStringHandler::obscure( passwordCrypted ); @@ -448,30 +448,30 @@ void Kopete::Password::setWrong( bool bWrong ) d->isWrong = bWrong; writeConfig(); - if ( bWrong ) d->cachedValue = QString::null; + if ( bWrong ) d->cachedValue = TQString::null; } -void Kopete::Password::requestWithoutPrompt( QObject *returnObj, const char *slot ) +void Kopete::Password::requestWithoutPrompt( TQObject *returnObj, const char *slot ) { KopetePasswordRequest *request = new KopetePasswordGetRequestNoPrompt( returnObj, *this ); // call connect on returnObj so we can still connect if 'slot' is protected/private - returnObj->connect( request, SIGNAL( requestFinished( const QString & ) ), slot ); + returnObj->connect( request, TQT_SIGNAL( requestFinished( const TQString & ) ), slot ); request->begin(); } -void Kopete::Password::request( QObject *returnObj, const char *slot, const QPixmap &image, const QString &prompt, Kopete::Password::PasswordSource source ) +void Kopete::Password::request( TQObject *returnObj, const char *slot, const TQPixmap &image, const TQString &prompt, Kopete::Password::PasswordSource source ) { KopetePasswordRequest *request = new KopetePasswordGetRequestPrompt( returnObj, *this, image, prompt, source ); - returnObj->connect( request, SIGNAL( requestFinished( const QString & ) ), slot ); + returnObj->connect( request, TQT_SIGNAL( requestFinished( const TQString & ) ), slot ); request->begin(); } -QString Kopete::Password::cachedValue() +TQString Kopete::Password::cachedValue() { return d->cachedValue; } -void Kopete::Password::set( const QString &pass ) +void Kopete::Password::set( const TQString &pass ) { // if we're being told to forget the password, and we aren't remembering one, // don't try to open the wallet. fixes bug #71804. diff --git a/kopete/libkopete/kopetepassword.h b/kopete/libkopete/kopetepassword.h index 149db6f6..de2f96c1 100644 --- a/kopete/libkopete/kopetepassword.h +++ b/kopete/libkopete/kopetepassword.h @@ -17,7 +17,7 @@ #ifndef KOPETEPASSWORD_H #define KOPETEPASSWORD_H -#include +#include #include "kopete_export.h" namespace KWallet { class Wallet; } @@ -57,7 +57,7 @@ public: * * @deprecated Use the constructor that specifies if a blank password is allowed */ - explicit Password( const QString &configGroup, uint maxLength = 0, const char *name = 0 ); + explicit Password( const TQString &configGroup, uint maxLength = 0, const char *name = 0 ); /** * Create a new Kopete::Password object. @@ -67,7 +67,7 @@ public: * @param allowBlankPassword If this password is allowed to be blank * @param name The name for this object */ - explicit Password( const QString &configGroup, uint maxLength = 0, + explicit Password( const TQString &configGroup, uint maxLength = 0, bool allowBlankPassword = false, const char *name = 0 ); /** @@ -126,27 +126,27 @@ public: * * @param receiver The object to notify when the password request finishes * @param slot The slot on receiver to call at the end of the request. The signature - * of this function should be slot( const QString &password ). password will - * be the password if successful, or QString::null if failed. + * of this function should be slot( const TQString &password ). password will + * be the password if successful, or TQString::null if failed. * @param image The icon to display in the dialog when asking for the password * @param prompt The message to display to the user, asking for a * password. Can be any Qt RichText string. * @param source The source the password is taken from if a wrong or * invalid password is entered or the password could not be found in the wallet */ - void request( QObject *receiver, const char *slot, const QPixmap &image, - const QString &prompt, PasswordSource source = FromConfigOrUser ); + void request( TQObject *receiver, const char *slot, const TQPixmap &image, + const TQString &prompt, PasswordSource source = FromConfigOrUser ); /** * @brief Start an asynchronous password request without a prompt * * Starts an asynchronous password request. Does not pop up a password entry dialog * if there is no password. - * @see request(QObject*,const char*,const QPixmap&,const QString&,bool,unsigned int) + * @see request(TQObject*,const char*,const TQPixmap&,const TQString&,bool,unsigned int) * The password given to the provided slot will be NULL if no password could be retrieved for * some reason, such as the user declining to open the wallet, or no password being found. */ - void requestWithoutPrompt( QObject *receiver, const char *slot ); + void requestWithoutPrompt( TQObject *receiver, const char *slot ); /** * @return true if the password is remembered, false otherwise. @@ -163,21 +163,21 @@ public: /** * When a password request succeeds, the password is cached. This function - * returns the cached password, if there is one, or QString::null if there + * returns the cached password, if there is one, or TQString::null if there * is not. */ - QString cachedValue(); + TQString cachedValue(); public slots: /** * Set the password for this account. - * @param pass If set to QString::null, the password is forgotten unless you + * @param pass If set to TQString::null, the password is forgotten unless you * specified to allow blank passwords. Otherwise, sets the password to * this value. * * Note: this function is asynchronous; changes will not be instant. */ - void set( const QString &pass = QString::null ); + void set( const TQString &pass = TQString::null ); /** * Unconditionally clears the stored password @@ -208,7 +208,7 @@ class KopetePasswordRequestBase : public virtual QObject { Q_OBJECT signals: - void requestFinished( const QString &password ); + void requestFinished( const TQString &password ); public slots: virtual void walletReceived( KWallet::Wallet *wallet ) = 0; virtual void slotOkPressed() = 0; diff --git a/kopete/libkopete/kopetepasswordedaccount.cpp b/kopete/libkopete/kopetepasswordedaccount.cpp index 9fea5c66..cf0e2932 100644 --- a/kopete/libkopete/kopetepasswordedaccount.cpp +++ b/kopete/libkopete/kopetepasswordedaccount.cpp @@ -21,24 +21,24 @@ #include -#include +#include struct Kopete::PasswordedAccount::Private { - Private( const QString &group, uint maxLen, bool allowBlankPassword ) : + Private( const TQString &group, uint maxLen, bool allowBlankPassword ) : password( group, maxLen, allowBlankPassword, "mPassword" ) {} Kopete::Password password; Kopete::OnlineStatus initialStatus; }; -Kopete::PasswordedAccount::PasswordedAccount( Kopete::Protocol *parent, const QString &acctId, uint maxLen, const char *name ) - : Kopete::Account( parent, acctId, name ), d( new Private( QString::fromLatin1("Account_")+ parent->pluginId() + QString::fromLatin1("_") + acctId , maxLen, false ) ) +Kopete::PasswordedAccount::PasswordedAccount( Kopete::Protocol *parent, const TQString &acctId, uint maxLen, const char *name ) + : Kopete::Account( parent, acctId, name ), d( new Private( TQString::fromLatin1("Account_")+ parent->pluginId() + TQString::fromLatin1("_") + acctId , maxLen, false ) ) { } -Kopete::PasswordedAccount::PasswordedAccount( Kopete::Protocol *parent, const QString &acctId, uint maxLen, +Kopete::PasswordedAccount::PasswordedAccount( Kopete::Protocol *parent, const TQString &acctId, uint maxLen, bool allowBlankPassword, const char *name ) - : Kopete::Account( parent, acctId, name ), d( new Private( QString::fromLatin1("Account_")+ parent->pluginId() + QString::fromLatin1("_") + acctId , maxLen, allowBlankPassword ) ) + : Kopete::Account( parent, acctId, name ), d( new Private( TQString::fromLatin1("Account_")+ parent->pluginId() + TQString::fromLatin1("_") + acctId , maxLen, allowBlankPassword ) ) { } @@ -64,20 +64,20 @@ void Kopete::PasswordedAccount::connect( const Kopete::OnlineStatus& initialStat // warn user somewhere d->initialStatus = initialStatus; - QString cached = password().cachedValue(); + TQString cached = password().cachedValue(); if( !cached.isNull() || d->password.allowBlankPassword() ) { connectWithPassword( cached ); return; } - QString prompt = passwordPrompt(); + TQString prompt = passwordPrompt(); Kopete::Password::PasswordSource src = password().isWrong() ? Kopete::Password::FromUser : Kopete::Password::FromConfigOrUser; - password().request( this, SLOT( connectWithPassword( const QString & ) ), accountIcon( Kopete::Password::preferredImageSize() ), prompt, src ); + password().request( this, TQT_SLOT( connectWithPassword( const TQString & ) ), accountIcon( Kopete::Password::preferredImageSize() ), prompt, src ); } -QString Kopete::PasswordedAccount::passwordPrompt() +TQString Kopete::PasswordedAccount::passwordPrompt() { if ( password().isWrong() ) return i18n( "The password was wrong; please re-enter your password for %1 account %2" ).arg( protocol()->displayName(), accountId() ); @@ -92,7 +92,7 @@ Kopete::OnlineStatus Kopete::PasswordedAccount::initialStatus() bool Kopete::PasswordedAccount::removeAccount() { - password().set(QString::null); + password().set(TQString::null); return Kopete::Account::removeAccount(); } diff --git a/kopete/libkopete/kopetepasswordedaccount.h b/kopete/libkopete/kopetepasswordedaccount.h index 1534025d..d008bae4 100644 --- a/kopete/libkopete/kopetepasswordedaccount.h +++ b/kopete/libkopete/kopetepasswordedaccount.h @@ -49,7 +49,7 @@ public: * * @deprecated Use the constructor that specifies if a blank password is allowed */ - PasswordedAccount( Protocol *parent, const QString &acctId, uint maxPasswordLength = 0, const char *name = 0 ); + PasswordedAccount( Protocol *parent, const TQString &acctId, uint maxPasswordLength = 0, const char *name = 0 ); /** * KopetePasswordedAccount constructor @@ -60,7 +60,7 @@ public: * * @param name The name for this QObject */ - PasswordedAccount( Protocol *parent, const QString &acctId, uint maxPasswordLength = 0, + PasswordedAccount( Protocol *parent, const TQString &acctId, uint maxPasswordLength = 0, bool allowBlankPassword = false, const char *name = 0 ); virtual ~PasswordedAccount(); @@ -99,10 +99,10 @@ public: public slots: /** * Called when your account should attempt to connect. - * @param password The password to connect with, or QString::null + * @param password The password to connect with, or TQString::null * if the user wished to cancel the connection attempt. */ - virtual void connectWithPassword( const QString &password ) = 0; + virtual void connectWithPassword( const TQString &password ) = 0; protected: /** @@ -110,7 +110,7 @@ protected: * The default implementation should be adequate in most cases; override * if you have a custom message to show the user. */ - virtual QString passwordPrompt(); + virtual TQString passwordPrompt(); protected slots: /** diff --git a/kopete/libkopete/kopetepicture.cpp b/kopete/libkopete/kopetepicture.cpp index 1c586b40..05468c21 100644 --- a/kopete/libkopete/kopetepicture.cpp +++ b/kopete/libkopete/kopetepicture.cpp @@ -16,7 +16,7 @@ */ #include "kopetepicture.h" -#include +#include #include @@ -33,9 +33,9 @@ public: Private() {} - QString pictureBase64; - QImage pictureImage; - QString picturePath; + TQString pictureBase64; + TQImage pictureImage; + TQString picturePath; }; Picture::Picture() @@ -43,13 +43,13 @@ Picture::Picture() { } -Picture::Picture(const QString &path) +Picture::Picture(const TQString &path) : d(new Private) { setPicture(path); } -Picture::Picture(const QImage &image) +Picture::Picture(const TQImage &image) : d(new Private) { setPicture(image); @@ -74,25 +74,25 @@ Picture &Picture::operator=(const Picture &other) return *this; } -QImage Picture::image() +TQImage Picture::image() { // Do the conversion if only needed. // If the image is null, the path is not empty then. if( d->pictureImage.isNull() ) { - d->pictureImage = QImage(d->picturePath); + d->pictureImage = TQImage(d->picturePath); } return d->pictureImage; } -QString Picture::base64() +TQString Picture::base64() { if( d->pictureBase64.isEmpty() ) { // Generate base64 cache for the picture. - QByteArray tempArray; - QBuffer tempBuffer( tempArray ); + TQByteArray tempArray; + TQBuffer tempBuffer( tempArray ); tempBuffer.open( IO_WriteOnly ); // Make sure it create a image cache. if( image().save( &tempBuffer, "PNG" ) ) @@ -104,23 +104,23 @@ QString Picture::base64() return d->pictureBase64; } -QString Picture::path() +TQString Picture::path() { if( d->picturePath.isEmpty() ) { // For a image source, finding a filename is tricky. // I decided to use MD5 Hash as the filename. - QString localPhotoPath; + TQString localPhotoPath; // Generate MD5 Hash for the image. - QByteArray tempArray; - QBuffer tempBuffer(tempArray); + TQByteArray tempArray; + TQBuffer tempBuffer(tempArray); tempBuffer.open( IO_WriteOnly ); image().save(&tempBuffer, "PNG"); KMD5 context(tempArray); // Save the image to a file. localPhotoPath = context.hexDigest() + ".png"; - localPhotoPath = locateLocal( "appdata", QString::fromUtf8("metacontactpicturecache/%1").arg( localPhotoPath) ); + localPhotoPath = locateLocal( "appdata", TQString::fromUtf8("metacontactpicturecache/%1").arg( localPhotoPath) ); if( image().save(localPhotoPath, "PNG") ) { d->picturePath = localPhotoPath; @@ -145,30 +145,30 @@ bool Picture::isNull() void Picture::clear() { detach(); - d->pictureBase64 = QString::null; - d->picturePath = QString::null; - d->pictureImage = QImage(); + d->pictureBase64 = TQString::null; + d->picturePath = TQString::null; + d->pictureImage = TQImage(); } -void Picture::setPicture(const QImage &image) +void Picture::setPicture(const TQImage &image) { detach(); d->pictureImage = image; // Clear the path and base64, it will call the update of then when "getted" - d->picturePath= QString::null; - d->pictureBase64 = QString::null; + d->picturePath= TQString::null; + d->pictureBase64 = TQString::null; } -void Picture::setPicture(const QString &path) +void Picture::setPicture(const TQString &path) { detach(); d->picturePath = path; // Clear the image and base64, it will call the update of then when "getted" - d->pictureImage = QImage(); - d->pictureBase64 = QString::null; + d->pictureImage = TQImage(); + d->pictureBase64 = TQString::null; } void Picture::setPicture(const KABC::Picture &picture) diff --git a/kopete/libkopete/kopetepicture.h b/kopete/libkopete/kopetepicture.h index 5631afc1..46e7a7c2 100644 --- a/kopete/libkopete/kopetepicture.h +++ b/kopete/libkopete/kopetepicture.h @@ -21,7 +21,7 @@ #include #include "kopete_export.h" -#include +#include namespace KABC { @@ -33,12 +33,12 @@ namespace Kopete /** * @brief Represent a picture in Kopete context * - * It kept a cache of a QImage object, a base64 string and + * It kept a cache of a TQImage object, a base64 string and * a path to a image file. It ensure that all source are synced. * Interally, the image is stored in PNG format when possible. * It can happen that the image path do not return a PNG file. * - * You can only use an QImage and a image path to create/update + * You can only use an TQImage and a image path to create/update * the picture. * If the picture doesn't exist as a file, it generate a local * copy into ~/.kde/share/apps/kopete/metacontactpicturecache @@ -48,12 +48,12 @@ namespace Kopete * How to use this class: * @code * Kopete::Picture picture; - * picture.setPicture(QImage()); - * picture.setPicture(QString("/tmp/image.png")); + * picture.setPicture(TQImage()); + * picture.setPicture(TQString("/tmp/image.png")); * - * QString base64 = picture.base64(); - * QString path = picture.path(); - * QImage image = picture.image(); + * TQString base64 = picture.base64(); + * TQString path = picture.path(); + * TQImage image = picture.image(); * @endcode * * @author Michaël Larouche @@ -68,11 +68,11 @@ public: /** * Create a picture from a local path. */ - Picture(const QString &path); + Picture(const TQString &path); /** - * Create a picture from a QImage. + * Create a picture from a TQImage. */ - Picture(const QImage &image); + Picture(const TQImage &image); /** * Create a picture from a KABC::Picture. */ @@ -92,21 +92,21 @@ public: Picture &operator=(const Picture &other); /** - * Return the current picture as QImage. - * QImage can used to draw the image on a context. + * Return the current picture as TQImage. + * TQImage can used to draw the image on a context. * - * @return the QImage cache of current picture. + * @return the TQImage cache of current picture. */ - QImage image(); + TQImage image(); /** * Return the current picture as a base64 string. * The base64 is used to include the picture into a XML/XHTML context. */ - QString base64(); + TQString base64(); /** * Return the local path of the current picture. */ - QString path(); + TQString path(); /** * Check if the picture is null. @@ -119,14 +119,14 @@ public: /** * Set the picture content. - * @param image the picture as a QImage. + * @param image the picture as a TQImage. */ - void setPicture(const QImage &image); + void setPicture(const TQImage &image); /** * Set the picture content. * @param path the path to the picture. */ - void setPicture(const QString &path); + void setPicture(const TQString &path); /** * Set the picture content. * @param picture a KABC Picture. diff --git a/kopete/libkopete/kopeteplugin.cpp b/kopete/libkopete/kopeteplugin.cpp index cec99179..3c31545a 100644 --- a/kopete/libkopete/kopeteplugin.cpp +++ b/kopete/libkopete/kopeteplugin.cpp @@ -28,15 +28,15 @@ namespace Kopete { class Plugin::Private { public: - QStringList addressBookFields; - QString indexField; + TQStringList addressBookFields; + TQString indexField; }; -Plugin::Plugin( KInstance *instance, QObject *parent, const char *name ) -: QObject( parent, name ), KXMLGUIClient(), d(new Private) +Plugin::Plugin( KInstance *instance, TQObject *parent, const char *name ) +: TQObject( parent, name ), KXMLGUIClient(), d(new Private) { setInstance( instance ); - KSettings::Dispatcher::self()->registerInstance( instance, this, SIGNAL( settingsChanged() ) ); + KSettings::Dispatcher::self()->registerInstance( instance, this, TQT_SIGNAL( settingsChanged() ) ); } Plugin::~Plugin() @@ -44,20 +44,20 @@ Plugin::~Plugin() delete d; } -QString Plugin::pluginId() const +TQString Plugin::pluginId() const { - return QString::fromLatin1( className() ); + return TQString::fromLatin1( className() ); } -QString Plugin::displayName() const +TQString Plugin::displayName() const { - return pluginInfo() ? pluginInfo()->name() : QString::null; + return pluginInfo() ? pluginInfo()->name() : TQString::null; } -QString Plugin::pluginIcon() const +TQString Plugin::pluginIcon() const { - return pluginInfo() ? pluginInfo()->icon() : QString::null; + return pluginInfo() ? pluginInfo()->icon() : TQString::null; } @@ -74,26 +74,26 @@ void Plugin::aboutToUnload() void Plugin::deserialize( MetaContact * /* metaContact */, - const QMap & /* stream */ ) + const TQMap & /* stream */ ) { // Do nothing in default implementation } -void Kopete::Plugin::addAddressBookField( const QString &field, AddressBookFieldAddMode mode ) +void Kopete::Plugin::addAddressBookField( const TQString &field, AddressBookFieldAddMode mode ) { d->addressBookFields.append( field ); if( mode == MakeIndexField ) d->indexField = field; } -QStringList Kopete::Plugin::addressBookFields() const +TQStringList Kopete::Plugin::addressBookFields() const { return d->addressBookFields; } -QString Kopete::Plugin::addressBookIndexField() const +TQString Kopete::Plugin::addressBookIndexField() const { return d->indexField; diff --git a/kopete/libkopete/kopeteplugin.h b/kopete/libkopete/kopeteplugin.h index 43a80849..eebad0d2 100644 --- a/kopete/libkopete/kopeteplugin.h +++ b/kopete/libkopete/kopeteplugin.h @@ -21,7 +21,7 @@ #define KOPETEPLUGIN_H #include -#include +#include #include #include "kopete_export.h" @@ -71,7 +71,7 @@ Comment=Plugin that do some nice stuff static const KAboutData aboutdata("kopete_myplugin", I18N_NOOP("MyPlugin") , "1.0" ); K_EXPORT_COMPONENT_FACTORY( kopete_myplugin, MyPluginFactory( &aboutdata ) ) - MyPlugin::MyPlugin( QObject *parent, const char *name, const QStringList & args ) + MyPlugin::MyPlugin( TQObject *parent, const char *name, const TQStringList & args ) : Kopete::Plugin( MyPluginFactory::instance(), parent, name ) { //... @@ -87,12 +87,12 @@ Comment=Plugin that do some nice stuff * @author Duncan Mac-Vicar P. * @author Olivier Goffart */ -class KOPETE_EXPORT Plugin : public QObject, public KXMLGUIClient +class KOPETE_EXPORT Plugin : public TQObject, public KXMLGUIClient { Q_OBJECT public: - Plugin( KInstance *instance, QObject *parent, const char *name ); + Plugin( KInstance *instance, TQObject *parent, const char *name ); virtual ~Plugin(); /** @@ -109,35 +109,35 @@ public: * * This is a convenience method that simply calls @ref pluginInfo()->icon(). */ - QString pluginIcon() const; + TQString pluginIcon() const; /** * Returns the display name of this plugin. * * This is a convenience method that simply calls @ref pluginInfo()->name(). */ - QString displayName() const; + TQString displayName() const; /** * @brief Get the plugin id - * @return the plugin's id which is gotten by calling QObject::className(). + * @return the plugin's id which is gotten by calling TQObject::className(). */ - QString pluginId() const; + TQString pluginId() const; /** * Return the list of all keys from the address book in which the plugin * is interested. Those keys are monitored for changes upon load and * during runtime. When the key actually changes, the plugin's - * addressBookKeyChanged( Kopete::MetaContact *mc, const QString &key ) + * addressBookKeyChanged( Kopete::MetaContact *mc, const TQString &key ) * is called. * You can add fields to the list using @ref addAddressBookField() */ - QStringList addressBookFields() const; + TQStringList addressBookFields() const; /** * Return the index field as set by @ref addAddressBookField() */ - QString addressBookIndexField() const; + TQString addressBookIndexField() const; /** * Mode for an address book field as used by @ref addAddressBookField() @@ -155,7 +155,7 @@ public: * Only one field can be index field. Calling this method multiple times * as index field will reset the value of index field! */ - void addAddressBookField( const QString &field, AddressBookFieldAddMode mode = AddOnly ); + void addAddressBookField( const TQString &field, AddressBookFieldAddMode mode = AddOnly ); /** * @brief Prepare for unloading a plugin @@ -199,7 +199,7 @@ public slots: * * @todo we probably should think to another way to save the contacltist. */ - virtual void deserialize( MetaContact *metaContact, const QMap &data ); + virtual void deserialize( MetaContact *metaContact, const TQMap &data ); protected: diff --git a/kopete/libkopete/kopetepluginmanager.cpp b/kopete/libkopete/kopetepluginmanager.cpp index 8f613a86..1aff9e9f 100644 --- a/kopete/libkopete/kopetepluginmanager.cpp +++ b/kopete/libkopete/kopetepluginmanager.cpp @@ -27,11 +27,11 @@ #include #endif -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -56,11 +56,11 @@ public: Private() : shutdownMode( StartingUp ), isAllPluginsLoaded(false) {} // All available plugins, regardless of category, and loaded or not - QValueList plugins; + TQValueList plugins; // Dict of all currently loaded plugins, mapping the KPluginInfo to // a plugin - typedef QMap InfoToPluginMap; + typedef TQMap InfoToPluginMap; InfoToPluginMap loadedPlugins; // The plugin manager's mode. The mode is StartingUp until loadAllPlugins() @@ -71,7 +71,7 @@ public: ShutdownMode shutdownMode; // Plugins pending for loading - QValueStack pluginsToLoad; + TQValueStack pluginsToLoad; static KStaticDeleter deleter; @@ -89,10 +89,10 @@ PluginManager* PluginManager::self() return s_self; } -PluginManager::PluginManager() : QObject( qApp ), d( new Private ) +PluginManager::PluginManager() : TQObject( qApp ), d( new Private ) { - d->plugins = KPluginInfo::fromServices( KTrader::self()->query( QString::fromLatin1( "Kopete/Plugin" ), - QString::fromLatin1( "[X-Kopete-Version] == 1000900" ) ) ); + d->plugins = KPluginInfo::fromServices( KTrader::self()->query( TQString::fromLatin1( "Kopete/Plugin" ), + TQString::fromLatin1( "[X-Kopete-Version] == 1000900" ) ) ); // We want to add a reference to the application's event loop so we // can remain in control when all windows are removed. @@ -119,13 +119,13 @@ PluginManager::~PluginManager() delete d; } -QValueList PluginManager::availablePlugins( const QString &category ) const +TQValueList PluginManager::availablePlugins( const TQString &category ) const { if ( category.isEmpty() ) return d->plugins; - QValueList result; - QValueList::ConstIterator it; + TQValueList result; + TQValueList::ConstIterator it; for ( it = d->plugins.begin(); it != d->plugins.end(); ++it ) { if ( ( *it )->category() == category ) @@ -135,7 +135,7 @@ QValueList PluginManager::availablePlugins( const QString &catego return result; } -PluginList PluginManager::loadedPlugins( const QString &category ) const +PluginList PluginManager::loadedPlugins( const TQString &category ) const { PluginList result; @@ -205,17 +205,17 @@ void PluginManager::shutdown() kdDebug(14010) << k_funcinfo << "Running under valgrind, disabling plugin unload timeout guard" << endl; else #endif - QTimer::singleShot( 3000, this, SLOT( slotShutdownTimeout() ) ); + TQTimer::singleShot( 3000, this, TQT_SLOT( slotShutdownTimeout() ) ); } void PluginManager::slotPluginReadyForUnload() { - // Using QObject::sender() is on purpose here, because otherwise all + // Using TQObject::sender() is on purpose here, because otherwise all // plugins would have to pass 'this' as parameter, which makes the API // less clean for plugin authors // FIXME: I don't buy the above argument. Add a Kopete::Plugin::emitReadyForUnload(void), // and make readyForUnload be passed a plugin. - Richard - Plugin *plugin = dynamic_cast( const_cast( sender() ) ); + Plugin *plugin = dynamic_cast( const_cast( sender() ) ); kdDebug( 14010 ) << k_funcinfo << plugin->pluginId() << "ready for unload" << endl; if ( !plugin ) { @@ -234,12 +234,12 @@ void PluginManager::slotShutdownTimeout() if ( d->shutdownMode == Private::DoneShutdown ) return; - QStringList remaining; + TQStringList remaining; for ( Private::InfoToPluginMap::ConstIterator it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it ) remaining.append( it.data()->pluginId() ); kdWarning( 14010 ) << k_funcinfo << "Some plugins didn't shutdown in time!" << endl - << "Remaining plugins: " << remaining.join( QString::fromLatin1( ", " ) ) << endl + << "Remaining plugins: " << remaining.join( TQString::fromLatin1( ", " ) ) << endl << "Forcing Kopete shutdown now." << endl; slotShutdownDone(); @@ -259,29 +259,29 @@ void PluginManager::loadAllPlugins() // FIXME: We need session management here - Martijn KConfig *config = KGlobal::config(); - if ( config->hasGroup( QString::fromLatin1( "Plugins" ) ) ) + if ( config->hasGroup( TQString::fromLatin1( "Plugins" ) ) ) { - QMap pluginsMap; + TQMap pluginsMap; - QMap entries = config->entryMap( QString::fromLatin1( "Plugins" ) ); - QMap::Iterator it; + TQMap entries = config->entryMap( TQString::fromLatin1( "Plugins" ) ); + TQMap::Iterator it; for ( it = entries.begin(); it != entries.end(); ++it ) { - QString key = it.key(); - if ( key.endsWith( QString::fromLatin1( "Enabled" ) ) ) - pluginsMap.insert( key.left( key.length() - 7 ), (it.data() == QString::fromLatin1( "true" )) ); + TQString key = it.key(); + if ( key.endsWith( TQString::fromLatin1( "Enabled" ) ) ) + pluginsMap.insert( key.left( key.length() - 7 ), (it.data() == TQString::fromLatin1( "true" )) ); } - QValueList plugins = availablePlugins( QString::null ); - QValueList::ConstIterator it2 = plugins.begin(); - QValueList::ConstIterator end = plugins.end(); + TQValueList plugins = availablePlugins( TQString::null ); + TQValueList::ConstIterator it2 = plugins.begin(); + TQValueList::ConstIterator end = plugins.end(); for ( ; it2 != end; ++it2 ) { // Protocols are loaded automatically so they aren't always in Plugins group. (fixes bug 167113) - if ( (*it2)->category() == QString::fromLatin1( "Protocols" ) ) + if ( (*it2)->category() == TQString::fromLatin1( "Protocols" ) ) continue; - QString pluginName = (*it2)->pluginName(); + TQString pluginName = (*it2)->pluginName(); bool inMap = pluginsMap.contains( pluginName ); if ( (inMap && pluginsMap[pluginName]) || (!inMap && (*it2)->isPluginEnabledByDefault()) ) { @@ -301,9 +301,9 @@ void PluginManager::loadAllPlugins() else { // we had no config, so we load any plugins that should be loaded by default. - QValueList plugins = availablePlugins( QString::null ); - QValueList::ConstIterator it = plugins.begin(); - QValueList::ConstIterator end = plugins.end(); + TQValueList plugins = availablePlugins( TQString::null ); + TQValueList::ConstIterator it = plugins.begin(); + TQValueList::ConstIterator end = plugins.end(); for ( ; it != end; ++it ) { if ( (*it)->isPluginEnabledByDefault() ) @@ -311,7 +311,7 @@ void PluginManager::loadAllPlugins() } } // Schedule the plugins to load - QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) ); } void PluginManager::slotLoadNextPlugin() @@ -327,26 +327,26 @@ void PluginManager::slotLoadNextPlugin() return; } - QString key = d->pluginsToLoad.pop(); + TQString key = d->pluginsToLoad.pop(); loadPluginInternal( key ); // Schedule the next run unconditionally to avoid code duplication on the // allPluginsLoaded() signal's handling. This has the added benefit that // the signal is delayed one event loop, so the accounts are more likely // to be instantiated. - QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) ); } -Plugin * PluginManager::loadPlugin( const QString &_pluginId, PluginLoadMode mode /* = LoadSync */ ) +Plugin * PluginManager::loadPlugin( const TQString &_pluginId, PluginLoadMode mode /* = LoadSync */ ) { - QString pluginId = _pluginId; + TQString pluginId = _pluginId; // Try to find legacy code // FIXME: Find any cases causing this, remove them, and remove this too - Richard - if ( pluginId.endsWith( QString::fromLatin1( ".desktop" ) ) ) + if ( pluginId.endsWith( TQString::fromLatin1( ".desktop" ) ) ) { kdWarning( 14010 ) << "Trying to use old-style API!" << endl << kdBacktrace() << endl; - pluginId = pluginId.remove( QRegExp( QString::fromLatin1( ".desktop$" ) ) ); + pluginId = pluginId.remove( TQRegExp( TQString::fromLatin1( ".desktop$" ) ) ); } if ( mode == LoadSync ) @@ -356,12 +356,12 @@ Plugin * PluginManager::loadPlugin( const QString &_pluginId, PluginLoadMode mod else { d->pluginsToLoad.push( pluginId ); - QTimer::singleShot( 0, this, SLOT( slotLoadNextPlugin() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotLoadNextPlugin() ) ); return 0L; } } -Plugin *PluginManager::loadPluginInternal( const QString &pluginId ) +Plugin *PluginManager::loadPluginInternal( const TQString &pluginId ) { //kdDebug( 14010 ) << k_funcinfo << pluginId << endl; @@ -376,16 +376,16 @@ Plugin *PluginManager::loadPluginInternal( const QString &pluginId ) return d->loadedPlugins[ info ]; int error = 0; - Plugin *plugin = KParts::ComponentFactory::createInstanceFromQuery( QString::fromLatin1( "Kopete/Plugin" ), - QString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ), this, 0, QStringList(), &error ); + Plugin *plugin = KParts::ComponentFactory::createInstanceFromQuery( TQString::fromLatin1( "Kopete/Plugin" ), + TQString::fromLatin1( "[X-KDE-PluginInfo-Name]=='%1'" ).arg( pluginId ), this, 0, TQStringList(), &error ); if ( plugin ) { d->loadedPlugins.insert( info, plugin ); info->setPluginEnabled( true ); - connect( plugin, SIGNAL( destroyed( QObject * ) ), this, SLOT( slotPluginDestroyed( QObject * ) ) ); - connect( plugin, SIGNAL( readyForUnload() ), this, SLOT( slotPluginReadyForUnload() ) ); + connect( plugin, TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( slotPluginDestroyed( TQObject * ) ) ); + connect( plugin, TQT_SIGNAL( readyForUnload() ), this, TQT_SLOT( slotPluginReadyForUnload() ) ); kdDebug( 14010 ) << k_funcinfo << "Successfully loaded plugin '" << pluginId << "'" << endl; @@ -424,7 +424,7 @@ Plugin *PluginManager::loadPluginInternal( const QString &pluginId ) return plugin; } -bool PluginManager::unloadPlugin( const QString &spec ) +bool PluginManager::unloadPlugin( const TQString &spec ) { //kdDebug(14010) << k_funcinfo << spec << endl; if( Plugin *thePlugin = plugin( spec ) ) @@ -438,7 +438,7 @@ bool PluginManager::unloadPlugin( const QString &spec ) -void PluginManager::slotPluginDestroyed( QObject *plugin ) +void PluginManager::slotPluginDestroyed( TQObject *plugin ) { for ( Private::InfoToPluginMap::Iterator it = d->loadedPlugins.begin(); it != d->loadedPlugins.end(); ++it ) @@ -454,14 +454,14 @@ void PluginManager::slotPluginDestroyed( QObject *plugin ) { // Use a timer to make sure any pending deleteLater() calls have // been handled first - QTimer::singleShot( 0, this, SLOT( slotShutdownDone() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotShutdownDone() ) ); } } -Plugin* PluginManager::plugin( const QString &_pluginId ) const +Plugin* PluginManager::plugin( const TQString &_pluginId ) const { // Hack for compatibility with Plugin::pluginId(), which returns // classname() instead of the internal name. Changing that is not easy @@ -470,9 +470,9 @@ Plugin* PluginManager::plugin( const QString &_pluginId ) const // For now, just transform FooProtocol to kopete_foo. // FIXME: In the future we'll need to change this nevertheless to unify // the handling - Martijn - QString pluginId = _pluginId; - if ( pluginId.endsWith( QString::fromLatin1( "Protocol" ) ) ) - pluginId = QString::fromLatin1( "kopete_" ) + _pluginId.lower().remove( QString::fromLatin1( "protocol" ) ); + TQString pluginId = _pluginId; + if ( pluginId.endsWith( TQString::fromLatin1( "Protocol" ) ) ) + pluginId = TQString::fromLatin1( "kopete_" ) + _pluginId.lower().remove( TQString::fromLatin1( "protocol" ) ); // End hack KPluginInfo *info = infoForPluginId( pluginId ); @@ -485,9 +485,9 @@ Plugin* PluginManager::plugin( const QString &_pluginId ) const return 0L; } -KPluginInfo * PluginManager::infoForPluginId( const QString &pluginId ) const +KPluginInfo * PluginManager::infoForPluginId( const TQString &pluginId ) const { - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for ( it = d->plugins.begin(); it != d->plugins.end(); ++it ) { if ( ( *it )->pluginName() == pluginId ) @@ -498,21 +498,21 @@ KPluginInfo * PluginManager::infoForPluginId( const QString &pluginId ) const } -bool PluginManager::setPluginEnabled( const QString &_pluginId, bool enabled /* = true */ ) +bool PluginManager::setPluginEnabled( const TQString &_pluginId, bool enabled /* = true */ ) { - QString pluginId = _pluginId; + TQString pluginId = _pluginId; KConfig *config = KGlobal::config(); config->setGroup( "Plugins" ); // FIXME: What is this for? This sort of thing is kconf_update's job - Richard - if ( !pluginId.startsWith( QString::fromLatin1( "kopete_" ) ) ) - pluginId.prepend( QString::fromLatin1( "kopete_" ) ); + if ( !pluginId.startsWith( TQString::fromLatin1( "kopete_" ) ) ) + pluginId.prepend( TQString::fromLatin1( "kopete_" ) ); if ( !infoForPluginId( pluginId ) ) return false; - config->writeEntry( pluginId + QString::fromLatin1( "Enabled" ), enabled ); + config->writeEntry( pluginId + TQString::fromLatin1( "Enabled" ), enabled ); config->sync(); return true; diff --git a/kopete/libkopete/kopetepluginmanager.h b/kopete/libkopete/kopetepluginmanager.h index 815cf422..a250b091 100644 --- a/kopete/libkopete/kopetepluginmanager.h +++ b/kopete/libkopete/kopetepluginmanager.h @@ -19,11 +19,11 @@ #ifndef KOPETEPLUGINMANAGER_H #define KOPETEPLUGINMANAGER_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kopete_export.h" @@ -34,7 +34,7 @@ namespace Kopete class Plugin; -typedef QValueList PluginList; +typedef TQValueList PluginList; /** * @author Duncan Mac-Vicar Prett @@ -63,14 +63,14 @@ public: * You can query all information on the plugins through the KPluginInfo * interface. */ - QValueList availablePlugins( const QString &category = QString::null ) const; + TQValueList availablePlugins( const TQString &category = TQString::null ) const; /** * Returns a list of all plugins that are actually loaded. * If you omit the category you get all, otherwise it's a filtered list. * See also @ref availablePlugins(). */ - PluginList loadedPlugins( const QString &category = QString::null ) const; + PluginList loadedPlugins( const TQString &category = TQString::null ) const; /** * @brief Search by plugin name. This is the key used as X-KDE-PluginInfo-Name in @@ -82,7 +82,7 @@ public: * If you want to also load the plugin you can better use @ref loadPlugin, which returns * the pointer to the plugin if it's already loaded. */ - Plugin *plugin( const QString &pluginName ) const; + Plugin *plugin( const TQString &pluginName ) const; /** * @return the KPluginInfo for the specified plugin @@ -117,7 +117,7 @@ public: * * Returns false when no appropriate plugin can be found. */ - bool setPluginEnabled( const QString &name, bool enabled = true ); + bool setPluginEnabled( const TQString &name, bool enabled = true ); /** * This method check if all the plugins are loaded. @@ -143,12 +143,12 @@ public slots: * * See also @ref plugin(). */ - Plugin *loadPlugin( const QString &pluginId, PluginLoadMode mode = LoadSync ); + Plugin *loadPlugin( const TQString &pluginId, PluginLoadMode mode = LoadSync ); /** * @brief Unload the plugin specified by @p pluginName */ - bool unloadPlugin( const QString &pluginName ); + bool unloadPlugin( const TQString &pluginName ); /** * @brief Loads all the enabled plugins. Also used to reread the @@ -187,7 +187,7 @@ private slots: /** * @brief Cleans up some references if the plugin is destroyed */ - void slotPluginDestroyed( QObject *plugin ); + void slotPluginDestroyed( TQObject *plugin ); /** * shutdown() starts a timer, when it fires we force all plugins @@ -221,7 +221,7 @@ private: * Called by @ref loadPlugin directly or through the queue for async plugin * loading. */ - Plugin * loadPluginInternal( const QString &pluginId ); + Plugin * loadPluginInternal( const TQString &pluginId ); /** * @internal @@ -230,7 +230,7 @@ private: * * Returns a null pointer when no plugin info is found. */ - KPluginInfo * infoForPluginId( const QString &pluginId ) const; + KPluginInfo * infoForPluginId( const TQString &pluginId ) const; PluginManager(); diff --git a/kopete/libkopete/kopeteprefs.cpp b/kopete/libkopete/kopeteprefs.cpp index e1148260..2c974f7f 100644 --- a/kopete/libkopete/kopeteprefs.cpp +++ b/kopete/libkopete/kopeteprefs.cpp @@ -16,9 +16,9 @@ #include "kopeteprefs.h" -#include -#include -#include +#include +#include +#include #include #include @@ -37,7 +37,7 @@ KopetePrefs *KopetePrefs::prefs() return s_prefs; } -KopetePrefs::KopetePrefs() : QObject( kapp, "KopetePrefs" ) +KopetePrefs::KopetePrefs() : TQObject( kapp, "KopetePrefs" ) { config = KGlobal::config(); load(); @@ -82,7 +82,7 @@ void KopetePrefs::load() mChatViewBufferSize = config->readNumEntry("ChatView BufferSize", 250); - QColor tmpColor = KGlobalSettings::highlightColor(); + TQColor tmpColor = KGlobalSettings::highlightColor(); mHighlightBackground = config->readColorEntry("Highlight Background Color", &tmpColor); tmpColor = KGlobalSettings::highlightedTextColor(); mHighlightForeground = config->readColorEntry("Highlight Foreground Color", &tmpColor); @@ -90,7 +90,7 @@ void KopetePrefs::load() mBgOverride = config->readBoolEntry("ChatView Override Background", false); mFgOverride = config->readBoolEntry("ChatView Override Foreground", false); mRtfOverride = config->readBoolEntry("ChatView Override RTF", false); - mInterfacePreference = config->readEntry("View Plugin", QString::fromLatin1("kopete_chatwindow") ); + mInterfacePreference = config->readEntry("View Plugin", TQString::fromLatin1("kopete_chatwindow") ); tmpColor = KGlobalSettings::textColor(); mTextColor = config->readColorEntry("Text Color", &tmpColor ); tmpColor = KGlobalSettings::baseColor(); @@ -112,31 +112,31 @@ void KopetePrefs::load() if(mToolTipContents.empty()) { mToolTipContents - << QString::fromLatin1("FormattedName") - << QString::fromLatin1("userInfo") - << QString::fromLatin1("server") - << QString::fromLatin1("channels") - << QString::fromLatin1("FormattedIdleTime") - << QString::fromLatin1("channelMembers") - << QString::fromLatin1("channelTopic") - << QString::fromLatin1("emailAddress") - << QString::fromLatin1("homePage") - << QString::fromLatin1("onlineSince") - << QString::fromLatin1("lastOnline") - << QString::fromLatin1("awayMessage"); + << TQString::fromLatin1("FormattedName") + << TQString::fromLatin1("userInfo") + << TQString::fromLatin1("server") + << TQString::fromLatin1("channels") + << TQString::fromLatin1("FormattedIdleTime") + << TQString::fromLatin1("channelMembers") + << TQString::fromLatin1("channelTopic") + << TQString::fromLatin1("emailAddress") + << TQString::fromLatin1("homePage") + << TQString::fromLatin1("onlineSince") + << TQString::fromLatin1("lastOnline") + << TQString::fromLatin1("awayMessage"); } config->setGroup("ContactList"); int n = metaObject()->findProperty( "contactListDisplayMode" ); - QString value = config->readEntry("DisplayMode",QString::fromLatin1("Default")); + TQString value = config->readEntry("DisplayMode",TQString::fromLatin1("Default")); mContactListDisplayMode = (ContactDisplayMode)metaObject()->property( n )->keyToValue( value.latin1() ); n = metaObject()->findProperty( "contactListIconMode" ); value = config->readEntry("IconMode", - QString::fromLatin1("IconDefault")); + TQString::fromLatin1("IconDefault")); mContactListIconMode = (IconDisplayMode) metaObject()->property( n )->keyToValue( value.latin1() ); mContactListIndentContacts = config->readBoolEntry("IndentContacts", false); mContactListUseCustomFonts = config->readBoolEntry("UseCustomFonts", false); - QFont font = KGlobalSettings::generalFont(); + TQFont font = KGlobalSettings::generalFont(); mContactListNormalFont = config->readFontEntry("NormalFont", &font); if ( font.pixelSize() != -1 ) font.setPixelSize( (font.pixelSize() * 3) / 4 ); @@ -273,7 +273,7 @@ void KopetePrefs::save() mStyleVariantChanged = false; } -void KopetePrefs::setIconTheme(const QString &value) +void KopetePrefs::setIconTheme(const TQString &value) { if( mIconTheme != value ) { @@ -414,51 +414,51 @@ void KopetePrefs::setSoundIfAway(bool value) mSoundIfAway = value; } -void KopetePrefs::setStylePath(const QString &stylePath) +void KopetePrefs::setStylePath(const TQString &stylePath) { if(mStylePath != stylePath) mStylePathChanged = true; _setStylePath(stylePath); } -void KopetePrefs::_setStylePath(const QString &stylePath) +void KopetePrefs::_setStylePath(const TQString &stylePath) { mStylePath = stylePath; // Fallback to default style if the directory doesn't exist // or the value is empty. - if( !QFile::exists(stylePath) || stylePath.isEmpty() ) + if( !TQFile::exists(stylePath) || stylePath.isEmpty() ) { - QString fallback; - fallback = QString(QString::fromLatin1("styles/%1/")).arg(QString::fromLatin1(KOPETE_DEFAULT_CHATSTYLE)); + TQString fallback; + fallback = TQString(TQString::fromLatin1("styles/%1/")).arg(TQString::fromLatin1(KOPETE_DEFAULT_CHATSTYLE)); mStylePath = locate("appdata", fallback); } } -void KopetePrefs::setStyleVariant(const QString &variantPath) +void KopetePrefs::setStyleVariant(const TQString &variantPath) { if(mStyleVariant != variantPath) mStyleVariantChanged = true; mStyleVariant = variantPath; } -void KopetePrefs::setFontFace( const QFont &value ) +void KopetePrefs::setFontFace( const TQFont &value ) { if( value != mFontFace ) mWindowAppearanceChanged = true; mFontFace = value; } -void KopetePrefs::setTextColor( const QColor &value ) +void KopetePrefs::setTextColor( const TQColor &value ) { if( value != mTextColor ) mWindowAppearanceChanged = true; mTextColor = value; } -void KopetePrefs::setBgColor( const QColor &value ) +void KopetePrefs::setBgColor( const TQColor &value ) { if( value != mBgColor ) mWindowAppearanceChanged = true; mBgColor = value; } -void KopetePrefs::setLinkColor( const QColor &value ) +void KopetePrefs::setLinkColor( const TQColor &value ) { if( value != mLinkColor ) mWindowAppearanceChanged = true; mLinkColor = value; @@ -479,7 +479,7 @@ void KopetePrefs::setMaxContactNameLength( int value ) mMaxContactNameLength = value; } -void KopetePrefs::setInterfacePreference(const QString &value) +void KopetePrefs::setInterfacePreference(const TQString &value) { mInterfacePreference = value; } @@ -489,13 +489,13 @@ void KopetePrefs::setChatViewBufferSize( int value ) mChatViewBufferSize = value; } -void KopetePrefs::setHighlightBackground(const QColor &value) +void KopetePrefs::setHighlightBackground(const TQColor &value) { if( value != mHighlightBackground ) mWindowAppearanceChanged = true; mHighlightBackground = value; } -void KopetePrefs::setHighlightForeground(const QColor &value) +void KopetePrefs::setHighlightForeground(const TQColor &value) { if( value != mHighlightForeground ) mWindowAppearanceChanged = true; mHighlightForeground = value; @@ -531,20 +531,20 @@ void KopetePrefs::setShowTray(bool value) } -QString KopetePrefs::fileContents(const QString &path) +TQString KopetePrefs::fileContents(const TQString &path) { - QString contents; - QFile file( path ); + TQString contents; + TQFile file( path ); if ( file.open( IO_ReadOnly ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); contents = stream.read(); file.close(); } return contents; } -void KopetePrefs::setIdleContactColor(const QColor &value) +void KopetePrefs::setIdleContactColor(const TQColor &value) { if( value != mIdleContactColor ) mContactListAppearanceChanged = true; mIdleContactColor = value; @@ -555,7 +555,7 @@ void KopetePrefs::setRichText(bool value) mRichText=value; } -void KopetePrefs::setToolTipContents(const QStringList &value) +void KopetePrefs::setToolTipContents(const TQStringList &value) { mToolTipContents=value; } @@ -584,23 +584,23 @@ void KopetePrefs::setContactListUseCustomFonts( bool v ) mContactListUseCustomFonts = v; } -void KopetePrefs::setContactListCustomNormalFont( const QFont & v ) +void KopetePrefs::setContactListCustomNormalFont( const TQFont & v ) { if( v != mContactListNormalFont ) mContactListAppearanceChanged = true; mContactListNormalFont = v; } -void KopetePrefs::setContactListCustomSmallFont( const QFont & v ) +void KopetePrefs::setContactListCustomSmallFont( const TQFont & v ) { if( v != mContactListSmallFont ) mContactListAppearanceChanged = true; mContactListSmallFont = v; } -QFont KopetePrefs::contactListSmallFont() const +TQFont KopetePrefs::contactListSmallFont() const { if ( mContactListUseCustomFonts ) return contactListCustomSmallFont(); - QFont smallFont = KGlobalSettings::generalFont(); + TQFont smallFont = KGlobalSettings::generalFont(); if ( smallFont.pixelSize() != -1 ) smallFont.setPixelSize( (smallFont.pixelSize() * 3) / 4 ); else @@ -608,7 +608,7 @@ QFont KopetePrefs::contactListSmallFont() const return smallFont; } -void KopetePrefs::setContactListGroupNameColor( const QColor & v ) +void KopetePrefs::setContactListGroupNameColor( const TQColor & v ) { if( v != mContactListGroupNameColor ) mContactListAppearanceChanged = true; mContactListGroupNameColor = v; diff --git a/kopete/libkopete/kopeteprefs.h b/kopete/libkopete/kopeteprefs.h index 4a5162ff..4fb4a9e3 100644 --- a/kopete/libkopete/kopeteprefs.h +++ b/kopete/libkopete/kopeteprefs.h @@ -17,10 +17,10 @@ #ifndef __KOPETEPREFS_H__ #define __KOPETEPREFS_H__ -#include +#include #include -#include -#include +#include +#include #include "kopete_export.h" @@ -53,7 +53,7 @@ public: */ void save(); - QString iconTheme() const { return mIconTheme; } + TQString iconTheme() const { return mIconTheme; } bool useEmoticons() const { return mUseEmoticons; } bool showOffline() const { return mShowOffline; } bool showEmptyGroups() const { return mShowEmptyGroups; } @@ -79,19 +79,19 @@ public: bool soundIfAway() const { return mSoundIfAway; } int chatViewBufferSize() const { return mChatViewBufferSize; } int rememberedMessages() const { return mRememberedMessages; } - const QColor &highlightBackground() const { return mHighlightBackground; } - const QColor &highlightForeground() const { return mHighlightForeground; } - const QColor &textColor() const { return mTextColor; } - const QColor &bgColor() const { return mBgColor; } - const QColor &linkColor() const { return mLinkColor; } - const QFont &fontFace() const { return mFontFace; } - const QColor &idleContactColor() const { return mIdleContactColor; } + const TQColor &highlightBackground() const { return mHighlightBackground; } + const TQColor &highlightForeground() const { return mHighlightForeground; } + const TQColor &textColor() const { return mTextColor; } + const TQColor &bgColor() const { return mBgColor; } + const TQColor &linkColor() const { return mLinkColor; } + const TQFont &fontFace() const { return mFontFace; } + const TQColor &idleContactColor() const { return mIdleContactColor; } bool highlightEnabled() const { return mHighlightEnabled; } bool bgOverride() const { return mBgOverride; } bool fgOverride() const { return mFgOverride; } bool rtfOverride() const { return mRtfOverride; } - QString interfacePreference() const { return mInterfacePreference; } + TQString interfacePreference() const { return mInterfacePreference; } bool showTray() const { return mShowTray; } bool richText() const { return mRichText; } bool chatWShowSend() const { return mChatWShowSend; } @@ -100,12 +100,12 @@ public: int chatWindowPolicy() const { return mChatWindowPolicy; } //Styles - QString defaultTheme() const { return QString::fromLatin1("Default"); } + TQString defaultTheme() const { return TQString::fromLatin1("Default"); } //for Adium (xhtml+css) - QString stylePath() const { return mStylePath; } - QString styleVariant() const { return mStyleVariant; } + TQString stylePath() const { return mStylePath; } + TQString styleVariant() const { return mStyleVariant; } - QStringList toolTipContents() const { return mToolTipContents; } + TQStringList toolTipContents() const { return mToolTipContents; } /// enum ContactDisplayMode { Classic, RightAligned, Detailed, Yagami, Default = Classic }; @@ -115,10 +115,10 @@ public: ContactDisplayMode contactListDisplayMode() const { return mContactListDisplayMode; } IconDisplayMode contactListIconMode() const { return mContactListIconMode; } bool contactListUseCustomFonts() const { return mContactListUseCustomFonts; } - QFont contactListCustomNormalFont() const { return mContactListNormalFont; } - QFont contactListCustomSmallFont() const { return mContactListSmallFont; } - QFont contactListSmallFont() const; - QColor contactListGroupNameColor() const { return mContactListGroupNameColor; } + TQFont contactListCustomNormalFont() const { return mContactListNormalFont; } + TQFont contactListCustomSmallFont() const { return mContactListSmallFont; } + TQFont contactListSmallFont() const; + TQColor contactListGroupNameColor() const { return mContactListGroupNameColor; } bool contactListAnimation() const { return mContactListAnimation; } bool contactListFading() const { return mContactListFading; } bool contactListFolding() const { return mContactListFolding; } @@ -132,7 +132,7 @@ public: bool emoticonsRequireSpaces() const { return mEmoticonsRequireSpaces; } bool groupConsecutiveMessages() const { return mGroupConsecutiveMessages; } - void setIconTheme(const QString &value); + void setIconTheme(const TQString &value); void setUseEmoticons(bool value); void setShowOffline(bool value); void setShowEmptyGroups(bool value); @@ -156,32 +156,32 @@ public: void setSoundIfAway(bool); void setBeepNotify(bool); void setChatWindowPolicy(int); - void setStylePath(const QString &); - void setStyleVariant(const QString &); + void setStylePath(const TQString &); + void setStyleVariant(const TQString &); void setChatViewBufferSize(int); - void setHighlightBackground(const QColor &); - void setHighlightForeground(const QColor &); + void setHighlightBackground(const TQColor &); + void setHighlightForeground(const TQColor &); void setHighlightEnabled(bool); void setBgOverride(bool); void setFgOverride(bool); void setRtfOverride(bool); - void setInterfacePreference(const QString &viewPlugin); - void setTextColor(const QColor &); - void setBgColor(const QColor &); - void setLinkColor(const QColor &); - void setFontFace(const QFont &); - void setIdleContactColor(const QColor &); + void setInterfacePreference(const TQString &viewPlugin); + void setTextColor(const TQColor &); + void setBgColor(const TQColor &); + void setLinkColor(const TQColor &); + void setFontFace(const TQFont &); + void setIdleContactColor(const TQColor &); void setShowTray(bool); void setRichText(bool); void setRememberedMessages(int); - void setToolTipContents(const QStringList &); + void setToolTipContents(const TQStringList &); void setContactListIndentContacts( bool v ); void setContactListDisplayMode( ContactDisplayMode v ); void setContactListIconMode( IconDisplayMode v ); void setContactListUseCustomFonts( bool v ); - void setContactListCustomNormalFont( const QFont & v ); - void setContactListCustomSmallFont( const QFont & v ); - void setContactListGroupNameColor( const QColor & v ); + void setContactListCustomNormalFont( const TQFont & v ); + void setContactListCustomSmallFont( const TQFont & v ); + void setContactListGroupNameColor( const TQColor & v ); void setContactListAnimation( bool ); void setContactListFading( bool ); void setContactListFolding( bool ); @@ -213,12 +213,12 @@ signals: * Emitted when chat Window Style changed. * @param stylePath New stylePath */ - void styleChanged(const QString &stylePath); + void styleChanged(const TQString &stylePath); /** * Emitted when ChatWindowStyle variant changed. * @param variantPath New variant Path. */ - void styleVariantChanged(const QString &variantPath); + void styleVariantChanged(const TQString &variantPath); private: /** @@ -233,7 +233,7 @@ private: KConfig *config; - QString mIconTheme; + TQString mIconTheme; bool mUseEmoticons; bool mShowOffline; bool mShowEmptyGroups; @@ -258,15 +258,15 @@ private: int mBalloonCloseDelay; bool mSoundIfAway; int mRememberedMessages; - QString mInterfacePreference; + TQString mInterfacePreference; int mChatViewBufferSize; - QColor mHighlightBackground; - QColor mHighlightForeground; - QColor mTextColor; - QColor mBgColor; - QColor mLinkColor; - QFont mFontFace; - QColor mIdleContactColor; + TQColor mHighlightBackground; + TQColor mHighlightForeground; + TQColor mTextColor; + TQColor mBgColor; + TQColor mLinkColor; + TQFont mFontFace; + TQColor mIdleContactColor; bool mHighlightEnabled; bool mBgOverride; bool mFgOverride; @@ -287,20 +287,20 @@ private: // xhtml+css //for Adium (xhtml+css) - QString mStylePath; - QString mStyleVariant; + TQString mStylePath; + TQString mStyleVariant; bool mStylePathChanged; bool mStyleVariantChanged; - QStringList mToolTipContents; + TQStringList mToolTipContents; bool mContactListIndentContacts; ContactDisplayMode mContactListDisplayMode; IconDisplayMode mContactListIconMode; bool mContactListUseCustomFonts; - QFont mContactListNormalFont; - QFont mContactListSmallFont; - QColor mContactListGroupNameColor; + TQFont mContactListNormalFont; + TQFont mContactListSmallFont; + TQColor mContactListGroupNameColor; bool mContactListAnimation; bool mContactListFading; bool mContactListFolding; @@ -311,8 +311,8 @@ private: bool mEmoticonsRequireSpaces; bool mGroupConsecutiveMessages; - QString fileContents(const QString &path); - void _setStylePath (const QString &); + TQString fileContents(const TQString &path); + void _setStylePath (const TQString &); }; #endif // vim: set noet ts=4 sts=4 sw=4: diff --git a/kopete/libkopete/kopeteproperties.cpp b/kopete/libkopete/kopeteproperties.cpp index 9009cd07..3ed9d044 100644 --- a/kopete/libkopete/kopeteproperties.cpp +++ b/kopete/libkopete/kopeteproperties.cpp @@ -18,8 +18,8 @@ #include -#include -#include +#include +#include #include namespace Kopete { @@ -34,15 +34,15 @@ void customPropertyDataIncorrectType( const char *name, const std::type_info &fo } template<> -int variantTo(QVariant) { return 0; } +int variantTo(TQVariant) { return 0; } //... -QVariant variantFromXML(const QDomElement&) +TQVariant variantFromXML(const TQDomElement&) { - return QVariant(); + return TQVariant(); } -void variantToXML(QVariant v, QDomElement &) +void variantToXML(TQVariant v, TQDomElement &) { } diff --git a/kopete/libkopete/kopeteproperties.h b/kopete/libkopete/kopeteproperties.h index bfeaedea..24b7536f 100644 --- a/kopete/libkopete/kopeteproperties.h +++ b/kopete/libkopete/kopeteproperties.h @@ -17,7 +17,7 @@ #ifndef KOPETEPROPERTIES_H #define KOPETEPROPERTIES_H -#include +#include #include @@ -77,8 +77,8 @@ public: * * \code * SomeParent *propertyContainer = ... - * Property &myProperty = ... - * QString value = propertyContainer->property(myProperty); + * Property &myProperty = ... + * TQString value = propertyContainer->property(myProperty); * propertyContainer->setProperty(myProperty, "hello"); * \endcode * @@ -121,7 +121,7 @@ struct PropertyData */ class PropertyStorage { - typedef QAsciiDict PropertyDict; + typedef TQAsciiDict PropertyDict; // setCustomPropertyData can be called on a const object, allowing the // guarantee that DataProperty::data() never returns 0. mutable PropertyDict _storage; @@ -197,9 +197,9 @@ public: template struct UserVisible { - virtual QString userText( Parent * ) = 0; - virtual QString label() = 0; - virtual QString icon() = 0; + virtual TQString userText( Parent * ) = 0; + virtual TQString label() = 0; + virtual TQString icon() = 0; }; /** @@ -209,8 +209,8 @@ struct UserVisible template struct XMLSerializable { - virtual void fromXML( Parent *, const QDomElement & ) = 0; - virtual void toXML( const Parent *, QDomElement & ) = 0; + virtual void fromXML( Parent *, const TQDomElement & ) = 0; + virtual void toXML( const Parent *, TQDomElement & ) = 0; }; /** @@ -220,8 +220,8 @@ struct XMLSerializable template struct StringSerializable { - virtual void fromString( Parent *, const QString & ) = 0; - virtual QString toString( const Parent * ) = 0; + virtual void fromString( Parent *, const TQString & ) = 0; + virtual TQString toString( const Parent * ) = 0; }; //END interfaces @@ -297,12 +297,12 @@ public: */ /** - * Explicitly specialised for all types QVariant supports + * Explicitly specialised for all types TQVariant supports */ -template T variantTo(QVariant); +template T variantTo(TQVariant); -QVariant variantFromXML(const QDomElement&); -void variantToXML(QVariant v, QDomElement &); +TQVariant variantFromXML(const TQDomElement&); +void variantToXML(TQVariant v, TQDomElement &); /** * @} @@ -311,7 +311,7 @@ void variantToXML(QVariant v, QDomElement &); /** * @brief Convenience implementation of XMLSerializable in terms of QVariants * - * This class provides XML serialization for data that can be stored in a QVariant. You + * This class provides XML serialization for data that can be stored in a TQVariant. You * will need to multiply-inherit from this class and (usually indirectly) from @ref Property. * * You can combine this class with other convenience classes such as SimpleDataProperty @@ -319,8 +319,8 @@ void variantToXML(QVariant v, QDomElement &); * * \code * class ContactNickNameProperty - * : public SimpleDataProperty - * , XMLProperty + * : public SimpleDataProperty + * , XMLProperty * { * public: * const char *name() const { return "nickName"; } @@ -331,13 +331,13 @@ template class XMLProperty : public XMLSerializable { public: - void fromXML( Parent *t, const QDomElement &e ) + void fromXML( Parent *t, const TQDomElement &e ) { static_cast(this)->set(t, variantTo(variantFromXML(e))); } - void toXML( const Parent *t, QDomElement &e ) + void toXML( const Parent *t, TQDomElement &e ) { - variantToXML(QVariant(static_cast(this)->get(t)),e); + variantToXML(TQVariant(static_cast(this)->get(t)),e); } }; diff --git a/kopete/libkopete/kopeteprotocol.cpp b/kopete/libkopete/kopeteprotocol.cpp index 7854a1a3..e361abf6 100644 --- a/kopete/libkopete/kopeteprotocol.cpp +++ b/kopete/libkopete/kopeteprotocol.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include "kopeteaccountmanager.h" #include "kopeteaccount.h" @@ -50,7 +50,7 @@ public: Kopete::OnlineStatus accountNotConnectedStatus; }; -Protocol::Protocol( KInstance *instance, QObject *parent, const char *name ) +Protocol::Protocol( KInstance *instance, TQObject *parent, const char *name ) : Plugin( instance, parent, name ) { d = new Private; @@ -58,18 +58,18 @@ Protocol::Protocol( KInstance *instance, QObject *parent, const char *name ) d->mStickFullName = Global::Properties::self()->fullName(); d->unloading = false; d->capabilities = 0; - d->accountNotConnectedStatus = Kopete::OnlineStatus( Kopete::OnlineStatus::Unknown, 0, this, Kopete::OnlineStatus::AccountOffline, QString::fromLatin1( "account_offline_overlay" ), i18n( "Account Offline" ) ); + d->accountNotConnectedStatus = Kopete::OnlineStatus( Kopete::OnlineStatus::Unknown, 0, this, Kopete::OnlineStatus::AccountOffline, TQString::fromLatin1( "account_offline_overlay" ), i18n( "Account Offline" ) ); } Protocol::~Protocol() { // Remove all active accounts - QDict accounts = AccountManager::self()->accounts( this ); + TQDict accounts = AccountManager::self()->accounts( this ); if ( !accounts.isEmpty() ) { kdWarning( 14010 ) << k_funcinfo << "Deleting protocol with existing accounts! Did the account unloading go wrong?" << endl; - for( QDictIterator it( accounts ); it.current() ; ++it ) + for( TQDictIterator it( accounts ); it.current() ; ++it ) delete *it; } @@ -99,15 +99,15 @@ void Protocol::slotAccountOnlineStatusChanged( Contact *self ) // some protocols change status several times during shutdown. We should only call deleteLater() once disconnect( self, 0, this, 0 ); - connect( self->account(), SIGNAL(accountDestroyed(const Kopete::Account* )), - this, SLOT( slotAccountDestroyed( ) ) ); + connect( self->account(), TQT_SIGNAL(accountDestroyed(const Kopete::Account* )), + this, TQT_SLOT( slotAccountDestroyed( ) ) ); self->account()->deleteLater(); } void Protocol::slotAccountDestroyed( ) { - QDict dict = AccountManager::self()->accounts( this ); + TQDict dict = AccountManager::self()->accounts( this ); if ( dict.isEmpty() ) { // While at this point we are still in a stack trace from the destroyed @@ -124,20 +124,20 @@ void Protocol::aboutToUnload() d->unloading = true; // Disconnect all accounts - QDict accounts = AccountManager::self()->accounts( this ); + TQDict accounts = AccountManager::self()->accounts( this ); if ( accounts.isEmpty() ) emit readyForUnload(); - else for ( QDictIterator it( accounts ); it.current() ; ++it ) + else for ( TQDictIterator it( accounts ); it.current() ; ++it ) { if ( it.current()->myself() && it.current()->myself()->isOnline() ) { kdDebug( 14010 ) << k_funcinfo << it.current()->accountId() << " is still connected, disconnecting..." << endl; - QObject::connect( it.current()->myself(), - SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT( slotAccountOnlineStatusChanged( Kopete::Contact * ) ) ); + TQObject::connect( it.current()->myself(), + TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT( slotAccountOnlineStatusChanged( Kopete::Contact * ) ) ); it.current()->disconnect(); } else @@ -146,8 +146,8 @@ void Protocol::aboutToUnload() kdDebug( 14010 ) << k_funcinfo << it.current()->accountId() << " is already disconnected, deleting..." << endl; - QObject::connect( it.current(), SIGNAL( accountDestroyed( const Kopete::Account* ) ), - this, SLOT( slotAccountDestroyed( ) ) ); + TQObject::connect( it.current(), TQT_SIGNAL( accountDestroyed( const Kopete::Account* ) ), + this, TQT_SLOT( slotAccountDestroyed( ) ) ); it.current()->deleteLater(); } } @@ -157,13 +157,13 @@ void Protocol::aboutToUnload() void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) { - QMap serializedData, sd; - QMap addressBookData, ad; - QMap::Iterator it; + TQMap serializedData, sd; + TQMap addressBookData, ad; + TQMap::Iterator it; //kdDebug( 14010 ) << "Protocol::metaContactAboutToSave: protocol " << pluginId() << ": serializing " << metaContact->displayName() << endl; - QPtrList contacts=metaContact->contacts(); + TQPtrList contacts=metaContact->contacts(); for (Contact *c=contacts.first() ; c ; c=contacts.next() ) { if( c->protocol()->pluginId() != pluginId() ) @@ -174,14 +174,14 @@ void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) // Preset the contactId and displayName, if the plugin doesn't want to save // them, or use its own format, it can call clear() on the provided list - sd[ QString::fromLatin1( "contactId" ) ] = c->contactId(); + sd[ TQString::fromLatin1( "contactId" ) ] = c->contactId(); //TODO(nick) remove - sd[ QString::fromLatin1( "displayName" ) ] = c->property(Global::Properties::self()->nickName()).value().toString(); + sd[ TQString::fromLatin1( "displayName" ) ] = c->property(Global::Properties::self()->nickName()).value().toString(); if(c->account()) - sd[ QString::fromLatin1( "accountId" ) ] = c->account()->accountId(); + sd[ TQString::fromLatin1( "accountId" ) ] = c->account()->accountId(); // If there's an index field preset it too - QString index = c->protocol()->addressBookIndexField(); + TQString index = c->protocol()->addressBookIndexField(); if( !index.isEmpty() ) ad[ index ] = c->contactId(); @@ -194,11 +194,11 @@ void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) // The Unicode chars E000-F800 are non-printable and reserved for // private use in applications. For more details, see also // http://www.unicode.org/charts/PDF/UE000.pdf. - // Inside libkabc the use of QChar( 0xE000 ) has been standardized + // Inside libkabc the use of TQChar( 0xE000 ) has been standardized // as separator for the string lists, use this also for the 'normal' // serialized data. if( serializedData.contains( it.key() ) ) - serializedData[ it.key() ] = serializedData[ it.key() ] + QChar( 0xE000 ) + it.data(); + serializedData[ it.key() ] = serializedData[ it.key() ] + TQChar( 0xE000 ) + it.data(); else serializedData[ it.key() ] = it.data(); } @@ -206,7 +206,7 @@ void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) for( it = ad.begin(); it != ad.end(); ++it ) { if( addressBookData.contains( it.key() ) ) - addressBookData[ it.key() ] = addressBookData[ it.key() ] + QChar( 0xE000 ) + it.data(); + addressBookData[ it.key() ] = addressBookData[ it.key() ] + TQChar( 0xE000 ) + it.data(); else addressBookData[ it.key() ] = it.data(); } @@ -226,48 +226,48 @@ void Protocol::slotMetaContactAboutToSave( MetaContact *metaContact ) // we can devise a better API, but with the constantly changing // requirements every time I learn more about kabc I'd better no touch // the API yet - Martijn - if( it.key().startsWith( QString::fromLatin1( "messaging/" ) ) ) + if( it.key().startsWith( TQString::fromLatin1( "messaging/" ) ) ) { - metaContact->setAddressBookField( this, it.key(), QString::fromLatin1( "All" ), it.data() ); + metaContact->setAddressBookField( this, it.key(), TQString::fromLatin1( "All" ), it.data() ); // kdDebug(14010) << k_funcinfo << "metaContact->setAddressBookField( " << this << ", " << it.key() << ", \"All\", " << it.data() << " );" << endl; } else - metaContact->setAddressBookField( this, QString::fromLatin1( "kopete" ), it.key(), it.data() ); + metaContact->setAddressBookField( this, TQString::fromLatin1( "kopete" ), it.key(), it.data() ); } } -void Protocol::deserialize( MetaContact *metaContact, const QMap &data ) +void Protocol::deserialize( MetaContact *metaContact, const TQMap &data ) { /*kdDebug( 14010 ) << "Protocol::deserialize: protocol " << pluginId() << ": deserializing " << metaContact->displayName() << endl;*/ - QMap serializedData; - QMap serializedDataIterators; - QMap::ConstIterator it; + TQMap serializedData; + TQMap serializedDataIterators; + TQMap::ConstIterator it; for( it = data.begin(); it != data.end(); ++it ) { - serializedData[ it.key() ] = QStringList::split( QChar( 0xE000 ), it.data(), true ); + serializedData[ it.key() ] = TQStringList::split( TQChar( 0xE000 ), it.data(), true ); serializedDataIterators[ it.key() ] = serializedData[ it.key() ].begin(); } - uint count = serializedData[QString::fromLatin1("contactId")].count(); + uint count = serializedData[TQString::fromLatin1("contactId")].count(); // Prepare the independent entries to pass to the plugin's implementation for( uint i = 0; i < count ; i++ ) { - QMap sd; - QMap::Iterator serializedDataIt; + TQMap sd; + TQMap::Iterator serializedDataIt; for( serializedDataIt = serializedDataIterators.begin(); serializedDataIt != serializedDataIterators.end(); ++serializedDataIt ) { sd[ serializedDataIt.key() ] = *( serializedDataIt.data() ); ++( serializedDataIt.data() ); } - const QString& accountId=sd[ QString::fromLatin1( "accountId" ) ]; + const TQString& accountId=sd[ TQString::fromLatin1( "accountId" ) ]; // myself was allowed in the contactlist in old version of kopete. // But if one keep it on the contactlist now, it may conflict witht he myself metacontact. // So ignore it - if(accountId == sd[ QString::fromLatin1( "contactId" ) ] ) + if(accountId == sd[ TQString::fromLatin1( "contactId" ) ] ) { kdDebug( 14010 ) << k_funcinfo << "Myself contact was on the contactlist.xml for account " << accountId << ". Ignore it" << endl; continue; @@ -282,18 +282,18 @@ void Protocol::deserialize( MetaContact *metaContact, const QMap ad; - QStringList kabcFields = addressBookFields(); - for( QStringList::Iterator fieldIt = kabcFields.begin(); fieldIt != kabcFields.end(); ++fieldIt ) + TQMap ad; + TQStringList kabcFields = addressBookFields(); + for( TQStringList::Iterator fieldIt = kabcFields.begin(); fieldIt != kabcFields.end(); ++fieldIt ) { // FIXME: This hack is even more ugly, and has the same reasons as the similar // hack in the serialize code. // Once this code is actually capable of talking to kabc this hack // should be removed ASAP! - Martijn - if( ( *fieldIt ).startsWith( QString::fromLatin1( "messaging/" ) ) ) - ad[ *fieldIt ] = metaContact->addressBookField( this, *fieldIt, QString::fromLatin1( "All" ) ); + if( ( *fieldIt ).startsWith( TQString::fromLatin1( "messaging/" ) ) ) + ad[ *fieldIt ] = metaContact->addressBookField( this, *fieldIt, TQString::fromLatin1( "All" ) ); else - ad[ *fieldIt ] = metaContact->addressBookField( this, QString::fromLatin1( "kopete" ), *fieldIt ); + ad[ *fieldIt ] = metaContact->addressBookField( this, TQString::fromLatin1( "kopete" ), *fieldIt ); } // Check if we have an account id. If not we're deserializing a Kopete 0.6 contact @@ -302,10 +302,10 @@ void Protocol::deserialize( MetaContact *metaContact, const QMap accounts = AccountManager::self()->accounts( this ); + TQDict accounts = AccountManager::self()->accounts( this ); if ( accounts.count() > 0 ) { - sd[ QString::fromLatin1( "accountId" ) ] = QDictIterator( accounts ).currentKey(); + sd[ TQString::fromLatin1( "accountId" ) ] = TQDictIterator( accounts ).currentKey(); } else { @@ -326,8 +326,8 @@ void Protocol::deserialize( MetaContact *metaContact, const QMap & /* serializedData */, - const QMap & /* addressBookData */ ) + const TQMap & /* serializedData */, + const TQMap & /* addressBookData */ ) { /* Default implementation does nothing */ return 0; diff --git a/kopete/libkopete/kopeteprotocol.h b/kopete/libkopete/kopeteprotocol.h index 805e00c2..546247cf 100644 --- a/kopete/libkopete/kopeteprotocol.h +++ b/kopete/libkopete/kopeteprotocol.h @@ -62,7 +62,7 @@ class KOPETE_EXPORT Protocol : public Plugin public: /** - * @todo Ideally, the destructor should be protected. but we need it public to allow QPtrList + * @todo Ideally, the destructor should be protected. but we need it public to allow TQPtrList */ virtual ~Protocol(); @@ -78,14 +78,14 @@ public: * * @return The new @ref Account object created by this function */ - virtual Account *createNewAccount( const QString &accountId ) = 0; + virtual Account *createNewAccount( const TQString &accountId ) = 0; /** * @brief Create a new AddContactPage widget to be shown in the Add Contact Wizard. * * @return A new AddContactPage to be shown in the Add Contact Wizard */ - virtual AddContactPage *createAddContactWidget( QWidget *parent, Account *account ) = 0; + virtual AddContactPage *createAddContactWidget( TQWidget *parent, Account *account ) = 0; /** * @brief Create a new KopeteEditAccountWidget @@ -95,7 +95,7 @@ public: * @param account is the KopeteAccount to edit. If it's 0L, then we create a new account * @param parent The parent of the 'to be returned' widget */ - virtual KopeteEditAccountWidget * createEditAccountWidget( Account *account, QWidget *parent ) = 0; + virtual KopeteEditAccountWidget * createEditAccountWidget( Account *account, TQWidget *parent ) = 0; /** @@ -163,7 +163,7 @@ protected: * @param parent The protocol's parent object * @param name The protocol's name */ - Protocol( KInstance *instance, QObject *parent, const char *name ); + Protocol( KInstance *instance, TQObject *parent, const char *name ); /** * @brief Sets the capabilities of this protcol. @@ -224,7 +224,7 @@ public: * * @todo we probably should think to another way to save the contacltist. */ - virtual void deserialize( MetaContact *metaContact, const QMap &serializedData ); + virtual void deserialize( MetaContact *metaContact, const TQMap &serializedData ); /** * @brief Deserialize a single contact. @@ -242,8 +242,8 @@ public: * @todo we probably should think to another way to save the contacltist. */ virtual Contact *deserializeContact( MetaContact *metaContact, - const QMap &serializedData, - const QMap &addressBookData ); + const TQMap &serializedData, + const TQMap &addressBookData ); diff --git a/kopete/libkopete/kopetesimplemessagehandler.cpp b/kopete/libkopete/kopetesimplemessagehandler.cpp index 3e44520c..a312c2a8 100644 --- a/kopete/libkopete/kopetesimplemessagehandler.cpp +++ b/kopete/libkopete/kopetesimplemessagehandler.cpp @@ -19,7 +19,7 @@ #include -#include +#include namespace Kopete { @@ -31,12 +31,12 @@ class SimpleMessageHandlerFactory::Private public: Message::MessageDirection direction; int position; - QGuardedPtr target; + TQGuardedPtr target; const char *slot; }; SimpleMessageHandlerFactory::SimpleMessageHandlerFactory( Message::MessageDirection direction, - int position, QObject *target, const char *slot ) + int position, TQObject *target, const char *slot ) : d( new Private ) { d->direction = direction; @@ -55,7 +55,7 @@ MessageHandler *SimpleMessageHandlerFactory::create( ChatSession */*manager*/, M if ( direction != d->direction ) return 0; MessageHandler *handler = new SimpleMessageHandler; - QObject::connect( handler, SIGNAL( handle( Kopete::Message & ) ), d->target, d->slot ); + TQObject::connect( handler, TQT_SIGNAL( handle( Kopete::Message & ) ), d->target, d->slot ); return handler; } diff --git a/kopete/libkopete/kopetesimplemessagehandler.h b/kopete/libkopete/kopetesimplemessagehandler.h index af6de4ab..9a5fd296 100644 --- a/kopete/libkopete/kopetesimplemessagehandler.h +++ b/kopete/libkopete/kopetesimplemessagehandler.h @@ -45,7 +45,7 @@ public: * @see Kopete::MessageHandlerFactory::filterPosition */ SimpleMessageHandlerFactory( Message::MessageDirection direction, int position, - QObject *target, const char *slot ); + TQObject *target, const char *slot ); ~SimpleMessageHandlerFactory(); /** diff --git a/kopete/libkopete/kopetetask.cpp b/kopete/libkopete/kopetetask.cpp index b7484116..fad469c8 100644 --- a/kopete/libkopete/kopetetask.cpp +++ b/kopete/libkopete/kopetetask.cpp @@ -18,7 +18,7 @@ #include -#include +#include namespace Kopete { @@ -33,8 +33,8 @@ public: } Task::Result result; - QString errorMessage; - QPtrList subtasks; + TQString errorMessage; + TQPtrList subtasks; }; Task::Task() @@ -52,7 +52,7 @@ bool Task::succeeded() const return d->result == ResultSucceeded; } -const QString &Task::errorString() const +const TQString &Task::errorString() const { return d->errorMessage; } @@ -72,24 +72,24 @@ void Task::abort( int flags ) void Task::addSubtask( Task *task ) { d->subtasks.append( task ); - connect( task, SIGNAL( result( Kopete::Task* ) ), - this, SLOT( slotResult( Kopete::Task* ) ) ); - connect( task, SIGNAL( statusMessage( Kopete::Task*, const QString & ) ), - this, SIGNAL( statusMessage( Kopete::Task*, const QString & ) ) ); + connect( task, TQT_SIGNAL( result( Kopete::Task* ) ), + this, TQT_SLOT( slotResult( Kopete::Task* ) ) ); + connect( task, TQT_SIGNAL( statusMessage( Kopete::Task*, const TQString & ) ), + this, TQT_SIGNAL( statusMessage( Kopete::Task*, const TQString & ) ) ); } void Task::removeSubtask( Task *task, RemoveSubtaskIfLast actionIfLast ) { - disconnect( task, SIGNAL( result( Kopete::Task* ) ), - this, SLOT( slotResult( Kopete::Task* ) ) ); - disconnect( task, SIGNAL( statusMessage( Kopete::Task*, const QString & ) ), - this, SIGNAL( statusMessage( Kopete::Task*, const QString & ) ) ); + disconnect( task, TQT_SIGNAL( result( Kopete::Task* ) ), + this, TQT_SLOT( slotResult( Kopete::Task* ) ) ); + disconnect( task, TQT_SIGNAL( statusMessage( Kopete::Task*, const TQString & ) ), + this, TQT_SIGNAL( statusMessage( Kopete::Task*, const TQString & ) ) ); d->subtasks.remove( task ); if ( d->subtasks.isEmpty() && actionIfLast == IfLastEmitResult ) emitResult( task->succeeded() ? ResultSucceeded : ResultFailed, task->errorString() ); } -void Task::emitResult( Result res, const QString &errorMessage ) +void Task::emitResult( Result res, const TQString &errorMessage ) { d->result = res; d->errorMessage = errorMessage; diff --git a/kopete/libkopete/kopetetask.h b/kopete/libkopete/kopetetask.h index 115e1ebe..5457e1ba 100644 --- a/kopete/libkopete/kopetetask.h +++ b/kopete/libkopete/kopetetask.h @@ -17,7 +17,7 @@ #ifndef KOPETETASK_H #define KOPETETASK_H -#include +#include #include namespace Kopete @@ -29,8 +29,8 @@ namespace Kopete * * \code * Kopete::Task *task = someobject->someoperation( some parameters ); - * connect( task, SIGNAL( result( Kopete::Task * ) ), - * this, SLOT( slotResult( Kopete::Task * ) ) ); + * connect( task, TQT_SIGNAL( result( Kopete::Task * ) ), + * this, TQT_SLOT( slotResult( Kopete::Task * ) ) ); * \endcode * (other connects, specific to the job) * @@ -73,7 +73,7 @@ public: * telling the user that the app is broken, so check with * succeeded() whether there is an error. */ - const QString &errorString() const; + const TQString &errorString() const; /** Flags for the abort() function */ enum AbortFlags { AbortNormal = 0, AbortEmitResult = 1 }; @@ -103,7 +103,7 @@ signals: * @param task the task that emitted this signal * @param message the info message */ - void statusMessage( Kopete::Task *task, const QString &message ); + void statusMessage( Kopete::Task *task, const TQString &message ); protected: /** @@ -135,7 +135,7 @@ protected: * Sets the stored result and error message to @p result and @p errorMessage. * You should call this instead of emitting the result() signal yourself. */ - void emitResult( Result result = ResultSucceeded, const QString &errorMessage = QString::null ); + void emitResult( Result result = ResultSucceeded, const TQString &errorMessage = TQString::null ); protected slots: /** diff --git a/kopete/libkopete/kopetetransfermanager.cpp b/kopete/libkopete/kopetetransfermanager.cpp index 1131cd90..67f2d04f 100644 --- a/kopete/libkopete/kopetetransfermanager.cpp +++ b/kopete/libkopete/kopetetransfermanager.cpp @@ -34,7 +34,7 @@ * Kopete::FileTransferInfo * ***************************/ -Kopete::FileTransferInfo::FileTransferInfo( Kopete::Contact *contact, const QString& file, const unsigned long size, const QString &recipient, KopeteTransferDirection di, const unsigned int id, QString internalId) +Kopete::FileTransferInfo::FileTransferInfo( Kopete::Contact *contact, const TQString& file, const unsigned long size, const TQString &recipient, KopeteTransferDirection di, const unsigned int id, TQString internalId) { mContact = contact; mFile = file; @@ -50,7 +50,7 @@ Kopete::FileTransferInfo::FileTransferInfo( Kopete::Contact *contact, const QSt ***************************/ -Kopete::Transfer::Transfer( const Kopete::FileTransferInfo &kfti, const QString &localFile, bool showProgressInfo) +Kopete::Transfer::Transfer( const Kopete::FileTransferInfo &kfti, const TQString &localFile, bool showProgressInfo) : KIO::Job(showProgressInfo), mInfo(kfti) { KURL targ; targ.setPath( localFile ); @@ -72,7 +72,7 @@ void Kopete::Transfer::init( const KURL &target, bool showProgressInfo ) if( showProgressInfo ) Observer::self()->slotCopying( this, sourceURL(), destinationURL() ); - connect( this, SIGNAL( result( KIO::Job* ) ), SLOT( slotResultEmitted() ) ); + connect( this, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( slotResultEmitted() ) ); setAutoErrorHandlingEnabled( true, 0 ); } @@ -81,14 +81,14 @@ Kopete::Transfer::~Transfer() { } -KURL Kopete::Transfer::displayURL( const Kopete::Contact *contact, const QString &file ) +KURL Kopete::Transfer::displayURL( const Kopete::Contact *contact, const TQString &file ) { KURL url; - url.setProtocol( QString::fromLatin1("kopete") ); + url.setProtocol( TQString::fromLatin1("kopete") ); - QString host; + TQString host; if( !contact ) - host = QString::fromLatin1("unknown origin"); + host = TQString::fromLatin1("unknown origin"); else if( contact->metaContact() ) host = contact->metaContact()->displayName(); else @@ -129,7 +129,7 @@ void Kopete::Transfer::slotComplete() emitResult(); } -void Kopete::Transfer::slotError( int error, const QString &errorText ) +void Kopete::Transfer::slotError( int error, const TQString &errorText ) { m_error = error; m_errorText = errorText; @@ -158,44 +158,44 @@ Kopete::TransferManager* Kopete::TransferManager::transferManager() return s_transferManager; } -Kopete::TransferManager::TransferManager( QObject *parent ) : QObject( parent ) +Kopete::TransferManager::TransferManager( TQObject *parent ) : TQObject( parent ) { nextID = 0; } -Kopete::Transfer* Kopete::TransferManager::addTransfer( Kopete::Contact *contact, const QString& file, const unsigned long size, const QString &recipient , Kopete::FileTransferInfo::KopeteTransferDirection di) +Kopete::Transfer* Kopete::TransferManager::addTransfer( Kopete::Contact *contact, const TQString& file, const unsigned long size, const TQString &recipient , Kopete::FileTransferInfo::KopeteTransferDirection di) { // if (nextID != 0) nextID++; Kopete::FileTransferInfo info(contact, file, size, recipient,di, nextID); Kopete::Transfer *trans = new Kopete::Transfer(info, contact); - connect(trans, SIGNAL(result(KIO::Job *)), this, SLOT(slotComplete(KIO::Job *))); + connect(trans, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotComplete(KIO::Job *))); mTransfersMap.insert(nextID, trans); return trans; } -void Kopete::TransferManager::slotAccepted(const Kopete::FileTransferInfo& info, const QString& filename) +void Kopete::TransferManager::slotAccepted(const Kopete::FileTransferInfo& info, const TQString& filename) { Kopete::Transfer *trans = new Kopete::Transfer(info, filename); - connect(trans, SIGNAL(result(KIO::Job *)), this, SLOT(slotComplete(KIO::Job *))); + connect(trans, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotComplete(KIO::Job *))); mTransfersMap.insert(info.transferId(), trans); emit accepted(trans,filename); } -int Kopete::TransferManager::askIncomingTransfer( Kopete::Contact *contact, const QString& file, const unsigned long size, const QString& description, QString internalId) +int Kopete::TransferManager::askIncomingTransfer( Kopete::Contact *contact, const TQString& file, const unsigned long size, const TQString& description, TQString internalId) { // if (nextID != 0) nextID++; - QString dn= contact ? (contact->metaContact() ? contact->metaContact()->displayName() : contact->contactId()) : i18n(""); + TQString dn= contact ? (contact->metaContact() ? contact->metaContact()->displayName() : contact->contactId()) : i18n(""); Kopete::FileTransferInfo info(contact, file, size, dn, Kopete::FileTransferInfo::Incoming , nextID , internalId); //FIXME!!! this will not be deleted if it's still open when kopete exits KopeteFileConfirmDialog *diag= new KopeteFileConfirmDialog(info, description , 0 ) ; - connect( diag, SIGNAL( accepted(const Kopete::FileTransferInfo&, const QString&)) , this, SLOT( slotAccepted(const Kopete::FileTransferInfo&, const QString&) ) ); - connect( diag, SIGNAL( refused(const Kopete::FileTransferInfo&)) , this, SIGNAL( refused(const Kopete::FileTransferInfo&) ) ); + connect( diag, TQT_SIGNAL( accepted(const Kopete::FileTransferInfo&, const TQString&)) , this, TQT_SLOT( slotAccepted(const Kopete::FileTransferInfo&, const TQString&) ) ); + connect( diag, TQT_SIGNAL( refused(const Kopete::FileTransferInfo&)) , this, TQT_SIGNAL( refused(const Kopete::FileTransferInfo&) ) ); diag->show(); return nextID; } @@ -214,7 +214,7 @@ void Kopete::TransferManager::slotComplete(KIO::Job *job) emit done(transfer); - for( QMap::Iterator it = mTransfersMap.begin(); + for( TQMap::Iterator it = mTransfersMap.begin(); it != mTransfersMap.end(); ++it ) { if( it.data() == transfer ) @@ -225,16 +225,16 @@ void Kopete::TransferManager::slotComplete(KIO::Job *job) } } -void Kopete::TransferManager::sendFile( const KURL &file, const QString &fname, unsigned long sz, - bool mustBeLocal, QObject *sendTo, const char *slot ) +void Kopete::TransferManager::sendFile( const KURL &file, const TQString &fname, unsigned long sz, + bool mustBeLocal, TQObject *sendTo, const char *slot ) { KURL url(file); - QString filename; + TQString filename; unsigned int size = 0; //If the file location is null, then get it from a file open dialog if( !url.isValid() ) - url = KFileDialog::getOpenURL( QString::null, QString::fromLatin1("*"), 0l, i18n( "Kopete File Transfer" )); + url = KFileDialog::getOpenURL( TQString::null, TQString::fromLatin1("*"), 0l, i18n( "Kopete File Transfer" )); else { filename = fname; @@ -260,9 +260,9 @@ void Kopete::TransferManager::sendFile( const KURL &file, const QString &fname, } else { - connect( this, SIGNAL(sendFile(const KURL&, const QString&, unsigned int)), sendTo, slot ); + connect( this, TQT_SIGNAL(sendFile(const KURL&, const TQString&, unsigned int)), sendTo, slot ); emit sendFile( url, filename, size ); - disconnect( this, SIGNAL(sendFile(const KURL&, const QString&, unsigned int)), sendTo, slot ); + disconnect( this, TQT_SIGNAL(sendFile(const KURL&, const TQString&, unsigned int)), sendTo, slot ); } } } diff --git a/kopete/libkopete/kopetetransfermanager.h b/kopete/libkopete/kopetetransfermanager.h index f4e7416f..53b2711f 100644 --- a/kopete/libkopete/kopetetransfermanager.h +++ b/kopete/libkopete/kopetetransfermanager.h @@ -19,9 +19,9 @@ #ifndef KOPETEFILETRANSFER_H #define KOPETEFILETRANSFER_H -#include -#include -#include +#include +#include +#include #include "kopete_export.h" #include @@ -40,23 +40,23 @@ class KOPETE_EXPORT FileTransferInfo public: enum KopeteTransferDirection { Incoming, Outgoing }; - FileTransferInfo( Contact *, const QString&, const unsigned long size, const QString &, KopeteTransferDirection di, const unsigned int id, QString internalId=QString::null); + FileTransferInfo( Contact *, const TQString&, const unsigned long size, const TQString &, KopeteTransferDirection di, const unsigned int id, TQString internalId=TQString::null); ~FileTransferInfo() {} unsigned int transferId() const { return mId; } const Contact* contact() const { return mContact; } - QString file() const { return mFile; } - QString recipient() const { return mRecipient; } + TQString file() const { return mFile; } + TQString recipient() const { return mRecipient; } unsigned long size() const { return mSize; } - QString internalId() const { return m_intId; } + TQString internalId() const { return m_intId; } KopeteTransferDirection direction() const { return mDirection; } private: unsigned long mSize; - QString mRecipient; + TQString mRecipient; unsigned int mId; Contact *mContact; - QString mFile; - QString m_intId; + TQString mFile; + TQString m_intId; KopeteTransferDirection mDirection; }; @@ -77,8 +77,8 @@ public: /** * @brief Adds a file transfer to the Kopete::TransferManager */ - Transfer *addTransfer( Contact *contact, const QString& file, const unsigned long size, const QString &recipient , FileTransferInfo::KopeteTransferDirection di); - int askIncomingTransfer( Contact *contact, const QString& file, const unsigned long size, const QString& description=QString::null, QString internalId=QString::null); + Transfer *addTransfer( Contact *contact, const TQString& file, const unsigned long size, const TQString &recipient , FileTransferInfo::KopeteTransferDirection di); + int askIncomingTransfer( Contact *contact, const TQString& file, const unsigned long size, const TQString& description=TQString::null, TQString internalId=TQString::null); void removeTransfer( unsigned int id ); /** @@ -96,8 +96,8 @@ public: * @param sendTo The object to send the signal to * @param slot The slot to send the signal to. Signature: sendFile(const KURL &file) */ - void sendFile( const KURL &file, const QString &localFile, unsigned long fileSize, - bool mustBeLocal, QObject *sendTo, const char *slot ); + void sendFile( const KURL &file, const TQString &localFile, unsigned long fileSize, + bool mustBeLocal, TQObject *sendTo, const char *slot ); signals: /** @brief Signals the transfer is done. */ @@ -107,24 +107,24 @@ signals: void canceled( Kopete::Transfer* ); /** @brief Signals the transfer has been accepted */ - void accepted(Kopete::Transfer*, const QString &fileName); + void accepted(Kopete::Transfer*, const TQString &fileName); /** @brief Signals the transfer has been rejected */ void refused(const Kopete::FileTransferInfo& ); /** @brief Send a file */ - void sendFile(const KURL &file, const QString &localFile, unsigned int fileSize); + void sendFile(const KURL &file, const TQString &localFile, unsigned int fileSize); private slots: - void slotAccepted(const Kopete::FileTransferInfo&, const QString&); + void slotAccepted(const Kopete::FileTransferInfo&, const TQString&); void slotComplete(KIO::Job*); private: - TransferManager( QObject *parent ); + TransferManager( TQObject *parent ); static TransferManager *s_transferManager; int nextID; - QMap mTransfersMap; + TQMap mTransfersMap; }; /** @@ -139,7 +139,7 @@ public: /** * Constructor */ - Transfer( const FileTransferInfo &, const QString &localFile, bool showProgressInfo = true); + Transfer( const FileTransferInfo &, const TQString &localFile, bool showProgressInfo = true); /** * Constructor @@ -185,7 +185,7 @@ public slots: * @param error A member of the KIO::Error enumeration indicating what error occurred. * @param errorText A string to aid understanding of the error, often the offending URL. */ - void slotError( int error, const QString &errorText ); + void slotError( int error, const TQString &errorText ); signals: /** @@ -196,7 +196,7 @@ signals: private: void init( const KURL &, bool ); - static KURL displayURL( const Contact *contact, const QString &file ); + static KURL displayURL( const Contact *contact, const TQString &file ); FileTransferInfo mInfo; KURL mTarget; diff --git a/kopete/libkopete/kopeteuiglobal.cpp b/kopete/libkopete/kopeteuiglobal.cpp index 06c0dfa3..5921d467 100644 --- a/kopete/libkopete/kopeteuiglobal.cpp +++ b/kopete/libkopete/kopeteuiglobal.cpp @@ -17,7 +17,7 @@ #include "kopeteuiglobal.h" -#include +#include namespace Kopete @@ -26,16 +26,16 @@ namespace Kopete namespace { - QGuardedPtr g_mainWidget; + TQGuardedPtr g_mainWidget; int g_sysTrayWId; } -void UI::Global::setMainWidget( QWidget *widget ) +void UI::Global::setMainWidget( TQWidget *widget ) { g_mainWidget = widget; } -QWidget *UI::Global::mainWidget() +TQWidget *UI::Global::mainWidget() { return g_mainWidget; } diff --git a/kopete/libkopete/kopeteuiglobal.h b/kopete/libkopete/kopeteuiglobal.h index 4a79eb87..7db34189 100644 --- a/kopete/libkopete/kopeteuiglobal.h +++ b/kopete/libkopete/kopeteuiglobal.h @@ -18,7 +18,7 @@ #ifndef KOPETEUIGLOBAL_H #define KOPETEUIGLOBAL_H -#include +#include #include "kopete_export.h" @@ -36,12 +36,12 @@ namespace Global /** * Set the main widget to widget */ - KOPETE_EXPORT void setMainWidget( QWidget *widget ); + KOPETE_EXPORT void setMainWidget( TQWidget *widget ); /** * Returns the main widget - this is the widget that message boxes * and KNotify stuff should use as a parent. */ - KOPETE_EXPORT QWidget *mainWidget(); + KOPETE_EXPORT TQWidget *mainWidget(); /** * \brief Returns the WId of the system tray. diff --git a/kopete/libkopete/kopeteutils.cpp b/kopete/libkopete/kopeteutils.cpp index d7d8eb0f..6fe46529 100644 --- a/kopete/libkopete/kopeteutils.cpp +++ b/kopete/libkopete/kopeteutils.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include +#include #include #include @@ -35,22 +35,22 @@ #include "kopeteutils.h" #include "kopeteuiglobal.h" -static const QString notifyConnectionLost_DefaultMessage = i18n("You have been disconnected."); -static const QString notifyConnectionLost_DefaultCaption = i18n("Connection Lost."); -static const QString notifyConnectionLost_DefaultExplanation = i18n("Kopete lost the channel used to talk to the instant messaging system.\nThis can be because either your internet access went down, the service is experiencing problems, or the service disconnected you because you tried to connect with the same account from another location. Try connecting again later."); +static const TQString notifyConnectionLost_DefaultMessage = i18n("You have been disconnected."); +static const TQString notifyConnectionLost_DefaultCaption = i18n("Connection Lost."); +static const TQString notifyConnectionLost_DefaultExplanation = i18n("Kopete lost the channel used to talk to the instant messaging system.\nThis can be because either your internet access went down, the service is experiencing problems, or the service disconnected you because you tried to connect with the same account from another location. Try connecting again later."); -static const QString notifyCannotConnect_DefaultMessage = i18n("Can't connect with the instant messaging server or peers."); -static const QString notifyCannotConnect_DefaultCaption = i18n("Can't connect."); -static const QString notifyCannotConnect_DefaultExplanation = i18n("This means Kopete can't reach the instant messaging server or peers.\nThis can be because either your internet access is down or the server is experiencing problems. Try connecting again later."); +static const TQString notifyCannotConnect_DefaultMessage = i18n("Can't connect with the instant messaging server or peers."); +static const TQString notifyCannotConnect_DefaultCaption = i18n("Can't connect."); +static const TQString notifyCannotConnect_DefaultExplanation = i18n("This means Kopete can't reach the instant messaging server or peers.\nThis can be because either your internet access is down or the server is experiencing problems. Try connecting again later."); namespace Kopete { namespace Utils { -void notify( QPixmap pic, const QString &eventid, const QString &caption, const QString &message, const QString explanation, const QString debugInfo) +void notify( TQPixmap pic, const TQString &eventid, const TQString &caption, const TQString &message, const TQString explanation, const TQString debugInfo) { - QString action; + TQString action; if ( !explanation.isEmpty() ) action = i18n( "More Information..." ); kdDebug( 14010 ) << k_funcinfo << endl; @@ -60,63 +60,63 @@ void notify( QPixmap pic, const QString &eventid, const QString &caption, const info.debugInfo = debugInfo; NotifyHelper::self()->registerNotification(n, info); - QObject::connect( n, SIGNAL(activated(unsigned int )) , NotifyHelper::self() , SLOT( slotEventActivated(unsigned int) ) ); - QObject::connect( n, SIGNAL(closed()) , NotifyHelper::self() , SLOT( slotEventClosed() ) ); + TQObject::connect( n, TQT_SIGNAL(activated(unsigned int )) , NotifyHelper::self() , TQT_SLOT( slotEventActivated(unsigned int) ) ); + TQObject::connect( n, TQT_SIGNAL(closed()) , NotifyHelper::self() , TQT_SLOT( slotEventClosed() ) ); } -void notifyConnectionLost( const Account *account, const QString &caption, const QString &message, const QString &explanation, const QString &debugInfo ) +void notifyConnectionLost( const Account *account, const TQString &caption, const TQString &message, const TQString &explanation, const TQString &debugInfo ) { if (!account) return; - notify( account->accountIcon(32), QString::fromLatin1("connection_lost"), caption.isEmpty() ? notifyConnectionLost_DefaultCaption : caption, message.isEmpty() ? notifyConnectionLost_DefaultMessage : message, explanation.isEmpty() ? notifyConnectionLost_DefaultExplanation : explanation, debugInfo); + notify( account->accountIcon(32), TQString::fromLatin1("connection_lost"), caption.isEmpty() ? notifyConnectionLost_DefaultCaption : caption, message.isEmpty() ? notifyConnectionLost_DefaultMessage : message, explanation.isEmpty() ? notifyConnectionLost_DefaultExplanation : explanation, debugInfo); } -bool isHostReachable(const QString &host) +bool isHostReachable(const TQString &host) { const int NetWorkStatusUnknown = 1; const int NetWorkStatusOnline = 8; - QCString replyType; - QByteArray params; - QByteArray reply; + TQCString replyType; + TQByteArray params; + TQByteArray reply; - QDataStream stream(params, IO_WriteOnly); + TQDataStream stream(params, IO_WriteOnly); stream << host; - if ( KApplication::kApplication()->dcopClient()->call( "kded", "networkstatus", "status(QString)", params, replyType, reply ) && (replyType == "int") ) + if ( KApplication::kApplication()->dcopClient()->call( "kded", "networkstatus", "status(TQString)", params, replyType, reply ) && (replyType == "int") ) { int result; - QDataStream stream2( reply, IO_ReadOnly ); + TQDataStream stream2( reply, IO_ReadOnly ); stream2 >> result; return (result != NetWorkStatusUnknown) && (result != NetWorkStatusOnline); } return false; // On error, assume we are online } -void notifyCannotConnect( const Account *account, const QString &explanation, const QString &debugInfo) +void notifyCannotConnect( const Account *account, const TQString &explanation, const TQString &debugInfo) { if (!account) return; - notify( account->accountIcon(), QString::fromLatin1("cannot_connect"), notifyCannotConnect_DefaultCaption, notifyCannotConnect_DefaultMessage, notifyCannotConnect_DefaultExplanation, debugInfo); + notify( account->accountIcon(), TQString::fromLatin1("cannot_connect"), notifyCannotConnect_DefaultCaption, notifyCannotConnect_DefaultMessage, notifyCannotConnect_DefaultExplanation, debugInfo); } -void notifyConnectionError( const Account *account, const QString &caption, const QString &message, const QString &explanation, const QString &debugInfo ) +void notifyConnectionError( const Account *account, const TQString &caption, const TQString &message, const TQString &explanation, const TQString &debugInfo ) { if (!account) return; // TODO: Display a specific default connection error message, I don't want to introducte too many new strings - notify( account->accountIcon(32), QString::fromLatin1("connection_error"), caption, message, explanation, debugInfo); + notify( account->accountIcon(32), TQString::fromLatin1("connection_error"), caption, message, explanation, debugInfo); } -void notifyServerError( const Account *account, const QString &caption, const QString &message, const QString &explanation, const QString &debugInfo ) +void notifyServerError( const Account *account, const TQString &caption, const TQString &message, const TQString &explanation, const TQString &debugInfo ) { if (!account) return; // TODO: Display a specific default server error message, I don't want to introducte too many new strings - notify( account->accountIcon(32), QString::fromLatin1("server_error"), caption, message, explanation, debugInfo); + notify( account->accountIcon(32), TQString::fromLatin1("server_error"), caption, message, explanation, debugInfo); } } // end ns ErrorNotifier diff --git a/kopete/libkopete/kopeteutils.h b/kopete/libkopete/kopeteutils.h index 1cbcb4c3..c90ba054 100644 --- a/kopete/libkopete/kopeteutils.h +++ b/kopete/libkopete/kopeteutils.h @@ -18,9 +18,9 @@ #ifndef KOPETE_UTILS_H #define KOPETE_UTILS_H -#include "qobject.h" -#include "qstring.h" -#include "qpixmap.h" +#include "tqobject.h" +#include "tqstring.h" +#include "tqpixmap.h" #include "kopete_export.h" class KNotification; @@ -38,7 +38,7 @@ namespace Utils * * @param host The host to be cheked */ -bool isHostReachable( const QString &host ); +bool isHostReachable( const TQString &host ); /** * Notifies the user connection has been lost without coupling plugins with GUI code. @@ -53,10 +53,10 @@ bool isHostReachable( const QString &host ); * explanation, Kopete will use a default explanation. */ void KOPETE_EXPORT notifyConnectionLost( const Account *account, - const QString &caption = QString::null, - const QString &message = QString::null, - const QString &explanation = QString::null, - const QString &debugInfo = QString::null ); + const TQString &caption = TQString::null, + const TQString &message = TQString::null, + const TQString &explanation = TQString::null, + const TQString &debugInfo = TQString::null ); /** @@ -70,8 +70,8 @@ void KOPETE_EXPORT notifyConnectionLost( const Account *account, * explanation, Kopete will use a default explanation. */ void KOPETE_EXPORT notifyCannotConnect( const Account *account, - const QString &explanation = QString::null, - const QString &debugInfo = QString::null); + const TQString &explanation = TQString::null, + const TQString &debugInfo = TQString::null); /** * Notifies the user that an error on a connection occcured without coupling plugins with GUI code. @@ -86,10 +86,10 @@ void KOPETE_EXPORT notifyCannotConnect( const Account *account, * explanation, Kopete will use a default explanation. */ void KOPETE_EXPORT notifyConnectionError( const Account *account, - const QString &caption = QString::null, - const QString &message = QString::null, - const QString &explanation = QString::null, - const QString &debugInfo = QString::null ); + const TQString &caption = TQString::null, + const TQString &message = TQString::null, + const TQString &explanation = TQString::null, + const TQString &debugInfo = TQString::null ); /** * Notifies the user that an error on the server occcured without coupling plugins with GUI code. @@ -104,10 +104,10 @@ void KOPETE_EXPORT notifyConnectionError( const Account *account, * explanation, Kopete will use a default explanation. */ void KOPETE_EXPORT notifyServerError( const Account *account, - const QString &caption = QString::null, - const QString &message = QString::null, - const QString &explanation = QString::null, - const QString &debugInfo = QString::null ); + const TQString &caption = TQString::null, + const TQString &message = TQString::null, + const TQString &explanation = TQString::null, + const TQString &debugInfo = TQString::null ); } // end ns Utils } // end ns Kopete diff --git a/kopete/libkopete/kopetewalletmanager.cpp b/kopete/libkopete/kopetewalletmanager.cpp index e1d198fc..f17c73b8 100644 --- a/kopete/libkopete/kopetewalletmanager.cpp +++ b/kopete/libkopete/kopetewalletmanager.cpp @@ -22,13 +22,13 @@ #include #include -#include -#include -#include +#include +#include +#include static WId mainWindowID() { - if ( QWidget *w = Kopete::UI::Global::mainWidget() ) + if ( TQWidget *w = Kopete::UI::Global::mainWidget() ) return w->winId(); return 0; } @@ -72,13 +72,13 @@ Kopete::WalletManager *Kopete::WalletManager::self() return s_self; } -void Kopete::WalletManager::openWallet( QObject *object, const char *slot ) +void Kopete::WalletManager::openWallet( TQObject *object, const char *slot ) { if ( !d->signal ) d->signal = new KopeteWalletSignal; // allow connecting to protected slots by calling object->connect - connect( d->signal, SIGNAL( walletOpened( KWallet::Wallet* ) ), object, slot ); - //object->connect( d->signal, SIGNAL( walletOpened( KWallet::Wallet* ) ), slot ); + connect( d->signal, TQT_SIGNAL( walletOpened( KWallet::Wallet* ) ), object, slot ); + //object->connect( d->signal, TQT_SIGNAL( walletOpened( KWallet::Wallet* ) ), slot ); openWalletInner(); } @@ -92,7 +92,7 @@ void Kopete::WalletManager::openWalletInner() if ( d->wallet->isOpen() ) { kdDebug(14010) << k_funcinfo << " wallet already open" << endl; - QTimer::singleShot( 0, this, SLOT( slotGiveExistingWallet() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotGiveExistingWallet() ) ); } else { @@ -107,7 +107,7 @@ void Kopete::WalletManager::openWalletInner() d->wallet = KWallet::Wallet::openWallet( KWallet::Wallet::NetworkWallet(), mainWindowID(), KWallet::Wallet::Asynchronous ); - connect( d->wallet, SIGNAL( walletOpened(bool) ), SLOT( slotWalletChangedStatus() ) ); + connect( d->wallet, TQT_SIGNAL( walletOpened(bool) ), TQT_SLOT( slotWalletChangedStatus() ) ); } void Kopete::WalletManager::slotWalletChangedStatus() @@ -116,13 +116,13 @@ void Kopete::WalletManager::slotWalletChangedStatus() if( d->wallet->isOpen() ) { - if ( !d->wallet->hasFolder( QString::fromLatin1( "Kopete" ) ) ) - d->wallet->createFolder( QString::fromLatin1( "Kopete" ) ); + if ( !d->wallet->hasFolder( TQString::fromLatin1( "Kopete" ) ) ) + d->wallet->createFolder( TQString::fromLatin1( "Kopete" ) ); - if ( d->wallet->setFolder( QString::fromLatin1( "Kopete" ) ) ) + if ( d->wallet->setFolder( TQString::fromLatin1( "Kopete" ) ) ) { // success! - QObject::connect( d->wallet, SIGNAL( walletClosed() ), this, SLOT( closeWallet() ) ); + TQObject::connect( d->wallet, TQT_SIGNAL( walletClosed() ), this, TQT_SLOT( closeWallet() ) ); } else { diff --git a/kopete/libkopete/kopetewalletmanager.h b/kopete/libkopete/kopetewalletmanager.h index fdd3a154..a9ed0971 100644 --- a/kopete/libkopete/kopetewalletmanager.h +++ b/kopete/libkopete/kopetewalletmanager.h @@ -17,7 +17,7 @@ #ifndef KOPETEWALLETMANAGER_H #define KOPETEWALLETMANAGER_H -#include +#include #include @@ -58,7 +58,7 @@ public: * For simplicity of client code, it is guaranteed that your slot * will not be called during a call to this function. */ - void openWallet( QObject *object, const char *slot ); + void openWallet( TQObject *object, const char *slot ); public slots: /** diff --git a/kopete/libkopete/managedconnectionaccount.cpp b/kopete/libkopete/managedconnectionaccount.cpp index 0f1625b2..cf14ed2f 100644 --- a/kopete/libkopete/managedconnectionaccount.cpp +++ b/kopete/libkopete/managedconnectionaccount.cpp @@ -24,17 +24,17 @@ namespace Kopete { -ManagedConnectionAccount::ManagedConnectionAccount( Protocol *parent, const QString &acctId, uint maxPasswordLength, const char *name ) +ManagedConnectionAccount::ManagedConnectionAccount( Protocol *parent, const TQString &acctId, uint maxPasswordLength, const char *name ) : PasswordedAccount( parent, acctId, maxPasswordLength, name ), m_waitingForConnection( false ) { - QObject::connect( ConnectionManager::self(), SIGNAL(statusChanged(const QString&, NetworkStatus::EnumStatus ) ), - SLOT(slotConnectionStatusChanged(const QString&, NetworkStatus::EnumStatus ) ) ); + TQObject::connect( ConnectionManager::self(), TQT_SIGNAL(statusChanged(const TQString&, NetworkStatus::EnumStatus ) ), + TQT_SLOT(slotConnectionStatusChanged(const TQString&, NetworkStatus::EnumStatus ) ) ); } -void ManagedConnectionAccount::connectWithPassword( const QString &password ) +void ManagedConnectionAccount::connectWithPassword( const TQString &password ) { m_password = password; - NetworkStatus::EnumStatus status = ConnectionManager::self()->status( QString::null ); + NetworkStatus::EnumStatus status = ConnectionManager::self()->status( TQString::null ); if ( status == NetworkStatus::NoNetworks ) performConnectWithPassword( password ); else @@ -42,7 +42,7 @@ void ManagedConnectionAccount::connectWithPassword( const QString &password ) m_waitingForConnection = true; // need to adapt libkopete so we know the hostname in this class and whether the connection was user initiated // for now, these are the default parameters to always bring up a connection to "the internet". - NetworkStatus::EnumRequestResult response = ConnectionManager::self()->requestConnection( Kopete::UI::Global::mainWidget(), QString::null, true ); + NetworkStatus::EnumRequestResult response = ConnectionManager::self()->requestConnection( Kopete::UI::Global::mainWidget(), TQString::null, true ); if ( response == NetworkStatus::Connected ) { m_waitingForConnection = false; @@ -53,7 +53,7 @@ void ManagedConnectionAccount::connectWithPassword( const QString &password ) } } -void ManagedConnectionAccount::slotConnectionStatusChanged( const QString & host, NetworkStatus::EnumStatus status ) +void ManagedConnectionAccount::slotConnectionStatusChanged( const TQString & host, NetworkStatus::EnumStatus status ) { Q_UNUSED(host); // as above, we didn't register a hostname, so treat any connection as our own. diff --git a/kopete/libkopete/managedconnectionaccount.h b/kopete/libkopete/managedconnectionaccount.h index ad29feed..7d864dfc 100644 --- a/kopete/libkopete/managedconnectionaccount.h +++ b/kopete/libkopete/managedconnectionaccount.h @@ -44,21 +44,21 @@ class KOPETE_EXPORT ManagedConnectionAccount : public PasswordedAccount * @param maxPasswordLength The maximum length for passwords for this account, or 0 for no limit * @param name The name for this QObject */ - ManagedConnectionAccount( Protocol *parent, const QString &acctId, uint maxPasswordLength = 0, const char *name = 0 ); + ManagedConnectionAccount( Protocol *parent, const TQString &acctId, uint maxPasswordLength = 0, const char *name = 0 ); public slots: /** * @brief Begin the connection process, by checking if the connection is available with the ConnectionManager. * This method is called by PasswordedAccount::connect() * @param password the password to connect with. */ - void connectWithPassword( const QString &password ); + void connectWithPassword( const TQString &password ); protected: /** * @brief Connect to the server, once the network is available. * This method is called by the ManagedConnectionAccount once the network is available. In this method you should set up your * network connection and connect to the server. */ - virtual void performConnectWithPassword( const QString & password ) = 0; + virtual void performConnectWithPassword( const TQString & password ) = 0; protected slots: /** * @brief Handle a change in the network connection @@ -68,9 +68,9 @@ class KOPETE_EXPORT ManagedConnectionAccount : public PasswordedAccount * @param host For future expansion. * @param status the new status of the network */ - virtual void slotConnectionStatusChanged( const QString & host, NetworkStatus::EnumStatus status ); + virtual void slotConnectionStatusChanged( const TQString & host, NetworkStatus::EnumStatus status ); private: - QString m_password; + TQString m_password; bool m_waitingForConnection; }; diff --git a/kopete/libkopete/networkstatuscommon.cpp b/kopete/libkopete/networkstatuscommon.cpp index 216752bd..87c18a14 100644 --- a/kopete/libkopete/networkstatuscommon.cpp +++ b/kopete/libkopete/networkstatuscommon.cpp @@ -1,7 +1,7 @@ #include "networkstatuscommon.h" #include -QDataStream & operator<< ( QDataStream & s, const NetworkStatus::Properties p ) +TQDataStream & operator<< ( TQDataStream & s, const NetworkStatus::Properties p ) { kdDebug() << k_funcinfo << "status is: " << (int)p.status << endl; s << (int)p.status; @@ -12,7 +12,7 @@ QDataStream & operator<< ( QDataStream & s, const NetworkStatus::Properties p ) return s; } -QDataStream & operator>> ( QDataStream & s, NetworkStatus::Properties &p ) +TQDataStream & operator>> ( TQDataStream & s, NetworkStatus::Properties &p ) { int status, onDemandPolicy, internet; s >> status; diff --git a/kopete/libkopete/networkstatuscommon.h b/kopete/libkopete/networkstatuscommon.h index e6906445..a243be43 100644 --- a/kopete/libkopete/networkstatuscommon.h +++ b/kopete/libkopete/networkstatuscommon.h @@ -1,7 +1,7 @@ #ifndef NETWORKSTATUS_COMMON_H #define NETWORKSTATUS_COMMON_H -#include +#include namespace NetworkStatus { @@ -10,24 +10,24 @@ namespace NetworkStatus enum EnumOnDemandPolicy { All, User, None, Permanent }; struct Properties { - QString name; + TQString name; // status of the network EnumStatus status; // policy for on-demand usage as defined by the service EnumOnDemandPolicy onDemandPolicy; // identifier for the service - QCString service; + TQCString service; // indicate that the connection is to 'the internet' - similar to default gateway in routing bool internet; // list of netmasks that the network connects to - overridden by above internet - QStringList netmasks; + TQStringList netmasks; // for future expansion consider // EnumChargingModel - FlatRate, TimeCharge, VolumeCharged // EnumLinkStatus - for WLANs - VPOOR, POOR, AVERAGE, GOOD, EXCELLENT }; } -QDataStream & operator>> ( QDataStream & s, NetworkStatus::Properties &p ); -QDataStream & operator<< ( QDataStream & s, const NetworkStatus::Properties p ); +TQDataStream & operator>> ( TQDataStream & s, NetworkStatus::Properties &p ); +TQDataStream & operator<< ( TQDataStream & s, const NetworkStatus::Properties p ); #endif diff --git a/kopete/libkopete/private/kopetecommand.cpp b/kopete/libkopete/private/kopetecommand.cpp index 52588f2e..1f8969f6 100644 --- a/kopete/libkopete/private/kopetecommand.cpp +++ b/kopete/libkopete/private/kopetecommand.cpp @@ -13,7 +13,7 @@ ************************************************************************* */ -#include +#include #include #include #include @@ -25,17 +25,17 @@ #include "kopetecommand.h" #include "kopeteuiglobal.h" -Kopete::Command::Command( QObject *parent, const QString &command, const char* handlerSlot, - const QString &help, Kopete::CommandHandler::CommandType type, const QString &formatString, - uint minArgs, int maxArgs, const KShortcut &cut, const QString &pix ) +Kopete::Command::Command( TQObject *parent, const TQString &command, const char* handlerSlot, + const TQString &help, Kopete::CommandHandler::CommandType type, const TQString &formatString, + uint minArgs, int maxArgs, const KShortcut &cut, const TQString &pix ) : KAction( command[0].upper() + command.right( command.length() - 1).lower(), pix, cut, parent, - ( command.lower() + QString::fromLatin1("_command") ).latin1() ) + ( command.lower() + TQString::fromLatin1("_command") ).latin1() ) { init( command, handlerSlot, help, type, formatString, minArgs, maxArgs ); } -void Kopete::Command::init( const QString &command, const char* slot, const QString &help, - Kopete::CommandHandler::CommandType type, const QString &formatString, uint minArgs, int maxArgs ) +void Kopete::Command::init( const TQString &command, const char* slot, const TQString &help, + Kopete::CommandHandler::CommandType type, const TQString &formatString, uint minArgs, int maxArgs ) { m_command = command; m_help = help; @@ -47,18 +47,18 @@ void Kopete::Command::init( const QString &command, const char* slot, const QStr if( m_type == Kopete::CommandHandler::Normal ) { - QObject::connect( this, SIGNAL( handleCommand( const QString &, Kopete::ChatSession *) ), + TQObject::connect( this, TQT_SIGNAL( handleCommand( const TQString &, Kopete::ChatSession *) ), parent(), slot ); } - QObject::connect( this, SIGNAL( activated() ), this, SLOT( slotAction() ) ); + TQObject::connect( this, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotAction() ) ); } void Kopete::Command::slotAction() { Kopete::ChatSession *manager = Kopete::ChatSessionManager::self()->activeView()->msgManager(); - QString args; + TQString args; if( m_minArgs > 0 ) { args = KInputDialog::getText( i18n("Enter Arguments"), i18n("Enter the arguments to %1:").arg(m_command) ); @@ -69,9 +69,9 @@ void Kopete::Command::slotAction() processCommand( args, manager, true ); } -void Kopete::Command::processCommand( const QString &args, Kopete::ChatSession *manager, bool gui ) +void Kopete::Command::processCommand( const TQString &args, Kopete::ChatSession *manager, bool gui ) { - QStringList mArgs = Kopete::CommandHandler::parseArguments( args ); + TQStringList mArgs = Kopete::CommandHandler::parseArguments( args ); if( m_processing ) { printError( i18n("Alias \"%1\" expands to itself.").arg( text() ), manager, gui ); @@ -98,12 +98,12 @@ void Kopete::Command::processCommand( const QString &args, Kopete::ChatSession * if( m_type == Kopete::CommandHandler::UserAlias || m_type == Kopete::CommandHandler::SystemAlias ) { - QString formatString = m_formatString; + TQString formatString = m_formatString; // Translate %s to the whole string and %n to current nickname - formatString.replace( QString::fromLatin1("%n"), manager->myself()->nickName() ); - formatString.replace( QString::fromLatin1("%s"), args ); + formatString.replace( TQString::fromLatin1("%n"), manager->myself()->nickName() ); + formatString.replace( TQString::fromLatin1("%s"), args ); // Translate %1..%N to word1..wordN @@ -115,7 +115,7 @@ void Kopete::Command::processCommand( const QString &args, Kopete::ChatSession * kdDebug(14010) << "New Command after processing alias: " << formatString << endl; - Kopete::CommandHandler::commandHandler()->processMessage( QString::fromLatin1("/") + formatString, manager ); + Kopete::CommandHandler::commandHandler()->processMessage( TQString::fromLatin1("/") + formatString, manager ); } else { @@ -125,7 +125,7 @@ void Kopete::Command::processCommand( const QString &args, Kopete::ChatSession * } } -void Kopete::Command::printError( const QString &error, Kopete::ChatSession *manager, bool gui ) const +void Kopete::Command::printError( const TQString &error, Kopete::ChatSession *manager, bool gui ) const { if( gui ) { diff --git a/kopete/libkopete/private/kopetecommand.h b/kopete/libkopete/private/kopetecommand.h index 298872db..6a686f1e 100644 --- a/kopete/libkopete/private/kopetecommand.h +++ b/kopete/libkopete/private/kopetecommand.h @@ -18,7 +18,7 @@ #ifndef __KOPETECOMMAND_H__ #define __KOPETECOMMAND_H__ -#include +#include #include #include "kopetecommandhandler.h" @@ -38,7 +38,7 @@ class Command : public KAction * @param parent The plugin who owns this command * @param command The command we want to handle, not including the '/' * @param handlerSlot The slot used to handle the command. This slot must - * accept two parameters, a QString of arguments, and a Kopete::ChatSession + * accept two parameters, a TQString of arguments, and a Kopete::ChatSession * pointer to the Manager under which the command was sent. * @param help An optional help string to be shown when the user uses * /help command @@ -49,25 +49,25 @@ class Command : public KAction * @param cut The shortcut for the command * @param pix The icon to use for the command */ - Command( QObject *parent, const QString &command, const char* handlerSlot, - const QString &help = QString::null, CommandHandler::CommandType type = CommandHandler::Normal, const QString &formatString = QString::null, + Command( TQObject *parent, const TQString &command, const char* handlerSlot, + const TQString &help = TQString::null, CommandHandler::CommandType type = CommandHandler::Normal, const TQString &formatString = TQString::null, uint minArgs = 0, int maxArgs = -1, const KShortcut &cut = 0, - const QString &pix = QString::null ); + const TQString &pix = TQString::null ); /** * Process this command */ - void processCommand( const QString &args, ChatSession *manager, bool gui = false ); + void processCommand( const TQString &args, ChatSession *manager, bool gui = false ); /** * Returns the command this object handles */ - const QString &command() const { return m_command; }; + const TQString &command() const { return m_command; }; /** * Returns the help string for this command */ - const QString &help() const { return m_help; }; + const TQString &help() const { return m_help; }; /** * Returns the type of the command @@ -80,7 +80,7 @@ class Command : public KAction * has been handled, all processing on it stops by the command handler * (a command cannot be handled twice) */ - void handleCommand( const QString &args, Kopete::ChatSession *manager ); + void handleCommand( const TQString &args, Kopete::ChatSession *manager ); private slots: /** @@ -89,15 +89,15 @@ class Command : public KAction void slotAction(); private: - void init( const QString &command, const char* slot, const QString &help, - CommandHandler::CommandType type, const QString &formatString, + void init( const TQString &command, const char* slot, const TQString &help, + CommandHandler::CommandType type, const TQString &formatString, uint minArgs, int maxArgs ); - void printError( const QString &error, ChatSession *manager, bool gui = false ) const; + void printError( const TQString &error, ChatSession *manager, bool gui = false ) const; - QString m_command; - QString m_help; - QString m_formatString; + TQString m_command; + TQString m_help; + TQString m_formatString; uint m_minArgs; int m_maxArgs; bool m_processing; diff --git a/kopete/libkopete/private/kopeteemoticons.cpp b/kopete/libkopete/private/kopeteemoticons.cpp index 0b234deb..a2d33341 100644 --- a/kopete/libkopete/private/kopeteemoticons.cpp +++ b/kopete/libkopete/private/kopeteemoticons.cpp @@ -21,11 +21,11 @@ #include "kopeteprefs.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -50,10 +50,10 @@ struct Emoticons::Emoticon Emoticon(){} /* sort by longest to shortest matchText */ bool operator< (const Emoticon &e){ return matchText.length() > e.matchText.length(); } - QString matchText; - QString matchTextEscaped; + TQString matchText; + TQString matchTextEscaped; QString picPath; - QString picHTMLCode; + TQString picHTMLCode; }; /* This is the object we will store each emoticon match in */ @@ -67,13 +67,13 @@ struct Emoticons::EmoticonNode { class Emoticons::Private { public: - QMap > emoticonMap; - QMap emoticonAndPicList; + TQMap > emoticonMap; + TQMap emoticonAndPicList; /** * The current icon theme from KopetePrefs */ - QString theme; + TQString theme; }; @@ -89,19 +89,19 @@ Emoticons *Emoticons::self() } -QString Emoticons::parseEmoticons(const QString& message, ParseMode mode ) //static +TQString Emoticons::parseEmoticons(const TQString& message, ParseMode mode ) //static { return self()->parse( message, mode ); } -QValueList Emoticons::tokenizeEmoticons( const QString& message, ParseMode mode ) // static +TQValueList Emoticons::tokenizeEmoticons( const TQString& message, ParseMode mode ) // static { return self()->tokenize( message, mode ); } -QValueList Emoticons::tokenize( const QString& message, uint mode ) +TQValueList Emoticons::tokenize( const TQString& message, uint mode ) { - QValueList result; + TQValueList result; if ( !KopetePrefs::prefs()->useEmoticons() ) { result.append( Token( Text, message ) ); @@ -115,23 +115,23 @@ QValueList Emoticons::tokenize( const QString& message, uint m } /* previous char, in the firs iteration assume that it is space since we want - * to let emoticons at the beginning, the very first previous QChar must be a space. */ - QChar p = ' '; - QChar c; /* current char */ - QChar n; /* next character after a match candidate, if strict this should be QChar::null or space */ + * to let emoticons at the beginning, the very first previous TQChar must be a space. */ + TQChar p = ' '; + TQChar c; /* current char */ + TQChar n; /* next character after a match candidate, if strict this should be TQChar::null or space */ /* This is the EmoticonNode container, it will represent each matched emoticon */ - QValueList foundEmoticons; - QValueList::const_iterator found; + TQValueList foundEmoticons; + TQValueList::const_iterator found; /* First-pass, store the matched emoticon locations in foundEmoticons */ - QValueList emoticonList; - QValueList::const_iterator it; + TQValueList emoticonList; + TQValueList::const_iterator it; size_t pos; bool inHTMLTag = false; bool inHTMLLink = false; bool inHTMLEntity = false; - QString needle; // search for this + TQString needle; // search for this for ( pos = 0; pos < message.length(); pos++ ) { c = message[ pos ]; @@ -271,14 +271,14 @@ QValueList Emoticons::tokenize( const QString& message, uint m return result; } -Emoticons::Emoticons( const QString &theme ) : QObject( kapp, "KopeteEmoticons" ) +Emoticons::Emoticons( const TQString &theme ) : TQObject( kapp, "KopeteEmoticons" ) { // kdDebug(14010) << "KopeteEmoticons::KopeteEmoticons" << endl; d=new Private; if(theme.isNull()) { initEmoticons(); - connect( KopetePrefs::prefs(), SIGNAL(saved()), this, SLOT(initEmoticons()) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL(saved()), this, TQT_SLOT(initEmoticons()) ); } else { @@ -294,32 +294,32 @@ Emoticons::~Emoticons( ) -void Emoticons::addIfPossible( const QString& filenameNoExt, const QStringList &emoticons ) +void Emoticons::addIfPossible( const TQString& filenameNoExt, const TQStringList &emoticons ) { KStandardDirs *dir = KGlobal::dirs(); - QString pic; + TQString pic; //maybe an extension was given, so try to find the exact file - pic = dir->findResource( "emoticons", d->theme + QString::fromLatin1( "/" ) + filenameNoExt ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt ); if( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + QString::fromLatin1( "/" ) + filenameNoExt + QString::fromLatin1( ".mng" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".mng" ) ); if ( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + QString::fromLatin1( "/" ) + filenameNoExt + QString::fromLatin1( ".png" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".png" ) ); if ( pic.isNull() ) - pic = dir->findResource( "emoticons", d->theme + QString::fromLatin1( "/" ) + filenameNoExt + QString::fromLatin1( ".gif" ) ); + pic = dir->findResource( "emoticons", d->theme + TQString::fromLatin1( "/" ) + filenameNoExt + TQString::fromLatin1( ".gif" ) ); if( !pic.isNull() ) // only add if we found one file { - QPixmap p; - QString result; + TQPixmap p; + TQString result; d->emoticonAndPicList.insert( pic, emoticons ); - for ( QStringList::const_iterator it = emoticons.constBegin(), end = emoticons.constEnd(); + for ( TQStringList::const_iterator it = emoticons.constBegin(), end = emoticons.constEnd(); it != end; ++it ) { - QString matchEscaped=QStyleSheet::escape(*it); + TQString matchEscaped=TQStyleSheet::escape(*it); Emoticon e; e.picPath = pic; @@ -328,15 +328,15 @@ void Emoticons::addIfPossible( const QString& filenameNoExt, const QStringList & // Unless we do so, ChatMessagePart::slotScrollView does not work properly and causing // HTMLPart not to be scrolled to the very last message. p.load( e.picPath ); - result = QString::fromLatin1( "" ); + TQString::fromLatin1( "\" width=\"" ) + + TQString::number( p.width() ) + + TQString::fromLatin1( "\" height=\"" ) + + TQString::number( p.height() ) + + TQString::fromLatin1( "\" />" ); e.picHTMLCode = result; e.matchTextEscaped = matchEscaped; @@ -347,7 +347,7 @@ void Emoticons::addIfPossible( const QString& filenameNoExt, const QStringList & } } -void Emoticons::initEmoticons( const QString &theme ) +void Emoticons::initEmoticons( const TQString &theme ) { if(theme.isNull()) { @@ -365,43 +365,43 @@ void Emoticons::initEmoticons( const QString &theme ) d->emoticonAndPicList.clear(); d->emoticonMap.clear(); - QString filename= KGlobal::dirs()->findResource( "emoticons", d->theme + QString::fromLatin1( "/emoticons.xml" ) ); + TQString filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::fromLatin1( "/emoticons.xml" ) ); if(!filename.isEmpty()) return initEmoticon_emoticonsxml( filename ); - filename= KGlobal::dirs()->findResource( "emoticons", d->theme + QString::fromLatin1( "/icondef.xml" ) ); + filename= KGlobal::dirs()->findResource( "emoticons", d->theme + TQString::fromLatin1( "/icondef.xml" ) ); if(!filename.isEmpty()) return initEmoticon_JEP0038( filename ); kdWarning(14010) << k_funcinfo << "emotiucon XML theme description not found" < keys = d->emoticonMap.keys(); - for ( QValueList::const_iterator it = keys.begin(); it != keys.end(); ++it ) + TQValueList keys = d->emoticonMap.keys(); + for ( TQValueList::const_iterator it = keys.begin(); it != keys.end(); ++it ) { - QChar key = (*it); - QValueList keyValues = d->emoticonMap[key]; + TQChar key = (*it); + TQValueList keyValues = d->emoticonMap[key]; qHeapSort(keyValues.begin(), keyValues.end()); d->emoticonMap[key] = keyValues; } @@ -516,21 +516,21 @@ void Emoticons::sortEmoticons() -QMap Emoticons::emoticonAndPicList() +TQMap Emoticons::emoticonAndPicList() { return d->emoticonAndPicList; } -QString Emoticons::parse( const QString &message, ParseMode mode ) +TQString Emoticons::parse( const TQString &message, ParseMode mode ) { if ( !KopetePrefs::prefs()->useEmoticons() ) return message; - QValueList tokens = tokenize( message, mode ); - QValueList::const_iterator token; - QString result; - QPixmap p; + TQValueList tokens = tokenize( message, mode ); + TQValueList::const_iterator token; + TQString result; + TQPixmap p; for ( token = tokens.begin(); token != tokens.end(); ++token ) { switch ( (*token).type ) diff --git a/kopete/libkopete/private/kopeteemoticons.h b/kopete/libkopete/private/kopeteemoticons.h index 84fd305a..762a02a0 100644 --- a/kopete/libkopete/private/kopeteemoticons.h +++ b/kopete/libkopete/private/kopeteemoticons.h @@ -18,9 +18,9 @@ #ifndef kopeteemoticons_h__ #define kopeteemoticons_h__ -#include -#include -#include +#include +#include +#include #include "kopete_export.h" @@ -35,7 +35,7 @@ public: * chosen by the user. * Instead, use @ref Kopete::Emoticons::self() **/ - Emoticons( const QString &theme = QString::null ); + Emoticons( const TQString &theme = TQString::null ); ~Emoticons( ); @@ -63,10 +63,10 @@ public: * If nicks is provided, they will not be parsed if they * exist in message. */ - static QString parseEmoticons( const QString &message, ParseMode = SkipHTML ) ; + static TQString parseEmoticons( const TQString &message, ParseMode = SkipHTML ) ; - QString parse( const QString &message, ParseMode = SkipHTML ); + TQString parse( const TQString &message, ParseMode = SkipHTML ); /** * TokenType, a token might be an image ( emoticon ) or text. @@ -77,15 +77,15 @@ public: }; /** - * A token consists of a QString text which is either a regular text + * A token consists of a TQString text which is either a regular text * or a path to image depending on the type. * If type is Image the text refers to an image path. * If type is Text the text refers to a regular text. */ struct Token { Token() : type( Undefined ) {} - Token( TokenType t, const QString &m ) : type( t ), text(m) {} - Token( TokenType t, const QString &m, const QString &p, const QString &html ) + Token( TokenType t, const TQString &m ) : type( t ), text(m) {} + Token( TokenType t, const TQString &m, const TQString &p, const TQString &html ) : type( t ), text( m ), picPath( p ), picHTMLCode( html ) {} TokenType type; QString text; @@ -96,9 +96,9 @@ public: /** * Static function which will call tokenize - * @see tokenize( const QString& ) + * @see tokenize( const TQString& ) */ - static QValueList tokenizeEmoticons( const QString &message, ParseMode mode = DefaultParseMode ); + static TQValueList tokenizeEmoticons( const TQString &message, ParseMode mode = DefaultParseMode ); /** * Tokenizes an message. @@ -120,17 +120,17 @@ public: * Note: quotation marks are used to emphasize white spaces. * @param message is the message to tokenize * @param mode is a bitmask of ParseMode enum - * @return a QValueList which consiste of ordered tokens of the text. + * @return a TQValueList which consiste of ordered tokens of the text. * @author Engin AYDOGAN < engin@bzzzt.biz > * @since 23-03-05 */ - QValueList tokenize( const QString &message, uint mode = DefaultParseMode ); + TQValueList tokenize( const TQString &message, uint mode = DefaultParseMode ); /** * Return all emoticons and the corresponding icon. * (only one emoticon per image) */ - QMap emoticonAndPicList(); + TQMap emoticonAndPicList(); public slots: /** @@ -149,19 +149,19 @@ private: * add an emoticon to our mapping if * an animation/pixmap has been found for it **/ - void addIfPossible( const QString& filenameNoExt, const QStringList &emoticons ); + void addIfPossible( const TQString& filenameNoExt, const TQStringList &emoticons ); /** * uses the kopete's emoticons.xml for the theme * @see initEmoticons */ - void initEmoticon_emoticonsxml( const QString & filename); + void initEmoticon_emoticonsxml( const TQString & filename); /** * uses the JEP-0038 xml description for the theme * @see initEmoticons */ - void initEmoticon_JEP0038( const QString & filename); + void initEmoticon_JEP0038( const TQString & filename); /** * sorts emoticons for convenient parsing, which yields greedy matching on @@ -180,7 +180,7 @@ private slots: * Fills the map with paths and emoticons * This needs to be done on every emoticon-theme change **/ - void initEmoticons ( const QString &theme = QString::null ); + void initEmoticons ( const TQString &theme = TQString::null ); }; diff --git a/kopete/libkopete/private/kopeteutils_private.cpp b/kopete/libkopete/private/kopeteutils_private.cpp index 3746bcd3..933a5b11 100644 --- a/kopete/libkopete/private/kopeteutils_private.cpp +++ b/kopete/libkopete/private/kopeteutils_private.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include +#include #include @@ -49,7 +49,7 @@ NotifyHelper* NotifyHelper::self() void NotifyHelper::slotEventActivated(unsigned int action) { - const KNotification *n = dynamic_cast(QObject::sender()); + const KNotification *n = dynamic_cast(TQObject::sender()); if (n) { ErrorNotificationInfo info = m_events[n]; @@ -64,7 +64,7 @@ void NotifyHelper::slotEventActivated(unsigned int action) void NotifyHelper::slotEventClosed() { - const KNotification *n = dynamic_cast(QObject::sender()); + const KNotification *n = dynamic_cast(TQObject::sender()); if (n) unregisterNotification(n); } diff --git a/kopete/libkopete/private/kopeteutils_private.h b/kopete/libkopete/private/kopeteutils_private.h index a684c965..8c780c2f 100644 --- a/kopete/libkopete/private/kopeteutils_private.h +++ b/kopete/libkopete/private/kopeteutils_private.h @@ -18,9 +18,9 @@ #ifndef KOPETE_UTILS_PRIVATE_H #define KOPETE_UTILS_PRIVATE_H -#include "qobject.h" -#include "qstring.h" -#include "qpixmap.h" +#include "tqobject.h" +#include "tqstring.h" +#include "tqpixmap.h" class KNotification; @@ -32,9 +32,9 @@ namespace Utils typedef struct { - QString caption; - QString explanation; - QString debugInfo; + TQString caption; + TQString explanation; + TQString debugInfo; } ErrorNotificationInfo; class NotifyHelper : public QObject @@ -50,7 +50,7 @@ public slots: private: NotifyHelper(); ~NotifyHelper(); - QMap m_events; + TQMap m_events; static NotifyHelper *s_self; }; diff --git a/kopete/libkopete/private/kopeteviewmanager.cpp b/kopete/libkopete/private/kopeteviewmanager.cpp index c6d295fd..2a6ccb84 100644 --- a/kopete/libkopete/private/kopeteviewmanager.cpp +++ b/kopete/libkopete/private/kopeteviewmanager.cpp @@ -19,8 +19,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -39,8 +39,8 @@ #include "kopeteviewmanager.h" -typedef QMap ManagerMap; -typedef QPtrList EventList; +typedef TQMap ManagerMap; +typedef TQPtrList EventList; struct KopeteViewManagerPrivate { @@ -73,13 +73,13 @@ KopeteViewManager::KopeteViewManager() d->activeView = 0L; d->foreignMessage=false; - connect( KopetePrefs::prefs(), SIGNAL( saved() ), this, SLOT( slotPrefsChanged() ) ); + connect( KopetePrefs::prefs(), TQT_SIGNAL( saved() ), this, TQT_SLOT( slotPrefsChanged() ) ); - connect( Kopete::ChatSessionManager::self() , SIGNAL( display( Kopete::Message &, Kopete::ChatSession *) ), - this, SLOT ( messageAppended( Kopete::Message &, Kopete::ChatSession *) ) ); + connect( Kopete::ChatSessionManager::self() , TQT_SIGNAL( display( Kopete::Message &, Kopete::ChatSession *) ), + this, TQT_SLOT ( messageAppended( Kopete::Message &, Kopete::ChatSession *) ) ); - connect( Kopete::ChatSessionManager::self() , SIGNAL( readMessage() ), - this, SLOT ( nextEvent() ) ); + connect( Kopete::ChatSessionManager::self() , TQT_SIGNAL( readMessage() ), + this, TQT_SLOT ( nextEvent() ) ); slotPrefsChanged(); } @@ -106,7 +106,7 @@ void KopeteViewManager::slotPrefsChanged() d->balloonNotifyIgnoreClosesChatView = KopetePrefs::prefs()->balloonNotifyIgnoreClosesChatView(); } -KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString &requestedPlugin ) +KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const TQString &requestedPlugin ) { // kdDebug(14000) << k_funcinfo << endl; @@ -119,7 +119,7 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString Kopete::PluginManager *pluginManager = Kopete::PluginManager::self(); Kopete::ViewPlugin *viewPlugin = 0L; - QString pluginName = requestedPlugin.isEmpty() ? KopetePrefs::prefs()->interfacePreference() : requestedPlugin; + TQString pluginName = requestedPlugin.isEmpty() ? KopetePrefs::prefs()->interfacePreference() : requestedPlugin; if( !pluginName.isEmpty() ) { viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( pluginName ); @@ -132,7 +132,7 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString } if( !viewPlugin ) - viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( QString::fromLatin1("kopete_chatwindow") ); + viewPlugin = (Kopete::ViewPlugin*)pluginManager->loadPlugin( TQString::fromLatin1("kopete_chatwindow") ); if( viewPlugin ) { @@ -141,8 +141,8 @@ KopeteView *KopeteViewManager::view( Kopete::ChatSession* session, const QString d->foreignMessage = false; d->managerMap.insert( session, newView ); - connect( session, SIGNAL( closing(Kopete::ChatSession *) ), - this, SLOT(slotChatSessionDestroyed(Kopete::ChatSession*)) ); + connect( session, TQT_SIGNAL( closing(Kopete::ChatSession *) ), + this, TQT_SLOT(slotChatSessionDestroyed(Kopete::ChatSession*)) ); return newView; } @@ -169,8 +169,8 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi bool appendMessageEvent = d->useQueueOrStack; - QWidget *w; - if( d->queueUnreadMessages && ( w = dynamic_cast(view( manager )) ) ) + TQWidget *w; + if( d->queueUnreadMessages && ( w = dynamic_cast(view( manager )) ) ) { // append msg event to queue if chat window is active but not the chat view in it... appendMessageEvent = appendMessageEvent && !(w->isActiveWindow() && manager->view() == d->activeView); @@ -192,7 +192,7 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi { Kopete::MessageEvent *event=new Kopete::MessageEvent(msg,manager); d->eventList.append( event ); - connect(event, SIGNAL(done(Kopete::MessageEvent *)), this, SLOT(slotEventDeleted(Kopete::MessageEvent *))); + connect(event, TQT_SIGNAL(done(Kopete::MessageEvent *)), this, TQT_SLOT(slotEventDeleted(Kopete::MessageEvent *))); Kopete::ChatSessionManager::self()->postNewEvent(event); } } @@ -204,42 +204,42 @@ void KopeteViewManager::messageAppended( Kopete::Message &msg, Kopete::ChatSessi if ( !outgoingMessage && ( !manager->account()->isAway() || KopetePrefs::prefs()->soundIfAway() ) && msg.direction() != Kopete::Message::Internal ) { - QWidget *w=dynamic_cast(manager->view(false)); + TQWidget *w=dynamic_cast(manager->view(false)); KConfig *config = KGlobal::config(); config->setGroup("General"); if( (!manager->view(false) || !w || manager->view() != d->activeView || config->readBoolEntry("EventIfActive", true) || !w->isActiveWindow()) && msg.from()) { - QString msgFrom = QString::null; + TQString msgFrom = TQString::null; if( msg.from()->metaContact() ) msgFrom = msg.from()->metaContact()->displayName(); else msgFrom = msg.from()->contactId(); - QString msgText = msg.plainBody(); + TQString msgText = msg.plainBody(); if( msgText.length() > 90 ) - msgText = msgText.left(88) + QString::fromLatin1("..."); + msgText = msgText.left(88) + TQString::fromLatin1("..."); - QString event; - QString body =i18n( "Incoming message from %1
    \"%2\"
    " ); + TQString event; + TQString body =i18n( "Incoming message from %1
    \"%2\"
    " ); switch( msg.importance() ) { case Kopete::Message::Low: - event = QString::fromLatin1( "kopete_contact_lowpriority" ); + event = TQString::fromLatin1( "kopete_contact_lowpriority" ); break; case Kopete::Message::Highlight: - event = QString::fromLatin1( "kopete_contact_highlight" ); + event = TQString::fromLatin1( "kopete_contact_highlight" ); body = i18n( "A highlighted message arrived from %1
    \"%2\"
    " ); break; default: - event = QString::fromLatin1( "kopete_contact_incoming" ); + event = TQString::fromLatin1( "kopete_contact_incoming" ); } - KNotification *notify=KNotification::event(msg.from()->metaContact() , event, body.arg( QStyleSheet::escape(msgFrom), QStyleSheet::escape(msgText) ), 0, /*msg.from()->metaContact(),*/ + KNotification *notify=KNotification::event(msg.from()->metaContact() , event, body.arg( TQStyleSheet::escape(msgFrom), TQStyleSheet::escape(msgText) ), 0, /*msg.from()->metaContact(),*/ w , i18n("View") ); - connect(notify,SIGNAL(activated(unsigned int )), manager , SLOT(raiseView()) ); + connect(notify,TQT_SIGNAL(activated(unsigned int )), manager , TQT_SLOT(raiseView()) ); } } } @@ -256,7 +256,7 @@ void KopeteViewManager::readMessages( Kopete::ChatSession *manager, bool outgoin else if( !thisView->isVisible() ) thisView->makeVisible(); - QPtrListIterator it( d->eventList ); + TQPtrListIterator it( d->eventList ); Kopete::MessageEvent* event; while ( ( event = it.current() ) != 0 ) { @@ -285,7 +285,7 @@ void KopeteViewManager::slotEventDeleted( Kopete::MessageEvent *event ) else if ( event->state() == Kopete::MessageEvent::Ignored && d->balloonNotifyIgnoreClosesChatView ) { bool bAnotherWithThisManager = false; - for( QPtrListIterator it( d->eventList ); it; ++it ) + for( TQPtrListIterator it( d->eventList ); it; ++it ) { Kopete::MessageEvent *event = it.current(); if ( event->message().manager() == kmm ) @@ -314,7 +314,7 @@ void KopeteViewManager::slotViewActivated( KopeteView *view ) // kdDebug( 14000 ) << k_funcinfo << endl; d->activeView = view; - QPtrListIterator it ( d->eventList ); + TQPtrListIterator it ( d->eventList ); Kopete::MessageEvent* event; while ( ( event = it.current() ) != 0 ) { diff --git a/kopete/libkopete/private/kopeteviewmanager.h b/kopete/libkopete/private/kopeteviewmanager.h index b1706906..f6b29e98 100644 --- a/kopete/libkopete/private/kopeteviewmanager.h +++ b/kopete/libkopete/private/kopeteviewmanager.h @@ -54,7 +54,7 @@ class KOPETE_EXPORT KopeteViewManager : public QObject * @param session The Kopete::ChatSession we are viewing. * @param requestedPlugin Specifies the view plugin to use. */ - KopeteView *view( Kopete::ChatSession *session, const QString &requestedPlugin = QString::null ); + KopeteView *view( Kopete::ChatSession *session, const TQString &requestedPlugin = TQString::null ); /** * Provide access to the list of KopeteChatWindow the class maintains. diff --git a/kopete/libkopete/tests/kopetecontactlist_test.cpp b/kopete/libkopete/tests/kopetecontactlist_test.cpp index 001f3f0d..7b21d407 100644 --- a/kopete/libkopete/tests/kopetecontactlist_test.cpp +++ b/kopete/libkopete/tests/kopetecontactlist_test.cpp @@ -15,8 +15,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include #include #include "kopetecontactlist_test.h" @@ -34,13 +34,13 @@ void KopeteContactList_Test::allTests() void KopeteContactList_Test::testSomething() { // change user data dir to avoid messing with user's .kde dir - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); - QString filename = locateLocal( "appdata", QString::fromLatin1( "contactlist.xml" ) ); + TQString filename = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) ); if( ! filename.isEmpty() ) { // previous test run, delete the previous contact list - bool removed = QFile::remove(filename); + bool removed = TQFile::remove(filename); // if we cant remove the file, abort test if (!removed) return; diff --git a/kopete/libkopete/tests/kopeteemoticontest.cpp b/kopete/libkopete/tests/kopeteemoticontest.cpp index e9a81c1d..a64aee99 100644 --- a/kopete/libkopete/tests/kopeteemoticontest.cpp +++ b/kopete/libkopete/tests/kopeteemoticontest.cpp @@ -18,9 +18,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -51,7 +51,7 @@ KUNITTEST_MODULE_REGISTER_TESTER( KopeteEmoticonTest ); void KopeteEmoticonTest::allTests() { // change user data dir to avoid messing with user's .kde dir - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); //KApplication::disableAutoDcopRegistration(); //KApplication app; @@ -62,19 +62,19 @@ void KopeteEmoticonTest::allTests() void KopeteEmoticonTest::testEmoticonParser() { Kopete::Emoticons emo("Default"); - QString basePath = QString::fromLatin1( SRCDIR ) + QString::fromLatin1("/emoticon-parser-testcases"); - QDir testCasesDir(basePath); + TQString basePath = TQString::fromLatin1( SRCDIR ) + TQString::fromLatin1("/emoticon-parser-testcases"); + TQDir testCasesDir(basePath); - QStringList inputFileNames = testCasesDir.entryList("*.input"); - for ( QStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it) + TQStringList inputFileNames = testCasesDir.entryList("*.input"); + for ( TQStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it) { - QString fileName = *it; + TQString fileName = *it; kdDebug() << "testcase: " << fileName << endl; - QString outputFileName = fileName; + TQString outputFileName = fileName; outputFileName.replace("input","output"); // open the input file - QFile inputFile(basePath + QString::fromLatin1("/") + fileName); - QFile expectedFile(basePath + QString::fromLatin1("/") + outputFileName); + TQFile inputFile(basePath + TQString::fromLatin1("/") + fileName); + TQFile expectedFile(basePath + TQString::fromLatin1("/") + outputFileName); // check if the expected output file exists // if it doesn't, skip the testcase if ( ! expectedFile.exists() ) @@ -84,29 +84,29 @@ void KopeteEmoticonTest::testEmoticonParser() } if ( inputFile.open( IO_ReadOnly ) && expectedFile.open( IO_ReadOnly )) { - QTextStream inputStream(&inputFile); - QTextStream expectedStream(&expectedFile); - QString inputData; - QString expectedData; + TQTextStream inputStream(&inputFile); + TQTextStream expectedStream(&expectedFile); + TQString inputData; + TQString expectedData; inputData = inputStream.read(); expectedData = expectedStream.read(); inputFile.close(); expectedFile.close(); - QString path = KGlobal::dirs()->findResource( "emoticons", "Default/smile.png" ).replace( "smile.png", QString::null ); + TQString path = KGlobal::dirs()->findResource( "emoticons", "Default/smile.png" ).replace( "smile.png", TQString::null ); Kopete::Emoticons::self(); - QString result = emo.parse( inputData ).replace( path, QString::null ); + TQString result = emo.parse( inputData ).replace( path, TQString::null ); // HACK to know the test case we applied, concatenate testcase name to both // input and expected string. WIll remove when I can add some sort of metadata // to a CHECK so debug its origin testcase - result = fileName + QString::fromLatin1(": ") + result; - expectedData = fileName + QString::fromLatin1(": ") + expectedData; + result = fileName + TQString::fromLatin1(": ") + result; + expectedData = fileName + TQString::fromLatin1(": ") + expectedData; // if the test case begins with broken, we expect it to fail, then use XFAIL // otherwise use CHECK - if ( fileName.section("-", 0, 0) == QString::fromLatin1("broken") ) + if ( fileName.section("-", 0, 0) == TQString::fromLatin1("broken") ) { kdDebug() << "checking known-broken testcase: " << fileName << endl; XFAIL(result, expectedData); diff --git a/kopete/libkopete/tests/kopetemessage_test.cpp b/kopete/libkopete/tests/kopetemessage_test.cpp index 1ca57123..3e4a85b3 100644 --- a/kopete/libkopete/tests/kopetemessage_test.cpp +++ b/kopete/libkopete/tests/kopetemessage_test.cpp @@ -19,8 +19,8 @@ #include -#include -#include +#include +#include #include #include #include @@ -50,16 +50,16 @@ KUNITTEST_MODULE_REGISTER_TESTER( KopeteMessage_Test ); KopeteMessage_Test::KopeteMessage_Test() { // change user data dir to avoid messing with user's .kde dir - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); // create fake objects needed to build a reasonable testeable message - m_protocol = new Kopete::Test::Mock::Protocol( new KInstance(QCString("test-kopete-message")), 0L, "test-kopete-message"); + m_protocol = new Kopete::Test::Mock::Protocol( new KInstance(TQCString("test-kopete-message")), 0L, "test-kopete-message"); m_account = new Kopete::Test::Mock::Account(m_protocol, "testaccount"); m_metaContactMyself = new Kopete::Test::Mock::MetaContact(); m_metaContactOther = new Kopete::Test::Mock::MetaContact(); - m_contactFrom = new Kopete::Test::Mock::Contact(m_account, QString::fromLatin1("test-myself"), m_metaContactMyself, QString::null); - m_contactTo = new Kopete::Test::Mock::Contact(m_account, QString::fromLatin1("test-dest"), m_metaContactOther, QString::null); - m_message = new Kopete::Message( m_contactFrom, m_contactTo, QString::null, Kopete::Message::Outbound, Kopete::Message::PlainText); + m_contactFrom = new Kopete::Test::Mock::Contact(m_account, TQString::fromLatin1("test-myself"), m_metaContactMyself, TQString::null); + m_contactTo = new Kopete::Test::Mock::Contact(m_account, TQString::fromLatin1("test-dest"), m_metaContactOther, TQString::null); + m_message = new Kopete::Message( m_contactFrom, m_contactTo, TQString::null, Kopete::Message::Outbound, Kopete::Message::PlainText); } void KopeteMessage_Test::allTests() @@ -120,7 +120,7 @@ void KopeteMessage_Test::testPrimitives() CHECK(Kopete::Message::RichText, msg.format()); } { - QString m = "foobar"; + TQString m = "foobar"; Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::RichText); msg.setBody(m, Kopete::Message::PlainText); @@ -142,64 +142,64 @@ void KopeteMessage_Test::testPrimitives() *********************************************/ { - QString m = "foobar"; + TQString m = "foobar"; Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::RichText); msg.setBody("NEW", Kopete::Message::PlainText); - CHECK(QString("NEW"), msg.plainBody()); + CHECK(TQString("NEW"), msg.plainBody()); msg.setBody("NEW_NEW", Kopete::Message::RichText); - CHECK(QString("NEW_NEW"), msg.plainBody()); + CHECK(TQString("NEW_NEW"), msg.plainBody()); } { - QString m = "foobar"; + TQString m = "foobar"; Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::PlainText); msg.setBody("NEW", Kopete::Message::PlainText); - CHECK(QString("NEW"), msg.plainBody()); + CHECK(TQString("NEW"), msg.plainBody()); msg.setBody("NEW_NEW", Kopete::Message::RichText); - CHECK(QString("NEW_NEW"), msg.plainBody()); + CHECK(TQString("NEW_NEW"), msg.plainBody()); } { - QString m = " HELLO WORLD "; + TQString m = " HELLO WORLD "; Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::PlainText); CHECK(m, msg.plainBody()); msg.setBody(" SIMPLE", Kopete::Message::PlainText); - CHECK(msg.plainBody(), QString(" SIMPLE") ); - CHECK(msg.escapedBody(), QString("<simple> SIMPLE") ); + CHECK(msg.plainBody(), TQString(" SIMPLE") ); + CHECK(msg.escapedBody(), TQString("<simple> SIMPLE") ); msg.setBody("SIMPLE", Kopete::Message::RichText); - CHECK(msg.plainBody(), QString("SIMPLE") ); - CHECK(msg.escapedBody(), QString("SIMPLE") ); + CHECK(msg.plainBody(), TQString("SIMPLE") ); + CHECK(msg.escapedBody(), TQString("SIMPLE") ); - CHECK(Kopete::Message::unescape( QString( "SIMPLE" ) ), QString("SIMPLE") ); - CHECK(Kopete::Message::unescape( QString( "Foo " ) ), QString("Foo ") ); - CHECK(Kopete::Message::unescape( QString( "Foo " ) ), QString("Foo Bar") ); + CHECK(Kopete::Message::unescape( TQString( "SIMPLE" ) ), TQString("SIMPLE") ); + CHECK(Kopete::Message::unescape( TQString( "Foo " ) ), TQString("Foo ") ); + CHECK(Kopete::Message::unescape( TQString( "Foo " ) ), TQString("Foo Bar") ); msg.setBody(m, Kopete::Message::RichText); // FIXME: Should setBody() also strip extra white space? - //CHECK(msg.plainBody(), QString("HELLO WORLD")); - //CHECK(msg.escapedBody(), QString("HELLO WORLD")); + //CHECK(msg.plainBody(), TQString("HELLO WORLD")); + //CHECK(msg.escapedBody(), TQString("HELLO WORLD")); - CHECK(msg.escapedBody(), QString("   HELLO WORLD   ")); - CHECK(msg.plainBody(), QString(" HELLO WORLD ")); - CHECK(msg.plainBody().stripWhiteSpace(), QString("HELLO WORLD")); - CHECK(msg.escapedBody().stripWhiteSpace(), QString("  HELLO WORLD  ")); + CHECK(msg.escapedBody(), TQString("   HELLO WORLD   ")); + CHECK(msg.plainBody(), TQString(" HELLO WORLD ")); + CHECK(msg.plainBody().stripWhiteSpace(), TQString("HELLO WORLD")); + CHECK(msg.escapedBody().stripWhiteSpace(), TQString("  HELLO WORLD  ")); } { Kopete::Message msg( m_contactFrom, m_contactTo, "foo", Kopete::Message::Inbound, Kopete::Message::PlainText); msg.setBody("

    foo", Kopete::Message::RichText); - CHECK(msg.escapedBody(), QString("foo")); + CHECK(msg.escapedBody(), TQString("foo")); msg.setBody("

    foo

    ", Kopete::Message::RichText); - CHECK(msg.escapedBody(), QString("foo")); + CHECK(msg.escapedBody(), TQString("foo")); msg.setBody("\n

    foo

    \n
    ", Kopete::Message::RichText); - CHECK(msg.escapedBody(), QString("foo
    ")); + CHECK(msg.escapedBody(), TQString("foo
    ")); } /********************************************** @@ -214,8 +214,8 @@ void KopeteMessage_Test::testPrimitives() CHECK(msg1.escapedBody(), msg2.escapedBody()); msg1.setBody("NEW", Kopete::Message::PlainText); - CHECK(msg1.plainBody(), QString("NEW")); - CHECK(msg2.plainBody(), QString("foo")); + CHECK(msg1.plainBody(), TQString("NEW")); + CHECK(msg2.plainBody(), TQString("foo")); } /********************************************** @@ -227,7 +227,7 @@ void KopeteMessage_Test::testPrimitives() { Kopete::Message msg2; - CHECK(msg2.plainBody(), QString::null); + CHECK(msg2.plainBody(), TQString::null); msg2 = msg1; @@ -235,13 +235,13 @@ void KopeteMessage_Test::testPrimitives() CHECK(msg1.escapedBody(), msg2.escapedBody()); msg1.setBody("NEW", Kopete::Message::PlainText); - CHECK(msg1.plainBody(), QString("NEW")); - CHECK(msg2.plainBody(), QString("foo")); + CHECK(msg1.plainBody(), TQString("NEW")); + CHECK(msg2.plainBody(), TQString("foo")); } - CHECK(msg1.plainBody(), QString("NEW")); + CHECK(msg1.plainBody(), TQString("NEW")); msg1 = msg1; - CHECK(msg1.plainBody(), QString("NEW")); + CHECK(msg1.plainBody(), TQString("NEW")); } } @@ -251,18 +251,18 @@ void KopeteMessage_Test::setup() void KopeteMessage_Test::testLinkParser() { - QString basePath = QString::fromLatin1( SRCDIR ) + QString::fromLatin1("/link-parser-testcases"); - QDir testCasesDir(basePath); + TQString basePath = TQString::fromLatin1( SRCDIR ) + TQString::fromLatin1("/link-parser-testcases"); + TQDir testCasesDir(basePath); - QStringList inputFileNames = testCasesDir.entryList("*.input"); - for ( QStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it) + TQStringList inputFileNames = testCasesDir.entryList("*.input"); + for ( TQStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it) { - QString fileName = *it; - QString outputFileName = fileName; + TQString fileName = *it; + TQString outputFileName = fileName; outputFileName.replace("input","output"); // open the input file - QFile inputFile(basePath + QString::fromLatin1("/") + fileName); - QFile expectedFile(basePath + QString::fromLatin1("/") + outputFileName); + TQFile inputFile(basePath + TQString::fromLatin1("/") + fileName); + TQFile expectedFile(basePath + TQString::fromLatin1("/") + outputFileName); // check if the expected output file exists // if it doesn't, skip the testcase if ( ! expectedFile.exists() ) @@ -272,10 +272,10 @@ void KopeteMessage_Test::testLinkParser() } if ( inputFile.open( IO_ReadOnly ) && expectedFile.open( IO_ReadOnly )) { - QTextStream inputStream(&inputFile); - QTextStream expectedStream(&expectedFile); - QString inputData; - QString expectedData; + TQTextStream inputStream(&inputFile); + TQTextStream expectedStream(&expectedFile); + TQString inputData; + TQString expectedData; inputData = inputStream.read(); expectedData = expectedStream.read(); @@ -288,21 +288,21 @@ void KopeteMessage_Test::testLinkParser() // set message format for parsing according to textcase filename convention Kopete::Message::MessageFormat format; - if ( fileName.section("-", 1, 1) == QString::fromLatin1("plaintext") ) + if ( fileName.section("-", 1, 1) == TQString::fromLatin1("plaintext") ) format = Kopete::Message::PlainText; else format = Kopete::Message::RichText; - QString result = Kopete::Message::parseLinks( inputData, format ); + TQString result = Kopete::Message::parseLinks( inputData, format ); // HACK to know the test case we applied, concatenate testcase name to both // input and expected string. WIll remove when I can add some sort of metadata // to a CHECK so debug its origin testcase - result = fileName + QString::fromLatin1(": ") + result; - expectedData = fileName + QString::fromLatin1(": ") + expectedData; + result = fileName + TQString::fromLatin1(": ") + result; + expectedData = fileName + TQString::fromLatin1(": ") + expectedData; // if the test case begins with broken, we expect it to fail, then use XFAIL // otherwise use CHECK - if ( fileName.section("-", 0, 0) == QString::fromLatin1("broken") ) + if ( fileName.section("-", 0, 0) == TQString::fromLatin1("broken") ) { //kdDebug() << "checking known-broken testcase: " << fileName << endl; XFAIL(result, expectedData); diff --git a/kopete/libkopete/tests/kopetepasswordtest_program.cpp b/kopete/libkopete/tests/kopetepasswordtest_program.cpp index a1f3a50e..51b8908a 100644 --- a/kopete/libkopete/tests/kopetepasswordtest_program.cpp +++ b/kopete/libkopete/tests/kopetepasswordtest_program.cpp @@ -17,9 +17,9 @@ #include "kopetepasswordtest_program.h" #include "kopetepassword.h" -#include -#include -#include +#include +#include +#include #include #include @@ -28,7 +28,7 @@ #include #include -static QTextStream _out( stdout, IO_WriteOnly ); +static TQTextStream _out( stdout, IO_WriteOnly ); static KCmdLineOptions opts[] = { @@ -42,18 +42,18 @@ static KCmdLineOptions opts[] = using namespace Kopete; -QString retrieve( Password &pwd, const QPixmap &image, const QString &prompt ) +TQString retrieve( Password &pwd, const TQPixmap &image, const TQString &prompt ) { PasswordRetriever r; - pwd.request( &r, SLOT( gotPassword( const QString & ) ), image, prompt ); - QTimer tmr; - r.connect( &tmr, SIGNAL( timeout() ), SLOT( timer() ) ); + pwd.request( &r, TQT_SLOT( gotPassword( const TQString & ) ), image, prompt ); + TQTimer tmr; + r.connect( &tmr, TQT_SIGNAL( timeout() ), TQT_SLOT( timer() ) ); tmr.start( 1000 ); qApp->exec(); return r.password; } -void PasswordRetriever::gotPassword( const QString &pass ) +void PasswordRetriever::gotPassword( const TQString &pass ) { password = pass; qApp->quit(); @@ -74,11 +74,11 @@ int main( int argc, char *argv[] ) KApplication app( "kopetepasswordtest" ); bool setPassword = args->isSet("set"); - QString newPwd = args->getOption("set"); - QString passwordId = args->getOption("id"); + TQString newPwd = args->getOption("set"); + TQString passwordId = args->getOption("id"); bool error = args->isSet("error"); - QString prompt = args->getOption("prompt"); - QPixmap image = QString(args->getOption("image")); + TQString prompt = args->getOption("prompt"); + TQPixmap image = TQString(args->getOption("image")); _out << (image.isNull() ? "image is null" : "image is valid") << endl; @@ -87,7 +87,7 @@ int main( int argc, char *argv[] ) _out << "Cached value is null: " << pwd.cachedValue().isNull() << endl; - QString pass = retrieve( pwd, image, prompt ); + TQString pass = retrieve( pwd, image, prompt ); if ( !pass.isNull() ) _out << "Read password: " << pass << endl; @@ -101,7 +101,7 @@ int main( int argc, char *argv[] ) if ( newPwd.isEmpty() ) { _out << "Clearing password" << endl; - newPwd = QString::null; + newPwd = TQString::null; } else { @@ -112,7 +112,7 @@ int main( int argc, char *argv[] ) // without this, setting passwords will fail since they're // set asynchronously. - QTimer::singleShot( 0, &app, SLOT( deref() ) ); + TQTimer::singleShot( 0, &app, TQT_SLOT( deref() ) ); app.exec(); if ( setPassword ) diff --git a/kopete/libkopete/tests/kopetepasswordtest_program.h b/kopete/libkopete/tests/kopetepasswordtest_program.h index 507da2a1..47c17172 100644 --- a/kopete/libkopete/tests/kopetepasswordtest_program.h +++ b/kopete/libkopete/tests/kopetepasswordtest_program.h @@ -1,16 +1,16 @@ #ifndef KOPETEPASSWORDTEST_H #define KOPETEPASSWORDTEST_H -#include +#include class PasswordRetriever : public QObject { Q_OBJECT public: - QString password; + TQString password; public slots: void timer(); - void gotPassword( const QString & ); + void gotPassword( const TQString & ); }; #endif diff --git a/kopete/libkopete/tests/kopetepropertiestest.cpp b/kopete/libkopete/tests/kopetepropertiestest.cpp index 1e60c77c..76b8ae79 100644 --- a/kopete/libkopete/tests/kopetepropertiestest.cpp +++ b/kopete/libkopete/tests/kopetepropertiestest.cpp @@ -20,8 +20,8 @@ #include "kopeteproperties.h" -#include -#include +#include +#include #include #include @@ -37,11 +37,11 @@ KUNITTEST_MODULE_REGISTER_TESTER( KopetePropertiesTest ); using namespace Kopete::Properties; -static QTextStream _out( stdout, IO_WriteOnly ); +static TQTextStream _out( stdout, IO_WriteOnly ); class PropertyHost : public WithProperties {}; -class FooProperty : public SimpleDataProperty +class FooProperty : public SimpleDataProperty { public: const char *name() const { return "foo"; } @@ -51,8 +51,8 @@ void KopetePropertiesTest::allTests() { PropertyHost myPropertyHost; CHECK( myPropertyHost.property(fooProperty).isNull(), true); - myPropertyHost.setProperty( fooProperty, QString::fromLatin1("Foo!") ); - CHECK( myPropertyHost.property(fooProperty), QString::fromLatin1("Foo!") ); + myPropertyHost.setProperty( fooProperty, TQString::fromLatin1("Foo!") ); + CHECK( myPropertyHost.property(fooProperty), TQString::fromLatin1("Foo!") ); } diff --git a/kopete/libkopete/tests/kopetewallettest_program.cpp b/kopete/libkopete/tests/kopetewallettest_program.cpp index 29de1edc..cfc8b6e9 100644 --- a/kopete/libkopete/tests/kopetewallettest_program.cpp +++ b/kopete/libkopete/tests/kopetewallettest_program.cpp @@ -14,8 +14,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include #include @@ -29,7 +29,7 @@ #include "kopetewalletmanager.h" #include "kopetewallettest_program.h" -static QTextStream _out( stdout, IO_WriteOnly ); +static TQTextStream _out( stdout, IO_WriteOnly ); void closeWallet() { @@ -38,7 +38,7 @@ void closeWallet() void delay() { - QTimer::singleShot( 3000, qApp, SLOT( quit() ) ); + TQTimer::singleShot( 3000, qApp, TQT_SLOT( quit() ) ); qApp->exec(); } @@ -46,7 +46,7 @@ void openWalletAsync() { WalletReciever *r = new WalletReciever; _out << "[ASYNC] About to open wallet, receiver: " << r << endl; - Kopete::WalletManager::self()->openWallet( r, SLOT( gotWallet( KWallet::Wallet* ) ) ); + Kopete::WalletManager::self()->openWallet( r, TQT_SLOT( gotWallet( KWallet::Wallet* ) ) ); } void WalletReciever::gotWallet( KWallet::Wallet *w ) @@ -74,22 +74,22 @@ int main( int argc, char *argv[] ) for( int i = 0; i < args->count(); ++i ) { - QString arg = args->arg( i ); + TQString arg = args->arg( i ); _out << "Processing " << arg << endl; - if( arg == QString::fromLatin1( "open" ) ) openWalletAsync(); - if( arg == QString::fromLatin1( "close" ) ) closeWallet(); - if( arg == QString::fromLatin1( "delay" ) ) delay(); + if( arg == TQString::fromLatin1( "open" ) ) openWalletAsync(); + if( arg == TQString::fromLatin1( "close" ) ) closeWallet(); + if( arg == TQString::fromLatin1( "delay" ) ) delay(); _out << "Done." << endl; } WalletReciever *r = new WalletReciever; - QTimer timer; - r->connect( &timer, SIGNAL( timeout() ), SLOT( timer() ) ); + TQTimer timer; + r->connect( &timer, TQT_SIGNAL( timeout() ), TQT_SLOT( timer() ) ); timer.start( 1000 ); _out << "About to start 30 second event loop" << endl; - QTimer::singleShot( 30000, qApp, SLOT( quit() ) ); + TQTimer::singleShot( 30000, qApp, TQT_SLOT( quit() ) ); return qApp->exec(); } diff --git a/kopete/libkopete/tests/kopetewallettest_program.h b/kopete/libkopete/tests/kopetewallettest_program.h index 58bdbb6e..b2e5d2fb 100644 --- a/kopete/libkopete/tests/kopetewallettest_program.h +++ b/kopete/libkopete/tests/kopetewallettest_program.h @@ -1,7 +1,7 @@ #ifndef KOPETEWALLETTEST_H #define KOPETEWALLETTEST_H -#include +#include namespace KWallet { class Wallet; } diff --git a/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp b/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp index 8a8425bc..7d46fc34 100644 --- a/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp +++ b/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp @@ -26,7 +26,7 @@ namespace Test namespace Mock { -Account::Account(Kopete::Protocol *parent, const QString &accountID, const char *name) : Kopete::Account(parent, accountID, name) +Account::Account(Kopete::Protocol *parent, const TQString &accountID, const char *name) : Kopete::Account(parent, accountID, name) { } @@ -36,7 +36,7 @@ Account::~Account() } -bool Account::createContact( const QString &contactId, Kopete::MetaContact *parentContact ) +bool Account::createContact( const TQString &contactId, Kopete::MetaContact *parentContact ) { return true; } @@ -51,7 +51,7 @@ void Account::disconnect() // do nothing } -void Account::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason) +void Account::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason) { // do nothing } diff --git a/kopete/libkopete/tests/mock/kopeteaccount_mock.h b/kopete/libkopete/tests/mock/kopeteaccount_mock.h index 55ba15cc..053977a5 100644 --- a/kopete/libkopete/tests/mock/kopeteaccount_mock.h +++ b/kopete/libkopete/tests/mock/kopeteaccount_mock.h @@ -36,13 +36,13 @@ namespace Mock class Account : public Kopete::Account { public: - Account(Kopete::Protocol *parent, const QString &accountID, const char *name=0L); + Account(Kopete::Protocol *parent, const TQString &accountID, const char *name=0L); ~Account(); // pure virtual functions implementation - virtual bool createContact( const QString &contactId, MetaContact *parentContact ); + virtual bool createContact( const TQString &contactId, MetaContact *parentContact ); virtual void connect( const Kopete::OnlineStatus& initialStatus = OnlineStatus() ); virtual void disconnect(); - virtual void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null ); + virtual void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null ); }; } // end ns Kopete::Test::Mock diff --git a/kopete/libkopete/tests/mock/kopetecontact_mock.cpp b/kopete/libkopete/tests/mock/kopetecontact_mock.cpp index 19cfa7b0..ea90bee0 100644 --- a/kopete/libkopete/tests/mock/kopetecontact_mock.cpp +++ b/kopete/libkopete/tests/mock/kopetecontact_mock.cpp @@ -24,7 +24,7 @@ namespace Test namespace Mock { -Contact::Contact( Kopete::Account *account, const QString &id, Kopete::MetaContact *parent, const QString &icon) : Kopete::Contact( account, id, parent, icon) +Contact::Contact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *parent, const TQString &icon) : Kopete::Contact( account, id, parent, icon) { } diff --git a/kopete/libkopete/tests/mock/kopetecontact_mock.h b/kopete/libkopete/tests/mock/kopetecontact_mock.h index e445a571..a0b735d5 100644 --- a/kopete/libkopete/tests/mock/kopetecontact_mock.h +++ b/kopete/libkopete/tests/mock/kopetecontact_mock.h @@ -35,7 +35,7 @@ namespace Mock class Contact : public Kopete::Contact { public: - Contact( Kopete::Account *account, const QString &id, Kopete::MetaContact *parent, const QString &icon = QString::null ); + Contact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *parent, const TQString &icon = TQString::null ); ~Contact(); virtual Kopete::ChatSession* manager( CanCreateFlags canCreate = CannotCreate ); }; diff --git a/kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp b/kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp index d3bbd0e2..d9ae1d3a 100644 --- a/kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp +++ b/kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp @@ -24,22 +24,22 @@ namespace Test namespace Mock { -Protocol::Protocol( KInstance *instance, QObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name) +Protocol::Protocol( KInstance *instance, TQObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name) { } -Account* Protocol::createNewAccount( const QString &accountId ) +Account* Protocol::createNewAccount( const TQString &accountId ) { return 0L; } -AddContactPage* Protocol::createAddContactWidget( QWidget *parent, Kopete::Account *account ) +AddContactPage* Protocol::createAddContactWidget( TQWidget *parent, Kopete::Account *account ) { return 0L; } -KopeteEditAccountWidget* Protocol::createEditAccountWidget( Kopete::Account *account, QWidget *parent ) +KopeteEditAccountWidget* Protocol::createEditAccountWidget( Kopete::Account *account, TQWidget *parent ) { return 0L; } diff --git a/kopete/libkopete/tests/mock/kopeteprotocol_mock.h b/kopete/libkopete/tests/mock/kopeteprotocol_mock.h index 189f7d79..97f0d7ad 100644 --- a/kopete/libkopete/tests/mock/kopeteprotocol_mock.h +++ b/kopete/libkopete/tests/mock/kopeteprotocol_mock.h @@ -37,11 +37,11 @@ namespace Mock class Protocol : public Kopete::Protocol { public: - Protocol( KInstance *instance, QObject *parent, const char *name ); + Protocol( KInstance *instance, TQObject *parent, const char *name ); // pure virtual functions implemented - virtual Account *createNewAccount( const QString &accountId ); - virtual AddContactPage *createAddContactWidget( QWidget *parent, Kopete::Account *account ); - virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, QWidget *parent ); + virtual Account *createNewAccount( const TQString &accountId ); + virtual AddContactPage *createAddContactWidget( TQWidget *parent, Kopete::Account *account ); + virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, TQWidget *parent ); }; } // end ns Kopete::Test::Mock diff --git a/kopete/libkopete/ui/accountselector.cpp b/kopete/libkopete/ui/accountselector.cpp index 2ea8e719..345e9ab4 100644 --- a/kopete/libkopete/ui/accountselector.cpp +++ b/kopete/libkopete/ui/accountselector.cpp @@ -19,9 +19,9 @@ #include "kopeteaccount.h" #include "kopeteaccountmanager.h" -#include -#include -#include +#include +#include +#include #include #include @@ -32,7 +32,7 @@ class AccountListViewItem : public KListViewItem Kopete::Account *mAccount; public: - AccountListViewItem(QListView *parent, Kopete::Account *acc) + AccountListViewItem(TQListView *parent, Kopete::Account *acc) : KListViewItem(parent) { if (acc==0) @@ -62,8 +62,8 @@ class AccountSelectorPrivate }; -AccountSelector::AccountSelector(QWidget *parent, const char *name) - : QWidget(parent, name) +AccountSelector::AccountSelector(TQWidget *parent, const char *name) + : TQWidget(parent, name) { //kdDebug(14010) << k_funcinfo << "for no special protocol" << endl; d = new AccountSelectorPrivate; @@ -72,8 +72,8 @@ AccountSelector::AccountSelector(QWidget *parent, const char *name) } -AccountSelector::AccountSelector(Kopete::Protocol *proto, QWidget *parent, - const char *name) : QWidget(parent, name) +AccountSelector::AccountSelector(Kopete::Protocol *proto, TQWidget *parent, + const char *name) : TQWidget(parent, name) { //kdDebug(14010) << k_funcinfo << " for protocol " << proto->pluginId() << endl; d = new AccountSelectorPrivate; @@ -92,17 +92,17 @@ AccountSelector::~AccountSelector() void AccountSelector::initUI() { kdDebug(14010) << k_funcinfo << endl; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); d->lv = new KListView(this); d->lv->setFullWidth(true); - d->lv->addColumn(QString::fromLatin1("")); + d->lv->addColumn(TQString::fromLatin1("")); d->lv->header()->hide(); if(d->proto != 0) { kdDebug(14010) << k_funcinfo << "creating list for a certain protocol" << endl; - QDict accounts = Kopete::AccountManager::self()->accounts(d->proto); - QDictIterator it(accounts); + TQDict accounts = Kopete::AccountManager::self()->accounts(d->proto); + TQDictIterator it(accounts); for(; Kopete::Account *account = it.current(); ++it) { new AccountListViewItem(d->lv, account); @@ -111,7 +111,7 @@ void AccountSelector::initUI() else { kdDebug(14010) << k_funcinfo << "creating list of all accounts" << endl; - QPtrList accounts = Kopete::AccountManager::self()->accounts(); + TQPtrList accounts = Kopete::AccountManager::self()->accounts(); Kopete::Account *account = 0; for(account = accounts.first(); account; account = accounts.next()) { @@ -119,8 +119,8 @@ void AccountSelector::initUI() } } - connect(d->lv, SIGNAL(selectionChanged(QListViewItem *)), - this, SLOT(slotSelectionChanged(QListViewItem *))); + connect(d->lv, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(slotSelectionChanged(TQListViewItem *))); } @@ -129,7 +129,7 @@ void AccountSelector::setSelected(Kopete::Account *account) if (account==0) return; - QListViewItemIterator it(d->lv); + TQListViewItemIterator it(d->lv); while (it.current()) { if(static_cast(it.current())->account() == account) @@ -146,7 +146,7 @@ bool AccountSelector::isSelected(Kopete::Account *account) if (account==0) return false; - QListViewItemIterator it(d->lv); + TQListViewItemIterator it(d->lv); while (it.current()) { if(static_cast(it.current())->account() == account) @@ -166,7 +166,7 @@ Kopete::Account *AccountSelector::selectedItem() } -void AccountSelector::slotSelectionChanged(QListViewItem *item) +void AccountSelector::slotSelectionChanged(TQListViewItem *item) { //kdDebug(14010) << k_funcinfo << endl; if (item != 0) diff --git a/kopete/libkopete/ui/accountselector.h b/kopete/libkopete/ui/accountselector.h index 4f5d50ac..518ac67f 100644 --- a/kopete/libkopete/ui/accountselector.h +++ b/kopete/libkopete/ui/accountselector.h @@ -18,7 +18,7 @@ #ifndef ACCOUNTSELECTOR_H #define ACCOUNTSELECTOR_H -#include +#include #include #include "kopete_export.h" @@ -39,7 +39,7 @@ Q_OBJECT * The parameters @p parent and @p name are handled by * KListView. */ - AccountSelector(QWidget *parent=0, const char *name=0); + AccountSelector(TQWidget *parent=0, const char *name=0); /** * Constructor for a list of accounts for one protocol only @@ -48,7 +48,7 @@ Q_OBJECT * KListView. @p proto defines the protocol whose accounts are * shown in the list */ - AccountSelector(Kopete::Protocol *proto, QWidget *parent=0, const char *name=0); + AccountSelector(Kopete::Protocol *proto, TQWidget *parent=0, const char *name=0); /** * Destructor. @@ -79,7 +79,7 @@ Q_OBJECT void selectionChanged(Kopete::Account *acc); private slots: - void slotSelectionChanged(QListViewItem *item); + void slotSelectionChanged(TQListViewItem *item); private: void initUI(); diff --git a/kopete/libkopete/ui/addcontactpage.cpp b/kopete/libkopete/ui/addcontactpage.cpp index f308a7d4..846815f2 100644 --- a/kopete/libkopete/ui/addcontactpage.cpp +++ b/kopete/libkopete/ui/addcontactpage.cpp @@ -17,7 +17,7 @@ #include "addcontactpage.h" -AddContactPage::AddContactPage(QWidget *parent, const char *name ) : QWidget(parent,name) +AddContactPage::AddContactPage(TQWidget *parent, const char *name ) : TQWidget(parent,name) { } diff --git a/kopete/libkopete/ui/addcontactpage.h b/kopete/libkopete/ui/addcontactpage.h index 506c5bcc..d72e2fd1 100644 --- a/kopete/libkopete/ui/addcontactpage.h +++ b/kopete/libkopete/ui/addcontactpage.h @@ -18,7 +18,7 @@ #ifndef ADDCONTACTPAGE_H #define ADDCONTACTPAGE_H -#include +#include #include #include "kopete_export.h" @@ -34,7 +34,7 @@ class KOPETE_EXPORT AddContactPage : public QWidget Q_OBJECT public: - AddContactPage(QWidget *parent=0, const char *name=0); + AddContactPage(TQWidget *parent=0, const char *name=0); virtual ~AddContactPage(); //Kopete::Protocol *protocol; diff --git a/kopete/libkopete/ui/addressbooklinkwidget.cpp b/kopete/libkopete/ui/addressbooklinkwidget.cpp index a6aff32b..0d544d27 100644 --- a/kopete/libkopete/ui/addressbooklinkwidget.cpp +++ b/kopete/libkopete/ui/addressbooklinkwidget.cpp @@ -21,7 +21,7 @@ ************************************************************************* */ -#include +#include #include #include #include @@ -38,11 +38,11 @@ namespace Kopete { namespace UI { -AddressBookLinkWidget::AddressBookLinkWidget( QWidget * parent, const char * name ) : AddressBookLinkWidgetBase( parent, name ), mMetaContact( 0 ) +AddressBookLinkWidget::AddressBookLinkWidget( TQWidget * parent, const char * name ) : AddressBookLinkWidgetBase( parent, name ), mMetaContact( 0 ) { - btnClear->setIconSet( SmallIconSet( QApplication::reverseLayout() ? QString::fromLatin1( "locationbar_erase" ) : QString::fromLatin1( "clear_left") ) ); - connect( btnClear, SIGNAL( clicked() ), this, SLOT( slotClearAddressee() ) ); - connect( btnSelectAddressee, SIGNAL( clicked() ), SLOT( slotSelectAddressee() ) ); + btnClear->setIconSet( SmallIconSet( TQApplication::reverseLayout() ? TQString::fromLatin1( "locationbar_erase" ) : TQString::fromLatin1( "clear_left") ) ); + connect( btnClear, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotClearAddressee() ) ); + connect( btnSelectAddressee, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSelectAddressee() ) ); } void AddressBookLinkWidget::setAddressee( const KABC::Addressee& addr ) @@ -56,7 +56,7 @@ void AddressBookLinkWidget::setMetaContact( const Kopete::MetaContact * mc ) mMetaContact = mc; } -QString AddressBookLinkWidget::uid() const +TQString AddressBookLinkWidget::uid() const { return mSelectedUid; } @@ -66,29 +66,29 @@ void AddressBookLinkWidget::slotClearAddressee() edtAddressee->clear(); btnClear->setEnabled( false ); KABC::Addressee mrEmpty; - mSelectedUid = QString::null; + mSelectedUid = TQString::null; emit addresseeChanged( mrEmpty ); } void AddressBookLinkWidget::slotSelectAddressee() { - QString message; + TQString message; if ( mMetaContact ) message = i18n("Choose the corresponding entry for '%1'" ).arg( mMetaContact->displayName() ); else message = i18n("Choose the corresponding entry in the address book" ); - Kopete::UI::AddressBookSelectorDialog dialog( i18n("Addressbook Association"), message, ( mMetaContact ? mMetaContact->metaContactId() : QString::null ), this ); + Kopete::UI::AddressBookSelectorDialog dialog( i18n("Addressbook Association"), message, ( mMetaContact ? mMetaContact->metaContactId() : TQString::null ), this ); int result = dialog.exec(); KABC::Addressee addr; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) { addr = dialog.addressBookSelectorWidget()->addressee(); edtAddressee->setText( addr.realName() ); btnClear->setEnabled( !addr.isEmpty() ); - mSelectedUid = ( addr.isEmpty() ? QString::null : addr.uid() ); + mSelectedUid = ( addr.isEmpty() ? TQString::null : addr.uid() ); emit addresseeChanged( addr ); } } diff --git a/kopete/libkopete/ui/addressbooklinkwidget.h b/kopete/libkopete/ui/addressbooklinkwidget.h index dff23c58..fa44d530 100644 --- a/kopete/libkopete/ui/addressbooklinkwidget.h +++ b/kopete/libkopete/ui/addressbooklinkwidget.h @@ -44,7 +44,7 @@ class AddressBookLinkWidget : public AddressBookLinkWidgetBase { Q_OBJECT public: - AddressBookLinkWidget( QWidget * parent, const char * name ); + AddressBookLinkWidget( TQWidget * parent, const char * name ); ~AddressBookLinkWidget() {} /** * Set the currently selected addressee @@ -57,7 +57,7 @@ public: /** * Return the selected addressbook UID. */ - QString uid() const; + TQString uid() const; signals: /** * Emitted when the selected addressee changed. addr is the KABC::Addressee that was selected. If addr.isEmpty() is empty, the clear button was clicked. @@ -66,7 +66,7 @@ signals: /** * Provided so you can perform your own actions instead of opening the AddressBookSelectorWidget. - * To do so, QObject::disconnect() btnSelectAddressee and connect your own slot to this signal + * To do so, TQObject::disconnect() btnSelectAddressee and connect your own slot to this signal */ void selectAddresseeClicked(); protected slots: @@ -74,7 +74,7 @@ protected slots: void slotSelectAddressee(); private: const Kopete::MetaContact * mMetaContact; - QString mSelectedUid; + TQString mSelectedUid; }; } // end namespace UI } // end namespace Kopete diff --git a/kopete/libkopete/ui/addressbookselectordialog.cpp b/kopete/libkopete/ui/addressbookselectordialog.cpp index 7d2e17ff..44f42e2a 100644 --- a/kopete/libkopete/ui/addressbookselectordialog.cpp +++ b/kopete/libkopete/ui/addressbookselectordialog.cpp @@ -19,9 +19,9 @@ #include "addressbookselectordialog.h" #include "addressbookselectorwidget.h" #include -#include -#include -#include +#include +#include +#include #include #include @@ -30,9 +30,9 @@ namespace Kopete namespace UI { -AddressBookSelectorDialog::AddressBookSelectorDialog(const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent, const char *name, bool modal ) : KDialogBase(parent, name, modal, title, Help|Ok|Cancel, Ok, true ) +AddressBookSelectorDialog::AddressBookSelectorDialog(const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent, const char *name, bool modal ) : KDialogBase(parent, name, modal, title, Help|Ok|Cancel, Ok, true ) { - QVBox *vbox=new QVBox(this); + TQVBox *vbox=new TQVBox(this); m_addressBookSelectorWidget= new AddressBookSelectorWidget(vbox); m_addressBookSelectorWidget->setLabelMessage(message); @@ -42,7 +42,7 @@ AddressBookSelectorDialog::AddressBookSelectorDialog(const QString &title, const enableButtonOK(false); //setHelp("linkaddressbook"); - connect(m_addressBookSelectorWidget, SIGNAL(addresseeListClicked( QListViewItem * )), SLOT(slotWidgetAddresseeListClicked( QListViewItem * ))); + connect(m_addressBookSelectorWidget, TQT_SIGNAL(addresseeListClicked( TQListViewItem * )), TQT_SLOT(slotWidgetAddresseeListClicked( TQListViewItem * ))); if ( !preSelectUid.isEmpty() ) m_addressBookSelectorWidget->selectAddressee(preSelectUid); @@ -52,19 +52,19 @@ AddressBookSelectorDialog::~AddressBookSelectorDialog() { } -KABC::Addressee AddressBookSelectorDialog::getAddressee( const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent) +KABC::Addressee AddressBookSelectorDialog::getAddressee( const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent) { AddressBookSelectorDialog dialog(title, message, preSelectUid, parent); int result = dialog.exec(); KABC::Addressee adr; - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) adr = dialog.addressBookSelectorWidget()->addressee(); return adr; } -void AddressBookSelectorDialog::slotWidgetAddresseeListClicked( QListViewItem *addressee ) +void AddressBookSelectorDialog::slotWidgetAddresseeListClicked( TQListViewItem *addressee ) { // enable ok if a valid addressee is selected enableButtonOK( addressee ? addressee->isSelected() : false); @@ -72,12 +72,12 @@ void AddressBookSelectorDialog::slotWidgetAddresseeListClicked( QListViewItem *a void AddressBookSelectorDialog::accept() { - QDialog::accept(); + TQDialog::accept(); } void AddressBookSelectorDialog::reject() { - QDialog::reject(); + TQDialog::reject(); } } // namespace UI diff --git a/kopete/libkopete/ui/addressbookselectordialog.h b/kopete/libkopete/ui/addressbookselectordialog.h index f391aa3a..470f3407 100644 --- a/kopete/libkopete/ui/addressbookselectordialog.h +++ b/kopete/libkopete/ui/addressbookselectordialog.h @@ -51,7 +51,7 @@ public: /** * The constructor of an empty AddressBookSelectorWidget */ - AddressBookSelectorDialog( const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent=0L, const char *name=0L, bool modal = false ); + AddressBookSelectorDialog( const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent=0L, const char *name=0L, bool modal = false ); /** * The destructor of the dialog */ @@ -71,12 +71,12 @@ public: * @returns the selected contact, or a null addressee if the user * pressed the Cancel button. Optionally */ - static KABC::Addressee getAddressee( const QString &title, const QString &message, const QString &preSelectUid, QWidget *parent = 0L ); + static KABC::Addressee getAddressee( const TQString &title, const TQString &message, const TQString &preSelectUid, TQWidget *parent = 0L ); protected slots: virtual void accept(); virtual void reject(); - void slotWidgetAddresseeListClicked( QListViewItem *addressee ); + void slotWidgetAddresseeListClicked( TQListViewItem *addressee ); protected: AddressBookSelectorWidget *m_addressBookSelectorWidget; }; diff --git a/kopete/libkopete/ui/addressbookselectorwidget.cpp b/kopete/libkopete/ui/addressbookselectorwidget.cpp index 50c4a885..4b106315 100644 --- a/kopete/libkopete/ui/addressbookselectorwidget.cpp +++ b/kopete/libkopete/ui/addressbookselectorwidget.cpp @@ -25,7 +25,7 @@ ************************************************************************* */ -#include +#include #include #include #include @@ -39,9 +39,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include "addressbookselectorwidget.h" #include @@ -54,39 +54,39 @@ namespace Kopete namespace UI { -AddressBookSelectorWidget::AddressBookSelectorWidget( QWidget *parent, const char *name ) +AddressBookSelectorWidget::AddressBookSelectorWidget( TQWidget *parent, const char *name ) : AddressBookSelectorWidget_Base( parent, name ) { m_addressBook = Kopete::KABCPersistence::self()->addressBook(); // Addressee validation connections - connect( addAddresseeButton, SIGNAL( clicked() ), SLOT( slotAddAddresseeClicked() ) ); - connect( addAddresseeButton, SIGNAL( clicked() ), SIGNAL( addAddresseeClicked() ) ); - - connect( addresseeListView, SIGNAL( clicked(QListViewItem * ) ), - SIGNAL( addresseeListClicked( QListViewItem * ) ) ); - connect( addresseeListView, SIGNAL( selectionChanged( QListViewItem * ) ), - SIGNAL( addresseeListClicked( QListViewItem * ) ) ); - connect( addresseeListView, SIGNAL( spacePressed( QListViewItem * ) ), - SIGNAL( addresseeListClicked( QListViewItem * ) ) ); + connect( addAddresseeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAddAddresseeClicked() ) ); + connect( addAddresseeButton, TQT_SIGNAL( clicked() ), TQT_SIGNAL( addAddresseeClicked() ) ); + + connect( addresseeListView, TQT_SIGNAL( clicked(TQListViewItem * ) ), + TQT_SIGNAL( addresseeListClicked( TQListViewItem * ) ) ); + connect( addresseeListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), + TQT_SIGNAL( addresseeListClicked( TQListViewItem * ) ) ); + connect( addresseeListView, TQT_SIGNAL( spacePressed( TQListViewItem * ) ), + TQT_SIGNAL( addresseeListClicked( TQListViewItem * ) ) ); - connect( m_addressBook, SIGNAL( addressBookChanged( AddressBook * ) ), this, SLOT( slotLoadAddressees() ) ); + connect( m_addressBook, TQT_SIGNAL( addressBookChanged( AddressBook * ) ), this, TQT_SLOT( slotLoadAddressees() ) ); //We should add a clear KAction here. But we can't really do that with a designer file :\ this sucks - addresseeListView->setColumnText(2, SmallIconSet(QString::fromLatin1("email")), i18n("Email")); + addresseeListView->setColumnText(2, SmallIconSet(TQString::fromLatin1("email")), i18n("Email")); kListViewSearchLine->setListView(addresseeListView); slotLoadAddressees(); - addresseeListView->setColumnWidthMode(0, QListView::Manual); + addresseeListView->setColumnWidthMode(0, TQListView::Manual); addresseeListView->setColumnWidth(0, 63); //Photo is 60, and it's nice to have a small gap, imho } AddressBookSelectorWidget::~AddressBookSelectorWidget() { - disconnect( m_addressBook, SIGNAL( addressBookChanged( AddressBook * ) ), this, SLOT( slotLoadAddressees() ) ); + disconnect( m_addressBook, TQT_SIGNAL( addressBookChanged( AddressBook * ) ), this, TQT_SLOT( slotLoadAddressees() ) ); } @@ -101,10 +101,10 @@ KABC::Addressee AddressBookSelectorWidget::addressee() return m_addressee; } -void AddressBookSelectorWidget::selectAddressee( const QString &uid ) +void AddressBookSelectorWidget::selectAddressee( const TQString &uid ) { // iterate trough list view - QListViewItemIterator it( addresseeListView ); + TQListViewItemIterator it( addresseeListView ); while( it.current() ) { AddresseeItem *addrItem = (AddresseeItem *) it.current(); @@ -136,7 +136,7 @@ void AddressBookSelectorWidget::slotLoadAddressees() } -void AddressBookSelectorWidget::setLabelMessage( const QString &msg ) +void AddressBookSelectorWidget::setLabelMessage( const TQString &msg ) { lblHeader->setText(msg); } @@ -144,7 +144,7 @@ void AddressBookSelectorWidget::setLabelMessage( const QString &msg ) void AddressBookSelectorWidget::slotAddAddresseeClicked() { // Pop up add addressee dialog - QString addresseeName = KInputDialog::getText( i18n( "New Address Book Entry" ), i18n( "Name the new entry:" ), QString::null, 0, this ); + TQString addresseeName = KInputDialog::getText( i18n( "New Address Book Entry" ), i18n( "Name the new entry:" ), TQString::null, 0, this ); if ( !addresseeName.isEmpty() ) { @@ -154,7 +154,7 @@ void AddressBookSelectorWidget::slotAddAddresseeClicked() Kopete::KABCPersistence::self()->writeAddressBook( 0 ); slotLoadAddressees(); // select the addressee we just added - QListViewItem * added = addresseeListView->findItem( addresseeName, 1 ); + TQListViewItem * added = addresseeListView->findItem( addresseeName, 1 ); kListViewSearchLine->clear(); kListViewSearchLine->updateSearch(); addresseeListView->setSelected( added, true ); diff --git a/kopete/libkopete/ui/addressbookselectorwidget.h b/kopete/libkopete/ui/addressbookselectorwidget.h index 3141f726..3b26cece 100644 --- a/kopete/libkopete/ui/addressbookselectorwidget.h +++ b/kopete/libkopete/ui/addressbookselectorwidget.h @@ -49,7 +49,7 @@ class KOPETE_EXPORT AddressBookSelectorWidget : public AddressBookSelectorWidget { Q_OBJECT public: - AddressBookSelectorWidget( QWidget *parent = 0, const char *name = 0 ); + AddressBookSelectorWidget( TQWidget *parent = 0, const char *name = 0 ); ~AddressBookSelectorWidget(); KABC::Addressee addressee(); /** @@ -57,11 +57,11 @@ public: * example: Please select a contact * or, Choose a contact to delete */ - void setLabelMessage( const QString &msg ); + void setLabelMessage( const TQString &msg ); /** * pre-selects a contact */ - void selectAddressee( const QString &uid ); + void selectAddressee( const TQString &uid ); /** * @return true if there is a contact selected */ @@ -78,7 +78,7 @@ protected slots: */ void slotLoadAddressees(); signals: - void addresseeListClicked( QListViewItem *addressee ); + void addresseeListClicked( TQListViewItem *addressee ); void addAddresseeClicked(); }; diff --git a/kopete/libkopete/ui/addresseeitem.cpp b/kopete/libkopete/ui/addresseeitem.cpp index 405d00d7..9fa9f023 100644 --- a/kopete/libkopete/ui/addresseeitem.cpp +++ b/kopete/libkopete/ui/addresseeitem.cpp @@ -17,17 +17,17 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include "addresseeitem.h" -AddresseeItem::AddresseeItem( QListView *parent, const KABC::Addressee &addressee) : +AddresseeItem::AddresseeItem( TQListView *parent, const KABC::Addressee &addressee) : KListViewItem( parent ), mAddressee( addressee ) { @@ -37,7 +37,7 @@ AddresseeItem::AddresseeItem( QListView *parent, const KABC::Addressee &addresse pic = mAddressee.logo(); if(pic.isIntern()) { - QPixmap qpixmap( pic.data().scaleWidth(60) ); //60 pixels seems okay.. kmail uses 60 btw + TQPixmap qpixmap( pic.data().scaleWidth(60) ); //60 pixels seems okay.. kmail uses 60 btw setPixmap( Photo,qpixmap ); } @@ -45,11 +45,11 @@ AddresseeItem::AddresseeItem( QListView *parent, const KABC::Addressee &addresse setText( Email, addressee.preferredEmail() ); } -QString AddresseeItem::key( int column, bool ) const +TQString AddresseeItem::key( int column, bool ) const { if (column == Email) { - QString value = text(Email); - QRegExp emailRe(QString::fromLatin1("<\\S*>")); + TQString value = text(Email); + TQRegExp emailRe(TQString::fromLatin1("<\\S*>")); int match = emailRe.search(value); if (match > -1) value = value.mid(match + 1, emailRe.matchedLength() - 2); diff --git a/kopete/libkopete/ui/addresseeitem.h b/kopete/libkopete/ui/addresseeitem.h index c501d0a9..36d1d284 100644 --- a/kopete/libkopete/ui/addresseeitem.h +++ b/kopete/libkopete/ui/addresseeitem.h @@ -21,7 +21,7 @@ #ifndef KABC_ADDRESSEEDIALOG_H #define KABC_ADDRESSEEDIALOG_H -#include +#include #include #include @@ -49,7 +49,7 @@ class AddresseeItem : public KListViewItem @param parent The parent listview. @param addressee The associated addressee. */ - AddresseeItem( QListView *parent, const KABC::Addressee &addressee ); + AddresseeItem( TQListView *parent, const KABC::Addressee &addressee ); /** Returns the addressee. @@ -57,9 +57,9 @@ class AddresseeItem : public KListViewItem KABC::Addressee addressee() const { return mAddressee; } /** - Method used by QListView to sort the items. + Method used by TQListView to sort the items. */ - virtual QString key( int column, bool ascending ) const; + virtual TQString key( int column, bool ascending ) const; private: KABC::Addressee mAddressee; diff --git a/kopete/libkopete/ui/contactaddednotifydialog.cpp b/kopete/libkopete/ui/contactaddednotifydialog.cpp index abcd4c7e..9084bd39 100644 --- a/kopete/libkopete/ui/contactaddednotifydialog.cpp +++ b/kopete/libkopete/ui/contactaddednotifydialog.cpp @@ -16,12 +16,12 @@ #include "contactaddednotifydialog.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -51,13 +51,13 @@ struct ContactAddedNotifyDialog::Private { ContactAddedNotifyWidget *widget; Account *account; - QString contactId; - QString addressbookId; + TQString contactId; + TQString addressbookId; }; -ContactAddedNotifyDialog::ContactAddedNotifyDialog(const QString& contactId, - const QString& contactNick, Kopete::Account *account, uint hide) +ContactAddedNotifyDialog::ContactAddedNotifyDialog(const TQString& contactId, + const TQString& contactNick, Kopete::Account *account, uint hide) : KDialogBase( Global::mainWidget(), "ContactAddedNotify", /*modal=*/false, i18n("Someone Has Added You"), Ok|Cancel ) { @@ -71,9 +71,9 @@ ContactAddedNotifyDialog::ContactAddedNotifyDialog(const QString& contactId, d->account=account; d->contactId=contactId; d->widget->m_label->setText(i18n(" The contact %2 has added you to his/her contactlist. (Account %3)") - .arg( KURL::encode_string( account->protocol()->pluginId() ) + QString::fromLatin1(":") + .arg( KURL::encode_string( account->protocol()->pluginId() ) + TQString::fromLatin1(":") + KURL::encode_string( account->accountId() ) , - contactNick.isEmpty() ? contactId : contactNick + QString::fromLatin1(" < ") + contactId + QString::fromLatin1(" >") , + contactNick.isEmpty() ? contactId : contactNick + TQString::fromLatin1(" < ") + contactId + TQString::fromLatin1(" >") , account->accountLabel() ) ); if( hide & InfoButton) d->widget->m_infoButton->hide() ; @@ -94,18 +94,18 @@ ContactAddedNotifyDialog::ContactAddedNotifyDialog(const QString& contactId, Kopete::GroupList groups=Kopete::ContactList::self()->groups(); for( Kopete::Group *it = groups.first(); it; it = groups.next() ) { - QString groupname = it->displayName(); + TQString groupname = it->displayName(); if ( it->type() == Group::Normal && !groupname.isEmpty() ) { d->widget->m_groupList->insertItem(groupname); } } - d->widget->m_groupList->setCurrentText(QString::null); //default to top-level + d->widget->m_groupList->setCurrentText(TQString::null); //default to top-level - connect( d->widget->widAddresseeLink, SIGNAL( addresseeChanged( const KABC::Addressee& ) ), this, SLOT( slotAddresseeSelected( const KABC::Addressee& ) ) ); - connect( d->widget->m_infoButton, SIGNAL( clicked() ), this, SLOT( slotInfoClicked() ) ); + connect( d->widget->widAddresseeLink, TQT_SIGNAL( addresseeChanged( const KABC::Addressee& ) ), this, TQT_SLOT( slotAddresseeSelected( const KABC::Addressee& ) ) ); + connect( d->widget->m_infoButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotInfoClicked() ) ); - connect( this, SIGNAL(okClicked()) , this , SLOT(slotFinished())); + connect( this, TQT_SIGNAL(okClicked()) , this , TQT_SLOT(slotFinished())); } @@ -125,14 +125,14 @@ bool ContactAddedNotifyDialog::authorized() const return d->widget->m_authorizeCb->isChecked(); } -QString ContactAddedNotifyDialog::displayName() const +TQString ContactAddedNotifyDialog::displayName() const { return d->widget->m_displayNameEdit->text(); } Group *ContactAddedNotifyDialog::group() const { - QString grpName=d->widget->m_groupList->currentText(); + TQString grpName=d->widget->m_groupList->currentText(); if(grpName.isEmpty()) return Group::topLevel(); diff --git a/kopete/libkopete/ui/contactaddednotifydialog.h b/kopete/libkopete/ui/contactaddednotifydialog.h index 96f8844c..be5349a4 100644 --- a/kopete/libkopete/ui/contactaddednotifydialog.h +++ b/kopete/libkopete/ui/contactaddednotifydialog.h @@ -43,9 +43,9 @@ namespace UI { * @code Kopete::UI::ContactAddedNotifyDialog *dialog = - new ContactAddedNotifyDialog(contactId, QString::null,account); - QObject::connect(dialog,SIGNAL(applyClicked(const QString&)),this,SLOT(contactAddedDialogApplied())); - QObject::connect(dialog,SIGNAL(infoClicked(const QString&)),this,SLOT(contactAddedDialogInfo())); + new ContactAddedNotifyDialog(contactId, TQString::null,account); + TQObject::connect(dialog,TQT_SIGNAL(applyClicked(const TQString&)),this,TQT_SLOT(contactAddedDialogApplied())); + TQObject::connect(dialog,TQT_SIGNAL(infoClicked(const TQString&)),this,TQT_SLOT(contactAddedDialogInfo())); dialog->show(); * @endcode @@ -93,7 +93,7 @@ public: * @param hide a bitmask of HideWidget used to hide some widget. By default, everything is shown. * */ - ContactAddedNotifyDialog(const QString& contactId, const QString& contactNick=QString::null, + ContactAddedNotifyDialog(const TQString& contactId, const TQString& contactNick=TQString::null, Kopete::Account *account=0L, uint hide=0x00); /** @@ -116,7 +116,7 @@ public: /** * @brief return the display name the user has entered */ - QString displayName() const; + TQString displayName() const; /** * @brief return the group the user has selected @@ -144,7 +144,7 @@ signals: * @brief the dialog has been applied * @param contactId is the id of the contact passed in the constructor. */ - void applyClicked(const QString &contactId); + void applyClicked(const TQString &contactId); /** * @brief the button "info" has been pressed @@ -155,7 +155,7 @@ signals: * hint: you can use sender() as parent of the new dialog * @param contactId is the id of the contact passed in the constructor. */ - void infoClicked(const QString &contactId); + void infoClicked(const TQString &contactId); private slots: diff --git a/kopete/libkopete/ui/editaccountwidget.h b/kopete/libkopete/ui/editaccountwidget.h index 533c90ff..a4345bae 100644 --- a/kopete/libkopete/ui/editaccountwidget.h +++ b/kopete/libkopete/ui/editaccountwidget.h @@ -36,7 +36,7 @@ class KopeteEditAccountWidgetPrivate; * in @ref apply(). * * Each protocol has to subclass this class, and the protocol's edit account page MUST inherits from - * QWidget too. + * TQWidget too. * * We suggest to put at least these fields in the page: * diff --git a/kopete/libkopete/ui/kopetecontactaction.cpp b/kopete/libkopete/ui/kopetecontactaction.cpp index d02c2ff2..cc6754d2 100644 --- a/kopete/libkopete/ui/kopetecontactaction.cpp +++ b/kopete/libkopete/ui/kopetecontactaction.cpp @@ -21,15 +21,15 @@ #include "kopetecontact.h" #include "kopeteonlinestatus.h" -KopeteContactAction::KopeteContactAction( Kopete::Contact *contact, const QObject *receiver, +KopeteContactAction::KopeteContactAction( Kopete::Contact *contact, const TQObject *receiver, const char *slot, KAction *parent ) -: KAction( contact->metaContact()->displayName(), QIconSet( contact->onlineStatus().iconFor( contact ) ), KShortcut(), +: KAction( contact->metaContact()->displayName(), TQIconSet( contact->onlineStatus().iconFor( contact ) ), KShortcut(), parent, contact->contactId().latin1() ) { m_contact = contact; - connect( this, SIGNAL( activated() ), SLOT( slotContactActionActivated() ) ); - connect( this, SIGNAL( activated( Kopete::Contact * ) ), receiver, slot ); + connect( this, TQT_SIGNAL( activated() ), TQT_SLOT( slotContactActionActivated() ) ); + connect( this, TQT_SIGNAL( activated( Kopete::Contact * ) ), receiver, slot ); } KopeteContactAction::~KopeteContactAction() diff --git a/kopete/libkopete/ui/kopetecontactaction.h b/kopete/libkopete/ui/kopetecontactaction.h index bb9d9f76..ba170ebb 100644 --- a/kopete/libkopete/ui/kopetecontactaction.h +++ b/kopete/libkopete/ui/kopetecontactaction.h @@ -37,7 +37,7 @@ public: /** * Create a new KopeteContactAction */ - KopeteContactAction( Kopete::Contact *contact, const QObject* receiver, const char* slot, KAction* parent ); + KopeteContactAction( Kopete::Contact *contact, const TQObject* receiver, const char* slot, KAction* parent ); ~KopeteContactAction(); Kopete::Contact * contact() const; diff --git a/kopete/libkopete/ui/kopetefileconfirmdialog.cpp b/kopete/libkopete/ui/kopetefileconfirmdialog.cpp index 01036a05..fffeec66 100644 --- a/kopete/libkopete/ui/kopetefileconfirmdialog.cpp +++ b/kopete/libkopete/ui/kopetefileconfirmdialog.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include +#include #include #include @@ -31,7 +31,7 @@ #include "kopetemetacontact.h" #include "kopetecontact.h" -KopeteFileConfirmDialog::KopeteFileConfirmDialog(const Kopete::FileTransferInfo &info,const QString& description,QWidget *parent, const char *name ) +KopeteFileConfirmDialog::KopeteFileConfirmDialog(const Kopete::FileTransferInfo &info,const TQString& description,TQWidget *parent, const char *name ) : KDialogBase( parent, name, false, i18n( "A User Would Like to Send You a File" ), KDialogBase::User1 | KDialogBase::User2, KDialogBase::User1, true, i18n( "&Refuse" ), i18n( "&Accept" ) ), m_info( info ) @@ -40,19 +40,19 @@ KopeteFileConfirmDialog::KopeteFileConfirmDialog(const Kopete::FileTransferInfo m_emited=false; m_view=new FileConfirmBase(this, "FileConfirmView"); - m_view->m_from->setText( info.contact()->metaContact()->displayName() + QString::fromLatin1( " <" ) + - info.contact()->contactId() + QString::fromLatin1( "> " ) ); + m_view->m_from->setText( info.contact()->metaContact()->displayName() + TQString::fromLatin1( " <" ) + + info.contact()->contactId() + TQString::fromLatin1( "> " ) ); m_view->m_size->setText( KGlobal::locale()->formatNumber( long( info.size() ), 0 ) ); m_view->m_description->setText( description ); m_view->m_filename->setText( info.file() ); KGlobal::config()->setGroup("File Transfer"); - const QString defaultPath=KGlobal::config()->readEntry("defaultPath" , QDir::homeDirPath() ); - m_view->m_saveto->setText(defaultPath + QString::fromLatin1( "/" ) + info.file() ); + const TQString defaultPath=KGlobal::config()->readEntry("defaultPath" , TQDir::homeDirPath() ); + m_view->m_saveto->setText(defaultPath + TQString::fromLatin1( "/" ) + info.file() ); setMainWidget(m_view); - connect(m_view->cmdBrowse, SIGNAL(clicked()), this, SLOT(slotBrowsePressed())); + connect(m_view->cmdBrowse, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBrowsePressed())); } KopeteFileConfirmDialog::~KopeteFileConfirmDialog() @@ -61,7 +61,7 @@ KopeteFileConfirmDialog::~KopeteFileConfirmDialog() void KopeteFileConfirmDialog::slotBrowsePressed() { - QString saveFileName = KFileDialog::getSaveFileName( m_view->m_saveto->text(), QString::fromLatin1( "*" ), 0L , i18n( "File Transfer" ) ); + TQString saveFileName = KFileDialog::getSaveFileName( m_view->m_saveto->text(), TQString::fromLatin1( "*" ), 0L , i18n( "File Transfer" ) ); if ( !saveFileName.isNull()) { m_view->m_saveto->setText(saveFileName); @@ -74,14 +74,14 @@ void KopeteFileConfirmDialog::slotUser2() KURL url(m_view->m_saveto->text()); if(url.isValid() && url.isLocalFile() ) { - const QString directory=url.directory(); + const TQString directory=url.directory(); if(!directory.isEmpty()) { KGlobal::config()->setGroup("File Transfer"); KGlobal::config()->writeEntry("defaultPath" , directory ); } - if(QFile(m_view->m_saveto->text()).exists()) + if(TQFile(m_view->m_saveto->text()).exists()) { int ret=KMessageBox::warningContinueCancel(this, i18n("The file '%1' already exists.\nDo you want to overwrite it ?").arg(m_view->m_saveto->text()) , i18n("Overwrite File") , KStdGuiItem::save()); @@ -103,7 +103,7 @@ void KopeteFileConfirmDialog::slotUser1() close(); } -void KopeteFileConfirmDialog::closeEvent( QCloseEvent *e) +void KopeteFileConfirmDialog::closeEvent( TQCloseEvent *e) { if(!m_emited) { diff --git a/kopete/libkopete/ui/kopetefileconfirmdialog.h b/kopete/libkopete/ui/kopetefileconfirmdialog.h index 20d58d51..ac5d19a4 100644 --- a/kopete/libkopete/ui/kopetefileconfirmdialog.h +++ b/kopete/libkopete/ui/kopetefileconfirmdialog.h @@ -18,7 +18,7 @@ #ifndef KOPETEFILECONFIRMDIALOG_H #define KOPETEFILECONFIRMDIALOG_H -#include +#include #include #include "kopetetransfermanager.h" @@ -33,7 +33,7 @@ class KopeteFileConfirmDialog : public KDialogBase Q_OBJECT public: - KopeteFileConfirmDialog(const Kopete::FileTransferInfo &info,const QString& description=QString::null, QWidget *parent=0, const char* name=0); + KopeteFileConfirmDialog(const Kopete::FileTransferInfo &info,const TQString& description=TQString::null, TQWidget *parent=0, const char* name=0); ~KopeteFileConfirmDialog(); private: @@ -47,10 +47,10 @@ public slots: protected slots: virtual void slotUser2(); virtual void slotUser1(); - virtual void closeEvent( QCloseEvent *e); + virtual void closeEvent( TQCloseEvent *e); signals: - void accepted(const Kopete::FileTransferInfo &info, const QString &filename); + void accepted(const Kopete::FileTransferInfo &info, const TQString &filename); void refused(const Kopete::FileTransferInfo &info); }; diff --git a/kopete/libkopete/ui/kopetelistview.cpp b/kopete/libkopete/ui/kopetelistview.cpp index 594f0920..9630592c 100644 --- a/kopete/libkopete/ui/kopetelistview.cpp +++ b/kopete/libkopete/ui/kopetelistview.cpp @@ -22,14 +22,14 @@ #include "kopeteglobal.h" #include "kopeteprefs.h" -#include +#include #include #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -39,25 +39,25 @@ namespace UI { namespace ListView { /* - Custom QToolTip for the list view. + Custom TQToolTip for the list view. The decision whether or not to show tooltips is taken in - maybeTip(). See also the QListView sources from Qt itself. + maybeTip(). See also the TQListView sources from Qt itself. Delegates to the list view items. */ class ToolTip : public QToolTip { public: - ToolTip( QWidget *parent, ListView *lv ); + ToolTip( TQWidget *parent, ListView *lv ); virtual ~ToolTip(); - void maybeTip( const QPoint &pos ); + void maybeTip( const TQPoint &pos ); private: ListView *m_listView; }; -ToolTip::ToolTip( QWidget *parent, ListView *lv ) - : QToolTip( parent ) +ToolTip::ToolTip( TQWidget *parent, ListView *lv ) + : TQToolTip( parent ) { m_listView = lv; } @@ -66,14 +66,14 @@ ToolTip::~ToolTip() { } -void ToolTip::maybeTip( const QPoint &pos ) +void ToolTip::maybeTip( const TQPoint &pos ) { if( !parentWidget() || !m_listView ) return; if( Item *item = dynamic_cast( m_listView->itemAt( pos ) ) ) { - QRect itemRect = m_listView->itemRect( item ); + TQRect itemRect = m_listView->itemRect( item ); uint leftMargin = m_listView->treeStepSize() * ( item->depth() + ( m_listView->rootIsDecorated() ? 1 : 0 ) ) + @@ -81,9 +81,9 @@ void ToolTip::maybeTip( const QPoint &pos ) uint xAdjust = itemRect.left() + leftMargin; uint yAdjust = itemRect.top(); - QPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust ); + TQPoint relativePos( pos.x() - xAdjust, pos.y() - yAdjust ); - std::pair toolTip = item->toolTip( relativePos ); + std::pair toolTip = item->toolTip( relativePos ); if ( toolTip.first.isEmpty() ) return; @@ -96,34 +96,34 @@ void ToolTip::maybeTip( const QPoint &pos ) struct ListView::Private { - QTimer sortTimer; + TQTimer sortTimer; std::auto_ptr toolTip; //! C-tor Private() {} }; -ListView::ListView( QWidget *parent, const char *name ) +ListView::ListView( TQWidget *parent, const char *name ) : KListView( parent, name ), d( new Private ) { - connect( &d->sortTimer, SIGNAL( timeout() ), this, SLOT( slotSort() ) ); + connect( &d->sortTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotSort() ) ); - // We have our own tooltips, don't use the default QListView ones + // We have our own tooltips, don't use the default TQListView ones setShowToolTips( false ); d->toolTip.reset( new ToolTip( viewport(), this ) ); - connect( this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), - SLOT( slotContextMenu( KListView *, QListViewItem *, const QPoint & ) ) ); - connect( this, SIGNAL( doubleClicked( QListViewItem * ) ), - SLOT( slotDoubleClicked( QListViewItem * ) ) ); + connect( this, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), + TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & ) ) ); + connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + TQT_SLOT( slotDoubleClicked( TQListViewItem * ) ) ); // set up flags for nicer painting clearWFlags( WStaticContents ); setWFlags( WNoAutoErase ); // clear the appropriate flags from the viewport - qt docs say we have to mask - // these flags out of the QListView to make weirdly painted list items work, but + // these flags out of the TQListView to make weirdly painted list items work, but // that doesn't do the job. masking them out of the viewport does. -// class MyWidget : public QWidget { public: using QWidget::clearWFlags; }; +// class MyWidget : public TQWidget { public: using TQWidget::clearWFlags; }; // static_cast( viewport() )->clearWFlags( WStaticContents ); // static_cast( viewport() )->setWFlags( WNoAutoErase ); @@ -139,7 +139,7 @@ ListView::~ListView() delete d; } -void ListView::slotDoubleClicked( QListViewItem *item ) +void ListView::slotDoubleClicked( TQListViewItem *item ) { kdDebug( 14000 ) << k_funcinfo << endl; @@ -148,7 +148,7 @@ void ListView::slotDoubleClicked( QListViewItem *item ) } void ListView::slotContextMenu( KListView * /*listview*/, - QListViewItem *item, const QPoint &/*point*/ ) + TQListViewItem *item, const TQPoint &/*point*/ ) { if ( item && !item->isSelected() ) { @@ -179,21 +179,21 @@ void ListView::setShowTreeLines( bool bShowAsTree ) /* This is a small hack ensuring that only F2 triggers inline * renaming. Won't win a beauty award, but whoever wrote it thinks - * relying on the fact that QListView intercepts and processes the + * relying on the fact that TQListView intercepts and processes the * F2 event through this event filter is sorta safe. * * Also use enter to execute the item since executed is not usually * called when enter is pressed. */ -void ListView::keyPressEvent( QKeyEvent *e ) +void ListView::keyPressEvent( TQKeyEvent *e ) { - QListViewItem *item = currentItem(); + TQListViewItem *item = currentItem(); if ( (e->key() == Qt::Key_F2) && item && item->isVisible() ) rename( item, 0 ); else if ( (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return) && item && item->isVisible() ) { // must provide a point within the item; emitExecute checks for this - QPoint p = viewport()->mapToGlobal(itemRect(item).center()); + TQPoint p = viewport()->mapToGlobal(itemRect(item).center()); emitExecute( currentItem(), p, 0 ); } else diff --git a/kopete/libkopete/ui/kopetelistview.h b/kopete/libkopete/ui/kopetelistview.h index 8b2c579b..2e065212 100644 --- a/kopete/libkopete/ui/kopetelistview.h +++ b/kopete/libkopete/ui/kopetelistview.h @@ -34,7 +34,7 @@ class ListView : public KListView Q_OBJECT public: - ListView( QWidget *parent = 0, const char *name = 0 ); + ListView( TQWidget *parent = 0, const char *name = 0 ); ~ListView(); /** @@ -52,14 +52,14 @@ public: public slots: /** - * Calls QListView::sort() + * Calls TQListView::sort() */ void slotSort() { sort(); } protected: - virtual void keyPressEvent( QKeyEvent *e ); + virtual void keyPressEvent( TQKeyEvent *e ); private slots: - void slotContextMenu(KListView*,QListViewItem *item, const QPoint &point ); - void slotDoubleClicked( QListViewItem *item ); + void slotContextMenu(KListView*,TQListViewItem *item, const TQPoint &point ); + void slotDoubleClicked( TQListViewItem *item ); private: struct Private; Private *d; diff --git a/kopete/libkopete/ui/kopetelistviewitem.cpp b/kopete/libkopete/ui/kopetelistviewitem.cpp index fda2ff4c..888f9d5b 100644 --- a/kopete/libkopete/ui/kopetelistviewitem.cpp +++ b/kopete/libkopete/ui/kopetelistviewitem.cpp @@ -29,14 +29,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #ifdef HAVE_XRENDER # include @@ -54,7 +54,7 @@ namespace ListView { class ComponentBase::Private { public: - QPtrList components; + TQPtrList components; }; ComponentBase::ComponentBase() @@ -71,7 +71,7 @@ ComponentBase::~ComponentBase() uint ComponentBase::components() { return d->components.count(); } Component *ComponentBase::component( uint n ) { return d->components.at( n ); } -Component *ComponentBase::componentAt( const QPoint &pt ) +Component *ComponentBase::componentAt( const TQPoint &pt ) { for ( uint n = 0; n < components(); ++n ) { @@ -113,13 +113,13 @@ void ComponentBase::componentResized( Component * ) { } -std::pair ComponentBase::toolTip( const QPoint &relativePos ) +std::pair ComponentBase::toolTip( const TQPoint &relativePos ) { for ( uint n = 0; n < components(); ++n ) if ( component( n )->rect().contains( relativePos ) ) return component( n )->toolTip( relativePos ); - return std::make_pair( QString::null, QRect() ); + return std::make_pair( TQString::null, TQRect() ); } void ComponentBase::updateAnimationPosition( int p, int s ) @@ -127,9 +127,9 @@ void ComponentBase::updateAnimationPosition( int p, int s ) for ( uint n = 0; n < components(); ++n ) { Component *comp = component( n ); - QRect start = comp->startRect(); - QRect target = comp->targetRect(); - QRect rc( start.left() + ((target.left() - start.left()) * p) / s, + TQRect start = comp->startRect(); + TQRect target = comp->targetRect(); + TQRect rc( start.left() + ((target.left() - start.left()) * p) / s, start.top() + ((target.top() - start.top()) * p) / s, start.width() + ((target.width() - start.width()) * p) / s, start.height() + ((target.height() - start.height()) * p) / s ); @@ -150,8 +150,8 @@ public: { } ComponentBase *parent; - QRect rect; - QRect startRect, targetRect; + TQRect rect; + TQRect startRect, targetRect; int minWidth, minHeight; bool growHoriz, growVert; bool show; /** @since 23-03-2005 */ @@ -199,19 +199,19 @@ void Component::setToolTipSource( ToolTipSource *source ) d->tipSource = source; } -std::pair Component::toolTip( const QPoint &relativePos ) +std::pair Component::toolTip( const TQPoint &relativePos ) { if ( !d->tipSource ) return ComponentBase::toolTip( relativePos ); - QRect rc = rect(); - QString result = (*d->tipSource)( this, relativePos, rc ); + TQRect rc = rect(); + TQString result = (*d->tipSource)( this, relativePos, rc ); return std::make_pair(result, rc); } -QRect Component::rect() { return d->rect; } -QRect Component::startRect() { return d->startRect; } -QRect Component::targetRect() { return d->targetRect; } +TQRect Component::rect() { return d->rect; } +TQRect Component::startRect() { return d->startRect; } +TQRect Component::targetRect() { return d->targetRect; } int Component::minWidth() { return d->minWidth; } int Component::minHeight() { return d->minHeight; } @@ -235,22 +235,22 @@ bool Component::setMinHeight( int height ) return true; } -void Component::layout( const QRect &newRect ) +void Component::layout( const TQRect &newRect ) { if ( rect().isNull() ) - d->startRect = QRect( newRect.topLeft(), newRect.topLeft() ); + d->startRect = TQRect( newRect.topLeft(), newRect.topLeft() ); else d->startRect = rect(); d->targetRect = newRect; //kdDebug(14000) << k_funcinfo << "At " << rect << endl; } -void Component::setRect( const QRect &rect ) +void Component::setRect( const TQRect &rect ) { d->rect = rect; } -void Component::paint( QPainter *painter, const QColorGroup &cg ) +void Component::paint( TQPainter *painter, const TQColorGroup &cg ) { /*painter->setPen( Qt::red ); painter->drawRect( rect() );*/ @@ -378,7 +378,7 @@ void BoxComponent::calcMinSize() relayout(); } -void BoxComponent::layout( const QRect &rect ) +void BoxComponent::layout( const TQRect &rect ) { Component::layout( rect ); @@ -413,7 +413,7 @@ void BoxComponent::layout( const QRect &rect ) { Component *comp = component( n ); - QRect rc; + TQRect rc; if ( horiz ) { rc.setLeft( rect.left() + pos ); @@ -464,7 +464,7 @@ void BoxComponent::componentResized( Component *component ) class ImageComponent::Private { public: - QPixmap image; + TQPixmap image; }; ImageComponent::ImageComponent( ComponentBase *parent ) @@ -487,12 +487,12 @@ ImageComponent::~ImageComponent() delete d; } -QPixmap ImageComponent::pixmap() +TQPixmap ImageComponent::pixmap() { return d->image; } -void ImageComponent::setPixmap( const QPixmap &img, bool adjustSize) +void ImageComponent::setPixmap( const TQPixmap &img, bool adjustSize) { d->image = img; if ( adjustSize ) @@ -503,30 +503,30 @@ void ImageComponent::setPixmap( const QPixmap &img, bool adjustSize) repaint(); } -static QPoint operator+( const QPoint &pt, const QSize &sz ) +static TQPoint operator+( const TQPoint &pt, const TQSize &sz ) { - return QPoint( pt.x() + sz.width(), pt.y() + sz.height() ); + return TQPoint( pt.x() + sz.width(), pt.y() + sz.height() ); } -/*static QPoint operator+( const QSize &sz, const QPoint &pt ) +/*static TQPoint operator+( const TQSize &sz, const TQPoint &pt ) { return pt + sz; }*/ -void ImageComponent::paint( QPainter *painter, const QColorGroup & ) +void ImageComponent::paint( TQPainter *painter, const TQColorGroup & ) { - QRect ourRc = rect(); - QRect rc = d->image.rect(); + TQRect ourRc = rect(); + TQRect rc = d->image.rect(); // center rc within our rect rc.moveTopLeft( ourRc.topLeft() + (ourRc.size() - rc.size()) / 2 ); // paint, shrunk to be within our rect painter->drawPixmap( rc & ourRc, d->image ); } -void ImageComponent::scale( int w, int h, QImage::ScaleMode mode ) +void ImageComponent::scale( int w, int h, TQImage::ScaleMode mode ) { - QImage im = d->image.convertToImage(); - setPixmap( QPixmap( im.smoothScale( w, h, mode ) ) ); + TQImage im = d->image.convertToImage(); + setPixmap( TQPixmap( im.smoothScale( w, h, mode ) ) ); } // TextComponent @@ -534,13 +534,13 @@ class TextComponent::Private { public: Private() : customColor( false ) {} - QString text; + TQString text; bool customColor; - QColor color; - QFont font; + TQColor color; + TQFont font; }; -TextComponent::TextComponent( ComponentBase *parent, const QFont &font, const QString &text ) +TextComponent::TextComponent( ComponentBase *parent, const TQFont &font, const TQString &text ) : Component( parent ), d( new Private ) { setFont( font ); @@ -554,12 +554,12 @@ TextComponent::~TextComponent() delete d; } -QString TextComponent::text() +TQString TextComponent::text() { return d->text; } -void TextComponent::setText( const QString &text ) +void TextComponent::setText( const TQString &text ) { if ( text == d->text ) return; d->text = text; @@ -567,12 +567,12 @@ void TextComponent::setText( const QString &text ) calcMinSize(); } -QFont TextComponent::font() +TQFont TextComponent::font() { return d->font; } -void TextComponent::setFont( const QFont &font ) +void TextComponent::setFont( const TQFont &font ) { if ( font == d->font ) return; d->font = font; @@ -584,7 +584,7 @@ void TextComponent::calcMinSize() setMinWidth( 0 ); if ( !d->text.isEmpty() ) - setMinHeight( QFontMetrics( font() ).height() ); + setMinHeight( TQFontMetrics( font() ).height() ); else setMinHeight( 0 ); @@ -597,15 +597,15 @@ int TextComponent::widthForHeight( int ) // allegedly if this is not done the protocol icons overlap the text. // i however have never seen this problem (which would almost certainly // be a bug somewhere else). - return QFontMetrics( font() ).width( d->text ) + 2; + return TQFontMetrics( font() ).width( d->text ) + 2; } -QColor TextComponent::color() +TQColor TextComponent::color() { - return d->customColor ? d->color : QColor(); + return d->customColor ? d->color : TQColor(); } -void TextComponent::setColor( const QColor &color ) +void TextComponent::setColor( const TQColor &color ) { d->color = color; d->customColor = true; @@ -618,13 +618,13 @@ void TextComponent::setDefaultColor() repaint(); } -void TextComponent::paint( QPainter *painter, const QColorGroup &cg ) +void TextComponent::paint( TQPainter *painter, const TQColorGroup &cg ) { if ( d->customColor ) painter->setPen( d->color ); else painter->setPen( cg.text() ); - QString dispStr = KStringHandler::rPixelSqueeze( d->text, QFontMetrics( font() ), rect().width() ); + TQString dispStr = KStringHandler::rPixelSqueeze( d->text, TQFontMetrics( font() ), rect().width() ); painter->setFont( font() ); painter->drawText( rect(), Qt::SingleLine, dispStr ); } @@ -634,8 +634,8 @@ void TextComponent::paint( QPainter *painter, const QColorGroup &cg ) class DisplayNameComponent::Private { public: - QString text; - QFont font; + TQString text; + TQFont font; }; DisplayNameComponent::DisplayNameComponent( ComponentBase *parent ) @@ -650,12 +650,12 @@ DisplayNameComponent::~DisplayNameComponent() delete d; } -void DisplayNameComponent::layout( const QRect &rect ) +void DisplayNameComponent::layout( const TQRect &rect ) { Component::layout( rect ); // finally, lay everything out - QRect rc; + TQRect rc; int totalWidth = rect.width(); int usedWidth = 0; bool exceeded = false; @@ -671,7 +671,7 @@ void DisplayNameComponent::layout( const QRect &rect ) if ( comp->rtti() == Rtti_TextComponent ) { comp->show(); - comp->layout( QRect( usedWidth+ rect.left(), rect.top(), + comp->layout( TQRect( usedWidth+ rect.left(), rect.top(), totalWidth - usedWidth, comp->heightForWidth( totalWidth - usedWidth ) ) ); } else { @@ -681,7 +681,7 @@ void DisplayNameComponent::layout( const QRect &rect ) else { comp->show(); - comp->layout( QRect( usedWidth+ rect.left(), rect.top(), + comp->layout( TQRect( usedWidth+ rect.left(), rect.top(), comp->widthForHeight( rect.height() ), comp->heightForWidth( rect.width() ) ) ); } @@ -695,7 +695,7 @@ void DisplayNameComponent::layout( const QRect &rect ) } } -void DisplayNameComponent::setText( const QString& text ) +void DisplayNameComponent::setText( const TQString& text ) { if ( d->text == text ) return; @@ -706,15 +706,15 @@ void DisplayNameComponent::setText( const QString& text ) void DisplayNameComponent::redraw() { - QColor color; + TQColor color; for ( uint n = 0; n < components(); ++n ) if( component( n )->rtti() == Rtti_TextComponent ) { ((TextComponent*)component(n))->color(); } - QValueList tokens; - QValueList::const_iterator token; + TQValueList tokens; + TQValueList::const_iterator token; clear(); // clear childs @@ -722,7 +722,7 @@ void DisplayNameComponent::redraw() ImageComponent *ic; TextComponent *t; - QFontMetrics fontMetrics( d->font ); + TQFontMetrics fontMetrics( d->font ); int fontHeight = fontMetrics.height(); for ( token = tokens.begin(); token != tokens.end(); ++token ) { @@ -733,8 +733,8 @@ void DisplayNameComponent::redraw() break; case Kopete::Emoticons::Image: ic = new ImageComponent( this ); - ic->setPixmap( QPixmap( (*token).picPath ) ); - ic->scale( INT_MAX, fontHeight, QImage::ScaleMin ); + ic->setPixmap( TQPixmap( (*token).picPath ) ); + ic->scale( INT_MAX, fontHeight, TQImage::ScaleMin ); break; default: kdDebug( 14010 ) << k_funcinfo << "This should have not happened!" << endl; @@ -745,7 +745,7 @@ void DisplayNameComponent::redraw() setColor( color ); } -void DisplayNameComponent::setFont( const QFont& font ) +void DisplayNameComponent::setFont( const TQFont& font ) { for ( uint n = 0; n < components(); ++n ) if( component( n )->rtti() == Rtti_TextComponent ) @@ -753,7 +753,7 @@ void DisplayNameComponent::setFont( const QFont& font ) d->font = font; } -void DisplayNameComponent::setColor( const QColor& color ) +void DisplayNameComponent::setColor( const TQColor& color ) { for ( uint n = 0; n < components(); ++n ) if( component( n )->rtti() == Rtti_TextComponent ) @@ -767,7 +767,7 @@ void DisplayNameComponent::setDefaultColor() ((TextComponent*)component(n))->setDefaultColor(); } -QString DisplayNameComponent::text() +TQString DisplayNameComponent::text() { return d->text; } @@ -835,7 +835,7 @@ Kopete::Contact *ContactComponent::contact() } // we don't need to use a tooltip source here - this way is simpler -std::pair ContactComponent::toolTip( const QPoint &/*relativePos*/ ) +std::pair ContactComponent::toolTip( const TQPoint &/*relativePos*/ ) { return std::make_pair(d->contact->toolTip(),rect()); } @@ -860,16 +860,16 @@ class SharedTimer : private QTimer int users; public: SharedTimer( int period ) : period(period), users(0) {} - void attach( QObject *target, const char *slot ) + void attach( TQObject *target, const char *slot ) { - connect( this, SIGNAL(timeout()), target, slot ); + connect( this, TQT_SIGNAL(timeout()), target, slot ); if( users++ == 0 ) start( period ); //kdDebug(14000) << "SharedTimer::attach: users is now " << users << "\n"; } - void detach( QObject *target, const char *slot ) + void detach( TQObject *target, const char *slot ) { - disconnect( this, SIGNAL(timeout()), target, slot ); + disconnect( this, TQT_SIGNAL(timeout()), target, slot ); if( --users == 0 ) stop(); //kdDebug(14000) << "SharedTimer::detach: users is now " << users << "\n"; @@ -879,11 +879,11 @@ public: class SharedTimerRef { SharedTimer &timer; - QObject * const object; + TQObject * const object; const char * const slot; bool attached; public: - SharedTimerRef( SharedTimer &timer, QObject *obj, const char *slot ) + SharedTimerRef( SharedTimer &timer, TQObject *obj, const char *slot ) : timer(timer), object(obj), slot(slot), attached(false) { } @@ -909,16 +909,16 @@ class Item::Private { public: Private( Item *item ) - : layoutAnimateTimer( theLayoutAnimateTimer(), item, SLOT( slotLayoutAnimateItems() ) ) + : layoutAnimateTimer( theLayoutAnimateTimer(), item, TQT_SLOT( slotLayoutAnimateItems() ) ) , animateLayout( true ), opacity( 1.0 ) - , visibilityTimer( theVisibilityTimer(), item, SLOT( slotUpdateVisibility() ) ) + , visibilityTimer( theVisibilityTimer(), item, TQT_SLOT( slotUpdateVisibility() ) ) , visibilityLevel( 0 ), visibilityTarget( false ), searchMatch( true ) { } - QTimer layoutTimer; + TQTimer layoutTimer; - //QTimer layoutAnimateTimer; + //TQTimer layoutAnimateTimer; SharedTimerRef layoutAnimateTimer; SharedTimer &theLayoutAnimateTimer() { @@ -932,7 +932,7 @@ public: float opacity; - //QTimer visibilityTimer; + //TQTimer visibilityTimer; SharedTimerRef visibilityTimer; SharedTimer &theVisibilityTimer() { @@ -961,14 +961,14 @@ bool Item::Private::animateChanges = true; bool Item::Private::fadeVisibility = true; bool Item::Private::foldVisibility = true; -Item::Item( QListViewItem *parent, QObject *owner, const char *name ) - : QObject( owner, name ), KListViewItem( parent ), d( new Private(this) ) +Item::Item( TQListViewItem *parent, TQObject *owner, const char *name ) + : TQObject( owner, name ), KListViewItem( parent ), d( new Private(this) ) { initLVI(); } -Item::Item( QListView *parent, QObject *owner, const char *name ) - : QObject( owner, name ), KListViewItem( parent ), d( new Private(this) ) +Item::Item( TQListView *parent, TQObject *owner, const char *name ) + : TQObject( owner, name ), KListViewItem( parent ), d( new Private(this) ) { initLVI(); } @@ -987,10 +987,10 @@ void Item::setEffects( bool animation, bool fading, bool folding ) void Item::initLVI() { - connect( listView()->header(), SIGNAL( sizeChange( int, int, int ) ), SLOT( slotColumnResized() ) ); - connect( &d->layoutTimer, SIGNAL( timeout() ), SLOT( slotLayoutItems() ) ); - //connect( &d->layoutAnimateTimer, SIGNAL( timeout() ), SLOT( slotLayoutAnimateItems() ) ); - //connect( &d->visibilityTimer, SIGNAL( timeout() ), SLOT( slotUpdateVisibility() ) ); + connect( listView()->header(), TQT_SIGNAL( sizeChange( int, int, int ) ), TQT_SLOT( slotColumnResized() ) ); + connect( &d->layoutTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotLayoutItems() ) ); + //connect( &d->layoutAnimateTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotLayoutAnimateItems() ) ); + //connect( &d->visibilityTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotUpdateVisibility() ) ); setVisible( false ); setTargetVisibility( true ); } @@ -1023,7 +1023,7 @@ void Item::slotLayoutItems() } int height = component( n )->heightForWidth( width ); - component( n )->layout( QRect( 0, 0, width, height ) ); + component( n )->layout( TQRect( 0, 0, width, height ) ); //kdDebug(14000) << k_funcinfo << "Component " << n << " is " << width << " x " << height << endl; } @@ -1169,62 +1169,62 @@ void Item::setHeight( int ) KListViewItem::setHeight( minHeight ); } -int Item::width( const QFontMetrics &, const QListView *lv, int c ) const +int Item::width( const TQFontMetrics &, const TQListView *lv, int c ) const { // Qt computes the itemRect from this. we want the whole item to be // clickable, so we return the widest we could possibly be. return lv->header()->sectionSize( c ); } -void Item::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ) +void Item::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) { - QPixmap back( width, height() ); - QPainter paint( &back ); + TQPixmap back( width, height() ); + TQPainter paint( &back ); //KListViewItem::paintCell( &paint, cg, column, width, align ); // PASTED FROM KLISTVIEWITEM: // set the alternate cell background colour if necessary - QColorGroup _cg = cg; + TQColorGroup _cg = cg; if (isAlternate()) if (listView()->viewport()->backgroundMode()==Qt::FixedColor) - _cg.setColor(QColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground()); + _cg.setColor(TQColorGroup::Background, static_cast< KListView* >(listView())->alternateBackground()); else - _cg.setColor(QColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground()); + _cg.setColor(TQColorGroup::Base, static_cast< KListView* >(listView())->alternateBackground()); // PASTED FROM QLISTVIEWITEM { - QPainter *p = &paint; + TQPainter *p = &paint; - QListView *lv = listView(); + TQListView *lv = listView(); if ( !lv ) return; - QFontMetrics fm( p->fontMetrics() ); + TQFontMetrics fm( p->fontMetrics() ); // any text we render is done by the Components, not by this class, so make sure we've nothing to write - QString t; + TQString t; // removed text truncating code from Qt - we do that differently, further on int marg = lv->itemMargin(); int r = marg; - // const QPixmap * icon = pixmap( column ); + // const TQPixmap * icon = pixmap( column ); 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 { - // all copied from QListView::paintEmptyArea + // all copied from TQListView::paintEmptyArea - //lv->paintEmptyArea( p, QRect( 0, 0, width, height() ) ); - QStyleOption opt( lv->sortColumn(), 0 ); // ### hack; in 3.1, add a property in QListView and QHeader - QStyle::SFlags how = QStyle::Style_Default; + //lv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) ); + TQStyleOption opt( lv->sortColumn(), 0 ); // ### hack; in 3.1, add a property in TQListView and QHeader + TQStyle::SFlags how = TQStyle::Style_Default; if ( lv->isEnabled() ) - how |= QStyle::Style_Enabled; + how |= TQStyle::Style_Enabled; - lv->style().drawComplexControl( QStyle::CC_ListView, - p, lv, QRect( 0, 0, width, height() ), lv->colorGroup(), - how, QStyle::SC_ListView, QStyle::SC_None, + lv->style().drawComplexControl( TQStyle::CC_ListView, + p, lv, TQRect( 0, 0, width, height() ), lv->colorGroup(), + how, TQStyle::SC_ListView, TQStyle::SC_None, opt ); } @@ -1233,7 +1233,7 @@ void Item::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, if ( isSelected() && (column == 0 || lv->allColumnsShowFocus()) ) { p->fillRect( r - marg, 0, width - r + marg, height(), - _cg.brush( QColorGroup::Highlight ) ); + _cg.brush( TQColorGroup::Highlight ) ); // removed text pen setting code from Qt } @@ -1242,16 +1242,16 @@ void Item::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, // draw the tree gubbins if ( multiLinesEnabled() && column == 0 && isOpen() && childCount() ) { int textheight = fm.size( align, t ).height() + 2 * lv->itemMargin(); - textheight = QMAX( textheight, QApplication::globalStrut().height() ); + textheight = QMAX( textheight, TQApplication::globalStrut().height() ); if ( textheight % 2 > 0 ) textheight++; if ( textheight < height() ) { int w = lv->treeStepSize() / 2; - lv->style().drawComplexControl( QStyle::CC_ListView, p, lv, - QRect( 0, textheight, w + 1, height() - textheight + 1 ), _cg, - lv->isEnabled() ? QStyle::Style_Enabled : QStyle::Style_Default, - QStyle::SC_ListViewExpand, - (uint)QStyle::SC_All, QStyleOption( this ) ); + lv->style().drawComplexControl( TQStyle::CC_ListView, p, lv, + TQRect( 0, textheight, w + 1, height() - textheight + 1 ), _cg, + lv->isEnabled() ? TQStyle::Style_Enabled : TQStyle::Style_Default, + TQStyle::SC_ListViewExpand, + (uint)TQStyle::SC_All, TQStyleOption( this ) ); } } } @@ -1260,14 +1260,14 @@ void Item::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, //do you see a better way to tell the TextComponent we are selected ? - Olivier 2004-09-02 if ( isSelected() ) - _cg.setColor(QColorGroup::Text , _cg.highlightedText() ); + _cg.setColor(TQColorGroup::Text , _cg.highlightedText() ); if ( Component *comp = component( column ) ) comp->paint( &paint, _cg ); paint.end(); #ifdef HAVE_XRENDER - QColor rgb = cg.base();//backgroundColor(); + TQColor rgb = cg.base();//backgroundColor(); float opac = 1.0; if ( d->visibilityTimer.isActive() && Private::fadeVisibility ) { diff --git a/kopete/libkopete/ui/kopetelistviewitem.h b/kopete/libkopete/ui/kopetelistviewitem.h index 5952c569..e57482d0 100644 --- a/kopete/libkopete/ui/kopetelistviewitem.h +++ b/kopete/libkopete/ui/kopetelistviewitem.h @@ -23,7 +23,7 @@ #include #include -#include +#include class QPixmap; @@ -41,7 +41,7 @@ public: uint components(); Component *component( uint n ); - Component *componentAt( const QPoint &pt ); + Component *componentAt( const TQPoint &pt ); /** Repaint this item */ virtual void repaint() = 0; @@ -55,7 +55,7 @@ public: * @return a pair where the first element is the tooltip, and the second is * the rectangle within the item for which the tip should be displayed. */ - virtual std::pair toolTip( const QPoint &relativePos ); + virtual std::pair toolTip( const TQPoint &relativePos ); protected: /** A child item has been added to this item */ @@ -91,7 +91,7 @@ public: * @param rect The tip will be removed when the mouse leaves this rect. * Will initially be set to \p component's rect(). */ - virtual QString operator() ( ComponentBase *component, const QPoint &pt, QRect &rect ) = 0; + virtual TQString operator() ( ComponentBase *component, const TQPoint &pt, TQRect &rect ) = 0; }; /** @@ -112,13 +112,13 @@ public: * @param rect the new rectangle this component will paint in, relative to the painter * passed to the paint() function by the parent item. */ - virtual void layout( const QRect &rect ); + virtual void layout( const TQRect &rect ); /** * Paint this item, inside the rectangle returned by rect(). * The default implementation calls paint on all children. */ - virtual void paint( QPainter *painter, const QColorGroup &cg ); + virtual void paint( TQPainter *painter, const TQColorGroup &cg ); void repaint(); void relayout(); @@ -126,7 +126,7 @@ public: /** * @return the rect this component was allocated last time it was laid out */ - QRect rect(); + TQRect rect(); /** * Prevents this component to be drawn */ @@ -177,7 +177,7 @@ public: * @return a pair where the first element is the tooltip, and the second is * the rectangle within the item for which the tip should be displayed. */ - std::pair toolTip( const QPoint &relativePos ); + std::pair toolTip( const TQPoint &relativePos ); /** * RTTI: Runtime Type Information @@ -221,9 +221,9 @@ private: friend void ComponentBase::updateAnimationPosition( int p, int s ); // used for animation - void setRect( const QRect &rect ); - QRect startRect(); - QRect targetRect(); + void setRect( const TQRect &rect ); + TQRect startRect(); + TQRect targetRect(); class Private; Private *d; @@ -236,7 +236,7 @@ public: BoxComponent( ComponentBase *parent, Direction dir = Horizontal ); ~BoxComponent(); - void layout( const QRect &rect ); + void layout( const TQRect &rect ); virtual int widthForHeight( int height ); virtual int heightForWidth( int width ); @@ -259,22 +259,22 @@ private: class TextComponent : public Component { public: - TextComponent( ComponentBase *parent, const QFont &font = QFont(), const QString &text = QString::null ); + TextComponent( ComponentBase *parent, const TQFont &font = TQFont(), const TQString &text = TQString::null ); ~TextComponent(); - QString text(); - void setText( const QString &text ); + TQString text(); + void setText( const TQString &text ); - QFont font(); - void setFont( const QFont &font ); + TQFont font(); + void setFont( const TQFont &font ); - QColor color(); - void setColor( const QColor &color ); + TQColor color(); + void setColor( const TQColor &color ); void setDefaultColor(); int widthForHeight( int ); - void paint( QPainter *painter, const QColorGroup &cg ); + void paint( TQPainter *painter, const TQColorGroup &cg ); static int RTTI; virtual int rtti() const { return RTTI; } @@ -293,12 +293,12 @@ public: ImageComponent( ComponentBase *parent, int minW, int minH ); ~ImageComponent(); - void setPixmap( const QPixmap &img, bool adjustSize = true); - QPixmap pixmap( void ); + void setPixmap( const TQPixmap &img, bool adjustSize = true); + TQPixmap pixmap( void ); - void paint( QPainter *painter, const QColorGroup &cg ); + void paint( TQPainter *painter, const TQColorGroup &cg ); - void scale( int w, int h, QImage::ScaleMode ); + void scale( int w, int h, TQImage::ScaleMode ); static int RTTI; virtual int rtti() const { return RTTI; } private: @@ -316,7 +316,7 @@ public: ~ContactComponent(); void updatePixmap(); Kopete::Contact *contact(); - std::pair toolTip( const QPoint &relativePos ); + std::pair toolTip( const TQPoint &relativePos ); protected: class Private; Private *d; @@ -347,12 +347,12 @@ public: * Dtor */ ~DisplayNameComponent(); - void layout( const QRect& rect ); + void layout( const TQRect& rect ); - QString text(); - void setText( const QString& text ); - void setFont( const QFont& font ); - void setColor( const QColor& color ); + TQString text(); + void setText( const TQString& text ); + void setFont( const TQFont& font ); + void setColor( const TQColor& color ); void setDefaultColor(); static int RTTI; virtual int rtti() const { return RTTI; } @@ -392,19 +392,19 @@ public: * * @author Richard Smith */ -class Item : public QObject, public KListViewItem, public ComponentBase +class Item : public TQObject, public KListViewItem, public ComponentBase { Q_OBJECT public: - Item( QListView *parent, QObject *owner = 0, const char *name = 0 ); - Item( QListViewItem *parent, QObject *owner = 0, const char *name = 0 ); + Item( TQListView *parent, TQObject *owner = 0, const char *name = 0 ); + Item( TQListViewItem *parent, TQObject *owner = 0, const char *name = 0 ); ~Item(); void repaint(); void relayout(); void setup(); - virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int align ); + virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ); //TODO: startRename(...) float opacity(); @@ -421,7 +421,7 @@ public: */ static void setEffects( bool animation, bool fading, bool folding ); - int width( const QFontMetrics & fm, const QListView * lv, int c ) const; + int width( const TQFontMetrics & fm, const TQListView * lv, int c ) const; /** * Show or hide this item in a clean way depending on whether it matches diff --git a/kopete/libkopete/ui/kopetelistviewsearchline.cpp b/kopete/libkopete/ui/kopetelistviewsearchline.cpp index a71d86c0..edb63ffc 100644 --- a/kopete/libkopete/ui/kopetelistviewsearchline.cpp +++ b/kopete/libkopete/ui/kopetelistviewsearchline.cpp @@ -24,12 +24,12 @@ namespace Kopete { namespace UI { namespace ListView { -SearchLine::SearchLine( QWidget *parent, ListView *listView, const char *name ) +SearchLine::SearchLine( TQWidget *parent, ListView *listView, const char *name ) : KListViewSearchLine( parent, listView, name ) { } -SearchLine::SearchLine(QWidget *parent, const char *name) +SearchLine::SearchLine(TQWidget *parent, const char *name) : KListViewSearchLine( parent, 0, name ) { } @@ -39,7 +39,7 @@ SearchLine::~SearchLine() } -void SearchLine::updateSearch( const QString &s ) +void SearchLine::updateSearch( const TQString &s ) { // we copy a huge chunk of code here simply in order to override // the way items are shown/hidden. KSearchLine rudely @@ -54,7 +54,7 @@ void SearchLine::updateSearch( const QString &s ) // If there's a selected item that is visible, make sure that it's visible // when the search changes too (assuming that it still matches). - QListViewItem *currentItem = 0; + TQListViewItem *currentItem = 0; switch( listView()->selectionMode() ) { @@ -64,7 +64,7 @@ void SearchLine::updateSearch( const QString &s ) currentItem = listView()->selectedItem(); break; default: - for( QListViewItemIterator it(listView(), QListViewItemIterator::Selected | QListViewItemIterator::Visible); + for( TQListViewItemIterator it(listView(), TQListViewItemIterator::Selected | TQListViewItemIterator::Visible); it.current() && !currentItem; ++it ) { if( listView()->itemRect( it.current() ).isValid() ) @@ -85,10 +85,10 @@ void SearchLine::updateSearch( const QString &s ) void SearchLine::checkItemParentsNotVisible() { //BEGIN code from KSearchLine::checkItemParentsNotVisible - QListViewItemIterator it( listView() ); + TQListViewItemIterator it( listView() ); for( ; it.current(); ++it ) { - QListViewItem *item = it.current(); + TQListViewItem *item = it.current(); if( itemMatches( item, search ) ) setItemVisible( item, true ); else @@ -97,7 +97,7 @@ void SearchLine::checkItemParentsNotVisible() //END code from KSearchLine::checkItemParentsNotVisible } -bool SearchLine::checkItemParentsVisible( QListViewItem *item ) +bool SearchLine::checkItemParentsVisible( TQListViewItem *item ) { //BEGIN code from KSearchLine::checkItemParentsVisible bool visible = false; @@ -123,7 +123,7 @@ bool SearchLine::checkItemParentsVisible( QListViewItem *item ) //END code from KSearchLine::checkItemParentsVisible } -void SearchLine::setItemVisible( QListViewItem *it, bool b ) +void SearchLine::setItemVisible( TQListViewItem *it, bool b ) { if( Item *item = dynamic_cast( it ) ) item->setSearchMatch( b ); diff --git a/kopete/libkopete/ui/kopetelistviewsearchline.h b/kopete/libkopete/ui/kopetelistviewsearchline.h index a453b844..be7fc317 100644 --- a/kopete/libkopete/ui/kopetelistviewsearchline.h +++ b/kopete/libkopete/ui/kopetelistviewsearchline.h @@ -37,26 +37,26 @@ public: * If \a listView is null then the widget will be disabled until a listview * is set with setListView(). */ - SearchLine( QWidget *parent, ListView *listView = 0, const char *name = 0 ); + SearchLine( TQWidget *parent, ListView *listView = 0, const char *name = 0 ); /** * Constructs a SearchLine without any ListView to filter. The * KListView object has to be set later with setListView(). */ - SearchLine(QWidget *parent, const char *name); + SearchLine(TQWidget *parent, const char *name); /** * Destroys the SearchLine. */ ~SearchLine(); - void updateSearch( const QString &s ); + void updateSearch( const TQString &s ); protected: virtual void checkItemParentsNotVisible(); - virtual bool checkItemParentsVisible( QListViewItem *it ); - virtual void setItemVisible( QListViewItem *it, bool visible ); + virtual bool checkItemParentsVisible( TQListViewItem *it ); + virtual void setItemVisible( TQListViewItem *it, bool visible ); private: - QString search; + TQString search; }; } // end namespace ListView diff --git a/kopete/libkopete/ui/kopetepasswordwidget.cpp b/kopete/libkopete/ui/kopetepasswordwidget.cpp index 2345f103..52921b16 100644 --- a/kopete/libkopete/ui/kopetepasswordwidget.cpp +++ b/kopete/libkopete/ui/kopetepasswordwidget.cpp @@ -20,7 +20,7 @@ #include -#include +#include class Kopete::UI::PasswordWidget::Private { @@ -28,7 +28,7 @@ public: uint maxLength; }; -Kopete::UI::PasswordWidget::PasswordWidget( QWidget *parent, const char *name, Kopete::Password *from ) +Kopete::UI::PasswordWidget::PasswordWidget( TQWidget *parent, const char *name, Kopete::Password *from ) : KopetePasswordWidgetBase( parent, name ), d( new Private ) { load( from ); @@ -41,15 +41,15 @@ Kopete::UI::PasswordWidget::~PasswordWidget() void Kopete::UI::PasswordWidget::load( Kopete::Password *source ) { - disconnect( mRemembered, SIGNAL( stateChanged( int ) ), this, SLOT( slotRememberChanged() ) ); - disconnect( mPassword, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) ); - disconnect( mRemembered, SIGNAL( stateChanged( int ) ), this, SIGNAL( changed() ) ); + disconnect( mRemembered, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotRememberChanged() ) ); + disconnect( mPassword, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) ); + disconnect( mRemembered, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SIGNAL( changed() ) ); if ( source && source->remembered() ) { mRemembered->setTristate(); mRemembered->setNoChange(); - source->requestWithoutPrompt( this, SLOT( receivePassword( const QString & ) ) ); + source->requestWithoutPrompt( this, TQT_SLOT( receivePassword( const TQString & ) ) ); } else { @@ -64,9 +64,9 @@ void Kopete::UI::PasswordWidget::load( Kopete::Password *source ) mPassword->setEnabled( false ); - connect( mRemembered, SIGNAL( stateChanged( int ) ), this, SLOT( slotRememberChanged() ) ); - connect( mPassword, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) ); - connect( mRemembered, SIGNAL( stateChanged( int ) ), this, SIGNAL( changed() ) ); + connect( mRemembered, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotRememberChanged() ) ); + connect( mPassword, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) ); + connect( mRemembered, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SIGNAL( changed() ) ); emit changed(); } @@ -77,11 +77,11 @@ void Kopete::UI::PasswordWidget::slotRememberChanged() mPassword->setEnabled( mRemembered->isChecked() ); } -void Kopete::UI::PasswordWidget::receivePassword( const QString &pwd ) +void Kopete::UI::PasswordWidget::receivePassword( const TQString &pwd ) { // pwd == null could mean user declined to open wallet // don't uncheck the remembered field in this case. - if ( !pwd.isNull() && mRemembered->state() == QButton::NoChange ) + if ( !pwd.isNull() && mRemembered->state() == TQButton::NoChange ) { mRemembered->setChecked( true ); setPassword( pwd ); @@ -90,7 +90,7 @@ void Kopete::UI::PasswordWidget::receivePassword( const QString &pwd ) void Kopete::UI::PasswordWidget::save( Kopete::Password *target ) { - if ( !target || mRemembered->state() == QButton::NoChange ) + if ( !target || mRemembered->state() == TQButton::NoChange ) return; if ( mRemembered->isChecked() ) @@ -106,17 +106,17 @@ bool Kopete::UI::PasswordWidget::validate() return password().length() <= d->maxLength; } -QString Kopete::UI::PasswordWidget::password() const +TQString Kopete::UI::PasswordWidget::password() const { - return QString::fromLocal8Bit( mPassword->password() ); + return TQString::fromLocal8Bit( mPassword->password() ); } bool Kopete::UI::PasswordWidget::remember() const { - return mRemembered->state() == QButton::On; + return mRemembered->state() == TQButton::On; } -void Kopete::UI::PasswordWidget::setPassword( const QString &pass ) +void Kopete::UI::PasswordWidget::setPassword( const TQString &pass ) { // switch out of 'waiting for wallet' mode if we're in it mRemembered->setTristate( false ); diff --git a/kopete/libkopete/ui/kopetepasswordwidget.h b/kopete/libkopete/ui/kopetepasswordwidget.h index b1c51a39..72834bff 100644 --- a/kopete/libkopete/ui/kopetepasswordwidget.h +++ b/kopete/libkopete/ui/kopetepasswordwidget.h @@ -45,7 +45,7 @@ public: * @param name The name of this QObject * @param from The password to load the data for this widget from, or 0 if none */ - PasswordWidget( QWidget *parent, const char *name = 0, Kopete::Password *from = 0 ); + PasswordWidget( TQWidget *parent, const char *name = 0, Kopete::Password *from = 0 ); ~PasswordWidget(); /** @@ -67,7 +67,7 @@ public: /** * Returns the string currently in the input box in the widget */ - QString password() const; + TQString password() const; /** * Returns a boolean indicating whether the Remember Password checkbox is checked. * Result is undefined if the Remember Password field is in the 'no change' state @@ -79,7 +79,7 @@ public: * Set the password stored in the widget. * @param pass The text to place in the password field. */ - void setPassword( const QString &pass ); + void setPassword( const TQString &pass ); signals: /** @@ -89,7 +89,7 @@ signals: public slots: /** @internal */ - void receivePassword( const QString & ); + void receivePassword( const TQString & ); private slots: void slotRememberChanged(); diff --git a/kopete/libkopete/ui/kopetestdaction.cpp b/kopete/libkopete/ui/kopetestdaction.cpp index e6731485..f1595f4e 100644 --- a/kopete/libkopete/ui/kopetestdaction.cpp +++ b/kopete/libkopete/ui/kopetestdaction.cpp @@ -18,7 +18,7 @@ #include "kopetestdaction.h" -#include +#include #include #include @@ -41,10 +41,10 @@ KopetePreferencesAction::KopetePreferencesAction( KActionCollection *parent, con : KAction( KStdGuiItem::configure(), 0, 0, 0, parent, name ) #else : KAction( KGuiItem( i18n( "&Configure Kopete..." ), - QString::fromLatin1( "configure" ) ), 0, 0, 0, parent, name ) + TQString::fromLatin1( "configure" ) ), 0, 0, 0, parent, name ) #endif { - connect( this, SIGNAL( activated() ), this, SLOT( slotShowPreferences() ) ); + connect( this, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotShowPreferences() ) ); } KopetePreferencesAction::~KopetePreferencesAction() @@ -68,59 +68,59 @@ KAction * KopeteStdAction::preferences( KActionCollection *parent, const char *n return new KopetePreferencesAction( parent, name ); } -KAction * KopeteStdAction::chat( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::chat( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Start &Chat..." ), QString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Start &Chat..." ), TQString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::sendMessage( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::sendMessage( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "&Send Single Message..." ), QString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "&Send Single Message..." ), TQString::fromLatin1( "mail_generic" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::contactInfo( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::contactInfo( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "User &Info" ), QString::fromLatin1( "messagebox_info" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "User &Info" ), TQString::fromLatin1( "messagebox_info" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::sendFile( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::sendFile( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Send &File..." ), QString::fromLatin1( "attach" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Send &File..." ), TQString::fromLatin1( "attach" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::viewHistory( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::viewHistory( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "View &History..." ), QString::fromLatin1( "history" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "View &History..." ), TQString::fromLatin1( "history" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::addGroup( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::addGroup( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "&Create Group..." ), QString::fromLatin1( "folder" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "&Create Group..." ), TQString::fromLatin1( "folder" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::changeMetaContact( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::changeMetaContact( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Cha&nge Meta Contact..." ), QString::fromLatin1( "move" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Cha&nge Meta Contact..." ), TQString::fromLatin1( "move" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::deleteContact( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::deleteContact( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "&Delete Contact" ), QString::fromLatin1( "delete_user" ), Qt::Key_Delete, recvr, slot, parent, name ); + return new KAction( i18n( "&Delete Contact" ), TQString::fromLatin1( "delete_user" ), Qt::Key_Delete, recvr, slot, parent, name ); } -KAction * KopeteStdAction::changeAlias( const QObject *recvr, const char *slot, QObject *parent, const char *name ) +KAction * KopeteStdAction::changeAlias( const TQObject *recvr, const char *slot, TQObject *parent, const char *name ) { - return new KAction( i18n( "Change A&lias..." ), QString::fromLatin1( "signature" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Change A&lias..." ), TQString::fromLatin1( "signature" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::blockContact( const QObject *recvr, const char *slot, QObject* parent, const char *name ) +KAction * KopeteStdAction::blockContact( const TQObject *recvr, const char *slot, TQObject* parent, const char *name ) { - return new KAction( i18n( "&Block Contact" ), QString::fromLatin1( "player_pause" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "&Block Contact" ), TQString::fromLatin1( "player_pause" ), 0, recvr, slot, parent, name ); } -KAction * KopeteStdAction::unblockContact( const QObject *recvr, const char *slot, QObject* parent, const char *name ) +KAction * KopeteStdAction::unblockContact( const TQObject *recvr, const char *slot, TQObject* parent, const char *name ) { - return new KAction( i18n( "Un&block Contact" ), QString::fromLatin1( "player_play" ), 0, recvr, slot, parent, name ); + return new KAction( i18n( "Un&block Contact" ), TQString::fromLatin1( "player_play" ), 0, recvr, slot, parent, name ); } #include "kopetestdaction.moc" diff --git a/kopete/libkopete/ui/kopetestdaction.h b/kopete/libkopete/ui/kopetestdaction.h index 8f06d296..bd323943 100644 --- a/kopete/libkopete/ui/kopetestdaction.h +++ b/kopete/libkopete/ui/kopetestdaction.h @@ -21,7 +21,7 @@ #undef KDE_NO_COMPAT #include -#include +#include #include "kopete_export.h" @@ -34,58 +34,58 @@ public: /** * Standard action to start a chat */ - static KAction *chat( const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0 ); + static KAction *chat( const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0 ); /** * Standard action to send a single message */ - static KAction *sendMessage(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *sendMessage(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to open a user info dialog */ - static KAction *contactInfo(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *contactInfo(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to open a history dialog or something similar */ - static KAction *viewHistory(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *viewHistory(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to initiate sending a file to a contact */ - static KAction *sendFile(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *sendFile(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to change a contacts @ref Kopete::MetaContact */ - static KAction *changeMetaContact(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *changeMetaContact(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to add a group */ - static KAction *addGroup(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *addGroup(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to delete a contact */ - static KAction *deleteContact(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *deleteContact(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to change a contact alias/nickname in your contactlist */ - static KAction *changeAlias(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *changeAlias(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to block a contact */ - static KAction *blockContact(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *blockContact(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Standard action to unblock a contact */ - static KAction *unblockContact(const QObject *recvr, const char *slot, - QObject* parent, const char *name = 0); + static KAction *unblockContact(const TQObject *recvr, const char *slot, + TQObject* parent, const char *name = 0); /** * Return an action to change the Kopete preferences. diff --git a/kopete/libkopete/ui/kopeteview.cpp b/kopete/libkopete/ui/kopeteview.cpp index 91f1fa9c..111f1405 100644 --- a/kopete/libkopete/ui/kopeteview.cpp +++ b/kopete/libkopete/ui/kopeteview.cpp @@ -32,9 +32,9 @@ void KopeteView::clear() //Do nothing } -void KopeteView::appendMessages(QValueList msgs) +void KopeteView::appendMessages(TQValueList msgs) { - QValueList::iterator it; + TQValueList::iterator it; for ( it = msgs.begin(); it != msgs.end(); ++it ) { appendMessage(*it); diff --git a/kopete/libkopete/ui/kopeteview.h b/kopete/libkopete/ui/kopeteview.h index 47320546..c54b1dba 100644 --- a/kopete/libkopete/ui/kopeteview.h +++ b/kopete/libkopete/ui/kopeteview.h @@ -20,7 +20,7 @@ #define KOPETEVIEW_H #include "kopetemessage.h" -#include +#include #include "kopete_export.h" namespace Kopete @@ -79,7 +79,7 @@ class KOPETE_EXPORT KopeteView * * The default implementation just call @ref appendMessage() X times */ - virtual void appendMessages( QValueList ); + virtual void appendMessages( TQValueList ); /** * @brief Raises the view above other windows @@ -115,12 +115,12 @@ class KOPETE_EXPORT KopeteView * * Can be reimplemented to return this if derived object is a widget */ - virtual QWidget *mainWidget() = 0; + virtual TQWidget *mainWidget() = 0; /** * @brief Inform the view the message was sent successfully * - * This should be reimplemented as a SLOT in any derived objects + * This should be reimplemented as a TQT_SLOT in any derived objects */ virtual void messageSentSuccessfully() = 0; @@ -135,10 +135,10 @@ class KOPETE_EXPORT KopeteView * A view does not need to implement this method unless they have context * menus that can be extended * - * @param target A target QObject for the contextMenuEvent signal of the view - * @param slot A slot that matches the signature ( QString&, KPopupMenu *) + * @param target A target TQObject for the contextMenuEvent signal of the view + * @param slot A slot that matches the signature ( TQString&, KPopupMenu *) */ - virtual void registerContextMenuHandler( QObject *target, const char*slot ){ Q_UNUSED(target); Q_UNUSED(slot); }; + virtual void registerContextMenuHandler( TQObject *target, const char*slot ){ Q_UNUSED(target); Q_UNUSED(slot); }; /** * @brief Register a handler for the tooltip @@ -151,10 +151,10 @@ class KOPETE_EXPORT KopeteView * A view does not need to impliment this method unless it has the ability * to show tooltips * - * @param target A target QObject for the contextMenuEvent signal of the view - * @param slot A slot that matches the signature ( QString&, KPopupMenu *) + * @param target A target TQObject for the contextMenuEvent signal of the view + * @param slot A slot that matches the signature ( TQString&, KPopupMenu *) */ - virtual void registerTooltipHandler( QObject *target, const char*slot ){ Q_UNUSED(target); Q_UNUSED(slot); }; + virtual void registerTooltipHandler( TQObject *target, const char*slot ){ Q_UNUSED(target); Q_UNUSED(slot); }; /** * @brief Returns the Kopete::ViewPlugin responsible for this view diff --git a/kopete/libkopete/ui/kopeteviewplugin.cpp b/kopete/libkopete/ui/kopeteviewplugin.cpp index b358e547..843fe939 100644 --- a/kopete/libkopete/ui/kopeteviewplugin.cpp +++ b/kopete/libkopete/ui/kopeteviewplugin.cpp @@ -16,7 +16,7 @@ #include "kopeteviewplugin.h" -Kopete::ViewPlugin::ViewPlugin( KInstance *instance, QObject *parent, const char *name ) : +Kopete::ViewPlugin::ViewPlugin( KInstance *instance, TQObject *parent, const char *name ) : Kopete::Plugin( instance, parent, name ) { diff --git a/kopete/libkopete/ui/kopeteviewplugin.h b/kopete/libkopete/ui/kopeteviewplugin.h index e7797d56..25ce704b 100644 --- a/kopete/libkopete/ui/kopeteviewplugin.h +++ b/kopete/libkopete/ui/kopeteviewplugin.h @@ -41,7 +41,7 @@ class KOPETE_EXPORT ViewPlugin : public Plugin /** * @brief Create and initialize the plugin */ - ViewPlugin( KInstance *instance, QObject *parent = 0L, const char *name = 0L ); + ViewPlugin( KInstance *instance, TQObject *parent = 0L, const char *name = 0L ); /** * @brief Creates a view to be associated with the passed in session diff --git a/kopete/libkopete/ui/kopetewidgets.cpp b/kopete/libkopete/ui/kopetewidgets.cpp index 093ee48e..916b0faf 100644 --- a/kopete/libkopete/ui/kopetewidgets.cpp +++ b/kopete/libkopete/ui/kopetewidgets.cpp @@ -3,7 +3,7 @@ * The generated code in this file is licensed under the same license that the * input file. */ -#include +#include #include #include @@ -20,92 +20,92 @@ public: virtual ~KopeteWidgets(); - virtual QStringList keys() const + virtual TQStringList keys() const { - QStringList result; + TQStringList result; for (WidgetInfos::ConstIterator it = m_widgets.begin(); it != m_widgets.end(); ++it) result << it.key(); return result; } - virtual QWidget *create(const QString &key, QWidget *parent = 0, const char *name = 0); + virtual TQWidget *create(const TQString &key, TQWidget *parent = 0, const char *name = 0); - virtual QIconSet iconSet(const QString &key) const + virtual TQIconSet iconSet(const TQString &key) const { #ifdef EMBED_IMAGES - QPixmap pix(m_widgets[key].iconSet); + TQPixmap pix(m_widgets[key].iconSet); #else - QPixmap pix(locate( "data", - QString::fromLatin1("kopetewidgets/pics/") + m_widgets[key].iconSet)); + TQPixmap pix(locate( "data", + TQString::fromLatin1("kopetewidgets/pics/") + m_widgets[key].iconSet)); #endif - return QIconSet(pix); + return TQIconSet(pix); } - virtual bool isContainer(const QString &key) const { return m_widgets[key].isContainer; } + virtual bool isContainer(const TQString &key) const { return m_widgets[key].isContainer; } - virtual QString group(const QString &key) const { return m_widgets[key].group; } + virtual TQString group(const TQString &key) const { return m_widgets[key].group; } - virtual QString includeFile(const QString &key) const { return m_widgets[key].includeFile; } + virtual TQString includeFile(const TQString &key) const { return m_widgets[key].includeFile; } - virtual QString toolTip(const QString &key) const { return m_widgets[key].toolTip; } + virtual TQString toolTip(const TQString &key) const { return m_widgets[key].toolTip; } - virtual QString whatsThis(const QString &key) const { return m_widgets[key].whatsThis; } + virtual TQString whatsThis(const TQString &key) const { return m_widgets[key].whatsThis; } private: struct WidgetInfo { - QString group; + TQString group; #ifdef EMBED_IMAGES - QPixmap iconSet; + TQPixmap iconSet; #else - QString iconSet; + TQString iconSet; #endif - QString includeFile; - QString toolTip; - QString whatsThis; + TQString includeFile; + TQString toolTip; + TQString whatsThis; bool isContainer; }; - typedef QMap WidgetInfos; + typedef TQMap WidgetInfos; WidgetInfos m_widgets; }; KopeteWidgets::KopeteWidgets() { WidgetInfo widget; - widget.group = QString::fromLatin1("Input (Kopete)"); + widget.group = TQString::fromLatin1("Input (Kopete)"); #ifdef EMBED_IMAGES - widget.iconSet = QPixmap(kopete__ui__addressbooklinkwidget_xpm); + widget.iconSet = TQPixmap(kopete__ui__addressbooklinkwidget_xpm); #else - widget.iconSet = QString::fromLatin1("kopete__ui__addressbooklinkwidget.png"); + widget.iconSet = TQString::fromLatin1("kopete__ui__addressbooklinkwidget.png"); #endif - widget.includeFile = QString::fromLatin1("addressbooklinkwidget.h"); - widget.toolTip = QString::fromLatin1("Address Book Link Widget (Kopete)"); - widget.whatsThis = QString::fromLatin1("KABC::Addressee display/selector"); + widget.includeFile = TQString::fromLatin1("addressbooklinkwidget.h"); + widget.toolTip = TQString::fromLatin1("Address Book Link Widget (Kopete)"); + widget.whatsThis = TQString::fromLatin1("KABC::Addressee display/selector"); widget.isContainer = false; - m_widgets.insert(QString::fromLatin1("Kopete::UI::AddressBookLinkWidget"), widget); + m_widgets.insert(TQString::fromLatin1("Kopete::UI::AddressBookLinkWidget"), widget); - widget.group = QString::fromLatin1("Views (Kopete)"); + widget.group = TQString::fromLatin1("Views (Kopete)"); #ifdef EMBED_IMAGES - widget.iconSet = QPixmap(kopete__ui__listview__listview_xpm); + widget.iconSet = TQPixmap(kopete__ui__listview__listview_xpm); #else - widget.iconSet = QString::fromLatin1("kopete__ui__listview__listview.png"); + widget.iconSet = TQString::fromLatin1("kopete__ui__listview__listview.png"); #endif - widget.includeFile = QString::fromLatin1("kopetelistview.h"); - widget.toolTip = QString::fromLatin1("List View (Kopete)"); - widget.whatsThis = QString::fromLatin1("A component capable list view widget."); + widget.includeFile = TQString::fromLatin1("kopetelistview.h"); + widget.toolTip = TQString::fromLatin1("List View (Kopete)"); + widget.whatsThis = TQString::fromLatin1("A component capable list view widget."); widget.isContainer = false; - m_widgets.insert(QString::fromLatin1("Kopete::UI::ListView::ListView"), widget); + m_widgets.insert(TQString::fromLatin1("Kopete::UI::ListView::ListView"), widget); - widget.group = QString::fromLatin1("Input (Kopete)"); + widget.group = TQString::fromLatin1("Input (Kopete)"); #ifdef EMBED_IMAGES - widget.iconSet = QPixmap(kopete__ui__listview__searchline_xpm); + widget.iconSet = TQPixmap(kopete__ui__listview__searchline_xpm); #else - widget.iconSet = QString::fromLatin1("kopete__ui__listview__searchline.png"); + widget.iconSet = TQString::fromLatin1("kopete__ui__listview__searchline.png"); #endif - widget.includeFile = QString::fromLatin1("kopetelistviewsearchline.h"); - widget.toolTip = QString::fromLatin1("List View Search Line (Kopete)"); - widget.whatsThis = QString::fromLatin1("Search line able to use Kopete custom list View."); + widget.includeFile = TQString::fromLatin1("kopetelistviewsearchline.h"); + widget.toolTip = TQString::fromLatin1("List View Search Line (Kopete)"); + widget.whatsThis = TQString::fromLatin1("Search line able to use Kopete custom list View."); widget.isContainer = false; - m_widgets.insert(QString::fromLatin1("Kopete::UI::ListView::SearchLine"), widget); + m_widgets.insert(TQString::fromLatin1("Kopete::UI::ListView::SearchLine"), widget); new KInstance("kopetewidgets"); } @@ -113,16 +113,16 @@ KopeteWidgets::~KopeteWidgets() { } -QWidget *KopeteWidgets::create(const QString &key, QWidget *parent, const char *name) +TQWidget *KopeteWidgets::create(const TQString &key, TQWidget *parent, const char *name) { - if (key == QString::fromLatin1("Kopete::UI::AddressBookLinkWidget")) + if (key == TQString::fromLatin1("Kopete::UI::AddressBookLinkWidget")) return new Kopete::UI::AddressBookLinkWidget(parent, name); - if (key == QString::fromLatin1("Kopete::UI::ListView::ListView")) + if (key == TQString::fromLatin1("Kopete::UI::ListView::ListView")) return new Kopete::UI::ListView::ListView(parent, name); - if (key == QString::fromLatin1("Kopete::UI::ListView::SearchLine")) + if (key == TQString::fromLatin1("Kopete::UI::ListView::SearchLine")) return new Kopete::UI::ListView::SearchLine(parent, 0, name); return 0; diff --git a/kopete/libkopete/ui/metacontactselectorwidget.cpp b/kopete/libkopete/ui/metacontactselectorwidget.cpp index d9c75308..1ab6646c 100644 --- a/kopete/libkopete/ui/metacontactselectorwidget.cpp +++ b/kopete/libkopete/ui/metacontactselectorwidget.cpp @@ -15,16 +15,16 @@ ************************************************************************* */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -68,15 +68,15 @@ public: }; -MetaContactSelectorWidgetLVI::MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, QListView *parent, QObject *owner, const char *name) : Kopete::UI::ListView::Item(parent, owner, name) , d( new Private() ) +MetaContactSelectorWidgetLVI::MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, TQListView *parent, TQObject *owner, const char *name) : Kopete::UI::ListView::Item(parent, owner, name) , d( new Private() ) { d->metaContact = mc; d->photoSize = 60; - connect( d->metaContact, SIGNAL( photoChanged() ), - SLOT( slotPhotoChanged() ) ); - connect( d->metaContact, SIGNAL( displayNameChanged(const QString&, const QString&) ), - SLOT( slotDisplayNameChanged() ) ); + connect( d->metaContact, TQT_SIGNAL( photoChanged() ), + TQT_SLOT( slotPhotoChanged() ) ); + connect( d->metaContact, TQT_SIGNAL( displayNameChanged(const TQString&, const TQString&) ), + TQT_SLOT( slotDisplayNameChanged() ) ); buildVisualComponents(); } @@ -99,24 +99,24 @@ void MetaContactSelectorWidgetLVI::slotDisplayNameChanged() } } -QString MetaContactSelectorWidgetLVI::text ( int /* column */ ) const +TQString MetaContactSelectorWidgetLVI::text ( int /* column */ ) const { return d->metaContact->displayName(); } void MetaContactSelectorWidgetLVI::slotPhotoChanged() { - QPixmap photoPixmap; - QImage photoImg = d->metaContact->photo(); + TQPixmap photoPixmap; + TQImage photoImg = d->metaContact->photo(); if ( !photoImg.isNull() && (photoImg.width() > 0) && (photoImg.height() > 0) ) { int photoSize = d->photoSize; - photoImg = photoImg.smoothScale( photoSize, photoSize, QImage::ScaleMin ) ; + photoImg = photoImg.smoothScale( photoSize, photoSize, TQImage::ScaleMin ) ; // draw a 1 pixel black border photoPixmap = photoImg; - QPainter p(&photoPixmap); + TQPainter p(&photoPixmap); p.setPen(Qt::black); p.drawLine(0, 0, photoPixmap.width()-1, 0); p.drawLine(0, photoPixmap.height()-1, photoPixmap.width()-1, photoPixmap.height()-1); @@ -166,7 +166,7 @@ void MetaContactSelectorWidgetLVI::buildVisualComponents() void MetaContactSelectorWidgetLVI::slotUpdateContactBox() { - QPtrList contacts = d->metaContact->contacts(); + TQPtrList contacts = d->metaContact->contacts(); for(Kopete::Contact *c = contacts.first(); c; c = contacts.next()) { new ContactComponent(d->contactIconBox, c, IconSize( KIcon::Small )); @@ -177,37 +177,37 @@ class MetaContactSelectorWidget::Private { public: MetaContactSelectorWidget_Base *widget; - QValueList excludedMetaContacts; + TQValueList excludedMetaContacts; }; -MetaContactSelectorWidget::MetaContactSelectorWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ), d( new Private() ) +MetaContactSelectorWidget::MetaContactSelectorWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ), d( new Private() ) { - QBoxLayout *l = new QVBoxLayout(this); + TQBoxLayout *l = new TQVBoxLayout(this); d->widget = new MetaContactSelectorWidget_Base(this); l->addWidget(d->widget); - connect( d->widget->metaContactListView, SIGNAL( clicked(QListViewItem * ) ), - SIGNAL( metaContactListClicked( QListViewItem * ) ) ); - connect( d->widget->metaContactListView, SIGNAL( selectionChanged( QListViewItem * ) ), - SIGNAL( metaContactListClicked( QListViewItem * ) ) ); - connect( d->widget->metaContactListView, SIGNAL( spacePressed( QListViewItem * ) ), - SIGNAL( metaContactListClicked( QListViewItem * ) ) ); + connect( d->widget->metaContactListView, TQT_SIGNAL( clicked(TQListViewItem * ) ), + TQT_SIGNAL( metaContactListClicked( TQListViewItem * ) ) ); + connect( d->widget->metaContactListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), + TQT_SIGNAL( metaContactListClicked( TQListViewItem * ) ) ); + connect( d->widget->metaContactListView, TQT_SIGNAL( spacePressed( TQListViewItem * ) ), + TQT_SIGNAL( metaContactListClicked( TQListViewItem * ) ) ); - connect( Kopete::ContactList::self(), SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, SLOT( slotLoadMetaContacts() ) ); + connect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, TQT_SLOT( slotLoadMetaContacts() ) ); d->widget->kListViewSearchLine->setListView(d->widget->metaContactListView); d->widget->metaContactListView->setFullWidth( true ); d->widget->metaContactListView->header()->hide(); - d->widget->metaContactListView->setColumnWidthMode(0, QListView::Maximum); + d->widget->metaContactListView->setColumnWidthMode(0, TQListView::Maximum); slotLoadMetaContacts(); } MetaContactSelectorWidget::~MetaContactSelectorWidget() { - disconnect( Kopete::ContactList::self(), SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, SLOT( slotLoadMetaContacts() ) ); + disconnect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactAdded( Kopete::MetaContact * ) ), this, TQT_SLOT( slotLoadMetaContacts() ) ); } @@ -225,7 +225,7 @@ Kopete::MetaContact* MetaContactSelectorWidget::metaContact() void MetaContactSelectorWidget::selectMetaContact( Kopete::MetaContact *mc ) { // iterate trough list view - QListViewItemIterator it( d->widget->metaContactListView ); + TQListViewItemIterator it( d->widget->metaContactListView ); while( it.current() ) { MetaContactSelectorWidgetLVI *item = (MetaContactSelectorWidgetLVI *) it.current(); @@ -261,7 +261,7 @@ void MetaContactSelectorWidget::slotLoadMetaContacts() { d->widget->metaContactListView->clear(); - QPtrList metaContacts = Kopete::ContactList::self()->metaContacts(); + TQPtrList metaContacts = Kopete::ContactList::self()->metaContacts(); for( Kopete::MetaContact *mc = metaContacts.first(); mc ; mc = metaContacts.next() ) { if( !mc->isTemporary() && (d->excludedMetaContacts.findIndex(mc) == -1) ) @@ -273,7 +273,7 @@ void MetaContactSelectorWidget::slotLoadMetaContacts() d->widget->metaContactListView->sort(); } -void MetaContactSelectorWidget::setLabelMessage( const QString &msg ) +void MetaContactSelectorWidget::setLabelMessage( const TQString &msg ) { d->widget->lblHeader->setText(msg); } diff --git a/kopete/libkopete/ui/metacontactselectorwidget.h b/kopete/libkopete/ui/metacontactselectorwidget.h index 1c0a21ff..a265f665 100644 --- a/kopete/libkopete/ui/metacontactselectorwidget.h +++ b/kopete/libkopete/ui/metacontactselectorwidget.h @@ -19,7 +19,7 @@ #define MetaContactSelectorWidget_H #include -#include +#include #include "kopetelistviewitem.h" #include "kopete_export.h" @@ -39,7 +39,7 @@ class KOPETE_EXPORT MetaContactSelectorWidget : public QWidget { Q_OBJECT public: - MetaContactSelectorWidget( QWidget *parent = 0, const char *name = 0 ); + MetaContactSelectorWidget( TQWidget *parent = 0, const char *name = 0 ); ~MetaContactSelectorWidget(); Kopete::MetaContact* metaContact(); /** @@ -47,7 +47,7 @@ public: * example: Please select a contact * or, Choose a contact to delete */ - void setLabelMessage( const QString &msg ); + void setLabelMessage( const TQString &msg ); /** * pre-selects a contact */ @@ -67,7 +67,7 @@ protected slots: */ void slotLoadMetaContacts(); signals: - void metaContactListClicked( QListViewItem *mc ); + void metaContactListClicked( TQListViewItem *mc ); private: class Private; Private *d; @@ -81,9 +81,9 @@ class MetaContactSelectorWidgetLVI : public Kopete::UI::ListView::Item { Q_OBJECT public: - MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, QListView *parent, QObject *owner = 0, const char *name = 0 ); + MetaContactSelectorWidgetLVI(Kopete::MetaContact *mc, TQListView *parent, TQObject *owner = 0, const char *name = 0 ); Kopete::MetaContact* metaContact(); - virtual QString text ( int column ) const; + virtual TQString text ( int column ) const; protected slots: void slotPhotoChanged(); void slotDisplayNameChanged(); diff --git a/kopete/libkopete/ui/userinfodialog.cpp b/kopete/libkopete/ui/userinfodialog.cpp index a25454a9..0ad7d9c2 100644 --- a/kopete/libkopete/ui/userinfodialog.cpp +++ b/kopete/libkopete/ui/userinfodialog.cpp @@ -25,25 +25,25 @@ #include #include -#include -#include -#include +#include +#include +#include namespace Kopete { struct UserInfoDialog::UserInfoDialogPrivate { - QString name; - QString id; - QString awayMessage; - QString status; - QString warningLevel; - QString onlineSince; - QString info; - QString address; - QString phone; - QMap customFields; - QVBoxLayout *topLayout; - QWidget *page; + TQString name; + TQString id; + TQString awayMessage; + TQString status; + TQString warningLevel; + TQString onlineSince; + TQString info; + TQString address; + TQString phone; + TQMap customFields; + TQVBoxLayout *topLayout; + TQWidget *page; DialogStyle style; KHTMLPart *htmlPart; @@ -58,13 +58,13 @@ struct UserInfoDialog::UserInfoDialogPrivate { KTextBrowser *infoBrowser; }; -UserInfoDialog::UserInfoDialog( const QString& descr ) +UserInfoDialog::UserInfoDialog( const TQString& descr ) : KDialogBase( Kopete::UI::Global::mainWidget(), "userinfodialog", true, i18n( "User Info for %1" ).arg( descr ), KDialogBase::Ok ) { d = new UserInfoDialogPrivate; - d->page = new QWidget( this ); + d->page = new TQWidget( this ); setMainWidget( d->page ); - d->topLayout = new QVBoxLayout( d->page, 0, spacingHint() ); + d->topLayout = new TQVBoxLayout( d->page, 0, spacingHint() ); d->style = Widget; } @@ -78,65 +78,65 @@ void UserInfoDialog::setStyle( DialogStyle style ) d->style = style; } -void UserInfoDialog::setName( const QString& name ) +void UserInfoDialog::setName( const TQString& name ) { d->name = name; } -void UserInfoDialog::setId( const QString& id ) +void UserInfoDialog::setId( const TQString& id ) { d->id = id; } -void UserInfoDialog::setAwayMessage( const QString& msg ) +void UserInfoDialog::setAwayMessage( const TQString& msg ) { d->awayMessage = msg; } -void UserInfoDialog::setStatus( const QString& status ) +void UserInfoDialog::setStatus( const TQString& status ) { d->status = status; } -void UserInfoDialog::setWarningLevel(const QString& level ) +void UserInfoDialog::setWarningLevel(const TQString& level ) { d->warningLevel = level; } -void UserInfoDialog::setOnlineSince( const QString& since ) +void UserInfoDialog::setOnlineSince( const TQString& since ) { d->onlineSince = since; } -void UserInfoDialog::setInfo( const QString& info ) +void UserInfoDialog::setInfo( const TQString& info ) { d->info = info; } -void UserInfoDialog::setAddress( const QString& addr ) +void UserInfoDialog::setAddress( const TQString& addr ) { d->address = addr; } -void UserInfoDialog::setPhone( const QString& phone ) +void UserInfoDialog::setPhone( const TQString& phone ) { d->phone = phone; } -void UserInfoDialog::addCustomField( const QString& /*name*/, const QString& /*txt*/ ) +void UserInfoDialog::addCustomField( const TQString& /*name*/, const TQString& /*txt*/ ) { } -void UserInfoDialog::addHTMLText( const QString& /*str*/ ) +void UserInfoDialog::addHTMLText( const TQString& /*str*/ ) { } -QHBox* UserInfoDialog::addLabelEdit( const QString& label, const QString& text, KLineEdit*& edit ) +TQHBox* UserInfoDialog::addLabelEdit( const TQString& label, const TQString& text, KLineEdit*& edit ) { - QHBox *box = new QHBox( d->page ); - new QLabel( label, box ); + TQHBox *box = new TQHBox( d->page ); + new TQLabel( label, box ); edit = new KLineEdit( box ); edit->setAlignment( Qt::AlignHCenter ); edit->setText( text ); @@ -148,12 +148,12 @@ void UserInfoDialog::fillHTML() { d->htmlPart = new KHTMLPart( this ); - QString text; + TQString text; /* if ( d->name.isEmpty() ) { - text.append( QString("
    ") + i18n("Name : ") + - QString("") ); - text.append( d->name + QString("

    ") ); + text.append( TQString("
    ") + i18n("Name : ") + + TQString("") ); + text.append( d->name + TQString("

    ") ); } if ( d->id.isEmpty() ) { @@ -234,23 +234,23 @@ void UserInfoDialog::fillWidgets() } if ( !d->awayMessage.isEmpty() ) { - QVBox *awayBox = new QVBox( d->page ); - new QLabel( i18n("Away message:"), awayBox ); + TQVBox *awayBox = new TQVBox( d->page ); + new TQLabel( i18n("Away message:"), awayBox ); d->awayBrowser = new KTextBrowser( awayBox ); d->awayBrowser->setText( d->awayMessage ); d->topLayout->addWidget( awayBox ); } if ( !d->info.isEmpty() ) { - QVBox *infoBox = new QVBox( d->page ); - new QLabel( i18n("User info:"), infoBox ); + TQVBox *infoBox = new TQVBox( d->page ); + new TQLabel( i18n("User info:"), infoBox ); d->infoBrowser = new KTextBrowser( infoBox ); d->infoBrowser->setText( d->info ); d->topLayout->addWidget( infoBox ); } } -void UserInfoDialog::setStyleSheet( const QString& /*css*/ ) +void UserInfoDialog::setStyleSheet( const TQString& /*css*/ ) { } diff --git a/kopete/libkopete/ui/userinfodialog.h b/kopete/libkopete/ui/userinfodialog.h index 7df19f4f..246d15ec 100644 --- a/kopete/libkopete/ui/userinfodialog.h +++ b/kopete/libkopete/ui/userinfodialog.h @@ -19,7 +19,7 @@ #define USERINFODIALOG_H #include -#include +#include #include "kopete_export.h" @@ -31,7 +31,7 @@ namespace Kopete { { Q_OBJECT public: - UserInfoDialog( const QString& descr ); + UserInfoDialog( const TQString& descr ); virtual ~UserInfoDialog(); @@ -46,18 +46,18 @@ namespace Kopete { // The functions below set elements as specified in the name. // If an element is not set it won't be displayed. - void setName( const QString& name ); - void setId( const QString& id ); - void setAwayMessage( const QString& msg ); - void setStatus( const QString& status ); - void setWarningLevel(const QString& level ); - void setOnlineSince( const QString& since ); - void setInfo( const QString& info ); - void setAddress( const QString& addr ); - void setPhone( const QString& phone ); - - void addCustomField( const QString& name, const QString& txt ); - void addHTMLText( const QString& str ); + void setName( const TQString& name ); + void setId( const TQString& id ); + void setAwayMessage( const TQString& msg ); + void setStatus( const TQString& status ); + void setWarningLevel(const TQString& level ); + void setOnlineSince( const TQString& since ); + void setInfo( const TQString& info ); + void setAddress( const TQString& addr ); + void setPhone( const TQString& phone ); + + void addCustomField( const TQString& name, const TQString& txt ); + void addHTMLText( const TQString& str ); ///Shows the dialog virtual void show(); @@ -78,9 +78,9 @@ namespace Kopete { * customized include : "name", "id", "warningLevel", "onlineSince", * "address", "phone", "status", "awayMessage" and "info". */ - void setStyleSheet( const QString& css ); + void setStyleSheet( const TQString& css ); - QHBox* addLabelEdit( const QString& label, const QString& text, KLineEdit*& edit ); + TQHBox* addLabelEdit( const TQString& label, const TQString& text, KLineEdit*& edit ); private: struct UserInfoDialogPrivate; diff --git a/kopete/libkopete/webcamwidget.cpp b/kopete/libkopete/webcamwidget.cpp index ae617ad5..ad701b8e 100644 --- a/kopete/libkopete/webcamwidget.cpp +++ b/kopete/libkopete/webcamwidget.cpp @@ -16,15 +16,15 @@ #include "webcamwidget.h" -#include -#include +#include +#include #include namespace Kopete { -WebcamWidget::WebcamWidget( QWidget* parent, const char* name ) -: QWidget( parent, name ) +WebcamWidget::WebcamWidget( TQWidget* parent, const char* name ) +: TQWidget( parent, name ) { clear(); } @@ -34,12 +34,12 @@ WebcamWidget::~WebcamWidget() // don't do anything either } -void WebcamWidget::updatePixmap(const QPixmap& pixmap) +void WebcamWidget::updatePixmap(const TQPixmap& pixmap) { mPixmap = pixmap; mText = ""; - QPaintEvent *ev = new QPaintEvent( rect(), true ); + TQPaintEvent *ev = new TQPaintEvent( rect(), true ); paintEvent( ev ); delete ev; } @@ -50,24 +50,24 @@ void WebcamWidget::clear() if (!mPixmap.isNull()) mPixmap.resize(0,0); - QPaintEvent *ev = new QPaintEvent( rect(), true ); + TQPaintEvent *ev = new TQPaintEvent( rect(), true ); paintEvent( ev ); delete ev; } -void WebcamWidget::setText(const QString& text) +void WebcamWidget::setText(const TQString& text) { mText = text; // for now redraw everything - QPaintEvent *ev = new QPaintEvent( rect(), true ); + TQPaintEvent *ev = new TQPaintEvent( rect(), true ); paintEvent( ev ); delete ev; } -void WebcamWidget::paintEvent( QPaintEvent* event ) +void WebcamWidget::paintEvent( TQPaintEvent* event ) { - QMemArray rects = event->region().rects(); + TQMemArray rects = event->region().rects(); if (!mPixmap.isNull()) { @@ -80,23 +80,23 @@ void WebcamWidget::paintEvent( QPaintEvent* event ) { for (unsigned int i = 0; i < rects.count(); ++i) { - QColor bgColor = paletteBackgroundColor(); - QPainter p(this); + TQColor bgColor = paletteBackgroundColor(); + TQPainter p(this); p.fillRect(rects[i], bgColor); } } // TODO: draw the text - QPainter p(this); - QRect r = p.boundingRect(rect(), Qt::AlignCenter | Qt::WordBreak, mText ); + TQPainter p(this); + TQRect r = p.boundingRect(rect(), Qt::AlignCenter | Qt::WordBreak, mText ); if ( !mText.isEmpty() && event->rect().intersects(r)) { p.setPen(Qt::black); - QRect rec = rect(); - rec.moveTopLeft(QPoint(1,1)); + TQRect rec = rect(); + rec.moveTopLeft(TQPoint(1,1)); p.drawText(rec, Qt::AlignCenter | Qt::WordBreak, mText, -1); - rec.moveTopLeft(QPoint(-1,-1)); + rec.moveTopLeft(TQPoint(-1,-1)); p.setPen(Qt::white); p.drawText(rec, Qt::AlignCenter | Qt::WordBreak, mText, -1); } diff --git a/kopete/libkopete/webcamwidget.h b/kopete/libkopete/webcamwidget.h index 6458f60a..fdc60a6e 100644 --- a/kopete/libkopete/webcamwidget.h +++ b/kopete/libkopete/webcamwidget.h @@ -17,9 +17,9 @@ #ifndef WEBCAMWIDGET_H #define WEBCAMWIDGET_H -#include -#include -#include +#include +#include +#include #include "kopete_export.h" @@ -37,14 +37,14 @@ public: * @param parent The parent widget of this widget * @param name The name for this QObject */ - WebcamWidget( QWidget* parent = 0, const char* name = 0 ); + WebcamWidget( TQWidget* parent = 0, const char* name = 0 ); ~WebcamWidget(); /** * @brief Updates the frame being displayed in the widget * @param pixmap The frame to be displayed */ - void updatePixmap(const QPixmap& pixmap); + void updatePixmap(const TQPixmap& pixmap); /** * @brief Clear the widget @@ -55,11 +55,11 @@ public: * @brief Set a text to be displayed in the widget * @param text The text to be displayed */ - void setText(const QString& text); + void setText(const TQString& text); protected slots: - void paintEvent( QPaintEvent* event ); - QPixmap mPixmap; - QString mText; + void paintEvent( TQPaintEvent* event ); + TQPixmap mPixmap; + TQString mText; }; } // end namespace Kopete diff --git a/kopete/plugins/addbookmarks/addbookmarksplugin.cpp b/kopete/plugins/addbookmarks/addbookmarksplugin.cpp index fae164f1..113ec95e 100644 --- a/kopete/plugins/addbookmarks/addbookmarksplugin.cpp +++ b/kopete/plugins/addbookmarks/addbookmarksplugin.cpp @@ -12,9 +12,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "addbookmarksplugin.moc" #include "addbookmarksplugin.h" @@ -39,11 +39,11 @@ static bool isURLInGroup(const KURL& url, const KBookmarkGroup& group) return false; } -BookmarksPlugin::BookmarksPlugin(QObject *parent, const char *name, const QStringList &/*args*/) +BookmarksPlugin::BookmarksPlugin(TQObject *parent, const char *name, const TQStringList &/*args*/) : Kopete::Plugin(BookmarksPluginFactory::instance(), parent, name) { //kdDebug(14501) << "plugin loading" << endl; - connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToDisplay( Kopete::Message & ) ), this, SLOT( slotBookmarkURLsInMessage( Kopete::Message & ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ), this, TQT_SLOT( slotBookmarkURLsInMessage( Kopete::Message & ) ) ); } /*! @@ -75,16 +75,16 @@ void BookmarksPlugin::slotBookmarkURLsInMessage(Kopete::Message & msg) delete URLsList; } -void BookmarksPlugin::slotAddKopeteBookmark( KIO::Job *transfer, const QByteArray &data ) +void BookmarksPlugin::slotAddKopeteBookmark( KIO::Job *transfer, const TQByteArray &data ) { - QTextCodec *codec = getPageEncoding( data ); - QString htmlpage = codec->toUnicode( data ); - QRegExp rx("([^<]*){1,96}"); + TQTextCodec *codec = getPageEncoding( data ); + TQString htmlpage = codec->toUnicode( data ); + TQRegExp rx("([^<]*){1,96}"); rx.setCaseSensitive(false); int pos = rx.search( htmlpage ); KBookmarkManager *mgr = KBookmarkManager::userBookmarksManager(); KBookmarkGroup group = getKopeteFolder(); - QString sender = m_map[(KIO::TransferJob*)transfer].sender; + TQString sender = m_map[(KIO::TransferJob*)transfer].sender; if ( m_settings.useSubfolderForContact( sender ) ) group = getFolder( group, sender ); @@ -102,10 +102,10 @@ void BookmarksPlugin::slotAddKopeteBookmark( KIO::Job *transfer, const QByteArra transfer->kill(); } -KURL::List* BookmarksPlugin::extractURLsFromString( const QString& text ) +KURL::List* BookmarksPlugin::extractURLsFromString( const TQString& text ) { KURL::List *list = new KURL::List; - QRegExp rx("
    setInteractive(false); - connect ( transfer, SIGNAL ( data( KIO::Job *, const QByteArray & ) ), - this, SLOT ( slotAddKopeteBookmark( KIO::Job *, const QByteArray & ) ) ); + connect ( transfer, TQT_SIGNAL ( data( KIO::Job *, const TQByteArray & ) ), + this, TQT_SLOT ( slotAddKopeteBookmark( KIO::Job *, const TQByteArray & ) ) ); m_map[transfer].url = url; m_map[transfer].sender = sender; } @@ -144,10 +144,10 @@ KBookmarkGroup BookmarksPlugin::getKopeteFolder() { KBookmarkManager *mgr = KBookmarkManager::userBookmarksManager(); - return getFolder( mgr->root(), QString::fromLatin1("kopete") ); + return getFolder( mgr->root(), TQString::fromLatin1("kopete") ); } -KBookmarkGroup BookmarksPlugin::getFolder( KBookmarkGroup group, const QString& folder ) +KBookmarkGroup BookmarksPlugin::getFolder( KBookmarkGroup group, const TQString& folder ) { KBookmark bookmark; @@ -163,16 +163,16 @@ KBookmarkGroup BookmarksPlugin::getFolder( KBookmarkGroup group, const QString& return group; } -QTextCodec* BookmarksPlugin::getPageEncoding( const QByteArray& data ) +TQTextCodec* BookmarksPlugin::getPageEncoding( const TQByteArray& data ) { - QString temp = QString::fromLatin1(data); - QRegExp rx("]*(charset|CHARSET)\\s*=\\s*[^>]*>"); + TQString temp = TQString::fromLatin1(data); + TQRegExp rx("]*(charset|CHARSET)\\s*=\\s*[^>]*>"); int pos = rx.search( temp ); - QTextCodec *codec; + TQTextCodec *codec; if( pos == -1 ){ kdDebug( 14501 ) << "charset not found in first data chunk" << endl; - return QTextCodec::codecForName("iso8859-1"); + return TQTextCodec::codecForName("iso8859-1"); } //kdDebug(14501) << temp.mid(pos, rx.matchedLength()) << endl; temp = temp.mid(pos, rx.matchedLength()-1); @@ -181,9 +181,9 @@ QTextCodec* BookmarksPlugin::getPageEncoding( const QByteArray& data ) for( pos = 0 ; temp[pos].isLetterOrNumber() || temp[pos] == '-' ; pos++ ); temp = temp.left( pos ); //kdDebug(14501) << "encoding: " << temp << endl; - codec = QTextCodec::codecForName( temp.latin1() ); + codec = TQTextCodec::codecForName( temp.latin1() ); if( !codec ){ - return QTextCodec::codecForName("iso8859-1"); + return TQTextCodec::codecForName("iso8859-1"); } return codec; } diff --git a/kopete/plugins/addbookmarks/addbookmarksplugin.h b/kopete/plugins/addbookmarks/addbookmarksplugin.h index 4c425b9f..459c1b8b 100644 --- a/kopete/plugins/addbookmarks/addbookmarksplugin.h +++ b/kopete/plugins/addbookmarks/addbookmarksplugin.h @@ -17,8 +17,8 @@ #include #include #include -#include -#include +#include +#include /** @author Roie Kerstein @@ -28,27 +28,27 @@ class BookmarksPlugin : public Kopete::Plugin { Q_OBJECT public: - BookmarksPlugin(QObject *parent, const char *name, const QStringList &args); + BookmarksPlugin(TQObject *parent, const char *name, const TQStringList &args); private: typedef struct S_URLANDNAME{ KURL url; - QString sender; + TQString sender; } URLandName; - typedef QMap JobsToURLsMap; + typedef TQMap JobsToURLsMap; JobsToURLsMap m_map; BookmarksPrefsSettings m_settings; - void addKopeteBookmark( const KURL& url, const QString& sender ); - KURL::List* extractURLsFromString( const QString& text ); + void addKopeteBookmark( const KURL& url, const TQString& sender ); + KURL::List* extractURLsFromString( const TQString& text ); KBookmarkGroup getKopeteFolder(); - KBookmarkGroup getFolder( KBookmarkGroup group, const QString& folder ); - QTextCodec* getPageEncoding( const QByteArray& data ); + KBookmarkGroup getFolder( KBookmarkGroup group, const TQString& folder ); + TQTextCodec* getPageEncoding( const TQByteArray& data ); public slots: void slotBookmarkURLsInMessage(Kopete::Message & msg); void slotReloadSettings(); private slots: - void slotAddKopeteBookmark( KIO::Job *transfer, const QByteArray &data ); + void slotAddKopeteBookmark( KIO::Job *transfer, const TQByteArray &data ); }; typedef KGenericFactory BookmarksPluginFactory; diff --git a/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp b/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp index 12ebd877..69b7fc1b 100644 --- a/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp +++ b/kopete/plugins/addbookmarks/addbookmarkspreferences.cpp @@ -15,32 +15,32 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include typedef KGenericFactory BookmarksPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_addbookmarks, BookmarksPreferencesFactory("kcm_kopete_addbookmarks") ) -BookmarksPreferences::BookmarksPreferences(QWidget *parent, const char *name, const QStringList &args) +BookmarksPreferences::BookmarksPreferences(TQWidget *parent, const char *name, const TQStringList &args) : KCModule(BookmarksPreferencesFactory::instance(), parent, args) { Q_UNUSED( name ); - ( new QVBoxLayout (this) )->setAutoAdd( true ); + ( new TQVBoxLayout (this) )->setAutoAdd( true ); p_dialog = new BookmarksPrefsUI( this ); load(); - connect( p_dialog->yesButton, SIGNAL( toggled(bool) ), this, SLOT( slotSetStatusChanged() )); - connect( p_dialog->noButton, SIGNAL( toggled(bool) ), this, SLOT( slotSetStatusChanged() )); - connect( p_dialog->onlySelectedButton, SIGNAL( toggled(bool) ), this, SLOT( slotSetStatusChanged() )); - connect( p_dialog->onlyNotSelectedButton, SIGNAL( toggled(bool) ), this, SLOT( slotSetStatusChanged() )); - connect( p_dialog->contactList, SIGNAL( selectionChanged() ), this, SLOT( slotSetStatusChanged() )); + connect( p_dialog->yesButton, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotSetStatusChanged() )); + connect( p_dialog->noButton, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotSetStatusChanged() )); + connect( p_dialog->onlySelectedButton, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotSetStatusChanged() )); + connect( p_dialog->onlyNotSelectedButton, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotSetStatusChanged() )); + connect( p_dialog->contactList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotSetStatusChanged() )); if(Kopete::PluginManager::self()->plugin("kopete_addbookmarks") ) - connect( this, SIGNAL(PreferencesChanged()), Kopete::PluginManager::self()->plugin("kopete_addbookmarks") , SLOT(slotReloadSettings())); - connect( p_dialog->m_addUntrusted, SIGNAL( toggled(bool) ), this, SLOT( slotAddUntrustedChanged() ) ); + connect( this, TQT_SIGNAL(PreferencesChanged()), Kopete::PluginManager::self()->plugin("kopete_addbookmarks") , TQT_SLOT(slotReloadSettings())); + connect( p_dialog->m_addUntrusted, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotAddUntrustedChanged() ) ); } @@ -50,8 +50,8 @@ BookmarksPreferences::~BookmarksPreferences() void BookmarksPreferences::save() { - QStringList list; - QStringList::iterator it; + TQStringList list; + TQStringList::iterator it; m_settings.setFolderForEachContact( (BookmarksPrefsSettings::UseSubfolders)p_dialog->buttonGroup1->selectedId() ); @@ -87,15 +87,15 @@ void BookmarksPreferences::slotAddUntrustedChanged() void BookmarksPreferences::load() { - QStringList list; - QStringList::iterator it; - QListBoxItem* item; + TQStringList list; + TQStringList::iterator it; + TQListBoxItem* item; m_settings.load(); p_dialog->buttonGroup1->setButton(m_settings.isFolderForEachContact()); p_dialog->m_addUntrusted->setChecked( m_settings.addBookmarksFromUnknownContacts() ); if( p_dialog->contactList->count() == 0 ){ - QStringList contacts = Kopete::ContactList::self()->contacts(); + TQStringList contacts = Kopete::ContactList::self()->contacts(); contacts.sort(); p_dialog->contactList->insertStringList( contacts ); } diff --git a/kopete/plugins/addbookmarks/addbookmarkspreferences.h b/kopete/plugins/addbookmarks/addbookmarkspreferences.h index 7a9d5bff..30c94b70 100644 --- a/kopete/plugins/addbookmarks/addbookmarkspreferences.h +++ b/kopete/plugins/addbookmarks/addbookmarkspreferences.h @@ -23,7 +23,7 @@ class BookmarksPreferences : public KCModule { Q_OBJECT public: - BookmarksPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList()); + BookmarksPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList()); ~BookmarksPreferences(); diff --git a/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp b/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp index 045ce801..34d921c3 100644 --- a/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp +++ b/kopete/plugins/addbookmarks/addbookmarksprefssettings.cpp @@ -15,8 +15,8 @@ #include "addbookmarksprefssettings.h" -BookmarksPrefsSettings::BookmarksPrefsSettings(QObject *parent, const char *name) - : QObject(parent, name) +BookmarksPrefsSettings::BookmarksPrefsSettings(TQObject *parent, const char *name) + : TQObject(parent, name) { load(); } @@ -61,7 +61,7 @@ void BookmarksPrefsSettings::save() configfile->sync(); } -bool BookmarksPrefsSettings::useSubfolderForContact( QString nickname ) +bool BookmarksPrefsSettings::useSubfolderForContact( TQString nickname ) { if ( !nickname.isEmpty() ) { diff --git a/kopete/plugins/addbookmarks/addbookmarksprefssettings.h b/kopete/plugins/addbookmarks/addbookmarksprefssettings.h index 2d82e7c4..659f3c69 100644 --- a/kopete/plugins/addbookmarks/addbookmarksprefssettings.h +++ b/kopete/plugins/addbookmarks/addbookmarksprefssettings.h @@ -12,8 +12,8 @@ #ifndef ADDBOOKMARKSPREFSSETTINGS_H #define ADDBOOKMARKSPREFSSETTINGS_H -#include -#include +#include +#include /** @author Roie Kerstein @@ -24,7 +24,7 @@ Q_OBJECT public: enum UseSubfolders { Always=0, Never=1, SelectedContacts=2, UnselectedContacts=3 }; - BookmarksPrefsSettings(QObject *parent = 0, const char *name = 0); + BookmarksPrefsSettings(TQObject *parent = 0, const char *name = 0); ~BookmarksPrefsSettings(); @@ -32,9 +32,9 @@ public: void save(); UseSubfolders isFolderForEachContact() {return m_isfolderforeachcontact;} void setFolderForEachContact(UseSubfolders val) {m_isfolderforeachcontact = val;} - bool useSubfolderForContact( QString nickname ); - QStringList getContactsList() {return m_contactslist;} - void setContactsList(QStringList list) {m_contactslist = list;} + bool useSubfolderForContact( TQString nickname ); + TQStringList getContactsList() {return m_contactslist;} + void setContactsList(TQStringList list) {m_contactslist = list;} bool addBookmarksFromUnknownContacts() { return m_addbookmarksfromunknowns; }; void setAddBookmarksFromUnknownContacts( bool ); @@ -42,7 +42,7 @@ private: bool m_folderPerContact; bool m_addbookmarksfromunknowns; UseSubfolders m_isfolderforeachcontact; - QStringList m_contactslist; + TQStringList m_contactslist; }; diff --git a/kopete/plugins/alias/aliasplugin.cpp b/kopete/plugins/alias/aliasplugin.cpp index 1594a836..52a8511b 100644 --- a/kopete/plugins/alias/aliasplugin.cpp +++ b/kopete/plugins/alias/aliasplugin.cpp @@ -17,7 +17,7 @@ typedef KGenericFactory AliasPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_alias, AliasPluginFactory( "kopete_alias" ) ) AliasPlugin * AliasPlugin::pluginStatic_ = 0L; -AliasPlugin::AliasPlugin( QObject *parent, const char * name, const QStringList & ) +AliasPlugin::AliasPlugin( TQObject *parent, const char * name, const TQStringList & ) : Kopete::Plugin( AliasPluginFactory::instance(), parent, name ) { if( !pluginStatic_ ) diff --git a/kopete/plugins/alias/aliasplugin.h b/kopete/plugins/alias/aliasplugin.h index 8e55dc20..cf53c791 100644 --- a/kopete/plugins/alias/aliasplugin.h +++ b/kopete/plugins/alias/aliasplugin.h @@ -19,7 +19,7 @@ class AliasPlugin : public Kopete::Plugin public: static AliasPlugin *plugin(); - AliasPlugin( QObject *parent, const char *name, const QStringList &args ); + AliasPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~AliasPlugin(); private: diff --git a/kopete/plugins/alias/aliaspreferences.cpp b/kopete/plugins/alias/aliaspreferences.cpp index 65342ddf..a331a592 100644 --- a/kopete/plugins/alias/aliaspreferences.cpp +++ b/kopete/plugins/alias/aliaspreferences.cpp @@ -15,11 +15,11 @@ #include #include #include -#include -#include +#include +#include #include #include -#include +#include #include "kopetecommandhandler.h" #include "kopetepluginmanager.h" @@ -35,11 +35,11 @@ typedef KGenericFactory AliasPreferencesFactory; class AliasItem : public QListViewItem { public: - AliasItem( QListView *parent, + AliasItem( TQListView *parent, uint number, - const QString &alias, - const QString &command, const ProtocolList &p ) : - QListViewItem( parent, alias, command ) + const TQString &alias, + const TQString &command, const ProtocolList &p ) : + TQListViewItem( parent, alias, command ) { protocolList = p; id = number; @@ -49,7 +49,7 @@ class AliasItem : public QListViewItem uint id; protected: - void paintCell( QPainter *p, const QColorGroup &cg, + void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) { if ( column == 2 ) @@ -58,18 +58,18 @@ class AliasItem : public QListViewItem if ( cellWidth < 0 ) cellWidth = 0; - QListViewItem::paintCell( p, cg, column, cellWidth, align ); + TQListViewItem::paintCell( p, cg, column, cellWidth, align ); // Draw the rest of the background - QListView *lv = listView(); + TQListView *lv = listView(); if ( !lv ) return; int marg = lv->itemMargin(); int r = marg; const BackgroundMode bgmode = lv->viewport()->backgroundMode(); - const QColorGroup::ColorRole crole = - QPalette::backgroundRoleFromMode( bgmode ); + const TQColorGroup::ColorRole crole = + TQPalette::backgroundRoleFromMode( bgmode ); p->fillRect( cellWidth, 0, width - cellWidth, height(), cg.brush( crole ) ); @@ -77,7 +77,7 @@ class AliasItem : public QListViewItem { p->fillRect( QMAX( cellWidth, r - marg ), 0, width - cellWidth - r + marg, height(), - cg.brush( QColorGroup::Highlight ) ); + cg.brush( TQColorGroup::Highlight ) ); if ( isEnabled() || !lv ) p->setPen( cg.highlightedText() ); else if ( !isEnabled() && lv ) @@ -90,7 +90,7 @@ class AliasItem : public QListViewItem for ( ProtocolList::Iterator it = protocolList.begin(); it != protocolList.end(); ++it ) { - QPixmap icon = SmallIcon( (*it)->pluginIcon() ); + TQPixmap icon = SmallIcon( (*it)->pluginIcon() ); p->drawPixmap( mc_x + 4, height() - 16, icon ); mc_x += 16; @@ -99,7 +99,7 @@ class AliasItem : public QListViewItem else { // Use Qt's own drawing - QListViewItem::paintCell( p, cg, column, width, align ); + TQListViewItem::paintCell( p, cg, column, width, align ); } } }; @@ -107,39 +107,39 @@ class AliasItem : public QListViewItem class ProtocolItem : public QListViewItem { public: - ProtocolItem( QListView *parent, KPluginInfo *p ) : - QListViewItem( parent, p->name() ) + ProtocolItem( TQListView *parent, KPluginInfo *p ) : + TQListViewItem( parent, p->name() ) { this->setPixmap( 0, SmallIcon( p->icon() ) ); id = p->pluginName(); } - QString id; + TQString id; }; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_alias, AliasPreferencesFactory( "kcm_kopete_alias" ) ) -AliasPreferences::AliasPreferences( QWidget *parent, const char *, const QStringList &args ) +AliasPreferences::AliasPreferences( TQWidget *parent, const char *, const TQStringList &args ) : KCModule( AliasPreferencesFactory::instance(), parent, args ) { - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new AliasDialogBase( this ); - connect( preferencesDialog->addButton, SIGNAL(clicked()), this, SLOT( slotAddAlias() ) ); - connect( preferencesDialog->editButton, SIGNAL(clicked()), this, SLOT( slotEditAlias() ) ); - connect( preferencesDialog->deleteButton, SIGNAL(clicked()), this, SLOT( slotDeleteAliases() ) ); - connect( Kopete::PluginManager::self(), SIGNAL( pluginLoaded( Kopete::Plugin * ) ), - this, SLOT( slotPluginLoaded( Kopete::Plugin * ) ) ); + connect( preferencesDialog->addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotAddAlias() ) ); + connect( preferencesDialog->editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotEditAlias() ) ); + connect( preferencesDialog->deleteButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotDeleteAliases() ) ); + connect( Kopete::PluginManager::self(), TQT_SIGNAL( pluginLoaded( Kopete::Plugin * ) ), + this, TQT_SLOT( slotPluginLoaded( Kopete::Plugin * ) ) ); - connect( preferencesDialog->aliasList, SIGNAL(selectionChanged()), - this, SLOT( slotCheckAliasSelected() ) ); + connect( preferencesDialog->aliasList, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT( slotCheckAliasSelected() ) ); load(); } AliasPreferences::~AliasPreferences() { - QListViewItem *myChild = preferencesDialog->aliasList->firstChild(); + TQListViewItem *myChild = preferencesDialog->aliasList->firstChild(); while( myChild ) { ProtocolList protocols = static_cast( myChild )->protocolList; @@ -162,15 +162,15 @@ void AliasPreferences::load() if( config->hasGroup( "AliasPlugin" ) ) { config->setGroup("AliasPlugin"); - QStringList aliases = config->readListEntry("AliasNames"); - for( QStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it ) + TQStringList aliases = config->readListEntry("AliasNames"); + for( TQStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it ) { uint aliasNumber = config->readUnsignedNumEntry( (*it) + "_id" ); - QString aliasCommand = config->readEntry( (*it) + "_command" ); - QStringList protocols = config->readListEntry( (*it) + "_protocols" ); + TQString aliasCommand = config->readEntry( (*it) + "_command" ); + TQStringList protocols = config->readListEntry( (*it) + "_protocols" ); ProtocolList protocolList; - for( QStringList::Iterator it2 = protocols.begin(); it2 != protocols.end(); ++it2 ) + for( TQStringList::Iterator it2 = protocols.begin(); it2 != protocols.end(); ++it2 ) { Kopete::Plugin *p = Kopete::PluginManager::self()->plugin( *it2 ); protocolList.append( (Kopete::Protocol*)p ); @@ -193,25 +193,25 @@ void AliasPreferences::slotPluginLoaded( Kopete::Plugin *plugin ) if( config->hasGroup( "AliasPlugin" ) ) { config->setGroup("AliasPlugin"); - QStringList aliases = config->readListEntry("AliasNames"); - for( QStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it ) + TQStringList aliases = config->readListEntry("AliasNames"); + for( TQStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it ) { uint aliasNumber = config->readUnsignedNumEntry( (*it) + "_id" ); - QString aliasCommand = config->readEntry( (*it) + "_command" ); - QStringList protocols = config->readListEntry( (*it) + "_protocols" ); + TQString aliasCommand = config->readEntry( (*it) + "_command" ); + TQStringList protocols = config->readListEntry( (*it) + "_protocols" ); - for( QStringList::iterator it2 = protocols.begin(); it2 != protocols.end(); ++it2 ) + for( TQStringList::iterator it2 = protocols.begin(); it2 != protocols.end(); ++it2 ) { if( *it2 == protocol->pluginId() ) { - QPair pr( protocol, *it ); + QPair pr( protocol, *it ); if( protocolMap.find( pr ) == protocolMap.end() ) { Kopete::CommandHandler::commandHandler()->registerAlias( protocol, *it, aliasCommand, - QString::fromLatin1("Custom alias for %1").arg(aliasCommand), + TQString::fromLatin1("Custom alias for %1").arg(aliasCommand), Kopete::CommandHandler::UserAlias ); @@ -241,14 +241,14 @@ void AliasPreferences::slotPluginLoaded( Kopete::Plugin *plugin ) void AliasPreferences::save() { KConfig *config = KGlobal::config(); - config->deleteGroup( QString::fromLatin1("AliasPlugin") ); - config->setGroup( QString::fromLatin1("AliasPlugin") ); + config->deleteGroup( TQString::fromLatin1("AliasPlugin") ); + config->setGroup( TQString::fromLatin1("AliasPlugin") ); - QStringList aliases; + TQStringList aliases; AliasItem *item = (AliasItem*)preferencesDialog->aliasList->firstChild(); while( item ) { - QStringList protocols; + TQStringList protocols; for( ProtocolList::Iterator it = item->protocolList.begin(); it != item->protocolList.end(); ++it ) { @@ -269,13 +269,13 @@ void AliasPreferences::save() emit KCModule::changed(false); } -void AliasPreferences::addAlias( QString &alias, QString &command, const ProtocolList &p, uint id ) +void AliasPreferences::addAlias( TQString &alias, TQString &command, const ProtocolList &p, uint id ) { - QRegExp spaces( QString::fromLatin1("\\s+") ); + TQRegExp spaces( TQString::fromLatin1("\\s+") ); - if( alias.startsWith( QString::fromLatin1("/") ) ) + if( alias.startsWith( TQString::fromLatin1("/") ) ) alias = alias.section( '/', 1 ); - if( command.startsWith( QString::fromLatin1("/") ) ) + if( command.startsWith( TQString::fromLatin1("/") ) ) command = command.section( '/', 1 ); if( id == 0 ) @@ -286,13 +286,13 @@ void AliasPreferences::addAlias( QString &alias, QString &command, const Protoco id = 1; } - QString newAlias = command.section( spaces, 0, 0 ); + TQString newAlias = command.section( spaces, 0, 0 ); aliasMap.insert( alias, new AliasItem( preferencesDialog->aliasList, id, alias, command, p ) ); // count the number of arguments present in 'command' - QRegExp rx( "(%\\d+)" ); - QStringList list; + TQRegExp rx( "(%\\d+)" ); + TQStringList list; int pos = 0; while ( pos >= 0 ) { pos = rx.search( command, pos ); @@ -309,13 +309,13 @@ void AliasPreferences::addAlias( QString &alias, QString &command, const Protoco *it, alias, command, - QString::fromLatin1("Custom alias for %1").arg(command), + TQString::fromLatin1("Custom alias for %1").arg(command), Kopete::CommandHandler::UserAlias, 0, argc ); - protocolMap.insert( QPair( *it, alias ), true ); + protocolMap.insert( QPair( *it, alias ), true ); } } @@ -325,13 +325,13 @@ void AliasPreferences::slotAddAlias() loadProtocols( &addDialog ); addDialog.addButton->setText( i18n("&Add") ); - if( addDialog.exec() == QDialog::Accepted ) + if( addDialog.exec() == TQDialog::Accepted ) { - QString alias = addDialog.alias->text(); - if( alias.startsWith( QString::fromLatin1("/") ) ) + TQString alias = addDialog.alias->text(); + if( alias.startsWith( TQString::fromLatin1("/") ) ) alias = alias.section( '/', 1 ); - if( alias.contains( QRegExp("[_=]") ) ) + if( alias.contains( TQRegExp("[_=]") ) ) { KMessageBox::error( this, i18n("Could not add alias %1. An" " alias name cannot contain the characters \"_\" or \"=\"." @@ -339,7 +339,7 @@ void AliasPreferences::slotAddAlias() } else { - QString command = addDialog.command->text(); + TQString command = addDialog.command->text(); ProtocolList protocols = selectedProtocols( &addDialog ); // Loop through selected protocols @@ -367,7 +367,7 @@ void AliasPreferences::slotAddAlias() const ProtocolList AliasPreferences::selectedProtocols( EditAliasDialog *dialog ) { ProtocolList protocolList; - QListViewItem *item = dialog->protocolList->firstChild(); + TQListViewItem *item = dialog->protocolList->firstChild(); while( item ) { @@ -390,8 +390,8 @@ const ProtocolList AliasPreferences::selectedProtocols( EditAliasDialog *dialog void AliasPreferences::loadProtocols( EditAliasDialog *dialog ) { - QValueList plugins = Kopete::PluginManager::self()->availablePlugins("Protocols"); - for( QValueList::Iterator it = plugins.begin(); it != plugins.end(); ++it ) + TQValueList plugins = Kopete::PluginManager::self()->availablePlugins("Protocols"); + for( TQValueList::Iterator it = plugins.begin(); it != plugins.end(); ++it ) { ProtocolItem *item = new ProtocolItem( dialog->protocolList, *it ); itemMap[ (Kopete::Protocol*)Kopete::PluginManager::self()->plugin( (*it)->pluginName() ) ] = item; @@ -403,10 +403,10 @@ void AliasPreferences::slotEditAlias() EditAliasDialog editDialog; loadProtocols( &editDialog ); - QListViewItem *item = preferencesDialog->aliasList->selectedItems().first(); + TQListViewItem *item = preferencesDialog->aliasList->selectedItems().first(); if( item ) { - QString oldAlias = item->text(0); + TQString oldAlias = item->text(0); editDialog.alias->setText( oldAlias ); editDialog.command->setText( item->text(1) ); ProtocolList protocols = static_cast( item )->protocolList; @@ -415,12 +415,12 @@ void AliasPreferences::slotEditAlias() itemMap[ *it ]->setSelected( true ); } - if( editDialog.exec() == QDialog::Accepted ) + if( editDialog.exec() == TQDialog::Accepted ) { - QString alias = editDialog.alias->text(); - if( alias.startsWith( QString::fromLatin1("/") ) ) + TQString alias = editDialog.alias->text(); + if( alias.startsWith( TQString::fromLatin1("/") ) ) alias = alias.section( '/', 1 ); - if( alias.contains( QRegExp("[_=]") ) ) + if( alias.contains( TQRegExp("[_=]") ) ) { KMessageBox::error( this, i18n("Could not add alias %1. An" " alias name cannot contain the characters \"_\" or \"=\"." @@ -428,7 +428,7 @@ void AliasPreferences::slotEditAlias() } else { - QString command = editDialog.command->text(); + TQString command = editDialog.command->text(); if( alias == oldAlias ) { @@ -468,8 +468,8 @@ void AliasPreferences::slotDeleteAliases() { if( KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to delete the selected aliases?"), i18n("Delete Aliases"), KGuiItem(i18n("Delete"), "editdelete") ) == KMessageBox::Continue ) { - QPtrList< QListViewItem > items = preferencesDialog->aliasList->selectedItems(); - for( QListViewItem *i = items.first(); i; i = items.next() ) + TQPtrList< TQListViewItem > items = preferencesDialog->aliasList->selectedItems(); + for( TQListViewItem *i = items.first(); i; i = items.next() ) { ProtocolList protocols = static_cast( i )->protocolList; for( ProtocolList::Iterator it = protocols.begin(); it != protocols.end(); ++it ) @@ -479,7 +479,7 @@ void AliasPreferences::slotDeleteAliases() i->text(0) ); - protocolMap.erase( QPair( *it, i->text(0) ) ); + protocolMap.erase( QPair( *it, i->text(0) ) ); } aliasMap.erase( i->text(0) ); diff --git a/kopete/plugins/alias/aliaspreferences.h b/kopete/plugins/alias/aliaspreferences.h index 330553a3..9ad25f38 100644 --- a/kopete/plugins/alias/aliaspreferences.h +++ b/kopete/plugins/alias/aliaspreferences.h @@ -12,7 +12,7 @@ #include "kcmodule.h" -typedef QValueList ProtocolList; +typedef TQValueList ProtocolList; class AliasDialogBase; namespace Kopete { class Protocol; } @@ -26,8 +26,8 @@ class AliasPreferences : public KCModule Q_OBJECT public: - AliasPreferences( QWidget *parent = 0, const char *name = 0, - const QStringList &args = QStringList() ); + AliasPreferences( TQWidget *parent = 0, const char *name = 0, + const TQStringList &args = TQStringList() ); ~AliasPreferences(); virtual void save(); @@ -42,12 +42,12 @@ class AliasPreferences : public KCModule private: AliasDialogBase * preferencesDialog; - void addAlias( QString &alias, QString &command, const ProtocolList &p, uint id = 0 ); + void addAlias( TQString &alias, TQString &command, const ProtocolList &p, uint id = 0 ); void loadProtocols( EditAliasDialog *dialog ); const ProtocolList selectedProtocols( EditAliasDialog *dialog ); - QMap itemMap; - QMap, bool> protocolMap; - QMap aliasMap; + TQMap itemMap; + TQMap, bool> protocolMap; + TQMap aliasMap; }; #endif diff --git a/kopete/plugins/alias/editaliasdialog.cpp b/kopete/plugins/alias/editaliasdialog.cpp index 42eb2f4b..6acdf153 100644 --- a/kopete/plugins/alias/editaliasdialog.cpp +++ b/kopete/plugins/alias/editaliasdialog.cpp @@ -16,20 +16,20 @@ */ #include "editaliasdialog.h" -#include +#include #include -#include -#include +#include +#include #include #include -EditAliasDialog::EditAliasDialog( QWidget* parent, const char* name ) +EditAliasDialog::EditAliasDialog( TQWidget* parent, const char* name ) : AliasDialog( parent, name ) { - QObject::connect( alias, SIGNAL( textChanged( const QString& ) ), this, SLOT( checkButtonsEnabled() ) ); - QObject::connect( command, SIGNAL( textChanged( const QString& ) ), this, SLOT( checkButtonsEnabled() ) ); - QObject::connect( protocolList, SIGNAL( selectionChanged() ), this, SLOT( checkButtonsEnabled() ) ); + TQObject::connect( alias, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( checkButtonsEnabled() ) ); + TQObject::connect( command, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( checkButtonsEnabled() ) ); + TQObject::connect( protocolList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( checkButtonsEnabled() ) ); checkButtonsEnabled(); } diff --git a/kopete/plugins/alias/editaliasdialog.h b/kopete/plugins/alias/editaliasdialog.h index 869e8903..da3caf4b 100644 --- a/kopete/plugins/alias/editaliasdialog.h +++ b/kopete/plugins/alias/editaliasdialog.h @@ -26,7 +26,7 @@ class EditAliasDialog : public AliasDialog { Q_OBJECT public: - EditAliasDialog( QWidget* parent = 0, const char* name = 0 ); + EditAliasDialog( TQWidget* parent = 0, const char* name = 0 ); virtual ~EditAliasDialog(); public slots: diff --git a/kopete/plugins/autoreplace/autoreplaceconfig.cpp b/kopete/plugins/autoreplace/autoreplaceconfig.cpp index 0407990a..2537f44a 100644 --- a/kopete/plugins/autoreplace/autoreplaceconfig.cpp +++ b/kopete/plugins/autoreplace/autoreplaceconfig.cpp @@ -33,7 +33,7 @@ void AutoReplaceConfig::load() KConfig *config = KGlobal::config(); config->setGroup( "AutoReplace Plugin" ); - QStringList wordsList = config->readListEntry( "WordsToReplace" ); + TQStringList wordsList = config->readListEntry( "WordsToReplace" ); if( wordsList.isEmpty() ) { // basic list, key/value @@ -44,8 +44,8 @@ void AutoReplaceConfig::load() // we may be reloading after removing an entry from the list m_map.clear(); - QString k, v; - for ( QStringList::Iterator it = wordsList.begin(); it != wordsList.end(); ++it ) + TQString k, v; + for ( TQStringList::Iterator it = wordsList.begin(); it != wordsList.end(); ++it ) { k = *it; ++it; @@ -61,18 +61,18 @@ void AutoReplaceConfig::load() m_upper = config->readBoolEntry( "CapitalizeBeginningSentence" , false ); } -QStringList AutoReplaceConfig::defaultAutoReplaceList() +TQStringList AutoReplaceConfig::defaultAutoReplaceList() { - return QStringList::split( ",", i18n( "list_of_words_to_replace", + return TQStringList::split( ",", i18n( "list_of_words_to_replace", "ur,your,r,are,u,you,theres,there is,arent,are not,dont,do not" ) ); } void AutoReplaceConfig::loadDefaultAutoReplaceList() { - QStringList wordsList = defaultAutoReplaceList(); + TQStringList wordsList = defaultAutoReplaceList(); m_map.clear(); - QString k, v; - for ( QStringList::Iterator it = wordsList.begin(); it != wordsList.end(); ++it ) + TQString k, v; + for ( TQStringList::Iterator it = wordsList.begin(); it != wordsList.end(); ++it ) { k = *it; v = *( ++it ); @@ -116,7 +116,7 @@ void AutoReplaceConfig::save() KConfig * config = KGlobal::config(); config->setGroup( "AutoReplace Plugin" ); - QStringList newWords; + TQStringList newWords; WordsToReplace::Iterator it; for ( it = m_map.begin(); it != m_map.end(); ++it ) { diff --git a/kopete/plugins/autoreplace/autoreplaceconfig.h b/kopete/plugins/autoreplace/autoreplaceconfig.h index 62b11fbf..b819098e 100644 --- a/kopete/plugins/autoreplace/autoreplaceconfig.h +++ b/kopete/plugins/autoreplace/autoreplaceconfig.h @@ -16,9 +16,9 @@ ************************************************************************* */ -#include -#include -#include +#include +#include +#include #ifndef AutoReplaceConfig_H #define AutoReplaceConfig_H @@ -31,7 +31,7 @@ public: void save(); void load(); - typedef QMap WordsToReplace; + typedef TQMap WordsToReplace; WordsToReplace map() const; bool autoReplaceIncoming() const; @@ -40,7 +40,7 @@ public: bool capitalizeBeginningSentence() const; void setMap( const WordsToReplace &w ); - QStringList defaultAutoReplaceList(); + TQStringList defaultAutoReplaceList(); void loadDefaultAutoReplaceList(); private: diff --git a/kopete/plugins/autoreplace/autoreplaceplugin.cpp b/kopete/plugins/autoreplace/autoreplaceplugin.cpp index c06bc0bd..f3610a7f 100644 --- a/kopete/plugins/autoreplace/autoreplaceplugin.cpp +++ b/kopete/plugins/autoreplace/autoreplaceplugin.cpp @@ -29,7 +29,7 @@ typedef KGenericFactory AutoReplacePluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_autoreplace, AutoReplacePluginFactory( "kopete_autoreplace" ) ) AutoReplacePlugin * AutoReplacePlugin::pluginStatic_ = 0L; -AutoReplacePlugin::AutoReplacePlugin( QObject *parent, const char * name, const QStringList & ) +AutoReplacePlugin::AutoReplacePlugin( TQObject *parent, const char * name, const TQStringList & ) : Kopete::Plugin( AutoReplacePluginFactory::instance(), parent, name ) { if( !pluginStatic_ ) @@ -37,16 +37,16 @@ AutoReplacePlugin::AutoReplacePlugin( QObject *parent, const char * name, const m_prefs = new AutoReplaceConfig; - connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToSend( Kopete::Message & ) ), - this, SLOT( slotAboutToSend( Kopete::Message & ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToSend( Kopete::Message & ) ), + this, TQT_SLOT( slotAboutToSend( Kopete::Message & ) ) ); // nb this connection causes the slot to be called on in- and outbound // messages which suggests something is broken in the message handler // system! m_inboundHandler = new Kopete::SimpleMessageHandlerFactory( Kopete::Message::Inbound, - Kopete::MessageHandlerFactory::InStageToSent, this, SLOT( slotAboutToSend( Kopete::Message& ) ) ); + Kopete::MessageHandlerFactory::InStageToSent, this, TQT_SLOT( slotAboutToSend( Kopete::Message& ) ) ); - connect( this, SIGNAL( settingsChanged() ), this, SLOT( slotSettingsChanged() ) ); + connect( this, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotSettingsChanged() ) ); } AutoReplacePlugin::~AutoReplacePlugin() @@ -71,21 +71,21 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg ) if ( ( msg.direction() == Kopete::Message::Outbound && m_prefs->autoReplaceOutgoing() ) || ( msg.direction() == Kopete::Message::Inbound && m_prefs->autoReplaceIncoming() ) ) { - QString replaced_message = msg.plainBody(); + TQString replaced_message = msg.plainBody(); AutoReplaceConfig::WordsToReplace map = m_prefs->map(); // replaces all matched words --> try to find a more 'economic' way // "\\b(%1)\\b" doesn't work when substituting /me. - QString match = "(^|\\s|\\.|\\;|\\,|\\:)(%1)(\\b)"; + TQString match = "(^|\\s|\\.|\\;|\\,|\\:)(%1)(\\b)"; AutoReplaceConfig::WordsToReplace::Iterator it; bool isReplaced=false; for ( it = map.begin(); it != map.end(); ++it ) { - QRegExp re( match.arg( QRegExp::escape( it.key() ) ) ); + TQRegExp re( match.arg( TQRegExp::escape( it.key() ) ) ); if( re.search( replaced_message ) != -1 ) { - QString before = re.cap(1); - QString after = re.cap(3); + TQString before = re.cap(1); + TQString after = re.cap(3); replaced_message.replace( re, before + map.find( it.key() ).data() + after ); isReplaced=true; } @@ -99,10 +99,10 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg ) { if ( m_prefs->dotEndSentence() ) { - QString replaced_message = msg.plainBody(); + TQString replaced_message = msg.plainBody(); // eventually add . at the end of the lines, sent lines only - replaced_message.replace( QRegExp( "([a-z])$" ), "\\1." ); - // replaced_message.replace(QRegExp( "([\\w])$" ), "\\1." ); + replaced_message.replace( TQRegExp( "([a-z])$" ), "\\1." ); + // replaced_message.replace(TQRegExp( "([\\w])$" ), "\\1." ); // the message is now the one with replaced words msg.setBody( replaced_message, Kopete::Message::PlainText ); @@ -110,7 +110,7 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg ) if( m_prefs->capitalizeBeginningSentence() ) { - QString replaced_message = msg.plainBody(); + TQString replaced_message = msg.plainBody(); // eventually start each sent line with capital letter // TODO ". " "? " "! " replaced_message[ 0 ] = replaced_message.at( 0 ).upper(); diff --git a/kopete/plugins/autoreplace/autoreplaceplugin.h b/kopete/plugins/autoreplace/autoreplaceplugin.h index 750f0614..7d9bcedf 100644 --- a/kopete/plugins/autoreplace/autoreplaceplugin.h +++ b/kopete/plugins/autoreplace/autoreplaceplugin.h @@ -18,10 +18,10 @@ #ifndef AutoReplacePLUGIN_H #define AutoReplacePLUGIN_H -#include -#include -#include -#include +#include +#include +#include +#include #include "kopetemessage.h" #include "kopeteplugin.h" @@ -42,7 +42,7 @@ class AutoReplacePlugin : public Kopete::Plugin public: static AutoReplacePlugin *plugin(); - AutoReplacePlugin( QObject *parent, const char *name, const QStringList &args ); + AutoReplacePlugin( TQObject *parent, const char *name, const TQStringList &args ); ~AutoReplacePlugin(); private slots: diff --git a/kopete/plugins/autoreplace/autoreplacepreferences.cpp b/kopete/plugins/autoreplace/autoreplacepreferences.cpp index 0a2a6b0f..4f852610 100644 --- a/kopete/plugins/autoreplace/autoreplacepreferences.cpp +++ b/kopete/plugins/autoreplace/autoreplacepreferences.cpp @@ -15,12 +15,12 @@ * * ***************************************************************************/ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -36,10 +36,10 @@ typedef KGenericFactory AutoReplacePreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_autoreplace, AutoReplacePreferencesFactory( "kcm_kopete_autoreplace" ) ) -AutoReplacePreferences::AutoReplacePreferences( QWidget *parent, const char * /* name */, const QStringList &args ) +AutoReplacePreferences::AutoReplacePreferences( TQWidget *parent, const char * /* name */, const TQStringList &args ) : KCAutoConfigModule( AutoReplacePreferencesFactory::instance(), parent, args ) { - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new AutoReplacePrefsUI( this ); // creates table columns (avoids new columns every time) @@ -48,16 +48,16 @@ AutoReplacePreferences::AutoReplacePreferences( QWidget *parent, const char * /* preferencesDialog->m_list->header()->setStretchEnabled( true , 1 ); // connect SIGNALS/SLOTS - connect( preferencesDialog->m_add, SIGNAL(pressed()), - SLOT( slotAddCouple()) ); - connect( preferencesDialog->m_edit, SIGNAL(pressed()), - SLOT( slotEditCouple()) ); - connect( preferencesDialog->m_remove, SIGNAL(pressed()), - SLOT(slotRemoveCouple()) ); - connect( preferencesDialog->m_list, SIGNAL(selectionChanged()), - SLOT(slotSelectionChanged()) ); - connect( preferencesDialog->m_key, SIGNAL(textChanged ( const QString & )), - SLOT( slotEnableAddEdit( const QString & )) ); + connect( preferencesDialog->m_add, TQT_SIGNAL(pressed()), + TQT_SLOT( slotAddCouple()) ); + connect( preferencesDialog->m_edit, TQT_SIGNAL(pressed()), + TQT_SLOT( slotEditCouple()) ); + connect( preferencesDialog->m_remove, TQT_SIGNAL(pressed()), + TQT_SLOT(slotRemoveCouple()) ); + connect( preferencesDialog->m_list, TQT_SIGNAL(selectionChanged()), + TQT_SLOT(slotSelectionChanged()) ); + connect( preferencesDialog->m_key, TQT_SIGNAL(textChanged ( const TQString & )), + TQT_SLOT( slotEnableAddEdit( const TQString & )) ); m_wordListChanged = false; @@ -90,7 +90,7 @@ void AutoReplacePreferences::load() for ( it = map.begin(); it != map.end(); ++it ) { // notice: insertItem is called automatically by the constructor - new QListViewItem( preferencesDialog->m_list, it.key(), it.data() ); + new TQListViewItem( preferencesDialog->m_list, it.key(), it.data() ); } m_wordListChanged = false; @@ -102,7 +102,7 @@ void AutoReplacePreferences::save() { // make a list reading all values from gui AutoReplaceConfig::WordsToReplace newWords; - for ( QListViewItem * i = preferencesDialog->m_list->firstChild(); i != 0; i = i->nextSibling() ) + for ( TQListViewItem * i = preferencesDialog->m_list->firstChild(); i != 0; i = i->nextSibling() ) newWords[ i->text( 0 ) ] = i->text( 1 ); // save the words list @@ -116,16 +116,16 @@ void AutoReplacePreferences::save() // read m_key m_value, create a QListViewItem void AutoReplacePreferences::slotAddCouple() { - QString k = preferencesDialog->m_key->text(); - QString v = preferencesDialog->m_value->text(); + TQString k = preferencesDialog->m_key->text(); + TQString v = preferencesDialog->m_value->text(); if ( !k.isEmpty() && !k.isNull() && !v.isEmpty() && !v.isNull() ) { - QListViewItem * lvi; - QListViewItem * oldLvi = 0; + TQListViewItem * lvi; + TQListViewItem * oldLvi = 0; // see if we are replacing an existing entry if ( ( oldLvi = preferencesDialog->m_list->findItem( k, 0 ) ) ) delete oldLvi; - lvi = new QListViewItem( preferencesDialog->m_list, k, v ); + lvi = new TQListViewItem( preferencesDialog->m_list, k, v ); // Triggers a size, geometry and content update // during the next iteration of the event loop preferencesDialog->m_list->triggerUpdate(); @@ -140,9 +140,9 @@ void AutoReplacePreferences::slotAddCouple() // edit the selected item void AutoReplacePreferences::slotEditCouple() { - QString k = preferencesDialog->m_key->text(); - QString v = preferencesDialog->m_value->text(); - QListViewItem * lvi; + TQString k = preferencesDialog->m_key->text(); + TQString v = preferencesDialog->m_value->text(); + TQListViewItem * lvi; if ( ( lvi = preferencesDialog->m_list->selectedItem() ) && !k.isEmpty() && !k.isNull() && !v.isEmpty() && !v.isNull() ) { lvi->setText( 0, k ); @@ -163,7 +163,7 @@ void AutoReplacePreferences::slotRemoveCouple() slotWidgetModified(); } -void AutoReplacePreferences::slotEnableAddEdit( const QString & keyText ) +void AutoReplacePreferences::slotEnableAddEdit( const TQString & keyText ) { preferencesDialog->m_add->setEnabled( !keyText.isEmpty() ); preferencesDialog->m_edit->setEnabled( !keyText.isEmpty() && preferencesDialog->m_list->selectedItem() ); @@ -171,7 +171,7 @@ void AutoReplacePreferences::slotEnableAddEdit( const QString & keyText ) void AutoReplacePreferences::slotSelectionChanged() { - QListViewItem *selection = 0; + TQListViewItem *selection = 0; if ( ( selection = preferencesDialog->m_list->selectedItem() ) ) { // enable the remove button @@ -203,7 +203,7 @@ void AutoReplacePreferences::defaults() for ( it = map.begin(); it != map.end(); ++it ) { // notice: insertItem is called automatically by the constructor - new QListViewItem( preferencesDialog->m_list, it.key(), it.data() ); + new TQListViewItem( preferencesDialog->m_list, it.key(), it.data() ); } m_wordListChanged = true; slotWidgetModified(); diff --git a/kopete/plugins/autoreplace/autoreplacepreferences.h b/kopete/plugins/autoreplace/autoreplacepreferences.h index a08b2ba2..00638bfa 100644 --- a/kopete/plugins/autoreplace/autoreplacepreferences.h +++ b/kopete/plugins/autoreplace/autoreplacepreferences.h @@ -25,7 +25,7 @@ class AutoReplaceConfig; // TODO // add button enabled only when k and v are present - // remove button enabled only when a QListViewItem is selected + // remove button enabled only when a TQListViewItem is selected // signal/slot when map changes (needed?) // capital letter not just at the beginning but always after ". ", "! "... @@ -34,7 +34,7 @@ class AutoReplacePreferences : public KCAutoConfigModule Q_OBJECT public: - AutoReplacePreferences( QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList() ); + AutoReplacePreferences( TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList() ); ~AutoReplacePreferences(); virtual void save(); @@ -46,7 +46,7 @@ private slots: void slotAddCouple(); void slotEditCouple(); void slotRemoveCouple(); - void slotEnableAddEdit( const QString & ); + void slotEnableAddEdit( const TQString & ); void slotSelectionChanged(); protected slots: diff --git a/kopete/plugins/connectionstatus/connectionstatusplugin.cpp b/kopete/plugins/connectionstatus/connectionstatusplugin.cpp index 8840c893..33f4e3dd 100644 --- a/kopete/plugins/connectionstatus/connectionstatusplugin.cpp +++ b/kopete/plugins/connectionstatus/connectionstatusplugin.cpp @@ -17,7 +17,7 @@ #include "connectionstatusplugin.h" -#include +#include #include #include @@ -28,15 +28,15 @@ typedef KGenericFactory ConnectionStatusPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_connectionstatus, ConnectionStatusPluginFactory( "kopete_connectionstatus" ) ) -ConnectionStatusPlugin::ConnectionStatusPlugin( QObject *parent, const char *name, const QStringList& /* args */ ) +ConnectionStatusPlugin::ConnectionStatusPlugin( TQObject *parent, const char *name, const TQStringList& /* args */ ) : Kopete::Plugin( ConnectionStatusPluginFactory::instance(), parent, name ) { kdDebug( 14301 ) << k_funcinfo << endl; m_process = 0L; - m_timer = new QTimer(); - connect( m_timer, SIGNAL( timeout() ), this, SLOT( slotCheckStatus() ) ); + m_timer = new TQTimer(); + connect( m_timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotCheckStatus() ) ); m_timer->start( 60000 ); m_pluginConnected = false; @@ -61,7 +61,7 @@ void ConnectionStatusPlugin::slotCheckStatus() return; } - m_buffer = QString::null; + m_buffer = TQString::null; // Use KProcess to run netstat -rn. We'll then parse the output of // netstat -rn in slotProcessStdout() to see if it mentions the @@ -69,8 +69,8 @@ void ConnectionStatusPlugin::slotCheckStatus() m_process = new KProcess; *m_process << "netstat" << "-r"; - connect( m_process, SIGNAL( receivedStdout( KProcess *, char *, int ) ), this, SLOT( slotProcessStdout( KProcess *, char *, int ) ) ); - connect( m_process, SIGNAL( processExited( KProcess * ) ), this, SLOT( slotProcessExited( KProcess * ) ) ); + connect( m_process, TQT_SIGNAL( receivedStdout( KProcess *, char *, int ) ), this, TQT_SLOT( slotProcessStdout( KProcess *, char *, int ) ) ); + connect( m_process, TQT_SIGNAL( processExited( KProcess * ) ), this, TQT_SLOT( slotProcessExited( KProcess * ) ) ); if ( !m_process->start( KProcess::NotifyOnExit, KProcess::Stdout ) ) { @@ -88,7 +88,7 @@ void ConnectionStatusPlugin::slotProcessExited( KProcess *process ) if ( process == m_process ) { setConnectedStatus( m_buffer.contains( "default" ) ); - m_buffer = QString::null; + m_buffer = TQString::null; delete m_process; m_process = 0L; } @@ -98,7 +98,7 @@ void ConnectionStatusPlugin::slotProcessStdout( KProcess *, char *buffer, int bu { // Look for a default gateway //kdDebug( 14301 ) << k_funcinfo << endl; - m_buffer += QString::fromLatin1( buffer, buflen ); + m_buffer += TQString::fromLatin1( buffer, buflen ); //kdDebug( 14301 ) << qsBuffer << endl; } diff --git a/kopete/plugins/connectionstatus/connectionstatusplugin.h b/kopete/plugins/connectionstatus/connectionstatusplugin.h index 5f0a53bf..726176cb 100644 --- a/kopete/plugins/connectionstatus/connectionstatusplugin.h +++ b/kopete/plugins/connectionstatus/connectionstatusplugin.h @@ -31,7 +31,7 @@ class ConnectionStatusPlugin : public Kopete::Plugin Q_OBJECT public: - ConnectionStatusPlugin( QObject *parent, const char *name, const QStringList &args ); + ConnectionStatusPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~ConnectionStatusPlugin(); private slots: @@ -48,8 +48,8 @@ private: bool m_pluginConnected; KProcess *m_process; - QTimer *m_timer; - QString m_buffer; + TQTimer *m_timer; + TQString m_buffer; }; #endif diff --git a/kopete/plugins/contactnotes/contactnotesedit.cpp b/kopete/plugins/contactnotes/contactnotesedit.cpp index f7333c7b..782476b9 100644 --- a/kopete/plugins/contactnotes/contactnotesedit.cpp +++ b/kopete/plugins/contactnotes/contactnotesedit.cpp @@ -15,9 +15,9 @@ * * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include @@ -31,10 +31,10 @@ ContactNotesEdit::ContactNotesEdit(Kopete::MetaContact *m,ContactNotesPlugin *p, m_plugin=p; m_metaContact=m; - QVBox *w=new QVBox(this); + TQVBox *w=new TQVBox(this); w->setSpacing(KDialog::spacingHint()); - m_label = new QLabel(i18n("Notes about %1:").arg(m->displayName()) , w , "m_label"); - m_linesEdit= new QTextEdit ( w , "m_linesEdit"); + m_label = new TQLabel(i18n("Notes about %1:").arg(m->displayName()) , w , "m_label"); + m_linesEdit= new TQTextEdit ( w , "m_linesEdit"); m_linesEdit->setText(p->notes(m)); diff --git a/kopete/plugins/contactnotes/contactnotesedit.h b/kopete/plugins/contactnotes/contactnotesedit.h index 20fe7d10..6af9178d 100644 --- a/kopete/plugins/contactnotes/contactnotesedit.h +++ b/kopete/plugins/contactnotes/contactnotesedit.h @@ -18,8 +18,8 @@ #ifndef CONTACTNOTESEDIT_H #define CONTACTNOTESEDIT_H -#include -#include +#include +#include #include class QLabel; @@ -41,13 +41,13 @@ private: ContactNotesPlugin *m_plugin; Kopete::MetaContact *m_metaContact; - QLabel *m_label; - QTextEdit *m_linesEdit; + TQLabel *m_label; + TQTextEdit *m_linesEdit; protected slots: // Protected slots virtual void slotOk(); signals: // Signals - void notesChanged(const QString, Kopete::MetaContact*); + void notesChanged(const TQString, Kopete::MetaContact*); }; #endif diff --git a/kopete/plugins/contactnotes/contactnotesplugin.cpp b/kopete/plugins/contactnotes/contactnotesplugin.cpp index 5982200f..ce67e663 100644 --- a/kopete/plugins/contactnotes/contactnotesplugin.cpp +++ b/kopete/plugins/contactnotes/contactnotesplugin.cpp @@ -29,7 +29,7 @@ typedef KGenericFactory ContactNotesPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_contactnotes, ContactNotesPluginFactory( "kopete_contactnotes" ) ) -ContactNotesPlugin::ContactNotesPlugin( QObject *parent, const char *name, const QStringList & /* args */ ) +ContactNotesPlugin::ContactNotesPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) : Kopete::Plugin( ContactNotesPluginFactory::instance(), parent, name ) { if ( pluginStatic_ ) @@ -37,8 +37,8 @@ ContactNotesPlugin::ContactNotesPlugin( QObject *parent, const char *name, const else pluginStatic_ = this; - KAction *m_actionEdit=new KAction( i18n("&Notes"), "identity", 0, this, SLOT (slotEditInfo()), actionCollection() , "editContactNotes"); - connect ( Kopete::ContactList::self() , SIGNAL( metaContactSelected(bool)) , m_actionEdit , SLOT(setEnabled(bool))); + KAction *m_actionEdit=new KAction( i18n("&Notes"), "identity", 0, this, TQT_SLOT (slotEditInfo()), actionCollection() , "editContactNotes"); + connect ( Kopete::ContactList::self() , TQT_SIGNAL( metaContactSelected(bool)) , m_actionEdit , TQT_SLOT(setEnabled(bool))); m_actionEdit->setEnabled(Kopete::ContactList::self()->selectedMetaContacts().count()==1 ); setXMLFile("contactnotesui.rc"); @@ -63,18 +63,18 @@ void ContactNotesPlugin::slotEditInfo() if(!m) return; ContactNotesEdit *e=new ContactNotesEdit(m,this); - connect( e, SIGNAL( notesChanged( const QString, Kopete::MetaContact*) ),this, - SLOT( setNotes( const QString, Kopete::MetaContact * ) ) ); + connect( e, TQT_SIGNAL( notesChanged( const TQString, Kopete::MetaContact*) ),this, + TQT_SLOT( setNotes( const TQString, Kopete::MetaContact * ) ) ); e->show(); } -QString ContactNotesPlugin::notes(Kopete::MetaContact *m) +TQString ContactNotesPlugin::notes(Kopete::MetaContact *m) { return m->pluginData( this, "notes" ); } -void ContactNotesPlugin::setNotes( const QString n, Kopete::MetaContact *m ) +void ContactNotesPlugin::setNotes( const TQString n, Kopete::MetaContact *m ) { m->setPluginData( this, "notes", n ); } diff --git a/kopete/plugins/contactnotes/contactnotesplugin.h b/kopete/plugins/contactnotes/contactnotesplugin.h index c4fb8224..f526070d 100644 --- a/kopete/plugins/contactnotes/contactnotesplugin.h +++ b/kopete/plugins/contactnotes/contactnotesplugin.h @@ -18,9 +18,9 @@ #ifndef BABELFISHPLUGIN_H #define BABELFISHPLUGIN_H -#include -#include -#include +#include +#include +#include #include "kopeteplugin.h" @@ -44,14 +44,14 @@ class ContactNotesPlugin : public Kopete::Plugin public: static ContactNotesPlugin *plugin(); - ContactNotesPlugin( QObject *parent, const char *name, const QStringList &args ); + ContactNotesPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~ContactNotesPlugin(); - QString notes(Kopete::MetaContact *m); + TQString notes(Kopete::MetaContact *m); public slots: - void setNotes(const QString n, Kopete::MetaContact *m); + void setNotes(const TQString n, Kopete::MetaContact *m); private: static ContactNotesPlugin* pluginStatic_; diff --git a/kopete/plugins/cryptography/cryptographyguiclient.cpp b/kopete/plugins/cryptography/cryptographyguiclient.cpp index 0c53eee0..898e7f1a 100644 --- a/kopete/plugins/cryptography/cryptographyguiclient.cpp +++ b/kopete/plugins/cryptography/cryptographyguiclient.cpp @@ -28,7 +28,7 @@ class CryptographyPlugin; CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent ) - : QObject(parent) , KXMLGUIClient(parent) + : TQObject(parent) , KXMLGUIClient(parent) { if(!parent || parent->members().isEmpty()) { @@ -36,7 +36,7 @@ CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent ) return; } - QPtrList mb=parent->members(); + TQPtrList mb=parent->members(); Kopete::MetaContact *first=mb.first()->metaContact(); if(!first) @@ -48,8 +48,8 @@ CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent ) setInstance( KGenericFactory::instance() ); - m_action=new KToggleAction( i18n("Encrypt Messages" ), QString::fromLatin1( "encrypted" ), 0, this, SLOT(slotToggled()), actionCollection() , "cryptographyToggle" ); - m_action->setChecked( first->pluginData( CryptographyPlugin::plugin() , "encrypt_messages") != QString::fromLatin1("off") ) ; + m_action=new KToggleAction( i18n("Encrypt Messages" ), TQString::fromLatin1( "encrypted" ), 0, this, TQT_SLOT(slotToggled()), actionCollection() , "cryptographyToggle" ); + m_action->setChecked( first->pluginData( CryptographyPlugin::plugin() , "encrypt_messages") != TQString::fromLatin1("off") ) ; setXMLFile("cryptographychatui.rc"); } @@ -60,7 +60,7 @@ CryptographyGUIClient::~CryptographyGUIClient() void CryptographyGUIClient::slotToggled() { - QPtrList mb=static_cast(parent())->members(); + TQPtrList mb=static_cast(parent())->members(); Kopete::MetaContact *first=mb.first()->metaContact(); if(!first) diff --git a/kopete/plugins/cryptography/cryptographyguiclient.h b/kopete/plugins/cryptography/cryptographyguiclient.h index 5a1aee2c..7f3d8c4f 100644 --- a/kopete/plugins/cryptography/cryptographyguiclient.h +++ b/kopete/plugins/cryptography/cryptographyguiclient.h @@ -15,7 +15,7 @@ #ifndef CRYPTOGUICLIENT_H #define CRYPTOGUICLIENT_H -#include +#include #include namespace Kopete { class ChatSession; } @@ -24,7 +24,7 @@ class KToggleAction; /** *@author Olivier Goffart */ -class CryptographyGUIClient : public QObject, public KXMLGUIClient +class CryptographyGUIClient : public TQObject, public KXMLGUIClient { Q_OBJECT public: diff --git a/kopete/plugins/cryptography/cryptographyplugin.cpp b/kopete/plugins/cryptography/cryptographyplugin.cpp index 701ad8bd..4e2e9686 100644 --- a/kopete/plugins/cryptography/cryptographyplugin.cpp +++ b/kopete/plugins/cryptography/cryptographyplugin.cpp @@ -15,9 +15,9 @@ * * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include @@ -45,13 +45,13 @@ //In Jabber, the JEP says it's not. so we don't use richtext in our message, but some client did. //We limit the html to some basis tag to limit security problem (bad links) // - Olivier -const QRegExp CryptographyPlugin::isHTML( QString::fromLatin1( "^[^<>]*(|[\\s/][^><]*>)[^><]*)+$" ) , false ); +const TQRegExp CryptographyPlugin::isHTML( TQString::fromLatin1( "^[^<>]*(|[\\s/][^><]*>)[^><]*)+$" ) , false ); typedef KGenericFactory CryptographyPluginFactory; static const KAboutData aboutdata("kopete_cryptography", I18N_NOOP("Cryptography") , "1.0" ); K_EXPORT_COMPONENT_FACTORY( kopete_cryptography, CryptographyPluginFactory( &aboutdata ) ) -CryptographyPlugin::CryptographyPlugin( QObject *parent, const char *name, const QStringList & /* args */ ) +CryptographyPlugin::CryptographyPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) : Kopete::Plugin( CryptographyPluginFactory::instance(), parent, name ), m_cachedPass() { @@ -59,27 +59,27 @@ CryptographyPlugin::CryptographyPlugin( QObject *parent, const char *name, const pluginStatic_=this; m_inboundHandler = new Kopete::SimpleMessageHandlerFactory( Kopete::Message::Inbound, - Kopete::MessageHandlerFactory::InStageToSent, this, SLOT( slotIncomingMessage( Kopete::Message& ) ) ); + Kopete::MessageHandlerFactory::InStageToSent, this, TQT_SLOT( slotIncomingMessage( Kopete::Message& ) ) ); connect( Kopete::ChatSessionManager::self(), - SIGNAL( aboutToSend( Kopete::Message & ) ), - SLOT( slotOutgoingMessage( Kopete::Message & ) ) ); + TQT_SIGNAL( aboutToSend( Kopete::Message & ) ), + TQT_SLOT( slotOutgoingMessage( Kopete::Message & ) ) ); - m_cachedPass_timer = new QTimer(this, "m_cachedPass_timer" ); - QObject::connect(m_cachedPass_timer, SIGNAL(timeout()), this, SLOT(slotForgetCachedPass() )); + m_cachedPass_timer = new TQTimer(this, "m_cachedPass_timer" ); + TQObject::connect(m_cachedPass_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotForgetCachedPass() )); - KAction *action=new KAction( i18n("&Select Cryptography Public Key..."), "encrypted", 0, this, SLOT (slotSelectContactKey()), actionCollection() , "contactSelectKey"); - connect ( Kopete::ContactList::self() , SIGNAL( metaContactSelected(bool)) , action , SLOT(setEnabled(bool))); + KAction *action=new KAction( i18n("&Select Cryptography Public Key..."), "encrypted", 0, this, TQT_SLOT (slotSelectContactKey()), actionCollection() , "contactSelectKey"); + connect ( Kopete::ContactList::self() , TQT_SIGNAL( metaContactSelected(bool)) , action , TQT_SLOT(setEnabled(bool))); action->setEnabled(Kopete::ContactList::self()->selectedMetaContacts().count()==1 ); setXMLFile("cryptographyui.rc"); loadSettings(); - connect(this, SIGNAL(settingsChanged()), this, SLOT( loadSettings() ) ); + connect(this, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT( loadSettings() ) ); - connect( Kopete::ChatSessionManager::self(), SIGNAL( chatSessionCreated( Kopete::ChatSession * )) , SLOT( slotNewKMM( Kopete::ChatSession * ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( chatSessionCreated( Kopete::ChatSession * )) , TQT_SLOT( slotNewKMM( Kopete::ChatSession * ) ) ); //Add GUI action to all already existing kmm (if the plugin is launched when kopete already rining) - QValueList sessions = Kopete::ChatSessionManager::self()->sessions(); - for (QValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) + TQValueList sessions = Kopete::ChatSessionManager::self()->sessions(); + for (TQValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) { slotNewKMM(*it); } @@ -117,12 +117,12 @@ CryptographyPlugin* CryptographyPlugin::plugin() CryptographyPlugin* CryptographyPlugin::pluginStatic_ = 0L; -QCString CryptographyPlugin::cachedPass() +TQCString CryptographyPlugin::cachedPass() { return pluginStatic_->m_cachedPass; } -void CryptographyPlugin::setCachedPass(const QCString& p) +void CryptographyPlugin::setCachedPass(const TQCString& p) { if(pluginStatic_->mCacheMode==Never) return; @@ -144,7 +144,7 @@ bool CryptographyPlugin::passphraseHandling() m_actionCollection = new KActionCollection(this); KAction *actionTranslate = new KAction( i18n ("Translate"), 0, - this, SLOT( slotTranslateChat() ), m_actionCollection, "actionTranslate" ); + this, TQT_SLOT( slotTranslateChat() ), m_actionCollection, "actionTranslate" ); m_actionCollection->insert( actionTranslate ); m_currentChatSession=KMM; @@ -153,14 +153,14 @@ bool CryptographyPlugin::passphraseHandling() void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg ) { - QString body = msg.plainBody(); - if( !body.startsWith( QString::fromLatin1("-----BEGIN PGP MESSAGE----") ) - || !body.contains( QString::fromLatin1("-----END PGP MESSAGE----") ) ) + TQString body = msg.plainBody(); + if( !body.startsWith( TQString::fromLatin1("-----BEGIN PGP MESSAGE----") ) + || !body.contains( TQString::fromLatin1("-----END PGP MESSAGE----") ) ) return; if( msg.direction() != Kopete::Message::Inbound ) { - QString plainBody; + TQString plainBody; if ( m_cachedMessages.contains( body ) ) { plainBody = m_cachedMessages[ body ]; @@ -176,19 +176,19 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg ) //Check if this is a RTF message before escaping it if( !isHTML.exactMatch( plainBody ) ) { - plainBody = QStyleSheet::escape( plainBody ); + plainBody = TQStyleSheet::escape( plainBody ); //this is the same algoritm as in Kopete::Message::escapedBody(); - plainBody.replace( QString::fromLatin1( "\n" ), QString::fromLatin1( "
    " ) ) - .replace( QString::fromLatin1( "\t" ), QString::fromLatin1( "    " ) ) - .replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ), QString::fromLatin1( "  " ) ); + plainBody.replace( TQString::fromLatin1( "\n" ), TQString::fromLatin1( "
    " ) ) + .replace( TQString::fromLatin1( "\t" ), TQString::fromLatin1( "    " ) ) + .replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( "  " ) ); } - msg.setBody( QString::fromLatin1("
    ") + msg.setBody( TQString::fromLatin1("
    ") + i18n("Outgoing Encrypted Message: ") - + QString::fromLatin1("
    ") + + TQString::fromLatin1("
    ") + plainBody - + QString::fromLatin1("
    ") + + TQString::fromLatin1("
    ") , Kopete::Message::RichText ); } @@ -215,11 +215,11 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg ) body = Kopete::Message::escape( body ); } - msg.setBody( QString::fromLatin1("
    ") + msg.setBody( TQString::fromLatin1("
    ") + i18n("Incoming Encrypted Message: ") - + QString::fromLatin1("
    ") + + TQString::fromLatin1("
    ") + body - + QString::fromLatin1("
    ") + + TQString::fromLatin1("
    ") , Kopete::Message::RichText ); } @@ -230,11 +230,11 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg ) if(msg.direction() != Kopete::Message::Outbound) return; - QStringList keys; - QPtrList contactlist = msg.to(); + TQStringList keys; + TQPtrList contactlist = msg.to(); for( Kopete::Contact *c = contactlist.first(); c; c = contactlist.next() ) { - QString tmpKey; + TQString tmpKey; if( c->metaContact() ) { if(c->metaContact()->pluginData( this, "encrypt_messages" ) == "off" ) @@ -251,7 +251,7 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg ) if(mAlsoMyKey) //encrypt also with the self key keys.append( mPrivateKeyID ); - QString key = keys.join( " " ); + TQString key = keys.join( " " ); if(key.isEmpty()) { @@ -259,12 +259,12 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg ) return; } - QString original=msg.plainBody(); + TQString original=msg.plainBody(); /* Code From KGPG */ ////////////////// encode from editor - QString encryptOptions=""; + TQString encryptOptions=""; //if (utrust==true) encryptOptions+=" --always-trust "; @@ -279,7 +279,7 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg ) // if (selec==NULL) {KMessageBox::sorry(Kopete::UI::Global::mainWidget(),i18n("You have not chosen an encryption key..."));return;} - QString resultat=KgpgInterface::KgpgEncryptText(original,key,encryptOptions); + TQString resultat=KgpgInterface::KgpgEncryptText(original,key,encryptOptions); if (!resultat.isEmpty()) { msg.setBody(resultat,Kopete::Message::PlainText); @@ -295,7 +295,7 @@ void CryptographyPlugin::slotSelectContactKey() Kopete::MetaContact *m=Kopete::ContactList::self()->selectedMetaContacts().first(); if(!m) return; - QString key = m->pluginData( this, "gpgKey" ); + TQString key = m->pluginData( this, "gpgKey" ); CryptographySelectUserKey *opts = new CryptographySelectUserKey( key, m ); opts->exec(); if( opts->result() ) @@ -308,14 +308,14 @@ void CryptographyPlugin::slotSelectContactKey() void CryptographyPlugin::slotForgetCachedPass() { - m_cachedPass=QCString(); + m_cachedPass=TQCString(); m_cachedPass_timer->stop(); } void CryptographyPlugin::slotNewKMM(Kopete::ChatSession *KMM) { - connect(this , SIGNAL( destroyed(QObject*)) , - new CryptographyGUIClient(KMM) , SLOT(deleteLater())); + connect(this , TQT_SIGNAL( destroyed(TQObject*)) , + new CryptographyGUIClient(KMM) , TQT_SLOT(deleteLater())); } diff --git a/kopete/plugins/cryptography/cryptographyplugin.h b/kopete/plugins/cryptography/cryptographyplugin.h index 506617cc..f34bd175 100644 --- a/kopete/plugins/cryptography/cryptographyplugin.h +++ b/kopete/plugins/cryptography/cryptographyplugin.h @@ -50,12 +50,12 @@ public: }; static CryptographyPlugin *plugin(); - static QCString cachedPass(); - static void setCachedPass(const QCString &pass); + static TQCString cachedPass(); + static void setCachedPass(const TQCString &pass); static bool passphraseHandling(); - static const QRegExp isHTML; + static const TQRegExp isHTML; - CryptographyPlugin( QObject *parent, const char *name, const QStringList &args ); + CryptographyPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~CryptographyPlugin(); public slots: @@ -74,14 +74,14 @@ private slots: private: static CryptographyPlugin* pluginStatic_; Kopete::SimpleMessageHandlerFactory *m_inboundHandler; - QCString m_cachedPass; - QTimer *m_cachedPass_timer; + TQCString m_cachedPass; + TQTimer *m_cachedPass_timer; //cache messages for showing - QMap m_cachedMessages; + TQMap m_cachedMessages; //Settings - QString mPrivateKeyID; + TQString mPrivateKeyID; int mCacheMode; unsigned int mCacheTime; bool mAlsoMyKey; diff --git a/kopete/plugins/cryptography/cryptographypreferences.cpp b/kopete/plugins/cryptography/cryptographypreferences.cpp index 1039aac8..8e1b96ee 100644 --- a/kopete/plugins/cryptography/cryptographypreferences.cpp +++ b/kopete/plugins/cryptography/cryptographypreferences.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include +#include #include #include @@ -27,12 +27,12 @@ typedef KGenericFactory CryptographyPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_cryptography, CryptographyPreferencesFactory("kcm_kopete_cryptography")) -CryptographyPreferences::CryptographyPreferences(QWidget *parent, const char* /*name*/, const QStringList &args) +CryptographyPreferences::CryptographyPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) : KCAutoConfigModule(CryptographyPreferencesFactory::instance(), parent, args) { // Add actuall widget generated from ui file. preferencesDialog = new CryptographyPrefsUI(this); - connect (preferencesDialog->m_selectOwnKey , SIGNAL(pressed()) , this , SLOT(slotSelectPressed())); + connect (preferencesDialog->m_selectOwnKey , TQT_SIGNAL(pressed()) , this , TQT_SLOT(slotSelectPressed())); setMainWidget( preferencesDialog ,"Cryptography Plugin"); } @@ -40,7 +40,7 @@ void CryptographyPreferences::slotSelectPressed() { KgpgSelKey opts(this,0,false); opts.exec(); - if (opts.result()==QDialog::Accepted) + if (opts.result()==TQDialog::Accepted) preferencesDialog->PGP_private_key->setText(opts.getkeyID()); } diff --git a/kopete/plugins/cryptography/cryptographypreferences.h b/kopete/plugins/cryptography/cryptographypreferences.h index 057eacf1..6053e96b 100644 --- a/kopete/plugins/cryptography/cryptographypreferences.h +++ b/kopete/plugins/cryptography/cryptographypreferences.h @@ -30,7 +30,7 @@ class KAutoConfig; class CryptographyPreferences : public KCAutoConfigModule { Q_OBJECT public: - CryptographyPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList()); + CryptographyPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList()); private: CryptographyPrefsUI *preferencesDialog; private slots: // Public slots diff --git a/kopete/plugins/cryptography/cryptographyselectuserkey.cpp b/kopete/plugins/cryptography/cryptographyselectuserkey.cpp index 4f1cc35e..ae92647b 100644 --- a/kopete/plugins/cryptography/cryptographyselectuserkey.cpp +++ b/kopete/plugins/cryptography/cryptographyselectuserkey.cpp @@ -17,8 +17,8 @@ #include #include -#include -#include +#include +#include #include "cryptographyuserkey_ui.h" #include "kopetemetacontact.h" @@ -26,14 +26,14 @@ #include "cryptographyselectuserkey.h" -CryptographySelectUserKey::CryptographySelectUserKey(const QString& key ,Kopete::MetaContact *mc) : KDialogBase( 0l, "CryptographySelectUserKey", /*modal = */true, i18n("Select Contact's Public Key") , KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok ) +CryptographySelectUserKey::CryptographySelectUserKey(const TQString& key ,Kopete::MetaContact *mc) : KDialogBase( 0l, "CryptographySelectUserKey", /*modal = */true, i18n("Select Contact's Public Key") , KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok ) { m_metaContact=mc; view = new CryptographyUserKey_ui(this,"CryptographyUserKey_ui"); setMainWidget(view); - connect (view->m_selectKey , SIGNAL(clicked()) , this , SLOT(slotSelectPressed())); - connect (view->m_removeButton , SIGNAL(clicked()) , this , SLOT(slotRemovePressed())); + connect (view->m_selectKey , TQT_SIGNAL(clicked()) , this , TQT_SLOT(slotSelectPressed())); + connect (view->m_removeButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(slotRemovePressed())); view->m_titleLabel->setText(i18n("Select public key for %1").arg(mc->displayName())); view->m_editKey->setText(key); @@ -45,12 +45,12 @@ CryptographySelectUserKey::~CryptographySelectUserKey() void CryptographySelectUserKey::slotSelectPressed() { popupPublic *dialog=new popupPublic(this, "public_keys", 0,false); - connect(dialog,SIGNAL(selectedKey(QString &,QString,bool,bool)),this,SLOT(keySelected(QString &))); + connect(dialog,TQT_SIGNAL(selectedKey(TQString &,TQString,bool,bool)),this,TQT_SLOT(keySelected(TQString &))); dialog->show(); } -void CryptographySelectUserKey::keySelected(QString &key) +void CryptographySelectUserKey::keySelected(TQString &key) { view->m_editKey->setText(key); } @@ -60,7 +60,7 @@ void CryptographySelectUserKey::slotRemovePressed() view->m_editKey->setText(""); } -QString CryptographySelectUserKey::publicKey() const +TQString CryptographySelectUserKey::publicKey() const { return view->m_editKey->text(); } diff --git a/kopete/plugins/cryptography/cryptographyselectuserkey.h b/kopete/plugins/cryptography/cryptographyselectuserkey.h index 1a8828cf..7ca5ec8e 100644 --- a/kopete/plugins/cryptography/cryptographyselectuserkey.h +++ b/kopete/plugins/cryptography/cryptographyselectuserkey.h @@ -30,14 +30,14 @@ class CryptographyUserKey_ui; class CryptographySelectUserKey : public KDialogBase { Q_OBJECT public: - CryptographySelectUserKey(const QString &key, Kopete::MetaContact *mc); + CryptographySelectUserKey(const TQString &key, Kopete::MetaContact *mc); ~CryptographySelectUserKey(); - QString publicKey() const; + TQString publicKey() const; private slots: - void keySelected(QString &); + void keySelected(TQString &); void slotSelectPressed(); /** No descriptions */ void slotRemovePressed(); diff --git a/kopete/plugins/cryptography/kgpginterface.cpp b/kopete/plugins/cryptography/kgpginterface.cpp index 51b35a63..e41e246d 100644 --- a/kopete/plugins/cryptography/kgpginterface.cpp +++ b/kopete/plugins/cryptography/kgpginterface.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include @@ -40,10 +40,10 @@ KgpgInterface::KgpgInterface() KgpgInterface::~KgpgInterface() {} -QString KgpgInterface::KgpgEncryptText(QString text,QString userIDs, QString Options) +TQString KgpgInterface::KgpgEncryptText(TQString text,TQString userIDs, TQString Options) { FILE *fp; - QString dests,encResult; + TQString dests,encResult; char buffer[200]; userIDs=userIDs.stripWhiteSpace(); @@ -59,7 +59,7 @@ QString KgpgInterface::KgpgEncryptText(QString text,QString userIDs, QString Opt } dests+=" --recipient "+userIDs; - QCString gpgcmd = "echo -n "; + TQCString gpgcmd = "echo -n "; gpgcmd += KShellProcess::quote( text ).utf8(); gpgcmd += " | gpg --no-secmem-warning --no-tty "; gpgcmd += Options.local8Bit(); @@ -75,17 +75,17 @@ QString KgpgInterface::KgpgEncryptText(QString text,QString userIDs, QString Opt if( !encResult.isEmpty() ) return encResult; else - return QString::null; + return TQString::null; } -QString KgpgInterface::KgpgDecryptText(QString text,QString userID) +TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID) { FILE *fp,*pass; - QString encResult; + TQString encResult; char buffer[200]; int counter=0,ppass[2]; - QCString password = CryptographyPlugin::cachedPass(); + TQCString password = CryptographyPlugin::cachedPass(); bool passphraseHandling=CryptographyPlugin::passphraseHandling(); while ((counter<3) && (encResult.isEmpty())) @@ -94,16 +94,16 @@ QString KgpgInterface::KgpgDecryptText(QString text,QString userID) if(passphraseHandling && password.isNull()) { /// pipe for passphrase - //userID=QString::fromUtf8(userID); + //userID=TQString::fromUtf8(userID); userID.replace('<',"<"); - QString passdlg=i18n("Enter passphrase for %1:").arg(userID); + TQString passdlg=i18n("Enter passphrase for %1:").arg(userID); if (counter>1) - passdlg.prepend(i18n("Bad passphrase
    You have %1 tries left.
    ").arg(QString::number(4-counter))); + passdlg.prepend(i18n("Bad passphrase
    You have %1 tries left.
    ").arg(TQString::number(4-counter))); /// pipe for passphrase int code=KPasswordDialog::getPassword(password,passdlg); - if (code!=QDialog::Accepted) - return QString::null; + if (code!=TQDialog::Accepted) + return TQString::null; CryptographyPlugin::setCachedPass(password); } @@ -116,29 +116,29 @@ QString KgpgInterface::KgpgDecryptText(QString text,QString userID) fclose(pass); } - QCString gpgcmd="echo "; + TQCString gpgcmd="echo "; gpgcmd += KShellProcess::quote(text).utf8(); gpgcmd += " | gpg --no-secmem-warning --no-tty "; if(passphraseHandling) - gpgcmd += "--passphrase-fd " + QString::number(ppass[0]).local8Bit(); + gpgcmd += "--passphrase-fd " + TQString::number(ppass[0]).local8Bit(); gpgcmd += " -d "; ////////// encode with untrusted keys or armor if checked by user fp = popen(gpgcmd, "r"); while ( fgets( buffer, sizeof(buffer), fp)) - encResult += QString::fromUtf8(buffer); + encResult += TQString::fromUtf8(buffer); pclose(fp); - password = QCString(); + password = TQCString(); } if( !encResult.isEmpty() ) return encResult; else - return QString::null; + return TQString::null; } -QString KgpgInterface::checkForUtf8(QString txt) +TQString KgpgInterface::checkForUtf8(TQString txt) { // code borrowed from gpa @@ -147,7 +147,7 @@ QString KgpgInterface::checkForUtf8(QString txt) /* Make sure the encoding is UTF-8. * Test structure suggested by Werner Koch */ if (txt.isEmpty()) - return QString::null; + return TQString::null; for (s = txt.ascii(); *s && !(*s & 0x80); s++) ; @@ -157,17 +157,17 @@ QString KgpgInterface::checkForUtf8(QString txt) /* The string is not in UTF-8 */ //if (strchr (txt.ascii(), 0xc3)) return (txt+" +++"); if (txt.find("\\x")==-1) - return QString::fromUtf8(txt.ascii()); + return TQString::fromUtf8(txt.ascii()); // if (!strchr (txt.ascii(), 0xc3) || (txt.find("\\x")!=-1)) { for ( int idx = 0 ; (idx = txt.find( "\\x", idx )) >= 0 ; ++idx ) { char str[2] = "x"; - str[0] = (char) QString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 ); + str[0] = (char) TQString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 ); txt.replace( idx, 4, str ); } if (!strchr (txt.ascii(), 0xc3)) - return QString::fromUtf8(txt.ascii()); + return TQString::fromUtf8(txt.ascii()); else - return QString::fromUtf8(QString::fromUtf8(txt.ascii()).ascii()); // perform Utf8 twice, or some keys display badly + return TQString::fromUtf8(TQString::fromUtf8(txt.ascii()).ascii()); // perform Utf8 twice, or some keys display badly } diff --git a/kopete/plugins/cryptography/kgpginterface.h b/kopete/plugins/cryptography/kgpginterface.h index b70bc68a..f324359e 100644 --- a/kopete/plugins/cryptography/kgpginterface.h +++ b/kopete/plugins/cryptography/kgpginterface.h @@ -26,8 +26,8 @@ /** * Encrypt a file using gpg. */ -//class KgpgEncryptFile : public QObject { -class KgpgInterface : public QObject { +//class KgpgEncryptFile : public TQObject { +class KgpgInterface : public TQObject { Q_OBJECT @@ -39,26 +39,26 @@ class KgpgInterface : public QObject { /**Encrypt text function - * @param text QString text to be encrypted. + * @param text TQString text to be encrypted. * @param userIDs the recipients key id's. * @param Options String with the wanted gpg options. ex: "--armor" * returns the encrypted text or empty string if encyption failed */ - static QString KgpgEncryptText(QString text,QString userIDs, QString Options=""); + static TQString KgpgEncryptText(TQString text,TQString userIDs, TQString Options=""); /**Decrypt text function - * @param text QString text to be decrypted. - * @param userID QString the name of the decryption key (only used to prompt user for passphrase) + * @param text TQString text to be decrypted. + * @param userID TQString the name of the decryption key (only used to prompt user for passphrase) */ - static QString KgpgDecryptText(QString text,QString userID); -// static QString KgpgDecryptFileToText(KURL srcUrl,QString userID); + static TQString KgpgDecryptText(TQString text,TQString userID); +// static TQString KgpgDecryptFileToText(KURL srcUrl,TQString userID); /* * Destructor for the class. */ ~KgpgInterface(); - static QString checkForUtf8(QString txt); + static TQString checkForUtf8(TQString txt); private slots: @@ -69,12 +69,12 @@ signals: /** * @internal structure for communication */ - QString message,tempKeyFile,userIDs,txtprocess,output; - QCString passphrase; + TQString message,tempKeyFile,userIDs,txtprocess,output; + TQCString passphrase; bool deleteSuccess,konsLocal,anonymous,txtsent,decfinished,decok,badmdc; int signSuccess; int step,signb,sigsearch; - QString konsSignKey, konsKeyID; + TQString konsSignKey, konsKeyID; /** diff --git a/kopete/plugins/cryptography/kgpgselkey.cpp b/kopete/plugins/cryptography/kgpgselkey.cpp index 70f76598..88078ece 100644 --- a/kopete/plugins/cryptography/kgpgselkey.cpp +++ b/kopete/plugins/cryptography/kgpgselkey.cpp @@ -23,12 +23,12 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include @@ -38,11 +38,11 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////// Secret key selection dialog, used when user wants to sign a key -KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel) +KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel) { - QString keyname; - QWidget *page = new QWidget(this); - QLabel *labeltxt; + TQString keyname; + TQWidget *page = new TQWidget(this); + TQLabel *labeltxt; KIconLoader *loader = KGlobal::iconLoader(); keyPair=loader->loadIcon("kgpg_key2",KIcon::Small,20); @@ -54,22 +54,22 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog keysListpr->setShowSortIndicator(true); keysListpr->setFullWidth(true); - labeltxt=new QLabel(i18n("Choose secret key:"),page); - QVBoxLayout *vbox=new QVBoxLayout(page,3); + labeltxt=new TQLabel(i18n("Choose secret key:"),page); + TQVBoxLayout *vbox=new TQVBoxLayout(page,3); vbox->addWidget(labeltxt); vbox->addWidget(keysListpr); if (showlocal==true) { - local = new QCheckBox(i18n("Local signature (cannot be exported)"),page); + local = new TQCheckBox(i18n("Local signature (cannot be exported)"),page); vbox->addWidget(local); } FILE *fp,*fp2; - QString tst,tst2; + TQString tst,tst2; char line[130]; - // FIXME: Why use popen instead of KProcess, QProcess or KProcIO?!? + // FIXME: Why use popen instead of KProcess, TQProcess or KProcIO?!? // Are we interested in having buffer overflows now? - Martijn fp = popen( "gpg --no-tty --with-colon --list-secret-keys", "r" ); while ( fgets( line, sizeof(line), fp)) @@ -77,12 +77,12 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog tst=line; if (tst.startsWith("sec")) { - const QString trust=tst.section(':',1,1); - QString val=tst.section(':',6,6); - QString id=QString("0x"+tst.section(':',4,4).right(8)); + const TQString trust=tst.section(':',1,1); + TQString val=tst.section(':',6,6); + TQString id=TQString("0x"+tst.section(':',4,4).right(8)); if (val.isEmpty()) val=i18n("Unlimited"); - QString tr; + TQString tr; switch( trust[0] ) { case 'o': @@ -122,14 +122,14 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog tst=tst.section(":",9,9); // FIXME: Same here: don't use popen! - Martijn - fp2 = popen( QString( "gpg --no-tty --with-colon --list-key %1" ).arg( KShellProcess::quote( id ) ).latin1(), "r" ); + fp2 = popen( TQString( "gpg --no-tty --with-colon --list-key %1" ).arg( KShellProcess::quote( id ) ).latin1(), "r" ); bool dead=true; while ( fgets( line, sizeof(line), fp2)) { tst2=line; if (tst2.startsWith("pub")) { - const QString trust2=tst2.section(':',1,1); + const TQString trust2=tst2.section(':',1,1); switch( trust2[0] ) { case 'f': @@ -156,8 +156,8 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog pclose(fp); - QObject::connect(keysListpr,SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),this,SLOT(slotpreOk())); - QObject::connect(keysListpr,SIGNAL(clicked(QListViewItem *)),this,SLOT(slotSelect(QListViewItem *))); + TQObject::connect(keysListpr,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(slotpreOk())); + TQObject::connect(keysListpr,TQT_SIGNAL(clicked(TQListViewItem *)),this,TQT_SLOT(slotSelect(TQListViewItem *))); keysListpr->setSelected(keysListpr->firstChild(),true); @@ -167,17 +167,17 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog setMainWidget(page); } -QString KgpgSelKey::extractKeyName(QString fullName) +TQString KgpgSelKey::extractKeyName(TQString fullName) { - QString kMail; + TQString kMail; if (fullName.find("<")!=-1) { kMail=fullName.section('<',-1,-1); kMail.truncate(kMail.length()-1); } - QString kName=fullName.section('<',0,0); + TQString kName=fullName.section('<',0,0); if (kName.find("(")!=-1) kName=kName.section('(',0,0); - return QString(kMail+" ("+kName+")").stripWhiteSpace(); + return TQString(kMail+" ("+kName+")").stripWhiteSpace(); } void KgpgSelKey::slotpreOk() @@ -196,7 +196,7 @@ void KgpgSelKey::slotOk() accept(); } -void KgpgSelKey::slotSelect(QListViewItem *item) +void KgpgSelKey::slotSelect(TQListViewItem *item) { if (item==NULL) return; if (item->depth()!=0) @@ -207,9 +207,9 @@ void KgpgSelKey::slotSelect(QListViewItem *item) } -QString KgpgSelKey::getkeyID() +TQString KgpgSelKey::getkeyID() { - QString userid; + TQString userid; ///// emit selected key if (keysListpr->currentItem()==NULL) return(""); else @@ -222,9 +222,9 @@ QString KgpgSelKey::getkeyID() } } -QString KgpgSelKey::getkeyMail() +TQString KgpgSelKey::getkeyMail() { - QString username; + TQString username; ///// emit selected key if (keysListpr->currentItem()==NULL) return(""); else diff --git a/kopete/plugins/cryptography/kgpgselkey.h b/kopete/plugins/cryptography/kgpgselkey.h index 11bcc498..f511f999 100644 --- a/kopete/plugins/cryptography/kgpgselkey.h +++ b/kopete/plugins/cryptography/kgpgselkey.h @@ -27,15 +27,15 @@ class KListView; class QCheckBox; typedef struct gpgKey{ - QString gpgkeymail; - QString gpgkeyname; - QString gpgkeyid; - QString gpgkeytrust; - QString gpgkeyvalidity; - QString gpgkeysize; - QString gpgkeycreation; - QString gpgkeyexpiration; - QString gpgkeyalgo; + TQString gpgkeymail; + TQString gpgkeyname; + TQString gpgkeyid; + TQString gpgkeytrust; + TQString gpgkeyvalidity; + TQString gpgkeysize; + TQString gpgkeycreation; + TQString gpgkeyexpiration; + TQString gpgkeyalgo; }; class KgpgSelKey : public KDialogBase @@ -43,19 +43,19 @@ class KgpgSelKey : public KDialogBase Q_OBJECT public: - KgpgSelKey( QWidget *parent = 0, const char *name = 0,bool showlocal=true); + KgpgSelKey( TQWidget *parent = 0, const char *name = 0,bool showlocal=true); KListView *keysListpr; -QPixmap keyPair; -QCheckBox *local; +TQPixmap keyPair; +TQCheckBox *local; private slots: void slotOk(); void slotpreOk(); -void slotSelect(QListViewItem *item); -QString extractKeyName(QString fullName); +void slotSelect(TQListViewItem *item); +TQString extractKeyName(TQString fullName); public: - QString getkeyID(); - QString getkeyMail(); + TQString getkeyID(); + TQString getkeyMail(); bool getlocal(); }; diff --git a/kopete/plugins/cryptography/popuppublic.cpp b/kopete/plugins/cryptography/popuppublic.cpp index 36008bcf..9c1561f1 100644 --- a/kopete/plugins/cryptography/popuppublic.cpp +++ b/kopete/plugins/cryptography/popuppublic.cpp @@ -18,18 +18,18 @@ ***************************************************************************/ //////////////////////////////////////////////////////// code for choosing a public key from a list for encryption -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -57,13 +57,13 @@ class UpdateViewItem2 : public KListViewItem { public: - UpdateViewItem2(QListView *parent, QString name,QString mail,QString id,bool isDefault); - virtual void paintCell(QPainter *p, const QColorGroup &cg,int col, int width, int align); - virtual QString key(int c,bool ) const; + UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault); + virtual void paintCell(TQPainter *p, const TQColorGroup &cg,int col, int width, int align); + virtual TQString key(int c,bool ) const; bool def; }; -UpdateViewItem2::UpdateViewItem2(QListView *parent, QString name,QString mail,QString id,bool isDefault) +UpdateViewItem2::UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault) : KListViewItem(parent) { def=isDefault; @@ -73,28 +73,28 @@ def=isDefault; } -void UpdateViewItem2::paintCell(QPainter *p, const QColorGroup &cg,int column, int width, int alignment) +void UpdateViewItem2::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int alignment) { if ((def) && (column<2)) { - QFont font(p->font()); + TQFont font(p->font()); font.setBold(true); p->setFont(font); } KListViewItem::paintCell(p, cg, column, width, alignment); } -QString UpdateViewItem2 :: key(int c,bool ) const +TQString UpdateViewItem2 :: key(int c,bool ) const { return text(c).lower(); } /////////////// main view -popupPublic::popupPublic(QWidget *parent, const char *name,QString sfile,bool filemode,KShortcut goDefaultKey): +popupPublic::popupPublic(TQWidget *parent, const char *name,TQString sfile,bool filemode,KShortcut goDefaultKey): KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent, name,true) { - QWidget *page = plainPage(); - QVBoxLayout *vbox=new QVBoxLayout(page,0,spacingHint()); + TQWidget *page = plainPage(); + TQVBoxLayout *vbox=new TQVBoxLayout(page,0,spacingHint()); vbox->setAutoAdd(true); setButtonText(KDialogBase::Details,i18n("Options")); @@ -111,17 +111,17 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent if (filemode) setCaption(i18n("Select Public Key for %1").arg(sfile)); fmode=filemode; - QHButtonGroup *hBar=new QHButtonGroup(page); - //hBar->setFrameStyle(QFrame::NoFrame); + TQHButtonGroup *hBar=new TQHButtonGroup(page); + //hBar->setFrameStyle(TQFrame::NoFrame); hBar->setMargin(0); - QToolButton *clearSearch = new QToolButton(hBar); + TQToolButton *clearSearch = new TQToolButton(hBar); clearSearch->setTextLabel(i18n("Clear Search"), true); - clearSearch->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left" + clearSearch->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase")); - (void) new QLabel(i18n("Search: "),hBar); + (void) new TQLabel(i18n("Search: "),hBar); KListViewSearchLine* listViewSearch = new KListViewSearchLine(hBar); - connect(clearSearch, SIGNAL(pressed()), listViewSearch, SLOT(clear())); + connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear())); keysList = new KListView( page ); keysList->addColumn(i18n("Name")); @@ -136,54 +136,54 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent keysList->setFullWidth(true); keysList->setAllColumnsShowFocus(true); keysList->setSelectionModeExt(KListView::Extended); - keysList->setColumnWidthMode(0,QListView::Manual); - keysList->setColumnWidthMode(1,QListView::Manual); + keysList->setColumnWidthMode(0,TQListView::Manual); + keysList->setColumnWidthMode(1,TQListView::Manual); keysList->setColumnWidth(0,210); keysList->setColumnWidth(1,210); - boutonboxoptions=new QButtonGroup(5,Qt::Vertical ,page,0); + boutonboxoptions=new TQButtonGroup(5,Qt::Vertical ,page,0); KActionCollection *actcol=new KActionCollection(this); - (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, this, SLOT(slotGotoDefaultKey()),actcol,"go_default_key"); + (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, this, TQT_SLOT(slotGotoDefaultKey()),actcol,"go_default_key"); - CBarmor=new QCheckBox(i18n("ASCII armored encryption"),boutonboxoptions); - CBuntrusted=new QCheckBox(i18n("Allow encryption with untrusted keys"),boutonboxoptions); - CBhideid=new QCheckBox(i18n("Hide user id"),boutonboxoptions); + CBarmor=new TQCheckBox(i18n("ASCII armored encryption"),boutonboxoptions); + CBuntrusted=new TQCheckBox(i18n("Allow encryption with untrusted keys"),boutonboxoptions); + CBhideid=new TQCheckBox(i18n("Hide user id"),boutonboxoptions); setDetailsWidget(boutonboxoptions); - QWhatsThis::add + TQWhatsThis::add (keysList,i18n("Public keys list: select the key that will be used for encryption.")); - QWhatsThis::add + TQWhatsThis::add (CBarmor,i18n("ASCII encryption: makes it possible to open the encrypted file/message in a text editor")); - QWhatsThis::add + TQWhatsThis::add (CBhideid,i18n("Hide user ID: Do not put the keyid into encrypted packets. This option hides the receiver " "of the message and is a countermeasure against traffic analysis. It may slow down the decryption process because " "all available secret keys are tried.")); - QWhatsThis::add + TQWhatsThis::add (CBuntrusted,i18n("Allow encryption with untrusted keys: when you import a public key, it is usually " "marked as untrusted and you cannot use it unless you sign it in order to make it 'trusted'. Checking this " "box enables you to use any key, even if it has not be signed.")); if (filemode) { - QWidget *parentBox=new QWidget(boutonboxoptions); - QHBoxLayout *shredBox=new QHBoxLayout(parentBox,0); - //shredBox->setFrameStyle(QFrame::NoFrame); + TQWidget *parentBox=new TQWidget(boutonboxoptions); + TQHBoxLayout *shredBox=new TQHBoxLayout(parentBox,0); + //shredBox->setFrameStyle(TQFrame::NoFrame); //shredBox->setMargin(0); - CBshred=new QCheckBox(i18n("Shred source file"),parentBox); - QWhatsThis::add + CBshred=new TQCheckBox(i18n("Shred source file"),parentBox); + TQWhatsThis::add (CBshred,i18n("Shred source file: permanently remove source file. No recovery will be possible")); - QString shredWhatsThis = i18n( "Shred source file:

    Checking this option will shred (overwrite several times before erasing) the files you have encrypted. This way, it is almost impossible that the source file is recovered.

    But you must be aware that this is not secure on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).

    "); + TQString shredWhatsThis = i18n( "Shred source file:

    Checking this option will shred (overwrite several times before erasing) the files you have encrypted. This way, it is almost impossible that the source file is recovered.

    But you must be aware that this is not secure on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).

    "); KActiveLabel *warn= new KActiveLabel( i18n("
    Read this before using shredding").arg(shredWhatsThis),parentBox ); shredBox->addWidget(CBshred); shredBox->addWidget(warn); } - CBsymmetric=new QCheckBox(i18n("Symmetrical encryption"),boutonboxoptions); - QWhatsThis::add + CBsymmetric=new TQCheckBox(i18n("Symmetrical encryption"),boutonboxoptions); + TQWhatsThis::add (CBsymmetric,i18n("Symmetrical encryption: encryption does not use keys. You just need to give a password " "to encrypt/decrypt the file")); - QObject::connect(CBsymmetric,SIGNAL(toggled(bool)),this,SLOT(isSymetric(bool))); + TQObject::connect(CBsymmetric,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(isSymetric(bool))); //BEGIN modified for Kopete @@ -206,27 +206,27 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent //END modified for Kopete /*if (KGpgSettings::allowCustomEncryptionOptions()) { - QHButtonGroup *bGroup = new QHButtonGroup(page); - //bGroup->setFrameStyle(QFrame::NoFrame); - (void) new QLabel(i18n("Custom option:"),bGroup); + TQHButtonGroup *bGroup = new TQHButtonGroup(page); + //bGroup->setFrameStyle(TQFrame::NoFrame); + (void) new TQLabel(i18n("Custom option:"),bGroup); KLineEdit *optiontxt=new KLineEdit(bGroup); optiontxt->setText(customOptions); - QWhatsThis::add + TQWhatsThis::add (optiontxt,i18n("Custom option: for experienced users only, allows you to enter a gpg command line option, like: '--armor'")); - QObject::connect(optiontxt,SIGNAL(textChanged ( const QString & )),this,SLOT(customOpts(const QString & ))); + TQObject::connect(optiontxt,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(customOpts(const TQString & ))); }*/ - QObject::connect(keysList,SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),this,SLOT(slotOk())); -// QObject::connect(this,SIGNAL(okClicked()),this,SLOT(crypte())); - QObject::connect(CBuntrusted,SIGNAL(toggled(bool)),this,SLOT(refresh(bool))); + TQObject::connect(keysList,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(slotOk())); +// TQObject::connect(this,TQT_SIGNAL(okClicked()),this,TQT_SLOT(crypte())); + TQObject::connect(CBuntrusted,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(refresh(bool))); char line[200]="\0"; FILE *fp2; - seclist=QString::null; + seclist=TQString::null; fp2 = popen("gpg --no-secmem-warning --no-tty --with-colon --list-secret-keys ", "r"); while ( fgets( line, sizeof(line), fp2)) { - QString readLine=line; + TQString readLine=line; if (readLine.startsWith("sec")) seclist+=", 0x"+readLine.section(":",4,4).right(8); } pclose(fp2); @@ -251,7 +251,7 @@ accept(); void popupPublic::enable() { - QListViewItem *current = keysList->firstChild(); + TQListViewItem *current = keysList->firstChild(); if (current==NULL) return; current->setVisible(true); @@ -265,7 +265,7 @@ void popupPublic::enable() void popupPublic::sort() { bool reselect=false; - QListViewItem *current = keysList->firstChild(); + TQListViewItem *current = keysList->firstChild(); if (current==NULL) return; @@ -289,7 +289,7 @@ void popupPublic::sort() } if (reselect) { - QListViewItem *firstvisible; + TQListViewItem *firstvisible; firstvisible=keysList->firstChild(); while (firstvisible->isVisible()!=true) { firstvisible=firstvisible->nextSibling(); @@ -310,14 +310,14 @@ void popupPublic::isSymetric(bool state) } -void popupPublic::customOpts(const QString &str) +void popupPublic::customOpts(const TQString &str) { customOptions=str; } void popupPublic::slotGotoDefaultKey() { - /*QListViewItem *myDefaulKey = keysList->findItem(KGpgSettings::defaultKey(),2); + /*TQListViewItem *myDefaulKey = keysList->findItem(KGpgSettings::defaultKey(),2); keysList->clearSelection(); keysList->setCurrentItem(myDefaulKey); keysList->setSelected(myDefaulKey,true); @@ -335,14 +335,14 @@ void popupPublic::refresh(bool state) void popupPublic::refreshkeys() { keysList->clear(); - /*QStringList groups= QStringList::split(",", KGpgSettings::groups()); + /*TQStringList groups= TQStringList::split(",", KGpgSettings::groups()); if (!groups.isEmpty()) { - for ( QStringList::Iterator it = groups.begin(); it != groups.end(); ++it ) + for ( TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it ) { - if (!QString(*it).isEmpty()) + if (!TQString(*it).isEmpty()) { - UpdateViewItem2 *item=new UpdateViewItem2(keysList,QString(*it),QString::null,QString::null,false); + UpdateViewItem2 *item=new UpdateViewItem2(keysList,TQString(*it),TQString::null,TQString::null,false); item->setPixmap(0,keyGroup); } } @@ -350,14 +350,14 @@ void popupPublic::refreshkeys() KProcIO *encid=new KProcIO(); *encid << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-keys"; ///////// when process ends, update dialog infos - QObject::connect(encid, SIGNAL(processExited(KProcess *)),this, SLOT(slotpreselect())); - QObject::connect(encid, SIGNAL(readReady(KProcIO *)),this, SLOT(slotprocread(KProcIO *))); + TQObject::connect(encid, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotpreselect())); + TQObject::connect(encid, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotprocread(KProcIO *))); encid->start(KProcess::NotifyOnExit,true); } void popupPublic::slotpreselect() { -QListViewItem *it; +TQListViewItem *it; //if (fmode) it=keysList->findItem(KGpgSettings::defaultKey(),2); //else { it=keysList->firstChild(); @@ -386,20 +386,20 @@ void popupPublic::slotprocread(KProcIO *p) { ///////////////////////////////////////////////////////////////// extract encryption keys bool dead; - QString tst,keyname,keymail; + TQString tst,keyname,keymail; - QString defaultKey ;// = KGpgSettings::defaultKey().right(8); + TQString defaultKey ;// = KGpgSettings::defaultKey().right(8); while (p->readln(tst)!=-1) { if (tst.startsWith("pub")) { - QStringList keyString=QStringList::split(":",tst,true); + TQStringList keyString=TQStringList::split(":",tst,true); dead=false; - const QString trust=keyString[1]; - QString val=keyString[6]; - QString id=QString("0x"+keyString[4].right(8)); + const TQString trust=keyString[1]; + TQString val=keyString[6]; + TQString id=TQString("0x"+keyString[4].right(8)); if (val.isEmpty()) val=i18n("Unlimited"); - QString tr; + TQString tr; switch( trust[0] ) { case 'o': untrustedList< list=keysList->selectedItems(); + TQStringList selectedKeys; + TQString userid; + TQPtrList list=keysList->selectedItems(); for ( uint i = 0; i < list.count(); ++i ) if ( list.at(i) ) { @@ -492,7 +492,7 @@ kdDebug(2100)<<"Ok pressed"<isChecked()) return; kdDebug(2100)<<"Selected Key:"<isChecked()) returnOptions<<"--always-trust"; if (CBarmor->isChecked()) @@ -500,14 +500,14 @@ kdDebug(2100)<<"Selected Key:"<isChecked()) returnOptions<<"--throw-keyid"; /*if ((KGpgSettings::allowCustomEncryptionOptions()) && (!customOptions.stripWhiteSpace().isEmpty())) - returnOptions.operator+ (QStringList::split(QString(" "),customOptions.simplifyWhiteSpace()));*/ + returnOptions.operator+ (TQStringList::split(TQString(" "),customOptions.simplifyWhiteSpace()));*/ //hide(); //MODIFIED for kopete if (fmode) - emit selectedKey(selectedKeys.first(),QString(),CBshred->isChecked(),CBsymmetric->isChecked()); + emit selectedKey(selectedKeys.first(),TQString(),CBshred->isChecked(),CBsymmetric->isChecked()); else - emit selectedKey(selectedKeys.first(),QString(),false,CBsymmetric->isChecked()); + emit selectedKey(selectedKeys.first(),TQString(),false,CBsymmetric->isChecked()); accept(); } diff --git a/kopete/plugins/cryptography/popuppublic.h b/kopete/plugins/cryptography/popuppublic.h index 7e147385..ac8ab068 100644 --- a/kopete/plugins/cryptography/popuppublic.h +++ b/kopete/plugins/cryptography/popuppublic.h @@ -36,22 +36,22 @@ class popupPublic : public KDialogBase //QDialog Q_OBJECT public: - popupPublic(QWidget *parent=0, const char *name=0,QString sfile="",bool filemode=false,KShortcut goDefaultKey=QKeySequence(CTRL+Qt::Key_Home)); + popupPublic(TQWidget *parent=0, const char *name=0,TQString sfile="",bool filemode=false,KShortcut goDefaultKey=TQKeySequence(CTRL+Qt::Key_Home)); ~popupPublic(); KListView *keysList; - QCheckBox *CBarmor,*CBuntrusted,*CBshred,*CBsymmetric,*CBhideid; + TQCheckBox *CBarmor,*CBuntrusted,*CBshred,*CBsymmetric,*CBhideid; bool fmode,trusted; - QPixmap keyPair,keySingle,keyGroup; - QString seclist; - QStringList untrustedList; + TQPixmap keyPair,keySingle,keyGroup; + TQString seclist; + TQStringList untrustedList; private: KConfig *config; - QButtonGroup *boutonboxoptions; - QString customOptions; + TQButtonGroup *boutonboxoptions; + TQString customOptions; private slots: - void customOpts(const QString &); + void customOpts(const TQString &); void slotprocread(KProcIO *); void slotpreselect(); void refreshkeys(); @@ -69,7 +69,7 @@ protected slots: virtual void slotOk(); signals: - void selectedKey(QString & ,QString,bool,bool); + void selectedKey(TQString & ,TQString,bool,bool); void keyListFilled(); }; diff --git a/kopete/plugins/highlight/filter.h b/kopete/plugins/highlight/filter.h index b2ac0794..876abf95 100644 --- a/kopete/plugins/highlight/filter.h +++ b/kopete/plugins/highlight/filter.h @@ -19,8 +19,8 @@ #define FILTER_H -#include -#include +#include +#include /** * @author Olivier Goffart @@ -31,8 +31,8 @@ public: Filter(); ~Filter(); - QString displayName; - QString search; + TQString displayName; + TQString search; bool caseSensitive; bool isRegExp; @@ -40,13 +40,13 @@ public: unsigned int importance; bool setFG; - QColor FG; + TQColor FG; bool setBG; - QColor BG; + TQColor BG; bool playSound; - QString soundFN; + TQString soundFN; bool raiseView; }; diff --git a/kopete/plugins/highlight/highlightconfig.cpp b/kopete/plugins/highlight/highlightconfig.cpp index ba97e6a8..d6e04d7f 100644 --- a/kopete/plugins/highlight/highlightconfig.cpp +++ b/kopete/plugins/highlight/highlightconfig.cpp @@ -16,11 +16,11 @@ ************************************************************************* */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -53,7 +53,7 @@ void HighlightConfig::appendFilter(Filter *f) m_filters.append(f); } -QPtrList HighlightConfig::filters() const +TQPtrList HighlightConfig::filters() const { return m_filters; } @@ -78,68 +78,68 @@ void HighlightConfig::load() { m_filters.clear(); //clear filters - QString filename = locateLocal( "appdata", QString::fromLatin1( "highlight.xml" ) ); + TQString filename = locateLocal( "appdata", TQString::fromLatin1( "highlight.xml" ) ); if( filename.isEmpty() ) return ; - QDomDocument filterList( QString::fromLatin1( "highlight-plugin" ) ); + TQDomDocument filterList( TQString::fromLatin1( "highlight-plugin" ) ); - QFile filterListFile( filename ); + TQFile filterListFile( filename ); filterListFile.open( IO_ReadOnly ); filterList.setContent( &filterListFile ); - QDomElement list = filterList.documentElement(); + TQDomElement list = filterList.documentElement(); - QDomNode node = list.firstChild(); + TQDomNode node = list.firstChild(); while( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if( !element.isNull() ) { -// if( element.tagName() == QString::fromLatin1("filter") +// if( element.tagName() == TQString::fromLatin1("filter") // { Filter *filtre=newFilter(); - QDomNode filterNode = node.firstChild(); + TQDomNode filterNode = node.firstChild(); while( !filterNode.isNull() ) { - QDomElement filterElement = filterNode.toElement(); + TQDomElement filterElement = filterNode.toElement(); if( !filterElement.isNull() ) { - if( filterElement.tagName() == QString::fromLatin1( "display-name" ) ) + if( filterElement.tagName() == TQString::fromLatin1( "display-name" ) ) { filtre->displayName = filterElement.text(); } - else if( filterElement.tagName() == QString::fromLatin1( "search" ) ) + else if( filterElement.tagName() == TQString::fromLatin1( "search" ) ) { filtre->search = filterElement.text(); - filtre->caseSensitive= ( filterElement.attribute( QString::fromLatin1( "caseSensitive" ), QString::fromLatin1( "1" ) ) == QString::fromLatin1( "1" ) ); - filtre->isRegExp= ( filterElement.attribute( QString::fromLatin1( "regExp" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) ); + filtre->caseSensitive= ( filterElement.attribute( TQString::fromLatin1( "caseSensitive" ), TQString::fromLatin1( "1" ) ) == TQString::fromLatin1( "1" ) ); + filtre->isRegExp= ( filterElement.attribute( TQString::fromLatin1( "regExp" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); } - else if( filterElement.tagName() == QString::fromLatin1( "FG" ) ) + else if( filterElement.tagName() == TQString::fromLatin1( "FG" ) ) { filtre->FG = filterElement.text(); - filtre->setFG= ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) ); + filtre->setFG= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); } - else if( filterElement.tagName() == QString::fromLatin1( "BG" ) ) + else if( filterElement.tagName() == TQString::fromLatin1( "BG" ) ) { filtre->BG = filterElement.text(); - filtre->setBG= ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) ); + filtre->setBG= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); } - else if( filterElement.tagName() == QString::fromLatin1( "importance" ) ) + else if( filterElement.tagName() == TQString::fromLatin1( "importance" ) ) { filtre->importance = filterElement.text().toUInt(); - filtre->setImportance= ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) ); + filtre->setImportance= ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); } - else if( filterElement.tagName() == QString::fromLatin1( "sound" ) ) + else if( filterElement.tagName() == TQString::fromLatin1( "sound" ) ) { filtre->soundFN = filterElement.text(); - filtre->playSound = ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) ); + filtre->playSound = ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); } - else if( filterElement.tagName() == QString::fromLatin1( "raise" ) ) + else if( filterElement.tagName() == TQString::fromLatin1( "raise" ) ) { - filtre->raiseView = ( filterElement.attribute( QString::fromLatin1( "set" ), QString::fromLatin1( "0" ) ) == QString::fromLatin1( "1" ) ); + filtre->raiseView = ( filterElement.attribute( TQString::fromLatin1( "set" ), TQString::fromLatin1( "0" ) ) == TQString::fromLatin1( "1" ) ); } } filterNode = filterNode.nextSibling(); @@ -154,50 +154,50 @@ void HighlightConfig::load() void HighlightConfig::save() { - QString fileName = locateLocal( "appdata", QString::fromLatin1( "highlight.xml" ) ); + TQString fileName = locateLocal( "appdata", TQString::fromLatin1( "highlight.xml" ) ); KSaveFile file( fileName ); if( file.status() == 0 ) { - QTextStream *stream = file.textStream(); - stream->setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream *stream = file.textStream(); + stream->setEncoding( TQTextStream::UnicodeUTF8 ); - QString xml = QString::fromLatin1( + TQString xml = TQString::fromLatin1( "\n" "\n" "\n" ); // Save metafilter information. - QPtrListIterator filtreIt( m_filters ); + TQPtrListIterator filtreIt( m_filters ); for( ; filtreIt.current(); ++filtreIt ) { Filter *filtre = *filtreIt; - xml += QString::fromLatin1( " \n " ) - + QStyleSheet::escape(filtre->displayName) - + QString::fromLatin1( "\n" ); + xml += TQString::fromLatin1( " \n " ) + + TQStyleSheet::escape(filtre->displayName) + + TQString::fromLatin1( "\n" ); - xml += QString::fromLatin1(" ( filtre->caseSensitive ) ) + - QString::fromLatin1("\" regExp=\"") + QString::number( static_cast( filtre->isRegExp ) ) + - QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->search ) + QString::fromLatin1( "\n" ); + xml += TQString::fromLatin1(" ( filtre->caseSensitive ) ) + + TQString::fromLatin1("\" regExp=\"") + TQString::number( static_cast( filtre->isRegExp ) ) + + TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->search ) + TQString::fromLatin1( "\n" ); - xml += QString::fromLatin1(" ( filtre->setBG ) ) + - QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->BG.name() ) + QString::fromLatin1( "\n" ); - xml += QString::fromLatin1(" ( filtre->setFG ) ) + - QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->FG.name() ) + QString::fromLatin1( "\n" ); + xml += TQString::fromLatin1(" ( filtre->setBG ) ) + + TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->BG.name() ) + TQString::fromLatin1( "\n" ); + xml += TQString::fromLatin1(" ( filtre->setFG ) ) + + TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->FG.name() ) + TQString::fromLatin1( "\n" ); - xml += QString::fromLatin1(" ( filtre->setImportance ) ) + - QString::fromLatin1( "\">" ) + QString::number( filtre->importance ) + QString::fromLatin1( "\n" ); + xml += TQString::fromLatin1(" ( filtre->setImportance ) ) + + TQString::fromLatin1( "\">" ) + TQString::number( filtre->importance ) + TQString::fromLatin1( "\n" ); - xml += QString::fromLatin1(" ( filtre->playSound ) ) + - QString::fromLatin1( "\">" ) + QStyleSheet::escape( filtre->soundFN ) + QString::fromLatin1( "\n" ); + xml += TQString::fromLatin1(" ( filtre->playSound ) ) + + TQString::fromLatin1( "\">" ) + TQStyleSheet::escape( filtre->soundFN ) + TQString::fromLatin1( "\n" ); - xml += QString::fromLatin1(" ( filtre->raiseView ) ) + - QString::fromLatin1( "\">\n" ); + xml += TQString::fromLatin1(" ( filtre->raiseView ) ) + + TQString::fromLatin1( "\">\n" ); - xml += QString::fromLatin1( " \n" ); + xml += TQString::fromLatin1( " \n" ); } - xml += QString::fromLatin1( "\n" ); + xml += TQString::fromLatin1( "\n" ); *stream << xml; } diff --git a/kopete/plugins/highlight/highlightconfig.h b/kopete/plugins/highlight/highlightconfig.h index 35813403..b2d251c7 100644 --- a/kopete/plugins/highlight/highlightconfig.h +++ b/kopete/plugins/highlight/highlightconfig.h @@ -18,8 +18,8 @@ #ifndef HIGHLIGHTCONFIG_H #define HIGHLIGHTCONFIG_H -#include -#include +#include +#include class Filter; @@ -32,13 +32,13 @@ public: void load(); void save(); - QPtrList filters() const; + TQPtrList filters() const; void removeFilter (Filter *f); void appendFilter (Filter *f); Filter* newFilter(); private: - QPtrList m_filters; + TQPtrList m_filters; }; #endif diff --git a/kopete/plugins/highlight/highlightplugin.cpp b/kopete/plugins/highlight/highlightplugin.cpp index 2f1cbb43..7ec6ba5e 100644 --- a/kopete/plugins/highlight/highlightplugin.cpp +++ b/kopete/plugins/highlight/highlightplugin.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include +#include #include #include @@ -29,14 +29,14 @@ typedef KGenericFactory HighlightPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_highlight, HighlightPluginFactory( "kopete_highlight" ) ) -HighlightPlugin::HighlightPlugin( QObject *parent, const char *name, const QStringList &/*args*/ ) +HighlightPlugin::HighlightPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ ) : Kopete::Plugin( HighlightPluginFactory::instance(), parent, name ) { if( !pluginStatic_ ) pluginStatic_=this; - connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToDisplay( Kopete::Message & ) ), SLOT( slotIncomingMessage( Kopete::Message & ) ) ); - connect ( this , SIGNAL( settingsChanged() ) , this , SLOT( slotSettingsChanged() ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ), TQT_SLOT( slotIncomingMessage( Kopete::Message & ) ) ); + connect ( this , TQT_SIGNAL( settingsChanged() ) , this , TQT_SLOT( slotSettingsChanged() ) ); m_config = new HighlightConfig; @@ -63,14 +63,14 @@ void HighlightPlugin::slotIncomingMessage( Kopete::Message& msg ) return; // FIXME: highlighted internal/actions messages are not showed correctly in the chat window (bad style) // but they should maybe be highlinghted if needed - QPtrList filters=m_config->filters(); - QPtrListIterator it( filters ); + TQPtrList filters=m_config->filters(); + TQPtrListIterator it( filters ); Filter *f; while ((f = it.current()) != 0 ) { ++it; if(f->isRegExp ? - msg.plainBody().contains(QRegExp(f->search , f->caseSensitive)) : + msg.plainBody().contains(TQRegExp(f->search , f->caseSensitive)) : msg.plainBody().contains(f->search , f->caseSensitive) ) { if(f->setBG) @@ -80,7 +80,7 @@ void HighlightPlugin::slotIncomingMessage( Kopete::Message& msg ) if(f->setImportance) msg.setImportance((Kopete::Message::MessageImportance)f->importance); if(f->playSound) - KNotifyClient::userEvent (QString::null, KNotifyClient::Sound, KNotifyClient::Default, f->soundFN ); + KNotifyClient::userEvent (TQString::null, KNotifyClient::Sound, KNotifyClient::Default, f->soundFN ); if (f->raiseView && msg.manager() && msg.manager()->view()) { diff --git a/kopete/plugins/highlight/highlightplugin.h b/kopete/plugins/highlight/highlightplugin.h index 0a421f55..2ea151d9 100644 --- a/kopete/plugins/highlight/highlightplugin.h +++ b/kopete/plugins/highlight/highlightplugin.h @@ -18,9 +18,9 @@ #ifndef HighlightPLUGIN_H #define HighlightPLUGIN_H -#include -#include -#include +#include +#include +#include #include "kopetemessage.h" #include "kopeteplugin.h" @@ -47,7 +47,7 @@ class HighlightPlugin : public Kopete::Plugin public: static HighlightPlugin *plugin(); - HighlightPlugin( QObject *parent, const char *name, const QStringList &args ); + HighlightPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~HighlightPlugin(); public slots: diff --git a/kopete/plugins/highlight/highlightpreferences.cpp b/kopete/plugins/highlight/highlightpreferences.cpp index 9641d034..5e8da39c 100644 --- a/kopete/plugins/highlight/highlightpreferences.cpp +++ b/kopete/plugins/highlight/highlightpreferences.cpp @@ -15,8 +15,8 @@ * * ***************************************************************************/ -#include -#include +#include +#include #include #include @@ -39,35 +39,35 @@ typedef KGenericFactory HighlightPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_highlight, HighlightPreferencesFactory( "kcm_kopete_highlight" ) ) -HighlightPreferences::HighlightPreferences(QWidget *parent, const char* /*name*/, const QStringList &args) +HighlightPreferences::HighlightPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) : KCModule(HighlightPreferencesFactory::instance(), parent, args) { donttouch=true; - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new HighlightPrefsUI(this); m_config = new HighlightConfig; - connect(preferencesDialog->m_list , SIGNAL(selectionChanged()) , this , SLOT(slotCurrentFilterChanged())); - connect(preferencesDialog->m_list , SIGNAL(doubleClicked ( QListViewItem *, const QPoint &, int )) , this , SLOT(slotRenameFilter())); - connect(preferencesDialog->m_add , SIGNAL(pressed()) , this , SLOT(slotAddFilter())); - connect(preferencesDialog->m_remove , SIGNAL(pressed()) , this , SLOT(slotRemoveFilter())); - connect(preferencesDialog->m_rename , SIGNAL(pressed()) , this , SLOT(slotRenameFilter())); - connect(preferencesDialog->m_editregexp , SIGNAL(pressed()) , this , SLOT(slotEditRegExp())); + connect(preferencesDialog->m_list , TQT_SIGNAL(selectionChanged()) , this , TQT_SLOT(slotCurrentFilterChanged())); + connect(preferencesDialog->m_list , TQT_SIGNAL(doubleClicked ( TQListViewItem *, const TQPoint &, int )) , this , TQT_SLOT(slotRenameFilter())); + connect(preferencesDialog->m_add , TQT_SIGNAL(pressed()) , this , TQT_SLOT(slotAddFilter())); + connect(preferencesDialog->m_remove , TQT_SIGNAL(pressed()) , this , TQT_SLOT(slotRemoveFilter())); + connect(preferencesDialog->m_rename , TQT_SIGNAL(pressed()) , this , TQT_SLOT(slotRenameFilter())); + connect(preferencesDialog->m_editregexp , TQT_SIGNAL(pressed()) , this , TQT_SLOT(slotEditRegExp())); //Maybe here i should use a slot per widget, but i am too lazy - connect(preferencesDialog->m_case , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_regexp , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_setImportance , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_setBG , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_setFG , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_search , SIGNAL(textChanged(const QString&)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_sound , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_soundFN , SIGNAL(textChanged(const QString&)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_raise , SIGNAL(stateChanged(int)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_search , SIGNAL(textChanged(const QString&)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_importance , SIGNAL(activated(int)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_FG , SIGNAL(changed(const QColor&)) , this , SLOT(slotSomethingHasChanged())); - connect(preferencesDialog->m_BG , SIGNAL(changed(const QColor&)) , this , SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_case , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_regexp , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_setImportance , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_setBG , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_setFG , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_search , TQT_SIGNAL(textChanged(const TQString&)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_sound , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_soundFN , TQT_SIGNAL(textChanged(const TQString&)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_raise , TQT_SIGNAL(stateChanged(int)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_search , TQT_SIGNAL(textChanged(const TQString&)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_importance , TQT_SIGNAL(activated(int)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_FG , TQT_SIGNAL(changed(const TQColor&)) , this , TQT_SLOT(slotSomethingHasChanged())); + connect(preferencesDialog->m_BG , TQT_SIGNAL(changed(const TQColor&)) , this , TQT_SLOT(slotSomethingHasChanged())); load(); donttouch=false; @@ -85,14 +85,14 @@ void HighlightPreferences::load() preferencesDialog->m_list->clear(); m_filterItems.clear(); - QPtrList filters=m_config->filters(); - QPtrListIterator it( filters ); + TQPtrList filters=m_config->filters(); + TQPtrListIterator it( filters ); Filter *f; bool first=true; while ( (f=it.current()) != 0 ) { ++it; - QListViewItem* lvi= new QListViewItem(preferencesDialog->m_list); + TQListViewItem* lvi= new TQListViewItem(preferencesDialog->m_list); lvi->setText(0,f->displayName ); m_filterItems.insert(lvi,f); if(first) @@ -172,7 +172,7 @@ void HighlightPreferences::slotCurrentFilterChanged() void HighlightPreferences::slotAddFilter() { Filter *filtre=m_config->newFilter(); - QListViewItem* lvi= new QListViewItem(preferencesDialog->m_list); + TQListViewItem* lvi= new TQListViewItem(preferencesDialog->m_list); lvi->setText(0,filtre->displayName ); m_filterItems.insert(lvi,filtre); preferencesDialog->m_list->setSelected(lvi, true); @@ -180,7 +180,7 @@ void HighlightPreferences::slotAddFilter() void HighlightPreferences::slotRemoveFilter() { - QListViewItem *lvi=preferencesDialog->m_list->selectedItem(); + TQListViewItem *lvi=preferencesDialog->m_list->selectedItem(); if(!lvi) return; Filter *current=m_filterItems[lvi]; @@ -195,7 +195,7 @@ void HighlightPreferences::slotRemoveFilter() void HighlightPreferences::slotRenameFilter() { - QListViewItem *lvi=preferencesDialog->m_list->selectedItem(); + TQListViewItem *lvi=preferencesDialog->m_list->selectedItem(); if(!lvi) return; Filter *current=m_filterItems[lvi]; @@ -203,7 +203,7 @@ void HighlightPreferences::slotRenameFilter() return; bool ok; - QString newname = KInputDialog::getText( + TQString newname = KInputDialog::getText( i18n( "Rename Filter" ), i18n( "Please enter the new name for the filter:" ), current->displayName, &ok ); if( !ok ) return; @@ -242,7 +242,7 @@ void HighlightPreferences::slotSomethingHasChanged() void HighlightPreferences::slotEditRegExp() { - QDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery( "KRegExpEditor/KRegExpEditor" ); + TQDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery( "KRegExpEditor/KRegExpEditor" ); if ( editorDialog ) { // kdeutils was installed, so the dialog was found fetch the editor interface @@ -252,7 +252,7 @@ void HighlightPreferences::slotEditRegExp() editor->setRegExp(preferencesDialog->m_search->text()); // Finally exec the dialog - if(editorDialog->exec() == QDialog::Accepted ) + if(editorDialog->exec() == TQDialog::Accepted ) { preferencesDialog->m_search->setText(editor->regExp()); } diff --git a/kopete/plugins/highlight/highlightpreferences.h b/kopete/plugins/highlight/highlightpreferences.h index a2c7e31b..b6e2a8e1 100644 --- a/kopete/plugins/highlight/highlightpreferences.h +++ b/kopete/plugins/highlight/highlightpreferences.h @@ -19,7 +19,7 @@ #define HighlightPREFERENCES_H #include -#include +#include class HighlightPrefsUI; class Filter; @@ -33,7 +33,7 @@ class HighlightPreferences : public KCModule { Q_OBJECT public: - HighlightPreferences(QWidget *parent = 0, const char* name = 0, const QStringList &args = QStringList()); + HighlightPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); ~HighlightPreferences(); virtual void save(); @@ -42,7 +42,7 @@ public: private: HighlightPrefsUI *preferencesDialog; HighlightConfig *m_config; - QMap m_filterItems; + TQMap m_filterItems; bool donttouch; diff --git a/kopete/plugins/history/converter.cpp b/kopete/plugins/history/converter.cpp index 22f662bc..d2e4839d 100644 --- a/kopete/plugins/history/converter.cpp +++ b/kopete/plugins/history/converter.cpp @@ -28,9 +28,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #define CBUFLENGTH 512 // buffer length for fgets() @@ -40,27 +40,27 @@ void HistoryPlugin::convertOldHistory() i18n( "Would you like to remove old history files?" ) , i18n( "History Converter" ), KStdGuiItem::del(), i18n("Keep") ) == KMessageBox::Yes; KProgressDialog *progressDlg=new KProgressDialog(Kopete::UI::Global::mainWidget() , "history_progress_dlg" , i18n( "History converter" ) , - QString::null , true); //modal to make sure the user will not doing stupid things (we have a kapp->processEvents()) + TQString::null , true); //modal to make sure the user will not doing stupid things (we have a kapp->processEvents()) progressDlg->setAllowCancel(false); //because i am too lazy to allow to cancel - QString kopetedir=locateLocal( "data", QString::fromLatin1( "kopete")); - QDir d( kopetedir ); //d should point to ~/.kde/share/apps/kopete/ + TQString kopetedir=locateLocal( "data", TQString::fromLatin1( "kopete")); + TQDir d( kopetedir ); //d should point to ~/.kde/share/apps/kopete/ - d.setFilter( QDir::Dirs ); + d.setFilter( TQDir::Dirs ); const QFileInfoList *list = d.entryInfoList(); QFileInfoListIterator it( *list ); - QFileInfo *fi; + TQFileInfo *fi; while ( (fi = it.current()) != 0 ) { - QString protocolId; - QString accountId; + TQString protocolId; + TQString accountId; if( Kopete::Protocol *p = dynamic_cast( Kopete::PluginManager::self()->plugin( fi->fileName() ) ) ) { protocolId=p->pluginId(); - QDictIterator it(Kopete::AccountManager::self()->accounts(p)); + TQDictIterator it(Kopete::AccountManager::self()->accounts(p)); Kopete::Account *a = it.current(); if(a) accountId=a->accountId(); @@ -103,12 +103,12 @@ void HistoryPlugin::convertOldHistory() if(!protocolId.isEmpty() || !accountId.isEmpty()) { - QDir d2( fi->absFilePath() ); - d2.setFilter( QDir::Files ); + TQDir d2( fi->absFilePath() ); + d2.setFilter( TQDir::Files ); d2.setNameFilter("*.log"); const QFileInfoList *list = d2.entryInfoList(); QFileInfoListIterator it2( *list ); - QFileInfo *fi2; + TQFileInfo *fi2; progressDlg->progressBar()->reset(); progressDlg->progressBar()->setTotalSteps(d2.count()); @@ -118,7 +118,7 @@ void HistoryPlugin::convertOldHistory() while ( (fi2 = it2.current()) != 0 ) { //we assume that all "-" are dots. (like in hotmail.com) - QString contactId=fi2->fileName().replace(".log" , QString::null).replace("-" , "."); + TQString contactId=fi2->fileName().replace(".log" , TQString::null).replace("-" , "."); if(!contactId.isEmpty() ) { @@ -127,48 +127,48 @@ void HistoryPlugin::convertOldHistory() int month=0; int year=0; - QDomDocument doc; - QDomElement docElem; + TQDomDocument doc; + TQDomElement docElem; - QDomElement msgelement; - QDomNode node; - QDomDocument xmllist; + TQDomElement msgelement; + TQDomNode node; + TQDomDocument xmllist; Kopete::Message::MessageDirection dir; - QString body, date, nick; - QString buffer, msgBlock; + TQString body, date, nick; + TQString buffer, msgBlock; char cbuf[CBUFLENGTH]; // buffer for the log file - QString logFileName = fi2->absFilePath(); + TQString logFileName = fi2->absFilePath(); // open the file - FILE *f = fopen(QFile::encodeName(logFileName), "r"); + FILE *f = fopen(TQFile::encodeName(logFileName), "r"); // create a new block while ( ! feof( f ) ) { fgets(cbuf, CBUFLENGTH, f); - buffer = QString::fromUtf8(cbuf); + buffer = TQString::fromUtf8(cbuf); while ( strchr(cbuf, '\n') == NULL && !feof(f) ) { fgets( cbuf, CBUFLENGTH, f ); - buffer += QString::fromUtf8(cbuf); + buffer += TQString::fromUtf8(cbuf); } - if( buffer.startsWith( QString::fromLatin1( "\n" ) /*strcmp("\n", cbuf )*/ ) + while( !feof( f ) && buffer != TQString::fromLatin1( "\n" ) /*strcmp("
    \n", cbuf )*/ ) { fgets(cbuf, CBUFLENGTH, f); - buffer = QString::fromUtf8(cbuf); + buffer = TQString::fromUtf8(cbuf); while ( strchr(cbuf, '\n') == NULL && !feof(f) ) { fgets( cbuf, CBUFLENGTH, f ); - buffer += QString::fromUtf8(cbuf); + buffer += TQString::fromUtf8(cbuf); } msgBlock.append(buffer); } @@ -178,14 +178,14 @@ void HistoryPlugin::convertOldHistory() msgelement = xmllist.documentElement(); node = msgelement.firstChild(); - if( msgelement.attribute( QString::fromLatin1( "direction" ) ) == QString::fromLatin1( "inbound" ) ) + if( msgelement.attribute( TQString::fromLatin1( "direction" ) ) == TQString::fromLatin1( "inbound" ) ) dir = Kopete::Message::Inbound; else dir = Kopete::Message::Outbound; // Read all the elements. - QString tagname; - QDomElement element; + TQString tagname; + TQDomElement element; while ( ! node.isNull() ) { @@ -194,12 +194,12 @@ void HistoryPlugin::convertOldHistory() element = node.toElement(); tagname = element.tagName(); - if( tagname == QString::fromLatin1( "srcnick" ) ) + if( tagname == TQString::fromLatin1( "srcnick" ) ) nick = element.text(); - else if( tagname == QString::fromLatin1( "date" ) ) + else if( tagname == TQString::fromLatin1( "date" ) ) date = element.text(); - else if( tagname == QString::fromLatin1( "body" ) ) + else if( tagname == TQString::fromLatin1( "body" ) ) body = element.text().stripWhiteSpace(); } @@ -207,21 +207,21 @@ void HistoryPlugin::convertOldHistory() } //FIXME!! The date in logs writed with kopete running with QT 3.0 is Localised. // so QT can't parse it correctly. - QDateTime dt=QDateTime::fromString(date); + TQDateTime dt=TQDateTime::fromString(date); if(dt.date().month() != month || dt.date().year() != year) { if(!docElem.isNull()) { - QDate date(year,month,1); - QString name = protocolId.replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + - QString::fromLatin1( "/" ) + - contactId.replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + + TQDate date(year,month,1); + TQString name = protocolId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString::fromLatin1( "/" ) + + contactId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + date.toString(".yyyyMM"); - KSaveFile file( locateLocal( "data", QString::fromLatin1( "kopete/logs/" ) + name+ QString::fromLatin1( ".xml" ) ) ); + KSaveFile file( locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ); if( file.status() == 0 ) { - QTextStream *stream = file.textStream(); - //stream->setEncoding( QTextStream::UnicodeUTF8 ); //???? oui ou non? + TQTextStream *stream = file.textStream(); + //stream->setEncoding( TQTextStream::UnicodeUTF8 ); //???? oui ou non? doc.save( *stream , 1 ); file.close(); } @@ -230,39 +230,39 @@ void HistoryPlugin::convertOldHistory() month=dt.date().month(); year=dt.date().year(); - docElem=QDomElement(); + docElem=TQDomElement(); } if(docElem.isNull()) { - doc=QDomDocument("Kopete-History"); + doc=TQDomDocument("Kopete-History"); docElem= doc.createElement( "kopete-history" ); docElem.setAttribute ( "version" , "0.7" ); doc.appendChild( docElem ); - QDomElement headElem = doc.createElement( "head" ); + TQDomElement headElem = doc.createElement( "head" ); docElem.appendChild( headElem ); - QDomElement dateElem = doc.createElement( "date" ); - dateElem.setAttribute( "year", QString::number(year) ); - dateElem.setAttribute( "month", QString::number(month) ); + TQDomElement dateElem = doc.createElement( "date" ); + dateElem.setAttribute( "year", TQString::number(year) ); + dateElem.setAttribute( "month", TQString::number(month) ); headElem.appendChild(dateElem); - QDomElement myselfElem = doc.createElement( "contact" ); + TQDomElement myselfElem = doc.createElement( "contact" ); myselfElem.setAttribute( "type", "myself" ); myselfElem.setAttribute( "contactId", accountId ); headElem.appendChild(myselfElem); - QDomElement contactElem = doc.createElement( "contact" ); + TQDomElement contactElem = doc.createElement( "contact" ); contactElem.setAttribute( "contactId", contactId ); headElem.appendChild(contactElem); - QDomElement importElem = doc.createElement( "imported" ); + TQDomElement importElem = doc.createElement( "imported" ); importElem.setAttribute( "from", fi->fileName() ); - importElem.setAttribute( "date", QDateTime::currentDateTime().toString() ); + importElem.setAttribute( "date", TQDateTime::currentDateTime().toString() ); headElem.appendChild(importElem); } - QDomElement msgElem = doc.createElement( "msg" ); + TQDomElement msgElem = doc.createElement( "msg" ); msgElem.setAttribute( "in", dir==Kopete::Message::Outbound ? "0" : "1" ); msgElem.setAttribute( "from", dir==Kopete::Message::Outbound ? accountId : contactId ); msgElem.setAttribute( "nick", nick ); //do we have to set this? - msgElem.setAttribute( "time", QString::number(dt.date().day()) + " " + QString::number(dt.time().hour()) + ":" + QString::number(dt.time().minute()) ); - QDomText msgNode = doc.createTextNode( body.stripWhiteSpace() ); + msgElem.setAttribute( "time", TQString::number(dt.date().day()) + " " + TQString::number(dt.time().hour()) + ":" + TQString::number(dt.time().minute()) ); + TQDomText msgNode = doc.createTextNode( body.stripWhiteSpace() ); docElem.appendChild( msgElem ); msgElem.appendChild( msgNode ); } @@ -274,16 +274,16 @@ void HistoryPlugin::convertOldHistory() if(!docElem.isNull()) { - QDate date(year,month,1); - QString name = protocolId.replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + - QString::fromLatin1( "/" ) + - contactId.replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + + TQDate date(year,month,1); + TQString name = protocolId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString::fromLatin1( "/" ) + + contactId.replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + date.toString(".yyyyMM"); - KSaveFile file( locateLocal( "data", QString::fromLatin1( "kopete/logs/" ) + name+ QString::fromLatin1( ".xml" ) ) ); + KSaveFile file( locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ); if( file.status() == 0 ) { - QTextStream *stream = file.textStream(); - //stream->setEncoding( QTextStream::UnicodeUTF8 ); //???? oui ou non? + TQTextStream *stream = file.textStream(); + //stream->setEncoding( TQTextStream::UnicodeUTF8 ); //???? oui ou non? doc.save( *stream ,1 ); file.close(); } @@ -304,22 +304,22 @@ void HistoryPlugin::convertOldHistory() bool HistoryPlugin::detectOldHistory() { KGlobal::config()->setGroup("History Plugin"); - QString version=KGlobal::config()->readEntry( "Version" ,"0.6" ); + TQString version=KGlobal::config()->readEntry( "Version" ,"0.6" ); if(version != "0.6") return false; - QDir d( locateLocal( "data", QString::fromLatin1( "kopete/logs")) ); - d.setFilter( QDir::Dirs ); + TQDir d( locateLocal( "data", TQString::fromLatin1( "kopete/logs")) ); + d.setFilter( TQDir::Dirs ); if(d.count() >= 3) // '.' and '..' are included return false; //the new history already exists - QDir d2( locateLocal( "data", QString::fromLatin1( "kopete")) ); - d2.setFilter( QDir::Dirs ); + TQDir d2( locateLocal( "data", TQString::fromLatin1( "kopete")) ); + d2.setFilter( TQDir::Dirs ); const QFileInfoList *list = d2.entryInfoList(); QFileInfoListIterator it( *list ); - QFileInfo *fi; + TQFileInfo *fi; while ( (fi = it.current()) != 0 ) { if( dynamic_cast( Kopete::PluginManager::self()->plugin( fi->fileName() ) ) ) diff --git a/kopete/plugins/history/historydialog.cpp b/kopete/plugins/history/historydialog.cpp index 4dd98fee..5dc550be 100644 --- a/kopete/plugins/history/historydialog.cpp +++ b/kopete/plugins/history/historydialog.cpp @@ -32,15 +32,15 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -60,30 +60,30 @@ class KListViewDateItem : public KListViewItem { public: - KListViewDateItem(KListView* parent, QDate date, Kopete::MetaContact *mc); - QDate date() { return mDate; } + KListViewDateItem(KListView* parent, TQDate date, Kopete::MetaContact *mc); + TQDate date() { return mDate; } Kopete::MetaContact *metaContact() { return mMetaContact; } public: - int compare(QListViewItem *i, int col, bool ascending) const; + int compare(TQListViewItem *i, int col, bool ascending) const; private: - QDate mDate; + TQDate mDate; Kopete::MetaContact *mMetaContact; }; -KListViewDateItem::KListViewDateItem(KListView* parent, QDate date, Kopete::MetaContact *mc) +KListViewDateItem::KListViewDateItem(KListView* parent, TQDate date, Kopete::MetaContact *mc) : KListViewItem(parent, date.toString(Qt::ISODate), mc->displayName()) { mDate = date; mMetaContact = mc; } -int KListViewDateItem::compare(QListViewItem *i, int col, bool ascending) const +int KListViewDateItem::compare(TQListViewItem *i, int col, bool ascending) const { if (col) - return QListViewItem::compare(i, col, ascending); + return TQListViewItem::compare(i, col, ascending); //compare dates - do NOT use ascending var here KListViewDateItem* item = static_cast(i); @@ -93,16 +93,16 @@ int KListViewDateItem::compare(QListViewItem *i, int col, bool ascending) const } -HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, QWidget* parent, +HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent, const char* name) : KDialogBase(parent, name, false, i18n("History for %1").arg(mc->displayName()), 0), mSearching(false) { - QString fontSize; - QString htmlCode; - QString fontStyle; + TQString fontSize; + TQString htmlCode; + TQString fontStyle; kdDebug(14310) << k_funcinfo << "called." << endl; - setWFlags(Qt::WDestructiveClose); // send SIGNAL(closing()) on quit + setWFlags(Qt::WDestructiveClose); // send TQT_SIGNAL(closing()) on quit // FIXME: Allow to show this dialog for only one contact mMetaContact = mc; @@ -118,7 +118,7 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, QWidget* parent, mMainWidget->contactComboBox->insertItem(i18n("All")); mMetaContactList = Kopete::ContactList::self()->metaContacts(); - QPtrListIterator it(mMetaContactList); + TQPtrListIterator it(mMetaContactList); for(; it.current(); ++it) { mMainWidget->contactComboBox->insertItem((*it)->displayName()); @@ -133,8 +133,8 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, QWidget* parent, setMainWidget(mMainWidget); // Initializing HTML Part - mMainWidget->htmlFrame->setFrameStyle(QFrame::WinPanel | QFrame::Sunken); - QVBoxLayout *l = new QVBoxLayout(mMainWidget->htmlFrame); + mMainWidget->htmlFrame->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); + TQVBoxLayout *l = new TQVBoxLayout(mMainWidget->htmlFrame); mHtmlPart = new KHTMLPart(mMainWidget->htmlFrame, "htmlHistoryView"); //Security settings, we don't need this stuff @@ -149,33 +149,33 @@ HistoryDialog::HistoryDialog(Kopete::MetaContact *mc, QWidget* parent, mHtmlView->setMarginHeight(4); mHtmlView->setFocusPolicy(NoFocus); mHtmlView->setSizePolicy( - QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); + TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); l->addWidget(mHtmlView); - QTextOStream( &fontSize ) << KopetePrefs::prefs()->fontFace().pointSize(); + TQTextOStream( &fontSize ) << KopetePrefs::prefs()->fontFace().pointSize(); fontStyle = ""; mHtmlPart->begin(); htmlCode = "" + fontStyle + ""; - mHtmlPart->write( QString::fromLatin1( htmlCode.latin1() ) ); + mHtmlPart->write( TQString::fromLatin1( htmlCode.latin1() ) ); mHtmlPart->end(); - connect(mHtmlPart->browserExtension(), SIGNAL(openURLRequestDelayed(const KURL &, const KParts::URLArgs &)), - this, SLOT(slotOpenURLRequest(const KURL &, const KParts::URLArgs &))); - connect(mMainWidget->dateListView, SIGNAL(clicked(QListViewItem*)), this, SLOT(dateSelected(QListViewItem*))); - connect(mMainWidget->searchButton, SIGNAL(clicked()), this, SLOT(slotSearch())); - connect(mMainWidget->searchLine, SIGNAL(returnPressed()), this, SLOT(slotSearch())); - connect(mMainWidget->searchLine, SIGNAL(textChanged(const QString&)), this, SLOT(slotSearchTextChanged(const QString&))); - connect(mMainWidget->searchErase, SIGNAL(clicked()), this, SLOT(slotSearchErase())); - connect(mMainWidget->contactComboBox, SIGNAL(activated(int)), this, SLOT(slotContactChanged(int))); - connect(mMainWidget->messageFilterBox, SIGNAL(activated(int)), this, SLOT(slotFilterChanged(int ))); - connect(mHtmlPart, SIGNAL(popupMenu(const QString &, const QPoint &)), this, SLOT(slotRightClick(const QString &, const QPoint &))); + connect(mHtmlPart->browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL &, const KParts::URLArgs &)), + this, TQT_SLOT(slotOpenURLRequest(const KURL &, const KParts::URLArgs &))); + connect(mMainWidget->dateListView, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(dateSelected(TQListViewItem*))); + connect(mMainWidget->searchButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSearch())); + connect(mMainWidget->searchLine, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotSearch())); + connect(mMainWidget->searchLine, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotSearchTextChanged(const TQString&))); + connect(mMainWidget->searchErase, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSearchErase())); + connect(mMainWidget->contactComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotContactChanged(int))); + connect(mMainWidget->messageFilterBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotFilterChanged(int ))); + connect(mHtmlPart, TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)), this, TQT_SLOT(slotRightClick(const TQString &, const TQPoint &))); //initActions KActionCollection* ac = new KActionCollection(this); - mCopyAct = KStdAction::copy( this, SLOT(slotCopy()), ac ); - mCopyURLAct = new KAction( i18n( "Copy Link Address" ), QString::fromLatin1( "editcopy" ), 0, this, SLOT( slotCopyURL() ), ac ); + mCopyAct = KStdAction::copy( this, TQT_SLOT(slotCopy()), ac ); + mCopyURLAct = new KAction( i18n( "Copy Link Address" ), TQString::fromLatin1( "editcopy" ), 0, this, TQT_SLOT( slotCopyURL() ), ac ); resize(650, 700); centerOnScreen(this); @@ -201,7 +201,7 @@ void HistoryDialog::init() } else { - QPtrListIterator it(mMetaContactList); + TQPtrListIterator it(mMetaContactList); for(; it.current(); ++it) { HistoryLogger logger(*it, this); @@ -211,7 +211,7 @@ void HistoryDialog::init() } initProgressBar(i18n("Loading..."),mInit.dateMCList.count()); - QTimer::singleShot(0,this,SLOT(slotLoadDays())); + TQTimer::singleShot(0,this,TQT_SLOT(slotLoadDays())); } void HistoryDialog::slotLoadDays() @@ -219,7 +219,7 @@ void HistoryDialog::slotLoadDays() if(mInit.dateMCList.isEmpty()) { if (!mMainWidget->searchLine->text().isEmpty()) - QTimer::singleShot(0, this, SLOT(slotSearch())); + TQTimer::singleShot(0, this, TQT_SLOT(slotSearch())); doneProgressBar(); return; } @@ -227,23 +227,23 @@ void HistoryDialog::slotLoadDays() DMPair pair(mInit.dateMCList.first()); mInit.dateMCList.pop_front(); HistoryLogger logger(pair.metaContact(), this); - QValueList dayList = logger.getDaysForMonth(pair.date()); + TQValueList dayList = logger.getDaysForMonth(pair.date()); for (unsigned int i=0; idateListView, c2Date, pair.metaContact()); } mMainWidget->searchProgress->advance(1); - QTimer::singleShot(0,this,SLOT(slotLoadDays())); + TQTimer::singleShot(0,this,TQT_SLOT(slotLoadDays())); } void HistoryDialog::init(Kopete::MetaContact *mc) { - QPtrList contacts=mc->contacts(); - QPtrListIterator it( contacts ); + TQPtrList contacts=mc->contacts(); + TQPtrListIterator it( contacts ); for( ; it.current(); ++it ) { @@ -254,17 +254,17 @@ void HistoryDialog::init(Kopete::MetaContact *mc) void HistoryDialog::init(Kopete::Contact *c) { // Get year and month list - QRegExp rx( "\\.(\\d\\d\\d\\d)(\\d\\d)" ); - const QString contact_in_filename=c->contactId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ); - QFileInfo *fi; + TQRegExp rx( "\\.(\\d\\d\\d\\d)(\\d\\d)" ); + const TQString contact_in_filename=c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ); + TQFileInfo *fi; // BEGIN check if there are Kopete 0.7.x - QDir d1(locateLocal("data",QString("kopete/logs/")+ - c->protocol()->pluginId().replace( QRegExp(QString::fromLatin1("[./~?*]")),QString::fromLatin1("-")) + TQDir d1(locateLocal("data",TQString("kopete/logs/")+ + c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) )); - d1.setFilter( QDir::Files | QDir::NoSymLinks ); - d1.setSorting( QDir::Name ); + d1.setFilter( TQDir::Files | TQDir::NoSymLinks ); + d1.setSorting( TQDir::Name ); const QFileInfoList *list1 = d1.entryInfoList(); if ( list1 != 0 ) @@ -276,7 +276,7 @@ void HistoryDialog::init(Kopete::Contact *c) { rx.search(fi->fileName()); - QDate cDate = QDate(rx.cap(1).toInt(), rx.cap(2).toInt(), 1); + TQDate cDate = TQDate(rx.cap(1).toInt(), rx.cap(2).toInt(), 1); DMPair pair(cDate, c->metaContact()); mInit.dateMCList.append(pair); @@ -287,14 +287,14 @@ void HistoryDialog::init(Kopete::Contact *c) } // END of kopete 0.7.x check - QString logDir = locateLocal("data",QString("kopete/logs/")+ - c->protocol()->pluginId().replace( QRegExp(QString::fromLatin1("[./~?*]")),QString::fromLatin1("-")) + - QString::fromLatin1( "/" ) + - c->account()->accountId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + TQString logDir = locateLocal("data",TQString("kopete/logs/")+ + c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) + + TQString::fromLatin1( "/" ) + + c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) ); - QDir d(logDir); - d.setFilter( QDir::Files | QDir::NoSymLinks ); - d.setSorting( QDir::Name ); + TQDir d(logDir); + d.setFilter( TQDir::Files | TQDir::NoSymLinks ); + d.setSorting( TQDir::Name ); const QFileInfoList *list = d.entryInfoList(); if ( list != 0 ) { @@ -307,7 +307,7 @@ void HistoryDialog::init(Kopete::Contact *c) rx.search(fi->fileName()); // We search for an item in the list view with the same year. If then we add the month - QDate cDate = QDate(rx.cap(1).toInt(), rx.cap(2).toInt(), 1); + TQDate cDate = TQDate(rx.cap(1).toInt(), rx.cap(2).toInt(), 1); DMPair pair(cDate, c->metaContact()); mInit.dateMCList.append(pair); @@ -317,21 +317,21 @@ void HistoryDialog::init(Kopete::Contact *c) } } -void HistoryDialog::dateSelected(QListViewItem* it) +void HistoryDialog::dateSelected(TQListViewItem* it) { KListViewDateItem *item = static_cast(it); if (!item) return; - QDate chosenDate = item->date(); + TQDate chosenDate = item->date(); HistoryLogger logger(item->metaContact(), this); - QValueList msgs=logger.readMessages(chosenDate); + TQValueList msgs=logger.readMessages(chosenDate); setMessages(msgs); } -void HistoryDialog::setMessages(QValueList msgs) +void HistoryDialog::setMessages(TQValueList msgs) { // Clear View DOM::HTMLElement htmlBody = mHtmlPart->htmlDocument().body(); @@ -339,16 +339,16 @@ void HistoryDialog::setMessages(QValueList msgs) htmlBody.removeChild(htmlBody.childNodes().item(htmlBody.childNodes().length() - 1)); // ---- - QString dir = (QApplication::reverseLayout() ? QString::fromLatin1("rtl") : - QString::fromLatin1("ltr")); + TQString dir = (TQApplication::reverseLayout() ? TQString::fromLatin1("rtl") : + TQString::fromLatin1("ltr")); - QValueList::iterator it = msgs.begin(); + TQValueList::iterator it = msgs.begin(); - QString accountLabel; - QString resultHTML = "" + (*it).timestamp().date().toString() + "
    "; - DOM::HTMLElement newNode = mHtmlPart->document().createElement(QString::fromLatin1("span")); - newNode.setAttribute(QString::fromLatin1("dir"), dir); + TQString accountLabel; + TQString resultHTML = "" + (*it).timestamp().date().toString() + "
    "; + DOM::HTMLElement newNode = mHtmlPart->document().createElement(TQString::fromLatin1("span")); + newNode.setAttribute(TQString::fromLatin1("dir"), dir); newNode.setInnerHTML(resultHTML); mHtmlPart->htmlDocument().body().appendChild(newNode); @@ -370,7 +370,7 @@ void HistoryDialog::setMessages(QValueList msgs) } accountLabel = (*it).from()->account()->accountLabel(); - QString body = (*it).parsedBody(); + TQString body = (*it).parsedBody(); if (!mMainWidget->searchLine->text().isEmpty()) // If there is a search, then we hightlight the keywords @@ -384,8 +384,8 @@ void HistoryDialog::setMessages(QValueList msgs) : "textColor().light(200).name() + "\">< ") + body + "
    "; - newNode = mHtmlPart->document().createElement(QString::fromLatin1("span")); - newNode.setAttribute(QString::fromLatin1("dir"), dir); + newNode = mHtmlPart->document().createElement(TQString::fromLatin1("span")); + newNode.setAttribute(TQString::fromLatin1("dir"), dir); newNode.setInnerHTML(resultHTML); mHtmlPart->htmlDocument().body().appendChild(newNode); @@ -405,7 +405,7 @@ void HistoryDialog::slotOpenURLRequest(const KURL &url, const KParts::URLArgs &/ } // Disable search button if there is no search text -void HistoryDialog::slotSearchTextChanged(const QString& searchText) +void HistoryDialog::slotSearchTextChanged(const TQString& searchText) { if (searchText.isEmpty()) { @@ -442,8 +442,8 @@ void HistoryDialog::slotSearchErase() * We do the search respecting the current metacontact filter item. To do this, we iterate over the * elements in the KListView (KListViewDateItems) and, for each one, we iterate over its subcontacts, * manually searching the log files of each one. To avoid searching files twice, the months that have -* been searched already are stored in searchedMonths. The matches are placed in the matches QMap. -* Finally, the current date item is checked in the matches QMap, and if it is present, it is shown. +* been searched already are stored in searchedMonths. The matches are placed in the matches TQMap. +* Finally, the current date item is checked in the matches TQMap, and if it is present, it is shown. * * Keyword highlighting is done in setMessages() : if the search field isn't empty, we highlight the * search keyword. @@ -454,9 +454,9 @@ void HistoryDialog::slotSearch() { if (mMainWidget->dateListView->childCount() == 0) return; - QRegExp rx("^ ([^<]*)<"); - QMap > monthsSearched; - QMap > matches; + TQRegExp rx("^ ([^<]*)<"); + TQMap > monthsSearched; + TQMap > matches; // cancel button pressed if (mSearching) @@ -480,18 +480,18 @@ void HistoryDialog::slotSearch() qApp->processEvents(); if (!mSearching) return; - QDate month(curItem->date().year(),curItem->date().month(),1); + TQDate month(curItem->date().year(),curItem->date().month(),1); // if we haven't searched the relevant history logs, search them now if (!monthsSearched[month].contains(curItem->metaContact())) { monthsSearched[month].push_back(curItem->metaContact()); - QPtrList contacts = curItem->metaContact()->contacts(); - for(QPtrListIterator it( contacts ); it.current(); ++it) + TQPtrList contacts = curItem->metaContact()->contacts(); + for(TQPtrListIterator it( contacts ); it.current(); ++it) { // get filename and open file - QString filename(HistoryLogger::getFileName(*it, curItem->date())); - if (!QFile::exists(filename)) continue; - QFile file(filename); + TQString filename(HistoryLogger::getFileName(*it, curItem->date())); + if (!TQFile::exists(filename)) continue; + TQFile file(filename); file.open(IO_ReadOnly); if (!file.isOpen()) { @@ -500,8 +500,8 @@ void HistoryDialog::slotSearch() continue; } - QTextStream stream(&file); - QString textLine; + TQTextStream stream(&file); + TQString textLine; while(!stream.atEnd()) { textLine = stream.readLine(); @@ -511,7 +511,7 @@ void HistoryDialog::slotSearch() { // only match message body if (rx.cap(2).contains(mMainWidget->searchLine->text())) - matches[QDate(curItem->date().year(),curItem->date().month(),rx.cap(1).toInt())].push_back(curItem->metaContact()); + matches[TQDate(curItem->date().year(),curItem->date().month(),rx.cap(1).toInt())].push_back(curItem->metaContact()); } // this will happen when multiline messages are searched, properly // parsing the files would fix this @@ -558,7 +558,7 @@ void HistoryDialog::slotContactChanged(int index) } } -void HistoryDialog::initProgressBar(const QString& text, int nbSteps) +void HistoryDialog::initProgressBar(const TQString& text, int nbSteps) { mMainWidget->searchProgress->setTotalSteps(nbSteps); mMainWidget->searchProgress->setProgress(0); @@ -572,7 +572,7 @@ void HistoryDialog::doneProgressBar() mMainWidget->statusLabel->setText(i18n("Ready")); } -void HistoryDialog::slotRightClick(const QString &url, const QPoint &point) +void HistoryDialog::slotRightClick(const TQString &url, const TQPoint &point) { KPopupMenu *chatWindowPopup = 0L; chatWindowPopup = new KPopupMenu(); @@ -586,28 +586,28 @@ void HistoryDialog::slotRightClick(const QString &url, const QPoint &point) mCopyAct->setEnabled( mHtmlPart->hasSelection() ); mCopyAct->plug( chatWindowPopup ); - connect( chatWindowPopup, SIGNAL( aboutToHide() ), chatWindowPopup, SLOT( deleteLater() ) ); + connect( chatWindowPopup, TQT_SIGNAL( aboutToHide() ), chatWindowPopup, TQT_SLOT( deleteLater() ) ); chatWindowPopup->popup(point); } void HistoryDialog::slotCopy() { - QString qsSelection; + TQString qsSelection; qsSelection = mHtmlPart->selectedText(); if ( qsSelection.isEmpty() ) return; - disconnect( kapp->clipboard(), SIGNAL( selectionChanged()), mHtmlPart, SLOT(slotClearSelection())); - QApplication::clipboard()->setText(qsSelection, QClipboard::Clipboard); - QApplication::clipboard()->setText(qsSelection, QClipboard::Selection); - connect( kapp->clipboard(), SIGNAL( selectionChanged()), mHtmlPart, SLOT(slotClearSelection())); + disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection())); + TQApplication::clipboard()->setText(qsSelection, QClipboard::Clipboard); + TQApplication::clipboard()->setText(qsSelection, QClipboard::Selection); + connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection())); } void HistoryDialog::slotCopyURL() { - disconnect( kapp->clipboard(), SIGNAL( selectionChanged()), mHtmlPart, SLOT(slotClearSelection())); - QApplication::clipboard()->setText( mURL, QClipboard::Clipboard); - QApplication::clipboard()->setText( mURL, QClipboard::Selection); - connect( kapp->clipboard(), SIGNAL( selectionChanged()), mHtmlPart, SLOT(slotClearSelection())); + disconnect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection())); + TQApplication::clipboard()->setText( mURL, QClipboard::Clipboard); + TQApplication::clipboard()->setText( mURL, QClipboard::Selection); + connect( kapp->clipboard(), TQT_SIGNAL( selectionChanged()), mHtmlPart, TQT_SLOT(slotClearSelection())); } #include "historydialog.moc" diff --git a/kopete/plugins/history/historydialog.h b/kopete/plugins/history/historydialog.h index cf26037d..63b08470 100644 --- a/kopete/plugins/history/historydialog.h +++ b/kopete/plugins/history/historydialog.h @@ -19,8 +19,8 @@ #ifndef _HISTORYDIALOG_H #define _HISTORYDIALOG_H -#include -#include +#include +#include #include #include @@ -45,13 +45,13 @@ class KListViewDateItem; class DMPair { public: - DMPair() {md = QDate(0, 0, 0); mc = 0; } - DMPair(QDate d, Kopete::MetaContact *c) { md = d; mc =c; } - QDate date() const { return md; } + DMPair() {md = TQDate(0, 0, 0); mc = 0; } + DMPair(TQDate d, Kopete::MetaContact *c) { md = d; mc =c; } + TQDate date() const { return md; } Kopete::MetaContact* metaContact() const { return mc; } bool operator==(const DMPair p1) const { return p1.date() == this->date() && p1.metaContact() == this->metaContact(); } private: - QDate md; + TQDate md; Kopete::MetaContact *mc; }; @@ -64,7 +64,7 @@ class HistoryDialog : public KDialogBase Q_OBJECT public: - HistoryDialog(Kopete::MetaContact *mc, QWidget* parent=0, + HistoryDialog(Kopete::MetaContact *mc, TQWidget* parent=0, const char* name="HistoryDialog"); ~HistoryDialog(); @@ -80,20 +80,20 @@ class HistoryDialog : public KDialogBase void slotOpenURLRequest(const KURL &url, const KParts::URLArgs &/*args*/); // Called when a date is selected in the treeview - void dateSelected(QListViewItem *); + void dateSelected(TQListViewItem *); void slotSearch(); // Reinitialise search void slotSearchErase(); - void slotSearchTextChanged(const QString& txt); // To enable/disable search button + void slotSearchTextChanged(const TQString& txt); // To enable/disable search button void slotContactChanged(int index); void slotFilterChanged(int index); void init(); void slotLoadDays(); - void slotRightClick(const QString &url, const QPoint &point); + void slotRightClick(const TQString &url, const TQPoint &point); void slotCopy(); void slotCopyURL(); @@ -101,7 +101,7 @@ class HistoryDialog : public KDialogBase enum Disabled { Prev=1, Next=2 }; void refreshEnabled( /*Disabled*/ uint disabled ); - void initProgressBar(const QString& text, int nbSteps); + void initProgressBar(const TQString& text, int nbSteps); void doneProgressBar(); void init(Kopete::MetaContact *mc); void init(Kopete::Contact *c); @@ -109,7 +109,7 @@ class HistoryDialog : public KDialogBase /** * Show the messages in the HTML View */ - void setMessages(QValueList m); + void setMessages(TQValueList m); void listViewShowElements(bool s); @@ -123,7 +123,7 @@ class HistoryDialog : public KDialogBase */ Kopete::MetaContact *mMetaContact; - QPtrList mMetaContactList; + TQPtrList mMetaContactList; // History View KHTMLView *mHtmlView; @@ -133,14 +133,14 @@ class HistoryDialog : public KDialogBase struct Init { - QValueList dateMCList; // mc for MetaContact + TQValueList dateMCList; // mc for MetaContact } mInit; bool mSearching; KAction *mCopyAct; KAction *mCopyURLAct; - QString mURL; + TQString mURL; }; #endif diff --git a/kopete/plugins/history/historyguiclient.cpp b/kopete/plugins/history/historyguiclient.cpp index 133e50a3..4b1798ae 100644 --- a/kopete/plugins/history/historyguiclient.cpp +++ b/kopete/plugins/history/historyguiclient.cpp @@ -28,7 +28,7 @@ class HistoryPlugin; HistoryGUIClient::HistoryGUIClient(Kopete::ChatSession *parent, const char *name) - : QObject(parent, name), KXMLGUIClient(parent) + : TQObject(parent, name), KXMLGUIClient(parent) { setInstance(KGenericFactory::instance()); @@ -38,12 +38,12 @@ HistoryGUIClient::HistoryGUIClient(Kopete::ChatSession *parent, const char *name if(!m_manager || m_manager->members().isEmpty()) deleteLater(); - QPtrList mb=m_manager->members(); + TQPtrList mb=m_manager->members(); m_logger=new HistoryLogger( mb.first() , this ); - actionLast=new KAction( i18n("History Last" ), QString::fromLatin1( "finish" ), 0, this, SLOT(slotLast()), actionCollection() , "historyLast" ); - actionPrev = KStdAction::back( this, SLOT(slotPrevious()), actionCollection() , "historyPrevious" ); - actionNext = KStdAction::forward( this, SLOT(slotNext()), actionCollection() , "historyNext" ); + actionLast=new KAction( i18n("History Last" ), TQString::fromLatin1( "finish" ), 0, this, TQT_SLOT(slotLast()), actionCollection() , "historyLast" ); + actionPrev = KStdAction::back( this, TQT_SLOT(slotPrevious()), actionCollection() , "historyPrevious" ); + actionNext = KStdAction::forward( this, TQT_SLOT(slotNext()), actionCollection() , "historyNext" ); // we are generally at last when begining actionPrev->setEnabled(true); @@ -64,8 +64,8 @@ void HistoryGUIClient::slotPrevious() KopeteView *m_currentView = m_manager->view(true); m_currentView->clear(); - QPtrList mb = m_manager->members(); - QValueList msgs = m_logger->readMessages( + TQPtrList mb = m_manager->members(); + TQValueList msgs = m_logger->readMessages( HistoryConfig::number_ChatWindow(), /*mb.first()*/ 0L, HistoryLogger::AntiChronological, true); @@ -81,9 +81,9 @@ void HistoryGUIClient::slotLast() KopeteView *m_currentView = m_manager->view(true); m_currentView->clear(); - QPtrList mb = m_manager->members(); + TQPtrList mb = m_manager->members(); m_logger->setPositionToLast(); - QValueList msgs = m_logger->readMessages( + TQValueList msgs = m_logger->readMessages( HistoryConfig::number_ChatWindow(), /*mb.first()*/ 0L, HistoryLogger::AntiChronological, true); @@ -100,8 +100,8 @@ void HistoryGUIClient::slotNext() KopeteView *m_currentView = m_manager->view(true); m_currentView->clear(); - QPtrList mb = m_manager->members(); - QValueList msgs = m_logger->readMessages( + TQPtrList mb = m_manager->members(); + TQValueList msgs = m_logger->readMessages( HistoryConfig::number_ChatWindow(), /*mb.first()*/ 0L, HistoryLogger::Chronological, false); diff --git a/kopete/plugins/history/historyguiclient.h b/kopete/plugins/history/historyguiclient.h index 420795e0..792325fc 100644 --- a/kopete/plugins/history/historyguiclient.h +++ b/kopete/plugins/history/historyguiclient.h @@ -16,7 +16,7 @@ #ifndef HISTORYGUICLIENT_H #define HISTORYGUICLIENT_H -#include +#include #include namespace Kopete { class ChatSession; } @@ -26,7 +26,7 @@ class KAction; /** *@author Olivier Goffart */ -class HistoryGUIClient : public QObject , public KXMLGUIClient +class HistoryGUIClient : public TQObject , public KXMLGUIClient { Q_OBJECT public: diff --git a/kopete/plugins/history/historylogger.cpp b/kopete/plugins/history/historylogger.cpp index 7848136f..96f4d6dc 100644 --- a/kopete/plugins/history/historylogger.cpp +++ b/kopete/plugins/history/historylogger.cpp @@ -18,12 +18,12 @@ #include "historylogger.h" #include "historyconfig.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -37,37 +37,37 @@ #include "kopetechatsession.h" // ----------------------------------------------------------------------------- -HistoryLogger::HistoryLogger( Kopete::MetaContact *m, QObject *parent, const char *name ) - : QObject(parent, name) +HistoryLogger::HistoryLogger( Kopete::MetaContact *m, TQObject *parent, const char *name ) + : TQObject(parent, name) { m_saveTimer=0L; m_saveTimerTime=0; m_metaContact=m; m_hideOutgoing=false; m_cachedMonth=-1; - m_realMonth=QDate::currentDate().month(); + m_realMonth=TQDate::currentDate().month(); m_oldSens=Default; //the contact may be destroyed, for example, if the contact changes its metacontact - connect(m_metaContact , SIGNAL(destroyed(QObject *)) , this , SLOT(slotMCDeleted())); + connect(m_metaContact , TQT_SIGNAL(destroyed(TQObject *)) , this , TQT_SLOT(slotMCDeleted())); setPositionToLast(); } -HistoryLogger::HistoryLogger( Kopete::Contact *c, QObject *parent, const char *name ) - : QObject(parent, name) +HistoryLogger::HistoryLogger( Kopete::Contact *c, TQObject *parent, const char *name ) + : TQObject(parent, name) { m_saveTimer=0L; m_saveTimerTime=0; m_cachedMonth=-1; m_metaContact=c->metaContact(); m_hideOutgoing=false; - m_realMonth=QDate::currentDate().month(); + m_realMonth=TQDate::currentDate().month(); m_oldSens=Default; //the contact may be destroyed, for example, if the contact changes its metacontact - connect(m_metaContact , SIGNAL(destroyed(QObject *)) , this , SLOT(slotMCDeleted())); + connect(m_metaContact , TQT_SIGNAL(destroyed(TQObject *)) , this , TQT_SLOT(slotMCDeleted())); setPositionToLast(); } @@ -105,16 +105,16 @@ void HistoryLogger::setCurrentMonth(int month) } -QDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int month , bool canLoad , bool* contain) +TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int month , bool canLoad , bool* contain) { - if(m_realMonth!=QDate::currentDate().month()) + if(m_realMonth!=TQDate::currentDate().month()) { //We changed month, our indice are not correct anymore, clean memory. // or we will see what i called "the 31 midnight bug"(TM) :-) -Olivier m_documents.clear(); m_cachedMonth=-1; m_currentMonth++; //Not usre it's ok, but should work; m_oldMonth++; // idem - m_realMonth=QDate::currentDate().month(); + m_realMonth=TQDate::currentDate().month(); } if(!m_metaContact) @@ -122,22 +122,22 @@ QDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int m if(c && c->metaContact()) m_metaContact=c->metaContact(); else - return QDomDocument(); + return TQDomDocument(); } if(!m_metaContact->contacts().contains(c)) { if(contain) *contain=false; - return QDomDocument(); + return TQDomDocument(); } - QMap documents = m_documents[c]; + TQMap documents = m_documents[c]; if (documents.contains(month)) return documents[month]; - QDomDocument doc = getDocument(c, QDate::currentDate().addMonths(0-month), canLoad, contain); + TQDomDocument doc = getDocument(c, TQDate::currentDate().addMonths(0-month), canLoad, contain); documents.insert(month, doc); m_documents[c]=documents; @@ -146,35 +146,35 @@ QDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, unsigned int m } -QDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, const QDate date , bool canLoad , bool* contain) +TQDomDocument HistoryLogger::getDocument(const Kopete::Contact *c, const TQDate date , bool canLoad , bool* contain) { if(!m_metaContact) { //this may happen if the contact has been moved, and the MC deleted if(c && c->metaContact()) m_metaContact=c->metaContact(); else - return QDomDocument(); + return TQDomDocument(); } if(!m_metaContact->contacts().contains(c)) { if(contain) *contain=false; - return QDomDocument(); + return TQDomDocument(); } if(!canLoad) { if(contain) *contain=false; - return QDomDocument(); + return TQDomDocument(); } QString FileName = getFileName(c, date); - QDomDocument doc( "Kopete-History" ); + TQDomDocument doc( "Kopete-History" ); - QFile file( FileName ); + TQFile file( FileName ); if ( !file.open( IO_ReadOnly ) ) { if(contain) @@ -207,7 +207,7 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co const Kopete::Contact *c = ct; if(!c && msg.manager() ) { - QPtrList mb=msg.manager()->members() ; + TQPtrList mb=msg.manager()->members() ; c = mb.first(); } if(!c) //If the contact is still not initialized, use the message author. @@ -225,8 +225,8 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co if(!c || !m_metaContact->contacts().contains(c) ) { - /*QPtrList contacts= m_metaContact->contacts(); - QPtrListIterator it( contacts ); + /*TQPtrList contacts= m_metaContact->contacts(); + TQPtrListIterator it( contacts ); for( ; it.current(); ++it ) { if( (*it)->protocol()->pluginId() == msg.from()->protocol()->pluginId() ) @@ -242,36 +242,36 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co return; } - QDomDocument doc=getDocument(c,0); - QDomElement docElem = doc.documentElement(); + TQDomDocument doc=getDocument(c,0); + TQDomElement docElem = doc.documentElement(); if(docElem.isNull()) { docElem= doc.createElement( "kopete-history" ); docElem.setAttribute ( "version" , "0.9" ); doc.appendChild( docElem ); - QDomElement headElem = doc.createElement( "head" ); + TQDomElement headElem = doc.createElement( "head" ); docElem.appendChild( headElem ); - QDomElement dateElem = doc.createElement( "date" ); - dateElem.setAttribute( "year", QString::number(QDate::currentDate().year()) ); - dateElem.setAttribute( "month", QString::number(QDate::currentDate().month()) ); + TQDomElement dateElem = doc.createElement( "date" ); + dateElem.setAttribute( "year", TQString::number(TQDate::currentDate().year()) ); + dateElem.setAttribute( "month", TQString::number(TQDate::currentDate().month()) ); headElem.appendChild(dateElem); - QDomElement myselfElem = doc.createElement( "contact" ); + TQDomElement myselfElem = doc.createElement( "contact" ); myselfElem.setAttribute( "type", "myself" ); myselfElem.setAttribute( "contactId", c->account()->myself()->contactId() ); headElem.appendChild(myselfElem); - QDomElement contactElem = doc.createElement( "contact" ); + TQDomElement contactElem = doc.createElement( "contact" ); contactElem.setAttribute( "contactId", c->contactId() ); headElem.appendChild(contactElem); } - QDomElement msgElem = doc.createElement( "msg" ); + TQDomElement msgElem = doc.createElement( "msg" ); msgElem.setAttribute( "in", msg.direction()==Kopete::Message::Outbound ? "0" : "1" ); msgElem.setAttribute( "from", msg.from()->contactId() ); msgElem.setAttribute( "nick", msg.from()->property( Kopete::Global::Properties::self()->nickName() ).value().toString() ); //do we have to set this? msgElem.setAttribute( "time", msg.timestamp().toString("d h:m:s") ); - QDomText msgNode = doc.createTextNode( msg.plainBody() ); + TQDomText msgNode = doc.createTextNode( msg.plainBody() ); docElem.appendChild( msgElem ); msgElem.appendChild( msgNode ); @@ -280,7 +280,7 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co // On hight-traffic channel, saving can take lots of CPU. (because the file is big) // So i wait a time proportional to the time needed to save.. - const QString filename=getFileName(c,QDate::currentDate()); + const TQString filename=getFileName(c,TQDate::currentDate()); if(!m_toSaveFileName.isEmpty() && m_toSaveFileName != filename) { //that mean the contact or the month has changed, save it now. saveToDisk(); @@ -291,8 +291,8 @@ void HistoryLogger::appendMessage( const Kopete::Message &msg , const Kopete::Co if(!m_saveTimer) { - m_saveTimer=new QTimer(this); - connect( m_saveTimer, SIGNAL( timeout() ) , this, SLOT(saveToDisk()) ); + m_saveTimer=new TQTimer(this); + connect( m_saveTimer, TQT_SIGNAL( timeout() ) , this, TQT_SLOT(saveToDisk()) ); } if(!m_saveTimer->isActive()) m_saveTimer->start( m_saveTimerTime, true /*singleshot*/ ); @@ -305,14 +305,14 @@ void HistoryLogger::saveToDisk() if(m_toSaveFileName.isEmpty() || m_toSaveDocument.isNull()) return; - QTime t; + TQTime t; t.start(); //mesure the time needed to save. KSaveFile file( m_toSaveFileName ); if( file.status() == 0 ) { - QTextStream *stream = file.textStream(); - //stream->setEncoding( QTextStream::UnicodeUTF8 ); //???? oui ou non? + TQTextStream *stream = file.textStream(); + //stream->setEncoding( TQTextStream::UnicodeUTF8 ); //???? oui ou non? m_toSaveDocument.save( *stream, 1 ); file.close(); @@ -323,36 +323,36 @@ void HistoryLogger::saveToDisk() // But it may take 500 ms if the file to save becomes too big (1Mb). kdDebug(14310) << k_funcinfo << m_toSaveFileName << " saved in " << t.elapsed() << " ms " < HistoryLogger::readMessages(QDate date) +TQValueList HistoryLogger::readMessages(TQDate date) { - QRegExp rxTime("(\\d+) (\\d+):(\\d+)($|:)(\\d*)"); //(with a 0.7.x compatibility) - QValueList messages; + TQRegExp rxTime("(\\d+) (\\d+):(\\d+)($|:)(\\d*)"); //(with a 0.7.x compatibility) + TQValueList messages; - QPtrList ct=m_metaContact->contacts(); - QPtrListIterator it( ct ); + TQPtrList ct=m_metaContact->contacts(); + TQPtrListIterator it( ct ); for( ; it.current(); ++it ) { - QDomDocument doc=getDocument(*it,date, true, 0L); - QDomElement docElem = doc.documentElement(); - QDomNode n = docElem.firstChild(); + TQDomDocument doc=getDocument(*it,date, true, 0L); + TQDomElement docElem = doc.documentElement(); + TQDomNode n = docElem.firstChild(); while(!n.isNull()) { - QDomElement msgElem2 = n.toElement(); + TQDomElement msgElem2 = n.toElement(); if( !msgElem2.isNull() && msgElem2.tagName()=="msg") { rxTime.search(msgElem2.attribute("time")); - QDateTime dt( QDate(date.year() , date.month() , rxTime.cap(1).toUInt()), QTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt(), rxTime.cap(5).toUInt() ) ); + TQDateTime dt( TQDate(date.year() , date.month() , rxTime.cap(1).toUInt()), TQTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt(), rxTime.cap(5).toUInt() ) ); if (dt.date() != date) { @@ -366,7 +366,7 @@ QValueList HistoryLogger::readMessages(QDate date) if(!m_hideOutgoing || dir != Kopete::Message::Outbound) { //parse only if we don't hide it - QString f=msgElem2.attribute("from" ); + TQString f=msgElem2.attribute("from" ); const Kopete::Contact *from=f.isNull()? 0L : (*it)->account()->contacts()[f]; if(!from) @@ -376,13 +376,13 @@ QValueList HistoryLogger::readMessages(QDate date) to.append( dir==Kopete::Message::Inbound ? (*it)->account()->myself() : *it ); Kopete::Message msg(dt, from, to, msgElem2.text(), dir); - msg.setBody( QString::fromLatin1("%2") + msg.setBody( TQString::fromLatin1("%2") .arg( dt.toString(Qt::LocalDate), msg.escapedBody() ), Kopete::Message::RichText); // We insert it at the good place, given its date - QValueListIterator msgIt; + TQValueListIterator msgIt; for (msgIt = messages.begin(); msgIt != messages.end(); ++msgIt) { @@ -400,15 +400,15 @@ QValueList HistoryLogger::readMessages(QDate date) return messages; } -QValueList HistoryLogger::readMessages(unsigned int lines, +TQValueList HistoryLogger::readMessages(unsigned int lines, const Kopete::Contact *c, Sens sens, bool reverseOrder, bool colorize) { - //QDate dd = QDate::currentDate().addMonths(0-m_currentMonth); + //TQDate dd = TQDate::currentDate().addMonths(0-m_currentMonth); - QValueList messages; + TQValueList messages; // A regexp useful for this function - QRegExp rxTime("(\\d+) (\\d+):(\\d+)($|:)(\\d*)"); //(with a 0.7.x compatibility) + TQRegExp rxTime("(\\d+) (\\d+):(\\d+)($|:)(\\d*)"); //(with a 0.7.x compatibility) if(!m_metaContact) { //this may happen if the contact has been moved, and the MC deleted @@ -436,7 +436,7 @@ QValueList HistoryLogger::readMessages(unsigned int lines, m_oldSens=sens; //getting the color for messages: - QColor fgColor = HistoryConfig::history_color(); + TQColor fgColor = HistoryConfig::history_color(); //Hello guest! @@ -448,7 +448,7 @@ QValueList HistoryLogger::readMessages(unsigned int lines, // we see what contact we have to read first, and we look at the firt date before another contact // has a message with a bigger date. - QDateTime timeLimit; + TQDateTime timeLimit; const Kopete::Contact *currentContact=c; if(!c && m_metaContact->contacts().count()==1) currentContact=m_metaContact->contacts().first(); @@ -459,26 +459,26 @@ QValueList HistoryLogger::readMessages(unsigned int lines, while(messages.count() < lines) { - timeLimit=QDateTime(); - QDomElement msgElem; //here is the message element - QDateTime timestamp; //and the timestamp of this message + timeLimit=TQDateTime(); + TQDomElement msgElem; //here is the message element + TQDateTime timestamp; //and the timestamp of this message if(!c && m_metaContact->contacts().count()>1) { //we have to merge the differents subcontact history - QPtrList ct=m_metaContact->contacts(); - QPtrListIterator it( ct ); + TQPtrList ct=m_metaContact->contacts(); + TQPtrListIterator it( ct ); for( ; it.current(); ++it ) { //we loop over each contact. we are searching the contact with the next message with the smallest date, // it will becomes our current contact, and the contact with the mext message with the second smallest // date, this date will bocomes the limit. - QDomNode n; + TQDomNode n; if(m_currentElements.contains(*it)) n=m_currentElements[*it]; else //there is not yet "next message" register, so we will take the first (for the current month) { - QDomDocument doc=getDocument(*it,m_currentMonth); - QDomElement docElem = doc.documentElement(); + TQDomDocument doc=getDocument(*it,m_currentMonth); + TQDomElement docElem = doc.documentElement(); n= (sens==Chronological)?docElem.firstChild() : docElem.lastChild(); //i can't drop the root element @@ -486,12 +486,12 @@ QValueList HistoryLogger::readMessages(unsigned int lines, } while(!n.isNull()) { - QDomElement msgElem2 = n.toElement(); + TQDomElement msgElem2 = n.toElement(); if( !msgElem2.isNull() && msgElem2.tagName()=="msg") { rxTime.search(msgElem2.attribute("time")); - QDate d=QDate::currentDate().addMonths(0-m_currentMonth); - QDateTime dt( QDate(d.year() , d.month() , rxTime.cap(1).toUInt()), QTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt(), rxTime.cap(5).toUInt() ) ); + TQDate d=TQDate::currentDate().addMonths(0-m_currentMonth); + TQDateTime dt( TQDate(d.year() , d.month() , rxTime.cap(1).toUInt()), TQTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt(), rxTime.cap(5).toUInt() ) ); if(!timestamp.isValid() || ((sens==Chronological )? dt < timestamp : dt > timestamp) ) { timeLimit=timestamp; @@ -516,10 +516,10 @@ QValueList HistoryLogger::readMessages(unsigned int lines, msgElem=m_currentElements[currentContact]; else { - QDomDocument doc=getDocument(currentContact,m_currentMonth); - QDomElement docElem = doc.documentElement(); - QDomNode n= (sens==Chronological)?docElem.firstChild() : docElem.lastChild(); - msgElem=QDomElement(); + TQDomDocument doc=getDocument(currentContact,m_currentMonth); + TQDomElement docElem = doc.documentElement(); + TQDomNode n= (sens==Chronological)?docElem.firstChild() : docElem.lastChild(); + msgElem=TQDomElement(); while(!n.isNull()) //continue until we get a msg { msgElem=n.toElement(); @@ -572,9 +572,9 @@ QValueList HistoryLogger::readMessages(unsigned int lines, if(!m_hideOutgoing || dir != Kopete::Message::Outbound) { //parse only if we don't hide it - if( m_filter.isNull() || ( m_filterRegExp? msgElem.text().contains(QRegExp(m_filter,m_filterCaseSensitive)) : msgElem.text().contains(m_filter,m_filterCaseSensitive) )) + if( m_filter.isNull() || ( m_filterRegExp? msgElem.text().contains(TQRegExp(m_filter,m_filterCaseSensitive)) : msgElem.text().contains(m_filter,m_filterCaseSensitive) )) { - QString f=msgElem.attribute("from" ); + TQString f=msgElem.attribute("from" ); const Kopete::Contact *from=(f.isNull() || !currentContact) ? 0L : currentContact->account()->contacts()[f]; if(!from) @@ -587,14 +587,14 @@ QValueList HistoryLogger::readMessages(unsigned int lines, { //parse timestamp only if it was not already parsed rxTime.search(msgElem.attribute("time")); - QDate d=QDate::currentDate().addMonths(0-m_currentMonth); - timestamp=QDateTime( QDate(d.year() , d.month() , rxTime.cap(1).toUInt()), QTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt() , rxTime.cap(5).toUInt() ) ); + TQDate d=TQDate::currentDate().addMonths(0-m_currentMonth); + timestamp=TQDateTime( TQDate(d.year() , d.month() , rxTime.cap(1).toUInt()), TQTime( rxTime.cap(2).toUInt() , rxTime.cap(3).toUInt() , rxTime.cap(5).toUInt() ) ); } Kopete::Message msg(timestamp, from, to, msgElem.text(), dir); if (colorize) { - msg.setBody( QString::fromLatin1("%3") + msg.setBody( TQString::fromLatin1("%3") .arg( fgColor.name(), timestamp.toString(Qt::LocalDate), msg.escapedBody() ), Kopete::Message::RichText ); @@ -602,7 +602,7 @@ QValueList HistoryLogger::readMessages(unsigned int lines, } else { - msg.setBody( QString::fromLatin1("%2") + msg.setBody( TQString::fromLatin1("%2") .arg( timestamp.toString(Qt::LocalDate), msg.escapedBody() ), Kopete::Message::RichText ); @@ -617,10 +617,10 @@ QValueList HistoryLogger::readMessages(unsigned int lines, //here is the point of workaround. If i drop the root element, this crashes //get the next message - QDomNode node = ( (sens==Chronological) ? msgElem.nextSibling() : + TQDomNode node = ( (sens==Chronological) ? msgElem.nextSibling() : msgElem.previousSibling() ); - msgElem = QDomElement(); //n.toElement(); + msgElem = TQDomElement(); //n.toElement(); while (!node.isNull() && msgElem.isNull()) { msgElem = node.toElement(); @@ -632,19 +632,19 @@ QValueList HistoryLogger::readMessages(unsigned int lines, { // In case of hideoutgoing messages, it is faster to do // this, so we don't parse the date if it is not needed - QRegExp rx("(\\d+) (\\d+):(\\d+):(\\d+)"); + TQRegExp rx("(\\d+) (\\d+):(\\d+):(\\d+)"); rx.search(msgElem.attribute("time")); - QDate d = QDate::currentDate().addMonths(0-m_currentMonth); - timestamp = QDateTime( - QDate(d.year(), d.month(), rx.cap(1).toUInt()), - QTime( rx.cap(2).toUInt(), rx.cap(3).toUInt() ) ); + TQDate d = TQDate::currentDate().addMonths(0-m_currentMonth); + timestamp = TQDateTime( + TQDate(d.year(), d.month(), rx.cap(1).toUInt()), + TQTime( rx.cap(2).toUInt(), rx.cap(3).toUInt() ) ); } else - timestamp = QDateTime(); //invalid + timestamp = TQDateTime(); //invalid } else - msgElem = QDomElement(); + msgElem = TQDomElement(); } node = (sens == Chronological) ? node.nextSibling() : @@ -660,30 +660,30 @@ QValueList HistoryLogger::readMessages(unsigned int lines, return messages; } -QString HistoryLogger::getFileName(const Kopete::Contact* c, QDate date) +TQString HistoryLogger::getFileName(const Kopete::Contact* c, TQDate date) { - QString name = c->protocol()->pluginId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + - QString::fromLatin1( "/" ) + - c->account()->accountId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + - QString::fromLatin1( "/" ) + - c->contactId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + + TQString name = c->protocol()->pluginId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString::fromLatin1( "/" ) + + c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString::fromLatin1( "/" ) + + c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + date.toString(".yyyyMM"); - QString filename=locateLocal( "data", QString::fromLatin1( "kopete/logs/" ) + name+ QString::fromLatin1( ".xml" ) ) ; + TQString filename=locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ; //Check if there is a kopete 0.7.x file - QFileInfo fi(filename); + TQFileInfo fi(filename); if(!fi.exists()) { - name = c->protocol()->pluginId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + - QString::fromLatin1( "/" ) + - c->contactId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + + name = c->protocol()->pluginId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + + TQString::fromLatin1( "/" ) + + c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) + date.toString(".yyyyMM"); - QString filename2=locateLocal( "data", QString::fromLatin1( "kopete/logs/" ) + name+ QString::fromLatin1( ".xml" ) ) ; + TQString filename2=locateLocal( "data", TQString::fromLatin1( "kopete/logs/" ) + name+ TQString::fromLatin1( ".xml" ) ) ; - QFileInfo fi2(filename2); + TQFileInfo fi2(filename2); if(fi2.exists()) return filename2; } @@ -697,25 +697,25 @@ unsigned int HistoryLogger::getFirstMonth(const Kopete::Contact *c) if(!c) return getFirstMonth(); - QRegExp rx( "\\.(\\d\\d\\d\\d)(\\d\\d)" ); - QFileInfo *fi; + TQRegExp rx( "\\.(\\d\\d\\d\\d)(\\d\\d)" ); + TQFileInfo *fi; // BEGIN check if there are Kopete 0.7.x - QDir d1(locateLocal("data",QString("kopete/logs/")+ - c->protocol()->pluginId().replace( QRegExp(QString::fromLatin1("[./~?*]")),QString::fromLatin1("-")) + TQDir d1(locateLocal("data",TQString("kopete/logs/")+ + c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) )); - d1.setFilter( QDir::Files | QDir::NoSymLinks ); - d1.setSorting( QDir::Name ); + d1.setFilter( TQDir::Files | TQDir::NoSymLinks ); + d1.setSorting( TQDir::Name ); const QFileInfoList *list1 = d1.entryInfoList(); QFileInfoListIterator it1( *list1 ); while ( (fi = it1.current()) != 0 ) { - if(fi->fileName().contains(c->contactId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ))) + if(fi->fileName().contains(c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ))) { rx.search(fi->fileName()); - int result = 12*(QDate::currentDate().year() - rx.cap(1).toUInt()) +QDate::currentDate().month() - rx.cap(2).toUInt(); + int result = 12*(TQDate::currentDate().year() - rx.cap(1).toUInt()) +TQDate::currentDate().month() - rx.cap(2).toUInt(); if(result < 0) { @@ -729,23 +729,23 @@ unsigned int HistoryLogger::getFirstMonth(const Kopete::Contact *c) // END of kopete 0.7.x check - QDir d(locateLocal("data",QString("kopete/logs/")+ - c->protocol()->pluginId().replace( QRegExp(QString::fromLatin1("[./~?*]")),QString::fromLatin1("-")) + - QString::fromLatin1( "/" ) + - c->account()->accountId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ) + TQDir d(locateLocal("data",TQString("kopete/logs/")+ + c->protocol()->pluginId().replace( TQRegExp(TQString::fromLatin1("[./~?*]")),TQString::fromLatin1("-")) + + TQString::fromLatin1( "/" ) + + c->account()->accountId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ) )); - d.setFilter( QDir::Files | QDir::NoSymLinks ); - d.setSorting( QDir::Name ); + d.setFilter( TQDir::Files | TQDir::NoSymLinks ); + d.setSorting( TQDir::Name ); const QFileInfoList *list = d.entryInfoList(); QFileInfoListIterator it( *list ); while ( (fi = it.current()) != 0 ) { - if(fi->fileName().contains(c->contactId().replace( QRegExp( QString::fromLatin1( "[./~?*]" ) ), QString::fromLatin1( "-" ) ))) + if(fi->fileName().contains(c->contactId().replace( TQRegExp( TQString::fromLatin1( "[./~?*]" ) ), TQString::fromLatin1( "-" ) ))) { rx.search(fi->fileName()); - int result = 12*(QDate::currentDate().year() - rx.cap(1).toUInt()) +QDate::currentDate().month() - rx.cap(2).toUInt(); + int result = 12*(TQDate::currentDate().year() - rx.cap(1).toUInt()) +TQDate::currentDate().month() - rx.cap(2).toUInt(); if(result < 0) { kdWarning(14310) << k_funcinfo << "Kopete only found log file made in the future. Check your date!" << endl; @@ -767,8 +767,8 @@ unsigned int HistoryLogger::getFirstMonth() return 0; int m=0; - QPtrList contacts=m_metaContact->contacts(); - QPtrListIterator it( contacts ); + TQPtrList contacts=m_metaContact->contacts(); + TQPtrListIterator it( contacts ); for( ; it.current(); ++it ) { int m2=getFirstMonth(*it); @@ -788,14 +788,14 @@ void HistoryLogger::slotMCDeleted() m_metaContact = 0; } -void HistoryLogger::setFilter(const QString& filter, bool caseSensitive , bool isRegExp) +void HistoryLogger::setFilter(const TQString& filter, bool caseSensitive , bool isRegExp) { m_filter=filter; m_filterCaseSensitive=caseSensitive; m_filterRegExp=isRegExp; } -QString HistoryLogger::filter() const +TQString HistoryLogger::filter() const { return m_filter; } @@ -810,26 +810,26 @@ bool HistoryLogger::filterRegExp() const return m_filterRegExp; } -QValueList HistoryLogger::getDaysForMonth(QDate date) +TQValueList HistoryLogger::getDaysForMonth(TQDate date) { - QRegExp rxTime("time=\"(\\d+) \\d+:\\d+(:\\d+)?\""); //(with a 0.7.x compatibility) + TQRegExp rxTime("time=\"(\\d+) \\d+:\\d+(:\\d+)?\""); //(with a 0.7.x compatibility) - QValueList dayList; + TQValueList dayList; - QPtrList contacts = m_metaContact->contacts(); - QPtrListIterator it(contacts); + TQPtrList contacts = m_metaContact->contacts(); + TQPtrListIterator it(contacts); int lastDay=0; for(; it.current(); ++it) { // kdDebug() << getFileName(*it, date) << endl; - QFile file(getFileName(*it, date)); + TQFile file(getFileName(*it, date)); if(!file.open(IO_ReadOnly)) { continue; } - QTextStream stream(&file); - QString fullText = stream.read(); + TQTextStream stream(&file); + TQString fullText = stream.read(); file.close(); int pos = 0; diff --git a/kopete/plugins/history/historylogger.h b/kopete/plugins/history/historylogger.h index 85cdbdd7..49e368d9 100644 --- a/kopete/plugins/history/historylogger.h +++ b/kopete/plugins/history/historylogger.h @@ -17,7 +17,7 @@ #ifndef HISTORYLOGGER_H #define HISTORYLOGGER_H -#include +#include #include "kopetemessage.h" //TODO: REMOVE namespace Kopete { class Contact; } @@ -46,8 +46,8 @@ public: /** * Constructor, takes the contact, and the color of messages */ - HistoryLogger( Kopete::MetaContact *m , QObject *parent = 0, const char *name = 0); - HistoryLogger( Kopete::Contact *c , QObject *parent = 0, const char *name = 0); + HistoryLogger( Kopete::MetaContact *m , TQObject *parent = 0, const char *name = 0); + HistoryLogger( Kopete::Contact *c , TQObject *parent = 0, const char *name = 0); ~HistoryLogger(); @@ -62,10 +62,10 @@ public: * set a searching filter * @param filter is the string to search * @param caseSensitive say if the case is important - * @param isRegExp say if the filter is a QRegExp, or a simle string + * @param isRegExp say if the filter is a TQRegExp, or a simle string */ - void setFilter(const QString& filter, bool caseSensitive=false , bool isRegExp=false); - QString filter() const; + void setFilter(const TQString& filter, bool caseSensitive=false , bool isRegExp=false); + TQString filter() const; bool filterCaseSensitive() const ; bool filterRegExp() const; @@ -83,7 +83,7 @@ public: * read @param lines message from the current position * from Kopete::Contact @param c in the given @param sens */ - QValueList readMessages(unsigned int lines, + TQValueList readMessages(unsigned int lines, const Kopete::Contact *c=0, Sens sens=Default, bool reverseOrder=false, bool colorize=true); @@ -92,7 +92,7 @@ public: * because its structure is really different. * Read all the messages for the given @param date */ - QValueList readMessages(QDate date); + TQValueList readMessages(TQDate date); /** @@ -113,40 +113,40 @@ public: /** * @return The list of the days for which there is a log for m_metaContact for month of * @param date (don't care of the day) */ - QValueList getDaysForMonth(QDate date); + TQValueList getDaysForMonth(TQDate date); /** * Get the filename of the xml file which contains the history from the * contact in the specified @param date. Specify @param date in order to get the filename for * the given date.year() date.month(). */ - static QString getFileName(const Kopete::Contact* , QDate date); + static TQString getFileName(const Kopete::Contact* , TQDate date); private: bool m_hideOutgoing; bool m_filterCaseSensitive; bool m_filterRegExp; - QString m_filter; + TQString m_filter; /* - *contais all QDomDocument, for a KC, for a specified Month + *contais all TQDomDocument, for a KC, for a specified Month */ - QMap > m_documents; + TQMap > m_documents; /** * Contains the current message. * in fact, this is the next, still not showed */ - QMap m_currentElements; + TQMap m_currentElements; /** * Get the document, open it is @param canload is true, contain is set to false if the document * is not already contained */ - QDomDocument getDocument(const Kopete::Contact *c, unsigned int month , bool canLoad=true , bool* contain=0L); + TQDomDocument getDocument(const Kopete::Contact *c, unsigned int month , bool canLoad=true , bool* contain=0L); - QDomDocument getDocument(const Kopete::Contact *c, const QDate date, bool canLoad=true, bool* contain=0L); + TQDomDocument getDocument(const Kopete::Contact *c, const TQDate date, bool canLoad=true, bool* contain=0L); /** * look over files to get the last month for this contact @@ -175,16 +175,16 @@ private: /* * keep the old position in memory, so if we change the sens, we can begin here */ - QMap m_oldElements; + TQMap m_oldElements; unsigned int m_oldMonth; Sens m_oldSens; /** * the timer used to save the file */ - QTimer *m_saveTimer; - QDomDocument m_toSaveDocument; - QString m_toSaveFileName; + TQTimer *m_saveTimer; + TQDomDocument m_toSaveDocument; + TQString m_toSaveFileName; unsigned int m_saveTimerTime; //time in ms between each save /** @@ -199,7 +199,7 @@ private: * due to a bug in QT, i have to keep the document element in the memory to * prevent crashes */ - QValueList workaround; + TQValueList workaround; private slots: /** diff --git a/kopete/plugins/history/historyplugin.cpp b/kopete/plugins/history/historyplugin.cpp index bf8d70b4..af92fc09 100644 --- a/kopete/plugins/history/historyplugin.cpp +++ b/kopete/plugins/history/historyplugin.cpp @@ -41,22 +41,22 @@ typedef KGenericFactory HistoryPluginFactory; static const KAboutData aboutdata("kopete_history", I18N_NOOP("History") , "1.0" ); K_EXPORT_COMPONENT_FACTORY( kopete_history, HistoryPluginFactory( &aboutdata ) ) -HistoryPlugin::HistoryPlugin( QObject *parent, const char *name, const QStringList & /* args */ ) +HistoryPlugin::HistoryPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) : Kopete::Plugin( HistoryPluginFactory::instance(), parent, name ), m_loggerFactory( this ) { KAction *viewMetaContactHistory = new KAction( i18n("View &History" ), - QString::fromLatin1( "history" ), 0, this, SLOT(slotViewHistory()), + TQString::fromLatin1( "history" ), 0, this, TQT_SLOT(slotViewHistory()), actionCollection(), "viewMetaContactHistory" ); viewMetaContactHistory->setEnabled( Kopete::ContactList::self()->selectedMetaContacts().count() == 1 ); - connect(Kopete::ContactList::self(), SIGNAL(metaContactSelected(bool)), - viewMetaContactHistory, SLOT(setEnabled(bool))); + connect(Kopete::ContactList::self(), TQT_SIGNAL(metaContactSelected(bool)), + viewMetaContactHistory, TQT_SLOT(setEnabled(bool))); - connect(Kopete::ChatSessionManager::self(), SIGNAL(viewCreated(KopeteView*)), - this, SLOT(slotViewCreated(KopeteView*))); + connect(Kopete::ChatSessionManager::self(), TQT_SIGNAL(viewCreated(KopeteView*)), + this, TQT_SLOT(slotViewCreated(KopeteView*))); - connect(this, SIGNAL(settingsChanged()), this, SLOT(slotSettingsChanged())); + connect(this, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotSettingsChanged())); setXMLFile("historyui.rc"); if(detectOldHistory()) @@ -73,14 +73,14 @@ HistoryPlugin::HistoryPlugin( QObject *parent, const char *name, const QStringLi // Add GUI action to all existing kmm objects // (Needed if the plugin is enabled while kopete is already running) - QValueList sessions = Kopete::ChatSessionManager::self()->sessions(); - for (QValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) + TQValueList sessions = Kopete::ChatSessionManager::self()->sessions(); + for (TQValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) { if(!m_loggers.contains(*it)) { m_loggers.insert(*it, new HistoryGUIClient( *it ) ); - connect( *it, SIGNAL(closing(Kopete::ChatSession*)), - this, SLOT(slotKMMClosed(Kopete::ChatSession*))); + connect( *it, TQT_SIGNAL(closing(Kopete::ChatSession*)), + this, TQT_SLOT(slotKMMClosed(Kopete::ChatSession*))); } } } @@ -105,14 +105,14 @@ void HistoryPlugin::messageDisplayed(const Kopete::Message &m) if(!m_loggers.contains(m.manager())) { m_loggers.insert(m.manager() , new HistoryGUIClient( m.manager() ) ); - connect(m.manager(), SIGNAL(closing(Kopete::ChatSession*)), - this, SLOT(slotKMMClosed(Kopete::ChatSession*))); + connect(m.manager(), TQT_SIGNAL(closing(Kopete::ChatSession*)), + this, TQT_SLOT(slotKMMClosed(Kopete::ChatSession*))); } HistoryLogger *l=m_loggers[m.manager()]->logger(); if(l) { - QPtrList mb=m.manager()->members(); + TQPtrList mb=m.manager()->members(); l->appendMessage(m,mb.first()); } @@ -136,7 +136,7 @@ void HistoryPlugin::slotViewHistory() void HistoryPlugin::slotViewCreated( KopeteView* v ) { - if(v->plugin()->pluginInfo()->pluginName() != QString::fromLatin1("kopete_chatwindow") ) + if(v->plugin()->pluginInfo()->pluginName() != TQString::fromLatin1("kopete_chatwindow") ) return; //Email chat windows are not supported. bool autoChatWindow = HistoryConfig::auto_chatwindow(); @@ -144,7 +144,7 @@ void HistoryPlugin::slotViewCreated( KopeteView* v ) KopeteView *m_currentView = v; Kopete::ChatSession *m_currentChatSession = v->msgManager(); - QPtrList mb = m_currentChatSession->members(); + TQPtrList mb = m_currentChatSession->members(); if(!m_currentChatSession) return; //i am sorry @@ -152,8 +152,8 @@ void HistoryPlugin::slotViewCreated( KopeteView* v ) if(!m_loggers.contains(m_currentChatSession)) { m_loggers.insert(m_currentChatSession , new HistoryGUIClient( m_currentChatSession ) ); - connect( m_currentChatSession, SIGNAL(closing(Kopete::ChatSession*)), - this , SLOT(slotKMMClosed(Kopete::ChatSession*))); + connect( m_currentChatSession, TQT_SIGNAL(closing(Kopete::ChatSession*)), + this , TQT_SLOT(slotKMMClosed(Kopete::ChatSession*))); } if(!autoChatWindow || nbAutoChatWindow == 0) @@ -163,7 +163,7 @@ void HistoryPlugin::slotViewCreated( KopeteView* v ) logger->setPositionToLast(); - QValueList msgs = logger->readMessages(nbAutoChatWindow, + TQValueList msgs = logger->readMessages(nbAutoChatWindow, /*mb.first()*/ 0L, HistoryLogger::AntiChronological, true, true); // make sure the last message is not the one which will be appened right diff --git a/kopete/plugins/history/historyplugin.h b/kopete/plugins/history/historyplugin.h index 63e2c87b..8c0f553d 100644 --- a/kopete/plugins/history/historyplugin.h +++ b/kopete/plugins/history/historyplugin.h @@ -18,9 +18,9 @@ #ifndef HISTORYPLUGIN_H #define HISTORYPLUGIN_H -#include -#include -#include +#include +#include +#include #include "kopeteplugin.h" @@ -75,7 +75,7 @@ class HistoryPlugin : public Kopete::Plugin { Q_OBJECT public: - HistoryPlugin( QObject *parent, const char *name, const QStringList &args ); + HistoryPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~HistoryPlugin(); /** @@ -97,7 +97,7 @@ class HistoryPlugin : public Kopete::Plugin private: HistoryMessageLoggerFactory m_loggerFactory; - QMap m_loggers; + TQMap m_loggers; Kopete::Message m_lastmessage; }; diff --git a/kopete/plugins/history/historypreferences.cpp b/kopete/plugins/history/historypreferences.cpp index 61fce469..370e6721 100644 --- a/kopete/plugins/history/historypreferences.cpp +++ b/kopete/plugins/history/historypreferences.cpp @@ -20,29 +20,29 @@ #include "historyprefsui.h" #include -#include -#include +#include +#include #include #include -#include +#include typedef KGenericFactory HistoryConfigFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_history, HistoryConfigFactory( "kcm_kopete_history" ) ) -HistoryPreferences::HistoryPreferences(QWidget *parent, const char*/*name*/, const QStringList &args) +HistoryPreferences::HistoryPreferences(TQWidget *parent, const char*/*name*/, const TQStringList &args) : KCModule(HistoryConfigFactory::instance(), parent, args) { kdDebug(14310) << k_funcinfo << "called." << endl; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); p = new HistoryPrefsUI(this); - connect(p->chkShowPrevious, SIGNAL(toggled(bool)), this, SLOT(slotShowPreviousChanged(bool))); - connect(p->Number_Auto_chatwindow, SIGNAL(valueChanged(int)), - this, SLOT(slotModified())); - connect(p->Number_ChatWindow, SIGNAL(valueChanged(int)), - this, SLOT(slotModified())); - connect(p->History_color, SIGNAL(changed(const QColor&)), - this, SLOT(slotModified())); + connect(p->chkShowPrevious, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotShowPreviousChanged(bool))); + connect(p->Number_Auto_chatwindow, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotModified())); + connect(p->Number_ChatWindow, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotModified())); + connect(p->History_color, TQT_SIGNAL(changed(const TQColor&)), + this, TQT_SLOT(slotModified())); load(); } diff --git a/kopete/plugins/history/historypreferences.h b/kopete/plugins/history/historypreferences.h index 247e2bc8..bed6de7b 100644 --- a/kopete/plugins/history/historypreferences.h +++ b/kopete/plugins/history/historypreferences.h @@ -19,7 +19,7 @@ #define HISTORYPREFERENCES_H #include -#include +#include class HistoryPrefsUI; @@ -30,8 +30,8 @@ class HistoryPreferences : public KCModule { Q_OBJECT public: - HistoryPreferences(QWidget *parent=0, const char* name=0, - const QStringList &args = QStringList()); + HistoryPreferences(TQWidget *parent=0, const char* name=0, + const TQStringList &args = TQStringList()); ~HistoryPreferences(); virtual void save(); diff --git a/kopete/plugins/latex/latexguiclient.cpp b/kopete/plugins/latex/latexguiclient.cpp index 8d7cbf3e..ea9420fb 100644 --- a/kopete/plugins/latex/latexguiclient.cpp +++ b/kopete/plugins/latex/latexguiclient.cpp @@ -17,14 +17,14 @@ ************************************************************************* */ -#include +#include #include #include #include -#include -#include -#include +#include +#include +#include #include "kopetechatsession.h" #include "kopeteview.h" @@ -34,14 +34,14 @@ #include "latexguiclient.h" LatexGUIClient::LatexGUIClient( Kopete::ChatSession *parent, const char *name ) -: QObject( parent, name ), KXMLGUIClient( parent ) +: TQObject( parent, name ), KXMLGUIClient( parent ) { setInstance( LatexPlugin::plugin()->instance() ); - connect( LatexPlugin::plugin(), SIGNAL( destroyed( QObject * ) ), this, SLOT( deleteLater() ) ); + connect( LatexPlugin::plugin(), TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( deleteLater() ) ); m_manager = parent; - new KAction( i18n( "Preview Latex Images" ), "latex", CTRL + Key_L, this, SLOT( slotPreview() ), actionCollection(), "latexPreview" ); + new KAction( i18n( "Preview Latex Images" ), "latex", CTRL + Key_L, this, TQT_SLOT( slotPreview() ), actionCollection(), "latexPreview" ); setXMLFile( "latexchatui.rc" ); } @@ -56,10 +56,10 @@ void LatexGUIClient::slotPreview() return; Kopete::Message msg = m_manager->view()->currentMessage(); - QString messageText = msg.plainBody(); + TQString messageText = msg.plainBody(); if(!messageText.contains("$$")) //we haven't found any latex strings { - KMessageBox::sorry(reinterpret_cast(m_manager->view()) , i18n("There are no latex in the message you are typing. The latex formula must be included between $$ and $$ "), i18n("No Latex Formula") ); + KMessageBox::sorry(reinterpret_cast(m_manager->view()) , i18n("There are no latex in the message you are typing. The latex formula must be included between $$ and $$ "), i18n("No Latex Formula") ); return; } diff --git a/kopete/plugins/latex/latexguiclient.h b/kopete/plugins/latex/latexguiclient.h index c8ca9e99..03fdbd9e 100644 --- a/kopete/plugins/latex/latexguiclient.h +++ b/kopete/plugins/latex/latexguiclient.h @@ -20,7 +20,7 @@ #ifndef TRANSLATORGUICLIENT_H #define TRANSLATORGUICLIENT_H -#include +#include #include #include @@ -34,7 +34,7 @@ namespace Kopete { class ChatSession; } * @author Olivier Goffart */ -class LatexGUIClient : public QObject , public KXMLGUIClient +class LatexGUIClient : public TQObject , public KXMLGUIClient { Q_OBJECT diff --git a/kopete/plugins/latex/latexplugin.cpp b/kopete/plugins/latex/latexplugin.cpp index 7ceab209..11537aba 100644 --- a/kopete/plugins/latex/latexplugin.cpp +++ b/kopete/plugins/latex/latexplugin.cpp @@ -16,11 +16,11 @@ ************************************************************************* */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include @@ -41,7 +41,7 @@ typedef KGenericFactory LatexPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_latex, LatexPluginFactory( "kopete_latex" ) ) -LatexPlugin::LatexPlugin( QObject *parent, const char *name, const QStringList &/*args*/ ) +LatexPlugin::LatexPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ ) : Kopete::Plugin( LatexPluginFactory::instance(), parent, name ) { // kdDebug() << k_funcinfo << endl; @@ -49,18 +49,18 @@ LatexPlugin::LatexPlugin( QObject *parent, const char *name, const QStringList & s_pluginStatic = this; mMagickNotFoundShown = false; - connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToDisplay( Kopete::Message & ) ), SLOT( slotMessageAboutToShow( Kopete::Message & ) ) ); - connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToSend(Kopete::Message& ) ), this, SLOT(slotMessageAboutToSend(Kopete::Message& ) ) ); - connect ( this , SIGNAL( settingsChanged() ) , this , SLOT( slotSettingsChanged() ) ); - connect( Kopete::ChatSessionManager::self(), SIGNAL( chatSessionCreated( Kopete::ChatSession * ) ), - this, SLOT( slotNewChatSession( Kopete::ChatSession * ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ), TQT_SLOT( slotMessageAboutToShow( Kopete::Message & ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToSend(Kopete::Message& ) ), this, TQT_SLOT(slotMessageAboutToSend(Kopete::Message& ) ) ); + connect ( this , TQT_SIGNAL( settingsChanged() ) , this , TQT_SLOT( slotSettingsChanged() ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( chatSessionCreated( Kopete::ChatSession * ) ), + this, TQT_SLOT( slotNewChatSession( Kopete::ChatSession * ) ) ); m_convScript = KStandardDirs::findExe("kopete_latexconvert.sh"); slotSettingsChanged(); //Add GUI action to all already existing kmm (if the plugin is launched when kopete already rining) - QValueList sessions = Kopete::ChatSessionManager::self()->sessions(); - for (QValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) + TQValueList sessions = Kopete::ChatSessionManager::self()->sessions(); + for (TQValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) slotNewChatSession( *it ); } @@ -84,7 +84,7 @@ void LatexPlugin::slotNewChatSession( Kopete::ChatSession *KMM ) void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) { - QString mMagick = KStandardDirs::findExe("convert"); + TQString mMagick = KStandardDirs::findExe("convert"); if ( mMagick.isEmpty() ) { // show just once @@ -100,7 +100,7 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) return; } - QString messageText = msg.plainBody(); + TQString messageText = msg.plainBody(); if( !messageText.contains("$$")) return; @@ -110,14 +110,14 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) // \$\$.+?\$\$ // this searches for $$formula$$ - QRegExp rg("\\$\\$.+\\$\\$"); + TQRegExp rg("\\$\\$.+\\$\\$"); rg.setMinimal(true); // this searches for [latex]formula[/latex] - //QRegExp rg("\\[([^]\]).*?\\[/$1\\]"); + //TQRegExp rg("\\[([^]\]).*?\\[/$1\\]"); int pos = 0; - QMap replaceMap; + TQMap replaceMap; while (pos >= 0 && (unsigned int)pos < messageText.length()) { // kdDebug() << k_funcinfo << " searching pos: " << pos << endl; @@ -125,27 +125,27 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) if (pos >= 0 ) { - QString match = rg.cap(0); + TQString match = rg.cap(0); pos += rg.matchedLength(); - QString formul=match; + TQString formul=match; if(!securityCheck(formul)) continue; - QString fileName=handleLatex(formul.replace("$$","")); + TQString fileName=handleLatex(formul.replace("$$","")); // get the image and encode it with base64 #if ENCODED_IMAGE_MODE - QImage renderedImage( fileName ); + TQImage renderedImage( fileName ); imagePxWidth = renderedImage.width(); imagePxHeight = renderedImage.height(); if ( !renderedImage.isNull() ) { - QByteArray ba; - QBuffer buffer( ba ); + TQByteArray ba; + TQBuffer buffer( ba ); buffer.open( IO_WriteOnly ); renderedImage.save( &buffer, "PNG" ); - QString imageURL = QString::fromLatin1("data:image/png;base64,%1").arg( KCodecs::base64Encode( ba ) ); + TQString imageURL = TQString::fromLatin1("data:image/png;base64,%1").arg( KCodecs::base64Encode( ba ) ); replaceMap[match] = imageURL; } #else @@ -160,15 +160,15 @@ void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg ) messageText= msg.escapedBody(); int imagePxWidth,imagePxHeight; - for (QMap::ConstIterator it = replaceMap.begin(); it != replaceMap.end(); ++it) + for (TQMap::ConstIterator it = replaceMap.begin(); it != replaceMap.end(); ++it) { - QImage theImage(*it); + TQImage theImage(*it); if(theImage.isNull()) continue; imagePxWidth = theImage.width(); imagePxHeight = theImage.height(); - QString escapedLATEX=QStyleSheet::escape(it.key()).replace("\"","""); //we need the escape quotes because that string will be in a title="" argument, but not the \n - messageText.replace(Kopete::Message::escape(it.key()), " \"" "); + TQString escapedLATEX=TQStyleSheet::escape(it.key()).replace("\"","""); //we need the escape quotes because that string will be in a title="" argument, but not the \n + messageText.replace(Kopete::Message::escape(it.key()), " \"" "); } msg.setBody( messageText, Kopete::Message::RichText ); @@ -186,62 +186,62 @@ void LatexPlugin::slotMessageAboutToSend( Kopete::Message& msg) if(!config->readBoolEntry("ParseOutgoing", false)) return; - QString messageText = msg.plainBody(); + TQString messageText = msg.plainBody(); if( !messageText.contains("$$")) return; /* if( msg.from()->protocol()->pluginId()!="MSNProtocol" ) return;*/ // this searches for $$formula$$ - QRegExp rg("^\\s*\\$\\$([^$]+)\\$\\$\\s*$"); + TQRegExp rg("^\\s*\\$\\$([^$]+)\\$\\$\\s*$"); if( rg.search(messageText) != -1 ) { - QString latexFormula = rg.cap(1); + TQString latexFormula = rg.cap(1); if(!securityCheck( latexFormula )) return; - QString url = handleLatex(latexFormula); + TQString url = handleLatex(latexFormula); if(!url.isNull()) { - QString escapedLATEX= QStyleSheet::escape(messageText).replace("\"","""); - QString messageText="\"""; + TQString escapedLATEX= TQStyleSheet::escape(messageText).replace("\"","""); + TQString messageText="\"""; msg.setBody( messageText, Kopete::Message::RichText ); } } #endif } -QString LatexPlugin::handleLatex(const QString &latexFormula) +TQString LatexPlugin::handleLatex(const TQString &latexFormula) { KTempFile *tempFile=new KTempFile( locateLocal( "tmp", "kopetelatex-" ), ".png" ); tempFile->setAutoDelete(true); m_tempFiles.append(tempFile); m_tempFiles.setAutoDelete(true); - QString fileName = tempFile->name(); + TQString fileName = tempFile->name(); KProcess p; - QString argumentRes = "-r %1x%2"; - QString argumentOut = "-o %1"; - //QString argumentFormat = "-fgif"; //we uses gif format because MSN only handle gif + TQString argumentRes = "-r %1x%2"; + TQString argumentOut = "-o %1"; + //TQString argumentFormat = "-fgif"; //we uses gif format because MSN only handle gif int hDPI, vDPI; hDPI = LatexConfig::self()->horizontalDPI(); vDPI = LatexConfig::self()->verticalDPI(); - p << m_convScript << argumentRes.arg(QString::number(hDPI), QString::number(vDPI)) << argumentOut.arg(fileName) /*<< argumentFormat*/ << latexFormula ; + p << m_convScript << argumentRes.arg(TQString::number(hDPI), TQString::number(vDPI)) << argumentOut.arg(fileName) /*<< argumentFormat*/ << latexFormula ; - kdDebug() << k_funcinfo << " Rendering " << m_convScript << " " << argumentRes.arg(QString::number(hDPI), QString::number(vDPI)) << " " << argumentOut.arg(fileName) << endl; + kdDebug() << k_funcinfo << " Rendering " << m_convScript << " " << argumentRes.arg(TQString::number(hDPI), TQString::number(vDPI)) << " " << argumentOut.arg(fileName) << endl; // FIXME our sucky sync filter API limitations :-) p.start(KProcess::Block); return fileName; } -bool LatexPlugin::securityCheck(const QString &latexFormula) +bool LatexPlugin::securityCheck(const TQString &latexFormula) { - return !latexFormula.contains(QRegExp("\\\\(def|let|futurelet|newcommand|renewcomment|else|fi|write|input|include" + return !latexFormula.contains(TQRegExp("\\\\(def|let|futurelet|newcommand|renewcomment|else|fi|write|input|include" "|chardef|catcode|makeatletter|noexpand|toksdef|every|errhelp|errorstopmode|scrollmode|nonstopmode|batchmode" "|read|csname|newhelp|relax|afterground|afterassignment|expandafter|noexpand|special|command|loop|repeat|toks" "|output|line|mathcode|name|item|section|mbox|DeclareRobustCommand)[^a-zA-Z]")); diff --git a/kopete/plugins/latex/latexplugin.h b/kopete/plugins/latex/latexplugin.h index a0fcd7fd..ebff5f8d 100644 --- a/kopete/plugins/latex/latexplugin.h +++ b/kopete/plugins/latex/latexplugin.h @@ -21,8 +21,8 @@ #ifndef LATEXPLUGIN_H #define LATEXPLUGIN_H -#include -#include +#include +#include #include @@ -46,7 +46,7 @@ class LatexPlugin : public Kopete::Plugin public: static LatexPlugin *plugin(); - LatexPlugin( QObject *parent, const char *name, const QStringList &args ); + LatexPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~LatexPlugin(); public slots: @@ -59,19 +59,19 @@ public: /** * gives a latex formula, and return the filename of the file where the latex is stored. */ - QString handleLatex(const QString &latex); + TQString handleLatex(const TQString &latex); /** * return false if the latex formula may contains malicious commands */ - bool securityCheck(const QString & formula); + bool securityCheck(const TQString & formula); private: static LatexPlugin* s_pluginStatic; - QString m_convScript; + TQString m_convScript; bool mMagickNotFoundShown; - QPtrList m_tempFiles; + TQPtrList m_tempFiles; }; #endif diff --git a/kopete/plugins/latex/latexpreferences.cpp b/kopete/plugins/latex/latexpreferences.cpp index 1727ae49..ff02c831 100644 --- a/kopete/plugins/latex/latexpreferences.cpp +++ b/kopete/plugins/latex/latexpreferences.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include +#include #include #include #include @@ -30,17 +30,17 @@ typedef KGenericFactory LatexPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_latex, LatexPreferencesFactory( "kcm_kopete_latex" ) ) -LatexPreferences::LatexPreferences(QWidget *parent, const char* /*name*/, const QStringList &args) +LatexPreferences::LatexPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) : KCModule(LatexPreferencesFactory::instance(), parent, args) { - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); m_preferencesDialog = new LatexPrefsUI(this); // connect widget signals here m_preferencesDialog->horizontalDPI->setMinValue(1); m_preferencesDialog->verticalDPI->setMinValue(1); - connect(m_preferencesDialog->horizontalDPI, SIGNAL(valueChanged(int)), this, SLOT(slotModified())); - connect(m_preferencesDialog->verticalDPI, SIGNAL(valueChanged(int)), this, SLOT(slotModified())); + connect(m_preferencesDialog->horizontalDPI, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotModified())); + connect(m_preferencesDialog->verticalDPI, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotModified())); load(); } diff --git a/kopete/plugins/latex/latexpreferences.h b/kopete/plugins/latex/latexpreferences.h index c08b35b5..5bfc2f8f 100644 --- a/kopete/plugins/latex/latexpreferences.h +++ b/kopete/plugins/latex/latexpreferences.h @@ -19,7 +19,7 @@ #define LatexPREFERENCES_H #include -#include +#include class LatexPrefsUI; class QListViewItem; @@ -33,7 +33,7 @@ class LatexPreferences : public KCModule Q_OBJECT public: - LatexPreferences(QWidget *parent = 0, const char* name = 0, const QStringList &args = QStringList()); + LatexPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); ~LatexPreferences(); virtual void save(); diff --git a/kopete/plugins/motionautoaway/motionawayplugin.cpp b/kopete/plugins/motionautoaway/motionawayplugin.cpp index d534a186..8dbd8853 100644 --- a/kopete/plugins/motionautoaway/motionawayplugin.cpp +++ b/kopete/plugins/motionautoaway/motionawayplugin.cpp @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include @@ -92,7 +92,7 @@ typedef __signed__ long long __s64; typedef KGenericFactory MotionAwayPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_motionaway, MotionAwayPluginFactory( "kopete_motionaway" ) ) -MotionAwayPlugin::MotionAwayPlugin( QObject *parent, const char *name, const QStringList & /* args */ ) +MotionAwayPlugin::MotionAwayPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) : Kopete::Plugin( MotionAwayPluginFactory::instance(), parent, name ) { kdDebug(14305) << k_funcinfo << "Called." << endl; @@ -106,11 +106,11 @@ MotionAwayPlugin::MotionAwayPlugin( QObject *parent, const char *name, const QSt /* We haven't took the first picture yet */ m_tookFirst = false; - m_captureTimer = new QTimer(this); - m_awayTimer = new QTimer(this); + m_captureTimer = new TQTimer(this); + m_awayTimer = new TQTimer(this); - connect( m_captureTimer, SIGNAL(timeout()), this, SLOT(slotCapture()) ); - connect( m_awayTimer, SIGNAL(timeout()), this, SLOT(slotTimeout()) ); + connect( m_captureTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCapture()) ); + connect( m_awayTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()) ); signal(SIGCHLD, SIG_IGN); @@ -143,7 +143,7 @@ MotionAwayPlugin::MotionAwayPlugin( QObject *parent, const char *name, const QSt m_awayTimer->start( awayTimeout * 60 * 1000 ); } loadSettings(); - connect(this, SIGNAL(settingsChanged()), this, SLOT( loadSettings() ) ); + connect(this, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT( loadSettings() ) ); } MotionAwayPlugin::~MotionAwayPlugin() @@ -163,7 +163,7 @@ void MotionAwayPlugin::loadSettings(){ m_awayTimer->changeInterval(awayTimeout * 60 * 1000); } -int MotionAwayPlugin::getImage(int _dev, QByteArray &_image, int _width, int _height, int _input, int _norm, int _fmt) +int MotionAwayPlugin::getImage(int _dev, TQByteArray &_image, int _width, int _height, int _input, int _norm, int _fmt) { struct video_capability vid_caps; struct video_channel vid_chnl; diff --git a/kopete/plugins/motionautoaway/motionawayplugin.h b/kopete/plugins/motionautoaway/motionawayplugin.h index 98e7e343..84172f33 100644 --- a/kopete/plugins/motionautoaway/motionawayplugin.h +++ b/kopete/plugins/motionautoaway/motionawayplugin.h @@ -38,7 +38,7 @@ class MotionAwayPlugin : public Kopete::Plugin Q_OBJECT public: - MotionAwayPlugin( QObject *parent, const char *name, const QStringList &args ); + MotionAwayPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~MotionAwayPlugin(); public slots: @@ -50,12 +50,12 @@ public slots: private: int awayTimeout; bool becomeAvailableWithActivity; - QString videoDevice; + TQString videoDevice; - QTimer *m_captureTimer; - QTimer *m_awayTimer; + TQTimer *m_captureTimer; + TQTimer *m_awayTimer; - int getImage(int, QByteArray& ,int ,int ,int ,int ,int ); + int getImage(int, TQByteArray& ,int ,int ,int ,int ,int ); bool m_tookFirst; bool m_wentAway; @@ -70,10 +70,10 @@ private: int shots; int m_gap; - QByteArray m_imageRef; - QByteArray m_imageNew; - QByteArray m_imageOld; - QByteArray m_imageOut; + TQByteArray m_imageRef; + TQByteArray m_imageNew; + TQByteArray m_imageOld; + TQByteArray m_imageOut; /* time_t currenttimep; diff --git a/kopete/plugins/motionautoaway/motionawaypreferences.cpp b/kopete/plugins/motionautoaway/motionawaypreferences.cpp index a4962c5c..889d4d30 100644 --- a/kopete/plugins/motionautoaway/motionawaypreferences.cpp +++ b/kopete/plugins/motionautoaway/motionawaypreferences.cpp @@ -15,9 +15,9 @@ ************************************************************************* */ -#include -#include -#include +#include +#include +#include #include #include @@ -30,15 +30,15 @@ typedef KGenericFactory MotionAwayPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_motionaway, MotionAwayPreferencesFactory("kcm_kopete_motionaway")) -MotionAwayPreferences::MotionAwayPreferences(QWidget *parent, const char* /*name*/, const QStringList &args) +MotionAwayPreferences::MotionAwayPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) : KCModule(MotionAwayPreferencesFactory::instance(), parent, args) { // Add actuall widget generated from ui file. - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new motionawayPrefsUI(this); - connect(preferencesDialog->BecomeAvailableWithActivity, SIGNAL(toggled(bool)), this, SLOT(slotWidgetModified())); - connect(preferencesDialog->AwayTimeout, SIGNAL(valueChanged(int)), this, SLOT(slotWidgetModified())); - connect(preferencesDialog->VideoDevice, SIGNAL(textChanged(const QString &)), this, SLOT(slotWidgetModified())); + connect(preferencesDialog->BecomeAvailableWithActivity, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotWidgetModified())); + connect(preferencesDialog->AwayTimeout, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotWidgetModified())); + connect(preferencesDialog->VideoDevice, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotWidgetModified())); load(); } diff --git a/kopete/plugins/motionautoaway/motionawaypreferences.h b/kopete/plugins/motionautoaway/motionawaypreferences.h index 43b33411..c93784d3 100644 --- a/kopete/plugins/motionautoaway/motionawaypreferences.h +++ b/kopete/plugins/motionautoaway/motionawaypreferences.h @@ -30,7 +30,7 @@ class MotionAwayPreferences : public KCModule { Q_OBJECT public: - MotionAwayPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList()); + MotionAwayPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList()); virtual void save(); virtual void load(); diff --git a/kopete/plugins/netmeeting/netmeetingguiclient.cpp b/kopete/plugins/netmeeting/netmeetingguiclient.cpp index e024a872..9dffde7f 100644 --- a/kopete/plugins/netmeeting/netmeetingguiclient.cpp +++ b/kopete/plugins/netmeeting/netmeetingguiclient.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include +#include #include #include @@ -33,12 +33,12 @@ class NetMeetingPlugin; NetMeetingGUIClient::NetMeetingGUIClient( MSNChatSession *parent, const char *name ) -: QObject( parent, name ) , KXMLGUIClient(parent) +: TQObject( parent, name ) , KXMLGUIClient(parent) { setInstance(KGenericFactory::instance()); m_manager=parent; - new KAction( i18n( "Invite to Use NetMeeting" ), 0, this, SLOT( slotStartInvitation() ), actionCollection() , "netmeeting" ) ; + new KAction( i18n( "Invite to Use NetMeeting" ), 0, this, TQT_SLOT( slotStartInvitation() ), actionCollection() , "netmeeting" ) ; setXMLFile("netmeetingchatui.rc"); } @@ -50,7 +50,7 @@ NetMeetingGUIClient::~NetMeetingGUIClient() void NetMeetingGUIClient::slotStartInvitation() { - QPtrList c=m_manager->members(); + TQPtrList c=m_manager->members(); NetMeetingInvitation *i=new NetMeetingInvitation(false, static_cast(c.first()),m_manager); m_manager->initInvitation(i); } diff --git a/kopete/plugins/netmeeting/netmeetingguiclient.h b/kopete/plugins/netmeeting/netmeetingguiclient.h index fa84b694..c847a5cd 100644 --- a/kopete/plugins/netmeeting/netmeetingguiclient.h +++ b/kopete/plugins/netmeeting/netmeetingguiclient.h @@ -20,7 +20,7 @@ #ifndef TRANSLATORGUICLIENT_H #define TRANSLATORGUICLIENT_H -#include +#include #include namespace Kopete { class ChatSession; } @@ -31,7 +31,7 @@ class NetMeetingPlugin; * @author Olivier Goffart */ -class NetMeetingGUIClient : public QObject , public KXMLGUIClient +class NetMeetingGUIClient : public TQObject , public KXMLGUIClient { Q_OBJECT diff --git a/kopete/plugins/netmeeting/netmeetinginvitation.cpp b/kopete/plugins/netmeeting/netmeetinginvitation.cpp index 191bc140..5fb799c1 100644 --- a/kopete/plugins/netmeeting/netmeetinginvitation.cpp +++ b/kopete/plugins/netmeeting/netmeetinginvitation.cpp @@ -29,11 +29,11 @@ #include -#include +#include #include -NetMeetingInvitation::NetMeetingInvitation(bool incoming, MSNContact *c, QObject *parent) - : QObject(parent) , MSNInvitation( incoming, NetMeetingInvitation::applicationID() , i18n("NetMeeting") ) +NetMeetingInvitation::NetMeetingInvitation(bool incoming, MSNContact *c, TQObject *parent) + : TQObject(parent) , MSNInvitation( incoming, NetMeetingInvitation::applicationID() , i18n("NetMeeting") ) { m_contact=c; oki=false; @@ -45,20 +45,20 @@ NetMeetingInvitation::~NetMeetingInvitation() } -QString NetMeetingInvitation::invitationHead() +TQString NetMeetingInvitation::invitationHead() { - QTimer::singleShot( 10*60000, this, SLOT( slotTimeout() ) ); //send TIMEOUT in 10 minute if the invitation has not been accepted/refused - return QString( MSNInvitation::invitationHead()+ + TQTimer::singleShot( 10*60000, this, TQT_SLOT( slotTimeout() ) ); //send TIMEOUT in 10 minute if the invitation has not been accepted/refused + return TQString( MSNInvitation::invitationHead()+ "Session-Protocol: SM1\r\n" "Session-ID: {6672F94C-45BF-11D7-B4AE-00010A1008DF}\r\n" //FIXME i don't know what is the session id "\r\n").utf8(); } -void NetMeetingInvitation::parseInvitation(const QString& msg) +void NetMeetingInvitation::parseInvitation(const TQString& msg) { - QRegExp rx("Invitation-Command: ([A-Z]*)"); + TQRegExp rx("Invitation-Command: ([A-Z]*)"); rx.search(msg); - QString command=rx.cap(1); + TQString command=rx.cap(1); if( msg.contains("Invitation-Command: INVITE") ) { MSNInvitation::parseInvitation(msg); //for the cookie @@ -73,12 +73,12 @@ void NetMeetingInvitation::parseInvitation(const QString& msg) { if(result==3) // Yes == 3 { - QCString message=QString( + TQCString message=TQString( "MIME-Version: 1.0\r\n" "Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n" "\r\n" "Invitation-Command: ACCEPT\r\n" - "Invitation-Cookie: " + QString::number(cookie()) + "\r\n" + "Invitation-Cookie: " + TQString::number(cookie()) + "\r\n" "Session-ID: {6672F94C-45BF-11D7-B4AE-00010A1008DF}\r\n" //FIXME "Session-Protocol: SM1\r\n" "Launch-Application: TRUE\r\n" @@ -89,7 +89,7 @@ void NetMeetingInvitation::parseInvitation(const QString& msg) manager->service()->sendCommand( "MSG" , "N", true, message ); oki=false; - QTimer::singleShot( 10* 60000, this, SLOT( slotTimeout() ) ); //TIMOUT afte 10 min + TQTimer::singleShot( 10* 60000, this, TQT_SLOT( slotTimeout() ) ); //TIMOUT afte 10 min } else //No { @@ -105,12 +105,12 @@ void NetMeetingInvitation::parseInvitation(const QString& msg) MSNChatSession* manager=dynamic_cast(m_contact->manager()); if(manager && manager->service()) { - QCString message=QString( + TQCString message=TQString( "MIME-Version: 1.0\r\n" "Content-Type: text/x-msmsgsinvite; charset=UTF-8\r\n" "\r\n" "Invitation-Command: ACCEPT\r\n" - "Invitation-Cookie: " + QString::number(cookie()) + "\r\n" + "Invitation-Cookie: " + TQString::number(cookie()) + "\r\n" "Session-ID: {6672F94C-45BF-11D7-B4AE-00010A1008DF}\r\n" //FIXME: what is session id? "Session-Protocol: SM1\r\n" "Launch-Application: TRUE\r\n" @@ -119,17 +119,17 @@ void NetMeetingInvitation::parseInvitation(const QString& msg) "\r\n" ).utf8(); manager->service()->sendCommand( "MSG" , "N", true, message ); } - rx=QRegExp("IP-Address: ([0-9\\:\\.]*)"); + rx=TQRegExp("IP-Address: ([0-9\\:\\.]*)"); rx.search(msg); - QString ip_address = rx.cap(1); + TQString ip_address = rx.cap(1); startMeeting(ip_address); kdDebug() << k_funcinfo << ip_address << endl; } else { - rx=QRegExp("IP-Address: ([0-9\\:\\.]*)"); + rx=TQRegExp("IP-Address: ([0-9\\:\\.]*)"); rx.search(msg); - QString ip_address = rx.cap(1); + TQString ip_address = rx.cap(1); startMeeting(ip_address); } @@ -156,20 +156,20 @@ void NetMeetingInvitation::slotTimeout() } -void NetMeetingInvitation::startMeeting(const QString & ip_address) +void NetMeetingInvitation::startMeeting(const TQString & ip_address) { //TODO: use KProcess KConfig *config=KGlobal::config(); config->setGroup("Netmeeting Plugin"); - QString app=config->readEntry("NetmeetingApplication","ekiga -c callto://%1").arg(ip_address); + TQString app=config->readEntry("NetmeetingApplication","ekiga -c callto://%1").arg(ip_address); kdDebug() << k_funcinfo << app << endl ; - QStringList args=QStringList::split(" ", app); + TQStringList args=TQStringList::split(" ", app); KProcess p; - for(QStringList::Iterator it=args.begin() ; it != args.end() ; ++it) + for(TQStringList::Iterator it=args.begin() ; it != args.end() ; ++it) { p << *it; } diff --git a/kopete/plugins/netmeeting/netmeetinginvitation.h b/kopete/plugins/netmeeting/netmeetinginvitation.h index 0fbaf318..eb4b2ba6 100644 --- a/kopete/plugins/netmeeting/netmeetinginvitation.h +++ b/kopete/plugins/netmeeting/netmeetinginvitation.h @@ -17,7 +17,7 @@ #ifndef MSNVOICEINVITATION_H #define MSNVOICEINVITATION_H -#include +#include #include "msninvitation.h" class MSNContact; @@ -25,19 +25,19 @@ class MSNContact; /** *@author Olivier Goffart */ -class NetMeetingInvitation : public QObject , public MSNInvitation +class NetMeetingInvitation : public TQObject , public MSNInvitation { Q_OBJECT public: - NetMeetingInvitation(bool incoming ,MSNContact*, QObject *parent = 0); + NetMeetingInvitation(bool incoming ,MSNContact*, TQObject *parent = 0); ~NetMeetingInvitation(); - static QString applicationID() { return "44BBA842-CC51-11CF-AAFA-00AA00B6015C"; } - QString invitationHead(); + static TQString applicationID() { return "44BBA842-CC51-11CF-AAFA-00AA00B6015C"; } + TQString invitationHead(); - virtual void parseInvitation(const QString& invitation); + virtual void parseInvitation(const TQString& invitation); - virtual QObject* object() { return this; } + virtual TQObject* object() { return this; } signals: void done( MSNInvitation * ); @@ -48,7 +48,7 @@ private slots: private: MSNContact *m_contact; bool oki; - void startMeeting(const QString & ip_address); + void startMeeting(const TQString & ip_address); }; diff --git a/kopete/plugins/netmeeting/netmeetingplugin.cpp b/kopete/plugins/netmeeting/netmeetingplugin.cpp index d2ea501c..2d71c257 100644 --- a/kopete/plugins/netmeeting/netmeetingplugin.cpp +++ b/kopete/plugins/netmeeting/netmeetingplugin.cpp @@ -35,19 +35,19 @@ static const KAboutData aboutdata("kopete_netmeeting", I18N_NOOP("NetMeeting") , "1.0" ); K_EXPORT_COMPONENT_FACTORY( kopete_netmeeting, KGenericFactory( &aboutdata ) ) -NetMeetingPlugin::NetMeetingPlugin( QObject *parent, const char *name, const QStringList &/*args*/ ) +NetMeetingPlugin::NetMeetingPlugin( TQObject *parent, const char *name, const TQStringList &/*args*/ ) : Kopete::Plugin( KGlobal::instance(), parent, name ) { if(MSNProtocol::protocol()) slotPluginLoaded(MSNProtocol::protocol()); else - connect(Kopete::PluginManager::self() , SIGNAL(pluginLoaded(Kopete::Plugin*) ), this, SLOT(slotPluginLoaded(Kopete::Plugin*))); + connect(Kopete::PluginManager::self() , TQT_SIGNAL(pluginLoaded(Kopete::Plugin*) ), this, TQT_SLOT(slotPluginLoaded(Kopete::Plugin*))); - connect( Kopete::ChatSessionManager::self(), SIGNAL( chatSessionCreated( Kopete::ChatSession * )) , SLOT( slotNewKMM( Kopete::ChatSession * ) ) ); + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( chatSessionCreated( Kopete::ChatSession * )) , TQT_SLOT( slotNewKMM( Kopete::ChatSession * ) ) ); //Add GUI action to all already existing kmm (if the plugin is launched when kopete already rining) - QValueList sessions = Kopete::ChatSessionManager::self()->sessions(); - for (QValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) + TQValueList sessions = Kopete::ChatSessionManager::self()->sessions(); + for (TQValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) { slotNewKMM(*it); } @@ -62,8 +62,8 @@ void NetMeetingPlugin::slotPluginLoaded(Kopete::Plugin *p) { if(p->pluginId()=="MSNProtocol") { - connect( p , SIGNAL(invitation(MSNInvitation*& , const QString & , long unsigned int , MSNChatSession* , MSNContact* )) , - this, SLOT( slotInvitation(MSNInvitation*& , const QString & , long unsigned int , MSNChatSession* , MSNContact* ))); + connect( p , TQT_SIGNAL(invitation(MSNInvitation*& , const TQString & , long unsigned int , MSNChatSession* , MSNContact* )) , + this, TQT_SLOT( slotInvitation(MSNInvitation*& , const TQString & , long unsigned int , MSNChatSession* , MSNContact* ))); } } @@ -72,14 +72,14 @@ void NetMeetingPlugin::slotNewKMM(Kopete::ChatSession *KMM) MSNChatSession *msnMM=dynamic_cast(KMM); if(msnMM) { - connect(this , SIGNAL( destroyed(QObject*)) , + connect(this , TQT_SIGNAL( destroyed(TQObject*)) , new NetMeetingGUIClient(msnMM) - , SLOT(deleteLater())); + , TQT_SLOT(deleteLater())); } } -void NetMeetingPlugin::slotInvitation(MSNInvitation*& invitation, const QString &bodyMSG , long unsigned int /*cookie*/ , MSNChatSession* msnMM , MSNContact* c ) +void NetMeetingPlugin::slotInvitation(MSNInvitation*& invitation, const TQString &bodyMSG , long unsigned int /*cookie*/ , MSNChatSession* msnMM , MSNContact* c ) { if(!invitation && bodyMSG.contains(NetMeetingInvitation::applicationID())) { diff --git a/kopete/plugins/netmeeting/netmeetingplugin.h b/kopete/plugins/netmeeting/netmeetingplugin.h index 7427bbf8..495eb510 100644 --- a/kopete/plugins/netmeeting/netmeetingplugin.h +++ b/kopete/plugins/netmeeting/netmeetingplugin.h @@ -31,13 +31,13 @@ class NetMeetingPlugin : public Kopete::Plugin Q_OBJECT public: - NetMeetingPlugin( QObject *parent, const char *name, const QStringList &args ); + NetMeetingPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~NetMeetingPlugin(); private slots: void slotNewKMM(Kopete::ChatSession *); void slotPluginLoaded(Kopete::Plugin*); - void slotInvitation(MSNInvitation*& invitation, const QString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c ); + void slotInvitation(MSNInvitation*& invitation, const TQString &bodyMSG , long unsigned int cookie , MSNChatSession* msnMM , MSNContact* c ); }; diff --git a/kopete/plugins/netmeeting/netmeetingpreferences.cpp b/kopete/plugins/netmeeting/netmeetingpreferences.cpp index b28dfe09..313eb197 100644 --- a/kopete/plugins/netmeeting/netmeetingpreferences.cpp +++ b/kopete/plugins/netmeeting/netmeetingpreferences.cpp @@ -14,8 +14,8 @@ * * ***************************************************************************/ -#include -#include +#include +#include #include #include @@ -39,13 +39,13 @@ typedef KGenericFactory NetmeetingPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_netmeeting, NetmeetingPreferencesFactory( "kcm_kopete_netmeeting" ) ) -NetmeetingPreferences::NetmeetingPreferences(QWidget *parent, const char* /*name*/, const QStringList &args) +NetmeetingPreferences::NetmeetingPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) : KCModule(NetmeetingPreferencesFactory::instance(), parent, args) { - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new NetmeetingPrefsUI(this); - connect(preferencesDialog->m_app , SIGNAL(textChanged(const QString &)) , this , SLOT(slotChanged())); + connect(preferencesDialog->m_app , TQT_SIGNAL(textChanged(const TQString &)) , this , TQT_SLOT(slotChanged())); load(); } diff --git a/kopete/plugins/netmeeting/netmeetingpreferences.h b/kopete/plugins/netmeeting/netmeetingpreferences.h index 94a7031e..6ad09f58 100644 --- a/kopete/plugins/netmeeting/netmeetingpreferences.h +++ b/kopete/plugins/netmeeting/netmeetingpreferences.h @@ -18,7 +18,7 @@ #define NetmeetingPREFERENCES_H #include -#include +#include class NetmeetingPrefsUI; @@ -30,7 +30,7 @@ class NetmeetingPreferences : public KCModule { Q_OBJECT public: - NetmeetingPreferences(QWidget *parent = 0, const char* name = 0, const QStringList &args = QStringList()); + NetmeetingPreferences(TQWidget *parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); ~NetmeetingPreferences(); virtual void save(); diff --git a/kopete/plugins/nowlistening/nlamarok.cpp b/kopete/plugins/nowlistening/nlamarok.cpp index 15d19411..9101758c 100644 --- a/kopete/plugins/nowlistening/nlamarok.cpp +++ b/kopete/plugins/nowlistening/nlamarok.cpp @@ -22,7 +22,7 @@ */ #include -#include +#include #include "nlmediaplayer.h" #include "nlamarok.h" @@ -38,10 +38,10 @@ void NLamaroK::update() { m_playing = false; m_newTrack = false; - QString newTrack; - QByteArray data, replyData; - QCString replyType; - QString result; + TQString newTrack; + TQByteArray data, replyData; + TQCString replyType; + TQString result; // see if amaroK is registered with DCOP if ( !m_client->isApplicationRegistered( "amarok" ) ) @@ -64,7 +64,7 @@ void NLamaroK::update() } else { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if ( replyType == "bool" ) { reply >> m_playing; } @@ -74,7 +74,7 @@ void NLamaroK::update() { int status = 0; - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if ( replyType == "int" ) { reply >> status; kdDebug( 14307 ) << k_funcinfo << "Amarok status()=" << status << endl; @@ -89,9 +89,9 @@ void NLamaroK::update() if ( m_client->call( "amarok", "player", "title()", data, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + if ( replyType == "TQString" ) { reply >> newTrack; } } @@ -105,9 +105,9 @@ void NLamaroK::update() if ( m_client->call( "amarok", "player", "album()", data, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + if ( replyType == "TQString" ) { reply >> m_album; } } @@ -115,9 +115,9 @@ void NLamaroK::update() if ( m_client->call( "amarok", "player", "artist()", data, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + if ( replyType == "TQString" ) { reply >> m_artist; } } diff --git a/kopete/plugins/nowlistening/nljuk.cpp b/kopete/plugins/nowlistening/nljuk.cpp index 41de23bc..422e0db9 100644 --- a/kopete/plugins/nowlistening/nljuk.cpp +++ b/kopete/plugins/nowlistening/nljuk.cpp @@ -22,7 +22,7 @@ */ #include -#include +#include #include "nlmediaplayer.h" #include "nljuk.h" @@ -37,62 +37,62 @@ NLJuk::NLJuk( DCOPClient *client ) : NLMediaPlayer() void NLJuk::update() { m_playing = false; - QString newTrack; + TQString newTrack; // see if JuK is registered with DCOP if ( m_client->isApplicationRegistered( "juk" ) ) { // see if it's playing - QByteArray data, replyData; - QCString replyType; - QString result; + TQByteArray data, replyData; + TQCString replyType; + TQString result; if ( m_client->call( "juk", "Player", "playing()", data, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if ( replyType == "bool" ) { reply >> m_playing; } } { - QDataStream arg( data, IO_WriteOnly ); - arg << QString::fromLatin1("Album"); - if ( m_client->call( "juk", "Player", "trackProperty(QString)", data, + TQDataStream arg( data, IO_WriteOnly ); + arg << TQString::fromLatin1("Album"); + if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + if ( replyType == "TQString" ) { reply >> m_album; } } } { - QDataStream arg( data, IO_WriteOnly ); - arg << QString::fromLatin1("Artist"); - if ( m_client->call( "juk", "Player", "trackProperty(QString)", data, + TQDataStream arg( data, IO_WriteOnly ); + arg << TQString::fromLatin1("Artist"); + if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + if ( replyType == "TQString" ) { reply >> m_artist; } } } { - QDataStream arg( data, IO_WriteOnly ); - arg << QString::fromLatin1("Title"); - if ( m_client->call( "juk", "Player", "trackProperty(QString)", data, + TQDataStream arg( data, IO_WriteOnly ); + arg << TQString::fromLatin1("Title"); + if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + if ( replyType == "TQString" ) { reply >> newTrack; } } diff --git a/kopete/plugins/nowlistening/nlkaffeine.cpp b/kopete/plugins/nowlistening/nlkaffeine.cpp index fe02077f..d5823298 100644 --- a/kopete/plugins/nowlistening/nlkaffeine.cpp +++ b/kopete/plugins/nowlistening/nlkaffeine.cpp @@ -22,7 +22,7 @@ */ #include -#include +#include #include "nlmediaplayer.h" #include "nlkaffeine.h" @@ -38,17 +38,17 @@ void NLKaffeine::update() { m_playing = false; m_newTrack = false; - QString newTrack; + TQString newTrack; bool error = true; // Asume we have a error first. - QCString kaffeineIface("Kaffeine"), kaffeineGetTrack("getTitle()"); + TQCString kaffeineIface("Kaffeine"), kaffeineGetTrack("getTitle()"); // see if kaffeine is registered with DCOP if ( m_client->isApplicationRegistered( "kaffeine" ) ) { // see if it's playing - QByteArray data, replyData; - QCString replyType; - QString result; + TQByteArray data, replyData; + TQCString replyType; + TQString result; if ( !m_client->call( "kaffeine", kaffeineIface, "isPlaying()", data, replyType, replyData ) ) { @@ -73,7 +73,7 @@ void NLKaffeine::update() // If we didn't get any DCOP error, check if Kaffeine is playing. if(!error) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if ( replyType == "bool" ) { reply >> m_playing; kdDebug( 14307 ) << "checked if Kaffeine is playing!" << endl; @@ -83,9 +83,9 @@ void NLKaffeine::update() if ( m_client->call( "kaffeine", kaffeineIface, kaffeineGetTrack, data, replyType, replyData ) ) { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + if ( replyType == "TQString" ) { reply >> newTrack; } } diff --git a/kopete/plugins/nowlistening/nlkscd.cpp b/kopete/plugins/nowlistening/nlkscd.cpp index a20c809b..06bf6c28 100644 --- a/kopete/plugins/nowlistening/nlkscd.cpp +++ b/kopete/plugins/nowlistening/nlkscd.cpp @@ -22,7 +22,7 @@ */ #include -#include +#include #include "nlmediaplayer.h" @@ -38,13 +38,13 @@ NLKscd::NLKscd( DCOPClient *client ) : NLMediaPlayer() void NLKscd::update() { m_playing = false; - QString newTrack; + TQString newTrack; // see if it's registered with DCOP if ( m_client->isApplicationRegistered( "kscd" ) ) { // see if it's playing - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if ( !m_client->call( "kscd", "CDPlayer", "playing()", data, replyType, replyData ) ) { @@ -55,7 +55,7 @@ void NLKscd::update() } else { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if ( replyType == "bool" ) { reply >> m_playing; // kdDebug( 14307 ) << "NLKscd::update() - KsCD is " << @@ -68,8 +68,8 @@ void NLKscd::update() kdDebug( 14307 ) << "NLKscd::update() DCOP error" << endl; else { - QDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) + TQDataStream reply( replyData, IO_ReadOnly ); + if ( replyType == "TQString" ) reply >> m_artist; else kdDebug( 14307 ) << "NLKscd::update() trackList returned unexpected reply type!" << endl; @@ -81,8 +81,8 @@ void NLKscd::update() kdDebug( 14307 ) << "NLKscd::update() DCOP error" << endl; else { - QDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) + TQDataStream reply( replyData, IO_ReadOnly ); + if ( replyType == "TQString" ) reply >> m_album; else kdDebug( 14307 ) << "NLKscd::update() trackList returned unexpected reply type!" << endl; @@ -93,8 +93,8 @@ void NLKscd::update() "currentTrackTitle()", data, replyType, replyData ) ) kdDebug( 14307 ) << "NLKscd::update() - there was some error using DCOP." << endl; else { - QDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + TQDataStream reply( replyData, IO_ReadOnly ); + if ( replyType == "TQString" ) { reply >> newTrack; //kdDebug( 14307 ) << "the result is: " << newTrack.latin1() // << endl; diff --git a/kopete/plugins/nowlistening/nlmediaplayer.h b/kopete/plugins/nowlistening/nlmediaplayer.h index 5c619150..dad13190 100644 --- a/kopete/plugins/nowlistening/nlmediaplayer.h +++ b/kopete/plugins/nowlistening/nlmediaplayer.h @@ -38,19 +38,19 @@ class NLMediaPlayer virtual void update() = 0; bool playing() const { return m_playing; } bool newTrack() const { return m_newTrack; } - QString artist() const { return m_artist; } - QString album() const { return m_album; } - QString track() const { return m_track; } - QString name() const{ return m_name; } + TQString artist() const { return m_artist; } + TQString album() const { return m_album; } + TQString track() const { return m_track; } + TQString name() const{ return m_name; } NLMediaType mediaType() const { return m_type; } protected: // The name of the application - QString m_name; + TQString m_name; bool m_playing; bool m_newTrack; - QString m_artist; - QString m_album; - QString m_track; + TQString m_artist; + TQString m_album; + TQString m_track; NLMediaType m_type; }; diff --git a/kopete/plugins/nowlistening/nlnoatun.cpp b/kopete/plugins/nowlistening/nlnoatun.cpp index 62bdc8ba..c9c504c2 100644 --- a/kopete/plugins/nowlistening/nlnoatun.cpp +++ b/kopete/plugins/nowlistening/nlnoatun.cpp @@ -37,14 +37,14 @@ void NLNoatun::update() { // Thanks mETz for telling me about Noatun's currentProperty() m_playing = false; - QString newTrack; + TQString newTrack; // see if it's registered with DCOP - QCString appname = find(); + TQCString appname = find(); if ( !appname.isEmpty() ) { // see if it's playing - QByteArray data, replyData; - QCString replyType; + TQByteArray data, replyData; + TQCString replyType; if ( !m_client->call( appname, "Noatun", "state()", data, replyType, replyData ) ) { @@ -52,7 +52,7 @@ void NLNoatun::update() } else { - QDataStream reply( replyData, IO_ReadOnly ); + TQDataStream reply( replyData, IO_ReadOnly ); if ( replyType == "int" ) { int state = 0; reply >> state; @@ -64,7 +64,7 @@ void NLNoatun::update() // Using properties m_artist = currentProperty( appname, "author" ); m_album = currentProperty( appname, "album" ); - QString title = currentProperty( appname, "title" ); + TQString title = currentProperty( appname, "title" ); // if properties not set ( no id3 tags... ) fallback to filename if ( !title.isEmpty() ) newTrack = title; @@ -75,8 +75,8 @@ void NLNoatun::update() kdDebug( 14307 ) << "NLNoatun::update() DCOP error on " << appname << endl; else { - QDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) { + TQDataStream reply( replyData, IO_ReadOnly ); + if ( replyType == "TQString" ) { reply >> newTrack; } else kdDebug( 14307 ) << "NLNoatun::update(), title() returned unexpected reply type!" << endl; @@ -97,9 +97,9 @@ void NLNoatun::update() kdDebug( 14307 ) << "NLNoatun::update() - noatun not found" << endl; } -QCString NLNoatun::find() const +TQCString NLNoatun::find() const { - QCString app = "noatun"; + TQCString app = "noatun"; if ( !m_client->isApplicationRegistered( app ) ) { // looking for a registered app prefixed with 'app' @@ -121,23 +121,23 @@ QCString NLNoatun::find() const return app; } -QString NLNoatun::currentProperty( QCString appname, QString property ) const +TQString NLNoatun::currentProperty( TQCString appname, TQString property ) const { - QByteArray data, replyData; - QCString replyType; - QDataStream arg( data, IO_WriteOnly ); - QString result = ""; + TQByteArray data, replyData; + TQCString replyType; + TQDataStream arg( data, IO_WriteOnly ); + TQString result = ""; arg << property; if ( !m_client->call( appname, "Noatun", - "currentProperty(QString)", data, replyType, replyData ) ) + "currentProperty(TQString)", data, replyType, replyData ) ) { kdDebug( 14307 ) << "NLNoatun::currentProperty() DCOP error on " << appname << endl; } else { - QDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "QString" ) + TQDataStream reply( replyData, IO_ReadOnly ); + if ( replyType == "TQString" ) { reply >> result; } diff --git a/kopete/plugins/nowlistening/nlnoatun.h b/kopete/plugins/nowlistening/nlnoatun.h index 88441754..85e1aaac 100644 --- a/kopete/plugins/nowlistening/nlnoatun.h +++ b/kopete/plugins/nowlistening/nlnoatun.h @@ -32,8 +32,8 @@ class NLNoatun : public NLMediaPlayer NLNoatun( DCOPClient *client ); virtual void update(); protected: - QCString find() const; - QString currentProperty( QCString appname, QString property ) const; + TQCString find() const; + TQString currentProperty( TQCString appname, TQString property ) const; DCOPClient *m_client; }; diff --git a/kopete/plugins/nowlistening/nlxmms.cpp b/kopete/plugins/nowlistening/nlxmms.cpp index a2d3637d..3f5bb675 100644 --- a/kopete/plugins/nowlistening/nlxmms.cpp +++ b/kopete/plugins/nowlistening/nlxmms.cpp @@ -49,7 +49,7 @@ void NLXmms::update() if ( xmmslib && xmms_remote_get_version( 0 ) ) { - QString newTrack; + TQString newTrack; // see if it's playing if ( xmms_remote_is_playing( 0 ) && !xmms_remote_is_paused( 0 ) ) { diff --git a/kopete/plugins/nowlistening/nowlisteningguiclient.cpp b/kopete/plugins/nowlistening/nowlisteningguiclient.cpp index 8e7b1908..c5e47ef0 100644 --- a/kopete/plugins/nowlistening/nowlisteningguiclient.cpp +++ b/kopete/plugins/nowlistening/nowlisteningguiclient.cpp @@ -30,12 +30,12 @@ #include NowListeningGUIClient::NowListeningGUIClient( Kopete::ChatSession *parent, NowListeningPlugin *plugin ) - : QObject(parent) , KXMLGUIClient(parent) + : TQObject(parent) , KXMLGUIClient(parent) { - connect(plugin, SIGNAL(readyForUnload()), SLOT(slotPluginUnloaded())); + connect(plugin, TQT_SIGNAL(readyForUnload()), TQT_SLOT(slotPluginUnloaded())); m_msgManager = parent; m_action = new KAction( i18n( "Send Media Info" ), 0, this, - SLOT( slotAdvertToCurrentChat() ), actionCollection(), "actionSendAdvert" ); + TQT_SLOT( slotAdvertToCurrentChat() ), actionCollection(), "actionSendAdvert" ); setXMLFile("nowlisteningchatui.rc"); } @@ -47,13 +47,13 @@ void NowListeningGUIClient::slotAdvertToCurrentChat() if (!NowListeningPlugin::plugin()) return; - QString message = NowListeningPlugin::plugin()->mediaPlayerAdvert(); + TQString message = NowListeningPlugin::plugin()->mediaPlayerAdvert(); // We warn in a mode appropriate to the mode the user invoked the // plugin - GUI on menu action, in message if they typed '/media' if ( message.isEmpty() ) { - QWidget * origin = 0L; + TQWidget * origin = 0L; if ( m_msgManager && m_msgManager->view() ) origin = m_msgManager->view()->mainWidget(); KMessageBox::queuedMessageBox( origin, KMessageBox::Sorry, diff --git a/kopete/plugins/nowlistening/nowlisteningguiclient.h b/kopete/plugins/nowlistening/nowlisteningguiclient.h index 9f89d351..b12b0424 100644 --- a/kopete/plugins/nowlistening/nowlisteningguiclient.h +++ b/kopete/plugins/nowlistening/nowlisteningguiclient.h @@ -21,7 +21,7 @@ #ifndef NOWLISTENINGGUICLIENT_H #define NOWLISTENINGGUICLIENT_H -#include +#include #include class KAction; @@ -31,7 +31,7 @@ namespace Kopete { class ChatSession; } -class NowListeningGUIClient : public QObject, public KXMLGUIClient +class NowListeningGUIClient : public TQObject, public KXMLGUIClient { Q_OBJECT diff --git a/kopete/plugins/nowlistening/nowlisteningplugin.cpp b/kopete/plugins/nowlistening/nowlisteningplugin.cpp index e28316be..4c286b0f 100644 --- a/kopete/plugins/nowlistening/nowlisteningplugin.cpp +++ b/kopete/plugins/nowlistening/nowlisteningplugin.cpp @@ -18,9 +18,9 @@ ************************************************************************* */ -#include -#include -#include +#include +#include +#include #include #include @@ -59,7 +59,7 @@ public: {} // abstracted media player interfaces - QPtrList m_mediaPlayerList; + TQPtrList m_mediaPlayerList; NLMediaPlayer *m_currentMediaPlayer; // Needed for DCOP interprocess communication @@ -69,16 +69,16 @@ public: // Used when using automatic advertising to know who has already gotten // the music information - QStringList m_musicSentTo; + TQStringList m_musicSentTo; // Used when advertising to status message. - QTimer *advertTimer; + TQTimer *advertTimer; }; typedef KGenericFactory NowListeningPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_nowlistening, NowListeningPluginFactory( "kopete_nowlistening" ) ) -NowListeningPlugin::NowListeningPlugin( QObject *parent, const char* name, const QStringList& /*args*/ ) +NowListeningPlugin::NowListeningPlugin( TQObject *parent, const char* name, const TQStringList& /*args*/ ) : Kopete::Plugin( NowListeningPluginFactory::instance(), parent, name ) { if ( pluginStatic_ ) @@ -91,18 +91,18 @@ NowListeningPlugin::NowListeningPlugin( QObject *parent, const char* name, const kdDebug(14307) << k_funcinfo << endl; // Connection for the "/media" command (always needed) - connect( Kopete::ChatSessionManager::self(), SIGNAL( - chatSessionCreated( Kopete::ChatSession * )) , SLOT( slotNewKMM( + connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( + chatSessionCreated( Kopete::ChatSession * )) , TQT_SLOT( slotNewKMM( Kopete::ChatSession * ) ) ); // If autoadvertising is on... connect(Kopete::ChatSessionManager::self(), - SIGNAL(aboutToSend(Kopete::Message&)), + TQT_SIGNAL(aboutToSend(Kopete::Message&)), this, - SLOT(slotOutgoingMessage(Kopete::Message&))); + TQT_SLOT(slotOutgoingMessage(Kopete::Message&))); - QValueList sessions = Kopete::ChatSessionManager::self()->sessions(); - for (QValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) + TQValueList sessions = Kopete::ChatSessionManager::self()->sessions(); + for (TQValueListIterator it= sessions.begin(); it!=sessions.end() ; ++it) slotNewKMM( *it ); // get a pointer to the dcop client @@ -130,16 +130,16 @@ NowListeningPlugin::NowListeningPlugin( QObject *parent, const char* name, const Kopete::CommandHandler::commandHandler()->registerCommand( this, "media", - SLOT( slotMediaCommand( const QString &, Kopete::ChatSession * ) ), + TQT_SLOT( slotMediaCommand( const TQString &, Kopete::ChatSession * ) ), i18n("USAGE: /media - Displays information on current song"), 0 ); - connect ( this , SIGNAL( settingsChanged() ) , this , SLOT( slotSettingsChanged() ) ); + connect ( this , TQT_SIGNAL( settingsChanged() ) , this , TQT_SLOT( slotSettingsChanged() ) ); // Advert the accounts with the current listened track. - d->advertTimer = new QTimer(this); - connect(d->advertTimer, SIGNAL( timeout() ), this, SLOT( slotAdvertCurrentMusic() ) ); + d->advertTimer = new TQTimer(this); + connect(d->advertTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAdvertCurrentMusic() ) ); d->advertTimer->start(5000); // Update every 5 seconds } @@ -162,9 +162,9 @@ NowListeningPlugin* NowListeningPlugin::plugin() return pluginStatic_ ; } -void NowListeningPlugin::slotMediaCommand( const QString &args, Kopete::ChatSession *theChat ) +void NowListeningPlugin::slotMediaCommand( const TQString &args, Kopete::ChatSession *theChat ) { - QString advert = mediaPlayerAdvert(); + TQString advert = mediaPlayerAdvert(); if ( advert.isEmpty() ) { // Catch no players/no track playing message case: @@ -189,14 +189,14 @@ void NowListeningPlugin::slotOutgoingMessage(Kopete::Message& msg) if(!NowListeningConfig::self()->chatAdvertising()) return; - QString originalBody = msg.plainBody(); + TQString originalBody = msg.plainBody(); // If it is a /media message, don't process it if(originalBody.startsWith(NowListeningConfig::self()->header())) return; // What will be sent - QString newBody; + TQString newBody; // Getting the list of contacts the message will be sent to to determine if at least // one of them has never gotten the current music information. @@ -204,7 +204,7 @@ void NowListeningPlugin::slotOutgoingMessage(Kopete::Message& msg) bool mustSendAnyway = false; for( Kopete::Contact *c = dest.first() ; c ; c = dest.next() ) { - const QString& cId = c->contactId(); + const TQString& cId = c->contactId(); if( 0 == d->m_musicSentTo.contains( cId ) ) { mustSendAnyway = true; @@ -220,7 +220,7 @@ void NowListeningPlugin::slotOutgoingMessage(Kopete::Message& msg) // has changed since it was last sent. if ( mustSendAnyway || newTrack ) { - QString advert = mediaPlayerAdvert(false); // false since newTrackPlaying() did the update + TQString advert = mediaPlayerAdvert(false); // false since newTrackPlaying() did the update if( !advert.isEmpty() ) newBody = originalBody + "
    " + advert; @@ -252,9 +252,9 @@ void NowListeningPlugin::slotAdvertCurrentMusic() // This slot is called every 5 seconds, so we check if we have a new track playing. if( newTrackPlaying() ) { - QString advert; + TQString advert; - QPtrList accountsList = Kopete::AccountManager::self()->accounts(); + TQPtrList accountsList = Kopete::AccountManager::self()->accounts(); for( Kopete::Account* a = accountsList.first(); a; a = accountsList.next() ) { /* @@ -266,7 +266,7 @@ void NowListeningPlugin::slotAdvertCurrentMusic() */ if( a->protocol()->pluginId() == "MSNProtocol" && !NowListeningConfig::self()->appendStatusAdvertising() ) { - QString track, artist, album, mediaList; + TQString track, artist, album, mediaList; bool isPlaying=false; if( NowListeningConfig::self()->useSpecifiedMediaPlayer() && d->m_currentMediaPlayer ) @@ -298,7 +298,7 @@ void NowListeningPlugin::slotAdvertCurrentMusic() // KDE4 TODO: Use the new status message framework, and remove this "hack". if( isPlaying ) { - advert = QString("[Music]%1").arg(mediaList); + advert = TQString("[Music]%1").arg(mediaList); } } @@ -308,21 +308,21 @@ void NowListeningPlugin::slotAdvertCurrentMusic() { // Check for the now listening message in parenthesis, // include the header to not override other messages in parenthesis. - QRegExp statusSong( QString(" \\(%1.*\\)$").arg( NowListeningConfig::header()) ); + TQRegExp statusSong( TQString(" \\(%1.*\\)$").arg( NowListeningConfig::header()) ); // HACK: Don't keep appending the now listened song. Replace it in the status message. advert = a->myself()->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString(); // Remove the braces when they are no listened song. - QString mediaAdvert = mediaPlayerAdvert(false); + TQString mediaAdvert = mediaPlayerAdvert(false); if(!mediaAdvert.isEmpty()) { if(statusSong.search(advert) != -1) { - advert = advert.replace(statusSong, QString(" (%1)").arg(mediaPlayerAdvert(false)) ); + advert = advert.replace(statusSong, TQString(" (%1)").arg(mediaPlayerAdvert(false)) ); } else { - advert += QString(" (%1)").arg( mediaPlayerAdvert(false) ); + advert += TQString(" (%1)").arg( mediaPlayerAdvert(false) ); } } else @@ -341,10 +341,10 @@ void NowListeningPlugin::slotAdvertCurrentMusic() } } -QString NowListeningPlugin::mediaPlayerAdvert(bool update) +TQString NowListeningPlugin::mediaPlayerAdvert(bool update) { // generate message for all players - QString message; + TQString message; if( NowListeningConfig::self()->useSpecifiedMediaPlayer() && d->m_currentMediaPlayer != 0L ) { @@ -363,9 +363,9 @@ QString NowListeningPlugin::mediaPlayerAdvert(bool update) return message; } -void NowListeningPlugin::buildTrackMessage(QString &message, NLMediaPlayer *player, bool update) +void NowListeningPlugin::buildTrackMessage(TQString &message, NLMediaPlayer *player, bool update) { - QString perTrack = NowListeningConfig::self()->perTrack(); + TQString perTrack = NowListeningConfig::self()->perTrack(); if(update) player->update(); @@ -401,17 +401,17 @@ bool NowListeningPlugin::newTrackPlaying(void) const return false; } -QString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player, - QString in, bool inBrackets ) const +TQString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player, + TQString in, bool inBrackets ) const { - QString track = player->track(); - QString artist = player->artist(); - QString album = player->album(); - QString playerName = player->name(); + TQString track = player->track(); + TQString artist = player->artist(); + TQString album = player->album(); + TQString playerName = player->name(); for ( unsigned int i = 0; i < in.length(); i++ ) { - QChar c = in.at( i ); + TQChar c = in.at( i ); //kdDebug(14307) << "Now working on:" << in << " char is: " << c << endl; if ( c == '(' ) { @@ -420,7 +420,7 @@ QString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player, //kdDebug(14307) << "Looking for ')'" << endl; for ( unsigned int j = i + 1; j < in.length(); j++ ) { - QChar d = in.at( j ); + TQChar d = in.at( j ); //kdDebug(14307) << "Got " << d << endl; if ( d == '(' ) depth++; @@ -430,7 +430,7 @@ QString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player, if ( depth == 0 ) { // recursively replace contents of matching () - QString substitution = substDepthFirst( player, + TQString substitution = substDepthFirst( player, in.mid( i + 1, j - i - 1), true ) ; in.replace ( i, j - i + 1, substitution ); // perform substitution and return the result @@ -484,7 +484,7 @@ QString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player, return in; } -void NowListeningPlugin::advertiseToChat( Kopete::ChatSession *theChat, QString message ) +void NowListeningPlugin::advertiseToChat( Kopete::ChatSession *theChat, TQString message ) { Kopete::ContactPtrList pl = theChat->members(); @@ -522,27 +522,27 @@ void NowListeningPlugin::slotSettingsChanged() updateCurrentMediaPlayer(); disconnect(Kopete::ChatSessionManager::self(), - SIGNAL(aboutToSend(Kopete::Message&)), + TQT_SIGNAL(aboutToSend(Kopete::Message&)), this, - SLOT(slotOutgoingMessage(Kopete::Message&))); + TQT_SLOT(slotOutgoingMessage(Kopete::Message&))); d->advertTimer->stop(); - disconnect(d->advertTimer, SIGNAL(timeout()), this, SLOT(slotAdvertCurrentMusic())); + disconnect(d->advertTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAdvertCurrentMusic())); if( NowListeningConfig::self()->chatAdvertising() ) { kdDebug(14307) << k_funcinfo << "Now using chat window advertising." << endl; connect(Kopete::ChatSessionManager::self(), - SIGNAL(aboutToSend(Kopete::Message&)), + TQT_SIGNAL(aboutToSend(Kopete::Message&)), this, - SLOT(slotOutgoingMessage(Kopete::Message&))); + TQT_SLOT(slotOutgoingMessage(Kopete::Message&))); } else if( NowListeningConfig::self()->statusAdvertising() || NowListeningConfig::self()->appendStatusAdvertising() ) { kdDebug(14307) << k_funcinfo << "Now using status message advertising." << endl; - connect(d->advertTimer, SIGNAL(timeout()), this, SLOT(slotAdvertCurrentMusic())); + connect(d->advertTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAdvertCurrentMusic())); d->advertTimer->start(5000); } } diff --git a/kopete/plugins/nowlistening/nowlisteningplugin.h b/kopete/plugins/nowlistening/nowlisteningplugin.h index 7a608fd2..848b8aef 100644 --- a/kopete/plugins/nowlistening/nowlisteningplugin.h +++ b/kopete/plugins/nowlistening/nowlisteningplugin.h @@ -23,7 +23,7 @@ #include "kopeteplugin.h" -#include +#include namespace Kopete { class ChatSession; class Message; } @@ -41,12 +41,12 @@ class NowListeningPlugin : public Kopete::Plugin friend class NowListeningGUIClient; public: - NowListeningPlugin( QObject *parent, const char *name, const QStringList &args ); + NowListeningPlugin( TQObject *parent, const char *name, const TQStringList &args ); virtual ~NowListeningPlugin(); static NowListeningPlugin* plugin(); public slots: - void slotMediaCommand( const QString &, Kopete::ChatSession *theChat ); + void slotMediaCommand( const TQString &, Kopete::ChatSession *theChat ); void slotOutgoingMessage(Kopete::Message&); void slotAdvertCurrentMusic(); @@ -57,17 +57,17 @@ friend class NowListeningGUIClient; * useful to set it to false if one already has called * update somewhere else, for instance in newTrackPlaying(). */ - QString mediaPlayerAdvert(bool update = true); + TQString mediaPlayerAdvert(bool update = true); /** * @internal Build the message for @ref mediaPlayerAdvert - * @param message Reference to the messsage, because return QString cause data loss. + * @param message Reference to the messsage, because return TQString cause data loss. * @param player Pointer to the current Media Player. * Used to get the information about the current track playing. * @param update Whether the players must update their data. It can be * useful to set it to false if one already has called * update somewhere else, for instance in newTrackPlaying(). */ - void buildTrackMessage(QString &message, NLMediaPlayer *player, bool update); + void buildTrackMessage(TQString &message, NLMediaPlayer *player, bool update); /** * @return true if one of the players has changed track since the last message. */ @@ -78,11 +78,11 @@ friend class NowListeningGUIClient; * @p in - the source format string * @p bool - is this call within a set of brackets for conditional expansion? */ - QString substDepthFirst( NLMediaPlayer *player, QString in, bool inBrackets) const; + TQString substDepthFirst( NLMediaPlayer *player, TQString in, bool inBrackets) const; /** * Sends a message to a single chat */ - void advertiseToChat( Kopete::ChatSession* theChat, QString message ); + void advertiseToChat( Kopete::ChatSession* theChat, TQString message ); /** * Update the currentMedia pointer on config change. */ diff --git a/kopete/plugins/nowlistening/nowlisteningpreferences.cpp b/kopete/plugins/nowlistening/nowlisteningpreferences.cpp index 179ce3a5..118b37da 100644 --- a/kopete/plugins/nowlistening/nowlisteningpreferences.cpp +++ b/kopete/plugins/nowlistening/nowlisteningpreferences.cpp @@ -17,10 +17,10 @@ * * ************************************************************************* */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -36,22 +36,22 @@ typedef KGenericFactory NowListeningPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_nowlistening, NowListeningPreferencesFactory( "kcm_kopete_nowlistening" ) ) -NowListeningPreferences::NowListeningPreferences(QWidget *parent, const char* /*name*/, const QStringList &args) +NowListeningPreferences::NowListeningPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) : KCModule( NowListeningPreferencesFactory::instance(), parent, args ) { - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new NowListeningPrefsUI( this ); addConfig( NowListeningConfig::self(), preferencesDialog ); // Fill the media player listbox. - preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Kscd")); - preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Noatun")); - preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Juk")); - preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("amaroK")); - preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Kaffeine")); + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Kscd")); + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Noatun")); + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Juk")); + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("amaroK")); + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Kaffeine")); #if defined Q_WS_X11 && !defined K_WS_QTONLY && defined HAVE_XMMS - preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("XMMS")); + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("XMMS")); #endif load(); } diff --git a/kopete/plugins/nowlistening/nowlisteningpreferences.h b/kopete/plugins/nowlistening/nowlisteningpreferences.h index 14d9ceea..078b1a0c 100644 --- a/kopete/plugins/nowlistening/nowlisteningpreferences.h +++ b/kopete/plugins/nowlistening/nowlisteningpreferences.h @@ -33,7 +33,7 @@ class NowListeningPreferences : public KCModule { Q_OBJECT public: - NowListeningPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList()); + NowListeningPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList()); virtual ~NowListeningPreferences(); virtual void save(); virtual void load(); diff --git a/kopete/plugins/smpppdcs/detectordcop.cpp b/kopete/plugins/smpppdcs/detectordcop.cpp index 2536674d..f5f5f992 100644 --- a/kopete/plugins/smpppdcs/detectordcop.cpp +++ b/kopete/plugins/smpppdcs/detectordcop.cpp @@ -23,7 +23,7 @@ #include "detectordcop.h" #include "iconnector.h" -QCString DetectorDCOP::m_kinternetApp = ""; +TQCString DetectorDCOP::m_kinternetApp = ""; DetectorDCOP::DetectorDCOP(IConnector * connector) : Detector(connector) {} @@ -33,7 +33,7 @@ DetectorDCOP::~DetectorDCOP() {} /*! \fn DetectorDCOP::getKInternetDCOP() */ -QCString DetectorDCOP::getKInternetDCOP() const { +TQCString DetectorDCOP::getKInternetDCOP() const { DCOPClient * client = kapp->dcopClient(); if(m_kinternetApp.isEmpty() && client && client->isAttached()) { // get all registered dcop apps and search for kinternet diff --git a/kopete/plugins/smpppdcs/detectordcop.h b/kopete/plugins/smpppdcs/detectordcop.h index 5306998b..6a9602d3 100644 --- a/kopete/plugins/smpppdcs/detectordcop.h +++ b/kopete/plugins/smpppdcs/detectordcop.h @@ -41,11 +41,11 @@ protected: ERROR }; - QCString getKInternetDCOP() const; + TQCString getKInternetDCOP() const; KInternetDCOPState getConnectionStatusDCOP() const; protected: - static QCString m_kinternetApp; + static TQCString m_kinternetApp; }; #endif diff --git a/kopete/plugins/smpppdcs/detectornetstat.cpp b/kopete/plugins/smpppdcs/detectornetstat.cpp index 60dff658..cb9a393a 100644 --- a/kopete/plugins/smpppdcs/detectornetstat.cpp +++ b/kopete/plugins/smpppdcs/detectornetstat.cpp @@ -21,7 +21,7 @@ #include "detectornetstat.h" DetectorNetstat::DetectorNetstat(IConnector* connector) - : Detector(connector), m_buffer(QString::null), m_process(NULL) {} + : Detector(connector), m_buffer(TQString::null), m_process(NULL) {} DetectorNetstat::~DetectorNetstat() { delete m_process; @@ -37,7 +37,7 @@ void DetectorNetstat::checkStatus() const { return; } - m_buffer = QString::null; + m_buffer = TQString::null; // Use KProcess to run netstat -r. We'll then parse the output of // netstat -r in slotProcessStdout() to see if it mentions the @@ -45,8 +45,8 @@ void DetectorNetstat::checkStatus() const { m_process = new KProcess; *m_process << "netstat" << "-r"; - connect(m_process, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(slotProcessStdout( KProcess *, char *, int))); - connect(m_process, SIGNAL(processExited(KProcess *)), this, SLOT(slotProcessExited(KProcess *))); + connect(m_process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(slotProcessStdout( KProcess *, char *, int))); + connect(m_process, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessExited(KProcess *))); if(!m_process->start(KProcess::NotifyOnExit, KProcess::Stdout)) { kdWarning(14312) << k_funcinfo << "Unable to start netstat process!" << endl; @@ -59,7 +59,7 @@ void DetectorNetstat::checkStatus() const { void DetectorNetstat::slotProcessStdout(KProcess *, char *buffer, int buflen) { // Look for a default gateway kdDebug(14312) << k_funcinfo << endl; - m_buffer += QString::fromLatin1(buffer, buflen); + m_buffer += TQString::fromLatin1(buffer, buflen); kdDebug(14312) << m_buffer << endl; } @@ -67,7 +67,7 @@ void DetectorNetstat::slotProcessExited(KProcess *process) { kdDebug(14312) << k_funcinfo << m_buffer << endl; if(process == m_process) { m_connector->setConnectedStatus(m_buffer.contains("default")); - m_buffer = QString::null; + m_buffer = TQString::null; delete m_process; m_process = 0L; } diff --git a/kopete/plugins/smpppdcs/detectornetstat.h b/kopete/plugins/smpppdcs/detectornetstat.h index d51a6d97..bd41ae58 100644 --- a/kopete/plugins/smpppdcs/detectornetstat.h +++ b/kopete/plugins/smpppdcs/detectornetstat.h @@ -17,7 +17,7 @@ #ifndef DETECTORNETSTAT_H #define DETECTORNETSTAT_H -#include +#include #include "detector.h" @@ -27,7 +27,7 @@ class IConnector; /** @author Heiko Schäfer */ -class DetectorNetstat : protected QObject, public Detector { +class DetectorNetstat : protected TQObject, public Detector { Q_OBJECT DetectorNetstat(const DetectorNetstat&); @@ -49,7 +49,7 @@ private slots: void slotProcessExited(KProcess *process); private: - mutable QString m_buffer; + mutable TQString m_buffer; mutable KProcess * m_process; }; diff --git a/kopete/plugins/smpppdcs/detectornetworkstatus.cpp b/kopete/plugins/smpppdcs/detectornetworkstatus.cpp index 921718b7..e2b1ae19 100644 --- a/kopete/plugins/smpppdcs/detectornetworkstatus.cpp +++ b/kopete/plugins/smpppdcs/detectornetworkstatus.cpp @@ -26,8 +26,8 @@ DetectorNetworkStatus::DetectorNetworkStatus(IConnector* connector) : Detector(connector), m_connManager(NULL) { m_connManager = ConnectionManager::self(); - connect(m_connManager, SIGNAL(statusChanged(const QString&, NetworkStatus::EnumStatus)), - this, SLOT(statusChanged(const QString&, NetworkStatus::EnumStatus))); + connect(m_connManager, TQT_SIGNAL(statusChanged(const TQString&, NetworkStatus::EnumStatus)), + this, TQT_SLOT(statusChanged(const TQString&, NetworkStatus::EnumStatus))); } DetectorNetworkStatus::~DetectorNetworkStatus() {} @@ -36,7 +36,7 @@ void DetectorNetworkStatus::checkStatus() const { // needs to do nothing } -void DetectorNetworkStatus::statusChanged(const QString& host, NetworkStatus::EnumStatus status) { +void DetectorNetworkStatus::statusChanged(const TQString& host, NetworkStatus::EnumStatus status) { switch(status) { case NetworkStatus::Offline: kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Offline" << endl; diff --git a/kopete/plugins/smpppdcs/detectornetworkstatus.h b/kopete/plugins/smpppdcs/detectornetworkstatus.h index 20315902..dd3a7394 100644 --- a/kopete/plugins/smpppdcs/detectornetworkstatus.h +++ b/kopete/plugins/smpppdcs/detectornetworkstatus.h @@ -17,7 +17,7 @@ #ifndef DETECTORNETWORKSTATUS_H #define DETECTORNETWORKSTATUS_H -#include +#include #include "detector.h" @@ -27,7 +27,7 @@ class ConnectionManager; /** @author Heiko Schäfer */ -class DetectorNetworkStatus : protected QObject, public Detector +class DetectorNetworkStatus : protected TQObject, public Detector { Q_OBJECT @@ -41,7 +41,7 @@ public: virtual void checkStatus() const; protected slots: - void statusChanged(const QString& host, NetworkStatus::EnumStatus status); + void statusChanged(const TQString& host, NetworkStatus::EnumStatus status); private: ConnectionManager * m_connManager; diff --git a/kopete/plugins/smpppdcs/detectorsmpppd.cpp b/kopete/plugins/smpppdcs/detectorsmpppd.cpp index 35ed1e05..772090d9 100644 --- a/kopete/plugins/smpppdcs/detectorsmpppd.cpp +++ b/kopete/plugins/smpppdcs/detectorsmpppd.cpp @@ -58,7 +58,7 @@ void DetectorSMPPPD::checkStatus() const { SMPPPD::Client c; unsigned int port = SMPPPDCSConfig::self()->port(); - QString server = SMPPPDCSConfig::self()->server(); + TQString server = SMPPPDCSConfig::self()->server(); c.setPassword(SMPPPDCSConfig::self()->password().utf8()); diff --git a/kopete/plugins/smpppdcs/detectorsmpppd.h b/kopete/plugins/smpppdcs/detectorsmpppd.h index 0f72d46d..197fe65b 100644 --- a/kopete/plugins/smpppdcs/detectorsmpppd.h +++ b/kopete/plugins/smpppdcs/detectorsmpppd.h @@ -17,7 +17,7 @@ #ifndef DETECTORSMPPPD_H #define DETECTORSMPPPD_H -#include +#include #include "detectordcop.h" diff --git a/kopete/plugins/smpppdcs/kinternetiface.h b/kopete/plugins/smpppdcs/kinternetiface.h index b0ac8aa7..6e5f0203 100644 --- a/kopete/plugins/smpppdcs/kinternetiface.h +++ b/kopete/plugins/smpppdcs/kinternetiface.h @@ -29,7 +29,7 @@ class KInternetIface : public DCOPObject public: - KInternetIface (const QCString& name) : DCOPObject (name) { } + KInternetIface (const TQCString& name) : DCOPObject (name) { } k_dcop: diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp index d386b669..5ff1654b 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp @@ -22,7 +22,7 @@ using namespace SMPPPD; Client::Client() - : m_state(NULL), m_sock(NULL), m_serverID(QString::null), m_serverVer(QString::null), m_password(QString::null) { + : m_state(NULL), m_sock(NULL), m_serverID(TQString::null), m_serverVer(TQString::null), m_password(TQString::null) { changeState(Unsettled::instance()); } @@ -30,7 +30,7 @@ Client::~Client() { disconnect(); } -bool Client::connect(const QString& server, uint port) { +bool Client::connect(const TQString& server, uint port) { return m_state->connect(this, server, port); } @@ -38,27 +38,27 @@ void Client::disconnect() { m_state->disconnect(this); } -QStringList Client::getInterfaceConfigurations() { +TQStringList Client::getInterfaceConfigurations() { return m_state->getInterfaceConfigurations(this); } -bool Client::statusInterface(const QString& ifcfg) { +bool Client::statusInterface(const TQString& ifcfg) { return m_state->statusInterface(this, ifcfg); } -QString Client::serverID() const { +TQString Client::serverID() const { return m_serverID; } -QString Client::serverVersion() const { +TQString Client::serverVersion() const { return m_serverVer; } -QStringList Client::read() const { - QStringList qsl; +TQStringList Client::read() const { + TQStringList qsl; if(isReady()) { - QDataStream stream(m_sock); + TQDataStream stream(m_sock); char s[1024]; stream.readRawBytes(s, 1023); @@ -78,7 +78,7 @@ QStringList Client::read() const { void Client::write(const char * cmd) { if(isReady()) { - QDataStream stream(m_sock); + TQDataStream stream(m_sock); stream.writeRawBytes(cmd, strlen(cmd)); stream.writeRawBytes("\n", strlen("\n")); m_sock->flush(); @@ -92,7 +92,7 @@ bool Client::isReady() const { bool Client::isOnline() { if(isReady()) { - QStringList ifcfgs = getInterfaceConfigurations(); + TQStringList ifcfgs = getInterfaceConfigurations(); for(uint i = 0; i < ifcfgs.count(); i++) { if(statusInterface(ifcfgs[i])) { return true; diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h index a123cd4c..badda45c 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h @@ -17,7 +17,7 @@ #ifndef SMPPPDCLIENT_H #define SMPPPDCLIENT_H -#include +#include namespace KNetwork { class KStreamSocket; @@ -40,38 +40,38 @@ public: bool isReady() const; - bool connect(const QString& server, uint port = 3185); + bool connect(const TQString& server, uint port = 3185); void disconnect(); - QStringList getInterfaceConfigurations(); - bool statusInterface(const QString& ifcfg); + TQStringList getInterfaceConfigurations(); + bool statusInterface(const TQString& ifcfg); bool isOnline(); - QString serverID() const; - QString serverVersion() const; + TQString serverID() const; + TQString serverVersion() const; - void setPassword(const QString& password); + void setPassword(const TQString& password); private: friend class State; void changeState(State * newState); - QStringList read() const; + TQStringList read() const; void write(const char * cmd); private: State * m_state; KNetwork::KStreamSocket * m_sock; - QString m_serverID; - QString m_serverVer; - QString m_password; + TQString m_serverID; + TQString m_serverVer; + TQString m_password; }; inline void Client::changeState(State * newState) { m_state = newState; } -inline void Client::setPassword(const QString& password) { +inline void Client::setPassword(const TQString& password) { m_password = password; } diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp index 421914bb..f51aa301 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include +#include #include #include @@ -48,33 +48,33 @@ void Ready::disconnect(Client * client) { delete socket(client); setSocket(client, NULL); - setServerID(client, QString::null); - setServerVersion(client, QString::null); + setServerID(client, TQString::null); + setServerVersion(client, TQString::null); } changeState(client, Unsettled::instance()); } -QStringList Ready::getInterfaceConfigurations(Client * client) { +TQStringList Ready::getInterfaceConfigurations(Client * client) { - QStringList ifcfgs; + TQStringList ifcfgs; // we want all ifcfgs kdDebug(14312) << k_funcinfo << "smpppd req: list-ifcfgs" << endl; write(client, "list-ifcfgs"); - QStringList stream = read(client); + TQStringList stream = read(client); kdDebug(14312) << k_funcinfo << "smpppd ack: " << stream[0] << endl; if(stream[0].startsWith("ok")) { - // we have now a QStringList with all ifcfgs + // we have now a TQStringList with all ifcfgs // we extract them and put them in the global ifcfgs-list // stream[1] tells us how many ifcfgs are coming next - QRegExp numIfcfgsRex("^BEGIN IFCFGS ([0-9]+).*"); + TQRegExp numIfcfgsRex("^BEGIN IFCFGS ([0-9]+).*"); if(numIfcfgsRex.exactMatch(stream[1])) { int count_ifcfgs = numIfcfgsRex.cap(1).toInt(); kdDebug(14312) << k_funcinfo << "ifcfgs: " << count_ifcfgs << endl; for(int i = 0; i < count_ifcfgs; i++) { - QRegExp ifcfgRex("^i \"(ifcfg-[a-zA-Z]+[0-9]+)\".*"); + TQRegExp ifcfgRex("^i \"(ifcfg-[a-zA-Z]+[0-9]+)\".*"); if(ifcfgRex.exactMatch(stream[i+2])) { ifcfgs.push_back(ifcfgRex.cap(1)); } @@ -85,14 +85,14 @@ QStringList Ready::getInterfaceConfigurations(Client * client) { return ifcfgs; } -bool Ready::statusInterface(Client * client, const QString& ifcfg) { +bool Ready::statusInterface(Client * client, const TQString& ifcfg) { - QString cmd = "list-status " + ifcfg; + TQString cmd = "list-status " + ifcfg; write(client, cmd.latin1()); socket(client)->waitForMore(0); - QStringList stream = read(client); + TQStringList stream = read(client); if(stream[0].startsWith("ok")) { if(stream[2].startsWith("status connected")) { diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h index 9ec3ab93..f3be8667 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h @@ -37,8 +37,8 @@ public: static Ready * instance(); virtual void disconnect(Client * client); - virtual QStringList getInterfaceConfigurations(Client * client); - virtual bool statusInterface(Client * client, const QString& ifcfg); + virtual TQStringList getInterfaceConfigurations(Client * client); + virtual bool statusInterface(Client * client, const TQString& ifcfg); private: static Ready * m_instance; diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp index 9e4bd508..8ae0f1d4 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp @@ -25,7 +25,7 @@ State::State() {} State::~State() {} -QStringList State::read(Client * client) const { +TQStringList State::read(Client * client) const { return client->read(); } @@ -41,19 +41,19 @@ KNetwork::KStreamSocket * State::socket(Client * client) const { return client->m_sock; } -QString State::password(Client * client) const { +TQString State::password(Client * client) const { return client->m_password; } -void State::setPassword(Client * client, const QString& pass) { +void State::setPassword(Client * client, const TQString& pass) { client->m_password = pass; } -void State::setServerID(Client * client, const QString& id) { +void State::setServerID(Client * client, const TQString& id) { client->m_serverID = id; } -void State::setServerVersion(Client * client, const QString& ver) { +void State::setServerVersion(Client * client, const TQString& ver) { client->m_serverVer = ver; } @@ -61,16 +61,16 @@ void State::setSocket(Client * client, KNetwork::KStreamSocket * sock) { client->m_sock = sock; } -bool State::connect(Client * /* client */, const QString& /* server */, uint /* port */) { +bool State::connect(Client * /* client */, const TQString& /* server */, uint /* port */) { return false; } void State::disconnect(Client * /* client */) {} -QStringList State::getInterfaceConfigurations(Client * /* client */) { - return QStringList(); +TQStringList State::getInterfaceConfigurations(Client * /* client */) { + return TQStringList(); } -bool State::statusInterface(Client * /* client */, const QString& /* ifcfg */) { +bool State::statusInterface(Client * /* client */, const TQString& /* ifcfg */) { return false; } diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h index 0e7d393b..8f1ac32e 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h @@ -17,7 +17,7 @@ #ifndef SMPPPDSTATE_H #define SMPPPDSTATE_H -#include +#include namespace SMPPPD { @@ -34,22 +34,22 @@ public: State(); virtual ~State(); - virtual bool connect(Client * client, const QString& server, uint port = 3185); + virtual bool connect(Client * client, const TQString& server, uint port = 3185); virtual void disconnect(Client * client); - virtual QStringList getInterfaceConfigurations(Client * client); - virtual bool statusInterface(Client * client, const QString& ifcfg); + virtual TQStringList getInterfaceConfigurations(Client * client); + virtual bool statusInterface(Client * client, const TQString& ifcfg); protected: - QStringList read(Client * client) const; + TQStringList read(Client * client) const; void write(Client * client, const char * cmd); void changeState(Client * client, State * state); KNetwork::KStreamSocket * socket(Client * client) const; void setSocket(Client * client, KNetwork::KStreamSocket * sock); - QString password(Client * client) const; - void setPassword(Client * client, const QString& pass); - void setServerID(Client * client, const QString& id); - void setServerVersion(Client * client, const QString& ver); + TQString password(Client * client) const; + void setPassword(Client * client, const TQString& pass); + void setServerID(Client * client, const TQString& id); + void setServerVersion(Client * client, const TQString& ver); }; diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp index 7ed5f516..3d1f8a79 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include @@ -41,12 +41,12 @@ Unsettled * Unsettled::instance() { return m_instance; } -bool Unsettled::connect(Client * client, const QString& server, uint port) { +bool Unsettled::connect(Client * client, const TQString& server, uint port) { if(!socket(client) || socket(client)->state() != KNetwork::KStreamSocket::Connected || socket(client)->state() != KNetwork::KStreamSocket::Connecting) { - QString resolvedServer = server; + TQString resolvedServer = server; changeState(client, Ready::instance()); disconnect(client); @@ -58,7 +58,7 @@ bool Unsettled::connect(Client * client, const QString& server, uint port) { if(resolver.wait(500)) { KNetwork::KResolverResults results = resolver.results(); if(!results.empty()) { - QString ip = results[0].address().asInet().ipAddress().toString(); + TQString ip = results[0].address().asInet().ipAddress().toString(); kdDebug(14312) << k_funcinfo << "Found IP-Address for " << server << ": " << ip << endl; resolvedServer = ip; } else { @@ -70,7 +70,7 @@ bool Unsettled::connect(Client * client, const QString& server, uint port) { return false; } - setSocket(client, new KNetwork::KStreamSocket(resolvedServer, QString::number(port))); + setSocket(client, new KNetwork::KStreamSocket(resolvedServer, TQString::number(port))); socket(client)->setBlocking(TRUE); if(!socket(client)->connect()) { @@ -78,25 +78,25 @@ bool Unsettled::connect(Client * client, const QString& server, uint port) { } else { kdDebug(14312) << k_funcinfo << "Successfully connected to smpppd \"" << server << ":" << port << "\"" << endl; - static QString verRex = "^SuSE Meta pppd \\(smpppd\\), Version (.*)$"; - static QString clgRex = "^challenge = (.*)$"; + static TQString verRex = "^SuSE Meta pppd \\(smpppd\\), Version (.*)$"; + static TQString clgRex = "^challenge = (.*)$"; - QRegExp ver(verRex); - QRegExp clg(clgRex); + TQRegExp ver(verRex); + TQRegExp clg(clgRex); - QString response = read(client)[0]; + TQString response = read(client)[0]; - if(response != QString::null && + if(response != TQString::null && ver.exactMatch(response)) { setServerID(client, response); setServerVersion(client, ver.cap(1)); changeState(client, Ready::instance()); return true; - } else if(response != QString::null && + } else if(response != TQString::null && clg.exactMatch(response)) { - if(password(client) != QString::null) { + if(password(client) != TQString::null) { // we are challenged, ok, respond - write(client, QString("response = %1\n").arg(make_response(clg.cap(1).stripWhiteSpace(), password(client))).latin1()); + write(client, TQString("response = %1\n").arg(make_response(clg.cap(1).stripWhiteSpace(), password(client))).latin1()); response = read(client)[0]; if(ver.exactMatch(response)) { setServerID(client, response); @@ -119,7 +119,7 @@ bool Unsettled::connect(Client * client, const QString& server, uint port) { return false; } -QString Unsettled::make_response(const QString& chex, const QString& password) const { +TQString Unsettled::make_response(const TQString& chex, const TQString& password) const { int size = chex.length (); if (size & 1) @@ -127,9 +127,9 @@ QString Unsettled::make_response(const QString& chex, const QString& password) c size >>= 1; // convert challenge from hex to bin - QString cbin; + TQString cbin; for (int i = 0; i < size; i++) { - QString tmp = chex.mid (2 * i, 2); + TQString tmp = chex.mid (2 * i, 2); cbin.append ((char) strtol (tmp.ascii (), 0, 16)); } @@ -142,7 +142,7 @@ QString Unsettled::make_response(const QString& chex, const QString& password) c MD5_Final (rbin, &md5); // convert response from bin to hex - QString rhex; + TQString rhex; for (int i = 0; i < MD5_DIGEST_LENGTH; i++) { char buffer[3]; snprintf (buffer, 3, "%02x", rbin[i]); diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h index 57a83752..bf19035e 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h @@ -35,10 +35,10 @@ public: static Unsettled * instance(); - virtual bool connect(Client * client, const QString& server, uint port = 3185); + virtual bool connect(Client * client, const TQString& server, uint port = 3185); private: - QString make_response(const QString& chex, const QString& password) const; + TQString make_response(const TQString& chex, const TQString& password) const; private: static Unsettled * m_instance; diff --git a/kopete/plugins/smpppdcs/smpppdcsiface.h b/kopete/plugins/smpppdcs/smpppdcsiface.h index face60ad..7bd8febe 100644 --- a/kopete/plugins/smpppdcs/smpppdcsiface.h +++ b/kopete/plugins/smpppdcs/smpppdcsiface.h @@ -29,7 +29,7 @@ class SMPPPDCSIFace : virtual public DCOPObject k_dcop: - virtual QString detectionMethod() const = 0; + virtual TQString detectionMethod() const = 0; virtual bool isOnline() const = 0; }; diff --git a/kopete/plugins/smpppdcs/smpppdcsplugin.cpp b/kopete/plugins/smpppdcs/smpppdcsplugin.cpp index 2ed8455c..f17f2ca9 100644 --- a/kopete/plugins/smpppdcs/smpppdcsplugin.cpp +++ b/kopete/plugins/smpppdcs/smpppdcsplugin.cpp @@ -19,7 +19,7 @@ #include "onlineinquiry.h" #include "smpppdcsplugin.h" -#include +#include #include #include @@ -37,7 +37,7 @@ typedef KGenericFactory SMPPPDCSPluginFactory; K_EXPORT_COMPONENT_FACTORY(kopete_smpppdcs, SMPPPDCSPluginFactory("kopete_smpppdcs")) -SMPPPDCSPlugin::SMPPPDCSPlugin(QObject *parent, const char * name, const QStringList& /* args */) +SMPPPDCSPlugin::SMPPPDCSPlugin(TQObject *parent, const char * name, const TQStringList& /* args */) : DCOPObject("SMPPPDCSIface"), Kopete::Plugin(SMPPPDCSPluginFactory::instance(), parent, name), m_detectorSMPPPD(NULL), m_detectorNetstat(NULL), m_detectorNetworkStatus(NULL), m_timer(NULL), m_onlineInquiry(NULL) { @@ -56,13 +56,13 @@ m_onlineInquiry(NULL) { // we wait for the allPluginsLoaded signal, to connect // as early as possible after startup, but not before // all accounts are ready - connect(Kopete::PluginManager::self(), SIGNAL(allPluginsLoaded()), - this, SLOT(allPluginsLoaded())); + connect(Kopete::PluginManager::self(), TQT_SIGNAL(allPluginsLoaded()), + this, TQT_SLOT(allPluginsLoaded())); // if kopete was already running and the plugin // was loaded later, we check once after 15 secs // if all other plugins have been loaded - QTimer::singleShot(15000, this, SLOT(allPluginsLoaded())); + TQTimer::singleShot(15000, this, TQT_SLOT(allPluginsLoaded())); } SMPPPDCSPlugin::~SMPPPDCSPlugin() { @@ -79,8 +79,8 @@ SMPPPDCSPlugin::~SMPPPDCSPlugin() { void SMPPPDCSPlugin::allPluginsLoaded() { if(Kopete::PluginManager::self()->isAllPluginsLoaded()) { - m_timer = new QTimer(); - connect(m_timer, SIGNAL(timeout()), this, SLOT(slotCheckStatus())); + m_timer = new TQTimer(); + connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCheckStatus())); if(SMPPPDCSConfig::self()->useSmpppd()) { m_timer->start(30000); @@ -137,10 +137,10 @@ void SMPPPDCSPlugin::setConnectedStatus( bool connected ) { void SMPPPDCSPlugin::connectAllowed() { - QStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); + TQStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); Kopete::AccountManager * m = Kopete::AccountManager::self(); - for(QPtrListIterator it(m->accounts()) + for(TQPtrListIterator it(m->accounts()) ; it.current(); ++it) { @@ -162,10 +162,10 @@ void SMPPPDCSPlugin::connectAllowed() { void SMPPPDCSPlugin::disconnectAllowed() { - QStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); + TQStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); Kopete::AccountManager * m = Kopete::AccountManager::self(); - for(QPtrListIterator it(m->accounts()) + for(TQPtrListIterator it(m->accounts()) ; it.current(); ++it) { @@ -184,7 +184,7 @@ void SMPPPDCSPlugin::disconnectAllowed() { } } -QString SMPPPDCSPlugin::detectionMethod() const { +TQString SMPPPDCSPlugin::detectionMethod() const { if(SMPPPDCSConfig::self()->useSmpppd()) { return "smpppd"; } else { @@ -193,11 +193,11 @@ QString SMPPPDCSPlugin::detectionMethod() const { } /*! - \fn SMPPPDCSPlugin::smpppdServerChanged(const QString& server) + \fn SMPPPDCSPlugin::smpppdServerChanged(const TQString& server) */ -void SMPPPDCSPlugin::smpppdServerChanged(const QString& server) { +void SMPPPDCSPlugin::smpppdServerChanged(const TQString& server) { - QString oldServer = SMPPPDCSConfig::self()->server().utf8(); + TQString oldServer = SMPPPDCSConfig::self()->server().utf8(); if(oldServer != server) { kdDebug(14312) << k_funcinfo << "Detected a server change" << endl; diff --git a/kopete/plugins/smpppdcs/smpppdcsplugin.h b/kopete/plugins/smpppdcs/smpppdcsplugin.h index 789d9c41..5c4ba2e6 100644 --- a/kopete/plugins/smpppdcs/smpppdcsplugin.h +++ b/kopete/plugins/smpppdcs/smpppdcsplugin.h @@ -55,7 +55,7 @@ public: /** * @brief Creates an SMPPPDCSPlugin instance */ - SMPPPDCSPlugin( QObject *parent, const char *name, const QStringList &args ); + SMPPPDCSPlugin( TQObject *parent, const char *name, const TQStringList &args ); /** * @brief Destroys an SMPPPDCSPlugin instance @@ -78,12 +78,12 @@ public: */ virtual void setConnectedStatus( bool newStatus ); - virtual QString detectionMethod() const; + virtual TQString detectionMethod() const; virtual void aboutToUnload(); public slots: - void smpppdServerChanged(const QString& server); + void smpppdServerChanged(const TQString& server); private slots: void slotCheckStatus(); @@ -100,7 +100,7 @@ private: Detector * m_detectorNetstat; Detector * m_detectorNetworkStatus; bool m_pluginConnected; - QTimer * m_timer; + TQTimer * m_timer; OnlineInquiry * m_onlineInquiry; }; diff --git a/kopete/plugins/smpppdcs/smpppdcspreferences.cpp b/kopete/plugins/smpppdcs/smpppdcspreferences.cpp index ddce3572..671008bc 100644 --- a/kopete/plugins/smpppdcs/smpppdcspreferences.cpp +++ b/kopete/plugins/smpppdcs/smpppdcspreferences.cpp @@ -14,9 +14,9 @@ ************************************************************************* */ -#include -#include -#include +#include +#include +#include #include #include @@ -35,17 +35,17 @@ typedef KGenericFactory SMPPPDCSPreferencesFactory; K_EXPORT_COMPONENT_FACTORY(kcm_kopete_smpppdcs, SMPPPDCSPreferencesFactory("kcm_kopete_smpppdcs")) -SMPPPDCSPreferences::SMPPPDCSPreferences(QWidget * parent, const char * /* name */, const QStringList& args) +SMPPPDCSPreferences::SMPPPDCSPreferences(TQWidget * parent, const char * /* name */, const TQStringList& args) : KCModule(SMPPPDCSPreferencesFactory::instance(), parent, args), m_ui(NULL) { Kopete::AccountManager * manager = Kopete::AccountManager::self(); - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); m_ui = new SMPPPDCSPrefs(this); - for(QPtrListIterator it(manager->accounts()); it.current(); ++it) + for(TQPtrListIterator it(manager->accounts()); it.current(); ++it) { - QString protoName; - QRegExp rex("(.*)Protocol"); + TQString protoName; + TQRegExp rex("(.*)Protocol"); if(rex.search((*it)->protocol()->pluginId()) > -1) { protoName = rex.cap(1); @@ -54,11 +54,11 @@ SMPPPDCSPreferences::SMPPPDCSPreferences(QWidget * parent, const char * /* name } if(it.current()->inherits("Kopete::ManagedConnectionAccount")) { - protoName += QString(", %1").arg(i18n("connection status is managed by Kopete")); + protoName += TQString(", %1").arg(i18n("connection status is managed by Kopete")); } - QCheckListItem * cli = new QCheckListItem(m_ui->accountList, - (*it)->accountId() + " (" + protoName + ")", QCheckListItem::CheckBox); + TQCheckListItem * cli = new TQCheckListItem(m_ui->accountList, + (*it)->accountId() + " (" + protoName + ")", TQCheckListItem::CheckBox); cli->setPixmap(0, (*it)->accountIcon()); m_accountMapOld[cli->text(0)] = AccountPrivMap(FALSE, (*it)->protocol()->pluginId() + "_" + (*it)->accountId()); @@ -66,15 +66,15 @@ SMPPPDCSPreferences::SMPPPDCSPreferences(QWidget * parent, const char * /* name m_ui->accountList->insertItem(cli); } - connect(m_ui->accountList, SIGNAL(clicked(QListViewItem *)), this, SLOT(listClicked(QListViewItem *))); + connect(m_ui->accountList, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(listClicked(TQListViewItem *))); // connect for modified - connect(m_ui->useNetstat, SIGNAL(clicked()), this, SLOT(slotModified())); - connect(m_ui->useSmpppd, SIGNAL(clicked()), this, SLOT(slotModified())); + connect(m_ui->useNetstat, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotModified())); + connect(m_ui->useSmpppd, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotModified())); - connect(m_ui->SMPPPDLocation->server, SIGNAL(textChanged(const QString&)), this, SLOT(slotModified())); - connect(m_ui->SMPPPDLocation->port, SIGNAL(valueChanged(int)), this, SLOT(slotModified())); - connect(m_ui->SMPPPDLocation->Password, SIGNAL(textChanged(const QString&)), this, SLOT(slotModified())); + connect(m_ui->SMPPPDLocation->server, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotModified())); + connect(m_ui->SMPPPDLocation->port, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotModified())); + connect(m_ui->SMPPPDLocation->Password, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotModified())); load(); } @@ -83,9 +83,9 @@ SMPPPDCSPreferences::~SMPPPDCSPreferences() { delete m_ui; } -void SMPPPDCSPreferences::listClicked(QListViewItem * item) +void SMPPPDCSPreferences::listClicked(TQListViewItem * item) { - QCheckListItem * cli = dynamic_cast(item); + TQCheckListItem * cli = dynamic_cast(item); if(cli->isOn() != m_accountMapCur[cli->text(0)].m_on) { AccountMap::iterator itOld = m_accountMapOld.begin(); @@ -105,9 +105,9 @@ void SMPPPDCSPreferences::listClicked(QListViewItem * item) void SMPPPDCSPreferences::defaults() { - QListViewItemIterator it(m_ui->accountList); + TQListViewItemIterator it(m_ui->accountList); while(it.current()) { - QCheckListItem * cli = dynamic_cast(it.current()); + TQCheckListItem * cli = dynamic_cast(it.current()); cli->setOn(FALSE); ++it; } @@ -127,12 +127,12 @@ void SMPPPDCSPreferences::load() SMPPPDCSConfig::self()->readConfig(); - static QString rexStr = "^(.*) \\((.*)\\)"; - QRegExp rex(rexStr); - QStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); - QListViewItemIterator it(m_ui->accountList); + static TQString rexStr = "^(.*) \\((.*)\\)"; + TQRegExp rex(rexStr); + TQStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); + TQListViewItemIterator it(m_ui->accountList); while(it.current()) { - QCheckListItem * cli = dynamic_cast(it.current()); + TQCheckListItem * cli = dynamic_cast(it.current()); if(rex.search(cli->text(0)) > -1) { bool isOn = list.contains(rex.cap(2) + "Protocol_" + rex.cap(1)); // m_accountMapOld[cli->text(0)].m_on = isOn; @@ -154,11 +154,11 @@ void SMPPPDCSPreferences::load() void SMPPPDCSPreferences::save() { - QStringList list; - QListViewItemIterator it(m_ui->accountList); + TQStringList list; + TQListViewItemIterator it(m_ui->accountList); while(it.current()) { - QCheckListItem * cli = dynamic_cast(it.current()); + TQCheckListItem * cli = dynamic_cast(it.current()); if(cli->isOn()) { list.append(m_accountMapCur[cli->text(0)].m_id); } diff --git a/kopete/plugins/smpppdcs/smpppdcspreferences.h b/kopete/plugins/smpppdcs/smpppdcspreferences.h index 8bbeff69..dba3470b 100644 --- a/kopete/plugins/smpppdcs/smpppdcspreferences.h +++ b/kopete/plugins/smpppdcs/smpppdcspreferences.h @@ -25,10 +25,10 @@ class SMPPPDCSPrefs; class AccountPrivMap { public: - AccountPrivMap(bool isOn = FALSE, const QString& id = QString::null) + AccountPrivMap(bool isOn = FALSE, const TQString& id = TQString::null) : m_on(isOn), m_id(id) {} bool m_on; - QString m_id; + TQString m_id; }; /** @@ -43,12 +43,12 @@ class SMPPPDCSPreferences : public KCModule { SMPPPDCSPreferences& operator=(const SMPPPDCSPreferences&); public: - typedef QMap AccountMap; + typedef TQMap AccountMap; /** * @brief Creates an SMPPPDCSPreferences instance */ - SMPPPDCSPreferences(QWidget * parent = 0, const char * name = 0, const QStringList &args = QStringList()); + SMPPPDCSPreferences(TQWidget * parent = 0, const char * name = 0, const TQStringList &args = TQStringList()); /** * @brief Destroys an SMPPPDCSPreferences instance @@ -60,7 +60,7 @@ public: virtual void defaults(); protected slots: - void listClicked(QListViewItem * item); + void listClicked(TQListViewItem * item); private slots: void slotModified(); diff --git a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp index 5a834c97..4dbedc54 100644 --- a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp +++ b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include @@ -35,7 +35,7 @@ #include "smpppdcsprefsimpl.h" #include "smpppdsearcher.h" -SMPPPDCSPrefs::SMPPPDCSPrefs(QWidget* parent, const char* name, WFlags fl) +SMPPPDCSPrefs::SMPPPDCSPrefs(TQWidget* parent, const char* name, WFlags fl) : SMPPPDCSPrefsBase(parent, name, fl), m_plugin(NULL), m_scanProgressDlg(NULL), m_curSearcher(NULL) { // search for our main-plugin instance @@ -45,17 +45,17 @@ SMPPPDCSPrefs::SMPPPDCSPrefs(QWidget* parent, const char* name, WFlags fl) } // signals and slots connections - connect(useNetstat, SIGNAL(toggled(bool)), this, SLOT(disableSMPPPDSettings())); - connect(useSmpppd, SIGNAL(toggled(bool)), this, SLOT(enableSMPPPDSettings())); - connect(autoCSTest, SIGNAL(clicked()), this, SLOT(determineCSType())); + connect(useNetstat, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(disableSMPPPDSettings())); + connect(useSmpppd, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableSMPPPDSettings())); + connect(autoCSTest, TQT_SIGNAL(clicked()), this, TQT_SLOT(determineCSType())); if(m_plugin) { - connect((QObject *)SMPPPDLocation->server, SIGNAL(textChanged(const QString&)), - m_plugin, SLOT(smpppdServerChanged(const QString&))); + connect((TQObject *)SMPPPDLocation->server, TQT_SIGNAL(textChanged(const TQString&)), + m_plugin, TQT_SLOT(smpppdServerChanged(const TQString&))); } // if netstat is NOT available, disable the option and set to SMPPPD - if(KStandardDirs::findExe("netstat") == QString::null) { + if(KStandardDirs::findExe("netstat") == TQString::null) { autoCSTest->setEnabled(FALSE); useNetstat->setEnabled(FALSE); useNetstat->setChecked(FALSE); @@ -79,11 +79,11 @@ void SMPPPDCSPrefs::determineCSType() { SMPPPDSearcher searcher; m_curSearcher = &searcher; - connect(&searcher, SIGNAL(smpppdFound(const QString&)), this, SLOT(smpppdFound(const QString&))); - connect(&searcher, SIGNAL(smpppdNotFound()), this, SLOT(smpppdNotFound())); - connect(&searcher, SIGNAL(scanStarted(uint)), this, SLOT(scanStarted(uint))); - connect(&searcher, SIGNAL(scanProgress(uint)), this, SLOT(scanProgress(uint))); - connect(&searcher, SIGNAL(scanFinished()), this, SLOT(scanFinished())); + connect(&searcher, TQT_SIGNAL(smpppdFound(const TQString&)), this, TQT_SLOT(smpppdFound(const TQString&))); + connect(&searcher, TQT_SIGNAL(smpppdNotFound()), this, TQT_SLOT(smpppdNotFound())); + connect(&searcher, TQT_SIGNAL(scanStarted(uint)), this, TQT_SLOT(scanStarted(uint))); + connect(&searcher, TQT_SIGNAL(scanProgress(uint)), this, TQT_SLOT(scanProgress(uint))); + connect(&searcher, TQT_SIGNAL(scanFinished()), this, TQT_SLOT(scanFinished())); searcher.searchNetwork(); m_curSearcher = NULL; @@ -99,7 +99,7 @@ void SMPPPDCSPrefs::scanStarted(uint total) { m_scanProgressDlg->setAllowCancel(TRUE); m_scanProgressDlg->setMinimumDuration(2000); - connect(m_scanProgressDlg, SIGNAL(cancelClicked()), this, SLOT(cancelScanning())); + connect(m_scanProgressDlg, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(cancelScanning())); } m_scanProgressDlg->progressBar()->setTotalSteps(total); m_scanProgressDlg->progressBar()->setProgress(0); @@ -117,10 +117,10 @@ void SMPPPDCSPrefs::cancelScanning() { m_curSearcher->cancelSearch(); } -void SMPPPDCSPrefs::smpppdFound(const QString& host) { +void SMPPPDCSPrefs::smpppdFound(const TQString& host) { kdDebug(14312) << k_funcinfo << endl; - QString myHost = host; + TQString myHost = host; // try to get the domain name struct in_addr addr; diff --git a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h index 181ba9fa..4dcbe46b 100644 --- a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h +++ b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h @@ -17,7 +17,7 @@ #ifndef SMPPPDCSPREFSIMPL_H #define SMPPPDCSPREFSIMPL_H -#include +#include #include @@ -38,7 +38,7 @@ class SMPPPDCSPrefs : public SMPPPDCSPrefsBase public: - SMPPPDCSPrefs(QWidget* parent, const char* name = 0, WFlags fl = 0); + SMPPPDCSPrefs(TQWidget* parent, const char* name = 0, WFlags fl = 0); ~SMPPPDCSPrefs(); signals: @@ -48,7 +48,7 @@ protected slots: void enableSMPPPDSettings(); void disableSMPPPDSettings(); void determineCSType(); - void smpppdFound(const QString & host); + void smpppdFound(const TQString & host); void smpppdNotFound(); void scanStarted(uint total); void scanProgress(uint cur); diff --git a/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp b/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp index b20509d9..44de2552 100644 --- a/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp +++ b/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp @@ -18,12 +18,12 @@ #include "smpppdlocationwidget.h" -SMPPPDLocationWidget::SMPPPDLocationWidget(QWidget* parent, const char* name, WFlags fl) +SMPPPDLocationWidget::SMPPPDLocationWidget(TQWidget* parent, const char* name, WFlags fl) : SMPPPDLocationWidgetBase(parent, name, fl) {} SMPPPDLocationWidget::~SMPPPDLocationWidget() {} -void SMPPPDLocationWidget::setServer(const QString& serv) { +void SMPPPDLocationWidget::setServer(const TQString& serv) { server->setText(serv); } diff --git a/kopete/plugins/smpppdcs/smpppdlocationwidget.h b/kopete/plugins/smpppdcs/smpppdlocationwidget.h index 00fa9157..16d1edfb 100644 --- a/kopete/plugins/smpppdcs/smpppdlocationwidget.h +++ b/kopete/plugins/smpppdcs/smpppdlocationwidget.h @@ -30,10 +30,10 @@ class SMPPPDLocationWidget : public SMPPPDLocationWidgetBase SMPPPDLocationWidget& operator=(const SMPPPDLocationWidget&); public: - SMPPPDLocationWidget(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); + SMPPPDLocationWidget(TQWidget* parent = 0, const char* name = 0, WFlags fl = 0); ~SMPPPDLocationWidget(); - void setServer(const QString& serv); + void setServer(const TQString& serv); }; #endif diff --git a/kopete/plugins/smpppdcs/smpppdsearcher.cpp b/kopete/plugins/smpppdcs/smpppdsearcher.cpp index 6ee9c878..a06e30a9 100644 --- a/kopete/plugins/smpppdcs/smpppdsearcher.cpp +++ b/kopete/plugins/smpppdcs/smpppdsearcher.cpp @@ -14,8 +14,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include #include @@ -46,7 +46,7 @@ void SMPPPDSearcher::searchNetwork() { m_procNetstat->setEnvironment("LANG", "C"); // we want to force english output *m_procNetstat << "/bin/netstat" << "-rn"; - connect(m_procNetstat, SIGNAL(receivedStdout(KProcess *,char *,int)), this, SLOT(slotStdoutReceivedNetstat(KProcess *,char *,int))); + connect(m_procNetstat, TQT_SIGNAL(receivedStdout(KProcess *,char *,int)), this, TQT_SLOT(slotStdoutReceivedNetstat(KProcess *,char *,int))); if(!m_procNetstat->start(KProcess::Block, KProcess::Stdout)) { kdDebug(14312) << k_funcinfo << "Couldn't execute /sbin/netstat -rn" << endl << "Perhaps the package net-tools isn't installed." << endl; @@ -64,11 +64,11 @@ void SMPPPDSearcher::searchNetwork() { void SMPPPDSearcher::slotStdoutReceivedIfconfig(KProcess * /* proc */, char * buf, int len) { kdDebug(14312) << k_funcinfo << endl; - QString myBuf = QString::fromLatin1(buf,len); - QRegExp rex("^[ ]{10}.*inet addr:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*Mask:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})"); + TQString myBuf = TQString::fromLatin1(buf,len); + TQRegExp rex("^[ ]{10}.*inet addr:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*Mask:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})"); // tokenize the string into lines - QStringList toks = QStringList::split("\n", myBuf); - for(QStringList::size_type i = 0; i < toks.count(); i++) { + TQStringList toks = TQStringList::split("\n", myBuf); + for(TQStringList::size_type i = 0; i < toks.count(); i++) { if(rex.exactMatch(toks[i])) { if(scan(rex.cap(1), rex.cap(2))) { return; @@ -81,8 +81,8 @@ void SMPPPDSearcher::slotStdoutReceivedIfconfig(KProcess * /* proc */, char * bu void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf, int len) { kdDebug(14312) << k_funcinfo << endl; - QRegExp rexGW(".*\\n0.0.0.0[ ]*([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*"); - QString myBuf = QString::fromLatin1(buf,len); + TQRegExp rexGW(".*\\n0.0.0.0[ ]*([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*"); + TQString myBuf = TQString::fromLatin1(buf,len); if(!(rexGW.exactMatch(myBuf) && scan(rexGW.cap(1), "255.255.255.255"))) { // if netstat -r found no gateway we search the network @@ -90,7 +90,7 @@ void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf m_procIfconfig->setEnvironment("LANG", "C"); // we want to force english output *m_procIfconfig << "/sbin/ifconfig"; - connect(m_procIfconfig, SIGNAL(receivedStdout(KProcess *,char *,int)), this, SLOT(slotStdoutReceivedIfconfig(KProcess *,char *,int))); + connect(m_procIfconfig, TQT_SIGNAL(receivedStdout(KProcess *,char *,int)), this, TQT_SLOT(slotStdoutReceivedIfconfig(KProcess *,char *,int))); if(!m_procIfconfig->start(KProcess::Block, KProcess::Stdout)) { kdDebug(14312) << k_funcinfo << "Couldn't execute /sbin/ifconfig" << endl << "Perhaps the package net-tools isn't installed." << endl; @@ -105,7 +105,7 @@ void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf /*! \fn SMPPPDSearcher::scan() const */ -bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) { +bool SMPPPDSearcher::scan(const TQString& ip, const TQString& mask) { kdDebug(14312) << k_funcinfo << "Scanning " << ip << "/" << mask << "..." << endl; SMPPPD::Client client; @@ -124,12 +124,12 @@ bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) { uint max_range = 255; // calculate ip range (only last mask entry) - QRegExp lastRex("([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})"); + TQRegExp lastRex("([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})"); if(lastRex.exactMatch(ip)) { uint lastWordIP = lastRex.cap(4).toUInt(); - QStringList ipToks; + TQStringList ipToks; for(int i = 1; i < 5; i++) { ipToks.push_back(lastRex.cap(i)); } @@ -164,7 +164,7 @@ bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) { emit scanProgress(i); } - if(client.connect(QString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + QString::number(i)), 3185)) { + if(client.connect(TQString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + TQString::number(i)), 3185)) { client.disconnect(); emit smpppdFound(ip); if(range > 1) { @@ -174,7 +174,7 @@ bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) { } #ifndef NDEBUG else { - kdDebug(14312) << k_funcinfo << "No smpppd found at " << QString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + QString::number(i)) << endl; + kdDebug(14312) << k_funcinfo << "No smpppd found at " << TQString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + TQString::number(i)) << endl; } #endif } diff --git a/kopete/plugins/smpppdcs/smpppdsearcher.h b/kopete/plugins/smpppdcs/smpppdsearcher.h index af36637d..81c9cb03 100644 --- a/kopete/plugins/smpppdcs/smpppdsearcher.h +++ b/kopete/plugins/smpppdcs/smpppdsearcher.h @@ -28,7 +28,7 @@ class KProcess; * @todo Use of the SLP to find the smpppd * @author Heiko Schäfer */ -class SMPPPDSearcher : public QObject { +class SMPPPDSearcher : public TQObject { Q_OBJECT SMPPPDSearcher(const SMPPPDSearcher&); @@ -65,7 +65,7 @@ protected: * @param mask the network mask * @return TRUE if an smpppd was found */ - bool scan(const QString& ip, const QString& mask); + bool scan(const TQString& ip, const TQString& mask); signals: /** @@ -73,7 +73,7 @@ signals: * * @param host the host there the smpppd was found */ - void smpppdFound(const QString& host); + void smpppdFound(const TQString& host); /** * @brief No smpppd was found diff --git a/kopete/plugins/smpppdcs/unittest/clienttest.cpp b/kopete/plugins/smpppdcs/unittest/clienttest.cpp index 5affd83c..f668135f 100644 --- a/kopete/plugins/smpppdcs/unittest/clienttest.cpp +++ b/kopete/plugins/smpppdcs/unittest/clienttest.cpp @@ -45,7 +45,7 @@ void ClientTest::testConnect() { void ClientTest::testCommunicationBeforeConnect() { SMPPPD::Client c; - QStringList l = c.getInterfaceConfigurations(); + TQStringList l = c.getInterfaceConfigurations(); CHECK(l.count() == 0, true); CHECK(c.statusInterface("ifcfg0"), false); @@ -53,12 +53,12 @@ void ClientTest::testCommunicationBeforeConnect() { void ClientTest::testServerIDBeforeConnect() { SMPPPD::Client c; - CHECK(c.serverID(), QString::null); + CHECK(c.serverID(), TQString::null); } void ClientTest::testServerVersionBeforeConnect() { SMPPPD::Client c; - CHECK(c.serverVersion(), QString::null); + CHECK(c.serverVersion(), TQString::null); } void ClientTest::testCommunicationAfterConnect() { @@ -102,7 +102,7 @@ void ClientTest::testServerIDAfterDisconnect() { SMPPPD::Client c; if(c.connect("warwar", 3185)) { c.disconnect(); - CHECK(c.serverID(), QString::null); + CHECK(c.serverID(), TQString::null); } else { SKIP("Test skipped because no smpppd at warwar:3185"); } @@ -112,7 +112,7 @@ void ClientTest::testServerVersionAfterDisconnect() { SMPPPD::Client c; if(c.connect("warwar", 3185)) { c.disconnect(); - CHECK(c.serverVersion(), QString::null); + CHECK(c.serverVersion(), TQString::null); } else { SKIP("Test skipped because no smpppd at warwar:3185"); } diff --git a/kopete/plugins/statistics/statisticscontact.cpp b/kopete/plugins/statistics/statisticscontact.cpp index e9068fe5..821b8f59 100644 --- a/kopete/plugins/statistics/statisticscontact.cpp +++ b/kopete/plugins/statistics/statisticscontact.cpp @@ -16,8 +16,8 @@ #include -#include -#include +#include +#include #include #include @@ -31,7 +31,7 @@ StatisticsContact::StatisticsContact(Kopete::MetaContact *mc, StatisticsDB *db) : m_metaContact(mc),m_db(db), m_oldStatus(Kopete::OnlineStatus::Unknown) { m_isChatWindowOpen = false; - m_oldStatusDateTime = QDateTime::currentDateTime(); + m_oldStatusDateTime = TQDateTime::currentDateTime(); // Last*Changed are always false at start m_timeBetweenTwoMessagesChanged = false; @@ -48,9 +48,9 @@ StatisticsContact::~StatisticsContact() if (m_statisticsContactId.isEmpty()) return; - commonStatsSave("timebetweentwomessages",QString::number(m_timeBetweenTwoMessages), - QString::number(m_timeBetweenTwoMessagesOn), m_timeBetweenTwoMessagesChanged); - commonStatsSave("messagelength",QString::number(m_messageLength), QString::number(m_messageLengthOn), m_messageLengthChanged); + commonStatsSave("timebetweentwomessages",TQString::number(m_timeBetweenTwoMessages), + TQString::number(m_timeBetweenTwoMessagesOn), m_timeBetweenTwoMessagesChanged); + commonStatsSave("messagelength",TQString::number(m_messageLength), TQString::number(m_messageLengthOn), m_messageLengthChanged); commonStatsSave("lasttalk", m_lastTalk.toString(), "", m_lastTalkChanged); commonStatsSave("lastpresent", m_lastPresent.toString(), "", m_lastPresentChanged); } @@ -58,7 +58,7 @@ StatisticsContact::~StatisticsContact() void StatisticsContact::initialize(Kopete::Contact *c) { // Generate statisticsContactId or get it from database - QStringList buffer = m_db->query(QString("SELECT statisticid FROM contacts " + TQStringList buffer = m_db->query(TQString("SELECT statisticid FROM contacts " "WHERE contactid LIKE '%1';" ).arg(c->contactId())); @@ -66,7 +66,7 @@ void StatisticsContact::initialize(Kopete::Contact *c) { // Check if we don't have old data if ( !c->metaContact()->metaContactId().isEmpty() && - !m_db->query(QString("SELECT metacontactid FROM commonstats " + !m_db->query(TQString("SELECT metacontactid FROM commonstats " "WHERE metacontactid LIKE '%1';" ).arg(c->metaContact()->metaContactId())).isEmpty()) { @@ -80,7 +80,7 @@ void StatisticsContact::initialize(Kopete::Contact *c) } // Assign contactId to m_statisticsContactId - m_db->query(QString("INSERT INTO contacts (statisticid, contactid) VALUES('%1', '%2');" + m_db->query(TQString("INSERT INTO contacts (statisticid, contactid) VALUES('%1', '%2');" ).arg(m_statisticsContactId).arg(c->contactId())); } else @@ -94,8 +94,8 @@ void StatisticsContact::initialize(Kopete::Contact *c) commonStatsCheck("messagelength", m_messageLength, m_messageLengthOn, 0, 0); // Check for last talk - QString lastTalk; - QString dummy = ""; + TQString lastTalk; + TQString dummy = ""; commonStatsCheck("lasttalk", lastTalk, dummy); if (lastTalk.isEmpty()) { @@ -103,15 +103,15 @@ void StatisticsContact::initialize(Kopete::Contact *c) m_lastTalkChanged = true; } else - m_lastTalk = QDateTime::fromString(lastTalk); + m_lastTalk = TQDateTime::fromString(lastTalk); // Get last time a message was received - m_lastMessageReceived = QDateTime::currentDateTime(); + m_lastMessageReceived = TQDateTime::currentDateTime(); // Check for lastPresent - QString lastPresent = ""; + TQString lastPresent = ""; commonStatsCheck("lastpresent", lastPresent, dummy); if (lastPresent.isEmpty()) { @@ -119,7 +119,7 @@ void StatisticsContact::initialize(Kopete::Contact *c) m_lastPresentChanged = true; } else - m_lastPresent = QDateTime::fromString(lastPresent); + m_lastPresent = TQDateTime::fromString(lastPresent); } void StatisticsContact::contactAdded( Kopete::Contact *c ) @@ -127,12 +127,12 @@ void StatisticsContact::contactAdded( Kopete::Contact *c ) if ( !m_statisticsContactId.isEmpty() ) { // Check if contact is allready in database if not add it - if (m_db->query(QString("SELECT id FROM contacts " + if (m_db->query(TQString("SELECT id FROM contacts " "WHERE statisticid LIKE '%1' AND contactid LIKE '%2';" ).arg(m_statisticsContactId).arg(c->contactId())).isEmpty()) { // Assign contactId to m_statisticsContactId - m_db->query(QString("INSERT INTO contacts (statisticid, contactid) VALUES('%1', '%2');" + m_db->query(TQString("INSERT INTO contacts (statisticid, contactid) VALUES('%1', '%2');" ).arg(m_statisticsContactId).arg(c->contactId())); } kdDebug() << k_funcinfo << " m_statisticsContactId: " << m_statisticsContactId << endl; @@ -150,7 +150,7 @@ void StatisticsContact::contactRemoved( Kopete::Contact *c ) return; kdDebug() << k_funcinfo << " m_statisticsContactId: " << m_statisticsContactId << endl; - m_db->query(QString("DELETE FROM contacts WHERE statisticid LIKE '%1' AND contactid LIKE '%2';" + m_db->query(TQString("DELETE FROM contacts WHERE statisticid LIKE '%1' AND contactid LIKE '%2';" ).arg(m_statisticsContactId).arg(c->contactId())); } @@ -160,14 +160,14 @@ void StatisticsContact::removeFromDB() return; kdDebug() << k_funcinfo << " m_statisticsContactId: " << m_statisticsContactId << endl; - m_db->query(QString("DELETE FROM contacts WHERE statisticid LIKE '%1';").arg(m_statisticsContactId)); - m_db->query(QString("DELETE FROM contactstatus WHERE metacontactid LIKE '%1';").arg(m_statisticsContactId)); - m_db->query(QString("DELETE FROM commonstats WHERE metacontactid LIKE '%1';").arg(m_statisticsContactId)); + m_db->query(TQString("DELETE FROM contacts WHERE statisticid LIKE '%1';").arg(m_statisticsContactId)); + m_db->query(TQString("DELETE FROM contactstatus WHERE metacontactid LIKE '%1';").arg(m_statisticsContactId)); + m_db->query(TQString("DELETE FROM commonstats WHERE metacontactid LIKE '%1';").arg(m_statisticsContactId)); - m_statisticsContactId = QString::null; + m_statisticsContactId = TQString::null; } -void StatisticsContact::commonStatsSave(const QString name, const QString statVar1, const QString statVar2, const bool statVarChanged) +void StatisticsContact::commonStatsSave(const TQString name, const TQString statVar1, const TQString statVar2, const bool statVarChanged) { // Only update the database if there was a change if (!statVarChanged) return; @@ -175,28 +175,28 @@ void StatisticsContact::commonStatsSave(const QString name, const QString statVa if (m_statisticsContactId.isEmpty()) return; - m_db->query(QString("UPDATE commonstats SET statvalue1 = '%1', statvalue2='%2'" + m_db->query(TQString("UPDATE commonstats SET statvalue1 = '%1', statvalue2='%2'" "WHERE statname LIKE '%3' AND metacontactid LIKE '%4';").arg(statVar1).arg(statVar2).arg(name).arg(m_statisticsContactId)); } -void StatisticsContact::commonStatsCheck(const QString name, int& statVar1, int& statVar2, const int defaultValue1, const int defaultValue2) +void StatisticsContact::commonStatsCheck(const TQString name, int& statVar1, int& statVar2, const int defaultValue1, const int defaultValue2) { - QString a = QString::number(statVar1); - QString b = QString::number(statVar2); + TQString a = TQString::number(statVar1); + TQString b = TQString::number(statVar2); - commonStatsCheck(name, a, b, QString::number(defaultValue1), QString::number(defaultValue2)); + commonStatsCheck(name, a, b, TQString::number(defaultValue1), TQString::number(defaultValue2)); statVar1 = a.toInt(); statVar2 = b.toInt(); } -void StatisticsContact::commonStatsCheck(const QString name, QString& statVar1, QString& statVar2, const QString defaultValue1, const QString defaultValue2) +void StatisticsContact::commonStatsCheck(const TQString name, TQString& statVar1, TQString& statVar2, const TQString defaultValue1, const TQString defaultValue2) { if (m_statisticsContactId.isEmpty()) return; - QStringList buffer = m_db->query(QString("SELECT statvalue1,statvalue2 FROM commonstats WHERE statname LIKE '%1' AND metacontactid LIKE '%2';").arg(name, m_statisticsContactId)); + TQStringList buffer = m_db->query(TQString("SELECT statvalue1,statvalue2 FROM commonstats WHERE statname LIKE '%1' AND metacontactid LIKE '%2';").arg(name, m_statisticsContactId)); if (!buffer.isEmpty()) { statVar1 = buffer[0]; @@ -204,7 +204,7 @@ void StatisticsContact::commonStatsCheck(const QString name, QString& statVar1, } else { - m_db->query(QString("INSERT INTO commonstats (metacontactid, statname, statvalue1, statvalue2) VALUES('%1', '%2', 0, 0);").arg(m_statisticsContactId, name)); + m_db->query(TQString("INSERT INTO commonstats (metacontactid, statname, statvalue1, statvalue2) VALUES('%1', '%2', 0, 0);").arg(m_statisticsContactId, name)); statVar1 = defaultValue1; statVar2 = defaultValue2; } @@ -234,7 +234,7 @@ void StatisticsContact::commonStatsCheck(const QString name, QString& statVar1, void StatisticsContact::newMessageReceived(Kopete::Message& m) { kdDebug() << "statistics: new message received" << endl; - QDateTime currentDateTime = QDateTime::currentDateTime(); + TQDateTime currentDateTime = TQDateTime::currentDateTime(); if (m_timeBetweenTwoMessagesOn != -1 && m_isChatWindowOpen) { @@ -269,17 +269,17 @@ void StatisticsContact::onlineStatusChanged(Kopete::OnlineStatus::StatusType sta if (m_statisticsContactId.isEmpty()) return; - QDateTime currentDateTime = QDateTime::currentDateTime(); + TQDateTime currentDateTime = TQDateTime::currentDateTime(); /// We don't want to log if oldStatus is unknown /// the change could not be a real one; see StatisticsPlugin::slotMySelfOnlineStatusChanged if (m_oldStatus != Kopete::OnlineStatus::Unknown) { - kdDebug() << "statistics - status change for "<< metaContact()->metaContactId() << " : "<< QString::number(m_oldStatus) << endl; - m_db->query(QString("INSERT INTO contactstatus " + kdDebug() << "statistics - status change for "<< metaContact()->metaContactId() << " : "<< TQString::number(m_oldStatus) << endl; + m_db->query(TQString("INSERT INTO contactstatus " "(metacontactid, status, datetimebegin, datetimeend) " - "VALUES('%1', '%2', '%3', '%4'" ");").arg(m_statisticsContactId).arg(Kopete::OnlineStatus::statusTypeToString(m_oldStatus)).arg(QString::number(m_oldStatusDateTime.toTime_t())).arg(QString::number(currentDateTime.toTime_t()))); + "VALUES('%1', '%2', '%3', '%4'" ");").arg(m_statisticsContactId).arg(Kopete::OnlineStatus::statusTypeToString(m_oldStatus)).arg(TQString::number(m_oldStatusDateTime.toTime_t())).arg(TQString::number(currentDateTime.toTime_t()))); } if (m_oldStatus == Kopete::OnlineStatus::Online || m_oldStatus == Kopete::OnlineStatus::Away) @@ -294,12 +294,12 @@ void StatisticsContact::onlineStatusChanged(Kopete::OnlineStatus::StatusType sta } -bool StatisticsContact::wasStatus(QDateTime dt, Kopete::OnlineStatus::StatusType status) +bool StatisticsContact::wasStatus(TQDateTime dt, Kopete::OnlineStatus::StatusType status) { if (m_statisticsContactId.isEmpty()) return false; - QStringList values = m_db->query(QString("SELECT status, datetimebegin, datetimeend " + TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend " "FROM contactstatus WHERE metacontactid LIKE '%1' AND datetimebegin <= %2 AND datetimeend >= %3 " "AND status LIKE '%4' " "ORDER BY datetimebegin;" @@ -310,12 +310,12 @@ bool StatisticsContact::wasStatus(QDateTime dt, Kopete::OnlineStatus::StatusType return false; } -QString StatisticsContact::statusAt(QDateTime dt) +TQString StatisticsContact::statusAt(TQDateTime dt) { if (m_statisticsContactId.isEmpty()) return ""; - QStringList values = m_db->query(QString("SELECT status, datetimebegin, datetimeend " + TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend " "FROM contactstatus WHERE metacontactid LIKE '%1' AND datetimebegin <= %2 AND datetimeend >= %3 " "ORDER BY datetimebegin;" ).arg(m_statisticsContactId).arg(dt.toTime_t()).arg(dt.toTime_t())); @@ -324,28 +324,28 @@ QString StatisticsContact::statusAt(QDateTime dt) else return ""; } -QString StatisticsContact::mainStatusDate(const QDate& date) +TQString StatisticsContact::mainStatusDate(const TQDate& date) { if (m_statisticsContactId.isEmpty()) return ""; - QDateTime dt1(date, QTime(0,0,0)); - QDateTime dt2(date.addDays(1), QTime(0,0,0)); + TQDateTime dt1(date, TQTime(0,0,0)); + TQDateTime dt2(date.addDays(1), TQTime(0,0,0)); kdDebug() << "dt1:" << dt1.toString() << " dt2:" << dt2.toString() << endl; - QString request = QString("SELECT status, datetimebegin, datetimeend, metacontactid " + TQString request = TQString("SELECT status, datetimebegin, datetimeend, metacontactid " "FROM contactstatus WHERE metacontactid = '%1' AND " "(datetimebegin >= %2 AND datetimebegin <= %3 OR " "datetimeend >= %4 AND datetimeend <= %5) " "ORDER BY datetimebegin;" ).arg(m_statisticsContactId).arg(dt1.toTime_t()).arg(dt2.toTime_t()).arg(dt1.toTime_t()).arg(dt2.toTime_t()); kdDebug() << request << endl; - QStringList values = m_db->query(request); + TQStringList values = m_db->query(request); unsigned int online = 0, offline = 0, away = 0; for(uint i=0; i= dt2.toTime_t()) datetimeend = dt2.toTime_t(); @@ -366,35 +366,35 @@ QString StatisticsContact::mainStatusDate(const QDate& date) return ""; } -// QDateTime StatisticsContact::nextOfflineEvent() +// TQDateTime StatisticsContact::nextOfflineEvent() // { // return nextEvent(Kopete::OnlineStatus::Offline); // } // -// QDateTime StatisticsContact::nextOnlineEvent() +// TQDateTime StatisticsContact::nextOnlineEvent() // { // return nextEvent(Kopete::OnlineStatus::Online); // } -// QDateTime StatisticsContact::nextEvent(const Kopete::OnlineStatus::StatusType& status) +// TQDateTime StatisticsContact::nextEvent(const Kopete::OnlineStatus::StatusType& status) // { // // } -QValueList StatisticsContact::mainEvents(const Kopete::OnlineStatus::StatusType& status) +TQValueList StatisticsContact::mainEvents(const Kopete::OnlineStatus::StatusType& status) { - QStringList buffer; - QValueList mainEvents; + TQStringList buffer; + TQValueList mainEvents; if (m_statisticsContactId.isEmpty()) return mainEvents; - QDateTime currentDateTime = QDateTime::currentDateTime(); - buffer = m_db->query(QString("SELECT datetimebegin, datetimeend, status FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin").arg(m_statisticsContactId)); + TQDateTime currentDateTime = TQDateTime::currentDateTime(); + buffer = m_db->query(TQString("SELECT datetimebegin, datetimeend, status FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin").arg(m_statisticsContactId)); // Only select the events for which the previous is not Unknown AND the status is status. - QStringList values; + TQStringList values; for (uint i=0; i StatisticsContact::mainEvents(const Kopete::OnlineStatus::Stat // First we compute the average number of events/day : avEventsPerDay; int avEventsPerDay = 0; - QDateTime dt1, dt2; + TQDateTime dt1, dt2; dt1.setTime_t(values[0].toInt()); dt2.setTime_t(values[values.count()-1].toInt()); @@ -417,19 +417,19 @@ QValueList StatisticsContact::mainEvents(const Kopete::OnlineStatus::Stat kdDebug() << "statistics: average events per day : " < hoursValues; + TQValueList hoursValues; for (uint i=0; i centroids; + TQValueList centroids; int incr=qRound((double)hoursValues.count()/(double)avEventsPerDay); incr = incr ? incr : 1; for (uint i=0; i StatisticsContact::mainEvents(const Kopete::OnlineStatus::Stat { kdDebug() << "statistics: new centroid : " << centroids[i] << endl; - QTime dt(0, 0, 0); + TQTime dt(0, 0, 0); dt = dt.addSecs(centroids[i]); mainEvents.push_back(dt); } @@ -456,12 +456,12 @@ QValueList StatisticsContact::mainEvents(const Kopete::OnlineStatus::Stat return mainEvents; } -QValueList StatisticsContact::computeCentroids(const QValueList& centroids, const QValueList& values) +TQValueList StatisticsContact::computeCentroids(const TQValueList& centroids, const TQValueList& values) { kdDebug() << "statistics: enter compute centroids"<< endl; - QValueList whichCentroid; // whichCentroid[i] = j <=> values[i] has centroid j for closest one - QValueList newCentroids; + TQValueList whichCentroid; // whichCentroid[i] = j <=> values[i] has centroid j for closest one + TQValueList newCentroids; for (uint i=0; i mainEvents(const Kopete::OnlineStatus::StatusType& status); + TQValueList mainEvents(const Kopete::OnlineStatus::StatusType& status); /// \brief used by mainEvents() - QValueList computeCentroids(const QValueList& centroids, const QValueList& values); + TQValueList computeCentroids(const TQValueList& centroids, const TQValueList& values); /** * \brief adds contact to "contacts" database and generates m_statisticsContactId if needed @@ -179,13 +179,13 @@ private: * \retval statvar1 * \retval statvar2 */ - void commonStatsCheck(const QString name, QString& statVar1, QString& statVar2, const QString defaultValue1 = "", const QString defaultValue2 = ""); + void commonStatsCheck(const TQString name, TQString& statVar1, TQString& statVar2, const TQString defaultValue1 = "", const TQString defaultValue2 = ""); /** * @brief Same as commonStatsCheck for integers. * Provided for convenience */ - void commonStatsCheck(const QString name, int& statVar1, int& statVar2, const int defaultValue1 = 0, const int defaultValue2 = -1); + void commonStatsCheck(const TQString name, int& statVar1, int& statVar2, const int defaultValue1 = 0, const int defaultValue2 = -1); /** * @brief Save a value in the "commonstats" table @@ -194,7 +194,7 @@ private: * \param statVar2 the second stat we can save in this table for this entry * \param statVarChanged if this param is true, we save. Else, we don't. Spare some disk usage. */ - void commonStatsSave(const QString name, const QString statVar1, const QString statVar2, const bool statVarChanged); + void commonStatsSave(const TQString name, const TQString statVar1, const TQString statVar2, const bool statVarChanged); /** * Kopete::MetaContact linked to this StatisticsContact @@ -213,7 +213,7 @@ private: */ Kopete::OnlineStatus::StatusType m_oldStatus; /// We keep the old status datetime here - QDateTime m_oldStatusDateTime; + TQDateTime m_oldStatusDateTime; /** * Average time this user takes between two of his messages @@ -223,7 +223,7 @@ private: bool m_timeBetweenTwoMessagesChanged; /// Date at which the last message was received. /// Used to compute m_timeBetweenTwoMessages - QDateTime m_lastMessageReceived; + TQDateTime m_lastMessageReceived; /// This is the ponderation corresponding to m_timeBetweenTwoMessagesOn int m_timeBetweenTwoMessagesOn; /// We don't count time if a chatwindow isn't open @@ -240,20 +240,20 @@ private: /** * Last time user talked with this contact */ - QDateTime m_lastTalk; + TQDateTime m_lastTalk; bool m_lastTalkChanged; /** * Last time user was present (=online or away) */ - QDateTime m_lastPresent; + TQDateTime m_lastPresent; bool m_lastPresentChanged; /** * Unique id that identifies StatisticsContact * It's also identifier for database records */ - QString m_statisticsContactId; + TQString m_statisticsContactId; }; diff --git a/kopete/plugins/statistics/statisticsdb.cpp b/kopete/plugins/statistics/statisticsdb.cpp index 450c4371..c0a41232 100644 --- a/kopete/plugins/statistics/statisticsdb.cpp +++ b/kopete/plugins/statistics/statisticsdb.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include +#include #include "sqlite/sqlite3.h" @@ -33,15 +33,15 @@ StatisticsDB::StatisticsDB() { - QCString path = (::locateLocal("appdata", "kopete_statistics-0.1.db")).latin1(); + TQCString path = (::locateLocal("appdata", "kopete_statistics-0.1.db")).latin1(); kdDebug() << "statistics: DB path:" << path << endl; // Open database file and check for correctness bool failOpen = true; - QFile file( path ); + TQFile file( path ); if ( file.open( IO_ReadOnly ) ) { - QString format; + TQString format; file.readLine( format, 50 ); if ( !format.startsWith( "SQLite format 3" ) ) { @@ -59,18 +59,18 @@ StatisticsDB::StatisticsDB() if ( failOpen ) { // Remove old db file; create new - QFile::remove( path ); + TQFile::remove( path ); sqlite3_open( path, &m_db ); } kdDebug() << "[Statistics] Contructor"<< endl; // Creates the tables if they do not exist. - QStringList result = query("SELECT name FROM sqlite_master WHERE type='table'"); + TQStringList result = query("SELECT name FROM sqlite_master WHERE type='table'"); if (!result.contains("contacts")) { - query(QString("CREATE TABLE contacts " + query(TQString("CREATE TABLE contacts " "(id INTEGER PRIMARY KEY," "statisticid TEXT," "contactid TEXT" @@ -80,7 +80,7 @@ StatisticsDB::StatisticsDB() if (!result.contains("contactstatus")) { kdDebug() << "[Statistics] Database empty"<< endl; - query(QString("CREATE TABLE contactstatus " + query(TQString("CREATE TABLE contactstatus " "(id INTEGER PRIMARY KEY," "metacontactid TEXT," "status TEXT," @@ -92,7 +92,7 @@ StatisticsDB::StatisticsDB() if (!result.contains("commonstats")) { // To store things like the contact answer time etc. - query(QString("CREATE TABLE commonstats" + query(TQString("CREATE TABLE commonstats" " (id INTEGER PRIMARY KEY," "metacontactid TEXT," "statname TEXT," // for instance, answertime, lastmessage, messagelength ... @@ -104,7 +104,7 @@ StatisticsDB::StatisticsDB() /// @fixme This is not used anywhere if (!result.contains("statsgroup")) { - query(QString("CREATE TABLE statsgroup" + query(TQString("CREATE TABLE statsgroup" "(id INTEGER PRIMARY KEY," "datetimebegin INTEGER," "datetimeend INTEGER," @@ -123,9 +123,9 @@ StatisticsDB::~StatisticsDB() * @param statement SQL program to execute. Only one SQL statement is allowed. * @param debug Set to true for verbose debug output. * @retval names Will contain all column names, set to NULL if not used. - * @return The queried data, or QStringList() on error. + * @return The queried data, or TQStringList() on error. */ - QStringList StatisticsDB::query( const QString& statement, QStringList* const names, bool debug ) + TQStringList StatisticsDB::query( const TQString& statement, TQStringList* const names, bool debug ) { if ( debug ) @@ -136,11 +136,11 @@ StatisticsDB::~StatisticsDB() if ( !m_db ) { kdError() << k_funcinfo << "[CollectionDB] SQLite pointer == NULL.\n"; - return QStringList(); + return TQStringList(); } int error; - QStringList values; + TQStringList values; const char* tail; sqlite3_stmt* stmt; @@ -153,7 +153,7 @@ StatisticsDB::~StatisticsDB() kdError() << sqlite3_errmsg( m_db ) << endl; kdError() << "on query: " << statement << endl; - return QStringList(); + return TQStringList(); } int busyCnt = 0; @@ -180,8 +180,8 @@ StatisticsDB::~StatisticsDB() //iterate over columns for ( int i = 0; i < number; i++ ) { - values << QString::fromUtf8( (const char*) sqlite3_column_text( stmt, i ) ); - if ( names ) *names << QString( sqlite3_column_name( stmt, i ) ); + values << TQString::fromUtf8( (const char*) sqlite3_column_text( stmt, i ) ); + if ( names ) *names << TQString( sqlite3_column_name( stmt, i ) ); } } //deallocate vm ressources @@ -193,7 +193,7 @@ StatisticsDB::~StatisticsDB() kdError() << sqlite3_errmsg( m_db ) << endl; kdError() << "on query: " << statement << endl; - return QStringList(); + return TQStringList(); } if ( debug ) diff --git a/kopete/plugins/statistics/statisticsdb.h b/kopete/plugins/statistics/statisticsdb.h index 130b1d0e..444e80c0 100644 --- a/kopete/plugins/statistics/statisticsdb.h +++ b/kopete/plugins/statistics/statisticsdb.h @@ -26,8 +26,8 @@ public: StatisticsDB(); ~StatisticsDB(); //sql helper methods - QStringList query( const QString& statement, QStringList* const names = 0, bool debug = false ); - QString escapeString( QString string ); + TQStringList query( const TQString& statement, TQStringList* const names = 0, bool debug = false ); + TQString escapeString( TQString string ); private: sqlite3 *m_db; }; diff --git a/kopete/plugins/statistics/statisticsdcopiface.h b/kopete/plugins/statistics/statisticsdcopiface.h index b45a2c95..9a769935 100644 --- a/kopete/plugins/statistics/statisticsdcopiface.h +++ b/kopete/plugins/statistics/statisticsdcopiface.h @@ -29,46 +29,46 @@ k_dcop: /** * Shows the statistics dialog for contact which has KABC id \var contactId */ - virtual void dcopStatisticsDialog(QString contactId) = 0; + virtual void dcopStatisticsDialog(TQString contactId) = 0; /** * \returns true if contact was online at time timeStamp, false else. Returns false if contact does not exist. */ - virtual bool dcopWasOnline(QString id, int timeStamp) = 0; + virtual bool dcopWasOnline(TQString id, int timeStamp) = 0; /** * \returns true if contact was online at dt, false else. Returns false if contact does not exist or if date is invalid. */ - virtual bool dcopWasOnline(QString id, QString datetime) = 0; + virtual bool dcopWasOnline(TQString id, TQString datetime) = 0; /** * \returns true if contact was away at time timeStamp, false else. Returns false if contact does not exist. */ - virtual bool dcopWasAway(QString id, int timeStamp) = 0; + virtual bool dcopWasAway(TQString id, int timeStamp) = 0; /** * \returns true if contact was away at dt, false else. Returns false if contact does not exist or if date is invalid. */ - virtual bool dcopWasAway(QString id, QString datetime) = 0; + virtual bool dcopWasAway(TQString id, TQString datetime) = 0; /** * \returns true if contact was offline at time timeStamp, false else. Returns false if contact does not exist. */ - virtual bool dcopWasOffline(QString id, int timeStamp) = 0; + virtual bool dcopWasOffline(TQString id, int timeStamp) = 0; /** * \returns true if contact was offline at dt, false else. Returns false if contact does not exist or if date is invalid. */ - virtual bool dcopWasOffline(QString id, QString datetime) = 0; + virtual bool dcopWasOffline(TQString id, TQString datetime) = 0; /** * \returns return the status of the contact at datetime. */ - virtual QString dcopStatus(QString id, QString datetime) = 0; + virtual TQString dcopStatus(TQString id, TQString datetime) = 0; /** * \returns return the status of the contact at timeStamp. */ - virtual QString dcopStatus(QString id, int timeStamp) = 0; + virtual TQString dcopStatus(TQString id, int timeStamp) = 0; /** * \returns the main status (most used status) of the contact id at date (not time) timeStamp. Will take the day where timeStamp is. */ - virtual QString dcopMainStatus(QString id, int timeStamp) = 0; + virtual TQString dcopMainStatus(TQString id, int timeStamp) = 0; }; #endif // STATISTICSDCOP_H diff --git a/kopete/plugins/statistics/statisticsdialog.cpp b/kopete/plugins/statistics/statisticsdialog.cpp index 485eb7ad..461dd696 100644 --- a/kopete/plugins/statistics/statisticsdialog.cpp +++ b/kopete/plugins/statistics/statisticsdialog.cpp @@ -14,14 +14,14 @@ */ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "kdialogbase.h" #include "klocale.h" @@ -40,7 +40,7 @@ #include "statisticsplugin.h" #include "statisticsdb.h" -StatisticsDialog::StatisticsDialog(StatisticsContact *contact, StatisticsDB *db, QWidget* parent, +StatisticsDialog::StatisticsDialog(StatisticsContact *contact, StatisticsDB *db, TQWidget* parent, const char* name) : KDialogBase(parent, name, false, i18n("Statistics for %1").arg(contact->metaContact()->displayName()), Close, Close), m_db(db), m_contact(contact) { @@ -51,20 +51,20 @@ StatisticsDialog::StatisticsDialog(StatisticsContact *contact, StatisticsDB *db, setMinimumHeight(400); adjustSize(); - QHBox *hbox = new QHBox(this); + TQHBox *hbox = new TQHBox(this); generalHTMLPart = new KHTMLPart(hbox); generalHTMLPart->setOnlyLocalReferences(true); - connect ( generalHTMLPart->browserExtension(), SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), - this, SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) ); + connect ( generalHTMLPart->browserExtension(), TQT_SIGNAL( openURLRequestDelayed( const KURL &, const KParts::URLArgs & ) ), + this, TQT_SLOT( slotOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) ); mainWidget->tabWidget->insertTab(hbox, i18n("General"), 0); mainWidget->tabWidget->setCurrentPage(0); - mainWidget->timePicker->setTime(QTime::currentTime()); - mainWidget->datePicker->setDate(QDate::currentDate()); - connect(mainWidget->askButton, SIGNAL(clicked()), this, SLOT(slotAskButtonClicked())); + mainWidget->timePicker->setTime(TQTime::currentTime()); + mainWidget->datePicker->setDate(TQDate::currentDate()); + connect(mainWidget->askButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAskButtonClicked())); setFocus(); setEscapeButton(Close); @@ -89,14 +89,14 @@ void StatisticsDialog::slotOpenURLRequest(const KURL& url, const KParts::URLArgs } } -/*void StatisticsDialog::parseTemplate(QString Template) +/*void StatisticsDialog::parseTemplate(TQString Template) { - QString fileString = ::locate("appdata", "kopete_statistics.template.html"); - QString templateString; - QFile file(file); + TQString fileString = ::locate("appdata", "kopete_statistics.template.html"); + TQString templateString; + TQFile file(file); if (file.open(IO_ReadOnly)) { - QTextStream stream(&file); + TQTextStream stream(&file); templateString = stream.read(); file.close(); } @@ -106,14 +106,14 @@ void StatisticsDialog::slotOpenURLRequest(const KURL& url, const KParts::URLArgs void StatisticsDialog::generatePageForMonth(const int monthOfYear) { - QStringList values = m_db->query(QString("SELECT status, datetimebegin, datetimeend " + TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend " "FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;").arg(m_contact->statisticsContactId())); - QStringList values2; + TQStringList values2; for (uint i=0; iquery(QString("SELECT status, datetimebegin, datetimeend " + TQStringList values = m_db->query(TQString("SELECT status, datetimebegin, datetimeend " "FROM contactstatus WHERE metacontactid LIKE '%1' ORDER BY datetimebegin;").arg(m_contact->statisticsContactId())); - QStringList values2; + TQStringList values2; for (uint i=0; ibegin(); - generalHTMLPart->write(QString("")); + s.replace ( TQRegExp( TQString::fromLatin1("([^<]*)")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("\\2")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("\\2")); //okay now change the to //0-9 are size 1 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //10-11 are size 2 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //12-13 are size 3 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //14-16 are size 4 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //17-22 are size 5 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //23-29 are size 6 - s.replace ( QRegExp ( QString::fromLatin1("")),QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")),TQString::fromLatin1("")); //30- (and any I missed) are size 7 - s.replace ( QRegExp ( QString::fromLatin1("")),QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")),TQString::fromLatin1("")); - s.replace ( QRegExp ( QString::fromLatin1("")), QString::fromLatin1("
    ") ); + s.replace ( TQRegExp ( TQString::fromLatin1("")), TQString::fromLatin1("
    ") ); kdDebug(14190) << k_funcinfo << "sending " << s << endl; @@ -200,34 +200,34 @@ void AIMMyselfContact::sendMessage( Kopete::Message& message, Kopete::ChatSessio } -AIMAccount::AIMAccount(Kopete::Protocol *parent, QString accountID, const char *name) +AIMAccount::AIMAccount(Kopete::Protocol *parent, TQString accountID, const char *name) : OscarAccount(parent, accountID, name, false) { kdDebug(14152) << k_funcinfo << accountID << ": Called."<< endl; AIMMyselfContact* mc = new AIMMyselfContact( this ); setMyself( mc ); myself()->setOnlineStatus( static_cast( parent )->statusOffline ); - QString profile = configGroup()->readEntry( "Profile", + TQString profile = configGroup()->readEntry( "Profile", i18n( "Visit the Kopete website at http://kopete.kde.org") ); mc->setOwnProfile( profile ); m_joinChatDialog = 0; m_visibilityDialog = 0; - QObject::connect( Kopete::ContactList::self(), - SIGNAL( globalIdentityChanged( const QString&, const QVariant& ) ), + TQObject::connect( Kopete::ContactList::self(), + TQT_SIGNAL( globalIdentityChanged( const TQString&, const TQVariant& ) ), this, - SLOT( slotGlobalIdentityChanged( const QString&, const QVariant& ) ) ); + TQT_SLOT( slotGlobalIdentityChanged( const TQString&, const TQVariant& ) ) ); - QObject::connect( engine(), SIGNAL( chatRoomConnected( WORD, const QString& ) ), - this, SLOT( connectedToChatRoom( WORD, const QString& ) ) ); + TQObject::connect( engine(), TQT_SIGNAL( chatRoomConnected( WORD, const TQString& ) ), + this, TQT_SLOT( connectedToChatRoom( WORD, const TQString& ) ) ); - QObject::connect( engine(), SIGNAL( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ), - this, SLOT( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ) ); + TQObject::connect( engine(), TQT_SIGNAL( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SLOT( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ) ); - QObject::connect( engine(), SIGNAL( userLeftChat( Oscar::WORD, const QString&, const QString& ) ), - this, SLOT( userLeftChat( Oscar::WORD, const QString&, const QString& ) ) ); + TQObject::connect( engine(), TQT_SIGNAL( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SLOT( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ) ); - QObject::connect( this, SIGNAL( buddyIconChanged() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( this, TQT_SIGNAL( buddyIconChanged() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); } @@ -235,19 +235,19 @@ AIMAccount::~AIMAccount() { } -OscarContact *AIMAccount::createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) +OscarContact *AIMAccount::createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) { - AIMContact* contact = new AIMContact( this, contactId, parentContact, QString::null, ssiItem ); + AIMContact* contact = new AIMContact( this, contactId, parentContact, TQString::null, ssiItem ); if ( !ssiItem.alias().isEmpty() ) contact->setProperty( Kopete::Global::Properties::self()->nickName(), ssiItem.alias() ); return contact; } -QString AIMAccount::sanitizedMessage( const QString& message ) +TQString AIMAccount::sanitizedMessage( const TQString& message ) { - QDomDocument doc; - QString domError; + TQDomDocument doc; + TQString domError; int errLine = 0, errCol = 0; doc.setContent( message, false, &domError, &errLine, &errCol ); if ( !domError.isEmpty() ) //error parsing, do nothing @@ -260,7 +260,7 @@ QString AIMAccount::sanitizedMessage( const QString& message ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "conversion to dom document successful." << "looking for font tags" << endl; - QDomNodeList fontTagList = doc.elementsByTagName( "font" ); + TQDomNodeList fontTagList = doc.elementsByTagName( "font" ); if ( fontTagList.count() == 0 ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "No font tags found. Returning normal message" << endl; @@ -272,8 +272,8 @@ QString AIMAccount::sanitizedMessage( const QString& message ) uint numFontTags = fontTagList.count(); for ( uint i = 0; i < numFontTags; i++ ) { - QDomNode fontNode = fontTagList.item(i); - QDomElement fontEl; + TQDomNode fontNode = fontTagList.item(i); + TQDomElement fontEl; if ( !fontNode.isNull() && fontNode.isElement() ) fontEl = fontTagList.item(i).toElement(); else @@ -281,7 +281,7 @@ QString AIMAccount::sanitizedMessage( const QString& message ) if ( fontEl.hasAttribute( "back" ) ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Found attribute to replace. Doing replacement" << endl; - QString backgroundColor = fontEl.attribute( "back" ); + TQString backgroundColor = fontEl.attribute( "back" ); backgroundColor.insert( 0, "background-color: " ); backgroundColor.append( ';' ); fontEl.setAttribute( "style", backgroundColor ); @@ -304,42 +304,42 @@ KActionMenu* AIMAccount::actionMenu() AIMProtocol *p = AIMProtocol::protocol(); - QString accountNick = myself()->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString accountNick = myself()->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); mActionMenu->popupMenu()->insertTitle( myself()->onlineStatus().iconFor( myself() ), i18n( "%2 <%1>" ).arg( accountId(), accountNick )); mActionMenu->insert( new KAction( i18n("Online"), p->statusOnline.iconFor( this ), 0, this, - SLOT( slotGoOnline() ), mActionMenu, "AIMAccount::mActionOnline") ); + TQT_SLOT( slotGoOnline() ), mActionMenu, "AIMAccount::mActionOnline") ); KAction* mActionAway = new Kopete::AwayAction(i18n("Away"), p->statusAway.iconFor( this ), 0, this, - SLOT(slotGoAway( const QString & )), this, "AIMAccount::mActionNA" ); + TQT_SLOT(slotGoAway( const TQString & )), this, "AIMAccount::mActionNA" ); mActionAway->setEnabled( isConnected() ); mActionMenu->insert( mActionAway ); KAction* mActionOffline = new KAction( i18n("Offline"), p->statusOffline.iconFor(this), 0, this, - SLOT( slotGoOffline() ), mActionMenu, "AIMAccount::mActionOffline"); + TQT_SLOT( slotGoOffline() ), mActionMenu, "AIMAccount::mActionOffline"); mActionMenu->insert( mActionOffline ); mActionMenu->popupMenu()->insertSeparator(); - KAction* m_joinChatAction = new KAction( i18n( "Join Chat..." ), QString::null, 0, this, - SLOT( slotJoinChat() ), mActionMenu, "join_a_chat" ); + KAction* m_joinChatAction = new KAction( i18n( "Join Chat..." ), TQString::null, 0, this, + TQT_SLOT( slotJoinChat() ), mActionMenu, "join_a_chat" ); mActionMenu->insert( new KToggleAction( i18n( "Set Visibility..." ), 0, 0, - this, SLOT( slotSetVisiblility() ), this, + this, TQT_SLOT( slotSetVisiblility() ), this, "AIMAccount::mActionSetVisibility") ); mActionMenu->insert( m_joinChatAction ); KAction* m_editInfoAction = new KAction( i18n( "Edit User Info..." ), "identity", 0, - this, SLOT( slotEditInfo() ), mActionMenu, "actionEditInfo"); + this, TQT_SLOT( slotEditInfo() ), mActionMenu, "actionEditInfo"); mActionMenu->insert( m_editInfoAction ); return mActionMenu; } -void AIMAccount::setAway(bool away, const QString &awayReason) +void AIMAccount::setAway(bool away, const TQString &awayReason) { // kdDebug(14152) << k_funcinfo << accountId() << "reason is " << awayReason << endl; if ( away ) @@ -353,12 +353,12 @@ void AIMAccount::setAway(bool away, const QString &awayReason) { engine()->setStatus( Client::Online ); AIMMyselfContact* me = static_cast ( myself() ); - me->setLastAwayMessage(QString::null); + me->setLastAwayMessage(TQString::null); me->removeProperty( Kopete::Global::Properties::self()->awayMessage() ); } } -void AIMAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QString& reason ) +void AIMAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const TQString& reason ) { kdDebug(14152) << k_funcinfo << "called with reason = " << reason <<" status = "<< status.status() << endl;; if ( status.status() == Kopete::OnlineStatus::Online ) @@ -368,13 +368,13 @@ void AIMAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QStr } -void AIMAccount::setUserProfile(const QString &profile) +void AIMAccount::setUserProfile(const TQString &profile) { kdDebug(14152) << k_funcinfo << "called." << endl; AIMMyselfContact* aimmc = dynamic_cast( myself() ); if ( aimmc ) aimmc->setOwnProfile( profile ); - configGroup()->writeEntry( QString::fromLatin1( "Profile" ), profile ); + configGroup()->writeEntry( TQString::fromLatin1( "Profile" ), profile ); } void AIMAccount::slotEditInfo() @@ -391,7 +391,7 @@ void AIMAccount::slotEditInfo() myInfo->exec(); // This is a modal dialog } -void AIMAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& value ) +void AIMAccount::slotGlobalIdentityChanged( const TQString& key, const TQVariant& value ) { //do something with the photo kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Global identity changed" << endl; @@ -415,14 +415,14 @@ void AIMAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& void AIMAccount::slotBuddyIconChanged() { // need to disconnect because we could end up with many connections - QObject::disconnect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::disconnect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); if ( !engine()->isActive() ) { - QObject::connect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); return; } - QString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); + TQString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); SSIManager* ssi = engine()->ssiManager(); Oscar::SSI item = ssi->findItemForIconByRef( 1 ); @@ -435,7 +435,7 @@ void AIMAccount::slotBuddyIconChanged() Oscar::SSI s(item); //remove hash and alias - QValueList tList( item.tlvList() ); + TQValueList tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) tList.remove( t ); @@ -447,7 +447,7 @@ void AIMAccount::slotBuddyIconChanged() } else { - QFile iconFile( photoPath ); + TQFile iconFile( photoPath ); iconFile.open( IO_ReadOnly ); KMD5 iconHash; @@ -467,7 +467,7 @@ void AIMAccount::slotBuddyIconChanged() memcpy(t.data.data() + 2, iconHash.rawDigest(), 16); t.length = t.data.size(); - QValueList list; + TQValueList list; list.append( t ); Oscar::SSI s( "1", 0, ssi->nextContactId(), ROSTER_BUDDYICONS, list ); @@ -480,7 +480,7 @@ void AIMAccount::slotBuddyIconChanged() { //found an item Oscar::SSI s(item); kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "modifying old item in ssi." << endl; - QValueList tList( item.tlvList() ); + TQValueList tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) @@ -520,9 +520,9 @@ void AIMAccount::slotJoinChat() if ( !m_joinChatDialog ) { m_joinChatDialog = new AIMJoinChatUI( this, false, Kopete::UI::Global::mainWidget() ); - QObject::connect( m_joinChatDialog, SIGNAL( closing( int ) ), - this, SLOT( joinChatDialogClosed( int ) ) ); - QValueList list = engine()->chatExchangeList(); + TQObject::connect( m_joinChatDialog, TQT_SIGNAL( closing( int ) ), + this, TQT_SLOT( joinChatDialogClosed( int ) ) ); + TQValueList list = engine()->chatExchangeList(); m_joinChatDialog->setExchangeList( list ); m_joinChatDialog->show(); } @@ -549,7 +549,7 @@ void AIMAccount::slotGoOnline() } } -void AIMAccount::slotGoAway(const QString &message) +void AIMAccount::slotGoAway(const TQString &message) { kdDebug(14152) << k_funcinfo << message << endl; setAway(true, message); @@ -557,7 +557,7 @@ void AIMAccount::slotGoAway(const QString &message) void AIMAccount::joinChatDialogClosed( int code ) { - if ( code == QDialog::Accepted ) + if ( code == TQDialog::Accepted ) { //join the chat kdDebug(14152) << k_funcinfo << "chat accepted." << endl; @@ -583,7 +583,7 @@ void AIMAccount::disconnected( DisconnectReason reason ) kdDebug( OSCAR_AIM_DEBUG ) << k_funcinfo << "Attempting to set status offline" << endl; myself()->setOnlineStatus( static_cast( protocol() )->statusOffline ); - QDictIterator it( contacts() ); + TQDictIterator it( contacts() ); for( ; it.current(); ++it ) { OscarContact* oc = dynamic_cast( it.current() ); @@ -608,7 +608,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) kdDebug(14152) << k_funcinfo << "Checking to see if I'm online.." << endl; if( myself()->onlineStatus().status() == Kopete::OnlineStatus::Away ) { - QString sender = Oscar::normalize( message.sender() ); + TQString sender = Oscar::normalize( message.sender() ); AIMContact* aimSender = static_cast ( contacts()[sender] ); //should exist now if ( !aimSender ) { @@ -621,7 +621,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) // get the away message we have set AIMMyselfContact* myContact = static_cast ( myself() ); - QString msg = myContact->lastAwayMessage(); + TQString msg = myContact->lastAwayMessage(); kdDebug(14152) << k_funcinfo << "Got away message: " << msg << endl; // Create the message Kopete::Message chatMessage( myself(), aimSender, msg, Kopete::Message::Outbound, @@ -636,8 +636,8 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "have chat message" << endl; //handle chat room messages seperately - QValueList chats = Kopete::ChatSessionManager::self()->sessions(); - QValueList::iterator it, itEnd = chats.end(); + TQValueList chats = Kopete::ChatSessionManager::self()->sessions(); + TQValueList::iterator it, itEnd = chats.end(); for ( it = chats.begin(); it != itEnd; ++it ) { Kopete::ChatSession* kcs = ( *it ); @@ -652,7 +652,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "found chat session for chat room" << endl; Kopete::Contact* ocSender = contacts()[Oscar::normalize( message.sender() )]; //sanitize; - QString sanitizedMsg = sanitizedMessage( message.text( defaultCodec() ) ); + TQString sanitizedMsg = sanitizedMessage( message.text( defaultCodec() ) ); Kopete::ContactPtrList me; me.append( myself() ); @@ -665,7 +665,7 @@ void AIMAccount::messageReceived( const Oscar::Message& message ) } } -void AIMAccount::connectedToChatRoom( WORD exchange, const QString& room ) +void AIMAccount::connectedToChatRoom( WORD exchange, const TQString& room ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Creating chat room session" << endl; Kopete::ContactPtrList emptyList; @@ -677,14 +677,14 @@ void AIMAccount::connectedToChatRoom( WORD exchange, const QString& room ) session->raiseView(); } -void AIMAccount::userJoinedChat( WORD exchange, const QString& room, const QString& contact ) +void AIMAccount::userJoinedChat( WORD exchange, const TQString& room, const TQString& contact ) { if ( Oscar::normalize( contact ) == Oscar::normalize( myself()->contactId() ) ) return; kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "user " << contact << " has joined the chat" << endl; - QValueList chats = Kopete::ChatSessionManager::self()->sessions(); - QValueList::iterator it, itEnd = chats.end(); + TQValueList chats = Kopete::ChatSessionManager::self()->sessions(); + TQValueList::iterator it, itEnd = chats.end(); for ( it = chats.begin(); it != itEnd; ++it ) { Kopete::ChatSession* kcs = ( *it ); @@ -717,13 +717,13 @@ void AIMAccount::userJoinedChat( WORD exchange, const QString& room, const QStri } } -void AIMAccount::userLeftChat( WORD exchange, const QString& room, const QString& contact ) +void AIMAccount::userLeftChat( WORD exchange, const TQString& room, const TQString& contact ) { if ( Oscar::normalize( contact ) == Oscar::normalize( myself()->contactId() ) ) return; - QValueList chats = Kopete::ChatSessionManager::self()->sessions(); - QValueList::iterator it, itEnd = chats.end(); + TQValueList chats = Kopete::ChatSessionManager::self()->sessions(); + TQValueList::iterator it, itEnd = chats.end(); for ( it = chats.begin(); it != itEnd; ++it ) { Kopete::ChatSession* kcs = ( *it ); @@ -753,18 +753,18 @@ void AIMAccount::userLeftChat( WORD exchange, const QString& room, const QString } -void AIMAccount::connectWithPassword( const QString & ) +void AIMAccount::connectWithPassword( const TQString & ) { kdDebug(14152) << k_funcinfo << "accountId='" << accountId() << "'" << endl; // Get the screen name for this account - QString screenName = accountId(); - QString server = configGroup()->readEntry( "Server", QString::fromLatin1( "login.oscar.aol.com" ) ); + TQString screenName = accountId(); + TQString server = configGroup()->readEntry( "Server", TQString::fromLatin1( "login.oscar.aol.com" ) ); uint port = configGroup()->readNumEntry( "Port", 5190 ); Connection* c = setupConnection( server, port ); - QString _password = password().cachedValue(); + TQString _password = password().cachedValue(); if ( _password.isEmpty() ) { kdDebug(14150) << "Kopete is unable to attempt to sign-on to the " @@ -794,19 +794,19 @@ void AIMAccount::slotSetVisiblility() if ( !m_visibilityDialog ) { m_visibilityDialog = new OscarVisibilityDialog( engine(), Kopete::UI::Global::mainWidget() ); - QObject::connect( m_visibilityDialog, SIGNAL( closing() ), - this, SLOT( slotVisibilityDialogClosed() ) ); + TQObject::connect( m_visibilityDialog, TQT_SIGNAL( closing() ), + this, TQT_SLOT( slotVisibilityDialogClosed() ) ); //add all contacts; OscarVisibilityDialog::ContactMap contactMap; - QMap revContactMap; + TQMap revContactMap; - QValueList contactList = engine()->ssiManager()->contactList(); - QValueList::const_iterator it, cEnd = contactList.constEnd(); + TQValueList contactList = engine()->ssiManager()->contactList(); + TQValueList::const_iterator it, cEnd = contactList.constEnd(); for ( it = contactList.constBegin(); it != cEnd; ++it ) { - QString contactId = ( *it ).name(); + TQString contactId = ( *it ).name(); OscarContact* oc = dynamic_cast( contacts()[( *it ).name()] ); if ( oc ) @@ -823,7 +823,7 @@ void AIMAccount::slotSetVisiblility() m_visibilityDialog->addContacts( contactMap ); //add contacts from visible list - QStringList tmpList; + TQStringList tmpList; contactList = engine()->ssiManager()->visibleList(); cEnd = contactList.constEnd(); @@ -895,9 +895,9 @@ void AIMAccount::setPrivacySettings( int privacy ) void AIMAccount::setPrivacyTLVs( BYTE privacy, DWORD userClasses ) { SSIManager* ssi = engine()->ssiManager(); - Oscar::SSI item = ssi->findItem( QString::null, ROSTER_VISIBILITY ); + Oscar::SSI item = ssi->findItem( TQString::null, ROSTER_VISIBILITY ); - QValueList tList; + TQValueList tList; tList.append( TLV( 0x00CA, 1, (char *)&privacy ) ); tList.append( TLV( 0x00CB, sizeof(userClasses), (char *)&userClasses ) ); @@ -905,7 +905,7 @@ void AIMAccount::setPrivacyTLVs( BYTE privacy, DWORD userClasses ) if ( !item ) { kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Adding new privacy TLV item" << endl; - Oscar::SSI s( QString::null, 0, ssi->nextContactId(), ROSTER_VISIBILITY, tList ); + Oscar::SSI s( TQString::null, 0, ssi->nextContactId(), ROSTER_VISIBILITY, tList ); engine()->modifySSIItem( item, s ); } else diff --git a/kopete/protocols/oscar/aim/aimaccount.h b/kopete/protocols/oscar/aim/aimaccount.h index 034b9836..2df309b6 100644 --- a/kopete/protocols/oscar/aim/aimaccount.h +++ b/kopete/protocols/oscar/aim/aimaccount.h @@ -19,9 +19,9 @@ #ifndef AIMACCOUNT_H #define AIMACCOUNT_H -#include -#include -#include +#include +#include +#include #include "oscartypeclasses.h" #include "oscaraccount.h" @@ -56,26 +56,26 @@ Q_OBJECT public: AIMMyselfContact( AIMAccount *acct ); void userInfoUpdated(); - void setOwnProfile( const QString& newProfile ); - QString userProfile(); - void setLastAwayMessage( const QString& msg) {m_lastAwayMessage = msg;} - QString lastAwayMessage() { return m_lastAwayMessage; }; + void setOwnProfile( const TQString& newProfile ); + TQString userProfile(); + void setLastAwayMessage( const TQString& msg) {m_lastAwayMessage = msg;} + TQString lastAwayMessage() { return m_lastAwayMessage; }; virtual Kopete::ChatSession* manager( Kopete::Contact::CanCreateFlags = Kopete::Contact::CannotCreate, - WORD exchange = 0, const QString& room = QString::null); + WORD exchange = 0, const TQString& room = TQString::null); public slots: void sendMessage( Kopete::Message&, Kopete::ChatSession* session ); void chatSessionDestroyed( Kopete::ChatSession* ); private: - QString m_profileString; + TQString m_profileString; AIMAccount* m_acct; /** * There has GOT to be a better way to get this away message */ - QString m_lastAwayMessage; - QValueList m_chatRoomSessions; + TQString m_lastAwayMessage; + TQValueList m_chatRoomSessions; }; @@ -85,42 +85,42 @@ class AIMAccount : public OscarAccount Q_OBJECT public: - AIMAccount(Kopete::Protocol *parent, QString accountID, const char *name=0L); + AIMAccount(Kopete::Protocol *parent, TQString accountID, const char *name=0L); virtual ~AIMAccount(); // Accessor method for the action menu virtual KActionMenu* actionMenu(); - void setAway(bool away, const QString &awayReason = QString::null ); + void setAway(bool away, const TQString &awayReason = TQString::null ); - virtual void connectWithPassword( const QString &password ); + virtual void connectWithPassword( const TQString &password ); - void setUserProfile(const QString &profile); + void setUserProfile(const TQString &profile); void setPrivacySettings( int privacy ); public slots: /** Reimplementation from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus& status, const QString& reason = QString::null ); + void setOnlineStatus( const Kopete::OnlineStatus& status, const TQString& reason = TQString::null ); void slotEditInfo(); void slotGoOnline(); - void slotGlobalIdentityChanged( const QString&, const QVariant& ); + void slotGlobalIdentityChanged( const TQString&, const TQVariant& ); void slotBuddyIconChanged(); void slotJoinChat(); protected slots: - void slotGoAway(const QString&); + void slotGoAway(const TQString&); void joinChatDialogClosed( int ); virtual void loginActions(); virtual void disconnected( Kopete::Account::DisconnectReason reason ); virtual void messageReceived( const Oscar::Message& message ); - void connectedToChatRoom( WORD exchange, const QString& roomName ); - void userJoinedChat( Oscar::WORD exchange, const QString& room, const QString& contact ); - void userLeftChat( Oscar::WORD exchange, const QString& room, const QString& contact ); + void connectedToChatRoom( WORD exchange, const TQString& roomName ); + void userJoinedChat( Oscar::WORD exchange, const TQString& room, const TQString& contact ); + void userLeftChat( Oscar::WORD exchange, const TQString& room, const TQString& contact ); void slotSetVisiblility(); void slotVisibilityDialogClosed(); @@ -131,9 +131,9 @@ protected: * Implement virtual method from OscarAccount * This allows OscarAccount to take care of adding new contacts */ - OscarContact *createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ); + OscarContact *createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ); - QString sanitizedMessage( const QString& message ); + TQString sanitizedMessage( const TQString& message ); private: // Set privacy tlv item diff --git a/kopete/protocols/oscar/aim/aimchatsession.cpp b/kopete/protocols/oscar/aim/aimchatsession.cpp index fa0616a6..10938a6a 100644 --- a/kopete/protocols/oscar/aim/aimchatsession.cpp +++ b/kopete/protocols/oscar/aim/aimchatsession.cpp @@ -26,7 +26,7 @@ AIMChatSession::AIMChatSession( const Kopete::Contact* user, Kopete::ContactPtrList others, Kopete::Protocol* protocol, Oscar::WORD exchange, - const QString& room ) + const TQString& room ) : Kopete::ChatSession( user, others, protocol, "AIMChatSession" ) { @@ -48,13 +48,13 @@ void AIMChatSession::setEngine( Client* engine ) m_engine = engine; } -QString AIMChatSession::roomName() const +TQString AIMChatSession::roomName() const { return m_roomName; } -void AIMChatSession::setRoomName( const QString& room ) +void AIMChatSession::setRoomName( const TQString& room ) { m_roomName = room; } diff --git a/kopete/protocols/oscar/aim/aimchatsession.h b/kopete/protocols/oscar/aim/aimchatsession.h index 79c0685e..9ce3ce1f 100644 --- a/kopete/protocols/oscar/aim/aimchatsession.h +++ b/kopete/protocols/oscar/aim/aimchatsession.h @@ -30,7 +30,7 @@ Q_OBJECT public: AIMChatSession( const Kopete::Contact* contact, Kopete::ContactPtrList others, Kopete::Protocol* protocol, Oscar::WORD exchange = 0, - const QString& room = QString::null ); + const TQString& room = TQString::null ); virtual ~AIMChatSession(); /** @@ -44,14 +44,14 @@ public: * this ChatSession object * @return the name of the chat room */ - QString roomName() const; + TQString roomName() const; /** * Set the name of the AIM chat room represented by * this ChatSession object * @param room the name of the AIM chat room */ - void setRoomName( const QString& room ); + void setRoomName( const TQString& room ); /** * Get the exchange of the AIM chat room represented by @@ -68,7 +68,7 @@ public: void setExchange( Oscar::WORD exchange ); private: - QString m_roomName; + TQString m_roomName; Oscar::WORD m_exchange; Client* m_engine; }; diff --git a/kopete/protocols/oscar/aim/aimcontact.cpp b/kopete/protocols/oscar/aim/aimcontact.cpp index 7e46c585..fc55537d 100644 --- a/kopete/protocols/oscar/aim/aimcontact.cpp +++ b/kopete/protocols/oscar/aim/aimcontact.cpp @@ -16,10 +16,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -43,8 +43,8 @@ #include "aimcontact.h" #include "aimaccount.h" -AIMContact::AIMContact( Kopete::Account* account, const QString& name, Kopete::MetaContact* parent, - const QString& icon, const Oscar::SSI& ssiItem ) +AIMContact::AIMContact( Kopete::Account* account, const TQString& name, Kopete::MetaContact* parent, + const TQString& icon, const Oscar::SSI& ssiItem ) : OscarContact(account, name, parent, icon, ssiItem ) { mProtocol=static_cast(protocol()); @@ -56,23 +56,23 @@ AIMContact::AIMContact( Kopete::Account* account, const QString& name, Kopete::M m_haveAwayMessage = false; m_mobile = false; // Set the last autoresponse time to the current time yesterday - m_lastAutoresponseTime = QDateTime::currentDateTime().addDays(-1); - - QObject::connect( mAccount->engine(), SIGNAL( receivedUserInfo( const QString&, const UserDetails& ) ), - this, SLOT( userInfoUpdated( const QString&, const UserDetails& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( userIsOffline( const QString& ) ), - this, SLOT( userOffline( const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedAwayMessage( const QString&, const QString& ) ), - this, SLOT( updateAwayMessage( const QString&, const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedProfile( const QString&, const QString& ) ), - this, SLOT( updateProfile( const QString&, const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( userWarned( const QString&, Q_UINT16, Q_UINT16 ) ), - this, SLOT( gotWarning( const QString&, Q_UINT16, Q_UINT16 ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( haveIconForContact( const QString&, QByteArray ) ), - this, SLOT( haveIcon( const QString&, QByteArray ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( iconServerConnected() ), - this, SLOT( requestBuddyIcon() ) ); - QObject::connect( this, SIGNAL( featuresUpdated() ), this, SLOT( updateFeatures() ) ); + m_lastAutoresponseTime = TQDateTime::currentDateTime().addDays(-1); + + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedUserInfo( const TQString&, const UserDetails& ) ), + this, TQT_SLOT( userInfoUpdated( const TQString&, const UserDetails& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( userIsOffline( const TQString& ) ), + this, TQT_SLOT( userOffline( const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ), + this, TQT_SLOT( updateAwayMessage( const TQString&, const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedProfile( const TQString&, const TQString& ) ), + this, TQT_SLOT( updateProfile( const TQString&, const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ), + this, TQT_SLOT( gotWarning( const TQString&, Q_UINT16, Q_UINT16 ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( haveIconForContact( const TQString&, TQByteArray ) ), + this, TQT_SLOT( haveIcon( const TQString&, TQByteArray ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( iconServerConnected() ), + this, TQT_SLOT( requestBuddyIcon() ) ); + TQObject::connect( this, TQT_SIGNAL( featuresUpdated() ), this, TQT_SLOT( updateFeatures() ) ); } AIMContact::~AIMContact() @@ -84,18 +84,18 @@ bool AIMContact::isReachable() return true; } -QPtrList *AIMContact::customContextMenuActions() +TQPtrList *AIMContact::customContextMenuActions() { - QPtrList *actionCollection = new QPtrList(); + TQPtrList *actionCollection = new TQPtrList(); if ( !m_warnUserAction ) { - m_warnUserAction = new KAction( i18n( "&Warn User" ), 0, this, SLOT( warnUser() ), this, "warnAction" ); + m_warnUserAction = new KAction( i18n( "&Warn User" ), 0, this, TQT_SLOT( warnUser() ), this, "warnAction" ); } m_actionVisibleTo = new KToggleAction(i18n("Always &Visible To"), "", 0, - this, SLOT(slotVisibleTo()), this, "actionVisibleTo"); + this, TQT_SLOT(slotVisibleTo()), this, "actionVisibleTo"); m_actionInvisibleTo = new KToggleAction(i18n("Always &Invisible To"), "", 0, - this, SLOT(slotInvisibleTo()), this, "actionInvisibleTo"); + this, TQT_SLOT(slotInvisibleTo()), this, "actionInvisibleTo"); bool on = account()->isConnected(); @@ -117,26 +117,26 @@ QPtrList *AIMContact::customContextMenuActions() return actionCollection; } -const QString AIMContact::awayMessage() +const TQString AIMContact::awayMessage() { return property(mProtocol->awayMessage).value().toString(); } -void AIMContact::setAwayMessage(const QString &message) +void AIMContact::setAwayMessage(const TQString &message) { kdDebug(14152) << k_funcinfo << "Called for '" << contactId() << "', away msg='" << message << "'" << endl; - QString filteredMessage = message; + TQString filteredMessage = message; filteredMessage.replace( - QRegExp(QString::fromLatin1("<[hH][tT][mM][lL].*>(.*)")), - QString::fromLatin1("\\1")); + TQRegExp(TQString::fromLatin1("<[hH][tT][mM][lL].*>(.*)")), + TQString::fromLatin1("\\1")); filteredMessage.replace( - QRegExp(QString::fromLatin1("<[bB][oO][dD][yY].*>(.*)")), - QString::fromLatin1("\\1") ); - QRegExp fontRemover( QString::fromLatin1("<[fF][oO][nN][tT].*>(.*)") ); + TQRegExp(TQString::fromLatin1("<[bB][oO][dD][yY].*>(.*)")), + TQString::fromLatin1("\\1") ); + TQRegExp fontRemover( TQString::fromLatin1("<[fF][oO][nN][tT].*>(.*)") ); fontRemover.setMinimal(true); while ( filteredMessage.find( fontRemover ) != -1 ) - filteredMessage.replace( fontRemover, QString::fromLatin1("\\1") ); + filteredMessage.replace( fontRemover, TQString::fromLatin1("\\1") ); setProperty(mProtocol->awayMessage, filteredMessage); } @@ -162,7 +162,7 @@ void AIMContact::slotUserInfo() m_infoDialog = new AIMUserInfoDialog( this, static_cast( account() ), false, Kopete::UI::Global::mainWidget(), 0 ); if( !m_infoDialog ) return; - connect( m_infoDialog, SIGNAL( finished() ), this, SLOT( closeUserInfoDialog() ) ); + connect( m_infoDialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeUserInfoDialog() ) ); m_infoDialog->show(); if ( mAccount->isConnected() ) { @@ -174,7 +174,7 @@ void AIMContact::slotUserInfo() m_infoDialog->raise(); } -void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& details ) +void AIMContact::userInfoUpdated( const TQString& contact, const UserDetails& details ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -183,7 +183,7 @@ void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& det //if they don't have an SSI alias, make sure we use the capitalization from the //server so their contact id looks all pretty. - QString nickname = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString nickname = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if ( nickname.isEmpty() || Oscar::normalize( nickname ) == Oscar::normalize( contact ) ) setNickName( contact ); @@ -240,13 +240,13 @@ void AIMContact::userInfoUpdated( const QString& contact, const UserDetails& det int time = ( KApplication::random() % 10 ) * 1000; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating buddy icon in " << time/1000 << " seconds" << endl; - QTimer::singleShot( time, this, SLOT( requestBuddyIcon() ) ); + TQTimer::singleShot( time, this, TQT_SLOT( requestBuddyIcon() ) ); } OscarContact::userInfoUpdated( contact, details ); } -void AIMContact::userOnline( const QString& userId ) +void AIMContact::userOnline( const TQString& userId ) { if ( Oscar::normalize( userId ) == Oscar::normalize( contactId() ) ) { @@ -255,7 +255,7 @@ void AIMContact::userOnline( const QString& userId ) } } -void AIMContact::userOffline( const QString& userId ) +void AIMContact::userOffline( const TQString& userId ) { if ( Oscar::normalize( userId ) == Oscar::normalize( contactId() ) ) { @@ -264,7 +264,7 @@ void AIMContact::userOffline( const QString& userId ) } } -void AIMContact::updateAwayMessage( const QString& contact, const QString& message ) +void AIMContact::updateAwayMessage( const TQString& contact, const TQString& message ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -293,7 +293,7 @@ void AIMContact::updateAwayMessage( const QString& contact, const QString& messa emit updatedProfile(); } -void AIMContact::updateProfile( const QString& contact, const QString& profile ) +void AIMContact::updateProfile( const TQString& contact, const TQString& profile ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -302,7 +302,7 @@ void AIMContact::updateProfile( const QString& contact, const QString& profile ) emit updatedProfile(); } -void AIMContact::gotWarning( const QString& contact, Q_UINT16 increase, Q_UINT16 newLevel ) +void AIMContact::gotWarning( const TQString& contact, Q_UINT16 increase, Q_UINT16 newLevel ) { //somebody just got bitchslapped! :O Q_UNUSED( increase ); @@ -322,16 +322,16 @@ void AIMContact::requestBuddyIcon() } } -void AIMContact::haveIcon( const QString& user, QByteArray icon ) +void AIMContact::haveIcon( const TQString& user, TQByteArray icon ) { if ( Oscar::normalize( user ) != Oscar::normalize( contactId() ) ) return; kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Updating icon for " << contactId() << endl; - QImage buddyIcon( icon ); + TQImage buddyIcon( icon ); if ( buddyIcon.isNull() ) { - kdWarning(OSCAR_AIM_DEBUG) << k_funcinfo << "Failed to convert buddy icon to QImage" << endl; + kdWarning(OSCAR_AIM_DEBUG) << k_funcinfo << "Failed to convert buddy icon to TQImage" << endl; return; } @@ -346,8 +346,8 @@ void AIMContact::closeUserInfoDialog() void AIMContact::warnUser() { - QString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); - QString message = i18n( "Would you like to warn %1 anonymously or with your name?
    " \ + TQString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString message = i18n( "Would you like to warn %1 anonymously or with your name?
    " \ "(Warning a user on AIM will result in a \"Warning Level\"" \ " increasing for the user you warn. Once this level has reached a" \ " certain point, they will not be able to sign on. Please do not abuse" \ @@ -377,7 +377,7 @@ void AIMContact::slotInvisibleTo() void AIMContact::slotSendMsg(Kopete::Message& message, Kopete::ChatSession *) { Oscar::Message msg; - QString s; + TQString s; if (message.plainBody().isEmpty()) // no text, do nothing return; @@ -392,56 +392,56 @@ void AIMContact::slotSendMsg(Kopete::Message& message, Kopete::ChatSession *) //font-size:xxpt -> s=message.escapedBody(); - s.replace ( QRegExp( QString::fromLatin1("([^<]*)")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("([^<]*)")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("")); - s.replace ( QRegExp( QString::fromLatin1("")), - QString::fromLatin1("\\2")); + s.replace ( TQRegExp( TQString::fromLatin1("")), + TQString::fromLatin1("\\2")); //okay now change the to //0-9 are size 1 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //10-11 are size 2 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //12-13 are size 3 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //14-16 are size 4 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //17-22 are size 5 - s.replace ( QRegExp ( QString::fromLatin1("")), - QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")), + TQString::fromLatin1("")); //23-29 are size 6 - s.replace ( QRegExp ( QString::fromLatin1("")),QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")),TQString::fromLatin1("")); //30- (and any I missed) are size 7 - s.replace ( QRegExp ( QString::fromLatin1("")),QString::fromLatin1("")); + s.replace ( TQRegExp ( TQString::fromLatin1("")),TQString::fromLatin1("")); - s.replace ( QRegExp ( QString::fromLatin1("")), QString::fromLatin1("
    ") ); + s.replace ( TQRegExp ( TQString::fromLatin1("")), TQString::fromLatin1("
    ") ); // strip left over line break - s.remove( QRegExp( QString::fromLatin1( "
    $" ) ) ); + s.remove( TQRegExp( TQString::fromLatin1( "
    $" ) ) ); kdDebug(14190) << k_funcinfo << "sending " << s << endl; @@ -472,9 +472,9 @@ void AIMContact::updateFeatures() void AIMContact::sendAutoResponse(Kopete::Message& msg) { // The target time is 2 minutes later than the last message - int delta = m_lastAutoresponseTime.secsTo( QDateTime::currentDateTime() ); + int delta = m_lastAutoresponseTime.secsTo( TQDateTime::currentDateTime() ); kdDebug(14152) << k_funcinfo << "Last autoresponse time: " << m_lastAutoresponseTime << endl; - kdDebug(14152) << k_funcinfo << "Current time: " << QDateTime::currentDateTime() << endl; + kdDebug(14152) << k_funcinfo << "Current time: " << TQDateTime::currentDateTime() << endl; kdDebug(14152) << k_funcinfo << "Difference: " << delta << endl; // Check to see if we're past that time if(delta > 120) @@ -491,7 +491,7 @@ void AIMContact::sendAutoResponse(Kopete::Message& msg) } else { - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); message.setText( Oscar::Message::UserDefined, msg.plainBody(), codec ); } @@ -506,7 +506,7 @@ void AIMContact::sendAutoResponse(Kopete::Message& msg) manager(Kopete::Contact::CanCreate)->appendMessage(msg); manager(Kopete::Contact::CanCreate)->messageSucceeded(); // Update the last autoresponse time - m_lastAutoresponseTime = QDateTime::currentDateTime(); + m_lastAutoresponseTime = TQDateTime::currentDateTime(); } else { diff --git a/kopete/protocols/oscar/aim/aimcontact.h b/kopete/protocols/oscar/aim/aimcontact.h index 458db2f5..a246c029 100644 --- a/kopete/protocols/oscar/aim/aimcontact.h +++ b/kopete/protocols/oscar/aim/aimcontact.h @@ -18,7 +18,7 @@ #ifndef AIMCONTACT_H #define AIMCONTACT_H -#include +#include #include "oscarcontact.h" @@ -37,25 +37,25 @@ class AIMContact : public OscarContact Q_OBJECT public: - AIMContact( Kopete::Account*, const QString&, Kopete::MetaContact*, - const QString& icon = QString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); + AIMContact( Kopete::Account*, const TQString&, Kopete::MetaContact*, + const TQString& icon = TQString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); virtual ~AIMContact(); bool isReachable(); - QPtrList *customContextMenuActions(); + TQPtrList *customContextMenuActions(); - const QString &userProfile() { return mUserProfile; } + const TQString &userProfile() { return mUserProfile; } - virtual const QString awayMessage(); - virtual void setAwayMessage( const QString &message ); + virtual const TQString awayMessage(); + virtual void setAwayMessage( const TQString &message ); int warningLevel() const; /** * Gets the last time an autoresponse was sent to this contact - * @returns QDateTime Object that represents the date/time + * @returns TQDateTime Object that represents the date/time */ - QDateTime lastAutoResponseTime() {return m_lastAutoresponseTime;} + TQDateTime lastAutoResponseTime() {return m_lastAutoresponseTime;} /** Sends an auto response to this contact */ virtual void sendAutoResponse(Kopete::Message& msg); @@ -63,12 +63,12 @@ public: public slots: void updateSSIItem(); void slotUserInfo(); - void userInfoUpdated( const QString& contact, const UserDetails& details ); - void userOnline( const QString& userId ); - void userOffline( const QString& userId ); - void updateAwayMessage( const QString& userId, const QString& message ); - void updateProfile( const QString& contact, const QString& profile ); - void gotWarning( const QString& contact, Q_UINT16, Q_UINT16 ); + void userInfoUpdated( const TQString& contact, const UserDetails& details ); + void userOnline( const TQString& userId ); + void userOffline( const TQString& userId ); + void updateAwayMessage( const TQString& userId, const TQString& message ); + void updateProfile( const TQString& contact, const TQString& profile ); + void gotWarning( const TQString& contact, Q_UINT16, Q_UINT16 ); signals: void updatedProfile(); @@ -79,7 +79,7 @@ protected slots: private slots: void requestBuddyIcon(); - void haveIcon( const QString&, QByteArray ); + void haveIcon( const TQString&, TQByteArray ); void closeUserInfoDialog(); void warnUser(); @@ -89,10 +89,10 @@ private slots: private: AIMProtocol* mProtocol; AIMUserInfoDialog* m_infoDialog; - QString mUserProfile; + TQString mUserProfile; bool m_haveAwayMessage; bool m_mobile; // Is this user mobile (i.e. do they have message forwarding on, or mobile AIM) - QDateTime m_lastAutoresponseTime; + TQDateTime m_lastAutoresponseTime; KAction* m_warnUserAction; KToggleAction *m_actionVisibleTo; diff --git a/kopete/protocols/oscar/aim/aimjoinchat.cpp b/kopete/protocols/oscar/aim/aimjoinchat.cpp index 8b8c78a9..2ccec9b2 100644 --- a/kopete/protocols/oscar/aim/aimjoinchat.cpp +++ b/kopete/protocols/oscar/aim/aimjoinchat.cpp @@ -19,15 +19,15 @@ #include "aimjoinchat.h" -#include -#include +#include +#include #include #include "aimjoinchatbase.h" #include "aimaccount.h" AIMJoinChatUI::AIMJoinChatUI( AIMAccount* account, bool modal, - QWidget* parent, const char* name ) + TQWidget* parent, const char* name ) : KDialogBase( parent, name, modal, i18n( "Join AIM Chat Room" ), Cancel | User1, User1, true, i18n( "Join" ) ) { @@ -41,8 +41,8 @@ AIMJoinChatUI::AIMJoinChatUI( AIMAccount* account, bool modal, setMainWidget( m_joinUI ); - QObject::connect( this, SIGNAL( user1Clicked() ), this, SLOT( joinChat() ) ); - QObject::connect( this, SIGNAL( cancelClicked() ), this, SLOT( closeClicked() ) ); + TQObject::connect( this, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT( joinChat() ) ); + TQObject::connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( closeClicked() ) ); } AIMJoinChatUI::~AIMJoinChatUI() @@ -50,14 +50,14 @@ AIMJoinChatUI::~AIMJoinChatUI() m_exchanges.clear(); } -void AIMJoinChatUI::setExchangeList( const QValueList& list ) +void AIMJoinChatUI::setExchangeList( const TQValueList& list ) { m_exchanges = list; - QStringList exchangeList; - QValueList::const_iterator it = list.begin(); + TQStringList exchangeList; + TQValueList::const_iterator it = list.begin(); while ( it != list.end() ) { - exchangeList.append( QString::number( ( *it ) ) ); + exchangeList.append( TQString::number( ( *it ) ) ); ++it; } @@ -71,21 +71,21 @@ void AIMJoinChatUI::joinChat() int item = m_joinUI->exchange->currentItem(); m_exchange = m_joinUI->exchange->text( item ); - emit closing( QDialog::Accepted ); + emit closing( TQDialog::Accepted ); } void AIMJoinChatUI::closeClicked() { //hmm, do nothing? - emit closing( QDialog::Rejected ); + emit closing( TQDialog::Rejected ); } -QString AIMJoinChatUI::roomName() const +TQString AIMJoinChatUI::roomName() const { return m_roomName; } -QString AIMJoinChatUI::exchange() const +TQString AIMJoinChatUI::exchange() const { return m_exchange; } diff --git a/kopete/protocols/oscar/aim/aimjoinchat.h b/kopete/protocols/oscar/aim/aimjoinchat.h index dc74a8a9..a6e493d4 100644 --- a/kopete/protocols/oscar/aim/aimjoinchat.h +++ b/kopete/protocols/oscar/aim/aimjoinchat.h @@ -31,15 +31,15 @@ class AIMJoinChatUI : public KDialogBase { Q_OBJECT public: - AIMJoinChatUI( AIMAccount*, bool modal, QWidget* parent = 0, + AIMJoinChatUI( AIMAccount*, bool modal, TQWidget* parent = 0, const char* name = 0 ); ~AIMJoinChatUI(); - void setExchangeList( const QValueList& ); - QValueList exchangeList() const; + void setExchangeList( const TQValueList& ); + TQValueList exchangeList() const; - QString roomName() const; - QString exchange() const; + TQString roomName() const; + TQString exchange() const; protected slots: @@ -52,9 +52,9 @@ signals: private: AIMJoinChatBase* m_joinUI; AIMAccount* m_account; - QValueList m_exchanges; - QString m_roomName; - QString m_exchange; + TQValueList m_exchanges; + TQString m_roomName; + TQString m_exchange; }; diff --git a/kopete/protocols/oscar/aim/aimprotocol.cpp b/kopete/protocols/oscar/aim/aimprotocol.cpp index 9f64fe28..779c63c8 100644 --- a/kopete/protocols/oscar/aim/aimprotocol.cpp +++ b/kopete/protocols/oscar/aim/aimprotocol.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include +#include #include #include #include @@ -46,7 +46,7 @@ AIMProtocol* AIMProtocol::protocolStatic_ = 0L; AIMProtocolHandler::AIMProtocolHandler() : Kopete::MimeTypeHandler(false) { - registerAsProtocolHandler(QString::fromLatin1("aim")); + registerAsProtocolHandler(TQString::fromLatin1("aim")); } void AIMProtocolHandler::handleURL(const KURL &url) const @@ -78,8 +78,8 @@ void AIMProtocolHandler::handleURL(const KURL &url) const AIMProtocol *proto = AIMProtocol::protocol(); kdDebug(14152) << k_funcinfo << "URL url : '" << url.url() << "'" << endl; kdDebug(14152) << k_funcinfo << "URL path : '" << url.path() << "'" << endl; - QString command = url.path(); - QString realCommand, firstParam, secondParam; + TQString command = url.path(); + TQString realCommand, firstParam, secondParam; bool needContactAddition = false; if ( command.find( "goim", 0, false ) != -1 ) { @@ -150,11 +150,11 @@ void AIMProtocolHandler::handleURL(const KURL &url) const } Kopete::Account *account = 0; - QDict accounts = Kopete::AccountManager::self()->accounts(proto); + TQDict accounts = Kopete::AccountManager::self()->accounts(proto); if (accounts.count() == 1) { - QDictIterator it(accounts); + TQDictIterator it(accounts); account = it.current(); } @@ -170,7 +170,7 @@ void AIMProtocolHandler::handleURL(const KURL &url) const account = accSelector->selectedItem(); delete chooser; - if (ret == QDialog::Rejected || account == 0) + if (ret == TQDialog::Rejected || account == 0) { kdDebug(14152) << k_funcinfo << "Cancelled" << endl; return; @@ -190,7 +190,7 @@ void AIMProtocolHandler::handleURL(const KURL &url) const if (KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(), i18n("Do you want to add '%1' to your contact list?").arg(command), - QString::null, i18n("Add"), i18n("Do Not Add")) + TQString::null, i18n("Add"), i18n("Do Not Add")) != KMessageBox::Yes) { kdDebug(14152) << k_funcinfo << "Cancelled" << endl; @@ -213,7 +213,7 @@ void AIMProtocolHandler::handleURL(const KURL &url) const KMessageBox::sorry( Kopete::UI::Global::mainWidget(), i18n( "Unable to connect to the chat room %1 because the account" " for %2 is not connected." ).arg( firstParam ).arg( aimAccount->accountId() ), - QString::null ); + TQString::null ); } @@ -227,21 +227,21 @@ void AIMProtocolHandler::handleURL(const KURL &url) const -AIMProtocol::AIMProtocol(QObject *parent, const char *name, const QStringList &) +AIMProtocol::AIMProtocol(TQObject *parent, const char *name, const TQStringList &) : Kopete::Protocol( AIMProtocolFactory::instance(), parent, name ), - statusOnline( Kopete::OnlineStatus::Online, 2, this, 0, QString::null, i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online ), - statusOffline( Kopete::OnlineStatus::Offline, 2, this, 10, QString::null, i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline ), + statusOnline( Kopete::OnlineStatus::Online, 2, this, 0, TQString::null, i18n("Online"), i18n("Online"), Kopete::OnlineStatusManager::Online ), + statusOffline( Kopete::OnlineStatus::Offline, 2, this, 10, TQString::null, i18n("Offline"), i18n("Offline"), Kopete::OnlineStatusManager::Offline ), statusAway( Kopete::OnlineStatus::Away, 2, this, 20, "contact_away_overlay", i18n("Away"), i18n("Away"), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HasAwayMessage ), statusWirelessOnline( Kopete::OnlineStatus::Online, 1, this, 30, "contact_phone_overlay", i18n("Mobile"), i18n("Mobile"), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HideFromMenu ), - statusWirelessAway( Kopete::OnlineStatus::Away, 1, this, 31, QStringList::split( " ", "contact_phone_overlay contact_away_overlay"), + statusWirelessAway( Kopete::OnlineStatus::Away, 1, this, 31, TQStringList::split( " ", "contact_phone_overlay contact_away_overlay"), i18n("Mobile Away"), i18n("Mobile Away"), Kopete::OnlineStatusManager::Away, Kopete::OnlineStatusManager::HideFromMenu ), statusConnecting(Kopete::OnlineStatus::Connecting, 99, this, 99, "aim_connecting", i18n("Connecting...")), awayMessage(Kopete::Global::Properties::self()->awayMessage()), clientFeatures("clientFeatures", i18n("Client Features"), 0, false), clientProfile( "clientProfile", i18n( "User Profile"), 0, false, true), - iconHash("iconHash", i18n("Buddy Icon MD5 Hash"), QString::null, true, false, true) + iconHash("iconHash", i18n("Buddy Icon MD5 Hash"), TQString::null, true, false, true) { if (protocolStatic_) kdDebug(14152) << k_funcinfo << "AIM plugin already initialized" << endl; @@ -265,28 +265,28 @@ AIMProtocol *AIMProtocol::protocol(void) } Kopete::Contact *AIMProtocol::deserializeContact(Kopete::MetaContact *metaContact, - const QMap &serializedData, - const QMap &/*addressBookData*/) + const TQMap &serializedData, + const TQMap &/*addressBookData*/) { - QString contactId = serializedData["contactId"]; - QString accountId = serializedData["accountId"]; - QString displayName = serializedData["displayName"]; + TQString contactId = serializedData["contactId"]; + TQString accountId = serializedData["accountId"]; + TQString displayName = serializedData["displayName"]; // Get the account it belongs to - QDict accounts = Kopete::AccountManager::self()->accounts( this ); + TQDict accounts = Kopete::AccountManager::self()->accounts( this ); Kopete::Account *account = accounts[accountId]; if ( !account ) //no account return 0; uint ssiGid = 0, ssiBid = 0, ssiType = 0xFFFF; - QString ssiName; + TQString ssiName; bool ssiWaitingAuth = false; if ( serializedData.contains( "ssi_type" ) ) { ssiName = serializedData["ssi_name"]; - QString authStatus = serializedData["ssi_waitingAuth"]; + TQString authStatus = serializedData["ssi_waitingAuth"]; if ( authStatus == "true" ) ssiWaitingAuth = true; ssiGid = serializedData["ssi_gid"].toUInt(); @@ -294,24 +294,24 @@ Kopete::Contact *AIMProtocol::deserializeContact(Kopete::MetaContact *metaContac ssiType = serializedData["ssi_type"].toUInt(); } - Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, QValueList(), 0 ); + Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, TQValueList(), 0 ); item.setWaitingAuth( ssiWaitingAuth ); - AIMContact *c = new AIMContact( account, contactId, metaContact, QString::null, item ); + AIMContact *c = new AIMContact( account, contactId, metaContact, TQString::null, item ); return c; } -AddContactPage *AIMProtocol::createAddContactWidget(QWidget *parent, Kopete::Account *account) +AddContactPage *AIMProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *account) { return ( new AIMAddContactPage( account->isConnected(), parent ) ); } -KopeteEditAccountWidget *AIMProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *AIMProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return ( new AIMEditAccountWidget( this, account, parent ) ); } -Kopete::Account *AIMProtocol::createNewAccount(const QString &accountId) +Kopete::Account *AIMProtocol::createNewAccount(const TQString &accountId) { return ( new AIMAccount( this, accountId ) ); } diff --git a/kopete/protocols/oscar/aim/aimprotocol.h b/kopete/protocols/oscar/aim/aimprotocol.h index e6c578e6..16c8860a 100644 --- a/kopete/protocols/oscar/aim/aimprotocol.h +++ b/kopete/protocols/oscar/aim/aimprotocol.h @@ -23,7 +23,7 @@ #include "kopetemimetypehandler.h" #include "kopeteonlinestatus.h" -#include +#include namespace Kopete { @@ -42,7 +42,7 @@ class AIMProtocol : public Kopete::Protocol Q_OBJECT public: - AIMProtocol( QObject *parent, const char *name, const QStringList &args ); + AIMProtocol( TQObject *parent, const char *name, const TQStringList &args ); virtual ~AIMProtocol(); /** * Return the active instance of the protocol @@ -53,12 +53,12 @@ public: bool canSendOffline() const { return false; } virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap &serializedData, - const QMap &addressBookData ); + const TQMap &serializedData, + const TQMap &addressBookData ); - AddContactPage*createAddContactWidget( QWidget *parent, Kopete::Account *account ); - KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account *account, QWidget *parent ); - Kopete::Account* createNewAccount( const QString &accountId ); + AddContactPage*createAddContactWidget( TQWidget *parent, Kopete::Account *account ); + KopeteEditAccountWidget* createEditAccountWidget( Kopete::Account *account, TQWidget *parent ); + Kopete::Account* createNewAccount( const TQString &accountId ); /** * The set of online statuses that AIM contacts can have diff --git a/kopete/protocols/oscar/aim/aimuserinfo.cpp b/kopete/protocols/oscar/aim/aimuserinfo.cpp index 81bdd9c7..927a12ec 100644 --- a/kopete/protocols/oscar/aim/aimuserinfo.cpp +++ b/kopete/protocols/oscar/aim/aimuserinfo.cpp @@ -21,11 +21,11 @@ #include "aimcontact.h" #include "aimprotocol.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -37,7 +37,7 @@ #include AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool modal, - QWidget *parent, const char* name ) + TQWidget *parent, const char* name ) : KDialogBase( parent, name, modal, i18n( "User Information on %1" ) .arg( c->property( Kopete::Global::Properties::self()->nickName() ).value().toString() ), Cancel | Ok , Ok, true ) @@ -50,14 +50,14 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool mMainWidget = new AIMUserInfoWidget(this, "aimuserinfowidget"); setMainWidget(mMainWidget); - QObject::connect(this, SIGNAL(okClicked()), this, SLOT(slotSaveClicked())); - QObject::connect(this, SIGNAL(user1Clicked()), this, SLOT(slotUpdateClicked())); - QObject::connect(this, SIGNAL(cancelClicked()), this, SLOT(slotCloseClicked())); - QObject::connect(c, SIGNAL(updatedProfile()), this, SLOT(slotUpdateProfile())); + TQObject::connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotSaveClicked())); + TQObject::connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotUpdateClicked())); + TQObject::connect(this, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(slotCloseClicked())); + TQObject::connect(c, TQT_SIGNAL(updatedProfile()), this, TQT_SLOT(slotUpdateProfile())); mMainWidget->txtScreenName->setText( c->contactId() ); - QString nickName = c->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString nickName = c->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if( nickName.isEmpty() ) mMainWidget->txtNickName->setText( c->contactId() ); else @@ -75,9 +75,9 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool mMainWidget->lblAwayMessage->hide(); userInfoView=0L; - mMainWidget->userInfoFrame->setFrameStyle(QFrame::NoFrame | QFrame::Plain); - QVBoxLayout *l = new QVBoxLayout(mMainWidget->userInfoFrame); - userInfoEdit = new KTextEdit(QString::null, QString::null, + mMainWidget->userInfoFrame->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain); + TQVBoxLayout *l = new TQVBoxLayout(mMainWidget->userInfoFrame); + userInfoEdit = new KTextEdit(TQString::null, TQString::null, mMainWidget->userInfoFrame, "userInfoEdit"); userInfoEdit->setTextFormat(PlainText); @@ -85,7 +85,7 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool if ( aimmc ) userInfoEdit->setText( aimmc->userProfile() ); else - userInfoEdit->setText( QString::null ); + userInfoEdit->setText( TQString::null ); setButtonText(Ok, i18n("&Save Profile")); showButton(User1, false); @@ -94,17 +94,17 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool else { userInfoEdit=0L; - mMainWidget->userInfoFrame->setFrameStyle(QFrame::NoFrame | QFrame::Plain); - QVBoxLayout *l = new QVBoxLayout(mMainWidget->userInfoFrame); + mMainWidget->userInfoFrame->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain); + TQVBoxLayout *l = new TQVBoxLayout(mMainWidget->userInfoFrame); userInfoView = new KTextBrowser(mMainWidget->userInfoFrame, "userInfoView"); userInfoView->setTextFormat(AutoText); userInfoView->setNotifyClick(true); - QObject::connect( - userInfoView, SIGNAL(urlClick(const QString&)), - this, SLOT(slotUrlClicked(const QString&))); - QObject::connect( - userInfoView, SIGNAL(mailClick(const QString&, const QString&)), - this, SLOT(slotMailClicked(const QString&, const QString&))); + TQObject::connect( + userInfoView, TQT_SIGNAL(urlClick(const TQString&)), + this, TQT_SLOT(slotUrlClicked(const TQString&))); + TQObject::connect( + userInfoView, TQT_SIGNAL(mailClick(const TQString&, const TQString&)), + this, TQT_SLOT(slotMailClicked(const TQString&, const TQString&))); showButton(Cancel, false); setButtonText(Ok, i18n("&Close")); setEscapeButton(Ok); @@ -115,7 +115,7 @@ AIMUserInfoDialog::AIMUserInfoDialog( Kopete::Contact *c, AIMAccount *acc, bool // Update the user view to indicate that we're requesting the user's profile userInfoView->setText(i18n("Requesting User Profile, please wait...")); } - QTimer::singleShot(0, this, SLOT(slotUpdateProfile())); + TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateProfile())); } } @@ -127,8 +127,8 @@ AIMUserInfoDialog::~AIMUserInfoDialog() void AIMUserInfoDialog::slotUpdateClicked() { kdDebug(14200) << k_funcinfo << "Called." << endl; - QString newNick = mMainWidget->txtNickName->text(); - QString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString newNick = mMainWidget->txtNickName->text(); + TQString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if ( !newNick.isEmpty() && ( newNick != currentNick ) ) { //m_contact->rename(newNick); @@ -144,8 +144,8 @@ void AIMUserInfoDialog::slotSaveClicked() if (userInfoEdit) { // editable mode, set profile - QString newNick = mMainWidget->txtNickName->text(); - QString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); + TQString newNick = mMainWidget->txtNickName->text(); + TQString currentNick = m_contact->property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if(!newNick.isEmpty() && ( newNick != currentNick ) ) { //m_contact->rename(newNick); @@ -169,7 +169,7 @@ void AIMUserInfoDialog::slotUpdateProfile() { kdDebug(14152) << k_funcinfo << "Got User Profile." << endl; AIMProtocol* p = static_cast( mAccount->protocol() ); - QString awayMessage = m_contact->property( p->awayMessage ).value().toString(); + TQString awayMessage = m_contact->property( p->awayMessage ).value().toString(); mMainWidget->txtAwayMessage->setText( awayMessage ); if ( awayMessage.isNull() ) @@ -183,15 +183,15 @@ void AIMUserInfoDialog::slotUpdateProfile() mMainWidget->lblAwayMessage->show(); } - QString onlineSince = m_contact->property("onlineSince").value().toString(); - //QString onlineSince = m_details.onlineSinceTime().toString(); + TQString onlineSince = m_contact->property("onlineSince").value().toString(); + //TQString onlineSince = m_details.onlineSinceTime().toString(); mMainWidget->txtOnlineSince->setText( onlineSince ); AIMContact* c = static_cast( m_contact ); mMainWidget->txtIdleTime->setText(c->formattedIdleTime()); - mMainWidget->txtWarnLevel->setText(QString::number(c->warningLevel())); + mMainWidget->txtWarnLevel->setText(TQString::number(c->warningLevel())); - QString contactProfile = m_contact->property( p->clientProfile ).value().toString(); + TQString contactProfile = m_contact->property( p->clientProfile ).value().toString(); if ( contactProfile.isNull() ) { contactProfile = @@ -209,12 +209,12 @@ void AIMUserInfoDialog::slotUpdateProfile() } -void AIMUserInfoDialog::slotUrlClicked(const QString &url) +void AIMUserInfoDialog::slotUrlClicked(const TQString &url) { new KRun(KURL(url)); } -void AIMUserInfoDialog::slotMailClicked(const QString&, const QString &address) +void AIMUserInfoDialog::slotMailClicked(const TQString&, const TQString &address) { new KRun(KURL(address)); } diff --git a/kopete/protocols/oscar/aim/aimuserinfo.h b/kopete/protocols/oscar/aim/aimuserinfo.h index f128610f..886274ac 100644 --- a/kopete/protocols/oscar/aim/aimuserinfo.h +++ b/kopete/protocols/oscar/aim/aimuserinfo.h @@ -32,7 +32,7 @@ class AIMUserInfoDialog : public KDialogBase Q_OBJECT public: AIMUserInfoDialog(Kopete::Contact *c, AIMAccount *acc, bool modal, - QWidget *parent, const char* name); + TQWidget *parent, const char* name); ~AIMUserInfoDialog(); private: @@ -47,11 +47,11 @@ class AIMUserInfoDialog : public KDialogBase void slotCloseClicked(); void slotUpdateClicked(); void slotUpdateProfile(); - void slotUrlClicked(const QString&); - void slotMailClicked(const QString&, const QString&); + void slotUrlClicked(const TQString&); + void slotMailClicked(const TQString&, const TQString&); signals: -// void updateNickname(const QString &); +// void updateNickname(const TQString &); void closing(); }; diff --git a/kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp b/kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp index cf5fbae5..f00741c9 100644 --- a/kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp +++ b/kopete/protocols/oscar/aim/ui/aimaddcontactpage.cpp @@ -20,17 +20,17 @@ #include "kopeteaccount.h" -#include -#include +#include +#include #include #include -AIMAddContactPage::AIMAddContactPage(bool connected, QWidget *parent, +AIMAddContactPage::AIMAddContactPage(bool connected, TQWidget *parent, const char *name ) : AddContactPage(parent,name) { m_gui = 0; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); if(connected) { @@ -39,8 +39,8 @@ AIMAddContactPage::AIMAddContactPage(bool connected, QWidget *parent, } else { - noaddMsg1 = new QLabel(i18n("You need to be connected to be able to add contacts."), this); - noaddMsg2 = new QLabel(i18n("Connect to the AIM network and try again."), this); + noaddMsg1 = new TQLabel(i18n("You need to be connected to be able to add contacts."), this); + noaddMsg2 = new TQLabel(i18n("Connect to the AIM network and try again."), this); canadd = false; } } @@ -58,7 +58,7 @@ bool AIMAddContactPage::validateData() if ( !m_gui ) return false; - QString sn = m_gui->addSN->text(); + TQString sn = m_gui->addSN->text(); if ( sn.isEmpty() ) { KMessageBox::sorry ( this, diff --git a/kopete/protocols/oscar/aim/ui/aimaddcontactpage.h b/kopete/protocols/oscar/aim/ui/aimaddcontactpage.h index 979d0472..7f6c732d 100644 --- a/kopete/protocols/oscar/aim/ui/aimaddcontactpage.h +++ b/kopete/protocols/oscar/aim/ui/aimaddcontactpage.h @@ -2,8 +2,8 @@ #ifndef AIMADDCONTACTPAGE_H #define AIMADDCONTACTPAGE_H -#include -#include +#include +#include #include "addcontactpage.h" class aimAddContactUI; @@ -19,7 +19,7 @@ class AIMAddContactPage : public AddContactPage Q_OBJECT public: - AIMAddContactPage(bool connected, QWidget *parent=0, + AIMAddContactPage(bool connected, TQWidget *parent=0, const char *name=0); ~AIMAddContactPage(); @@ -31,8 +31,8 @@ public: protected: /** The actual GUI */ aimAddContactUI *m_gui; - QLabel *noaddMsg1; - QLabel *noaddMsg2; + TQLabel *noaddMsg1; + TQLabel *noaddMsg2; bool canadd; }; #endif diff --git a/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp b/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp index de720e17..2e0100ab 100644 --- a/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp +++ b/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.cpp @@ -1,12 +1,12 @@ #include "aimeditaccountwidget.h" #include "aimeditaccountui.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -20,8 +20,8 @@ #include "aimaccount.h" AIMEditAccountWidget::AIMEditAccountWidget( AIMProtocol *protocol, - Kopete::Account *account, QWidget *parent, const char *name ) - : QWidget( parent, name ), KopeteEditAccountWidget( account ) + Kopete::Account *account, TQWidget *parent, const char *name ) + : TQWidget( parent, name ), KopeteEditAccountWidget( account ) { //kdDebug(14152) << k_funcinfo << "Called." << endl; @@ -29,7 +29,7 @@ AIMEditAccountWidget::AIMEditAccountWidget( AIMProtocol *protocol, mProtocol = protocol; // create the gui (generated from a .ui file) - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); mGui = new aimEditAccountUI( this, "AIMEditAccountWidget::mGui" ); // Read in the settings from the account if it exists @@ -40,7 +40,7 @@ AIMEditAccountWidget::AIMEditAccountWidget( AIMProtocol *protocol, //Remove me after we can change Account IDs (Matt) mGui->edtAccountId->setDisabled( true ); mGui->mAutoLogon->setChecked( account->excludeConnect() ); - QString serverEntry = account->configGroup()->readEntry( "Server", "login.oscar.aol.com" ); + TQString serverEntry = account->configGroup()->readEntry( "Server", "login.oscar.aol.com" ); int portEntry = account->configGroup()->readNumEntry( "Port", 5190 ); if ( serverEntry != "login.oscar.aol.com" || portEntry != 5190 ) mGui->optionOverrideServer->setChecked( true ); @@ -80,12 +80,12 @@ AIMEditAccountWidget::AIMEditAccountWidget( AIMProtocol *protocol, // Global Identity mGui->mGlobalIdentity->setChecked( account->configGroup()->readBoolEntry("ExcludeGlobalIdentity", false) ); } - QObject::connect( mGui->buttonRegister, SIGNAL( clicked() ), this, SLOT( slotOpenRegister() ) ); + TQObject::connect( mGui->buttonRegister, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOpenRegister() ) ); /* Set tab order to password custom widget correctly */ - QWidget::setTabOrder( mGui->edtAccountId, mGui->mPasswordWidget->mRemembered ); - QWidget::setTabOrder( mGui->mPasswordWidget->mRemembered, mGui->mPasswordWidget->mPassword ); - QWidget::setTabOrder( mGui->mPasswordWidget->mPassword, mGui->mAutoLogon ); + TQWidget::setTabOrder( mGui->edtAccountId, mGui->mPasswordWidget->mRemembered ); + TQWidget::setTabOrder( mGui->mPasswordWidget->mRemembered, mGui->mPasswordWidget->mPassword ); + TQWidget::setTabOrder( mGui->mPasswordWidget->mPassword, mGui->mAutoLogon ); } AIMEditAccountWidget::~AIMEditAccountWidget() @@ -99,7 +99,7 @@ Kopete::Account *AIMEditAccountWidget::apply() if ( !mAccount ) { kdDebug( 14152 ) << k_funcinfo << "creating a new account" << endl; - QString newId = mGui->edtAccountId->text(); + TQString newId = mGui->edtAccountId->text(); mAccount = new AIMAccount( mProtocol, newId ); } @@ -145,8 +145,8 @@ bool AIMEditAccountWidget::validateData() { //kdDebug(14152) << k_funcinfo << "Called." << endl; - QString userName = mGui->edtAccountId->text(); - QString server = mGui->edtServerAddress->text(); + TQString userName = mGui->edtAccountId->text(); + TQString server = mGui->edtServerAddress->text(); int port = mGui->sbxServerPort->value(); if ( userName.length() < 1 ) diff --git a/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h b/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h index ccb2b451..9f180315 100644 --- a/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h +++ b/kopete/protocols/oscar/aim/ui/aimeditaccountwidget.h @@ -19,7 +19,7 @@ #ifndef AIMEDITACCOUNTWIDGET_H #define AIMEDITACCOUNTWIDGET_H -#include +#include #include "editaccountwidget.h" /** * @author Chris TenHarmsel @@ -34,13 +34,13 @@ class AIMAccount; class AIMProtocol; class aimEditAccountUI; -class AIMEditAccountWidget : public QWidget, public KopeteEditAccountWidget +class AIMEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT public: AIMEditAccountWidget(AIMProtocol *protocol, Kopete::Account *account, - QWidget *parent=0, const char *name=0); + TQWidget *parent=0, const char *name=0); virtual ~AIMEditAccountWidget(); virtual bool validateData(); diff --git a/kopete/protocols/oscar/icq/icqaccount.cpp b/kopete/protocols/oscar/icq/icqaccount.cpp index 9a071442..7e358346 100644 --- a/kopete/protocols/oscar/icq/icqaccount.cpp +++ b/kopete/protocols/oscar/icq/icqaccount.cpp @@ -15,7 +15,7 @@ ************************************************************************* */ -#include +#include #include #include @@ -43,21 +43,21 @@ ICQMyselfContact::ICQMyselfContact( ICQAccount *acct ) : OscarMyselfContact( acct ) { - QObject::connect( acct->engine(), SIGNAL( loggedIn() ), this, SLOT( fetchShortInfo() ) ); - QObject::connect( acct->engine(), SIGNAL( receivedIcqShortInfo( const QString& ) ), - this, SLOT( receivedShortInfo( const QString& ) ) ); + TQObject::connect( acct->engine(), TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( fetchShortInfo() ) ); + TQObject::connect( acct->engine(), TQT_SIGNAL( receivedIcqShortInfo( const TQString& ) ), + this, TQT_SLOT( receivedShortInfo( const TQString& ) ) ); } void ICQMyselfContact::userInfoUpdated() { DWORD extendedStatus = details().extendedStatus(); - kdDebug( OSCAR_ICQ_DEBUG ) << k_funcinfo << "extendedStatus is " << QString::number( extendedStatus, 16 ) << endl; + kdDebug( OSCAR_ICQ_DEBUG ) << k_funcinfo << "extendedStatus is " << TQString::number( extendedStatus, 16 ) << endl; ICQ::Presence presence = ICQ::Presence::fromOscarStatus( extendedStatus & 0xffff ); setOnlineStatus( presence.toOnlineStatus() ); setProperty( Kopete::Global::Properties::self()->awayMessage(), static_cast( account() )->engine()->statusMessage() ); } -void ICQMyselfContact::receivedShortInfo( const QString& contact ) +void ICQMyselfContact::receivedShortInfo( const TQString& contact ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -74,7 +74,7 @@ void ICQMyselfContact::fetchShortInfo() static_cast( account() )->engine()->requestShortInfo( contactId() ); } -ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID, const char *name) +ICQAccount::ICQAccount(Kopete::Protocol *parent, TQString accountID, const char *name) : OscarAccount(parent, accountID, name, true) { kdDebug(14152) << k_funcinfo << accountID << ": Called."<< endl; @@ -83,15 +83,15 @@ ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID, const char * m_visibilityDialog = 0; - QString nickName = configGroup()->readEntry("NickName", QString::null); + TQString nickName = configGroup()->readEntry("NickName", TQString::null); mWebAware = configGroup()->readBoolEntry( "WebAware", false ); mHideIP = configGroup()->readBoolEntry( "HideIP", true ); - mInitialStatusMessage = QString::null; + mInitialStatusMessage = TQString::null; - QObject::connect( Kopete::ContactList::self(), SIGNAL( globalIdentityChanged( const QString&, const QVariant& ) ), - this, SLOT( slotGlobalIdentityChanged( const QString&, const QVariant& ) ) ); + TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( globalIdentityChanged( const TQString&, const TQVariant& ) ), + this, TQT_SLOT( slotGlobalIdentityChanged( const TQString&, const TQVariant& ) ) ); - QObject::connect( this, SIGNAL( buddyIconChanged() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( this, TQT_SIGNAL( buddyIconChanged() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); //setIgnoreUnknownContacts(pluginData(protocol(), "IgnoreUnknownContacts").toUInt() == 1); @@ -100,7 +100,7 @@ ICQAccount::ICQAccount(Kopete::Protocol *parent, QString accountID, const char * { kdDebug(14153) << k_funcinfo << "sending status to reflect HideIP and WebAware settings" << endl; - //setStatus(mStatus, QString::null); + //setStatus(mStatus, TQString::null); }*/ } @@ -129,21 +129,21 @@ KActionMenu* ICQAccount::actionMenu() KToggleAction* actionInvisible = new KToggleAction( i18n( "In&visible" ), ICQ::Presence( presence().type(), ICQ::Presence::Invisible ).toOnlineStatus().iconFor( this ), - 0, this, SLOT( slotToggleInvisible() ), this ); + 0, this, TQT_SLOT( slotToggleInvisible() ), this ); actionInvisible->setChecked( presence().visibility() == ICQ::Presence::Invisible ); actionMenu->insert( actionInvisible ); actionMenu->popupMenu()->insertSeparator(); actionMenu->insert( new KToggleAction( i18n( "Set Visibility..." ), 0, 0, - this, SLOT( slotSetVisiblility() ), this, + this, TQT_SLOT( slotSetVisiblility() ), this, "ICQAccount::mActionSetVisibility") ); - //actionMenu->insert( new KToggleAction( i18n( "Send &SMS..." ), 0, 0, this, SLOT( slotSendSMS() ), this, "ICQAccount::mActionSendSMS") ); + //actionMenu->insert( new KToggleAction( i18n( "Send &SMS..." ), 0, 0, this, TQT_SLOT( slotSendSMS() ), this, "ICQAccount::mActionSendSMS") ); return actionMenu; } -void ICQAccount::connectWithPassword( const QString &password ) +void ICQAccount::connectWithPassword( const TQString &password ) { if ( password.isNull() ) return; @@ -162,9 +162,9 @@ void ICQAccount::connectWithPassword( const QString &password ) if ( accountIsOffline ) { myself()->setOnlineStatus( protocol()->statusManager()->connectingStatus() ); - QString icqNumber = accountId(); + TQString icqNumber = accountId(); kdDebug(14153) << k_funcinfo << "Logging in as " << icqNumber << endl ; - QString server = configGroup()->readEntry( "Server", QString::fromLatin1( "login.oscar.aol.com" ) ); + TQString server = configGroup()->readEntry( "Server", TQString::fromLatin1( "login.oscar.aol.com" ) ); uint port = configGroup()->readNumEntry( "Port", 5190 ); Connection* c = setupConnection( server, port ); @@ -185,7 +185,7 @@ void ICQAccount::connectWithPassword( const QString &password ) engine()->start( server, port, accountId(), password ); engine()->connectToServer( c, server, true /* doAuth */ ); - mInitialStatusMessage = QString::null; + mInitialStatusMessage = TQString::null; } } @@ -195,7 +195,7 @@ void ICQAccount::disconnected( DisconnectReason reason ) ICQ::Presence presOffline = ICQ::Presence( ICQ::Presence::Offline, presence().visibility() ); myself()->setOnlineStatus( presOffline.toOnlineStatus() ); - QDictIterator it( contacts() ); + TQDictIterator it( contacts() ); for( ; it.current(); ++it ) { OscarContact* oc = dynamic_cast( it.current() ); @@ -231,25 +231,25 @@ void ICQAccount::slotSetVisiblility() if ( !m_visibilityDialog ) { m_visibilityDialog = new OscarVisibilityDialog( engine(), Kopete::UI::Global::mainWidget() ); - QObject::connect( m_visibilityDialog, SIGNAL( closing() ), - this, SLOT( slotVisibilityDialogClosed() ) ); + TQObject::connect( m_visibilityDialog, TQT_SIGNAL( closing() ), + this, TQT_SLOT( slotVisibilityDialogClosed() ) ); //add all contacts; OscarVisibilityDialog::ContactMap contactMap; //temporary map for faster lookup of contactId - QMap revContactMap; + TQMap revContactMap; - QValueList contactList = engine()->ssiManager()->contactList(); - QValueList::const_iterator it, cEnd = contactList.constEnd(); + TQValueList contactList = engine()->ssiManager()->contactList(); + TQValueList::const_iterator it, cEnd = contactList.constEnd(); for ( it = contactList.constBegin(); it != cEnd; ++it ) { - QString contactId = ( *it ).name(); + TQString contactId = ( *it ).name(); OscarContact* oc = dynamic_cast( contacts()[( *it ).name()] ); if ( oc ) { //for better orientation in lists use nickName and icq number - QString screenName( "%1 (%2)" ); + TQString screenName( "%1 (%2)" ); screenName = screenName.arg( oc->nickName(), contactId); contactMap.insert( screenName, contactId ); revContactMap.insert( contactId, screenName ); @@ -263,7 +263,7 @@ void ICQAccount::slotSetVisiblility() m_visibilityDialog->addContacts( contactMap ); //add contacts from visible list - QStringList tmpList; + TQStringList tmpList; contactList = engine()->ssiManager()->visibleList(); cEnd = contactList.constEnd(); @@ -299,7 +299,7 @@ void ICQAccount::slotVisibilityDialogClosed() m_visibilityDialog = 0L; } -void ICQAccount::setAway( bool away, const QString &awayReason ) +void ICQAccount::setAway( bool away, const TQString &awayReason ) { kdDebug(14153) << k_funcinfo << "account='" << accountId() << "'" << endl; if ( away ) @@ -319,7 +319,7 @@ void ICQAccount::setInvisible( ICQ::Presence::Visibility vis ) setPresenceTarget( ICQ::Presence( pres.type(), vis ) ); } -void ICQAccount::setPresenceType( ICQ::Presence::Type type, const QString &message ) +void ICQAccount::setPresenceType( ICQ::Presence::Type type, const TQString &message ) { ICQ::Presence pres = presence(); kdDebug(14153) << k_funcinfo << "new type=" << (int)type << ", old type=" << (int)pres.type() << ", new message=" << message << endl; @@ -327,7 +327,7 @@ void ICQAccount::setPresenceType( ICQ::Presence::Type type, const QString &messa setPresenceTarget( ICQ::Presence( type, pres.visibility() ), message ); } -void ICQAccount::setPresenceTarget( const ICQ::Presence &newPres, const QString &message ) +void ICQAccount::setPresenceTarget( const ICQ::Presence &newPres, const TQString &message ) { bool targetIsOffline = (newPres.type() == ICQ::Presence::Offline); bool accountIsOffline = ( presence().type() == ICQ::Presence::Offline || @@ -351,7 +351,7 @@ void ICQAccount::setPresenceTarget( const ICQ::Presence &newPres, const QString } -void ICQAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QString& reason ) +void ICQAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const TQString& reason ) { if ( status.status() == Kopete::OnlineStatus::Invisible ) { @@ -375,9 +375,9 @@ void ICQAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QStr } -OscarContact *ICQAccount::createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) +OscarContact *ICQAccount::createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) { - ICQContact* contact = new ICQContact( this, contactId, parentContact, QString::null, ssiItem ); + ICQContact* contact = new ICQContact( this, contactId, parentContact, TQString::null, ssiItem ); if ( !ssiItem.alias().isEmpty() ) contact->setProperty( Kopete::Global::Properties::self()->nickName(), ssiItem.alias() ); @@ -387,13 +387,13 @@ OscarContact *ICQAccount::createNewContact( const QString &contactId, Kopete::Me return contact; } -QString ICQAccount::sanitizedMessage( const QString& message ) +TQString ICQAccount::sanitizedMessage( const TQString& message ) { return Kopete::Message::escape( message ); } -void ICQAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& value ) +void ICQAccount::slotGlobalIdentityChanged( const TQString& key, const TQVariant& value ) { //do something with the photo kdDebug(14153) << k_funcinfo << "Global identity changed" << endl; @@ -417,14 +417,14 @@ void ICQAccount::slotGlobalIdentityChanged( const QString& key, const QVariant& void ICQAccount::slotBuddyIconChanged() { // need to disconnect because we could end up with many connections - QObject::disconnect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::disconnect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); if ( !engine()->isActive() ) { - QObject::connect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotBuddyIconChanged() ) ); + TQObject::connect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotBuddyIconChanged() ) ); return; } - QString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); + TQString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); SSIManager* ssi = engine()->ssiManager(); Oscar::SSI item = ssi->findItemForIconByRef( 1 ); @@ -437,7 +437,7 @@ void ICQAccount::slotBuddyIconChanged() Oscar::SSI s(item); //remove hash and alias - QValueList tList( item.tlvList() ); + TQValueList tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) tList.remove( t ); @@ -453,7 +453,7 @@ void ICQAccount::slotBuddyIconChanged() } else { - QFile iconFile( photoPath ); + TQFile iconFile( photoPath ); iconFile.open( IO_ReadOnly ); KMD5 iconHash; @@ -478,7 +478,7 @@ void ICQAccount::slotBuddyIconChanged() t2.type = 0x0131; t2.length = 0; - QValueList list; + TQValueList list; list.append( t ); list.append( t2 ); @@ -492,7 +492,7 @@ void ICQAccount::slotBuddyIconChanged() { //found an item Oscar::SSI s(item); kdDebug(14153) << k_funcinfo << "modifying old item in ssi." << endl; - QValueList tList( item.tlvList() ); + TQValueList tList( item.tlvList() ); TLV t = Oscar::findTLV( tList, 0x00D5 ); if ( t ) diff --git a/kopete/protocols/oscar/icq/icqaccount.h b/kopete/protocols/oscar/icq/icqaccount.h index f6231ec9..d64fe5d7 100644 --- a/kopete/protocols/oscar/icq/icqaccount.h +++ b/kopete/protocols/oscar/icq/icqaccount.h @@ -39,7 +39,7 @@ public: void userInfoUpdated(); public slots: - void receivedShortInfo( const QString& ); + void receivedShortInfo( const TQString& ); void fetchShortInfo(); }; @@ -49,7 +49,7 @@ class ICQAccount : public OscarAccount Q_OBJECT public: - ICQAccount( Kopete::Protocol *parent, QString accountID, const char *name = 0L ); + ICQAccount( Kopete::Protocol *parent, TQString accountID, const char *name = 0L ); virtual ~ICQAccount(); ICQProtocol *protocol(); @@ -58,18 +58,18 @@ public: virtual KActionMenu* actionMenu(); /** Reimplementation from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus&, const QString& ); + void setOnlineStatus( const Kopete::OnlineStatus&, const TQString& ); - virtual void setAway( bool away, const QString &awayReason ); + virtual void setAway( bool away, const TQString &awayReason ); - void connectWithPassword( const QString &password ); + void connectWithPassword( const TQString &password ); - void setUserProfile( const QString &profile ); + void setUserProfile( const TQString &profile ); protected: - virtual OscarContact *createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ); + virtual OscarContact *createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ); - virtual QString sanitizedMessage( const QString& message ); + virtual TQString sanitizedMessage( const TQString& message ); protected slots: virtual void disconnected( DisconnectReason reason ); @@ -79,8 +79,8 @@ private: ICQ::Presence presence(); void setInvisible( ICQ::Presence::Visibility ); - void setPresenceType( ICQ::Presence::Type, const QString &awayMessage = QString::null ); - void setPresenceTarget( const ICQ::Presence &presence, const QString &message = QString::null ); + void setPresenceType( ICQ::Presence::Type, const TQString &awayMessage = TQString::null ); + void setPresenceTarget( const ICQ::Presence &presence, const TQString &message = TQString::null ); //const unsigned long fullStatus( const unsigned long plainStatus ); @@ -90,14 +90,14 @@ private slots: void slotSetVisiblility(); void slotVisibilityDialogClosed(); - void slotGlobalIdentityChanged( const QString& key, const QVariant& value ); + void slotGlobalIdentityChanged( const TQString& key, const TQVariant& value ); void slotBuddyIconChanged(); private: bool mWebAware; bool mHideIP; - QString mInitialStatusMessage; + TQString mInitialStatusMessage; OscarVisibilityDialog* m_visibilityDialog; }; diff --git a/kopete/protocols/oscar/icq/icqcontact.cpp b/kopete/protocols/oscar/icq/icqcontact.cpp index 8ba8d195..90204bdf 100644 --- a/kopete/protocols/oscar/icq/icqcontact.cpp +++ b/kopete/protocols/oscar/icq/icqcontact.cpp @@ -17,9 +17,9 @@ #include "icqcontact.h" -#include -#include -#include +#include +#include +#include #include #include @@ -51,8 +51,8 @@ #include "oscarencodingselectiondialog.h" #include "ssimanager.h" -ICQContact::ICQContact( ICQAccount *account, const QString &name, Kopete::MetaContact *parent, - const QString& icon, const Oscar::SSI& ssiItem ) +ICQContact::ICQContact( ICQAccount *account, const TQString &name, Kopete::MetaContact *parent, + const TQString& icon, const Oscar::SSI& ssiItem ) : OscarContact( account, name, parent, icon, ssiItem ) { mProtocol = static_cast(protocol()); @@ -66,28 +66,28 @@ ICQContact::ICQContact( ICQAccount *account, const QString &name, Kopete::MetaCo else setOnlineStatus( ICQ::Presence( ICQ::Presence::Offline, ICQ::Presence::Visible ).toOnlineStatus() ); - QObject::connect( mAccount->engine(), SIGNAL( loggedIn() ), this, SLOT( loggedIn() ) ); - //QObject::connect( mAccount->engine(), SIGNAL( userIsOnline( const QString& ) ), this, SLOT( userOnline( const QString&, UserDetails ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( userIsOffline( const QString& ) ), this, SLOT( userOffline( const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( authRequestReceived( const QString&, const QString& ) ), - this, SLOT( slotGotAuthRequest( const QString&, const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( authReplyReceived( const QString&, const QString&, bool ) ), - this, SLOT( slotGotAuthReply(const QString&, const QString&, bool ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedIcqShortInfo( const QString& ) ), - this, SLOT( receivedShortInfo( const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedIcqLongInfo( const QString& ) ), - this, SLOT( receivedLongInfo( const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedUserInfo( const QString&, const UserDetails& ) ), - this, SLOT( userInfoUpdated( const QString&, const UserDetails& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedAwayMessage( const QString&, const QString& ) ), - this, SLOT( receivedStatusMessage( const QString&, const QString& ) ) ); - QObject::connect( mAccount->engine(), SIGNAL( receivedAwayMessage( const Oscar::Message& ) ), - this, SLOT( receivedStatusMessage( const Oscar::Message& ) ) ); - QObject::connect( this, SIGNAL( featuresUpdated() ), this, SLOT( updateFeatures() ) ); - QObject::connect( mAccount->engine(), SIGNAL( iconServerConnected() ), - this, SLOT( requestBuddyIcon() ) ); - QObject::connect( mAccount->engine(), SIGNAL( haveIconForContact( const QString&, QByteArray ) ), - this, SLOT( haveIcon( const QString&, QByteArray ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( loggedIn() ) ); + //TQObject::connect( mAccount->engine(), TQT_SIGNAL( userIsOnline( const TQString& ) ), this, TQT_SLOT( userOnline( const TQString&, UserDetails ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( userIsOffline( const TQString& ) ), this, TQT_SLOT( userOffline( const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( authRequestReceived( const TQString&, const TQString& ) ), + this, TQT_SLOT( slotGotAuthRequest( const TQString&, const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( authReplyReceived( const TQString&, const TQString&, bool ) ), + this, TQT_SLOT( slotGotAuthReply(const TQString&, const TQString&, bool ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedIcqShortInfo( const TQString& ) ), + this, TQT_SLOT( receivedShortInfo( const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedIcqLongInfo( const TQString& ) ), + this, TQT_SLOT( receivedLongInfo( const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedUserInfo( const TQString&, const UserDetails& ) ), + this, TQT_SLOT( userInfoUpdated( const TQString&, const UserDetails& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ), + this, TQT_SLOT( receivedStatusMessage( const TQString&, const TQString& ) ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( receivedAwayMessage( const Oscar::Message& ) ), + this, TQT_SLOT( receivedStatusMessage( const Oscar::Message& ) ) ); + TQObject::connect( this, TQT_SIGNAL( featuresUpdated() ), this, TQT_SLOT( updateFeatures() ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( iconServerConnected() ), + this, TQT_SLOT( requestBuddyIcon() ) ); + TQObject::connect( mAccount->engine(), TQT_SIGNAL( haveIconForContact( const TQString&, TQByteArray ) ), + this, TQT_SLOT( haveIcon( const TQString&, TQByteArray ) ) ); } @@ -111,7 +111,7 @@ void ICQContact::updateSSIItem() } -void ICQContact::userInfoUpdated( const QString& contact, const UserDetails& details ) +void ICQContact::userInfoUpdated( const TQString& contact, const UserDetails& details ) { //kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << contact << contactId() << endl; if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) @@ -193,7 +193,7 @@ void ICQContact::userInfoUpdated( const QString& contact, const UserDetails& det int time = ( KApplication::random() % 10 ) * 1000; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating buddy icon in " << time/1000 << " seconds" << endl; - QTimer::singleShot( time, this, SLOT( requestBuddyIcon() ) ); + TQTimer::singleShot( time, this, TQT_SLOT( requestBuddyIcon() ) ); } } } @@ -201,7 +201,7 @@ void ICQContact::userInfoUpdated( const QString& contact, const UserDetails& det OscarContact::userInfoUpdated( contact, details ); } -void ICQContact::userOnline( const QString& userId ) +void ICQContact::userOnline( const TQString& userId ) { if ( Oscar::normalize( userId ) != Oscar::normalize( contactId() ) ) return; @@ -211,7 +211,7 @@ void ICQContact::userOnline( const QString& userId ) //mAccount->engine()->requestStatusInfo( contactId() ); } -void ICQContact::userOffline( const QString& userId ) +void ICQContact::userOffline( const TQString& userId ) { if ( Oscar::normalize( userId ) != Oscar::normalize( contactId() ) ) return; @@ -237,7 +237,7 @@ void ICQContact::loggedIn() m_requestingNickname = true; int time = ( KApplication::random() % 20 ) * 1000; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "updating nickname in " << time/1000 << " seconds" << endl; - QTimer::singleShot( time, this, SLOT( requestShortInfo() ) ); + TQTimer::singleShot( time, this, TQT_SLOT( requestShortInfo() ) ); } } @@ -250,7 +250,7 @@ void ICQContact::requestShortInfo() void ICQContact::slotRequestAuth() { - QString reason = KInputDialog::getText( i18n("Request Authorization"), + TQString reason = KInputDialog::getText( i18n("Request Authorization"), i18n("Reason for requesting authorization:") ); if ( !reason.isNull() ) mAccount->engine()->requestAuth( contactId(), reason ); @@ -266,13 +266,13 @@ void ICQContact::slotSendAuth() mAccount->engine()->sendAuth( contactId(), replyDialog.reason(), replyDialog.grantAuth() ); } -void ICQContact::slotGotAuthReply( const QString& contact, const QString& reason, bool granted ) +void ICQContact::slotGotAuthReply( const TQString& contact, const TQString& reason, bool granted ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << endl; - QString message; + TQString message; if( granted ) { message = i18n( "User %1 has granted your authorization request.\nReason: %2" ) @@ -291,14 +291,14 @@ void ICQContact::slotGotAuthReply( const QString& contact, const QString& reason KNotifyClient::event( Kopete::UI::Global::sysTrayWId(), "icq_authorization", message ); } -void ICQContact::slotGotAuthRequest( const QString& contact, const QString& reason ) +void ICQContact::slotGotAuthRequest( const TQString& contact, const TQString& reason ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; ICQAuthReplyDialog *replyDialog = new ICQAuthReplyDialog(); - connect( replyDialog, SIGNAL( okClicked() ), this, SLOT( slotAuthReplyDialogOkClicked() ) ); + connect( replyDialog, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotAuthReplyDialogOkClicked() ) ); replyDialog->setUser( property( Kopete::Global::Properties::self()->nickName() ).value().toString() ); replyDialog->setRequestReason( reason ); replyDialog->setModal( TRUE ); @@ -314,7 +314,7 @@ void ICQContact::slotAuthReplyDialogOkClicked() mAccount->engine()->sendAuth( contactId(), replyDialog->reason(), replyDialog->grantAuth() ); } -void ICQContact::receivedLongInfo( const QString& contact ) +void ICQContact::receivedLongInfo( const TQString& contact ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) { @@ -323,7 +323,7 @@ void ICQContact::receivedLongInfo( const QString& contact ) return; } - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "received long info from engine" << endl; @@ -343,12 +343,12 @@ void ICQContact::receivedLongInfo( const QString& contact ) } -void ICQContact::receivedShortInfo( const QString& contact ) +void ICQContact::receivedShortInfo( const TQString& contact ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); m_requestingNickname = false; //done requesting nickname ICQShortInfo shortInfo = mAccount->engine()->getShortInfo( contact ); @@ -372,7 +372,7 @@ void ICQContact::receivedShortInfo( const QString& contact ) } -void ICQContact::receivedStatusMessage( const QString &contact, const QString &message ) +void ICQContact::receivedStatusMessage( const TQString &contact, const TQString &message ) { if ( Oscar::normalize( contact ) != Oscar::normalize( contactId() ) ) return; @@ -389,9 +389,9 @@ void ICQContact::receivedStatusMessage( const Oscar::Message &message ) return; //decode message - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); - QString realText = message.text(codec); + TQString realText = message.text(codec); if ( !realText.isEmpty() ) setProperty( mProtocol->awayMessage, realText ); @@ -404,7 +404,7 @@ void ICQContact::slotSendMsg( Kopete::Message& msg, Kopete::ChatSession* session //Why is this unused? Q_UNUSED( session ); - QTextCodec* codec = contactCodec(); + TQTextCodec* codec = contactCodec(); int messageChannel = 0x01; Oscar::Message::Encoding messageEncoding; @@ -414,14 +414,14 @@ void ICQContact::slotSendMsg( Kopete::Message& msg, Kopete::ChatSession* session else messageEncoding = Oscar::Message::UserDefined; - QString msgText( msg.plainBody() ); + TQString msgText( msg.plainBody() ); // TODO: More intelligent handling of message length. uint chunk_length = !isOnline() ? 450 : 4096; uint msgPosition = 0; do { - QString msgChunk( msgText.mid( msgPosition, chunk_length ) ); + TQString msgChunk( msgText.mid( msgPosition, chunk_length ) ); // Try to split on space if needed if ( msgChunk.length() == chunk_length ) { @@ -460,7 +460,7 @@ void ICQContact::requestBuddyIcon() } } -void ICQContact::haveIcon( const QString& user, QByteArray icon ) +void ICQContact::haveIcon( const TQString& user, TQByteArray icon ) { if ( Oscar::normalize( user ) != Oscar::normalize( contactId() ) ) return; @@ -470,9 +470,9 @@ void ICQContact::haveIcon( const QString& user, QByteArray icon ) KMD5 buddyIconHash( icon ); if ( memcmp( buddyIconHash.rawDigest(), m_details.buddyIconHash().data(), 16 ) == 0 ) { - QString iconLocation( locateLocal( "appdata", "oscarpictures/"+ contactId() ) ); + TQString iconLocation( locateLocal( "appdata", "oscarpictures/"+ contactId() ) ); - QFile iconFile( iconLocation ); + TQFile iconFile( iconLocation ); if ( !iconFile.open( IO_WriteOnly ) ) { kdDebug(14153) << k_funcinfo << "Cannot open file" @@ -483,7 +483,7 @@ void ICQContact::haveIcon( const QString& user, QByteArray icon ) iconFile.writeBlock( icon ); iconFile.close(); - setProperty( Kopete::Global::Properties::self()->photo(), QString::null ); + setProperty( Kopete::Global::Properties::self()->photo(), TQString::null ); setProperty( Kopete::Global::Properties::self()->photo(), iconLocation ); m_buddyIconDirty = false; } @@ -494,11 +494,11 @@ void ICQContact::haveIcon( const QString& user, QByteArray icon ) } } -bool ICQContact::cachedBuddyIcon( QByteArray hash ) +bool ICQContact::cachedBuddyIcon( TQByteArray hash ) { - QString iconLocation( locateLocal( "appdata", "oscarpictures/"+ contactId() ) ); + TQString iconLocation( locateLocal( "appdata", "oscarpictures/"+ contactId() ) ); - QFile iconFile( iconLocation ); + TQFile iconFile( iconLocation ); if ( !iconFile.open( IO_ReadOnly ) ) return false; @@ -510,7 +510,7 @@ bool ICQContact::cachedBuddyIcon( QByteArray hash ) { kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "Updating icon for " << contactId() << " from local cache" << endl; - setProperty( Kopete::Global::Properties::self()->photo(), QString::null ); + setProperty( Kopete::Global::Properties::self()->photo(), TQString::null ); setProperty( Kopete::Global::Properties::self()->photo(), iconLocation ); m_buddyIconDirty = false; return true; @@ -532,7 +532,7 @@ void ICQContact::slotContactChanged(const UserInfo &u) /*kdDebug(14190) << k_funcinfo << "Called for '" << displayName() << "', contactName()=" << contactName() << endl;*/ - QStringList capList; + TQStringList capList; // Append client name and version in case we found one if (!mInfo.clientName.isEmpty()) { @@ -595,7 +595,7 @@ void ICQContact::slotContactChanged(const UserInfo &u) setStatus(newStatus); } -void ICQContact::slotOffgoingBuddy(QString sender) +void ICQContact::slotOffgoingBuddy(TQString sender) { if(sender != contactName()) return; @@ -605,7 +605,7 @@ void ICQContact::slotOffgoingBuddy(QString sender) setOnlineStatus(mProtocol->statusOffline); } -void ICQContact::gotIM(OscarSocket::OscarMessageType /*type*/, const QString &message) +void ICQContact::gotIM(OscarSocket::OscarMessageType /*type*/, const TQString &message) { // Build a Kopete::Message and set the body as Rich Text Kopete::ContactPtrList tmpList; @@ -649,12 +649,12 @@ bool ICQContact::isReachable() return account()->isConnected(); } -QPtrList *ICQContact::customContextMenuActions() +TQPtrList *ICQContact::customContextMenuActions() { - QPtrList *actionCollection = new QPtrList(); + TQPtrList *actionCollection = new TQPtrList(); /* - QString awTxt; - QString awIcn; + TQString awTxt; + TQString awIcn; unsigned int status = onlineStatus().internalStatus(); if (status >= 15) status -= 15; // get rid of invis addon @@ -685,12 +685,12 @@ QPtrList *ICQContact::customContextMenuActions() if(actionReadAwayMessage==0) { actionReadAwayMessage = new KAction(awTxt, awIcn, 0, - this, SLOT(slotReadAwayMessage()), this, "actionReadAwayMessage"); + this, TQT_SLOT(slotReadAwayMessage()), this, "actionReadAwayMessage"); */ actionRequestAuth = new KAction(i18n("&Request Authorization"), "mail_reply", 0, - this, SLOT(slotRequestAuth()), this, "actionRequestAuth"); + this, TQT_SLOT(slotRequestAuth()), this, "actionRequestAuth"); actionSendAuth = new KAction(i18n("&Grant Authorization"), "mail_forward", 0, - this, SLOT(slotSendAuth()), this, "actionSendAuth"); + this, TQT_SLOT(slotSendAuth()), this, "actionSendAuth"); /* } else @@ -701,11 +701,11 @@ QPtrList *ICQContact::customContextMenuActions() */ m_actionIgnore = new KToggleAction(i18n("&Ignore"), "", 0, - this, SLOT(slotIgnore()), this, "actionIgnore"); + this, TQT_SLOT(slotIgnore()), this, "actionIgnore"); m_actionVisibleTo = new KToggleAction(i18n("Always &Visible To"), "", 0, - this, SLOT(slotVisibleTo()), this, "actionVisibleTo"); + this, TQT_SLOT(slotVisibleTo()), this, "actionVisibleTo"); m_actionInvisibleTo = new KToggleAction(i18n("Always &Invisible To"), "", 0, - this, SLOT(slotInvisibleTo()), this, "actionInvisibleTo"); + this, TQT_SLOT(slotInvisibleTo()), this, "actionInvisibleTo"); bool on = account()->isConnected(); if ( m_ssiItem.waitingAuth() ) @@ -717,7 +717,7 @@ QPtrList *ICQContact::customContextMenuActions() m_selectEncoding = new KAction( i18n( "Select Encoding..." ), "charset", 0, - this, SLOT( changeContactEncoding() ), this, "changeEncoding" ); + this, TQT_SLOT( changeContactEncoding() ), this, "changeEncoding" ); /* actionReadAwayMessage->setEnabled(status != OSCAR_OFFLINE && status != OSCAR_ONLINE); @@ -748,7 +748,7 @@ QPtrList *ICQContact::customContextMenuActions() void ICQContact::slotUserInfo() { m_infoWidget = new ICQUserInfoWidget( Kopete::UI::Global::mainWidget(), "icq info" ); - QObject::connect( m_infoWidget, SIGNAL( finished() ), this, SLOT( closeUserInfoDialog() ) ); + TQObject::connect( m_infoWidget, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeUserInfoDialog() ) ); m_infoWidget->setContact( this ); m_infoWidget->show(); if ( account()->isConnected() ) @@ -757,7 +757,7 @@ void ICQContact::slotUserInfo() void ICQContact::closeUserInfoDialog() { - QObject::disconnect( this, 0, m_infoWidget, 0 ); + TQObject::disconnect( this, 0, m_infoWidget, 0 ); m_infoWidget->delayedDestruct(); m_infoWidget = 0L; } @@ -768,14 +768,14 @@ void ICQContact::changeContactEncoding() return; m_oesd = new OscarEncodingSelectionDialog( Kopete::UI::Global::mainWidget(), property(mProtocol->contactEncoding).value().toInt() ); - connect( m_oesd, SIGNAL( closing( int ) ), - this, SLOT( changeEncodingDialogClosed( int ) ) ); + connect( m_oesd, TQT_SIGNAL( closing( int ) ), + this, TQT_SLOT( changeEncodingDialogClosed( int ) ) ); m_oesd->show(); } void ICQContact::changeEncodingDialogClosed( int result ) { - if ( result == QDialog::Accepted ) + if ( result == TQDialog::Accepted ) { int mib = m_oesd->selectedEncoding(); if ( mib != 0 ) @@ -827,7 +827,7 @@ void ICQContact::slotReadAwayMessage() awayMessageDialog = new ICQReadAway(this, 0L, "awayMessageDialog"); if(!awayMessageDialog) return; - QObject::connect(awayMessageDialog, SIGNAL(closing()), this, SLOT(slotCloseAwayMessageDialog())); + TQObject::connect(awayMessageDialog, TQT_SIGNAL(closing()), this, TQT_SLOT(slotCloseAwayMessageDialog())); awayMessageDialog->show(); } else @@ -844,14 +844,14 @@ void ICQContact::slotCloseAwayMessageDialog() } -const QString ICQContact::awayMessage() +const TQString ICQContact::awayMessage() { kdDebug(14150) << k_funcinfo << property(mProtocol->awayMessage).value().toString() << endl; return property(mProtocol->awayMessage).value().toString(); } -void ICQContact::setAwayMessage(const QString &message) +void ICQContact::setAwayMessage(const TQString &message) { /*kdDebug(14150) << k_funcinfo << "Called for '" << displayName() << "', away msg='" << message << "'" << endl;*/ diff --git a/kopete/protocols/oscar/icq/icqcontact.h b/kopete/protocols/oscar/icq/icqcontact.h index 41084e63..8e3301cf 100644 --- a/kopete/protocols/oscar/icq/icqcontact.h +++ b/kopete/protocols/oscar/icq/icqcontact.h @@ -51,30 +51,30 @@ Q_OBJECT public: /** Normal ICQ constructor */ - ICQContact( ICQAccount *account, const QString &name, Kopete::MetaContact *parent, - const QString& icon = QString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); + ICQContact( ICQAccount *account, const TQString &name, Kopete::MetaContact *parent, + const TQString& icon = TQString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); virtual ~ICQContact(); /** * Returns a set of custom menu items for * the context menu */ - virtual QPtrList *customContextMenuActions(); + virtual TQPtrList *customContextMenuActions(); /** Return whether or not this contact is reachable. */ virtual bool isReachable(); - //virtual const QString awayMessage(); - //virtual void setAwayMessage(const QString &message); + //virtual const TQString awayMessage(); + //virtual void setAwayMessage(const TQString &message); public slots: virtual void slotUserInfo(); virtual void updateSSIItem(); - void userInfoUpdated( const QString& contact, const UserDetails& details ); + void userInfoUpdated( const TQString& contact, const UserDetails& details ); - void userOnline( const QString& userId ); - void userOffline( const QString& userID ); + void userOnline( const TQString& userId ); + void userOffline( const TQString& userID ); void loggedIn(); void requestShortInfo(); @@ -87,7 +87,7 @@ signals: void haveInterestInfo( const ICQInterestInfo& ); private: - bool cachedBuddyIcon( QByteArray hash ); + bool cachedBuddyIcon( TQByteArray hash ); bool m_buddyIconDirty; bool m_requestingNickname; @@ -125,22 +125,22 @@ private slots: void slotAuthReplyDialogOkClicked(); /** We have received an auth request */ - void slotGotAuthRequest( const QString& contact, const QString& reason ); + void slotGotAuthRequest( const TQString& contact, const TQString& reason ); /** We have received an auth reply */ - void slotGotAuthReply( const QString& contact, const QString& reason, bool granted ); + void slotGotAuthReply( const TQString& contact, const TQString& reason, bool granted ); void closeUserInfoDialog(); - void receivedLongInfo( const QString& contact ); - void receivedShortInfo( const QString& contact ); + void receivedLongInfo( const TQString& contact ); + void receivedShortInfo( const TQString& contact ); void changeContactEncoding(); void changeEncodingDialogClosed( int ); void requestBuddyIcon(); - void haveIcon( const QString&, QByteArray ); - void receivedStatusMessage( const QString &contact, const QString &message ); + void haveIcon( const TQString&, TQByteArray ); + void receivedStatusMessage( const TQString &contact, const TQString &message ); void receivedStatusMessage( const Oscar::Message &message ); //void slotCloseAwayMessageDialog(); diff --git a/kopete/protocols/oscar/icq/icqpresence.cpp b/kopete/protocols/oscar/icq/icqpresence.cpp index ab6bb670..393f04c9 100644 --- a/kopete/protocols/oscar/icq/icqpresence.cpp +++ b/kopete/protocols/oscar/icq/icqpresence.cpp @@ -39,9 +39,9 @@ struct PresenceTypeData Kopete::OnlineStatus::StatusType onlineStatusType; unsigned long setFlag; unsigned long getFlag; - QString caption; - QString visibleName; - QString invisibleName; + TQString caption; + TQString visibleName; + TQString invisibleName; const char *visibleIcon; const char *invisibleIcon; unsigned int categories; @@ -132,8 +132,8 @@ public: , waitingForAuth( Kopete::OnlineStatus::Unknown, 1, ICQProtocol::protocol(), Presence::Offline, "button_cancel", i18n("Waiting for Authorization") ) , invisible( Kopete::OnlineStatus::Invisible, 2, ICQProtocol::protocol(), - Presence::Offline, QString::null, QString::null, - QString::null, Kopete::OnlineStatusManager::Invisible, + Presence::Offline, TQString::null, TQString::null, + TQString::null, Kopete::OnlineStatusManager::Invisible, Kopete::OnlineStatusManager::HideFromMenu ) { @@ -150,8 +150,8 @@ public: const PresenceTypeData &data = PresenceTypeData::forType( static_cast(n) ); const uint weight = n + firstUsableWeight; const uint internalStatus = n + invisibleOffset; - QStringList overlayIcons( data.visibleIcon ); - QString description( data.visibleName ); + TQStringList overlayIcons( data.visibleIcon ); + TQString description( data.visibleName ); Kopete::OnlineStatus status; if ( invisible ) { diff --git a/kopete/protocols/oscar/icq/icqprotocol.cpp b/kopete/protocols/oscar/icq/icqprotocol.cpp index 42616e32..79fd2848 100644 --- a/kopete/protocols/oscar/icq/icqprotocol.cpp +++ b/kopete/protocols/oscar/icq/icqprotocol.cpp @@ -23,15 +23,15 @@ #include // for ntohl() -#include +#include /* -#include -#include -#include -#include +#include +#include +#include +#include #include */ -#include +#include #include /* #include @@ -66,10 +66,10 @@ K_EXPORT_COMPONENT_FACTORY( kopete_icq, ICQProtocolFactory( "kopete_icq" ) ) ICQProtocolHandler::ICQProtocolHandler() : Kopete::MimeTypeHandler(false) { - registerAsMimeHandler(QString::fromLatin1("application/x-icq")); + registerAsMimeHandler(TQString::fromLatin1("application/x-icq")); } -void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) const +void ICQProtocolHandler::handleURL(const TQString &mimeType, const KURL & url) const { if (mimeType != "application/x-icq") return; @@ -96,21 +96,21 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co ICQProtocol *proto = ICQProtocol::protocol(); - QString uin = file.readEntry("UIN"); + TQString uin = file.readEntry("UIN"); if (uin.isEmpty()) return; - QString nick = file.readEntry("NickName"); - QString first = file.readEntry("FirstName"); - QString last = file.readEntry("LastName"); - QString email = file.readEntry("Email"); + TQString nick = file.readEntry("NickName"); + TQString first = file.readEntry("FirstName"); + TQString last = file.readEntry("LastName"); + TQString email = file.readEntry("Email"); Kopete::Account *account = 0; - QDict accounts = Kopete::AccountManager::self()->accounts(proto); + TQDict accounts = Kopete::AccountManager::self()->accounts(proto); // do not show chooser if we only have one account to "choose" from if (accounts.count() == 1) { - QDictIterator it(accounts); + TQDictIterator it(accounts); account = it.current(); } else @@ -126,7 +126,7 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co account = accSelector->selectedItem(); delete chooser; - if (ret == QDialog::Rejected || account == 0) + if (ret == TQDialog::Rejected || account == 0) { kdDebug(14153) << k_funcinfo << "Cancelled" << endl; return; @@ -140,12 +140,12 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co return; } - QString nickuin = nick.isEmpty() ? + TQString nickuin = nick.isEmpty() ? i18n("'%1'").arg(uin) : i18n("'%1' (%2)").arg(nick, uin); if (KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(), - i18n("Do you want to add %1 to your contact list?").arg(nickuin), QString::null, i18n("Add"), i18n("Do Not Add")) + i18n("Do you want to add %1 to your contact list?").arg(nickuin), TQString::null, i18n("Add"), i18n("Do Not Add")) != KMessageBox::Yes) { kdDebug(14153) << k_funcinfo << "Cancelled" << endl; @@ -173,7 +173,7 @@ void ICQProtocolHandler::handleURL(const QString &mimeType, const KURL & url) co ICQProtocol* ICQProtocol::protocolStatic_ = 0L; -ICQProtocol::ICQProtocol(QObject *parent, const char *name, const QStringList&) +ICQProtocol::ICQProtocol(TQObject *parent, const char *name, const TQStringList&) : Kopete::Protocol( ICQProtocolFactory::instance(), parent, name ), firstName(Kopete::Global::Properties::self()->firstName()), lastName(Kopete::Global::Properties::self()->lastName()), @@ -181,8 +181,8 @@ ICQProtocol::ICQProtocol(QObject *parent, const char *name, const QStringList&) emailAddress(Kopete::Global::Properties::self()->emailAddress()), ipAddress("ipAddress", i18n("IP Address") ), clientFeatures("clientFeatures", i18n("Client Features"), 0, false), - buddyIconHash("iconHash", i18n("Buddy Icon MD5 Hash"), QString::null, true, false, true), - contactEncoding( "contactEncoding", i18n( "Contact Encoding" ), QString::null, true, false, true ) + buddyIconHash("iconHash", i18n("Buddy Icon MD5 Hash"), TQString::null, true, false, true), + contactEncoding( "contactEncoding", i18n( "Contact Encoding" ), TQString::null, true, false, true ) { if (protocolStatic_) @@ -219,7 +219,7 @@ void ICQProtocol::initGenders() void ICQProtocol::initCountries() { mCountries.insert(0, ""); // unspecified - KLocale *kl = KGlobal::locale(); //KLocale(QString::fromLatin1("kopete")); + KLocale *kl = KGlobal::locale(); //KLocale(TQString::fromLatin1("kopete")); mCountries.insert(93, kl->twoAlphaToCountryName("af")); mCountries.insert(355, kl->twoAlphaToCountryName("al")); @@ -468,7 +468,7 @@ void ICQProtocol::initCountries() void ICQProtocol::initLang() { - KLocale *kl = KGlobal::locale(); //KLocale(QString::fromLatin1("kopete")); + KLocale *kl = KGlobal::locale(); //KLocale(TQString::fromLatin1("kopete")); mLanguages.insert(0 , ""); mLanguages.insert(1 , kl->twoAlphaToLanguageName("ar") /*i18n("Arabic")*/); @@ -660,19 +660,19 @@ void ICQProtocol::initInterests() } -void ICQProtocol::fillComboFromTable(QComboBox *box, const QMap &map) +void ICQProtocol::fillComboFromTable(TQComboBox *box, const TQMap &map) { // kdDebug(14153) << k_funcinfo << "Called." << endl; - QStringList list = map.values(); + TQStringList list = map.values(); list.sort(); box->insertStringList(list); } -void ICQProtocol::setComboFromTable(QComboBox *box, const QMap &map, int value) +void ICQProtocol::setComboFromTable(TQComboBox *box, const TQMap &map, int value) { // kdDebug(14153) << k_funcinfo << "Called." << endl; - QMap::ConstIterator it; + TQMap::ConstIterator it; it = map.find(value); if (!(*it)) return; @@ -687,11 +687,11 @@ void ICQProtocol::setComboFromTable(QComboBox *box, const QMap &ma } } -int ICQProtocol::getCodeForCombo(QComboBox *cmb, const QMap &map) +int ICQProtocol::getCodeForCombo(TQComboBox *cmb, const TQMap &map) { - const QString curText = cmb->currentText(); + const TQString curText = cmb->currentText(); - QMap::ConstIterator it; + TQMap::ConstIterator it; for(it = map.begin(); it != map.end(); ++it) { if(it.data() == curText) @@ -701,10 +701,10 @@ int ICQProtocol::getCodeForCombo(QComboBox *cmb, const QMap &map) } #if 0 -void ICQProtocol::fillTZCombo(QComboBox *combo) +void ICQProtocol::fillTZCombo(TQComboBox *combo) { - QTime time(12, 0); - QTime done(0, 0); + TQTime time(12, 0); + TQTime done(0, 0); while(time > done) { @@ -713,8 +713,8 @@ void ICQProtocol::fillTZCombo(QComboBox *combo) time = time.addSecs(-30 * 60); } - time = QTime(0, 0); - done = QTime(12, 0); + time = TQTime(0, 0); + done = TQTime(12, 0); while(time <= done) { @@ -724,7 +724,7 @@ void ICQProtocol::fillTZCombo(QComboBox *combo) } } -void ICQProtocol::setTZComboValue(QComboBox *combo, const char &tz) +void ICQProtocol::setTZComboValue(TQComboBox *combo, const char &tz) { kdDebug(14153) << k_funcinfo << "tz=" << int(tz) << endl; if ((tz < -24) || (tz > 24)) @@ -733,7 +733,7 @@ void ICQProtocol::setTZComboValue(QComboBox *combo, const char &tz) combo->setCurrentItem(24 + tz); } -char ICQProtocol::getTZComboValue(QComboBox *combo) +char ICQProtocol::getTZComboValue(TQComboBox *combo) { char ret = combo->currentItem() - 24; // kdDebug(14153) << k_funcinfo << "return value=" << int(ret) << endl; @@ -752,11 +752,11 @@ bool ICQProtocol::canSendOffline() const } Kopete::Contact *ICQProtocol::deserializeContact( Kopete::MetaContact *metaContact, - const QMap &serializedData, - const QMap &/*addressBookData*/ ) + const TQMap &serializedData, + const TQMap &/*addressBookData*/ ) { - QString accountId = serializedData["accountId"]; - QDict accounts = Kopete::AccountManager::self()->accounts(this); + TQString accountId = serializedData["accountId"]; + TQDict accounts = Kopete::AccountManager::self()->accounts(this); ICQAccount *account = static_cast(accounts[accountId]); if(!account) @@ -766,16 +766,16 @@ Kopete::Contact *ICQProtocol::deserializeContact( Kopete::MetaContact *metaConta return 0; } - QString contactId=serializedData["contactId"]; + TQString contactId=serializedData["contactId"]; uint ssiGid = 0, ssiBid = 0, ssiType = 0xFFFF; - QString ssiName; + TQString ssiName; bool ssiWaitingAuth = false; if ( serializedData.contains( "ssi_name" ) ) ssiName = serializedData["ssi_name"]; if ( serializedData.contains( "ssi_waitingAuth" ) ) { - QString authStatus = serializedData["ssi_waitingAuth"]; + TQString authStatus = serializedData["ssi_waitingAuth"]; if ( authStatus == "true" ) ssiWaitingAuth = true; } @@ -787,23 +787,23 @@ Kopete::Contact *ICQProtocol::deserializeContact( Kopete::MetaContact *metaConta if ( serializedData.contains( "ssi_type" ) ) ssiType = serializedData["ssi_type"].toUInt(); - Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, QValueList(), 0 ); + Oscar::SSI item( ssiName, ssiGid, ssiBid, ssiType, TQValueList(), 0 ); item.setWaitingAuth( ssiWaitingAuth ); - ICQContact *c = new ICQContact( account, contactId, metaContact, QString::null, item ); + ICQContact *c = new ICQContact( account, contactId, metaContact, TQString::null, item ); return c; } -AddContactPage *ICQProtocol::createAddContactWidget(QWidget *parent, Kopete::Account *account) +AddContactPage *ICQProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *account) { return new ICQAddContactPage( static_cast( account ), parent); } -KopeteEditAccountWidget *ICQProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *ICQProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return new ICQEditAccountWidget(this, account, parent); } -Kopete::Account *ICQProtocol::createNewAccount(const QString &accountId) +Kopete::Account *ICQProtocol::createNewAccount(const TQString &accountId) { return new ICQAccount(this, accountId); } diff --git a/kopete/protocols/oscar/icq/icqprotocol.h b/kopete/protocols/oscar/icq/icqprotocol.h index 8e3c1be9..96b2e201 100644 --- a/kopete/protocols/oscar/icq/icqprotocol.h +++ b/kopete/protocols/oscar/icq/icqprotocol.h @@ -31,7 +31,7 @@ class ICQProtocolHandler : public Kopete::MimeTypeHandler { public: ICQProtocolHandler(); - void handleURL(const QString &mimeType, const KURL & url) const; + void handleURL(const TQString &mimeType, const KURL & url) const; }; @@ -40,7 +40,7 @@ class ICQProtocol : public Kopete::Protocol Q_OBJECT public: - ICQProtocol(QObject *parent, const char *name, const QStringList &args); + ICQProtocol(TQObject *parent, const char *name, const TQStringList &args); virtual ~ICQProtocol(); /** @@ -51,11 +51,11 @@ public: virtual bool canSendOffline() const; virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap &serializedData, - const QMap &addressBookData ); - AddContactPage *createAddContactWidget(QWidget *parent, Kopete::Account *account); - KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent); - Kopete::Account *createNewAccount(const QString &accountId); + const TQMap &serializedData, + const TQMap &addressBookData ); + AddContactPage *createAddContactWidget(TQWidget *parent, Kopete::Account *account); + KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, TQWidget *parent); + Kopete::Account *createNewAccount(const TQString &accountId); ICQ::OnlineStatusManager *statusManager(); @@ -69,19 +69,19 @@ public: const Kopete::ContactPropertyTmpl buddyIconHash; const Kopete::ContactPropertyTmpl contactEncoding; - const QMap &genders() { return mGenders; } - const QMap &countries() { return mCountries; } - const QMap &languages() { return mLanguages; } - const QMap &encodings() { return mEncodings; } - const QMap &maritals() { return mMarital; } - const QMap &interests() { return mInterests; } + const TQMap &genders() { return mGenders; } + const TQMap &countries() { return mCountries; } + const TQMap &languages() { return mLanguages; } + const TQMap &encodings() { return mEncodings; } + const TQMap &maritals() { return mMarital; } + const TQMap &interests() { return mInterests; } - void fillComboFromTable( QComboBox*, const QMap& ); - void setComboFromTable( QComboBox*, const QMap&, int ); - int getCodeForCombo( QComboBox*, const QMap& ); - /* void fillTZCombo(QComboBox *combo); - void setTZComboValue(QComboBox *combo, const char &tz); - char getTZComboValue(QComboBox *combo); */ + void fillComboFromTable( TQComboBox*, const TQMap& ); + void setComboFromTable( TQComboBox*, const TQMap&, int ); + int getCodeForCombo( TQComboBox*, const TQMap& ); + /* void fillTZCombo(TQComboBox *combo); + void setTZComboValue(TQComboBox *combo, const char &tz); + char getTZComboValue(TQComboBox *combo); */ private: void initGenders(); @@ -94,12 +94,12 @@ private: private: static ICQProtocol* protocolStatic_; ICQ::OnlineStatusManager* statusManager_; - QMap mGenders; - QMap mCountries; - QMap mLanguages; - QMap mEncodings; - QMap mMarital; - QMap mInterests; + TQMap mGenders; + TQMap mCountries; + TQMap mLanguages; + TQMap mEncodings; + TQMap mMarital; + TQMap mInterests; ICQProtocolHandler protohandler; }; #endif diff --git a/kopete/protocols/oscar/icq/icqreadaway.cpp b/kopete/protocols/oscar/icq/icqreadaway.cpp index 94cccafd..28b86d33 100644 --- a/kopete/protocols/oscar/icq/icqreadaway.cpp +++ b/kopete/protocols/oscar/icq/icqreadaway.cpp @@ -20,7 +20,7 @@ #include "icqaccount.h" #include "icqcontact.h" -#include +#include #include #include @@ -29,8 +29,8 @@ #include -ICQReadAway::ICQReadAway(ICQContact *c, QWidget *parent, const char* name) - : KDialogBase(parent, name, false, QString::null, Close | User1, +ICQReadAway::ICQReadAway(ICQContact *c, TQWidget *parent, const char* name) + : KDialogBase(parent, name, false, TQString::null, Close | User1, Close, false, i18n("&Fetch Again")) { assert(c); @@ -39,27 +39,27 @@ ICQReadAway::ICQReadAway(ICQContact *c, QWidget *parent, const char* name) mContact = c; setCaption(i18n("'%2' Message for %1").arg(c->displayName()).arg(c->onlineStatus().description())); - QVBox *mMainWidget = makeVBoxMainWidget(); + TQVBox *mMainWidget = makeVBoxMainWidget(); awayMessageBrowser = new KTextBrowser(mMainWidget, "userInfoView"); awayMessageBrowser->setTextFormat(AutoText); awayMessageBrowser->setNotifyClick(true); awayMessageBrowser->setText(mContact->awayMessage()); - QObject::connect( - awayMessageBrowser, SIGNAL(urlClick(const QString&)), - this, SLOT(slotUrlClicked(const QString&))); - QObject::connect( - awayMessageBrowser, SIGNAL(mailClick(const QString&, const QString&)), - this, SLOT(slotMailClicked(const QString&, const QString&))); + TQObject::connect( + awayMessageBrowser, TQT_SIGNAL(urlClick(const TQString&)), + this, TQT_SLOT(slotUrlClicked(const TQString&))); + TQObject::connect( + awayMessageBrowser, TQT_SIGNAL(mailClick(const TQString&, const TQString&)), + this, TQT_SLOT(slotMailClicked(const TQString&, const TQString&))); - connect(this, SIGNAL(user1Clicked()), - this, SLOT(slotFetchAwayMessage())); - connect(this, SIGNAL(closeClicked()), - this, SLOT(slotCloseClicked())); + connect(this, TQT_SIGNAL(user1Clicked()), + this, TQT_SLOT(slotFetchAwayMessage())); + connect(this, TQT_SIGNAL(closeClicked()), + this, TQT_SLOT(slotCloseClicked())); - connect(c, SIGNAL(awayMessageChanged()), - this, SLOT(slotAwayMessageChanged())); + connect(c, TQT_SIGNAL(awayMessageChanged()), + this, TQT_SLOT(slotAwayMessageChanged())); slotFetchAwayMessage(); } @@ -92,12 +92,12 @@ void ICQReadAway::slotCloseClicked() emit closing(); } -void ICQReadAway::slotUrlClicked(const QString &url) +void ICQReadAway::slotUrlClicked(const TQString &url) { new KRun(KURL(url)); } -void ICQReadAway::slotMailClicked(const QString&, const QString &address) +void ICQReadAway::slotMailClicked(const TQString&, const TQString &address) { new KRun(KURL(address)); } diff --git a/kopete/protocols/oscar/icq/icqreadaway.h b/kopete/protocols/oscar/icq/icqreadaway.h index 7e62588e..81981257 100644 --- a/kopete/protocols/oscar/icq/icqreadaway.h +++ b/kopete/protocols/oscar/icq/icqreadaway.h @@ -30,14 +30,14 @@ class ICQReadAway : public KDialogBase Q_OBJECT public: - ICQReadAway(ICQContact *, QWidget *parent = 0, const char* name = "ICQReadAway"); + ICQReadAway(ICQContact *, TQWidget *parent = 0, const char* name = "ICQReadAway"); private slots: void slotFetchAwayMessage(); void slotAwayMessageChanged(); void slotCloseClicked(); - void slotUrlClicked(const QString &url); - void slotMailClicked(const QString&, const QString &address); + void slotUrlClicked(const TQString &url); + void slotMailClicked(const TQString&, const TQString &address); signals: void closing(); @@ -45,7 +45,7 @@ class ICQReadAway : public KDialogBase private: ICQAccount *mAccount; ICQContact *mContact; - QVBox *mMainWidget; + TQVBox *mMainWidget; KTextBrowser *awayMessageBrowser; }; #endif diff --git a/kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp b/kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp index b1ab2eb4..3461ed8f 100644 --- a/kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp +++ b/kopete/protocols/oscar/icq/ui/icqaddcontactpage.cpp @@ -18,13 +18,13 @@ #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -39,28 +39,28 @@ #include "icqsearchdialog.h" -ICQAddContactPage::ICQAddContactPage(ICQAccount *owner, QWidget *parent, const char *name) +ICQAddContactPage::ICQAddContactPage(ICQAccount *owner, TQWidget *parent, const char *name) : AddContactPage(parent,name) { kdDebug(14153) << k_funcinfo << "called" << endl; mAccount = owner; m_searchDialog = 0L; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); addUI = new icqAddUI(this); - connect( addUI->searchButton, SIGNAL( clicked() ), this, SLOT( showSearchDialog() ) ); + connect( addUI->searchButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( showSearchDialog() ) ); } ICQAddContactPage::~ICQAddContactPage() { } -void ICQAddContactPage::setUINFromSearch( const QString& uin ) +void ICQAddContactPage::setUINFromSearch( const TQString& uin ) { addUI->uinEdit->setText( uin ); } -void ICQAddContactPage::showEvent(QShowEvent *e) +void ICQAddContactPage::showEvent(TQShowEvent *e) { // slotSelectionChanged(); AddContactPage::showEvent(e); @@ -70,7 +70,7 @@ bool ICQAddContactPage::apply(Kopete::Account* , Kopete::MetaContact *parentCont { kdDebug(14153) << k_funcinfo << "called; adding contact..." << endl; - QString contactId = addUI->uinEdit->text(); + TQString contactId = addUI->uinEdit->text(); kdDebug(14153) << k_funcinfo << "uin=" << contactId << endl; return mAccount->addContact(contactId, parentContact, Kopete::Account::ChangeKABC ); @@ -109,13 +109,13 @@ void ICQAddContactPage::showSearchDialog() { m_searchDialog = new ICQSearchDialog( mAccount, this, "icqSearchDialog" ); m_searchDialog->show(); - connect( m_searchDialog, SIGNAL( finished() ), this, SLOT( searchDialogDestroyed() ) ); + connect( m_searchDialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( searchDialogDestroyed() ) ); } } void ICQAddContactPage::searchDialogDestroyed() { - QObject::disconnect( this, 0, m_searchDialog, 0 ); + TQObject::disconnect( this, 0, m_searchDialog, 0 ); m_searchDialog->delayedDestruct(); m_searchDialog = NULL; } diff --git a/kopete/protocols/oscar/icq/ui/icqaddcontactpage.h b/kopete/protocols/oscar/icq/ui/icqaddcontactpage.h index e9285b79..c6c22eb2 100644 --- a/kopete/protocols/oscar/icq/ui/icqaddcontactpage.h +++ b/kopete/protocols/oscar/icq/ui/icqaddcontactpage.h @@ -18,7 +18,7 @@ #ifndef ICQADDCONTACTPAGE_H #define ICQADDCONTACTPAGE_H -#include +#include #include /** @@ -34,16 +34,16 @@ class ICQAddContactPage : public AddContactPage Q_OBJECT public: - ICQAddContactPage(ICQAccount *owner, QWidget *parent = 0, const char *name = 0); + ICQAddContactPage(ICQAccount *owner, TQWidget *parent = 0, const char *name = 0); ~ICQAddContactPage(); virtual bool validateData(); virtual bool apply(Kopete::Account* , Kopete::MetaContact *parentContact); - void setUINFromSearch( const QString& ); + void setUINFromSearch( const TQString& ); protected: - void showEvent(QShowEvent *e); + void showEvent(TQShowEvent *e); private slots: void showSearchDialog(); diff --git a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp index 76b56fba..a92b33de 100644 --- a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp +++ b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.cpp @@ -20,11 +20,11 @@ #include -#include -#include -#include +#include +#include +#include -ICQAuthReplyDialog::ICQAuthReplyDialog( QWidget *parent, const char *name, bool wasRequested ) +ICQAuthReplyDialog::ICQAuthReplyDialog( TQWidget *parent, const char *name, bool wasRequested ) : KDialogBase( parent, name, true, i18n( "Authorization Reply" ), KDialogBase::Ok | KDialogBase::Cancel ) { m_ui = new ICQAuthReplyUI( this ); @@ -46,7 +46,7 @@ ICQAuthReplyDialog::~ICQAuthReplyDialog() { } -void ICQAuthReplyDialog::setUser( const QString & user ) +void ICQAuthReplyDialog::setUser( const TQString & user ) { if ( m_wasRequested ) m_ui->lblUserReq->setText( @@ -55,12 +55,12 @@ void ICQAuthReplyDialog::setUser( const QString & user ) m_ui->lblUserReq->setText( i18n( "Authorization reply to %1." ).arg( user ) ); } -void ICQAuthReplyDialog::setRequestReason( const QString & reason ) +void ICQAuthReplyDialog::setRequestReason( const TQString & reason ) { m_ui->lblRequestReason->setText( reason ); } -QString ICQAuthReplyDialog::reason() +TQString ICQAuthReplyDialog::reason() { return m_ui->leReason->text(); } diff --git a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.h b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.h index da27b241..f32d4569 100644 --- a/kopete/protocols/oscar/icq/ui/icqauthreplydialog.h +++ b/kopete/protocols/oscar/icq/ui/icqauthreplydialog.h @@ -30,12 +30,12 @@ class ICQAuthReplyDialog : public KDialogBase { Q_OBJECT public: - ICQAuthReplyDialog(QWidget *parent = 0, const char *name = 0, bool wasRequested = true); + ICQAuthReplyDialog(TQWidget *parent = 0, const char *name = 0, bool wasRequested = true); ~ICQAuthReplyDialog(); - void setUser( const QString& user ); - void setRequestReason( const QString& reason ); - QString reason(); + void setUser( const TQString& user ); + void setRequestReason( const TQString& reason ); + TQString reason(); bool grantAuth(); private: bool m_wasRequested; diff --git a/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp b/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp index e4b308be..04a312a4 100644 --- a/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp +++ b/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.cpp @@ -17,13 +17,13 @@ #include "icqeditaccountwidget.h" #include "icqeditaccountui.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -44,15 +44,15 @@ #include "icqcontact.h" ICQEditAccountWidget::ICQEditAccountWidget(ICQProtocol *protocol, - Kopete::Account *account, QWidget *parent, const char *name) - : QWidget(parent, name), KopeteEditAccountWidget(account) + Kopete::Account *account, TQWidget *parent, const char *name) + : TQWidget(parent, name), KopeteEditAccountWidget(account) { kdDebug(14153) << k_funcinfo << "Called." << endl; mAccount=dynamic_cast(account); mProtocol=protocol; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); mAccountSettings = new ICQEditAccountUI( this ); mProtocol->fillComboFromTable( mAccountSettings->encodingCombo, mProtocol->encodings() ); @@ -67,7 +67,7 @@ ICQEditAccountWidget::ICQEditAccountWidget(ICQProtocol *protocol, mAccountSettings->mPasswordWidget->load(&mAccount->password()); mAccountSettings->chkAutoLogin->setChecked(mAccount->excludeConnect()); - QString serverEntry = mAccount->configGroup()->readEntry("Server", "login.oscar.aol.com"); + TQString serverEntry = mAccount->configGroup()->readEntry("Server", "login.oscar.aol.com"); int portEntry = mAccount->configGroup()->readNumEntry("Port", 5190); if ( serverEntry != "login.oscar.aol.com" || ( portEntry != 5190) ) mAccountSettings->optionOverrideServer->setChecked( true ); @@ -99,12 +99,12 @@ ICQEditAccountWidget::ICQEditAccountWidget(ICQProtocol *protocol, 4 ); } - QObject::connect(mAccountSettings->buttonRegister, SIGNAL(clicked()), this, SLOT(slotOpenRegister())); + TQObject::connect(mAccountSettings->buttonRegister, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpenRegister())); /* Set tab order to password custom widget correctly */ - QWidget::setTabOrder( mAccountSettings->edtAccountId, mAccountSettings->mPasswordWidget->mRemembered ); - QWidget::setTabOrder( mAccountSettings->mPasswordWidget->mRemembered, mAccountSettings->mPasswordWidget->mPassword ); - QWidget::setTabOrder( mAccountSettings->mPasswordWidget->mPassword, mAccountSettings->chkAutoLogin ); + TQWidget::setTabOrder( mAccountSettings->edtAccountId, mAccountSettings->mPasswordWidget->mRemembered ); + TQWidget::setTabOrder( mAccountSettings->mPasswordWidget->mRemembered, mAccountSettings->mPasswordWidget->mPassword ); + TQWidget::setTabOrder( mAccountSettings->mPasswordWidget->mPassword, mAccountSettings->chkAutoLogin ); } @@ -158,7 +158,7 @@ bool ICQEditAccountWidget::validateData() { kdDebug(14153) << k_funcinfo << "Called." << endl; - QString userName = mAccountSettings->edtAccountId->text(); + TQString userName = mAccountSettings->edtAccountId->text(); if (userName.isEmpty()) return false; diff --git a/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h b/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h index fc5c6d38..4bc1a52b 100644 --- a/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h +++ b/kopete/protocols/oscar/icq/ui/icqeditaccountwidget.h @@ -18,8 +18,8 @@ #ifndef ICQEDITACCOUNTWIDGET_H #define ICQEDITACCOUNTWIDGET_H -#include -#include +#include +#include #include "editaccountwidget.h" namespace Kopete { class Account; } @@ -28,13 +28,13 @@ class ICQAccount; class ICQProtocol; class ICQEditAccountUI; -class ICQEditAccountWidget : public QWidget, public KopeteEditAccountWidget +class ICQEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT public: ICQEditAccountWidget(ICQProtocol *, Kopete::Account *, - QWidget *parent=0, const char *name=0); + TQWidget *parent=0, const char *name=0); virtual bool validateData(); virtual Kopete::Account *apply(); diff --git a/kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp b/kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp index 0010166a..e52e707f 100644 --- a/kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp +++ b/kopete/protocols/oscar/icq/ui/icqsearchdialog.cpp @@ -18,12 +18,12 @@ #include "icqsearchdialog.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -41,20 +41,20 @@ #include "icqcontact.h" #include "icquserinfowidget.h" -ICQSearchDialog::ICQSearchDialog( ICQAccount* account, QWidget* parent, const char* name ) +ICQSearchDialog::ICQSearchDialog( ICQAccount* account, TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "ICQ User Search" ), 0, NoDefault ) { m_account = account; m_searchUI = new ICQSearchBase( this, name ); setMainWidget( m_searchUI ); - connect( m_searchUI->searchButton, SIGNAL( clicked() ), this, SLOT( startSearch() ) ); - connect( m_searchUI->searchResults, SIGNAL( selectionChanged() ), this, SLOT( resultSelectionChanged() ) ); - connect( m_searchUI->addButton, SIGNAL( clicked() ), this, SLOT( addContact() ) ); - connect( m_searchUI->clearButton, SIGNAL( clicked() ), this, SLOT( clearResults() ) ); - connect( m_searchUI->stopButton, SIGNAL( clicked() ), this, SLOT( stopSearch() ) ); - connect( m_searchUI->closeButton, SIGNAL( clicked() ), this, SLOT( closeDialog() ) ); - connect( m_searchUI->userInfoButton, SIGNAL( clicked() ), this, SLOT( userInfo() ) ); - connect( m_searchUI->newSearchButton, SIGNAL( clicked() ), this, SLOT( newSearch() ) ); + connect( m_searchUI->searchButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( startSearch() ) ); + connect( m_searchUI->searchResults, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( resultSelectionChanged() ) ); + connect( m_searchUI->addButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addContact() ) ); + connect( m_searchUI->clearButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clearResults() ) ); + connect( m_searchUI->stopButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( stopSearch() ) ); + connect( m_searchUI->closeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( closeDialog() ) ); + connect( m_searchUI->userInfoButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( userInfo() ) ); + connect( m_searchUI->newSearchButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( newSearch() ) ); ICQProtocol *p = ICQProtocol::protocol(); p->fillComboFromTable( m_searchUI->gender, p->genders() ); @@ -91,12 +91,12 @@ void ICQSearchDialog::startSearch() m_searchUI->searchButton->setEnabled( false ); m_searchUI->newSearchButton->setEnabled( false ); - connect( m_account->engine(), SIGNAL( gotSearchResults( const ICQSearchResult& ) ), - this, SLOT( newResult( const ICQSearchResult& ) ) ); - connect( m_account->engine(), SIGNAL( endOfSearch( int ) ), - this, SLOT( searchFinished( int ) ) ); + connect( m_account->engine(), TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ), + this, TQT_SLOT( newResult( const ICQSearchResult& ) ) ); + connect( m_account->engine(), TQT_SIGNAL( endOfSearch( int ) ), + this, TQT_SLOT( searchFinished( int ) ) ); - const QWidget* currentPage = m_searchUI->tabWidget3->currentPage(); + const TQWidget* currentPage = m_searchUI->tabWidget3->currentPage(); if ( currentPage == m_searchUI->tab ) { @@ -119,7 +119,7 @@ void ICQSearchDialog::startSearch() //create a ICQWPSearchInfo struct and send it ICQProtocol* p = ICQProtocol::protocol(); ICQWPSearchInfo info; - QTextCodec* codec = m_account->defaultCodec(); + TQTextCodec* codec = m_account->defaultCodec(); info.firstName = codec->fromUnicode( m_searchUI->firstName->text() ); info.lastName = codec->fromUnicode( m_searchUI->lastName->text() ); info.nickName = codec->fromUnicode( m_searchUI->nickName->text() ); @@ -159,10 +159,10 @@ void ICQSearchDialog::startSearch() void ICQSearchDialog::stopSearch() { - disconnect( m_account->engine(), SIGNAL( gotSearchResults( const ICQSearchResult& ) ), - this, SLOT( newResult( const ICQSearchResult& ) ) ); - disconnect( m_account->engine(), SIGNAL( endOfSearch( int ) ), - this, SLOT( searchFinished( int ) ) ); + disconnect( m_account->engine(), TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ), + this, TQT_SLOT( newResult( const ICQSearchResult& ) ) ); + disconnect( m_account->engine(), TQT_SIGNAL( endOfSearch( int ) ), + this, TQT_SLOT( searchFinished( int ) ) ); m_searchUI->stopButton->setEnabled( false ); m_searchUI->searchButton->setEnabled( true ); @@ -178,7 +178,7 @@ void ICQSearchDialog::addContact() } else { - QString uin = m_searchUI->searchResults->selectedItem()->text( 0 ); + TQString uin = m_searchUI->searchResults->selectedItem()->text( 0 ); kdDebug(OSCAR_ICQ_DEBUG) << k_funcinfo << "Passing " << uin << " back to the ACP" << endl; iacp->setUINFromSearch( uin ); @@ -203,7 +203,7 @@ void ICQSearchDialog::userInfo() NULL); m_infoWidget = new ICQUserInfoWidget( Kopete::UI::Global::mainWidget(), "icq info" ); - QObject::connect( m_infoWidget, SIGNAL( finished() ), this, SLOT( closeUserInfo() ) ); + TQObject::connect( m_infoWidget, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeUserInfo() ) ); m_infoWidget->setContact( m_contact ); m_infoWidget->setModal(true); @@ -217,7 +217,7 @@ void ICQSearchDialog::userInfo() void ICQSearchDialog::closeUserInfo() { // Free the ICQUserInfoWidget - QObject::disconnect( this, 0, m_infoWidget, 0 ); + TQObject::disconnect( this, 0, m_infoWidget, 0 ); m_infoWidget->delayedDestruct(); m_infoWidget = NULL; @@ -266,9 +266,9 @@ void ICQSearchDialog::newResult( const ICQSearchResult& info ) return; } - QTextCodec* codec = m_account->defaultCodec(); + TQTextCodec* codec = m_account->defaultCodec(); - QListViewItem *item = new QListViewItem( m_searchUI->searchResults, QString::number( info.uin ), + TQListViewItem *item = new TQListViewItem( m_searchUI->searchResults, TQString::number( info.uin ), codec->toUnicode( info.nickName ), codec->toUnicode( info.firstName ), codec->toUnicode( info.lastName ), @@ -296,13 +296,13 @@ void ICQSearchDialog::searchFinished( int numLeft ) void ICQSearchDialog::clearFields() { - m_searchUI->uin->setText( QString::null ); + m_searchUI->uin->setText( TQString::null ); - m_searchUI->firstName->setText( QString::null ); - m_searchUI->lastName->setText( QString::null ); - m_searchUI->nickName->setText( QString::null ); - m_searchUI->email->setText( QString::null ); - m_searchUI->city->setText( QString::null ); + m_searchUI->firstName->setText( TQString::null ); + m_searchUI->lastName->setText( TQString::null ); + m_searchUI->nickName->setText( TQString::null ); + m_searchUI->email->setText( TQString::null ); + m_searchUI->city->setText( TQString::null ); m_searchUI->gender->setCurrentItem( 0 ); // Unspecified m_searchUI->country->setCurrentItem( 0 ); m_searchUI->language->setCurrentItem( 0 ); diff --git a/kopete/protocols/oscar/icq/ui/icqsearchdialog.h b/kopete/protocols/oscar/icq/ui/icqsearchdialog.h index b14aa2a1..aca61ee7 100644 --- a/kopete/protocols/oscar/icq/ui/icqsearchdialog.h +++ b/kopete/protocols/oscar/icq/ui/icqsearchdialog.h @@ -33,7 +33,7 @@ class ICQSearchDialog : public KDialogBase { Q_OBJECT public: - ICQSearchDialog( ICQAccount* account, QWidget* parent = 0, const char* name = 0 ); + ICQSearchDialog( ICQAccount* account, TQWidget* parent = 0, const char* name = 0 ); ~ICQSearchDialog(); private slots: diff --git a/kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp b/kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp index 3830e05f..44fd5afd 100644 --- a/kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp +++ b/kopete/protocols/oscar/icq/ui/icquserinfowidget.cpp @@ -18,12 +18,12 @@ #include "icquserinfowidget.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -40,36 +40,36 @@ #include "icqinterestinfowidget.h" -ICQUserInfoWidget::ICQUserInfoWidget( QWidget * parent, const char * name ) +ICQUserInfoWidget::ICQUserInfoWidget( TQWidget * parent, const char * name ) : KDialogBase( KDialogBase::IconList, 0, parent, name, false, i18n( "ICQ User Information" ), Ok ) { kdDebug(14153) << k_funcinfo << "Creating new icq user info widget" << endl; - QFrame* genInfo = addPage( i18n( "General Info" ), + TQFrame* genInfo = addPage( i18n( "General Info" ), i18n( "General ICQ Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "identity" ), KIcon::Desktop ) ); - QVBoxLayout* genLayout = new QVBoxLayout( genInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "identity" ), KIcon::Desktop ) ); + TQVBoxLayout* genLayout = new TQVBoxLayout( genInfo ); m_genInfoWidget = new ICQGeneralInfoWidget( genInfo, "Basic Information" ); genLayout->addWidget( m_genInfoWidget ); - QFrame* workInfo = addPage( i18n( "Work Info" ), + TQFrame* workInfo = addPage( i18n( "Work Info" ), i18n( "Work Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "attach" ), KIcon::Desktop ) ); - QVBoxLayout* workLayout = new QVBoxLayout( workInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "attach" ), KIcon::Desktop ) ); + TQVBoxLayout* workLayout = new TQVBoxLayout( workInfo ); m_workInfoWidget = new ICQWorkInfoWidget( workInfo, "Work Information" ); workLayout->addWidget( m_workInfoWidget ); - QFrame* otherInfo = addPage( i18n( "Other Info" ), + TQFrame* otherInfo = addPage( i18n( "Other Info" ), i18n( "Other ICQ Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "email" ), KIcon::Desktop ) ); - QVBoxLayout* otherLayout = new QVBoxLayout( otherInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "email" ), KIcon::Desktop ) ); + TQVBoxLayout* otherLayout = new TQVBoxLayout( otherInfo ); m_otherInfoWidget = new ICQOtherInfoWidget( otherInfo, "Other Information" ); otherLayout->addWidget( m_otherInfoWidget ); - QFrame* interestInfo = addPage( i18n( "Interest Info" ), + TQFrame* interestInfo = addPage( i18n( "Interest Info" ), i18n( "Interest" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "email" ), KIcon::Desktop ) ); - QVBoxLayout* interestLayout = new QVBoxLayout( interestInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "email" ), KIcon::Desktop ) ); + TQVBoxLayout* interestLayout = new TQVBoxLayout( interestInfo ); m_interestInfoWidget = new ICQInterestInfoWidget( interestInfo, "Other Information" ); interestLayout->addWidget( m_interestInfoWidget ); @@ -78,21 +78,21 @@ ICQUserInfoWidget::ICQUserInfoWidget( QWidget * parent, const char * name ) void ICQUserInfoWidget::setContact( ICQContact* contact ) { m_contact = contact; - QObject::connect( contact, SIGNAL( haveBasicInfo( const ICQGeneralUserInfo& ) ), - this, SLOT( fillBasicInfo( const ICQGeneralUserInfo& ) ) ); - QObject::connect( contact, SIGNAL( haveWorkInfo( const ICQWorkUserInfo& ) ), - this, SLOT( fillWorkInfo( const ICQWorkUserInfo& ) ) ); - QObject::connect( contact, SIGNAL( haveEmailInfo( const ICQEmailInfo& ) ), - this, SLOT( fillEmailInfo( const ICQEmailInfo& ) ) ); - QObject::connect( contact, SIGNAL( haveMoreInfo( const ICQMoreUserInfo& ) ), - this, SLOT( fillMoreInfo( const ICQMoreUserInfo& ) ) ); - QObject::connect( contact, SIGNAL( haveInterestInfo( const ICQInterestInfo& ) ), - this, SLOT( fillInterestInfo( const ICQInterestInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveBasicInfo( const ICQGeneralUserInfo& ) ), + this, TQT_SLOT( fillBasicInfo( const ICQGeneralUserInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveWorkInfo( const ICQWorkUserInfo& ) ), + this, TQT_SLOT( fillWorkInfo( const ICQWorkUserInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveEmailInfo( const ICQEmailInfo& ) ), + this, TQT_SLOT( fillEmailInfo( const ICQEmailInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveMoreInfo( const ICQMoreUserInfo& ) ), + this, TQT_SLOT( fillMoreInfo( const ICQMoreUserInfo& ) ) ); + TQObject::connect( contact, TQT_SIGNAL( haveInterestInfo( const ICQInterestInfo& ) ), + this, TQT_SLOT( fillInterestInfo( const ICQInterestInfo& ) ) ); } void ICQUserInfoWidget::fillBasicInfo( const ICQGeneralUserInfo& ui ) { - QTextCodec* codec = m_contact->contactCodec(); + TQTextCodec* codec = m_contact->contactCodec(); m_genInfoWidget->uinEdit->setText( m_contact->contactId() ); m_genInfoWidget->nickNameEdit->setText( codec->toUnicode( ui.nickname ) ); m_genInfoWidget->fullNameEdit->setText( codec->toUnicode( ui.firstName ) + " " + codec->toUnicode( ui.lastName ) ); @@ -106,13 +106,13 @@ void ICQUserInfoWidget::fillBasicInfo( const ICQGeneralUserInfo& ui ) m_genInfoWidget->cellEdit->setText( codec->toUnicode( ui.cellNumber ) ); m_genInfoWidget->zipEdit->setText( codec->toUnicode( ui.zip ) ); - QString country = static_cast( m_contact->protocol() )->countries()[ui.country]; + TQString country = static_cast( m_contact->protocol() )->countries()[ui.country]; m_genInfoWidget->countryEdit->setText( country ); } void ICQUserInfoWidget::fillWorkInfo( const ICQWorkUserInfo& ui ) { - QTextCodec* codec = m_contact->contactCodec(); + TQTextCodec* codec = m_contact->contactCodec(); m_workInfoWidget->cityEdit->setText( codec->toUnicode( ui.city ) ); m_workInfoWidget->stateEdit->setText( codec->toUnicode( ui.state ) ); m_workInfoWidget->phoneEdit->setText( codec->toUnicode( ui.phone ) ); @@ -125,7 +125,7 @@ void ICQUserInfoWidget::fillWorkInfo( const ICQWorkUserInfo& ui ) m_workInfoWidget->homepageEdit->setText( codec->toUnicode( ui.homepage ) ); ICQProtocol* p = static_cast( m_contact->protocol() ); - QString country = p->countries()[ui.country]; + TQString country = p->countries()[ui.country]; m_workInfoWidget->countryEdit->setText( country ); //TODO handle the occupation @@ -137,24 +137,24 @@ void ICQUserInfoWidget::fillEmailInfo( const ICQEmailInfo& ) void ICQUserInfoWidget::fillInterestInfo( const ICQInterestInfo& info) { - QTextCodec* codec = m_contact->contactCodec(); + TQTextCodec* codec = m_contact->contactCodec(); if (info.count>0) { - QString topic = static_cast( m_contact->protocol() )->interests()[info.topics[0]]; + TQString topic = static_cast( m_contact->protocol() )->interests()[info.topics[0]]; m_interestInfoWidget->topic1->setText( topic ); m_interestInfoWidget->desc1->setText( codec->toUnicode( info.descriptions[0] ) ); } if (info.count>1) { - QString topic = static_cast( m_contact->protocol() )->interests()[info.topics[1]]; + TQString topic = static_cast( m_contact->protocol() )->interests()[info.topics[1]]; m_interestInfoWidget->topic2->setText( topic ); m_interestInfoWidget->desc2->setText( codec->toUnicode( info.descriptions[1] ) ); } if (info.count>2) { - QString topic = static_cast( m_contact->protocol() )->interests()[info.topics[2]]; + TQString topic = static_cast( m_contact->protocol() )->interests()[info.topics[2]]; m_interestInfoWidget->topic3->setText( topic ); m_interestInfoWidget->desc3->setText( codec->toUnicode( info.descriptions[2] ) ); } if (info.count>3) { - QString topic = static_cast( m_contact->protocol() )->interests()[info.topics[3]]; + TQString topic = static_cast( m_contact->protocol() )->interests()[info.topics[3]]; m_interestInfoWidget->topic4->setText( topic ); m_interestInfoWidget->desc4->setText( codec->toUnicode( info.descriptions[3] ) ); } @@ -162,22 +162,22 @@ void ICQUserInfoWidget::fillInterestInfo( const ICQInterestInfo& info) void ICQUserInfoWidget::fillMoreInfo( const ICQMoreUserInfo& ui ) { - QTextCodec* codec = m_contact->contactCodec(); + TQTextCodec* codec = m_contact->contactCodec(); m_genInfoWidget->ageSpinBox->setValue( ui.age ); if ( ui.birthday.isValid() ) m_genInfoWidget->birthday->setText( KGlobal::locale()->formatDate( ui.birthday,true ) ); - QString gender = static_cast( m_contact->protocol() )->genders()[ui.gender]; + TQString gender = static_cast( m_contact->protocol() )->genders()[ui.gender]; m_genInfoWidget->genderEdit->setText( gender ); m_genInfoWidget->homepageEdit->setText( codec->toUnicode( ui.homepage ) ); - QString ms = static_cast( m_contact->protocol() )->maritals()[ui.marital]; + TQString ms = static_cast( m_contact->protocol() )->maritals()[ui.marital]; m_genInfoWidget->marital->setText( ms ); m_genInfoWidget->oCityEdit->setText( codec->toUnicode( ui.ocity) ); m_genInfoWidget->oStateEdit->setText( codec->toUnicode( ui.ostate) ); - QString ocountry = static_cast( m_contact->protocol() )->countries()[ui.ocountry]; + TQString ocountry = static_cast( m_contact->protocol() )->countries()[ui.ocountry]; m_genInfoWidget->oCountryEdit->setText( ocountry ); //TODO languages diff --git a/kopete/protocols/oscar/icq/ui/icquserinfowidget.h b/kopete/protocols/oscar/icq/ui/icquserinfowidget.h index ef478e59..ac4048ab 100644 --- a/kopete/protocols/oscar/icq/ui/icquserinfowidget.h +++ b/kopete/protocols/oscar/icq/ui/icquserinfowidget.h @@ -33,7 +33,7 @@ class ICQUserInfoWidget : public KDialogBase { Q_OBJECT public: - ICQUserInfoWidget( QWidget* parent = 0, const char* name = 0 ); + ICQUserInfoWidget( TQWidget* parent = 0, const char* name = 0 ); void setContact( ICQContact* contact ); public slots: diff --git a/kopete/protocols/oscar/liboscar/aimlogintask.cpp b/kopete/protocols/oscar/liboscar/aimlogintask.cpp index 69a9c770..da066333 100644 --- a/kopete/protocols/oscar/liboscar/aimlogintask.cpp +++ b/kopete/protocols/oscar/liboscar/aimlogintask.cpp @@ -43,7 +43,7 @@ void AimLoginTask::onGo() //send Snac 17,06 sendAuthStringRequest(); //when we have the authKey, login - connect( this, SIGNAL( haveAuthKey() ), this, SLOT( sendLoginRequest() ) ); + connect( this, TQT_SIGNAL( haveAuthKey() ), this, TQT_SLOT( sendLoginRequest() ) ); } bool AimLoginTask::forMe( Transfer* transfer ) const @@ -72,17 +72,17 @@ bool AimLoginTask::forMe( Transfer* transfer ) const return false; } -const QByteArray& AimLoginTask::cookie() const +const TQByteArray& AimLoginTask::cookie() const { return m_cookie; } -const QString& AimLoginTask::bosHost() const +const TQString& AimLoginTask::bosHost() const { return m_bosHost; } -const QString& AimLoginTask::bosPort() const +const TQString& AimLoginTask::bosPort() const { return m_bosPort; } @@ -158,7 +158,7 @@ void AimLoginTask::sendLoginRequest() outbuf->addTLV(0x0001, client()->userId().length(), client()->userId().latin1()); - QByteArray digest( 17 ); //apparently MD5 digests are 16 bytes long + TQByteArray digest( 17 ); //apparently MD5 digests are 16 bytes long encodePassword( digest ); digest[16] = '\0'; //do this so that addTLV sees a NULL-terminator @@ -189,16 +189,16 @@ void AimLoginTask::handleLoginResponse() if ( !st ) { - setError( -1 , QString::null ); + setError( -1 , TQString::null ); return; } - QValueList tlvList = st->buffer()->getTLVList(); + TQValueList tlvList = st->buffer()->getTLVList(); TLV uin = findTLV( tlvList, 0x0001 ); if ( uin ) { - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(1) [SN], SN=" << QString( uin.data ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(1) [SN], SN=" << TQString( uin.data ) << endl; } TLV err = findTLV( tlvList, 0x0008 ); @@ -211,14 +211,14 @@ void AimLoginTask::handleLoginResponse() errorNum << endl; Oscar::SNAC s = { 0, 0, 0, 0 }; client()->fatalTaskError( s, errorNum ); - setError( errorNum, QString::null ); + setError( errorNum, TQString::null ); return; //if there's an error, we'll need to disconnect anyways } TLV server = findTLV( tlvList, 0x0005 ); if ( server ) { - QString ip = QString( server.data ); + TQString ip = TQString( server.data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(5) [SERVER] " << ip << endl; int index = ip.find( ':' ); m_bosHost = ip.left( index ); @@ -233,12 +233,12 @@ void AimLoginTask::handleLoginResponse() { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(6) [COOKIE]" << endl; m_cookie.duplicate( cookie.data ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } tlvList.clear(); } -void AimLoginTask::encodePassword( QByteArray& digest ) const +void AimLoginTask::encodePassword( TQByteArray& digest ) const { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; md5_state_t state; diff --git a/kopete/protocols/oscar/liboscar/aimlogintask.h b/kopete/protocols/oscar/liboscar/aimlogintask.h index 66308178..cc564592 100644 --- a/kopete/protocols/oscar/liboscar/aimlogintask.h +++ b/kopete/protocols/oscar/liboscar/aimlogintask.h @@ -33,9 +33,9 @@ public: virtual void onGo(); //Protocol specific stuff - const QByteArray& cookie() const; - const QString& bosHost() const; - const QString& bosPort() const; + const TQByteArray& cookie() const; + const TQString& bosHost() const; + const TQString& bosPort() const; protected: bool forMe( Transfer* transfer ) const; @@ -45,7 +45,7 @@ signals: private: //! Encodes a password using MD5 - void encodePassword( QByteArray& digest ) const; + void encodePassword( TQByteArray& digest ) const; //! Send SNAC 0x17, 0x06 void sendAuthStringRequest(); @@ -58,7 +58,7 @@ private: //! Parse the error codes to generate a reason why sign-on failed //Massive code duplication with CloseConnectionTask - bool parseDisconnectCode( int error, QString& reason ); + bool parseDisconnectCode( int error, TQString& reason ); private slots: //! Send SNAC 0x17, 0x02 @@ -66,16 +66,16 @@ private slots: private: //! The authorization key to use when encoding the password - QByteArray m_authKey; + TQByteArray m_authKey; //! The all important connection cookie - QByteArray m_cookie; + TQByteArray m_cookie; //! The new BOS Host - QString m_bosHost; + TQString m_bosHost; //! The new BOS Port - QString m_bosPort; + TQString m_bosPort; }; diff --git a/kopete/protocols/oscar/liboscar/blmlimitstask.cpp b/kopete/protocols/oscar/liboscar/blmlimitstask.cpp index c3fe7e6e..0b866de8 100644 --- a/kopete/protocols/oscar/liboscar/blmlimitstask.cpp +++ b/kopete/protocols/oscar/liboscar/blmlimitstask.cpp @@ -71,7 +71,7 @@ bool BLMLimitsTask::take(Transfer* transfer) break; } } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return true; } else diff --git a/kopete/protocols/oscar/liboscar/buddyicontask.cpp b/kopete/protocols/oscar/liboscar/buddyicontask.cpp index 1828b7b9..facaae1a 100644 --- a/kopete/protocols/oscar/liboscar/buddyicontask.cpp +++ b/kopete/protocols/oscar/liboscar/buddyicontask.cpp @@ -19,7 +19,7 @@ #include "buddyicontask.h" -#include +#include #include #include "buffer.h" #include "connection.h" @@ -36,20 +36,20 @@ BuddyIconTask::BuddyIconTask( Task* parent ) m_hashType = 0; } -void BuddyIconTask::uploadIcon( WORD length, const QByteArray& data ) +void BuddyIconTask::uploadIcon( WORD length, const TQByteArray& data ) { m_iconLength = length; m_icon = data; m_action = Send; } -void BuddyIconTask::requestIconFor( const QString& user ) +void BuddyIconTask::requestIconFor( const TQString& user ) { m_user = user; m_action = Receive; } -void BuddyIconTask::setHash( const QByteArray& md5Hash ) +void BuddyIconTask::setHash( const TQByteArray& md5Hash ) { m_hash = md5Hash; } @@ -125,7 +125,7 @@ bool BuddyIconTask::take( Transfer* transfer ) else handleICQBuddyIconResponse(); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; } @@ -150,10 +150,10 @@ void BuddyIconTask::handleUploadResponse() Buffer* b = transfer()->buffer(); b->skipBytes( 4 ); BYTE iconHashSize = b->getByte(); - QByteArray hash( b->getBlock( iconHashSize ) ); + TQByteArray hash( b->getBlock( iconHashSize ) ); //check the hash kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "hash " << hash << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } @@ -178,16 +178,16 @@ void BuddyIconTask::sendAIMBuddyIconRequest() void BuddyIconTask::handleAIMBuddyIconResponse() { Buffer* b = transfer()->buffer(); - QString user = b->getBUIN(); + TQString user = b->getBUIN(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Receiving buddy icon for " << user << endl; b->skipBytes(2); //unknown field. not used BYTE iconType = b->getByte(); Q_UNUSED( iconType ); BYTE hashSize = b->getByte(); - QByteArray iconHash; + TQByteArray iconHash; iconHash.duplicate( b->getBlock(hashSize) ); WORD iconSize = b->getWord(); - QByteArray icon; + TQByteArray icon; icon.duplicate( b->getBlock(iconSize) ); emit haveIcon( user, icon ); } @@ -213,7 +213,7 @@ void BuddyIconTask::sendICQBuddyIconRequest() void BuddyIconTask::handleICQBuddyIconResponse() { Buffer* b = transfer()->buffer(); - QString user = b->getBUIN(); + TQString user = b->getBUIN(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Receiving buddy icon for " << user << endl; b->skipBytes(2); //not used @@ -221,7 +221,7 @@ void BuddyIconTask::handleICQBuddyIconResponse() Q_UNUSED( iconType ); BYTE hashSize = b->getByte(); - QByteArray iconHash; + TQByteArray iconHash; iconHash.duplicate( b->getBlock(hashSize) ); b->skipBytes(1); //not used @@ -230,11 +230,11 @@ void BuddyIconTask::handleICQBuddyIconResponse() Q_UNUSED( iconType2 ); BYTE hashSize2 = b->getByte(); - QByteArray iconHash2; + TQByteArray iconHash2; iconHash2.duplicate( b->getBlock(hashSize2) ); WORD iconSize = b->getWord(); - QByteArray icon; + TQByteArray icon; icon.duplicate( b->getBlock(iconSize) ); emit haveIcon( user, icon ); diff --git a/kopete/protocols/oscar/liboscar/buddyicontask.h b/kopete/protocols/oscar/liboscar/buddyicontask.h index 83e70a53..f00a5b23 100644 --- a/kopete/protocols/oscar/liboscar/buddyicontask.h +++ b/kopete/protocols/oscar/liboscar/buddyicontask.h @@ -21,7 +21,7 @@ #define BUDDYICONTASK_H #include "task.h" -#include +#include class Transfer; @@ -31,11 +31,11 @@ Q_OBJECT public: BuddyIconTask( Task* parent ); - void uploadIcon( WORD length, const QByteArray& data ); + void uploadIcon( WORD length, const TQByteArray& data ); void setReferenceNum( WORD num ); - void requestIconFor( const QString& user ); - void setHash( const QByteArray& md5Hash ); + void requestIconFor( const TQString& user ); + void setHash( const TQByteArray& md5Hash ); void setHashType( BYTE type ); //! Task implementation @@ -44,7 +44,7 @@ public: bool take( Transfer* transfer ); signals: - void haveIcon( const QString&, QByteArray ); + void haveIcon( const TQString&, TQByteArray ); private: void sendIcon(); @@ -59,9 +59,9 @@ private: Action m_action; WORD m_iconLength; int m_refNum; - QByteArray m_icon; - QString m_user; - QByteArray m_hash; + TQByteArray m_icon; + TQString m_user; + TQByteArray m_hash; BYTE m_hashType; DWORD m_seq; }; diff --git a/kopete/protocols/oscar/liboscar/buffer.cpp b/kopete/protocols/oscar/liboscar/buffer.cpp index b04587e7..23dca1bb 100644 --- a/kopete/protocols/oscar/liboscar/buffer.cpp +++ b/kopete/protocols/oscar/liboscar/buffer.cpp @@ -40,7 +40,7 @@ Buffer::Buffer(const char *b, Q_ULONG len) mReadPos=0; } -Buffer::Buffer( const QByteArray& data ) +Buffer::Buffer( const TQByteArray& data ) { mBuffer.duplicate( data ); mReadPos = 0; @@ -110,7 +110,7 @@ int Buffer::addLEDWord(const DWORD dw) return mBuffer.size(); } -int Buffer::addString(QByteArray s) +int Buffer::addString(TQByteArray s) { unsigned int pos = mBuffer.size(); int len = s.size(); @@ -122,7 +122,7 @@ int Buffer::addString(QByteArray s) return mBuffer.size(); } -int Buffer::addString(QByteArray s, DWORD len) +int Buffer::addString(TQByteArray s, DWORD len) { Q_UNUSED( len ); return addString( s ); @@ -130,14 +130,14 @@ int Buffer::addString(QByteArray s, DWORD len) int Buffer::addString( const char* s, DWORD len ) { - QByteArray qba; + TQByteArray qba; qba.duplicate( s, len ); return addString( qba ); } int Buffer::addString(const unsigned char* s, DWORD len) { - QByteArray qba; + TQByteArray qba; qba.duplicate( (const char*) s, len ); return addString( qba ); } @@ -253,9 +253,9 @@ void Buffer::setBuf(char *b, const WORD len) mReadPos = 0; } -QByteArray Buffer::getBlock(WORD len) +TQByteArray Buffer::getBlock(WORD len) { - QByteArray ch( len ); + TQByteArray ch( len ); for ( int i = 0; i < len; i++ ) { ch[i] = getByte(); @@ -264,9 +264,9 @@ QByteArray Buffer::getBlock(WORD len) return ch; } -QByteArray Buffer::getBBlock(WORD len) +TQByteArray Buffer::getBBlock(WORD len) { - QByteArray data; + TQByteArray data; data.duplicate(mBuffer.data() + mReadPos, len); mReadPos += len; return data; @@ -286,9 +286,9 @@ WORD *Buffer::getWordBlock(WORD len) } -QCString Buffer::getLEBlock(WORD len) +TQCString Buffer::getLEBlock(WORD len) { - QCString ch; + TQCString ch; for (unsigned int i=0;i Buffer::getTLVList() +TQValueList Buffer::getTLVList() { - QValueList ql; + TQValueList ql; while (mReadPos < mBuffer.size()) { @@ -363,7 +363,7 @@ QValueList Buffer::getTLVList() } int Buffer::addChatTLV(const WORD type, const WORD exchange, - const QString &roomname, const WORD instance) + const TQString &roomname, const WORD instance) { addWord(type); addWord(0x0005 + roomname.length()); @@ -376,21 +376,21 @@ int Buffer::addChatTLV(const WORD type, const WORD exchange, void Buffer::expandBuffer(unsigned int inc) { - mBuffer.resize(mBuffer.size()+inc, QGArray::SpeedOptim); + mBuffer.resize(mBuffer.size()+inc, TQGArray::SpeedOptim); } -QCString Buffer::getLNTS() +TQCString Buffer::getLNTS() { WORD len = getLEWord(); - QCString qcs; + TQCString qcs; qcs.duplicate( getBlock(len) ); return qcs; } -QCString Buffer::getLELNTS() +TQCString Buffer::getLELNTS() { WORD len = getLEWord(); - QCString qcs; + TQCString qcs; qcs.duplicate( getBlock(len) ); return qcs; } @@ -425,10 +425,10 @@ int Buffer::addBSTR(const char * s) return ret; } -QByteArray Buffer::getBSTR() +TQByteArray Buffer::getBSTR() { WORD len = getWord(); - QByteArray qba; + TQByteArray qba; qba.duplicate( getBlock(len) ); return qba; } @@ -441,10 +441,10 @@ int Buffer::addBUIN(const char * s) return ret; } -QByteArray Buffer::getBUIN() +TQByteArray Buffer::getBUIN() { BYTE len = getByte(); - QByteArray qba; + TQByteArray qba; qba.duplicate( getBlock(len) ); return qba; } @@ -459,16 +459,16 @@ int Buffer::length() const return (mBuffer.size() - mReadPos); } -QString Buffer::toString() const +TQString Buffer::toString() const { // line format: //00 03 00 0b 00 00 90 b8 f5 9f 09 31 31 33 37 38 |;tJ�..........| int i = 0; - QString output = "\n"; - QString hex, ascii; + TQString output = "\n"; + TQString hex, ascii; - QByteArray::ConstIterator it; + TQByteArray::ConstIterator it; for ( it = mBuffer.begin(); it != mBuffer.end(); ++it ) { i++; @@ -477,7 +477,7 @@ QString Buffer::toString() const if ( c < 0x10 ) hex.append("0"); - hex.append(QString("%1 ").arg(c, 0, 16)); + hex.append(TQString("%1 ").arg(c, 0, 16)); ascii.append(isprint(c) ? c : '.'); @@ -485,8 +485,8 @@ QString Buffer::toString() const { output += hex + " |" + ascii + "|\n"; i=0; - hex=QString::null; - ascii=QString::null; + hex=TQString::null; + ascii=TQString::null; } } @@ -497,22 +497,22 @@ QString Buffer::toString() const return output; } -QString Buffer::peekBSTR() +TQString Buffer::peekBSTR() { int lastPos = mReadPos; - QByteArray qba = getBSTR(); + TQByteArray qba = getBSTR(); mReadPos = lastPos; - return QString( qba ); + return TQString( qba ); } -QString Buffer::peekBUIN() +TQString Buffer::peekBUIN() { int lastPos = mReadPos; - QByteArray qba = getBUIN(); + TQByteArray qba = getBUIN(); mReadPos = lastPos; - return QString( qba ); + return TQString( qba ); } -Buffer::operator QByteArray() const +Buffer::operator TQByteArray() const { return mBuffer; } diff --git a/kopete/protocols/oscar/liboscar/buffer.h b/kopete/protocols/oscar/liboscar/buffer.h index 900ddb50..b5035b52 100644 --- a/kopete/protocols/oscar/liboscar/buffer.h +++ b/kopete/protocols/oscar/liboscar/buffer.h @@ -22,8 +22,8 @@ #include "oscartypes.h" -#include -#include +#include +#include class QString; @@ -50,9 +50,9 @@ class Buffer /** * \brief Create a prefilled buffer * - * Constructor that creates a prefilled buffer from the QByteArray \p data + * Constructor that creates a prefilled buffer from the TQByteArray \p data */ - Buffer( const QByteArray& data ); + Buffer( const TQByteArray& data ); /** Default destructor */ @@ -72,8 +72,8 @@ class Buffer /** * adds the given string to the buffer (make sure it's NULL-terminated) */ - int addString(QByteArray); - int addString(QByteArray, DWORD); + int addString(TQByteArray); + int addString(TQByteArray, DWORD); int addString(const char*, DWORD); int addString(const unsigned char*, DWORD); @@ -141,9 +141,9 @@ class Buffer int addLETLV(WORD, WORD, const char *); /** - * Returns a QString representation of the buffer + * Returns a TQString representation of the buffer */ - QString toString() const; + TQString toString() const; /** * gets a DWord out of the buffer @@ -183,8 +183,8 @@ class Buffer /** * Allocates memory for and gets a block of buffer bytes */ - QByteArray getBlock(WORD len); - QByteArray getBBlock(WORD len); + TQByteArray getBlock(WORD len); + TQByteArray getBBlock(WORD len); /** * Allocates memory for and gets a block of buffer words @@ -194,14 +194,14 @@ class Buffer /** * Same as above but returning little-endian */ - QCString getLEBlock(WORD len); + TQCString getLEBlock(WORD len); /** * Convenience function that gets a LNTS (long null terminated string) * from the buffer. Otherwise you'd need a getWord() + getBlock() call :) */ - QCString getLNTS(); - QCString getLELNTS(); + TQCString getLNTS(); + TQCString getLELNTS(); /** * adds a 16-bit long TLV @@ -231,25 +231,25 @@ class Buffer /** * Gets a list of TLV's */ - QValueList getTLVList(); + TQValueList getTLVList(); /** * Creates a chat data segment for a tlv and calls addTLV with that data */ - int addChatTLV(const WORD, const WORD, const QString &, const WORD); + int addChatTLV(const WORD, const WORD, const TQString &, const WORD); /** * Similar to the LNTS functions but string is NOT null-terminated */ int addBSTR(const char * s); - QByteArray getBSTR(); - QString peekBSTR(); + TQByteArray getBSTR(); + TQString peekBSTR(); int addBUIN(const char * s); - QByteArray getBUIN(); - QString peekBUIN(); + TQByteArray getBUIN(); + TQString peekBUIN(); - operator QByteArray() const; + operator TQByteArray() const; private: /** @@ -258,7 +258,7 @@ class Buffer void expandBuffer(unsigned int inc); private: - QByteArray mBuffer; + TQByteArray mBuffer; unsigned int mReadPos; }; diff --git a/kopete/protocols/oscar/liboscar/bytestream.cpp b/kopete/protocols/oscar/liboscar/bytestream.cpp index 109dbbad..87603c76 100644 --- a/kopete/protocols/oscar/liboscar/bytestream.cpp +++ b/kopete/protocols/oscar/liboscar/bytestream.cpp @@ -35,7 +35,7 @@ //! //! The signals connectionClosed(), delayedCloseFinished(), readyRead(), //! bytesWritten(), and error() serve the exact same function as those from -//! QSocket. +//! TQSocket. //! //! The simplest way to create a ByteStream is to reimplement isOpen(), close(), //! and tryWrite(). Call appendRead() whenever you want to make data available for @@ -59,13 +59,13 @@ class ByteStream::Private public: Private() {} - QByteArray readBuf, writeBuf; + TQByteArray readBuf, writeBuf; }; //! //! Constructs a ByteStream object with parent \a parent. -ByteStream::ByteStream(QObject *parent) -:QObject(parent) +ByteStream::ByteStream(TQObject *parent) +:TQObject(parent) { d = new Private; } @@ -95,7 +95,7 @@ void ByteStream::close() //! //! Writes array \a a to the stream. -void ByteStream::write(const QByteArray &a) +void ByteStream::write(const TQByteArray &a) { if(!isOpen()) return; @@ -109,7 +109,7 @@ void ByteStream::write(const QByteArray &a) //! //! Reads bytes \a bytes of data from the stream and returns them as an array. If \a bytes is 0, then //! \a read will return all available data. -QByteArray ByteStream::read(int bytes) +TQByteArray ByteStream::read(int bytes) { return takeRead(bytes); } @@ -130,9 +130,9 @@ int ByteStream::bytesToWrite() const //! //! Writes string \a cs to the stream. -void ByteStream::write(const QCString &cs) +void ByteStream::write(const TQCString &cs) { - QByteArray block(cs.length()); + TQByteArray block(cs.length()); memcpy(block.data(), cs.data(), block.size()); write(block); } @@ -153,14 +153,14 @@ void ByteStream::clearWriteBuffer() //! //! Appends \a block to the end of the read buffer. -void ByteStream::appendRead(const QByteArray &block) +void ByteStream::appendRead(const TQByteArray &block) { appendArray(&d->readBuf, block); } //! //! Appends \a block to the end of the write buffer. -void ByteStream::appendWrite(const QByteArray &block) +void ByteStream::appendWrite(const TQByteArray &block) { appendArray(&d->writeBuf, block); } @@ -169,7 +169,7 @@ void ByteStream::appendWrite(const QByteArray &block) //! Returns \a size bytes from the start of the read buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeRead(int size, bool del) +TQByteArray ByteStream::takeRead(int size, bool del) { return takeArray(&d->readBuf, size, del); } @@ -178,21 +178,21 @@ QByteArray ByteStream::takeRead(int size, bool del) //! Returns \a size bytes from the start of the write buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeWrite(int size, bool del) +TQByteArray ByteStream::takeWrite(int size, bool del) { return takeArray(&d->writeBuf, size, del); } //! //! Returns a reference to the read buffer. -QByteArray & ByteStream::readBuf() +TQByteArray & ByteStream::readBuf() { return d->readBuf; } //! //! Returns a reference to the write buffer. -QByteArray & ByteStream::writeBuf() +TQByteArray & ByteStream::writeBuf() { return d->writeBuf; } @@ -207,7 +207,7 @@ int ByteStream::tryWrite() //! //! Append array \a b to the end of the array pointed to by \a a. -void ByteStream::appendArray(QByteArray *a, const QByteArray &b) +void ByteStream::appendArray(TQByteArray *a, const TQByteArray &b) { int oldsize = a->size(); a->resize(oldsize + b.size()); @@ -218,9 +218,9 @@ void ByteStream::appendArray(QByteArray *a, const QByteArray &b) //! Returns \a size bytes from the start of the array pointed to by \a from. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeArray(QByteArray *from, int size, bool del) +TQByteArray ByteStream::takeArray(TQByteArray *from, int size, bool del) { - QByteArray a; + TQByteArray a; if(size == 0) { a = from->copy(); if(del) diff --git a/kopete/protocols/oscar/liboscar/bytestream.h b/kopete/protocols/oscar/liboscar/bytestream.h index 1c2dfa15..a990a940 100644 --- a/kopete/protocols/oscar/liboscar/bytestream.h +++ b/kopete/protocols/oscar/liboscar/bytestream.h @@ -21,8 +21,8 @@ #ifndef CS_BYTESTREAM_H #define CS_BYTESTREAM_H -#include -#include +#include +#include // CS_NAMESPACE_BEGIN @@ -32,20 +32,20 @@ class ByteStream : public QObject Q_OBJECT public: enum Error { ErrRead, ErrWrite, ErrCustom = 10 }; - ByteStream(QObject *parent=0); + ByteStream(TQObject *parent=0); virtual ~ByteStream()=0; virtual bool isOpen() const; virtual void close(); - virtual void write(const QByteArray &); - virtual QByteArray read(int bytes=0); + virtual void write(const TQByteArray &); + virtual TQByteArray read(int bytes=0); virtual int bytesAvailable() const; virtual int bytesToWrite() const; - void write(const QCString &); + void write(const TQCString &); - static void appendArray(QByteArray *a, const QByteArray &b); - static QByteArray takeArray(QByteArray *from, int size=0, bool del=true); + static void appendArray(TQByteArray *a, const TQByteArray &b); + static TQByteArray takeArray(TQByteArray *from, int size=0, bool del=true); signals: void connectionClosed(); @@ -57,12 +57,12 @@ signals: protected: void clearReadBuffer(); void clearWriteBuffer(); - void appendRead(const QByteArray &); - void appendWrite(const QByteArray &); - QByteArray takeRead(int size=0, bool del=true); - QByteArray takeWrite(int size=0, bool del=true); - QByteArray & readBuf(); - QByteArray & writeBuf(); + void appendRead(const TQByteArray &); + void appendWrite(const TQByteArray &); + TQByteArray takeRead(int size=0, bool del=true); + TQByteArray takeWrite(int size=0, bool del=true); + TQByteArray & readBuf(); + TQByteArray & writeBuf(); virtual int tryWrite(); private: diff --git a/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp b/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp index 5cb44720..7c6ff26a 100644 --- a/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp +++ b/kopete/protocols/oscar/liboscar/changevisibilitytask.cpp @@ -18,7 +18,7 @@ #include "changevisibilitytask.h" -#include +#include #include #include "buffer.h" #include "client.h" @@ -64,13 +64,13 @@ bool ChangeVisibilityTask::take(Transfer* transfer) if ( forMe( transfer ) ) { setTransfer( transfer ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; } else { - setError( 0, QString::null ); + setError( 0, TQString::null ); return false; } } @@ -82,7 +82,7 @@ void ChangeVisibilityTask::onGo() if ( !item ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Didn't find a visibility item" << endl; - setError( 0, QString::null ); + setError( 0, TQString::null ); return; } @@ -90,14 +90,14 @@ void ChangeVisibilityTask::onGo() BYTE visibleByte = m_visible ? 0x04 : 0x03; c8tlv.addByte( visibleByte ); - QValueList tList; + TQValueList tList; tList.append( TLV( 0x00CA, c8tlv.length(), c8tlv.buffer() ) ); Oscar::SSI newSSI(item); if ( Oscar::uptateTLVs( newSSI, tList ) == false ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Visibility didn't change, don't update" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return; } @@ -118,8 +118,8 @@ void ChangeVisibilityTask::onGo() b->addWord( newSSI.type() ); b->addWord( newSSI.tlvListLength() ); - QValueList::const_iterator it2 = newSSI.tlvList().begin(); - QValueList::const_iterator listEnd2 = newSSI.tlvList().end(); + TQValueList::const_iterator it2 = newSSI.tlvList().begin(); + TQValueList::const_iterator listEnd2 = newSSI.tlvList().end(); for( ; it2 != listEnd2; ++it2 ) b->addTLV( ( *it2 ) ); diff --git a/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp b/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp index f661d1f4..914de496 100644 --- a/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp +++ b/kopete/protocols/oscar/liboscar/chatnavservicetask.cpp @@ -45,7 +45,7 @@ ChatNavServiceTask::RequestType ChatNavServiceTask::requestType() return m_type; } -QValueList ChatNavServiceTask::exchangeList() const +TQValueList ChatNavServiceTask::exchangeList() const { return m_exchanges; } @@ -97,7 +97,7 @@ bool ChatNavServiceTask::take( Transfer* transfer ) } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; @@ -113,12 +113,12 @@ void ChatNavServiceTask::onGo() send( t ); } -void ChatNavServiceTask::createRoom( WORD exchange, const QString& name ) +void ChatNavServiceTask::createRoom( WORD exchange, const TQString& name ) { //most of this comes from gaim. thanks to them for figuring it out - QString cookie = "create"; //hardcoded, seems to be ignored by AOL - QString lang = "en"; - QString charset = "us-ascii"; + TQString cookie = "create"; //hardcoded, seems to be ignored by AOL + TQString lang = "en"; + TQString charset = "us-ascii"; FLAP f = { 0x02, 0, 0 }; SNAC s = { 0x000D, 0x0008, 0x0000, client()->snacSequence() }; @@ -202,7 +202,7 @@ void ChatNavServiceTask::handleExchangeInfo( const TLV& t ) break; case 0xD3: { - QString eName( t.data ); + TQString eName( t.data ); kdDebug(OSCAR_RAW_DEBUG) << "exchange name: " << eName << endl; exchangeInfo.description = eName; break; @@ -227,16 +227,16 @@ void ChatNavServiceTask::handleBasicRoomInfo( const TLV& t ) kdDebug(OSCAR_RAW_DEBUG) << "Parsing room info TLV" << t.length << endl; Buffer b(t.data); WORD exchange = b.getWord(); - QByteArray cookie( b.getBlock( b.getByte() ) ); + TQByteArray cookie( b.getBlock( b.getByte() ) ); WORD instance = b.getWord(); b.getByte(); //detail level, which i'm not sure we need WORD tlvCount = b.getWord(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "e: " << exchange << " c: " << cookie << " i: " << instance << endl; - QValueList tlvList = b.getTLVList(); - QValueList::iterator it, itEnd = tlvList.end(); - QString roomName; + TQValueList tlvList = b.getTLVList(); + TQValueList::iterator it, itEnd = tlvList.end(); + TQString roomName; for ( it = tlvList.begin(); it != itEnd; ++it ) { TLV t = ( *it ); @@ -255,7 +255,7 @@ void ChatNavServiceTask::handleBasicRoomInfo( const TLV& t ) kdDebug(OSCAR_RAW_DEBUG) << "evil generated array" << endl; break; case 0x6A: - roomName = QString( t.data ); + roomName = TQString( t.data ); kdDebug(OSCAR_RAW_DEBUG) << "fully qualified name" << roomName << endl; break; case 0x6B: @@ -305,7 +305,7 @@ void ChatNavServiceTask::handleCreateRoomInfo( const TLV& t ) Buffer b( t.data ); WORD exchange = b.getWord(); WORD cookieLength = b.getByte(); - QByteArray cookie( b.getBlock( cookieLength ) ); + TQByteArray cookie( b.getBlock( cookieLength ) ); WORD instance = b.getWord(); BYTE detailLevel = b.getByte(); @@ -316,16 +316,16 @@ void ChatNavServiceTask::handleCreateRoomInfo( const TLV& t ) } WORD numberTlvs = b.getWord(); - QValueList roomTLVList = b.getTLVList(); - QValueList::iterator itEnd = roomTLVList.end(); - for ( QValueList::iterator it = roomTLVList.begin(); + TQValueList roomTLVList = b.getTLVList(); + TQValueList::iterator itEnd = roomTLVList.end(); + for ( TQValueList::iterator it = roomTLVList.begin(); it != itEnd; ++ it ) { switch( ( *it ).type ) { case 0x006A: { - QString fqcn = QString( ( *it ).data ); + TQString fqcn = TQString( ( *it ).data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "fqcn: " << fqcn << endl; break; } @@ -342,7 +342,7 @@ void ChatNavServiceTask::handleCreateRoomInfo( const TLV& t ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "max occupancy: " << t.data << endl; break; case 0x00D3: - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "name: " << QString( t.data ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "name: " << TQString( t.data ) << endl; break; case 0x00D5: kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "create perms: " << t.data << endl; diff --git a/kopete/protocols/oscar/liboscar/chatnavservicetask.h b/kopete/protocols/oscar/liboscar/chatnavservicetask.h index 6b7d8764..8af63247 100644 --- a/kopete/protocols/oscar/liboscar/chatnavservicetask.h +++ b/kopete/protocols/oscar/liboscar/chatnavservicetask.h @@ -19,7 +19,7 @@ #include "task.h" -#include +#include #include class Transfer; @@ -43,13 +43,13 @@ public: virtual bool forMe( const Transfer* transfer ) const; virtual bool take( Transfer* transfer ); virtual void onGo(); - void createRoom( WORD exchange, const QString& name ); //create a room. sends the packet as well + void createRoom( WORD exchange, const TQString& name ); //create a room. sends the packet as well - QValueList exchangeList() const; + TQValueList exchangeList() const; signals: - void haveChatExchanges( const QValueList& ); - void connectChat( WORD, QByteArray, WORD, const QString& ); + void haveChatExchanges( const TQValueList& ); + void connectChat( WORD, TQByteArray, WORD, const TQString& ); private: void handleExchangeInfo( const TLV& t ); @@ -57,7 +57,7 @@ private: void handleCreateRoomInfo( const TLV& t ); private: - QValueList m_exchanges; + TQValueList m_exchanges; RequestType m_type; }; diff --git a/kopete/protocols/oscar/liboscar/chatservicetask.cpp b/kopete/protocols/oscar/liboscar/chatservicetask.cpp index 9d07afe8..c8998495 100644 --- a/kopete/protocols/oscar/liboscar/chatservicetask.cpp +++ b/kopete/protocols/oscar/liboscar/chatservicetask.cpp @@ -20,17 +20,17 @@ #include "chatservicetask.h" -#include +#include #include #include -#include +#include #include "connection.h" #include "transfer.h" #include "buffer.h" #include "oscartypes.h" -ChatServiceTask::ChatServiceTask( Task* parent, Oscar::WORD exchange, const QString& room ) +ChatServiceTask::ChatServiceTask( Task* parent, Oscar::WORD exchange, const TQString& room ) : Task( parent ), m_encoding( "us-ascii" ) { m_exchange = exchange; @@ -47,7 +47,7 @@ void ChatServiceTask::setMessage( const Oscar::Message& msg ) m_message = msg; } -void ChatServiceTask::setEncoding( const QCString& enc ) +void ChatServiceTask::setEncoding( const TQCString& enc ) { m_encoding = enc; } @@ -56,7 +56,7 @@ void ChatServiceTask::onGo() { if ( !m_message ) { - setSuccess( true, QString::null ); + setSuccess( true, TQString::null ); return; } @@ -78,7 +78,7 @@ void ChatServiceTask::onGo() type3.type = 0x0003; type3.length = 0x0002; - type3.data = QCString( "en" ); //hardcode for right now. don't know that we can do others + type3.data = TQCString( "en" ); //hardcode for right now. don't know that we can do others type1.type = 0x0001; type1.length = m_message.textArray().size(); @@ -158,7 +158,7 @@ bool ChatServiceTask::take( Transfer* t ) break; }; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; } @@ -170,7 +170,7 @@ void ChatServiceTask::parseRoomInfo() Buffer* b = transfer()->buffer(); m_exchange = b->getWord(); - QByteArray cookie( b->getBlock( b->getByte() ) ); + TQByteArray cookie( b->getBlock( b->getByte() ) ); instance = b->getWord(); detailLevel = b->getByte(); @@ -179,15 +179,15 @@ void ChatServiceTask::parseRoomInfo() //correctly anyways b->skipBytes( 2 ); - QValueList tlvList = b->getTLVList(); - QValueList::iterator it = tlvList.begin(); - QValueList::iterator itEnd = tlvList.end(); + TQValueList tlvList = b->getTLVList(); + TQValueList::iterator it = tlvList.begin(); + TQValueList::iterator itEnd = tlvList.end(); for ( ; it != itEnd; ++it ) { switch ( ( *it ).type ) { case 0x006A: - m_internalRoom = QString( ( *it ).data ); + m_internalRoom = TQString( ( *it ).data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "room name: " << m_room << endl; break; case 0x006F: @@ -221,7 +221,7 @@ void ChatServiceTask::parseJoinNotification() Buffer* b = transfer()->buffer(); while ( b->length() > 0 ) { - QString sender( b->getBUIN() ); + TQString sender( b->getBUIN() ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "user name:" << sender << endl; WORD warningLevel = b->getWord(); WORD numTLVs = b->getWord(); @@ -252,7 +252,7 @@ void ChatServiceTask::parseLeftNotification() Buffer* b = transfer()->buffer(); while ( b->length() > 0 ) { - QString sender( b->getBUIN() ); + TQString sender( b->getBUIN() ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "user name:" << sender << endl; WORD warningLevel = b->getWord(); WORD numTLVs = b->getWord(); @@ -281,12 +281,12 @@ void ChatServiceTask::parseChatMessage() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "have new chat room message" << endl; Buffer* b = transfer()->buffer(); bool whisper = true, reflection = false; - QByteArray language, encoding, message; - QString sender; - QByteArray icbmCookie( b->getBlock( 8 ) ); + TQByteArray language, encoding, message; + TQString sender; + TQByteArray icbmCookie( b->getBlock( 8 ) ); b->skipBytes( 2 ); //message channel always 0x03 - QValueList chatTLVs = b->getTLVList(); - QValueList::iterator it, itEnd = chatTLVs.end(); + TQValueList chatTLVs = b->getTLVList(); + TQValueList::iterator it, itEnd = chatTLVs.end(); for ( it = chatTLVs.begin(); it != itEnd; ++it ) { switch ( ( *it ).type ) @@ -326,7 +326,7 @@ void ChatServiceTask::parseChatMessage() case 0x0003: //user info { Buffer b( ( *it ).data ); - sender = QString( b.getBUIN() ); + sender = TQString( b.getBUIN() ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "got user info. sender is " << sender << endl; } break; @@ -334,14 +334,14 @@ void ChatServiceTask::parseChatMessage() } } - QTextCodec* codec = QTextCodec::codecForName( encoding ); + TQTextCodec* codec = TQTextCodec::codecForName( encoding ); if ( ! codec ) - codec = QTextCodec::codecForMib( 4 ); - QString msgText( codec->toUnicode( message ) ); + codec = TQTextCodec::codecForMib( 4 ); + TQString msgText( codec->toUnicode( message ) ); Oscar::Message omessage; omessage.setReceiver( client()->userId() ); omessage.setSender( sender ); - omessage.setTimestamp( QDateTime::currentDateTime() ); + omessage.setTimestamp( TQDateTime::currentDateTime() ); omessage.setText( Oscar::Message::UTF8, msgText ); omessage.setType( 0x03 ); omessage.setExchange( m_exchange ); diff --git a/kopete/protocols/oscar/liboscar/chatservicetask.h b/kopete/protocols/oscar/liboscar/chatservicetask.h index 90e29300..5f19fcae 100644 --- a/kopete/protocols/oscar/liboscar/chatservicetask.h +++ b/kopete/protocols/oscar/liboscar/chatservicetask.h @@ -29,7 +29,7 @@ class ChatServiceTask : public Task { Q_OBJECT public: - ChatServiceTask( Task* parent, Oscar::WORD exchange, const QString& room ); + ChatServiceTask( Task* parent, Oscar::WORD exchange, const TQString& room ); ~ChatServiceTask(); void onGo(); @@ -44,11 +44,11 @@ public: void parseChatError(); void setMessage( const Oscar::Message& msg ); - void setEncoding( const QCString &enc ); + void setEncoding( const TQCString &enc ); signals: - void userJoinedChat( Oscar::WORD, const QString& r, const QString& u ); - void userLeftChat( Oscar::WORD, const QString& r, const QString& u ); + void userJoinedChat( Oscar::WORD, const TQString& r, const TQString& u ); + void userLeftChat( Oscar::WORD, const TQString& r, const TQString& u ); void newChatMessage( const Oscar::Message& msg ); protected: @@ -56,10 +56,10 @@ protected: private: WORD m_exchange; - QString m_room; - QString m_internalRoom; + TQString m_room; + TQString m_internalRoom; Oscar::Message m_message; - QCString m_encoding; + TQCString m_encoding; }; #endif diff --git a/kopete/protocols/oscar/liboscar/client.cpp b/kopete/protocols/oscar/liboscar/client.cpp index af967512..222d9d69 100644 --- a/kopete/protocols/oscar/liboscar/client.cpp +++ b/kopete/protocols/oscar/liboscar/client.cpp @@ -20,8 +20,8 @@ #include "client.h" -#include -#include +#include +#include #include //for kdDebug() #include @@ -66,13 +66,13 @@ namespace class DefaultCodecProvider : public Client::CodecProvider { public: - virtual QTextCodec* codecForContact( const QString& ) const + virtual TQTextCodec* codecForContact( const TQString& ) const { - return QTextCodec::codecForMib( 4 ); + return TQTextCodec::codecForMib( 4 ); } - virtual QTextCodec* codecForAccount() const + virtual TQTextCodec* codecForAccount() const { - return QTextCodec::codecForMib( 4 ); + return TQTextCodec::codecForMib( 4 ); } }; @@ -84,7 +84,7 @@ class Client::ClientPrivate public: ClientPrivate() {} - QString host, user, pass; + TQString host, user, pass; uint port; int tzoffset; bool active; @@ -95,11 +95,11 @@ public: //Protocol specific data bool isIcq; bool redirectRequested; - QValueList redirectionServices; + TQValueList redirectionServices; WORD currentRedirect; - QByteArray cookie; + TQByteArray cookie; DWORD connectAsStatus; // icq only - QString connectWithMessage; // icq only + TQString connectWithMessage; // icq only Oscar::Settings* settings; //Tasks @@ -120,25 +120,25 @@ public: UserDetails ourDetails; //Infos - QValueList exchanges; + TQValueList exchanges; - QString statusMessage; // for away-,DND-message etc... + TQString statusMessage; // for away-,DND-message etc... //away messages struct AwayMsgRequest { - QString contact; + TQString contact; ICQStatus contactStatus; }; - QValueList awayMsgRequestQueue; - QTimer* awayMsgRequestTimer; + TQValueList awayMsgRequestQueue; + TQTimer* awayMsgRequestTimer; CodecProvider* codecProvider; const Oscar::ClientVersion* version; }; -Client::Client( QObject* parent ) -:QObject( parent, "oscarclient" ) +Client::Client( TQObject* parent ) +:TQObject( parent, "oscarclient" ) { m_loginTask = 0L; m_loginTaskTwo = 0L; @@ -162,13 +162,13 @@ Client::Client( QObject* parent ) d->stage = ClientPrivate::StageOne; d->typingNotifyTask = 0L; d->ssiModifyTask = 0L; - d->awayMsgRequestTimer = new QTimer(); + d->awayMsgRequestTimer = new TQTimer(); d->codecProvider = &defaultCodecProvider; - connect( this, SIGNAL( redirectionFinished( WORD ) ), - this, SLOT( checkRedirectionQueue( WORD ) ) ); - connect( d->awayMsgRequestTimer, SIGNAL( timeout() ), - this, SLOT( nextICQAwayMessageRequest() ) ); + connect( this, TQT_SIGNAL( redirectionFinished( WORD ) ), + this, TQT_SLOT( checkRedirectionQueue( WORD ) ) ); + connect( d->awayMsgRequestTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( nextICQAwayMessageRequest() ) ); } Client::~Client() @@ -188,20 +188,20 @@ Oscar::Settings* Client::clientSettings() const return d->settings; } -void Client::connectToServer( Connection *c, const QString& server, bool auth ) +void Client::connectToServer( Connection *c, const TQString& server, bool auth ) { d->connections.append( c ); if ( auth == true ) { m_loginTask = new StageOneLoginTask( c->rootTask() ); - connect( m_loginTask, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) ); + connect( m_loginTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) ); } - connect( c, SIGNAL( socketError( int, const QString& ) ), this, SLOT( determineDisconnection( int, const QString& ) ) ); + connect( c, TQT_SIGNAL( socketError( int, const TQString& ) ), this, TQT_SLOT( determineDisconnection( int, const TQString& ) ) ); c->connectToServer(server, auth); } -void Client::start( const QString &host, const uint port, const QString &userId, const QString &pass ) +void Client::start( const TQString &host, const uint port, const TQString &userId, const TQString &pass ) { Q_UNUSED( host ); Q_UNUSED( port ); @@ -223,7 +223,7 @@ void Client::close() if ( d->stage == ClientPrivate::StageTwo ) { d->connectAsStatus = 0x0; - d->connectWithMessage = QString::null; + d->connectWithMessage = TQString::null; } d->exchanges.clear(); @@ -233,18 +233,18 @@ void Client::close() d->ssiManager->clear(); } -void Client::setStatus( AIMStatus status, const QString &_message ) +void Client::setStatus( AIMStatus status, const TQString &_message ) { // AIM: you're away exactly when your away message isn't empty. - // can't use QString::null as a message either; ProfileTask + // can't use TQString::null as a message either; ProfileTask // interprets null as "don't change". - QString message; + TQString message; if ( status == Online ) - message = QString::fromAscii(""); + message = TQString::fromAscii(""); else { if ( _message.isEmpty() ) - message = QString::fromAscii(" "); + message = TQString::fromAscii(" "); else message = _message; } @@ -257,7 +257,7 @@ void Client::setStatus( AIMStatus status, const QString &_message ) pt->go( true ); } -void Client::setStatus( DWORD status, const QString &message ) +void Client::setStatus( DWORD status, const TQString &message ) { // remember the message to reply with, when requested kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Setting status message to "<< message << endl; @@ -302,7 +302,7 @@ UserDetails Client::ourInfo() const return d->ourDetails; } -QString Client::host() +TQString Client::host() { return d->host; } @@ -343,7 +343,7 @@ void Client::lt_loginFinished() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "stage two done. setting up services" << endl; initializeStaticTasks(); ServiceSetupTask* ssTask = new ServiceSetupTask( d->connections.defaultConnection()->rootTask() ); - connect( ssTask, SIGNAL( finished() ), this, SLOT( serviceSetupFinished() ) ); + connect( ssTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( serviceSetupFinished() ) ); ssTask->go( true ); //fire and forget m_loginTaskTwo->deleteLater(); m_loginTaskTwo = 0; @@ -351,7 +351,7 @@ void Client::lt_loginFinished() else if ( d->stage == ClientPrivate::StageOne ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "stage one login done" << endl; - disconnect( m_loginTask, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) ); + disconnect( m_loginTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) ); if ( m_loginTask->statusCode() == 0 ) //we can start stage two { @@ -362,7 +362,7 @@ void Client::lt_loginFinished() d->port = m_loginTask->bosPort().toUInt(); d->cookie = m_loginTask->loginCookie(); close(); - QTimer::singleShot( 100, this, SLOT(startStageTwo() ) ); + TQTimer::singleShot( 100, this, TQT_SLOT(startStageTwo() ) ); } else { @@ -379,17 +379,17 @@ void Client::lt_loginFinished() void Client::startStageTwo() { //create a new connection and set it up - Connection* c = createConnection( d->host, QString::number( d->port ) ); + Connection* c = createConnection( d->host, TQString::number( d->port ) ); new CloseConnectionTask( c->rootTask() ); //create the new login task m_loginTaskTwo = new StageTwoLoginTask( c->rootTask() ); m_loginTaskTwo->setCookie( d->cookie ); - QObject::connect( m_loginTaskTwo, SIGNAL( finished() ), this, SLOT( lt_loginFinished() ) ); + TQObject::connect( m_loginTaskTwo, TQT_SIGNAL( finished() ), this, TQT_SLOT( lt_loginFinished() ) ); //connect - QObject::connect( c, SIGNAL( connected() ), this, SLOT( streamConnected() ) ); + TQObject::connect( c, TQT_SIGNAL( connected() ), this, TQT_SLOT( streamConnected() ) ); connectToServer( c, d->host, false ) ; } @@ -411,8 +411,8 @@ void Client::serviceSetupFinished() return; OfflineMessagesTask *offlineMsgTask = new OfflineMessagesTask( c->rootTask() ); - connect( offlineMsgTask, SIGNAL( receivedOfflineMessage(const Oscar::Message& ) ), - this, SIGNAL( messageReceived(const Oscar::Message& ) ) ); + connect( offlineMsgTask, TQT_SIGNAL( receivedOfflineMessage(const Oscar::Message& ) ), + this, TQT_SIGNAL( messageReceived(const Oscar::Message& ) ) ); offlineMsgTask->go( true ); } @@ -420,7 +420,7 @@ void Client::serviceSetupFinished() emit loggedIn(); } -void Client::receivedIcqInfo( const QString& contact, unsigned int type ) +void Client::receivedIcqInfo( const TQString& contact, unsigned int type ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "received icq info for " << contact << " of type " << type << endl; @@ -437,7 +437,7 @@ void Client::receivedInfo( Q_UINT16 sequence ) emit receivedUserInfo( details.userId(), details ); } -void Client::offlineUser( const QString& user, const UserDetails& ) +void Client::offlineUser( const TQString& user, const UserDetails& ) { emit userIsOffline( user ); } @@ -462,27 +462,27 @@ void Client::setVersion( const Oscar::ClientVersion* version ) // INTERNALS // -QString Client::userId() const +TQString Client::userId() const { return d->user; } -QString Client::password() const +TQString Client::password() const { return d->pass; } -QString Client::statusMessage() const +TQString Client::statusMessage() const { return d->statusMessage; } -void Client::setStatusMessage( const QString &message ) +void Client::setStatusMessage( const TQString &message ) { d->statusMessage = message; } -QCString Client::ipAddress() const +TQCString Client::ipAddress() const { //!TODO determine ip address return "127.0.0.1"; @@ -493,7 +493,7 @@ void Client::notifyTaskError( const Oscar::SNAC& s, int errCode, bool fatal ) emit taskError( s, errCode, fatal ); } -void Client::notifySocketError( int errCode, const QString& msg ) +void Client::notifySocketError( int errCode, const TQString& msg ) { emit socketError( errCode, msg ); } @@ -538,13 +538,13 @@ void Client::receivedMessage( const Oscar::Message& msg ) Oscar::Message response ( msg ); if ( msg.hasProperty( Oscar::Message::StatusMessageRequest ) ) { - QTextCodec* codec = d->codecProvider->codecForContact( msg.sender() ); + TQTextCodec* codec = d->codecProvider->codecForContact( msg.sender() ); response.setText( Oscar::Message::UserDefined, statusMessage(), codec ); } else { response.setEncoding( Oscar::Message::UserDefined ); - response.setTextArray( QByteArray() ); + response.setTextArray( TQByteArray() ); } response.setReceiver( msg.sender() ); response.addProperty( Oscar::Message::AutoResponse ); @@ -557,7 +557,7 @@ void Client::receivedMessage( const Oscar::Message& msg ) if ( msg.hasProperty( Oscar::Message::AutoResponse ) ) { // we got a response to a status message request. - QString awayMessage( msg.text( d->codecProvider->codecForContact( msg.sender() ) ) ); + TQString awayMessage( msg.text( d->codecProvider->codecForContact( msg.sender() ) ) ); kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Received an away message: " << awayMessage << endl; emit receivedAwayMessage( msg.sender(), awayMessage ); } @@ -574,7 +574,7 @@ void Client::receivedMessage( const Oscar::Message& msg ) } } -void Client::requestAuth( const QString& contactid, const QString& reason ) +void Client::requestAuth( const TQString& contactid, const TQString& reason ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -582,7 +582,7 @@ void Client::requestAuth( const QString& contactid, const QString& reason ) d->ssiAuthTask->sendAuthRequest( contactid, reason ); } -void Client::sendAuth( const QString& contactid, const QString& reason, bool auth ) +void Client::sendAuth( const TQString& contactid, const TQString& reason, bool auth ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -605,7 +605,7 @@ void Client::setIsIcq( bool isIcq ) d->isIcq = isIcq; } -void Client::debug( const QString& str ) +void Client::debug( const TQString& str ) { Q_UNUSED(str); // qDebug( "CLIENT: %s", str.ascii() ); @@ -627,37 +627,37 @@ void Client::initializeStaticTasks() d->typingNotifyTask = new TypingNotifyTask( c->rootTask() ); d->ssiModifyTask = new SSIModifyTask( c->rootTask(), true ); - connect( d->onlineNotifier, SIGNAL( userIsOnline( const QString&, const UserDetails& ) ), - this, SIGNAL( receivedUserInfo( const QString&, const UserDetails& ) ) ); - connect( d->onlineNotifier, SIGNAL( userIsOffline( const QString&, const UserDetails& ) ), - this, SLOT( offlineUser( const QString&, const UserDetails & ) ) ); + connect( d->onlineNotifier, TQT_SIGNAL( userIsOnline( const TQString&, const UserDetails& ) ), + this, TQT_SIGNAL( receivedUserInfo( const TQString&, const UserDetails& ) ) ); + connect( d->onlineNotifier, TQT_SIGNAL( userIsOffline( const TQString&, const UserDetails& ) ), + this, TQT_SLOT( offlineUser( const TQString&, const UserDetails & ) ) ); - connect( d->ownStatusTask, SIGNAL( gotInfo() ), this, SLOT( haveOwnUserInfo() ) ); - connect( d->ownStatusTask, SIGNAL( buddyIconUploadRequested() ), this, - SIGNAL( iconNeedsUploading() ) ); + connect( d->ownStatusTask, TQT_SIGNAL( gotInfo() ), this, TQT_SLOT( haveOwnUserInfo() ) ); + connect( d->ownStatusTask, TQT_SIGNAL( buddyIconUploadRequested() ), this, + TQT_SIGNAL( iconNeedsUploading() ) ); - connect( d->messageReceiverTask, SIGNAL( receivedMessage( const Oscar::Message& ) ), - this, SLOT( receivedMessage( const Oscar::Message& ) ) ); + connect( d->messageReceiverTask, TQT_SIGNAL( receivedMessage( const Oscar::Message& ) ), + this, TQT_SLOT( receivedMessage( const Oscar::Message& ) ) ); - connect( d->ssiAuthTask, SIGNAL( authRequested( const QString&, const QString& ) ), - this, SIGNAL( authRequestReceived( const QString&, const QString& ) ) ); - connect( d->ssiAuthTask, SIGNAL( authReplied( const QString&, const QString&, bool ) ), - this, SIGNAL( authReplyReceived( const QString&, const QString&, bool ) ) ); + connect( d->ssiAuthTask, TQT_SIGNAL( authRequested( const TQString&, const TQString& ) ), + this, TQT_SIGNAL( authRequestReceived( const TQString&, const TQString& ) ) ); + connect( d->ssiAuthTask, TQT_SIGNAL( authReplied( const TQString&, const TQString&, bool ) ), + this, TQT_SIGNAL( authReplyReceived( const TQString&, const TQString&, bool ) ) ); - connect( d->icqInfoTask, SIGNAL( receivedInfoFor( const QString&, unsigned int ) ), - this, SLOT( receivedIcqInfo( const QString&, unsigned int ) ) ); + connect( d->icqInfoTask, TQT_SIGNAL( receivedInfoFor( const TQString&, unsigned int ) ), + this, TQT_SLOT( receivedIcqInfo( const TQString&, unsigned int ) ) ); - connect( d->userInfoTask, SIGNAL( receivedProfile( const QString&, const QString& ) ), - this, SIGNAL( receivedProfile( const QString&, const QString& ) ) ); - connect( d->userInfoTask, SIGNAL( receivedAwayMessage( const QString&, const QString& ) ), - this, SIGNAL( receivedAwayMessage( const QString&, const QString& ) ) ); - connect( d->typingNotifyTask, SIGNAL( typingStarted( const QString& ) ), - this, SIGNAL( userStartedTyping( const QString& ) ) ); - connect( d->typingNotifyTask, SIGNAL( typingFinished( const QString& ) ), - this, SIGNAL( userStoppedTyping( const QString& ) ) ); + connect( d->userInfoTask, TQT_SIGNAL( receivedProfile( const TQString&, const TQString& ) ), + this, TQT_SIGNAL( receivedProfile( const TQString&, const TQString& ) ) ); + connect( d->userInfoTask, TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ), + this, TQT_SIGNAL( receivedAwayMessage( const TQString&, const TQString& ) ) ); + connect( d->typingNotifyTask, TQT_SIGNAL( typingStarted( const TQString& ) ), + this, TQT_SIGNAL( userStartedTyping( const TQString& ) ) ); + connect( d->typingNotifyTask, TQT_SIGNAL( typingFinished( const TQString& ) ), + this, TQT_SIGNAL( userStoppedTyping( const TQString& ) ) ); } -void Client::removeGroup( const QString& groupName ) +void Client::removeGroup( const TQString& groupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -671,7 +671,7 @@ void Client::removeGroup( const QString& groupName ) delete ssimt; } -void Client::addGroup( const QString& groupName ) +void Client::addGroup( const TQString& groupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -685,7 +685,7 @@ void Client::addGroup( const QString& groupName ) delete ssimt; } -void Client::addContact( const QString& contactName, const QString& groupName ) +void Client::addContact( const TQString& contactName, const TQString& groupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -699,7 +699,7 @@ void Client::addContact( const QString& contactName, const QString& groupName ) delete ssimt; } -void Client::removeContact( const QString& contactName ) +void Client::removeContact( const TQString& contactName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -713,7 +713,7 @@ void Client::removeContact( const QString& contactName ) delete ssimt; } -void Client::renameGroup( const QString & oldGroupName, const QString & newGroupName ) +void Client::renameGroup( const TQString & oldGroupName, const TQString & newGroupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -764,7 +764,7 @@ void Client::modifySSIItem( const Oscar::SSI& oldItem, const Oscar::SSI& newItem } } -void Client::changeContactGroup( const QString& contact, const QString& newGroupName ) +void Client::changeContactGroup( const TQString& contact, const TQString& newGroupName ) { Connection* c = d->connections.connectionForFamily( 0x0013 ); if ( !c ) @@ -779,7 +779,7 @@ void Client::changeContactGroup( const QString& contact, const QString& newGroup delete ssimt; } -void Client::requestFullInfo( const QString& contactId ) +void Client::requestFullInfo( const TQString& contactId ) { Connection* c = d->connections.connectionForFamily( 0x0015 ); if ( !c ) @@ -789,7 +789,7 @@ void Client::requestFullInfo( const QString& contactId ) d->icqInfoTask->go(); } -void Client::requestShortInfo( const QString& contactId ) +void Client::requestShortInfo( const TQString& contactId ) { Connection* c = d->connections.connectionForFamily( 0x0015 ); if ( !c ) @@ -799,7 +799,7 @@ void Client::requestShortInfo( const QString& contactId ) d->icqInfoTask->go(); } -void Client::sendWarning( const QString& contact, bool anonymous ) +void Client::sendWarning( const TQString& contact, bool anonymous ) { Connection* c = d->connections.connectionForFamily( 0x0004 ); if ( !c ) @@ -807,62 +807,62 @@ void Client::sendWarning( const QString& contact, bool anonymous ) WarningTask* warnTask = new WarningTask( c->rootTask() ); warnTask->setContact( contact ); warnTask->setAnonymous( anonymous ); - QObject::connect( warnTask, SIGNAL( userWarned( const QString&, Q_UINT16, Q_UINT16 ) ), - this, SIGNAL( userWarned( const QString&, Q_UINT16, Q_UINT16 ) ) ); + TQObject::connect( warnTask, TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ), + this, TQT_SIGNAL( userWarned( const TQString&, Q_UINT16, Q_UINT16 ) ) ); warnTask->go( true ); } -ICQGeneralUserInfo Client::getGeneralInfo( const QString& contact ) +ICQGeneralUserInfo Client::getGeneralInfo( const TQString& contact ) { return d->icqInfoTask->generalInfoFor( contact ); } -ICQWorkUserInfo Client::getWorkInfo( const QString& contact ) +ICQWorkUserInfo Client::getWorkInfo( const TQString& contact ) { return d->icqInfoTask->workInfoFor( contact ); } -ICQEmailInfo Client::getEmailInfo( const QString& contact ) +ICQEmailInfo Client::getEmailInfo( const TQString& contact ) { return d->icqInfoTask->emailInfoFor( contact ); } -ICQMoreUserInfo Client::getMoreInfo( const QString& contact ) +ICQMoreUserInfo Client::getMoreInfo( const TQString& contact ) { return d->icqInfoTask->moreInfoFor( contact ); } -ICQInterestInfo Client::getInterestInfo( const QString& contact ) +ICQInterestInfo Client::getInterestInfo( const TQString& contact ) { return d->icqInfoTask->interestInfoFor( contact ); } -ICQShortInfo Client::getShortInfo( const QString& contact ) +ICQShortInfo Client::getShortInfo( const TQString& contact ) { return d->icqInfoTask->shortInfoFor( contact ); } -QValueList Client::chatExchangeList() const +TQValueList Client::chatExchangeList() const { return d->exchanges; } -void Client::setChatExchangeList( const QValueList& exchanges ) +void Client::setChatExchangeList( const TQValueList& exchanges ) { d->exchanges = exchanges; } -void Client::requestAIMProfile( const QString& contact ) +void Client::requestAIMProfile( const TQString& contact ) { d->userInfoTask->requestInfoFor( contact, UserInfoTask::Profile ); } -void Client::requestAIMAwayMessage( const QString& contact ) +void Client::requestAIMAwayMessage( const TQString& contact ) { d->userInfoTask->requestInfoFor( contact, UserInfoTask::AwayMessage ); } -void Client::requestICQAwayMessage( const QString& contact, ICQStatus contactStatus ) +void Client::requestICQAwayMessage( const TQString& contact, ICQStatus contactStatus ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "requesting away message for " << contact << endl; Oscar::Message msg; @@ -894,7 +894,7 @@ void Client::requestICQAwayMessage( const QString& contact, ICQStatus contactSta sendMessage( msg ); } -void Client::addICQAwayMessageRequest( const QString& contact, ICQStatus contactStatus ) +void Client::addICQAwayMessageRequest( const TQString& contact, ICQStatus contactStatus ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "adding away message request for " << contact << " to queue" << endl; @@ -909,12 +909,12 @@ void Client::addICQAwayMessageRequest( const QString& contact, ICQStatus contact d->awayMsgRequestTimer->start( 1000 ); } -void Client::removeICQAwayMessageRequest( const QString& contact ) +void Client::removeICQAwayMessageRequest( const TQString& contact ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "removing away message request for " << contact << " from queue" << endl; - QValueList::iterator it = d->awayMsgRequestQueue.begin(); + TQValueList::iterator it = d->awayMsgRequestQueue.begin(); while ( it != d->awayMsgRequestQueue.end() ) { if ( (*it).contact == contact ) @@ -962,7 +962,7 @@ void Client::nextICQAwayMessageRequest() requestICQAwayMessage( amr.contact, amr.contactStatus ); } -void Client::requestStatusInfo( const QString& contact ) +void Client::requestStatusInfo( const TQString& contact ) { d->userInfoTask->requestInfoFor( contact, UserInfoTask::General ); } @@ -973,27 +973,27 @@ void Client::whitePagesSearch( const ICQWPSearchInfo& info ) if ( !c ) return; UserSearchTask* ust = new UserSearchTask( c->rootTask() ); - connect( ust, SIGNAL( foundUser( const ICQSearchResult& ) ), - this, SIGNAL( gotSearchResults( const ICQSearchResult& ) ) ); - connect( ust, SIGNAL( searchFinished( int ) ), this, SIGNAL( endOfSearch( int ) ) ); + connect( ust, TQT_SIGNAL( foundUser( const ICQSearchResult& ) ), + this, TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ) ); + connect( ust, TQT_SIGNAL( searchFinished( int ) ), this, TQT_SIGNAL( endOfSearch( int ) ) ); ust->go( true ); //onGo does nothing in this task. This is just here so autodelete works ust->searchWhitePages( info ); } -void Client::uinSearch( const QString& uin ) +void Client::uinSearch( const TQString& uin ) { Connection* c = d->connections.connectionForFamily( 0x0015 ); if ( !c ) return; UserSearchTask* ust = new UserSearchTask( c->rootTask() ); - connect( ust, SIGNAL( foundUser( const ICQSearchResult& ) ), - this, SIGNAL( gotSearchResults( const ICQSearchResult& ) ) ); - connect( ust, SIGNAL( searchFinished( int ) ), this, SIGNAL( endOfSearch( int ) ) ); + connect( ust, TQT_SIGNAL( foundUser( const ICQSearchResult& ) ), + this, TQT_SIGNAL( gotSearchResults( const ICQSearchResult& ) ) ); + connect( ust, TQT_SIGNAL( searchFinished( int ) ), this, TQT_SIGNAL( endOfSearch( int ) ) ); ust->go( true ); //onGo does nothing in this task. This is just here so autodelete works ust->searchUserByUIN( uin ); } -void Client::updateProfile( const QString& profile ) +void Client::updateProfile( const TQString& profile ) { Connection* c = d->connections.connectionForFamily( 0x0002 ); if ( !c ) @@ -1003,7 +1003,7 @@ void Client::updateProfile( const QString& profile ) pt->go(true); } -void Client::sendTyping( const QString & contact, bool typing ) +void Client::sendTyping( const TQString & contact, bool typing ) { Connection* c = d->connections.connectionForFamily( 0x0004 ); if ( !c ) @@ -1022,7 +1022,7 @@ void Client::connectToIconServer() return; } -void Client::setIgnore( const QString& user, bool ignore ) +void Client::setIgnore( const TQString& user, bool ignore ) { Oscar::SSI item = ssiManager()->findItem( user, ROSTER_IGNORE ); if ( item && !ignore ) @@ -1033,12 +1033,12 @@ void Client::setIgnore( const QString& user, bool ignore ) else if ( !item && ignore ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding " << user << " to ignore list" << endl; - Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_IGNORE, QValueList() ); + Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_IGNORE, TQValueList() ); this->modifySSIItem( Oscar::SSI(), s ); } } -void Client::setVisibleTo( const QString& user, bool visible ) +void Client::setVisibleTo( const TQString& user, bool visible ) { Oscar::SSI item = ssiManager()->findItem( user, ROSTER_VISIBLE ); if ( item && !visible ) @@ -1049,12 +1049,12 @@ void Client::setVisibleTo( const QString& user, bool visible ) else if ( !item && visible ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding " << user << " to visible list" << endl; - Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_VISIBLE, QValueList() ); + Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_VISIBLE, TQValueList() ); this->modifySSIItem( Oscar::SSI(), s ); } } -void Client::setInvisibleTo( const QString& user, bool invisible ) +void Client::setInvisibleTo( const TQString& user, bool invisible ) { Oscar::SSI item = ssiManager()->findItem( user, ROSTER_INVISIBLE ); if ( item && !invisible ) @@ -1065,20 +1065,20 @@ void Client::setInvisibleTo( const QString& user, bool invisible ) else if ( !item && invisible ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding " << user << " to invisible list" << endl; - Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_INVISIBLE, QValueList() ); + Oscar::SSI s( user, 0, ssiManager()->nextContactId(), ROSTER_INVISIBLE, TQValueList() ); this->modifySSIItem( Oscar::SSI(), s ); } } -void Client::requestBuddyIcon( const QString& user, const QByteArray& hash, BYTE hashType ) +void Client::requestBuddyIcon( const TQString& user, const TQByteArray& hash, BYTE hashType ) { Connection* c = d->connections.connectionForFamily( 0x0010 ); if ( !c ) return; BuddyIconTask* bit = new BuddyIconTask( c->rootTask() ); - connect( bit, SIGNAL( haveIcon( const QString&, QByteArray ) ), - this, SIGNAL( haveIconForContact( const QString&, QByteArray ) ) ); + connect( bit, TQT_SIGNAL( haveIcon( const TQString&, TQByteArray ) ), + this, TQT_SIGNAL( haveIconForContact( const TQString&, TQByteArray ) ) ); bit->requestIconFor( user ); bit->setHashType( hashType ); bit->setHash( hash ); @@ -1086,8 +1086,8 @@ void Client::requestBuddyIcon( const QString& user, const QByteArray& hash, BYTE } void Client::requestServerRedirect( WORD family, WORD exchange, - QByteArray cookie, WORD instance, - const QString& room ) + TQByteArray cookie, WORD instance, + const TQString& room ) { //making the assumption that family 2 will always be the BOS connection //use it instead since we can't query for family 1 @@ -1116,21 +1116,21 @@ void Client::requestServerRedirect( WORD family, WORD exchange, srt->setChatRoom( room ); } - connect( srt, SIGNAL( haveServer( const QString&, const QByteArray&, WORD ) ), - this, SLOT( haveServerForRedirect( const QString&, const QByteArray&, WORD ) ) ); + connect( srt, TQT_SIGNAL( haveServer( const TQString&, const TQByteArray&, WORD ) ), + this, TQT_SLOT( haveServerForRedirect( const TQString&, const TQByteArray&, WORD ) ) ); srt->setService( family ); srt->go( true ); } -void Client::haveServerForRedirect( const QString& host, const QByteArray& cookie, WORD ) +void Client::haveServerForRedirect( const TQString& host, const TQByteArray& cookie, WORD ) { //nasty sender() usage to get the task with chat room info - QObject* o = const_cast( sender() ); + TQObject* o = const_cast( sender() ); ServerRedirectTask* srt = dynamic_cast( o ); //create a new connection and set it up int colonPos = host.find(':'); - QString realHost, realPort; + TQString realHost, realPort; if ( colonPos != -1 ) { realHost = host.left( colonPos ); @@ -1139,18 +1139,18 @@ void Client::haveServerForRedirect( const QString& host, const QByteArray& cooki else { realHost = host; - realPort = QString::fromLatin1("5190"); + realPort = TQString::fromLatin1("5190"); } Connection* c = createConnection( realHost, realPort ); //create the new login task m_loginTaskTwo = new StageTwoLoginTask( c->rootTask() ); m_loginTaskTwo->setCookie( cookie ); - QObject::connect( m_loginTaskTwo, SIGNAL( finished() ), this, SLOT( serverRedirectFinished() ) ); + TQObject::connect( m_loginTaskTwo, TQT_SIGNAL( finished() ), this, TQT_SLOT( serverRedirectFinished() ) ); //connect connectToServer( c, d->host, false ); - QObject::connect( c, SIGNAL( connected() ), this, SLOT( streamConnected() ) ); + TQObject::connect( c, TQT_SIGNAL( connected() ), this, TQT_SLOT( streamConnected() ) ); if ( srt ) d->connections.addChatInfoForConnection( c, srt->chatExchange(), srt->chatRoomName() ); @@ -1176,8 +1176,8 @@ void Client::serverRedirectFinished() if ( d->currentRedirect == 0x000D ) { - connect( this, SIGNAL( chatNavigationConnected() ), - this, SLOT( requestChatNavLimits() ) ); + connect( this, TQT_SIGNAL( chatNavigationConnected() ), + this, TQT_SLOT( requestChatNavLimits() ) ); emit chatNavigationConnected(); } @@ -1192,18 +1192,18 @@ void Client::serverRedirectFinished() } Connection* c = m_loginTaskTwo->client(); - QString roomName = d->connections.chatRoomForConnection( c ); + TQString roomName = d->connections.chatRoomForConnection( c ); WORD exchange = d->connections.exchangeForConnection( c ); if ( c ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting up chat connection" << endl; ChatServiceTask* cst = new ChatServiceTask( c->rootTask(), exchange, roomName ); - connect( cst, SIGNAL( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ), - this, SIGNAL( userJoinedChat( Oscar::WORD, const QString&, const QString& ) ) ); - connect( cst, SIGNAL( userLeftChat( Oscar::WORD, const QString&, const QString& ) ), - this, SIGNAL( userLeftChat( Oscar::WORD, const QString&, const QString& ) ) ); - connect( cst, SIGNAL( newChatMessage( const Oscar::Message& ) ), - this, SIGNAL( messageReceived( const Oscar::Message& ) ) ); + connect( cst, TQT_SIGNAL( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SIGNAL( userJoinedChat( Oscar::WORD, const TQString&, const TQString& ) ) ); + connect( cst, TQT_SIGNAL( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ), + this, TQT_SIGNAL( userLeftChat( Oscar::WORD, const TQString&, const TQString& ) ) ); + connect( cst, TQT_SIGNAL( newChatMessage( const Oscar::Message& ) ), + this, TQT_SIGNAL( messageReceived( const Oscar::Message& ) ) ); } emit chatRoomConnected( exchange, roomName ); } @@ -1234,19 +1234,19 @@ void Client::requestChatNavLimits() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "requesting chat nav service limits" << endl; ChatNavServiceTask* cnst = new ChatNavServiceTask( c->rootTask() ); cnst->setRequestType( ChatNavServiceTask::Limits ); - QObject::connect( cnst, SIGNAL( haveChatExchanges( const QValueList& ) ), - this, SLOT( setChatExchangeList( const QValueList& ) ) ); + TQObject::connect( cnst, TQT_SIGNAL( haveChatExchanges( const TQValueList& ) ), + this, TQT_SLOT( setChatExchangeList( const TQValueList& ) ) ); cnst->go( true ); //autodelete } -void Client::determineDisconnection( int code, const QString& string ) +void Client::determineDisconnection( int code, const TQString& string ) { if ( !sender() ) return; //yay for the sender() hack! - QObject* obj = const_cast( sender() ); + TQObject* obj = const_cast( sender() ); Connection* c = dynamic_cast( obj ); if ( !c ) return; @@ -1262,7 +1262,7 @@ void Client::determineDisconnection( int code, const QString& string ) c = 0; } -void Client::sendBuddyIcon( const QByteArray& iconData ) +void Client::sendBuddyIcon( const TQByteArray& iconData ) { Connection* c = d->connections.connectionForFamily( 0x0010 ); if ( !c ) @@ -1274,7 +1274,7 @@ void Client::sendBuddyIcon( const QByteArray& iconData ) bit->go( true ); } -void Client::joinChatRoom( const QString& roomName, int exchange ) +void Client::joinChatRoom( const TQString& roomName, int exchange ) { Connection* c = d->connections.connectionForFamily( 0x000D ); if ( !c ) @@ -1283,21 +1283,21 @@ void Client::joinChatRoom( const QString& roomName, int exchange ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "joining the chat room '" << roomName << "' on exchange " << exchange << endl; ChatNavServiceTask* cnst = new ChatNavServiceTask( c->rootTask() ); - connect( cnst, SIGNAL( connectChat( WORD, QByteArray, WORD, const QString& ) ), - this, SLOT( setupChatConnection( WORD, QByteArray, WORD, const QString& ) ) ); + connect( cnst, TQT_SIGNAL( connectChat( WORD, TQByteArray, WORD, const TQString& ) ), + this, TQT_SLOT( setupChatConnection( WORD, TQByteArray, WORD, const TQString& ) ) ); cnst->createRoom( exchange, roomName ); } -void Client::setupChatConnection( WORD exchange, QByteArray cookie, WORD instance, const QString& room ) +void Client::setupChatConnection( WORD exchange, TQByteArray cookie, WORD instance, const TQString& room ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "cookie is:" << cookie << endl; - QByteArray realCookie( cookie ); + TQByteArray realCookie( cookie ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "connection to chat room" << endl; requestServerRedirect( 0x000E, exchange, realCookie, instance, room ); } -void Client::disconnectChatRoom( WORD exchange, const QString& room ) +void Client::disconnectChatRoom( WORD exchange, const TQString& room ) { Connection* c = d->connections.connectionForChatRoom( exchange, room ); if ( !c ) @@ -1308,7 +1308,7 @@ void Client::disconnectChatRoom( WORD exchange, const QString& room ) } -Connection* Client::createConnection( const QString& host, const QString& port ) +Connection* Client::createConnection( const TQString& host, const TQString& port ) { KNetworkConnector* knc = new KNetworkConnector( 0 ); knc->setOptHostPort( host, port.toUInt() ); diff --git a/kopete/protocols/oscar/liboscar/client.h b/kopete/protocols/oscar/liboscar/client.h index f5dc531e..5c619c33 100644 --- a/kopete/protocols/oscar/liboscar/client.h +++ b/kopete/protocols/oscar/liboscar/client.h @@ -23,8 +23,8 @@ #ifndef LIBOSCAR_CLIENT_H #define LIBOSCAR_CLIENT_H -#include -#include +#include +#include #include "kopete_export.h" #include "rtf2html.h" #include "transfer.h" @@ -56,8 +56,8 @@ public: class CodecProvider { public: virtual ~CodecProvider() {} - virtual QTextCodec* codecForContact( const QString& contactName ) const = 0; - virtual QTextCodec* codecForAccount() const = 0; + virtual TQTextCodec* codecForContact( const TQString& contactName ) const = 0; + virtual TQTextCodec* codecForAccount() const = 0; }; enum ErrorCodes { @@ -74,7 +74,7 @@ public: EXTERNAL API *************/ - Client(QObject *parent=0); + Client(TQObject *parent=0); ~Client(); /** @@ -89,7 +89,7 @@ public: * @param server the server to connect to - but this is also set on the connector used to construct the clientstream?? * @param auth indicate whether we're connecting to the authorizer or the bos server */ - void connectToServer( Connection *c, const QString& server, bool auth = true ); + void connectToServer( Connection *c, const TQString& server, bool auth = true ); /** * Start the login process for Oscar @@ -97,14 +97,14 @@ public: * @param user The user name to log in as. * @param pass The password to use when logging in */ - void start( const QString &host, const uint port, const QString &userId, const QString &pass ); + void start( const TQString &host, const uint port, const TQString &userId, const TQString &pass ); /** Logout and disconnect */ void close(); /** Set our status for AIM */ - void setStatus( AIMStatus status, const QString &message = QString::null ); + void setStatus( AIMStatus status, const TQString &message = TQString::null ); /** Set our status for ICQ */ - void setStatus( DWORD status, const QString &message = QString::null ); + void setStatus( DWORD status, const TQString &message = TQString::null ); /** Retrieve our user info */ UserDetails ourInfo() const; @@ -114,35 +114,35 @@ public: * \param groupName the name of the group to remove * \return true if the group removal was successful */ - void removeGroup( const QString& groupName ); + void removeGroup( const TQString& groupName ); /** * Add a group from the contact list * \param groupName the name of the group to add * \return true if the group addition was successful */ - void addGroup( const QString& groupName ); + void addGroup( const TQString& groupName ); /** * Add a contact to the contact list * \param contactName the screen name of the new contact to add * \return true if the contact addition was successful */ - void addContact( const QString& contactName, const QString& groupName ); + void addContact( const TQString& contactName, const TQString& groupName ); /** * Remove a contact from the contact list * \param contactName the screen name of the contact to remove * \return true if the contact removal was successful */ - void removeContact( const QString &contactName ); + void removeContact( const TQString &contactName ); /** * Rename a group on the contact list * \param oldGroupName the old group name * \param newGroupName the new group name */ - void renameGroup( const QString& oldGroupName, const QString& newGroupName ); + void renameGroup( const TQString& oldGroupName, const TQString& newGroupName ); /** * Modify an SSI item on the SSI list @@ -155,7 +155,7 @@ public: * \param contact the contact to change * \param newGroup the new group to move the contact to */ - void changeContactGroup( const QString& contact, const QString& newGroupName ); + void changeContactGroup( const TQString& contact, const TQString& newGroupName ); /** * Send a message to a contact @@ -169,7 +169,7 @@ public: * \param contactid the id of the contact to request auth from * \param reason the reason for this authorization request */ - void requestAuth( const QString& contactid, const QString& reason ); + void requestAuth( const TQString& contactid, const TQString& reason ); /** * Grant or decline authorization to a contact @@ -177,128 +177,128 @@ public: * \param reason the reason to grant/decline authorization * \param auth grant or decline authorization */ - void sendAuth( const QString& contactid, const QString& reason, bool auth=true ); + void sendAuth( const TQString& contactid, const TQString& reason, bool auth=true ); /** * Request full user info from an ICQ contact * \param contactId the UIN of the contact to get info for */ - void requestFullInfo( const QString& contactId ); + void requestFullInfo( const TQString& contactId ); /** * Request short info for an ICQ contact * \param contactId the UIN of the contact to get info for */ - void requestShortInfo( const QString& contactId ); + void requestShortInfo( const TQString& contactId ); /** * Send a warning to the OSCAR servers about a contact * \param contact the contact to send the warning to * \param anon indicate whether to do it anonymously */ - void sendWarning( const QString& contact, bool anonymous ); + void sendWarning( const TQString& contact, bool anonymous ); /** * Get the general ICQ info for a client * \param contact the contact to get info for */ - ICQGeneralUserInfo getGeneralInfo( const QString& contact ); + ICQGeneralUserInfo getGeneralInfo( const TQString& contact ); /** * Get the work info for a contact * \param contact the contact to get info for */ - ICQWorkUserInfo getWorkInfo( const QString& contact ); + ICQWorkUserInfo getWorkInfo( const TQString& contact ); /** * Get the email info for a contact * \param contact the contact to get info for */ - ICQEmailInfo getEmailInfo( const QString& contact ); + ICQEmailInfo getEmailInfo( const TQString& contact ); /** * Get the additional info available for a contact * \param contact the contact to get info for */ - ICQMoreUserInfo getMoreInfo( const QString& contact ); + ICQMoreUserInfo getMoreInfo( const TQString& contact ); /** * Get the interest info available for a contact * \param contact the contact to get info for */ - ICQInterestInfo getInterestInfo( const QString& contact ); + ICQInterestInfo getInterestInfo( const TQString& contact ); /** * Get the short info available for an icq contact * \param contact the contact to get info for */ - ICQShortInfo getShortInfo( const QString& contact ); + ICQShortInfo getShortInfo( const TQString& contact ); /** * Get the list of chat room exchanges we have */ - QValueList chatExchangeList() const; + TQValueList chatExchangeList() const; /** * Request the aim profile * \param contact the contact to get info for */ - void requestAIMProfile( const QString& contact ); + void requestAIMProfile( const TQString& contact ); /** * Request the aim away message * \param contact the contact to get info for */ - void requestAIMAwayMessage( const QString& contact ); + void requestAIMAwayMessage( const TQString& contact ); /** * Add the icq away message request to queue * \param contact the contact to get info for */ - void addICQAwayMessageRequest( const QString& contact, ICQStatus contactStatus ); + void addICQAwayMessageRequest( const TQString& contact, ICQStatus contactStatus ); /** * Remove the icq away message request from queue * \param contact the contact to get info for */ - void removeICQAwayMessageRequest( const QString& contact ); + void removeICQAwayMessageRequest( const TQString& contact ); /** Request the extended status info */ - void requestStatusInfo( const QString& contact ); + void requestStatusInfo( const TQString& contact ); //! Run a whitepages search void whitePagesSearch( const ICQWPSearchInfo& info ); //! Run a UIN search - void uinSearch( const QString& uin ); + void uinSearch( const TQString& uin ); //! Update the user's AIM profile - void updateProfile( const QString& profile ); + void updateProfile( const TQString& profile ); //! Get buddy icon information for a person - void requestBuddyIcon( const QString& user, const QByteArray& hash, BYTE hashType ); + void requestBuddyIcon( const TQString& user, const TQByteArray& hash, BYTE hashType ); //! Start a server redirect for a different service - void requestServerRedirect( WORD family, WORD e = 0, QByteArray c = QByteArray(), - WORD instance = 0, const QString& room = QString::null ); + void requestServerRedirect( WORD family, WORD e = 0, TQByteArray c = TQByteArray(), + WORD instance = 0, const TQString& room = TQString::null ); //! Start uploading a buddy icon - void sendBuddyIcon( const QByteArray& imageData ); + void sendBuddyIcon( const TQByteArray& imageData ); - void joinChatRoom( const QString& roomName, int exchange ); + void joinChatRoom( const TQString& roomName, int exchange ); - void setIgnore( const QString& user, bool ignore ); + void setIgnore( const TQString& user, bool ignore ); - void setVisibleTo( const QString& user, bool visible ); + void setVisibleTo( const TQString& user, bool visible ); - void setInvisibleTo( const QString& user, bool invisible ); + void setInvisibleTo( const TQString& user, bool invisible ); /** Accessors needed for login */ - QString host(); + TQString host(); int port(); /** Send a typing notification */ - void sendTyping( const QString & contact, bool typing ); + void sendTyping( const TQString & contact, bool typing ); /** Make a connection to the icon server */ void connectToIconServer(); @@ -306,7 +306,7 @@ public: bool hasIconConnection() const; /** We've finished chatting in a chat room, disconnect from it */ - void disconnectChatRoom( WORD exchange, const QString& room ); + void disconnectChatRoom( WORD exchange, const TQString& room ); /** Set codec provider */ void setCodecProvider( CodecProvider* codecProvider ); @@ -320,7 +320,7 @@ public: /** * Print a debug statement */ - void debug( const QString &str ); + void debug( const TQString &str ); /** Have we logged in yet? */ bool isActive() const; @@ -332,29 +332,29 @@ public: const Oscar::ClientVersion* version() const; /** The current user's user ID */ - QString userId() const; + TQString userId() const; /** The current user's password */ - QString password() const; + TQString password() const; /** The current status message (a.k.a. away message) */ - QString statusMessage() const; + TQString statusMessage() const; /** Change the current status message w/o changing status */ - void setStatusMessage( const QString &message ); + void setStatusMessage( const TQString &message ); /** ICQ Settings */ bool isIcq() const; void setIsIcq( bool isIcq ); /** Host's IP address */ - QCString ipAddress() const; + TQCString ipAddress() const; /** Notify that a task error was received */ void notifyTaskError( const Oscar::SNAC& s, int errCode, bool fatal ); /** Notify that a socket error has occured */ - void notifySocketError( int errCode, const QString& msg ); + void notifySocketError( int errCode, const TQString& msg ); signals: /** CONNECTION EVENTS */ @@ -378,19 +378,19 @@ signals: void haveSSIList(); /** a user is online. */ - void userIsOnline( const QString& ); + void userIsOnline( const TQString& ); /** a user is offline. */ - void userIsOffline( const QString& ); + void userIsOffline( const TQString& ); /** we've received a message */ void messageReceived( const Oscar::Message& ); /** we've received an authorization request */ - void authRequestReceived( const QString& contact, const QString& reason ); + void authRequestReceived( const TQString& contact, const TQString& reason ); /** we've received an authorization reply */ - void authReplyReceived( const QString& contact, const QString& reason, bool auth ); + void authReplyReceived( const TQString& contact, const TQString& reason, bool auth ); /** * we've received an error from a task and need to notify somebody @@ -400,37 +400,37 @@ signals: /** * we've received a socket error and need to notify somebody */ - void socketError( int errCode, const QString& msg ); + void socketError( int errCode, const TQString& msg ); - void receivedIcqShortInfo( const QString& contact ); - void receivedIcqLongInfo( const QString& contact ); + void receivedIcqShortInfo( const TQString& contact ); + void receivedIcqLongInfo( const TQString& contact ); - void receivedProfile( const QString& contact, const QString& profile ); - void receivedAwayMessage( const QString& contact, const QString& message ); + void receivedProfile( const TQString& contact, const TQString& profile ); + void receivedAwayMessage( const TQString& contact, const TQString& message ); void receivedAwayMessage( const Oscar::Message& message ); - void receivedUserInfo( const QString& contact, const UserDetails& details ); + void receivedUserInfo( const TQString& contact, const UserDetails& details ); /** We warned a user */ - void userWarned( const QString& contact, Q_UINT16 increase, Q_UINT16 newLevel ); + void userWarned( const TQString& contact, Q_UINT16 increase, Q_UINT16 newLevel ); /** Search signals */ void gotSearchResults( const ICQSearchResult& ); void endOfSearch( int); /* Typing signals */ - void userStartedTyping( const QString& contact ); - void userStoppedTyping( const QString& contact ); + void userStartedTyping( const TQString& contact ); + void userStoppedTyping( const TQString& contact ); /* Buddy icons */ - void haveIconForContact( const QString&, QByteArray iconData ); + void haveIconForContact( const TQString&, TQByteArray iconData ); void iconServerConnected(); void iconNeedsUploading(); /* Chat rooms */ void chatNavigationConnected(); - void chatRoomConnected( WORD, const QString& ); - void userJoinedChat( Oscar::WORD, const QString& room, const QString& contact ); - void userLeftChat( Oscar::WORD, const QString& room, const QString& contact ); + void chatRoomConnected( WORD, const TQString& ); + void userJoinedChat( Oscar::WORD, const TQString& room, const TQString& contact ); + void userLeftChat( Oscar::WORD, const TQString& room, const TQString& contact ); /* service redirection */ void redirectionFinished( WORD ); @@ -459,7 +459,7 @@ protected slots: void serviceSetupFinished(); /** we have icq info for a contact */ - void receivedIcqInfo( const QString& contact, unsigned int type ); + void receivedIcqInfo( const TQString& contact, unsigned int type ); /** we have normal user info for a contact */ void receivedInfo( Q_UINT16 sequence ); @@ -467,9 +467,9 @@ protected slots: /** received a message of some kind */ void receivedMessage( const Oscar::Message& msg ); - void offlineUser( const QString&, const UserDetails& ); + void offlineUser( const TQString&, const UserDetails& ); - void haveServerForRedirect( const QString& host, const QByteArray& cookie, WORD family ); + void haveServerForRedirect( const TQString& host, const TQByteArray& cookie, WORD family ); void serverRedirectFinished(); void checkRedirectionQueue( WORD ); @@ -477,15 +477,15 @@ protected slots: /** * Set the list of chat room exchanges we have */ - void setChatExchangeList( const QValueList& exchanges ); + void setChatExchangeList( const TQValueList& exchanges ); /** * set up the connection to a chat room */ - void setupChatConnection( WORD, QByteArray, WORD, const QString& ); + void setupChatConnection( WORD, TQByteArray, WORD, const TQString& ); - void determineDisconnection( int, const QString& ); + void determineDisconnection( int, const TQString& ); void nextICQAwayMessageRequest(); @@ -497,14 +497,14 @@ private: /** Delete the static tasks */ void deleteStaticTasks(); - Connection* createConnection( const QString& host, const QString& port ); + Connection* createConnection( const TQString& host, const TQString& port ); /** * Request the icq away message * \param contact the contact to get info for */ //TODO only made a default for testing w/o frontend - void requestICQAwayMessage( const QString& contact, ICQStatus contactStatus = ICQAway ); + void requestICQAwayMessage( const TQString& contact, ICQStatus contactStatus = ICQAway ); private: class ClientPrivate; diff --git a/kopete/protocols/oscar/liboscar/clientreadytask.cpp b/kopete/protocols/oscar/liboscar/clientreadytask.cpp index 3338f7b3..d5b65069 100644 --- a/kopete/protocols/oscar/liboscar/clientreadytask.cpp +++ b/kopete/protocols/oscar/liboscar/clientreadytask.cpp @@ -38,7 +38,7 @@ ClientReadyTask::~ClientReadyTask() { } -void ClientReadyTask::setFamilies( const QValueList& families ) +void ClientReadyTask::setFamilies( const TQValueList& families ) { m_familyList = families; } @@ -52,8 +52,8 @@ void ClientReadyTask::onGo() kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Sending client ready, end of login" << endl; //nasty nasty nasty hack to get all the packets to work - QValueList::const_iterator rcEnd = m_familyList.constEnd(); - for ( QValueList::const_iterator it = m_familyList.constBegin(); it != rcEnd; ++it ) + TQValueList::const_iterator rcEnd = m_familyList.constEnd(); + for ( TQValueList::const_iterator it = m_familyList.constBegin(); it != rcEnd; ++it ) { //I have no idea what any of these values mean. I just copied them from oscarsocket int i = ( *it ); @@ -102,7 +102,7 @@ void ClientReadyTask::onGo() //with the hell that is oscar login. (just wait until you get a message) Transfer* t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/clientreadytask.h b/kopete/protocols/oscar/liboscar/clientreadytask.h index 4a9ea941..d632351f 100644 --- a/kopete/protocols/oscar/liboscar/clientreadytask.h +++ b/kopete/protocols/oscar/liboscar/clientreadytask.h @@ -20,7 +20,7 @@ #include "task.h" #include "rateclass.h" -#include "qvaluelist.h" +#include "tqvaluelist.h" /** Fire and forget task to let the server know we're ready @@ -34,11 +34,11 @@ public: ~ClientReadyTask(); virtual void onGo(); - void setFamilies( const QValueList& families ); + void setFamilies( const TQValueList& families ); private: - QValueList m_classList; - QValueList m_familyList; + TQValueList m_classList; + TQValueList m_familyList; }; #endif diff --git a/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp b/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp index 54926949..3b062b2a 100644 --- a/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp +++ b/kopete/protocols/oscar/liboscar/closeconnectiontask.cpp @@ -18,8 +18,8 @@ #include "closeconnectiontask.h" -#include -#include +#include +#include #include #include #include "connection.h" @@ -38,24 +38,24 @@ CloseConnectionTask::~CloseConnectionTask() { } -const QByteArray& CloseConnectionTask::cookie() const +const TQByteArray& CloseConnectionTask::cookie() const { return m_cookie; } -const QString& CloseConnectionTask::bosHost() const +const TQString& CloseConnectionTask::bosHost() const { return m_bosHost; } -const QString& CloseConnectionTask::bosPort() const +const TQString& CloseConnectionTask::bosPort() const { return m_bosPort; } bool CloseConnectionTask::take( Transfer* transfer ) { - QString errorReason; + TQString errorReason; WORD errorNum = 0; if ( forMe( transfer ) ) { @@ -70,12 +70,12 @@ bool CloseConnectionTask::take( Transfer* transfer ) return false; } - QValueList tlvList = ft->buffer()->getTLVList(); + TQValueList tlvList = ft->buffer()->getTLVList(); TLV uin = findTLV( tlvList, 0x0001 ); if ( uin ) { - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(1) [UIN], uin=" << QString( uin.data ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(1) [UIN], uin=" << TQString( uin.data ) << endl; } TLV err = findTLV( tlvList, 0x0008 ); @@ -96,8 +96,8 @@ bool CloseConnectionTask::take( Transfer* transfer ) TLV server = findTLV( tlvList, 0x0005 ); if ( server ) { - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(5) [SERVER] " << QString( server.data ) << endl; - QString ip = server.data; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "found TLV(5) [SERVER] " << TQString( server.data ) << endl; + TQString ip = server.data; int index = ip.find( ':' ); m_bosHost = ip.left( index ); ip.remove( 0 , index+1 ); //get rid of the colon and everything before it diff --git a/kopete/protocols/oscar/liboscar/closeconnectiontask.h b/kopete/protocols/oscar/liboscar/closeconnectiontask.h index b241b07e..35c2ed18 100644 --- a/kopete/protocols/oscar/liboscar/closeconnectiontask.h +++ b/kopete/protocols/oscar/liboscar/closeconnectiontask.h @@ -20,7 +20,7 @@ #define CLOSECONNECTIONTASK_H #include -#include +#include class Transfer; class QString; @@ -38,21 +38,21 @@ public: virtual bool take(Transfer* transfer); //Protocol specific stuff - const QByteArray& cookie() const; - const QString& bosHost() const; - const QString& bosPort() const; + const TQByteArray& cookie() const; + const TQString& bosHost() const; + const TQString& bosPort() const; protected: virtual bool forMe(const Transfer* transfer) const; private: - bool parseDisconnectCode( int error, QString& reason ); + bool parseDisconnectCode( int error, TQString& reason ); private: - QByteArray m_cookie; - QString m_bosHost; - QString m_bosPort; + TQByteArray m_cookie; + TQString m_bosHost; + TQString m_bosPort; }; diff --git a/kopete/protocols/oscar/liboscar/connection.cpp b/kopete/protocols/oscar/liboscar/connection.cpp index c7cbc0fe..a4bc4877 100644 --- a/kopete/protocols/oscar/liboscar/connection.cpp +++ b/kopete/protocols/oscar/liboscar/connection.cpp @@ -38,7 +38,7 @@ public: DWORD snacSequence; WORD flapSequence; - QValueList familyList; + TQValueList familyList; RateClassManager* rateClassManager; ClientStream* clientStream; @@ -51,7 +51,7 @@ public: Connection::Connection( Connector* connector, ClientStream* cs, const char* name ) -: QObject( 0, name ) +: TQObject( 0, name ) { d = new ConnectionPrivate(); d->clientStream = cs; @@ -77,14 +77,14 @@ Connection::~Connection() void Connection::setClient( Client* c ) { d->client = c; - connect( c, SIGNAL( loggedIn() ), this, SLOT( loggedIn() ) ); + connect( c, TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( loggedIn() ) ); } -void Connection::connectToServer( const QString& host, bool auth ) +void Connection::connectToServer( const TQString& host, bool auth ) { - connect( d->clientStream, SIGNAL( error( int ) ), this, SLOT( streamSocketError( int ) ) ); - connect( d->clientStream, SIGNAL( readyRead() ), this, SLOT( streamReadyRead() ) ); - connect( d->clientStream, SIGNAL( connected() ), this, SIGNAL( connected() ) ); + connect( d->clientStream, TQT_SIGNAL( error( int ) ), this, TQT_SLOT( streamSocketError( int ) ) ); + connect( d->clientStream, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( streamReadyRead() ) ); + connect( d->clientStream, TQT_SIGNAL( connected() ), this, TQT_SIGNAL( connected() ) ); d->clientStream->connectToServer( host, auth ); } @@ -99,12 +99,12 @@ bool Connection::isSupported( int family ) const return ( d->familyList.findIndex( family ) != -1 ); } -QValueList Connection::supportedFamilies() const +TQValueList Connection::supportedFamilies() const { return d->familyList; } -void Connection::addToSupportedFamilies( const QValueList& familyList ) +void Connection::addToSupportedFamilies( const TQValueList& familyList ) { d->familyList += familyList; } @@ -144,12 +144,12 @@ Q_UINT32 Connection::snacSequence() return d->snacSequence; } -QString Connection::userId() const +TQString Connection::userId() const { return d->client->userId(); } -QString Connection::password() const +TQString Connection::password() const { return d->client->password(); } diff --git a/kopete/protocols/oscar/liboscar/connection.h b/kopete/protocols/oscar/liboscar/connection.h index 4170857e..f2c1da75 100644 --- a/kopete/protocols/oscar/liboscar/connection.h +++ b/kopete/protocols/oscar/liboscar/connection.h @@ -18,8 +18,8 @@ Kopete (c) 2002-2005 by the Kopete developers #ifndef CONNECTION_H #define CONNECTION_H -#include -#include +#include +#include #include "oscartypes.h" #include "rateclass.h" @@ -55,7 +55,7 @@ public: void setClient( Client* ); - void connectToServer( const QString& server, bool auth = true ); + void connectToServer( const TQString& server, bool auth = true ); /** * Close the connection and reset the connection data */ @@ -72,14 +72,14 @@ public: * Get the list of supported families * @return The list of families supported on this connection */ - QValueList supportedFamilies() const; + TQValueList supportedFamilies() const; /** * Add the SNAC families in \p familyList to the list of supported families for * this connection * \param familyList the list of families to add */ - void addToSupportedFamilies( const QValueList& familyList ); + void addToSupportedFamilies( const TQValueList& familyList ); /** * Add the SNAC family in \p family to the list of supported families for @@ -94,7 +94,7 @@ public: * need to be filtered on * \param rateClassList the list of rate classes to add */ - void addToRateClasses( const QValueList rateClassList ); + void addToRateClasses( const TQValueList rateClassList ); /** * Add the rate class in \p rc to the list of rate classes packets @@ -125,7 +125,7 @@ public: /** * Get the chat room name for this connection. - * @return the name of the room or QString::null if not connected to a room + * @return the name of the room or TQString::null if not connected to a room */ /** Get the user settings object */ @@ -138,10 +138,10 @@ public: Q_UINT32 snacSequence(); /** Get the cookie for this connection */ - QByteArray cookie() const; + TQByteArray cookie() const; - QString userId() const; - QString password() const; + TQString userId() const; + TQString password() const; bool isIcq() const; SSIManager* ssiManager() const; const Oscar::ClientVersion* version() const; @@ -176,7 +176,7 @@ signals: * \param errCode the error code from the operating system * \param errString the i18n'ed string that describes the error */ - void socketError( int errCode, const QString& errString ); + void socketError( int errCode, const TQString& errString ); private: diff --git a/kopete/protocols/oscar/liboscar/connectionhandler.cpp b/kopete/protocols/oscar/liboscar/connectionhandler.cpp index bf5706ee..bd4df3c5 100644 --- a/kopete/protocols/oscar/liboscar/connectionhandler.cpp +++ b/kopete/protocols/oscar/liboscar/connectionhandler.cpp @@ -17,7 +17,7 @@ */ #include "connectionhandler.h" -#include +#include #include #include "connection.h" #include "oscartypes.h" @@ -25,8 +25,8 @@ class ConnectionHandler::Private { public: - QValueList connections; - QMap chatRoomConnections; + TQValueList connections; + TQMap chatRoomConnections; }; ConnectionHandler::ConnectionHandler() @@ -57,8 +57,8 @@ void ConnectionHandler::remove( int family ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Removing all connections " << "supporting family " << family << endl; - QValueList::iterator it = d->connections.begin(); - QValueList::iterator itEnd = d->connections.end(); + TQValueList::iterator it = d->connections.begin(); + TQValueList::iterator itEnd = d->connections.end(); for ( ; it != itEnd; ++it ) { if ( ( *it )->isSupported( family ) ) @@ -84,8 +84,8 @@ void ConnectionHandler::clear() Connection* ConnectionHandler::connectionForFamily( int family ) const { - QValueList::iterator it = d->connections.begin(); - QValueList::iterator itEnd = d->connections.end(); + TQValueList::iterator it = d->connections.begin(); + TQValueList::iterator itEnd = d->connections.end(); int connectionCount = 0; Connection* lastConnection = 0; for ( ; it != itEnd; ++it ) @@ -110,7 +110,7 @@ Connection* ConnectionHandler::defaultConnection() const return d->connections.first(); } -void ConnectionHandler::addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const QString& room ) +void ConnectionHandler::addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const TQString& room ) { if ( d->connections.findIndex( c ) == -1 ) d->connections.append( c ); @@ -119,10 +119,10 @@ void ConnectionHandler::addChatInfoForConnection( Connection* c, Oscar::WORD exc d->chatRoomConnections[c] = info; } -Connection* ConnectionHandler::connectionForChatRoom( Oscar::WORD exchange, const QString& room ) +Connection* ConnectionHandler::connectionForChatRoom( Oscar::WORD exchange, const TQString& room ) { ConnectionRoomInfo infoToFind = qMakePair( exchange, room ); - QMap::iterator it, itEnd = d->chatRoomConnections.end(); + TQMap::iterator it, itEnd = d->chatRoomConnections.end(); for ( it = d->chatRoomConnections.begin(); it != itEnd; ++it ) { if ( it.data() == infoToFind ) @@ -135,22 +135,22 @@ Connection* ConnectionHandler::connectionForChatRoom( Oscar::WORD exchange, cons return 0; } -QString ConnectionHandler::chatRoomForConnection( Connection* c ) +TQString ConnectionHandler::chatRoomForConnection( Connection* c ) { if ( d->connections.findIndex( c ) == -1 ) - return QString::null; + return TQString::null; - QMap::iterator it, itEnd = d->chatRoomConnections.end(); + TQMap::iterator it, itEnd = d->chatRoomConnections.end(); for ( it = d->chatRoomConnections.begin(); it != itEnd; ++it ) { if ( it.key() == c ) { - QString room = it.data().second; + TQString room = it.data().second; return room; } } - return QString::null; + return TQString::null; } Oscar::WORD ConnectionHandler::exchangeForConnection( Connection* c ) @@ -159,7 +159,7 @@ Oscar::WORD ConnectionHandler::exchangeForConnection( Connection* c ) if ( d->connections.findIndex( c ) == -1 ) return 0xFFFF; - QMap::iterator it, itEnd = d->chatRoomConnections.end(); + TQMap::iterator it, itEnd = d->chatRoomConnections.end(); for ( it = d->chatRoomConnections.begin(); it != itEnd; ++it ) { if ( it.key() == c ) diff --git a/kopete/protocols/oscar/liboscar/connectionhandler.h b/kopete/protocols/oscar/liboscar/connectionhandler.h index 6094cab3..e8c50b12 100644 --- a/kopete/protocols/oscar/liboscar/connectionhandler.h +++ b/kopete/protocols/oscar/liboscar/connectionhandler.h @@ -20,13 +20,13 @@ #define CONNECTIONHANDLER_H #include "oscartypes.h" -#include -#include +#include +#include class Connection; -typedef QPair ConnectionRoomInfo; +typedef QPair ConnectionRoomInfo; /** @author Kopete Developers @@ -84,7 +84,7 @@ public: * @param exchange the exchange the chat room is in * @param room the name of the chat room */ - void addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const QString& room ); + void addChatInfoForConnection( Connection* c, Oscar::WORD exchange, const TQString& room ); /** * Get the connection for a particular room name and exchange number. @@ -92,15 +92,15 @@ public: * @param room the name of the chat room to find a connection for * @return a Connection for the chat room or 0L if no connection for that room */ - Connection* connectionForChatRoom( Oscar::WORD exchange, const QString& room ); + Connection* connectionForChatRoom( Oscar::WORD exchange, const TQString& room ); /** * Get the room name for the chat room based the connection * @return The name of the chat room that this connection is connected to * If the connection passed in by @p c is not a chat room connection then - * QString::null is returned. + * TQString::null is returned. */ - QString chatRoomForConnection( Connection* c ); + TQString chatRoomForConnection( Connection* c ); /** * Get the exchange number for the chat room based on the connection diff --git a/kopete/protocols/oscar/liboscar/connector.cpp b/kopete/protocols/oscar/liboscar/connector.cpp index 03a61882..c754e2d3 100644 --- a/kopete/protocols/oscar/liboscar/connector.cpp +++ b/kopete/protocols/oscar/liboscar/connector.cpp @@ -20,8 +20,8 @@ #include "connector.h" -Connector::Connector(QObject *parent) -:QObject(parent) +Connector::Connector(TQObject *parent) +:TQObject(parent) { setPeerAddressNone(); } @@ -35,7 +35,7 @@ bool Connector::havePeerAddress() const return haveaddr; } -QHostAddress Connector::peerAddress() const +TQHostAddress Connector::peerAddress() const { return addr; } @@ -48,11 +48,11 @@ Q_UINT16 Connector::peerPort() const void Connector::setPeerAddressNone() { haveaddr = false; - addr = QHostAddress(); + addr = TQHostAddress(); port = 0; } -void Connector::setPeerAddress(const QHostAddress &_addr, Q_UINT16 _port) +void Connector::setPeerAddress(const TQHostAddress &_addr, Q_UINT16 _port) { haveaddr = true; addr = _addr; diff --git a/kopete/protocols/oscar/liboscar/connector.h b/kopete/protocols/oscar/liboscar/connector.h index fd673163..3844ba49 100644 --- a/kopete/protocols/oscar/liboscar/connector.h +++ b/kopete/protocols/oscar/liboscar/connector.h @@ -22,8 +22,8 @@ #define LIBOSCAR_CONNECTOR_H -#include -#include "qhostaddress.h" +#include +#include "tqhostaddress.h" class ByteStream; @@ -31,15 +31,15 @@ class Connector : public QObject { Q_OBJECT public: - Connector(QObject *parent=0); + Connector(TQObject *parent=0); virtual ~Connector(); - virtual void connectToServer(const QString &server)=0; + virtual void connectToServer(const TQString &server)=0; virtual ByteStream *stream() const=0; virtual void done()=0; bool havePeerAddress() const; - QHostAddress peerAddress() const; + TQHostAddress peerAddress() const; Q_UINT16 peerPort() const; signals: @@ -48,11 +48,11 @@ signals: protected: void setPeerAddressNone(); - void setPeerAddress(const QHostAddress &addr, Q_UINT16 port); + void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port); private: bool haveaddr; - QHostAddress addr; + TQHostAddress addr; Q_UINT16 port; }; diff --git a/kopete/protocols/oscar/liboscar/coreprotocol.cpp b/kopete/protocols/oscar/liboscar/coreprotocol.cpp index 4f114039..918b3751 100644 --- a/kopete/protocols/oscar/liboscar/coreprotocol.cpp +++ b/kopete/protocols/oscar/liboscar/coreprotocol.cpp @@ -24,9 +24,9 @@ #include "coreprotocol.h" -#include -#include -#include +#include +#include +#include #include #include @@ -36,16 +36,16 @@ #include "flapprotocol.h" #include "snacprotocol.h" -static QString toString( const QByteArray& buffer ) +static TQString toString( const TQByteArray& buffer ) { // line format: //00 03 00 0b 00 00 90 b8 f5 9f 09 31 31 33 37 38 |;tJ�..........| int i = 0; - QString output = "\n"; - QString hex, ascii; + TQString output = "\n"; + TQString hex, ascii; - QByteArray::ConstIterator it; + TQByteArray::ConstIterator it; for ( it = buffer.begin(); it != buffer.end(); ++it ) { i++; @@ -54,7 +54,7 @@ static QString toString( const QByteArray& buffer ) if ( c < 0x10 ) hex.append("0"); - hex.append(QString("%1 ").arg(c, 0, 16)); + hex.append(TQString("%1 ").arg(c, 0, 16)); ascii.append(isprint(c) ? c : '.'); @@ -62,8 +62,8 @@ static QString toString( const QByteArray& buffer ) { output += hex + " |" + ascii + "|\n"; i=0; - hex=QString::null; - ascii=QString::null; + hex=TQString::null; + ascii=TQString::null; } } @@ -77,7 +77,7 @@ static QString toString( const QByteArray& buffer ) using namespace Oscar; -CoreProtocol::CoreProtocol() : QObject() +CoreProtocol::CoreProtocol() : TQObject() { m_snacProtocol = new SnacProtocol( this, "snacprotocol" ); m_flapProtocol = new FlapProtocol( this, "flapprotocol" ); @@ -92,7 +92,7 @@ int CoreProtocol::state() return m_state; } -void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) +void CoreProtocol::addIncomingData( const TQByteArray & incomingBytes ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Received " << incomingBytes.count() << " bytes. " << endl; // store locally @@ -114,7 +114,7 @@ void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) { //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "more data in chunk!" << endl; // copy the unparsed bytes into a new qbytearray and replace m_in with that - QByteArray remainder( size - parsedBytes ); + TQByteArray remainder( size - parsedBytes ); memcpy( remainder.data(), m_in.data() + parsedBytes, remainder.size() ); m_in = remainder; } @@ -149,7 +149,7 @@ Transfer* CoreProtocol::incomingTransfer() } } -void cp_dump( const QByteArray &bytes ) +void cp_dump( const TQByteArray &bytes ) { #ifdef OSCAR_COREPROTOCOL_DEBUG kdDebug(OSCAR_RAW_DEBUG) << "contains: " << bytes.count() << " bytes" << endl; @@ -174,7 +174,7 @@ void CoreProtocol::outgoingTransfer( Transfer* outgoing ) return; } -int CoreProtocol::wireToTransfer( const QByteArray& wire ) +int CoreProtocol::wireToTransfer( const TQByteArray& wire ) { // processing incoming data and reassembling it into transfers // may be an event or a response @@ -194,13 +194,13 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire ) return bytesParsed; } - QDataStream din( wire, IO_ReadOnly ); + TQDataStream din( wire, IO_ReadOnly ); // look at first four bytes and decide what to do with the chunk if ( okToProceed( din ) ) { din >> flapStart; - QByteArray packet; + TQByteArray packet; packet.duplicate( wire ); if ( flapStart == 0x2A ) { @@ -264,12 +264,12 @@ void CoreProtocol::reset() m_in.resize( 0 ); } -void CoreProtocol::slotOutgoingData( const QCString &out ) +void CoreProtocol::slotOutgoingData( const TQCString &out ) { kdDebug(OSCAR_RAW_DEBUG) << out.data() << endl; } -bool CoreProtocol::okToProceed( const QDataStream &din ) +bool CoreProtocol::okToProceed( const TQDataStream &din ) { if ( din.atEnd() ) { diff --git a/kopete/protocols/oscar/liboscar/coreprotocol.h b/kopete/protocols/oscar/liboscar/coreprotocol.h index f49396af..bbc9b693 100644 --- a/kopete/protocols/oscar/liboscar/coreprotocol.h +++ b/kopete/protocols/oscar/liboscar/coreprotocol.h @@ -21,9 +21,9 @@ #ifndef GW_CORE_PROTOCOL_H #define GW_CORE_PROTOCOL_H -#include -#include -#include +#include +#include +#include class FlapProtocol; class SnacProtocol; @@ -49,7 +49,7 @@ public: * This requires parsing out each FLAP, etc. from the incoming data * @param incomingBytes Raw data in wire format. */ - void addIncomingData( const QByteArray& incomingBytes ); + void addIncomingData( const TQByteArray& incomingBytes ); /** * @return the incoming transfer or 0 if none is available. @@ -71,7 +71,7 @@ signals: /** * Emitted as the core protocol converts fields to wire ready data */ - void outgoingData( const QByteArray& ); + void outgoingData( const TQByteArray& ); /** * Emitted when there is incoming data, parsed into a Transfer @@ -81,21 +81,21 @@ protected slots: /** * Just a debug method to test emitting to the socket, atm - should go to the ClientStream */ - void slotOutgoingData( const QCString & ); + void slotOutgoingData( const TQCString & ); protected: /** * Check that there is data to read, and set the protocol's state if there isn't any. */ - bool okToProceed( const QDataStream &din ); + bool okToProceed( const TQDataStream &din ); /** * Convert incoming wire data into a Transfer object and queue it * @return number of bytes from the input that were parsed into a Transfer */ - int wireToTransfer( const QByteArray& wire ); + int wireToTransfer( const TQByteArray& wire ); private: - QByteArray m_in; // buffer containing unprocessed bytes we received + TQByteArray m_in; // buffer containing unprocessed bytes we received int m_error; Transfer* m_inTransfer; // the transfer that is being received int m_state; // represents the protocol's overall state diff --git a/kopete/protocols/oscar/liboscar/flapprotocol.cpp b/kopete/protocols/oscar/liboscar/flapprotocol.cpp index c5dc04ed..f5e9fa03 100644 --- a/kopete/protocols/oscar/liboscar/flapprotocol.cpp +++ b/kopete/protocols/oscar/liboscar/flapprotocol.cpp @@ -19,16 +19,16 @@ #include "flapprotocol.h" -#include -#include -#include +#include +#include +#include #include #include "transfer.h" using namespace Oscar; -FlapProtocol::FlapProtocol(QObject *parent, const char *name) +FlapProtocol::FlapProtocol(TQObject *parent, const char *name) : InputProtocolBase(parent, name) { } @@ -37,9 +37,9 @@ FlapProtocol::~FlapProtocol() { } -Transfer* FlapProtocol::parse( const QByteArray & packet, uint& bytes ) +Transfer* FlapProtocol::parse( const TQByteArray & packet, uint& bytes ) { - QDataStream* m_din = new QDataStream( packet, IO_ReadOnly ); + TQDataStream* m_din = new TQDataStream( packet, IO_ReadOnly ); BYTE b; WORD w; diff --git a/kopete/protocols/oscar/liboscar/flapprotocol.h b/kopete/protocols/oscar/liboscar/flapprotocol.h index d61cf6c4..3d6de53b 100644 --- a/kopete/protocols/oscar/liboscar/flapprotocol.h +++ b/kopete/protocols/oscar/liboscar/flapprotocol.h @@ -29,7 +29,7 @@ class FlapProtocol : public InputProtocolBase { Q_OBJECT public: - FlapProtocol( QObject *parent = 0, const char *name = 0 ); + FlapProtocol( TQObject *parent = 0, const char *name = 0 ); ~FlapProtocol(); /** @@ -39,7 +39,7 @@ public: * @param bytes An integer used to return the number of bytes read. * @return A pointer to an FlapTransfer object if successfull, otherwise 0. The caller is responsible for deleting this object. */ - Transfer * parse( const QByteArray &, uint & bytes ); + Transfer * parse( const TQByteArray &, uint & bytes ); }; diff --git a/kopete/protocols/oscar/liboscar/icbmparamstask.cpp b/kopete/protocols/oscar/liboscar/icbmparamstask.cpp index 960d4ee5..5b00a8fd 100644 --- a/kopete/protocols/oscar/liboscar/icbmparamstask.cpp +++ b/kopete/protocols/oscar/liboscar/icbmparamstask.cpp @@ -137,7 +137,7 @@ void ICBMParamsTask::sendMessageParams( int channel ) Transfer* st = createTransfer( f, s, buffer ); send( st ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } //kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/icqlogintask.cpp b/kopete/protocols/oscar/liboscar/icqlogintask.cpp index c9f5cd52..76feaf42 100644 --- a/kopete/protocols/oscar/liboscar/icqlogintask.cpp +++ b/kopete/protocols/oscar/liboscar/icqlogintask.cpp @@ -18,7 +18,7 @@ #include "icqlogintask.h" -#include +#include #include #include "transfer.h" #include "connection.h" @@ -54,7 +54,7 @@ void IcqLoginTask::onGo() DWORD flapVersion = 0x00000001; Buffer *outbuf = new Buffer(); - QString encodedPassword = encodePassword( client()->password() ); + TQString encodedPassword = encodePassword( client()->password() ); const Oscar::ClientVersion* version = client()->version(); outbuf->addDWord( flapVersion ); @@ -78,14 +78,14 @@ void IcqLoginTask::onGo() } -QString IcqLoginTask::encodePassword( const QString& loginPassword ) +TQString IcqLoginTask::encodePassword( const TQString& loginPassword ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Called." << endl; // TODO: check if latin1 is the right conversion const char *password = loginPassword.latin1(); unsigned int i = 0; - QString encodedPassword = QString::null; + TQString encodedPassword = TQString::null; //encoding table used in ICQ password XOR transformation unsigned char encoding_table[] = diff --git a/kopete/protocols/oscar/liboscar/icqlogintask.h b/kopete/protocols/oscar/liboscar/icqlogintask.h index 45fb3eb6..3bce47f1 100644 --- a/kopete/protocols/oscar/liboscar/icqlogintask.h +++ b/kopete/protocols/oscar/liboscar/icqlogintask.h @@ -40,7 +40,7 @@ protected: bool forMe( Transfer* transfer ) const; private: - QString encodePassword( const QString& pw ); + TQString encodePassword( const TQString& pw ); }; diff --git a/kopete/protocols/oscar/liboscar/icqtask.cpp b/kopete/protocols/oscar/liboscar/icqtask.cpp index a383922f..bb58a9c4 100644 --- a/kopete/protocols/oscar/liboscar/icqtask.cpp +++ b/kopete/protocols/oscar/liboscar/icqtask.cpp @@ -20,7 +20,7 @@ #include "buffer.h" #include "connection.h" -#include +#include #include @@ -69,8 +69,8 @@ void ICQTask::parseInitialData( Buffer buf ) m_requestSubType = 0xFFFF; /*kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "uin: " << m_icquin << " sequence: " << sequence - <<" request type: 0x" << QString::number( m_requestType, 16 ) - << " request sub type: 0x" << QString::number( m_requestSubType, 16 ) << endl;*/ + <<" request type: 0x" << TQString::number( m_requestType, 16 ) + << " request sub type: 0x" << TQString::number( m_requestSubType, 16 ) << endl;*/ } Buffer* ICQTask::addInitialData( Buffer* buf ) const @@ -89,8 +89,8 @@ Buffer* ICQTask::addInitialData( Buffer* buf ) const tlvData->addLEWord( m_requestSubType ); /*kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "uin: " << m_icquin << " sequence: " << sequence - <<" request type: 0x" << QString::number( m_requestType, 16 ) - << " request sub type: 0x" << QString::number( m_requestSubType, 16 ) << endl; */ + <<" request type: 0x" << TQString::number( m_requestType, 16 ) + << " request sub type: 0x" << TQString::number( m_requestSubType, 16 ) << endl; */ if ( buf != 0 ) tlvData->addString( buf->buffer(), buf->length() ); diff --git a/kopete/protocols/oscar/liboscar/icquserinfo.cpp b/kopete/protocols/oscar/liboscar/icquserinfo.cpp index f853c045..bc37d313 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfo.cpp +++ b/kopete/protocols/oscar/liboscar/icquserinfo.cpp @@ -132,9 +132,9 @@ void ICQMoreUserInfo::fill( Buffer* buffer ) // set birthday to NULL if at least one of the values in the buffer is 0 if ( year == 0 || month == 0 || day == 0 ) - birthday = QDate(); + birthday = TQDate(); else - birthday = QDate( year, month, day ); + birthday = TQDate( year, month, day ); lang1 = buffer->getByte(); lang2 = buffer->getByte(); @@ -158,7 +158,7 @@ void ICQEmailInfo::fill( Buffer* buffer ) if ( buffer->getByte() == 0x0A ) { int numEmails = buffer->getByte(); - QString email; + TQString email; for ( int i = 0; i < numEmails; i++ ) { if ( buffer->getByte() == 0x00 ) @@ -183,7 +183,7 @@ void ICQInterestInfo::fill( Buffer* buffer ) for ( int i = 0; i < len; i++ ) { int t=buffer->getLEWord(); - QCString d = buffer->getLELNTS(); + TQCString d = buffer->getLELNTS(); if (t>0) { //there is some topic if (count<4) { //i think this could not happen, i have never seen more topics[count]=t; @@ -213,22 +213,22 @@ void ICQSearchResult::fill( Buffer* buffer ) WORD datalength = buffer->getLEWord(); // data length WORD len = 0; uin = buffer->getLEDWord(); - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Found UIN " << QString::number( uin ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Found UIN " << TQString::number( uin ) << endl; len = buffer->getLEWord(); if ( len > 0 ) - nickName = QCString( buffer->getBlock( len ) ); + nickName = TQCString( buffer->getBlock( len ) ); len = buffer->getLEWord(); if ( len > 0 ) - firstName = QCString( buffer->getBlock( len ) ); + firstName = TQCString( buffer->getBlock( len ) ); len = buffer->getLEWord(); if ( len > 0 ) - lastName = QCString( buffer->getBlock( len ) ); + lastName = TQCString( buffer->getBlock( len ) ); len = buffer->getLEWord(); if ( len > 0 ) - email = QCString( buffer->getBlock( len ) ); + email = TQCString( buffer->getBlock( len ) ); auth = ( buffer->getByte() != 0x01 ); online = ( buffer->getLEWord() == 0x0001 ); diff --git a/kopete/protocols/oscar/liboscar/icquserinfo.h b/kopete/protocols/oscar/liboscar/icquserinfo.h index ac054721..3c3510f4 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfo.h +++ b/kopete/protocols/oscar/liboscar/icquserinfo.h @@ -19,9 +19,9 @@ #ifndef _ICQUSERINFO_H_ #define _ICQUSERINFO_H_ -#include -#include -#include +#include +#include +#include #include "kopete_export.h" class Buffer; @@ -56,10 +56,10 @@ public: public: unsigned long uin; - QCString nickname; - QCString firstName; - QCString lastName; - QCString email; + TQCString nickname; + TQCString firstName; + TQCString lastName; + TQCString email; bool needsAuth; unsigned int gender; // 0=offline, 1=online, 2=not webaware }; @@ -73,17 +73,17 @@ public: public: unsigned long uin; - QCString nickname; - QCString firstName; - QCString lastName; - QCString email; - QCString city; - QCString state; - QCString phoneNumber; - QCString faxNumber; - QCString address; - QCString cellNumber; - QCString zip; + TQCString nickname; + TQCString firstName; + TQCString lastName; + TQCString email; + TQCString city; + TQCString state; + TQCString phoneNumber; + TQCString faxNumber; + TQCString address; + TQCString cellNumber; + TQCString zip; int country; char timezone; bool publishEmail; @@ -99,18 +99,18 @@ public: void fill( Buffer* buffer ); public: - QCString city; - QCString state; - QCString phone; - QCString fax; - QCString address; - QCString zip; + TQCString city; + TQCString state; + TQCString phone; + TQCString fax; + TQCString address; + TQCString zip; int country; - QCString company; - QCString department; - QCString position; + TQCString company; + TQCString department; + TQCString position; int occupation; - QCString homepage; + TQCString homepage; }; class KOPETE_EXPORT ICQMoreUserInfo : public ICQInfoBase @@ -123,13 +123,13 @@ public: public: int age; unsigned int gender; - QCString homepage; - QDate birthday; + TQCString homepage; + TQDate birthday; unsigned int lang1; unsigned int lang2; unsigned int lang3; - QCString ocity; - QCString ostate; + TQCString ocity; + TQCString ostate; int ocountry; int marital; }; @@ -142,7 +142,7 @@ public: void fill( Buffer* buffer ); public: - QValueList emailList; + TQValueList emailList; }; class KOPETE_EXPORT ICQInterestInfo : public ICQInfoBase @@ -155,7 +155,7 @@ public: public: int count; int topics[4]; - QCString descriptions[4]; + TQCString descriptions[4]; }; @@ -165,10 +165,10 @@ public: ICQSearchResult(); void fill( Buffer* buffer ); Q_UINT32 uin; - QCString firstName; - QCString lastName; - QCString nickName; - QCString email; + TQCString firstName; + TQCString lastName; + TQCString nickName; + TQCString email; bool auth; bool online; char gender; @@ -180,19 +180,19 @@ class KOPETE_EXPORT ICQWPSearchInfo public: ICQWPSearchInfo(); - QCString firstName; - QCString lastName; - QCString nickName; - QCString email; + TQCString firstName; + TQCString lastName; + TQCString nickName; + TQCString email; int age; int gender; int language; - QCString city; - QCString state; + TQCString city; + TQCString state; int country; - QCString company; - QCString department; - QCString position; + TQCString company; + TQCString department; + TQCString position; int occupation; bool onlineOnly; }; @@ -202,11 +202,11 @@ class ICQInfoItem { public: int category; - QCString description; + TQCString description; }; -typedef QValueList ICQInfoItemList; +typedef TQValueList ICQInfoItemList; */ #endif diff --git a/kopete/protocols/oscar/liboscar/icquserinfotask.cpp b/kopete/protocols/oscar/liboscar/icquserinfotask.cpp index 068ac273..3635bc71 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/icquserinfotask.cpp @@ -89,7 +89,7 @@ bool ICQUserInfoRequestTask::take( Transfer* transfer ) buffer->skipBytes( 8 ); WORD seq = buffer->getLEWord(); // request sequence number buffer->getLEWord(); // request data sub type - QString contactId = m_contactSequenceMap[seq]; + TQString contactId = m_contactSequenceMap[seq]; switch ( requestSubType() ) { @@ -186,43 +186,43 @@ void ICQUserInfoRequestTask::onGo() send( t ); } -ICQGeneralUserInfo ICQUserInfoRequestTask::generalInfoFor( const QString& contact ) +ICQGeneralUserInfo ICQUserInfoRequestTask::generalInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_genInfoMap[seq]; } -ICQWorkUserInfo ICQUserInfoRequestTask::workInfoFor( const QString& contact ) +ICQWorkUserInfo ICQUserInfoRequestTask::workInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_workInfoMap[seq]; } -ICQMoreUserInfo ICQUserInfoRequestTask::moreInfoFor( const QString& contact ) +ICQMoreUserInfo ICQUserInfoRequestTask::moreInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_moreInfoMap[seq]; } -ICQEmailInfo ICQUserInfoRequestTask::emailInfoFor(const QString& contact ) +ICQEmailInfo ICQUserInfoRequestTask::emailInfoFor(const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_emailInfoMap[seq]; } -ICQShortInfo ICQUserInfoRequestTask::shortInfoFor( const QString& contact ) +ICQShortInfo ICQUserInfoRequestTask::shortInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_shortInfoMap[seq]; } -ICQInterestInfo ICQUserInfoRequestTask::interestInfoFor( const QString& contact ) +ICQInterestInfo ICQUserInfoRequestTask::interestInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_interestInfoMap[seq]; } -QString ICQUserInfoRequestTask::notesInfoFor( const QString& contact ) +TQString ICQUserInfoRequestTask::notesInfoFor( const TQString& contact ) { int seq = m_reverseContactMap[contact]; return m_notesInfoMap[seq]; diff --git a/kopete/protocols/oscar/liboscar/icquserinfotask.h b/kopete/protocols/oscar/liboscar/icquserinfotask.h index eba81b57..613608fd 100644 --- a/kopete/protocols/oscar/liboscar/icquserinfotask.h +++ b/kopete/protocols/oscar/liboscar/icquserinfotask.h @@ -19,8 +19,8 @@ #ifndef ICQUSERINFOTASK_H #define ICQUSERINFOTASK_H -#include -#include +#include +#include #include "icqtask.h" #include "icquserinfo.h" @@ -39,37 +39,37 @@ public: enum { Long = 0, Short }; - void setUser( const QString& user ) { m_userToRequestFor = user; } + void setUser( const TQString& user ) { m_userToRequestFor = user; } void setType( unsigned int type ) { m_type = type; } void setInfoToRequest( unsigned int type ); - ICQGeneralUserInfo generalInfoFor( const QString& contact ); - ICQEmailInfo emailInfoFor( const QString& contact ); - ICQMoreUserInfo moreInfoFor( const QString& contact ); - ICQWorkUserInfo workInfoFor( const QString& contact ); - QString notesInfoFor( const QString& contact ); - ICQShortInfo shortInfoFor( const QString& contact ); - ICQInterestInfo interestInfoFor( const QString& contact ); + ICQGeneralUserInfo generalInfoFor( const TQString& contact ); + ICQEmailInfo emailInfoFor( const TQString& contact ); + ICQMoreUserInfo moreInfoFor( const TQString& contact ); + ICQWorkUserInfo workInfoFor( const TQString& contact ); + TQString notesInfoFor( const TQString& contact ); + ICQShortInfo shortInfoFor( const TQString& contact ); + ICQInterestInfo interestInfoFor( const TQString& contact ); virtual bool forMe( const Transfer* transfer ) const; virtual bool take( Transfer* transfer ); virtual void onGo(); signals: - void receivedInfoFor( const QString& contact, unsigned int type ); + void receivedInfoFor( const TQString& contact, unsigned int type ); private: - QMap m_genInfoMap; - QMap m_emailInfoMap; - QMap m_moreInfoMap; - QMap m_workInfoMap; - QMap m_shortInfoMap; - QMap m_interestInfoMap; - QMap m_notesInfoMap; - QMap m_contactSequenceMap; - QMap m_reverseContactMap; + TQMap m_genInfoMap; + TQMap m_emailInfoMap; + TQMap m_moreInfoMap; + TQMap m_workInfoMap; + TQMap m_shortInfoMap; + TQMap m_interestInfoMap; + TQMap m_notesInfoMap; + TQMap m_contactSequenceMap; + TQMap m_reverseContactMap; unsigned int m_type; - QString m_userToRequestFor; + TQString m_userToRequestFor; }; #endif diff --git a/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp b/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp index abd34e53..b93ede3f 100644 --- a/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp +++ b/kopete/protocols/oscar/liboscar/inputprotocolbase.cpp @@ -18,8 +18,8 @@ #include "inputprotocolbase.h" -InputProtocolBase::InputProtocolBase(QObject *parent, const char *name) - : QObject(parent, name) +InputProtocolBase::InputProtocolBase(TQObject *parent, const char *name) + : TQObject(parent, name) { m_state = NeedMore; m_bytes = 0; @@ -35,13 +35,13 @@ uint InputProtocolBase::state() const return m_state; } -bool InputProtocolBase::readString( QString &message ) +bool InputProtocolBase::readString( TQString &message ) { uint len; - QCString rawData; + TQCString rawData; if ( !safeReadBytes( rawData, len ) ) return false; - message = QString::fromUtf8( rawData.data(), len - 1 ); + message = TQString::fromUtf8( rawData.data(), len - 1 ); return true; } @@ -61,7 +61,7 @@ bool InputProtocolBase::okToProceed() return false; } -bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) +bool InputProtocolBase::safeReadBytes( TQCString & data, uint & len ) { // read the length of the bytes Q_UINT32 val; @@ -72,7 +72,7 @@ bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) if ( val > 1024 ) return false; //qDebug( "EventProtocol::safeReadBytes() - expecting %i bytes", val ); - QCString temp( val ); + TQCString temp( val ); if ( val != 0 ) { if ( !okToProceed() ) diff --git a/kopete/protocols/oscar/liboscar/inputprotocolbase.h b/kopete/protocols/oscar/liboscar/inputprotocolbase.h index 7bea895f..94072e00 100644 --- a/kopete/protocols/oscar/liboscar/inputprotocolbase.h +++ b/kopete/protocols/oscar/liboscar/inputprotocolbase.h @@ -19,7 +19,7 @@ #ifndef INPUTPROTOCOLBASE_H #define INPUTPROTOCOLBASE_H -#include +#include class Transfer; /** @@ -32,7 +32,7 @@ class InputProtocolBase : public QObject Q_OBJECT public: enum EventProtocolState { Success, NeedMore, OutOfSync, ProtocolError }; - InputProtocolBase(QObject *parent = 0, const char *name = 0); + InputProtocolBase(TQObject *parent = 0, const char *name = 0); ~InputProtocolBase(); /** * Returns a value describing the state of the object. @@ -45,13 +45,13 @@ public: * @param bytes this will be set to the number of bytes that were successfully parsed. It is no indication of the success of the whole procedure * @return On success, a Transfer object that the caller is responsible for deleting. It will be either an EventTransfer or a Response, delete as appropriate. On failure, returns 0. */ - virtual Transfer * parse( const QByteArray &, uint & bytes ) = 0 ; + virtual Transfer * parse( const TQByteArray &, uint & bytes ) = 0 ; protected: /** * Reads an arbitrary string * updates the bytes parsed counter */ - bool readString( QString &message ); + bool readString( TQString &message ); /** * Check that there is data to read, and set the protocol's state if there isn't any. */ @@ -61,12 +61,12 @@ protected: * updates the bytes parsed counter * @return false if the string was broken or there was no data available at all */ - bool safeReadBytes( QCString & data, uint & len ); + bool safeReadBytes( TQCString & data, uint & len ); protected: uint m_state; uint m_bytes; - QDataStream * m_din; + TQDataStream * m_din; }; #endif diff --git a/kopete/protocols/oscar/liboscar/locationrightstask.cpp b/kopete/protocols/oscar/liboscar/locationrightstask.cpp index 5aae9a5e..f019b961 100644 --- a/kopete/protocols/oscar/liboscar/locationrightstask.cpp +++ b/kopete/protocols/oscar/liboscar/locationrightstask.cpp @@ -80,7 +80,7 @@ void LocationRightsTask::sendLocationRightsRequest() void LocationRightsTask::handleLocationRightsResponse() { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Ignoring location rights response" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/logintask.cpp b/kopete/protocols/oscar/liboscar/logintask.cpp index 962b2e1a..a153f8f7 100644 --- a/kopete/protocols/oscar/liboscar/logintask.cpp +++ b/kopete/protocols/oscar/liboscar/logintask.cpp @@ -18,7 +18,7 @@ #include "logintask.h" -#include +#include #include #include @@ -63,7 +63,7 @@ bool StageOneLoginTask::take( Transfer* transfer ) m_closeTask = new CloseConnectionTask( client()->rootTask() ); //connect finished signal - connect( m_closeTask, SIGNAL( finished() ), this, SLOT( closeTaskFinished() ) ); + connect( m_closeTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeTaskFinished() ) ); m_icqTask->go( true ); } else @@ -80,7 +80,7 @@ bool StageOneLoginTask::take( Transfer* transfer ) send( ft ); m_aimTask = new AimLoginTask( client()->rootTask() ); - connect( m_aimTask, SIGNAL( finished() ), this, SLOT( aimTaskFinished() ) ); + connect( m_aimTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( aimTaskFinished() ) ); m_aimTask->go( true ); } return true; @@ -118,17 +118,17 @@ bool StageOneLoginTask::forMe( Transfer* transfer ) const return ( ft && ft->flapChannel() == 1 ); } -const QByteArray& StageOneLoginTask::loginCookie() const +const TQByteArray& StageOneLoginTask::loginCookie() const { return m_cookie; } -const QString& StageOneLoginTask::bosServer() const +const TQString& StageOneLoginTask::bosServer() const { return m_bosServer; } -const QString& StageOneLoginTask::bosPort() const +const TQString& StageOneLoginTask::bosPort() const { return m_bosPort; } @@ -145,8 +145,8 @@ StageTwoLoginTask::StageTwoLoginTask( Task* parent ) m_versionTask = new ServerVersionsTask( rootTask ); m_rateTask = new RateInfoTask( rootTask ); - QObject::connect( m_versionTask, SIGNAL( finished() ), this, SLOT( versionTaskFinished() ) ); - QObject::connect( m_rateTask, SIGNAL( finished() ), this, SLOT( rateTaskFinished() ) ); + TQObject::connect( m_versionTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( versionTaskFinished() ) ); + TQObject::connect( m_rateTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( rateTaskFinished() ) ); } StageTwoLoginTask::~StageTwoLoginTask() @@ -188,16 +188,16 @@ void StageTwoLoginTask::onGo() send( ft ); } else - setError( -1, QString::null ); + setError( -1, TQString::null ); return; } -void StageTwoLoginTask::setCookie( const QByteArray& newCookie ) +void StageTwoLoginTask::setCookie( const TQByteArray& newCookie ) { m_cookie.duplicate( newCookie ); } -const QByteArray& StageTwoLoginTask::cookie() +const TQByteArray& StageTwoLoginTask::cookie() { return m_cookie; } @@ -210,7 +210,7 @@ void StageTwoLoginTask::versionTaskFinished() void StageTwoLoginTask::rateTaskFinished() { - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } #include "logintask.moc" diff --git a/kopete/protocols/oscar/liboscar/logintask.h b/kopete/protocols/oscar/liboscar/logintask.h index 12061821..83bc8fde 100644 --- a/kopete/protocols/oscar/liboscar/logintask.h +++ b/kopete/protocols/oscar/liboscar/logintask.h @@ -19,7 +19,7 @@ #ifndef _OSCAR_LOGINTASK_H_ #define _OSCAR_LOGINTASK_H_ -#include +#include #include "oscartypes.h" #include "task.h" @@ -52,19 +52,19 @@ public: //Protocol specific stuff //! Get the BOS cookie - const QByteArray& loginCookie() const; + const TQByteArray& loginCookie() const; //! Get the BOS server - const QString& bosServer() const; + const TQString& bosServer() const; //! Get the BOS port - const QString& bosPort() const; + const TQString& bosPort() const; //! Get the error code, if there is one int errorCode() const; //! Get the error reason so it can be displayed - const QString& errorReason() const; + const TQString& errorReason() const; public slots: @@ -82,9 +82,9 @@ private: CloseConnectionTask* m_closeTask; //Private data we get from the tasks - QByteArray m_cookie; - QString m_bosServer; - QString m_bosPort; + TQByteArray m_cookie; + TQString m_bosServer; + TQString m_bosPort; }; @@ -111,13 +111,13 @@ public: //protocol specifics //! Set the cookie to send to the server - void setCookie( const QByteArray& newCookie ); + void setCookie( const TQByteArray& newCookie ); //! Get the cookie to send to the server - const QByteArray& cookie(); + const TQByteArray& cookie(); - QString host() const; - QString port() const; + TQString host() const; + TQString port() const; public slots: @@ -131,8 +131,8 @@ protected: bool forMe( Transfer* transfer ) const; private: - QByteArray m_cookie; - QString m_host, m_port; + TQByteArray m_cookie; + TQString m_host, m_port; //tasks ServerVersionsTask* m_versionTask; diff --git a/kopete/protocols/oscar/liboscar/messagereceivertask.cpp b/kopete/protocols/oscar/liboscar/messagereceivertask.cpp index 2db05eb1..0dd26e3d 100644 --- a/kopete/protocols/oscar/liboscar/messagereceivertask.cpp +++ b/kopete/protocols/oscar/liboscar/messagereceivertask.cpp @@ -16,7 +16,7 @@ #include "messagereceivertask.h" -#include +#include #include #include "transfer.h" #include "buffer.h" @@ -109,7 +109,7 @@ bool MessageReceiverTask::take( Transfer* transfer ) else { int screenNameLength = b->getByte(); - m_fromUser = QString( b->getBlock( screenNameLength ) ); + m_fromUser = TQString( b->getBlock( screenNameLength ) ); setTransfer( transfer ); handleAutoResponse(); setTransfer( 0 ); @@ -122,7 +122,7 @@ bool MessageReceiverTask::take( Transfer* transfer ) void MessageReceiverTask::handleType1Message() { Oscar::Message msg; - QValueList messageTLVList = transfer()->buffer()->getTLVList(); + TQValueList messageTLVList = transfer()->buffer()->getTLVList(); TLV t = Oscar::findTLV( messageTLVList, 0x0002 ); if ( !t ) { @@ -130,8 +130,8 @@ void MessageReceiverTask::handleType1Message() return; } Buffer messageBuffer( t.data ); - QValueList innerTLVList = messageBuffer.getTLVList(); - QValueList::iterator it = innerTLVList.begin(), listEnd = innerTLVList.end(); + TQValueList innerTLVList = messageBuffer.getTLVList(); + TQValueList::iterator it = innerTLVList.begin(), listEnd = innerTLVList.end(); for ( ; (*it); ++it ) { switch ( ( *it ).type ) @@ -154,7 +154,7 @@ void MessageReceiverTask::handleType1Message() //message length is buffer length - length of ( charset + subcharset ) */ int msgLength = ( *it ).length - 4; - QByteArray msgArray( message.getBlock( msgLength ) ); + TQByteArray msgArray( message.getBlock( msgLength ) ); msg.setTextArray( msgArray ); break; @@ -176,7 +176,7 @@ void MessageReceiverTask::handleType1Message() msg.setSender( m_fromUser ); msg.setReceiver( client()->userId() ); - msg.setTimestamp( QDateTime::currentDateTime() ); + msg.setTimestamp( TQDateTime::currentDateTime() ); msg.setType( 0x01 ); emit receivedMessage( msg ); @@ -187,7 +187,7 @@ void MessageReceiverTask::handleType2Message() kdDebug(14151) << k_funcinfo << "Received Type 2 message. Trying to handle it..." << endl; Oscar::Message msg; - QValueList messageTLVList = transfer()->buffer()->getTLVList(); + TQValueList messageTLVList = transfer()->buffer()->getTLVList(); TLV t = Oscar::findTLV( messageTLVList, 0x0005 ); if ( !t ) { @@ -280,7 +280,7 @@ void MessageReceiverTask::handleType4Message() Buffer tlv5buffer(tlv5.data, tlv5.length); DWORD uin = tlv5buffer.getLEDWord(); // little endian for no sane reason! - if ( QString::number(uin) != m_fromUser ) + if ( TQString::number(uin) != m_fromUser ) kdWarning(14151) << k_funcinfo << "message uin does not match uin found in packet header!" << endl; BYTE msgType = tlv5buffer.getByte(); @@ -291,7 +291,7 @@ void MessageReceiverTask::handleType4Message() //handle the special user types Oscar::Message msg; - QString msgSender; + TQString msgSender; switch ( msgType ) { case 0x0D: @@ -307,7 +307,7 @@ void MessageReceiverTask::handleType4Message() break; }; - QCString msgText = tlv5buffer.getLNTS(); + TQCString msgText = tlv5buffer.getLNTS(); int msgLength = msgText.size(); if ( msgType == 0x0D || msgType == 0x0E ) { @@ -332,7 +332,7 @@ void MessageReceiverTask::handleType4Message() } msg.setType( 0x04 ); - msg.setTimestamp( QDateTime::currentDateTime() ); + msg.setTimestamp( TQDateTime::currentDateTime() ); msg.setSender( msgSender ); msg.setReceiver( client()->userId() ); msg.setEncoding( Oscar::Message::UserDefined ); @@ -404,7 +404,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Message type is: " << messageType << endl; - QCString msgText( b->getLELNTS() ); + TQCString msgText( b->getLELNTS() ); Oscar::Message::Encoding encoding = Oscar::Message::UserDefined; int fgcolor = 0x00000000; int bgcolor = 0x00ffffff; @@ -421,7 +421,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) if ( b->length() < capLength ) break; - QByteArray cap( b->getBlock( capLength ) ); + TQByteArray cap( b->getBlock( capLength ) ); if ( qstrncmp ( cap.data(), "{0946134E-4C7F-11D1-8222-444553540000}", capLength ) == 0 ) encoding = Oscar::Message::UTF8; } @@ -437,7 +437,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) msg->setSender( m_fromUser ); msg->setReceiver( client()->userId() ); - msg->setTimestamp( QDateTime::currentDateTime() ); + msg->setTimestamp( TQDateTime::currentDateTime() ); msg->setType( 0x02 ); msg->setIcbmCookie( m_icbmCookie ); msg->setProtocolVersion( protocolVersion ); @@ -451,7 +451,7 @@ void MessageReceiverTask::parseRendezvousData( Buffer* b, Oscar::Message* msg ) } } -QTextCodec* MessageReceiverTask::guessCodec( const QCString& string ) +TQTextCodec* MessageReceiverTask::guessCodec( const TQCString& string ) { Q_UNUSED( string ); return 0; diff --git a/kopete/protocols/oscar/liboscar/messagereceivertask.h b/kopete/protocols/oscar/liboscar/messagereceivertask.h index b50a133f..4a129016 100644 --- a/kopete/protocols/oscar/liboscar/messagereceivertask.h +++ b/kopete/protocols/oscar/liboscar/messagereceivertask.h @@ -17,8 +17,8 @@ #define MESSAGERECEIVERTASK_H #include "task.h" -#include -#include +#include +#include #include "oscarmessage.h" #include "oscartypeclasses.h" #include "oscarmessage.h" @@ -61,13 +61,13 @@ private: //!Parses Rendezvous data in Buffer and puts the information into Message void parseRendezvousData( Buffer* b, Oscar::Message* msg ); - QTextCodec* guessCodec( const QCString& string ); + TQTextCodec* guessCodec( const TQCString& string ); private: - QByteArray m_icbmCookie; + TQByteArray m_icbmCookie; int m_channel; - QString m_fromUser; + TQString m_fromUser; int m_currentSnacSubtype; int m_charSet; int m_subCharSet; diff --git a/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp b/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp index d97da7a3..88d41a84 100644 --- a/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp +++ b/kopete/protocols/oscar/liboscar/offlinemessagestask.cpp @@ -108,10 +108,10 @@ void OfflineMessagesTask::handleOfflineMessage() BYTE flags = buffer->getByte(); // msg flags WORD msgLength = buffer->getLEWord(); - QByteArray msg = buffer->getBlock( msgLength ); + TQByteArray msg = buffer->getBlock( msgLength ); - QDate date(year, month, day); - QTime time(hour,minute); + TQDate date(year, month, day); + TQTime time(hour,minute); #ifndef HAVE_TM_GMTOFF int tz = -( ::timezone ); #else @@ -125,10 +125,10 @@ void OfflineMessagesTask::handleOfflineMessage() #endif time = time.addSecs( tz ); - QDateTime hackyTime( date, time ); + TQDateTime hackyTime( date, time ); Oscar::Message message( Oscar::Message::UserDefined, msg, type, flags, hackyTime ); - message.setSender( QString::number( senderUin ) ); - message.setReceiver( QString::number( receiverUin ) ); + message.setSender( TQString::number( senderUin ) ); + message.setReceiver( TQString::number( receiverUin ) ); kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Received offline message '" << msg.data() << "' from " << senderUin << endl; diff --git a/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp b/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp index 785e23f7..6b6b3d05 100644 --- a/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp +++ b/kopete/protocols/oscar/liboscar/onlinenotifiertask.cpp @@ -80,7 +80,7 @@ void OnlineNotifierTask::userOnline() Buffer* buffer = transfer()->buffer(); UserDetails ud; ud.fill( buffer ); - QString user = ud.userId(); + TQString user = ud.userId(); //kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << user << " is now online" << endl; emit userIsOnline( user, ud ); } @@ -90,7 +90,7 @@ void OnlineNotifierTask::userOffline() Buffer* buffer = transfer()->buffer(); UserDetails ud; ud.fill( buffer ); - QString user = ud.userId(); + TQString user = ud.userId(); //kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << user << " is now offline" << endl; emit userIsOffline( user, ud ); } diff --git a/kopete/protocols/oscar/liboscar/onlinenotifiertask.h b/kopete/protocols/oscar/liboscar/onlinenotifiertask.h index 2ec58e5a..18bcb5c1 100644 --- a/kopete/protocols/oscar/liboscar/onlinenotifiertask.h +++ b/kopete/protocols/oscar/liboscar/onlinenotifiertask.h @@ -46,8 +46,8 @@ protected: virtual bool forMe( const Transfer* transfer ) const; signals: - void userIsOnline( const QString& user, const UserDetails& ud ); - void userIsOffline( const QString& user, const UserDetails& ud ); + void userIsOnline( const TQString& user, const UserDetails& ud ); + void userIsOffline( const TQString& user, const UserDetails& ud ); private: void userOnline(); diff --git a/kopete/protocols/oscar/liboscar/oscarbytestream.cpp b/kopete/protocols/oscar/liboscar/oscarbytestream.cpp index ea090442..5f39d205 100644 --- a/kopete/protocols/oscar/liboscar/oscarbytestream.cpp +++ b/kopete/protocols/oscar/liboscar/oscarbytestream.cpp @@ -17,14 +17,14 @@ * * ***************************************************************************/ -#include +#include #include #include #include #include "oscarbytestream.h" -KNetworkByteStream::KNetworkByteStream( QObject *parent, const char */*name*/ ) +KNetworkByteStream::KNetworkByteStream( TQObject *parent, const char */*name*/ ) : ByteStream ( parent ) { kdDebug( 14151 ) << k_funcinfo << "Instantiating new KNetwork byte stream." << endl; @@ -38,14 +38,14 @@ KNetworkByteStream::KNetworkByteStream( QObject *parent, const char */*name*/ ) mSocket->enableRead( true ); // connect signals and slots - QObject::connect( mSocket, SIGNAL ( gotError ( int ) ), this, SLOT ( slotError ( int ) ) ); - QObject::connect( mSocket, SIGNAL ( connected ( const KResolverEntry& ) ), this, SLOT ( slotConnected () ) ); - QObject::connect( mSocket, SIGNAL ( closed () ), this, SLOT ( slotConnectionClosed () ) ); - QObject::connect( mSocket, SIGNAL ( readyRead () ), this, SLOT ( slotReadyRead () ) ); - QObject::connect( mSocket, SIGNAL ( bytesWritten ( int ) ), this, SLOT ( slotBytesWritten ( int ) ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( gotError ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( connected ( const KResolverEntry& ) ), this, TQT_SLOT ( slotConnected () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( closed () ), this, TQT_SLOT ( slotConnectionClosed () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( readyRead () ), this, TQT_SLOT ( slotReadyRead () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( bytesWritten ( int ) ), this, TQT_SLOT ( slotBytesWritten ( int ) ) ); } -bool KNetworkByteStream::connect( QString host, QString service ) +bool KNetworkByteStream::connect( TQString host, TQString service ) { kdDebug( 14151 ) << k_funcinfo << "Connecting to " << host << ", service " << service << endl; @@ -71,7 +71,7 @@ void KNetworkByteStream::close () int KNetworkByteStream::tryWrite () { // send all data from the buffers to the socket - QByteArray writeData = takeWrite(); + TQByteArray writeData = takeWrite(); #ifdef OSCAR_EXCESSIVE_DEBUG kdDebug(14151) << k_funcinfo << "writing " << writeData.size() << " bytes." << endl; #endif @@ -115,7 +115,7 @@ void KNetworkByteStream::slotConnectionClosed() void KNetworkByteStream::slotReadyRead() { // stuff all available data into our buffers - QByteArray readBuffer( socket()->bytesAvailable () ); + TQByteArray readBuffer( socket()->bytesAvailable () ); socket()->readBlock( readBuffer.data (), readBuffer.size () ); diff --git a/kopete/protocols/oscar/liboscar/oscarbytestream.h b/kopete/protocols/oscar/liboscar/oscarbytestream.h index bd618666..2ecd92d9 100644 --- a/kopete/protocols/oscar/liboscar/oscarbytestream.h +++ b/kopete/protocols/oscar/liboscar/oscarbytestream.h @@ -37,11 +37,11 @@ class KNetworkByteStream : public ByteStream Q_OBJECT public: - KNetworkByteStream ( QObject *parent = 0, const char *name = 0 ); + KNetworkByteStream ( TQObject *parent = 0, const char *name = 0 ); ~KNetworkByteStream (); - bool connect ( QString host, QString service ); + bool connect ( TQString host, TQString service ); virtual bool isOpen () const; virtual void close (); diff --git a/kopete/protocols/oscar/liboscar/oscarclientstream.cpp b/kopete/protocols/oscar/liboscar/oscarclientstream.cpp index e607a24b..87da6020 100644 --- a/kopete/protocols/oscar/liboscar/oscarclientstream.cpp +++ b/kopete/protocols/oscar/liboscar/oscarclientstream.cpp @@ -20,10 +20,10 @@ #include "oscarclientstream.h" -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -36,7 +36,7 @@ #define LIBOSCAR_DEBUG 0 -void cs_dump( const QByteArray &bytes ); +void cs_dump( const TQByteArray &bytes ); enum { Idle, @@ -59,9 +59,9 @@ public: bs = 0; connection = 0; - username = QString::null; - password = QString::null; - server = QString::null; + username = TQString::null; + password = TQString::null; + server = TQString::null; haveLocalAddr = false; doBinding = true; @@ -74,12 +74,12 @@ public: newTransfers = false; } - QString username; - QString password; - QString server; + TQString username; + TQString password; + TQString server; bool doAuth; //send the initial login sequences to get the cookie bool haveLocalAddr; - QHostAddress localAddr; + TQHostAddress localAddr; Q_UINT16 localPort; bool doBinding; @@ -88,7 +88,7 @@ public: CoreProtocol client; Connection* connection; - QString defRealm; + TQString defRealm; int mode; int state; @@ -96,15 +96,15 @@ public: bool newTransfers; int errCond; - QString errText; + TQString errText; - QPtrQueue in; + TQPtrQueue in; - QTimer noopTimer; // used to send icq keepalive + TQTimer noopTimer; // used to send icq keepalive int noop_time; }; -ClientStream::ClientStream(Connector *conn, QObject *parent) +ClientStream::ClientStream(Connector *conn, TQObject *parent) :Stream(parent) { //qDebug("CLIENTSTREAM::ClientStream"); @@ -112,13 +112,13 @@ ClientStream::ClientStream(Connector *conn, QObject *parent) d = new Private; d->mode = ClientMode; d->conn = conn; - connect( d->conn, SIGNAL(connected()), SLOT(cr_connected()) ); - connect( d->conn, SIGNAL(error()), SLOT(cr_error()) ); - connect( &d->client, SIGNAL( outgoingData( const QByteArray& ) ), SLOT ( cp_outgoingData( const QByteArray & ) ) ); - connect( &d->client, SIGNAL( incomingData() ), SLOT ( cp_incomingData() ) ); + connect( d->conn, TQT_SIGNAL(connected()), TQT_SLOT(cr_connected()) ); + connect( d->conn, TQT_SIGNAL(error()), TQT_SLOT(cr_error()) ); + connect( &d->client, TQT_SIGNAL( outgoingData( const TQByteArray& ) ), TQT_SLOT ( cp_outgoingData( const TQByteArray & ) ) ); + connect( &d->client, TQT_SIGNAL( incomingData() ), TQT_SLOT ( cp_incomingData() ) ); d->noop_time = 0; - connect(&d->noopTimer, SIGNAL(timeout()), SLOT(doNoop())); + connect(&d->noopTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doNoop())); } ClientStream::~ClientStream() @@ -151,7 +151,7 @@ void ClientStream::reset(bool all) d->in.clear(); } -void ClientStream::connectToServer(const QString& server, bool auth) +void ClientStream::connectToServer(const TQString& server, bool auth) { reset(true); d->state = Connecting; @@ -205,7 +205,7 @@ void ClientStream::setNoopTime(int mills) d->noopTimer.start( d->noop_time ); } -void ClientStream::setLocalAddr(const QHostAddress &addr, Q_UINT16 port) +void ClientStream::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port) { d->haveLocalAddr = true; d->localAddr = addr; @@ -217,7 +217,7 @@ int ClientStream::errorCondition() const return d->errCond; } -QString ClientStream::errorText() const +TQString ClientStream::errorText() const { return d->errText; } @@ -263,7 +263,7 @@ void ClientStream::write( Transfer *request ) d->client.outgoingTransfer( request ); } -void cs_dump( const QByteArray &bytes ) +void cs_dump( const TQByteArray &bytes ) { #if 0 qDebug( "contains: %i bytes ", bytes.count() ); @@ -305,7 +305,7 @@ void cs_dump( const QByteArray &bytes ) Q_UNUSED( bytes ); } -void ClientStream::cp_outgoingData( const QByteArray& outgoingBytes ) +void ClientStream::cp_outgoingData( const TQByteArray& outgoingBytes ) { // take formatted bytes from CoreProtocol and put them on the wire d->bs->write( outgoingBytes ); @@ -329,19 +329,19 @@ void ClientStream::cp_incomingData() void ClientStream::cr_connected() { d->bs = d->conn->stream(); - connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed())); - connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished())); - connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead())); - connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int))); - connect(d->bs, SIGNAL(error(int)), SLOT(bs_error(int))); + connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed())); + connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished())); + connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead())); + connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int))); + connect(d->bs, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int))); d->state = Active; if ( d->noop_time ) d->noopTimer.start( d->noop_time ); - QByteArray spare = d->bs->read(); + TQByteArray spare = d->bs->read(); - QGuardedPtr self = this; + TQGuardedPtr self = this; emit connected(); if(!self) return; @@ -372,12 +372,12 @@ void ClientStream::bs_error(int) void ClientStream::bs_readyRead() { - QByteArray a; + TQByteArray a; //qDebug( "size of storage for incoming data is %i bytes.", a.size() ); a = d->bs->read(); #if LIBOSCAR_DEBUG - QCString cs(a.data(), a.size()+1); + TQCString cs(a.data(), a.size()+1); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "recv: " << a.size() << "bytes" << endl; cs_dump( a ); #endif @@ -408,7 +408,7 @@ void ClientStream::processNext() { if( !d->in.isEmpty() ) { - QTimer::singleShot(0, this, SLOT(doReadyRead())); + TQTimer::singleShot(0, this, TQT_SLOT(doReadyRead())); } } diff --git a/kopete/protocols/oscar/liboscar/oscarclientstream.h b/kopete/protocols/oscar/liboscar/oscarclientstream.h index f8b4d2b6..307c0616 100644 --- a/kopete/protocols/oscar/liboscar/oscarclientstream.h +++ b/kopete/protocols/oscar/liboscar/oscarclientstream.h @@ -73,19 +73,19 @@ public: BindConflict // resource in-use }; - ClientStream(Connector *conn, QObject *parent=0); + ClientStream(Connector *conn, TQObject *parent=0); ~ClientStream(); - void connectToServer(const QString& server, bool auth=true); + void connectToServer(const TQString& server, bool auth=true); void accept(); // server bool isActive() const; bool isAuthenticated() const; // login params - void setUsername(const QString &s); - void setPassword(const QString &s); + void setUsername(const TQString &s); + void setPassword(const TQString &s); - void setLocalAddr(const QHostAddress &addr, Q_UINT16 port); + void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port); void close(); @@ -110,10 +110,10 @@ public: void write( Transfer* request ); int errorCondition() const; - QString errorText() const; + TQString errorText() const; // extrahttp://bugs.kde.org/show_bug.cgi?id=85158 -/*# void writeDirect(const QString &s); // must be for debug testing*/ +/*# void writeDirect(const TQString &s); // must be for debug testing*/ void setNoopTime(int mills); signals: @@ -130,7 +130,7 @@ private slots: /** * collects wire ready outgoing data from the core protocol and sends */ - void cp_outgoingData( const QByteArray& ); + void cp_outgoingData( const TQByteArray& ); /** * collects parsed incoming data as a transfer from the core protocol and queues */ diff --git a/kopete/protocols/oscar/liboscar/oscarconnector.cpp b/kopete/protocols/oscar/liboscar/oscarconnector.cpp index 6fcef197..ec649e08 100644 --- a/kopete/protocols/oscar/liboscar/oscarconnector.cpp +++ b/kopete/protocols/oscar/liboscar/oscarconnector.cpp @@ -24,7 +24,7 @@ #include "oscarconnector.h" #include "oscarbytestream.h" -KNetworkConnector::KNetworkConnector( QObject *parent, const char */*name*/ ) +KNetworkConnector::KNetworkConnector( TQObject *parent, const char */*name*/ ) : Connector( parent ) { kdDebug( 14151 ) << k_funcinfo << "New KNetwork connector." << endl; @@ -33,8 +33,8 @@ KNetworkConnector::KNetworkConnector( QObject *parent, const char */*name*/ ) mByteStream = new KNetworkByteStream( this ); - connect( mByteStream, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) ); - connect( mByteStream, SIGNAL ( error ( int ) ), this, SLOT ( slotError ( int ) ) ); + connect( mByteStream, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) ); + connect( mByteStream, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); mPort = 0; } @@ -43,7 +43,7 @@ KNetworkConnector::~KNetworkConnector() delete mByteStream; } -void KNetworkConnector::connectToServer( const QString &server ) +void KNetworkConnector::connectToServer( const TQString &server ) { kdDebug( 14151 ) << k_funcinfo << "Initiating connection to " << mHost << endl; Q_ASSERT( !mHost.isNull() ); @@ -51,7 +51,7 @@ void KNetworkConnector::connectToServer( const QString &server ) mErrorCode = KNetwork::KSocketBase::NoError; - if ( !mByteStream->connect ( mHost, QString::number ( mPort ) ) ) + if ( !mByteStream->connect ( mHost, TQString::number ( mPort ) ) ) { // Houston, we have a problem mErrorCode = mByteStream->socket()->error(); @@ -65,7 +65,7 @@ void KNetworkConnector::slotConnected() // FIXME: setPeerAddress() is something different, find out correct usage later //KInetSocketAddress inetAddress = mStreamSocket->address().asInet().makeIPv6 (); - //setPeerAddress ( QHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); + //setPeerAddress ( TQHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); emit connected (); } @@ -94,7 +94,7 @@ void KNetworkConnector::done() mByteStream->close (); } -void KNetworkConnector::setOptHostPort( const QString &host, Q_UINT16 port ) +void KNetworkConnector::setOptHostPort( const TQString &host, Q_UINT16 port ) { kdDebug ( 14151 ) << k_funcinfo << "Manually specifying host " << host << " and port " << port << endl; diff --git a/kopete/protocols/oscar/liboscar/oscarconnector.h b/kopete/protocols/oscar/liboscar/oscarconnector.h index d130f7da..39696a35 100644 --- a/kopete/protocols/oscar/liboscar/oscarconnector.h +++ b/kopete/protocols/oscar/liboscar/oscarconnector.h @@ -39,15 +39,15 @@ class KNetworkConnector : public Connector Q_OBJECT public: - KNetworkConnector( QObject *parent = 0, const char *name = 0 ); + KNetworkConnector( TQObject *parent = 0, const char *name = 0 ); virtual ~KNetworkConnector(); - virtual void connectToServer( const QString &server ); + virtual void connectToServer( const TQString &server ); virtual ByteStream *stream() const; virtual void done(); - void setOptHostPort( const QString &host, Q_UINT16 port ); + void setOptHostPort( const TQString &host, Q_UINT16 port ); int errorCode(); @@ -56,7 +56,7 @@ private slots: void slotError( int ); private: - QString mHost; + TQString mHost; Q_UINT16 mPort; int mErrorCode; diff --git a/kopete/protocols/oscar/liboscar/oscarmessage.cpp b/kopete/protocols/oscar/liboscar/oscarmessage.cpp index f4f512d2..1f263be0 100644 --- a/kopete/protocols/oscar/liboscar/oscarmessage.cpp +++ b/kopete/protocols/oscar/liboscar/oscarmessage.cpp @@ -19,8 +19,8 @@ #include "oscarmessage.h" -#include -#include +#include +#include Oscar::Message::Message() @@ -33,7 +33,7 @@ Oscar::Message::Message() { } -Oscar::Message::Message( Encoding messageEncoding, const QByteArray& messageText, int channel, int properties, QDateTime timestamp ) +Oscar::Message::Message( Encoding messageEncoding, const TQByteArray& messageText, int channel, int properties, TQDateTime timestamp ) : m_channel( channel ), m_properties( properties ), m_messageType( 0 ), @@ -45,7 +45,7 @@ Oscar::Message::Message( Encoding messageEncoding, const QByteArray& messageText { } -Oscar::Message::Message( Encoding messageEncoding, const QCString& messageText, int channel, int properties, QDateTime timestamp ) +Oscar::Message::Message( Encoding messageEncoding, const TQCString& messageText, int channel, int properties, TQDateTime timestamp ) : m_channel( channel ), m_properties( properties ), m_messageType( 0 ), @@ -57,7 +57,7 @@ Oscar::Message::Message( Encoding messageEncoding, const QCString& messageText, setTextArray( messageText ); } -Oscar::Message::Message( Encoding messageEncoding, const QString& messageText, int channel, int properties, QDateTime timestamp, QTextCodec* codec ) +Oscar::Message::Message( Encoding messageEncoding, const TQString& messageText, int channel, int properties, TQDateTime timestamp, TQTextCodec* codec ) : m_channel( channel ), m_properties( properties ), m_messageType( 0 ), @@ -68,50 +68,50 @@ Oscar::Message::Message( Encoding messageEncoding, const QString& messageText, i setText( messageEncoding, messageText, codec ); } -QString Oscar::Message::sender() const +TQString Oscar::Message::sender() const { return m_sender; } -void Oscar::Message::setSender( const QString& sender ) +void Oscar::Message::setSender( const TQString& sender ) { m_sender = sender; } -QString Oscar::Message::receiver() const +TQString Oscar::Message::receiver() const { return m_receiver; } -void Oscar::Message::setReceiver( const QString& receiver ) +void Oscar::Message::setReceiver( const TQString& receiver ) { m_receiver = receiver; } -QByteArray Oscar::Message::textArray() const +TQByteArray Oscar::Message::textArray() const { return m_textArray; } -QString Oscar::Message::text( QTextCodec *codec ) const +TQString Oscar::Message::text( TQTextCodec *codec ) const { switch ( m_encoding ) { case Oscar::Message::UserDefined: return codec->toUnicode( m_textArray ); case Oscar::Message::UTF8: - return QString::fromUtf8( m_textArray.data(), m_textArray.size() ); + return TQString::fromUtf8( m_textArray.data(), m_textArray.size() ); case Oscar::Message::UCS2: { uint len = m_textArray.size() / 2; - QString result; + TQString result; result.setLength( len ); - QByteArray::ConstIterator p = m_textArray.begin(); + TQByteArray::ConstIterator p = m_textArray.begin(); for ( uint i = 0; i < len; i++) { char row = *p++; char cell = *p++; - result[i] = QChar( cell, row ); + result[i] = TQChar( cell, row ); } //check if last character isn't null if ( result[len-1].isNull() ) @@ -122,22 +122,22 @@ QString Oscar::Message::text( QTextCodec *codec ) const default: break; // Should never happen. } - return QString::null; + return TQString::null; //FIXME: warn at least with kdWarning if an unrecognised encoding style was seen. } -void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const QString& newText, QTextCodec* codec ) +void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const TQString& newText, TQTextCodec* codec ) { uint len; switch ( newEncoding ) { case Oscar::Message::UserDefined: - // Oscar::Message::setTextArray( const QCString& ) + // Oscar::Message::setTextArray( const TQCString& ) // strips trailing null byte automatically. setTextArray( codec->fromUnicode( newText ) ); break; case Oscar::Message::UTF8: - // Oscar::Message::setTextArray( const QCString& ) + // Oscar::Message::setTextArray( const TQCString& ) // strips trailing null byte automatically. setTextArray( newText.utf8() ); break; @@ -145,7 +145,7 @@ void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const QStrin { len = newText.length(); m_textArray.resize( len * 2 ); - QByteArray::Iterator p = m_textArray.begin(); + TQByteArray::Iterator p = m_textArray.begin(); for ( uint i = 0; i < len; i++) { *p++ = newText[i].row(); @@ -159,12 +159,12 @@ void Oscar::Message::setText( Oscar::Message::Encoding newEncoding, const QStrin m_encoding = newEncoding; } -void Oscar::Message::setTextArray( const QByteArray& newTextArray ) +void Oscar::Message::setTextArray( const TQByteArray& newTextArray ) { m_textArray.duplicate( newTextArray ); } -void Oscar::Message::setTextArray( const QCString& newTextArray ) +void Oscar::Message::setTextArray( const TQCString& newTextArray ) { m_textArray.duplicate( newTextArray ); uint len = m_textArray.size(); @@ -212,22 +212,22 @@ void Oscar::Message::setType( int newType ) m_channel = newType; } -QDateTime Oscar::Message::timestamp() const +TQDateTime Oscar::Message::timestamp() const { return m_timestamp; } -void Oscar::Message::setTimestamp( QDateTime ts ) +void Oscar::Message::setTimestamp( TQDateTime ts ) { m_timestamp = ts; } -QByteArray Oscar::Message::icbmCookie() const +TQByteArray Oscar::Message::icbmCookie() const { return m_icbmCookie; } -void Oscar::Message::setIcbmCookie( const QByteArray& cookie ) +void Oscar::Message::setIcbmCookie( const TQByteArray& cookie ) { m_icbmCookie.duplicate( cookie ); } @@ -272,12 +272,12 @@ void Oscar::Message::setExchange( Oscar::WORD exchange ) m_exchange = exchange; } -QString Oscar::Message::chatRoom() const +TQString Oscar::Message::chatRoom() const { return m_chatRoom; } -void Oscar::Message::setChatRoom( const QString& room ) +void Oscar::Message::setChatRoom( const TQString& room ) { m_chatRoom = room; } diff --git a/kopete/protocols/oscar/liboscar/oscarmessage.h b/kopete/protocols/oscar/liboscar/oscarmessage.h index 7f081054..f6f08fd9 100644 --- a/kopete/protocols/oscar/liboscar/oscarmessage.h +++ b/kopete/protocols/oscar/liboscar/oscarmessage.h @@ -21,10 +21,10 @@ #ifndef _OSCARMESSAGE_H_ #define _OSCARMESSAGE_H_ -#include -#include -#include -#include +#include +#include +#include +#include #include "kopete_export.h" #include "oscartypes.h" @@ -62,36 +62,36 @@ public: Message(); - Message( Encoding messageEncoding, const QByteArray& messageText, int channel, int properties, QDateTime timestamp ); - Message( Encoding messageEncoding, const QCString& messageText, int channel, int properties, QDateTime timestamp ); - Message( Encoding messageEncoding, const QString& messageText, int channel, int properties, QDateTime timestamp, QTextCodec* codec = 0 ); + Message( Encoding messageEncoding, const TQByteArray& messageText, int channel, int properties, TQDateTime timestamp ); + Message( Encoding messageEncoding, const TQCString& messageText, int channel, int properties, TQDateTime timestamp ); + Message( Encoding messageEncoding, const TQString& messageText, int channel, int properties, TQDateTime timestamp, TQTextCodec* codec = 0 ); /** Get the sender of the message */ - QString sender() const; + TQString sender() const; /** Set the sender of the message */ - void setSender( const QString& sender ); + void setSender( const TQString& sender ); /** Get the receiver of the message */ - QString receiver() const; + TQString receiver() const; /** Set the receiver of the message */ - void setReceiver( const QString& receiver); + void setReceiver( const TQString& receiver); /** get the message text */ - QString text( QTextCodec* codec ) const; + TQString text( TQTextCodec* codec ) const; /** set the message text */ - void setText( Encoding newEncoding, const QString& newText, QTextCodec* codec = 0); + void setText( Encoding newEncoding, const TQString& newText, TQTextCodec* codec = 0); /** get the message text as a bytearray for decoding */ - QByteArray textArray() const; + TQByteArray textArray() const; /** set the message text as a bytearray for decoding */ - void setTextArray( const QByteArray& newTextArray ); + void setTextArray( const TQByteArray& newTextArray ); /** set the mesasge text as a bytearray for decoding */ - void setTextArray( const QCString& newTextArray ); + void setTextArray( const TQCString& newTextArray ); /** get the message properties */ int properties() const; @@ -109,16 +109,16 @@ public: void setType( int newType ); /** get the timestamp of the message */ - QDateTime timestamp() const; + TQDateTime timestamp() const; /** set the timestamp of the message */ - void setTimestamp( QDateTime ts ); + void setTimestamp( TQDateTime ts ); /** get the ICBM cookie of the message */ - QByteArray icbmCookie() const; + TQByteArray icbmCookie() const; /** set the ICBM cookie of the message */ - void setIcbmCookie( const QByteArray& cookie ); + void setIcbmCookie( const TQByteArray& cookie ); /** get the protocol version (channel 2 messages only) */ int protocolVersion() const; @@ -145,10 +145,10 @@ public: void setExchange( Oscar::WORD ); /** get the chat room that this message is for */ - QString chatRoom() const; + TQString chatRoom() const; /** set the chat room that this message is for */ - void setChatRoom( const QString& ); + void setChatRoom( const TQString& ); /** get the message encoding */ Encoding encoding() const; @@ -160,18 +160,18 @@ public: private: //TODO d-pointer - QString m_sender; - QString m_receiver; + TQString m_sender; + TQString m_receiver; int m_channel; int m_properties; int m_messageType; int m_protocolVersion; int m_channel2Counter; - QByteArray m_icbmCookie; - QByteArray m_textArray; - QDateTime m_timestamp; + TQByteArray m_icbmCookie; + TQByteArray m_textArray; + TQDateTime m_timestamp; Oscar::WORD m_exchange; - QString m_chatRoom; + TQString m_chatRoom; Encoding m_encoding; }; diff --git a/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp b/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp index cd9e9619..be862872 100644 --- a/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp +++ b/kopete/protocols/oscar/liboscar/oscartypeclasses.cpp @@ -17,8 +17,8 @@ */ #include "oscartypeclasses.h" -#include -#include +#include +#include #include #include "oscarutils.h" #include "buffer.h" @@ -40,7 +40,7 @@ Oscar::TLV::TLV( Q_UINT16 newType, Q_UINT16 newLength, char* newData ) data.duplicate( newData, length ); } -Oscar::TLV::TLV( Q_UINT16 newType, Q_UINT16 newLength, const QByteArray& newData ) +Oscar::TLV::TLV( Q_UINT16 newType, Q_UINT16 newLength, const TQByteArray& newData ) { type = newType; length = newLength; @@ -70,7 +70,7 @@ Oscar::SSI::SSI() m_waitingAuth = false; } -Oscar::SSI::SSI( const QString &name, int gid, int bid, int type, const QValueList &tlvlist, int tlvLength ) +Oscar::SSI::SSI( const TQString &name, int gid, int bid, int type, const TQValueList &tlvlist, int tlvLength ) { m_name = name; m_gid = gid; @@ -79,7 +79,7 @@ Oscar::SSI::SSI( const QString &name, int gid, int bid, int type, const QValueLi m_tlvLength = tlvLength; //deepcopy the tlvs - m_tlvList = QDeepCopy< QValueList >( tlvlist ); + m_tlvList = TQDeepCopy< TQValueList >( tlvlist ); if ( m_tlvLength == 0 && !m_tlvList.isEmpty() ) refreshTLVLength(); @@ -98,7 +98,7 @@ Oscar::SSI::SSI( const Oscar::SSI& other ) m_waitingAuth = other.m_waitingAuth; //deepcopy the tlvs - m_tlvList = QDeepCopy< QValueList >( other.m_tlvList ); + m_tlvList = TQDeepCopy< TQValueList >( other.m_tlvList ); if ( m_tlvLength == 0 && !m_tlvList.isEmpty() ) refreshTLVLength(); @@ -109,7 +109,7 @@ bool Oscar::SSI::isValid() const return m_type != 0xFFFF; } -QString Oscar::SSI::name() const +TQString Oscar::SSI::name() const { return m_name; } @@ -129,7 +129,7 @@ Q_UINT16 Oscar::SSI::type() const return m_type; } -const QValueList& Oscar::SSI::tlvList() const +const TQValueList& Oscar::SSI::tlvList() const { return m_tlvList; } @@ -144,10 +144,10 @@ Q_UINT16 Oscar::SSI::tlvListLength() const return m_tlvLength; } -void Oscar::SSI::setTLVList( QValueList list ) +void Oscar::SSI::setTLVList( TQValueList list ) { //deepcopy the tlvs - m_tlvList = QDeepCopy< QValueList >( list ); + m_tlvList = TQDeepCopy< TQValueList >( list ); refreshTLVLength(); checkTLVs(); } @@ -155,7 +155,7 @@ void Oscar::SSI::setTLVList( QValueList list ) void Oscar::SSI::refreshTLVLength() { m_tlvLength = 0; - QValueList::iterator it = m_tlvList.begin(); + TQValueList::iterator it = m_tlvList.begin(); for( ; it != m_tlvList.end(); ++it ) { m_tlvLength += 4; @@ -179,7 +179,7 @@ void Oscar::SSI::checkTLVs() TLV aliasTLV = findTLV( m_tlvList, 0x0131 ); if ( aliasTLV ) { - m_alias = QString::fromUtf8( aliasTLV.data, aliasTLV.length ); + m_alias = TQString::fromUtf8( aliasTLV.data, aliasTLV.length ); kdDebug( 14151 ) << k_funcinfo << "Got an alias '" << m_alias << "' for contact '" << m_name << "'" << endl; } @@ -192,12 +192,12 @@ void Oscar::SSI::checkTLVs() kdDebug(14151) << k_funcinfo << "Found 'allow others to see...' options " << infoTLV.data << endl; } -QString Oscar::SSI::alias() const +TQString Oscar::SSI::alias() const { return m_alias; } -void Oscar::SSI::setAlias( const QString& newAlias ) +void Oscar::SSI::setAlias( const TQString& newAlias ) { m_alias = newAlias; } @@ -212,28 +212,28 @@ void Oscar::SSI::setWaitingAuth( bool waiting ) m_waitingAuth = waiting; } -void Oscar::SSI::setIconHash( QByteArray hash ) +void Oscar::SSI::setIconHash( TQByteArray hash ) { m_hash.duplicate( hash ); } -QByteArray Oscar::SSI::iconHash( ) const +TQByteArray Oscar::SSI::iconHash( ) const { return m_hash; } -QString Oscar::SSI::toString() const +TQString Oscar::SSI::toString() const { - QString ssiString = QString::fromLatin1( "name: " ); + TQString ssiString = TQString::fromLatin1( "name: " ); ssiString += m_name; ssiString += " gid: "; - ssiString += QString::number( m_gid ); + ssiString += TQString::number( m_gid ); ssiString += " bid: "; - ssiString += QString::number( m_bid ); + ssiString += TQString::number( m_bid ); ssiString += " type: "; - ssiString += QString::number( m_type ); + ssiString += TQString::number( m_type ); ssiString += " tlv length: "; - ssiString += QString::number( m_tlvLength ); + ssiString += TQString::number( m_tlvLength ); return ssiString; } @@ -250,26 +250,26 @@ Oscar::SSI::operator bool() const return isValid(); } -Oscar::SSI::operator QByteArray() const +Oscar::SSI::operator TQByteArray() const { Buffer b; - QCString name( m_name.utf8() ); + TQCString name( m_name.utf8() ); uint namelen = name.length(); const char *namedata = name; b.addWord( namelen ); // Using namedata instead of name because - // Buffer::addString(QByteArray, DWORD) ignores it's second argument, + // Buffer::addString(TQByteArray, DWORD) ignores it's second argument, // while Buffer::addString(const char*, DWORD) does not ignore it. // We must provide the explicit length argument to addString() because // we don't need trailing null byte to be added when automatic - // conversion from QCString to QByteArray is performed. + // conversion from TQCString to TQByteArray is performed. // This hack will not be needed with Qt 4. b.addString( namedata, namelen ); b.addWord( m_gid ); b.addWord( m_bid ); b.addWord( m_type ); b.addWord( m_tlvLength ); - QValueList::const_iterator it = m_tlvList.begin(); + TQValueList::const_iterator it = m_tlvList.begin(); for( ; it != m_tlvList.end(); ++it ) { b.addWord( (*it).type ); @@ -277,7 +277,7 @@ Oscar::SSI::operator QByteArray() const b.addString( (*it).data, (*it).data.size() ); } - return (QByteArray) b; + return (TQByteArray) b; } diff --git a/kopete/protocols/oscar/liboscar/oscartypeclasses.h b/kopete/protocols/oscar/liboscar/oscartypeclasses.h index 94e0c910..e4ec6ded 100644 --- a/kopete/protocols/oscar/liboscar/oscartypeclasses.h +++ b/kopete/protocols/oscar/liboscar/oscartypeclasses.h @@ -20,10 +20,10 @@ #ifndef _OSCARTYPECLASSES_H_ #define _OSCARTYPECLASSES_H_ -#include -#include -#include -#include +#include +#include +#include +#include #include "kopete_export.h" namespace Oscar @@ -34,14 +34,14 @@ public: TLV(); TLV( Q_UINT16, Q_UINT16, char* data ); - TLV( Q_UINT16, Q_UINT16, const QByteArray& ); + TLV( Q_UINT16, Q_UINT16, const TQByteArray& ); TLV( const TLV& t ); operator bool() const; Q_UINT16 type; Q_UINT16 length; - QByteArray data; + TQByteArray data; }; @@ -49,7 +49,7 @@ class KOPETE_EXPORT SSI { public: SSI(); - SSI( const QString &name, int gid, int bid, int type, const QValueList& tlvlist, int tlvLength = 0 ); + SSI( const TQString &name, int gid, int bid, int type, const TQValueList& tlvlist, int tlvLength = 0 ); SSI( const SSI& other ); /** Get the validity of this item */ @@ -57,7 +57,7 @@ public: /** \brief The name of this SSI item. * This is usually the screenname, ICQ number, or group name. */ - QString name() const; + TQString name() const; /** \brief The group id of the SSI item */ Q_UINT16 gid() const; @@ -73,10 +73,10 @@ public: Q_UINT16 type() const; /** \brief the TLV list for the item */ - const QValueList& tlvList() const; + const TQValueList& tlvList() const; /** \brief Set the TLV list for the item */ - void setTLVList( QValueList ); + void setTLVList( TQValueList ); /** * \brief Set the length of the TLV list @@ -93,14 +93,14 @@ public: * Get the alias for the SSI item * This is TLV 0x0131 in an SSI item */ - QString alias() const; + TQString alias() const; /** * Set the alias for the SSI item * This should be done after a successful modification of the item * on the server */ - void setAlias( const QString& newAlias ); + void setAlias( const TQString& newAlias ); /** \brief Indicates we're awaiting authorization from this item */ bool waitingAuth() const; @@ -108,17 +108,17 @@ public: /** Set whether we are waiting authorization or not from this item */ void setWaitingAuth( bool waiting ); - void setIconHash( QByteArray hash ); + void setIconHash( TQByteArray hash ); - QByteArray iconHash() const; + TQByteArray iconHash() const; /** \brief String representation of our SSI object */ - QString toString() const; + TQString toString() const; bool operator==( const SSI& item ) const; operator bool() const; - operator QByteArray() const; + operator TQByteArray() const; void refreshTLVLength(); @@ -126,15 +126,15 @@ public: void checkTLVs(); private: - QString m_name; + TQString m_name; int m_gid; int m_bid; int m_type; - QValueList m_tlvList; + TQValueList m_tlvList; int m_tlvLength; bool m_waitingAuth; - QString m_alias; - QByteArray m_hash; + TQString m_alias; + TQByteArray m_hash; }; } diff --git a/kopete/protocols/oscar/liboscar/oscartypes.h b/kopete/protocols/oscar/liboscar/oscartypes.h index b7d4f55b..3819b555 100644 --- a/kopete/protocols/oscar/liboscar/oscartypes.h +++ b/kopete/protocols/oscar/liboscar/oscartypes.h @@ -20,9 +20,9 @@ #define _OSCARTYPES_H_ #include "oscartypeclasses.h" -#include -#include -#include +#include +#include +#include //! Debug Areas const int OSCAR_RAW_DEBUG = 14151; @@ -214,35 +214,35 @@ struct ChatExchangeInfo WORD maxRoomNameLength; WORD maxMsgLength; BYTE flags; - QString description; + TQString description; BYTE canCreate; - QString charset1; - QString charset2; - QString lang1; - QString lang2; + TQString charset1; + TQString charset2; + TQString lang1; + TQString lang2; }; struct ChatRoomInfo { WORD exchange; - QByteArray cookie; + TQByteArray cookie; WORD instance; - QString description; + TQString description; WORD maxMsgLength; - QString name; + TQString name; }; struct ClientVersion { - QString clientString; + TQString clientString; WORD clientId; WORD major; WORD minor; WORD point; WORD build; DWORD other; - QString country; - QString lang; + TQString country; + TQString lang; }; /* ICQ Version Characteristics */ diff --git a/kopete/protocols/oscar/liboscar/oscarutils.cpp b/kopete/protocols/oscar/liboscar/oscarutils.cpp index 13e28d9e..e07e0e12 100644 --- a/kopete/protocols/oscar/liboscar/oscarutils.cpp +++ b/kopete/protocols/oscar/liboscar/oscarutils.cpp @@ -17,16 +17,16 @@ */ #include "oscarutils.h" -#include +#include #include #include using namespace Oscar; -QString Oscar::normalize( const QString& contact ) +TQString Oscar::normalize( const TQString& contact ) { - QString normal = contact.lower(); + TQString normal = contact.lower(); normal.remove( ' ' ); return normal; } @@ -39,10 +39,10 @@ bool Oscar::operator==( TLV a, TLV b ) return false; } -TLV Oscar::findTLV( const QValueList& list, int type ) +TLV Oscar::findTLV( const TQValueList& list, int type ) { TLV t; - QValueList::const_iterator it; + TQValueList::const_iterator it; for ( it = list.begin(); it != list.end(); ++it ) { if ( ( *it ).type == type ) @@ -52,12 +52,12 @@ TLV Oscar::findTLV( const QValueList& list, int type ) return t; } -bool Oscar::uptateTLVs( SSI& item, const QValueList& list ) +bool Oscar::uptateTLVs( SSI& item, const TQValueList& list ) { bool changed = false; - QValueList tList( item.tlvList() ); + TQValueList tList( item.tlvList() ); - QValueList::const_iterator it; + TQValueList::const_iterator it; for ( it = list.begin(); it != list.end(); ++it ) { TLV t = Oscar::findTLV( tList, ( *it ).type ); @@ -92,9 +92,9 @@ int Oscar::parseCap( char* cap ) return capflag; } -const QString Oscar::capToString( char* cap ) +const TQString Oscar::capToString( char* cap ) { - QString dbg; + TQString dbg; dbg.sprintf( "{%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x}", cap[0], cap[1], cap[2], cap[3], cap[4], cap[5], cap[6], cap[7], cap[8], cap[9], @@ -103,17 +103,17 @@ const QString Oscar::capToString( char* cap ) return dbg; } -DWORD Oscar::parseCapabilities( Buffer &inbuf, QString &versionString ) +DWORD Oscar::parseCapabilities( Buffer &inbuf, TQString &versionString ) { // // FIXME: port capabilities array to some qt based list class, makes usage of memcmp obsolete // DWORD capflags = 0; - QString dbgCaps = "CAPS: "; + TQString dbgCaps = "CAPS: "; while(inbuf.length() >= 16) { - QByteArray cap; + TQByteArray cap; cap.duplicate( inbuf.getBlock(16) ); for (int i=0; i < CAP_LAST; i++) @@ -184,9 +184,9 @@ DWORD Oscar::parseCapabilities( Buffer &inbuf, QString &versionString ) return capflags; } -const QString Oscar::capName( int capNumber ) +const TQString Oscar::capName( int capNumber ) { - QString capString; + TQString capString; switch ( capNumber ) { @@ -279,18 +279,18 @@ const QString Oscar::capName( int capNumber ) return capString; } -DWORD Oscar::getNumericalIP(const QString &address) +DWORD Oscar::getNumericalIP(const TQString &address) { - QHostAddress addr; + TQHostAddress addr; if ( addr.setAddress( address ) == false ) return 0; return (DWORD)addr.toIPv4Address(); } -QString Oscar::getDottedDecimal( DWORD address ) +TQString Oscar::getDottedDecimal( DWORD address ) { - QHostAddress addr; + TQHostAddress addr; addr.setAddress((Q_UINT32)address); return addr.toString(); } diff --git a/kopete/protocols/oscar/liboscar/oscarutils.h b/kopete/protocols/oscar/liboscar/oscarutils.h index bf8b5aba..a9cd921c 100644 --- a/kopete/protocols/oscar/liboscar/oscarutils.h +++ b/kopete/protocols/oscar/liboscar/oscarutils.h @@ -19,9 +19,9 @@ #ifndef _OSCARUTILS_H_ #define _OSCARUTILS_H_ -#include -#include -#include +#include +#include +#include #include "oscartypes.h" #include "buffer.h" @@ -29,7 +29,7 @@ namespace Oscar { ///Normalize the contact name to all lowercase and no spaces -KOPETE_EXPORT QString normalize( const QString& ); +KOPETE_EXPORT TQString normalize( const TQString& ); ///compare TLVs for equality KOPETE_EXPORT bool operator==( TLV, TLV ); @@ -37,13 +37,13 @@ KOPETE_EXPORT bool operator==( TLV, TLV ); /** * Find the TLV corresponding to the type in the list */ -KOPETE_EXPORT TLV findTLV( const QValueList&, int type ); +KOPETE_EXPORT TLV findTLV( const TQValueList&, int type ); /** * Update TLVs of SSI item from TLV list if necessary * \return true if something was updated */ -KOPETE_EXPORT bool uptateTLVs( SSI& item, const QValueList& list ); +KOPETE_EXPORT bool uptateTLVs( SSI& item, const TQValueList& list ); /** * Get the value of the capability that corresponds to the value @@ -57,34 +57,34 @@ int parseCap( char* cap ); /** * Convert the capability to a string we can print */ -const QString capToString(char *cap); +const TQString capToString(char *cap); /** * Parse the character array for validness and a version string * \param buffer the buffer we'll be parsing for capabilities - * \param versionString a QString reference that will contain the - * version string of the detected client. Will be QString::null if + * \param versionString a TQString reference that will contain the + * version string of the detected client. Will be TQString::null if * no client is found * \return a DWORD containg a bit array of the capabilities we found */ -DWORD parseCapabilities(Buffer &inbuf, QString &versionString); +DWORD parseCapabilities(Buffer &inbuf, TQString &versionString); /** * Get the name of the capability from its number */ -const QString capName( int capNumber ); +const TQString capName( int capNumber ); /** * Convert an IP address in dotted decimal notation to a * numerical constant */ -DWORD getNumericalIP( const QString& address ); +DWORD getNumericalIP( const TQString& address ); /** * Convert a numerical constant that is an IP address to * dotted decimal format */ -QString getDottedDecimal( DWORD address ); +TQString getDottedDecimal( DWORD address ); } diff --git a/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp b/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp index a1baf073..2cf57d53 100644 --- a/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/ownuserinfotask.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ #include "ownuserinfotask.h" -#include +#include #include #include "buffer.h" #include "connection.h" @@ -70,7 +70,7 @@ bool OwnUserInfoTask::take( Transfer* transfer ) ud.fill( b ); m_details = ud; emit gotInfo(); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return true; } else @@ -83,7 +83,7 @@ bool OwnUserInfoTask::take( Transfer* transfer ) if ( flags == 0x41 ) //we need to do a buddy upload when bit 8 = 1 needUpload = true; - QByteArray qba; + TQByteArray qba; if ( b->length() != 0 ) { //buffer might be empty if flags bit 8 = 1 BYTE checksumLength = b->getByte(); @@ -104,11 +104,11 @@ bool OwnUserInfoTask::take( Transfer* transfer ) if ( infoType == 0x0002 ) { - QString availableMsg( b->getBSTR() ); + TQString availableMsg( b->getBSTR() ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "self available message: " << endl; } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return true; } diff --git a/kopete/protocols/oscar/liboscar/ownuserinfotask.h b/kopete/protocols/oscar/liboscar/ownuserinfotask.h index 30a169db..35314df0 100644 --- a/kopete/protocols/oscar/liboscar/ownuserinfotask.h +++ b/kopete/protocols/oscar/liboscar/ownuserinfotask.h @@ -44,9 +44,9 @@ signals: /** Emitted when user info is recieved. Needed because succeeded() is only emitted once. */ void gotInfo(); - void haveAvailableMessage( const QString& ); + void haveAvailableMessage( const TQString& ); - void haveIconChecksum( const QString& ); + void haveIconChecksum( const TQString& ); void buddyIconUploadRequested(); diff --git a/kopete/protocols/oscar/liboscar/prmparamstask.cpp b/kopete/protocols/oscar/liboscar/prmparamstask.cpp index 3668c73b..43580206 100644 --- a/kopete/protocols/oscar/liboscar/prmparamstask.cpp +++ b/kopete/protocols/oscar/liboscar/prmparamstask.cpp @@ -52,7 +52,7 @@ bool PRMParamsTask::take( Transfer* transfer ) if ( forMe( transfer ) ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Ignoring PRM Parameters. We don't use them" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return true; } diff --git a/kopete/protocols/oscar/liboscar/profiletask.cpp b/kopete/protocols/oscar/liboscar/profiletask.cpp index d64d5dbe..4b0949ea 100644 --- a/kopete/protocols/oscar/liboscar/profiletask.cpp +++ b/kopete/protocols/oscar/liboscar/profiletask.cpp @@ -18,7 +18,7 @@ #include "profiletask.h" -#include +#include #include #include "transfer.h" @@ -56,12 +56,12 @@ void ProfileTask::onGo() sendProfileUpdate(); } -void ProfileTask::setProfileText( const QString& text ) +void ProfileTask::setProfileText( const TQString& text ) { m_profileText = text; } -void ProfileTask::setAwayMessage( const QString& text ) +void ProfileTask::setAwayMessage( const TQString& text ) { m_awayMessage = text; } @@ -76,7 +76,7 @@ void ProfileTask::sendProfileUpdate() if ( !m_profileText.isNull() && !client()->isIcq() ) { - static const QString defencoding = "text/aolrtf; charset=\"us-ascii\""; + static const TQString defencoding = "text/aolrtf; charset=\"us-ascii\""; buffer->addTLV(0x0001, defencoding.length(), defencoding.latin1()); buffer->addTLV(0x0002, m_profileText.length(), m_profileText.local8Bit()); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting profile = " << m_profileText << endl; @@ -84,7 +84,7 @@ void ProfileTask::sendProfileUpdate() if ( !m_awayMessage.isNull() && !client()->isIcq() ) { - static const QString defencoding = "text/aolrtf; charset=\"us-ascii\""; + static const TQString defencoding = "text/aolrtf; charset=\"us-ascii\""; buffer->addTLV(0x0003, defencoding.length(), defencoding.latin1()); buffer->addTLV(0x0004, m_awayMessage.length(), m_awayMessage.local8Bit()); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting away message = " << m_awayMessage << endl; @@ -112,7 +112,7 @@ void ProfileTask::sendProfileUpdate() buffer->addTLV(0x0005, capBuf.length(), capBuf.buffer()); Transfer* st = createTransfer( f, s , buffer ); send( st ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/profiletask.h b/kopete/protocols/oscar/liboscar/profiletask.h index 23555105..a51075a5 100644 --- a/kopete/protocols/oscar/liboscar/profiletask.h +++ b/kopete/protocols/oscar/liboscar/profiletask.h @@ -39,16 +39,16 @@ public: bool take( Transfer* transfer ); void onGo(); - void setProfileText( const QString& text ); - void setAwayMessage( const QString& text ); + void setProfileText( const TQString& text ); + void setAwayMessage( const TQString& text ); private: void sendProfileUpdate(); private: - QString m_profileText; - QString m_awayMessage; + TQString m_profileText; + TQString m_awayMessage; }; #endif diff --git a/kopete/protocols/oscar/liboscar/rateclass.cpp b/kopete/protocols/oscar/liboscar/rateclass.cpp index 7fee4239..d035c810 100644 --- a/kopete/protocols/oscar/liboscar/rateclass.cpp +++ b/kopete/protocols/oscar/liboscar/rateclass.cpp @@ -16,14 +16,14 @@ */ #include "rateclass.h" -#include +#include #include #include "transfer.h" using namespace Oscar; -RateClass::RateClass( QObject* parent ) -: QObject( parent, 0 ) +RateClass::RateClass( TQObject* parent ) +: TQObject( parent, 0 ) { m_waitingToSend = false; m_packetTimer.start(); @@ -70,8 +70,8 @@ void RateClass::addMember( WORD family, WORD subtype ) bool RateClass::isMember(const SNAC &s) const { - QValueList::const_iterator it; - QValueList::const_iterator spEnd = m_members.constEnd(); + TQValueList::const_iterator it; + TQValueList::const_iterator spEnd = m_members.constEnd(); for ( it = m_members.constBegin(); it != spEnd; ++it ) { if ( ( *it ).family == s.family && ( *it ).subtype == s.subtype ) @@ -83,8 +83,8 @@ bool RateClass::isMember(const SNAC &s) const bool RateClass::isMember( WORD family, WORD subtype ) const { - QValueList::const_iterator it; - QValueList::const_iterator spEnd = m_members.constEnd(); + TQValueList::const_iterator it; + TQValueList::const_iterator spEnd = m_members.constEnd(); for ( it = m_members.constBegin(); it != spEnd; ++it ) { if ( ( *it ).family == family && ( *it ).subtype == subtype ) @@ -194,7 +194,7 @@ void RateClass::setupTimer() } else { - QTimer::singleShot( ttns, this, SLOT( slotSend() ) ); //or send later + TQTimer::singleShot( ttns, this, TQT_SLOT( slotSend() ) ); //or send later } } } @@ -232,7 +232,7 @@ void RateClass::updateRateInfo() void RateClass::dumpQueue() { - QValueList::iterator it = m_packetQueue.begin(); + TQValueList::iterator it = m_packetQueue.begin(); while ( it != m_packetQueue.end() && m_packetQueue.count() > 0 ) { Transfer* t = ( *it ); diff --git a/kopete/protocols/oscar/liboscar/rateclass.h b/kopete/protocols/oscar/liboscar/rateclass.h index 1bb86f03..78ad8917 100644 --- a/kopete/protocols/oscar/liboscar/rateclass.h +++ b/kopete/protocols/oscar/liboscar/rateclass.h @@ -19,10 +19,10 @@ #define RATECLASS_H #include "oscartypes.h" -#include -#include -#include -#include +#include +#include +#include +#include const int RATE_SAFETY_TIME = 50; @@ -38,7 +38,7 @@ class RateClass : public QObject { Q_OBJECT public: - RateClass( QObject* parent = 0 ); + RateClass( TQObject* parent = 0 ); ~RateClass(); /** Accessor for classid */ @@ -119,11 +119,11 @@ private slots: private: Oscar::RateInfo m_rateInfo; - QValueList m_members; - QValueList m_packetQueue; - QTime m_packetTimer; + TQValueList m_members; + TQValueList m_packetQueue; + TQTime m_packetTimer; - // we are waiting for the QTimer::singleShot() to send + // we are waiting for the TQTimer::singleShot() to send bool m_waitingToSend; }; diff --git a/kopete/protocols/oscar/liboscar/rateclassmanager.cpp b/kopete/protocols/oscar/liboscar/rateclassmanager.cpp index 8b306c0b..59ef735e 100644 --- a/kopete/protocols/oscar/liboscar/rateclassmanager.cpp +++ b/kopete/protocols/oscar/liboscar/rateclassmanager.cpp @@ -16,7 +16,7 @@ ************************************************************************* */ -#include +#include #include @@ -30,12 +30,12 @@ class RateClassManagerPrivate { public: //! The list of rate classes owned by this manager - QValueList classList; + TQValueList classList; Connection* client; }; RateClassManager::RateClassManager( Connection* parent, const char* name ) -: QObject( parent, name ) +: TQObject( parent, name ) { d = new RateClassManagerPrivate(); d->client = parent; @@ -49,7 +49,7 @@ RateClassManager::~RateClassManager() void RateClassManager::reset() { - QValueList::iterator it = d->classList.begin(); + TQValueList::iterator it = d->classList.begin(); while ( it != d->classList.end() && d->classList.count() > 0) { RateClass* rc = ( *it ); @@ -60,7 +60,7 @@ void RateClassManager::reset() void RateClassManager::registerClass( RateClass* rc ) { - QObject::connect( rc, SIGNAL( dataReady( Transfer* ) ), this, SLOT( transferReady( Transfer* ) ) ); + TQObject::connect( rc, TQT_SIGNAL( dataReady( Transfer* ) ), this, TQT_SLOT( transferReady( Transfer* ) ) ); d->classList.append( rc ); } @@ -110,7 +110,7 @@ void RateClassManager::queue( Transfer* t ) transferReady( t ); } -QValueList RateClassManager::classList() const +TQValueList RateClassManager::classList() const { return d->classList; } @@ -133,8 +133,8 @@ RateClass* RateClassManager::findRateClass( SnacTransfer* st ) const SNAC s = st->snac(); //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Looking for SNAC " << s.family << ", " << s.subtype << endl; RateClass* rc = 0L; - QValueList::const_iterator it; - QValueList::const_iterator rcEnd = d->classList.constEnd(); + TQValueList::const_iterator it; + TQValueList::const_iterator rcEnd = d->classList.constEnd(); for ( it = d->classList.constBegin(); it != rcEnd; ++it ) { @@ -151,16 +151,16 @@ RateClass* RateClassManager::findRateClass( SnacTransfer* st ) const void RateClassManager::recalcRateLevels() { - QValueList::iterator it; - QValueList::iterator rcEnd = d->classList.end(); + TQValueList::iterator it; + TQValueList::iterator rcEnd = d->classList.end(); for ( it = d->classList.begin(); it != rcEnd; ++it ) ( *it )->updateRateInfo(); } int RateClassManager::timeToInitialLevel( SNAC s ) { - QValueList::const_iterator it; - QValueList::const_iterator rcEnd = d->classList.constEnd(); + TQValueList::const_iterator it; + TQValueList::const_iterator rcEnd = d->classList.constEnd(); for ( it = d->classList.constBegin(); it != rcEnd; ++it ) { diff --git a/kopete/protocols/oscar/liboscar/rateclassmanager.h b/kopete/protocols/oscar/liboscar/rateclassmanager.h index 4b972ede..b1240f07 100644 --- a/kopete/protocols/oscar/liboscar/rateclassmanager.h +++ b/kopete/protocols/oscar/liboscar/rateclassmanager.h @@ -19,9 +19,9 @@ #ifndef RATECLASSMANAGER_H #define RATECLASSMANAGER_H -#include -#include -#include +#include +#include +#include #include "oscartypes.h" class Transfer; @@ -51,7 +51,7 @@ public: void queue( Transfer* t ); /** Get the list of rate classes */ - QValueList classList() const; + TQValueList classList() const; /** Recalculate the rate levels for all the classes */ void recalcRateLevels(); diff --git a/kopete/protocols/oscar/liboscar/rateinfotask.cpp b/kopete/protocols/oscar/liboscar/rateinfotask.cpp index f19cf792..08002b8a 100644 --- a/kopete/protocols/oscar/liboscar/rateinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/rateinfotask.cpp @@ -18,7 +18,7 @@ #include "rateinfotask.h" -#include +#include #include #include "rateclass.h" #include "rateclassmanager.h" @@ -32,7 +32,7 @@ using namespace Oscar; RateInfoTask::RateInfoTask( Task* parent ) : Task( parent ) { - connect( this, SIGNAL( gotRateLimits() ), this, SLOT( sendRateInfoAck() ) ); + connect( this, TQT_SIGNAL( gotRateLimits() ), this, TQT_SLOT( sendRateInfoAck() ) ); } @@ -80,7 +80,7 @@ void RateInfoTask::sendRateInfoRequest() void RateInfoTask::handleRateInfoResponse() { - QValueList rates; + TQValueList rates; Oscar::RateInfo ri; kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "handling rate info response (SNAC 0x01, 0x07)" << endl; @@ -119,7 +119,7 @@ void RateInfoTask::handleRateInfoResponse() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding snac members to group " << groupNum << endl; RateClass* rc = 0L; - QValueList::iterator it = rates.begin(); + TQValueList::iterator it = rates.begin(); for ( ; it != rates.end(); ++it ) { if ( ( *it )->id() == groupNum ) @@ -139,8 +139,8 @@ void RateInfoTask::handleRateInfoResponse() } } - QValueList::iterator it = rates.begin(); - QValueList::iterator rcEnd = rates.end(); + TQValueList::iterator it = rates.begin(); + TQValueList::iterator rcEnd = rates.end(); for ( ; it != rcEnd; ++it ) client()->rateManager()->registerClass( ( *it ) ); @@ -154,8 +154,8 @@ void RateInfoTask::sendRateInfoAck() SNAC s = { 0x0001, 0x0008, 0x0000, client()->snacSequence() }; Buffer* buffer = new Buffer(); - QValueListConstIterator cit = m_rateGroups.begin(); - QValueListConstIterator end = m_rateGroups.end(); + TQValueListConstIterator cit = m_rateGroups.begin(); + TQValueListConstIterator end = m_rateGroups.end(); for ( cit = m_rateGroups.begin(); cit != end; ++cit ) { //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding rate " << (*cit) << " to rate ack" << endl; @@ -164,7 +164,7 @@ void RateInfoTask::sendRateInfoAck() Transfer* st = createTransfer( f, s, buffer ); send( st ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } #include "rateinfotask.moc" diff --git a/kopete/protocols/oscar/liboscar/rateinfotask.h b/kopete/protocols/oscar/liboscar/rateinfotask.h index 3964f0ea..013559f6 100644 --- a/kopete/protocols/oscar/liboscar/rateinfotask.h +++ b/kopete/protocols/oscar/liboscar/rateinfotask.h @@ -20,7 +20,7 @@ #define RATEINFOTASK_H #include "task.h" -#include +#include using namespace Oscar; @@ -56,7 +56,7 @@ private slots: private: bool m_needRateAck; - QValueList m_rateGroups; + TQValueList m_rateGroups; }; //kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/rtf.cc b/kopete/protocols/oscar/liboscar/rtf.cc index bb4d88ee..39c16bc4 100644 --- a/kopete/protocols/oscar/liboscar/rtf.cc +++ b/kopete/protocols/oscar/liboscar/rtf.cc @@ -1627,25 +1627,25 @@ void ParStyle::clearFormatting() // dir is not a formatting item. } -QString RTF2HTML::quoteString(const QString &_str, quoteMode mode) +TQString RTF2HTML::quoteString(const TQString &_str, quoteMode mode) { - QString str = _str; - str.replace(QRegExp("&"), "&"); - str.replace(QRegExp("<"), "<"); - str.replace(QRegExp(">"), ">"); - str.replace(QRegExp("\""), """); - str.replace(QRegExp("\r"), ""); + TQString str = _str; + str.replace(TQRegExp("&"), "&"); + str.replace(TQRegExp("<"), "<"); + str.replace(TQRegExp(">"), ">"); + str.replace(TQRegExp("\""), """); + str.replace(TQRegExp("\r"), ""); switch (mode){ case quoteHTML: - str.replace(QRegExp("\n"), "
    \n"); + str.replace(TQRegExp("\n"), "
    \n"); break; case quoteXML: - str.replace(QRegExp("\n"), "
    \n"); + str.replace(TQRegExp("\n"), "
    \n"); break; default: break; } - QRegExp re(" +"); + TQRegExp re(" +"); int len; int pos = 0; @@ -1654,7 +1654,7 @@ QString RTF2HTML::quoteString(const QString &_str, quoteMode mode) if (len == 1) continue; - QString s = " "; + TQString s = " "; for (int i = 1; i < len; i++) s += " "; str.replace(pos, len, s); @@ -1690,7 +1690,7 @@ void RTF2HTML::FlushOutTags() // RTF colors are 1-based; colors[] is a 0-based array. if (t.param > colors.size() || t.param == 0) break; - QColor &c = colors[t.param-1]; + TQColor &c = colors[t.param-1]; PrintUnquoted("", c.red(), c.green(), c.blue()); } break; @@ -1707,7 +1707,7 @@ void RTF2HTML::FlushOutTags() case TAG_BG_COLOR:{ if (t.param > colors.size()) break; - QColor &c = colors[t.param]; + TQColor &c = colors[t.param]; PrintUnquoted("", c.red(), c.green(), c.blue()); break; } @@ -1878,7 +1878,7 @@ void RTF2HTML::PrintUnquoted(const char *str, ...) sParagraph += buff; } -void RTF2HTML::PrintQuoted(const QString &str) +void RTF2HTML::PrintQuoted(const TQString &str) { sParagraph += quoteString(str); } @@ -2110,7 +2110,7 @@ void Level::reset() resetTag(TAG_ALL); if (m_bColors){ if (m_bColorInit){ - QColor c(m_nRed, m_nGreen, m_nBlue); + TQColor c(m_nRed, m_nGreen, m_nBlue); p->colors.push_back(c); resetColors(); } @@ -2181,7 +2181,7 @@ void Level::flush() if (encoding == NULL) encoding = p->encoding; - QTextCodec *codec = ICQClient::_getCodec(encoding); + TQTextCodec *codec = ICQClient::_getCodec(encoding); */ //p->PrintQuoted(codec->toUnicode(text.c_str(), text.length())); p->PrintQuoted(text.c_str()); @@ -2245,7 +2245,7 @@ static char h2d(char c) return 0; } -QString RTF2HTML::Parse(const char *rtf, const char *_encoding) +TQString RTF2HTML::Parse(const char *rtf, const char *_encoding) { encoding = _encoding; YY_BUFFER_STATE yy_current_buffer = yy_scan_string(rtf); @@ -2313,7 +2313,7 @@ QString RTF2HTML::Parse(const char *rtf, const char *_encoding) break; case UNICODE_CHAR:{ cur_level.flush(); - sParagraph += QChar((unsigned short)(atol(yytext + 2))); + sParagraph += TQChar((unsigned short)(atol(yytext + 2))); break; } case HEX:{ @@ -2412,7 +2412,7 @@ QString RTF2HTML::Parse(const char *rtf, const char *_encoding) } /* -bool ICQClient::parseRTF(const char *rtf, const char *encoding, QString &res) +bool ICQClient::parseRTF(const char *rtf, const char *encoding, TQString &res) { char _RTF[] = "{\\rtf"; if ((strlen(rtf) > strlen(_RTF)) && !memcmp(rtf, _RTF, strlen(_RTF))){ @@ -2420,7 +2420,7 @@ bool ICQClient::parseRTF(const char *rtf, const char *encoding, QString &res) res = p.Parse(rtf, encoding); return true; } - QTextCodec *codec = ICQClient::_getCodec(encoding); + TQTextCodec *codec = ICQClient::_getCodec(encoding); res = codec->toUnicode(rtf, strlen(rtf)); return false; } diff --git a/kopete/protocols/oscar/liboscar/rtf2html.h b/kopete/protocols/oscar/liboscar/rtf2html.h index a305b89d..5685e4a1 100644 --- a/kopete/protocols/oscar/liboscar/rtf2html.h +++ b/kopete/protocols/oscar/liboscar/rtf2html.h @@ -18,12 +18,12 @@ #ifndef RTF2HTML_H #define RTF2HTML_H -#include +#include #include -#include -#include -#include +#include +#include +#include #include #include @@ -149,15 +149,15 @@ class RTF2HTML public: RTF2HTML(); - QString Parse(const char *rtf, const char *encoding); + TQString Parse(const char *rtf, const char *encoding); // Paragraph-specific functions: - QString quoteString(const QString &_str, quoteMode mode = quoteHTML); + TQString quoteString(const TQString &_str, quoteMode mode = quoteHTML); // Appends a string with formatting into the paragraph buffer. void PrintUnquoted(const char *str, ...); // Quotes and appends a string to the paragraph buffer. - void PrintQuoted(const QString &str); + void PrintQuoted(const TQString &str); // Writes down the tags from oTags into the paragraph buffer. void FlushOutTags(); // Retrieves the top not-yet-written tag. @@ -179,7 +179,7 @@ protected: // True if the paragraph was opened explicitly. bool bExplicitParagraph; // The paragraph's HTML buffer. - QString sParagraph; + TQString sParagraph; // Defines the paragraph's formatting. ParStyle parStyle; // Tags which weren't yet printed out. @@ -188,11 +188,11 @@ protected: // Document members // The document HTML buffer. - QString s; + TQString s; // Fonts table. vector fonts; // Colors table. - vector colors; + vector colors; // Stack of tags (across all levels, not just current level) stack tags; diff --git a/kopete/protocols/oscar/liboscar/safedelete.cpp b/kopete/protocols/oscar/liboscar/safedelete.cpp index 703e8ed3..5dde3725 100644 --- a/kopete/protocols/oscar/liboscar/safedelete.cpp +++ b/kopete/protocols/oscar/liboscar/safedelete.cpp @@ -19,7 +19,7 @@ #include "safedelete.h" -#include +#include //---------------------------------------------------------------------------- // SafeDelete @@ -35,7 +35,7 @@ SafeDelete::~SafeDelete() lock->dying(); } -void SafeDelete::deleteLater(QObject *o) +void SafeDelete::deleteLater(TQObject *o) { if(!lock) deleteSingle(o); @@ -54,16 +54,16 @@ void SafeDelete::deleteAll() if(list.isEmpty()) return; - QObjectListIt it(list); - for(QObject *o; (o = it.current()); ++it) + TQObjectListIt it(list); + for(TQObject *o; (o = it.current()); ++it) deleteSingle(o); list.clear(); } -void SafeDelete::deleteSingle(QObject *o) +void SafeDelete::deleteSingle(TQObject *o) { #if QT_VERSION < 0x030000 - // roll our own QObject::deleteLater() + // roll our own TQObject::deleteLater() SafeDeleteLater *sdl = SafeDeleteLater::ensureExists(); sdl->deleteItLater(o); #else @@ -116,7 +116,7 @@ SafeDeleteLater::SafeDeleteLater() { list.setAutoDelete(true); self = this; - QTimer::singleShot(0, this, SLOT(explode())); + TQTimer::singleShot(0, this, TQT_SLOT(explode())); } SafeDeleteLater::~SafeDeleteLater() @@ -125,7 +125,7 @@ SafeDeleteLater::~SafeDeleteLater() self = 0; } -void SafeDeleteLater::deleteItLater(QObject *o) +void SafeDeleteLater::deleteItLater(TQObject *o) { list.append(o); } diff --git a/kopete/protocols/oscar/liboscar/safedelete.h b/kopete/protocols/oscar/liboscar/safedelete.h index e8215c06..0d4150d9 100644 --- a/kopete/protocols/oscar/liboscar/safedelete.h +++ b/kopete/protocols/oscar/liboscar/safedelete.h @@ -20,8 +20,8 @@ #ifndef SAFEDELETE_H #define SAFEDELETE_H -#include -#include +#include +#include class SafeDelete; class SafeDeleteLock @@ -43,13 +43,13 @@ public: SafeDelete(); ~SafeDelete(); - void deleteLater(QObject *o); + void deleteLater(TQObject *o); - // same as QObject::deleteLater() - static void deleteSingle(QObject *o); + // same as TQObject::deleteLater() + static void deleteSingle(TQObject *o); private: - QObjectList list; + TQObjectList list; void deleteAll(); friend class SafeDeleteLock; @@ -62,7 +62,7 @@ class SafeDeleteLater : public QObject Q_OBJECT public: static SafeDeleteLater *ensureExists(); - void deleteItLater(QObject *o); + void deleteItLater(TQObject *o); private slots: void explode(); @@ -71,7 +71,7 @@ private: SafeDeleteLater(); ~SafeDeleteLater(); - QObjectList list; + TQObjectList list; friend class SafeDelete; static SafeDeleteLater *self; }; diff --git a/kopete/protocols/oscar/liboscar/senddcinfotask.cpp b/kopete/protocols/oscar/liboscar/senddcinfotask.cpp index af80e191..2b5dbbae 100644 --- a/kopete/protocols/oscar/liboscar/senddcinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/senddcinfotask.cpp @@ -100,7 +100,7 @@ void SendDCInfoTask::onGo() Transfer* t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/sendidletimetask.cpp b/kopete/protocols/oscar/liboscar/sendidletimetask.cpp index f0601e22..ba753471 100644 --- a/kopete/protocols/oscar/liboscar/sendidletimetask.cpp +++ b/kopete/protocols/oscar/liboscar/sendidletimetask.cpp @@ -45,7 +45,7 @@ void SendIdleTimeTask::onGo() Transfer *t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } diff --git a/kopete/protocols/oscar/liboscar/sendmessagetask.cpp b/kopete/protocols/oscar/liboscar/sendmessagetask.cpp index 48509595..1b8cbfbc 100644 --- a/kopete/protocols/oscar/liboscar/sendmessagetask.cpp +++ b/kopete/protocols/oscar/liboscar/sendmessagetask.cpp @@ -344,13 +344,13 @@ void SendMessageTask::addRendezvousMessageData( Buffer* b ) /* Old oscarsocket code, which is here for reference in case this doesn't work -QTextCodec *codec = 0L; +TQTextCodec *codec = 0L; WORD charset = 0x0000; // default to ascii WORD charsubset = 0x0000; int length = message.length(); unsigned char *utfMessage = 0L; -codec=QTextCodec::codecForMib(3); // US-ASCII +codec=TQTextCodec::codecForMib(3); // US-ASCII if(codec) { @@ -360,7 +360,7 @@ if(codec) // We are forcing kopete to send messages using ISO-8859-1 // It's a hack and should be reimplemented in a better way charset=0x0003; - codec=QTextCodec::codecForMib(4); + codec=TQTextCodec::codecForMib(4); //kdDebug(14151) << k_funcinfo << "Now trying ISO-8859-1" << endl; } else @@ -388,7 +388,7 @@ if ( !codec && ( contact->hasCap(CAP_UTF8) || !contact->encoding() ) ) // no codec and no charset and per-contact encoding set if(!codec && charset != 0x0002 && contact->encoding() != 0) { - codec=QTextCodec::codecForMib(contact->encoding()); + codec=TQTextCodec::codecForMib(contact->encoding()); if(codec) charset=0x0003; //send as ISO-8859-1 } @@ -399,7 +399,7 @@ if(!codec && charset != 0x0002) // it's neither unicode nor did we find a codec "Couldn't find suitable encoding for outgoing message, " << "encoding using ISO-8859-1, prepare for receiver getting unreadable text :)" << endl; charset=0x0003; - codec=QTextCodec::codecForMib(4); // ISO-8859-1 + codec=TQTextCodec::codecForMib(4); // ISO-8859-1 } tlv2.addWord(0x0101); //add TLV(0x0101) also known as TLV(257) @@ -416,7 +416,7 @@ if(utfMessage) else { kdDebug(14151) << k_funcinfo << "Outgoing message encoded as '" << codec->name() << "'" << endl; - QCString outgoingMessage=codec->fromUnicode(message); + TQCString outgoingMessage=codec->fromUnicode(message); tlv2.addString(outgoingMessage, length); // the actual message } // ==================================================================================== diff --git a/kopete/protocols/oscar/liboscar/sendmessagetask.h b/kopete/protocols/oscar/liboscar/sendmessagetask.h index 0eaff13f..18e03c73 100644 --- a/kopete/protocols/oscar/liboscar/sendmessagetask.h +++ b/kopete/protocols/oscar/liboscar/sendmessagetask.h @@ -18,7 +18,7 @@ #define SENDMESSAGETASK_H #include "task.h" -#include +#include #include "oscarmessage.h" /** @author Kopete Developers diff --git a/kopete/protocols/oscar/liboscar/serverredirecttask.cpp b/kopete/protocols/oscar/liboscar/serverredirecttask.cpp index 32cb105f..5875e6a8 100644 --- a/kopete/protocols/oscar/liboscar/serverredirecttask.cpp +++ b/kopete/protocols/oscar/liboscar/serverredirecttask.cpp @@ -36,7 +36,7 @@ void ServerRedirectTask::setService( WORD family ) m_service = family; } -void ServerRedirectTask::setChatParams( WORD exchange, QByteArray cookie, WORD instance ) +void ServerRedirectTask::setChatParams( WORD exchange, TQByteArray cookie, WORD instance ) { m_chatExchange = exchange; m_chatCookie.duplicate( cookie ); @@ -44,7 +44,7 @@ void ServerRedirectTask::setChatParams( WORD exchange, QByteArray cookie, WORD i m_chatInstance = instance; } -void ServerRedirectTask::setChatRoom( const QString& roomName ) +void ServerRedirectTask::setChatRoom( const TQString& roomName ) { m_chatRoom = roomName; } @@ -75,7 +75,7 @@ bool ServerRedirectTask::take( Transfer* transfer ) setTransfer( transfer ); bool value = handleRedirect(); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return value; } @@ -126,7 +126,7 @@ bool ServerRedirectTask::handleRedirect() return false; TLV server = b->getTLV(); - m_newHost = QString( server.data ); + m_newHost = TQString( server.data ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Host for service " << m_service << " is " << m_newHost << endl; if ( m_newHost.isEmpty() ) @@ -143,12 +143,12 @@ bool ServerRedirectTask::handleRedirect() return true; } -QByteArray ServerRedirectTask::cookie() const +TQByteArray ServerRedirectTask::cookie() const { return m_cookie; } -QString ServerRedirectTask::newHost() const +TQString ServerRedirectTask::newHost() const { return m_newHost; } @@ -163,7 +163,7 @@ WORD ServerRedirectTask::chatExchange() const return m_chatExchange; } -QString ServerRedirectTask::chatRoomName() const +TQString ServerRedirectTask::chatRoomName() const { return m_chatRoom; } diff --git a/kopete/protocols/oscar/liboscar/serverredirecttask.h b/kopete/protocols/oscar/liboscar/serverredirecttask.h index 785ac0df..972e28ce 100644 --- a/kopete/protocols/oscar/liboscar/serverredirecttask.h +++ b/kopete/protocols/oscar/liboscar/serverredirecttask.h @@ -23,7 +23,7 @@ #include "task.h" -#include +#include #include "oscartypes.h" @@ -36,11 +36,11 @@ public: ServerRedirectTask( Task* parent ); void setService( WORD family ); - void setChatParams( WORD exchange, QByteArray cookie, WORD instance ); - void setChatRoom( const QString& roomName ); + void setChatParams( WORD exchange, TQByteArray cookie, WORD instance ); + void setChatRoom( const TQString& roomName ); WORD chatExchange() const; - QString chatRoomName() const; + TQString chatRoomName() const; //Task implementation void onGo(); @@ -50,22 +50,22 @@ public: void requestNewService(); bool handleRedirect(); - QByteArray cookie() const; - QString newHost() const; + TQByteArray cookie() const; + TQString newHost() const; WORD service() const; signals: - void haveServer( const QString&, const QByteArray&, WORD ); + void haveServer( const TQString&, const TQByteArray&, WORD ); private: WORD m_service; - QString m_newHost; - QByteArray m_cookie; + TQString m_newHost; + TQByteArray m_cookie; WORD m_chatExchange; - QByteArray m_chatCookie; + TQByteArray m_chatCookie; WORD m_chatInstance; - QString m_chatRoom; + TQString m_chatRoom; }; diff --git a/kopete/protocols/oscar/liboscar/serverversionstask.cpp b/kopete/protocols/oscar/liboscar/serverversionstask.cpp index e4186f18..b2e7dfa6 100644 --- a/kopete/protocols/oscar/liboscar/serverversionstask.cpp +++ b/kopete/protocols/oscar/liboscar/serverversionstask.cpp @@ -101,7 +101,7 @@ void ServerVersionsTask::handleFamilies() Buffer* outbuf = transfer()->buffer(); if ( outbuf->length() % 2 != 0 ) { - setError( -1, QString::null ); + setError( -1, TQString::null ); return; } @@ -163,7 +163,7 @@ void ServerVersionsTask::handleServerVersions() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "server version=" << buffer->getWord() << ", server family=" << buffer->getWord() << endl; } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } #include "serverversionstask.moc" diff --git a/kopete/protocols/oscar/liboscar/serverversionstask.h b/kopete/protocols/oscar/liboscar/serverversionstask.h index a9c56f35..f3a72a38 100644 --- a/kopete/protocols/oscar/liboscar/serverversionstask.h +++ b/kopete/protocols/oscar/liboscar/serverversionstask.h @@ -20,7 +20,7 @@ #define SERVERVERSIONSTASK_H #include "task.h" -#include +#include #include "oscartypes.h" class Transfer; @@ -52,7 +52,7 @@ private: void requestFamilyVersions(); private: - QValueList m_familiesList; + TQValueList m_familiesList; WORD m_family; }; diff --git a/kopete/protocols/oscar/liboscar/servicesetuptask.cpp b/kopete/protocols/oscar/liboscar/servicesetuptask.cpp index 13e30101..61f53279 100644 --- a/kopete/protocols/oscar/liboscar/servicesetuptask.cpp +++ b/kopete/protocols/oscar/liboscar/servicesetuptask.cpp @@ -47,14 +47,14 @@ ServiceSetupTask::ServiceSetupTask( Task* parent ) m_ssiListTask = new SSIListTask( parent ); m_ssiActivateTask = new SSIActivateTask( parent ); - QObject::connect( m_ssiListTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_ssiParamTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_prmTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_icbmTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_blmLimitsTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_profileTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_locRightsTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); - QObject::connect( m_ssiActivateTask, SIGNAL( finished() ), this, SLOT( childTaskFinished() ) ); + TQObject::connect( m_ssiListTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_ssiParamTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_prmTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_icbmTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_blmLimitsTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_profileTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_locRightsTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); + TQObject::connect( m_ssiActivateTask, TQT_SIGNAL( finished() ), this, TQT_SLOT( childTaskFinished() ) ); } @@ -95,7 +95,7 @@ void ServiceSetupTask::childTaskFinished() kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Sending DC info and client ready" << endl; SendIdleTimeTask* sitt = new SendIdleTimeTask( client()->rootTask() ); - QValueList familyList; + TQValueList familyList; familyList.append( 0x0001 ); familyList.append( 0x0002 ); familyList.append( 0x0003 ); @@ -114,7 +114,7 @@ void ServiceSetupTask::childTaskFinished() if ( m_finishedTaskCount == 8 ) { kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Service setup finished" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } } diff --git a/kopete/protocols/oscar/liboscar/snacprotocol.cpp b/kopete/protocols/oscar/liboscar/snacprotocol.cpp index 3bf16bbc..3ec5c348 100644 --- a/kopete/protocols/oscar/liboscar/snacprotocol.cpp +++ b/kopete/protocols/oscar/liboscar/snacprotocol.cpp @@ -19,9 +19,9 @@ #include "snacprotocol.h" -#include -#include -#include +#include +#include +#include #include #include #include "transfer.h" @@ -29,7 +29,7 @@ using namespace Oscar; -SnacProtocol::SnacProtocol(QObject *parent, const char *name) +SnacProtocol::SnacProtocol(TQObject *parent, const char *name) : InputProtocolBase(parent, name) { } @@ -38,7 +38,7 @@ SnacProtocol::~SnacProtocol() { } -Transfer* SnacProtocol::parse( const QByteArray & packet, uint& bytes ) +Transfer* SnacProtocol::parse( const TQByteArray & packet, uint& bytes ) { BYTE b; WORD w; @@ -47,7 +47,7 @@ Transfer* SnacProtocol::parse( const QByteArray & packet, uint& bytes ) FLAP f; SNAC s; SnacTransfer *st; - QDataStream* m_din = new QDataStream( packet, IO_ReadOnly ); + TQDataStream* m_din = new TQDataStream( packet, IO_ReadOnly ); //flap parsing *m_din >> b; //this should be the start byte diff --git a/kopete/protocols/oscar/liboscar/snacprotocol.h b/kopete/protocols/oscar/liboscar/snacprotocol.h index eea5c032..18c6aaaa 100644 --- a/kopete/protocols/oscar/liboscar/snacprotocol.h +++ b/kopete/protocols/oscar/liboscar/snacprotocol.h @@ -29,7 +29,7 @@ class SnacProtocol : public InputProtocolBase { Q_OBJECT public: - SnacProtocol( QObject *parent = 0, const char *name = 0 ); + SnacProtocol( TQObject *parent = 0, const char *name = 0 ); ~SnacProtocol(); /** @@ -39,7 +39,7 @@ public: * @param bytes An integer used to return the number of bytes read. * @return A pointer to an EventTransfer object if successfull, otherwise 0. The caller is responsible for deleting this object. */ - Transfer * parse( const QByteArray &, uint & bytes ); + Transfer * parse( const TQByteArray &, uint & bytes ); }; diff --git a/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp b/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp index 1e7a17d6..795d9999 100644 --- a/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp +++ b/kopete/protocols/oscar/liboscar/ssiactivatetask.cpp @@ -44,7 +44,7 @@ void SSIActivateTask::onGo() Buffer* buffer = new Buffer(); Transfer* t = createTransfer( f, s, buffer ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } // kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/ssiauthtask.cpp b/kopete/protocols/oscar/liboscar/ssiauthtask.cpp index 59188d2b..bccb754e 100644 --- a/kopete/protocols/oscar/liboscar/ssiauthtask.cpp +++ b/kopete/protocols/oscar/liboscar/ssiauthtask.cpp @@ -86,7 +86,7 @@ bool SSIAuthTask::take( Transfer* t ) return false; } -void SSIAuthTask::grantFutureAuth( const QString& uin, const QString& reason ) +void SSIAuthTask::grantFutureAuth( const TQString& uin, const TQString& reason ) { FLAP f = { 0x02, 0, 0 }; SNAC s = { 0x0013, 0x0014, 0x0000, client()->snacSequence() }; @@ -100,7 +100,7 @@ void SSIAuthTask::grantFutureAuth( const QString& uin, const QString& reason ) send( t ); } -void SSIAuthTask::sendAuthRequest( const QString& uin, const QString& reason ) +void SSIAuthTask::sendAuthRequest( const TQString& uin, const TQString& reason ) { FLAP f = { 0x02, 0, 0 }; SNAC s = { 0x0013, 0x0018, 0x0000, client()->snacSequence() }; @@ -114,7 +114,7 @@ void SSIAuthTask::sendAuthRequest( const QString& uin, const QString& reason ) send( t ); } -void SSIAuthTask::sendAuthReply( const QString& uin, const QString& reason, bool auth ) +void SSIAuthTask::sendAuthReply( const TQString& uin, const TQString& reason, bool auth ) { FLAP f = { 0x02, 0, 0 }; SNAC s = { 0x0013, 0x001A, 0x0000, client()->snacSequence() }; @@ -132,38 +132,38 @@ void SSIAuthTask::handleFutureAuthGranted() { Buffer* buf = transfer()->buffer(); - QString uin = Oscar::normalize( buf->getBUIN() ); - QByteArray reason = buf->getBSTR(); + TQString uin = Oscar::normalize( buf->getBUIN() ); + TQByteArray reason = buf->getBSTR(); buf->getWord(); // 0x0000 - Unknown kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Future authorization granted from " << uin << endl; kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Reason: " << reason << endl; - emit futureAuthGranted( uin, QString::fromUtf8( reason.data(), reason.size() ) ); + emit futureAuthGranted( uin, TQString::fromUtf8( reason.data(), reason.size() ) ); } void SSIAuthTask::handleAuthRequested() { Buffer* buf = transfer()->buffer(); - QString uin = Oscar::normalize( buf->getBUIN() ); - QByteArray reason = buf->getBSTR(); + TQString uin = Oscar::normalize( buf->getBUIN() ); + TQByteArray reason = buf->getBSTR(); buf->getWord(); // 0x0000 - Unknown kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Authorization requested from " << uin << endl; kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Reason: " << reason << endl; - emit authRequested( uin, QString::fromUtf8( reason.data(), reason.size() ) ); + emit authRequested( uin, TQString::fromUtf8( reason.data(), reason.size() ) ); } void SSIAuthTask::handleAuthReplied() { Buffer* buf = transfer()->buffer(); - QString uin = Oscar::normalize( buf->getBUIN() ); + TQString uin = Oscar::normalize( buf->getBUIN() ); bool accepted = buf->getByte(); - QByteArray reason = buf->getBSTR(); + TQByteArray reason = buf->getBSTR(); if ( accepted ) kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Authorization request accepted by " << uin << endl; @@ -171,14 +171,14 @@ void SSIAuthTask::handleAuthReplied() kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Authorization request declined by " << uin << endl; kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Reason: " << reason << endl; - emit authReplied( uin, QString::fromUtf8( reason.data(), reason.size() ), accepted ); + emit authReplied( uin, TQString::fromUtf8( reason.data(), reason.size() ), accepted ); } void SSIAuthTask::handleAddedMessage() { Buffer* buf = transfer()->buffer(); - QString uin = Oscar::normalize( buf->getBUIN() ); + TQString uin = Oscar::normalize( buf->getBUIN() ); kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "User " << uin << " added you to the contact list" << endl; emit contactAddedYou( uin ); diff --git a/kopete/protocols/oscar/liboscar/ssiauthtask.h b/kopete/protocols/oscar/liboscar/ssiauthtask.h index d470cfe9..1760f344 100644 --- a/kopete/protocols/oscar/liboscar/ssiauthtask.h +++ b/kopete/protocols/oscar/liboscar/ssiauthtask.h @@ -37,14 +37,14 @@ public: virtual bool forMe( const Transfer* t ) const; virtual bool take( Transfer* t ); - void grantFutureAuth( const QString& uin, const QString& reason ); - void sendAuthRequest( const QString& uin, const QString& reason ); - void sendAuthReply( const QString& uin, const QString& reason, bool auth ); + void grantFutureAuth( const TQString& uin, const TQString& reason ); + void sendAuthRequest( const TQString& uin, const TQString& reason ); + void sendAuthReply( const TQString& uin, const TQString& reason, bool auth ); signals: - void futureAuthGranted( const QString& uin, const QString& reason ); - void authRequested( const QString& uin, const QString& reason ); - void authReplied( const QString& uin, const QString& reason, bool auth ); - void contactAddedYou( const QString& uin ); + void futureAuthGranted( const TQString& uin, const TQString& reason ); + void authRequested( const TQString& uin, const TQString& reason ); + void authReplied( const TQString& uin, const TQString& reason, bool auth ); + void contactAddedYou( const TQString& uin ); private: void handleFutureAuthGranted(); void handleAuthRequested(); diff --git a/kopete/protocols/oscar/liboscar/ssilisttask.cpp b/kopete/protocols/oscar/liboscar/ssilisttask.cpp index fe2a981d..d52f7f4e 100644 --- a/kopete/protocols/oscar/liboscar/ssilisttask.cpp +++ b/kopete/protocols/oscar/liboscar/ssilisttask.cpp @@ -26,9 +26,9 @@ SSIListTask::SSIListTask( Task* parent ) : Task( parent ) { m_ssiManager = client()->ssiManager(); - QObject::connect( this, SIGNAL( newContact( const Oscar::SSI& ) ), m_ssiManager, SLOT( newContact( const Oscar::SSI& ) ) ); - QObject::connect( this, SIGNAL( newGroup( const Oscar::SSI& ) ), m_ssiManager, SLOT( newGroup( const Oscar::SSI& ) ) ); - QObject::connect( this, SIGNAL( newItem( const Oscar::SSI& ) ), m_ssiManager, SLOT( newItem( const Oscar::SSI& ) ) ); + TQObject::connect( this, TQT_SIGNAL( newContact( const Oscar::SSI& ) ), m_ssiManager, TQT_SLOT( newContact( const Oscar::SSI& ) ) ); + TQObject::connect( this, TQT_SIGNAL( newGroup( const Oscar::SSI& ) ), m_ssiManager, TQT_SLOT( newGroup( const Oscar::SSI& ) ) ); + TQObject::connect( this, TQT_SIGNAL( newItem( const Oscar::SSI& ) ), m_ssiManager, TQT_SLOT( newItem( const Oscar::SSI& ) ) ); } @@ -87,7 +87,7 @@ void SSIListTask::onGo() void SSIListTask::handleSSIListReply() { - QValueList tlvList; + TQValueList tlvList; Buffer* buffer = transfer()->buffer(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "SSI Protocol version: " << buffer->getByte() << endl; @@ -98,7 +98,7 @@ void SSIListTask::handleSSIListReply() { tlvList.clear(); WORD strlength = buffer->getWord(); - QString itemName = QString::fromUtf8( buffer->getBlock( strlength ), strlength ); + TQString itemName = TQString::fromUtf8( buffer->getBlock( strlength ), strlength ); WORD groupId = buffer->getWord(); WORD itemId = buffer->getWord(); WORD itemType = buffer->getWord(); @@ -136,7 +136,7 @@ void SSIListTask::handleSSIListReply() { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "SSI List complete" << endl; client()->ssiManager()->setListComplete( true ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } else kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Awaiting another SSI packet" << endl; @@ -154,7 +154,7 @@ void SSIListTask::handleSSIUpToDate() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Number of items in SSI list: " << ssiItems << endl; client()->ssiManager()->setListComplete( true ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } void SSIListTask::checkSSITimestamp() diff --git a/kopete/protocols/oscar/liboscar/ssimanager.cpp b/kopete/protocols/oscar/liboscar/ssimanager.cpp index 066e93fa..1351c237 100644 --- a/kopete/protocols/oscar/liboscar/ssimanager.cpp +++ b/kopete/protocols/oscar/liboscar/ssimanager.cpp @@ -28,9 +28,9 @@ class SSIManagerPrivate { public: - QValueList SSIList; - QValueList groupIdList; - QValueList itemIdList; + TQValueList SSIList; + TQValueList groupIdList; + TQValueList itemIdList; bool complete; DWORD lastModTime; WORD maxContacts; @@ -42,8 +42,8 @@ public: WORD nextGroupId; }; -SSIManager::SSIManager( QObject *parent, const char *name ) - : QObject( parent, name ) +SSIManager::SSIManager( TQObject *parent, const char *name ) + : TQObject( parent, name ) { d = new SSIManagerPrivate; d->complete = false; @@ -70,7 +70,7 @@ void SSIManager::clear() if ( d->SSIList.count() > 0 ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Clearing the SSI list" << endl; - QValueList::iterator it = d->SSIList.begin(); + TQValueList::iterator it = d->SSIList.begin(); while ( it != d->SSIList.end() && d->SSIList.count() > 0 ) it = d->SSIList.remove( it ); @@ -141,7 +141,7 @@ void SSIManager::setParameters( WORD maxContacts, WORD maxGroups, WORD maxVisibl { //I'm not using k_funcinfo for these debug statements because of //the function's long signature - QString funcName = QString::fromLatin1( "[void SSIManager::setParameters] " ); + TQString funcName = TQString::fromLatin1( "[void SSIManager::setParameters] " ); kdDebug(OSCAR_RAW_DEBUG) << funcName << "Max number of contacts allowed in SSI: " << maxContacts << endl; kdDebug(OSCAR_RAW_DEBUG) << funcName << "Max number of groups allowed in SSI: " @@ -160,7 +160,7 @@ void SSIManager::setParameters( WORD maxContacts, WORD maxGroups, WORD maxVisibl d->maxIgnore = maxIgnore; } -void SSIManager::loadFromExisting( const QValueList& newList ) +void SSIManager::loadFromExisting( const TQValueList& newList ) { Q_UNUSED( newList ); //FIXME: NOT Implemented! @@ -168,7 +168,7 @@ void SSIManager::loadFromExisting( const QValueList& newList ) bool SSIManager::hasItem( const Oscar::SSI& item ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) { @@ -180,9 +180,9 @@ bool SSIManager::hasItem( const Oscar::SSI& item ) const return false; } -Oscar::SSI SSIManager::findGroup( const QString &group ) const +Oscar::SSI SSIManager::findGroup( const TQString &group ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_GROUP && (*it ).name().lower() == group.lower() ) @@ -194,7 +194,7 @@ Oscar::SSI SSIManager::findGroup( const QString &group ) const Oscar::SSI SSIManager::findGroup( int groupId ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_GROUP && (*it ).gid() == groupId ) @@ -203,7 +203,7 @@ Oscar::SSI SSIManager::findGroup( int groupId ) const return m_dummyItem; } -Oscar::SSI SSIManager::findContact( const QString &contact, const QString &group ) const +Oscar::SSI SSIManager::findContact( const TQString &contact, const TQString &group ) const { if ( contact.isNull() || group.isNull() ) @@ -222,7 +222,7 @@ Oscar::SSI SSIManager::findContact( const QString &contact, const QString &group ", gr->bid= " << gr.bid() << ", gr->type= " << gr.type() << endl; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) { @@ -243,10 +243,10 @@ Oscar::SSI SSIManager::findContact( const QString &contact, const QString &group return m_dummyItem; } -Oscar::SSI SSIManager::findContact( const QString &contact ) const +Oscar::SSI SSIManager::findContact( const TQString &contact ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT && (*it ).name() == contact ) @@ -257,7 +257,7 @@ Oscar::SSI SSIManager::findContact( const QString &contact ) const Oscar::SSI SSIManager::findContact( int contactId ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it!= listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT && ( *it ).bid() == contactId ) @@ -266,9 +266,9 @@ Oscar::SSI SSIManager::findContact( int contactId ) const return m_dummyItem; } -Oscar::SSI SSIManager::findItemForIcon( QByteArray iconHash ) const +Oscar::SSI SSIManager::findItemForIcon( TQByteArray iconHash ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it!= listEnd; ++it ) { @@ -278,7 +278,7 @@ Oscar::SSI SSIManager::findItemForIcon( QByteArray iconHash ) const Buffer b(t.data); b.skipBytes(1); //don't care about flags BYTE iconSize = b.getByte(); - QByteArray hash( b.getBlock( iconSize ) ); + TQByteArray hash( b.getBlock( iconSize ) ); if ( hash == iconHash ) { Oscar::SSI s = ( *it ); @@ -291,7 +291,7 @@ Oscar::SSI SSIManager::findItemForIcon( QByteArray iconHash ) const Oscar::SSI SSIManager::findItemForIconByRef( int ref ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it!= listEnd; ++it ) { @@ -307,9 +307,9 @@ Oscar::SSI SSIManager::findItemForIconByRef( int ref ) const return m_dummyItem; } -Oscar::SSI SSIManager::findItem( const QString &contact, int type ) const +Oscar::SSI SSIManager::findItem( const TQString &contact, int type ) const { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it!= listEnd; ++it ) if ( ( *it ).type() == type && ( *it ).name() == contact ) @@ -318,11 +318,11 @@ Oscar::SSI SSIManager::findItem( const QString &contact, int type ) const return m_dummyItem; } -QValueList SSIManager::groupList() const +TQValueList SSIManager::groupList() const { - QValueList list; + TQValueList list; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_GROUP ) list.append( ( *it ) ); @@ -330,11 +330,11 @@ QValueList SSIManager::groupList() const return list; } -QValueList SSIManager::contactList() const +TQValueList SSIManager::contactList() const { - QValueList list; + TQValueList list; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT ) list.append( ( *it ) ); @@ -342,11 +342,11 @@ QValueList SSIManager::contactList() const return list; } -QValueList SSIManager::visibleList() const +TQValueList SSIManager::visibleList() const { - QValueList list; + TQValueList list; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_VISIBLE ) list.append( ( *it ) ); @@ -354,11 +354,11 @@ QValueList SSIManager::visibleList() const return list; } -QValueList SSIManager::invisibleList() const +TQValueList SSIManager::invisibleList() const { - QValueList list; + TQValueList list; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_INVISIBLE ) list.append( ( *it ) ); @@ -366,14 +366,14 @@ QValueList SSIManager::invisibleList() const return list; } -QValueList SSIManager::contactsFromGroup( const QString &group ) const +TQValueList SSIManager::contactsFromGroup( const TQString &group ) const { - QValueList list; + TQValueList list; Oscar::SSI gr = findGroup( group ); if ( gr.isValid() ) { - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT && (*it ).gid() == gr.gid() ) list.append( ( *it ) ); @@ -381,11 +381,11 @@ QValueList SSIManager::contactsFromGroup( const QString &group ) con return list; } -QValueList SSIManager::contactsFromGroup( int groupId ) const +TQValueList SSIManager::contactsFromGroup( int groupId ) const { - QValueList list; + TQValueList list; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) if ( ( *it ).type() == ROSTER_CONTACT && (*it ).gid() == groupId ) list.append( ( *it ) ); @@ -396,7 +396,7 @@ QValueList SSIManager::contactsFromGroup( int groupId ) const Oscar::SSI SSIManager::visibilityItem() const { Oscar::SSI item = m_dummyItem; - QValueList::const_iterator it, listEnd = d->SSIList.end(); + TQValueList::const_iterator it, listEnd = d->SSIList.end(); for ( it = d->SSIList.begin(); it != listEnd; ++it ) { if ( ( *it ).type() == 0x0004 ) @@ -423,7 +423,7 @@ bool SSIManager::listComplete() const bool SSIManager::newGroup( const Oscar::SSI& group ) { //trying to find the group by its ID - QValueList::iterator it, listEnd = d->SSIList.end(); + TQValueList::iterator it, listEnd = d->SSIList.end(); if ( findGroup( group.name() ).isValid() ) return false; @@ -465,7 +465,7 @@ bool SSIManager::updateGroup( const Oscar::SSI& group ) bool SSIManager::removeGroup( const Oscar::SSI& group ) { - QString groupName = group.name(); + TQString groupName = group.name(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Removing group " << group.name() << endl; int remcount = d->SSIList.remove( group ); removeID( group ); @@ -480,7 +480,7 @@ bool SSIManager::removeGroup( const Oscar::SSI& group ) return true; } -bool SSIManager::removeGroup( const QString &group ) +bool SSIManager::removeGroup( const TQString &group ) { Oscar::SSI gr = findGroup( group ); @@ -534,7 +534,7 @@ bool SSIManager::updateContact( const Oscar::SSI& contact ) bool SSIManager::removeContact( const Oscar::SSI& contact ) { - QString contactName = contact.name(); + TQString contactName = contact.name(); int remcount = d->SSIList.remove( contact ); removeID( contact ); @@ -548,7 +548,7 @@ bool SSIManager::removeContact( const Oscar::SSI& contact ) return true; } -bool SSIManager::removeContact( const QString &contact ) +bool SSIManager::removeContact( const TQString &contact ) { Oscar::SSI ct = findContact( contact ); @@ -642,7 +642,7 @@ void SSIManager::removeID( const Oscar::SSI& item ) } } -WORD SSIManager::findFreeId( const QValueList& idList, WORD fromId ) const +WORD SSIManager::findFreeId( const TQValueList& idList, WORD fromId ) const { for ( WORD id = fromId; id < 0x8000; id++ ) { diff --git a/kopete/protocols/oscar/liboscar/ssimanager.h b/kopete/protocols/oscar/liboscar/ssimanager.h index 24e87c6a..df39268c 100644 --- a/kopete/protocols/oscar/liboscar/ssimanager.h +++ b/kopete/protocols/oscar/liboscar/ssimanager.h @@ -22,8 +22,8 @@ #ifndef SSIMANAGER_H #define SSIMANAGER_H -#include -#include +#include +#include #include "oscartypes.h" #include "oscartypeclasses.h" @@ -42,7 +42,7 @@ class KOPETE_EXPORT SSIManager : public QObject { Q_OBJECT public: - SSIManager( QObject* parent = 0, const char* name = 0 ); + SSIManager( TQObject* parent = 0, const char* name = 0 ); ~SSIManager(); @@ -73,29 +73,29 @@ public: * The current SSI list will be overwritten and it's contents * replaced with the data from the new list */ - void loadFromExisting( const QValueList& newList ); + void loadFromExisting( const TQValueList& newList ); bool hasItem( const Oscar::SSI& item ) const; - Oscar::SSI findGroup( const QString& group ) const; + Oscar::SSI findGroup( const TQString& group ) const; Oscar::SSI findGroup( int groupId ) const; - Oscar::SSI findContact( const QString& contact, const QString& group ) const; - Oscar::SSI findContact( const QString& contact ) const; + Oscar::SSI findContact( const TQString& contact, const TQString& group ) const; + Oscar::SSI findContact( const TQString& contact ) const; Oscar::SSI findContact( int contactId ) const; - Oscar::SSI findItemForIcon( QByteArray iconHash ) const; + Oscar::SSI findItemForIcon( TQByteArray iconHash ) const; Oscar::SSI findItemForIconByRef( int ) const; - Oscar::SSI findItem( const QString &contact, int type ) const; + Oscar::SSI findItem( const TQString &contact, int type ) const; - QValueList groupList() const; - QValueList contactList() const; - QValueList visibleList() const; - QValueList invisibleList() const; - QValueList contactsFromGroup( const QString& group ) const; - QValueList contactsFromGroup( int groupId ) const; + TQValueList groupList() const; + TQValueList contactList() const; + TQValueList visibleList() const; + TQValueList invisibleList() const; + TQValueList contactsFromGroup( const TQString& group ) const; + TQValueList contactsFromGroup( int groupId ) const; Oscar::SSI visibilityItem() const; @@ -106,12 +106,12 @@ public slots: bool newGroup( const Oscar::SSI& group ); bool updateGroup( const Oscar::SSI& group ); bool removeGroup( const Oscar::SSI& group ); - bool removeGroup( const QString& group ); + bool removeGroup( const TQString& group ); bool newContact( const Oscar::SSI& contact ); bool updateContact( const Oscar::SSI& contact ); bool removeContact( const Oscar::SSI& contact ); - bool removeContact( const QString& contact ); + bool removeContact( const TQString& contact ); bool newItem( const Oscar::SSI& item ); bool updateItem( const Oscar::SSI& item ); @@ -129,7 +129,7 @@ signals: void contactUpdated( const Oscar::SSI& ); //! Emitted when we've removed a contact from the list - void contactRemoved( const QString& contactName ); + void contactRemoved( const TQString& contactName ); //! Emitted when we've added a new group to the list void groupAdded( const Oscar::SSI& ); @@ -138,12 +138,12 @@ signals: void groupUpdated( const Oscar::SSI& ); //! Emitted when we've removed a group from the ssi list - void groupRemoved( const QString& groupName ); + void groupRemoved( const TQString& groupName ); - void modifyError( const QString& error ); + void modifyError( const TQString& error ); private: - WORD findFreeId( const QValueList& idList, WORD fromId ) const; + WORD findFreeId( const TQValueList& idList, WORD fromId ) const; SSIManagerPrivate* d; Oscar::SSI m_dummyItem; diff --git a/kopete/protocols/oscar/liboscar/ssimodifytask.cpp b/kopete/protocols/oscar/liboscar/ssimodifytask.cpp index 2091fca8..b4194b5e 100644 --- a/kopete/protocols/oscar/liboscar/ssimodifytask.cpp +++ b/kopete/protocols/oscar/liboscar/ssimodifytask.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include "connection.h" #include "oscarutils.h" #include "transfer.h" @@ -73,12 +73,12 @@ bool SSIModifyTask::take( Transfer* transfer ) return false; } -bool SSIModifyTask::addContact( const QString& contact, const QString& group, bool requiresAuth ) +bool SSIModifyTask::addContact( const TQString& contact, const TQString& group, bool requiresAuth ) { m_opType = Add; m_opSubject = Contact; - QString newContact = Oscar::normalize( contact ); + TQString newContact = Oscar::normalize( contact ); Oscar::SSI oldItem = m_ssiManager->findContact( newContact ); Oscar::SSI groupItem = m_ssiManager->findGroup( group ); @@ -90,7 +90,7 @@ bool SSIModifyTask::addContact( const QString& contact, const QString& group, bo } //create new SSI item and populate the TLV list - QValueList tlvList; + TQValueList tlvList; if ( requiresAuth ) { kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "This contact requires auth. adding appropriate tlv" << endl; @@ -104,7 +104,7 @@ bool SSIModifyTask::addContact( const QString& contact, const QString& group, bo return true; } -bool SSIModifyTask::removeContact( const QString& contact ) +bool SSIModifyTask::removeContact( const TQString& contact ) { m_opType = Remove; m_opSubject = Contact; @@ -113,7 +113,7 @@ bool SSIModifyTask::removeContact( const QString& contact ) return true; } -bool SSIModifyTask::changeGroup( const QString& contact, const QString& newGroup ) +bool SSIModifyTask::changeGroup( const TQString& contact, const TQString& newGroup ) { m_opType = Change; m_opSubject = Group; @@ -144,19 +144,19 @@ bool SSIModifyTask::changeGroup( const QString& contact, const QString& newGroup return true; } -bool SSIModifyTask::addGroup( const QString& groupName ) +bool SSIModifyTask::addGroup( const TQString& groupName ) { m_opType = Add; m_opSubject = Group; m_newItem = m_ssiManager->findGroup( groupName ); - QValueList dummy; + TQValueList dummy; Oscar::SSI newItem( groupName, m_ssiManager->nextGroupId(), 0, ROSTER_GROUP, dummy ); m_newItem = newItem; kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Adding group '" << m_newItem.name() << "' to SSI" << endl; return true; } -bool SSIModifyTask::removeGroup( const QString& groupName ) +bool SSIModifyTask::removeGroup( const TQString& groupName ) { m_opType = Remove; m_opSubject = Group; @@ -165,7 +165,7 @@ bool SSIModifyTask::removeGroup( const QString& groupName ) return true; } -bool SSIModifyTask::renameGroup( const QString& oldName, const QString & newName ) +bool SSIModifyTask::renameGroup( const TQString& oldName, const TQString & newName ) { m_opType = Rename; m_opSubject = Group; @@ -254,36 +254,36 @@ void SSIModifyTask::handleSSIAck() break; case 0x0002: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Item to modify not found in list" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x0003: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Item already exists in SSI" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000A: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Error adding item ( invalid id, already in list, invalid data )" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000C: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add item. Limit exceeded." << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000D: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add ICQ item to AIM list ( and vice versa )" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; case 0x000E: { kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Can't add item because contact requires authorization" << endl; Oscar::SSI groupItem = m_ssiManager->findGroup( m_newItem.gid() ); - QString groupName = groupItem.name(); + TQString groupName = groupItem.name(); addContact( m_newItem.name(), groupName, true ); go(); break; } default: kdDebug( OSCAR_RAW_DEBUG ) << k_funcinfo << "Unknown acknowledgement code" << endl; - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); break; } }; @@ -391,7 +391,7 @@ void SSIModifyTask::changeGroupOnServer() //Change the 0x00C8 TLV in the old group item to remove the bid we're //moving to a different group - QValueList list = oldGroupItem.tlvList(); + TQValueList list = oldGroupItem.tlvList(); TLV oldIds = Oscar::findTLV( list, 0x00C8 ); if ( oldIds.type == 0x00C8 ) { @@ -414,7 +414,7 @@ void SSIModifyTask::changeGroupOnServer() //Change the 0x00C8 TLV in the new group item to add the bid we're //adding to this group - QValueList list2 = m_groupItem.tlvList(); + TQValueList list2 = m_groupItem.tlvList(); TLV oldIds2 = Oscar::findTLV( list2, 0x00C8 ); TLV newGroupTLV; if ( oldIds2.type == 0x00C8 ) @@ -466,7 +466,7 @@ void SSIModifyTask::updateSSIManager() kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "and adding " << m_newItem.name() << " to SSI manager" << endl; m_ssiManager->newItem( m_newItem ); } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return; } @@ -479,7 +479,7 @@ void SSIModifyTask::updateSSIManager() m_ssiManager->removeContact( m_oldItem.name() ); else if ( m_opSubject == NoSubject ) m_ssiManager->removeItem( m_oldItem ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return; } @@ -492,11 +492,11 @@ void SSIModifyTask::updateSSIManager() m_ssiManager->newContact( m_newItem ); else if ( m_opSubject == NoSubject ) m_ssiManager->newItem( m_newItem ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); return; } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } void SSIModifyTask::freeIdOnError() @@ -550,18 +550,18 @@ void SSIModifyTask::addItemToBuffer( Oscar::SSI item, Buffer* buffer ) buffer->addWord( item.type() ); buffer->addWord( item.tlvListLength() ); - QValueList::const_iterator it = item.tlvList().begin(); - QValueList::const_iterator listEnd = item.tlvList().end(); + TQValueList::const_iterator it = item.tlvList().begin(); + TQValueList::const_iterator listEnd = item.tlvList().end(); for( ; it != listEnd; ++it ) buffer->addTLV( ( *it ) ); } Oscar::SSI SSIModifyTask::getItemFromBuffer( Buffer* buffer ) const { - QValueList tlvList; + TQValueList tlvList; WORD strlength = buffer->getWord(); - QString itemName = QString::fromUtf8( buffer->getBlock( strlength ), strlength ); + TQString itemName = TQString::fromUtf8( buffer->getBlock( strlength ), strlength ); WORD groupId = buffer->getWord(); WORD itemId = buffer->getWord(); WORD itemType = buffer->getWord(); diff --git a/kopete/protocols/oscar/liboscar/ssimodifytask.h b/kopete/protocols/oscar/liboscar/ssimodifytask.h index 2c32dda3..70486cbc 100644 --- a/kopete/protocols/oscar/liboscar/ssimodifytask.h +++ b/kopete/protocols/oscar/liboscar/ssimodifytask.h @@ -63,29 +63,29 @@ public: //! Set up the stuff needed to add a contact. //! @return true if we can send the packet - bool addContact( const QString& contact, const QString& group, bool requiresAuth = false ); + bool addContact( const TQString& contact, const TQString& group, bool requiresAuth = false ); //! Set up the stuff needed to remove a contact. //! @return true if we can send the packet - bool removeContact( const QString& contact ); + bool removeContact( const TQString& contact ); //! Set up the stuff needed to change groups //! @return true if we can send the packet - bool changeGroup( const QString& contact, const QString& newGroup ); + bool changeGroup( const TQString& contact, const TQString& newGroup ); /* Group properties */ //! Add a new group to the SSI list //! @return true if we can send the packet - bool addGroup( const QString& groupName ); + bool addGroup( const TQString& groupName ); //! Remove a group from the SSI list //! @return true if we can send the packet - bool removeGroup( const QString& groupName ); + bool removeGroup( const TQString& groupName ); //! Rename a group on the SSI list //! @return true if we can send the packet - bool renameGroup( const QString& oldName, const QString& newName ); + bool renameGroup( const TQString& oldName, const TQString& newName ); //! Add an item to the SSI list //! Should be used for other items we don't have explicit functions for diff --git a/kopete/protocols/oscar/liboscar/ssiparamstask.cpp b/kopete/protocols/oscar/liboscar/ssiparamstask.cpp index 0be172e8..d279061c 100644 --- a/kopete/protocols/oscar/liboscar/ssiparamstask.cpp +++ b/kopete/protocols/oscar/liboscar/ssiparamstask.cpp @@ -81,7 +81,7 @@ void SSIParamsTask::handleParamReply() //manually parse the TLV out of the packet, since we only want certain things if ( buf->getWord() != 0x0004 ) { - setError( -1, QString::null ); + setError( -1, TQString::null ); return; //no TLV of type 0x0004, bad packet. do nothing. } else @@ -95,7 +95,7 @@ void SSIParamsTask::handleParamReply() WORD maxIgnore = buf->getWord(); client()->ssiManager()->setParameters( maxContacts, maxGroups, maxVisible, maxInvisible, maxIgnore ); } - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } // kate: tab-width 4; indent-mode csands; diff --git a/kopete/protocols/oscar/liboscar/stream.cpp b/kopete/protocols/oscar/liboscar/stream.cpp index 02967416..2fb302c1 100644 --- a/kopete/protocols/oscar/liboscar/stream.cpp +++ b/kopete/protocols/oscar/liboscar/stream.cpp @@ -19,8 +19,8 @@ #include "stream.h" -Stream::Stream(QObject *parent) -:QObject(parent) +Stream::Stream(TQObject *parent) +:TQObject(parent) { } diff --git a/kopete/protocols/oscar/liboscar/stream.h b/kopete/protocols/oscar/liboscar/stream.h index 9fbacbda..d5bfabad 100644 --- a/kopete/protocols/oscar/liboscar/stream.h +++ b/kopete/protocols/oscar/liboscar/stream.h @@ -18,7 +18,7 @@ ************************************************************************* */ -#include +#include #ifndef OSCAR_STREAM_H #define OSCAR_STREAM_H @@ -42,12 +42,12 @@ public: SystemShutdown }; - Stream(QObject *parent=0); + Stream(TQObject *parent=0); virtual ~Stream(); virtual void close()=0; virtual int errorCondition() const=0; - virtual QString errorText() const=0; + virtual TQString errorText() const=0; /** * Are there any messages waiting to be read diff --git a/kopete/protocols/oscar/liboscar/task.cpp b/kopete/protocols/oscar/liboscar/task.cpp index 2c7628d7..2ec342ac 100644 --- a/kopete/protocols/oscar/liboscar/task.cpp +++ b/kopete/protocols/oscar/liboscar/task.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include +#include #include "connection.h" #include "transfer.h" @@ -34,7 +34,7 @@ public: Q_UINT32 id; bool success; int statusCode; - QString statusString; + TQString statusString; Connection* client; bool insignificant, deleteme, autoDelete; bool done; @@ -42,19 +42,19 @@ public: }; Task::Task(Task *parent) -:QObject(parent) +:TQObject(parent) { init(); d->client = parent->client(); - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::Task(Connection* parent, bool) -:QObject(0) +:TQObject(0) { init(); d->client = parent; - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::~Task() @@ -77,7 +77,7 @@ void Task::init() Task *Task::parent() const { - return (Task *)QObject::parent(); + return (Task *)TQObject::parent(); } Connection *Task::client() const @@ -110,7 +110,7 @@ int Task::statusCode() const return d->statusCode; } -const QString & Task::statusString() const +const TQString & Task::statusString() const { return d->statusString; } @@ -124,15 +124,15 @@ void Task::go(bool autoDelete) bool Task::take( Transfer * transfer) { - const QObjectList *p = children(); + const TQObjectList *p = children(); if(!p) return false; // pass along the transfer to our children - QObjectListIt it(*p); + TQObjectListIt it(*p); Task *t; for(; it.current(); ++it) { - QObject *obj = it.current(); + TQObject *obj = it.current(); if(!obj->inherits("Task")) continue; @@ -173,7 +173,7 @@ void Task::onDisconnect() d->statusString = tr("Disconnected"); // delay this so that tasks that react don't block the shutdown - QTimer::singleShot(0, this, SLOT(done())); + TQTimer::singleShot(0, this, TQT_SLOT(done())); } } @@ -182,7 +182,7 @@ void Task::send( Transfer * request ) client()->send( request ); } -void Task::setSuccess(int code, const QString &str) +void Task::setSuccess(int code, const TQString &str) { if(!d->done) { d->success = true; @@ -192,7 +192,7 @@ void Task::setSuccess(int code, const QString &str) } } -void Task::setError(int code, const QString &str) +void Task::setError(int code, const TQString &str) { if(!d->done) { d->success = false; @@ -245,7 +245,7 @@ Transfer* Task::createTransfer( Buffer* buffer ) // void Task::debug(const char *fmt, ...) // { // char *buf; -// QString str; +// TQString str; // int size = 1024; // int r; // @@ -257,7 +257,7 @@ Transfer* Task::createTransfer( Buffer* buffer ) // va_end(ap); // // if(r != -1) -// str = QString(buf); +// str = TQString(buf); // // delete [] buf; // @@ -267,11 +267,11 @@ Transfer* Task::createTransfer( Buffer* buffer ) // debug(str); // } -void Task::debug(const QString &str) +void Task::debug(const TQString &str) { //black hole Q_UNUSED( str ); - //client()->debug(QString("%1: ").arg(className()) + str); + //client()->debug(TQString("%1: ").arg(className()) + str); } bool Task::forMe( const Transfer * transfer ) const diff --git a/kopete/protocols/oscar/liboscar/task.h b/kopete/protocols/oscar/liboscar/task.h index e48e02de..04513824 100644 --- a/kopete/protocols/oscar/liboscar/task.h +++ b/kopete/protocols/oscar/liboscar/task.h @@ -21,7 +21,7 @@ #ifndef OSCAR_TASK_H #define OSCAR_TASK_H -#include +#include #include "oscartypes.h" @@ -52,7 +52,7 @@ public: bool success() const; int statusCode() const; - const QString & statusString() const; + const TQString & statusString() const; void go( bool autoDelete = false ); @@ -76,10 +76,10 @@ protected: virtual void onDisconnect(); void setId( Q_UINT32 id ); void send( Transfer * request ); - void setSuccess( int code=0, const QString &str="" ); - void setError( int code=0, const QString &str="" ); + void setSuccess( int code=0, const TQString &str="" ); + void setError( int code=0, const TQString &str="" ); // void debug( const char *, ... ); - void debug( const QString & ); + void debug( const TQString & ); /** * Used in take() to check if the offered transfer is for this Task diff --git a/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp b/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp index 59f392de..a7c16cea 100644 --- a/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp +++ b/kopete/protocols/oscar/liboscar/tests/clientstream_test.cpp @@ -2,7 +2,7 @@ #include "clientstream_test.h" -ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, argv ) +ClientStreamTest::ClientStreamTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -10,12 +10,12 @@ ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, myConnector->setOptHostPort( "login.oscar.aol.com", 5190 ); myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); // notify and start sending - //connect( myTestObject, SIGNAL( warning(int) ), SLOT( slotWarning(int) ) ); + //connect( myTestObject, TQT_SIGNAL( warning(int) ), TQT_SLOT( slotWarning(int) ) ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -27,7 +27,7 @@ ClientStreamTest::~ClientStreamTest() void ClientStreamTest::slotDoTest() { - QString server = QString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::fromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); myTestObject->connectToServer( server, true ); // fine up to here... diff --git a/kopete/protocols/oscar/liboscar/tests/clientstream_test.h b/kopete/protocols/oscar/liboscar/tests/clientstream_test.h index 32a0e3a9..47aeac86 100644 --- a/kopete/protocols/oscar/liboscar/tests/clientstream_test.h +++ b/kopete/protocols/oscar/liboscar/tests/clientstream_test.h @@ -10,9 +10,9 @@ #ifndef clientstream_test_h #define clientstream_test_h -#include -#include -#include +#include +#include +#include #include "oscarclientstream.h" #include "oscarconnector.h" diff --git a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp index 4f4e8df2..0f37f614 100644 --- a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.cpp @@ -2,11 +2,11 @@ #include #include "ipaddrtest.h" -#include +#include using namespace std; IPAddrTest::IPAddrTest(int argc, char ** argv) -: QApplication( argc, argv ) +: TQApplication( argc, argv ) { } @@ -28,13 +28,13 @@ bool IPAddrTest::testAllZeroDotted() bool IPAddrTest::testNumericalIP() { - QString address = "65.93.151.168"; + TQString address = "65.93.151.168"; return ( Oscar::getNumericalIP( address ) == 1096652712 ); } bool IPAddrTest::testAllZeroNumerical() { - QString address = "0.0.0.0"; + TQString address = "0.0.0.0"; return ( Oscar::getNumericalIP( address ) == 0 ); } diff --git a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h index 9452ad82..f2fa0fec 100644 --- a/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h +++ b/kopete/protocols/oscar/liboscar/tests/ipaddrtest.h @@ -10,9 +10,9 @@ #ifndef IPADDRTEST_H #define IPADDRTEST_H -#include -#include -#include +#include +#include +#include #include "oscarutils.h" diff --git a/kopete/protocols/oscar/liboscar/tests/kunittest.cpp b/kopete/protocols/oscar/liboscar/tests/kunittest.cpp index 9f7ba693..2181fda3 100644 --- a/kopete/protocols/oscar/liboscar/tests/kunittest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/kunittest.cpp @@ -29,8 +29,8 @@ #include "tester.h" #include "chatnavtests.h" -#include -#include +#include +#include #include using namespace std; @@ -51,7 +51,7 @@ void KUnitTest::registerTests() KUnitTest::KUnitTest() { - QTimer::singleShot( 0, this, SLOT(checkRun()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(checkRun()) ); m_tests.setAutoDelete( TRUE ); // m_qtests.setAutoDelete( TRUE ); @@ -75,7 +75,7 @@ int KUnitTest::runTests() int globalSkipped = 0; cout << "# Running normal tests... #" << endl << endl; - QAsciiDictIterator it( m_tests ); + TQAsciiDictIterator it( m_tests ); for( ; it.current(); ++it ) { Tester* test = it.current(); @@ -109,29 +109,29 @@ int KUnitTest::runTests() if ( 0 < numXPass ) { cout << " Unexpected pass" << ( ( 1 == numXPass )?"":"es") << ":" << endl; - QStringList list = test->xpassList(); - for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + TQStringList list = test->xpassList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { cout << "\t" << (*itr).latin1() << endl; } } if ( 0 < (numFail - numXFail) ) { cout << " Unexpected failure" << ( ( 1 == numFail )?"":"s") << ":" << endl; - QStringList list = test->errorList(); - for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + TQStringList list = test->errorList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { cout << "\t" << (*itr).latin1() << endl; } } if ( 0 < numXFail ) { cout << " Expected failure" << ( ( 1 == numXFail)?"":"s") << ":" << endl; - QStringList list = test->xfailList(); - for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + TQStringList list = test->xfailList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { cout << "\t" << (*itr).latin1() << endl; } } if ( 0 < numSkip ) { cout << " Skipped test" << ( ( 1 == numSkip )?"":"s") << ":" << endl; - QStringList list = test->skipList(); - for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { + TQStringList list = test->skipList(); + for ( TQStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) { cout << "\t" << (*itr).latin1() << endl; } } @@ -153,11 +153,11 @@ int KUnitTest::runTests() //void KUnitTest::addTester( QTester *test ) //{ // m_qtests.insert( test, test ); -// connect( test, SIGNAL(destroyed(QObject*)), -// SLOT(qtesterDone(QObject* )) ); +// connect( test, TQT_SIGNAL(destroyed(TQObject*)), +// TQT_SLOT(qtesterDone(TQObject* )) ); //} -void KUnitTest::qtesterDone( QObject *obj ) +void KUnitTest::qtesterDone( TQObject *obj ) { // m_qtests.remove( obj ); // if ( m_qtests.isEmpty() ) diff --git a/kopete/protocols/oscar/liboscar/tests/kunittest.h b/kopete/protocols/oscar/liboscar/tests/kunittest.h index 5148a82a..d2d6a04a 100644 --- a/kopete/protocols/oscar/liboscar/tests/kunittest.h +++ b/kopete/protocols/oscar/liboscar/tests/kunittest.h @@ -29,9 +29,9 @@ #include "tester.h" -#include -#include -#include +#include +#include +#include #define ADD_TEST(x) addTester( #x, new x ) #define ADD_QTEST(x) addTester( new x ) @@ -51,15 +51,15 @@ public: // void addTester( QTester *test ); private slots: - void qtesterDone( QObject *obj ); + void qtesterDone( TQObject *obj ); void checkRun(); private: void registerTests(); private: - QAsciiDict m_tests; -// QPtrDict m_qtests; + TQAsciiDict m_tests; +// TQPtrDict m_qtests; int globalTests; int globalPasses; int globalFails; diff --git a/kopete/protocols/oscar/liboscar/tests/logintest.cpp b/kopete/protocols/oscar/liboscar/tests/logintest.cpp index 6dbc9646..1d3728aa 100644 --- a/kopete/protocols/oscar/liboscar/tests/logintest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/logintest.cpp @@ -2,7 +2,7 @@ #include "logintest.h" -LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) +LoginTest::LoginTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -10,13 +10,13 @@ LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - //connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + //connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); myClient = new Client(); myConnection = new Connection( myConnector, myTestObject, "AUTHORIZER" ); myConnection->setClient( myClient ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -29,7 +29,7 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - QString server = QString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::fromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); diff --git a/kopete/protocols/oscar/liboscar/tests/logintest.h b/kopete/protocols/oscar/liboscar/tests/logintest.h index 898a3d99..d97c336d 100644 --- a/kopete/protocols/oscar/liboscar/tests/logintest.h +++ b/kopete/protocols/oscar/liboscar/tests/logintest.h @@ -10,9 +10,9 @@ #ifndef logintest_h #define logintest_h -#include -#include -#include +#include +#include +#include #include "oscarclientstream.h" #include "oscarconnector.h" diff --git a/kopete/protocols/oscar/liboscar/tests/redirecttest.cpp b/kopete/protocols/oscar/liboscar/tests/redirecttest.cpp index a220e13e..3086ca64 100644 --- a/kopete/protocols/oscar/liboscar/tests/redirecttest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/redirecttest.cpp @@ -2,11 +2,11 @@ #include #include "redirecttest.h" -#include +#include using namespace std; RedirectTest::RedirectTest(int argc, char ** argv) -: QApplication( argc, argv ), +: TQApplication( argc, argv ), m_transfer(0), m_task(0) { @@ -73,7 +73,7 @@ bool RedirectTest::testCookieIsSet() return !m_task->cookie().isEmpty(); } -Buffer* RedirectTest::SetupBuffer(WORD Service, QString Cookie) +Buffer* RedirectTest::SetupBuffer(WORD Service, TQString Cookie) { Buffer* b = new Buffer; b->addTLV16(0x000D, Service); diff --git a/kopete/protocols/oscar/liboscar/tests/redirecttest.h b/kopete/protocols/oscar/liboscar/tests/redirecttest.h index eda5d67a..785d61c8 100644 --- a/kopete/protocols/oscar/liboscar/tests/redirecttest.h +++ b/kopete/protocols/oscar/liboscar/tests/redirecttest.h @@ -10,9 +10,9 @@ #ifndef RedirectTest_h #define RedirectTest_h -#include -#include -#include +#include +#include +#include #include "transfer.h" #include "oscartypes.h" @@ -39,7 +39,7 @@ public: private: //Helper functions - Buffer* SetupBuffer(WORD Service, QString Cookie); + Buffer* SetupBuffer(WORD Service, TQString Cookie); Task *m_root; SnacTransfer * m_transfer; diff --git a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp index a1a9e754..6ca733cc 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.cpp @@ -2,7 +2,7 @@ #include "ssigrouptest.h" -LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) +LoginTest::LoginTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -10,13 +10,13 @@ LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - //connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + //connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); myClient = new Client(); myConnection = new Connection( myConnector, myTestObject, "AUTHORIZER" ); myConnection->setClient( myClient ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -29,14 +29,14 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - QString server = QString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::fromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); myClient->setIsIcq( true ); myClient->start( server, 5190, "userid", "password" ); myClient->connectToServer( myConnection, server, true ); - QTimer::singleShot( 10000, this, SLOT(runAddGroupTest() ) ); + TQTimer::singleShot( 10000, this, TQT_SLOT(runAddGroupTest() ) ); connected = true; } @@ -57,15 +57,15 @@ int main(int argc, char ** argv) void LoginTest::runAddGroupTest() { qDebug( "running ssi group add test" ); - QString group = QString::fromLatin1( "dummygroup" ); + TQString group = TQString::fromLatin1( "dummygroup" ); myClient->addGroup( group ); - QTimer::singleShot( 5000, this, SLOT( runDelGroupTest() ) ); + TQTimer::singleShot( 5000, this, TQT_SLOT( runDelGroupTest() ) ); } void LoginTest::runDelGroupTest() { qDebug( "running ssi group del test" ); - QString group = QString::fromLatin1( "dummygroup" ); + TQString group = TQString::fromLatin1( "dummygroup" ); myClient->removeGroup( group ); } diff --git a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h index 361c053b..291698ec 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h +++ b/kopete/protocols/oscar/liboscar/tests/ssigrouptest.h @@ -10,9 +10,9 @@ #ifndef logintest_h #define logintest_h -#include -#include -#include +#include +#include +#include #include "oscarclientstream.h" #include "oscarconnector.h" diff --git a/kopete/protocols/oscar/liboscar/tests/ssitest.cpp b/kopete/protocols/oscar/liboscar/tests/ssitest.cpp index d8e05b36..7669a945 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssitest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/ssitest.cpp @@ -2,9 +2,9 @@ #include "ssitest.h" -#include +#include -SSITest::SSITest(int argc, char ** argv) : QApplication( argc, argv ) +SSITest::SSITest(int argc, char ** argv) : TQApplication( argc, argv ) { m_manager = new SSIManager(this); @@ -19,7 +19,7 @@ SSITest::~SSITest() void SSITest::testIt() { - QPtrList tlvs; + TQPtrList tlvs; //add three groups SSI *ssi = new SSI( "FirstGroup", 1, 1, ROSTER_GROUP, tlvs); @@ -53,28 +53,28 @@ void SSITest::testIt() //try to find a group by name ssi = m_manager->findGroup("SecondGroup"); if ( ssi ) - qDebug( QString("Found group SecondGroup with gid=%1").arg( ssi->gid() ).latin1()); + qDebug( TQString("Found group SecondGroup with gid=%1").arg( ssi->gid() ).latin1()); else qDebug( "Oops, group SecondGroup not found" ); //try to find a group by gid ssi = m_manager->findGroup( 3 ); if ( ssi ) - qDebug( QString("Found group 3 with name=%1").arg( ssi->name() ).latin1() ); + qDebug( TQString("Found group 3 with name=%1").arg( ssi->name() ).latin1() ); else qDebug( "Oops, group 3 not found" ); //try to find a contact by name ssi = m_manager->findContact("ThirdContact"); if ( ssi ) - qDebug( QString( "Found contact ThirdContact with gid=%1" ).arg( ssi->gid() ).latin1() ); + qDebug( TQString( "Found contact ThirdContact with gid=%1" ).arg( ssi->gid() ).latin1() ); else qDebug( "Oops, contact ThirdContact not found" ); //try to find a contact using the name and the group name ssi = m_manager->findContact("FourthContact","SecondGroup"); if ( ssi ) - qDebug( QString("Found contact FourthContact with bid=%1").arg( ssi->bid() ).latin1() ); + qDebug( TQString("Found contact FourthContact with bid=%1").arg( ssi->bid() ).latin1() ); else qDebug( "Oops, contact FourthContact not found" ); @@ -85,17 +85,17 @@ void SSITest::testIt() qDebug( "Good! It has detected the group is invalid :)" ); //contacts from a group - QValueList list = m_manager->contactsFromGroup("FirstGroup"); - QValueList::iterator it; + TQValueList list = m_manager->contactsFromGroup("FirstGroup"); + TQValueList::iterator it; qDebug( "Contacts from group FirtsGroup:" ); for ( it = list.begin(); it != list.end(); ++it) - qDebug( QString(" name=%1").arg( (*it)->name() ).latin1() ); + qDebug( TQString(" name=%1").arg( (*it)->name() ).latin1() ); //the group list - QValueList list2 = m_manager->groupList(); + TQValueList list2 = m_manager->groupList(); qDebug( "Group list:" ); for ( it = list2.begin(); it != list2.end(); ++it) - qDebug( QString(" name=%1").arg( (*it)->name() ).latin1() ); + qDebug( TQString(" name=%1").arg( (*it)->name() ).latin1() ); //remove a group - this shouldn't report any debug line m_manager->removeGroup( "SecondGroup" ); diff --git a/kopete/protocols/oscar/liboscar/tests/ssitest.h b/kopete/protocols/oscar/liboscar/tests/ssitest.h index 19206465..fbdcf2fb 100644 --- a/kopete/protocols/oscar/liboscar/tests/ssitest.h +++ b/kopete/protocols/oscar/liboscar/tests/ssitest.h @@ -10,9 +10,9 @@ #ifndef ssitest_h #define ssitest_h -#include -#include -#include +#include +#include +#include #include "ssimanager.h" diff --git a/kopete/protocols/oscar/liboscar/tests/tester.h b/kopete/protocols/oscar/liboscar/tests/tester.h index 2cb1f3af..162473dd 100644 --- a/kopete/protocols/oscar/liboscar/tests/tester.h +++ b/kopete/protocols/oscar/liboscar/tests/tester.h @@ -27,7 +27,7 @@ #ifndef TESTER_H #define TESTER_H -#include +#include #define CHECK( x, y ) check( __FILE__, __LINE__, #x, x, y, false ) #define XFAIL( x, y ) check( __FILE__, __LINE__, #x, x, y, true ) @@ -50,26 +50,26 @@ public: return m_tests; } - QStringList errorList() const { + TQStringList errorList() const { return m_errorList; } - QStringList xfailList() const { + TQStringList xfailList() const { return m_xfailList; } - QStringList xpassList() const { + TQStringList xpassList() const { return m_xpassList; } - QStringList skipList() const { + TQStringList skipList() const { return m_skipList; } - void skip( const char *file, int line, QString msg ) + void skip( const char *file, int line, TQString msg ) { - QString skipEntry; - QTextStream ts( &skipEntry, IO_WriteOnly ); + TQString skipEntry; + TQTextStream ts( &skipEntry, IO_WriteOnly ); ts << file << "["<< line <<"]: " << msg; m_skipList.append( skipEntry ); @@ -83,8 +83,8 @@ protected: bool expectedFailure ) { if ( result != expectedResult ) { - QString error; - QTextStream ts( &error, IO_WriteOnly ); + TQString error; + TQTextStream ts( &error, IO_WriteOnly ); ts << file << "["<< line <<"]:" <<" failed on \""<< str <<"\"" << "\n\t\t result = '" @@ -99,8 +99,8 @@ protected: // then the test passed, but we want to record it if // we were expecting a failure if (expectedFailure) { - QString error; - QTextStream ts( &error, IO_WriteOnly ); + TQString error; + TQTextStream ts( &error, IO_WriteOnly ); ts << file << "["<< line <<"]:" <<" unexpectedly passed on \"" << str <<"\""; @@ -111,10 +111,10 @@ protected: } private: - QStringList m_errorList; - QStringList m_xfailList; - QStringList m_xpassList; - QStringList m_skipList; + TQStringList m_errorList; + TQStringList m_xfailList; + TQStringList m_xpassList; + TQStringList m_skipList; int m_tests; }; diff --git a/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp b/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp index 72ef5acb..fb346d26 100644 --- a/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp +++ b/kopete/protocols/oscar/liboscar/tests/userinfotest.cpp @@ -2,7 +2,7 @@ #include "userinfotest.h" -LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) +LoginTest::LoginTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -10,13 +10,13 @@ LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - //connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + //connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); myClient = new Client(); myConnection = new Connection( myConnector, myTestObject, "AUTHORIZER" ); myConnection->setClient( myClient ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -29,15 +29,15 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - QString server = QString::fromLatin1("login.oscar.aol.com"); + TQString server = TQString::fromLatin1("login.oscar.aol.com"); // connect to server qDebug( "connecting to server "); myClient->setIsIcq( true ); myClient->start( server, 5190, "userid", "password" ); myClient->connectToServer( myConnection, server, true ); - //QObject::connect( myClient, SIGNAL( userIsOnline( const QString& ) ), this, SLOT( runUserInfoTest())); - //QTimer::singleShot( 6000, this, SLOT(runUserInfoTest() ) ); + //TQObject::connect( myClient, TQT_SIGNAL( userIsOnline( const TQString& ) ), this, TQT_SLOT( runUserInfoTest())); + //TQTimer::singleShot( 6000, this, TQT_SLOT(runUserInfoTest() ) ); connected = true; } @@ -58,7 +58,7 @@ int main(int argc, char ** argv) void LoginTest::runUserInfoTest() { qDebug( "running user info test" ); - QString contact = QString::fromLatin1( "userid" ); + TQString contact = TQString::fromLatin1( "userid" ); myClient->requestFullInfo( contact ); } diff --git a/kopete/protocols/oscar/liboscar/tests/userinfotest.h b/kopete/protocols/oscar/liboscar/tests/userinfotest.h index 433a6c48..76450466 100644 --- a/kopete/protocols/oscar/liboscar/tests/userinfotest.h +++ b/kopete/protocols/oscar/liboscar/tests/userinfotest.h @@ -10,9 +10,9 @@ #ifndef logintest_h #define logintest_h -#include -#include -#include +#include +#include +#include #include "oscarclientstream.h" #include "oscarconnector.h" diff --git a/kopete/protocols/oscar/liboscar/transfer.cpp b/kopete/protocols/oscar/liboscar/transfer.cpp index b442a97c..ac83ac06 100644 --- a/kopete/protocols/oscar/liboscar/transfer.cpp +++ b/kopete/protocols/oscar/liboscar/transfer.cpp @@ -19,7 +19,7 @@ #include "transfer.h" #include -#include +#include #include Transfer::Transfer() @@ -38,10 +38,10 @@ Transfer::TransferType Transfer::type() const return Transfer::RawTransfer; } -QByteArray Transfer::toWire() +TQByteArray Transfer::toWire() { m_wireFormat.duplicate( m_buffer->buffer(), m_buffer->length() ); - QByteArray wire = QDeepCopy( m_wireFormat ); + TQByteArray wire = TQDeepCopy( m_wireFormat ); return wire; } @@ -71,17 +71,17 @@ bool Transfer::dataValid() const return m_isBufferValid; } -QString Transfer::toString() const +TQString Transfer::toString() const { // line format: //00 03 00 0b 00 00 90 b8 f5 9f 09 31 31 33 37 38 |;tJ�..........| int i = 0; - QString output = "\n"; - QString hex, ascii; + TQString output = "\n"; + TQString hex, ascii; - QByteArray::ConstIterator it; - QByteArray::ConstIterator end = m_wireFormat.end(); + TQByteArray::ConstIterator it; + TQByteArray::ConstIterator end = m_wireFormat.end(); for ( it = m_wireFormat.begin(); it != end; ++it ) { i++; @@ -90,7 +90,7 @@ QString Transfer::toString() const if(c < 0x10) hex.append("0"); - hex.append(QString("%1 ").arg(c, 0, 16)); + hex.append(TQString("%1 ").arg(c, 0, 16)); ascii.append(isprint(c) ? c : '.'); @@ -98,8 +98,8 @@ QString Transfer::toString() const { output += hex + " |" + ascii + "|\n"; i=0; - hex=QString::null; - ascii=QString::null; + hex=TQString::null; + ascii=TQString::null; } } @@ -110,7 +110,7 @@ QString Transfer::toString() const return output; } -void Transfer::populateWireBuffer( int offset, const QByteArray& buffer ) +void Transfer::populateWireBuffer( int offset, const TQByteArray& buffer ) { int j; for ( uint i = 0; i < buffer.size(); ++i ) @@ -159,13 +159,13 @@ FlapTransfer::~FlapTransfer() } -QByteArray FlapTransfer::toWire() +TQByteArray FlapTransfer::toWire() { //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Buffer length is " << m_buffer.length() << endl; //kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Buffer is " << m_buffer.toString() << endl; m_wireFormat.truncate( 0 ); - QByteArray useBuf; + TQByteArray useBuf; useBuf.duplicate( m_buffer->buffer(), m_buffer->length() ); m_flapLength = useBuf.size(); m_wireFormat.resize( 6 + m_flapLength ); @@ -178,7 +178,7 @@ QByteArray FlapTransfer::toWire() //deepcopy the high-level buffer to the wire format buffer populateWireBuffer( 6, useBuf ); - QByteArray wire = QDeepCopy( m_wireFormat ); + TQByteArray wire = TQDeepCopy( m_wireFormat ); return wire; } @@ -273,11 +273,11 @@ SnacTransfer::~SnacTransfer() } -QByteArray SnacTransfer::toWire() +TQByteArray SnacTransfer::toWire() { m_wireFormat.truncate( 0 ); - QByteArray useBuf; + TQByteArray useBuf; useBuf.duplicate( m_buffer->buffer(), m_buffer->length() ); setFlapLength( useBuf.size() + 10 ); m_wireFormat.resize( 16 + useBuf.size() ); @@ -304,7 +304,7 @@ QByteArray SnacTransfer::toWire() //deepcopy the high-level buffer to the wire format buffer populateWireBuffer( 16, useBuf ); - QByteArray wire = QDeepCopy( m_wireFormat ); + TQByteArray wire = TQDeepCopy( m_wireFormat ); return wire; } diff --git a/kopete/protocols/oscar/liboscar/transfer.h b/kopete/protocols/oscar/liboscar/transfer.h index f42b1e83..0ec4fc41 100644 --- a/kopete/protocols/oscar/liboscar/transfer.h +++ b/kopete/protocols/oscar/liboscar/transfer.h @@ -34,7 +34,7 @@ public: virtual TransferType type() const; - virtual QByteArray toWire(); + virtual TQByteArray toWire(); //! Set the data buffer void setBuffer( Buffer* buffer ); @@ -47,13 +47,13 @@ public: //! Get the validity of the data after the flap header bool dataValid() const; - QString toString() const; + TQString toString() const; - void populateWireBuffer( int offset, const QByteArray& buffer ); + void populateWireBuffer( int offset, const TQByteArray& buffer ); protected: //! The wire-format representation of our buffer - QByteArray m_wireFormat; + TQByteArray m_wireFormat; //! The high-level representation of our data Buffer* m_buffer; @@ -75,7 +75,7 @@ public: virtual ~FlapTransfer(); virtual TransferType type() const; - virtual QByteArray toWire(); + virtual TQByteArray toWire(); //! Set the FLAP channel @@ -123,7 +123,7 @@ public: virtual ~SnacTransfer(); TransferType type() const; - virtual QByteArray toWire(); + virtual TQByteArray toWire(); //! Set the SNAC service diff --git a/kopete/protocols/oscar/liboscar/typingnotifytask.cpp b/kopete/protocols/oscar/liboscar/typingnotifytask.cpp index 76503116..f3c34f96 100644 --- a/kopete/protocols/oscar/liboscar/typingnotifytask.cpp +++ b/kopete/protocols/oscar/liboscar/typingnotifytask.cpp @@ -16,7 +16,7 @@ #include "typingnotifytask.h" -#include +#include #include #include "transfer.h" #include "buffer.h" @@ -79,7 +79,7 @@ void TypingNotifyTask::onGo() Transfer* t = createTransfer( f, s, b ); send( t ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } void TypingNotifyTask::handleNotification() @@ -90,7 +90,7 @@ void TypingNotifyTask::handleNotification() //I don't care about the QWORD or the channel b->skipBytes( 10 ); - QString contact( b->getBUIN() ); + TQString contact( b->getBUIN() ); Q_UINT32 word = b->getWord(); switch ( word ) @@ -112,7 +112,7 @@ void TypingNotifyTask::handleNotification() } } -void TypingNotifyTask::setParams( const QString& contact, int notifyType ) +void TypingNotifyTask::setParams( const TQString& contact, int notifyType ) { m_contact = contact; m_notificationType = notifyType; diff --git a/kopete/protocols/oscar/liboscar/typingnotifytask.h b/kopete/protocols/oscar/liboscar/typingnotifytask.h index b2c9bfef..34c5d86a 100644 --- a/kopete/protocols/oscar/liboscar/typingnotifytask.h +++ b/kopete/protocols/oscar/liboscar/typingnotifytask.h @@ -18,7 +18,7 @@ #define _TYPINGNOTIFYTASK_H_ #include "task.h" -#include +#include #include "oscartypeclasses.h" /** @@ -38,14 +38,14 @@ public: virtual bool take( Transfer* transfer ); virtual void onGo(); - void setParams( const QString & contact, int notifyType ); + void setParams( const TQString & contact, int notifyType ); signals: //! somebody started typing on the other end - void typingStarted( const QString& contact ); + void typingStarted( const TQString& contact ); //! somebody finished typing - void typingFinished( const QString& contact ); + void typingFinished( const TQString& contact ); private: @@ -54,7 +54,7 @@ private: private: WORD m_notificationType; - QString m_contact; + TQString m_contact; }; #endif diff --git a/kopete/protocols/oscar/liboscar/userdetails.cpp b/kopete/protocols/oscar/liboscar/userdetails.cpp index db7d4d1d..8a1b6c4e 100644 --- a/kopete/protocols/oscar/liboscar/userdetails.cpp +++ b/kopete/protocols/oscar/liboscar/userdetails.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include "oscarutils.h" #include "oscardebug.h" @@ -67,7 +67,7 @@ int UserDetails::warningLevel() const return m_warningLevel; } -QString UserDetails::userId() const +TQString UserDetails::userId() const { return m_userId; } @@ -92,12 +92,12 @@ DWORD UserDetails::dcPort() const return m_dcPort; } -QDateTime UserDetails::onlineSinceTime() const +TQDateTime UserDetails::onlineSinceTime() const { return m_onlineSince; } -QDateTime UserDetails::memberSinceTime() const +TQDateTime UserDetails::memberSinceTime() const { return m_memberSince; } @@ -117,12 +117,12 @@ BYTE UserDetails::iconCheckSumType() const return m_iconChecksumType; } -QByteArray UserDetails::buddyIconHash() const +TQByteArray UserDetails::buddyIconHash() const { return m_md5IconHash; } -QString UserDetails::clientName() const +TQString UserDetails::clientName() const { if ( !m_clientVersion.isEmpty() ) return i18n("Translators: client-name client-version", @@ -134,7 +134,7 @@ QString UserDetails::clientName() const void UserDetails::fill( Buffer * buffer ) { BYTE snLen = buffer->getByte(); - QString user = QString( buffer->getBlock( snLen ) ); + TQString user = TQString( buffer->getBlock( snLen ) ); if ( !user.isEmpty() ) m_userId = user; m_warningLevel = buffer->getWord(); @@ -186,7 +186,7 @@ void UserDetails::fill( Buffer * buffer ) m_extendedStatus = b.getDWord(); m_extendedStatusSpecified = true; #ifdef OSCAR_USERINFO_DEBUG - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Extended status is " << QString::number( m_extendedStatus, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Extended status is " << TQString::number( m_extendedStatus, 16 ) << endl; #endif break; case 0x000A: //external IP address @@ -270,7 +270,7 @@ void UserDetails::fill( Buffer * buffer ) case 0x0002: if ( length > 0 ) { - m_availableMessage = QString( b.getBSTR() ); + m_availableMessage = TQString( b.getBSTR() ); #ifdef OSCAR_USERINFO_DEBUG kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "available message:" << m_availableMessage << endl; #endif @@ -366,9 +366,9 @@ void UserDetails::detectClient() case 0xFFFFFFFFL: //gaim behaves like official AIM so we can't detect them, only look for miranda { if (m_dcLastExtStatusUpdateTime & 0x80000000) - m_clientName=QString::fromLatin1("Miranda alpha"); + m_clientName=TQString::fromLatin1("Miranda alpha"); else - m_clientName=QString::fromLatin1("Miranda"); + m_clientName=TQString::fromLatin1("Miranda"); DWORD version = (m_dcLastExtInfoUpdateTime & 0xFFFFFF); BYTE major1 = ((version >> 24) & 0xFF); @@ -391,25 +391,25 @@ void UserDetails::detectClient() } break; case 0xFFFFFF8FL: - m_clientName = QString::fromLatin1("StrICQ"); + m_clientName = TQString::fromLatin1("StrICQ"); break; case 0xFFFFFF42L: - m_clientName = QString::fromLatin1("mICQ"); + m_clientName = TQString::fromLatin1("mICQ"); break; case 0xFFFFFFBEL: - m_clientName = QString::fromLatin1("alicq"); + m_clientName = TQString::fromLatin1("alicq"); break; case 0xFFFFFF7FL: - m_clientName = QString::fromLatin1("&RQ"); + m_clientName = TQString::fromLatin1("&RQ"); break; case 0xFFFFFFABL: - m_clientName = QString::fromLatin1("YSM"); + m_clientName = TQString::fromLatin1("YSM"); break; case 0x3AA773EEL: if ((m_dcLastExtStatusUpdateTime == 0x3AA66380L) && (m_dcLastExtInfoUpdateTime == 0x3A877A42L)) { - m_clientName=QString::fromLatin1("libicq2000"); + m_clientName=TQString::fromLatin1("libicq2000"); } break; default: @@ -427,48 +427,48 @@ void UserDetails::detectClient() switch (m_dcProtoVersion) { case 10: - m_clientName=QString::fromLatin1("ICQ 2003b"); + m_clientName=TQString::fromLatin1("ICQ 2003b"); break; case 9: - m_clientName=QString::fromLatin1("ICQ Lite"); + m_clientName=TQString::fromLatin1("ICQ Lite"); break; case 8: - m_clientName=QString::fromLatin1("Miranda"); + m_clientName=TQString::fromLatin1("Miranda"); break; default: - m_clientName=QString::fromLatin1("ICQ2go"); + m_clientName=TQString::fromLatin1("ICQ2go"); } } else if (hasCap(CAP_BUDDYICON)) // only gaim seems to advertize this on ICQ { - m_clientName = QString::fromLatin1("Gaim"); + m_clientName = TQString::fromLatin1("Gaim"); } else if (hasCap(CAP_XTRAZ)) { - m_clientName = QString::fromLatin1("ICQ 4.0 Lite"); + m_clientName = TQString::fromLatin1("ICQ 4.0 Lite"); } else if ((hasCap(CAP_STR_2001) || hasCap(CAP_ICQSERVERRELAY)) && hasCap(CAP_IS_2001)) { - m_clientName = QString::fromLatin1( "ICQ 2001"); + m_clientName = TQString::fromLatin1( "ICQ 2001"); } else if ((hasCap(CAP_STR_2001) || hasCap(CAP_ICQSERVERRELAY)) && hasCap(CAP_STR_2002)) { - m_clientName = QString::fromLatin1("ICQ 2002"); + m_clientName = TQString::fromLatin1("ICQ 2002"); } else if (hasCap(CAP_RTFMSGS) && hasCap(CAP_UTF8) && hasCap(CAP_ICQSERVERRELAY) && hasCap(CAP_ISICQ)) { - m_clientName = QString::fromLatin1("ICQ 2003a"); + m_clientName = TQString::fromLatin1("ICQ 2003a"); } else if (hasCap(CAP_ICQSERVERRELAY) && hasCap(CAP_ISICQ)) { - m_clientName =QString::fromLatin1("ICQ 2001b"); + m_clientName =TQString::fromLatin1("ICQ 2001b"); } else if ((m_dcProtoVersion == 7) && hasCap(CAP_RTFMSGS)) { - m_clientName = QString::fromLatin1("GnomeICU"); + m_clientName = TQString::fromLatin1("GnomeICU"); } } diff --git a/kopete/protocols/oscar/liboscar/userdetails.h b/kopete/protocols/oscar/liboscar/userdetails.h index fad79172..8835f6f9 100644 --- a/kopete/protocols/oscar/liboscar/userdetails.h +++ b/kopete/protocols/oscar/liboscar/userdetails.h @@ -35,19 +35,19 @@ public: UserDetails(); ~UserDetails(); - QString userId() const; //! User ID accessor + TQString userId() const; //! User ID accessor int warningLevel() const; //! Warning level accessor WORD idleTime() const; //! Idle time accessor KNetwork::KIpAddress dcInternalIp() const; //! DC local IP accessor KNetwork::KIpAddress dcExternalIp() const; //! DC outside IP accessor DWORD dcPort() const; //! DC port number - QDateTime onlineSinceTime() const; //! Online since accessor - QDateTime memberSinceTime() const; //! Member since accessor + TQDateTime onlineSinceTime() const; //! Online since accessor + TQDateTime memberSinceTime() const; //! Member since accessor int userClass() const; //! User class accessor DWORD extendedStatus() const; //!User status accessor BYTE iconCheckSumType() const; //!Buddy icon hash type - QByteArray buddyIconHash() const; //! Buddy icon md5 hash accessor - QString clientName() const; //! Client name and version + TQByteArray buddyIconHash() const; //! Buddy icon md5 hash accessor + TQString clientName() const; //! Client name and version bool hasCap( int capNumber ) const; //! Tell if we have this capability /** @@ -78,17 +78,17 @@ private: private: - QString m_userId; /// the screename/uin of the contact + TQString m_userId; /// the screename/uin of the contact int m_warningLevel; /// the warning level of the contact int m_userClass; /// the class of the user - TLV 0x01 - QDateTime m_memberSince; /// how long the user's been a member - TLV 0x05 - QDateTime m_onlineSince; /// how long the contact's been online - TLV 0x03 + TQDateTime m_memberSince; /// how long the user's been a member - TLV 0x05 + TQDateTime m_onlineSince; /// how long the contact's been online - TLV 0x03 DWORD m_numSecondsOnline; /// how long the contact's been online in seconds WORD m_idleTime; /// the idle time of the contact - TLV 0x0F DWORD m_extendedStatus; /// the extended status of the contact - TLV 0x06 DWORD m_capabilities; //TLV 0x05 - QString m_clientVersion; /// the version of client they're using - QString m_clientName; /// the name of the client they're using + TQString m_clientVersion; /// the version of client they're using + TQString m_clientName; /// the name of the client they're using KNetwork::KIpAddress m_dcOutsideIp; /// DC Real IP Address - TLV 0x0A KNetwork::KIpAddress m_dcInsideIp; /// DC Internal IP Address - TLV 0x0C DWORD m_dcPort; /// DC Port - TLV 0x0C @@ -101,8 +101,8 @@ private: DWORD m_dcLastExtInfoUpdateTime; /// DC last exteneded info update time - TLV 0x0C DWORD m_dcLastExtStatusUpdateTime; /// DC last extended status update time - TLV 0x0C BYTE m_iconChecksumType; /// The OSCAR checksum type for the buddy icon TLV 0x1D - QByteArray m_md5IconHash; /// Buddy Icon MD5 Hash - TLV 0x1D - QString m_availableMessage; /// Message a person can have when available - TLV 0x0D + TQByteArray m_md5IconHash; /// Buddy Icon MD5 Hash - TLV 0x1D + TQString m_availableMessage; /// Message a person can have when available - TLV 0x0D bool m_userClassSpecified; bool m_memberSinceSpecified; diff --git a/kopete/protocols/oscar/liboscar/userinfotask.cpp b/kopete/protocols/oscar/liboscar/userinfotask.cpp index a204c475..66197316 100644 --- a/kopete/protocols/oscar/liboscar/userinfotask.cpp +++ b/kopete/protocols/oscar/liboscar/userinfotask.cpp @@ -75,28 +75,28 @@ bool UserInfoTask::take( Transfer * transfer ) m_sequenceInfoMap[seq] = ud; emit gotInfo( seq ); - QValueList list = b->getTLVList(); - QValueList::iterator it = list.begin(); - QString profile; - QString away; + TQValueList list = b->getTLVList(); + TQValueList::iterator it = list.begin(); + TQString profile; + TQString away; for ( ; ( *it ); ++it ) { switch( ( *it ).type ) { case 0x0001: //profile text encoding - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "text encoding is " << QString( ( *it ).data )<< endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "text encoding is " << TQString( ( *it ).data )<< endl; break; case 0x0002: //profile text - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "The profile is '" << QString( ( *it ).data ) << "'" << endl; - profile = QString( ( *it ).data ); // aim always seems to use us-ascii encoding + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "The profile is '" << TQString( ( *it ).data ) << "'" << endl; + profile = TQString( ( *it ).data ); // aim always seems to use us-ascii encoding emit receivedProfile( m_contactSequenceMap[seq], profile ); break; case 0x0003: //away message encoding - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Away message encoding is " << QString( ( *it ).data ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Away message encoding is " << TQString( ( *it ).data ) << endl; break; case 0x0004: //away message - kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Away message is '" << QString( ( *it ).data ) << "'" << endl; - away = QString( (*it ).data ); // aim always seems to use us-ascii encoding + kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Away message is '" << TQString( ( *it ).data ) << "'" << endl; + away = TQString( (*it ).data ); // aim always seems to use us-ascii encoding emit receivedAwayMessage( m_contactSequenceMap[seq], away ); break; case 0x0005: //capabilities @@ -133,7 +133,7 @@ void UserInfoTask::onGo() send( t ); } -void UserInfoTask::requestInfoFor( const QString& contact, unsigned int types ) +void UserInfoTask::requestInfoFor( const TQString& contact, unsigned int types ) { Q_UINT16 seq = client()->snacSequence(); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "setting sequence " << seq << " for contact " << contact << endl; diff --git a/kopete/protocols/oscar/liboscar/userinfotask.h b/kopete/protocols/oscar/liboscar/userinfotask.h index 063eedd7..4b973a04 100644 --- a/kopete/protocols/oscar/liboscar/userinfotask.h +++ b/kopete/protocols/oscar/liboscar/userinfotask.h @@ -20,7 +20,7 @@ #include "task.h" -#include +#include #include "userdetails.h" class Transfer; @@ -44,20 +44,20 @@ public: bool take( Transfer* transfer ); void onGo(); - void requestInfoFor( const QString& userId, unsigned int types ); + void requestInfoFor( const TQString& userId, unsigned int types ); UserDetails getInfoFor( Q_UINT16 sequence ) const; - QString contactForSequence( Q_UINT16 sequence ) const; + TQString contactForSequence( Q_UINT16 sequence ) const; signals: void gotInfo( Q_UINT16 seqNumber ); - void receivedProfile( const QString& contact, const QString& profile ); - void receivedAwayMessage( const QString& contact, const QString& message ); + void receivedProfile( const TQString& contact, const TQString& profile ); + void receivedAwayMessage( const TQString& contact, const TQString& message ); private: - QMap m_sequenceInfoMap; - QMap m_contactSequenceMap; - QMap m_typesSequenceMap; + TQMap m_sequenceInfoMap; + TQMap m_contactSequenceMap; + TQMap m_typesSequenceMap; Q_UINT16 m_seq; }; diff --git a/kopete/protocols/oscar/liboscar/usersearchtask.cpp b/kopete/protocols/oscar/liboscar/usersearchtask.cpp index 3fd31010..545706a5 100644 --- a/kopete/protocols/oscar/liboscar/usersearchtask.cpp +++ b/kopete/protocols/oscar/liboscar/usersearchtask.cpp @@ -98,14 +98,14 @@ bool UserSearchTask::take( Transfer* t ) { int moreUsersCount = buffer->getLEDWord(); emit searchFinished( moreUsersCount ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); } setTransfer( 0 ); } return true; } -void UserSearchTask::searchUserByUIN( const QString& uin ) +void UserSearchTask::searchUserByUIN( const TQString& uin ) { //create a new result list m_type = UINSearch; diff --git a/kopete/protocols/oscar/liboscar/usersearchtask.h b/kopete/protocols/oscar/liboscar/usersearchtask.h index 239efe36..781a311a 100644 --- a/kopete/protocols/oscar/liboscar/usersearchtask.h +++ b/kopete/protocols/oscar/liboscar/usersearchtask.h @@ -20,7 +20,7 @@ #define USERSEARCHTASK_H #include "icqtask.h" -#include +#include #include "icquserinfo.h" /** @@ -43,7 +43,7 @@ public: virtual bool take( Transfer* t ); /** Search by UIN */ - void searchUserByUIN( const QString& uin ); + void searchUserByUIN( const TQString& uin ); void searchWhitePages( const ICQWPSearchInfo& info ); @@ -52,8 +52,8 @@ signals: void searchFinished( int ); private: - QValueList m_results; - QString m_uin; + TQValueList m_results; + TQString m_uin; Q_UINT16 m_seq; SearchType m_type; }; diff --git a/kopete/protocols/oscar/liboscar/warningtask.cpp b/kopete/protocols/oscar/liboscar/warningtask.cpp index 56051dc8..7b895b5c 100644 --- a/kopete/protocols/oscar/liboscar/warningtask.cpp +++ b/kopete/protocols/oscar/liboscar/warningtask.cpp @@ -18,7 +18,7 @@ #include "warningtask.h" -#include +#include #include #include "transfer.h" #include "connection.h" @@ -32,7 +32,7 @@ WarningTask::~WarningTask() { } -void WarningTask::setContact( const QString& contact ) +void WarningTask::setContact( const TQString& contact ) { m_contact = contact; } @@ -65,13 +65,13 @@ bool WarningTask::take( Transfer* transfer ) kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Warning level increased " << m_increase << " to " << m_newLevel << endl; emit userWarned( m_contact, m_increase, m_newLevel ); - setSuccess( 0, QString::null ); + setSuccess( 0, TQString::null ); setTransfer( 0 ); return true; } else { - setError( 0, QString::null ); + setError( 0, TQString::null ); return false; } } diff --git a/kopete/protocols/oscar/liboscar/warningtask.h b/kopete/protocols/oscar/liboscar/warningtask.h index 1280fab9..af56968c 100644 --- a/kopete/protocols/oscar/liboscar/warningtask.h +++ b/kopete/protocols/oscar/liboscar/warningtask.h @@ -20,7 +20,7 @@ #define WARNINGTASK_H #include "task.h" -#include +#include #include "oscartypes.h" /** @@ -33,7 +33,7 @@ public: WarningTask( Task* parent ); ~WarningTask(); - void setContact( const QString& contact ); + void setContact( const TQString& contact ); void setAnonymous( bool anon ); WORD levelIncrease(); @@ -44,10 +44,10 @@ public: virtual void onGo(); signals: - void userWarned( const QString&, Q_UINT16, Q_UINT16 ); + void userWarned( const TQString&, Q_UINT16, Q_UINT16 ); private: - QString m_contact; + TQString m_contact; bool m_sendAnon; WORD m_sequence; WORD m_increase; diff --git a/kopete/protocols/oscar/oscaraccount.cpp b/kopete/protocols/oscar/oscaraccount.cpp index 353e3201..2a9b4e82 100644 --- a/kopete/protocols/oscar/oscaraccount.cpp +++ b/kopete/protocols/oscar/oscaraccount.cpp @@ -32,14 +32,14 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -72,29 +72,29 @@ public: Q_UINT32 ssiLastModTime; //contacts waiting on SSI add ack and their metacontact - QMap addContactMap; + TQMap addContactMap; //contacts waiting on their group to be added - QMap contactAddQueue; - QMap contactChangeQueue; + TQMap contactAddQueue; + TQMap contactChangeQueue; OscarListNonServerContacts* olnscDialog; unsigned int versionUpdaterStamp; bool versionAlreadyUpdated; - virtual QTextCodec* codecForContact( const QString& contactName ) const + virtual TQTextCodec* codecForContact( const TQString& contactName ) const { return account.contactCodec( Oscar::normalize( contactName ) ); } - virtual QTextCodec* codecForAccount() const + virtual TQTextCodec* codecForAccount() const { return account.defaultCodec(); } }; -OscarAccount::OscarAccount(Kopete::Protocol *parent, const QString &accountID, const char *name, bool isICQ) +OscarAccount::OscarAccount(Kopete::Protocol *parent, const TQString &accountID, const char *name, bool isICQ) : Kopete::PasswordedAccount( parent, accountID, isICQ ? 8 : 16, name ) { kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << " accountID='" << accountID << @@ -113,19 +113,19 @@ OscarAccount::OscarAccount(Kopete::Protocol *parent, const QString &accountID, c d->engine->setCodecProvider( d ); d->olnscDialog = 0L; - QObject::connect( d->engine, SIGNAL( loggedIn() ), this, SLOT( loginActions() ) ); - QObject::connect( d->engine, SIGNAL( messageReceived( const Oscar::Message& ) ), - this, SLOT( messageReceived(const Oscar::Message& ) ) ); - QObject::connect( d->engine, SIGNAL( socketError( int, const QString& ) ), - this, SLOT( slotSocketError( int, const QString& ) ) ); - QObject::connect( d->engine, SIGNAL( taskError( const Oscar::SNAC&, int, bool ) ), - this, SLOT( slotTaskError( const Oscar::SNAC&, int, bool ) ) ); - QObject::connect( d->engine, SIGNAL( userStartedTyping( const QString& ) ), - this, SLOT( userStartedTyping( const QString& ) ) ); - QObject::connect( d->engine, SIGNAL( userStoppedTyping( const QString& ) ), - this, SLOT( userStoppedTyping( const QString& ) ) ); - QObject::connect( d->engine, SIGNAL( iconNeedsUploading() ), - this, SLOT( slotSendBuddyIcon() ) ); + TQObject::connect( d->engine, TQT_SIGNAL( loggedIn() ), this, TQT_SLOT( loginActions() ) ); + TQObject::connect( d->engine, TQT_SIGNAL( messageReceived( const Oscar::Message& ) ), + this, TQT_SLOT( messageReceived(const Oscar::Message& ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( socketError( int, const TQString& ) ), + this, TQT_SLOT( slotSocketError( int, const TQString& ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( taskError( const Oscar::SNAC&, int, bool ) ), + this, TQT_SLOT( slotTaskError( const Oscar::SNAC&, int, bool ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( userStartedTyping( const TQString& ) ), + this, TQT_SLOT( userStartedTyping( const TQString& ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( userStoppedTyping( const TQString& ) ), + this, TQT_SLOT( userStoppedTyping( const TQString& ) ) ); + TQObject::connect( d->engine, TQT_SIGNAL( iconNeedsUploading() ), + this, TQT_SLOT( slotSendBuddyIcon() ) ); } OscarAccount::~OscarAccount() @@ -144,18 +144,18 @@ void OscarAccount::logOff( Kopete::Account::DisconnectReason reason ) kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "accountId='" << accountId() << "'" << endl; //disconnect the signals Kopete::ContactList* kcl = Kopete::ContactList::self(); - QObject::disconnect( kcl, SIGNAL( groupRenamed( Kopete::Group*, const QString& ) ), - this, SLOT( kopeteGroupRenamed( Kopete::Group*, const QString& ) ) ); - QObject::disconnect( kcl, SIGNAL( groupRemoved( Kopete::Group* ) ), - this, SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); - QObject::disconnect( d->engine->ssiManager(), SIGNAL( contactAdded( const Oscar::SSI& ) ), - this, SLOT( ssiContactAdded( const Oscar::SSI& ) ) ); - QObject::disconnect( d->engine->ssiManager(), SIGNAL( groupAdded( const Oscar::SSI& ) ), - this, SLOT( ssiGroupAdded( const Oscar::SSI& ) ) ); - QObject::disconnect( d->engine->ssiManager(), SIGNAL( groupUpdated( const Oscar::SSI& ) ), - this, SLOT( ssiGroupUpdated( const Oscar::SSI& ) ) ); - QObject::disconnect( d->engine->ssiManager(), SIGNAL( contactUpdated( const Oscar::SSI& ) ), - this, SLOT( ssiContactUpdated( const Oscar::SSI& ) ) ); + TQObject::disconnect( kcl, TQT_SIGNAL( groupRenamed( Kopete::Group*, const TQString& ) ), + this, TQT_SLOT( kopeteGroupRenamed( Kopete::Group*, const TQString& ) ) ); + TQObject::disconnect( kcl, TQT_SIGNAL( groupRemoved( Kopete::Group* ) ), + this, TQT_SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); + TQObject::disconnect( d->engine->ssiManager(), TQT_SIGNAL( contactAdded( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiContactAdded( const Oscar::SSI& ) ) ); + TQObject::disconnect( d->engine->ssiManager(), TQT_SIGNAL( groupAdded( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiGroupAdded( const Oscar::SSI& ) ) ); + TQObject::disconnect( d->engine->ssiManager(), TQT_SIGNAL( groupUpdated( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiGroupUpdated( const Oscar::SSI& ) ) ); + TQObject::disconnect( d->engine->ssiManager(), TQT_SIGNAL( contactUpdated( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiContactUpdated( const Oscar::SSI& ) ) ); d->engine->close(); myself()->setOnlineStatus( Kopete::OnlineStatus::Offline ); @@ -198,19 +198,19 @@ void OscarAccount::processSSIList() { //disconnect signals so we don't attempt to add things to SSI! Kopete::ContactList* kcl = Kopete::ContactList::self(); - QObject::disconnect( kcl, SIGNAL( groupRenamed( Kopete::Group*, const QString& ) ), - this, SLOT( kopeteGroupRenamed( Kopete::Group*, const QString& ) ) ); - QObject::disconnect( kcl, SIGNAL( groupRemoved( Kopete::Group* ) ), - this, SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); + TQObject::disconnect( kcl, TQT_SIGNAL( groupRenamed( Kopete::Group*, const TQString& ) ), + this, TQT_SLOT( kopeteGroupRenamed( Kopete::Group*, const TQString& ) ) ); + TQObject::disconnect( kcl, TQT_SIGNAL( groupRemoved( Kopete::Group* ) ), + this, TQT_SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; SSIManager* listManager = d->engine->ssiManager(); //first add groups - QValueList groupList = listManager->groupList(); - QValueList::const_iterator git = groupList.constBegin(); - QValueList::const_iterator listEnd = groupList.constEnd(); + TQValueList groupList = listManager->groupList(); + TQValueList::const_iterator git = groupList.constBegin(); + TQValueList::const_iterator listEnd = groupList.constEnd(); //the protocol dictates that there is at least one group that has contacts //so i don't have to check for an empty group list @@ -223,9 +223,9 @@ void OscarAccount::processSSIList() } //then add contacts - QValueList contactList = listManager->contactList(); - QValueList::const_iterator bit = contactList.constBegin(); - QValueList::const_iterator blistEnd = contactList.constEnd(); + TQValueList contactList = listManager->contactList(); + TQValueList::const_iterator bit = contactList.constBegin(); + TQValueList::const_iterator blistEnd = contactList.constEnd(); kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Adding " << contactList.count() << " contacts to contact list" << endl; for ( ; bit != blistEnd; ++bit ) { @@ -245,26 +245,26 @@ void OscarAccount::processSSIList() oc->setSSIItem( item ); } else - addContact( ( *bit ).name(), QString::null, group, Kopete::Account::DontChangeKABC ); + addContact( ( *bit ).name(), TQString::null, group, Kopete::Account::DontChangeKABC ); } - QObject::connect( kcl, SIGNAL( groupRenamed( Kopete::Group*, const QString& ) ), - this, SLOT( kopeteGroupRenamed( Kopete::Group*, const QString& ) ) ); - QObject::connect( kcl, SIGNAL( groupRemoved( Kopete::Group* ) ), - this, SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); - QObject::connect( listManager, SIGNAL( contactAdded( const Oscar::SSI& ) ), - this, SLOT( ssiContactAdded( const Oscar::SSI& ) ) ); - QObject::connect( listManager, SIGNAL( groupAdded( const Oscar::SSI& ) ), - this, SLOT( ssiGroupAdded( const Oscar::SSI& ) ) ); - QObject::connect( listManager, SIGNAL( groupUpdated( const Oscar::SSI& ) ), - this, SLOT( ssiGroupUpdated( const Oscar::SSI& ) ) ); - QObject::connect( listManager, SIGNAL( contactUpdated( const Oscar::SSI& ) ), - this, SLOT( ssiContactUpdated( const Oscar::SSI& ) ) ); + TQObject::connect( kcl, TQT_SIGNAL( groupRenamed( Kopete::Group*, const TQString& ) ), + this, TQT_SLOT( kopeteGroupRenamed( Kopete::Group*, const TQString& ) ) ); + TQObject::connect( kcl, TQT_SIGNAL( groupRemoved( Kopete::Group* ) ), + this, TQT_SLOT( kopeteGroupRemoved( Kopete::Group* ) ) ); + TQObject::connect( listManager, TQT_SIGNAL( contactAdded( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiContactAdded( const Oscar::SSI& ) ) ); + TQObject::connect( listManager, TQT_SIGNAL( groupAdded( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiGroupAdded( const Oscar::SSI& ) ) ); + TQObject::connect( listManager, TQT_SIGNAL( groupUpdated( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiGroupUpdated( const Oscar::SSI& ) ) ); + TQObject::connect( listManager, TQT_SIGNAL( contactUpdated( const Oscar::SSI& ) ), + this, TQT_SLOT( ssiContactUpdated( const Oscar::SSI& ) ) ); //TODO: check the kopete contact list and handle non server side contacts appropriately. - QDict nonServerContacts = contacts(); - QDictIterator it( nonServerContacts ); - QStringList nonServerContactList; + TQDict nonServerContacts = contacts(); + TQDictIterator it( nonServerContacts ); + TQStringList nonServerContactList; for ( ; it.current(); ++it ) { OscarContact* oc = dynamic_cast( ( *it ) ); @@ -276,12 +276,12 @@ void OscarAccount::processSSIList() } kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "the following contacts are not on the server side list" << nonServerContactList << endl; - bool showMissingContactsDialog = configGroup()->readBoolEntry(QString::fromLatin1("ShowMissingContactsDialog"), true); + bool showMissingContactsDialog = configGroup()->readBoolEntry(TQString::fromLatin1("ShowMissingContactsDialog"), true); if ( !nonServerContactList.isEmpty() && showMissingContactsDialog ) { d->olnscDialog = new OscarListNonServerContacts( Kopete::UI::Global::mainWidget() ); - QObject::connect( d->olnscDialog, SIGNAL( closing() ), - this, SLOT( nonServerAddContactDialogClosed() ) ); + TQObject::connect( d->olnscDialog, TQT_SIGNAL( closing() ), + this, TQT_SLOT( nonServerAddContactDialogClosed() ) ); d->olnscDialog->addContacts( nonServerContactList ); d->olnscDialog->show(); } @@ -292,15 +292,15 @@ void OscarAccount::nonServerAddContactDialogClosed() if ( !d->olnscDialog ) return; - if ( d->olnscDialog->result() == QDialog::Accepted ) + if ( d->olnscDialog->result() == TQDialog::Accepted ) { //start adding contacts kdDebug(OSCAR_GEN_DEBUG) << "adding non server contacts to the contact list" << endl; //get the contact list. get the OscarContact object, then the group //check if the group is on ssi, if not, add it //if so, add the contact. - QStringList offliners = d->olnscDialog->nonServerContactList(); - QStringList::iterator it, itEnd = offliners.end(); + TQStringList offliners = d->olnscDialog->nonServerContactList(); + TQStringList::iterator it, itEnd = offliners.end(); for ( it = offliners.begin(); it != itEnd; ++it ) { OscarContact* oc = dynamic_cast( contacts()[( *it )] ); @@ -334,7 +334,7 @@ void OscarAccount::nonServerAddContactDialogClosed() } bool showOnce = d->olnscDialog->onlyShowOnce(); - configGroup()->writeEntry( QString::fromLatin1("ShowMissingContactsDialog") , !showOnce); + configGroup()->writeEntry( TQString::fromLatin1("ShowMissingContactsDialog") , !showOnce); configGroup()->sync(); d->olnscDialog->delayedDestruct(); @@ -363,7 +363,7 @@ void OscarAccount::kopeteGroupAdded( Kopete::Group* group ) d->engine->addGroup( group->displayName() ); } -void OscarAccount::kopeteGroupRenamed( Kopete::Group* group, const QString& oldName ) +void OscarAccount::kopeteGroupRenamed( Kopete::Group* group, const TQString& oldName ) { if ( isConnected() ) d->engine->renameGroup( oldName, group->displayName() ); @@ -385,11 +385,11 @@ void OscarAccount::messageReceived( const Oscar::Message& message ) * Get the sanitized message back * Append to the chat window */ - QString sender = Oscar::normalize( message.sender() ); + TQString sender = Oscar::normalize( message.sender() ); if ( !contacts()[sender] ) { kdDebug(OSCAR_RAW_DEBUG) << "Adding '" << sender << "' as temporary contact" << endl; - addContact( sender, QString::null, 0, Kopete::Account::Temporary ); + addContact( sender, TQString::null, 0, Kopete::Account::Temporary ); } OscarContact* ocSender = static_cast ( contacts()[sender] ); //should exist now @@ -413,10 +413,10 @@ void OscarAccount::messageReceived( const Oscar::Message& message ) //decode message - QString realText( message.text( contactCodec( ocSender ) ) ); + TQString realText( message.text( contactCodec( ocSender ) ) ); //sanitize; - QString sanitizedMsg = sanitizedMessage( realText ); + TQString sanitizedMsg = sanitizedMessage( realText ); Kopete::ContactPtrList me; me.append( myself() ); @@ -427,25 +427,25 @@ void OscarAccount::messageReceived( const Oscar::Message& message ) } -void OscarAccount::setServerAddress(const QString &server) +void OscarAccount::setServerAddress(const TQString &server) { - configGroup()->writeEntry( QString::fromLatin1( "Server" ), server ); + configGroup()->writeEntry( TQString::fromLatin1( "Server" ), server ); } void OscarAccount::setServerPort(int port) { if ( port > 0 ) - configGroup()->writeEntry( QString::fromLatin1( "Port" ), port ); + configGroup()->writeEntry( TQString::fromLatin1( "Port" ), port ); else //set to default 5190 - configGroup()->writeEntry( QString::fromLatin1( "Port" ), 5190 ); + configGroup()->writeEntry( TQString::fromLatin1( "Port" ), 5190 ); } -QTextCodec* OscarAccount::defaultCodec() const +TQTextCodec* OscarAccount::defaultCodec() const { - return QTextCodec::codecForMib( configGroup()->readNumEntry( "DefaultEncoding", 4 ) ); + return TQTextCodec::codecForMib( configGroup()->readNumEntry( "DefaultEncoding", 4 ) ); } -QTextCodec* OscarAccount::contactCodec( const OscarContact* contact ) const +TQTextCodec* OscarAccount::contactCodec( const OscarContact* contact ) const { if ( contact ) return contact->contactCodec(); @@ -453,7 +453,7 @@ QTextCodec* OscarAccount::contactCodec( const OscarContact* contact ) const return defaultCodec(); } -QTextCodec* OscarAccount::contactCodec( const QString& contactName ) const +TQTextCodec* OscarAccount::contactCodec( const TQString& contactName ) const { // XXX Need const_cast because Kopete::Account::contacts() // XXX method is not const for some strange reason. @@ -469,20 +469,20 @@ void OscarAccount::setBuddyIcon( KURL url ) } else { - QImage image( url.path() ); + TQImage image( url.path() ); if ( image.isNull() ) return; - const QSize size = ( d->engine->isIcq() ) ? QSize( 52, 64 ) : QSize( 48, 48 ); + const TQSize size = ( d->engine->isIcq() ) ? TQSize( 52, 64 ) : TQSize( 48, 48 ); - image = image.smoothScale( size, QImage::ScaleMax ); + image = image.smoothScale( size, TQImage::ScaleMax ); if( image.width() > size.width()) image = image.copy( ( image.width() - size.width() ) / 2, 0, size.width(), image.height() ); if( image.height() > size.height()) image = image.copy( 0, ( image.height() - size.height() ) / 2, image.width(), size.height() ); - QString newlocation( locateLocal( "appdata", "oscarpictures/"+ accountId() + ".jpg" ) ); + TQString newlocation( locateLocal( "appdata", "oscarpictures/"+ accountId() + ".jpg" ) ); kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << "Saving buddy icon: " << newlocation << endl; if ( !image.save( newlocation, "JPEG" ) ) @@ -494,7 +494,7 @@ void OscarAccount::setBuddyIcon( KURL url ) emit buddyIconChanged(); } -bool OscarAccount::addContactToSSI( const QString& contactName, const QString& groupName, bool autoAddGroup ) +bool OscarAccount::addContactToSSI( const TQString& contactName, const TQString& groupName, bool autoAddGroup ) { SSIManager* listManager = d->engine->ssiManager(); if ( !listManager->findGroup( groupName ) ) @@ -516,7 +516,7 @@ bool OscarAccount::addContactToSSI( const QString& contactName, const QString& g return true; } -bool OscarAccount::changeContactGroupInSSI( const QString& contact, const QString& newGroupName, bool autoAddGroup ) +bool OscarAccount::changeContactGroupInSSI( const TQString& contact, const TQString& newGroupName, bool autoAddGroup ) { SSIManager* listManager = d->engine->ssiManager(); if ( !listManager->findGroup( newGroupName ) ) @@ -538,7 +538,7 @@ bool OscarAccount::changeContactGroupInSSI( const QString& contact, const QStrin return true; } -Connection* OscarAccount::setupConnection( const QString& server, uint port ) +Connection* OscarAccount::setupConnection( const TQString& server, uint port ) { //set up the connector KNetworkConnector* knc = new KNetworkConnector( 0 ); @@ -554,7 +554,7 @@ Connection* OscarAccount::setupConnection( const QString& server, uint port ) } -bool OscarAccount::createContact(const QString &contactId, +bool OscarAccount::createContact(const TQString &contactId, Kopete::MetaContact *parentContact) { /* We're not even online or connecting @@ -576,7 +576,7 @@ bool OscarAccount::createContact(const QString &contactId, 2.c. create kopete contact */ - QValueList dummyList; + TQValueList dummyList; if ( parentContact->isTemporary() ) { SSI tempItem( contactId, 0, 0, 0xFFFF, dummyList, 0 ); @@ -607,7 +607,7 @@ bool OscarAccount::createContact(const QString &contactId, kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Adding " << contactId << " to server side list" << endl; - QString groupName; + TQString groupName; Kopete::GroupList kopeteGroups = parentContact->groups(); //get the group list if ( kopeteGroups.isEmpty() || kopeteGroups.first() == Kopete::Group::topLevel() ) @@ -618,7 +618,7 @@ bool OscarAccount::createContact(const QString &contactId, else { //apparently kopeteGroups.first() can be invalid. Attempt to prevent - //crashes in SSIData::findGroup(const QString& name) + //crashes in SSIData::findGroup(const TQString& name) groupName = kopeteGroups.first() ? kopeteGroups.first()->displayName() : i18n("Buddies"); kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Contact with group." << " No. of groups = " << kopeteGroups.count() << @@ -665,7 +665,7 @@ void OscarAccount::ssiGroupAdded( const Oscar::SSI& item ) //check the contact add queue for any contacts matching the //group name we just added kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Looking for contacts to be added in group " << item.name() << endl; - QMap::iterator it; + TQMap::iterator it; for ( it = d->contactAddQueue.begin(); it != d->contactAddQueue.end(); ++it ) { if ( Oscar::normalize( it.data() ) == Oscar::normalize( item.name() ) ) @@ -704,7 +704,7 @@ void OscarAccount::ssiContactUpdated( const Oscar::SSI& item ) } } -void OscarAccount::userStartedTyping( const QString & contact ) +void OscarAccount::userStartedTyping( const TQString & contact ) { Kopete::Contact * ct = contacts()[ Oscar::normalize( contact ) ]; if ( ct && contact != accountId() ) @@ -714,7 +714,7 @@ void OscarAccount::userStartedTyping( const QString & contact ) } } -void OscarAccount::userStoppedTyping( const QString & contact ) +void OscarAccount::userStoppedTyping( const TQString & contact ) { Kopete::Contact * ct = contacts()[ Oscar::normalize( contact ) ]; if ( ct && contact != accountId() ) @@ -724,7 +724,7 @@ void OscarAccount::userStoppedTyping( const QString & contact ) } } -void OscarAccount::slotSocketError( int errCode, const QString& errString ) +void OscarAccount::slotSocketError( int errCode, const TQString& errString ) { Q_UNUSED( errCode ); KPassivePopup::message( i18n( "account has been disconnected", "%1 disconnected" ).arg( accountId() ), @@ -740,7 +740,7 @@ void OscarAccount::slotTaskError( const Oscar::SNAC& s, int code, bool fatal ) kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "service: " << s.family << " subtype: " << s.subtype << " code: " << code << endl; - QString message; + TQString message; if ( s.family == 0 && s.subtype == 0 ) { message = getFLAPErrorMessage( code ); @@ -781,34 +781,34 @@ void OscarAccount::slotTaskError( const Oscar::SNAC& s, int code, bool fatal ) void OscarAccount::slotSendBuddyIcon() { //need to disconnect because we could end up with many connections - QObject::disconnect( engine(), SIGNAL( iconServerConnected() ), this, SLOT( slotSendBuddyIcon() ) ); - QString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); + TQObject::disconnect( engine(), TQT_SIGNAL( iconServerConnected() ), this, TQT_SLOT( slotSendBuddyIcon() ) ); + TQString photoPath = myself()->property( Kopete::Global::Properties::self()->photo() ).value().toString(); if ( photoPath.isEmpty() ) return; kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << photoPath << endl; - QFile iconFile( photoPath ); + TQFile iconFile( photoPath ); if ( iconFile.open( IO_ReadOnly ) ) { if ( !engine()->hasIconConnection() ) { //will send icon when we connect to icon server - QObject::connect( engine(), SIGNAL( iconServerConnected() ), - this, SLOT( slotSendBuddyIcon() ) ); + TQObject::connect( engine(), TQT_SIGNAL( iconServerConnected() ), + this, TQT_SLOT( slotSendBuddyIcon() ) ); return; } - QByteArray imageData = iconFile.readAll(); + TQByteArray imageData = iconFile.readAll(); engine()->sendBuddyIcon( imageData ); } } -QString OscarAccount::getFLAPErrorMessage( int code ) +TQString OscarAccount::getFLAPErrorMessage( int code ) { bool isICQ = d->engine->isIcq(); - QString acctType = isICQ ? i18n("ICQ") : i18n("AIM"); - QString acctDescription = isICQ ? i18n("ICQ user id", "UIN") : i18n("AIM user id", "screen name"); - QString reason; + TQString acctType = isICQ ? i18n("ICQ") : i18n("AIM"); + TQString acctDescription = isICQ ? i18n("ICQ user id", "UIN") : i18n("AIM user id", "screen name"); + TQString reason; //FLAP errors are always fatal //negative codes are things added by liboscar developers //to indicate generic errors in the task diff --git a/kopete/protocols/oscar/oscaraccount.h b/kopete/protocols/oscar/oscaraccount.h index aa8e806d..d135df3a 100644 --- a/kopete/protocols/oscar/oscaraccount.h +++ b/kopete/protocols/oscar/oscaraccount.h @@ -18,9 +18,9 @@ #ifndef OSCARACCOUNT_H #define OSCARACCOUNT_H -#include -#include -#include +#include +#include +#include #include "kopetepasswordedaccount.h" #include "oscartypeclasses.h" @@ -44,7 +44,7 @@ class KDE_EXPORT OscarAccount : public Kopete::PasswordedAccount Q_OBJECT public: - OscarAccount(Kopete::Protocol *parent, const QString &accountID, const char *name=0L, bool isICQ=false); + OscarAccount(Kopete::Protocol *parent, const TQString &accountID, const char *name=0L, bool isICQ=false); virtual ~OscarAccount(); /** Provide the derived accounts and contacts with access to the backend */ @@ -67,7 +67,7 @@ public: /** * Sets the account away */ - virtual void setAway( bool away, const QString &awayMessage = QString::null ) = 0; + virtual void setAway( bool away, const TQString &awayMessage = TQString::null ) = 0; /** * Accessor method for the action menu @@ -75,25 +75,25 @@ public: virtual KActionMenu* actionMenu() = 0; /** Set the server address */ - void setServerAddress( const QString& server ); + void setServerAddress( const TQString& server ); /** Set the server port */ void setServerPort( int port ); /** Returns codec for account's default encoding */ - QTextCodec* defaultCodec() const; + TQTextCodec* defaultCodec() const; /** * Returns codec for given contact's encoding or default one * if contact has no encoding */ - QTextCodec* contactCodec( const OscarContact* contact ) const; + TQTextCodec* contactCodec( const OscarContact* contact ) const; /** * Returns codec for given contact's encoding or default one * if contact has no encoding */ - QTextCodec* contactCodec( const QString& contactName ) const; + TQTextCodec* contactCodec( const TQString& contactName ) const; /** * Sets buddy icon @@ -107,7 +107,7 @@ public: * \param autoAddGroup if the group doesn't exist add that group * \return true if the contact will be added */ - bool addContactToSSI( const QString& contactName, const QString& groupName, bool autoAddGroup ); + bool addContactToSSI( const TQString& contactName, const TQString& groupName, bool autoAddGroup ); /** * Change a contact's group on the server @@ -116,7 +116,7 @@ public: * \param autoAddGroup if the new group doesn't exist add that group * \return true if the contact will be added */ - bool changeContactGroupInSSI( const QString& contact, const QString& newGroupName, bool autoAddGroup ); + bool changeContactGroupInSSI( const TQString& contact, const TQString& newGroupName, bool autoAddGroup ); public slots: void slotGoOffline(); @@ -127,12 +127,12 @@ protected: /** * Setup a connection for a derived account based on the host and port */ - Connection* setupConnection( const QString& server, uint port ); + Connection* setupConnection( const TQString& server, uint port ); /** * Adds a contact to a meta contact */ - virtual bool createContact(const QString &contactId, + virtual bool createContact(const TQString &contactId, Kopete::MetaContact *parentContact ); /** @@ -142,9 +142,9 @@ protected: * @param parentContact the parent metacontact * @return whether the creation succeeded or not */ - virtual OscarContact *createNewContact( const QString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) = 0; + virtual OscarContact *createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem ) = 0; - virtual QString sanitizedMessage( const QString& message ) = 0; + virtual TQString sanitizedMessage( const TQString& message ) = 0; void updateVersionUpdaterStamp(); @@ -157,7 +157,7 @@ protected slots: void kopeteGroupRemoved( Kopete::Group* g ); void kopeteGroupAdded( Kopete::Group* g ); - void kopeteGroupRenamed( Kopete::Group* g, const QString& oldName ); + void kopeteGroupRenamed( Kopete::Group* g, const TQString& oldName ); virtual void messageReceived( const Oscar::Message& message ); @@ -169,8 +169,8 @@ protected slots: void ssiContactRemoved( const Oscar::SSI& ) {} /* slots for receiving typing notifications, and notify the appropriate OscarContact */ - void userStartedTyping( const QString & contact ); - void userStoppedTyping( const QString & contact ); + void userStartedTyping( const TQString & contact ); + void userStoppedTyping( const TQString & contact ); void nonServerAddContactDialogClosed(); @@ -181,11 +181,11 @@ signals: void buddyIconChanged(); private: - QString getFLAPErrorMessage( int code ); + TQString getFLAPErrorMessage( int code ); private slots: /** Handler from socket errors from a connection */ - void slotSocketError( int, const QString& ); + void slotSocketError( int, const TQString& ); /** Handle task errors from the client */ void slotTaskError( const Oscar::SNAC& s, int errCode, bool fatal ) ; diff --git a/kopete/protocols/oscar/oscarcontact.cpp b/kopete/protocols/oscar/oscarcontact.cpp index 660a82e6..cb9f06c6 100644 --- a/kopete/protocols/oscar/oscarcontact.cpp +++ b/kopete/protocols/oscar/oscarcontact.cpp @@ -18,8 +18,8 @@ #include -#include -#include +#include +#include #include #include @@ -43,30 +43,30 @@ #include -OscarContact::OscarContact( Kopete::Account* account, const QString& name, - Kopete::MetaContact* parent, const QString& icon, const SSI& ssiItem ) +OscarContact::OscarContact( Kopete::Account* account, const TQString& name, + Kopete::MetaContact* parent, const TQString& icon, const SSI& ssiItem ) : Kopete::Contact( account, name, parent, icon ) { mAccount = static_cast(account); mName = name; mMsgManager = 0L; m_ssiItem = ssiItem; - connect( this, SIGNAL( updatedSSI() ), this, SLOT( updateSSIItem() ) ); + connect( this, TQT_SIGNAL( updatedSSI() ), this, TQT_SLOT( updateSSIItem() ) ); } OscarContact::~OscarContact() { } -void OscarContact::serialize(QMap &serializedData, - QMap &/*addressBookData*/) +void OscarContact::serialize(TQMap &serializedData, + TQMap &/*addressBookData*/) { serializedData["ssi_name"] = m_ssiItem.name(); - serializedData["ssi_type"] = QString::number( m_ssiItem.type() ); - serializedData["ssi_gid"] = QString::number( m_ssiItem.gid() ); - serializedData["ssi_bid"] = QString::number( m_ssiItem.bid() ); + serializedData["ssi_type"] = TQString::number( m_ssiItem.type() ); + serializedData["ssi_gid"] = TQString::number( m_ssiItem.gid() ); + serializedData["ssi_bid"] = TQString::number( m_ssiItem.bid() ); serializedData["ssi_alias"] = m_ssiItem.alias(); - serializedData["ssi_waitingAuth"] = m_ssiItem.waitingAuth() ? QString::fromLatin1( "true" ) : QString::fromLatin1( "false" ); + serializedData["ssi_waitingAuth"] = m_ssiItem.waitingAuth() ? TQString::fromLatin1( "true" ) : TQString::fromLatin1( "false" ); } bool OscarContact::isOnServer() const @@ -99,21 +99,21 @@ Kopete::ChatSession* OscarContact::manager( CanCreateFlags canCreate ) /*kdDebug(14190) << k_funcinfo << "Creating new ChatSession for contact '" << displayName() << "'" << endl;*/ - QPtrList theContact; + TQPtrList theContact; theContact.append(this); mMsgManager = Kopete::ChatSessionManager::self()->create(account()->myself(), theContact, protocol()); // This is for when the user types a message and presses send - connect(mMsgManager, SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession * ) ), - this, SLOT( slotSendMsg( Kopete::Message&, Kopete::ChatSession * ) ) ); + connect(mMsgManager, TQT_SIGNAL( messageSent( Kopete::Message&, Kopete::ChatSession * ) ), + this, TQT_SLOT( slotSendMsg( Kopete::Message&, Kopete::ChatSession * ) ) ); // For when the message manager is destroyed - connect(mMsgManager, SIGNAL( destroyed() ), - this, SLOT( chatSessionDestroyed() ) ); + connect(mMsgManager, TQT_SIGNAL( destroyed() ), + this, TQT_SLOT( chatSessionDestroyed() ) ); - connect(mMsgManager, SIGNAL( myselfTyping( bool ) ), - this, SLOT( slotTyping( bool ) ) ); + connect(mMsgManager, TQT_SIGNAL( myselfTyping( bool ) ), + this, TQT_SLOT( slotTyping( bool ) ) ); } return mMsgManager; } @@ -160,7 +160,7 @@ void OscarContact::sync(unsigned int flags) return; } -void OscarContact::userInfoUpdated( const QString& contact, const UserDetails& details ) +void OscarContact::userInfoUpdated( const TQString& contact, const UserDetails& details ) { Q_UNUSED( contact ); setProperty( Kopete::Global::Properties::self()->onlineSince(), details.onlineSinceTime() ); @@ -168,7 +168,7 @@ void OscarContact::userInfoUpdated( const QString& contact, const UserDetails& d m_warningLevel = details.warningLevel(); m_details.merge( details ); - QStringList capList; + TQStringList capList; // Append client name and version in case we found one if ( m_details.userClass() & 0x0080 /* WIRELESS */ ) capList << i18n( "Mobile AIM Client" ); @@ -225,10 +225,10 @@ void OscarContact::slotTyping( bool typing ) account()->engine()->sendTyping( contactId(), typing ); } -QTextCodec* OscarContact::contactCodec() const +TQTextCodec* OscarContact::contactCodec() const { if ( hasProperty( "contactEncoding" ) ) - return QTextCodec::codecForMib( property( "contactEncoding" ).value().toInt() ); + return TQTextCodec::codecForMib( property( "contactEncoding" ).value().toInt() ); else return mAccount->defaultCodec(); } diff --git a/kopete/protocols/oscar/oscarcontact.h b/kopete/protocols/oscar/oscarcontact.h index 51c31dd2..659e649e 100644 --- a/kopete/protocols/oscar/oscarcontact.h +++ b/kopete/protocols/oscar/oscarcontact.h @@ -18,8 +18,8 @@ #ifndef OSCARCONTACT_H #define OSCARCONTACT_H -#include -#include +#include +#include #include "kopetecontact.h" #include "kopetemessage.h" #include "userdetails.h" @@ -62,16 +62,16 @@ class KDE_EXPORT OscarContact : public Kopete::Contact Q_OBJECT public: - OscarContact( Kopete::Account* account, const QString& name, - Kopete::MetaContact* parent, const QString& icon = QString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); + OscarContact( Kopete::Account* account, const TQString& name, + Kopete::MetaContact* parent, const TQString& icon = TQString::null, const Oscar::SSI& ssiItem = Oscar::SSI() ); virtual ~OscarContact(); - virtual void serialize(QMap&, QMap&); + virtual void serialize(TQMap&, TQMap&); virtual Kopete::ChatSession *manager( Kopete::Contact::CanCreateFlags canCreate = Kopete::Contact::CanCreate ); - const QString &contactName() const { return mName; }; + const TQString &contactName() const { return mName; }; OscarAccount *account() const { return mAccount; }; bool isOnServer() const; @@ -87,7 +87,7 @@ public: * Returns codec for contact's encoding or default one * if contact has no encoding */ - QTextCodec *contactCodec() const; + TQTextCodec *contactCodec() const; public slots: /** slot so that properties can be updated based on a new SSI item */ @@ -100,13 +100,13 @@ public slots: virtual void sync(unsigned int flags); /** our user info has been updated */ - virtual void userInfoUpdated( const QString& contact, const UserDetails& details ); + virtual void userInfoUpdated( const TQString& contact, const UserDetails& details ); /** a user is online */ - virtual void userOnline( const QString& ) = 0; + virtual void userOnline( const TQString& ) = 0; /** a user is offline */ - virtual void userOffline( const QString& ) = 0; + virtual void userOffline( const TQString& ) = 0; protected slots: void slotTyping( bool typing ); @@ -118,12 +118,12 @@ signals: protected: OscarAccount *mAccount; - QString mName; + TQString mName; Kopete::ChatSession *mMsgManager; UserDetails m_details; SSI m_ssiItem; int m_warningLevel; - QString m_clientFeatures; + TQString m_clientFeatures; private: void initActions(); diff --git a/kopete/protocols/oscar/oscarencodingselectiondialog.cpp b/kopete/protocols/oscar/oscarencodingselectiondialog.cpp index 72e9081a..7a1826cb 100644 --- a/kopete/protocols/oscar/oscarencodingselectiondialog.cpp +++ b/kopete/protocols/oscar/oscarencodingselectiondialog.cpp @@ -21,15 +21,15 @@ #include "oscarencodingselectiondialog.h" #include -#include +#include #include -OscarEncodingSelectionDialog::OscarEncodingSelectionDialog( QWidget* parent, int initialEncoding ) +OscarEncodingSelectionDialog::OscarEncodingSelectionDialog( TQWidget* parent, int initialEncoding ) : KDialogBase( parent, 0, false, i18n( "Select Encoding" ), Ok | Cancel ) { int initialEncodingIndex; - clearWFlags( QWidget::WDestructiveClose ); + clearWFlags( TQWidget::WDestructiveClose ); m_encodingUI = new OscarEncodingBaseUI( this ); //fill the encoding combo boxes m_encodings.insert(0, i18n("Default")); @@ -99,7 +99,7 @@ OscarEncodingSelectionDialog::OscarEncodingSelectionDialog( QWidget* parent, int int OscarEncodingSelectionDialog::selectedEncoding() const { - QString encoding = m_encodingUI->encodingCombo->currentText(); + TQString encoding = m_encodingUI->encodingCombo->currentText(); int mib = m_encodings.keys()[ m_encodings.values().findIndex(encoding) ]; if( mib == -1 ) @@ -109,12 +109,12 @@ int OscarEncodingSelectionDialog::selectedEncoding() const void OscarEncodingSelectionDialog::slotOk() { - emit closing( QDialog::Accepted ); + emit closing( TQDialog::Accepted ); } void OscarEncodingSelectionDialog::slotCancel() { - emit closing( QDialog::Rejected ); + emit closing( TQDialog::Rejected ); } #include "oscarencodingselectiondialog.moc" diff --git a/kopete/protocols/oscar/oscarencodingselectiondialog.h b/kopete/protocols/oscar/oscarencodingselectiondialog.h index f99655e4..2ab8d529 100644 --- a/kopete/protocols/oscar/oscarencodingselectiondialog.h +++ b/kopete/protocols/oscar/oscarencodingselectiondialog.h @@ -28,7 +28,7 @@ class KOPETE_EXPORT OscarEncodingSelectionDialog : public KDialogBase { Q_OBJECT public: - OscarEncodingSelectionDialog( QWidget* parent = 0, int initialEncoding = 4); + OscarEncodingSelectionDialog( TQWidget* parent = 0, int initialEncoding = 4); ~OscarEncodingSelectionDialog() {} int selectedEncoding() const; @@ -42,7 +42,7 @@ protected slots: private: OscarEncodingBaseUI* m_encodingUI; - QMap m_encodings; + TQMap m_encodings; }; #endif diff --git a/kopete/protocols/oscar/oscarlistnonservercontacts.cpp b/kopete/protocols/oscar/oscarlistnonservercontacts.cpp index 804849a4..4529f562 100644 --- a/kopete/protocols/oscar/oscarlistnonservercontacts.cpp +++ b/kopete/protocols/oscar/oscarlistnonservercontacts.cpp @@ -20,11 +20,11 @@ #include "oscarlistnonservercontacts.h" #include "oscarlistcontactsbase.h" -#include -#include +#include +#include #include -OscarListNonServerContacts::OscarListNonServerContacts(QWidget* parent) +OscarListNonServerContacts::OscarListNonServerContacts(TQWidget* parent) : KDialogBase( parent, 0, false, i18n( "Add Contacts to Server List" ), Ok | Cancel ) { @@ -39,13 +39,13 @@ OscarListNonServerContacts::~OscarListNonServerContacts() } -void OscarListNonServerContacts::addContacts( const QStringList& contactList ) +void OscarListNonServerContacts::addContacts( const TQStringList& contactList ) { m_nonServerContacts = contactList; m_contactsList->notServerContacts->insertStringList( contactList ); } -QStringList OscarListNonServerContacts::nonServerContactList() const +TQStringList OscarListNonServerContacts::nonServerContactList() const { return m_nonServerContacts; } diff --git a/kopete/protocols/oscar/oscarlistnonservercontacts.h b/kopete/protocols/oscar/oscarlistnonservercontacts.h index 7f3fb4f8..e7db0848 100644 --- a/kopete/protocols/oscar/oscarlistnonservercontacts.h +++ b/kopete/protocols/oscar/oscarlistnonservercontacts.h @@ -29,11 +29,11 @@ class KOPETE_EXPORT OscarListNonServerContacts : public KDialogBase { Q_OBJECT public: - OscarListNonServerContacts( QWidget* parent ); + OscarListNonServerContacts( TQWidget* parent ); ~OscarListNonServerContacts(); - void addContacts( const QStringList& contactList ); - QStringList nonServerContactList() const; + void addContacts( const TQStringList& contactList ); + TQStringList nonServerContactList() const; bool onlyShowOnce(); @@ -46,7 +46,7 @@ signals: private: OscarListContactsBase* m_contactsList; - QStringList m_nonServerContacts; + TQStringList m_nonServerContacts; }; #endif diff --git a/kopete/protocols/oscar/oscarmyselfcontact.cpp b/kopete/protocols/oscar/oscarmyselfcontact.cpp index e234cf0f..28aeb8f2 100644 --- a/kopete/protocols/oscar/oscarmyselfcontact.cpp +++ b/kopete/protocols/oscar/oscarmyselfcontact.cpp @@ -27,7 +27,7 @@ OscarMyselfContact::OscarMyselfContact( OscarAccount* account ) : Kopete::Contact( account, account->accountId(), Kopete::ContactList::self()->myself() ) { - QObject::connect( account->engine(), SIGNAL( haveOwnInfo() ), this, SLOT( userInfoUpdated() ) ); + TQObject::connect( account->engine(), TQT_SIGNAL( haveOwnInfo() ), this, TQT_SLOT( userInfoUpdated() ) ); } OscarMyselfContact::~OscarMyselfContact() diff --git a/kopete/protocols/oscar/oscarversionupdater.cpp b/kopete/protocols/oscar/oscarversionupdater.cpp index 6e2cea09..75f38b74 100644 --- a/kopete/protocols/oscar/oscarversionupdater.cpp +++ b/kopete/protocols/oscar/oscarversionupdater.cpp @@ -16,8 +16,8 @@ #include "oscarversionupdater.h" -#include -#include +#include +#include #include #include @@ -25,7 +25,7 @@ #include -QMutex updateMutex; +TQMutex updateMutex; OscarVersionUpdater *OscarVersionUpdater::versionUpdaterStatic = 0L; OscarVersionUpdater::OscarVersionUpdater() @@ -67,14 +67,14 @@ bool OscarVersionUpdater::update( unsigned int stamp ) mVersionData.resize( 0 ); KConfigGroup config( KGlobal::config(), "Oscar" ); - QString url = config.readEntry( "NewVersionURL", "http://kopete.kde.org/oscarversions.xml" ); + TQString url = config.readEntry( "NewVersionURL", "http://kopete.kde.org/oscarversions.xml" ); mTransferJob = KIO::get ( url ); kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Download version info from server."<< endl; - connect ( mTransferJob, SIGNAL ( result ( KIO::Job* ) ), - this, SLOT ( slotTransferResult ( KIO::Job* ) ) ); - connect ( mTransferJob, SIGNAL ( data ( KIO::Job*, const QByteArray& ) ), - this, SLOT ( slotTransferData ( KIO::Job*, const QByteArray& ) ) ); + connect ( mTransferJob, TQT_SIGNAL ( result ( KIO::Job* ) ), + this, TQT_SLOT ( slotTransferResult ( KIO::Job* ) ) ); + connect ( mTransferJob, TQT_SIGNAL ( data ( KIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT ( slotTransferData ( KIO::Job*, const TQByteArray& ) ) ); } return isUpdating; } @@ -121,30 +121,30 @@ void OscarVersionUpdater::printDebug() { kdDebug(OSCAR_RAW_DEBUG) << "*************** AIM VERSION INFO ***************" << endl; kdDebug(OSCAR_RAW_DEBUG) << "client string: " << mAIMVersion.clientString << endl; - kdDebug(OSCAR_RAW_DEBUG) << "client id: " << QString::number( mAIMVersion.clientId, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "major: " << QString::number( mAIMVersion.major, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "minor: " << QString::number( mAIMVersion.minor, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "point: " << QString::number( mAIMVersion.point, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "build: " << QString::number( mAIMVersion.build, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "other: " << QString::number( mAIMVersion.other, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "client id: " << TQString::number( mAIMVersion.clientId, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "major: " << TQString::number( mAIMVersion.major, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "minor: " << TQString::number( mAIMVersion.minor, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "point: " << TQString::number( mAIMVersion.point, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "build: " << TQString::number( mAIMVersion.build, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "other: " << TQString::number( mAIMVersion.other, 16 ) << endl; kdDebug(OSCAR_RAW_DEBUG) << "country: " << mAIMVersion.country << endl; kdDebug(OSCAR_RAW_DEBUG) << "lang: " << mAIMVersion.lang << endl; kdDebug(OSCAR_RAW_DEBUG) << "************************************************" << endl; kdDebug(OSCAR_RAW_DEBUG) << "*************** ICQ VERSION INFO ***************" << endl; kdDebug(OSCAR_RAW_DEBUG) << "client string: " << mICQVersion.clientString << endl; - kdDebug(OSCAR_RAW_DEBUG) << "client id: " << QString::number( mICQVersion.clientId, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "major: " << QString::number( mICQVersion.major, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "minor: " << QString::number( mICQVersion.minor, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "point: " << QString::number( mICQVersion.point, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "build: " << QString::number( mICQVersion.build, 16 ) << endl; - kdDebug(OSCAR_RAW_DEBUG) << "other: " << QString::number( mICQVersion.other, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "client id: " << TQString::number( mICQVersion.clientId, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "major: " << TQString::number( mICQVersion.major, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "minor: " << TQString::number( mICQVersion.minor, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "point: " << TQString::number( mICQVersion.point, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "build: " << TQString::number( mICQVersion.build, 16 ) << endl; + kdDebug(OSCAR_RAW_DEBUG) << "other: " << TQString::number( mICQVersion.other, 16 ) << endl; kdDebug(OSCAR_RAW_DEBUG) << "country: " << mICQVersion.country << endl; kdDebug(OSCAR_RAW_DEBUG) << "lang: " << mICQVersion.lang << endl; kdDebug(OSCAR_RAW_DEBUG) << "************************************************" << endl; } -void OscarVersionUpdater::slotTransferData ( KIO::Job */*job*/, const QByteArray &data ) +void OscarVersionUpdater::slotTransferData ( KIO::Job */*job*/, const TQByteArray &data ) { unsigned oldSize = mVersionData.size(); mVersionData.resize ( oldSize + data.size() ); @@ -165,7 +165,7 @@ void OscarVersionUpdater::slotTransferResult ( KIO::Job *job ) { kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Updating version info" << endl; - QDomDocument doc; + TQDomDocument doc; if ( doc.setContent ( mVersionData ) ) { Oscar::ClientVersion tmpICQ = mICQVersion; @@ -198,15 +198,15 @@ void OscarVersionUpdater::slotTransferResult ( KIO::Job *job ) updateMutex.unlock(); } -void OscarVersionUpdater::parseDocument( QDomDocument& doc ) +void OscarVersionUpdater::parseDocument( TQDomDocument& doc ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; - QDomElement root = doc.documentElement(); + TQDomElement root = doc.documentElement(); if ( root.tagName() != "oscar" ) return; - QDomElement versionElement = root.firstChild().toElement(); + TQDomElement versionElement = root.firstChild().toElement(); while( !versionElement.isNull() ) { if ( versionElement.tagName() == "icq" ) @@ -218,22 +218,22 @@ void OscarVersionUpdater::parseDocument( QDomDocument& doc ) } } -bool OscarVersionUpdater::parseVersion( Oscar::ClientVersion& version, QDomElement& element ) +bool OscarVersionUpdater::parseVersion( Oscar::ClientVersion& version, TQDomElement& element ) { kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl; // clear structure - version.clientString = QString::null; + version.clientString = TQString::null; version.clientId = 0x0000; version.major = 0x0000; version.minor = 0x0000; version.point = 0x0000; version.build = 0x0000; version.other = 0x00000000; - version.country = QString::null; - version.lang = QString::null; + version.country = TQString::null; + version.lang = TQString::null; - QDomElement versionChild = element.firstChild().toElement(); + TQDomElement versionChild = element.firstChild().toElement(); while ( !versionChild.isNull() ) { if ( versionChild.tagName() == "client" ) @@ -261,7 +261,7 @@ bool OscarVersionUpdater::parseVersion( Oscar::ClientVersion& version, QDomEleme return true; } -void OscarVersionUpdater::storeVersionInfo( const QString& group, const Oscar::ClientVersion& version ) const +void OscarVersionUpdater::storeVersionInfo( const TQString& group, const Oscar::ClientVersion& version ) const { kdDebug(OSCAR_GEN_DEBUG) << k_funcinfo << "Storing version info to group: " << group << endl; KConfigGroup config( KGlobal::config(), group ); diff --git a/kopete/protocols/oscar/oscarversionupdater.h b/kopete/protocols/oscar/oscarversionupdater.h index d6851f73..bb51cc9b 100644 --- a/kopete/protocols/oscar/oscarversionupdater.h +++ b/kopete/protocols/oscar/oscarversionupdater.h @@ -17,7 +17,7 @@ #ifndef OSCARVERSIONUPDATER_H #define OSCARVERSIONUPDATER_H -#include +#include #include @@ -84,19 +84,19 @@ public: void printDebug(); private slots: - void slotTransferData( KIO::Job *job, const QByteArray &data ); + void slotTransferData( KIO::Job *job, const TQByteArray &data ); void slotTransferResult( KIO::Job *job ); private: - void parseDocument( QDomDocument& doc ); - bool parseVersion( Oscar::ClientVersion& version, QDomElement& element ); + void parseDocument( TQDomDocument& doc ); + bool parseVersion( Oscar::ClientVersion& version, TQDomElement& element ); /** * Store version info structure to KConfigGroup * @param group is the group name. * @param version is version info structure. */ - void storeVersionInfo( const QString& group, const Oscar::ClientVersion& version ) const; + void storeVersionInfo( const TQString& group, const Oscar::ClientVersion& version ) const; /** * Compare two versions. @@ -111,7 +111,7 @@ private: Oscar::ClientVersion mAIMVersion; KIO::TransferJob *mTransferJob; - QByteArray mVersionData; + TQByteArray mVersionData; unsigned int mStamp; bool mUpdating; diff --git a/kopete/protocols/oscar/oscarvisibilitydialog.cpp b/kopete/protocols/oscar/oscarvisibilitydialog.cpp index 7958432c..77f3894a 100644 --- a/kopete/protocols/oscar/oscarvisibilitydialog.cpp +++ b/kopete/protocols/oscar/oscarvisibilitydialog.cpp @@ -16,8 +16,8 @@ #include "oscarvisibilitydialog.h" -#include -#include +#include +#include #include @@ -25,21 +25,21 @@ #include "client.h" -OscarVisibilityDialog::OscarVisibilityDialog( Client* client, QWidget* parent ) +OscarVisibilityDialog::OscarVisibilityDialog( Client* client, TQWidget* parent ) : KDialogBase( parent, 0, false, i18n( "Add Contacts to Visible or Invisible List" ), Ok | Cancel ), m_client( client ) { m_visibilityUI = new OscarVisibilityBase( this ); setMainWidget( m_visibilityUI ); - QObject::connect(m_visibilityUI->visibleAdd, SIGNAL(clicked()), - this, SLOT(slotAddToVisible())); - QObject::connect(m_visibilityUI->visibleRemove, SIGNAL(clicked()), - this, SLOT(slotRemoveFromVisible())); - QObject::connect(m_visibilityUI->invisibleAdd, SIGNAL(clicked()), - this, SLOT(slotAddToInvisible())); - QObject::connect(m_visibilityUI->invisibleRemove, SIGNAL(clicked()), - this, SLOT(slotRemoveFromInvisible())); + TQObject::connect(m_visibilityUI->visibleAdd, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddToVisible())); + TQObject::connect(m_visibilityUI->visibleRemove, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveFromVisible())); + TQObject::connect(m_visibilityUI->invisibleAdd, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotAddToInvisible())); + TQObject::connect(m_visibilityUI->invisibleRemove, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotRemoveFromInvisible())); } void OscarVisibilityDialog::addContacts( const ContactMap& contacts ) @@ -52,22 +52,22 @@ void OscarVisibilityDialog::addContacts( const ContactMap& contacts ) } -void OscarVisibilityDialog::addVisibleContacts( const QStringList& contactList ) +void OscarVisibilityDialog::addVisibleContacts( const TQStringList& contactList ) { m_visibilityUI->visibleContacts->insertStringList( contactList ); } -void OscarVisibilityDialog::addInvisibleContacts( const QStringList& contactList ) +void OscarVisibilityDialog::addInvisibleContacts( const TQStringList& contactList ) { m_visibilityUI->invisibleContacts->insertStringList( contactList ); } void OscarVisibilityDialog::slotAddToVisible() { - QListBoxItem *itm = m_visibilityUI->contacts->selectedItem(); + TQListBoxItem *itm = m_visibilityUI->contacts->selectedItem(); if ( !itm ) return; - QString contactId = m_contactMap[itm->text()]; + TQString contactId = m_contactMap[itm->text()]; m_visibleListChangesMap[contactId] = Add; if ( !m_visibilityUI->visibleContacts->findItem( itm->text(), Qt::CaseSensitive | Qt::ExactMatch ) ) @@ -76,10 +76,10 @@ void OscarVisibilityDialog::slotAddToVisible() void OscarVisibilityDialog::slotRemoveFromVisible() { - QListBoxItem *itm = m_visibilityUI->visibleContacts->selectedItem(); + TQListBoxItem *itm = m_visibilityUI->visibleContacts->selectedItem(); if ( !itm ) return; - QString contactId = m_contactMap[itm->text()]; + TQString contactId = m_contactMap[itm->text()]; m_visibleListChangesMap[contactId] = Remove; int visIdx = m_visibilityUI->visibleContacts->index( itm ); @@ -88,10 +88,10 @@ void OscarVisibilityDialog::slotRemoveFromVisible() void OscarVisibilityDialog::slotAddToInvisible() { - QListBoxItem *itm = m_visibilityUI->contacts->selectedItem(); + TQListBoxItem *itm = m_visibilityUI->contacts->selectedItem(); if ( !itm ) return; - QString contactId = m_contactMap[itm->text()]; + TQString contactId = m_contactMap[itm->text()]; m_invisibleListChangesMap[contactId] = Add; if ( !m_visibilityUI->invisibleContacts->findItem( itm->text(), Qt::CaseSensitive | Qt::ExactMatch ) ) @@ -100,10 +100,10 @@ void OscarVisibilityDialog::slotAddToInvisible() void OscarVisibilityDialog::slotRemoveFromInvisible() { - QListBoxItem *itm = m_visibilityUI->invisibleContacts->selectedItem(); + TQListBoxItem *itm = m_visibilityUI->invisibleContacts->selectedItem(); if ( !itm ) return; - QString contactId = m_contactMap[itm->text()]; + TQString contactId = m_contactMap[itm->text()]; m_invisibleListChangesMap[contactId] = Remove; int visIdx = m_visibilityUI->invisibleContacts->index( itm ); diff --git a/kopete/protocols/oscar/oscarvisibilitydialog.h b/kopete/protocols/oscar/oscarvisibilitydialog.h index fc45039f..719243d3 100644 --- a/kopete/protocols/oscar/oscarvisibilitydialog.h +++ b/kopete/protocols/oscar/oscarvisibilitydialog.h @@ -31,14 +31,14 @@ class KOPETE_EXPORT OscarVisibilityDialog : public KDialogBase { Q_OBJECT public: - typedef QMap ContactMap; + typedef TQMap ContactMap; - OscarVisibilityDialog( Client* client, QWidget* parent ); + OscarVisibilityDialog( Client* client, TQWidget* parent ); ~OscarVisibilityDialog() {} void addContacts( const ContactMap& contacts ); - void addVisibleContacts( const QStringList& contactList ); - void addInvisibleContacts( const QStringList& contactList ); + void addVisibleContacts( const TQStringList& contactList ); + void addInvisibleContacts( const TQStringList& contactList ); signals: void closing(); @@ -55,7 +55,7 @@ protected slots: private: enum Action{ Remove = 0, Add }; - typedef QMap ChangeMap; + typedef TQMap ChangeMap; //maps with changes that should be send to server ChangeMap m_visibleListChangesMap; diff --git a/kopete/protocols/sms/serviceloader.cpp b/kopete/protocols/sms/serviceloader.cpp index 8a64a6c0..0ebbe7fa 100644 --- a/kopete/protocols/sms/serviceloader.cpp +++ b/kopete/protocols/sms/serviceloader.cpp @@ -28,7 +28,7 @@ #endif #include "kopeteuiglobal.h" -SMSService* ServiceLoader::loadService(const QString& name, Kopete::Account* account) +SMSService* ServiceLoader::loadService(const TQString& name, Kopete::Account* account) { kdWarning( 14160 ) << k_funcinfo << endl; @@ -51,9 +51,9 @@ SMSService* ServiceLoader::loadService(const QString& name, Kopete::Account* acc return s; } -QStringList ServiceLoader::services() +TQStringList ServiceLoader::services() { - QStringList toReturn; + TQStringList toReturn; toReturn.append("SMSSend"); toReturn.append("SMSClient"); #ifdef INCLUDE_SMSGSM diff --git a/kopete/protocols/sms/serviceloader.h b/kopete/protocols/sms/serviceloader.h index fe29ebcc..b341a499 100644 --- a/kopete/protocols/sms/serviceloader.h +++ b/kopete/protocols/sms/serviceloader.h @@ -18,16 +18,16 @@ #define SERVICELOADER_H #include "smsservice.h" -#include -#include +#include +#include class SMSContact; class ServiceLoader { public: - static SMSService* loadService(const QString& name, Kopete::Account* account); - static QStringList services(); + static SMSService* loadService(const TQString& name, Kopete::Account* account); + static TQStringList services(); } ; #endif //SERVICELOADER_H diff --git a/kopete/protocols/sms/services/gsmlib.cpp b/kopete/protocols/sms/services/gsmlib.cpp index e9b0542b..7f129473 100644 --- a/kopete/protocols/sms/services/gsmlib.cpp +++ b/kopete/protocols/sms/services/gsmlib.cpp @@ -15,13 +15,13 @@ #include "config.h" #ifdef INCLUDE_SMSGSM -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -51,7 +51,7 @@ ///////////////////////////////////////////////////////////////////// #define GSMLIB_EVENT_ID 245 -GSMLibEvent::GSMLibEvent(SubType t) : QCustomEvent(QEvent::User+GSMLIB_EVENT_ID) +GSMLibEvent::GSMLibEvent(SubType t) : TQCustomEvent(TQEvent::User+GSMLIB_EVENT_ID) { setSubType(t); } @@ -67,7 +67,7 @@ void GSMLibEvent::setSubType(GSMLibEvent::SubType t) } ///////////////////////////////////////////////////////////////////// -GSMLibThread::GSMLibThread(QString dev, GSMLib* parent) +GSMLibThread::GSMLibThread(TQString dev, GSMLib* parent) { m_device = dev; m_parent = parent; @@ -100,7 +100,7 @@ void GSMLibThread::run() delete m_MeTa; m_MeTa = NULL; - QApplication::postEvent(m_parent, new GSMLibEvent(GSMLibEvent::DISCONNECTED)); + TQApplication::postEvent(m_parent, new GSMLibEvent(GSMLibEvent::DISCONNECTED)); kdDebug( 14160 ) << "GSMLibThread exited"<Reason = QString("GSMLib: Not Connected"); + e->Reason = TQString("GSMLib: Not Connected"); e->Message = msg; - QApplication::postEvent(m_parent, e); + TQApplication::postEvent(m_parent, e); } } @@ -144,7 +144,7 @@ bool GSMLibThread::doConnect() m_MeTa->setSMSRoutingToTA(true, false, false, true); m_MeTa->setEventHandler(this); - QApplication::postEvent(m_parent, new GSMLibEvent(GSMLibEvent::CONNECTED)); + TQApplication::postEvent(m_parent, new GSMLibEvent(GSMLibEvent::CONNECTED)); return true; } catch(gsmlib::GsmException &e) @@ -225,7 +225,7 @@ void GSMLibThread::pollForMessages( ) e->Text = m.Message->userData().c_str(); e->Number = m.Message->address().toString().c_str(); - QApplication::postEvent(m_parent, e); + TQApplication::postEvent(m_parent, e); } m_newMessages.clear(); @@ -239,7 +239,7 @@ void GSMLibThread::pollForMessages( ) void GSMLibThread::sendMessageQueue() { - QMutexLocker _(&m_outMessagesMutex); + TQMutexLocker _(&m_outMessagesMutex); if(m_outMessages.size() == 0 ) return; @@ -252,18 +252,18 @@ void GSMLibThread::sendMessageQueue() void GSMLibThread::sendMessage(const Kopete::Message& msg) { - QString reason; + TQString reason; if (!m_MeTa) { GSMLibEvent* e = new GSMLibEvent( GSMLibEvent::MSG_NOT_SENT ); - e->Reason = QString("GSMLib: Not Connected"); + e->Reason = TQString("GSMLib: Not Connected"); e->Message = msg; - QApplication::postEvent(m_parent, e); + TQApplication::postEvent(m_parent, e); } - QString message = msg.plainBody(); - QString nr = msg.to().first()->contactId(); + TQString message = msg.plainBody(); + TQString nr = msg.to().first()->contactId(); // send SMS try @@ -275,14 +275,14 @@ void GSMLibThread::sendMessage(const Kopete::Message& msg) GSMLibEvent* e = new GSMLibEvent( GSMLibEvent::MSG_SENT ); e->Message = msg; - QApplication::postEvent(m_parent, e); + TQApplication::postEvent(m_parent, e); } catch(gsmlib::GsmException &e) { GSMLibEvent* ev = new GSMLibEvent( GSMLibEvent::MSG_NOT_SENT ); - ev->Reason = QString("GSMLib: ") + e.what(); + ev->Reason = TQString("GSMLib: ") + e.what(); ev->Message = msg; - QApplication::postEvent(m_parent, ev); + TQApplication::postEvent(m_parent, ev); } } @@ -308,7 +308,7 @@ void GSMLib::saveConfig() { KConfigGroup* c = m_account->configGroup(); - c->writeEntry(QString("%1:%2").arg("GSMLib").arg("Device"), m_device); + c->writeEntry(TQString("%1:%2").arg("GSMLib").arg("Device"), m_device); } } @@ -317,11 +317,11 @@ void GSMLib::loadConfig() m_device = "/dev/bluetooth/rfcomm0"; if( m_account != NULL ) { - QString temp; + TQString temp; KConfigGroup* c = m_account->configGroup(); - temp = c->readEntry(QString("%1:%2").arg("GSMLib").arg("Device"), QString::null); - if( temp != QString::null ) + temp = c->readEntry(TQString("%1:%2").arg("GSMLib").arg("Device"), TQString::null); + if( temp != TQString::null ) m_device = temp; } } @@ -348,11 +348,11 @@ void GSMLib::disconnect() } -void GSMLib::setWidgetContainer(QWidget* parent, QGridLayout* layout) +void GSMLib::setWidgetContainer(TQWidget* parent, TQGridLayout* layout) { m_parent = parent; m_layout = layout; - QWidget *configWidget = configureWidget(parent); + TQWidget *configWidget = configureWidget(parent); layout->addMultiCellWidget(configWidget, 0, 1, 0, 1); configWidget->show(); } @@ -362,7 +362,7 @@ void GSMLib::send(const Kopete::Message& msg) m_thread->send(msg); } -QWidget* GSMLib::configureWidget(QWidget* parent) +TQWidget* GSMLib::configureWidget(TQWidget* parent) { if (prefWidget == 0L) @@ -388,9 +388,9 @@ int GSMLib::maxSize() return 160; } -void GSMLib::customEvent(QCustomEvent* e) +void GSMLib::customEvent(TQCustomEvent* e) { - if( e->type() != QEvent::User+GSMLIB_EVENT_ID ) + if( e->type() != TQEvent::User+GSMLIB_EVENT_ID ) return; if( m_account == NULL ) @@ -415,8 +415,8 @@ void GSMLib::customEvent(QCustomEvent* e) break; case GSMLibEvent::NEW_MESSAGE: { - QString nr = ge->Number; - QString text = ge->Text; + TQString nr = ge->Number; + TQString text = ge->Text; // Locate a contact SMSContact* contact = static_cast( m_account->contacts().find( nr )); @@ -441,9 +441,9 @@ void GSMLib::customEvent(QCustomEvent* e) -const QString& GSMLib::description() +const TQString& GSMLib::description() { - QString url = "http://www.pxh.de/fs/gsmlib/"; + TQString url = "http://www.pxh.de/fs/gsmlib/"; m_description = i18n("GSMLib is a library (and utilities) for sending SMS via a GSM device. The program can be found on %1").arg(url).arg(url); return m_description; } diff --git a/kopete/protocols/sms/services/gsmlib.h b/kopete/protocols/sms/services/gsmlib.h index fa9ef1d2..e4f7f8c8 100644 --- a/kopete/protocols/sms/services/gsmlib.h +++ b/kopete/protocols/sms/services/gsmlib.h @@ -30,12 +30,12 @@ #include "smsservice.h" #include "kopetemessage.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include class GSMLibPrefsUI; class SMSContact; @@ -51,10 +51,10 @@ public: ~GSMLib(); void send(const Kopete::Message& msg); - void setWidgetContainer(QWidget* parent, QGridLayout* container); + void setWidgetContainer(TQWidget* parent, TQGridLayout* container); int maxSize(); - const QString& description(); + const TQString& description(); public slots: void savePreferences(); @@ -64,18 +64,18 @@ public slots: //signals: // void messageSent(const Kopete::Message &); protected: - virtual void customEvent(QCustomEvent* e); + virtual void customEvent(TQCustomEvent* e); - QWidget* configureWidget(QWidget* parent); + TQWidget* configureWidget(TQWidget* parent); void saveConfig(); void loadConfig(); GSMLibPrefsUI* prefWidget; - QStringList output; + TQStringList output; - QString m_device; + TQString m_device; - QString m_description; + TQString m_description; GSMLibThread* m_thread; @@ -93,10 +93,10 @@ public: SubType subType(); void setSubType(SubType t); - QString Text; - QString Number; + TQString Text; + TQString Number; - QString Reason; + TQString Reason; Kopete::Message Message; protected: @@ -104,10 +104,10 @@ protected: }; /// Thread to deal with GsmLib's blocking -class GSMLibThread : public QThread, gsmlib::GsmEvent +class GSMLibThread : public TQThread, gsmlib::GsmEvent { public: - GSMLibThread(QString dev, GSMLib* parent); + GSMLibThread(TQString dev, GSMLib* parent); virtual ~GSMLibThread(); virtual void run(); @@ -122,7 +122,7 @@ protected: void SMSReceptionIndication(std::string storeName, unsigned int index, SMSMessageType messageType); GSMLib* m_parent; - QString m_device; + TQString m_device; gsmlib::MeTa* m_MeTa; @@ -131,7 +131,7 @@ protected: struct IncomingMessage { int Index; - QString StoreName; + TQString StoreName; gsmlib::SMSMessageRef Message; GsmEvent::SMSMessageType Type; @@ -139,12 +139,12 @@ protected: {} }; - typedef QValueList MessageList; + typedef TQValueList MessageList; MessageList m_newMessages; - typedef QValueList KopeteMessageList; + typedef TQValueList KopeteMessageList; KopeteMessageList m_outMessages; - QMutex m_outMessagesMutex; + TQMutex m_outMessagesMutex; }; #endif diff --git a/kopete/protocols/sms/services/kopete_unix_serial.cpp b/kopete/protocols/sms/services/kopete_unix_serial.cpp index b694ab22..c40f831b 100644 --- a/kopete/protocols/sms/services/kopete_unix_serial.cpp +++ b/kopete/protocols/sms/services/kopete_unix_serial.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include "kopete_unix_serial.h" @@ -304,8 +304,8 @@ KopeteUnixSerialPort::KopeteUnixSerialPort(string device, speed_t lineSpeed, if (s.find("OK") != string::npos || s.find("CABLE: GSM") != string::npos) { - _readNotifier = new QSocketNotifier(_fd, QSocketNotifier::Read); - connect( _readNotifier, SIGNAL(activated(int)), this, SIGNAL(activated())); + _readNotifier = new TQSocketNotifier(_fd, TQSocketNotifier::Read); + connect( _readNotifier, TQT_SIGNAL(activated(int)), this, TQT_SIGNAL(activated())); return; // found OK, return } } diff --git a/kopete/protocols/sms/services/kopete_unix_serial.h b/kopete/protocols/sms/services/kopete_unix_serial.h index 0248556b..beb0592a 100644 --- a/kopete/protocols/sms/services/kopete_unix_serial.h +++ b/kopete/protocols/sms/services/kopete_unix_serial.h @@ -24,13 +24,13 @@ #include #include -#include +#include class QSocketNotifier; namespace gsmlib { -class KopeteUnixSerialPort : public QObject, public Port +class KopeteUnixSerialPort : public TQObject, public Port { Q_OBJECT; @@ -39,7 +39,7 @@ protected: int _oldChar; // character set by putBack() (-1 == none) long int _timeoutVal; // timeout for getLine/readByte - QSocketNotifier* _readNotifier; + TQSocketNotifier* _readNotifier; // throw GsmException include UNIX errno void throwModemException(std::string message) throw(GsmException); diff --git a/kopete/protocols/sms/services/smsclient.cpp b/kopete/protocols/sms/services/smsclient.cpp index 96c04818..17a27066 100644 --- a/kopete/protocols/sms/services/smsclient.cpp +++ b/kopete/protocols/sms/services/smsclient.cpp @@ -14,8 +14,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include #include @@ -41,12 +41,12 @@ SMSClient::~SMSClient() { } -void SMSClient::setWidgetContainer(QWidget* parent, QGridLayout* layout) +void SMSClient::setWidgetContainer(TQWidget* parent, TQGridLayout* layout) { kdWarning( 14160 ) << k_funcinfo << "ml: " << layout << ", " << "mp: " << parent << endl; m_parent = parent; m_layout = layout; - QWidget *configWidget = configureWidget(parent); + TQWidget *configWidget = configureWidget(parent); layout->addMultiCellWidget(configWidget, 0, 1, 0, 1); configWidget->show(); } @@ -59,7 +59,7 @@ void SMSClient::send(const Kopete::Message& msg) m_msg = msg; KConfigGroup* c = m_account->configGroup(); - QString provider = c->readEntry(QString("%1:%2").arg("SMSClient").arg("ProviderName"), QString::null); + TQString provider = c->readEntry(TQString("%1:%2").arg("SMSClient").arg("ProviderName"), TQString::null); if (provider.isNull()) { @@ -67,27 +67,27 @@ void SMSClient::send(const Kopete::Message& msg) return; } - QString programName = c->readEntry(QString("%1:%2").arg("SMSClient").arg("ProgramName"). QString::null); + TQString programName = c->readEntry(TQString("%1:%2").arg("SMSClient").arg("ProgramName"). TQString::null); if (programName.isNull()) programName = "/usr/bin/sms_client"; KProcess* p = new KProcess; - QString message = msg.plainBody(); - QString nr = msg.to().first()->contactId(); + TQString message = msg.plainBody(); + TQString nr = msg.to().first()->contactId(); *p << programName; *p << provider + ":" + nr; *p << message; - QObject::connect(p, SIGNAL(processExited(KProcess *)), this, SLOT(slotSendFinished(KProcess*))); - QObject::connect(p, SIGNAL(receivedStdout(KProcess*, char*, int)), this, SLOT(slotReceivedOutput(KProcess*, char*, int))); - QObject::connect(p, SIGNAL(receivedStderr(KProcess*, char*, int)), this, SLOT(slotReceivedOutput(KProcess*, char*, int))); + TQObject::connect(p, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotSendFinished(KProcess*))); + TQObject::connect(p, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int))); + TQObject::connect(p, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotReceivedOutput(KProcess*, char*, int))); p->start(KProcess::Block, KProcess::AllOutput); } -QWidget* SMSClient::configureWidget(QWidget* parent) +TQWidget* SMSClient::configureWidget(TQWidget* parent) { kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be ok if zero!!)" << endl; @@ -95,17 +95,17 @@ QWidget* SMSClient::configureWidget(QWidget* parent) prefWidget = new SMSClientPrefsUI(parent); prefWidget->configDir->setMode(KFile::Directory); - QString configDir; + TQString configDir; if (m_account) - configDir = m_account->configGroup()->readEntry(QString("%1:%2").arg("SMSClient").arg("ConfigDir"), QString::null); + configDir = m_account->configGroup()->readEntry(TQString("%1:%2").arg("SMSClient").arg("ConfigDir"), TQString::null); if (configDir.isNull()) configDir = "/etc/sms"; prefWidget->configDir->setURL(configDir); - QString programName; + TQString programName; if (m_account) - programName = m_account->configGroup()->readEntry(QString("%1:%2").arg("SMSClient").arg("ProgramName"), - QString::null); + programName = m_account->configGroup()->readEntry(TQString("%1:%2").arg("SMSClient").arg("ProgramName"), + TQString::null); if (programName.isNull()) programName = "/usr/bin/sms_client"; prefWidget->program->setURL(programName); @@ -114,7 +114,7 @@ QWidget* SMSClient::configureWidget(QWidget* parent) if (m_account) { - QString pName = m_account->configGroup()->readEntry(QString("%1:%2").arg("SMSClient").arg("ProviderName")); + TQString pName = m_account->configGroup()->readEntry(TQString("%1:%2").arg("SMSClient").arg("ProviderName")); for (int i=0; i < prefWidget->provider->count(); i++) { if (prefWidget->provider->text(i) == pName) @@ -136,27 +136,27 @@ void SMSClient::savePreferences() { KConfigGroup* c = m_account->configGroup(); - c->writeEntry(QString("%1:%2").arg("SMSClient").arg("ProgramName"), prefWidget->program->url()); - c->writeEntry(QString("%1:%2").arg("SMSClient").arg("ConfigDir"), prefWidget->configDir->url()); - c->writeEntry(QString("%1:%2").arg("SMSClient").arg("ProviderName"), prefWidget->provider->currentText()); + c->writeEntry(TQString("%1:%2").arg("SMSClient").arg("ProgramName"), prefWidget->program->url()); + c->writeEntry(TQString("%1:%2").arg("SMSClient").arg("ConfigDir"), prefWidget->configDir->url()); + c->writeEntry(TQString("%1:%2").arg("SMSClient").arg("ProviderName"), prefWidget->provider->currentText()); } } -QStringList SMSClient::providers() +TQStringList SMSClient::providers() { - QStringList p; + TQStringList p; - QDir d; - d.setPath(QString("%1/services/").arg(prefWidget->configDir->url())); - p += d.entryList("*", QDir::Files); + TQDir d; + d.setPath(TQString("%1/services/").arg(prefWidget->configDir->url())); + p += d.entryList("*", TQDir::Files); return p; } void SMSClient::slotReceivedOutput(KProcess*, char *buffer, int buflen) { - QStringList lines = QStringList::split("\n", QString::fromLocal8Bit(buffer, buflen)); - for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it) + TQStringList lines = TQStringList::split("\n", TQString::fromLocal8Bit(buffer, buflen)); + for (TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it) output.append(*it); } @@ -173,9 +173,9 @@ int SMSClient::maxSize() return 160; } -const QString& SMSClient::description() +const TQString& SMSClient::description() { - QString url = "http://www.smsclient.org"; + TQString url = "http://www.smsclient.org"; m_description = i18n("SMSClient is a program for sending SMS with the modem. The program can be found on %1").arg(url).arg(url); return m_description; } diff --git a/kopete/protocols/sms/services/smsclient.h b/kopete/protocols/sms/services/smsclient.h index bc260228..1f8bfdce 100644 --- a/kopete/protocols/sms/services/smsclient.h +++ b/kopete/protocols/sms/services/smsclient.h @@ -20,8 +20,8 @@ #include "smsservice.h" #include "kopetemessage.h" -#include -#include +#include +#include class SMSClientPrefsUI; class SMSContact; @@ -36,10 +36,10 @@ public: ~SMSClient(); void send(const Kopete::Message& msg); - void setWidgetContainer(QWidget* parent, QGridLayout* container); + void setWidgetContainer(TQWidget* parent, TQGridLayout* container); int maxSize(); - const QString& description(); + const TQString& description(); public slots: void savePreferences(); @@ -51,15 +51,15 @@ signals: void messageSent(const Kopete::Message &); private: - QWidget* configureWidget(QWidget* parent); + TQWidget* configureWidget(TQWidget* parent); SMSClientPrefsUI* prefWidget; - QStringList providers(); - QStringList output; + TQStringList providers(); + TQStringList output; Kopete::Message m_msg; - QString m_description; + TQString m_description; } ; #endif //SMSCLIENT_H diff --git a/kopete/protocols/sms/services/smssend.cpp b/kopete/protocols/sms/services/smssend.cpp index f3ea258c..2e843dea 100644 --- a/kopete/protocols/sms/services/smssend.cpp +++ b/kopete/protocols/sms/services/smssend.cpp @@ -14,11 +14,11 @@ ************************************************************************* */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -50,7 +50,7 @@ SMSSend::~SMSSend() void SMSSend::send(const Kopete::Message& msg) { kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be non-zero!!)" << endl; - QString provider = m_account->configGroup()->readEntry("SMSSend:ProviderName", QString::null); + TQString provider = m_account->configGroup()->readEntry("SMSSend:ProviderName", TQString::null); if (provider.length() < 1) { @@ -58,7 +58,7 @@ void SMSSend::send(const Kopete::Message& msg) return; } - QString prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", QString::null); + TQString prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", TQString::null); if (prefix.isNull()) { KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("No prefix set for SMSSend, please change it in the configuration dialog."), i18n("No Prefix")); @@ -67,13 +67,13 @@ void SMSSend::send(const Kopete::Message& msg) m_provider = new SMSSendProvider(provider, prefix, m_account, this); - QObject::connect( m_provider, SIGNAL(messageSent(const Kopete::Message &)), this, SIGNAL(messageSent(const Kopete::Message &))); - QObject::connect( m_provider, SIGNAL(messageNotSent(const Kopete::Message &, const QString &)), this, SIGNAL(messageNotSent(const Kopete::Message &, const QString &))); + TQObject::connect( m_provider, TQT_SIGNAL(messageSent(const Kopete::Message &)), this, TQT_SIGNAL(messageSent(const Kopete::Message &))); + TQObject::connect( m_provider, TQT_SIGNAL(messageNotSent(const Kopete::Message &, const TQString &)), this, TQT_SIGNAL(messageNotSent(const Kopete::Message &, const TQString &))); m_provider->send(msg); } -void SMSSend::setWidgetContainer(QWidget* parent, QGridLayout* layout) +void SMSSend::setWidgetContainer(TQWidget* parent, TQGridLayout* layout) { kdWarning( 14160 ) << k_funcinfo << "ml: " << layout << ", " << "mp: " << parent << endl; m_parent = parent; @@ -86,13 +86,13 @@ void SMSSend::setWidgetContainer(QWidget* parent, QGridLayout* layout) prefWidget->program->setMode(KFile::Directory); - QString prefix = QString::null; + TQString prefix = TQString::null; if (m_account) - prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", QString::null); + prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", TQString::null); if (prefix.isNull()) { - QDir d("/usr/share/smssend"); + TQDir d("/usr/share/smssend"); if (d.exists()) { prefix = "/usr"; @@ -108,13 +108,13 @@ void SMSSend::setWidgetContainer(QWidget* parent, QGridLayout* layout) } } - QObject::connect (prefWidget->program, SIGNAL(textChanged(const QString &)), - this, SLOT(loadProviders(const QString&))); + TQObject::connect (prefWidget->program, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(loadProviders(const TQString&))); prefWidget->program->setURL(prefix); - QObject::connect(prefWidget->provider, SIGNAL(activated(const QString &)), - this, SLOT(setOptions(const QString &))); + TQObject::connect(prefWidget->provider, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(setOptions(const TQString &))); prefWidget->show(); } @@ -129,38 +129,38 @@ void SMSSend::savePreferences() } } -void SMSSend::loadProviders(const QString &prefix) +void SMSSend::loadProviders(const TQString &prefix) { kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be ok if zero)" << endl; - QStringList p; + TQStringList p; prefWidget->provider->clear(); - QDir d(prefix + "/share/smssend"); + TQDir d(prefix + "/share/smssend"); if (!d.exists()) { - setOptions(QString::null); + setOptions(TQString::null); return; } p = d.entryList("*.sms"); - d = QDir::homeDirPath()+"/.smssend/"; + d = TQDir::homeDirPath()+"/.smssend/"; - QStringList tmp(d.entryList("*.sms")); + TQStringList tmp(d.entryList("*.sms")); - for (QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) + for (TQStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) p.prepend(*it); - for (QStringList::iterator it = p.begin(); it != p.end(); ++it) + for (TQStringList::iterator it = p.begin(); it != p.end(); ++it) (*it).truncate((*it).length()-4); prefWidget->provider->insertStringList(p); bool found = false; if (m_account) - { QString pName = m_account->configGroup()->readEntry("SMSSend:ProviderName", QString::null); + { TQString pName = m_account->configGroup()->readEntry("SMSSend:ProviderName", TQString::null); for (int i=0; i < prefWidget->provider->count(); i++) { if (prefWidget->provider->text(i) == pName) @@ -176,7 +176,7 @@ void SMSSend::loadProviders(const QString &prefix) setOptions(prefWidget->provider->currentText()); } -void SMSSend::setOptions(const QString& name) +void SMSSend::setOptions(const TQString& name) { kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be ok if zero!!)" << endl; if(!prefWidget) return; // sanity check @@ -195,9 +195,9 @@ void SMSSend::setOptions(const QString& name) { if (!m_provider->name(i).isNull()) { - QLabel *l = new QLabel(m_parent); + TQLabel *l = new TQLabel(m_parent); l->setText("&" + m_provider->name(i) + ":"); - QToolTip::add(l, m_provider->description(i)); + TQToolTip::add(l, m_provider->description(i)); m_layout->addWidget(l, i+2, 0); KLineEdit *e = new KLineEdit(m_parent); e->setText(m_provider->value(i)); @@ -206,7 +206,7 @@ void SMSSend::setOptions(const QString& name) labels.append(l); l->setBuddy(e); if(m_provider->isHidden(i)) - e->setEchoMode(QLineEdit::Password); + e->setEchoMode(TQLineEdit::Password); e->show(); l->show(); } @@ -222,10 +222,10 @@ int SMSSend::maxSize() { kdWarning( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be non-zero!!)" << endl; - QString pName = m_account->configGroup()->readEntry("SMSSend:ProviderName", QString::null); + TQString pName = m_account->configGroup()->readEntry("SMSSend:ProviderName", TQString::null); if (pName.length() < 1) return 160; - QString prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", QString::null); + TQString prefix = m_account->configGroup()->readEntry("SMSSend:Prefix", TQString::null); if (prefix.isNull()) prefix = "/usr"; // quick sanity check @@ -234,9 +234,9 @@ int SMSSend::maxSize() return m_provider->maxSize(); } -const QString& SMSSend::description() +const TQString& SMSSend::description() { - QString url = "http://zekiller.skytech.org/smssend_en.php"; + TQString url = "http://zekiller.skytech.org/smssend_en.php"; m_description = i18n("SMSSend is a program for sending SMS through gateways on the web. It can be found on %2").arg(url).arg(url); return m_description; } diff --git a/kopete/protocols/sms/services/smssend.h b/kopete/protocols/sms/services/smssend.h index 556a21ea..2eefb014 100644 --- a/kopete/protocols/sms/services/smssend.h +++ b/kopete/protocols/sms/services/smssend.h @@ -17,9 +17,9 @@ #ifndef SMSSEND_H #define SMSSEND_H -#include -#include -#include +#include +#include +#include #include @@ -40,27 +40,27 @@ public: virtual void setAccount(Kopete::Account* account); void send(const Kopete::Message& msg); - void setWidgetContainer(QWidget* parent, QGridLayout* container); + void setWidgetContainer(TQWidget* parent, TQGridLayout* container); int maxSize(); - const QString& description(); + const TQString& description(); public slots: void savePreferences(); private slots: - void setOptions(const QString& name); - void loadProviders(const QString& prefix); + void setOptions(const TQString& name); + void loadProviders(const TQString& prefix); //signals: // void messageSent(const Kopete::Message&); private: - QGridLayout *settingsBoxLayout; + TQGridLayout *settingsBoxLayout; SMSSendProvider* m_provider; SMSSendPrefsUI* prefWidget; - QPtrList args; - QPtrList labels; - QString m_description; + TQPtrList args; + TQPtrList labels; + TQString m_description; } ; #endif //SMSSEND_H diff --git a/kopete/protocols/sms/services/smssendprovider.cpp b/kopete/protocols/sms/services/smssendprovider.cpp index 82827aab..5f0f37ee 100644 --- a/kopete/protocols/sms/services/smssendprovider.cpp +++ b/kopete/protocols/sms/services/smssendprovider.cpp @@ -14,9 +14,9 @@ ************************************************************************* */ -#include -#include -#include +#include +#include +#include #include #include @@ -32,8 +32,8 @@ #include "smsprotocol.h" #include "smscontact.h" -SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& prefixValue, Kopete::Account* account, QObject* parent, const char *name) - : QObject( parent, name ), m_account(account) +SMSSendProvider::SMSSendProvider(const TQString& providerName, const TQString& prefixValue, Kopete::Account* account, TQObject* parent, const char *name) + : TQObject( parent, name ), m_account(account) { kdWarning( 14160 ) << k_funcinfo << "this = " << this << ", m_account = " << m_account << " (should be ok if zero!!)" << endl; @@ -44,14 +44,14 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre messagePos = -1; telPos = -1; - QString file = prefix + "/share/smssend/" + provider + ".sms"; - QFile f(file); + TQString file = prefix + "/share/smssend/" + provider + ".sms"; + TQFile f(file); if (f.open(IO_ReadOnly)) { - QTextStream t(&f); - QString group = QString("SMSSend-%1").arg(provider); + TQTextStream t(&f); + TQString group = TQString("SMSSend-%1").arg(provider); bool exactNumberMatch = false; - QStringList numberWords; + TQStringList numberWords; numberWords.append("Tel"); numberWords.append("Number"); numberWords.append("number"); @@ -65,11 +65,11 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre while( !t.eof()) { - QString s = t.readLine(); + TQString s = t.readLine(); if( s[0] == '%') { - QStringList args = QStringList::split(':',s); - QStringList options = QStringList::split(' ', args[0]); + TQStringList args = TQStringList::split(':',s); + TQStringList options = TQStringList::split(' ', args[0]); names.append(options[0].replace(0,1,"")); @@ -87,8 +87,8 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre descriptions.append(args[1]); if (m_account) - values.append(m_account->configGroup()->readEntry(QString("%1:%2").arg(group).arg(names[names.count()-1]), - QString::null)); + values.append(m_account->configGroup()->readEntry(TQString("%1:%2").arg(group).arg(names[names.count()-1]), + TQString::null)); else values.append(""); @@ -100,7 +100,7 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre { if (options[i].contains("Size=")) { - QString option = options[i]; + TQString option = options[i]; option.replace(0,5,""); m_maxSize = option.toInt(); } @@ -109,7 +109,7 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre } else if (!exactNumberMatch) { - for (QStringList::Iterator it=numberWords.begin(); it != numberWords.end(); ++it) + for (TQStringList::Iterator it=numberWords.begin(); it != numberWords.end(); ++it) { if (args[0].contains(*it)) { @@ -147,20 +147,20 @@ void SMSSendProvider::setAccount(Kopete::Account *account) m_account = account; } -const QString& SMSSendProvider::name(int i) +const TQString& SMSSendProvider::name(int i) { if ( telPos == i || messagePos == i) - return QString::null; + return TQString::null; else return names[i]; } -const QString& SMSSendProvider::value(int i) +const TQString& SMSSendProvider::value(int i) { return values[i]; } -const QString& SMSSendProvider::description(int i) +const TQString& SMSSendProvider::description(int i) { return descriptions[i]; } @@ -170,12 +170,12 @@ const bool SMSSendProvider::isHidden(int i) return isHiddens[i]; } -void SMSSendProvider::save(QPtrList& args) +void SMSSendProvider::save(TQPtrList& args) { kdDebug( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be non-zero!!)" << endl; if (!m_account) return; // prevent crash in worst case - QString group = QString("SMSSend-%1").arg(provider); + TQString group = TQString("SMSSend-%1").arg(provider); int namesI=0; for (unsigned i=0; i < args.count(); i++) @@ -194,7 +194,7 @@ void SMSSendProvider::save(QPtrList& args) // kdDebug(14160) << k_funcinfo << "saving " << args.at(i) << " to " << names[namesI] << endl; if (!args.at(i)->text().isEmpty()) { values[namesI] = args.at(i)->text(); - m_account->configGroup()->writeEntry(QString("%1:%2").arg(group).arg(names[namesI]), values[namesI]); + m_account->configGroup()->writeEntry(TQString("%1:%2").arg(group).arg(names[namesI]), values[namesI]); } namesI++; } @@ -228,8 +228,8 @@ void SMSSendProvider::send(const Kopete::Message& msg) m_msg = msg; - QString message = msg.plainBody(); - QString nr = dynamic_cast(msg.to().first())->qualifiedNumber(); + TQString message = msg.plainBody(); + TQString nr = dynamic_cast(msg.to().first())->qualifiedNumber(); if (canSend = false) return; @@ -239,14 +239,14 @@ void SMSSendProvider::send(const Kopete::Message& msg) KProcess* p = new KProcess; - kdWarning( 14160 ) << "Executing " << QString("%1/bin/smssend").arg(prefix) << " \"" << provider << "\" " << values.join("\" \"") << "\"" << endl; + kdWarning( 14160 ) << "Executing " << TQString("%1/bin/smssend").arg(prefix) << " \"" << provider << "\" " << values.join("\" \"") << "\"" << endl; - *p << QString("%1/bin/smssend").arg(prefix) << provider << values; + *p << TQString("%1/bin/smssend").arg(prefix) << provider << values; output = ""; - connect( p, SIGNAL(processExited(KProcess *)), this, SLOT(slotSendFinished(KProcess *))); - connect( p, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(slotReceivedOutput(KProcess *, char *, int))); -// connect( p, SIGNAL(receivedStderr(KProcess *, char *, int)), this, SLOT(slotReceivedOutput(KProcess *, char *, int))); + connect( p, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotSendFinished(KProcess *))); + connect( p, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(slotReceivedOutput(KProcess *, char *, int))); +// connect( p, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(slotReceivedOutput(KProcess *, char *, int))); p->start(KProcess::NotifyOnExit, KProcess::AllOutput); } @@ -257,15 +257,15 @@ void SMSSendProvider::slotSendFinished(KProcess *p) if (p->exitStatus() == 0) emit messageSent(m_msg); else - emit messageNotSent(m_msg, QString().setLatin1(output)); + emit messageNotSent(m_msg, TQString().setLatin1(output)); p->deleteLater(); } void SMSSendProvider::slotReceivedOutput(KProcess *, char *buffer, int buflen) { -// QStringList lines = QStringList::split("\n", QString::fromLocal8Bit(buffer, buflen)); -// for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it) +// TQStringList lines = TQStringList::split("\n", TQString::fromLocal8Bit(buffer, buflen)); +// for (TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it) for(int i = 0; i < buflen; i++) output += buffer[i]; kdWarning( 14160 ) << k_funcinfo << " output now = " << output << endl; diff --git a/kopete/protocols/sms/services/smssendprovider.h b/kopete/protocols/sms/services/smssendprovider.h index 8560be15..bd046104 100644 --- a/kopete/protocols/sms/services/smssendprovider.h +++ b/kopete/protocols/sms/services/smssendprovider.h @@ -17,11 +17,11 @@ #ifndef SMSSENDPROVIDER_H #define SMSSENDPROVIDER_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -37,18 +37,18 @@ class SMSSendProvider : public QObject { Q_OBJECT public: - SMSSendProvider(const QString& providerName, const QString& prefixValue, Kopete::Account* account, QObject* parent = 0, const char* name = 0); + SMSSendProvider(const TQString& providerName, const TQString& prefixValue, Kopete::Account* account, TQObject* parent = 0, const char* name = 0); ~SMSSendProvider(); void setAccount(Kopete::Account *account); int count(); - const QString& name(int i); - const QString& value(int i); - const QString& description(int i); + const TQString& name(int i); + const TQString& value(int i); + const TQString& description(int i); const bool isHidden(int i); - void save(QPtrList& args); + void save(TQPtrList& args); void send(const Kopete::Message& msg); int maxSize(); @@ -56,18 +56,18 @@ private slots: void slotReceivedOutput(KProcess*, char *buffer, int buflen); void slotSendFinished(KProcess*); private: - QStringList names; - QStringList descriptions; - QStringList values; - QValueList isHiddens; + TQStringList names; + TQStringList descriptions; + TQStringList values; + TQValueList isHiddens; int messagePos; int telPos; int m_maxSize; - QString provider; - QString prefix; - QCString output; + TQString provider; + TQString prefix; + TQCString output; Kopete::Account* m_account; @@ -76,7 +76,7 @@ private: bool canSend; signals: void messageSent(const Kopete::Message& msg); - void messageNotSent(const Kopete::Message& msg, const QString &error); + void messageNotSent(const Kopete::Message& msg, const TQString &error); } ; #endif //SMSSENDPROVIDER_H diff --git a/kopete/protocols/sms/smsaccount.cpp b/kopete/protocols/sms/smsaccount.cpp index 5a13dca2..8fea6a12 100644 --- a/kopete/protocols/sms/smsaccount.cpp +++ b/kopete/protocols/sms/smsaccount.cpp @@ -34,24 +34,24 @@ #include "smsprotocol.h" #include "smscontact.h" -SMSAccount::SMSAccount( SMSProtocol *parent, const QString &accountID, const char *name ) +SMSAccount::SMSAccount( SMSProtocol *parent, const TQString &accountID, const char *name ) : Kopete::Account( parent, accountID, name ) { setMyself( new SMSContact(this, accountID, accountID, Kopete::ContactList::self()->myself()) ); loadConfig(); myself()->setOnlineStatus( SMSProtocol::protocol()->SMSOffline ); - QString sName = configGroup()->readEntry("ServiceName", QString::null); + TQString sName = configGroup()->readEntry("ServiceName", TQString::null); theService = ServiceLoader::loadService(sName, this); if( theService ) { - QObject::connect (theService, SIGNAL(messageSent(const Kopete::Message &)), - this, SLOT(slotSendingSuccess(const Kopete::Message &))); - QObject::connect (theService, SIGNAL(messageNotSent(const Kopete::Message &, const QString &)), - this, SLOT(slotSendingFailure(const Kopete::Message &, const QString &))); - QObject::connect (theService, SIGNAL(connected()), this, SLOT(slotConnected())); - QObject::connect (theService, SIGNAL(disconnected()), this, SLOT(slotDisconnected())); + TQObject::connect (theService, TQT_SIGNAL(messageSent(const Kopete::Message &)), + this, TQT_SLOT(slotSendingSuccess(const Kopete::Message &))); + TQObject::connect (theService, TQT_SIGNAL(messageNotSent(const Kopete::Message &, const TQString &)), + this, TQT_SLOT(slotSendingFailure(const Kopete::Message &, const TQString &))); + TQObject::connect (theService, TQT_SIGNAL(connected()), this, TQT_SLOT(slotConnected())); + TQObject::connect (theService, TQT_SIGNAL(disconnected()), this, TQT_SLOT(slotDisconnected())); } } @@ -65,13 +65,13 @@ SMSAccount::~SMSAccount() void SMSAccount::loadConfig() { theSubEnable = configGroup()->readBoolEntry("SubEnable", false); - theSubCode = configGroup()->readEntry("SubCode", QString::null); + theSubCode = configGroup()->readEntry("SubCode", TQString::null); theLongMsgAction = (SMSMsgAction)configGroup()->readNumEntry("MsgAction", 0); } -void SMSAccount::translateNumber(QString &theNumber) +void SMSAccount::translateNumber(TQString &theNumber) { - if(theNumber[0] == QChar('0') && theSubEnable) + if(theNumber[0] == TQChar('0') && theSubEnable) theNumber.replace(0, 1, theSubCode); } @@ -90,7 +90,7 @@ const bool SMSAccount::splitNowMsgTooLong(int msgLength) return false; } -void SMSAccount::setAway( bool /*away*/, const QString &) +void SMSAccount::setAway( bool /*away*/, const TQString &) { } @@ -138,7 +138,7 @@ void SMSAccount::slotSendMessage(Kopete::Message &msg) { for (int i=0; i < msgLength / theService->maxSize() + 1; i++) { - QString text = msg.plainBody(); + TQString text = msg.plainBody(); text = text.mid( theService->maxSize() * i, theService->maxSize() ); Kopete::Message m( msg.from(), msg.to(), text, Kopete::Message::Outbound); @@ -162,14 +162,14 @@ void SMSAccount::slotSendingSuccess(const Kopete::Message &msg) c->slotSendingSuccess(msg); } -void SMSAccount::slotSendingFailure(const Kopete::Message &msg, const QString &error) +void SMSAccount::slotSendingFailure(const Kopete::Message &msg, const TQString &error) { SMSContact* c = dynamic_cast(msg.to().first()); if( c ) c->slotSendingFailure(msg, error); } -bool SMSAccount::createContact( const QString &contactId, +bool SMSAccount::createContact( const TQString &contactId, Kopete::MetaContact * parentContact ) { if (new SMSContact(this, contactId, parentContact->displayName(), parentContact)) @@ -184,7 +184,7 @@ KActionMenu* SMSAccount::actionMenu() return theActionMenu; } -void SMSAccount::setOnlineStatus( const Kopete::OnlineStatus & status , const QString &reason) +void SMSAccount::setOnlineStatus( const Kopete::OnlineStatus & status , const TQString &reason) { if ( myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline && status.status() == Kopete::OnlineStatus::Online ) connect(); diff --git a/kopete/protocols/sms/smsaccount.h b/kopete/protocols/sms/smsaccount.h index 2547fe6c..1df8a63f 100644 --- a/kopete/protocols/sms/smsaccount.h +++ b/kopete/protocols/sms/smsaccount.h @@ -32,14 +32,14 @@ class SMSAccount : public Kopete::Account Q_OBJECT public: - SMSAccount( SMSProtocol *parent, const QString &accountID, const char *name = 0L ); + SMSAccount( SMSProtocol *parent, const TQString &accountID, const char *name = 0L ); ~SMSAccount(); virtual KActionMenu* actionMenu(); // Per-protocol actions for the systray and the status bar - virtual void setAway( bool away, const QString & ); + virtual void setAway( bool away, const TQString & ); - void translateNumber(QString &theNumber); + void translateNumber(TQString &theNumber); /** * Checks to see if the message should be split or not, in case it is too long. @@ -52,7 +52,7 @@ public: public slots: void loadConfig(); - void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null); + void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null); public slots: virtual void connect(const Kopete::OnlineStatus& initial= Kopete::OnlineStatus()); @@ -61,17 +61,17 @@ public slots: protected slots: virtual void slotSendingSuccess(const Kopete::Message &msg); - virtual void slotSendingFailure(const Kopete::Message &msg, const QString &error); + virtual void slotSendingFailure(const Kopete::Message &msg, const TQString &error); virtual void slotConnected(); virtual void slotDisconnected(); protected: - bool createContact(const QString &contactId, Kopete::MetaContact *parentContact); + bool createContact(const TQString &contactId, Kopete::MetaContact *parentContact); private: bool theSubEnable; - QString theSubCode; + TQString theSubCode; SMSMsgAction theLongMsgAction; SMSService* theService; }; diff --git a/kopete/protocols/sms/smsaddcontactpage.cpp b/kopete/protocols/sms/smsaddcontactpage.cpp index 55921b49..c18e5866 100644 --- a/kopete/protocols/sms/smsaddcontactpage.cpp +++ b/kopete/protocols/sms/smsaddcontactpage.cpp @@ -17,15 +17,15 @@ #include "smsaddcontactpage.h" #include "kopeteaccount.h" -#include -#include +#include +#include -SMSAddContactPage::SMSAddContactPage(QWidget *parent, const char *name ) +SMSAddContactPage::SMSAddContactPage(TQWidget *parent, const char *name ) : AddContactPage(parent,name) { - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); smsdata = new smsAddUI(this); } @@ -38,8 +38,8 @@ bool SMSAddContactPage::apply(Kopete::Account* a, Kopete::MetaContact* m) { if ( validateData() ) { - QString nr = smsdata->addNr->text(); - QString name = smsdata->addName->text(); + TQString nr = smsdata->addNr->text(); + TQString name = smsdata->addName->text(); return a->addContact( nr, m, Kopete::Account::ChangeKABC ); } diff --git a/kopete/protocols/sms/smsaddcontactpage.h b/kopete/protocols/sms/smsaddcontactpage.h index 37843bc9..6f6f4290 100644 --- a/kopete/protocols/sms/smsaddcontactpage.h +++ b/kopete/protocols/sms/smsaddcontactpage.h @@ -16,9 +16,9 @@ #ifndef SMSADDCONTACTPAGE_H #define SMSADDCONTACTPAGE_H -#include +#include #include -#include +#include class smsAddUI; class SMSProtocol; @@ -27,7 +27,7 @@ class SMSAddContactPage : public AddContactPage { Q_OBJECT public: - SMSAddContactPage(QWidget *parent=0, const char *name=0); + SMSAddContactPage(TQWidget *parent=0, const char *name=0); ~SMSAddContactPage(); smsAddUI *smsdata; virtual bool validateData(); diff --git a/kopete/protocols/sms/smscontact.cpp b/kopete/protocols/sms/smscontact.cpp index d220b380..f47a0b46 100644 --- a/kopete/protocols/sms/smscontact.cpp +++ b/kopete/protocols/sms/smscontact.cpp @@ -31,8 +31,8 @@ #include "smsaccount.h" #include "smsuserpreferences.h" -SMSContact::SMSContact( Kopete::Account* _account, const QString &phoneNumber, - const QString &displayName, Kopete::MetaContact *parent ) +SMSContact::SMSContact( Kopete::Account* _account, const TQString &phoneNumber, + const TQString &displayName, Kopete::MetaContact *parent ) : Kopete::Contact( _account, phoneNumber, parent ), m_phoneNumber( phoneNumber ) { // kdWarning( 14160 ) << k_funcinfo << " this = " << this << ", phone = " << phoneNumber << endl; @@ -51,7 +51,7 @@ void SMSContact::slotSendingSuccess(const Kopete::Message &msg) manager(Kopete::Contact::CanCreate)->appendMessage((Kopete::Message &)msg); } -void SMSContact::slotSendingFailure(const Kopete::Message &/*msg*/, const QString &error) +void SMSContact::slotSendingFailure(const Kopete::Message &/*msg*/, const TQString &error) { KMessageBox::detailedError(Kopete::UI::Global::mainWidget(), i18n("Something went wrong when sending message."), error, i18n("Could Not Send Message")); @@ -60,8 +60,8 @@ void SMSContact::slotSendingFailure(const Kopete::Message &/*msg*/, const QStrin manager(Kopete::Contact::CanCreate)->messageSucceeded(); } -void SMSContact::serialize( QMap &serializedData, - QMap & /* addressBookData */ ) +void SMSContact::serialize( TQMap &serializedData, + TQMap & /* addressBookData */ ) { // Contact id and display name are already set for us if (m_phoneNumber != contactId()) @@ -76,12 +76,12 @@ Kopete::ChatSession* SMSContact::manager( Kopete::Contact::CanCreateFlags canCre } else { - QPtrList contacts; + TQPtrList contacts; contacts.append(this); m_msgManager = Kopete::ChatSessionManager::self()->create(account()->myself(), contacts, protocol()); - connect(m_msgManager, SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession*)), - account(), SLOT(slotSendMessage(Kopete::Message&))); - connect(m_msgManager, SIGNAL(destroyed()), this, SLOT(slotChatSessionDestroyed())); + connect(m_msgManager, TQT_SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession*)), + account(), TQT_SLOT(slotSendMessage(Kopete::Message&))); + connect(m_msgManager, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotChatSessionDestroyed())); return m_msgManager; } } @@ -101,29 +101,29 @@ void SMSContact::deleteContact() deleteLater(); } -const QString SMSContact::qualifiedNumber() +const TQString SMSContact::qualifiedNumber() { - QString number = m_phoneNumber; + TQString number = m_phoneNumber; dynamic_cast(account())->translateNumber(number); return number; } -const QString &SMSContact::phoneNumber() +const TQString &SMSContact::phoneNumber() { return m_phoneNumber; } -void SMSContact::setPhoneNumber( const QString phoneNumber ) +void SMSContact::setPhoneNumber( const TQString phoneNumber ) { deleteLater(); new SMSContact(account(), phoneNumber, nickName(), metaContact()); } -QPtrList* SMSContact::customContextMenuActions() +TQPtrList* SMSContact::customContextMenuActions() { - QPtrList *m_actionCollection = new QPtrList(); + TQPtrList *m_actionCollection = new TQPtrList(); if( !m_actionPrefs ) - m_actionPrefs = new KAction(i18n("&Contact Settings"), 0, this, SLOT(userPrefs()), this, "userPrefs"); + m_actionPrefs = new KAction(i18n("&Contact Settings"), 0, this, TQT_SLOT(userPrefs()), this, "userPrefs"); m_actionCollection->append( m_actionPrefs ); diff --git a/kopete/protocols/sms/smscontact.h b/kopete/protocols/sms/smscontact.h index b47d2bd9..548aa063 100644 --- a/kopete/protocols/sms/smscontact.h +++ b/kopete/protocols/sms/smscontact.h @@ -20,7 +20,7 @@ #include "kopetecontact.h" #include "kopetemessage.h" -#include +#include class SMSAccount; namespace Kopete { class ChatSession; } @@ -33,20 +33,20 @@ class SMSContact : public Kopete::Contact { Q_OBJECT public: - SMSContact( Kopete::Account* _account, const QString &phoneNumber, - const QString &displayName, Kopete::MetaContact *parent ); + SMSContact( Kopete::Account* _account, const TQString &phoneNumber, + const TQString &displayName, Kopete::MetaContact *parent ); - QPtrList* customContextMenuActions(); + TQPtrList* customContextMenuActions(); - const QString &phoneNumber(); - void setPhoneNumber( const QString phoneNumber ); - const QString qualifiedNumber(); + const TQString &phoneNumber(); + void setPhoneNumber( const TQString phoneNumber ); + const TQString qualifiedNumber(); /** * Serialize contact */ - virtual void serialize( QMap &serializedData, - QMap &addressBookData ); + virtual void serialize( TQMap &serializedData, + TQMap &addressBookData ); Kopete::ChatSession* manager( Kopete::Contact::CanCreateFlags canCreate = Kopete::Contact::CanCreate ); @@ -54,7 +54,7 @@ public slots: virtual void slotUserInfo(); virtual void deleteContact(); void slotSendingSuccess(const Kopete::Message &msg); - void slotSendingFailure(const Kopete::Message &msg, const QString &error); + void slotSendingFailure(const Kopete::Message &msg, const TQString &error); private slots: void userPrefs(); @@ -63,7 +63,7 @@ private slots: private: KAction* m_actionPrefs; - QString m_phoneNumber; + TQString m_phoneNumber; Kopete::ChatSession* m_msgManager; }; diff --git a/kopete/protocols/sms/smseditaccountwidget.cpp b/kopete/protocols/sms/smseditaccountwidget.cpp index b74c24f4..97379e75 100644 --- a/kopete/protocols/sms/smseditaccountwidget.cpp +++ b/kopete/protocols/sms/smseditaccountwidget.cpp @@ -14,13 +14,13 @@ ************************************************************************* */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -35,10 +35,10 @@ #include "smsprotocol.h" #include "smsaccount.h" -SMSEditAccountWidget::SMSEditAccountWidget(SMSProtocol *protocol, Kopete::Account *account, QWidget *parent, const char */*name*/) - : QWidget(parent), KopeteEditAccountWidget(account) +SMSEditAccountWidget::SMSEditAccountWidget(SMSProtocol *protocol, Kopete::Account *account, TQWidget *parent, const char */*name*/) + : TQWidget(parent), KopeteEditAccountWidget(account) { - QVBoxLayout *l = new QVBoxLayout(this, QBoxLayout::Down); + TQVBoxLayout *l = new TQVBoxLayout(this, TQBoxLayout::Down); preferencesDialog = new smsActPrefsUI(this); l->addWidget(preferencesDialog); @@ -48,25 +48,25 @@ SMSEditAccountWidget::SMSEditAccountWidget(SMSProtocol *protocol, Kopete::Accoun m_protocol = protocol; - QString sName; + TQString sName; if (account) { preferencesDialog->accountId->setText(account->accountId()); //Disable changing the account ID for now //FIXME: Remove this when we can safely change the account ID (Matt) preferencesDialog->accountId->setDisabled(true); - sName = account->configGroup()->readEntry("ServiceName", QString::null); + sName = account->configGroup()->readEntry("ServiceName", TQString::null); preferencesDialog->subEnable->setChecked(account->configGroup()->readBoolEntry("SubEnable", false)); - preferencesDialog->subCode->setText(account->configGroup()->readEntry("SubCode", QString::null)); + preferencesDialog->subCode->setText(account->configGroup()->readEntry("SubCode", TQString::null)); preferencesDialog->ifMessageTooLong->setCurrentItem(SMSMsgAction(account->configGroup()->readNumEntry("MsgAction", 0))); } preferencesDialog->serviceName->insertStringList(ServiceLoader::services()); - connect (preferencesDialog->serviceName, SIGNAL(activated(const QString &)), - this, SLOT(setServicePreferences(const QString &))); - connect (preferencesDialog->descButton, SIGNAL(clicked()), - this, SLOT(showDescription())); + connect (preferencesDialog->serviceName, TQT_SIGNAL(activated(const TQString &)), + this, TQT_SLOT(setServicePreferences(const TQString &))); + connect (preferencesDialog->descButton, TQT_SIGNAL(clicked()), + this, TQT_SLOT(showDescription())); for (int i=0; i < preferencesDialog->serviceName->count(); i++) @@ -108,7 +108,7 @@ Kopete::Account* SMSEditAccountWidget::apply() return account(); } -void SMSEditAccountWidget::setServicePreferences(const QString& serviceName) +void SMSEditAccountWidget::setServicePreferences(const TQString& serviceName) { delete service; delete configWidget; @@ -118,10 +118,10 @@ void SMSEditAccountWidget::setServicePreferences(const QString& serviceName) if (service == 0L) return; - connect (this, SIGNAL(saved()), service, SLOT(savePreferences())); + connect (this, TQT_SIGNAL(saved()), service, TQT_SLOT(savePreferences())); delete middleFrameLayout; - middleFrameLayout = new QGridLayout(preferencesDialog->middleFrame, 1, 2, 0, 6, "middleFrameLayout"); + middleFrameLayout = new TQGridLayout(preferencesDialog->middleFrame, 1, 2, 0, 6, "middleFrameLayout"); service->setWidgetContainer(preferencesDialog->middleFrame, middleFrameLayout); } @@ -129,7 +129,7 @@ void SMSEditAccountWidget::showDescription() { SMSService* s = ServiceLoader::loadService(preferencesDialog->serviceName->currentText(), 0L); - QString d = s->description(); + TQString d = s->description(); KMessageBox::information(Kopete::UI::Global::mainWidget(), d, i18n("Description")); } diff --git a/kopete/protocols/sms/smseditaccountwidget.h b/kopete/protocols/sms/smseditaccountwidget.h index eaf83d42..12d1bc68 100644 --- a/kopete/protocols/sms/smseditaccountwidget.h +++ b/kopete/protocols/sms/smseditaccountwidget.h @@ -17,7 +17,7 @@ #ifndef SMSEDITACCOUNTWIDGET_H #define SMSEDITACCOUNTWIDGET_H -#include +#include #include "editaccountwidget.h" class SMSProtocol; @@ -26,24 +26,24 @@ class smsActPrefsUI; namespace Kopete { class Account; } class QGridLayout; -class SMSEditAccountWidget : public QWidget, public KopeteEditAccountWidget +class SMSEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT public: - SMSEditAccountWidget(SMSProtocol *protocol, Kopete::Account *theAccount, QWidget *parent = 0, const char *name = 0); + SMSEditAccountWidget(SMSProtocol *protocol, Kopete::Account *theAccount, TQWidget *parent = 0, const char *name = 0); ~SMSEditAccountWidget(); bool validateData(); Kopete::Account* apply(); public slots: - void setServicePreferences(const QString& serviceName); + void setServicePreferences(const TQString& serviceName); void showDescription(); protected: smsActPrefsUI *preferencesDialog; - QWidget *configWidget; + TQWidget *configWidget; SMSService *service; SMSProtocol *m_protocol; - QGridLayout *middleFrameLayout; + TQGridLayout *middleFrameLayout; signals: void saved(); diff --git a/kopete/protocols/sms/smsprotocol.cpp b/kopete/protocols/sms/smsprotocol.cpp index 6b6cd838..361eba57 100644 --- a/kopete/protocols/sms/smsprotocol.cpp +++ b/kopete/protocols/sms/smsprotocol.cpp @@ -32,11 +32,11 @@ K_EXPORT_COMPONENT_FACTORY( kopete_sms, SMSProtocolFactory( "kopete_sms" ) ) SMSProtocol* SMSProtocol::s_protocol = 0L; -SMSProtocol::SMSProtocol(QObject *parent, const char *name, const QStringList &/*args*/) +SMSProtocol::SMSProtocol(TQObject *parent, const char *name, const TQStringList &/*args*/) : Kopete::Protocol( SMSProtocolFactory::instance(), parent, name ), - SMSOnline( Kopete::OnlineStatus::Online, 25, this, 0, QString::null, i18n( "Online" ), i18n( "Online" ), Kopete::OnlineStatusManager::Online ), - SMSConnecting( Kopete::OnlineStatus::Connecting,2, this, 3, QString::null, i18n( "Connecting" ) ), - SMSOffline( Kopete::OnlineStatus::Offline, 0, this, 2, QString::null, i18n( "Offline" ), i18n( "Offline" ), Kopete::OnlineStatusManager::Offline ) + SMSOnline( Kopete::OnlineStatus::Online, 25, this, 0, TQString::null, i18n( "Online" ), i18n( "Online" ), Kopete::OnlineStatusManager::Online ), + SMSConnecting( Kopete::OnlineStatus::Connecting,2, this, 3, TQString::null, i18n( "Connecting" ) ), + SMSOffline( Kopete::OnlineStatus::Offline, 0, this, 2, TQString::null, i18n( "Offline" ), i18n( "Offline" ), Kopete::OnlineStatusManager::Offline ) { if (s_protocol) kdWarning( 14160 ) << k_funcinfo << "s_protocol already defined!" << endl; @@ -51,12 +51,12 @@ SMSProtocol::~SMSProtocol() s_protocol = 0L; } -AddContactPage *SMSProtocol::createAddContactWidget(QWidget *parent, Kopete::Account */*i*/) +AddContactPage *SMSProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account */*i*/) { return new SMSAddContactPage(parent); } -KopeteEditAccountWidget* SMSProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget* SMSProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return new SMSEditAccountWidget(this, account, parent); } @@ -67,14 +67,14 @@ SMSProtocol* SMSProtocol::protocol() } Kopete::Contact *SMSProtocol::deserializeContact(Kopete::MetaContact *metaContact, - const QMap &serializedData, - const QMap &/* addressBookData */) + const TQMap &serializedData, + const TQMap &/* addressBookData */) { - QString contactId = serializedData["contactId"]; - QString accountId = serializedData["accountId"]; - QString displayName = serializedData["displayName"]; + TQString contactId = serializedData["contactId"]; + TQString accountId = serializedData["accountId"]; + TQString displayName = serializedData["displayName"]; - QDict accounts=Kopete::AccountManager::self()->accounts(this); + TQDict accounts=Kopete::AccountManager::self()->accounts(this); Kopete::Account *account = accounts[accountId]; if (!account) @@ -86,7 +86,7 @@ Kopete::Contact *SMSProtocol::deserializeContact(Kopete::MetaContact *metaContac return new SMSContact(account, contactId, displayName, metaContact); } -Kopete::Account* SMSProtocol::createNewAccount(const QString &accountId) +Kopete::Account* SMSProtocol::createNewAccount(const TQString &accountId) { return new SMSAccount(this, accountId); } diff --git a/kopete/protocols/sms/smsprotocol.h b/kopete/protocols/sms/smsprotocol.h index 1d4aaa40..411fa934 100644 --- a/kopete/protocols/sms/smsprotocol.h +++ b/kopete/protocols/sms/smsprotocol.h @@ -17,12 +17,12 @@ #ifndef SMSPROTOCOL_H #define SMSPROTOCOL_H -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "kopeteprotocol.h" #include "kopeteonlinestatus.h" @@ -42,7 +42,7 @@ class SMSProtocol : public Kopete::Protocol Q_OBJECT public: - SMSProtocol(QObject *parent, const char *name, const QStringList &args); + SMSProtocol(TQObject *parent, const char *name, const TQStringList &args); ~SMSProtocol(); static SMSProtocol *protocol(); @@ -51,11 +51,11 @@ public: * Deserialize contact data */ virtual Kopete::Contact *deserializeContact(Kopete::MetaContact *metaContact, - const QMap &serializedData, const QMap &addressBookData ); + const TQMap &serializedData, const TQMap &addressBookData ); - virtual AddContactPage *createAddContactWidget(QWidget *parent , Kopete::Account *i); - virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent); - virtual Kopete::Account *createNewAccount(const QString &accountId); + virtual AddContactPage *createAddContactWidget(TQWidget *parent , Kopete::Account *i); + virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, TQWidget *parent); + virtual Kopete::Account *createNewAccount(const TQString &accountId); const Kopete::OnlineStatus SMSOnline; const Kopete::OnlineStatus SMSOffline; diff --git a/kopete/protocols/sms/smsservice.cpp b/kopete/protocols/sms/smsservice.cpp index 81b46533..5fe4bb1a 100644 --- a/kopete/protocols/sms/smsservice.cpp +++ b/kopete/protocols/sms/smsservice.cpp @@ -14,14 +14,14 @@ ************************************************************************* */ -#include +#include #include #include "smsservice.h" SMSService::SMSService(Kopete::Account* account) - : QObject(), m_account(account) + : TQObject(), m_account(account) { } diff --git a/kopete/protocols/sms/smsservice.h b/kopete/protocols/sms/smsservice.h index f1c04470..5a1b0561 100644 --- a/kopete/protocols/sms/smsservice.h +++ b/kopete/protocols/sms/smsservice.h @@ -17,9 +17,9 @@ #ifndef SMSSERVICE_H #define SMSSERVICE_H -#include -#include -#include +#include +#include +#include #include "kopetemessage.h" @@ -48,11 +48,11 @@ public: * settings widget's parent and @param layout is the 2xn grid layout it may * use. */ - virtual void setWidgetContainer(QWidget* parent, QGridLayout* layout) = 0; + virtual void setWidgetContainer(TQWidget* parent, TQGridLayout* layout) = 0; virtual void send(const Kopete::Message& msg) = 0; virtual int maxSize() = 0; - virtual const QString& description() = 0; + virtual const TQString& description() = 0; public slots: virtual void savePreferences() = 0; @@ -61,14 +61,14 @@ public slots: signals: void messageSent(const Kopete::Message &); - void messageNotSent(const Kopete::Message &, const QString &); + void messageNotSent(const Kopete::Message &, const TQString &); void connected(); void disconnected(); protected: Kopete::Account* m_account; - QGridLayout* m_layout; - QWidget* m_parent; + TQGridLayout* m_layout; + TQWidget* m_parent; }; #endif //SMSSERVICE_H diff --git a/kopete/protocols/sms/smsuserpreferences.cpp b/kopete/protocols/sms/smsuserpreferences.cpp index 89677080..7c3e799c 100644 --- a/kopete/protocols/sms/smsuserpreferences.cpp +++ b/kopete/protocols/sms/smsuserpreferences.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include +#include #include #include diff --git a/kopete/protocols/sms/smsuserpreferences.h b/kopete/protocols/sms/smsuserpreferences.h index 29fb6dd2..7331c53a 100644 --- a/kopete/protocols/sms/smsuserpreferences.h +++ b/kopete/protocols/sms/smsuserpreferences.h @@ -18,7 +18,7 @@ #define SMSUSERPREFERENCES_H #include -#include +#include class SMSPreferencesBase; class SMSUserPrefsUI; @@ -33,7 +33,7 @@ public: private: SMSPreferencesBase* prefBase; SMSUserPrefsUI* userPrefs; - QVBox* topWidget; + TQVBox* topWidget; SMSContact* m_contact; public slots: diff --git a/kopete/protocols/testbed/testbedaccount.cpp b/kopete/protocols/testbed/testbedaccount.cpp index fbb3462a..cc906447 100644 --- a/kopete/protocols/testbed/testbedaccount.cpp +++ b/kopete/protocols/testbed/testbedaccount.cpp @@ -29,7 +29,7 @@ #include "testbedprotocol.h" -TestbedAccount::TestbedAccount( TestbedProtocol *parent, const QString& accountID, const char *name ) +TestbedAccount::TestbedAccount( TestbedProtocol *parent, const TQString& accountID, const char *name ) : Kopete::Account ( parent, accountID , name ) { // Init the myself contact @@ -51,20 +51,20 @@ KActionMenu* TestbedAccount::actionMenu() KAction *action; - action = new KAction (i18n ("Show my own video..."), "testbed_showvideo", 0, this, SLOT (slotShowVideo ()), this, "actionShowVideo"); + action = new KAction (i18n ("Show my own video..."), "testbed_showvideo", 0, this, TQT_SLOT (slotShowVideo ()), this, "actionShowVideo"); mActionMenu->insert(action); action->setEnabled( isConnected() ); return mActionMenu; } -bool TestbedAccount::createContact(const QString& contactId, Kopete::MetaContact* parentContact) +bool TestbedAccount::createContact(const TQString& contactId, Kopete::MetaContact* parentContact) { TestbedContact* newContact = new TestbedContact( this, contactId, TestbedContact::Echo, parentContact->displayName(), parentContact ); return newContact != 0L; } -void TestbedAccount::setAway( bool away, const QString & /* reason */ ) +void TestbedAccount::setAway( bool away, const TQString & /* reason */ ) { if ( away ) slotGoAway(); @@ -72,7 +72,7 @@ void TestbedAccount::setAway( bool away, const QString & /* reason */ ) slotGoOnline(); } -void TestbedAccount::setOnlineStatus(const Kopete::OnlineStatus& status, const QString &reason ) +void TestbedAccount::setOnlineStatus(const Kopete::OnlineStatus& status, const TQString &reason ) { if ( status.status() == Kopete::OnlineStatus::Online && myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline ) @@ -90,15 +90,15 @@ void TestbedAccount::connect( const Kopete::OnlineStatus& /* initialStatus */ ) { kdDebug ( 14210 ) << k_funcinfo << endl; myself()->setOnlineStatus( TestbedProtocol::protocol()->testbedOnline ); - QObject::connect ( m_server, SIGNAL ( messageReceived( const QString & ) ), - this, SLOT ( receivedMessage( const QString & ) ) ); + TQObject::connect ( m_server, TQT_SIGNAL ( messageReceived( const TQString & ) ), + this, TQT_SLOT ( receivedMessage( const TQString & ) ) ); } void TestbedAccount::disconnect() { kdDebug ( 14210 ) << k_funcinfo << endl; myself()->setOnlineStatus( TestbedProtocol::protocol()->testbedOffline ); - QObject::disconnect ( m_server, 0, 0, 0 ); + TQObject::disconnect ( m_server, 0, 0, 0 ); } TestbedFakeServer * TestbedAccount::server() @@ -147,10 +147,10 @@ void TestbedAccount::slotShowVideo () updateContactStatus(); } -void TestbedAccount::receivedMessage( const QString &message ) +void TestbedAccount::receivedMessage( const TQString &message ) { // Look up the contact the message is from - QString from; + TQString from; TestbedContact* messageSender; from = message.section( ':', 0, 0 ); @@ -167,7 +167,7 @@ void TestbedAccount::receivedMessage( const QString &message ) void TestbedAccount::updateContactStatus() { - QDictIterator itr( contacts() ); + TQDictIterator itr( contacts() ); for ( ; itr.current(); ++itr ) itr.current()->setOnlineStatus( myself()->onlineStatus() ); } diff --git a/kopete/protocols/testbed/testbedaccount.h b/kopete/protocols/testbed/testbedaccount.h index 34429300..52261cb7 100644 --- a/kopete/protocols/testbed/testbedaccount.h +++ b/kopete/protocols/testbed/testbedaccount.h @@ -36,7 +36,7 @@ class TestbedAccount : public Kopete::Account { Q_OBJECT public: - TestbedAccount( TestbedProtocol *parent, const QString& accountID, const char *name = 0 ); + TestbedAccount( TestbedProtocol *parent, const TQString& accountID, const char *name = 0 ); ~TestbedAccount(); /** * Construct the context menu used for the status bar icon @@ -47,15 +47,15 @@ public: * Creates a protocol specific Kopete::Contact subclass and adds it to the supplie * Kopete::MetaContact */ - virtual bool createContact(const QString& contactId, Kopete::MetaContact* parentContact); + virtual bool createContact(const TQString& contactId, Kopete::MetaContact* parentContact); /** * Called when Kopete is set globally away */ - virtual void setAway(bool away, const QString& reason); + virtual void setAway(bool away, const TQString& reason); /** * Called when Kopete status is changed globally */ - virtual void setOnlineStatus(const Kopete::OnlineStatus& status , const QString &reason = QString::null); + virtual void setOnlineStatus(const Kopete::OnlineStatus& status , const TQString &reason = TQString::null); /** * 'Connect' to the testbed server. Only sets myself() online. */ @@ -73,7 +73,7 @@ public slots: * Called by the server when it has a message for us. * This identifies the sending Kopete::Contact and passes it a Kopete::Message */ - void receivedMessage( const QString &message ); + void receivedMessage( const TQString &message ); protected: /** diff --git a/kopete/protocols/testbed/testbedaddcontactpage.cpp b/kopete/protocols/testbed/testbedaddcontactpage.cpp index 5327b5b4..bb016453 100644 --- a/kopete/protocols/testbed/testbedaddcontactpage.cpp +++ b/kopete/protocols/testbed/testbedaddcontactpage.cpp @@ -16,9 +16,9 @@ #include "testbedaddcontactpage.h" -#include -#include -#include +#include +#include +#include #include #include "kopeteaccount.h" @@ -26,11 +26,11 @@ #include "testbedaddui.h" -TestbedAddContactPage::TestbedAddContactPage( QWidget* parent, const char* name ) +TestbedAddContactPage::TestbedAddContactPage( TQWidget* parent, const char* name ) : AddContactPage(parent, name) { kdDebug(14210) << k_funcinfo << endl; - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); m_testbedAddUI = new TestbedAddUI( this ); } @@ -43,12 +43,12 @@ bool TestbedAddContactPage::apply( Kopete::Account* a, Kopete::MetaContact* m ) if ( validateData() ) { bool ok = false; - QString type; - QString name; + TQString type; + TQString name; if ( m_testbedAddUI->m_rbEcho->isOn() ) { type = m_testbedAddUI->m_uniqueName->text(); - name = QString::fromLatin1( "Echo Contact" ); + name = TQString::fromLatin1( "Echo Contact" ); ok = true; } if ( ok ) diff --git a/kopete/protocols/testbed/testbedaddcontactpage.h b/kopete/protocols/testbed/testbedaddcontactpage.h index fd7642f3..f430f559 100644 --- a/kopete/protocols/testbed/testbedaddcontactpage.h +++ b/kopete/protocols/testbed/testbedaddcontactpage.h @@ -31,7 +31,7 @@ class TestbedAddContactPage : public AddContactPage { Q_OBJECT public: - TestbedAddContactPage( QWidget* parent = 0, const char* name = 0 ); + TestbedAddContactPage( TQWidget* parent = 0, const char* name = 0 ); ~TestbedAddContactPage(); /** diff --git a/kopete/protocols/testbed/testbedcontact.cpp b/kopete/protocols/testbed/testbedcontact.cpp index b5fc1c2c..bf110872 100644 --- a/kopete/protocols/testbed/testbedcontact.cpp +++ b/kopete/protocols/testbed/testbedcontact.cpp @@ -28,8 +28,8 @@ #include "testbedfakeserver.h" #include "testbedprotocol.h" -TestbedContact::TestbedContact( Kopete::Account* _account, const QString &uniqueName, - const TestbedContactType type, const QString &displayName, Kopete::MetaContact *parent ) +TestbedContact::TestbedContact( Kopete::Account* _account, const TQString &uniqueName, + const TestbedContactType type, const TQString &displayName, Kopete::MetaContact *parent ) : Kopete::Contact( _account, uniqueName, parent ) { kdDebug( 14210 ) << k_funcinfo << " uniqueName: " << uniqueName << ", displayName: " << displayName << endl; @@ -49,9 +49,9 @@ bool TestbedContact::isReachable() return true; } -void TestbedContact::serialize( QMap< QString, QString > &serializedData, QMap< QString, QString > & /* addressBookData */ ) +void TestbedContact::serialize( TQMap< TQString, TQString > &serializedData, TQMap< TQString, TQString > & /* addressBookData */ ) { - QString value; + TQString value; switch ( m_type ) { case Null: @@ -71,23 +71,23 @@ Kopete::ChatSession* TestbedContact::manager( CanCreateFlags ) } else { - QPtrList contacts; + TQPtrList contacts; contacts.append(this); m_msgManager = Kopete::ChatSessionManager::self()->create(account()->myself(), contacts, protocol()); - connect(m_msgManager, SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession*)), - this, SLOT( sendMessage( Kopete::Message& ) ) ); - connect(m_msgManager, SIGNAL(destroyed()), this, SLOT(slotChatSessionDestroyed())); + connect(m_msgManager, TQT_SIGNAL(messageSent(Kopete::Message&, Kopete::ChatSession*)), + this, TQT_SLOT( sendMessage( Kopete::Message& ) ) ); + connect(m_msgManager, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotChatSessionDestroyed())); return m_msgManager; } } -QPtrList *TestbedContact::customContextMenuActions() //OBSOLETE +TQPtrList *TestbedContact::customContextMenuActions() //OBSOLETE { //FIXME!!! this function is obsolete, we should use XMLGUI instead /*m_actionCollection = new KActionCollection( this, "userColl" ); m_actionPrefs = new KAction(i18n( "&Contact Settings" ), 0, this, - SLOT( showContactSettings( )), m_actionCollection, "contactSettings" ); + TQT_SLOT( showContactSettings( )), m_actionCollection, "contactSettings" ); return m_actionCollection;*/ return 0L; @@ -114,7 +114,7 @@ void TestbedContact::sendMessage( Kopete::Message &message ) manager()->messageSucceeded(); } -void TestbedContact::receivedMessage( const QString &message ) +void TestbedContact::receivedMessage( const TQString &message ) { // Create a Kopete::Message Kopete::Message *newMessage; diff --git a/kopete/protocols/testbed/testbedcontact.h b/kopete/protocols/testbed/testbedcontact.h index 7f7c168a..f6efa7ee 100644 --- a/kopete/protocols/testbed/testbedcontact.h +++ b/kopete/protocols/testbed/testbedcontact.h @@ -17,7 +17,7 @@ #ifndef TESTBEDCONTACT_H #define TESTBEDCONTACT_H -#include +#include #include "kopetecontact.h" #include "kopetemessage.h" @@ -39,8 +39,8 @@ public: */ enum TestbedContactType { Null, Echo }; - TestbedContact( Kopete::Account* _account, const QString &uniqueName, - const TestbedContact::TestbedContactType type, const QString &displayName, + TestbedContact( Kopete::Account* _account, const TQString &uniqueName, + const TestbedContact::TestbedContactType type, const TQString &displayName, Kopete::MetaContact *parent ); ~TestbedContact(); @@ -50,12 +50,12 @@ public: * Serialize the contact's data into a key-value map * suitable for writing to a file */ - virtual void serialize(QMap< QString, QString >& serializedData, - QMap< QString, QString >& addressBookData); + virtual void serialize(TQMap< TQString, TQString >& serializedData, + TQMap< TQString, TQString >& addressBookData); /** * Return the actions for this contact */ - virtual QPtrList *customContextMenuActions(); + virtual TQPtrList *customContextMenuActions(); /** * Returns a Kopete::ChatSession associated with this contact */ @@ -72,7 +72,7 @@ public slots: * Called when an incoming message arrived * This displays it in the chatwindow */ - void receivedMessage( const QString &message ); + void receivedMessage( const TQString &message ); protected slots: /** diff --git a/kopete/protocols/testbed/testbededitaccountwidget.cpp b/kopete/protocols/testbed/testbededitaccountwidget.cpp index 270b887a..98a52dfc 100644 --- a/kopete/protocols/testbed/testbededitaccountwidget.cpp +++ b/kopete/protocols/testbed/testbededitaccountwidget.cpp @@ -16,18 +16,18 @@ #include "testbededitaccountwidget.h" -#include -#include +#include +#include #include #include "kopeteaccount.h" #include "testbedaccountpreferences.h" #include "testbedaccount.h" #include "testbedprotocol.h" -TestbedEditAccountWidget::TestbedEditAccountWidget( QWidget* parent, Kopete::Account* account) -: QWidget( parent ), KopeteEditAccountWidget( account ) +TestbedEditAccountWidget::TestbedEditAccountWidget( TQWidget* parent, Kopete::Account* account) +: TQWidget( parent ), KopeteEditAccountWidget( account ) { - ( new QVBoxLayout( this ) )->setAutoAdd( true ); + ( new TQVBoxLayout( this ) )->setAutoAdd( true ); kdDebug(14210) << k_funcinfo << endl; m_preferencesWidget = new TestbedAccountPreferences( this ); } @@ -38,7 +38,7 @@ TestbedEditAccountWidget::~TestbedEditAccountWidget() Kopete::Account* TestbedEditAccountWidget::apply() { - QString accountName; + TQString accountName; if ( m_preferencesWidget->m_acctName->text().isEmpty() ) accountName = "Testbed Account"; else diff --git a/kopete/protocols/testbed/testbededitaccountwidget.h b/kopete/protocols/testbed/testbededitaccountwidget.h index 9d2e6089..cbd0722a 100644 --- a/kopete/protocols/testbed/testbededitaccountwidget.h +++ b/kopete/protocols/testbed/testbededitaccountwidget.h @@ -17,7 +17,7 @@ #ifndef TESTBEDEDITACCOUNTWIDGET_H #define TESTBEDEDITACCOUNTWIDGET_H -#include +#include #include class QVBoxLayout; @@ -28,11 +28,11 @@ class TestbedAccountPreferences; * A widget for editing this protocol's accounts * @author Will Stephenson */ -class TestbedEditAccountWidget : public QWidget, public KopeteEditAccountWidget +class TestbedEditAccountWidget : public TQWidget, public KopeteEditAccountWidget { Q_OBJECT public: - TestbedEditAccountWidget( QWidget* parent, Kopete::Account* account); + TestbedEditAccountWidget( TQWidget* parent, Kopete::Account* account); ~TestbedEditAccountWidget(); diff --git a/kopete/protocols/testbed/testbedfakeserver.cpp b/kopete/protocols/testbed/testbedfakeserver.cpp index b1bb3e1e..9a4116ca 100644 --- a/kopete/protocols/testbed/testbedfakeserver.cpp +++ b/kopete/protocols/testbed/testbedfakeserver.cpp @@ -15,7 +15,7 @@ */ #include "testbedfakeserver.h" -#include +#include #include #include "testbedincomingmessage.h" @@ -29,24 +29,24 @@ TestbedFakeServer::~TestbedFakeServer() { } -void TestbedFakeServer::sendMessage( QString contactId, QString message ) +void TestbedFakeServer::sendMessage( TQString contactId, TQString message ) { // see what contact the message is for // if it's for Echo, respond immediately kdDebug( 14210 ) << k_funcinfo << "Message for: " << contactId << ", is: " << message << endl; kdDebug( 14210 ) << "recipient is echo, coming back at you." << endl; // put the message in a map and start a timer to tell it to deliver itself. - //emit messageReceived( QString::fromLatin1( "echo: " ) + message ); - QString messageId = contactId + QString::fromLatin1(": "); + //emit messageReceived( TQString::fromLatin1( "echo: " ) + message ); + TQString messageId = contactId + TQString::fromLatin1(": "); TestbedIncomingMessage* msg = new TestbedIncomingMessage( this, messageId + message ); m_incomingMessages.append( msg ); - QTimer::singleShot( 1000, msg, SLOT( deliver() ) ); + TQTimer::singleShot( 1000, msg, TQT_SLOT( deliver() ) ); // This removes any delivered messages purgeMessages(); } -void TestbedFakeServer::incomingMessage( QString message ) +void TestbedFakeServer::incomingMessage( TQString message ) { emit messageReceived( message ); } diff --git a/kopete/protocols/testbed/testbedfakeserver.h b/kopete/protocols/testbed/testbedfakeserver.h index c5daabe4..1e58031a 100644 --- a/kopete/protocols/testbed/testbedfakeserver.h +++ b/kopete/protocols/testbed/testbedfakeserver.h @@ -17,8 +17,8 @@ #ifndef TESTBEDFAKESERVER_H #define TESTBEDFAKESERVER_H -#include "qobject.h" -#include +#include "tqobject.h" +#include class TestbedIncomingMessage; @@ -35,7 +35,7 @@ public: /** * Called to simulate sending a message to a remote contact */ - void sendMessage( QString contactId, QString message ); + void sendMessage( TQString contactId, TQString message ); public slots: /** @@ -43,13 +43,13 @@ public slots: * In reality, a message on the incoming message list * connects to this slot when it's time to 'arrive' */ - void incomingMessage( QString message ); + void incomingMessage( TQString message ); signals: /** * Tells the account that a message arrived */ - void messageReceived( const QString &message ); + void messageReceived( const TQString &message ); protected: /** @@ -60,7 +60,7 @@ protected: /** * List of incoming messages */ - QPtrList m_incomingMessages; + TQPtrList m_incomingMessages; }; #endif diff --git a/kopete/protocols/testbed/testbedincomingmessage.cpp b/kopete/protocols/testbed/testbedincomingmessage.cpp index fbbd4c83..576e6c12 100644 --- a/kopete/protocols/testbed/testbedincomingmessage.cpp +++ b/kopete/protocols/testbed/testbedincomingmessage.cpp @@ -16,7 +16,7 @@ #include "testbedincomingmessage.h" -TestbedIncomingMessage::TestbedIncomingMessage( TestbedFakeServer* const server , QString message ) +TestbedIncomingMessage::TestbedIncomingMessage( TestbedFakeServer* const server , TQString message ) { m_server = server; m_message = message; diff --git a/kopete/protocols/testbed/testbedincomingmessage.h b/kopete/protocols/testbed/testbedincomingmessage.h index 226368d9..3f27510a 100644 --- a/kopete/protocols/testbed/testbedincomingmessage.h +++ b/kopete/protocols/testbed/testbedincomingmessage.h @@ -17,7 +17,7 @@ #ifndef TESTBEDINCOMINGMESSAGE_H #define TESTBEDINCOMINGMESSAGE_H -#include +#include #include "testbedfakeserver.h" /** @@ -34,7 +34,7 @@ public: * @param server The simulated Kopete side 'client' of the IM system where the message will arrive when 'delivered' * @param message The simulated message */ - TestbedIncomingMessage( TestbedFakeServer* const server , QString message ); + TestbedIncomingMessage( TestbedFakeServer* const server , TQString message ); virtual ~TestbedIncomingMessage(); /** * Has this message already been delivered? @@ -47,7 +47,7 @@ public slots: */ void deliver(); protected: - QString m_message; + TQString m_message; TestbedFakeServer* m_server; bool m_delivered; }; diff --git a/kopete/protocols/testbed/testbedprotocol.cpp b/kopete/protocols/testbed/testbedprotocol.cpp index 838a74b4..97ecaf02 100644 --- a/kopete/protocols/testbed/testbedprotocol.cpp +++ b/kopete/protocols/testbed/testbedprotocol.cpp @@ -29,11 +29,11 @@ K_EXPORT_COMPONENT_FACTORY( kopete_testbed, TestbedProtocolFactory( "kopete_test TestbedProtocol *TestbedProtocol::s_protocol = 0L; -TestbedProtocol::TestbedProtocol( QObject* parent, const char *name, const QStringList &/*args*/ ) +TestbedProtocol::TestbedProtocol( TQObject* parent, const char *name, const TQStringList &/*args*/ ) : Kopete::Protocol( TestbedProtocolFactory::instance(), parent, name ), - testbedOnline( Kopete::OnlineStatus::Online, 25, this, 0, QString::null, i18n( "Online" ), i18n( "O&nline" ) ), + testbedOnline( Kopete::OnlineStatus::Online, 25, this, 0, TQString::null, i18n( "Online" ), i18n( "O&nline" ) ), testbedAway( Kopete::OnlineStatus::Away, 25, this, 1, "msn_away", i18n( "Away" ), i18n( "&Away" ) ), - testbedOffline( Kopete::OnlineStatus::Offline, 25, this, 2, QString::null, i18n( "Offline" ), i18n( "O&ffline" ) ) + testbedOffline( Kopete::OnlineStatus::Offline, 25, this, 2, TQString::null, i18n( "Offline" ), i18n( "O&ffline" ) ) { kdDebug( 14210 ) << k_funcinfo << endl; @@ -46,23 +46,23 @@ TestbedProtocol::~TestbedProtocol() } Kopete::Contact *TestbedProtocol::deserializeContact( - Kopete::MetaContact *metaContact, const QMap &serializedData, - const QMap &/* addressBookData */) + Kopete::MetaContact *metaContact, const TQMap &serializedData, + const TQMap &/* addressBookData */) { - QString contactId = serializedData[ "contactId" ]; - QString accountId = serializedData[ "accountId" ]; - QString displayName = serializedData[ "displayName" ]; - QString type = serializedData[ "contactType" ]; + TQString contactId = serializedData[ "contactId" ]; + TQString accountId = serializedData[ "accountId" ]; + TQString displayName = serializedData[ "displayName" ]; + TQString type = serializedData[ "contactType" ]; TestbedContact::TestbedContactType tbcType; - if ( type == QString::fromLatin1( "echo" ) ) + if ( type == TQString::fromLatin1( "echo" ) ) tbcType = TestbedContact::Echo; - if ( type == QString::fromLatin1( "null" ) ) + if ( type == TQString::fromLatin1( "null" ) ) tbcType = TestbedContact::Null; else tbcType = TestbedContact::Null; - QDict accounts = Kopete::AccountManager::self()->accounts( this ); + TQDict accounts = Kopete::AccountManager::self()->accounts( this ); Kopete::Account *account = accounts[ accountId ]; if ( !account ) @@ -74,19 +74,19 @@ Kopete::Contact *TestbedProtocol::deserializeContact( return new TestbedContact(account, contactId, tbcType, displayName, metaContact); } -AddContactPage * TestbedProtocol::createAddContactWidget( QWidget *parent, Kopete::Account * /* account */ ) +AddContactPage * TestbedProtocol::createAddContactWidget( TQWidget *parent, Kopete::Account * /* account */ ) { kdDebug( 14210 ) << "Creating Add Contact Page" << endl; return new TestbedAddContactPage( parent ); } -KopeteEditAccountWidget * TestbedProtocol::createEditAccountWidget( Kopete::Account *account, QWidget *parent ) +KopeteEditAccountWidget * TestbedProtocol::createEditAccountWidget( Kopete::Account *account, TQWidget *parent ) { kdDebug(14210) << "Creating Edit Account Page" << endl; return new TestbedEditAccountWidget( parent, account ); } -Kopete::Account *TestbedProtocol::createNewAccount( const QString &accountId ) +Kopete::Account *TestbedProtocol::createNewAccount( const TQString &accountId ) { return new TestbedAccount( this, accountId ); } diff --git a/kopete/protocols/testbed/testbedprotocol.h b/kopete/protocols/testbed/testbedprotocol.h index 7ee04b7d..d688e130 100644 --- a/kopete/protocols/testbed/testbedprotocol.h +++ b/kopete/protocols/testbed/testbedprotocol.h @@ -28,7 +28,7 @@ class TestbedProtocol : public Kopete::Protocol { Q_OBJECT public: - TestbedProtocol(QObject *parent, const char *name, const QStringList &args); + TestbedProtocol(TQObject *parent, const char *name, const TQStringList &args); ~TestbedProtocol(); /** * Convert the serialised data back into a TestbedContact and add this @@ -36,21 +36,21 @@ public: */ virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap< QString, QString > & serializedData, - const QMap< QString, QString > & addressBookData + const TQMap< TQString, TQString > & serializedData, + const TQMap< TQString, TQString > & addressBookData ); /** * Generate the widget needed to add TestbedContacts */ - virtual AddContactPage * createAddContactWidget( QWidget *parent, Kopete::Account *account ); + virtual AddContactPage * createAddContactWidget( TQWidget *parent, Kopete::Account *account ); /** * Generate the widget needed to add/edit accounts for this protocol */ - virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, QWidget *parent ); + virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, TQWidget *parent ); /** * Generate a TestbedAccount */ - virtual Kopete::Account * createNewAccount( const QString &accountId ); + virtual Kopete::Account * createNewAccount( const TQString &accountId ); /** * Access the instance of this protocol */ diff --git a/kopete/protocols/testbed/ui/testbedwebcamdialog.cpp b/kopete/protocols/testbed/ui/testbedwebcamdialog.cpp index 22884036..b6a5a3b6 100644 --- a/kopete/protocols/testbed/ui/testbedwebcamdialog.cpp +++ b/kopete/protocols/testbed/ui/testbedwebcamdialog.cpp @@ -18,32 +18,32 @@ #include #include "avdevice/videodevicepool.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include -TestbedWebcamDialog::TestbedWebcamDialog( const QString &contactId, QWidget * parent, const char * name ) +TestbedWebcamDialog::TestbedWebcamDialog( const TQString &contactId, TQWidget * parent, const char * name ) : KDialogBase( KDialogBase::Plain, Qt::WDestructiveClose, parent, name, false, i18n( "Webcam for %1" ).arg( contactId ), KDialogBase::Close, KDialogBase::Close, true /*seperator*/ ) { - setInitialSize( QSize(320,290), false ); + setInitialSize( TQSize(320,290), false ); setEscapeButton( KDialogBase::Close ); -// QObject::connect( this, SIGNAL( closeClicked() ), this, SIGNAL( closingWebcamDialog() ) ); +// TQObject::connect( this, TQT_SIGNAL( closeClicked() ), this, TQT_SIGNAL( closingWebcamDialog() ) ); - QWidget *page = plainPage(); + TQWidget *page = plainPage(); setMainWidget(page); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); mImageContainer = new Kopete::WebcamWidget( page ); mImageContainer->setMinimumSize(320,240); mImageContainer->setText( i18n( "No webcam image received" ) ); - mImageContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + mImageContainer->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); topLayout->add( mImageContainer ); show(); @@ -56,10 +56,10 @@ TestbedWebcamDialog::TestbedWebcamDialog( const QString &contactId, QWidget * pa mVideoDevicePool->getImage(&mImage); kdDebug() << "Just captured 1st frame" << endl; - mPixmap=QPixmap(320,240,-1, QPixmap::DefaultOptim); + mPixmap=TQPixmap(320,240,-1, TQPixmap::DefaultOptim); if (mPixmap.convertFromImage(mImage,0) == true) mImageContainer->updatePixmap(mPixmap); - connect(&qtimer, SIGNAL(timeout()), this, SLOT(slotUpdateImage()) ); + connect(&qtimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateImage()) ); qtimer.start(0,FALSE); } @@ -73,7 +73,7 @@ void TestbedWebcamDialog::slotUpdateImage() { mVideoDevicePool->getFrame(); mVideoDevicePool->getImage(&mImage); - mImageContainer->updatePixmap( QPixmap( mImage ) ); + mImageContainer->updatePixmap( TQPixmap( mImage ) ); } diff --git a/kopete/protocols/testbed/ui/testbedwebcamdialog.h b/kopete/protocols/testbed/ui/testbedwebcamdialog.h index 59f43e68..4f7e85ab 100644 --- a/kopete/protocols/testbed/ui/testbedwebcamdialog.h +++ b/kopete/protocols/testbed/ui/testbedwebcamdialog.h @@ -17,10 +17,10 @@ #ifndef TESTBEDWEBCAMDIALOG_H #define TESTBEDWEBCAMDIALOG_H -#include -#include -#include -#include +#include +#include +#include +#include #include /** @@ -41,7 +41,7 @@ class TestbedWebcamDialog : public KDialogBase { Q_OBJECT public: - TestbedWebcamDialog( const QString &, QWidget* parent = 0, const char* name = 0 ); + TestbedWebcamDialog( const TQString &, TQWidget* parent = 0, const char* name = 0 ); ~TestbedWebcamDialog(); public slots: @@ -51,9 +51,9 @@ public slots: private: Kopete::WebcamWidget *mImageContainer; - QImage mImage; - QTimer qtimer; - QPixmap mPixmap; + TQImage mImage; + TQTimer qtimer; + TQPixmap mPixmap; Kopete::AV::VideoDevicePool *mVideoDevicePool; }; diff --git a/kopete/protocols/winpopup/libwinpopup/libwinpopup.cpp b/kopete/protocols/winpopup/libwinpopup/libwinpopup.cpp index d26e461c..9bdbee27 100644 --- a/kopete/protocols/winpopup/libwinpopup/libwinpopup.cpp +++ b/kopete/protocols/winpopup/libwinpopup/libwinpopup.cpp @@ -16,9 +16,9 @@ ***************************************************************************/ // QT Includes -#include -#include -#include +#include +#include +#include // KDE Includes #include @@ -33,13 +33,13 @@ // Local Includes #include "libwinpopup.h" -WinPopupLib::WinPopupLib(const QString &smbClient,int groupFreq) +WinPopupLib::WinPopupLib(const TQString &smbClient,int groupFreq) : smbClientBin(smbClient), groupCheckFreq(groupFreq) { - connect(&updateGroupDataTimer, SIGNAL(timeout()), this, SLOT(slotUpdateGroupData())); + connect(&updateGroupDataTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateGroupData())); updateGroupDataTimer.start(1, true); - QTimer::singleShot(1, this, SLOT(slotStartDirLister())); + TQTimer::singleShot(1, this, TQT_SLOT(slotStartDirLister())); } WinPopupLib::~WinPopupLib() @@ -51,8 +51,8 @@ void WinPopupLib::slotStartDirLister() if (checkMessageDir()) { dirLister = new KDirLister(); dirLister->setAutoUpdate(true); - connect(dirLister, SIGNAL(newItems(const KFileItemList &)), this, SLOT(slotNewMessages(const KFileItemList &))); - connect(dirLister, SIGNAL(completed()), this, SLOT(slotListCompleted())); + connect(dirLister, TQT_SIGNAL(newItems(const KFileItemList &)), this, TQT_SLOT(slotNewMessages(const KFileItemList &))); + connect(dirLister, TQT_SIGNAL(completed()), this, TQT_SLOT(slotListCompleted())); dirLister->openURL(KURL::fromPathOrURL(WP_POPUP_DIR)); } } @@ -60,11 +60,11 @@ void WinPopupLib::slotStartDirLister() /** * return the group list */ -const QStringList WinPopupLib::getGroups() +const TQStringList WinPopupLib::getGroups() { - QStringList ret; - QMap::ConstIterator end = theGroups.end(); - for(QMap::ConstIterator i = theGroups.begin(); i != end; i++) + TQStringList ret; + TQMap::ConstIterator end = theGroups.end(); + for(TQMap::ConstIterator i = theGroups.begin(); i != end; i++) ret += i.key(); return ret; @@ -73,7 +73,7 @@ const QStringList WinPopupLib::getGroups() /** * return the host list */ -const QStringList WinPopupLib::getHosts(const QString &Group) +const TQStringList WinPopupLib::getHosts(const TQString &Group) { return theGroups[Group].Hosts(); } @@ -81,13 +81,13 @@ const QStringList WinPopupLib::getHosts(const QString &Group) /** * return if a host is in the host list */ -bool WinPopupLib::checkHost(const QString &Name) +bool WinPopupLib::checkHost(const TQString &Name) { // kdDebug() << "WP checkHost: " << Name << endl; bool ret = false; - QMap::Iterator end = theGroups.end(); - for(QMap::Iterator i = theGroups.begin(); i != end && !ret; i++) { + TQMap::Iterator end = theGroups.end(); + for(TQMap::Iterator i = theGroups.begin(); i != end && !ret; i++) { if ((*i).Hosts().contains(Name.upper())) { ret = true; break; @@ -100,7 +100,7 @@ bool WinPopupLib::checkHost(const QString &Name) bool WinPopupLib::checkMessageDir() { - QDir dir(WP_POPUP_DIR); + TQDir dir(WP_POPUP_DIR); if (! dir.exists()) { int tmpYesNo = KMessageBox::warningYesNo(Kopete::UI::Global::mainWidget(), i18n("Working directory %1 does not exist.\n" @@ -108,9 +108,9 @@ bool WinPopupLib::checkMessageDir() "Install Into Samba (Configure... -> Account -> Edit) information\n" "on how to do this.\n" "Should the directory be created? (May need root password)").arg(WP_POPUP_DIR), - QString::fromLatin1("Winpopup"), i18n("Create Directory"), i18n("Do Not Create")); + TQString::fromLatin1("Winpopup"), i18n("Create Directory"), i18n("Do Not Create")); if (tmpYesNo == KMessageBox::Yes) { - QStringList kdesuArgs = QStringList(QString("-c mkdir -p -m 0777 " + WP_POPUP_DIR)); + TQStringList kdesuArgs = TQStringList(TQString("-c mkdir -p -m 0777 " + WP_POPUP_DIR)); if (KApplication::kdeinitExecWait("kdesu", kdesuArgs) == 0) return true; } } else { @@ -127,9 +127,9 @@ bool WinPopupLib::checkMessageDir() "You will not receive messages if you say no.\n" "You can also correct it manually (chmod 0777 %1) and restart kopete.\n" "Fix? (May need root password)").arg(WP_POPUP_DIR), - QString::fromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix")); + TQString::fromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix")); if (tmpYesNo == KMessageBox::Yes) { - QStringList kdesuArgs = QStringList(QString("-c chmod 0777 " + WP_POPUP_DIR)); + TQStringList kdesuArgs = TQStringList(TQString("-c chmod 0777 " + WP_POPUP_DIR)); if (KApplication::kdeinitExecWait("kdesu", kdesuArgs) == 0) return true; } } else { @@ -148,22 +148,22 @@ void WinPopupLib::slotUpdateGroupData() passedInitialHost = false; todo.clear(); currentGroupsMap.clear(); - currentHost = QString::fromLatin1("LOCALHOST"); + currentHost = TQString::fromLatin1("LOCALHOST"); startReadProcess(currentHost); } -void WinPopupLib::startReadProcess(const QString &Host) +void WinPopupLib::startReadProcess(const TQString &Host) { currentHosts.clear(); currentGroups.clear(); - currentGroup = QString(); + currentGroup = TQString(); // for Samba 3 KProcIO *reader = new KProcIO; *reader << smbClientBin << "-N" << "-E" << "-g" << "-L" << Host << "-"; - connect(reader, SIGNAL(readReady(KProcIO *)), this, SLOT(slotReadProcessReady(KProcIO *))); - connect(reader, SIGNAL(processExited(KProcess *)), this, SLOT(slotReadProcessExited(KProcess *))); + connect(reader, TQT_SIGNAL(readReady(KProcIO *)), this, TQT_SLOT(slotReadProcessReady(KProcIO *))); + connect(reader, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotReadProcessExited(KProcess *))); if (!reader->start(KProcess::NotifyOnExit, true)) { // still to come @@ -173,8 +173,8 @@ void WinPopupLib::startReadProcess(const QString &Host) void WinPopupLib::slotReadProcessReady(KProcIO *r) { - QString tmpLine = QString::null; - QRegExp group("^Workgroup\\|(.*)\\|(.*)$"), host("^Server\\|(.*)\\|(.*)$"), + TQString tmpLine = TQString::null; + TQRegExp group("^Workgroup\\|(.*)\\|(.*)$"), host("^Server\\|(.*)\\|(.*)$"), info("^Domain=\\[([^\\]]+)\\] OS=\\[([^\\]]+)\\] Server=\\[([^\\]]+)\\]"), error("Connection.*failed"); @@ -184,7 +184,7 @@ void WinPopupLib::slotReadProcessReady(KProcIO *r) if (group.search(tmpLine) != -1) currentGroups[group.cap(1)] = group.cap(2); if (error.search(tmpLine) != -1) { kdDebug(14170) << "Connection to " << currentHost << " failed!" << endl; - if (currentHost == QString::fromLatin1("LOCALHOST")) currentHost = QString::fromLatin1("failed"); // to be sure + if (currentHost == TQString::fromLatin1("LOCALHOST")) currentHost = TQString::fromLatin1("failed"); // to be sure } } } @@ -203,11 +203,11 @@ void WinPopupLib::slotReadProcessExited(KProcess *r) done += currentHost; if (!currentGroups.isEmpty()) { - QMap newGroups; + TQMap newGroups; //loop through the read groups and check for new ones - QMap::ConstIterator end = currentGroups.end(); - for (QMap::ConstIterator i = currentGroups.begin(); i != end; i++) { - QString groupMaster = i.data(); + TQMap::ConstIterator end = currentGroups.end(); + for (TQMap::ConstIterator i = currentGroups.begin(); i != end; i++) { + TQString groupMaster = i.data(); if (!done.contains(groupMaster)) todo += groupMaster; } } @@ -223,17 +223,17 @@ void WinPopupLib::slotReadProcessExited(KProcess *r) } else { passedInitialHost = true; if (!currentGroups.isEmpty()) { - QMap::ConstIterator end = currentGroups.end(); - for (QMap::ConstIterator i = currentGroups.begin(); i != end; i++) { - QString groupMaster = i.data(); + TQMap::ConstIterator end = currentGroups.end(); + for (TQMap::ConstIterator i = currentGroups.begin(); i != end; i++) { + TQString groupMaster = i.data(); todo += groupMaster; } } else { - if (currentHost == QString::fromLatin1("failed")) + if (currentHost == TQString::fromLatin1("failed")) KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("Connection to localhost failed!\n" "Is your samba server running?"), - QString::fromLatin1("Winpopup")); + TQString::fromLatin1("Winpopup")); } } @@ -250,7 +250,7 @@ void WinPopupLib::slotReadProcessExited(KProcess *r) void WinPopupLib::slotListCompleted() { /// only to check received messages during start up, then we use newItems. GF - disconnect(dirLister, SIGNAL(completed()), this, SLOT(slotListCompleted())); + disconnect(dirLister, TQT_SIGNAL(completed()), this, TQT_SLOT(slotListCompleted())); readMessages(dirLister->items()); } @@ -264,25 +264,25 @@ void WinPopupLib::slotNewMessages(const KFileItemList &items) */ void WinPopupLib::readMessages(const KFileItemList &items) { - QPtrListIterator it(items); + TQPtrListIterator it(items); KFileItem *tmpItem; while ((tmpItem = it.current()) != 0) { if (tmpItem->isFile()) { - QFile messageFile(tmpItem->url().path()); + TQFile messageFile(tmpItem->url().path()); if (messageFile.open(IO_ReadOnly)) { - QTextStream stream(&messageFile); - QString sender; - QDateTime time; - QString text; + TQTextStream stream(&messageFile); + TQString sender; + TQDateTime time; + TQString text; // first line is sender, can this really be empty? GF sender = stream.readLine(); sender = sender.upper(); // second line is time - QString tmpTime = stream.readLine(); - time = QDateTime::fromString(tmpTime, Qt::ISODate); + TQString tmpTime = stream.readLine(); + time = TQDateTime::fromString(tmpTime, Qt::ISODate); while (!stream.atEnd()) { text.append(stream.readLine()); @@ -296,16 +296,16 @@ void WinPopupLib::readMessages(const KFileItemList &items) // delete file if (!messageFile.remove()) { - // QFile::remove() seems to be very persistent, it removes even files with 0444 owned by root + // TQFile::remove() seems to be very persistent, it removes even files with 0444 owned by root // if the directory permissions are 0777 - so this is just for safety. GF kdDebug(14170) << "Message file not removed - how that?" << endl; int tmpYesNo = KMessageBox::warningYesNo(Kopete::UI::Global::mainWidget(), i18n("A message file could not be removed; " "maybe the permissions are wrong.\n" "Fix? (May need root password)"), - QString::fromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix")); + TQString::fromLatin1("Winpopup"), i18n("Fix"), i18n("Do Not Fix")); if (tmpYesNo == KMessageBox::Yes) { - QStringList kdesuArgs = QStringList(QString("-c chmod 0666 " + tmpItem->url().path())); + TQStringList kdesuArgs = TQStringList(TQString("-c chmod 0666 " + tmpItem->url().path())); if (KApplication::kdeinitExecWait("kdesu", kdesuArgs) == 0) { if (!messageFile.remove()) KMessageBox::error(Kopete::UI::Global::mainWidget(), i18n("Still cannot remove it; please fix manually.")); @@ -325,13 +325,13 @@ void WinPopupLib::readMessages(const KFileItemList &items) /** * send a message */ -void WinPopupLib::sendMessage(const QString &Body, const QString &Destination) +void WinPopupLib::sendMessage(const TQString &Body, const TQString &Destination) { KProcess *sender = new KProcess(this); *sender << smbClientBin << "-M" << Destination; *sender << "-N" << "-"; - connect(sender, SIGNAL(processExited(KProcess *)), this, SLOT(slotSendProcessExited(KProcess *))); + connect(sender, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotSendProcessExited(KProcess *))); if (sender->start(KProcess::NotifyOnExit, KProcess::Stdin)) { sender->writeStdin(Body.local8Bit(), Body.local8Bit().length()); @@ -349,7 +349,7 @@ void WinPopupLib::slotSendProcessExited(KProcess *p) delete p; } -void WinPopupLib::settingsChanged(const QString &smbClient, int groupFreq) +void WinPopupLib::settingsChanged(const TQString &smbClient, int groupFreq) { smbClientBin = smbClient; groupCheckFreq = groupFreq; diff --git a/kopete/protocols/winpopup/libwinpopup/libwinpopup.h b/kopete/protocols/winpopup/libwinpopup/libwinpopup.h index 77f8b8a6..0e594932 100644 --- a/kopete/protocols/winpopup/libwinpopup/libwinpopup.h +++ b/kopete/protocols/winpopup/libwinpopup/libwinpopup.h @@ -19,29 +19,29 @@ #define LIBWINPOPUP_H //QT includes -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // KDE Includes #include #include -const QString WP_POPUP_DIR = QString::fromLatin1("/var/lib/winpopup"); +const TQString WP_POPUP_DIR = TQString::fromLatin1("/var/lib/winpopup"); class KDirLister; -typedef QMap stringMap; +typedef TQMap stringMap; class WorkGroup { - QStringList groupHosts; + TQStringList groupHosts; public: - const QStringList &Hosts() { return groupHosts; } - void addHosts(const QStringList &newHosts) { groupHosts = newHosts; } + const TQStringList &Hosts() { return groupHosts; } + void addHosts(const TQStringList &newHosts) { groupHosts = newHosts; } }; class WinPopupLib : public QObject @@ -49,23 +49,23 @@ class WinPopupLib : public QObject Q_OBJECT public: - WinPopupLib(const QString &smbClient,int groupFreq); + WinPopupLib(const TQString &smbClient,int groupFreq); ~WinPopupLib(); - const QStringList getGroups(); - const QStringList getHosts(const QString &Group); - bool checkHost(const QString &Name); - void settingsChanged(const QString &smbClient, int groupFreq); - void sendMessage(const QString &Body, const QString &Destination); + const TQStringList getGroups(); + const TQStringList getHosts(const TQString &Group); + bool checkHost(const TQString &Name); + void settingsChanged(const TQString &smbClient, int groupFreq); + void sendMessage(const TQString &Body, const TQString &Destination); private: bool passedInitialHost; - QMap theGroups, currentGroupsMap; - QString currentGroup, currentHost; - QStringList todo, done, currentHosts; + TQMap theGroups, currentGroupsMap; + TQString currentGroup, currentHost; + TQStringList todo, done, currentHosts; stringMap currentGroups; - QTimer updateGroupDataTimer; - QString smbClientBin; + TQTimer updateGroupDataTimer; + TQString smbClientBin; int groupCheckFreq; KDirLister *dirLister; @@ -74,7 +74,7 @@ private: private slots: void slotUpdateGroupData(); - void startReadProcess(const QString &Host); + void startReadProcess(const TQString &Host); void slotReadProcessReady(KProcIO *r); void slotReadProcessExited(KProcess *r); void slotSendProcessExited(KProcess *p); @@ -83,7 +83,7 @@ private slots: void slotNewMessages(const KFileItemList &items); signals: - void signalNewMessage(const QString &, const QDateTime &, const QString &); + void signalNewMessage(const TQString &, const TQDateTime &, const TQString &); }; #endif diff --git a/kopete/protocols/winpopup/wpaccount.cpp b/kopete/protocols/winpopup/wpaccount.cpp index 4b1342ff..d7439628 100644 --- a/kopete/protocols/winpopup/wpaccount.cpp +++ b/kopete/protocols/winpopup/wpaccount.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ // QT Includes -#include +#include // KDE Includes #include @@ -34,7 +34,7 @@ class KPopupMenu; -WPAccount::WPAccount(WPProtocol *parent, const QString &accountID, const char *name) +WPAccount::WPAccount(WPProtocol *parent, const TQString &accountID, const char *name) : Kopete::Account(parent, accountID, name) { // kdDebug(14170) << "WPAccount::WPAccount()" << endl; @@ -53,20 +53,20 @@ WPAccount::~WPAccount() { } -const QStringList WPAccount::getGroups() +const TQStringList WPAccount::getGroups() { return mProtocol->getGroups(); } -const QStringList WPAccount::getHosts(const QString &Group) +const TQStringList WPAccount::getHosts(const TQString &Group) { return mProtocol->getHosts(Group); } -bool WPAccount::checkHost(const QString &Name) +bool WPAccount::checkHost(const TQString &Name) { // kdDebug() << "WPAccount::checkHost: " << Name << endl; - if (Name.upper() == QString::fromLatin1("LOCALHOST")) { + if (Name.upper() == TQString::fromLatin1("LOCALHOST")) { // Assume localhost is always there, but it will not appear in the samba output. // Should never happen as localhost is now forbidden as contact, just for safety. GF return true; @@ -75,7 +75,7 @@ bool WPAccount::checkHost(const QString &Name) } } -bool WPAccount::createContact(const QString &contactId, Kopete::MetaContact *parentContact ) +bool WPAccount::createContact(const TQString &contactId, Kopete::MetaContact *parentContact ) { // kdDebug(14170) << "[WPAccount::createContact] contactId: " << contactId << endl; @@ -89,7 +89,7 @@ bool WPAccount::createContact(const QString &contactId, Kopete::MetaContact *par return false; } -void WPAccount::slotGotNewMessage(const QString &Body, const QDateTime &Arrival, const QString &From) +void WPAccount::slotGotNewMessage(const TQString &Body, const TQDateTime &Arrival, const TQString &From) { // kdDebug(14170) << "WPAccount::slotGotNewMessage(" << Body << ", " << Arrival.toString() << ", " << From << ")" << endl; @@ -97,7 +97,7 @@ void WPAccount::slotGotNewMessage(const QString &Body, const QDateTime &Arrival, // IPs can not be matched to an account anyway. // This should happen rarely but they make kopete crash. // The reason for this seems to be in ChatSessionManager? GF - QRegExp ip("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"); + TQRegExp ip("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}"); // kdDebug(14170) << "ip.search: " << From << " match: " << ip.search(From) << endl; @@ -142,7 +142,7 @@ void WPAccount::updateAccountId() myself() = new WPContact(this, accountId(), accountId(), 0); }*/ -void WPAccount::setAway(bool status, const QString &awayMessage) +void WPAccount::setAway(bool status, const TQString &awayMessage) { // kdDebug(14170) << "WPAccount::setAway()" << endl; @@ -164,13 +164,13 @@ KActionMenu* WPAccount::actionMenu() if (mProtocol) { - KAction *goOnline = new KAction("Online", QIconSet(mProtocol->WPOnline.iconFor(this)), 0, - this, SLOT(connect()), theActionMenu, "actionGoAvailable"); + KAction *goOnline = new KAction("Online", TQIconSet(mProtocol->WPOnline.iconFor(this)), 0, + this, TQT_SLOT(connect()), theActionMenu, "actionGoAvailable"); goOnline->setEnabled(isConnected() && isAway()); theActionMenu->insert(goOnline); - KAction *goAway = new KAction("Away", QIconSet(mProtocol->WPAway.iconFor(this)), 0, - this, SLOT(goAway()), theActionMenu, "actionGoAway"); + KAction *goAway = new KAction("Away", TQIconSet(mProtocol->WPAway.iconFor(this)), 0, + this, TQT_SLOT(goAway()), theActionMenu, "actionGoAway"); goAway->setEnabled(isConnected() && !isAway()); theActionMenu->insert(goAway); @@ -178,14 +178,14 @@ KActionMenu* WPAccount::actionMenu() theActionMenu->popupMenu()->insertSeparator(); theActionMenu->insert(new KAction(i18n("Properties"), 0, - this, SLOT(editAccount()), theActionMenu, "actionAccountProperties")); + this, TQT_SLOT(editAccount()), theActionMenu, "actionAccountProperties")); } return theActionMenu; } -void WPAccount::slotSendMessage(const QString &Body, const QString &Destination) +void WPAccount::slotSendMessage(const TQString &Body, const TQString &Destination) { kdDebug(14170) << "WPAccount::slotSendMessage(" << Body << ", " << Destination << ")" << endl; @@ -193,7 +193,7 @@ void WPAccount::slotSendMessage(const QString &Body, const QString &Destination) mProtocol->sendMessage(Body, Destination); } -void WPAccount::setOnlineStatus(const Kopete::OnlineStatus &status, const QString &reason) +void WPAccount::setOnlineStatus(const Kopete::OnlineStatus &status, const TQString &reason) { if (myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline && status.status() == Kopete::OnlineStatus::Online) connect( status ); diff --git a/kopete/protocols/winpopup/wpaccount.h b/kopete/protocols/winpopup/wpaccount.h index f916ca86..ae3744de 100644 --- a/kopete/protocols/winpopup/wpaccount.h +++ b/kopete/protocols/winpopup/wpaccount.h @@ -23,7 +23,7 @@ // QT Includes -#include +#include // KDE Includes @@ -51,54 +51,54 @@ class WPAccount : public Kopete::Account // Kopete::Account overloading public: - WPAccount(WPProtocol *parent, const QString& accountID, const char *name = 0); + WPAccount(WPProtocol *parent, const TQString& accountID, const char *name = 0); ~WPAccount(); virtual KActionMenu* actionMenu(); // Per-protocol actions for the systray and the status bar - virtual void setAway(bool status, const QString &); // Set user away + virtual void setAway(bool status, const TQString &); // Set user away public slots: virtual void connect(const Kopete::OnlineStatus &); // Connect to server virtual void disconnect(); // Disconnect from server - void goAvailable() { setAway(false, QString::null); } // Two convenience slots - void goAway() { setAway(true, QString::null); } // for available and away + void goAvailable() { setAway(false, TQString::null); } // Two convenience slots + void goAway() { setAway(true, TQString::null); } // for available and away // Stuff used internally & by colleague classes public: - const QStringList getGroups(); - const QStringList getHosts(const QString &Group); + const TQStringList getGroups(); + const TQStringList getHosts(const TQString &Group); // Stuff used by WPContact public: /** * Returns whether or not the named host is online. */ - bool checkHost(const QString &Name); + bool checkHost(const TQString &Name); public slots: /** * Dispatches said message to the destination. */ - void slotSendMessage(const QString &Body, const QString &Destination); + void slotSendMessage(const TQString &Body, const TQString &Destination); /** * Called when a new message arrives with the message's data. */ - void slotGotNewMessage(const QString &Body, const QDateTime &Arrival, const QString &From); + void slotGotNewMessage(const TQString &Body, const TQDateTime &Arrival, const TQString &From); /* Reimplemented from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus &status , const QString &reason = QString::null); + void setOnlineStatus( const Kopete::OnlineStatus &status , const TQString &reason = TQString::null); protected: - virtual bool createContact(const QString &contactId, Kopete::MetaContact *parentContact); + virtual bool createContact(const TQString &contactId, Kopete::MetaContact *parentContact); private slots: // void updateAccountId(); private: WPProtocol *mProtocol; - QString theAwayMessage; // The message to give when the user is away + TQString theAwayMessage; // The message to give when the user is away }; #endif diff --git a/kopete/protocols/winpopup/wpaddcontact.cpp b/kopete/protocols/winpopup/wpaddcontact.cpp index 6187c644..e5912c14 100644 --- a/kopete/protocols/winpopup/wpaddcontact.cpp +++ b/kopete/protocols/winpopup/wpaddcontact.cpp @@ -18,7 +18,7 @@ * * ***************************************************************************/ // QT Includes -#include +#include // KDE Includes #include @@ -36,14 +36,14 @@ #include "wpaccount.h" #include "wpaddcontact.h" -WPAddContact::WPAddContact(QWidget *parent, WPAccount *newAccount, const char *name) : AddContactPage(parent, name) +WPAddContact::WPAddContact(TQWidget *parent, WPAccount *newAccount, const char *name) : AddContactPage(parent, name) { // kdDebug(14170) << "WPAddContact::WPAddContact(, " << newAccount << ", , " << name << ")" << endl; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); theDialog = new WPAddContactBase(this); - connect(theDialog->mHostGroup, SIGNAL(activated(const QString &)), this, SLOT(slotSelected(const QString &))); - connect(theDialog->mRefresh, SIGNAL(clicked()), this, SLOT(slotUpdateGroups())); + connect(theDialog->mHostGroup, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotSelected(const TQString &))); + connect(theDialog->mRefresh, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpdateGroups())); theDialog->show(); theAccount = newAccount; @@ -61,22 +61,22 @@ void WPAddContact::slotUpdateGroups() kdDebug(14170) << "WPAddContact::slotUpdateGroups()" << endl; theDialog->mHostGroup->clear(); - QStringList Groups = theAccount->getGroups(); - QStringList::ConstIterator end = Groups.end(); - for (QStringList::ConstIterator i = Groups.begin(); i != end; i++) + TQStringList Groups = theAccount->getGroups(); + TQStringList::ConstIterator end = Groups.end(); + for (TQStringList::ConstIterator i = Groups.begin(); i != end; i++) theDialog->mHostGroup->insertItem(SmallIcon("network"), *i); slotSelected(theDialog->mHostGroup->currentText()); } -void WPAddContact::slotSelected(const QString &Group) +void WPAddContact::slotSelected(const TQString &Group) { kdDebug(14170) << "WPAddContact::slotSelected(" << Group << ")" << endl; theDialog->mHostName->clear(); - QStringList Hosts = theAccount->getHosts(Group); - QString ownHost = theAccount->myself()->contactId(); - QStringList::ConstIterator end = Hosts.end(); - for (QStringList::ConstIterator i = Hosts.begin(); i != end; i++) + TQStringList Hosts = theAccount->getHosts(Group); + TQString ownHost = theAccount->myself()->contactId(); + TQStringList::ConstIterator end = Hosts.end(); + for (TQStringList::ConstIterator i = Hosts.begin(); i != end; i++) if (*i != ownHost) theDialog->mHostName->insertItem(SmallIcon("personal"), *i); } @@ -84,7 +84,7 @@ bool WPAddContact::validateData() { kdDebug(14170) << "WPAddContact::validateData()" << endl; - QString tmpHostName = theDialog->mHostName->currentText(); + TQString tmpHostName = theDialog->mHostName->currentText(); if (tmpHostName.isEmpty()) { KMessageBox::sorry(this, i18n("You must enter a valid hostname."), i18n("WinPopup")); @@ -93,7 +93,7 @@ bool WPAddContact::validateData() // If our own host is not allowed as contact localhost should be forbidden as well, // additionally somehow localhost as contact crashes when receiving a message from it?? GF - if (tmpHostName.upper() == QString::fromLatin1("LOCALHOST")) { + if (tmpHostName.upper() == TQString::fromLatin1("LOCALHOST")) { KMessageBox::sorry(this, i18n("LOCALHOST is not allowed as contact."), i18n("WinPopup")); return false; } diff --git a/kopete/protocols/winpopup/wpaddcontact.h b/kopete/protocols/winpopup/wpaddcontact.h index 4d593cba..156e7db9 100644 --- a/kopete/protocols/winpopup/wpaddcontact.h +++ b/kopete/protocols/winpopup/wpaddcontact.h @@ -40,7 +40,7 @@ private: WPAddContactBase *theDialog; public: - WPAddContact(QWidget *parent, WPAccount *newAccount, const char *name = 0); + WPAddContact(TQWidget *parent, WPAccount *newAccount, const char *name = 0); ~WPAddContact(); virtual bool validateData(); @@ -48,7 +48,7 @@ public: public slots: virtual bool apply(Kopete::Account *theAccount, Kopete::MetaContact *theMetaContact); - void slotSelected(const QString &Group); + void slotSelected(const TQString &Group); void slotUpdateGroups(); }; diff --git a/kopete/protocols/winpopup/wpcontact.cpp b/kopete/protocols/winpopup/wpcontact.cpp index 7cf2529c..801b9865 100644 --- a/kopete/protocols/winpopup/wpcontact.cpp +++ b/kopete/protocols/winpopup/wpcontact.cpp @@ -16,7 +16,7 @@ ***************************************************************************/ // Qt Includes -#include +#include // KDE Includes #include @@ -27,13 +27,13 @@ #include "wpcontact.h" #include "wpaccount.h" -WPContact::WPContact(Kopete::Account *account, const QString &newHostName, const QString &nickName, Kopete::MetaContact *metaContact) +WPContact::WPContact(Kopete::Account *account, const TQString &newHostName, const TQString &nickName, Kopete::MetaContact *metaContact) : Kopete::Contact(account, newHostName, metaContact) { // kdDebug(14170) << "WPContact::WPContact(, " << newHostName << ", " << nickName << ", )" << endl; kdDebug(14170) << "WPContact::WPContact: " << this << endl; - QString theNickName = nickName; + TQString theNickName = nickName; if (theNickName.isEmpty()) { // Construct nickname from hostname with first letter to upper. GF @@ -51,17 +51,17 @@ WPContact::WPContact(Kopete::Account *account, const QString &newHostName, const // Initialise and start the periodical checking for contact's status setOnlineStatus(static_cast(protocol())->WPOffline); - connect(&checkStatus, SIGNAL(timeout()), this, SLOT(slotCheckStatus())); + connect(&checkStatus, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCheckStatus())); checkStatus.start(1000, false); } -QPtrList * WPContact::customContextMenuActions() +TQPtrList * WPContact::customContextMenuActions() { //myActionCollection = new KActionCollection(parent); return 0; } -void WPContact::serialize(QMap &serializedData, QMap &addressBookData) +void WPContact::serialize(TQMap &serializedData, TQMap &addressBookData) { // kdDebug(14170) << "WP::serialize(...)" << endl; @@ -72,14 +72,14 @@ Kopete::ChatSession* WPContact::manager( Kopete::Contact::CanCreateFlags /*canCr { if (m_manager == 0) { // Set up the message managers - QPtrList singleContact; + TQPtrList singleContact; singleContact.append(this); m_manager = Kopete::ChatSessionManager::self()->create( account()->myself(), singleContact, protocol() ); - connect(m_manager, SIGNAL(messageSent(Kopete::Message &, Kopete::ChatSession *)), this, SLOT(slotSendMessage(Kopete::Message &))); - connect(m_manager, SIGNAL(messageSent(Kopete::Message &, Kopete::ChatSession *)), m_manager, SLOT(appendMessage(Kopete::Message &))); - connect(m_manager, SIGNAL(destroyed()), this, SLOT(slotChatSessionDestroyed())); + connect(m_manager, TQT_SIGNAL(messageSent(Kopete::Message &, Kopete::ChatSession *)), this, TQT_SLOT(slotSendMessage(Kopete::Message &))); + connect(m_manager, TQT_SIGNAL(messageSent(Kopete::Message &, Kopete::ChatSession *)), m_manager, TQT_SLOT(appendMessage(Kopete::Message &))); + connect(m_manager, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotChatSessionDestroyed())); } return m_manager; @@ -111,7 +111,7 @@ void WPContact::slotUserInfo() if (!m_infoDialog) { m_infoDialog = new WPUserInfo( this, static_cast( account() ) ); if (!m_infoDialog) return; - connect( m_infoDialog, SIGNAL( closing() ), this, SLOT( slotCloseUserInfoDialog() ) ); + connect( m_infoDialog, TQT_SIGNAL( closing() ), this, TQT_SLOT( slotCloseUserInfoDialog() ) ); m_infoDialog->show(); } else { m_infoDialog->raise(); @@ -149,14 +149,14 @@ void WPContact::slotCheckStatus() } } -void WPContact::slotNewMessage(const QString &Body, const QDateTime &Arrival) +void WPContact::slotNewMessage(const TQString &Body, const TQDateTime &Arrival) { kdDebug(14170) << "WPContact::slotNewMessage(" << Body << ", " << Arrival.toString() << ")" << endl; - QPtrList contactList; + TQPtrList contactList; contactList.append(account()->myself()); - QRegExp subj("^Subject: ([^\n]*)\n(.*)$"); + TQRegExp subj("^Subject: ([^\n]*)\n(.*)$"); Kopete::Message msg; if(subj.search(Body) == -1) { @@ -174,7 +174,7 @@ void WPContact::slotSendMessage( Kopete::Message& message ) // Warning: this could crash kdDebug(14170) << message.to().first() << " is " << dynamic_cast( message.to().first() )->contactId() << endl; - QString Message = (!message.subject().isEmpty() ? "Subject: " + message.subject() + "\n" : QString("")) + message.plainBody(); + TQString Message = (!message.subject().isEmpty() ? "Subject: " + message.subject() + "\n" : TQString("")) + message.plainBody(); WPAccount *acct = dynamic_cast(account()); WPContact *contact = dynamic_cast( message.to().first() ); if (acct && contact) { diff --git a/kopete/protocols/winpopup/wpcontact.h b/kopete/protocols/winpopup/wpcontact.h index 343e07f7..d3e13251 100644 --- a/kopete/protocols/winpopup/wpcontact.h +++ b/kopete/protocols/winpopup/wpcontact.h @@ -22,11 +22,11 @@ #include // Qt Includes -//#include -#include -#include -#include -#include +//#include +#include +#include +#include +#include // Kopete Includes #include "kopetecontact.h" @@ -51,18 +51,18 @@ class WPContact: public Kopete::Contact Q_OBJECT public: - WPContact(Kopete::Account *account, const QString &userId, const QString &fullName, Kopete::MetaContact *metaContact); + WPContact(Kopete::Account *account, const TQString &userId, const TQString &fullName, Kopete::MetaContact *metaContact); // virtual bool isOnline() const; virtual bool isReachable(); - virtual QPtrList *customContextMenuActions(); + virtual TQPtrList *customContextMenuActions(); virtual Kopete::ChatSession *manager(Kopete::Contact::CanCreateFlags = Kopete::Contact::CannotCreate); - virtual void serialize(QMap &serializedData, QMap &addressBookData); + virtual void serialize(TQMap &serializedData, TQMap &addressBookData); public slots: virtual void slotUserInfo(); void slotCheckStatus(); // the call back for the checkStatus timer - void slotNewMessage(const QString &Body, const QDateTime &Arrival); + void slotNewMessage(const TQString &Body, const TQDateTime &Arrival); private slots: void slotChatSessionDestroyed(); @@ -72,7 +72,7 @@ private slots: private: bool myWasConnected; // true if protocol connected at last check - QTimer checkStatus; // checks the status of this contact every second or so + TQTimer checkStatus; // checks the status of this contact every second or so // KActionCollection *myActionCollection; // holds all the protocol specific actions (not many!) Kopete::ChatSession *m_manager; diff --git a/kopete/protocols/winpopup/wpeditaccount.cpp b/kopete/protocols/winpopup/wpeditaccount.cpp index 454f5d6f..6e1d1aba 100644 --- a/kopete/protocols/winpopup/wpeditaccount.cpp +++ b/kopete/protocols/winpopup/wpeditaccount.cpp @@ -22,8 +22,8 @@ #include // QT Includes -#include -#include +#include +#include // KDE Includes #include @@ -45,14 +45,14 @@ #include "wpeditaccount.h" #include "wpprotocol.h" -WPEditAccount::WPEditAccount(QWidget *parent, Kopete::Account *theAccount) +WPEditAccount::WPEditAccount(TQWidget *parent, Kopete::Account *theAccount) : WPEditAccountBase(parent), KopeteEditAccountWidget(theAccount) { kdDebug(14170) << "WPEditAccount::WPEditAccount(, )"; mProtocol = WPProtocol::protocol(); - QString tmpSmbcPath = KStandardDirs::findExe("smbclient"); + TQString tmpSmbcPath = KStandardDirs::findExe("smbclient"); if(account()) { mHostName->setText(account()->accountId()); @@ -65,7 +65,7 @@ WPEditAccount::WPEditAccount(QWidget *parent, Kopete::Account *theAccount) } else { // no QT/KDE function? GF - QString theHostName = QString::null; + TQString theHostName = TQString::null; char *tmp = new char[255]; if (tmp != 0) { @@ -101,7 +101,7 @@ bool WPEditAccount::validateData() return false; } - QFile smbc(mSmbcPath->url()); + TQFile smbc(mSmbcPath->url()); if (!smbc.exists()) { KMessageBox::sorry(this, i18n("You must enter a valid smbclient path."), i18n("WinPopup")); return false; diff --git a/kopete/protocols/winpopup/wpeditaccount.h b/kopete/protocols/winpopup/wpeditaccount.h index afa521a7..4714e197 100644 --- a/kopete/protocols/winpopup/wpeditaccount.h +++ b/kopete/protocols/winpopup/wpeditaccount.h @@ -41,7 +41,7 @@ private: WPAccount *mAccount; public: - WPEditAccount(QWidget *parent, Kopete::Account *theAccount); + WPEditAccount(TQWidget *parent, Kopete::Account *theAccount); virtual bool validateData(); void writeConfig(); diff --git a/kopete/protocols/winpopup/wpprotocol.cpp b/kopete/protocols/winpopup/wpprotocol.cpp index b765438c..71d4a76a 100644 --- a/kopete/protocols/winpopup/wpprotocol.cpp +++ b/kopete/protocols/winpopup/wpprotocol.cpp @@ -19,8 +19,8 @@ ***************************************************************************/ // QT Includes -#include -#include +#include +#include // KDE Includes #include @@ -48,11 +48,11 @@ typedef KGenericFactory WPProtocolFactory; K_EXPORT_COMPONENT_FACTORY( kopete_wp, WPProtocolFactory( "kopete_wp" ) ) // WP Protocol -WPProtocol::WPProtocol( QObject *parent, const char *name, const QStringList & /* args */ ) +WPProtocol::WPProtocol( TQObject *parent, const char *name, const TQStringList & /* args */ ) : Kopete::Protocol( WPProtocolFactory::instance(), parent, name ), - WPOnline( Kopete::OnlineStatus::Online, 25, this, 0, QString::null, i18n("Online"), i18n("Online")), + WPOnline( Kopete::OnlineStatus::Online, 25, this, 0, TQString::null, i18n("Online"), i18n("Online")), WPAway( Kopete::OnlineStatus::Away, 20, this, 1, "wp_away", i18n("Away"), i18n("Away")), - WPOffline( Kopete::OnlineStatus::Offline, 0, this, 2, QString::null, i18n("Offline"), i18n("Offline")) + WPOffline( Kopete::OnlineStatus::Offline, 0, this, 2, TQString::null, i18n("Offline"), i18n("Offline")) { // kdDebug(14170) << "WPProtocol::WPProtocol()" << endl; @@ -67,8 +67,8 @@ WPProtocol::WPProtocol( QObject *parent, const char *name, const QStringList & / readConfig(); popupClient = new WinPopupLib(smbClientBin, groupCheckFreq); - QObject::connect(popupClient, SIGNAL(signalNewMessage(const QString &, const QDateTime &, const QString &)), - this, SLOT(slotReceivedMessage(const QString &, const QDateTime &, const QString &))); + TQObject::connect(popupClient, TQT_SIGNAL(signalNewMessage(const TQString &, const TQDateTime &, const TQString &)), + this, TQT_SLOT(slotReceivedMessage(const TQString &, const TQDateTime &, const TQString &))); } // Destructor @@ -79,7 +79,7 @@ WPProtocol::~WPProtocol() sProtocol = 0; } -AddContactPage *WPProtocol::createAddContactWidget(QWidget *parent, Kopete::Account *theAccount) +AddContactPage *WPProtocol::createAddContactWidget(TQWidget *parent, Kopete::Account *theAccount) { // kdDebug(14170) << "WPProtocol::createAddContactWidget(, " << theAccount << ")" << endl; @@ -87,11 +87,11 @@ AddContactPage *WPProtocol::createAddContactWidget(QWidget *parent, Kopete::Acco } Kopete::Contact *WPProtocol::deserializeContact( Kopete::MetaContact *metaContact, - const QMap &serializedData, - const QMap & /* addressBookData */ ) + const TQMap &serializedData, + const TQMap & /* addressBookData */ ) { - QString contactId = serializedData[ "contactId" ]; - QString accountId = serializedData[ "accountId" ]; + TQString contactId = serializedData[ "contactId" ]; + TQString accountId = serializedData[ "accountId" ]; WPAccount *theAccount = static_cast(Kopete::AccountManager::self()->findAccount(protocol()->pluginId(), accountId)); if(!theAccount) { @@ -108,12 +108,12 @@ Kopete::Contact *WPProtocol::deserializeContact( Kopete::MetaContact *metaContac return theAccount->contacts()[contactId]; } -KopeteEditAccountWidget *WPProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *WPProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return new WPEditAccount(parent, account); } -Kopete::Account *WPProtocol::createNewAccount(const QString &accountId) +Kopete::Account *WPProtocol::createNewAccount(const TQString &accountId) { return new WPAccount(this, accountId); } @@ -137,7 +137,7 @@ void WPProtocol::installSamba() { // kdDebug(14170) << "WPProtocol::installSamba()" endl; - QStringList args; + TQStringList args; args += KStandardDirs::findExe("winpopup-install.sh"); args += KStandardDirs::findExe("winpopup-send.sh"); if (KApplication::kdeinitExecWait("kdesu", args) == 0) @@ -149,13 +149,13 @@ void WPProtocol::installSamba() /** * search the contact for the new message and give it to its account */ -void WPProtocol::slotReceivedMessage(const QString &Body, const QDateTime &Time, const QString &From) +void WPProtocol::slotReceivedMessage(const TQString &Body, const TQDateTime &Time, const TQString &From) { bool foundContact = false; - QString accountKey = QString::null; - QDict Accounts = Kopete::AccountManager::self()->accounts(protocol()); - for (QDictIterator it(Accounts); it.current(); ++it) { - QDict Contacts = it.current()->contacts(); + TQString accountKey = TQString::null; + TQDict Accounts = Kopete::AccountManager::self()->accounts(protocol()); + for (TQDictIterator it(Accounts); it.current(); ++it) { + TQDict Contacts = it.current()->contacts(); Kopete::Contact *theContact = Contacts[From]; if (theContact != 0) { foundContact = true; @@ -176,7 +176,7 @@ void WPProtocol::slotReceivedMessage(const QString &Body, const QDateTime &Time, } } -void WPProtocol::sendMessage(const QString &Body, const QString &Destination) +void WPProtocol::sendMessage(const TQString &Body, const TQString &Destination) { popupClient->sendMessage(Body, Destination); } diff --git a/kopete/protocols/winpopup/wpprotocol.h b/kopete/protocols/winpopup/wpprotocol.h index 92a9e434..b54f4972 100644 --- a/kopete/protocols/winpopup/wpprotocol.h +++ b/kopete/protocols/winpopup/wpprotocol.h @@ -22,9 +22,9 @@ #define WPPROTOCOL_H // QT Includes -#include -#include -#include +#include +#include +#include // Kopete Includes #include "kopetemetacontact.h" @@ -51,20 +51,20 @@ class WPProtocol : public Kopete::Protocol // Kopete::Protocol overloading public: - WPProtocol( QObject *parent, const char *name, const QStringList &args ); + WPProtocol( TQObject *parent, const char *name, const TQStringList &args ); ~WPProtocol(); - virtual AddContactPage *createAddContactWidget(QWidget *parent, Kopete::Account *theAccount); - virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent); - virtual Kopete::Account *createNewAccount(const QString &accountId); + virtual AddContactPage *createAddContactWidget(TQWidget *parent, Kopete::Account *theAccount); + virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, TQWidget *parent); + virtual Kopete::Account *createNewAccount(const TQString &accountId); - const QStringList getGroups() {return popupClient->getGroups(); } - const QStringList getHosts(const QString &Group) { return popupClient->getHosts(Group); } - bool checkHost(const QString &Name) { return popupClient->checkHost(Name); } + const TQStringList getGroups() {return popupClient->getGroups(); } + const TQStringList getHosts(const TQString &Group) { return popupClient->getHosts(Group); } + bool checkHost(const TQString &Name) { return popupClient->checkHost(Name); } // Kopete::Plugin overloading public: - virtual Kopete::Contact *deserializeContact(Kopete::MetaContact *metaContact, const QMap &serializedData, const QMap &addressBookData); + virtual Kopete::Contact *deserializeContact(Kopete::MetaContact *metaContact, const TQMap &serializedData, const TQMap &addressBookData); // Stuff used internally & by colleague classes public: @@ -73,15 +73,15 @@ public: const Kopete::OnlineStatus WPOnline; const Kopete::OnlineStatus WPAway; const Kopete::OnlineStatus WPOffline; - void sendMessage(const QString &Body, const QString &Destination); + void sendMessage(const TQString &Body, const TQString &Destination); void settingsChanged(void); // Callback when settings changed public slots: void installSamba(); // Modify smb.conf to use winpopup-send.sh script - void slotReceivedMessage(const QString &Body, const QDateTime &Time, const QString &From); + void slotReceivedMessage(const TQString &Body, const TQDateTime &Time, const TQString &From); private: - QString smbClientBin; + TQString smbClientBin; int groupCheckFreq; void readConfig(); WinPopupLib *popupClient; diff --git a/kopete/protocols/winpopup/wpuserinfo.cpp b/kopete/protocols/winpopup/wpuserinfo.cpp index 7e4348d4..e50805f5 100644 --- a/kopete/protocols/winpopup/wpuserinfo.cpp +++ b/kopete/protocols/winpopup/wpuserinfo.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ // QT Includes -#include +#include // KDE Includes #include @@ -32,8 +32,8 @@ #include "wpaccount.h" #include "wpcontact.h" -WPUserInfo::WPUserInfo( WPContact *contact, WPAccount */*account*/, QWidget *parent, const char* name ) - : KDialogBase( parent, name, false, QString::null, Close, Close, false ), m_contact(contact), +WPUserInfo::WPUserInfo( WPContact *contact, WPAccount */*account*/, TQWidget *parent, const char* name ) + : KDialogBase( parent, name, false, TQString::null, Close, Close, false ), m_contact(contact), Comment(i18n("N/A")), Workgroup(i18n("N/A")), OS(i18n("N/A")), Software(i18n("N/A")) { // kdDebug( 14170 ) << k_funcinfo << endl; @@ -50,23 +50,23 @@ WPUserInfo::WPUserInfo( WPContact *contact, WPAccount */*account*/, QWidget *par m_mainWidget->sOS->setText(i18n("Looking")); m_mainWidget->sServer->setText(i18n("Looking")); - connect( this, SIGNAL( closeClicked() ), this, SLOT( slotCloseClicked() ) ); + connect( this, TQT_SIGNAL( closeClicked() ), this, TQT_SLOT( slotCloseClicked() ) ); startDetailsProcess(m_contact->contactId()); } // I decided to do this direct here to avoid "Handstände" with signals and stuff // if we would do this in libwinpopup. GF -void WPUserInfo::startDetailsProcess(const QString &host) +void WPUserInfo::startDetailsProcess(const TQString &host) { KGlobal::config()->setGroup("WinPopup"); - QString theSMBClientPath = KGlobal::config()->readEntry("SMBClientPath", "/usr/bin/smbclient"); + TQString theSMBClientPath = KGlobal::config()->readEntry("SMBClientPath", "/usr/bin/smbclient"); KProcIO *details = new KProcIO; *details << theSMBClientPath << "-N" << "-E" << "-g" << "-L" << host << "-"; - connect(details, SIGNAL(readReady(KProcIO *)), this, SLOT(slotDetailsProcessReady(KProcIO *))); - connect(details, SIGNAL(processExited(KProcess *)), this, SLOT(slotDetailsProcessExited(KProcess *))); + connect(details, TQT_SIGNAL(readReady(KProcIO *)), this, TQT_SLOT(slotDetailsProcessReady(KProcIO *))); + connect(details, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotDetailsProcessExited(KProcess *))); if (!details->start(KProcess::NotifyOnExit, KProcess::Stderr)) { slotDetailsProcessExited(details); @@ -76,8 +76,8 @@ void WPUserInfo::startDetailsProcess(const QString &host) void WPUserInfo::slotDetailsProcessReady(KProcIO *d) { - QString tmpLine = QString::null; - QRegExp info("^Domain=\\[(.*)\\]\\sOS=\\[(.*)\\]\\sServer=\\[(.*)\\]$"), host("^Server\\|(.*)\\|(.*)$"); + TQString tmpLine = TQString::null; + TQRegExp info("^Domain=\\[(.*)\\]\\sOS=\\[(.*)\\]\\sServer=\\[(.*)\\]$"), host("^Server\\|(.*)\\|(.*)$"); while (d->readln(tmpLine) > -1) { if (info.search(tmpLine) != -1) { diff --git a/kopete/protocols/winpopup/wpuserinfo.h b/kopete/protocols/winpopup/wpuserinfo.h index 1c4ce0e9..2059ba2c 100644 --- a/kopete/protocols/winpopup/wpuserinfo.h +++ b/kopete/protocols/winpopup/wpuserinfo.h @@ -36,9 +36,9 @@ class WPUserInfo : public KDialogBase Q_OBJECT public: - WPUserInfo( WPContact *, WPAccount *, QWidget *parent = 0, const char* name = "WPUserInfo" ); + WPUserInfo( WPContact *, WPAccount *, TQWidget *parent = 0, const char* name = "WPUserInfo" ); - void startDetailsProcess(const QString &host); + void startDetailsProcess(const TQString &host); private slots: void slotDetailsProcessReady(KProcIO *d); @@ -52,7 +52,7 @@ class WPUserInfo : public KDialogBase WPContact *m_contact; WPUserInfoWidget *m_mainWidget; - QString Comment, Workgroup, OS, Software; + TQString Comment, Workgroup, OS, Software; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/bytestream.cpp b/kopete/protocols/yahoo/libkyahoo/bytestream.cpp index ad299bf8..8ca3a4cd 100644 --- a/kopete/protocols/yahoo/libkyahoo/bytestream.cpp +++ b/kopete/protocols/yahoo/libkyahoo/bytestream.cpp @@ -36,7 +36,7 @@ //! //! The signals connectionClosed(), delayedCloseFinished(), readyRead(), //! bytesWritten(), and error() serve the exact same function as those from -//! QSocket. +//! TQSocket. //! //! The simplest way to create a ByteStream is to reimplement isOpen(), close(), //! and tryWrite(). Call appendRead() whenever you want to make data available for @@ -60,13 +60,13 @@ class ByteStream::Private public: Private() {} - QByteArray readBuf, writeBuf; + TQByteArray readBuf, writeBuf; }; //! //! Constructs a ByteStream object with parent \a parent. -ByteStream::ByteStream(QObject *parent) -:QObject(parent) +ByteStream::ByteStream(TQObject *parent) +:TQObject(parent) { // kdDebug(14181) << k_funcinfo << endl; d = new Private; @@ -97,7 +97,7 @@ void ByteStream::close() //! //! Writes array \a a to the stream. -void ByteStream::write(const QByteArray &a) +void ByteStream::write(const TQByteArray &a) { // kdDebug(14181) << k_funcinfo << "[data size: " << a.size() << "]" << endl; @@ -115,7 +115,7 @@ void ByteStream::write(const QByteArray &a) //! //! Reads bytes \a bytes of data from the stream and returns them as an array. If \a bytes is 0, then //! \a read will return all available data. -QByteArray ByteStream::read(int bytes) +TQByteArray ByteStream::read(int bytes) { // kdDebug(14181) << k_funcinfo << " " << bytes <<" [bytes]"<< endl; return takeRead(bytes); @@ -138,11 +138,11 @@ int ByteStream::bytesToWrite() const //! //! Writes string \a cs to the stream. -void ByteStream::write(const QCString &cs) +void ByteStream::write(const TQCString &cs) { // kdDebug(14181) << k_funcinfo << "[data size: " << cs.length() << "]" << endl; - QByteArray block(cs.length()); + TQByteArray block(cs.length()); memcpy(block.data(), cs.data(), block.size()); write(block); } @@ -163,7 +163,7 @@ void ByteStream::clearWriteBuffer() //! //! Appends \a block to the end of the read buffer. -void ByteStream::appendRead(const QByteArray &block) +void ByteStream::appendRead(const TQByteArray &block) { // kdDebug(14181) << k_funcinfo << endl; appendArray(&d->readBuf, block); @@ -171,7 +171,7 @@ void ByteStream::appendRead(const QByteArray &block) //! //! Appends \a block to the end of the write buffer. -void ByteStream::appendWrite(const QByteArray &block) +void ByteStream::appendWrite(const TQByteArray &block) { // kdDebug(14181) << k_funcinfo << "[data size: " << block.size() << "]" << endl; @@ -182,7 +182,7 @@ void ByteStream::appendWrite(const QByteArray &block) //! Returns \a size bytes from the start of the read buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeRead(int size, bool del) +TQByteArray ByteStream::takeRead(int size, bool del) { // kdDebug(14181) << k_funcinfo << "[data size: " << size << "][ delete :" << del << " ]" << endl; return takeArray(&d->readBuf, size, del); @@ -192,7 +192,7 @@ QByteArray ByteStream::takeRead(int size, bool del) //! Returns \a size bytes from the start of the write buffer. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeWrite(int size, bool del) +TQByteArray ByteStream::takeWrite(int size, bool del) { // kdDebug(14181) << k_funcinfo << "[data size: " << size << "][ delete :" << del << " ]" << endl; return takeArray(&d->writeBuf, size, del); @@ -200,14 +200,14 @@ QByteArray ByteStream::takeWrite(int size, bool del) //! //! Returns a reference to the read buffer. -QByteArray & ByteStream::readBuf() +TQByteArray & ByteStream::readBuf() { return d->readBuf; } //! //! Returns a reference to the write buffer. -QByteArray & ByteStream::writeBuf() +TQByteArray & ByteStream::writeBuf() { // kdDebug(14181) << k_funcinfo << endl; return d->writeBuf; @@ -224,7 +224,7 @@ int ByteStream::tryWrite() //! //! Append array \a b to the end of the array pointed to by \a a. -void ByteStream::appendArray(QByteArray *a, const QByteArray &b) +void ByteStream::appendArray(TQByteArray *a, const TQByteArray &b) { // kdDebug(14181) << k_funcinfo << endl; int oldsize = a->size(); @@ -236,11 +236,11 @@ void ByteStream::appendArray(QByteArray *a, const QByteArray &b) //! Returns \a size bytes from the start of the array pointed to by \a from. //! If \a size is 0, then all available data will be returned. //! If \a del is TRUE, then the bytes are also removed. -QByteArray ByteStream::takeArray(QByteArray *from, int size, bool del) +TQByteArray ByteStream::takeArray(TQByteArray *from, int size, bool del) { // kdDebug(14181) << k_funcinfo << "[int size] : " << size << " [bool del] " << del << endl; - QByteArray a; + TQByteArray a; if(size == 0) { a = from->copy(); if(del) diff --git a/kopete/protocols/yahoo/libkyahoo/bytestream.h b/kopete/protocols/yahoo/libkyahoo/bytestream.h index 1c2dfa15..a990a940 100644 --- a/kopete/protocols/yahoo/libkyahoo/bytestream.h +++ b/kopete/protocols/yahoo/libkyahoo/bytestream.h @@ -21,8 +21,8 @@ #ifndef CS_BYTESTREAM_H #define CS_BYTESTREAM_H -#include -#include +#include +#include // CS_NAMESPACE_BEGIN @@ -32,20 +32,20 @@ class ByteStream : public QObject Q_OBJECT public: enum Error { ErrRead, ErrWrite, ErrCustom = 10 }; - ByteStream(QObject *parent=0); + ByteStream(TQObject *parent=0); virtual ~ByteStream()=0; virtual bool isOpen() const; virtual void close(); - virtual void write(const QByteArray &); - virtual QByteArray read(int bytes=0); + virtual void write(const TQByteArray &); + virtual TQByteArray read(int bytes=0); virtual int bytesAvailable() const; virtual int bytesToWrite() const; - void write(const QCString &); + void write(const TQCString &); - static void appendArray(QByteArray *a, const QByteArray &b); - static QByteArray takeArray(QByteArray *from, int size=0, bool del=true); + static void appendArray(TQByteArray *a, const TQByteArray &b); + static TQByteArray takeArray(TQByteArray *from, int size=0, bool del=true); signals: void connectionClosed(); @@ -57,12 +57,12 @@ signals: protected: void clearReadBuffer(); void clearWriteBuffer(); - void appendRead(const QByteArray &); - void appendWrite(const QByteArray &); - QByteArray takeRead(int size=0, bool del=true); - QByteArray takeWrite(int size=0, bool del=true); - QByteArray & readBuf(); - QByteArray & writeBuf(); + void appendRead(const TQByteArray &); + void appendWrite(const TQByteArray &); + TQByteArray takeRead(int size=0, bool del=true); + TQByteArray takeWrite(int size=0, bool del=true); + TQByteArray & readBuf(); + TQByteArray & writeBuf(); virtual int tryWrite(); private: diff --git a/kopete/protocols/yahoo/libkyahoo/changestatustask.cpp b/kopete/protocols/yahoo/libkyahoo/changestatustask.cpp index 3d73920c..1943aa6b 100644 --- a/kopete/protocols/yahoo/libkyahoo/changestatustask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/changestatustask.cpp @@ -69,7 +69,7 @@ void ChangeStatusTask::sendVisibility( Visibility visible ) send( t ); } -void ChangeStatusTask::setMessage( const QString &msg ) +void ChangeStatusTask::setMessage( const TQString &msg ) { m_message = msg; } diff --git a/kopete/protocols/yahoo/libkyahoo/changestatustask.h b/kopete/protocols/yahoo/libkyahoo/changestatustask.h index 22c48031..a70007df 100644 --- a/kopete/protocols/yahoo/libkyahoo/changestatustask.h +++ b/kopete/protocols/yahoo/libkyahoo/changestatustask.h @@ -35,12 +35,12 @@ public: virtual void onGo(); - void setMessage( const QString &msg ); + void setMessage( const TQString &msg ); void setStatus( Yahoo::Status status ); void setType( Yahoo::StatusType type ); private: enum Visibility { Visible = 1, Invisible = 2 }; - QString m_message; + TQString m_message; Yahoo::Status m_status; Yahoo::StatusType m_type; diff --git a/kopete/protocols/yahoo/libkyahoo/chatsessiontask.cpp b/kopete/protocols/yahoo/libkyahoo/chatsessiontask.cpp index cacd7f80..3be83a79 100644 --- a/kopete/protocols/yahoo/libkyahoo/chatsessiontask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/chatsessiontask.cpp @@ -21,7 +21,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include +#include #include ChatSessionTask::ChatSessionTask(Task* parent) : Task(parent) @@ -55,7 +55,7 @@ void ChatSessionTask::onGo() setSuccess(); } -void ChatSessionTask::setTarget( const QString &to ) +void ChatSessionTask::setTarget( const TQString &to ) { m_target = to; } diff --git a/kopete/protocols/yahoo/libkyahoo/chatsessiontask.h b/kopete/protocols/yahoo/libkyahoo/chatsessiontask.h index 964ff411..fc5e02ce 100644 --- a/kopete/protocols/yahoo/libkyahoo/chatsessiontask.h +++ b/kopete/protocols/yahoo/libkyahoo/chatsessiontask.h @@ -35,10 +35,10 @@ public: virtual void onGo(); - void setTarget( const QString &to ); + void setTarget( const TQString &to ); void setType( Type type ); private: - QString m_target; + TQString m_target; Type m_type; }; diff --git a/kopete/protocols/yahoo/libkyahoo/client.cpp b/kopete/protocols/yahoo/libkyahoo/client.cpp index 710da771..d2a4b8dd 100644 --- a/kopete/protocols/yahoo/libkyahoo/client.cpp +++ b/kopete/protocols/yahoo/libkyahoo/client.cpp @@ -19,8 +19,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include #include @@ -67,13 +67,13 @@ public: ClientStream *stream; int id_seed; Task *root; - QString host, user, pass; + TQString host, user, pass; uint port; bool active; YahooBuddyIconLoader *iconLoader; int error; - QString errorString; - QString errorInformation; + TQString errorString; + TQString errorInformation; // tasks bool tasksInitialized; @@ -92,19 +92,19 @@ public: // Connection data uint sessionID; - QString yCookie; - QString tCookie; - QString cCookie; + TQString yCookie; + TQString tCookie; + TQString cCookie; Yahoo::Status status; Yahoo::Status statusOnConnect; - QString statusMessageOnConnect; + TQString statusMessageOnConnect; Yahoo::PictureStatus pictureFlag; int pictureChecksum; bool buddyListReady; - QStringList pictureRequestQueue; + TQStringList pictureRequestQueue; }; -Client::Client(QObject *par) :QObject(par, "yahooclient") +Client::Client(TQObject *par) :TQObject(par, "yahooclient") { d = new ClientPrivate; /* d->tzoffset = 0;*/ @@ -122,18 +122,18 @@ Client::Client(QObject *par) :QObject(par, "yahooclient") d->buddyListReady = false; m_connector = 0L; - m_pingTimer = new QTimer( this ); - QObject::connect( m_pingTimer, SIGNAL( timeout() ), this, SLOT( sendPing() ) ); + m_pingTimer = new TQTimer( this ); + TQObject::connect( m_pingTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( sendPing() ) ); - QObject::connect( d->loginTask, SIGNAL( haveSessionID( uint ) ), SLOT( lt_gotSessionID( uint ) ) ); - QObject::connect( d->loginTask, SIGNAL( buddyListReady() ), SLOT( processPictureQueue() ) ); - QObject::connect( d->loginTask, SIGNAL( loginResponse( int, const QString& ) ), - SLOT( slotLoginResponse( int, const QString& ) ) ); - QObject::connect( d->loginTask, SIGNAL( haveCookies() ), SLOT( slotGotCookies() ) ); - QObject::connect( d->listTask, SIGNAL( gotBuddy(const QString &, const QString &, const QString &) ), - SIGNAL( gotBuddy(const QString &, const QString &, const QString &) ) ); - QObject::connect( d->listTask, SIGNAL( stealthStatusChanged( const QString&, Yahoo::StealthStatus ) ), - SIGNAL( stealthStatusChanged( const QString&, Yahoo::StealthStatus ) ) ); + TQObject::connect( d->loginTask, TQT_SIGNAL( haveSessionID( uint ) ), TQT_SLOT( lt_gotSessionID( uint ) ) ); + TQObject::connect( d->loginTask, TQT_SIGNAL( buddyListReady() ), TQT_SLOT( processPictureQueue() ) ); + TQObject::connect( d->loginTask, TQT_SIGNAL( loginResponse( int, const TQString& ) ), + TQT_SLOT( slotLoginResponse( int, const TQString& ) ) ); + TQObject::connect( d->loginTask, TQT_SIGNAL( haveCookies() ), TQT_SLOT( slotGotCookies() ) ); + TQObject::connect( d->listTask, TQT_SIGNAL( gotBuddy(const TQString &, const TQString &, const TQString &) ), + TQT_SIGNAL( gotBuddy(const TQString &, const TQString &, const TQString &) ) ); + TQObject::connect( d->listTask, TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthStatus ) ), + TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthStatus ) ) ); } Client::~Client() @@ -144,7 +144,7 @@ Client::~Client() delete d; } -void Client::connect( const QString &host, const uint port, const QString &userId, const QString &pass ) +void Client::connect( const TQString &host, const uint port, const TQString &userId, const TQString &pass ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; d->host = host; @@ -156,10 +156,10 @@ void Client::connect( const QString &host, const uint port, const QString &userI m_connector = new KNetworkConnector; m_connector->setOptHostPort( host, port ); d->stream = new ClientStream( m_connector, this ); - QObject::connect( d->stream, SIGNAL( connected() ), this, SLOT( cs_connected() ) ); - QObject::connect( d->stream, SIGNAL( error(int) ), this, SLOT( streamError(int) ) ); - QObject::connect( d->stream, SIGNAL( readyRead() ), this, SLOT( streamReadyRead() ) ); - QObject::connect( d->stream, SIGNAL( connectionClosed() ), this, SLOT( streamDisconnected() ) ); + TQObject::connect( d->stream, TQT_SIGNAL( connected() ), this, TQT_SLOT( cs_connected() ) ); + TQObject::connect( d->stream, TQT_SIGNAL( error(int) ), this, TQT_SLOT( streamError(int) ) ); + TQObject::connect( d->stream, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( streamReadyRead() ) ); + TQObject::connect( d->stream, TQT_SIGNAL( connectionClosed() ), this, TQT_SLOT( streamDisconnected() ) ); d->stream->connectToServer( host, false ); } @@ -193,7 +193,7 @@ void Client::close() deleteTasks(); d->loginTask->reset(); if( d->stream ) { - QObject::disconnect( d->stream, SIGNAL( readyRead() ), this, SLOT( streamReadyRead() ) ); + TQObject::disconnect( d->stream, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( streamReadyRead() ) ); d->stream->deleteLater(); } d->stream = 0L; @@ -209,12 +209,12 @@ int Client::error() return d->error; } -QString Client::errorString() +TQString Client::errorString() { return d->errorString; } -QString Client::errorInformation() +TQString Client::errorInformation() { return d->errorInformation; } @@ -223,7 +223,7 @@ QString Client::errorInformation() void Client::streamError( int error ) { kdDebug(YAHOO_RAW_DEBUG) << "CLIENT ERROR (Error " << error << ")" << endl; - QString msg; + TQString msg; d->active = false; @@ -265,7 +265,7 @@ void Client::lt_loginFinished() slotLoginResponse( d->loginTask->statusCode(), d->loginTask->statusString() ); } -void Client::slotLoginResponse( int response, const QString &msg ) +void Client::slotLoginResponse( int response, const TQString &msg ) { if( response == Yahoo::LoginOk ) { @@ -273,7 +273,7 @@ void Client::slotLoginResponse( int response, const QString &msg ) d->statusOnConnect == Yahoo::StatusInvisible) || !d->statusMessageOnConnect.isEmpty() ) changeStatus( d->statusOnConnect, d->statusMessageOnConnect, Yahoo::StatusTypeAway ); - d->statusMessageOnConnect = QString::null; + d->statusMessageOnConnect = TQString::null; setStatus( d->statusOnConnect ); /* only send a ping every hour. we get disconnected otherwise */ m_pingTimer->start( 60 * 60 * 1000 ); @@ -306,7 +306,7 @@ void Client::slotGotCookies() // INTERNALS // // ***** Messaging handling ***** -void Client::sendTyping( const QString &who, bool typing ) +void Client::sendTyping( const TQString &who, bool typing ) { SendNotifyTask *snt = new SendNotifyTask( d->root ); snt->setTarget( who ); @@ -315,7 +315,7 @@ void Client::sendTyping( const QString &who, bool typing ) snt->go( true ); } -void Client::sendWebcamInvite( const QString &who ) +void Client::sendWebcamInvite( const TQString &who ) { if( !d->webcamTask->transmitting() ) d->webcamTask->registerWebcam(); @@ -323,7 +323,7 @@ void Client::sendWebcamInvite( const QString &who ) d->webcamTask->addPendingInvitation( who ); } -void Client::sendMessage( const QString &to, const QString &msg ) +void Client::sendMessage( const TQString &to, const TQString &msg ) { SendMessageTask *smt = new SendMessageTask( d->root ); smt->setTarget( to ); @@ -332,7 +332,7 @@ void Client::sendMessage( const QString &to, const QString &msg ) smt->go( true ); } -void Client::setChatSessionState( const QString &to, bool close ) +void Client::setChatSessionState( const TQString &to, bool close ) { ChatSessionTask *cst = new ChatSessionTask( d->root ); cst->setTarget( to ); @@ -340,24 +340,24 @@ void Client::setChatSessionState( const QString &to, bool close ) cst->go( true ); } -void Client::sendBuzz( const QString &to ) +void Client::sendBuzz( const TQString &to ) { SendMessageTask *smt = new SendMessageTask( d->root ); smt->setTarget( to ); - smt->setText( QString::fromLatin1( "" ) ); + smt->setText( TQString::fromLatin1( "" ) ); smt->setPicureFlag( pictureFlag() ); smt->go( true ); } -void Client::sendFile( unsigned int transferId, const QString &to, const QString &msg, KURL url ) +void Client::sendFile( unsigned int transferId, const TQString &to, const TQString &msg, KURL url ) { SendFileTask *sft = new SendFileTask( d->root ); - QObject::connect( sft, SIGNAL(complete(unsigned int)), SIGNAL(fileTransferComplete(unsigned int)) ); - QObject::connect( sft, SIGNAL(bytesProcessed(unsigned int, unsigned int)), SIGNAL(fileTransferBytesProcessed(unsigned int, unsigned int)) ); - QObject::connect( sft, SIGNAL(error(unsigned int, int, const QString &)), SIGNAL(fileTransferError(unsigned int, int, const QString &)) ); + TQObject::connect( sft, TQT_SIGNAL(complete(unsigned int)), TQT_SIGNAL(fileTransferComplete(unsigned int)) ); + TQObject::connect( sft, TQT_SIGNAL(bytesProcessed(unsigned int, unsigned int)), TQT_SIGNAL(fileTransferBytesProcessed(unsigned int, unsigned int)) ); + TQObject::connect( sft, TQT_SIGNAL(error(unsigned int, int, const TQString &)), TQT_SIGNAL(fileTransferError(unsigned int, int, const TQString &)) ); - QObject::connect( this, SIGNAL(fileTransferCanceled( unsigned int )), sft, SLOT(canceled( unsigned int )) ); + TQObject::connect( this, TQT_SIGNAL(fileTransferCanceled( unsigned int )), sft, TQT_SLOT(canceled( unsigned int )) ); sft->setTarget( to ); sft->setMessage( msg ); @@ -366,14 +366,14 @@ void Client::sendFile( unsigned int transferId, const QString &to, const QString sft->go( true ); } -void Client::receiveFile( unsigned int transferId, const QString &userId, KURL remoteURL, KURL localURL ) +void Client::receiveFile( unsigned int transferId, const TQString &userId, KURL remoteURL, KURL localURL ) { ReceiveFileTask *rft = new ReceiveFileTask( d->root ); - QObject::connect( rft, SIGNAL(complete(unsigned int)), SIGNAL(fileTransferComplete(unsigned int)) ); - QObject::connect( rft, SIGNAL(bytesProcessed(unsigned int, unsigned int)), SIGNAL(fileTransferBytesProcessed(unsigned int, unsigned int)) ); - QObject::connect( rft, SIGNAL(error(unsigned int, int, const QString &)), SIGNAL(fileTransferError(unsigned int, int, const QString &)) ); - QObject::connect( this, SIGNAL(fileTransferCanceled( unsigned int )), rft, SLOT(canceled( unsigned int )) ); + TQObject::connect( rft, TQT_SIGNAL(complete(unsigned int)), TQT_SIGNAL(fileTransferComplete(unsigned int)) ); + TQObject::connect( rft, TQT_SIGNAL(bytesProcessed(unsigned int, unsigned int)), TQT_SIGNAL(fileTransferBytesProcessed(unsigned int, unsigned int)) ); + TQObject::connect( rft, TQT_SIGNAL(error(unsigned int, int, const TQString &)), TQT_SIGNAL(fileTransferError(unsigned int, int, const TQString &)) ); + TQObject::connect( this, TQT_SIGNAL(fileTransferCanceled( unsigned int )), rft, TQT_SLOT(canceled( unsigned int )) ); rft->setRemoteUrl( remoteURL ); rft->setLocalUrl( localURL ); @@ -386,7 +386,7 @@ void Client::receiveFile( unsigned int transferId, const QString &userId, KURL r rft->go( true ); } -void Client::rejectFile( const QString &userId, KURL remoteURL ) +void Client::rejectFile( const TQString &userId, KURL remoteURL ) { if( remoteURL.url().startsWith( "http://" ) ) return; @@ -404,7 +404,7 @@ void Client::cancelFileTransfer( unsigned int transferId ) emit fileTransferCanceled( transferId ); } -void Client::changeStatus( Yahoo::Status status, const QString &message, Yahoo::StatusType type ) +void Client::changeStatus( Yahoo::Status status, const TQString &message, Yahoo::StatusType type ) { kdDebug(YAHOO_RAW_DEBUG) << "status: " << status << " message: " << message @@ -416,12 +416,12 @@ void Client::changeStatus( Yahoo::Status status, const QString &message, Yahoo:: cst->go( true ); if( status == Yahoo::StatusInvisible ) - stealthContact( QString(), Yahoo::StealthOnline, Yahoo::StealthClear ); + stealthContact( TQString(), Yahoo::StealthOnline, Yahoo::StealthClear ); setStatus( status ); } -void Client::sendAuthReply( const QString &userId, bool accept, const QString &msg ) +void Client::sendAuthReply( const TQString &userId, bool accept, const TQString &msg ) { SendAuthRespTask *sarp = new SendAuthRespTask( d->root ); sarp->setGranted( accept ); @@ -444,7 +444,7 @@ void Client::sendPing() // ***** Contactlist handling ***** -void Client::stealthContact(QString const &userId, Yahoo::StealthMode mode, Yahoo::StealthStatus state) +void Client::stealthContact(TQString const &userId, Yahoo::StealthMode mode, Yahoo::StealthStatus state) { StealthTask *st = new StealthTask( d->root ); st->setTarget( userId ); @@ -453,12 +453,12 @@ void Client::stealthContact(QString const &userId, Yahoo::StealthMode mode, Yaho st->go( true ); } -void Client::addBuddy( const QString &userId, const QString &group, const QString &message ) +void Client::addBuddy( const TQString &userId, const TQString &group, const TQString &message ) { ModifyBuddyTask *mbt = new ModifyBuddyTask( d->root ); - QObject::connect(mbt, SIGNAL(buddyAddResult( const QString &, const QString &, bool )), - SIGNAL(buddyAddResult( const QString &, const QString &, bool))); + TQObject::connect(mbt, TQT_SIGNAL(buddyAddResult( const TQString &, const TQString &, bool )), + TQT_SIGNAL(buddyAddResult( const TQString &, const TQString &, bool))); mbt->setType( ModifyBuddyTask::AddBuddy ); mbt->setTarget( userId ); @@ -467,12 +467,12 @@ void Client::addBuddy( const QString &userId, const QString &group, const QStrin mbt->go( true ); } -void Client::removeBuddy( const QString &userId, const QString &group ) +void Client::removeBuddy( const TQString &userId, const TQString &group ) { ModifyBuddyTask *mbt = new ModifyBuddyTask( d->root ); - QObject::connect(mbt, SIGNAL(buddyRemoveResult( const QString &, const QString &, bool )), - SIGNAL(buddyRemoveResult( const QString &, const QString &, bool))); + TQObject::connect(mbt, TQT_SIGNAL(buddyRemoveResult( const TQString &, const TQString &, bool )), + TQT_SIGNAL(buddyRemoveResult( const TQString &, const TQString &, bool))); mbt->setType( ModifyBuddyTask::RemoveBuddy ); mbt->setTarget( userId ); @@ -480,12 +480,12 @@ void Client::removeBuddy( const QString &userId, const QString &group ) mbt->go( true ); } -void Client::moveBuddy( const QString &userId, const QString &oldGroup, const QString &newGroup ) +void Client::moveBuddy( const TQString &userId, const TQString &oldGroup, const TQString &newGroup ) { ModifyBuddyTask *mbt = new ModifyBuddyTask( d->root ); - QObject::connect(mbt, SIGNAL(buddyChangeGroupResult( const QString &, const QString &, bool )), - SIGNAL(buddyChangeGroupResult( const QString &, const QString &, bool))); + TQObject::connect(mbt, TQT_SIGNAL(buddyChangeGroupResult( const TQString &, const TQString &, bool )), + TQT_SIGNAL(buddyChangeGroupResult( const TQString &, const TQString &, bool))); mbt->setType( ModifyBuddyTask::MoveBuddy ); mbt->setTarget( userId ); @@ -511,11 +511,11 @@ void Client::processPictureQueue() if( !d->pictureRequestQueue.isEmpty() ) { - QTimer::singleShot( 1000, this, SLOT(processPictureQueue()) ); + TQTimer::singleShot( 1000, this, TQT_SLOT(processPictureQueue()) ); } } -void Client::requestPicture( const QString &userId ) +void Client::requestPicture( const TQString &userId ) { if( !d->buddyListReady ) { @@ -528,16 +528,16 @@ void Client::requestPicture( const QString &userId ) rpt->go( true ); } -void Client::downloadPicture( const QString &userId, KURL url, int checksum ) +void Client::downloadPicture( const TQString &userId, KURL url, int checksum ) { if( !d->iconLoader ) { d->iconLoader = new YahooBuddyIconLoader( this ); - QObject::connect( d->iconLoader, SIGNAL(fetchedBuddyIcon(const QString&, const QByteArray &, int )), - SIGNAL(pictureDownloaded(const QString&, const QByteArray &, int ) ) ); + TQObject::connect( d->iconLoader, TQT_SIGNAL(fetchedBuddyIcon(const TQString&, const TQByteArray &, int )), + TQT_SIGNAL(pictureDownloaded(const TQString&, const TQByteArray &, int ) ) ); } - d->iconLoader->fetchBuddyIcon( QString(userId), KURL(url), checksum ); + d->iconLoader->fetchBuddyIcon( TQString(userId), KURL(url), checksum ); } void Client::uploadPicture( KURL url ) @@ -553,7 +553,7 @@ void Client::uploadPicture( KURL url ) spt->go( true ); } -void Client::sendPictureChecksum( const QString &userId, int checksum ) +void Client::sendPictureChecksum( const TQString &userId, int checksum ) { kdDebug(YAHOO_RAW_DEBUG) << "checksum: " << checksum << endl; SendPictureTask *spt = new SendPictureTask( d->root ); @@ -564,7 +564,7 @@ void Client::sendPictureChecksum( const QString &userId, int checksum ) spt->go( true ); } -void Client::sendPictureInformation( const QString &userId, const QString &url, int checksum ) +void Client::sendPictureInformation( const TQString &userId, const TQString &url, int checksum ) { kdDebug(YAHOO_RAW_DEBUG) << "checksum: " << checksum << endl; SendPictureTask *spt = new SendPictureTask( d->root ); @@ -590,17 +590,17 @@ void Client::setPictureStatus( Yahoo::PictureStatus status ) // ***** Webcam handling ***** -void Client::requestWebcam( const QString &userId ) +void Client::requestWebcam( const TQString &userId ) { d->webcamTask->requestWebcam( userId ); } -void Client::closeWebcam( const QString &userId ) +void Client::closeWebcam( const TQString &userId ) { d->webcamTask->closeWebcam( userId ); } -void Client::sendWebcamImage( const QByteArray &ar ) +void Client::sendWebcamImage( const TQByteArray &ar ) { d->webcamTask->sendWebcamImage( ar ); } @@ -611,38 +611,38 @@ void Client::closeOutgoingWebcam() } -void Client::grantWebcamAccess( const QString &userId ) +void Client::grantWebcamAccess( const TQString &userId ) { d->webcamTask->grantAccess( userId ); } // ***** Conferences ***** -void Client::inviteConference( const QString &room, const QStringList &members, const QString &msg ) +void Client::inviteConference( const TQString &room, const TQStringList &members, const TQString &msg ) { d->conferenceTask->inviteConference( room, members, msg ); } -void Client::addInviteConference( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ) +void Client::addInviteConference( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ) { d->conferenceTask->addInvite( room, who, members, msg ); } -void Client::joinConference( const QString &room, const QStringList &members ) +void Client::joinConference( const TQString &room, const TQStringList &members ) { d->conferenceTask->joinConference( room, members ); } -void Client::declineConference( const QString &room, const QStringList &members, const QString &msg ) +void Client::declineConference( const TQString &room, const TQStringList &members, const TQString &msg ) { d->conferenceTask->declineConference( room, members, msg ); } -void Client::leaveConference( const QString &room, const QStringList &members ) +void Client::leaveConference( const TQString &room, const TQStringList &members ) { d->conferenceTask->leaveConference( room, members ); } -void Client::sendConferenceMessage( const QString &room, const QStringList &members, const QString &msg ) +void Client::sendConferenceMessage( const TQString &room, const TQStringList &members, const TQString &msg ) { d->conferenceTask->sendMessage( room, members, msg ); } @@ -658,8 +658,8 @@ void Client::saveYABEntry( YABEntry &entry ) ModifyYABTask *myt = new ModifyYABTask( d->root ); myt->setAction( ModifyYABTask::EditEntry ); myt->setEntry( entry ); - QObject::connect( myt, SIGNAL(gotEntry( YABEntry * )), this, SIGNAL( gotYABEntry( YABEntry * ) ) ); - QObject::connect( myt, SIGNAL(error( YABEntry *, const QString &)), this, SIGNAL(modifyYABEntryError( YABEntry *, const QString & ))); + TQObject::connect( myt, TQT_SIGNAL(gotEntry( YABEntry * )), this, TQT_SIGNAL( gotYABEntry( YABEntry * ) ) ); + TQObject::connect( myt, TQT_SIGNAL(error( YABEntry *, const TQString &)), this, TQT_SIGNAL(modifyYABEntryError( YABEntry *, const TQString & ))); myt->go(true); } @@ -668,8 +668,8 @@ void Client::addYABEntry( YABEntry &entry ) ModifyYABTask *myt = new ModifyYABTask( d->root ); myt->setAction( ModifyYABTask::AddEntry ); myt->setEntry( entry ); - QObject::connect( myt, SIGNAL(gotEntry( YABEntry * )), this, SIGNAL( gotYABEntry( YABEntry * ) ) ); - QObject::connect( myt, SIGNAL(error( YABEntry *, const QString &)), this, SIGNAL(modifyYABEntryError( YABEntry *, const QString & ))); + TQObject::connect( myt, TQT_SIGNAL(gotEntry( YABEntry * )), this, TQT_SIGNAL( gotYABEntry( YABEntry * ) ) ); + TQObject::connect( myt, TQT_SIGNAL(error( YABEntry *, const TQString &)), this, TQT_SIGNAL(modifyYABEntryError( YABEntry *, const TQString & ))); myt->go(true); } @@ -697,7 +697,7 @@ void Client::joinYahooChatRoom( const Yahoo::ChatRoom &room ) d->yahooChatTask->joinRoom( room ); } -void Client::sendYahooChatMessage( const QString &msg, const QString &handle ) +void Client::sendYahooChatMessage( const TQString &msg, const TQString &handle ) { d->yahooChatTask->sendYahooChatMessage( msg, handle ); } @@ -708,21 +708,21 @@ void Client::leaveChat() } // ***** other ***** -void Client::notifyError( const QString &info, const QString & errorString, LogLevel level ) +void Client::notifyError( const TQString &info, const TQString & errorString, LogLevel level ) { - kdDebug(YAHOO_RAW_DEBUG) << QString::fromLatin1("\nThe following error occurred: %1\n Reason: %2\n LogLevel: %3") + kdDebug(YAHOO_RAW_DEBUG) << TQString::fromLatin1("\nThe following error occurred: %1\n Reason: %2\n LogLevel: %3") .arg(info).arg(errorString).arg(level) << endl; d->errorString = errorString; d->errorInformation = info; emit error( level ); } -QString Client::userId() +TQString Client::userId() { return d->user; } -void Client::setUserId( const QString & userId ) +void Client::setUserId( const TQString & userId ) { d->user = userId; } @@ -743,22 +743,22 @@ void Client::setStatusOnConnect( Yahoo::Status status ) d->statusOnConnect = status; } -void Client::setStatusMessageOnConnect( const QString &msg ) +void Client::setStatusMessageOnConnect( const TQString &msg ) { d->statusMessageOnConnect = msg; } -void Client::setVerificationWord( const QString &word ) +void Client::setVerificationWord( const TQString &word ) { d->loginTask->setVerificationWord( word ); } -QString Client::password() +TQString Client::password() { return d->pass; } -QString Client::host() +TQString Client::host() { return d->host; } @@ -788,17 +788,17 @@ void Client::setPictureChecksum( int cs ) d->pictureChecksum = cs; } -QString Client::yCookie() +TQString Client::yCookie() { return d->yCookie; } -QString Client::tCookie() +TQString Client::tCookie() { return d->tCookie; } -QString Client::cCookie() +TQString Client::cCookie() { return d->cCookie; } @@ -823,7 +823,7 @@ void Client::send( Transfer* request ) d->stream->write( request ); } -void Client::debug(const QString &str) +void Client::debug(const TQString &str) { qDebug( "CLIENT: %s", str.ascii() ); } @@ -839,104 +839,104 @@ void Client::initTasks() return; d->statusTask = new StatusNotifierTask( d->root ); - QObject::connect( d->statusTask, SIGNAL( statusChanged(const QString&,int,const QString&,int,int,int) ), - SIGNAL( statusChanged(const QString&,int,const QString&,int,int,int) ) ); - QObject::connect( d->statusTask, SIGNAL( stealthStatusChanged( const QString&, Yahoo::StealthStatus ) ), - SIGNAL( stealthStatusChanged( const QString&, Yahoo::StealthStatus ) ) ); - QObject::connect( d->statusTask, SIGNAL( loginResponse( int, const QString& ) ), - SLOT( slotLoginResponse( int, const QString& ) ) ); - QObject::connect( d->statusTask, SIGNAL( authorizationRejected( const QString&, const QString& ) ), - SIGNAL( authorizationRejected( const QString&, const QString& ) ) ); - QObject::connect( d->statusTask, SIGNAL( authorizationAccepted( const QString& ) ), - SIGNAL( authorizationAccepted( const QString& ) ) ); - QObject::connect( d->statusTask, SIGNAL( gotAuthorizationRequest( const QString &, const QString &, const QString & ) ), - SIGNAL( gotAuthorizationRequest( const QString &, const QString &, const QString & ) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( statusChanged(const TQString&,int,const TQString&,int,int,int) ), + TQT_SIGNAL( statusChanged(const TQString&,int,const TQString&,int,int,int) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthStatus ) ), + TQT_SIGNAL( stealthStatusChanged( const TQString&, Yahoo::StealthStatus ) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( loginResponse( int, const TQString& ) ), + TQT_SLOT( slotLoginResponse( int, const TQString& ) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( authorizationRejected( const TQString&, const TQString& ) ), + TQT_SIGNAL( authorizationRejected( const TQString&, const TQString& ) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( authorizationAccepted( const TQString& ) ), + TQT_SIGNAL( authorizationAccepted( const TQString& ) ) ); + TQObject::connect( d->statusTask, TQT_SIGNAL( gotAuthorizationRequest( const TQString &, const TQString &, const TQString & ) ), + TQT_SIGNAL( gotAuthorizationRequest( const TQString &, const TQString &, const TQString & ) ) ); d->mailTask = new MailNotifierTask( d->root ); - QObject::connect( d->mailTask, SIGNAL( mailNotify(const QString&, const QString&, int) ), - SIGNAL( mailNotify(const QString&, const QString&, int) ) ); + TQObject::connect( d->mailTask, TQT_SIGNAL( mailNotify(const TQString&, const TQString&, int) ), + TQT_SIGNAL( mailNotify(const TQString&, const TQString&, int) ) ); d->messageReceiverTask = new MessageReceiverTask( d->root ); - QObject::connect( d->messageReceiverTask, SIGNAL( gotIm(const QString&, const QString&, long, int) ), - SIGNAL( gotIm(const QString&, const QString&, long, int) ) ); - QObject::connect( d->messageReceiverTask, SIGNAL( systemMessage(const QString&) ), - SIGNAL( systemMessage(const QString&) ) ); - QObject::connect( d->messageReceiverTask, SIGNAL( gotTypingNotify(const QString &, int) ), - SIGNAL( typingNotify(const QString &, int) ) ); - QObject::connect( d->messageReceiverTask, SIGNAL( gotBuzz( const QString &, long ) ), - SIGNAL( gotBuzz( const QString &, long ) ) ); - QObject::connect( d->messageReceiverTask, SIGNAL( gotWebcamInvite(const QString &) ), - SIGNAL( gotWebcamInvite(const QString &) ) ); + TQObject::connect( d->messageReceiverTask, TQT_SIGNAL( gotIm(const TQString&, const TQString&, long, int) ), + TQT_SIGNAL( gotIm(const TQString&, const TQString&, long, int) ) ); + TQObject::connect( d->messageReceiverTask, TQT_SIGNAL( systemMessage(const TQString&) ), + TQT_SIGNAL( systemMessage(const TQString&) ) ); + TQObject::connect( d->messageReceiverTask, TQT_SIGNAL( gotTypingNotify(const TQString &, int) ), + TQT_SIGNAL( typingNotify(const TQString &, int) ) ); + TQObject::connect( d->messageReceiverTask, TQT_SIGNAL( gotBuzz( const TQString &, long ) ), + TQT_SIGNAL( gotBuzz( const TQString &, long ) ) ); + TQObject::connect( d->messageReceiverTask, TQT_SIGNAL( gotWebcamInvite(const TQString &) ), + TQT_SIGNAL( gotWebcamInvite(const TQString &) ) ); d->pictureNotifierTask = new PictureNotifierTask( d->root ); - QObject::connect( d->pictureNotifierTask, SIGNAL( pictureStatusNotify( const QString &, int ) ), - SIGNAL( pictureStatusNotify( const QString &, int ) ) ); - QObject::connect( d->pictureNotifierTask, SIGNAL( pictureChecksumNotify( const QString &, int ) ), - SIGNAL( pictureChecksumNotify( const QString &, int ) ) ); - QObject::connect( d->pictureNotifierTask, SIGNAL( pictureInfoNotify( const QString &, KURL, int ) ), - SIGNAL( pictureInfoNotify( const QString &, KURL, int ) ) ); - QObject::connect( d->pictureNotifierTask, SIGNAL( pictureRequest( const QString & ) ), - SIGNAL( pictureRequest( const QString & ) ) ); - QObject::connect( d->pictureNotifierTask, SIGNAL( pictureUploaded( const QString &, int ) ), - SIGNAL( pictureUploaded( const QString &, int ) ) ); + TQObject::connect( d->pictureNotifierTask, TQT_SIGNAL( pictureStatusNotify( const TQString &, int ) ), + TQT_SIGNAL( pictureStatusNotify( const TQString &, int ) ) ); + TQObject::connect( d->pictureNotifierTask, TQT_SIGNAL( pictureChecksumNotify( const TQString &, int ) ), + TQT_SIGNAL( pictureChecksumNotify( const TQString &, int ) ) ); + TQObject::connect( d->pictureNotifierTask, TQT_SIGNAL( pictureInfoNotify( const TQString &, KURL, int ) ), + TQT_SIGNAL( pictureInfoNotify( const TQString &, KURL, int ) ) ); + TQObject::connect( d->pictureNotifierTask, TQT_SIGNAL( pictureRequest( const TQString & ) ), + TQT_SIGNAL( pictureRequest( const TQString & ) ) ); + TQObject::connect( d->pictureNotifierTask, TQT_SIGNAL( pictureUploaded( const TQString &, int ) ), + TQT_SIGNAL( pictureUploaded( const TQString &, int ) ) ); d->webcamTask = new WebcamTask( d->root ); - QObject::connect( d->webcamTask, SIGNAL( webcamImageReceived( const QString &, const QPixmap &) ), - SIGNAL( webcamImageReceived( const QString &, const QPixmap &) ) ); - QObject::connect( d->webcamTask, SIGNAL( webcamNotAvailable( const QString & ) ), - SIGNAL( webcamNotAvailable( const QString & ) ) ); - QObject::connect( d->webcamTask, SIGNAL( webcamClosed( const QString &, int ) ), - SIGNAL( webcamClosed( const QString &, int ) ) ); - QObject::connect( d->webcamTask, SIGNAL( webcamPaused(const QString&) ), - SIGNAL( webcamPaused(const QString&) ) ); - QObject::connect( d->webcamTask, SIGNAL( readyForTransmission() ), - SIGNAL( webcamReadyForTransmission() ) ); - QObject::connect( d->webcamTask, SIGNAL( stopTransmission() ), - SIGNAL( webcamStopTransmission() ) ); - QObject::connect( d->webcamTask, SIGNAL( viewerJoined( const QString &) ), - SIGNAL( webcamViewerJoined( const QString &) ) ); - QObject::connect( d->webcamTask, SIGNAL( viewerLeft( const QString &) ), - SIGNAL( webcamViewerLeft( const QString &) ) ); - QObject::connect( d->webcamTask, SIGNAL( viewerRequest( const QString &) ), - SIGNAL( webcamViewerRequest( const QString &) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( webcamImageReceived( const TQString &, const TQPixmap &) ), + TQT_SIGNAL( webcamImageReceived( const TQString &, const TQPixmap &) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( webcamNotAvailable( const TQString & ) ), + TQT_SIGNAL( webcamNotAvailable( const TQString & ) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( webcamClosed( const TQString &, int ) ), + TQT_SIGNAL( webcamClosed( const TQString &, int ) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( webcamPaused(const TQString&) ), + TQT_SIGNAL( webcamPaused(const TQString&) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( readyForTransmission() ), + TQT_SIGNAL( webcamReadyForTransmission() ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( stopTransmission() ), + TQT_SIGNAL( webcamStopTransmission() ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( viewerJoined( const TQString &) ), + TQT_SIGNAL( webcamViewerJoined( const TQString &) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( viewerLeft( const TQString &) ), + TQT_SIGNAL( webcamViewerLeft( const TQString &) ) ); + TQObject::connect( d->webcamTask, TQT_SIGNAL( viewerRequest( const TQString &) ), + TQT_SIGNAL( webcamViewerRequest( const TQString &) ) ); d->conferenceTask = new ConferenceTask( d->root ); - QObject::connect( d->conferenceTask, SIGNAL( gotInvite( const QString &, const QString &, const QString &, const QStringList & ) ), - SIGNAL( gotConferenceInvite( const QString &, const QString &, const QString &, const QStringList & ) ) ); - QObject::connect( d->conferenceTask, SIGNAL( gotMessage( const QString &, const QString &, const QString & ) ), - SIGNAL( gotConferenceMessage( const QString &, const QString &, const QString & ) ) ); - QObject::connect( d->conferenceTask, SIGNAL( userJoined( const QString &, const QString & ) ), - SIGNAL( confUserJoined( const QString &, const QString & ) ) ); - QObject::connect( d->conferenceTask, SIGNAL( userLeft( const QString &, const QString & ) ), - SIGNAL( confUserLeft( const QString &, const QString & ) ) ); - QObject::connect( d->conferenceTask, SIGNAL( userDeclined( const QString &, const QString &, const QString & ) ), - SIGNAL( confUserDeclined( const QString &, const QString &, const QString & ) ) ); + TQObject::connect( d->conferenceTask, TQT_SIGNAL( gotInvite( const TQString &, const TQString &, const TQString &, const TQStringList & ) ), + TQT_SIGNAL( gotConferenceInvite( const TQString &, const TQString &, const TQString &, const TQStringList & ) ) ); + TQObject::connect( d->conferenceTask, TQT_SIGNAL( gotMessage( const TQString &, const TQString &, const TQString & ) ), + TQT_SIGNAL( gotConferenceMessage( const TQString &, const TQString &, const TQString & ) ) ); + TQObject::connect( d->conferenceTask, TQT_SIGNAL( userJoined( const TQString &, const TQString & ) ), + TQT_SIGNAL( confUserJoined( const TQString &, const TQString & ) ) ); + TQObject::connect( d->conferenceTask, TQT_SIGNAL( userLeft( const TQString &, const TQString & ) ), + TQT_SIGNAL( confUserLeft( const TQString &, const TQString & ) ) ); + TQObject::connect( d->conferenceTask, TQT_SIGNAL( userDeclined( const TQString &, const TQString &, const TQString & ) ), + TQT_SIGNAL( confUserDeclined( const TQString &, const TQString &, const TQString & ) ) ); d->yabTask = new YABTask( d->root ); - QObject::connect( d->yabTask, SIGNAL( gotEntry( YABEntry * ) ), - SIGNAL( gotYABEntry( YABEntry * ) ) ); - QObject::connect( d->yabTask, SIGNAL( gotRevision( long, bool ) ), - SIGNAL( gotYABRevision( long, bool ) ) ); + TQObject::connect( d->yabTask, TQT_SIGNAL( gotEntry( YABEntry * ) ), + TQT_SIGNAL( gotYABEntry( YABEntry * ) ) ); + TQObject::connect( d->yabTask, TQT_SIGNAL( gotRevision( long, bool ) ), + TQT_SIGNAL( gotYABRevision( long, bool ) ) ); d->fileTransferTask = new FileTransferNotifierTask( d->root ); - QObject::connect( d->fileTransferTask, SIGNAL(incomingFileTransfer( const QString &, const QString &, - long, const QString &, const QString &, unsigned long, const QPixmap & )), - SIGNAL(incomingFileTransfer( const QString &, const QString &, - long, const QString &, const QString &, unsigned long, const QPixmap & )) ); + TQObject::connect( d->fileTransferTask, TQT_SIGNAL(incomingFileTransfer( const TQString &, const TQString &, + long, const TQString &, const TQString &, unsigned long, const TQPixmap & )), + TQT_SIGNAL(incomingFileTransfer( const TQString &, const TQString &, + long, const TQString &, const TQString &, unsigned long, const TQPixmap & )) ); d->yahooChatTask = new YahooChatTask( d->root ); - QObject::connect( d->yahooChatTask, SIGNAL(gotYahooChatCategories( const QDomDocument & )), - SIGNAL(gotYahooChatCategories( const QDomDocument & )) ); - QObject::connect( d->yahooChatTask, SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const QDomDocument & )), - SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const QDomDocument & )) ); - QObject::connect( d->yahooChatTask, SIGNAL(chatRoomJoined( int , int , const QString &, const QString & ) ), - SIGNAL(chatRoomJoined( int , int , const QString &, const QString & ) ) ); - QObject::connect( d->yahooChatTask, SIGNAL(chatBuddyHasJoined( const QString &, const QString &, bool ) ), - SIGNAL(chatBuddyHasJoined( const QString &, const QString &, bool ) ) ); - QObject::connect( d->yahooChatTask, SIGNAL(chatBuddyHasLeft(QString,QString) ), - SIGNAL(chatBuddyHasLeft(QString,QString) ) ); - QObject::connect( d->yahooChatTask, SIGNAL(chatMessageReceived( const QString &, const QString &, const QString & ) ), - SIGNAL(chatMessageReceived( const QString &, const QString &, const QString & ) ) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(gotYahooChatCategories( const TQDomDocument & )), + TQT_SIGNAL(gotYahooChatCategories( const TQDomDocument & )) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & )), + TQT_SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & )) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(chatRoomJoined( int , int , const TQString &, const TQString & ) ), + TQT_SIGNAL(chatRoomJoined( int , int , const TQString &, const TQString & ) ) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(chatBuddyHasJoined( const TQString &, const TQString &, bool ) ), + TQT_SIGNAL(chatBuddyHasJoined( const TQString &, const TQString &, bool ) ) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(chatBuddyHasLeft(TQString,TQString) ), + TQT_SIGNAL(chatBuddyHasLeft(TQString,TQString) ) ); + TQObject::connect( d->yahooChatTask, TQT_SIGNAL(chatMessageReceived( const TQString &, const TQString &, const TQString & ) ), + TQT_SIGNAL(chatMessageReceived( const TQString &, const TQString &, const TQString & ) ) ); } void Client::deleteTasks() diff --git a/kopete/protocols/yahoo/libkyahoo/client.h b/kopete/protocols/yahoo/libkyahoo/client.h index f4a3fef5..662c81ff 100644 --- a/kopete/protocols/yahoo/libkyahoo/client.h +++ b/kopete/protocols/yahoo/libkyahoo/client.h @@ -22,7 +22,7 @@ #ifndef LIBYAHOO_CLIENT_H #define LIBYAHOO_CLIENT_H -#include +#include #include #include "transfer.h" @@ -52,14 +52,14 @@ Q_OBJECT enum LogLevel { Debug, Info, Notice, Warning, Error, Critical }; - Client(QObject *parent=0); + Client(TQObject *parent=0); ~Client(); /** * Set the Yahoo Id of the account * @param username The Yahoo Id */ - void setUserId( const QString& userName ); + void setUserId( const TQString& userName ); /** * Set the picture checksum @@ -76,7 +76,7 @@ Q_OBJECT * @param userId The yahoo ID that will be connected. * @param pass The password. */ - void connect( const QString &host, const uint port, const QString &userId, const QString &pass ); + void connect( const TQString &host, const uint port, const TQString &userId, const TQString &pass ); /** Cancel active login attemps */ void cancelConnect(); @@ -88,10 +88,10 @@ Q_OBJECT int error(); /** Returns a description of the error */ - QString errorString(); + TQString errorString(); /** Returns information about what went wrong */ - QString errorInformation(); + TQString errorInformation(); /** * Specifies the status we connect with. @@ -107,10 +107,10 @@ Q_OBJECT * will change the status message after the login. * @param msg the status message to connect with */ - void setStatusMessageOnConnect( const QString &msg ); + void setStatusMessageOnConnect( const TQString &msg ); /** Accessors needed for login */ - QString host(); + TQString host(); int port(); /** @@ -118,27 +118,27 @@ Q_OBJECT * @param to the buddy that should be notified * @param typing true if there is typing activity, false if not */ - void sendTyping( const QString &to, bool typing ); + void sendTyping( const TQString &to, bool typing ); /** * Send a Message * @param to the buddy that should receive the message * @param msg the message */ - void sendMessage( const QString &to, const QString &msg ); + void sendMessage( const TQString &to, const TQString &msg ); /** * Register / Unregister a chatsession * @param to the buddy, the chatsession belongs to * @param close if true, the chatsession will be closed, if false, it will be opened */ - void setChatSessionState( const QString &to, bool close ); + void setChatSessionState( const TQString &to, bool close ); /** * Send a Buzz * @param to the buddy that should receive the buzz */ - void sendBuzz( const QString &to ); + void sendBuzz( const TQString &to ); /** * Change our status @@ -146,14 +146,14 @@ Q_OBJECT * @param message the status message that will be set * @param type Yahoo::StatusTypeAvailable means that the user is available, Yahoo::StatusTypeAway means that the user is away from the keyboard */ - void changeStatus(Yahoo::Status status, const QString &message, Yahoo::StatusType type); + void changeStatus(Yahoo::Status status, const TQString &message, Yahoo::StatusType type); /** * Set the verification word that is needed for a account verification after * too many wrong login attempts. * @param word the verification word */ - void setVerificationWord( const QString &word ); + void setVerificationWord( const TQString &word ); /** * Add a buddy to the contact list @@ -161,14 +161,14 @@ Q_OBJECT * @param group the group where the buddy will be placed * @param message the message that will be sent to the buddy along the authorization request */ - void addBuddy( const QString &userId, const QString &group, const QString &message = QString::fromLatin1("Please add me") ); + void addBuddy( const TQString &userId, const TQString &group, const TQString &message = TQString::fromLatin1("Please add me") ); /** * Remove a buddy from the contact list * @param userId the yahoo ID of the buddy that should be removed * @param group the group where the buddy belongs to */ - void removeBuddy( const QString &userId, const QString &group ); + void removeBuddy( const TQString &userId, const TQString &group ); /** * Move a buddy into another group @@ -176,7 +176,7 @@ Q_OBJECT * @param oldGroup the group where the buddy belongs to * @param newGroup the group where the buddy will be placed */ - void moveBuddy( const QString &userId, const QString &oldGroup, const QString &newGroup ); + void moveBuddy( const TQString &userId, const TQString &oldGroup, const TQString &newGroup ); /** * Change the stealth status of a buddy @@ -184,13 +184,13 @@ Q_OBJECT * @param mode defines the Stealth mode that is changed. That can be "Appear Offline", "Appear Online" or "Apper permanently offline" * @param state the status of the specified Stealth mode. Active, Not Active or Clear */ - void stealthContact( QString const &userId, Yahoo::StealthMode mode, Yahoo::StealthStatus state ); + void stealthContact( TQString const &userId, Yahoo::StealthMode mode, Yahoo::StealthStatus state ); /** * Request the buddy's picture * @param userId the yahoo ID of the buddy */ - void requestPicture( const QString &userId ); + void requestPicture( const TQString &userId ); /** * Download the buddy's picture @@ -198,7 +198,7 @@ Q_OBJECT * @param url the url of the picture * @param checksum the checksum of the picture */ - void downloadPicture( const QString &userId, KURL url, int checksum ); + void downloadPicture( const TQString &userId, KURL url, int checksum ); /** * Send our picture @@ -211,7 +211,7 @@ Q_OBJECT * @param userId the yahoo ID of the buddy. Can be a null string if the picture has changed. * @param checksum the checksum of the picture */ - void sendPictureChecksum( const QString &userId, int checksum ); + void sendPictureChecksum( const TQString &userId, int checksum ); /** * Send information about our picture @@ -219,7 +219,7 @@ Q_OBJECT * @param url the url of our picture * @param checksum the checksum of the picture */ - void sendPictureInformation( const QString &userId, const QString &url, int checksum ); + void sendPictureInformation( const TQString &userId, const TQString &url, int checksum ); /** * Notify the buddies about our new status @@ -231,25 +231,25 @@ Q_OBJECT * Send a response to the webcam invite ( Accept / Decline ) * @param userId the yahoo ID of the sender */ - void requestWebcam( const QString &userId ); + void requestWebcam( const TQString &userId ); /** * Stop receiving of webcam * @param userId the yahoo ID of the sender */ - void closeWebcam( const QString &userId ); + void closeWebcam( const TQString &userId ); /** * Invite the user to view your Webcam * @param userId the yahoo ID of the receiver */ - void sendWebcamInvite( const QString &userId ); + void sendWebcamInvite( const TQString &userId ); /** * transmit a new image to the watchers * @param image the image data */ - void sendWebcamImage( const QByteArray &image ); + void sendWebcamImage( const TQByteArray &image ); /** Stop the webcam transmission */ void closeOutgoingWebcam(); @@ -258,7 +258,7 @@ Q_OBJECT * Allow a buddy to watch the cam * @param userId the yahoo ID of the receiver */ - void grantWebcamAccess( const QString &userId ); + void grantWebcamAccess( const TQString &userId ); /** * Invite buddies to a conference @@ -266,7 +266,7 @@ Q_OBJECT * @param members a list of members that are invited to the conference * @param msg the invite message */ - void inviteConference( const QString &room, const QStringList &members, const QString &msg ); + void inviteConference( const TQString &room, const TQStringList &members, const TQString &msg ); /** * Invite buddies to a already existing conference @@ -275,14 +275,14 @@ Q_OBJECT * @param members a list of members that are already in the conference * @param msg the invite message */ - void addInviteConference( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ); + void addInviteConference( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ); /** * Join a conference * @param room the name of the conference * @param members a list of members that are already in the conference */ - void joinConference( const QString &room, const QStringList &members ); + void joinConference( const TQString &room, const TQStringList &members ); /** * Decline to join a conference @@ -290,14 +290,14 @@ Q_OBJECT * @param members a list of members that are in the conference * @param msg the reason why we don't want to join */ - void declineConference( const QString &room, const QStringList &members, const QString &msg ); + void declineConference( const TQString &room, const TQStringList &members, const TQString &msg ); /** * Leave the conference * @param room the name of the conference * @param members a list of members that are in the conference */ - void leaveConference( const QString &room, const QStringList &members ); + void leaveConference( const TQString &room, const TQStringList &members ); /** * Send a message to the conference @@ -305,7 +305,7 @@ Q_OBJECT * @param members a list of members that are in the conference * @param msg the message */ - void sendConferenceMessage( const QString &room, const QStringList &members, const QString &msg ); + void sendConferenceMessage( const TQString &room, const TQStringList &members, const TQString &msg ); /** * Send a authorization request response @@ -313,7 +313,7 @@ Q_OBJECT * @param accept true, if the user is allowed to see our status, false if not * @param msg the reason for our decision */ - void sendAuthReply( const QString &userId, bool accept, const QString &msg ); + void sendAuthReply( const TQString &userId, bool accept, const TQString &msg ); /** * Fetches all entries of the YAB @@ -347,7 +347,7 @@ Q_OBJECT * @param msg a description of the file to be sent * @param url the location of the file to be sent */ - void sendFile( unsigned int transferId, const QString &userId, const QString &msg, KURL url ); + void sendFile( unsigned int transferId, const TQString &userId, const TQString &msg, KURL url ); /** * Receive a file from a buddy @@ -356,14 +356,14 @@ Q_OBJECT * @param remoteURL the url of the file * @param localURL the location where the file should be stored */ - void receiveFile( unsigned int transferId, const QString &userId, KURL remoteURL, KURL localURL ); + void receiveFile( unsigned int transferId, const TQString &userId, KURL remoteURL, KURL localURL ); /** * Reject a file offered by a buddy * @param userId yahoo ID of the sender * @param remoteURL the url of the file */ - void rejectFile( const QString &userId, KURL remoteURL ); + void rejectFile( const TQString &userId, KURL remoteURL ); /** * Canceled a filetransfer @@ -394,7 +394,7 @@ Q_OBJECT /** * Send a chat message */ - void sendYahooChatMessage( const QString &msg, const QString &handle ); + void sendYahooChatMessage( const TQString &msg, const TQString &handle ); /************* INTERNAL (FOR USE BY TASKS) METHODS @@ -408,13 +408,13 @@ Q_OBJECT /** * Print a debug statement */ - void debug( const QString &str ); + void debug( const TQString &str ); /** The current user's user ID */ - QString userId(); + TQString userId(); /** The current user's password */ - QString password(); + TQString password(); /** current Session ID */ uint sessionID(); @@ -445,20 +445,20 @@ Q_OBJECT /** * Accessors to the cookies */ - QString yCookie(); - QString tCookie(); - QString cCookie(); + TQString yCookie(); + TQString tCookie(); + TQString cCookie(); /** * Error */ - void notifyError( const QString &info, const QString &errorString, LogLevel level ); + void notifyError( const TQString &info, const TQString &errorString, LogLevel level ); signals: /** CONNECTION EVENTS */ /** * Notifies that the login process has succeeded. */ - void loggedIn( int, const QString& ); + void loggedIn( int, const TQString& ); /** * Notifies that the login process has failed @@ -482,91 +482,91 @@ Q_OBJECT /** * Notifies about our buddies and groups */ - void gotBuddy( const QString &, const QString &, const QString & ); + void gotBuddy( const TQString &, const TQString &, const TQString & ); /** * Notifies about adding buddies */ - void buddyAddResult( const QString &, const QString &, bool ); + void buddyAddResult( const TQString &, const TQString &, bool ); /** * Notifies about removing buddies */ - void buddyRemoveResult( const QString &, const QString &, bool ); + void buddyRemoveResult( const TQString &, const TQString &, bool ); /** * Notifies about buddies changing groups */ - void buddyChangeGroupResult( const QString &, const QString &, bool ); + void buddyChangeGroupResult( const TQString &, const TQString &, bool ); /** * Notifies about the status of online buddies */ - void statusChanged( const QString&, int, const QString&, int, int, int ); + void statusChanged( const TQString&, int, const TQString&, int, int, int ); /** * Notifies about the stealth status of buddies */ - void stealthStatusChanged( const QString &, Yahoo::StealthStatus ); + void stealthStatusChanged( const TQString &, Yahoo::StealthStatus ); /** * Notifies about mails */ - void mailNotify( const QString&, const QString&, int ); + void mailNotify( const TQString&, const TQString&, int ); /** * We got a new message */ - void gotIm( const QString&, const QString&, long, int ); + void gotIm( const TQString&, const TQString&, long, int ); /** * We got a new system message */ - void systemMessage( const QString& ); + void systemMessage( const TQString& ); /** * The buddy is typing a message */ - void typingNotify( const QString &, int ); + void typingNotify( const TQString &, int ); /** * The buddy has invited us to view his webcam */ - void gotWebcamInvite(const QString &); + void gotWebcamInvite(const TQString &); /** * Notifies about a BUZZ notification */ - void gotBuzz( const QString &, long ); + void gotBuzz( const TQString &, long ); /** * Notifies about a changed picture status */ - void pictureStatusNotify( const QString &, int ); + void pictureStatusNotify( const TQString &, int ); /** * Notifies about a picture checksum */ - void pictureChecksumNotify( const QString &, int ); + void pictureChecksumNotify( const TQString &, int ); /** * Notifies about a picture */ - void pictureInfoNotify( const QString &, KURL, int ); + void pictureInfoNotify( const TQString &, KURL, int ); /** * The iconLoader has successfully downloaded a picutre */ - void pictureDownloaded( const QString &, const QByteArray &, int ); + void pictureDownloaded( const TQString &, const TQByteArray &, int ); /** * A Buddy asks for our picture */ - void pictureRequest( const QString & ); + void pictureRequest( const TQString & ); /** * Information about the picture upload */ - void pictureUploaded( const QString &, int ); + void pictureUploaded( const TQString &, int ); /** * We've received a webcam image from a buddy */ - void webcamImageReceived( const QString &, const QPixmap &); + void webcamImageReceived( const TQString &, const TQPixmap &); /** * The requested Webcam is not available */ - void webcamNotAvailable( const QString & ); + void webcamNotAvailable( const TQString & ); /** * The connection to the webcam was closed */ - void webcamClosed( const QString &, int ); + void webcamClosed( const TQString &, int ); /** * The webcamtransmission is paused */ - void webcamPaused(const QString&); + void webcamPaused(const TQString&); /** * The webcam connection is ready for transmission */ @@ -578,47 +578,47 @@ Q_OBJECT /** * A new buddy watches the cam */ - void webcamViewerJoined( const QString & ); + void webcamViewerJoined( const TQString & ); /** * A buddy no longer watches the cam */ - void webcamViewerLeft( const QString & ); + void webcamViewerLeft( const TQString & ); /** * A buddy wants to watch the cam */ - void webcamViewerRequest( const QString & ); + void webcamViewerRequest( const TQString & ); /** * A buddy invited us to a conference */ - void gotConferenceInvite( const QString &, const QString &, const QString &, const QStringList & ); + void gotConferenceInvite( const TQString &, const TQString &, const TQString &, const TQStringList & ); /** * A conference message was received */ - void gotConferenceMessage( const QString &, const QString &, const QString & ); + void gotConferenceMessage( const TQString &, const TQString &, const TQString & ); /** * A buddy joined the conference */ - void confUserJoined( const QString &, const QString & ); + void confUserJoined( const TQString &, const TQString & ); /** * A buddy left the conference */ - void confUserLeft( const QString &, const QString & ); + void confUserLeft( const TQString &, const TQString & ); /** * A buddy declined to join the conference */ - void confUserDeclined( const QString &, const QString &, const QString & ); + void confUserDeclined( const TQString &, const TQString &, const TQString & ); /** * A buddy accepted our authorization request */ - void authorizationAccepted( const QString & ); + void authorizationAccepted( const TQString & ); /** * A buddy rejected our authorization request */ - void authorizationRejected( const QString &, const QString & ); + void authorizationRejected( const TQString &, const TQString & ); /** * A buddy requests authorization */ - void gotAuthorizationRequest( const QString &, const QString &, const QString & ); + void gotAuthorizationRequest( const TQString &, const TQString &, const TQString & ); /** * A revision of the Yahoo Addressbook was received */ @@ -630,7 +630,7 @@ Q_OBJECT /** * An error occurred while saving a Yahoo Addressbook entry */ - void modifyYABEntryError( YABEntry *, const QString & ); + void modifyYABEntryError( YABEntry *, const TQString & ); /** * number of Bytes transferred for FileTransfer id */ @@ -642,7 +642,7 @@ Q_OBJECT /** * An error occurred during the filetransfer */ - void fileTransferError( unsigned int, int, const QString & ); + void fileTransferError( unsigned int, int, const TQString & ); /** * filetransfer canceled */ @@ -650,32 +650,32 @@ Q_OBJECT /** * A buddy is trying to send us a file */ - void incomingFileTransfer( const QString &, const QString &, long, const QString &, - const QString &, unsigned long, const QPixmap & ); + void incomingFileTransfer( const TQString &, const TQString &, long, const TQString &, + const TQString &, unsigned long, const TQPixmap & ); /** * We have received the list of yahoo chat categories */ - void gotYahooChatCategories( const QDomDocument & ); + void gotYahooChatCategories( const TQDomDocument & ); /** * We have received the list of chatrooms for the categories */ - void gotYahooChatRooms( const Yahoo::ChatCategory &, const QDomDocument & ); + void gotYahooChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & ); /** * We have joined a chatroom */ - void chatRoomJoined( int, int, const QString &, const QString & ); + void chatRoomJoined( int, int, const TQString &, const TQString & ); /** * A buddy has joined a chatroom */ - void chatBuddyHasJoined( const QString &, const QString &, bool ); + void chatBuddyHasJoined( const TQString &, const TQString &, bool ); /** * A buddy has left a chatroom */ - void chatBuddyHasLeft( const QString &, const QString & ); + void chatBuddyHasLeft( const TQString &, const TQString & ); /** * We have received a message in a chatroom */ - void chatMessageReceived( const QString &, const QString &, const QString & ); + void chatMessageReceived( const TQString &, const TQString &, const TQString & ); protected slots: // INTERNAL, FOR USE BY TASKS' finished() SIGNALS // void lt_loginFinished(); @@ -687,7 +687,7 @@ Q_OBJECT /** * Used by tasks to identify a response to a login attempt */ - void slotLoginResponse( int, const QString& ); + void slotLoginResponse( int, const TQString& ); /** * Used by the client stream to notify errors to upper layers. @@ -726,7 +726,7 @@ Q_OBJECT ClientPrivate* d; KNetworkConnector *m_connector; - QTimer *m_pingTimer; + TQTimer *m_pingTimer; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/conferencetask.cpp b/kopete/protocols/yahoo/libkyahoo/conferencetask.cpp index 9ab0d4c1..59d3b3fa 100644 --- a/kopete/protocols/yahoo/libkyahoo/conferencetask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/conferencetask.cpp @@ -19,8 +19,8 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include -#include +#include +#include #include ConferenceTask::ConferenceTask(Task* parent) : Task(parent) @@ -78,16 +78,16 @@ void ConferenceTask::parseInvitation( YMSGTransfer *t ) kdDebug(YAHOO_RAW_DEBUG) ; int i = 0; - QString who = t->firstParam( 50 ); - QString room = t->firstParam( 57 ); - bool utf = QString( t->firstParam( 97 ) ).toInt() == 1; - QString msg; + TQString who = t->firstParam( 50 ); + TQString room = t->firstParam( 57 ); + bool utf = TQString( t->firstParam( 97 ) ).toInt() == 1; + TQString msg; if( utf ) - msg = QString::fromUtf8( t->firstParam( 58 ) ); + msg = TQString::fromUtf8( t->firstParam( 58 ) ); else msg = t->firstParam( 58 ); - QStringList members; + TQStringList members; for( i = 0; i < t->paramCount( 52 ); ++i ) members.append( t->nthParam( 52, i ) ); for( i = 0; i < t->paramCount( 53 ); ++i ) @@ -103,12 +103,12 @@ void ConferenceTask::parseMessage( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString room = t->firstParam( 57 ); - QString from = t->firstParam( 3 ); - bool utf = QString( t->firstParam( 97 ) ).toInt() == 1; - QString msg; + TQString room = t->firstParam( 57 ); + TQString from = t->firstParam( 3 ); + bool utf = TQString( t->firstParam( 97 ) ).toInt() == 1; + TQString msg; if( utf ) - msg = QString::fromUtf8( t->firstParam( 14 ) ); + msg = TQString::fromUtf8( t->firstParam( 14 ) ); else msg = t->firstParam( 14 ); @@ -120,8 +120,8 @@ void ConferenceTask::parseUserJoined( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString room = t->firstParam( 57 ); - QString who = t->firstParam( 53 ); + TQString room = t->firstParam( 57 ); + TQString who = t->firstParam( 53 ); if( !who.isEmpty() && !room.isEmpty() ) emit userJoined( who, room ); @@ -131,8 +131,8 @@ void ConferenceTask::parseUserLeft( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString room = t->firstParam( 57 ); - QString who = t->firstParam( 56 ); + TQString room = t->firstParam( 57 ); + TQString who = t->firstParam( 56 ); if( !who.isEmpty() && !room.isEmpty() ) emit userLeft( who, room ); @@ -142,15 +142,15 @@ void ConferenceTask::parseUserDeclined( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString room = t->firstParam( 57 ); - QString who = t->firstParam( 54 ); - QString msg = t->firstParam( 14 ); + TQString room = t->firstParam( 57 ); + TQString who = t->firstParam( 54 ); + TQString msg = t->firstParam( 14 ); if( !who.isEmpty() && !room.isEmpty() ) emit userDeclined( who, room, msg ); } -void ConferenceTask::inviteConference( const QString &room, const QStringList &members, const QString &msg ) +void ConferenceTask::inviteConference( const TQString &room, const TQStringList &members, const TQString &msg ) { kdDebug(YAHOO_RAW_DEBUG) ; @@ -161,14 +161,14 @@ void ConferenceTask::inviteConference( const QString &room, const QStringList &m t->setParam( 57, room.local8Bit() ); t->setParam( 58, msg.local8Bit() ); t->setParam( 97, 1 ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) t->setParam( 52, (*it).local8Bit() ); t->setParam( 13, "0" ); send( t ); } -void ConferenceTask::addInvite( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ) +void ConferenceTask::addInvite( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ) { kdDebug(YAHOO_RAW_DEBUG) ; @@ -176,15 +176,15 @@ void ConferenceTask::addInvite( const QString &room, const QStringList &who, con t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - QString whoList = who.first(); + TQString whoList = who.first(); for( int i = 1; i < who.size(); i++ ) - whoList += QString(",%1").arg( who[i] ); + whoList += TQString(",%1").arg( who[i] ); t->setParam( 51, whoList.local8Bit() ); t->setParam( 57, room.local8Bit() ); t->setParam( 58, msg.local8Bit() ); t->setParam( 97, 1 ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) { t->setParam( 52, (*it).local8Bit() ); t->setParam( 53, (*it).local8Bit() ); // Note: this field should only be set if the buddy has already joined the conference, but no harm is done this way @@ -194,28 +194,28 @@ void ConferenceTask::addInvite( const QString &room, const QStringList &who, con send( t ); } -void ConferenceTask::joinConference( const QString &room, const QStringList &members ) +void ConferenceTask::joinConference( const TQString &room, const TQStringList &members ) { kdDebug(YAHOO_RAW_DEBUG) ; YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfLogon); t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) t->setParam( 3, (*it).local8Bit() ); t->setParam( 57, room.local8Bit() ); send( t ); } -void ConferenceTask::declineConference( const QString &room, const QStringList &members, const QString &msg ) +void ConferenceTask::declineConference( const TQString &room, const TQStringList &members, const TQString &msg ) { kdDebug(YAHOO_RAW_DEBUG) ; YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfDecline); t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) t->setParam( 3, (*it).local8Bit() ); t->setParam( 57, room.local8Bit() ); t->setParam( 14, msg.utf8() ); @@ -223,28 +223,28 @@ void ConferenceTask::declineConference( const QString &room, const QStringList & send( t ); } -void ConferenceTask::leaveConference( const QString &room, const QStringList &members ) +void ConferenceTask::leaveConference( const TQString &room, const TQStringList &members ) { kdDebug(YAHOO_RAW_DEBUG) ; YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfLogoff); t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) t->setParam( 3, (*it).local8Bit() ); t->setParam( 57, room.local8Bit() ); send( t ); } -void ConferenceTask::sendMessage( const QString &room, const QStringList &members, const QString &msg ) +void ConferenceTask::sendMessage( const TQString &room, const TQStringList &members, const TQString &msg ) { kdDebug(YAHOO_RAW_DEBUG) ; YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceConfMsg); t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - for( QStringList::const_iterator it = members.begin(); it != members.end(); ++it ) + for( TQStringList::const_iterator it = members.begin(); it != members.end(); ++it ) t->setParam( 53, (*it).local8Bit() ); t->setParam( 57, room.local8Bit() ); t->setParam( 14, msg.utf8() ); diff --git a/kopete/protocols/yahoo/libkyahoo/conferencetask.h b/kopete/protocols/yahoo/libkyahoo/conferencetask.h index f8a101c5..5f027c0f 100644 --- a/kopete/protocols/yahoo/libkyahoo/conferencetask.h +++ b/kopete/protocols/yahoo/libkyahoo/conferencetask.h @@ -34,18 +34,18 @@ public: bool take(Transfer *transfer); bool forMe( const Transfer* transfer ) const; - void joinConference( const QString &room, const QStringList &members ); - void declineConference( const QString &room, const QStringList &members, const QString &msg ); - void leaveConference( const QString &room, const QStringList &members ); - void sendMessage( const QString &room, const QStringList &members, const QString &msg ); - void inviteConference( const QString &room, const QStringList &members, const QString &msg ); - void addInvite( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ); + void joinConference( const TQString &room, const TQStringList &members ); + void declineConference( const TQString &room, const TQStringList &members, const TQString &msg ); + void leaveConference( const TQString &room, const TQStringList &members ); + void sendMessage( const TQString &room, const TQStringList &members, const TQString &msg ); + void inviteConference( const TQString &room, const TQStringList &members, const TQString &msg ); + void addInvite( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ); signals: - void gotInvite( const QString &who, const QString &room, const QString &msg, const QStringList &members); - void gotMessage( const QString &who, const QString &room, const QString &msg ); - void userJoined( const QString &who, const QString &room ); - void userLeft( const QString &who, const QString &room ); - void userDeclined( const QString &who, const QString &room, const QString &msg ); + void gotInvite( const TQString &who, const TQString &room, const TQString &msg, const TQStringList &members); + void gotMessage( const TQString &who, const TQString &room, const TQString &msg ); + void userJoined( const TQString &who, const TQString &room ); + void userLeft( const TQString &who, const TQString &room ); + void userDeclined( const TQString &who, const TQString &room, const TQString &msg ); private: void parseInvitation( YMSGTransfer *transfer ); void parseMessage( YMSGTransfer *transfer ); diff --git a/kopete/protocols/yahoo/libkyahoo/connector.cpp b/kopete/protocols/yahoo/libkyahoo/connector.cpp index 773f8757..cc7dcfa3 100644 --- a/kopete/protocols/yahoo/libkyahoo/connector.cpp +++ b/kopete/protocols/yahoo/libkyahoo/connector.cpp @@ -20,8 +20,8 @@ #include "connector.h" -Connector::Connector(QObject *parent) -:QObject(parent) +Connector::Connector(TQObject *parent) +:TQObject(parent) { setPeerAddressNone(); } @@ -35,7 +35,7 @@ bool Connector::havePeerAddress() const return haveaddr; } -QHostAddress Connector::peerAddress() const +TQHostAddress Connector::peerAddress() const { return addr; } @@ -48,11 +48,11 @@ Q_UINT16 Connector::peerPort() const void Connector::setPeerAddressNone() { haveaddr = false; - addr = QHostAddress(); + addr = TQHostAddress(); port = 0; } -void Connector::setPeerAddress(const QHostAddress &_addr, Q_UINT16 _port) +void Connector::setPeerAddress(const TQHostAddress &_addr, Q_UINT16 _port) { haveaddr = true; addr = _addr; diff --git a/kopete/protocols/yahoo/libkyahoo/connector.h b/kopete/protocols/yahoo/libkyahoo/connector.h index dea818fb..02b47019 100644 --- a/kopete/protocols/yahoo/libkyahoo/connector.h +++ b/kopete/protocols/yahoo/libkyahoo/connector.h @@ -22,8 +22,8 @@ #define LIBKYAHOO_CONNECTOR_H -#include -#include "qhostaddress.h" +#include +#include "tqhostaddress.h" class ByteStream; @@ -31,15 +31,15 @@ class Connector : public QObject { Q_OBJECT public: - Connector(QObject *parent=0); + Connector(TQObject *parent=0); virtual ~Connector(); - virtual void connectToServer(const QString &server)=0; + virtual void connectToServer(const TQString &server)=0; virtual ByteStream *stream() const=0; virtual void done()=0; bool havePeerAddress() const; - QHostAddress peerAddress() const; + TQHostAddress peerAddress() const; Q_UINT16 peerPort() const; signals: @@ -48,11 +48,11 @@ signals: protected: void setPeerAddressNone(); - void setPeerAddress(const QHostAddress &addr, Q_UINT16 port); + void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port); private: bool haveaddr; - QHostAddress addr; + TQHostAddress addr; Q_UINT16 port; }; diff --git a/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp b/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp index 2c73ef2b..573c5ccf 100644 --- a/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp +++ b/kopete/protocols/yahoo/libkyahoo/coreprotocol.cpp @@ -22,9 +22,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -33,7 +33,7 @@ #include "ymsgprotocol.h" #include "ymsgtransfer.h" -CoreProtocol::CoreProtocol() : QObject() +CoreProtocol::CoreProtocol() : TQObject() { m_YMSGProtocol = new YMSGProtocol( this, "ymsgprotocol" ); } @@ -47,7 +47,7 @@ int CoreProtocol::state() return m_state; } -void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) +void CoreProtocol::addIncomingData( const TQByteArray & incomingBytes ) { // store locally int oldsize = m_in.size(); @@ -75,7 +75,7 @@ void CoreProtocol::addIncomingData( const QByteArray & incomingBytes ) //m_in.remove( 0, parsedBytes ); // copy the unparsed bytes into a new qbytearray and replace m_in with that - QByteArray remainder( size - parsedBytes ); + TQByteArray remainder( size - parsedBytes ); memcpy( remainder.data(), m_in.data() + parsedBytes, remainder.size() ); m_in = remainder; } @@ -112,7 +112,7 @@ Transfer* CoreProtocol::incomingTransfer() } } -void cp_dump( const QByteArray &bytes ) +void cp_dump( const TQByteArray &bytes ) { #ifdef YAHOO_COREPROTOCOL_DEBUG kdDebug(YAHOO_RAW_DEBUG) << " contains " << bytes.count() << " bytes" << endl; @@ -133,11 +133,11 @@ void CoreProtocol::outgoingTransfer( Transfer* outgoing ) { kdDebug(YAHOO_RAW_DEBUG) << " got YMSGTransfer" << endl; YMSGTransfer *yt = (YMSGTransfer *) outgoing; - QByteArray bytesOut = yt->serialize(); + TQByteArray bytesOut = yt->serialize(); - //QTextStream dout( bytesOut, QIODevice::WriteOnly ); - //dout.setEncoding( QTextStream::Latin1 ); - //dout.setByteOrder( QDataStream::LittleEndian ); + //TQTextStream dout( bytesOut, TQIODevice::WriteOnly ); + //dout.setEncoding( TQTextStream::Latin1 ); + //dout.setByteOrder( TQDataStream::LittleEndian ); //dout << bytesOut; //kdDebug(YAHOO_RAW_DEBUG) << " " << bytesOut; emit outgoingData( bytesOut ); @@ -149,7 +149,7 @@ void CoreProtocol::outgoingTransfer( Transfer* outgoing ) -int CoreProtocol::wireToTransfer( const QByteArray& wire ) +int CoreProtocol::wireToTransfer( const TQByteArray& wire ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; // processing incoming data and reassembling it into transfers @@ -163,8 +163,8 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire ) return bytesParsed; } - QByteArray tempWire = wire; - QDataStream din( tempWire, IO_ReadOnly ); + TQByteArray tempWire = wire; + TQDataStream din( tempWire, IO_ReadOnly ); // look at first four bytes and decide what to do with the chunk if ( okToProceed( din ) ) @@ -194,8 +194,8 @@ int CoreProtocol::wireToTransfer( const QByteArray& wire ) else { kdDebug(YAHOO_RAW_DEBUG) << " - not a valid YMSG packet. Trying to recover." << endl; - QTextStream s( wire, IO_ReadOnly ); - QString remaining = s.read(); + TQTextStream s( wire, IO_ReadOnly ); + TQString remaining = s.read(); int pos = remaining.find( "YMSG", bytesParsed ); if( pos >= 0 ) { @@ -217,12 +217,12 @@ void CoreProtocol::reset() m_in.resize( 0 ); } -void CoreProtocol::slotOutgoingData( const QByteArray &out ) +void CoreProtocol::slotOutgoingData( const TQByteArray &out ) { qDebug( "%s", out.data() ); } -bool CoreProtocol::okToProceed( QDataStream &din) +bool CoreProtocol::okToProceed( TQDataStream &din) { if ( din.atEnd() ) { diff --git a/kopete/protocols/yahoo/libkyahoo/coreprotocol.h b/kopete/protocols/yahoo/libkyahoo/coreprotocol.h index 6432093c..c1c05d89 100644 --- a/kopete/protocols/yahoo/libkyahoo/coreprotocol.h +++ b/kopete/protocols/yahoo/libkyahoo/coreprotocol.h @@ -22,7 +22,7 @@ #ifndef YAHOO_CORE_PROTOCOL_H #define YAHOO_CORE_PROTOCOL_H -#include +#include class Transfer; class YMSGProtocol; @@ -47,7 +47,7 @@ public: * This requires parsing out each FLAP, etc. from the incoming data * @param incomingBytes Raw data in wire format. */ - void addIncomingData( const QByteArray& incomingBytes ); + void addIncomingData( const TQByteArray& incomingBytes ); /** * @return the incoming transfer or 0 if none is available. @@ -69,7 +69,7 @@ signals: /** * Emitted as the core protocol converts fields to wire ready data */ - void outgoingData( const QByteArray& ); + void outgoingData( const TQByteArray& ); /** * Emitted when there is incoming data, parsed into a Transfer @@ -79,21 +79,21 @@ protected slots: /** * Just a debug method to test emitting to the socket, atm - should go to the ClientStream */ - void slotOutgoingData( const QByteArray & ); + void slotOutgoingData( const TQByteArray & ); protected: /** * Check that there is data to read, and set the protocol's state if there isn't any. */ - bool okToProceed( QDataStream & ); + bool okToProceed( TQDataStream & ); /** * Convert incoming wire data into a Transfer object and queue it * @return number of bytes from the input that were parsed into a Transfer */ - int wireToTransfer( const QByteArray& wire ); + int wireToTransfer( const TQByteArray& wire ); private: - QByteArray m_in; // buffer containing unprocessed bytes we received + TQByteArray m_in; // buffer containing unprocessed bytes we received int m_error; Transfer* m_inTransfer; // the transfer that is being received int m_state; // represents the protocol's overall state diff --git a/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp b/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp index e011dfeb..fd9657f7 100644 --- a/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.cpp @@ -20,8 +20,8 @@ #include "yahootypes.h" #include "client.h" -#include -#include +#include +#include #include //#include @@ -76,12 +76,12 @@ void FileTransferNotifierTask::parseFileTransfer( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString from; /* key = 4 */ - QString to; /* key = 5 */ - QString url; /* key = 20 */ + TQString from; /* key = 4 */ + TQString to; /* key = 5 */ + TQString url; /* key = 20 */ long expires; /* key = 38 */ - QString msg; /* key = 14 */ - QString filename; /* key = 27 */ + TQString msg; /* key = 14 */ + TQString filename; /* key = 27 */ unsigned long size; /* key = 28 */ from = t->firstParam( 4 ); @@ -108,22 +108,22 @@ void FileTransferNotifierTask::parseFileTransfer( YMSGTransfer *t ) unsigned int right = url.findRev( '?' ); filename = url.mid( left, right - left ); - emit incomingFileTransfer( from, url, expires, msg, filename, size, QPixmap() ); + emit incomingFileTransfer( from, url, expires, msg, filename, size, TQPixmap() ); } void FileTransferNotifierTask::parseFileTransfer7( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString from; /* key = 4 */ - QString to; /* key = 5 */ - QString url; /* key = 20 */ + TQString from; /* key = 4 */ + TQString to; /* key = 5 */ + TQString url; /* key = 20 */ long expires; /* key = 38 */ - QString msg; /* key = 14 */ - QString filename; /* key = 27 */ + TQString msg; /* key = 14 */ + TQString filename; /* key = 27 */ unsigned long size; /* key = 28 */ - QByteArray preview; /* key = 267 */ - QPixmap previewPixmap; + TQByteArray preview; /* key = 267 */ + TQPixmap previewPixmap; if( t->firstParam( 222 ).toInt() == 2 ) return; // user cancelled the file transfer @@ -137,7 +137,7 @@ void FileTransferNotifierTask::parseFileTransfer7( YMSGTransfer *t ) size = t->firstParam( 28 ).toULong(); // FIXME (same) - //preview = QByteArray::fromBase64( t->firstParam( 267 ) ); + //preview = TQByteArray::fromBase64( t->firstParam( 267 ) ); if( preview.size() > 0 ) { diff --git a/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.h b/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.h index 24b684f4..d5f6c7f2 100644 --- a/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.h +++ b/kopete/protocols/yahoo/libkyahoo/filetransfernotifiertask.h @@ -39,8 +39,8 @@ public: protected: virtual bool forMe( const Transfer *transfer ) const; signals: - void incomingFileTransfer( const QString &who, const QString &url, long expires, const QString &msg , - const QString &fname, unsigned long size, const QPixmap &preview ); + void incomingFileTransfer( const TQString &who, const TQString &url, long expires, const TQString &msg , + const TQString &fname, unsigned long size, const TQPixmap &preview ); private: void parseFileTransfer( YMSGTransfer *transfer ); void parseFileTransfer7( YMSGTransfer *transfer ); diff --git a/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.cpp b/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.cpp index eca3318a..15c3b078 100644 --- a/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.cpp +++ b/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.cpp @@ -19,8 +19,8 @@ #include "inputprotocolbase.h" -InputProtocolBase::InputProtocolBase(QObject *parent, const char *name) - : QObject(parent, name) +InputProtocolBase::InputProtocolBase(TQObject *parent, const char *name) + : TQObject(parent, name) { } @@ -34,13 +34,13 @@ uint InputProtocolBase::state() const return m_state; } -bool InputProtocolBase::readString( QString &message ) +bool InputProtocolBase::readString( TQString &message ) { uint len; - QCString rawData; + TQCString rawData; if ( !safeReadBytes( rawData, len ) ) return false; - message = QString::fromUtf8( rawData.data(), len - 1 ); + message = TQString::fromUtf8( rawData.data(), len - 1 ); return true; } @@ -61,7 +61,7 @@ bool InputProtocolBase::okToProceed() } // FIXME: need to be checked -bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) +bool InputProtocolBase::safeReadBytes( TQCString & data, uint & len ) { // read the length of the bytes Q_UINT32 val; @@ -72,7 +72,7 @@ bool InputProtocolBase::safeReadBytes( QCString & data, uint & len ) if ( val > 1024 ) return false; //qDebug( "EventProtocol::safeReadBytes() - expecting %i bytes", val ); - QCString temp( val ); + TQCString temp( val ); if ( val != 0 ) { if ( !okToProceed() ) diff --git a/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.h b/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.h index 18a3dab3..e236bc68 100644 --- a/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.h +++ b/kopete/protocols/yahoo/libkyahoo/inputprotocolbase.h @@ -19,7 +19,7 @@ #ifndef INPUTPROTOCOLBASE_H #define INPUTPROTOCOLBASE_H -#include +#include class Transfer; /** @@ -32,7 +32,7 @@ class InputProtocolBase : public QObject Q_OBJECT public: enum EventProtocolState { Success, NeedMore, OutOfSync, ProtocolError }; - InputProtocolBase(QObject *parent = 0, const char *name = 0); + InputProtocolBase(TQObject *parent = 0, const char *name = 0); ~InputProtocolBase(); /** * Returns a value describing the state of the object. @@ -45,13 +45,13 @@ public: * @param bytes this will be set to the number of bytes that were successfully parsed. It is no indication of the success of the whole procedure * @return On success, a Transfer object that the caller is responsible for deleting. It will be either an EventTransfer or a Response, delete as appropriate. On failure, returns 0. */ - virtual Transfer * parse( const QByteArray &, uint & bytes ) = 0 ; + virtual Transfer * parse( const TQByteArray &, uint & bytes ) = 0 ; protected: /** * Reads an arbitrary string * updates the bytes parsed counter */ - bool readString( QString &message ); + bool readString( TQString &message ); /** * Check that there is data to read, and set the protocol's state if there isn't any. */ @@ -61,12 +61,12 @@ protected: * updates the bytes parsed counter * @return false if the string was broken or there was no data available at all */ - bool safeReadBytes( QCString & data, uint & len ); + bool safeReadBytes( TQCString & data, uint & len ); protected: uint m_state; uint m_bytes; - QDataStream *m_din; + TQDataStream *m_din; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/listtask.cpp b/kopete/protocols/yahoo/libkyahoo/listtask.cpp index b1e35940..d299f963 100644 --- a/kopete/protocols/yahoo/libkyahoo/listtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/listtask.cpp @@ -14,8 +14,8 @@ ************************************************************************* */ -#include -#include +#include +#include #include "listtask.h" #include "transfer.h" @@ -64,8 +64,8 @@ void ListTask::parseBuddyList( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString group; - QString buddy; + TQString group; + TQString buddy; // We need some low-level parsing here // FIXME same: need to check @@ -90,7 +90,7 @@ void ListTask::parseBuddyList( YMSGTransfer *t ) case 301: if( p.second == "319"){ kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << "Parsed buddy: " << buddy << " in group " << group << endl; - emit gotBuddy( buddy, QString(), group ); + emit gotBuddy( buddy, TQString(), group ); } } } @@ -100,11 +100,11 @@ void ListTask::parseStealthList( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString raw; + TQString raw; raw = t->firstParam( 185 ); - const QStringList buddies = QStringList::split( ',', raw ); - for ( QStringList::ConstIterator it = buddies.begin(); it != buddies.end(); ++it ) + const TQStringList buddies = TQStringList::split( ',', raw ); + for ( TQStringList::ConstIterator it = buddies.begin(); it != buddies.end(); ++it ) { emit stealthStatusChanged( *it, Yahoo::StealthActive ); } diff --git a/kopete/protocols/yahoo/libkyahoo/listtask.h b/kopete/protocols/yahoo/libkyahoo/listtask.h index cc058004..514df17e 100644 --- a/kopete/protocols/yahoo/libkyahoo/listtask.h +++ b/kopete/protocols/yahoo/libkyahoo/listtask.h @@ -39,8 +39,8 @@ protected: void parseBuddyList( YMSGTransfer *transfer ); void parseStealthList( YMSGTransfer *transfer ); signals: - void gotBuddy(const QString&, const QString&, const QString&); - void stealthStatusChanged( const QString&, Yahoo::StealthStatus ); + void gotBuddy(const TQString&, const TQString&, const TQString&); + void stealthStatusChanged( const TQString&, Yahoo::StealthStatus ); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/logintask.cpp b/kopete/protocols/yahoo/libkyahoo/logintask.cpp index d3b5be7b..3c3127b2 100644 --- a/kopete/protocols/yahoo/libkyahoo/logintask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/logintask.cpp @@ -25,7 +25,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include +#include #include #include @@ -179,10 +179,10 @@ void LoginTask::sendAuthResp(YMSGTransfer* t) { kdDebug(YAHOO_RAW_DEBUG) ; - QString sn = t->firstParam( 1 ); - QString seed = t->firstParam( 94 ); + TQString sn = t->firstParam( 1 ); + TQString seed = t->firstParam( 94 ); m_challengeString = seed; - QString version_s = t->firstParam( 13 ); + TQString version_s = t->firstParam( 13 ); m_sessionID = t->id(); int version = version_s.toInt(); @@ -205,23 +205,23 @@ void LoginTask::sendAuthResp(YMSGTransfer* t) emit haveSessionID( m_sessionID ); } -void LoginTask::sendAuthSixteenStage1(const QString& sn, const QString& seed) +void LoginTask::sendAuthSixteenStage1(const TQString& sn, const TQString& seed) { - const QString YahooTokenUrl = "https://login.yahoo.com/config/pwtoken_get?src=ymsgr&ts=&login=%1&passwd=%2&chal=%3"; + const TQString YahooTokenUrl = "https://login.yahoo.com/config/pwtoken_get?src=ymsgr&ts=&login=%1&passwd=%2&chal=%3"; kdDebug(YAHOO_RAW_DEBUG) << "seed:" << seed << endl; - m_stage1Data= QString::null; + m_stage1Data= TQString::null; /* construct a URL from the seed and request tokens */ - QByteArray encodedUrl; - QString fullUrl = YahooTokenUrl.arg(sn, client()->password(), seed); + TQByteArray encodedUrl; + TQString fullUrl = YahooTokenUrl.arg(sn, client()->password(), seed); KURL tokenUrl(fullUrl); KIO::Job* job = KIO::get(tokenUrl, true, false); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(handleAuthSixteenStage1Data(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job*)), - this, SLOT(handleAuthSixteenStage1Result(KIO::Job*))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(handleAuthSixteenStage1Data(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), + this, TQT_SLOT(handleAuthSixteenStage1Result(KIO::Job*))); } -void LoginTask::handleAuthSixteenStage1Data(KIO::Job* job, const QByteArray& data) +void LoginTask::handleAuthSixteenStage1Data(KIO::Job* job, const TQByteArray& data) { kdDebug(YAHOO_RAW_DEBUG) << "data:" << data << endl; m_stage1Data.append(data); @@ -230,12 +230,12 @@ void LoginTask::handleAuthSixteenStage1Data(KIO::Job* job, const QByteArray& dat void LoginTask::handleAuthSixteenStage1Result(KIO::Job* job) { int responseNumber = -1; - QString token; + TQString token; int error = job->error(); kdDebug(YAHOO_RAW_DEBUG) << "error:" << error << endl; if (error == 0) { - QStringList responses = QStringList::split("\r\n", m_stage1Data); + TQStringList responses = TQStringList::split("\r\n", m_stage1Data); responseNumber = responses[0].toInt(); if (responses.count() >= 3) { @@ -250,26 +250,26 @@ void LoginTask::handleAuthSixteenStage1Result(KIO::Job* job) { case -1: /* error in the received stream */ - emit loginResponse(Yahoo::LoginSock, QString()); + emit loginResponse(Yahoo::LoginSock, TQString()); kdDebug(YAHOO_RAW_DEBUG) << "unknown error logging in" << endl; break; case 1212: /* password incorrect */ - emit loginResponse(Yahoo::LoginPasswd, QString()); + emit loginResponse(Yahoo::LoginPasswd, TQString()); kdDebug(YAHOO_RAW_DEBUG) << "password incorrect" << endl; break; case 1213: /* security lock */ - emit loginResponse(Yahoo::LoginLock, QString()); + emit loginResponse(Yahoo::LoginLock, TQString()); break; case 1235: /* username does not exist */ - emit loginResponse(Yahoo::LoginUname, QString()); + emit loginResponse(Yahoo::LoginUname, TQString()); kdDebug(YAHOO_RAW_DEBUG) << "user does not exist" << endl; break; case 1214: case 1236: - emit loginResponse(Yahoo::LoginVerify, QString()); + emit loginResponse(Yahoo::LoginVerify, TQString()); break; case 100: /* username or password missing */ /*FIXME handle this */ @@ -287,21 +287,21 @@ void LoginTask::handleAuthSixteenStage1Result(KIO::Job* job) } } -void LoginTask::sendAuthSixteenStage2(const QString& token) +void LoginTask::sendAuthSixteenStage2(const TQString& token) { - const QString YahooLoginUrl = "https://login.yahoo.com/config/pwtoken_login?src=ymsgr&ts=&token=%1"; + const TQString YahooLoginUrl = "https://login.yahoo.com/config/pwtoken_login?src=ymsgr&ts=&token=%1"; kdDebug(YAHOO_RAW_DEBUG) << "token:" << token << endl; - m_stage2Data = QString::null; - QString fullUrl = YahooLoginUrl.arg(token); + m_stage2Data = TQString::null; + TQString fullUrl = YahooLoginUrl.arg(token); KURL loginUrl(fullUrl); KIO::Job* job = KIO::get(loginUrl, true, false); - connect(job, SIGNAL(data(KIO::Job*, const QByteArray&)), - this, SLOT(handleAuthSixteenStage2Data(KIO::Job*, const QByteArray&))); - connect(job, SIGNAL(result(KIO::Job*)), - this, SLOT(handleAuthSixteenStage2Result(KIO::Job*))); + connect(job, TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)), + this, TQT_SLOT(handleAuthSixteenStage2Data(KIO::Job*, const TQByteArray&))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), + this, TQT_SLOT(handleAuthSixteenStage2Result(KIO::Job*))); } -void LoginTask::handleAuthSixteenStage2Data(KIO::Job*, const QByteArray& data) +void LoginTask::handleAuthSixteenStage2Data(KIO::Job*, const TQByteArray& data) { kdDebug(YAHOO_RAW_DEBUG) << "data:" << data << endl; m_stage2Data.append(data); @@ -309,13 +309,13 @@ void LoginTask::handleAuthSixteenStage2Data(KIO::Job*, const QByteArray& data) void LoginTask::handleAuthSixteenStage2Result(KIO::Job* job) { - QString crumb; + TQString crumb; int responseNumber = -1; int error = job->error(); kdDebug(YAHOO_RAW_DEBUG) << "error:" << error << endl; if (error == 0) { - QStringList responses = QStringList::split("\r\n", m_stage2Data); + TQStringList responses = TQStringList::split("\r\n", m_stage2Data); kdDebug(YAHOO_RAW_DEBUG) << responses << endl; responseNumber = responses[0].toInt(); if (responseNumber == 0) @@ -331,10 +331,10 @@ void LoginTask::handleAuthSixteenStage2Result(KIO::Job* job) switch(responseNumber) { case -1: - emit loginResponse(Yahoo::LoginSock, QString()); + emit loginResponse(Yahoo::LoginSock, TQString()); break; case 100: - emit loginResponse(Yahoo::LoginSock, QString()); + emit loginResponse(Yahoo::LoginSock, TQString()); break; default: /* try to login anyways */ break; @@ -342,22 +342,22 @@ void LoginTask::handleAuthSixteenStage2Result(KIO::Job* job) } else { - QString cryptString = crumb; + TQString cryptString = crumb; cryptString.append(m_challengeString); sendAuthSixteenStage3(cryptString); } } } -void LoginTask::sendAuthSixteenStage3(const QString& cryptString) +void LoginTask::sendAuthSixteenStage3(const TQString& cryptString) { kdDebug(YAHOO_RAW_DEBUG) << " with crypt string" << cryptString << endl; - //QByteArray cryptStringHash = QCryptographicHash::hash( cryptString.toAscii(), + //TQByteArray cryptStringHash = QCryptographicHash::hash( cryptString.toAscii(), // QCryptographicHash::Md5 ); //cryptStringHash = cryptStringHash.toBase64(); - QString cryptStringHash = KMD5( cryptString.ascii() ).base64Digest(); + TQString cryptStringHash = KMD5( cryptString.ascii() ).base64Digest(); cryptStringHash = cryptStringHash.replace('+', '.'); cryptStringHash = cryptStringHash.replace('/', '_'); @@ -379,7 +379,7 @@ void LoginTask::sendAuthSixteenStage3(const QString& cryptString) } -void LoginTask::sendAuthResp_pre_0x0b(const QString &/*sn*/, const QString &/*seed*/) +void LoginTask::sendAuthResp_pre_0x0b(const TQString &/*sn*/, const TQString &/*seed*/) { kdDebug(YAHOO_RAW_DEBUG) ; } @@ -392,7 +392,7 @@ void LoginTask::handleAuthResp(YMSGTransfer *t) { case( Yahoo::ServiceList ): kdDebug(YAHOO_RAW_DEBUG) << "Emitting Signal" << endl; - emit loginResponse( Yahoo::LoginOk, QString() ); + emit loginResponse( Yahoo::LoginOk, TQString() ); break; case( Yahoo::ServiceAuthResp ): kdDebug(YAHOO_RAW_DEBUG) << "Emitting Signal" << endl; @@ -415,7 +415,7 @@ void LoginTask::parseCookies( YMSGTransfer *t ) for( int i = 0; i < t->paramCount( 59 ); ++i) { - QString cookie; + TQString cookie; cookie = t->nthParam( 59, i ); if( cookie.startsWith( "Y" ) ) { @@ -435,27 +435,27 @@ void LoginTask::parseCookies( YMSGTransfer *t ) emit haveCookies(); } -void LoginTask::setVerificationWord( const QString &word ) +void LoginTask::setVerificationWord( const TQString &word ) { m_verificationWord = word; } -const QString& LoginTask::yCookie() +const TQString& LoginTask::yCookie() { return m_yCookie; } -const QString& LoginTask::tCookie() +const TQString& LoginTask::tCookie() { return m_tCookie; } -const QString& LoginTask::cCookie() +const TQString& LoginTask::cCookie() { return m_cCookie; } -const QString& LoginTask::loginCookie() +const TQString& LoginTask::loginCookie() { return m_loginCookie; } diff --git a/kopete/protocols/yahoo/libkyahoo/logintask.h b/kopete/protocols/yahoo/libkyahoo/logintask.h index a3701692..563cd3a4 100644 --- a/kopete/protocols/yahoo/libkyahoo/logintask.h +++ b/kopete/protocols/yahoo/libkyahoo/logintask.h @@ -47,47 +47,47 @@ public: void reset(); void setStateOnConnect( Yahoo::Status status ); - void setVerificationWord( const QString &word ); + void setVerificationWord( const TQString &word ); - const QString &yCookie(); - const QString &cCookie(); - const QString &tCookie(); - const QString &loginCookie(); + const TQString &yCookie(); + const TQString &cCookie(); + const TQString &tCookie(); + const TQString &loginCookie(); protected: virtual bool forMe( const Transfer* transfer ) const; enum State { InitialState, SentVerify, GotVerifyACK, SentAuth, GotAuthACK, SentAuthResp }; void sendVerify(); void sendAuth(YMSGTransfer* transfer); void sendAuthResp(YMSGTransfer* transfer); - void sendAuthResp_0x0b(const QString &sn, const QString &seed, uint sessionID); - void sendAuthResp_pre_0x0b(const QString &sn, const QString &seed); + void sendAuthResp_0x0b(const TQString &sn, const TQString &seed, uint sessionID); + void sendAuthResp_pre_0x0b(const TQString &sn, const TQString &seed); void handleAuthResp(YMSGTransfer *transfer); void parseCookies( YMSGTransfer *transfer ); - void sendAuthSixteenStage1(const QString& sn, const QString& seed); - void sendAuthSixteenStage2(const QString& token); - void sendAuthSixteenStage3(const QString& cryptString); + void sendAuthSixteenStage1(const TQString& sn, const TQString& seed); + void sendAuthSixteenStage2(const TQString& token); + void sendAuthSixteenStage3(const TQString& cryptString); protected slots: - void handleAuthSixteenStage1Data(KIO::Job*, const QByteArray& data); + void handleAuthSixteenStage1Data(KIO::Job*, const TQByteArray& data); void handleAuthSixteenStage1Result(KIO::Job*); - void handleAuthSixteenStage2Data(KIO::Job*, const QByteArray& data); + void handleAuthSixteenStage2Data(KIO::Job*, const TQByteArray& data); void handleAuthSixteenStage2Result(KIO::Job*); signals: void haveSessionID( uint ); void haveCookies(); - void loginResponse( int, const QString& ); + void loginResponse( int, const TQString& ); void buddyListReady(); private: State mState; Yahoo::Status m_stateOnConnect; - QString m_yCookie; - QString m_tCookie; - QString m_cCookie; - QString m_loginCookie; - QString m_verificationWord; - QString m_stage1Data; - QString m_stage2Data; - QString m_challengeString; + TQString m_yCookie; + TQString m_tCookie; + TQString m_cCookie; + TQString m_loginCookie; + TQString m_verificationWord; + TQString m_stage1Data; + TQString m_stage2Data; + TQString m_challengeString; uint m_sessionID; }; diff --git a/kopete/protocols/yahoo/libkyahoo/logofftask.cpp b/kopete/protocols/yahoo/libkyahoo/logofftask.cpp index 0531283b..4816ba44 100644 --- a/kopete/protocols/yahoo/libkyahoo/logofftask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/logofftask.cpp @@ -19,7 +19,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include +#include #include LogoffTask::LogoffTask(Task* parent) : Task(parent) diff --git a/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.cpp b/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.cpp index 1d637877..de6a1080 100644 --- a/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include +#include #include "mailnotifiertask.h" #include "transfer.h" @@ -62,15 +62,15 @@ void MailNotifierTask::parseMail( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString count = t->firstParam( 9 ); - QString mail = t->firstParam( 42 ); - QString from = t->firstParam( 43 ); - QString subject = t->firstParam( 18 ); + TQString count = t->firstParam( 9 ); + TQString mail = t->firstParam( 42 ); + TQString from = t->firstParam( 43 ); + TQString subject = t->firstParam( 18 ); if( !mail.isEmpty() && !from.isEmpty() && !subject.isEmpty() ) - emit mailNotify( QString::fromLatin1( "%1 <%2>").arg( from, mail ), subject, count.toInt() ); + emit mailNotify( TQString::fromLatin1( "%1 <%2>").arg( from, mail ), subject, count.toInt() ); else - emit mailNotify( QString(), QString(), count.toInt()); + emit mailNotify( TQString(), TQString(), count.toInt()); } #include "mailnotifiertask.moc" diff --git a/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.h b/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.h index 1564eb16..d2c03bdd 100644 --- a/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.h +++ b/kopete/protocols/yahoo/libkyahoo/mailnotifiertask.h @@ -38,7 +38,7 @@ protected: virtual bool forMe( const Transfer *transfer ) const; void parseMail( YMSGTransfer *transfer ); signals: - void mailNotify(const QString&, const QString&, int); + void mailNotify(const TQString&, const TQString&, int); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/messagereceivertask.cpp b/kopete/protocols/yahoo/libkyahoo/messagereceivertask.cpp index 698552a3..769b4abe 100644 --- a/kopete/protocols/yahoo/libkyahoo/messagereceivertask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/messagereceivertask.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include +#include #include "messagereceivertask.h" #include "transfer.h" @@ -73,12 +73,12 @@ void MessageReceiverTask::parseMessage( YMSGTransfer *t ) int cnt = t->paramCount( 5 ); for( int i = 0; i < cnt; ++i ) { - QString to = t->nthParam( 5, i ); - QString timestamp = t->nthParamSeparated( 15, i, 4 ); - QString utf8 = t->nthParamSeparated( 97, i, 4 ); - QString from = t->nthParamSeparated( 1, i, 4 ).isEmpty() ? t->nthParam( 4, i ) : t->nthParamSeparated( 1, i, 4 ); - QString msg = t->nthParamSeparated( 14, i, 4 ); - QString sysmsg = t->nthParamSeparated( 16, i, 4 ); + TQString to = t->nthParam( 5, i ); + TQString timestamp = t->nthParamSeparated( 15, i, 4 ); + TQString utf8 = t->nthParamSeparated( 97, i, 4 ); + TQString from = t->nthParamSeparated( 1, i, 4 ).isEmpty() ? t->nthParam( 4, i ) : t->nthParamSeparated( 1, i, 4 ); + TQString msg = t->nthParamSeparated( 14, i, 4 ); + TQString sysmsg = t->nthParamSeparated( 16, i, 4 ); // The arrangement of the key->value pairs is different when there is only one message in the packet. // Separating by key "5" (sender) doesn't work in that case, because the "1" and "4" keys are sent before the "5" key @@ -98,7 +98,7 @@ void MessageReceiverTask::parseMessage( YMSGTransfer *t ) } if( utf8.startsWith( "1" ) ) - msg = QString::fromUtf8( msg.latin1() ); + msg = TQString::fromUtf8( msg.latin1() ); if( t->service() == Yahoo::ServiceSysMessage ) emit systemMessage( sysmsg ); @@ -116,11 +116,11 @@ void MessageReceiverTask::parseNotify( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString from = t->firstParam( 4 ); - //QString to = t->firstParam( 5 ); - QString type = t->firstParam( 49 ); - QString stat = t->firstParam( 13 ); - QString ind = t->firstParam( 14 ); + TQString from = t->firstParam( 4 ); + //TQString to = t->firstParam( 5 ); + TQString type = t->firstParam( 49 ); + TQString stat = t->firstParam( 13 ); + TQString ind = t->firstParam( 14 ); if( type.startsWith( "TYPING" ) ) emit gotTypingNotify( from, stat.toInt() ); diff --git a/kopete/protocols/yahoo/libkyahoo/messagereceivertask.h b/kopete/protocols/yahoo/libkyahoo/messagereceivertask.h index 6ff26bca..89536443 100644 --- a/kopete/protocols/yahoo/libkyahoo/messagereceivertask.h +++ b/kopete/protocols/yahoo/libkyahoo/messagereceivertask.h @@ -39,11 +39,11 @@ protected: void parseMessage( YMSGTransfer *transfer ); void parseNotify( YMSGTransfer *transfer ); signals: - void gotIm(const QString&, const QString&, long, int); - void gotBuzz( const QString &who, long tm ); - void systemMessage(const QString&); - void gotTypingNotify(const QString &, int); - void gotWebcamInvite(const QString &); + void gotIm(const TQString&, const TQString&, long, int); + void gotBuzz( const TQString &who, long tm ); + void systemMessage(const TQString&); + void gotTypingNotify(const TQString &, int); + void gotWebcamInvite(const TQString &); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/modifybuddytask.cpp b/kopete/protocols/yahoo/libkyahoo/modifybuddytask.cpp index 018d0e84..e83b1e4b 100644 --- a/kopete/protocols/yahoo/libkyahoo/modifybuddytask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/modifybuddytask.cpp @@ -139,22 +139,22 @@ void ModifyBuddyTask::moveBuddy() send( mov ); } -void ModifyBuddyTask::setTarget( const QString &target ) +void ModifyBuddyTask::setTarget( const TQString &target ) { m_target = target; } -void ModifyBuddyTask::setMessage( const QString &text ) +void ModifyBuddyTask::setMessage( const TQString &text ) { m_message = text; } -void ModifyBuddyTask::setGroup( const QString &group ) +void ModifyBuddyTask::setGroup( const TQString &group ) { m_group = group; } -void ModifyBuddyTask::setOldGroup( const QString &old ) +void ModifyBuddyTask::setOldGroup( const TQString &old ) { m_oldGroup = old; } diff --git a/kopete/protocols/yahoo/libkyahoo/modifybuddytask.h b/kopete/protocols/yahoo/libkyahoo/modifybuddytask.h index 4b135f93..f3ceb73c 100644 --- a/kopete/protocols/yahoo/libkyahoo/modifybuddytask.h +++ b/kopete/protocols/yahoo/libkyahoo/modifybuddytask.h @@ -37,15 +37,15 @@ public: bool take(Transfer *transfer); void setType( Type type ); - void setMessage( const QString &text ); - void setTarget( const QString &target ); - void setGroup( const QString &group ); - void setOldGroup( const QString &group ); + void setMessage( const TQString &text ); + void setTarget( const TQString &target ); + void setGroup( const TQString &group ); + void setOldGroup( const TQString &group ); signals: - void buddyAddResult( const QString &, const QString &, bool ); - void buddyRemoveResult( const QString &, const QString &, bool ); - void buddyChangeGroupResult( const QString &, const QString &, bool ); + void buddyAddResult( const TQString &, const TQString &, bool ); + void buddyRemoveResult( const TQString &, const TQString &, bool ); + void buddyChangeGroupResult( const TQString &, const TQString &, bool ); protected: virtual bool forMe( const Transfer *transfer ) const; @@ -55,10 +55,10 @@ private: void removeBuddy(); void moveBuddy(); - QString m_message; - QString m_target; - QString m_group; - QString m_oldGroup; + TQString m_message; + TQString m_target; + TQString m_group; + TQString m_oldGroup; Type m_type; }; diff --git a/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp b/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp index 825f958d..1264272a 100644 --- a/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/modifyyabtask.cpp @@ -21,9 +21,9 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include -#include -#include +#include +#include +#include #include #include #include @@ -45,9 +45,9 @@ ModifyYABTask::~ModifyYABTask() void ModifyYABTask::onGo() { kdDebug(YAHOO_RAW_DEBUG) ; - m_socket = new KBufferedSocket( "address.yahoo.com", QString::number(80) ); - connect( m_socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( connectSucceeded() ) ); - connect( m_socket, SIGNAL( gotError(int) ), this, SLOT( connectFailed(int) ) ); + m_socket = new KBufferedSocket( "address.yahoo.com", TQString::number(80) ); + connect( m_socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( connectSucceeded() ) ); + connect( m_socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( connectFailed(int) ) ); m_socket->connect(); } @@ -59,15 +59,15 @@ void ModifyYABTask::setAction( Action action ) void ModifyYABTask::setEntry( const YABEntry &entry ) { - QDomDocument doc(""); - QDomElement root = doc.createElement( "ab" ); - QDomProcessingInstruction instr = doc.createProcessingInstruction("xml","version=\"1.0\" encoding=\"UTF-8\" "); + TQDomDocument doc(""); + TQDomElement root = doc.createElement( "ab" ); + TQDomProcessingInstruction instr = doc.createProcessingInstruction("xml","version=\"1.0\" encoding=\"UTF-8\" "); doc.appendChild(instr); root.setAttribute( "k", client()->userId() ); root.setAttribute( "cc", "1" ); doc.appendChild( root ); - QDomElement contact = doc.createElement( "ct" ); + TQDomElement contact = doc.createElement( "ct" ); entry.fillQDomElement( contact ); switch( m_action ) { @@ -91,7 +91,7 @@ void ModifyYABTask::connectFailed( int i) { m_socket->close(); client()->notifyError( i18n( "An error occurred while saving the address book entry." ), - QString( "%1 - %2").arg(i).arg(static_cast( sender() )->errorString()), Client::Error ); + TQString( "%1 - %2").arg(i).arg(static_cast( sender() )->errorString()), Client::Error ); } void ModifyYABTask::connectSucceeded() @@ -99,7 +99,7 @@ void ModifyYABTask::connectSucceeded() kdDebug(YAHOO_RAW_DEBUG) ; KBufferedSocket* socket = const_cast( static_cast( sender() ) ); - QString header = QString::fromLatin1("POST /yab/us?v=XM&prog=ymsgr&.intl=us&sync=1&tags=short&noclear=1& HTTP/1.1\r\n" + TQString header = TQString::fromLatin1("POST /yab/us?v=XM&prog=ymsgr&.intl=us&sync=1&tags=short&noclear=1& HTTP/1.1\r\n" "Cookie: Y=%1; T=%2; C=%3 ;B=fckeert1kk1nl&b=2\r\n" "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n" "Host: address.yahoo.com\r\n" @@ -108,9 +108,9 @@ void ModifyYABTask::connectSucceeded() .arg(client()->yCookie()).arg(client()->tCookie()) .arg(client()->cCookie()).arg(m_postData.utf8().size()); - QByteArray buffer; - QByteArray paket; - QDataStream stream( buffer, IO_WriteOnly ); + TQByteArray buffer; + TQByteArray paket; + TQDataStream stream( buffer, IO_WriteOnly ); stream.writeRawBytes( header.local8Bit(), header.length() ); stream.writeRawBytes( m_postData.utf8(), m_postData.utf8().size() ); @@ -123,24 +123,24 @@ void ModifyYABTask::connectSucceeded() return; } - connect( m_socket, SIGNAL( readyRead() ), this, SLOT( slotRead() ) ); + connect( m_socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotRead() ) ); } void ModifyYABTask::slotRead() { KBufferedSocket* socket = const_cast( static_cast( sender() ) ); - QByteArray ar( socket->bytesAvailable() ); + TQByteArray ar( socket->bytesAvailable() ); socket->readBlock( ar.data (), ar.size () ); - QString data( ar ); + TQString data( ar ); data = data.right( data.length() - data.find("") < 0 ) return; // Need more data m_socket->close(); - QDomDocument doc; - QDomNodeList list; - QDomElement e; + TQDomDocument doc; + TQDomNodeList list; + TQDomElement e; int it = 0; doc.setContent( m_data ); diff --git a/kopete/protocols/yahoo/libkyahoo/modifyyabtask.h b/kopete/protocols/yahoo/libkyahoo/modifyyabtask.h index cb9acde8..543b582c 100644 --- a/kopete/protocols/yahoo/libkyahoo/modifyyabtask.h +++ b/kopete/protocols/yahoo/libkyahoo/modifyyabtask.h @@ -46,7 +46,7 @@ public: signals: void gotEntry( YABEntry * ); void gotRevision( long rev, bool merged ); - void error( YABEntry *, const QString &); + void error( YABEntry *, const TQString &); private slots: void connectSucceeded(); void connectFailed( int ); @@ -54,8 +54,8 @@ private slots: private: KIO::TransferJob *m_transferJob; KNetwork::KBufferedSocket *m_socket; - QString m_postData; - QString m_data; + TQString m_postData; + TQString m_data; Action m_action; }; diff --git a/kopete/protocols/yahoo/libkyahoo/oscartypes.h b/kopete/protocols/yahoo/libkyahoo/oscartypes.h index 74ee818e..70d19c9a 100644 --- a/kopete/protocols/yahoo/libkyahoo/oscartypes.h +++ b/kopete/protocols/yahoo/libkyahoo/oscartypes.h @@ -19,7 +19,7 @@ #ifndef OSCARTYPES_H #define OSCARTYPES_H -#include +#include namespace Yahoo { diff --git a/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.cpp b/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.cpp index b88b99c6..d924b3a6 100644 --- a/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.cpp @@ -20,7 +20,7 @@ #include "yahootypes.h" #include "client.h" -#include +#include #include #include @@ -119,7 +119,7 @@ void PictureNotifierTask::parsePicture( YMSGTransfer *t ) QString nick; /* key = 4 */ int type; /* key = 13: 1 = request, 2 = notification, 0 = Just changed */ - QString url; /* key = 20 */ + TQString url; /* key = 20 */ int checksum; /* key = 192 */ nick = t->firstParam( 4 ); @@ -139,8 +139,8 @@ void PictureNotifierTask::parsePictureUploadResponse( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString url; - QString error; + TQString url; + TQString error; int expires; url = t->firstParam( 20 ); diff --git a/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.h b/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.h index 1a6536af..851c8b9c 100644 --- a/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.h +++ b/kopete/protocols/yahoo/libkyahoo/picturenotifiertask.h @@ -42,11 +42,11 @@ protected: void parsePicture( YMSGTransfer *transfer ); void parsePictureUploadResponse( YMSGTransfer *transfer ); signals: - void pictureStatusNotify( const QString &, int ); - void pictureChecksumNotify( const QString &, int ); - void pictureInfoNotify( const QString &, KURL, int ); - void pictureRequest( const QString & ); - void pictureUploaded( const QString &, int ); + void pictureStatusNotify( const TQString &, int ); + void pictureChecksumNotify( const TQString &, int ); + void pictureInfoNotify( const TQString &, KURL, int ); + void pictureRequest( const TQString & ); + void pictureUploaded( const TQString &, int ); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/pingtask.cpp b/kopete/protocols/yahoo/libkyahoo/pingtask.cpp index c8a97cd7..c453ff9d 100644 --- a/kopete/protocols/yahoo/libkyahoo/pingtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/pingtask.cpp @@ -21,7 +21,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include +#include #include PingTask::PingTask(Task* parent) : Task(parent) diff --git a/kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp b/kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp index 3bca2217..ec2e9f5f 100644 --- a/kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/receivefiletask.cpp @@ -20,8 +20,8 @@ #include "yahootypes.h" #include "client.h" -#include -#include +#include +#include #include #include #include @@ -49,7 +49,7 @@ void ReceiveFileTask::onGo() switch( m_type ) { case FileTransferAccept: - m_file = new QFile( m_localUrl.path() ); + m_file = new TQFile( m_localUrl.path() ); if( !m_file->open( IO_WriteOnly ) ) { emit error( m_transferId, KIO::ERR_CANNOT_OPEN_FOR_WRITING, i18n("Could not open file for writing.") ); @@ -58,8 +58,8 @@ void ReceiveFileTask::onGo() return; } m_transferJob = KIO::get( m_remoteUrl, false, false ); - QObject::connect( m_transferJob, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotComplete( KIO::Job* ) ) ); - QObject::connect( m_transferJob, SIGNAL( data( KIO::Job*, const QByteArray & ) ), this, SLOT( slotData( KIO::Job*, const QByteArray & ) ) ); + TQObject::connect( m_transferJob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotComplete( KIO::Job* ) ) ); + TQObject::connect( m_transferJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray & ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray & ) ) ); delete t; break; case FileTransfer7Accept: @@ -120,7 +120,7 @@ bool ReceiveFileTask::forMe( const Transfer *transfer ) const return false; } -void ReceiveFileTask::slotData( KIO::Job *job, const QByteArray& data ) +void ReceiveFileTask::slotData( KIO::Job *job, const TQByteArray& data ) { Q_UNUSED( job ); kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -168,7 +168,7 @@ void ReceiveFileTask::parseFileTransfer7Info( YMSGTransfer *transfer ) } else if( transfer->firstParam( 249 ).toInt() == 3 ) { - m_file = new QFile( m_localUrl.path() ); + m_file = new TQFile( m_localUrl.path() ); if( !m_file->open( IO_WriteOnly ) ) { emit error( m_transferId, KIO::ERR_CANNOT_OPEN_FOR_WRITING, i18n("Could not open file for writing.") ); @@ -187,19 +187,19 @@ void ReceiveFileTask::parseFileTransfer7Info( YMSGTransfer *transfer ) send( t ); // The server expects a HTTP HEAD command prior to the GET - m_mimetypeJob = KIO::mimetype(QString::fromLatin1("http://%1/relay?token=%2&sender=%3&recver=%4") - .arg( QString(transfer->firstParam( 250 )) ).arg( QString(transfer->firstParam( 251 )) ).arg(m_userId).arg(client()->userId()), false); + m_mimetypeJob = KIO::mimetype(TQString::fromLatin1("http://%1/relay?token=%2&sender=%3&recver=%4") + .arg( TQString(transfer->firstParam( 250 )) ).arg( TQString(transfer->firstParam( 251 )) ).arg(m_userId).arg(client()->userId()), false); m_mimetypeJob->addMetaData("cookies", "manual"); - m_mimetypeJob->addMetaData("setcookies", QString::fromLatin1("Cookie: T=%1; path=/; domain=.yahoo.com; Y=%2; C=%3;") + m_mimetypeJob->addMetaData("setcookies", TQString::fromLatin1("Cookie: T=%1; path=/; domain=.yahoo.com; Y=%2; C=%3;") .arg(client()->tCookie()).arg(client()->yCookie()).arg(client()->cCookie()) ); - m_transferJob = KIO::get( QString::fromLatin1("http://%1/relay?token=%2&sender=%3&recver=%4") - .arg( QString(transfer->firstParam( 250 )) ).arg( QString(transfer->firstParam( 251 )) ).arg(m_userId).arg(client()->userId()), false, false ); - QObject::connect( m_transferJob, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotComplete( KIO::Job* ) ) ); - QObject::connect( m_transferJob, SIGNAL( data( KIO::Job*, const QByteArray & ) ), this, SLOT( slotData( KIO::Job*, const QByteArray & ) ) ); + m_transferJob = KIO::get( TQString::fromLatin1("http://%1/relay?token=%2&sender=%3&recver=%4") + .arg( TQString(transfer->firstParam( 250 )) ).arg( TQString(transfer->firstParam( 251 )) ).arg(m_userId).arg(client()->userId()), false, false ); + TQObject::connect( m_transferJob, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotComplete( KIO::Job* ) ) ); + TQObject::connect( m_transferJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray & ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray & ) ) ); m_transferJob->addMetaData("cookies", "manual"); - m_transferJob->addMetaData("setcookies", QString::fromLatin1("Cookie: T=%1; path=/; domain=.yahoo.com; Y=%2; path=/; domain=.yahoo.com;") + m_transferJob->addMetaData("setcookies", TQString::fromLatin1("Cookie: T=%1; path=/; domain=.yahoo.com; Y=%2; path=/; domain=.yahoo.com;") .arg(client()->tCookie()).arg(client()->yCookie()) ); } } @@ -224,7 +224,7 @@ void ReceiveFileTask::setType( Type type ) m_type = type; } -void ReceiveFileTask::setUserId( const QString &userId ) +void ReceiveFileTask::setUserId( const TQString &userId ) { m_userId = userId; } diff --git a/kopete/protocols/yahoo/libkyahoo/receivefiletask.h b/kopete/protocols/yahoo/libkyahoo/receivefiletask.h index 01644178..103f3230 100644 --- a/kopete/protocols/yahoo/libkyahoo/receivefiletask.h +++ b/kopete/protocols/yahoo/libkyahoo/receivefiletask.h @@ -45,10 +45,10 @@ public: void setRemoteUrl( KURL url ); void setLocalUrl( KURL url ); - void setFileName( const QString &filename ); + void setFileName( const TQString &filename ); void setTransferId( unsigned int transferId ); void setType( Type type ); - void setUserId( const QString & userId ); + void setUserId( const TQString & userId ); bool take(Transfer *transfer); @@ -58,10 +58,10 @@ protected: signals: void bytesProcessed( unsigned int, unsigned int ); void complete( unsigned int ); - void error( unsigned int, int, const QString & ); + void error( unsigned int, int, const TQString & ); private slots: - void slotData( KIO::Job *job, const QByteArray &data ); + void slotData( KIO::Job *job, const TQByteArray &data ); void slotComplete( KIO::Job *job ); void canceled( unsigned int ); @@ -70,9 +70,9 @@ private: KURL m_remoteUrl; KURL m_localUrl; - QString m_fileName; - QString m_userId; - QFile *m_file; + TQString m_fileName; + TQString m_userId; + TQFile *m_file; KIO::TransferJob *m_transferJob; KIO::MimetypeJob *m_mimetypeJob; unsigned int m_transferId; diff --git a/kopete/protocols/yahoo/libkyahoo/requestpicturetask.cpp b/kopete/protocols/yahoo/libkyahoo/requestpicturetask.cpp index 27a35430..55fb046e 100644 --- a/kopete/protocols/yahoo/libkyahoo/requestpicturetask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/requestpicturetask.cpp @@ -43,7 +43,7 @@ void RequestPictureTask::onGo() setSuccess(); } -void RequestPictureTask::setTarget( const QString &target ) +void RequestPictureTask::setTarget( const TQString &target ) { m_target = target; } diff --git a/kopete/protocols/yahoo/libkyahoo/requestpicturetask.h b/kopete/protocols/yahoo/libkyahoo/requestpicturetask.h index 8a96f6e7..05c192cd 100644 --- a/kopete/protocols/yahoo/libkyahoo/requestpicturetask.h +++ b/kopete/protocols/yahoo/libkyahoo/requestpicturetask.h @@ -33,9 +33,9 @@ public: virtual void onGo(); - void setTarget( const QString &target ); + void setTarget( const TQString &target ); private: - QString m_target; + TQString m_target; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/safedelete.cpp b/kopete/protocols/yahoo/libkyahoo/safedelete.cpp index 2b6b09cf..0b12c370 100644 --- a/kopete/protocols/yahoo/libkyahoo/safedelete.cpp +++ b/kopete/protocols/yahoo/libkyahoo/safedelete.cpp @@ -19,7 +19,7 @@ #include "safedelete.h" -#include +#include //---------------------------------------------------------------------------- // SafeDelete @@ -35,7 +35,7 @@ SafeDelete::~SafeDelete() lock->dying(); } -void SafeDelete::deleteLater(QObject *o) +void SafeDelete::deleteLater(TQObject *o) { if(!lock) deleteSingle(o); @@ -54,17 +54,17 @@ void SafeDelete::deleteAll() if(list.isEmpty()) return; - QObjectListIt it(list); - for(QObject *o; (o = it.current()); ++it) + TQObjectListIt it(list); + for(TQObject *o; (o = it.current()); ++it) deleteSingle(o); list.clear(); } -void SafeDelete::deleteSingle(QObject *o) +void SafeDelete::deleteSingle(TQObject *o) { #if QT_VERSION < 0x030000 - // roll our own QObject::deleteLater() + // roll our own TQObject::deleteLater() SafeDeleteLater *sdl = SafeDeleteLater::ensureExists(); sdl->deleteItLater(o); #else @@ -117,7 +117,7 @@ SafeDeleteLater::SafeDeleteLater() { list.setAutoDelete(true); self = this; - QTimer::singleShot(0, this, SLOT(explode())); + TQTimer::singleShot(0, this, TQT_SLOT(explode())); } SafeDeleteLater::~SafeDeleteLater() @@ -126,7 +126,7 @@ SafeDeleteLater::~SafeDeleteLater() self = 0; } -void SafeDeleteLater::deleteItLater(QObject *o) +void SafeDeleteLater::deleteItLater(TQObject *o) { list.append(o); } diff --git a/kopete/protocols/yahoo/libkyahoo/safedelete.h b/kopete/protocols/yahoo/libkyahoo/safedelete.h index fd2ef937..ded0cb31 100644 --- a/kopete/protocols/yahoo/libkyahoo/safedelete.h +++ b/kopete/protocols/yahoo/libkyahoo/safedelete.h @@ -20,8 +20,8 @@ #ifndef SAFEDELETE_H #define SAFEDELETE_H -#include -#include +#include +#include class SafeDelete; class SafeDeleteLock @@ -43,13 +43,13 @@ public: SafeDelete(); ~SafeDelete(); - void deleteLater(QObject *o); + void deleteLater(TQObject *o); - // same as QObject::deleteLater() - static void deleteSingle(QObject *o); + // same as TQObject::deleteLater() + static void deleteSingle(TQObject *o); private: - QObjectList list; + TQObjectList list; void deleteAll(); friend class SafeDeleteLock; @@ -62,7 +62,7 @@ class SafeDeleteLater : public QObject Q_OBJECT public: static SafeDeleteLater *ensureExists(); - void deleteItLater(QObject *o); + void deleteItLater(TQObject *o); private slots: void explode(); @@ -71,7 +71,7 @@ private: SafeDeleteLater(); ~SafeDeleteLater(); - QObjectList list; + TQObjectList list; friend class SafeDelete; static SafeDeleteLater *self; }; diff --git a/kopete/protocols/yahoo/libkyahoo/sendauthresptask.cpp b/kopete/protocols/yahoo/libkyahoo/sendauthresptask.cpp index 28dfc664..34e94c69 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendauthresptask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/sendauthresptask.cpp @@ -20,7 +20,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include +#include #include SendAuthRespTask::SendAuthRespTask(Task* parent) : Task(parent) @@ -59,12 +59,12 @@ void SendAuthRespTask::setGranted( bool granted ) m_granted = granted; } -void SendAuthRespTask::setTarget( const QString &to ) +void SendAuthRespTask::setTarget( const TQString &to ) { m_target = to; } -void SendAuthRespTask::setMessage( const QString &msg ) +void SendAuthRespTask::setMessage( const TQString &msg ) { m_msg = msg; } diff --git a/kopete/protocols/yahoo/libkyahoo/sendauthresptask.h b/kopete/protocols/yahoo/libkyahoo/sendauthresptask.h index fed15168..953dabc3 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendauthresptask.h +++ b/kopete/protocols/yahoo/libkyahoo/sendauthresptask.h @@ -35,12 +35,12 @@ public: virtual void onGo(); void setGranted( bool ); - void setTarget( const QString &to ); - void setMessage( const QString &msg ); + void setTarget( const TQString &to ); + void setMessage( const TQString &msg ); private: - QString m_target; + TQString m_target; bool m_granted; - QString m_msg; + TQString m_msg; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/sendfiletask.cpp b/kopete/protocols/yahoo/libkyahoo/sendfiletask.cpp index 5cdcf5c3..48af8684 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendfiletask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/sendfiletask.cpp @@ -19,8 +19,8 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include -#include +#include +#include #include // for random() #include #include @@ -35,7 +35,7 @@ SendFileTask::SendFileTask(Task* parent) : Task(parent) m_transmitted = 0; m_socket = 0; - QTime epoch(0, 0, 0); + TQTime epoch(0, 0, 0); } SendFileTask::~SendFileTask() @@ -132,7 +132,7 @@ void SendFileTask::sendFileTransferInfo() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - KResolverResults results = KResolver::resolve("filetransfer.msg.yahoo.com", QString::number(80)); + KResolverResults results = KResolver::resolve("filetransfer.msg.yahoo.com", TQString::number(80)); if(results.count() > 0) { m_relayHost = results.first().address().toString(); @@ -175,10 +175,10 @@ void SendFileTask::parseTransferAccept(const Transfer *transfer) m_token = KURL::encode_string(t->firstParam(251)); kdDebug(YAHOO_RAW_DEBUG) << "Token: " << m_token << endl; - m_socket = new KStreamSocket( m_relayHost, QString::number(80) ); + m_socket = new KStreamSocket( m_relayHost, TQString::number(80) ); m_socket->setBlocking( true ); - connect( m_socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( connectSucceeded() ) ); - connect( m_socket, SIGNAL( gotError(int) ), this, SLOT( connectFailed(int) ) ); + connect( m_socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( connectSucceeded() ) ); + connect( m_socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( connectFailed(int) ) ); m_socket->connect(); @@ -186,7 +186,7 @@ void SendFileTask::parseTransferAccept(const Transfer *transfer) void SendFileTask::connectFailed( int i ) { - QString err = KSocketBase::errorString(m_socket->error()); + TQString err = KSocketBase::errorString(m_socket->error()); kdDebug(YAHOO_RAW_DEBUG) << i << ": " << err << endl; emit error( m_transferId, i, err ); setError(); @@ -196,8 +196,8 @@ void SendFileTask::connectSucceeded() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QByteArray buffer; - QDataStream stream( buffer, IO_WriteOnly ); + TQByteArray buffer; + TQDataStream stream( buffer, IO_WriteOnly ); if ( m_file.open(IO_ReadOnly ) ) { @@ -212,7 +212,7 @@ void SendFileTask::connectSucceeded() } kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << "Sizes: File (" << m_url << "): " << m_file.size() << endl; - QString header = + TQString header = "POST /relay?token=" + m_token + "&sender=" + client()->userId() + "&recver=" + m_target + " HTTP/1.1\r\n" @@ -220,7 +220,7 @@ void SendFileTask::connectSucceeded() "Cache-Control: no-cache\r\n" "Cookie: T=" + client()->tCookie() + "; Y=" + client()->yCookie() + "\r\n" "Host: " + m_relayHost + "\r\n" - "Content-Length: " + QString::number(m_file.size()) + "\r\n" + "Content-Length: " + TQString::number(m_file.size()) + "\r\n" "Connection: Close\r\n\r\n"; kdDebug() << header << endl; stream.writeRawBytes( header.local8Bit(), header.length() ); @@ -232,7 +232,7 @@ void SendFileTask::connectSucceeded() } else { - connect( m_socket, SIGNAL(readyWrite()), this, SLOT(transmitData()) ); + connect( m_socket, TQT_SIGNAL(readyWrite()), this, TQT_SLOT(transmitData()) ); m_socket->enableWrite( true ); } } @@ -271,12 +271,12 @@ void SendFileTask::transmitData() m_socket->enableWrite( true ); } } -void SendFileTask::setTarget( const QString &to ) +void SendFileTask::setTarget( const TQString &to ) { m_target = to; } -void SendFileTask::setMessage( const QString &msg ) +void SendFileTask::setMessage( const TQString &msg ) { m_msg = msg; } @@ -303,11 +303,11 @@ void SendFileTask::canceled( unsigned int id ) setError(); } -QString SendFileTask::newYahooTransferId() +TQString SendFileTask::newYahooTransferId() { // Adapted from libpurple/protocols/yahoo/yahoo_filexfer.c yahoo_xfer_new_xfer_id() - QString newId; + TQString newId; for(int i = 0; i < 22; i++) { diff --git a/kopete/protocols/yahoo/libkyahoo/sendfiletask.h b/kopete/protocols/yahoo/libkyahoo/sendfiletask.h index 83a205e2..1da3a7ae 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendfiletask.h +++ b/kopete/protocols/yahoo/libkyahoo/sendfiletask.h @@ -19,7 +19,7 @@ #include "task.h" #include -#include +#include class QString; namespace KNetwork{ @@ -40,15 +40,15 @@ public: bool take(Transfer *transfer); - void setTarget( const QString &to ); - void setMessage( const QString &msg ); + void setTarget( const TQString &to ); + void setMessage( const TQString &msg ); void setFileUrl( KURL url ); void setTransferId( unsigned int transferId ); signals: void bytesProcessed( unsigned int, unsigned int ); void complete( unsigned int ); - void error( unsigned int, int, const QString & ); + void error( unsigned int, int, const TQString & ); void declined(); @@ -58,7 +58,7 @@ protected: void parseFileTransfer( const Transfer *transfer ); void parseTransferAccept(const Transfer *transfer); - QString newYahooTransferId(); + TQString newYahooTransferId(); private slots: void connectSucceeded(); @@ -67,17 +67,17 @@ private slots: void canceled( unsigned int ); private: - QString m_msg; - QString m_target; + TQString m_msg; + TQString m_target; KURL m_url; - QFile m_file; + TQFile m_file; unsigned int m_transferId; unsigned int m_transmitted; KNetwork::KStreamSocket *m_socket; - QString m_relayHost; - QString m_token; - QString m_yahooTransferId; + TQString m_relayHost; + TQString m_token; + TQString m_yahooTransferId; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/sendmessagetask.cpp b/kopete/protocols/yahoo/libkyahoo/sendmessagetask.cpp index bb6e4802..828c6832 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendmessagetask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/sendmessagetask.cpp @@ -19,7 +19,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include +#include #include #include @@ -64,12 +64,12 @@ void SendMessageTask::onGo() setSuccess(); } -void SendMessageTask::setTarget( const QString &to ) +void SendMessageTask::setTarget( const TQString &to ) { m_target = to; } -void SendMessageTask::setText( const QString &text ) +void SendMessageTask::setText( const TQString &text ) { m_text = text; } diff --git a/kopete/protocols/yahoo/libkyahoo/sendmessagetask.h b/kopete/protocols/yahoo/libkyahoo/sendmessagetask.h index b4c31efe..eef62c13 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendmessagetask.h +++ b/kopete/protocols/yahoo/libkyahoo/sendmessagetask.h @@ -32,12 +32,12 @@ public: virtual void onGo(); - void setText( const QString &text ); - void setTarget( const QString &to ); + void setText( const TQString &text ); + void setTarget( const TQString &to ); void setPicureFlag( int flag ); private: - QString m_text; - QString m_target; + TQString m_text; + TQString m_target; int m_pictureFlag; }; diff --git a/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp b/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp index ed424bd3..638a1811 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/sendnotifytask.cpp @@ -72,7 +72,7 @@ void SendNotifyTask::setType( Type type ) m_type = type; } -void SendNotifyTask::setTarget( const QString &to ) +void SendNotifyTask::setTarget( const TQString &to ) { m_target = to; } diff --git a/kopete/protocols/yahoo/libkyahoo/sendnotifytask.h b/kopete/protocols/yahoo/libkyahoo/sendnotifytask.h index 67c0547a..2fee8fc6 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendnotifytask.h +++ b/kopete/protocols/yahoo/libkyahoo/sendnotifytask.h @@ -37,10 +37,10 @@ public: virtual void onGo(); void setType( Type type ); - void setTarget( const QString &to ); + void setTarget( const TQString &to ); void setState( State ); private: - QString m_target; + TQString m_target; Type m_type; State m_state; }; diff --git a/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp b/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp index 84edecaa..ab10873a 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/sendpicturetask.cpp @@ -19,9 +19,9 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include -#include -#include +#include +#include +#include #include #include #include @@ -64,10 +64,10 @@ void SendPictureTask::onGo() void SendPictureTask::initiateUpload() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - m_socket = new KBufferedSocket( "filetransfer.msg.yahoo.com", QString::number(80) ); - connect( m_socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( connectSucceeded() ) ); - connect( m_socket, SIGNAL( gotError(int) ), this, SLOT( connectFailed(int) ) ); - connect( m_socket, SIGNAL( readyRead() ), this, SLOT( readResult() ) ); + m_socket = new KBufferedSocket( "filetransfer.msg.yahoo.com", TQString::number(80) ); + connect( m_socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( connectSucceeded() ) ); + connect( m_socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( connectFailed(int) ) ); + connect( m_socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( readResult() ) ); m_socket->connect(); } @@ -76,7 +76,7 @@ void SendPictureTask::connectFailed( int i) { kdDebug(YAHOO_RAW_DEBUG) << i << ": " << static_cast( sender() )->errorString() << endl; - client()->notifyError(i18n("The picture was not successfully uploaded"), QString("%1 - %2").arg(i).arg(static_cast( sender() )->errorString()), Client::Error ); + client()->notifyError(i18n("The picture was not successfully uploaded"), TQString("%1 - %2").arg(i).arg(static_cast( sender() )->errorString()), Client::Error ); setError(); } @@ -85,7 +85,7 @@ void SendPictureTask::connectSucceeded() kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; YMSGTransfer t(Yahoo::ServicePictureUpload); - QFile file( m_path ); + TQFile file( m_path ); t.setId( client()->sessionID() ); t.setParam( 1, client()->userId().local8Bit()); @@ -94,9 +94,9 @@ void SendPictureTask::connectSucceeded() t.setParam( 28, file.size() ); t.setParam( 27, m_fileName.local8Bit() ); t.setParam( 14, "" ); - QByteArray buffer; - QByteArray paket; - QDataStream stream( buffer, IO_WriteOnly ); + TQByteArray buffer; + TQByteArray paket; + TQDataStream stream( buffer, IO_WriteOnly ); if ( file.open( IO_ReadOnly ) ) { @@ -111,7 +111,7 @@ void SendPictureTask::connectSucceeded() paket = t.serialize(); kdDebug(YAHOO_RAW_DEBUG) << "Sizes: File (" << m_path << "): " << file.size() << " - paket: " << paket.size() << endl; - QString header = QString::fromLatin1("POST /notifyft HTTP/1.1\r\n" + TQString header = TQString::fromLatin1("POST /notifyft HTTP/1.1\r\n" "Cookie: Y=%1; T=%2; C=%3 ;\r\n" "User-Agent: Mozilla/4.0 (compatible; MSIE 5.5)\r\n" "Host: filetransfer.msg.yahoo.com\r\n" @@ -142,7 +142,7 @@ void SendPictureTask::readResult() // FIXME: to check // m_socket->enableRead( false ); -// QByteArray buf; +// TQByteArray buf; // buf.resize( m_socket->bytesAvailable() ); // m_socket->read( buf.data(), m_socket->bytesAvailable() ); // @@ -158,9 +158,9 @@ void SendPictureTask::readResult() // } // from original file - QByteArray ar( m_socket->bytesAvailable() ); + TQByteArray ar( m_socket->bytesAvailable() ); m_socket->readBlock ( ar.data (), ar.size () ); - QString buf( ar ); + TQString buf( ar ); m_socket->close(); if( buf.find( "error", 0, false ) >= 0 ) @@ -227,12 +227,12 @@ void SendPictureTask::setType( Type type ) m_type = type; } -void SendPictureTask::setTarget( const QString &to ) +void SendPictureTask::setTarget( const TQString &to ) { m_target = to; } -void SendPictureTask::setFilename( const QString &filename ) +void SendPictureTask::setFilename( const TQString &filename ) { m_fileName = filename; } @@ -242,7 +242,7 @@ void SendPictureTask::setFilesize( int filesize ) m_fileSize = filesize; } -void SendPictureTask::setPath( const QString &path ) +void SendPictureTask::setPath( const TQString &path ) { m_path = path; } @@ -257,7 +257,7 @@ void SendPictureTask::setStatus( int status ) m_status = status; } -void SendPictureTask::setUrl( const QString &url ) +void SendPictureTask::setUrl( const TQString &url ) { m_url = url; } diff --git a/kopete/protocols/yahoo/libkyahoo/sendpicturetask.h b/kopete/protocols/yahoo/libkyahoo/sendpicturetask.h index b4d0d27e..3a3e1437 100644 --- a/kopete/protocols/yahoo/libkyahoo/sendpicturetask.h +++ b/kopete/protocols/yahoo/libkyahoo/sendpicturetask.h @@ -44,13 +44,13 @@ public: virtual void onGo(); void setType( Type type ); - void setTarget( const QString &to ); - void setFilename( const QString & ); + void setTarget( const TQString &to ); + void setFilename( const TQString & ); void setFilesize( int ); - void setPath( const QString & ); + void setPath( const TQString & ); void setChecksum( int ); void setStatus( int ); - void setUrl( const QString & ); + void setUrl( const TQString & ); private: void initiateUpload(); void sendChecksum(); @@ -62,15 +62,15 @@ private slots: void readResult(); private: Type m_type; - QString m_target; - QString m_fileName; + TQString m_target; + TQString m_fileName; int m_fileSize; - QString m_path; + TQString m_path; int m_checksum; int m_status; - QString m_url; + TQString m_url; int m_transmitted; - QFile *m_file; + TQFile *m_file; KNetwork::KBufferedSocket *m_socket; }; diff --git a/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.cpp b/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.cpp index c7fcaeac..35796666 100644 --- a/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.cpp @@ -19,8 +19,8 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include -#include +#include +#include #include #include @@ -84,14 +84,14 @@ void StatusNotifierTask::parseStatus( YMSGTransfer* t ) if( t->status() == Yahoo::StatusDisconnected && t->service() == Yahoo::ServiceLogoff ) { - emit loginResponse( Yahoo::LoginDupl, QString() ); + emit loginResponse( Yahoo::LoginDupl, TQString() ); } QString myNick; /* key = 1 */ - QString customError; /* key = 16 */ - QString nick; /* key = 7 */ + TQString customError; /* key = 16 */ + TQString nick; /* key = 7 */ int state; /* key = 10 */ - QString message; /* key = 19 */ + TQString message; /* key = 19 */ int flags; /* key = 13 */ int away; /* key = 47 */ int idle; /* key = 137 */ @@ -114,12 +114,12 @@ void StatusNotifierTask::parseStatus( YMSGTransfer* t ) utf = t->nthParamSeparated( 97, i, 7 ).toInt() == 1; pictureChecksum = t->nthParamSeparated( 192, i, 7 ).toInt(); if( utf ) - message = QString::fromUtf8( t->nthParamSeparated( 19, i, 7 ) ); + message = TQString::fromUtf8( t->nthParamSeparated( 19, i, 7 ) ); else message = t->nthParamSeparated( 19, i, 7 ); if( t->service() == Yahoo::ServiceLogoff || ( state != 0 && flags == 0 ) ) - emit statusChanged( nick, Yahoo::StatusOffline, QString(), 0, 0, 0 ); + emit statusChanged( nick, Yahoo::StatusOffline, TQString(), 0, 0, 0 ); else emit statusChanged( nick, state, message, away, idle, pictureChecksum ); } @@ -129,15 +129,15 @@ void StatusNotifierTask::parseAuthorization( YMSGTransfer* t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString nick; /* key = 4 */ - QString msg; /* key = 14 */ + TQString nick; /* key = 4 */ + TQString msg; /* key = 14 */ int state; /* key = 13 */ bool utf; /* key = 97 */ utf = t->firstParam( 97 ).toInt() == 1; nick = t->firstParam( 4 ); if( utf ) - msg = QString::fromUtf8( t->firstParam( 14 ) ); + msg = TQString::fromUtf8( t->firstParam( 14 ) ); else msg = t->firstParam( 14 ); state = t->firstParam( 13 ).toInt(); @@ -152,11 +152,11 @@ void StatusNotifierTask::parseAuthorization( YMSGTransfer* t ) } else // This is a request { - QString fname = t->firstParam( 216 ); - QString lname = t->firstParam( 254 ); - QString name; + TQString fname = t->firstParam( 216 ); + TQString lname = t->firstParam( 254 ); + TQString name; if( !fname.isEmpty() || !lname.isEmpty() ) - name = QString("%1 %2").arg(fname).arg(lname); + name = TQString("%1 %2").arg(fname).arg(lname); kdDebug(YAHOO_RAW_DEBUG) << "Emitting gotAuthorizationRequest( " << nick<< ", " << msg << ", " << name << " )" << endl; emit gotAuthorizationRequest( nick, msg, name ); @@ -167,7 +167,7 @@ void StatusNotifierTask::parseStealthStatus( YMSGTransfer* t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString nick; /* key = 7 */ + TQString nick; /* key = 7 */ int state; /* key = 31 */ nick = t->firstParam( 7 ); diff --git a/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.h b/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.h index 5cc63d8a..2400363b 100644 --- a/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.h +++ b/kopete/protocols/yahoo/libkyahoo/statusnotifiertask.h @@ -41,12 +41,12 @@ protected: void parseStealthStatus( YMSGTransfer *transfer ); void parseAuthorization( YMSGTransfer *transfer ); signals: - void statusChanged( const QString &nick, int state, const QString &message, int away, int idle, int pictureChecksum ); - void stealthStatusChanged( const QString&, Yahoo::StealthStatus ); - void loginResponse( int, const QString& ); - void authorizationAccepted( const QString & ); - void authorizationRejected( const QString &, const QString & ); - void gotAuthorizationRequest( const QString &, const QString &, const QString & ); + void statusChanged( const TQString &nick, int state, const TQString &message, int away, int idle, int pictureChecksum ); + void stealthStatusChanged( const TQString&, Yahoo::StealthStatus ); + void loginResponse( int, const TQString& ); + void authorizationAccepted( const TQString & ); + void authorizationRejected( const TQString &, const TQString & ); + void gotAuthorizationRequest( const TQString &, const TQString &, const TQString & ); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/stealthtask.cpp b/kopete/protocols/yahoo/libkyahoo/stealthtask.cpp index 89474ab4..6eba854a 100644 --- a/kopete/protocols/yahoo/libkyahoo/stealthtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/stealthtask.cpp @@ -19,7 +19,7 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include +#include StealthTask::StealthTask(Task* parent) : Task(parent) { @@ -65,7 +65,7 @@ void StealthTask::onGo() setSuccess(); } -void StealthTask::setTarget( const QString &to ) +void StealthTask::setTarget( const TQString &to ) { m_target = to; } diff --git a/kopete/protocols/yahoo/libkyahoo/stealthtask.h b/kopete/protocols/yahoo/libkyahoo/stealthtask.h index 6c33da1e..5659e110 100644 --- a/kopete/protocols/yahoo/libkyahoo/stealthtask.h +++ b/kopete/protocols/yahoo/libkyahoo/stealthtask.h @@ -34,11 +34,11 @@ public: virtual void onGo(); - void setTarget( const QString &to ); + void setTarget( const TQString &to ); void setState( Yahoo::StealthStatus state ); void setMode( Yahoo::StealthMode mode ); private: - QString m_target; + TQString m_target; Yahoo::StealthMode m_mode; Yahoo::StealthStatus m_state; }; diff --git a/kopete/protocols/yahoo/libkyahoo/stream.cpp b/kopete/protocols/yahoo/libkyahoo/stream.cpp index 8173281c..82d6fe52 100644 --- a/kopete/protocols/yahoo/libkyahoo/stream.cpp +++ b/kopete/protocols/yahoo/libkyahoo/stream.cpp @@ -19,8 +19,8 @@ #include "stream.h" -Stream::Stream(QObject *parent) -:QObject(parent) +Stream::Stream(TQObject *parent) +:TQObject(parent) { } diff --git a/kopete/protocols/yahoo/libkyahoo/stream.h b/kopete/protocols/yahoo/libkyahoo/stream.h index 71bcae5c..c7f9eeae 100644 --- a/kopete/protocols/yahoo/libkyahoo/stream.h +++ b/kopete/protocols/yahoo/libkyahoo/stream.h @@ -18,7 +18,7 @@ ************************************************************************* */ -#include +#include #ifndef YAHOO_STREAM_H #define YAHOO_STREAM_H @@ -43,12 +43,12 @@ public: SystemShutdown }; - Stream(QObject *parent=0); + Stream(TQObject *parent=0); virtual ~Stream(); virtual void close()=0; virtual int errorCondition() const=0; - virtual QString errorText() const=0; + virtual TQString errorText() const=0; /** * Are there any messages waiting to be read diff --git a/kopete/protocols/yahoo/libkyahoo/task.cpp b/kopete/protocols/yahoo/libkyahoo/task.cpp index f3d1a98c..b604219b 100644 --- a/kopete/protocols/yahoo/libkyahoo/task.cpp +++ b/kopete/protocols/yahoo/libkyahoo/task.cpp @@ -17,7 +17,7 @@ ************************************************************************* */ -#include +#include #include "client.h" #include "transfer.h" @@ -30,10 +30,10 @@ class Task::TaskPrivate public: TaskPrivate() {} - QString id; + TQString id; bool success; int statusCode; - QString statusString; + TQString statusString; Client *client; bool insignificant, deleteme, autoDelete; bool done; @@ -41,22 +41,22 @@ public: }; Task::Task(Task *parent) -:QObject(parent) +:TQObject(parent) { init(); d->transfer = 0; d->client = parent->client(); //d->id = client()->genUniqueId(); - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::Task(Client *parent, bool) -:QObject(0) +:TQObject(0) { init(); d->client = parent; - connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected())); + connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected())); } Task::~Task() @@ -77,7 +77,7 @@ void Task::init() Task *Task::parent() const { - return (Task *)QObject::parent(); + return (Task *)TQObject::parent(); } Client *Task::client() const @@ -95,7 +95,7 @@ void Task::setTransfer( Transfer * transfer ) d->transfer = transfer; } -QString Task::id() const +TQString Task::id() const { return d->id; } @@ -110,7 +110,7 @@ int Task::statusCode() const return d->statusCode; } -const QString & Task::statusString() const +const TQString & Task::statusString() const { return d->statusString; } @@ -124,16 +124,16 @@ void Task::go(bool autoDelete) bool Task::take( Transfer * transfer) { - const QObjectList *p = children(); + const TQObjectList *p = children(); if(!p) return false; // pass along the transfer to our children - QObjectListIt it(*p); + TQObjectListIt it(*p); Task *t; for(; it.current(); ++it) { - QObject *obj = it.current(); + TQObject *obj = it.current(); if(!obj->inherits("Task")) continue; @@ -172,7 +172,7 @@ void Task::onDisconnect() d->statusString = tr("Disconnected"); // delay this so that tasks that react don't block the shutdown - QTimer::singleShot(0, this, SLOT(done())); + TQTimer::singleShot(0, this, TQT_SLOT(done())); } } @@ -181,7 +181,7 @@ void Task::send( Transfer * request ) client()->send( request ); } -void Task::setSuccess(int code, const QString &str) +void Task::setSuccess(int code, const TQString &str) { if(!d->done) { d->success = true; @@ -191,7 +191,7 @@ void Task::setSuccess(int code, const QString &str) } } -void Task::setError(int code, const QString &str) +void Task::setError(int code, const TQString &str) { if(!d->done) { d->success = false; @@ -228,7 +228,7 @@ void Task::clientDisconnected() // void Task::debug(const char *fmt, ...) // { // char *buf; -// QString str; +// TQString str; // int size = 1024; // int r; // @@ -240,7 +240,7 @@ void Task::clientDisconnected() // va_end(ap); // // if(r != -1) -// str = QString(buf); +// str = TQString(buf); // // delete [] buf; // @@ -250,9 +250,9 @@ void Task::clientDisconnected() // debug(str); // } -void Task::debug(const QString &str) +void Task::debug(const TQString &str) { - client()->debug(QString("%1: ").arg(className()) + str); + client()->debug(TQString("%1: ").arg(className()) + str); } bool Task::forMe( const Transfer * transfer ) const diff --git a/kopete/protocols/yahoo/libkyahoo/task.h b/kopete/protocols/yahoo/libkyahoo/task.h index a1a64e45..00cdb18f 100644 --- a/kopete/protocols/yahoo/libkyahoo/task.h +++ b/kopete/protocols/yahoo/libkyahoo/task.h @@ -20,7 +20,7 @@ #ifndef YAHOO_TASK_H #define YAHOO_TASK_H -#include +#include class QString; @@ -40,11 +40,11 @@ public: Client *client() const; Transfer *transfer() const; - QString id() const; + TQString id() const; bool success() const; int statusCode() const; - const QString & statusString() const; + const TQString & statusString() const; void go( bool autoDelete=false ); /** @@ -61,10 +61,10 @@ protected: virtual void onGo(); virtual void onDisconnect(); void send( Transfer * request ); - void setSuccess( int code=0, const QString &str="" ); - void setError( int code=0, const QString &str="" ); + void setSuccess( int code=0, const TQString &str="" ); + void setError( int code=0, const TQString &str="" ); // void debug( const char *, ... ); - void debug( const QString & ); + void debug( const TQString & ); /** * Used in take() to check if the offered transfer is for this Task * @return true if this Task should take the Transfer. Default impl always returns false. @@ -73,7 +73,7 @@ protected: /** * Creates a transfer with the given command and field list */ - //void createTransfer( const QString & command, const Field::FieldList fields ); + //void createTransfer( const TQString & command, const Field::FieldList fields ); /** * Direct setter for Tasks which don't have any fields */ diff --git a/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.cpp b/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.cpp index a52b1f56..efcd63cf 100644 --- a/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.cpp +++ b/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.cpp @@ -5,7 +5,7 @@ #include "../ymsgtransfer.h" #include "../yahootypes.h" -ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, argv ) +ClientStreamTest::ClientStreamTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -13,12 +13,12 @@ ClientStreamTest::ClientStreamTest(int argc, char ** argv) : QApplication( argc, myConnector->setOptHostPort( "scs.msg.yahoo.com", 5050 ); myTestObject = new ClientStream( myConnector, myConnector); // notify when the transport layer is connected - connect( myTestObject, SIGNAL( connected() ), SLOT( slotConnected() ) ); + connect( myTestObject, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); // notify and start sending - //connect( myTestObject, SIGNAL( warning(int) ), SLOT( slotWarning(int) ) ); + //connect( myTestObject, TQT_SIGNAL( warning(int) ), TQT_SLOT( slotWarning(int) ) ); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -30,7 +30,7 @@ ClientStreamTest::~ClientStreamTest() void ClientStreamTest::slotDoTest() { - QString server = QString::fromLatin1("scs.msg.yahoo.com"); + TQString server = TQString::fromLatin1("scs.msg.yahoo.com"); // connect to server kdDebug(14180) << k_funcinfo << " connecting to server" << endl; myTestObject->connectToServer( server, true ); // fine up to here... diff --git a/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.h b/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.h index ef367cec..8842fcc2 100644 --- a/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.h +++ b/kopete/protocols/yahoo/libkyahoo/tests/clientstream_test.h @@ -10,9 +10,9 @@ #ifndef clientstream_test_h #define clientstream_test_h -#include -#include -#include +#include +#include +#include #include "yahooclientstream.h" #include "yahooconnector.h" diff --git a/kopete/protocols/yahoo/libkyahoo/tests/logintest.cpp b/kopete/protocols/yahoo/libkyahoo/tests/logintest.cpp index 8778d9da..5e9b04a5 100644 --- a/kopete/protocols/yahoo/libkyahoo/tests/logintest.cpp +++ b/kopete/protocols/yahoo/libkyahoo/tests/logintest.cpp @@ -23,7 +23,7 @@ #include "../ymsgtransfer.h" #include "../yahootypes.h" -LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) +LoginTest::LoginTest(int argc, char ** argv) : TQApplication( argc, argv ) { // set up client stream myConnector = new KNetworkConnector( 0 ); @@ -33,7 +33,7 @@ LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv ) // notify when the transport layer is connected myClient = new Client(); // do test once the event loop is running - QTimer::singleShot( 0, this, SLOT( slotDoTest() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDoTest() ) ); connected = false; } @@ -46,11 +46,11 @@ LoginTest::~LoginTest() void LoginTest::slotDoTest() { - QString server = QString::fromLatin1("scs.msg.yahoo.com"); + TQString server = TQString::fromLatin1("scs.msg.yahoo.com"); // connect to server kdDebug(14180) << k_funcinfo << " connecting to server" << endl; - connect( myClient, SIGNAL( connected() ), SLOT( slotConnected() ) ); + connect( myClient, TQT_SIGNAL( connected() ), TQT_SLOT( slotConnected() ) ); myClient->start( server, 5050, "duncanmacvicar", "**********" ); myClient->connectToServer( myClientStream, server, true ); } diff --git a/kopete/protocols/yahoo/libkyahoo/tests/logintest.h b/kopete/protocols/yahoo/libkyahoo/tests/logintest.h index 12274843..68a40b24 100644 --- a/kopete/protocols/yahoo/libkyahoo/tests/logintest.h +++ b/kopete/protocols/yahoo/libkyahoo/tests/logintest.h @@ -21,9 +21,9 @@ #ifndef logintest_h #define logintest_h -#include -#include -#include +#include +#include +#include #include "client.h" #include "coreprotocol.h" diff --git a/kopete/protocols/yahoo/libkyahoo/webcamtask.cpp b/kopete/protocols/yahoo/libkyahoo/webcamtask.cpp index fe3c6d7c..2ad978f2 100644 --- a/kopete/protocols/yahoo/libkyahoo/webcamtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/webcamtask.cpp @@ -21,10 +21,10 @@ #include "yahootypes.h" #include "client.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -73,7 +73,7 @@ bool WebcamTask::forMe( const Transfer* transfer ) const return false; } -void WebcamTask::requestWebcam( const QString &who ) +void WebcamTask::requestWebcam( const TQString &who ) { kdDebug(YAHOO_RAW_DEBUG) ; @@ -108,12 +108,12 @@ void WebcamTask::parseWebcamInformation( YMSGTransfer *t ) kdDebug(YAHOO_RAW_DEBUG) << "Got WebcamInformation: Sender: " << info.sender << " Server: " << info.server << " Key: " << info.key << endl; - KStreamSocket *socket = new KStreamSocket( info.server, QString::number(5100) ); + KStreamSocket *socket = new KStreamSocket( info.server, TQString::number(5100) ); socketMap[socket] = info; socket->enableRead( true ); - connect( socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( slotConnectionStage1Established() ) ); - connect( socket, SIGNAL( gotError(int) ), this, SLOT( slotConnectionFailed(int) ) ); - connect( socket, SIGNAL( readyRead() ), this, SLOT( slotRead() ) ); + connect( socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( slotConnectionStage1Established() ) ); + connect( socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( slotConnectionFailed(int) ) ); + connect( socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotRead() ) ); socket->connect(); } @@ -124,23 +124,23 @@ void WebcamTask::slotConnectionStage1Established() if( !socket ) return; kdDebug(YAHOO_RAW_DEBUG) << "Webcam connection Stage1 to the user " << socketMap[socket].sender << " established." << endl; - disconnect( socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( slotConnectionStage1Established() ) ); - disconnect( socket, SIGNAL( gotError(int) ), this, SLOT( slotConnectionFailed(int) ) ); + disconnect( socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( slotConnectionStage1Established() ) ); + disconnect( socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( slotConnectionFailed(int) ) ); socketMap[socket].status = ConnectedStage1; - QByteArray buffer; - QDataStream stream( buffer, IO_WriteOnly ); - QString s; + TQByteArray buffer; + TQDataStream stream( buffer, IO_WriteOnly ); + TQString s; if( socketMap[socket].direction == Incoming ) { - socket->writeBlock( QCString("").data(), 8 ); - s = QString("g=%1\r\n").arg(socketMap[socket].sender); + socket->writeBlock( TQCString("").data(), 8 ); + s = TQString("g=%1\r\n").arg(socketMap[socket].sender); } else { - socket->writeBlock( QCString("").data(), 8 ); - s = QString("f=1\r\n"); + socket->writeBlock( TQCString("").data(), 8 ); + s = TQString("f=1\r\n"); } // Header: 08 00 01 00 00 00 00 @@ -157,21 +157,21 @@ void WebcamTask::slotConnectionStage2Established() return; kdDebug(YAHOO_RAW_DEBUG) << "Webcam connection Stage2 to the user " << socketMap[socket].sender << " established." << endl; - disconnect( socket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( slotConnectionStage2Established() ) ); - disconnect( socket, SIGNAL( gotError(int) ), this, SLOT( slotConnectionFailed(int) ) ); + disconnect( socket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( slotConnectionStage2Established() ) ); + disconnect( socket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( slotConnectionFailed(int) ) ); socketMap[socket].status = ConnectedStage2; - QByteArray buffer; - QDataStream stream( buffer, IO_WriteOnly ); - QString s; + TQByteArray buffer; + TQDataStream stream( buffer, IO_WriteOnly ); + TQString s; if( socketMap[socket].direction == Incoming ) { // Send -Packet - socket->writeBlock( QCString("").data(), 8 ); + socket->writeBlock( TQCString("").data(), 8 ); // Send request information - s = QString("a=2\r\nc=us\r\ne=21\r\nu=%1\r\nt=%2\r\ni=\r\ng=%3\r\no=w-2-5-1\r\np=1") + s = TQString("a=2\r\nc=us\r\ne=21\r\nu=%1\r\nt=%2\r\ni=\r\ng=%3\r\no=w-2-5-1\r\np=1") .arg(client()->userId()).arg(socketMap[socket].key).arg(socketMap[socket].sender); // Header: 08 00 01 00 00 00 00 stream << (Q_INT8)0x08 << (Q_INT8)0x00 << (Q_INT8)0x01 << (Q_INT8)0x00 << (Q_INT32)s.length(); @@ -179,9 +179,9 @@ void WebcamTask::slotConnectionStage2Established() else { // Send -Packet - socket->writeBlock( QCString("").data(), 8 ); + socket->writeBlock( TQCString("").data(), 8 ); // Send request information - s = QString("a=2\r\nc=us\r\nu=%1\r\nt=%2\r\ni=%3\r\no=w-2-5-1\r\np=2\r\nb=KopeteWebcam\r\nd=\r\n") + s = TQString("a=2\r\nc=us\r\nu=%1\r\nt=%2\r\ni=%3\r\no=w-2-5-1\r\np=2\r\nb=KopeteWebcam\r\nd=\r\n") .arg(client()->userId()).arg(socketMap[socket].key).arg(socket->localAddress().nodeName()); // Header: 08 00 05 00 00 00 00 01 00 00 00 01 stream << (Q_INT8)0x0d << (Q_INT8)0x00 << (Q_INT8)0x05 << (Q_INT8)0x00 << (Q_INT32)s.length() @@ -197,7 +197,7 @@ void WebcamTask::slotConnectionFailed( int error ) KStreamSocket* socket = const_cast( dynamic_cast( sender() ) ); kdDebug(YAHOO_RAW_DEBUG) << "Webcam connection to the user " << socketMap[socket].sender << " failed. Error " << error << " - " << socket->errorString() << endl; client()->notifyError( i18n("Webcam connection to the user %1 could not be established.\n\nPlease relogin and try again.") - .arg(socketMap[socket].sender), QString("%1 - %2").arg(error).arg( socket->errorString()), Client::Error ); + .arg(socketMap[socket].sender), TQString("%1 - %2").arg(error).arg( socket->errorString()), Client::Error ); socketMap.remove( socket ); socket->deleteLater(); } @@ -211,7 +211,7 @@ void WebcamTask::slotRead() switch( socketMap[socket].status ) { case ConnectedStage1: - disconnect( socket, SIGNAL( readyRead() ), this, SLOT( slotRead() ) ); + disconnect( socket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotRead() ) ); connectStage2( socket ); break; case ConnectedStage2: @@ -226,13 +226,13 @@ void WebcamTask::slotRead() void WebcamTask::connectStage2( KStreamSocket *socket ) { kdDebug(YAHOO_RAW_DEBUG) ; - QByteArray data( socket->bytesAvailable() ); + TQByteArray data( socket->bytesAvailable() ); socket->readBlock ( data.data (), data.size () ); kdDebug(YAHOO_RAW_DEBUG) << "Magic Byte:" << data[2] << endl; socketMap[socket].status = ConnectedStage2; - QString server; + TQString server; int i = 4; KStreamSocket *newSocket; switch( (const char)data[2] ) @@ -252,16 +252,16 @@ void WebcamTask::connectStage2( KStreamSocket *socket ) } kdDebug(YAHOO_RAW_DEBUG) << "Connecting to " << server << endl; - newSocket = new KStreamSocket( server, QString::number(5100) ); + newSocket = new KStreamSocket( server, TQString::number(5100) ); socketMap[newSocket] = socketMap[socket]; newSocket->enableRead( true ); - connect( newSocket, SIGNAL( connected( const KResolverEntry& ) ), this, SLOT( slotConnectionStage2Established() ) ); - connect( newSocket, SIGNAL( gotError(int) ), this, SLOT( slotConnectionFailed(int) ) ); - connect( newSocket, SIGNAL( readyRead() ), this, SLOT( slotRead() ) ); + connect( newSocket, TQT_SIGNAL( connected( const KResolverEntry& ) ), this, TQT_SLOT( slotConnectionStage2Established() ) ); + connect( newSocket, TQT_SIGNAL( gotError(int) ), this, TQT_SLOT( slotConnectionFailed(int) ) ); + connect( newSocket, TQT_SIGNAL( readyRead() ), this, TQT_SLOT( slotRead() ) ); if( socketMap[newSocket].direction == Outgoing ) { newSocket->enableWrite( true ); - connect( newSocket, SIGNAL( readyWrite() ), this, SLOT( transmitWebcamImage() ) ); + connect( newSocket, TQT_SIGNAL( readyWrite() ), this, TQT_SLOT( transmitWebcamImage() ) ); } newSocket->connect(); @@ -275,7 +275,7 @@ void WebcamTask::connectStage2( KStreamSocket *socket ) void WebcamTask::processData( KStreamSocket *socket ) { - QByteArray data( socket->bytesAvailable() ); + TQByteArray data( socket->bytesAvailable() ); socket->readBlock ( data.data (), data.size () ); @@ -288,7 +288,7 @@ void WebcamTask::processData( KStreamSocket *socket ) parseData( data, socket ); } -void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) +void WebcamTask::parseData( TQByteArray &data, KStreamSocket *socket ) { int headerLength = 0; int read = 0; @@ -310,7 +310,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) kdDebug() << data[8] << data[9] << data[10] << data[11] << data[12] << endl; info->timestamp = yahoo_get32(data.data() + 9); kdDebug(YAHOO_RAW_DEBUG) << "PacketType: " << data[8] << " reason: " << info->reason << " timestamp: " << info->timestamp << endl; - QStringList::iterator it; + TQStringList::iterator it; switch( data[8] ) { case 0x00: @@ -384,8 +384,8 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) { // More headers to read kdDebug(YAHOO_RAW_DEBUG) << "More data to read..." << endl; - QByteArray newData( data.size() - headerLength ); - QDataStream stream( newData, IO_WriteOnly ); + TQByteArray newData( data.size() - headerLength ); + TQDataStream stream( newData, IO_WriteOnly ); stream.writeRawBytes( data.data() + headerLength, data.size() - headerLength ); parseData( newData, socket ); return; @@ -408,7 +408,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) if( !info->buffer ) { kdDebug(YAHOO_RAW_DEBUG) << "Buffer created" << endl; - info->buffer = new QBuffer(); + info->buffer = new TQBuffer(); info->buffer->open( IO_WriteOnly ); } @@ -419,7 +419,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) if( info->buffer->size() >= static_cast(info->dataLength) ) { info->buffer->close(); - QString who; + TQString who; switch( info->type ) { case UserRequest: @@ -450,7 +450,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) break; case Image: { - QPixmap webcamImage; + TQPixmap webcamImage; //webcamImage.loadFromData( info->buffer->buffer() ); // FIXME (same) @@ -466,7 +466,7 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) KTempFile jpcTmpImageFile; KTempFile bmpTmpImageFile; - QFile *file = jpcTmpImageFile.file(); + TQFile *file = jpcTmpImageFile.file(); file->writeBlock((info->buffer->buffer()).data(), info->buffer->size()); file->close(); @@ -485,8 +485,8 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) /******* UPTO THIS POINT ******/ emit webcamImageReceived( info->sender, webcamImage ); } - QFile::remove(jpcTmpImageFile.name()); - QFile::remove(bmpTmpImageFile.name()); + TQFile::remove(jpcTmpImageFile.name()); + TQFile::remove(bmpTmpImageFile.name()); kdDebug(YAHOO_RAW_DEBUG) << "Image Received. Size: " << webcamImage.size() << endl; } @@ -503,8 +503,8 @@ void WebcamTask::parseData( QByteArray &data, KStreamSocket *socket ) { // More headers to read kdDebug(YAHOO_RAW_DEBUG) << "More data to read..." << data.size() - read << endl; - QByteArray newData( data.size() - read ); - QDataStream stream( newData, IO_WriteOnly ); + TQByteArray newData( data.size() - read ); + TQDataStream stream( newData, IO_WriteOnly ); stream.writeRawBytes( data.data() + read, data.size() - read ); parseData( newData, socket ); } @@ -520,7 +520,7 @@ void WebcamTask::cleanUpConnection( KStreamSocket *socket ) delete socket; } -void WebcamTask::closeWebcam( const QString & who ) +void WebcamTask::closeWebcam( const TQString & who ) { kdDebug(YAHOO_RAW_DEBUG) ; SocketInfoMap::Iterator it; @@ -552,14 +552,14 @@ void WebcamTask::registerWebcam() send( t ); } -void WebcamTask::addPendingInvitation( const QString &userId ) +void WebcamTask::addPendingInvitation( const TQString &userId ) { kdDebug(YAHOO_RAW_DEBUG) << "Inviting " << userId << " to watch the webcam." << endl; pendingInvitations.append( userId ); accessGranted.append( userId ); } -void WebcamTask::grantAccess( const QString &userId ) +void WebcamTask::grantAccess( const TQString &userId ) { kdDebug(YAHOO_RAW_DEBUG) ; KStreamSocket *socket = 0L; @@ -577,9 +577,9 @@ void WebcamTask::grantAccess( const QString &userId ) kdDebug(YAHOO_RAW_DEBUG) << "Error. No outgoing socket found." << endl; return; } - QByteArray ar; - QDataStream stream( ar, IO_WriteOnly ); - QString user = QString("u=%1").arg(userId); + TQByteArray ar; + TQDataStream stream( ar, IO_WriteOnly ); + TQString user = TQString("u=%1").arg(userId); stream << (Q_INT8)0x0d << (Q_INT8)0x00 << (Q_INT8)0x05 << (Q_INT8)0x00 << (Q_INT32)user.length() << (Q_INT8)0x00 << (Q_INT8)0x00 << (Q_INT8)0x00 << (Q_INT8)0x00 << (Q_INT8)0x01; @@ -635,11 +635,11 @@ void WebcamTask::sendEmptyWebcamImage() pictureBuffer.resize( 0 ); transmissionPending = true; - QTimer::singleShot( 1000, this, SLOT(sendEmptyWebcamImage()) ); + TQTimer::singleShot( 1000, this, TQT_SLOT(sendEmptyWebcamImage()) ); } -void WebcamTask::sendWebcamImage( const QByteArray &image ) +void WebcamTask::sendWebcamImage( const TQByteArray &image ) { kdDebug(YAHOO_RAW_DEBUG) ; pictureBuffer = image; @@ -687,8 +687,8 @@ void WebcamTask::transmitWebcamImage() } socket->enableWrite( false ); - QByteArray buffer; - QDataStream stream( buffer, IO_WriteOnly ); + TQByteArray buffer; + TQDataStream stream( buffer, IO_WriteOnly ); stream << (Q_INT8)0x0d << (Q_INT8)0x00 << (Q_INT8)0x05 << (Q_INT8)0x00 << (Q_INT32)pictureBuffer.size() << (Q_INT8)0x02 << (Q_INT32)timestamp++; socket->writeBlock( buffer.data(), buffer.size() ); diff --git a/kopete/protocols/yahoo/libkyahoo/webcamtask.h b/kopete/protocols/yahoo/libkyahoo/webcamtask.h index 23639b8d..d84b6374 100644 --- a/kopete/protocols/yahoo/libkyahoo/webcamtask.h +++ b/kopete/protocols/yahoo/libkyahoo/webcamtask.h @@ -18,9 +18,9 @@ #define WEBCAMTASK_H #include "task.h" -#include -#include -#include +#include +#include +#include class QString; class YMSGTransfer; @@ -46,10 +46,10 @@ struct YahooWebcamInformation Q_INT32 dataLength; Q_INT32 timestamp; bool headerRead; - QBuffer *buffer; + TQBuffer *buffer; }; -typedef QMap< KStreamSocket *, YahooWebcamInformation > SocketInfoMap; +typedef TQMap< KStreamSocket *, YahooWebcamInformation > SocketInfoMap; /** @author André Duffeck @@ -65,24 +65,24 @@ public: bool transmitting() { return transmittingData; } - void requestWebcam( const QString &who ); - void closeWebcam( const QString &who ); + void requestWebcam( const TQString &who ); + void closeWebcam( const TQString &who ); void registerWebcam(); - void sendWebcamImage( const QByteArray &image ); - void addPendingInvitation( const QString &userId ); - void grantAccess( const QString &userId ); + void sendWebcamImage( const TQByteArray &image ); + void addPendingInvitation( const TQString &userId ); + void grantAccess( const TQString &userId ); void closeOutgoingWebcam(); signals: - void webcamNotAvailable( const QString & ); - void webcamClosed( const QString &, int ); - void webcamPaused( const QString& ); - void webcamImageReceived( const QString &, const QPixmap &); + void webcamNotAvailable( const TQString & ); + void webcamClosed( const TQString &, int ); + void webcamPaused( const TQString& ); + void webcamImageReceived( const TQString &, const TQPixmap &); void readyForTransmission(); void stopTransmission(); - void viewerJoined( const QString & ); - void viewerLeft( const QString & ); - void viewerRequest( const QString & ); + void viewerJoined( const TQString & ); + void viewerLeft( const TQString & ); + void viewerRequest( const TQString & ); private slots: void slotConnectionStage1Established(); void slotConnectionStage2Established(); @@ -94,19 +94,19 @@ protected: virtual bool forMe( const Transfer* transfer ) const; private: void parseWebcamInformation( YMSGTransfer *transfer ); - void parseData( QByteArray &data, KStreamSocket *socket ); + void parseData( TQByteArray &data, KStreamSocket *socket ); void connectStage2( KStreamSocket *socket ); void processData( KStreamSocket *socket ); void cleanUpConnection( KStreamSocket *socket ); - QString keyPending; // the buddy we have requested the webcam from + TQString keyPending; // the buddy we have requested the webcam from SocketInfoMap socketMap; bool transmittingData; - QStringList pendingInvitations; - QStringList accessGranted; + TQStringList pendingInvitations; + TQStringList accessGranted; int timestamp; - QByteArray pictureBuffer; + TQByteArray pictureBuffer; bool transmissionPending; }; diff --git a/kopete/protocols/yahoo/libkyahoo/yabentry.cpp b/kopete/protocols/yahoo/libkyahoo/yabentry.cpp index d726d6d6..b9a4d72b 100644 --- a/kopete/protocols/yahoo/libkyahoo/yabentry.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yabentry.cpp @@ -16,7 +16,7 @@ #include "yabentry.h" -void YABEntry::fromQDomElement( const QDomElement &e ) +void YABEntry::fromQDomElement( const TQDomElement &e ) { yahooId = e.attribute("yi"); YABId = e.attribute("id", "-1").toInt(); @@ -47,10 +47,10 @@ void YABEntry::fromQDomElement( const QDomElement &e ) privateState = e.attribute("hs"); privateZIP = e.attribute("hz"); privateCountry = e.attribute("hn"); - QString birtday = e.attribute("bi"); - birthday = QDate( birtday.section('/',2,2).toInt(), birtday.section('/',1,1).toInt(), birtday.section('/',0,0).toInt() ); - QString an = e.attribute("an"); - anniversary = QDate( an.section('/',2,2).toInt(), an.section('/',1,1).toInt(), an.section('/',0,0).toInt() ); + TQString birtday = e.attribute("bi"); + birthday = TQDate( birtday.section('/',2,2).toInt(), birtday.section('/',1,1).toInt(), birtday.section('/',0,0).toInt() ); + TQString an = e.attribute("an"); + anniversary = TQDate( an.section('/',2,2).toInt(), an.section('/',1,1).toInt(), an.section('/',0,0).toInt() ); additional1 = e.attribute("c1"); additional2 = e.attribute("c2"); additional3 = e.attribute("c3"); @@ -65,7 +65,7 @@ void YABEntry::fromQDomElement( const QDomElement &e ) imSkype = e.attribute("imk"); } -void YABEntry::fromQDomDocument( const QDomDocument &d ) +void YABEntry::fromQDomDocument( const TQDomDocument &d ) { kdDebug() << d.toString() << d.elementsByTagName("yi").item(0).toElement().text() << endl; @@ -97,10 +97,10 @@ void YABEntry::fromQDomDocument( const QDomDocument &d ) privateState = d.elementsByTagName("hs").item(0).toElement().text(); privateZIP = d.elementsByTagName("hz").item(0).toElement().text(); privateCountry = d.elementsByTagName("hn").item(0).toElement().text(); - QString birtday = d.elementsByTagName("bi").item(0).toElement().text(); - birthday = QDate( birtday.section('/',2,2).toInt(), birtday.section('/',1,1).toInt(), birtday.section('/',0,0).toInt() ); - QString an = d.elementsByTagName("an").item(0).toElement().text(); - anniversary = QDate( an.section('/',2,2).toInt(), an.section('/',1,1).toInt(), an.section('/',0,0).toInt() ); + TQString birtday = d.elementsByTagName("bi").item(0).toElement().text(); + birthday = TQDate( birtday.section('/',2,2).toInt(), birtday.section('/',1,1).toInt(), birtday.section('/',0,0).toInt() ); + TQString an = d.elementsByTagName("an").item(0).toElement().text(); + anniversary = TQDate( an.section('/',2,2).toInt(), an.section('/',1,1).toInt(), an.section('/',0,0).toInt() ); additional1 = d.elementsByTagName("c1").item(0).toElement().text(); additional2 = d.elementsByTagName("c2").item(0).toElement().text(); additional3 = d.elementsByTagName("c3").item(0).toElement().text(); @@ -115,7 +115,7 @@ void YABEntry::fromQDomDocument( const QDomDocument &d ) imSkype = d.elementsByTagName("imk").item(0).toElement().text(); } -void YABEntry::fillQDomElement( QDomElement &e ) const +void YABEntry::fillQDomElement( TQDomElement &e ) const { e.setAttribute( "yi", yahooId ); e.setAttribute( "id", YABId ); @@ -135,24 +135,24 @@ void YABEntry::fillQDomElement( QDomElement &e ) const e.setAttribute( "pu", privateURL ); e.setAttribute( "ti", title ); e.setAttribute( "co", corporation ); - e.setAttribute( "wa", QString( workAdress ).replace( '\n', " " ) ); + e.setAttribute( "wa", TQString( workAdress ).replace( '\n', " " ) ); e.setAttribute( "wc", workCity ); e.setAttribute( "ws", workState ); e.setAttribute( "wz", workZIP ); e.setAttribute( "wn", workCountry ); e.setAttribute( "wu", workURL ); - e.setAttribute( "ha", QString( privateAdress ).replace( '\n', " " ) ); + e.setAttribute( "ha", TQString( privateAdress ).replace( '\n', " " ) ); e.setAttribute( "hc", privateCity ); e.setAttribute( "hs", privateState ); e.setAttribute( "hz", privateZIP ); e.setAttribute( "hn", privateCountry ); - e.setAttribute( "bi", QString("%1/%2/%3").arg( birthday.day() ).arg( birthday.month() ).arg( birthday.year() ) ); - e.setAttribute( "an", QString("%1/%2/%3").arg( anniversary.day() ).arg( anniversary.month() ).arg( anniversary.year() ) ); + e.setAttribute( "bi", TQString("%1/%2/%3").arg( birthday.day() ).arg( birthday.month() ).arg( birthday.year() ) ); + e.setAttribute( "an", TQString("%1/%2/%3").arg( anniversary.day() ).arg( anniversary.month() ).arg( anniversary.year() ) ); e.setAttribute( "c1", additional1 ); e.setAttribute( "c2", additional2 ); e.setAttribute( "c3", additional3 ); e.setAttribute( "c4", additional4 ); - e.setAttribute( "cm", QString( notes ).replace( '\n', " " ) ); + e.setAttribute( "cm", TQString( notes ).replace( '\n', " " ) ); e.setAttribute( "ima", imAIM ); e.setAttribute( "img", imGoogleTalk ); e.setAttribute( "imq", imICQ ); diff --git a/kopete/protocols/yahoo/libkyahoo/yabentry.h b/kopete/protocols/yahoo/libkyahoo/yabentry.h index da042032..35620911 100644 --- a/kopete/protocols/yahoo/libkyahoo/yabentry.h +++ b/kopete/protocols/yahoo/libkyahoo/yabentry.h @@ -17,8 +17,8 @@ #define YABEntry_H #include -#include -#include +#include +#include struct YABEntry { @@ -81,9 +81,9 @@ struct YABEntry QString additional4; - void fromQDomElement( const QDomElement &e ); - void fromQDomDocument( const QDomDocument &e ); - void fillQDomElement( QDomElement &e ) const; + void fromQDomElement( const TQDomElement &e ); + void fromQDomDocument( const TQDomDocument &e ); + void fillQDomElement( TQDomElement &e ) const; void dump() const; }; diff --git a/kopete/protocols/yahoo/libkyahoo/yabtask.cpp b/kopete/protocols/yahoo/libkyahoo/yabtask.cpp index 3cc66dba..1066640e 100644 --- a/kopete/protocols/yahoo/libkyahoo/yabtask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yabtask.cpp @@ -20,8 +20,8 @@ #include "ymsgtransfer.h" #include "yahootypes.h" #include "client.h" -#include -#include +#include +#include #include #include #include @@ -66,7 +66,7 @@ void YABTask::parseContactDetails( YMSGTransfer* t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString from; /* key = 7 */ + TQString from; /* key = 7 */ int count; from = t->firstParam( 4 ); @@ -74,12 +74,12 @@ void YABTask::parseContactDetails( YMSGTransfer* t ) for( int i = 0; i < count; i++ ) { - QString who = t->nthParam( 5, i ); - QString s = t->nthParamSeparated( 280, i, 5 ); + TQString who = t->nthParam( 5, i ); + TQString s = t->nthParamSeparated( 280, i, 5 ); if( s.isEmpty() ) continue; - QDomDocument doc; + TQDomDocument doc; doc.setContent( s ); YABEntry *entry = new YABEntry; entry->fromQDomDocument( doc ); @@ -93,19 +93,19 @@ void YABTask::parseContactDetails( YMSGTransfer* t ) void YABTask::getAllEntries( long lastMerge, long lastRemoteRevision ) { kdDebug(YAHOO_RAW_DEBUG) << "LastMerge: " << lastMerge << " LastRemoteRevision: " << lastRemoteRevision << endl; - m_data = QString::null; - QString url = QString::fromLatin1("http://address.yahoo.com/yab/us?v=XM&prog=ymsgr&.intl=us&diffs=1&t=%1&tags=short&rt=%2&prog-ver=%3") + m_data = TQString::null; + TQString url = TQString::fromLatin1("http://address.yahoo.com/yab/us?v=XM&prog=ymsgr&.intl=us&diffs=1&t=%1&tags=short&rt=%2&prog-ver=%3") .arg( lastMerge ).arg( lastRemoteRevision ).arg( YMSG_PROGRAM_VERSION_STRING ); m_transferJob = KIO::get( url , false, false ); m_transferJob->addMetaData("cookies", "manual"); - m_transferJob->addMetaData("setcookies", QString::fromLatin1("Cookie: Y=%1; T=%2; C=%3;") + m_transferJob->addMetaData("setcookies", TQString::fromLatin1("Cookie: Y=%1; T=%2; C=%3;") .arg(client()->yCookie()).arg(client()->tCookie()).arg(client()->cCookie()) ); - connect( m_transferJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ), this, SLOT( slotData( KIO::Job*, const QByteArray & ) ) ); - connect( m_transferJob, SIGNAL( result( KIO::Job *) ), this, SLOT( slotResult( KIO::Job* ) ) ); + connect( m_transferJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray & ) ) ); + connect( m_transferJob, TQT_SIGNAL( result( KIO::Job *) ), this, TQT_SLOT( slotResult( KIO::Job* ) ) ); } -void YABTask::slotData( KIO::Job* /*job*/, const QByteArray &info ) +void YABTask::slotData( KIO::Job* /*job*/, const TQByteArray &info ) { kdDebug(YAHOO_RAW_DEBUG) ; m_data += info; @@ -121,9 +121,9 @@ void YABTask::slotResult( KIO::Job* job ) else { kdDebug(YAHOO_RAW_DEBUG) << "Server side addressbook retrieved." << endl; - QDomDocument doc; - QDomNodeList list; - QDomElement e; + TQDomDocument doc; + TQDomNodeList list; + TQDomElement e; int it = 0; kdDebug(YAHOO_RAW_DEBUG) << m_data << endl; diff --git a/kopete/protocols/yahoo/libkyahoo/yabtask.h b/kopete/protocols/yahoo/libkyahoo/yabtask.h index fe9cae3c..3086a01a 100644 --- a/kopete/protocols/yahoo/libkyahoo/yabtask.h +++ b/kopete/protocols/yahoo/libkyahoo/yabtask.h @@ -49,11 +49,11 @@ protected: virtual bool forMe( const Transfer* transfer ) const; void parseContactDetails( YMSGTransfer* t ); private slots: - void slotData( KIO::Job*, const QByteArray & ); + void slotData( KIO::Job*, const TQByteArray & ); void slotResult( KIO::Job* ); private: KIO::TransferJob *m_transferJob; - QString m_data; + TQString m_data; }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp b/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp index 5e704efa..025386f0 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.cpp @@ -16,7 +16,7 @@ #include "yahoobuddyiconloader.h" // QT Includes -#include +#include // KDE Includes #include @@ -40,17 +40,17 @@ YahooBuddyIconLoader::~YahooBuddyIconLoader() { } -void YahooBuddyIconLoader::fetchBuddyIcon( const QString &who, KURL url, int checksum ) +void YahooBuddyIconLoader::fetchBuddyIcon( const TQString &who, KURL url, int checksum ) { kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << url << endl; KIO::TransferJob *transfer; - QString Url = url.url(); - QString ext = Url.left( Url.findRev( "?" ) ); + TQString Url = url.url(); + TQString ext = Url.left( Url.findRev( "?" ) ); ext = ext.right( ext.length() - ext.findRev( "." ) ); transfer = KIO::get( url, false, false ); - connect( transfer, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotComplete( KIO::Job* ) ) ); - connect( transfer, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) ); + connect( transfer, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotComplete( KIO::Job* ) ) ); + connect( transfer, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); m_jobs[transfer].url = url; m_jobs[transfer].who = who; @@ -58,7 +58,7 @@ void YahooBuddyIconLoader::fetchBuddyIcon( const QString &who, KURL url, int che } -void YahooBuddyIconLoader::slotData( KIO::Job *job, const QByteArray& data ) +void YahooBuddyIconLoader::slotData( KIO::Job *job, const TQByteArray& data ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; diff --git a/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.h b/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.h index 76f70cdc..f200725d 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.h +++ b/kopete/protocols/yahoo/libkyahoo/yahoobuddyiconloader.h @@ -17,9 +17,9 @@ #define YAHOOBUDDYICONLOADER_ // QT Includes -#include -#include -#include +#include +#include +#include // KDE Includes #include @@ -33,9 +33,9 @@ namespace KIO { struct IconLoadJob { KURL url; - QString who; + TQString who; int checksum; - QByteArray icon; + TQByteArray icon; }; /** @@ -55,21 +55,21 @@ public: /** * Add a BuddyIcon for download. */ - void fetchBuddyIcon( const QString &who, KURL url, int checksum ); + void fetchBuddyIcon( const TQString &who, KURL url, int checksum ); signals: /** * The account can connect to this signal and append the icon * stored in 'file' to the appropriate contact */ - void fetchedBuddyIcon( const QString &who, const QByteArray &icon, int checksum ); + void fetchedBuddyIcon( const TQString &who, const TQByteArray &icon, int checksum ); private slots: - void slotData( KIO::Job *job, const QByteArray &data ); + void slotData( KIO::Job *job, const TQByteArray &data ); void slotComplete( KIO::Job *job ); private: - typedef QMap< KIO::TransferJob *, IconLoadJob > TransferJobMap; + typedef TQMap< KIO::TransferJob *, IconLoadJob > TransferJobMap; TransferJobMap m_jobs; Client *m_client; }; diff --git a/kopete/protocols/yahoo/libkyahoo/yahoobytestream.cpp b/kopete/protocols/yahoo/libkyahoo/yahoobytestream.cpp index b0d1cbb9..028396c2 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoobytestream.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yahoobytestream.cpp @@ -15,14 +15,14 @@ ************************************************************************* */ -#include +#include #include #include #include #include "yahoobytestream.h" -KNetworkByteStream::KNetworkByteStream( QObject *parent ) +KNetworkByteStream::KNetworkByteStream( TQObject *parent ) : ByteStream ( parent ) { kdDebug( 14181 ) << "Instantiating new KNetwork byte stream." << endl; @@ -36,14 +36,14 @@ KNetworkByteStream::KNetworkByteStream( QObject *parent ) mSocket->enableRead( true ); // connect signals and slots - QObject::connect( mSocket, SIGNAL ( gotError ( int ) ), this, SLOT ( slotError ( int ) ) ); - QObject::connect( mSocket, SIGNAL ( connected ( const KResolverEntry& ) ), this, SLOT ( slotConnected () ) ); - QObject::connect( mSocket, SIGNAL ( closed () ), this, SLOT ( slotConnectionClosed () ) ); - QObject::connect( mSocket, SIGNAL ( readyRead () ), this, SLOT ( slotReadyRead () ) ); - QObject::connect( mSocket, SIGNAL ( bytesWritten ( int ) ), this, SLOT ( slotBytesWritten ( int ) ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( gotError ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( connected ( const KResolverEntry& ) ), this, TQT_SLOT ( slotConnected () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( closed () ), this, TQT_SLOT ( slotConnectionClosed () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( readyRead () ), this, TQT_SLOT ( slotReadyRead () ) ); + TQObject::connect( mSocket, TQT_SIGNAL ( bytesWritten ( int ) ), this, TQT_SLOT ( slotBytesWritten ( int ) ) ); } -bool KNetworkByteStream::connect( QString host, QString service ) +bool KNetworkByteStream::connect( TQString host, TQString service ) { kdDebug( 14181 ) << "Connecting to " << host << ", service " << service << endl; @@ -68,7 +68,7 @@ void KNetworkByteStream::close () int KNetworkByteStream::tryWrite () { // send all data from the buffers to the socket - QByteArray writeData = takeWrite(); + TQByteArray writeData = takeWrite(); kdDebug( 14181 ) << "[writeData.size() = " << writeData.size() << "]" << endl; socket()->writeBlock( writeData.data(), writeData.size () ); @@ -113,7 +113,7 @@ void KNetworkByteStream::slotReadyRead() { kdDebug( 14181 ); // stuff all available data into our buffers - QByteArray readBuffer; + TQByteArray readBuffer; readBuffer.resize( socket()->bytesAvailable () ); socket()->readBlock( readBuffer.data (), readBuffer.size () ); diff --git a/kopete/protocols/yahoo/libkyahoo/yahoobytestream.h b/kopete/protocols/yahoo/libkyahoo/yahoobytestream.h index d48bcf36..5f7f0206 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoobytestream.h +++ b/kopete/protocols/yahoo/libkyahoo/yahoobytestream.h @@ -34,11 +34,11 @@ class KNetworkByteStream : public ByteStream Q_OBJECT public: - KNetworkByteStream ( QObject *parent = 0 ); + KNetworkByteStream ( TQObject *parent = 0 ); ~KNetworkByteStream (); - bool connect ( QString host, QString service ); + bool connect ( TQString host, TQString service ); virtual bool isOpen () const; virtual void close (); diff --git a/kopete/protocols/yahoo/libkyahoo/yahoochattask.cpp b/kopete/protocols/yahoo/libkyahoo/yahoochattask.cpp index 56834a83..1c9528ff 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoochattask.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yahoochattask.cpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include YahooChatTask::YahooChatTask(Task* parent) : Task(parent) { @@ -95,11 +95,11 @@ void YahooChatTask::getYahooChatCategories() transfer->addMetaData( "UserAgent", "Mozilla/4.0 (compatible; MSIE 5.5)"); transfer->addMetaData( "no-cache", "true" ); transfer->addMetaData( "cookies", "manual" ); - transfer->addMetaData("setcookies", QString("Cookie: %1; %2; %3").arg(client()->tCookie(), client()->yCookie()) ); + transfer->addMetaData("setcookies", TQString("Cookie: %1; %2; %3").arg(client()->tCookie(), client()->yCookie()) ); - connect( transfer, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotCategoriesComplete( KIO::Job* ) ) ); - connect( transfer, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) ); + connect( transfer, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotCategoriesComplete( KIO::Job* ) ) ); + connect( transfer, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); } void YahooChatTask::getYahooChatRooms( const Yahoo::ChatCategory &category ) @@ -107,20 +107,20 @@ void YahooChatTask::getYahooChatRooms( const Yahoo::ChatCategory &category ) kdDebug(YAHOO_RAW_DEBUG) << "Category Id: " << category.id << endl; KIO::TransferJob *transfer; - transfer = KIO::get( KURL(QString("http://insider.msg.yahoo.com/ycontent/?chatroom_%1=0").arg( category.id )), false, false ); + transfer = KIO::get( KURL(TQString("http://insider.msg.yahoo.com/ycontent/?chatroom_%1=0").arg( category.id )), false, false ); transfer->addMetaData( "UserAgent", "Mozilla/4.0 (compatible; MSIE 5.5)"); transfer->addMetaData( "no-cache", "true" ); transfer->addMetaData( "cookies", "manual" ); - transfer->addMetaData("setcookies", QString("Cookie: %1; %2; %3").arg(client()->tCookie(), client()->yCookie()) ); + transfer->addMetaData("setcookies", TQString("Cookie: %1; %2; %3").arg(client()->tCookie(), client()->yCookie()) ); - connect( transfer, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotChatRoomsComplete( KIO::Job* ) ) ); - connect( transfer, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) ); + connect( transfer, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotChatRoomsComplete( KIO::Job* ) ) ); + connect( transfer, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); m_jobs[ transfer ].category = category; } -void YahooChatTask::slotData( KIO::Job *job, const QByteArray& data) +void YahooChatTask::slotData( KIO::Job *job, const TQByteArray& data) { kdDebug(YAHOO_RAW_DEBUG) ; // FIXME (same) @@ -139,7 +139,7 @@ void YahooChatTask::slotCategoriesComplete( KIO::Job *job ) } else { - QDomDocument doc; + TQDomDocument doc; doc.setContent( m_jobs[ transfer ].data ); emit gotYahooChatCategories( doc ); } @@ -159,7 +159,7 @@ void YahooChatTask::slotChatRoomsComplete( KIO::Job *job ) } else { - QDomDocument doc; + TQDomDocument doc; doc.setContent( m_jobs[ transfer ].data ); // kdDebug(YAHOO_RAW_DEBUG) << doc.toString(); emit gotYahooChatRooms( m_jobs[ transfer ].category, doc ); @@ -188,7 +188,7 @@ void YahooChatTask::joinRoom( const Yahoo::ChatRoom &room ) send( t ); } -void YahooChatTask::sendYahooChatMessage( const QString &msg, const QString &handle ) +void YahooChatTask::sendYahooChatMessage( const TQString &msg, const TQString &handle ) { kdDebug(YAHOO_RAW_DEBUG) ; if( !m_loggedIn ) @@ -214,7 +214,7 @@ void YahooChatTask::login() YMSGTransfer *t = new YMSGTransfer(Yahoo::ServiceChatOnline); t->setId( client()->sessionID() ); t->setParam( 1, client()->userId().local8Bit() ); - t->setParam( 135, QString("ym%1").arg(YMSG_PROGRAM_VERSION_STRING).local8Bit() ); + t->setParam( 135, TQString("ym%1").arg(YMSG_PROGRAM_VERSION_STRING).local8Bit() ); send( t ); } @@ -232,11 +232,11 @@ void YahooChatTask::logout() void YahooChatTask::parseLoginResponse( YMSGTransfer *t ) { - if( !QString(t->firstParam( 1 )).startsWith( client()->userId().local8Bit() ) ) + if( !TQString(t->firstParam( 1 )).startsWith( client()->userId().local8Bit() ) ) return; m_loggedIn = true; - QValueList< Yahoo::ChatRoom >::iterator it; + TQValueList< Yahoo::ChatRoom >::iterator it; for ( it = m_pendingJoins.begin(); it != m_pendingJoins.end(); ++it ) //for( int i = 0; i < m_pendingJoins.size(); ++i ) { @@ -255,10 +255,10 @@ void YahooChatTask::parseJoin( YMSGTransfer *t ) { int room; int category; - QString handle; - QString comment; + TQString handle; + TQString comment; bool suppressJoinNotification = false; - QString error; + TQString error; room = t->firstParam( 129 ).toInt(); category = t->firstParam( 128 ).toInt(); @@ -296,7 +296,7 @@ void YahooChatTask::parseJoin( YMSGTransfer *t ) emit chatRoomJoined( room, category, comment, handle ); } - QString nick; + TQString nick; for( int i = 0; i < t->paramCount( 109 ); ++i ) { nick = t->nthParam( 109 , i ); @@ -308,9 +308,9 @@ void YahooChatTask::parseChatMessage( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString handle; - QString msg; - QString nick; + TQString handle; + TQString msg; + TQString nick; handle = t->firstParam( 104 ); for( int i = 0; i < t->paramCount( 109 ); ++i ) @@ -325,8 +325,8 @@ void YahooChatTask::parseChatExit( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString handle; - QString nick; + TQString handle; + TQString nick; handle = t->firstParam( 104 ); for( int i = 0; i < t->paramCount( 109 ); ++i ) @@ -340,7 +340,7 @@ void YahooChatTask::parseLogout( YMSGTransfer *t ) { kdDebug(YAHOO_RAW_DEBUG) ; - QString nick = t->firstParam( 1 ); + TQString nick = t->firstParam( 1 ); if( nick == client()->userId() ) m_loggedIn = false; } diff --git a/kopete/protocols/yahoo/libkyahoo/yahoochattask.h b/kopete/protocols/yahoo/libkyahoo/yahoochattask.h index 310b174d..3de4cbd4 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahoochattask.h +++ b/kopete/protocols/yahoo/libkyahoo/yahoochattask.h @@ -20,9 +20,9 @@ #include "task.h" #include "yahootypes.h" -#include -#include -#include +#include +#include +#include class QDomDocument; class YMSGTransfer; @@ -31,7 +31,7 @@ namespace KIO { } struct YahooChatJob { - QByteArray data; + TQByteArray data; Yahoo::ChatCategory category; }; @@ -54,18 +54,18 @@ public: void joinRoom( const Yahoo::ChatRoom &room ); - void sendYahooChatMessage( const QString &msg, const QString &handle ); + void sendYahooChatMessage( const TQString &msg, const TQString &handle ); void logout(); signals: - void gotYahooChatCategories( const QDomDocument & ); - void gotYahooChatRooms( const Yahoo::ChatCategory &, const QDomDocument & ); + void gotYahooChatCategories( const TQDomDocument & ); + void gotYahooChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & ); - void chatRoomJoined( int roomId, int categoryId, const QString &comment, const QString &handle ); - void chatBuddyHasJoined( const QString &nick, const QString &handle, bool suppressNotification ); - void chatBuddyHasLeft( const QString &nick, const QString &handle ); - void chatMessageReceived( const QString &nick, const QString &message, const QString &handle ); + void chatRoomJoined( int roomId, int categoryId, const TQString &comment, const TQString &handle ); + void chatBuddyHasJoined( const TQString &nick, const TQString &handle, bool suppressNotification ); + void chatBuddyHasLeft( const TQString &nick, const TQString &handle ); + void chatMessageReceived( const TQString &nick, const TQString &message, const TQString &handle ); private: void login(); void parseLoginResponse( YMSGTransfer *t ); @@ -75,12 +75,12 @@ private: void parseLogout( YMSGTransfer * ); private slots: - void slotData( KIO::Job *, const QByteArray & ); + void slotData( KIO::Job *, const TQByteArray & ); void slotCategoriesComplete( KIO::Job * ); void slotChatRoomsComplete( KIO::Job * ); private: - QMap< KIO::Job *, YahooChatJob > m_jobs; - QValueList< Yahoo::ChatRoom > m_pendingJoins; + TQMap< KIO::Job *, YahooChatJob > m_jobs; + TQValueList< Yahoo::ChatRoom > m_pendingJoins; bool m_loggedIn; }; diff --git a/kopete/protocols/yahoo/libkyahoo/yahooclientstream.cpp b/kopete/protocols/yahoo/libkyahoo/yahooclientstream.cpp index 3279bbd0..34eb649e 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahooclientstream.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yahooclientstream.cpp @@ -20,11 +20,11 @@ -#include // for qdebug -#include -#include -#include -#include +#include // for qdebug +#include +#include +#include +#include #include @@ -36,7 +36,7 @@ #include "yahooclientstream.h" #include "yahootypes.h" -void cs_dump( const QByteArray &bytes ); +void cs_dump( const TQByteArray &bytes ); enum { Idle, @@ -58,9 +58,9 @@ public: conn = 0; bs = 0; - username = QString::null; - password = QString::null; - server = QString::null; + username = TQString::null; + password = TQString::null; + server = TQString::null; haveLocalAddr = false; doBinding = true; @@ -73,12 +73,12 @@ public: newTransfers = false; } - QString username; - QString password; - QString server; + TQString username; + TQString password; + TQString server; bool doAuth; //send the initial login sequences to get the cookie bool haveLocalAddr; - QHostAddress localAddr; + TQHostAddress localAddr; Q_UINT16 localPort; bool doBinding; @@ -86,7 +86,7 @@ public: ByteStream *bs; CoreProtocol client; - QString defRealm; + TQString defRealm; int mode; int state; @@ -94,28 +94,28 @@ public: bool newTransfers; int errCond; - QString errText; + TQString errText; - QPtrQueue in; + TQPtrQueue in; - QTimer noopTimer; // used to send icq keepalive + TQTimer noopTimer; // used to send icq keepalive int noop_time; }; -ClientStream::ClientStream(Connector *conn, QObject *parent) +ClientStream::ClientStream(Connector *conn, TQObject *parent) :Stream(parent), d(new Private()) { kdDebug(YAHOO_RAW_DEBUG) ; d->mode = Client; d->conn = conn; - connect( d->conn, SIGNAL(connected()), SLOT(cr_connected()) ); - connect( d->conn, SIGNAL(error()), SLOT(cr_error()) ); - connect( &d->client, SIGNAL( outgoingData( const QByteArray& ) ), SLOT ( cp_outgoingData( const QByteArray & ) ) ); - connect( &d->client, SIGNAL( incomingData() ), SLOT ( cp_incomingData() ) ); + connect( d->conn, TQT_SIGNAL(connected()), TQT_SLOT(cr_connected()) ); + connect( d->conn, TQT_SIGNAL(error()), TQT_SLOT(cr_error()) ); + connect( &d->client, TQT_SIGNAL( outgoingData( const TQByteArray& ) ), TQT_SLOT ( cp_outgoingData( const TQByteArray & ) ) ); + connect( &d->client, TQT_SIGNAL( incomingData() ), TQT_SLOT ( cp_incomingData() ) ); d->noop_time = 0; - connect(&d->noopTimer, SIGNAL(timeout()), SLOT(doNoop())); + connect(&d->noopTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doNoop())); } ClientStream::~ClientStream() @@ -148,7 +148,7 @@ void ClientStream::reset(bool all) d->in.clear(); } -void ClientStream::connectToServer(const QString& server, bool auth) +void ClientStream::connectToServer(const TQString& server, bool auth) { kdDebug(YAHOO_RAW_DEBUG) ; reset(true); @@ -203,7 +203,7 @@ void ClientStream::setNoopTime(int mills) d->noopTimer.start(d->noop_time); } -void ClientStream::setLocalAddr(const QHostAddress &addr, Q_UINT16 port) +void ClientStream::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port) { d->haveLocalAddr = true; d->localAddr = addr; @@ -215,7 +215,7 @@ int ClientStream::errorCondition() const return d->errCond; } -QString ClientStream::errorText() const +TQString ClientStream::errorText() const { return d->errText; } @@ -253,7 +253,7 @@ void ClientStream::write( Transfer *request ) d->client.outgoingTransfer( request ); } -void cs_dump( const QByteArray &bytes ) +void cs_dump( const TQByteArray &bytes ) { #if 0 qDebug( "contains: %i bytes ", bytes.count() ); @@ -295,7 +295,7 @@ void cs_dump( const QByteArray &bytes ) Q_UNUSED( bytes ); } -void ClientStream::cp_outgoingData( const QByteArray& outgoingBytes ) +void ClientStream::cp_outgoingData( const TQByteArray& outgoingBytes ) { if ( !d->bs ) return; @@ -327,15 +327,15 @@ void ClientStream::cr_connected() kdDebug(YAHOO_RAW_DEBUG) ; d->bs = d->conn->stream(); - connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed())); - connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished())); - connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead())); - connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int))); - connect(d->bs, SIGNAL(error(int)), SLOT(bs_error(int))); + connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed())); + connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished())); + connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead())); + connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int))); + connect(d->bs, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int))); - QByteArray spare = d->bs->read(); + TQByteArray spare = d->bs->read(); - QGuardedPtr self = this; + TQGuardedPtr self = this; emit connected(); if(!self) return; @@ -368,11 +368,11 @@ void ClientStream::bs_error(int) void ClientStream::bs_readyRead() { // kdDebug(YAHOO_RAW_DEBUG) ; - QByteArray a; + TQByteArray a; //qDebug( "size of storage for incoming data is %i bytes.", a.size() ); a = d->bs->read(); - //QCString cs(a.data(), a.size()+1); + //TQCString cs(a.data(), a.size()+1); //qDebug("ClientStream: recv: %d [%s]\n", a.size(), cs.data()); //kdDebug(YAHOO_RAW_DEBUG) << " recv: " << a.size() <<" bytes"; //cs_dump( a ); @@ -399,7 +399,7 @@ void ClientStream::processNext() { if( !d->in.isEmpty() ) { - QTimer::singleShot(0, this, SLOT(doReadyRead())); + TQTimer::singleShot(0, this, TQT_SLOT(doReadyRead())); } } diff --git a/kopete/protocols/yahoo/libkyahoo/yahooclientstream.h b/kopete/protocols/yahoo/libkyahoo/yahooclientstream.h index 01ca6a2a..6efc307f 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahooclientstream.h +++ b/kopete/protocols/yahoo/libkyahoo/yahooclientstream.h @@ -71,19 +71,19 @@ public: BindConflict // resource in-use }; - explicit ClientStream(Connector *conn, QObject *parent=0); + explicit ClientStream(Connector *conn, TQObject *parent=0); ~ClientStream(); - void connectToServer(const QString& server, bool auth=true); + void connectToServer(const TQString& server, bool auth=true); void accept(); // server bool isActive() const; bool isAuthenticated() const; // login params - void setUsername(const QString &s); - void setPassword(const QString &s); + void setUsername(const TQString &s); + void setPassword(const TQString &s); - void setLocalAddr(const QHostAddress &addr, Q_UINT16 port); + void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port); void close(); @@ -103,10 +103,10 @@ public: void write( Transfer* request ); int errorCondition() const; - QString errorText() const; + TQString errorText() const; // extrahttp://bugs.kde.org/show_bug.cgi?id=85158 -/*# void writeDirect(const QString &s); // must be for debug testing*/ +/*# void writeDirect(const TQString &s); // must be for debug testing*/ void setNoopTime(int mills); signals: @@ -124,7 +124,7 @@ private slots: /** * collects wire ready outgoing data from the core protocol and sends */ - void cp_outgoingData( const QByteArray& ); + void cp_outgoingData( const TQByteArray& ); /** * collects parsed incoming data as a transfer from the core protocol and queues */ diff --git a/kopete/protocols/yahoo/libkyahoo/yahooconnector.cpp b/kopete/protocols/yahoo/libkyahoo/yahooconnector.cpp index fce630db..9b7c8d8a 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahooconnector.cpp +++ b/kopete/protocols/yahoo/libkyahoo/yahooconnector.cpp @@ -25,7 +25,7 @@ #include "yahoobytestream.h" #include "yahootypes.h" -KNetworkConnector::KNetworkConnector( QObject *parent ) +KNetworkConnector::KNetworkConnector( TQObject *parent ) : Connector( parent ) { kdDebug( YAHOO_RAW_DEBUG ) << "New KNetwork connector." << endl; @@ -34,8 +34,8 @@ KNetworkConnector::KNetworkConnector( QObject *parent ) mByteStream = new KNetworkByteStream( this ); - connect( mByteStream, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) ); - connect( mByteStream, SIGNAL ( error ( int ) ), this, SLOT ( slotError ( int ) ) ); + connect( mByteStream, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) ); + connect( mByteStream, TQT_SIGNAL ( error ( int ) ), this, TQT_SLOT ( slotError ( int ) ) ); mPort = 5510; } @@ -44,7 +44,7 @@ KNetworkConnector::~KNetworkConnector() delete mByteStream; } -void KNetworkConnector::connectToServer( const QString &server ) +void KNetworkConnector::connectToServer( const TQString &server ) { Q_UNUSED( server ); kdDebug( YAHOO_RAW_DEBUG ) << "Initiating connection to " << mHost << endl; @@ -53,7 +53,7 @@ void KNetworkConnector::connectToServer( const QString &server ) mErrorCode = KNetwork::KSocketBase::NoError; - if ( !mByteStream->connect( mHost, QString::number (mPort) ) ) + if ( !mByteStream->connect( mHost, TQString::number (mPort) ) ) { // Houston, we have a problem mErrorCode = mByteStream->socket()->error(); @@ -67,7 +67,7 @@ void KNetworkConnector::slotConnected() // FIXME: setPeerAddress() is something different, find out correct usage later //KInetSocketAddress inetAddress = mStreamSocket->address().asInet().makeIPv6 (); - //setPeerAddress ( QHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); + //setPeerAddress ( TQHostAddress ( inetAddress.ipAddress().addr () ), inetAddress.port () ); emit connected (); } @@ -97,7 +97,7 @@ void KNetworkConnector::done() mByteStream->close (); } -void KNetworkConnector::setOptHostPort( const QString &host, Q_UINT16 port ) +void KNetworkConnector::setOptHostPort( const TQString &host, Q_UINT16 port ) { kdDebug ( YAHOO_RAW_DEBUG ) << "Manually specifying host " << host << " and port " << port << endl; diff --git a/kopete/protocols/yahoo/libkyahoo/yahooconnector.h b/kopete/protocols/yahoo/libkyahoo/yahooconnector.h index 10c86ce0..b4758e72 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahooconnector.h +++ b/kopete/protocols/yahoo/libkyahoo/yahooconnector.h @@ -36,15 +36,15 @@ class KNetworkConnector : public Connector Q_OBJECT public: - KNetworkConnector( QObject *parent = 0 ); + KNetworkConnector( TQObject *parent = 0 ); virtual ~KNetworkConnector(); - virtual void connectToServer( const QString &server ); + virtual void connectToServer( const TQString &server ); virtual ByteStream *stream() const; virtual void done(); - void setOptHostPort( const QString &host, Q_UINT16 port ); + void setOptHostPort( const TQString &host, Q_UINT16 port ); int errorCode(); @@ -53,7 +53,7 @@ private slots: void slotError( int ); private: - QString mHost; + TQString mHost; Q_UINT16 mPort; int mErrorCode; diff --git a/kopete/protocols/yahoo/libkyahoo/yahootypes.h b/kopete/protocols/yahoo/libkyahoo/yahootypes.h index 244d4022..0e8858c5 100644 --- a/kopete/protocols/yahoo/libkyahoo/yahootypes.h +++ b/kopete/protocols/yahoo/libkyahoo/yahootypes.h @@ -18,8 +18,8 @@ #ifndef YAHOOTYPESH #define YAHOOTYPESH -#include -#include +#include +#include const int YAHOO_RAW_DEBUG = 14181; const int YAHOO_GEN_DEBUG = 14180; @@ -172,13 +172,13 @@ namespace Yahoo typedef Q_UINT32 DWORD; struct ChatRoom { - QString name; - QString topic; + TQString name; + TQString topic; int id; }; struct ChatCategory { - QString name; + TQString name; int id; }; } diff --git a/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.cpp b/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.cpp index ce2c65eb..b1e6e4e3 100644 --- a/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.cpp +++ b/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.cpp @@ -16,16 +16,16 @@ ************************************************************************* */ -//#include -//#include -//#include -//#include +//#include +//#include +//#include +//#include -//#include -#include -#include -#include -#include +//#include +#include +#include +#include +#include #include @@ -36,7 +36,7 @@ using namespace Yahoo; -YMSGProtocol::YMSGProtocol(QObject *parent, const char *name) +YMSGProtocol::YMSGProtocol(TQObject *parent, const char *name) : InputProtocolBase(parent, name) { } @@ -45,7 +45,7 @@ YMSGProtocol::~YMSGProtocol() { } -Transfer* YMSGProtocol::parse( const QByteArray & packet, uint& bytes ) +Transfer* YMSGProtocol::parse( const TQByteArray & packet, uint& bytes ) { /* <------- 4B -------><------- 4B -------><---2B---> @@ -71,7 +71,7 @@ Transfer* YMSGProtocol::parse( const QByteArray & packet, uint& bytes ) int servicenum; int version1, version2; - QMap params; + TQMap params; // Skip the YMSG header pos += 4; @@ -381,13 +381,13 @@ Transfer* YMSGProtocol::parse( const QByteArray & packet, uint& bytes ) t->setStatus(status); t->setPacketLength(len); - QString d = QString::fromAscii( packet.data() + pos, packet.size() - pos ); - QStringList list = QStringList::split( "\xc0\x80", d ); + TQString d = TQString::fromAscii( packet.data() + pos, packet.size() - pos ); + TQStringList list = TQStringList::split( "\xc0\x80", d ); for( int i = 0; i+1 < list.size() && pos+1 < len+20; i += 2 ) { - QString key = list[i]; - QString value = QString::fromUtf8( list[i+1].ascii() ); + TQString key = list[i]; + TQString value = TQString::fromUtf8( list[i+1].ascii() ); pos += key.utf8().length() + value.utf8().length() + 4; - t->setParam( QString(key).toInt(), value.utf8() ); + t->setParam( TQString(key).toInt(), value.utf8() ); kdDebug(YAHOO_RAW_DEBUG) << k_funcinfo << "Key: " << key << " Value: " << value << endl; } diff --git a/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.h b/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.h index 230745ef..a3ac04a6 100644 --- a/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.h +++ b/kopete/protocols/yahoo/libkyahoo/ymsgprotocol.h @@ -28,7 +28,7 @@ Q_OBJECT public: - YMSGProtocol( QObject *parent = 0, const char *name = 0 ); + YMSGProtocol( TQObject *parent = 0, const char *name = 0 ); ~YMSGProtocol(); /** @@ -38,7 +38,7 @@ public: * @param bytes An integer used to return the number of bytes read. * @return A pointer to an EventTransfer object if successful, otherwise 0. The caller is responsible for deleting this object. */ - Transfer * parse( const QByteArray &, uint & bytes ); + Transfer * parse( const TQByteArray &, uint & bytes ); }; #endif diff --git a/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.cpp b/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.cpp index 233b0c85..dcee98d9 100644 --- a/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.cpp +++ b/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.cpp @@ -24,10 +24,10 @@ #include "yahootypes.h" #include "kdebug.h" -#include -#include -#include -#include +#include +#include +#include +#include using namespace Yahoo; @@ -143,7 +143,7 @@ int YMSGTransfer::paramCount( int index ) const } -QCString YMSGTransfer::nthParam( int index, int occurrence ) const +TQCString YMSGTransfer::nthParam( int index, int occurrence ) const { int cnt = 0; for (ParamList::ConstIterator it = d->data.constBegin(); it != d->data.constEnd(); ++it) @@ -151,10 +151,10 @@ QCString YMSGTransfer::nthParam( int index, int occurrence ) const if( (*it).first == index && cnt++ == occurrence) return (*it).second; } - return QCString(); + return TQCString(); } -QCString YMSGTransfer::nthParamSeparated( int index, int occurrence, int separator ) const +TQCString YMSGTransfer::nthParamSeparated( int index, int occurrence, int separator ) const { int cnt = -1; @@ -165,27 +165,27 @@ QCString YMSGTransfer::nthParamSeparated( int index, int occurrence, int separat if( (*it).first == index && cnt == occurrence) return (*it).second; } - return QCString(); + return TQCString(); } -QCString YMSGTransfer::firstParam( int index ) const +TQCString YMSGTransfer::firstParam( int index ) const { for (ParamList::ConstIterator it = d->data.constBegin(); it != d->data.constEnd(); ++it) { if( (*it).first == index ) return (*it).second; } - return QCString(); + return TQCString(); } -void YMSGTransfer::setParam(int index, const QCString &data) +void YMSGTransfer::setParam(int index, const TQCString &data) { d->data.append( Param( index, data ) ); } void YMSGTransfer::setParam( int index, int data ) { - d->data.append( Param( index, QString::number( data ).local8Bit() ) ); + d->data.append( Param( index, TQString::number( data ).local8Bit() ) ); } int YMSGTransfer::length() const @@ -193,7 +193,7 @@ int YMSGTransfer::length() const int len = 0; for (ParamList::ConstIterator it = d->data.constBegin(); it != d->data.constEnd(); ++it) { - len += QString::number( (*it).first ).length(); + len += TQString::number( (*it).first ).length(); len += 2; len += (*it).second.length(); len += 2; @@ -202,7 +202,7 @@ int YMSGTransfer::length() const } -QByteArray YMSGTransfer::serialize() const +TQByteArray YMSGTransfer::serialize() const { /* <------- 4B -------><------- 4B -------><---2B---> @@ -218,9 +218,9 @@ QByteArray YMSGTransfer::serialize() const */ int pos = 0; - QStringList::ConstIterator listIt = 0; - QByteArray buffer; - QDataStream stream( buffer, IO_WriteOnly ); + TQStringList::ConstIterator listIt = 0; + TQByteArray buffer; + TQDataStream stream( buffer, IO_WriteOnly ); stream << (Q_INT8)'Y' << (Q_INT8)'M' << (Q_INT8)'S' << (Q_INT8)'G'; if( d->service == Yahoo::ServicePictureUpload ) @@ -239,7 +239,7 @@ QByteArray YMSGTransfer::serialize() const for (ParamList::ConstIterator it = d->data.constBegin(); it != d->data.constEnd(); ++it) { kdDebug(YAHOO_RAW_DEBUG) << " Serializing key " << (*it).first << " value " << (*it).second << endl; - stream.writeRawBytes ( QString::number( (*it).first ).local8Bit(), QString::number( (*it).first ).length() ); + stream.writeRawBytes ( TQString::number( (*it).first ).local8Bit(), TQString::number( (*it).first ).length() ); stream << (Q_INT8)0xc0 << (Q_INT8)0x80; stream.writeRawBytes( (*it).second, (*it).second.length() ); stream << (Q_INT8)0xc0 << (Q_INT8)0x80; diff --git a/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.h b/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.h index 662ca4d2..0b157792 100644 --- a/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.h +++ b/kopete/protocols/yahoo/libkyahoo/ymsgtransfer.h @@ -25,13 +25,13 @@ #include "yahootypes.h" -#include -#include +#include +#include class YMSGTransferPrivate; -typedef QPair< int, QCString > Param; -typedef QValueList< Param > ParamList; +typedef QPair< int, TQCString > Param; +typedef TQValueList< Param > ParamList; /** @author Duncan Mac-Vicar Prett @@ -60,15 +60,15 @@ public: ParamList paramList() const; - QCString firstParam( int index ) const; - QCString nthParam( int index, int occurrence ) const; - QCString nthParamSeparated( int index, int occurrence, int separator ) const; + TQCString firstParam( int index ) const; + TQCString nthParam( int index, int occurrence ) const; + TQCString nthParamSeparated( int index, int occurrence, int separator ) const; int paramCount( int index ) const; - void setParam(int index, const QCString &data); + void setParam(int index, const TQCString &data); void setParam(int index, int data); - QByteArray serialize() const; + TQByteArray serialize() const; int length() const; private: diff --git a/kopete/protocols/yahoo/ui/yahooinvitelistimpl.cpp b/kopete/protocols/yahoo/ui/yahooinvitelistimpl.cpp index dcd6e184..594e7a01 100644 --- a/kopete/protocols/yahoo/ui/yahooinvitelistimpl.cpp +++ b/kopete/protocols/yahoo/ui/yahooinvitelistimpl.cpp @@ -19,27 +19,27 @@ #include -#include -#include +#include +#include -YahooInviteListImpl::YahooInviteListImpl(QWidget *parent, const char *name) : YahooInviteListBase(parent,name) +YahooInviteListImpl::YahooInviteListImpl(TQWidget *parent, const char *name) : YahooInviteListBase(parent,name) { - listFriends->setSelectionMode( QListBox::Extended ); - listInvited->setSelectionMode( QListBox::Extended ); + listFriends->setSelectionMode( TQListBox::Extended ); + listInvited->setSelectionMode( TQListBox::Extended ); } YahooInviteListImpl::~YahooInviteListImpl() { } -void YahooInviteListImpl::setRoom( const QString &room ) +void YahooInviteListImpl::setRoom( const TQString &room ) { kdDebug(14180) << k_funcinfo << "Setting roomname to: " << room << endl; m_room = room; } -void YahooInviteListImpl::fillFriendList( const QStringList &buddies ) +void YahooInviteListImpl::fillFriendList( const TQStringList &buddies ) { kdDebug(14180) << k_funcinfo << "Adding friends: " << buddies << endl; @@ -59,11 +59,11 @@ void YahooInviteListImpl::updateListBoxes() listInvited->sort(); } -void YahooInviteListImpl::addInvitees( const QStringList &invitees ) +void YahooInviteListImpl::addInvitees( const TQStringList &invitees ) { kdDebug(14180) << k_funcinfo << "Adding invitees: " << invitees << endl; - for( QStringList::const_iterator it = invitees.begin(); it != invitees.end(); it++ ) + for( TQStringList::const_iterator it = invitees.begin(); it != invitees.end(); it++ ) { if( m_inviteeList.find( *it ) == m_inviteeList.end() ) m_inviteeList.push_back( *it ); @@ -74,11 +74,11 @@ void YahooInviteListImpl::addInvitees( const QStringList &invitees ) updateListBoxes(); } -void YahooInviteListImpl::removeInvitees( const QStringList &invitees ) +void YahooInviteListImpl::removeInvitees( const TQStringList &invitees ) { kdDebug(14180) << k_funcinfo << "Removing invitees: " << invitees << endl; - for( QStringList::const_iterator it = invitees.begin(); it != invitees.end(); it++ ) + for( TQStringList::const_iterator it = invitees.begin(); it != invitees.end(); it++ ) { if( m_buddyList.find( *it ) == m_buddyList.end() ) m_buddyList.push_back( *it ); @@ -89,7 +89,7 @@ void YahooInviteListImpl::removeInvitees( const QStringList &invitees ) updateListBoxes(); } -void YahooInviteListImpl::addParticipant( const QString &p ) +void YahooInviteListImpl::addParticipant( const TQString &p ) { m_participants.push_back( p ); } @@ -100,7 +100,7 @@ void YahooInviteListImpl::btnInvite_clicked() if( m_inviteeList.count() ) emit readyToInvite( m_room, m_inviteeList,m_participants, editMessage->text() ); - QDialog::accept(); + TQDialog::accept(); } @@ -108,7 +108,7 @@ void YahooInviteListImpl::btnCancel_clicked() { kdDebug(14180) << k_funcinfo << endl; - QDialog::reject(); + TQDialog::reject(); } @@ -116,12 +116,12 @@ void YahooInviteListImpl::btnAddCustom_clicked() { kdDebug(14180) << k_funcinfo << endl; - QString userId; + TQString userId; userId = editBuddyAdd->text(); if( userId.isEmpty() ) return; - addInvitees( QStringList(userId) ); + addInvitees( TQStringList(userId) ); editBuddyAdd->clear(); } @@ -130,7 +130,7 @@ void YahooInviteListImpl::btnRemove_clicked() { kdDebug(14180) << k_funcinfo << endl; - QStringList buddies; + TQStringList buddies; for( uint i=0; icount(); i++ ) { if (listInvited->isSelected(i)) @@ -146,7 +146,7 @@ void YahooInviteListImpl::btnAdd_clicked() { kdDebug(14180) << k_funcinfo << endl; - QStringList buddies; + TQStringList buddies; for( uint i=0; icount(); i++ ) { if (listFriends->isSelected(i)) diff --git a/kopete/protocols/yahoo/ui/yahooinvitelistimpl.h b/kopete/protocols/yahoo/ui/yahooinvitelistimpl.h index 76577f36..94fa6402 100644 --- a/kopete/protocols/yahoo/ui/yahooinvitelistimpl.h +++ b/kopete/protocols/yahoo/ui/yahooinvitelistimpl.h @@ -18,7 +18,7 @@ #ifndef YAHOO_INVITE_LIST_IMPL #define YAHOO_INVITE_LIST_IMPL -#include +#include #include "yahooinvitelistbase.h" @@ -26,18 +26,18 @@ class YahooInviteListImpl : public YahooInviteListBase { Q_OBJECT public: - YahooInviteListImpl(QWidget *parent=0, const char *name=0); + YahooInviteListImpl(TQWidget *parent=0, const char *name=0); ~YahooInviteListImpl(); - void fillFriendList( const QStringList &buddies ); - void addInvitees( const QStringList &buddies ); - void removeInvitees( const QStringList &buddies ); - void setRoom( const QString &room ); - void addParticipant( const QString &participant ); + void fillFriendList( const TQStringList &buddies ); + void addInvitees( const TQStringList &buddies ); + void removeInvitees( const TQStringList &buddies ); + void setRoom( const TQString &room ); + void addParticipant( const TQString &participant ); private: signals: - void readyToInvite( const QString &room, const QStringList &buddies, const QStringList &participants, const QString &msg ); + void readyToInvite( const TQString &room, const TQStringList &buddies, const TQStringList &participants, const TQString &msg ); protected slots: public slots: @@ -49,10 +49,10 @@ public slots: private: void updateListBoxes(); - QStringList m_buddyList; - QStringList m_inviteeList; - QStringList m_participants; - QString m_room; + TQStringList m_buddyList; + TQStringList m_inviteeList; + TQStringList m_participants; + TQString m_room; }; #endif diff --git a/kopete/protocols/yahoo/ui/yahoouserinfodialog.cpp b/kopete/protocols/yahoo/ui/yahoouserinfodialog.cpp index 28a8532d..700c91e5 100644 --- a/kopete/protocols/yahoo/ui/yahoouserinfodialog.cpp +++ b/kopete/protocols/yahoo/ui/yahoouserinfodialog.cpp @@ -19,13 +19,13 @@ #include "yahoouserinfodialog.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -39,34 +39,34 @@ #include "yahoootherinfowidget.h" #include "yahoocontact.h" -YahooUserInfoDialog::YahooUserInfoDialog( YahooContact *c, QWidget * parent, const char * name ) +YahooUserInfoDialog::YahooUserInfoDialog( YahooContact *c, TQWidget * parent, const char * name ) : KDialogBase( KDialogBase::IconList, 0, parent, name, false, i18n( "Yahoo User Information" ), User2|User1|Cancel, Cancel, false, i18n("Save and Close"), i18n("Merge with existing entry") ) { kdDebug(14180) << k_funcinfo << "Creating new yahoo user info widget" << endl; m_contact = c; showButton( User2, false ); - QFrame* genInfo = addPage( i18n( "General Info" ), + TQFrame* genInfo = addPage( i18n( "General Info" ), i18n( "General Yahoo Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "identity" ), KIcon::Desktop ) ); - QVBoxLayout* genLayout = new QVBoxLayout( genInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "identity" ), KIcon::Desktop ) ); + TQVBoxLayout* genLayout = new TQVBoxLayout( genInfo ); m_genInfoWidget = new YahooGeneralInfoWidget( genInfo, "Basic Information" ); genLayout->addWidget( m_genInfoWidget ); - QFrame* workInfo = addPage( i18n( "Work Info" ), + TQFrame* workInfo = addPage( i18n( "Work Info" ), i18n( "Work Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "attach" ), KIcon::Desktop ) ); - QVBoxLayout* workLayout = new QVBoxLayout( workInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "attach" ), KIcon::Desktop ) ); + TQVBoxLayout* workLayout = new TQVBoxLayout( workInfo ); m_workInfoWidget = new YahooWorkInfoWidget( workInfo, "Work Information" ); workLayout->addWidget( m_workInfoWidget ); - QFrame* otherInfo = addPage( i18n( "Other Info" ), + TQFrame* otherInfo = addPage( i18n( "Other Info" ), i18n( "Other Yahoo Information" ), - KGlobal::iconLoader()->loadIcon( QString::fromLatin1( "email" ), KIcon::Desktop ) ); - QVBoxLayout* otherLayout = new QVBoxLayout( otherInfo ); + KGlobal::iconLoader()->loadIcon( TQString::fromLatin1( "email" ), KIcon::Desktop ) ); + TQVBoxLayout* otherLayout = new TQVBoxLayout( otherInfo ); m_otherInfoWidget = new YahooOtherInfoWidget( otherInfo, "Other Information" ); otherLayout->addWidget( m_otherInfoWidget ); - QObject::connect(this, SIGNAL(user1Clicked()), this, SLOT(slotSaveAndCloseClicked())); + TQObject::connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotSaveAndCloseClicked())); } void YahooUserInfoDialog::setAccountConnected( bool isOnline ) @@ -107,10 +107,10 @@ void YahooUserInfoDialog::slotSaveAndCloseClicked() entry.privateState = m_genInfoWidget->stateEdit->text(); entry.privateZIP = m_genInfoWidget->zipEdit->text(); entry.privateCountry = m_genInfoWidget->countryEdit->text(); - QString bi = m_genInfoWidget->birthdayEdit->text(); - entry.birthday = QDate( bi.section("/",2,2).toInt(), bi.section("/",1,1).toInt(), bi.section("/",0,0).toInt() ); - QString an = m_genInfoWidget->anniversaryEdit->text(); - entry.anniversary = QDate( an.section("/",2,2).toInt(), an.section("/",1,1).toInt(), an.section("/",0,0).toInt() ); + TQString bi = m_genInfoWidget->birthdayEdit->text(); + entry.birthday = TQDate( bi.section("/",2,2).toInt(), bi.section("/",1,1).toInt(), bi.section("/",0,0).toInt() ); + TQString an = m_genInfoWidget->anniversaryEdit->text(); + entry.anniversary = TQDate( an.section("/",2,2).toInt(), an.section("/",1,1).toInt(), an.section("/",0,0).toInt() ); entry.additional1 = m_otherInfoWidget->note1Edit->text(); entry.additional2 = m_otherInfoWidget->note2Edit->text(); entry.additional3 = m_otherInfoWidget->note3Edit->text(); @@ -126,7 +126,7 @@ void YahooUserInfoDialog::slotSaveAndCloseClicked() emit saveYABEntry( entry ); - QDialog::accept(); + TQDialog::accept(); } void YahooUserInfoDialog::slotUser2() @@ -170,16 +170,16 @@ void YahooUserInfoDialog::slotUser2() entry.birthday = oldEntry->birthday; else { - QString bi = m_genInfoWidget->birthdayEdit->text(); - entry.birthday = QDate( bi.section("/",2,2).toInt(), bi.section("/",1,1).toInt(), bi.section("/",0,0).toInt() ); + TQString bi = m_genInfoWidget->birthdayEdit->text(); + entry.birthday = TQDate( bi.section("/",2,2).toInt(), bi.section("/",1,1).toInt(), bi.section("/",0,0).toInt() ); } if( m_genInfoWidget->anniversaryEdit->text().isEmpty() ) entry.anniversary = oldEntry->anniversary; else { - QString an = m_genInfoWidget->anniversaryEdit->text(); - entry.anniversary = QDate( an.section("/",2,2).toInt(), an.section("/",1,1).toInt(), an.section("/",0,0).toInt() ); + TQString an = m_genInfoWidget->anniversaryEdit->text(); + entry.anniversary = TQDate( an.section("/",2,2).toInt(), an.section("/",1,1).toInt(), an.section("/",0,0).toInt() ); } entry.additional1 = m_otherInfoWidget->note1Edit->text().isEmpty() ? oldEntry->additional1 : m_otherInfoWidget->note1Edit->text(); @@ -198,7 +198,7 @@ void YahooUserInfoDialog::slotUser2() emit saveYABEntry( entry ); } - QDialog::accept(); + TQDialog::accept(); } void YahooUserInfoDialog::setData( const YABEntry &yab ) @@ -219,9 +219,9 @@ void YahooUserInfoDialog::setData( const YABEntry &yab ) m_genInfoWidget->titleEdit->setText( yab.title ); if( yab.birthday.isValid() ) - m_genInfoWidget->birthdayEdit->setText( QString("%1/%2/%3").arg( yab.birthday.day() ).arg( yab.birthday.month() ).arg( yab.birthday.year() )); + m_genInfoWidget->birthdayEdit->setText( TQString("%1/%2/%3").arg( yab.birthday.day() ).arg( yab.birthday.month() ).arg( yab.birthday.year() )); if( yab.anniversary.isValid() ) - m_genInfoWidget->anniversaryEdit->setText( QString("%1/%2/%3").arg( yab.anniversary.day() ).arg( yab.anniversary.month() ).arg( yab.anniversary.year() )); + m_genInfoWidget->anniversaryEdit->setText( TQString("%1/%2/%3").arg( yab.anniversary.day() ).arg( yab.anniversary.month() ).arg( yab.anniversary.year() )); m_genInfoWidget->addressEdit->setText( yab.privateAdress ); m_genInfoWidget->cityEdit->setText( yab.privateCity ); diff --git a/kopete/protocols/yahoo/ui/yahoouserinfodialog.h b/kopete/protocols/yahoo/ui/yahoouserinfodialog.h index 6500d412..e8529033 100644 --- a/kopete/protocols/yahoo/ui/yahoouserinfodialog.h +++ b/kopete/protocols/yahoo/ui/yahoouserinfodialog.h @@ -33,7 +33,7 @@ class YahooUserInfoDialog : public KDialogBase { Q_OBJECT public: - YahooUserInfoDialog( YahooContact *c, QWidget* parent = 0, const char* name = 0 ); + YahooUserInfoDialog( YahooContact *c, TQWidget* parent = 0, const char* name = 0 ); void setAccountConnected( bool isOnline ); signals: void saveYABEntry( YABEntry & ); diff --git a/kopete/protocols/yahoo/ui/yahoowebcamdialog.cpp b/kopete/protocols/yahoo/ui/yahoowebcamdialog.cpp index 1c7d4ef7..caa3c75a 100644 --- a/kopete/protocols/yahoo/ui/yahoowebcamdialog.cpp +++ b/kopete/protocols/yahoo/ui/yahoowebcamdialog.cpp @@ -16,39 +16,39 @@ #include "yahoowebcamdialog.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include -YahooWebcamDialog::YahooWebcamDialog( const QString &contactId, QWidget * parent, const char * name ) +YahooWebcamDialog::YahooWebcamDialog( const TQString &contactId, TQWidget * parent, const char * name ) : KDialogBase( KDialogBase::Plain, i18n( "Webcam for %1" ).arg( contactId ), KDialogBase::Close, KDialogBase::Close, parent, name, false, true /*seperator*/ ) { - setInitialSize( QSize(320,290), false ); + setInitialSize( TQSize(320,290), false ); setEscapeButton( KDialogBase::Close ); - QObject::connect( this, SIGNAL( closeClicked() ), this, SIGNAL( closingWebcamDialog() ) ); + TQObject::connect( this, TQT_SIGNAL( closeClicked() ), this, TQT_SIGNAL( closingWebcamDialog() ) ); contactName = contactId; - QWidget *page = plainPage(); + TQWidget *page = plainPage(); setMainWidget(page); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); m_imageContainer = new Kopete::WebcamWidget( page ); m_imageContainer->setText( i18n( "No webcam image received" ) ); m_imageContainer->setMinimumSize(320,240); - m_imageContainer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_imageContainer->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); topLayout->add( m_imageContainer ); - m_Viewer = new QLabel( page ); - m_Viewer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_Viewer = new TQLabel( page ); + m_Viewer->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_Viewer->hide(); topLayout->add( m_Viewer ); @@ -60,20 +60,20 @@ YahooWebcamDialog::~ YahooWebcamDialog( ) } -void YahooWebcamDialog::newImage( const QPixmap &image ) +void YahooWebcamDialog::newImage( const TQPixmap &image ) { m_imageContainer->updatePixmap( image ); } void YahooWebcamDialog::webcamPaused() { - m_imageContainer->setText( QString::fromLatin1("*** Webcam paused ***") ); + m_imageContainer->setText( TQString::fromLatin1("*** Webcam paused ***") ); } void YahooWebcamDialog::webcamClosed( int reason ) { kdDebug(14180) << k_funcinfo << "webcam closed with reason?? " << reason <setText( closeReason ); } -void YahooWebcamDialog::setViewer( const QStringList &viewer ) +void YahooWebcamDialog::setViewer( const TQStringList &viewer ) { - QString s = i18n( "%1 viewer(s)" ).arg( viewer.size() ); + TQString s = i18n( "%1 viewer(s)" ).arg( viewer.size() ); if( viewer.size() ) { s += ": "; - for ( QStringList::ConstIterator it = viewer.begin(); it != viewer.end(); ++it ) { + for ( TQStringList::ConstIterator it = viewer.begin(); it != viewer.end(); ++it ) { if( it != viewer.begin() ) s += ", "; s += *it; diff --git a/kopete/protocols/yahoo/ui/yahoowebcamdialog.h b/kopete/protocols/yahoo/ui/yahoowebcamdialog.h index 8400e53d..8f130e03 100644 --- a/kopete/protocols/yahoo/ui/yahoowebcamdialog.h +++ b/kopete/protocols/yahoo/ui/yahoowebcamdialog.h @@ -17,7 +17,7 @@ #ifndef YAHOOWEBCAMDIALOG_H_ #define YAHOOWEBCAMDIALOG_H_ -#include +#include #include @@ -34,12 +34,12 @@ class YahooWebcamDialog : public KDialogBase { Q_OBJECT public: - YahooWebcamDialog( const QString &, QWidget* parent = 0, const char* name = 0 ); + YahooWebcamDialog( const TQString &, TQWidget* parent = 0, const char* name = 0 ); ~YahooWebcamDialog(); - void setViewer( const QStringList & ); + void setViewer( const TQStringList & ); public slots: - void newImage( const QPixmap &image ); + void newImage( const TQPixmap &image ); void webcamClosed( int ); void webcamPaused(); signals: @@ -47,8 +47,8 @@ signals: private: Kopete::WebcamWidget *m_imageContainer; - QLabel *m_Viewer; - QString contactName; + TQLabel *m_Viewer; + TQString contactName; }; diff --git a/kopete/protocols/yahoo/yahooaccount.cpp b/kopete/protocols/yahoo/yahooaccount.cpp index 3a64d215..ae33f264 100644 --- a/kopete/protocols/yahoo/yahooaccount.cpp +++ b/kopete/protocols/yahoo/yahooaccount.cpp @@ -21,15 +21,15 @@ #include //QT -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE #include @@ -66,7 +66,7 @@ #include "yabentry.h" #include "yahoouserinfodialog.h" -YahooAccount::YahooAccount(YahooProtocol *parent, const QString& accountId, const char *name) +YahooAccount::YahooAccount(YahooProtocol *parent, const TQString& accountId, const char *name) : Kopete::PasswordedAccount(parent, accountId, 0, name) { @@ -83,21 +83,21 @@ YahooAccount::YahooAccount(YahooProtocol *parent, const QString& accountId, cons // FIXME //m_openInboxAction = new KAction( KIcon("mail-folder-inbox"), i18n( "Open Inbo&x..." ), this ); //, "m_openInboxAction" ); - //QObject::connect(m_openInboxAction, SIGNAL( triggered(bool) ), this, SLOT( slotOpenInbox() ) ); + //TQObject::connect(m_openInboxAction, TQT_SIGNAL( triggered(bool) ), this, TQT_SLOT( slotOpenInbox() ) ); //m_openYABAction = new KAction( KIcon("x-office-address-book"), i18n( "Open &Address book..." ), this ); //, "m_openYABAction" ); - //QObject::connect(m_openYABAction, SIGNAL( triggered(bool) ), this, SLOT( slotOpenYAB() ) ); + //TQObject::connect(m_openYABAction, TQT_SIGNAL( triggered(bool) ), this, TQT_SLOT( slotOpenYAB() ) ); //m_editOwnYABEntry = new KAction( KIcon("document-properties"), i18n( "&Edit my contact details..."), this ); //, "m_editOwnYABEntry" ); - //QObject::connect(m_editOwnYABEntry, SIGNAL( triggered(bool) ), this, SLOT( slotEditOwnYABEntry() ) ); + //TQObject::connect(m_editOwnYABEntry, TQT_SIGNAL( triggered(bool) ), this, TQT_SLOT( slotEditOwnYABEntry() ) ); //m_joinChatAction = new KAction( KIcon("im-chat-room-join"), i18n( "&Join chat room..."), this ); //, "m_joinChatAction" ); - //QObject::connect(m_joinChatAction, SIGNAL( triggered(bool) ), this, SLOT( slotJoinChatRoom() ) ); + //TQObject::connect(m_joinChatAction, TQT_SIGNAL( triggered(bool) ), this, TQT_SLOT( slotJoinChatRoom() ) ); - m_openInboxAction = new KAction( i18n( "Open Inbo&x..." ), "mail_generic", 0, this, SLOT( slotOpenInbox() ), this, "m_openInboxAction" ); - m_openYABAction = new KAction( i18n( "Open &Addressbook..." ), "contents", 0, this, SLOT( slotOpenYAB() ), this, "m_openYABAction" ); - m_editOwnYABEntry = new KAction( i18n( "&Edit my contact details..."), "contents", 0, this, SLOT( slotEditOwnYABEntry() ), this, "m_editOwnYABEntry" ); - m_joinChatAction = new KAction( i18n( "&Join chat room..."), "contents", 0, this, SLOT( slotJoinChatRoom() ), this, "m_joinChatAction"); + m_openInboxAction = new KAction( i18n( "Open Inbo&x..." ), "mail_generic", 0, this, TQT_SLOT( slotOpenInbox() ), this, "m_openInboxAction" ); + m_openYABAction = new KAction( i18n( "Open &Addressbook..." ), "contents", 0, this, TQT_SLOT( slotOpenYAB() ), this, "m_openYABAction" ); + m_editOwnYABEntry = new KAction( i18n( "&Edit my contact details..."), "contents", 0, this, TQT_SLOT( slotEditOwnYABEntry() ), this, "m_editOwnYABEntry" ); + m_joinChatAction = new KAction( i18n( "&Join chat room..."), "contents", 0, this, TQT_SLOT( slotJoinChatRoom() ), this, "m_joinChatAction"); YahooContact* _myself=new YahooContact( this, accountId.lower(), accountId, Kopete::ContactList::self()->myself() ); setMyself( _myself ); @@ -109,7 +109,7 @@ YahooAccount::YahooAccount(YahooProtocol *parent, const QString& accountId, cons // initConnectionSignals( MakeConnections ); - QString displayName = configGroup()->readEntry(QString::fromLatin1("displayName"), QString()); + TQString displayName = configGroup()->readEntry(TQString::fromLatin1("displayName"), TQString()); if(!displayName.isEmpty()) _myself->setNickName(displayName); @@ -128,17 +128,17 @@ YahooAccount::~YahooAccount() m_webcam->stopTransmission(); } -void YahooAccount::setServer( const QString &server ) +void YahooAccount::setServer( const TQString &server ) { - configGroup()->writeEntry( QString::fromLatin1( "Server" ), server ); + configGroup()->writeEntry( TQString::fromLatin1( "Server" ), server ); } void YahooAccount::setPort( int port ) { - configGroup()->writeEntry( QString::fromLatin1( "Port" ), port ); + configGroup()->writeEntry( TQString::fromLatin1( "Port" ), port ); } -void YahooAccount::slotGoStatus( int status, const QString &awayMessage) +void YahooAccount::slotGoStatus( int status, const TQString &awayMessage) { kdDebug(YAHOO_GEN_DEBUG) << "GoStatus: " << status << " msg: " << awayMessage << endl; if( !isConnected() ) @@ -162,9 +162,9 @@ Client *YahooAccount::yahooSession() return m_session ? m_session : 0L; } -QString YahooAccount::stripMsgColorCodes(const QString& msg) +TQString YahooAccount::stripMsgColorCodes(const TQString& msg) { - QString filteredMsg = msg; + TQString filteredMsg = msg; //Handle bold, underline and italic messages filteredMsg.replace( "\033[1m", "" ); @@ -183,12 +183,12 @@ QString YahooAccount::stripMsgColorCodes(const QString& msg) filteredMsg.remove( "\033[xlm" ); //Remove color codes and other residual formatting - filteredMsg.remove( QRegExp("\033\\[[^m]*m") ); + filteredMsg.remove( TQRegExp("\033\\[[^m]*m") ); return filteredMsg; } -QColor YahooAccount::getMsgColor(const QString& msg) +TQColor YahooAccount::getMsgColor(const TQString& msg) { /* Yahoo sends a message either with color or without color * so we have to use this really hacky method to get colors @@ -209,13 +209,13 @@ QColor YahooAccount::getMsgColor(const QString& msg) if ( msg.find("\033[32m") != -1 ) return Qt::cyan; if ( msg.find("\033[37m") != -1 ) - return QColor("#FFAA39"); + return TQColor("#FFAA39"); if ( msg.find("\033[35m") != -1 ) - return QColor("#FFD8D8"); + return TQColor("#FFD8D8"); if ( msg.find("\033[#") != -1 ) { kdDebug(YAHOO_GEN_DEBUG) << "Custom color is " << msg.mid(msg.find("\033[#")+2,7) << endl; - return QColor(msg.mid(msg.find("\033[#")+2,7)); + return TQColor(msg.mid(msg.find("\033[#")+2,7)); } //return a default value just in case @@ -229,294 +229,294 @@ void YahooAccount::initConnectionSignals( enum SignalConnectionType sct ) if ( sct == MakeConnections ) { - QObject::connect(m_session, SIGNAL(loggedIn( int, const QString &)), - this, SLOT(slotLoginResponse(int, const QString &)) ); + TQObject::connect(m_session, TQT_SIGNAL(loggedIn( int, const TQString &)), + this, TQT_SLOT(slotLoginResponse(int, const TQString &)) ); - QObject::connect(m_session, SIGNAL(disconnected()), - this, SLOT(slotDisconnected()) ); + TQObject::connect(m_session, TQT_SIGNAL(disconnected()), + this, TQT_SLOT(slotDisconnected()) ); - QObject::connect(m_session, SIGNAL(loginFailed()), - this, SLOT(slotLoginFailed()) ); + TQObject::connect(m_session, TQT_SIGNAL(loginFailed()), + this, TQT_SLOT(slotLoginFailed()) ); - QObject::connect(m_session, SIGNAL(error(int)), - this, SLOT(slotError(int))); + TQObject::connect(m_session, TQT_SIGNAL(error(int)), + this, TQT_SLOT(slotError(int))); - QObject::connect(m_session, SIGNAL(gotBuddy(const QString &, const QString &, const QString &)), - this, SLOT(slotGotBuddy(const QString &, const QString &, const QString &))); + TQObject::connect(m_session, TQT_SIGNAL(gotBuddy(const TQString &, const TQString &, const TQString &)), + this, TQT_SLOT(slotGotBuddy(const TQString &, const TQString &, const TQString &))); - QObject::connect(m_session, SIGNAL(buddyAddResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyAddResult(const QString &, const QString &, bool))); + TQObject::connect(m_session, TQT_SIGNAL(buddyAddResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyAddResult(const TQString &, const TQString &, bool))); - QObject::connect(m_session, SIGNAL(buddyRemoveResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyRemoveResult(const QString &, const QString &, bool))); + TQObject::connect(m_session, TQT_SIGNAL(buddyRemoveResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyRemoveResult(const TQString &, const TQString &, bool))); - QObject::connect(m_session, SIGNAL(buddyChangeGroupResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyChangeGroupResult(const QString &, const QString &, bool))); + TQObject::connect(m_session, TQT_SIGNAL(buddyChangeGroupResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyChangeGroupResult(const TQString &, const TQString &, bool))); - QObject::connect(m_session, SIGNAL(authorizationAccepted( const QString & )), - this, SLOT(slotAuthorizationAccepted( const QString & )) ); + TQObject::connect(m_session, TQT_SIGNAL(authorizationAccepted( const TQString & )), + this, TQT_SLOT(slotAuthorizationAccepted( const TQString & )) ); - QObject::connect(m_session, SIGNAL(authorizationRejected( const QString &, const QString & )), - this, SLOT(slotAuthorizationRejected( const QString &, const QString & )) ); + TQObject::connect(m_session, TQT_SIGNAL(authorizationRejected( const TQString &, const TQString & )), + this, TQT_SLOT(slotAuthorizationRejected( const TQString &, const TQString & )) ); - QObject::connect(m_session, SIGNAL(gotAuthorizationRequest( const QString &, const QString &, const QString & )), - this, SLOT(slotgotAuthorizationRequest( const QString &, const QString &, const QString & )) ); + TQObject::connect(m_session, TQT_SIGNAL(gotAuthorizationRequest( const TQString &, const TQString &, const TQString & )), + this, TQT_SLOT(slotgotAuthorizationRequest( const TQString &, const TQString &, const TQString & )) ); - QObject::connect(m_session, SIGNAL(statusChanged(const QString&,int,const QString&,int,int,int)), - this, SLOT(slotStatusChanged(const QString&,int,const QString&,int,int,int))); + TQObject::connect(m_session, TQT_SIGNAL(statusChanged(const TQString&,int,const TQString&,int,int,int)), + this, TQT_SLOT(slotStatusChanged(const TQString&,int,const TQString&,int,int,int))); - QObject::connect(m_session, SIGNAL(stealthStatusChanged(const QString &, Yahoo::StealthStatus)), - this, SLOT(slotStealthStatusChanged( const QString &, Yahoo::StealthStatus)) ); + TQObject::connect(m_session, TQT_SIGNAL(stealthStatusChanged(const TQString &, Yahoo::StealthStatus)), + this, TQT_SLOT(slotStealthStatusChanged( const TQString &, Yahoo::StealthStatus)) ); - QObject::connect(m_session, SIGNAL(gotIm(const QString&, const QString&, long, int)), - this, SLOT(slotGotIm(const QString &, const QString&, long, int))); + TQObject::connect(m_session, TQT_SIGNAL(gotIm(const TQString&, const TQString&, long, int)), + this, TQT_SLOT(slotGotIm(const TQString &, const TQString&, long, int))); - QObject::connect(m_session, SIGNAL(gotBuzz(const QString&, long)), - this, SLOT(slotGotBuzz(const QString &, long))); + TQObject::connect(m_session, TQT_SIGNAL(gotBuzz(const TQString&, long)), + this, TQT_SLOT(slotGotBuzz(const TQString &, long))); - QObject::connect(m_session, SIGNAL( gotConferenceInvite( const QString&, const QString&, - const QString&, const QStringList&) ), + TQObject::connect(m_session, TQT_SIGNAL( gotConferenceInvite( const TQString&, const TQString&, + const TQString&, const TQStringList&) ), this, - SLOT( slotGotConfInvite( const QString&, const QString&, - const QString&, const QStringList& ) ) ); + TQT_SLOT( slotGotConfInvite( const TQString&, const TQString&, + const TQString&, const TQStringList& ) ) ); - QObject::connect(m_session, SIGNAL(confUserDeclined(const QString&, const QString &, const QString &)), + TQObject::connect(m_session, TQT_SIGNAL(confUserDeclined(const TQString&, const TQString &, const TQString &)), this, - SLOT(slotConfUserDecline( const QString &, const QString &, const QString &)) ); + TQT_SLOT(slotConfUserDecline( const TQString &, const TQString &, const TQString &)) ); - QObject::connect(m_session , SIGNAL(confUserJoined( const QString &, const QString &)), this, - SLOT(slotConfUserJoin( const QString &, const QString &)) ); + TQObject::connect(m_session , TQT_SIGNAL(confUserJoined( const TQString &, const TQString &)), this, + TQT_SLOT(slotConfUserJoin( const TQString &, const TQString &)) ); - QObject::connect(m_session , SIGNAL(confUserLeft( const QString &, const QString &)), this, - SLOT(slotConfUserLeave( const QString &, const QString &)) ); + TQObject::connect(m_session , TQT_SIGNAL(confUserLeft( const TQString &, const TQString &)), this, + TQT_SLOT(slotConfUserLeave( const TQString &, const TQString &)) ); - QObject::connect(m_session , SIGNAL(gotConferenceMessage( const QString &, const QString &, const QString &)), this, - SLOT(slotConfMessage( const QString &, const QString &, const QString &)) ); + TQObject::connect(m_session , TQT_SIGNAL(gotConferenceMessage( const TQString &, const TQString &, const TQString &)), this, + TQT_SLOT(slotConfMessage( const TQString &, const TQString &, const TQString &)) ); - QObject::connect(m_session, - SIGNAL(incomingFileTransfer(const QString &, const QString &, long, const QString &, const QString &, unsigned long, const QPixmap &)), + TQObject::connect(m_session, + TQT_SIGNAL(incomingFileTransfer(const TQString &, const TQString &, long, const TQString &, const TQString &, unsigned long, const TQPixmap &)), this, - SLOT(slotGotFile(const QString&, const QString&, long, const QString&, const QString&, unsigned long, const QPixmap &))); + TQT_SLOT(slotGotFile(const TQString&, const TQString&, long, const TQString&, const TQString&, unsigned long, const TQPixmap &))); - QObject::connect(m_session, SIGNAL(fileTransferComplete(unsigned int)), this, - SLOT(slotFileTransferComplete(unsigned int)) ); + TQObject::connect(m_session, TQT_SIGNAL(fileTransferComplete(unsigned int)), this, + TQT_SLOT(slotFileTransferComplete(unsigned int)) ); - QObject::connect(m_session, SIGNAL(fileTransferBytesProcessed(unsigned int,unsigned int)), this, - SLOT(slotFileTransferBytesProcessed(unsigned int,unsigned int)) ); + TQObject::connect(m_session, TQT_SIGNAL(fileTransferBytesProcessed(unsigned int,unsigned int)), this, + TQT_SLOT(slotFileTransferBytesProcessed(unsigned int,unsigned int)) ); - QObject::connect(m_session, SIGNAL(fileTransferError(unsigned int,int,const QString &)), this, - SLOT(slotFileTransferError(unsigned int,int,const QString &)) ); + TQObject::connect(m_session, TQT_SIGNAL(fileTransferError(unsigned int,int,const TQString &)), this, + TQT_SLOT(slotFileTransferError(unsigned int,int,const TQString &)) ); - QObject::connect(m_session, SIGNAL(typingNotify(const QString &, int)), this , - SLOT(slotTypingNotify(const QString &, int))); + TQObject::connect(m_session, TQT_SIGNAL(typingNotify(const TQString &, int)), this , + TQT_SLOT(slotTypingNotify(const TQString &, int))); -// QObject::connect(m_session, SIGNAL(gameNotify(const QString &, int)), this, -// SLOT(slotGameNotify( const QString &, int))); +// TQObject::connect(m_session, TQT_SIGNAL(gameNotify(const TQString &, int)), this, +// TQT_SLOT(slotGameNotify( const TQString &, int))); - QObject::connect(m_session, SIGNAL(mailNotify(const QString&, const QString&, int)), this, - SLOT(slotMailNotify(const QString &, const QString&, int))); + TQObject::connect(m_session, TQT_SIGNAL(mailNotify(const TQString&, const TQString&, int)), this, + TQT_SLOT(slotMailNotify(const TQString &, const TQString&, int))); - QObject::connect(m_session, SIGNAL(systemMessage(const QString&)), this, - SLOT(slotSystemMessage(const QString &))); + TQObject::connect(m_session, TQT_SIGNAL(systemMessage(const TQString&)), this, + TQT_SLOT(slotSystemMessage(const TQString &))); -// QObject::connect(m_session, SIGNAL(gotIdentities(const QStringList &)), this, -// SLOT(slotGotIdentities( const QStringList&))); +// TQObject::connect(m_session, TQT_SIGNAL(gotIdentities(const TQStringList &)), this, +// TQT_SLOT(slotGotIdentities( const TQStringList&))); - QObject::connect(m_session, SIGNAL(gotWebcamInvite(const QString&)), this, SLOT(slotGotWebcamInvite(const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(gotWebcamInvite(const TQString&)), this, TQT_SLOT(slotGotWebcamInvite(const TQString&))); - QObject::connect(m_session, SIGNAL(webcamNotAvailable(const QString&)), this, SLOT(slotWebcamNotAvailable(const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(webcamNotAvailable(const TQString&)), this, TQT_SLOT(slotWebcamNotAvailable(const TQString&))); - QObject::connect(m_session, SIGNAL(webcamImageReceived(const QString&, const QPixmap& )), this, SLOT(slotGotWebcamImage(const QString&, const QPixmap& ))); + TQObject::connect(m_session, TQT_SIGNAL(webcamImageReceived(const TQString&, const TQPixmap& )), this, TQT_SLOT(slotGotWebcamImage(const TQString&, const TQPixmap& ))); - QObject::connect(m_session, SIGNAL(webcamClosed(const QString&, int )), this, SLOT(slotWebcamClosed(const QString&, int ))); + TQObject::connect(m_session, TQT_SIGNAL(webcamClosed(const TQString&, int )), this, TQT_SLOT(slotWebcamClosed(const TQString&, int ))); - QObject::connect(m_session, SIGNAL(webcamPaused(const QString&)), this, SLOT(slotWebcamPaused(const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(webcamPaused(const TQString&)), this, TQT_SLOT(slotWebcamPaused(const TQString&))); - QObject::connect(m_session, SIGNAL(webcamReadyForTransmission()), this, SLOT(slotWebcamReadyForTransmission())); + TQObject::connect(m_session, TQT_SIGNAL(webcamReadyForTransmission()), this, TQT_SLOT(slotWebcamReadyForTransmission())); - QObject::connect(m_session, SIGNAL(webcamStopTransmission()), this, SLOT(slotWebcamStopTransmission())); + TQObject::connect(m_session, TQT_SIGNAL(webcamStopTransmission()), this, TQT_SLOT(slotWebcamStopTransmission())); - QObject::connect(m_session, SIGNAL(webcamViewerJoined(const QString&)), this, SLOT(slotWebcamViewerJoined(const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(webcamViewerJoined(const TQString&)), this, TQT_SLOT(slotWebcamViewerJoined(const TQString&))); - QObject::connect(m_session, SIGNAL(webcamViewerLeft(const QString&)), this, SLOT(slotWebcamViewerLeft(const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(webcamViewerLeft(const TQString&)), this, TQT_SLOT(slotWebcamViewerLeft(const TQString&))); - QObject::connect(m_session, SIGNAL(webcamViewerRequest(const QString&)), this, SLOT(slotWebcamViewerRequest( const QString&))); + TQObject::connect(m_session, TQT_SIGNAL(webcamViewerRequest(const TQString&)), this, TQT_SLOT(slotWebcamViewerRequest( const TQString&))); - QObject::connect(m_session, SIGNAL(pictureStatusNotify( const QString&, int )), SLOT(slotPictureStatusNotify( const QString&, int))); + TQObject::connect(m_session, TQT_SIGNAL(pictureStatusNotify( const TQString&, int )), TQT_SLOT(slotPictureStatusNotify( const TQString&, int))); - QObject::connect(m_session, SIGNAL(pictureDownloaded(const QString&, const QByteArray &, int)), this, SLOT(slotGotBuddyIcon(const QString&, const QByteArray &, int)) ); + TQObject::connect(m_session, TQT_SIGNAL(pictureDownloaded(const TQString&, const TQByteArray &, int)), this, TQT_SLOT(slotGotBuddyIcon(const TQString&, const TQByteArray &, int)) ); - QObject::connect(m_session, SIGNAL(pictureInfoNotify(const QString&, KURL, int)), this, SLOT(slotGotBuddyIconInfo(const QString&, KURL, int ))); + TQObject::connect(m_session, TQT_SIGNAL(pictureInfoNotify(const TQString&, KURL, int)), this, TQT_SLOT(slotGotBuddyIconInfo(const TQString&, KURL, int ))); - QObject::connect(m_session, SIGNAL(pictureChecksumNotify(const QString&, int)), this, SLOT(slotGotBuddyIconChecksum(const QString&, int ))); + TQObject::connect(m_session, TQT_SIGNAL(pictureChecksumNotify(const TQString&, int)), this, TQT_SLOT(slotGotBuddyIconChecksum(const TQString&, int ))); - QObject::connect(m_session, SIGNAL(pictureRequest(const QString&)), this, SLOT(slotGotBuddyIconRequest(const QString&)) ); + TQObject::connect(m_session, TQT_SIGNAL(pictureRequest(const TQString&)), this, TQT_SLOT(slotGotBuddyIconRequest(const TQString&)) ); - QObject::connect(m_session, SIGNAL(pictureUploaded( const QString &, int)), this, SLOT(slotBuddyIconChanged(const QString&, int))); + TQObject::connect(m_session, TQT_SIGNAL(pictureUploaded( const TQString &, int)), this, TQT_SLOT(slotBuddyIconChanged(const TQString&, int))); - QObject::connect(m_session, SIGNAL(gotYABEntry( YABEntry * )), this, SLOT(slotGotYABEntry( YABEntry * ))); + TQObject::connect(m_session, TQT_SIGNAL(gotYABEntry( YABEntry * )), this, TQT_SLOT(slotGotYABEntry( YABEntry * ))); - QObject::connect(m_session, SIGNAL(modifyYABEntryError( YABEntry *, const QString & )), this, SLOT(slotModifyYABEntryError( YABEntry *, const QString & ))); + TQObject::connect(m_session, TQT_SIGNAL(modifyYABEntryError( YABEntry *, const TQString & )), this, TQT_SLOT(slotModifyYABEntryError( YABEntry *, const TQString & ))); - QObject::connect(m_session, SIGNAL(gotYABRevision( long, bool )), this, SLOT(slotGotYABRevision( long , bool )) ); + TQObject::connect(m_session, TQT_SIGNAL(gotYABRevision( long, bool )), this, TQT_SLOT(slotGotYABRevision( long , bool )) ); - QObject::connect(m_session, SIGNAL(chatRoomJoined(int,int,QString,QString)), this, SLOT(slotChatJoined(int,int,QString,QString))); + TQObject::connect(m_session, TQT_SIGNAL(chatRoomJoined(int,int,TQString,TQString)), this, TQT_SLOT(slotChatJoined(int,int,TQString,TQString))); - QObject::connect(m_session, SIGNAL(chatBuddyHasJoined(QString,QString,bool)), this, SLOT(slotChatBuddyHasJoined(QString,QString,bool))); + TQObject::connect(m_session, TQT_SIGNAL(chatBuddyHasJoined(TQString,TQString,bool)), this, TQT_SLOT(slotChatBuddyHasJoined(TQString,TQString,bool))); - QObject::connect(m_session, SIGNAL(chatBuddyHasLeft(QString,QString)), this, SLOT(slotChatBuddyHasLeft(QString,QString))); + TQObject::connect(m_session, TQT_SIGNAL(chatBuddyHasLeft(TQString,TQString)), this, TQT_SLOT(slotChatBuddyHasLeft(TQString,TQString))); - QObject::connect(m_session, SIGNAL(chatMessageReceived(QString,QString,QString)), this, SLOT(slotChatMessageReceived(QString,QString,QString))); + TQObject::connect(m_session, TQT_SIGNAL(chatMessageReceived(TQString,TQString,TQString)), this, TQT_SLOT(slotChatMessageReceived(TQString,TQString,TQString))); } if ( sct == DeleteConnections ) { - QObject::disconnect(m_session, SIGNAL(loggedIn(int, const QString &)), - this, SLOT(slotLoginResponse(int, const QString &)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(loggedIn(int, const TQString &)), + this, TQT_SLOT(slotLoginResponse(int, const TQString &)) ); - QObject::disconnect(m_session, SIGNAL(disconnected()), - this, SLOT(slotDisconnected()) ); + TQObject::disconnect(m_session, TQT_SIGNAL(disconnected()), + this, TQT_SLOT(slotDisconnected()) ); - QObject::disconnect(m_session, SIGNAL(loginFailed()), - this, SLOT(slotLoginFailed()) ); + TQObject::disconnect(m_session, TQT_SIGNAL(loginFailed()), + this, TQT_SLOT(slotLoginFailed()) ); - QObject::disconnect(m_session, SIGNAL(error(int)), - this, SLOT(slotError(int))); + TQObject::disconnect(m_session, TQT_SIGNAL(error(int)), + this, TQT_SLOT(slotError(int))); - QObject::disconnect(m_session, SIGNAL(gotBuddy(const QString &, const QString &, const QString &)), - this, SLOT(slotGotBuddy(const QString &, const QString &, const QString &))); + TQObject::disconnect(m_session, TQT_SIGNAL(gotBuddy(const TQString &, const TQString &, const TQString &)), + this, TQT_SLOT(slotGotBuddy(const TQString &, const TQString &, const TQString &))); - QObject::disconnect(m_session, SIGNAL(buddyAddResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyAddResult(const QString &, const QString &, bool))); + TQObject::disconnect(m_session, TQT_SIGNAL(buddyAddResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyAddResult(const TQString &, const TQString &, bool))); - QObject::disconnect(m_session, SIGNAL(buddyRemoveResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyRemoveResult(const QString &, const QString &, bool))); + TQObject::disconnect(m_session, TQT_SIGNAL(buddyRemoveResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyRemoveResult(const TQString &, const TQString &, bool))); - QObject::disconnect(m_session, SIGNAL(buddyChangeGroupResult(const QString &, const QString &, bool)), - this, SLOT(slotBuddyChangeGroupResult(const QString &, const QString &, bool))); + TQObject::disconnect(m_session, TQT_SIGNAL(buddyChangeGroupResult(const TQString &, const TQString &, bool)), + this, TQT_SLOT(slotBuddyChangeGroupResult(const TQString &, const TQString &, bool))); - QObject::disconnect(m_session, SIGNAL(authorizationAccepted( const QString &)), - this, SLOT(slotAuthorizationAccepted( const QString &)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(authorizationAccepted( const TQString &)), + this, TQT_SLOT(slotAuthorizationAccepted( const TQString &)) ); - QObject::disconnect(m_session, SIGNAL(authorizationRejected( const QString &, const QString &)), - this, SLOT(slotAuthorizationRejected( const QString &, const QString & )) ); + TQObject::disconnect(m_session, TQT_SIGNAL(authorizationRejected( const TQString &, const TQString &)), + this, TQT_SLOT(slotAuthorizationRejected( const TQString &, const TQString & )) ); - QObject::disconnect(m_session, SIGNAL(gotAuthorizationRequest( const QString &, const QString &, const QString & )), - this, SLOT(slotgotAuthorizationRequest( const QString &, const QString &, const QString & )) ); + TQObject::disconnect(m_session, TQT_SIGNAL(gotAuthorizationRequest( const TQString &, const TQString &, const TQString & )), + this, TQT_SLOT(slotgotAuthorizationRequest( const TQString &, const TQString &, const TQString & )) ); - QObject::disconnect(m_session, SIGNAL(statusChanged(const QString&,int,const QString&,int,int,int)), - this, SLOT(slotStatusChanged(const QString&,int,const QString&,int,int,int))); + TQObject::disconnect(m_session, TQT_SIGNAL(statusChanged(const TQString&,int,const TQString&,int,int,int)), + this, TQT_SLOT(slotStatusChanged(const TQString&,int,const TQString&,int,int,int))); - QObject::disconnect(m_session, SIGNAL(stealthStatusChanged(const QString &, Yahoo::StealthStatus)), - this, SLOT(slotStealthStatusChanged( const QString &, Yahoo::StealthStatus)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(stealthStatusChanged(const TQString &, Yahoo::StealthStatus)), + this, TQT_SLOT(slotStealthStatusChanged( const TQString &, Yahoo::StealthStatus)) ); - QObject::disconnect(m_session, SIGNAL(gotIm(const QString&, const QString&, long, int)), - this, SLOT(slotGotIm(const QString &, const QString&, long, int))); + TQObject::disconnect(m_session, TQT_SIGNAL(gotIm(const TQString&, const TQString&, long, int)), + this, TQT_SLOT(slotGotIm(const TQString &, const TQString&, long, int))); - QObject::disconnect(m_session, SIGNAL(gotBuzz(const QString&, long)), - this, SLOT(slotGotBuzz(const QString &, long))); + TQObject::disconnect(m_session, TQT_SIGNAL(gotBuzz(const TQString&, long)), + this, TQT_SLOT(slotGotBuzz(const TQString &, long))); - QObject::disconnect(m_session, - SIGNAL( gotConferenceInvite( const QString&, const QString&, - const QString&, const QStringList&) ), + TQObject::disconnect(m_session, + TQT_SIGNAL( gotConferenceInvite( const TQString&, const TQString&, + const TQString&, const TQStringList&) ), this, - SLOT( slotGotConfInvite( const QString&, const QString&, - const QString&, const QStringList&) ) ); + TQT_SLOT( slotGotConfInvite( const TQString&, const TQString&, + const TQString&, const TQStringList&) ) ); - QObject::disconnect(m_session, - SIGNAL(confUserDeclined(const QString&, const QString &, const QString &)), + TQObject::disconnect(m_session, + TQT_SIGNAL(confUserDeclined(const TQString&, const TQString &, const TQString &)), this, - SLOT(slotConfUserDecline( const QString &, const QString &, const QString& ) ) ); + TQT_SLOT(slotConfUserDecline( const TQString &, const TQString &, const TQString& ) ) ); - QObject::disconnect(m_session , SIGNAL(confUserJoined( const QString &, const QString &)), - this, SLOT(slotConfUserJoin( const QString &, const QString &)) ); + TQObject::disconnect(m_session , TQT_SIGNAL(confUserJoined( const TQString &, const TQString &)), + this, TQT_SLOT(slotConfUserJoin( const TQString &, const TQString &)) ); - QObject::disconnect(m_session , SIGNAL(confUserLeft( const QString &, const QString &)), - this, SLOT(slotConfUserLeave( const QString &, const QString &)) ); + TQObject::disconnect(m_session , TQT_SIGNAL(confUserLeft( const TQString &, const TQString &)), + this, TQT_SLOT(slotConfUserLeave( const TQString &, const TQString &)) ); - QObject::disconnect(m_session , SIGNAL(gotConferenceMessage( const QString &, const QString &, const QString &)), this, - SLOT(slotConfMessage( const QString &, const QString &, const QString &)) ); + TQObject::disconnect(m_session , TQT_SIGNAL(gotConferenceMessage( const TQString &, const TQString &, const TQString &)), this, + TQT_SLOT(slotConfMessage( const TQString &, const TQString &, const TQString &)) ); - QObject::disconnect(m_session, - SIGNAL(incomingFileTransfer(const QString &, const QString &, - long, const QString &, const QString &, unsigned long, const QPixmap &)), + TQObject::disconnect(m_session, + TQT_SIGNAL(incomingFileTransfer(const TQString &, const TQString &, + long, const TQString &, const TQString &, unsigned long, const TQPixmap &)), this, - SLOT(slotGotFile(const QString&, const QString&, - long, const QString&, const QString&, unsigned long, const QPixmap &))); + TQT_SLOT(slotGotFile(const TQString&, const TQString&, + long, const TQString&, const TQString&, unsigned long, const TQPixmap &))); - QObject::disconnect(m_session, SIGNAL(fileTransferComplete(unsigned int)), this, - SLOT(slotFileTransferComplete(unsigned int)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(fileTransferComplete(unsigned int)), this, + TQT_SLOT(slotFileTransferComplete(unsigned int)) ); - QObject::disconnect(m_session, SIGNAL(fileTransferBytesProcessed(unsigned int,unsigned int)), this, - SLOT(slotFileTransferBytesProcessed(unsigned int,unsigned int)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(fileTransferBytesProcessed(unsigned int,unsigned int)), this, + TQT_SLOT(slotFileTransferBytesProcessed(unsigned int,unsigned int)) ); - QObject::disconnect(m_session, SIGNAL(fileTransferError(unsigned int,int,const QString &)), this, - SLOT(slotFileTransferError(unsigned int,int,const QString &)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(fileTransferError(unsigned int,int,const TQString &)), this, + TQT_SLOT(slotFileTransferError(unsigned int,int,const TQString &)) ); - QObject::disconnect(m_session, SIGNAL(typingNotify(const QString &, int)), this , - SLOT(slotTypingNotify(const QString &, int))); + TQObject::disconnect(m_session, TQT_SIGNAL(typingNotify(const TQString &, int)), this , + TQT_SLOT(slotTypingNotify(const TQString &, int))); -// QObject::disconnect(m_session, SIGNAL(gameNotify(const QString &, int)), this, -// SLOT(slotGameNotify( const QString &, int))); +// TQObject::disconnect(m_session, TQT_SIGNAL(gameNotify(const TQString &, int)), this, +// TQT_SLOT(slotGameNotify( const TQString &, int))); - QObject::disconnect(m_session, SIGNAL(mailNotify(const QString&, const QString&, int)), this, - SLOT(slotMailNotify(const QString &, const QString&, int))); + TQObject::disconnect(m_session, TQT_SIGNAL(mailNotify(const TQString&, const TQString&, int)), this, + TQT_SLOT(slotMailNotify(const TQString &, const TQString&, int))); - QObject::disconnect(m_session, SIGNAL(systemMessage(const QString&)), this, - SLOT(slotSystemMessage(const QString &))); + TQObject::disconnect(m_session, TQT_SIGNAL(systemMessage(const TQString&)), this, + TQT_SLOT(slotSystemMessage(const TQString &))); -// QObject::disconnect(m_session, SIGNAL(gotIdentities(const QStringList &)), this, -// SLOT(slotGotIdentities( const QStringList&))); +// TQObject::disconnect(m_session, TQT_SIGNAL(gotIdentities(const TQStringList &)), this, +// TQT_SLOT(slotGotIdentities( const TQStringList&))); - QObject::disconnect(m_session, SIGNAL(gotWebcamInvite(const QString&)), this, SLOT(slotGotWebcamInvite(const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(gotWebcamInvite(const TQString&)), this, TQT_SLOT(slotGotWebcamInvite(const TQString&))); - QObject::disconnect(m_session, SIGNAL(webcamNotAvailable(const QString&)), this, SLOT(slotWebcamNotAvailable(const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamNotAvailable(const TQString&)), this, TQT_SLOT(slotWebcamNotAvailable(const TQString&))); - QObject::disconnect(m_session, SIGNAL(webcamImageReceived(const QString&, const QPixmap& )), this, SLOT(slotGotWebcamImage(const QString&, const QPixmap& ))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamImageReceived(const TQString&, const TQPixmap& )), this, TQT_SLOT(slotGotWebcamImage(const TQString&, const TQPixmap& ))); - QObject::disconnect(m_session, SIGNAL(webcamClosed(const QString&, int )), this, SLOT(slotWebcamClosed(const QString&, int ))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamClosed(const TQString&, int )), this, TQT_SLOT(slotWebcamClosed(const TQString&, int ))); - QObject::disconnect(m_session, SIGNAL(webcamPaused(const QString&)), this, SLOT(slotWebcamPaused(const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamPaused(const TQString&)), this, TQT_SLOT(slotWebcamPaused(const TQString&))); - QObject::disconnect(m_session, SIGNAL(webcamReadyForTransmission()), this, SLOT(slotWebcamReadyForTransmission())); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamReadyForTransmission()), this, TQT_SLOT(slotWebcamReadyForTransmission())); - QObject::disconnect(m_session, SIGNAL(webcamStopTransmission()), this, SLOT(slotWebcamStopTransmission())); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamStopTransmission()), this, TQT_SLOT(slotWebcamStopTransmission())); - QObject::disconnect(m_session, SIGNAL(webcamViewerJoined(const QString&)), this, SLOT(slotWebcamViewerJoined(const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamViewerJoined(const TQString&)), this, TQT_SLOT(slotWebcamViewerJoined(const TQString&))); - QObject::disconnect(m_session, SIGNAL(webcamViewerLeft(const QString&)), this, SLOT(slotWebcamViewerLeft(const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamViewerLeft(const TQString&)), this, TQT_SLOT(slotWebcamViewerLeft(const TQString&))); - QObject::disconnect(m_session, SIGNAL(webcamViewerRequest(const QString&)), this, SLOT(slotWebcamViewerRequest( const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(webcamViewerRequest(const TQString&)), this, TQT_SLOT(slotWebcamViewerRequest( const TQString&))); - QObject::disconnect(m_session, SIGNAL(pictureDownloaded(const QString&, const QByteArray &, int )), this, SLOT(slotGotBuddyIcon(const QString&, const QByteArray &,int ))); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureDownloaded(const TQString&, const TQByteArray &, int )), this, TQT_SLOT(slotGotBuddyIcon(const TQString&, const TQByteArray &,int ))); - QObject::disconnect(m_session, SIGNAL(pictureInfoNotify(const QString&, KURL, int)), this, SLOT(slotGotBuddyIconInfo(const QString&, KURL, int ))); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureInfoNotify(const TQString&, KURL, int)), this, TQT_SLOT(slotGotBuddyIconInfo(const TQString&, KURL, int ))); - QObject::disconnect(m_session, SIGNAL(pictureRequest(const QString&)), this, SLOT(slotGotBuddyIconRequest(const QString&)) ); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureRequest(const TQString&)), this, TQT_SLOT(slotGotBuddyIconRequest(const TQString&)) ); - QObject::disconnect(m_session, SIGNAL(pictureUploaded( const QString &, int )), this, SLOT(slotBuddyIconChanged(const QString&, int))); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureUploaded( const TQString &, int )), this, TQT_SLOT(slotBuddyIconChanged(const TQString&, int))); - QObject::disconnect(m_session, SIGNAL(pictureStatusNotify( const QString&, int )), this, SLOT(slotPictureStatusNotify( const QString&, int))); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureStatusNotify( const TQString&, int )), this, TQT_SLOT(slotPictureStatusNotify( const TQString&, int))); - QObject::disconnect(m_session, SIGNAL(pictureChecksumNotify(const QString&, int)), this, SLOT(slotGotBuddyIconChecksum(const QString&, int ))); + TQObject::disconnect(m_session, TQT_SIGNAL(pictureChecksumNotify(const TQString&, int)), this, TQT_SLOT(slotGotBuddyIconChecksum(const TQString&, int ))); - QObject::disconnect(m_session, SIGNAL(gotYABEntry( YABEntry * )), this, SLOT(slotGotYABEntry( YABEntry * ))); + TQObject::disconnect(m_session, TQT_SIGNAL(gotYABEntry( YABEntry * )), this, TQT_SLOT(slotGotYABEntry( YABEntry * ))); - QObject::disconnect(m_session, SIGNAL(modifyYABEntryError( YABEntry *, const QString & )), this, SLOT(slotModifyYABEntryError( YABEntry *, const QString & ))); + TQObject::disconnect(m_session, TQT_SIGNAL(modifyYABEntryError( YABEntry *, const TQString & )), this, TQT_SLOT(slotModifyYABEntryError( YABEntry *, const TQString & ))); - QObject::disconnect(m_session, SIGNAL(gotYABRevision( long, bool )), this, SLOT(slotGotYABRevision( long , bool )) ); + TQObject::disconnect(m_session, TQT_SIGNAL(gotYABRevision( long, bool )), this, TQT_SLOT(slotGotYABRevision( long , bool )) ); - QObject::disconnect(m_session, SIGNAL(chatRoomJoined(int,int,const QString&,const QString&)), this, SLOT(slotChatJoined(int,int,const QString&,const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(chatRoomJoined(int,int,const TQString&,const TQString&)), this, TQT_SLOT(slotChatJoined(int,int,const TQString&,const TQString&))); - QObject::disconnect(m_session, SIGNAL(chatBuddyHasJoined(const QString&,const QString&,bool)), this, SLOT(slotChatBuddyHasJoined(const QString&,const QString&,bool))); + TQObject::disconnect(m_session, TQT_SIGNAL(chatBuddyHasJoined(const TQString&,const TQString&,bool)), this, TQT_SLOT(slotChatBuddyHasJoined(const TQString&,const TQString&,bool))); - QObject::disconnect(m_session, SIGNAL(chatBuddyHasLeft(const QString&,const QString&)), this, SLOT(slotChatBuddyHasLeft(const QString&,const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(chatBuddyHasLeft(const TQString&,const TQString&)), this, TQT_SLOT(slotChatBuddyHasLeft(const TQString&,const TQString&))); - QObject::disconnect(m_session, SIGNAL(chatMessageReceived(const QString&,const QString&,const QString&)), this, SLOT(slotChatMessageReceived(const QString&,const QString&,const QString&))); + TQObject::disconnect(m_session, TQT_SIGNAL(chatMessageReceived(const TQString&,const TQString&,const TQString&)), this, TQT_SLOT(slotChatMessageReceived(const TQString&,const TQString&,const TQString&))); } } -void YahooAccount::connectWithPassword( const QString &passwd ) +void YahooAccount::connectWithPassword( const TQString &passwd ) { kdDebug(YAHOO_GEN_DEBUG) ; if ( isAway() ) @@ -539,7 +539,7 @@ void YahooAccount::connectWithPassword( const QString &passwd ) return; } - QString server = configGroup()->readEntry( "Server", "scsa.msg.yahoo.com" ); + TQString server = configGroup()->readEntry( "Server", "scsa.msg.yahoo.com" ); int port = configGroup()->readNumEntry( "Port", 5050 ); initConnectionSignals( MakeConnections ); @@ -567,10 +567,10 @@ void YahooAccount::disconnect() static_cast( myself() )->setOnlineStatus( m_protocol->Offline ); // FIXME: to check - //QHash::ConstIterator it, itEnd = contacts().constEnd(); + //QHash::ConstIterator it, itEnd = contacts().constEnd(); //for ( it = contacts().constBegin(); it != itEnd; ++it ) // static_cast( it.value() )->setOnlineStatus( m_protocol->Offline ); - for ( QDictIterator i( contacts() ); i.current(); ++i ) + for ( TQDictIterator i( contacts() ); i.current(); ++i ) static_cast( i.current() )->setOnlineStatus( m_protocol->Offline ); static_cast( myself() )->setOnlineStatus( m_protocol->Offline ); @@ -581,10 +581,10 @@ void YahooAccount::disconnect() m_session->cancelConnect(); // FIXME: to check - //QHash::ConstIterator it, itEnd = contacts().constEnd(); + //QHash::ConstIterator it, itEnd = contacts().constEnd(); //for ( it = contacts().constBegin(); it != itEnd; ++it ) // static_cast( it.value() )->setOnlineStatus( m_protocol->Offline ); - for ( QDictIterator i(contacts()); i.current(); ++i ) + for ( TQDictIterator i(contacts()); i.current(); ++i ) static_cast( i.current() )->setOnlineStatus( m_protocol->Offline ); static_cast( myself() )->setOnlineStatus( m_protocol->Offline ); @@ -595,14 +595,14 @@ void YahooAccount::disconnect() theHaveContactList = false; } -void YahooAccount::verifyAccount( const QString &word ) +void YahooAccount::verifyAccount( const TQString &word ) { kdDebug(YAHOO_GEN_DEBUG) << "Word: s" << word << endl; m_session->setVerificationWord( word ); disconnected( BadPassword ); } -void YahooAccount::setAway(bool status, const QString &awayMessage) +void YahooAccount::setAway(bool status, const TQString &awayMessage) { kdDebug(YAHOO_GEN_DEBUG) ; @@ -658,12 +658,12 @@ KActionMenu* YahooAccount::actionMenu() return theActionMenu; } -YahooContact *YahooAccount::contact( const QString &id ) +YahooContact *YahooAccount::contact( const TQString &id ) { return static_cast(contacts()[id]); } -bool YahooAccount::createContact(const QString &contactId, Kopete::MetaContact *parentContact ) +bool YahooAccount::createContact(const TQString &contactId, Kopete::MetaContact *parentContact ) { // kdDebug(YAHOO_GEN_DEBUG) << " contactId: " << contactId; @@ -683,7 +683,7 @@ bool YahooAccount::createContact(const QString &contactId, Kopete::MetaContact * return false; } -bool YahooAccount::createChatContact(const QString &nick) +bool YahooAccount::createChatContact(const TQString &nick) { Kopete::MetaContact *m = new Kopete::MetaContact; m->setTemporary( true ); @@ -692,13 +692,13 @@ bool YahooAccount::createChatContact(const QString &nick) void YahooAccount::sendFile( YahooContact *to, const KURL &url ) { - QFile file( url.path() ); + TQFile file( url.path() ); Kopete::Transfer *transfer = Kopete::TransferManager::transferManager()->addTransfer ( to, url.fileName(), file.size(), to->userId(), Kopete::FileTransferInfo::Outgoing ); - m_session->sendFile( transfer->info().transferId(), to->userId(), QString(), url ); + m_session->sendFile( transfer->info().transferId(), to->userId(), TQString(), url ); - QObject::connect( transfer, SIGNAL(result( KIO::Job * )), this, SLOT(slotFileTransferResult( KIO::Job * )) ); + TQObject::connect( transfer, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(slotFileTransferResult( KIO::Job * )) ); m_fileTransfers.insert( transfer->info().transferId(), transfer ); } @@ -715,10 +715,10 @@ void YahooAccount::setupActions( bool connected ) * * ***************************************************************************/ -void YahooAccount::slotLoginResponse( int succ , const QString &url ) +void YahooAccount::slotLoginResponse( int succ , const TQString &url ) { kdDebug(YAHOO_GEN_DEBUG) << succ << ", " << url << ")]" << endl; - QString errorMsg; + TQString errorMsg; setupActions( succ == Yahoo::LoginOk ); if ( succ == Yahoo::LoginOk || (succ == Yahoo::LoginDupl && m_lastDisconnectCode == 2) ) { @@ -799,7 +799,7 @@ void YahooAccount::slotDisconnected() static_cast( myself() )->setOnlineStatus( m_protocol->Offline ); disconnected( ConnectionReset ); // may reconnect - QString message; + TQString message; message = i18n( "%1 has been disconnected.\nError message:\n%2 - %3" ) .arg( accountId() ).arg( m_session->error() ).arg( m_session->errorString() ); KNotification::event( "connection_lost", message, myself()->onlineStatus().protocolIcon() ); @@ -812,7 +812,7 @@ void YahooAccount::slotLoginFailed() static_cast( myself() )->setOnlineStatus( m_protocol->Offline ); disconnected( Manual ); // don't reconnect - QString message; + TQString message; message = i18n( "There was an error while connecting %1 to the Yahoo server.\nError message:\n%2 - %3" ) .arg( accountId()).arg( m_session->error() ).arg( m_session->errorString() ); KNotification::event( "cannot_connect", message, myself()->onlineStatus().protocolIcon() ); @@ -832,10 +832,10 @@ void YahooAccount::slotError( int level ) .arg( m_session->errorInformation() ).arg( m_session->errorString() ), i18n( "Yahoo Plugin" ) ); } -void YahooAccount::slotGotBuddy( const QString &userid, const QString &alias, const QString &group ) +void YahooAccount::slotGotBuddy( const TQString &userid, const TQString &alias, const TQString &group ) { kdDebug(YAHOO_GEN_DEBUG) ; - IDs[userid] = QPair(group, alias); + IDs[userid] = QPair(group, alias); // Serverside -> local if ( !contact( userid ) ) @@ -849,18 +849,18 @@ void YahooAccount::slotGotBuddy( const QString &userid, const QString &alias, co //kdDebug(YAHOO_GEN_DEBUG) << IDs << endl; } -void YahooAccount::slotBuddyAddResult( const QString &userid, const QString &group, bool success ) +void YahooAccount::slotBuddyAddResult( const TQString &userid, const TQString &group, bool success ) { kdDebug(YAHOO_GEN_DEBUG) << success << endl; if(success) - IDs[userid] = QPair(group, QString()); + IDs[userid] = QPair(group, TQString()); // FIXME (same) //kdDebug(YAHOO_GEN_DEBUG) << IDs << endl; } -void YahooAccount::slotBuddyRemoveResult( const QString &userid, const QString &group, bool success ) +void YahooAccount::slotBuddyRemoveResult( const TQString &userid, const TQString &group, bool success ) { kdDebug(YAHOO_GEN_DEBUG); @@ -873,38 +873,38 @@ void YahooAccount::slotBuddyRemoveResult( const QString &userid, const QString & // kdDebug(YAHOO_GEN_DEBUG) << IDs << endl; } -void YahooAccount::slotBuddyChangeGroupResult(const QString &userid, const QString &group, bool success) +void YahooAccount::slotBuddyChangeGroupResult(const TQString &userid, const TQString &group, bool success) { kdDebug(YAHOO_GEN_DEBUG); if(success) - IDs[userid] = QPair(group, QString()); + IDs[userid] = QPair(group, TQString()); // FIXME //kdDebug(YAHOO_GEN_DEBUG) << IDs << endl; } -void YahooAccount::slotAuthorizationAccepted( const QString &who ) +void YahooAccount::slotAuthorizationAccepted( const TQString &who ) { kdDebug(YAHOO_GEN_DEBUG) ; - QString message; + TQString message; message = i18n( "User %1 has granted your authorization request." ).arg( who ); - KNotification::event( QString::fromLatin1("kopete_authorization"), message ); + KNotification::event( TQString::fromLatin1("kopete_authorization"), message ); if( contact( who ) ) contact( who )->setOnlineStatus( m_protocol->Online ); } -void YahooAccount::slotAuthorizationRejected( const QString &who, const QString &msg ) +void YahooAccount::slotAuthorizationRejected( const TQString &who, const TQString &msg ) { kdDebug(YAHOO_GEN_DEBUG) ; - QString message; + TQString message; message = i18n( "User %1 has rejected your authorization request.\n%2" ) .arg( who ).arg( msg ); - KNotification::event( QString::fromLatin1("kopete_authorization"), message ); + KNotification::event( TQString::fromLatin1("kopete_authorization"), message ); } -void YahooAccount::slotgotAuthorizationRequest( const QString &user, const QString &msg, const QString &name ) +void YahooAccount::slotgotAuthorizationRequest( const TQString &user, const TQString &msg, const TQString &name ) { kdDebug(YAHOO_GEN_DEBUG) ; Q_UNUSED( msg ); @@ -921,8 +921,8 @@ void YahooAccount::slotgotAuthorizationRequest( const QString &user, const QStri // actions |= Kopete::AddedInfoEvent::AddAction; //Kopete::AddedInfoEvent* event = new Kopete::AddedInfoEvent( user, this ); - //QObject::connect( event, SIGNAL(actionActivated(uint)), - // this, SLOT(slotAddedInfoEventActionActivated(uint)) ); + //TQObject::connect( event, TQT_SIGNAL(actionActivated(uint)), + // this, TQT_SLOT(slotAddedInfoEventActionActivated(uint)) ); //event->showActions( actions ); //event->sendEvent(); @@ -932,21 +932,21 @@ void YahooAccount::slotgotAuthorizationRequest( const QString &user, const QStri hideFlags |= Kopete::UI::ContactAddedNotifyDialog::AddCheckBox | Kopete::UI::ContactAddedNotifyDialog::AddGroupBox ; Kopete::UI::ContactAddedNotifyDialog *dialog= - new Kopete::UI::ContactAddedNotifyDialog( user,QString::null,this, hideFlags ); - QObject::connect(dialog,SIGNAL(applyClicked(const QString&)), - this,SLOT(slotContactAddedNotifyDialogClosed(const QString& ))); + new Kopete::UI::ContactAddedNotifyDialog( user,TQString::null,this, hideFlags ); + TQObject::connect(dialog,TQT_SIGNAL(applyClicked(const TQString&)), + this,TQT_SLOT(slotContactAddedNotifyDialogClosed(const TQString& ))); dialog->show(); } -void YahooAccount::slotContactAddedNotifyDialogClosed( const QString &user ) +void YahooAccount::slotContactAddedNotifyDialogClosed( const TQString &user ) { const Kopete::UI::ContactAddedNotifyDialog *dialog = dynamic_cast(sender()); if(!dialog || !isConnected()) return; - m_session->sendAuthReply( user, dialog->authorized(), QString::null ); + m_session->sendAuthReply( user, dialog->authorized(), TQString::null ); if(dialog->added()) { @@ -964,10 +964,10 @@ void YahooAccount::slotContactAddedNotifyDialogClosed( const QString &user ) switch ( actionId ) { case Kopete::AddedInfoEvent::AuthorizeAction: - m_session->sendAuthReply( event->contactId(), true, QString() ); + m_session->sendAuthReply( event->contactId(), true, TQString() ); break; case Kopete::AddedInfoEvent::BlockAction: - m_session->sendAuthReply( event->contactId(), false, QString() ); + m_session->sendAuthReply( event->contactId(), false, TQString() ); break; case Kopete::AddedInfoEvent::AddContactAction: event->addContact(); @@ -975,17 +975,17 @@ void YahooAccount::slotContactAddedNotifyDialogClosed( const QString &user ) } }*/ -void YahooAccount::slotGotIgnore( const QStringList & /* igns */ ) +void YahooAccount::slotGotIgnore( const TQStringList & /* igns */ ) { //kdDebug(YAHOO_GEN_DEBUG) ; } -void YahooAccount::slotGotIdentities( const QStringList & /* ids */ ) +void YahooAccount::slotGotIdentities( const TQStringList & /* ids */ ) { //kdDebug(YAHOO_GEN_DEBUG) ; } -void YahooAccount::slotStatusChanged( const QString &who, int stat, const QString &msg, int away, int idle, int pictureChecksum ) +void YahooAccount::slotStatusChanged( const TQString &who, int stat, const TQString &msg, int away, int idle, int pictureChecksum ) { kdDebug(YAHOO_GEN_DEBUG) << who << " status: " << stat << " msg: " << msg << " away: " << away << " idle: " << idle << endl; YahooContact *kc = contact( who ); @@ -1032,7 +1032,7 @@ void YahooAccount::slotStatusChanged( const QString &who, int stat, const QStrin } } -void YahooAccount::slotStealthStatusChanged( const QString &who, Yahoo::StealthStatus state ) +void YahooAccount::slotStealthStatusChanged( const TQString &who, Yahoo::StealthStatus state ) { //kdDebug(YAHOO_GEN_DEBUG) << "Stealth Status of " << who << "changed to " << state; @@ -1044,16 +1044,16 @@ void YahooAccount::slotStealthStatusChanged( const QString &who, Yahoo::StealthS kc->setStealthed( state == Yahoo::StealthActive ); } -QString YahooAccount::prepareIncomingMessage( const QString &messageText ) +TQString YahooAccount::prepareIncomingMessage( const TQString &messageText ) { - QString newMsgText( messageText ); - QRegExp regExp; + TQString newMsgText( messageText ); + TQRegExp regExp; int pos = 0; newMsgText = stripMsgColorCodes( newMsgText ); kdDebug(YAHOO_GEN_DEBUG) << "Message after stripping color codes '" << newMsgText << "'" << endl; - newMsgText.replace( QString::fromLatin1( "&" ), QString::fromLatin1( "&" ) ); + newMsgText.replace( TQString::fromLatin1( "&" ), TQString::fromLatin1( "&" ) ); // Replace Font tags regExp.setMinimal( true ); @@ -1063,7 +1063,7 @@ QString YahooAccount::prepareIncomingMessage( const QString &messageText ) pos = regExp.search( newMsgText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsgText.replace( regExp, QString::fromLatin1("" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("" ) ); } } @@ -1095,7 +1095,7 @@ QString YahooAccount::prepareIncomingMessage( const QString &messageText ) pos = regExp.search( newMsgText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsgText.replace( regExp, QString::fromLatin1("<" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("<" ) ); } } regExp.setPattern( "([^\"bui])>" ); @@ -1104,30 +1104,30 @@ QString YahooAccount::prepareIncomingMessage( const QString &messageText ) pos = regExp.search( newMsgText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsgText.replace( regExp, QString::fromLatin1("\\1>" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("\\1>" ) ); } } // add closing tags when needed regExp.setMinimal( false ); regExp.setPattern( "(.*)(?!)" ); - newMsgText.replace( regExp, QString::fromLatin1("\\1" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("\\1
    " ) ); regExp.setPattern( "(.*)(?!)" ); - newMsgText.replace( regExp, QString::fromLatin1("\\1" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("\\1" ) ); regExp.setPattern( "(.*)(?!)" ); - newMsgText.replace( regExp, QString::fromLatin1("\\1" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("\\1" ) ); regExp.setPattern( "()" ); - newMsgText.replace( regExp, QString::fromLatin1("\\1" ) ); + newMsgText.replace( regExp, TQString::fromLatin1("\\1" ) ); - newMsgText.replace( QString::fromLatin1( "\r" ), QString::fromLatin1( "
    " ) ); + newMsgText.replace( TQString::fromLatin1( "\r" ), TQString::fromLatin1( "
    " ) ); return newMsgText; } -void YahooAccount::slotGotIm( const QString &who, const QString &msg, long tm, int /*stat*/) +void YahooAccount::slotGotIm( const TQString &who, const TQString &msg, long tm, int /*stat*/) { - QFont msgFont; - QDateTime msgDT; + TQFont msgFont; + TQDateTime msgDT; Kopete::ContactPtrList justMe; if( !contact( who ) ) @@ -1139,17 +1139,17 @@ void YahooAccount::slotGotIm( const QString &who, const QString &msg, long tm, i //Parse the message for it's properties kdDebug(YAHOO_GEN_DEBUG) << "Original message is '" << msg << "'" << endl; //kdDebug(YAHOO_GEN_DEBUG) << "Message color is " << getMsgColor(msg); - QColor fgColor = getMsgColor( msg ); + TQColor fgColor = getMsgColor( msg ); // FIXME to check if (tm == 0) - //msgDT = QDateTime( QDate::currentDate(), QTime::currentTime(), Qt::LocalTime ); + //msgDT = TQDateTime( TQDate::currentDate(), TQTime::currentTime(), Qt::LocalTime ); msgDT.setTime_t(time(0L)); else - //msgDT = QDateTime::fromTime_t(tm); + //msgDT = TQDateTime::fromTime_t(tm); msgDT.setTime_t(tm, Qt::LocalTime); - QString newMsgText = prepareIncomingMessage( msg ); + TQString newMsgText = prepareIncomingMessage( msg ); kdDebug(YAHOO_GEN_DEBUG) << "Message after fixing font tags '" << newMsgText << "'" << endl; @@ -1167,10 +1167,10 @@ void YahooAccount::slotGotIm( const QString &who, const QString &msg, long tm, i mm->appendMessage(kmsg); } -void YahooAccount::slotGotBuzz( const QString &who, long tm ) +void YahooAccount::slotGotBuzz( const TQString &who, long tm ) { - QFont msgFont; - QDateTime msgDT; + TQFont msgFont; + TQDateTime msgDT; Kopete::ContactPtrList justMe; if( !contact( who ) ) @@ -1181,20 +1181,20 @@ void YahooAccount::slotGotBuzz( const QString &who, long tm ) // FIXME: to check if (tm == 0) - //msgDT = QDateTime( QDate::currentDate(), QTime::currentTime(), Qt::LocalTime ); + //msgDT = TQDateTime( TQDate::currentDate(), TQTime::currentTime(), Qt::LocalTime ); msgDT.setTime_t(time(0L)); else - //msgDT = QDateTime::fromTime_t(tm); + //msgDT = TQDateTime::fromTime_t(tm); msgDT.setTime_t(tm, Qt::LocalTime); justMe.append(myself()); - QString buzzMsgText = i18n("This string is shown when the user is buzzed by a contact", "Buzz"); + TQString buzzMsgText = i18n("This string is shown when the user is buzzed by a contact", "Buzz"); Kopete::Message kmsg(msgDT, contact(who), justMe, buzzMsgText, Kopete::Message::Inbound, - Kopete::Message::PlainText, QString::null, Kopete::Message::TypeAction); + Kopete::Message::PlainText, TQString::null, Kopete::Message::TypeAction); - QColor fgColor( "gold" ); + TQColor fgColor( "gold" ); kmsg.setFg( fgColor ); Kopete::ChatSession *mm = contact(who)->manager(Kopete::Contact::CanCreate); @@ -1203,7 +1203,7 @@ void YahooAccount::slotGotBuzz( const QString &who, long tm ) mm->emitNudgeNotification(); } -void YahooAccount::slotGotConfInvite( const QString & who, const QString & room, const QString &msg, const QStringList &members ) +void YahooAccount::slotGotConfInvite( const TQString & who, const TQString & room, const TQString &msg, const TQStringList &members ) { kdDebug(YAHOO_GEN_DEBUG) << who << " has invited you to join the conference \"" << room << "\" : " << msg << endl; kdDebug(YAHOO_GEN_DEBUG) << "Members: " << members << endl; @@ -1215,20 +1215,20 @@ void YahooAccount::slotGotConfInvite( const QString & who, const QString & room, return; } - QString m = who; - QStringList myMembers; + TQString m = who; + TQStringList myMembers; myMembers.push_back( who ); - for( QStringList::const_iterator it = ++members.constBegin(); it != members.constEnd(); ++it ) + for( TQStringList::const_iterator it = ++members.constBegin(); it != members.constEnd(); ++it ) { if( *it != m_session->userId() ) { - m.append( QString(", %1").arg( *it ) ); + m.append( TQString(", %1").arg( *it ) ); myMembers.push_back( *it ); } } if( KMessageBox::Yes == KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), i18n("%1 has invited you to join a conference with %2.\n\nHis/her message: %3\n\nAccept?") - .arg(who).arg(m).arg(msg), QString(), i18n("Accept"), i18n("Ignore") ) ) + .arg(who).arg(m).arg(msg), TQString(), i18n("Accept"), i18n("Ignore") ) ) { m_session->joinConference( room, myMembers ); if( !m_conferences[room] ) @@ -1237,9 +1237,9 @@ void YahooAccount::slotGotConfInvite( const QString & who, const QString & room, YahooConferenceChatSession *session = new YahooConferenceChatSession( room, protocol(), myself(), others ); m_conferences[room] = session; - QObject::connect( session, SIGNAL(leavingConference( YahooConferenceChatSession * ) ), this, SLOT( slotConfLeave( YahooConferenceChatSession * ) ) ); + TQObject::connect( session, TQT_SIGNAL(leavingConference( YahooConferenceChatSession * ) ), this, TQT_SLOT( slotConfLeave( YahooConferenceChatSession * ) ) ); - for ( QStringList::ConstIterator it = myMembers.constBegin(); it != myMembers.constEnd(); ++it ) + for ( TQStringList::ConstIterator it = myMembers.constBegin(); it != myMembers.constEnd(); ++it ) { YahooContact * c = contact( *it ); if ( !c ) @@ -1254,32 +1254,32 @@ void YahooAccount::slotGotConfInvite( const QString & who, const QString & room, } } else - m_session->declineConference( room, myMembers, QString() ); + m_session->declineConference( room, myMembers, TQString() ); m_pendingConfInvites.remove( room ); } -void YahooAccount::prepareConference( const QString &who ) +void YahooAccount::prepareConference( const TQString &who ) { - QString room; + TQString room; for( int i = 0; i < 22; i++ ) { char c = rand()%52; room += (c > 25) ? c + 71 : c + 65; } - room = QString("%1-%2--").arg(accountId()).arg(room); + room = TQString("%1-%2--").arg(accountId()).arg(room); kdDebug(YAHOO_GEN_DEBUG) << "The generated roomname is: " << room << endl; - QStringList buddies; + TQStringList buddies; // FIXME: to check - //QHash::ConstIterator it, itEnd = contacts().constEnd(); + //QHash::ConstIterator it, itEnd = contacts().constEnd(); //for( it = contacts().constBegin(); it != itEnd; ++it ) //{ // buddies.push_back( it.value()->contactId() ); //} - QDictIterator it( contacts() ); + TQDictIterator it( contacts() ); for( ; it.current(); ++it ) { if( (*it) != myself() ) @@ -1287,15 +1287,15 @@ void YahooAccount::prepareConference( const QString &who ) } YahooInviteListImpl *dlg = new YahooInviteListImpl( Kopete::UI::Global::mainWidget() ); - QObject::connect( dlg, SIGNAL( readyToInvite( const QString &, const QStringList &, const QStringList &, const QString & ) ), - this, SLOT( slotInviteConference( const QString &, const QStringList &, const QStringList &, const QString & ) ) ); + TQObject::connect( dlg, TQT_SIGNAL( readyToInvite( const TQString &, const TQStringList &, const TQStringList &, const TQString & ) ), + this, TQT_SLOT( slotInviteConference( const TQString &, const TQStringList &, const TQStringList &, const TQString & ) ) ); dlg->setRoom( room ); dlg->fillFriendList( buddies ); - dlg->addInvitees( QStringList( who ) ); + dlg->addInvitees( TQStringList( who ) ); dlg->show(); } -void YahooAccount::slotInviteConference( const QString &room, const QStringList &members, const QStringList &participants, const QString &msg ) +void YahooAccount::slotInviteConference( const TQString &room, const TQStringList &members, const TQStringList &participants, const TQString &msg ) { Q_UNUSED( participants ); kdDebug(YAHOO_GEN_DEBUG) << "Inviting " << members << " to the conference " << room << ". Message: " << msg << endl; @@ -1305,19 +1305,19 @@ kdDebug(YAHOO_GEN_DEBUG) << "Inviting " << members << " to the conference " << r YahooConferenceChatSession *session = new YahooConferenceChatSession( room, protocol(), myself(), others ); m_conferences[room] = session; - QObject::connect( session, SIGNAL(leavingConference( YahooConferenceChatSession * ) ), this, SLOT( slotConfLeave( YahooConferenceChatSession * ) ) ); + TQObject::connect( session, TQT_SIGNAL(leavingConference( YahooConferenceChatSession * ) ), this, TQT_SLOT( slotConfLeave( YahooConferenceChatSession * ) ) ); session->joined( static_cast< YahooContact *>(myself()) ); session->view( true )->raise( false ); } -void YahooAccount::slotAddInviteConference( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ) +void YahooAccount::slotAddInviteConference( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ) { kdDebug(YAHOO_GEN_DEBUG) << "Inviting " << who << " to the conference " << room << ". Message: " << msg << endl; m_session->addInviteConference( room, who, members, msg ); } -void YahooAccount::slotConfUserDecline( const QString &who, const QString &room, const QString &msg) +void YahooAccount::slotConfUserDecline( const TQString &who, const TQString &room, const TQString &msg) { kdDebug(YAHOO_GEN_DEBUG) ; @@ -1329,13 +1329,13 @@ void YahooAccount::slotConfUserDecline( const QString &who, const QString &room, YahooConferenceChatSession *session = m_conferences[room]; - QString body = i18n( "%1 has declined to join the conference: \"%2\"").arg( who ).arg( msg ); + TQString body = i18n( "%1 has declined to join the conference: \"%2\"").arg( who ).arg( msg ); Kopete::Message message = Kopete::Message( contact( who ), myself(), body, Kopete::Message::Internal, Kopete::Message::PlainText ); session->appendMessage( message ); } -void YahooAccount::slotConfUserJoin( const QString &who, const QString &room ) +void YahooAccount::slotConfUserJoin( const TQString &who, const TQString &room ) { kdDebug(YAHOO_GEN_DEBUG) ; if( !m_conferences.contains( room ) ) @@ -1352,7 +1352,7 @@ void YahooAccount::slotConfUserJoin( const QString &who, const QString &room ) session->joined( contact( who ) ); } -void YahooAccount::slotConfUserLeave( const QString & who, const QString &room ) +void YahooAccount::slotConfUserLeave( const TQString & who, const TQString &room ) { kdDebug(YAHOO_GEN_DEBUG) ; if( !m_conferences.contains( room ) ) @@ -1374,7 +1374,7 @@ void YahooAccount::slotConfLeave( YahooConferenceChatSession *s ) kdDebug(YAHOO_GEN_DEBUG) ; if( !s ) return; - QStringList members; + TQStringList members; for( Kopete::ContactPtrList::ConstIterator it = s->members().constBegin(); it != s->members().constEnd(); ++it ) { if( (*it) == myself() ) @@ -1386,7 +1386,7 @@ void YahooAccount::slotConfLeave( YahooConferenceChatSession *s ) m_conferences.remove( s->room() ); } -void YahooAccount::slotConfMessage( const QString &who, const QString &room, const QString &msg ) +void YahooAccount::slotConfMessage( const TQString &who, const TQString &room, const TQString &msg ) { kdDebug(YAHOO_GEN_DEBUG) ; @@ -1398,8 +1398,8 @@ void YahooAccount::slotConfMessage( const QString &who, const QString &room, con YahooConferenceChatSession *session = m_conferences[room]; - QFont msgFont; - QDateTime msgDT; + TQFont msgFont; + TQDateTime msgDT; Kopete::ContactPtrList justMe; if( !contact( who ) ) @@ -1409,10 +1409,10 @@ void YahooAccount::slotConfMessage( const QString &who, const QString &room, con } kdDebug(YAHOO_GEN_DEBUG) << "Original message is '" << msg << "'" << endl; - QColor fgColor = getMsgColor( msg ); + TQColor fgColor = getMsgColor( msg ); msgDT.setTime_t(time(0L)); - QString newMsgText = prepareIncomingMessage( msg ); + TQString newMsgText = prepareIncomingMessage( msg ); kdDebug(YAHOO_GEN_DEBUG) << "Message after fixing font tags '" << newMsgText << "'" << endl; session->receivedTypingMsg(contact(who), false); @@ -1429,7 +1429,7 @@ void YahooAccount::slotConfMessage( const QString &who, const QString &room, con void YahooAccount::sendConfMessage( YahooConferenceChatSession *s, const Kopete::Message &message ) { kdDebug(YAHOO_GEN_DEBUG) ; - QStringList members; + TQStringList members; for( Kopete::ContactPtrList::ConstIterator it = s->members().constBegin(); it != s->members().constEnd(); ++it ) { if( (*it) == myself() ) @@ -1478,7 +1478,7 @@ void YahooAccount::slotGotYABEntry( YABEntry *entry ) dlg->setData( *entry ); dlg->setAccountConnected( isConnected() ); dlg->show(); - QObject::connect( dlg, SIGNAL(saveYABEntry( YABEntry & )), this, SLOT(slotSaveYABEntry( YABEntry & ))); + TQObject::connect( dlg, TQT_SIGNAL(saveYABEntry( YABEntry & )), this, TQT_SLOT(slotSaveYABEntry( YABEntry & ))); delete entry; } } @@ -1493,7 +1493,7 @@ void YahooAccount::slotSaveYABEntry( YABEntry &entry ) m_session->addYABEntry( entry ); } -void YahooAccount::slotModifyYABEntryError( YABEntry *entry, const QString &msg ) +void YahooAccount::slotModifyYABEntryError( YABEntry *entry, const TQString &msg ) { YahooContact* kc = contact( entry->yahooId ); if( kc ) @@ -1501,7 +1501,7 @@ void YahooAccount::slotModifyYABEntryError( YABEntry *entry, const QString &msg KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, msg, i18n( "Yahoo Plugin" ) ); } -void YahooAccount::slotGotFile( const QString & who, const QString & url , long /* expires */, const QString & msg , const QString & fname, unsigned long fesize, const QPixmap &preview ) +void YahooAccount::slotGotFile( const TQString & who, const TQString & url , long /* expires */, const TQString & msg , const TQString & fname, unsigned long fesize, const TQPixmap &preview ) { kdDebug(YAHOO_GEN_DEBUG) << "Received File from " << who << ": " << msg << endl; kdDebug(YAHOO_GEN_DEBUG) << "Filename :" << fname << " size:" << fesize << endl; @@ -1511,15 +1511,15 @@ void YahooAccount::slotGotFile( const QString & who, const QString & url , lon if( m_pendingFileTransfers.empty() ) { - QObject::connect( Kopete::TransferManager::transferManager(), SIGNAL( accepted( Kopete::Transfer *, const QString& ) ), - this, SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const QString& ) ) ); - QObject::connect( Kopete::TransferManager::transferManager(), SIGNAL( refused(const Kopete::FileTransferInfo& ) ), - this, SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); + TQObject::connect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( accepted( Kopete::Transfer *, const TQString& ) ), + this, TQT_SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const TQString& ) ) ); + TQObject::connect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( refused(const Kopete::FileTransferInfo& ) ), + this, TQT_SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); } m_pendingFileTransfers.append( url ); } -void YahooAccount::slotReceiveFileAccepted(Kopete::Transfer *transfer, const QString& fileName) +void YahooAccount::slotReceiveFileAccepted(Kopete::Transfer *transfer, const TQString& fileName) { kdDebug(YAHOO_GEN_DEBUG) ; if( !m_pendingFileTransfers.contains( transfer->info().internalId() ) ) @@ -1529,8 +1529,8 @@ void YahooAccount::slotReceiveFileAccepted(Kopete::Transfer *transfer, const QSt // FIXME to check //Create directory if it doesn't already exist - QDir dir; - QString path = QFileInfo( fileName ).dirPath(); + TQDir dir; + TQString path = TQFileInfo( fileName ).dirPath(); for( int i = 1; i <= path.contains('/'); ++i ) { if( !dir.exists( path.section( '/', 0, i ) ) ) @@ -1541,14 +1541,14 @@ void YahooAccount::slotReceiveFileAccepted(Kopete::Transfer *transfer, const QSt m_session->receiveFile( transfer->info().transferId(), transfer->info().contact()->contactId(), transfer->info().internalId(), fileName ); m_fileTransfers.insert( transfer->info().transferId(), transfer ); - QObject::connect( transfer, SIGNAL(result( KIO::Job * )), this, SLOT(slotFileTransferResult( KIO::Job * )) ); + TQObject::connect( transfer, TQT_SIGNAL(result( KIO::Job * )), this, TQT_SLOT(slotFileTransferResult( KIO::Job * )) ); if( m_pendingFileTransfers.empty() ) { - QObject::disconnect( Kopete::TransferManager::transferManager(), SIGNAL( accepted( Kopete::Transfer *, const QString& ) ), - this, SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const QString& ) ) ); - QObject::disconnect( Kopete::TransferManager::transferManager(), SIGNAL( refused(const Kopete::FileTransferInfo& ) ), - this, SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); + TQObject::disconnect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( accepted( Kopete::Transfer *, const TQString& ) ), + this, TQT_SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const TQString& ) ) ); + TQObject::disconnect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( refused(const Kopete::FileTransferInfo& ) ), + this, TQT_SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); } } @@ -1562,10 +1562,10 @@ void YahooAccount::slotReceiveFileRefused( const Kopete::FileTransferInfo& info if( m_pendingFileTransfers.empty() ) { - QObject::disconnect( Kopete::TransferManager::transferManager(), SIGNAL( accepted( Kopete::Transfer *, const QString& ) ), - this, SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const QString& ) ) ); - QObject::disconnect( Kopete::TransferManager::transferManager(), SIGNAL( refused(const Kopete::FileTransferInfo& ) ), - this, SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); + TQObject::disconnect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( accepted( Kopete::Transfer *, const TQString& ) ), + this, TQT_SLOT( slotReceiveFileAccepted( Kopete::Transfer *, const TQString& ) ) ); + TQObject::disconnect( Kopete::TransferManager::transferManager(), TQT_SIGNAL( refused(const Kopete::FileTransferInfo& ) ), + this, TQT_SLOT( slotReceiveFileRefused( const Kopete::FileTransferInfo& ) ) ); } } @@ -1590,7 +1590,7 @@ void YahooAccount::slotFileTransferComplete( unsigned int transferId ) m_fileTransfers.remove( transferId ); } -void YahooAccount::slotFileTransferError( unsigned int transferId, int error, const QString &desc ) +void YahooAccount::slotFileTransferError( unsigned int transferId, int error, const TQString &desc ) { kdDebug(YAHOO_GEN_DEBUG) ; Kopete::Transfer *t = m_fileTransfers[transferId]; @@ -1616,49 +1616,49 @@ void YahooAccount::slotFileTransferResult( KIO::Job *job ) } } -void YahooAccount::slotContactAdded( const QString & /* myid */, const QString & /* who */, const QString & /* msg */ ) +void YahooAccount::slotContactAdded( const TQString & /* myid */, const TQString & /* who */, const TQString & /* msg */ ) { // kdDebug(YAHOO_GEN_DEBUG) << myid << " " << who << " " << msg; } -void YahooAccount::slotRejected( const QString & /* who */, const QString & /* msg */ ) +void YahooAccount::slotRejected( const TQString & /* who */, const TQString & /* msg */ ) { // kdDebug(YAHOO_GEN_DEBUG) ; } -void YahooAccount::slotTypingNotify( const QString &who, int what ) +void YahooAccount::slotTypingNotify( const TQString &who, int what ) { emit receivedTypingMsg(who, what); } -void YahooAccount::slotGameNotify( const QString & /* who */, int /* stat */ ) +void YahooAccount::slotGameNotify( const TQString & /* who */, int /* stat */ ) { // kdDebug(YAHOO_GEN_DEBUG) ; } -void YahooAccount::slotMailNotify( const QString& from, const QString& subject , int cnt ) +void YahooAccount::slotMailNotify( const TQString& from, const TQString& subject , int cnt ) { kdDebug(YAHOO_GEN_DEBUG) << "Mail count: " << cnt << endl; if ( cnt > 0 && from.isEmpty() ) { - QObject::connect(KNotification::event( QString::fromLatin1("yahoo_mail"), i18n( "You have one unread message in your Yahoo inbox.", - "You have %n unread messages in your Yahoo inbox.", cnt ), QPixmap() , 0 ), - SIGNAL(activated(unsigned int ) ) , this, SLOT( slotOpenInbox() ) ); + TQObject::connect(KNotification::event( TQString::fromLatin1("yahoo_mail"), i18n( "You have one unread message in your Yahoo inbox.", + "You have %n unread messages in your Yahoo inbox.", cnt ), TQPixmap() , 0 ), + TQT_SIGNAL(activated(unsigned int ) ) , this, TQT_SLOT( slotOpenInbox() ) ); m_currentMailCount = cnt; } else if ( cnt > 0 ) { kdDebug(YAHOO_GEN_DEBUG) << "attempting to trigger event" << endl; - QObject::connect(KNotification::event( QString::fromLatin1("yahoo_mail"), i18n( "You have a message from %1 in your Yahoo inbox.

    Subject: %2").arg( from ).arg( subject ), - QPixmap() , 0 ), SIGNAL(activated(unsigned int ) ) , this, SLOT( slotOpenInbox() ) ); + TQObject::connect(KNotification::event( TQString::fromLatin1("yahoo_mail"), i18n( "You have a message from %1 in your Yahoo inbox.

    Subject: %2").arg( from ).arg( subject ), + TQPixmap() , 0 ), TQT_SIGNAL(activated(unsigned int ) ) , this, TQT_SLOT( slotOpenInbox() ) ); m_currentMailCount = cnt; } } -void YahooAccount::slotSystemMessage( const QString & /* msg */ ) +void YahooAccount::slotSystemMessage( const TQString & /* msg */ ) { // kdDebug(YAHOO_GEN_DEBUG) << msg; } @@ -1668,7 +1668,7 @@ void YahooAccount::slotRemoveHandler( int /* fd */ ) // kdDebug(YAHOO_GEN_DEBUG) ; } -void YahooAccount::slotGotWebcamInvite( const QString& who ) +void YahooAccount::slotGotWebcamInvite( const TQString& who ) { YahooContact* kc = contact( who ); if ( kc == NULL ) { @@ -1682,18 +1682,18 @@ void YahooAccount::slotGotWebcamInvite( const QString& who ) m_pendingWebcamInvites.append( who ); if( KMessageBox::Yes == KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), i18n("%1 has invited you to view his/her webcam. Accept?").arg( who ), - QString(), i18n("Accept"), i18n("Ignore") ) ) + TQString(), i18n("Accept"), i18n("Ignore") ) ) { m_pendingWebcamInvites.remove( who ); m_session->requestWebcam( who ); } } -void YahooAccount::slotWebcamNotAvailable( const QString &who ) +void YahooAccount::slotWebcamNotAvailable( const TQString &who ) { KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, i18n("Webcam for %1 is not available.").arg(who), i18n( "Yahoo Plugin" ) ); } -void YahooAccount::slotGotWebcamImage( const QString& who, const QPixmap& image ) +void YahooAccount::slotGotWebcamImage( const TQString& who, const TQPixmap& image ) { YahooContact* kc = contact( who ); if ( kc == NULL ) { @@ -1703,7 +1703,7 @@ void YahooAccount::slotGotWebcamImage( const QString& who, const QPixmap& image kc->receivedWebcamImage( image ); } -void YahooAccount::slotPictureStatusNotify( const QString &who, int status) +void YahooAccount::slotPictureStatusNotify( const TQString &who, int status) { YahooContact *kc = contact( who ); if ( kc == NULL ) { @@ -1714,7 +1714,7 @@ void YahooAccount::slotPictureStatusNotify( const QString &who, int status) kdDebug(YAHOO_GEN_DEBUG) << "contact " << who << " changed picture status to" << status << endl; } -void YahooAccount::slotGotBuddyIconChecksum(const QString &who, int checksum) +void YahooAccount::slotGotBuddyIconChecksum(const TQString &who, int checksum) { YahooContact *kc = contact( who ); if ( kc == NULL ) { @@ -1723,7 +1723,7 @@ void YahooAccount::slotGotBuddyIconChecksum(const QString &who, int checksum) } if ( checksum == kc->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt() && - QFile::exists( locateLocal( "appdata", "yahoopictures/"+ who.lower().replace(QRegExp("[./~]"),"-") +".png" ) ) ) + TQFile::exists( locateLocal( "appdata", "yahoopictures/"+ who.lower().replace(TQRegExp("[./~]"),"-") +".png" ) ) ) { kdDebug(YAHOO_GEN_DEBUG) << "Icon already exists. I will not request it again." << endl; return; @@ -1731,7 +1731,7 @@ void YahooAccount::slotGotBuddyIconChecksum(const QString &who, int checksum) m_session->requestPicture( who ); } -void YahooAccount::slotGotBuddyIconInfo(const QString &who, KURL url, int checksum) +void YahooAccount::slotGotBuddyIconInfo(const TQString &who, KURL url, int checksum) { kdDebug(YAHOO_GEN_DEBUG) ; YahooContact *kc = contact( who ); @@ -1741,7 +1741,7 @@ void YahooAccount::slotGotBuddyIconInfo(const QString &who, KURL url, int checks } if ( checksum == kc->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt() && - QFile::exists( locateLocal( "appdata", "yahoopictures/"+ who.lower().replace(QRegExp("[./~]"),"-") +".png" ) )) + TQFile::exists( locateLocal( "appdata", "yahoopictures/"+ who.lower().replace(TQRegExp("[./~]"),"-") +".png" ) )) { kdDebug(YAHOO_GEN_DEBUG) << "Icon already exists. I will not download it again." << endl; return; @@ -1749,7 +1749,7 @@ void YahooAccount::slotGotBuddyIconInfo(const QString &who, KURL url, int checks m_session->downloadPicture( who, url, checksum ); } -void YahooAccount::slotGotBuddyIcon( const QString &who, const QByteArray &data, int checksum ) +void YahooAccount::slotGotBuddyIcon( const TQString &who, const TQByteArray &data, int checksum ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; YahooContact *kc = contact( who ); @@ -1759,7 +1759,7 @@ void YahooAccount::slotGotBuddyIcon( const QString &who, const QByteArray &data, } kc->setDisplayPicture( data, checksum ); } -void YahooAccount::slotGotBuddyIconRequest( const QString & who ) +void YahooAccount::slotGotBuddyIconRequest( const TQString & who ) { kdDebug(YAHOO_GEN_DEBUG) ; m_session->sendPictureInformation( who, myself()->property( YahooProtocol::protocol()->iconRemoteUrl ).value().toString(), @@ -1769,7 +1769,7 @@ void YahooAccount::slotGotBuddyIconRequest( const QString & who ) void YahooAccount::setBuddyIcon( const KURL &url ) { kdDebug(YAHOO_GEN_DEBUG) << "Url: " << url.path() << endl; - QString s = url.path(); + TQString s = url.path(); if ( url.path().isEmpty() ) { myself()->removeProperty( Kopete::Global::Properties::self()->photo() ); @@ -1781,17 +1781,17 @@ void YahooAccount::setBuddyIcon( const KURL &url ) } else { - QImage image( url.path() ); - QString newlocation( locateLocal( "appdata", "yahoopictures/"+ url.fileName().lower() ) ) ; - QFile iconFile( newlocation ); - QByteArray data; + TQImage image( url.path() ); + TQString newlocation( locateLocal( "appdata", "yahoopictures/"+ url.fileName().lower() ) ) ; + TQFile iconFile( newlocation ); + TQByteArray data; uint expire = myself()->property( YahooProtocol::protocol()->iconExpire ).value().toInt(); if ( image.isNull() ) { KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Sorry, i18n( "The selected buddy icon could not be opened.
    Please set a new buddy icon.
    " ), i18n( "Yahoo Plugin" ) ); return; } - image = image.smoothScale( 96, 96, QImage::ScaleMin ); + image = image.smoothScale( 96, 96, TQImage::ScaleMin ); if(image.width() < image.height()) { image = image.copy((image.width()-image.height())/2, 0, 96, 96); @@ -1827,7 +1827,7 @@ void YahooAccount::setBuddyIcon( const KURL &url ) configGroup()->writeEntry( "iconLocalUrl", newlocation ); if ( checksum != static_cast(myself()->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt()) || - QDateTime::currentDateTime().toTime_t() > expire ) + TQDateTime::currentDateTime().toTime_t() > expire ) { myself()->setProperty( YahooProtocol::protocol()->iconCheckSum, checksum ); configGroup()->writeEntry( "iconCheckSum", checksum ); @@ -1837,7 +1837,7 @@ void YahooAccount::setBuddyIcon( const KURL &url ) } } -void YahooAccount::slotBuddyIconChanged( const QString &url, int expires ) +void YahooAccount::slotBuddyIconChanged( const TQString &url, int expires ) { kdDebug(YAHOO_GEN_DEBUG) ; int checksum = myself()->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt(); @@ -1849,7 +1849,7 @@ void YahooAccount::slotBuddyIconChanged( const QString &url, int expires ) configGroup()->writeEntry( "iconRemoteUrl", url ); configGroup()->writeEntry( "iconExpire", expires ); m_session->setPictureStatus( Yahoo::Picture ); - m_session->sendPictureChecksum( QString(), checksum ); + m_session->sendPictureChecksum( TQString(), checksum ); } } @@ -1859,7 +1859,7 @@ void YahooAccount::slotWebcamReadyForTransmission() if( !m_webcam ) { m_webcam = new YahooWebcam( this ); - QObject::connect( m_webcam, SIGNAL(webcamClosing()), this, SLOT(slotOutgoingWebcamClosing()) ); + TQObject::connect( m_webcam, TQT_SIGNAL(webcamClosing()), this, TQT_SLOT(slotOutgoingWebcamClosing()) ); } m_webcam->startTransmission(); @@ -1882,7 +1882,7 @@ void YahooAccount::slotOutgoingWebcamClosing() m_webcam = 0L; } -void YahooAccount::slotWebcamViewerJoined( const QString &viewer ) +void YahooAccount::slotWebcamViewerJoined( const TQString &viewer ) { if( m_webcam ) { @@ -1890,14 +1890,14 @@ void YahooAccount::slotWebcamViewerJoined( const QString &viewer ) } } -void YahooAccount::slotWebcamViewerRequest( const QString &viewer ) +void YahooAccount::slotWebcamViewerRequest( const TQString &viewer ) { if( KMessageBox::Yes == KMessageBox::questionYesNo( Kopete::UI::Global::mainWidget(), i18n("%1 wants to view your webcam. Grant access?") - .arg(viewer), QString::null, i18n("Accept"), i18n("Ignore") ) ) + .arg(viewer), TQString::null, i18n("Accept"), i18n("Ignore") ) ) m_session->grantWebcamAccess( viewer ); } -void YahooAccount::slotWebcamViewerLeft( const QString &viewer ) +void YahooAccount::slotWebcamViewerLeft( const TQString &viewer ) { if( m_webcam ) { @@ -1905,7 +1905,7 @@ void YahooAccount::slotWebcamViewerLeft( const QString &viewer ) } } -void YahooAccount::slotWebcamClosed( const QString& who, int reason ) +void YahooAccount::slotWebcamClosed( const TQString& who, int reason ) { YahooContact* kc = contact( who ); if ( kc == NULL ) { @@ -1915,7 +1915,7 @@ void YahooAccount::slotWebcamClosed( const QString& who, int reason ) kc->webcamClosed( reason ); } -void YahooAccount::slotWebcamPaused( const QString &who ) +void YahooAccount::slotWebcamPaused( const TQString &who ) { YahooContact* kc = contact( who ); if ( kc == NULL ) { @@ -1925,7 +1925,7 @@ void YahooAccount::slotWebcamPaused( const QString &who ) kc->webcamPaused(); } -void YahooAccount::setOnlineStatus( const Kopete::OnlineStatus &status, const QString &reason) +void YahooAccount::setOnlineStatus( const Kopete::OnlineStatus &status, const TQString &reason) { kdDebug(YAHOO_GEN_DEBUG) ; if ( myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline && @@ -1968,12 +1968,12 @@ void YahooAccount::setStatusMessage(const Kopete::StatusMessage &statusMessage) void YahooAccount::slotOpenInbox() { - KRun::runURL( KURL( QString::fromLatin1("http://mail.yahoo.com/") ) , "text/html" ); + KRun::runURL( KURL( TQString::fromLatin1("http://mail.yahoo.com/") ) , "text/html" ); } void YahooAccount::slotOpenYAB() { - KRun::runURL( KURL( QString::fromLatin1("http://address.yahoo.com/") ) , "text/html" ); + KRun::runURL( KURL( TQString::fromLatin1("http://address.yahoo.com/") ) , "text/html" ); } void YahooAccount::slotEditOwnYABEntry() @@ -1988,15 +1988,15 @@ void YahooAccount::slotJoinChatRoom() /* YahooChatSelectorDialog *chatDialog = new YahooChatSelectorDialog( Kopete::UI::Global::mainWidget() ); - QObject::connect( m_session, SIGNAL(gotYahooChatCategories( const QDomDocument & )), chatDialog, - SLOT(slotSetChatCategories( const QDomDocument & )) ); - QObject::connect( m_session, SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const QDomDocument & )), - chatDialog, SLOT(slotSetChatRooms( const Yahoo::ChatCategory &, const QDomDocument & )) ); - QObject::connect( chatDialog, SIGNAL(chatCategorySelected( const Yahoo::ChatCategory & )), - this, SLOT(slotChatCategorySelected( const Yahoo::ChatCategory & ) ) ); + TQObject::connect( m_session, TQT_SIGNAL(gotYahooChatCategories( const TQDomDocument & )), chatDialog, + TQT_SLOT(slotSetChatCategories( const TQDomDocument & )) ); + TQObject::connect( m_session, TQT_SIGNAL(gotYahooChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & )), + chatDialog, TQT_SLOT(slotSetChatRooms( const Yahoo::ChatCategory &, const TQDomDocument & )) ); + TQObject::connect( chatDialog, TQT_SIGNAL(chatCategorySelected( const Yahoo::ChatCategory & )), + this, TQT_SLOT(slotChatCategorySelected( const Yahoo::ChatCategory & ) ) ); m_session->getYahooChatCategories(); - if( chatDialog->exec() == QDialog::Accepted ) + if( chatDialog->exec() == TQDialog::Accepted ) { kdDebug() << chatDialog->selectedRoom().topic << " " << chatDialog->selectedRoom().topic << " " << chatDialog->selectedRoom().id << endl; m_session->joinYahooChatRoom( chatDialog->selectedRoom() ); @@ -2018,7 +2018,7 @@ void YahooAccount::slotChatCategorySelected( const Yahoo::ChatCategory &category } // FIXME: not ported yet -void YahooAccount::slotChatJoined( int roomId, int categoryId, const QString &comment, const QString &handle ) +void YahooAccount::slotChatJoined( int roomId, int categoryId, const TQString &comment, const TQString &handle ) { } /* @@ -2028,8 +2028,8 @@ void YahooAccount::slotChatJoined( int roomId, int categoryId, const QString &co if( !m_chatChatSession ) { m_chatChatSession = new YahooChatChatSession( protocol(), myself(), others ); - QObject::connect( m_chatChatSession, SIGNAL(closing(Kopete::ChatSession *)), this, - SLOT(slotLeavChat()) ); + TQObject::connect( m_chatChatSession, TQT_SIGNAL(closing(Kopete::ChatSession *)), this, + TQT_SLOT(slotLeavChat()) ); } m_chatChatSession->removeAllContacts(); m_chatChatSession->setHandle( handle ); @@ -2046,7 +2046,7 @@ void YahooAccount::slotChatJoined( int roomId, int categoryId, const QString &co */ // FIXME: not ported yet -void YahooAccount::slotChatBuddyHasJoined( const QString &nick, const QString &handle, bool suppressNotification ) +void YahooAccount::slotChatBuddyHasJoined( const TQString &nick, const TQString &handle, bool suppressNotification ) { } /* @@ -2071,7 +2071,7 @@ void YahooAccount::slotChatBuddyHasJoined( const QString &nick, const QString &h */ // FIXME: not ported yet -void YahooAccount::slotChatBuddyHasLeft( const QString &nick, const QString &handle ) +void YahooAccount::slotChatBuddyHasLeft( const TQString &nick, const TQString &handle ) { } /* @@ -2091,7 +2091,7 @@ void YahooAccount::slotChatBuddyHasLeft( const QString &nick, const QString &han */ // FIXME: not ported yet -void YahooAccount::slotChatMessageReceived( const QString &nick, const QString &message, const QString &handle ) +void YahooAccount::slotChatMessageReceived( const TQString &nick, const TQString &message, const TQString &handle ) { } /* @@ -2101,8 +2101,8 @@ void YahooAccount::slotChatMessageReceived( const QString &nick, const QString & if( !m_chatChatSession->handle().startsWith( handle ) ) return; - QFont msgFont; - QDateTime msgDT; + TQFont msgFont; + TQDateTime msgDT; Kopete::ContactPtrList justMe; if( !contact( nick ) ) @@ -2114,10 +2114,10 @@ void YahooAccount::slotChatMessageReceived( const QString &nick, const QString & } kdDebug(YAHOO_GEN_DEBUG) << "Original message is '" << message << "'" << endl; - QColor fgColor = getMsgColor( message ); + TQColor fgColor = getMsgColor( message ); msgDT.setTime_t(time(0L)); - QString newMsgText = prepareIncomingMessage( message ); + TQString newMsgText = prepareIncomingMessage( message ); kdDebug(YAHOO_GEN_DEBUG) << "Message after fixing font tags '" << newMsgText << "'" << endl; @@ -2133,7 +2133,7 @@ void YahooAccount::slotChatMessageReceived( const QString &nick, const QString & } */ -void YahooAccount::sendChatMessage( const Kopete::Message &msg, const QString &handle ) +void YahooAccount::sendChatMessage( const Kopete::Message &msg, const TQString &handle ) { m_session->sendYahooChatMessage( YahooContact::prepareMessage( msg.escapedBody() ), handle ); } diff --git a/kopete/protocols/yahoo/yahooaccount.h b/kopete/protocols/yahoo/yahooaccount.h index 0c636731..e2660edc 100644 --- a/kopete/protocols/yahoo/yahooaccount.h +++ b/kopete/protocols/yahoo/yahooaccount.h @@ -22,10 +22,10 @@ #define YAHOOACCOUNT_H // Qt -#include -#include -#include -#include +#include +#include +#include +#include // KDE #include @@ -69,20 +69,20 @@ public: enum SignalConnectionType { MakeConnections, DeleteConnections }; - YahooAccount(YahooProtocol *parent,const QString& accountID, const char *name = 0); + YahooAccount(YahooProtocol *parent,const TQString& accountID, const char *name = 0); ~YahooAccount(); /* * Returns a contact of name @p id */ - YahooContact *contact(const QString &id); + YahooContact *contact(const TQString &id); virtual KActionMenu* actionMenu(); /** * Sets the yahoo away status */ - virtual void setAway(bool, const QString &); + virtual void setAway(bool, const TQString &); /** * The session @@ -92,7 +92,7 @@ public: /** * Returns true if contact @p id is on the server-side contact list */ - bool isOnServer(const QString &id) { return IDs.contains(id); } + bool isOnServer(const TQString &id) { return IDs.contains(id); } /** * Returns true if we have the server-side contact list @@ -106,7 +106,7 @@ public: /** * Set the pager server */ - void setServer( const QString &server ); + void setServer( const TQString &server ); /** * Set the port of the pager server @@ -118,30 +118,30 @@ public: */ void setBuddyIcon( const KURL &url ); - void verifyAccount( const QString &word ); + void verifyAccount( const TQString &word ); void sendConfMessage( YahooConferenceChatSession *s, const Kopete::Message &message ); - void sendChatMessage( const Kopete::Message &msg, const QString &handle ); - void prepareConference( const QString &who ); + void sendChatMessage( const Kopete::Message &msg, const TQString &handle ); + void prepareConference( const TQString &who ); void sendFile( YahooContact *to, const KURL &url ); public slots: /** * Connect to the Yahoo service */ - virtual void connectWithPassword( const QString & ); + virtual void connectWithPassword( const TQString & ); /** * Disconnect from the Yahoo service */ virtual void disconnect(); /** Reimplemented from Kopete::Account */ - void setOnlineStatus( const Kopete::OnlineStatus&, const QString &reason = QString::null); + void setOnlineStatus( const Kopete::OnlineStatus&, const TQString &reason = TQString::null); signals: /** * Emitted when we receive notification that the person we're talking to is typing */ - void receivedTypingMsg(const QString &contactId, bool isTyping); + void receivedTypingMsg(const TQString &contactId, bool isTyping); /** * Emitted when our Buddy Icon has changed @@ -152,18 +152,18 @@ protected: /** * Adds our Yahoo contact to a metacontact */ - virtual bool createContact(const QString &contactId, Kopete::MetaContact *parentContact); + virtual bool createContact(const TQString &contactId, Kopete::MetaContact *parentContact); - virtual bool createChatContact( const QString &nick ); + virtual bool createChatContact( const TQString &nick ); /** * Gets the just-received message color */ - QColor getMsgColor(const QString& msg); + TQColor getMsgColor(const TQString& msg); /** * Remove color codes from a message */ - QString stripMsgColorCodes(const QString& msg); + TQString stripMsgColorCodes(const TQString& msg); protected slots: void slotConnected(); @@ -175,73 +175,73 @@ protected slots: void slotJoinChatRoom(); void slotChatCategorySelected( const Yahoo::ChatCategory &category ); - void slotGoStatus(int status, const QString &awayMessage = QString()); - void slotLoginResponse(int succ, const QString &url); + void slotGoStatus(int status, const TQString &awayMessage = TQString()); + void slotLoginResponse(int succ, const TQString &url); void slotDisconnected(); void slotLoginFailed(); - void slotGotBuddy(const QString &userid, const QString &alias, const QString &group); - void slotBuddyAddResult(const QString &userid, const QString &group, bool success); - void slotBuddyRemoveResult(const QString &userid, const QString &group, bool success); - void slotBuddyChangeGroupResult(const QString &userid, const QString &group, bool success); - void slotAuthorizationAccepted( const QString &who ); - void slotAuthorizationRejected( const QString &who, const QString &msg ); - void slotgotAuthorizationRequest( const QString &, const QString &, const QString & ); - void slotContactAddedNotifyDialogClosed( const QString &user ); + void slotGotBuddy(const TQString &userid, const TQString &alias, const TQString &group); + void slotBuddyAddResult(const TQString &userid, const TQString &group, bool success); + void slotBuddyRemoveResult(const TQString &userid, const TQString &group, bool success); + void slotBuddyChangeGroupResult(const TQString &userid, const TQString &group, bool success); + void slotAuthorizationAccepted( const TQString &who ); + void slotAuthorizationRejected( const TQString &who, const TQString &msg ); + void slotgotAuthorizationRequest( const TQString &, const TQString &, const TQString & ); + void slotContactAddedNotifyDialogClosed( const TQString &user ); //void slotAddedInfoEventActionActivated( uint actionId ); - void slotGotIgnore(const QStringList &); - void slotGotIdentities(const QStringList &); - void slotStatusChanged(const QString &who, int stat, const QString &msg, int away, int idle, int pictureChecksum); - void slotStealthStatusChanged(const QString &who, Yahoo::StealthStatus state); - void slotGotIm(const QString &who, const QString &msg, long tm, int stat); - void slotGotBuzz(const QString &who, long tm); - void slotGotConfInvite(const QString &who, const QString &room, const QString &msg, const QStringList &members); - void slotConfUserDecline(const QString &who, const QString &room, const QString &msg); - void slotConfUserJoin(const QString &who, const QString &room); - void slotConfUserLeave(const QString &who, const QString &room); - void slotConfMessage(const QString &who, const QString &room, const QString &msg); + void slotGotIgnore(const TQStringList &); + void slotGotIdentities(const TQStringList &); + void slotStatusChanged(const TQString &who, int stat, const TQString &msg, int away, int idle, int pictureChecksum); + void slotStealthStatusChanged(const TQString &who, Yahoo::StealthStatus state); + void slotGotIm(const TQString &who, const TQString &msg, long tm, int stat); + void slotGotBuzz(const TQString &who, long tm); + void slotGotConfInvite(const TQString &who, const TQString &room, const TQString &msg, const TQStringList &members); + void slotConfUserDecline(const TQString &who, const TQString &room, const TQString &msg); + void slotConfUserJoin(const TQString &who, const TQString &room); + void slotConfUserLeave(const TQString &who, const TQString &room); + void slotConfMessage(const TQString &who, const TQString &room, const TQString &msg); void slotConfLeave( YahooConferenceChatSession *s ); - void slotInviteConference( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ); - void slotAddInviteConference( const QString &room, const QStringList &who, const QStringList &members, const QString &msg ); - void slotGotFile(const QString &who, const QString &url, long expires, const QString &msg, const QString &fname, unsigned long fesize, const QPixmap &); - void slotContactAdded(const QString &myid, const QString &who, const QString &msg); - void slotRejected(const QString &, const QString &); - void slotTypingNotify(const QString &, int ); - void slotGameNotify(const QString &, int); - void slotMailNotify(const QString &, const QString &, int); - void slotSystemMessage(const QString &); + void slotInviteConference( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ); + void slotAddInviteConference( const TQString &room, const TQStringList &who, const TQStringList &members, const TQString &msg ); + void slotGotFile(const TQString &who, const TQString &url, long expires, const TQString &msg, const TQString &fname, unsigned long fesize, const TQPixmap &); + void slotContactAdded(const TQString &myid, const TQString &who, const TQString &msg); + void slotRejected(const TQString &, const TQString &); + void slotTypingNotify(const TQString &, int ); + void slotGameNotify(const TQString &, int); + void slotMailNotify(const TQString &, const TQString &, int); + void slotSystemMessage(const TQString &); void slotRemoveHandler(int fd); - //void slotHostConnect(const QString &host, int port); - void slotGotWebcamInvite(const QString &); - void slotWebcamNotAvailable( const QString &who ); - void slotGotWebcamImage(const QString&, const QPixmap&); + //void slotHostConnect(const TQString &host, int port); + void slotGotWebcamInvite(const TQString &); + void slotWebcamNotAvailable( const TQString &who ); + void slotGotWebcamImage(const TQString&, const TQPixmap&); void slotWebcamReadyForTransmission(); void slotWebcamStopTransmission(); void slotOutgoingWebcamClosing(); - void slotWebcamClosed(const QString&, int); - void slotWebcamPaused(const QString&); - void slotWebcamViewerJoined( const QString & ); - void slotWebcamViewerLeft( const QString & ); - void slotWebcamViewerRequest( const QString & ); - void slotPictureStatusNotify( const QString&, int); - void slotGotBuddyIcon(const QString&, const QByteArray&, int); - void slotGotBuddyIconInfo(const QString&, KURL, int); - void slotGotBuddyIconChecksum(const QString&, int); - void slotGotBuddyIconRequest(const QString &); - void slotBuddyIconChanged(const QString&, int); + void slotWebcamClosed(const TQString&, int); + void slotWebcamPaused(const TQString&); + void slotWebcamViewerJoined( const TQString & ); + void slotWebcamViewerLeft( const TQString & ); + void slotWebcamViewerRequest( const TQString & ); + void slotPictureStatusNotify( const TQString&, int); + void slotGotBuddyIcon(const TQString&, const TQByteArray&, int); + void slotGotBuddyIconInfo(const TQString&, KURL, int); + void slotGotBuddyIconChecksum(const TQString&, int); + void slotGotBuddyIconRequest(const TQString &); + void slotBuddyIconChanged(const TQString&, int); void slotGotYABEntry( YABEntry *entry ); void slotGotYABRevision( long revision, bool merged ); void slotSaveYABEntry( YABEntry &entry ); - void slotModifyYABEntryError( YABEntry *entry, const QString & ); - void slotChatJoined( int roomId, int categoryId, const QString &comment, const QString &handle ); - void slotChatBuddyHasJoined( const QString &nick, const QString &handle, bool suppressNotification ); - void slotChatBuddyHasLeft( const QString &nick, const QString &handle ); - void slotChatMessageReceived( const QString &nick, const QString &message, const QString &handle ); + void slotModifyYABEntryError( YABEntry *entry, const TQString & ); + void slotChatJoined( int roomId, int categoryId, const TQString &comment, const TQString &handle ); + void slotChatBuddyHasJoined( const TQString &nick, const TQString &handle, bool suppressNotification ); + void slotChatBuddyHasLeft( const TQString &nick, const TQString &handle ); + void slotChatMessageReceived( const TQString &nick, const TQString &message, const TQString &handle ); void slotLeavChat(); - void slotReceiveFileAccepted( Kopete::Transfer *trans, const QString& fileName ); + void slotReceiveFileAccepted( Kopete::Transfer *trans, const TQString& fileName ); void slotReceiveFileRefused( const Kopete::FileTransferInfo& info ); void slotFileTransferComplete( unsigned int id ); - void slotFileTransferError( unsigned int id, int error, const QString &desc ); + void slotFileTransferError( unsigned int id, int error, const TQString &desc ); void slotFileTransferBytesProcessed( unsigned int id, unsigned int bytes ); void slotFileTransferResult( KIO::Job * ); void slotError( int level ); @@ -255,24 +255,24 @@ private: void setupActions( bool connected ); - QString prepareIncomingMessage( const QString &msg ); + TQString prepareIncomingMessage( const TQString &msg ); /** * internal (to the plugin) controls/flags * This should be kept in sync with server - if a buddy is removed, this should be changed accordingly. */ - QMap > IDs; + TQMap > IDs; /** * Conferences list, maped by room name (id) */ - QMap m_conferences; + TQMap m_conferences; YahooChatChatSession * m_chatChatSession; - QStringList m_pendingConfInvites; - QStringList m_pendingWebcamInvites; - QStringList m_pendingFileTransfers; + TQStringList m_pendingConfInvites; + TQStringList m_pendingWebcamInvites; + TQStringList m_pendingFileTransfers; - QMap m_fileTransfers; + TQMap m_fileTransfers; bool theHaveContactList; // Do we have the full server-side contact list yet? int stateOnConnection; // The state to change to on connection diff --git a/kopete/protocols/yahoo/yahooaddcontact.cpp b/kopete/protocols/yahoo/yahooaddcontact.cpp index 909c4379..af3e1bc5 100644 --- a/kopete/protocols/yahoo/yahooaddcontact.cpp +++ b/kopete/protocols/yahoo/yahooaddcontact.cpp @@ -17,7 +17,7 @@ */ // QT Includes -#include +#include // KDE Includes #include @@ -33,11 +33,11 @@ #include "yahooaccount.h" // Yahoo Add Contact page -YahooAddContact::YahooAddContact(YahooProtocol *owner, QWidget *parent, const char *name): AddContactPage(parent, name) +YahooAddContact::YahooAddContact(YahooProtocol *owner, TQWidget *parent, const char *name): AddContactPage(parent, name) { kdDebug(YAHOO_GEN_DEBUG) << "YahooAddContact::YahooAddContact(, , " << name << ")" << endl; - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); theDialog = new YahooAddContactBase(this); theDialog->show(); theProtocol = owner; @@ -60,7 +60,7 @@ bool YahooAddContact::apply(Kopete::Account *theAccount, Kopete::MetaContact *th { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QString displayName = theDialog->contactID->text(); + TQString displayName = theDialog->contactID->text(); YahooAccount* myAccount = static_cast(theAccount); myAccount->addContact(theDialog->contactID->text().lower(), theMetaContact, Kopete::Account::ChangeKABC ); return true; diff --git a/kopete/protocols/yahoo/yahooaddcontact.h b/kopete/protocols/yahoo/yahooaddcontact.h index 947a7dcd..796c82ce 100644 --- a/kopete/protocols/yahoo/yahooaddcontact.h +++ b/kopete/protocols/yahoo/yahooaddcontact.h @@ -40,7 +40,7 @@ private: YahooAddContactBase *theDialog; public: - YahooAddContact(YahooProtocol *owner, QWidget *parent = 0, const char *name = 0); + YahooAddContact(YahooProtocol *owner, TQWidget *parent = 0, const char *name = 0); ~YahooAddContact(); virtual bool validateData(); diff --git a/kopete/protocols/yahoo/yahoochatsession.cpp b/kopete/protocols/yahoo/yahoochatsession.cpp index 0402c400..5402919c 100644 --- a/kopete/protocols/yahoo/yahoochatsession.cpp +++ b/kopete/protocols/yahoo/yahoochatsession.cpp @@ -15,11 +15,11 @@ #include "yahoochatsession.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -53,19 +53,19 @@ YahooChatSession::YahooChatSession( Kopete::Protocol *protocol, const Kopete::Co setInstance(protocol->instance()); // Add Actions - new KAction( i18n( "Buzz Contact" ), QIconSet(BarIcon("bell")), "Ctrl+G", this, SLOT( slotBuzzContact() ), actionCollection(), "yahooBuzz" ) ; - new KAction( i18n( "Show User Info" ), QIconSet(BarIcon("idea")), 0, this, SLOT( slotUserInfo() ), actionCollection(), "yahooShowInfo" ) ; - new KAction( i18n( "Request Webcam" ), QIconSet(BarIcon("webcamreceive")), 0, this, SLOT( slotRequestWebcam() ), actionCollection(), "yahooRequestWebcam" ) ; - new KAction( i18n( "Invite to view your Webcam" ), QIconSet(BarIcon("webcamsend")), 0, this, SLOT( slotInviteWebcam() ), actionCollection(), "yahooSendWebcam" ) ; - new KAction( i18n( "Send File" ), QIconSet(BarIcon("attach")), 0, this, SLOT( slotSendFile() ), actionCollection(), "yahooSendFile" ); + new KAction( i18n( "Buzz Contact" ), TQIconSet(BarIcon("bell")), "Ctrl+G", this, TQT_SLOT( slotBuzzContact() ), actionCollection(), "yahooBuzz" ) ; + new KAction( i18n( "Show User Info" ), TQIconSet(BarIcon("idea")), 0, this, TQT_SLOT( slotUserInfo() ), actionCollection(), "yahooShowInfo" ) ; + new KAction( i18n( "Request Webcam" ), TQIconSet(BarIcon("webcamreceive")), 0, this, TQT_SLOT( slotRequestWebcam() ), actionCollection(), "yahooRequestWebcam" ) ; + new KAction( i18n( "Invite to view your Webcam" ), TQIconSet(BarIcon("webcamsend")), 0, this, TQT_SLOT( slotInviteWebcam() ), actionCollection(), "yahooSendWebcam" ) ; + new KAction( i18n( "Send File" ), TQIconSet(BarIcon("attach")), 0, this, TQT_SLOT( slotSendFile() ), actionCollection(), "yahooSendFile" ); YahooContact *c = static_cast( others.first() ); - connect( c, SIGNAL( displayPictureChanged() ), this, SLOT( slotDisplayPictureChanged() ) ); - m_image = new QLabel( 0L, "kde toolbar widget" ); - new KWidgetAction( m_image, i18n( "Yahoo Display Picture" ), 0, this, SLOT( slotDisplayPictureChanged() ), actionCollection(), "yahooDisplayPicture" ); + connect( c, TQT_SIGNAL( displayPictureChanged() ), this, TQT_SLOT( slotDisplayPictureChanged() ) ); + m_image = new TQLabel( 0L, "kde toolbar widget" ); + new KWidgetAction( m_image, i18n( "Yahoo Display Picture" ), 0, this, TQT_SLOT( slotDisplayPictureChanged() ), actionCollection(), "yahooDisplayPicture" ); if(c->hasProperty(Kopete::Global::Properties::self()->photo().key()) ) { - connect( Kopete::ChatSessionManager::self() , SIGNAL(viewActivated(KopeteView* )) , this, SLOT(slotDisplayPictureChanged()) ); + connect( Kopete::ChatSessionManager::self() , TQT_SIGNAL(viewActivated(KopeteView* )) , this, TQT_SLOT(slotDisplayPictureChanged()) ); } else { @@ -83,42 +83,42 @@ YahooChatSession::~YahooChatSession() void YahooChatSession::slotBuzzContact() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrListcontacts = members(); + TQPtrListcontacts = members(); static_cast(contacts.first())->buzzContact(); } void YahooChatSession::slotUserInfo() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrListcontacts = members(); + TQPtrListcontacts = members(); static_cast(contacts.first())->slotUserInfo(); } void YahooChatSession::slotRequestWebcam() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrListcontacts = members(); + TQPtrListcontacts = members(); static_cast(contacts.first())->requestWebcam(); } void YahooChatSession::slotInviteWebcam() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrListcontacts = members(); + TQPtrListcontacts = members(); static_cast(contacts.first())->inviteWebcam(); } void YahooChatSession::slotSendFile() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrListcontacts = members(); + TQPtrListcontacts = members(); static_cast(contacts.first())->sendFile(); } void YahooChatSession::slotDisplayPictureChanged() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QPtrList mb=members(); + TQPtrList mb=members(); YahooContact *c = static_cast( mb.first() ); if ( c && m_image ) { @@ -131,9 +131,9 @@ void YahooChatSession::slotDisplayPictureChanged() if(w) { //We connected that in the constructor. we don't need to keep this slot active. - disconnect( Kopete::ChatSessionManager::self() , SIGNAL(viewActivated(KopeteView* )) , this, SLOT(slotDisplayPictureChanged()) ); + disconnect( Kopete::ChatSessionManager::self() , TQT_SIGNAL(viewActivated(KopeteView* )) , this, TQT_SLOT(slotDisplayPictureChanged()) ); - QPtrListIterator it=w->toolBarIterator() ; + TQPtrListIterator it=w->toolBarIterator() ; KAction *imgAction=actionCollection()->action("yahooDisplayPicture"); if(imgAction) while(it) { @@ -142,15 +142,15 @@ void YahooChatSession::slotDisplayPictureChanged() { sz=tb->iconSize(); //ipdate if the size of the toolbar change. - disconnect(tb, SIGNAL(modechange()), this, SLOT(slotDisplayPictureChanged())); - connect(tb, SIGNAL(modechange()), this, SLOT(slotDisplayPictureChanged())); + disconnect(tb, TQT_SIGNAL(modechange()), this, TQT_SLOT(slotDisplayPictureChanged())); + connect(tb, TQT_SIGNAL(modechange()), this, TQT_SLOT(slotDisplayPictureChanged())); break; } ++it; } } - QString imgURL=c->property(Kopete::Global::Properties::self()->photo()).value().toString(); - QImage scaledImg = QPixmap( imgURL ).convertToImage().smoothScale( sz, sz ); + TQString imgURL=c->property(Kopete::Global::Properties::self()->photo()).value().toString(); + TQImage scaledImg = TQPixmap( imgURL ).convertToImage().smoothScale( sz, sz ); if(!scaledImg.isNull()) m_image->setPixmap( scaledImg ); else @@ -158,7 +158,7 @@ void YahooChatSession::slotDisplayPictureChanged() c->removeProperty(Kopete::Global::Properties::self()->photo()); //slotDisplayPictureChanged(); //don't do that or we might end in a infinite loop } - QToolTip::add( m_image, "" ); + TQToolTip::add( m_image, "" ); } } } diff --git a/kopete/protocols/yahoo/yahoochatsession.h b/kopete/protocols/yahoo/yahoochatsession.h index 1e440e95..57fc970f 100644 --- a/kopete/protocols/yahoo/yahoochatsession.h +++ b/kopete/protocols/yahoo/yahoochatsession.h @@ -45,7 +45,7 @@ private slots: void slotSendFile(); private: - QLabel *m_image; + TQLabel *m_image; }; #endif diff --git a/kopete/protocols/yahoo/yahooconferencemessagemanager.cpp b/kopete/protocols/yahoo/yahooconferencemessagemanager.cpp index cc173d96..8d34689b 100644 --- a/kopete/protocols/yahoo/yahooconferencemessagemanager.cpp +++ b/kopete/protocols/yahoo/yahooconferencemessagemanager.cpp @@ -34,7 +34,7 @@ #include "yahooaccount.h" #include "yahooinvitelistimpl.h" -YahooConferenceChatSession::YahooConferenceChatSession( const QString & yahooRoom, Kopete::Protocol *protocol, const Kopete::Contact *user, +YahooConferenceChatSession::YahooConferenceChatSession( const TQString & yahooRoom, Kopete::Protocol *protocol, const Kopete::Contact *user, Kopete::ContactPtrList others, const char *name ) : Kopete::ChatSession( user, others, protocol, name ) { @@ -42,12 +42,12 @@ YahooConferenceChatSession::YahooConferenceChatSession( const QString & yahooRoo Kopete::ChatSessionManager::self()->registerChatSession( this ); setInstance(protocol->instance()); - connect ( this, SIGNAL( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ), - SLOT( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) ); + connect ( this, TQT_SIGNAL( messageSent ( Kopete::Message &, Kopete::ChatSession * ) ), + TQT_SLOT( slotMessageSent ( Kopete::Message &, Kopete::ChatSession * ) ) ); m_yahooRoom = yahooRoom; - m_actionInvite = new KAction( i18n( "&Invite others" ), "kontact_contacts", this, SLOT( slotInviteOthers() ), actionCollection(), "yahooInvite"); + m_actionInvite = new KAction( i18n( "&Invite others" ), "kontact_contacts", this, TQT_SLOT( slotInviteOthers() ), actionCollection(), "yahooInvite"); setXMLFile("yahooconferenceui.rc"); } @@ -62,7 +62,7 @@ YahooAccount *YahooConferenceChatSession::account() return static_cast< YahooAccount *>( Kopete::ChatSession::account() ); } -const QString &YahooConferenceChatSession::room() +const TQString &YahooConferenceChatSession::room() { return m_yahooRoom; } @@ -90,8 +90,8 @@ void YahooConferenceChatSession::slotMessageSent( Kopete::Message & message, Kop void YahooConferenceChatSession::slotInviteOthers() { - QStringList buddies; - QDictIterator it( account()->contacts() ); + TQStringList buddies; + TQDictIterator it( account()->contacts() ); Kopete::Contact *myself = account()->myself(); for( ; it.current(); ++it ) { @@ -100,11 +100,11 @@ void YahooConferenceChatSession::slotInviteOthers() } YahooInviteListImpl *dlg = new YahooInviteListImpl( Kopete::UI::Global::mainWidget() ); - QObject::connect( dlg, SIGNAL( readyToInvite( const QString &, const QStringList &, const QStringList &, const QString & ) ), - account(), SLOT( slotAddInviteConference( const QString &, const QStringList &, const QStringList &, const QString & ) ) ); + TQObject::connect( dlg, TQT_SIGNAL( readyToInvite( const TQString &, const TQStringList &, const TQStringList &, const TQString & ) ), + account(), TQT_SLOT( slotAddInviteConference( const TQString &, const TQStringList &, const TQStringList &, const TQString & ) ) ); dlg->setRoom( m_yahooRoom ); dlg->fillFriendList( buddies ); - for( QPtrList::ConstIterator it = members().begin(); it != members().end(); it++ ) + for( TQPtrList::ConstIterator it = members().begin(); it != members().end(); it++ ) dlg->addParticipant( (*it)->contactId() ); dlg->show(); } diff --git a/kopete/protocols/yahoo/yahooconferencemessagemanager.h b/kopete/protocols/yahoo/yahooconferencemessagemanager.h index 60771fab..086d229a 100644 --- a/kopete/protocols/yahoo/yahooconferencemessagemanager.h +++ b/kopete/protocols/yahoo/yahooconferencemessagemanager.h @@ -34,12 +34,12 @@ class YahooConferenceChatSession : public Kopete::ChatSession Q_OBJECT public: - YahooConferenceChatSession( const QString &m_yahooRoom, Kopete::Protocol *protocol, const Kopete::Contact *user, Kopete::ContactPtrList others, const char *name = 0 ); + YahooConferenceChatSession( const TQString &m_yahooRoom, Kopete::Protocol *protocol, const Kopete::Contact *user, Kopete::ContactPtrList others, const char *name = 0 ); ~YahooConferenceChatSession(); void joined( YahooContact *c ); void left( YahooContact *c ); - const QString &room(); + const TQString &room(); YahooAccount *account(); signals: void leavingConference( YahooConferenceChatSession *s ); @@ -47,7 +47,7 @@ protected slots: void slotMessageSent( Kopete::Message &message, Kopete::ChatSession * ); void slotInviteOthers(); private: - QString m_yahooRoom; + TQString m_yahooRoom; KAction *m_actionInvite; }; diff --git a/kopete/protocols/yahoo/yahoocontact.cpp b/kopete/protocols/yahoo/yahoocontact.cpp index d5f79250..d26eb739 100644 --- a/kopete/protocols/yahoo/yahoocontact.cpp +++ b/kopete/protocols/yahoo/yahoocontact.cpp @@ -39,9 +39,9 @@ #include "sendfiletask.h" // QT Includes -#include -#include -#include +#include +#include +#include // KDE Includes #include @@ -60,7 +60,7 @@ #include #include -YahooContact::YahooContact( YahooAccount *account, const QString &userId, const QString &fullName, Kopete::MetaContact *metaContact ) +YahooContact::YahooContact( YahooAccount *account, const TQString &userId, const TQString &fullName, Kopete::MetaContact *metaContact ) : Kopete::Contact( account, userId, metaContact ) { //kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -99,7 +99,7 @@ YahooContact::~YahooContact() m_YABEntry = 0L; } -QString YahooContact::userId() const +TQString YahooContact::userId() const { return m_userId; } @@ -113,7 +113,7 @@ void YahooContact::setOnlineStatus(const Kopete::OnlineStatus &status) (status.weight()==0) ? 0 : (status.weight() -1) , protocol() , status.internalStatus()+1000 , - status.overlayIcons() + QStringList("yahoo_stealthed") , + status.overlayIcons() + TQStringList("yahoo_stealthed") , i18n("%1|Stealthed").arg( status.description() ) ) ); } else if( !m_stealthed && status.internalStatus() > 999 )// Stealthed -> Not Stealthed @@ -136,7 +136,7 @@ bool YahooContact::stealthed() return m_stealthed; } -void YahooContact::serialize(QMap &serializedData, QMap &addressBookData) +void YahooContact::serialize(TQMap &serializedData, TQMap &addressBookData) { //kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -173,7 +173,7 @@ void YahooContact::sync(unsigned int flags) } else { - QString newGroup = metaContact()->groups().first()->displayName(); + TQString newGroup = metaContact()->groups().first()->displayName(); if ( flags & Kopete::Contact::MovedBetweenGroup ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << "contact changed groups. moving on server" << endl; @@ -206,22 +206,22 @@ Kopete::ChatSession *YahooContact::manager( Kopete::Contact::CanCreateFlags canC Kopete::ContactPtrList m_them; m_them.append( this ); m_manager = new YahooChatSession( protocol(), account()->myself(), m_them ); - connect( m_manager, SIGNAL( destroyed() ), this, SLOT( slotChatSessionDestroyed() ) ); - connect( m_manager, SIGNAL( messageSent ( Kopete::Message&, Kopete::ChatSession* ) ), this, SLOT( slotSendMessage( Kopete::Message& ) ) ); - connect( m_manager, SIGNAL( myselfTyping( bool) ), this, SLOT( slotTyping( bool ) ) ); - connect( m_account, SIGNAL( receivedTypingMsg( const QString &, bool ) ), m_manager, SLOT( receivedTypingMsg( const QString&, bool ) ) ); - connect( this, SIGNAL(displayPictureChanged()), m_manager, SLOT(slotDisplayPictureChanged())); + connect( m_manager, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotChatSessionDestroyed() ) ); + connect( m_manager, TQT_SIGNAL( messageSent ( Kopete::Message&, Kopete::ChatSession* ) ), this, TQT_SLOT( slotSendMessage( Kopete::Message& ) ) ); + connect( m_manager, TQT_SIGNAL( myselfTyping( bool) ), this, TQT_SLOT( slotTyping( bool ) ) ); + connect( m_account, TQT_SIGNAL( receivedTypingMsg( const TQString &, bool ) ), m_manager, TQT_SLOT( receivedTypingMsg( const TQString&, bool ) ) ); + connect( this, TQT_SIGNAL(displayPictureChanged()), m_manager, TQT_SLOT(slotDisplayPictureChanged())); } return m_manager; } -QString YahooContact::prepareMessage( const QString &messageText ) +TQString YahooContact::prepareMessage( const TQString &messageText ) { // Yahoo does not understand XML/HTML message data, so send plain text // instead. (Yahoo has its own format for "rich text".) - QString newMsg( messageText ); - QRegExp regExp; + TQString newMsg( messageText ); + TQRegExp regExp; int pos = 0; regExp.setMinimal( true ); @@ -232,7 +232,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("\033[1m\\3\033[x1m" ) ); + newMsg.replace( regExp, TQString::fromLatin1("\033[1m\\3\033[x1m" ) ); } } @@ -243,7 +243,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("\033[4m\\3\033[x4m" ) ); + newMsg.replace( regExp, TQString::fromLatin1("\033[4m\\3\033[x4m" ) ); } } @@ -254,7 +254,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("\033[2m\\3\033[x2m" ) ); + newMsg.replace( regExp, TQString::fromLatin1("\033[2m\\3\033[x2m" ) ); } } @@ -265,7 +265,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("\033[#\\2m\\4\033[#000000m" ) ); + newMsg.replace( regExp, TQString::fromLatin1("\033[#\\2m\\4\033[#000000m" ) ); } } @@ -276,7 +276,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("\\4" ) ); + newMsg.replace( regExp, TQString::fromLatin1("\\4" ) ); } } @@ -287,7 +287,7 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("\\4" ) ); + newMsg.replace( regExp, TQString::fromLatin1("\\4" ) ); } } @@ -298,18 +298,18 @@ QString YahooContact::prepareMessage( const QString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, QString::fromLatin1("\\2") ); + newMsg.replace( regExp, TQString::fromLatin1("\\2") ); } } // convert escaped chars - newMsg.replace( QString::fromLatin1( ">" ), QString::fromLatin1( ">" ) ); - newMsg.replace( QString::fromLatin1( "<" ), QString::fromLatin1( "<" ) ); - newMsg.replace( QString::fromLatin1( """ ), QString::fromLatin1( "\"" ) ); - newMsg.replace( QString::fromLatin1( " " ), QString::fromLatin1( " " ) ); - newMsg.replace( QString::fromLatin1( "&" ), QString::fromLatin1( "&" ) ); - newMsg.replace( QString::fromLatin1( "
    " ), QString::fromLatin1( "\r" ) ); - newMsg.replace( QString::fromLatin1( "
    " ), QString::fromLatin1( "\r" ) ); + newMsg.replace( TQString::fromLatin1( ">" ), TQString::fromLatin1( ">" ) ); + newMsg.replace( TQString::fromLatin1( "<" ), TQString::fromLatin1( "<" ) ); + newMsg.replace( TQString::fromLatin1( """ ), TQString::fromLatin1( "\"" ) ); + newMsg.replace( TQString::fromLatin1( " " ), TQString::fromLatin1( " " ) ); + newMsg.replace( TQString::fromLatin1( "&" ), TQString::fromLatin1( "&" ) ); + newMsg.replace( TQString::fromLatin1( "
    " ), TQString::fromLatin1( "\r" ) ); + newMsg.replace( TQString::fromLatin1( "
    " ), TQString::fromLatin1( "\r" ) ); return newMsg; } @@ -318,7 +318,7 @@ void YahooContact::slotSendMessage( Kopete::Message &message ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QString messageText = message.escapedBody(); + TQString messageText = message.escapedBody(); kdDebug(YAHOO_GEN_DEBUG) << "Original message: " << messageText << endl; messageText = prepareMessage( messageText ); kdDebug(YAHOO_GEN_DEBUG) << "Converted message: " << messageText << endl; @@ -339,10 +339,10 @@ void YahooContact::slotSendMessage( Kopete::Message &message ) manager(Kopete::Contact::CanCreate)->messageSucceeded(); } -void YahooContact::sendFile( const KURL &sourceURL, const QString &fileName, uint fileSize ) +void YahooContact::sendFile( const KURL &sourceURL, const TQString &fileName, uint fileSize ) { Kopete::TransferManager::transferManager()->sendFile( sourceURL, fileName, fileSize, - false, this, SLOT(slotSendFile( const KURL & )) ); + false, this, TQT_SLOT(slotSendFile( const KURL & )) ); } void YahooContact::slotTyping(bool isTyping_ ) @@ -361,13 +361,13 @@ void YahooContact::slotChatSessionDestroyed() m_sessionActive = false; } -QPtrList *YahooContact::customContextMenuActions() +TQPtrList *YahooContact::customContextMenuActions() { - QPtrList *actionCollection = new QPtrList(); + TQPtrList *actionCollection = new TQPtrList(); if ( !m_webcamAction ) { m_webcamAction = new KAction( i18n( "View &Webcam" ), "webcamreceive", KShortcut(), - this, SLOT( requestWebcam() ), this, "view_webcam" ); + this, TQT_SLOT( requestWebcam() ), this, "view_webcam" ); } if ( isReachable() ) m_webcamAction->setEnabled( true ); @@ -378,7 +378,7 @@ QPtrList *YahooContact::customContextMenuActions() if( !m_inviteWebcamAction ) { m_inviteWebcamAction = new KAction( i18n( "Invite to view your Webcam" ), "webcamsend", KShortcut(), - this, SLOT( inviteWebcam() ), this, "invite_webcam" ); + this, TQT_SLOT( inviteWebcam() ), this, "invite_webcam" ); } if ( isReachable() ) m_inviteWebcamAction->setEnabled( true ); @@ -388,7 +388,7 @@ QPtrList *YahooContact::customContextMenuActions() if ( !m_buzzAction ) { - m_buzzAction = new KAction( i18n( "&Buzz Contact" ), "bell", KShortcut(), this, SLOT( buzzContact() ), this, "buzz_contact"); + m_buzzAction = new KAction( i18n( "&Buzz Contact" ), "bell", KShortcut(), this, TQT_SLOT( buzzContact() ), this, "buzz_contact"); } if ( isReachable() ) m_buzzAction->setEnabled( true ); @@ -398,7 +398,7 @@ QPtrList *YahooContact::customContextMenuActions() if ( !m_stealthAction ) { - m_stealthAction = new KAction( i18n( "&Stealth Setting" ), "yahoo_stealthed", KShortcut(), this, SLOT( stealthContact() ), this, "stealth_contact"); + m_stealthAction = new KAction( i18n( "&Stealth Setting" ), "yahoo_stealthed", KShortcut(), this, TQT_SLOT( stealthContact() ), this, "stealth_contact"); } if ( isReachable() ) m_stealthAction->setEnabled( true ); @@ -408,7 +408,7 @@ QPtrList *YahooContact::customContextMenuActions() if ( !m_inviteConferenceAction ) { - m_inviteConferenceAction = new KAction( i18n( "&Invite to Conference" ), "kontact_contacts", KShortcut(), this, SLOT( inviteConference() ), this, "invite_conference"); + m_inviteConferenceAction = new KAction( i18n( "&Invite to Conference" ), "kontact_contacts", KShortcut(), this, TQT_SLOT( inviteConference() ), this, "invite_conference"); } if ( isReachable() ) m_inviteConferenceAction->setEnabled( true ); @@ -418,7 +418,7 @@ QPtrList *YahooContact::customContextMenuActions() if ( !m_profileAction ) { - m_profileAction = new KAction( i18n( "&View Yahoo Profile" ), "kontact_notes", KShortcut(), this, SLOT( slotUserProfile() ), this, "profile_contact"); + m_profileAction = new KAction( i18n( "&View Yahoo Profile" ), "kontact_notes", KShortcut(), this, TQT_SLOT( slotUserProfile() ), this, "profile_contact"); } m_profileAction->setEnabled( true ); actionCollection->append( m_profileAction ); @@ -440,14 +440,14 @@ void YahooContact::slotUserInfo() dlg->setData( *m_YABEntry ); dlg->setAccountConnected( m_account->isConnected() ); dlg->show(); - QObject::connect( dlg, SIGNAL(saveYABEntry( YABEntry & )), m_account, SLOT(slotSaveYABEntry( YABEntry & ))); + TQObject::connect( dlg, TQT_SIGNAL(saveYABEntry( YABEntry & )), m_account, TQT_SLOT(slotSaveYABEntry( YABEntry & ))); } void YahooContact::slotUserProfile() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QString profileSiteString = QString::fromLatin1("http://profiles.yahoo.com/") + userId(); + TQString profileSiteString = TQString::fromLatin1("http://profiles.yahoo.com/") + userId(); KRun::runURL( KURL( profileSiteString ) , "text/html" ); } @@ -477,7 +477,7 @@ void YahooContact::stealthContact() // Show dialog - if ( stealthSettingDialog->exec() == QDialog::Rejected ) + if ( stealthSettingDialog->exec() == TQDialog::Rejected ) { stealthSettingDialog->delayedDestruct(); return; @@ -518,7 +518,7 @@ void YahooContact::buzzContact() Kopete::Message msg = Kopete::Message( manager(Kopete::Contact::CannotCreate)->myself() , manager(Kopete::Contact::CannotCreate)->members(), i18n("Buzzz!!!"), Kopete::Message::Outbound, Kopete::Message::PlainText, - QString::null , Kopete::Message::TypeAction); + TQString::null , Kopete::Message::TypeAction); view->appendMessage( msg ); } } @@ -530,7 +530,7 @@ void YahooContact::sendBuddyIconChecksum( int checksum ) } -void YahooContact::sendBuddyIconInfo( const QString &url, int checksum ) +void YahooContact::sendBuddyIconInfo( const TQString &url, int checksum ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; m_account->yahooSession()->sendPictureInformation( m_userId, url, checksum ); @@ -545,14 +545,14 @@ void YahooContact::sendBuddyIconUpdate( int type ) } // new version -void YahooContact::setDisplayPicture(const QByteArray &data, int checksum) +void YahooContact::setDisplayPicture(const TQByteArray &data, int checksum) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << data.size() << endl; - QString newlocation = locateLocal( "appdata", "yahoopictures/"+ contactId().lower().replace(QRegExp("[./~]"),"-") +".png" ) ; + TQString newlocation = locateLocal( "appdata", "yahoopictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ; setProperty( YahooProtocol::protocol()->iconCheckSum, checksum ); - QFile f( newlocation ); + TQFile f( newlocation ); if (!f.open( IO_WriteOnly )) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << "Saving of " << newlocation << " failed!" << endl; @@ -561,7 +561,7 @@ void YahooContact::setDisplayPicture(const QByteArray &data, int checksum) f.writeBlock(data.data(), data.size()); f.close(); - setProperty( Kopete::Global::Properties::self()->photo(), QString() ); + setProperty( Kopete::Global::Properties::self()->photo(), TQString() ); setProperty( Kopete::Global::Properties::self()->photo() , newlocation ); emit displayPictureChanged(); @@ -590,8 +590,8 @@ const YABEntry *YahooContact::yabEntry() void YahooContact::slotEmitDisplayPictureChanged() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - QString newlocation=locateLocal( "appdata", "yahoopictures/"+ contactId().lower().replace(QRegExp("[./~]"),"-") +".png" ) ; - setProperty( Kopete::Global::Properties::self()->photo(), QString::null ); + TQString newlocation=locateLocal( "appdata", "yahoopictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ; + setProperty( Kopete::Global::Properties::self()->photo(), TQString::null ); setProperty( Kopete::Global::Properties::self()->photo() , newlocation ); emit displayPictureChanged(); } @@ -613,7 +613,7 @@ void YahooContact::inviteWebcam() m_account->yahooSession()->sendWebcamInvite( m_userId ); } -void YahooContact::receivedWebcamImage( const QPixmap& image ) +void YahooContact::receivedWebcamImage( const TQPixmap& image ) { if( !m_webcamDialog ) initWebcamViewer(); @@ -639,19 +639,19 @@ void YahooContact::initWebcamViewer() if ( !m_webcamDialog ) { m_webcamDialog = new YahooWebcamDialog( userId(), Kopete::UI::Global::mainWidget() ); -// QObject::connect( m_webcamDialog, SIGNAL( closeClicked() ), this, SLOT( closeWebcamDialog() ) ); +// TQObject::connect( m_webcamDialog, TQT_SIGNAL( closeClicked() ), this, TQT_SLOT( closeWebcamDialog() ) ); - QObject::connect( this, SIGNAL( signalWebcamClosed( int ) ), - m_webcamDialog, SLOT( webcamClosed( int ) ) ); + TQObject::connect( this, TQT_SIGNAL( signalWebcamClosed( int ) ), + m_webcamDialog, TQT_SLOT( webcamClosed( int ) ) ); - QObject::connect( this, SIGNAL( signalWebcamPaused() ), - m_webcamDialog, SLOT( webcamPaused() ) ); + TQObject::connect( this, TQT_SIGNAL( signalWebcamPaused() ), + m_webcamDialog, TQT_SLOT( webcamPaused() ) ); - QObject::connect( this, SIGNAL ( signalReceivedWebcamImage( const QPixmap& ) ), - m_webcamDialog, SLOT( newImage( const QPixmap& ) ) ); + TQObject::connect( this, TQT_SIGNAL ( signalReceivedWebcamImage( const TQPixmap& ) ), + m_webcamDialog, TQT_SLOT( newImage( const TQPixmap& ) ) ); - QObject::connect( m_webcamDialog, SIGNAL ( closingWebcamDialog ( ) ), - this, SLOT ( closeWebcamDialog ( ) ) ); + TQObject::connect( m_webcamDialog, TQT_SIGNAL ( closingWebcamDialog ( ) ), + this, TQT_SLOT ( closeWebcamDialog ( ) ) ); } m_webcamDialog->show(); } @@ -673,17 +673,17 @@ void YahooContact::requestWebcam() void YahooContact::closeWebcamDialog() { - QObject::disconnect( this, SIGNAL( signalWebcamClosed( int ) ), - m_webcamDialog, SLOT( webcamClosed( int ) ) ); + TQObject::disconnect( this, TQT_SIGNAL( signalWebcamClosed( int ) ), + m_webcamDialog, TQT_SLOT( webcamClosed( int ) ) ); - QObject::disconnect( this, SIGNAL( signalWebcamPaused() ), - m_webcamDialog, SLOT( webcamPaused( ) ) ); + TQObject::disconnect( this, TQT_SIGNAL( signalWebcamPaused() ), + m_webcamDialog, TQT_SLOT( webcamPaused( ) ) ); - QObject::disconnect( this, SIGNAL ( signalReceivedWebcamImage( const QPixmap& ) ), - m_webcamDialog, SLOT( newImage( const QPixmap& ) ) ); + TQObject::disconnect( this, TQT_SIGNAL ( signalReceivedWebcamImage( const TQPixmap& ) ), + m_webcamDialog, TQT_SLOT( newImage( const TQPixmap& ) ) ); - QObject::disconnect( m_webcamDialog, SIGNAL ( closingWebcamDialog ( ) ), - this, SLOT ( closeWebcamDialog ( ) ) ); + TQObject::disconnect( m_webcamDialog, TQT_SIGNAL ( closingWebcamDialog ( ) ), + this, TQT_SLOT ( closeWebcamDialog ( ) ) ); if( m_receivingWebcam ) m_account->yahooSession()->closeWebcam( contactId() ); m_webcamDialog->delayedDestruct(); @@ -826,8 +826,8 @@ void YahooContact::readYABEntry() m_YABEntry->workURL = property( YahooProtocol::protocol()->propWorkURL ).value().toString(); // Miscellanous - m_YABEntry->birthday = QDate::fromString( property( YahooProtocol::protocol()->propBirthday ).value().toString(), Qt::ISODate ); - m_YABEntry->anniversary = QDate::fromString( property( YahooProtocol::protocol()->propAnniversary ).value().toString(), Qt::ISODate ); + m_YABEntry->birthday = TQDate::fromString( property( YahooProtocol::protocol()->propBirthday ).value().toString(), Qt::ISODate ); + m_YABEntry->anniversary = TQDate::fromString( property( YahooProtocol::protocol()->propAnniversary ).value().toString(), Qt::ISODate ); m_YABEntry->notes = property( YahooProtocol::protocol()->propNotes ).value().toString(); m_YABEntry->additional1 = property( YahooProtocol::protocol()->propAdditional1 ).value().toString(); m_YABEntry->additional2 = property( YahooProtocol::protocol()->propAdditional2 ).value().toString(); diff --git a/kopete/protocols/yahoo/yahoocontact.h b/kopete/protocols/yahoo/yahoocontact.h index 53759252..092a2c93 100644 --- a/kopete/protocols/yahoo/yahoocontact.h +++ b/kopete/protocols/yahoo/yahoocontact.h @@ -42,15 +42,15 @@ class YahooContact : public Kopete::Contact { Q_OBJECT public: - YahooContact( YahooAccount *account, const QString &userId, const QString &fullName, Kopete::MetaContact *metaContact ); + YahooContact( YahooAccount *account, const TQString &userId, const TQString &fullName, Kopete::MetaContact *metaContact ); ~YahooContact(); /** Base Class Reimplementations **/ virtual bool isOnline() const; virtual bool isReachable(); - virtual QPtrList *customContextMenuActions(); + virtual TQPtrList *customContextMenuActions(); virtual Kopete::ChatSession *manager( Kopete::Contact::CanCreateFlags canCreate= Kopete::Contact::CanCreate ); - virtual void serialize( QMap &serializedData, QMap &addressBookData ); + virtual void serialize( TQMap &serializedData, TQMap &addressBookData ); void setOnlineStatus(const Kopete::OnlineStatus &status); void setYahooStatus( const Kopete::OnlineStatus& ); @@ -59,32 +59,32 @@ public: /** The group name getter and setter methods**/ - QString group() const; - void setGroup( const QString& ); + TQString group() const; + void setGroup( const TQString& ); /** The userId getter method**/ - QString userId() const; + TQString userId() const; - void receivedWebcamImage( const QPixmap& ); + void receivedWebcamImage( const TQPixmap& ); void webcamClosed( int ); void webcamPaused(); const YABEntry *yabEntry(); - static QString prepareMessage( const QString &messageText ); + static TQString prepareMessage( const TQString &messageText ); public slots: virtual void slotUserInfo(); virtual void slotSendFile( const KURL &file ); virtual void deleteContact(); - virtual void sendFile( const KURL &sourceURL = KURL(), const QString &fileName = QString::null, uint fileSize = 0L ); + virtual void sendFile( const KURL &sourceURL = KURL(), const TQString &fileName = TQString::null, uint fileSize = 0L ); void slotUserProfile(); void stealthContact(); void requestWebcam(); void inviteWebcam(); void buzzContact(); - void setDisplayPicture(const QByteArray &data, int checksum); - void sendBuddyIconInfo( const QString &url, int checksum ); + void setDisplayPicture(const TQByteArray &data, int checksum); + void sendBuddyIconInfo( const TQString &url, int checksum ); void sendBuddyIconUpdate( int type ); void sendBuddyIconChecksum( int checksum ); void setYABEntry( YABEntry *, bool show = false ); @@ -98,7 +98,7 @@ public slots: void sync(unsigned int flags); signals: - void signalReceivedWebcamImage( const QPixmap &pic ); + void signalReceivedWebcamImage( const TQPixmap &pic ); void signalWebcamClosed( int reason ); void signalWebcamPaused(); void displayPictureChanged(); @@ -117,8 +117,8 @@ private slots: void readYABEntry(); private: - QString m_userId; - QString m_groupName; + TQString m_userId; + TQString m_groupName; YABEntry *m_YABEntry; YahooChatSession *m_manager; YahooWebcamDialog* m_webcamDialog; diff --git a/kopete/protocols/yahoo/yahooeditaccount.cpp b/kopete/protocols/yahoo/yahooeditaccount.cpp index c83905ed..c2508a58 100644 --- a/kopete/protocols/yahoo/yahooeditaccount.cpp +++ b/kopete/protocols/yahoo/yahooeditaccount.cpp @@ -17,14 +17,14 @@ */ // QT Includes -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE Includes #include @@ -47,7 +47,7 @@ #include "yahooeditaccount.h" // Yahoo Add Contact page -YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *theAccount, QWidget *parent, const char* /*name*/): YahooEditAccountBase(parent), KopeteEditAccountWidget(theAccount) +YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *theAccount, TQWidget *parent, const char* /*name*/): YahooEditAccountBase(parent), KopeteEditAccountWidget(theAccount) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -63,7 +63,7 @@ YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *the mAutoConnect->setChecked(acct->excludeConnect()); mPasswordWidget->load( &acct->password() ); - QString pagerServer = account()->configGroup()->readEntry("Server", "scs.msg.yahoo.com"); + TQString pagerServer = account()->configGroup()->readEntry("Server", "scs.msg.yahoo.com"); int pagerPort = account()->configGroup()->readNumEntry("Port", 5050); if( pagerServer != "scs.msg.yahoo.com" || pagerPort != 5050 ) optionOverrideServer->setChecked( true ); @@ -72,11 +72,11 @@ YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *the editServerAddress->setText( pagerServer ); sbxServerPort->setValue( pagerPort ); - QString iconUrl = account()->configGroup()->readEntry("pictureUrl", ""); + TQString iconUrl = account()->configGroup()->readEntry("pictureUrl", ""); bool sendPicture = account()->configGroup()->readBoolEntry("sendPicture", false); optionSendBuddyIcon->setChecked( sendPicture ); buttonSelectPicture->setEnabled( sendPicture ); - connect( optionSendBuddyIcon, SIGNAL( toggled( bool ) ), buttonSelectPicture, SLOT( setEnabled( bool ) ) ); + connect( optionSendBuddyIcon, TQT_SIGNAL( toggled( bool ) ), buttonSelectPicture, TQT_SLOT( setEnabled( bool ) ) ); editPictureUrl->setText( iconUrl ); if( !iconUrl.isEmpty() ) m_Picture->setPixmap( KURL( iconUrl ).path() ); @@ -86,15 +86,15 @@ YahooEditAccount::YahooEditAccount(YahooProtocol *protocol, Kopete::Account *the mGlobalIdentity->setChecked( account()->configGroup()->readBoolEntry("ExcludeGlobalIdentity", false) ); } - QObject::connect(buttonRegister, SIGNAL(clicked()), this, SLOT(slotOpenRegister())); - QObject::connect(buttonSelectPicture, SIGNAL(clicked()), this, SLOT(slotSelectPicture())); + TQObject::connect(buttonRegister, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpenRegister())); + TQObject::connect(buttonSelectPicture, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectPicture())); optionSendBuddyIcon->setEnabled( account() ); /* Set tab order to password custom widget correctly */ - QWidget::setTabOrder( mAutoConnect, mPasswordWidget->mRemembered ); - QWidget::setTabOrder( mPasswordWidget->mRemembered, mPasswordWidget->mPassword ); - QWidget::setTabOrder( mPasswordWidget->mPassword, buttonRegister ); + TQWidget::setTabOrder( mAutoConnect, mPasswordWidget->mRemembered ); + TQWidget::setTabOrder( mPasswordWidget->mRemembered, mPasswordWidget->mPassword ); + TQWidget::setTabOrder( mPasswordWidget->mPassword, buttonRegister ); show(); } @@ -148,7 +148,7 @@ Kopete::Account *YahooEditAccount::apply() } else { - yahooAccount->setBuddyIcon( KURL( QString::null ) ); + yahooAccount->setBuddyIcon( KURL( TQString::null ) ); } // Global Identity @@ -164,16 +164,16 @@ void YahooEditAccount::slotOpenRegister() void YahooEditAccount::slotSelectPicture() { - KURL file = KFileDialog::getImageOpenURL( QString::null, this, i18n( "Yahoo Buddy Icon" ) ); + KURL file = KFileDialog::getImageOpenURL( TQString::null, this, i18n( "Yahoo Buddy Icon" ) ); if ( file.isEmpty() ) return; - QImage picture(file.path()); + TQImage picture(file.path()); if( !picture.isNull() ) { - picture = KPixmapRegionSelectorDialog::getSelectedImage( QPixmap(picture), 96, 96, this ); - QString newlocation( locateLocal( "appdata", "yahoopictures/"+ file.fileName().lower() ) ) ; + picture = KPixmapRegionSelectorDialog::getSelectedImage( TQPixmap(picture), 96, 96, this ); + TQString newlocation( locateLocal( "appdata", "yahoopictures/"+ file.fileName().lower() ) ) ; file = KURL(newlocation); if( !picture.save( newlocation, "PNG" )) { diff --git a/kopete/protocols/yahoo/yahooeditaccount.h b/kopete/protocols/yahoo/yahooeditaccount.h index 17a93752..a64d88f7 100644 --- a/kopete/protocols/yahoo/yahooeditaccount.h +++ b/kopete/protocols/yahoo/yahooeditaccount.h @@ -41,7 +41,7 @@ private: Kopete::UI::PasswordWidget *mPasswordWidget; public: - YahooEditAccount(YahooProtocol *protocol, Kopete::Account *theAccount, QWidget *parent = 0, const char *name = 0); + YahooEditAccount(YahooProtocol *protocol, Kopete::Account *theAccount, TQWidget *parent = 0, const char *name = 0); virtual bool validateData(); diff --git a/kopete/protocols/yahoo/yahooprotocol.cpp b/kopete/protocols/yahoo/yahooprotocol.cpp index 32c3c55c..dc2e3cdc 100644 --- a/kopete/protocols/yahoo/yahooprotocol.cpp +++ b/kopete/protocols/yahoo/yahooprotocol.cpp @@ -37,10 +37,10 @@ typedef KGenericFactory YahooProtocolFactory; K_EXPORT_COMPONENT_FACTORY( kopete_yahoo, YahooProtocolFactory( "kopete_yahoo" ) ) -YahooProtocol::YahooProtocol( QObject *parent, const char *name, const QStringList & ) +YahooProtocol::YahooProtocol( TQObject *parent, const char *name, const TQStringList & ) : Kopete::Protocol( YahooProtocolFactory::instance(), parent, name ), - Offline( Kopete::OnlineStatus::Offline, 0, this, 0x5a55aa56, QString::null, i18n( "Offline" ), i18n( "Offline" ), Kopete::OnlineStatusManager::Offline ), - Online( Kopete::OnlineStatus::Online, 25, this, 0, QString::null, i18n( "Online" ), i18n( "Online" ), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HasAwayMessage ), + Offline( Kopete::OnlineStatus::Offline, 0, this, 0x5a55aa56, TQString::null, i18n( "Offline" ), i18n( "Offline" ), Kopete::OnlineStatusManager::Offline ), + Online( Kopete::OnlineStatus::Online, 25, this, 0, TQString::null, i18n( "Online" ), i18n( "Online" ), Kopete::OnlineStatusManager::Online, Kopete::OnlineStatusManager::HasAwayMessage ), BeRightBack( Kopete::OnlineStatus::Away, 22, this, 1, "contact_away_overlay", i18n( "Be right back" ), i18n( "Be right back" ) ), Busy( Kopete::OnlineStatus::Away, 20, this, 2, "contact_busy_overlay", i18n( "Busy" ), i18n( "Busy" ), Kopete::OnlineStatusManager::Busy, Kopete::OnlineStatusManager::HasAwayMessage ), NotAtHome( Kopete::OnlineStatus::Away, 17, this, 3, "contact_xa_overlay", i18n( "Not at home" ), i18n( "Not at home" ), Kopete::OnlineStatusManager::ExtendedAway ), @@ -55,51 +55,51 @@ YahooProtocol::YahooProtocol( QObject *parent, const char *name, const QStringLi Idle( Kopete::OnlineStatus::Away, 15, this, 999, "yahoo_idle", i18n( "Idle" ), i18n( "Idle" ), Kopete::OnlineStatusManager::Idle ), Connecting( Kopete::OnlineStatus::Connecting,2, this, 555, "yahoo_connecting", i18n( "Connecting" ) ), awayMessage(Kopete::Global::Properties::self()->awayMessage()), - iconCheckSum("iconCheckSum", i18n("Buddy Icon Checksum"), QString::null, true, false, true), - iconExpire("iconExpire", i18n("Buddy Icon Expire"), QString::null, true, false, true), - iconRemoteUrl("iconRemoteUrl", i18n("Buddy Icon Remote Url"), QString::null, true, false, true), + iconCheckSum("iconCheckSum", i18n("Buddy Icon Checksum"), TQString::null, true, false, true), + iconExpire("iconExpire", i18n("Buddy Icon Expire"), TQString::null, true, false, true), + iconRemoteUrl("iconRemoteUrl", i18n("Buddy Icon Remote Url"), TQString::null, true, false, true), propfirstName(Kopete::Global::Properties::self()->firstName()), propSecondName(), propLastName(Kopete::Global::Properties::self()->lastName()), propNickName(Kopete::Global::Properties::self()->nickName()), - propTitle("YABTitle", i18n("Title"), QString::null, true, false), + propTitle("YABTitle", i18n("Title"), TQString::null, true, false), propPhoneMobile(Kopete::Global::Properties::self()->privateMobilePhone()), propEmail(Kopete::Global::Properties::self()->emailAddress()), - propYABId("YABId", i18n("YAB Id"), QString::null, true, false, true), - propPager("YABPager", i18n("Pager number"), QString::null, true, false), - propFax("YABFax", i18n("Fax number"), QString::null, true, false), - propAdditionalNumber("YABAdditionalNumber", i18n("Additional number"), QString::null, true, false), - propAltEmail1("YABAlternativeEmail1", i18n("Alternative email 1"), QString::null, true, false), - propAltEmail2("YABAlternativeEmail2", i18n("Alternative email 1"), QString::null, true, false), - propImAIM("YABIMAIM", i18n("AIM"), QString::null, true, false), - propImICQ("YABIMICQ", i18n("ICQ"), QString::null, true, false), - propImMSN("YABIMMSN", i18n("MSN"), QString::null, true, false), - propImGoogleTalk("YABIMGoogleTalk", i18n("GoogleTalk"), QString::null, true, false), - propImSkype("YABIMSkype", i18n("Skype"), QString::null, true, false), - propImIRC("YABIMIRC", i18n("IRC"), QString::null, true, false), - propImQQ("YABIMQQ", i18n("QQ"), QString::null, true, false), - propPrivateAddress("YABPrivateAddress", i18n("Private Address"), QString::null, true, false), - propPrivateCity("YABPrivateCity", i18n("Private City"), QString::null, true, false), - propPrivateState("YABPrivateState", i18n("Private State"), QString::null, true, false), - propPrivateZIP("YABPrivateZIP", i18n("Private ZIP"), QString::null, true, false), - propPrivateCountry("YABPrivateCountry", i18n("Private Country"), QString::null, true, false), + propYABId("YABId", i18n("YAB Id"), TQString::null, true, false, true), + propPager("YABPager", i18n("Pager number"), TQString::null, true, false), + propFax("YABFax", i18n("Fax number"), TQString::null, true, false), + propAdditionalNumber("YABAdditionalNumber", i18n("Additional number"), TQString::null, true, false), + propAltEmail1("YABAlternativeEmail1", i18n("Alternative email 1"), TQString::null, true, false), + propAltEmail2("YABAlternativeEmail2", i18n("Alternative email 1"), TQString::null, true, false), + propImAIM("YABIMAIM", i18n("AIM"), TQString::null, true, false), + propImICQ("YABIMICQ", i18n("ICQ"), TQString::null, true, false), + propImMSN("YABIMMSN", i18n("MSN"), TQString::null, true, false), + propImGoogleTalk("YABIMGoogleTalk", i18n("GoogleTalk"), TQString::null, true, false), + propImSkype("YABIMSkype", i18n("Skype"), TQString::null, true, false), + propImIRC("YABIMIRC", i18n("IRC"), TQString::null, true, false), + propImQQ("YABIMQQ", i18n("QQ"), TQString::null, true, false), + propPrivateAddress("YABPrivateAddress", i18n("Private Address"), TQString::null, true, false), + propPrivateCity("YABPrivateCity", i18n("Private City"), TQString::null, true, false), + propPrivateState("YABPrivateState", i18n("Private State"), TQString::null, true, false), + propPrivateZIP("YABPrivateZIP", i18n("Private ZIP"), TQString::null, true, false), + propPrivateCountry("YABPrivateCountry", i18n("Private Country"), TQString::null, true, false), propPrivatePhone(Kopete::Global::Properties::self()->privatePhone()), - propPrivateURL("YABPrivateURL", i18n("Private URL"), QString::null, true, false), - propCorporation("YABCorporation", i18n("Corporation"), QString::null, true, false), - propWorkAddress("YABWorkAddress", i18n("Work Address"), QString::null, true, false), - propWorkCity("YABWorkCity", i18n("Work City"), QString::null, true, false), - propWorkState("YABWorkState", i18n("Work State"), QString::null, true, false), - propWorkZIP("YABWorkZIP", i18n("Work ZIP"), QString::null, true, false), - propWorkCountry("YABWorkCountry", i18n("Work Country"), QString::null, true, false), + propPrivateURL("YABPrivateURL", i18n("Private URL"), TQString::null, true, false), + propCorporation("YABCorporation", i18n("Corporation"), TQString::null, true, false), + propWorkAddress("YABWorkAddress", i18n("Work Address"), TQString::null, true, false), + propWorkCity("YABWorkCity", i18n("Work City"), TQString::null, true, false), + propWorkState("YABWorkState", i18n("Work State"), TQString::null, true, false), + propWorkZIP("YABWorkZIP", i18n("Work ZIP"), TQString::null, true, false), + propWorkCountry("YABWorkCountry", i18n("Work Country"), TQString::null, true, false), propWorkPhone(Kopete::Global::Properties::self()->workPhone()), - propWorkURL("YABWorkURL", i18n("Work URL"), QString::null, true, false), - propBirthday("YABBirthday", i18n("Birthday"), QString::null, true, false), - propAnniversary("YABAnniversary", i18n("Anniversary"), QString::null, true, false), - propNotes("YABNotes", i18n("Notes"), QString::null, true, false), - propAdditional1("YABAdditional1", i18n("Additional 1"), QString::null, true, false), - propAdditional2("YABAdditional2", i18n("Additional 2"), QString::null, true, false), - propAdditional3("YABAdditional3", i18n("Additional 3"), QString::null, true, false), - propAdditional4("YABAdditional4", i18n("Additional 4"), QString::null, true, false) + propWorkURL("YABWorkURL", i18n("Work URL"), TQString::null, true, false), + propBirthday("YABBirthday", i18n("Birthday"), TQString::null, true, false), + propAnniversary("YABAnniversary", i18n("Anniversary"), TQString::null, true, false), + propNotes("YABNotes", i18n("Notes"), TQString::null, true, false), + propAdditional1("YABAdditional1", i18n("Additional 1"), TQString::null, true, false), + propAdditional2("YABAdditional2", i18n("Additional 2"), TQString::null, true, false), + propAdditional3("YABAdditional3", i18n("Additional 3"), TQString::null, true, false), + propAdditional4("YABAdditional4", i18n("Additional 4"), TQString::null, true, false) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -166,10 +166,10 @@ YahooProtocol *YahooProtocol::protocol() } Kopete::Contact *YahooProtocol::deserializeContact( Kopete::MetaContact *metaContact, - const QMap &serializedData, const QMap & /* addressBookData */ ) + const TQMap &serializedData, const TQMap & /* addressBookData */ ) { - QString contactId = serializedData[ "contactId" ]; - QString accountId = serializedData[ "accountId" ]; + TQString contactId = serializedData[ "contactId" ]; + TQString accountId = serializedData[ "accountId" ]; YahooAccount *theAccount = static_cast(Kopete::AccountManager::self()->findAccount(protocol()->pluginId(), accountId)); @@ -187,18 +187,18 @@ Kopete::Contact *YahooProtocol::deserializeContact( Kopete::MetaContact *metaCon return theAccount->contacts()[contactId]; } -AddContactPage *YahooProtocol::createAddContactWidget( QWidget * parent , Kopete::Account* ) +AddContactPage *YahooProtocol::createAddContactWidget( TQWidget * parent , Kopete::Account* ) { kdDebug(YAHOO_GEN_DEBUG) << "YahooProtocol::createAddContactWidget()" << endl; return new YahooAddContact(this, parent); } -KopeteEditAccountWidget *YahooProtocol::createEditAccountWidget(Kopete::Account *account, QWidget *parent) +KopeteEditAccountWidget *YahooProtocol::createEditAccountWidget(Kopete::Account *account, TQWidget *parent) { return new YahooEditAccount(this, account, parent); } -Kopete::Account *YahooProtocol::createNewAccount(const QString &accountId) +Kopete::Account *YahooProtocol::createNewAccount(const TQString &accountId) { return new YahooAccount(this, accountId); } diff --git a/kopete/protocols/yahoo/yahooprotocol.h b/kopete/protocols/yahoo/yahooprotocol.h index 6f399ada..4b597243 100644 --- a/kopete/protocols/yahoo/yahooprotocol.h +++ b/kopete/protocols/yahoo/yahooprotocol.h @@ -23,8 +23,8 @@ #include "kopeteonlinestatus.h" // QT Includes -#include -#include +#include +#include // KDE Includes #include "kopeteprotocol.h" @@ -43,7 +43,7 @@ class YahooProtocol : public Kopete::Protocol { Q_OBJECT public: - YahooProtocol( QObject *parent, const char *name, const QStringList &args ); + YahooProtocol( TQObject *parent, const char *name, const TQStringList &args ); ~YahooProtocol(); //Online Statuses @@ -126,15 +126,15 @@ public: static YahooProtocol *protocol(); virtual Kopete::Contact *deserializeContact( Kopete::MetaContact *metaContact, - const QMap &serializedData, - const QMap &addressBookData ); + const TQMap &serializedData, + const TQMap &addressBookData ); Kopete::OnlineStatus statusFromYahoo( int status ); public slots: - virtual AddContactPage *createAddContactWidget(QWidget * parent, Kopete::Account* a); - virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, QWidget *parent); - virtual Kopete::Account *createNewAccount(const QString &accountId); + virtual AddContactPage *createAddContactWidget(TQWidget * parent, Kopete::Account* a); + virtual KopeteEditAccountWidget *createEditAccountWidget(Kopete::Account *account, TQWidget *parent); + virtual Kopete::Account *createNewAccount(const TQString &accountId); private: diff --git a/kopete/protocols/yahoo/yahooverifyaccount.cpp b/kopete/protocols/yahoo/yahooverifyaccount.cpp index cfb3ede6..7d50e900 100644 --- a/kopete/protocols/yahoo/yahooverifyaccount.cpp +++ b/kopete/protocols/yahoo/yahooverifyaccount.cpp @@ -14,9 +14,9 @@ */ // QT Includes -#include -#include -#include +#include +#include +#include // KDE Includes #include @@ -37,7 +37,7 @@ #include "yahooverifyaccount.h" #include "yahooaccount.h" -YahooVerifyAccount::YahooVerifyAccount(Kopete::Account *account, QWidget *parent, const char *name) +YahooVerifyAccount::YahooVerifyAccount(Kopete::Account *account, TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Account Verification - Yahoo"), Cancel|Apply, Apply, true ) { @@ -59,11 +59,11 @@ void YahooVerifyAccount::setUrl( KURL url ) mFile = new KTempFile( locateLocal( "tmp", url.fileName() ) ); mFile->setAutoDelete( true ); KIO::TransferJob *transfer = KIO::get( url, false, false ); - connect( transfer, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotComplete( KIO::Job* ) ) ); - connect( transfer, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray& ) ) ); + connect( transfer, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotComplete( KIO::Job* ) ) ); + connect( transfer, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) ); } -void YahooVerifyAccount::slotData( KIO::Job */*job*/, const QByteArray& data ) +void YahooVerifyAccount::slotData( KIO::Job */*job*/, const TQByteArray& data ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; @@ -89,7 +89,7 @@ bool YahooVerifyAccount::validateData() void YahooVerifyAccount::slotClose() { - QDialog::done(0); + TQDialog::done(0); } void YahooVerifyAccount::slotApply() @@ -98,7 +98,7 @@ void YahooVerifyAccount::slotApply() YahooAccount* myAccount = static_cast(mTheAccount); myAccount->verifyAccount( mTheDialog->mWord->text() ); - QDialog::done(0); + TQDialog::done(0); } #include "yahooverifyaccount.moc" diff --git a/kopete/protocols/yahoo/yahooverifyaccount.h b/kopete/protocols/yahoo/yahooverifyaccount.h index 237a45a4..c179a4c6 100644 --- a/kopete/protocols/yahoo/yahooverifyaccount.h +++ b/kopete/protocols/yahoo/yahooverifyaccount.h @@ -36,7 +36,7 @@ private: KTempFile *mFile; YahooVerifyAccountBase *mTheDialog; public: - YahooVerifyAccount(Kopete::Account *account, QWidget *parent = 0, const char *name = 0); + YahooVerifyAccount(Kopete::Account *account, TQWidget *parent = 0, const char *name = 0); ~YahooVerifyAccount(); virtual bool validateData(); @@ -47,7 +47,7 @@ protected slots: virtual void slotClose(); virtual void slotApply(); public slots: - void slotData( KIO::Job *job, const QByteArray& data ); + void slotData( KIO::Job *job, const TQByteArray& data ); void slotComplete( KIO::Job *job ); }; diff --git a/kopete/protocols/yahoo/yahoowebcam.cpp b/kopete/protocols/yahoo/yahoowebcam.cpp index 71ff921a..1e22b89c 100644 --- a/kopete/protocols/yahoo/yahoowebcam.cpp +++ b/kopete/protocols/yahoo/yahoowebcam.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include "client.h" #include "yahoowebcam.h" @@ -25,23 +25,23 @@ #include "avdevice/videodevicepool.h" -YahooWebcam::YahooWebcam( YahooAccount *account ) : QObject( 0, "yahoo_webcam" ) +YahooWebcam::YahooWebcam( YahooAccount *account ) : TQObject( 0, "yahoo_webcam" ) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; theAccount = account; theDialog = 0L; origImg = new KTempFile(); convertedImg = new KTempFile(); - m_img = new QImage(); + m_img = new TQImage(); - m_sendTimer = new QTimer( this ); - connect( m_sendTimer, SIGNAL(timeout()), this, SLOT(sendImage()) ); + m_sendTimer = new TQTimer( this ); + connect( m_sendTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(sendImage()) ); - m_updateTimer = new QTimer( this ); - connect( m_updateTimer, SIGNAL(timeout()), this, SLOT(updateImage()) ); + m_updateTimer = new TQTimer( this ); + connect( m_updateTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateImage()) ); theDialog = new YahooWebcamDialog( "YahooWebcam" ); - connect( theDialog, SIGNAL(closingWebcamDialog()), this, SLOT(webcamDialogClosing()) ); + connect( theDialog, TQT_SIGNAL(closingWebcamDialog()), this, TQT_SLOT(webcamDialogClosing()) ); m_devicePool = Kopete::AV::VideoDevicePool::self(); m_devicePool->open(); @@ -52,8 +52,8 @@ YahooWebcam::YahooWebcam( YahooAccount *account ) : QObject( 0, "yahoo_webcam" ) YahooWebcam::~YahooWebcam() { - QFile::remove( origImg->name() ); - QFile::remove( convertedImg->name() ); + TQFile::remove( origImg->name() ); + TQFile::remove( convertedImg->name() ); delete origImg; delete convertedImg; delete m_img; @@ -109,10 +109,10 @@ void YahooWebcam::sendImage() } else { - QFile file( convertedImg->name() ); + TQFile file( convertedImg->name() ); if( file.open( IO_ReadOnly ) ) { - QByteArray ar = file.readAll(); + TQByteArray ar = file.readAll(); theAccount->yahooSession()->sendWebcamImage( ar ); } else @@ -120,14 +120,14 @@ void YahooWebcam::sendImage() } } -void YahooWebcam::addViewer( const QString &viewer ) +void YahooWebcam::addViewer( const TQString &viewer ) { m_viewer.push_back( viewer ); if( theDialog ) theDialog->setViewer( m_viewer ); } -void YahooWebcam::removeViewer( const QString &viewer ) +void YahooWebcam::removeViewer( const TQString &viewer ) { m_viewer.remove( viewer ); if( theDialog ) diff --git a/kopete/protocols/yahoo/yahoowebcam.h b/kopete/protocols/yahoo/yahoowebcam.h index 46032059..065ccb61 100644 --- a/kopete/protocols/yahoo/yahoowebcam.h +++ b/kopete/protocols/yahoo/yahoowebcam.h @@ -16,8 +16,8 @@ #ifndef YAHOOWEBCAM_H #define YAHOOWEBCAM_H -#include -#include +#include +#include class YahooAccount; class YahooWebcamDialog; @@ -43,17 +43,17 @@ public slots: void sendImage(); void updateImage(); void webcamDialogClosing(); - void addViewer( const QString & ); - void removeViewer( const QString & ); + void addViewer( const TQString & ); + void removeViewer( const TQString & ); signals: void webcamClosing(); private: YahooAccount *theAccount; YahooWebcamDialog *theDialog; - QTimer *m_sendTimer; - QTimer *m_updateTimer; - QStringList m_viewer; - QImage *m_img; + TQTimer *m_sendTimer; + TQTimer *m_updateTimer; + TQStringList m_viewer; + TQImage *m_img; KTempFile *origImg; KTempFile *convertedImg; Kopete::AV::VideoDevicePool *m_devicePool; diff --git a/kpf/src/ActiveMonitor.cpp b/kpf/src/ActiveMonitor.cpp index 8bd0c34a..5a11848d 100644 --- a/kpf/src/ActiveMonitor.cpp +++ b/kpf/src/ActiveMonitor.cpp @@ -21,7 +21,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include +#include #include #include @@ -38,16 +38,16 @@ namespace KPF ActiveMonitor::ActiveMonitor ( WebServer * server, - QWidget * parent, + TQWidget * parent, const char * name ) - : QWidget (parent, name), + : TQWidget (parent, name), server_ (server) { - view_ = new QListView(this); + view_ = new TQListView(this); view_->setAllColumnsShowFocus(true); - view_->setSelectionMode(QListView::Extended); + view_->setSelectionMode(TQListView::Extended); view_->addColumn(i18n("Status")); view_->addColumn(i18n("Progress")); @@ -57,36 +57,36 @@ namespace KPF view_->addColumn(i18n("Resource")); view_->addColumn(i18n("Host")); - QVBoxLayout * layout = new QVBoxLayout(this); + TQVBoxLayout * layout = new TQVBoxLayout(this); layout->addWidget(view_); connect ( view_, - SIGNAL(selectionChanged()), - SLOT(slotSelectionChanged()) + TQT_SIGNAL(selectionChanged()), + TQT_SLOT(slotSelectionChanged()) ); connect ( server_, - SIGNAL(connection(Server *)), - SLOT(slotConnection(Server *)) + TQT_SIGNAL(connection(Server *)), + TQT_SLOT(slotConnection(Server *)) ); connect ( server_, - SIGNAL(output(Server *, ulong)), - SLOT(slotOutput(Server *, ulong)) + TQT_SIGNAL(output(Server *, ulong)), + TQT_SLOT(slotOutput(Server *, ulong)) ); - connect(server_, SIGNAL(finished(Server *)), SLOT(slotFinished(Server *))); - connect(server_, SIGNAL(request(Server *)), SLOT(slotRequest(Server *))); - connect(server_, SIGNAL(response(Server *)), SLOT(slotResponse(Server *))); + connect(server_, TQT_SIGNAL(finished(Server *)), TQT_SLOT(slotFinished(Server *))); + connect(server_, TQT_SIGNAL(request(Server *)), TQT_SLOT(slotRequest(Server *))); + connect(server_, TQT_SIGNAL(response(Server *)), TQT_SLOT(slotResponse(Server *))); - connect(&cullTimer_, SIGNAL(timeout()), SLOT(slotCull())); + connect(&cullTimer_, TQT_SIGNAL(timeout()), TQT_SLOT(slotCull())); cullTimer_.start(1000); @@ -146,9 +146,9 @@ namespace KPF void ActiveMonitor::slotCull() { - QDateTime dt = QDateTime::currentDateTime(); + TQDateTime dt = TQDateTime::currentDateTime(); - QListViewItemIterator it(view_); + TQListViewItemIterator it(view_); for (; it.current(); ++it) { @@ -165,7 +165,7 @@ namespace KPF void ActiveMonitor::slotSelectionChanged() { - for (QListViewItemIterator it(view_); it.current(); ++it) + for (TQListViewItemIterator it(view_); it.current(); ++it) { ActiveMonitorItem * i = static_cast(it.current()); @@ -189,7 +189,7 @@ namespace KPF void ActiveMonitor::slotKillSelected() { - for (QListViewItemIterator it(view_); it.current(); ++it) + for (TQListViewItemIterator it(view_); it.current(); ++it) { ActiveMonitorItem * i = static_cast(it.current()); @@ -214,9 +214,9 @@ namespace KPF } void - ActiveMonitor::closeEvent(QCloseEvent * e) + ActiveMonitor::closeEvent(TQCloseEvent * e) { - QWidget::closeEvent(e); + TQWidget::closeEvent(e); emit(dying(this)); } diff --git a/kpf/src/ActiveMonitor.h b/kpf/src/ActiveMonitor.h index f0f62265..1c1e8618 100644 --- a/kpf/src/ActiveMonitor.h +++ b/kpf/src/ActiveMonitor.h @@ -24,9 +24,9 @@ #ifndef KPF_ACTIVE_MONITOR_H #define KPF_ACTIVE_MONITOR_H -#include -#include -#include +#include +#include +#include class QListView; class QPainter; @@ -42,7 +42,7 @@ namespace KPF * Shows a list of ActiveMonitorItem objects. * * Proxies signals from Server objects to ActiveMonitorItem objects. - * This is done to avoid making ActiveMonitorItem inherit QObject. + * This is done to avoid making ActiveMonitorItem inherit TQObject. */ class ActiveMonitor : public QWidget { @@ -57,7 +57,7 @@ namespace KPF ActiveMonitor ( WebServer * server, - QWidget * parent = 0, + TQWidget * parent = 0, const char * name = 0 ); @@ -123,7 +123,7 @@ namespace KPF void slotCull(); /** - * Connected to the relevant signal of the contained QListView and used + * Connected to the relevant signal of the contained TQListView and used * to update the enabled/disabled state of the button which allows * killing connections. */ @@ -134,7 +134,7 @@ namespace KPF /** * Overridden to emit a signal when this window is closed. */ - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); signals: @@ -144,19 +144,19 @@ namespace KPF void dying(ActiveMonitor *); /** - * Emitted when the selection of the contained QListView has changed. + * Emitted when the selection of the contained TQListView has changed. * @param selectionExists true if there is a selection. */ void selection(bool selectionExists); private: - QListView * view_; + TQListView * view_; WebServer * server_; - QMap itemMap_; + TQMap itemMap_; - QTimer cullTimer_; + TQTimer cullTimer_; }; } // End namespace KPF diff --git a/kpf/src/ActiveMonitorItem.cpp b/kpf/src/ActiveMonitorItem.cpp index 1cc8fdcb..6721080e 100644 --- a/kpf/src/ActiveMonitorItem.cpp +++ b/kpf/src/ActiveMonitorItem.cpp @@ -21,7 +21,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include +#include #include #include "Defines.h" @@ -31,8 +31,8 @@ namespace KPF { - ActiveMonitorItem::ActiveMonitorItem(Server * server, QListView * parent) - : QListViewItem (parent), + ActiveMonitorItem::ActiveMonitorItem(Server * server, TQListView * parent) + : TQListViewItem (parent), server_ (server), size_ (0), sent_ (0) @@ -54,8 +54,8 @@ namespace KPF void ActiveMonitorItem::paintCell ( - QPainter * p, - const QColorGroup & g, + TQPainter * p, + const TQColorGroup & g, int c, int w, int a @@ -63,7 +63,7 @@ namespace KPF { if (c != Progress) { - QListViewItem::paintCell(p, g, c, w, a); + TQListViewItem::paintCell(p, g, c, w, a); return; } @@ -86,8 +86,8 @@ namespace KPF int ActiveMonitorItem::width ( - const QFontMetrics & fm, - const QListView * lv, + const TQFontMetrics & fm, + const TQListView * lv, int c ) const { @@ -102,7 +102,7 @@ namespace KPF break; default: - return QListViewItem::width(fm, lv, c); + return TQListViewItem::width(fm, lv, c); break; } } @@ -164,7 +164,7 @@ namespace KPF size_ = server_->response().size(); - setText(Size, QString::number(size_)); + setText(Size, TQString::number(size_)); updateState(); } @@ -176,7 +176,7 @@ namespace KPF if (0 != server_) { sent_ += l; - setText(Sent, QString::number(sent_)); + setText(Sent, TQString::number(sent_)); updateState(); repaint(); } diff --git a/kpf/src/ActiveMonitorItem.h b/kpf/src/ActiveMonitorItem.h index 99cc13db..d3cb2e71 100644 --- a/kpf/src/ActiveMonitorItem.h +++ b/kpf/src/ActiveMonitorItem.h @@ -24,10 +24,10 @@ #ifndef KPF_ACTIVE_MONITOR_ITEM_H #define KPF_ACTIVE_MONITOR_ITEM_H -#include -#include -#include -#include +#include +#include +#include +#include class QPainter; @@ -60,7 +60,7 @@ namespace KPF /** * @param server the associated Server object. */ - ActiveMonitorItem(Server * server, QListView * parent); + ActiveMonitorItem(Server * server, TQListView * parent); virtual ~ActiveMonitorItem(); /** @@ -107,7 +107,7 @@ namespace KPF * @return the time of death (end of transactions with remote client) * of the associated Server object. */ - QDateTime death() const; + TQDateTime death() const; protected: @@ -122,18 +122,18 @@ namespace KPF * the number of bytes sent to the remote client by the associated * Server object. */ - virtual void paintCell(QPainter *, const QColorGroup &, int, int, int); + virtual void paintCell(TQPainter *, const TQColorGroup &, int, int, int); /** * Overridden to provide for giving reasonable sizes for columns which * do not contain text. */ - virtual int width(const QFontMetrics &, const QListView *, int) const; + virtual int width(const TQFontMetrics &, const TQListView *, int) const; private: Server * server_; - QDateTime death_; + TQDateTime death_; ulong size_; ulong sent_; }; diff --git a/kpf/src/ActiveMonitorWindow.cpp b/kpf/src/ActiveMonitorWindow.cpp index ae44e4be..7eb3f07f 100644 --- a/kpf/src/ActiveMonitorWindow.cpp +++ b/kpf/src/ActiveMonitorWindow.cpp @@ -34,7 +34,7 @@ namespace KPF ActiveMonitorWindow::ActiveMonitorWindow ( WebServer * server, - QWidget * parent, + TQWidget * parent, const char * name ) : KMainWindow(parent, name) @@ -52,7 +52,7 @@ namespace KPF "stop", 0, monitor_, - SLOT(slotKillSelected()), + TQT_SLOT(slotKillSelected()), actionCollection(), "kill" ); @@ -80,7 +80,7 @@ namespace KPF } void - ActiveMonitorWindow::closeEvent(QCloseEvent *) + ActiveMonitorWindow::closeEvent(TQCloseEvent *) { emit(dying(this)); } diff --git a/kpf/src/ActiveMonitorWindow.h b/kpf/src/ActiveMonitorWindow.h index eddf1113..bb9dc2e0 100644 --- a/kpf/src/ActiveMonitorWindow.h +++ b/kpf/src/ActiveMonitorWindow.h @@ -52,7 +52,7 @@ namespace KPF ActiveMonitorWindow ( WebServer * server, - QWidget * parent = 0, + TQWidget * parent = 0, const char * name = 0 ); @@ -76,7 +76,7 @@ namespace KPF /** * Overridden to emit a signal when this window is closed. */ - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); signals: @@ -86,7 +86,7 @@ namespace KPF void dying(ActiveMonitorWindow *); /** - * Emitted when the selection of the contained QListView has changed. + * Emitted when the selection of the contained TQListView has changed. * @param selectionExists true if there is a selection. */ void selection(bool selectionExists); diff --git a/kpf/src/Applet.cpp b/kpf/src/Applet.cpp index edd7a652..0eee06c8 100644 --- a/kpf/src/Applet.cpp +++ b/kpf/src/Applet.cpp @@ -21,14 +21,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -54,7 +54,7 @@ static const char kpfVersion[] = "1.0.1"; extern "C" { KDE_EXPORT KPanelApplet * - init(QWidget * parent, const QString & configFile) + init(TQWidget * parent, const TQString & configFile) { if (0 == kpf::userId() || 0 == kpf::effectiveUserId()) { @@ -90,10 +90,10 @@ namespace KPF { Applet::Applet ( - const QString & configFile, + const TQString & configFile, Type type, int actions, - QWidget * parent, + TQWidget * parent, const char * name ) : KPanelApplet (configFile, type, actions, parent, name), @@ -103,26 +103,26 @@ namespace KPF { setAcceptDrops(true); - //setFrameStyle(QFrame::Panel | QFrame::Sunken); + //setFrameStyle(TQFrame::Panel | TQFrame::Sunken); //setLineWidth(1); connect ( WebServerManager::instance(), - SIGNAL(serverCreated(WebServer *)), - SLOT(slotServerCreated(WebServer *)) + TQT_SIGNAL(serverCreated(WebServer *)), + TQT_SLOT(slotServerCreated(WebServer *)) ); connect ( WebServerManager::instance(), - SIGNAL(serverDisabled(WebServer *)), - SLOT(slotServerDisabled(WebServer *)) + TQT_SIGNAL(serverDisabled(WebServer *)), + TQT_SLOT(slotServerDisabled(WebServer *)) ); WebServerManager::instance()->loadConfig(); - popup_ = new QPopupMenu(this); + popup_ = new TQPopupMenu(this); popup_->insertItem (BarIcon("filenew"), i18n("New Server..."), NewServer, NewServer); @@ -171,7 +171,7 @@ namespace KPF void Applet::help() { - kapp->invokeHelp( QString::null, "kpf" ); + kapp->invokeHelp( TQString::null, "kpf" ); } void @@ -226,15 +226,15 @@ namespace KPF } void - Applet::resizeEvent(QResizeEvent *) + Applet::resizeEvent(TQResizeEvent *) { resetLayout(); } void - Applet::moveEvent(QMoveEvent *) + Applet::moveEvent(TQMoveEvent *) { - QPtrListIterator it(itemList_); + TQPtrListIterator it(itemList_); for (uint i = 0; it.current(); ++it, ++i) it.current()->setBackground(); @@ -252,7 +252,7 @@ namespace KPF { uint itemHeight = height() / itemList_.count(); - QPtrListIterator it(itemList_); + TQPtrListIterator it(itemList_); for (uint i = 0; it.current(); ++it, ++i) { @@ -266,7 +266,7 @@ namespace KPF { uint itemWidth = width() / itemList_.count(); - QPtrListIterator it(itemList_); + TQPtrListIterator it(itemList_); for (uint i = 0; it.current(); ++it, ++i) { @@ -280,12 +280,12 @@ namespace KPF } void - Applet::mousePressEvent(QMouseEvent * ev) + Applet::mousePressEvent(TQMouseEvent * ev) { if (Qt::RightButton != ev->button() && Qt::LeftButton != ev->button()) return; - switch (popup_->exec(QCursor::pos())) + switch (popup_->exec(TQCursor::pos())) { case NewServer: slotNewServer(); @@ -301,7 +301,7 @@ namespace KPF } void - Applet::slotNewServerAtLocation(const QString & location) + Applet::slotNewServerAtLocation(const TQString & location) { if (0 != wizard_) { @@ -316,8 +316,8 @@ namespace KPF connect ( wizard_, - SIGNAL(dying(ServerWizard *)), - SLOT(slotWizardDying(ServerWizard *)) + TQT_SIGNAL(dying(ServerWizard *)), + TQT_SLOT(slotWizardDying(ServerWizard *)) ); wizard_->setLocation(location); @@ -338,8 +338,8 @@ namespace KPF connect ( wizard_, - SIGNAL(dying(ServerWizard *)), - SLOT(slotWizardDying(ServerWizard *)) + TQT_SIGNAL(dying(ServerWizard *)), + TQT_SLOT(slotWizardDying(ServerWizard *)) ); wizard_->show(); @@ -349,7 +349,7 @@ namespace KPF void Applet::slotWizardDying(ServerWizard * wiz) { - if (QDialog::Accepted == wiz->result()) + if (TQDialog::Accepted == wiz->result()) { WebServerManager::instance()->createServerLocal ( @@ -367,9 +367,9 @@ namespace KPF } void - Applet::drawContents(QPainter * p) + Applet::drawContents(TQPainter * p) { - QPixmap px; + TQPixmap px; if (width() > 48) px = KGlobal::iconLoader()->loadIcon("kpf", KIcon::Panel, 48); @@ -380,7 +380,7 @@ namespace KPF else return; - QRect r(contentsRect()); + TQRect r(contentsRect()); p->drawPixmap ( @@ -391,7 +391,7 @@ namespace KPF } void - Applet::dragEnterEvent(QDragEnterEvent * e) + Applet::dragEnterEvent(TQDragEnterEvent * e) { KURL::List l; @@ -403,14 +403,14 @@ namespace KPF const KURL &url = l[0]; - if (!url.isLocalFile() || !QFileInfo(url.path()).isDir()) + if (!url.isLocalFile() || !TQFileInfo(url.path()).isDir()) return; e->accept(); } void - Applet::dropEvent(QDropEvent * e) + Applet::dropEvent(TQDropEvent * e) { KURL::List l; @@ -422,7 +422,7 @@ namespace KPF const KURL &url = l[0]; - if (!url.isLocalFile() || !QFileInfo(url.path()).isDir()) + if (!url.isLocalFile() || !TQFileInfo(url.path()).isDir()) return; e->accept(); @@ -438,15 +438,15 @@ namespace KPF connect ( i, - SIGNAL(newServer()), - SLOT(slotNewServer()) + TQT_SIGNAL(newServer()), + TQT_SLOT(slotNewServer()) ); connect ( i, - SIGNAL(newServerAtLocation(const QString &)), - SLOT(slotNewServerAtLocation(const QString &)) + TQT_SIGNAL(newServerAtLocation(const TQString &)), + TQT_SLOT(slotNewServerAtLocation(const TQString &)) ); itemList_.append(i); @@ -458,7 +458,7 @@ namespace KPF void Applet::slotServerDisabled(WebServer * server) { - QPtrListIterator it(itemList_); + TQPtrListIterator it(itemList_); for (; it.current(); ++it) { diff --git a/kpf/src/Applet.h b/kpf/src/Applet.h index 15802a37..fccdf8a0 100644 --- a/kpf/src/Applet.h +++ b/kpf/src/Applet.h @@ -24,7 +24,7 @@ #ifndef KPF_APPLET_H #define KPF_APPLET_H -#include +#include #include class QPopupMenu; @@ -51,10 +51,10 @@ namespace KPF Applet ( - const QString & configFile, + const TQString & configFile, Type = Normal, int = 0, - QWidget * = 0, + TQWidget * = 0, const char * = 0 ); @@ -78,7 +78,7 @@ namespace KPF * Called to create a new server when the path to the server is already * known. */ - void slotNewServerAtLocation(const QString &); + void slotNewServerAtLocation(const TQString &); /** * Called to create a new server when the path to the server is unknown. @@ -128,13 +128,13 @@ namespace KPF /** * Overridden to update layout accordingly. */ - virtual void moveEvent(QMoveEvent *); - virtual void resizeEvent(QResizeEvent *); + virtual void moveEvent(TQMoveEvent *); + virtual void resizeEvent(TQResizeEvent *); /** * Overridden to provide a context menu. */ - virtual void mousePressEvent(QMouseEvent *); + virtual void mousePressEvent(TQMouseEvent *); /** * Updates the layout, moving AppletItem objects into proper positions. @@ -145,19 +145,19 @@ namespace KPF * Overridden to provide something other than a blank display when there * are no existing AppletItem objects contained. */ - virtual void drawContents(QPainter *); + virtual void drawContents(TQPainter *); /** * Overridden to allow testing whether the dragged object points to a * local directory. */ - virtual void dragEnterEvent(QDragEnterEvent *); + virtual void dragEnterEvent(TQDragEnterEvent *); /** * Overridden to allow creating a new WebServer when the dropped object * points to a local directory. */ - virtual void dropEvent(QDropEvent *); + virtual void dropEvent(TQDropEvent *); private: @@ -168,10 +168,10 @@ namespace KPF }; ServerWizard * wizard_; - QPopupMenu * popup_; + TQPopupMenu * popup_; DCOPClient * dcopClient_; - QPtrList itemList_; + TQPtrList itemList_; }; } diff --git a/kpf/src/AppletItem.cpp b/kpf/src/AppletItem.cpp index e605f692..4c70640e 100644 --- a/kpf/src/AppletItem.cpp +++ b/kpf/src/AppletItem.cpp @@ -21,11 +21,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -43,8 +43,8 @@ namespace KPF { - AppletItem::AppletItem(WebServer * server, QWidget * parent) - : QWidget (parent, "KPF::AppletItem"), + AppletItem::AppletItem(WebServer * server, TQWidget * parent) + : TQWidget (parent, "KPF::AppletItem"), server_ (server), configDialog_ (0L), monitorWindow_ (0L), @@ -60,9 +60,9 @@ namespace KPF graph_->installEventFilter(this); - (new QVBoxLayout(this))->addWidget(graph_); + (new TQVBoxLayout(this))->addWidget(graph_); - QString popupTitle(i18n("kpf - %1").arg(server_->root())); + TQString popupTitle(i18n("kpf - %1").arg(server_->root())); popup_ = new KPopupMenu(this); @@ -94,8 +94,8 @@ namespace KPF connect ( monitorWindow_, - SIGNAL(dying(ActiveMonitorWindow *)), - SLOT(slotActiveMonitorWindowDying(ActiveMonitorWindow *)) + TQT_SIGNAL(dying(ActiveMonitorWindow *)), + TQT_SLOT(slotActiveMonitorWindowDying(ActiveMonitorWindow *)) ); } @@ -110,20 +110,20 @@ namespace KPF void AppletItem::setBackground() { - QResizeEvent e(size(), size()); + TQResizeEvent e(size(), size()); kapp->sendEvent(graph_, &e); graph_->update(); } bool - AppletItem::eventFilter(QObject *, QEvent * ev) + AppletItem::eventFilter(TQObject *, TQEvent * ev) { switch (ev->type()) { - case QEvent::MouseButtonRelease: + case TQEvent::MouseButtonRelease: { - QMouseEvent * e = static_cast(ev); + TQMouseEvent * e = static_cast(ev); if (0 == e) { @@ -157,9 +157,9 @@ namespace KPF } break; - case QEvent::MouseButtonPress: + case TQEvent::MouseButtonPress: { - QMouseEvent * e = static_cast(ev); + TQMouseEvent * e = static_cast(ev); if (0 == e) { @@ -178,7 +178,7 @@ namespace KPF popup_->changeItem (Pause, SmallIcon("player_pause"), i18n("Pause")); - switch (popup_->exec(QCursor::pos())) + switch (popup_->exec(TQCursor::pos())) { case NewServer: emit(newServer()); @@ -212,9 +212,9 @@ namespace KPF } break; - case QEvent::DragEnter: + case TQEvent::DragEnter: { - QDragEnterEvent * e = static_cast(ev); + TQDragEnterEvent * e = static_cast(ev); if (0 == e) { @@ -233,7 +233,7 @@ namespace KPF const KURL &url = l[0]; - if (!url.isLocalFile() || !QFileInfo(url.path()).isDir()) + if (!url.isLocalFile() || !TQFileInfo(url.path()).isDir()) break; e->accept(); @@ -241,9 +241,9 @@ namespace KPF } break; - case QEvent::Drop: + case TQEvent::Drop: { - QDropEvent * e = static_cast(ev); + TQDropEvent * e = static_cast(ev); if (0 == e) { @@ -262,7 +262,7 @@ namespace KPF const KURL &url = l[0]; - if (!url.isLocalFile() || !QFileInfo(url.path()).isDir()) + if (!url.isLocalFile() || !TQFileInfo(url.path()).isDir()) break; e->accept(); @@ -320,8 +320,8 @@ namespace KPF connect ( monitorWindow_, - SIGNAL(dying(ActiveMonitorWindow *)), - SLOT(slotActiveMonitorWindowDying(ActiveMonitorWindow *)) + TQT_SIGNAL(dying(ActiveMonitorWindow *)), + TQT_SLOT(slotActiveMonitorWindowDying(ActiveMonitorWindow *)) ); #endif @@ -332,7 +332,7 @@ namespace KPF void AppletItem::removeServer() { - QTimer::singleShot(0, this, SLOT(slotSuicide())); + TQTimer::singleShot(0, this, TQT_SLOT(slotSuicide())); } void @@ -349,8 +349,8 @@ namespace KPF connect ( configDialog_, - SIGNAL(dying(SingleServerConfigDialog *)), - SLOT(slotConfigDialogDying(SingleServerConfigDialog *)) + TQT_SIGNAL(dying(SingleServerConfigDialog *)), + TQT_SLOT(slotConfigDialogDying(SingleServerConfigDialog *)) ); configDialog_->show(); diff --git a/kpf/src/AppletItem.h b/kpf/src/AppletItem.h index 013a6b0a..5c602e13 100644 --- a/kpf/src/AppletItem.h +++ b/kpf/src/AppletItem.h @@ -24,8 +24,8 @@ #ifndef KPF_APPLET_ITEM_H #define KPF_APPLET_ITEM_H -#include -#include +#include +#include class KPopupMenu; @@ -53,7 +53,7 @@ namespace KPF * @param server The WebServer object which will be monitored and * controlled by this object. */ - AppletItem(WebServer * server, QWidget * parent); + AppletItem(WebServer * server, TQWidget * parent); ~AppletItem(); @@ -99,14 +99,14 @@ namespace KPF /** * Emitted when an URL pointing to a local directory has been dropped. */ - void newServerAtLocation(const QString &); + void newServerAtLocation(const TQString &); protected: /** * Overridden to provide a context menu plus DnD capabilities. */ - bool eventFilter(QObject *, QEvent *); + bool eventFilter(TQObject *, TQEvent *); /** * Called when the appropriate item is selected from the context menu. diff --git a/kpf/src/BandwidthGraph.cpp b/kpf/src/BandwidthGraph.cpp index a7f6c311..9acc85e5 100644 --- a/kpf/src/BandwidthGraph.cpp +++ b/kpf/src/BandwidthGraph.cpp @@ -21,9 +21,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include -#include +#include +#include +#include #include #include @@ -40,10 +40,10 @@ namespace KPF ( WebServer * server, OverlaySelect overlaySelect, - QWidget * parent, + TQWidget * parent, const char * name ) - : QWidget (parent, name, WRepaintNoErase), + : TQWidget (parent, name, WRepaintNoErase), server_ (server), max_ (0L), overlaySelect_ (overlaySelect) @@ -55,8 +55,8 @@ namespace KPF connect ( server_, - SIGNAL(wholeServerOutput(ulong)), - SLOT(slotOutput(ulong)) + TQT_SIGNAL(wholeServerOutput(ulong)), + TQT_SLOT(slotOutput(ulong)) ); if (UseOverlays == overlaySelect_) @@ -64,15 +64,15 @@ namespace KPF connect ( server_, - SIGNAL(contentionChange(bool)), this, - SLOT(slotServerContentionChange(bool)) + TQT_SIGNAL(contentionChange(bool)), this, + TQT_SLOT(slotServerContentionChange(bool)) ); connect ( server_, - SIGNAL(pauseChange(bool)), this, - SLOT(slotServerPauseChange(bool)) + TQT_SIGNAL(pauseChange(bool)), this, + TQT_SLOT(slotServerPauseChange(bool)) ); } @@ -87,27 +87,27 @@ namespace KPF void BandwidthGraph::setTooltip() { - QToolTip::add(this, i18n( "%1 on port %2" ) + TQToolTip::add(this, i18n( "%1 on port %2" ) .arg( server_->root() ).arg( server_->listenPort() ) ); } QRect BandwidthGraph::contentsRect() const { - return QRect(1, 1, width() - 2, height() - 2); + return TQRect(1, 1, width() - 2, height() - 2); } void BandwidthGraph::updateContents() { - QRect r(contentsRect()); + TQRect r(contentsRect()); uint w = r.width(); uint h = r.height(); buffer_.fill(this, 0, 0); - QPainter p(&buffer_); + TQPainter p(&buffer_); p.drawPixmap( ( width()-bgPix_.width() )/2, ( height()-bgPix_.height() )/2, bgPix_ ); @@ -133,13 +133,13 @@ namespace KPF } void - BandwidthGraph::paintEvent(QPaintEvent * e) + BandwidthGraph::paintEvent(TQPaintEvent * e) { bitBlt(this, e->rect().topLeft(), &buffer_, e->rect()); } void - BandwidthGraph::resizeEvent(QResizeEvent *) + BandwidthGraph::resizeEvent(TQResizeEvent *) { buffer_.resize(size()); @@ -150,14 +150,14 @@ namespace KPF else if ( width() > 16 ) bgPix_ = KGlobal::iconLoader()->loadIcon( "kpf", KIcon::Panel, 16 ); else - bgPix_.fill( this, QPoint( 0, 0 ) ); + bgPix_.fill( this, TQPoint( 0, 0 ) ); KIconEffect::semiTransparent( bgPix_ ); if (width() < 2) { // We have 0 space. Make history 0 size. - history_ = QMemArray(); + history_ = TQMemArray(); return; } @@ -165,7 +165,7 @@ namespace KPF if (w < history_.size()) { - QMemArray newHistory(w); + TQMemArray newHistory(w); uint sizeDiff = history_.size() - w; @@ -176,7 +176,7 @@ namespace KPF } else if (w > history_.size()) { - QMemArray newHistory(w); + TQMemArray newHistory(w); uint sizeDiff = w - history_.size(); @@ -197,7 +197,7 @@ namespace KPF void BandwidthGraph::slotOutput(ulong l) { - QRect r(contentsRect()); + TQRect r(contentsRect()); uint w = r.width(); uint h = r.height(); @@ -228,7 +228,7 @@ namespace KPF } void - BandwidthGraph::drawOverlays(QPainter & p) + BandwidthGraph::drawOverlays(TQPainter & p) { if (NoOverlays == overlaySelect_) return; @@ -243,11 +243,11 @@ namespace KPF if (overlayPixmap_.isNull()) { - QString maxString; + TQString maxString; - QString bs(i18n("%1 b/s")); - QString kbs(i18n("%1 kb/s")); - QString mbs(i18n("%1 Mb/s")); + TQString bs(i18n("%1 b/s")); + TQString kbs(i18n("%1 kb/s")); + TQString mbs(i18n("%1 Mb/s")); if (max_ > 1024) if (max_ > 1024 * 1024) @@ -282,13 +282,13 @@ namespace KPF QSize BandwidthGraph::sizeHint() const { - return QSize(32, 32); + return TQSize(32, 32); } QSize BandwidthGraph::minimumSizeHint() const { - return QSize(12, 12); + return TQSize(12, 12); } WebServer * @@ -324,7 +324,7 @@ namespace KPF } else { - overlayPixmap_ = QPixmap(); + overlayPixmap_ = TQPixmap(); } } } diff --git a/kpf/src/BandwidthGraph.h b/kpf/src/BandwidthGraph.h index e0cf51dd..3540ca5b 100644 --- a/kpf/src/BandwidthGraph.h +++ b/kpf/src/BandwidthGraph.h @@ -24,10 +24,10 @@ #ifndef KPF_BANDWIDTH_GRAPH_H #define KPF_BANDWIDTH_GRAPH_H -#include -#include -#include -#include +#include +#include +#include +#include class QPainter; @@ -61,7 +61,7 @@ namespace KPF ( WebServer * server, OverlaySelect overlaySelect, - QWidget * parent = 0, + TQWidget * parent = 0, const char * name = 0 ); @@ -75,12 +75,12 @@ namespace KPF /** * Overridden to provide reasonable default size and shape. */ - virtual QSize sizeHint() const; + virtual TQSize sizeHint() const; /** * Overridden to provide reasonable minimum size and shape. */ - virtual QSize minimumSizeHint() const; + virtual TQSize minimumSizeHint() const; /** * @return the WebServer object given on construction. @@ -111,22 +111,22 @@ namespace KPF /** * Overridden to provide graph drawing. */ - virtual void paintEvent(QPaintEvent *); + virtual void paintEvent(TQPaintEvent *); /** * Overridden to assist graph drawing. */ - virtual void resizeEvent(QResizeEvent *); + virtual void resizeEvent(TQResizeEvent *); /** * Draw overlay icons to reflect status of associated WebServer. */ - virtual void drawOverlays(QPainter &); + virtual void drawOverlays(TQPainter &); /** * Provides a rectangle in which to draw the graph itself. */ - virtual QRect contentsRect() const; + virtual TQRect contentsRect() const; /** * Called when the status of the associated WebServer changes. @@ -144,17 +144,17 @@ namespace KPF void updateContents(); - QMemArray history_; + TQMemArray history_; WebServer * server_; - QPixmap buffer_, bgPix_; + TQPixmap buffer_, bgPix_; ulong max_; OverlaySelect overlaySelect_; - QPixmap overlayPixmap_; + TQPixmap overlayPixmap_; }; } // End namespace KPF diff --git a/kpf/src/ByteRange.cpp b/kpf/src/ByteRange.cpp index cdd0624b..2db5de6b 100644 --- a/kpf/src/ByteRange.cpp +++ b/kpf/src/ByteRange.cpp @@ -21,7 +21,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include +#include #include "Defines.h" #include "ByteRange.h" @@ -101,13 +101,13 @@ namespace KPF // Empty. } - ByteRangeList::ByteRangeList(const QString & _s, float /* protocol */) + ByteRangeList::ByteRangeList(const TQString & _s, float /* protocol */) { kpfDebug << "ByteRangeList parsing `" << _s << "'" << endl; // Hey, parsing time :) - QString s(_s); + TQString s(_s); if ("bytes=" == s.left(6)) { @@ -115,16 +115,16 @@ namespace KPF s = s.stripWhiteSpace(); } - QStringList byteRangeSpecList(QStringList::split(',', s)); + TQStringList byteRangeSpecList(TQStringList::split(',', s)); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it = byteRangeSpecList.begin(); it != byteRangeSpecList.end(); ++it) addByteRange(*it); } void - ByteRangeList::addByteRange(const QString & s) + ByteRangeList::addByteRange(const TQString & s) { kpfDebug << "addByteRange(" << s << ")" << endl; @@ -136,9 +136,9 @@ namespace KPF return; } - QString firstByte(s.left(dashPos).stripWhiteSpace()); + TQString firstByte(s.left(dashPos).stripWhiteSpace()); - QString lastByte(s.mid(dashPos + 1).stripWhiteSpace()); + TQString lastByte(s.mid(dashPos + 1).stripWhiteSpace()); ulong first; diff --git a/kpf/src/ByteRange.h b/kpf/src/ByteRange.h index 4dd0b841..4452bf70 100644 --- a/kpf/src/ByteRange.h +++ b/kpf/src/ByteRange.h @@ -24,8 +24,8 @@ #ifndef KPF_BYTE_RANGE_H #define KPF_BYTE_RANGE_H -#include -#include +#include +#include namespace KPF { @@ -102,7 +102,7 @@ namespace KPF /** * Encapsulates a list of ByteRange. */ - class ByteRangeList : public QValueList + class ByteRangeList : public TQValueList { public: @@ -113,13 +113,13 @@ namespace KPF * @param protocol specifies the HTTP protocol which should * be assumed whilst parsing. */ - ByteRangeList(const QString &, float protocol); + ByteRangeList(const TQString &, float protocol); /** * Parses a byte range represented as a string and, if successful, * appends the resultant ByteRange object to this list. */ - void addByteRange(const QString &); + void addByteRange(const TQString &); }; } // End namespace KPF diff --git a/kpf/src/ConfigDialogPage.cpp b/kpf/src/ConfigDialogPage.cpp index 395bb681..657e96f0 100644 --- a/kpf/src/ConfigDialogPage.cpp +++ b/kpf/src/ConfigDialogPage.cpp @@ -21,12 +21,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -43,32 +43,32 @@ namespace KPF { - ConfigDialogPage::ConfigDialogPage(WebServer * server, QWidget * parent) - : QWidget (parent, "KPF::ConfigDialogPage"), + ConfigDialogPage::ConfigDialogPage(WebServer * server, TQWidget * parent) + : TQWidget (parent, "KPF::ConfigDialogPage"), server_ (server), errorMessageConfigDialog_ (0L) { - l_listenPort_ = new QLabel(i18n("&Listen port:"), this); - l_bandwidthLimit_ = new QLabel(i18n("&Bandwidth limit:"), this); -// l_connectionLimit_ = new QLabel(i18n("Connection &limit"), this); + l_listenPort_ = new TQLabel(i18n("&Listen port:"), this); + l_bandwidthLimit_ = new TQLabel(i18n("&Bandwidth limit:"), this); +// l_connectionLimit_ = new TQLabel(i18n("Connection &limit"), this); - sb_listenPort_ = new QSpinBox(1, 65535, 1, this); - sb_bandwidthLimit_ = new QSpinBox(1, 999999, 1, this); -// sb_connectionLimit_ = new QSpinBox(1, 9999, 1, this); + sb_listenPort_ = new TQSpinBox(1, 65535, 1, this); + sb_bandwidthLimit_ = new TQSpinBox(1, 999999, 1, this); +// sb_connectionLimit_ = new TQSpinBox(1, 9999, 1, this); - l_serverName_ = new QLabel(i18n("&Server name:"), this); - le_serverName_ = new QLineEdit(this); + l_serverName_ = new TQLabel(i18n("&Server name:"), this); + le_serverName_ = new TQLineEdit(this); bool canPublish = DNSSD::ServiceBrowser::isAvailable() == DNSSD::ServiceBrowser::Working; l_serverName_->setEnabled(canPublish); le_serverName_->setEnabled(canPublish); - cb_followSymlinks_ = new QCheckBox(i18n("&Follow symbolic links"), this); + cb_followSymlinks_ = new TQCheckBox(i18n("&Follow symbolic links"), this); // cb_customErrorMessages_ = -// new QCheckBox(i18n("Use custom error messages"), this); +// new TQCheckBox(i18n("Use custom error messages"), this); -// pb_errorMessages_ = new QPushButton(i18n("&Configure..."), this); +// pb_errorMessages_ = new TQPushButton(i18n("&Configure..."), this); // pb_errorMessages_->setEnabled(false); @@ -85,9 +85,9 @@ namespace KPF // sb_connectionLimit_ ->setValue(Config::DefaultConnectionLimit); cb_followSymlinks_ ->setChecked(Config::DefaultFollowSymlinks); - QVBoxLayout * l0 = new QVBoxLayout(this, 0, KDialog::spacingHint()); + TQVBoxLayout * l0 = new TQVBoxLayout(this, 0, KDialog::spacingHint()); - QGridLayout * l2 = new QGridLayout(l0); + TQGridLayout * l2 = new TQGridLayout(l0); l2->addWidget(l_listenPort_, 0, 0); l2->addWidget(sb_listenPort_, 0, 1); @@ -101,7 +101,7 @@ namespace KPF l0->addWidget(cb_followSymlinks_); #if 0 - QHBoxLayout * l3 = new QHBoxLayout(l0); + TQHBoxLayout * l3 = new TQHBoxLayout(l0); l3->addWidget(cb_customErrorMessages_); l3->addWidget(pb_errorMessages_); @@ -113,8 +113,8 @@ namespace KPF connect ( cb_customErrorMessages_, - SIGNAL(toggled(bool)), - SLOT(slotCustomErrorMessagesToggled(bool)) + TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotCustomErrorMessagesToggled(bool)) ); #endif @@ -122,12 +122,12 @@ namespace KPF connect ( pb_errorMessages_, - SIGNAL(clicked()), - SLOT(slotConfigureErrorMessages()) + TQT_SIGNAL(clicked()), + TQT_SLOT(slotConfigureErrorMessages()) ); #endif - QString listenPortHelp = + TQString listenPortHelp = i18n ( "

    " @@ -136,7 +136,7 @@ namespace KPF "

    " ); - QString bandwidthLimitHelp = + TQString bandwidthLimitHelp = i18n ( "

    " @@ -149,7 +149,7 @@ namespace KPF "

    " ); - QString connectionLimitHelp = + TQString connectionLimitHelp = i18n ( "

    " @@ -158,7 +158,7 @@ namespace KPF "

    " ); - QString followSymlinksHelp = + TQString followSymlinksHelp = i18n ( "

    " @@ -172,7 +172,7 @@ namespace KPF "

    " ); - QString errorMessagesHelp = + TQString errorMessagesHelp = i18n ( "

    " @@ -182,37 +182,37 @@ namespace KPF "

    " ); - QString serverNameHelp = KPF::HelpText::getServerNameHelp(); - QWhatsThis::add(l_listenPort_, listenPortHelp); - QWhatsThis::add(sb_listenPort_, listenPortHelp); - QWhatsThis::add(l_bandwidthLimit_, bandwidthLimitHelp); - QWhatsThis::add(sb_bandwidthLimit_, bandwidthLimitHelp); -// QWhatsThis::add(l_connectionLimit_, connectionLimitHelp); -// QWhatsThis::add(sb_connectionLimit_, connectionLimitHelp); - QWhatsThis::add(cb_followSymlinks_, followSymlinksHelp); - QWhatsThis::add(l_serverName_, serverNameHelp); - QWhatsThis::add(le_serverName_, serverNameHelp); -// QWhatsThis::add(pb_errorMessages_, errorMessagesHelp); + TQString serverNameHelp = KPF::HelpText::getServerNameHelp(); + TQWhatsThis::add(l_listenPort_, listenPortHelp); + TQWhatsThis::add(sb_listenPort_, listenPortHelp); + TQWhatsThis::add(l_bandwidthLimit_, bandwidthLimitHelp); + TQWhatsThis::add(sb_bandwidthLimit_, bandwidthLimitHelp); +// TQWhatsThis::add(l_connectionLimit_, connectionLimitHelp); +// TQWhatsThis::add(sb_connectionLimit_, connectionLimitHelp); + TQWhatsThis::add(cb_followSymlinks_, followSymlinksHelp); + TQWhatsThis::add(l_serverName_, serverNameHelp); + TQWhatsThis::add(le_serverName_, serverNameHelp); +// TQWhatsThis::add(pb_errorMessages_, errorMessagesHelp); connect ( sb_listenPort_, - SIGNAL(valueChanged(int)), - SLOT(slotListenPortChanged(int)) + TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotListenPortChanged(int)) ); connect ( sb_bandwidthLimit_, - SIGNAL(valueChanged(int)), - SLOT(slotBandwidthLimitChanged(int)) + TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotBandwidthLimitChanged(int)) ); connect ( cb_followSymlinks_, - SIGNAL(toggled(bool)), - SLOT(slotFollowSymlinksToggled(bool)) + TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotFollowSymlinksToggled(bool)) ); @@ -296,10 +296,10 @@ namespace KPF return; } - QPtrList + TQPtrList serverList(WebServerManager::instance()->serverListLocal()); - for (QPtrListIterator it(serverList); it.current(); ++it) + for (TQPtrListIterator it(serverList); it.current(); ++it) { if (it.current() == server_) continue; diff --git a/kpf/src/ConfigDialogPage.h b/kpf/src/ConfigDialogPage.h index 8d41ea83..521b1077 100644 --- a/kpf/src/ConfigDialogPage.h +++ b/kpf/src/ConfigDialogPage.h @@ -24,8 +24,8 @@ #ifndef KPF_CONFIG_DIALOG_PAGE_H #define KPF_CONFIG_DIALOG_PAGE_H -#include -#include +#include +#include class QLabel; class QSpinBox; @@ -47,7 +47,7 @@ namespace KPF public: - ConfigDialogPage(WebServer *, QWidget * parent); + ConfigDialogPage(WebServer *, TQWidget * parent); virtual ~ConfigDialogPage(); @@ -83,21 +83,21 @@ namespace KPF WebServer * server_; - QLabel * l_listenPort_; - QLabel * l_bandwidthLimit_; - QLabel * l_connectionLimit_; + TQLabel * l_listenPort_; + TQLabel * l_bandwidthLimit_; + TQLabel * l_connectionLimit_; QLabel * l_serverName_; - QSpinBox * sb_listenPort_; - QSpinBox * sb_bandwidthLimit_; - QSpinBox * sb_connectionLimit_; + TQSpinBox * sb_listenPort_; + TQSpinBox * sb_bandwidthLimit_; + TQSpinBox * sb_connectionLimit_; - QCheckBox * cb_followSymlinks_; + TQCheckBox * cb_followSymlinks_; - QLineEdit * le_serverName_; + TQLineEdit * le_serverName_; - QCheckBox * cb_customErrorMessages_; - QPushButton * pb_errorMessages_; + TQCheckBox * cb_customErrorMessages_; + TQPushButton * pb_errorMessages_; ErrorMessageConfigDialog * errorMessageConfigDialog_; }; diff --git a/kpf/src/Defaults.cpp b/kpf/src/Defaults.cpp index 691ca0f2..07e42c39 100644 --- a/kpf/src/Defaults.cpp +++ b/kpf/src/Defaults.cpp @@ -34,7 +34,7 @@ namespace KPF const bool DefaultFollowSymlinks = false; const bool DefaultCustomErrors = false; const bool DefaultPaused = false; - const QString& DefaultServername = QString::null; + const TQString& DefaultServername = TQString::null; static const char Name[] = "kpfappletrc"; static const char KeyServerRootList[] = "ServerRootList"; @@ -47,48 +47,48 @@ namespace KPF static const char KeyPaused[] = "Paused"; static const char KeyServerName[] = "ServerName"; - QString name() + TQString name() { - return QString::fromUtf8(Name); + return TQString::fromUtf8(Name); } - QString key(Option o) + TQString key(Option o) { switch (o) { case ServerRootList: - return QString::fromUtf8(KeyServerRootList); + return TQString::fromUtf8(KeyServerRootList); case GroupPrefix: - return QString::fromUtf8(KeyGroupPrefix); + return TQString::fromUtf8(KeyGroupPrefix); case ListenPort: - return QString::fromUtf8(KeyListenPort); + return TQString::fromUtf8(KeyListenPort); case BandwidthLimit: - return QString::fromUtf8(KeyBandwidthLimit); + return TQString::fromUtf8(KeyBandwidthLimit); case ConnectionLimit: - return QString::fromUtf8(KeyConnectionLimit); + return TQString::fromUtf8(KeyConnectionLimit); case FollowSymlinks: - return QString::fromUtf8(KeyFollowSymlinks); + return TQString::fromUtf8(KeyFollowSymlinks); case CustomErrors: - return QString::fromUtf8(KeyCustomErrors); + return TQString::fromUtf8(KeyCustomErrors); case Paused: - return QString::fromUtf8(KeyPaused); + return TQString::fromUtf8(KeyPaused); case ServerName: - return QString::fromUtf8(KeyServerName); + return TQString::fromUtf8(KeyServerName); /* default intentionally left out to have the compiler generate * warnings in case we add values to the enumeration but forget * to extend this switch. */ } - return QString::null; + return TQString::null; } } // End namespace Config diff --git a/kpf/src/Defaults.h b/kpf/src/Defaults.h index d49339fe..0a9b6ddc 100644 --- a/kpf/src/Defaults.h +++ b/kpf/src/Defaults.h @@ -24,7 +24,7 @@ #ifndef KPF_DEFAULTS_H #define KPF_DEFAULTS_H -#include +#include namespace KPF { @@ -56,12 +56,12 @@ namespace KPF /** * Name to be used for configuration file. */ - QString name(); + TQString name(); /** * Config key to use when accessing option. */ - QString key(Option); + TQString key(Option); } // End namespace Config diff --git a/kpf/src/DirSelectWidget.cpp b/kpf/src/DirSelectWidget.cpp index bd36ffeb..a405dcb0 100644 --- a/kpf/src/DirSelectWidget.cpp +++ b/kpf/src/DirSelectWidget.cpp @@ -21,8 +21,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include +#include +#include #include "DirSelectWidget.h" #include "DirSelectWidget.moc" @@ -33,13 +33,13 @@ namespace KPF { public: - QString pathToMakeVisible; + TQString pathToMakeVisible; }; DirSelectWidget::DirSelectWidget ( - const QString & pathToMakeVisible, - QWidget * parent, + const TQString & pathToMakeVisible, + TQWidget * parent, const char * name ) : KListView(parent, name) @@ -52,11 +52,11 @@ namespace KPF connect ( this, - SIGNAL(expanded(QListViewItem *)), - SLOT(slotExpanded(QListViewItem *)) + TQT_SIGNAL(expanded(TQListViewItem *)), + TQT_SLOT(slotExpanded(TQListViewItem *)) ); - QListViewItem * root = new QListViewItem(this, "/"); + TQListViewItem * root = new TQListViewItem(this, "/"); root->setExpandable(true); @@ -69,7 +69,7 @@ namespace KPF } void - DirSelectWidget::timerEvent(QTimerEvent *) + DirSelectWidget::timerEvent(TQTimerEvent *) { killTimers(); @@ -78,32 +78,32 @@ namespace KPF } void - DirSelectWidget::slotExpanded(QListViewItem * item) + DirSelectWidget::slotExpanded(TQListViewItem * item) { if (0 != item->firstChild()) return; - QString p(path(item)); + TQString p(path(item)); - QDir dir(p); + TQDir dir(p); const QFileInfoList * entryInfoList = - dir.entryInfoList(QDir::Dirs | QDir::Readable); + dir.entryInfoList(TQDir::Dirs | TQDir::Readable); for (QFileInfoListIterator it(*entryInfoList); it.current(); ++it) { if (it.current()->isDir() && it.current()->isReadable()) { - QListViewItem * i = new QListViewItem(item, it.current()->fileName()); + TQListViewItem * i = new TQListViewItem(item, it.current()->fileName()); i->setExpandable(true); } } } QString - DirSelectWidget::path(QListViewItem * item) const + DirSelectWidget::path(TQListViewItem * item) const { - QString ret(item->text(0)); + TQString ret(item->text(0)); while (0 != (item = item->parent())) ret.prepend("/" + item->text(0)); diff --git a/kpf/src/DirSelectWidget.h b/kpf/src/DirSelectWidget.h index 1f4c9eaf..6bb2194f 100644 --- a/kpf/src/DirSelectWidget.h +++ b/kpf/src/DirSelectWidget.h @@ -39,8 +39,8 @@ namespace KPF DirSelectWidget ( - const QString & pathToMakeVisible = "/", - QWidget * = 0, + const TQString & pathToMakeVisible = "/", + TQWidget * = 0, const char * = 0 ); @@ -48,12 +48,12 @@ namespace KPF protected slots: - void slotExpanded(QListViewItem * item); + void slotExpanded(TQListViewItem * item); protected: - void timerEvent(QTimerEvent *); - QString path(QListViewItem * item) const; + void timerEvent(TQTimerEvent *); + TQString path(TQListViewItem * item) const; private: diff --git a/kpf/src/DirectoryLister.cpp b/kpf/src/DirectoryLister.cpp index bfd0127b..b642d912 100644 --- a/kpf/src/DirectoryLister.cpp +++ b/kpf/src/DirectoryLister.cpp @@ -23,12 +23,12 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -49,25 +49,25 @@ namespace KPF } }; - QString colorToCSS(const QColor &c) + TQString colorToCSS(const TQColor &c) { return "rgb(" - + QString::number(c.red()) + + TQString::number(c.red()) + ", " - + QString::number(c.green()) + + TQString::number(c.green()) + ", " - + QString::number(c.blue()) + + TQString::number(c.blue()) + ")"; } - QByteArray buildHTML(const QString & title, const QString & body) + TQByteArray buildHTML(const TQString & title, const TQString & body) { - QPalette pal = qApp->palette(); - QByteArray temp_string; - QTextStream html(temp_string, IO_WriteOnly); + TQPalette pal = qApp->palette(); + TQByteArray temp_string; + TQTextStream html(temp_string, IO_WriteOnly); - html.setEncoding(QTextStream::UnicodeUTF8); + html.setEncoding(TQTextStream::UnicodeUTF8); html << "" @@ -90,10 +90,10 @@ namespace KPF << endl << "table.filelist { " << "color: " - << colorToCSS(pal.color(QPalette::Normal, QColorGroup::Foreground)) + << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::Foreground)) << "; " << "background-color: " - << colorToCSS(pal.color(QPalette::Normal, QColorGroup::Background)) + << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::Background)) << "; " << "border: thin outset; " << "width: 100%; " @@ -106,10 +106,10 @@ namespace KPF << endl << "td.norm { " << "background-color: " - << colorToCSS(pal.color(QPalette::Normal, QColorGroup::Base)) + << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::Base)) << "; " << "color: " - << colorToCSS(pal.color(QPalette::Normal, QColorGroup::Foreground)) + << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::Foreground)) << "; " << "}" << endl @@ -118,27 +118,27 @@ namespace KPF << colorToCSS ( KGlobalSettings::calculateAlternateBackgroundColor - (pal.color(QPalette::Normal, QColorGroup::Base)) + (pal.color(TQPalette::Normal, TQColorGroup::Base)) ) << "; " << "color: " - << colorToCSS(pal.color(QPalette::Normal, QColorGroup::Foreground)) + << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::Foreground)) << "; " << "}" << endl << "a { " << "color: " - << colorToCSS(pal.color(QPalette::Normal, QColorGroup::Text)) + << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::Text)) << "; " << "text-decoration: none; " << "}" << endl << "th.listheading { " << "color: " - << colorToCSS(pal.color(QPalette::Normal, QColorGroup::ButtonText)) + << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::ButtonText)) << "; " << "background-color: " - << colorToCSS(pal.color(QPalette::Normal, QColorGroup::Button)) + << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::Button)) << "; " << "text-align: left; " << "white-space: nowrap; " @@ -151,7 +151,7 @@ namespace KPF << endl << "div.sizeentry { " << "color: " - << colorToCSS(pal.color(QPalette::Normal, QColorGroup::Text)) + << colorToCSS(pal.color(TQPalette::Normal, TQColorGroup::Text)) << "; " << "text-align: right; " << "}" @@ -174,10 +174,10 @@ namespace KPF return temp_string; } - QString prettySize(uint size) + TQString prettySize(uint size) { - QString suffix; - QString temp; + TQString suffix; + TQString temp; float floated_size; if (size > 1023) @@ -227,11 +227,11 @@ namespace KPF } QByteArray - DirectoryLister::html(const QString & root, const QString & _path) + DirectoryLister::html(const TQString & root, const TQString & _path) { kpfDebug << "root: " << root << " path: " << _path << endl; - QString path; + TQString path; if (_path.right(1) != "/") path = _path + "/"; @@ -241,7 +241,7 @@ namespace KPF if (path[0] == '/') path + ""; - QDir d(root + path); + TQDir d(root + path); if (!d.exists()) { @@ -253,7 +253,7 @@ namespace KPF } const QFileInfoList * infoList = - d.entryInfoList(QDir::DefaultFilter, QDir::Name | QDir::DirsFirst); + d.entryInfoList(TQDir::DefaultFilter, TQDir::Name | TQDir::DirsFirst); if (0 == infoList) { @@ -264,7 +264,7 @@ namespace KPF ); } - QString html; + TQString html; html += "fileName()[0] == '.') @@ -292,13 +292,13 @@ namespace KPF ++counter; - QString td_class = (counter % 2) ? "alt" : "norm"; + TQString td_class = (counter % 2) ? "alt" : "norm"; html += "\n"; html += ""; - QString item_class = QString((fi->isDir()) ? "direntry" : "fileentry"); + TQString item_class = TQString((fi->isDir()) ? "direntry" : "fileentry"); KURL fu(path+fi->fileName()); html += @@ -310,7 +310,7 @@ namespace KPF + "\">"; if (fi->fileName() != "..") - html += QStyleSheet::escape(fi->fileName()); + html += TQStyleSheet::escape(fi->fileName()); else html += i18n("Parent Directory"); @@ -335,7 +335,7 @@ namespace KPF return buildHTML ( - i18n("Directory listing for %1").arg(QStyleSheet::escape(path)), + i18n("Directory listing for %1").arg(TQStyleSheet::escape(path)), html ); } diff --git a/kpf/src/DirectoryLister.h b/kpf/src/DirectoryLister.h index e1809202..51f7ee12 100644 --- a/kpf/src/DirectoryLister.h +++ b/kpf/src/DirectoryLister.h @@ -24,8 +24,8 @@ #ifndef KPF_DIRECTORY_LISTER_H #define KPF_DIRECTORY_LISTER_H -#include -#include +#include +#include namespace KPF { @@ -47,7 +47,7 @@ namespace KPF * Get a directory listing (HTML) for the specified path. Uses * cache if directory has not been modified since last read. */ - QByteArray html(const QString &root, const QString & path); + TQByteArray html(const TQString &root, const TQString & path); uint headerLength() const; uint footerLength() const; diff --git a/kpf/src/ErrorMessageConfigDialog.cpp b/kpf/src/ErrorMessageConfigDialog.cpp index 2f7cb43a..0a2833c6 100644 --- a/kpf/src/ErrorMessageConfigDialog.cpp +++ b/kpf/src/ErrorMessageConfigDialog.cpp @@ -24,9 +24,9 @@ #include "ErrorMessageConfigDialog.h" #include "ErrorMessageConfigDialog.moc" -#include -#include -#include +#include +#include +#include #include #include @@ -42,7 +42,7 @@ namespace KPF ErrorMessageConfigDialog::ErrorMessageConfigDialog ( WebServer * webServer, - QWidget * parent + TQWidget * parent ) : KDialogBase ( @@ -56,16 +56,16 @@ namespace KPF ), server_(webServer) { - QValueList codeList; + TQValueList codeList; codeList << 400 << 403 << 404 << 412 << 416 << 500 << 501; - QFrame * w = makeMainWidget(); + TQFrame * w = makeMainWidget(); - QVBoxLayout * layout = - new QVBoxLayout(w, KDialog::marginHint(), KDialog::spacingHint()); + TQVBoxLayout * layout = + new TQVBoxLayout(w, KDialog::marginHint(), KDialog::spacingHint()); - QLabel * info = + TQLabel * info = new QLabel ( i18n @@ -86,28 +86,28 @@ namespace KPF layout->addWidget(info); - QGridLayout * grid = new QGridLayout(layout, codeList.count(), 2); + TQGridLayout * grid = new TQGridLayout(layout, codeList.count(), 2); - QString pattern(i18n("%1 %2")); + TQString pattern(i18n("%1 %2")); KConfig config(Config::name()); config.setGroup("ErrorMessageOverrideFiles"); - QValueList::ConstIterator it; + TQValueList::ConstIterator it; for (it = codeList.begin(); it != codeList.end(); ++it) { - QString originalPath = - config.readPathEntry(QString::number(*it)); + TQString originalPath = + config.readPathEntry(TQString::number(*it)); - QString responseName(translatedResponseName(*it)); + TQString responseName(translatedResponseName(*it)); KURLRequester * requester = new KURLRequester(originalPath, w); itemList_.append(new Item(*it, requester, responseName, originalPath)); - QLabel * l = new QLabel(pattern.arg(*it).arg(responseName), w); + TQLabel * l = new TQLabel(pattern.arg(*it).arg(responseName), w); l->setBuddy(requester); @@ -123,7 +123,7 @@ namespace KPF } void - ErrorMessageConfigDialog::slotURLRequesterTextChanged(const QString &) + ErrorMessageConfigDialog::slotURLRequesterTextChanged(const TQString &) { } @@ -134,13 +134,13 @@ namespace KPF config.setGroup("ErrorMessageOverrideFiles"); - QPtrListIterator it(itemList_); + TQPtrListIterator it(itemList_); for (; it.current(); ++it) { config.writePathEntry ( - QString::number(it.current()->code), + TQString::number(it.current()->code), it.current()->urlRequester->url() ); } diff --git a/kpf/src/ErrorMessageConfigDialog.h b/kpf/src/ErrorMessageConfigDialog.h index 51bf4830..7ad71a40 100644 --- a/kpf/src/ErrorMessageConfigDialog.h +++ b/kpf/src/ErrorMessageConfigDialog.h @@ -24,7 +24,7 @@ #ifndef KPF_ERROR_MESSAGE_CONFIG_DIALOG_H #define KPF_ERROR_MESSAGE_CONFIG_DIALOG_H -#include +#include #include class KURLRequester; @@ -42,13 +42,13 @@ namespace KPF public: - ErrorMessageConfigDialog(WebServer *, QWidget * parent); + ErrorMessageConfigDialog(WebServer *, TQWidget * parent); virtual ~ErrorMessageConfigDialog(); protected slots: - void slotURLRequesterTextChanged(const QString &); + void slotURLRequesterTextChanged(const TQString &); protected: @@ -66,7 +66,7 @@ namespace KPF { public: - Item(uint i, KURLRequester * r, QString s, QString p) + Item(uint i, KURLRequester * r, TQString s, TQString p) : code (i), urlRequester (r), report (s), @@ -76,11 +76,11 @@ namespace KPF uint code; KURLRequester * urlRequester; - QString report; - QString originalPath; + TQString report; + TQString originalPath; }; - QPtrList itemList_; + TQPtrList itemList_; }; } diff --git a/kpf/src/Help.cpp b/kpf/src/Help.cpp index 19c6ae26..45e67b1a 100644 --- a/kpf/src/Help.cpp +++ b/kpf/src/Help.cpp @@ -31,7 +31,7 @@ namespace KPF namespace HelpText { - QString getServerNameHelp() + TQString getServerNameHelp() { switch(DNSSD::ServiceBrowser::isAvailable()) { case DNSSD::ServiceBrowser::Working: diff --git a/kpf/src/Help.h b/kpf/src/Help.h index 12584213..39a5b044 100644 --- a/kpf/src/Help.h +++ b/kpf/src/Help.h @@ -24,7 +24,7 @@ #ifndef KPF_HELP_H #define KPF_HELP_H -#include +#include namespace KPF { @@ -34,7 +34,7 @@ namespace KPF namespace HelpText { - QString getServerNameHelp(); + TQString getServerNameHelp(); } // End namespace HelpText diff --git a/kpf/src/KPFInterface.cpp b/kpf/src/KPFInterface.cpp index d12c751d..cc9c4bc5 100644 --- a/kpf/src/KPFInterface.cpp +++ b/kpf/src/KPFInterface.cpp @@ -42,7 +42,7 @@ KPFInterface::serverRootList() { QList l(KPF::WebServerManager::instance()->serverListLocal()); - QStringList ret; + TQStringList ret; for (QListIterator it(l); it.current(); ++it) ret << it.current()->root(); @@ -53,7 +53,7 @@ KPFInterface::serverRootList() bool KPFInterface::createServer ( - QString root, + TQString root, uint port, uint bandwidthLimit, uint connectionLimit, @@ -87,42 +87,42 @@ KPFInterface::createServer } bool -KPFInterface::disableServer(QString root) +KPFInterface::disableServer(TQString root) { kpfDebug << "KPFInterface::disableServer(" << root << ")" << endl; return KPF::WebServerManager::instance()->disableServer(root); } bool -KPFInterface::restartServer(QString root) +KPFInterface::restartServer(TQString root) { kpfDebug << "KPFInterface::restartServer(" << root << ")" << endl; return KPF::WebServerManager::instance()->restartServer(root); } bool -KPFInterface::reconfigureServer(QString root) +KPFInterface::reconfigureServer(TQString root) { kpfDebug << "KPFInterface::reconfigureServer(" << root << ")" << endl; return KPF::WebServerManager::instance()->reconfigureServer(root); } bool -KPFInterface::pauseServer(QString root) +KPFInterface::pauseServer(TQString root) { kpfDebug << "KPFInterface::pauseServer(" << root << ")" << endl; return KPF::WebServerManager::instance()->pauseServer(root, true); } bool -KPFInterface::unpauseServer(QString root) +KPFInterface::unpauseServer(TQString root) { kpfDebug << "KPFInterface::unpauseServer(" << root << ")" << endl; return KPF::WebServerManager::instance()->pauseServer(root, false); } bool -KPFInterface::serverPaused(QString root) +KPFInterface::serverPaused(TQString root) { kpfDebug << "KPFInterface::serverPaused(" << root << ")" << endl; return KPF::WebServerManager::instance()->serverPaused(root); diff --git a/kpf/src/KPFInterface.h b/kpf/src/KPFInterface.h index facd482c..a4d54f02 100644 --- a/kpf/src/KPFInterface.h +++ b/kpf/src/KPFInterface.h @@ -45,23 +45,23 @@ class KPFInterface : virtual public DCOPObject /** * @return list of root directories used by WebServer objects. */ - virtual QStringList serverRootList(); + virtual TQStringList serverRootList(); virtual bool createServer ( - QString root, + TQString root, uint port, uint bandwidthLimit = KPF::Config::DefaultBandwidthLimit, uint connectionLimit = KPF::Config::DefaultConnectionLimit, bool followSymlinks = KPF::Config::DefaultFollowSymlinks ); - virtual bool disableServer (QString root); - virtual bool restartServer (QString root); - virtual bool reconfigureServer (QString root); - virtual bool pauseServer (QString root); - virtual bool unpauseServer (QString root); - virtual bool serverPaused (QString root); + virtual bool disableServer (TQString root); + virtual bool restartServer (TQString root); + virtual bool reconfigureServer (TQString root); + virtual bool pauseServer (TQString root); + virtual bool unpauseServer (TQString root); + virtual bool serverPaused (TQString root); }; #endif diff --git a/kpf/src/PortValidator.cpp b/kpf/src/PortValidator.cpp index 01c2074e..b841377c 100644 --- a/kpf/src/PortValidator.cpp +++ b/kpf/src/PortValidator.cpp @@ -27,21 +27,21 @@ namespace KPF { - PortValidator::PortValidator(QObject * parent, const char * name) - : QValidator(parent, name) + PortValidator::PortValidator(TQObject * parent, const char * name) + : TQValidator(parent, name) { // Empty. } - QValidator::State - PortValidator::validate(QString & input, int & /* unused */) const + TQValidator::State + PortValidator::validate(TQString & input, int & /* unused */) const { uint port(input.toUInt()); - QPtrList + TQPtrList serverList(WebServerManager::instance()->serverListLocal()); - for (QPtrListIterator it(serverList); it.current(); ++it) + for (TQPtrListIterator it(serverList); it.current(); ++it) { if (it.current()->listenPort() == port) { diff --git a/kpf/src/PortValidator.h b/kpf/src/PortValidator.h index c86d0d01..cba5cbfc 100644 --- a/kpf/src/PortValidator.h +++ b/kpf/src/PortValidator.h @@ -24,7 +24,7 @@ #ifndef KPF_PORT_VALIDATOR_H #define KPF_PORT_VALIDATOR_H -#include +#include namespace KPF { @@ -36,9 +36,9 @@ namespace KPF { public: - PortValidator(QObject * parent, const char * name = 0); + PortValidator(TQObject * parent, const char * name = 0); - virtual State validate(QString & input, int & pos) const; + virtual State validate(TQString & input, int & pos) const; }; } // End namespace KPF diff --git a/kpf/src/PropertiesDialogPlugin.cpp b/kpf/src/PropertiesDialogPlugin.cpp index e86743e3..b53422ba 100644 --- a/kpf/src/PropertiesDialogPlugin.cpp +++ b/kpf/src/PropertiesDialogPlugin.cpp @@ -21,17 +21,17 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -106,7 +106,7 @@ namespace KPF uint listenPort; uint bandwidthLimit; // uint connectionLimit; - QString serverName; + TQString serverName; bool followSymlinks; }; @@ -132,25 +132,25 @@ namespace KPF { } - QLabel * l_listenPort; - QLabel * l_bandwidthLimit; -// QLabel * l_connectionLimit; - QLabel * l_serverName; - QLabel * l_kpfStatus; + TQLabel * l_listenPort; + TQLabel * l_bandwidthLimit; +// TQLabel * l_connectionLimit; + TQLabel * l_serverName; + TQLabel * l_kpfStatus; - QSpinBox * sb_listenPort; - QSpinBox * sb_bandwidthLimit; -// QSpinBox * sb_connectionLimit; - QLineEdit * le_serverName; + TQSpinBox * sb_listenPort; + TQSpinBox * sb_bandwidthLimit; +// TQSpinBox * sb_connectionLimit; + TQLineEdit * le_serverName; - QCheckBox * cb_followSymlinks; - QCheckBox * cb_share; + TQCheckBox * cb_followSymlinks; + TQCheckBox * cb_share; - QPushButton * pb_startKPF; + TQPushButton * pb_startKPF; - QWidgetStack * stack; - QWidget * initWidget; - QWidget * configWidget; + TQWidgetStack * stack; + TQWidget * initWidget; + TQWidget * configWidget; WebServerManager_stub * webServerManagerInterface; @@ -164,7 +164,7 @@ namespace KPF PropertiesDialogPlugin::PropertiesDialogPlugin(KPropertiesDialog * dialog, const char *, - const QStringList &) + const TQStringList &) : KPropsDlgPlugin(dialog) { d = new Private; @@ -175,19 +175,19 @@ namespace KPF d->url = dialog->kurl(); if ( - d->url == QDir::homeDirPath() - || d->url == "file:" + QDir::homeDirPath() + d->url == TQDir::homeDirPath() + || d->url == "file:" + TQDir::homeDirPath() ) { // Don't even show ourselves if it's the home dir return; } - QWidget * widget = dialog->addPage(i18n("&Sharing")); + TQWidget * widget = dialog->addPage(i18n("&Sharing")); - d->stack = new QWidgetStack(widget); + d->stack = new TQWidgetStack(widget); - QVBoxLayout * stackLayout = new QVBoxLayout(widget); + TQVBoxLayout * stackLayout = new TQVBoxLayout(widget); stackLayout->addWidget(d->stack); d->initWidget = createInitWidget(d->stack); @@ -201,15 +201,15 @@ namespace KPF connect ( kapp->dcopClient(), - SIGNAL(applicationRegistered(const QCString &)), - SLOT(slotApplicationRegistered(const QCString &)) + TQT_SIGNAL(applicationRegistered(const TQCString &)), + TQT_SLOT(slotApplicationRegistered(const TQCString &)) ); connect ( kapp->dcopClient(), - SIGNAL(applicationRemoved(const QCString &)), - SLOT(slotApplicationUnregistered(const QCString &)) + TQT_SIGNAL(applicationRemoved(const TQCString &)), + TQT_SLOT(slotApplicationUnregistered(const TQCString &)) ); d->kpfRunning = kapp->dcopClient()->isApplicationRegistered("kpf"); @@ -272,12 +272,12 @@ namespace KPF d->cb_followSymlinks ->setEnabled(b); } - QWidget * - PropertiesDialogPlugin::createInitWidget(QWidget * parent) + TQWidget * + PropertiesDialogPlugin::createInitWidget(TQWidget * parent) { - QWidget * w = new QWidget(parent); + TQWidget * w = new TQWidget(parent); - QLabel * about = + TQLabel * about = new QLabel ( i18n @@ -292,52 +292,52 @@ namespace KPF ); d->pb_startKPF - = new QPushButton(i18n("Start Applet"), w); + = new TQPushButton(i18n("Start Applet"), w); - QVBoxLayout * l = new QVBoxLayout(w); + TQVBoxLayout * l = new TQVBoxLayout(w); l->addWidget(about); d->l_kpfStatus = - new QLabel(i18n("Applet status: not running"), w); + new TQLabel(i18n("Applet status: not running"), w); l->addWidget(d->l_kpfStatus); - QHBoxLayout * l2 = new QHBoxLayout(l); + TQHBoxLayout * l2 = new TQHBoxLayout(l); l2->addStretch(1); l2->addWidget(d->pb_startKPF); l->addStretch(1); - connect(d->pb_startKPF, SIGNAL(clicked()), SLOT(slotStartKPF())); + connect(d->pb_startKPF, TQT_SIGNAL(clicked()), TQT_SLOT(slotStartKPF())); return w; } - QWidget * - PropertiesDialogPlugin::createConfigWidget(QWidget * parent) + TQWidget * + PropertiesDialogPlugin::createConfigWidget(TQWidget * parent) { - QWidget * w = new QWidget(parent); + TQWidget * w = new TQWidget(parent); d->cb_share = - new QCheckBox(i18n("Share this directory on the &Web"), w); + new TQCheckBox(i18n("Share this directory on the &Web"), w); - d->l_listenPort = new QLabel(i18n("&Listen port:"), w); - d->l_bandwidthLimit = new QLabel(i18n("&Bandwidth limit:"), w); -// d->l_connectionLimit = new QLabel(i18n("Connection &limit"), w); - d->l_serverName = new QLabel(i18n("&Server name:"), w); + d->l_listenPort = new TQLabel(i18n("&Listen port:"), w); + d->l_bandwidthLimit = new TQLabel(i18n("&Bandwidth limit:"), w); +// d->l_connectionLimit = new TQLabel(i18n("Connection &limit"), w); + d->l_serverName = new TQLabel(i18n("&Server name:"), w); bool canPublish = DNSSD::ServiceBrowser::isAvailable() == DNSSD::ServiceBrowser::Working; d->l_serverName->setEnabled(canPublish); - d->sb_listenPort = new QSpinBox(1000, 999999, 1, w); - d->sb_bandwidthLimit = new QSpinBox(1, 999999, 1, w); -// d->sb_connectionLimit = new QSpinBox(1, 9999, 1, w); - d->le_serverName = new QLineEdit( w); + d->sb_listenPort = new TQSpinBox(1000, 999999, 1, w); + d->sb_bandwidthLimit = new TQSpinBox(1, 999999, 1, w); +// d->sb_connectionLimit = new TQSpinBox(1, 9999, 1, w); + d->le_serverName = new TQLineEdit( w); d->le_serverName->setEnabled(canPublish); d->cb_followSymlinks = - new QCheckBox(i18n("&Follow symbolic links"), w); + new TQCheckBox(i18n("&Follow symbolic links"), w); d->l_listenPort ->setBuddy(d->sb_listenPort); d->l_serverName ->setBuddy(d->le_serverName); @@ -350,14 +350,14 @@ namespace KPF // d->sb_connectionLimit ->setValue(Config::DefaultConnectionLimit); d->cb_followSymlinks ->setChecked(Config::DefaultFollowSymlinks); - QVBoxLayout * l0 = - new QVBoxLayout(w, KDialog::marginHint(), KDialog::spacingHint()); + TQVBoxLayout * l0 = + new TQVBoxLayout(w, KDialog::marginHint(), KDialog::spacingHint()); l0->addWidget(d->cb_share); - l0->addWidget(new KSeparator(QFrame::HLine, w)); + l0->addWidget(new KSeparator(TQFrame::HLine, w)); - QGridLayout * l2 = new QGridLayout(l0); + TQGridLayout * l2 = new TQGridLayout(l0); l2->addWidget(d->l_listenPort, 0, 0); l2->addWidget(d->sb_listenPort, 0, 1); @@ -372,7 +372,7 @@ namespace KPF l0->addStretch(1); - QString shareHelp = + TQString shareHelp = i18n ( "

    " @@ -395,9 +395,9 @@ namespace KPF " (%1)" "

    " ) - .arg(QDir::homeDirPath()); + .arg(TQDir::homeDirPath()); - QString listenPortHelp = + TQString listenPortHelp = i18n ( "

    " @@ -406,7 +406,7 @@ namespace KPF "

    " ); - QString bandwidthLimitHelp = + TQString bandwidthLimitHelp = i18n ( "

    " @@ -419,7 +419,7 @@ namespace KPF "

    " ); - QString connectionLimitHelp = + TQString connectionLimitHelp = i18n ( "

    " @@ -428,7 +428,7 @@ namespace KPF "

    " ); - QString followSymlinksHelp = + TQString followSymlinksHelp = i18n ( "

    " @@ -441,64 +441,64 @@ namespace KPF " risk. Use only if you understand the issues involved." "

    " ); - QString serverNameHelp = KPF::HelpText::getServerNameHelp(); + TQString serverNameHelp = KPF::HelpText::getServerNameHelp(); - QWhatsThis::add(d->cb_share, shareHelp); - QWhatsThis::add(d->l_listenPort, listenPortHelp); - QWhatsThis::add(d->sb_listenPort, listenPortHelp); - QWhatsThis::add(d->l_bandwidthLimit, bandwidthLimitHelp); - QWhatsThis::add(d->sb_bandwidthLimit, bandwidthLimitHelp); -// QWhatsThis::add(d->l_connectionLimit, connectionLimitHelp); -// QWhatsThis::add(d->sb_connectionLimit, connectionLimitHelp); - QWhatsThis::add(d->l_serverName, serverNameHelp); - QWhatsThis::add(d->le_serverName, serverNameHelp); - QWhatsThis::add(d->cb_followSymlinks, followSymlinksHelp); + TQWhatsThis::add(d->cb_share, shareHelp); + TQWhatsThis::add(d->l_listenPort, listenPortHelp); + TQWhatsThis::add(d->sb_listenPort, listenPortHelp); + TQWhatsThis::add(d->l_bandwidthLimit, bandwidthLimitHelp); + TQWhatsThis::add(d->sb_bandwidthLimit, bandwidthLimitHelp); +// TQWhatsThis::add(d->l_connectionLimit, connectionLimitHelp); +// TQWhatsThis::add(d->sb_connectionLimit, connectionLimitHelp); + TQWhatsThis::add(d->l_serverName, serverNameHelp); + TQWhatsThis::add(d->le_serverName, serverNameHelp); + TQWhatsThis::add(d->cb_followSymlinks, followSymlinksHelp); - connect(d->cb_share, SIGNAL(toggled(bool)), SLOT(slotSharingToggled(bool))); + connect(d->cb_share, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSharingToggled(bool))); slotSharingToggled(false); connect ( d->cb_share, - SIGNAL(toggled(bool)), - SLOT(slotChanged()) + TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotChanged()) ); connect ( d->sb_listenPort, - SIGNAL(valueChanged(int)), - SLOT(slotChanged()) + TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotChanged()) ); connect ( d->sb_bandwidthLimit, - SIGNAL(valueChanged(int)), - SLOT(slotChanged()) + TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotChanged()) ); #if 0 connect ( d->sb_connectionLimit, - SIGNAL(valueChanged(int)), - SLOT(slotChanged()) + TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotChanged()) ); #endif connect ( d->le_serverName, - SIGNAL(textChanged(const QString&)), - SLOT(slotChanged()) + TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(slotChanged()) ); connect ( d->cb_followSymlinks, - SIGNAL(toggled(bool)), - SLOT(slotChanged()) + TQT_SIGNAL(toggled(bool)), + TQT_SLOT(slotChanged()) ); return w; @@ -511,9 +511,9 @@ namespace KPF ->setText(i18n("Applet status: starting...")); kapp->dcopClient() - ->send("kicker", "default", "addApplet(QString)", "kpfapplet.desktop"); + ->send("kicker", "default", "addApplet(TQString)", "kpfapplet.desktop"); - QTimer::singleShot(4 * 1000, this, SLOT(slotStartKPFFailed())); + TQTimer::singleShot(4 * 1000, this, TQT_SLOT(slotStartKPFFailed())); } void @@ -526,7 +526,7 @@ namespace KPF } void - PropertiesDialogPlugin::slotApplicationRegistered(const QCString & s) + PropertiesDialogPlugin::slotApplicationRegistered(const TQCString & s) { if ("kpf" == s) { @@ -544,7 +544,7 @@ namespace KPF } void - PropertiesDialogPlugin::slotApplicationUnregistered(const QCString & s) + PropertiesDialogPlugin::slotApplicationUnregistered(const TQCString & s) { if ("kpf" == s) { @@ -629,7 +629,7 @@ namespace KPF void PropertiesDialogPlugin::getServerRef() { - QValueList serverRefList = + TQValueList serverRefList = d->webServerManagerInterface->serverList(); if (DCOPStub::CallFailed == d->webServerManagerInterface->status()) @@ -641,7 +641,7 @@ namespace KPF d->webServerRef.clear(); - QValueList::ConstIterator it(serverRefList.begin()); + TQValueList::ConstIterator it(serverRefList.begin()); for (; it != serverRefList.end(); ++it) { @@ -660,7 +660,7 @@ namespace KPF bool PropertiesDialogPlugin::userAcceptsWarning() const { - QString noWarningKey("DoNotWarnAboutSharingDirectoriesViaHTTP"); + TQString noWarningKey("DoNotWarnAboutSharingDirectoriesViaHTTP"); KConfig * config(KGlobal::config()); diff --git a/kpf/src/PropertiesDialogPlugin.h b/kpf/src/PropertiesDialogPlugin.h index 5881080a..8406f4c2 100644 --- a/kpf/src/PropertiesDialogPlugin.h +++ b/kpf/src/PropertiesDialogPlugin.h @@ -40,7 +40,7 @@ namespace KPF public: - PropertiesDialogPlugin(KPropertiesDialog *, const char *, const QStringList &); + PropertiesDialogPlugin(KPropertiesDialog *, const char *, const TQStringList &); virtual ~PropertiesDialogPlugin(); @@ -52,8 +52,8 @@ namespace KPF void slotStartKPF(); void slotStartKPFFailed(); - void slotApplicationRegistered(const QCString &); - void slotApplicationUnregistered(const QCString &); + void slotApplicationRegistered(const TQCString &); + void slotApplicationUnregistered(const TQCString &); void slotChanged(); @@ -64,8 +64,8 @@ namespace KPF void updateGUIFromCurrentState(); void updateWantedStateFromGUI(); - QWidget * createInitWidget(QWidget * parent); - QWidget * createConfigWidget(QWidget * parent); + TQWidget * createInitWidget(TQWidget * parent); + TQWidget * createConfigWidget(TQWidget * parent); void readSettings(); void setControlsEnabled(bool); diff --git a/kpf/src/Request.cpp b/kpf/src/Request.cpp index 01735363..442e4993 100644 --- a/kpf/src/Request.cpp +++ b/kpf/src/Request.cpp @@ -23,7 +23,7 @@ #include // For ULONG_MAX -#include +#include #include #include "Defines.h" @@ -50,25 +50,25 @@ namespace KPF } void - Request::parseHeaders(const QStringList & buf) + Request::parseHeaders(const TQStringList & buf) { - for (QStringList::ConstIterator it(buf.begin()); it != buf.end(); ++it) + for (TQStringList::ConstIterator it(buf.begin()); it != buf.end(); ++it) { - QString line(*it); + TQString line(*it); int colonPos = line.find(':'); if (-1 != colonPos) { - QString name(line.left(colonPos).stripWhiteSpace().lower()); - QString value(line.mid(colonPos + 1).stripWhiteSpace()); + TQString name(line.left(colonPos).stripWhiteSpace().lower()); + TQString value(line.mid(colonPos + 1).stripWhiteSpace()); handleHeader(name, value); } } } void - Request::handleHeader(const QString & name, const QString & value) + Request::handleHeader(const TQString & name, const TQString & value) { if ("host" == name) { @@ -80,21 +80,21 @@ namespace KPF } else if ("if-modified-since" == name) { - QDateTime dt; + TQDateTime dt; if (parseDate(value, dt)) setIfModifiedSince(dt); } else if ("if-unmodified-since" == name) { - QDateTime dt; + TQDateTime dt; if (parseDate(value, dt)) setIfUnmodifiedSince(dt); } else if ("connection" == name) { - QString v(value.lower()); + TQString v(value.lower()); if ("keep-alive" == v) { @@ -108,9 +108,9 @@ namespace KPF } void - Request::setProtocol(const QString & _s) + Request::setProtocol(const TQString & _s) { - QString s(_s); + TQString s(_s); s.remove(0, 5); @@ -131,7 +131,7 @@ namespace KPF } void - Request::setMethod(const QString & s) + Request::setMethod(const TQString & s) { if ("GET" == s) method_ = Get; @@ -148,7 +148,7 @@ namespace KPF } void - Request::setPath(const QString & s) + Request::setPath(const TQString & s) { KURL p(s); path_ = clean(p.path()); @@ -162,21 +162,21 @@ namespace KPF } void - Request::setHost(const QString & s) + Request::setHost(const TQString & s) { host_ = s; haveHost_ = true; } void - Request::setIfModifiedSince(const QDateTime & dt) + Request::setIfModifiedSince(const TQDateTime & dt) { ifModifiedSince_ = dt; haveIfModifiedSince_ = true; } void - Request::setIfUnmodifiedSince(const QDateTime & dt) + Request::setIfUnmodifiedSince(const TQDateTime & dt) { ifUnmodifiedSince_ = dt; haveIfUnmodifiedSince_ = true; @@ -251,10 +251,10 @@ namespace KPF QCString Request::protocolString() const { - QCString s("HTTP/"); - s += QCString().setNum(protocolMajor_); + TQCString s("HTTP/"); + s += TQCString().setNum(protocolMajor_); s += '.'; - s += QCString().setNum(protocolMinor_); + s += TQCString().setNum(protocolMinor_); return s; } @@ -271,7 +271,7 @@ namespace KPF } void - Request::setRange(const QString & s) + Request::setRange(const TQString & s) { kpfDebug << "Request::setRange(`" << s << "')" << endl; @@ -346,17 +346,17 @@ namespace KPF expectContinue_ = false; haveRange_ = false; persist_ = false; - path_ = QString::null; - host_ = QString::null; - ifModifiedSince_ = QDateTime(); - ifUnmodifiedSince_ = QDateTime(); + path_ = TQString::null; + host_ = TQString::null; + ifModifiedSince_ = TQDateTime(); + ifUnmodifiedSince_ = TQDateTime(); range_.clear(); } QString - Request::clean(const QString & _path) const + Request::clean(const TQString & _path) const { - QString s(_path); + TQString s(_path); while (s.endsWith("/./")) s.truncate(s.length() - 2); @@ -366,7 +366,7 @@ namespace KPF // Double slash -> slash. - QRegExp r("\\/\\/+"); + TQRegExp r("\\/\\/+"); s.replace(r, "/"); return s; diff --git a/kpf/src/Request.h b/kpf/src/Request.h index 92034c9c..d31d5ef8 100644 --- a/kpf/src/Request.h +++ b/kpf/src/Request.h @@ -24,9 +24,9 @@ #ifndef KPF_REQUEST_H #define KPF_REQUEST_H -#include -#include -#include +#include +#include +#include #include "ByteRange.h" @@ -58,12 +58,12 @@ namespace KPF * Take a list of headers and parse them, setting our values * appropriately. */ - void parseHeaders(const QStringList &); + void parseHeaders(const TQStringList &); /** * Parse one header line and set whatever value is appropriate. */ - void handleHeader(const QString & name, const QString & value); + void handleHeader(const TQString & name, const TQString & value); /** * HTTP has had a few revisions (protocols) since birth. Here you may @@ -71,7 +71,7 @@ namespace KPF * version of setProtocol parses a string of the form * "HTTP/major.minor", where major and minor are integers. */ - void setProtocol (const QString &); + void setProtocol (const TQString &); /** * HTTP has had a few revisions (protocols) since birth. Here you may @@ -83,7 +83,7 @@ namespace KPF * Specify the 'method' requested by the client. This version parses * a string. */ - void setMethod (const QString &); + void setMethod (const TQString &); /** * Specify the 'method' requested by the client. @@ -94,26 +94,26 @@ namespace KPF * Set the path to the requested resource. The path is * immediately decoded and canonicalised. */ - void setPath (const QString &); + void setPath (const TQString &); /** * HTTP/1.1 requests must have a "Host:" header. */ - void setHost (const QString &); + void setHost (const TQString &); /** * HTTP/1.1 allows an "If-Modified-Since" header, specifying that * the requested resource should only be retrieved if the resource * has been modified since a certain date and time. */ - void setIfModifiedSince (const QDateTime &); + void setIfModifiedSince (const TQDateTime &); /** * HTTP/1.1 allows an "If-Unmodified-Since" header, specifying that * the requested resource should only be retrieved if the resource * has NOT been modified since a certain date and time. */ - void setIfUnmodifiedSince (const QDateTime &); + void setIfUnmodifiedSince (const TQDateTime &); /** * HTTP/1.1 allows an "Expect: 100-continue" header, specifying @@ -125,7 +125,7 @@ namespace KPF * Specify a range of bytes which should be retrieved from the * resource. See RFC 2616. */ - void setRange (const QString &); + void setRange (const TQString &); /** * HTTP/1.1 allows "persistent" connections. These may be specified @@ -172,27 +172,27 @@ namespace KPF /** * @return the path that was set with (and modified by) setPath() */ - QString path() const; + TQString path() const; /** * @return the host that was set previously. */ - QString host() const; + TQString host() const; /** * @return the date/time set by @ref setIfModifiedSince previously. */ - QDateTime ifModifiedSince() const; + TQDateTime ifModifiedSince() const; /** * @return the date/time set by @ref setIfUnmodifiedSince previously. */ - QDateTime ifUnmodifiedSince() const; + TQDateTime ifUnmodifiedSince() const; /** * @return the protocol as a string, e.g. "HTTP/1.1". */ - QCString protocolString() const; + TQCString protocolString() const; /** * @return true if @ref setExpectContinue was used previously. @@ -223,7 +223,7 @@ namespace KPF * Clean up the path given in a request, so it's more like what we * expect. */ - QString clean(const QString & path) const; + TQString clean(const TQString & path) const; private: @@ -239,10 +239,10 @@ namespace KPF bool persist_; // End order dependency - QString path_; - QString host_; - QDateTime ifModifiedSince_; - QDateTime ifUnmodifiedSince_; + TQString path_; + TQString host_; + TQDateTime ifModifiedSince_; + TQDateTime ifUnmodifiedSince_; ByteRange range_; }; diff --git a/kpf/src/Resource.cpp b/kpf/src/Resource.cpp index d5e77072..6c3dad91 100644 --- a/kpf/src/Resource.cpp +++ b/kpf/src/Resource.cpp @@ -21,11 +21,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -50,17 +50,17 @@ namespace KPF { } - QString root; + TQString root; FileType fileType; - QString path; - QFile file; - QFileInfo fileInfo; - QDir dir; + TQString path; + TQFile file; + TQFileInfo fileInfo; + TQDir dir; uint size; bool sizeCalculated; uint offset; - QByteArray html; + TQByteArray html; }; Resource::Resource() @@ -75,7 +75,7 @@ namespace KPF } void - Resource::setPath(const QString & root, const QString & relativePath) + Resource::setPath(const TQString & root, const TQString & relativePath) { kpfDebug << "setPath(`" << root << "',`" << relativePath << "'" << endl; @@ -99,13 +99,13 @@ namespace KPF // Does the path actually point to a directory ? - if (QFileInfo(d->root + d->path).isDir()) + if (TQFileInfo(d->root + d->path).isDir()) { kpfDebug << "Path points to directory" << endl; // Does an index.html exist in that directory ? - if (QFileInfo(d->root + d->path + "index.html").exists()) + if (TQFileInfo(d->root + d->path + "index.html").exists()) { kpfDebug << "Found index.html" << endl; @@ -129,7 +129,7 @@ namespace KPF kpfDebug << "NOT Directory requested" << endl; } - kpfDebug << "QFileInfo::setFile(`" << d->root << "' + `" << d->path << "'" << endl; + kpfDebug << "TQFileInfo::setFile(`" << d->root << "' + `" << d->path << "'" << endl; d->fileInfo.setFile(d->root + d->path); } @@ -296,18 +296,18 @@ namespace KPF if (d->fileInfo.isSymLink()) return true; - QString path(d->fileInfo.dirPath()); + TQString path(d->fileInfo.dirPath()); - QStringList l(QStringList::split('/', path)); + TQStringList l(TQStringList::split('/', path)); - QString testPath; + TQString testPath; - for (QStringList::ConstIterator it(l.begin()); it != l.end(); ++it) + for (TQStringList::ConstIterator it(l.begin()); it != l.end(); ++it) { testPath += '/'; testPath += *it; - if (QFileInfo(testPath).isSymLink()) + if (TQFileInfo(testPath).isSymLink()) return true; } diff --git a/kpf/src/Resource.h b/kpf/src/Resource.h index 870daed7..f6e0044c 100644 --- a/kpf/src/Resource.h +++ b/kpf/src/Resource.h @@ -24,8 +24,8 @@ #ifndef KPF_RESOURCE_H #define KPF_RESOURCE_H -#include -#include +#include +#include namespace KPF { @@ -51,7 +51,7 @@ namespace KPF /** * Reset this object and tell it what the new paths are. */ - void setPath(const QString & root, const QString & relativePath); + void setPath(const TQString & root, const TQString & relativePath); /** * @return true if the file was opened ok or the dir was readable. @@ -96,7 +96,7 @@ namespace KPF /** * @return mtime of resource. */ - QDateTime lastModified() const; + TQDateTime lastModified() const; /** * @return size of file, or size of HTML that will be generated. @@ -123,7 +123,7 @@ namespace KPF * @return mime type of file if available. If dir, returns text/html. * If nothing available, returns text/plain. */ - QString mimeType() const; + TQString mimeType() const; /** * Reset to initial state. diff --git a/kpf/src/Response.cpp b/kpf/src/Response.cpp index f9ce46d8..a52de893 100644 --- a/kpf/src/Response.cpp +++ b/kpf/src/Response.cpp @@ -21,9 +21,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include -#include +#include +#include +#include #include @@ -79,7 +79,7 @@ namespace KPF QCString Response::text(const Request & request) const { - QString s; + TQString s; // XXX: Ensure that all codes we know about are enumerated here. switch (code_) @@ -89,8 +89,8 @@ namespace KPF case 304: if (request.protocol() >= 1.0) { - s = QString(request.protocolString()) - + QString(" %1 %2\r\n").arg(code_).arg(responseName(code_)); + s = TQString(request.protocolString()) + + TQString(" %1 %2\r\n").arg(code_).arg(responseName(code_)); } break; @@ -102,8 +102,8 @@ namespace KPF case 500: case 501: case 505: - s = QString(request.protocolString()) - + QString(" %1 %2\r\n").arg(code_).arg(responseName(code_)) + s = TQString(request.protocolString()) + + TQString(" %1 %2\r\n").arg(code_).arg(responseName(code_)) + data(code_, request); break; @@ -118,13 +118,13 @@ namespace KPF QString Response::data(uint code, const Request & request) const { - QString contentType = "Content-Type: text/html; charset=utf-8\r\n"; + TQString contentType = "Content-Type: text/html; charset=utf-8\r\n"; KConfig config(Config::name()); config.setGroup("General"); - QString html; + TQString html; if ( @@ -134,26 +134,26 @@ namespace KPF { config.setGroup("ErrorMessageOverrideFiles"); - QString filename = config.readPathEntry(QString::number(code)); + TQString filename = config.readPathEntry(TQString::number(code)); if (!filename.isEmpty()) { - QFile f(filename); + TQFile f(filename); if (f.open(IO_ReadOnly)) { - QRegExp regexpMessage ("ERROR_MESSAGE"); - QRegExp regexpCode ("ERROR_CODE"); - QRegExp regexpResource ("RESOURCE"); + TQRegExp regexpMessage ("ERROR_MESSAGE"); + TQRegExp regexpCode ("ERROR_CODE"); + TQRegExp regexpResource ("RESOURCE"); - QTextStream str(&f); + TQTextStream str(&f); while (!str.atEnd()) { - QString line(str.readLine()); + TQString line(str.readLine()); line.replace(regexpMessage, responseName(code)); - line.replace(regexpCode, QString::number(code)); + line.replace(regexpCode, TQString::number(code)); line.replace(regexpResource, request.path()); html = line + "\r\n"; @@ -177,8 +177,8 @@ namespace KPF html += "\r\n\r\n"; } - QString contentLength = - QString("Content-Length: %1\r\n").arg(html.length()); + TQString contentLength = + TQString("Content-Length: %1\r\n").arg(html.length()); return (contentType + contentLength + "\r\n" + html); } diff --git a/kpf/src/Response.h b/kpf/src/Response.h index c24ba69c..d4da0706 100644 --- a/kpf/src/Response.h +++ b/kpf/src/Response.h @@ -76,7 +76,7 @@ namespace KPF * @return header/body data to send to the client. This string is * constructed differently depending on HTTP response code. */ - QCString text(const Request &) const; + TQCString text(const Request &) const; /** * Reset to initial state. @@ -89,7 +89,7 @@ namespace KPF * @internal * Create HTML. */ - QString data(uint, const Request &) const; + TQString data(uint, const Request &) const; private: diff --git a/kpf/src/RootValidator.cpp b/kpf/src/RootValidator.cpp index 17d6a43a..00fae54d 100644 --- a/kpf/src/RootValidator.cpp +++ b/kpf/src/RootValidator.cpp @@ -21,23 +21,23 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include +#include +#include #include "RootValidator.h" #include "WebServerManager.h" namespace KPF { - RootValidator::RootValidator(QObject * parent, const char * name) - : QValidator(parent, name) + RootValidator::RootValidator(TQObject * parent, const char * name) + : TQValidator(parent, name) { } - QValidator::State - RootValidator::validate(QString & input, int & /* unused */) const + TQValidator::State + RootValidator::validate(TQString & input, int & /* unused */) const { - QString root(input); + TQString root(input); if ('/' == root.at(root.length() - 1)) { @@ -49,13 +49,13 @@ namespace KPF if (0 != WebServerManager::instance()->server(root)) return Intermediate; - QFileInfo fi(root); + TQFileInfo fi(root); if (!fi.isDir()) return Intermediate; // Disabling disallowing of ~, on request. -// if (fi.dirPath() == QDir::homeDirPath()) +// if (fi.dirPath() == TQDir::homeDirPath()) // return Intermediate; return Acceptable; diff --git a/kpf/src/RootValidator.h b/kpf/src/RootValidator.h index 5ac96829..020816f7 100644 --- a/kpf/src/RootValidator.h +++ b/kpf/src/RootValidator.h @@ -24,7 +24,7 @@ #ifndef KPF_ROOT_VALIDATOR_H #define KPF_ROOT_VALIDATOR_H -#include +#include namespace KPF { @@ -36,9 +36,9 @@ namespace KPF { public: - RootValidator(QObject * parent, const char * name = 0); + RootValidator(TQObject * parent, const char * name = 0); - virtual State validate(QString & input, int & pos) const; + virtual State validate(TQString & input, int & pos) const; }; } // End namespace KPF diff --git a/kpf/src/Server.cpp b/kpf/src/Server.cpp index 3e59281a..90d94209 100644 --- a/kpf/src/Server.cpp +++ b/kpf/src/Server.cpp @@ -38,12 +38,12 @@ namespace KPF Server::Server ( - const QString & dir, + const TQString & dir, bool followSymlinks, int socket, WebServer * parent ) - : QObject(parent, "Server") + : TQObject(parent, "Server") { d = new Private; @@ -53,38 +53,38 @@ namespace KPF d->followSymlinks = followSymlinks; - d->birth = QDateTime::currentDateTime(); + d->birth = TQDateTime::currentDateTime(); d->socket.setSocket(socket); - connect(&(d->socket), SIGNAL(readyRead()), this, SLOT(slotReadyRead())); + connect(&(d->socket), TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotReadyRead())); connect ( &(d->socket), - SIGNAL(bytesWritten(int)), - SLOT(slotBytesWritten(int)) + TQT_SIGNAL(bytesWritten(int)), + TQT_SLOT(slotBytesWritten(int)) ); connect ( &(d->socket), - SIGNAL(connectionClosed()), - SLOT(slotConnectionClosed()) + TQT_SIGNAL(connectionClosed()), + TQT_SLOT(slotConnectionClosed()) ); connect ( &(d->idleTimer), - SIGNAL(timeout()), - SLOT(slotTimeout()) + TQT_SIGNAL(timeout()), + TQT_SLOT(slotTimeout()) ); connect ( &(d->readTimer), - SIGNAL(timeout()), - SLOT(slotRead()) + TQT_SIGNAL(timeout()), + TQT_SLOT(slotRead()) ); // If nothing happens for a bit, cancel ourselves. @@ -128,7 +128,7 @@ namespace KPF { kpfDebug << d->id << ": socket.canReadLine" << endl; - QString line(d->socket.readLine().stripWhiteSpace()); + TQString line(d->socket.readLine().stripWhiteSpace()); #ifdef KPF_TRAFFIC_DEBUG kpfDebug @@ -194,7 +194,7 @@ namespace KPF } bool - Server::readRequest(const QString & line) + Server::readRequest(const TQString & line) { ++d->requestCount; @@ -205,9 +205,9 @@ namespace KPF << line << "'" << endl; #endif - QStringList l(QStringList::split(' ', line)); + TQStringList l(TQStringList::split(' ', line)); - // A request usually looks like METHOD PATH PROTOCOL but we don't + // A request usually looks like TQT_METHOD PATH PROTOCOL but we don't // require PROTOCOL - we just assume HTTP/0.9 and act accordingly. if (l.count() == 2) @@ -226,7 +226,7 @@ namespace KPF d->request.setMethod (l[0]); d->request.setPath (l[1]); - d->request.setProtocol (l.count() == 3 ? l[2] : QString::null); + d->request.setProtocol (l.count() == 3 ? l[2] : TQString::null); // Before we check the request, say we received it. @@ -238,7 +238,7 @@ namespace KPF bool Server::checkRequest() { - // We only handle METHOD of GET or HEAD. + // We only handle TQT_METHOD of GET or HEAD. if (Request::Unsupported == d->request.method()) { @@ -336,7 +336,7 @@ namespace KPF // This would be cleaner if there was a QValueQueue. // Basically we 'dequeue' the first line from incomingHeaderBuffer. - QString line(d->incomingLineBuffer.first()); + TQString line(d->incomingLineBuffer.first()); d->incomingLineBuffer.remove(d->incomingLineBuffer.begin()); // Unless the line is empty, this is (in theory) a header. @@ -393,7 +393,7 @@ namespace KPF { // The path to the requested resource is relative to our root. - QString filename = d->dir + '/' + d->request.path(); + TQString filename = d->dir + '/' + d->request.path(); kpfDebug << d->id << ": filename: " << filename << endl; @@ -550,25 +550,25 @@ namespace KPF if (206 == d->response.code()) { - QString line = "Content-Range: bytes "; + TQString line = "Content-Range: bytes "; - line += QString::number(d->request.range().first()); + line += TQString::number(d->request.range().first()); line += '-'; if (d->request.range().haveLast()) - line += QString::number(d->request.range().last()); + line += TQString::number(d->request.range().last()); else - line += QString::number(d->resource.size() - 1); + line += TQString::number(d->resource.size() - 1); line += '/'; - line += QString::number(d->resource.size()); + line += TQString::number(d->resource.size()); writeLine(line); } - writeLine("Content-Length: " + QString::number(d->fileBytesLeft)); + writeLine("Content-Length: " + TQString::number(d->fileBytesLeft)); } if (d->requestCount >= MaxKeepAlive && d->request.protocol() >= 1.1) @@ -689,12 +689,12 @@ namespace KPF } void - Server::writeLine(const QString & line) + Server::writeLine(const TQString & line) { // Fill a buffer. We're not allowed to send anything out until our // controller calls write(). - QCString s(line.utf8() + "\r\n"); + TQCString s(line.utf8() + "\r\n"); d->headerBytesLeft += s.length(); d->outgoingHeaderBuffer += s; @@ -717,7 +717,7 @@ namespace KPF // Request from the Response object the text that should be sent // back to the client. - QCString s(d->response.text(d->request)); + TQCString s(d->response.text(d->request)); // Tell our Response object how long it will be in total (it doesn't // know its total size until we tell it about the resource size.) @@ -754,7 +754,7 @@ namespace KPF d->socket.close(); - d->death = QDateTime::currentDateTime(); + d->death = TQDateTime::currentDateTime(); emit(finished(this)); } @@ -789,7 +789,7 @@ namespace KPF // If the socket has been closed (e.g. the remote end hung up) // then we just give up. - if (QSocket::Connection != d->socket.state()) + if (TQSocket::Connection != d->socket.state()) { kpfDebug << d->id << ": Socket closed by client -> finished" << endl; setFinished(Flush); @@ -1020,7 +1020,7 @@ namespace KPF bytesToWrite = min(bytesToWrite, d->socket.outputBufferLeft()); - QByteArray a(bytesToWrite); + TQByteArray a(bytesToWrite); if (0 == bytesToWrite) return true; @@ -1049,14 +1049,14 @@ namespace KPF kpfDebug << d->id << ": Wrote file data: `" - << QCString(a.data(), fileBytesWritten) + << TQCString(a.data(), fileBytesWritten) << "'" << endl; #endif // We should have been able to write the full amount to the socket, // because we tested d->socket.outputBufferLeft(). If we didn't - // manage to write that much, either we have a bug or QSocket does. + // manage to write that much, either we have a bug or TQSocket does. if (fileBytesWritten < fileBytesRead) { diff --git a/kpf/src/Server.h b/kpf/src/Server.h index 8d26a167..c83f4a3d 100644 --- a/kpf/src/Server.h +++ b/kpf/src/Server.h @@ -24,9 +24,9 @@ #ifndef KPF_SERVER_H #define KPF_SERVER_H -#include -#include -#include +#include +#include +#include #include "Request.h" #include "Response.h" @@ -64,7 +64,7 @@ namespace KPF */ Server ( - const QString & dir, + const TQString & dir, bool followSymlinks, int socket, WebServer * parent @@ -78,7 +78,7 @@ namespace KPF /** * @return address of client that has connected to us. */ - QHostAddress peerAddress() const; + TQHostAddress peerAddress() const; /** * @return Request object associated with this connection. @@ -109,12 +109,12 @@ namespace KPF /** * @return date and time this object was created. */ - QDateTime birth() const; + TQDateTime birth() const; /** * @return date and time all activity was completed. */ - QDateTime death() const; + TQDateTime death() const; /** * @return number of bytes remaining to send to client. @@ -164,10 +164,10 @@ namespace KPF }; void setFinished (FlushSelect); - void writeLine (const QString &); + void writeLine (const TQString &); void prepareResponse (); void respond (uint code, ulong size = 0); - bool readRequest (const QString &); + bool readRequest (const TQString &); bool checkRequest (); void handleRequest (); void readHeaders (); diff --git a/kpf/src/ServerPrivate.h b/kpf/src/ServerPrivate.h index fcf7fd39..91d6424a 100644 --- a/kpf/src/ServerPrivate.h +++ b/kpf/src/ServerPrivate.h @@ -24,8 +24,8 @@ #ifndef KPF_SERVER_PRIVATE_H #define KPF_SERVER_PRIVATE_H -#include -#include +#include +#include #include "ServerSocket.h" #include "Server.h" @@ -57,17 +57,17 @@ namespace KPF uint requestCount; // End order dependency - QString dir; + TQString dir; Request request; Response response; Resource resource; - QStringList incomingHeaderLineBuffer; - QStringList incomingLineBuffer; - QDateTime birth; - QDateTime death; - QCString outgoingHeaderBuffer; - QTimer idleTimer; - QTimer readTimer; + TQStringList incomingHeaderLineBuffer; + TQStringList incomingLineBuffer; + TQDateTime birth; + TQDateTime death; + TQCString outgoingHeaderBuffer; + TQTimer idleTimer; + TQTimer readTimer; ulong id; static ulong ID; }; diff --git a/kpf/src/ServerSocket.cpp b/kpf/src/ServerSocket.cpp index 9f39ac57..38d419a5 100644 --- a/kpf/src/ServerSocket.cpp +++ b/kpf/src/ServerSocket.cpp @@ -21,15 +21,15 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include +#include #include "Defines.h" #include "ServerSocket.h" namespace KPF { - ServerSocket::ServerSocket(QObject * parent, const char * name) - : QSocket(parent, name) + ServerSocket::ServerSocket(TQObject * parent, const char * name) + : TQSocket(parent, name) { // Empty. } diff --git a/kpf/src/ServerSocket.h b/kpf/src/ServerSocket.h index 14a2e2d8..76618c9b 100644 --- a/kpf/src/ServerSocket.h +++ b/kpf/src/ServerSocket.h @@ -24,7 +24,7 @@ #ifndef KPF_SERVER_SOCKET_H #define KPF_SERVER_SOCKET_H -#include +#include namespace KPF { @@ -36,7 +36,7 @@ namespace KPF { public: - ServerSocket(QObject * parent, const char * name = 0); + ServerSocket(TQObject * parent, const char * name = 0); uint outputBufferLeft(); }; diff --git a/kpf/src/ServerWizard.cpp b/kpf/src/ServerWizard.cpp index 8ca47e22..840c64d9 100644 --- a/kpf/src/ServerWizard.cpp +++ b/kpf/src/ServerWizard.cpp @@ -21,12 +21,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -46,18 +46,18 @@ namespace KPF { - ServerWizard::ServerWizard(QWidget * parent) + ServerWizard::ServerWizard(TQWidget * parent) : KWizard(parent, "KPF::ServerWizard", true) { setCaption(i18n("New Server - %1").arg("kpf")); - page1_ = new QWidget(this); - page2_ = new QWidget(this); - page3_ = new QWidget(this); -// page4_ = new QWidget(this); - page5_ = new QWidget(this); + page1_ = new TQWidget(this); + page2_ = new TQWidget(this); + page3_ = new TQWidget(this); +// page4_ = new TQWidget(this); + page5_ = new TQWidget(this); - QLabel * l_rootDirectoryHelp = + TQLabel * l_rootDirectoryHelp = new QLabel ( i18n @@ -74,7 +74,7 @@ namespace KPF page1_ ); - QLabel * l_listenPortHelp = + TQLabel * l_listenPortHelp = new QLabel ( i18n @@ -87,7 +87,7 @@ namespace KPF page2_ ); - QLabel * l_bandwidthLimitHelp = + TQLabel * l_bandwidthLimitHelp = new QLabel ( i18n @@ -104,7 +104,7 @@ namespace KPF page3_ ); /* - QLabel * l_connectionLimitHelp = + TQLabel * l_connectionLimitHelp = new QLabel ( i18n @@ -118,42 +118,42 @@ namespace KPF ); */ bool canPublish = DNSSD::ServiceBrowser::isAvailable() == DNSSD::ServiceBrowser::Working; - QLabel * l_serverNameHelp = + TQLabel * l_serverNameHelp = new QLabel ( KPF::HelpText::getServerNameHelp(), page5_ ); - QLabel * l_root_ = - new QLabel(i18n("&Root directory:"), page1_); + TQLabel * l_root_ = + new TQLabel(i18n("&Root directory:"), page1_); - QLabel * l_listenPort_ = - new QLabel(i18n("&Listen port:"), page2_); + TQLabel * l_listenPort_ = + new TQLabel(i18n("&Listen port:"), page2_); - QLabel * l_bandwidthLimit_ = - new QLabel(i18n("&Bandwidth limit:"), page3_); + TQLabel * l_bandwidthLimit_ = + new TQLabel(i18n("&Bandwidth limit:"), page3_); -// QLabel * l_connectionLimit_ = -// new QLabel(i18n("Connection &limit"), page4_); +// TQLabel * l_connectionLimit_ = +// new TQLabel(i18n("Connection &limit"), page4_); - QLabel * l_serverName_ = - new QLabel(i18n("&Server name:"), page5_); + TQLabel * l_serverName_ = + new TQLabel(i18n("&Server name:"), page5_); if(!canPublish) l_serverName_->setEnabled(false); kur_root_ = new KURLRequester(page1_); - sb_listenPort_ = new QSpinBox(1, 65535, 1, page2_); + sb_listenPort_ = new TQSpinBox(1, 65535, 1, page2_); - sb_bandwidthLimit_ = new QSpinBox(1, 999999, 1, page3_); -// sb_connectionLimit_ = new QSpinBox(1, 9999, 1, page4_); + sb_bandwidthLimit_ = new TQSpinBox(1, 999999, 1, page3_); +// sb_connectionLimit_ = new TQSpinBox(1, 9999, 1, page4_); char hostname[255]; gethostname(hostname, 255-2); hostname[255-1]=0; - le_serverName_ = new QLineEdit(hostname, page5_); + le_serverName_ = new TQLineEdit(hostname, page5_); if(!canPublish) le_serverName_->setEnabled(false); @@ -171,20 +171,20 @@ namespace KPF sb_bandwidthLimit_ ->setSuffix(i18n(" kB/s")); // sb_connectionLimit_ ->setValue(Config::DefaultConnectionLimit); - QVBoxLayout * layout1 = - new QVBoxLayout(page1_, KDialog::marginHint(), KDialog::spacingHint()); + TQVBoxLayout * layout1 = + new TQVBoxLayout(page1_, KDialog::marginHint(), KDialog::spacingHint()); - QVBoxLayout * layout2 = - new QVBoxLayout(page2_, KDialog::marginHint(), KDialog::spacingHint()); + TQVBoxLayout * layout2 = + new TQVBoxLayout(page2_, KDialog::marginHint(), KDialog::spacingHint()); - QVBoxLayout * layout3 = - new QVBoxLayout(page3_, KDialog::marginHint(), KDialog::spacingHint()); + TQVBoxLayout * layout3 = + new TQVBoxLayout(page3_, KDialog::marginHint(), KDialog::spacingHint()); -// QVBoxLayout * layout4 = -// new QVBoxLayout(page4_, KDialog::marginHint(), KDialog::spacingHint()); +// TQVBoxLayout * layout4 = +// new TQVBoxLayout(page4_, KDialog::marginHint(), KDialog::spacingHint()); - QVBoxLayout * layout5 = - new QVBoxLayout(page5_, KDialog::marginHint(), KDialog::spacingHint()); + TQVBoxLayout * layout5 = + new TQVBoxLayout(page5_, KDialog::marginHint(), KDialog::spacingHint()); layout1->addWidget(l_rootDirectoryHelp); layout2->addWidget(l_listenPortHelp); @@ -192,35 +192,35 @@ namespace KPF // layout4->addWidget(l_connectionLimitHelp); layout5->addWidget(l_serverNameHelp); - QHBoxLayout * layout10 = new QHBoxLayout(layout1); + TQHBoxLayout * layout10 = new TQHBoxLayout(layout1); layout10->addWidget(l_root_); layout10->addWidget(kur_root_); layout1->addStretch(1); - QHBoxLayout * layout20 = new QHBoxLayout(layout2); + TQHBoxLayout * layout20 = new TQHBoxLayout(layout2); layout20->addWidget(l_listenPort_); layout20->addWidget(sb_listenPort_); layout2->addStretch(1); - QHBoxLayout * layout30 = new QHBoxLayout(layout3); + TQHBoxLayout * layout30 = new TQHBoxLayout(layout3); layout30->addWidget(l_bandwidthLimit_); layout30->addWidget(sb_bandwidthLimit_); layout3->addStretch(1); -// QHBoxLayout * layout40 = new QHBoxLayout(layout4); +// TQHBoxLayout * layout40 = new TQHBoxLayout(layout4); // layout40->addWidget(l_connectionLimit_); // layout40->addWidget(sb_connectionLimit_); // layout4->addStretch(1); - QHBoxLayout * layout50 = new QHBoxLayout(layout5); + TQHBoxLayout * layout50 = new TQHBoxLayout(layout5); layout50->addWidget(l_serverName_); layout50->addWidget(le_serverName_); @@ -231,7 +231,7 @@ namespace KPF // addPage(page4_, i18n("Connection Limit")); addPage(page5_, i18n("Server Name")); - kur_root_->setURL(QDir::homeDirPath() + "/public_html"); + kur_root_->setURL(TQDir::homeDirPath() + "/public_html"); kur_root_->setMode (KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly); @@ -244,8 +244,8 @@ namespace KPF connect ( kur_root_, - SIGNAL(textChanged(const QString &)), - SLOT(slotServerRootChanged(const QString &)) + TQT_SIGNAL(textChanged(const TQString &)), + TQT_SLOT(slotServerRootChanged(const TQString &)) ); // Used for setting the caption on the file dialog. @@ -253,8 +253,8 @@ namespace KPF connect ( kur_root_, - SIGNAL(openFileDialog(KURLRequester *)), - SLOT(slotOpenFileDialog(KURLRequester *)) + TQT_SIGNAL(openFileDialog(KURLRequester *)), + TQT_SLOT(slotOpenFileDialog(KURLRequester *)) ); // This slot sets the 'Next' button on page 2 to enabled/disabled @@ -263,8 +263,8 @@ namespace KPF connect ( sb_listenPort_, - SIGNAL(valueChanged(int)), - SLOT(slotListenPortChanged(int)) + TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotListenPortChanged(int)) ); // Update 'Next' button on page 1. @@ -281,7 +281,7 @@ namespace KPF } void - ServerWizard::setLocation(const QString & location) + ServerWizard::setLocation(const TQString & location) { kur_root_->setURL(location); } @@ -319,14 +319,14 @@ namespace KPF void ServerWizard::accept() { - QWizard::accept(); + TQWizard::accept(); emit(dying(this)); } void ServerWizard::reject() { - QWizard::reject(); + TQWizard::reject(); emit(dying(this)); } @@ -339,10 +339,10 @@ namespace KPF return; } - QPtrList + TQPtrList serverList(WebServerManager::instance()->serverListLocal()); - for (QPtrListIterator it(serverList); it.current(); ++it) + for (TQPtrListIterator it(serverList); it.current(); ++it) { if (it.current()->listenPort() == uint(newPort)) { @@ -355,9 +355,9 @@ namespace KPF } void - ServerWizard::slotServerRootChanged(const QString & _root) + ServerWizard::slotServerRootChanged(const TQString & _root) { - QString root(_root); + TQString root(_root); kpfDebug << root << endl; @@ -373,9 +373,9 @@ namespace KPF if ("/" != root.right(1)) root += "/"; - QFileInfo fi(root); + TQFileInfo fi(root); - if (!fi.isDir()) // || (fi.dirPath() == QDir::homeDirPath())) + if (!fi.isDir()) // || (fi.dirPath() == TQDir::homeDirPath())) { kpfDebug << root << " isn't a dir" << endl; //, or it's $HOME" << endl; setNextEnabled(page1_, false); diff --git a/kpf/src/ServerWizard.h b/kpf/src/ServerWizard.h index a484b8eb..670d94d0 100644 --- a/kpf/src/ServerWizard.h +++ b/kpf/src/ServerWizard.h @@ -41,17 +41,17 @@ namespace KPF public: - ServerWizard(QWidget * parent = 0); + ServerWizard(TQWidget * parent = 0); virtual ~ServerWizard(); - void setLocation(const QString &); + void setLocation(const TQString &); - QString root() const; + TQString root() const; uint listenPort() const; uint bandwidthLimit() const; uint connectionLimit() const; - QString serverName() const; + TQString serverName() const; signals: @@ -61,7 +61,7 @@ namespace KPF virtual void accept(); virtual void reject(); - void slotServerRootChanged(const QString &); + void slotServerRootChanged(const TQString &); void slotListenPortChanged(int); void slotOpenFileDialog(KURLRequester *); @@ -73,16 +73,16 @@ namespace KPF KURLRequester * kur_root_; - QSpinBox * sb_listenPort_; - QSpinBox * sb_bandwidthLimit_; - QSpinBox * sb_connectionLimit_; - QLineEdit * le_serverName_; - - QWidget * page1_; - QWidget * page2_; - QWidget * page3_; - QWidget * page4_; - QWidget * page5_; + TQSpinBox * sb_listenPort_; + TQSpinBox * sb_bandwidthLimit_; + TQSpinBox * sb_connectionLimit_; + TQLineEdit * le_serverName_; + + TQWidget * page1_; + TQWidget * page2_; + TQWidget * page3_; + TQWidget * page4_; + TQWidget * page5_; }; } diff --git a/kpf/src/SingleServerConfigDialog.cpp b/kpf/src/SingleServerConfigDialog.cpp index 6fa1792b..c39f944b 100644 --- a/kpf/src/SingleServerConfigDialog.cpp +++ b/kpf/src/SingleServerConfigDialog.cpp @@ -33,7 +33,7 @@ namespace KPF SingleServerConfigDialog::SingleServerConfigDialog ( WebServer * server, - QWidget * parent + TQWidget * parent ) : KDialogBase ( @@ -52,13 +52,13 @@ namespace KPF connect ( widget_, - SIGNAL(ok(bool)), - SLOT(slotOk(bool)) + TQT_SIGNAL(ok(bool)), + TQT_SLOT(slotOk(bool)) ); setMainWidget(widget_); - connect(this, SIGNAL(finished()), SLOT(slotFinished())); + connect(this, TQT_SIGNAL(finished()), TQT_SLOT(slotFinished())); widget_->checkOk(); } diff --git a/kpf/src/SingleServerConfigDialog.h b/kpf/src/SingleServerConfigDialog.h index a6f1c17f..e9bb415c 100644 --- a/kpf/src/SingleServerConfigDialog.h +++ b/kpf/src/SingleServerConfigDialog.h @@ -40,7 +40,7 @@ namespace KPF public: - SingleServerConfigDialog(WebServer *, QWidget * parent); + SingleServerConfigDialog(WebServer *, TQWidget * parent); virtual ~SingleServerConfigDialog(); diff --git a/kpf/src/StartingKPFDialog.cpp b/kpf/src/StartingKPFDialog.cpp index 19b073bd..15a50d47 100644 --- a/kpf/src/StartingKPFDialog.cpp +++ b/kpf/src/StartingKPFDialog.cpp @@ -21,10 +21,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -44,10 +44,10 @@ namespace KPF // Empty. } - QTimer timer; + TQTimer timer; }; - StartingKPFDialog::StartingKPFDialog(QWidget * parent) + StartingKPFDialog::StartingKPFDialog(TQWidget * parent) : KDialogBase ( @@ -62,16 +62,16 @@ namespace KPF { d = new Private; - QFrame * mainWidget = makeMainWidget(); + TQFrame * mainWidget = makeMainWidget(); - QLabel * about = + TQLabel * about = new QLabel ( i18n("Starting kpf..."), mainWidget ); - QVBoxLayout * layout = new QVBoxLayout(mainWidget); + TQVBoxLayout * layout = new TQVBoxLayout(mainWidget); layout->addWidget(about); @@ -80,14 +80,14 @@ namespace KPF connect ( kapp->dcopClient(), - SIGNAL(applicationRegistered(const QCString &)), - SLOT(slotApplicationRegistered(const QCString &)) + TQT_SIGNAL(applicationRegistered(const TQCString &)), + TQT_SLOT(slotApplicationRegistered(const TQCString &)) ); kapp->dcopClient() - ->send("kicker", "default", "addApplet(QString)", "kpfapplet.desktop"); + ->send("kicker", "default", "addApplet(TQString)", "kpfapplet.desktop"); - connect(&d->timer, SIGNAL(timeout()), SLOT(slotTimeout())); + connect(&d->timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout())); enableButtonOK(false); enableButtonCancel(true); @@ -124,7 +124,7 @@ namespace KPF } void - StartingKPFDialog::slotApplicationRegistered(const QCString & id) + StartingKPFDialog::slotApplicationRegistered(const TQCString & id) { if ("kpf" == id) { diff --git a/kpf/src/StartingKPFDialog.h b/kpf/src/StartingKPFDialog.h index cbeca549..9dc7b651 100644 --- a/kpf/src/StartingKPFDialog.h +++ b/kpf/src/StartingKPFDialog.h @@ -38,14 +38,14 @@ namespace KPF public: - StartingKPFDialog(QWidget * parent); + StartingKPFDialog(TQWidget * parent); virtual ~StartingKPFDialog(); protected slots: void slotTimeout(); - void slotApplicationRegistered(const QCString &); + void slotApplicationRegistered(const TQCString &); protected: diff --git a/kpf/src/Utils.cpp b/kpf/src/Utils.cpp index a867a998..08f3318a 100644 --- a/kpf/src/Utils.cpp +++ b/kpf/src/Utils.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include @@ -36,11 +36,11 @@ namespace KPF { static bool dateInitDone = false; - static QStringList monthList; + static TQStringList monthList; static const char rfc1123Format[] = "%a, %d %b %Y %H:%M:%S GMT"; - static time_t qDateTimeToTimeT(const QDateTime & t) + static time_t qDateTimeToTimeT(const TQDateTime & t) { struct tm tempTm; @@ -52,7 +52,7 @@ namespace KPF tempTm.tm_sec = t.time().second(); tempTm.tm_isdst = -1; - // Fix up differences between QDateTime and tm. + // Fix up differences between TQDateTime and tm. tempTm.tm_year -= 1900; @@ -62,18 +62,18 @@ namespace KPF } QDateTime - toGMT(const QDateTime & dt) + toGMT(const TQDateTime & dt) { time_t dtAsTimeT = qDateTimeToTimeT(dt); struct tm * dtAsGmTm = ::gmtime(&dtAsTimeT); if (0 == dtAsGmTm) - return QDateTime(); + return TQDateTime(); time_t dtAsGmTimeT = ::mktime(dtAsGmTm); - QDateTime ret; + TQDateTime ret; ret.setTime_t(dtAsGmTimeT); @@ -103,13 +103,13 @@ namespace KPF ; } - QString dateString() + TQString dateString() { - return dateString(QDateTime::currentDateTime()); + return dateString(TQDateTime::currentDateTime()); } - QString dateString(const QDateTime & t) + TQString dateString(const TQDateTime & t) { time_t asTimeT = qDateTimeToTimeT(t); @@ -118,7 +118,7 @@ namespace KPF if (0 == asTm) { kpfDebug << "::gmtime() failed" << endl; - return QString::null; + return TQString::null; } asTm->tm_isdst = -1; @@ -129,25 +129,25 @@ namespace KPF // Ensure we use locale "C" for strftime. - QCString oldLC_ALL = ::strdup(::setlocale(LC_TIME, "C")); - QCString oldLC_TIME = ::strdup(::setlocale(LC_ALL, "C")); + TQCString oldLC_ALL = ::strdup(::setlocale(LC_TIME, "C")); + TQCString oldLC_TIME = ::strdup(::setlocale(LC_ALL, "C")); { ::strftime(static_cast(buf), len, rfc1123Format, asTm); } ::setlocale(LC_TIME, oldLC_TIME.data()); ::setlocale(LC_ALL, oldLC_ALL.data()); - return QString::fromUtf8(buf); + return TQString::fromUtf8(buf); } bool - parseDate(const QString & s, QDateTime & dt) + parseDate(const TQString & s, TQDateTime & dt) { dateInit(); // kpfDebug << "Parsing date `" << s << "'" << endl; - QStringList l(QStringList::split(' ', s)); + TQStringList l(TQStringList::split(' ', s)); switch (l.count()) { @@ -173,7 +173,7 @@ namespace KPF } bool - parseDateRFC1123(const QStringList & l, QDateTime & dt) + parseDateRFC1123(const TQStringList & l, TQDateTime & dt) { if ("GMT" != l[5]) return false; @@ -183,7 +183,7 @@ namespace KPF bool haveMonth = false; uint month = 0; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it = monthList.begin(); it != monthList.end(); ++it) { @@ -201,7 +201,7 @@ namespace KPF uint year(l[3].toUInt()); - QStringList timeTokenList(QStringList::split(':', l[4])); + TQStringList timeTokenList(TQStringList::split(':', l[4])); if (3 != timeTokenList.count()) return false; @@ -210,19 +210,19 @@ namespace KPF uint minutes (timeTokenList[1].toUInt()); uint seconds (timeTokenList[2].toUInt()); - dt.setDate(QDate(year, month + 1, day)); - dt.setTime(QTime(hours, minutes, seconds)); + dt.setDate(TQDate(year, month + 1, day)); + dt.setTime(TQTime(hours, minutes, seconds)); return dt.isValid(); } bool - parseDateRFC850(const QStringList & l, QDateTime & dt) + parseDateRFC850(const TQStringList & l, TQDateTime & dt) { if ("GMT" != l[3]) return false; - QStringList dateTokenList(QStringList::split('-', l[1])); + TQStringList dateTokenList(TQStringList::split('-', l[1])); if (3 != dateTokenList.count()) return false; @@ -232,7 +232,7 @@ namespace KPF bool haveMonth = false; uint month = 0; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it = monthList.begin(); it != monthList.end(); ++it) { @@ -255,7 +255,7 @@ namespace KPF else if (year < 100) year += 1900; - QStringList timeTokenList(QStringList::split(':', l[2])); + TQStringList timeTokenList(TQStringList::split(':', l[2])); if (3 != timeTokenList.count()) return false; @@ -264,19 +264,19 @@ namespace KPF uint minutes (timeTokenList[1].toUInt()); uint seconds (timeTokenList[2].toUInt()); - dt.setDate(QDate(year, month + 1, day)); - dt.setTime(QTime(hours, minutes, seconds)); + dt.setDate(TQDate(year, month + 1, day)); + dt.setTime(TQTime(hours, minutes, seconds)); return dt.isValid(); } bool - parseDateAscTime(const QStringList & l, QDateTime & dt) + parseDateAscTime(const TQStringList & l, TQDateTime & dt) { bool haveMonth = false; uint month = 0; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it = monthList.begin(); it != monthList.end(); ++it) { @@ -294,7 +294,7 @@ namespace KPF uint day(l[2].toUInt()); - QStringList timeTokenList(QStringList::split(':', l[3])); + TQStringList timeTokenList(TQStringList::split(':', l[3])); if (3 != timeTokenList.count()) return false; @@ -305,8 +305,8 @@ namespace KPF uint year(l[4].toUInt()); - dt.setDate(QDate(year, month + 1, day)); - dt.setTime(QTime(hours, minutes, seconds)); + dt.setDate(TQDate(year, month + 1, day)); + dt.setTime(TQTime(hours, minutes, seconds)); return dt.isValid(); } @@ -314,7 +314,7 @@ namespace KPF QString translatedResponseName(uint code) { - QString s; + TQString s; switch (code) { @@ -362,7 +362,7 @@ namespace KPF QString responseName(uint code) { - QString s; + TQString s; switch (code) { diff --git a/kpf/src/Utils.h b/kpf/src/Utils.h index 6a81dfa8..12e55507 100644 --- a/kpf/src/Utils.h +++ b/kpf/src/Utils.h @@ -24,10 +24,10 @@ #ifndef KPF_UTILS_H #define KPF_UTILS_H -#include -#include -#include -#include +#include +#include +#include +#include /** * Used to keep all parts of the kpf application out of the global namespace. @@ -49,63 +49,63 @@ namespace KPF /** * @return the current date and time as an HTTP/1.1 compliant date string. */ - QString dateString(); + TQString dateString(); /** - * @return the passed QDateTime as an HTTP/1.1 compliant date string. + * @return the passed TQDateTime as an HTTP/1.1 compliant date string. */ - QString dateString(const QDateTime & dt); + TQString dateString(const TQDateTime & dt); /** - * Parse an HTTP/1.1 date to a QDateTime. - * @param ret the QDateTime representation (result of parsing) + * Parse an HTTP/1.1 date to a TQDateTime. + * @param ret the TQDateTime representation (result of parsing) * @return true if the date is an an acceptable format. */ - bool parseDate(const QString &, QDateTime & ret); + bool parseDate(const TQString &, TQDateTime & ret); /** - * Parse an RFC 1123 format date to a QDateTime. Usually called by + * Parse an RFC 1123 format date to a TQDateTime. Usually called by * @ref parseDate. */ - bool parseDateRFC1123(const QStringList &, QDateTime &); + bool parseDateRFC1123(const TQStringList &, TQDateTime &); /** - * Parse an RFC 850 format date to a QDateTime. Usually called by + * Parse an RFC 850 format date to a TQDateTime. Usually called by * @ref parseDate. */ - bool parseDateRFC850(const QStringList &, QDateTime &); + bool parseDateRFC850(const TQStringList &, TQDateTime &); /** - * Parse an asctime(3) format date to a QDateTime. Usually called by + * Parse an asctime(3) format date to a TQDateTime. Usually called by * @ref parseDate. */ - bool parseDateAscTime(const QStringList &, QDateTime &); + bool parseDateAscTime(const TQStringList &, TQDateTime &); /** * @return i18n(HTTP response message for code) */ - QString translatedResponseName(uint code); + TQString translatedResponseName(uint code); /** * @return HTTP response message for code */ - QString responseName(uint code); + TQString responseName(uint code); /** - * @return the passed QDateTime converted GMT, honouring daylight + * @return the passed TQDateTime converted GMT, honouring daylight * saving time if necessary. */ - QDateTime toGMT(const QDateTime &); + TQDateTime toGMT(const TQDateTime &); /** * Unquote hex quoted chars in string. */ - QString unquote(const QString &); + TQString unquote(const TQString &); /** * Quote naughty chars in %xx format. */ - QString quote(const QString &); + TQString quote(const TQString &); } // End namespace KPF diff --git a/kpf/src/WebServer.cpp b/kpf/src/WebServer.cpp index 37301f09..b7fd944b 100644 --- a/kpf/src/WebServer.cpp +++ b/kpf/src/WebServer.cpp @@ -27,9 +27,9 @@ #include // Qt includes -#include -#include -#include +#include +#include +#include // KDE includes #include "config.h" @@ -81,13 +81,13 @@ namespace KPF WebServerSocket * socket; uint listenPort; uint connectionLimit; - QPtrList serverList; - QString root; - QString serverName; - QTimer writeTimer; - QTimer resetOutputTimer; - QTimer bindTimer; - QTimer backlogTimer; + TQPtrList serverList; + TQString root; + TQString serverName; + TQTimer writeTimer; + TQTimer resetOutputTimer; + TQTimer bindTimer; + TQTimer backlogTimer; ulong bandwidthLimit; ulong lastTotalOutput; ulong totalOutput; @@ -95,14 +95,14 @@ namespace KPF bool paused; bool followSymlinks; bool customErrorMessages; - QValueList backlog; + TQValueList backlog; DNSSD::PublicService* service; }; - WebServer::WebServer(const QString & root) - : DCOPObject(QCString("WebServer_") + root.utf8()), - QObject() + WebServer::WebServer(const TQString & root) + : DCOPObject(TQCString("WebServer_") + root.utf8()), + TQObject() { d = new Private; @@ -110,10 +110,10 @@ namespace KPF loadConfig(); publish(); - connect(&d->bindTimer, SIGNAL(timeout()), SLOT(slotBind())); - connect(&d->writeTimer, SIGNAL(timeout()), SLOT(slotWrite())); - connect(&d->resetOutputTimer, SIGNAL(timeout()), SLOT(slotCheckOutput())); - connect(&d->backlogTimer, SIGNAL(timeout()), SLOT(slotClearBacklog())); + connect(&d->bindTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotBind())); + connect(&d->writeTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotWrite())); + connect(&d->resetOutputTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotCheckOutput())); + connect(&d->backlogTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotClearBacklog())); d->bindTimer .start( 0, true); d->resetOutputTimer .start(1000 / SamplesPerSecond, false); @@ -122,15 +122,15 @@ namespace KPF WebServer::WebServer ( - const QString & root, + const TQString & root, uint listenPort, uint bandwidthLimit, uint connectionLimit, bool followSymlinks, - const QString & serverName + const TQString & serverName ) - : DCOPObject(QCString("WebServer_") + root.utf8()), - QObject() + : DCOPObject(TQCString("WebServer_") + root.utf8()), + TQObject() { d = new Private; @@ -144,10 +144,10 @@ namespace KPF saveConfig(); publish(); - connect(&d->bindTimer, SIGNAL(timeout()), SLOT(slotBind())); - connect(&d->writeTimer, SIGNAL(timeout()), SLOT(slotWrite())); - connect(&d->resetOutputTimer, SIGNAL(timeout()), SLOT(slotCheckOutput())); - connect(&d->backlogTimer, SIGNAL(timeout()), SLOT(slotClearBacklog())); + connect(&d->bindTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotBind())); + connect(&d->writeTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotWrite())); + connect(&d->resetOutputTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotCheckOutput())); + connect(&d->backlogTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotClearBacklog())); d->bindTimer .start( 0, true); d->resetOutputTimer .start(1000 / SamplesPerSecond, false); @@ -164,7 +164,7 @@ namespace KPF void WebServer::publish() { d->service = new DNSSD::PublicService(d->serverName,"_http._tcp",d->listenPort); - connect(d->service,SIGNAL(published(bool)),this,SLOT(wasPublished(bool))); + connect(d->service,TQT_SIGNAL(published(bool)),this,TQT_SLOT(wasPublished(bool))); d->service->publishAsync(); } @@ -195,7 +195,7 @@ namespace KPF emit(contentionChange(d->portContention)); if (!d->portContention) - connect(d->socket, SIGNAL(connection(int)), SLOT(slotConnection(int))); + connect(d->socket, TQT_SIGNAL(connection(int)), TQT_SLOT(slotConnection(int))); else { @@ -277,18 +277,18 @@ namespace KPF connect ( s, - SIGNAL(output(Server *, ulong)), - SLOT(slotOutput(Server *, ulong)) + TQT_SIGNAL(output(Server *, ulong)), + TQT_SLOT(slotOutput(Server *, ulong)) ); - connect(s, SIGNAL(finished(Server *)), SLOT(slotFinished(Server *))); - connect(s, SIGNAL(request(Server *)), SIGNAL(request(Server *))); - connect(s, SIGNAL(response(Server *)), SIGNAL(response(Server *))); + connect(s, TQT_SIGNAL(finished(Server *)), TQT_SLOT(slotFinished(Server *))); + connect(s, TQT_SIGNAL(request(Server *)), TQT_SIGNAL(request(Server *))); + connect(s, TQT_SIGNAL(response(Server *)), TQT_SIGNAL(response(Server *))); d->serverList.append(s); connect - (s, SIGNAL(readyToWrite(Server *)), SLOT(slotReadyToWrite(Server *))); + (s, TQT_SIGNAL(readyToWrite(Server *)), TQT_SLOT(slotReadyToWrite(Server *))); emit(connection(s)); @@ -311,7 +311,7 @@ namespace KPF void WebServer::killAllConnections() { - QPtrListIterator it(d->serverList); + TQPtrListIterator it(d->serverList); for (; it.current(); ++it) it.current()->cancel(); @@ -449,7 +449,7 @@ namespace KPF if (d->serverList.isEmpty()) return; - QPtrListIterator it(d->serverList); + TQPtrListIterator it(d->serverList); for (; it.current(); ++it) { @@ -551,7 +551,7 @@ namespace KPF return d->serverName; } void - WebServer::setServerName(const QString& serverName) + WebServer::setServerName(const TQString& serverName) { d->serverName=serverName; } @@ -569,7 +569,7 @@ namespace KPF ulong bandwidthLimit, uint connectionLimit, bool followSymlinks, - const QString& serverName + const TQString& serverName ) { d->listenPort = listenPort; diff --git a/kpf/src/WebServer.h b/kpf/src/WebServer.h index ae9d9383..4940e863 100644 --- a/kpf/src/WebServer.h +++ b/kpf/src/WebServer.h @@ -25,7 +25,7 @@ #define KPF_WEB_SERVER_H #include -#include +#include #include "Defaults.h" #include "Request.h" @@ -42,7 +42,7 @@ namespace KPF * Maintains concurrent connection limit, using a backlog to queue incoming * connections which cannot be served immediately. */ - class WebServer : public QObject, virtual public DCOPObject + class WebServer : public TQObject, virtual public DCOPObject { K_DCOP Q_OBJECT @@ -56,7 +56,7 @@ namespace KPF * Server objects, which much ensure that only files from the root and * its child directories are served. */ - WebServer(const QString & root); + WebServer(const TQString & root); /** * @param root Virtual root directory for servers. Passed to all created @@ -65,12 +65,12 @@ namespace KPF */ WebServer ( - const QString & root, + const TQString & root, uint listenPort, uint bandwidthLimit, uint connectionLimit, bool followSymlinks, - const QString & serverName + const TQString & serverName ); virtual ~WebServer(); @@ -87,12 +87,12 @@ namespace KPF /** * @return virtual root. */ - QString root(); + TQString root(); /** * @return server name */ - QString serverName(); + TQString serverName(); /** * @return amount of bytes that may be sent out per second, in total @@ -143,7 +143,7 @@ namespace KPF /** * Set server name */ - void setServerName (const QString&); + void setServerName (const TQString&); /** * Set whether requests may include symbolic links in their path. @@ -165,7 +165,7 @@ namespace KPF ulong bandwidthLimit, uint connectionLimit, bool followSymlinks, - const QString& serverName + const TQString& serverName ); /** diff --git a/kpf/src/WebServerManager.cpp b/kpf/src/WebServerManager.cpp index feec661d..08075fe8 100644 --- a/kpf/src/WebServerManager.cpp +++ b/kpf/src/WebServerManager.cpp @@ -54,7 +54,7 @@ namespace KPF WebServerManager::WebServerManager() : DCOPObject("WebServerManager"), - QObject() + TQObject() { serverList_.setAutoDelete(true); } @@ -64,7 +64,7 @@ namespace KPF // Empty. } - QPtrList + TQPtrList WebServerManager::serverListLocal() { return serverList_; @@ -73,12 +73,12 @@ namespace KPF WebServer * WebServerManager::createServerLocal ( - const QString & root, + const TQString & root, uint listenPort, uint bandwidthLimit, uint connectionLimit, bool followSymlinks, - const QString & serverName + const TQString & serverName ) { if (0 != server(root)) @@ -112,9 +112,9 @@ namespace KPF config.setGroup("General"); - QStringList serverRootList = config.readListEntry("ServerRootList"); + TQStringList serverRootList = config.readListEntry("ServerRootList"); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it = serverRootList.begin(); it != serverRootList.end(); ++it) { @@ -132,9 +132,9 @@ namespace KPF config.setGroup("General"); - QPtrListIterator it(serverList_); + TQPtrListIterator it(serverList_); - QStringList serverRootList; + TQStringList serverRootList; for (; it.current(); ++it) serverRootList << it.current()->root(); @@ -145,9 +145,9 @@ namespace KPF } WebServer * - WebServerManager::server(const QString & root) + WebServerManager::server(const TQString & root) { - QPtrListIterator it(serverList_); + TQPtrListIterator it(serverList_); for (; it.current(); ++it) { @@ -168,7 +168,7 @@ namespace KPF } bool - WebServerManager::disableServer(const QString & root) + WebServerManager::disableServer(const TQString & root) { WebServer * existing = server(root); @@ -186,12 +186,12 @@ namespace KPF } } - QValueList + TQValueList WebServerManager::serverList() { - QValueList l; + TQValueList l; - QPtrListIterator it(serverList_); + TQPtrListIterator it(serverList_); for (; it.current(); ++it) l << DCOPRef(it.current()); @@ -202,12 +202,12 @@ namespace KPF DCOPRef WebServerManager::createServer ( - QString root, + TQString root, uint listenPort, uint bandwidthLimit, uint connectionLimit, bool followSymlinks, - QString serverName + TQString serverName ) { WebServer * server = createServerLocal @@ -228,7 +228,7 @@ namespace KPF WebServer_stub webServer (serverRef.app(), serverRef.object()); - QString root = webServer.root(); + TQString root = webServer.root(); if (DCOPStub::CallFailed == webServer.status()) { @@ -252,9 +252,9 @@ namespace KPF } bool - WebServerManager::hasServer(const QString & s) + WebServerManager::hasServer(const TQString & s) { - QString root(s); + TQString root(s); if ('/' == root.at(root.length() - 1)) { @@ -270,7 +270,7 @@ namespace KPF { bool ok = true; - for (QPtrListIterator it(serverList_); it.current(); ++it) + for (TQPtrListIterator it(serverList_); it.current(); ++it) { if (it.current()->listenPort() == port) { diff --git a/kpf/src/WebServerManager.h b/kpf/src/WebServerManager.h index 6faa8a30..daa8db33 100644 --- a/kpf/src/WebServerManager.h +++ b/kpf/src/WebServerManager.h @@ -29,7 +29,7 @@ #include "Defaults.h" -#include +#include namespace KPF { @@ -40,7 +40,7 @@ namespace KPF * creating WebServer objects at startup (based on settings) and * on demand. Destroys WebServer objects on demand. */ - class WebServerManager : public QObject, virtual public DCOPObject + class WebServerManager : public TQObject, virtual public DCOPObject { Q_OBJECT K_DCOP @@ -58,7 +58,7 @@ namespace KPF * @return a list of pointers to WebServer objects managed * by this object. */ - QPtrList serverListLocal(); + TQPtrList serverListLocal(); /** * @return a pointer to a new WebServer object, with the root @@ -67,18 +67,18 @@ namespace KPF */ WebServer * createServerLocal ( - const QString & root, + const TQString & root, uint listenPort, uint bandwidthLimit = Config::DefaultBandwidthLimit, uint connectionLimit = Config::DefaultConnectionLimit, bool followSymlinks = Config::DefaultFollowSymlinks, - const QString & serverName = QString::null + const TQString & serverName = TQString::null ); /** * Disables a WebServer and updates the configuration. */ - bool disableServer(const QString & root); + bool disableServer(const TQString & root); /** * Loads the configuration. @@ -96,49 +96,49 @@ namespace KPF /** * Find a WebServer or return 0. */ - WebServer * server(const QString & root); + WebServer * server(const TQString & root); /** * Ask a server to re-read its configuration. */ - bool reconfigureServer(const QString & root); + bool reconfigureServer(const TQString & root); /** * Pause/unpause a server. */ - bool pauseServer(const QString & root, bool); + bool pauseServer(const TQString & root, bool); /** * @return whether the server is paused. */ - bool serverPaused(const QString & root); + bool serverPaused(const TQString & root); /** * Restart a server. */ - bool restartServer(const QString & root); + bool restartServer(const TQString & root); /** * @return if a Server object with the specified root exists. Handles * the two possible variations of trailing slash, i.e. existing and not * existing. */ - bool hasServer(const QString & root); + bool hasServer(const TQString & root); uint nextFreePort() const; k_dcop: - QValueList serverList(); + TQValueList serverList(); DCOPRef createServer ( - QString root, + TQString root, uint listenPort, uint bandwidthLimit, uint connectionLimit, bool followSymlinks, - QString serverName + TQString serverName ); void disableServer(DCOPRef); @@ -164,7 +164,7 @@ namespace KPF static WebServerManager * instance_; void load(); - QPtrList serverList_; + TQPtrList serverList_; }; } // End namespace KPF diff --git a/kpf/src/WebServerSocket.cpp b/kpf/src/WebServerSocket.cpp index 4dfa6626..fceaa6c1 100644 --- a/kpf/src/WebServerSocket.cpp +++ b/kpf/src/WebServerSocket.cpp @@ -27,7 +27,7 @@ namespace KPF { WebServerSocket::WebServerSocket(Q_UINT16 port, uint maxconn) - : QServerSocket(port, maxconn, 0L) + : TQServerSocket(port, maxconn, 0L) { // Empty. } diff --git a/kpf/src/WebServerSocket.h b/kpf/src/WebServerSocket.h index f45e0d70..bebd6a79 100644 --- a/kpf/src/WebServerSocket.h +++ b/kpf/src/WebServerSocket.h @@ -24,7 +24,7 @@ #ifndef WEB_SERVER_SOCKET_H #define WEB_SERVER_SOCKET_H -#include +#include namespace KPF { diff --git a/kppp/accounting.cpp b/kppp/accounting.cpp index e9dcdc4c..76c5f02e 100644 --- a/kppp/accounting.cpp +++ b/kppp/accounting.cpp @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include @@ -52,8 +52,8 @@ extern PPPData gpppdata; // Helper functions // ///////////////////////////////////////////////////////////////////////////// -static QString timet2qstring(time_t t) { - QString s; +static TQString timet2qstring(time_t t) { + TQString s; s.sprintf("%lu", t); return s; @@ -67,14 +67,14 @@ static QString timet2qstring(time_t t) { // accounting is accomplished withing it's derived classes // ///////////////////////////////////////////////////////////////////////////// -AccountingBase::AccountingBase(QObject *parent) : - QObject(parent), +AccountingBase::AccountingBase(TQObject *parent) : + TQObject(parent), _total(0), _session(0) { - QDate dt = QDate::currentDate(); - LogFileName = QString("%1-%2.log") - .arg(QDate::shortMonthName(dt.month())) + TQDate dt = TQDate::currentDate(); + LogFileName = TQString("%1-%2.log") + .arg(TQDate::shortMonthName(dt.month())) .arg(dt.year(), 4); LogFileName = KGlobal::dirs()->saveLocation("appdata", "Log") @@ -101,8 +101,8 @@ double AccountingBase::session() const { // set costs back to zero ( typically once per month) -void AccountingBase::resetCosts(const QString & accountname){ - QString prev_account = gpppdata.accname(); +void AccountingBase::resetCosts(const TQString & accountname){ + TQString prev_account = gpppdata.accname(); gpppdata.setAccount(accountname); gpppdata.setTotalCosts(""); @@ -111,8 +111,8 @@ void AccountingBase::resetCosts(const QString & accountname){ } -void AccountingBase::resetVolume(const QString & accountname){ - QString prev_account = gpppdata.accname(); +void AccountingBase::resetVolume(const TQString & accountname){ + TQString prev_account = gpppdata.accname(); gpppdata.setAccount(accountname); gpppdata.setTotalBytes(0); @@ -121,10 +121,10 @@ void AccountingBase::resetVolume(const QString & accountname){ } -void AccountingBase::logMessage(QString s, bool newline) { +void AccountingBase::logMessage(TQString s, bool newline) { int old_umask = umask(0077); - QFile f(LogFileName); + TQFile f(LogFileName); bool result = f.open(IO_ReadWrite); if(result) { @@ -140,7 +140,7 @@ void AccountingBase::logMessage(QString s, bool newline) { f.at(f.size()); } - QCString tmp = s.local8Bit(); + TQCString tmp = s.local8Bit(); f.writeBlock(tmp, tmp.length()); f.close(); } @@ -150,13 +150,13 @@ void AccountingBase::logMessage(QString s, bool newline) { } -QString AccountingBase::getCosts(const QString & accountname) { - QString prev_account = gpppdata.accname(); +TQString AccountingBase::getCosts(const TQString & accountname) { + TQString prev_account = gpppdata.accname(); gpppdata.setAccount(accountname); - QString val = gpppdata.totalCosts(); + TQString val = gpppdata.totalCosts(); // ### currency from rule file - // QString val = KGlobal::locale()->formatMoney(gpppdata.totalCosts().toDouble(), currency); + // TQString val = KGlobal::locale()->formatMoney(gpppdata.totalCosts().toDouble(), currency); gpppdata.setAccount(prev_account); @@ -167,7 +167,7 @@ QString AccountingBase::getCosts(const QString & accountname) { bool AccountingBase::saveCosts() { if(!_name.isNull() && _name.length() > 0) { - QString val; + TQString val; val.setNum(total()); gpppdata.setTotalCosts(val); @@ -180,9 +180,9 @@ bool AccountingBase::saveCosts() { bool AccountingBase::loadCosts() { - QString val = gpppdata.totalCosts(); + TQString val = gpppdata.totalCosts(); - if(val.isNull()) // QString will segfault if isnull and toDouble called + if(val.isNull()) // TQString will segfault if isnull and toDouble called _total = 0.0; else { bool ok; @@ -195,10 +195,10 @@ bool AccountingBase::loadCosts() { } -QString AccountingBase::getAccountingFile(const QString &accountname) { - QString f = "kppp/Rules/"; +TQString AccountingBase::getAccountingFile(const TQString &accountname) { + TQString f = "kppp/Rules/"; f += accountname; - QString d = locate("data", f); + TQString d = locate("data", f); if(d.isNull()) return ""; @@ -212,7 +212,7 @@ QString AccountingBase::getAccountingFile(const QString &accountname) { // Accounting class for ruleset files // ///////////////////////////////////////////////////////////////////////////// -Accounting::Accounting(QObject *parent, PPPStats *st) : +Accounting::Accounting(TQObject *parent, PPPStats *st) : AccountingBase(parent), acct_timer_id(0), update_timer_id(0), @@ -226,14 +226,14 @@ bool Accounting::running() const { } -void Accounting::timerEvent(QTimerEvent *t) { +void Accounting::timerEvent(TQTimerEvent *t) { if(t->timerId() == acct_timer_id) { double newCosts; double newLen; double connect_time = difftime(time(0), start_time); - rules.getActiveRule(QDateTime::currentDateTime(), connect_time, newCosts, newLen); + rules.getActiveRule(TQDateTime::currentDateTime(), connect_time, newCosts, newLen); if(newLen < 1) { // changed to < 1 slotStop(); return; // no default rule found @@ -279,13 +279,13 @@ void Accounting::slotStart() { _lastcosts = 0.0; _lastlen = 0.0; _session = rules.perConnectionCosts(); - rules.setStartTime(QDateTime::currentDateTime()); + rules.setStartTime(TQDateTime::currentDateTime()); acct_timer_id = startTimer(1); if(UPDATE_TIME > 0) update_timer_id = startTimer(UPDATE_TIME); start_time = time(0); - QString s; + TQString s; s = timet2qstring(start_time); s += ":"; s += gpppdata.accname(); @@ -305,7 +305,7 @@ void Accounting::slotStop() { acct_timer_id = 0; update_timer_id = 0; - QString s; + TQString s; s.sprintf(":%s:%0.4e:%0.4e:%u:%u\n", timet2qstring(time(0)).utf8().data(), session(), @@ -319,16 +319,16 @@ void Accounting::slotStop() { } -bool Accounting::loadRuleSet(const QString & name) { +bool Accounting::loadRuleSet(const TQString & name) { if (name.isEmpty()) { rules.load(""); // delete old rules return TRUE; } - QString d = AccountingBase::getAccountingFile(name); + TQString d = AccountingBase::getAccountingFile(name); - QFileInfo fg(d); + TQFileInfo fg(d); if(fg.exists()) { int ret = rules.load(d); _name = rules.name(); @@ -358,7 +358,7 @@ double Accounting::session() const { -ExecutableAccounting::ExecutableAccounting(PPPStats *st, QObject *parent) : +ExecutableAccounting::ExecutableAccounting(PPPStats *st, TQObject *parent) : AccountingBase(parent), proc(0), stats(st) @@ -371,19 +371,19 @@ bool ExecutableAccounting::running() const { } -bool ExecutableAccounting::loadRuleSet(const QString &) { - QString s = AccountingBase::getAccountingFile(gpppdata.accountingFile()); - return (access(QFile::encodeName(s), X_OK) == 0); +bool ExecutableAccounting::loadRuleSet(const TQString &) { + TQString s = AccountingBase::getAccountingFile(gpppdata.accountingFile()); + return (access(TQFile::encodeName(s), X_OK) == 0); } void ExecutableAccounting::gotData(KProcess */*proc*/, char *buffer, int /*buflen*/) { - QString field[8]; + TQString field[8]; int nFields = 0; int pos, last_pos = 0; // split string - QString b(buffer); + TQString b(buffer); pos = b.find(':'); while(pos != -1 && nFields < 8) { field[nFields++] = b.mid(last_pos, pos-last_pos); @@ -394,8 +394,8 @@ void ExecutableAccounting::gotData(KProcess */*proc*/, char *buffer, int /*bufle for(int i = 0; i < nFields;i++) fprintf(stderr, "FIELD[%d] = %s\n", i, field[i].local8Bit().data()); - QString __total, __session; - QString s(buffer); + TQString __total, __session; + TQString s(buffer); int del1, del2, del3; del1 = s.find(':'); @@ -433,14 +433,14 @@ void ExecutableAccounting::slotStart() { slotStop(); // just to make sure loadCosts(); - QString s = AccountingBase::getAccountingFile(gpppdata.accountingFile()); + TQString s = AccountingBase::getAccountingFile(gpppdata.accountingFile()); proc = new KProcess; - QString s_total; + TQString s_total; s_total.sprintf("%0.8f", total()); *proc << s << s_total; - connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)), - this, SLOT(gotData(KProcess *, char *, int))); + connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + this, TQT_SLOT(gotData(KProcess *, char *, int))); proc->start(); time_t start_time = time(0); @@ -460,7 +460,7 @@ void ExecutableAccounting::slotStop() { delete proc; proc = 0; - QString s; + TQString s; s.sprintf(":%s:%0.4e:%0.4e:%u:%u\n", timet2qstring(time(0)).local8Bit().data(), session(), diff --git a/kppp/accounting.h b/kppp/accounting.h index 303d5c22..4fe65591 100644 --- a/kppp/accounting.h +++ b/kppp/accounting.h @@ -26,7 +26,7 @@ #ifndef __ACCOUNTING__H__ #define __ACCOUNTING__H__ -#include +#include #include #include "ruleset.h" @@ -37,40 +37,40 @@ class PPPStats; // Accounting base class // ///////////////////////////////////////////////////////////////////////////// -class AccountingBase : public QObject { +class AccountingBase : public TQObject { Q_OBJECT public: - AccountingBase(QObject *parent); + AccountingBase(TQObject *parent); virtual ~AccountingBase(); virtual double total() const; virtual double session() const; virtual bool running() const { return false; }; - virtual bool loadRuleSet(const QString & name) = 0; + virtual bool loadRuleSet(const TQString & name) = 0; public slots: virtual void slotStart() {}; virtual void slotStop() {}; signals: - void changed(QString total, QString session); + void changed(TQString total, TQString session); protected: - void logMessage(QString, bool = FALSE); + void logMessage(TQString, bool = FALSE); bool saveCosts(); bool loadCosts(); - QString LogFileName; + TQString LogFileName; double _total, _session; - QString _name; + TQString _name; // static members public: - static void resetCosts(const QString & accountname); - static void resetVolume(const QString & accountname); - static QString getCosts(const QString & accountname); - static QString getAccountingFile(const QString &accountname); + static void resetCosts(const TQString & accountname); + static void resetVolume(const TQString & accountname); + static TQString getCosts(const TQString & accountname); + static TQString getAccountingFile(const TQString &accountname); }; @@ -82,23 +82,23 @@ public: class Accounting : public AccountingBase { Q_OBJECT public: - Accounting(QObject *parent, PPPStats *st); + Accounting(TQObject *parent, PPPStats *st); virtual double total() const; virtual double session() const; - virtual bool loadRuleSet(const QString & name); + virtual bool loadRuleSet(const TQString & name); virtual bool running() const; private: - virtual void timerEvent(QTimerEvent *t); + virtual void timerEvent(TQTimerEvent *t); public slots: virtual void slotStart(); virtual void slotStop(); signals: - void changed(QString total, QString session); + void changed(TQString total, TQString session); private: int acct_timer_id; @@ -119,9 +119,9 @@ private: class ExecutableAccounting : public AccountingBase { Q_OBJECT public: - ExecutableAccounting(PPPStats *st, QObject *parent = 0); + ExecutableAccounting(PPPStats *st, TQObject *parent = 0); - virtual bool loadRuleSet(const QString & ); + virtual bool loadRuleSet(const TQString & ); virtual bool running() const; public slots: @@ -132,12 +132,12 @@ private slots: void gotData(KProcess *proc, char *buffer, int buflen); signals: - void changed(QString total, QString session); + void changed(TQString total, TQString session); private: KProcess *proc; - QString currency; - QString provider; + TQString currency; + TQString provider; PPPStats *stats; }; diff --git a/kppp/accounts.cpp b/kppp/accounts.cpp index 25023ad4..d374e6c6 100644 --- a/kppp/accounts.cpp +++ b/kppp/accounts.cpp @@ -24,12 +24,12 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include @@ -51,29 +51,29 @@ void parseargs(char* buf, char** args); -AccountWidget::AccountWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) +AccountWidget::AccountWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { int min = 0; - QVBoxLayout *l1 = new QVBoxLayout(parent, 10, 10); + TQVBoxLayout *l1 = new TQVBoxLayout(parent, 10, 10); // add a hbox - QHBoxLayout *l11 = new QHBoxLayout; + TQHBoxLayout *l11 = new QHBoxLayout; l1->addLayout(l11); - accountlist_l = new QListBox(parent); + accountlist_l = new TQListBox(parent); accountlist_l->setMinimumSize(160, 128); - connect(accountlist_l, SIGNAL(highlighted(int)), - this, SLOT(slotListBoxSelect(int))); - connect(accountlist_l, SIGNAL(selected(int)), - this, SLOT(editaccount())); + connect(accountlist_l, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(slotListBoxSelect(int))); + connect(accountlist_l, TQT_SIGNAL(selected(int)), + this, TQT_SLOT(editaccount())); l11->addWidget(accountlist_l, 10); - QVBoxLayout *l111 = new QVBoxLayout; + TQVBoxLayout *l111 = new QVBoxLayout; l11->addLayout(l111, 1); - edit_b = new QPushButton(i18n("&Edit..."), parent); - connect(edit_b, SIGNAL(clicked()), SLOT(editaccount())); - QWhatsThis::add(edit_b, i18n("Allows you to modify the selected account")); + edit_b = new TQPushButton(i18n("&Edit..."), parent); + connect(edit_b, TQT_SIGNAL(clicked()), TQT_SLOT(editaccount())); + TQWhatsThis::add(edit_b, i18n("Allows you to modify the selected account")); min = edit_b->sizeHint().width(); min = QMAX(70,min); @@ -81,60 +81,60 @@ AccountWidget::AccountWidget( QWidget *parent, const char *name ) l111->addWidget(edit_b); - new_b = new QPushButton(i18n("&New..."), parent); - connect(new_b, SIGNAL(clicked()), SLOT(newaccount())); + new_b = new TQPushButton(i18n("&New..."), parent); + connect(new_b, TQT_SIGNAL(clicked()), TQT_SLOT(newaccount())); l111->addWidget(new_b); - QWhatsThis::add(new_b, i18n("Create a new dialup connection\n" + TQWhatsThis::add(new_b, i18n("Create a new dialup connection\n" "to the Internet")); - copy_b = new QPushButton(i18n("Co&py"), parent); - connect(copy_b, SIGNAL(clicked()), SLOT(copyaccount())); + copy_b = new TQPushButton(i18n("Co&py"), parent); + connect(copy_b, TQT_SIGNAL(clicked()), TQT_SLOT(copyaccount())); l111->addWidget(copy_b); - QWhatsThis::add(copy_b, + TQWhatsThis::add(copy_b, i18n("Makes a copy of the selected account. All\n" "settings of the selected account are copied\n" "to a new account that you can modify to fit your\n" "needs")); - delete_b = new QPushButton(i18n("De&lete"), parent); - connect(delete_b, SIGNAL(clicked()), SLOT(deleteaccount())); + delete_b = new TQPushButton(i18n("De&lete"), parent); + connect(delete_b, TQT_SIGNAL(clicked()), TQT_SLOT(deleteaccount())); l111->addWidget(delete_b); - QWhatsThis::add(delete_b, + TQWhatsThis::add(delete_b, i18n("

    Deletes the selected account\n\n" "Use with care!")); - QHBoxLayout *l12 = new QHBoxLayout; + TQHBoxLayout *l12 = new QHBoxLayout; l1->addStretch(1); l1->addLayout(l12); - QVBoxLayout *l121 = new QVBoxLayout; + TQVBoxLayout *l121 = new QVBoxLayout; l12->addLayout(l121); l121->addStretch(1); - costlabel = new QLabel(i18n("Phone costs:"), parent); + costlabel = new TQLabel(i18n("Phone costs:"), parent); costlabel->setEnabled(FALSE); l121->addWidget(costlabel); - costedit = new QLineEdit(parent); - costedit->setFocusPolicy(QWidget::NoFocus); + costedit = new TQLineEdit(parent); + costedit->setFocusPolicy(TQWidget::NoFocus); costedit->setFixedHeight(costedit->sizeHint().height()); costedit->setEnabled(FALSE); l121->addWidget(costedit); l121->addStretch(1); - QString tmp = i18n("

    This shows the accumulated phone costs\n" + TQString tmp = i18n("

    This shows the accumulated phone costs\n" "for the selected account.\n" "\n" "Important: If you have more than one \n" "account - beware, this is NOT the sum \n" "of the phone costs of all your accounts!"); - QWhatsThis::add(costlabel, tmp); - QWhatsThis::add(costedit, tmp); + TQWhatsThis::add(costlabel, tmp); + TQWhatsThis::add(costedit, tmp); - vollabel = new QLabel(i18n("Volume:"), parent); + vollabel = new TQLabel(i18n("Volume:"), parent); vollabel->setEnabled(FALSE); l121->addWidget(vollabel); - voledit = new QLineEdit(parent,"voledit"); - voledit->setFocusPolicy(QWidget::NoFocus); + voledit = new TQLineEdit(parent,"voledit"); + voledit->setFocusPolicy(TQWidget::NoFocus); voledit->setFixedHeight(voledit->sizeHint().height()); voledit->setEnabled(FALSE); l121->addWidget(voledit); @@ -145,23 +145,23 @@ AccountWidget::AccountWidget( QWidget *parent, const char *name ) "\n" "More on volume accounting"); - QWhatsThis::add(vollabel,tmp); - QWhatsThis::add(voledit, tmp); + TQWhatsThis::add(vollabel,tmp); + TQWhatsThis::add(voledit, tmp); - QVBoxLayout *l122 = new QVBoxLayout; + TQVBoxLayout *l122 = new QVBoxLayout; l12->addStretch(1); l12->addLayout(l122); l122->addStretch(1); - reset = new QPushButton(i18n("&Reset..."), parent); + reset = new TQPushButton(i18n("&Reset..."), parent); reset->setEnabled(FALSE); - connect(reset, SIGNAL(clicked()), - this, SLOT(resetClicked())); + connect(reset, TQT_SIGNAL(clicked()), + this, TQT_SLOT(resetClicked())); l122->addWidget(reset); - log = new QPushButton(i18n("&View Logs"), parent); - connect(log, SIGNAL(clicked()), - this, SLOT(viewLogClicked())); + log = new TQPushButton(i18n("&View Logs"), parent); + connect(log, TQT_SIGNAL(clicked()), + this, TQT_SLOT(viewLogClicked())); l122->addWidget(log); l122->addStretch(1); @@ -185,7 +185,7 @@ void AccountWidget::slotListBoxSelect(int idx) { edit_b->setEnabled((bool)(idx != -1)); copy_b->setEnabled((bool)(idx != -1)); if(idx!=-1) { - QString account = gpppdata.accname(); + TQString account = gpppdata.accname(); gpppdata.setAccountByIndex(accountlist_l->currentItem()); reset->setEnabled(TRUE); costlabel->setEnabled(TRUE); @@ -211,7 +211,7 @@ void AccountWidget::slotListBoxSelect(int idx) { void AccountWidget::viewLogClicked(){ - QApplication::flushX(); + TQApplication::flushX(); if(fork() == 0) { if (setgid(getgid()) < 0 && errno != EPERM) _exit(2); @@ -249,7 +249,7 @@ void AccountWidget::editaccount() { int result = doTab(); - if(result == QDialog::Accepted) { + if(result == TQDialog::Accepted) { accountlist_l->changeItem(gpppdata.accname(),accountlist_l->currentItem()); emit resetaccounts(); gpppdata.save(); @@ -291,7 +291,7 @@ void AccountWidget::newaccount() { return; } - if(result == QDialog::Accepted) { + if(result == TQDialog::Accepted) { accountlist_l->insertItem(gpppdata.accname()); accountlist_l->setSelected(accountlist_l->findItem(gpppdata.accname()), true); @@ -323,7 +323,7 @@ void AccountWidget::copyaccount() { void AccountWidget::deleteaccount() { - QString s = i18n("Are you sure you want to delete\nthe account \"%1\"?") + TQString s = i18n("Are you sure you want to delete\nthe account \"%1\"?") .arg(accountlist_l->text(accountlist_l->currentItem())); if(KMessageBox::warningYesNo(this, s, i18n("Confirm"), KGuiItem(i18n("Delete"), "editdelete"), KStdGuiItem::cancel()) != KMessageBox::Yes) @@ -341,7 +341,7 @@ void AccountWidget::deleteaccount() { int AccountWidget::doTab(){ - tabWindow = new KDialogBase( KDialogBase::Tabbed, QString::null, + tabWindow = new KDialogBase( KDialogBase::Tabbed, TQString::null, KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, 0, 0, true); KWin::setIcons(tabWindow->winId(), kapp->icon(), kapp->miniIcon()); @@ -351,7 +351,7 @@ int AccountWidget::doTab(){ tabWindow->setCaption(i18n("New Account")); isnewaccount = true; } else { - QString tit = i18n("Edit Account: "); + TQString tit = i18n("Edit Account: "); tit += gpppdata.accname(); tabWindow->setCaption(tit); isnewaccount = false; @@ -372,7 +372,7 @@ int AccountWidget::doTab(){ result = tabWindow->exec(); ok = true; - if(result == QDialog::Accepted) { + if(result == TQDialog::Accepted) { if (script_w->check()) { if(dial_w->save()) { ip_w->save(); @@ -400,10 +400,10 @@ int AccountWidget::doTab(){ } -QString AccountWidget::prettyPrintVolume(unsigned int n) { +TQString AccountWidget::prettyPrintVolume(unsigned int n) { int idx = 0; - const QString quant[] = {i18n("Byte"), i18n("KB"), - i18n("MB"), i18n("GB"), QString::null}; + const TQString quant[] = {i18n("Byte"), i18n("KB"), + i18n("MB"), i18n("GB"), TQString::null}; float n1 = n; while(n >= 1024 && !quant[idx].isNull()) { @@ -415,7 +415,7 @@ QString AccountWidget::prettyPrintVolume(unsigned int n) { while(i--) n1 = n1 / 1024.0; - QString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 ); + TQString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 ); s += " " + quant[idx]; return s; } @@ -426,25 +426,25 @@ QString AccountWidget::prettyPrintVolume(unsigned int n) { // Queries the user what to reset: costs, volume or both // ///////////////////////////////////////////////////////////////////////////// -QueryReset::QueryReset(QWidget *parent) : QDialog(parent, 0, true) { +QueryReset::QueryReset(TQWidget *parent) : TQDialog(parent, 0, true) { KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); setCaption(i18n("Reset Accounting")); - QVBoxLayout *tl = new QVBoxLayout(this, 10, 10); - QVGroupBox *f = new QVGroupBox(i18n("What to Reset"), this); + TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10); + TQVGroupBox *f = new TQVGroupBox(i18n("What to Reset"), this); - QVBoxLayout *l1 = new QVBoxLayout(parent, 10, 10); - costs = new QCheckBox(i18n("Reset the accumulated p&hone costs"), f); + TQVBoxLayout *l1 = new TQVBoxLayout(parent, 10, 10); + costs = new TQCheckBox(i18n("Reset the accumulated p&hone costs"), f); costs->setChecked(true); l1->addWidget(costs); - QWhatsThis::add(costs, i18n("Check this to set the phone costs\n" + TQWhatsThis::add(costs, i18n("Check this to set the phone costs\n" "to zero. Typically you will want to\n" "do this once a month.")); - volume = new QCheckBox(i18n("Reset &volume accounting"), f); + volume = new TQCheckBox(i18n("Reset &volume accounting"), f); volume->setChecked(true); l1->addWidget(volume); - QWhatsThis::add(volume, i18n("Check this to set the volume accounting\n" + TQWhatsThis::add(volume, i18n("Check this to set the volume accounting\n" "to zero. Typically you will want to do this\n" "once a month.")); @@ -457,14 +457,14 @@ QueryReset::QueryReset(QWidget *parent) : QDialog(parent, 0, true) { KButtonBox *bbox = new KButtonBox(this); bbox->addStretch(1); - QPushButton *ok = bbox->addButton(KStdGuiItem::ok()); + TQPushButton *ok = bbox->addButton(KStdGuiItem::ok()); ok->setDefault(true); - QPushButton *cancel = bbox->addButton(KStdGuiItem::cancel()); + TQPushButton *cancel = bbox->addButton(KStdGuiItem::cancel()); - connect(ok, SIGNAL(clicked()), - this, SLOT(accepted())); - connect(cancel, SIGNAL(clicked()), - this, SLOT(reject())); + connect(ok, TQT_SIGNAL(clicked()), + this, TQT_SLOT(accepted())); + connect(cancel, TQT_SIGNAL(clicked()), + this, TQT_SLOT(reject())); bbox->layout(); tl->addWidget(bbox); diff --git a/kppp/accounts.h b/kppp/accounts.h index bb04478b..155c1658 100644 --- a/kppp/accounts.h +++ b/kppp/accounts.h @@ -27,9 +27,9 @@ #ifndef _ACCOUNTS_H_ #define _ACCOUNTS_H_ -#include -#include -#include +#include +#include +#include #include "acctselect.h" class KDialogBase; @@ -42,10 +42,10 @@ class IPWidget; class DNSWidget; class GatewayWidget; -class AccountWidget : public QWidget { +class AccountWidget : public TQWidget { Q_OBJECT public: - AccountWidget( QWidget *parent=0, const char *name=0 ); + AccountWidget( TQWidget *parent=0, const char *name=0 ); ~AccountWidget() {} private slots: @@ -62,11 +62,11 @@ private: signals: void resetaccounts(); - void resetCosts(const QString &); - void resetVolume(const QString &); + void resetCosts(const TQString &); + void resetVolume(const TQString &); private: - QString prettyPrintVolume(unsigned int); + TQString prettyPrintVolume(unsigned int); KDialogBase *tabWindow; DialWidget *dial_w; @@ -76,25 +76,25 @@ private: GatewayWidget *gateway_w; ScriptWidget *script_w; - QPushButton *reset; - QPushButton *log; - QLabel *costlabel; - QLineEdit *costedit; - QLabel *vollabel; - QLineEdit *voledit; - - QListBox *accountlist_l; - QPushButton *edit_b; - QPushButton *copy_b; - QPushButton *new_b; - QPushButton *delete_b; + TQPushButton *reset; + TQPushButton *log; + TQLabel *costlabel; + TQLineEdit *costedit; + TQLabel *vollabel; + TQLineEdit *voledit; + + TQListBox *accountlist_l; + TQPushButton *edit_b; + TQPushButton *copy_b; + TQPushButton *new_b; + TQPushButton *delete_b; }; -class QueryReset : public QDialog { +class QueryReset : public TQDialog { Q_OBJECT public: - QueryReset(QWidget *parent); + QueryReset(TQWidget *parent); enum {COSTS=1, VOLUME=2}; @@ -102,7 +102,7 @@ private slots: void accepted(); private: - QCheckBox *costs, *volume; + TQCheckBox *costs, *volume; }; #endif diff --git a/kppp/acctselect.cpp b/kppp/acctselect.cpp index 7c22e030..56a28cb4 100644 --- a/kppp/acctselect.cpp +++ b/kppp/acctselect.cpp @@ -33,15 +33,15 @@ //--------------------------------------------------------------------------- -#include -#include +#include +#include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -52,38 +52,38 @@ #include "pppdata.h" -AccountingSelector::AccountingSelector(QWidget *parent, bool _isnewaccount, const char *name) - : QWidget(parent, name), +AccountingSelector::AccountingSelector(TQWidget *parent, bool _isnewaccount, const char *name) + : TQWidget(parent, name), isnewaccount(_isnewaccount) { - QVBoxLayout *l1 = new QVBoxLayout(parent, 0, KDialog::spacingHint()); + TQVBoxLayout *l1 = new TQVBoxLayout(parent, 0, KDialog::spacingHint()); - enable_accounting = new QCheckBox(i18n("&Enable accounting"), parent); + enable_accounting = new TQCheckBox(i18n("&Enable accounting"), parent); l1->addWidget(enable_accounting, 1); - connect(enable_accounting, SIGNAL(toggled(bool)), this, SLOT(enableItems(bool))); + connect(enable_accounting, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableItems(bool))); // insert the tree widget - tl = new QListView(parent, "treewidget"); + tl = new TQListView(parent, "treewidget"); - connect(tl, SIGNAL(selectionChanged(QListViewItem*)), this, - SLOT(slotSelectionChanged(QListViewItem*))); + connect(tl, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, + TQT_SLOT(slotSelectionChanged(TQListViewItem*))); tl->setMinimumSize(220, 200); l1->addWidget(tl, 1); KURLLabel *up = new KURLLabel(parent); up->setText(i18n("Check for rule updates")); up->setURL("http://developer.kde.org/~kppp/rules.html"); - connect(up, SIGNAL(leftClickedURL(const QString&)), SLOT(openURL(const QString&))); + connect(up, TQT_SIGNAL(leftClickedURL(const TQString&)), TQT_SLOT(openURL(const TQString&))); l1->addWidget(up, 1); // label to display the currently selected ruleset - QHBoxLayout *l11 = new QHBoxLayout; + TQHBoxLayout *l11 = new QHBoxLayout; l1->addSpacing(10); l1->addLayout(l11); - QLabel *lsel = new QLabel(i18n("Selected:"), parent); - selected = new QLabel(parent); - selected->setFrameStyle(QFrame::Sunken | QFrame::WinPanel); + TQLabel *lsel = new TQLabel(i18n("Selected:"), parent); + selected = new TQLabel(parent); + selected->setFrameStyle(TQFrame::Sunken | TQFrame::WinPanel); selected->setLineWidth(1); selected->setFixedHeight(selected->sizeHint().height() + 16); l11->addWidget(lsel, 0); @@ -92,10 +92,10 @@ AccountingSelector::AccountingSelector(QWidget *parent, bool _isnewaccount, cons // volume accounting l1->addStretch(1); - QHBoxLayout *l12 = new QHBoxLayout; + TQHBoxLayout *l12 = new QHBoxLayout; l1->addLayout(l12); - QLabel *usevol_l = new QLabel(i18n("Volume accounting:"), parent); - use_vol = new QComboBox(parent); + TQLabel *usevol_l = new TQLabel(i18n("Volume accounting:"), parent); + use_vol = new TQComboBox(parent); use_vol->insertItem(i18n("No Accounting"), 0); use_vol->insertItem(i18n("Bytes In"), 1); use_vol->insertItem(i18n("Bytes Out"), 2); @@ -109,7 +109,7 @@ AccountingSelector::AccountingSelector(QWidget *parent, bool _isnewaccount, cons // scale the pixmap if(pmfolder.width() > 0) { - QWMatrix wm; + TQWMatrix wm; wm.scale(16.0/pmfolder.width(), 16.0/pmfolder.width()); pmfolder = pmfolder.xForm(wm); } @@ -119,7 +119,7 @@ AccountingSelector::AccountingSelector(QWidget *parent, bool _isnewaccount, cons // scale the pixmap if(pmfile.width() > 0) { - QWMatrix wm; + TQWMatrix wm; wm.scale(16.0/pmfile.width(), 16.0/pmfile.width()); pmfile = pmfile.xForm(wm); } @@ -132,7 +132,7 @@ AccountingSelector::AccountingSelector(QWidget *parent, bool _isnewaccount, cons } -QString AccountingSelector::fileNameToName(QString s) { +TQString AccountingSelector::fileNameToName(TQString s) { s.replace('_', " "); return KURL::decode_string(s); @@ -140,16 +140,16 @@ QString AccountingSelector::fileNameToName(QString s) { } -QString AccountingSelector::nameToFileName(QString s) { +TQString AccountingSelector::nameToFileName(TQString s) { s.replace(' ', "_"); return s; } -QListViewItem *AccountingSelector::findByName(QString name) +TQListViewItem *AccountingSelector::findByName(TQString name) { - QListViewItem *ch = tl->firstChild(); + TQListViewItem *ch = tl->firstChild(); while(ch) { if(ch->text(0) == name) return ch; @@ -159,9 +159,9 @@ QListViewItem *AccountingSelector::findByName(QString name) } -void AccountingSelector::insertDir(QDir d, QListViewItem *root) { +void AccountingSelector::insertDir(TQDir d, TQListViewItem *root) { - QListViewItem* tli = 0; + TQListViewItem* tli = 0; // sanity check if(!d.exists() || !d.isReadable()) @@ -170,45 +170,45 @@ void AccountingSelector::insertDir(QDir d, QListViewItem *root) { // set up filter d.setNameFilter("*.rst"); - d.setFilter(QDir::Files); - d.setSorting(QDir::Name); + d.setFilter(TQDir::Files); + d.setSorting(TQDir::Name); // read the list of files const QFileInfoList *list = d.entryInfoList(); QFileInfoListIterator it( *list ); - QFileInfo *fi; + TQFileInfo *fi; // traverse the list and insert into the widget while((fi = it.current())) { ++it; - QString samename = fi->fileName(); + TQString samename = fi->fileName(); - QListViewItem *i = findByName(samename); + TQListViewItem *i = findByName(samename); // skip this file if already in tree if(i) continue; // check if this is the file we should mark - QString name = fileNameToName(fi->baseName(true)); + TQString name = fileNameToName(fi->baseName(true)); if(root) - tli = new QListViewItem(root, name); + tli = new TQListViewItem(root, name); else - tli = new QListViewItem(tl, name); + tli = new TQListViewItem(tl, name); tli->setPixmap(0, pmfile); // check if this is the item we are searching for // (only in "Edit"-mode, not in "New"-mode if(!isnewaccount && !edit_s.isEmpty() && - (edit_s == QString(fi->filePath()).right(edit_s.length()))) { + (edit_s == TQString(fi->filePath()).right(edit_s.length()))) { edit_item = tli; } } // set up a filter for the directories - d.setFilter(QDir::Dirs); + d.setFilter(TQDir::Dirs); d.setNameFilter("*"); const QFileInfoList *dlist = d.entryInfoList(); QFileInfoListIterator dit(*dlist); @@ -217,25 +217,25 @@ void AccountingSelector::insertDir(QDir d, QListViewItem *root) { // skip "." and ".." directories if(fi->fileName().left(1) != ".") { // convert to human-readable name - QString name = fileNameToName(fi->fileName()); + TQString name = fileNameToName(fi->fileName()); // if the tree already has an item with this name, // skip creation and use this one, otherwise // create a new entry - QListViewItem *i = findByName(name); + TQListViewItem *i = findByName(name); if(!i) { - QListViewItem* item; + TQListViewItem* item; if(root) - item = new QListViewItem(root, name); + item = new TQListViewItem(root, name); else - item = new QListViewItem(tl, name); + item = new TQListViewItem(tl, name); item->setPixmap(0, pmfolder); - insertDir(QDir(fi->filePath()), item); + insertDir(TQDir(fi->filePath()), item); } else - insertDir(QDir(fi->filePath()), i); + insertDir(TQDir(fi->filePath()), i); } ++dit; } @@ -256,10 +256,10 @@ void AccountingSelector::setupTreeWidget() { tl->setRootIsDecorated(true); // look in ~/.kde/share/apps/kppp/Rules and $KDEDIR/share/apps/kppp/Rules - QStringList dirs = KGlobal::dirs()->resourceDirs("appdata"); - for (QStringList::ConstIterator it = dirs.begin(); + TQStringList dirs = KGlobal::dirs()->resourceDirs("appdata"); + for (TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); it++) { - insertDir(QDir((*it) + "Rules"), 0); + insertDir(TQDir((*it) + "Rules"), 0); } // when mode is "Edit", then hightlight the @@ -281,8 +281,8 @@ void AccountingSelector::enableItems(bool enabled) { if(!enabled || (!tl->currentItem())) selected->setText(i18n("(none)")); else { - QListViewItem* i = tl->currentItem(); - QString s; + TQListViewItem* i = tl->currentItem(); + TQString s; while(i) { s = "/" + i->text(0) + s; i = i->parent(); @@ -295,7 +295,7 @@ void AccountingSelector::enableItems(bool enabled) { } -void AccountingSelector::slotSelectionChanged(QListViewItem* i) { +void AccountingSelector::slotSelectionChanged(TQListViewItem* i) { if(!i || i->childCount()) return; @@ -322,7 +322,7 @@ bool AccountingSelector::save() { return true; } -void AccountingSelector::openURL(const QString &url) { +void AccountingSelector::openURL(const TQString &url) { new KRun( KURL( url ) ); } diff --git a/kppp/acctselect.h b/kppp/acctselect.h index 42730dd3..7a4b319a 100644 --- a/kppp/acctselect.h +++ b/kppp/acctselect.h @@ -35,9 +35,9 @@ #ifndef __ACCTSELECT__H__ #define __ACCTSELECT__H__ -#include -#include -#include +#include +#include +#include class QCheckBox; class QComboBox; @@ -45,35 +45,35 @@ class QLabel; class QListView; class QListViewItem; -class AccountingSelector : public QWidget { +class AccountingSelector : public TQWidget { Q_OBJECT public: - AccountingSelector(QWidget *parent = 0, bool _isnewaccount = false, const char *name = 0); + AccountingSelector(TQWidget *parent = 0, bool _isnewaccount = false, const char *name = 0); ~AccountingSelector() {} bool save(); private: - QListViewItem *findByName(QString name); + TQListViewItem *findByName(TQString name); void setupTreeWidget(); - void insertDir(QDir, QListViewItem * = 0); - QString fileNameToName(QString); - QString nameToFileName(QString); + void insertDir(TQDir, TQListViewItem * = 0); + TQString fileNameToName(TQString); + TQString nameToFileName(TQString); private slots: - void openURL(const QString &); + void openURL(const TQString &); void enableItems(bool); - void slotSelectionChanged(QListViewItem* i); + void slotSelectionChanged(TQListViewItem* i); private: - QCheckBox *enable_accounting; - QListView *tl; - QComboBox *use_vol; - QPixmap pmfolder, pmfile; - QLabel *selected; + TQCheckBox *enable_accounting; + TQListView *tl; + TQComboBox *use_vol; + TQPixmap pmfolder, pmfile; + TQLabel *selected; - QListViewItem *edit_item; - QString edit_s; + TQListViewItem *edit_item; + TQString edit_s; bool isnewaccount; }; diff --git a/kppp/connect.cpp b/kppp/connect.cpp index 01e615cc..0ab7f662 100644 --- a/kppp/connect.cpp +++ b/kppp/connect.cpp @@ -26,8 +26,8 @@ #include -#include -#include +#include +#include #include #include @@ -74,12 +74,12 @@ extern KPPPWidget *p_kppp; -QString old_hostname; +TQString old_hostname; bool modified_hostname; -ConnectWidget::ConnectWidget(QWidget *parent, const char *name, PPPStats *st) - : QWidget(parent, name), +ConnectWidget::ConnectWidget(TQWidget *parent, const char *name, PPPStats *st) + : TQWidget(parent, name), // initialize some important variables myreadbuffer(""), main_timer_ID(0), @@ -100,15 +100,15 @@ ConnectWidget::ConnectWidget(QWidget *parent, const char *name, PPPStats *st) { modified_hostname = false; - QVBoxLayout *tl = new QVBoxLayout(this, 8, 10); - QString tit = i18n("Connecting to: "); + TQVBoxLayout *tl = new TQVBoxLayout(this, 8, 10); + TQString tit = i18n("Connecting to: "); setCaption(tit); - QHBoxLayout *l0 = new QHBoxLayout(10); + TQHBoxLayout *l0 = new TQHBoxLayout(10); tl->addLayout(l0); l0->addSpacing(10); - messg = new QLabel(this, "messg"); - messg->setFrameStyle(QFrame::Panel|QFrame::Sunken); + messg = new TQLabel(this, "messg"); + messg->setFrameStyle(TQFrame::Panel|TQFrame::Sunken); messg->setAlignment(AlignCenter); messg->setText(i18n("Unable to create modem lock file.")); messg->setMinimumHeight(messg->sizeHint().height() + 5); @@ -119,17 +119,17 @@ ConnectWidget::ConnectWidget(QWidget *parent, const char *name, PPPStats *st) l0->addWidget(messg); l0->addSpacing(10); - QHBoxLayout *l1 = new QHBoxLayout(10); + TQHBoxLayout *l1 = new TQHBoxLayout(10); tl->addLayout(l1); l1->addStretch(1); - debug = new QPushButton(i18n("&Log"), this); + debug = new TQPushButton(i18n("&Log"), this); debug->setToggleButton(true); - connect(debug, SIGNAL(clicked()), SIGNAL(toggleDebugWindow())); + connect(debug, TQT_SIGNAL(clicked()), TQT_SIGNAL(toggleDebugWindow())); cancel = new KPushButton(KStdGuiItem::cancel(), this); cancel->setFocus(); - connect(cancel, SIGNAL(clicked()), SLOT(cancelbutton())); + connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(cancelbutton())); int maxw = QMAX(cancel->sizeHint().width(), debug->sizeHint().width()); @@ -142,25 +142,25 @@ ConnectWidget::ConnectWidget(QWidget *parent, const char *name, PPPStats *st) setFixedSize(sizeHint()); - pausetimer = new QTimer(this); - connect(pausetimer, SIGNAL(timeout()), SLOT(pause())); + pausetimer = new TQTimer(this); + connect(pausetimer, TQT_SIGNAL(timeout()), TQT_SLOT(pause())); kapp->processEvents(); - timeout_timer = new QTimer(this); - connect(timeout_timer, SIGNAL(timeout()), SLOT(script_timed_out())); + timeout_timer = new TQTimer(this); + connect(timeout_timer, TQT_SIGNAL(timeout()), TQT_SLOT(script_timed_out())); - inittimer = new QTimer(this); - connect(inittimer, SIGNAL(timeout()), SLOT(init())); + inittimer = new TQTimer(this); + connect(inittimer, TQT_SIGNAL(timeout()), TQT_SLOT(init())); - if_timeout_timer = new QTimer(this); - connect(if_timeout_timer, SIGNAL(timeout()), SLOT(if_waiting_timed_out())); + if_timeout_timer = new TQTimer(this); + connect(if_timeout_timer, TQT_SIGNAL(timeout()), TQT_SLOT(if_waiting_timed_out())); - connect(this,SIGNAL(if_waiting_signal()),this,SLOT(if_waiting_slot())); + connect(this,TQT_SIGNAL(if_waiting_signal()),this,TQT_SLOT(if_waiting_slot())); prompt = new PWEntry( this, "pw" ); - if_timer = new QTimer(this); - connect(if_timer,SIGNAL(timeout()), SLOT(if_waiting_slot())); + if_timer = new TQTimer(this); + connect(if_timer,TQT_SIGNAL(timeout()), TQT_SLOT(if_waiting_slot())); } @@ -210,13 +210,13 @@ void ConnectWidget::init() { comlist = &gpppdata.scriptType(); arglist = &gpppdata.script(); - QString tit = i18n("Connecting to: %1").arg(gpppdata.accname()); + TQString tit = i18n("Connecting to: %1").arg(gpppdata.accname()); setCaption(tit); kapp->processEvents(); // signal other applications that we are about to get connected - kapp->dcopClient()->emitDCOPSignal("KpppIface", "aboutToConnect()", QByteArray()); + kapp->dcopClient()->emitDCOPSignal("KpppIface", "aboutToConnect()", TQByteArray()); // run the "before-connect" command if (!gpppdata.command_before_connect().isEmpty()) { @@ -224,7 +224,7 @@ void ConnectWidget::init() { emit debugMessage(i18n("Running pre-startup command...")); kapp->processEvents(); - QApplication::flushX(); + TQApplication::flushX(); pid_t id = execute_command(gpppdata.command_before_connect()); int i, status; @@ -259,7 +259,7 @@ void ConnectWidget::init() { semaphore = false; Modem::modem->stop(); - Modem::modem->notify(this, SLOT(readChar(unsigned char))); + Modem::modem->notify(this, TQT_SLOT(readChar(unsigned char))); // if we are stuck anywhere we will time out timeout_timer->start(gpppdata.modemTimeout()*1000); @@ -278,7 +278,7 @@ void ConnectWidget::init() { } -void ConnectWidget::timerEvent(QTimerEvent *) { +void ConnectWidget::timerEvent(TQTimerEvent *) { if (semaphore || pausing) return; @@ -296,7 +296,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { substate = 0; } - QString initStr = gpppdata.modemInitStr(substate); + TQString initStr = gpppdata.modemInitStr(substate); if (!initStr.isEmpty()) { // send a carriage return and then wait a bit so that the modem will // let us issue commands. @@ -328,8 +328,8 @@ void ConnectWidget::timerEvent(QTimerEvent *) { if (vmain == 5) { if(!expecting) { - QString sToneDuration = "ATS11=" + QString::number(gpppdata.modemToneDuration()); - QString msg = i18n("Setting ") + sToneDuration; + TQString sToneDuration = "ATS11=" + TQString::number(gpppdata.modemToneDuration()); + TQString msg = i18n("Setting ") + sToneDuration; messg->setText(msg); emit debugMessage(msg); setExpect(gpppdata.modemInitResp()); @@ -356,7 +356,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { emit debugMessage(i18n("Setting speaker volume...")); setExpect(gpppdata.modemInitResp()); - QString vol("AT"); + TQString vol("AT"); vol += gpppdata.volumeInitString(); writeline(vol); usleep(gpppdata.modemInitDelay() * 10000); // 0.01 - 3.0 sec @@ -368,7 +368,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { if(vmain == 4) { if(!expecting) { if(!gpppdata.waitForDialTone() || gpppdata.waitCallback()) { - QString msg = i18n("Turning off dial tone waiting..."); + TQString msg = i18n("Turning off dial tone waiting..."); messg->setText(msg); emit debugMessage(msg); setExpect(gpppdata.modemInitResp()); @@ -387,7 +387,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { timeout_timer->start(gpppdata.modemTimeout()*1000); if(gpppdata.waitCallback()) { - QString msg = i18n("Waiting for callback..."); + TQString msg = i18n("Waiting for callback..."); messg->setText(msg); emit debugMessage(msg); setExpect(gpppdata.modemRingResp()); @@ -395,14 +395,14 @@ void ConnectWidget::timerEvent(QTimerEvent *) { return; } - QStringList &plist = gpppdata.phonenumbers(); - QString bmarg= gpppdata.dialPrefix(); + TQStringList &plist = gpppdata.phonenumbers(); + TQString bmarg= gpppdata.dialPrefix(); bmarg += *plist.at(dialnumber); - QString bm = i18n("Dialing %1").arg(bmarg); + TQString bm = i18n("Dialing %1").arg(bmarg); messg->setText(bm); emit debugMessage(bm); - QString pn = gpppdata.modemDialStr(); + TQString pn = gpppdata.modemDialStr(); pn += gpppdata.dialPrefix(); pn += *plist.at(dialnumber); if(++dialnumber >= plist.count()) @@ -434,7 +434,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { Modem::modem->hangup(); if(gpppdata.busyWait() > 0) { - QString bm = i18n("Line busy. Waiting: %1 seconds").arg(gpppdata.busyWait()); + TQString bm = i18n("Line busy. Waiting: %1 seconds").arg(gpppdata.busyWait()); messg->setText(bm); emit debugMessage(bm); @@ -467,7 +467,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { timeout_timer->start(gpppdata.modemTimeout()*1000); if(gpppdata.busyWait() > 0) { - QString bm = i18n("No carrier. Waiting: %1 seconds").arg(gpppdata.busyWait()); + TQString bm = i18n("No carrier. Waiting: %1 seconds").arg(gpppdata.busyWait()); messg->setText(bm); emit debugMessage(bm); @@ -553,7 +553,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { } if (scriptCommand == "Scan") { - QString bm = i18n("Scanning %1").arg(scriptArgument); + TQString bm = i18n("Scanning %1").arg(scriptArgument); messg->setText(bm); emit debugMessage(bm); @@ -563,7 +563,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { } if (scriptCommand == "Save") { - QString bm = i18n("Saving %1").arg(scriptArgument); + TQString bm = i18n("Saving %1").arg(scriptArgument); messg->setText(bm); emit debugMessage(bm); @@ -581,12 +581,12 @@ void ConnectWidget::timerEvent(QTimerEvent *) { if (scriptCommand == "Send" || scriptCommand == "SendNoEcho") { - QString bm = i18n("Sending %1"); + TQString bm = i18n("Sending %1"); // replace %USERNAME% and %PASSWORD% - QString arg = scriptArgument; - QRegExp re1("%USERNAME%"); - QRegExp re2("%PASSWORD%"); + TQString arg = scriptArgument; + TQRegExp re1("%USERNAME%"); + TQRegExp re2("%PASSWORD%"); arg = arg.replace(re1, gpppdata.storedUsername()); arg = arg.replace(re2, gpppdata.storedPassword()); @@ -606,7 +606,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { } if (scriptCommand == "Expect") { - QString bm = i18n("Expecting %1").arg(scriptArgument); + TQString bm = i18n("Expecting %1").arg(scriptArgument); messg->setText(bm); emit debugMessage(bm); @@ -620,7 +620,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { if (scriptCommand == "Pause") { - QString bm = i18n("Pause %1 seconds").arg(scriptArgument); + TQString bm = i18n("Pause %1 seconds").arg(scriptArgument); messg->setText(bm); emit debugMessage(bm); @@ -637,7 +637,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { timeout_timer->stop(); - QString bm = i18n("Timeout %1 seconds").arg(scriptArgument); + TQString bm = i18n("Timeout %1 seconds").arg(scriptArgument); messg->setText(bm); emit debugMessage(bm); @@ -672,11 +672,11 @@ void ConnectWidget::timerEvent(QTimerEvent *) { } if (scriptCommand == "ID") { - QString bm = i18n("ID %1").arg(scriptArgument); + TQString bm = i18n("ID %1").arg(scriptArgument); messg->setText(bm); emit debugMessage(bm); - QString idstring = gpppdata.storedUsername(); + TQString idstring = gpppdata.storedUsername(); if(!idstring.isEmpty() && firstrunID) { // the user entered an Id on the main kppp dialog @@ -708,11 +708,11 @@ void ConnectWidget::timerEvent(QTimerEvent *) { } if (scriptCommand == "Password") { - QString bm = i18n("Password %1").arg(scriptArgument); + TQString bm = i18n("Password %1").arg(scriptArgument); messg->setText(bm); emit debugMessage(bm); - QString pwstring = gpppdata.password(); + TQString pwstring = gpppdata.password(); if(!pwstring.isEmpty() && firstrunPW) { // the user entered a password on the main kppp dialog @@ -745,13 +745,13 @@ void ConnectWidget::timerEvent(QTimerEvent *) { } if (scriptCommand == "Prompt") { - QString bm = i18n("Prompting %1"); + TQString bm = i18n("Prompting %1"); // if the scriptindex (aka the prompt text) includes a ## marker // this marker should get substituted with the contents of our stored // variable (from the subsequent scan). - QString ts = scriptArgument; + TQString ts = scriptArgument; int vstart = ts.find( "##" ); if( vstart != -1 ) { ts.remove( vstart, 2 ); @@ -782,7 +782,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { } if (scriptCommand == "PWPrompt") { - QString bm = i18n("PW Prompt %1").arg(scriptArgument); + TQString bm = i18n("PW Prompt %1").arg(scriptArgument); messg->setText(bm); emit debugMessage(bm); @@ -807,7 +807,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { if (scriptCommand == "LoopStart") { - QString bm = i18n("Loop Start %1").arg(scriptArgument); + TQString bm = i18n("Loop Start %1").arg(scriptArgument); // The incrementing of the scriptindex MUST be before the // call to setExpect otherwise the expect will miss a string that is @@ -832,7 +832,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { } if (scriptCommand == "LoopEnd") { - QString bm = i18n("Loop End %1").arg(scriptArgument); + TQString bm = i18n("Loop End %1").arg(scriptArgument); if ( loopnest <= 0 ) { bm = i18n("LoopEnd without matching Start. Line: %1").arg(bm); vmain=20; @@ -902,7 +902,7 @@ void ConnectWidget::timerEvent(QTimerEvent *) { } } - // Close the tty. This prevents the QTimer::singleShot() in + // Close the tty. This prevents the TQTimer::singleShot() in // Modem::readtty() from re-enabling the socket notifier. // The port is still held open by the helper process. Modem::modem->closetty(); @@ -1003,7 +1003,7 @@ void ConnectWidget::checkBuffers() { scanvar = scanvar.stripWhiteSpace(); // Show the Variabel content in the debug window - QString sv = i18n("Scan Var: %1").arg(scanvar); + TQString sv = i18n("Scan Var: %1").arg(scanvar); emit debugMessage(sv); } @@ -1013,7 +1013,7 @@ void ConnectWidget::checkBuffers() { // keep everything after the expected string readbuffer.remove(0, readbuffer.find(expectstr) + expectstr.length()); - QString ts = i18n("Found: %1").arg(expectstr); + TQString ts = i18n("Found: %1").arg(expectstr); emit debugMessage(ts); if (loopend) { @@ -1024,7 +1024,7 @@ void ConnectWidget::checkBuffers() { if (loopend && readbuffer.contains(loopstr[loopnest])) { expecting = false; readbuffer = ""; - QString ts = i18n("Looping: %1").arg(loopstr[loopnest]); + TQString ts = i18n("Looping: %1").arg(loopstr[loopnest]); emit debugMessage(ts); scriptindex = loopstartindex[loopnest]; loopend = false; @@ -1032,7 +1032,7 @@ void ConnectWidget::checkBuffers() { } // notify event loop if expected string was found if(!expecting) - timerEvent((QTimerEvent *) 0); + timerEvent((TQTimerEvent *) 0); } } @@ -1112,22 +1112,22 @@ void ConnectWidget::script_timed_out() { } -void ConnectWidget::setScan(const QString &n) { +void ConnectWidget::setScan(const TQString &n) { scanning = true; scanstr = n; scanbuffer = ""; - QString ts = i18n("Scanning: %1").arg(n); + TQString ts = i18n("Scanning: %1").arg(n); emit debugMessage(ts); } -void ConnectWidget::setExpect(const QString &n) { +void ConnectWidget::setExpect(const TQString &n) { expecting = true; expectstr = n; - QString ts = i18n("Expecting: %1").arg(n); - ts.replace(QRegExp("\n"), ""); + TQString ts = i18n("Expecting: %1").arg(n); + ts.replace(TQRegExp("\n"), ""); emit debugMessage(ts); // check if the expected string is in the read buffer already. @@ -1192,7 +1192,7 @@ void ConnectWidget::if_waiting_slot() { auto_hostname(); // signal other applications that we are connected now - kapp->dcopClient()->emitDCOPSignal("KpppIface", "connected()", QByteArray()); + kapp->dcopClient()->emitDCOPSignal("KpppIface", "connected()", TQByteArray()); if(!gpppdata.command_on_connect().isEmpty()) { messg->setText(i18n("Running startup command...")); @@ -1239,7 +1239,7 @@ void ConnectWidget::if_waiting_slot() { bool ConnectWidget::execppp() { - QString command; + TQString command; command = "pppd"; @@ -1276,7 +1276,7 @@ bool ConnectWidget::execppp() { // the english/i18n mix below is ugly but we want to keep working // after someone changed the code to use i18n'ed config values - QString flowCtrl = gpppdata.flowcontrol(); + TQString flowCtrl = gpppdata.flowcontrol(); if(flowCtrl != "None" && flowCtrl != i18n("None")) { if(flowCtrl == "CRTSCTS" || flowCtrl == "Hardware [CRTSCTS]" || flowCtrl == i18n("Hardware [CRTSCTS]")) @@ -1291,8 +1291,8 @@ bool ConnectWidget::execppp() { if(gpppdata.autoDNS()) command += " usepeerdns"; - QStringList &arglist = gpppdata.pppdArgument(); - for ( QStringList::Iterator it = arglist.begin(); + TQStringList &arglist = gpppdata.pppdArgument(); + for ( TQStringList::Iterator it = arglist.begin(); it != arglist.end(); ++it ) { @@ -1308,7 +1308,7 @@ bool ConnectWidget::execppp() { } else { command += " callback "; command += gpppdata.callbackType() == CBTYPE_ADMIN ? - QString("0") : gpppdata.callbackPhone(); + TQString("0") : gpppdata.callbackPhone(); } } else gpppdata.setWaitCallback(false); @@ -1350,17 +1350,17 @@ bool ConnectWidget::execppp() { } -void ConnectWidget::closeEvent( QCloseEvent *e ) { +void ConnectWidget::closeEvent( TQCloseEvent *e ) { e->ignore(); emit cancelbutton(); } -void ConnectWidget::setMsg(const QString &msg) { +void ConnectWidget::setMsg(const TQString &msg) { messg->setText(msg); } -void ConnectWidget::writeline(const QString &s) { +void ConnectWidget::writeline(const TQString &s) { Modem::modem->writeLine(s.local8Bit()); } @@ -1368,7 +1368,7 @@ void ConnectWidget::writeline(const QString &s) { void auto_hostname() { struct in_addr local_ip; struct hostent *hostname_entry; - QString new_hostname; + TQString new_hostname; int dot; char tmp_str[100]; // buffer overflow safe @@ -1398,11 +1398,11 @@ void auto_hostname() { // Replace the DNS domain entry in the /etc/resolv.conf file and // disable the nameserver entries if option is enabled -void add_domain(const QString &domain) { +void add_domain(const TQString &domain) { int fd; char c; - QString resolv[MAX_RESOLVCONF_LINES]; + TQString resolv[MAX_RESOLVCONF_LINES]; if (domain.isEmpty()) return; @@ -1422,7 +1422,7 @@ void add_domain(const QString &domain) { if ((c != '\n') && (i < MAX_RESOLVCONF_LINES)) i++; if((fd = Requester::rq->openResolv(O_WRONLY|O_TRUNC)) >= 0) { - QCString tmp = "domain " + domain.local8Bit() + + TQCString tmp = "domain " + domain.local8Bit() + " \t\t#kppp temp entry\n"; write(fd, tmp.data(), tmp.length()); @@ -1432,12 +1432,12 @@ void add_domain(const QString &domain) { && !resolv[j].contains("#kppp temp entry") && gpppdata.exDNSDisabled())) && !resolv[j].contains("#entry disabled by kppp")) { - QCString tmp = "# " + resolv[j].local8Bit() + + TQCString tmp = "# " + resolv[j].local8Bit() + " \t#entry disabled by kppp\n"; write(fd, tmp, tmp.length()); } else { - QCString tmp = resolv[j].local8Bit() + "\n"; + TQCString tmp = resolv[j].local8Bit() + "\n"; write(fd, tmp, tmp.length()); } } @@ -1453,12 +1453,12 @@ void adddns() int fd; if ((fd = Requester::rq->openResolv(O_WRONLY|O_APPEND)) >= 0) { - QStringList &dnslist = gpppdata.dns(); - for ( QStringList::Iterator it = dnslist.begin(); + TQStringList &dnslist = gpppdata.dns(); + for ( TQStringList::Iterator it = dnslist.begin(); it != dnslist.end(); ++it ) { - QCString dns = "nameserver " + (*it).local8Bit() + + TQCString dns = "nameserver " + (*it).local8Bit() + " \t#kppp temp entry\n"; write(fd, dns.data(), dns.length()); } @@ -1493,7 +1493,7 @@ void removedns() { int fd; char c; - QString resolv[MAX_RESOLVCONF_LINES]; + TQString resolv[MAX_RESOLVCONF_LINES]; if((fd = Requester::rq->openResolv(O_RDONLY)) >= 0) { @@ -1512,12 +1512,12 @@ void removedns() { for(int j=0; j < i; j++) { if(resolv[j].contains("#kppp temp entry")) continue; if(resolv[j].contains("#entry disabled by kppp")) { - QCString tmp = resolv[j].local8Bit(); + TQCString tmp = resolv[j].local8Bit(); write(fd, tmp.data()+2, tmp.length() - 27); write(fd, "\n", 1); } else { - QCString tmp = resolv[j].local8Bit() + "\n"; + TQCString tmp = resolv[j].local8Bit() + "\n"; write(fd, tmp, tmp.length()); } } diff --git a/kppp/connect.h b/kppp/connect.h index d6008c15..c387a84b 100644 --- a/kppp/connect.h +++ b/kppp/connect.h @@ -29,10 +29,10 @@ #ifndef _CONNECT_H_ #define _CONNECT_H_ -#include +#include #include -#include -#include +#include +#include #include "kpppconfig.h" #include "pwentry.h" @@ -43,15 +43,15 @@ class PPPStats; -class ConnectWidget : public QWidget { +class ConnectWidget : public TQWidget { Q_OBJECT public: - ConnectWidget(QWidget *parent, const char *name, PPPStats *st); + ConnectWidget(TQWidget *parent, const char *name, PPPStats *st); ~ConnectWidget(); public: void set_con_speed_string(); - void setMsg(const QString &); + void setMsg(const TQString &); void pppdDied(); // these are only necessary to prevent the user from clicking in the cancel @@ -60,8 +60,8 @@ public: void enableButtons(); protected: - void timerEvent(QTimerEvent *); - void closeEvent( QCloseEvent *e ); + void timerEvent(TQTimerEvent *); + void closeEvent( TQCloseEvent *e ); private slots: void readChar(unsigned char); @@ -77,7 +77,7 @@ public slots: signals: void if_waiting_signal(); - void debugMessage(const QString &); + void debugMessage(const TQString &); void toggleDebugWindow(); void closeDebugWindow(); void debugPutChar(unsigned char); @@ -85,43 +85,43 @@ signals: void stopAccounting(); public: - QString myreadbuffer; // we want to keep every thing in order to fish for the + TQString myreadbuffer; // we want to keep every thing in order to fish for the // connection speed later on - QPushButton *debug; + TQPushButton *debug; int main_timer_ID; private: int vmain; int substate; int scriptindex; - QString scriptCommand, scriptArgument; - QStringList *comlist, *arglist; + TQString scriptCommand, scriptArgument; + TQStringList *comlist, *arglist; // static const int maxloopnest=(MAX_SCRIPT_ENTRIES/2); int loopnest; int loopstartindex[MAXLOOPNEST]; bool loopend; - QString loopstr[MAXLOOPNEST]; + TQString loopstr[MAXLOOPNEST]; bool semaphore; - QTimer *inittimer; + TQTimer *inittimer; - QTimer *timeout_timer; + TQTimer *timeout_timer; bool execppp(); - void writeline(const QString &); + void writeline(const TQString &); void checkBuffers(); - void setExpect(const QString &); + void setExpect(const TQString &); bool expecting; - QString expectstr; + TQString expectstr; - QString readbuffer; + TQString readbuffer; - void setScan(const QString &); - QString scanvar; - QString scanstr; - QString scanbuffer; + void setScan(const TQString &); + TQString scanvar; + TQString scanstr; + TQString scanbuffer; bool scanning; bool pausing; @@ -129,11 +129,11 @@ private: LoginTerm *termwindow; int scriptTimeout; - QTimer *pausetimer; - QTimer *if_timer; - QTimer *if_timeout_timer; + TQTimer *pausetimer; + TQTimer *if_timer; + TQTimer *if_timeout_timer; - QLabel *messg; + TQLabel *messg; KPushButton *cancel; bool firstrunID; @@ -150,7 +150,7 @@ extern void killppp(); void adddns(); void addpeerdns(); void removedns(); -void add_domain(const QString & newdomain); +void add_domain(const TQString & newdomain); void auto_hostname(); #endif diff --git a/kppp/conwindow.cpp b/kppp/conwindow.cpp index cc287bb9..e485d862 100644 --- a/kppp/conwindow.cpp +++ b/kppp/conwindow.cpp @@ -21,7 +21,7 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include "conwindow.h" #include "docking.h" #include "pppdata.h" @@ -31,9 +31,9 @@ extern PPPData gpppdata; -ConWindow::ConWindow(QWidget *parent, const char *name,QWidget *mainwidget, +ConWindow::ConWindow(TQWidget *parent, const char *name,TQWidget *mainwidget, PPPStats *st) - : QWidget(parent, name, 0), + : TQWidget(parent, name, 0), minutes(0), seconds(0), hours(0), @@ -43,34 +43,34 @@ ConWindow::ConWindow(QWidget *parent, const char *name,QWidget *mainwidget, accountingEnabled(false), volumeAccountingEnabled(false) { - info1 = new QLabel(i18n("Connected at:"), this); - info2 = new QLabel("", this); + info1 = new TQLabel(i18n("Connected at:"), this); + info2 = new TQLabel("", this); - timelabel1 = new QLabel(i18n("Time connected:"), this); - timelabel2 = new QLabel("000:00:00", this); + timelabel1 = new TQLabel(i18n("Time connected:"), this); + timelabel2 = new TQLabel("000:00:00", this); - vollabel = new QLabel(i18n("Volume:"), this); - volinfo = new QLabel("", this); + vollabel = new TQLabel(i18n("Volume:"), this); + volinfo = new TQLabel("", this); // now the stuff for accounting - session_bill_l = new QLabel(i18n("Session bill:"), this); - session_bill = new QLabel("", this); - total_bill_l = new QLabel(i18n("Total bill:"), this); - total_bill = new QLabel("", this); + session_bill_l = new TQLabel(i18n("Session bill:"), this); + session_bill = new TQLabel("", this); + total_bill_l = new TQLabel(i18n("Total bill:"), this); + total_bill = new TQLabel("", this); setCaption("kppp"); - cancelbutton = new QPushButton(this); + cancelbutton = new TQPushButton(this); cancelbutton->setText(i18n("&Disconnect")); - connect(cancelbutton, SIGNAL(clicked()), mainwidget, SLOT(disconnect())); + connect(cancelbutton, TQT_SIGNAL(clicked()), mainwidget, TQT_SLOT(disconnect())); - statsbutton = new QPushButton(this); + statsbutton = new TQPushButton(this); statsbutton->setText(i18n("De&tails")); statsbutton->setFocus(); - connect(statsbutton, SIGNAL(clicked()), mainwidget, SLOT(showStats())); + connect(statsbutton, TQT_SIGNAL(clicked()), mainwidget, TQT_SLOT(showStats())); - clocktimer = new QTimer(this); - connect(clocktimer, SIGNAL(timeout()), SLOT(timeclick())); + clocktimer = new TQTimer(this); + connect(clocktimer, TQT_SIGNAL(timeout()), TQT_SLOT(timeclick())); // read window position from config file int p_x, p_y; @@ -83,20 +83,20 @@ ConWindow::~ConWindow() { } // save window position when window was closed -bool ConWindow::event(QEvent *e) { - if (e->type() == QEvent::Hide) +bool ConWindow::event(TQEvent *e) { + if (e->type() == TQEvent::Hide) { gpppdata.setWinPosConWin(x(), y()); return true; } else - return QWidget::event(e); + return TQWidget::event(e); } -QString ConWindow::prettyPrintVolume(unsigned int n) { +TQString ConWindow::prettyPrintVolume(unsigned int n) { int idx = 0; - const QString quant[] = {i18n("Byte"), i18n("KB"), - i18n("MB"), i18n("GB"), QString::null}; + const TQString quant[] = {i18n("Byte"), i18n("KB"), + i18n("MB"), i18n("GB"), TQString::null}; float n1 = n; while(n >= 1024 && !quant[idx].isNull()) { @@ -108,7 +108,7 @@ QString ConWindow::prettyPrintVolume(unsigned int n) { while(i--) n1 = n1 / 1024.0; - QString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 ); + TQString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 ); s += " " + quant[idx]; return s; } @@ -123,21 +123,21 @@ void ConWindow::accounting(bool on) { delete tl1; // add layout now - tl1 = new QVBoxLayout(this, 10, 10); + tl1 = new TQVBoxLayout(this, 10, 10); tl1->addSpacing(5); - QHBoxLayout *tl = new QHBoxLayout; + TQHBoxLayout *tl = new QHBoxLayout; tl1->addLayout(tl); tl->addSpacing(20); - QGridLayout *l1; + TQGridLayout *l1; int vol_lines = 0; if(gpppdata.VolAcctEnabled()) vol_lines = 1; if(accountingEnabled) - l1 = new QGridLayout(4 + vol_lines, 2, 5); + l1 = new TQGridLayout(4 + vol_lines, 2, 5); else - l1 = new QGridLayout(2 + vol_lines, 2, 5); + l1 = new TQGridLayout(2 + vol_lines, 2, 5); tl->addLayout(l1); l1->setColStretch(0, 0); l1->setColStretch(1, 1); @@ -148,9 +148,9 @@ void ConWindow::accounting(bool on) { total_bill->setAlignment(AlignRight|AlignVCenter); volinfo->setAlignment(AlignRight|AlignVCenter); // make sure that there's enough space for the bills - QString s1 = session_bill->text(); - QString s2 = total_bill->text(); - QString s3 = volinfo->text(); + TQString s1 = session_bill->text(); + TQString s2 = total_bill->text(); + TQString s3 = volinfo->text(); session_bill->setText("888888.88 XXX"); total_bill->setText("888888.88 XXX"); @@ -204,7 +204,7 @@ void ConWindow::accounting(bool on) { } tl->addSpacing(10); - QVBoxLayout *l2 = new QVBoxLayout(5); + TQVBoxLayout *l2 = new TQVBoxLayout(5); tl->addLayout(l2); l2->addStretch(1); l2->addWidget(statsbutton); @@ -218,8 +218,8 @@ void ConWindow::accounting(bool on) { /* do not overwrite position read from config // If this gets re-enabled, fix it for Xinerama before committing to CVS. - setGeometry((QApplication::desktop()->width() - width()) / 2, - (QApplication::desktop()->height() - height())/2, + setGeometry((TQApplication::desktop()->width() - width()) / 2, + (TQApplication::desktop()->height() - height())/2, width(), height()); */ @@ -236,7 +236,7 @@ void ConWindow::startClock() { minutes = 0; seconds = 0; hours = 0; - QString title ; + TQString title ; title = gpppdata.accname(); @@ -250,7 +250,7 @@ void ConWindow::startClock() { } -void ConWindow::setConnectionSpeed(const QString &speed) { +void ConWindow::setConnectionSpeed(const TQString &speed) { info2->setText(speed); } @@ -261,7 +261,7 @@ void ConWindow::stopClock() { void ConWindow::timeclick() { - QString tooltip = i18n("Connection: %1\n" + TQString tooltip = i18n("Connection: %1\n" "Connected at: %2\n" "Time connected: %3") .arg(gpppdata.accname()).arg(info2->text()) @@ -317,11 +317,11 @@ void ConWindow::timeclick() { setCaption(caption_string); } - QToolTip::add(DockWidget::dock_widget, tooltip); + TQToolTip::add(DockWidget::dock_widget, tooltip); } -void ConWindow::closeEvent( QCloseEvent *e ){ +void ConWindow::closeEvent( TQCloseEvent *e ){ // we don't want to lose the // conwindow since this is our last connection kppp. // if we lost it we could only kill the program by hand to get on with life. @@ -332,7 +332,7 @@ void ConWindow::closeEvent( QCloseEvent *e ){ } -void ConWindow::slotAccounting(QString total, QString session) { +void ConWindow::slotAccounting(TQString total, TQString session) { total_bill->setText(total); session_bill->setText(session); } diff --git a/kppp/conwindow.h b/kppp/conwindow.h index d7f0bf43..fd3609de 100644 --- a/kppp/conwindow.h +++ b/kppp/conwindow.h @@ -26,62 +26,62 @@ #define _CONWINDOW_H_ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include class PPPStats; -class ConWindow : public QWidget { +class ConWindow : public TQWidget { Q_OBJECT public: - ConWindow(QWidget *parent, const char *name,QWidget *main, PPPStats *st); + ConWindow(TQWidget *parent, const char *name,TQWidget *main, PPPStats *st); ~ConWindow(); protected: - void closeEvent( QCloseEvent *e ); - bool event( QEvent *e ); + void closeEvent( TQCloseEvent *e ); + bool event( TQEvent *e ); private slots: void timeclick(); void dock(); public: - void setConnectionSpeed(const QString&); + void setConnectionSpeed(const TQString&); void startClock(); void stopClock(); void accounting(bool); // show/ hide accounting info public slots: - void slotAccounting(QString, QString); + void slotAccounting(TQString, TQString); private: - QLabel *info1; - QLabel *info2; - QPushButton *cancelbutton; - QPushButton *statsbutton; - QString prettyPrintVolume(unsigned int); + TQLabel *info1; + TQLabel *info2; + TQPushButton *cancelbutton; + TQPushButton *statsbutton; + TQString prettyPrintVolume(unsigned int); int minutes; int seconds; int hours; int days; - QFrame *fline; - QLabel *timelabel1; - QLabel *timelabel2; - QLabel *total_bill, *total_bill_l; - QLabel *session_bill, *session_bill_l; - QString caption_string; - QString time_string2; - QString time_string; - QTimer *clocktimer; - QVBoxLayout *tl1; - QLabel *vollabel; - QLabel *volinfo; + TQFrame *fline; + TQLabel *timelabel1; + TQLabel *timelabel2; + TQLabel *total_bill, *total_bill_l; + TQLabel *session_bill, *session_bill_l; + TQString caption_string; + TQString time_string2; + TQString time_string; + TQTimer *clocktimer; + TQVBoxLayout *tl1; + TQLabel *vollabel; + TQLabel *volinfo; PPPStats *stats; bool accountingEnabled; bool volumeAccountingEnabled; diff --git a/kppp/debug.cpp b/kppp/debug.cpp index e551bdea..3dee5797 100644 --- a/kppp/debug.cpp +++ b/kppp/debug.cpp @@ -29,24 +29,24 @@ extern KPPPWidget *p_kppp; -myMultiEdit::myMultiEdit(QWidget *parent, const char *name) - : QMultiLineEdit(parent, name) +myMultiEdit::myMultiEdit(TQWidget *parent, const char *name) + : TQMultiLineEdit(parent, name) { setReadOnly(true); } void myMultiEdit::insertChar(unsigned char c) { - QMultiLineEdit::insert(QChar(c)); + TQMultiLineEdit::insert(TQChar(c)); } void myMultiEdit::newLine() { - QMultiLineEdit::newLine(); + TQMultiLineEdit::newLine(); } -DebugWidget::DebugWidget(QWidget *parent, const char *name) - : QDialog(parent, name, FALSE) +DebugWidget::DebugWidget(TQWidget *parent, const char *name) + : TQDialog(parent, name, FALSE) { setCaption(i18n("Login Script Debug Window")); @@ -54,29 +54,29 @@ DebugWidget::DebugWidget(QWidget *parent, const char *name) text_window->setGeometry(2,5,400, 300); // text_window->setReadOnly(FALSE); - statuslabel = new QLabel("", this, "statuslabel"); + statuslabel = new TQLabel("", this, "statuslabel"); - statuslabel->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + statuslabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); statuslabel->setAlignment( AlignLeft|AlignVCenter ); statuslabel->setGeometry(2, 307, 400, 20); //statusPageLabel->setFont( KGlobalSettings::generalFont() ); - dismiss = new QPushButton(this); + dismiss = new TQPushButton(this); dismiss->setGeometry(330,340,70,30); dismiss->setText(i18n("&Close")); dismiss->setFocus(); - connect(dismiss, SIGNAL(clicked()), SLOT(hide())); + connect(dismiss, TQT_SIGNAL(clicked()), TQT_SLOT(hide())); - /* fline = new QFrame(this,"line"); - fline->setFrameStyle(QFrame::HLine |QFrame::Sunken); + /* fline = new TQFrame(this,"line"); + fline->setFrameStyle(TQFrame::HLine |TQFrame::Sunken); fline->setGeometry(2,332,398,5);*/ adjustSize(); setMinimumSize(width(),height()); } -void DebugWidget::hideEvent(QHideEvent *) +void DebugWidget::hideEvent(TQHideEvent *) { assert(p_kppp); p_kppp->con->debug->setOn(false); @@ -88,7 +88,7 @@ void DebugWidget::clear() { void DebugWidget::addChar(unsigned char c) { - QString stuff; + TQString stuff; if(c == '\r' || c == '\n') { if(c == '\n') @@ -98,17 +98,17 @@ void DebugWidget::addChar(unsigned char c) { } -void DebugWidget::statusLabel(const QString &s) { +void DebugWidget::statusLabel(const TQString &s) { statuslabel->setText(s); } /* -void DebugWidget::keyPressEvent(QKeyEvent *k) { +void DebugWidget::keyPressEvent(TQKeyEvent *k) { } */ -void DebugWidget::resizeEvent(QResizeEvent *e){ +void DebugWidget::resizeEvent(TQResizeEvent *e){ int w = width() ; int h = height(); e = e; diff --git a/kppp/debug.h b/kppp/debug.h index 06eeddf6..a1a73be9 100644 --- a/kppp/debug.h +++ b/kppp/debug.h @@ -24,46 +24,46 @@ #ifndef _DEBUGWIDGET_ #define _DEBUGWIDGET_ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -class myMultiEdit : public QMultiLineEdit { +class myMultiEdit : public TQMultiLineEdit { public: - myMultiEdit(QWidget *parent=0, const char *name=0); + myMultiEdit(TQWidget *parent=0, const char *name=0); void newLine(); void insertChar(unsigned char c); }; -class DebugWidget : public QDialog { +class DebugWidget : public TQDialog { Q_OBJECT public: - DebugWidget(QWidget *parent=0, const char *name=0); + DebugWidget(TQWidget *parent=0, const char *name=0); void clear(); public slots: - void statusLabel(const QString &); + void statusLabel(const TQString &); void toggleVisibility(); void addChar(unsigned char); protected: - virtual void hideEvent(QHideEvent *); - virtual void resizeEvent(QResizeEvent *e); + virtual void hideEvent(TQHideEvent *); + virtual void resizeEvent(TQResizeEvent *e); private: void enter(); - QFrame *fline; - QPushButton *dismiss; + TQFrame *fline; + TQPushButton *dismiss; myMultiEdit *text_window; - QLabel *statuslabel; + TQLabel *statuslabel; }; #endif diff --git a/kppp/docking.cpp b/kppp/docking.cpp index d3f449a1..e5cd0c5e 100644 --- a/kppp/docking.cpp +++ b/kppp/docking.cpp @@ -38,7 +38,7 @@ extern KPPPWidget *p_kppp; // static member DockWidget *DockWidget::dock_widget = 0; -DockWidget::DockWidget(QWidget *parent, const char *name, PPPStats *st) +DockWidget::DockWidget(TQWidget *parent, const char *name, PPPStats *st) : KSystemTray(parent, name), stats(st) { // load pixmaps @@ -50,12 +50,12 @@ DockWidget::DockWidget(QWidget *parent, const char *name, PPPStats *st) // popup menu for right mouse button popup_m = contextMenu(); toggleID = popup_m->insertItem(i18n("Restore"), - this, SLOT(toggle_window_state())); - popup_m->insertItem(i18n("Details"), p_kppp, SLOT(showStats())); + this, TQT_SLOT(toggle_window_state())); + popup_m->insertItem(i18n("Details"), p_kppp, TQT_SLOT(showStats())); popup_m->insertSeparator(); - popup_m->insertItem(i18n("Disconnect"), p_kppp, SLOT(disconnect())); + popup_m->insertItem(i18n("Disconnect"), p_kppp, TQT_SLOT(disconnect())); // connect to stats for little modem animation - connect(stats, SIGNAL(statsChanged(int)), SLOT(paintIcon(int))); + connect(stats, TQT_SIGNAL(statsChanged(int)), TQT_SLOT(paintIcon(int))); DockWidget::dock_widget = this; } @@ -66,7 +66,7 @@ DockWidget::~DockWidget() { } -void DockWidget::paintEvent (QPaintEvent *) { +void DockWidget::paintEvent (TQPaintEvent *) { paintIcon(PPPStats::BytesNone); } @@ -74,7 +74,7 @@ void DockWidget::paintEvent (QPaintEvent *) { void DockWidget::paintIcon (int status) { // animate modem lights - const QPixmap *pixmap; + const TQPixmap *pixmap; if(isVisible()) { switch(status) @@ -112,7 +112,7 @@ void DockWidget::stop_stats() { } -void DockWidget::mousePressEvent(QMouseEvent *e) { +void DockWidget::mousePressEvent(TQMouseEvent *e) { // open/close connect-window on right mouse button if ( e->button() == LeftButton ) { toggle_window_state(); @@ -120,7 +120,7 @@ void DockWidget::mousePressEvent(QMouseEvent *e) { // open popup menu on left mouse button if ( e->button() == RightButton ) { - QString text; + TQString text; if(p_kppp->con_win->isVisible()) text = i18n("Minimize"); else diff --git a/kppp/docking.h b/kppp/docking.h index d35e8977..93c6d344 100644 --- a/kppp/docking.h +++ b/kppp/docking.h @@ -28,7 +28,7 @@ #ifndef _DOCKING_H_ #define _DOCKING_H_ -#include +#include #include class PPPStats; @@ -36,16 +36,16 @@ class PPPStats; class DockWidget : public KSystemTray { Q_OBJECT public: - DockWidget(QWidget * parent, const char *name, PPPStats *st); + DockWidget(TQWidget * parent, const char *name, PPPStats *st); ~DockWidget(); protected: - void paintEvent(QPaintEvent *e); - void showEvent(QShowEvent *) { } + void paintEvent(TQPaintEvent *e); + void showEvent(TQShowEvent *) { } private slots: void toggle_window_state(); - void mousePressEvent(QMouseEvent *e); + void mousePressEvent(TQMouseEvent *e); public slots: void paintIcon(int); @@ -61,10 +61,10 @@ private: KPopupMenu *popup_m; - QPixmap dock_none_pixmap; - QPixmap dock_left_pixmap; - QPixmap dock_right_pixmap; - QPixmap dock_both_pixmap; + TQPixmap dock_none_pixmap; + TQPixmap dock_left_pixmap; + TQPixmap dock_right_pixmap; + TQPixmap dock_both_pixmap; }; #endif diff --git a/kppp/edit.cpp b/kppp/edit.cpp index 7b47c1ba..cc26a889 100644 --- a/kppp/edit.cpp +++ b/kppp/edit.cpp @@ -25,16 +25,16 @@ #include #include -#include +#include #include -#include -#include +#include +#include #include #include #include #include -#include -#include +#include +#include #include #include @@ -44,61 +44,61 @@ #include "iplined.h" #include "auth.h" -DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name ) - : QWidget(parent, name) +DialWidget::DialWidget( TQWidget *parent, bool isnewaccount, const char *name ) + : TQWidget(parent, name) { const int GRIDROWS = 8; - QGridLayout *tl = new QGridLayout(parent, GRIDROWS, 2, 0, KDialog::spacingHint()); + TQGridLayout *tl = new TQGridLayout(parent, GRIDROWS, 2, 0, KDialog::spacingHint()); - connect_label = new QLabel(i18n("Connection &name:"), parent); + connect_label = new TQLabel(i18n("Connection &name:"), parent); tl->addWidget(connect_label, 0, 0); - connectname_l = new QLineEdit(parent); + connectname_l = new TQLineEdit(parent); connectname_l->setMaxLength(ACCNAME_SIZE); connect_label->setBuddy(connectname_l); tl->addWidget(connectname_l, 0, 1); - QString tmp = i18n("Type in a unique name for this connection"); + TQString tmp = i18n("Type in a unique name for this connection"); - QWhatsThis::add(connect_label,tmp); - QWhatsThis::add(connectname_l,tmp); + TQWhatsThis::add(connect_label,tmp); + TQWhatsThis::add(connectname_l,tmp); - number_label = new QLabel(i18n("P&hone number:"), parent); + number_label = new TQLabel(i18n("P&hone number:"), parent); number_label->setAlignment(AlignTop|AlignLeft); tl->addWidget(number_label, 1, 0); - QHBoxLayout *lpn = new QHBoxLayout(5); + TQHBoxLayout *lpn = new TQHBoxLayout(5); tl->addLayout(lpn, 1, 1); - numbers = new QListBox(parent); + numbers = new TQListBox(parent); number_label->setBuddy(numbers); numbers->setMinimumSize(120, 70); lpn->addWidget(numbers); - QVBoxLayout *lpn1 = new QVBoxLayout; + TQVBoxLayout *lpn1 = new QVBoxLayout; lpn->addLayout(lpn1); - add = new QPushButton(i18n("&Add..."), parent); - del = new QPushButton(i18n("&Remove"), parent); + add = new TQPushButton(i18n("&Add..."), parent); + del = new TQPushButton(i18n("&Remove"), parent); - up = new QPushButton(parent); + up = new TQPushButton(parent); up->setIconSet(BarIconSet("up")); - down = new QPushButton(parent); + down = new TQPushButton(parent); down->setIconSet(BarIconSet("down")); lpn1->addWidget(add); lpn1->addWidget(del); lpn1->addStretch(1); lpn1->addWidget(up); lpn1->addWidget(down); - connect(add, SIGNAL(clicked()), - this, SLOT(addNumber())); - connect(del, SIGNAL(clicked()), - this, SLOT(delNumber())); - connect(up, SIGNAL(clicked()), - this, SLOT(upNumber())); - connect(down, SIGNAL(clicked()), - this, SLOT(downNumber())); - connect(numbers, SIGNAL(highlighted(int)), - this, SLOT(selectionChanged(int))); + connect(add, TQT_SIGNAL(clicked()), + this, TQT_SLOT(addNumber())); + connect(del, TQT_SIGNAL(clicked()), + this, TQT_SLOT(delNumber())); + connect(up, TQT_SIGNAL(clicked()), + this, TQT_SLOT(upNumber())); + connect(down, TQT_SIGNAL(clicked()), + this, TQT_SLOT(downNumber())); + connect(numbers, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(selectionChanged(int))); numbersChanged(); tmp = i18n("

    Specifies the phone numbers to dial. You\n" @@ -109,13 +109,13 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name ) "When a number is busy or fails, kppp will \n" "try the next number and so on"); - QWhatsThis::add(number_label,tmp); - QWhatsThis::add(numbers,tmp); + TQWhatsThis::add(number_label,tmp); + TQWhatsThis::add(numbers,tmp); - auth_l = new QLabel(i18n("A&uthentication:"), parent); + auth_l = new TQLabel(i18n("A&uthentication:"), parent); tl->addWidget(auth_l, 3, 0); - auth = new QComboBox(parent); + auth = new TQComboBox(parent); auth_l->setBuddy(auth); auth->insertItem(i18n("Script-based")); auth->insertItem(i18n("PAP")); @@ -133,13 +133,13 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name ) "choose CHAP, because it's much safer. If you don't know\n" "whether PAP or CHAP is right, choose PAP/CHAP."); - QWhatsThis::add(auth_l,tmp); - QWhatsThis::add(auth,tmp); + TQWhatsThis::add(auth_l,tmp); + TQWhatsThis::add(auth,tmp); - store_password = new QCheckBox(i18n("Store &password"), parent); + store_password = new TQCheckBox(i18n("Store &password"), parent); store_password->setChecked(true); tl->addMultiCellWidget(store_password, 4, 4, 0, 1, AlignRight); - QWhatsThis::add(store_password, + TQWhatsThis::add(store_password, i18n("

    When this is turned on, your ISP password\n" "will be saved in kppp's config file, so\n" "you do not need to type it in every time.\n" @@ -149,36 +149,36 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name ) "readable only to you. Make sure nobody\n" "gains access to this file!")); - cbtype_l = new QLabel(i18n("&Callback type:"), parent); + cbtype_l = new TQLabel(i18n("&Callback type:"), parent); tl->addWidget(cbtype_l, 5, 0); - cbtype = new QComboBox(parent); + cbtype = new TQComboBox(parent); cbtype_l->setBuddy(cbtype); cbtype->insertItem(i18n("None")); cbtype->insertItem(i18n("Administrator-defined")); cbtype->insertItem(i18n("User-defined")); - connect(cbtype, SIGNAL(highlighted(int)), - this, SLOT(cbtypeChanged(int))); + connect(cbtype, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(cbtypeChanged(int))); tl->addWidget(cbtype, 5, 1); tmp = i18n("Callback type"); - QWhatsThis::add(cbtype_l,tmp); - QWhatsThis::add(cbtype,tmp); + TQWhatsThis::add(cbtype_l,tmp); + TQWhatsThis::add(cbtype,tmp); - cbphone_l = new QLabel(i18n("Call&back number:"), parent); + cbphone_l = new TQLabel(i18n("Call&back number:"), parent); tl->addWidget(cbphone_l, 6, 0); - cbphone = new QLineEdit(parent); + cbphone = new TQLineEdit(parent); cbphone_l->setBuddy(cbphone); cbphone->setMaxLength(140); tl->addWidget(cbphone, 6, 1); tmp = i18n("Callback phone number"); - QWhatsThis::add(cbphone_l,tmp); - QWhatsThis::add(cbphone,tmp); + TQWhatsThis::add(cbphone_l,tmp); + TQWhatsThis::add(cbphone,tmp); - pppdargs = new QPushButton(i18n("Customize &pppd Arguments..."), parent); - connect(pppdargs, SIGNAL(clicked()), SLOT(pppdargsbutton())); + pppdargs = new TQPushButton(i18n("Customize &pppd Arguments..."), parent); + connect(pppdargs, TQT_SIGNAL(clicked()), TQT_SLOT(pppdargsbutton())); tl->addMultiCellWidget(pppdargs, 7, 7, 0, 1, AlignCenter); // Set defaults if editing an existing connection @@ -186,8 +186,8 @@ DialWidget::DialWidget( QWidget *parent, bool isnewaccount, const char *name ) connectname_l->setText(gpppdata.accname()); // insert the phone numbers into the listbox - QString n = gpppdata.phonenumber(); - QString tmp = ""; + TQString n = gpppdata.phonenumber(); + TQString tmp = ""; uint idx = 0; while(idx != n.length()) { if(n[idx] == ':') { @@ -226,7 +226,7 @@ bool DialWidget::save() { } else { gpppdata.setAccname(connectname_l->text()); - QString number = ""; + TQString number = ""; for(uint i = 0; i < numbers->count(); i++) { if(i != 0) number += ":"; @@ -281,7 +281,7 @@ void DialWidget::delNumber() { void DialWidget::upNumber() { int idx = numbers->currentItem(); if(idx != -1) { - QString item = numbers->text(idx); + TQString item = numbers->text(idx); numbers->removeItem(idx); numbers->insertItem(item, idx-1); numbers->setCurrentItem(idx-1); @@ -293,7 +293,7 @@ void DialWidget::upNumber() { void DialWidget::downNumber() { int idx = numbers->currentItem(); if(idx != -1) { - QString item = numbers->text(idx); + TQString item = numbers->text(idx); numbers->removeItem(idx); numbers->insertItem(item, idx+1); numbers->setCurrentItem(idx+1); @@ -312,12 +312,12 @@ void DialWidget::pppdargsbutton() { ///////////////////////////////////////////////////////////////////////////// // ExecWidget ///////////////////////////////////////////////////////////////////////////// -ExecWidget::ExecWidget(QWidget *parent, bool isnewaccount, const char *name) : - QWidget(parent, name) +ExecWidget::ExecWidget(TQWidget *parent, bool isnewaccount, const char *name) : + TQWidget(parent, name) { - QVBoxLayout *tl = new QVBoxLayout(parent, 0, KDialog::spacingHint()); + TQVBoxLayout *tl = new TQVBoxLayout(parent, 0, KDialog::spacingHint()); - QLabel *l = new QLabel(\ + TQLabel *l = new TQLabel(\ i18n("Here you can select commands to run at certain stages of the\n" "connection. The commands are run with your real user id, so\n" "you cannot run any commands here requiring root permissions\n" @@ -328,31 +328,31 @@ i18n("Here you can select commands to run at certain stages of the\n" tl->addWidget(l); tl->addStretch(1); - QGridLayout *l1 = new QGridLayout(4, 2, 10); + TQGridLayout *l1 = new TQGridLayout(4, 2, 10); tl->addLayout(l1); l1->setColStretch(0, 0); l1->setColStretch(1, 1); - before_connect_l = new QLabel(i18n("&Before connect:"), parent); + before_connect_l = new TQLabel(i18n("&Before connect:"), parent); before_connect_l->setAlignment(AlignVCenter); l1->addWidget(before_connect_l, 0, 0); - before_connect = new QLineEdit(parent); + before_connect = new TQLineEdit(parent); before_connect_l->setBuddy(before_connect); before_connect->setMaxLength(COMMAND_SIZE); l1->addWidget(before_connect, 0, 1); - QString tmp = i18n("Allows you to run a program before a connection\n" + TQString tmp = i18n("Allows you to run a program before a connection\n" "is established. It is called immediately before\n" "dialing has begun.\n\n" "This might be useful, e.g. to stop HylaFAX blocking the\n" "modem."); - QWhatsThis::add(before_connect_l,tmp); - QWhatsThis::add(before_connect,tmp); + TQWhatsThis::add(before_connect_l,tmp); + TQWhatsThis::add(before_connect,tmp); - command_label = new QLabel(i18n("&Upon connect:"), parent); + command_label = new TQLabel(i18n("&Upon connect:"), parent); command_label->setAlignment(AlignVCenter); l1->addWidget(command_label, 1, 0); - command = new QLineEdit(parent); + command = new TQLineEdit(parent); command_label->setBuddy(command); command->setMaxLength(COMMAND_SIZE); l1->addWidget(command, 1, 1); @@ -362,14 +362,14 @@ i18n("Here you can select commands to run at certain stages of the\n" "\n" "Very useful for fetching mail and news"); - QWhatsThis::add(command_label,tmp); - QWhatsThis::add(command,tmp); + TQWhatsThis::add(command_label,tmp); + TQWhatsThis::add(command,tmp); - predisconnect_label = new QLabel(i18n("Before &disconnect:"), + predisconnect_label = new TQLabel(i18n("Before &disconnect:"), parent); predisconnect_label->setAlignment(AlignVCenter); l1->addWidget(predisconnect_label, 2, 0); - predisconnect = new QLineEdit(parent); + predisconnect = new TQLineEdit(parent); predisconnect_label->setBuddy(predisconnect); predisconnect->setMaxLength(COMMAND_SIZE); l1->addWidget(predisconnect, 2, 1); @@ -377,23 +377,23 @@ i18n("Here you can select commands to run at certain stages of the\n" "is closed. The connection will stay open until\n" "the program exits."); - QWhatsThis::add(predisconnect_label,tmp); - QWhatsThis::add(predisconnect,tmp); + TQWhatsThis::add(predisconnect_label,tmp); + TQWhatsThis::add(predisconnect,tmp); - discommand_label = new QLabel(i18n("U&pon disconnect:"), + discommand_label = new TQLabel(i18n("U&pon disconnect:"), parent); discommand_label->setAlignment(AlignVCenter); l1->addWidget(discommand_label, 3, 0); - discommand = new QLineEdit(parent); + discommand = new TQLineEdit(parent); discommand_label->setBuddy(discommand); discommand->setMaxLength(COMMAND_SIZE); l1->addWidget(discommand, 3, 1); tmp = i18n("Allows you to run a program after a connection\n" "has been closed."); - QWhatsThis::add(discommand_label,tmp); - QWhatsThis::add(discommand,tmp); + TQWhatsThis::add(discommand_label,tmp); + TQWhatsThis::add(discommand,tmp); // extra space between entries l1->addRowSpacing(1, 5); @@ -427,23 +427,23 @@ bool ExecWidget::save() { // IPWidget // ///////////////////////////////////////////////////////////////////////////// -IPWidget::IPWidget( QWidget *parent, bool isnewaccount, const char *name ) - : QWidget(parent, name) +IPWidget::IPWidget( TQWidget *parent, bool isnewaccount, const char *name ) + : TQWidget(parent, name) { - QVBoxLayout *topLayout = new QVBoxLayout(parent); + TQVBoxLayout *topLayout = new TQVBoxLayout(parent); topLayout->setSpacing(KDialog::spacingHint()); - box = new QVGroupBox(i18n("C&onfiguration"), parent); + box = new TQVGroupBox(i18n("C&onfiguration"), parent); box->setInsideSpacing(KDialog::spacingHint()); - rb = new QButtonGroup(parent); + rb = new TQButtonGroup(parent); rb->hide(); - connect(rb, SIGNAL(clicked(int)), - SLOT(hitIPSelect(int))); + connect(rb, TQT_SIGNAL(clicked(int)), + TQT_SLOT(hitIPSelect(int))); - dynamicadd_rb = new QRadioButton(box); + dynamicadd_rb = new TQRadioButton(box); dynamicadd_rb->setText(i18n("Dynamic IP address")); - QWhatsThis::add(dynamicadd_rb, + TQWhatsThis::add(dynamicadd_rb, i18n("Select this option when your computer gets an\n" "internet address (IP) every time a\n" "connection is made.\n" @@ -451,23 +451,23 @@ IPWidget::IPWidget( QWidget *parent, bool isnewaccount, const char *name ) "Almost every Internet Service Provider uses\n" "this method, so this should be turned on.")); - staticadd_rb = new QRadioButton(box); + staticadd_rb = new TQRadioButton(box); staticadd_rb->setText(i18n("Static IP address")); rb->insert(dynamicadd_rb, 0); rb->insert(staticadd_rb, 1); - QWhatsThis::add(staticadd_rb, + TQWhatsThis::add(staticadd_rb, i18n("Select this option when your computer has a\n" "fixed internet address (IP). Most computers\n" "don't have this, so you should probably select\n" "dynamic IP addressing unless you know what you\n" "are doing.")); - QWidget *ipWidget = new QWidget(box); - QGridLayout *ipLayout = new QGridLayout(ipWidget, 2, 2); + TQWidget *ipWidget = new TQWidget(box); + TQGridLayout *ipLayout = new TQGridLayout(ipWidget, 2, 2); ipLayout->setSpacing(KDialog::spacingHint()); - ipaddress_label = new QLabel(i18n("&IP address:"), ipWidget); - QString tmp = i18n("If your computer has a permanent internet\n" + ipaddress_label = new TQLabel(i18n("&IP address:"), ipWidget); + TQString tmp = i18n("If your computer has a permanent internet\n" "address, you must supply your IP address here."); ipLayout->addWidget(ipaddress_label, 0, 0); @@ -475,10 +475,10 @@ IPWidget::IPWidget( QWidget *parent, bool isnewaccount, const char *name ) ipaddress_label->setBuddy(ipaddress_l); ipLayout->addWidget(ipaddress_l, 0, 1); - QWhatsThis::add(ipaddress_label,tmp); - QWhatsThis::add(ipaddress_l,tmp); + TQWhatsThis::add(ipaddress_label,tmp); + TQWhatsThis::add(ipaddress_l,tmp); - sub_label = new QLabel(i18n("&Subnet mask:"), ipWidget); + sub_label = new TQLabel(i18n("&Subnet mask:"), ipWidget); tmp = i18n("

    If your computer has a static Internet address,\n" "you must supply a network mask here. In almost\n" "all cases this netmask will be 255.255.255.0,\n" @@ -491,15 +491,15 @@ IPWidget::IPWidget( QWidget *parent, bool isnewaccount, const char *name ) sub_label->setBuddy(subnetmask_l); ipLayout->addWidget(subnetmask_l, 1, 1); - QWhatsThis::add(sub_label,tmp); - QWhatsThis::add(subnetmask_l,tmp); + TQWhatsThis::add(sub_label,tmp); + TQWhatsThis::add(subnetmask_l,tmp); - autoname = new QCheckBox(i18n("&Auto-configure hostname from this IP"), parent); + autoname = new TQCheckBox(i18n("&Auto-configure hostname from this IP"), parent); autoname->setChecked(gpppdata.autoname()); - connect(autoname,SIGNAL(toggled(bool)), - this,SLOT(autoname_t(bool))); + connect(autoname,TQT_SIGNAL(toggled(bool)), + this,TQT_SLOT(autoname_t(bool))); - QWhatsThis::add(autoname, + TQWhatsThis::add(autoname, i18n("

    Whenever you connect, this reconfigures\n" "your hostname to match the IP address you\n" "got from the PPP server. This may be useful\n" @@ -583,20 +583,20 @@ void IPWidget::hitIPSelect( int i ) { -DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name ) - : QWidget(parent, name) +DNSWidget::DNSWidget( TQWidget *parent, bool isnewaccount, const char *name ) + : TQWidget(parent, name) { - // box = new QGroupBox(parent); - QGridLayout *tl = new QGridLayout(parent, 7, 2, 0, KDialog::spacingHint()); + // box = new TQGroupBox(parent); + TQGridLayout *tl = new TQGridLayout(parent, 7, 2, 0, KDialog::spacingHint()); - dnsdomain_label = new QLabel(i18n("Domain &name:"), parent); + dnsdomain_label = new TQLabel(i18n("Domain &name:"), parent); tl->addWidget(dnsdomain_label, 0, 0); - dnsdomain = new QLineEdit(parent); + dnsdomain = new TQLineEdit(parent); dnsdomain_label->setBuddy(dnsdomain); dnsdomain->setMaxLength(DOMAIN_SIZE); tl->addWidget(dnsdomain, 0, 1); - QString tmp = i18n("If you enter a domain name here, this domain\n" + TQString tmp = i18n("If you enter a domain name here, this domain\n" "name is used for your computer while you are\n" "connected. When the connection is closed, the\n" "original domain name of your computer is\n" @@ -605,39 +605,39 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name ) "If you leave this field blank, no changes are\n" "made to the domain name."); - QWhatsThis::add(dnsdomain_label,tmp); - QWhatsThis::add(dnsdomain,tmp); + TQWhatsThis::add(dnsdomain_label,tmp); + TQWhatsThis::add(dnsdomain,tmp); - conf_label = new QLabel(i18n("C&onfiguration:"), parent); + conf_label = new TQLabel(i18n("C&onfiguration:"), parent); tl->addWidget(conf_label, 1, 0); - bg = new QButtonGroup("Group", this); + bg = new TQButtonGroup("Group", this); conf_label->setBuddy(bg); - connect(bg, SIGNAL(clicked(int)), SLOT(DNS_Mode_Selected(int))); + connect(bg, TQT_SIGNAL(clicked(int)), TQT_SLOT(DNS_Mode_Selected(int))); bg->hide(); - autodns = new QRadioButton(i18n("Automatic"), parent); + autodns = new TQRadioButton(i18n("Automatic"), parent); bg->insert(autodns, 0); tl->addWidget(autodns, 1, 1); // no automatic DNS detection for pppd < 2.3.7 if(!gpppdata.pppdVersionMin(2, 3, 7)) autodns->setEnabled(false); - mandns = new QRadioButton(i18n("Manual"), parent); + mandns = new TQRadioButton(i18n("Manual"), parent); bg->insert(mandns, 1); tl->addWidget(mandns, 2, 1); - dns_label = new QLabel(i18n("DNS &IP address:"), parent); + dns_label = new TQLabel(i18n("DNS &IP address:"), parent); tl->addWidget(dns_label, 3, 0); - QHBoxLayout *l2 = new QHBoxLayout; + TQHBoxLayout *l2 = new QHBoxLayout; tl->addLayout(l2, 3, 1); dnsipaddr = new IPLineEdit(parent); dns_label->setBuddy(dnsipaddr); - connect(dnsipaddr, SIGNAL(returnPressed()), - SLOT(adddns())); - connect(dnsipaddr, SIGNAL(textChanged(const QString &)), - SLOT(DNS_Edit_Changed(const QString &))); + connect(dnsipaddr, TQT_SIGNAL(returnPressed()), + TQT_SLOT(adddns())); + connect(dnsipaddr, TQT_SIGNAL(textChanged(const TQString &)), + TQT_SLOT(DNS_Edit_Changed(const TQString &))); l2->addWidget(dnsipaddr, 1); l2->addStretch(1); tmp = i18n("

    Allows you to specify a new DNS server to be\n" @@ -648,56 +648,56 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name ) "To add a DNS server, type in the IP address of\n" "the DNS server here and click on Add"); - QWhatsThis::add(dns_label, tmp); - QWhatsThis::add(dnsipaddr, tmp); + TQWhatsThis::add(dns_label, tmp); + TQWhatsThis::add(dnsipaddr, tmp); - QHBoxLayout *l1 = new QHBoxLayout; + TQHBoxLayout *l1 = new QHBoxLayout; tl->addLayout(l1, 4, 1); - add = new QPushButton(i18n("&Add"), parent); - connect(add, SIGNAL(clicked()), SLOT(adddns())); + add = new TQPushButton(i18n("&Add"), parent); + connect(add, TQT_SIGNAL(clicked()), TQT_SLOT(adddns())); int width = add->sizeHint().width(); width = QMAX(width,60); add->setMinimumWidth(width); l1->addWidget(add); l1->addStretch(1); - QWhatsThis::add(add, + TQWhatsThis::add(add, i18n("Click this button to add the DNS server\n" "specified in the field above. The entry\n" "will then be added to the list below")); - remove = new QPushButton(i18n("&Remove"), parent); - connect(remove, SIGNAL(clicked()), SLOT(removedns())); + remove = new TQPushButton(i18n("&Remove"), parent); + connect(remove, TQT_SIGNAL(clicked()), TQT_SLOT(removedns())); width = remove->sizeHint().width(); width = QMAX(width,60); remove->setMinimumWidth(width); l1->addWidget(remove); - QWhatsThis::add(remove, + TQWhatsThis::add(remove, i18n("Click this button to remove the selected DNS\n" "server entry from the list below")); - servers_label = new QLabel(i18n("DNS address &list:"), parent); + servers_label = new TQLabel(i18n("DNS address &list:"), parent); servers_label->setAlignment(AlignTop|AlignLeft); tl->addWidget(servers_label, 5, 0); - dnsservers = new QListBox(parent); + dnsservers = new TQListBox(parent); servers_label->setBuddy(dnsservers); dnsservers->setMinimumSize(150, 80); - connect(dnsservers, SIGNAL(highlighted(int)), - SLOT(DNS_Entry_Selected(int))); + connect(dnsservers, TQT_SIGNAL(highlighted(int)), + TQT_SLOT(DNS_Entry_Selected(int))); tl->addWidget(dnsservers, 5, 1); tmp = i18n("

    This shows all defined DNS servers to use\n" "while you are connected. Use the Add and\n" "Remove buttons to modify the list"); - QWhatsThis::add(servers_label,tmp); - QWhatsThis::add(dnsservers,tmp); + TQWhatsThis::add(servers_label,tmp); + TQWhatsThis::add(dnsservers,tmp); - exdnsdisabled_toggle = new QCheckBox(i18n( \ + exdnsdisabled_toggle = new TQCheckBox(i18n( \ "&Disable existing DNS servers during connection"), parent); exdnsdisabled_toggle->setChecked(gpppdata.exDNSDisabled()); tl->addMultiCellWidget(exdnsdisabled_toggle, 6, 6, 0, 1, AlignCenter); - QWhatsThis::add(exdnsdisabled_toggle, + TQWhatsThis::add(exdnsdisabled_toggle, i18n("

    When this option is selected, all DNS\n" "servers specified in /etc/resolv.conf are\n" "temporary disabled while the dialup connection\n" @@ -722,8 +722,8 @@ DNSWidget::DNSWidget( QWidget *parent, bool isnewaccount, const char *name ) tl->activate(); } -void DNSWidget::DNS_Edit_Changed(const QString &text) { - QRegExp r("[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+"); +void DNSWidget::DNS_Edit_Changed(const TQString &text) { + TQRegExp r("[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+"); add->setEnabled(text.find(r) != -1); } @@ -746,13 +746,13 @@ void DNSWidget::DNS_Mode_Selected(int mode) { void DNSWidget::save() { gpppdata.setAutoDNS(bg->id(bg->selected()) == 0); - QStringList serverlist; + TQStringList serverlist; for(uint i=0; i < dnsservers->count(); i++) serverlist.append(dnsservers->text(i)); gpppdata.setDns(serverlist); // strip leading dot - QString s(dnsdomain->text()); + TQString s(dnsdomain->text()); if(s.left(1) == ".") gpppdata.setDomain(s.mid(1)); else @@ -782,23 +782,23 @@ void DNSWidget::removedns() { // // GatewayWidget // -GatewayWidget::GatewayWidget( QWidget *parent, bool isnewaccount, const char *name ) - : QWidget(parent, name) +GatewayWidget::GatewayWidget( TQWidget *parent, bool isnewaccount, const char *name ) + : TQWidget(parent, name) { - QVBoxLayout *topLayout = new QVBoxLayout(parent); + TQVBoxLayout *topLayout = new TQVBoxLayout(parent); topLayout->setSpacing(KDialog::spacingHint()); - box = new QVGroupBox(i18n("C&onfiguration"), parent); + box = new TQVGroupBox(i18n("C&onfiguration"), parent); box->setInsideSpacing(KDialog::spacingHint()); - rb = new QButtonGroup(parent); + rb = new TQButtonGroup(parent); rb->hide(); - connect(rb, SIGNAL(clicked(int)), SLOT(hitGatewaySelect(int))); + connect(rb, TQT_SIGNAL(clicked(int)), TQT_SLOT(hitGatewaySelect(int))); - defaultgateway = new QRadioButton(box); + defaultgateway = new TQRadioButton(box); defaultgateway->setText(i18n("Default gateway")); rb->insert(defaultgateway, 0); - QWhatsThis::add(defaultgateway, + TQWhatsThis::add(defaultgateway, i18n("This makes the PPP peer computer (the computer\n" "you are connected to with your modem) to act as\n" "a gateway. Your computer will send all packets not\n" @@ -809,21 +809,21 @@ GatewayWidget::GatewayWidget( QWidget *parent, bool isnewaccount, const char *na "probably leave this option on.")); - staticgateway = new QRadioButton(box); + staticgateway = new TQRadioButton(box); staticgateway->setText(i18n("Static gateway")); rb->insert(staticgateway, 1); - QWhatsThis::add(staticgateway, + TQWhatsThis::add(staticgateway, i18n("

    Allows you to specify which computer you want\n" "to use as gateway (see Default Gateway above)")); - QHBox *gateBox = new QHBox(box); - gate_label = new QLabel(i18n("Gateway &IP address:"), gateBox); + TQHBox *gateBox = new TQHBox(box); + gate_label = new TQLabel(i18n("Gateway &IP address:"), gateBox); gatewayaddr = new IPLineEdit(gateBox); gate_label->setBuddy(gatewayaddr); - defaultroute = new QCheckBox(i18n("&Assign the default route to this gateway"), + defaultroute = new TQCheckBox(i18n("&Assign the default route to this gateway"), parent); - QWhatsThis::add(defaultroute, + TQWhatsThis::add(defaultroute, i18n("If this option is enabled, all packets not\n" "going to the local net are routed through\n" "the PPP connection.\n" @@ -874,42 +874,42 @@ void GatewayWidget::hitGatewaySelect( int i ) { -ScriptWidget::ScriptWidget( QWidget *parent, bool isnewaccount, const char *name ) - : QWidget(parent, name) +ScriptWidget::ScriptWidget( TQWidget *parent, bool isnewaccount, const char *name ) + : TQWidget(parent, name) { - QVBoxLayout *tl = new QVBoxLayout(parent, 0, KDialog::spacingHint()); + TQVBoxLayout *tl = new TQVBoxLayout(parent, 0, KDialog::spacingHint()); se = new ScriptEdit(parent); - connect(se, SIGNAL(returnPressed()), SLOT(addButton())); + connect(se, TQT_SIGNAL(returnPressed()), TQT_SLOT(addButton())); tl->addWidget(se); // insert equal-sized buttons KButtonBox *bbox = new KButtonBox(parent); add = bbox->addButton(i18n("&Add")); - connect(add, SIGNAL(clicked()), SLOT(addButton())); + connect(add, TQT_SIGNAL(clicked()), TQT_SLOT(addButton())); bbox->addStretch(1); insert = bbox->addButton(i18n("&Insert")); - connect(insert, SIGNAL(clicked()), SLOT(insertButton())); + connect(insert, TQT_SIGNAL(clicked()), TQT_SLOT(insertButton())); bbox->addStretch(1); remove = bbox->addButton(i18n("&Remove")); - connect(remove, SIGNAL(clicked()), SLOT(removeButton())); + connect(remove, TQT_SIGNAL(clicked()), TQT_SLOT(removeButton())); bbox->layout(); tl->addWidget(bbox); - QHBoxLayout *l12 = new QHBoxLayout(0); + TQHBoxLayout *l12 = new TQHBoxLayout(0); tl->addLayout(l12); - stl = new QListBox(parent); - stl->setVScrollBarMode( QScrollView::AlwaysOff ); - connect(stl, SIGNAL(highlighted(int)), SLOT(stlhighlighted(int))); - stl->setMinimumSize(QSize(70, 140)); + stl = new TQListBox(parent); + stl->setVScrollBarMode( TQScrollView::AlwaysOff ); + connect(stl, TQT_SIGNAL(highlighted(int)), TQT_SLOT(stlhighlighted(int))); + stl->setMinimumSize(TQSize(70, 140)); - sl = new QListBox(parent); - sl->setVScrollBarMode( QScrollView::AlwaysOff ); - connect(sl, SIGNAL(highlighted(int)), SLOT(slhighlighted(int))); - sl->setMinimumSize(QSize(150, 140)); + sl = new TQListBox(parent); + sl->setVScrollBarMode( TQScrollView::AlwaysOff ); + connect(sl, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slhighlighted(int))); + sl->setMinimumSize(TQSize(150, 140)); - slb = new QScrollBar(parent); + slb = new TQScrollBar(parent); slb->setFixedWidth(slb->sizeHint().width()); - connect(slb, SIGNAL(valueChanged(int)), SLOT(scrolling(int))); + connect(slb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrolling(int))); l12->addWidget(stl, 1); l12->addWidget(sl, 3); @@ -917,10 +917,10 @@ ScriptWidget::ScriptWidget( QWidget *parent, bool isnewaccount, const char *name //load data from gpppdata if(!isnewaccount) { - QStringList &comlist = gpppdata.scriptType(); - QStringList &arglist = gpppdata.script(); - QStringList::Iterator itcom = comlist.begin(); - QStringList::Iterator itarg = arglist.begin(); + TQStringList &comlist = gpppdata.scriptType(); + TQStringList &arglist = gpppdata.script(); + TQStringList::Iterator itcom = comlist.begin(); + TQStringList::Iterator itarg = arglist.begin(); for ( ; itcom != comlist.end() && itarg != arglist.end(); @@ -959,7 +959,7 @@ bool ScriptWidget::check() { void ScriptWidget::save() { - QStringList typelist, arglist; + TQStringList typelist, arglist; for(uint i=0; i < sl->count(); i++) { typelist.append(stl->text(i)); arglist.append(sl->text(i)); @@ -1201,21 +1201,21 @@ void ScriptWidget::removeButton() { // Used to specify a new phone number // ///////////////////////////////////////////////////////////////////////////// -PhoneNumberDialog::PhoneNumberDialog(QWidget *parent) : KDialogBase(parent, 0, true, i18n("Add Phone Number"), Ok|Cancel) { +PhoneNumberDialog::PhoneNumberDialog(TQWidget *parent) : KDialogBase(parent, 0, true, i18n("Add Phone Number"), Ok|Cancel) { KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); - QHBox *hbox = new QHBox(this); + TQHBox *hbox = new TQHBox(this); setMainWidget(hbox); hbox->setSpacing(KDialog::spacingHint()); - new QLabel(i18n("Enter a phone number:"), hbox); + new TQLabel(i18n("Enter a phone number:"), hbox); le = newLineEdit(14, hbox); le->setMinimumWidth(125); - connect(le, SIGNAL(textChanged(const QString &)), - this, SLOT(textChanged(const QString &))); + connect(le, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(textChanged(const TQString &))); le->setFocus(); textChanged(""); @@ -1224,14 +1224,14 @@ PhoneNumberDialog::PhoneNumberDialog(QWidget *parent) : KDialogBase(parent, 0, t } -QString PhoneNumberDialog::phoneNumber() { - QString s = le->text(); +TQString PhoneNumberDialog::phoneNumber() { + TQString s = le->text(); return s; } -void PhoneNumberDialog::textChanged(const QString &s) { +void PhoneNumberDialog::textChanged(const TQString &s) { enableButtonOK(s.length() > 0); } diff --git a/kppp/edit.h b/kppp/edit.h index 3b435c0b..b0412079 100644 --- a/kppp/edit.h +++ b/kppp/edit.h @@ -29,17 +29,17 @@ #ifndef _EDIT_H_ #define _EDIT_H_ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include "scriptedit.h" #include "kpppconfig.h" @@ -47,10 +47,10 @@ class IPLineEdit; -class DialWidget : public QWidget { +class DialWidget : public TQWidget { Q_OBJECT public: - DialWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 ); + DialWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 ); ~DialWidget() {} public slots: @@ -65,22 +65,22 @@ public slots: void downNumber(); private: - QLineEdit *connectname_l; - QLabel *connect_label; - QLabel *number_label; - QPushButton *pppdargs; - QComboBox *auth; - QLabel *auth_l; - QCheckBox *store_password; + TQLineEdit *connectname_l; + TQLabel *connect_label; + TQLabel *number_label; + TQPushButton *pppdargs; + TQComboBox *auth; + TQLabel *auth_l; + TQCheckBox *store_password; // callback support - QComboBox *cbtype; - QLabel *cbtype_l; - QLineEdit *cbphone; - QLabel *cbphone_l; + TQComboBox *cbtype; + TQLabel *cbtype_l; + TQLineEdit *cbphone; + TQLabel *cbphone_l; // for the phonenumber selection - QPushButton *add, *del, *up, *down; - QListBox *numbers; + TQPushButton *add, *del, *up, *down; + TQListBox *numbers; }; @@ -89,33 +89,33 @@ private: // tab-window to select what to execute when // ///////////////////////////////////////////////////////////////////////////// -class ExecWidget : public QWidget { +class ExecWidget : public TQWidget { Q_OBJECT public: - ExecWidget(QWidget *parent=0, bool isnewaccount=true, const char *name=0); + ExecWidget(TQWidget *parent=0, bool isnewaccount=true, const char *name=0); public slots: bool save(); private: - QLineEdit *before_connect; - QLabel *before_connect_l; + TQLineEdit *before_connect; + TQLabel *before_connect_l; - QLineEdit *command; - QLabel *command_label; + TQLineEdit *command; + TQLabel *command_label; - QLineEdit *predisconnect; - QLabel *predisconnect_label; + TQLineEdit *predisconnect; + TQLabel *predisconnect_label; - QLineEdit *discommand; - QLabel *discommand_label; + TQLineEdit *discommand; + TQLabel *discommand_label; }; -class IPWidget : public QWidget { +class IPWidget : public TQWidget { Q_OBJECT public: - IPWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 ); + IPWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 ); ~IPWidget() {} public slots: @@ -126,26 +126,26 @@ protected slots: void autoname_t(bool on); private: - QLabel *ipaddress_label; - QLabel *sub_label; - QGroupBox *box1; - QVGroupBox *box; + TQLabel *ipaddress_label; + TQLabel *sub_label; + TQGroupBox *box1; + TQVGroupBox *box; - QButtonGroup *rb; - QRadioButton *dynamicadd_rb; - QRadioButton *staticadd_rb; + TQButtonGroup *rb; + TQRadioButton *dynamicadd_rb; + TQRadioButton *staticadd_rb; IPLineEdit *ipaddress_l; IPLineEdit *subnetmask_l; - QCheckBox *autoname; + TQCheckBox *autoname; }; -class DNSWidget : public QWidget { +class DNSWidget : public TQWidget { Q_OBJECT public: - DNSWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 ); + DNSWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 ); ~DNSWidget() {} public slots: @@ -154,30 +154,30 @@ public slots: protected slots: void adddns(); void removedns(); - void DNS_Edit_Changed(const QString &); + void DNS_Edit_Changed(const TQString &); void DNS_Entry_Selected(int); void DNS_Mode_Selected(int); private: - QLabel *conf_label; - QButtonGroup *bg; - QRadioButton *autodns, *mandns; - QLabel *dns_label; - QLabel *servers_label; + TQLabel *conf_label; + TQButtonGroup *bg; + TQRadioButton *autodns, *mandns; + TQLabel *dns_label; + TQLabel *servers_label; IPLineEdit *dnsipaddr; - QPushButton *add; - QPushButton *remove; - QListBox *dnsservers; - QLineEdit *dnsdomain; - QLabel *dnsdomain_label; - QCheckBox *exdnsdisabled_toggle; + TQPushButton *add; + TQPushButton *remove; + TQListBox *dnsservers; + TQLineEdit *dnsdomain; + TQLabel *dnsdomain_label; + TQCheckBox *exdnsdisabled_toggle; }; -class GatewayWidget : public QWidget { +class GatewayWidget : public TQWidget { Q_OBJECT public: - GatewayWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 ); + GatewayWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 ); ~GatewayWidget() {} public slots: @@ -187,21 +187,21 @@ private slots: void hitGatewaySelect( int ); private: - QGroupBox *box; - QLabel *gate_label; - QGroupBox *box1; - QButtonGroup *rb; - QRadioButton *defaultgateway; - QRadioButton *staticgateway; + TQGroupBox *box; + TQLabel *gate_label; + TQGroupBox *box1; + TQButtonGroup *rb; + TQRadioButton *defaultgateway; + TQRadioButton *staticgateway; IPLineEdit *gatewayaddr; - QCheckBox *defaultroute; + TQCheckBox *defaultroute; }; -class ScriptWidget : public QWidget { +class ScriptWidget : public TQWidget { Q_OBJECT public: - ScriptWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 ); + ScriptWidget( TQWidget *parent=0, bool isnewaccount = true, const char *name=0 ); ~ScriptWidget() {} public slots: @@ -224,12 +224,12 @@ private: void adjustScrollBar(); ScriptEdit *se; - QPushButton *add; - QPushButton *remove; - QPushButton *insert; - QListBox *sl, *stl; + TQPushButton *add; + TQPushButton *remove; + TQPushButton *insert; + TQListBox *sl, *stl; - QScrollBar *slb; + TQScrollBar *slb; }; @@ -241,15 +241,15 @@ private: class PhoneNumberDialog : public KDialogBase { Q_OBJECT public: - PhoneNumberDialog(QWidget *parent = 0); + PhoneNumberDialog(TQWidget *parent = 0); - QString phoneNumber(); + TQString phoneNumber(); private slots: - void textChanged(const QString &); + void textChanged(const TQString &); private: - QLineEdit *le; + TQLineEdit *le; }; diff --git a/kppp/general.cpp b/kppp/general.cpp index e136a1b5..f6a88bfd 100644 --- a/kppp/general.cpp +++ b/kppp/general.cpp @@ -26,10 +26,10 @@ #include #include -#include +#include #include -#include +#include #include "general.h" #include "version.h" #include "miniterm.h" @@ -38,49 +38,49 @@ #include "devices.h" #include "pppdata.h" #include -#include -#include +#include +#include ///////////////////////////////////////////////////////////////////////////// // // Widget containing misc. configuration options // ///////////////////////////////////////////////////////////////////////////// -GeneralWidget::GeneralWidget( QWidget *parent, const char *name) - : QWidget(parent, name) +GeneralWidget::GeneralWidget( TQWidget *parent, const char *name) + : TQWidget(parent, name) { - QVBoxLayout *tl = new QVBoxLayout(parent, 0, KDialog::spacingHint()); + TQVBoxLayout *tl = new TQVBoxLayout(parent, 0, KDialog::spacingHint()); - QHBoxLayout *hbox = new QHBoxLayout(tl); - QLabel *label; - label = new QLabel(i18n("pppd version:"), parent); + TQHBoxLayout *hbox = new TQHBoxLayout(tl); + TQLabel *label; + label = new TQLabel(i18n("pppd version:"), parent); hbox->addWidget(label); - QString version = gpppdata.pppdVersion(); + TQString version = gpppdata.pppdVersion(); if(version == "0.0.0") version = "unknown"; - label = new QLabel(version, parent); - label->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); + label = new TQLabel(version, parent); + label->setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); hbox->addWidget(label); KIntNumInput *pppdTimeout = new KIntNumInput(gpppdata.pppdTimeout(), parent); pppdTimeout->setLabel(i18n("pppd &timeout:")); pppdTimeout->setRange(1, TIMEOUT_SIZE, 5, true); pppdTimeout->setSuffix(i18n(" sec")); - connect(pppdTimeout, SIGNAL(valueChanged(int)), - SLOT(pppdtimeoutchanged(int))); + connect(pppdTimeout, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(pppdtimeoutchanged(int))); tl->addWidget(pppdTimeout); - QString tmp = i18n("kppp will wait this number of seconds\n" + TQString tmp = i18n("kppp will wait this number of seconds\n" "to see if a PPP connection is established.\n" "If no connection is made in this time frame,\n" "kppp will give up and kill pppd."); - QWhatsThis::add(pppdTimeout,tmp); + TQWhatsThis::add(pppdTimeout,tmp); label->setBuddy(pppdTimeout); tl->addSpacing(10); - QCheckBox *chkBox; - chkBox = new QCheckBox(i18n("Doc&k into panel on connect"), parent); - QWhatsThis::add(chkBox, + TQCheckBox *chkBox; + chkBox = new TQCheckBox(i18n("Doc&k into panel on connect"), parent); + TQWhatsThis::add(chkBox, i18n("

    After a connection is established, the\n" "window is minimized and a small icon\n" "in the KDE panel represents this window.\n" @@ -90,50 +90,50 @@ GeneralWidget::GeneralWidget( QWidget *parent, const char *name) "size.")); chkBox->setChecked(gpppdata.get_dock_into_panel()); - connect(chkBox,SIGNAL(toggled(bool)), - this, SLOT(docking_toggled(bool))); + connect(chkBox,TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(docking_toggled(bool))); tl->addWidget(chkBox); - chkBox = new QCheckBox(i18n("A&utomatic redial on disconnect"), parent); + chkBox = new TQCheckBox(i18n("A&utomatic redial on disconnect"), parent); chkBox->setChecked(gpppdata.automatic_redial()); - connect(chkBox,SIGNAL(toggled(bool)), - this, SLOT(redial_toggled(bool))); + connect(chkBox,TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(redial_toggled(bool))); tl->addWidget(chkBox); - QWhatsThis::add(chkBox, + TQWhatsThis::add(chkBox, i18n("

    When a connection is established and\n" "it somehow gets disconnected, kppp\n" "will try to reconnect to the same account.\n" "\n" "See here for more on this topic.")); - chkBox = new QCheckBox(i18n("Automatic redial on NO &CARRIER"), parent); + chkBox = new TQCheckBox(i18n("Automatic redial on NO &CARRIER"), parent); chkBox->setChecked(gpppdata.get_redial_on_nocarrier()); - connect(chkBox,SIGNAL(toggled(bool)), - this, SLOT(nocarrier_toggled(bool))); + connect(chkBox,TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(nocarrier_toggled(bool))); tl->addWidget(chkBox); - QWhatsThis::add(chkBox, + TQWhatsThis::add(chkBox, i18n("

    When dialing if modem returns NO CARRIER\n" "the program will make a new attempt to redial\n" "instead of waiting for user to click \n" "button.")); - chkBox = new QCheckBox(i18n("&Show clock on caption"), parent); + chkBox = new TQCheckBox(i18n("&Show clock on caption"), parent); chkBox->setChecked(gpppdata.get_show_clock_on_caption()); - connect(chkBox, SIGNAL(toggled(bool)), - this, SLOT(caption_toggled(bool))); + connect(chkBox, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(caption_toggled(bool))); tl->addWidget(chkBox); - QWhatsThis::add(chkBox, + TQWhatsThis::add(chkBox, i18n("When this option is checked, the window\n" "title shows the time since a connection\n" "was established. Very useful, so you \n" "should turn this on")); - chkBox = new QCheckBox(i18n("Disco&nnect on X server shutdown"), parent); + chkBox = new TQCheckBox(i18n("Disco&nnect on X server shutdown"), parent); chkBox->setChecked(gpppdata.get_xserver_exit_disconnect()); - connect(chkBox, SIGNAL(toggled(bool)), - this, SLOT(xserver_toggled(bool))); + connect(chkBox, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(xserver_toggled(bool))); tl->addWidget(chkBox); - QWhatsThis::add(chkBox, + TQWhatsThis::add(chkBox, i18n("

    Checking this option will close any\n" "open connection when the X-server is\n" "shut down. You should enable this option\n" @@ -141,21 +141,21 @@ GeneralWidget::GeneralWidget( QWidget *parent, const char *name) "\n" "See here for more on this.")); - chkBox = new QCheckBox(i18n("&Quit on disconnect"), parent); + chkBox = new TQCheckBox(i18n("&Quit on disconnect"), parent); chkBox->setChecked(gpppdata.quit_on_disconnect()); - connect(chkBox, SIGNAL(toggled(bool)), - this, SLOT(quit_toggled(bool))); + connect(chkBox, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(quit_toggled(bool))); tl->addWidget(chkBox); - QWhatsThis::add(chkBox, + TQWhatsThis::add(chkBox, i18n("When this option is turned on, kppp\n" "will be closed when you disconnect")); - chkBox = new QCheckBox(i18n("Minimi&ze window on connect"), parent); + chkBox = new TQCheckBox(i18n("Minimi&ze window on connect"), parent); chkBox->setChecked(gpppdata.get_iconify_on_connect()); - connect(chkBox,SIGNAL(toggled(bool)), - this,SLOT(iconify_toggled(bool))); + connect(chkBox,TQT_SIGNAL(toggled(bool)), + this,TQT_SLOT(iconify_toggled(bool))); tl->addWidget(chkBox); - QWhatsThis::add(chkBox, + TQWhatsThis::add(chkBox, i18n("Iconifies kppp's window when a\n" "connection is established")); @@ -203,28 +203,28 @@ void GeneralWidget::pppdtimeoutchanged(int n) { } -ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name) - : QWidget(parent, name) +ModemWidget::ModemWidget(TQWidget *parent, bool isnewmodem, const char *name) + : TQWidget(parent, name) { - QGridLayout *tl = new QGridLayout(parent, 9, 2, 0, KDialog::spacingHint()); + TQGridLayout *tl = new TQGridLayout(parent, 9, 2, 0, KDialog::spacingHint()); - connect_label = new QLabel(i18n("Modem &name:"), parent); + connect_label = new TQLabel(i18n("Modem &name:"), parent); tl->addWidget(connect_label, 0, 0); - connectname_l = new QLineEdit(parent); + connectname_l = new TQLineEdit(parent); connectname_l->setMaxLength(ACCNAME_SIZE); connect_label->setBuddy(connectname_l); tl->addWidget(connectname_l, 0, 1); - QString tmp = i18n("Type in a unique name for this modem"); + TQString tmp = i18n("Type in a unique name for this modem"); - QWhatsThis::add(connect_label,tmp); - QWhatsThis::add(connectname_l,tmp); + TQWhatsThis::add(connect_label,tmp); + TQWhatsThis::add(connectname_l,tmp); - label1 = new QLabel(i18n("Modem de&vice:"), parent); + label1 = new TQLabel(i18n("Modem de&vice:"), parent); tl->addWidget(label1, 1, 0); - modemdevice = new QComboBox(false, parent); + modemdevice = new TQComboBox(false, parent); label1->setBuddy(modemdevice); // ### deviceExist mechanism not functional right now bool deviceExist = false; @@ -238,8 +238,8 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name) modemdevice->insertItem(gpppdata.modemDevice()); tl->addWidget(modemdevice, 1, 1); -/* connect(modemdevice, SIGNAL(activated(int)), - SLOT(setmodemdc(int)));*/ +/* connect(modemdevice, TQT_SIGNAL(activated(int)), + TQT_SLOT(setmodemdc(int)));*/ tmp = i18n("This specifies the serial port your modem is attached \n" "to. On Linux/x86, typically this is either /dev/ttyS0 \n" "(COM1 under DOS) or /dev/ttyS1 (COM2 under DOS).\n" @@ -248,14 +248,14 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name) "emulation (most cards under Linux support this), you\n" "should select one of the /dev/ttyIx devices."); - QWhatsThis::add(label1,tmp); - QWhatsThis::add(modemdevice,tmp); + TQWhatsThis::add(label1,tmp); + TQWhatsThis::add(modemdevice,tmp); - label2 = new QLabel(i18n("&Flow control:"), parent); + label2 = new TQLabel(i18n("&Flow control:"), parent); tl->addWidget(label2, 2, 0); - flowcontrol = new QComboBox(false, parent); + flowcontrol = new TQComboBox(false, parent); label2->setBuddy(flowcontrol); flowcontrol->insertItem(i18n("Hardware [CRTSCTS]")); // sync with pppdata.cpp flowcontrol->insertItem(i18n("Software [XON/XOFF]")); @@ -266,8 +266,8 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name) flowListItem << "None"; tl->addWidget(flowcontrol, 2, 1); - /*connect(flowcontrol, SIGNAL(activated(int)), - SLOT(setflowcontrol(int)));*/ + /*connect(flowcontrol, TQT_SIGNAL(activated(int)), + TQT_SLOT(setflowcontrol(int)));*/ tmp = i18n("

    Specifies how the serial port and modem\n" "communicate. You should not change this unless\n" @@ -275,19 +275,19 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name) "\n" "Default: CRTSCTS"); - QWhatsThis::add(label2,tmp); - QWhatsThis::add(flowcontrol,tmp); + TQWhatsThis::add(label2,tmp); + TQWhatsThis::add(flowcontrol,tmp); - labelenter = new QLabel(i18n("&Line termination:"), parent); + labelenter = new TQLabel(i18n("&Line termination:"), parent); tl->addWidget(labelenter, 3, 0); - enter = new QComboBox(false, parent); + enter = new TQComboBox(false, parent); labelenter->setBuddy(enter); enter->insertItem("CR"); enter->insertItem("LF"); enter->insertItem("CR/LF"); tl->addWidget(enter, 3, 1); - /* connect(enter, SIGNAL(activated(int)), SLOT(setenter(int)));*/ + /* connect(enter, TQT_SIGNAL(activated(int)), TQT_SLOT(setenter(int)));*/ tmp = i18n("

    Specifies how AT commands are sent to your\n" "modem. Most modems will work fine with the\n" "default CR/LF. If your modem does not react\n" @@ -296,12 +296,12 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name) "\n" "Default: CR/LF"); - QWhatsThis::add(labelenter,tmp); - QWhatsThis::add(enter, tmp); + TQWhatsThis::add(labelenter,tmp); + TQWhatsThis::add(enter, tmp); - baud_label = new QLabel(i18n("Co&nnection speed:"), parent); + baud_label = new TQLabel(i18n("Co&nnection speed:"), parent); tl->addWidget(baud_label, 4, 0); - baud_c = new QComboBox(parent); + baud_c = new TQComboBox(parent); baud_label->setBuddy(baud_c); static const char *baudrates[] = { @@ -336,8 +336,8 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name) baud_c->insertItem(baudrates[k]); baud_c->setCurrentItem(3); - /*connect(baud_c, SIGNAL(activated(int)), - this, SLOT(speed_selection(int)));*/ + /*connect(baud_c, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(speed_selection(int)));*/ tl->addWidget(baud_c, 4, 1); tmp = i18n("Specifies the speed your modem and the serial\n" @@ -347,8 +347,8 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name) "If you have connection problems, try to reduce\n" "this value."); - QWhatsThis::add(baud_label,tmp); - QWhatsThis::add(baud_c,tmp); + TQWhatsThis::add(baud_label,tmp); + TQWhatsThis::add(baud_c,tmp); for(int i=0; i <= enter->count()-1; i++) { if(gpppdata.enter() == enter->text(i)) @@ -358,14 +358,14 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name) tl->addRowSpacing(4, 10); //Modem Lock File - modemlockfile = new QCheckBox(i18n("&Use lock file"), parent); + modemlockfile = new TQCheckBox(i18n("&Use lock file"), parent); modemlockfile->setChecked(gpppdata.modemLockFile()); -/* connect(modemlockfile, SIGNAL(toggled(bool)), - SLOT(modemlockfilechanged(bool)));*/ +/* connect(modemlockfile, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(modemlockfilechanged(bool)));*/ tl->addMultiCellWidget(modemlockfile, 5, 5, 0, 1); // l12->addStretch(1); - QWhatsThis::add(modemlockfile, + TQWhatsThis::add(modemlockfile, i18n("

    To prevent other programs from accessing the\n" "modem while a connection is established, a\n" "file can be created to indicate that the modem\n" @@ -382,11 +382,11 @@ ModemWidget::ModemWidget(QWidget *parent, bool isnewmodem, const char *name) modemtimeout->setLabel(i18n("Modem &timeout:")); modemtimeout->setRange(1, 120, 1); modemtimeout->setSuffix(i18n(" sec")); -/* connect(modemtimeout, SIGNAL(valueChanged(int)), - SLOT(modemtimeoutchanged(int)));*/ +/* connect(modemtimeout, TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(modemtimeoutchanged(int)));*/ tl->addMultiCellWidget(modemtimeout, 6, 6, 0, 1); - QWhatsThis::add(modemtimeout, + TQWhatsThis::add(modemtimeout, i18n("This specifies how long kppp waits for a\n" "CONNECT response from your modem. The\n" "recommended value is 30 seconds.")); @@ -445,17 +445,17 @@ bool ModemWidget::save() } -ModemWidget2::ModemWidget2(QWidget *parent, const char *name) - : QWidget(parent, name) +ModemWidget2::ModemWidget2(TQWidget *parent, const char *name) + : TQWidget(parent, name) { - QVBoxLayout *l1 = new QVBoxLayout(parent, 0, KDialog::spacingHint()); + TQVBoxLayout *l1 = new TQVBoxLayout(parent, 0, KDialog::spacingHint()); - waitfordt = new QCheckBox(i18n("&Wait for dial tone before dialing"), parent); + waitfordt = new TQCheckBox(i18n("&Wait for dial tone before dialing"), parent); waitfordt->setChecked(gpppdata.waitForDialTone()); - // connect(waitfordt, SIGNAL(toggled(bool)), SLOT(waitfordtchanged(bool))); + // connect(waitfordt, TQT_SIGNAL(toggled(bool)), TQT_SLOT(waitfordtchanged(bool))); l1->addWidget(waitfordt); - QWhatsThis::add(waitfordt, + TQWhatsThis::add(waitfordt, i18n("

    Normally the modem waits for a dial tone\n" "from your phone line, indicating that it can\n" "start to dial a number. If your modem does not\n" @@ -468,10 +468,10 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name) busywait->setLabel(i18n("B&usy wait:")); busywait->setRange(0, 300, 5, true); busywait->setSuffix(i18n(" sec")); - // connect(busywait, SIGNAL(valueChanged(int)), SLOT(busywaitchanged(int))); + // connect(busywait, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(busywaitchanged(int))); l1->addWidget(busywait); - QWhatsThis::add(busywait, + TQWhatsThis::add(busywait, i18n("Specifies the number of seconds to wait before\n" "redial if all dialed numbers are busy. This is\n" "necessary because some modems get stuck if the\n" @@ -482,21 +482,21 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name) l1->addSpacing(10); - QHBoxLayout *hbl = new QHBoxLayout; + TQHBoxLayout *hbl = new QHBoxLayout; hbl->setSpacing(KDialog::spacingHint()); - QLabel *volumeLabel = new QLabel(i18n("Modem &volume:"), parent); + TQLabel *volumeLabel = new TQLabel(i18n("Modem &volume:"), parent); hbl->addWidget(volumeLabel); - volume = new QSlider(0, 2, 1, gpppdata.volume(), QSlider::Horizontal, parent); + volume = new TQSlider(0, 2, 1, gpppdata.volume(), TQSlider::Horizontal, parent); volumeLabel->setBuddy(volume); - volume->setTickmarks(QSlider::Below); + volume->setTickmarks(TQSlider::Below); hbl->addWidget(volume); l1->addLayout(hbl); - /* connect(volume, SIGNAL(valueChanged(int)), - this, SLOT(volumeChanged(int)));*/ - QString tmp = i18n("Most modems have a speaker which makes\n" + /* connect(volume, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(volumeChanged(int)));*/ + TQString tmp = i18n("Most modems have a speaker which makes\n" "a lot of noise when dialing. Here you can\n" "either turn this completely off or select a\n" "lower volume.\n" @@ -504,20 +504,20 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name) "If this does not work for your modem,\n" "you must modify the modem volume command."); - QWhatsThis::add(volumeLabel,tmp); - QWhatsThis::add(volume, tmp); + TQWhatsThis::add(volumeLabel,tmp); + TQWhatsThis::add(volume, tmp); l1->addSpacing(20); #if 0 - chkbox1 = new QCheckBox(i18n("Modem asserts CD line"), parent); + chkbox1 = new TQCheckBox(i18n("Modem asserts CD line"), parent); chkbox1->setChecked(gpppdata.UseCDLine()); - connect(chkbox1,SIGNAL(toggled(bool)), - this,SLOT(use_cdline_toggled(bool))); + connect(chkbox1,TQT_SIGNAL(toggled(bool)), + this,TQT_SLOT(use_cdline_toggled(bool))); l12->addWidget(chkbox1); l12->addStretch(1); l1->addStretch(1); - QWhatsThis::add(chkbox1, + TQWhatsThis::add(chkbox1, i18n("This controls how kppp detects that the modem\n" "is not responding. Unless you are having\n" "problems with this, do not modify this setting.\n" @@ -525,13 +525,13 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name) "Default: Off")); #endif - modemcmds = new QPushButton(i18n("Mod&em Commands..."), parent); - QWhatsThis::add(modemcmds, + modemcmds = new TQPushButton(i18n("Mod&em Commands..."), parent); + TQWhatsThis::add(modemcmds, i18n("Allows you to change the AT command for\n" "your modem.")); - modeminfo_button = new QPushButton(i18n("&Query Modem..."), parent); - QWhatsThis::add(modeminfo_button, + modeminfo_button = new TQPushButton(i18n("&Query Modem..."), parent); + TQWhatsThis::add(modeminfo_button, i18n("Most modems support the ATI command set to\n" "find out vendor and revision of your modem.\n" "\n" @@ -539,16 +539,16 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name) "this information. It can be useful to help\n" "you set up the modem")); - terminal_button = new QPushButton(i18n("&Terminal..."), parent); - QWhatsThis::add(terminal_button, + terminal_button = new TQPushButton(i18n("&Terminal..."), parent); + TQWhatsThis::add(terminal_button, i18n("Opens the built-in terminal program. You\n" "can use this if you want to play around\n" "with your modem's AT command set")); - QHBoxLayout *hbox = new QHBoxLayout(); + TQHBoxLayout *hbox = new TQHBoxLayout(); l1->addLayout(hbox); hbox->addStretch(1); - QVBoxLayout *vbox = new QVBoxLayout(); + TQVBoxLayout *vbox = new TQVBoxLayout(); hbox->addLayout(vbox); vbox->addWidget(modemcmds); @@ -558,12 +558,12 @@ ModemWidget2::ModemWidget2(QWidget *parent, const char *name) hbox->addStretch(1); l1->addStretch(1); - connect(modemcmds, SIGNAL(clicked()), - SLOT(modemcmdsbutton())); - connect(modeminfo_button, SIGNAL(clicked()), - SLOT(query_modem())); - connect(terminal_button, SIGNAL(clicked()), - SLOT(terminal())); + connect(modemcmds, TQT_SIGNAL(clicked()), + TQT_SLOT(modemcmdsbutton())); + connect(modeminfo_button, TQT_SIGNAL(clicked()), + TQT_SLOT(query_modem())); + connect(terminal_button, TQT_SIGNAL(clicked()), + TQT_SLOT(terminal())); // Create the Modem Command so if the window is not opened they are autosaved anyway mc = new ModemCommands(this); @@ -607,55 +607,55 @@ bool ModemWidget2::save() // Setup widget for the graph // ///////////////////////////////////////////////////////////////////////////// -GraphSetup::GraphSetup(QWidget *parent, const char *name) : - QWidget(parent, name) +GraphSetup::GraphSetup(TQWidget *parent, const char *name) : + TQWidget(parent, name) { - QVBoxLayout *tl = new QVBoxLayout(parent); + TQVBoxLayout *tl = new TQVBoxLayout(parent); bool enable; - QColor bg, text, in, out; + TQColor bg, text, in, out; gpppdata.graphingOptions(enable, bg, text, in, out); - enable_check = new QCheckBox(i18n("&Enable throughput graph"), parent); + enable_check = new TQCheckBox(i18n("&Enable throughput graph"), parent); tl->addWidget(enable_check); - grpColor = new QGroupBox(2, Qt::Horizontal, + grpColor = new TQGroupBox(2, Qt::Horizontal, i18n("Graph Colors"), parent); tl->addWidget(grpColor); - QLabel *label; + TQLabel *label; - label = new QLabel(i18n("Bac&kground:"), grpColor); + label = new TQLabel(i18n("Bac&kground:"), grpColor); bg_color = new KColorButton(bg, grpColor); bg_color->setFixedSize(80, 24); label->setBuddy(bg_color); - label = new QLabel(i18n("&Text:"), grpColor); + label = new TQLabel(i18n("&Text:"), grpColor); text_color = new KColorButton(text, grpColor); text_color->setFixedSize(80, 24); label->setBuddy(text_color); - label = new QLabel(i18n("I&nput bytes:"), grpColor); + label = new TQLabel(i18n("I&nput bytes:"), grpColor); in_color = new KColorButton(in, grpColor); in_color->setFixedSize(80, 24); label->setBuddy(in_color); - label = new QLabel(i18n("O&utput bytes:"), grpColor); + label = new TQLabel(i18n("O&utput bytes:"), grpColor); out_color = new KColorButton(out, grpColor); out_color->setFixedSize(80, 24); label->setBuddy(out_color); tl->addStretch(); - connect(enable_check, SIGNAL(toggled(bool)), this, SLOT(enableToggled(bool))); - connect(bg_color, SIGNAL(changed(const QColor &)), - SLOT(colorChanged(const QColor&))); - connect(text_color, SIGNAL(changed(const QColor &)), - SLOT(colorChanged(const QColor&))); - connect(in_color, SIGNAL(changed(const QColor &)), - SLOT(colorChanged(const QColor&))); - connect(out_color, SIGNAL(changed(const QColor &)), - SLOT(colorChanged(const QColor&))); + connect(enable_check, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableToggled(bool))); + connect(bg_color, TQT_SIGNAL(changed(const TQColor &)), + TQT_SLOT(colorChanged(const TQColor&))); + connect(text_color, TQT_SIGNAL(changed(const TQColor &)), + TQT_SLOT(colorChanged(const TQColor&))); + connect(in_color, TQT_SIGNAL(changed(const TQColor &)), + TQT_SLOT(colorChanged(const TQColor&))); + connect(out_color, TQT_SIGNAL(changed(const TQColor &)), + TQT_SLOT(colorChanged(const TQColor&))); tl->activate(); @@ -669,7 +669,7 @@ void GraphSetup::enableToggled(bool b) { } -void GraphSetup::colorChanged(const QColor &) { +void GraphSetup::colorChanged(const TQColor &) { save(); } diff --git a/kppp/general.h b/kppp/general.h index 9fc22105..29d77738 100644 --- a/kppp/general.h +++ b/kppp/general.h @@ -25,22 +25,22 @@ #ifndef _GENERAL_H_ #define _GENERAL_H_ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include class QSlider; class KIntNumInput; class ModemCommands; -class GeneralWidget : public QWidget { +class GeneralWidget : public TQWidget { Q_OBJECT public: - GeneralWidget( QWidget *parent=0, const char *name=0 ); + GeneralWidget( TQWidget *parent=0, const char *name=0 ); private slots: void pppdtimeoutchanged(int); @@ -55,39 +55,39 @@ private slots: }; -class ModemWidget : public QWidget { +class ModemWidget : public TQWidget { Q_OBJECT public: - ModemWidget(QWidget *parent=0, bool isnewmodem=true, const char *name=0); + ModemWidget(TQWidget *parent=0, bool isnewmodem=true, const char *name=0); bool save(); - QLineEdit *connectName() { return connectname_l;} + TQLineEdit *connectName() { return connectname_l;} private slots: private: - QLineEdit *connectname_l; - QLabel *connect_label; + TQLineEdit *connectname_l; + TQLabel *connect_label; - QComboBox *enter; - QLabel *label1; - QLabel *label2; - QLabel *labeltmp; - QLabel *labelenter; - QComboBox *modemdevice; - QComboBox *flowcontrol; + TQComboBox *enter; + TQLabel *label1; + TQLabel *label2; + TQLabel *labeltmp; + TQLabel *labelenter; + TQComboBox *modemdevice; + TQComboBox *flowcontrol; - QComboBox *baud_c; - QLabel *baud_label; + TQComboBox *baud_c; + TQLabel *baud_label; KIntNumInput *modemtimeout; - QCheckBox *modemlockfile; - QStringList flowListItem; + TQCheckBox *modemlockfile; + TQStringList flowListItem; }; -class ModemWidget2 : public QWidget { +class ModemWidget2 : public TQWidget { Q_OBJECT public: - ModemWidget2(QWidget *parent=0, const char *name=0); + ModemWidget2(TQWidget *parent=0, const char *name=0); bool save(); private slots: @@ -97,33 +97,33 @@ private slots: void query_modem(); private: - QLabel *labeltmp; - QPushButton *modemcmds; - QPushButton *modeminfo_button; - QPushButton *terminal_button; - QFrame *fline; - QCheckBox *waitfordt; + TQLabel *labeltmp; + TQPushButton *modemcmds; + TQPushButton *modeminfo_button; + TQPushButton *terminal_button; + TQFrame *fline; + TQCheckBox *waitfordt; KIntNumInput *busywait; - QCheckBox *chkbox1; - QSlider *volume; + TQCheckBox *chkbox1; + TQSlider *volume; ModemCommands* mc; }; -class GraphSetup : public QWidget { +class GraphSetup : public TQWidget { Q_OBJECT public: - GraphSetup(QWidget *parent = 0, const char *name = 0); + GraphSetup(TQWidget *parent = 0, const char *name = 0); private slots: void enableToggled(bool); - void colorChanged(const QColor &); + void colorChanged(const TQColor &); private: void save(); - QGroupBox *grpColor; - QCheckBox *enable_check; + TQGroupBox *grpColor; + TQCheckBox *enable_check; KColorButton *bg_color; KColorButton *text_color; diff --git a/kppp/iplined.cpp b/kppp/iplined.cpp index f63c446f..197b13a6 100644 --- a/kppp/iplined.cpp +++ b/kppp/iplined.cpp @@ -26,17 +26,17 @@ #include "iplined.h" -IPLineEdit::IPLineEdit( QWidget *parent, const char *name ) +IPLineEdit::IPLineEdit( TQWidget *parent, const char *name ) : KRestrictedLine(parent, name, "0123456789.") { setMaxLength(3 * 4 + 1 * 3); } -QSize IPLineEdit::sizeHint() const { - QFontMetrics fm = fontMetrics(); +TQSize IPLineEdit::sizeHint() const { + TQFontMetrics fm = fontMetrics(); - QSize s; - s.setHeight(QLineEdit::sizeHint().height()); + TQSize s; + s.setHeight(TQLineEdit::sizeHint().height()); s.setWidth(fm.boundingRect("888.888.888.888XX").width()); return s; } diff --git a/kppp/iplined.h b/kppp/iplined.h index 24517e46..b978b6f5 100644 --- a/kppp/iplined.h +++ b/kppp/iplined.h @@ -31,10 +31,10 @@ class IPLineEdit : public KRestrictedLine { public: - IPLineEdit( QWidget *parent=0, const char *name=0 ); + IPLineEdit( TQWidget *parent=0, const char *name=0 ); ~IPLineEdit() {} - virtual QSize sizeHint() const; + virtual TQSize sizeHint() const; }; #endif diff --git a/kppp/kpppwidget.cpp b/kppp/kpppwidget.cpp index 9572efbf..2006489e 100644 --- a/kppp/kpppwidget.cpp +++ b/kppp/kpppwidget.cpp @@ -24,16 +24,16 @@ #include "kpppwidget.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include +#include #include #include @@ -74,8 +74,8 @@ extern KPPPWidget *p_kppp; -KPPPWidget::KPPPWidget( QWidget *parent, const char *name ) - : DCOPObject( "KpppIface" ), QWidget(parent, name) +KPPPWidget::KPPPWidget( TQWidget *parent, const char *name ) + : DCOPObject( "KpppIface" ), TQWidget(parent, name) , acct(0) , m_bCmdlAccount (false) , m_bCmdlModem (false) @@ -90,45 +90,45 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name ) installEventFilter(this); - QVBoxLayout *tl = new QVBoxLayout(this, 10, 10); + TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10); - l1 = new QGridLayout(4, 4); + l1 = new TQGridLayout(4, 4); tl->addLayout(l1); l1->addColSpacing(0, 10); l1->addColSpacing(3, 10); l1->setColStretch(1, 3); l1->setColStretch(2, 4); - label1 = new QLabel(i18n("C&onnect to: "), this); + label1 = new TQLabel(i18n("C&onnect to: "), this); l1->addWidget(label1, 0, 1); - connectto_c = new QComboBox(false, this); + connectto_c = new TQComboBox(false, this); label1->setBuddy(connectto_c); - connect(connectto_c, SIGNAL(activated(int)), - SLOT(newdefaultaccount(int))); + connect(connectto_c, TQT_SIGNAL(activated(int)), + TQT_SLOT(newdefaultaccount(int))); l1->addWidget(connectto_c, 0, 2); - label7 = new QLabel(i18n("Use &modem: "), this); + label7 = new TQLabel(i18n("Use &modem: "), this); // l1->addWidget(label7, 1, 1); (done in resetmodems()) - modem_c = new QComboBox(false, this); + modem_c = new TQComboBox(false, this); label7->setBuddy(connectto_c); m_bModemCShown = false; - connect(modem_c, SIGNAL(activated(int)), - SLOT(newdefaultmodem(int))); + connect(modem_c, TQT_SIGNAL(activated(int)), + TQT_SLOT(newdefaultmodem(int))); // l1->addWidget(modem_c, 1, 2); (done in resetmodems()) - ID_Label = new QLabel(i18n("&Login ID:"), this); + ID_Label = new TQLabel(i18n("&Login ID:"), this); l1->addWidget(ID_Label, 2, 1); // the entry line for usernames - ID_Edit = new QLineEdit(this); + ID_Edit = new TQLineEdit(this); ID_Label->setBuddy(ID_Edit); l1->addWidget(ID_Edit, 2, 2); - connect(ID_Edit, SIGNAL(returnPressed()), - this, SLOT(enterPressedInID())); - QString tmp = i18n("

    Type in the username that you got from your\n" + connect(ID_Edit, TQT_SIGNAL(returnPressed()), + this, TQT_SLOT(enterPressedInID())); + TQString tmp = i18n("

    Type in the username that you got from your\n" "ISP. This is especially important for PAP\n" "and CHAP. You may omit this when you use\n" "terminal-based or script-based authentication.\n" @@ -136,18 +136,18 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name ) "Important: case is important here:\n" "myusername is not the same as MyUserName."); - QWhatsThis::add(ID_Label,tmp); - QWhatsThis::add(ID_Edit,tmp); + TQWhatsThis::add(ID_Label,tmp); + TQWhatsThis::add(ID_Edit,tmp); - PW_Label = new QLabel(i18n("&Password:"), this); + PW_Label = new TQLabel(i18n("&Password:"), this); l1->addWidget(PW_Label, 3, 1); - PW_Edit= new QLineEdit(this); + PW_Edit= new TQLineEdit(this); PW_Label->setBuddy(PW_Edit); - PW_Edit->setEchoMode(QLineEdit::Password); + PW_Edit->setEchoMode(TQLineEdit::Password); l1->addWidget(PW_Edit, 3, 2); - connect(PW_Edit, SIGNAL(returnPressed()), - this, SLOT(enterPressedInPW())); + connect(PW_Edit, TQT_SIGNAL(returnPressed()), + this, TQT_SLOT(enterPressedInPW())); tmp = i18n("

    Type in the password that you got from your\n" "ISP. This is especially important for PAP\n" @@ -157,21 +157,21 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name ) "Important: case is important here:\n" "mypassword is not the same as MyPassword."); - QWhatsThis::add(PW_Label,tmp); - QWhatsThis::add(PW_Edit,tmp); + TQWhatsThis::add(PW_Label,tmp); + TQWhatsThis::add(PW_Edit,tmp); - QHBoxLayout *l3 = new QHBoxLayout; + TQHBoxLayout *l3 = new QHBoxLayout; tl->addSpacing(5); tl->addLayout(l3); tl->addSpacing(5); l3->addSpacing(10); - log = new QCheckBox(i18n("Show lo&g window"), this); - connect(log, SIGNAL(toggled(bool)), - this, SLOT(log_window_toggled(bool))); + log = new TQCheckBox(i18n("Show lo&g window"), this); + connect(log, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(log_window_toggled(bool))); log->setChecked(gpppdata.get_show_log_window()); l3->addWidget(log); - QWhatsThis::add(log, + TQWhatsThis::add(log, i18n("

    This controls whether a log window is shown.\n" "A log window shows the communication between\n" "kppp and your modem. This will help you\n" @@ -183,17 +183,17 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name ) fline = new KSeparator( KSeparator::HLine, this); tl->addWidget(fline); - QHBoxLayout *l2 = new QHBoxLayout; + TQHBoxLayout *l2 = new QHBoxLayout; tl->addLayout(l2); int minw = 0; quit_b = new KPushButton(KStdGuiItem::quit(), this); - connect( quit_b, SIGNAL(clicked()), SLOT(quitbutton())); + connect( quit_b, TQT_SIGNAL(clicked()), TQT_SLOT(quitbutton())); if(quit_b->sizeHint().width() > minw) minw = quit_b->sizeHint().width(); setup_b = new KPushButton(KGuiItem(i18n("Co&nfigure..."), "configure"), this); - connect( setup_b, SIGNAL(clicked()), SLOT(expandbutton())); + connect( setup_b, TQT_SIGNAL(clicked()), TQT_SLOT(expandbutton())); if(setup_b->sizeHint().width() > minw) minw = setup_b->sizeHint().width(); @@ -201,18 +201,18 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name ) setup_b->setEnabled(false); help_b = new KPushButton(KStdGuiItem::help(), this); - connect( help_b, SIGNAL(clicked()), SLOT(helpbutton())); + connect( help_b, TQT_SIGNAL(clicked()), TQT_SLOT(helpbutton())); KHelpMenu *helpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData(), true); - help_b->setPopup((QPopupMenu*)helpMenu->menu()); + help_b->setPopup((TQPopupMenu*)helpMenu->menu()); if(help_b->sizeHint().width() > minw) minw = help_b->sizeHint().width(); - connect_b = new QPushButton(i18n("&Connect"), this); + connect_b = new TQPushButton(i18n("&Connect"), this); connect_b->setDefault(true); connect_b->setFocus(); - connect(connect_b, SIGNAL(clicked()), SLOT(beginConnect())); + connect(connect_b, TQT_SIGNAL(clicked()), TQT_SLOT(beginConnect())); if(connect_b->sizeHint().width() > minw) minw = connect_b->sizeHint().width(); @@ -233,7 +233,7 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name ) // we also connect cmld_start to the beginConnect so that I can run // the dialer through a command line argument - connect(this,SIGNAL(cmdl_start()),this,SLOT(beginConnect())); + connect(this,TQT_SIGNAL(cmdl_start()),this,TQT_SLOT(beginConnect())); stats = new PPPStats; @@ -256,28 +256,28 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name ) resetmodems(); con = new ConnectWidget(0, "con", stats); KWin::setIcons(con->winId(), kapp->icon(), kapp->miniIcon() ); - connect(this, SIGNAL(begin_connect()),con, SLOT(preinit())); + connect(this, TQT_SIGNAL(begin_connect()),con, TQT_SLOT(preinit())); - QRect desk = KGlobalSettings::desktopGeometry(topLevelWidget()); + TQRect desk = KGlobalSettings::desktopGeometry(topLevelWidget()); con->setGeometry(desk.center().x()-175, desk.center().y()-55, 350,110); // connect the ConnectWidgets various signals - connect(con, SIGNAL(closeDebugWindow()), - debugwindow, SLOT(hide())); - connect(con, SIGNAL(debugMessage(const QString &)), - debugwindow, SLOT(statusLabel(const QString &))); - connect(con, SIGNAL(toggleDebugWindow()), - debugwindow, SLOT(toggleVisibility())); - connect(con, SIGNAL(debugPutChar(unsigned char)), - debugwindow, SLOT(addChar(unsigned char))); - connect(con, SIGNAL(startAccounting()), - this, SLOT(startAccounting())); - connect(con, SIGNAL(stopAccounting()), - this, SLOT(stopAccounting())); - connect(KApplication::kApplication(), SIGNAL(saveYourself()), - this, SLOT(saveMyself())); - connect(KApplication::kApplication(), SIGNAL(shutDown()), - this, SLOT(shutDown())); + connect(con, TQT_SIGNAL(closeDebugWindow()), + debugwindow, TQT_SLOT(hide())); + connect(con, TQT_SIGNAL(debugMessage(const TQString &)), + debugwindow, TQT_SLOT(statusLabel(const TQString &))); + connect(con, TQT_SIGNAL(toggleDebugWindow()), + debugwindow, TQT_SLOT(toggleVisibility())); + connect(con, TQT_SIGNAL(debugPutChar(unsigned char)), + debugwindow, TQT_SLOT(addChar(unsigned char))); + connect(con, TQT_SIGNAL(startAccounting()), + this, TQT_SLOT(startAccounting())); + connect(con, TQT_SIGNAL(stopAccounting()), + this, TQT_SLOT(stopAccounting())); + connect(KApplication::kApplication(), TQT_SIGNAL(saveYourself()), + this, TQT_SLOT(saveMyself())); + connect(KApplication::kApplication(), TQT_SIGNAL(shutDown()), + this, TQT_SLOT(shutDown())); debugwindow->setGeometry(desk.center().x()+190, desk.center().y()-55, debugwindow->width(),debugwindow->height()); @@ -304,7 +304,7 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name ) if(m_bCmdlModem){ bool result = gpppdata.setModem(m_strCmdlModem); if (!result){ - QString string; + TQString string; string = i18n("No such Modem:\n%1\nFalling back to default").arg(m_strCmdlModem); KMessageBox::error(this, string); m_bCmdlModem = false; @@ -314,7 +314,7 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name ) if(m_bCmdlAccount){ bool result = gpppdata.setAccount(m_strCmdlAccount); if (!result){ - QString string; + TQString string; string = i18n("No such Account:\n%1").arg(m_strCmdlAccount); KMessageBox::error(this, string); m_bCmdlAccount = false; @@ -341,8 +341,8 @@ KPPPWidget::KPPPWidget( QWidget *parent, const char *name ) // this timer will delay the actual disconnection DISCONNECTION_DELAY ms // to give applications time to shutdown, logout, whatever.. - disconnectTimer = new QTimer(this); - connect(disconnectTimer, SIGNAL(timeout()), this, SLOT(delayedDisconnect())); + disconnectTimer = new TQTimer(this); + connect(disconnectTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(delayedDisconnect())); } KPPPWidget::~KPPPWidget() @@ -350,8 +350,8 @@ KPPPWidget::~KPPPWidget() delete stats; } -bool KPPPWidget::eventFilter(QObject *o, QEvent *e) { - if(e->type() == QEvent::User) { +bool KPPPWidget::eventFilter(TQObject *o, TQEvent *e) { + if(e->type() == TQEvent::User) { switch(((SignalEvent*)e)->sigType()) { case SIGINT: kdDebug(5002) << "Received a SIGINT" << endl; @@ -368,8 +368,8 @@ bool KPPPWidget::eventFilter(QObject *o, QEvent *e) { } if(o == connect_b) { - if(e->type() == QEvent::KeyPress) { - if(connect_b->hasFocus() && ((QKeyEvent *)e)->key() == Qt::Key_Return) { + if(e->type() == TQEvent::KeyPress) { + if(connect_b->hasFocus() && ((TQKeyEvent *)e)->key() == Qt::Key_Return) { beginConnect(); return true; } @@ -391,16 +391,16 @@ void KPPPWidget::prepareSetupDialog() { // tabWindow->setFixedSize( 365, 375 ); accounts = new AccountWidget(tabWindow->addPage( i18n("&Accounts"), i18n("Account Setup") ) ); - connect(accounts, SIGNAL(resetaccounts()), - this, SLOT(resetaccounts())); - connect(accounts, SIGNAL(resetCosts(const QString &)), - this, SLOT(resetCosts(const QString &))); - connect(accounts, SIGNAL(resetVolume(const QString &)), - this, SLOT(resetVolume(const QString &))); + connect(accounts, TQT_SIGNAL(resetaccounts()), + this, TQT_SLOT(resetaccounts())); + connect(accounts, TQT_SIGNAL(resetCosts(const TQString &)), + this, TQT_SLOT(resetCosts(const TQString &))); + connect(accounts, TQT_SIGNAL(resetVolume(const TQString &)), + this, TQT_SLOT(resetVolume(const TQString &))); modems = new ModemsWidget(tabWindow->addPage( i18n("&Modems"), i18n("Modems Setup") ) ); - connect(modems, SIGNAL(resetmodems()), - this, SLOT(resetmodems())); + connect(modems, TQT_SIGNAL(resetmodems()), + this, TQT_SLOT(resetmodems())); graph = new GraphSetup( tabWindow->addPage( i18n("&Graph"), i18n("Throughput Graph" ) ) ); general = new GeneralWidget( tabWindow->addPage( i18n("M&isc"), i18n("Miscellaneous Settings") ) ); @@ -476,11 +476,11 @@ void KPPPWidget::resetaccounts() { PW_Edit->setText(gpppdata.storedPassword()); } - connect(ID_Edit, SIGNAL(textChanged(const QString &)), - this, SLOT(usernameChanged(const QString &))); + connect(ID_Edit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(usernameChanged(const TQString &))); - connect(PW_Edit, SIGNAL(textChanged(const QString &)), - this, SLOT(passwordChanged(const QString &))); + connect(PW_Edit, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(passwordChanged(const TQString &))); if (ID_Edit->text().isEmpty()) ID_Edit->setFocus(); @@ -580,10 +580,10 @@ void KPPPWidget::sigPPPDDied() { // stop the disconnect timer (just in case) disconnectTimer->stop(); // signal other applications that we are disconnected now - kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", QByteArray()); + kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", TQByteArray()); kdDebug(5002) << "Executing command on disconnect since pppd has died." << endl; - QApplication::flushX(); + TQApplication::flushX(); execute_command(gpppdata.command_on_disconnect()); stopAccounting(); @@ -611,7 +611,7 @@ void KPPPWidget::sigPPPDDied() { gpppdata.setpppdRunning(false); // // not in a signal handler !!! KNotifyClient::beep(); - QString msg; + TQString msg; if (gpppdata.pppdError() == E_IF_TIMEOUT) msg = i18n("Timeout expired while waiting for the PPP interface " "to come up."); @@ -661,7 +661,7 @@ void KPPPWidget::sigChld() { // if(id == helperPid && helperPid != -1) { // kdDebug(5002) << "It was the setuid child that died" << endl; // helperPid = -1; - QString msg = i18n("kppp's helper process just died.\n" + TQString msg = i18n("kppp's helper process just died.\n" "Since further execution would be pointless, " "kppp will shut down now."); KMessageBox::error(0L, msg); @@ -700,7 +700,7 @@ void KPPPWidget::beginConnect() { gpppdata.setPassword(gpppdata.storedPassword()); } - QFileInfo info(pppdPath()); + TQFileInfo info(pppdPath()); if(!info.exists()){ KMessageBox::error(this, i18n("Cannot find the PPP daemon!\n" @@ -711,7 +711,7 @@ void KPPPWidget::beginConnect() { #if 0 if(!info.isExecutable()){ - QString string; + TQString string; string = i18n("kppp cannot execute:\n %1\n" "Please make sure that you have given kppp " "setuid permission and that " @@ -723,16 +723,16 @@ void KPPPWidget::beginConnect() { #endif KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QString device = ""; + TQString device = ""; if (args->isSet("dev")) device = args->getOption("dev"); else device = gpppdata.modemDevice(); - QFileInfo info2(device); + TQFileInfo info2(device); if(!info2.exists()){ - QString string; + TQString string; string = i18n("kppp can not find:\n %1\nPlease make sure you have setup " "your modem device properly " "and/or adjust the location of the modem device on " @@ -758,7 +758,7 @@ void KPPPWidget::beginConnect() { if(!Requester::rq->setSecret(gpppdata.authMethod(), encodeWord(gpppdata.storedUsername()), encodeWord(gpppdata.password()))) { - QString s; + TQString s; s = i18n("Cannot create PAP/CHAP authentication\n" "file \"%1\"").arg(PAP_AUTH_FILE); KMessageBox::error(this, s); @@ -768,14 +768,14 @@ void KPPPWidget::beginConnect() { } if (gpppdata.phonenumber().isEmpty()) { - QString s = i18n("You must specify a telephone number."); + TQString s = i18n("You must specify a telephone number."); KMessageBox::error(this, s); return; } hide(); - QString tit = i18n("Connecting to: %1").arg(gpppdata.accname()); + TQString tit = i18n("Connecting to: %1").arg(gpppdata.accname()); con->setCaption(tit); con->enableButtons(); con->show(); @@ -797,7 +797,7 @@ void KPPPWidget::disconnect() { if (disconnectTimer->isActive()) return; // you had already pressed disconnect before // signal other applications that we are about to go offline now - kapp->dcopClient()->emitDCOPSignal("KpppIface", "aboutToDisconnect()", QByteArray()); + kapp->dcopClient()->emitDCOPSignal("KpppIface", "aboutToDisconnect()", TQByteArray()); con_win->hide(); con->show(); con->disableButtons(); // will reenable them later in delayedDisconnect() @@ -807,7 +807,7 @@ void KPPPWidget::disconnect() { con->setMsg(i18n("Executing command before disconnection.")); kapp->processEvents(); - QApplication::flushX(); + TQApplication::flushX(); pid_t id = execute_command(gpppdata.command_before_disconnect()); int i, status; @@ -835,9 +835,9 @@ void KPPPWidget::delayedDisconnect() { Requester::rq->killPPPDaemon(); // signal other applications that we are disconnected now - kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", QByteArray()); + kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", TQByteArray()); - QApplication::flushX(); + TQApplication::flushX(); execute_command(gpppdata.command_on_disconnect()); Requester::rq->removeSecret(AUTH_PAP); @@ -879,9 +879,9 @@ void KPPPWidget::quitbutton() { disconnectTimer->stop(); // signal other applications that we are disconnected now - kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", QByteArray()); + kapp->dcopClient()->emitDCOPSignal("KpppIface", "disconnected()", TQByteArray()); - QApplication::flushX(); + TQApplication::flushX(); execute_command(gpppdata.command_on_disconnect()); removedns(); Modem::modem->unlockdevice(); @@ -910,24 +910,24 @@ void KPPPWidget::startAccounting() { if(!gpppdata.AcctEnabled()) return; - QString d = AccountingBase::getAccountingFile(gpppdata.accountingFile()); + TQString d = AccountingBase::getAccountingFile(gpppdata.accountingFile()); // if(::access(d.data(), X_OK) != 0) acct = new Accounting(this, stats); // else // acct = new ExecutableAccounting(this); // connect to the accounting object - connect(acct, SIGNAL(changed(QString, QString)), - con_win, SLOT(slotAccounting(QString, QString))); + connect(acct, TQT_SIGNAL(changed(TQString, TQString)), + con_win, TQT_SLOT(slotAccounting(TQString, TQString))); if(!acct->loadRuleSet(gpppdata.accountingFile())) { - QString s= i18n("Can not load the accounting " + TQString s= i18n("Can not load the accounting " "ruleset \"%1\".").arg(gpppdata.accountingFile()); // starting the messagebox with a timer will prevent us // from blocking the calling function ConnectWidget::timerEvent ruleset_load_errmsg = s; - QTimer::singleShot(0, this, SLOT(rulesetLoadError())); + TQTimer::singleShot(0, this, TQT_SLOT(rulesetLoadError())); return; } else acct->slotStart(); @@ -958,13 +958,13 @@ void KPPPWidget::showStats() { } -void KPPPWidget::usernameChanged(const QString &) { +void KPPPWidget::usernameChanged(const TQString &) { // store username for later use gpppdata.setStoredUsername(ID_Edit->text()); } -void KPPPWidget::passwordChanged(const QString &) { +void KPPPWidget::passwordChanged(const TQString &) { // store the password if so requested if(gpppdata.storePassword()) gpppdata.setStoredPassword(PW_Edit->text()); @@ -973,17 +973,17 @@ void KPPPWidget::passwordChanged(const QString &) { } -void KPPPWidget::setPW_Edit(const QString &pw) { +void KPPPWidget::setPW_Edit(const TQString &pw) { PW_Edit->setText(pw); } -void KPPPWidget::resetCosts(const QString &s) { +void KPPPWidget::resetCosts(const TQString &s) { AccountingBase::resetCosts(s); } -void KPPPWidget::resetVolume(const QString &s) { +void KPPPWidget::resetVolume(const TQString &s) { AccountingBase::resetVolume(s); } @@ -992,9 +992,9 @@ void KPPPWidget::resetVolume(const QString &s) { * If we write the username and password to the secrets file * we'll therefore have to escape back slashes. */ -QString KPPPWidget::encodeWord(const QString &s) { - QString r = s; - r.replace(QRegExp("\\"), "\\\\"); +TQString KPPPWidget::encodeWord(const TQString &s) { + TQString r = s; + r.replace(TQRegExp("\\"), "\\\\"); return r; } @@ -1010,21 +1010,21 @@ void KPPPWidget::showNews() { */ #define QUICKHELP_HINT "Hint_QuickHelp" if(gpppdata.readNumConfig(GENERAL_GRP, QUICKHELP_HINT, 0) == 0) { - QDialog dlg(0, 0, true); + TQDialog dlg(0, 0, true); dlg.setCaption(i18n("Recent Changes in KPPP")); - QVBoxLayout *tl = new QVBoxLayout(&dlg, 10, 10); - QHBoxLayout *l1 = new QHBoxLayout(10); - QVBoxLayout *l2 = new QVBoxLayout(10); + TQVBoxLayout *tl = new TQVBoxLayout(&dlg, 10, 10); + TQHBoxLayout *l1 = new TQHBoxLayout(10); + TQVBoxLayout *l2 = new TQVBoxLayout(10); tl->addLayout(l1); - QLabel *icon = new QLabel(&dlg); + TQLabel *icon = new TQLabel(&dlg); icon->setPixmap(BarIcon("exclamation")); icon->setFixedSize(icon->sizeHint()); l1->addWidget(icon); l1->addLayout(l2); - QLabel *l = new QLabel(i18n("From version 1.4.8 on, kppp has a new feature\n" + TQLabel *l = new TQLabel(i18n("From version 1.4.8 on, kppp has a new feature\n" "called \"Quickhelp\". It's similar to a tooltip,\n" "but you can activate it whenever you want.\n" "\n" @@ -1036,15 +1036,15 @@ void KPPPWidget::showNews() { "To test it, right-click somewhere in this text."), &dlg); - QCheckBox *cb = new QCheckBox(i18n("Don't show this hint again"), &dlg); + TQCheckBox *cb = new TQCheckBox(i18n("Don't show this hint again"), &dlg); cb->setFixedSize(cb->sizeHint()); KButtonBox *bbox = new KButtonBox(&dlg); bbox->addStretch(1); - QPushButton *ok = bbox->addButton(KStdGuiItem::ok()); + TQPushButton *ok = bbox->addButton(KStdGuiItem::ok()); ok->setDefault(true); - dlg.connect(ok, SIGNAL(clicked()), - &dlg, SLOT(accept())); + dlg.connect(ok, TQT_SIGNAL(clicked()), + &dlg, TQT_SLOT(accept())); bbox->addStretch(1); bbox->layout(); @@ -1052,12 +1052,12 @@ void KPPPWidget::showNews() { l2->addWidget(cb); tl->addWidget(bbox); - QString tmp = i18n("This is an example of QuickHelp.\n" + TQString tmp = i18n("This is an example of QuickHelp.\n" "This window will stay open until you\n" "click a mouse button or a press a key.\n"); - QWhatsThis::add(cb,tmp); - QWhatsThis::add(l, tmp); + TQWhatsThis::add(cb,tmp); + TQWhatsThis::add(l, tmp); dlg.exec(); if(cb->isChecked()) { diff --git a/kppp/kpppwidget.h b/kppp/kpppwidget.h index 9ca88990..55f5b84a 100644 --- a/kppp/kpppwidget.h +++ b/kppp/kpppwidget.h @@ -27,7 +27,7 @@ #ifndef __KPPPWIDGET_H__ #define __KPPPWIDGET_H__ -#include +#include #include @@ -50,24 +50,24 @@ class PPPStats; class KDialogBase; class KPushButton; -class SignalEvent : public QEvent { +class SignalEvent : public TQEvent { public: - SignalEvent(int s) : QEvent(User), sig(s) { } + SignalEvent(int s) : TQEvent(User), sig(s) { } int sigType() const { return sig; } private: int sig; }; -class KPPPWidget : public QWidget, virtual public KpppIface { +class KPPPWidget : public TQWidget, virtual public KpppIface { Q_OBJECT public: - KPPPWidget( QWidget *parent=0, const char *name=0 ); + KPPPWidget( TQWidget *parent=0, const char *name=0 ); ~KPPPWidget(); - void setPW_Edit(const QString &); - virtual bool eventFilter(QObject *, QEvent *); + void setPW_Edit(const TQString &); + virtual bool eventFilter(TQObject *, TQEvent *); void setQuitOnDisconnect (bool b); bool quitOnDisconnect () {return m_bQuitOnDisconnect;}; @@ -80,8 +80,8 @@ private slots: void helpbutton(); void setup(); void rulesetLoadError(); - void usernameChanged(const QString &); - void passwordChanged(const QString &); + void usernameChanged(const TQString &); + void passwordChanged(const TQString &); void enterPressedInID(); void enterPressedInPW(); void saveMyself(); @@ -93,8 +93,8 @@ public slots: void beginConnect(); void resetaccounts(); void resetmodems(); - void resetCosts(const QString &); - void resetVolume(const QString &); + void resetCosts(const TQString &); + void resetVolume(const TQString &); void disconnect(); void log_window_toggled(bool on); void startAccounting(); @@ -106,10 +106,10 @@ signals: void cmdl_start(); public: - QCheckBox *log; + TQCheckBox *log; bool connected; DebugWidget *debugwindow; - QString con_speed; + TQString con_speed; ConnectWidget *con; ConWindow *con_win; PPPStatsDlg *statdlg; @@ -122,32 +122,32 @@ private: void interruptConnection(); void sigChld(); void sigPPPDDied(); - QString encodeWord(const QString &s); + TQString encodeWord(const TQString &s); void showNews (); void setButtons(); - QString ruleset_load_errmsg; + TQString ruleset_load_errmsg; - QGridLayout *l1; + TQGridLayout *l1; KPushButton *help_b; KPushButton *setup_b; - QFrame *fline; - QFrame *fline1; - QPushButton *connect_b; - QComboBox *connectto_c; - QComboBox *modem_c; - QLabel *ID_Label; - QLabel *PW_Label; - QLineEdit *ID_Edit; - QLineEdit *PW_Edit; - QLabel *label1; - QLabel *label2; - QLabel *label3; - QLabel *label4; - QLabel *label5; - QLabel *label6; - QLabel *label7; - QLabel *radio_label; + TQFrame *fline; + TQFrame *fline1; + TQPushButton *connect_b; + TQComboBox *connectto_c; + TQComboBox *modem_c; + TQLabel *ID_Label; + TQLabel *PW_Label; + TQLineEdit *ID_Edit; + TQLineEdit *PW_Edit; + TQLabel *label1; + TQLabel *label2; + TQLabel *label3; + TQLabel *label4; + TQLabel *label5; + TQLabel *label6; + TQLabel *label7; + TQLabel *radio_label; KDialogBase *tabWindow; @@ -158,15 +158,15 @@ private: AboutWidget *about; - QString m_strCmdlAccount; - QString m_strCmdlModem; + TQString m_strCmdlAccount; + TQString m_strCmdlModem; bool m_bQuitOnDisconnect; bool m_bCmdlAccount; bool m_bCmdlModem; bool m_bModemCShown; - QTimer *disconnectTimer; + TQTimer *disconnectTimer; }; diff --git a/kppp/loginterm.cpp b/kppp/loginterm.cpp index a0dbd2e2..2aeed5e4 100644 --- a/kppp/loginterm.cpp +++ b/kppp/loginterm.cpp @@ -35,8 +35,8 @@ extern KPPPWidget *p_kppp; -LoginMultiLineEdit::LoginMultiLineEdit(QWidget *parent, const char *name) - : QMultiLineEdit(parent, name) +LoginMultiLineEdit::LoginMultiLineEdit(TQWidget *parent, const char *name) + : TQMultiLineEdit(parent, name) { } @@ -47,25 +47,25 @@ LoginMultiLineEdit::~LoginMultiLineEdit() { void LoginMultiLineEdit::insertChar(unsigned char c) { - QMultiLineEdit::insert(QChar(c)); + TQMultiLineEdit::insert(TQChar(c)); p_kppp->debugwindow->addChar(c); } void LoginMultiLineEdit::myreturn() { - QMultiLineEdit::home(); + TQMultiLineEdit::home(); } void LoginMultiLineEdit::mynewline() { - QMultiLineEdit::end(FALSE); - QMultiLineEdit::newLine(); + TQMultiLineEdit::end(FALSE); + TQMultiLineEdit::newLine(); p_kppp->debugwindow->addChar('\n'); } -void LoginMultiLineEdit::keyPressEvent(QKeyEvent *k) { +void LoginMultiLineEdit::keyPressEvent(TQKeyEvent *k) { unsigned char c = (unsigned char) k->ascii(); if ((int)c == 0) return; @@ -93,17 +93,17 @@ void LoginMultiLineEdit::readChar(unsigned char c) { } -LoginTerm::LoginTerm (QWidget *parent, const char *name) - : QDialog(parent, name, FALSE) +LoginTerm::LoginTerm (TQWidget *parent, const char *name) + : TQDialog(parent, name, FALSE) { setCaption(i18n("Login Terminal Window")); setMinimumSize(300, 200); setMaximumSize(600, 400); resize(400, 300); - QVBoxLayout *tl = new QVBoxLayout(this, 2); - QGridLayout *vgr = new QGridLayout(2, 1); - QGridLayout *hgr = new QGridLayout(1, 2, 30); + TQVBoxLayout *tl = new TQVBoxLayout(this, 2); + TQGridLayout *vgr = new TQGridLayout(2, 1); + TQGridLayout *hgr = new TQGridLayout(1, 2, 30); tl->addLayout(vgr); vgr->addLayout(hgr, 1, 0); @@ -116,11 +116,11 @@ LoginTerm::LoginTerm (QWidget *parent, const char *name) cancel_b = new KPushButton(KStdGuiItem::cancel(), this, "cancel"); cancel_b->setFixedHeight(25); - connect(cancel_b, SIGNAL(clicked()), SLOT(cancelbutton())); + connect(cancel_b, TQT_SIGNAL(clicked()), TQT_SLOT(cancelbutton())); continue_b = new KPushButton(KStdGuiItem::cont(), this, "continue"); continue_b->setFixedHeight(25); - connect(continue_b, SIGNAL(clicked()), SLOT(continuebutton())); + connect(continue_b, TQT_SIGNAL(clicked()), TQT_SLOT(continuebutton())); int mwidth; if (cancel_b->sizeHint().width() > continue_b->sizeHint().width()) @@ -136,7 +136,7 @@ LoginTerm::LoginTerm (QWidget *parent, const char *name) cont = false; - Modem::modem->notify(text_window, SLOT(readChar(unsigned char))); + Modem::modem->notify(text_window, TQT_SLOT(readChar(unsigned char))); } diff --git a/kppp/loginterm.h b/kppp/loginterm.h index 1fa3f05d..1b8a0cc3 100644 --- a/kppp/loginterm.h +++ b/kppp/loginterm.h @@ -1,21 +1,21 @@ #ifndef _LOGINTERM_H_ #define _LOGINTERM_H_ -#include -#include -#include -#include +#include +#include +#include +#include -class LoginMultiLineEdit : public QMultiLineEdit { +class LoginMultiLineEdit : public TQMultiLineEdit { Q_OBJECT public: - LoginMultiLineEdit(QWidget *parent, const char *name); + LoginMultiLineEdit(TQWidget *parent, const char *name); ~LoginMultiLineEdit(); - void keyPressEvent(QKeyEvent *k); + void keyPressEvent(TQKeyEvent *k); void insertChar(unsigned char c); void myreturn(); void mynewline(); @@ -25,10 +25,10 @@ public slots: }; -class LoginTerm : public QDialog { +class LoginTerm : public TQDialog { Q_OBJECT public: - LoginTerm(QWidget *parent, const char *name); + LoginTerm(TQWidget *parent, const char *name); bool pressedContinue(); @@ -38,8 +38,8 @@ public slots: private: LoginMultiLineEdit *text_window; - QPushButton *cancel_b; - QPushButton *continue_b; + TQPushButton *cancel_b; + TQPushButton *continue_b; bool cont; }; diff --git a/kppp/logview/export.cpp b/kppp/logview/export.cpp index 7f810a6a..14c614c4 100644 --- a/kppp/logview/export.cpp +++ b/kppp/logview/export.cpp @@ -22,17 +22,17 @@ #include "export.h" -#include -#include +#include +#include class Export; /***** ExportFormats *****/ static struct { int id; - QString name; - QString desc; - QString ext; + TQString name; + TQString desc; + TQString ext; } ExportFormats [] = { @@ -47,7 +47,7 @@ ExportFormats [] = { /***** ExportWizard *****/ -ExportWizard::ExportWizard(QWidget *parent, const QString &_date) +ExportWizard::ExportWizard(TQWidget *parent, const TQString &_date) : KWizard(parent, "", true) { date = _date; @@ -56,13 +56,13 @@ ExportWizard::ExportWizard(QWidget *parent, const QString &_date) setCaption(i18n("Export Wizard for kPPP Logs")); /* format-page */ - formatPage = new QWidget(); - QHBoxLayout *formatLayout = new QHBoxLayout(formatPage); + formatPage = new TQWidget(); + TQHBoxLayout *formatLayout = new TQHBoxLayout(formatPage); - typeList = new QListBox(formatPage); - connect(typeList, SIGNAL(highlighted(int)), SLOT (typeHighlighted(int))); + typeList = new TQListBox(formatPage); + connect(typeList, TQT_SIGNAL(highlighted(int)), TQT_SLOT (typeHighlighted(int))); typeList->setMinimumSize(50, 200); - QToolTip::add(typeList, i18n("List with possible output formats")); + TQToolTip::add(typeList, i18n("List with possible output formats")); int i=0; while (ExportFormats[i].id) { // add each format to the list typeList->insertItem(i18n(ExportFormats[i].name.utf8())); @@ -72,7 +72,7 @@ ExportWizard::ExportWizard(QWidget *parent, const QString &_date) formatLayout->addWidget(typeList); formatLayout->addSpacing(10); - typeInfo = new QLabel(formatPage); + typeInfo = new TQLabel(formatPage); typeInfo->setAlignment(Qt::AlignTop | Qt::WordBreak); typeInfo->setText(i18n("Please choose the output format on the left side.")); typeInfo->setMinimumSize(350, 200); @@ -82,25 +82,25 @@ ExportWizard::ExportWizard(QWidget *parent, const QString &_date) /* filename-page */ - filenamePage = new QWidget(); - QVBoxLayout *filenameLayout = new QVBoxLayout( filenamePage ); + filenamePage = new TQWidget(); + TQVBoxLayout *filenameLayout = new TQVBoxLayout( filenamePage ); - QLabel *fnLbl = new QLabel(filenamePage); + TQLabel *fnLbl = new TQLabel(filenamePage); fnLbl->setText(i18n("Filename:")); filenameLayout->addWidget(fnLbl); - fnLine = new QLineEdit(filenamePage); + fnLine = new TQLineEdit(filenamePage); fnLine->setText(i18n("[No file selected]")); fnLine->setReadOnly(true); filenameLayout->addWidget(fnLine); filenameLayout->addStretch(1); - fnGet = new QPushButton(filenamePage); + fnGet = new TQPushButton(filenamePage); fnGet->setText(i18n("&Select File...")); fnGet->setMaximumWidth(200); - QToolTip::add(fnGet, i18n("Select the filename of the exported output file")); + TQToolTip::add(fnGet, i18n("Select the filename of the exported output file")); filenameLayout->addWidget(fnGet); - connect(fnGet, SIGNAL(clicked()), SLOT(getFilename())); + connect(fnGet, TQT_SIGNAL(clicked()), TQT_SLOT(getFilename())); filenameLayout->addStretch(2); addPage(filenamePage, i18n("Selection of Filename")); @@ -131,7 +131,7 @@ void ExportWizard::getFilename() { if ( i == -1 ) return; // prepare filter: e.g.: HTML (*.html *.HTML) - QString filter = "*." + ExportFormats[i].ext + " *." + ExportFormats[i].ext.upper() + "|" + + TQString filter = "*." + ExportFormats[i].ext + " *." + ExportFormats[i].ext.upper() + "|" + i18n(ExportFormats[i].name.utf8()) + " (*." + ExportFormats[i].ext + " *." + ExportFormats[i].ext.upper() + ")"; @@ -144,7 +144,7 @@ void ExportWizard::getFilename() { void ExportWizard::reject() { hide(); - filename = QString::null; + filename = TQString::null; } void ExportWizard::accept() { @@ -154,7 +154,7 @@ void ExportWizard::accept() { /***** Export *****/ -Export::Export(const QString &_filename) +Export::Export(const TQString &_filename) : filename(_filename), buffer("") { @@ -179,24 +179,24 @@ bool Export::closeFile() { /***** CSVExport *****/ -CSVExport::CSVExport(const QString &filename, const QString &_separator) +CSVExport::CSVExport(const TQString &filename, const TQString &_separator) : Export(filename), separator(_separator) { } -void CSVExport::addHeadline(const QString &a, const QString &b, - const QString &c, const QString &d, - const QString &e, const QString &f, - const QString &g, const QString &h) { +void CSVExport::addHeadline(const TQString &a, const TQString &b, + const TQString &c, const TQString &d, + const TQString &e, const TQString &f, + const TQString &g, const TQString &h) { // no especially style addDataline(a, b, c, d, e, f, g, h); } -void CSVExport::addDataline(const QString &a, const QString &b, - const QString &c, const QString &d, - const QString &e, const QString &f, - const QString &g, const QString &h) { +void CSVExport::addDataline(const TQString &a, const TQString &b, + const TQString &c, const TQString &d, + const TQString &e, const TQString &f, + const TQString &g, const TQString &h) { buffer+=a + separator + b + separator + c + separator + @@ -217,14 +217,14 @@ void CSVExport::setFinishCode() { /***** HTMLExport *****/ -HTMLExport::HTMLExport(const QString &filename, const QString &date) +HTMLExport::HTMLExport(const TQString &filename, const TQString &date) : Export(filename) { - QString title = i18n("Connection log for %1").arg(date); + TQString title = i18n("Connection log for %1").arg(date); buffer = "\n"; buffer.append("\n\n "+title+"\n"); - buffer.append(QString::fromLatin1(" ")); + buffer.append(TQString::fromLatin1(" ")); buffer.append("\n\n\n

    "+title+"

    \n\n"); buffer.append("\n"); @@ -234,13 +234,13 @@ HTMLExport::HTMLExport(const QString &filename, const QString &date) tdEndCode = ""; } -void HTMLExport::addHeadline(const QString &a, const QString &b, - const QString &c, const QString &d, - const QString &e, const QString &f, - const QString &g, const QString &h) { +void HTMLExport::addHeadline(const TQString &a, const TQString &b, + const TQString &c, const TQString &d, + const TQString &e, const TQString &f, + const TQString &g, const TQString &h) { // simply bold font - QString bak1 = tdStartCode; tdStartCode.append(""); - QString bak2 = tdEndCode; tdEndCode.prepend(""); + TQString bak1 = tdStartCode; tdStartCode.append(""); + TQString bak2 = tdEndCode; tdEndCode.prepend(""); addDataline(a, b, c, d, e, f, g, h); @@ -249,10 +249,10 @@ void HTMLExport::addHeadline(const QString &a, const QString &b, tdEndCode = bak2; } -void HTMLExport::addDataline(const QString &a, const QString &b, - const QString &c, const QString &d, - const QString &e, const QString &f, - const QString &g, const QString &h) { +void HTMLExport::addDataline(const TQString &a, const TQString &b, + const TQString &c, const TQString &d, + const TQString &e, const TQString &f, + const TQString &g, const TQString &h) { buffer+= trStartCode + tdStartCode + a + tdEndCode + tdStartCode + b + tdEndCode + diff --git a/kppp/logview/export.h b/kppp/logview/export.h index f192e7d5..3c601e96 100644 --- a/kppp/logview/export.h +++ b/kppp/logview/export.h @@ -23,13 +23,13 @@ #ifndef KPPPEXPORT_H #define KPPPEXPORT_H -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -41,11 +41,11 @@ class Export; class ExportWizard : public KWizard { Q_OBJECT public: - ExportWizard(QWidget *parent, const QString &_date); + ExportWizard(TQWidget *parent, const TQString &_date); Export *createExportFilter(); int filterID; - QString filename; + TQString filename; public slots: void typeHighlighted(int); @@ -55,15 +55,15 @@ public slots: void reject(); private: - QWidget *formatPage; - QListBox *typeList; - QLabel *typeInfo; + TQWidget *formatPage; + TQListBox *typeList; + TQLabel *typeInfo; - QWidget *filenamePage; - QLineEdit *fnLine; - QPushButton *fnGet; + TQWidget *filenamePage; + TQLineEdit *fnLine; + TQPushButton *fnGet; - QString date; + TQString date; }; @@ -71,68 +71,68 @@ private: class Export { public: Export(); - Export(const QString &filename); + Export(const TQString &filename); virtual ~Export(); bool openFile(); bool closeFile(); - virtual void addHeadline(const QString &a, const QString &b, - const QString &c, const QString &d, - const QString &e, const QString &f, - const QString &g, const QString &h) = 0; - virtual void addDataline(const QString &a, const QString &b, - const QString &c, const QString &d, - const QString &e, const QString &f, - const QString &g, const QString &h) = 0; + virtual void addHeadline(const TQString &a, const TQString &b, + const TQString &c, const TQString &d, + const TQString &e, const TQString &f, + const TQString &g, const TQString &h) = 0; + virtual void addDataline(const TQString &a, const TQString &b, + const TQString &c, const TQString &d, + const TQString &e, const TQString &f, + const TQString &g, const TQString &h) = 0; virtual void addEmptyLine() = 0; virtual void setFinishCode() = 0; protected: - QFile file; - QString filename; - QString buffer; + TQFile file; + TQString filename; + TQString buffer; }; /***** CSVExport *****/ class CSVExport : public Export { public: - CSVExport(const QString &filename, const QString &separator); - virtual void addHeadline(const QString &a, const QString &b, - const QString &c, const QString &d, - const QString &e, const QString &f, - const QString &g, const QString &h); - virtual void addDataline(const QString &a, const QString &b, - const QString &c, const QString &d, - const QString &e, const QString &f, - const QString &g, const QString &h); + CSVExport(const TQString &filename, const TQString &separator); + virtual void addHeadline(const TQString &a, const TQString &b, + const TQString &c, const TQString &d, + const TQString &e, const TQString &f, + const TQString &g, const TQString &h); + virtual void addDataline(const TQString &a, const TQString &b, + const TQString &c, const TQString &d, + const TQString &e, const TQString &f, + const TQString &g, const TQString &h); virtual void addEmptyLine(); virtual void setFinishCode(); private: - QString separator; + TQString separator; }; /***** HTMLExport *****/ class HTMLExport : public Export { public: - HTMLExport(const QString &filename, const QString &date); - virtual void addHeadline(const QString &a, const QString &b, - const QString &c, const QString &d, - const QString &e, const QString &f, - const QString &g, const QString &h); - virtual void addDataline(const QString &a, const QString &b, - const QString &c, const QString &d, - const QString &e, const QString &f, - const QString &g, const QString &h); + HTMLExport(const TQString &filename, const TQString &date); + virtual void addHeadline(const TQString &a, const TQString &b, + const TQString &c, const TQString &d, + const TQString &e, const TQString &f, + const TQString &g, const TQString &h); + virtual void addDataline(const TQString &a, const TQString &b, + const TQString &c, const TQString &d, + const TQString &e, const TQString &f, + const TQString &g, const TQString &h); virtual void addEmptyLine(); virtual void setFinishCode(); private: - QString trStartCode; - QString trEndCode; - QString tdStartCode; - QString tdEndCode; + TQString trStartCode; + TQString trEndCode; + TQString tdStartCode; + TQString tdEndCode; }; #endif diff --git a/kppp/logview/log.cpp b/kppp/logview/log.cpp index b0251d53..93be0098 100644 --- a/kppp/logview/log.cpp +++ b/kppp/logview/log.cpp @@ -23,37 +23,37 @@ #include #include -#include -#include +#include +#include #include #include #include #include -QPtrList logList; -QProgressDialog *dlg; +TQPtrList logList; +TQProgressDialog *dlg; int loadLogs() { int logsize = 0; - QString logdirname = locateLocal("data", "kppp/Log/"); - QDir logdir(logdirname, "*.log"); + TQString logdirname = locateLocal("data", "kppp/Log/"); + TQDir logdir(logdirname, "*.log"); kdDebug(5002) << "logdirname: " << logdirname << endl; // get log file size const QFileInfoList *list = logdir.entryInfoList(); QFileInfoListIterator it( *list ); - QFileInfo *fi; + TQFileInfo *fi; while ((fi = it.current()) != 0) { logsize += fi->size(); ++it; } - dlg = new QProgressDialog(i18n("Loading log files"), - QString::null, + dlg = new TQProgressDialog(i18n("Loading log files"), + TQString::null, logsize); dlg->setProgress(0); @@ -71,11 +71,11 @@ int loadLogs() { return retval; } -int loadLog(QString fname) { +int loadLog(TQString fname) { FILE *f; int warning=0; - f = fopen(QFile::encodeName(fname), "r"); + f = fopen(TQFile::encodeName(fname), "r"); if(f == NULL) return 1; diff --git a/kppp/logview/log.h b/kppp/logview/log.h index 2297bd63..d8fa15cd 100644 --- a/kppp/logview/log.h +++ b/kppp/logview/log.h @@ -22,19 +22,19 @@ #define __LOG__H__ #include "loginfo.h" -#include +#include -typedef QPtrList QLogInfoBase; -typedef QPtrListIterator QLogInfoIterator; +typedef TQPtrList QLogInfoBase; +typedef TQPtrListIterator QLogInfoIterator; class QLogList : public QLogInfoBase { public: virtual int compareItems(Item, Item); }; -extern QPtrList logList; +extern TQPtrList logList; int loadLogs(); -int loadLog(QString); +int loadLog(TQString); #endif diff --git a/kppp/logview/loginfo.cpp b/kppp/logview/loginfo.cpp index 9544f389..321ce7c5 100644 --- a/kppp/logview/loginfo.cpp +++ b/kppp/logview/loginfo.cpp @@ -33,27 +33,27 @@ char *mystrsep (char **stringp, const char *delim); -LogInfo::LogInfo(QCString data) { +LogInfo::LogInfo(TQCString data) { parse(data); } -QDateTime LogInfo::from() const { - QDateTime tm; +TQDateTime LogInfo::from() const { + TQDateTime tm; tm.setTime_t(_from); return tm; } -QDateTime LogInfo::until() const { - QDateTime tm; +TQDateTime LogInfo::until() const { + TQDateTime tm; tm.setTime_t(_until); return tm; } -QString LogInfo::connectionName() const { +TQString LogInfo::connectionName() const { return _conname; } -QString LogInfo::currency() const { +TQString LogInfo::currency() const { return _currency; } @@ -84,7 +84,7 @@ int LogInfo::error() const { return errorfield; } -void LogInfo::parse(QCString s) { +void LogInfo::parse(TQCString s) { errorfield = 0; char *c = (char *)malloc(s.length() + 1), *csep; strcpy(c, s); @@ -101,7 +101,7 @@ void LogInfo::parse(QCString s) { char *p = mystrsep(&csep, ":"); int i = 0; while(i < 8 && p != 0) { - QString token = QString::fromLocal8Bit(p); + TQString token = TQString::fromLocal8Bit(p); switch(i) { case 0: diff --git a/kppp/logview/loginfo.h b/kppp/logview/loginfo.h index 6e1fa7fc..de4b79fc 100644 --- a/kppp/logview/loginfo.h +++ b/kppp/logview/loginfo.h @@ -22,22 +22,22 @@ #define __LOGINFO__H__ #define MYDEBUG -#include -#include +#include +#include #include class LogInfo { public: - LogInfo(QCString data); + LogInfo(TQCString data); int error() const; - QDateTime from() const; + TQDateTime from() const; time_t from_t() const { return _from; } - QDateTime until() const; + TQDateTime until() const; int duration() const; - QString connectionName() const; - QString currency() const; + TQString connectionName() const; + TQString currency() const; double sessionCosts() const; double totalCosts() const; double bytesIn() const; @@ -49,12 +49,12 @@ public: #endif private: - void parse(QCString ); + void parse(TQCString ); int errorfield; time_t _from, _until; - QString _conname, _currency; + TQString _conname, _currency; double _session_cost, _total_cost; double _bytes_in, _bytes_out; }; diff --git a/kppp/logview/main.cpp b/kppp/logview/main.cpp index ae877158..a533da38 100644 --- a/kppp/logview/main.cpp +++ b/kppp/logview/main.cpp @@ -55,11 +55,11 @@ TopWidget::TopWidget() : KMainWindow(0, "") { setCaption(i18n("KPPP Log Viewer")); - w = new QWidget(this); + w = new TQWidget(this); - QBoxLayout *l = new QVBoxLayout(w, 5); + TQBoxLayout *l = new TQVBoxLayout(w, 5); - td = new QTabWidget(w, ""); + td = new TQTabWidget(w, ""); mw = new MonthlyWidget(td); td->addTab(mw, i18n("Monthly Log")); l->addWidget(td); @@ -68,22 +68,22 @@ TopWidget::TopWidget() : KMainWindow(0, "") { if(!kpppmode) { // create menu mb = new KMenuBar(this); - QPopupMenu *fm = new QPopupMenu; + TQPopupMenu *fm = new QPopupMenu; fm->insertItem(SmallIcon("exit"),KStdGuiItem::quit().text(), F_EXIT); mb->insertItem(i18n("&File"), fm); mb->setAccel(CTRL + Key_Q, F_EXIT); - connect(mb, SIGNAL(activated(int)), - this, SLOT(menuCallback(int))); + connect(mb, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(menuCallback(int))); } else { mb = 0; - QPushButton *but = new KPushButton(KStdGuiItem::close(),w); - QHBoxLayout *lh = new QHBoxLayout(l); + TQPushButton *but = new KPushButton(KStdGuiItem::close(),w); + TQHBoxLayout *lh = new TQHBoxLayout(l); lh->addStretch(10); lh->addWidget(but); - connect(but, SIGNAL(clicked()), - kapp, SLOT(quit())); + connect(but, TQT_SIGNAL(clicked()), + kapp, TQT_SLOT(quit())); } setMinimumSize(mw->sizeHint().width() + 15, diff --git a/kppp/logview/main.h b/kppp/logview/main.h index bb833a0f..db7ca8da 100644 --- a/kppp/logview/main.h +++ b/kppp/logview/main.h @@ -22,7 +22,7 @@ #define __MAIN__H__ #include -#include +#include #include #include "monthly.h" @@ -38,8 +38,8 @@ private slots: private: MonthlyWidget *mw; KMenuBar *mb; - QWidget *w; - QTabWidget *td; + TQWidget *w; + TQTabWidget *td; }; #endif diff --git a/kppp/logview/monthly.cpp b/kppp/logview/monthly.cpp index b9aac7d3..904f2800 100644 --- a/kppp/logview/monthly.cpp +++ b/kppp/logview/monthly.cpp @@ -18,10 +18,10 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -32,9 +32,9 @@ #include "monthly.h" #include "export.h" -#include +#include -static void formatBytes(double bytes, QString &result) { +static void formatBytes(double bytes, TQString &result) { if(bytes < 1024) result.setNum(bytes); else if(bytes < 1024*1024) @@ -43,11 +43,11 @@ static void formatBytes(double bytes, QString &result) { result = i18n("%1 MB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1)); } -static void formatBytesMonth(double bytes, QString &result) { +static void formatBytesMonth(double bytes, TQString &result) { int day, days; - day = QDate::currentDate().day(); - days = QDate::currentDate().daysInMonth(); + day = TQDate::currentDate().day(); + days = TQDate::currentDate().daysInMonth(); bytes = (bytes / day) * days; @@ -59,8 +59,8 @@ static void formatBytesMonth(double bytes, QString &result) { result = i18n("%1 MB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1)); } -static void formatDuration(int seconds, QString &result) { - QString sec; +static void formatDuration(int seconds, TQString &result) { + TQString sec; sec.sprintf("%02d", seconds%60); if(seconds < 60) result = i18n("%1s").arg(sec); @@ -73,15 +73,15 @@ static void formatDuration(int seconds, QString &result) { .arg(sec); } -static void formatDurationMonth(int seconds, QString &result) { +static void formatDurationMonth(int seconds, TQString &result) { int day, days; - day = QDate::currentDate().day(); - days = QDate::currentDate().daysInMonth(); + day = TQDate::currentDate().day(); + days = TQDate::currentDate().daysInMonth(); seconds = (seconds / day) * days; - QString sec; + TQString sec; sec.sprintf("%02d", seconds%60); if(seconds < 60) result = i18n("%1s").arg(sec); @@ -97,37 +97,37 @@ static void formatDurationMonth(int seconds, QString &result) { static void costsMonth(double costs, double &result) { int day, days; - day = QDate::currentDate().day(); - days = QDate::currentDate().daysInMonth(); + day = TQDate::currentDate().day(); + days = TQDate::currentDate().daysInMonth(); result = (costs / day) * days; } -class LogListItem : public QListViewItem { +class LogListItem : public TQListViewItem { public: LogListItem(LogInfo *l, - QListView * parent, - QString s1, QString s2, - QString s3, QString s4, - QString s5, QString s6, - QString s7, QString s8) - : QListViewItem(parent, s1, s2, s3, s4, s5, s6, s7, s8), + TQListView * parent, + TQString s1, TQString s2, + TQString s3, TQString s4, + TQString s5, TQString s6, + TQString s7, TQString s8) + : TQListViewItem(parent, s1, s2, s3, s4, s5, s6, s7, s8), li(l) { } - virtual void paintCell( QPainter *p, const QColorGroup & cg, + virtual void paintCell( TQPainter *p, const TQColorGroup & cg, int column, int width, int alignment ); - virtual QString key(int, bool) const; + virtual TQString key(int, bool) const; LogInfo *li; }; -void LogListItem::paintCell( QPainter *p, const QColorGroup & cg, +void LogListItem::paintCell( TQPainter *p, const TQColorGroup & cg, int column, int width, int alignment ) { - QListViewItem::paintCell(p, cg, column, width, alignment); + TQListViewItem::paintCell(p, cg, column, width, alignment); // double line above sum //if(!li) { @@ -136,12 +136,12 @@ void LogListItem::paintCell( QPainter *p, const QColorGroup & cg, //} } -QString LogListItem::key(int c, bool ascending) const +TQString LogListItem::key(int c, bool ascending) const { if (!li) // we want the sum to be always at the bottom return ascending ? "z" : " "; - QString k; + TQString k; switch (c) { case 0: k = li->connectionName(); @@ -167,8 +167,8 @@ QString LogListItem::key(int c, bool ascending) const return k; } -MonthlyWidget::MonthlyWidget(QWidget *parent) : - QWidget(parent) +MonthlyWidget::MonthlyWidget(TQWidget *parent) : + TQWidget(parent) { tl = 0; @@ -194,9 +194,9 @@ MonthlyWidget::MonthlyWidget(QWidget *parent) : lv->setSorting(1); lv->setMinimumWidth(180); lv->setMinimumHeight(280); - lv->setSelectionMode(QListView::Extended); + lv->setSelectionMode(TQListView::Extended); selectionItem = 0L; - connect(lv, SIGNAL(selectionChanged()), SLOT(slotSelectionChanged())); + connect(lv, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectionChanged())); lv2 = new KListView(this); lv2->addColumn(i18n("Connection")); @@ -212,21 +212,21 @@ MonthlyWidget::MonthlyWidget(QWidget *parent) : lv2->setSorting(-1); lv2->setItemMargin(2); lv2->setMaximumHeight(100); - lv2->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum); - lv2->setSelectionMode(QListView::NoSelection); + lv2->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum); + lv2->setSelectionMode(TQListView::NoSelection); - title = new QLabel("X", this); - QFont f = title->font(); + title = new TQLabel("X", this); + TQFont f = title->font(); f.setPointSize(f.pointSize() + 2); f.setBold(TRUE); title->setFont(f); title->setFixedHeight(title->sizeHint().height()*2); - cboConnections = new QComboBox(false, this); // add a combo box to select connections + cboConnections = new TQComboBox(false, this); // add a combo box to select connections cboConnections->setMaximumWidth(200); // a resonable size cboConnections->insertItem(i18n("All Connections")); // default to all connections - connect(cboConnections, SIGNAL(activated(int)), - this, SLOT(slotConnections(int))); + connect(cboConnections, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotConnections(int))); bbox = new KButtonBox(this, Qt::Vertical); prev = bbox->addButton(i18n("&Prev Month")); @@ -236,14 +236,14 @@ MonthlyWidget::MonthlyWidget(QWidget *parent) : bbox->addStretch(1); exportBttn = bbox->addButton(i18n("&Export...")); - connect(prev, SIGNAL(released()), - this, SLOT(prevMonth())); - connect(next, SIGNAL(released()), - this, SLOT(nextMonth())); - connect(today, SIGNAL(released()), - this, SLOT(currentMonth())); - connect(exportBttn, SIGNAL(clicked()), - this, SLOT(exportWizard())); + connect(prev, TQT_SIGNAL(released()), + this, TQT_SLOT(prevMonth())); + connect(next, TQT_SIGNAL(released()), + this, TQT_SLOT(nextMonth())); + connect(today, TQT_SIGNAL(released()), + this, TQT_SLOT(currentMonth())); + connect(exportBttn, TQT_SIGNAL(clicked()), + this, TQT_SLOT(exportWizard())); bbox->addStretch(8); bbox->layout(); @@ -256,12 +256,12 @@ void MonthlyWidget::layoutWidget() { if(tl) delete tl; - tl = new QGridLayout(this, 1, 1, 11, 16, "MainLayout"); + tl = new TQGridLayout(this, 1, 1, 11, 16, "MainLayout"); tl->addWidget(title, 0, 0); tl->addWidget(cboConnections, 0, 1); - QLabel *l = new QLabel(this); + TQLabel *l = new TQLabel(this); l->setText(i18n("Statistics:")); - QFont f2 = l->font(); + TQFont f2 = l->font(); f2.setPointSize(f2.pointSize() + 1); f2.setBold(TRUE); l->setFont(f2); @@ -275,13 +275,13 @@ void MonthlyWidget::layoutWidget() { tl->activate(); } -int bestlen(QWidget *w, const char *s) { +int bestlen(TQWidget *w, const char *s) { return w->fontMetrics().boundingRect(s).width() + 8; } void MonthlyWidget::plotMonth() { // name of the current connection - QString con; + TQString con; // for collecting monthly statistics int count = 0; @@ -293,12 +293,12 @@ void MonthlyWidget::plotMonth() { lv2->clear(); const KCalendarSystem * calendar = KGlobal::locale()->calendar(); - QDate startDate = periodeFirst(); + TQDate startDate = periodeFirst(); for(int i = 0; i < (int)logList.count(); i++) { LogInfo *li = logList.at(i); - QDate logDate = li->from().date(); + TQDate logDate = li->from().date(); if ( periodeFirst() <= logDate && periodeLast() >= logDate ) { // get connection name for this line con = li->connectionName(); @@ -330,7 +330,7 @@ void MonthlyWidget::plotMonth() { duration += li->from().secsTo(li->until()); - QString _bin, _bout, b; + TQString _bin, _bout, b; if(li->bytesIn() >= 0) formatBytes(li->bytesIn(), _bin); else @@ -346,14 +346,14 @@ void MonthlyWidget::plotMonth() { else b = i18n("n/a"); - QString day; + TQString day; day.sprintf("%2d", li->from().date().day()); - QString s_duration; + TQString s_duration; formatDuration(li->from().secsTo(li->until()), s_duration); - QString s_lifrom, s_liuntil, s_costs; + TQString s_lifrom, s_liuntil, s_costs; s_lifrom = KGlobal::locale()->formatTime(li->from().time(), false); s_liuntil = KGlobal::locale()->formatTime(li->until().time(), false); s_costs = KGlobal::locale()->formatMoney(li->sessionCosts()); @@ -363,7 +363,7 @@ void MonthlyWidget::plotMonth() { } if(count) { - QString _bin, _bout, _b; + TQString _bin, _bout, _b; if(bin < 0) _bin = i18n("n/a"); @@ -380,25 +380,25 @@ void MonthlyWidget::plotMonth() { else formatBytes(bout + bin, _b); - QString s_duration; + TQString s_duration; formatDuration(duration, s_duration); - QString s_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2)); + TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2)); selectionItem = new LogListItem(0, lv2, i18n("Selection (%n connection)", "Selection (%n connections)", 0), - QString::null, QString::null, QString::null, - QString::null, QString::null, QString::null, QString::null); + TQString::null, TQString::null, TQString::null, + TQString::null, TQString::null, TQString::null, TQString::null); (void) new LogListItem(0, lv2, i18n("%n connection", "%n connections", count), - s_duration, s_costs, _bin, _bout, QString::null, QString::null, QString::null); + s_duration, s_costs, _bin, _bout, TQString::null, TQString::null, TQString::null); const KCalendarSystem * calendar = KGlobal::locale()->calendar(); - if(calendar->month(periodeFirst()) == calendar->month(QDate::currentDate())) { + if(calendar->month(periodeFirst()) == calendar->month(TQDate::currentDate())) { - QString m_bin, m_bout; + TQString m_bin, m_bout; if(bin < 0) _bin = i18n("n/a"); @@ -410,19 +410,19 @@ void MonthlyWidget::plotMonth() { else formatBytesMonth(bout, m_bout); - QString m_duration; + TQString m_duration; formatDurationMonth(duration, m_duration); costsMonth(costs, costs); - QString m_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2)); + TQString m_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2)); - (void) new QListViewItem(lv2, selectionItem, + (void) new TQListViewItem(lv2, selectionItem, i18n("Monthly estimates"), m_duration, m_costs, m_bin, m_bout, - QString::null, QString::null, QString::null); + TQString::null, TQString::null, TQString::null); } } - QString t; + TQString t; if(lv->childCount() > 0) { exportBttn->setEnabled(true); // export possibility t = i18n("Connection log for %1 %2") @@ -456,7 +456,7 @@ void MonthlyWidget::prevMonth() { void MonthlyWidget::currentMonth() { const KCalendarSystem * calendar = KGlobal::locale()->calendar(); - QDate dt = QDate::currentDate(); + TQDate dt = TQDate::currentDate(); calendar->setYMD(m_periodeFirst, calendar->year(dt), calendar->month(dt), 1); plotMonth(); @@ -464,7 +464,7 @@ void MonthlyWidget::currentMonth() { void MonthlyWidget::exportWizard() { const KCalendarSystem * calendar = KGlobal::locale()->calendar(); - QString date = QString::fromLatin1("%1-%2") // e.g.: June-2001 + TQString date = TQString::fromLatin1("%1-%2") // e.g.: June-2001 .arg(calendar->monthName(periodeFirst())) .arg(calendar->year(periodeFirst())); @@ -473,7 +473,7 @@ void MonthlyWidget::exportWizard() { if (wizard->filename.isEmpty()) { // wizard aborted... return; } - if (QFile::exists(wizard->filename)) { // overwrite? + if (TQFile::exists(wizard->filename)) { // overwrite? if (KMessageBox::Continue!=KMessageBox::warningContinueCancel(0, i18n("A document with this name already exists."), i18n("Overwrite file?"), i18n("&Overwrite") /*, true*/)) { // no return; } @@ -496,7 +496,7 @@ void MonthlyWidget::exportWizard() { i18n("Duration"), i18n("Costs"), i18n("Bytes In"), i18n("Bytes Out") ); // name of the current connection - QString con; + TQString con; // for collecting monthly statistics int count = 0; @@ -507,7 +507,7 @@ void MonthlyWidget::exportWizard() { for(int i = 0; i < (int)logList.count(); i++) { LogInfo *li = logList.at(i); - QDate logDate = li->from().date(); + TQDate logDate = li->from().date(); if (periodeFirst() <= logDate && periodeLast() >= logDate ) { // get connection name for this line con = li->connectionName(); @@ -540,7 +540,7 @@ void MonthlyWidget::exportWizard() { duration += li->from().secsTo(li->until()); - QString _bin, _bout, b; + TQString _bin, _bout, b; if(li->bytesIn() >= 0) formatBytes(li->bytesIn(), _bin); else @@ -556,15 +556,15 @@ void MonthlyWidget::exportWizard() { else b = i18n("n/a"); - QString day; + TQString day; day.sprintf("%2d", li->from().date().day()); - QString con = li->connectionName(); + TQString con = li->connectionName(); - QString s_duration; + TQString s_duration; formatDuration(li->from().secsTo(li->until()), s_duration); - QString s_lifrom, s_liuntil, s_costs; + TQString s_lifrom, s_liuntil, s_costs; s_lifrom = KGlobal::locale()->formatTime(li->from().time(), false); s_liuntil = KGlobal::locale()->formatTime(li->until().time(), false); s_costs = KGlobal::locale()->formatMoney(li->sessionCosts()); @@ -576,9 +576,9 @@ void MonthlyWidget::exportWizard() { } } - if(calendar->month(periodeFirst()) == calendar->month(QDate::currentDate())) { + if(calendar->month(periodeFirst()) == calendar->month(TQDate::currentDate())) { - QString m_bin, m_bout; + TQString m_bin, m_bout; if(bin < 0) m_bin = i18n("n/a"); else @@ -589,21 +589,21 @@ void MonthlyWidget::exportWizard() { else formatBytesMonth(bout, m_bout); - QString m_duration; + TQString m_duration; formatDurationMonth(duration, m_duration); costsMonth(costs, costs); - QString m_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2)); + TQString m_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2)); - QString datetime = KGlobal::locale()->formatDateTime( QDateTime::currentDateTime(), true); + TQString datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true); exportIFace->addEmptyLine(); exportIFace->addDataline(i18n("Monthly estimates (%1)").arg(datetime), - QString::null, QString::null, QString::null, m_duration, m_costs, m_bin, m_bout); + TQString::null, TQString::null, TQString::null, m_duration, m_costs, m_bin, m_bout); } if(count) { - QString _bin, _bout, _b; + TQString _bin, _bout, _b; if(bin < 0) _bin = i18n("n/a"); @@ -620,15 +620,15 @@ void MonthlyWidget::exportWizard() { else formatBytes(bout + bin, _b); - QString s_duration; + TQString s_duration; formatDuration(duration, s_duration); - QString s_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2)); + TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2)); // call export methods exportIFace->addEmptyLine(); - exportIFace->addDataline(i18n("%n connection", "%n connections", count), QString::null, QString::null, QString::null, s_duration, + exportIFace->addDataline(i18n("%n connection", "%n connections", count), TQString::null, TQString::null, TQString::null, s_duration, s_costs, _bin, _bout); exportIFace->setFinishCode(); @@ -643,12 +643,12 @@ void MonthlyWidget::exportWizard() { delete exportIFace; } -QDate MonthlyWidget::periodeFirst() const +TQDate MonthlyWidget::periodeFirst() const { return m_periodeFirst; } -QDate MonthlyWidget::periodeLast() const +TQDate MonthlyWidget::periodeLast() const { const KCalendarSystem * calendar = KGlobal::locale()->calendar(); @@ -666,7 +666,7 @@ void MonthlyWidget::slotSelectionChanged() int duration = 0; LogListItem *item; LogInfo *li; - QListViewItemIterator it(lv); + TQListViewItemIterator it(lv); while ( it.current() ) { item = dynamic_cast(it.current()); @@ -695,7 +695,7 @@ void MonthlyWidget::slotSelectionChanged() } if(count) { - QString _bin, _bout, _b; + TQString _bin, _bout, _b; if(bin < 0) _bin = i18n("n/a"); @@ -712,11 +712,11 @@ void MonthlyWidget::slotSelectionChanged() else formatBytes(bout + bin, _b); - QString s_duration; + TQString s_duration; formatDuration(duration, s_duration); - QString s_costs(KGlobal::locale()->formatMoney(costs, QString::null, 2)); + TQString s_costs(KGlobal::locale()->formatMoney(costs, TQString::null, 2)); selectionItem->setText(0, i18n("Selection (%n connection)", "Selection (%n connections)", count)); selectionItem->setText(1, s_duration); selectionItem->setText(2, s_costs); diff --git a/kppp/logview/monthly.h b/kppp/logview/monthly.h index a77f7bfe..bfe5407e 100644 --- a/kppp/logview/monthly.h +++ b/kppp/logview/monthly.h @@ -23,12 +23,12 @@ #define __MONTHLY__H__ #include "log.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include @@ -36,10 +36,10 @@ class KListView; class QComboBox; class LogListItem; -class MonthlyWidget : public QWidget { +class MonthlyWidget : public TQWidget { Q_OBJECT public: - MonthlyWidget(QWidget *parent = 0); + MonthlyWidget(TQWidget *parent = 0); private slots: void prevMonth(); @@ -56,25 +56,25 @@ private: /** * Returns the first day in the period */ - QDate periodeFirst() const; + TQDate periodeFirst() const; /** * Returns the last day in the period */ - QDate periodeLast() const; + TQDate periodeLast() const; - QDate m_periodeFirst; // First day in month + TQDate m_periodeFirst; // First day in month //int _month, _year; - QComboBox *cboConnections; + TQComboBox *cboConnections; KButtonBox *bbox; KListView *lv; KListView *lv2; LogListItem* selectionItem; - QLabel *title; - QPushButton *next, *prev, *today, *exportBttn; - QValueList lstConnections; - QGridLayout *tl; - QDateTime *dt; + TQLabel *title; + TQPushButton *next, *prev, *today, *exportBttn; + TQValueList lstConnections; + TQGridLayout *tl; + TQDateTime *dt; }; #endif diff --git a/kppp/macros.h b/kppp/macros.h index 134ec2cf..6f541b76 100644 --- a/kppp/macros.h +++ b/kppp/macros.h @@ -3,7 +3,7 @@ #ifndef __MACROS__H__ #define __MACROS__H__ -#include +#include #define MIN_WIDTH(w) w->setMinimumWidth(w->sizeHint().width()); #define MIN_HEIGHT(w) w->setMinimumHeight(w->sizeHint().height()); diff --git a/kppp/main.cpp b/kppp/main.cpp index 65548d17..753291ba 100644 --- a/kppp/main.cpp +++ b/kppp/main.cpp @@ -88,9 +88,9 @@ uid_t euid; // helper process' pid pid_t helperPid = -1; -QString local_ip_address; -QString remote_ip_address; -QString pidfile; +TQString local_ip_address; +TQString remote_ip_address; +TQString pidfile; #if 0 extern "C" { @@ -232,16 +232,16 @@ int main( int argc, char **argv ) { // make sure that nobody can read the password from the // config file - QString configFile = KGlobal::dirs()->saveLocation("config") - + QString(kapp->name()) + "rc"; - if(access(QFile::encodeName(configFile), F_OK) == 0) - chmod(QFile::encodeName(configFile), S_IRUSR | S_IWUSR); + TQString configFile = KGlobal::dirs()->saveLocation("config") + + TQString(kapp->name()) + "rc"; + if(access(TQFile::encodeName(configFile), F_OK) == 0) + chmod(TQFile::encodeName(configFile), S_IRUSR | S_IWUSR); // do we really need to generate an empty directory structure here ? KGlobal::dirs()->saveLocation("appdata", "Rules"); int pid = create_pidfile(); - QString err_msg = i18n("kppp can't create or read from\n%1.").arg(pidfile); + TQString err_msg = i18n("kppp can't create or read from\n%1.").arg(pidfile); if(pid < 0) { KMessageBox::error(0L, err_msg); @@ -263,7 +263,7 @@ int main( int argc, char **argv ) { gpppdata.open(); gpppdata.setAccountByIndex(0); - QString s = argv[2]; + TQString s = argv[2]; urlEncode(s); kdDebug(5002) << s << endl; @@ -272,7 +272,7 @@ int main( int argc, char **argv ) { } if (pid > 0) { - QString msg = i18n("kppp has detected a %1 file.\n" + TQString msg = i18n("kppp has detected a %1 file.\n" "Another instance of kppp seems to be " "running under process-ID %2.\n" "Please click Exit, make sure that you are " @@ -322,8 +322,8 @@ int main( int argc, char **argv ) { } -pid_t execute_command (const QString & cmd) { - QCString command = QFile::encodeName(cmd); +pid_t execute_command (const TQString & cmd) { + TQCString command = TQFile::encodeName(cmd); if (command.isEmpty() || command.length() > COMMAND_SIZE) return (pid_t) -1; @@ -331,7 +331,7 @@ pid_t execute_command (const QString & cmd) { kdDebug(5002) << "Executing command: " << command << endl; - QApplication::flushX(); + TQApplication::flushX(); if((id = fork()) == 0) { // don't bother dieppp() signal(SIGCHLD, SIG_IGN); @@ -361,10 +361,10 @@ pid_t create_pidfile() { pidfile = KGlobal::dirs()->saveLocation("appdata") + "kppp.pid"; - if(access(QFile::encodeName(pidfile), F_OK) == 0) { + if(access(TQFile::encodeName(pidfile), F_OK) == 0) { - if((access(QFile::encodeName(pidfile), R_OK) < 0) || - (fd = open(QFile::encodeName(pidfile), O_RDONLY)) < 0) + if((access(TQFile::encodeName(pidfile), R_OK) < 0) || + (fd = open(TQFile::encodeName(pidfile), O_RDONLY)) < 0) return -1; int sz = read(fd, &pidstr, 32); @@ -393,7 +393,7 @@ pid_t create_pidfile() { remove_pidfile(); } - if((fd = open(QFile::encodeName(pidfile), O_WRONLY | O_CREAT | O_EXCL, + if((fd = open(TQFile::encodeName(pidfile), O_WRONLY | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1) return -1; @@ -411,9 +411,9 @@ bool remove_pidfile() { struct stat st; // only remove regular files with user write permissions - if(stat(QFile::encodeName(pidfile), &st) == 0 ) - if(S_ISREG(st.st_mode) && (access(QFile::encodeName(pidfile), W_OK) == 0)) { - unlink(QFile::encodeName(pidfile)); + if(stat(TQFile::encodeName(pidfile), &st) == 0 ) + if(S_ISREG(st.st_mode) && (access(TQFile::encodeName(pidfile), W_OK) == 0)) { + unlink(TQFile::encodeName(pidfile)); return true; } @@ -436,7 +436,7 @@ void myShutDown() { } void sighandler(int sig) { - QEvent *e = 0L; + TQEvent *e = 0L; if(sig == SIGCHLD) { pid_t id = wait(0L); if(id >= 0 && id == helperPid) // helper process died @@ -446,7 +446,7 @@ void sighandler(int sig) { // let eventFilter() deal with this when we're back in the loop if (e) - QApplication::postEvent(p_kppp, e); + TQApplication::postEvent(p_kppp, e); signal(sig, sighandler); // reinstall signal handler } diff --git a/kppp/main.h b/kppp/main.h index a114f983..6551348d 100644 --- a/kppp/main.h +++ b/kppp/main.h @@ -38,7 +38,7 @@ void killpppd(); void sighandler(int); -pid_t execute_command(const QString &); +pid_t execute_command(const TQString &); pid_t create_pidfile(); bool remove_pidfile(); void myShutDown(); diff --git a/kppp/miniterm.cpp b/kppp/miniterm.cpp index 94b342d5..06c01194 100644 --- a/kppp/miniterm.cpp +++ b/kppp/miniterm.cpp @@ -39,24 +39,24 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include extern PPPData gpppdata; -MiniTerm::MiniTerm(QWidget *parent, const char *name) - : QDialog(parent, name, true) +MiniTerm::MiniTerm(TQWidget *parent, const char *name) + : TQDialog(parent, name, true) { setCaption(i18n("Kppp Mini-Terminal")); KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); - m_file = new QPopupMenu(this); - m_file->insertItem( SmallIcon("fileclose"), i18n("&Close"), this, SLOT(cancelbutton()) ); - m_options = new QPopupMenu(this); - m_options->insertItem(i18n("&Reset Modem"),this,SLOT(resetModem())); + m_file = new TQPopupMenu(this); + m_file->insertItem( SmallIcon("fileclose"), i18n("&Close"), this, TQT_SLOT(cancelbutton()) ); + m_options = new TQPopupMenu(this); + m_options->insertItem(i18n("&Reset Modem"),this,TQT_SLOT(resetModem())); m_help = new KHelpMenu(this, i18n("MiniTerm - A terminal emulation for KPPP\n\n" @@ -72,21 +72,21 @@ MiniTerm::MiniTerm(QWidget *parent, const char *name) menubar->insertItem( i18n("&Modem"), m_options ); menubar->insertItem( KStdGuiItem::help().text(), m_help->menu()); - statusbar = new QLabel(this); - statusbar->setFrameStyle(QFrame::Panel | QFrame::Sunken); + statusbar = new TQLabel(this); + statusbar->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); terminal = new MyTerm(this, "term"); setupToolbar(); - QVBoxLayout *layout=new QVBoxLayout(this); + TQVBoxLayout *layout=new TQVBoxLayout(this); layout->addWidget(menubar); layout->addWidget(toolbar); layout->addWidget(terminal); layout->addWidget(statusbar); - inittimer = new QTimer(this); - connect(inittimer,SIGNAL(timeout()),this,SLOT(init())); + inittimer = new TQTimer(this); + connect(inittimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(init())); inittimer->start(500); resize(550,400); @@ -103,16 +103,16 @@ void MiniTerm::setupToolbar() { toolbar = new KToolBar( this ); toolbar->insertButton("exit", 0, - SIGNAL(clicked()), this, - SLOT(cancelbutton()), TRUE, i18n("Close MiniTerm")); + TQT_SIGNAL(clicked()), this, + TQT_SLOT(cancelbutton()), TRUE, i18n("Close MiniTerm")); toolbar->insertButton("back", 0, - SIGNAL(clicked()), this, - SLOT(resetModem()), TRUE, i18n("Reset Modem")); + TQT_SIGNAL(clicked()), this, + TQT_SLOT(resetModem()), TRUE, i18n("Reset Modem")); toolbar->insertButton("help", 0, - SIGNAL(clicked()), this, - SLOT(help()), TRUE, i18n("Help")); + TQT_SIGNAL(clicked()), this, + TQT_SLOT(help()), TRUE, i18n("Help")); toolbar->setBarPos( KToolBar::Top ); toolbar->setMovingEnabled(false); @@ -154,7 +154,7 @@ void MiniTerm::init() { kapp->processEvents(); kapp->processEvents(); - Modem::modem->notify(this, SLOT(readChar(unsigned char))); + Modem::modem->notify(this, TQT_SLOT(readChar(unsigned char))); return; } } @@ -214,7 +214,7 @@ void MiniTerm::resetModem() { } -void MiniTerm::closeEvent( QCloseEvent *e ) { +void MiniTerm::closeEvent( TQCloseEvent *e ) { cancelbutton(); e->accept(); } @@ -225,13 +225,13 @@ void MiniTerm::help() { } -MyTerm::MyTerm(QWidget *parent, const char* name) - : QMultiLineEdit(parent, name) +MyTerm::MyTerm(TQWidget *parent, const char* name) + : TQMultiLineEdit(parent, name) { setFont(KGlobalSettings::fixedFont()); } -void MyTerm::keyPressEvent(QKeyEvent *k) { +void MyTerm::keyPressEvent(TQKeyEvent *k) { // ignore meta keys if (k->ascii() == 0) return; @@ -244,22 +244,22 @@ void MyTerm::keyPressEvent(QKeyEvent *k) { void MyTerm::insertChar(unsigned char c) { - QMultiLineEdit::insert(QChar(c)); + TQMultiLineEdit::insert(TQChar(c)); } void MyTerm::newLine() { - QMultiLineEdit::newLine(); + TQMultiLineEdit::newLine(); } void MyTerm::del() { - QMultiLineEdit::del(); + TQMultiLineEdit::del(); } void MyTerm::backspace() { - QMultiLineEdit::backspace(); + TQMultiLineEdit::backspace(); } @@ -269,13 +269,13 @@ void MyTerm::myreturn() { getCursorPosition(&line,&column); for (int i = 0; i < column;i++) - QMultiLineEdit::cursorLeft(); + TQMultiLineEdit::cursorLeft(); } void MyTerm::mynewline() { - QMultiLineEdit::end(FALSE); - QMultiLineEdit::newLine(); + TQMultiLineEdit::end(FALSE); + TQMultiLineEdit::newLine(); } #include "miniterm.moc" diff --git a/kppp/miniterm.h b/kppp/miniterm.h index f6d66549..c1d93bcf 100644 --- a/kppp/miniterm.h +++ b/kppp/miniterm.h @@ -28,10 +28,10 @@ #ifndef _MINITERM_H_ #define _MINITERM_H_ -#include -#include -#include -#include +#include +#include +#include +#include #include class KHelpMenu; @@ -43,12 +43,12 @@ class KHelpMenu; class QPushButton; class QLabel; -class MyTerm : public QMultiLineEdit { +class MyTerm : public TQMultiLineEdit { Q_OBJECT public: - MyTerm(QWidget *parent=0, const char *name=0); + MyTerm(TQWidget *parent=0, const char *name=0); - void keyPressEvent (QKeyEvent*); + void keyPressEvent (TQKeyEvent*); void insertChar(unsigned char c); void newLine(); void backspace(); @@ -58,14 +58,14 @@ public: }; -class MiniTerm : public QDialog { +class MiniTerm : public TQDialog { Q_OBJECT public: - MiniTerm(QWidget *parent=0, const char *name=0); + MiniTerm(TQWidget *parent=0, const char *name=0); ~MiniTerm(); - void closeEvent( QCloseEvent *e ); + void closeEvent( TQCloseEvent *e ); public slots: void cancelbutton(); @@ -77,26 +77,26 @@ public slots: protected: void setupToolbar(); - QPushButton *cancel; + TQPushButton *cancel; MyTerm *terminal; - QTimer *inittimer; + TQTimer *inittimer; - QMenuBar * menubar; + TQMenuBar * menubar; KToolBar * toolbar; - QPopupMenu * m_file; - QPopupMenu * m_edit; - QPopupMenu * m_options; + TQPopupMenu * m_file; + TQPopupMenu * m_edit; + TQPopupMenu * m_options; KHelpMenu * m_help; - QLabel * statusbar; - QPushButton *pb1; - QPushButton *pb2; - QPushButton *pb3; - QPushButton *pb4; - - QPixmap pb1_pixmap; - QPixmap pb2_pixmap; - QPixmap pb3_pixmap; - QPixmap pb4_pixmap; + TQLabel * statusbar; + TQPushButton *pb1; + TQPushButton *pb2; + TQPushButton *pb3; + TQPushButton *pb4; + + TQPixmap pb1_pixmap; + TQPixmap pb2_pixmap; + TQPixmap pb3_pixmap; + TQPixmap pb4_pixmap; }; diff --git a/kppp/modem.cpp b/kppp/modem.cpp index 86ac3169..4d31fe59 100644 --- a/kppp/modem.cpp +++ b/kppp/modem.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include "modem.h" @@ -120,7 +120,7 @@ speed_t Modem::modemspeed() { bool Modem::opentty() { // int flags; - QString device = ""; + TQString device = ""; if (args->isSet("dev")) device = args->getOption("dev"); else @@ -183,7 +183,7 @@ bool Modem::opentty() { // the english/i18n mix below is ugly but we want to keep working // after someone changed the code to use i18n'ed config values - QString flowCtrl = gpppdata.flowcontrol(); + TQString flowCtrl = gpppdata.flowcontrol(); if(flowCtrl != "None" && flowCtrl != i18n("None")) { if(flowCtrl == "CRTSCTS" || flowCtrl == i18n("Hardware [CRTSCTS]")) { tty.c_cflag |= CRTSCTS; @@ -252,14 +252,14 @@ void Modem::readtty(int) { } -void Modem::notify(const QObject *receiver, const char *member) { - connect(this, SIGNAL(charWaiting(unsigned char)), receiver, member); +void Modem::notify(const TQObject *receiver, const char *member) { + connect(this, TQT_SIGNAL(charWaiting(unsigned char)), receiver, member); startNotifier(); } void Modem::stop() { - disconnect(SIGNAL(charWaiting(unsigned char))); + disconnect(TQT_SIGNAL(charWaiting(unsigned char))); stopNotifier(); } @@ -267,11 +267,11 @@ void Modem::stop() { void Modem::startNotifier() { if(modemfd >= 0) { if(sn == 0) { - sn = new QSocketNotifier(modemfd, QSocketNotifier::Read, this); - connect(sn, SIGNAL(activated(int)), SLOT(readtty(int))); - kdDebug(5002) << "QSocketNotifier started!" << endl; + sn = new TQSocketNotifier(modemfd, TQSocketNotifier::Read, this); + connect(sn, TQT_SIGNAL(activated(int)), TQT_SLOT(readtty(int))); + kdDebug(5002) << "TQSocketNotifier started!" << endl; } else { - // Debug("QSocketNotifier re-enabled!"); + // Debug("TQSocketNotifier re-enabled!"); sn->setEnabled(true); } } @@ -284,7 +284,7 @@ void Modem::stopNotifier() { disconnect(sn); delete sn; sn = 0; - kdDebug(5002) << "QSocketNotifier stopped!" << endl; + kdDebug(5002) << "TQSocketNotifier stopped!" << endl; } } @@ -314,7 +314,7 @@ bool Modem::writeLine(const char *buf) { char *b = new char[len+2]; memcpy(b, buf, len); // different modems seem to need different line terminations - QString term = gpppdata.enter(); + TQString term = gpppdata.enter(); if(term == "LF") b[len++]='\n'; else if(term == "CR") @@ -422,7 +422,7 @@ void Modem::escape_to_command_mode() { // +3 because quiet time must be greater than guard time. usleep((gpppdata.modemEscapeGuardTime()+3)*20000); - QCString tmp = gpppdata.modemEscapeStr().local8Bit(); + TQCString tmp = gpppdata.modemEscapeStr().local8Bit(); write(modemfd, tmp.data(), tmp.length()); tcflush(modemfd, TCIOFLUSH); usleep((gpppdata.modemEscapeGuardTime()+3)*20000); @@ -431,35 +431,35 @@ void Modem::escape_to_command_mode() { } -const QString Modem::modemMessage() { +const TQString Modem::modemMessage() { return errmsg; } -QString Modem::parseModemSpeed(const QString &s) { +TQString Modem::parseModemSpeed(const TQString &s) { // this is a small (and bad) parser for modem speeds int rx = -1; int tx = -1; int i; - QString result; + TQString result; kdDebug(5002) << "Modem reported result string: " << s << endl; const int RXMAX = 7; const int TXMAX = 2; - QRegExp rrx[RXMAX] = { - QRegExp("[0-9]+[:/ ]RX", false), - QRegExp("[0-9]+RX", false), - QRegExp("[/: -][0-9]+[/: ]", false), - QRegExp("[/: -][0-9]+$", false), - QRegExp("CARRIER [^0-9]*[0-9]+", false), - QRegExp("CONNECT [^0-9]*[0-9]+", false), - QRegExp("[0-9]+") // panic mode + TQRegExp rrx[RXMAX] = { + TQRegExp("[0-9]+[:/ ]RX", false), + TQRegExp("[0-9]+RX", false), + TQRegExp("[/: -][0-9]+[/: ]", false), + TQRegExp("[/: -][0-9]+$", false), + TQRegExp("CARRIER [^0-9]*[0-9]+", false), + TQRegExp("CONNECT [^0-9]*[0-9]+", false), + TQRegExp("[0-9]+") // panic mode }; - QRegExp trx[TXMAX] = { - QRegExp("[0-9]+[:/ ]TX", false), - QRegExp("[0-9]+TX", false) + TQRegExp trx[TXMAX] = { + TQRegExp("[0-9]+[:/ ]TX", false), + TQRegExp("[0-9]+TX", false) }; for(i = 0; i < RXMAX; i++) { @@ -471,7 +471,7 @@ QString Modem::parseModemSpeed(const QString &s) { // rrx[i] has been matched, idx contains the start of the match // and len contains how long the match is. Extract the match. // - QString sub = s.mid(idx, len); + TQString sub = s.mid(idx, len); // // Now extract the digits only from the match, which will @@ -498,7 +498,7 @@ QString Modem::parseModemSpeed(const QString &s) { // trx[i] has been matched, idx contains the start of the match // and len contains how long the match is. Extract the match. // - QString sub = s.mid(idx, len); + TQString sub = s.mid(idx, len); // // Now extract the digits only from the match, which will then @@ -545,17 +545,17 @@ int Modem::lockdevice() { if (modem_is_locked) return 1; - QString device = ""; + TQString device = ""; if (args->isSet("dev")) device = args->getOption("dev"); else device = gpppdata.modemDevice(); - QString lockfile = LOCK_DIR"/LCK.."; + TQString lockfile = LOCK_DIR"/LCK.."; lockfile += device.mid(5); // append everything after /dev/ - if(access(QFile::encodeName(lockfile), F_OK) == 0) { - if ((fd = Requester::rq->openLockfile(QFile::encodeName(lockfile), O_RDONLY)) >= 0) { + if(access(TQFile::encodeName(lockfile), F_OK) == 0) { + if ((fd = Requester::rq->openLockfile(TQFile::encodeName(lockfile), O_RDONLY)) >= 0) { // Mario: it's not necessary to read more than lets say 32 bytes. If // file has more than 32 bytes, skip the rest char oldlock[33]; // safe diff --git a/kppp/modem.h b/kppp/modem.h index 6999263d..7e8f2376 100644 --- a/kppp/modem.h +++ b/kppp/modem.h @@ -27,13 +27,13 @@ #ifndef _MODEM_H_ #define _MODEM_H_ -#include +#include #include #include #include -#include +#include #include @@ -41,7 +41,7 @@ class KCmdLineArgs; void alarm_handler(int); -class Modem : public QObject { +class Modem : public TQObject { Q_OBJECT public: Modem(); @@ -54,10 +54,10 @@ public: bool writeLine(const char *); bool dataMode() const { return data_mode; } void setDataMode(bool set) { data_mode = set; } - const QString modemMessage(); + const TQString modemMessage(); speed_t modemspeed(); - static QString parseModemSpeed(const QString &); - void notify(const QObject *, const char *); + static TQString parseModemSpeed(const TQString &); + void notify(const TQObject *, const char *); void stop(); void flush(); @@ -81,9 +81,9 @@ private: private: int modemfd; - QSocketNotifier *sn; + TQSocketNotifier *sn; bool data_mode; - QString errmsg; + TQString errmsg; struct termios initial_tty; struct termios tty; bool modem_is_locked; diff --git a/kppp/modemcmds.cpp b/kppp/modemcmds.cpp index 3a34bb4d..04767ede 100644 --- a/kppp/modemcmds.cpp +++ b/kppp/modemcmds.cpp @@ -24,8 +24,8 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include #include // for getMiniIcon() @@ -34,220 +34,220 @@ #include "pppdata.h" #include -#include -#include -#include -#include +#include +#include +#include +#include #define ADJUSTEDIT(e) e->setText("XXXXXXXXqy"); e->setMinimumSize(e->sizeHint()); e->setFixedHeight(e->sizeHint().height()); e->setText(""); e->setMaxLength(MODEMSTR_SIZE); // a little trick to make the label look like a disabled lineedit -#define FORMATSLIDERLABEL(l) l->setFixedWidth(l->sizeHint().width()); l->setFixedHeight(QLineEdit(dummyWidget).sizeHint().height()); l->setAlignment(AlignCenter); l->setFrameStyle(QFrame::WinPanel|QFrame::Sunken); l->setLineWidth(2); +#define FORMATSLIDERLABEL(l) l->setFixedWidth(l->sizeHint().width()); l->setFixedHeight(TQLineEdit(dummyWidget).sizeHint().height()); l->setAlignment(AlignCenter); l->setFrameStyle(TQFrame::WinPanel|TQFrame::Sunken); l->setLineWidth(2); -ModemCommands::ModemCommands(QWidget *parent, const char *name) +ModemCommands::ModemCommands(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Edit Modem Commands"), Ok|Cancel) { KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); - QWidget *dummyWidget = new QWidget(this); + TQWidget *dummyWidget = new TQWidget(this); setMainWidget(dummyWidget); const int GRIDROWS = 22; int row = 0; // toplevel layout - QVBoxLayout *tl = new QVBoxLayout(dummyWidget, 10, 4); + TQVBoxLayout *tl = new TQVBoxLayout(dummyWidget, 10, 4); // add grid + frame - QGridLayout *l1 = new QGridLayout(GRIDROWS, 4); + TQGridLayout *l1 = new TQGridLayout(GRIDROWS, 4); tl->addLayout(l1); - box = new QGroupBox(dummyWidget, "box"); + box = new TQGroupBox(dummyWidget, "box"); l1->addMultiCellWidget(box, row++, GRIDROWS, 0, 3); // put slider and label into a separate H-Box - QHBoxLayout *l2 = new QHBoxLayout; + TQHBoxLayout *l2 = new QHBoxLayout; l1->addLayout(l2, row, 2); - lpreinitslider = new QLabel("MMMM", dummyWidget); + lpreinitslider = new TQLabel("MMMM", dummyWidget); FORMATSLIDERLABEL(lpreinitslider); - preinitslider = new QSlider(0, 300, 1, 0, - QSlider::Horizontal, dummyWidget); + preinitslider = new TQSlider(0, 300, 1, 0, + TQSlider::Horizontal, dummyWidget); preinitslider->setFixedHeight(preinitslider->sizeHint().height()); - connect(preinitslider, SIGNAL(valueChanged(int)), - lpreinitslider, SLOT(setNum(int))); + connect(preinitslider, TQT_SIGNAL(valueChanged(int)), + lpreinitslider, TQT_SLOT(setNum(int))); l2->addWidget(lpreinitslider, 0); l2->addWidget(preinitslider, 1); - lpreinit = new QLabel(i18n("Pre-init delay (sec/100):"), dummyWidget); + lpreinit = new TQLabel(i18n("Pre-init delay (sec/100):"), dummyWidget); l1->addWidget(lpreinit, row++, 1); for(int i = 0; i < PPPData::NumInitStrings; i++) { - initstr[i] = new QLineEdit(dummyWidget); - QLabel *initLabel = new QLabel(i18n("Initialization string %1:").arg(i + 1), + initstr[i] = new TQLineEdit(dummyWidget); + TQLabel *initLabel = new TQLabel(i18n("Initialization string %1:").arg(i + 1), dummyWidget); ADJUSTEDIT(initstr[i]); l1->addWidget(initLabel, row, 1); l1->addWidget(initstr[i], row++, 2); } - QHBoxLayout *l3 = new QHBoxLayout; + TQHBoxLayout *l3 = new QHBoxLayout; l1->addLayout(l3, row, 2); - linitslider = new QLabel("MMMM", dummyWidget); + linitslider = new TQLabel("MMMM", dummyWidget); FORMATSLIDERLABEL(linitslider); - initslider = new QSlider(1, 300, 1, 0, - QSlider::Horizontal, dummyWidget); + initslider = new TQSlider(1, 300, 1, 0, + TQSlider::Horizontal, dummyWidget); initslider->setFixedHeight(initslider->sizeHint().height()); - connect(initslider, SIGNAL(valueChanged(int)), - linitslider, SLOT(setNum(int))); + connect(initslider, TQT_SIGNAL(valueChanged(int)), + linitslider, TQT_SLOT(setNum(int))); l3->addWidget(linitslider, 0); l3->addWidget(initslider, 1); - label3 = new QLabel(i18n("Post-init delay (sec/100):"), dummyWidget); + label3 = new TQLabel(i18n("Post-init delay (sec/100):"), dummyWidget); l1->addWidget(label3, row++, 1); /* Set ATS11 (Dial tone duration) between 0-255 (Default ~ 70) */ - QHBoxLayout *l4 = new QHBoxLayout; + TQHBoxLayout *l4 = new QHBoxLayout; l1->addLayout(l4, row, 2); - ldurationslider = new QLabel("MMMM", dummyWidget); + ldurationslider = new TQLabel("MMMM", dummyWidget); FORMATSLIDERLABEL(ldurationslider); - durationslider = new QSlider(1, 255, 1, 0, - QSlider::Horizontal, dummyWidget); + durationslider = new TQSlider(1, 255, 1, 0, + TQSlider::Horizontal, dummyWidget); durationslider->setFixedHeight(durationslider->sizeHint().height()); - connect(durationslider, SIGNAL(valueChanged(int)), - ldurationslider, SLOT(setNum(int))); + connect(durationslider, TQT_SIGNAL(valueChanged(int)), + ldurationslider, TQT_SLOT(setNum(int))); l4->addWidget(ldurationslider, 0); l4->addWidget(durationslider, 1); - lduration = new QLabel(i18n("Dialing speed (sec/100):"), dummyWidget); + lduration = new TQLabel(i18n("Dialing speed (sec/100):"), dummyWidget); l1->addWidget(lduration, row++, 1); - initresp = new QLineEdit(dummyWidget); - label2 = new QLabel(i18n("Init &response:"), dummyWidget); + initresp = new TQLineEdit(dummyWidget); + label2 = new TQLabel(i18n("Init &response:"), dummyWidget); label2->setBuddy(initresp); ADJUSTEDIT(initresp); l1->addWidget(label2, row, 1); l1->addWidget(initresp, row++, 2); - nodetectdialtone = new QLineEdit(dummyWidget); - lnodetectdialtone = new QLabel(i18n("No di&al tone detection:"), dummyWidget); + nodetectdialtone = new TQLineEdit(dummyWidget); + lnodetectdialtone = new TQLabel(i18n("No di&al tone detection:"), dummyWidget); lnodetectdialtone->setBuddy(nodetectdialtone); ADJUSTEDIT(nodetectdialtone); l1->addWidget(lnodetectdialtone, row, 1); l1->addWidget(nodetectdialtone, row++, 2); - dialstr = new QLineEdit(dummyWidget); - label4 = new QLabel(i18n("Dial &string:"),dummyWidget); + dialstr = new TQLineEdit(dummyWidget); + label4 = new TQLabel(i18n("Dial &string:"),dummyWidget); label4->setBuddy(dialstr); ADJUSTEDIT(dialstr); l1->addWidget(label4, row, 1); l1->addWidget(dialstr, row++, 2); - connectresp = new QLineEdit(dummyWidget); - label5 = new QLabel(i18n("Co&nnect response:"), dummyWidget); + connectresp = new TQLineEdit(dummyWidget); + label5 = new TQLabel(i18n("Co&nnect response:"), dummyWidget); label5->setBuddy(connectresp); ADJUSTEDIT(connectresp); l1->addWidget(label5, row, 1); l1->addWidget(connectresp, row++, 2); - busyresp = new QLineEdit(dummyWidget); - label6 = new QLabel(i18n("Busy response:"), dummyWidget); + busyresp = new TQLineEdit(dummyWidget); + label6 = new TQLabel(i18n("Busy response:"), dummyWidget); ADJUSTEDIT(busyresp); l1->addWidget(label6, row, 1); l1->addWidget(busyresp, row++, 2); - nocarrierresp = new QLineEdit(dummyWidget); - label7 = new QLabel(i18n("No carr&ier response:"), dummyWidget); + nocarrierresp = new TQLineEdit(dummyWidget); + label7 = new TQLabel(i18n("No carr&ier response:"), dummyWidget); label7->setBuddy(nocarrierresp); ADJUSTEDIT(nocarrierresp); l1->addWidget(label7, row, 1); l1->addWidget(nocarrierresp, row++, 2); - nodialtoneresp = new QLineEdit(dummyWidget); - label8 = new QLabel(i18n("No dial tone response:"), dummyWidget); + nodialtoneresp = new TQLineEdit(dummyWidget); + label8 = new TQLabel(i18n("No dial tone response:"), dummyWidget); ADJUSTEDIT(nodialtoneresp); l1->addWidget(label8, row, 1); l1->addWidget(nodialtoneresp, row++, 2); - hangupstr = new QLineEdit(dummyWidget); - label9 = new QLabel(i18n("&Hangup string:"), dummyWidget); + hangupstr = new TQLineEdit(dummyWidget); + label9 = new TQLabel(i18n("&Hangup string:"), dummyWidget); label9->setBuddy(hangupstr); ADJUSTEDIT(hangupstr); l1->addWidget(label9, row, 1); l1->addWidget(hangupstr, row++, 2); - hangupresp = new QLineEdit(dummyWidget); - label10 = new QLabel(i18n("Hangup response:"), dummyWidget); + hangupresp = new TQLineEdit(dummyWidget); + label10 = new TQLabel(i18n("Hangup response:"), dummyWidget); ADJUSTEDIT(hangupresp); l1->addWidget(label10, row, 1); l1->addWidget(hangupresp, row++, 2); - answerstr = new QLineEdit(dummyWidget); - label11 = new QLabel(i18n("Answ&er string:"), dummyWidget); + answerstr = new TQLineEdit(dummyWidget); + label11 = new TQLabel(i18n("Answ&er string:"), dummyWidget); label11->setBuddy(answerstr); ADJUSTEDIT(answerstr); l1->addWidget(label11, row, 1); l1->addWidget(answerstr, row++, 2); - ringresp = new QLineEdit(dummyWidget); - label12 = new QLabel(i18n("Ring response:"), dummyWidget); + ringresp = new TQLineEdit(dummyWidget); + label12 = new TQLabel(i18n("Ring response:"), dummyWidget); ADJUSTEDIT(ringresp); l1->addWidget(label12, row, 1); l1->addWidget(ringresp, row++, 2); - answerresp = new QLineEdit(dummyWidget); - label13 = new QLabel(i18n("Ans&wer response:"), dummyWidget); + answerresp = new TQLineEdit(dummyWidget); + label13 = new TQLabel(i18n("Ans&wer response:"), dummyWidget); label13->setBuddy(answerresp); ADJUSTEDIT(answerresp); l1->addWidget(label13, row, 1); l1->addWidget(answerresp, row++, 2); - dlpresp = new QLineEdit(dummyWidget); - label17 = new QLabel(i18n("DLP response:"), dummyWidget); + dlpresp = new TQLineEdit(dummyWidget); + label17 = new TQLabel(i18n("DLP response:"), dummyWidget); ADJUSTEDIT(dlpresp); l1->addWidget(label17, row, 1); l1->addWidget(dlpresp, row++, 2); - escapestr = new QLineEdit(dummyWidget); - label14 = new QLabel(i18n("Escape strin&g:"), dummyWidget); + escapestr = new TQLineEdit(dummyWidget); + label14 = new TQLabel(i18n("Escape strin&g:"), dummyWidget); label14->setBuddy(escapestr); ADJUSTEDIT(escapestr); l1->addWidget(label14, row, 1); l1->addWidget(escapestr, row++, 2); - escaperesp = new QLineEdit(dummyWidget); - label15 = new QLabel(i18n("Escape response:"), dummyWidget); + escaperesp = new TQLineEdit(dummyWidget); + label15 = new TQLabel(i18n("Escape response:"), dummyWidget); ADJUSTEDIT(escaperesp); l1->addWidget(label15, row, 1); l1->addWidget(escaperesp, row++, 2); - QHBoxLayout *l5 = new QHBoxLayout; + TQHBoxLayout *l5 = new QHBoxLayout; l1->addLayout(l5, row, 2); - lslider = new QLabel("MMMM", dummyWidget); + lslider = new TQLabel("MMMM", dummyWidget); FORMATSLIDERLABEL(lslider); - slider = new QSlider(0, 255, 1, 0, - QSlider::Horizontal, dummyWidget); + slider = new TQSlider(0, 255, 1, 0, + TQSlider::Horizontal, dummyWidget); slider->setFixedHeight(slider->sizeHint().height()); - connect(slider, SIGNAL(valueChanged(int)), - lslider, SLOT(setNum(int))); + connect(slider, TQT_SIGNAL(valueChanged(int)), + lslider, TQT_SLOT(setNum(int))); l5->addWidget(lslider, 0); l5->addWidget(slider, 1); - label16 = new QLabel(i18n("Guard time (sec/50):"), dummyWidget); + label16 = new TQLabel(i18n("Guard time (sec/50):"), dummyWidget); l1->addWidget(label16, row++, 1); - QLabel *l = new QLabel(i18n("Volume off/low/high:"), dummyWidget); + TQLabel *l = new TQLabel(i18n("Volume off/low/high:"), dummyWidget); l1->addWidget(l, row, 1); - QHBoxLayout *l6 = new QHBoxLayout; + TQHBoxLayout *l6 = new QHBoxLayout; l1->addLayout(l6, row++, 2); - volume_off = new QLineEdit(dummyWidget); + volume_off = new TQLineEdit(dummyWidget); volume_off->setFixedHeight(volume_off->sizeHint().height()); volume_off->setMinimumWidth((int)(volume_off->sizeHint().width() / 2)); - volume_medium = new QLineEdit(dummyWidget); + volume_medium = new TQLineEdit(dummyWidget); volume_medium->setFixedHeight(volume_medium->sizeHint().height()); volume_medium->setMinimumWidth((int)(volume_medium->sizeHint().width() / 2)); - volume_high = new QLineEdit(dummyWidget); + volume_high = new TQLineEdit(dummyWidget); volume_high->setFixedHeight(volume_high->sizeHint().height()); volume_high->setMinimumWidth((int)(volume_high->sizeHint().width() / 2)); l6->addWidget(volume_off); diff --git a/kppp/modemcmds.h b/kppp/modemcmds.h index 72f66895..7779471b 100644 --- a/kppp/modemcmds.h +++ b/kppp/modemcmds.h @@ -31,11 +31,11 @@ #ifndef _MODEMCMDS_H_ #define _MODEMCMDS_H_ -#include +#include #include -#include -#include -#include +#include +#include +#include #include class QLineEdit; @@ -49,7 +49,7 @@ Q_OBJECT public: - ModemCommands(QWidget *parent=0, const char *name=0); + ModemCommands(TQWidget *parent=0, const char *name=0); ~ModemCommands() {} private slots: @@ -58,72 +58,72 @@ private slots: private: - QGroupBox *box; + TQGroupBox *box; - QLineEdit *initstr[int(PPPData::NumInitStrings)]; + TQLineEdit *initstr[int(PPPData::NumInitStrings)]; - QLineEdit *initresp; - QLabel *label2; + TQLineEdit *initresp; + TQLabel *label2; - QSlider *preinitslider; - QLabel *lpreinitslider; - QLabel *lpreinit; + TQSlider *preinitslider; + TQLabel *lpreinitslider; + TQLabel *lpreinit; - QSlider *initslider; - QLabel *linitslider; - QLabel *label3; + TQSlider *initslider; + TQLabel *linitslider; + TQLabel *label3; - QSlider *durationslider; - QLabel *ldurationslider; - QLabel *lduration; + TQSlider *durationslider; + TQLabel *ldurationslider; + TQLabel *lduration; - QLineEdit *nodetectdialtone; - QLabel *lnodetectdialtone; + TQLineEdit *nodetectdialtone; + TQLabel *lnodetectdialtone; - QLineEdit *dialstr; - QLabel *label4; + TQLineEdit *dialstr; + TQLabel *label4; - QLineEdit *connectresp; - QLabel *label5; + TQLineEdit *connectresp; + TQLabel *label5; - QLineEdit *busyresp; - QLabel *label6; + TQLineEdit *busyresp; + TQLabel *label6; - QLineEdit *nocarrierresp; - QLabel *label7; + TQLineEdit *nocarrierresp; + TQLabel *label7; - QLineEdit *nodialtoneresp; - QLabel *label8; + TQLineEdit *nodialtoneresp; + TQLabel *label8; - QLineEdit *hangupstr; - QLabel *label9; + TQLineEdit *hangupstr; + TQLabel *label9; - QLineEdit *hangupresp; - QLabel *label10; + TQLineEdit *hangupresp; + TQLabel *label10; - QLineEdit *answerstr; - QLabel *label11; + TQLineEdit *answerstr; + TQLabel *label11; - QLineEdit *ringresp; - QLabel *label12; + TQLineEdit *ringresp; + TQLabel *label12; - QLineEdit *answerresp; - QLabel *label13; + TQLineEdit *answerresp; + TQLabel *label13; - QLineEdit *escapestr; - QLabel *label14; + TQLineEdit *escapestr; + TQLabel *label14; - QLineEdit *escaperesp; - QLineEdit *dlpresp; - QLabel *label17; + TQLineEdit *escaperesp; + TQLineEdit *dlpresp; + TQLabel *label17; - QLabel *label15; + TQLabel *label15; - QSlider *slider; - QLabel *lslider; - QLabel *label16; + TQSlider *slider; + TQLabel *lslider; + TQLabel *label16; - QLineEdit *volume_off, *volume_medium, *volume_high; + TQLineEdit *volume_off, *volume_medium, *volume_high; }; #endif diff --git a/kppp/modemdb.cpp b/kppp/modemdb.cpp index c86be0fc..d762f5fa 100644 --- a/kppp/modemdb.cpp +++ b/kppp/modemdb.cpp @@ -32,21 +32,21 @@ // //--------------------------------------------------------------------------- -#include +#include #include -#include +#include #include "modemdb.h" #include -#include -#include +#include +#include #include #include -ModemSelector::ModemSelector(QWidget *parent) : QDialog(parent, 0, true) { +ModemSelector::ModemSelector(TQWidget *parent) : TQDialog(parent, 0, true) { // set up widgets and such setCaption(i18n("Select Modem Type")); - QVBoxLayout *tl = new QVBoxLayout(this, 10, 10); - QLabel *l1 = new QLabel(i18n("To set up your modem, first choose its vendor in the " + TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10); + TQLabel *l1 = new TQLabel(i18n("To set up your modem, first choose its vendor in the " "list to the left, and then select the model from the " "right list. If you don't know which modem you have, " "you can try out one of the \"Generic\" modems."), @@ -58,10 +58,10 @@ ModemSelector::ModemSelector(QWidget *parent) : QDialog(parent, 0, true) { tl->addSpacing(10); - QHBoxLayout *tl1 = new QHBoxLayout(10); + TQHBoxLayout *tl1 = new TQHBoxLayout(10); tl->addLayout(tl1, 1); - vendor = new QListBox(this); - model = new QListBox(this); + vendor = new TQListBox(this); + model = new TQListBox(this); vendor->setMinimumSize(200, 130); model->setMinimumSize(200, 130); tl1->addWidget(vendor, 2); @@ -81,16 +81,16 @@ ModemSelector::ModemSelector(QWidget *parent) : QDialog(parent, 0, true) { db = new ModemDatabase(); // set up signal/slots - connect(ok, SIGNAL(clicked()), - this, SLOT(reject())); - connect(cancel, SIGNAL(clicked()), - this, SLOT(reject())); - connect(vendor, SIGNAL(highlighted(int)), - this, SLOT(vendorSelected(int))); - connect(model, SIGNAL(highlighted(int)), - this, SLOT(modelSelected(int))); - connect(model, SIGNAL(selected(int)), - this, SLOT(selected(int))); + connect(ok, TQT_SIGNAL(clicked()), + this, TQT_SLOT(reject())); + connect(cancel, TQT_SIGNAL(clicked()), + this, TQT_SLOT(reject())); + connect(vendor, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(vendorSelected(int))); + connect(model, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(modelSelected(int))); + connect(model, TQT_SIGNAL(selected(int)), + this, TQT_SLOT(selected(int))); // fill vendor list with life vendor->insertStringList(*db->vendors()); @@ -107,8 +107,8 @@ ModemSelector::~ModemSelector() { void ModemSelector::vendorSelected(int idx) { ok->setEnabled(false); - QString name = vendor->text(idx); - QStringList *models = db->models(name); + TQString name = vendor->text(idx); + TQStringList *models = db->models(name); model->clear(); model->insertStringList(*models); @@ -139,14 +139,14 @@ ModemDatabase::~ModemDatabase() { } -const QStringList *ModemDatabase::vendors() { +const TQStringList *ModemDatabase::vendors() { return lvendors; } -QStringList *ModemDatabase::models(QString vendor) { - QStringList *sl = new QStringList; - QString s = i18n(""); +TQStringList *ModemDatabase::models(TQString vendor) { + TQStringList *sl = new QStringList; + TQString s = i18n(""); if(vendor == s) vendor = i18n(""); @@ -163,11 +163,11 @@ QStringList *ModemDatabase::models(QString vendor) { } -void ModemDatabase::loadModem(const QString &key, CharDict &dict) { +void ModemDatabase::loadModem(const TQString &key, CharDict &dict) { // KEntryIterator *it = modemDB->entryIterator(key); // KEntryDictEntry *e; - QMap map; - QMap ::Iterator it; + TQMap map; + TQMap ::Iterator it; // KEntryMapConstIterator e; KEntry e; map = modemDB->entryMap(key); @@ -180,14 +180,14 @@ void ModemDatabase::loadModem(const QString &key, CharDict &dict) { // e = it->current(); while(!it.key().isNull()) { if(dict.find(it.key()) == 0) { - dict.insert(it.key(), new QString(it.data())); + dict.insert(it.key(), new TQString(it.data())); } it++; } // check name attribute if(dict["Name"] == 0 || key[0]=='!') { - dict.replace("Name", new QString(key)); + dict.replace("Name", new TQString(key)); } // check parent attribute @@ -206,8 +206,8 @@ void ModemDatabase::load() { lvendors = new QStringList; modems.setAutoDelete(true); - QStringList list = modemDB->groupList(); - QStringList::Iterator it = list.begin(); + TQStringList list = modemDB->groupList(); + TQStringList::Iterator it = list.begin(); while(it != list.end()) { modemDB->setGroup(*it); CharDict *c = new CharDict; @@ -216,16 +216,16 @@ void ModemDatabase::load() { // if(strcmp(it->latin1(), "Common") == 0) { if(*it == "Common") { - QString s = i18n("Hayes(tm) compatible modem"); - c->replace("Name", new QString (s)); + TQString s = i18n("Hayes(tm) compatible modem"); + c->replace("Name", new TQString (s)); s = i18n(""); - c->replace("Vendor", new QString(s)); + c->replace("Vendor", new TQString(s)); } modems.append(c); if(modemDB->hasKey("Vendor")) { - QString vendor = modemDB->readEntry("Vendor"); + TQString vendor = modemDB->readEntry("Vendor"); if(lvendors->findIndex(vendor) == -1) lvendors->append(vendor); } diff --git a/kppp/modemdb.h b/kppp/modemdb.h index 92606697..35ddbcff 100644 --- a/kppp/modemdb.h +++ b/kppp/modemdb.h @@ -35,40 +35,40 @@ #ifndef __MODEMDB__H__ #define __MODEMDB__H__ -#include -#include -#include -#include +#include +#include +#include +#include class KConfig; class QListBox; -typedef QDict CharDict; +typedef TQDict CharDict; class ModemDatabase { public: ModemDatabase(); ~ModemDatabase(); - const QStringList *vendors(); - QStringList *models(QString vendor); + const TQStringList *vendors(); + TQStringList *models(TQString vendor); void save(KConfig *); private: void load(); - void loadModem(const QString & key, CharDict &dict); - QPtrList modems; + void loadModem(const TQString & key, CharDict &dict); + TQPtrList modems; - QStringList *lvendors; + TQStringList *lvendors; KConfig *modemDB; }; -class ModemSelector : public QDialog { +class ModemSelector : public TQDialog { Q_OBJECT public: - ModemSelector(QWidget *parent = 0); + ModemSelector(TQWidget *parent = 0); ~ModemSelector(); private slots: @@ -77,8 +77,8 @@ private slots: void selected(int idx); private: - QPushButton *ok, *cancel; - QListBox *vendor, *model; + TQPushButton *ok, *cancel; + TQListBox *vendor, *model; ModemDatabase *db; }; diff --git a/kppp/modeminfo.cpp b/kppp/modeminfo.cpp index bf7ed8dd..9e6668d8 100644 --- a/kppp/modeminfo.cpp +++ b/kppp/modeminfo.cpp @@ -25,8 +25,8 @@ */ #include -#include -#include +#include +#include #include #include #include @@ -35,19 +35,19 @@ #include "modem.h" #include -ModemTransfer::ModemTransfer(QWidget *parent, const char *name) - : QDialog(parent, name,TRUE, WStyle_Customize|WStyle_NormalBorder) +ModemTransfer::ModemTransfer(TQWidget *parent, const char *name) + : TQDialog(parent, name,TRUE, WStyle_Customize|WStyle_NormalBorder) { setCaption(i18n("ATI Query")); KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); - QVBoxLayout *tl = new QVBoxLayout(this, 10, 10); + TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10); progressBar = new KProgress(this, "bar"); progressBar->setTotalSteps(8); - statusBar = new QLabel(this,"sBar"); - statusBar->setFrameStyle(QFrame::Panel|QFrame::Sunken); + statusBar = new TQLabel(this,"sBar"); + statusBar->setFrameStyle(TQFrame::Panel|TQFrame::Sunken); statusBar->setAlignment(AlignCenter); // This is a rather complicated case. Since we do not know which @@ -67,9 +67,9 @@ ModemTransfer::ModemTransfer(QWidget *parent, const char *name) cancel = new KPushButton(KStdGuiItem::cancel(), this); cancel->setFocus(); - connect(cancel, SIGNAL(clicked()), SLOT(cancelbutton())); + connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(cancelbutton())); - QHBoxLayout *l1 = new QHBoxLayout; + TQHBoxLayout *l1 = new QHBoxLayout; tl->addLayout(l1); l1->addStretch(1); l1->addWidget(cancel); @@ -80,14 +80,14 @@ ModemTransfer::ModemTransfer(QWidget *parent, const char *name) //////////////////////////////////////////////// - timeout_timer = new QTimer(this); - connect(timeout_timer, SIGNAL(timeout()), SLOT(time_out_slot())); + timeout_timer = new TQTimer(this); + connect(timeout_timer, TQT_SIGNAL(timeout()), TQT_SLOT(time_out_slot())); - scripttimer = new QTimer(this); - connect(scripttimer, SIGNAL(timeout()), SLOT(do_script())); + scripttimer = new TQTimer(this); + connect(scripttimer, TQT_SIGNAL(timeout()), TQT_SLOT(do_script())); timeout_timer->start(15000,TRUE); // 15 secs single shot - QTimer::singleShot(500, this, SLOT(init())); + TQTimer::singleShot(500, this, TQT_SLOT(init())); } @@ -151,7 +151,7 @@ void ModemTransfer::init() { // clear modem buffer Modem::modem->flush(); - Modem::modem->notify(this, SLOT(readChar(unsigned char))); + Modem::modem->notify(this, TQT_SLOT(readChar(unsigned char))); return; } } @@ -164,8 +164,8 @@ void ModemTransfer::init() { void ModemTransfer::do_script() { - QString msg; - QString query; + TQString msg; + TQString query; switch(step) { case 0: @@ -207,7 +207,7 @@ void ModemTransfer::readtty() { if (step == 0) return; - readbuffer.replace(QRegExp("[\n\r]")," "); // remove stray \n and \r + readbuffer.replace(TQRegExp("[\n\r]")," "); // remove stray \n and \r readbuffer = readbuffer.stripWhiteSpace(); // strip of leading or trailing white // space @@ -234,23 +234,23 @@ void ModemTransfer::cancelbutton() { } -void ModemTransfer::closeEvent( QCloseEvent *e ) { +void ModemTransfer::closeEvent( TQCloseEvent *e ) { cancelbutton(); e->accept(); } -ModemInfo::ModemInfo(QWidget *parent, const char* name) - : QDialog(parent, name, TRUE, WStyle_Customize|WStyle_NormalBorder) +ModemInfo::ModemInfo(TQWidget *parent, const char* name) + : TQDialog(parent, name, TRUE, WStyle_Customize|WStyle_NormalBorder) { - QString label_text; + TQString label_text; setCaption(i18n("Modem Query Results")); KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); - QVBoxLayout *tl = new QVBoxLayout(this, 10, 10); + TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10); - QGridLayout *l1 = new QGridLayout(NUM_OF_ATI, 2, 5); + TQGridLayout *l1 = new TQGridLayout(NUM_OF_ATI, 2, 5); tl->addLayout(l1, 1); for(int i = 0 ; i < NUM_OF_ATI ; i++) { @@ -260,31 +260,31 @@ ModemInfo::ModemInfo(QWidget *parent, const char* name) else label_text.sprintf("ATI %d:", i ); - ati_label[i] = new QLabel(label_text, this); + ati_label[i] = new TQLabel(label_text, this); l1->addWidget(ati_label[i], i, 0); - ati_label_result[i] = new QLineEdit(this); + ati_label_result[i] = new TQLineEdit(this); ati_label_result[i]->setMinimumWidth(fontMetrics().width('H') * 24); l1->addWidget(ati_label_result[i], i, 1); } //tl->addSpacing(1); - QHBoxLayout *l2 = new QHBoxLayout; - QPushButton *ok = new KPushButton(KStdGuiItem::close(), this); + TQHBoxLayout *l2 = new QHBoxLayout; + TQPushButton *ok = new KPushButton(KStdGuiItem::close(), this); ok->setDefault(TRUE); ok->setFocus(); tl->addLayout(l2); l2->addStretch(1); - connect(ok, SIGNAL(clicked()), SLOT(accept())); + connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(accept())); l2->addWidget(ok); setMinimumSize(sizeHint()); } -void ModemInfo::setAtiString(int i, QString s) { +void ModemInfo::setAtiString(int i, TQString s) { if(i < NUM_OF_ATI) ati_label_result[i]->setText(s); } diff --git a/kppp/modeminfo.h b/kppp/modeminfo.h index dae93161..0298ecdd 100644 --- a/kppp/modeminfo.h +++ b/kppp/modeminfo.h @@ -28,21 +28,21 @@ #ifndef _MODEMINFO_H_ #define _MODEMINFO_H_ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include const int NUM_OF_ATI = 8; -class ModemTransfer : public QDialog { +class ModemTransfer : public TQDialog { Q_OBJECT public: - ModemTransfer(QWidget *parent=0, const char *name=0); + ModemTransfer(TQWidget *parent=0, const char *name=0); public slots: void init(); @@ -56,33 +56,33 @@ private: void ati_done(); protected: - void closeEvent(QCloseEvent *e); + void closeEvent(TQCloseEvent *e); private: int step; - QString readbuffer; + TQString readbuffer; - QPushButton *cancel; + TQPushButton *cancel; KProgress *progressBar; - QLabel *statusBar; + TQLabel *statusBar; - QTimer *timeout_timer; - QTimer *scripttimer; - QString ati_query_strings[NUM_OF_ATI]; + TQTimer *timeout_timer; + TQTimer *scripttimer; + TQString ati_query_strings[NUM_OF_ATI]; }; -class ModemInfo : public QDialog { +class ModemInfo : public TQDialog { Q_OBJECT public: - ModemInfo(QWidget *parent=0, const char *name=0); + ModemInfo(TQWidget *parent=0, const char *name=0); public: - void setAtiString(int num, QString s); + void setAtiString(int num, TQString s); private: - QLabel *ati_label[NUM_OF_ATI]; - QLineEdit *ati_label_result[NUM_OF_ATI]; + TQLabel *ati_label[NUM_OF_ATI]; + TQLineEdit *ati_label_result[NUM_OF_ATI]; }; #endif diff --git a/kppp/modems.cpp b/kppp/modems.cpp index f6970cc1..379b3c96 100644 --- a/kppp/modems.cpp +++ b/kppp/modems.cpp @@ -25,12 +25,12 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include "general.h" #include "pppdata.h" @@ -50,29 +50,29 @@ void parseargs(char* buf, char** args); -ModemsWidget::ModemsWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) +ModemsWidget::ModemsWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { int min = 0; - QVBoxLayout *l1 = new QVBoxLayout(parent, 10, 10); + TQVBoxLayout *l1 = new TQVBoxLayout(parent, 10, 10); // add a hbox - QHBoxLayout *l11 = new QHBoxLayout; + TQHBoxLayout *l11 = new QHBoxLayout; l1->addLayout(l11); - modemlist_l = new QListBox(parent); + modemlist_l = new TQListBox(parent); modemlist_l->setMinimumSize(160, 128); - connect(modemlist_l, SIGNAL(highlighted(int)), - this, SLOT(slotListBoxSelect(int))); - connect(modemlist_l, SIGNAL(selected(int)), - this, SLOT(editmodem())); + connect(modemlist_l, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(slotListBoxSelect(int))); + connect(modemlist_l, TQT_SIGNAL(selected(int)), + this, TQT_SLOT(editmodem())); l11->addWidget(modemlist_l, 10); - QVBoxLayout *l111 = new QVBoxLayout; + TQVBoxLayout *l111 = new QVBoxLayout; l11->addLayout(l111, 1); - edit_b = new QPushButton(i18n("&Edit..."), parent); - connect(edit_b, SIGNAL(clicked()), SLOT(editmodem())); - QWhatsThis::add(edit_b, i18n("Allows you to modify the selected account")); + edit_b = new TQPushButton(i18n("&Edit..."), parent); + connect(edit_b, TQT_SIGNAL(clicked()), TQT_SLOT(editmodem())); + TQWhatsThis::add(edit_b, i18n("Allows you to modify the selected account")); min = edit_b->sizeHint().width(); min = QMAX(70,min); @@ -80,32 +80,32 @@ ModemsWidget::ModemsWidget( QWidget *parent, const char *name ) l111->addWidget(edit_b); - new_b = new QPushButton(i18n("&New..."), parent); - connect(new_b, SIGNAL(clicked()), SLOT(newmodem())); + new_b = new TQPushButton(i18n("&New..."), parent); + connect(new_b, TQT_SIGNAL(clicked()), TQT_SLOT(newmodem())); l111->addWidget(new_b); - QWhatsThis::add(new_b, i18n("Create a new dialup connection\n" + TQWhatsThis::add(new_b, i18n("Create a new dialup connection\n" "to the Internet")); - copy_b = new QPushButton(i18n("Co&py"), parent); - connect(copy_b, SIGNAL(clicked()), SLOT(copymodem())); + copy_b = new TQPushButton(i18n("Co&py"), parent); + connect(copy_b, TQT_SIGNAL(clicked()), TQT_SLOT(copymodem())); l111->addWidget(copy_b); - QWhatsThis::add(copy_b, + TQWhatsThis::add(copy_b, i18n("Makes a copy of the selected account. All\n" "settings of the selected account are copied\n" "to a new account that you can modify to fit your\n" "needs")); - delete_b = new QPushButton(i18n("De&lete"), parent); - connect(delete_b, SIGNAL(clicked()), SLOT(deletemodem())); + delete_b = new TQPushButton(i18n("De&lete"), parent); + connect(delete_b, TQT_SIGNAL(clicked()), TQT_SLOT(deletemodem())); l111->addWidget(delete_b); - QWhatsThis::add(delete_b, + TQWhatsThis::add(delete_b, i18n("

    Deletes the selected account\n\n" "Use with care!")); //load up account list from gppdata to the list box // but keep the current one selected in gpppdata if(gpppdata.modemCount() > 0) { - const QString currentmodem = gpppdata.modname(); + const TQString currentmodem = gpppdata.modname(); for(int i=0; i <= gpppdata.modemCount()-1; i++) { gpppdata.setModemByIndex(i); modemlist_l->insertItem(gpppdata.modname()); @@ -125,7 +125,7 @@ void ModemsWidget::slotListBoxSelect(int idx) { edit_b->setEnabled((bool)(idx != -1)); copy_b->setEnabled((bool)(idx != -1)); if(idx!=-1) { - QString modem = gpppdata.modname(); + TQString modem = gpppdata.modname(); gpppdata.setModemByIndex(modemlist_l->currentItem()); gpppdata.setModem(modem); } @@ -136,7 +136,7 @@ void ModemsWidget::editmodem() { int result = doTab(); - if(result == QDialog::Accepted) { + if(result == TQDialog::Accepted) { modemlist_l->changeItem(gpppdata.modname(),modemlist_l->currentItem()); emit resetmodems(); gpppdata.save(); @@ -157,7 +157,7 @@ void ModemsWidget::newmodem() { result = doTab(); - if(result == QDialog::Accepted) { + if(result == TQDialog::Accepted) { modemlist_l->insertItem(gpppdata.modname()); modemlist_l->setSelected(modemlist_l->findItem(gpppdata.modname()), true); @@ -189,7 +189,7 @@ void ModemsWidget::copymodem() { void ModemsWidget::deletemodem() { - QString s = i18n("Are you sure you want to delete\nthe modem \"%1\"?") + TQString s = i18n("Are you sure you want to delete\nthe modem \"%1\"?") .arg(modemlist_l->text(modemlist_l->currentItem())); if(KMessageBox::warningContinueCancel(this, s, i18n("Confirm"), KStdGuiItem::del()) != KMessageBox::Continue) @@ -207,7 +207,7 @@ void ModemsWidget::deletemodem() { int ModemsWidget::doTab(){ - tabWindow = new KDialogBase( KDialogBase::Tabbed, QString::null, + tabWindow = new KDialogBase( KDialogBase::Tabbed, TQString::null, KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, 0, 0, true); KWin::setIcons(tabWindow->winId(), kapp->icon(), kapp->miniIcon()); @@ -217,14 +217,14 @@ int ModemsWidget::doTab(){ tabWindow->setCaption(i18n("New Modem")); isnewmodem = true; } else { - QString tit = i18n("Edit Modem: "); + TQString tit = i18n("Edit Modem: "); tit += gpppdata.modname(); tabWindow->setCaption(tit); isnewmodem = false; } modem1 = new ModemWidget(tabWindow->addPage( i18n("&Device"), i18n("Serial Device")), isnewmodem ); modem2 = new ModemWidget2(tabWindow->addPage( i18n("&Modem"), i18n("Modem Settings"))); - connect ( modem1->connectName(), SIGNAL(textChanged ( const QString & )), this, SLOT(modemNameChanged(const QString & ))); + connect ( modem1->connectName(), TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(modemNameChanged(const TQString & ))); modemNameChanged(modem1->connectName()->text()); int result = 0; @@ -234,7 +234,7 @@ int ModemsWidget::doTab(){ result = tabWindow->exec(); ok = true; - if(result == QDialog::Accepted) { + if(result == TQDialog::Accepted) { if(modem1->save()) { modem2->save(); } else { @@ -249,15 +249,15 @@ int ModemsWidget::doTab(){ return result; } -void ModemsWidget::modemNameChanged(const QString & text) +void ModemsWidget::modemNameChanged(const TQString & text) { tabWindow->enableButtonOK( !text.isEmpty() ); } -QString ModemsWidget::prettyPrintVolume(unsigned int n) { +TQString ModemsWidget::prettyPrintVolume(unsigned int n) { int idx = 0; - const QString quant[] = {i18n("Byte"), i18n("KB"), - i18n("MB"), i18n("GB"), QString::null}; + const TQString quant[] = {i18n("Byte"), i18n("KB"), + i18n("MB"), i18n("GB"), TQString::null}; float n1 = n; while(n >= 1024 && !quant[idx].isNull()) { @@ -269,7 +269,7 @@ QString ModemsWidget::prettyPrintVolume(unsigned int n) { while(i--) n1 = n1 / 1024.0; - QString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 ); + TQString s = KGlobal::locale()->formatNumber( n1, idx==0 ? 0 : 1 ); s += " " + quant[idx]; return s; } diff --git a/kppp/modems.h b/kppp/modems.h index 6676b7be..b197980e 100644 --- a/kppp/modems.h +++ b/kppp/modems.h @@ -28,9 +28,9 @@ #ifndef _MODEMS_H_ #define _MODEMS_H_ -#include -#include -#include +#include +#include +#include #include "acctselect.h" class KDialogBase; @@ -43,10 +43,10 @@ class IPWidget; class DNSWidget; class GatewayWidget; -class ModemsWidget : public QWidget { +class ModemsWidget : public TQWidget { Q_OBJECT public: - ModemsWidget( QWidget *parent=0, const char *name=0 ); + ModemsWidget( TQWidget *parent=0, const char *name=0 ); ~ModemsWidget() {} private slots: @@ -55,7 +55,7 @@ private slots: void newmodem(); void deletemodem(); void slotListBoxSelect(int); - void modemNameChanged(const QString &); + void modemNameChanged(const TQString &); private: int doTab(); @@ -64,7 +64,7 @@ signals: void resetmodems(); private: - QString prettyPrintVolume(unsigned int); + TQString prettyPrintVolume(unsigned int); KDialogBase *tabWindow; ModemWidget *modem1; @@ -76,16 +76,16 @@ private: GatewayWidget *gateway_w; ScriptWidget *script_w;*/ - QLabel *costlabel; - QLineEdit *costedit; - QLabel *vollabel; - QLineEdit *voledit; + TQLabel *costlabel; + TQLineEdit *costedit; + TQLabel *vollabel; + TQLineEdit *voledit; - QListBox *modemlist_l; - QPushButton *edit_b; - QPushButton *copy_b; - QPushButton *new_b; - QPushButton *delete_b; + TQListBox *modemlist_l; + TQPushButton *edit_b; + TQPushButton *copy_b; + TQPushButton *new_b; + TQPushButton *delete_b; }; #endif diff --git a/kppp/newwidget.cpp b/kppp/newwidget.cpp index d2182fba..ba8508e5 100644 --- a/kppp/newwidget.cpp +++ b/kppp/newwidget.cpp @@ -6,8 +6,8 @@ #include "newwidget.h" -QLineEdit *newLineEdit(int visiblewidth, QWidget *parent) { - QLineEdit *l = new QLineEdit(parent); +TQLineEdit *newLineEdit(int visiblewidth, TQWidget *parent) { + TQLineEdit *l = new TQLineEdit(parent); if(visiblewidth == 0) l->setMinimumWidth(l->sizeHint().width()); else diff --git a/kppp/newwidget.h b/kppp/newwidget.h index 52f2ec76..2cb2e717 100644 --- a/kppp/newwidget.h +++ b/kppp/newwidget.h @@ -7,13 +7,13 @@ #ifndef __NEWWIDGET__H__ #define __NEWWIDGET__H__ -#include -#include +#include +#include #define L_FIXEDW 1 #define L_FIXEDH 2 #define L_FIXED (L_FIXEDW | L_FIXEDH) -QLineEdit *newLineEdit(int visiblewidth, QWidget *parent); +TQLineEdit *newLineEdit(int visiblewidth, TQWidget *parent); #endif diff --git a/kppp/pppdargs.cpp b/kppp/pppdargs.cpp index ca235c6e..f03103bb 100644 --- a/kppp/pppdargs.cpp +++ b/kppp/pppdargs.cpp @@ -25,65 +25,65 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include #include #include #include "pppdargs.h" #include "pppdata.h" #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include -PPPdArguments::PPPdArguments(QWidget *parent, const char *name) - : QDialog(parent, name, TRUE) +PPPdArguments::PPPdArguments(TQWidget *parent, const char *name) + : TQDialog(parent, name, TRUE) { setCaption(i18n("Customize pppd Arguments")); KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); - QVBoxLayout *l = new QVBoxLayout(this, 10, 10); - QHBoxLayout *tl = new QHBoxLayout(10); + TQVBoxLayout *l = new TQVBoxLayout(this, 10, 10); + TQHBoxLayout *tl = new TQHBoxLayout(10); l->addLayout(tl); - QVBoxLayout *l1 = new QVBoxLayout(); - QVBoxLayout *l2 = new QVBoxLayout(); + TQVBoxLayout *l1 = new TQVBoxLayout(); + TQVBoxLayout *l2 = new TQVBoxLayout(); tl->addLayout(l1, 1); tl->addLayout(l2, 0); - QHBoxLayout *l11 = new QHBoxLayout(10); + TQHBoxLayout *l11 = new TQHBoxLayout(10); l1->addLayout(l11); - argument_label = new QLabel(i18n("Arg&ument:"), this); + argument_label = new TQLabel(i18n("Arg&ument:"), this); l11->addWidget(argument_label); - argument = new QLineEdit(this); + argument = new TQLineEdit(this); argument_label->setBuddy(argument); - connect(argument, SIGNAL(returnPressed()), - SLOT(addbutton())); + connect(argument, TQT_SIGNAL(returnPressed()), + TQT_SLOT(addbutton())); l11->addWidget(argument); - connect(argument, SIGNAL(textChanged(const QString &)), - this, SLOT(textChanged(const QString &))); + connect(argument, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(textChanged(const TQString &))); - arguments = new QListBox(this); + arguments = new TQListBox(this); arguments->setMinimumSize(1, fontMetrics().lineSpacing()*10); - connect(arguments, SIGNAL(highlighted(int)), - this, SLOT(itemSelected(int))); + connect(arguments, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(itemSelected(int))); l1->addWidget(arguments, 1); - add = new QPushButton(i18n("&Add"), this); - connect(add, SIGNAL(clicked()), SLOT(addbutton())); + add = new TQPushButton(i18n("&Add"), this); + connect(add, TQT_SIGNAL(clicked()), TQT_SLOT(addbutton())); l2->addWidget(add); l2->addStretch(1); - remove = new QPushButton(i18n("&Remove"), this); - connect(remove, SIGNAL(clicked()), SLOT(removebutton())); + remove = new TQPushButton(i18n("&Remove"), this); + connect(remove, TQT_SIGNAL(clicked()), TQT_SLOT(removebutton())); l2->addWidget(remove); defaults = new KPushButton(KStdGuiItem::defaults(), this); - connect(defaults, SIGNAL(clicked()), SLOT(defaultsbutton())); + connect(defaults, TQT_SIGNAL(clicked()), TQT_SLOT(defaultsbutton())); l2->addWidget(defaults); l->addSpacing(5); @@ -91,10 +91,10 @@ PPPdArguments::PPPdArguments(QWidget *parent, const char *name) KButtonBox *bbox = new KButtonBox(this); bbox->addStretch(1); closebtn = bbox->addButton(KStdGuiItem::ok()); - connect(closebtn, SIGNAL(clicked()), SLOT(closebutton())); - QPushButton *cancel = bbox->addButton(KStdGuiItem::cancel()); - connect(cancel, SIGNAL(clicked()), - this, SLOT(reject())); + connect(closebtn, TQT_SIGNAL(clicked()), TQT_SLOT(closebutton())); + TQPushButton *cancel = bbox->addButton(KStdGuiItem::cancel()); + connect(cancel, TQT_SIGNAL(clicked()), + this, TQT_SLOT(reject())); bbox->layout(); l->addWidget(bbox); @@ -126,7 +126,7 @@ void PPPdArguments::removebutton() { void PPPdArguments::defaultsbutton() { // all of this is a hack // save current list - QStringList arglist(gpppdata.pppdArgument()); + TQStringList arglist(gpppdata.pppdArgument()); // get defaults gpppdata.setpppdArgumentDefaults(); @@ -138,7 +138,7 @@ void PPPdArguments::defaultsbutton() { void PPPdArguments::closebutton() { - QStringList arglist; + TQStringList arglist; for(uint i=0; i < arguments->count(); i++) arglist.append(arguments->text(i)); gpppdata.setpppdArgument(arglist); @@ -151,15 +151,15 @@ void PPPdArguments::init() { while(arguments->count()) arguments->removeItem(0); - QStringList &arglist = gpppdata.pppdArgument(); - for ( QStringList::Iterator it = arglist.begin(); + TQStringList &arglist = gpppdata.pppdArgument(); + for ( TQStringList::Iterator it = arglist.begin(); it != arglist.end(); ++it ) arguments->insertItem(*it); } -void PPPdArguments::textChanged(const QString &s) { +void PPPdArguments::textChanged(const TQString &s) { add->setEnabled(s.length() > 0); } diff --git a/kppp/pppdargs.h b/kppp/pppdargs.h index 4c98b487..9e60764e 100644 --- a/kppp/pppdargs.h +++ b/kppp/pppdargs.h @@ -28,7 +28,7 @@ #ifndef _PPPDARGS_H_ #define _PPPDARGS_H_ -#include +#include class QListBox; class QLabel; @@ -37,10 +37,10 @@ class QLineEdit; class KPushButton; -class PPPdArguments : public QDialog { +class PPPdArguments : public TQDialog { Q_OBJECT public: - PPPdArguments(QWidget *parent=0, const char *name=0); + PPPdArguments(TQWidget *parent=0, const char *name=0); ~PPPdArguments() {} private slots: @@ -48,23 +48,23 @@ private slots: void removebutton(); void defaultsbutton(); void closebutton(); - void textChanged(const QString &); + void textChanged(const TQString &); void itemSelected(int); private: void init(); - QLabel *argument_label; + TQLabel *argument_label; - QLineEdit *argument; + TQLineEdit *argument; - QPushButton *add; - QPushButton *remove; + TQPushButton *add; + TQPushButton *remove; KPushButton *defaults; - QListBox *arguments; + TQListBox *arguments; - QPushButton *closebtn; + TQPushButton *closebtn; }; #endif diff --git a/kppp/pppdata.cpp b/kppp/pppdata.cpp index 56b2c580..2c43d7f7 100644 --- a/kppp/pppdata.cpp +++ b/kppp/pppdata.cpp @@ -96,8 +96,8 @@ bool PPPData::open() { { config->setGroup("Modem"); - QMap map = config->entryMap("Modem"); - QMap ::ConstIterator it = map.begin(); + TQMap map = config->entryMap("Modem"); + TQMap ::ConstIterator it = map.begin(); newmodem(); @@ -107,7 +107,7 @@ bool PPPData::open() { it++; } - QString newname("Modem0"); + TQString newname("Modem0"); setModname(newname); } @@ -163,8 +163,8 @@ int PPPData::access() const { // functions to read/write date to configuration file -QString PPPData::readConfig(const QString &group, const QString &key, - const QString &defvalue = "") +TQString PPPData::readConfig(const TQString &group, const TQString &key, + const TQString &defvalue = "") { if (config) { config->setGroup(group); @@ -174,7 +174,7 @@ QString PPPData::readConfig(const QString &group, const QString &key, } -int PPPData::readNumConfig(const QString &group, const QString &key, +int PPPData::readNumConfig(const TQString &group, const TQString &key, int defvalue) { if (config) { config->setGroup(group); @@ -185,8 +185,8 @@ int PPPData::readNumConfig(const QString &group, const QString &key, } -bool PPPData::readListConfig(const QString &group, const QString &key, - QStringList &list, char sep) { +bool PPPData::readListConfig(const TQString &group, const TQString &key, + TQStringList &list, char sep) { list.clear(); if (config) { config->setGroup(group); @@ -197,8 +197,8 @@ bool PPPData::readListConfig(const QString &group, const QString &key, } -void PPPData::writeConfig(const QString &group, const QString &key, - const QString &value) { +void PPPData::writeConfig(const TQString &group, const TQString &key, + const TQString &value) { if (config) { config->setGroup(group); config->writeEntry(key, value); @@ -206,7 +206,7 @@ void PPPData::writeConfig(const QString &group, const QString &key, } -void PPPData::writeConfig(const QString &group, const QString &key, int value) { +void PPPData::writeConfig(const TQString &group, const TQString &key, int value) { if (config) { config->setGroup(group); config->writeEntry(key, value); @@ -214,8 +214,8 @@ void PPPData::writeConfig(const QString &group, const QString &key, int value) { } -void PPPData::writeListConfig(const QString &group, const QString &key, - QStringList &list, char sep) { +void PPPData::writeListConfig(const TQString &group, const TQString &key, + TQStringList &list, char sep) { if (config) { config->setGroup(group); config->writeEntry(key, list, sep); @@ -226,22 +226,22 @@ void PPPData::writeListConfig(const QString &group, const QString &key, // // functions to set/return general information // -QString PPPData::password() const { +TQString PPPData::password() const { return passwd; } -void PPPData::setPassword(const QString &pw) { +void PPPData::setPassword(const TQString &pw) { passwd = pw; } -const QString PPPData::defaultAccount() { +const TQString PPPData::defaultAccount() { return readConfig(GENERAL_GRP, DEFAULTACCOUNT_KEY); } -void PPPData::setDefaultAccount(const QString &n) { +void PPPData::setDefaultAccount(const TQString &n) { writeConfig(GENERAL_GRP, DEFAULTACCOUNT_KEY, n); //now set the current account index to the default account @@ -249,12 +249,12 @@ void PPPData::setDefaultAccount(const QString &n) { } -const QString PPPData::defaultModem() { +const TQString PPPData::defaultModem() { return readConfig(GENERAL_GRP, DEFAULTMODEM_KEY); } -void PPPData::setDefaultModem(const QString &n) { +void PPPData::setDefaultModem(const TQString &n) { writeConfig(GENERAL_GRP, DEFAULTMODEM_KEY, n); //now set the current modem index to the default modem @@ -349,8 +349,8 @@ void PPPData::set_dock_into_panel(bool set) { } -QString PPPData::pppdVersion() { - return QString("%1.%2.%3").arg(pppdVer).arg(pppdMod).arg(pppdPatch); +TQString PPPData::pppdVersion() { + return TQString("%1.%2.%3").arg(pppdVer).arg(pppdMod).arg(pppdPatch); } bool PPPData::pppdVersionMin(int ver, int mod, int patch) { @@ -380,7 +380,7 @@ int PPPData::modemCount() const { } -bool PPPData::setModem(const QString &mname) { +bool PPPData::setModem(const TQString &mname) { for(int i = 0; i <= modemhighcount; i++) { setModemByIndex(i); if(modname() == mname) { @@ -402,7 +402,7 @@ bool PPPData::setModemByIndex(int i) { } -bool PPPData::isUniqueModname(const QString &n) { +bool PPPData::isUniqueModname(const TQString &n) { int current = cmodem; for(int i=0; i <= modemhighcount; i++) { setModemByIndex(i); @@ -420,8 +420,8 @@ bool PPPData::deleteModem() { if(cmodem < 0) return false; - QMap map; - QMap ::Iterator it; + TQMap map; + TQMap ::Iterator it; // set all entries of the current modem to "" map = config->entryMap(cmodemgroup); @@ -463,7 +463,7 @@ bool PPPData::deleteModem() { return true; } -bool PPPData::deleteModem(const QString &mname) { +bool PPPData::deleteModem(const TQString &mname) { if(!setModem(mname)) return false; @@ -495,10 +495,10 @@ int PPPData::copymodem(int i) { setModemByIndex(i); - QMap map = config->entryMap(cmodemgroup); - QMap ::ConstIterator it = map.begin(); + TQMap map = config->entryMap(cmodemgroup); + TQMap ::ConstIterator it = map.begin(); - QString newname = i18n("%1_copy").arg(modname()); + TQString newname = i18n("%1_copy").arg(modname()); newmodem(); @@ -514,11 +514,11 @@ int PPPData::copymodem(int i) { } -const QString PPPData::modname() { +const TQString PPPData::modname() { return readConfig(cmodemgroup, MOD_NAME_KEY); } -void PPPData::setModname(const QString &n) { +void PPPData::setModname(const TQString &n) { if(!cmodemgroup.isNull()) { // are we manipulating the default modem's name ? then change it, too. bool def = modname() == defaultModem(); @@ -531,29 +531,29 @@ void PPPData::setModname(const QString &n) { -const QString PPPData::modemDevice() { +const TQString PPPData::modemDevice() { return readConfig (cmodemgroup, MODEMDEV_KEY, devices[DEV_DEFAULT]); } -void PPPData::setModemDevice(const QString &n) { +void PPPData::setModemDevice(const TQString &n) { writeConfig(cmodemgroup, MODEMDEV_KEY, n); } -QString PPPData::flowcontrol() { +TQString PPPData::flowcontrol() { // keep default value in sync with general.cpp return readConfig(cmodemgroup, FLOWCONTROL_KEY, i18n("Hardware [CRTSCTS]")); } -void PPPData::setFlowcontrol(const QString &n) { +void PPPData::setFlowcontrol(const TQString &n) { writeConfig(cmodemgroup, FLOWCONTROL_KEY, n); } -const QString PPPData::speed() { - QString s = readConfig(cmodemgroup, SPEED_KEY, "57600"); +const TQString PPPData::speed() { + TQString s = readConfig(cmodemgroup, SPEED_KEY, "57600"); // undo the damage of a bug in former versions. It left an empty Speed= // entry in kppprc. kppp did set the serial port to 57600 as default but // pppd wouldn't receive the speed via the command line. @@ -563,7 +563,7 @@ const QString PPPData::speed() { } -void PPPData::setSpeed(const QString &n) { +void PPPData::setSpeed(const TQString &n) { writeConfig(cmodemgroup, SPEED_KEY, n); } @@ -579,22 +579,22 @@ int PPPData::UseCDLine() { } #endif -const QString PPPData::modemEscapeStr() { +const TQString PPPData::modemEscapeStr() { return readConfig(cmodemgroup,ESCAPESTR_KEY,"+++"); } -void PPPData::setModemEscapeStr(const QString &n) { +void PPPData::setModemEscapeStr(const TQString &n) { writeConfig(cmodemgroup,ESCAPESTR_KEY,n); } -const QString PPPData::modemEscapeResp() { +const TQString PPPData::modemEscapeResp() { return readConfig(cmodemgroup,ESCAPERESP_KEY,"OK"); } -void PPPData::setModemEscapeResp(const QString &n) { +void PPPData::setModemEscapeResp(const TQString &n) { writeConfig(cmodemgroup,ESCAPERESP_KEY,n); } @@ -653,28 +653,28 @@ void PPPData::setbusyWait(int n) { //Advanced "Modem" dialog // // defaults: InitString=ATZ, InitString1="" etc. -const QString PPPData::modemInitStr(int i) { +const TQString PPPData::modemInitStr(int i) { assert(i >= 0 && i < NumInitStrings); if(i == 0) return readConfig(cmodemgroup, INITSTR_KEY, "ATZ"); else - return readConfig(cmodemgroup, INITSTR_KEY + QString::number(i), ""); + return readConfig(cmodemgroup, INITSTR_KEY + TQString::number(i), ""); } -void PPPData::setModemInitStr(int i, const QString &n) { +void PPPData::setModemInitStr(int i, const TQString &n) { assert(i >= 0 && i < NumInitStrings); - QString k = INITSTR_KEY + (i > 0 ? QString::number(i) : ""); + TQString k = INITSTR_KEY + (i > 0 ? TQString::number(i) : ""); writeConfig(cmodemgroup, k, n); } -const QString PPPData::modemInitResp() { +const TQString PPPData::modemInitResp() { return readConfig(cmodemgroup, INITRESP_KEY, "OK"); } -void PPPData::setModemInitResp(const QString &n) { +void PPPData::setModemInitResp(const TQString &n) { writeConfig(cmodemgroup, INITRESP_KEY, n); } @@ -698,133 +698,133 @@ void PPPData::setModemInitDelay(int n) { writeConfig(cmodemgroup, INITDELAY_KEY, n); } -QString PPPData::modemNoDialToneDetectionStr() { +TQString PPPData::modemNoDialToneDetectionStr() { return readConfig(cmodemgroup, NODTDETECT_KEY, "ATX3"); } -void PPPData::setModemNoDialToneDetectionStr(const QString &n) { +void PPPData::setModemNoDialToneDetectionStr(const TQString &n) { writeConfig(cmodemgroup, NODTDETECT_KEY, n); } -const QString PPPData::modemDialStr() { +const TQString PPPData::modemDialStr() { return readConfig(cmodemgroup, DIALSTR_KEY, "ATDT"); } -void PPPData::setModemDialStr(const QString &n) { +void PPPData::setModemDialStr(const TQString &n) { writeConfig(cmodemgroup, DIALSTR_KEY, n); } -const QString PPPData::modemConnectResp() { +const TQString PPPData::modemConnectResp() { return readConfig(cmodemgroup, CONNECTRESP_KEY, "CONNECT"); } -void PPPData::setModemConnectResp(const QString &n) { +void PPPData::setModemConnectResp(const TQString &n) { writeConfig(cmodemgroup, CONNECTRESP_KEY, n); } -const QString PPPData::modemBusyResp() { +const TQString PPPData::modemBusyResp() { return readConfig(cmodemgroup, BUSYRESP_KEY, "BUSY"); } -void PPPData::setModemBusyResp(const QString &n) { +void PPPData::setModemBusyResp(const TQString &n) { writeConfig(cmodemgroup, BUSYRESP_KEY, n); } -const QString PPPData::modemNoCarrierResp() { +const TQString PPPData::modemNoCarrierResp() { return readConfig(cmodemgroup, NOCARRIERRESP_KEY, "NO CARRIER"); } -void PPPData::setModemNoCarrierResp(const QString &n) { +void PPPData::setModemNoCarrierResp(const TQString &n) { writeConfig(cmodemgroup, NOCARRIERRESP_KEY, n); } -const QString PPPData::modemNoDialtoneResp() { +const TQString PPPData::modemNoDialtoneResp() { return readConfig(cmodemgroup, NODIALTONERESP_KEY, "NO DIALTONE"); } -void PPPData::setModemNoDialtoneResp(const QString &n) { +void PPPData::setModemNoDialtoneResp(const TQString &n) { writeConfig(cmodemgroup, NODIALTONERESP_KEY, n); } -const QString PPPData::modemHangupStr() { +const TQString PPPData::modemHangupStr() { return readConfig(cmodemgroup, HANGUPSTR_KEY, "+++ATH"); } -void PPPData::setModemHangupStr(const QString &n) { +void PPPData::setModemHangupStr(const TQString &n) { writeConfig(cmodemgroup, HANGUPSTR_KEY, n); } -const QString PPPData::modemHangupResp() { +const TQString PPPData::modemHangupResp() { return readConfig(cmodemgroup, HANGUPRESP_KEY, "OK"); } -void PPPData::setModemHangupResp(const QString &n) { +void PPPData::setModemHangupResp(const TQString &n) { writeConfig(cmodemgroup, HANGUPRESP_KEY, n); } -QString PPPData::modemDLPResp() { +TQString PPPData::modemDLPResp() { return readConfig(cmodemgroup, DLPRESP_KEY, "DIGITAL LINE DETECTED"); } -void PPPData::setModemDLPResp(const QString &n) { +void PPPData::setModemDLPResp(const TQString &n) { writeConfig(cmodemgroup, DLPRESP_KEY, n); } -const QString PPPData::modemAnswerStr() { +const TQString PPPData::modemAnswerStr() { return readConfig(cmodemgroup, ANSWERSTR_KEY, "ATA"); } -QString PPPData::volumeOff() { +TQString PPPData::volumeOff() { return readConfig(cmodemgroup, VOLUME_OFF, "M0L0"); } -void PPPData::setVolumeOff(const QString &s) { +void PPPData::setVolumeOff(const TQString &s) { writeConfig(cmodemgroup, VOLUME_OFF, s); } -QString PPPData::volumeMedium() { +TQString PPPData::volumeMedium() { return readConfig(cmodemgroup, VOLUME_MEDIUM, "M1L1"); } -void PPPData::setVolumeMedium(const QString &s) { +void PPPData::setVolumeMedium(const TQString &s) { writeConfig(cmodemgroup, VOLUME_MEDIUM, s); } -QString PPPData::volumeHigh() { - QString tmp = readConfig(cmodemgroup, VOLUME_HIGH, "M1L3"); +TQString PPPData::volumeHigh() { + TQString tmp = readConfig(cmodemgroup, VOLUME_HIGH, "M1L3"); if(tmp == "M1L4") tmp = "M1L3"; return tmp; } -void PPPData::setVolumeHigh(const QString &s) { +void PPPData::setVolumeHigh(const TQString &s) { writeConfig(cmodemgroup, VOLUME_HIGH, s); } -QString PPPData::volumeInitString() { - QString s; +TQString PPPData::volumeInitString() { + TQString s; switch(volume()) { case 0: @@ -861,37 +861,37 @@ void PPPData::setWaitForDialTone(int i) { writeConfig(cmodemgroup, DIALTONEWAIT_KEY, i); } -void PPPData::setModemAnswerStr(const QString &n) { +void PPPData::setModemAnswerStr(const TQString &n) { writeConfig(cmodemgroup, ANSWERSTR_KEY, n); } -const QString PPPData::modemRingResp() { +const TQString PPPData::modemRingResp() { return readConfig(cmodemgroup, RINGRESP_KEY, "RING"); } -void PPPData::setModemRingResp(const QString &n) { +void PPPData::setModemRingResp(const TQString &n) { writeConfig(cmodemgroup, RINGRESP_KEY, n); } -const QString PPPData::modemAnswerResp() { +const TQString PPPData::modemAnswerResp() { return readConfig(cmodemgroup, ANSWERRESP_KEY, "CONNECT"); } -void PPPData::setModemAnswerResp(const QString &n) { +void PPPData::setModemAnswerResp(const TQString &n) { writeConfig(cmodemgroup, ANSWERRESP_KEY, n); } -const QString PPPData::enter() { +const TQString PPPData::enter() { return readConfig(cmodemgroup, ENTER_KEY, "CR"); } -void PPPData::setEnter(const QString &n) { +void PPPData::setEnter(const TQString &n) { writeConfig(cmodemgroup, ENTER_KEY, n); } @@ -906,7 +906,7 @@ int PPPData::accountCount() const { } -bool PPPData::setAccount(const QString &aname) { +bool PPPData::setAccount(const TQString &aname) { for(int i = 0; i <= accounthighcount; i++) { setAccountByIndex(i); if(accname() == aname) { @@ -928,7 +928,7 @@ bool PPPData::setAccountByIndex(int i) { } -bool PPPData::isUniqueAccname(const QString &n) { +bool PPPData::isUniqueAccname(const TQString &n) { if(n.contains(':')) return false; int current = caccount; @@ -948,8 +948,8 @@ bool PPPData::deleteAccount() { if(caccount < 0) return false; - QMap map; - QMap ::Iterator it; + TQMap map; + TQMap ::Iterator it; // set all entries of the current account to "" map = config->entryMap(caccountgroup); @@ -991,7 +991,7 @@ bool PPPData::deleteAccount() { return true; } -bool PPPData::deleteAccount(const QString &aname) { +bool PPPData::deleteAccount(const TQString &aname) { if(!setAccount(aname)) return false; @@ -1023,10 +1023,10 @@ int PPPData::copyaccount(int i) { setAccountByIndex(i); - QMap map = config->entryMap(caccountgroup); - QMap ::ConstIterator it = map.begin(); + TQMap map = config->entryMap(caccountgroup); + TQMap ::ConstIterator it = map.begin(); - QString newname = i18n("%1_copy").arg(accname()); + TQString newname = i18n("%1_copy").arg(accname()); newaccount(); @@ -1042,11 +1042,11 @@ int PPPData::copyaccount(int i) { } -const QString PPPData::accname() { +const TQString PPPData::accname() { return readConfig(caccountgroup, ACC_NAME_KEY); } -void PPPData::setAccname(const QString &n) { +void PPPData::setAccname(const TQString &n) { if(!caccountgroup.isNull()) { // are we manipulating the default account's name ? then change it, too. bool def = accname() == defaultAccount(); @@ -1058,7 +1058,7 @@ void PPPData::setAccname(const QString &n) { #define SEPARATOR_CHAR ':' -QStringList &PPPData::phonenumbers() { +TQStringList &PPPData::phonenumbers() { readListConfig(caccountgroup, PHONENUMBER_KEY, phonelist, SEPARATOR_CHAR); return phonelist; @@ -1066,22 +1066,22 @@ QStringList &PPPData::phonenumbers() { } -const QString PPPData::phonenumber() { +const TQString PPPData::phonenumber() { return readConfig(caccountgroup, PHONENUMBER_KEY); } -void PPPData::setPhonenumber(const QString &n) { +void PPPData::setPhonenumber(const TQString &n) { writeConfig(caccountgroup, PHONENUMBER_KEY, n); } -const QString PPPData::dialPrefix() { +const TQString PPPData::dialPrefix() { return readConfig(caccountgroup, DIAL_PREFIX_KEY, ""); } -void PPPData::setDialPrefix(const QString &s) { +void PPPData::setDialPrefix(const TQString &s) { writeConfig(caccountgroup, DIAL_PREFIX_KEY, s); } @@ -1096,22 +1096,22 @@ void PPPData::setAuthMethod(int value) { } -const QString PPPData::storedUsername() { +const TQString PPPData::storedUsername() { return readConfig(caccountgroup, STORED_USERNAME_KEY, ""); } -void PPPData::setStoredUsername(const QString &b) { +void PPPData::setStoredUsername(const TQString &b) { writeConfig(caccountgroup, STORED_USERNAME_KEY, b); } -const QString PPPData::storedPassword() { +const TQString PPPData::storedPassword() { return readConfig(caccountgroup, STORED_PASSWORD_KEY, ""); } -void PPPData::setStoredPassword(const QString &b) { +void PPPData::setStoredPassword(const TQString &b) { writeConfig(caccountgroup, STORED_PASSWORD_KEY, b); } @@ -1128,11 +1128,11 @@ void PPPData::setCallbackType(int value) { writeConfig(caccountgroup, CALLBACK_TYPE_KEY, value); } -QString PPPData::callbackPhone() { +TQString PPPData::callbackPhone() { return readConfig(caccountgroup, CALLBACK_PHONE_KEY, ""); } -void PPPData::setCallbackPhone(const QString &b) { +void PPPData::setCallbackPhone(const TQString &b) { writeConfig(caccountgroup, CALLBACK_PHONE_KEY, b); } @@ -1144,12 +1144,12 @@ void PPPData::setWaitCallback(bool value) { waitcallback = value; } -const QString PPPData::command_before_connect() { +const TQString PPPData::command_before_connect() { return readConfig(caccountgroup, BEFORE_CONNECT_KEY); } -void PPPData::setCommand_before_connect(const QString &n) { +void PPPData::setCommand_before_connect(const TQString &n) { writeConfig(caccountgroup, BEFORE_CONNECT_KEY, n); } @@ -1159,52 +1159,52 @@ void PPPData::setStorePassword(bool b) { } -const QString PPPData::command_on_connect() { +const TQString PPPData::command_on_connect() { return readConfig(caccountgroup, COMMAND_KEY); } -void PPPData::setCommand_on_connect(const QString &n) { +void PPPData::setCommand_on_connect(const TQString &n) { writeConfig(caccountgroup, COMMAND_KEY, n); } -const QString PPPData::command_on_disconnect() { +const TQString PPPData::command_on_disconnect() { return readConfig(caccountgroup, DISCONNECT_COMMAND_KEY); } -void PPPData::setCommand_on_disconnect(const QString &n) { +void PPPData::setCommand_on_disconnect(const TQString &n) { writeConfig(caccountgroup, DISCONNECT_COMMAND_KEY, n); } -const QString PPPData::command_before_disconnect() { +const TQString PPPData::command_before_disconnect() { return readConfig(caccountgroup, BEFORE_DISCONNECT_KEY); } -void PPPData::setCommand_before_disconnect(const QString &n) { +void PPPData::setCommand_before_disconnect(const TQString &n) { writeConfig(caccountgroup, BEFORE_DISCONNECT_KEY, n); } -const QString PPPData::ipaddr() { +const TQString PPPData::ipaddr() { return readConfig(caccountgroup, IPADDR_KEY); } -void PPPData::setIpaddr(const QString &n) { +void PPPData::setIpaddr(const TQString &n) { writeConfig(caccountgroup, IPADDR_KEY, n); } -const QString PPPData::subnetmask() { +const TQString PPPData::subnetmask() { return readConfig(caccountgroup, SUBNETMASK_KEY); } -void PPPData::setSubnetmask(const QString &n) { +void PPPData::setSubnetmask(const TQString &n) { writeConfig(caccountgroup, SUBNETMASK_KEY, n); } @@ -1239,12 +1239,12 @@ void PPPData::setVolAcctEnabled(int set) { } -const QString PPPData::gateway() { +const TQString PPPData::gateway() { return readConfig(caccountgroup, GATEWAY_KEY); } -void PPPData::setGateway(const QString &n ) { +void PPPData::setGateway(const TQString &n ) { writeConfig(caccountgroup, GATEWAY_KEY, n); } @@ -1281,8 +1281,8 @@ bool PPPData::exDNSDisabled() { } -QStringList &PPPData::dns() { - static QStringList dnslist; +TQStringList &PPPData::dns() { + static TQStringList dnslist; readListConfig(caccountgroup, DNS_KEY, dnslist); while(dnslist.count() > MAX_DNS_ENTRIES) @@ -1292,23 +1292,23 @@ QStringList &PPPData::dns() { } -void PPPData::setDns(QStringList &list) { +void PPPData::setDns(TQStringList &list) { writeListConfig(caccountgroup, DNS_KEY, list); } -const QString PPPData::domain() { +const TQString PPPData::domain() { return readConfig(caccountgroup, DOMAIN_KEY); } -void PPPData::setDomain(const QString &n ) { +void PPPData::setDomain(const TQString &n ) { writeConfig(caccountgroup, DOMAIN_KEY, n); } -QStringList &PPPData::scriptType() { - static QStringList typelist; +TQStringList &PPPData::scriptType() { + static TQStringList typelist; readListConfig(caccountgroup, SCRIPTCOM_KEY, typelist); while(typelist.count() > MAX_SCRIPT_ENTRIES) @@ -1318,13 +1318,13 @@ QStringList &PPPData::scriptType() { } -void PPPData::setScriptType(QStringList &list) { +void PPPData::setScriptType(TQStringList &list) { writeListConfig(caccountgroup, SCRIPTCOM_KEY, list); } -QStringList &PPPData::script() { - static QStringList scriptlist; +TQStringList &PPPData::script() { + static TQStringList scriptlist; readListConfig(caccountgroup, SCRIPTARG_KEY, scriptlist); while(scriptlist.count() > MAX_SCRIPT_ENTRIES) @@ -1334,27 +1334,27 @@ QStringList &PPPData::script() { } -void PPPData::setScript(QStringList &list) { +void PPPData::setScript(TQStringList &list) { writeListConfig(caccountgroup, SCRIPTARG_KEY, list); } -const QString PPPData::accountingFile() { +const TQString PPPData::accountingFile() { return readConfig(caccountgroup, ACCTFILE_KEY); } -void PPPData::setAccountingFile(const QString &n) { +void PPPData::setAccountingFile(const TQString &n) { writeConfig(caccountgroup, ACCTFILE_KEY, n); } -const QString PPPData::totalCosts() { +const TQString PPPData::totalCosts() { return readConfig(caccountgroup, TOTALCOSTS_KEY); } -void PPPData::setTotalCosts(const QString &n) { +void PPPData::setTotalCosts(const TQString &n) { writeConfig(caccountgroup, TOTALCOSTS_KEY, n); } @@ -1368,8 +1368,8 @@ void PPPData::setTotalBytes(int n) { } -QStringList &PPPData::pppdArgument() { - static QStringList arglist; +TQStringList &PPPData::pppdArgument() { + static TQStringList arglist; while(arglist.count() > MAX_PPPD_ARGUMENTS) arglist.remove(arglist.last()); @@ -1379,23 +1379,23 @@ QStringList &PPPData::pppdArgument() { } -void PPPData::setpppdArgument(QStringList &args) { +void PPPData::setpppdArgument(TQStringList &args) { writeListConfig(caccountgroup, PPPDARG_KEY, args); } void PPPData::setpppdArgumentDefaults() { - QStringList arg; + TQStringList arg; setpppdArgument(arg); } // graphing widget void PPPData::setGraphingOptions(bool enable, - QColor bg, - QColor text, - QColor in, - QColor out) + TQColor bg, + TQColor text, + TQColor in, + TQColor out) { if(config) { config->setGroup(GRAPH_GRP); @@ -1408,12 +1408,12 @@ void PPPData::setGraphingOptions(bool enable, } void PPPData::graphingOptions(bool &enable, - QColor &bg, - QColor &text, - QColor &in, - QColor &out) + TQColor &bg, + TQColor &text, + TQColor &in, + TQColor &out) { - QColor c; + TQColor c; if(config) { config->setGroup(GRAPH_GRP); @@ -1464,7 +1464,7 @@ void PPPData::setpppdError(int err) { // window position // void PPPData::winPosConWin(int& p_x, int& p_y) { - QRect desk = KGlobalSettings::splashScreenDesktopGeometry(); + TQRect desk = KGlobalSettings::splashScreenDesktopGeometry(); p_x = readNumConfig(WINPOS_GRP, WINPOS_CONWIN_X, desk.center().x()-160); p_y = readNumConfig(WINPOS_GRP, WINPOS_CONWIN_Y, desk.center().y()-55); } @@ -1475,7 +1475,7 @@ void PPPData::setWinPosConWin(int p_x, int p_y) { } void PPPData::winPosStatWin(int& p_x, int& p_y) { - QRect desk = KGlobalSettings::splashScreenDesktopGeometry(); + TQRect desk = KGlobalSettings::splashScreenDesktopGeometry(); p_x = readNumConfig(WINPOS_GRP, WINPOS_STATWIN_X, desk.center().x()-160); p_y = readNumConfig(WINPOS_GRP, WINPOS_STATWIN_Y, desk.center().y()-55); } diff --git a/kppp/pppdata.h b/kppp/pppdata.h index ac50a315..7879d1fa 100644 --- a/kppp/pppdata.h +++ b/kppp/pppdata.h @@ -31,9 +31,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "kpppconfig.h" @@ -179,29 +179,29 @@ public: int access() const; // read/write access // function to read/write date to configuration file - QString readConfig(const QString &, const QString &, const QString &); - int readNumConfig(const QString &, const QString &, int); - bool readListConfig(const QString &, const QString &, - QStringList &, char sep = ','); - void writeConfig(const QString &, const QString &, const QString &); - void writeConfig(const QString &, const QString &, int); - void writeListConfig(const QString &, const QString &, - QStringList &, char sep = ','); + TQString readConfig(const TQString &, const TQString &, const TQString &); + int readNumConfig(const TQString &, const TQString &, int); + bool readListConfig(const TQString &, const TQString &, + TQStringList &, char sep = ','); + void writeConfig(const TQString &, const TQString &, const TQString &); + void writeConfig(const TQString &, const TQString &, int); + void writeListConfig(const TQString &, const TQString &, + TQStringList &, char sep = ','); // return the current account group - QString currentAccountGroup() { return caccountgroup; } + TQString currentAccountGroup() { return caccountgroup; } // return the current modem group - QString currentModemGroup() { return cmodemgroup; } + TQString currentModemGroup() { return cmodemgroup; } // functions to set/get general kppp info - QString password() const; - void setPassword(const QString &); + TQString password() const; + void setPassword(const TQString &); - const QString defaultAccount(); - void setDefaultAccount(const QString &); + const TQString defaultAccount(); + void setDefaultAccount(const TQString &); - const QString defaultModem(); - void setDefaultModem(const QString &); + const TQString defaultModem(); + void setDefaultModem(const TQString &); void set_xserver_exit_disconnect(bool set); bool get_xserver_exit_disconnect(); @@ -230,10 +230,10 @@ public: void set_dock_into_panel(bool set); bool get_dock_into_panel(); - const QString enter(); - void setEnter(const QString &); + const TQString enter(); + void setEnter(const TQString &); - QString pppdVersion(); + TQString pppdVersion(); bool pppdVersionMin(int ver, int mod, int patch); int pppdTimeout(); @@ -241,18 +241,18 @@ public: // functions to set/get account information int modemCount() const; - bool setModem(const QString &); + bool setModem(const TQString &); bool setModemByIndex(int); - bool isUniqueModname(const QString &); + bool isUniqueModname(const TQString &); bool deleteModem(); - bool deleteModem(const QString &); + bool deleteModem(const TQString &); int newmodem(); int copymodem(int i); - const QString modname(); - void setModname(const QString &); + const TQString modname(); + void setModname(const TQString &); int busyWait(); @@ -264,17 +264,17 @@ public: int modemEscapeGuardTime(); void setModemEscapeGuardTime(int i); - void setModemEscapeStr(const QString &); - const QString modemEscapeStr(); + void setModemEscapeStr(const TQString &); + const TQString modemEscapeStr(); - void setModemEscapeResp(const QString &); - const QString modemEscapeResp(); + void setModemEscapeResp(const TQString &); + const TQString modemEscapeResp(); - const QString modemDevice(); - void setModemDevice(const QString &); + const TQString modemDevice(); + void setModemDevice(const TQString &); - QString flowcontrol(); - void setFlowcontrol(const QString &); + TQString flowcontrol(); + void setFlowcontrol(const TQString &); int modemTimeout(); void setModemTimeout(int); @@ -282,7 +282,7 @@ public: int modemToneDuration(); void setModemToneDuration(int); - QString volumeInitString(); + TQString volumeInitString(); int volume(); void setVolume(int); @@ -290,11 +290,11 @@ public: void setWaitForDialTone(int i); // modem command strings/responses - const QString modemInitStr(int i); - void setModemInitStr(int i, const QString &); + const TQString modemInitStr(int i); + void setModemInitStr(int i, const TQString &); - const QString modemInitResp(); - void setModemInitResp(const QString &); + const TQString modemInitResp(); + void setModemInitResp(const TQString &); int modemPreInitDelay(); void setModemPreInitDelay(int); @@ -302,50 +302,50 @@ public: int modemInitDelay(); void setModemInitDelay(int); - QString modemNoDialToneDetectionStr(); - void setModemNoDialToneDetectionStr(const QString &); + TQString modemNoDialToneDetectionStr(); + void setModemNoDialToneDetectionStr(const TQString &); - const QString modemDialStr(); - void setModemDialStr(const QString &); + const TQString modemDialStr(); + void setModemDialStr(const TQString &); - const QString modemConnectResp(); - void setModemConnectResp(const QString &); + const TQString modemConnectResp(); + void setModemConnectResp(const TQString &); - const QString modemBusyResp(); - void setModemBusyResp(const QString &); + const TQString modemBusyResp(); + void setModemBusyResp(const TQString &); - const QString modemNoCarrierResp(); - void setModemNoCarrierResp(const QString &); + const TQString modemNoCarrierResp(); + void setModemNoCarrierResp(const TQString &); - const QString modemNoDialtoneResp(); - void setModemNoDialtoneResp(const QString &); + const TQString modemNoDialtoneResp(); + void setModemNoDialtoneResp(const TQString &); - const QString modemHangupStr(); - void setModemHangupStr(const QString &); + const TQString modemHangupStr(); + void setModemHangupStr(const TQString &); - const QString modemHangupResp(); - void setModemHangupResp(const QString &); + const TQString modemHangupResp(); + void setModemHangupResp(const TQString &); - QString modemDLPResp(); - void setModemDLPResp(const QString &); + TQString modemDLPResp(); + void setModemDLPResp(const TQString &); - const QString modemAnswerStr(); - void setModemAnswerStr(const QString &); + const TQString modemAnswerStr(); + void setModemAnswerStr(const TQString &); - const QString modemRingResp(); - void setModemRingResp(const QString &); + const TQString modemRingResp(); + void setModemRingResp(const TQString &); - const QString modemAnswerResp(); - void setModemAnswerResp(const QString &); + const TQString modemAnswerResp(); + void setModemAnswerResp(const TQString &); - QString volumeOff(); - void setVolumeOff(const QString &); + TQString volumeOff(); + void setVolumeOff(const TQString &); - QString volumeMedium(); - void setVolumeMedium(const QString &); + TQString volumeMedium(); + void setVolumeMedium(const TQString &); - QString volumeHigh(); - void setVolumeHigh(const QString &); + TQString volumeHigh(); + void setVolumeHigh(const TQString &); #if 0 void setUseCDLine(const int n); @@ -354,34 +354,34 @@ public: // functions to set/get account information int accountCount() const; - bool setAccount(const QString &); + bool setAccount(const TQString &); bool setAccountByIndex(int); - bool isUniqueAccname(const QString &); + bool isUniqueAccname(const TQString &); bool deleteAccount(); - bool deleteAccount(const QString &); + bool deleteAccount(const TQString &); int newaccount(); int copyaccount(int i); - const QString accname(); - void setAccname(const QString &); + const TQString accname(); + void setAccname(const TQString &); - QStringList &phonenumbers(); - const QString phonenumber(); - void setPhonenumber(const QString &); + TQStringList &phonenumbers(); + const TQString phonenumber(); + void setPhonenumber(const TQString &); - const QString dialPrefix(); - void setDialPrefix(const QString &); + const TQString dialPrefix(); + void setDialPrefix(const TQString &); int authMethod(); void setAuthMethod(int); - const QString storedUsername(); - void setStoredUsername(const QString &); + const TQString storedUsername(); + void setStoredUsername(const TQString &); - const QString storedPassword(); - void setStoredPassword(const QString &); + const TQString storedPassword(); + void setStoredPassword(const TQString &); bool storePassword(); void setStorePassword(bool); @@ -389,32 +389,32 @@ public: int callbackType(); void setCallbackType(int); - QString callbackPhone(); - void setCallbackPhone(const QString &); + TQString callbackPhone(); + void setCallbackPhone(const TQString &); bool waitCallback(); void setWaitCallback(bool); - const QString speed(); - void setSpeed(const QString &); + const TQString speed(); + void setSpeed(const TQString &); - const QString command_before_connect(); - void setCommand_before_connect(const QString &); + const TQString command_before_connect(); + void setCommand_before_connect(const TQString &); - const QString command_on_connect(); - void setCommand_on_connect(const QString &); + const TQString command_on_connect(); + void setCommand_on_connect(const TQString &); - const QString command_on_disconnect(); - void setCommand_on_disconnect(const QString &); + const TQString command_on_disconnect(); + void setCommand_on_disconnect(const TQString &); - const QString command_before_disconnect(); - void setCommand_before_disconnect(const QString &); + const TQString command_before_disconnect(); + void setCommand_before_disconnect(const TQString &); - const QString ipaddr(); - void setIpaddr(const QString &); + const TQString ipaddr(); + void setIpaddr(const TQString &); - const QString subnetmask(); - void setSubnetmask(const QString &); + const TQString subnetmask(); + void setSubnetmask(const TQString &); bool AcctEnabled(); void setAcctEnabled(bool set); @@ -431,27 +431,27 @@ public: bool autoname(); void setAutoname(bool set); - const QString gateway(); - void setGateway(const QString &); + const TQString gateway(); + void setGateway(const TQString &); bool defaultroute(); void setDefaultroute(bool set); - QStringList &dns(); - void setDns(QStringList &); + TQStringList &dns(); + void setDns(TQStringList &); - const QString domain(); - void setDomain(const QString &); + const TQString domain(); + void setDomain(const TQString &); - QStringList &scriptType(); - void setScriptType(QStringList &); + TQStringList &scriptType(); + void setScriptType(TQStringList &); - QStringList &script(); - void setScript(QStringList &); + TQStringList &script(); + void setScript(TQStringList &); - QStringList &pppdArgument(); + TQStringList &pppdArgument(); void setpppdArgumentDefaults(); - void setpppdArgument(QStringList &); + void setpppdArgument(TQStringList &); //functions to change/set the child pppd process info bool pppdRunning() const; @@ -461,26 +461,26 @@ public: void setpppdError(int err); // functions to set/query the accounting info - const QString accountingFile(); - void setAccountingFile(const QString &); + const TQString accountingFile(); + void setAccountingFile(const TQString &); - const QString totalCosts(); - void setTotalCosts(const QString &); + const TQString totalCosts(); + void setTotalCosts(const TQString &); int totalBytes(); void setTotalBytes(int); // graphing widget void setGraphingOptions(bool enabled, - QColor bg, - QColor text, - QColor in, - QColor out); + TQColor bg, + TQColor text, + TQColor in, + TQColor out); void graphingOptions(bool &enabled, - QColor &bg, - QColor &text, - QColor &in, - QColor &out); + TQColor &bg, + TQColor &text, + TQColor &in, + TQColor &out); bool graphingEnabled(); // window positions @@ -490,14 +490,14 @@ public: void setWinPosStatWin(int, int); private: - QString passwd; + TQString passwd; KConfig* config; // configuration object int accounthighcount; // index of highest account int caccount; // index of the current account int modemhighcount; // index of highest modem int cmodem; // index of the current modem - QString cmodemgroup; // name of current modem group - QString caccountgroup; // name of current account group + TQString cmodemgroup; // name of current modem group + TQString caccountgroup; // name of current account group pid_t suidprocessid; // process ID of setuid child bool pppdisrunning; // pppd process // daemon @@ -505,7 +505,7 @@ private: int pppdVer, pppdMod, pppdPatch; // pppd version bool waitcallback; // callback waiting flag - QStringList phonelist; + TQStringList phonelist; }; extern PPPData gpppdata; diff --git a/kppp/ppplog.cpp b/kppp/ppplog.cpp index f759377a..96ccaa34 100644 --- a/kppp/ppplog.cpp +++ b/kppp/ppplog.cpp @@ -27,9 +27,9 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include +#include +#include +#include #include #include #include @@ -37,10 +37,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -50,7 +50,7 @@ #include -int PPPL_MakeLog(QStringList &list) { +int PPPL_MakeLog(TQStringList &list) { int pid = -1, newpid; char buffer[1024], *p; const char *pidp; @@ -101,9 +101,9 @@ int PPPL_MakeLog(QStringList &list) { "password=\"", 0}; - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - QCString tmp = (*it).local8Bit(); + TQCString tmp = (*it).local8Bit(); for(int j = 0; keyword[j] != 0; j++) { char *p; @@ -120,8 +120,8 @@ int PPPL_MakeLog(QStringList &list) { } -void PPPL_AnalyseLog(QStringList &list, QStringList &result) { - QString msg; +void PPPL_AnalyseLog(TQStringList &list, TQStringList &result) { + TQString msg; const char *rmsg = "Remote message: "; result.clear(); @@ -160,13 +160,13 @@ void PPPL_AnalyseLog(QStringList &list, QStringList &result) { // scan the log for keywords and try to offer any help - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { // look for remote message int pos = (*it).find(rmsg); if (pos != -1) { - QString str = (*it); + TQString str = (*it); str.remove(0, pos + strlen(rmsg)); if(!str.isEmpty()) { msg = i18n("Notice that the remote system has sent the following" @@ -178,8 +178,8 @@ void PPPL_AnalyseLog(QStringList &list, QStringList &result) { // check in the hint database for(uint k = 0; hints[k].regexp != 0; k++) { - QRegExp rx(hints[k].regexp); - QString l(*it); + TQRegExp rx(hints[k].regexp); + TQString l(*it); if(l.contains(rx)) { result.append(i18n(hints[k].answer)); break; @@ -196,15 +196,15 @@ void PPPL_AnalyseLog(QStringList &list, QStringList &result) { void PPPL_ShowLog() { - QStringList sl, result; + TQStringList sl, result; PPPL_MakeLog(sl); bool foundConnect = false; bool foundLCP = gpppdata.getPPPDebug(); - QString lcp = QString::fromLatin1("[LCP"); - QString conn = QString::fromLatin1("Connect:"); - QStringList::ConstIterator it = sl.begin(); + TQString lcp = TQString::fromLatin1("[LCP"); + TQString conn = TQString::fromLatin1("Connect:"); + TQStringList::ConstIterator it = sl.begin(); for( ; it != sl.end(); it++) { if((*it).find(lcp) >= 0) { foundLCP = true; @@ -219,7 +219,7 @@ void PPPL_ShowLog() { "that pppd was started without the \"debug\" option.\n" "Without this option it's difficult to find out PPP " "problems, so you should turn on the debug option.\n" - "Shall I turn it on now?"), QString::null, i18n("Restart pppd"), i18n("Do Not Restart")); + "Shall I turn it on now?"), TQString::null, i18n("Restart pppd"), i18n("Do Not Restart")); if(result == KMessageBox::Yes) { gpppdata.setPPPDebug(TRUE); @@ -236,19 +236,19 @@ void PPPL_ShowLog() { PPPL_AnalyseLog(sl, result); - QDialog *dlg = new QDialog(0, "", TRUE); + TQDialog *dlg = new TQDialog(0, "", TRUE); dlg->setCaption(i18n("PPP Log")); - QVBoxLayout *tl = new QVBoxLayout(dlg, 10, 10); - QMultiLineEdit *edit = new QMultiLineEdit(dlg); + TQVBoxLayout *tl = new TQVBoxLayout(dlg, 10, 10); + TQMultiLineEdit *edit = new TQMultiLineEdit(dlg); edit->setReadOnly(TRUE); - QLabel *label = new QLabel(i18n("kppp's diagnosis (just guessing):"), dlg); - QMultiLineEdit *diagnosis = new QMultiLineEdit(dlg); + TQLabel *label = new TQLabel(i18n("kppp's diagnosis (just guessing):"), dlg); + TQMultiLineEdit *diagnosis = new TQMultiLineEdit(dlg); diagnosis->setReadOnly(TRUE); KButtonBox *bbox = new KButtonBox(dlg); bbox->addStretch(1); - QPushButton *write = bbox->addButton(i18n("Write to File")); - QPushButton *close = bbox->addButton(KStdGuiItem::close()); + TQPushButton *write = bbox->addButton(i18n("Write to File")); + TQPushButton *close = bbox->addButton(KStdGuiItem::close()); bbox->layout(); edit->setMinimumSize(600, 250); label->setMinimumSize(600, 15); @@ -265,23 +265,23 @@ void PPPL_ShowLog() { for(uint i = 0; i < result.count(); i++) diagnosis->append(*result.at(i)); - dlg->connect(close, SIGNAL(clicked()), - dlg, SLOT(reject())); - dlg->connect(write, SIGNAL(clicked()), - dlg, SLOT(accept())); + dlg->connect(close, TQT_SIGNAL(clicked()), + dlg, TQT_SLOT(reject())); + dlg->connect(write, TQT_SIGNAL(clicked()), + dlg, TQT_SLOT(accept())); if(dlg->exec()) { - QDir d = QDir::home(); - QString s = d.absPath() + "/PPP-logfile"; + TQDir d = TQDir::home(); + TQString s = d.absPath() + "/PPP-logfile"; int old_umask = umask(0077); - FILE *f = fopen(QFile::encodeName(s), "w"); + FILE *f = fopen(TQFile::encodeName(s), "w"); for(uint i = 0; i < sl.count(); i++) fprintf(f, "%s\n", (*sl.at(i)).local8Bit().data()); fclose(f); umask(old_umask); - QString msg = i18n("The PPP log has been saved\nas \"%1\"!\n\nIf you want to send a bug report, or have\nproblems connecting to the Internet, please\nattach this file. It will help the maintainers\nto find the bug and to improve KPPP").arg(s); + TQString msg = i18n("The PPP log has been saved\nas \"%1\"!\n\nIf you want to send a bug report, or have\nproblems connecting to the Internet, please\nattach this file. It will help the maintainers\nto find the bug and to improve KPPP").arg(s); KMessageBox::information(0, msg); } delete dlg; diff --git a/kppp/ppplog.h b/kppp/ppplog.h index 04d09b9f..bb752caf 100644 --- a/kppp/ppplog.h +++ b/kppp/ppplog.h @@ -32,8 +32,8 @@ class QStringList; -int PPPL_MakeLog(QStringList &list); -void PPPL_AnalyseLog(QStringList &list, QStringList &result); +int PPPL_MakeLog(TQStringList &list); +void PPPL_AnalyseLog(TQStringList &list, TQStringList &result); void PPPL_ShowLog(); #endif diff --git a/kppp/pppstatdlg.cpp b/kppp/pppstatdlg.cpp index 8f3910a1..b991da27 100644 --- a/kppp/pppstatdlg.cpp +++ b/kppp/pppstatdlg.cpp @@ -23,17 +23,17 @@ */ -#include -#include +#include +#include #include #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -44,9 +44,9 @@ extern PPPData gpppdata; -PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *, +PPPStatsDlg::PPPStatsDlg(TQWidget *parent, const char *name, TQWidget *, PPPStats *st) - : QWidget(parent, name, 0), + : TQWidget(parent, name, 0), stats(st) { int i; @@ -55,21 +55,21 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *, setCaption(i18n("kppp Statistics")); KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); - QVBoxLayout *tl = new QVBoxLayout(this, 10); - QGridLayout *l1 = new QGridLayout(4, 4); + TQVBoxLayout *tl = new TQVBoxLayout(this, 10); + TQGridLayout *l1 = new TQGridLayout(4, 4); tl->addLayout(l1, 1); - box = new QGroupBox(i18n("Statistics"), this); + box = new TQGroupBox(i18n("Statistics"), this); l1->addMultiCellWidget(box, 0, 3, 0, 3); l1->addRowSpacing(0, fontMetrics().lineSpacing() - 10); l1->setRowStretch(1, 1); l1->setColStretch(1, 1); // inner part of the grid - QVBoxLayout *l11 = new QVBoxLayout; + TQVBoxLayout *l11 = new QVBoxLayout; l1->addLayout(l11, 1, 1); // modem pixmap and IP labels - QHBoxLayout *l111 = new QHBoxLayout; + TQHBoxLayout *l111 = new QHBoxLayout; l11->addLayout(l111); big_modem_both_pixmap = UserIcon("modemboth"); @@ -77,25 +77,25 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *, big_modem_right_pixmap = UserIcon("modemright"); big_modem_none_pixmap = UserIcon("modemnone"); - pixmap_l = new QLabel(this); + pixmap_l = new TQLabel(this); pixmap_l->setMinimumSize(big_modem_both_pixmap.size()); l111->addWidget(pixmap_l, 1); pixmap_l->setAlignment(AlignVCenter|AlignLeft); - QGridLayout *l1112 = new QGridLayout(3, 2); + TQGridLayout *l1112 = new TQGridLayout(3, 2); l111->addLayout(l1112); - ip_address_label1 = new QLabel(this); + ip_address_label1 = new TQLabel(this); ip_address_label1->setText(i18n("Local Addr:")); ip_address_label2 = new IPLineEdit(this); - ip_address_label2->setFocusPolicy(QWidget::NoFocus); + ip_address_label2->setFocusPolicy(TQWidget::NoFocus); - ip_address_label3 = new QLabel(this); + ip_address_label3 = new TQLabel(this); ip_address_label3->setText(i18n("Remote Addr:")); ip_address_label4 = new IPLineEdit(this); - ip_address_label4->setFocusPolicy(QWidget::NoFocus); + ip_address_label4->setFocusPolicy(TQWidget::NoFocus); l1112->addWidget(ip_address_label1, 0, 0); l1112->addWidget(ip_address_label2, 0, 1); @@ -105,18 +105,18 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *, // consumes space on bottom l1112->setRowStretch(2, 1); - QGridLayout *l112 = new QGridLayout(5, 4); + TQGridLayout *l112 = new TQGridLayout(5, 4); l11->addLayout(l112); for(i =0 ; i < 5; i++) { - labela1[i] = new QLabel(this); + labela1[i] = new TQLabel(this); - labela2[i] = new QLabel(this); - labela2[i]->setFrameStyle(QFrame::WinPanel | QFrame::Sunken); + labela2[i] = new TQLabel(this); + labela2[i]->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); - labelb1[i] = new QLabel(this); + labelb1[i] = new TQLabel(this); - labelb2[i] = new QLabel(this); - labelb2[i]->setFrameStyle(QFrame::WinPanel | QFrame::Sunken); + labelb2[i] = new TQLabel(this); + labelb2[i]->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); } labela1[0]->setText(i18n("bytes in")); @@ -155,7 +155,7 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *, l112->setColStretch(3, 1); tl->addSpacing(5); - QHBoxLayout *l12 = new QHBoxLayout; + TQHBoxLayout *l12 = new QHBoxLayout; tl->addLayout(l12); l12->addStretch(1); @@ -164,8 +164,8 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *, gpppdata.graphingOptions(dummy, bg, text, in, out); - graph = new QFrame(this); - graph->setFrameStyle(QFrame::Box | QFrame::Sunken); + graph = new TQFrame(this); + graph->setFrameStyle(TQFrame::Box | TQFrame::Sunken); l1->addMultiCellWidget(graph, 2, 2, 1, 2); graph->setMinimumWidth(300); graph->setFixedHeight(76+4); @@ -174,19 +174,19 @@ PPPStatsDlg::PPPStatsDlg(QWidget *parent, const char *name, QWidget *, cancelbutton = new KPushButton(KStdGuiItem::close(),this, "cancelbutton"); cancelbutton->setFocus(); - connect(cancelbutton, SIGNAL(clicked()), this,SLOT(cancel())); + connect(cancelbutton, TQT_SIGNAL(clicked()), this,TQT_SLOT(cancel())); cancelbutton->setFixedHeight(cancelbutton->sizeHint().height()); cancelbutton->setMinimumWidth(QMAX(cancelbutton->sizeHint().width(), 70)); l12->addWidget(cancelbutton); if(gpppdata.graphingEnabled()) { - graphTimer = new QTimer(this); - connect(graphTimer, SIGNAL(timeout()), SLOT(updateGraph())); + graphTimer = new TQTimer(this); + connect(graphTimer, TQT_SIGNAL(timeout()), TQT_SLOT(updateGraph())); } setFixedSize(sizeHint()); - connect(stats, SIGNAL(statsChanged(int)), SLOT(paintIcon(int))); + connect(stats, TQT_SIGNAL(statsChanged(int)), TQT_SLOT(paintIcon(int))); // read window position from config file int p_x, p_y; @@ -200,14 +200,14 @@ PPPStatsDlg::~PPPStatsDlg() { // save window position when window was closed -bool PPPStatsDlg::event(QEvent *e) { - if (e->type() == QEvent::Hide) +bool PPPStatsDlg::event(TQEvent *e) { + if (e->type() == TQEvent::Hide) { gpppdata.setWinPosStatWin(x(), y()); return true; } else - return QWidget::event(e); + return TQWidget::event(e); } void PPPStatsDlg::cancel() { @@ -244,8 +244,8 @@ void PPPStatsDlg::paintGraph() { if(!isVisible()) return; - QPixmap pm(graph->width() - 4, graph->height() - 4); - QPainter p; + TQPixmap pm(graph->width() - 4, graph->height() - 4); + TQPainter p; pm.fill(graph->backgroundColor()); p.begin(&pm); @@ -286,10 +286,10 @@ void PPPStatsDlg::paintGraph() { // plot scale line p.setPen(text); - p.setFont(QFont(KGlobalSettings::fixedFont().family(), 8)); + p.setFont(TQFont(KGlobalSettings::fixedFont().family(), 8)); - QRect r; - QString s = i18n("%1 (max. %2) kb/sec") + TQRect r; + TQString s = i18n("%1 (max. %2) kb/sec") .arg(KGlobal::locale()->formatNumber((float)last_max / 1024.0, 1)) .arg(KGlobal::locale()->formatNumber((float)max / 1024.0, 1)); p.drawText(0, 0, pm.width(), 2*8, AlignRight|AlignVCenter, s, -1, &r); @@ -315,7 +315,7 @@ void PPPStatsDlg::updateGraph() { } -void PPPStatsDlg::paintEvent (QPaintEvent *) { +void PPPStatsDlg::paintEvent (TQPaintEvent *) { paintIcon(PPPStats::BytesNone); // correct ? if(gpppdata.graphingEnabled()) paintGraph(); @@ -324,7 +324,7 @@ void PPPStatsDlg::paintEvent (QPaintEvent *) { void PPPStatsDlg::paintIcon(int status) { - const QPixmap *pixmap; + const TQPixmap *pixmap; switch(status) { @@ -370,7 +370,7 @@ void PPPStatsDlg::timeclick() { } -void PPPStatsDlg::closeEvent(QCloseEvent *) { +void PPPStatsDlg::closeEvent(TQCloseEvent *) { emit cancel(); } @@ -404,14 +404,14 @@ void PPPStatsDlg::update_data() { // if I don't resort to this trick it is imposible to // copy/paste the ip out of the lineedits due to // reset of cursor position on setText() - QString local_addr = ( stats->local_ip_address.isEmpty() ? + TQString local_addr = ( stats->local_ip_address.isEmpty() ? i18n("unavailable") : stats->local_ip_address ); if( ip_address_label2->text() != local_addr ) ip_address_label2->setText(local_addr); - QString remote_addr = ( stats->remote_ip_address.isEmpty() ? + TQString remote_addr = ( stats->remote_ip_address.isEmpty() ? i18n("unavailable") : stats->remote_ip_address ); diff --git a/kppp/pppstatdlg.h b/kppp/pppstatdlg.h index 32808962..800438ee 100644 --- a/kppp/pppstatdlg.h +++ b/kppp/pppstatdlg.h @@ -26,9 +26,9 @@ #define _PPPSTATSDLG_H_ -#include -#include -#include +#include +#include +#include class QLabel; class QFrame; @@ -42,21 +42,21 @@ const int GRAPH_UPDATE_TIME = 1000; class PPPStats; -class PPPStatsDlg : public QWidget { +class PPPStatsDlg : public TQWidget { Q_OBJECT public: - PPPStatsDlg(QWidget *parent, const char *name,QWidget *main, + PPPStatsDlg(TQWidget *parent, const char *name,TQWidget *main, PPPStats *st); ~PPPStatsDlg(); protected: - void closeEvent( QCloseEvent *e ); - void paintEvent (QPaintEvent *e) ; - bool event( QEvent *e ); + void closeEvent( TQCloseEvent *e ); + void paintEvent (TQPaintEvent *e) ; + bool event( TQEvent *e ); public slots: @@ -76,56 +76,56 @@ private: void paintGraph(); PPPStats *stats; - QLabel *pixmap_l; - QWidget *main; - QPushButton *cancelbutton; - - QLabel *labela1[5]; - QLabel *labela2[5]; - QLabel *labelb1[5]; - QLabel *labelb2[5]; - - QLabel *ip_address_label1; - QLineEdit *ip_address_label2; - QLabel *ip_address_label3; - QLineEdit *ip_address_label4; - - QLabel *modem_pic_label; - QPixmap modem_pixmap; - QPixmap modem_left_pixmap; - QPixmap modem_right_pixmap; - QPixmap modem_both_pixmap; - QPixmap big_modem_both_pixmap; - QPixmap big_modem_left_pixmap; - QPixmap big_modem_right_pixmap; - QPixmap big_modem_none_pixmap; + TQLabel *pixmap_l; + TQWidget *main; + TQPushButton *cancelbutton; + + TQLabel *labela1[5]; + TQLabel *labela2[5]; + TQLabel *labelb1[5]; + TQLabel *labelb2[5]; + + TQLabel *ip_address_label1; + TQLineEdit *ip_address_label2; + TQLabel *ip_address_label3; + TQLineEdit *ip_address_label4; + + TQLabel *modem_pic_label; + TQPixmap modem_pixmap; + TQPixmap modem_left_pixmap; + TQPixmap modem_right_pixmap; + TQPixmap modem_both_pixmap; + TQPixmap big_modem_both_pixmap; + TQPixmap big_modem_left_pixmap; + TQPixmap big_modem_right_pixmap; + TQPixmap big_modem_none_pixmap; int ibytes_last; int obytes_last; bool need_to_paint; - QString ibytes_string; - QString ipackets_string; - QString compressedin_string; - QString uncompressedin_string; - QString errorin_string; - QString obytes_string; + TQString ibytes_string; + TQString ipackets_string; + TQString compressedin_string; + TQString uncompressedin_string; + TQString errorin_string; + TQString obytes_string; QString opackets_string; QString compressed_string; - QString packetsunc_string; - QString packetsoutunc_string; - QGroupBox *box; + TQString packetsunc_string; + TQString packetsoutunc_string; + TQGroupBox *box; // graph widget - QFrame *graph; + TQFrame *graph; int bin[MAX_GRAPH_WIDTH]; int bout[MAX_GRAPH_WIDTH]; int bin_last; int bout_last; int ringIdx; int max; - QTimer *graphTimer; - QColor bg, text, in, out; + TQTimer *graphTimer; + TQColor bg, text, in, out; }; #endif diff --git a/kppp/pppstats.cpp b/kppp/pppstats.cpp index 8063d618..c9f153d8 100644 --- a/kppp/pppstats.cpp +++ b/kppp/pppstats.cpp @@ -90,14 +90,14 @@ #endif /* STREAMS */ -#include +#include #include PPPStats::PPPStats() { clear(); timer = new QTimer; - connect(timer, SIGNAL(timeout()), SLOT(timerClick())); + connect(timer, TQT_SIGNAL(timeout()), TQT_SLOT(timerClick())); } diff --git a/kppp/pppstats.h b/kppp/pppstats.h index a1a0eaef..7e19f8e9 100644 --- a/kppp/pppstats.h +++ b/kppp/pppstats.h @@ -28,11 +28,11 @@ #include "kpppconfig.h" -#include +#include class QTimer; -class PPPStats : public QObject { +class PPPStats : public TQObject { Q_OBJECT public: PPPStats(); @@ -61,8 +61,8 @@ public: int errorin; int packetsunc, packetsoutunc; - QString local_ip_address; - QString remote_ip_address; + TQString local_ip_address; + TQString remote_ip_address; enum IOStatus { BytesNone = 0, BytesIn, BytesOut, BytesBoth }; @@ -78,7 +78,7 @@ private: int unit; char unitName[5]; enum IOStatus ioStatus; - QTimer *timer; + TQTimer *timer; }; #endif diff --git a/kppp/providerdb.cpp b/kppp/providerdb.cpp index 614816d0..867ffd8c 100644 --- a/kppp/providerdb.cpp +++ b/kppp/providerdb.cpp @@ -29,26 +29,26 @@ //--------------------------------------------------------------------------- -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include "providerdb.h" #include "newwidget.h" #include "pppdata.h" -#include -#include +#include +#include #include #define UNENCODED_CHARS "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_" -QWizard* ProviderDB::wiz = 0L; +TQWizard* ProviderDB::wiz = 0L; -ProviderDB::ProviderDB(QWidget *parent) : +ProviderDB::ProviderDB(TQWidget *parent) : KWizard(parent, "", true), cfg(0) { @@ -83,10 +83,10 @@ ProviderDB::ProviderDB(QWidget *parent) : setFinish(page9, true); setFinishEnabled(page9, true); - connect((const QObject *)nextButton(), SIGNAL(clicked()), - this, SLOT(pageSelected())); - connect((const QObject *)backButton(), SIGNAL(clicked()), - this, SLOT(pageSelected())); + connect((const TQObject *)nextButton(), TQT_SIGNAL(clicked()), + this, TQT_SLOT(pageSelected())); + connect((const TQObject *)backButton(), TQT_SIGNAL(clicked()), + this, TQT_SLOT(pageSelected())); // resize(minimumSize()); adjustSize(); @@ -102,7 +102,7 @@ void ProviderDB::pageSelected() { bool prev = true; bool next = true; - QWidget *page = currentPage(); + TQWidget *page = currentPage(); if(page == page2) { next = page2->lb->currentItem() != -1; } else if(page == page3) { @@ -122,12 +122,12 @@ void ProviderDB::pageSelected() { void ProviderDB::loadProviderInfo() { delete cfg; - QString loc = *page2->list->at(page2->lb->currentItem()); - QString provider = page3->lb->text(page3->lb->currentItem()); + TQString loc = *page2->list->at(page2->lb->currentItem()); + TQString provider = page3->lb->text(page3->lb->currentItem()); urlEncode(provider); - QString prov = "Provider/" + loc; + TQString prov = "Provider/" + loc; prov += "/" + provider; - QString fname = locate("appdata", prov); + TQString fname = locate("appdata", prov); kdDebug(5002) << "Providerfile=" << fname << endl; cfg = new KSimpleConfig(fname, true); @@ -135,14 +135,14 @@ void ProviderDB::loadProviderInfo() { void ProviderDB::accept() { - QRegExp re_username("%USERNAME%"); - QRegExp re_password("%PASSWORD%"); + TQRegExp re_username("%USERNAME%"); + TQRegExp re_password("%PASSWORD%"); - QMap map(cfg->entryMap("")); - QMap ::Iterator it(map.begin()); + TQMap map(cfg->entryMap("")); + TQMap ::Iterator it(map.begin()); while(it != map.end()) { - QString key = it.key(); - QString value = *it; + TQString key = it.key(); + TQString value = *it; if(value.contains(re_username)) value.replace(re_username, page4->username()); @@ -164,8 +164,8 @@ void ProviderDB::accept() { ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// -PDB_Intro::PDB_Intro(QWidget *parent) : QWidget(parent) { - QLabel *l = new QLabel(i18n("You will be asked a few questions on information\n" +PDB_Intro::PDB_Intro(TQWidget *parent) : TQWidget(parent) { + TQLabel *l = new TQLabel(i18n("You will be asked a few questions on information\n" "which is needed to establish an Internet connection\n" "with your Internet Service Provider (ISP).\n\n" "Make sure you have the registration form from your\n" @@ -173,7 +173,7 @@ PDB_Intro::PDB_Intro(QWidget *parent) : QWidget(parent) { "help first. If any information is missing, contact\n" "your ISP."), this); - QVBoxLayout *tl = new QVBoxLayout(this, 10, 10); + TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10); tl->addWidget(l); tl->activate(); } @@ -182,24 +182,24 @@ PDB_Intro::PDB_Intro(QWidget *parent) : QWidget(parent) { ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// -PDB_Country::PDB_Country(QWidget *parent) : QWidget(parent) { - QLabel *l = new QLabel(i18n("Select the location where you plan to use this\n" +PDB_Country::PDB_Country(TQWidget *parent) : TQWidget(parent) { + TQLabel *l = new TQLabel(i18n("Select the location where you plan to use this\n" "account from the list below. If your country or\n" "location is not listed, you have to create the\n" "account with the normal, dialog based setup.\n\n" "If you click \"Cancel\", the dialog based setup\n" "will start."), this); - QVBoxLayout *tl = new QVBoxLayout(this, 10, 10); + TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10); tl->addWidget(l); - QHBoxLayout *l1 = new QHBoxLayout; + TQHBoxLayout *l1 = new QHBoxLayout; tl->addLayout(l1); l1->addStretch(1); - lb = new QListBox(this); - connect(lb, SIGNAL(highlighted(int)), - this, SLOT(selectionChanged(int))); + lb = new TQListBox(this); + connect(lb, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(selectionChanged(int))); lb->setMinimumSize(220, 100); l1->addWidget(lb, 2); l1->addStretch(1); @@ -208,22 +208,22 @@ PDB_Country::PDB_Country(QWidget *parent) : QWidget(parent) { // fill the listbox // set up filter - QDir d(KGlobal::dirs()->findDirs("appdata", "Provider").first()); - d.setFilter(QDir::Dirs); - d.setSorting(QDir::Name); + TQDir d(KGlobal::dirs()->findDirs("appdata", "Provider").first()); + d.setFilter(TQDir::Dirs); + d.setSorting(TQDir::Name); // read the list of files const QFileInfoList *flist = d.entryInfoList(); if(flist) { QFileInfoListIterator it( *flist ); - QFileInfo *fi; + TQFileInfo *fi; // traverse the flist and insert into a map for sorting - QMap countries; + TQMap countries; for(; (fi = it.current()) != 0; ++it) { if(fi->fileName() != "." && fi->fileName() != "..") { - QString dirFile(fi->absFilePath()+"/.directory"); - QString entryName; - if(QFile::exists(dirFile)){ + TQString dirFile(fi->absFilePath()+"/.directory"); + TQString entryName; + if(TQFile::exists(dirFile)){ KSimpleConfig config(dirFile); config.setDesktopGroup(); entryName = config.readEntry("Name"); @@ -233,8 +233,8 @@ PDB_Country::PDB_Country(QWidget *parent) : QWidget(parent) { } } // insert sorted entries into list box and string list - QMap::const_iterator mit = countries.begin(); - QMap::const_iterator mend = countries.end(); + TQMap::const_iterator mit = countries.begin(); + TQMap::const_iterator mend = countries.end(); while(mit != mend) { lb->insertItem(mit.key()); list->append(*mit); @@ -251,7 +251,7 @@ PDB_Country::~PDB_Country() } void PDB_Country::selectionChanged(int idx) { - // QWizard *wizard = (QWizard *)parent(); Why doesn't this work ? + // TQWizard *wizard = (TQWizard *)parent(); Why doesn't this work ? ProviderDB::wiz->setNextEnabled(this, (idx != -1)); } @@ -259,9 +259,9 @@ void PDB_Country::selectionChanged(int idx) { ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// -PDB_Provider::PDB_Provider(QWidget *parent) : QWidget(parent) { - QVBoxLayout *tl = new QVBoxLayout(this, 10, 10); - QLabel *l = new QLabel(i18n("Select your Internet Service Provider (ISP) from\n" +PDB_Provider::PDB_Provider(TQWidget *parent) : TQWidget(parent) { + TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10); + TQLabel *l = new TQLabel(i18n("Select your Internet Service Provider (ISP) from\n" "the list below. If the ISP is not in this list,\n" "you have to click on \"Cancel\" and create this\n" "account using the normal, dialog-based setup.\n\n" @@ -269,13 +269,13 @@ PDB_Provider::PDB_Provider(QWidget *parent) : QWidget(parent) { "selection."), this); tl->addWidget(l); - QHBoxLayout *l1 = new QHBoxLayout; + TQHBoxLayout *l1 = new QHBoxLayout; tl->addLayout(l1); l1->addStretch(1); - lb = new QListBox(this); - connect(lb, SIGNAL(highlighted(int)), - this, SLOT(selectionChanged(int))); + lb = new TQListBox(this); + connect(lb, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(selectionChanged(int))); lb->setMinimumSize(220, 100); l1->addWidget(lb, 2); l1->addStretch(1); @@ -286,7 +286,7 @@ void PDB_Provider::selectionChanged(int idx) { } -void PDB_Provider::setDir(const QString &_dir) { +void PDB_Provider::setDir(const TQString &_dir) { if(dir != _dir) { lb->clear(); @@ -294,24 +294,24 @@ void PDB_Provider::setDir(const QString &_dir) { // set up filter dir = _dir; - QString dir1 = KGlobal::dirs()->findDirs("appdata", "Provider").first(); - QRegExp re1(" "); + TQString dir1 = KGlobal::dirs()->findDirs("appdata", "Provider").first(); + TQRegExp re1(" "); dir = dir.replace(re1, "_"); dir1 += dir; - QDir d(dir1); - d.setFilter(QDir::Files); - d.setSorting(QDir::Name); + TQDir d(dir1); + d.setFilter(TQDir::Files); + d.setSorting(TQDir::Name); // read the list of files const QFileInfoList *list = d.entryInfoList(); QFileInfoListIterator it( *list ); - QFileInfo *fi; + TQFileInfo *fi; // traverse the list and insert into the widget - QRegExp re("_"); + TQRegExp re("_"); while((fi = it.current()) != NULL) { - QString fname = fi->fileName(); + TQString fname = fi->fileName(); if(fname.length() && fname[0] != '.') { urlDecode(fname); lb->insertItem(fname); @@ -325,7 +325,7 @@ void PDB_Provider::setDir(const QString &_dir) { } -QString PDB_Provider::getDir() { +TQString PDB_Provider::getDir() { return dir; } @@ -334,48 +334,48 @@ QString PDB_Provider::getDir() { ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// -PDB_UserInfo::PDB_UserInfo(QWidget *parent) : QWidget(parent) { - QVBoxLayout *tl = new QVBoxLayout(this, 10, 10); - QLabel *l = new QLabel(i18n("To log on to your ISP, kppp needs the username\n" +PDB_UserInfo::PDB_UserInfo(TQWidget *parent) : TQWidget(parent) { + TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10); + TQLabel *l = new TQLabel(i18n("To log on to your ISP, kppp needs the username\n" "and the password you got from your ISP. Type\n" "in this information in the fields below.\n\n" "Word case is important here."), this); tl->addWidget(l); - QGridLayout *l1 = new QGridLayout(2, 2); + TQGridLayout *l1 = new TQGridLayout(2, 2); tl->addLayout(l1); - l = new QLabel(i18n("Username:"), this); + l = new TQLabel(i18n("Username:"), this); l1->addWidget(l, 0, 0); - l = new QLabel(i18n("Password:"), this); + l = new TQLabel(i18n("Password:"), this); l1->addWidget(l, 1, 0); _username = newLineEdit(24, this); - connect(_username, SIGNAL(textChanged(const QString &)), - this, SLOT(textChanged(const QString &))); + connect(_username, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(textChanged(const TQString &))); l1->addWidget(_username, 0, 1); _password = newLineEdit(24, this); - _password->setEchoMode(QLineEdit::Password); - connect(_password, SIGNAL(textChanged(const QString &)), - this, SLOT(textChanged(const QString &))); + _password->setEchoMode(TQLineEdit::Password); + connect(_password, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(textChanged(const TQString &))); l1->addWidget(_password, 1, 1); tl->activate(); } -void PDB_UserInfo::textChanged(const QString &) { +void PDB_UserInfo::textChanged(const TQString &) { ProviderDB::wiz->setNextEnabled(this, !_password->text().isEmpty() && !_username->text().isEmpty()); } -QString PDB_UserInfo::username() { - QString s = _username->text(); +TQString PDB_UserInfo::username() { + TQString s = _username->text(); return s; } -QString PDB_UserInfo::password() { - QString s = _password->text(); +TQString PDB_UserInfo::password() { + TQString s = _password->text(); return s; } @@ -388,9 +388,9 @@ void PDB_UserInfo::activate() { ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// -PDB_DialPrefix::PDB_DialPrefix(QWidget *parent) : QWidget(parent) { - QVBoxLayout *tl = new QVBoxLayout(this, 10, 10); - QLabel *l = new QLabel(i18n("If you need a special dial prefix (e.g. if you\n" +PDB_DialPrefix::PDB_DialPrefix(TQWidget *parent) : TQWidget(parent) { + TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10); + TQLabel *l = new TQLabel(i18n("If you need a special dial prefix (e.g. if you\n" "are using a telephone switch) you can specify\n" "it here. This prefix is dialed just before the\n" "phone number.\n\n" @@ -399,9 +399,9 @@ PDB_DialPrefix::PDB_DialPrefix(QWidget *parent) : QWidget(parent) { this); tl->addWidget(l); - QGridLayout *l1 = new QGridLayout(1, 2); + TQGridLayout *l1 = new TQGridLayout(1, 2); tl->addLayout(l1); - l = new QLabel(i18n("Dial prefix:"), this); + l = new TQLabel(i18n("Dial prefix:"), this); l1->addWidget(l, 0, 0); _prefix = newLineEdit(24, this); l1->addWidget(_prefix, 0, 1); @@ -409,8 +409,8 @@ PDB_DialPrefix::PDB_DialPrefix(QWidget *parent) : QWidget(parent) { } -QString PDB_DialPrefix::prefix() { - QString s = _prefix->text(); +TQString PDB_DialPrefix::prefix() { + TQString s = _prefix->text(); return s; } @@ -424,9 +424,9 @@ void PDB_DialPrefix::activate() { ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// -PDB_Finished::PDB_Finished(QWidget *parent) : QWidget(parent) { - QVBoxLayout *tl = new QVBoxLayout(this, 10, 10); - QLabel *l = new QLabel(i18n("Finished!\n\n" +PDB_Finished::PDB_Finished(TQWidget *parent) : TQWidget(parent) { + TQVBoxLayout *tl = new TQVBoxLayout(this, 10, 10); + TQLabel *l = new TQLabel(i18n("Finished!\n\n" "A new account has been created. Click \"Finish\" to\n" "go back to the setup dialog. If you want to\n" "check the settings of the newly created account,\n" @@ -437,8 +437,8 @@ PDB_Finished::PDB_Finished(QWidget *parent) : QWidget(parent) { } -void urlDecode(QString &s) { - QString s1; +void urlDecode(TQString &s) { + TQString s1; for(uint i = 0; i < s.length(); i++) { if(s[i] == '%') { @@ -454,11 +454,11 @@ void urlDecode(QString &s) { } -void urlEncode(QString &s) { - QString s1, tmp; +void urlEncode(TQString &s) { + TQString s1, tmp; for(uint i = 0; i < s.length(); i++) { - if(QString(UNENCODED_CHARS).find(s[i]) >= 0) + if(TQString(UNENCODED_CHARS).find(s[i]) >= 0) s1 += s[i]; else { tmp.sprintf("%%%03i", s[i].unicode()); diff --git a/kppp/providerdb.h b/kppp/providerdb.h index 37a737fc..cfeb785f 100644 --- a/kppp/providerdb.h +++ b/kppp/providerdb.h @@ -36,92 +36,92 @@ #define PROVIDER_DB #include -#include +#include class QLineEdit; class QListBox; class KSimpleConfig; -class PDB_Intro : public QWidget { +class PDB_Intro : public TQWidget { Q_OBJECT public: - PDB_Intro(QWidget *parent); + PDB_Intro(TQWidget *parent); }; -class PDB_Country : public QWidget { +class PDB_Country : public TQWidget { Q_OBJECT public: - PDB_Country(QWidget *parent); + PDB_Country(TQWidget *parent); ~PDB_Country(); - QListBox *lb; - QStringList *list; + TQListBox *lb; + TQStringList *list; public slots: void selectionChanged(int); }; -class PDB_Provider : public QWidget { +class PDB_Provider : public TQWidget { Q_OBJECT public: - PDB_Provider(QWidget *parent); + PDB_Provider(TQWidget *parent); - void setDir(const QString &d); - QString getDir(); + void setDir(const TQString &d); + TQString getDir(); - QListBox *lb; + TQListBox *lb; public slots: void selectionChanged(int); private: - QString dir; + TQString dir; }; -class PDB_UserInfo : public QWidget { +class PDB_UserInfo : public TQWidget { Q_OBJECT public: - PDB_UserInfo(QWidget *parent); - QString username(); - QString password(); + PDB_UserInfo(TQWidget *parent); + TQString username(); + TQString password(); void activate(); public slots: - void textChanged(const QString &); + void textChanged(const TQString &); private: - QLineEdit *_username; - QLineEdit *_password; + TQLineEdit *_username; + TQLineEdit *_password; }; -class PDB_DialPrefix : public QWidget { +class PDB_DialPrefix : public TQWidget { Q_OBJECT public: - PDB_DialPrefix(QWidget *parent); - QString prefix(); + PDB_DialPrefix(TQWidget *parent); + TQString prefix(); void activate(); private: - QLineEdit *_prefix; + TQLineEdit *_prefix; }; -class PDB_Finished : public QWidget { +class PDB_Finished : public TQWidget { Q_OBJECT public: - PDB_Finished(QWidget *parent); + PDB_Finished(TQWidget *parent); }; class ProviderDB : public KWizard { Q_OBJECT public: - ProviderDB(QWidget *parent); + ProviderDB(TQWidget *parent); ~ProviderDB(); - static QWizard *wiz; + static TQWizard *wiz; public slots: void pageSelected(); @@ -142,11 +142,11 @@ private: // Decodes a (some sort of)URL-encoded filename to a human-readable name. // This is used for the provider database -void urlDecode(QString &); +void urlDecode(TQString &); // Encodes a (some sort of)URL-encoded filename from a human-readable name. // This is used for the provider database -void urlEncode(QString &); +void urlEncode(TQString &); #endif diff --git a/kppp/pwentry.cpp b/kppp/pwentry.cpp index aef02aa7..5e6397a5 100644 --- a/kppp/pwentry.cpp +++ b/kppp/pwentry.cpp @@ -26,41 +26,41 @@ #include -#include +#include #include #include "pwentry.h" -PWEntry::PWEntry( QWidget *parent, const char *name ) - : QWidget(NULL, name) { +PWEntry::PWEntry( TQWidget *parent, const char *name ) + : TQWidget(NULL, name) { if(parent){ - QPoint point = mapToGlobal (QPoint (0,0)); - QRect pos = geometry(); + TQPoint point = mapToGlobal (TQPoint (0,0)); + TQRect pos = geometry(); setGeometry(point.x() + pos.width()/2 - 300/2, point.y() + pos.height()/2 - 90/2, 300, 90); } else { - QRect desk = KGlobalSettings::desktopGeometry(parent); + TQRect desk = KGlobalSettings::desktopGeometry(parent); setGeometry( desk.center().x() - 150, desk.center().y() - 50, 300, 90 ); } - frame = new QGroupBox(name, this ); + frame = new TQGroupBox(name, this ); - setFocusPolicy( QWidget::StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); - pw = new QLineEdit( this, "le" ); - pw->setEchoMode( QLineEdit::Password ); - connect( pw, SIGNAL(returnPressed()), this, SLOT(hide()) ); + pw = new TQLineEdit( this, "le" ); + pw->setEchoMode( TQLineEdit::Password ); + connect( pw, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(hide()) ); isconsumed = TRUE; } -QString PWEntry::text() { return (pw->text()); } +TQString PWEntry::text() { return (pw->text()); } -void PWEntry::focusInEvent( QFocusEvent *){ +void PWEntry::focusInEvent( TQFocusEvent *){ pw->setFocus(); @@ -68,23 +68,23 @@ void PWEntry::focusInEvent( QFocusEvent *){ void PWEntry::setEchoModeNormal() { - pw->setEchoMode(QLineEdit::Normal); + pw->setEchoMode(TQLineEdit::Normal); } void PWEntry::setEchoModePassword() { - pw->setEchoMode(QLineEdit::Password); + pw->setEchoMode(TQLineEdit::Password); } -void PWEntry::setPrompt(const QString &p) { +void PWEntry::setPrompt(const TQString &p) { frame->setTitle(p); } -void PWEntry::resizeEvent(QResizeEvent* ){ +void PWEntry::resizeEvent(TQResizeEvent* ){ pw->setGeometry( 15,35, width() - 30, 25 ); frame->setGeometry(5,5, width() - 10, height() - 10 ); @@ -96,7 +96,7 @@ void PWEntry::show() { pw->setText(""); isconsumed = FALSE; - QWidget::show(); + TQWidget::show(); } bool PWEntry::Consumed() { @@ -108,7 +108,7 @@ void PWEntry::setConsumed() { } void PWEntry::hide() { - QWidget::hide(); + TQWidget::hide(); return; } diff --git a/kppp/pwentry.h b/kppp/pwentry.h index 7906dbaf..b812bb16 100644 --- a/kppp/pwentry.h +++ b/kppp/pwentry.h @@ -27,22 +27,22 @@ #ifndef PWENTRY_H #define PWENTRY_H -#include -#include -#include -#include +#include +#include +#include +#include -class PWEntry : public QWidget { +class PWEntry : public TQWidget { Q_OBJECT public: - PWEntry( QWidget *parent=0, const char *name=0 ); + PWEntry( TQWidget *parent=0, const char *name=0 ); bool Consumed(); void setConsumed(); - QString text(); - void setPrompt(const QString &); + TQString text(); + void setPrompt(const TQString &); public slots: @@ -57,14 +57,14 @@ signals: protected: - void resizeEvent(QResizeEvent* qre); - void focusInEvent( QFocusEvent *); + void resizeEvent(TQResizeEvent* qre); + void focusInEvent( TQFocusEvent *); private: - QGroupBox *frame; - QLineEdit *pw; - QLabel *pl; + TQGroupBox *frame; + TQLineEdit *pw; + TQLabel *pl; bool isconsumed; }; diff --git a/kppp/requester.cpp b/kppp/requester.cpp index b3b1df82..b5450929 100644 --- a/kppp/requester.cpp +++ b/kppp/requester.cpp @@ -57,7 +57,7 @@ extern "C" { #endif #include -#include +#include #include "auth.h" #include "pppdata.h" @@ -171,7 +171,7 @@ bool Requester::recvResponse() { return (response.status == 0); } -int Requester::openModem(const QString & dev) { +int Requester::openModem(const TQString & dev) { struct OpenModemRequest req; req.header.type = Opener::OpenDevice; @@ -183,7 +183,7 @@ int Requester::openModem(const QString & dev) { } -int Requester::openLockfile(const QString &dev, int flags) { +int Requester::openLockfile(const TQString &dev, int flags) { struct OpenLockRequest req; @@ -229,7 +229,7 @@ int Requester::openSysLog() { } -bool Requester::setSecret(int method, const QString &name, const QString &password) { +bool Requester::setSecret(int method, const TQString &name, const TQString &password) { assert(name!=0); assert(password!=0); @@ -249,9 +249,9 @@ bool Requester::setSecret(int method, const QString &name, const QString &passwo default: return false; } - strncpy(req.username, QFile::encodeName(name), Opener::MaxStrLen); + strncpy(req.username, TQFile::encodeName(name), Opener::MaxStrLen); req.username[Opener::MaxStrLen] = '\0'; - strncpy(req.password, QFile::encodeName(password), Opener::MaxStrLen); + strncpy(req.password, TQFile::encodeName(password), Opener::MaxStrLen); req.password[Opener::MaxStrLen] = '\0'; sendRequest((struct RequestHeader *) &req, sizeof(req)); return recvResponse(); @@ -272,22 +272,22 @@ bool Requester::removeSecret(int authMethod) { return recvResponse(); } -bool Requester::setHostname(const QString &name) { +bool Requester::setHostname(const TQString &name) { if (name.isEmpty()) return false; struct SetHostnameRequest req; req.header.type = Opener::SetHostname; - strncpy(req.name, QFile::encodeName(name), Opener::MaxStrLen); + strncpy(req.name, TQFile::encodeName(name), Opener::MaxStrLen); req.name[Opener::MaxStrLen] = '\0'; sendRequest((struct RequestHeader *) &req, sizeof(req)); return recvResponse(); } -bool Requester::execPPPDaemon(const QString &arguments) { +bool Requester::execPPPDaemon(const TQString &arguments) { struct ExecDaemonRequest req; req.header.type = Opener::ExecPPPDaemon; - strncpy(req.arguments, QFile::encodeName(arguments), MAX_CMDLEN); + strncpy(req.arguments, TQFile::encodeName(arguments), MAX_CMDLEN); req.arguments[MAX_CMDLEN] = '\0'; sendRequest((struct RequestHeader *) &req, sizeof(req)); if(recvResponse()==0) { @@ -349,7 +349,7 @@ bool Requester::sendRequest(struct RequestHeader *request, int len) { } -int Requester::indexDevice(const QString &dev) { +int Requester::indexDevice(const TQString &dev) { int index = -1; diff --git a/kppp/requester.h b/kppp/requester.h index cb2d0e04..ea415df0 100644 --- a/kppp/requester.h +++ b/kppp/requester.h @@ -7,15 +7,15 @@ public: Requester(int); ~Requester(); - int openModem(const QString & dev); - int openLockfile(const QString & dev, int flags = 0); + int openModem(const TQString & dev); + int openLockfile(const TQString & dev, int flags = 0); bool removeLockfile(); int openResolv(int flags); int openSysLog(); - bool setSecret(int method, const QString & name, const QString & password); + bool setSecret(int method, const TQString & name, const TQString & password); bool removeSecret(int authMethode); - bool setHostname(const QString & name); - bool execPPPDaemon(const QString & arguments); + bool setHostname(const TQString & name); + bool execPPPDaemon(const TQString & arguments); bool killPPPDaemon(); int pppdExitStatus(); bool stop(); @@ -28,7 +28,7 @@ private: bool sendRequest(struct RequestHeader *request, int len); bool recvResponse(); int recvFD(); - int indexDevice(const QString & dev); + int indexDevice(const TQString & dev); int socket; bool expect_alarm; }; diff --git a/kppp/ruleset.cpp b/kppp/ruleset.cpp index 8366131b..723d5f2b 100644 --- a/kppp/ruleset.cpp +++ b/kppp/ruleset.cpp @@ -29,8 +29,8 @@ #include #include "ruleset.h" -#include -#include +#include +#include #include #include @@ -51,7 +51,7 @@ RuleSet::RuleSet() { // this function is shamelessly stolen from pppcosts 0.5 :-) /* calculates the easter sunday in day_of_year style */ -QDate RuleSet::get_easter(int year) { +TQDate RuleSet::get_easter(int year) { /* not optimized, I took the original names */ signed int a,b,m,q,w,p,n,tt,mm; @@ -71,7 +71,7 @@ QDate RuleSet::get_easter(int year) { {tt=p+31; mm=3;} - return QDate(year, mm, tt); + return TQDate(year, mm, tt); } int RuleSet::dayNameToInt(const char *s) { @@ -86,13 +86,13 @@ int RuleSet::dayNameToInt(const char *s) { return -1; } -int RuleSet::load(const QString &filename) { +int RuleSet::load(const TQString &filename) { flat_init_costs = 0.0; flat_init_duration = 0; have_flat_init_costs = false; - QFile f(filename); + TQFile f(filename); // delete old rules rules.resize(0); @@ -113,7 +113,7 @@ int RuleSet::load(const QString &filename) { while(!f.atEnd()) { // read continued lines - QString line; + TQString line; bool backslashed; do { int br = f.readLine(buffer, sizeof(buffer)); @@ -122,12 +122,12 @@ int RuleSet::load(const QString &filename) { else buffer[br] = 0; lineno++; - line.append(QString::fromUtf8(buffer)); + line.append(TQString::fromUtf8(buffer)); backslashed = (line.right(1) == "\\"); } while(!f.atEnd() && backslashed); // strip whitespace - line = line.replace(QRegExp("[ \t\r]"), ""); + line = line.replace(TQRegExp("[ \t\r]"), ""); // skip comment lines if((line.left(1) == "#") || line.isEmpty()) continue; @@ -182,22 +182,22 @@ void RuleSet::addRule(RULE r) { } } -bool RuleSet::parseEntry(RULE &ret, QString s, int year) { - if(s.contains(QRegExp("^[0-9]+/[0-9]+$"))) { +bool RuleSet::parseEntry(RULE &ret, TQString s, int year) { + if(s.contains(TQRegExp("^[0-9]+/[0-9]+$"))) { int d, m; sscanf(s.ascii(), "%d/%d", &m, &d); ret.type = 1; - ret.date.from = QDate(year, m, d); - ret.date.until = QDate(year, m, d); + ret.date.from = TQDate(year, m, d); + ret.date.until = TQDate(year, m, d); return TRUE; } - if(s.contains(QRegExp("^[0-9]+\\.[0-9]+$"))) { + if(s.contains(TQRegExp("^[0-9]+\\.[0-9]+$"))) { int d, m; sscanf(s.ascii(), "%d.%d", &d, &m); ret.type = 1; - ret.date.from = QDate(year, m, d); - ret.date.until = QDate(year, m, d); + ret.date.from = TQDate(year, m, d); + ret.date.until = TQDate(year, m, d); return TRUE; } @@ -212,10 +212,10 @@ bool RuleSet::parseEntry(RULE &ret, QString s, int year) { } if(s.left(6) == "easter") { - QDate d = get_easter(year); + TQDate d = get_easter(year); int off; bool ok = TRUE; - QString val = s.mid(6, 1000); + TQString val = s.mid(6, 1000); if(val.isEmpty()) off = 0; else @@ -236,8 +236,8 @@ bool RuleSet::parseEntry(RULE &ret, QString s, int year) { -bool RuleSet::parseEntries(QString s, int year, - QTime t1, QTime t2, +bool RuleSet::parseEntries(TQString s, int year, + TQTime t1, TQTime t2, double costs, double len, double after) { // special rule: on() is the same as on(monday..sunday) @@ -246,7 +246,7 @@ bool RuleSet::parseEntries(QString s, int year, while(s.length()) { int pos = s.find(','); - QString token; + TQString token; if(pos == -1) { token = s; s = ""; @@ -259,7 +259,7 @@ bool RuleSet::parseEntries(QString s, int year, // range RULE r; if(token.contains("..")) { - QString left, right; + TQString left, right; left = token.left(token.find("..")); right = token.right(token.length()-2-left.length()); RULE lr, rr; @@ -293,7 +293,7 @@ bool RuleSet::parseEntries(QString s, int year, return TRUE; } -bool RuleSet::parseTime(QTime &t1, QTime &t2, QString s) { +bool RuleSet::parseTime(TQTime &t1, TQTime &t2, TQString s) { if(s.isEmpty()) { t1 = midnight(); t2 = beforeMidnight(); @@ -309,20 +309,20 @@ bool RuleSet::parseTime(QTime &t1, QTime &t2, QString s) { } } -bool RuleSet::parseRate(double &costs, double &len, double &after, QString s) { +bool RuleSet::parseRate(double &costs, double &len, double &after, TQString s) { after = 0; int fields = sscanf(s.ascii(), "%lf,%lf,%lf", &costs, &len, &after); return (fields == 2) || (fields == 3); } -bool RuleSet::parseLine(const QString &s) { +bool RuleSet::parseLine(const TQString &s) { - // ### use QRegExp::cap() instead of mid() and find() + // ### use TQRegExp::cap() instead of mid() and find() // for our french friends -- Bernd - if(s.contains(QRegExp("flat_init_costs=\\(.*"))) { + if(s.contains(TQRegExp("flat_init_costs=\\(.*"))) { // parse the time fields - QString token = s.mid(s.find("flat_init_costs=(") + 17, + TQString token = s.mid(s.find("flat_init_costs=(") + 17, s.find(")")-s.find("flat_init_costs=(") - 17); // printf("TOKEN=%s\n",token.ascii()); @@ -342,11 +342,11 @@ bool RuleSet::parseLine(const QString &s) { } - if(s.contains(QRegExp("on\\(.*\\)between\\(.*\\)use\\(.*\\)"))) { + if(s.contains(TQRegExp("on\\(.*\\)between\\(.*\\)use\\(.*\\)"))) { // parse the time fields - QString token = s.mid(s.find("between(") + 8, + TQString token = s.mid(s.find("between(") + 8, s.find(")use")-s.find("between(") - 8); - QTime t1, t2; + TQTime t1, t2; if(!parseTime(t1, t2, token)) return FALSE; @@ -362,7 +362,7 @@ bool RuleSet::parseLine(const QString &s) { // parse the days token = s.mid(s.find("on(") + 3, s.find(")betw")-s.find("on(") - 3); - if(!parseEntries(token, QDate::currentDate().year(), + if(!parseEntries(token, TQDate::currentDate().year(), t1, t2, costs, len, after)) return FALSE; @@ -370,23 +370,23 @@ bool RuleSet::parseLine(const QString &s) { } // check for the name - if(s.contains(QRegExp("name=.*"))) { + if(s.contains(TQRegExp("name=.*"))) { _name = s.right(s.length()-5); return !_name.isEmpty(); } // check default entry - if(s.contains(QRegExp("default=\\(.*\\)"))) { - QString token = s.mid(9, s.length() - 10); + if(s.contains(TQRegExp("default=\\(.*\\)"))) { + TQString token = s.mid(9, s.length() - 10); double after; if(parseRate(default_costs, default_len, after, token)) return TRUE; } // check for "minimum costs" - if(s.contains(QRegExp("minimum_costs=.*"))) { - QString token = s.right(s.length() - strlen("minimum_costs=")); + if(s.contains(TQRegExp("minimum_costs=.*"))) { + TQString token = s.right(s.length() - strlen("minimum_costs=")); bool ok; _minimum_costs = token.toDouble(&ok); return ok; @@ -398,20 +398,20 @@ bool RuleSet::parseLine(const QString &s) { return TRUE; } - if(s.contains(QRegExp("currency_digits=.*"))) { - QString token = s.mid(16, s.length() - 16); + if(s.contains(TQRegExp("currency_digits=.*"))) { + TQString token = s.mid(16, s.length() - 16); bool ok; _currency_digits = token.toInt(&ok); return ok && (_currency_digits >= 0); } // "currency_position" is deprecated so we'll simply ignore it - if(s.contains(QRegExp("currency_position=.*"))) + if(s.contains(TQRegExp("currency_position=.*"))) return TRUE; // check per connection fee - if(s.contains(QRegExp("per_connection="))) { - QString token = s.mid(15, s.length()-15); + if(s.contains(TQRegExp("per_connection="))) { + TQString token = s.mid(15, s.length()-15); bool ok; pcf = token.toDouble(&ok); return ok; @@ -420,13 +420,13 @@ bool RuleSet::parseLine(const QString &s) { return FALSE; } -void RuleSet::setStartTime(QDateTime dt){ +void RuleSet::setStartTime(TQDateTime dt){ starttime = dt; } -void RuleSet::getActiveRule(QDateTime dt, double connect_time, double &costs, double &len) { +void RuleSet::getActiveRule(TQDateTime dt, double connect_time, double &costs, double &len) { // use default costs first costs = default_costs; len = default_len; @@ -450,8 +450,8 @@ void RuleSet::getActiveRule(QDateTime dt, double connect_time, double &costs, do { // since rules do not have a year's entry, use the one // from dt - QDate from = r.date.from; - QDate until = r.date.until; + TQDate from = r.date.from; + TQDate until = r.date.until; from.setYMD(dt.date().year(), from.month(), from.day()); until.setYMD(dt.date().year(), until.month(), until.day()); if((from <= dt.date()) && (dt.date() <= until)) { @@ -502,11 +502,11 @@ static double round(double d, int digits) { } #endif -QString RuleSet::currencySymbol() const { +TQString RuleSet::currencySymbol() const { return _currency_symbol.copy(); } -QString RuleSet::currencyString(double f) const { +TQString RuleSet::currencyString(double f) const { return KGlobal::locale()->formatMoney(f, _currency_symbol, _currency_digits); } @@ -516,7 +516,7 @@ double RuleSet::perConnectionCosts() const { } -QString RuleSet::name() const { +TQString RuleSet::name() const { return _name; } @@ -525,21 +525,21 @@ double RuleSet::minimumCosts() const { return _minimum_costs; } -QTime RuleSet::midnight() const { - return QTime(0, 0, 0, 0); +TQTime RuleSet::midnight() const { + return TQTime(0, 0, 0, 0); } -QTime RuleSet::beforeMidnight() const { - return QTime(23,59,59,999); +TQTime RuleSet::beforeMidnight() const { + return TQTime(23,59,59,999); } -int RuleSet::checkRuleFile(const QString &rulefile) { +int RuleSet::checkRuleFile(const TQString &rulefile) { if(rulefile == NULL) { fputs(i18n("kppp: no rulefile specified\n").local8Bit(), stderr); return 1; } - QFile fl(rulefile); + TQFile fl(rulefile); if(!fl.exists()) { fprintf(stderr, i18n("kppp: rulefile \"%s\" not found\n").local8Bit(), rulefile.local8Bit().data()); return 1; diff --git a/kppp/ruleset.h b/kppp/ruleset.h index b66bb50c..8d3fbbe8 100644 --- a/kppp/ruleset.h +++ b/kppp/ruleset.h @@ -27,9 +27,9 @@ #ifndef __RULESET__H__ #define __RULESET__H__ -#include -#include -#include +#include +#include +#include // this structure is used to save // accounting rules @@ -38,9 +38,9 @@ typedef struct RULE { double costs; double len; double after; - QTime from, until; + TQTime from, until; struct { - QDate from, until; + TQDate from, until; } date; struct { int from, until; @@ -57,26 +57,26 @@ public: ~RuleSet() {}; /// returns the name of the ruleset - QString name() const; + TQString name() const; /** Load a ruleset from a file. If an error occurs, * returns the linenumber the error was in, * otherwise 0. If the file could not be opened, * returns -1 */ - int load(const QString &filename); + int load(const TQString &filename); /// returns the currency symbol - QString currencySymbol() const; + TQString currencySymbol() const; /** returns a string representation of the * of a doubleingpoint number using the * currency-settings */ - QString currencyString(double val) const; + TQString currencyString(double val) const; /// sets the start time -- must be called when the connection has bee established - void setStartTime(QDateTime dt); + void setStartTime(TQDateTime dt); /// returns the "per-connection" costs double perConnectionCosts() const; @@ -87,10 +87,10 @@ public: double minimumCosts() const; /// returns the currently valid rule settings - void getActiveRule(QDateTime dt, double connect_time, double &costs, double &len); + void getActiveRule(TQDateTime dt, double connect_time, double &costs, double &len); /// checks if a rulefile is ok (no parse errors...) - static int checkRuleFile(const QString &); + static int checkRuleFile(const TQString &); protected: /** converts an english name of a day to integer, @@ -99,38 +99,38 @@ protected: int dayNameToInt(const char *s); /// returns the date of easter-sunday for a year - static QDate get_easter(int year); + static TQDate get_easter(int year); /// add a rule to this ruleset void addRule(RULE r); /// parses on entry of the "on(...)" fields - bool parseEntry(RULE &ret, QString s, int year); + bool parseEntry(RULE &ret, TQString s, int year); /// parses the "on(...)" fields - bool parseEntries(QString s, int year, - QTime t1, QTime t2, + bool parseEntries(TQString s, int year, + TQTime t1, TQTime t2, double costs, double len, double after); /// parses the "between(...)" time fields - bool parseTime(QTime &t1, QTime &t2, QString s); + bool parseTime(TQTime &t1, TQTime &t2, TQString s); /// parses the "use(...)" fields - bool parseRate(double &costs, double &len, double &after, QString s); + bool parseRate(double &costs, double &len, double &after, TQString s); /// parses a whole line - bool parseLine(const QString &line); + bool parseLine(const TQString &line); /// returns midnight time (00:00:00.000) - QTime midnight() const; + TQTime midnight() const; /// returns the last valid time BEFORE midnight - QTime beforeMidnight() const; + TQTime beforeMidnight() const; protected: - QString _name; - QString _currency_symbol; - QDateTime starttime; + TQString _name; + TQString _currency_symbol; + TQDateTime starttime; int _currency_digits; double default_costs; double _minimum_costs; @@ -140,7 +140,7 @@ protected: double flat_init_duration; double flat_init_costs; - QMemArray rules; + TQMemArray rules; }; #endif diff --git a/kppp/runtests.cpp b/kppp/runtests.cpp index 59f32e93..a520d116 100644 --- a/kppp/runtests.cpp +++ b/kppp/runtests.cpp @@ -24,7 +24,7 @@ * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include +#include #include "runtests.h" #include #include @@ -197,13 +197,13 @@ int runTests() { char buf[2048]; // safe while(f != NULL && !feof(f)) { if(fgets(buf, sizeof(buf), f) != NULL) { - QString s(buf); + TQString s(buf); s = s.stripWhiteSpace(); if(s[0] == '#' || s.length() == 0) continue; - if((uid_t)uidFromName(QFile::encodeName(s)) == getuid()) { + if((uid_t)uidFromName(TQFile::encodeName(s)) == getuid()) { access = TRUE; fclose(f); f = NULL; @@ -261,8 +261,8 @@ int runTests() { // Test 5: check for existence of /etc/resolv.conf if (access(_PATH_RESCONF, R_OK) != 0) { - QString file = _PATH_RESCONF" "; - QString msgstr = i18n("%1 is missing or can't be read!\n" + TQString file = _PATH_RESCONF" "; + TQString msgstr = i18n("%1 is missing or can't be read!\n" "Ask your system administrator to create " "this file (can be empty) with appropriate " "read and write permissions.").arg(file); diff --git a/kppp/scriptedit.cpp b/kppp/scriptedit.cpp index 0cb676f5..afa88821 100644 --- a/kppp/scriptedit.cpp +++ b/kppp/scriptedit.cpp @@ -26,16 +26,16 @@ */ #include "scriptedit.h" -#include -#include -#include +#include +#include +#include -ScriptEdit::ScriptEdit( QWidget *parent, const char *name ) - : QWidget(parent, name) +ScriptEdit::ScriptEdit( TQWidget *parent, const char *name ) + : TQWidget(parent, name) { - QHBoxLayout *tl = new QHBoxLayout(this, 0, 10); + TQHBoxLayout *tl = new TQHBoxLayout(this, 0, 10); - st = new QComboBox(this, "st"); + st = new TQComboBox(this, "st"); st->insertItem("Expect"); st->insertItem("Send"); st->insertItem("Pause (sec)"); @@ -51,12 +51,12 @@ ScriptEdit::ScriptEdit( QWidget *parent, const char *name ) st->insertItem("Scan"); st->insertItem("Save"); st->insertItem("SendNoEcho"); - connect(st, SIGNAL(activated(int)), SLOT(setType(int))); + connect(st, TQT_SIGNAL(activated(int)), TQT_SLOT(setType(int))); - se = new QLineEdit(this, "se"); + se = new TQLineEdit(this, "se"); se->setGeometry(120, 5, 140, 25); se->setMaxLength(50); - connect(se, SIGNAL(returnPressed()), SLOT(seReturnPressed())); + connect(se, TQT_SIGNAL(returnPressed()), TQT_SLOT(seReturnPressed())); tl->addWidget(st, 3); tl->addWidget(se, 7); @@ -77,11 +77,11 @@ void ScriptEdit::seReturnPressed() { } -QString ScriptEdit::text()const { +TQString ScriptEdit::text()const { return se->text(); } -void ScriptEdit::setText(const QString &t) { +void ScriptEdit::setText(const TQString &t) { se->setText(t); } diff --git a/kppp/scriptedit.h b/kppp/scriptedit.h index d04416e0..7c914268 100644 --- a/kppp/scriptedit.h +++ b/kppp/scriptedit.h @@ -28,19 +28,19 @@ #ifndef _SCRIPTEDIT_H_ #define _SCRIPTEDIT_H_ -#include +#include class QComboBox; class QLineEdit; -class ScriptEdit : public QWidget { +class ScriptEdit : public TQWidget { Q_OBJECT public: - ScriptEdit( QWidget *parent=0, const char *name=0 ); + ScriptEdit( TQWidget *parent=0, const char *name=0 ); ~ScriptEdit() {} - QString text()const; - void setText(const QString &); + TQString text()const; + void setText(const TQString &); int type()const; virtual void setEnabled(bool); @@ -53,8 +53,8 @@ private slots: void seReturnPressed(); private: - QComboBox *st; - QLineEdit *se; + TQComboBox *st; + TQLineEdit *se; public: enum setypes { Expect = 0, diff --git a/krdc/events.h b/krdc/events.h index 7ac262a7..7c211183 100644 --- a/krdc/events.h +++ b/krdc/events.h @@ -20,7 +20,7 @@ #ifndef EVENTS_H #define EVENTS_H -#include +#include /** * State of the connection. The state of the connection is returned @@ -65,7 +65,7 @@ private: int m_width, m_height; public: ScreenResizeEvent(int w, int h) : - QCustomEvent(ScreenResizeEventType), + TQCustomEvent(ScreenResizeEventType), m_width(w), m_height(h) {}; @@ -81,7 +81,7 @@ private: RemoteViewStatus m_status; public: StatusChangeEvent(RemoteViewStatus s) : - QCustomEvent(StatusChangeEventType), + TQCustomEvent(StatusChangeEventType), m_status(s) {}; RemoteViewStatus status() const { return m_status; }; @@ -93,7 +93,7 @@ class PasswordRequiredEvent : public QCustomEvent { public: PasswordRequiredEvent() : - QCustomEvent(PasswordRequiredEventType) + TQCustomEvent(PasswordRequiredEventType) {}; }; @@ -104,7 +104,7 @@ class FatalErrorEvent : public QCustomEvent ErrorCode m_error; public: FatalErrorEvent(ErrorCode e) : - QCustomEvent(FatalErrorEventType), + TQCustomEvent(FatalErrorEventType), m_error(e) {}; @@ -117,7 +117,7 @@ class DesktopInitEvent : public QCustomEvent { public: DesktopInitEvent() : - QCustomEvent(DesktopInitEventType) + TQCustomEvent(DesktopInitEventType) {}; }; @@ -129,7 +129,7 @@ private: int m_x, m_y, m_width, m_height; public: ScreenRepaintEvent(int x, int y, int w, int h) : - QCustomEvent(ScreenRepaintEventType), + TQCustomEvent(ScreenRepaintEventType), m_x(x), m_y(y), m_width(w), @@ -147,7 +147,7 @@ class BeepEvent : public QCustomEvent { public: BeepEvent() : - QCustomEvent(BeepEventType) + TQCustomEvent(BeepEventType) {}; }; @@ -160,7 +160,7 @@ private: int m_length; public: ServerCutEvent(char *bytes, int length) : - QCustomEvent(ServerCutEventType), + TQCustomEvent(ServerCutEventType), m_bytes(bytes), m_length(length) {}; @@ -179,7 +179,7 @@ private: int m_x, m_y, m_buttonMask; public: MouseStateEvent(int x, int y, int buttonMask) : - QCustomEvent(MouseStateEventType), + TQCustomEvent(MouseStateEventType), m_x(x), m_y(y), m_buttonMask(buttonMask) @@ -197,7 +197,7 @@ class WalletOpenEvent : public QCustomEvent { public: WalletOpenEvent() : - QCustomEvent(WalletOpenEventType) + TQCustomEvent(WalletOpenEventType) {}; }; diff --git a/krdc/hostpreferences.cpp b/krdc/hostpreferences.cpp index 4b02191b..dae9a09a 100644 --- a/krdc/hostpreferences.cpp +++ b/krdc/hostpreferences.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include HostPreferences *HostPreferences::m_instance = 0; static KStaticDeleter sd; @@ -38,7 +38,7 @@ HostPreferences *HostPreferences::instance() return m_instance; } -HostPref::HostPref(KConfig *conf, const QString &host, const QString &type) : +HostPref::HostPref(KConfig *conf, const TQString &host, const TQString &type) : m_host(host), m_type(type), m_config(conf) { @@ -48,20 +48,20 @@ HostPref::~HostPref() { m_config->sync(); } -QString HostPref::host() const { +TQString HostPref::host() const { return m_host; } -QString HostPref::type() const { +TQString HostPref::type() const { return m_type; } -QString HostPref::prefix() const { +TQString HostPref::prefix() const { return prefix(m_host, m_type); } -QString HostPref::prefix(const QString &host, const QString &type) { - return QString("PerHost-%1-%2-").arg(type).arg(host); +TQString HostPref::prefix(const TQString &host, const TQString &type) { + return TQString("PerHost-%1-%2-").arg(type).arg(host); } @@ -74,7 +74,7 @@ HostPreferences::~HostPreferences() { sd.setObject( m_instance, 0, false ); } -HostPrefPtr HostPreferences::getHostPref(const QString &host, const QString &type) { +HostPrefPtr HostPreferences::getHostPref(const TQString &host, const TQString &type) { m_config->setGroup("PerHostSettings"); if (!m_config->readBoolEntry(HostPref::prefix(host, type)+"exists")) return 0; @@ -93,7 +93,7 @@ HostPrefPtr HostPreferences::getHostPref(const QString &host, const QString &typ return 0; } -HostPrefPtr HostPreferences::createHostPref(const QString &host, const QString &type) { +HostPrefPtr HostPreferences::createHostPref(const TQString &host, const TQString &type) { HostPrefPtr hp = getHostPref(host, type); if (hp) return hp; @@ -128,13 +128,13 @@ HostPrefPtr HostPreferences::rdpDefaults() HostPrefPtrList HostPreferences::getAllHostPrefs() { HostPrefPtrList r; - QMap map = m_config->entryMap("PerHostSettings"); - QStringList keys = map.keys(); - QStringList::iterator it = keys.begin(); + TQMap map = m_config->entryMap("PerHostSettings"); + TQStringList keys = map.keys(); + TQStringList::iterator it = keys.begin(); while (it != keys.end()) { - QString key = *it; + TQString key = *it; if (key.endsWith("-exists")) { - QRegExp re("PerHost-([^-]+)-(.*)-exists"); + TQRegExp re("PerHost-([^-]+)-(.*)-exists"); if (re.exactMatch(key)) { HostPrefPtr hp = getHostPref(re.cap(2), re.cap(1)); if (hp) @@ -153,37 +153,37 @@ void HostPreferences::removeHostPref(HostPref *hostPref) { void HostPreferences::setShowBrowsingPanel( bool b ) { - m_config->setGroup( QString::null ); + m_config->setGroup( TQString::null ); m_config->writeEntry( "browsingPanel", b ); } -void HostPreferences::setServerCompletions( const QStringList &list ) +void HostPreferences::setServerCompletions( const TQStringList &list ) { - m_config->setGroup( QString::null ); + m_config->setGroup( TQString::null ); m_config->writeEntry( "serverCompletions", list ); } -void HostPreferences::setServerHistory( const QStringList &list ) +void HostPreferences::setServerHistory( const TQStringList &list ) { - m_config->setGroup( QString::null ); + m_config->setGroup( TQString::null ); m_config->writeEntry( "serverHistory", list ); } bool HostPreferences::showBrowsingPanel() { - m_config->setGroup( QString::null ); + m_config->setGroup( TQString::null ); return m_config->readBoolEntry( "browsingPanel" ); } -QStringList HostPreferences::serverCompletions() +TQStringList HostPreferences::serverCompletions() { - m_config->setGroup( QString::null ); + m_config->setGroup( TQString::null ); return m_config->readListEntry( "serverCompletions" ); } -QStringList HostPreferences::serverHistory() +TQStringList HostPreferences::serverHistory() { - m_config->setGroup( QString::null ); + m_config->setGroup( TQString::null ); return m_config->readListEntry( "serverHistory" ); } diff --git a/krdc/hostpreferences.h b/krdc/hostpreferences.h index 09b4abe6..9b74b235 100644 --- a/krdc/hostpreferences.h +++ b/krdc/hostpreferences.h @@ -19,8 +19,8 @@ #ifndef HOSTPREFERENCES_H #define HOSTPREFERENCES_H -#include -#include +#include +#include #include "smartptr.h" class HostPreferences; @@ -29,11 +29,11 @@ class KConfig; class HostPref { protected: friend class HostPreferences; - QString m_host; - QString m_type; + TQString m_host; + TQString m_type; KConfig *m_config; - HostPref(KConfig *conf, const QString &host, const QString &type); + HostPref(KConfig *conf, const TQString &host, const TQString &type); virtual void load() = 0; virtual void setDefaults() = 0; @@ -42,35 +42,35 @@ protected: public: virtual ~HostPref(); - virtual QString prefDescription() const = 0; - QString host() const; - QString type() const; - QString prefix() const; - static QString prefix(const QString &host, const QString &type); + virtual TQString prefDescription() const = 0; + TQString host() const; + TQString type() const; + TQString prefix() const; + static TQString prefix(const TQString &host, const TQString &type); }; typedef SmartPtr HostPrefPtr; -typedef QValueList HostPrefPtrList; +typedef TQValueList HostPrefPtrList; class HostPreferences { public: static HostPreferences *instance(); ~HostPreferences(); - HostPrefPtr getHostPref(const QString &host, const QString &type); - HostPrefPtr createHostPref(const QString &host, const QString &type); + HostPrefPtr getHostPref(const TQString &host, const TQString &type); + HostPrefPtr createHostPref(const TQString &host, const TQString &type); HostPrefPtrList getAllHostPrefs(); HostPrefPtr vncDefaults(); HostPrefPtr rdpDefaults(); void removeHostPref(HostPref *hostPref); void setShowBrowsingPanel( bool b ); - void setServerCompletions( const QStringList &list ); - void setServerHistory( const QStringList &list ); + void setServerCompletions( const TQStringList &list ); + void setServerHistory( const TQStringList &list ); bool showBrowsingPanel(); - QStringList serverCompletions(); - QStringList serverHistory(); + TQStringList serverCompletions(); + TQStringList serverHistory(); void sync(); diff --git a/krdc/hostprofiles.ui.h b/krdc/hostprofiles.ui.h index 56c63f23..2626bb78 100644 --- a/krdc/hostprofiles.ui.h +++ b/krdc/hostprofiles.ui.h @@ -11,10 +11,10 @@ void HostProfiles::removeHost() { HostPreferences *hps = HostPreferences::instance(); - QListViewItemIterator it(hostListView); + TQListViewItemIterator it(hostListView); while (it.current()) { - QListViewItem *vi = it.current(); + TQListViewItem *vi = it.current(); if (vi->isSelected()) { HostPrefPtr hp = hps->getHostPref(vi->text(0), vi->text(1)); @@ -32,10 +32,10 @@ void HostProfiles::removeAllHosts() { HostPreferences *hps = HostPreferences::instance(); - QListViewItemIterator it(hostListView); + TQListViewItemIterator it(hostListView); while (it.current()) { - QListViewItem *vi = it.current(); + TQListViewItem *vi = it.current(); HostPrefPtr hp = hps->getHostPref(vi->text(0), vi->text(1)); if (hp) deletedHosts += hp; @@ -48,7 +48,7 @@ void HostProfiles::removeAllHosts() void HostProfiles::selectionChanged() { - QListViewItemIterator it(hostListView); + TQListViewItemIterator it(hostListView); while (it.current()) { if (it.current()->isSelected()) @@ -92,7 +92,7 @@ void HostProfiles::save() hps->sync(); } -void HostProfiles::slotHostDoubleClicked( QListViewItem *vi ) +void HostProfiles::slotHostDoubleClicked( TQListViewItem *vi ) { HostPreferences *hps = HostPreferences::instance(); HostPrefPtr hp = hps->getHostPref(vi->text(0), vi->text(1)); diff --git a/krdc/keycapturedialog.cpp b/krdc/keycapturedialog.cpp index 39a68304..47f93455 100644 --- a/krdc/keycapturedialog.cpp +++ b/krdc/keycapturedialog.cpp @@ -24,8 +24,8 @@ #include "keycapturedialog.h" #include "keycapturewidget.h" -#include -#include +#include +#include #include @@ -46,11 +46,11 @@ const int XKeyRelease = KeyRelease; #endif -KeyCaptureDialog::KeyCaptureDialog(QWidget *parent, const char *name) +KeyCaptureDialog::KeyCaptureDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n( "Enter Key Combination" ), Cancel, Cancel, true), m_grabbed(false) { - QFrame *main = makeMainWidget(); - QVBoxLayout *layout = new QVBoxLayout( main, 0, KDialog::spacingHint() ); + TQFrame *main = makeMainWidget(); + TQVBoxLayout *layout = new TQVBoxLayout( main, 0, KDialog::spacingHint() ); m_captureWidget = new KeyCaptureWidget( main, "m_captureWidget" ); layout->addWidget( m_captureWidget ); layout->addStretch(); @@ -86,7 +86,7 @@ bool KeyCaptureDialog::x11Event(XEvent *pEvent) default: break; } - return QWidget::x11Event( pEvent ); + return TQWidget::x11Event( pEvent ); } void KeyCaptureDialog::x11EventKeyPress( XEvent *pEvent ) @@ -129,7 +129,7 @@ void KeyCaptureDialog::x11EventKeyPress( XEvent *pEvent ) else keyModX = pEvent->xkey.state & ~keyModX; - QString keyModStr; + TQString keyModStr; if( keyModX & KKeyNative::modX(KKey::WIN) ) keyModStr += KKey::modFlagLabel(KKey::WIN) + "+"; if( keyModX & KKeyNative::modX(KKey::ALT) ) keyModStr += KKey::modFlagLabel(KKey::ALT) + "+"; if( keyModX & KKeyNative::modX(KKey::CTRL) ) keyModStr += KKey::modFlagLabel(KKey::CTRL) + "+"; diff --git a/krdc/keycapturedialog.h b/krdc/keycapturedialog.h index 6f3aa312..1b45b234 100644 --- a/krdc/keycapturedialog.h +++ b/krdc/keycapturedialog.h @@ -32,7 +32,7 @@ class KeyCaptureDialog : public KDialogBase { bool m_grabbed; public: - KeyCaptureDialog(QWidget * parent= 0, const char *name = 0); + KeyCaptureDialog(TQWidget * parent= 0, const char *name = 0); ~KeyCaptureDialog(); public slots: diff --git a/krdc/kfullscreenpanel.cpp b/krdc/kfullscreenpanel.cpp index 84067359..0c85cfdd 100644 --- a/krdc/kfullscreenpanel.cpp +++ b/krdc/kfullscreenpanel.cpp @@ -20,7 +20,7 @@ Counter::Counter(float start) : m_currentValue(start) { - connect(&m_timer, SIGNAL(timeout()), SLOT(timeout())); + connect(&m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(timeout())); } void Counter::count(float stop, float stepSize, float frequency) { @@ -54,17 +54,17 @@ void Counter::timeout() { } -KFullscreenPanel::KFullscreenPanel(QWidget* parent, +KFullscreenPanel::KFullscreenPanel(TQWidget* parent, const char *name, - const QSize &resolution) : - QWidget(parent, name), + const TQSize &resolution) : + TQWidget(parent, name), m_child(0), m_layout(0), m_fsResolution(resolution), m_counter(0) { - connect(&m_counter, SIGNAL(countingDownFinished()), SLOT(hide())); - connect(&m_counter, SIGNAL(counted(float)), SLOT(movePanel(float))); + connect(&m_counter, TQT_SIGNAL(countingDownFinished()), TQT_SLOT(hide())); + connect(&m_counter, TQT_SIGNAL(counted(float)), TQT_SLOT(movePanel(float))); } KFullscreenPanel::~KFullscreenPanel() { @@ -76,19 +76,19 @@ void KFullscreenPanel::movePanel(float posY) { show(); } -void KFullscreenPanel::setChild(QWidget *child) { +void KFullscreenPanel::setChild(TQWidget *child) { if (m_layout) delete m_layout; m_child = child; - m_layout = new QVBoxLayout(this); + m_layout = new TQVBoxLayout(this); m_layout->addWidget(child); doLayout(); } void KFullscreenPanel::doLayout() { - QSize s = sizeHint(); + TQSize s = sizeHint(); setFixedSize(s); setGeometry((m_fsResolution.width() - s.width())/2, 0, s.width(), s.height()); @@ -102,11 +102,11 @@ void KFullscreenPanel::startHide() { m_counter.count(-height(), -height()/12.0, 24); } -void KFullscreenPanel::enterEvent(QEvent*) { +void KFullscreenPanel::enterEvent(TQEvent*) { emit mouseEnter(); } -void KFullscreenPanel::leaveEvent(QEvent*) { +void KFullscreenPanel::leaveEvent(TQEvent*) { emit mouseLeave(); } diff --git a/krdc/kfullscreenpanel.h b/krdc/kfullscreenpanel.h index 43b4944d..359a4d5c 100644 --- a/krdc/kfullscreenpanel.h +++ b/krdc/kfullscreenpanel.h @@ -18,15 +18,15 @@ #ifndef KFULLSCREENPANEL_H #define KFULLSCREENPANEL_H -#include -#include -#include -#include +#include +#include +#include +#include -class Counter : public QObject { +class Counter : public TQObject { Q_OBJECT private: - QTimer m_timer; + TQTimer m_timer; float m_stopValue, m_currentValue, m_stepSize; int m_timeoutMs; @@ -44,28 +44,28 @@ signals: }; -class KFullscreenPanel : public QWidget { +class KFullscreenPanel : public TQWidget { Q_OBJECT private: - QWidget *m_child; - QVBoxLayout *m_layout; - QSize m_fsResolution; + TQWidget *m_child; + TQVBoxLayout *m_layout; + TQSize m_fsResolution; Counter m_counter; void doLayout(); public: - KFullscreenPanel(QWidget* parent, const char *name, - const QSize &resolution); + KFullscreenPanel(TQWidget* parent, const char *name, + const TQSize &resolution); ~KFullscreenPanel(); - void setChild(QWidget *child); + void setChild(TQWidget *child); void startShow(); void startHide(); protected: - void enterEvent(QEvent *e); - void leaveEvent(QEvent *e); + void enterEvent(TQEvent *e); + void leaveEvent(TQEvent *e); private slots: void movePanel(float posY); diff --git a/krdc/krdc.cpp b/krdc/krdc.cpp index 36939c91..6c08de5d 100644 --- a/krdc/krdc.cpp +++ b/krdc/krdc.cpp @@ -34,10 +34,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #define BUMP_SCROLL_CONSTANT (200) @@ -57,29 +57,29 @@ const int KRDC::TOOLBAR_FPS_1000 = 10000; const int KRDC::TOOLBAR_SPEED_DOWN = 34; const int KRDC::TOOLBAR_SPEED_UP = 20; -QScrollView2::QScrollView2(QWidget *w, const char *name) : - QScrollView(w, name) { +QScrollView2::QScrollView2(TQWidget *w, const char *name) : + TQScrollView(w, name) { setMouseTracking(true); viewport()->setMouseTracking(true); horizontalScrollBar()->setMouseTracking(true); verticalScrollBar()->setMouseTracking(true); } -void QScrollView2::mouseMoveEvent( QMouseEvent *e ) +void QScrollView2::mouseMoveEvent( TQMouseEvent *e ) { e->ignore(); } -QString KRDC::m_lastHost = ""; +TQString KRDC::m_lastHost = ""; -KRDC::KRDC(WindowMode wm, const QString &host, - Quality q, const QString &encodings, - const QString &password, +KRDC::KRDC(WindowMode wm, const TQString &host, + Quality q, const TQString &encodings, + const TQString &password, bool scale, bool localCursor, - QSize initialWindowSize) : - QWidget(0, 0, Qt::WStyle_ContextHelp), + TQSize initialWindowSize) : + TQWidget(0, 0, Qt::WStyle_ContextHelp), m_layout(0), m_scrollView(0), m_view(0), @@ -101,8 +101,8 @@ KRDC::KRDC(WindowMode wm, const QString &host, m_localCursor(localCursor), m_initialWindowSize(initialWindowSize) { - connect(&m_autoHideTimer, SIGNAL(timeout()), SLOT(hideFullscreenToolbarNow())); - connect(&m_bumpScrollTimer, SIGNAL(timeout()), SLOT(bumpScroll())); + connect(&m_autoHideTimer, TQT_SIGNAL(timeout()), TQT_SLOT(hideFullscreenToolbarNow())); + connect(&m_bumpScrollTimer, TQT_SIGNAL(timeout()), TQT_SLOT(bumpScroll())); m_pindown = UserIcon("pindown"); m_pinup = UserIcon("pinup"); @@ -116,8 +116,8 @@ KRDC::KRDC(WindowMode wm, const QString &host, bool KRDC::start() { - QString userName, password; - QString serverHost; + TQString userName, password; + TQString serverHost; int serverPort = 5900; int ret_status; @@ -141,11 +141,11 @@ bool KRDC::start() MainDialog mainDlg(this, "MainDialog"); mainDlg.setRemoteHost(m_lastHost); - if (mainDlg.exec() == QDialog::Rejected) { + if (mainDlg.exec() == TQDialog::Rejected) { return false; } - QString m_host = mainDlg.remoteHost(); + TQString m_host = mainDlg.remoteHost(); m_lastHost = m_host; if (m_host.startsWith("vnc:/")) m_protocol = PROTOCOL_VNC; @@ -164,9 +164,9 @@ bool KRDC::start() setCaption(i18n("%1 - Remote Desktop Connection").arg(serverHost)); m_scrollView = new QScrollView2(this, "remote scrollview"); - m_scrollView->setFrameStyle(QFrame::NoFrame); - m_scrollView->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, - QSizePolicy::Expanding)); + m_scrollView->setFrameStyle(TQFrame::NoFrame); + m_scrollView->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, + TQSizePolicy::Expanding)); switch(m_protocol) { @@ -190,20 +190,20 @@ bool KRDC::start() m_view->setViewOnly(kapp->config()->readBoolEntry("viewOnly", false)); m_scrollView->addChild(m_view); - QWhatsThis::add(m_view, i18n("Here you can see the remote desktop. If the other side allows you to control it, you can also move the mouse, click or enter keystrokes. If the content does not fit your screen, click on the toolbar's full screen button or scale button. To end the connection, just close the window.")); + TQWhatsThis::add(m_view, i18n("Here you can see the remote desktop. If the other side allows you to control it, you can also move the mouse, click or enter keystrokes. If the content does not fit your screen, click on the toolbar's full screen button or scale button. To end the connection, just close the window.")); - connect(m_view, SIGNAL(changeSize(int,int)), SLOT(setSize(int,int))); - connect(m_view, SIGNAL(connected()), SLOT(show())); - connect(m_view, SIGNAL(disconnected()), SIGNAL(disconnected())); + connect(m_view, TQT_SIGNAL(changeSize(int,int)), TQT_SLOT(setSize(int,int))); + connect(m_view, TQT_SIGNAL(connected()), TQT_SLOT(show())); + connect(m_view, TQT_SIGNAL(disconnected()), TQT_SIGNAL(disconnected())); // note that the disconnectedError() will be disconnected when kremoteview // is completely initialized - connect(m_view, SIGNAL(disconnectedError()), SIGNAL(disconnectedError())); - connect(m_view, SIGNAL(statusChanged(RemoteViewStatus)), - SLOT(changeProgress(RemoteViewStatus))); - connect(m_view, SIGNAL(showingPasswordDialog(bool)), - SLOT(showingPasswordDialog(bool))); - connect(m_keyCaptureDialog, SIGNAL(keyPressed(XEvent*)), - m_view, SLOT(pressKey(XEvent*))); + connect(m_view, TQT_SIGNAL(disconnectedError()), TQT_SIGNAL(disconnectedError())); + connect(m_view, TQT_SIGNAL(statusChanged(RemoteViewStatus)), + TQT_SLOT(changeProgress(RemoteViewStatus))); + connect(m_view, TQT_SIGNAL(showingPasswordDialog(bool)), + TQT_SLOT(showingPasswordDialog(bool))); + connect(m_keyCaptureDialog, TQT_SIGNAL(keyPressed(XEvent*)), + m_view, TQT_SLOT(pressKey(XEvent*))); ret_status = m_view->start(); @@ -212,15 +212,15 @@ bool KRDC::start() void KRDC::changeProgress(RemoteViewStatus s) { if (!m_progressDialog) { - m_progressDialog = new KProgressDialog(0, 0, QString::null, + m_progressDialog = new KProgressDialog(0, 0, TQString::null, "1234567890", false); m_progressDialog->showCancelButton(true); m_progressDialog->setMinimumDuration(0x7fffffff);//disable effectively m_progress = m_progressDialog->progressBar(); m_progress->setTextEnabled(false); m_progress->setTotalSteps(3); - connect(m_progressDialog, SIGNAL(cancelClicked()), - SIGNAL(disconnectedError())); + connect(m_progressDialog, TQT_SIGNAL(cancelClicked()), + TQT_SIGNAL(disconnectedError())); } if (s == REMOTE_VIEW_CONNECTING) { @@ -243,10 +243,10 @@ void KRDC::changeProgress(RemoteViewStatus s) { m_progress->setValue(3); hideProgressDialog(); if (s == REMOTE_VIEW_CONNECTED) { - QObject::disconnect(m_view, SIGNAL(disconnectedError()), - this, SIGNAL(disconnectedError())); - connect(m_view, SIGNAL(disconnectedError()), - SIGNAL(disconnected())); + TQObject::disconnect(m_view, TQT_SIGNAL(disconnectedError()), + this, TQT_SIGNAL(disconnectedError())); + connect(m_view, TQT_SIGNAL(disconnectedError()), + TQT_SIGNAL(disconnected())); if (m_view->startFullscreen()) { // m_view instance is asking to start in fullscreen mode enableFullscreen(true); @@ -268,7 +268,7 @@ void KRDC::showingPasswordDialog(bool b) { void KRDC::showProgressDialog() { m_showProgress = true; - QTimer::singleShot(400, this, SLOT(showProgressTimeout())); + TQTimer::singleShot(400, this, TQT_SLOT(showProgressTimeout())); } void KRDC::hideProgressDialog() { @@ -293,11 +293,11 @@ void KRDC::quit() { emit disconnected(); } -bool KRDC::parseHost(QString &str, Protocol &prot, QString &serverHost, int &serverPort, - QString &userName, QString &password) { - QString s = str; - userName = QString::null; - password = QString::null; +bool KRDC::parseHost(TQString &str, Protocol &prot, TQString &serverHost, int &serverPort, + TQString &userName, TQString &password) { + TQString s = str; + userName = TQString::null; + password = TQString::null; if (prot == PROTOCOL_AUTO) { if(s.startsWith("smb:/")>0) { //we know it's more likely to be windows.. @@ -340,15 +340,15 @@ bool KRDC::parseHost(QString &str, Protocol &prot, QString &serverHost, int &ser if (url.port()) { if (url.hasUser()) - str = QString("%1@%2:%3").arg(userName).arg(serverHost).arg(url.port()); + str = TQString("%1@%2:%3").arg(userName).arg(serverHost).arg(url.port()); else - str = QString("%1:%2").arg(serverHost).arg(url.port()); + str = TQString("%1:%2").arg(serverHost).arg(url.port()); } else { if (url.hasUser()) - str = QString("%1@%2").arg(userName).arg(serverHost); + str = TQString("%1@%2").arg(userName).arg(serverHost); else - str = QString("%1").arg(serverHost); + str = TQString("%1").arg(serverHost); } return true; } @@ -373,26 +373,26 @@ void KRDC::enableFullscreen(bool on) m_view->switchFullscreen(on); } -QSize KRDC::sizeHint() +TQSize KRDC::sizeHint() { if ((m_isFullscreen != WINDOW_MODE_FULLSCREEN) && m_toolbar) { int dockHint = m_dockArea->sizeHint().height(); dockHint = dockHint < 1 ? 1 : dockHint; // fix wrong size hint - return QSize(m_view->framebufferSize().width(), + return TQSize(m_view->framebufferSize().width(), dockHint + m_view->framebufferSize().height()); } else return m_view->framebufferSize(); } -QPopupMenu *KRDC::createPopupMenu(QWidget *parent) const { +TQPopupMenu *KRDC::createPopupMenu(TQWidget *parent) const { KPopupMenu *pu = new KPopupMenu(parent); - pu->insertItem(i18n("View Only"), this, SLOT(viewOnlyToggled()), 0, VIEW_ONLY_ID); + pu->insertItem(i18n("View Only"), this, TQT_SLOT(viewOnlyToggled()), 0, VIEW_ONLY_ID); pu->setCheckable(true); pu->setItemChecked(VIEW_ONLY_ID, m_view->viewOnly()); if (m_view->supportsLocalCursor()) { pu->insertItem(i18n("Always Show Local Cursor"), this, - SLOT(showLocalCursorToggled()), 0, + TQT_SLOT(showLocalCursorToggled()), 0, SHOW_LOCAL_CURSOR_ID); pu->setCheckable(true); pu->setItemChecked(SHOW_LOCAL_CURSOR_ID, @@ -407,9 +407,9 @@ void KRDC::switchToFullscreen(bool scaling) bool fromFullscreen = (m_isFullscreen == WINDOW_MODE_FULLSCREEN); - QWidget *desktop = QApplication::desktop(); - QSize ds = desktop->size(); - QSize fbs = m_view->framebufferSize(); + TQWidget *desktop = TQApplication::desktop(); + TQSize ds = desktop->size(); + TQSize fbs = m_view->framebufferSize(); bool scalingPossible = m_view->supportsScaling() && ((fbs.width() >= ds.width()) || (fbs.height() >= ds.height())); @@ -421,9 +421,9 @@ void KRDC::switchToFullscreen(bool scaling) fbs.height(), x, y); if (m_oldResolution.valid) - m_fullscreenResolution = QSize(x, y); + m_fullscreenResolution = TQSize(x, y); else - m_fullscreenResolution = QApplication::desktop()->size(); + m_fullscreenResolution = TQApplication::desktop()->size(); m_isFullscreen = WINDOW_MODE_FULLSCREEN; if (!scalingPossible) m_windowScaling = m_view->scaling(); @@ -449,7 +449,7 @@ void KRDC::switchToFullscreen(bool scaling) if (m_layout) delete m_layout; - m_layout = new QVBoxLayout(this); + m_layout = new TQVBoxLayout(this); m_layout->addWidget(m_scrollView); if (scalingPossible) { @@ -464,36 +464,36 @@ void KRDC::switchToFullscreen(bool scaling) m_view->enableScaling(false); m_fsToolbar = new KFullscreenPanel(this, "fstoolbar", m_fullscreenResolution); - connect(m_fsToolbar, SIGNAL(mouseEnter()), SLOT(showFullscreenToolbar())); - connect(m_fsToolbar, SIGNAL(mouseLeave()), SLOT(hideFullscreenToolbarDelayed())); + connect(m_fsToolbar, TQT_SIGNAL(mouseEnter()), TQT_SLOT(showFullscreenToolbar())); + connect(m_fsToolbar, TQT_SIGNAL(mouseLeave()), TQT_SLOT(hideFullscreenToolbarDelayed())); KToolBar *t = new KToolBar(m_fsToolbar); m_fsToolbarWidget = t; t->setIconSize(KIcon::Panel); - QIconSet pinIconSet; - pinIconSet.setPixmap(m_pinup, QIconSet::Automatic, QIconSet::Normal, QIconSet::On); - pinIconSet.setPixmap(m_pindown, QIconSet::Automatic, QIconSet::Normal, QIconSet::Off); + TQIconSet pinIconSet; + pinIconSet.setPixmap(m_pinup, TQIconSet::Automatic, TQIconSet::Normal, TQIconSet::On); + pinIconSet.setPixmap(m_pindown, TQIconSet::Automatic, TQIconSet::Normal, TQIconSet::Off); t->insertButton("pinup", FS_AUTOHIDE_ID); KToolBarButton *pinButton = t->getButton(FS_AUTOHIDE_ID); pinButton->setIconSet(pinIconSet); - QToolTip::add(pinButton, i18n("Autohide on/off")); + TQToolTip::add(pinButton, i18n("Autohide on/off")); t->setToggle(FS_AUTOHIDE_ID); - t->addConnection(FS_AUTOHIDE_ID, SIGNAL(toggled(bool)), this, SLOT(setFsToolbarAutoHide(bool))); + t->addConnection(FS_AUTOHIDE_ID, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setFsToolbarAutoHide(bool))); t->insertButton("window_nofullscreen", FS_FULLSCREEN_ID); KToolBarButton *fullscreenButton = t->getButton(FS_FULLSCREEN_ID); - QToolTip::add(fullscreenButton, i18n("Fullscreen")); + TQToolTip::add(fullscreenButton, i18n("Fullscreen")); t->setToggle(FS_FULLSCREEN_ID); t->setButton(FS_FULLSCREEN_ID, true); - t->addConnection(FS_FULLSCREEN_ID, SIGNAL(toggled(bool)), this, SLOT(enableFullscreen(bool))); + t->addConnection(FS_FULLSCREEN_ID, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableFullscreen(bool))); m_popup = createPopupMenu(t); t->insertButton("configure", FS_ADVANCED_ID, m_popup, true, i18n("Advanced options")); KToolBarButton *advancedButton = t->getButton(FS_ADVANCED_ID); - QToolTip::add(advancedButton, i18n("Advanced options")); + TQToolTip::add(advancedButton, i18n("Advanced options")); - QLabel *hostLabel = new QLabel(t); + TQLabel *hostLabel = new TQLabel(t); hostLabel->setName("kde toolbar widget"); hostLabel->setAlignment(Qt::AlignCenter); hostLabel->setText(" "+m_host+" "); @@ -503,21 +503,21 @@ void KRDC::switchToFullscreen(bool scaling) if (scalingPossible) { t->insertButton("viewmagfit", FS_SCALE_ID); KToolBarButton *scaleButton = t->getButton(FS_SCALE_ID); - QToolTip::add(scaleButton, i18n("Scale view")); + TQToolTip::add(scaleButton, i18n("Scale view")); t->setToggle(FS_SCALE_ID); t->setButton(FS_SCALE_ID, scaling); - t->addConnection(FS_SCALE_ID, SIGNAL(toggled(bool)), this, SLOT(switchToFullscreen(bool))); + t->addConnection(FS_SCALE_ID, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(switchToFullscreen(bool))); } t->insertButton("iconify", FS_ICONIFY_ID); KToolBarButton *iconifyButton = t->getButton(FS_ICONIFY_ID); - QToolTip::add(iconifyButton, i18n("Minimize")); - t->addConnection(FS_ICONIFY_ID, SIGNAL(clicked()), this, SLOT(iconify())); + TQToolTip::add(iconifyButton, i18n("Minimize")); + t->addConnection(FS_ICONIFY_ID, TQT_SIGNAL(clicked()), this, TQT_SLOT(iconify())); t->insertButton("close", FS_CLOSE_ID); KToolBarButton *closeButton = t->getButton(FS_CLOSE_ID); - QToolTip::add(closeButton, i18n("Close")); - t->addConnection(FS_CLOSE_ID, SIGNAL(clicked()), this, SLOT(quit())); + TQToolTip::add(closeButton, i18n("Close")); + t->addConnection(FS_CLOSE_ID, TQT_SIGNAL(clicked()), this, TQT_SLOT(quit())); m_fsToolbar->setChild(t); @@ -574,36 +574,36 @@ void KRDC::switchToNormal(bool scaling) } if (!m_toolbar) { - m_dockArea = new QDockArea(Qt::Horizontal, QDockArea::Normal, this); - m_dockArea->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, - QSizePolicy::Fixed)); + m_dockArea = new TQDockArea(Qt::Horizontal, TQDockArea::Normal, this); + m_dockArea->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, + TQSizePolicy::Fixed)); KToolBar *t = new KToolBar(m_dockArea); m_toolbar = t; t->setIconText(KToolBar::IconTextRight); - connect(t, SIGNAL(placeChanged(QDockWindow::Place)), SLOT(toolbarChanged())); + connect(t, TQT_SIGNAL(placeChanged(TQDockWindow::Place)), TQT_SLOT(toolbarChanged())); t->insertButton("window_fullscreen", 0, true, i18n("Fullscreen")); KToolBarButton *fullscreenButton = t->getButton(0); - QToolTip::add(fullscreenButton, i18n("Fullscreen")); - QWhatsThis::add(fullscreenButton, i18n("Switches to full screen. If the remote desktop has a different screen resolution, Remote Desktop Connection will automatically switch to the nearest resolution.")); + TQToolTip::add(fullscreenButton, i18n("Fullscreen")); + TQWhatsThis::add(fullscreenButton, i18n("Switches to full screen. If the remote desktop has a different screen resolution, Remote Desktop Connection will automatically switch to the nearest resolution.")); t->setToggle(0); t->setButton(0, false); - t->addConnection(0, SIGNAL(toggled(bool)), this, SLOT(enableFullscreen(bool))); + t->addConnection(0, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableFullscreen(bool))); if (m_view->supportsScaling()) { t->insertButton("viewmagfit", 1, true, i18n("Scale")); KToolBarButton *scaleButton = t->getButton(1); - QToolTip::add(scaleButton, i18n("Scale view")); - QWhatsThis::add(scaleButton, i18n("This option scales the remote screen to fit your window size.")); + TQToolTip::add(scaleButton, i18n("Scale view")); + TQWhatsThis::add(scaleButton, i18n("This option scales the remote screen to fit your window size.")); t->setToggle(1); t->setButton(1, scaling); - t->addConnection(1, SIGNAL(toggled(bool)), this, SLOT(switchToNormal(bool))); + t->addConnection(1, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(switchToNormal(bool))); } t->insertButton("key_enter", 2, true, i18n("Special Keys")); KToolBarButton *skButton = t->getButton(2); - QToolTip::add(skButton, i18n("Enter special keys.")); - QWhatsThis::add(skButton, i18n("This option allows you to send special key combinations like Ctrl-Alt-Del to the remote host.")); - t->addConnection(2, SIGNAL(clicked()), m_keyCaptureDialog, SLOT(execute())); + TQToolTip::add(skButton, i18n("Enter special keys.")); + TQWhatsThis::add(skButton, i18n("This option allows you to send special key combinations like Ctrl-Alt-Del to the remote host.")); + t->addConnection(2, TQT_SIGNAL(clicked()), m_keyCaptureDialog, TQT_SLOT(execute())); if (m_popup) { m_popup->deleteLater(); @@ -613,14 +613,14 @@ void KRDC::switchToNormal(bool scaling) m_popup = createPopupMenu(t); t->insertButton("configure", 3, m_popup, true, i18n("Advanced")); KToolBarButton *advancedButton = t->getButton(3); - QToolTip::add(advancedButton, i18n("Advanced options")); + TQToolTip::add(advancedButton, i18n("Advanced options")); if (m_layout) delete m_layout; - m_layout = new QVBoxLayout(this); + m_layout = new TQVBoxLayout(this); m_layout->addWidget(m_dockArea); m_layout->addWidget(m_scrollView); - m_layout->setGeometry(QRect(0, 0, m_scrollView->width(), + m_layout->setGeometry(TQRect(0, 0, m_scrollView->width(), m_dockArea->height() + m_scrollView->height())); } @@ -641,7 +641,7 @@ void KRDC::switchToNormal(bool scaling) if (!fromFullscreen) { if (m_initialWindowSize.isValid()) { resize(m_initialWindowSize); - m_initialWindowSize = QSize(); + m_initialWindowSize = TQSize(); } else if (!scalingChanged) resize(sizeHint()); @@ -684,18 +684,18 @@ void KRDC::toolbarChanged() { setMaximumSize(sizeHint()); // resize window when toolbar is docked and it was maximized - QSize fs = m_view->framebufferSize(); - QSize cs = size(); - QSize cs1(cs.width(), cs.height()-1); // adjusted for QDockArea.height()==1 + TQSize fs = m_view->framebufferSize(); + TQSize cs = size(); + TQSize cs1(cs.width(), cs.height()-1); // adjusted for TQDockArea.height()==1 if ((fs == cs) || (fs == cs1)) resize(sizeHint()); } -bool KRDC::event(QEvent *e) { +bool KRDC::event(TQEvent *e) { /* used to change resolution when fullscreen was minimized */ - if ((!m_fullscreenMinimized) || (e->type() != QEvent::WindowActivate)) - return QWidget::event(e); + if ((!m_fullscreenMinimized) || (e->type() != TQEvent::WindowActivate)) + return TQWidget::event(e); m_fullscreenMinimized = false; int x, y; @@ -705,9 +705,9 @@ bool KRDC::event(QEvent *e) { m_view->height(), x, y); if (m_oldResolution.valid) - m_fullscreenResolution = QSize(x, y); + m_fullscreenResolution = TQSize(x, y); else - m_fullscreenResolution = QApplication::desktop()->size(); + m_fullscreenResolution = TQApplication::desktop()->size(); showFullScreen(); setGeometry(0, 0, m_fullscreenResolution.width(), @@ -717,17 +717,17 @@ bool KRDC::event(QEvent *e) { m_view->switchFullscreen( true ); KWin::setState(winId(), NET::StaysOnTop); - return QWidget::event(e); + return TQWidget::event(e); } -bool KRDC::eventFilter(QObject *watched, QEvent *e) { -/* used to get events from QScrollView on resize for scale mode*/ +bool KRDC::eventFilter(TQObject *watched, TQEvent *e) { +/* used to get events from TQScrollView on resize for scale mode*/ if (watched != m_scrollView) return false; - if (e->type() != QEvent::Resize) + if (e->type() != TQEvent::Resize) return false; - QResizeEvent *re = (QResizeEvent*) e; + TQResizeEvent *re = (TQResizeEvent*) e; m_view->resize(re->size()); return false; } @@ -736,7 +736,7 @@ void KRDC::setSize(int w, int h) { int dw, dh; - QWidget *desktop = QApplication::desktop(); + TQWidget *desktop = TQApplication::desktop(); dw = desktop->width(); dh = desktop->height(); @@ -763,10 +763,10 @@ void KRDC::repositionView(bool fullscreen) { if (!m_scrollView) return; - QSize s = m_view->size(); + TQSize s = m_view->size(); if (fullscreen) { - QSize d = m_fullscreenResolution; + TQSize d = m_fullscreenResolution; bool margin = false; if (d.width() > s.width()) ox = (d.width() - s.width()) / 2; @@ -807,10 +807,10 @@ void KRDC::hideFullscreenToolbarNow() { } void KRDC::bumpScroll() { - int x = QCursor::pos().x(); - int y = QCursor::pos().y(); - QSize s = m_view->size(); - QSize d = m_fullscreenResolution; + int x = TQCursor::pos().x(); + int y = TQCursor::pos().y(); + TQSize s = m_view->size(); + TQSize d = m_fullscreenResolution; if (d.width() < s.width()) { if (x == 0) @@ -838,7 +838,7 @@ void KRDC::hideFullscreenToolbarDelayed() { m_autoHideTimer.start(TOOLBAR_AUTOHIDE_TIMEOUT, true); } -void KRDC::mouseMoveEvent(QMouseEvent *e) { +void KRDC::mouseMoveEvent(TQMouseEvent *e) { if (m_isFullscreen != WINDOW_MODE_FULLSCREEN) return; @@ -847,8 +847,8 @@ void KRDC::mouseMoveEvent(QMouseEvent *e) { /* Bump Scrolling */ - QSize s = m_view->size(); - QSize d = m_fullscreenResolution; + TQSize s = m_view->size(); + TQSize d = m_fullscreenResolution; if ((d.width() < s.width()) || d.height() < s.height()) { if ((x == 0) || (x >= d.width()-1) || (y == 0) || (y >= d.height()-1)) @@ -874,7 +874,7 @@ void KRDC::mouseMoveEvent(QMouseEvent *e) { e->accept(); } -void KRDC::setLastHost(const QString &lastHost) { +void KRDC::setLastHost(const TQString &lastHost) { m_lastHost = lastHost; } diff --git a/krdc/krdc.h b/krdc/krdc.h index 5bf9a4bd..a5925540 100644 --- a/krdc/krdc.h +++ b/krdc/krdc.h @@ -19,12 +19,12 @@ #define KRDC_H #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "vnc/kvncview.h" #include "rdp/krdpview.h" @@ -51,12 +51,12 @@ enum Protocol { PROTOCOL_RDP }; -// Overloaded QScrollView, to let mouse move events through to remote widget -class QScrollView2 : public QScrollView { +// Overloaded TQScrollView, to let mouse move events through to remote widget +class QScrollView2 : public TQScrollView { public: - QScrollView2(QWidget *w, const char *name); + QScrollView2(TQWidget *w, const char *name); protected: - virtual void mouseMoveEvent(QMouseEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); }; @@ -65,51 +65,51 @@ class KRDC : public QWidget Q_OBJECT private: SmartPtr m_progressDialog; // dialog, displayed while connecting - QVBoxLayout *m_layout; // the layout for autosizing the scrollview - QScrollView *m_scrollView; // scrollview that contains the remote widget + TQVBoxLayout *m_layout; // the layout for autosizing the scrollview + TQScrollView *m_scrollView; // scrollview that contains the remote widget KProgress *m_progress; // progress bar for the dialog KRemoteView *m_view; // the remote widget (e.g. KVncView) SmartPtr m_keyCaptureDialog; // dialog for key capturing KFullscreenPanel *m_fsToolbar; // toolbar for fullscreen (0 in normal mode) - QWidget *m_fsToolbarWidget; // qt designer widget for fs toolbar + TQWidget *m_fsToolbarWidget; // qt designer widget for fs toolbar // (invalid in normal mode) - QPixmap m_pinup, m_pindown; // fs toolbar imaged for autohide button + TQPixmap m_pinup, m_pindown; // fs toolbar imaged for autohide button KToolBar *m_toolbar; // toolbar in normal mode (0 in fs mode) - QDockArea *m_dockArea; // dock area for toolbar in normal mode (0 in fs mode) - QPopupMenu *m_popup; // advanced options popup (0 in fs mode) - QDesktopWidget m_desktopWidget; + TQDockArea *m_dockArea; // dock area for toolbar in normal mode (0 in fs mode) + TQPopupMenu *m_popup; // advanced options popup (0 in fs mode) + TQDesktopWidget m_desktopWidget; static const int TOOLBAR_AUTOHIDE_TIMEOUT; bool m_ftAutoHide; // if true auto hide in fs is activated - QTimer m_autoHideTimer; // timer for autohide + TQTimer m_autoHideTimer; // timer for autohide - QTimer m_bumpScrollTimer; // timer for bump scrolling (in fs, when res too large) + TQTimer m_bumpScrollTimer; // timer for bump scrolling (in fs, when res too large) bool m_showProgress; // can disable showing the progress dialog temporary - QString m_host; // host string as given from user + TQString m_host; // host string as given from user Protocol m_protocol; // the used protocol Quality m_quality; // current quality setting - QString m_encodings; // string containing the encodings, space separated, + TQString m_encodings; // string containing the encodings, space separated, // used for config before connection - QString m_password; // if not null, contains the password to use - QString m_resolution;// contains an alternative resolution - QString m_keymap; // keymap on the terminal server + TQString m_password; // if not null, contains the password to use + TQString m_resolution;// contains an alternative resolution + TQString m_keymap; // keymap on the terminal server WindowMode m_isFullscreen; // fs/normal state Resolution m_oldResolution; // conatins encoded res before fs bool m_fullscreenMinimized; // true if window is currently minimized from fs - QSize m_fullscreenResolution; // xvidmode size (valid only in fs) + TQSize m_fullscreenResolution; // xvidmode size (valid only in fs) bool m_windowScaling; // used in startup and fullscreen to determine // whether scaling should be enabled in norm mode. // The current state is m_view->scaled(). bool m_localCursor; // show local cursor no matter what - QSize m_initialWindowSize; // initial window size (windowed mode only), + TQSize m_initialWindowSize; // initial window size (windowed mode only), // invalid after first use - static QString m_lastHost; // remembers last value of host input + static TQString m_lastHost; // remembers last value of host input - bool parseHost(QString &s, Protocol &prot, QString &serverHost, int &serverPort, - QString &userName, QString &password); + bool parseHost(TQString &s, Protocol &prot, TQString &serverHost, int &serverPort, + TQString &userName, TQString &password); void repositionView(bool fullscreen); @@ -120,28 +120,28 @@ private: static const int TOOLBAR_SPEED_DOWN; static const int TOOLBAR_SPEED_UP; void fsToolbarScheduleHidden(); - QPopupMenu *createPopupMenu(QWidget *parent) const; + TQPopupMenu *createPopupMenu(TQWidget *parent) const; protected: - virtual void mouseMoveEvent(QMouseEvent *e); - virtual bool event(QEvent *e); - virtual bool eventFilter(QObject *watched, QEvent *e); - virtual QSize sizeHint(); + virtual void mouseMoveEvent(TQMouseEvent *e); + virtual bool event(TQEvent *e); + virtual bool eventFilter(TQObject *watched, TQEvent *e); + virtual TQSize sizeHint(); public: KRDC(WindowMode wm = WINDOW_MODE_AUTO, - const QString &host = QString::null, + const TQString &host = TQString::null, Quality q = QUALITY_UNKNOWN, - const QString &encodings = QString::null, - const QString &password = QString::null, + const TQString &encodings = TQString::null, + const TQString &password = TQString::null, bool scale = false, bool localCursor = false, - QSize initialWindowSize = QSize()); + TQSize initialWindowSize = TQSize()); ~KRDC(); bool start(); - static void setLastHost(const QString &host); + static void setLastHost(const TQString &host); private slots: void changeProgress(RemoteViewStatus s); diff --git a/krdc/kremoteview.cpp b/krdc/kremoteview.cpp index fab9ed29..76ae6267 100644 --- a/krdc/kremoteview.cpp +++ b/krdc/kremoteview.cpp @@ -17,10 +17,10 @@ #include "kremoteview.h" -KRemoteView::KRemoteView(QWidget *parent, +KRemoteView::KRemoteView(TQWidget *parent, const char *name, WFlags f) : - QWidget(parent, name, f), + TQWidget(parent, name, f), m_status(REMOTE_VIEW_DISCONNECTED) { } diff --git a/krdc/kremoteview.h b/krdc/kremoteview.h index a3dbe438..09b312c0 100644 --- a/krdc/kremoteview.h +++ b/krdc/kremoteview.h @@ -19,7 +19,7 @@ #define KREMOTEVIEW_H -#include +#include #include #include "events.h" @@ -55,7 +55,7 @@ enum DotCursorState { * maximum size to the remote size and minimum size to the * smallest resolution that your scaler can handle. * @li if you override mouseMoveEvent() - * you must ignore the QEvent, because the KRDC widget will + * you must ignore the TQEvent, because the KRDC widget will * need it for stuff like toolbar auto-hide and bump * scrolling. If you use x11Event(), make sure that * MotionNotify events will be forwarded. @@ -65,7 +65,7 @@ class KRemoteView : public QWidget { Q_OBJECT public: - KRemoteView(QWidget *parent = 0, + KRemoteView(TQWidget *parent = 0, const char *name = 0, WFlags f = 0); @@ -130,7 +130,7 @@ public: /** * Returns the resolution of the remote framebuffer. - * It should return a null @ref QSize when the size + * It should return a null @ref TQSize when the size * is not known. * The backend must also emit a @ref changeSize() * when the size of the framebuffer becomes available @@ -138,7 +138,7 @@ public: * @return the remote framebuffer size, a null QSize * if unknown */ - virtual QSize framebufferSize() = 0; + virtual TQSize framebufferSize() = 0; /** * Initiate the disconnection. This doesn't need to happen @@ -159,7 +159,7 @@ public: * Returns the host the view is connected to. * @return the host the view is connected to */ - virtual QString host() = 0; + virtual TQString host() = 0; /** * Returns the port the view is connected to. diff --git a/krdc/kservicelocator.cpp b/krdc/kservicelocator.cpp index df97016d..3b38ed9a 100644 --- a/krdc/kservicelocator.cpp +++ b/krdc/kservicelocator.cpp @@ -24,17 +24,17 @@ #include "kservicelocator.h" #include -#include -#include +#include +#include #ifdef HAVE_SLP #include -#include -#include +#include +#include #endif -const QString KServiceLocator::DEFAULT_AUTHORITY = ""; -const QString KServiceLocator::ALL_AUTHORITIES = QString::null; +const TQString KServiceLocator::DEFAULT_AUTHORITY = ""; +const TQString KServiceLocator::ALL_AUTHORITIES = TQString::null; class AsyncThread; @@ -43,20 +43,20 @@ public: KServiceLocator *m_ksl; bool m_opened; volatile bool m_abort; - QString m_lang; + TQString m_lang; bool m_async; bool ensureOpen(); KServiceLocatorPrivate(KServiceLocator *ksl, - const QString &lang, + const TQString &lang, bool async); ~KServiceLocatorPrivate(); #ifdef HAVE_SLP SLPHandle m_handle; AsyncThread *m_thread; - QString m_operationServiceUrl; // for findAttributes()/foundAttributes() + TQString m_operationServiceUrl; // for findAttributes()/foundAttributes() friend class FindSrvTypesThread; friend class FindSrvsThread; @@ -107,14 +107,14 @@ public: #endif }; -KServiceLocator::KServiceLocator(const QString &lang, bool async) : - QObject(0, "KServiceLocator") { +KServiceLocator::KServiceLocator(const TQString &lang, bool async) : + TQObject(0, "KServiceLocator") { d = new KServiceLocatorPrivate(this, lang, async); } KServiceLocatorPrivate::KServiceLocatorPrivate(KServiceLocator *ksl, - const QString &lang, + const TQString &lang, bool async) : m_ksl(ksl), m_opened(false), @@ -146,7 +146,7 @@ private: bool m_success; public: LastSignalEvent(int type, bool s) : - QCustomEvent(type), + TQCustomEvent(type), m_success(s) {}; int success() const { return m_success; }; @@ -156,28 +156,28 @@ const int FoundServiceTypesEventType = 45012; class FoundServiceTypesEvent : public QCustomEvent { private: - QString m_srvtypes; + TQString m_srvtypes; public: FoundServiceTypesEvent(const char *srvtypes) : - QCustomEvent(FoundServiceTypesEventType), + TQCustomEvent(FoundServiceTypesEventType), m_srvtypes(srvtypes) {}; - QString srvtypes() const { return m_srvtypes; }; + TQString srvtypes() const { return m_srvtypes; }; }; const int FoundServiceEventType = 45013; class FoundServiceEvent : public QCustomEvent { private: - QString m_srvUrl; + TQString m_srvUrl; unsigned short m_lifetime; public: FoundServiceEvent(const char *srvUrl, unsigned short lifetime) : - QCustomEvent(FoundServiceEventType), + TQCustomEvent(FoundServiceEventType), m_srvUrl(srvUrl), m_lifetime(lifetime) {}; - QString srvUrl() const { return m_srvUrl; }; + TQString srvUrl() const { return m_srvUrl; }; unsigned short lifetime() const { return m_lifetime; }; }; @@ -185,26 +185,26 @@ const int FoundAttributesEventType = 45014; class FoundAttributesEvent : public QCustomEvent { private: - QString m_attributes; + TQString m_attributes; public: FoundAttributesEvent(const char *attributes) : - QCustomEvent(FoundAttributesEventType), + TQCustomEvent(FoundAttributesEventType), m_attributes(attributes) {}; - QString attributes() const { return m_attributes; }; + TQString attributes() const { return m_attributes; }; }; const int FoundScopesEventType = 45015; class FoundScopesEvent : public QCustomEvent { private: - QString m_scopes; + TQString m_scopes; public: FoundScopesEvent(const char *scopes) : - QCustomEvent(FoundScopesEventType), + TQCustomEvent(FoundScopesEventType), m_scopes(scopes) {}; - QString scopes() const { return m_scopes; }; + TQString scopes() const { return m_scopes; }; }; @@ -226,13 +226,13 @@ SLPBoolean srvTypeCallbackAsync(SLPHandle, void* cookie) { KServiceLocatorPrivate *ksl = (KServiceLocatorPrivate*) cookie; if ((errcode != SLP_OK) || ksl->m_abort) { - QApplication::postEvent(ksl->m_ksl, new LastSignalEvent(LastServiceTypeSignalEventType, + TQApplication::postEvent(ksl->m_ksl, new LastSignalEvent(LastServiceTypeSignalEventType, (errcode == SLP_OK) || (errcode == SLP_LAST_CALL) || ksl->m_abort)); return SLP_FALSE; } - QApplication::postEvent(ksl->m_ksl, new FoundServiceTypesEvent(srvtypes)); + TQApplication::postEvent(ksl->m_ksl, new FoundServiceTypesEvent(srvtypes)); return SLP_TRUE; } @@ -251,13 +251,13 @@ SLPBoolean srvUrlCallbackAsync(SLPHandle, void* cookie) { KServiceLocatorPrivate *ksl = (KServiceLocatorPrivate*) cookie; if ((errcode != SLP_OK) || ksl->m_abort) { - QApplication::postEvent(ksl->m_ksl, new LastSignalEvent(LastServiceSignalEventType, + TQApplication::postEvent(ksl->m_ksl, new LastSignalEvent(LastServiceSignalEventType, (errcode == SLP_OK) || (errcode == SLP_LAST_CALL) || ksl->m_abort)); return SLP_FALSE; } - QApplication::postEvent(ksl->m_ksl, + TQApplication::postEvent(ksl->m_ksl, new FoundServiceEvent(srvurl, lifetime)); return SLP_TRUE; } @@ -275,14 +275,14 @@ SLPBoolean srvAttrCallbackAsync(SLPHandle, void* cookie) { KServiceLocatorPrivate *ksl = (KServiceLocatorPrivate*) cookie; if ((errcode != SLP_OK) || ksl->m_abort) { - QApplication::postEvent(ksl->m_ksl, + TQApplication::postEvent(ksl->m_ksl, new LastSignalEvent(LastAttributesSignalEventType, (errcode == SLP_OK) || (errcode == SLP_LAST_CALL) || ksl->m_abort)); return SLP_FALSE; } - QApplication::postEvent(ksl->m_ksl, + TQApplication::postEvent(ksl->m_ksl, new FoundAttributesEvent(attrlist)); return SLP_TRUE; } @@ -293,7 +293,7 @@ SLPBoolean srvAttrCallbackAsync(SLPHandle, /* Threads for async events */ /* ****** *** ****** *** ****** */ -class AsyncThread : public QThread { +class AsyncThread : public TQThread { protected: SLPHandle m_handle; KServiceLocatorPrivate *m_parent; @@ -303,7 +303,7 @@ protected: } }; class FindSrvTypesThread : public AsyncThread { - QString m_namingAuthority, m_scopeList; + TQString m_namingAuthority, m_scopeList; public: FindSrvTypesThread(SLPHandle handle, KServiceLocatorPrivate *parent, @@ -321,13 +321,13 @@ public: srvTypeCallbackAsync, m_parent); if (e != SLP_OK) - QApplication::postEvent(m_parent->m_ksl, + TQApplication::postEvent(m_parent->m_ksl, new LastSignalEvent(LastServiceTypeSignalEventType, false)); } }; class FindSrvsThread : public AsyncThread { - QString m_srvUrl, m_scopeList, m_filter; + TQString m_srvUrl, m_scopeList, m_filter; public: FindSrvsThread(SLPHandle handle, KServiceLocatorPrivate *parent, @@ -349,13 +349,13 @@ public: srvUrlCallbackAsync, m_parent); if (e != SLP_OK) - QApplication::postEvent(m_parent->m_ksl, + TQApplication::postEvent(m_parent->m_ksl, new LastSignalEvent(LastServiceSignalEventType, false)); } }; class FindAttrsThread : public AsyncThread { - QString m_srvUrl, m_scopeList, m_attrIds; + TQString m_srvUrl, m_scopeList, m_attrIds; public: FindAttrsThread(SLPHandle handle, KServiceLocatorPrivate *parent, @@ -376,7 +376,7 @@ public: srvAttrCallbackAsync, m_parent); if (e != SLP_OK) - QApplication::postEvent(m_parent->m_ksl, + TQApplication::postEvent(m_parent->m_ksl, new LastSignalEvent(LastAttributesSignalEventType, false)); } @@ -393,14 +393,14 @@ public: e = SLPFindScopes(m_handle, &_scopelist); if (e != SLP_OK) { - QApplication::postEvent(m_parent->m_ksl, + TQApplication::postEvent(m_parent->m_ksl, new FoundScopesEvent("")); return; } - QString scopeList(_scopelist); + TQString scopeList(_scopelist); SLPFree(_scopelist); - QApplication::postEvent(m_parent->m_ksl, + TQApplication::postEvent(m_parent->m_ksl, new FoundScopesEvent(scopeList.latin1())); } }; @@ -442,8 +442,8 @@ bool KServiceLocatorPrivate::ensureOpen() { return true; } -bool KServiceLocator::findServiceTypes(const QString &namingAuthority, - const QString &scopeList) { +bool KServiceLocator::findServiceTypes(const TQString &namingAuthority, + const TQString &scopeList) { if (!d->ensureOpen()) return false; if (d->m_thread) @@ -469,9 +469,9 @@ bool KServiceLocator::findServiceTypes(const QString &namingAuthority, } } -bool KServiceLocator::findServices(const QString &srvtype, - const QString &filter, - const QString &scopeList) { +bool KServiceLocator::findServices(const TQString &srvtype, + const TQString &filter, + const TQString &scopeList) { if (!d->ensureOpen()) return false; if (d->m_thread) @@ -499,8 +499,8 @@ bool KServiceLocator::findServices(const QString &srvtype, } } -bool KServiceLocator::findAttributes(const QString &serviceUrl, - const QString &attributeIds) { +bool KServiceLocator::findAttributes(const TQString &serviceUrl, + const TQString &attributeIds) { if (!d->ensureOpen()) return false; if (d->m_thread) @@ -544,7 +544,7 @@ bool KServiceLocator::findScopes() { else { SLPError e; char *_scopelist; - QStringList scopeList; + TQStringList scopeList; e = SLPFindScopes(d->m_handle, &_scopelist); if (e != SLP_OK) return false; @@ -593,7 +593,7 @@ SLPBoolean KServiceLocatorPrivate::handleAttrCallback(const char* attrlist, } -void KServiceLocator::customEvent(QCustomEvent *e) { +void KServiceLocator::customEvent(TQCustomEvent *e) { if ((e->type() >= MinLastSignalEventType) && (e->type() <= MaxLastSignalEventType)){ bool s = true; @@ -633,13 +633,13 @@ void KServiceLocator::customEvent(QCustomEvent *e) { } } -QString KServiceLocator::decodeAttributeValue(const QString &value) { +TQString KServiceLocator::decodeAttributeValue(const TQString &value) { char *n; if (value.isNull()) return value; if (SLPUnescape(value.latin1(), &n, SLP_TRUE) != SLP_OK) - return QString::null; - QString r(n); + return TQString::null; + TQString r(n); SLPFree(n); return r; } @@ -654,21 +654,21 @@ bool KServiceLocator::available() { } void KServiceLocator::abortOperation() { } -bool KServiceLocator::findServiceTypes(const QString &,const QString &) { +bool KServiceLocator::findServiceTypes(const TQString &,const TQString &) { return false; } -bool KServiceLocator::findServices(const QString &,const QString &,const QString &) { +bool KServiceLocator::findServices(const TQString &,const TQString &,const TQString &) { return false; } -bool KServiceLocator::findAttributes(const QString &,const QString &) { +bool KServiceLocator::findAttributes(const TQString &,const TQString &) { return false; } bool KServiceLocator::findScopes() { return false; } -void KServiceLocator::customEvent(QCustomEvent *) { +void KServiceLocator::customEvent(TQCustomEvent *) { } -QString KServiceLocator::decodeAttributeValue(const QString &value) { +TQString KServiceLocator::decodeAttributeValue(const TQString &value) { return value; } @@ -677,18 +677,18 @@ QString KServiceLocator::decodeAttributeValue(const QString &value) { /*** Private emit-helpers ***/ -void KServiceLocator::emitFoundServiceTypes(QString serviceTypes) { +void KServiceLocator::emitFoundServiceTypes(TQString serviceTypes) { emit foundServiceTypes(serviceTypes); } -void KServiceLocator::emitFoundService(QString serviceUrl, +void KServiceLocator::emitFoundService(TQString serviceUrl, int lifetime) { emit foundService(serviceUrl, lifetime); } -void KServiceLocator::emitFoundAttributes(QString serviceUrl, - QString attributes) { +void KServiceLocator::emitFoundAttributes(TQString serviceUrl, + TQString attributes) { emit foundAttributes(serviceUrl, attributes); } -void KServiceLocator::emitFoundScopes(QStringList scopeList) { +void KServiceLocator::emitFoundScopes(TQStringList scopeList) { emit foundScopes(scopeList); } void KServiceLocator::emitLastServiceTypeSignal(bool success) { @@ -705,9 +705,9 @@ void KServiceLocator::emitLastAttributesSignal(bool success) { /*** Static helpers ***/ -void KServiceLocator::parseAttributeList(const QString &attributes, - QMap &attributeMap) { - QRegExp r("\\((.*)=(.*)\\)"); +void KServiceLocator::parseAttributeList(const TQString &attributes, + TQMap &attributeMap) { + TQRegExp r("\\((.*)=(.*)\\)"); r.setMinimal(true); int pos = 0; while (pos >= 0) { @@ -719,16 +719,16 @@ void KServiceLocator::parseAttributeList(const QString &attributes, } } -QStringList KServiceLocator::parseCommaList(const QString &list) { - return QStringList::split(QChar(','), list); +TQStringList KServiceLocator::parseCommaList(const TQString &list) { + return TQStringList::split(TQChar(','), list); } -QString KServiceLocator::createCommaList(const QStringList &values) { +TQString KServiceLocator::createCommaList(const TQStringList &values) { return values.join(","); } -QString KServiceLocator::escapeFilter(const QString &str) { - QString f; +TQString KServiceLocator::escapeFilter(const TQString &str) { + TQString f; int s = str.length(); for (int i = 0; i < s; i++) { char c = str[i]; diff --git a/krdc/kservicelocator.h b/krdc/kservicelocator.h index db247177..c9439279 100644 --- a/krdc/kservicelocator.h +++ b/krdc/kservicelocator.h @@ -21,9 +21,9 @@ #ifndef __KSERVICELOCATOR_H #define __KSERVICELOCATOR_H -#include -#include -#include +#include +#include +#include class KServiceLocatorPrivate; @@ -39,7 +39,7 @@ class KServiceLocatorPrivate; * @version $Id$ * @author Tim Jansen, tim@tjansen.de */ -class KServiceLocator : public QObject { +class KServiceLocator : public TQObject { Q_OBJECT private: friend class KServiceLocatorPrivate; @@ -48,12 +48,12 @@ class KServiceLocator : public QObject { public: /** * Creates a new KServiceLocator. - * @param lang the language to search in, or QString::null for the + * @param lang the language to search in, or TQString::null for the * default language * @param async true to create the service locator in asynchronous * mode, false otherwise */ - KServiceLocator(const QString &lang = QString::null, + KServiceLocator(const TQString &lang = TQString::null, bool async = true); virtual ~KServiceLocator(); @@ -69,8 +69,8 @@ class KServiceLocator : public QObject { * @param attributes a list of encoded attributes * @param attributeMap the attributes will be added to this map */ - static void parseAttributeList(const QString &attributes, - QMap &attributeMap); + static void parseAttributeList(const TQString &attributes, + TQMap &attributeMap); /** * Decodes the value of an attribute (removes the escape codes). This @@ -78,24 +78,24 @@ class KServiceLocator : public QObject { * This function requires the presence of the SLP library, otherwise it * will return the original value. * @param value the attribute value to decode - * @return the decoded value. If @p value was QString::null or decoding - * failed, QString::null will be returned + * @return the decoded value. If @p value was TQString::null or decoding + * failed, TQString::null will be returned */ - static QString decodeAttributeValue(const QString &value); + static TQString decodeAttributeValue(const TQString &value); /** * Parses a comma-separated string of lists, as returned by many signals. * @param list the comma-separated list * @return the items as a QStringList */ - static QStringList parseCommaList(const QString &list); + static TQStringList parseCommaList(const TQString &list); /** * Creates a comma-separated string of lists, as required by many functions. * @param map the items of this list will be converted * @return the comma-separated list */ - static QString createCommaList(const QStringList &values); + static TQString createCommaList(const TQStringList &values); /** * Escapes a string for use as part of a filter, as described in @@ -107,7 +107,7 @@ class KServiceLocator : public QObject { * @param str the string to escape * @return the escaped string */ - static QString escapeFilter(const QString &str); + static TQString escapeFilter(const TQString &str); /** * Returns true if service location is generally possible. @@ -120,13 +120,13 @@ class KServiceLocator : public QObject { * Use this constant for findServiceTypes()'s namingAuthority argument * to get only services from the default (IANA) naming authority. */ - static const QString DEFAULT_AUTHORITY; + static const TQString DEFAULT_AUTHORITY; /** * Use this constant for findServiceTypes()'s namingAuthority argument * to get all services, */ - static const QString ALL_AUTHORITIES; + static const TQString ALL_AUTHORITIES; /** * Finds all service types in the given scope with the given naming @@ -146,12 +146,12 @@ class KServiceLocator : public QObject { * argument has been omitted all service types * will be returned. * @param scopelist a comma-separated list of all scopes that will - * be searched, or QString:null to search in all + * be searched, or TQString:null to search in all * scopes * @return true if the operation was successful */ - bool findServiceTypes(const QString &namingAuthority = QString::null, - const QString &scopelist = QString::null); + bool findServiceTypes(const TQString &namingAuthority = TQString::null, + const TQString &scopelist = TQString::null); /** * Finds all services in the given scope with the given service type. @@ -173,13 +173,13 @@ class KServiceLocator : public QObject { * @param filter a filter in LDAP Search Filter syntax, as described * in RFC 2254. * @param scopelist a comma-separated list of all scopes that will - * be searched, or QString:null to search in all + * be searched, or TQString:null to search in all * scopes * @return true if the operation was successful */ - bool findServices(const QString &srvtype, - const QString &filter = QString::null, - const QString &scopelist = QString::null); + bool findServices(const TQString &srvtype, + const TQString &filter = TQString::null, + const TQString &scopelist = TQString::null); /** * Finds the attributes of the service with the given URL. @@ -193,12 +193,12 @@ class KServiceLocator : public QObject { * * @param serviceURL the URL of the service to search * @param attributeIds a comma-separated list of attributes to - * retrieve, or QString::null to retrieve all + * retrieve, or TQString::null to retrieve all * attributes * @return true if the operation was successful */ - bool findAttributes(const QString &serviceUrl, - const QString &attributeIds = QString::null); + bool findAttributes(const TQString &serviceUrl, + const TQString &attributeIds = TQString::null); /** * Finds all scopes that can be searched. Always finds at least @@ -229,7 +229,7 @@ class KServiceLocator : public QObject { * types have been discovered. * @param serviceTypes a comma-separated list of service types */ - void foundServiceTypes(QString serviceTypes); + void foundServiceTypes(TQString serviceTypes); /** * Called by findServices() each time a service has been @@ -237,7 +237,7 @@ class KServiceLocator : public QObject { * @param serviceUrl the service url * @param lifetime the lifetime of the service in seconds */ - void foundService(QString serviceUrl, + void foundService(TQString serviceUrl, int lifetime); /** @@ -247,15 +247,15 @@ class KServiceLocator : public QObject { * @param attributes an attribute map (see parseAttributeList() and * decodeAttributeValue()) */ - void foundAttributes(QString serviceUrl, - QString attributes); + void foundAttributes(TQString serviceUrl, + TQString attributes); /** * Called by findScopes() when the scopes have been discovered. * @param scopeList a list of valid scopes, empty if an error * occurred */ - void foundScopes(QStringList scopeList); + void foundScopes(TQStringList scopeList); /** @@ -292,15 +292,15 @@ class KServiceLocator : public QObject { void lastAttributesSignal(bool success); protected: - virtual void customEvent(QCustomEvent *); + virtual void customEvent(TQCustomEvent *); private: - void emitFoundServiceTypes(QString serviceTypes); - void emitFoundService(QString serviceUrl, + void emitFoundServiceTypes(TQString serviceTypes); + void emitFoundService(TQString serviceUrl, int lifetime); - void emitFoundAttributes(QString serviceUrl, - QString attributes); - void emitFoundScopes(QStringList scopeList); + void emitFoundAttributes(TQString serviceUrl, + TQString attributes); + void emitFoundScopes(TQStringList scopeList); void emitLastServiceTypeSignal(bool success); void emitLastServiceSignal(bool success); void emitLastAttributesSignal(bool success); diff --git a/krdc/main.cpp b/krdc/main.cpp index 5c2423bd..034643b4 100644 --- a/krdc/main.cpp +++ b/krdc/main.cpp @@ -24,11 +24,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "../config.h" #include "main.h" @@ -97,16 +97,16 @@ int main(int argc, char *argv[]) KApplication a; - QString host = QString::null; + TQString host = TQString::null; Quality quality = QUALITY_UNKNOWN; - QString encodings = QString::null; - QString password = QString::null; - QString resolution = QString::null; - QString keymap = QString::null; + TQString encodings = TQString::null; + TQString password = TQString::null; + TQString resolution = TQString::null; + TQString keymap = TQString::null; WindowMode wm = WINDOW_MODE_AUTO; bool scale = false; bool localCursor = kapp->config()->readBoolEntry("alwaysShowLocalCursor", false); - QSize initialWindowSize; + TQSize initialWindowSize; KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); @@ -132,25 +132,25 @@ int main(int argc, char *argv[]) encodings = args->getOption("encodings"); if (args->isSet("password-file")) { - QString passwordFile = args->getOption("password-file"); - QFile f(passwordFile); + TQString passwordFile = args->getOption("password-file"); + TQFile f(passwordFile); if (!f.open(IO_ReadOnly)) { KMessageBox::error(0, i18n("The password file '%1' does not exist.").arg(passwordFile)); return 1; } - password = QTextStream(&f).readLine(); + password = TQTextStream(&f).readLine(); f.close(); } if (args->count() > 0) host = args->arg(0); - QString is = a.geometryArgument(); + TQString is = a.geometryArgument(); if (!is.isNull()) { - QRegExp re("([0-9]+)[xX]([0-9]+)"); + TQRegExp re("([0-9]+)[xX]([0-9]+)"); if (!re.exactMatch(is)) args->usage(i18n("Wrong geometry format, must be widthXheight")); - initialWindowSize = QSize(re.cap(1).toInt(), re.cap(2).toInt()); + initialWindowSize = TQSize(re.cap(1).toInt(), re.cap(2).toInt()); } MainController mc(&a, wm, host, quality, encodings, password, @@ -159,13 +159,13 @@ int main(int argc, char *argv[]) } MainController::MainController(KApplication *app, WindowMode wm, - const QString &host, + const TQString &host, Quality quality, - const QString &encodings, - const QString &password, + const TQString &encodings, + const TQString &password, bool scale, bool localCursor, - QSize initialWindowSize) : + TQSize initialWindowSize) : m_windowMode(wm), m_host(host), m_encodings(encodings), @@ -192,7 +192,7 @@ int MainController::main() { } void MainController::errorRestartRequested() { - QTimer::singleShot(0, this, SLOT(errorRestart())); + TQTimer::singleShot(0, this, TQT_SLOT(errorRestart())); } bool MainController::start() { @@ -201,10 +201,10 @@ bool MainController::start() { m_scale, m_localCursor, m_initialWindowSize); m_app->setMainWidget(m_krdc); - QObject::connect(m_krdc, SIGNAL(disconnected()), - m_app, SLOT(quit())); - connect(m_krdc, SIGNAL(disconnectedError()), - SLOT(errorRestartRequested())); + TQObject::connect(m_krdc, TQT_SIGNAL(disconnected()), + m_app, TQT_SLOT(quit())); + connect(m_krdc, TQT_SIGNAL(disconnectedError()), + TQT_SLOT(errorRestartRequested())); return m_krdc->start(); } @@ -212,7 +212,7 @@ bool MainController::start() { void MainController::errorRestart() { if (!m_host.isEmpty()) KRDC::setLastHost(m_host); - m_host = QString::null; // only auto-connect once + m_host = TQString::null; // only auto-connect once // unset KRDC as main widget, to avoid quit on delete m_app->setMainWidget(0); diff --git a/krdc/main.h b/krdc/main.h index d95f079e..6f6e68ba 100644 --- a/krdc/main.h +++ b/krdc/main.h @@ -18,36 +18,36 @@ #ifndef MAIN_H #define MAIN_H -#include +#include #include "krdc.h" #include "kremoteview.h" #include "smartptr.h" class KApplication; -class MainController : public QObject { +class MainController : public TQObject { Q_OBJECT private: SmartPtr m_krdc; WindowMode m_windowMode; - QString m_host, m_encodings, m_password, m_resolution; + TQString m_host, m_encodings, m_password, m_resolution; bool m_scale; bool m_localCursor; - QSize m_initialWindowSize; - QString m_keymap; + TQSize m_initialWindowSize; + TQString m_keymap; Quality m_quality; KApplication *m_app; public: MainController(KApplication *app, WindowMode wm, - const QString &host, + const TQString &host, Quality quality, - const QString &encodings, - const QString &password, + const TQString &encodings, + const TQString &password, bool scale, bool localCursor, - QSize initialWindowSize); + TQSize initialWindowSize); ~MainController(); int main(); bool start(); diff --git a/krdc/maindialog.cpp b/krdc/maindialog.cpp index c44bf235..c6d559a5 100644 --- a/krdc/maindialog.cpp +++ b/krdc/maindialog.cpp @@ -25,7 +25,7 @@ #include #include -MainDialog::MainDialog( QWidget *parent, const char *name ) +MainDialog::MainDialog( TQWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n( "Remote Desktop Connection" ), Ok|Close|Help|User1, Ok, true, KGuiItem( i18n( "&Preferences" ), "configure" ) ) @@ -36,16 +36,16 @@ MainDialog::MainDialog( QWidget *parent, const char *name ) setButtonText( Ok, i18n( "Connect" ) ); enableButtonOK( false ); - connect( m_dialogWidget, SIGNAL( hostValid( bool ) ), - SLOT( enableButtonOK( bool ) ) ); + connect( m_dialogWidget, TQT_SIGNAL( hostValid( bool ) ), + TQT_SLOT( enableButtonOK( bool ) ) ); } -void MainDialog::setRemoteHost( const QString &host ) +void MainDialog::setRemoteHost( const TQString &host ) { m_dialogWidget->setRemoteHost( host ); } -QString MainDialog::remoteHost() +TQString MainDialog::remoteHost() { return m_dialogWidget->remoteHost(); } diff --git a/krdc/maindialog.h b/krdc/maindialog.h index a9a0dd70..79a3c932 100644 --- a/krdc/maindialog.h +++ b/krdc/maindialog.h @@ -28,11 +28,11 @@ class MainDialog : public KDialogBase { Q_OBJECT public: - MainDialog( QWidget *parent, const char *name=0 ); + MainDialog( TQWidget *parent, const char *name=0 ); ~MainDialog() {} - void setRemoteHost( const QString & ); - QString remoteHost(); + void setRemoteHost( const TQString & ); + TQString remoteHost(); protected slots: virtual void slotOk(); diff --git a/krdc/maindialogwidget.cpp b/krdc/maindialogwidget.cpp index 076fc2f6..09b0de52 100644 --- a/krdc/maindialogwidget.cpp +++ b/krdc/maindialogwidget.cpp @@ -18,8 +18,8 @@ Boston, MA 02110-1301, USA. */ -#include -#include +#include +#include #include #include @@ -32,15 +32,15 @@ #include "hostpreferences.h" #include "maindialogwidget.h" -static const QString DEFAULT_SCOPE = "default"; +static const TQString DEFAULT_SCOPE = "default"; class UrlListViewItem : public KListViewItem { public: - UrlListViewItem( QListView *v, const QString &url, const QString &host, - const QString &protocol, const QString &type, const QString &userid, - const QString &fullname, const QString &desc, - const QString &serviceid ) + UrlListViewItem( TQListView *v, const TQString &url, const TQString &host, + const TQString &protocol, const TQString &type, const TQString &userid, + const TQString &fullname, const TQString &desc, + const TQString &serviceid ) : KListViewItem( v, host, i18n( "unknown" ), host, protocol ), m_url( url ), m_serviceid( serviceid ) { @@ -56,33 +56,33 @@ class UrlListViewItem : public KListViewItem if ( !desc.isNull() ) setText( 0, desc ); if ( ( !userid.isEmpty() ) && ( !fullname.isEmpty() ) ) - setText( 0, QString( "%1 (%2)" ).arg( fullname ).arg( userid ) ); + setText( 0, TQString( "%1 (%2)" ).arg( fullname ).arg( userid ) ); else if ( !userid.isNull() ) setText( 0, userid ); else if ( !fullname.isNull() ) setText( 0, fullname ); } - QString url() + TQString url() { return m_url; } - const QString& serviceid() const + const TQString& serviceid() const { return m_serviceid; } protected: - QString m_url; - QString m_serviceid; + TQString m_url; + TQString m_serviceid; }; -MainDialogWidget::MainDialogWidget( QWidget *parent, const char *name ) +MainDialogWidget::MainDialogWidget( TQWidget *parent, const char *name ) : MainDialogBase( parent, name ), m_scanning( false ) { HostPreferences *hp = HostPreferences::instance(); - QStringList list; + TQStringList list; list = hp->serverCompletions(); m_serverInput->completionObject()->setItems( list ); @@ -92,26 +92,26 @@ MainDialogWidget::MainDialogWidget( QWidget *parent, const char *name ) m_searchInput->setTrapReturnKey( true ); connect( m_browsingView, - SIGNAL( selectionChanged( QListViewItem * ) ), - SLOT( itemSelected( QListViewItem * ) ) ); + TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), + TQT_SLOT( itemSelected( TQListViewItem * ) ) ); connect( m_browsingView, - SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int ) ), - SLOT( itemDoubleClicked( QListViewItem * ) ) ); + TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int ) ), + TQT_SLOT( itemDoubleClicked( TQListViewItem * ) ) ); connect( m_scopeCombo, - SIGNAL( activated( const QString & ) ), - SLOT( scopeSelected( const QString & ) ) ); + TQT_SIGNAL( activated( const TQString & ) ), + TQT_SLOT( scopeSelected( const TQString & ) ) ); connect( m_serverInput, - SIGNAL( returnPressed( const QString & ) ), - SLOT( rescan() ) ); + TQT_SIGNAL( returnPressed( const TQString & ) ), + TQT_SLOT( rescan() ) ); bool showBrowse = hp->showBrowsingPanel(); enableBrowsingArea( showBrowse ); - m_locator_dnssd = new DNSSD::ServiceBrowser(QStringList::split(',',"_rfb._tcp,_rdp._tcp"),0,DNSSD::ServiceBrowser::AutoResolve); - connect(m_locator_dnssd,SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)), - SLOT(addedService(DNSSD::RemoteService::Ptr))); - connect(m_locator_dnssd,SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr)), - SLOT(removedService(DNSSD::RemoteService::Ptr))); + m_locator_dnssd = new DNSSD::ServiceBrowser(TQStringList::split(',',"_rfb._tcp,_rdp._tcp"),0,DNSSD::ServiceBrowser::AutoResolve); + connect(m_locator_dnssd,TQT_SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)), + TQT_SLOT(addedService(DNSSD::RemoteService::Ptr))); + connect(m_locator_dnssd,TQT_SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr)), + TQT_SLOT(removedService(DNSSD::RemoteService::Ptr))); m_locator_dnssd->startBrowse(); adjustSize(); @@ -125,7 +125,7 @@ MainDialogWidget::~MainDialogWidget() void MainDialogWidget::save() { HostPreferences *hp = HostPreferences::instance(); - QStringList list; + TQStringList list; m_serverInput->addToHistory( m_serverInput->currentText() ); list = m_serverInput->completionObject()->items(); @@ -136,21 +136,21 @@ void MainDialogWidget::save() hp->setShowBrowsingPanel( m_browsingPanel->isVisible() ); } -void MainDialogWidget::setRemoteHost( const QString &host ) +void MainDialogWidget::setRemoteHost( const TQString &host ) { m_serverInput->setEditText( host ); } -QString MainDialogWidget::remoteHost() +TQString MainDialogWidget::remoteHost() { return m_serverInput->currentText(); } -void MainDialogWidget::hostChanged( const QString &text ) +void MainDialogWidget::hostChanged( const TQString &text ) { - emit hostValid(text.contains(QRegExp(":[0-9]+$")) || - text.contains(QRegExp("^vnc:/.+")) || - text.contains(QRegExp("^rdp:/.+"))); + emit hostValid(text.contains(TQRegExp(":[0-9]+$")) || + text.contains(TQRegExp("^vnc:/.+")) || + text.contains(TQRegExp("^rdp:/.+"))); } void MainDialogWidget::toggleBrowsingArea() @@ -179,31 +179,31 @@ void MainDialogWidget::enableBrowsingArea( bool enable ) setMinimumSize(minimumSize().width(), (h > 0) ? h : 0); resize(width(), height()-hOffset); - QTimer::singleShot( 0, parentWidget(), SLOT( adjustSize() ) ); + TQTimer::singleShot( 0, parentWidget(), TQT_SLOT( adjustSize() ) ); } if (enable) rescan(); } -void MainDialogWidget::itemSelected( QListViewItem *item ) +void MainDialogWidget::itemSelected( TQListViewItem *item ) { UrlListViewItem *u = ( UrlListViewItem* ) item; - QRegExp rx( "^service:remotedesktop\\.kde:([^;]*)" ); + TQRegExp rx( "^service:remotedesktop\\.kde:([^;]*)" ); if ( rx.search( u->url() ) < 0 ) m_serverInput->setCurrentText( u->url()); else m_serverInput->setCurrentText( rx.cap( 1 ) ); } -void MainDialogWidget::itemDoubleClicked( QListViewItem *item ) +void MainDialogWidget::itemDoubleClicked( TQListViewItem *item ) { itemSelected( item ); emit accept(); } -void MainDialogWidget::scopeSelected( const QString &scope ) +void MainDialogWidget::scopeSelected( const TQString &scope ) { - QString s = scope; + TQString s = scope; if ( s == i18n( "default" ) ) s = DEFAULT_SCOPE; @@ -215,7 +215,7 @@ void MainDialogWidget::scopeSelected( const QString &scope ) void MainDialogWidget::rescan() { - QStringList scopeList; + TQStringList scopeList; if ( m_scanning ) return; @@ -227,9 +227,9 @@ void MainDialogWidget::rescan() m_browsingView->clear(); - QString filter; + TQString filter; if ( !m_searchInput->text().stripWhiteSpace().isEmpty() ) { - QString ef = KServiceLocator::escapeFilter( + TQString ef = KServiceLocator::escapeFilter( m_searchInput->text().stripWhiteSpace() ); filter = "(|(|(description=*"+ef+"*)(username=*"+ef+"*))(fullname=*"+ef+"*))"; } @@ -259,12 +259,12 @@ bool MainDialogWidget::ensureLocatorOpen() return false; } - connect( m_locator, SIGNAL( foundService( QString,int ) ), - SLOT( foundService( QString,int ) ) ); - connect( m_locator, SIGNAL( lastServiceSignal( bool ) ), - SLOT( lastSignalServices( bool ) ) ); - connect( m_locator, SIGNAL( foundScopes( QStringList ) ), - SLOT( foundScopes( QStringList ) ) ); + connect( m_locator, TQT_SIGNAL( foundService( TQString,int ) ), + TQT_SLOT( foundService( TQString,int ) ) ); + connect( m_locator, TQT_SIGNAL( lastServiceSignal( bool ) ), + TQT_SLOT( lastSignalServices( bool ) ) ); + connect( m_locator, TQT_SIGNAL( foundScopes( TQStringList ) ), + TQT_SLOT( foundScopes( TQStringList ) ) ); return true; } @@ -283,18 +283,18 @@ void MainDialogWidget::finishScanning() m_scanning = false; } -void MainDialogWidget::foundService( QString url, int ) +void MainDialogWidget::foundService( TQString url, int ) { - QRegExp rx( "^service:remotedesktop\\.kde:(\\w+)://([^;]+);(.*)$" ); + TQRegExp rx( "^service:remotedesktop\\.kde:(\\w+)://([^;]+);(.*)$" ); if ( rx.search( url ) < 0 ) { - rx = QRegExp( "^service:remotedesktop\\.kde:(\\w+)://(.*)$" ); + rx = TQRegExp( "^service:remotedesktop\\.kde:(\\w+)://(.*)$" ); if ( rx.search( url ) < 0 ) return; } - QMap map; + TQMap map; KServiceLocator::parseAttributeList( rx.cap( 3 ), map ); new UrlListViewItem( m_browsingView, url, rx.cap( 2 ), rx.cap( 1 ), @@ -307,9 +307,9 @@ void MainDialogWidget::foundService( QString url, int ) void MainDialogWidget::addedService( DNSSD::RemoteService::Ptr service ) { -QString type = service->type().mid(1,3); +TQString type = service->type().mid(1,3); if (type == "rfb") type = "vnc"; -QString url = type+"://"+service->hostName()+":"+QString::number(service->port()); +TQString url = type+"://"+service->hostName()+":"+TQString::number(service->port()); new UrlListViewItem( m_browsingView, url, service->serviceName(), type.upper(),service->textData()["type"], service->textData()["u"],service->textData()["fullname"], @@ -318,7 +318,7 @@ new UrlListViewItem( m_browsingView, url, service->serviceName(), void MainDialogWidget::removedService( DNSSD::RemoteService::Ptr service ) { - QListViewItemIterator it( m_browsingView ); + TQListViewItemIterator it( m_browsingView ); while ( it.current() ) { if ( ((UrlListViewItem*)it.current())->serviceid() == service->serviceName()+service->domain() ) delete it.current(); @@ -342,7 +342,7 @@ void MainDialogWidget::lastSignalServices( bool success ) } } -void MainDialogWidget::foundScopes( QStringList scopeList ) +void MainDialogWidget::foundScopes( TQStringList scopeList ) { int di = scopeList.findIndex( DEFAULT_SCOPE ); if ( di >= 0 ) diff --git a/krdc/maindialogwidget.h b/krdc/maindialogwidget.h index c1fe5348..4d7918b6 100644 --- a/krdc/maindialogwidget.h +++ b/krdc/maindialogwidget.h @@ -32,11 +32,11 @@ class MainDialogWidget : public MainDialogBase Q_OBJECT public: - MainDialogWidget( QWidget *parent, const char *name ); + MainDialogWidget( TQWidget *parent, const char *name ); ~MainDialogWidget(); - void setRemoteHost( const QString & ); - QString remoteHost(); + void setRemoteHost( const TQString & ); + TQString remoteHost(); void save(); protected: @@ -50,22 +50,22 @@ class MainDialogWidget : public MainDialogBase void accept(); protected slots: - void hostChanged( const QString & ); + void hostChanged( const TQString & ); void toggleBrowsingArea(); - void itemSelected( QListViewItem * ); - void itemDoubleClicked( QListViewItem * ); - void scopeSelected( const QString & ); + void itemSelected( TQListViewItem * ); + void itemDoubleClicked( TQListViewItem * ); + void scopeSelected( const TQString & ); void rescan(); - void foundService( QString url, int ); + void foundService( TQString url, int ); void lastSignalServices( bool success ); - void foundScopes( QStringList scopeList ); + void foundScopes( TQStringList scopeList ); void addedService( DNSSD::RemoteService::Ptr ); void removedService( DNSSD::RemoteService::Ptr ); protected: - QString m_scope; + TQString m_scope; bool m_scanning; SmartPtr m_locator; DNSSD::ServiceBrowser *m_locator_dnssd; diff --git a/krdc/preferencesdialog.cpp b/krdc/preferencesdialog.cpp index 4cdede44..b244c6ff 100644 --- a/krdc/preferencesdialog.cpp +++ b/krdc/preferencesdialog.cpp @@ -26,27 +26,27 @@ #include "rdp/krdpview.h" #include "vnc/kvncview.h" -#include -#include +#include +#include #include #include -PreferencesDialog::PreferencesDialog( QWidget *parent, const char *name ) +PreferencesDialog::PreferencesDialog( TQWidget *parent, const char *name ) : KDialogBase( Tabbed, i18n( "Preferences" ), Ok|Cancel, Ok, parent, name, true ) { - QVBox *page; - QWidget *spacer; + TQVBox *page; + TQWidget *spacer; page = addVBoxPage( i18n( "&Host Profiles" ) ); m_hostProfiles = new HostProfiles( page, "m_hostProfiles" ); - connect( m_hostProfiles, SIGNAL( hostDoubleClicked(HostPrefPtr) ), this, SLOT( slotHostDoubleClicked(HostPrefPtr) )); + connect( m_hostProfiles, TQT_SIGNAL( hostDoubleClicked(HostPrefPtr) ), this, TQT_SLOT( slotHostDoubleClicked(HostPrefPtr) )); page = addVBoxPage( i18n( "&VNC Defaults" ) ); m_vncPrefs = new VncPrefs( page, "m_vncPrefs" ); - spacer = new QWidget( page ); + spacer = new TQWidget( page ); page->setStretchFactor( spacer, 10 ); m_vncPrefs->cbShowPrefs->setText( i18n( "Do not &show the preferences " @@ -54,7 +54,7 @@ PreferencesDialog::PreferencesDialog( QWidget *parent, const char *name ) page = addVBoxPage( i18n( "RD&P Defaults" ) ); m_rdpPrefs = new RdpPrefs( page, "m_rdpPrefs" ); - spacer = new QWidget( page ); + spacer = new TQWidget( page ); page->setStretchFactor( spacer, 10 ); m_rdpPrefs->cbShowPrefs->setText( i18n( "Do not &show the preferences " diff --git a/krdc/preferencesdialog.h b/krdc/preferencesdialog.h index b379d0ec..46e79024 100644 --- a/krdc/preferencesdialog.h +++ b/krdc/preferencesdialog.h @@ -35,7 +35,7 @@ class PreferencesDialog : public KDialogBase Q_OBJECT public: - PreferencesDialog( QWidget *parent, const char *name=0 ); + PreferencesDialog( TQWidget *parent, const char *name=0 ); ~PreferencesDialog() {}; protected slots: diff --git a/krdc/rdp/krdpview.cpp b/krdc/rdp/krdpview.cpp index 3415ae14..2fdbdab8 100644 --- a/krdc/rdp/krdpview.cpp +++ b/krdc/rdp/krdpview.cpp @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include @@ -45,7 +45,7 @@ extern KWallet::Wallet *wallet; static KRdpView *krdpview; -RdpContainer::RdpContainer(QWidget *parent, const char *name, WFlags f) : +RdpContainer::RdpContainer(TQWidget *parent, const char *name, WFlags f) : QXEmbed(parent, name, f), m_viewOnly(false) { @@ -82,11 +82,11 @@ bool RdpContainer::x11Event(XEvent *e) // constructor -KRdpView::KRdpView(QWidget *parent, const char *name, - const QString &host, int port, - const QString &user, const QString &password, - int flags, const QString &domain, - const QString &shell, const QString &directory) : +KRdpView::KRdpView(TQWidget *parent, const char *name, + const TQString &host, int port, + const TQString &user, const TQString &password, + int flags, const TQString &domain, + const TQString &shell, const TQString &directory) : KRemoteView(parent, name, Qt::WResizeNoErase | Qt::WRepaintNoErase | Qt::WStaticContents), m_name(name), m_host(host), @@ -118,13 +118,13 @@ KRdpView::~KRdpView() } // returns the size of the framebuffer -QSize KRdpView::framebufferSize() +TQSize KRdpView::framebufferSize() { return m_container->sizeHint(); } // returns the suggested size -QSize KRdpView::sizeHint() +TQSize KRdpView::sizeHint() { return maximumSize(); } @@ -146,7 +146,7 @@ bool KRdpView::isQuitting() } // return the host we're connected to -QString KRdpView::host() +TQString KRdpView::host() { return m_host; } @@ -164,7 +164,7 @@ bool KRdpView::editPreferences( HostPrefPtr host ) int wv = hp->width(); int hv = hp->height(); int cd = hp->colorDepth(); - QString kl = hp->layout(); + TQString kl = hp->layout(); bool kwallet = hp->useKWallet(); // show preferences dialog @@ -172,9 +172,9 @@ bool KRdpView::editPreferences( HostPrefPtr host ) i18n( "RDP Host Preferences for %1" ).arg( host->host() ), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ); - QVBox *vbox = dlg->makeVBoxMainWidget(); + TQVBox *vbox = dlg->makeVBoxMainWidget(); RdpPrefs *prefs = new RdpPrefs( vbox ); - QWidget *spacer = new QWidget( vbox ); + TQWidget *spacer = new TQWidget( vbox ); vbox->setStretchFactor( spacer, 10 ); prefs->setRdpWidth( wv ); @@ -185,7 +185,7 @@ bool KRdpView::editPreferences( HostPrefPtr host ) prefs->setShowPrefs( true ); prefs->setUseKWallet(kwallet); - if ( dlg->exec() == QDialog::Rejected ) + if ( dlg->exec() == TQDialog::Rejected ) return false; wv = prefs->rdpWidth(); @@ -209,7 +209,7 @@ bool KRdpView::start() SmartPtr hp, rdpDefaults; bool useKWallet = false; - QWidget *desktop = QApplication::desktop(); + TQWidget *desktop = TQApplication::desktop(); if(!rdpAppDataConfigured) { @@ -233,21 +233,21 @@ bool KRdpView::start() // Check for fullscreen mode if ((hp->width() == 0) && (hp->height() == 0)) { launch_Fullscreen_rdp = true; - *m_process << "-g" << (QString::number(desktop->width()) + "x" + QString::number((desktop->height()-2))); + *m_process << "-g" << (TQString::number(desktop->width()) + "x" + TQString::number((desktop->height()-2))); } else { if ((hp->height() > (desktop->height()-2)) && (hp->height() <= (desktop->height()))) { - *m_process << "-g" << (QString::number(hp->width()) + "x" + QString::number(desktop->height()-2)); + *m_process << "-g" << (TQString::number(hp->width()) + "x" + TQString::number(desktop->height()-2)); } else { - *m_process << "-g" << (QString::number(hp->width()) + "x" + QString::number(hp->height())); + *m_process << "-g" << (TQString::number(hp->width()) + "x" + TQString::number(hp->height())); } } *m_process << "-k" << hp->layout(); if(!m_user.isEmpty()) { *m_process << "-u" << m_user; } if(m_password.isEmpty() && useKWallet ) { - QString krdc_folder = "KRDC-RDP"; + TQString krdc_folder = "KRDC-RDP"; // Bugfix: Check if wallet has been closed by an outside source if ( wallet && !wallet->isOpen() ) { @@ -256,7 +256,7 @@ bool KRdpView::start() // Do we need to open the wallet? if ( !wallet ) { - QString walletName = KWallet::Wallet::NetworkWallet(); + TQString walletName = KWallet::Wallet::NetworkWallet(); wallet = KWallet::Wallet::openWallet(walletName); } @@ -275,7 +275,7 @@ bool KRdpView::start() if ( m_password.isEmpty() ) { //There must not be an existing entry. Let's make one. - QCString newPassword; + TQCString newPassword; if (KPasswordDialog::getPassword(newPassword, i18n("Please enter the password.")) == KPasswordDialog::Accepted) { m_password = newPassword; wallet->writePassword(m_host, m_password); @@ -288,13 +288,13 @@ bool KRdpView::start() *m_process << "-p" << m_password; } - *m_process << "-X" << ("0x" + QString::number(m_container->winId(), 16)); - *m_process << "-a" << QString::number(hp->colorDepth()); - *m_process << (m_host + ":" + QString::number(m_port)); - connect(m_process, SIGNAL(processExited(KProcess *)), SLOT(processDied(KProcess *))); - connect(m_process, SIGNAL(receivedStderr(KProcess *, char *, int)), SLOT(receivedStderr(KProcess *, char *, int))); - connect(m_container, SIGNAL(embeddedWindowDestroyed()), SLOT(connectionClosed())); - connect(m_container, SIGNAL(newEmbeddedWindow(WId)), SLOT(connectionOpened(WId))); + *m_process << "-X" << ("0x" + TQString::number(m_container->winId(), 16)); + *m_process << "-a" << TQString::number(hp->colorDepth()); + *m_process << (m_host + ":" + TQString::number(m_port)); + connect(m_process, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(processDied(KProcess *))); + connect(m_process, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), TQT_SLOT(receivedStderr(KProcess *, char *, int))); + connect(m_container, TQT_SIGNAL(embeddedWindowDestroyed()), TQT_SLOT(connectionClosed())); + connect(m_container, TQT_SIGNAL(newEmbeddedWindow(WId)), TQT_SLOT(connectionOpened(WId))); qDebug("Color depth: %d", hp->colorDepth()); if(!m_process->start(KProcess::NotifyOnExit, KProcess::Stderr)) { @@ -340,7 +340,7 @@ void KRdpView::setViewOnly(bool s) void KRdpView::connectionOpened(WId /*window*/) { - QSize size = m_container->sizeHint(); + TQSize size = m_container->sizeHint(); setStatus(REMOTE_VIEW_CONNECTED); setFixedSize(size); @@ -373,8 +373,8 @@ void KRdpView::processDied(KProcess */*proc*/) void KRdpView::receivedStderr(KProcess */*proc*/, char *buffer, int /*buflen*/) { - QString output(buffer); - QString line; + TQString output(buffer); + TQString line; int i = 0; while(!(line = output.section('\n', i, i)).isEmpty()) { diff --git a/krdc/rdp/krdpview.h b/krdc/rdp/krdpview.h index 029336f2..b115bd18 100644 --- a/krdc/rdp/krdpview.h +++ b/krdc/rdp/krdpview.h @@ -38,7 +38,7 @@ class RdpContainer : public QXEmbed friend class KRdpView; public: - RdpContainer(QWidget *parent = 0, const char *name = 0, WFlags f = 0); + RdpContainer(TQWidget *parent = 0, const char *name = 0, WFlags f = 0); ~RdpContainer(); signals: @@ -58,23 +58,23 @@ class KRdpView : public KRemoteView public: // constructor and destructor - KRdpView(QWidget *parent = 0, const char *name = 0, - const QString &host = QString::null, int port = TCP_PORT_RDP, - const QString &user = QString::null, const QString &password = QString::null, - int flags = RDP_LOGON_NORMAL, const QString &domain = QString::null, - const QString &shell = QString::null, const QString &directory = QString::null); + KRdpView(TQWidget *parent = 0, const char *name = 0, + const TQString &host = TQString::null, int port = TCP_PORT_RDP, + const TQString &user = TQString::null, const TQString &password = TQString::null, + int flags = RDP_LOGON_NORMAL, const TQString &domain = TQString::null, + const TQString &shell = TQString::null, const TQString &directory = TQString::null); virtual ~KRdpView(); // functions regarding the window - virtual QSize framebufferSize(); // returns the size of the remote view - QSize sizeHint(); // returns the suggested size + virtual TQSize framebufferSize(); // returns the size of the remote view + TQSize sizeHint(); // returns the suggested size virtual bool viewOnly(); virtual bool startFullscreen(); // functions regarding the connection virtual void startQuitting(); // start closing the connection virtual bool isQuitting(); // are we currently closing the connection? - virtual QString host(); // return the host we're connected to + virtual TQString host(); // return the host we're connected to virtual int port(); // return the port number we're connected on virtual bool start(); // open a connection @@ -87,19 +87,19 @@ class KRdpView : public KRemoteView private: // properties used for setting up the connection - QString m_name; // name of the connection - QString m_host; // the host to connect to + TQString m_name; // name of the connection + TQString m_host; // the host to connect to int m_port; // the port on the host - QString m_user; // the user to use to log in - QString m_password; // the password to use + TQString m_user; // the user to use to log in + TQString m_password; // the password to use int m_flags; // flags which determine how the connection is set up - QString m_domain; // the domain where the host is on - QString m_shell; // the shell to use - QString m_directory; // the working directory on the server + TQString m_domain; // the domain where the host is on + TQString m_shell; // the shell to use + TQString m_directory; // the working directory on the server // other properties bool m_quitFlag; // if set: die - QString m_clientVersion; // version number returned by rdesktop + TQString m_clientVersion; // version number returned by rdesktop RdpContainer *m_container; // container for the rdesktop window KProcess *m_process; // rdesktop process diff --git a/krdc/rdp/rdphostpref.cpp b/krdc/rdp/rdphostpref.cpp index d3854eb5..ba876146 100644 --- a/krdc/rdp/rdphostpref.cpp +++ b/krdc/rdp/rdphostpref.cpp @@ -21,9 +21,9 @@ #include #include -const QString RdpHostPref::RdpType = "RDP"; +const TQString RdpHostPref::RdpType = "RDP"; -RdpHostPref::RdpHostPref(KConfig *conf, const QString &host, const QString &type) : +RdpHostPref::RdpHostPref(KConfig *conf, const TQString &host, const TQString &type) : HostPref(conf, host, type), m_width(0), m_height(0), @@ -43,7 +43,7 @@ void RdpHostPref::save() if ( !m_host.isEmpty() && !m_type.isEmpty() ) { m_config->setGroup("PerHostSettings"); - QString p = prefix(); + TQString p = prefix(); m_config->writeEntry(p+"exists", true); m_config->writeEntry(p+"width", m_width); m_config->writeEntry(p+"height", m_height); @@ -69,7 +69,7 @@ void RdpHostPref::load() if ( !m_host.isEmpty() && !m_type.isEmpty() ) { m_config->setGroup("PerHostSettings"); - QString p = prefix(); + TQString p = prefix(); m_width = m_config->readNumEntry(p+"width", 0); m_height = m_config->readNumEntry(p+"height", 0); m_colorDepth = m_config->readNumEntry(p+"colorDepth", 24); @@ -86,7 +86,7 @@ void RdpHostPref::load() void RdpHostPref::remove() { m_config->setGroup("PerHostSettings"); - QString p = prefix(); + TQString p = prefix(); m_config->deleteEntry(p+"exists"); m_config->deleteEntry(p+"width"); m_config->deleteEntry(p+"height"); @@ -107,7 +107,7 @@ void RdpHostPref::setDefaults() m_useKWallet = m_config->readBoolEntry("rdpUseKWallet", true); } -QString RdpHostPref::prefDescription() const +TQString RdpHostPref::prefDescription() const { return i18n("Show Preferences: %1, Resolution: %2x%3, Color Depth: %4, Keymap: %5, KWallet: %6") .arg(m_askOnConnect ? i18n("yes") : i18n("no")).arg(m_width).arg(m_height) @@ -148,13 +148,13 @@ int RdpHostPref::colorDepth() const } -void RdpHostPref::setLayout(const QString &l) +void RdpHostPref::setLayout(const TQString &l) { m_layout = l; save(); } -QString RdpHostPref::layout() const +TQString RdpHostPref::layout() const { return m_layout; } diff --git a/krdc/rdp/rdphostpref.h b/krdc/rdp/rdphostpref.h index bf96da02..6044f261 100644 --- a/krdc/rdp/rdphostpref.h +++ b/krdc/rdp/rdphostpref.h @@ -22,7 +22,7 @@ #include "hostpreferences.h" -static const QString rdpKeymaps[] = { "ar", +static const TQString rdpKeymaps[] = { "ar", "cs", "da", "de", @@ -58,7 +58,7 @@ static const QString rdpKeymaps[] = { "ar", static const int rdpNumKeymaps = 33; static const int rdpDefaultKeymap = 6; // en-us -inline int keymap2int(const QString &keymap) +inline int keymap2int(const TQString &keymap) { int layout; for(layout = 0; layout < rdpNumKeymaps; layout++) @@ -75,7 +75,7 @@ inline int keymap2int(const QString &keymap) return layout; } -inline QString int2keymap(int layout) +inline TQString int2keymap(int layout) { if(layout < 0 || layout >= rdpNumKeymaps) { @@ -93,7 +93,7 @@ class RdpHostPref : public HostPref int m_width; int m_height; int m_colorDepth; - QString m_layout; + TQString m_layout; bool m_askOnConnect; bool m_useKWallet; @@ -103,21 +103,21 @@ class RdpHostPref : public HostPref virtual void remove(); public: - static const QString RdpType; + static const TQString RdpType; - RdpHostPref(KConfig *conf, const QString &host=QString::null, - const QString &type=QString::null); + RdpHostPref(KConfig *conf, const TQString &host=TQString::null, + const TQString &type=TQString::null); virtual ~RdpHostPref(); - virtual QString prefDescription() const; + virtual TQString prefDescription() const; void setWidth(int w); int width() const; void setHeight(int h); int height() const; void setColorDepth(int depth); int colorDepth() const; - void setLayout(const QString &l); - QString layout() const; + void setLayout(const TQString &l); + TQString layout() const; void setAskOnConnect(bool ask); bool askOnConnect() const; bool useKWallet() const; diff --git a/krdc/smartptr.h b/krdc/smartptr.h index d80f258e..49fa25c2 100644 --- a/krdc/smartptr.h +++ b/krdc/smartptr.h @@ -16,7 +16,7 @@ #ifndef SMARTPTR_H #define SMARTPTR_H -#include +#include class WeakPtr; @@ -416,7 +416,7 @@ public: * Returns a string representation of the pointer. * @return a string representation */ - QString toString() const { + TQString toString() const { int objrcount = 1; int rcrcount = 0; @@ -424,7 +424,7 @@ public: objrcount = rc->refsToObject; rcrcount = rc->refsToThis; } - return QString("SmartPtr: ptr=%1, refcounts=%2, ptrnum=%3") + return TQString("SmartPtr: ptr=%1, refcounts=%2, ptrnum=%3") .arg((int)ptr).arg(objrcount).arg(rcrcount); } diff --git a/krdc/vnc/kvncview.cpp b/krdc/vnc/kvncview.cpp index f734845b..8050a68b 100644 --- a/krdc/vnc/kvncview.cpp +++ b/krdc/vnc/kvncview.cpp @@ -28,13 +28,13 @@ #include #include -#include +#include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "vncviewer.h" @@ -57,21 +57,21 @@ static KVncView *kvncview; //Passwords and KWallet data extern KWallet::Wallet *wallet; bool useKWallet = false; -static QCString password; -static QMutex passwordLock; -static QWaitCondition passwordWaiter; +static TQCString password; +static TQMutex passwordLock; +static TQWaitCondition passwordWaiter; const unsigned int MAX_SELECTION_LENGTH = 4096; -KVncView::KVncView(QWidget *parent, +KVncView::KVncView(TQWidget *parent, const char *name, - const QString &_host, + const TQString &_host, int _port, - const QString &_password, + const TQString &_password, Quality quality, DotCursorState dotCursorState, - const QString &encodings) : + const TQString &encodings) : KRemoteView(parent, name, Qt::WResizeNoErase | Qt::WRepaintNoErase | Qt::WStaticContents), m_cthread(this, m_wthread, m_quitFlag), m_wthread(this, m_quitFlag), @@ -90,18 +90,18 @@ KVncView::KVncView(QWidget *parent, password = _password.latin1(); dpy = qt_xdisplay(); setFixedSize(16,16); - setFocusPolicy(QWidget::StrongFocus); + setFocusPolicy(TQWidget::StrongFocus); - m_cb = QApplication::clipboard(); - connect(m_cb, SIGNAL(selectionChanged()), this, SLOT(selectionChanged())); - connect(m_cb, SIGNAL(dataChanged()), this, SLOT(clipboardChanged())); + m_cb = TQApplication::clipboard(); + connect(m_cb, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged())); + connect(m_cb, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clipboardChanged())); KStandardDirs *dirs = KGlobal::dirs(); - QBitmap cursorBitmap(dirs->findResource("appdata", + TQBitmap cursorBitmap(dirs->findResource("appdata", "pics/pointcursor.png")); - QBitmap cursorMask(dirs->findResource("appdata", + TQBitmap cursorMask(dirs->findResource("appdata", "pics/pointcursormask.png")); - m_cursor = QCursor(cursorBitmap, cursorMask); + m_cursor = TQCursor(cursorBitmap, cursorMask); if ((quality != QUALITY_UNKNOWN) || !encodings.isNull()) @@ -126,18 +126,18 @@ void KVncView::showDotCursorInternal() { setCursor(m_cursor); break; case DOT_CURSOR_OFF: - setCursor(QCursor(Qt::BlankCursor)); + setCursor(TQCursor(Qt::BlankCursor)); break; case DOT_CURSOR_AUTO: if (m_enableClientCursor) - setCursor(QCursor(Qt::BlankCursor)); + setCursor(TQCursor(Qt::BlankCursor)); else setCursor(m_cursor); break; } } -QString KVncView::host() { +TQString KVncView::host() { return m_host; } @@ -155,7 +155,7 @@ bool KVncView::isQuitting() { return m_quitFlag; } -void KVncView::configureApp(Quality q, const QString specialEncodings) { +void KVncView::configureApp(Quality q, const TQString specialEncodings) { appDataConfigured = true; appData.shareDesktop = 1; appData.viewOnly = 0; @@ -203,17 +203,17 @@ bool KVncView::checkLocalKRfb() { DCOPClient *d = KApplication::dcopClient(); int portNum; - QByteArray sdata, rdata; - QCString replyType; - QDataStream arg(sdata, IO_WriteOnly); - arg << QString("krfb"); - if (!d->call ("kded", "kinetd", "port(QString)", sdata, replyType, rdata)) + TQByteArray sdata, rdata; + TQCString replyType; + TQDataStream arg(sdata, IO_WriteOnly); + arg << TQString("krfb"); + if (!d->call ("kded", "kinetd", "port(TQString)", sdata, replyType, rdata)) return true; if (replyType != "int") return true; - QDataStream answer(rdata, IO_ReadOnly); + TQDataStream answer(rdata, IO_ReadOnly); answer >> portNum; if (m_port != portNum) @@ -239,16 +239,16 @@ bool KVncView::editPreferences( HostPrefPtr host ) i18n( "VNC Host Preferences for %1" ).arg( host->host() ), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ); - QVBox *vbox = dlg->makeVBoxMainWidget(); + TQVBox *vbox = dlg->makeVBoxMainWidget(); VncPrefs *prefs = new VncPrefs( vbox ); - QWidget *spacer = new QWidget( vbox ); + TQWidget *spacer = new TQWidget( vbox ); vbox->setStretchFactor( spacer, 10 ); prefs->setQuality( ci ); prefs->setShowPrefs(true); prefs->setUseKWallet(kwallet); - if ( dlg->exec() == QDialog::Rejected ) + if ( dlg->exec() == TQDialog::Rejected ) return false; ci = prefs->quality(); @@ -331,7 +331,7 @@ bool KVncView::startFullscreen() return launch_Fullscreen_vnc; } -QSize KVncView::framebufferSize() { +TQSize KVncView::framebufferSize() { return m_framebufferSize; } @@ -358,7 +358,7 @@ void KVncView::enableScaling(bool s) { } } -void KVncView::paintEvent(QPaintEvent *e) { +void KVncView::paintEvent(TQPaintEvent *e) { drawRegion(e->rect().x(), e->rect().y(), e->rect().width(), @@ -373,7 +373,7 @@ void KVncView::drawRegion(int x, int y, int w, int h) { DrawScreenRegionX11Thread(winId(), x, y, w, h); } -void KVncView::customEvent(QCustomEvent *e) +void KVncView::customEvent(TQCustomEvent *e) { if (e->type() == ScreenRepaintEventType) { ScreenRepaintEvent *sre = (ScreenRepaintEvent*) e; @@ -381,7 +381,7 @@ void KVncView::customEvent(QCustomEvent *e) } else if (e->type() == ScreenResizeEventType) { ScreenResizeEvent *sre = (ScreenResizeEvent*) e; - m_framebufferSize = QSize(sre->width(), sre->height()); + m_framebufferSize = TQSize(sre->width(), sre->height()); setFixedSize(m_framebufferSize); emit changeSize(sre->width(), sre->height()); } @@ -412,7 +412,7 @@ void KVncView::customEvent(QCustomEvent *e) emit showingPasswordDialog(true); if (KPasswordDialog::getPassword(password, i18n("Access to the system requires a password.")) != KPasswordDialog::Accepted) - password = QCString(); + password = TQCString(); emit showingPasswordDialog(false); @@ -421,7 +421,7 @@ void KVncView::customEvent(QCustomEvent *e) passwordLock.unlock(); } else if (e->type() == WalletOpenEventType) { - QString krdc_folder = "KRDC-VNC"; + TQString krdc_folder = "KRDC-VNC"; emit showingPasswordDialog(true); //Bad things happen if you don't do this. // Bugfix: Check if wallet has been closed by an outside source @@ -431,7 +431,7 @@ void KVncView::customEvent(QCustomEvent *e) // Do we need to open the wallet? if ( !wallet ) { - QString walletName = KWallet::Wallet::NetworkWallet(); + TQString walletName = KWallet::Wallet::NetworkWallet(); wallet = KWallet::Wallet::openWallet(walletName); } @@ -443,7 +443,7 @@ void KVncView::customEvent(QCustomEvent *e) if (walletOK == true) { wallet->setFolder(krdc_folder); - QString newPass; + TQString newPass; if ( wallet->hasEntry(kvncview->host()) && !wallet->readPassword(kvncview->host(), newPass) ) { password=newPass.latin1(); } @@ -508,11 +508,11 @@ void KVncView::customEvent(QCustomEvent *e) emit disconnectedError(); } else if (e->type() == BeepEventType) { - QApplication::beep(); + TQApplication::beep(); } else if (e->type() == ServerCutEventType) { ServerCutEvent *sce = (ServerCutEvent*) e; - QString ctext = QString::fromUtf8(sce->bytes(), sce->length()); + TQString ctext = TQString::fromUtf8(sce->bytes(), sce->length()); m_dontSendCb = true; m_cb->setText(ctext, QClipboard::Clipboard); m_cb->setText(ctext, QClipboard::Selection); @@ -527,15 +527,15 @@ void KVncView::customEvent(QCustomEvent *e) } } -void KVncView::mouseEvent(QMouseEvent *e) { +void KVncView::mouseEvent(TQMouseEvent *e) { if (m_status != REMOTE_VIEW_CONNECTED) return; if (m_viewOnly) return; - if ( e->type() != QEvent::MouseMove ) { - if ( (e->type() == QEvent::MouseButtonPress) || - (e->type() == QEvent::MouseButtonDblClick)) { + if ( e->type() != TQEvent::MouseMove ) { + if ( (e->type() == TQEvent::MouseButtonPress) || + (e->type() == TQEvent::MouseButtonDblClick)) { if ( e->button() & LeftButton ) m_buttonMask |= 0x01; if ( e->button() & MidButton ) @@ -543,7 +543,7 @@ void KVncView::mouseEvent(QMouseEvent *e) { if ( e->button() & RightButton ) m_buttonMask |= 0x04; } - else if ( e->type() == QEvent::MouseButtonRelease ) { + else if ( e->type() == TQEvent::MouseButtonRelease ) { if ( e->button() & LeftButton ) m_buttonMask &= 0xfe; if ( e->button() & MidButton ) @@ -566,27 +566,27 @@ void KVncView::mouseEvent(QMouseEvent *e) { DrawCursorX11Thread(x, y); // in rfbproto.c } -void KVncView::mousePressEvent(QMouseEvent *e) { +void KVncView::mousePressEvent(TQMouseEvent *e) { mouseEvent(e); e->accept(); } -void KVncView::mouseDoubleClickEvent(QMouseEvent *e) { +void KVncView::mouseDoubleClickEvent(TQMouseEvent *e) { mouseEvent(e); e->accept(); } -void KVncView::mouseReleaseEvent(QMouseEvent *e) { +void KVncView::mouseReleaseEvent(TQMouseEvent *e) { mouseEvent(e); e->accept(); } -void KVncView::mouseMoveEvent(QMouseEvent *e) { +void KVncView::mouseMoveEvent(TQMouseEvent *e) { mouseEvent(e); e->ignore(); } -void KVncView::wheelEvent(QWheelEvent *e) { +void KVncView::wheelEvent(TQWheelEvent *e) { if (m_status != REMOTE_VIEW_CONNECTED) return; if (m_viewOnly) @@ -643,7 +643,7 @@ bool KVncView::x11Event(XEvent *e) { else if (e->type == KeyRelease) pressed = false; else - return QWidget::x11Event(e); + return TQWidget::x11Event(e); if (!m_viewOnly) { unsigned int s = KKeyNative(e).sym(); @@ -670,8 +670,8 @@ bool KVncView::x11Event(XEvent *e) { } void KVncView::unpressModifiers() { - QValueList keys = m_mods.keys(); - QValueList::const_iterator it = keys.begin(); + TQValueList keys = m_mods.keys(); + TQValueList::const_iterator it = keys.begin(); while (it != keys.end()) { m_wthread.queueKeyEvent(*it, false); it++; @@ -679,11 +679,11 @@ void KVncView::unpressModifiers() { m_mods.clear(); } -void KVncView::focusOutEvent(QFocusEvent *) { +void KVncView::focusOutEvent(TQFocusEvent *) { unpressModifiers(); } -QSize KVncView::sizeHint() { +TQSize KVncView::sizeHint() { return maximumSize(); } @@ -702,7 +702,7 @@ void KVncView::clipboardChanged() { if (m_cb->ownsClipboard() || m_dontSendCb) return; - QString text = m_cb->text(QClipboard::Clipboard); + TQString text = m_cb->text(QClipboard::Clipboard); if (text.length() > MAX_SELECTION_LENGTH) return; @@ -716,7 +716,7 @@ void KVncView::selectionChanged() { if (m_cb->ownsSelection() || m_dontSendCb) return; - QString text = m_cb->text(QClipboard::Selection); + TQString text = m_cb->text(QClipboard::Selection); if (text.length() > MAX_SELECTION_LENGTH) return; @@ -765,14 +765,14 @@ int getPassword(char *passwd, int pwlen) { //Try #2: Is there something in the wallet? if ( !retV && useKWallet ) { - QApplication::postEvent(kvncview, new WalletOpenEvent()); + TQApplication::postEvent(kvncview, new WalletOpenEvent()); passwordWaiter.wait(&passwordLock); //block if (!password.isNull()) retV = 1; //got it! } //Last try: Ask the user if (!retV) { - QApplication::postEvent(kvncview, new PasswordRequiredEvent()); + TQApplication::postEvent(kvncview, new PasswordRequiredEvent()); passwordWaiter.wait(&passwordLock); //block if (!password.isNull()) retV = 1; //got it! } @@ -800,7 +800,7 @@ extern void DrawScreenRegion(int x, int y, int width, int height) { kvncview->drawRegion(x, y, width, height); KApplication::kApplication()->unlock(); */ - QApplication::postEvent(kvncview, new ScreenRepaintEvent(x, y, width, height)); + TQApplication::postEvent(kvncview, new ScreenRepaintEvent(x, y, width, height)); } // call only from x11 thread! @@ -821,15 +821,15 @@ extern void UnlockFramebuffer() { } extern void beep() { - QApplication::postEvent(kvncview, new BeepEvent()); + TQApplication::postEvent(kvncview, new BeepEvent()); } extern void newServerCut(char *bytes, int length) { - QApplication::postEvent(kvncview, new ServerCutEvent(bytes, length)); + TQApplication::postEvent(kvncview, new ServerCutEvent(bytes, length)); } extern void postMouseEvent(int x, int y, int buttonMask) { - QApplication::postEvent(kvncview, new MouseStateEvent(x, y, buttonMask)); + TQApplication::postEvent(kvncview, new MouseStateEvent(x, y, buttonMask)); } #include "kvncview.moc" diff --git a/krdc/vnc/kvncview.h b/krdc/vnc/kvncview.h index c0f9fba3..a9de2378 100644 --- a/krdc/vnc/kvncview.h +++ b/krdc/vnc/kvncview.h @@ -19,8 +19,8 @@ #define KVNCVIEW_H #include "kremoteview.h" -#include -#include +#include +#include #include "pointerlatencyometer.h" #include "hostpreferences.h" @@ -36,54 +36,54 @@ private: ControllerThread m_cthread; WriterThread m_wthread; volatile bool m_quitFlag; // if set: all threads should die ASAP - QMutex m_framebufferLock; + TQMutex m_framebufferLock; bool m_enableFramebufferLocking; bool m_enableClientCursor; - QSize m_framebufferSize; + TQSize m_framebufferSize; bool m_scaling; bool m_remoteMouseTracking; bool m_viewOnly; int m_buttonMask; - QMap m_mods; + TQMap m_mods; - QString m_host; + TQString m_host; int m_port; QClipboard *m_cb; bool m_dontSendCb; - QCursor m_cursor; + TQCursor m_cursor; DotCursorState m_cursorState; PointerLatencyOMeter m_plom; - void mouseEvent(QMouseEvent*); - unsigned long toKeySym(QKeyEvent *k); + void mouseEvent(TQMouseEvent*); + unsigned long toKeySym(TQKeyEvent *k); bool checkLocalKRfb(); - void paintMessage(const QString &msg); + void paintMessage(const TQString &msg); void showDotCursorInternal(); void unpressModifiers(); protected: - void paintEvent(QPaintEvent*); - void customEvent(QCustomEvent*); - void mousePressEvent(QMouseEvent*); - void mouseDoubleClickEvent(QMouseEvent*); - void mouseReleaseEvent(QMouseEvent*); - void mouseMoveEvent(QMouseEvent*); - void wheelEvent(QWheelEvent *); - void focusOutEvent(QFocusEvent *); + void paintEvent(TQPaintEvent*); + void customEvent(TQCustomEvent*); + void mousePressEvent(TQMouseEvent*); + void mouseDoubleClickEvent(TQMouseEvent*); + void mouseReleaseEvent(TQMouseEvent*); + void mouseMoveEvent(TQMouseEvent*); + void wheelEvent(TQWheelEvent *); + void focusOutEvent(TQFocusEvent *); bool x11Event(XEvent*); public: - KVncView(QWidget* parent=0, const char *name=0, - const QString &host = QString(""), int port = 5900, - const QString &password = QString::null, + KVncView(TQWidget* parent=0, const char *name=0, + const TQString &host = TQString(""), int port = 5900, + const TQString &password = TQString::null, Quality quality = QUALITY_UNKNOWN, DotCursorState dotCursorState = DOT_CURSOR_AUTO, - const QString &encodings = QString::null); + const TQString &encodings = TQString::null); ~KVncView(); - QSize sizeHint(); + TQSize sizeHint(); void drawRegion(int x, int y, int w, int h); void lockFramebuffer(); void unlockFramebuffer(); @@ -91,15 +91,15 @@ public: virtual bool scaling() const; virtual bool supportsScaling() const; virtual bool supportsLocalCursor() const; - virtual QSize framebufferSize(); + virtual TQSize framebufferSize(); void setRemoteMouseTracking(bool s); bool remoteMouseTracking(); - void configureApp(Quality q, const QString specialEncodings = QString::null); + void configureApp(Quality q, const TQString specialEncodings = TQString::null); void showDotCursor(DotCursorState state); DotCursorState dotCursorState() const; virtual void startQuitting(); virtual bool isQuitting(); - virtual QString host(); + virtual TQString host(); virtual int port(); virtual bool start(); diff --git a/krdc/vnc/pointerlatencyometer.h b/krdc/vnc/pointerlatencyometer.h index 559536b2..c380431a 100644 --- a/krdc/vnc/pointerlatencyometer.h +++ b/krdc/vnc/pointerlatencyometer.h @@ -15,12 +15,12 @@ * * ***************************************************************************/ -#include +#include #include struct PointerState { int x, y; - QTime timestamp; + TQTime timestamp; }; class PointerLatencyOMeter { diff --git a/krdc/vnc/threads.cpp b/krdc/vnc/threads.cpp index fe5a1d62..ec033388 100644 --- a/krdc/vnc/threads.cpp +++ b/krdc/vnc/threads.cpp @@ -23,7 +23,7 @@ #include "vncviewer.h" #include "threads.h" -#include +#include // Maximum idle time for writer thread in ms. When it timeouts, it will request // another incremental update. Must be smaller than the timeout of the server @@ -49,12 +49,12 @@ ControllerThread::ControllerThread(KVncView *v, WriterThread &wt, volatile bool void ControllerThread::changeStatus(RemoteViewStatus s) { m_status = s; - QApplication::postEvent(m_view, new StatusChangeEvent(s)); + TQApplication::postEvent(m_view, new StatusChangeEvent(s)); } void ControllerThread::sendFatalError(ErrorCode s) { m_quitFlag = true; - QApplication::postEvent(m_view, new FatalErrorEvent(s)); + TQApplication::postEvent(m_view, new FatalErrorEvent(s)); m_wthread.kick(); } @@ -109,13 +109,13 @@ void ControllerThread::run() { return; } - QApplication::postEvent(m_view, + TQApplication::postEvent(m_view, new ScreenResizeEvent(si.framebufferWidth, si.framebufferHeight)); - m_wthread.queueUpdateRequest(QRegion(QRect(0,0,si.framebufferWidth, + m_wthread.queueUpdateRequest(TQRegion(TQRect(0,0,si.framebufferWidth, si.framebufferHeight))); - QApplication::postEvent(m_view, new DesktopInitEvent()); + TQApplication::postEvent(m_view, new DesktopInitEvent()); while ((!m_quitFlag) && (!m_desktopInitialized)) m_waiter.wait(1000); @@ -173,7 +173,7 @@ WriterThread::WriterThread(KVncView *v, volatile bool &quitFlag) : m_incrementalUpdateAnnounced(false), m_mouseEventNum(0), m_keyEventNum(0), - m_clientCut(QString::null) + m_clientCut(TQString::null) { writerThread = this; m_lastIncrUpdate.start(); @@ -184,8 +184,8 @@ bool WriterThread::sendIncrementalUpdateRequest() { return SendIncrementalFramebufferUpdateRequest(); } -bool WriterThread::sendUpdateRequest(const QRegion ®ion) { - QMemArray r = region.rects(); +bool WriterThread::sendUpdateRequest(const TQRegion ®ion) { + TQMemArray r = region.rects(); for (unsigned int i = 0; i < r.size(); i++) if (!SendFramebufferUpdateRequest(r[i].x(), r[i].y(), @@ -195,8 +195,8 @@ bool WriterThread::sendUpdateRequest(const QRegion ®ion) { return true; } -bool WriterThread::sendInputEvents(const QValueList &events) { - QValueList::const_iterator it = events.begin(); +bool WriterThread::sendInputEvents(const TQValueList &events) { + TQValueList::const_iterator it = events.begin(); while (it != events.end()) { if ((*it).type == KeyEventType) { if (!SendKeyEvent((*it).e.k.k, (*it).e.k.down ? True : False)) @@ -224,7 +224,7 @@ void WriterThread::announceIncrementalUpdateRequest() { } -void WriterThread::queueUpdateRequest(const QRegion &r) { +void WriterThread::queueUpdateRequest(const TQRegion &r) { m_lock.lock(); m_updateRegionRQ += r; m_waiter.wakeAll(); @@ -283,7 +283,7 @@ void WriterThread::queueKeyEvent(unsigned int k, bool down) { m_lock.unlock(); } -void WriterThread::queueClientCut(const QString &text) { +void WriterThread::queueClientCut(const TQString &text) { m_lock.lock(); m_clientCut = text; @@ -299,9 +299,9 @@ void WriterThread::kick() { void WriterThread::run() { bool incrementalUpdateRQ = false; bool incrementalUpdateAnnounced = false; - QRegion updateRegionRQ; - QValueList inputEvents; - QString clientCut; + TQRegion updateRegionRQ; + TQValueList inputEvents; + TQString clientCut; while (!m_quitFlag) { m_lock.lock(); @@ -324,11 +324,11 @@ void WriterThread::run() { else { m_incrementalUpdateRQ = false; m_incrementalUpdateAnnounced = false; - m_updateRegionRQ = QRegion(); + m_updateRegionRQ = TQRegion(); m_inputEvents.clear(); m_keyEventNum = 0; m_mouseEventNum = 0; - m_clientCut = QString::null; + m_clientCut = TQString::null; m_lock.unlock(); // always send incremental update, unless @@ -373,7 +373,7 @@ void WriterThread::run() { break; } if (!clientCut.isNull()) { - QCString cutTextUtf8(clientCut.utf8()); + TQCString cutTextUtf8(clientCut.utf8()); if (!SendClientCutText(cutTextUtf8.data(), (int)cutTextUtf8.length())) { sendFatalError(ERROR_IO); @@ -387,6 +387,6 @@ void WriterThread::run() { void WriterThread::sendFatalError(ErrorCode s) { m_quitFlag = true; - QApplication::postEvent(m_view, new FatalErrorEvent(s)); + TQApplication::postEvent(m_view, new FatalErrorEvent(s)); } diff --git a/krdc/vnc/threads.h b/krdc/vnc/threads.h index 5f38b71f..08ca4c20 100644 --- a/krdc/vnc/threads.h +++ b/krdc/vnc/threads.h @@ -18,14 +18,14 @@ #ifndef THREADS_H #define THREADS_H -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -58,24 +58,24 @@ struct InputEvent { }; -class WriterThread : public QThread { +class WriterThread : public TQThread { private: - QMutex m_lock; - QWaitCondition m_waiter; + TQMutex m_lock; + TQWaitCondition m_waiter; volatile bool &m_quitFlag; KVncView *m_view; - QTime m_lastIncrUpdate; // start()ed when a incr update is sent + TQTime m_lastIncrUpdate; // start()ed when a incr update is sent bool m_lastIncrUpdatePostponed; // all things that can be send follow: bool m_incrementalUpdateRQ; // for sending an incremental request bool m_incrementalUpdateAnnounced; // set when a RQ will come soon - QRegion m_updateRegionRQ; // for sending updates, null if it is done - QValueList m_inputEvents; // list of unsent input events + TQRegion m_updateRegionRQ; // for sending updates, null if it is done + TQValueList m_inputEvents; // list of unsent input events MouseEvent m_lastMouseEvent; int m_mouseEventNum, m_keyEventNum; - QString m_clientCut; + TQString m_clientCut; void sendFatalError(ErrorCode s); @@ -84,29 +84,29 @@ public: void queueIncrementalUpdateRequest(); void announceIncrementalUpdateRequest(); - void queueUpdateRequest(const QRegion &r); + void queueUpdateRequest(const TQRegion &r); void queueMouseEvent(int x, int y, int buttonMask); void queueKeyEvent(unsigned int k, bool down); - void queueClientCut(const QString &text); + void queueClientCut(const TQString &text); void kick(); protected: void run(); bool sendIncrementalUpdateRequest(); - bool sendUpdateRequest(const QRegion &r); - bool sendInputEvents(const QValueList &events); + bool sendUpdateRequest(const TQRegion &r); + bool sendInputEvents(const TQValueList &events); }; -class ControllerThread : public QThread { +class ControllerThread : public TQThread { private: KVncView *m_view; enum RemoteViewStatus m_status; WriterThread &m_wthread; volatile bool &m_quitFlag; volatile bool m_desktopInitialized; - QWaitCondition m_waiter; + TQWaitCondition m_waiter; void changeStatus(RemoteViewStatus s); void sendFatalError(ErrorCode s); diff --git a/krdc/vnc/vnchostpref.cpp b/krdc/vnc/vnchostpref.cpp index a17f8ea1..7fea2889 100644 --- a/krdc/vnc/vnchostpref.cpp +++ b/krdc/vnc/vnchostpref.cpp @@ -19,9 +19,9 @@ #include #include -const QString VncHostPref::VncType = "VNC"; +const TQString VncHostPref::VncType = "VNC"; -VncHostPref::VncHostPref(KConfig *conf, const QString &host, const QString &type) : +VncHostPref::VncHostPref(KConfig *conf, const TQString &host, const TQString &type) : HostPref(conf, host, type), m_quality(0), m_useKWallet(true), @@ -35,7 +35,7 @@ void VncHostPref::save() { if ( !m_host.isEmpty() && !m_type.isEmpty() ) { m_config->setGroup("PerHostSettings"); - QString p = prefix(); + TQString p = prefix(); m_config->writeEntry(p+"exists", true); m_config->writeEntry(p+"quality", m_quality); m_config->writeEntry(p+"askOnConnect", m_askOnConnect); @@ -54,7 +54,7 @@ void VncHostPref::load() { if ( !m_host.isEmpty() && !m_type.isEmpty() ) { m_config->setGroup("PerHostSettings"); - QString p = prefix(); + TQString p = prefix(); m_quality = m_config->readNumEntry(p+"quality", 0); m_askOnConnect = m_config->readBoolEntry(p+"askOnConnect", true); m_useKWallet = m_config->readBoolEntry(p+"useKWallet", true); @@ -67,7 +67,7 @@ void VncHostPref::load() { void VncHostPref::remove() { m_config->setGroup("PerHostSettings"); - QString p = prefix(); + TQString p = prefix(); m_config->deleteEntry(p+"exists"); m_config->deleteEntry(p+"quality"); m_config->deleteEntry(p+"askOnConnect"); @@ -80,8 +80,8 @@ void VncHostPref::setDefaults() { m_useKWallet = m_config->readBoolEntry("vncUseKWallet", true); } -QString VncHostPref::prefDescription() const { - QString q; +TQString VncHostPref::prefDescription() const { + TQString q; switch(m_quality) { case 0: q = i18n("High"); diff --git a/krdc/vnc/vnchostpref.h b/krdc/vnc/vnchostpref.h index 33a20600..cfd91053 100644 --- a/krdc/vnc/vnchostpref.h +++ b/krdc/vnc/vnchostpref.h @@ -34,13 +34,13 @@ protected: virtual void remove(); public: - static const QString VncType; + static const TQString VncType; - VncHostPref(KConfig *conf, const QString &host=QString::null, - const QString &type=QString::null); + VncHostPref(KConfig *conf, const TQString &host=TQString::null, + const TQString &type=TQString::null); virtual ~VncHostPref(); - virtual QString prefDescription() const; + virtual TQString prefDescription() const; void setQuality(int q); int quality() const; void setAskOnConnect(bool ask); diff --git a/krfb/kcm_krfb/kcm_krfb.cpp b/krfb/kcm_krfb/kcm_krfb.cpp index 5647d557..50595505 100644 --- a/krfb/kcm_krfb/kcm_krfb.cpp +++ b/krfb/kcm_krfb/kcm_krfb.cpp @@ -19,14 +19,14 @@ #include "kcm_krfb.h" #include "kcm_krfb.moc" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -42,7 +42,7 @@ #define VERSION "0.7" -typedef KGenericFactory KcmKRfbFactory; +typedef KGenericFactory KcmKRfbFactory; // Can't use K_EXPORT_COMPONENT_FACTORY, since insertCatalogue necessary extern "C" { @@ -53,13 +53,13 @@ extern "C" { } -KcmKRfb::KcmKRfb(QWidget *p, const char *name, const QStringList &) : +KcmKRfb::KcmKRfb(TQWidget *p, const char *name, const TQStringList &) : KCModule(KcmKRfbFactory::instance(), p, name), m_configuration(KRFB_CONFIGURATION_MODE) { m_confWidget = new ConfigurationWidget(this); - QVBoxLayout *l = new QVBoxLayout(this, 0, KDialog::spacingHint()); + TQVBoxLayout *l = new TQVBoxLayout(this, 0, KDialog::spacingHint()); l->add(m_confWidget); setButtons(Default|Apply|Reset); @@ -74,19 +74,19 @@ KcmKRfb::KcmKRfb(QWidget *p, const char *name, const QStringList &) : load(); - connect(m_confWidget->passwordInput, SIGNAL(textChanged(const QString&)), SLOT(configChanged()) ); - connect(m_confWidget->allowUninvitedCB, SIGNAL(clicked()), SLOT(configChanged()) ); - connect(m_confWidget->enableSLPCB, SIGNAL(clicked()), SLOT(configChanged()) ); - connect(m_confWidget->confirmConnectionsCB, SIGNAL(clicked()), SLOT(configChanged()) ); - connect(m_confWidget->allowDesktopControlCB, SIGNAL(clicked()), SLOT(configChanged()) ); - connect(m_confWidget->autoPortCB, SIGNAL(clicked()), SLOT(configChanged()) ); - connect(m_confWidget->portInput, SIGNAL(valueChanged(int)), SLOT(configChanged()) ); - connect((QObject*)m_confWidget->manageInvitations, SIGNAL(clicked()), - &m_configuration, SLOT(showManageInvitationsDialog()) ); - connect(&m_configuration, SIGNAL(invitationNumChanged(int)), - this, SLOT(setInvitationNum(int))); + connect(m_confWidget->passwordInput, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(configChanged()) ); + connect(m_confWidget->allowUninvitedCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) ); + connect(m_confWidget->enableSLPCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) ); + connect(m_confWidget->confirmConnectionsCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) ); + connect(m_confWidget->allowDesktopControlCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) ); + connect(m_confWidget->autoPortCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) ); + connect(m_confWidget->portInput, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(configChanged()) ); + connect((TQObject*)m_confWidget->manageInvitations, TQT_SIGNAL(clicked()), + &m_configuration, TQT_SLOT(showManageInvitationsDialog()) ); + connect(&m_configuration, TQT_SIGNAL(invitationNumChanged(int)), + this, TQT_SLOT(setInvitationNum(int))); setInvitationNum(m_configuration.invitations().size()); - connect(m_confWidget->disableBackgroundCB, SIGNAL(clicked()), SLOT(configChanged()) ); + connect(m_confWidget->disableBackgroundCB, TQT_SIGNAL(clicked()), TQT_SLOT(configChanged()) ); } void KcmKRfb::configChanged() { @@ -106,17 +106,17 @@ void KcmKRfb::checkKInetd(bool &kinetdAvailable, bool &krfbAvailable) { DCOPClient *d = KApplication::dcopClient(); - QByteArray sdata, rdata; - QCString replyType; - QDataStream arg(sdata, IO_WriteOnly); - arg << QString("krfb"); - if (!d->call ("kded", "kinetd", "isInstalled(QString)", sdata, replyType, rdata)) + TQByteArray sdata, rdata; + TQCString replyType; + TQDataStream arg(sdata, IO_WriteOnly); + arg << TQString("krfb"); + if (!d->call ("kded", "kinetd", "isInstalled(TQString)", sdata, replyType, rdata)) return; if (replyType != "bool") return; - QDataStream answer(rdata, IO_ReadOnly); + TQDataStream answer(rdata, IO_ReadOnly); answer >> krfbAvailable; kinetdAvailable = true; } @@ -152,7 +152,7 @@ void KcmKRfb::save() { m_configuration.setPreferredPort(m_confWidget->portInput->value()); m_configuration.setDisableBackground(m_confWidget->disableBackgroundCB->isChecked()); m_configuration.save(); - kapp->dcopClient()->emitDCOPSignal("KRFB::ConfigChanged", "KRFB_ConfigChanged()", QByteArray()); + kapp->dcopClient()->emitDCOPSignal("KRFB::ConfigChanged", "KRFB_ConfigChanged()", TQByteArray()); emit changed(false); } @@ -171,7 +171,7 @@ void KcmKRfb::defaults() { emit changed(true); } -QString KcmKRfb::quickHelp() const +TQString KcmKRfb::quickHelp() const { return i18n("

    Desktop Sharing

    This module allows you to configure" " the KDE desktop sharing."); diff --git a/krfb/kcm_krfb/kcm_krfb.h b/krfb/kcm_krfb/kcm_krfb.h index e9271289..9fa81fc9 100644 --- a/krfb/kcm_krfb/kcm_krfb.h +++ b/krfb/kcm_krfb/kcm_krfb.h @@ -19,8 +19,8 @@ #ifndef _KCM_KRFB_H_ #define _KCM_KRFB_H_ -#include -#include +#include +#include #include #include "configurationwidget.h" #include "../krfb/configuration.h" @@ -32,12 +32,12 @@ private: ConfigurationWidget *m_confWidget; void checkKInetd(bool&, bool&); public: - KcmKRfb(QWidget *p, const char *name, const QStringList &); + KcmKRfb(TQWidget *p, const char *name, const TQStringList &); void load(); void save(); void defaults(); - QString quickHelp() const; + TQString quickHelp() const; private slots: void setInvitationNum(int num); void configChanged(); diff --git a/krfb/kinetd/kinetd.cpp b/krfb/kinetd/kinetd.cpp index 5094712e..2f4acadd 100644 --- a/krfb/kinetd/kinetd.cpp +++ b/krfb/kinetd/kinetd.cpp @@ -21,7 +21,7 @@ #include "kinetinterface.h" #include "kuser.h" #include "uuid.h" -#include +#include #include #include #include @@ -77,8 +77,8 @@ bool PortListener::acquirePort() { delete m_socket; m_socket = new KServerSocket(m_port, false); } - connect(m_socket, SIGNAL(accepted(KSocket*)), - SLOT(accepted(KSocket*))); + connect(m_socket, TQT_SIGNAL(accepted(KSocket*)), + TQT_SLOT(accepted(KSocket*))); bool s = m_registerService; bool sd =m_dnssdRegister; @@ -102,10 +102,10 @@ void PortListener::loadConfig(KService::Ptr s) { m_valid = true; m_autoPortRange = 0; m_enabled = true; - m_argument = QString::null; + m_argument = TQString::null; m_multiInstance = false; - QVariant vid, vport, vautoport, venabled, vargument, vmultiInstance, vurl, + TQVariant vid, vport, vautoport, venabled, vargument, vmultiInstance, vurl, vsattributes, vslifetime, vdname, vdtype, vddata; m_execPath = s->exec().utf8(); @@ -154,7 +154,7 @@ void PortListener::loadConfig(KService::Ptr s) { m_registerService = true; } else { - m_serviceURL = QString::null; + m_serviceURL = TQString::null; m_registerService = false; } if (vsattributes.isValid()) { @@ -163,11 +163,11 @@ void PortListener::loadConfig(KService::Ptr s) { else m_serviceAttributes = ""; if (vddata.isValid()) { - QStringList attrs = vddata.toStringList(); - for (QStringList::iterator it=attrs.begin(); + TQStringList attrs = vddata.toStringList(); + for (TQStringList::iterator it=attrs.begin(); it!=attrs.end();it++) { - QString key = (*it).section('=',0,0); - QString value = processServiceTemplate((*it).section('=',1))[0]; + TQString key = (*it).section('=',0,0); + TQString value = processServiceTemplate((*it).section('=',1))[0]; if (!key.isEmpty()) m_dnssdData[key]=value; } } @@ -181,7 +181,7 @@ void PortListener::loadConfig(KService::Ptr s) { m_dnssdRegister = false; - m_slpLifetimeEnd = QDateTime::currentDateTime().addSecs(m_serviceLifetime); + m_slpLifetimeEnd = TQDateTime::currentDateTime().addSecs(m_serviceLifetime); m_defaultPortBase = m_portBase; m_defaultAutoPortRange = m_autoPortRange; @@ -192,17 +192,17 @@ void PortListener::loadConfig(KService::Ptr s) { m_portBase); m_autoPortRange = m_config->readNumEntry("auto_port_range_" + m_serviceName, m_autoPortRange); - QDateTime nullTime; + TQDateTime nullTime; m_expirationTime = m_config->readDateTimeEntry("enabled_expiration_"+m_serviceName, &nullTime); - if ((!m_expirationTime.isNull()) && (m_expirationTime < QDateTime::currentDateTime())) + if ((!m_expirationTime.isNull()) && (m_expirationTime < TQDateTime::currentDateTime())) m_enabled = false; m_registerService = m_config->readBoolEntry("enabled_srvreg_"+m_serviceName, m_registerService); } void PortListener::accepted(KSocket *sock) { - QString host, port; + TQString host, port; KSocketAddress *ksa = KExtendedSocket::peerAddress(sock->socket()); if ((!ksa) || !ksa->address()) { delete sock; @@ -223,7 +223,7 @@ void PortListener::accepted(KSocket *sock) { fcntl(sock->socket(), F_SETFD, fcntl(sock->socket(), F_GETFD) & ~FD_CLOEXEC); m_process.clearArguments(); - m_process << m_execPath << m_argument << QString::number(sock->socket()); + m_process << m_execPath << m_argument << TQString::number(sock->socket()); if (!m_process.start(KProcess::DontCare)) { KNotifyClient::event("ProcessFailed", i18n("Call \"%1 %2 %3\" failed").arg(m_execPath) @@ -246,22 +246,22 @@ int PortListener::port() { return m_port; } -QStringList PortListener::processServiceTemplate(const QString &a) { - QStringList l; - QValueVector v = KInetInterface::getAllInterfaces(false); - QValueVector::Iterator it = v.begin(); +TQStringList PortListener::processServiceTemplate(const TQString &a) { + TQStringList l; + TQValueVector v = KInetInterface::getAllInterfaces(false); + TQValueVector::Iterator it = v.begin(); while (it != v.end()) { KInetSocketAddress *address = (*(it++)).address(); if (!address) continue; - QString hostName = address->nodeName(); + TQString hostName = address->nodeName(); KUser u; - QString x = a; // replace does not work in const QString. Why?? - l.append(x.replace(QRegExp("%h"), KServiceRegistry::encodeAttributeValue(hostName)) - .replace(QRegExp("%p"), QString::number(m_port)) - .replace(QRegExp("%u"), KServiceRegistry::encodeAttributeValue(u.loginName())) - .replace(QRegExp("%i"), KServiceRegistry::encodeAttributeValue(m_uuid)) - .replace(QRegExp("%f"), KServiceRegistry::encodeAttributeValue(u.fullName()))); + TQString x = a; // replace does not work in const TQString. Why?? + l.append(x.replace(TQRegExp("%h"), KServiceRegistry::encodeAttributeValue(hostName)) + .replace(TQRegExp("%p"), TQString::number(m_port)) + .replace(TQRegExp("%u"), KServiceRegistry::encodeAttributeValue(u.loginName())) + .replace(TQRegExp("%i"), KServiceRegistry::encodeAttributeValue(m_uuid)) + .replace(TQRegExp("%f"), KServiceRegistry::encodeAttributeValue(u.fullName()))); } return l; } @@ -294,10 +294,10 @@ bool PortListener::setPort(int port, int autoPortRange) { } void PortListener::setEnabled(bool e) { - setEnabledInternal(e, QDateTime()); + setEnabledInternal(e, TQDateTime()); } -void PortListener::setEnabledInternal(bool e, const QDateTime &ex) { +void PortListener::setEnabledInternal(bool e, const TQDateTime &ex) { m_config->setGroup("ListenerConfig"); m_config->writeEntry("enabled_" + m_serviceName, e); m_config->writeEntry("enabled_expiration_"+m_serviceName, ex); @@ -317,7 +317,7 @@ void PortListener::setEnabledInternal(bool e, const QDateTime &ex) { } } -void PortListener::setEnabled(const QDateTime &ex) { +void PortListener::setEnabled(const TQDateTime &ex) { setEnabledInternal(true, ex); } @@ -343,9 +343,9 @@ void PortListener::setServiceRegistrationEnabledInternal(bool e) { if (m_enabled && e) { m_registeredServiceURLs = processServiceTemplate(m_serviceURL); - QStringList attributes = processServiceTemplate(m_serviceAttributes); - QStringList::Iterator it = m_registeredServiceURLs.begin(); - QStringList::Iterator it2 = attributes.begin(); + TQStringList attributes = processServiceTemplate(m_serviceAttributes); + TQStringList::Iterator it = m_registeredServiceURLs.begin(); + TQStringList::Iterator it2 = attributes.begin(); while ((it != m_registeredServiceURLs.end()) && (it2 != attributes.end())) { if (!m_srvreg->registerService( @@ -356,9 +356,9 @@ void PortListener::setServiceRegistrationEnabledInternal(bool e) { } m_serviceRegistered = true; // make lifetime 30s shorter, because the timeout is not precise - m_slpLifetimeEnd = QDateTime::currentDateTime().addSecs(m_serviceLifetime-30); + m_slpLifetimeEnd = TQDateTime::currentDateTime().addSecs(m_serviceLifetime-30); } else { - QStringList::Iterator it = m_registeredServiceURLs.begin(); + TQStringList::Iterator it = m_registeredServiceURLs.begin(); while (it != m_registeredServiceURLs.end()) m_srvreg->unregisterService(*(it++)); m_serviceRegistered = false; @@ -383,24 +383,24 @@ void PortListener::dnssdRegister(bool e) { } void PortListener::refreshRegistration() { - if (m_serviceRegistered && (m_slpLifetimeEnd.addSecs(-90) < QDateTime::currentDateTime())) { + if (m_serviceRegistered && (m_slpLifetimeEnd.addSecs(-90) < TQDateTime::currentDateTime())) { setServiceRegistrationEnabledInternal(false); setServiceRegistrationEnabledInternal(true); } } -QDateTime PortListener::expiration() { +TQDateTime PortListener::expiration() { return m_expirationTime; } -QDateTime PortListener::serviceLifetimeEnd() { +TQDateTime PortListener::serviceLifetimeEnd() { if (m_serviceRegistered) return m_slpLifetimeEnd; else - return QDateTime(); + return TQDateTime(); } -QString PortListener::name() { +TQString PortListener::name() { return m_serviceName; } @@ -410,7 +410,7 @@ PortListener::~PortListener() { } -KInetD::KInetD(QCString &n) : +KInetD::KInetD(TQCString &n) : KDEDModule(n) { m_config = new KConfig("kinetdrc"); @@ -421,9 +421,9 @@ KInetD::KInetD(QCString &n) : m_srvreg = 0; } m_portListeners.setAutoDelete(true); - connect(&m_expirationTimer, SIGNAL(timeout()), SLOT(setExpirationTimer())); - connect(&m_portRetryTimer, SIGNAL(timeout()), SLOT(portRetryTimer())); - connect(&m_reregistrationTimer, SIGNAL(timeout()), SLOT(reregistrationTimer())); + connect(&m_expirationTimer, TQT_SIGNAL(timeout()), TQT_SLOT(setExpirationTimer())); + connect(&m_portRetryTimer, TQT_SIGNAL(timeout()), TQT_SLOT(portRetryTimer())); + connect(&m_reregistrationTimer, TQT_SIGNAL(timeout()), TQT_SLOT(reregistrationTimer())); loadServiceList(); } @@ -456,9 +456,9 @@ void KInetD::expirationTimer() { } void KInetD::setExpirationTimer() { - QDateTime nextEx = getNextExpirationTime(); // disables expired portlistener! + TQDateTime nextEx = getNextExpirationTime(); // disables expired portlistener! if (!nextEx.isNull()) - m_expirationTimer.start(QDateTime::currentDateTime().secsTo(nextEx)*1000 + 30000, + m_expirationTimer.start(TQDateTime::currentDateTime().secsTo(nextEx)*1000 + 30000, false); else m_expirationTimer.stop(); @@ -470,12 +470,12 @@ void KInetD::portRetryTimer() { } void KInetD::setReregistrationTimer() { - QDateTime d; + TQDateTime d; PortListener *pl = m_portListeners.first(); while (pl) { - QDateTime d2 = pl->serviceLifetimeEnd(); + TQDateTime d2 = pl->serviceLifetimeEnd(); if (!d2.isNull()) { - if (d2 < QDateTime::currentDateTime()) { + if (d2 < TQDateTime::currentDateTime()) { m_reregistrationTimer.start(0, true); return; } @@ -486,7 +486,7 @@ void KInetD::setReregistrationTimer() { } if (!d.isNull()) { - int s = QDateTime::currentDateTime().secsTo(d); + int s = TQDateTime::currentDateTime().secsTo(d); if (s < 30) s = 30; // max frequency 30s m_reregistrationTimer.start(s*1000, true); @@ -525,7 +525,7 @@ void KInetD::setPortRetryTimer(bool retry) { m_portRetryTimer.stop(); } -PortListener *KInetD::getListenerByName(QString name) +PortListener *KInetD::getListenerByName(TQString name) { PortListener *pl = m_portListeners.first(); while (pl) { @@ -537,14 +537,14 @@ PortListener *KInetD::getListenerByName(QString name) } // gets next expiration timer, SIDEEFFECT: disables expired portlisteners while doing this -QDateTime KInetD::getNextExpirationTime() +TQDateTime KInetD::getNextExpirationTime() { PortListener *pl = m_portListeners.first(); - QDateTime d; + TQDateTime d; while (pl) { - QDateTime d2 = pl->expiration(); + TQDateTime d2 = pl->expiration(); if (!d2.isNull()) { - if (d2 < QDateTime::currentDateTime()) + if (d2 < TQDateTime::currentDateTime()) pl->setEnabled(false); else if (d.isNull() || (d2 < d)) d = d2; @@ -554,9 +554,9 @@ QDateTime KInetD::getNextExpirationTime() return d; } -QStringList KInetD::services() +TQStringList KInetD::services() { - QStringList list; + TQStringList list; PortListener *pl = m_portListeners.first(); while (pl) { list.append(pl->name()); @@ -565,7 +565,7 @@ QStringList KInetD::services() return list; } -bool KInetD::isEnabled(QString service) +bool KInetD::isEnabled(TQString service) { PortListener *pl = getListenerByName(service); if (!pl) @@ -574,7 +574,7 @@ bool KInetD::isEnabled(QString service) return pl->isEnabled(); } -int KInetD::port(QString service) +int KInetD::port(TQString service) { PortListener *pl = getListenerByName(service); if (!pl) @@ -583,7 +583,7 @@ int KInetD::port(QString service) return pl->port(); } -bool KInetD::setPort(QString service, int port, int autoPortRange) +bool KInetD::setPort(TQString service, int port, int autoPortRange) { PortListener *pl = getListenerByName(service); if (!pl) @@ -595,13 +595,13 @@ bool KInetD::setPort(QString service, int port, int autoPortRange) return s; } -bool KInetD::isInstalled(QString service) +bool KInetD::isInstalled(TQString service) { PortListener *pl = getListenerByName(service); return (pl != 0); } -void KInetD::setEnabled(QString service, bool enable) +void KInetD::setEnabled(TQString service, bool enable) { PortListener *pl = getListenerByName(service); if (!pl) @@ -612,7 +612,7 @@ void KInetD::setEnabled(QString service, bool enable) setReregistrationTimer(); } -void KInetD::setEnabled(QString service, QDateTime expiration) +void KInetD::setEnabled(TQString service, TQDateTime expiration) { PortListener *pl = getListenerByName(service); if (!pl) @@ -623,7 +623,7 @@ void KInetD::setEnabled(QString service, QDateTime expiration) setReregistrationTimer(); } -void KInetD::setServiceRegistrationEnabled(QString service, bool enable) +void KInetD::setServiceRegistrationEnabled(TQString service, bool enable) { PortListener *pl = getListenerByName(service); if (!pl) @@ -633,7 +633,7 @@ void KInetD::setServiceRegistrationEnabled(QString service, bool enable) setReregistrationTimer(); } -bool KInetD::isServiceRegistrationEnabled(QString service) +bool KInetD::isServiceRegistrationEnabled(TQString service) { PortListener *pl = getListenerByName(service); if (!pl) @@ -650,7 +650,7 @@ KInetD::~KInetD() { } extern "C" { - KDE_EXPORT KDEDModule *create_kinetd(QCString &name) + KDE_EXPORT KDEDModule *create_kinetd(TQCString &name) { KGlobal::locale()->insertCatalogue("kinetd"); return new KInetD(name); diff --git a/krfb/kinetd/kinetd.h b/krfb/kinetd/kinetd.h index e6283e83..32bb2885 100644 --- a/krfb/kinetd/kinetd.h +++ b/krfb/kinetd/kinetd.h @@ -23,36 +23,36 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include "kserviceregistry.h" -class PortListener : public QObject { +class PortListener : public TQObject { Q_OBJECT private: bool m_valid; - QString m_serviceName; - QString m_serviceURL, m_serviceAttributes; - QStringList m_registeredServiceURLs; - QString m_dnssdName, m_dnssdType; - QMap m_dnssdData; + TQString m_serviceName; + TQString m_serviceURL, m_serviceAttributes; + TQStringList m_registeredServiceURLs; + TQString m_dnssdName, m_dnssdType; + TQMap m_dnssdData; int m_serviceLifetime; int m_port; int m_portBase, m_autoPortRange; int m_defaultPortBase, m_defaultAutoPortRange; bool m_multiInstance; - QString m_execPath; - QString m_argument; + TQString m_execPath; + TQString m_argument; bool m_enabled; bool m_serviceRegistered, m_registerService; bool m_dnssdRegister, m_dnssdRegistered; - QDateTime m_expirationTime; - QDateTime m_slpLifetimeEnd; - QString m_uuid; + TQDateTime m_expirationTime; + TQDateTime m_slpLifetimeEnd; + TQString m_uuid; KServerSocket *m_socket; KProcess m_process; @@ -63,7 +63,7 @@ private: void freePort(); void loadConfig(KService::Ptr s); - void setEnabledInternal(bool e, const QDateTime &ex); + void setEnabledInternal(bool e, const TQDateTime &ex); void dnssdRegister(bool enabled); void setServiceRegistrationEnabledInternal(bool enabled); @@ -73,16 +73,16 @@ public: bool acquirePort(); bool isValid(); - QString name(); + TQString name(); void setEnabled(bool enabled); - void setEnabled(const QDateTime &expiration); + void setEnabled(const TQDateTime &expiration); void setServiceRegistrationEnabled(bool enabled); bool isServiceRegistrationEnabled(); - QDateTime expiration(); - QDateTime serviceLifetimeEnd(); + TQDateTime expiration(); + TQDateTime serviceLifetimeEnd(); bool isEnabled(); int port(); - QStringList processServiceTemplate(const QString &a); + TQStringList processServiceTemplate(const TQString &a); bool setPort(int port = -1, int autoProbeRange = 1); void refreshRegistration(); @@ -102,14 +102,14 @@ k_dcop: * (see kinetdmodule.desktop in servicetypes dir). * @return a list with the names of all services */ - QStringList services(); + TQStringList services(); /** * Returns true if the service exists and is available. * @param service name of a service as specified in its .desktop file * @return true if a service with the given name exists and is enabled */ - bool isEnabled(QString service); + bool isEnabled(TQString service); /** * Enables or disabled the given service. Ignored if the given service @@ -117,7 +117,7 @@ k_dcop: * @param service name of a service as specified in its .desktop file * @param enable true to enable, false to disable. */ - void setEnabled(QString service, bool enable); + void setEnabled(TQString service, bool enable); /** * Enables the given service until the given time. Ignored if the given @@ -125,14 +125,14 @@ k_dcop: * @param service name of a service as specified in its .desktop file * @param expiration the time the service will be disabled at */ - void setEnabled(QString service, QDateTime expiration); + void setEnabled(TQString service, TQDateTime expiration); /** * Returns the port of the service, or -1 if not listening. * @param service name of a service as specified in its .desktop file * @return the port or -1 if no port used or service does not exist */ - int port(QString service); + int port(TQString service); /** * Sets the port of the service, and possibly a range of ports to try. @@ -144,14 +144,14 @@ k_dcop: * @return true if a port could be found or service is disabled, false * otherwise. */ - bool setPort(QString service, int port = -1, int autoPortRange = 1); + bool setPort(TQString service, int port = -1, int autoPortRange = 1); /** * Tests whether the given service is installed.. * @param service name of a service as specified in its .desktop file * @return true if installed, false otherwise */ - bool isInstalled(QString service); + bool isInstalled(TQString service); /** * Enables or disables the SLP registration. Ignored if the service does @@ -160,7 +160,7 @@ k_dcop: * @param service name of a service as specified in its .desktop file * @param enable true to enable, false to disable. */ - void setServiceRegistrationEnabled(QString service, bool enabled); + void setServiceRegistrationEnabled(TQString service, bool enabled); /** * Returns true if service registration for the given service is enabled. @@ -169,19 +169,19 @@ k_dcop: * @param service name of a service as specified in its .desktop file * @return true if service registration is enabled */ - bool isServiceRegistrationEnabled(QString service); + bool isServiceRegistrationEnabled(TQString service); private: - QDateTime getNextExpirationTime(); + TQDateTime getNextExpirationTime(); void setPortRetryTimer(bool retry); void setReregistrationTimer(); KConfig *m_config; KServiceRegistry *m_srvreg; - QPtrList m_portListeners; - QTimer m_expirationTimer; - QTimer m_portRetryTimer; - QTimer m_reregistrationTimer; + TQPtrList m_portListeners; + TQTimer m_expirationTimer; + TQTimer m_portRetryTimer; + TQTimer m_reregistrationTimer; private slots: void setExpirationTimer(); @@ -190,10 +190,10 @@ k_dcop: void reregistrationTimer(); public: - KInetD(QCString &n); + KInetD(TQCString &n); virtual ~KInetD(); void loadServiceList(); - PortListener *getListenerByName(QString name); + PortListener *getListenerByName(TQString name); }; diff --git a/krfb/krfb/configuration.cc b/krfb/krfb/configuration.cc index 75f8c31d..03439b9d 100644 --- a/krfb/krfb/configuration.cc +++ b/krfb/krfb/configuration.cc @@ -26,14 +26,14 @@ #include #include -#include +#include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -58,29 +58,29 @@ Configuration::Configuration(krfb_mode mode) : connectDCOPSignal( 0, "KRFB::ConfigChanged", "KRFB_ConfigChanged()", "updateKConfig()", false ); - connect(invMngDlg.newPersonalInvitationButton, SIGNAL(clicked()), - SLOT(showPersonalInvitationDialog())); - connect(invMngDlg.newEmailInvitationButton, SIGNAL(clicked()), SLOT(inviteEmail())); - connect(invMngDlg.deleteOneButton, SIGNAL(clicked()), SLOT(invMngDlgDeleteOnePressed())); - connect(invMngDlg.deleteAllButton, SIGNAL(clicked()), SLOT(invMngDlgDeleteAllPressed())); - invMngDlg.listView->setSelectionMode(QListView::Extended); - invMngDlg.listView->setMinimumSize(QSize(400, 100)); // QTs size is much to small - - connect(&invDlg, SIGNAL(createInviteClicked()), - SLOT(showPersonalInvitationDialog())); - connect(&invDlg, SIGNAL(emailInviteClicked()), - SLOT(inviteEmail())); - connect(&invDlg, SIGNAL(manageInviteClicked()), - SLOT(showManageInvitationsDialog())); - connect(&invDlg, SIGNAL(configureClicked()), - SLOT(showConfigurationModule())); - connect(this, SIGNAL(invitationNumChanged(int)), - &invDlg, SLOT(setInviteCount(int))); - connect(this, SIGNAL(invitationNumChanged(int)), - &invMngDlg, SLOT(listSizeChanged(int))); + connect(invMngDlg.newPersonalInvitationButton, TQT_SIGNAL(clicked()), + TQT_SLOT(showPersonalInvitationDialog())); + connect(invMngDlg.newEmailInvitationButton, TQT_SIGNAL(clicked()), TQT_SLOT(inviteEmail())); + connect(invMngDlg.deleteOneButton, TQT_SIGNAL(clicked()), TQT_SLOT(invMngDlgDeleteOnePressed())); + connect(invMngDlg.deleteAllButton, TQT_SIGNAL(clicked()), TQT_SLOT(invMngDlgDeleteAllPressed())); + invMngDlg.listView->setSelectionMode(TQListView::Extended); + invMngDlg.listView->setMinimumSize(TQSize(400, 100)); // QTs size is much to small + + connect(&invDlg, TQT_SIGNAL(createInviteClicked()), + TQT_SLOT(showPersonalInvitationDialog())); + connect(&invDlg, TQT_SIGNAL(emailInviteClicked()), + TQT_SLOT(inviteEmail())); + connect(&invDlg, TQT_SIGNAL(manageInviteClicked()), + TQT_SLOT(showManageInvitationsDialog())); + connect(&invDlg, TQT_SIGNAL(configureClicked()), + TQT_SLOT(showConfigurationModule())); + connect(this, TQT_SIGNAL(invitationNumChanged(int)), + &invDlg, TQT_SLOT(setInviteCount(int))); + connect(this, TQT_SIGNAL(invitationNumChanged(int)), + &invMngDlg, TQT_SLOT(listSizeChanged(int))); emit invitationNumChanged(invitationList.size()); - connect(&refreshTimer, SIGNAL(timeout()), SLOT(refreshTimeout())); + connect(&refreshTimer, TQT_SIGNAL(timeout()), TQT_SLOT(refreshTimeout())); refreshTimer.start(1000*60); } @@ -94,24 +94,24 @@ void Configuration::updateKConfig() } void Configuration::setKInetdEnabled(bool enabled) { - kinetdRef.send("setEnabled", QString("krfb"), enabled); - kinetdRef.send("setEnabled", QString("krfb_httpd"), enabled); + kinetdRef.send("setEnabled", TQString("krfb"), enabled); + kinetdRef.send("setEnabled", TQString("krfb_httpd"), enabled); } -void Configuration::setKInetdEnabled(const QDateTime &date) { - kinetdRef.send("setEnabled", QString("krfb"), date); - kinetdRef.send("setEnabled", QString("krfb_httpd"), date); +void Configuration::setKInetdEnabled(const TQDateTime &date) { + kinetdRef.send("setEnabled", TQString("krfb"), date); + kinetdRef.send("setEnabled", TQString("krfb_httpd"), date); } void Configuration::setKInetdServiceRegistrationEnabled(bool enabled) { kinetdRef.send("setServiceRegistrationEnabled", - QString("krfb"), enabled); + TQString("krfb"), enabled); kinetdRef.send("setServiceRegistrationEnabled", - QString("krfb_httpd"), enabled); + TQString("krfb_httpd"), enabled); } void Configuration::getPortFromKInetd() { - DCOPReply r = kinetdRef.call("port", QString("krfb")); + DCOPReply r = kinetdRef.call("port", TQString("krfb")); if (!r.isValid()) return; // nice error msg here? r.get(portNum); @@ -119,12 +119,12 @@ void Configuration::getPortFromKInetd() { void Configuration::setKInetdPort(int p) { DCOPReply r = kinetdRef.call("setPort", - QString("krfb"), p, 1); + TQString("krfb"), p, 1); // nice error msg here? } -void Configuration::removeInvitation(QValueList::iterator it) { +void Configuration::removeInvitation(TQValueList::iterator it) { invitationList.remove(it); save(); } @@ -139,16 +139,16 @@ void Configuration::doKinetdConf() { return; } - QDateTime lastExpiration; - QValueList::iterator it = invitationList.begin(); + TQDateTime lastExpiration; + TQValueList::iterator it = invitationList.begin(); while (it != invitationList.end()) { Invitation &ix = (*it); - QDateTime t = ix.expirationTime(); + TQDateTime t = ix.expirationTime(); if (t > lastExpiration) lastExpiration = t; it++; } - if (lastExpiration.isNull() || (lastExpiration < QDateTime::currentDateTime())) { + if (lastExpiration.isNull() || (lastExpiration < TQDateTime::currentDateTime())) { setKInetdEnabled(false); portNum = -1; } @@ -213,7 +213,7 @@ void Configuration::saveToKConfig() { void Configuration::saveToDialogs() { invalidateOldInvitations(); - QValueList::iterator it = invitationList.begin(); + TQValueList::iterator it = invitationList.begin(); while (it != invitationList.end()) { Invitation &inv = *(it++); if (!inv.getViewItem()) @@ -242,7 +242,7 @@ Invitation Configuration::createInvitation() { } void Configuration::invalidateOldInvitations() { - QValueList::iterator it = invitationList.begin(); + TQValueList::iterator it = invitationList.begin(); while (it != invitationList.end()) { if (!(*it).isValid()) it = invitationList.remove(it); @@ -259,10 +259,10 @@ void Configuration::refreshTimeout() { emit invitationNumChanged(invitationList.size()); } -QString Configuration::hostname() const +TQString Configuration::hostname() const { KInetSocketAddress *a = KInetInterface::getPublicInetAddress(); - QString hostName; + TQString hostName; if (a) { hostName = a->nodeName(); delete a; @@ -294,11 +294,11 @@ bool Configuration::enableSLP() const { return enableSLPFlag; } -QString Configuration::password() const { +TQString Configuration::password() const { return passwordString; } -QValueList &Configuration::invitations() { +TQValueList &Configuration::invitations() { return invitationList; } @@ -328,7 +328,7 @@ void Configuration::setAllowDesktopControl(bool allowDesktopControl) allowDesktopControlFlag = allowDesktopControl; } -void Configuration::setPassword(QString password) +void Configuration::setPassword(TQString password) { passwordString = password; } @@ -369,7 +369,7 @@ void Configuration::showManageInvitationsDialog() { } void Configuration::invMngDlgDeleteOnePressed() { - QValueList::iterator it = invitationList.begin(); + TQValueList::iterator it = invitationList.begin(); while (it != invitationList.end()) { Invitation &ix = (*it); KListViewItem *iv = ix.getViewItem(); @@ -439,7 +439,7 @@ void Configuration::inviteEmail() { emit invitationNumChanged(invitationList.size()); KApplication *app = KApplication::kApplication(); - app->invokeMailer(QString::null, QString::null, QString::null, + app->invokeMailer(TQString::null, TQString::null, TQString::null, i18n("Desktop Sharing (VNC) invitation"), i18n("You have been invited to a VNC session. If you have the KDE Remote " "Desktop Connection installed, just click on the link below.\n\n" diff --git a/krfb/krfb/configuration.h b/krfb/krfb/configuration.h index cec7a2ed..57e03385 100644 --- a/krfb/krfb/configuration.h +++ b/krfb/krfb/configuration.h @@ -26,10 +26,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -46,7 +46,7 @@ enum krfb_mode { * standalone-config-dialog and all the invitation dialogs * @author Tim Jansen */ -class Configuration : public QObject, public DCOPObject { +class Configuration : public TQObject, public DCOPObject { K_DCOP Q_OBJECT public: @@ -58,8 +58,8 @@ public: bool allowDesktopControl() const; bool allowUninvitedConnections() const; bool enableSLP() const; - QString password() const; - QString hostname() const; + TQString password() const; + TQString hostname() const; int port() const; int preferredPort() const; bool disableBackground() const; @@ -68,15 +68,15 @@ public: void setAllowUninvited(bool allowUninvited); void setEnableSLP(bool e); void setAskOnConnect(bool askOnConnect); - void setPassword(QString password); + void setPassword(TQString password); void setPreferredPort(int p); void setDisableBackground(bool disable); void setDisableXShm(bool disable); void save(); void update(); - QValueList &invitations(); - void removeInvitation(QValueList::iterator it); + TQValueList &invitations(); + void removeInvitation(TQValueList::iterator it); signals: void invitationFinished(); void invitationNumChanged(int num); @@ -97,7 +97,7 @@ private: Invitation createInvitation(); void closeInvDlg(); void invalidateOldInvitations(); - void setKInetdEnabled(const QDateTime &date); + void setKInetdEnabled(const TQDateTime &date); void setKInetdEnabled(bool enabled); void setKInetdServiceRegistrationEnabled(bool enabled); void getPortFromKInetd(); @@ -109,7 +109,7 @@ private: ManageInvitationsDialog invMngDlg; InviteDialog invDlg; PersonalInviteDialog persInvDlg; - QTimer refreshTimer; + TQTimer refreshTimer; bool askOnConnectFlag; bool allowDesktopControlFlag; @@ -120,8 +120,8 @@ private: DCOPRef kinetdRef; - QString passwordString; - QValueList invitationList; + TQString passwordString; + TQValueList invitationList; bool disableBackgroundFlag; bool disableXShmFlag; diff --git a/krfb/krfb/connectiondialog.cc b/krfb/krfb/connectiondialog.cc index bc9f63c9..d767b5a2 100644 --- a/krfb/krfb/connectiondialog.cc +++ b/krfb/krfb/connectiondialog.cc @@ -20,13 +20,13 @@ #include "connectiondialog.h" #include "connectionwidget.h" -#include -#include +#include +#include #include #include -ConnectionDialog::ConnectionDialog( QWidget *parent, const char *name ) +ConnectionDialog::ConnectionDialog( TQWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n( "New Connection" ), Ok|Cancel, Cancel, true ) { @@ -45,7 +45,7 @@ ConnectionDialog::ConnectionDialog( QWidget *parent, const char *name ) setMainWidget( m_connectWidget ); } -void ConnectionDialog::setRemoteHost( const QString &host ) +void ConnectionDialog::setRemoteHost( const TQString &host ) { m_connectWidget->remoteHost->setText( host ); } diff --git a/krfb/krfb/connectiondialog.h b/krfb/krfb/connectiondialog.h index c110d6db..c5f7e589 100644 --- a/krfb/krfb/connectiondialog.h +++ b/krfb/krfb/connectiondialog.h @@ -29,10 +29,10 @@ class ConnectionDialog : public KDialogBase Q_OBJECT public: - ConnectionDialog( QWidget *parent, const char *name ); + ConnectionDialog( TQWidget *parent, const char *name ); ~ConnectionDialog() {}; - void setRemoteHost( const QString &host ); + void setRemoteHost( const TQString &host ); void setAllowRemoteControl( bool b ); bool allowRemoteControl(); diff --git a/krfb/krfb/invitation.cc b/krfb/krfb/invitation.cc index 75c4758a..e764036c 100644 --- a/krfb/krfb/invitation.cc +++ b/krfb/krfb/invitation.cc @@ -22,18 +22,18 @@ * Function for (en/de)crypting strings for config file, taken from KMail * Author: Stefan Taferner */ -QString cryptStr(const QString &aStr) { - QString result; +TQString cryptStr(const TQString &aStr) { + TQString result; for (unsigned int i = 0; i < aStr.length(); i++) result += (aStr[i].unicode() < 0x20) ? aStr[i] : - QChar(0x1001F - aStr[i].unicode()); + TQChar(0x1001F - aStr[i].unicode()); return result; } // a random string that doesn't contain i, I, o, O, 1, 0 // based on KApplication::randomString() -static QString readableRandomString(int length) { - QString str; +static TQString readableRandomString(int length) { + TQString str; while (length) { int r = KApplication::random() % 62; @@ -59,8 +59,8 @@ static QString readableRandomString(int length) { Invitation::Invitation() : m_viewItem(0) { m_password = readableRandomString(4)+"-"+readableRandomString(3); - m_creationTime = QDateTime::currentDateTime(); - m_expirationTime = QDateTime::currentDateTime().addSecs(INVITATION_DURATION); + m_creationTime = TQDateTime::currentDateTime(); + m_expirationTime = TQDateTime::currentDateTime().addSecs(INVITATION_DURATION); } Invitation::Invitation(const Invitation &x) : @@ -71,9 +71,9 @@ Invitation::Invitation(const Invitation &x) : } Invitation::Invitation(KConfig* config, int num) { - m_password = cryptStr(config->readEntry(QString("password%1").arg(num), "")); - m_creationTime = config->readDateTimeEntry(QString("creation%1").arg(num)); - m_expirationTime = config->readDateTimeEntry(QString("expiration%1").arg(num)); + m_password = cryptStr(config->readEntry(TQString("password%1").arg(num), "")); + m_creationTime = config->readDateTimeEntry(TQString("creation%1").arg(num)); + m_expirationTime = config->readDateTimeEntry(TQString("expiration%1").arg(num)); m_viewItem = 0; } @@ -93,25 +93,25 @@ Invitation &Invitation::operator= (const Invitation&x) { } void Invitation::save(KConfig *config, int num) const { - config->writeEntry(QString("password%1").arg(num), cryptStr(m_password)); - config->writeEntry(QString("creation%1").arg(num), m_creationTime); - config->writeEntry(QString("expiration%1").arg(num), m_expirationTime); + config->writeEntry(TQString("password%1").arg(num), cryptStr(m_password)); + config->writeEntry(TQString("creation%1").arg(num), m_creationTime); + config->writeEntry(TQString("expiration%1").arg(num), m_expirationTime); } -QString Invitation::password() const { +TQString Invitation::password() const { return m_password; } -QDateTime Invitation::expirationTime() const { +TQDateTime Invitation::expirationTime() const { return m_expirationTime; } -QDateTime Invitation::creationTime() const { +TQDateTime Invitation::creationTime() const { return m_creationTime; } bool Invitation::isValid() const { - return m_expirationTime > QDateTime::currentDateTime(); + return m_expirationTime > TQDateTime::currentDateTime(); } void Invitation::setViewItem(KListViewItem *i) { diff --git a/krfb/krfb/invitation.h b/krfb/krfb/invitation.h index 4f1dd826..fe928d7f 100644 --- a/krfb/krfb/invitation.h +++ b/krfb/krfb/invitation.h @@ -21,14 +21,14 @@ #include #include #include -#include -#include -#include +#include +#include +#include const int INVITATION_DURATION = 60*60; -QString cryptStr(const QString &aStr); +TQString cryptStr(const TQString &aStr); class Invitation { public: @@ -38,18 +38,18 @@ public: Invitation(const Invitation &x); Invitation &operator= (const Invitation&x); - QString password() const; - QDateTime expirationTime() const; - QDateTime creationTime() const; + TQString password() const; + TQDateTime expirationTime() const; + TQDateTime creationTime() const; bool isValid() const; void setViewItem(KListViewItem*); KListViewItem* getViewItem() const; void save(KConfig *config, int num) const; private: - QString m_password; - QDateTime m_creationTime; - QDateTime m_expirationTime; + TQString m_password; + TQDateTime m_creationTime; + TQDateTime m_expirationTime; KListViewItem *m_viewItem; }; diff --git a/krfb/krfb/invitedialog.cc b/krfb/krfb/invitedialog.cc index fe01083a..f3b202a9 100644 --- a/krfb/krfb/invitedialog.cc +++ b/krfb/krfb/invitedialog.cc @@ -24,10 +24,10 @@ #include #include -#include -#include +#include +#include -InviteDialog::InviteDialog( QWidget *parent, const char *name ) +InviteDialog::InviteDialog( TQWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n( "Invitation" ), User1|Close|Help, NoDefault, true ) { @@ -38,12 +38,12 @@ InviteDialog::InviteDialog( QWidget *parent, const char *name ) setButtonGuiItem( User1, KStdGuiItem::configure() ); - connect( m_inviteWidget->btnCreateInvite, SIGNAL( clicked() ), - SIGNAL( createInviteClicked() ) ); - connect( m_inviteWidget->btnEmailInvite, SIGNAL( clicked() ), - SIGNAL( emailInviteClicked() ) ); - connect( m_inviteWidget->btnManageInvite, SIGNAL( clicked() ), - SIGNAL( manageInviteClicked() ) ); + connect( m_inviteWidget->btnCreateInvite, TQT_SIGNAL( clicked() ), + TQT_SIGNAL( createInviteClicked() ) ); + connect( m_inviteWidget->btnEmailInvite, TQT_SIGNAL( clicked() ), + TQT_SIGNAL( emailInviteClicked() ) ); + connect( m_inviteWidget->btnManageInvite, TQT_SIGNAL( clicked() ), + TQT_SIGNAL( manageInviteClicked() ) ); } void InviteDialog::slotUser1() diff --git a/krfb/krfb/invitedialog.h b/krfb/krfb/invitedialog.h index dfb0e0f4..a1de109b 100644 --- a/krfb/krfb/invitedialog.h +++ b/krfb/krfb/invitedialog.h @@ -29,7 +29,7 @@ class InviteDialog : public KDialogBase Q_OBJECT public: - InviteDialog( QWidget *parent, const char *name ); + InviteDialog( TQWidget *parent, const char *name ); ~InviteDialog() {} void enableInviteButton( bool enable ); diff --git a/krfb/krfb/krfbifaceimpl.h b/krfb/krfb/krfbifaceimpl.h index 430a0652..21f3a022 100644 --- a/krfb/krfb/krfbifaceimpl.h +++ b/krfb/krfb/krfbifaceimpl.h @@ -1,11 +1,11 @@ #ifndef __KRFB_IFACE_IMPL_H #define __KRFB_IFACE_IMPL_H -#include +#include #include "rfbcontroller.h" #include "krfbiface.h" -class KRfbIfaceImpl : public QObject, public virtual krfbIface +class KRfbIfaceImpl : public TQObject, public virtual krfbIface { Q_OBJECT private: diff --git a/krfb/krfb/main.cpp b/krfb/krfb/main.cpp index 4428e983..0910b9d8 100644 --- a/krfb/krfb/main.cpp +++ b/krfb/krfb/main.cpp @@ -31,10 +31,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -57,7 +57,7 @@ void checkKInetd(bool &kinetdAvailable, bool &krfbAvailable) { DCOPRef ref("kded", "kinetd"); ref.setDCOPClient(KApplication::dcopClient()); - DCOPReply r = ref.call("isInstalled", QString("krfb")); + DCOPReply r = ref.call("isInstalled", TQString("krfb")); if (!r.isValid()) { kinetdAvailable = false; krfbAvailable = false; @@ -105,7 +105,7 @@ int main(int argc, char *argv[]) Configuration *config; KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QString fdString; + TQString fdString; if (!args->isSet(ARG_KINETD)) { bool kinetdA, krfbA; checkKInetd(kinetdA, krfbA); @@ -145,33 +145,33 @@ int main(int argc, char *argv[]) RFBController controller(config); KRfbIfaceImpl dcopiface(&controller); - QObject::connect(&app, SIGNAL(lastWindowClosed()), // dont show passivepopup - &trayicon, SLOT(prepareQuit())); - QObject::connect(&app, SIGNAL(lastWindowClosed()), - &controller, SLOT(closeConnection())); - - QObject::connect(&trayicon, SIGNAL(showManageInvitations()), - config, SLOT(showManageInvitationsDialog())); - QObject::connect(&trayicon, SIGNAL(enableDesktopControl(bool)), - &controller, SLOT(enableDesktopControl(bool))); - QObject::connect(&trayicon, SIGNAL(diconnectedMessageDisplayed()), - &app, SLOT(quit())); - - QObject::connect(&dcopiface, SIGNAL(exitApp()), - &controller, SLOT(closeConnection())); - QObject::connect(&dcopiface, SIGNAL(exitApp()), - &app, SLOT(quit())); - - QObject::connect(&controller, SIGNAL(sessionRefused()), - &app, SLOT(quit())); - QObject::connect(&controller, SIGNAL(sessionEstablished(QString)), - &trayicon, SLOT(showConnectedMessage(QString))); - QObject::connect(&controller, SIGNAL(sessionFinished()), - &trayicon, SLOT(showDisconnectedMessage())); - QObject::connect(&controller, SIGNAL(desktopControlSettingChanged(bool)), - &trayicon, SLOT(setDesktopControlSetting(bool))); - QObject::connect(&controller, SIGNAL(quitApp()), - &app, SLOT(quit())); + TQObject::connect(&app, TQT_SIGNAL(lastWindowClosed()), // dont show passivepopup + &trayicon, TQT_SLOT(prepareQuit())); + TQObject::connect(&app, TQT_SIGNAL(lastWindowClosed()), + &controller, TQT_SLOT(closeConnection())); + + TQObject::connect(&trayicon, TQT_SIGNAL(showManageInvitations()), + config, TQT_SLOT(showManageInvitationsDialog())); + TQObject::connect(&trayicon, TQT_SIGNAL(enableDesktopControl(bool)), + &controller, TQT_SLOT(enableDesktopControl(bool))); + TQObject::connect(&trayicon, TQT_SIGNAL(diconnectedMessageDisplayed()), + &app, TQT_SLOT(quit())); + + TQObject::connect(&dcopiface, TQT_SIGNAL(exitApp()), + &controller, TQT_SLOT(closeConnection())); + TQObject::connect(&dcopiface, TQT_SIGNAL(exitApp()), + &app, TQT_SLOT(quit())); + + TQObject::connect(&controller, TQT_SIGNAL(sessionRefused()), + &app, TQT_SLOT(quit())); + TQObject::connect(&controller, TQT_SIGNAL(sessionEstablished(TQString)), + &trayicon, TQT_SLOT(showConnectedMessage(TQString))); + TQObject::connect(&controller, TQT_SIGNAL(sessionFinished()), + &trayicon, TQT_SLOT(showDisconnectedMessage())); + TQObject::connect(&controller, TQT_SIGNAL(desktopControlSettingChanged(bool)), + &trayicon, TQT_SLOT(setDesktopControlSetting(bool))); + TQObject::connect(&controller, TQT_SIGNAL(quitApp()), + &app, TQT_SLOT(quit())); sigset_t sigs; sigemptyset(&sigs); diff --git a/krfb/krfb/manageinvitations.ui.h b/krfb/krfb/manageinvitations.ui.h index 86c1fa4b..74b7cb97 100644 --- a/krfb/krfb/manageinvitations.ui.h +++ b/krfb/krfb/manageinvitations.ui.h @@ -3,7 +3,7 @@ void ManageInvitationsDialog::listSizeChanged(int i) { } void ManageInvitationsDialog::listSelectionChanged() { - QListViewItem *i = listView->firstChild(); + TQListViewItem *i = listView->firstChild(); while(i) { if (i->isSelected()) { deleteOneButton->setEnabled(true); diff --git a/krfb/krfb/personalinvitedialog.cc b/krfb/krfb/personalinvitedialog.cc index 4be1c3de..a5664bcb 100644 --- a/krfb/krfb/personalinvitedialog.cc +++ b/krfb/krfb/personalinvitedialog.cc @@ -20,13 +20,13 @@ #include "personalinvitedialog.h" #include "personalinvitewidget.h" -#include +#include #include #include #include -PersonalInviteDialog::PersonalInviteDialog( QWidget *parent, const char *name ) +PersonalInviteDialog::PersonalInviteDialog( TQWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n( "Personal Invitation" ), Close, Close, true ) { @@ -37,18 +37,18 @@ PersonalInviteDialog::PersonalInviteDialog( QWidget *parent, const char *name ) setMainWidget( m_inviteWidget ); } -void PersonalInviteDialog::setHost( const QString &host, uint port ) +void PersonalInviteDialog::setHost( const TQString &host, uint port ) { - m_inviteWidget->hostLabel->setText( QString( "%1:%2" ) + m_inviteWidget->hostLabel->setText( TQString( "%1:%2" ) .arg( host ).arg( port ) ); } -void PersonalInviteDialog::setPassword( const QString &passwd ) +void PersonalInviteDialog::setPassword( const TQString &passwd ) { m_inviteWidget->passwordLabel->setText( passwd ); } -void PersonalInviteDialog::setExpiration( const QDateTime &expire ) +void PersonalInviteDialog::setExpiration( const TQDateTime &expire ) { m_inviteWidget->expirationLabel->setText( expire.toString( Qt::LocalDate ) ); } diff --git a/krfb/krfb/personalinvitedialog.h b/krfb/krfb/personalinvitedialog.h index 2951a93b..6f28a33d 100644 --- a/krfb/krfb/personalinvitedialog.h +++ b/krfb/krfb/personalinvitedialog.h @@ -22,19 +22,19 @@ class PersonalInviteWidget; -#include +#include #include class PersonalInviteDialog : public KDialogBase { public: - PersonalInviteDialog( QWidget *parent, const char *name ); + PersonalInviteDialog( TQWidget *parent, const char *name ); virtual ~PersonalInviteDialog() {} - void setHost( const QString &host, uint port ); - void setPassword( const QString &passwd ); - void setExpiration( const QDateTime &expire ); + void setHost( const TQString &host, uint port ); + void setPassword( const TQString &passwd ); + void setExpiration( const TQDateTime &expire ); protected: PersonalInviteWidget *m_inviteWidget; diff --git a/krfb/krfb/rfbcontroller.cc b/krfb/krfb/rfbcontroller.cc index 29f48278..51516683 100644 --- a/krfb/krfb/rfbcontroller.cc +++ b/krfb/krfb/rfbcontroller.cc @@ -42,18 +42,18 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -167,7 +167,7 @@ static void inetdDisconnectHook() static void clipboardHook(char* str,int len, rfbClientPtr) { - self->clipboardToServer(QString::fromUtf8(str, len)); + self->clipboardToServer(TQString::fromUtf8(str, len)); } VNCEvent::~VNCEvent() { @@ -290,7 +290,7 @@ PointerEvent::PointerEvent(int b, int _x, int _y) : } void PointerEvent::exec() { - QDesktopWidget *desktopWidget = QApplication::desktop(); + TQDesktopWidget *desktopWidget = TQApplication::desktop(); int screen = desktopWidget->screenNumber(); if (screen < 0) @@ -307,9 +307,9 @@ void PointerEvent::exec() { } -ClipboardEvent::ClipboardEvent(RFBController *c, const QString &ctext) : +ClipboardEvent::ClipboardEvent(RFBController *c, const TQString &ctext) : controller(c), - text(QDeepCopy(ctext)) { + text(TQDeepCopy(ctext)) { } void ClipboardEvent::exec() { @@ -325,7 +325,7 @@ void ClipboardEvent::exec() { } -KNotifyEvent::KNotifyEvent(const QString &n, const QString &d) : +KNotifyEvent::KNotifyEvent(const TQString &n, const TQString &d) : name(n), desc(d) { } @@ -356,14 +356,14 @@ RFBController::RFBController(Configuration *c) : forcedClose(false) { self = this; - connect(&dialog, SIGNAL(okClicked()), SLOT(dialogAccepted())); - connect(&dialog, SIGNAL(cancelClicked()), SLOT(dialogRefused())); - connect(&initIdleTimer, SIGNAL(timeout()), SLOT(checkAsyncEvents())); - connect(&idleTimer, SIGNAL(timeout()), SLOT(idleSlot())); + connect(&dialog, TQT_SIGNAL(okClicked()), TQT_SLOT(dialogAccepted())); + connect(&dialog, TQT_SIGNAL(cancelClicked()), TQT_SLOT(dialogRefused())); + connect(&initIdleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(checkAsyncEvents())); + connect(&idleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(idleSlot())); - clipboard = QApplication::clipboard(); - connect(clipboard, SIGNAL(selectionChanged()), this, SLOT(selectionChanged())); - connect(clipboard, SIGNAL(dataChanged()), this, SLOT(clipboardChanged())); + clipboard = TQApplication::clipboard(); + connect(clipboard, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged())); + connect(clipboard, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clipboardChanged())); asyncQueue.setAutoDelete(true); @@ -386,11 +386,11 @@ RFBController::~RFBController() void RFBController::startServer(int inetdFd, bool xtestGrab) { framebufferImage = XGetImage(qt_xdisplay(), - QApplication::desktop()->winId(), + TQApplication::desktop()->winId(), 0, 0, - QApplication::desktop()->width(), - QApplication::desktop()->height(), + TQApplication::desktop()->width(), + TQApplication::desktop()->height(), AllPlanes, ZPixmap); @@ -456,7 +456,7 @@ void RFBController::startServer(int inetdFd, bool xtestGrab) passwordChanged(); scanner = new XUpdateScanner(qt_xdisplay(), - QApplication::desktop()->winId(), + TQApplication::desktop()->winId(), (unsigned char*)fb, w, h, server->rfbServerFormat.bitsPerPixel, server->paddedWidthInBytes, @@ -484,7 +484,7 @@ void RFBController::stopServer(bool xtestUngrab) if (xtestUngrab) { disabler.disable = true; - QTimer::singleShot(0, &disabler, SLOT(exec())); + TQTimer::singleShot(0, &disabler, TQT_SLOT(exec())); } } @@ -613,9 +613,9 @@ void RFBController::idleSlot() rfbUndrawCursor(server); - QPtrList v; + TQPtrList v; v.setAutoDelete(true); - QPoint p = QCursor::pos(); + TQPoint p = TQCursor::pos(); scanner->searchUpdates(v, p.y()); Hint *h; @@ -647,7 +647,7 @@ void RFBController::dialogRefused() emit sessionRefused(); } -bool checkPassword(const QString &p, +bool checkPassword(const TQString &p, unsigned char *ochallenge, const char *response, int len) { @@ -680,7 +680,7 @@ bool RFBController::handleCheckPassword(rfbClientPtr cl, cl->authChallenge, response, len); if (!authd) { - QValueList::iterator it = + TQValueList::iterator it = configuration->invitations().begin(); while (it != configuration->invitations().end()) { if (checkPassword((*it).password(), @@ -719,7 +719,7 @@ enum rfbNewClientAction RFBController::handleNewClient(rfbClientPtr cl) int socket = cl->sock; cl->negotiationFinishedHook = negotiationFinishedHook; - QString host, port; + TQString host, port; KSocketAddress *ksa = KExtendedSocket::peerAddress(socket); if (ksa) { hostent *he = 0; @@ -730,7 +730,7 @@ enum rfbNewClientAction RFBController::handleNewClient(rfbClientPtr cl) AF_INET); if (he && he->h_name) - host = QString(he->h_name); + host = TQString(he->h_name); else host = ksa->nodeName(); delete ksa; @@ -799,7 +799,7 @@ void RFBController::handlePointerEvent(int button_mask, int x, int y) { } -void RFBController::clipboardToServer(const QString &ctext) { +void RFBController::clipboardToServer(const TQString &ctext) { if (!allowDesktopControl) return; @@ -814,7 +814,7 @@ void RFBController::clipboardChanged() { if (clipboard->ownsClipboard()) return; - QString text = clipboard->text(QClipboard::Clipboard); + TQString text = clipboard->text(QClipboard::Clipboard); // avoid ping-pong between client&server if ((lastClipboardDirection == LAST_SYNC_TO_SERVER) && @@ -825,7 +825,7 @@ void RFBController::clipboardChanged() { lastClipboardDirection = LAST_SYNC_TO_CLIENT; lastClipboardText = text; - QCString ctext = text.utf8(); + TQCString ctext = text.utf8(); rfbSendServerCutText(server, ctext.data(), ctext.length()); } @@ -835,7 +835,7 @@ void RFBController::selectionChanged() { if (clipboard->ownsSelection()) return; - QString text = clipboard->text(QClipboard::Selection); + TQString text = clipboard->text(QClipboard::Selection); // avoid ping-pong between client&server if ((lastClipboardDirection == LAST_SYNC_TO_SERVER) && (lastClipboardText == text)) @@ -845,7 +845,7 @@ void RFBController::selectionChanged() { lastClipboardDirection = LAST_SYNC_TO_CLIENT; lastClipboardText = text; - QCString ctext = text.utf8(); + TQCString ctext = text.utf8(); rfbSendServerCutText(server, ctext.data(), ctext.length()); } @@ -857,7 +857,7 @@ void RFBController::passwordChanged() { server->rfbAuthPasswdData = (void*) (authRequired ? 1 : 0); } -void RFBController::sendKNotifyEvent(const QString &n, const QString &d) +void RFBController::sendKNotifyEvent(const TQString &n, const TQString &d) { asyncMutex.lock(); asyncQueue.append(new KNotifyEvent(n, d)); diff --git a/krfb/krfb/rfbcontroller.h b/krfb/krfb/rfbcontroller.h index 948456f2..c7646d91 100644 --- a/krfb/krfb/rfbcontroller.h +++ b/krfb/krfb/rfbcontroller.h @@ -27,9 +27,9 @@ #include "connectiondialog.h" #include "xupdatescanner.h" #include -#include -#include -#include +#include +#include +#include #define HAVE_PTHREADS #include "rfb.h" @@ -89,17 +89,17 @@ public: class ClipboardEvent : public VNCEvent { RFBController *controller; - QString text; + TQString text; public: - ClipboardEvent(RFBController *c, const QString &text); + ClipboardEvent(RFBController *c, const TQString &text); virtual void exec(); }; class KNotifyEvent : public VNCEvent { - QString name; - QString desc; + TQString name; + TQString desc; public: - KNotifyEvent(const QString &n, const QString &d); + KNotifyEvent(const TQString &n, const TQString &d); virtual ~KNotifyEvent(); virtual void exec(); }; @@ -120,7 +120,7 @@ public: * set. * @author Tim Jansen */ -class RFBController : public QObject { +class RFBController : public TQObject { Q_OBJECT friend class SessionEstablishedEvent; @@ -139,7 +139,7 @@ public: void handleKeyEvent(bool down, KeySym keySym); void handlePointerEvent(int button_mask, int x, int y); enum rfbNewClientAction handleNewClient(rfbClientPtr cl); - void clipboardToServer(const QString &text); + void clipboardToServer(const TQString &text); void handleClientGone(); void handleNegotiationFinished(rfbClientPtr cl); int getPort(); @@ -153,7 +153,7 @@ public slots: void enableDesktopControl(bool c); signals: - void sessionEstablished(QString host); + void sessionEstablished(TQString host); void sessionFinished(); void sessionRefused(); void quitApp(); @@ -161,35 +161,35 @@ signals: private: void stopServer(bool xtestUngrab = true); - void sendKNotifyEvent(const QString &name, const QString &desc); + void sendKNotifyEvent(const TQString &name, const TQString &desc); void sendSessionEstablished(); void disableBackground(bool state); - QString remoteIp; + TQString remoteIp; volatile bool allowDesktopControl; - QTimer initIdleTimer; - QTimer idleTimer; + TQTimer initIdleTimer; + TQTimer idleTimer; enum { LAST_SYNC_TO_SERVER, LAST_SYNC_TO_CLIENT } lastClipboardDirection; - QString lastClipboardText; + TQString lastClipboardText; QClipboard *clipboard; Configuration *configuration; XUpdateScanner *scanner; ConnectionDialog dialog; - QString desktopName; + TQString desktopName; rfbScreenInfoPtr server; XImage *framebufferImage; - QMutex asyncMutex; - QPtrList asyncQueue; + TQMutex asyncMutex; + TQPtrList asyncQueue; bool disableBackgroundPending; // background, as desired by libvncserver bool disableBackgroundState; // real background state @@ -208,7 +208,7 @@ private slots: * Class to call XTestDiscard at idle time (because otherwise * it will not work with QT) */ -class XTestDisabler : public QObject { +class XTestDisabler : public TQObject { Q_OBJECT public: XTestDisabler(); diff --git a/krfb/krfb/trayicon.cpp b/krfb/krfb/trayicon.cpp index 220ff7c0..f7d2c64a 100644 --- a/krfb/krfb/trayicon.cpp +++ b/krfb/krfb/trayicon.cpp @@ -16,7 +16,7 @@ ***************************************************************************/ #include "trayicon.h" -#include +#include #include #include #include @@ -25,19 +25,19 @@ #include #include -KPassivePopup2::KPassivePopup2(QWidget *parent) : +KPassivePopup2::KPassivePopup2(TQWidget *parent) : KPassivePopup(parent){ } -void KPassivePopup2::hideEvent( QHideEvent *e ) +void KPassivePopup2::hideEvent( TQHideEvent *e ) { KPassivePopup::hideEvent(e); emit hidden(); } -KPassivePopup2 *KPassivePopup2::message( const QString &caption, const QString &text, - const QPixmap &icon, - QWidget *parent) +KPassivePopup2 *KPassivePopup2::message( const TQString &caption, const TQString &text, + const TQPixmap &icon, + TQWidget *parent) { KPassivePopup2 *pop = new KPassivePopup2( parent); pop->setView( caption, text, icon ); @@ -58,10 +58,10 @@ TrayIcon::TrayIcon(KDialog *d, Configuration *c) : trayIconOpen = loader->loadIcon("eyes-open24", KIcon::User); trayIconClosed = loader->loadIcon("eyes-closed24", KIcon::User); setPixmap(trayIconClosed); - QToolTip::add(this, i18n("Desktop Sharing - connecting")); + TQToolTip::add(this, i18n("Desktop Sharing - connecting")); - manageInvitationsAction = new KAction(i18n("Manage &Invitations"), QString::null, - 0, this, SIGNAL(showManageInvitations()), + manageInvitationsAction = new KAction(i18n("Manage &Invitations"), TQString::null, + 0, this, TQT_SIGNAL(showManageInvitations()), &actionCollection); manageInvitationsAction->plug(contextMenu()); @@ -71,11 +71,11 @@ TrayIcon::TrayIcon(KDialog *d, Configuration *c) : enableControlAction->setCheckedState(i18n("Disable Remote Control")); enableControlAction->plug(contextMenu()); enableControlAction->setEnabled(false); - connect(enableControlAction, SIGNAL(toggled(bool)), SIGNAL(enableDesktopControl(bool))); + connect(enableControlAction, TQT_SIGNAL(toggled(bool)), TQT_SIGNAL(enableDesktopControl(bool))); contextMenu()->insertSeparator(); - aboutAction = KStdAction::aboutApp(this, SLOT(showAbout()), &actionCollection); + aboutAction = KStdAction::aboutApp(this, TQT_SLOT(showAbout()), &actionCollection); aboutAction->plug(contextMenu()); show(); @@ -94,27 +94,27 @@ void TrayIcon::prepareQuit() { -void TrayIcon::showConnectedMessage(QString host) { +void TrayIcon::showConnectedMessage(TQString host) { setPixmap(trayIconOpen); KPassivePopup2::message(i18n("Desktop Sharing"), i18n("The remote user has been authenticated and is now connected."), trayIconOpen, this); - QToolTip::add(this, i18n("Desktop Sharing - connected with %1").arg(host)); + TQToolTip::add(this, i18n("Desktop Sharing - connected with %1").arg(host)); } void TrayIcon::showDisconnectedMessage() { if (quitting) return; - QToolTip::add(this, i18n("Desktop Sharing - disconnected")); + TQToolTip::add(this, i18n("Desktop Sharing - disconnected")); setPixmap(trayIconClosed); KPassivePopup2 *p = KPassivePopup2::message(i18n("Desktop Sharing"), i18n("The remote user has closed the connection."), trayIconClosed, this); - connect(p, SIGNAL(hidden()), this, SIGNAL(diconnectedMessageDisplayed())); + connect(p, TQT_SIGNAL(hidden()), this, TQT_SIGNAL(diconnectedMessageDisplayed())); } void TrayIcon::setDesktopControlSetting(bool b) { @@ -122,7 +122,7 @@ void TrayIcon::setDesktopControlSetting(bool b) { enableControlAction->setChecked(b); } -void TrayIcon::mousePressEvent(QMouseEvent *e) +void TrayIcon::mousePressEvent(TQMouseEvent *e) { if (!rect().contains(e->pos())) return; diff --git a/krfb/krfb/trayicon.h b/krfb/krfb/trayicon.h index 4e586efa..ea4e7132 100644 --- a/krfb/krfb/trayicon.h +++ b/krfb/krfb/trayicon.h @@ -20,7 +20,7 @@ #include "configuration.h" -#include +#include #include #include #include @@ -31,10 +31,10 @@ class KDialog; class KPassivePopup2 : public KPassivePopup { Q_OBJECT public: - KPassivePopup2(QWidget *parent); - static KPassivePopup2 *message( const QString &caption, const QString &text, - const QPixmap &icon, - QWidget *parent); + KPassivePopup2(TQWidget *parent); + static KPassivePopup2 *message( const TQString &caption, const TQString &text, + const TQPixmap &icon, + TQWidget *parent); signals: void hidden(); @@ -43,7 +43,7 @@ protected: /** * Reimplemented to detect hide events. */ - virtual void hideEvent( QHideEvent *e ); + virtual void hideEvent( TQHideEvent *e ); }; /** @@ -64,12 +64,12 @@ signals: public slots: void prepareQuit(); - void showConnectedMessage(QString host); + void showConnectedMessage(TQString host); void showDisconnectedMessage(); void setDesktopControlSetting(bool); protected: - void mousePressEvent(QMouseEvent *e); + void mousePressEvent(TQMouseEvent *e); private: diff --git a/krfb/krfb/xupdatescanner.cc b/krfb/krfb/xupdatescanner.cc index b2cd4f85..52519475 100644 --- a/krfb/krfb/xupdatescanner.cc +++ b/krfb/krfb/xupdatescanner.cc @@ -356,7 +356,7 @@ static void printStatistics(Hint &hint) { } void XUpdateScanner::flushHint(int x, int y, int &x0, - Hint &hint, QPtrList &hintList) + Hint &hint, TQPtrList &hintList) { if (x0 < 0) return; @@ -371,7 +371,7 @@ void XUpdateScanner::flushHint(int x, int y, int &x0, hintList.append(new Hint(hint)); } -void XUpdateScanner::createHints(QPtrList &hintList) +void XUpdateScanner::createHints(TQPtrList &hintList) { Hint hint; int x0 = -1; @@ -441,7 +441,7 @@ void XUpdateScanner::testScanline(int y, bool rememberHits) { recentHitScanlines[MAX_RECENT_HITS-1] = y; } -void XUpdateScanner::searchUpdates(QPtrList &hintList, int ptrY) +void XUpdateScanner::searchUpdates(TQPtrList &hintList, int ptrY) { count++; count %= SCANLINES; diff --git a/krfb/krfb/xupdatescanner.h b/krfb/krfb/xupdatescanner.h index 00cbec82..fdd02e30 100644 --- a/krfb/krfb/xupdatescanner.h +++ b/krfb/krfb/xupdatescanner.h @@ -21,7 +21,7 @@ #ifndef _hexonet_rfb_XUpdateScanner_h_ #define _hexonet_rfb_XUpdateScanner_h_ -#include +#include #include #include @@ -76,15 +76,15 @@ class XUpdateScanner // hitList: returns list of changes // ptrY: ptrY: position of the cursor - void searchUpdates( QPtrList &hintList, int ptrY); + void searchUpdates( TQPtrList &hintList, int ptrY); private: void testScanline(int y, bool rememberHits); bool copyTile(int x, int y, int tx, int ty); void copyAllTiles(); void flushHint(int x, int y, int &x0, Hint &hint, - QPtrList &hintList); - void createHints(QPtrList &hintList); + TQPtrList &hintList); + void createHints(TQPtrList &hintList); void addTileToHint(int x, int y, int th, Hint &hint); void createHintFromTile(int x, int y, int th, Hint &hint); diff --git a/krfb/libvncserver/main.c b/krfb/libvncserver/main.c index 207e512d..5b318b8b 100644 --- a/krfb/libvncserver/main.c +++ b/krfb/libvncserver/main.c @@ -150,7 +150,7 @@ void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,in } else { sraRgnOr(cl->modifiedRegion,copyRegion); } - TSIGNAL(cl->updateCond); + TQT_SIGNAL(cl->updateCond); UNLOCK(cl->updateMutex); } @@ -208,7 +208,7 @@ void rfbMarkRegionAsModified(rfbScreenInfoPtr rfbScreen,sraRegionPtr modRegion) while((cl=rfbClientIteratorNext(iterator))) { LOCK(cl->updateMutex); sraRgnOr(cl->modifiedRegion,modRegion); - TSIGNAL(cl->updateCond); + TQT_SIGNAL(cl->updateCond); UNLOCK(cl->updateMutex); } @@ -308,7 +308,7 @@ clientInput(void *data) /* Get rid of the output thread. */ LOCK(cl->updateMutex); - TSIGNAL(cl->updateCond); + TQT_SIGNAL(cl->updateCond); UNLOCK(cl->updateMutex); IF_PTHREADS(pthread_join(output_thread, NULL)); diff --git a/krfb/libvncserver/rfb.h b/krfb/libvncserver/rfb.h index 1d62aca5..7f613300 100644 --- a/krfb/libvncserver/rfb.h +++ b/krfb/libvncserver/rfb.h @@ -144,7 +144,7 @@ typedef unsigned long KeySym; #define MUTEX(mutex) int mutex #define INIT_MUTEX(mutex) fprintf(stderr,"%s:%d INIT_MUTEX(%s,0x%x)\n",__FILE__,__LINE__,#mutex,&(mutex)) #define TINI_MUTEX(mutex) fprintf(stderr,"%s:%d TINI_MUTEX(%s)\n",__FILE__,__LINE__,#mutex) -#define SIGNAL(cond) fprintf(stderr,"%s:%d SIGNAL(%s)\n",__FILE__,__LINE__,#cond) +#define VSIGNAL(cond) fprintf(stderr,"%s:%d VSIGNAL(%s)\n",__FILE__,__LINE__,#cond) #define WAIT(cond,mutex) /* fprintf(stderr,"%s:%d WAIT(%s,%s)\n",__FILE__,__LINE__,#cond,#mutex) */ #define COND(cond) #define INIT_COND(cond) fprintf(stderr,"%s:%d INIT_COND(%s)\n",__FILE__,__LINE__,#cond) @@ -156,7 +156,7 @@ typedef unsigned long KeySym; #define MUTEX(mutex) pthread_mutex_t (mutex) #define INIT_MUTEX(mutex) pthread_mutex_init(&(mutex),NULL) #define TINI_MUTEX(mutex) pthread_mutex_destroy(&(mutex)) -#define TSIGNAL(cond) pthread_cond_signal(&(cond)) +#define VSIGNAL(cond) pthread_cond_signal(&(cond)) #define WAIT(cond,mutex) pthread_cond_wait(&(cond),&(mutex)) #define TIMEDWAIT(cond,mutex,t) {struct timeval tv;\ tv.tv_sec = (t) / 1000;\ @@ -173,7 +173,7 @@ typedef unsigned long KeySym; #define MUTEX(mutex) #define INIT_MUTEX(mutex) #define TINI_MUTEX(mutex) -#define TSIGNAL(cond) +#define VSIGNAL(cond) #define WAIT(cond,mutex) this_is_unsupported #define COND(cond) #define INIT_COND(cond) diff --git a/krfb/libvncserver/rfbserver.c b/krfb/libvncserver/rfbserver.c index 66cc4ee3..baf21bb1 100644 --- a/krfb/libvncserver/rfbserver.c +++ b/krfb/libvncserver/rfbserver.c @@ -71,7 +71,7 @@ void rfbDecrClientRef(rfbClientPtr cl) LOCK(cl->refCountMutex); cl->refCount--; if(cl->refCount<=0) /* just to be sure also < 0 */ - TSIGNAL(cl->deleteCond); + TQT_SIGNAL(cl->deleteCond); UNLOCK(cl->refCountMutex); } #else @@ -837,7 +837,7 @@ rfbProcessClientNormalMessage(cl) sraRgnOr(cl->modifiedRegion,tmpRegion); sraRgnSubtract(cl->copyRegion,tmpRegion); } - TSIGNAL(cl->updateCond); + TQT_SIGNAL(cl->updateCond); UNLOCK(cl->updateMutex); sraRgnDestroy(tmpRegion); diff --git a/krfb/libvncserver/sockets.c b/krfb/libvncserver/sockets.c index 68025b3d..c375e928 100644 --- a/krfb/libvncserver/sockets.c +++ b/krfb/libvncserver/sockets.c @@ -318,7 +318,7 @@ rfbCloseClient(cl) close(cl->sock); cl->sock = -1; } - TSIGNAL(cl->updateCond); + TQT_SIGNAL(cl->updateCond); UNLOCK(cl->updateMutex); } diff --git a/krfb/srvloc/kinetinterface.cpp b/krfb/srvloc/kinetinterface.cpp index 0599dfa7..d1f45652 100644 --- a/krfb/srvloc/kinetinterface.cpp +++ b/krfb/srvloc/kinetinterface.cpp @@ -30,7 +30,7 @@ class KInetInterfacePrivate { public: - QString name; + TQString name; int flags; KInetSocketAddress *address; KInetSocketAddress *netmask; @@ -45,7 +45,7 @@ public: destination(0) { } - KInetInterfacePrivate(const QString _name, + KInetInterfacePrivate(const TQString _name, int _flags, KInetSocketAddress *_address, KInetSocketAddress *_netmask, @@ -99,7 +99,7 @@ KInetInterface::KInetInterface() : d(0) { } -KInetInterface::KInetInterface(const QString &_name, +KInetInterface::KInetInterface(const TQString &_name, int _flags, KInetSocketAddress *_address, KInetSocketAddress *_netmask, @@ -143,11 +143,11 @@ bool KInetInterface::isValid() const { return d == 0; } -QString KInetInterface::displayName() const { +TQString KInetInterface::displayName() const { return d->name; } -QString KInetInterface::name() const { +TQString KInetInterface::name() const { return d->name; } @@ -172,13 +172,13 @@ KInetSocketAddress *KInetInterface::destinationAddress() const { } KInetSocketAddress *KInetInterface::getPublicInetAddress() { - QValueVector v = getAllInterfaces(true); + TQValueVector v = getAllInterfaces(true); // TODO: first step: take the default route interface // try to find point-2-point interface, because it may be // a dial-up connection. Take it. - QValueVector::const_iterator it = v.begin(); + TQValueVector::const_iterator it = v.begin(); while (it != v.end()) { if (((*it).flags() & (PointToPoint | Up | Running)) && (!((*it).flags() & Loopback)) && @@ -247,10 +247,10 @@ namespace { } } -QValueVector KInetInterface::getAllInterfaces(bool includeLoopback) { +TQValueVector KInetInterface::getAllInterfaces(bool includeLoopback) { struct kde_ifaddrs *ads; struct kde_ifaddrs *a; - QValueVector r; + TQValueVector r; if (kde_getifaddrs(&ads)) return r; @@ -260,7 +260,7 @@ QValueVector KInetInterface::getAllInterfaces(bool includeLoopba a = a->ifa_next; continue; } - r.push_back(KInetInterface(QString::fromUtf8(a->ifa_name), + r.push_back(KInetInterface(TQString::fromUtf8(a->ifa_name), convertFlags(a->ifa_flags), createAddress(a->ifa_addr), createAddress(a->ifa_netmask), diff --git a/krfb/srvloc/kinetinterface.h b/krfb/srvloc/kinetinterface.h index fe3899cb..e3f0328b 100644 --- a/krfb/srvloc/kinetinterface.h +++ b/krfb/srvloc/kinetinterface.h @@ -22,9 +22,9 @@ #ifndef KINETINTERFACE_H #define KINETINTERFACE_H -#include -#include -#include +#include +#include +#include class KInetInterfacePrivate; @@ -48,7 +48,7 @@ class KInetSocketAddress; */ class KInetInterface { private: - KInetInterface(const QString &name, + KInetInterface(const TQString &name, int flags, KInetSocketAddress *address, KInetSocketAddress *netmask, @@ -93,14 +93,14 @@ public: * @return the display name of the interface * @see name() */ - QString displayName() const; + TQString displayName() const; /** * Returns the name of the interface, e.g. 'eth0'. * @return the name of the interface * @see displayName() */ - QString name() const; + TQString name() const; /** * Flags describing the interface. These flags @@ -177,7 +177,7 @@ public: * name * @return the list of IP addresses */ - static QValueVector getAllInterfaces(bool includeLoopback = false); + static TQValueVector getAllInterfaces(bool includeLoopback = false); private: KInetInterfacePrivate* d; diff --git a/krfb/srvloc/kinetinterfacewatcher.cpp b/krfb/srvloc/kinetinterfacewatcher.cpp index 02f21c6c..1e0fa8e6 100644 --- a/krfb/srvloc/kinetinterfacewatcher.cpp +++ b/krfb/srvloc/kinetinterfacewatcher.cpp @@ -25,11 +25,11 @@ class KInetInterfaceWatcherPrivate { public: - QString interface; + TQString interface; int minInterval; // not used yet, but my be when a daemon watches - KInetInterfaceWatcherPrivate(const QString &iface, + KInetInterfaceWatcherPrivate(const TQString &iface, int minIntv) : interface(iface), minInterval(minIntv) { @@ -39,17 +39,17 @@ public: /* * or all network interfaces. * @param interface the name of the interface to watch (e.g.'eth0') - * or QString::null to watch all interfaces + * or TQString::null to watch all interfaces * @param minInterval the minimum interval between two checks in * seconds. Be careful not to check too often, to * avoid unneccessary wasting of CPU time */ -KInetInterfaceWatcher::KInetInterfaceWatcher(const QString &interface, +KInetInterfaceWatcher::KInetInterfaceWatcher(const TQString &interface, int minInterval) { d = new KInetInterfaceWatcherPrivate(interface, minInterval); } -QString KInetInterfaceWatcher::interface() const { +TQString KInetInterfaceWatcher::interface() const { return d->interface; } diff --git a/krfb/srvloc/kinetinterfacewatcher.h b/krfb/srvloc/kinetinterfacewatcher.h index 399aa3fc..75d72ef8 100644 --- a/krfb/srvloc/kinetinterfacewatcher.h +++ b/krfb/srvloc/kinetinterfacewatcher.h @@ -23,10 +23,10 @@ #define KINETINTERFACEWATCHER_H #include -#include -#include -#include -#include +#include +#include +#include +#include class KInetInterfaceWatcherPrivate; @@ -43,7 +43,7 @@ class KInetInterfaceWatcherPrivate; * @see KInetInterface * @since 3.2 */ -class KInetInterfaceWatcher : public QObject { +class KInetInterfaceWatcher : public TQObject { Q_OBJECT public: /** @@ -51,34 +51,34 @@ public: * you must @ref start() it. * * @param interface the name of the interface to watch (e.g.'eth0') - * or QString::null to watch all interfaces + * or TQString::null to watch all interfaces * @param minInterval the minimum interval between two checks in * seconds. Be careful not to check too often, to * avoid unneccessary wasting of CPU time */ - KInetInterfaceWatcher(const QString &interface = QString::null, + KInetInterfaceWatcher(const TQString &interface = TQString::null, int minInterval = 60); /** * Returns the name of the interface that is being watched. - * @return the name of the interface, or QString::null if all + * @return the name of the interface, or TQString::null if all * interfaces are watched */ - QString interface() const; + TQString interface() const; /** * Starts the KInetInterfaceWatcher. It watches either one * or all network interfaces. When one of them changed. * it emits a @ref changed() signal. * @param interface the name of the interface to watch (e.g.'eth0') - * or QString::null to watch all interfaces + * or TQString::null to watch all interfaces * @param minInterval the minimum interval between two checks in * seconds. Be careful not to check too often, to * avoid unneccessary wasting of CPU time * @see changed() * @see stop() */ - void start(const QString &interface = QString::null, + void start(const TQString &interface = TQString::null, int minInterval = 60); /** @@ -109,11 +109,11 @@ signals: * address has changed. * * @param interfaceName the name of the interface that is watched, - * by the emitter, or QString::null if all + * by the emitter, or TQString::null if all * interfaces are being watched * @see start() */ - void changed(QString interfaceName); + void changed(TQString interfaceName); private: KInetInterfaceWatcherPrivate* d; diff --git a/krfb/srvloc/kserviceregistry.cpp b/krfb/srvloc/kserviceregistry.cpp index 49e3de15..f8ab6b51 100644 --- a/krfb/srvloc/kserviceregistry.cpp +++ b/krfb/srvloc/kserviceregistry.cpp @@ -31,14 +31,14 @@ class KServiceRegistryPrivate { public: - KServiceRegistryPrivate(const QString &lang) : + KServiceRegistryPrivate(const TQString &lang) : m_opened(false), m_lang(lang) { } bool ensureOpen(); bool m_opened; - QString m_lang; + TQString m_lang; SLPHandle m_handle; friend void KServiceRegistryRegReport(SLPHandle slp, @@ -57,7 +57,7 @@ void KServiceRegistryRegReport(SLPHandle, } -KServiceRegistry::KServiceRegistry(const QString &lang) { +KServiceRegistry::KServiceRegistry(const TQString &lang) { d = new KServiceRegistryPrivate(lang); } @@ -86,8 +86,8 @@ bool KServiceRegistry::available() { return d->ensureOpen(); } -bool KServiceRegistry::registerService(const QString &serviceURL, - QString attributes, +bool KServiceRegistry::registerService(const TQString &serviceURL, + TQString attributes, unsigned short lifetime) { if (!d->ensureOpen()) return false; @@ -108,24 +108,24 @@ bool KServiceRegistry::registerService(const QString &serviceURL, return d->m_cbSuccess; } -bool KServiceRegistry::registerService(const QString &serviceURL, - QMap attributes, +bool KServiceRegistry::registerService(const TQString &serviceURL, + TQMap attributes, unsigned short lifetime) { if (!d->ensureOpen()) return false; // TODO: encode strings in map? - QString s; - QMap::iterator it = attributes.begin(); + TQString s; + TQMap::iterator it = attributes.begin(); while (it != attributes.end()) { if (!s.isEmpty()) s += ","; - s += QString("(%1=%2)").arg(it.key()).arg(it.data()); + s += TQString("(%1=%2)").arg(it.key()).arg(it.data()); it++; } return registerService(serviceURL, s, lifetime); } -void KServiceRegistry::unregisterService(const QString &serviceURL) { +void KServiceRegistry::unregisterService(const TQString &serviceURL) { if (!d->m_opened) return; SLPDereg(d->m_handle, serviceURL.latin1(), @@ -133,19 +133,19 @@ void KServiceRegistry::unregisterService(const QString &serviceURL) { d); } -QString KServiceRegistry::encodeAttributeValue(const QString &value) { +TQString KServiceRegistry::encodeAttributeValue(const TQString &value) { char *n; if (SLPEscape(value.latin1(), &n, SLP_TRUE) == SLP_OK) { - QString r(n); + TQString r(n); SLPFree(n); return r; } - return QString::null; + return TQString::null; } #else -KServiceRegistry::KServiceRegistry(const QString &lang) : +KServiceRegistry::KServiceRegistry(const TQString &lang) : d(0) { } @@ -156,24 +156,24 @@ bool KServiceRegistry::available() { return false; } -bool KServiceRegistry::registerService(const QString &, QString, unsigned short ) { +bool KServiceRegistry::registerService(const TQString &, TQString, unsigned short ) { return false; } -bool KServiceRegistry::registerService(const QString &, QMap, unsigned short) { +bool KServiceRegistry::registerService(const TQString &, TQMap, unsigned short) { return false; } -void KServiceRegistry::unregisterService(const QString &) { +void KServiceRegistry::unregisterService(const TQString &) { } -QString KServiceRegistry::encodeAttributeValue(const QString &value) { +TQString KServiceRegistry::encodeAttributeValue(const TQString &value) { return value; } #endif -QString KServiceRegistry::createCommaList(const QStringList &values) { +TQString KServiceRegistry::createCommaList(const TQStringList &values) { return values.join(","); } diff --git a/krfb/srvloc/kserviceregistry.h b/krfb/srvloc/kserviceregistry.h index a1c439ae..8cd965e6 100644 --- a/krfb/srvloc/kserviceregistry.h +++ b/krfb/srvloc/kserviceregistry.h @@ -25,9 +25,9 @@ #ifndef __KSERVICEREGISTRY_H #define __KSERVICEREGISTRY_H -#include -#include -#include +#include +#include +#include class KServiceRegistryPrivate; @@ -78,7 +78,7 @@ class KServiceRegistryPrivate; *
      *   KServiceRegistry ksr;
      *   KInetAddress kia = KInetAddress->getLocalAddress();
    - *   ksr.registerService(QString("service:remotedesktop.kde:vnc://%1:0").arg(kia->nodeName()),
    + *   ksr.registerService(TQString("service:remotedesktop.kde:vnc://%1:0").arg(kia->nodeName()),
      *                       "(type=shared)");
      *   delete kia;
      * 
    @@ -91,10 +91,10 @@ class KServiceRegistry { /** * Creates a new service registration instance for the given * language. - * @param lang the language as two letter code, or QString::null for the + * @param lang the language as two letter code, or TQString::null for the * system default */ - KServiceRegistry(const QString &lang = QString::null); + KServiceRegistry(const TQString &lang = TQString::null); virtual ~KServiceRegistry(); /** @@ -110,17 +110,17 @@ class KServiceRegistry { * @param map the items of this list will be converted * @return the comma-separated list */ - static QString createCommaList(const QStringList &values); + static TQString createCommaList(const TQStringList &values); /** - * Encodes an QString for use as a attribute value. This will escape + * Encodes an TQString for use as a attribute value. This will escape * all characters that are not allowed. This method is only available * when a SLP library is available, otherwise it will return the * given value. * @param value the value string to encode * @return the encoded value string */ - static QString encodeAttributeValue(const QString &value); + static TQString encodeAttributeValue(const TQString &value); /** * Registers the given service. @@ -132,8 +132,8 @@ class KServiceRegistry { * @return true if successful, false otherwise. False usually means that no * SA daemon (slpd) is running. */ - bool registerService(const QString &serviceURL, - QString attributes = QString::null, + bool registerService(const TQString &serviceURL, + TQString attributes = TQString::null, unsigned short lifetime = 0); /** @@ -144,15 +144,15 @@ class KServiceRegistry { * @return true if successful, false otherwise. False usually means that no * SA daemon is running (slpd). */ - bool registerService(const QString &serviceURL, - QMap attributes, + bool registerService(const TQString &serviceURL, + TQMap attributes, unsigned short lifetime = 0); /** * Unregisters the given service. * @param serviceURL the service URL to unregister */ - void unregisterService(const QString &serviceURL); + void unregisterService(const TQString &serviceURL); private: KServiceRegistryPrivate *d; diff --git a/krfb/srvloc/uuid.cpp b/krfb/srvloc/uuid.cpp index 61f78d86..931f0aa8 100644 --- a/krfb/srvloc/uuid.cpp +++ b/krfb/srvloc/uuid.cpp @@ -235,11 +235,11 @@ static void uuid_unparse(const uuid_t uu, char *out) uuid.node[3], uuid.node[4], uuid.node[5]); } -QString createUUID() { +TQString createUUID() { char s[37]; uuid_t uu; uuid_generate_time(uu); uuid_unparse(uu, s); - return QString(s); + return TQString(s); } diff --git a/krfb/srvloc/uuid.h b/krfb/srvloc/uuid.h index d63f2cf5..eed91de5 100644 --- a/krfb/srvloc/uuid.h +++ b/krfb/srvloc/uuid.h @@ -22,8 +22,8 @@ #ifndef UUID_H #define UUID_H -#include +#include -QString createUUID(); +TQString createUUID(); #endif /* UUID_H */ diff --git a/ksirc/FilterRuleEditor.cpp b/ksirc/FilterRuleEditor.cpp index 08ac6584..a94c5d6d 100644 --- a/ksirc/FilterRuleEditor.cpp +++ b/ksirc/FilterRuleEditor.cpp @@ -9,10 +9,10 @@ #include "FilterRuleEditor.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -23,7 +23,7 @@ FilterRuleEditor::FilterRuleEditor ( - QWidget* parent, + TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "Edit Filter Rules" ), @@ -37,20 +37,20 @@ FilterRuleEditor::FilterRuleEditor newHighlight(0); // ### split "OkPressed()" into 2 slots - connect( filter->ModifyButton, SIGNAL(clicked()), SLOT(OkPressed()) ); - connect( filter->InsertButton, SIGNAL(clicked()), SLOT(OkPressed()) ); + connect( filter->ModifyButton, TQT_SIGNAL(clicked()), TQT_SLOT(OkPressed()) ); + connect( filter->InsertButton, TQT_SIGNAL(clicked()), TQT_SLOT(OkPressed()) ); - connect( filter->NewButton, SIGNAL(clicked()), SLOT(newRule()) ); - connect( filter->DeleteButton, SIGNAL(clicked()), SLOT(deleteRule()) ); + connect( filter->NewButton, TQT_SIGNAL(clicked()), TQT_SLOT(newRule()) ); + connect( filter->DeleteButton, TQT_SIGNAL(clicked()), TQT_SLOT(deleteRule()) ); - connect( filter->UpButton, SIGNAL(clicked()), SLOT(raiseRule()) ); - connect( filter->DownButton, SIGNAL(clicked()), SLOT(lowerRule()) ); + connect( filter->UpButton, TQT_SIGNAL(clicked()), TQT_SLOT(raiseRule()) ); + connect( filter->DownButton, TQT_SIGNAL(clicked()), TQT_SLOT(lowerRule()) ); - connect( filter->RuleList, SIGNAL(highlighted(int)), SLOT(newHighlight(int)) ); - connect( filter->RuleList, SIGNAL(selected(int)), SLOT(newHighlight(int)) ); + connect( filter->RuleList, TQT_SIGNAL(highlighted(int)), TQT_SLOT(newHighlight(int)) ); + connect( filter->RuleList, TQT_SIGNAL(selected(int)), TQT_SLOT(newHighlight(int)) ); - filter->RuleList->setHScrollBarMode( QListBox::AlwaysOff ); + filter->RuleList->setHScrollBarMode( TQListBox::AlwaysOff ); filter->RuleList->setMultiSelection( FALSE ); filter->DownButton->setPixmap( BarIcon( "down", KIcon::SizeSmall ) ); @@ -64,10 +64,10 @@ FilterRuleEditor::~FilterRuleEditor() void FilterRuleEditor::newRule() { - filter->LineTitle->setText( QString::null ); - filter->LineSearch->setText( QString::null ); - filter->LineFrom->setText( QString::null ); - filter->LineTo->setText( QString::null ); + filter->LineTitle->setText( TQString::null ); + filter->LineSearch->setText( TQString::null ); + filter->LineFrom->setText( TQString::null ); + filter->LineTo->setText( TQString::null ); filter->LineTitle->setFocus(); filter->InsertButton->setEnabled( true ); @@ -92,10 +92,10 @@ void FilterRuleEditor::OkPressed() return; } - QString name = filter->LineTitle->text(); - QString search = filter->LineSearch->text(); - QString from = filter->LineFrom->text(); - QString to = filter->LineTo->text(); + TQString name = filter->LineTitle->text(); + TQString search = filter->LineSearch->text(); + TQString from = filter->LineFrom->text(); + TQString to = filter->LineTo->text(); if( name.isEmpty() || search.isEmpty() || from.isEmpty() || to.isEmpty() ){ KMessageBox::error(this, i18n("Cannot create the rule since not\n" @@ -104,7 +104,7 @@ void FilterRuleEditor::OkPressed() } else{ kConfig->setGroup("FilterRules"); - QString key; + TQString key; key.sprintf("name-%d", number); kConfig->writeEntry(key, convertSpecial(name)); key.sprintf("search-%d", number); @@ -126,7 +126,7 @@ void FilterRuleEditor::updateListBox(int citem ) filter->RuleList->clear(); for(; number > 0; number--){ - QString key; + TQString key; key.sprintf("name-%d", number); filter->RuleList->insertItem(kConfig->readEntry(key), 0); } @@ -144,8 +144,8 @@ void FilterRuleEditor::moveRule(int from, int to) { KConfig *kConfig = kapp->config(); kConfig->setGroup("FilterRules"); - QString src; - QString dest; + TQString src; + TQString dest; src.sprintf("name-%d", from); dest.sprintf("name-%d", to); kConfig->writeEntry(dest, kConfig->readEntry(src)); @@ -187,7 +187,7 @@ void FilterRuleEditor::newHighlight(int i) i++; KConfig *kConfig = kapp->config(); kConfig->setGroup("FilterRules"); - QString key; + TQString key; key.sprintf("name-%d", i); filter->LineTitle->setText(convertSpecialBack(kConfig->readEntry(key))); key.sprintf("search-%d", i); @@ -226,15 +226,15 @@ void FilterRuleEditor::lowerRule() } } -QString FilterRuleEditor::convertSpecial(QString str) +TQString FilterRuleEditor::convertSpecial(TQString str) { - str.replace(QRegExp("\\$"), "$$"); + str.replace(TQRegExp("\\$"), "$$"); return str; } -QString FilterRuleEditor::convertSpecialBack(QString str) +TQString FilterRuleEditor::convertSpecialBack(TQString str) { - str.replace(QRegExp("\\$\\$"), "$"); + str.replace(TQRegExp("\\$\\$"), "$"); return str; } diff --git a/ksirc/FilterRuleEditor.h b/ksirc/FilterRuleEditor.h index c9cf0437..b8bf1a0e 100644 --- a/ksirc/FilterRuleEditor.h +++ b/ksirc/FilterRuleEditor.h @@ -10,7 +10,7 @@ #ifndef FilterRuleEditor_h #define FilterRuleEditor_h -#include +#include #include @@ -24,7 +24,7 @@ public: FilterRuleEditor ( - QWidget* parent = NULL, + TQWidget* parent = NULL, const char* name = NULL ); @@ -42,8 +42,8 @@ protected slots: protected: void updateListBox(int citem = 0); void moveRule(int, int); - QString convertSpecial(QString); - QString convertSpecialBack(QString); + TQString convertSpecial(TQString); + TQString convertSpecialBack(TQString); FilterRuleWidget *filter; }; diff --git a/ksirc/KSOpenkSirc/enter_combo.cpp b/ksirc/KSOpenkSirc/enter_combo.cpp index 3394423d..197f8f21 100644 --- a/ksirc/KSOpenkSirc/enter_combo.cpp +++ b/ksirc/KSOpenkSirc/enter_combo.cpp @@ -1,10 +1,10 @@ #include "enter_combo.h" -void EnterCombo::keyPressEvent( QKeyEvent *e ){ +void EnterCombo::keyPressEvent( TQKeyEvent *e ){ if(e->key() == Key_Return || e->key() == Key_Enter) emit(enterPressed()); else - QComboBox::keyPressEvent(e); + TQComboBox::keyPressEvent(e); } #include "enter_combo.moc" diff --git a/ksirc/KSOpenkSirc/enter_combo.h b/ksirc/KSOpenkSirc/enter_combo.h index f0752a2d..7af88d8f 100644 --- a/ksirc/KSOpenkSirc/enter_combo.h +++ b/ksirc/KSOpenkSirc/enter_combo.h @@ -1,29 +1,29 @@ #ifndef ENTER_COMBO_H #define ENTER_COMBO_H -#include -#include -#include -#include +#include +#include +#include +#include #undef KeyPress // X headers... -class EnterCombo : public QComboBox { +class EnterCombo : public TQComboBox { Q_OBJECT public: - EnterCombo ( QWidget * parent=0, const char * name=0 ) - : QComboBox(TRUE, parent, name) + EnterCombo ( TQWidget * parent=0, const char * name=0 ) + : TQComboBox(TRUE, parent, name) { } - EnterCombo ( bool rw, QWidget * parent=0, const char * name=0 ) - : QComboBox(rw, parent, name) + EnterCombo ( bool rw, TQWidget * parent=0, const char * name=0 ) + : TQComboBox(rw, parent, name) { - QKeyEvent ke(QEvent::KeyPress, SHIFT|Key_Home, 0, 0); + TQKeyEvent ke(TQEvent::KeyPress, SHIFT|Key_Home, 0, 0); keyPressEvent(&ke); } virtual void show(){ - QComboBox::show(); + TQComboBox::show(); lineEdit()->selectAll(); } @@ -31,7 +31,7 @@ signals: void enterPressed(); protected: - virtual void keyPressEvent( QKeyEvent *e ); + virtual void keyPressEvent( TQKeyEvent *e ); }; #endif diff --git a/ksirc/KSOpenkSirc/open_ksirc.cpp b/ksirc/KSOpenkSirc/open_ksirc.cpp index 5a4a4799..d3ff7488 100644 --- a/ksirc/KSOpenkSirc/open_ksirc.cpp +++ b/ksirc/KSOpenkSirc/open_ksirc.cpp @@ -12,11 +12,11 @@ #include "serverFileParser.h" #include "enter_combo.h" #include "../ksircserver.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -28,14 +28,14 @@ #include #include -QPtrList Groups; +TQPtrList Groups; #undef Inherited #define Inherited open_ksircData open_ksirc::open_ksirc ( - QWidget* parent, + TQWidget* parent, const char* name ) : @@ -47,7 +47,7 @@ open_ksirc::open_ksirc // if it don't exist use $KDEDIR/share/apps/ksirc/servers.txt // changes are written to ~/.kde/share/apps/ksirc/servers.txt - QString filename = locate("appdata", "servers.txt"); + TQString filename = locate("appdata", "servers.txt"); serverFileParser::readDatafile( filename ); Groups.setAutoDelete(TRUE); @@ -66,29 +66,29 @@ open_ksirc::open_ksirc KConfig *conf = kapp->config(); conf->setGroup("ServerList"); CheckB_StorePassword->setChecked( conf->readBoolEntry("StorePasswords") ); - QStringList recent = conf->readListEntry("RecentServers"); - for(QStringList::ConstIterator it = recent.begin(); it != recent.end(); ++it){ + TQStringList recent = conf->readListEntry("RecentServers"); + for(TQStringList::ConstIterator it = recent.begin(); it != recent.end(); ++it){ if(conf->hasGroup("RecentServer-" + *it)){ conf->setGroup("RecentServer-" + *it); - QPtrList rp; + TQPtrList rp; rp.inSort(new port(conf->readEntry("Port", "6667"))); - QString password = decryptPassword(conf->readEntry("Password")); + TQString password = decryptPassword(conf->readEntry("Password")); bool ssl = conf->readBoolEntry("SSL"); Groups.insert(0, new Server(i18n("Recent"), *it, rp, i18n("Recent Server"), "", password, ssl)); } else { - QStringList info = QStringList::split(":", *it); + TQStringList info = TQStringList::split(":", *it); if (info.isEmpty()) continue; - QString name = info[0]; - QPtrList rp; + TQString name = info[0]; + TQPtrList rp; if (info.count() > 1) rp.inSort(new port(info[1])); else rp.inSort(new port("6667")); - QString password; + TQString password; if (info.count() > 2) password = decryptPassword(info[2]); @@ -107,24 +107,24 @@ open_ksirc::open_ksirc insertGroupList(); - QString blah = i18n("Recent"); + TQString blah = i18n("Recent"); setGroup(blah); - connect(ComboB_ServerGroup, SIGNAL(activated( const QString& )), - this, SLOT(setGroup( const QString& ))); - connect(ComboB_ServerName, SIGNAL(activated( const QString& )), - this, SLOT(setServer( const QString& ))); + connect(ComboB_ServerGroup, TQT_SIGNAL(activated( const TQString& )), + this, TQT_SLOT(setGroup( const TQString& ))); + connect(ComboB_ServerName, TQT_SIGNAL(activated( const TQString& )), + this, TQT_SLOT(setServer( const TQString& ))); - connect(PB_Connect, SIGNAL(clicked()), this, SLOT(clickConnect())); - connect(PB_Edit, SIGNAL(clicked()), this, SLOT(clickEdit())); - connect(PB_Cancel, SIGNAL(clicked()), this, SLOT(clickCancel())); + connect(PB_Connect, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickConnect())); + connect(PB_Edit, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickEdit())); + connect(PB_Cancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(clickCancel())); PB_Connect->setDefault(TRUE); PB_Connect->setAutoDefault(TRUE); PB_Edit->setEnabled(false); // Not yet implemented. ComboB_ServerName->setFocus(); - connect(ComboB_ServerName, SIGNAL(enterPressed()), this, SLOT(clickConnect())); + connect(ComboB_ServerName, TQT_SIGNAL(enterPressed()), this, TQT_SLOT(clickConnect())); } // insert a sorted list of groups into ComboB_ServerGroup, note that @@ -133,7 +133,7 @@ open_ksirc::open_ksirc void open_ksirc::insertGroupList() { - QStrList tempgroups; + TQStrList tempgroups; Server *serv; for ( serv=Groups.first(); serv != 0; serv=Groups.next() ) { @@ -154,7 +154,7 @@ void open_ksirc::insertGroupList() void open_ksirc::insertServerList( const char * group ) { - QListBox *newListBox = new QListBox(); + TQListBox *newListBox = new TQListBox(); Server *serv; for ( serv=Groups.first(); serv != 0; serv=Groups.next() ) { @@ -174,11 +174,11 @@ void open_ksirc::insertServerList( const char * group ) // note that this only takes the first occurrance if there is two // entiies with the same server. -void open_ksirc::setServer( const QString &serveraddress ) +void open_ksirc::setServer( const TQString &serveraddress ) { - QListBox *newListBox = new QListBox(); + TQListBox *newListBox = new TQListBox(); Server *serv; - QPtrList portlist; + TQPtrList portlist; port *p; bool defaultport = FALSE; @@ -209,7 +209,7 @@ void open_ksirc::setServer( const QString &serveraddress ) // Sets the server description if the isn't one set it to "Not Available" -void open_ksirc::setServerDesc( QString description ) +void open_ksirc::setServerDesc( TQString description ) { if (description.isNull() || description.isEmpty()) { Label_ServerDesc->setText( i18n("Not available")); @@ -224,34 +224,34 @@ void open_ksirc::setServerDesc( QString description ) // and then each byte of the UTF-8 password is xored with the corresponding // byte of the random string. The returned value is a base64 encoding of // that random string followed by the scrambled password. -QString open_ksirc::encryptPassword( const QString &password ) +TQString open_ksirc::encryptPassword( const TQString &password ) { - QCString utf8 = password.utf8(); + TQCString utf8 = password.utf8(); // Can contain NULL bytes after XORing unsigned int utf8Length(utf8.length()); - QByteArray result(utf8Length << 1); + TQByteArray result(utf8Length << 1); memcpy(result.data(), kapp->randomString(utf8Length).latin1(), utf8Length); for (unsigned int i = 0; i < utf8Length; ++i) result[i + utf8Length] = utf8[i] ^ result[i]; - return QString::fromLatin1(KCodecs::base64Encode(result)); + return TQString::fromLatin1(KCodecs::base64Encode(result)); } -QString open_ksirc::decryptPassword( const QString &scrambled ) +TQString open_ksirc::decryptPassword( const TQString &scrambled ) { - QByteArray base64, orig; + TQByteArray base64, orig; base64.duplicate(scrambled.latin1(), scrambled.length()); KCodecs::base64Decode(base64, orig); - QCString result; + TQCString result; for (unsigned int i = 0; i < (orig.size() >> 1); ++i) result += orig[i] ^ orig[i + (orig.size() >> 1)]; - return QString::fromUtf8(result); + return TQString::fromUtf8(result); } -void open_ksirc::setGroup( const QString &group ) +void open_ksirc::setGroup( const TQString &group ) { insertServerList( group ); if (ComboB_ServerName->count() > 0) { - QString blah = QString(ComboB_ServerName->text( 0 )); + TQString blah = TQString(ComboB_ServerName->text( 0 )); setServer(blah); } else { setServerDesc( "" ); @@ -272,9 +272,9 @@ void open_ksirc::clickConnect() return; } - QString server; - QString port; - QString script; + TQString server; + TQString port; + TQString script; Server *serv; KConfig *conf = kapp->config(); @@ -296,7 +296,7 @@ void open_ksirc::clickConnect() if(port.isEmpty()) port = "6667"; - QString plain, scrambled; + TQString plain, scrambled; if (!LineE_Password->text().isEmpty()) { plain = LineE_Password->text(); @@ -306,9 +306,9 @@ void open_ksirc::clickConnect() conf->setGroup("ServerList"); conf->writeEntry("StorePasswords", CheckB_StorePassword->isChecked()); - QStringList recent = conf->readListEntry("RecentServers"); + TQStringList recent = conf->readListEntry("RecentServers"); if(recent.contains(server)){ - QStringList::Iterator it = recent.find(server); + TQStringList::Iterator it = recent.find(server); recent.remove(it); } @@ -320,10 +320,10 @@ void open_ksirc::clickConnect() //scrambled is now "server:port" or "server:port:scrambledpass" if //a password was given and "store password" is checked - for (QStringList::Iterator it = recent.begin(); it != recent.end(); ) { + for (TQStringList::Iterator it = recent.begin(); it != recent.end(); ) { if ((*it).startsWith(server)) // ignore password { - QStringList::Iterator del = it++; + TQStringList::Iterator del = it++; recent.remove(del); } else @@ -362,7 +362,7 @@ void open_ksirc::clickEdit() // TODO open new server editor } -void open_ksirc::passwordChanged( const QString& password ) +void open_ksirc::passwordChanged( const TQString& password ) { CheckB_StorePassword->setEnabled( !password.isEmpty() ); } diff --git a/ksirc/KSOpenkSirc/open_ksirc.h b/ksirc/KSOpenkSirc/open_ksirc.h index 81145fca..29fb4f60 100644 --- a/ksirc/KSOpenkSirc/open_ksirc.h +++ b/ksirc/KSOpenkSirc/open_ksirc.h @@ -12,7 +12,7 @@ #include "open_ksircData.h" -#include +#include class KSircServer; @@ -24,26 +24,26 @@ public: open_ksirc ( - QWidget* parent = NULL, + TQWidget* parent = NULL, const char* name = NULL ); virtual ~open_ksirc(); protected slots: - void setGroup( const QString& ); - void setServer( const QString& ); + void setGroup( const TQString& ); + void setServer( const TQString& ); void clickConnect(); void clickCancel(); void clickEdit(); - void passwordChanged( const QString& ); + void passwordChanged( const TQString& ); private: void insertGroupList(); void insertServerList( const char * ); - void setServerDesc( QString ); - QString encryptPassword( const QString & ); - QString decryptPassword( const QString & ); + void setServerDesc( TQString ); + TQString encryptPassword( const TQString & ); + TQString decryptPassword( const TQString & ); signals: // void open_ksircprocess( const char *, int, const char * ); diff --git a/ksirc/KSOpenkSirc/serverDataType.h b/ksirc/KSOpenkSirc/serverDataType.h index 80b94e27..157be09e 100644 --- a/ksirc/KSOpenkSirc/serverDataType.h +++ b/ksirc/KSOpenkSirc/serverDataType.h @@ -1,18 +1,18 @@ #ifndef SERVERDATATYPE_H #define SERVERDATATYPE_H -#include -#include +#include +#include class port { public: - port( const QString &portnum ) { p=portnum; } - QString portnum() const { return p; } + port( const TQString &portnum ) { p=portnum; } + TQString portnum() const { return p; } private: - QString p; + TQString p; }; @@ -21,12 +21,12 @@ class Server { public: - Server( const QString &group, - const QString &server, - QPtrList ports, - const QString &serverdesc, - const QString &script, - const QString &password = QString::null, + Server( const TQString &group, + const TQString &server, + TQPtrList ports, + const TQString &serverdesc, + const TQString &script, + const TQString &password = TQString::null, bool dossl = false ) { g=group; s=server; p=ports; sd=serverdesc; sc=script; @@ -34,21 +34,21 @@ public: ssl = dossl; p.setAutoDelete(TRUE); } - QString group() const { return g; } - QString server() const { return s; } - QPtrList ports() const { return p; } - QString serverdesc() const { return sd; } - QString script() const { return sc; } - QString password() const { return pass; } + TQString group() const { return g; } + TQString server() const { return s; } + TQPtrList ports() const { return p; } + TQString serverdesc() const { return sd; } + TQString script() const { return sc; } + TQString password() const { return pass; } bool usessl() const { return ssl; } private: - QString g; - QString s; - QPtrList p; - QString sd; - QString sc; - QString pass; + TQString g; + TQString s; + TQPtrList p; + TQString sd; + TQString sc; + TQString pass; bool ssl; }; diff --git a/ksirc/KSOpenkSirc/serverFileParser.cpp b/ksirc/KSOpenkSirc/serverFileParser.cpp index 8e6ba80e..10960650 100644 --- a/ksirc/KSOpenkSirc/serverFileParser.cpp +++ b/ksirc/KSOpenkSirc/serverFileParser.cpp @@ -1,12 +1,12 @@ #include "serverFileParser.h" #include "serverDataType.h" -#include +#include #include #include #include -extern QPtrList Groups; +extern TQPtrList Groups; // Opens, reads and parses server information from a server file, // sets the information in the global variable and returns 1 if @@ -16,30 +16,30 @@ int serverFileParser::readDatafile( const char *fileName ) { Groups.setAutoDelete( TRUE ); Groups.clear(); - QFile serverFile( fileName ); + TQFile serverFile( fileName ); if ( !serverFile.open( IO_ReadOnly ) ) return -1; - QTextStream fileStream(&serverFile); + TQTextStream fileStream(&serverFile); // the file is layed out as follows: // service:servername:serveraddress:ports:script: // so we parse it this way while( !fileStream.eof() ) { - QString str = fileStream.readLine(); + TQString str = fileStream.readLine(); const char *strC = str.ascii(); char *token; char groupC[1024], servernameC[1024], serveraddressC[1024], portsC[1024]; int pos = 0; - QString group; - QString servername; - QString serveraddress; - QPtrList ports; - QString script; + TQString group; + TQString servername; + TQString serveraddress; + TQPtrList ports; + TQString script; - QString buf; - QString portbuff; + TQString buf; + TQString portbuff; pos = sscanf(strC, "%1023[^:]:%1024[^:]:%1023[^:]:%1023[^:]:", groupC, servernameC, serveraddressC, portsC); if(pos != 4){ @@ -109,6 +109,6 @@ int serverFileParser::readDatafile( const char *fileName ) int writeDataFile() { - QString filename(KGlobal::dirs()->saveLocation("appdata")+"servers.txt"); + TQString filename(KGlobal::dirs()->saveLocation("appdata")+"servers.txt"); return 1; } diff --git a/ksirc/KSOpenkSirc/serverFileParser.h b/ksirc/KSOpenkSirc/serverFileParser.h index f3fd67e1..f17884c5 100644 --- a/ksirc/KSOpenkSirc/serverFileParser.h +++ b/ksirc/KSOpenkSirc/serverFileParser.h @@ -1,7 +1,7 @@ #ifndef serverFileParser_included #define serverFileParser_included -#include +#include class serverFileParser { diff --git a/ksirc/KSPrefs/ksprefs.cpp b/ksirc/KSPrefs/ksprefs.cpp index 2bf97e84..40ccc56f 100644 --- a/ksirc/KSPrefs/ksprefs.cpp +++ b/ksirc/KSPrefs/ksprefs.cpp @@ -7,7 +7,7 @@ * * ***************************************************************************/ -#include +#include #include #include @@ -26,37 +26,37 @@ #include "page_looknfeel.h" #include "page_shortcuts.h" -KSPrefs::KSPrefs(QWidget * parent, const char * name): +KSPrefs::KSPrefs(TQWidget * parent, const char * name): KDialogBase(KDialogBase::IconList, i18n("Configure KSirc"), KDialogBase::Help | KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel | KDialogBase::Default, KDialogBase::Ok, parent, name) { setWFlags( getWFlags() | WDestructiveClose ); - QFrame *itemLooknFeel= addPage( i18n( "Look and Feel" ), i18n( "Controls how kSirc looks" ), BarIcon( "ksirc", KIcon::SizeMedium ) ); - QFrame *itemGeneral = addPage( i18n( "General" ), i18n( "General KSirc Settings" ), BarIcon( "ksirc", KIcon::SizeMedium ) ); - QFrame *itemStartup = addPage( i18n( "Startup" ), i18n( "KSirc Startup Settings" ), BarIcon( "gear", KIcon::SizeMedium ) ); - QFrame *itemColors = addPage( i18n( "Colors" ), i18n( "KSirc Color Settings" ), BarIcon( "colors", KIcon::SizeMedium ) ); - QFrame *itemIRCColors = addPage( i18n( "IRC Colors" ), i18n( "KSirc IRC Color Settings" ), BarIcon( "colors", KIcon::SizeMedium ) ); + TQFrame *itemLooknFeel= addPage( i18n( "Look and Feel" ), i18n( "Controls how kSirc looks" ), BarIcon( "ksirc", KIcon::SizeMedium ) ); + TQFrame *itemGeneral = addPage( i18n( "General" ), i18n( "General KSirc Settings" ), BarIcon( "ksirc", KIcon::SizeMedium ) ); + TQFrame *itemStartup = addPage( i18n( "Startup" ), i18n( "KSirc Startup Settings" ), BarIcon( "gear", KIcon::SizeMedium ) ); + TQFrame *itemColors = addPage( i18n( "Colors" ), i18n( "KSirc Color Settings" ), BarIcon( "colors", KIcon::SizeMedium ) ); + TQFrame *itemIRCColors = addPage( i18n( "IRC Colors" ), i18n( "KSirc IRC Color Settings" ), BarIcon( "colors", KIcon::SizeMedium ) ); - QFrame *itemRMBMenu = addPage( i18n( "User Menu" ), i18n( "User Menu Configuration" ), BarIcon( "", KIcon::SizeMedium ) ); - QFrame *itemServChan = addPage( i18n( "Server/Channel" ), i18n( "Server/Channel Configuration" ), BarIcon( "", KIcon::SizeMedium ) ); - QFrame *itemAutoConnect = addPage( i18n( "Auto Connect" ), i18n( "Auto Connect Configuration" ), BarIcon( "", KIcon::SizeMedium ) ); - QFrame *itemFont = addPage( i18n( "Fonts" ), i18n( "Font Settings" ), BarIcon( "fonts", KIcon::SizeMedium ) ); - QFrame *itemShortcuts = addPage( i18n( "Shortcuts" ), i18n( "Shortcut Configuration" ), BarIcon( "", KIcon::SizeMedium ) ); + TQFrame *itemRMBMenu = addPage( i18n( "User Menu" ), i18n( "User Menu Configuration" ), BarIcon( "", KIcon::SizeMedium ) ); + TQFrame *itemServChan = addPage( i18n( "Server/Channel" ), i18n( "Server/Channel Configuration" ), BarIcon( "", KIcon::SizeMedium ) ); + TQFrame *itemAutoConnect = addPage( i18n( "Auto Connect" ), i18n( "Auto Connect Configuration" ), BarIcon( "", KIcon::SizeMedium ) ); + TQFrame *itemFont = addPage( i18n( "Fonts" ), i18n( "Font Settings" ), BarIcon( "fonts", KIcon::SizeMedium ) ); + TQFrame *itemShortcuts = addPage( i18n( "Shortcuts" ), i18n( "Shortcut Configuration" ), BarIcon( "", KIcon::SizeMedium ) ); - QVBoxLayout *fontTopLayout = new QVBoxLayout( itemFont, 0, 6 ); + TQVBoxLayout *fontTopLayout = new TQVBoxLayout( itemFont, 0, 6 ); - QVBoxLayout *looknfeelTopLayout= new QVBoxLayout( itemLooknFeel, 0, 6 ); - QVBoxLayout *generalTopLayout = new QVBoxLayout( itemGeneral, 0, 6 ); - QVBoxLayout *startupTopLayout = new QVBoxLayout( itemStartup, 0, 6 ); - QVBoxLayout *colorsTopLayout = new QVBoxLayout( itemColors, 0, 6 ); - QVBoxLayout *ircColorsTopLayout = new QVBoxLayout( itemIRCColors, 0, 6 ); + TQVBoxLayout *looknfeelTopLayout= new TQVBoxLayout( itemLooknFeel, 0, 6 ); + TQVBoxLayout *generalTopLayout = new TQVBoxLayout( itemGeneral, 0, 6 ); + TQVBoxLayout *startupTopLayout = new TQVBoxLayout( itemStartup, 0, 6 ); + TQVBoxLayout *colorsTopLayout = new TQVBoxLayout( itemColors, 0, 6 ); + TQVBoxLayout *ircColorsTopLayout = new TQVBoxLayout( itemIRCColors, 0, 6 ); - QVBoxLayout *rmbMenuTopLayout = new QVBoxLayout( itemRMBMenu, 0, 6 ); - QVBoxLayout *servChanTopLayout = new QVBoxLayout( itemServChan, 0, 6 ); - QVBoxLayout *autoConnectTopLayout = new QVBoxLayout( itemAutoConnect, 0, 6 ); - QVBoxLayout *autoShortcutsTopLayout = new QVBoxLayout( itemShortcuts, 0, 6 ); + TQVBoxLayout *rmbMenuTopLayout = new TQVBoxLayout( itemRMBMenu, 0, 6 ); + TQVBoxLayout *servChanTopLayout = new TQVBoxLayout( itemServChan, 0, 6 ); + TQVBoxLayout *autoConnectTopLayout = new TQVBoxLayout( itemAutoConnect, 0, 6 ); + TQVBoxLayout *autoShortcutsTopLayout = new TQVBoxLayout( itemShortcuts, 0, 6 ); pageLooknFeel= new PageLooknFeel( itemLooknFeel ); pageGeneral = new PageGeneral( itemGeneral ); @@ -69,20 +69,20 @@ KSPrefs::KSPrefs(QWidget * parent, const char * name): pageAutoConnect = new PageAutoConnect( itemAutoConnect ); pageShortcuts = new PageShortcuts( itemShortcuts ); - connect(pageLooknFeel, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageGeneral, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageStartup, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageColors, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageIRCColors, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageFont, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageRMBMenu, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageServChan, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageAutoConnect, SIGNAL( modified() ), SLOT( modified() ) ); - connect(pageShortcuts, SIGNAL( modified() ), SLOT( modified() ) ); - - connect(this, SIGNAL( applyClicked() ), this, SLOT( saveConfig() ) ); - connect(this, SIGNAL( okClicked() ), this, SLOT( saveConfig() ) ); - connect(this, SIGNAL( defaultClicked() ), this, SLOT(defaultConfig() ) ); + connect(pageLooknFeel, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageGeneral, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageStartup, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageColors, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageIRCColors, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageFont, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageRMBMenu, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageServChan, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageAutoConnect, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + connect(pageShortcuts, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); + + connect(this, TQT_SIGNAL( applyClicked() ), this, TQT_SLOT( saveConfig() ) ); + connect(this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( saveConfig() ) ); + connect(this, TQT_SIGNAL( defaultClicked() ), this, TQT_SLOT(defaultConfig() ) ); looknfeelTopLayout->addWidget( pageLooknFeel ); generalTopLayout->addWidget( pageGeneral ); diff --git a/ksirc/KSPrefs/ksprefs.h b/ksirc/KSPrefs/ksprefs.h index 6c41fd9a..1e5beaf0 100644 --- a/ksirc/KSPrefs/ksprefs.h +++ b/ksirc/KSPrefs/ksprefs.h @@ -30,7 +30,7 @@ class KSPrefs : public KDialogBase Q_OBJECT public: - KSPrefs(QWidget * parent = 0, const char * name = 0); + KSPrefs(TQWidget * parent = 0, const char * name = 0); ~KSPrefs(); public slots: diff --git a/ksirc/KSPrefs/page_autoconnect.cpp b/ksirc/KSPrefs/page_autoconnect.cpp index a6532915..c9ab585d 100644 --- a/ksirc/KSPrefs/page_autoconnect.cpp +++ b/ksirc/KSPrefs/page_autoconnect.cpp @@ -10,12 +10,12 @@ #include "page_autoconnect.h" -#include +#include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -26,7 +26,7 @@ #define PASS 2 #define SSL 3 -PageAutoConnect::PageAutoConnect( QWidget *parent, const char *name ) : PageAutoConnectBase( parent, name) +PageAutoConnect::PageAutoConnect( TQWidget *parent, const char *name ) : PageAutoConnectBase( parent, name) { KLVAutoConnect->setSorting( 0 ); //KLVAutoConnect->header()->hide(); @@ -46,34 +46,34 @@ void PageAutoConnect::saveConfig() KConfig *conf = kapp->config(); conf->setGroup("AutoConnect"); - QStringList servers; + TQStringList servers; - for(QListViewItem *it = KLVAutoConnect->firstChild(); + for(TQListViewItem *it = KLVAutoConnect->firstChild(); it != 0; it = it->nextSibling()){ - QString server = it->text(NAME); + TQString server = it->text(NAME); if(it->text(PK).length() > 0) server += ":" + it->text(1); if(it->text(SSL).length() > 0) server += " (SSL)"; if(it->text(PASS).length() > 0) - server += QString(" (pass: %1)").arg(it->text(PASS)); + server += TQString(" (pass: %1)").arg(it->text(PASS)); servers << server; - QStringList channels; + TQStringList channels; - for(QListViewItem *ch = it->firstChild(); + for(TQListViewItem *ch = it->firstChild(); ch != 0; ch = ch->nextSibling()){ - QString channel; + TQString channel; channel = ch->text(NAME); if(ch->text(PK).length() > 0) - channel += QString(" (key: %1)").arg(ch->text(PK)); + channel += TQString(" (key: %1)").arg(ch->text(PK)); channels << channel; @@ -94,17 +94,17 @@ void PageAutoConnect::readConfig() { KConfig *conf = kapp->config(); conf->setGroup("AutoConnect"); - QStringList servers = conf->readListEntry("Servers"); + TQStringList servers = conf->readListEntry("Servers"); servers.sort(); - QStringList::ConstIterator ser = servers.begin(); + TQStringList::ConstIterator ser = servers.begin(); for( ; ser != servers.end(); ser++){ - QStringList channels = conf->readListEntry(*ser); - QString server = *ser; - QString port = "6667"; - QString ssl = QString::null; - QString pass = QString::null; + TQStringList channels = conf->readListEntry(*ser); + TQString server = *ser; + TQString port = "6667"; + TQString ssl = TQString::null; + TQString pass = TQString::null; - QRegExp rx("(.+) \\(SSL\\)(.*)"); + TQRegExp rx("(.+) \\(SSL\\)(.*)"); if(rx.search(server) >= 0){ server = rx.cap(1) + rx.cap(3); ssl = i18n("SSL"); @@ -121,19 +121,19 @@ void PageAutoConnect::readConfig() port = rx.cap(2); } kdDebug(5008) << server << ": Done " << port << " " << ssl << " " << pass << endl; - QListViewItem *s = new QListViewItem(KLVAutoConnect, server, port, pass, ssl); + TQListViewItem *s = new TQListViewItem(KLVAutoConnect, server, port, pass, ssl); s->setOpen(TRUE); channels.sort(); - QStringList::ConstIterator chan = channels.begin(); + TQStringList::ConstIterator chan = channels.begin(); for(; chan != channels.end(); chan++){ - QString channel = *chan; - QString key = QString::null; - QRegExp crx("(.+) \\(key: (\\S+)\\)"); + TQString channel = *chan; + TQString key = TQString::null; + TQRegExp crx("(.+) \\(key: (\\S+)\\)"); if(crx.search(channel) >= 0){ channel = crx.cap(1); key = crx.cap(2); } - new QListViewItem(s, channel, key); + new TQListViewItem(s, channel, key); } } } @@ -152,26 +152,26 @@ void PageAutoConnect::changed() void PageAutoConnect::add_pressed() { int fnd = 0; - QListViewItem *s = 0; + TQListViewItem *s = 0; s = KLVAutoConnect->selectedItem(); if(!s){ /* new item */ - QString server = ServerLE->text(); - QString ssl = QString::null; - QString port; + TQString server = ServerLE->text(); + TQString ssl = TQString::null; + TQString port; port.setNum(PortKI->value()); if(sslCB->isChecked()) ssl = i18n("SSL"); - s = new QListViewItem(KLVAutoConnect, server, port, PassLE->text(), ssl); + s = new TQListViewItem(KLVAutoConnect, server, port, PassLE->text(), ssl); s->setOpen(TRUE); - s = new QListViewItem(s, ChannelLE->text(), KeyLE->text()); + s = new TQListViewItem(s, ChannelLE->text(), KeyLE->text()); KLVAutoConnect->setCurrentItem(s); } else { /* update the existing one */ - QListViewItem *parent; - QListViewItem *child; + TQListViewItem *parent; + TQListViewItem *child; if(s->parent()){ parent = s->parent(); @@ -183,12 +183,12 @@ void PageAutoConnect::add_pressed() } parent->setText(NAME, ServerLE->text()); - parent->setText(PK, QString("%1").arg(PortKI->value())); + parent->setText(PK, TQString("%1").arg(PortKI->value())); parent->setText(PASS, PassLE->text()); if(sslCB->isChecked()) parent->setText(SSL, i18n("SSL")); else - parent->setText(SSL, QString::null); + parent->setText(SSL, TQString::null); if(child){ child->setText(NAME, ChannelLE->text()); @@ -197,7 +197,7 @@ void PageAutoConnect::add_pressed() else { if(ChannelLE->text().length() > 0){ fnd = 0; - QListViewItem *c = parent->firstChild(); + TQListViewItem *c = parent->firstChild(); for( ; c != 0 && fnd == 0; c = c->nextSibling()){ if(c->text(NAME) == ChannelLE->text()){ c->setText(PK, KeyLE->text()); @@ -205,7 +205,7 @@ void PageAutoConnect::add_pressed() } } if(fnd == 0){ - new QListViewItem(parent, ChannelLE->text(), KeyLE->text()); + new TQListViewItem(parent, ChannelLE->text(), KeyLE->text()); } } } @@ -228,13 +228,13 @@ void PageAutoConnect::new_pressed() void PageAutoConnect::delete_pressed() { - for(QListViewItem *it = KLVAutoConnect->firstChild(); + for(TQListViewItem *it = KLVAutoConnect->firstChild(); it != 0; it = it->nextSibling()){ if(it->text(NAME) == ServerLE->text()){ if(ChannelLE->text().isEmpty() == FALSE){ - for(QListViewItem *ch = it->firstChild(); + for(TQListViewItem *ch = it->firstChild(); ch != 0; ch = ch->nextSibling()){ if(ch->text(NAME) == ChannelLE->text()){ @@ -257,7 +257,7 @@ void PageAutoConnect::delete_pressed() changed(); } -void PageAutoConnect::kvl_clicked(QListViewItem *it) +void PageAutoConnect::kvl_clicked(TQListViewItem *it) { if(it != 0){ if(it->parent() != 0){ diff --git a/ksirc/KSPrefs/page_autoconnect.h b/ksirc/KSPrefs/page_autoconnect.h index efd9a4ed..04b5b821 100644 --- a/ksirc/KSPrefs/page_autoconnect.h +++ b/ksirc/KSPrefs/page_autoconnect.h @@ -9,7 +9,7 @@ class PageAutoConnect : public PageAutoConnectBase Q_OBJECT public: - PageAutoConnect( QWidget* parent = 0, const char* name = 0); + PageAutoConnect( TQWidget* parent = 0, const char* name = 0); ~PageAutoConnect(); void saveConfig(); @@ -29,7 +29,7 @@ protected slots: virtual void new_pressed(); virtual void delete_pressed(); - virtual void kvl_clicked(QListViewItem *); + virtual void kvl_clicked(TQListViewItem *); }; diff --git a/ksirc/KSPrefs/page_colors.cpp b/ksirc/KSPrefs/page_colors.cpp index f6d68a52..e7b36af4 100644 --- a/ksirc/KSPrefs/page_colors.cpp +++ b/ksirc/KSPrefs/page_colors.cpp @@ -9,17 +9,17 @@ #include "page_colors.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include -PageColors::PageColors( QWidget *parent, const char *name ) : PageColorsBase( parent, name) +PageColors::PageColors( TQWidget *parent, const char *name ) : PageColorsBase( parent, name) { changing = 0; m_dcol.setAutoDelete(true); @@ -52,13 +52,13 @@ void PageColors::saveConfig() } else if(autoOtherColRB->isChecked()){ ksopts->nickColourization = true; - ksopts->nickForeground = QColor(); - ksopts->nickBackground = QColor(); + ksopts->nickForeground = TQColor(); + ksopts->nickBackground = TQColor(); } else { ksopts->nickColourization = false; - ksopts->nickForeground = QColor(); - ksopts->nickBackground = QColor(); + ksopts->nickForeground = TQColor(); + ksopts->nickBackground = TQColor(); } ksopts->msgContainNick = ownContainNickCBtn->color(); @@ -68,7 +68,7 @@ void PageColors::saveConfig() ksopts->msg1Regex = msg1Regex->isChecked(); } else { - ksopts->msg1Contain = QColor(); + ksopts->msg1Contain = TQColor(); ksopts->msg1String = msg1LE->text(); ksopts->msg1Regex = false; } @@ -78,7 +78,7 @@ void PageColors::saveConfig() ksopts->msg2Regex = msg2Regex->isChecked(); } else { - ksopts->msg2Contain = QColor(); + ksopts->msg2Contain = TQColor(); ksopts->msg2String = msg2LE->text(); ksopts->msg2Regex = false; } @@ -88,8 +88,8 @@ void PageColors::saveConfig() ksopts->colourTheme = themeLB->currentText(); KConfig *conf = kapp->config(); - QDictIterator it(m_dcol); - QStringList names; + TQDictIterator it(m_dcol); + TQStringList names; for(; it.current(); ++it){ names << it.currentKey(); conf->setGroup("ColourSchemes-"+ it.currentKey()); @@ -128,8 +128,8 @@ void PageColors::readConfig( const KSOColors *opts ) if( opts->nickColourization ){ autoOtherColRB->setChecked( true ); - nickFGCBtn->setColor( QColor() ); - nickBGCBtn->setColor( QColor() ); + nickFGCBtn->setColor( TQColor() ); + nickBGCBtn->setColor( TQColor() ); } else if( opts->nickForeground.isValid() || @@ -140,8 +140,8 @@ void PageColors::readConfig( const KSOColors *opts ) } else { noOtherColRB->setChecked( true ); - nickFGCBtn->setColor( QColor() ); - nickBGCBtn->setColor( QColor() ); + nickFGCBtn->setColor( TQColor() ); + nickBGCBtn->setColor( TQColor() ); } @@ -161,7 +161,7 @@ void PageColors::readConfig( const KSOColors *opts ) KConfig *conf = kapp->config(); conf->setGroup("ColourSchemes"); themeLB->clear(); - QStringList names = conf->readListEntry("Names"); + TQStringList names = conf->readListEntry("Names"); if(names.contains("Custom")){ names.remove(names.find("Custom")); } @@ -175,7 +175,7 @@ void PageColors::readConfig( const KSOColors *opts ) m_dcol.clear(); - QStringList::Iterator it = names.begin(); + TQStringList::Iterator it = names.begin(); for( ; it != names.end(); ++it){ conf->setGroup("ColourSchemes-"+ *it); m_dcol.insert(*it, new KSOColors); @@ -207,12 +207,12 @@ void PageColors::changed() emit modified(); } -void PageColors::theme_clicked(QListBoxItem *li) +void PageColors::theme_clicked(TQListBoxItem *li) { if(li == 0x0) return; - QString name = li->text(); + TQString name = li->text(); changing = 1; backCBtn->setColor( m_dcol[name]->backgroundColor ); @@ -239,7 +239,7 @@ void PageColors::themeNewPB_clicked() void PageColors::themeAddPB_clicked() { - QString name = themeLE->text(); + TQString name = themeLE->text(); kdDebug(5008) << "Got add: " << themeLB->currentText() << endl; diff --git a/ksirc/KSPrefs/page_colors.h b/ksirc/KSPrefs/page_colors.h index 188fe0a8..5401aecc 100644 --- a/ksirc/KSPrefs/page_colors.h +++ b/ksirc/KSPrefs/page_colors.h @@ -13,16 +13,16 @@ #include "page_colorsbase.h" #include "ksopts.h" -#include -#include -#include +#include +#include +#include class PageColors : public PageColorsBase { Q_OBJECT public: - PageColors( QWidget *parent = 0, const char *name = 0 ); + PageColors( TQWidget *parent = 0, const char *name = 0 ); ~PageColors(); void saveConfig(); @@ -33,7 +33,7 @@ protected slots: void changed(); public slots: - virtual void theme_clicked(QListBoxItem*); + virtual void theme_clicked(TQListBoxItem*); virtual void themeNewPB_clicked(); virtual void themeAddPB_clicked(); virtual void themeDelPB_clicked(); @@ -47,7 +47,7 @@ private: private: int changing; - QDict m_dcol; + TQDict m_dcol; }; #endif diff --git a/ksirc/KSPrefs/page_font.cpp b/ksirc/KSPrefs/page_font.cpp index e9f9e0e6..5ea0dd9b 100644 --- a/ksirc/KSPrefs/page_font.cpp +++ b/ksirc/KSPrefs/page_font.cpp @@ -1,12 +1,12 @@ #include "page_font.h" -#include "qapplication.h" -PageFont::PageFont( QWidget *parent, const char *name ) : - QWidget( parent, name) +#include "tqapplication.h" +PageFont::PageFont( TQWidget *parent, const char *name ) : + TQWidget( parent, name) { - layout = new QHBoxLayout(this); + layout = new TQHBoxLayout(this); fontchooser = new KFontChooser(this); layout->addWidget(fontchooser); - connect(fontchooser,SIGNAL(fontSelected ( const QFont&)), this, SLOT(update())); + connect(fontchooser,TQT_SIGNAL(fontSelected ( const TQFont&)), this, TQT_SLOT(update())); } PageFont::~PageFont( ) @@ -21,7 +21,7 @@ void PageFont::update( void ){ void PageFont::saveConfig( void ) { ksopts->defaultFont = fontchooser->font(); - QApplication::setFont(fontchooser->font(), true, "KSirc::TextView" ); + TQApplication::setFont(fontchooser->font(), true, "KSirc::TextView" ); } void PageFont::readConfig( const KSOColors * opts ) diff --git a/ksirc/KSPrefs/page_font.h b/ksirc/KSPrefs/page_font.h index 0d2fa673..44940170 100644 --- a/ksirc/KSPrefs/page_font.h +++ b/ksirc/KSPrefs/page_font.h @@ -1,7 +1,7 @@ #ifndef _PAGE_FONT #define _PAGE_FONT #include // For the font selection widget -#include // For the layout +#include // For the layout #include "ksopts.h" // For storing the info. /** @@ -17,7 +17,7 @@ class PageFont : public QWidget /** * Create the Widget */ - PageFont( QWidget *parent = 0, const char *name = 0 ); + PageFont( TQWidget *parent = 0, const char *name = 0 ); /* @@ -56,7 +56,7 @@ class PageFont : public QWidget private: KFontChooser* fontchooser; /** The font choosing widget from kdelib */ - QHBoxLayout* layout; + TQHBoxLayout* layout; }; #endif diff --git a/ksirc/KSPrefs/page_general.cpp b/ksirc/KSPrefs/page_general.cpp index d6256e2c..51a78ec3 100644 --- a/ksirc/KSPrefs/page_general.cpp +++ b/ksirc/KSPrefs/page_general.cpp @@ -7,15 +7,15 @@ * * ***************************************************************************/ -#include -#include +#include +#include #include #include #include "page_general.h" #include "../servercontroller.h" -PageGeneral::PageGeneral( QWidget *parent, const char *name ) : PageGeneralBase( parent, name) +PageGeneral::PageGeneral( TQWidget *parent, const char *name ) : PageGeneralBase( parent, name) { } @@ -82,10 +82,10 @@ void PageGeneral::readConfig( const KSOGeneral *opts ) encodingsCB->clear(); - QStringList encodings = KGlobal::charsets()->descriptiveEncodingNames(); + TQStringList encodings = KGlobal::charsets()->descriptiveEncodingNames(); // remove utf16/ucs2 as it just doesn't work for IRC - QStringList::Iterator encodingIt = encodings.begin(); + TQStringList::Iterator encodingIt = encodings.begin(); while ( encodingIt != encodings.end() ) { if ( ( *encodingIt ).find( "utf16" ) != -1 || ( *encodingIt ).find( "iso-10646" ) != -1 ) diff --git a/ksirc/KSPrefs/page_general.h b/ksirc/KSPrefs/page_general.h index ecf515ca..253d6623 100644 --- a/ksirc/KSPrefs/page_general.h +++ b/ksirc/KSPrefs/page_general.h @@ -18,7 +18,7 @@ class PageGeneral : public PageGeneralBase Q_OBJECT public: - PageGeneral( QWidget *parent = 0, const char *name = 0 ); + PageGeneral( TQWidget *parent = 0, const char *name = 0 ); ~PageGeneral(); void saveConfig(); diff --git a/ksirc/KSPrefs/page_irccolors.cpp b/ksirc/KSPrefs/page_irccolors.cpp index aa6ff351..5ed96054 100644 --- a/ksirc/KSPrefs/page_irccolors.cpp +++ b/ksirc/KSPrefs/page_irccolors.cpp @@ -9,12 +9,12 @@ #include "page_irccolors.h" -#include -#include +#include +#include #include #include -PageIRCColors::PageIRCColors( QWidget *parent, const char *name ) : PageIRCColorsBase( parent, name) +PageIRCColors::PageIRCColors( TQWidget *parent, const char *name ) : PageIRCColorsBase( parent, name) { } diff --git a/ksirc/KSPrefs/page_irccolors.h b/ksirc/KSPrefs/page_irccolors.h index a34045c3..34565b42 100644 --- a/ksirc/KSPrefs/page_irccolors.h +++ b/ksirc/KSPrefs/page_irccolors.h @@ -18,7 +18,7 @@ class PageIRCColors : public PageIRCColorsBase Q_OBJECT public: - PageIRCColors( QWidget *parent = 0, const char *name = 0 ); + PageIRCColors( TQWidget *parent = 0, const char *name = 0 ); ~PageIRCColors(); void saveConfig(); diff --git a/ksirc/KSPrefs/page_looknfeel.cpp b/ksirc/KSPrefs/page_looknfeel.cpp index 931a897c..29608e04 100644 --- a/ksirc/KSPrefs/page_looknfeel.cpp +++ b/ksirc/KSPrefs/page_looknfeel.cpp @@ -7,18 +7,18 @@ * * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include #include #include "page_looknfeel.h" -PageLooknFeel::PageLooknFeel( QWidget *parent, const char *name ) : PageLooknFeelBase( parent, name) +PageLooknFeel::PageLooknFeel( TQWidget *parent, const char *name ) : PageLooknFeelBase( parent, name) { - modePreview->setPixmap(QPixmap(locate("data","ksirc/pics/sdi.png"))); + modePreview->setPixmap(TQPixmap(locate("data","ksirc/pics/sdi.png"))); wallpaperPathLE->fileDialog()->setFilter( "*.jpg *.png *.gif" ); } @@ -54,14 +54,14 @@ void PageLooknFeel::defaultConfig() void PageLooknFeel::setPreviewPixmap( bool isSDI ) { if (isSDI == true) - modePreview->setPixmap( QPixmap( locate("data", "ksirc/pics/sdi.png" ) ) ); + modePreview->setPixmap( TQPixmap( locate("data", "ksirc/pics/sdi.png" ) ) ); else - modePreview->setPixmap( QPixmap( locate("data", "ksirc/pics/mdi.png" ) ) ); + modePreview->setPixmap( TQPixmap( locate("data", "ksirc/pics/mdi.png" ) ) ); } -void PageLooknFeel::showWallpaperPixmap( const QString &url ) +void PageLooknFeel::showWallpaperPixmap( const TQString &url ) { - wallpaperPreview->setPixmap( QPixmap( url ) ); + wallpaperPreview->setPixmap( TQPixmap( url ) ); } void PageLooknFeel::changed() diff --git a/ksirc/KSPrefs/page_looknfeel.h b/ksirc/KSPrefs/page_looknfeel.h index a5c7f96f..326498cb 100644 --- a/ksirc/KSPrefs/page_looknfeel.h +++ b/ksirc/KSPrefs/page_looknfeel.h @@ -18,7 +18,7 @@ class PageLooknFeel : public PageLooknFeelBase Q_OBJECT public: - PageLooknFeel( QWidget *parent = 0, const char *name = 0 ); + PageLooknFeel( TQWidget *parent = 0, const char *name = 0 ); ~PageLooknFeel(); void saveConfig(); @@ -30,7 +30,7 @@ signals: public slots: virtual void setPreviewPixmap( bool isSDI ); - virtual void showWallpaperPixmap( const QString &url ); + virtual void showWallpaperPixmap( const TQString &url ); virtual void changed(); }; diff --git a/ksirc/KSPrefs/page_rmbmenu.cpp b/ksirc/KSPrefs/page_rmbmenu.cpp index 7baf5da5..de30a829 100644 --- a/ksirc/KSPrefs/page_rmbmenu.cpp +++ b/ksirc/KSPrefs/page_rmbmenu.cpp @@ -8,11 +8,11 @@ #include "page_rmbmenu.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -20,7 +20,7 @@ -PageRMBMenu::PageRMBMenu( QWidget *parent, const char *name ) : PageRMBMenuBase( parent, name) +PageRMBMenu::PageRMBMenu( TQWidget *parent, const char *name ) : PageRMBMenuBase( parent, name) { UserControlMenu *ucm; @@ -41,21 +41,21 @@ PageRMBMenu::PageRMBMenu( QWidget *parent, const char *name ) : PageRMBMenuBase( changeItemPB->hide(); - connect(commandLB, SIGNAL(highlighted( int )), - this, SLOT(highlighted( int ))); - connect(moveUpPB, SIGNAL(clicked()), - this, SLOT(moveDown())); - connect(moveDownPB, SIGNAL(clicked()), - this, SLOT(moveUp())); + connect(commandLB, TQT_SIGNAL(highlighted( int )), + this, TQT_SLOT(highlighted( int ))); + connect(moveUpPB, TQT_SIGNAL(clicked()), + this, TQT_SLOT(moveDown())); + connect(moveDownPB, TQT_SIGNAL(clicked()), + this, TQT_SLOT(moveUp())); - connect(insertSeperatorPB, SIGNAL(clicked()), - this, SLOT(insSeperator())); + connect(insertSeperatorPB, TQT_SIGNAL(clicked()), + this, TQT_SLOT(insSeperator())); - connect(insertItemPB, SIGNAL(clicked()), - this, SLOT(insCommand())); + connect(insertItemPB, TQT_SIGNAL(clicked()), + this, TQT_SLOT(insCommand())); - connect(deleteItemPB, SIGNAL(clicked()), - this, SLOT(delCommand())); + connect(deleteItemPB, TQT_SIGNAL(clicked()), + this, TQT_SLOT(delCommand())); } @@ -122,7 +122,7 @@ void PageRMBMenu::moveUp() { int item = commandLB->currentItem(); - QString txt = commandLB->text(item); + TQString txt = commandLB->text(item); commandLB->removeItem(item); commandLB->insertItem(txt, item-1); @@ -139,7 +139,7 @@ void PageRMBMenu::moveDown() { int item = commandLB->currentItem(); - QString txt = commandLB->text(item); + TQString txt = commandLB->text(item); commandLB->removeItem(item); commandLB->insertItem(txt, item+1); @@ -156,7 +156,7 @@ void PageRMBMenu::insSeperator() { int item = commandLB->currentItem(); - QString txt = commandLB->text(item); + TQString txt = commandLB->text(item); commandLB->insertItem("--------------", item); commandLB->setCurrentItem(item); @@ -171,8 +171,8 @@ void PageRMBMenu::insCommand() { int item = commandLB->currentItem(); - QString te = entryLE->text(); - QString ce = commandLE->text(); + TQString te = entryLE->text(); + TQString ce = commandLE->text(); commandLB->insertItem(te, item); commandLB->setCurrentItem(item); @@ -193,7 +193,7 @@ void PageRMBMenu::delCommand() { int item = commandLB->currentItem(); - QString txt = commandLB->text(item); + TQString txt = commandLB->text(item); commandLB->removeItem(item); UserControlMenu::UserMenu.remove(item); diff --git a/ksirc/KSPrefs/page_rmbmenu.h b/ksirc/KSPrefs/page_rmbmenu.h index cb1de421..1d4a8dac 100644 --- a/ksirc/KSPrefs/page_rmbmenu.h +++ b/ksirc/KSPrefs/page_rmbmenu.h @@ -18,7 +18,7 @@ class PageRMBMenu : public PageRMBMenuBase Q_OBJECT public: - PageRMBMenu( QWidget *parent = 0, const char *name = 0 ); + PageRMBMenu( TQWidget *parent = 0, const char *name = 0 ); ~PageRMBMenu(); void saveConfig(); diff --git a/ksirc/KSPrefs/page_servchan.cpp b/ksirc/KSPrefs/page_servchan.cpp index 4689bd2a..f7587947 100644 --- a/ksirc/KSPrefs/page_servchan.cpp +++ b/ksirc/KSPrefs/page_servchan.cpp @@ -9,18 +9,18 @@ #include "page_servchan.h" -#include -#include -#include +#include +#include +#include #include #include -PageServChan::PageServChan( QWidget *parent, const char *name ) : PageServChanBase( parent, name) +PageServChan::PageServChan( TQWidget *parent, const char *name ) : PageServChanBase( parent, name) { - connect(serverDeleteItemPB, SIGNAL(pressed()), this, SLOT(deletePressedSL())); - connect(ServerAddItemPB, SIGNAL(pressed()), this, SLOT(addPressedSL())); - connect(chanDeleteItmPB, SIGNAL(pressed()), this, SLOT(deletePressedCL())); - connect(ChanAddItemPB, SIGNAL(pressed()), this, SLOT(addPressedCL())); + connect(serverDeleteItemPB, TQT_SIGNAL(pressed()), this, TQT_SLOT(deletePressedSL())); + connect(ServerAddItemPB, TQT_SIGNAL(pressed()), this, TQT_SLOT(addPressedSL())); + connect(chanDeleteItmPB, TQT_SIGNAL(pressed()), this, TQT_SLOT(deletePressedCL())); + connect(ChanAddItemPB, TQT_SIGNAL(pressed()), this, TQT_SLOT(addPressedCL())); } @@ -30,10 +30,10 @@ PageServChan::~PageServChan() void PageServChan::saveConfig() { - QStringList sLB; + TQStringList sLB; uint i; for(i = 0; i < serverLB->count(); i++){ - QString txt = serverLB->text(i); + TQString txt = serverLB->text(i); if(!txt.isNull()) sLB << txt; } @@ -41,9 +41,9 @@ void PageServChan::saveConfig() conf->setGroup("ServerList"); conf->writeEntry("RecentServers", sLB); - QStringList sCL; + TQStringList sCL; for(i = 0; i < channelLB->count(); i++){ - QString txt = channelLB->text(i); + TQString txt = channelLB->text(i); if(!txt.isNull()) sCL << txt; } @@ -55,7 +55,7 @@ void PageServChan::readConfig( const KSOServChan * ) { KConfig *conf = kapp->config(); conf->setGroup("ServerList"); - QStringList recent = conf->readListEntry("RecentServers"); + TQStringList recent = conf->readListEntry("RecentServers"); recent.sort(); serverLB->insertStringList(recent); conf->setGroup("Recent"); @@ -79,7 +79,7 @@ void PageServChan::deletePressedSL() { void PageServChan::addPressedSL() { uint i; - QString txt = LineEdit6->text(); + TQString txt = LineEdit6->text(); for(i = 0; i < serverLB->count(); i++){ if(txt == serverLB->text(i)){ @@ -111,7 +111,7 @@ void PageServChan::deletePressedCL() { void PageServChan::addPressedCL() { uint i; - QString txt = LineEdit6_2->text(); + TQString txt = LineEdit6_2->text(); for(i = 0; i < channelLB->count(); i++){ if(txt == channelLB->text(i)){ diff --git a/ksirc/KSPrefs/page_servchan.h b/ksirc/KSPrefs/page_servchan.h index 07429f2b..1e20e8d7 100644 --- a/ksirc/KSPrefs/page_servchan.h +++ b/ksirc/KSPrefs/page_servchan.h @@ -18,7 +18,7 @@ class PageServChan : public PageServChanBase Q_OBJECT public: - PageServChan( QWidget *parent = 0, const char *name = 0 ); + PageServChan( TQWidget *parent = 0, const char *name = 0 ); ~PageServChan(); void saveConfig(); diff --git a/ksirc/KSPrefs/page_shortcuts.cpp b/ksirc/KSPrefs/page_shortcuts.cpp index 45a83beb..4d2fda54 100644 --- a/ksirc/KSPrefs/page_shortcuts.cpp +++ b/ksirc/KSPrefs/page_shortcuts.cpp @@ -7,8 +7,8 @@ * * ***************************************************************************/ -#include -#include +#include +#include #include @@ -16,12 +16,12 @@ #include "page_shortcuts.h" #include "../servercontroller.h" -PageShortcuts::PageShortcuts( QWidget *parent, const char *name ) : PageShortcutsBase( parent, name) +PageShortcuts::PageShortcuts( TQWidget *parent, const char *name ) : PageShortcutsBase( parent, name) { globalGB->setColumnLayout( 0, Qt::Horizontal ); m_key = new KKeyChooser(servercontroller::self()->getGlobalAccel(), globalGB); - connect(m_key, SIGNAL(keyChange()), this, SLOT(changed())); + connect(m_key, TQT_SIGNAL(keyChange()), this, TQT_SLOT(changed())); globalGB->layout()->add(m_key); } diff --git a/ksirc/KSPrefs/page_shortcuts.h b/ksirc/KSPrefs/page_shortcuts.h index 4c16aa35..36048f44 100644 --- a/ksirc/KSPrefs/page_shortcuts.h +++ b/ksirc/KSPrefs/page_shortcuts.h @@ -20,7 +20,7 @@ class PageShortcuts : public PageShortcutsBase Q_OBJECT public: - PageShortcuts( QWidget *parent = 0, const char *name = 0 ); + PageShortcuts( TQWidget *parent = 0, const char *name = 0 ); ~PageShortcuts(); void saveConfig(); diff --git a/ksirc/KSPrefs/page_startup.cpp b/ksirc/KSPrefs/page_startup.cpp index 060da44d..e2ddfdc1 100644 --- a/ksirc/KSPrefs/page_startup.cpp +++ b/ksirc/KSPrefs/page_startup.cpp @@ -7,9 +7,9 @@ * * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include @@ -19,16 +19,16 @@ #include "page_startup.h" -PageStartup::PageStartup( QWidget *parent, const char *name ) : PageStartupBase( parent, name) +PageStartup::PageStartup( TQWidget *parent, const char *name ) : PageStartupBase( parent, name) { notifyLB->upButton()->hide(); notifyLB->downButton()->hide(); serverLB->upButton()->hide(); serverLB->downButton()->hide(); - QListBox *lb = serverLB->listBox(); - connect(lb, SIGNAL(highlighted(int)), - this, SLOT(clickedLB(int))); + TQListBox *lb = serverLB->listBox(); + connect(lb, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(clickedLB(int))); changing = false; @@ -41,11 +41,11 @@ PageStartup::~PageStartup() void PageStartup::saveConfig() { KSOServer glb = ksopts->server["global"]; - QStringList items = serverLB->items(); + TQStringList items = serverLB->items(); ksopts->server.clear(); - QStringList::iterator it = items.begin(); + TQStringList::iterator it = items.begin(); for( ; it != items.end(); ++it){ ksopts->server[*it] = server[*it]; } @@ -65,7 +65,7 @@ void PageStartup::readConfig( const KSOptions *opts ) if(it.data().globalCopy == false) serverLB->insertItem(it.key()); } - QListBoxItem *item = serverLB->listBox()->findItem("global"); + TQListBoxItem *item = serverLB->listBox()->findItem("global"); serverLB->listBox()->setSelected(item, true); changing = false; clickedLB(serverLB->listBox()->index(item)); @@ -82,7 +82,7 @@ void PageStartup::changed() { emit modified(); - QString ser = serverLB->currentText(); + TQString ser = serverLB->currentText(); if(ser.isEmpty()) return; @@ -106,7 +106,7 @@ void PageStartup::changed() void PageStartup::clickedLB(int index) { - QString text = serverLB->text(index); + TQString text = serverLB->text(index); if(!server.contains(text)){ server[text] = server["global"]; server[text].globalCopy = true; diff --git a/ksirc/KSPrefs/page_startup.h b/ksirc/KSPrefs/page_startup.h index ecac8305..c2092e65 100644 --- a/ksirc/KSPrefs/page_startup.h +++ b/ksirc/KSPrefs/page_startup.h @@ -18,7 +18,7 @@ class PageStartup : public PageStartupBase Q_OBJECT public: - PageStartup( QWidget *parent = 0, const char *name = 0 ); + PageStartup( TQWidget *parent = 0, const char *name = 0 ); ~PageStartup(); void saveConfig(); diff --git a/ksirc/KSProgress/ksprogress.cpp b/ksirc/KSProgress/ksprogress.cpp index 369b0742..ccf3b194 100644 --- a/ksirc/KSProgress/ksprogress.cpp +++ b/ksirc/KSProgress/ksprogress.cpp @@ -10,7 +10,7 @@ KSProgress::KSProgress ( - QWidget* parent, + TQWidget* parent, const char* name ) : @@ -22,7 +22,7 @@ KSProgress::KSProgress } -void KSProgress::setID(QString _id) +void KSProgress::setID(TQString _id) { id = _id; } @@ -32,12 +32,12 @@ void KSProgress::setRange(int minValue, int maxValue) progress->setRange(minValue, maxValue); } -void KSProgress::setTopText(QString text) +void KSProgress::setTopText(TQString text) { fileName->setText(text); } -void KSProgress::setBotText(QString text) +void KSProgress::setBotText(TQString text) { transferStatus->setText(text); } diff --git a/ksirc/KSProgress/ksprogress.h b/ksirc/KSProgress/ksprogress.h index c3feb2c6..2613047d 100644 --- a/ksirc/KSProgress/ksprogress.h +++ b/ksirc/KSProgress/ksprogress.h @@ -20,16 +20,16 @@ public: KSProgress ( - QWidget* parent = NULL, + TQWidget* parent = NULL, const char* name = NULL ); virtual ~KSProgress(); - virtual void setID(QString); + virtual void setID(TQString); virtual void setRange(int minValue, int maxValue); - virtual void setTopText(QString text); - virtual void setBotText(QString text); + virtual void setTopText(TQString text); + virtual void setBotText(TQString text); public slots: virtual void setValue(int value); @@ -37,10 +37,10 @@ public slots: signals: void cancel(); - void cancel(QString); + void cancel(TQString); private: - QString id; + TQString id; bool canceled; }; diff --git a/ksirc/KSProgress/ksprogressdata.cpp b/ksirc/KSProgress/ksprogressdata.cpp index 0feb524b..7d146fd9 100644 --- a/ksirc/KSProgress/ksprogressdata.cpp +++ b/ksirc/KSProgress/ksprogressdata.cpp @@ -22,7 +22,7 @@ ksprogressData::ksprogressData ( - QWidget* parent, + TQWidget* parent, const char* name ) : @@ -33,15 +33,15 @@ ksprogressData::ksprogressData progress->setMinimumSize( 10, 10 ); progress->setMaximumSize( 32767, 32767 ); - QPushButton* dlgedit_PushButton_1; + TQPushButton* dlgedit_PushButton_1; dlgedit_PushButton_1 = new KPushButton( KStdGuiItem::cancel(), this, "PushButton_1" ); dlgedit_PushButton_1->setGeometry( 70, 90, 100, 30 ); dlgedit_PushButton_1->setMinimumSize( 10, 10 ); dlgedit_PushButton_1->setMaximumSize( 32767, 32767 ); - connect( dlgedit_PushButton_1, SIGNAL(clicked()), SLOT(cancelPressed()) ); + connect( dlgedit_PushButton_1, TQT_SIGNAL(clicked()), TQT_SLOT(cancelPressed()) ); dlgedit_PushButton_1->setAutoRepeat( FALSE ); - fileName = new QLabel( this, "Label_1" ); + fileName = new TQLabel( this, "Label_1" ); fileName->setGeometry( 10, 10, 230, 20 ); fileName->setMinimumSize( 10, 10 ); fileName->setMaximumSize( 32767, 32767 ); @@ -49,7 +49,7 @@ ksprogressData::ksprogressData fileName->setAlignment( 289 ); fileName->setMargin( -1 ); - transferStatus = new QLabel( this, "Label_2" ); + transferStatus = new TQLabel( this, "Label_2" ); transferStatus->setGeometry( 10, 35, 230, 20 ); transferStatus->setMinimumSize( 10, 10 ); transferStatus->setMaximumSize( 32767, 32767 ); diff --git a/ksirc/KSProgress/ksprogressdata.h b/ksirc/KSProgress/ksprogressdata.h index a2282baf..37e3cf29 100644 --- a/ksirc/KSProgress/ksprogressdata.h +++ b/ksirc/KSProgress/ksprogressdata.h @@ -13,8 +13,8 @@ #ifndef ksprogressData_included #define ksprogressData_included -#include -#include +#include +#include #include "kprogress.h" class ksprogressData : public QFrame @@ -25,7 +25,7 @@ public: ksprogressData ( - QWidget* parent = NULL, + TQWidget* parent = NULL, const char* name = NULL ); @@ -40,8 +40,8 @@ protected slots: protected: KProgress* progress; - QLabel* fileName; - QLabel* transferStatus; + TQLabel* fileName; + TQLabel* transferStatus; }; diff --git a/ksirc/KSTicker/kspainter.cpp b/ksirc/KSTicker/kspainter.cpp index fe5fbf65..90ffac0d 100644 --- a/ksirc/KSTicker/kspainter.cpp +++ b/ksirc/KSTicker/kspainter.cpp @@ -6,13 +6,13 @@ const int KSPainter::optcolours = 8; const int KSPainter::startspecial = 16; const int KSPainter::maxcolour = 16+optcolours; -const QColor KSPainter::brown ( 165, 42, 42 ); -const QColor KSPainter::orange ( 255, 165, 0 ); -const QColor KSPainter::lightCyan( 224, 255, 255 ); -const QColor KSPainter::lightBlue( 173, 216, 230 ); -const QColor KSPainter::pink ( 255, 192, 203 ); +const TQColor KSPainter::brown ( 165, 42, 42 ); +const TQColor KSPainter::orange ( 255, 165, 0 ); +const TQColor KSPainter::lightCyan( 224, 255, 255 ); +const TQColor KSPainter::lightBlue( 173, 216, 230 ); +const TQColor KSPainter::pink ( 255, 192, 203 ); -QColor KSPainter::num2colour[KSPainter::maxcolour] = { Qt::white, +TQColor KSPainter::num2colour[KSPainter::maxcolour] = { Qt::white, Qt::black, Qt::darkBlue, Qt::darkGreen, @@ -41,7 +41,7 @@ void KSPainter::initOptColours() num2colour[startspecial+7] = ksopts->backgroundColor; } -int KSPainter::colour2num(const QColor &colour) +int KSPainter::colour2num(const TQColor &colour) { for(int i = 0; i < maxcolour; i++) if(num2colour[i] == colour) @@ -50,7 +50,7 @@ int KSPainter::colour2num(const QColor &colour) return -1; } -void KSPainter::colourDrawText(QPainter *p, int startx, int starty, +void KSPainter::colourDrawText(TQPainter *p, int startx, int starty, char *str, int length) { int offset = 0; @@ -62,7 +62,7 @@ void KSPainter::colourDrawText(QPainter *p, int startx, int starty, // Default pen (colour) - const QPen qpDefPen = p->pen(); + const TQPen qpDefPen = p->pen(); for(loc = 0; (str[loc] != 0x00) && (loc != length) ; loc++){ if(str[loc] == 0x03 || str[loc] == '~'){ @@ -121,8 +121,8 @@ void KSPainter::colourDrawText(QPainter *p, int startx, int starty, p->setBackgroundMode(Qt::TransparentMode); } else if((str[i] == '~') && ((str[i+1] >= 0x61) || (str[i+1] <= 0x7a))){ - QFont fnt = p->font(); - QColor temppen; + TQFont fnt = p->font(); + TQColor temppen; switch(str[i+1]){ case 'c': p->setPen(qpDefPen); diff --git a/ksirc/KSTicker/kspainter.h b/ksirc/KSTicker/kspainter.h index 21f9495d..b5fa1049 100644 --- a/ksirc/KSTicker/kspainter.h +++ b/ksirc/KSTicker/kspainter.h @@ -1,25 +1,25 @@ #ifndef KSPAINTER_H #define KSPAINTER_H -#include -#include +#include +#include class KSPainter { public: static void initOptColours(); - static void colourDrawText(QPainter *p, int startx, int starty, char *str, int length = -1); + static void colourDrawText(TQPainter *p, int startx, int starty, char *str, int length = -1); static const int startspecial; static const int maxcolour; static const int optcolours; - static QColor num2colour[16+8]; - static int colour2num(const QColor &colour); + static TQColor num2colour[16+8]; + static int colour2num(const TQColor &colour); - static const QColor brown; - static const QColor orange; - static const QColor lightCyan; - static const QColor lightBlue; - static const QColor pink; + static const TQColor brown; + static const TQColor orange; + static const TQColor lightCyan; + static const TQColor lightBlue; + static const TQColor pink; }; #endif diff --git a/ksirc/KSTicker/ksticker.cpp b/ksirc/KSTicker/ksticker.cpp index dc65118a..e6199427 100644 --- a/ksirc/KSTicker/ksticker.cpp +++ b/ksirc/KSTicker/ksticker.cpp @@ -1,10 +1,10 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -21,13 +21,13 @@ #include #include -KSTicker::KSTicker(QWidget * parent, const char * name, WFlags f) -: QFrame(parent, name, f) +KSTicker::KSTicker(TQWidget * parent, const char * name, WFlags f) +: TQFrame(parent, name, f) { pHeight = 1; - pic = new QPixmap(); // create pic map here, resize it later though. + pic = new TQPixmap(); // create pic map here, resize it later though. // pic->setBackgroundMode(TransparentMode); KConfig *conf = kapp->config(); @@ -36,7 +36,7 @@ KSTicker::KSTicker(QWidget * parent, const char * name, WFlags f) bAtEnd = FALSE; setFont(conf->readFontEntry("Font", &ksopts->defaultFont)); - ourFont = font(); //QFont("Courier"); + ourFont = font(); //TQFont("Courier"); setFont(ourFont); setMinimumSize(100, 10); setFixedHeight((fontMetrics().height()+fontMetrics().descent()*2)*pHeight); @@ -54,13 +54,13 @@ KSTicker::KSTicker(QWidget * parent, const char * name, WFlags f) currentChar = 0; chars = this->width() / onechar; - popup = new QPopupMenu(); - popup->insertItem(i18n( "Font..." ), this, SLOT(fontSelector())); - popup->insertItem(i18n( "Scroll Rate..." ), this, SLOT(scrollRate())); - iScrollItem = popup->insertItem(i18n( "Scroll Constantly" ), this, SLOT(scrollConstantly())); + popup = new TQPopupMenu(); + popup->insertItem(i18n( "Font..." ), this, TQT_SLOT(fontSelector())); + popup->insertItem(i18n( "Scroll Rate..." ), this, TQT_SLOT(scrollRate())); + iScrollItem = popup->insertItem(i18n( "Scroll Constantly" ), this, TQT_SLOT(scrollConstantly())); popup->setItemChecked(iScrollItem, bScrollConstantly); popup->insertSeparator(); - popup->insertItem(i18n( "Return to Normal Mode" ), this, SIGNAL(doubleClick())); + popup->insertItem(i18n( "Return to Normal Mode" ), this, TQT_SIGNAL(doubleClick())); currentStr = ""; @@ -101,12 +101,12 @@ void KSTicker::show() */ // ### FIXME: port to kwin //KWM::setDecoration(winId(), KWM::tinyDecoration); - QSize size = this->size(); - size.setHeight(QFontMetrics(font()).height()+10); - setFixedHeight(QFontMetrics(font()).height()+10); + TQSize size = this->size(); + size.setHeight(TQFontMetrics(font()).height()+10); + setFixedHeight(TQFontMetrics(font()).height()+10); resize(size); - QFrame::show(); + TQFrame::show(); if(currentStr.length() != 0) startTicker(); currentChar = 0; @@ -116,16 +116,16 @@ void KSTicker::show() void KSTicker::hide() { killTimers(); - QFrame::hide(); + TQFrame::hide(); } void KSTicker::iconify() { - QFrame::showMinimized(); + TQFrame::showMinimized(); killTimers(); } -void KSTicker::setString(QString str) +void KSTicker::setString(TQString str) { strlist.clear(); strlist.append(str); @@ -133,24 +133,24 @@ void KSTicker::setString(QString str) startTicker(); } -void KSTicker::mergeString(QString str, QColor c) +void KSTicker::mergeString(TQString str, TQColor c) { int num = KSPainter::colour2num(c); if(num != -1){ - str.prepend(QString("~%1").arg(num)); + str.prepend(TQString("~%1").arg(num)); } mergeString(str); } -void KSTicker::mergeString(QString str) +void KSTicker::mergeString(TQString str) { - QRegExp rx("~n(\\S+)~n"); + TQRegExp rx("~n(\\S+)~n"); if(rx.search(str) >= 0){ int value = nickColourMaker::colourMaker()->findIdx(rx.cap(1)); if(value >= 0){ - QString newText = QString("~%1\\1~c").arg(value); + TQString newText = TQString("~%1\\1~c").arg(value); str.replace(rx, newText); } } @@ -160,7 +160,7 @@ void KSTicker::mergeString(QString str) if(strlist.count() > 5){ int found = 0; - QStringList::Iterator it = strlist.begin(); + TQStringList::Iterator it = strlist.begin(); for(; it != strlist.end(); it++){ if(((*it).find(ksopts->server["global"].nick, 0, FALSE) == -1) && ((*it).find(ksopts->server["global"].altNick, 0, FALSE) == -1)){ @@ -179,10 +179,10 @@ void KSTicker::mergeString(QString str) if(bScrollConstantly == FALSE) startTicker(); - QStringList sep = QStringList::split(" ", stripCols(str)); + TQStringList sep = TQStringList::split(" ", stripCols(str)); int len = 0; - QString brok; - QStringList::Iterator it = sep.begin(); + TQString brok; + TQStringList::Iterator it = sep.begin(); for(; it != sep.end(); ++it) { brok += *it + " "; len += (*it).length(); @@ -197,15 +197,15 @@ void KSTicker::mergeString(QString str) tipbuffer.append(brok); while(tipbuffer.count() > 10) tipbuffer.pop_front(); - QString tip = tipbuffer.join("\n"); + TQString tip = tipbuffer.join("\n"); -// QToolTip::remove(this); - QToolTip::add(this, tip); +// TQToolTip::remove(this); + TQToolTip::add(this, tip); } -void KSTicker::timerEvent(QTimerEvent *) +void KSTicker::timerEvent(TQTimerEvent *) { if((uint)currentChar >= currentStr.length()){ if(strlist.isEmpty()){ @@ -234,7 +234,7 @@ void KSTicker::timerEvent(QTimerEvent *) static BGMode bgmode = TransparentMode; bitBlt(pic, -tickStep, 0, pic); - QPainter p(pic); + TQPainter p(pic); cOffset += tickStep; if(cOffset >= onechar){ @@ -243,8 +243,8 @@ void KSTicker::timerEvent(QTimerEvent *) while(((currentStr[currentChar] == '~') || (currentStr[currentChar] == 0x03)) && (step > 0)){ step = 1; // reset in case it's our second, or more loop. - QString text = currentStr.mid(currentChar); - QString buf = ""; + TQString text = currentStr.mid(currentChar); + TQString buf = ""; if((text[step] >= '0') && (text[step] <= '9')) { @@ -344,7 +344,7 @@ void KSTicker::timerEvent(QTimerEvent *) } - QFont fnt = font(); + TQFont fnt = font(); fnt.setBold(bold); fnt.setUnderline(underline); fnt.setItalic(italics); @@ -364,20 +364,20 @@ void KSTicker::timerEvent(QTimerEvent *) bitBlt(this, 0, descent, pic); } -void KSTicker::paintEvent( QPaintEvent *) +void KSTicker::paintEvent( TQPaintEvent *) { if(isVisible() == FALSE) return; bitBlt(this, 0, descent, pic); } -void KSTicker::resizeEvent( QResizeEvent *e) +void KSTicker::resizeEvent( TQResizeEvent *e) { - QFrame::resizeEvent(e); + TQFrame::resizeEvent(e); onechar = fontMetrics().width("X"); chars = this->width() / onechar; killTimers(); - QPixmap *new_pic = new QPixmap(width() + onechar, height()); + TQPixmap *new_pic = new TQPixmap(width() + onechar, height()); new_pic->fill(backgroundColor()); bitBlt(new_pic, new_pic->width() - pic->width(), 0, @@ -390,7 +390,7 @@ void KSTicker::resizeEvent( QResizeEvent *e) startTicker(); } -void KSTicker::closeEvent( QCloseEvent *) +void KSTicker::closeEvent( TQCloseEvent *) { emit closing(); killTimers(); @@ -408,18 +408,18 @@ void KSTicker::stopTicker() killTimers(); } -void KSTicker::mouseDoubleClickEvent( QMouseEvent * ) +void KSTicker::mouseDoubleClickEvent( TQMouseEvent * ) { emit doubleClick(); } -void KSTicker::mousePressEvent( QMouseEvent *e) +void KSTicker::mousePressEvent( TQMouseEvent *e) { if(e->button() == RightButton){ popup->popup(this->cursor().pos()); } else{ - QFrame::mousePressEvent(e); + TQFrame::mousePressEvent(e); } } void KSTicker::fontSelector() @@ -434,8 +434,8 @@ void KSTicker::scrollRate() { SpeedDialog *sd = new SpeedDialog(tickRate, tickStep); sd->setLimit(5, 200, 1, onechar); - connect(sd, SIGNAL(stateChange(int, int)), - this, SLOT(setSpeed(int, int))); + connect(sd, TQT_SIGNAL(stateChange(int, int)), + this, TQT_SLOT(setSpeed(int, int))); sd->show(); } @@ -451,7 +451,7 @@ void KSTicker::scrollConstantly() conf->sync(); } -void KSTicker::updateFont(const QFont &font){ +void KSTicker::updateFont(const TQFont &font){ setFont(font); setFixedHeight((fontMetrics().height()+fontMetrics().descent()*2)*pHeight); resize(fontMetrics().width("X")*chars, @@ -474,18 +474,18 @@ void KSTicker::speed(int *_tickRate, int *_tickStep){ *_tickStep = tickStep; } -void KSTicker::setBackgroundColor ( const QColor &c ) +void KSTicker::setBackgroundColor ( const TQColor &c ) { - QFrame::setBackgroundColor(c); + TQFrame::setBackgroundColor(c); pic->fill(c); bitBlt(this, 0,0, pic); defbg = backgroundColor(); bg = backgroundColor(); } -void KSTicker::setPalette ( const QPalette & p ) +void KSTicker::setPalette ( const TQPalette & p ) { - QFrame::setPalette(p); + TQFrame::setPalette(p); pic->fill(backgroundColor()); bitBlt(this, 0,0, pic); @@ -495,10 +495,10 @@ void KSTicker::setPalette ( const QPalette & p ) fg = foregroundColor(); } -QString KSTicker::stripCols( QString str ) +TQString KSTicker::stripCols( TQString str ) { uint i = 0; - QString ret; + TQString ret; for(i = 0; i < str.length(); i++){ if(((str[i] == '~') || (str[i] == 0x03))){ if((str[i+1] >= '0') && diff --git a/ksirc/KSTicker/ksticker.h b/ksirc/KSTicker/ksticker.h index d11d8a0f..47beecac 100644 --- a/ksirc/KSTicker/ksticker.h +++ b/ksirc/KSTicker/ksticker.h @@ -1,11 +1,11 @@ #ifndef KSTICKER_H #define KSTICKER_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class SInfo { public: @@ -17,20 +17,20 @@ class KSTicker : public QFrame Q_OBJECT public: - KSTicker(QWidget * parent=0, const char * name=0, WFlags f=0); + KSTicker(TQWidget * parent=0, const char * name=0, WFlags f=0); virtual ~KSTicker(); - void setString(QString); - void mergeString(QString); - void mergeString(QString, QColor); + void setString(TQString); + void mergeString(TQString); + void mergeString(TQString, TQColor); virtual void show(); virtual void hide(); void speed(int *, int *); - virtual void setBackgroundColor ( const QColor & ); - virtual void setPalette ( const QPalette & p ); + virtual void setBackgroundColor ( const TQColor & ); + virtual void setPalette ( const TQPalette & p ); signals: void doubleClick(); @@ -42,29 +42,29 @@ public slots: protected slots: virtual void fontSelector(); virtual void scrollRate(); - virtual void updateFont(const QFont &font); + virtual void updateFont(const TQFont &font); virtual void scrollConstantly(); protected: - virtual void timerEvent ( QTimerEvent * ); - virtual void paintEvent ( QPaintEvent * ); - virtual void resizeEvent( QResizeEvent * ); - virtual void closeEvent( QCloseEvent * ); - virtual void mouseDoubleClickEvent( QMouseEvent * ); - virtual void mousePressEvent ( QMouseEvent * ); + virtual void timerEvent ( TQTimerEvent * ); + virtual void paintEvent ( TQPaintEvent * ); + virtual void resizeEvent( TQResizeEvent * ); + virtual void closeEvent( TQCloseEvent * ); + virtual void mouseDoubleClickEvent( TQMouseEvent * ); + virtual void mousePressEvent ( TQMouseEvent * ); virtual void iconify(); private: - QString stripCols(QString); + TQString stripCols(TQString); - QStringList strlist; /* everything left to parse */ - QStringList strbuffer; /* fifo of the last 10 lines to scroll in scroll constantly mode */ - QStringList tipbuffer; /* 5 lines for the tooltip */ - QString currentStr; /* the string we are currently parsing */ + TQStringList strlist; /* everything left to parse */ + TQStringList strbuffer; /* fifo of the last 10 lines to scroll in scroll constantly mode */ + TQStringList tipbuffer; /* 5 lines for the tooltip */ + TQString currentStr; /* the string we are currently parsing */ - QFont ourFont; + TQFont ourFont; int onechar; int chars; @@ -86,9 +86,9 @@ private: int iScrollItem; bool bAtEnd; - QPixmap *pic; + TQPixmap *pic; - QPopupMenu *popup; + TQPopupMenu *popup; /* * Drawing settings and variables @@ -96,10 +96,10 @@ private: bool bold; bool underline; bool italics; - QColor defbg; - QColor deffg; - QColor bg; - QColor fg; + TQColor defbg; + TQColor deffg; + TQColor bg; + TQColor fg; }; #endif // KSTICKER_H diff --git a/ksirc/KSTicker/ksttest.cpp b/ksirc/KSTicker/ksttest.cpp index 81373bd8..36ad249a 100644 --- a/ksirc/KSTicker/ksttest.cpp +++ b/ksirc/KSTicker/ksttest.cpp @@ -1,8 +1,8 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -19,7 +19,7 @@ StdInTicker::StdInTicker() : KSTicker() { kConfig->setGroup("defaults"); - QFont font; + TQFont font; font = kConfig->readFontEntry("font"); font.setFixedPitch(TRUE); setFont(font); @@ -45,8 +45,8 @@ void StdInTicker::readsocket(int socket) char buf[1024]; int bytes = read(socket, buf, 1024); if(bytes){ - QCString str(buf, bytes); - str.replace(QRegExp("\n"), " // "); + TQCString str(buf, bytes); + str.replace(TQRegExp("\n"), " // "); mergeString(str); } } @@ -56,7 +56,7 @@ void StdInTicker::end() delete this; } -void StdInTicker::closeEvent ( QCloseEvent *e ) +void StdInTicker::closeEvent ( TQCloseEvent *e ) { KSTicker::closeEvent(e); delete this; @@ -79,11 +79,11 @@ int main(int argc, char **argv){ opts.load(); StdInTicker *kst = new StdInTicker(); - QSocketNotifier *sn = new QSocketNotifier(0, QSocketNotifier::Read); - QObject::connect(sn, SIGNAL(activated(int)), - kst, SLOT(readsocket(int))); - QObject::connect(kst, SIGNAL(doubleClick()), kst, SLOT(end())); - QObject::connect(kst, SIGNAL(closing()), kst, SLOT(end())); + TQSocketNotifier *sn = new TQSocketNotifier(0, TQSocketNotifier::Read); + TQObject::connect(sn, TQT_SIGNAL(activated(int)), + kst, TQT_SLOT(readsocket(int))); + TQObject::connect(kst, TQT_SIGNAL(doubleClick()), kst, TQT_SLOT(end())); + TQObject::connect(kst, TQT_SIGNAL(closing()), kst, TQT_SLOT(end())); a.setMainWidget(kst); kst->show(); return a.exec(); diff --git a/ksirc/KSTicker/ksttest.h b/ksirc/KSTicker/ksttest.h index 9d166b66..d3e988ff 100644 --- a/ksirc/KSTicker/ksttest.h +++ b/ksirc/KSTicker/ksttest.h @@ -12,7 +12,7 @@ public: ~StdInTicker(); protected: - void closeEvent ( QCloseEvent * ); + void closeEvent ( TQCloseEvent * ); public slots: void readsocket(int socket); diff --git a/ksirc/KSTicker/speeddialog.cpp b/ksirc/KSTicker/speeddialog.cpp index eb1ff462..50cb8d80 100644 --- a/ksirc/KSTicker/speeddialog.cpp +++ b/ksirc/KSTicker/speeddialog.cpp @@ -15,16 +15,16 @@ SpeedDialog::SpeedDialog ( int tick, int step, - QWidget* parent, + TQWidget* parent, const char* name ) : speeddialogData( parent, name ) { setCaption(i18n( "Speed Setup") ); - connect(sliderTick, SIGNAL(valueChanged(int)), - lcdTick, SLOT(display(int))); - connect(sliderStep, SIGNAL(valueChanged(int)), - lcdStep, SLOT(display(int))); + connect(sliderTick, TQT_SIGNAL(valueChanged(int)), + lcdTick, TQT_SLOT(display(int))); + connect(sliderStep, TQT_SIGNAL(valueChanged(int)), + lcdStep, TQT_SLOT(display(int))); lcdTick->display(tick); sliderTick->setValue(tick); lcdStep->display(step); diff --git a/ksirc/KSTicker/speeddialog.h b/ksirc/KSTicker/speeddialog.h index 4efdb2a8..514c72ee 100644 --- a/ksirc/KSTicker/speeddialog.h +++ b/ksirc/KSTicker/speeddialog.h @@ -22,7 +22,7 @@ public: ( int tick, int step, - QWidget* parent = NULL, + TQWidget* parent = NULL, const char* name = NULL ); diff --git a/ksirc/KSTicker/speeddialogData.cpp b/ksirc/KSTicker/speeddialogData.cpp index 0dbb1c0b..822d6f7f 100644 --- a/ksirc/KSTicker/speeddialogData.cpp +++ b/ksirc/KSTicker/speeddialogData.cpp @@ -12,76 +12,76 @@ #include "speeddialogData.h" -#include +#include #include #include #include -#include +#include #include -speeddialogData::speeddialogData ( QWidget* parent, const char* name ) - :QDialog( parent, name, 0 ) +speeddialogData::speeddialogData ( TQWidget* parent, const char* name ) + :TQDialog( parent, name, 0 ) { - QGridLayout *grid = new QGridLayout( this, 3, 2 , KDialog::marginHint(), KDialog::spacingHint()); - sliderTick = new QSlider( this, "Slider_1" ); + TQGridLayout *grid = new TQGridLayout( this, 3, 2 , KDialog::marginHint(), KDialog::spacingHint()); + sliderTick = new TQSlider( this, "Slider_1" ); grid->addWidget( sliderTick, 0, 1 ); - connect( sliderTick, SIGNAL(valueChanged(int)), SLOT(updateTick(int)) ); - sliderTick->setOrientation( QSlider::Horizontal ); + connect( sliderTick, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(updateTick(int)) ); + sliderTick->setOrientation( TQSlider::Horizontal ); sliderTick->setRange( 10, 200 ); sliderTick->setSteps( 10, 50 ); sliderTick->setValue( 30 ); sliderTick->setTracking( TRUE ); - sliderTick->setTickmarks( QSlider::NoMarks ); + sliderTick->setTickmarks( TQSlider::NoMarks ); sliderTick->setTickInterval( 0 ); - sliderStep = new QSlider( this, "Slider_2" ); + sliderStep = new TQSlider( this, "Slider_2" ); grid->addWidget( sliderStep, 1, 1 ); - connect( sliderStep, SIGNAL(valueChanged(int)), SLOT(updateStep(int)) ); - sliderStep->setOrientation( QSlider::Horizontal ); + connect( sliderStep, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(updateStep(int)) ); + sliderStep->setOrientation( TQSlider::Horizontal ); sliderStep->setRange( 1, 10 ); sliderStep->setSteps( 1, 2 ); sliderStep->setValue( 3 ); sliderStep->setTracking( TRUE ); - sliderStep->setTickmarks( QSlider::NoMarks ); + sliderStep->setTickmarks( TQSlider::NoMarks ); sliderStep->setTickInterval( 0 ); - lcdTick = new QLCDNumber( this, "LCDNumber_1" ); + lcdTick = new TQLCDNumber( this, "LCDNumber_1" ); lcdTick->setFrameStyle( 33 ); lcdTick->setSmallDecimalPoint( FALSE ); lcdTick->setNumDigits( 3 ); - lcdTick->setMode( QLCDNumber::DEC ); - lcdTick->setSegmentStyle( QLCDNumber::Outline ); + lcdTick->setMode( TQLCDNumber::DEC ); + lcdTick->setSegmentStyle( TQLCDNumber::Outline ); grid->addWidget( lcdTick, 0, 2 ); - lcdStep = new QLCDNumber( this, "LCDNumber_2" ); + lcdStep = new TQLCDNumber( this, "LCDNumber_2" ); lcdStep->setFrameStyle( 33 ); lcdStep->setSmallDecimalPoint( FALSE ); lcdStep->setNumDigits( 3 ); - lcdStep->setMode( QLCDNumber::DEC ); - lcdStep->setSegmentStyle( QLCDNumber::Outline ); + lcdStep->setMode( TQLCDNumber::DEC ); + lcdStep->setSegmentStyle( TQLCDNumber::Outline ); grid->addWidget( lcdStep, 1, 2 ); - QLabel* dlgedit_Label_1; - dlgedit_Label_1 = new QLabel( this, "Label_1" ); + TQLabel* dlgedit_Label_1; + dlgedit_Label_1 = new TQLabel( this, "Label_1" ); dlgedit_Label_1->setText( i18n("Tick interval:") ); dlgedit_Label_1->setAlignment( 289 ); dlgedit_Label_1->setMargin( -1 ); grid->addWidget( dlgedit_Label_1, 0, 0 ); - QLabel* dlgedit_Label_2; - dlgedit_Label_2 = new QLabel( this, "Label_2" ); + TQLabel* dlgedit_Label_2; + dlgedit_Label_2 = new TQLabel( this, "Label_2" ); dlgedit_Label_2->setText( i18n("Step size:") ); dlgedit_Label_2->setAlignment( 289 ); dlgedit_Label_2->setMargin( -1 ); grid->addWidget( dlgedit_Label_2, 1, 0 ); - QPushButton* dlgedit_PushButton_2; + TQPushButton* dlgedit_PushButton_2; dlgedit_PushButton_2 = new KPushButton( KStdGuiItem::close(), this, "PushButton_2" ); - connect( dlgedit_PushButton_2, SIGNAL(pressed()), SLOT(terminate()) ); + connect( dlgedit_PushButton_2, TQT_SIGNAL(pressed()), TQT_SLOT(terminate()) ); // dlgedit_PushButton_2->setAutoRepeat( FALSE ); // dlgedit_PushButton_2->setAutoResize( FALSE ); grid->addWidget( dlgedit_PushButton_2, 2, 2 ); diff --git a/ksirc/KSTicker/speeddialogData.h b/ksirc/KSTicker/speeddialogData.h index 6e9f06f9..27b6c27a 100644 --- a/ksirc/KSTicker/speeddialogData.h +++ b/ksirc/KSTicker/speeddialogData.h @@ -13,9 +13,9 @@ #ifndef speeddialogData_included #define speeddialogData_included -#include -#include -#include +#include +#include +#include class speeddialogData : public QDialog { @@ -25,7 +25,7 @@ public: speeddialogData ( - QWidget* parent = NULL, + TQWidget* parent = NULL, const char* name = NULL ); @@ -41,10 +41,10 @@ protected slots: virtual void updateStep(int); protected: - QSlider* sliderTick; - QSlider* sliderStep; - QLCDNumber* lcdTick; - QLCDNumber* lcdStep; + TQSlider* sliderTick; + TQSlider* sliderStep; + TQLCDNumber* lcdTick; + TQLCDNumber* lcdStep; }; diff --git a/ksirc/NewWindowDialog.cpp b/ksirc/NewWindowDialog.cpp index c4af16f1..1a0f2dba 100644 --- a/ksirc/NewWindowDialog.cpp +++ b/ksirc/NewWindowDialog.cpp @@ -2,19 +2,19 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include "NewWindowDialog.h" -NewWindowDialog::NewWindowDialog(const KSircChannel &channelInfo, QWidget * parent, const char * name) +NewWindowDialog::NewWindowDialog(const KSircChannel &channelInfo, TQWidget * parent, const char * name) : KDialogBase(parent, name, true, i18n("New Window For"), Ok|Cancel, Ok, true), m_channelInfo(channelInfo) { - QHBox * w = makeHBoxMainWidget(); + TQHBox * w = makeHBoxMainWidget(); - QLabel * l = new QLabel(i18n("C&hannel/Nick:"), w); + TQLabel * l = new TQLabel(i18n("C&hannel/Nick:"), w); m_combo = new KHistoryCombo(w); m_combo->setFocus(); @@ -24,16 +24,16 @@ NewWindowDialog::NewWindowDialog(const KSircChannel &channelInfo, QWidget * pare l->setBuddy(m_combo); - QLabel * l2 = new QLabel(i18n("&Key:"), w); + TQLabel * l2 = new TQLabel(i18n("&Key:"), w); m_le = new KLineEdit(w); m_le->setEnabled(false); l2->setBuddy(m_le); connect( - m_combo, SIGNAL(activated(const QString &)), - m_combo, SLOT(addToHistory(const QString &))); - connect( m_combo->lineEdit(), SIGNAL(textChanged ( const QString & )), - this, SLOT( slotTextChanged( const QString &))); + m_combo, TQT_SIGNAL(activated(const TQString &)), + m_combo, TQT_SLOT(addToHistory(const TQString &))); + connect( m_combo->lineEdit(), TQT_SIGNAL(textChanged ( const TQString & )), + this, TQT_SLOT( slotTextChanged( const TQString &))); KConfig *kConfig = kapp->config(); KConfigGroupSaver saver(kConfig, "Recent"); @@ -48,7 +48,7 @@ NewWindowDialog::~NewWindowDialog() kConfig->writeEntry("Channels", m_combo->historyItems()); } -void NewWindowDialog::slotTextChanged( const QString &text) +void NewWindowDialog::slotTextChanged( const TQString &text) { enableButtonOK( !text.isEmpty() ); diff --git a/ksirc/NewWindowDialog.h b/ksirc/NewWindowDialog.h index 37449e0e..3590c691 100644 --- a/ksirc/NewWindowDialog.h +++ b/ksirc/NewWindowDialog.h @@ -14,13 +14,13 @@ class NewWindowDialog : public KDialogBase public: - NewWindowDialog(const KSircChannel &, QWidget * parent = 0, const char * name = 0); + NewWindowDialog(const KSircChannel &, TQWidget * parent = 0, const char * name = 0); ~NewWindowDialog(); protected slots: void slotOk(); - void slotTextChanged( const QString &); + void slotTextChanged( const TQString &); signals: void openTopLevel(const KSircChannel &); diff --git a/ksirc/ahistlineedit.cpp b/ksirc/ahistlineedit.cpp index 72e6da35..2455047d 100644 --- a/ksirc/ahistlineedit.cpp +++ b/ksirc/ahistlineedit.cpp @@ -34,7 +34,7 @@ focusOutEvent: ditto Variables: - QStrList: current list of history items. + TQStrList: current list of history items. current: what I think is the current list item. *************************************************************************/ @@ -43,31 +43,31 @@ #include "ahistlineedit.h" #include "colorpicker.h" #include "ksopts.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include #include -aHistLineEdit::aHistLineEdit(QWidget *parent, const char *name) - : QTextEdit(parent, name) +aHistLineEdit::aHistLineEdit(TQWidget *parent, const char *name) + : TQTextEdit(parent, name) { m_drawrect = false; m_height = 0; - current = hist.append(QString::null); // Set the current as blank - setWrapPolicy(QTextEdit::AtWordOrDocumentBoundary); + current = hist.append(TQString::null); // Set the current as blank + setWrapPolicy(TQTextEdit::AtWordOrDocumentBoundary); setVScrollBarMode( AlwaysOff ); setHScrollBarMode( AlwaysOff ); -// connect( this, SIGNAL( returnPressed () ), this, SLOT( slotReturn() ) ); - connect( this, SIGNAL( textChanged () ), this, SLOT( slotMaybeResize() ) ); +// connect( this, TQT_SIGNAL( returnPressed () ), this, TQT_SLOT( slotReturn() ) ); + connect( this, TQT_SIGNAL( textChanged () ), this, TQT_SLOT( slotMaybeResize() ) ); setTabChangesFocus(true); setTextFormat(PlainText); @@ -80,20 +80,20 @@ aHistLineEdit::aHistLineEdit(QWidget *parent, const char *name) void aHistLineEdit::setCursorPosition ( int index ) { - QTextEdit::setCursorPosition(0, index); + TQTextEdit::setCursorPosition(0, index); } int aHistLineEdit::cursorPosition() const { int par, index; - QTextEdit::getCursorPosition(&par, &index); + TQTextEdit::getCursorPosition(&par, &index); return index; } void aHistLineEdit::slotMaybeResize() { /* - if(QTextEdit::text().contains("\n")){ + if(TQTextEdit::text().contains("\n")){ setText(text()); setCursorPosition(text().length()); } @@ -112,7 +112,7 @@ void aHistLineEdit::slotMaybeResize() } } - QFontMetrics metrics( currentFont() ); + TQFontMetrics metrics( currentFont() ); // int h = metrics.height() * lines(); int h = metrics.lineSpacing() * lines()+8; // only grow if we are less than 1/4 the size of the toplevel @@ -127,11 +127,11 @@ void aHistLineEdit::slotMaybeResize() } if(h != m_height){ m_height = h; - QSize s = size(); + TQSize s = size(); s.setHeight(h); resize(s); setFixedHeight( h ); - QLayout *l = topLevelWidget()->layout(); + TQLayout *l = topLevelWidget()->layout(); if(l){ l->invalidate(); l->activate(); @@ -140,7 +140,7 @@ void aHistLineEdit::slotMaybeResize() } } -void aHistLineEdit::keyPressEvent( QKeyEvent *e ) +void aHistLineEdit::keyPressEvent( TQKeyEvent *e ) { bool accept = true; bool ignore = false; @@ -155,7 +155,7 @@ void aHistLineEdit::keyPressEvent( QKeyEvent *e ) // those keycodes correspond to the ones in ksirc.pl in sub hook_fixcolours if ( e->state() == ControlButton ) { - QString s = text(); + TQString s = text(); int curPos = cursorPosition(); switch ( e->key() ) { case Key_K: @@ -221,7 +221,7 @@ void aHistLineEdit::keyPressEvent( QKeyEvent *e ) callKeyPressEvent = true; } } - // QLineEdit falsely converts Alt+C to the character 'c', so to work around + // TQLineEdit falsely converts Alt+C to the character 'c', so to work around // this, we just don't pass any Alt+? key on to the keyPressEvent() method. else if (e->state() == AltButton) { switch(e->key()){ @@ -293,13 +293,13 @@ void aHistLineEdit::keyPressEvent( QKeyEvent *e ) } else { if ( callKeyPressEvent ) { - QTextEdit::keyPressEvent(e); + TQTextEdit::keyPressEvent(e); } } } } -bool aHistLineEdit::processKeyEvent( QKeyEvent *e ) +bool aHistLineEdit::processKeyEvent( TQKeyEvent *e ) { /* * Only put key sequences in here you @@ -322,13 +322,13 @@ bool aHistLineEdit::processKeyEvent( QKeyEvent *e ) void aHistLineEdit::ColourPickerPopUp() { ColorPicker picker( this ); - if ( picker.exec() == QDialog::Accepted ) + if ( picker.exec() == TQDialog::Accepted ) { - QString s = text(); + TQString s = text(); // int curPos = cursorPosition(); int curPos, p; getCursorPosition(&p, &curPos); - QString colString = picker.colorString(); + TQString colString = picker.colorString(); colString.prepend( 0x03 ); s.insert( curPos, colString ); setText( s ); @@ -336,42 +336,42 @@ void aHistLineEdit::ColourPickerPopUp() } } -void aHistLineEdit::focusInEvent(QFocusEvent *e) +void aHistLineEdit::focusInEvent(TQFocusEvent *e) { - QTextEdit::focusInEvent(e); + TQTextEdit::focusInEvent(e); emit gotFocus(); } -void aHistLineEdit::focusOutEvent(QFocusEvent *e) +void aHistLineEdit::focusOutEvent(TQFocusEvent *e) { - QTextEdit::focusOutEvent(e); + TQTextEdit::focusOutEvent(e); emit lostFocus(); } #if 0 -void aHistLineEdit::mousePressEvent ( QMouseEvent *e ) +void aHistLineEdit::mousePressEvent ( TQMouseEvent *e ) { if(e->button() == MidButton){ /* - * emit pasteText(QApplication::clipboard()->text(QClipboard::Selection)); + * emit pasteText(TQApplication::clipboard()->text(QClipboard::Selection)); */ } else{ - QTextEdit::mousePressEvent(e); + TQTextEdit::mousePressEvent(e); } } #endif -bool aHistLineEdit::eventFilter( QObject *o, QEvent *e ) +bool aHistLineEdit::eventFilter( TQObject *o, TQEvent *e ) { - if ( o == this && e->type() == QEvent::AccelOverride ) - if(processKeyEvent( static_cast( e ) ) == true) + if ( o == this && e->type() == TQEvent::AccelOverride ) + if(processKeyEvent( static_cast( e ) ) == true) return true; - return QTextEdit::eventFilter( o, e ); + return TQTextEdit::eventFilter( o, e ); } -QString aHistLineEdit::text() const +TQString aHistLineEdit::text() const { - QString s = QTextEdit::text(); + TQString s = TQTextEdit::text(); s.remove("\n"); return s; } @@ -381,27 +381,27 @@ void aHistLineEdit::paste() { /* we let the top level take it */ if(ksopts->oneLineEntry) { - emit pasteText(QApplication::clipboard()->text(QClipboard::Selection)); + emit pasteText(TQApplication::clipboard()->text(QClipboard::Selection)); } else { - QString paste = QApplication::clipboard()->text(QClipboard::Selection); + TQString paste = TQApplication::clipboard()->text(QClipboard::Selection); paste.replace("\n", " ~ "); insert(paste); } } -void aHistLineEdit::paintEvent ( QPaintEvent *p ) +void aHistLineEdit::paintEvent ( TQPaintEvent *p ) { - QTextEdit::paintEvent(p); + TQTextEdit::paintEvent(p); if(m_drawrect == true){ - QPainter paint(this); - QPen pen = paint.pen(); + TQPainter paint(this); + TQPen pen = paint.pen(); pen.setWidth(5); pen.setStyle(Qt::SolidLine); pen.setColor(palette().active().highlight()); paint.setPen(pen); - QRect r = frameRect(); + TQRect r = frameRect(); paint.drawRect(r); } @@ -414,7 +414,7 @@ void aHistLineEdit::doEnterKey() if (!text().isEmpty()) { // text() has something -> store it in current and add a new empty one *current = text(); - hist.append(QString::null); // always add empty line at end + hist.append(TQString::null); // always add empty line at end if (hist.count() >= 256) { // if appended check if it will go beyond the max number of entries hist.remove(hist.begin()); // if so then delete the first entry } @@ -424,7 +424,7 @@ void aHistLineEdit::doEnterKey() // both !isEmpty() and != -> append at end current = hist.fromLast(); // goto last entry which is empty *current = text(); // change content to text() - hist.append(QString::null); // always add empty line at end + hist.append(TQString::null); // always add empty line at end if (hist.count() >= 256) { // if appended check if it will go beyond the max number of entries hist.remove(hist.begin()); // if so then delete the first entry } diff --git a/ksirc/ahistlineedit.h b/ksirc/ahistlineedit.h index a273791f..750d79a0 100644 --- a/ksirc/ahistlineedit.h +++ b/ksirc/ahistlineedit.h @@ -1,27 +1,27 @@ #ifndef AHISTLINEEDIT_H #define AHISTLINEEDIT_H -#include -#include -#include +#include +#include +#include class aHistLineEdit : public QTextEdit { Q_OBJECT public: - aHistLineEdit(QWidget *parent = 0, const char *name = 0); + aHistLineEdit(TQWidget *parent = 0, const char *name = 0); int cursorPosition () const; void setCursorPosition(int); - QString text() const; + TQString text() const; signals: // Don't use returnPressed from the textEdit void gotReturnPressed(); void gotFocus(); void lostFocus(); - void pasteText(const QString&); + void pasteText(const TQString&); void notTab(); void resized(); @@ -30,22 +30,22 @@ public slots: virtual void slotMaybeResize(); protected: - bool processKeyEvent( QKeyEvent * ); - virtual void keyPressEvent ( QKeyEvent * ); - virtual void focusInEvent ( QFocusEvent * ); - virtual void focusOutEvent ( QFocusEvent * ); -// virtual void mousePressEvent ( QMouseEvent * ); + bool processKeyEvent( TQKeyEvent * ); + virtual void keyPressEvent ( TQKeyEvent * ); + virtual void focusInEvent ( TQFocusEvent * ); + virtual void focusOutEvent ( TQFocusEvent * ); +// virtual void mousePressEvent ( TQMouseEvent * ); - virtual bool eventFilter( QObject *o, QEvent *e ); + virtual bool eventFilter( TQObject *o, TQEvent *e ); - virtual void paintEvent ( QPaintEvent * ); + virtual void paintEvent ( TQPaintEvent * ); private: void doEnterKey(); - QStringList hist; - QStringList::Iterator current; + TQStringList hist; + TQStringList::Iterator current; void ColourPickerPopUp(); int m_height; diff --git a/ksirc/alistbox.cpp b/ksirc/alistbox.cpp index 9b632676..779bd730 100644 --- a/ksirc/alistbox.cpp +++ b/ksirc/alistbox.cpp @@ -16,42 +16,42 @@ #include "alistbox.h" #include "nickColourMaker.h" -#include -#include +#include +#include #include #include #include -aListBox::aListBox(QWidget *parent, const char *name ) - : QListBox(parent,name) +aListBox::aListBox(TQWidget *parent, const char *name ) + : TQListBox(parent,name) { clear(); p_scroll = palette().copy(); setAcceptDrops( true ); - connect(this, SIGNAL(selected (const QString&)), - this, SIGNAL(selectedNick(const QString&))); + connect(this, TQT_SIGNAL(selected (const TQString&)), + this, TQT_SIGNAL(selectedNick(const TQString&))); m_nickListDirty = true; updateNickPrefixWidth(); - connect( this, SIGNAL( contextMenuRequested( QListBoxItem *, const QPoint & ) ), - this, SLOT( reEmitContextMenuRequest( QListBoxItem * ) ) ); + connect( this, TQT_SIGNAL( contextMenuRequested( TQListBoxItem *, const TQPoint & ) ), + this, TQT_SLOT( reEmitContextMenuRequest( TQListBoxItem * ) ) ); } aListBox::~aListBox() { } -void aListBox::reEmitContextMenuRequest( QListBoxItem *item ) +void aListBox::reEmitContextMenuRequest( TQListBoxItem *item ) { emit contextMenuRequested( index( item ) ); } void aListBox::clear() { - QListBox::clear(); + TQListBox::clear(); } @@ -72,7 +72,7 @@ void aListBox::inSort ( nickListItem *lbi) m_nickListDirty = true; } -void aListBox::inSort ( QString text, bool top) +void aListBox::inSort ( TQString text, bool top) { nickListItem *nli = new nickListItem(); nli->setText(text); @@ -91,7 +91,7 @@ int aListBox::findSep() return i; } -int aListBox::searchFor(const QString &nick, bool &found, bool top) +int aListBox::searchFor(const TQString &nick, bool &found, bool top) { int min = 0, max = 0; int current = 0, compare = 0; @@ -198,7 +198,7 @@ bool aListBox::isTop(int index) return TRUE; } -int aListBox::findNick(const QString &str) +int aListBox::findNick(const TQString &str) { bool found; int index; @@ -213,15 +213,15 @@ int aListBox::findNick(const QString &str) } nickListItem *aListBox::item(int index){ - return (nickListItem *) QListBox::item(index); + return (nickListItem *) TQListBox::item(index); } -void aListBox::dragMoveEvent( QDragMoveEvent *e ) +void aListBox::dragMoveEvent( TQDragMoveEvent *e ) { bool ok = (count() > 0 && KURLDrag::canDecode( e )); if(!ok) - ok = QTextDrag::canDecode(e); + ok = TQTextDrag::canDecode(e); e->accept( ok ); if ( ok ) @@ -229,22 +229,22 @@ void aListBox::dragMoveEvent( QDragMoveEvent *e ) } -void aListBox::dropEvent( QDropEvent *e ) +void aListBox::dropEvent( TQDropEvent *e ) { - QListBoxItem *item = itemAt( e->pos() ); + TQListBoxItem *item = itemAt( e->pos() ); if ( !item ) return; setCurrentItem( item ); - QStringList urls; + TQStringList urls; KURLDrag::decodeLocalFiles( e, urls ); - QString text; + TQString text; if ( !urls.isEmpty() ) emit urlsDropped( urls, item->text() ); - else if(QTextDrag::decode(e, text)){ + else if(TQTextDrag::decode(e, text)){ emit textDropped( item, text); } } @@ -264,7 +264,7 @@ void aListBox::updateNeedNickPrefixFlag() const m_needNickPrefix = false; if(ksopts->useColourNickList == false){ - QListBoxItem *item = firstItem(); + TQListBoxItem *item = firstItem(); for (; item; item = item->next() ) { nickListItem *nickItem = static_cast( item ); @@ -282,15 +282,15 @@ void aListBox::updateNeedNickPrefixFlag() const m_nickListDirty = false; } -void aListBox::fontChange( const QFont &f ) +void aListBox::fontChange( const TQFont &f ) { - QListBox::fontChange( f ); + TQListBox::fontChange( f ); updateNickPrefixWidth(); } void aListBox::updateNickPrefixWidth() { - QFontMetrics metrics( font() ); + TQFontMetrics metrics( font() ); m_nickPrefixWidth = 0; @@ -320,7 +320,7 @@ void aListBox::clearAdvOps() } nickListItem::nickListItem() - : QListBoxItem() + : TQListBoxItem() { is_op = FALSE; is_voice = FALSE; @@ -330,7 +330,7 @@ nickListItem::nickListItem() } nickListItem::nickListItem(const nickListItem &old) - : QListBoxItem() + : TQListBoxItem() { is_op = old.is_op; is_voice = old.is_voice; @@ -372,20 +372,20 @@ void nickListItem::setIrcOp(bool _ircop) static_cast( listBox() )->setNickListDirty(); } -void nickListItem::forceColour(const QColor *col) +void nickListItem::forceColour(const TQColor *col) { forcedCol = col; } -void nickListItem::paint(QPainter *p) +void nickListItem::paint(TQPainter *p) { - QFontMetrics fm = p->fontMetrics(); + TQFontMetrics fm = p->fontMetrics(); int yPos; // vertical text position int nickPosX = 3; yPos = fm.ascent() + fm.leading()/2; - QPen pen = p->pen(); - QFont font = p->font(); + TQPen pen = p->pen(); + TQFont font = p->font(); if(ksopts->useColourNickList == true) { if(ksopts->nickColourization){ @@ -400,25 +400,25 @@ void nickListItem::paint(QPainter *p) } if(is_voice == TRUE){ - QPen open = p->pen(); + TQPen open = p->pen(); p->setPen(ksopts->channelColor); p->drawText( nickPosX, yPos, "+" ); nickPosX += fm.width( "+" ); p->setPen(open); -// p->fillRect(0,0, listBox()->maxItemWidth(), height(listBox()), QBrush(ksopts->channelColor, Qt::Dense7Pattern)); +// p->fillRect(0,0, listBox()->maxItemWidth(), height(listBox()), TQBrush(ksopts->channelColor, Qt::Dense7Pattern)); } if(is_op == TRUE) { - QPen open = p->pen(); + TQPen open = p->pen(); p->setPen(ksopts->errorColor); p->drawText( nickPosX, yPos, "@" ); nickPosX += fm.width( "@" ); p->setPen(open); -// p->fillRect(0,0, listBox()->maxItemWidth(), height(listBox()), QBrush(ksopts->errorColor, Qt::Dense7Pattern)); +// p->fillRect(0,0, listBox()->maxItemWidth(), height(listBox()), TQBrush(ksopts->errorColor, Qt::Dense7Pattern)); } if(is_away == TRUE) p->setPen(p->pen().color().dark(150)); if(is_ircop == TRUE){ - QPen open = p->pen(); + TQPen open = p->pen(); p->setPen(ksopts->errorColor); p->drawText( nickPosX, yPos, "*" ); nickPosX += fm.width( "*" ); @@ -435,7 +435,7 @@ void nickListItem::paint(QPainter *p) if(is_away == TRUE) p->setPen(p->pen().color().dark(150)); if(is_ircop == TRUE){ - QFont bfont = font; + TQFont bfont = font; bfont.setBold(TRUE); p->setFont(bfont); } @@ -460,9 +460,9 @@ void nickListItem::paint(QPainter *p) p->setFont(font); } -QString nickListItem::nickPrefix() const +TQString nickListItem::nickPrefix() const { - QString prefix; + TQString prefix; if ( voice() ) prefix += aListBox::nickPrefixVoice(); @@ -479,19 +479,19 @@ QString nickListItem::nickPrefix() const return prefix; } -int nickListItem::height(const QListBox *lb ) const +int nickListItem::height(const TQListBox *lb ) const { return lb->fontMetrics().lineSpacing() + 1; } -int nickListItem::width(const QListBox *lb ) const +int nickListItem::width(const TQListBox *lb ) const { return static_cast( lb )->nickPrefixWidth() + lb->fontMetrics().width( text() ) + 6; } -const QPixmap* nickListItem::pixmap() const +const TQPixmap* nickListItem::pixmap() const { return 0l; } diff --git a/ksirc/alistbox.h b/ksirc/alistbox.h index 0f818bba..e1e4c2c9 100644 --- a/ksirc/alistbox.h +++ b/ksirc/alistbox.h @@ -1,7 +1,7 @@ #ifndef ALISTBOX_H #define ALISTBOX_H -#include +#include #include "ksopts.h" class nickListItem : public QListBoxItem @@ -11,10 +11,10 @@ class nickListItem : public QListBoxItem nickListItem(const nickListItem &old); virtual ~nickListItem(); - virtual int height ( const QListBox * ) const; - virtual int width ( const QListBox * ) const; - QString text () const { return string; } - const QPixmap* pixmap () const; + virtual int height ( const TQListBox * ) const; + virtual int width ( const TQListBox * ) const; + TQString text () const { return string; } + const TQPixmap* pixmap () const; bool op() const { return is_op; } bool voice() const { return is_voice; } @@ -26,16 +26,16 @@ class nickListItem : public QListBoxItem void setAway(bool _away = FALSE); void setIrcOp(bool _ircop = FALSE); - void setText(const QString &str) { string = str; } + void setText(const TQString &str) { string = str; } - QString nickPrefix() const; + TQString nickPrefix() const; - void forceColour(const QColor *col); + void forceColour(const TQColor *col); nickListItem &operator= ( const nickListItem & nli ); protected: - virtual void paint ( QPainter * ); + virtual void paint ( TQPainter * ); private: bool is_op:1; @@ -43,8 +43,8 @@ protected: bool is_away:1; bool is_ircop:1; - QString string; - const QColor *forcedCol; + TQString string; + const TQColor *forcedCol; }; class aListBox : public QListBox @@ -52,20 +52,20 @@ class aListBox : public QListBox Q_OBJECT public: - aListBox(QWidget *parent = 0, const char *name = 0); + aListBox(TQWidget *parent = 0, const char *name = 0); virtual ~aListBox(); void clear(); void inSort ( nickListItem *); - void inSort ( QString text, bool top=FALSE); + void inSort ( TQString text, bool top=FALSE); nickListItem *item(int index); bool isTop(int index); - int findNick(const QString &str); + int findNick(const TQString &str); void clearAdvOps(); @@ -77,33 +77,33 @@ public: unsigned short int nickPrefixWidth() const { return m_nickPrefixWidth; } - virtual void fontChange( const QFont &f ); + virtual void fontChange( const TQFont &f ); - static QString nickPrefixOp() { return QString::fromLatin1( "o" ); } - static QString nickPrefixVoice() { return QString::fromLatin1( "v" ); } - static QString nickPrefixAway() { return QString::fromLatin1( "a" ); } - static QString nickPrefixIrcOp() { return QString::fromLatin1( "O" ); } + static TQString nickPrefixOp() { return TQString::fromLatin1( "o" ); } + static TQString nickPrefixVoice() { return TQString::fromLatin1( "v" ); } + static TQString nickPrefixAway() { return TQString::fromLatin1( "a" ); } + static TQString nickPrefixIrcOp() { return TQString::fromLatin1( "O" ); } signals: void contextMenuRequested(int index); - void selectedNick(const QString&); - void urlsDropped( const QStringList& urls, const QString& nick ); - void textDropped( const QListBoxItem *item, const QString& text ); + void selectedNick(const TQString&); + void urlsDropped( const TQStringList& urls, const TQString& nick ); + void textDropped( const TQListBoxItem *item, const TQString& text ); protected: virtual int findSep(); - virtual int searchFor(const QString &nick, bool &found, bool top); - virtual void dragMoveEvent( QDragMoveEvent * ); - virtual void dropEvent( QDropEvent * ); + virtual int searchFor(const TQString &nick, bool &found, bool top); + virtual void dragMoveEvent( TQDragMoveEvent * ); + virtual void dropEvent( TQDropEvent * ); private slots: - void reEmitContextMenuRequest( QListBoxItem *item ); + void reEmitContextMenuRequest( TQListBoxItem *item ); private: void updateNeedNickPrefixFlag() const; void updateNickPrefixWidth(); - QPalette p_scroll; + TQPalette p_scroll; mutable bool m_nickListDirty; mutable bool m_needNickPrefix; int m_nickPrefixWidth; diff --git a/ksirc/baserules.cpp b/ksirc/baserules.cpp index 11e5850c..df4a40cc 100644 --- a/ksirc/baserules.cpp +++ b/ksirc/baserules.cpp @@ -3,15 +3,15 @@ #include "ksopts.h" #include "ksircprocess.h" -#include +#include #include -void KSMBaseRules::sirc_receive(QCString, bool) +void KSMBaseRules::sirc_receive(TQCString, bool) { } -void KSMBaseRules::control_message(int, QString) +void KSMBaseRules::control_message(int, TQString) { } @@ -81,8 +81,8 @@ filterRuleList *KSMBaseRules::defaultRules() frl->append(fr); } if( ksopts->msgContainNick.isValid() ){ - //QString nick = ksopts->nick; - QString nick = ksircProcess()->getNick(); + //TQString nick = ksopts->nick; + TQString nick = ksircProcess()->getNick(); if ( !nick.isEmpty() ) { if(nick.length() > 83){ qDebug("Nick too long"); @@ -92,7 +92,7 @@ filterRuleList *KSMBaseRules::defaultRules() * Since the nick is used in the regex we must * escape all regex words */ - nick = QRegExp::escape(nick); + nick = TQRegExp::escape(nick); sprintf(match_us, "(?i)<\\S+>.*\\s%s(,.*|\02:.*|:.*|\\s.*|$)", nick.latin1()); @@ -107,16 +107,16 @@ filterRuleList *KSMBaseRules::defaultRules() } } if( ksopts->msg1Contain.isValid() ){ - //QString nick = ksopts->nick; + //TQString nick = ksopts->nick; /* * Since the nick is used in the regex we must * escape all regex words */ - QString msg = ksopts->msg1String; + TQString msg = ksopts->msg1String; if(msg.length() > 0){ if(ksopts->msg1Regex == false) - msg = QRegExp::escape(msg); + msg = TQRegExp::escape(msg); snprintf(msg1_match, 100, "(?i)<\\S+>.*\\s%s(,.*|\02:.*|:.*|\\s.*|$)", msg.latin1()); @@ -131,16 +131,16 @@ filterRuleList *KSMBaseRules::defaultRules() } } if( ksopts->msg2Contain.isValid() ){ - //QString nick = ksopts->nick; + //TQString nick = ksopts->nick; /* * Since the nick is used in the regex we must * escape all regex words */ - QString msg = ksopts->msg2String; + TQString msg = ksopts->msg2String; if(msg.length() > 0){ if(ksopts->msg2Regex == false) - msg = QRegExp::escape(msg); + msg = TQRegExp::escape(msg); snprintf(msg2_match, 100, "(?i)<\\S+>.*\\s%s(,.*|\02:.*|:.*|\\s.*|$)", msg.latin1()); diff --git a/ksirc/baserules.h b/ksirc/baserules.h index 690ed28e..1ba79bf7 100644 --- a/ksirc/baserules.h +++ b/ksirc/baserules.h @@ -15,9 +15,9 @@ public: { } - virtual void sirc_receive(QCString str, bool broadcast); + virtual void sirc_receive(TQCString str, bool broadcast); - virtual void control_message(int, QString); + virtual void control_message(int, TQString); filterRuleList *defaultRules(); diff --git a/ksirc/boundscheckingarray.h b/ksirc/boundscheckingarray.h index a8a29ca1..92b528b7 100644 --- a/ksirc/boundscheckingarray.h +++ b/ksirc/boundscheckingarray.h @@ -20,9 +20,9 @@ #define __boundscheckingarray__ #include -#include +#include -/* I wish QValueVector would check bounds upon extraction.. */ +/* I wish TQValueVector would check bounds upon extraction.. */ template class BoundsCheckingArray @@ -51,9 +51,9 @@ public: return m_data[ index ]; } - QValueVector toValueVector() const + TQValueVector toValueVector() const { - QValueVector vector( size ); + TQValueVector vector( size ); for ( unsigned int i = 0; i < size; ++i ) vector[ i ] = m_data[ i ]; return vector; diff --git a/ksirc/chanButtons.cpp b/ksirc/chanButtons.cpp index f40c7176..b6974fd5 100644 --- a/ksirc/chanButtons.cpp +++ b/ksirc/chanButtons.cpp @@ -9,65 +9,65 @@ #include #include -#include -#include -#include +#include +#include +#include #include "ksircprocess.h" -static void makeSquare(QWidget *w) +static void makeSquare(TQWidget *w) { - QSize sh = w->sizeHint(); + TQSize sh = w->sizeHint(); int s = sh.height(); w->setFixedSize(s,s); } -chanButtons::chanButtons(KSircProcess *proc, QWidget *parent, const char *name) -: QWidget(parent, name), +chanButtons::chanButtons(KSircProcess *proc, TQWidget *parent, const char *name) +: TQWidget(parent, name), m_proc(proc) { Popupmenu = new KPopupMenu( this ); Popupmenu->insertTitle(i18n("Channel Modes")); - toggleMenu[0] = Popupmenu->insertItem(i18n("i (invite-only)"), this, SLOT(invite())); - toggleMenu[1] = Popupmenu->insertItem(i18n("l (limited users)"), this, SLOT(limited())); - toggleMenu[2] = Popupmenu->insertItem(i18n("k (key to join)"), this, SLOT(key())); - toggleMenu[3] = Popupmenu->insertItem(i18n("s (secret)"), this, SLOT(secret())); + toggleMenu[0] = Popupmenu->insertItem(i18n("i (invite-only)"), this, TQT_SLOT(invite())); + toggleMenu[1] = Popupmenu->insertItem(i18n("l (limited users)"), this, TQT_SLOT(limited())); + toggleMenu[2] = Popupmenu->insertItem(i18n("k (key to join)"), this, TQT_SLOT(key())); + toggleMenu[3] = Popupmenu->insertItem(i18n("s (secret)"), this, TQT_SLOT(secret())); Popupmenu->insertSeparator(); Popupmenu->insertTitle(i18n("User Modes")); - toggleMenu[4] = Popupmenu->insertItem(i18n("i (be invisible)"), this, SLOT(invisible())); - toggleMenu[5] = Popupmenu->insertItem(i18n("w (receive wallops)"), this, SLOT(wallops())); - toggleMenu[6] = Popupmenu->insertItem(i18n("s (get server notices)"), this, SLOT(serverNotices())); + toggleMenu[4] = Popupmenu->insertItem(i18n("i (be invisible)"), this, TQT_SLOT(invisible())); + toggleMenu[5] = Popupmenu->insertItem(i18n("w (receive wallops)"), this, TQT_SLOT(wallops())); + toggleMenu[6] = Popupmenu->insertItem(i18n("s (get server notices)"), this, TQT_SLOT(serverNotices())); - layout = new QHBoxLayout(this); + layout = new TQHBoxLayout(this); layout->setSpacing(0); layout->setMargin(0); - protectButton = new QPushButton(i18n("T"), this); + protectButton = new TQPushButton(i18n("T"), this); protectButton->setToggleButton(true); makeSquare(protectButton); - QToolTip::add(protectButton, i18n("Only op'ed users can change the topic")); - connect(protectButton, SIGNAL(clicked()), this, SLOT(protectMode())); + TQToolTip::add(protectButton, i18n("Only op'ed users can change the topic")); + connect(protectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(protectMode())); layout->addWidget(protectButton); - outsideButton = new QPushButton(i18n("N"), this); + outsideButton = new TQPushButton(i18n("N"), this); outsideButton->setToggleButton(true); makeSquare(outsideButton); - QToolTip::add(outsideButton, i18n("No outside messages")); - connect(outsideButton, SIGNAL(clicked()), this, SLOT(outsideMode())); + TQToolTip::add(outsideButton, i18n("No outside messages")); + connect(outsideButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(outsideMode())); layout->addWidget(outsideButton); - moderateButton = new QPushButton(i18n("M"), this); + moderateButton = new TQPushButton(i18n("M"), this); moderateButton->setToggleButton(true); makeSquare(moderateButton); - QToolTip::add(moderateButton, i18n("Only op'ed users and voiced users (+v) can speak")); - connect(moderateButton, SIGNAL(clicked()), this, SLOT(moderateMode())); + TQToolTip::add(moderateButton, i18n("Only op'ed users and voiced users (+v) can speak")); + connect(moderateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(moderateMode())); layout->addWidget(moderateButton); - menuButton = new QPushButton(i18n("..."), this); + menuButton = new TQPushButton(i18n("..."), this); makeSquare(menuButton); menuButton->setFixedWidth(menuButton->width()*2); menuButton->setPopup(Popupmenu); - QToolTip::add(menuButton, i18n("More mode commands")); + TQToolTip::add(menuButton, i18n("More mode commands")); layout->addWidget(menuButton); } @@ -75,11 +75,11 @@ void chanButtons::invite() { if (Popupmenu->isItemChecked(toggleMenu[0])) { Popupmenu->setItemChecked(toggleMenu[0], false); - emit mode(QString("-i"), 0); + emit mode(TQString("-i"), 0); } else { Popupmenu->setItemChecked(toggleMenu[0], true); - emit mode(QString("+i"), 0); + emit mode(TQString("+i"), 0); } } @@ -89,11 +89,11 @@ void chanButtons::limited() chanDialog->exec(); if (chanDialog->sendLimitedUsers() == 0) { Popupmenu->setItemChecked(toggleMenu[1], false); - emit mode(QString("-l"), 0); + emit mode(TQString("-l"), 0); } else { Popupmenu->setItemChecked(toggleMenu[1], true); - emit mode(QString("+l %1").arg(chanDialog->sendLimitedUsers()), 0); + emit mode(TQString("+l %1").arg(chanDialog->sendLimitedUsers()), 0); } delete chanDialog; } @@ -104,12 +104,12 @@ void chanButtons::key() if (Popupmenu->isItemChecked(toggleMenu[2])) { chanDialog->exec(); Popupmenu->setItemChecked(toggleMenu[2], false); - emit mode(QString("-k %1").arg(chanDialog->sendKey()), 0); + emit mode(TQString("-k %1").arg(chanDialog->sendKey()), 0); } else { chanDialog->exec(); Popupmenu->setItemChecked(toggleMenu[2], true); - emit mode(QString("+k %1").arg(chanDialog->sendKey()), 0); + emit mode(TQString("+k %1").arg(chanDialog->sendKey()), 0); } delete chanDialog; } @@ -118,11 +118,11 @@ void chanButtons::secret() { if (Popupmenu->isItemChecked(toggleMenu[3])) { Popupmenu->setItemChecked(toggleMenu[3], false); - emit mode(QString("-s"), 0); + emit mode(TQString("-s"), 0); } else { Popupmenu->setItemChecked(toggleMenu[3], true); - emit mode(QString("+s"), 0); + emit mode(TQString("+s"), 0); } } @@ -130,11 +130,11 @@ void chanButtons::invisible() { if (Popupmenu->isItemChecked(toggleMenu[4])) { Popupmenu->setItemChecked(toggleMenu[4], false); - emit mode(QString("-i"), 1, m_proc->getNick()); + emit mode(TQString("-i"), 1, m_proc->getNick()); } else { Popupmenu->setItemChecked(toggleMenu[4], true); - emit mode(QString("+i"), 1, m_proc->getNick()); + emit mode(TQString("+i"), 1, m_proc->getNick()); } } @@ -142,11 +142,11 @@ void chanButtons::wallops() { if (Popupmenu->isItemChecked(toggleMenu[5])) { Popupmenu->setItemChecked(toggleMenu[5], false); - emit mode(QString("-w"), 1, m_proc->getNick()); + emit mode(TQString("-w"), 1, m_proc->getNick()); } else { Popupmenu->setItemChecked(toggleMenu[5], true); - emit mode(QString("+w"), 1, m_proc->getNick()); + emit mode(TQString("+w"), 1, m_proc->getNick()); } } @@ -154,36 +154,36 @@ void chanButtons::serverNotices() { if (Popupmenu->isItemChecked(toggleMenu[6])) { Popupmenu->setItemChecked(toggleMenu[6], false); - emit mode(QString("-s"), 1, m_proc->getNick()); + emit mode(TQString("-s"), 1, m_proc->getNick()); } else { Popupmenu->setItemChecked(toggleMenu[6], true); - emit mode(QString("+s"), 1, m_proc->getNick()); + emit mode(TQString("+s"), 1, m_proc->getNick()); } } void chanButtons::protectMode() { if (protectButton->isOn()) - emit mode(QString("+t"), 0); + emit mode(TQString("+t"), 0); else - emit mode(QString("-t"), 0); + emit mode(TQString("-t"), 0); } void chanButtons::outsideMode() { if (outsideButton->isOn()) - emit mode(QString("+n"), 0); + emit mode(TQString("+n"), 0); else - emit mode(QString("-n"), 0); + emit mode(TQString("-n"), 0); } void chanButtons::moderateMode() { if (moderateButton->isOn()) - emit mode(QString("+m"), 0); + emit mode(TQString("+m"), 0); else - emit mode(QString("-m"), 0); + emit mode(TQString("-m"), 0); } void chanButtons::setButtonsEnabled(bool enabled) @@ -203,14 +203,14 @@ void chanButtons::setMenuItemMode(int id, bool value) Popupmenu->setItemChecked(toggleMenu[id], value); } -chanbuttonsDialog::chanbuttonsDialog(const type &modeType, QWidget *parent, +chanbuttonsDialog::chanbuttonsDialog(const type &modeType, TQWidget *parent, const char *name, bool modal) : KDialog(parent, name, modal) { m_sendKey = ""; m_sendLimitedUsers = 0; resize(190, 82); setCaption(i18n("Limit Number of Users")); - LimitedLayout = new QVBoxLayout(this); + LimitedLayout = new TQVBoxLayout(this); LimitedLayout->setSpacing(9); LimitedLayout->setMargin(11); @@ -220,7 +220,7 @@ chanbuttonsDialog::chanbuttonsDialog(const type &modeType, QWidget *parent, LimitedLayout->addWidget(SpinBox); break; case key: - EditBox = new QLineEdit(this); + EditBox = new TQLineEdit(this); LimitedLayout->addWidget(EditBox); break; } @@ -230,28 +230,28 @@ chanbuttonsDialog::chanbuttonsDialog(const type &modeType, QWidget *parent, Layout->setMargin(0); okButton = new KPushButton(KStdGuiItem::ok(), this); - okButton->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, + okButton->setSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, okButton->sizePolicy().hasHeightForWidth())); Layout->addWidget(okButton); switch (modeType) { case limited: - connect(okButton, SIGNAL(clicked()), SLOT(limitedUsers())); + connect(okButton, TQT_SIGNAL(clicked()), TQT_SLOT(limitedUsers())); break; case key: - connect(okButton, SIGNAL(clicked()), SLOT(keyString())); + connect(okButton, TQT_SIGNAL(clicked()), TQT_SLOT(keyString())); break; } Layout->addWidget(okButton); cancelButton = new KPushButton(KStdGuiItem::cancel(), this); - cancelButton->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, + cancelButton->setSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, cancelButton->sizePolicy().hasHeightForWidth())); Layout->addWidget(cancelButton); - connect(cancelButton, SIGNAL(clicked()), SLOT(reject())); + connect(cancelButton, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); LimitedLayout->addLayout(Layout); - QSpacerItem *spacer = new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding); + TQSpacerItem *spacer = new TQSpacerItem(20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding); LimitedLayout->addItem(spacer); } diff --git a/ksirc/chanButtons.h b/ksirc/chanButtons.h index 2b7edc3a..a7000361 100644 --- a/ksirc/chanButtons.h +++ b/ksirc/chanButtons.h @@ -3,8 +3,8 @@ #ifndef CHANBUTTONS_H #define CHANBUTTONS_H -#include -#include +#include +#include #include class QHBoxLayout; @@ -21,7 +21,7 @@ class chanButtons : public QWidget Q_OBJECT friend class KSircTopLevel; public: - chanButtons(KSircProcess *proc, QWidget* parent=0, const char* name=0); + chanButtons(KSircProcess *proc, TQWidget* parent=0, const char* name=0); ~chanButtons() {}; void setProtectMode(bool value) { protectButton->setOn(value); } @@ -31,7 +31,7 @@ class chanButtons : public QWidget void setMenuItemMode(int, bool); signals: - void mode(QString, int, QString nick = QString::null); /// int == 0 channel mode, int == 1 user nick mode + void mode(TQString, int, TQString nick = TQString::null); /// int == 0 channel mode, int == 1 user nick mode private slots: void protectMode(); @@ -47,11 +47,11 @@ class chanButtons : public QWidget private: int toggleMenu[7]; - QHBoxLayout *layout; - QPushButton *protectButton; - QPushButton *moderateButton; - QPushButton *outsideButton; - QPushButton *menuButton; + TQHBoxLayout *layout; + TQPushButton *protectButton; + TQPushButton *moderateButton; + TQPushButton *outsideButton; + TQPushButton *menuButton; KPopupMenu *Popupmenu; chanbuttonsDialog *chanDialog; KSircProcess *m_proc; @@ -63,22 +63,22 @@ class chanbuttonsDialog : public KDialog friend class chanButtons; public: enum type { limited, key }; - chanbuttonsDialog(const type &modeType, QWidget *parent=0, const char *name=0, bool modal=true); + chanbuttonsDialog(const type &modeType, TQWidget *parent=0, const char *name=0, bool modal=true); ~chanbuttonsDialog() {}; private slots: void keyString(); void limitedUsers(); - QString sendKey() { return m_sendKey; } + TQString sendKey() { return m_sendKey; } int sendLimitedUsers() { return m_sendLimitedUsers; }; private: - QString m_sendKey; + TQString m_sendKey; int m_sendLimitedUsers; - QVBoxLayout *LimitedLayout; - QHBoxLayout *Layout; + TQVBoxLayout *LimitedLayout; + TQHBoxLayout *Layout; KIntSpinBox *SpinBox; - QLineEdit *EditBox; + TQLineEdit *EditBox; KPushButton *okButton; KPushButton *cancelButton; }; diff --git a/ksirc/chanparser.cpp b/ksirc/chanparser.cpp index 8429a6f5..f3015019 100644 --- a/ksirc/chanparser.cpp +++ b/ksirc/chanparser.cpp @@ -13,15 +13,15 @@ #include -#include -#include +#include +#include #include #include #include -#include +#include // Static parser table is "initialized" -QDict ChannelParser::parserTable; +TQDict ChannelParser::parserTable; ChannelParser::ChannelParser(KSircTopLevel *_top) @@ -64,13 +64,13 @@ ChannelParser::ChannelParser(KSircTopLevel *_top) } -parseResult *ChannelParser::parse(QString string) +parseResult *ChannelParser::parse(TQString string) { // for older Qts parseFunc *pf; if(string.length() < 3){ - return new parseError(string, QString("Dumb string, too short")); + return new parseError(string, TQString("Dumb string, too short")); } /** @@ -85,8 +85,8 @@ parseResult *ChannelParser::parse(QString string) if ((string[0] == '`') & (string.length() > 7)) { - QString prefix = "`"+string[7]+"`"; - string = prefix + QString(" ") + string.mid(8).stripWhiteSpace(); + TQString prefix = "`"+string[7]+"`"; + string = prefix + TQString(" ") + string.mid(8).stripWhiteSpace(); } else if((string[0] == '*') && (string[1] == ' ')) { string.insert(1, ' '); @@ -114,31 +114,31 @@ parseResult *ChannelParser::parse(QString string) return 0; } -parseResult * ChannelParser::parseSSFEClear(QString string) +parseResult * ChannelParser::parseSSFEClear(TQString string) { // top->mainw->clear(); top->clearWindow(); // top->mainw->repaint(TRUE); string.truncate(0); - return new parseSucc(QString::null); // Null string, don't display anything + return new parseSucc(TQString::null); // Null string, don't display anything } -parseResult * ChannelParser::parseSSFEStatus(QString string) +parseResult * ChannelParser::parseSSFEStatus(TQString string) { string.remove(0, 12); // strip off the first 12 characters " [sirc] " if(string.length() == 0) return new parseError("", i18n("Unable to parse status string")); //kdDebug(5008) << "String: " << string << endl; - QRegExp rx("(\\S+).*\\(*([+-]*[+-\\w\\d]*)\\)*.*on (\\S+) \\((\\S+)\\)"); + TQRegExp rx("(\\S+).*\\(*([+-]*[+-\\w\\d]*)\\)*.*on (\\S+) \\((\\S+)\\)"); if(rx.search(string) == -1){ return new parseError("", i18n("Unable to parse status (no known format) string")); } - QString nick = rx.cap(1); - QString modes = rx.cap(2); - QString chan = rx.cap(3); - QString chanmode = rx.cap(4); + TQString nick = rx.cap(1); + TQString modes = rx.cap(2); + TQString chan = rx.cap(3); + TQString chanmode = rx.cap(4); /* * fix up modes which may have gotten the (away) part @@ -191,24 +191,24 @@ parseResult * ChannelParser::parseSSFEStatus(QString string) top->channelButtons->setMenuItemMode(6, true); else top->channelButtons->setMenuItemMode(6, false); - QString status_line = QString("%1 (%2) %3 (%4) ").arg(chan).arg(chanmode).arg(nick).arg(modes); + TQString status_line = TQString("%1 (%2) %3 (%4) ").arg(chan).arg(chanmode).arg(nick).arg(modes); /* * Go srearching for key and limit messages */ - QRegExp rxKey(""); + TQRegExp rxKey(""); if(rxKey.search(string) >= 0){ top->channelButtons->setMenuItemMode(2, true); - status_line += QString("").arg(rxKey.cap(1)); + status_line += TQString("").arg(rxKey.cap(1)); } else { top->channelButtons->setMenuItemMode(2, false); } - QRegExp rxLimit(""); + TQRegExp rxLimit(""); if(rxLimit.search(string) >= 0){ top->channelButtons->setMenuItemMode(1, true); - status_line += QString("").arg(rxLimit.cap(1)); + status_line += TQString("").arg(rxLimit.cap(1)); } else { top->channelButtons->setMenuItemMode(1, false); @@ -241,38 +241,38 @@ parseResult * ChannelParser::parseSSFEStatus(QString string) top->caption = status_line; // Make copy so we're not // constantly changing the title bar } - return new parseSucc(QString::null); // Null string, don't display anything + return new parseSucc(TQString::null); // Null string, don't display anything } -parseResult * ChannelParser::parseSSFEInit(QString) +parseResult * ChannelParser::parseSSFEInit(TQString) { - return new parseSucc(QString::null); // Null string, don't display anything + return new parseSucc(TQString::null); // Null string, don't display anything } -parseResult * ChannelParser::parseSSFEOut(QString) +parseResult * ChannelParser::parseSSFEOut(TQString) { - return new parseSucc(QString::null); // Null string, don't display anything + return new parseSucc(TQString::null); // Null string, don't display anything } -parseResult * ChannelParser::parseSSFEMsg(QString string) +parseResult * ChannelParser::parseSSFEMsg(TQString string) { if(string.length() > 100) - return new parseError(QString::null, i18n("String length for nick is greater than 100 characters. This is unacceptably long.")); + return new parseError(TQString::null, i18n("String length for nick is greater than 100 characters. This is unacceptably long.")); int l = string.length(); if (l <= 0) return new parseError(string, i18n("String not long enough")); - return new parseSucc(QString::null); // Null string, don't display anything + return new parseSucc(TQString::null); // Null string, don't display anything } -parseResult * ChannelParser::parseSSFEPrompt(QString string) +parseResult * ChannelParser::parseSSFEPrompt(TQString string) { if(prompt_active == FALSE){ - QString prompt, caption; + TQString prompt, caption; ssfePrompt *sp; // Flush the screen. @@ -280,7 +280,7 @@ parseResult * ChannelParser::parseSSFEPrompt(QString string) // (it's garunteed to be the first one) top->LineBuffer.remove( *top->LineBuffer.begin() ); top->Buffer = FALSE; - top->sirc_receive(QString("")); + top->sirc_receive(TQString("")); // "'[pP]' " gives 4 spaces if(string.length() < 5) @@ -293,7 +293,7 @@ parseResult * ChannelParser::parseSSFEPrompt(QString string) // if we haven't popped up on the remote display yet. KSirc::TextParagIterator it = top->mainw->firstParag(); - QString last; + TQString last; while(it.atEnd() == FALSE) { last = it.plainText(); ++it; @@ -319,39 +319,39 @@ parseResult * ChannelParser::parseSSFEPrompt(QString string) prompt_active = FALSE; } - return new parseSucc(QString::null); // Null string, don't display anything + return new parseSucc(TQString::null); // Null string, don't display anything } -parseResult * ChannelParser::parseSSFEReconnect(QString) +parseResult * ChannelParser::parseSSFEReconnect(TQString) { if(top->channelInfo().channel()[0] == '#' || top->channelInfo().channel()[0] == '&'){ - QString str = "/join " + QString(top->channelInfo().channel()) + "\n"; + TQString str = "/join " + TQString(top->channelInfo().channel()) + "\n"; emit top->outputUnicodeLine(str); } - return new parseSucc(QString::null); // Null string, don't display anything + return new parseSucc(TQString::null); // Null string, don't display anything } -parseResult * ChannelParser::parseINFOInfo(QString string) +parseResult * ChannelParser::parseINFOInfo(TQString string) { string.remove(0, 3); // takes off the junk return new parseSucc(string, ksopts->infoColor, "user|servinfo"); // Null string, don't display anything } -parseResult * ChannelParser::parseINFOError(QString string) +parseResult * ChannelParser::parseINFOError(TQString string) { string.remove(0, 3); // strip the junk return new parseSucc(string,ksopts->errorColor, "user|error"); // Null string, don't display anything } -parseResult * ChannelParser::parseINFONicks(QString in_string) +parseResult * ChannelParser::parseINFONicks(TQString in_string) { - QString string = in_string; - QString channel_name; + TQString string = in_string; + TQString channel_name; bool clear_box = FALSE; // Check to see if it's a continued line @@ -368,12 +368,12 @@ parseResult * ChannelParser::parseINFONicks(QString in_string) top->nicks->setCurrentItem(current_item); top->nicks->setTopItem(top_item); top->nicks->repaint(TRUE); - return new parseSucc(QString::null); // Parsing ok, don't print anything though + return new parseSucc(TQString::null); // Parsing ok, don't print anything though } else if(string[1] == '$'){ top->nicks->clearAdvOps(); //kdDebug(5008) << "Turning off advanced ops" << endl; - return new parseSucc(QString::null); // Parsing ok, don't print anything though + return new parseSucc(TQString::null); // Parsing ok, don't print anything though } @@ -381,7 +381,7 @@ parseResult * ChannelParser::parseINFONicks(QString in_string) // Search for the first space, since : can be embeded into channel names. //count = sscanf(string, "*!* Users on %100[^ ]", channelInfo().channel()); // *!* Users on #TEST: boren asj asj_ - QRegExp rx("\\*\\S\\* Users on (\\S+): (.+)"); + TQRegExp rx("\\*\\S\\* Users on (\\S+): (.+)"); if(rx.search(string) == -1){ return new parseError(string, i18n("Could not find channel name")); } @@ -407,10 +407,10 @@ parseResult * ChannelParser::parseINFONicks(QString in_string) //strcpy(place_holder, string.ascii()+start+2); //nick = strtok(place_holder, " "); // while(nick != 0x0){ // While there's nick to go... - QStringList nicks = QStringList::split(QRegExp("\\s+"), rx.cap(2)); + TQStringList nicks = TQStringList::split(TQRegExp("\\s+"), rx.cap(2)); - for ( QStringList::Iterator it = nicks.begin(); it != nicks.end(); ++it ) { - QString nick = *it; + for ( TQStringList::Iterator it = nicks.begin(); it != nicks.end(); ++it ) { + TQString nick = *it; nickListItem *irc = new nickListItem(); bool done = FALSE; @@ -448,17 +448,17 @@ parseResult * ChannelParser::parseINFONicks(QString in_string) top->nicks->inSort(irc); } - return new parseSucc(QString::null); // Parsing ok, don't print anything though + return new parseSucc(TQString::null); // Parsing ok, don't print anything though } -parseResult * ChannelParser::parseINFOJoin(QString string) +parseResult * ChannelParser::parseINFOJoin(TQString string) { string.remove(0, 4); // strip *>* to save a few compares // You have joined channel #Linux - QRegExp rx("You have joined channel (\\S+)"); + TQRegExp rx("You have joined channel (\\S+)"); if(rx.search(string) != -1){ - //QString channel = rx.cap(1).lower(); - QString channel = rx.cap(1); + //TQString channel = rx.cap(1).lower(); + TQString channel = rx.cap(1); //kdDebug(5008) << "Channel: " << channel << endl; if(top->channelInfo().channel() != channel) { @@ -474,8 +474,8 @@ parseResult * ChannelParser::parseINFOJoin(QString string) // reef-diddy (nenernener@xnet-3B34A9E2.snet.net) has joined channel #aquaria rx.setPattern("(\\S+) .+ has joined channel (\\S+)"); if(rx.search(string) != -1){ - QString nick = rx.cap(1); - QString channel = rx.cap(2).lower(); + TQString nick = rx.cap(1); + TQString channel = rx.cap(2).lower(); //kdDebug(5008) << "Channel: " << channel << " nick: " << nick << endl; if(top->channelInfo().channel().lower() != channel){ return new parseWrongChannel(" " + string, ksopts->errorColor, "user|join"); @@ -490,12 +490,12 @@ parseResult * ChannelParser::parseINFOJoin(QString string) return 0; // ?? } -parseResult * ChannelParser::parseINFOPart(QString string) +parseResult * ChannelParser::parseINFOPart(TQString string) { bool foundNick = false; - QString pixname = "user|kick"; - QString nick(""); + TQString pixname = "user|kick"; + TQString nick(""); string.remove(0, 4); // clear junk @@ -507,7 +507,7 @@ parseResult * ChannelParser::parseINFOPart(QString string) // 3. /kick, kicked off the channel, nick after "kicked off \w+$" // // Signoff: looser - QRegExp rx("Signoff: (\\S+)"); + TQRegExp rx("Signoff: (\\S+)"); if(rx.search(string) != -1) { nick = rx.cap(1); foundNick = true; @@ -521,11 +521,11 @@ parseResult * ChannelParser::parseINFOPart(QString string) */ rx.setPattern("You have left channel (\\S+)"); if((foundNick == false) && (rx.search(string) != -1)) { - QString channel = rx.cap(1); + TQString channel = rx.cap(1); if(top->channelInfo().channel().lower() == channel.lower()) { - QApplication::postEvent(top, new QCloseEvent()); + TQApplication::postEvent(top, new TQCloseEvent()); // WE'RE DEAD - return new parseSucc(QString::null); + return new parseSucc(TQString::null); } pixname = "user|part"; } @@ -535,12 +535,12 @@ parseResult * ChannelParser::parseINFOPart(QString string) */ rx.setPattern("You have been kicked off channel (\\S+)"); if((foundNick == false) && (rx.search(string) != -1)) { - QString channel = rx.cap(1); + TQString channel = rx.cap(1); if(top->channelInfo().channel().lower() != channel.lower()) return new parseWrongChannel(string, ksopts->errorColor, "user|kick"); if (ksopts->autoRejoin == TRUE) { - QString str = QString("/join %1\n").arg(top->channelInfo().channel()); + TQString str = TQString("/join %1\n").arg(top->channelInfo().channel()); emit top->outputUnicodeLine(str); /* if(top->ticker) top->ticker->show(); @@ -555,7 +555,7 @@ parseResult * ChannelParser::parseINFOPart(QString string) int result = KMessageBox::questionYesNo(top, string, i18n("You Have Been Kicked"), i18n("Rejoin"), i18n("Leave")); if (result == KMessageBox::Yes) { - QString str = QString("/join %1\n").arg(top->channelInfo().channel()); + TQString str = TQString("/join %1\n").arg(top->channelInfo().channel()); emit top->outputUnicodeLine(str); /* if(top->ticker) * top->ticker->show(); @@ -566,7 +566,7 @@ parseResult * ChannelParser::parseINFOPart(QString string) else { // WE'RE DEAD - QApplication::postEvent(top, new QCloseEvent()); + TQApplication::postEvent(top, new TQCloseEvent()); top->KickWinOpen = false; } } @@ -578,13 +578,13 @@ parseResult * ChannelParser::parseINFOPart(QString string) rx.setPattern("(\\S+) has left channel (\\S+)"); if((foundNick == false) && (rx.search(string) != -1)) { nick = rx.cap(1); - QString channel = rx.cap(2); + TQString channel = rx.cap(2); // kdDebug(5008) << "Nick: " << nick << " Channel: " << channel << " top: " << top->channelInfo().channel() << endl; if(top->channelInfo().channel().lower() == channel.lower()) { foundNick = true; } else{ - return new parseWrongChannel(QString::null); + return new parseWrongChannel(TQString::null); } pixname = "user|part"; highlightNick(string, nick); @@ -595,11 +595,11 @@ parseResult * ChannelParser::parseINFOPart(QString string) rx.setPattern("(\\S+) has been kicked off channel (\\S+)"); if((foundNick == false) && (rx.search(string) != -1)) { nick = rx.cap(1); - QString channel = rx.cap(2); + TQString channel = rx.cap(2); if(top->channelInfo().channel().lower() == channel.lower()) { foundNick = true; } else { - return new parseWrongChannel(QString::null); + return new parseWrongChannel(TQString::null); } highlightNick(string, nick); pixname = "user|kick"; @@ -615,7 +615,7 @@ parseResult * ChannelParser::parseINFOPart(QString string) return new parseJoinPart(" " + string, ksopts->channelColor, pixname); } else { - return new parseJoinPart(QString::null); + return new parseJoinPart(TQString::null); } } else { @@ -625,10 +625,10 @@ parseResult * ChannelParser::parseINFOPart(QString string) return 0; } -parseResult * ChannelParser::parseINFOChangeNick(QString string) +parseResult * ChannelParser::parseINFOChangeNick(TQString string) { //char old_nick[101], new_nick[101]; - QString old_nick, new_nick; + TQString old_nick, new_nick; string.remove(0, 4); // Remove the leading *N* and space @@ -636,7 +636,7 @@ parseResult * ChannelParser::parseINFOChangeNick(QString string) * *N* asj_ is now known as bleh */ //kdDebug(5008) << "Nick change: " << string << endl; - QRegExp rx("(\\S+) is now known as (\\S+)"); + TQRegExp rx("(\\S+) is now known as (\\S+)"); if(rx.search(string) == -1){ if(string.contains("already taken")){ return new parseSucc(" " + string, ksopts->errorColor, "user|error"); @@ -687,29 +687,29 @@ parseResult * ChannelParser::parseINFOChangeNick(QString string) top->channelInfo().channel() == old_nick) return new parseSucc(" " + string, ksopts->channelColor, "user|elipsis"); else - return new parseSucc(QString::null); + return new parseSucc(TQString::null); } // warning("Toplevel-N: nick change search failed on %s", s3.data()); - // return new parseSucc(QString::null); + // return new parseSucc(TQString::null); } class mode_info { public: - mode_info(bool op, QChar mode, QString arg); + mode_info(bool op, TQChar mode, TQString arg); bool op() const; - QChar mode() const; - QString arg() const; + TQChar mode() const; + TQString arg() const; private: const bool m_op; - const QChar m_mode; - const QString m_arg; + const TQChar m_mode; + const TQString m_arg; }; -mode_info::mode_info(bool op, QChar mode, QString arg) : +mode_info::mode_info(bool op, TQChar mode, TQString arg) : m_op(op), m_mode(mode), m_arg(arg) @@ -720,16 +720,16 @@ bool mode_info::op() const { return m_op; } -QChar mode_info::mode() const { +TQChar mode_info::mode() const { return m_mode; } -QString mode_info::arg() const { +TQString mode_info::arg() const { return m_arg; } -parseResult * ChannelParser::parseINFOMode(QString string) +parseResult * ChannelParser::parseINFOMode(TQString string) { // Basic idea here is simple, go through the mode change and // assign each mode a + or a - and an argument or "" if there is @@ -744,7 +744,7 @@ parseResult * ChannelParser::parseINFOMode(QString string) /* * 1k is pretty safe since KProcess returns 1 k blocks, and lines don't get split between reads. This is emprical */ - QString modes, args, channel; + TQString modes, args, channel; int found = 0; if(string.find("for user") >= 0) @@ -753,7 +753,7 @@ parseResult * ChannelParser::parseINFOMode(QString string) /* * We need to 2 scanf's, one for the case of arguments, and one for no args. */ - QRegExp rx("Mode change \"(\\S+) *([^\"]*)\" on channel (\\S+)"); + TQRegExp rx("Mode change \"(\\S+) *([^\"]*)\" on channel (\\S+)"); if(rx.search(string) >= 0){ modes = rx.cap(1); args = rx.cap(2); @@ -780,7 +780,7 @@ parseResult * ChannelParser::parseINFOMode(QString string) if(found == 0) - return new parseError(" Failed to parse mode change: " + string, QString::null); + return new parseError(" Failed to parse mode change: " + string, TQString::null); /* * op specifie if it's a + or -. tru is + false is - @@ -791,13 +791,13 @@ parseResult * ChannelParser::parseINFOMode(QString string) * we use the itirator to tstep through the list * as need be */ - QStringList arglist = QStringList::split(" ", args); - QStringList::Iterator ai = arglist.begin(); + TQStringList arglist = TQStringList::split(" ", args); + TQStringList::Iterator ai = arglist.begin(); /* * the ptr list structure contains the parsed contents */ - QPtrList pmList; + TQPtrList pmList; pmList.setAutoDelete(true); for(uint pos = 0; pos < modes.length(); pos++){ @@ -814,7 +814,7 @@ parseResult * ChannelParser::parseINFOMode(QString string) * +l otoh does, so read the argument */ if(op == false){ - pmList.append(new mode_info(op, 'l', QString::null)); + pmList.append(new mode_info(op, 'l', TQString::null)); break; } case 'o': // Op, arg is the nick @@ -822,7 +822,7 @@ parseResult * ChannelParser::parseINFOMode(QString string) case 'b': // Ban, arg is mask banned case 'k': // kcik, arg is nick if(ai == NULL) - return new parseError(i18n("Unable to parse mode change: %1").arg(string), QString::null); + return new parseError(i18n("Unable to parse mode change: %1").arg(string), TQString::null); pmList.append(new mode_info(op, modes.at(pos), *ai)); ai++; break; @@ -837,11 +837,11 @@ parseResult * ChannelParser::parseINFOMode(QString string) /* * Mode changes which don't take args */ - pmList.append(new mode_info(op, modes.at(pos), QString::null)); + pmList.append(new mode_info(op, modes.at(pos), TQString::null)); break; default: kdDebug(5008) << "Unknown mode change: " << modes.mid(pos, 1) << " Assume no args" << endl; - pmList.append(new mode_info(op, modes.at(pos), QString::null)); + pmList.append(new mode_info(op, modes.at(pos), TQString::null)); } } // We have the modes set in mode and arg, now we go though @@ -851,7 +851,7 @@ parseResult * ChannelParser::parseINFOMode(QString string) bool mode_b_plus = false; bool mode_b_minus = false; - QPtrListIterator it(pmList); + TQPtrListIterator it(pmList); const mode_info *mi; while ( (mi = it.current()) != 0 ) { ++it; @@ -944,9 +944,9 @@ parseResult * ChannelParser::parseINFOMode(QString string) } } else{ - QChar c(mi->mode()); - QString m(&c, 1); - QString o; + TQChar c(mi->mode()); + TQString m(&c, 1); + TQString o; if(mi->op()) o = "+"; else @@ -957,7 +957,7 @@ parseResult * ChannelParser::parseINFOMode(QString string) /* * We're all done, so output the message and be done with it */ - QString pixname = "user|mode"; + TQString pixname = "user|mode"; if(mode_o_plus) pixname = "user|oplus"; @@ -971,7 +971,7 @@ parseResult * ChannelParser::parseINFOMode(QString string) return new parseSucc(" " + string, ksopts->infoColor, pixname); } -parseResult * ChannelParser::parseCTCPAction(QString string) +parseResult * ChannelParser::parseCTCPAction(TQString string) { string.remove(0, 2); // * use fancy * pixmap. Remove 2, leave one for space after te * @@ -979,7 +979,7 @@ parseResult * ChannelParser::parseCTCPAction(QString string) return new parseSucc(string, ksopts->textColor, "user|action"); } -parseResult * ChannelParser::parseINFOTopic(QString string) +parseResult * ChannelParser::parseINFOTopic(TQString string) { int found = 0; @@ -989,11 +989,11 @@ parseResult * ChannelParser::parseINFOTopic(QString string) //kdDebug(5008) << "Topic parser: " << string << endl; // Topic for #boo: this is a nice test - QRegExp rx( "Topic for (\\S+): (.*)" ); + TQRegExp rx( "Topic for (\\S+): (.*)" ); if(rx.search( string ) != -1){ - QString channel = rx.cap(1); - QString topic = rx.cap(2); - topic.replace( QRegExp( "~~" ), "~" ); + TQString channel = rx.cap(1); + TQString topic = rx.cap(2); + topic.replace( TQRegExp( "~~" ), "~" ); /* * check where it's going. @@ -1019,18 +1019,18 @@ parseResult * ChannelParser::parseINFOTopic(QString string) rx.setPattern("(\\S+) has changed the topic on channel (\\S+) to (.+)"); if(found == 0 && rx.search(string) != -1){ - QString nick = rx.cap(1); - QString channel = rx.cap(2); + TQString nick = rx.cap(1); + TQString channel = rx.cap(2); //kdDebug(5008) << "Channel: " << channel << endl; if(top->channelInfo().channel().lower() == channel.lower()){ - QString topic = rx.cap(3); + TQString topic = rx.cap(3); //kdDebug(5008) << "Topic: " << topic << endl; - topic.replace(QRegExp("~~"), "~"); + topic.replace(TQRegExp("~~"), "~"); /* * topic is in double quotes, so remove them */ top->setTopic( topic.mid(1, topic.length()-2) ); - QString cmd = "/eval &dostatus();\n"; + TQString cmd = "/eval &dostatus();\n"; top->sirc_write(cmd); } highlightNick(string, nick); @@ -1039,9 +1039,9 @@ parseResult * ChannelParser::parseINFOTopic(QString string) } -void ChannelParser::highlightNick(QString &string, QString &nick) +void ChannelParser::highlightNick(TQString &string, TQString &nick) { - QRegExp rx(QString("(^|\\s+)%1(\\s+|$)").arg(QRegExp::escape(nick))); + TQRegExp rx(TQString("(^|\\s+)%1(\\s+|$)").arg(TQRegExp::escape(nick))); string.replace(rx, "\\1~n" + nick + "~n\\2"); } diff --git a/ksirc/chanparser.h b/ksirc/chanparser.h index ef130680..a79e7372 100644 --- a/ksirc/chanparser.h +++ b/ksirc/chanparser.h @@ -1,8 +1,8 @@ #ifndef CHAN_PARSER_H #define CHAN_PARSER_H -#include -#include +#include +#include /* * This file defines the parser, and all exceptions generated @@ -27,11 +27,11 @@ public: class parseSucc : public parseResult { public: - QString string; // String to display - QColor colour; - QString pm; + TQString string; // String to display + TQColor colour; + TQString pm; - parseSucc(const QString &_s, const QColor &_c = QColor(), const QString &_pm = QString::null){ + parseSucc(const TQString &_s, const TQColor &_c = TQColor(), const TQString &_pm = TQString::null){ string = _s; colour = _c; pm = _pm; @@ -46,10 +46,10 @@ public: class parseError : public parseResult { public: - QString str; - QString err; + TQString str; + TQString err; - parseError(const QString &_s, const QString &_e) + parseError(const TQString &_s, const TQString &_e) { str = _s; err = _e; @@ -59,7 +59,7 @@ public: class parseWrongChannel : public parseSucc { public: - parseWrongChannel(const QString &_s, const QColor &_c = QColor(), const QString &_pm = QString::null) + parseWrongChannel(const TQString &_s, const TQColor &_c = TQColor(), const TQString &_pm = TQString::null) : parseSucc(_s, _c, _pm) { } @@ -69,7 +69,7 @@ public: class parseJoinPart : public parseSucc { public: - parseJoinPart(const QString &_s, const QColor &_c = QColor(), const QString &_pm = QString::null) + parseJoinPart(const TQString &_s, const TQColor &_c = TQColor(), const TQString &_pm = TQString::null) : parseSucc(_s, _c, _pm) { } @@ -88,10 +88,10 @@ public: class badModeChangeError // Mode change barfed up, exit out { public: - QString str; + TQString str; char *msg; - badModeChangeError(QString _str, char *_msg) + badModeChangeError(TQString _str, char *_msg) { str = _str; msg = _msg; @@ -122,8 +122,8 @@ public: class parseFunc { public: - parseResult *(ChannelParser::*parser)(QString); - parseFunc(parseResult *(ChannelParser::*_parser)(QString)){ + parseResult *(ChannelParser::*parser)(TQString); + parseFunc(parseResult *(ChannelParser::*_parser)(TQString)){ parser = _parser; } @@ -149,7 +149,7 @@ public: * parse() thanks the string to be parsed and parses it. * It returns a class of type 'parseResult' or 0. */ - parseResult *parse(QString string); + parseResult *parse(TQString string); private: KSircTopLevel *top; @@ -175,7 +175,7 @@ private: * - On failure generate: parseFailed, etc */ - static QDict parserTable; + static TQDict parserTable; /* * Note regarding ssfe control messages: @@ -195,38 +195,38 @@ private: /** * SSFE clear 'l' function, clears main window */ - parseResult * parseSSFEClear(QString string); + parseResult * parseSSFEClear(TQString string); /** * SSFE Status is used to update caption, and op status * */ - parseResult * parseSSFEStatus(QString string); + parseResult * parseSSFEStatus(TQString string); /** * SSFE Init is called by ssfe when it's time to init and setup */ - parseResult * parseSSFEInit(QString string); + parseResult * parseSSFEInit(TQString string); /** * SSFE msg is called for each /msg sent to a diffrent user */ - parseResult * parseSSFEMsg(QString string); + parseResult * parseSSFEMsg(TQString string); /** * SSFE Out, not used */ - parseResult * parseSSFEOut(QString string); + parseResult * parseSSFEOut(TQString string); /** * SSFE Prompt, same function used for p and P, gives a password prompt */ - parseResult * parseSSFEPrompt(QString string); + parseResult * parseSSFEPrompt(TQString string); /** * SSFE Reconnect called when (re)connected to a server */ - parseResult * parseSSFEReconnect(QString string); + parseResult * parseSSFEReconnect(TQString string); /** * That's all the SSFE control messages, the rest are info *\S* message @@ -235,55 +235,55 @@ private: /** * *** is a generic infomation messge */ - parseResult * parseINFOInfo(QString string); + parseResult * parseINFOInfo(TQString string); /** * *E* is a error message */ - parseResult * parseINFOError(QString string); + parseResult * parseINFOError(TQString string); /** * *#* is a list of nicks, used to update the nick list if it's for * the current channel. */ - parseResult * parseINFONicks(QString in_string); + parseResult * parseINFONicks(TQString in_string); /** * *>* is a join message. If it's for the current channel */ - parseResult * parseINFOJoin(QString string); + parseResult * parseINFOJoin(TQString string); /** * *<* is a part message, if it's for the current channel remove it. * There's multiple part types, so parsing it more complicated. */ - parseResult * parseINFOPart(QString string); + parseResult * parseINFOPart(TQString string); /** * *N* Is a nick change, update the nick list if needed * Nick changes go outto all windows, so the nick may not be on * out current channel. */ - parseResult * parseINFOChangeNick(QString string); + parseResult * parseINFOChangeNick(TQString string); /* * *M* is a mode change. Parsing is mode changes is probably the most * complicated of all the parsings */ - parseResult * parseINFOMode(QString string); + parseResult * parseINFOMode(TQString string); /* * * is a ctcp actiion. Simply print a pretty * for the user */ - parseResult * parseCTCPAction(QString string); + parseResult * parseCTCPAction(TQString string); /* * *T* is a topic message, catch it and update the status is required */ - parseResult * parseINFOTopic(QString string); + parseResult * parseINFOTopic(TQString string); private: - void highlightNick(QString &string, QString &nick); + void highlightNick(TQString &string, TQString &nick); }; #endif diff --git a/ksirc/charSelector.cpp b/ksirc/charSelector.cpp index 6cfe09a4..8ad8526f 100644 --- a/ksirc/charSelector.cpp +++ b/ksirc/charSelector.cpp @@ -3,32 +3,32 @@ #include "charSelector.h" #include "charSelector.moc" -#include -#include +#include +#include #include -charSelector::charSelector(QWidget *parent, const char* name) +charSelector::charSelector(TQWidget *parent, const char* name) : KDialog(parent, name, false) { - testLayout = new QVBoxLayout(this); + testLayout = new TQVBoxLayout(this); testLayout->setSpacing( spacingHint() ); testLayout->setMargin( marginHint() ); - charSelect = new KCharSelect(this, QCString(name) + "_kcharselector", "", 0); + charSelect = new KCharSelect(this, TQCString(name) + "_kcharselector", "", 0); testLayout->addWidget(charSelect); charSelect->installEventFilter(this); - connect(charSelect, SIGNAL(doubleClicked()), SLOT(insertText())); + connect(charSelect, TQT_SIGNAL(doubleClicked()), TQT_SLOT(insertText())); - QHBoxLayout *buttonLayout = new QHBoxLayout; + TQHBoxLayout *buttonLayout = new QHBoxLayout; buttonLayout->setSpacing( spacingHint() ); - insertButton = new QPushButton(i18n("&Insert Char"), this); - connect(insertButton, SIGNAL(clicked()), SLOT(insertText())); + insertButton = new TQPushButton(i18n("&Insert Char"), this); + connect(insertButton, TQT_SIGNAL(clicked()), TQT_SLOT(insertText())); buttonLayout->addWidget(insertButton); - QSpacerItem *spacer = new QSpacerItem(50, 20, QSizePolicy::Expanding, QSizePolicy::Expanding); + TQSpacerItem *spacer = new TQSpacerItem(50, 20, TQSizePolicy::Expanding, TQSizePolicy::Expanding); buttonLayout->addItem(spacer); testLayout->addLayout(buttonLayout); @@ -45,7 +45,7 @@ void charSelector::insertText() emit clicked(); } -void charSelector::setFont( const QString &font ) +void charSelector::setFont( const TQString &font ) { charSelect->setFont(font); } @@ -56,16 +56,16 @@ void charSelector::reject() close(); } -void charSelector::keyPressEvent(QKeyEvent *e) +void charSelector::keyPressEvent(TQKeyEvent *e) { KDialog::keyPressEvent(e); } -bool charSelector::eventFilter ( QObject *, QEvent * e ) +bool charSelector::eventFilter ( TQObject *, TQEvent * e ) { - if ( e->type() == QEvent::AccelOverride ) { + if ( e->type() == TQEvent::AccelOverride ) { // special processing for key press - QKeyEvent *k = (QKeyEvent *)e; + TQKeyEvent *k = (TQKeyEvent *)e; if(k->key() == Key_Escape){ keyPressEvent(k); return TRUE; // eat event diff --git a/ksirc/charSelector.h b/ksirc/charSelector.h index 927cb5e5..9ea4b400 100644 --- a/ksirc/charSelector.h +++ b/ksirc/charSelector.h @@ -14,16 +14,16 @@ class charSelector : public KDialog { Q_OBJECT public: - charSelector(QWidget *parent=0, const char *name=0); + charSelector(TQWidget *parent=0, const char *name=0); ~charSelector(); - virtual bool eventFilter ( QObject * watched, QEvent * e ); + virtual bool eventFilter ( TQObject * watched, TQEvent * e ); public slots: void insertText(); - QString currentText() { return charSelect->chr(); } + TQString currentText() { return charSelect->chr(); } - void setFont( const QString &font ); + void setFont( const TQString &font ); protected slots: virtual void reject(); @@ -32,11 +32,11 @@ class charSelector : public KDialog void clicked(); protected: - virtual void keyPressEvent(QKeyEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); private: KCharSelect *charSelect; - QVBoxLayout* testLayout; - QPushButton *insertButton; + TQVBoxLayout* testLayout; + TQPushButton *insertButton; }; #endif diff --git a/ksirc/colorpicker.cpp b/ksirc/colorpicker.cpp index 13b2805c..9bb5f03f 100644 --- a/ksirc/colorpicker.cpp +++ b/ksirc/colorpicker.cpp @@ -20,49 +20,49 @@ #include "colorpicker.h" #include "ksopts.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include -ColorPicker::ColorPicker( QWidget *parent, const char *name ) +ColorPicker::ColorPicker( TQWidget *parent, const char *name ) : KDialogBase( parent, name, true /*modal*/, i18n( "Pick Color" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Cancel ), m_foregroundColor( -1 ), m_backgroundColor( -1 ) { - QVBox *mainWidget = makeVBoxMainWidget(); + TQVBox *mainWidget = makeVBoxMainWidget(); - QWidget *sampleBox = new QWidget( mainWidget ); - QHBoxLayout *sampleLayout = new QHBoxLayout( sampleBox ); + TQWidget *sampleBox = new TQWidget( mainWidget ); + TQHBoxLayout *sampleLayout = new TQHBoxLayout( sampleBox ); - QLabel *preview = new QLabel( i18n( "Preview:" ), sampleBox ); + TQLabel *preview = new TQLabel( i18n( "Preview:" ), sampleBox ); sampleLayout->addWidget( preview ); - m_sample = new QLineEdit( i18n( "Sample Text" ), sampleBox ); + m_sample = new TQLineEdit( i18n( "Sample Text" ), sampleBox ); m_sample->setFocusPolicy( NoFocus ); - m_sample->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, + m_sample->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, m_sample->sizePolicy().verData() ) ); sampleLayout->addWidget( m_sample ); sampleLayout->addStretch(); - QHBox *box = new QHBox( mainWidget ); - QLabel *description = new QLabel( i18n( "&Foreground:" ), box ); + TQHBox *box = new TQHBox( mainWidget ); + TQLabel *description = new TQLabel( i18n( "&Foreground:" ), box ); ColorBar *foregroundColor = new ColorBar( ksopts->ircColors.toValueVector(), box ); description->setBuddy( foregroundColor ); - box = new QHBox( mainWidget ); - description = new QLabel( i18n( "&Background:" ), box ); + box = new TQHBox( mainWidget ); + description = new TQLabel( i18n( "&Background:" ), box ); ColorBar *backgroundColor = new ColorBar( ksopts->ircColors.toValueVector(), box ); description->setBuddy( backgroundColor ); - QPushButton *ok = actionButton( KDialogBase::Ok ); - QPushButton *cancel = actionButton( KDialogBase::Cancel ); + TQPushButton *ok = actionButton( KDialogBase::Ok ); + TQPushButton *cancel = actionButton( KDialogBase::Cancel ); setTabOrder( foregroundColor, backgroundColor ); setTabOrder( backgroundColor, ok ); @@ -71,31 +71,31 @@ ColorPicker::ColorPicker( QWidget *parent, const char *name ) ok->setAutoDefault( false ); cancel->setAutoDefault( false ); - connect( foregroundColor, SIGNAL( colorPicked( int ) ), - this, SLOT( setForegroundColor( int ) ) ); - connect( backgroundColor, SIGNAL( colorPicked( int ) ), - this, SLOT( setBackgroundColor( int ) ) ); + connect( foregroundColor, TQT_SIGNAL( colorPicked( int ) ), + this, TQT_SLOT( setForegroundColor( int ) ) ); + connect( backgroundColor, TQT_SIGNAL( colorPicked( int ) ), + this, TQT_SLOT( setBackgroundColor( int ) ) ); ok->setEnabled( false ); updateSample(); } -QString ColorPicker::colorString() const +TQString ColorPicker::colorString() const { assert( m_foregroundColor != -1 ); - QString res( QString::number( m_foregroundColor ) ); + TQString res( TQString::number( m_foregroundColor ) ); if ( m_backgroundColor != -1 ) { res += ','; - res += QString::number( m_backgroundColor ); + res += TQString::number( m_backgroundColor ); } return res; } void ColorPicker::setForegroundColor( int col ) { - QPushButton * ok =actionButton( KDialogBase::Ok ); + TQPushButton * ok =actionButton( KDialogBase::Ok ); assert( ok ); ok->setEnabled( true ); @@ -111,28 +111,28 @@ void ColorPicker::setBackgroundColor( int col ) void ColorPicker::updateSample() { - QColorGroup cg( colorGroup() ); + TQColorGroup cg( colorGroup() ); - QColor col = ksopts->textColor; + TQColor col = ksopts->textColor; if ( m_foregroundColor != -1 ) col = ksopts->ircColors[ m_foregroundColor ]; - cg.setColor( QColorGroup::Foreground, col ); - cg.setColor( QColorGroup::Text, col ); + cg.setColor( TQColorGroup::Foreground, col ); + cg.setColor( TQColorGroup::Text, col ); if ( m_backgroundColor != -1 ) { col = ksopts->ircColors[ m_backgroundColor ]; - cg.setColor( QColorGroup::Background, col ); - cg.setColor( QColorGroup::Base, col ); + cg.setColor( TQColorGroup::Background, col ); + cg.setColor( TQColorGroup::Base, col ); } - m_sample->setPalette( QPalette( cg, cg, cg ) ); + m_sample->setPalette( TQPalette( cg, cg, cg ) ); } -ColorBar::ColorBar( const QValueVector &colors, QWidget *parent, +ColorBar::ColorBar( const TQValueVector &colors, TQWidget *parent, const char *name ) - : QFrame( parent, name, WStaticContents | WRepaintNoErase ), + : TQFrame( parent, name, WStaticContents | WRepaintNoErase ), m_currentCell( -1 ), m_focusedCell( - 1 ), m_colors( colors ), m_cellSize( 0 ) { @@ -143,7 +143,7 @@ ColorBar::ColorBar( const QValueVector &colors, QWidget *parent, setFocusPolicy( StrongFocus ); } -void ColorBar::drawContents( QPainter *p ) +void ColorBar::drawContents( TQPainter *p ) { int x = contentsRect().x(); int y = contentsRect().y(); @@ -153,15 +153,15 @@ void ColorBar::drawContents( QPainter *p ) i == static_cast( m_currentCell ) ); bool isFocusedCell = ( m_focusedCell != -1 && i == static_cast( m_focusedCell ) ); - drawCell( p, x, y, m_colors[ i ], QString::number( i ), + drawCell( p, x, y, m_colors[ i ], TQString::number( i ), isFocusedCell, isCurrentCell ); } } -void ColorBar::keyPressEvent( QKeyEvent *ev ) +void ColorBar::keyPressEvent( TQKeyEvent *ev ) { if ( m_focusedCell == -1 ) { - QFrame::keyPressEvent( ev ); + TQFrame::keyPressEvent( ev ); return; } @@ -189,36 +189,36 @@ void ColorBar::keyPressEvent( QKeyEvent *ev ) default: break; } - QFrame::keyPressEvent( ev ); + TQFrame::keyPressEvent( ev ); } -void ColorBar::focusInEvent( QFocusEvent *ev ) +void ColorBar::focusInEvent( TQFocusEvent *ev ) { - if ( ev->reason() == QFocusEvent::Tab || - ev->reason() == QFocusEvent::Backtab ) + if ( ev->reason() == TQFocusEvent::Tab || + ev->reason() == TQFocusEvent::Backtab ) m_focusedCell = 0; - QFrame::focusInEvent( ev ); + TQFrame::focusInEvent( ev ); } -void ColorBar::focusOutEvent( QFocusEvent *ev ) +void ColorBar::focusOutEvent( TQFocusEvent *ev ) { - if ( ev->reason() == QFocusEvent::Tab || - ev->reason() == QFocusEvent::Backtab || - ev->reason() == QFocusEvent::Mouse ) + if ( ev->reason() == TQFocusEvent::Tab || + ev->reason() == TQFocusEvent::Backtab || + ev->reason() == TQFocusEvent::Mouse ) m_focusedCell = -1; - QFrame::focusOutEvent( ev ); + TQFrame::focusOutEvent( ev ); } -void ColorBar::fontChange( const QFont &oldFont ) +void ColorBar::fontChange( const TQFont &oldFont ) { updateCellSize(); - QFrame::fontChange( oldFont ); + TQFrame::fontChange( oldFont ); } -void ColorBar::styleChange( QStyle &oldStyle ) +void ColorBar::styleChange( TQStyle &oldStyle ) { updateCellSize(); - QFrame::styleChange( oldStyle ); + TQFrame::styleChange( oldStyle ); } bool ColorBar::focusNextPrevChild( bool next ) @@ -233,7 +233,7 @@ bool ColorBar::focusNextPrevChild( bool next ) update(); return true; } - return QFrame::focusNextPrevChild( next ); + return TQFrame::focusNextPrevChild( next ); } if ( m_focusedCell > 1 ) @@ -243,43 +243,43 @@ bool ColorBar::focusNextPrevChild( bool next ) return true; } - return QFrame::focusNextPrevChild( next ); + return TQFrame::focusNextPrevChild( next ); } -void ColorBar::mousePressEvent( QMouseEvent *ev ) +void ColorBar::mousePressEvent( TQMouseEvent *ev ) { - const QPoint &p = ev->pos(); + const TQPoint &p = ev->pos(); if ( contentsRect().contains( p ) ) { m_focusedCell = p.x() / m_cellSize; update(); } - QFrame::mousePressEvent( ev ); + TQFrame::mousePressEvent( ev ); } -void ColorBar::mouseReleaseEvent( QMouseEvent *ev ) +void ColorBar::mouseReleaseEvent( TQMouseEvent *ev ) { if ( m_focusedCell != -1 ) { setCurrentCell( m_focusedCell ); update(); } - QFrame::mouseReleaseEvent( ev ); + TQFrame::mouseReleaseEvent( ev ); } void ColorBar::updateCellSize() { - setLineWidth( style().pixelMetric( QStyle::PM_DefaultFrameWidth, this ) ); + setLineWidth( style().pixelMetric( TQStyle::PM_DefaultFrameWidth, this ) ); - QFontMetrics metrics( font() ); + TQFontMetrics metrics( font() ); - m_cellSize = metrics.width( QString::number( m_colors.size() ) ) + + m_cellSize = metrics.width( TQString::number( m_colors.size() ) ) + ( s_indicatorSize * 2 ) + ( s_focusSize * 2 ) + ( s_innerMargin * 2 ); - setFixedSize( QSize( ( m_colors.size() * m_cellSize ) + ( frameWidth() * 2 ), + setFixedSize( TQSize( ( m_colors.size() * m_cellSize ) + ( frameWidth() * 2 ), m_cellSize + ( frameWidth() * 2 ) ) ); } @@ -289,13 +289,13 @@ void ColorBar::setCurrentCell( int cell ) emit colorPicked( cell ); } -void ColorBar::drawCell( QPainter *p, int x, int y, const QColor &color, - const QString &text, bool isFocusedCell, +void ColorBar::drawCell( TQPainter *p, int x, int y, const TQColor &color, + const TQString &text, bool isFocusedCell, bool isCurrentCell ) { p->fillRect( x, y, m_cellSize, m_cellSize, color ); - QColor penColor = black; + TQColor penColor = black; // ### hack if ( color.red() < 127 && color.green() < 127 && color.blue() < 127 ) penColor = white; @@ -329,7 +329,7 @@ void ColorBar::drawCell( QPainter *p, int x, int y, const QColor &color, s_focusSize, focusRectSize - ( 2 * s_focusSize ), penColor ); } - QFontMetrics metrics( p->font() ); + TQFontMetrics metrics( p->font() ); int offset = ( m_cellSize / 2 ) - ( metrics.width( text ) / 2 ); p->drawText( x + offset, y + s_focusSize + s_indicatorSize + diff --git a/ksirc/colorpicker.h b/ksirc/colorpicker.h index 18222bfa..2118fc88 100644 --- a/ksirc/colorpicker.h +++ b/ksirc/colorpicker.h @@ -19,8 +19,8 @@ #ifndef __colorpicker_h__ #define __colorpicker_h__ -#include -#include +#include +#include #include @@ -30,9 +30,9 @@ class ColorPicker : public KDialogBase { Q_OBJECT public: - ColorPicker( QWidget *parent, const char *name = 0 ); + ColorPicker( TQWidget *parent, const char *name = 0 ); - QString colorString() const; + TQString colorString() const; private slots: void setForegroundColor( int col ); @@ -41,7 +41,7 @@ private slots: private: void updateSample(); - QLineEdit *m_sample; + TQLineEdit *m_sample; int m_foregroundColor; int m_backgroundColor; }; @@ -50,33 +50,33 @@ class ColorBar : public QFrame { Q_OBJECT public: - ColorBar( const QValueVector &colors, QWidget *parent, const char *name = 0 ); + ColorBar( const TQValueVector &colors, TQWidget *parent, const char *name = 0 ); signals: void colorPicked( int col ); protected: - virtual void drawContents( QPainter *p ); - virtual void keyPressEvent( QKeyEvent *ev ); - virtual void focusInEvent( QFocusEvent *ev ); - virtual void focusOutEvent( QFocusEvent *ev ); - virtual void fontChange( const QFont &oldFont ); - virtual void styleChange( QStyle &oldStyle ); + virtual void drawContents( TQPainter *p ); + virtual void keyPressEvent( TQKeyEvent *ev ); + virtual void focusInEvent( TQFocusEvent *ev ); + virtual void focusOutEvent( TQFocusEvent *ev ); + virtual void fontChange( const TQFont &oldFont ); + virtual void styleChange( TQStyle &oldStyle ); virtual bool focusNextPrevChild( bool next ); - virtual void mousePressEvent( QMouseEvent *ev ); - virtual void mouseReleaseEvent( QMouseEvent *ev ); + virtual void mousePressEvent( TQMouseEvent *ev ); + virtual void mouseReleaseEvent( TQMouseEvent *ev ); private: void updateCellSize(); void setCurrentCell( int cell ); - void drawCell( QPainter *p, int x, int y, const QColor &color, - const QString &text, bool isFocusedCell, + void drawCell( TQPainter *p, int x, int y, const TQColor &color, + const TQString &text, bool isFocusedCell, bool isCurrentCell ); int m_currentCell; int m_focusedCell; - const QValueVector m_colors; + const TQValueVector m_colors; int m_cellSize; // ### style me diff --git a/ksirc/dccManager.cpp b/ksirc/dccManager.cpp index 44d85dee..386644b9 100644 --- a/ksirc/dccManager.cpp +++ b/ksirc/dccManager.cpp @@ -8,8 +8,8 @@ #include "dccManager.h" #include "dccNew.h" -#include -#include +#include +#include #include #include @@ -22,8 +22,8 @@ #define COL_CPS 4 #define COL_PER 5 -dccItem::dccItem( KListView *parent, dccManager *manager, enum dccType type, const QString &file, const QString& who, enum dccStatus status, unsigned int size ) - : QObject(), KListViewItem(parent), m_who(who), m_file(file), m_type(type) +dccItem::dccItem( KListView *parent, dccManager *manager, enum dccType type, const TQString &file, const TQString& who, enum dccStatus status, unsigned int size ) + : TQObject(), KListViewItem(parent), m_who(who), m_file(file), m_type(type) { m_percent = 0; m_status = status; @@ -38,13 +38,13 @@ dccItem::dccItem( KListView *parent, dccManager *manager, enum dccType type, con if(m_type == dccChat) setText(COL_SIZE, ""); else - setText(COL_SIZE, QString("%1").arg(size)); + setText(COL_SIZE, TQString("%1").arg(size)); setText(COL_PER, ""); } -dccItem::dccItem( KListViewItem *parent, dccManager *manager, enum dccType type, const QString &file, const QString& who, enum dccStatus status, unsigned int size ) -: QObject(), KListViewItem(parent), m_who(who), m_file(file), m_type(type) +dccItem::dccItem( KListViewItem *parent, dccManager *manager, enum dccType type, const TQString &file, const TQString& who, enum dccStatus status, unsigned int size ) +: TQObject(), KListViewItem(parent), m_who(who), m_file(file), m_type(type) { m_percent = 0; m_status = status; @@ -56,7 +56,7 @@ dccItem::dccItem( KListViewItem *parent, dccManager *manager, enum dccType type, setText(COL_WHO, who); setText(COL_STAT, enumToStatus(status)); if(type != dccChat) - setText(COL_SIZE, QString("%1").arg(size)); + setText(COL_SIZE, TQString("%1").arg(size)); setText(COL_PER, ""); } @@ -65,9 +65,9 @@ dccItem::~dccItem() { } -QString dccItem::enumToStatus(enum dccStatus status) +TQString dccItem::enumToStatus(enum dccStatus status) { - QString str; + TQString str; switch(status){ case dccRecving: str = i18n("Receiving"); @@ -106,17 +106,17 @@ QString dccItem::enumToStatus(enum dccStatus status) return str; } -void dccItem::setWhoPostfix(const QString &post) { +void dccItem::setWhoPostfix(const TQString &post) { m_post = post; - setText(COL_WHO, QString("%1 %2").arg(m_who).arg(post)); + setText(COL_WHO, TQString("%1 %2").arg(m_who).arg(post)); } -void dccItem::changeFilename(const QString &file) { +void dccItem::changeFilename(const TQString &file) { setText(COL_FILE, file); m_file = file; } -void dccItem::changeWho(const QString &who) { +void dccItem::changeWho(const TQString &who) { setText(COL_WHO, who); m_who = who; } @@ -146,13 +146,13 @@ void dccItem::setReceivedBytes(int bytes) (ctime >= (m_lasttime + 2)) ){ m_lasttime = ctime; - setText(COL_SIZE, QString("%1/%2").arg(bytes).arg(m_size)); - setText(COL_PER, QString("%1%").arg(per)); + setText(COL_SIZE, TQString("%1/%2").arg(bytes).arg(m_size)); + setText(COL_PER, TQString("%1%").arg(per)); m_percent = per; if(m_status == dccResumed) m_stime = 0; /* if we are got a resume request don't update CPS, reset it */ else - setText(COL_CPS, QString("%1").arg(1.0*bytes/(time(NULL) - m_stime), 2)); + setText(COL_CPS, TQString("%1").arg(1.0*bytes/(time(NULL) - m_stime), 2)); } @@ -177,13 +177,13 @@ void dccItem::okRename(int col) { KListViewItem::okRename(col); if(type() == dccGet){ - QString oldfile = m_file; + TQString oldfile = m_file; changeFilename(text(COL_FILE)); emit itemRenamed(this, m_who, oldfile); setRenameEnabled(COL_FILE, false); } else if(type() == dccChat){ - QString oldwho = m_who; + TQString oldwho = m_who; changeWho(text(COL_WHO)); emit itemRenamed(this, oldwho, m_file); setRenameEnabled(COL_WHO, false); @@ -199,7 +199,7 @@ void dccItem::cancelRename(int col) } } -dccManager::dccManager( QWidget *parent, const char *name ) : dccManagerbase( parent, name) +dccManager::dccManager( TQWidget *parent, const char *name ) : dccManagerbase( parent, name) { dccNewDialog = 0x0; @@ -215,10 +215,10 @@ dccManager::dccManager( QWidget *parent, const char *name ) : dccManagerbase( pa m_sendit->setSelectable(false); m_chatit->setSelectable(false); -// connect(klvBox, SIGNAL(clicked(QListViewItem *)), -// this, SLOT(getSelChange(QListViewItem *))); - connect(klvBox, SIGNAL(currentChanged(QListViewItem *)), - this, SLOT(getSelChange(QListViewItem *))); +// connect(klvBox, TQT_SIGNAL(clicked(TQListViewItem *)), +// this, TQT_SLOT(getSelChange(TQListViewItem *))); + connect(klvBox, TQT_SIGNAL(currentChanged(TQListViewItem *)), + this, TQT_SLOT(getSelChange(TQListViewItem *))); klvBox->setCurrentItem(m_chatit); getSelChange(klvBox->currentItem()); @@ -228,31 +228,31 @@ dccManager::~dccManager() { } -dccItem *dccManager::newSendItem(QString file, QString who, enum dccItem::dccStatus status, unsigned int size) +dccItem *dccManager::newSendItem(TQString file, TQString who, enum dccItem::dccStatus status, unsigned int size) { emit changed(false, i18n("dcc activity")); dccItem *it = new dccItem(m_sendit, this, dccItem::dccSend, file, who, status, size); - connect(it, SIGNAL(statusChanged(QListViewItem *)), - this, SLOT(getSelChange(QListViewItem *))); + connect(it, TQT_SIGNAL(statusChanged(TQListViewItem *)), + this, TQT_SLOT(getSelChange(TQListViewItem *))); return it; } -dccItem *dccManager::newGetItem(QString file, QString who, enum dccItem::dccStatus status, unsigned int size) +dccItem *dccManager::newGetItem(TQString file, TQString who, enum dccItem::dccStatus status, unsigned int size) { emit changed(false, i18n("dcc activity")); dccItem *it = new dccItem(m_getit, this, dccItem::dccGet, file, who, status, size); - connect(it, SIGNAL(statusChanged(QListViewItem *)), - this, SLOT(getSelChange(QListViewItem *))); + connect(it, TQT_SIGNAL(statusChanged(TQListViewItem *)), + this, TQT_SLOT(getSelChange(TQListViewItem *))); return it; } -dccItem *dccManager::newChatItem(QString who, enum dccItem::dccStatus status) +dccItem *dccManager::newChatItem(TQString who, enum dccItem::dccStatus status) { emit changed(false, i18n("dcc activity")); dccItem *it = new dccItem(m_chatit, this, dccItem::dccChat, "", who, status, 0); - connect(it, SIGNAL(statusChanged(QListViewItem *)), - this, SLOT(getSelChange(QListViewItem *))); + connect(it, TQT_SIGNAL(statusChanged(TQListViewItem *)), + this, TQT_SLOT(getSelChange(TQListViewItem *))); return it; } @@ -268,20 +268,20 @@ void dccManager::kpbNew_clicked() dccNewDialog = new dccNew(); dccNewDialog->show(); - connect(dccNewDialog, SIGNAL(accepted(int, QString, QString)), - this, SLOT(dccNewAccepted(int, QString, QString))); + connect(dccNewDialog, TQT_SIGNAL(accepted(int, TQString, TQString)), + this, TQT_SLOT(dccNewAccepted(int, TQString, TQString))); } -void dccManager::dccNewAccepted(int type, QString nick, QString file){ +void dccManager::dccNewAccepted(int type, TQString nick, TQString file){ kdDebug(5008) << "Type: " << type << " nick: " << nick << " file: " << file << endl; if(type == dccNew::Chat){ - QCString cstr = QCString("/dcc chat ") + nick.latin1() + "\n"; + TQCString cstr = TQCString("/dcc chat ") + nick.latin1() + "\n"; kdDebug(5008) << "Output: " << cstr << endl; emit outputLine(cstr); } else if(type == dccNew::Send){ - QCString cstr = QCString("/dcc send ") + nick.latin1() + " " + file.latin1() + "\n"; + TQCString cstr = TQCString("/dcc send ") + nick.latin1() + " " + file.latin1() + "\n"; emit outputLine(cstr); } delete dccNewDialog; @@ -318,7 +318,7 @@ void dccManager::kpbAbort_clicked() } } -void dccManager::getSelChange(QListViewItem *_i) { +void dccManager::getSelChange(TQListViewItem *_i) { kpbAbort->setEnabled(false); kpbResume->setEnabled(false); kpbRename->setEnabled(false); @@ -374,7 +374,7 @@ void dccManager::getSelChange(QListViewItem *_i) { } -void dccManager::sendSelChange(QListViewItem *) { +void dccManager::sendSelChange(TQListViewItem *) { /* if(_i == 0) return; diff --git a/ksirc/dccManager.h b/ksirc/dccManager.h index 41412479..6e8c464c 100644 --- a/ksirc/dccManager.h +++ b/ksirc/dccManager.h @@ -12,7 +12,7 @@ #include -#include +#include #include "dccManagerbase.h" #include "klistview.h" @@ -22,7 +22,7 @@ class dccManager; class QSignal; class QObject; -class dccItem : public QObject, +class dccItem : public TQObject, public KListViewItem { Q_OBJECT @@ -46,19 +46,19 @@ public: dccSend }; - dccItem( KListView *, dccManager *, enum dccType, const QString &file, const QString &who, enum dccStatus, unsigned int size ); - dccItem( KListViewItem *, dccManager *, enum dccType, const QString &file, const QString &who, enum dccStatus, unsigned int size ); + dccItem( KListView *, dccManager *, enum dccType, const TQString &file, const TQString &who, enum dccStatus, unsigned int size ); + dccItem( KListViewItem *, dccManager *, enum dccType, const TQString &file, const TQString &who, enum dccStatus, unsigned int size ); virtual ~dccItem(); void changeStatus(enum dccStatus); void setReceivedBytes(int bytes); - void setWhoPostfix(const QString &post); - void changeFilename(const QString &file); - void changeWho(const QString &who); + void setWhoPostfix(const TQString &post); + void changeFilename(const TQString &file); + void changeWho(const TQString &who); - const QString who() { return m_who; } - const QString file() { return m_file; } + const TQString who() { return m_who; } + const TQString file() { return m_file; } enum dccStatus status() { return m_status; } enum dccType type() { return m_type; } double getPercent() { return m_percent; } @@ -66,11 +66,11 @@ public: void doRename(); signals: - void statusChanged(QListViewItem *); - void itemRenamed(dccItem *, QString oldNick, QString oldFile); + void statusChanged(TQListViewItem *); + void itemRenamed(dccItem *, TQString oldNick, TQString oldFile); protected: - QString enumToStatus(enum dccStatus); + TQString enumToStatus(enum dccStatus); virtual void okRename ( int col ); virtual void cancelRename ( int col ); @@ -78,9 +78,9 @@ protected: private: dccManager *m_manager; - QString m_who; - QString m_file; - QString m_post; + TQString m_who; + TQString m_file; + TQString m_post; int m_percent; unsigned int m_size; enum dccStatus m_status; @@ -97,14 +97,14 @@ class dccManager : public dccManagerbase Q_OBJECT public: - dccManager( QWidget *parent = 0, const char *name = 0 ); + dccManager( TQWidget *parent = 0, const char *name = 0 ); ~dccManager(); - dccItem *newSendItem(QString file, QString who, enum dccItem::dccStatus, unsigned int size); - dccItem *newGetItem(QString file, QString who, enum dccItem::dccStatus, unsigned int size); - dccItem *newChatItem(QString who, enum dccItem::dccStatus); + dccItem *newSendItem(TQString file, TQString who, enum dccItem::dccStatus, unsigned int size); + dccItem *newGetItem(TQString file, TQString who, enum dccItem::dccStatus, unsigned int size); + dccItem *newChatItem(TQString who, enum dccItem::dccStatus); - void doChanged() { emit changed(false, QString("dcc activity")); }; + void doChanged() { emit changed(false, TQString("dcc activity")); }; public slots: virtual void kpbNew_clicked(); @@ -114,17 +114,17 @@ public slots: virtual void kpbAbort_clicked(); signals: - void outputLine(QCString); - void changed(bool, QString); + void outputLine(TQCString); + void changed(bool, TQString); virtual void dccConnectClicked(dccItem *); virtual void dccResumeClicked(dccItem *); virtual void dccRenameClicked(dccItem *); virtual void dccAbortClicked(dccItem *); protected slots: - virtual void getSelChange(QListViewItem *); - virtual void sendSelChange(QListViewItem *); - virtual void dccNewAccepted(int type, QString nick, QString file); + virtual void getSelChange(TQListViewItem *); + virtual void sendSelChange(TQListViewItem *); + virtual void dccNewAccepted(int type, TQString nick, TQString file); private: diff --git a/ksirc/dccMgrTest.cpp b/ksirc/dccMgrTest.cpp index 77d5fdac..6d83938e 100644 --- a/ksirc/dccMgrTest.cpp +++ b/ksirc/dccMgrTest.cpp @@ -17,7 +17,7 @@ public: bytes = 0; startTimer( 100 ); } - void timerEvent( QTimerEvent * ) + void timerEvent( TQTimerEvent * ) { m_it->changeStatus(dccItem::dccSending); bytes += 1000; diff --git a/ksirc/dccNew.cpp b/ksirc/dccNew.cpp index fe44fae6..0ace8c56 100644 --- a/ksirc/dccNew.cpp +++ b/ksirc/dccNew.cpp @@ -6,12 +6,12 @@ * * ***************************************************************************/ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -27,29 +27,29 @@ #include "dccNew.h" #include "objFinder.h" -dccNew::dccNew( QWidget *parent, const char *name, int type, QString nick ) +dccNew::dccNew( TQWidget *parent, const char *name, int type, TQString nick ) : dccNewBase( parent, name) { - QColorGroup cg_mainw = kapp->palette().active(); - cg_mainw.setColor(QColorGroup::Base, ksopts->backgroundColor); - cg_mainw.setColor(QColorGroup::Text, ksopts->textColor); - cg_mainw.setColor(QColorGroup::Link, ksopts->linkColor); - cg_mainw.setColor(QColorGroup::Highlight, ksopts->selBackgroundColor); - cg_mainw.setColor(QColorGroup::HighlightedText, ksopts->selForegroundColor); - nickList->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw)); + TQColorGroup cg_mainw = kapp->palette().active(); + cg_mainw.setColor(TQColorGroup::Base, ksopts->backgroundColor); + cg_mainw.setColor(TQColorGroup::Text, ksopts->textColor); + cg_mainw.setColor(TQColorGroup::Link, ksopts->linkColor); + cg_mainw.setColor(TQColorGroup::Highlight, ksopts->selBackgroundColor); + cg_mainw.setColor(TQColorGroup::HighlightedText, ksopts->selForegroundColor); + nickList->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw)); - QStringList allalist = objFinder::allObjects().grep(I18N_NOOP("aListBox::")); + TQStringList allalist = objFinder::allObjects().grep(I18N_NOOP("aListBox::")); - for ( QStringList::Iterator it = allalist.begin(); + for ( TQStringList::Iterator it = allalist.begin(); it != allalist.end(); ++it ) { - QString name = (*it).section("::", 1); + TQString name = (*it).section("::", 1); kdDebug(5008) << "Looking at: " << *it << "/" << name << endl; aListBox *a = static_cast(objFinder::find(name.latin1(), "aListBox")); if(a){ - QListBoxItem *i; + TQListBoxItem *i; for(i = a->firstItem(); i != 0x0; i = i->next()){ nickListItem *it = new nickListItem(*a->item(a->index(i))); nickList->inSort(it); @@ -62,7 +62,7 @@ dccNew::dccNew( QWidget *parent, const char *name, int type, QString nick ) KCompletion *comp = cbNicks->completionObject(); - QListBoxItem *i; + TQListBoxItem *i; for(i = nickList->firstItem(); i != 0x0; i = i->next()){ comp->addItem(i->text()); cbNicks->insertItem(i->text()); @@ -94,14 +94,14 @@ dccNew::dccNew( QWidget *parent, const char *name, int type, QString nick ) fileSendClicked(); } - connect(nickList, SIGNAL(highlighted(const QString &)), - cbNicks, SLOT(setEditText(const QString &))); + connect(nickList, TQT_SIGNAL(highlighted(const TQString &)), + cbNicks, TQT_SLOT(setEditText(const TQString &))); - connect(pbCancel, SIGNAL(clicked()), - this, SLOT(reject())); + connect(pbCancel, TQT_SIGNAL(clicked()), + this, TQT_SLOT(reject())); - connect(pbSend, SIGNAL(clicked()), - this, SLOT(accept())); + connect(pbSend, TQT_SIGNAL(clicked()), + this, TQT_SLOT(accept())); } @@ -134,17 +134,17 @@ void dccNew::sendClicked() void dccNew::fileClicked() { - QString file = + TQString file = KFileDialog::getOpenFileName(); leFile->setText(file); } -QString dccNew::getFile() { +TQString dccNew::getFile() { return leFile->text() ; } -QString dccNew::getNick() { +TQString dccNew::getNick() { return cbNicks->currentText(); } @@ -155,7 +155,7 @@ int dccNew::getType() { void dccNew::reject() { - emit accepted(-1, QString::null, QString::null); + emit accepted(-1, TQString::null, TQString::null); } diff --git a/ksirc/dccNew.h b/ksirc/dccNew.h index e0adcf80..35638b59 100644 --- a/ksirc/dccNew.h +++ b/ksirc/dccNew.h @@ -16,22 +16,22 @@ class dccNew : public dccNewBase Q_OBJECT public: - dccNew( QWidget *parent = 0, + dccNew( TQWidget *parent = 0, const char *name = 0, int type = -1, - QString nick = QString::null ); + TQString nick = TQString::null ); ~dccNew(); enum { Chat, Send }; - QString getFile(); - QString getNick(); + TQString getFile(); + TQString getNick(); int getType(); signals: void modified(); - void accepted(int type, QString nick, QString file); + void accepted(int type, TQString nick, TQString file); protected slots: virtual void chatClicked(); diff --git a/ksirc/dccToplevel.cpp b/ksirc/dccToplevel.cpp index 5e5437d2..bd66b944 100644 --- a/ksirc/dccToplevel.cpp +++ b/ksirc/dccToplevel.cpp @@ -1,6 +1,6 @@ -#include -#include +#include +#include #include #include @@ -15,17 +15,17 @@ extern DisplayMgr *displayMgr; #define DTL_WINDOW_ID 10 -dccTopLevel::dccTopLevel(QWidget *parent, const char *name) +dccTopLevel::dccTopLevel(TQWidget *parent, const char *name) : KMainWindow(parent, name, Qt::WDestructiveClose) { - m_mgr = new dccManager(this, QCString(QObject::name()) + "_dccManager"); + m_mgr = new dccManager(this, TQCString(TQObject::name()) + "_dccManager"); // m_mgr->show(); setCentralWidget(m_mgr); - connect(m_mgr, SIGNAL(changed(bool, QString)), this, SIGNAL(changed(bool, QString))); + connect(m_mgr, TQT_SIGNAL(changed(bool, TQString)), this, TQT_SIGNAL(changed(bool, TQString))); - QPopupMenu *win = new QPopupMenu(this, QCString(QObject::name()) + "_popup_window"); - KAction *act = KStdAction::close(this, SLOT( close() ), actionCollection() ); + TQPopupMenu *win = new TQPopupMenu(this, TQCString(TQObject::name()) + "_popup_window"); + KAction *act = KStdAction::close(this, TQT_SLOT( close() ), actionCollection() ); act->plug(win); menuBar()->insertItem(i18n("&File"), win, DTL_WINDOW_ID, -1); diff --git a/ksirc/dccToplevel.h b/ksirc/dccToplevel.h index db9f3f67..204c1d4f 100644 --- a/ksirc/dccToplevel.h +++ b/ksirc/dccToplevel.h @@ -12,14 +12,14 @@ class dccTopLevel : public KMainWindow Q_OBJECT public: - dccTopLevel(QWidget *parent = 0, const char *name = 0); + dccTopLevel(TQWidget *parent = 0, const char *name = 0); virtual ~dccTopLevel(); dccManager *mgr() { return m_mgr; } signals: - void changeChannel(const QString&,const QString&); - void changed(bool, QString); + void changeChannel(const TQString&,const TQString&); + void changed(bool, TQString); public slots: diff --git a/ksirc/displayMgr.h b/ksirc/displayMgr.h index e0838ba0..62af2b18 100644 --- a/ksirc/displayMgr.h +++ b/ksirc/displayMgr.h @@ -1,7 +1,7 @@ #ifndef DISPLAYMGR_H #define DISPLAYMGR_H -#include +#include class QWidget; @@ -9,17 +9,17 @@ class DisplayMgr { public: virtual ~DisplayMgr() {}; - virtual void newTopLevel(QWidget *, bool show = false) = 0; + virtual void newTopLevel(TQWidget *, bool show = false) = 0; - virtual void removeTopLevel(QWidget *) = 0; + virtual void removeTopLevel(TQWidget *) = 0; - virtual void show(QWidget *) = 0; + virtual void show(TQWidget *) = 0; - virtual void hide(QWidget *) = 0; + virtual void hide(TQWidget *) = 0; - virtual void raise(QWidget *, bool takefocus = false) = 0; + virtual void raise(TQWidget *, bool takefocus = false) = 0; - virtual void setCaption(QWidget *, const QString&) = 0; + virtual void setCaption(TQWidget *, const TQString&) = 0; }; diff --git a/ksirc/displayMgrMDI.cpp b/ksirc/displayMgrMDI.cpp index ae1e5b39..f8286ed6 100644 --- a/ksirc/displayMgrMDI.cpp +++ b/ksirc/displayMgrMDI.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include @@ -31,24 +31,24 @@ DisplayMgrMDI::~DisplayMgrMDI() #define DMM_MOVEL_ID 51 #define DMM_MOVER_ID 52 -void DisplayMgrMDI::newTopLevel( QWidget *w, bool show ) +void DisplayMgrMDI::newTopLevel( TQWidget *w, bool show ) { topLevel()->addWidget( w, show ); if(w->inherits("KSircTopLevel")){ KSircTopLevel *t = static_cast(w); - connect(m_topLevel->tabWidget(), SIGNAL(currentChanged(QWidget *)), t, SLOT(focusChange(QWidget *))); + connect(m_topLevel->tabWidget(), TQT_SIGNAL(currentChanged(TQWidget *)), t, TQT_SLOT(focusChange(TQWidget *))); } if(w->inherits("KMainWindow")){ KMainWindow *t = static_cast(w); - QMenuBar *cmenu = t->menuBar(); + TQMenuBar *cmenu = t->menuBar(); if(cmenu){ - QPopupMenu *m = new QPopupMenu(t, QCString(t->name()) + "_popup_MDI"); + TQPopupMenu *m = new TQPopupMenu(t, TQCString(t->name()) + "_popup_MDI"); m->setCheckable(true); - m->insertItem(i18n("Detach Window"), this, SLOT(reparentReq()), 0, DMM_DEATCH_ID, 0); + m->insertItem(i18n("Detach Window"), this, TQT_SLOT(reparentReq()), 0, DMM_DEATCH_ID, 0); m->insertSeparator(0); - m->insertItem(i18n("Move Tab Left"), this, SLOT(moveWindowLeft()), ALT+SHIFT+Key_Left, DMM_MOVEL_ID, 0); - m->insertItem(i18n("Move Tab Right"), this, SLOT(moveWindowRight()), ALT+SHIFT+Key_Right, DMM_MOVER_ID, 0); + m->insertItem(i18n("Move Tab Left"), this, TQT_SLOT(moveWindowLeft()), ALT+SHIFT+Key_Left, DMM_MOVEL_ID, 0); + m->insertItem(i18n("Move Tab Right"), this, TQT_SLOT(moveWindowRight()), ALT+SHIFT+Key_Right, DMM_MOVER_ID, 0); /* * By using an posisiton of 4 this works for KSircTopLevel * and DCCTopLevel but will cause problems when we have @@ -58,23 +58,23 @@ void DisplayMgrMDI::newTopLevel( QWidget *w, bool show ) cmenu->insertItem(i18n("&Window"), m, DMM_MDI_ID, 4); cmenu->setAccel(Key_M, DMM_MDI_ID); - QPopupMenu *sm = new QPopupMenu(t, "settings" ); + TQPopupMenu *sm = new TQPopupMenu(t, "settings" ); KToggleAction *showmenu = KStdAction::showMenubar( 0, 0, t->actionCollection() ); showmenu->plug( sm ); - connect( showmenu, SIGNAL(toggled(bool)), cmenu, SLOT(setShown(bool)) ); + connect( showmenu, TQT_SIGNAL(toggled(bool)), cmenu, TQT_SLOT(setShown(bool)) ); KSelectAction *selectTabbar = new KSelectAction(i18n("&Tab Bar"), 0, this, "tabbar" ); - QStringList tabbaritems; + TQStringList tabbaritems; tabbaritems << i18n("&Top") << i18n("&Bottom"); selectTabbar->setItems(tabbaritems); selectTabbar->setCurrentItem(1); selectTabbar->plug( sm ); - connect( selectTabbar, SIGNAL(activated(int)), this, SLOT(setTabPosition(int)) ); + connect( selectTabbar, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setTabPosition(int)) ); KToggleAction *showfull = KStdAction::fullScreen( 0, 0, t->actionCollection(), t ); showfull->plug( sm ); - connect( showfull, SIGNAL(toggled(bool)), this, SLOT(setFullScreen(bool)) ); + connect( showfull, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setFullScreen(bool)) ); cmenu->insertItem( i18n("&Settings"), sm, -1, 5 ); } @@ -82,7 +82,7 @@ void DisplayMgrMDI::newTopLevel( QWidget *w, bool show ) topLevel()->show(); } -void DisplayMgrMDI::removeTopLevel(QWidget *w ) +void DisplayMgrMDI::removeTopLevel(TQWidget *w ) { if ( !m_topLevel ) return; @@ -106,7 +106,7 @@ void DisplayMgrMDI::removeTopLevel(QWidget *w ) } } -void DisplayMgrMDI::show(QWidget *w) +void DisplayMgrMDI::show(TQWidget *w) { if ( !m_topLevel ) return; @@ -115,7 +115,7 @@ void DisplayMgrMDI::show(QWidget *w) m_topLevel->show(); } -void DisplayMgrMDI::hide(QWidget *w) +void DisplayMgrMDI::hide(TQWidget *w) { if ( !m_topLevel ) return; @@ -126,7 +126,7 @@ void DisplayMgrMDI::hide(QWidget *w) } } -void DisplayMgrMDI::raise(QWidget *w, bool takefocus) +void DisplayMgrMDI::raise(TQWidget *w, bool takefocus) { assert( m_topLevel ); if(takefocus){ @@ -145,13 +145,13 @@ void DisplayMgrMDI::raise(QWidget *w, bool takefocus) } -void DisplayMgrMDI::setCaption(QWidget *w, const QString& cap) +void DisplayMgrMDI::setCaption(TQWidget *w, const TQString& cap) { assert( m_topLevel ); w->setCaption(cap); - QString esc = cap; + TQString esc = cap; esc.replace("&", "&&"); kdDebug(5008) << "Set caption: " << esc << endl; @@ -178,8 +178,8 @@ void DisplayMgrMDI::reparentReq() { kdDebug(5008) << "got reparent" << endl; - QWidget *o = kapp->focusWidget(); - QWidget *s; + TQWidget *o = kapp->focusWidget(); + TQWidget *s; if(o == NULL){ kdDebug(5008) << "Kapp says no widget has focus!" << endl; @@ -192,7 +192,7 @@ void DisplayMgrMDI::reparentReq() } else { - kdDebug(5008) << "QWidget is: " << o->className() << " name: " << o->name("none give") << endl; + kdDebug(5008) << "TQWidget is: " << o->className() << " name: " << o->name("none give") << endl; s = o; @@ -206,24 +206,24 @@ void DisplayMgrMDI::reparentReq() } -// QWidget *s = m_topLevel->tabWidget()->currentPage(); can't do this since you can never reattach +// TQWidget *s = m_topLevel->tabWidget()->currentPage(); can't do this since you can never reattach if(s){ KMainWindow *kst = static_cast(s); kdDebug(5008) << "Top is: " << kst->name("none give") <menuBar(); + TQMenuData *tmenu = kst->menuBar(); if(tmenu){ - QMenuItem *menui = tmenu->findItem(DMM_MDI_ID); + TQMenuItem *menui = tmenu->findItem(DMM_MDI_ID); if(menui){ - QMenuData *cmenu = menui->popup(); + TQMenuData *cmenu = menui->popup(); if(cmenu->findItem(DMM_DEATCH_ID) && cmenu->isItemChecked(DMM_DEATCH_ID)){ - kst->reparent( topLevel()->tabWidget(), 0, QPoint( 0, 0 ), true ); + kst->reparent( topLevel()->tabWidget(), 0, TQPoint( 0, 0 ), true ); show(kst); cmenu->setItemChecked(DMM_DEATCH_ID, false); } else { hide(kst); - kst->reparent( 0, QPoint(0,0), true ); + kst->reparent( 0, TQPoint(0,0), true ); cmenu->setItemChecked(DMM_DEATCH_ID, true); } } @@ -239,8 +239,8 @@ MDITopLevel *DisplayMgrMDI::topLevel() m_topLevel->show(); KAccel *a = new KAccel( m_topLevel ); - a->insert( "cycle left", i18n("Cycle left"), QString::null, ALT+Key_Left, ALT+Key_Left, this, SLOT(slotCycleTabsLeft()) ); - a->insert( "cycle right", i18n("Cycle right"), QString::null, ALT+Key_Right, ALT+Key_Right, this, SLOT(slotCycleTabsRight()) ); + a->insert( "cycle left", i18n("Cycle left"), TQString::null, ALT+Key_Left, ALT+Key_Left, this, TQT_SLOT(slotCycleTabsLeft()) ); + a->insert( "cycle right", i18n("Cycle right"), TQString::null, ALT+Key_Right, ALT+Key_Right, this, TQT_SLOT(slotCycleTabsRight()) ); } return m_topLevel; @@ -250,10 +250,10 @@ void DisplayMgrMDI::setTabPosition( int idx ) { switch ( idx ) { case 0: - m_topLevel->tabWidget()->setTabPosition(QTabWidget::Top); + m_topLevel->tabWidget()->setTabPosition(TQTabWidget::Top); break; case 1: - m_topLevel->tabWidget()->setTabPosition(QTabWidget::Bottom); + m_topLevel->tabWidget()->setTabPosition(TQTabWidget::Bottom); break; } } @@ -282,7 +282,7 @@ void DisplayMgrMDI::moveWindow(int step) return; } - QWidget *w = m_topLevel->tabWidget()->currentPage(); + TQWidget *w = m_topLevel->tabWidget()->currentPage(); if(w != 0x0){ int index = m_topLevel->tabWidget()->currentPageIndex(); index += step; @@ -294,7 +294,7 @@ void DisplayMgrMDI::moveWindow(int step) m_topLevel->setUpdatesEnabled(false); m_topLevel->hideWidget(w); int space = w->caption().find(" "); - QString esc = space < 1 ? w->caption():w->caption().left(space); + TQString esc = space < 1 ? w->caption():w->caption().left(space); esc.replace("&", "&&"); kdDebug(5008) << "Insert tab: " << esc << endl; m_topLevel->tabWidget()->insertTab( w, esc, index ); diff --git a/ksirc/displayMgrMDI.h b/ksirc/displayMgrMDI.h index 81528421..84e17631 100644 --- a/ksirc/displayMgrMDI.h +++ b/ksirc/displayMgrMDI.h @@ -4,21 +4,21 @@ #include "displayMgr.h" #include "mditoplevel.h" -class DisplayMgrMDI : public QObject, public DisplayMgr +class DisplayMgrMDI : public TQObject, public DisplayMgr { Q_OBJECT public: DisplayMgrMDI(); virtual ~DisplayMgrMDI(); - virtual void newTopLevel(QWidget *, bool show = FALSE); - virtual void removeTopLevel(QWidget *); + virtual void newTopLevel(TQWidget *, bool show = FALSE); + virtual void removeTopLevel(TQWidget *); - virtual void show(QWidget *); - virtual void hide(QWidget *); - virtual void raise(QWidget *, bool takefocus = false); + virtual void show(TQWidget *); + virtual void hide(TQWidget *); + virtual void raise(TQWidget *, bool takefocus = false); - virtual void setCaption(QWidget *, const QString&); + virtual void setCaption(TQWidget *, const TQString&); public slots: virtual void slotCycleTabsLeft(); @@ -38,9 +38,9 @@ protected: private: MDITopLevel *topLevel(); - QGuardedPtr m_topLevel; + TQGuardedPtr m_topLevel; int m_moveRightTab, m_moveLeftTab; - QPopupMenu *m_popupWindows; + TQPopupMenu *m_popupWindows; }; diff --git a/ksirc/displayMgrSDI.cpp b/ksirc/displayMgrSDI.cpp index ee5de75b..5b59f815 100644 --- a/ksirc/displayMgrSDI.cpp +++ b/ksirc/displayMgrSDI.cpp @@ -1,6 +1,6 @@ #include "displayMgrSDI.h" -#include +#include DisplayMgrSDI::DisplayMgrSDI() { @@ -9,23 +9,23 @@ DisplayMgrSDI::DisplayMgrSDI() DisplayMgrSDI::~DisplayMgrSDI(){ } -void DisplayMgrSDI::newTopLevel(QWidget *w, bool show){ +void DisplayMgrSDI::newTopLevel(TQWidget *w, bool show){ if(show == TRUE) w->show(); } -void DisplayMgrSDI::removeTopLevel(QWidget *){ +void DisplayMgrSDI::removeTopLevel(TQWidget *){ } -void DisplayMgrSDI::show(QWidget *w){ +void DisplayMgrSDI::show(TQWidget *w){ w->show(); } -void DisplayMgrSDI::hide(QWidget *w){ +void DisplayMgrSDI::hide(TQWidget *w){ w->hide(); } -void DisplayMgrSDI::raise(QWidget *w, bool takefocus){ +void DisplayMgrSDI::raise(TQWidget *w, bool takefocus){ w->show(); w->raise(); if(takefocus) @@ -34,7 +34,7 @@ void DisplayMgrSDI::raise(QWidget *w, bool takefocus){ } -void DisplayMgrSDI::setCaption(QWidget *w, const QString& cap){ +void DisplayMgrSDI::setCaption(TQWidget *w, const TQString& cap){ w->setCaption(cap); } diff --git a/ksirc/displayMgrSDI.h b/ksirc/displayMgrSDI.h index 04bf21fe..02ac88aa 100644 --- a/ksirc/displayMgrSDI.h +++ b/ksirc/displayMgrSDI.h @@ -8,14 +8,14 @@ public: DisplayMgrSDI(); virtual ~DisplayMgrSDI(); - virtual void newTopLevel(QWidget *, bool show = FALSE); - virtual void removeTopLevel(QWidget *); + virtual void newTopLevel(TQWidget *, bool show = FALSE); + virtual void removeTopLevel(TQWidget *); - virtual void show(QWidget *); - virtual void hide(QWidget *); - virtual void raise(QWidget *, bool takefocus = false); + virtual void show(TQWidget *); + virtual void hide(TQWidget *); + virtual void raise(TQWidget *, bool takefocus = false); - virtual void setCaption(QWidget *, const QString&); + virtual void setCaption(TQWidget *, const TQString&); private: }; diff --git a/ksirc/dockservercontroller.cpp b/ksirc/dockservercontroller.cpp index f83f5ada..6053e5ab 100644 --- a/ksirc/dockservercontroller.cpp +++ b/ksirc/dockservercontroller.cpp @@ -9,12 +9,12 @@ #include "dockservercontroller.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -42,7 +42,7 @@ extern DisplayMgr *displayMgr; -dscNickInfo::dscNickInfo(QString nick, QString server) : +dscNickInfo::dscNickInfo(TQString nick, TQString server) : m_nick(nick), m_server(server) { @@ -53,7 +53,7 @@ dscNickInfo::~dscNickInfo() } -dockServerController::dockServerController(servercontroller *sc, QWidget *parent, const char *_name) +dockServerController::dockServerController(servercontroller *sc, TQWidget *parent, const char *_name) : KSystemTray(parent, _name), m_sc(sc) { @@ -63,24 +63,24 @@ dockServerController::dockServerController(servercontroller *sc, QWidget *parent pop->setName("dockServerController_menu_pop"); #ifndef NDEBUG - pop->insertItem(i18n("Dump Object Tree"), sc, SLOT(dump_obj())); - pop->insertItem(i18n("Server Debug Window"), sc, SLOT(server_debug())); + pop->insertItem(i18n("Dump Object Tree"), sc, TQT_SLOT(dump_obj())); + pop->insertItem(i18n("Server Debug Window"), sc, TQT_SLOT(server_debug())); pop->insertSeparator(); #endif pop->insertItem(SmallIcon( "filter" ), i18n("&Filter Rule Editor..."), - m_sc, SLOT(filter_rule_editor())); + m_sc, TQT_SLOT(filter_rule_editor())); - KStdAction::preferences(m_sc, SLOT(general_prefs()), + KStdAction::preferences(m_sc, TQT_SLOT(general_prefs()), m_sc->actionCollection())->plug(pop); - KStdAction::configureNotifications(m_sc, SLOT(notification_prefs()), actionCollection())->plug(pop); + KStdAction::configureNotifications(m_sc, TQT_SLOT(notification_prefs()), actionCollection())->plug(pop); pop->insertSeparator(); pop->insertItem(i18n("New &Server..."), - m_sc, SLOT(new_connection())); - pop->insertItem(i18n("&Do Autoconnect..."), m_sc, SLOT(start_autoconnect_check())); - connect(this, SIGNAL(quitSelected()), m_sc, SLOT(endksirc())); + m_sc, TQT_SLOT(new_connection())); + pop->insertItem(i18n("&Do Autoconnect..."), m_sc, TQT_SLOT(start_autoconnect_check())); + connect(this, TQT_SIGNAL(quitSelected()), m_sc, TQT_SLOT(endksirc())); #if KDE_IS_VERSION(3,1,92) m_pic_dock = KSystemTray::loadIcon( "ksirc" ); @@ -96,8 +96,8 @@ dockServerController::dockServerController(servercontroller *sc, QWidget *parent m_mainPopVisible = false; createMainPopup(); - m_blinkTimer = new QTimer( this ); - connect( m_blinkTimer, SIGNAL(timeout()), this, SLOT( blinkDockedIcon() ) ); + m_blinkTimer = new TQTimer( this ); + connect( m_blinkTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( blinkDockedIcon() ) ); m_blinkStatus = false; m_blinkActive = false; @@ -107,14 +107,14 @@ dockServerController::dockServerController(servercontroller *sc, QWidget *parent i18n("If someone said your nick in a window, this action " "will make that window active for you."), ALT+CTRL+Key_A, KKey::QtWIN+CTRL+Key_A, this, - SLOT(raiseLastActiveWindow())); + TQT_SLOT(raiseLastActiveWindow())); servercontroller::self() ->getGlobalAccel() ->insert("Clear Blink", i18n("Clear Blinking Dock Icon"), i18n("If the dock icon is blinking, but you don't want " "to go to the window this will clear the blinking."), ALT+CTRL+Key_Down, KKey::QtWIN+CTRL+Key_Down, this, - SLOT(blinkClear())); + TQT_SLOT(blinkClear())); // mainPop = new KPopupMenu(this, "dockServerController_main_pop"); // mainPop->setTitle(i18n("KSirc Dock Menu")); @@ -130,7 +130,7 @@ kdDebug(5008) << "~dockServerController in" << endl; kdDebug(5008) << "~dockServerController out" << endl; } -int dockServerController::intoPopupSorted(QString str, QPopupMenu *what) +int dockServerController::intoPopupSorted(TQString str, TQPopupMenu *what) { uint i = 0; @@ -161,15 +161,15 @@ void dockServerController::createMainPopup() if(mainPop) delete mainPop; mainPop = new KPopupMenu(this, "dockservercontrller_main_pop"); - connect(mainPop, SIGNAL(activated(int)), - this, SLOT(mainActivated(int))); - connect(mainPop, SIGNAL(aboutToShow()), - this, SLOT(mainPopShow())); - connect(mainPop, SIGNAL(aboutToHide()), - this, SLOT(mainPopHide())); + connect(mainPop, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(mainActivated(int))); + connect(mainPop, TQT_SIGNAL(aboutToShow()), + this, TQT_SLOT(mainPopShow())); + connect(mainPop, TQT_SIGNAL(aboutToHide()), + this, TQT_SLOT(mainPopHide())); - QDictIterator it( m_nicks ); + TQDictIterator it( m_nicks ); for( ; it.current(); ++it){ KPopupMenu *sub = new KPopupMenu(mainPop); if(it.current()->status() == dscNickInfo::isOnline){ @@ -187,8 +187,8 @@ void dockServerController::createMainPopup() sub->setItemParameter(cid, id); sub->setItemParameter(wid, id); sub->setItemParameter(dcid, id); - connect(sub, SIGNAL(activated(int)), - this, SLOT(subItemActivated(int))); + connect(sub, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(subItemActivated(int))); } else { sub->insertItem(i18n("Went Offline: ") + it.current()->offline().toString("hh:mm")); @@ -201,40 +201,40 @@ void dockServerController::createMainPopup() } if(m_blink_reason.count() > 0){ mainPop->insertSeparator(); - for ( QStringList::Iterator it = m_blink_reason.begin(); it != m_blink_reason.end(); ++it ) { + for ( TQStringList::Iterator it = m_blink_reason.begin(); it != m_blink_reason.end(); ++it ) { mainPop->insertItem(*it); } } if(mainPop->count() == 0){ - mainPop->insertItem(i18n("Help on Notify Popup..."), this, SLOT(helpNotice())); - mainPop->insertItem(i18n("Configure Notify..."), this, SLOT(configNotify())); + mainPop->insertItem(i18n("Help on Notify Popup..."), this, TQT_SLOT(helpNotice())); + mainPop->insertItem(i18n("Configure Notify..."), this, TQT_SLOT(configNotify())); } } void dockServerController::subItemActivated(int sub_id) { - const QPopupMenu *sub = dynamic_cast(sender()); + const TQPopupMenu *sub = dynamic_cast(sender()); if(!sub){ - kdDebug(5008) << "subItemActivated by non QPopupMenu" << endl; + kdDebug(5008) << "subItemActivated by non TQPopupMenu" << endl; return; } int main_id = sub->itemParameter(sub_id); - QString mainText = mainPop->text(main_id); + TQString mainText = mainPop->text(main_id); if(mainText.isNull()){ kdDebug(5008) << "failed to get mainPop text" << endl; } - QRegExp rx("(\\S+) -> (\\S+) "); + TQRegExp rx("(\\S+) -> (\\S+) "); if(rx.search(mainText) >= 0){ - QString mserver = rx.cap(1); - QString mnick = rx.cap(2); + TQString mserver = rx.cap(1); + TQString mnick = rx.cap(2); - QString ns = mserver + "/" + mnick; + TQString ns = mserver + "/" + mnick; if(m_nicks[ns]){ kdDebug(5008) << "Got " << sub->text(sub_id) << " request for " << ns << endl; - QString cmd = sub->text(sub_id); - QString server = m_nicks[ns]->server(); - QString nick = m_nicks[ns]->nick(); + TQString cmd = sub->text(sub_id); + TQString server = m_nicks[ns]->server(); + TQString nick = m_nicks[ns]->nick(); if(cmd == i18n("Chat")){ servercontroller::self()->new_toplevel(KSircChannel(server, nick)); @@ -259,7 +259,7 @@ void dockServerController::subItemActivated(int sub_id) } -void dockServerController::mousePressEvent( QMouseEvent *e ) +void dockServerController::mousePressEvent( TQMouseEvent *e ) { if(e->button() == LeftButton){ showPopupMenu(mainPop); @@ -269,39 +269,39 @@ void dockServerController::mousePressEvent( QMouseEvent *e ) } } -void dockServerController::showPopupMenu( QPopupMenu *menu ) +void dockServerController::showPopupMenu( TQPopupMenu *menu ) { Q_ASSERT( menu != 0L ); - menu->popup(QCursor::pos()); + menu->popup(TQCursor::pos()); } -void dockServerController::nickOnline(QString server, QString nick) +void dockServerController::nickOnline(TQString server, TQString nick) { - QString sn = server + "/" + nick; + TQString sn = server + "/" + nick; if(!m_nicks[sn]) m_nicks.insert(sn, new dscNickInfo(nick, server)); m_nicks[sn]->setOnline(); createMainPopup(); } -void dockServerController::nickOffline(QString server, QString nick) +void dockServerController::nickOffline(TQString server, TQString nick) { - QString sn = server + "/" + nick; + TQString sn = server + "/" + nick; if(!m_nicks[sn]) m_nicks.insert(sn, new dscNickInfo(nick, server)); m_nicks[sn]->setOffline(); createMainPopup(); } -void dockServerController::serverOpen(QString) +void dockServerController::serverOpen(TQString) { } -void dockServerController::serverClose(QString server) +void dockServerController::serverClose(TQString server) { - QDictIterator it( m_nicks ); + TQDictIterator it( m_nicks ); while(it.current()){ if(it.current()->server() == server) m_nicks.remove(it.currentKey()); @@ -311,7 +311,7 @@ void dockServerController::serverClose(QString server) createMainPopup(); } -void dockServerController::startBlink(const QString& reason, const QString& text) +void dockServerController::startBlink(const TQString& reason, const TQString& text) { if(m_blinkActive == false){ // change icon (to "someone's talking to you" icon) @@ -321,12 +321,12 @@ void dockServerController::startBlink(const QString& reason, const QString& text m_blinkTimer->start( 500 ); // half a second } if(!reason.isNull()){ - QString br(reason); + TQString br(reason); if(text.isNull() && ksopts->runDocked && ksopts->dockPopups) - KPassivePopup::message(QString("Notify: %1").arg(reason), this); + KPassivePopup::message(TQString("Notify: %1").arg(reason), this); else { - QStringList sl; - QString cutup = text; + TQStringList sl; + TQString cutup = text; int i = 0; br = reason + " " + text.left(50); if(text.length() > 50) @@ -338,16 +338,16 @@ void dockServerController::startBlink(const QString& reason, const QString& text cutup = sl.join("\n"); cutup.truncate(cutup.length()-1); if(ksopts->runDocked && ksopts->dockPopups) - KPassivePopup::message(QString("%1").arg(reason), cutup, this); + KPassivePopup::message(TQString("%1").arg(reason), cutup, this); } m_blink_reason.append(br); createMainPopup(); kdDebug(5008) << "Blink reason: " << br << endl; - QRegExp rx("(\\S+) -> (\\S+)"); + TQRegExp rx("(\\S+) -> (\\S+)"); if(rx.search(reason) >= 0){ - QString server = rx.cap(1); - QString nick = rx.cap(2); + TQString server = rx.cap(1); + TQString nick = rx.cap(2); m_last_server = server; m_last_nick = nick; @@ -355,7 +355,7 @@ void dockServerController::startBlink(const QString& reason, const QString& text } } -void dockServerController::stopBlink(const QString& reason, bool clear) +void dockServerController::stopBlink(const TQString& reason, bool clear) { if(clear == true){ m_blinkActive = false; @@ -377,10 +377,10 @@ void dockServerController::blinkClear() void dockServerController::mainActivated(int id) { - QRegExp rx("(\\S+) -> (\\S+) "); + TQRegExp rx("(\\S+) -> (\\S+) "); if(rx.search(mainPop->text(id)) >= 0){ - QString server = rx.cap(1); - QString nick = rx.cap(2); + TQString server = rx.cap(1); + TQString nick = rx.cap(2); raiseWindow(server, nick); @@ -421,8 +421,8 @@ void dockServerController::helpNotice() void dockServerController::configNotify() { KSPrefs *kp = new KSPrefs(); - connect(kp, SIGNAL(update(int)), - m_sc, SLOT(configChange())); + connect(kp, TQT_SIGNAL(update(int)), + m_sc, TQT_SLOT(configChange())); kp->resize(550, 450); kp->showPage(2); /* Show auto connect page */ kp->show(); @@ -430,13 +430,13 @@ void dockServerController::configNotify() } -void dockServerController::raiseWindow(QString server, QString name) +void dockServerController::raiseWindow(TQString server, TQString name) { - QCString txt = server.utf8() + "_" + name.utf8() + "_toplevel"; - QWidget *obj = dynamic_cast( objFinder::find(txt, "KSircTopLevel")); + TQCString txt = server.utf8() + "_" + name.utf8() + "_toplevel"; + TQWidget *obj = dynamic_cast( objFinder::find(txt, "KSircTopLevel")); if(obj == 0x0){ txt = server.utf8() + "_!" + name.utf8() + "_toplevel"; - obj = dynamic_cast( objFinder::find(txt, "KSircTopLevel")); + obj = dynamic_cast( objFinder::find(txt, "KSircTopLevel")); } if(obj != 0x0){ diff --git a/ksirc/dockservercontroller.h b/ksirc/dockservercontroller.h index 5c5bdb59..605c9ad5 100644 --- a/ksirc/dockservercontroller.h +++ b/ksirc/dockservercontroller.h @@ -3,11 +3,11 @@ #define dockservercontroller_included #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class QPopupMenu; class QWidget; @@ -19,7 +19,7 @@ class QTimer; class dscNickInfo { public: - dscNickInfo(QString nick, QString server); + dscNickInfo(TQString nick, TQString server); ~dscNickInfo(); enum status { @@ -27,24 +27,24 @@ public: isOffline }; - QString nick() { return m_nick; } - QString server() { return m_server; } + TQString nick() { return m_nick; } + TQString server() { return m_server; } - void setOnline() { m_status = isOnline; m_online = QTime::currentTime(); } - const QTime &online() { return m_online; } + void setOnline() { m_status = isOnline; m_online = TQTime::currentTime(); } + const TQTime &online() { return m_online; } - void setOffline() { m_status = isOffline; m_offline = QTime::currentTime(); } - const QTime offline() { return m_offline; } + void setOffline() { m_status = isOffline; m_offline = TQTime::currentTime(); } + const TQTime offline() { return m_offline; } void setStatus(enum status stat) { m_status = stat; } enum status status() { return m_status; } private: - QString m_nick; - QString m_server; + TQString m_nick; + TQString m_server; enum status m_status; - QTime m_online; - QTime m_offline; + TQTime m_online; + TQTime m_offline; }; @@ -52,21 +52,21 @@ class dockServerController : public KSystemTray { Q_OBJECT public: - dockServerController(servercontroller *_sc, QWidget *parent = 0x0, const char *_name = 0x0); + dockServerController(servercontroller *_sc, TQWidget *parent = 0x0, const char *_name = 0x0); ~dockServerController(); - void startBlink(const QString& reason = QString::null, const QString& text = QString::null); - void stopBlink(const QString& reason = QString::null, bool clear = false); + void startBlink(const TQString& reason = TQString::null, const TQString& text = TQString::null); + void stopBlink(const TQString& reason = TQString::null, bool clear = false); - void nickOnline(QString server, QString nick); - void nickOffline(QString server, QString nick); + void nickOnline(TQString server, TQString nick); + void nickOffline(TQString server, TQString nick); - void serverOpen(QString server); - void serverClose(QString server); + void serverOpen(TQString server); + void serverClose(TQString server); protected: - void mousePressEvent( QMouseEvent *); - virtual void showPopupMenu( QPopupMenu *); + void mousePressEvent( TQMouseEvent *); + virtual void showPopupMenu( TQPopupMenu *); public slots: void raiseLastActiveWindow(); @@ -83,26 +83,26 @@ protected slots: void mainPopHide(); private: - int intoPopupSorted(QString, QPopupMenu *); + int intoPopupSorted(TQString, TQPopupMenu *); void createMainPopup(); - void raiseWindow(QString server, QString name); - QDict m_nicks; + void raiseWindow(TQString server, TQString name); + TQDict m_nicks; servercontroller *m_sc; KPopupMenu *mainPop; - QString m_last_nick; - QString m_last_server; + TQString m_last_nick; + TQString m_last_server; - QPixmap m_pic_dock; - QPixmap m_pic_info; + TQPixmap m_pic_dock; + TQPixmap m_pic_info; bool m_mainPopVisible; bool m_blinkActive; bool m_blinkStatus; // true: blue icon, false: normal icon - QTimer* m_blinkTimer; + TQTimer* m_blinkTimer; - QStringList m_blink_reason; + TQStringList m_blink_reason; }; diff --git a/ksirc/ioBroadcast.cpp b/ksirc/ioBroadcast.cpp index 9bac4e30..b36e4420 100644 --- a/ksirc/ioBroadcast.cpp +++ b/ksirc/ioBroadcast.cpp @@ -12,7 +12,7 @@ Implementation: - Make a QDictIterator, iterate over the windows sedning to each + Make a TQDictIterator, iterate over the windows sedning to each broadcaster that's not itself. *** NOTE! don't have 2 broadcasters or else they'll broadcast forever! @@ -27,10 +27,10 @@ KSircIOBroadcast::~KSircIOBroadcast() { } -void KSircIOBroadcast::sirc_receive(QCString str, bool) +void KSircIOBroadcast::sirc_receive(TQCString str, bool) { - QDictIterator it(proc->getWindowList()); + TQDictIterator it(proc->getWindowList()); KSircMessageReceiver *dflt = (proc->getWindowList())["!default"]; if(dflt->getBroadcast() == TRUE) @@ -46,10 +46,10 @@ void KSircIOBroadcast::sirc_receive(QCString str, bool) } -void KSircIOBroadcast::control_message(int command, QString str) +void KSircIOBroadcast::control_message(int command, TQString str) { - QDictIterator it(proc->getWindowList()); + TQDictIterator it(proc->getWindowList()); it.toFirst(); diff --git a/ksirc/ioBroadcast.h b/ksirc/ioBroadcast.h index 5be56390..9bb33ff9 100644 --- a/ksirc/ioBroadcast.h +++ b/ksirc/ioBroadcast.h @@ -13,8 +13,8 @@ public: } virtual ~KSircIOBroadcast(); - virtual void sirc_receive(QCString str, bool broadcast); - virtual void control_message(int, QString); + virtual void sirc_receive(TQCString str, bool broadcast); + virtual void control_message(int, TQString); virtual filterRuleList *defaultRules(); diff --git a/ksirc/ioDCC.cpp b/ksirc/ioDCC.cpp index 7c576904..ff2d5022 100644 --- a/ksirc/ioDCC.cpp +++ b/ksirc/ioDCC.cpp @@ -17,12 +17,12 @@ #include #include -#include +#include extern DisplayMgr *displayMgr; KSircIODCC::KSircIODCC(KSircProcess *_proc) : - QObject(), + TQObject(), KSircMessageReceiver(_proc) { proc = _proc; @@ -31,11 +31,11 @@ KSircIODCC::KSircIODCC(KSircProcess *_proc) : displayMgr->newTopLevel(mgr, FALSE); displayMgr->setCaption(mgr, proc->serverName() + i18n(" DCC Controller")); - connect(mgr->mgr(), SIGNAL(dccConnectClicked(dccItem *)), this, SLOT(dccConnectClicked(dccItem *))); - connect(mgr->mgr(), SIGNAL(dccResumeClicked(dccItem *)), this, SLOT(dccResumeClicked(dccItem *))); - connect(mgr->mgr(), SIGNAL(dccRenameClicked(dccItem *)), this, SLOT(dccRenameClicked(dccItem *))); - connect(mgr->mgr(), SIGNAL(dccAbortClicked(dccItem *)), this, SLOT(dccAbortClicked(dccItem *))); - connect(mgr->mgr(), SIGNAL(outputLine(QCString)), this, SIGNAL(outputLine(QCString))); + connect(mgr->mgr(), TQT_SIGNAL(dccConnectClicked(dccItem *)), this, TQT_SLOT(dccConnectClicked(dccItem *))); + connect(mgr->mgr(), TQT_SIGNAL(dccResumeClicked(dccItem *)), this, TQT_SLOT(dccResumeClicked(dccItem *))); + connect(mgr->mgr(), TQT_SIGNAL(dccRenameClicked(dccItem *)), this, TQT_SLOT(dccRenameClicked(dccItem *))); + connect(mgr->mgr(), TQT_SIGNAL(dccAbortClicked(dccItem *)), this, TQT_SLOT(dccAbortClicked(dccItem *))); + connect(mgr->mgr(), TQT_SIGNAL(outputLine(TQCString)), this, TQT_SIGNAL(outputLine(TQCString))); } @@ -46,7 +46,7 @@ KSircIODCC::~KSircIODCC() delete (dccTopLevel *) mgr; } -void KSircIODCC::sirc_receive(QCString str, bool ) +void KSircIODCC::sirc_receive(TQCString str, bool ) { if(!mgr) return; @@ -59,9 +59,9 @@ void KSircIODCC::sirc_receive(QCString str, bool ) // once in a long long time (compared to the byte messages) so if it takes // a few extra clock cycles to find them, who cares? if(str.find("DCC GET read:", 0) != -1){ /*fold01*/ - QRegExp rx("read: (.+) who: (.+) bytes: (.*)"); + TQRegExp rx("read: (.+) who: (.+) bytes: (.*)"); if(rx.search(str)){ - QString key = QString("%1/%2").arg(rx.cap(1)).arg(rx.cap(2)); + TQString key = TQString("%1/%2").arg(rx.cap(1)).arg(rx.cap(2)); uint bytesXfer = rx.cap(3).toUInt(); // @@ -74,9 +74,9 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC SEND write:", 0) != -1){ /*fold01*/ - QRegExp rx("write: (.+) who: (.+) bytes: (.*)"); + TQRegExp rx("write: (.+) who: (.+) bytes: (.*)"); if(rx.search(str)){ - QString key = QString("%1/%2").arg(rx.cap(1)).arg(rx.cap(2)); + TQString key = TQString("%1/%2").arg(rx.cap(1)).arg(rx.cap(2)); uint bytesXfer = rx.cap(3).toUInt(); if(DCCSendItems[key]){ @@ -85,12 +85,12 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("INBOUND DCC SEND", 0) != -1){ /*FOLD01*/ - QRegExp rx("who: (.+) file: (.+) size: (.*) ip: (.+) port: (.+)"); + TQRegExp rx("who: (.+) file: (.+) size: (.*) ip: (.+) port: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString size = rx.cap(3); - QString ip = rx.cap(4); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString size = rx.cap(3); + TQString ip = rx.cap(4); //QSTring port = rx.cap(5); int fileSize = size.toInt(); // Bytes per step @@ -99,25 +99,25 @@ void KSircIODCC::sirc_receive(QCString str, bool ) // setup dcc dialog displayMgr->show(mgr); dccItem *it = mgr->mgr()->newGetItem(filename, who, dccItem::dccGotOffer, fileSize); - connect(it, SIGNAL(itemRenamed(dccItem *, QString, QString)), - this, SLOT(dccRenameDone(dccItem *, QString, QString))); + connect(it, TQT_SIGNAL(itemRenamed(dccItem *, TQString, TQString)), + this, TQT_SLOT(dccRenameDone(dccItem *, TQString, TQString))); it->setWhoPostfix("(" + ip + ")"); - QString key = QString("%1/%2").arg(filename).arg(who); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCGetItems[key]){ /* * don't add duplicates, this cuases real headaches * for both us and the user. */ - QString renamed; + TQString renamed; dccItem *old = DCCGetItems.take(key); int i; for(i = 0; i <= (int) DCCGetItems.count()+1; i++){ - renamed = QString("%1 (finished %2)/%3").arg(filename).arg(i+1).arg(old->who()); + renamed = TQString("%1 (finished %2)/%3").arg(filename).arg(i+1).arg(old->who()); if( DCCGetItems[renamed] == 0x0) break; } - old->changeFilename(QString("%1 (finished %2)").arg(filename).arg(i+1)); + old->changeFilename(TQString("%1 (finished %2)").arg(filename).arg(i+1)); DCCGetItems.insert(renamed, it); } @@ -128,18 +128,18 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("Sent DCC SEND", 0) != -1){ /*FOLD01*/ - QRegExp rx("who: (.+) file: (.+) size: (.*)"); + TQRegExp rx("who: (.+) file: (.+) size: (.*)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString size = rx.cap(3); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString size = rx.cap(3); int fileSize = size.toInt(); // Bytes per step fileSize /= 1024; // setup dcc dialog displayMgr->show(mgr); dccItem *it = mgr->mgr()->newSendItem(filename, who, dccItem::dccSentOffer, fileSize); - QString key = QString("%1/%2").arg(filename).arg(who); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCSendItems[key]){ /* * don't add duplicates, this cuases real headaches @@ -147,15 +147,15 @@ void KSircIODCC::sirc_receive(QCString str, bool ) * We can get these on repeated sends or old files, * just renamed them, their finished anyways */ - QString renamed; + TQString renamed; dccItem *old = DCCSendItems.take(key); int i; for(i = 0; i <= (int) DCCSendItems.count()+1; i++){ - renamed = QString("%1 (sent %2)/%3").arg(filename).arg(i+1).arg(old->who()); + renamed = TQString("%1 (sent %2)/%3").arg(filename).arg(i+1).arg(old->who()); if( DCCSendItems[renamed] == 0x0) break; } - old->changeFilename(QString("%1 (sent %2)").arg(filename).arg(i+1)); + old->changeFilename(TQString("%1 (sent %2)").arg(filename).arg(i+1)); DCCSendItems.insert(renamed, it); } DCCSendItems.insert(key, it); @@ -165,16 +165,16 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC CHAT OFFERED", 0) != -1){ /*FOLD01*/ - QRegExp rx("who: (.+) ip: (.+) port: (.+)"); + TQRegExp rx("who: (.+) ip: (.+) port: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString ip = rx.cap(2); - QString port = rx.cap(3); + TQString who = rx.cap(1); + TQString ip = rx.cap(2); + TQString port = rx.cap(3); // setup dcc dialog displayMgr->show(mgr); dccItem *it = mgr->mgr()->newChatItem(who, dccItem::dccGotOffer); - connect(it, SIGNAL(itemRenamed(dccItem *, QString, QString)), - this, SLOT(dccRenameDone(dccItem *, QString, QString))); + connect(it, TQT_SIGNAL(itemRenamed(dccItem *, TQString, TQString)), + this, TQT_SLOT(dccRenameDone(dccItem *, TQString, TQString))); it->setWhoPostfix("(" + ip + ")"); DCCChatItems.insert(who, it); } @@ -183,15 +183,15 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC CHAT SEND", 0) != -1){ /*FOLD01*/ - QRegExp rx("who: (.+)"); + TQRegExp rx("who: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); + TQString who = rx.cap(1); // setup dcc dialog displayMgr->show(mgr); dccItem *it = mgr->mgr()->newChatItem(who, dccItem::dccSentOffer); - connect(it, SIGNAL(itemRenamed(dccItem *, QString, QString)), - this, SLOT(dccRenameDone(dccItem *, QString, QString))); + connect(it, TQT_SIGNAL(itemRenamed(dccItem *, TQString, TQString)), + this, TQT_SLOT(dccRenameDone(dccItem *, TQString, TQString))); DCCChatItems.insert(who, it); } else { @@ -199,11 +199,11 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC SEND terminated") != -1){ /*FOLD01*/ - QRegExp rx("who: (.+) file: (.+) reason: (.*)"); + TQRegExp rx("who: (.+) file: (.+) reason: (.*)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString error = rx.cap(3); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString error = rx.cap(3); enum dccItem::dccStatus status = dccItem::dccDone; if(error == "CLOSE"){ @@ -213,7 +213,7 @@ void KSircIODCC::sirc_receive(QCString str, bool ) status = dccItem::dccError; KPassivePopup::message(i18n("DCC SEND with %1 for %2 failed because of %3").arg(who).arg(filename).arg(error), mgr->mgr()); } - QString key = QString("%1/%2").arg(filename).arg(who); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCSendItems[key]){ kdDebug(5008) << "SendPercent: " << DCCSendItems[key]->getPercent() << endl; if((status == dccItem::dccDone) && (DCCSendItems[key]->getPercent() < 100)) @@ -224,18 +224,18 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } else if(str.find ("DCC GET terminated") != -1){ /*fold01*/ kdDebug(5008) << "Term: " << str << endl; - QRegExp rx("who: (.+) file: (.+) reason: (.*)"); + TQRegExp rx("who: (.+) file: (.+) reason: (.*)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString error = rx.cap(3); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString error = rx.cap(3); enum dccItem::dccStatus status = dccItem::dccDone; if(error != "OK"){ status = dccItem::dccError; KPassivePopup::message(i18n("DCC GET with %1 for %2 failed because of %3").arg(who).arg(filename).arg(error), mgr->mgr()); } - QString key = QString("%1/%2").arg(filename).arg(who); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCGetItems[key]){ kdDebug(5008) << "GetPercent: " << DCCGetItems[key]->getPercent() << endl; if((status == dccItem::dccDone) && (DCCGetItems[key]->getPercent() < 100)) @@ -248,11 +248,11 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC GET resumed") != -1){ /*fold01*/ - QRegExp rx("who: (.+) file: (.+)"); + TQRegExp rx("who: (.+) file: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString key = QString("%1/%2").arg(filename).arg(who); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCGetItems[key]){ dccItem *it = DCCGetItems[key]; kdDebug(5008) << "Got DCC GET resumed message..." << it->file() << endl; @@ -263,34 +263,34 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC SEND resumed") != -1){ /*fold01*/ - QRegExp rx("who: (.+) file: (.+)"); + TQRegExp rx("who: (.+) file: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString key = QString("%1/%2").arg(filename).arg(who); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCSendItems[key]){ DCCSendItems[key]->changeStatus(dccItem::dccResumed); } } } else if(str.find("DCC GET established") != -1){ /*fold01*/ - QRegExp rx("who: (.+) file: (.+)"); + TQRegExp rx("who: (.+) file: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString key = QString("%1/%2").arg(filename).arg(who); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCGetItems[key]){ DCCGetItems[key]->changeStatus(dccItem::dccRecving); } } } else if(str.find("DCC SEND established") != -1){ /*fold01*/ - QRegExp rx("who: (.+) file: (.+) ip: (\\S+)"); + TQRegExp rx("who: (.+) file: (.+) ip: (\\S+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString ip = rx.cap(3); - QString key = QString("%1/%2").arg(filename).arg(who); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString ip = rx.cap(3); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCSendItems[key]){ DCCSendItems[key]->setWhoPostfix("(" + ip + ")"); DCCSendItems[key]->changeStatus(dccItem::dccSending); @@ -298,34 +298,34 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC CHAT established") != -1){ /*FOLD01*/ - QRegExp rx("who: (.+)"); + TQRegExp rx("who: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); + TQString who = rx.cap(1); if(DCCChatItems[who]){ DCCChatItems[who]->changeStatus(dccItem::dccOpen); - proc->new_toplevel(KSircChannel(proc->serverName(), QString("=") + who.lower())); + proc->new_toplevel(KSircChannel(proc->serverName(), TQString("=") + who.lower())); } } } else if(str.find("DCC CHAT inbound established") != -1){ /*FOLD01*/ - QRegExp rx("who: (.+) ip: (.+)"); + TQRegExp rx("who: (.+) ip: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString ip = rx.cap(2); + TQString who = rx.cap(1); + TQString ip = rx.cap(2); if(DCCChatItems[who]){ DCCChatItems[who]->setWhoPostfix("(" + ip + ")"); DCCChatItems[who]->changeStatus(dccItem::dccOpen); - proc->new_toplevel(KSircChannel(proc->serverName(), QString("=") + who.lower())); + proc->new_toplevel(KSircChannel(proc->serverName(), TQString("=") + who.lower())); } } } else if(str.find("DCC GET failed") != -1){ /*fold01*/ - QRegExp rx("who: (.+) file: (.+) reason: (.*)"); + TQRegExp rx("who: (.+) file: (.+) reason: (.*)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString error = rx.cap(3); - QString key = QString("%1/%2").arg(filename).arg(who); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString error = rx.cap(3); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCGetItems[key]){ DCCGetItems[key]->changeStatus(dccItem::dccError); } @@ -333,10 +333,10 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC CHAT failed") != -1){ /*FOLD01*/ - QRegExp rx("who: (.+) reason: (.*)"); + TQRegExp rx("who: (.+) reason: (.*)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString error = rx.cap(2); + TQString who = rx.cap(1); + TQString error = rx.cap(2); if(DCCChatItems[who]){ DCCChatItems[who]->changeStatus(dccItem::dccError); } @@ -344,59 +344,59 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("DCC CHAT renamed") != -1){ /*FOLD01*/ - QRegExp rx("who: (.+) to: (.+)"); + TQRegExp rx("who: (.+) to: (.+)"); if(rx.search(str)){ - QString oldwho = rx.cap(1); - QString newwho = rx.cap(2); + TQString oldwho = rx.cap(1); + TQString newwho = rx.cap(2); - QString oldwin = "=" + oldwho; + TQString oldwin = "=" + oldwho; if(proc->getWindowList().find(oldwin)){ - proc->getWindowList().find(oldwin)->control_message(CHANGE_CHANNEL,QString("=" +newwho).lower()); + proc->getWindowList().find(oldwin)->control_message(CHANGE_CHANNEL,TQString("=" +newwho).lower()); } } } else if(str.find("Closing DCC GET") != -1){ /*fold01*/ - QRegExp rx("who: (.+) file: (.+)"); + TQRegExp rx("who: (.+) file: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); - QString key = QString("%1/%2").arg(filename).arg(who); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); + TQString key = TQString("%1/%2").arg(filename).arg(who); if(DCCGetItems[key]){ DCCGetItems[key]->changeStatus(dccItem::dccCancel); } } } // else if(str.find("Closing DCC SEND") != -1){ /*FOLD01*/ -// QRegExp rx("who: (.+) file: (.+)"); +// TQRegExp rx("who: (.+) file: (.+)"); // if(rx.search(str)){ -// QString who = rx.cap(1); -// QString filename = rx.cap(2); -// QString key = QString("%1/%2").arg(filename).arg(who); +// TQString who = rx.cap(1); +// TQString filename = rx.cap(2); +// TQString key = TQString("%1/%2").arg(filename).arg(who); // if(DCCSendItems[key]){ // DCCSendItems[key]->changeStatus(dccItem::dccCancel); // } // } // } else if(str.find("Closing DCC CHAT") != -1){ /*fold01*/ - QRegExp rx("who: (.+)"); + TQRegExp rx("who: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); + TQString who = rx.cap(1); if(DCCChatItems[who]){ DCCChatItems[who]->changeStatus(dccItem::dccDone); } } } else if(str.find("No DCC SEND") != -1){ /*fold01*/ - QRegExp rx("who: (.+) file: (.+)"); + TQRegExp rx("who: (.+) file: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); - //QString key = QString("%1/%2").arg(filename).arg(who); + //TQString key = TQString("%1/%2").arg(filename).arg(who); - QPtrList toDel; - QDict new_list; - QDictIterator it( DCCSendItems ); + TQPtrList toDel; + TQDict new_list; + TQDictIterator it( DCCSendItems ); for(;it.current(); ++it){ if((it.current()->who() == who) && (it.current()->file() == filename) @@ -413,14 +413,14 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("No DCC GET") != -1){ /*fold01*/ - QRegExp rx("who: (.+) file: (.+)"); + TQRegExp rx("who: (.+) file: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); - QString filename = rx.cap(2); + TQString who = rx.cap(1); + TQString filename = rx.cap(2); - QPtrList toDel; - QDict new_list; - QDictIterator it( DCCGetItems ); + TQPtrList toDel; + TQDict new_list; + TQDictIterator it( DCCGetItems ); for(;it.current(); ++it){ if((it.current()->who() == who) && (it.current()->file() == filename) @@ -437,13 +437,13 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } } else if(str.find("No DCC CHAT") != -1){ /*fold01*/ - QRegExp rx("who: (.+)"); + TQRegExp rx("who: (.+)"); if(rx.search(str)){ - QString who = rx.cap(1); + TQString who = rx.cap(1); - QPtrList toDel; - QDict new_list; - QDictIterator it( DCCChatItems ); + TQPtrList toDel; + TQDict new_list; + TQDictIterator it( DCCChatItems ); for(;it.current(); ++it){ if(it.current()->who() == who){ toDel.append(it.current()); @@ -463,11 +463,11 @@ void KSircIODCC::sirc_receive(QCString str, bool ) } -void KSircIODCC::control_message(int, QString) +void KSircIODCC::control_message(int, TQString) { } -void KSircIODCC::cancelTransfer(QString filename) +void KSircIODCC::cancelTransfer(TQString filename) { //if(DlgList[filename]){ //emit outputLine(DCCStatus[filename]->cancelMessage.ascii()); @@ -481,17 +481,17 @@ void KSircIODCC::cancelTransfer(QString filename) void KSircIODCC::getFile() { /* - QString text = pending->fileListing()->text(pending->fileListing()->currentItem()); + TQString text = pending->fileListing()->text(pending->fileListing()->currentItem()); int pos = text.find(" ", 0); - QString nick = text.mid(0, pos); + TQString nick = text.mid(0, pos); pos = text.find(" ", pos+1) + 1; - QString filename = text.mid(pos, text.length() - pos); + TQString filename = text.mid(pos, text.length() - pos); //if(DlgList[filename]->isVisible() == FALSE) // DlgList[filename]->show(); - QString command = "/dcc get " + nick + " " + filename + "\n"; + TQString command = "/dcc get " + nick + " " + filename + "\n"; emit outputLine(command.ascii()); for(uint i = 0; i < pending->fileListing()->count(); i++) - if(QString(pending->fileListing()->text(i)) == (nick + " offered " + filename)) + if(TQString(pending->fileListing()->text(i)) == (nick + " offered " + filename)) pending->fileListing()->removeItem(i); if(pending->fileListing()->count() == 0) @@ -502,15 +502,15 @@ void KSircIODCC::getFile() void KSircIODCC::forgetFile() { /* - QString text = pending->fileListing()->text(pending->fileListing()->currentItem()); + TQString text = pending->fileListing()->text(pending->fileListing()->currentItem()); int pos = text.find(" ", 0); - QString nick = text.mid(0, pos); + TQString nick = text.mid(0, pos); pos = text.find(" ", pos+1) + 1; - QString filename = text.mid(pos, text.length() - pos); - QString command = "/dcc close get " + nick + " " + filename + "\n"; + TQString filename = text.mid(pos, text.length() - pos); + TQString command = "/dcc close get " + nick + " " + filename + "\n"; emit outputLine(command.ascii()); for(uint i = 0; i < pending->fileListing()->count(); i++) - if(QString(pending->fileListing()->text(i)) == (nick + " offered " + filename)) + if(TQString(pending->fileListing()->text(i)) == (nick + " offered " + filename)) pending->fileListing()->removeItem(i); if(pending->fileListing()->count() == 0) @@ -539,7 +539,7 @@ filterRuleList *KSircIODCC::defaultRules() void KSircIODCC::dccConnectClicked(dccItem *it) { - QString str; + TQString str; kdDebug(5008) << "Got connect click on " << it->who() << " " << it->type() << endl; switch(it->type()){ case dccItem::dccGet: @@ -557,7 +557,7 @@ void KSircIODCC::dccConnectClicked(dccItem *it) } void KSircIODCC::dccResumeClicked(dccItem *it) { - QString str; + TQString str; kdDebug(5008) << "Got resume click on " << it->who() << " " << it->type() << endl; switch(it->type()){ case dccItem::dccGet: @@ -576,17 +576,17 @@ void KSircIODCC::dccRenameClicked(dccItem *it) } void KSircIODCC::dccAbortClicked(dccItem *it) { - QString str; + TQString str; switch(it->status()){ case dccItem::dccDone: case dccItem::dccCancel: case dccItem::dccError: switch(it->type()) { case dccItem::dccGet: - DCCGetItems.remove(QString("%1/%2").arg(it->file()).arg(it->who())); + DCCGetItems.remove(TQString("%1/%2").arg(it->file()).arg(it->who())); break; case dccItem::dccSend: - DCCSendItems.remove(QString("%1/%2").arg(it->file()).arg(it->who())); + DCCSendItems.remove(TQString("%1/%2").arg(it->file()).arg(it->who())); break; case dccItem::dccChat: DCCChatItems.remove(it->who()); @@ -612,14 +612,14 @@ void KSircIODCC::dccAbortClicked(dccItem *it) } } -void KSircIODCC::dccRenameDone(dccItem *it, QString oldWho, QString oldFile) +void KSircIODCC::dccRenameDone(dccItem *it, TQString oldWho, TQString oldFile) { if(it->type() == dccItem::dccGet){ - QString str = QString("/dcc rename %1 %2 %3\n").arg(oldWho).arg(oldFile).arg(it->file()); - QString key = QString("%1/%2").arg(oldFile).arg(oldWho); + TQString str = TQString("/dcc rename %1 %2 %3\n").arg(oldWho).arg(oldFile).arg(it->file()); + TQString key = TQString("%1/%2").arg(oldFile).arg(oldWho); if(DCCGetItems[key]){ DCCGetItems.take(key); - QString newkey = QString("%1/%2").arg(it->file()).arg(it->who()); + TQString newkey = TQString("%1/%2").arg(it->file()).arg(it->who()); DCCGetItems.insert(newkey, it); } emit outputLine(str.ascii()); @@ -629,7 +629,7 @@ void KSircIODCC::dccRenameDone(dccItem *it, QString oldWho, QString oldFile) DCCChatItems.take(oldWho); DCCChatItems.insert(it->who(), it); } - QString str = QString("/dcc rchat %1 %2\n").arg(oldWho).arg(it->who()); + TQString str = TQString("/dcc rchat %1 %2\n").arg(oldWho).arg(it->who()); emit outputLine(str.ascii()); } diff --git a/ksirc/ioDCC.h b/ksirc/ioDCC.h index 76a93941..a9768f29 100644 --- a/ksirc/ioDCC.h +++ b/ksirc/ioDCC.h @@ -1,9 +1,9 @@ #ifndef KIODCCC_H #define KIODCCC_H -#include -#include -#include +#include +#include +#include #include "dccManager.h" #include "dccToplevel.h" @@ -12,14 +12,14 @@ class KSProgress; struct DCCInfo { - QString nick; - QString cancelMessage; + TQString nick; + TQString cancelMessage; int LastSize; int PercentSize; bool inProgress; }; -class KSircIODCC : public QObject, +class KSircIODCC : public TQObject, public KSircMessageReceiver { Q_OBJECT @@ -27,14 +27,14 @@ public: KSircIODCC(KSircProcess *_proc); virtual ~KSircIODCC(); - virtual void sirc_receive(QCString, bool broadcast); - virtual void control_message(int, QString); + virtual void sirc_receive(TQCString, bool broadcast); + virtual void control_message(int, TQString); virtual filterRuleList *defaultRules(); virtual void showMgr(); protected slots: - void cancelTransfer(QString); + void cancelTransfer(TQString); void getFile(); void forgetFile(); @@ -43,21 +43,21 @@ protected slots: void dccRenameClicked(dccItem *); void dccAbortClicked(dccItem *); - void dccRenameDone(dccItem *, QString, QString); + void dccRenameDone(dccItem *, TQString, TQString); signals: - void outputLine(QCString); + void outputLine(TQCString); private: -// QDict DlgList; - //QDict DlgList; - //QDict DCCStatus; - QDict DCCGetItems; - QDict DCCSendItems; - QDict DCCChatItems; +// TQDict DlgList; + //TQDict DlgList; + //TQDict DCCStatus; + TQDict DCCGetItems; + TQDict DCCSendItems; + TQDict DCCChatItems; //dccDialog *pending; - QGuardedPtr mgr; + TQGuardedPtr mgr; KSircProcess *proc; }; diff --git a/ksirc/ioDiscard.cpp b/ksirc/ioDiscard.cpp index 7ce4173e..6210d615 100644 --- a/ksirc/ioDiscard.cpp +++ b/ksirc/ioDiscard.cpp @@ -14,10 +14,10 @@ KSircIODiscard::~KSircIODiscard() { } -void KSircIODiscard::sirc_receive(QCString, bool) +void KSircIODiscard::sirc_receive(TQCString, bool) { } -void KSircIODiscard::control_message(int, QString) +void KSircIODiscard::control_message(int, TQString) { } diff --git a/ksirc/ioDiscard.h b/ksirc/ioDiscard.h index e15c62da..4c4df665 100644 --- a/ksirc/ioDiscard.h +++ b/ksirc/ioDiscard.h @@ -11,8 +11,8 @@ public: } virtual ~KSircIODiscard(); - virtual void sirc_receive(QCString, bool broadcast); - virtual void control_message(int, QString); + virtual void sirc_receive(TQCString, bool broadcast); + virtual void control_message(int, TQString); private: }; diff --git a/ksirc/ioLAG.cpp b/ksirc/ioLAG.cpp index 50f3f082..0a1a2ec7 100644 --- a/ksirc/ioLAG.cpp +++ b/ksirc/ioLAG.cpp @@ -13,7 +13,7 @@ #include KSircIOLAG::KSircIOLAG(KSircProcess *_proc) - : QObject(), + : TQObject(), KSircMessageReceiver(_proc) { proc = _proc; @@ -29,7 +29,7 @@ KSircIOLAG::~KSircIOLAG() killTimers(); } -void KSircIOLAG::sirc_receive(QCString str, bool) +void KSircIOLAG::sirc_receive(TQCString str, bool) { if(str.contains("*L*")){ @@ -40,7 +40,7 @@ void KSircIOLAG::sirc_receive(QCString str, bool) kdDebug(5008) << "Lag mesage broken: " << str << endl; return; } - QString lag = str.mid(s1, s2 - s1); + TQString lag = str.mid(s1, s2 - s1); // cerr << "Lag: " << str << endl; // cerr << "Setting lag to: " << lag << endl; (proc->getWindowList())["!all"]->control_message(SET_LAG, lag); @@ -48,13 +48,13 @@ void KSircIOLAG::sirc_receive(QCString str, bool) } -void KSircIOLAG::control_message(int, QString) +void KSircIOLAG::control_message(int, TQString) { } -void KSircIOLAG::timerEvent ( QTimerEvent * ) +void KSircIOLAG::timerEvent ( TQTimerEvent * ) { - QCString cmd = "/lag\n"; + TQCString cmd = "/lag\n"; emit outputLine(cmd); } diff --git a/ksirc/ioLAG.h b/ksirc/ioLAG.h index 1c3bc00d..6fc99901 100644 --- a/ksirc/ioLAG.h +++ b/ksirc/ioLAG.h @@ -1,11 +1,11 @@ #ifndef KIOLAG_H #define KIOLAG_H -#include +#include #include "messageReceiver.h" -class KSircIOLAG : public QObject, +class KSircIOLAG : public TQObject, public KSircMessageReceiver { Q_OBJECT @@ -13,16 +13,16 @@ public: KSircIOLAG(KSircProcess *_proc); virtual ~KSircIOLAG(); - virtual void sirc_receive(QCString, bool broadcast); - virtual void control_message(int, QString); + virtual void sirc_receive(TQCString, bool broadcast); + virtual void control_message(int, TQString); protected slots: protected: - virtual void timerEvent ( QTimerEvent * ); + virtual void timerEvent ( TQTimerEvent * ); signals: - void outputLine(QCString); + void outputLine(TQCString); private: KSircProcess *proc; diff --git a/ksirc/ioNotify.cpp b/ksirc/ioNotify.cpp index 14c6e9e8..b3b4a52f 100644 --- a/ksirc/ioNotify.cpp +++ b/ksirc/ioNotify.cpp @@ -12,7 +12,7 @@ #include KSircIONotify::KSircIONotify(KSircProcess *_proc) - : QObject(), + : TQObject(), KSircMessageReceiver(_proc) { proc = _proc; @@ -24,7 +24,7 @@ KSircIONotify::~KSircIONotify() { } -void KSircIONotify::sirc_receive(QCString str, bool) +void KSircIONotify::sirc_receive(TQCString str, bool) { if(str.contains("*)*")){ int s1, s2; @@ -34,7 +34,7 @@ void KSircIONotify::sirc_receive(QCString str, bool) kdDebug(5008) << "Nick Notify mesage broken: " << str << endl; return; } - QString nick = str.mid(s1, s2 - s1); + TQString nick = str.mid(s1, s2 - s1); emit notify_online(nick); } else if(str.contains("*(*")){ @@ -45,7 +45,7 @@ void KSircIONotify::sirc_receive(QCString str, bool) kdDebug(5008) << "Nick Notify mesage broken: " << str << endl; return; } - QString nick = str.mid(s1, s2 - s1); + TQString nick = str.mid(s1, s2 - s1); emit notify_offline(nick); } else{ @@ -54,7 +54,7 @@ void KSircIONotify::sirc_receive(QCString str, bool) } } -void KSircIONotify::control_message(int, QString) +void KSircIONotify::control_message(int, TQString) { } diff --git a/ksirc/ioNotify.h b/ksirc/ioNotify.h index e95edabe..b5a9890e 100644 --- a/ksirc/ioNotify.h +++ b/ksirc/ioNotify.h @@ -1,11 +1,11 @@ #ifndef KIONOTIFY_H #define KIONOTIFY_H -#include +#include #include "messageReceiver.h" -class KSircIONotify : public QObject, +class KSircIONotify : public TQObject, public KSircMessageReceiver { Q_OBJECT @@ -13,14 +13,14 @@ public: KSircIONotify(KSircProcess *_proc); virtual ~KSircIONotify(); - virtual void sirc_receive(QCString, bool broadcast); - virtual void control_message(int, QString); + virtual void sirc_receive(TQCString, bool broadcast); + virtual void control_message(int, TQString); virtual filterRuleList *defaultRules(); signals: - virtual void notify_online(QString); - virtual void notify_offline(QString); + virtual void notify_online(TQString); + virtual void notify_offline(TQString); protected slots: diff --git a/ksirc/iocontroller.cpp b/ksirc/iocontroller.cpp index 61b0b49c..d63fba7b 100644 --- a/ksirc/iocontroller.cpp +++ b/ksirc/iocontroller.cpp @@ -54,9 +54,9 @@ - Should be called for stderr data, not connected, does nothing. - stdin_write(QString): + stdin_write(TQString): - Slot that get's connected to by KSircProcess to each - window. QString shold be written un touched! Let the + window. TQString shold be written un touched! Let the writter figure out what ever he wants to do. sircDied: @@ -74,11 +74,11 @@ #include "messageReceiver.h" #include "ksopts.h" -#include -#include +#include +#include #include #include -#include +#include #include #include @@ -89,7 +89,7 @@ int KSircIOController::counter = 0; KSircIOController::KSircIOController(KProcess *_proc, KSircProcess *_ksircproc) - : QObject() + : TQObject() { counter++; @@ -103,20 +103,20 @@ KSircIOController::KSircIOController(KProcess *_proc, KSircProcess *_ksircproc) // Connect the data arrived // to sirc receive for adding // the main text window - connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)), - this, SLOT(stdout_read(KProcess*, char*, int))); + connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + this, TQT_SLOT(stdout_read(KProcess*, char*, int))); // Connect the stderr data // to sirc receive for adding // the main text window - connect(proc, SIGNAL(receivedStderr(KProcess *, char *, int)), - this, SLOT(stderr_read(KProcess*, char*, int))); + connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), + this, TQT_SLOT(stderr_read(KProcess*, char*, int))); - connect(proc, SIGNAL(processExited(KProcess *)), - this, SLOT(sircDied(KProcess *))); + connect(proc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(sircDied(KProcess *))); // Notify on sirc dying - connect(proc, SIGNAL(wroteStdin(KProcess*)), - this, SLOT(procCTS(KProcess*))); + connect(proc, TQT_SIGNAL(wroteStdin(KProcess*)), + this, TQT_SLOT(procCTS(KProcess*))); proc_CTS = TRUE; #if 0 showDebugTraffic(true); @@ -175,12 +175,12 @@ void KSircIOController::stdout_read(KProcess *, char *_buffer, int buflen) */ int pos,pos2,pos3; - QCString name, line; + TQCString name, line; assert(_buffer != 0); assert(buflen > 0); - QCString buffer(_buffer, buflen+1); + TQCString buffer(_buffer, buflen+1); //fprintf(stderr, "first print: \n"); //my_print(buffer); //kdDebug(5008) << "<-- read: " << buffer << endl; @@ -229,7 +229,7 @@ void KSircIOController::stdout_read(KProcess *, char *_buffer, int buflen) line = buffer.mid(pos, pos2 - pos); if(m_debugLB){ - QString s = QString::fromUtf8(line); + TQString s = TQString::fromUtf8(line); m_debugLB->insertItem(s); } @@ -243,9 +243,9 @@ void KSircIOController::stdout_read(KProcess *, char *_buffer, int buflen) line.remove(0, pos3+1); } } - QString enc = KGlobal::charsets()->encodingForName( ksopts->channel["global"]["global"].encoding ); - QTextCodec *qtc = KGlobal::charsets()->codecForName( enc ); - QString qsname = qtc->toUnicode(name); + TQString enc = KGlobal::charsets()->encodingForName( ksopts->channel["global"]["global"].encoding ); + TQTextCodec *qtc = KGlobal::charsets()->codecForName( enc ); + TQString qsname = qtc->toUnicode(name); /* char *b = qstrdup(line); kdDebug(5008) << "----------------------------------------" << endl; @@ -302,7 +302,7 @@ void KSircIOController::stderr_read(KProcess *p, char *b, int l) stdout_read(p, b, l); } -void KSircIOController::stdin_write(QCString s) +void KSircIOController::stdin_write(TQCString s) { if (!proc->isRunning()) { @@ -328,7 +328,7 @@ void KSircIOController::stdin_write(QCString s) } else{ if(m_debugLB){ - QString s = QString::fromUtf8(buffer); + TQString s = TQString::fromUtf8(buffer); m_debugLB->insertItem(s); m_debugLB->setContentsPos( 0, m_debugLB->contentsHeight()); } @@ -351,7 +351,7 @@ void KSircIOController::sircDied(KProcess *process) kdDebug(5008) << "IOController: KProcess died!\n"; ksircproc->TopList["!all"]->sirc_receive("*E* DSIRC IS DEAD"); ksircproc->TopList["!all"]->sirc_receive("*E* KSIRC WINDOW HALTED"); - ksircproc->TopList["!all"]->sirc_receive( QCString( "*E* Tried to run: " ) + KGlobal::dirs()->findExe("dsirc").ascii() + QCString( "\n" ) ); + ksircproc->TopList["!all"]->sirc_receive( TQCString( "*E* Tried to run: " ) + KGlobal::dirs()->findExe("dsirc").ascii() + TQCString( "\n" ) ); ksircproc->TopList["!all"]->sirc_receive("*E* DID YOU READ THE INSTALL INTRUCTIONS?"); } @@ -361,30 +361,30 @@ void KSircIOController::procCTS ( KProcess *) delete[] send_buf; send_buf = 0x0; if(!buffer.isEmpty()){ - QCString str = ""; + TQCString str = ""; stdin_write(str); } } -void KSircIOController::showContextMenuOnDebugWindow(QListBoxItem *, const QPoint &pos) +void KSircIOController::showContextMenuOnDebugWindow(TQListBoxItem *, const TQPoint &pos) { if (!m_debugLB) return; - QPopupMenu popup(m_debugLB); + TQPopupMenu popup(m_debugLB); popup.insertItem("Save Contents to File...", 1); if (popup.exec( pos ) != 1) return; - QString path = KFileDialog::getSaveFileName(); + TQString path = KFileDialog::getSaveFileName(); if (path.isEmpty()) return; - QFile file(path); + TQFile file(path); if (!file.open(IO_WriteOnly)) return; - QTextStream stream(&file); + TQTextStream stream(&file); for (uint i = 0; i < m_debugLB->count(); ++i) stream << m_debugLB->text(i) << endl; @@ -394,11 +394,11 @@ void KSircIOController::showDebugTraffic(bool show) { kdDebug(5008) << "Got show request: " << show << endl; if(m_debugLB == 0 && show == true){ - m_debugLB = new QListBox(0x0, QCString(this->name()) + "_debugWindow"); + m_debugLB = new TQListBox(0x0, TQCString(this->name()) + "_debugWindow"); m_debugLB->resize(600, 300); m_debugLB->show(); - connect(m_debugLB,SIGNAL(contextMenuRequested(QListBoxItem *,const QPoint &)), - this,SLOT(showContextMenuOnDebugWindow(QListBoxItem *,const QPoint &))); + connect(m_debugLB,TQT_SIGNAL(contextMenuRequested(TQListBoxItem *,const TQPoint &)), + this,TQT_SLOT(showContextMenuOnDebugWindow(TQListBoxItem *,const TQPoint &))); } else if(m_debugLB != 0 && show == false){ delete m_debugLB; @@ -415,7 +415,7 @@ bool KSircIOController::isDebugTraffic() return false; } -void KSircIOController::appendDebug(QString s) +void KSircIOController::appendDebug(TQString s) { if(m_debugLB){ m_debugLB->insertItem(s); diff --git a/ksirc/iocontroller.h b/ksirc/iocontroller.h index 76c97e18..2e7e79f6 100644 --- a/ksirc/iocontroller.h +++ b/ksirc/iocontroller.h @@ -1,7 +1,7 @@ #ifndef IOCONTROL_H #define IOCONTROL_H -#include +#include class KProcess; class KSircProcess; @@ -24,31 +24,31 @@ public slots: virtual void stdout_read(KProcess *proc, char *_buffer, int buflen); virtual void stderr_read(KProcess *proc, char *_buffer, int buflen); - virtual void stdin_write(QCString); + virtual void stdin_write(TQCString); virtual void sircDied(KProcess *); - virtual void appendDebug(QString); + virtual void appendDebug(TQString); protected slots: virtual void procCTS(KProcess *); private slots: - void showContextMenuOnDebugWindow( QListBoxItem *, const QPoint &pos ); + void showContextMenuOnDebugWindow( TQListBoxItem *, const TQPoint &pos ); private: - QCString holder; + TQCString holder; bool proc_CTS; KProcess *proc; KSircProcess *ksircproc; char *send_buf; - QCString buffer; + TQCString buffer; static int counter; - QListBox *m_debugLB; + TQListBox *m_debugLB; }; #endif diff --git a/ksirc/ksirc.cpp b/ksirc/ksirc.cpp index eddb450a..88abb6d6 100644 --- a/ksirc/ksirc.cpp +++ b/ksirc/ksirc.cpp @@ -15,7 +15,7 @@ #include -#include +#include #include #include @@ -32,8 +32,8 @@ static const char description[] = I18N_NOOP("KDE IRC client"); -//QDict TopList; -//QDict TopList; +//TQDict TopList; +//TQDict TopList; class KCmdLineOptions options[] = { @@ -58,8 +58,8 @@ public: // if the controller is hidden KMWSessionManaged won't send the fake close event. // we want it in any way however. if ( controller->isHidden() ) { - QCloseEvent e; - QApplication::sendEvent( controller, &e ); + TQCloseEvent e; + TQApplication::sendEvent( controller, &e ); } return true; @@ -110,16 +110,16 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv ) KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QCString nickName = args->getOption( "nick" ); - QCString server = args->getOption( "server" ); - QCString channel = args->getOption( "channel" ); + TQCString nickName = args->getOption( "nick" ); + TQCString server = args->getOption( "server" ); + TQCString channel = args->getOption( "channel" ); if ( !nickName.isEmpty() ) ksopts->server["global"].nick = nickName; if ( !server.isEmpty() ) { - QString ser = QString::fromLocal8Bit( server ); - QString port = "6667"; + TQString ser = TQString::fromLocal8Bit( server ); + TQString port = "6667"; if(ser.contains(":")){ port = ser.section(":", 1, 1); ser = ser.section(":", 0, 0); @@ -127,9 +127,9 @@ extern "C" KDE_EXPORT int kdemain( int argc, char ** argv ) KSircServer kss(ser, port, "", "", false); sc->new_ksircprocess( kss ); if ( !channel.isEmpty() ) { - QStringList channels = QStringList::split( ',', QString::fromLocal8Bit( channel ) ); - QStringList::ConstIterator it = channels.begin(); - QStringList::ConstIterator end = channels.end(); + TQStringList channels = TQStringList::split( ',', TQString::fromLocal8Bit( channel ) ); + TQStringList::ConstIterator it = channels.begin(); + TQStringList::ConstIterator end = channels.end(); for ( ; it != end; ++it ) { sc->new_toplevel( KSircChannel(ser, *it), true ); } diff --git a/ksirc/ksircchannel.h b/ksirc/ksircchannel.h index 1913b530..a70f0ef6 100644 --- a/ksirc/ksircchannel.h +++ b/ksirc/ksircchannel.h @@ -1,34 +1,34 @@ #ifndef KSIRCCHANNEL_H #define KSIRCCHANNEL_H -#include +#include class KSircChannel { public: - KSircChannel( const QString server, - const QString channel, - const QString key = QString::null, - const QString encoding = QString::null + KSircChannel( const TQString server, + const TQString channel, + const TQString key = TQString::null, + const TQString encoding = TQString::null ) : m_server(server), m_channel(channel), m_key(key), m_encoding(encoding) {} - const QString server() const { return m_server; } - const QString channel() const { return m_channel; } - const QString key() const { return m_key; } - const QString encoding() const { return m_encoding; } + const TQString server() const { return m_server; } + const TQString channel() const { return m_channel; } + const TQString key() const { return m_key; } + const TQString encoding() const { return m_encoding; } - void setChannel(QString channel) { m_channel = channel; } - void setKey(QString key) { m_key = key; } - void setEncoding(QString encoding) { m_encoding = encoding; } + void setChannel(TQString channel) { m_channel = channel; } + void setKey(TQString key) { m_key = key; } + void setEncoding(TQString encoding) { m_encoding = encoding; } private: - const QString m_server; /* channels can never change server */ - QString m_channel; - QString m_key; - QString m_encoding; + const TQString m_server; /* channels can never change server */ + TQString m_channel; + TQString m_key; + TQString m_encoding; }; diff --git a/ksirc/ksircprocess.cpp b/ksirc/ksircprocess.cpp index 1fff6807..26dbc8c7 100644 --- a/ksirc/ksircprocess.cpp +++ b/ksirc/ksircprocess.cpp @@ -15,7 +15,7 @@ server: is the name of the server to connect to. It must be provided or else start sirc will barf. :( parent: parent window, this _should_ be null - name: name, passed to QObject... + name: name, passed to TQObject... ~KSirProcess: kill the sirc process, and iocontrollller, emit delete_toplevel @@ -105,7 +105,7 @@ #include #include -#include +#include #include #include #include @@ -117,8 +117,8 @@ extern DisplayMgr *displayMgr; -KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * parent, const char * name ) - : QObject(parent, name), m_kss(kss), m_serverid(server_id) +KSircProcess::KSircProcess( TQString &server_id, KSircServer &kss, TQObject * parent, const char * name ) + : TQObject(parent, name), m_kss(kss), m_serverid(server_id) { proc = new KProcess(); @@ -130,7 +130,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare //server = qstrdup(kss.server()); - QDict nTopList(17, FALSE); + TQDict nTopList(17, FALSE); TopList = nTopList; // TopList.setAutoDelete(TRUE) @@ -140,7 +140,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare ksopts->serverSetup(kss); // Setup the environment for KSirc - QString qsNick, qsRealname, qsUserID, qsAltNick; + TQString qsNick, qsRealname, qsUserID, qsAltNick; KConfig *kConfig = kapp->config(); kConfig->setGroup("StartUp"); qsNick = ksopts->serv(kss).nick; @@ -168,7 +168,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare proc->setEnvironment("SIRCLIB", KGlobal::dirs()->findResourceDir("appdata", "ksirc.pl")); proc->setEnvironment("SIRCWAIT", "1"); - QString env = locate("appdata", "ksircrc"); + TQString env = locate("appdata", "ksircrc"); if (!env.isEmpty()) proc->setEnvironment("SIRCRC", env); env = locate("appdata", "ksircrc.pl"); @@ -178,7 +178,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare // Setup the proc now, so iocontroller can use it. It's latter // though. started bellow though. - proc->setName(QCString(name) + "_kprocess"); + proc->setName(TQCString(name) + "_kprocess"); objFinder::insert(proc); // insertChild(proc); @@ -187,7 +187,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare // Fixes 47157. proc->setEnvironment( "SIRCSERVER", "[" + kss.server() + "]:" + kss.port() + ":" + kss.password()); - QString sslopt; + TQString sslopt; if(kss.usessl()) sslopt = "-S"; *proc << "perl" << KGlobal::dirs()->findExe("dsirc") << "-8" << "-r" << sslopt; @@ -195,7 +195,7 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare // Finally start the iocontroller. iocontrol = new KSircIOController(proc, this); - iocontrol->setName(QCString(name) + "_iocontrol"); + iocontrol->setName(TQCString(name) + "_iocontrol"); // Create toplevel before iocontroller so it has somewhere to write stuff. @@ -215,22 +215,22 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare KSircIODCC *dcc = new KSircIODCC(this); TopList.insert("!dcc", dcc); dcc = static_cast( TopList["!dcc"] ); // g++ bug - connect(dcc, SIGNAL(outputLine(QCString)), - iocontrol, SLOT(stdin_write(QCString))); + connect(dcc, TQT_SIGNAL(outputLine(TQCString)), + iocontrol, TQT_SLOT(stdin_write(TQCString))); KSircIOLAG *lag = new KSircIOLAG(this); TopList.insert("!lag", lag); lag = static_cast( TopList["!lag"] ); // g++ bug! - connect(lag, SIGNAL(outputLine(QCString)), - iocontrol, SLOT(stdin_write(QCString))); + connect(lag, TQT_SIGNAL(outputLine(TQCString)), + iocontrol, TQT_SLOT(stdin_write(TQCString))); KSircIONotify *notify = new KSircIONotify(this); TopList.insert("!notify", notify); notify = static_cast( TopList["!notify"] ); // g++ bug - connect(notify, SIGNAL(notify_online(QString)), - this, SLOT(notify_forw_online(QString))); - connect(notify, SIGNAL(notify_offline(QString)), - this, SLOT(notify_forw_offline(QString))); + connect(notify, TQT_SIGNAL(notify_online(TQString)), + this, TQT_SLOT(notify_forw_online(TQString))); + connect(notify, TQT_SIGNAL(notify_offline(TQString)), + this, TQT_SLOT(notify_forw_offline(TQString))); TopList.insert("!base_rules", new KSMBaseRules(this)); @@ -239,10 +239,10 @@ KSircProcess::KSircProcess( QString &server_id, KSircServer &kss, QObject * pare proc->start(KProcess::NotifyOnExit, KProcess::All); // Intial commands to load ASAP. // turn on sirc ssfe mode - QCString command = "/eval $ssfe=1\n"; + TQCString command = "/eval $ssfe=1\n"; iocontrol->stdin_write(command); - command = "/eval $version .= \"+KSIRC/" + QCString(KSIRC_VERSION) + "\"\n"; + command = "/eval $version .= \"+KSIRC/" + TQCString(KSIRC_VERSION) + "\"\n"; iocontrol->stdin_write(command); command = "/load " + locate("appdata", "filters.pl").local8Bit() + "\n"; iocontrol->stdin_write(command); @@ -279,11 +279,11 @@ KSircProcess::~KSircProcess() cleanup(); } -QPtrList KSircProcess::messageReceivers() const +TQPtrList KSircProcess::messageReceivers() const { - QPtrList res; + TQPtrList res; res.setAutoDelete( false ); - QDictIterator it( TopList ); + TQDictIterator it( TopList ); for (; it.current(); ++it ) if ( it.currentKey() != "!default" && it.currentKey() != "!no_channel" ) @@ -291,7 +291,7 @@ QPtrList KSircProcess::messageReceivers() const return res; } -const QDict &KSircProcess::mrList() const +const TQDict &KSircProcess::mrList() const { return TopList; } @@ -305,12 +305,12 @@ void KSircProcess::cleanup() TopList.setAutoDelete(true); TopList.clear(); - emit ProcMessage(m_serverid, ProcCommand::procClose, QString()); + emit ProcMessage(m_serverid, ProcCommand::procClose, TQString()); // Do closing down commands, this should release all puke widgets #if 0 dsirc does this on SIGTERM (malte) - QString quit_cmd = "/eval &dohooks(\"quit\");\n"; + TQString quit_cmd = "/eval &dohooks(\"quit\");\n"; proc->writeStdin(quit_cmd.ascii(), quit_cmd.length()); sleep(1); #endif @@ -358,7 +358,7 @@ void KSircProcess::new_toplevel(const KSircChannel &channelInfo, bool safe) i18n("Flood Warning"), i18n("Turn Off"), i18n("Keep Enabled")); switch(res) { case KMessageBox::Yes: - emit ProcMessage(serverID(), ProcCommand::turnOffAutoCreate, QString()); + emit ProcMessage(serverID(), ProcCommand::turnOffAutoCreate, TQString()); } last_window_open = current_time; number_open = 0; @@ -383,20 +383,20 @@ void KSircProcess::new_toplevel(const KSircChannel &channelInfo, bool safe) // Connect needed signals. For a message window we never want it // becomming the default so we ignore focusIn events into it. - connect(wm, SIGNAL(outputLine(QCString)), - iocontrol, SLOT(stdin_write(QCString))); - connect(wm, SIGNAL(open_toplevel(const KSircChannel &)), - this,SLOT(new_toplevel (const KSircChannel &))); - connect(wm, SIGNAL(closing(KSircTopLevel *, QString)), - this,SLOT(close_toplevel(KSircTopLevel *, QString))); - connect(wm, SIGNAL(currentWindow(KSircTopLevel *)), - this,SLOT(default_window(KSircTopLevel *))); - connect(wm, SIGNAL(changeChannel(const QString &, const QString &)), - this,SLOT(recvChangeChannel(const QString &, const QString &))); - connect(wm, SIGNAL(destroyed(QObject *)), - this,SLOT(clean_toplevel(QObject *))); - connect( wm, SIGNAL( requestQuit( const QCString& ) ), - SLOT( request_quit( const QCString& ) ) ); + connect(wm, TQT_SIGNAL(outputLine(TQCString)), + iocontrol, TQT_SLOT(stdin_write(TQCString))); + connect(wm, TQT_SIGNAL(open_toplevel(const KSircChannel &)), + this,TQT_SLOT(new_toplevel (const KSircChannel &))); + connect(wm, TQT_SIGNAL(closing(KSircTopLevel *, TQString)), + this,TQT_SLOT(close_toplevel(KSircTopLevel *, TQString))); + connect(wm, TQT_SIGNAL(currentWindow(KSircTopLevel *)), + this,TQT_SLOT(default_window(KSircTopLevel *))); + connect(wm, TQT_SIGNAL(changeChannel(const TQString &, const TQString &)), + this,TQT_SLOT(recvChangeChannel(const TQString &, const TQString &))); + connect(wm, TQT_SIGNAL(destroyed(TQObject *)), + this,TQT_SLOT(clean_toplevel(TQObject *))); + connect( wm, TQT_SIGNAL( requestQuit( const TQCString& ) ), + TQT_SLOT( request_quit( const TQCString& ) ) ); default_window(wm); // Set it to the default window. emit ProcMessage(serverID(), ProcCommand::addTopLevel, channelInfo.channel()); @@ -407,13 +407,13 @@ void KSircProcess::new_toplevel(const KSircChannel &channelInfo, bool safe) wm->lineEdit()->setFocus(); // Give focus back to the linee, someone takes it away on new create } else { - QWidget *w = dynamic_cast(TopList.find(channelInfo.channel())); + TQWidget *w = dynamic_cast(TopList.find(channelInfo.channel())); if(w) displayMgr->raise(w); } } -void KSircProcess::close_toplevel(KSircTopLevel *wm, QString name) +void KSircProcess::close_toplevel(KSircTopLevel *wm, TQString name) { if(auto_create_really == TRUE) turn_on_autocreate(); @@ -423,7 +423,7 @@ void KSircProcess::close_toplevel(KSircTopLevel *wm, QString name) // the removeTopLevel below also deletes the mditoplevel (in case // we are using mdi) , which deletes its children, which deletes // 'wm' , so watch out not to delete twice! (Simon) - QGuardedPtr guardedwm = wm; + TQGuardedPtr guardedwm = wm; // Do this now or we get junk left on the screen displayMgr->removeTopLevel(wm); @@ -436,13 +436,13 @@ void KSircProcess::close_toplevel(KSircTopLevel *wm, QString name) // So let's go grab a default, and make sure it's not "!" control // object. - QDictIterator it(TopList); + TQDictIterator it(TopList); for(;it.current() && it.currentKey().startsWith("!"); ++it); if (!it.current()) { // No top-level windows left. - QCString command = "/quit\n"; // "/signoff" ? + TQCString command = "/quit\n"; // "/signoff" ? iocontrol->stdin_write(command); // kill sirc kdDebug(5008) << "KSP closing: " << m_kss.server() << endl; delete guardedwm; @@ -456,8 +456,8 @@ void KSircProcess::close_toplevel(KSircTopLevel *wm, QString name) // Let's let em know she's deleted! if(ksopts->autoCreateWin == TRUE){ - emit ProcMessage(serverID(), ProcCommand::turnOffAutoCreate, QString()); - QTimer::singleShot(5000, this, SLOT(turn_on_autocreate())); + emit ProcMessage(serverID(), ProcCommand::turnOffAutoCreate, TQString()); + TQTimer::singleShot(5000, this, TQT_SLOT(turn_on_autocreate())); auto_create_really = TRUE; } else{ @@ -468,7 +468,7 @@ void KSircProcess::close_toplevel(KSircTopLevel *wm, QString name) emit ProcMessage(serverID(), ProcCommand::deleteTopLevel, name); } -void KSircProcess::clean_toplevel(QObject *clean){ +void KSircProcess::clean_toplevel(TQObject *clean){ if(!clean){ qWarning("Passed null to cleaner!!"); return; @@ -476,10 +476,10 @@ void KSircProcess::clean_toplevel(QObject *clean){ bool cont = FALSE; do{ cont = FALSE; - QDictIterator it(TopList); + TQDictIterator it(TopList); while(it.current() != 0x0){ - if((QObject *)it.current() == clean){ - QString key = it.currentKey(); + if((TQObject *)it.current() == clean){ + TQString key = it.currentKey(); while(TopList[key] != 0x0){ TopList.remove(key); } @@ -491,22 +491,22 @@ void KSircProcess::clean_toplevel(QObject *clean){ } while(cont == TRUE); } -void KSircProcess::request_quit( const QCString& command ) +void KSircProcess::request_quit( const TQCString& command ) { iocontrol->stdin_write( command ); // Since removing the toplevels will delete the one that emitted this // signal as well, we need to defer this a little (malte) - QTimer::singleShot( 0, this, SLOT( do_quit() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( do_quit() ) ); } void KSircProcess::do_quit() { - for ( QDictIterator< KSircMessageReceiver > it( TopList ); it.current(); ++it ) + for ( TQDictIterator< KSircMessageReceiver > it( TopList ); it.current(); ++it ) { if ( it.currentKey() == "!default" ) continue; if ( KSircTopLevel* topLevel = dynamic_cast< KSircTopLevel* >( it.current() ) ) { - QGuardedPtr< KSircTopLevel > guardedTL = topLevel; + TQGuardedPtr< KSircTopLevel > guardedTL = topLevel; displayMgr->removeTopLevel( topLevel ); delete guardedTL; } @@ -530,7 +530,7 @@ void KSircProcess::default_window(KSircTopLevel *w) } -void KSircProcess::recvChangeChannel(const QString &old_chan, const QString &new_chan) +void KSircProcess::recvChangeChannel(const TQString &old_chan, const TQString &new_chan) { // // Channel changed name, add our own name and off we go. @@ -551,10 +551,10 @@ void KSircProcess::recvChangeChannel(const QString &old_chan, const QString &new void KSircProcess::filters_update() { - QString command, next_part, key, data; + TQString command, next_part, key, data; command = "/crule\n"; iocontrol->stdin_write(command.ascii()); - QDictIterator it(TopList); + TQDictIterator it(TopList); KSircMessageReceiver *cur, *br; filterRuleList *frl; filterRule *fr; @@ -605,17 +605,17 @@ void KSircProcess::filters_update() } -void KSircProcess::notify_forw_online(QString nick) +void KSircProcess::notify_forw_online(TQString nick) { emit ProcMessage(serverID(), ProcCommand::nickOnline, nick); } -void KSircProcess::notify_forw_offline(QString nick) +void KSircProcess::notify_forw_offline(TQString nick) { emit ProcMessage(serverID(), ProcCommand::nickOffline, nick); } -void KSircProcess::ServMessage(QString dst_server, int command, QString args) +void KSircProcess::ServMessage(TQString dst_server, int command, TQString args) { if(dst_server.isEmpty() || (dst_server == serverID())){ switch(command){ @@ -631,13 +631,13 @@ void KSircProcess::ServMessage(QString dst_server, int command, QString args) void KSircProcess::turn_on_autocreate() { - emit ProcMessage(serverID(), ProcCommand::turnOnAutoCreate, QString()); + emit ProcMessage(serverID(), ProcCommand::turnOnAutoCreate, TQString()); auto_create_really = FALSE; } -void KSircProcess::setNick(const QString nick) +void KSircProcess::setNick(const TQString nick) { - QString new_nick = nick; + TQString new_nick = nick; while (!new_nick.isEmpty() && (new_nick[0].latin1() == '@' || new_nick[0].latin1() == '*')) new_nick.remove(0, 1); @@ -653,7 +653,7 @@ void KSircProcess::setNick(const QString nick) } -const QString KSircProcess::getNick() const +const TQString KSircProcess::getNick() const { return m_nick; } diff --git a/ksirc/ksircprocess.h b/ksirc/ksircprocess.h index 9a4cf7c3..bf61245a 100644 --- a/ksirc/ksircprocess.h +++ b/ksirc/ksircprocess.h @@ -4,8 +4,8 @@ class KSircProcess; class KSircTopLevel; -#include -#include +#include +#include #include "iocontroller.h" #include "ksircserver.h" @@ -21,45 +21,45 @@ class KSircProcess : public QObject Q_OBJECT friend class KSircIOController; public: - KSircProcess(QString &server_id, KSircServer &kss, QObject * parent=0, const char * name=0); + KSircProcess(TQString &server_id, KSircServer &kss, TQObject * parent=0, const char * name=0); virtual ~KSircProcess(); - QDict &getWindowList() + TQDict &getWindowList() { return TopList; } - QPtrList messageReceivers() const; - const QDict &mrList() const; + TQPtrList messageReceivers() const; + const TQDict &mrList() const; - QString serverName() const { return m_kss.server(); } - QString serverPort() const { return m_kss.port(); } - QString serverID() const { return m_serverid; } + TQString serverName() const { return m_kss.server(); } + TQString serverPort() const { return m_kss.port(); } + TQString serverID() const { return m_serverid; } KSircIOController *getIOController() { return iocontrol; } - const QString getNick() const; - void setNick(const QString nick); + const TQString getNick() const; + void setNick(const TQString nick); signals: - void ProcMessage(QString, int, QString); + void ProcMessage(TQString, int, TQString); public slots: - virtual void ServMessage(QString server, int command, QString args); - virtual void close_toplevel(KSircTopLevel *, QString); + virtual void ServMessage(TQString server, int command, TQString args); + virtual void close_toplevel(KSircTopLevel *, TQString); virtual void default_window(KSircTopLevel *); - virtual void recvChangeChannel(const QString &, const QString &); + virtual void recvChangeChannel(const TQString &, const TQString &); virtual void new_toplevel(const KSircChannel &, bool safe = false); virtual void filters_update(); - virtual void notify_forw_online(QString); - virtual void notify_forw_offline(QString); + virtual void notify_forw_online(TQString); + virtual void notify_forw_offline(TQString); protected slots: - virtual void clean_toplevel(QObject *clean); - virtual void request_quit( const QCString& command ); + virtual void clean_toplevel(TQObject *clean); + virtual void request_quit( const TQCString& command ); virtual void do_quit(); virtual void turn_on_autocreate(); @@ -72,19 +72,19 @@ private: KSircIOController *iocontrol; KProcess *proc; - QDict TopList; + TQDict TopList; bool running_window; bool default_follow_focus; bool auto_create_really; KSircServer m_kss; - const QString m_serverid; + const TQString m_serverid; /* * m_nick is our nick as reported by the lower levels */ - QString m_nick; + TQString m_nick; // char *server; }; diff --git a/ksirc/ksircserver.h b/ksirc/ksircserver.h index ec63e1f6..d2d9ab70 100644 --- a/ksirc/ksircserver.h +++ b/ksirc/ksircserver.h @@ -1,32 +1,32 @@ #ifndef KSIRCSERVER_H #define KSIRCSERVER_H -#include -#include +#include +#include class KSircServer { public: - KSircServer( const QString &server, - const QString &port, - const QString &script = QString::null, - const QString &password = QString::null, + KSircServer( const TQString &server, + const TQString &port, + const TQString &script = TQString::null, + const TQString &password = TQString::null, bool ssl = false ) : m_server(server), m_port(port), m_script(script), m_password(password), m_ssl(ssl) {} - const QString server() const { return m_server; } - const QString port() const { return m_port; } - const QString script() const { return m_script; } - const QString password() const { return m_password; } + const TQString server() const { return m_server; } + const TQString port() const { return m_port; } + const TQString script() const { return m_script; } + const TQString password() const { return m_password; } bool usessl() const { return m_ssl; } private: - const QString m_server; - const QString m_port; - const QString m_script; - const QString m_password; + const TQString m_server; + const TQString m_port; + const TQString m_script; + const TQString m_password; const bool m_ssl; }; diff --git a/ksirc/ksopts.cpp b/ksirc/ksopts.cpp index 11b25ad8..b1df2f40 100644 --- a/ksirc/ksopts.cpp +++ b/ksirc/ksopts.cpp @@ -41,10 +41,10 @@ KSOGeneral::KSOGeneral() } -QPixmap KSOGeneral::backgroundPixmap() +TQPixmap KSOGeneral::backgroundPixmap() { if ( m_backgroundPixmap.isNull() && !backgroundFile.isEmpty() ) - m_backgroundPixmap = QPixmap( backgroundFile ); + m_backgroundPixmap = TQPixmap( backgroundFile ); return m_backgroundPixmap; } @@ -63,9 +63,9 @@ KSOServer::KSOServer() struct passwd *pw = getpwuid( getuid() ); if ( pw ) { - nick = QString::fromLocal8Bit( pw->pw_name ); - userID = QString::fromLocal8Bit( pw->pw_name ); - realName = QString::fromLocal8Bit( pw->pw_gecos ).section( ',', 0, 0 ); + nick = TQString::fromLocal8Bit( pw->pw_name ); + userID = TQString::fromLocal8Bit( pw->pw_name ); + realName = TQString::fromLocal8Bit( pw->pw_gecos ).section( ',', 0, 0 ); } #endif } @@ -89,24 +89,24 @@ KSOColors::KSOColors() msg1Regex = false; msg2Regex = false; - backgroundColor = kapp->palette().color( QPalette::Active, QColorGroup::Mid ); - selBackgroundColor = kapp->palette().color( QPalette::Active, QColorGroup::Highlight ); - selForegroundColor = kapp->palette().color( QPalette::Active, QColorGroup::HighlightedText ); + backgroundColor = kapp->palette().color( TQPalette::Active, TQColorGroup::Mid ); + selBackgroundColor = kapp->palette().color( TQPalette::Active, TQColorGroup::Highlight ); + selForegroundColor = kapp->palette().color( TQPalette::Active, TQColorGroup::HighlightedText ); ircColors[0] = Qt::white; ircColors[1] = Qt::black; ircColors[2] = Qt::darkBlue; ircColors[3] = Qt::darkGreen; ircColors[4] = Qt::red; - ircColors[5] = QColor ( 165, 42, 42 ); + ircColors[5] = TQColor ( 165, 42, 42 ); ircColors[6] = Qt::darkMagenta; - ircColors[7] = QColor( 255, 0x7b, 00 ); + ircColors[7] = TQColor( 255, 0x7b, 00 ); ircColors[8] = Qt::yellow; ircColors[9] = Qt::green; ircColors[10] = Qt::darkCyan; ircColors[11] = Qt::cyan; ircColors[12] = Qt::blue; - ircColors[13] = QColor( 255, 0, 255 ); + ircColors[13] = TQColor( 255, 0, 255 ); ircColors[14] = Qt::gray; ircColors[15] = Qt::lightGray; @@ -232,17 +232,17 @@ void KSOptions::load( int sections ) colourTheme = conf->readEntry("ColourTheme", colourTheme ); for ( int i = 0; i < 16; ++i ) { ircColors[i] = - conf->readColorEntry(QString::fromLatin1( "IRC-%1" ).arg( i ), + conf->readColorEntry(TQString::fromLatin1( "IRC-%1" ).arg( i ), &ircColors[i] ); nickHighlight[i] = - conf->readBoolEntry(QString::fromLatin1( "nickHighlight-%1" ).arg( i ), + conf->readBoolEntry(TQString::fromLatin1( "nickHighlight-%1" ).arg( i ), &nickHighlight[i] ); } } conf->setGroup( "GlobalOptions" ); - QFont df = kapp->font(0); + TQFont df = kapp->font(0); defaultFont = conf->readFontEntry( "MainFont", &df); - QApplication::setFont( defaultFont, true, "KSirc::TextView" ); + TQApplication::setFont( defaultFont, true, "KSirc::TextView" ); } if ( sections & Channels ) { @@ -254,7 +254,7 @@ void KSOptions::load( int sections ) if(channel.contains("global") == FALSE){ KSOChannel global; ChannelOpMap coMap; - channel.insert(QString("global"), coMap); + channel.insert(TQString("global"), coMap); channel["global"].insert("global", global); channel["global"]["global"].server = "global"; channel["global"]["global"].channel = "global"; @@ -268,16 +268,16 @@ void KSOptions::load( int sections ) channel["global"]["global"].encoding = conf->readEntry("globalglobalEncoding", "Default"); } - QDateTime now(QDateTime::currentDateTime()); - QStringList servers = conf->readListEntry("Servers"); - QStringList::ConstIterator ser = servers.begin(); + TQDateTime now(TQDateTime::currentDateTime()); + TQStringList servers = conf->readListEntry("Servers"); + TQStringList::ConstIterator ser = servers.begin(); for( ; ser != servers.end(); ser++){ ChannelOpMap coMap; channel.insert(*ser, coMap); - QStringList channels = conf->readListEntry(*ser); - QStringList::ConstIterator chan = channels.begin(); + TQStringList channels = conf->readListEntry(*ser); + TQStringList::ConstIterator chan = channels.begin(); for( ; chan != channels.end(); chan++){ - QDateTime lastUsed = conf->readDateTimeEntry(*ser + *chan + "lastUsed", &now); + TQDateTime lastUsed = conf->readDateTimeEntry(*ser + *chan + "lastUsed", &now); if((lastUsed.daysTo(now) < 30 )|| (*chan == "global" && *ser == "global")) { @@ -317,7 +317,7 @@ void KSOptions::load( int sections ) */ if(server.contains("global") == FALSE){ KSOServer global; - server.insert(QString("global"), global); + server.insert(TQString("global"), global); server["global"].server = "global"; server["global"].globalCopy = false; @@ -333,9 +333,9 @@ void KSOptions::load( int sections ) kdDebug(5008) << "Load: in Server" << endl; - QStringList servers = conf->readListEntry("Servers"); + TQStringList servers = conf->readListEntry("Servers"); - QStringList::ConstIterator ser = servers.begin(); + TQStringList::ConstIterator ser = servers.begin(); for( ; ser != servers.end(); ser++){ KSOServer ksos; ksos = server["global"]; @@ -422,8 +422,8 @@ void KSOptions::save( int sections ) conf->writeEntry( "nickColourization", nickColourization ); conf->writeEntry( "ColourTheme", colourTheme ); for ( int i = 0; i < 16; ++i ) { - conf->writeEntry( QString::fromLatin1( "IRC-%1" ).arg( i ), ircColors[i] ); - conf->writeEntry( QString::fromLatin1( "nickHighlight-%1" ).arg( i ), nickHighlight[i] ); + conf->writeEntry( TQString::fromLatin1( "IRC-%1" ).arg( i ), ircColors[i] ); + conf->writeEntry( TQString::fromLatin1( "nickHighlight-%1" ).arg( i ), nickHighlight[i] ); } /* Store the font setting */ conf->setGroup( "GlobalOptions" ); @@ -432,14 +432,14 @@ void KSOptions::save( int sections ) } if ( sections & Channels ) { - QStringList servers; + TQStringList servers; conf->deleteGroup( "Channel" ); conf->setGroup( "Channel" ); ServerChannelOpMap::Iterator ser; for( ser = channel.begin(); ser != channel.end(); ++ser ){ - QStringList channels; + TQStringList channels; servers << ser.key(); @@ -462,14 +462,14 @@ void KSOptions::save( int sections ) } if ( sections & Servers ) { - QStringList servers; + TQStringList servers; conf->deleteGroup( "Servers" ); conf->setGroup( "Server" ); ServerOpMap::Iterator ser; for( ser = server.begin(); ser != server.end(); ++ser ){ - QStringList channels; + TQStringList channels; if(ser.data().globalCopy == true) continue; @@ -488,7 +488,7 @@ void KSOptions::save( int sections ) conf->sync(); } -void KSOptions::channelSetup(QString serv, QString chan) +void KSOptions::channelSetup(TQString serv, TQString chan) { if(channel.contains(serv) == FALSE){ ChannelOpMap coMap; @@ -500,10 +500,10 @@ void KSOptions::channelSetup(QString serv, QString chan) channel[serv].insert(chan, ksoc); channel[serv][chan].server = serv; channel[serv][chan].channel = chan; - channel[serv][chan].lastUsed = QDateTime::currentDateTime(); + channel[serv][chan].lastUsed = TQDateTime::currentDateTime(); } else { - channel[serv][chan].lastUsed = QDateTime::currentDateTime(); + channel[serv][chan].lastUsed = TQDateTime::currentDateTime(); } } @@ -522,7 +522,7 @@ void KSOptions::applyChannelGlobal(void) } -void KSOptions::serverSetup(QString serv) +void KSOptions::serverSetup(TQString serv) { if(server.contains(serv) == FALSE){ KSOServer ksos; @@ -530,10 +530,10 @@ void KSOptions::serverSetup(QString serv) server.insert(serv, ksos); server[serv].server = serv; server[serv].globalCopy = true; - server[serv].lastUsed = QDateTime::currentDateTime(); + server[serv].lastUsed = TQDateTime::currentDateTime(); } else { - server[serv].lastUsed = QDateTime::currentDateTime(); + server[serv].lastUsed = TQDateTime::currentDateTime(); } } diff --git a/ksirc/ksopts.h b/ksirc/ksopts.h index 5739f6fd..9bd96192 100644 --- a/ksirc/ksopts.h +++ b/ksirc/ksopts.h @@ -1,15 +1,15 @@ #ifndef _KSOPTS_H_ #define _KSOPTS_H_ -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define IRC_SAFE_MAX_LINE 450 @@ -45,12 +45,12 @@ public: bool dockPopups : 1; bool autoSaveHistory : 1; int windowLength; - QString backgroundFile; + TQString backgroundFile; - QPixmap backgroundPixmap(); + TQPixmap backgroundPixmap(); private: - QPixmap m_backgroundPixmap; + TQPixmap m_backgroundPixmap; }; class KSOChannel @@ -58,8 +58,8 @@ class KSOChannel public: KSOChannel(); - QString server; - QString channel; + TQString server; + TQString channel; bool timeStamp : 1; bool beepNotify : 1; @@ -67,9 +67,9 @@ public: bool logging : 1; bool topicShow : 1; bool filterJoinPart : 1; - QString encoding; + TQString encoding; - QDateTime lastUsed; + TQDateTime lastUsed; static bool applyGlobally; @@ -82,16 +82,16 @@ class KSOServer public: KSOServer(); - QString server; + TQString server; bool globalCopy; - QString nick; - QString altNick; - QString realName; - QString userID; - QStringList notifyList; + TQString nick; + TQString altNick; + TQString realName; + TQString userID; + TQStringList notifyList; - QDateTime lastUsed; + TQDateTime lastUsed; }; class KSOStartup @@ -99,12 +99,12 @@ class KSOStartup public: KSOStartup(); - QRect geometry; -// QString nick; -// QString altNick; -// QString realName; -// QString userID; -// QStringList notifyList; + TQRect geometry; +// TQString nick; +// TQString altNick; +// TQString realName; +// TQString userID; +// TQStringList notifyList; }; class KSOColors @@ -114,36 +114,36 @@ public: KSOColors(); - QColor textColor; - QColor linkColor; - QColor infoColor; - QColor channelColor; - QColor errorColor; - QColor ownNickColor; + TQColor textColor; + TQColor linkColor; + TQColor infoColor; + TQColor channelColor; + TQColor errorColor; + TQColor ownNickColor; bool ownNickBold : 1; bool ownNickUl : 1; bool ownNickRev : 1; - QColor msgContainNick; // needs config + impl - QColor msg1Contain; // needs config - QString msg1String; // needs config + TQColor msgContainNick; // needs config + impl + TQColor msg1Contain; // needs config + TQString msg1String; // needs config bool msg1Regex; - QColor msg2Contain; // need config - QString msg2String; // needs config + TQColor msg2Contain; // need config + TQString msg2String; // needs config bool msg2Regex; - QColor nickForeground; - QColor nickBackground; - QColor backgroundColor; - QColor selBackgroundColor; - QColor selForegroundColor; - //QColor ircColors[numColors]; - BoundsCheckingArray ircColors; + TQColor nickForeground; + TQColor nickBackground; + TQColor backgroundColor; + TQColor selBackgroundColor; + TQColor selForegroundColor; + //TQColor ircColors[numColors]; + BoundsCheckingArray ircColors; BoundsCheckingArray nickHighlight; - QString colourTheme; + TQString colourTheme; - QFont defaultFont; + TQFont defaultFont; bool ksircColors : 1; bool mircColors : 1; bool nickColourization : 1; @@ -162,9 +162,9 @@ public: KSOServChan(); }; -typedef QMap ChannelOpMap; -typedef QMap ServerChannelOpMap; -typedef QMap ServerOpMap; +typedef TQMap ChannelOpMap; +typedef TQMap ServerChannelOpMap; +typedef TQMap ServerOpMap; class KSOptions : public KSOGeneral, @@ -194,10 +194,10 @@ public: return server[servInfo.server()]; } - void channelSetup(QString serv, QString chan); + void channelSetup(TQString serv, TQString chan); void applyChannelGlobal(void); - void serverSetup(QString server); + void serverSetup(TQString server); void serverSetup( const KSircServer &servInfo ) { serverSetup(servInfo.server()); diff --git a/ksirc/ksparser.cpp b/ksirc/ksparser.cpp index e0f2f5ee..a02bd3bd 100644 --- a/ksirc/ksparser.cpp +++ b/ksirc/ksparser.cpp @@ -18,33 +18,33 @@ // $Id$ -#include -#include -#include +#include +#include +#include #include #include "ksopts.h" #include "ksparser.h" -QString KSParser::parse( const QString &message ) +TQString KSParser::parse( const TQString &message ) { - QString res; + TQString res; m_tags.clear(); m_attributes.clear(); m_beeped = false; for (unsigned int i = 0; i < message.length();) { - QChar ch = message[i++]; + TQChar ch = message[i++]; if (ch.latin1() == 0x03 || ch == '~' && i < message.length()) { - QChar next = message[ i++ ]; + TQChar next = message[ i++ ]; if (next.latin1() >= 0x30 && next.latin1() <= 0x39) { int fg = -1, len; int bg = -1; - QRegExp colorRex("^[0-9]+"); + TQRegExp colorRex("^[0-9]+"); if (colorRex.search(message.mid(--i)) >= 0) { len = colorRex.matchedLength(); @@ -60,15 +60,15 @@ QString KSParser::parse( const QString &message ) i += len; } } - QString at; - QColor c = ircColor(fg); + TQString at; + TQColor c = ircColor(fg); if ( c.isValid() ) { - at += QString( "color=\"%1\" " ).arg( c.name() ); + at += TQString( "color=\"%1\" " ).arg( c.name() ); } c = ircColor(bg); if ( c.isValid() ) { - at += QString( "bgcolor=\"%1\" " ).arg( c.name() ); + at += TQString( "bgcolor=\"%1\" " ).arg( c.name() ); } if(at.length() > 0){ res += pushTag( "font", at ); @@ -108,13 +108,13 @@ QString KSParser::parse( const QString &message ) res += toggleTag( "u" ); break; case 'n': - res += toggleTag( "font", QString( "color=\"%1\"" ).arg( ksopts->nickForeground.name() ) ); + res += toggleTag( "font", TQString( "color=\"%1\"" ).arg( ksopts->nickForeground.name() ) ); break; case 'o': - res += pushTag( "font", QString( "color=\"%1\"" ).arg( ksopts->msgContainNick.name() ) ); + res += pushTag( "font", TQString( "color=\"%1\"" ).arg( ksopts->msgContainNick.name() ) ); break; case '#': - res += pushTag( "font", QString( "color=\"#%1\"" ).arg( message.mid(i, 6) )); + res += pushTag( "font", TQString( "color=\"#%1\"" ).arg( message.mid(i, 6) )); i+=6; break; case '~': @@ -137,9 +137,9 @@ QString KSParser::parse( const QString &message ) return res; } -QString KSParser::pushTag(const QString &tag, const QString &attributes) +TQString KSParser::pushTag(const TQString &tag, const TQString &attributes) { - QString res; + TQString res; m_tags.push(tag); if (!m_attributes.contains(tag)) m_attributes.insert(tag, attributes); @@ -151,13 +151,13 @@ QString KSParser::pushTag(const QString &tag, const QString &attributes) return res + ">"; } -QString KSParser::popTag(const QString &tag) +TQString KSParser::popTag(const TQString &tag) { if (!m_tags.contains(tag)) - return QString::null; + return TQString::null; - QString res; - QValueStack savedTags; + TQString res; + TQValueStack savedTags; while (m_tags.top() != tag) { savedTags.push(m_tags.pop()); @@ -170,23 +170,23 @@ QString KSParser::popTag(const QString &tag) return res; } -QString KSParser::toggleTag(const QString &tag, const QString &attributes) +TQString KSParser::toggleTag(const TQString &tag, const TQString &attributes) { return m_attributes.contains(tag) ? popTag(tag) : pushTag(tag, attributes); } -QString KSParser::popAll() +TQString KSParser::popAll() { - QString res; + TQString res; while (!m_tags.isEmpty()) res.append(""); m_attributes.clear(); return res; } -QColor KSParser::ircColor(int code) +TQColor KSParser::ircColor(int code) { if (code >= 0 && code < 16) return ksopts->ircColors[code]; - return QColor(); + return TQColor(); } diff --git a/ksirc/ksparser.h b/ksirc/ksparser.h index e7d2647f..b6e95a5c 100644 --- a/ksirc/ksparser.h +++ b/ksirc/ksparser.h @@ -7,10 +7,10 @@ #ifndef __ksparser_h__ #define __ksparser_h__ -#include -#include -#include -#include +#include +#include +#include +#include // Helper class to parse IRC colour/style codes and convert them to // richtext. The parser maintains an internal stack of the styles @@ -22,19 +22,19 @@ class KSParser { public: - QString parse(const QString &); + TQString parse(const TQString &); bool beeped() const { return m_beeped; } private: - QString pushTag(const QString &, const QString & = QString::null); - QString popTag(const QString &); - QString toggleTag(const QString &, const QString & = QString::null); - QString popAll(); - QColor ircColor(int); + TQString pushTag(const TQString &, const TQString & = TQString::null); + TQString popTag(const TQString &); + TQString toggleTag(const TQString &, const TQString & = TQString::null); + TQString popAll(); + TQColor ircColor(int); private: - QValueStack m_tags; - QMap m_attributes; + TQValueStack m_tags; + TQMap m_attributes; bool m_beeped; }; diff --git a/ksirc/kstextview.cpp b/ksirc/kstextview.cpp index deb7d6c4..2589e59a 100644 --- a/ksirc/kstextview.cpp +++ b/ksirc/kstextview.cpp @@ -20,12 +20,12 @@ #include "kstextview.h" #include "stringparserstate.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -36,37 +36,37 @@ using namespace KSirc; -typedef StringParserState ParsingState; +typedef StringParserState ParsingState; static const int PaintBufferExtend = 128; // temporary(!) -static QDict *ksTextViewPixmapDict = 0; +static TQDict *ksTextViewPixmapDict = 0; static void cleanupKSTextViewPixmapDict() { delete ksTextViewPixmapDict; ksTextViewPixmapDict = 0; } -QPixmap ksTextViewLoadPixmap( const QString &icon ) +TQPixmap ksTextViewLoadPixmap( const TQString &icon ) { if ( !ksTextViewPixmapDict ) { - ksTextViewPixmapDict = new QDict; + ksTextViewPixmapDict = new TQDict; ksTextViewPixmapDict->setAutoDelete( true ); qAddPostRoutine( cleanupKSTextViewPixmapDict ); } - QPixmap *pix = ksTextViewPixmapDict->find( icon ); + TQPixmap *pix = ksTextViewPixmapDict->find( icon ); if ( !pix ) { - QImage img; + TQImage img; - const QMimeSource *src = kapp->mimeSourceFactory()->data( icon, QString::null ); - if ( !src || !QImageDrag::decode( src, img ) || img.isNull() ) - return QPixmap(); + const TQMimeSource *src = kapp->mimeSourceFactory()->data( icon, TQString::null ); + if ( !src || !TQImageDrag::decode( src, img ) || img.isNull() ) + return TQPixmap(); - pix = new QPixmap( img ); + pix = new TQPixmap( img ); ksTextViewPixmapDict->insert( icon, pix ); } return *pix; @@ -153,11 +153,11 @@ Item *Item::create( TextParag *parag, const Token &tok, const ItemProperties &pr if ( tok.value == "img" ) { - QString url = CONSTSTRING( tok.attributes[ "src" ] ); + TQString url = CONSTSTRING( tok.attributes[ "src" ] ); if ( url.isEmpty() ) return 0; - QPixmap pixmap = ksTextViewLoadPixmap( url ); + TQPixmap pixmap = ksTextViewLoadPixmap( url ); if ( pixmap.isNull() ) return 0; @@ -178,7 +178,7 @@ TextChunk::TextChunk( TextParag *parag, const StringPtr &text, const ItemPropert { } -void TextChunk::paint( QPainter &p ) +void TextChunk::paint( TQPainter &p ) { p.setFont( m_props.font ); @@ -276,8 +276,8 @@ int TextChunk::calcSelectionOffset( int x ) { // ### how to optimize? - QConstString tmp( m_text.ptr, m_text.len ); - const QString &s = tmp.string(); + TQConstString tmp( m_text.ptr, m_text.len ); + const TQString &s = tmp.string(); uint i = 0; int px = 0; @@ -302,13 +302,13 @@ StringPtr TextChunk::text() const void TextChunk::setProps( const ItemProperties &props ) { Item::setProps( props ); - m_metrics = QFontMetrics( props.font ); + m_metrics = TQFontMetrics( props.font ); } void TextChunk::calcExtends() const { - QConstString tmp( m_text.ptr, m_text.len ); - const QString &text = tmp.string(); + TQConstString tmp( m_text.ptr, m_text.len ); + const TQString &text = tmp.string(); m_width = m_metrics.width( text ); m_height = m_metrics.lineSpacing(); @@ -334,8 +334,8 @@ void TextChunk::calcExtends() const StringPtr TextChunk::breakInTheMiddle( int width ) { - QConstString tmp( m_text.ptr, m_text.len ); - const QString &s = tmp.string(); + TQConstString tmp( m_text.ptr, m_text.len ); + const TQString &s = tmp.string(); uint i = 0; for (; i < m_text.len; ++i ) @@ -396,7 +396,7 @@ Item *TextChunk::hardBreak( const StringPtr &rightHandSide ) return chunk; } -void TextChunk::paintSelection( QPainter &p ) +void TextChunk::paintSelection( TQPainter &p ) { int selectionStart = 0; int selectionEnd = 0; @@ -426,14 +426,14 @@ void TextChunk::paintSelection( QPainter &p ) } } -int TextChunk::paintSelection( QPainter &p, int x, const StringPtr &text ) +int TextChunk::paintSelection( TQPainter &p, int x, const StringPtr &text ) { - QConstString constString( text.ptr, text.len ); - const QString &str = constString.string(); + TQConstString constString( text.ptr, text.len ); + const TQString &str = constString.string(); const int width = m_metrics.width( str ); - const QColorGroup &cg = m_parag->textView()->colorGroup(); + const TQColorGroup &cg = m_parag->textView()->colorGroup(); if (m_props.bgSelColor.isValid()) p.fillRect( x, 0, width, height(), m_props.bgSelColor ); @@ -450,10 +450,10 @@ int TextChunk::paintSelection( QPainter &p, int x, const StringPtr &text ) return width; } -int TextChunk::paintText( QPainter &p, int x, const StringPtr &text ) +int TextChunk::paintText( TQPainter &p, int x, const StringPtr &text ) { - QConstString constString( text.ptr, text.len ); - const QString &str = constString.string(); + TQConstString constString( text.ptr, text.len ); + const TQString &str = constString.string(); const int width = m_metrics.width( str ); @@ -489,12 +489,12 @@ void TextChunk::mergeSelection( TextChunk *child, SelectionPoint *selection ) m_selection = child->selectionStatus(); } -ImageItem::ImageItem( TextParag *parag, const QPixmap &pixmap ) +ImageItem::ImageItem( TextParag *parag, const TQPixmap &pixmap ) : Item( parag ), m_pixmap( pixmap ) { } -void ImageItem::paint( QPainter &painter ) +void ImageItem::paint( TQPainter &painter ) { int y = 0; if(m_line) { @@ -512,7 +512,7 @@ void ImageItem::paint( QPainter &painter ) if (m_props.bgSelColor.isValid()) painter.fillRect( 0, 0, width(), h, m_props.bgSelColor ); else { - const QColorGroup &cg = m_parag->textView()->colorGroup(); + const TQColorGroup &cg = m_parag->textView()->colorGroup(); painter.fillRect( 0, 0, width(), h, cg.highlight() ); } } @@ -549,7 +549,7 @@ Tokenizer::Tokenizer( PString &text ) } } -Tokenizer::PString Tokenizer::preprocess( const QString &richText ) +Tokenizer::PString Tokenizer::preprocess( const TQString &richText ) { PString result; result.data = richText; @@ -558,12 +558,12 @@ Tokenizer::PString Tokenizer::preprocess( const QString &richText ) return result; } -QString Tokenizer::convertToRichText( const PString &ptext ) +TQString Tokenizer::convertToRichText( const PString &ptext ) { if ( ptext.tags.isEmpty() ) return ptext.data; - QString result = ptext.data; + TQString result = ptext.data; uint i = 0; TagIndexList tags = ptext.tags; TagIndexList::Iterator it = tags.begin(); @@ -578,13 +578,13 @@ QString Tokenizer::convertToRichText( const PString &ptext ) } unsigned short indexAdjustment = 0; - const QChar ch = result[ i ]; + const TQChar ch = result[ i ]; // ### incomplete! /* this doesn't work quite right (when resolving back * KCharSet's fromEntity breaks) if ( ch == '<' || ch == '>' || ch == '&' ) { - QString entity = KGlobal::charsets()->toEntity( ch ); + TQString entity = KGlobal::charsets()->toEntity( ch ); indexAdjustment = entity.length() - 1; result.replace( i, 1, entity ); } @@ -676,7 +676,7 @@ bool Tokenizer::parseNextToken( Token &tok ) if ( lastType == TagIndex::Open && type == TagIndex::Close ) { - const QChar *tagStart = m_text.unicode() + lastIndex + 1; + const TQChar *tagStart = m_text.unicode() + lastIndex + 1; uint tagLen = ( index - 1 ) - ( lastIndex + 1 ) + 1; // ? if ( *tagStart == '/' ) @@ -713,11 +713,11 @@ bool Tokenizer::parseNextToken( Token &tok ) return false; } -Tokenizer::TagIndexList Tokenizer::scanTagIndices( const QString &text ) +Tokenizer::TagIndexList Tokenizer::scanTagIndices( const TQString &text ) { - const QChar *start = text.unicode(); - const QChar *p = start; - const QChar *endP = p + text.length(); + const TQChar *start = text.unicode(); + const TQChar *p = start; + const TQChar *endP = p + text.length(); bool quoted = false; bool inTag = false; @@ -725,7 +725,7 @@ Tokenizer::TagIndexList Tokenizer::scanTagIndices( const QString &text ) for (; p < endP; ++p ) { - const QChar ch = *p; + const TQChar ch = *p; if ( ch == '"' && inTag ) { quoted = quoted ? false : true; @@ -752,13 +752,13 @@ Tokenizer::TagIndexList Tokenizer::scanTagIndices( const QString &text ) return tags; } -void Tokenizer::resolveEntities( QString &text, TagIndexList &tags ) +void Tokenizer::resolveEntities( TQString &text, TagIndexList &tags ) { - const QChar *p = text.unicode(); - const QChar *endP = p + text.length(); + const TQChar *p = text.unicode(); + const TQChar *endP = p + text.length(); uint i = 0; bool scanForSemicolon = false; - const QChar *ampersand = 0; + const TQChar *ampersand = 0; TagIndexList::Iterator tagInfoIt = tags.begin(); TagIndexList::Iterator tagsEnd = tags.end(); @@ -768,7 +768,7 @@ void Tokenizer::resolveEntities( QString &text, TagIndexList &tags ) i > (*tagInfoIt).index ) ++tagInfoIt; - const QChar ch = *p; + const TQChar ch = *p; if ( ch == '&' ) { ampersand = p; @@ -783,13 +783,13 @@ void Tokenizer::resolveEntities( QString &text, TagIndexList &tags ) scanForSemicolon = false; - const QChar *entityBegin = ampersand + 1; + const TQChar *entityBegin = ampersand + 1; const uint entityLength = p - entityBegin; if ( entityLength == 0 ) continue; - const QChar entityValue = KCharsets::fromEntity( QConstString( entityBegin, entityLength ).string() ); + const TQChar entityValue = KCharsets::fromEntity( TQConstString( entityBegin, entityLength ).string() ); if ( entityValue.isNull() ) continue; @@ -818,9 +818,9 @@ void Tokenizer::parseTag( const StringPtr &text, attributes.clear(); tag = StringPtr(); - const QChar *p = text.ptr; - const QChar *endP = p + text.len; - const QChar *start = p; + const TQChar *p = text.ptr; + const TQChar *endP = p + text.len; + const TQChar *start = p; int state = ScanForName; @@ -828,7 +828,7 @@ void Tokenizer::parseTag( const StringPtr &text, while ( p < endP ) { - const QChar ch = *p; + const TQChar ch = *p; if ( ch == ' ' ) { @@ -889,7 +889,7 @@ void Tokenizer::parseTag( const StringPtr &text, continue; } - const QChar *valueEnd = p; + const TQChar *valueEnd = p; StringPtr value = StringPtr( start, valueEnd - start ); attributes[ key ] = value; @@ -934,7 +934,7 @@ ItemProperties::ItemProperties() { } -ItemProperties::ItemProperties( const QFont &defaultFont ) +ItemProperties::ItemProperties( const TQFont &defaultFont ) : font( defaultFont ), reversed( false ) { } @@ -975,7 +975,7 @@ ItemProperties::ItemProperties( const ItemProperties &other, StringPtr colAttr = attributes[ "color" ]; if ( !colAttr.isNull() ) { - QColor col( CONSTSTRING( colAttr ) ); + TQColor col( CONSTSTRING( colAttr ) ); if ( col.isValid() ){ if(!reversed) color = col; @@ -986,7 +986,7 @@ ItemProperties::ItemProperties( const ItemProperties &other, colAttr = attributes[ "bgcolor" ]; if ( !colAttr.isNull() ) { - QColor col( CONSTSTRING( colAttr ) ); + TQColor col( CONSTSTRING( colAttr ) ); if ( col.isValid() ) { if(!reversed) bgColor = col; @@ -1019,9 +1019,9 @@ ItemProperties &ItemProperties::operator=( const ItemProperties &rhs ) return *this; } -void ItemProperties::updateFont( const QFont &newFont ) +void ItemProperties::updateFont( const TQFont &newFont ) { - QFont f = newFont; + TQFont f = newFont; f.setUnderline( font.underline() ); f.setBold( font.bold() ); f.setItalic( font.italic() ); @@ -1034,25 +1034,25 @@ TextLine::TextLine() m_items.setAutoDelete( true ); } -TextLine::TextLine( const QPtrList &items ) +TextLine::TextLine( const TQPtrList &items ) : m_maxHeight( 0 ) { m_items.setAutoDelete( true ); assert( !items.autoDelete() ); - QPtrListIterator it( items ); + TQPtrListIterator it( items ); for (; it.current(); ++it ) appendItem( it.current(), UpdateMaxHeight ); } -QString TextLine::updateSelection( const SelectionPoint &start, const SelectionPoint &end ) +TQString TextLine::updateSelection( const SelectionPoint &start, const SelectionPoint &end ) { - QString selectedText; + TQString selectedText; // fixes a crash where because of an empty list i becomes null if ( m_items.isEmpty() ) - return QString::null; + return TQString::null; if ( start.line == this ) { @@ -1085,7 +1085,7 @@ QString TextLine::updateSelection( const SelectionPoint &start, const SelectionP StringPtr txt = i->text(); if ( !txt.isNull() ) - selectedText += QString( txt.ptr + start.offset, + selectedText += TQString( txt.ptr + start.offset, txt.len - start.offset ); } else if ( i == end.item ) @@ -1094,7 +1094,7 @@ QString TextLine::updateSelection( const SelectionPoint &start, const SelectionP StringPtr txt = i->text(); if ( !txt.isNull() ) - selectedText += QString( txt.ptr, end.offset + 1 ); + selectedText += TQString( txt.ptr, end.offset + 1 ); } else { @@ -1123,13 +1123,13 @@ void TextLine::appendItem( Item *i, int layoutUpdatePolicy ) m_maxHeight = kMax( m_maxHeight, i->height() ); } -Item *TextLine::resetLayout( QPtrList &remainingItems) +Item *TextLine::resetLayout( TQPtrList &remainingItems) { Item *lastLineItem = m_items.getLast(); Item *it = m_items.first(); // We have to use the tobeDel structure or we call resetLayout on the Item // twice for each item we want to delete - QPtrList tobeDel; + TQPtrList tobeDel; while ( it ) { if ( it->resetLayout() == Item::KeepItem ) @@ -1143,9 +1143,9 @@ Item *TextLine::resetLayout( QPtrList &remainingItems) return lastLineItem; } -void TextLine::paint( QPainter &p, int y ) +void TextLine::paint( TQPainter &p, int y ) { - QPtrListIterator it( m_items ); + TQPtrListIterator it( m_items ); int x = 0; for (; it.current(); ++it ) { @@ -1159,7 +1159,7 @@ void TextLine::paint( QPainter &p, int y ) Item *TextLine::itemAt( int px, SelectionPoint *selectionInfo, Item::SelectionAccuracy accuracy ) { - QPtrListIterator it( m_items ); + TQPtrListIterator it( m_items ); int x = 0; int width = 0; for (; it.current(); ++it ) @@ -1193,18 +1193,18 @@ Item *TextLine::itemAt( int px, SelectionPoint *selectionInfo, return 0; } -QString TextLine::plainText() const +TQString TextLine::plainText() const { - QString res; - QPtrListIterator it( m_items ); + TQString res; + TQPtrListIterator it( m_items ); for (; it.current(); ++it ) res += it.current()->text().toQString(); return res; } -void TextLine::fontChange( const QFont &newFont ) +void TextLine::fontChange( const TQFont &newFont ) { - QPtrListIterator it( m_items ); + TQPtrListIterator it( m_items ); for (; it.current(); ++it ) { ItemProperties props = it.current()->props(); @@ -1213,7 +1213,7 @@ void TextLine::fontChange( const QFont &newFont ) } } -TextParag::TextParag( TextView *textView, const QString &richText ) +TextParag::TextParag( TextView *textView, const TQString &richText ) : m_layouted( false ), m_height( 0 ), m_minWidth( 0 ), m_textView( textView ) { @@ -1227,7 +1227,7 @@ TextParag::~TextParag() void TextParag::layout( int width ) { - QPtrList items; + TQPtrList items; TextLine *row = m_lines.first(); @@ -1249,7 +1249,7 @@ void TextParag::layout( int width ) SelectionPoint *selEnd = m_textView->selectionEnd(); assert( selStart && selEnd ); - QPtrListIterator it( items ); + TQPtrListIterator it( items ); while ( it.current() ) { m_minWidth = kMax( m_minWidth, it.current()->minWidth() ); @@ -1313,7 +1313,7 @@ void TextParag::layout( int width ) selEnd->parag == this ) { // ### move to TextLine? - QPtrListIterator it( line->iterator() ); + TQPtrListIterator it( line->iterator() ); for (; it.current(); ++it ) { if ( selStart->item == it.current() ) @@ -1327,7 +1327,7 @@ void TextParag::layout( int width ) m_layouted = true; } -void TextParag::paint( QPainter &p, int y, int maxY ) +void TextParag::paint( TQPainter &p, int y, int maxY ) { TextLine *row = m_lines.first(); for (; row; row = m_lines.next() ) @@ -1374,9 +1374,9 @@ Item *TextParag::itemAt( int px, int py, SelectionPoint *selectionInfo, return 0; } -QString TextParag::updateSelection( const SelectionPoint &start, const SelectionPoint &end ) +TQString TextParag::updateSelection( const SelectionPoint &start, const SelectionPoint &end ) { - QString selectedText; + TQString selectedText; // sanity check // (don't put it lower because it changes the current list item) @@ -1415,7 +1415,7 @@ void TextParag::clearSelection() line->clearSelection(); } -void TextParag::setRichText( const QString &richText ) +void TextParag::setRichText( const TQString &richText ) { m_layouted = false; m_height = 0; @@ -1434,7 +1434,7 @@ void TextParag::setRichText( const QString &richText ) Token tok; Token lastTextToken; - QValueStack tagStack; + TQValueStack tagStack; TextLine *line = new TextLine; @@ -1500,25 +1500,25 @@ void TextParag::setRichText( const QString &richText ) m_lines.append( line ); } -QString TextParag::plainText() const +TQString TextParag::plainText() const { - QString result; - QPtrListIterator it( m_lines ); + TQString result; + TQPtrListIterator it( m_lines ); for (; it.current(); ++it ) result += it.current()->plainText(); return result; } -void TextParag::fontChange( const QFont &newFont ) +void TextParag::fontChange( const TQFont &newFont ) { - QPtrListIterator it( m_lines ); + TQPtrListIterator it( m_lines ); for (; it.current(); ++it ) it.current()->fontChange( newFont ); } -ContentsPaintAlgorithm::ContentsPaintAlgorithm( const QPtrListIterator ¶gIt, - QWidget *viewport, QPixmap &paintBuffer, - QPainter &painter, int clipX, int clipY, +ContentsPaintAlgorithm::ContentsPaintAlgorithm( const TQPtrListIterator ¶gIt, + TQWidget *viewport, TQPixmap &paintBuffer, + TQPainter &painter, int clipX, int clipY, int clipHeight ) : m_paragIt( paragIt ), m_viewport( viewport ), m_paintBuffer( paintBuffer ), m_painter( painter ), m_clipX( clipX ), m_clipY( clipY ), m_clipHeight( clipHeight ), @@ -1539,7 +1539,7 @@ int ContentsPaintAlgorithm::goToFirstVisibleParagraph() return y; } -int ContentsPaintAlgorithm::paint( QPainter &bufferedPainter, int currentY ) +int ContentsPaintAlgorithm::paint( TQPainter &bufferedPainter, int currentY ) { const int startY = currentY; @@ -1600,7 +1600,7 @@ void ContentsPaintAlgorithm::paint() while ( y < yEnd ) { m_paintBuffer.fill( m_viewport, 0, y ); - QPainter bufferedPainter( &m_paintBuffer ); + TQPainter bufferedPainter( &m_paintBuffer ); bufferedPainter.translate( -m_clipX, -y ); int nextY = paint( bufferedPainter, y ); @@ -1613,8 +1613,8 @@ void ContentsPaintAlgorithm::paint() } } -TextView::TextView( QWidget *parent, const char *name ) - : QScrollView( parent, name, WRepaintNoErase ), +TextView::TextView( TQWidget *parent, const char *name ) + : TQScrollView( parent, name, WRepaintNoErase ), m_paintBuffer( PaintBufferExtend, PaintBufferExtend ), m_selectionEndBeforeStart( false ), m_mousePressed( false ), m_mmbPressed( false ), @@ -1624,9 +1624,9 @@ TextView::TextView( QWidget *parent, const char *name ) m_parags.setAutoDelete( true ); viewport()->setBackgroundMode( PaletteBase ); viewport()->setMouseTracking( true ); - m_autoScrollTimer = new QTimer( this ); - connect(verticalScrollBar(), SIGNAL(valueChanged( int ) ), - this, SLOT(scrolling( int ))); + m_autoScrollTimer = new TQTimer( this ); + connect(verticalScrollBar(), TQT_SIGNAL(valueChanged( int ) ), + this, TQT_SLOT(scrolling( int ))); setDragAutoScroll( false ); @@ -1637,7 +1637,7 @@ TextView::~TextView() { } -void TextView::drawContents( QPainter *painter, int clipX, int clipY, int , int clipHeight ) +void TextView::drawContents( TQPainter *painter, int clipX, int clipY, int , int clipHeight ) { if ( m_parags.isEmpty() ) return; @@ -1645,7 +1645,7 @@ void TextView::drawContents( QPainter *painter, int clipX, int clipY, int , int if ( m_paintBuffer.width() != visibleWidth() ) m_paintBuffer.resize( visibleWidth(), PaintBufferExtend ); - QPtrListIterator paragIt( m_parags ); + TQPtrListIterator paragIt( m_parags ); ContentsPaintAlgorithm( paragIt, viewport(), m_paintBuffer, *painter, clipX, clipY, @@ -1653,9 +1653,9 @@ void TextView::drawContents( QPainter *painter, int clipX, int clipY, int , int .paint(); } -void TextView::viewportResizeEvent( QResizeEvent *ev ) +void TextView::viewportResizeEvent( TQResizeEvent *ev ) { - QScrollView::viewportResizeEvent(ev); + TQScrollView::viewportResizeEvent(ev); if ( ev->size().width() != ev->oldSize().width() ) layout(); @@ -1724,13 +1724,13 @@ void TextView::clear() viewport()->erase(); } -TextParagIterator TextView::appendParag( const QString &richText ) +TextParagIterator TextView::appendParag( const TQString &richText ) { TextParag *parag = new TextParag( this, richText ); m_parags.append( parag ); layout( false ); scrollToBottom(); - QPtrListIterator it( m_parags ); + TQPtrListIterator it( m_parags ); it.toLast(); return TextParagIterator( it ); } @@ -1773,7 +1773,7 @@ void TextView::clearSelection( bool repaint ) m_selectionStart = SelectionPoint(); m_selectionEnd = SelectionPoint(); m_selectionEndBeforeStart = false; - m_selectedText = QString::null; + m_selectedText = TQString::null; clearSelectionInternal(); if ( repaint ) updateContents(); @@ -1781,16 +1781,16 @@ void TextView::clearSelection( bool repaint ) TextParagIterator TextView::firstParag() const { - return TextParagIterator( QPtrListIterator( m_parags ) ); + return TextParagIterator( TQPtrListIterator( m_parags ) ); } -QString TextView::plainText() const +TQString TextView::plainText() const { if ( m_parags.isEmpty() ) - return QString::null; + return TQString::null; - QString result; - QPtrListIterator paragIt( m_parags ); + TQString result; + TQPtrListIterator paragIt( m_parags ); while ( paragIt.current() ) { result += paragIt.current()->plainText(); @@ -1802,19 +1802,19 @@ QString TextView::plainText() const return result; } -QColor TextView::linkColor() const +TQColor TextView::linkColor() const { return m_linkColor; } -void TextView::setLinkColor( const QColor &linkColor ) +void TextView::setLinkColor( const TQColor &linkColor ) { m_linkColor = linkColor; } void TextView::copy() { - QApplication::clipboard()->setText( m_selectedText ); + TQApplication::clipboard()->setText( m_selectedText ); } void TextView::clearSelectionInternal() @@ -1825,7 +1825,7 @@ void TextView::clearSelectionInternal() p->clearSelection(); } -void TextView::contentsMousePressEvent( QMouseEvent *ev ) +void TextView::contentsMousePressEvent( TQMouseEvent *ev ) { if ( ev->button() & RightButton ) { emitLinkClickedForMouseEvent( ev ); @@ -1855,7 +1855,7 @@ void TextView::contentsMousePressEvent( QMouseEvent *ev ) } } -void TextView::contentsMouseMoveEvent( QMouseEvent *ev ) +void TextView::contentsMouseMoveEvent( TQMouseEvent *ev ) { if ( m_mousePressed && ev->state() == NoButton ) { @@ -1864,14 +1864,14 @@ void TextView::contentsMouseMoveEvent( QMouseEvent *ev ) } if ( m_mousePressed && !m_dragURL.isEmpty() && - ( m_dragStartPos - ev->pos() ).manhattanLength() > QApplication::startDragDistance() ) { + ( m_dragStartPos - ev->pos() ).manhattanLength() > TQApplication::startDragDistance() ) { m_mousePressed = false; - m_dragStartPos = QPoint(); + m_dragStartPos = TQPoint(); startDrag(); - m_dragURL = QString::null; + m_dragURL = TQString::null; return; } @@ -1934,26 +1934,26 @@ void TextView::contentsMouseMoveEvent( QMouseEvent *ev ) } } - QCursor c = KCursor::arrowCursor(); + TQCursor c = KCursor::arrowCursor(); if ( viewport()->cursor().handle() != c.handle() ) viewport()->setCursor( c ); } -void TextView::contentsMouseReleaseEvent( QMouseEvent *ev ) +void TextView::contentsMouseReleaseEvent( TQMouseEvent *ev ) { stopAutoScroll(); bool clicked = (m_mousePressed || m_mmbPressed) && - (m_dragStartPos - ev->pos()).manhattanLength() < QApplication::startDragDistance(); + (m_dragStartPos - ev->pos()).manhattanLength() < TQApplication::startDragDistance(); m_mousePressed = false; m_mmbPressed = false; - m_dragStartPos = QPoint(); - m_dragURL = QString::null; + m_dragStartPos = TQPoint(); + m_dragURL = TQString::null; m_selectionMaybeStart = SelectionPoint(); if ( (ev->button() & Qt::LeftButton) && !m_selectedText.isEmpty() ) - QApplication::clipboard()->setText( m_selectedText, QClipboard::Selection ); + TQApplication::clipboard()->setText( m_selectedText, QClipboard::Selection ); if ( clicked ) { emitLinkClickedForMouseEvent( ev ); @@ -1967,9 +1967,9 @@ void TextView::contentsMouseReleaseEvent( QMouseEvent *ev ) } } -void TextView::fontChange( const QFont & ) +void TextView::fontChange( const TQFont & ) { - QPtrListIterator it( m_parags ); + TQPtrListIterator it( m_parags ); for (; it.current(); ++it ) it.current()->fontChange( font() ); @@ -1978,7 +1978,7 @@ void TextView::fontChange( const QFont & ) void TextView::startDrag() { - QDragObject *dragObj = dragObject( m_dragURL ); + TQDragObject *dragObj = dragObject( m_dragURL ); if ( !dragObj ) return; @@ -1987,7 +1987,7 @@ void TextView::startDrag() dragObj->drag(); } -QDragObject *TextView::dragObject( const QString &dragURL ) +TQDragObject *TextView::dragObject( const TQString &dragURL ) { #if KDE_IS_VERSION(3,1,92) return new KURLDrag( KURL( dragURL ), viewport() ); @@ -1998,9 +1998,9 @@ QDragObject *TextView::dragObject( const QString &dragURL ) void TextView::autoScroll() { - QPoint cursor = viewport()->mapFromGlobal( QCursor::pos() ); + TQPoint cursor = viewport()->mapFromGlobal( TQCursor::pos() ); - QPoint contentsPos = viewportToContents( cursor ); + TQPoint contentsPos = viewportToContents( cursor ); cursor.rx() -= viewport()->x(); cursor.ry() -= viewport()->y(); @@ -2012,7 +2012,7 @@ void TextView::autoScroll() } } -void TextView::emitLinkClickedForMouseEvent( QMouseEvent *ev ) +void TextView::emitLinkClickedForMouseEvent( TQMouseEvent *ev ) { TextChunk *text = dynamic_cast( itemAt( ev->pos() ) ); if ( !text ) @@ -2028,16 +2028,16 @@ void TextView::emitLinkClickedForMouseEvent( QMouseEvent *ev ) void TextView::startAutoScroll() { if(m_autoScrollTimer->isActive() == false){ - connect( m_autoScrollTimer, SIGNAL( timeout() ), - this, SLOT( autoScroll() ) ); + connect( m_autoScrollTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( autoScroll() ) ); m_autoScrollTimer->start( 75, false ); } } void TextView::stopAutoScroll() { - disconnect( m_autoScrollTimer, SIGNAL( timeout() ), - this, SLOT( autoScroll() ) ); + disconnect( m_autoScrollTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( autoScroll() ) ); m_autoScrollTimer->stop(); } @@ -2090,9 +2090,9 @@ SelectionPoint *TextView::selectionEnd() return m_selectionEndBeforeStart ? &m_selectionStart : &m_selectionEnd; } -QString TextView::updateSelection( const SelectionPoint &start, const SelectionPoint &end ) +TQString TextView::updateSelection( const SelectionPoint &start, const SelectionPoint &end ) { - QString selectedText; + TQString selectedText; if ( start.item == end.item ) { @@ -2104,7 +2104,7 @@ QString TextView::updateSelection( const SelectionPoint &start, const SelectionP if ( start.pos.x() == end.pos.x() ) { i->setSelectionStatus( Item::NoSelection ); - return QString::null; + return TQString::null; } i->setSelectionStatus( Item::SelectionBoth ); @@ -2114,7 +2114,7 @@ QString TextView::updateSelection( const SelectionPoint &start, const SelectionP if ( t ) { StringPtr text = t->text(); - selectedText = QString( text.ptr + start.offset, 1 ); + selectedText = TQString( text.ptr + start.offset, 1 ); } } else @@ -2127,10 +2127,10 @@ QString TextView::updateSelection( const SelectionPoint &start, const SelectionP { StringPtr text = t->text(); if (end.offset > start.offset) - selectedText = QString( text.ptr + start.offset, + selectedText = TQString( text.ptr + start.offset, end.offset - start.offset + 1 ); else - selectedText = QString( text.ptr + end.offset, + selectedText = TQString( text.ptr + end.offset, start.offset - end.offset + 1 ); } @@ -2162,7 +2162,7 @@ void TextView::layout( bool force ) int contentsWidth = visibleWidth(); int width = contentsWidth; - QPtrListIterator it( m_parags ); + TQPtrListIterator it( m_parags ); for (; it.current(); ++it ) { if ( !it.current()->isLayouted() || force ) @@ -2195,7 +2195,7 @@ void TextView::contentsChange(int heightChange, bool force) } -Item *TextView::itemAt( const QPoint &pos, SelectionPoint *selectionInfo, +Item *TextView::itemAt( const TQPoint &pos, SelectionPoint *selectionInfo, Item::SelectionAccuracy accuracy ) { int px = pos.x(); @@ -2203,7 +2203,7 @@ Item *TextView::itemAt( const QPoint &pos, SelectionPoint *selectionInfo, int y = 0; int height = 0; - QPtrListIterator it( m_parags ); + TQPtrListIterator it( m_parags ); for (; it.current(); ++it ) { height = it.current()->height(); @@ -2232,15 +2232,15 @@ Item *TextView::itemAt( const QPoint &pos, SelectionPoint *selectionInfo, return 0; } -QString TextParagIterator::richText() const +TQString TextParagIterator::richText() const { if ( atEnd() ) - return QString::null; + return TQString::null; return Tokenizer::convertToRichText( m_paragIt.current()->processedRichText() ); } -void TextParagIterator::setRichText( const QString &richText ) +void TextParagIterator::setRichText( const TQString &richText ) { if ( atEnd() ) return; @@ -2254,10 +2254,10 @@ void TextParagIterator::setRichText( const QString &richText ) textView->updateContents(); } -QString TextParagIterator::plainText() const +TQString TextParagIterator::plainText() const { if ( atEnd() ) - return QString::null; + return TQString::null; return m_paragIt.current()->plainText(); } diff --git a/ksirc/kstextview.h b/ksirc/kstextview.h index 27a63eb5..4f9d59f4 100644 --- a/ksirc/kstextview.h +++ b/ksirc/kstextview.h @@ -19,12 +19,12 @@ #ifndef __kstextview_h__ #define __kstextview_h__ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include class QTimer; class QDragObject; @@ -37,22 +37,22 @@ class TextView; struct StringPtr { StringPtr() : ptr( 0 ), len( 0 ) {} - StringPtr( const QChar *_ptr, uint _len ) + StringPtr( const TQChar *_ptr, uint _len ) : ptr( _ptr ), len( _len ) {} - explicit StringPtr( const QString &s ) // use with care! + explicit StringPtr( const TQString &s ) // use with care! : ptr( s.unicode() ), len( s.length() ) {} inline bool isNull() const { return ptr == 0; } // makes deep copy - inline QString toQString() const - { return ( ptr && len > 0 ) ? QString( ptr, len ) : QString::null; } + inline TQString toQString() const + { return ( ptr && len > 0 ) ? TQString( ptr, len ) : TQString::null; } - const QChar *ptr; + const TQChar *ptr; uint len; }; -#define CONSTSTRING( substr ) QConstString( substr.ptr, substr.len ).string() +#define CONSTSTRING( substr ) TQConstString( substr.ptr, substr.len ).string() inline bool operator<( const StringPtr &s1, const StringPtr &s2 ) { @@ -69,23 +69,23 @@ inline bool operator==( const StringPtr &s1, const char *s2 ) return CONSTSTRING( s1 ) == s2; } -class AttributeMap : public QMap +class AttributeMap : public TQMap { public: AttributeMap() {} - AttributeMap( const AttributeMap &rhs ) : QMap( rhs ) {} + AttributeMap( const AttributeMap &rhs ) : TQMap( rhs ) {} AttributeMap &operator=( const AttributeMap &rhs ) - { QMap::operator=( rhs ); return *this; } + { TQMap::operator=( rhs ); return *this; } // helper for 'const char *' key... ConstIterator findAttribute( const char *key ) const { - QString qkey( key ); + TQString qkey( key ); return find( StringPtr( qkey ) ); } Iterator findAttribute( const char *key ) { - QString qkey( key ); + TQString qkey( key ); return find( StringPtr( qkey ) ); } @@ -98,7 +98,7 @@ public: } StringPtr &operator[]( const StringPtr &key ) { - return QMap::operator[]( key ); + return TQMap::operator[]( key ); } }; @@ -115,21 +115,21 @@ struct Token struct ItemProperties { ItemProperties(); - ItemProperties( const QFont &defaultFont ); + ItemProperties( const TQFont &defaultFont ); ItemProperties( const ItemProperties &other, const Token &token, TextView *textView ); ItemProperties( const ItemProperties &rhs ); ItemProperties &operator=( const ItemProperties &rhs ); - void updateFont( const QFont &newFont ); + void updateFont( const TQFont &newFont ); // these three are inherited/merged - QFont font; - QColor color; - QColor selColor; - QColor bgColor; - QColor bgSelColor; + TQFont font; + TQColor color; + TQColor selColor; + TQColor bgColor; + TQColor bgSelColor; bool reversed; // ### todo: inherit these, too AttributeMap attributes; @@ -153,7 +153,7 @@ public: virtual const char *type() { return "Item"; } - virtual void paint( QPainter &painter ) = 0; + virtual void paint( TQPainter &painter ) = 0; int width() const; @@ -207,7 +207,7 @@ public: virtual const char *type() { return "TextChunk"; } - virtual void paint( QPainter &painter ); + virtual void paint( TQPainter &painter ); virtual Item *breakLine( int width ); @@ -226,26 +226,26 @@ private: StringPtr breakInTheMiddle( int width ); Item *hardBreak( const StringPtr &rightHandSide ); - void paintSelection( QPainter &p ); - int paintSelection( QPainter &p, int x, const StringPtr &text ); - int paintText( QPainter &p, int x, const StringPtr &text ); + void paintSelection( TQPainter &p ); + int paintSelection( TQPainter &p, int x, const StringPtr &text ); + int paintText( TQPainter &p, int x, const StringPtr &text ); void mergeSelection( TextChunk *child, SelectionPoint *selection ); StringPtr m_text; uint m_originalTextLength; - QFontMetrics m_metrics; + TQFontMetrics m_metrics; class TextChunk *m_parent; }; class ImageItem : public Item { public: - ImageItem( TextParag *parag, const QPixmap &pixmap ); + ImageItem( TextParag *parag, const TQPixmap &pixmap ); virtual const char *type() { return "Image"; } - virtual void paint( QPainter &painter ); + virtual void paint( TQPainter &painter ); virtual LayoutResetStatus resetLayout(); @@ -253,7 +253,7 @@ protected: virtual void calcExtends() const; private: - QPixmap m_pixmap; + TQPixmap m_pixmap; }; class Tokenizer @@ -268,20 +268,20 @@ public: uint index; int type; }; - typedef QValueList TagIndexList; + typedef TQValueList TagIndexList; // preprocessed string struct PString { - QString data; + TQString data; TagIndexList tags; }; Tokenizer( PString &text ); - static PString preprocess( const QString &richText ); + static PString preprocess( const TQString &richText ); - static QString convertToRichText( const PString &ptext ); + static TQString convertToRichText( const PString &ptext ); bool parseNextToken( Token &tok ); @@ -290,12 +290,12 @@ private: StringPtr &tag, AttributeMap &attributes ); - static TagIndexList scanTagIndices( const QString &text ); - static void resolveEntities( QString &text, TagIndexList &tags ); + static TagIndexList scanTagIndices( const TQString &text ); + static void resolveEntities( TQString &text, TagIndexList &tags ); enum TagParsingState { ScanForName, ScanForEqual, ScanForValue }; - QString &m_text; + TQString &m_text; TagIndexList m_tags; TagIndexList::ConstIterator m_lastTag; bool m_textBeforeFirstTagProcessed; @@ -315,11 +315,11 @@ public: TextLine(); // tranfers ownership of items! make sure that 'items' does not // have autodeletion enabled! - TextLine( const QPtrList &items ); + TextLine( const TQPtrList &items ); int maxHeight() const { return m_maxHeight; } - QString updateSelection( const SelectionPoint &start, const SelectionPoint &end ); + TQString updateSelection( const SelectionPoint &start, const SelectionPoint &end ); void clearSelection(); // transfers ownership @@ -327,21 +327,21 @@ public: bool isEmpty() const { return m_items.isEmpty(); } - Item *resetLayout( QPtrList &remainingItems); + Item *resetLayout( TQPtrList &remainingItems); - void paint( QPainter &p, int y ); + void paint( TQPainter &p, int y ); Item *itemAt( int px, SelectionPoint *selectionInfo, Item::SelectionAccuracy accuracy = Item::SelectExact ); - QPtrListIterator iterator() const { return QPtrListIterator( m_items ); } + TQPtrListIterator iterator() const { return TQPtrListIterator( m_items ); } - QString plainText() const; + TQString plainText() const; - void fontChange( const QFont &newFont ); + void fontChange( const TQFont &newFont ); private: - QPtrList m_items; + TQPtrList m_items; int m_maxHeight; }; @@ -350,13 +350,13 @@ class SelectionPoint; class TextParag { public: - TextParag( TextView *textView, const QString &richText ); + TextParag( TextView *textView, const TQString &richText ); ~TextParag(); void layout( int width ); - void paint( QPainter &p, int y, int maxY ); + void paint( TQPainter &p, int y, int maxY ); inline void setLayouted( bool l ) { m_layouted = l; } inline bool isLayouted() const { return m_layouted; } @@ -369,21 +369,21 @@ public: TextView *textView() const { return m_textView; } - QString updateSelection( const SelectionPoint &start, const SelectionPoint &end ); + TQString updateSelection( const SelectionPoint &start, const SelectionPoint &end ); void clearSelection(); - void setRichText( const QString &richText ); + void setRichText( const TQString &richText ); Tokenizer::PString processedRichText() const { return m_processedRichText; } - QString plainText() const; + TQString plainText() const; - void fontChange( const QFont &newFont ); + void fontChange( const TQFont &newFont ); private: Tokenizer::PString m_processedRichText; - QPtrList m_lines; + TQPtrList m_lines; bool m_layouted; int m_height; int m_minWidth; @@ -410,7 +410,7 @@ struct SelectionPoint TextLine *line; TextParag *parag; uint offset; - QPoint pos; + TQPoint pos; }; class TextParagIterator @@ -422,10 +422,10 @@ public: TextParagIterator &operator=( const TextParagIterator &rhs ) { m_paragIt = rhs.m_paragIt; return *this; } - QString richText() const; - void setRichText( const QString &richText ); + TQString richText() const; + void setRichText( const TQString &richText ); - QString plainText() const; + TQString plainText() const; bool atEnd() const { return m_paragIt.current() == 0; } @@ -435,31 +435,31 @@ public: TextParagIterator &operator--( int steps ) { m_paragIt -= steps; return *this; } protected: - TextParagIterator( const QPtrListIterator ¶gIt ) + TextParagIterator( const TQPtrListIterator ¶gIt ) : m_paragIt( paragIt ) {} private: - QPtrListIterator m_paragIt; + TQPtrListIterator m_paragIt; }; class ContentsPaintAlgorithm { public: - ContentsPaintAlgorithm( const QPtrListIterator ¶gIt, - QWidget *viewport, QPixmap &paintBuffer, - QPainter &painter, int clipX, int clipY, int clipHeight ); + ContentsPaintAlgorithm( const TQPtrListIterator ¶gIt, + TQWidget *viewport, TQPixmap &paintBuffer, + TQPainter &painter, int clipX, int clipY, int clipHeight ); void paint(); private: int goToFirstVisibleParagraph(); - int paint( QPainter &bufferedPainter, int currentY ); + int paint( TQPainter &bufferedPainter, int currentY ); int adjustYAndIterator( int startY, int currentY, int nextY ); - QPtrListIterator m_paragIt; - QWidget *m_viewport; - QPixmap &m_paintBuffer; - QPainter &m_painter; + TQPtrListIterator m_paragIt; + TQWidget *m_viewport; + TQPixmap &m_paintBuffer; + TQPainter &m_painter; int m_clipX, m_clipY, m_clipHeight; int m_overshoot; }; @@ -472,32 +472,32 @@ class TextView : public QScrollView friend class TextParag; friend class TextParagIterator; public: - TextView( QWidget *parent, const char *name = 0 ); + TextView( TQWidget *parent, const char *name = 0 ); virtual ~TextView(); virtual void clear(); - TextParagIterator appendParag( const QString &richText ); + TextParagIterator appendParag( const TQString &richText ); bool removeParag( const TextParagIterator ¶g ); void clearSelection( bool repaint = false ); // ### re-consider the repaint arg... - QString selectedText() const { return m_selectedText; } + TQString selectedText() const { return m_selectedText; } TextParagIterator firstParag() const; - QString plainText() const; + TQString plainText() const; - QColor linkColor() const; - void setLinkColor( const QColor &linkColor ); + TQColor linkColor() const; + void setLinkColor( const TQColor &linkColor ); void scrollToBottom( bool force = false ); signals: void selectionChanged(); - void pasteReq(const QString&); - void linkClicked( const QMouseEvent *ev, const QString &url ); + void pasteReq(const TQString&); + void linkClicked( const TQMouseEvent *ev, const TQString &url ); public slots: void copy(); @@ -506,22 +506,22 @@ protected slots: void scrolling(int value); protected: - virtual void viewportResizeEvent( QResizeEvent *ev ); - virtual void drawContents( QPainter *p, int cx, int cy, int cw, int ch ); - virtual void contentsMousePressEvent( QMouseEvent *ev ); - virtual void contentsMouseMoveEvent( QMouseEvent *ev ); - virtual void contentsMouseReleaseEvent( QMouseEvent *ev ); - virtual void fontChange( const QFont & ); + virtual void viewportResizeEvent( TQResizeEvent *ev ); + virtual void drawContents( TQPainter *p, int cx, int cy, int cw, int ch ); + virtual void contentsMousePressEvent( TQMouseEvent *ev ); + virtual void contentsMouseMoveEvent( TQMouseEvent *ev ); + virtual void contentsMouseReleaseEvent( TQMouseEvent *ev ); + virtual void fontChange( const TQFont & ); virtual void startDrag(); - virtual QDragObject *dragObject( const QString &dragURL ); + virtual TQDragObject *dragObject( const TQString &dragURL ); private slots: void autoScroll(); private: - void emitLinkClickedForMouseEvent( QMouseEvent *ev ); + void emitLinkClickedForMouseEvent( TQMouseEvent *ev ); void startAutoScroll(); @@ -531,38 +531,38 @@ private: void updateSelectionOrder(); - QString updateSelection( const SelectionPoint &start, const SelectionPoint &end ); + TQString updateSelection( const SelectionPoint &start, const SelectionPoint &end ); SelectionPoint *selectionStart(); SelectionPoint *selectionEnd(); void layout( bool force = true ); - Item *itemAt( const QPoint &pos, SelectionPoint *selectionInfo = 0, + Item *itemAt( const TQPoint &pos, SelectionPoint *selectionInfo = 0, Item::SelectionAccuracy accuracy = Item::SelectExact ); void clearSelectionInternal(); void contentsChange(int heightChange, bool force = false); - QPtrList m_parags; - QPixmap m_paintBuffer; + TQPtrList m_parags; + TQPixmap m_paintBuffer; SelectionPoint m_selectionMaybeStart; SelectionPoint m_selectionStart; SelectionPoint m_selectionEnd; bool m_selectionEndBeforeStart; - QTimer *m_autoScrollTimer; + TQTimer *m_autoScrollTimer; - QString m_selectedText; + TQString m_selectedText; - QPoint m_dragStartPos; - QString m_dragURL; + TQPoint m_dragStartPos; + TQString m_dragURL; bool m_mousePressed : 1; bool m_mmbPressed : 1; - QColor m_linkColor; - QColor m_selectionBackgroundColor; + TQColor m_linkColor; + TQColor m_selectionBackgroundColor; int m_height; bool m_inScroll; diff --git a/ksirc/kstextviewtest.cpp b/ksirc/kstextviewtest.cpp index f3326351..d20e6e50 100644 --- a/ksirc/kstextviewtest.cpp +++ b/ksirc/kstextviewtest.cpp @@ -11,13 +11,13 @@ public: { //startTimer( 5000 ); } - void timerEvent( QTimerEvent * ) + void timerEvent( TQTimerEvent * ) { m_lines++; if ( m_lines > 15 ) m_view->removeParag( m_view->firstParag() ); - m_view->appendParag( QString::fromLatin1( "color testcolor testcolor testcolor testcolor testcolor testcolor testcolor testcolor test" ) ); - m_view->appendParag( QString::fromLatin1( "aaaaaa bbbbbb cccccccc ddddddddd eeeeeee " ) ); + m_view->appendParag( TQString::fromLatin1( "color testcolor testcolor testcolor testcolor testcolor testcolor testcolor testcolor test" ) ); + m_view->appendParag( TQString::fromLatin1( "aaaaaa bbbbbb cccccccc ddddddddd eeeeeee " ) ); m_view->setContentsPos( 0, m_view->contentsHeight() ); } private: @@ -33,17 +33,17 @@ int main( int argc, char **argv ) app.setMainWidget( &view ); view.show(); - view.appendParag( QString::fromLatin1( "boldNormalItalic hey!reverse!" ) ); - view.appendParag( QString::fromLatin1( "bleh foo hey bar schubidu bliep blop" ) ); - view.appendParag( QString::fromLatin1( "more longish paragraphs .. yaddayadda yadda" ) ); - view.appendParag( QString::fromLatin1( "<tronical> hah! &" ) ); - view.appendParag( QString::fromLatin1( "url" ) ); - view.appendParag( QString::fromLatin1( "color test" ) ); - view.appendParag( QString::fromLatin1( "another color test" ) ); - view.appendParag( QString::fromLatin1( "another color test" ) ); - view.appendParag( QString::fromLatin1( "simple attr test 123 \" oof>complicated attr test" ) ); - view.appendParag( QString::fromLatin1( "\" 123 \" oof>\"third attr test 2\"" ) ); - view.appendParag( QString::fromLatin1( "aaaaaa bbbbbb cccccccc ddddddddd eeeeeee" ) ); + view.appendParag( TQString::fromLatin1( "boldNormalItalic hey!reverse!" ) ); + view.appendParag( TQString::fromLatin1( "bleh foo hey bar schubidu bliep blop" ) ); + view.appendParag( TQString::fromLatin1( "more longish paragraphs .. yaddayadda yadda" ) ); + view.appendParag( TQString::fromLatin1( "<tronical> hah! &" ) ); + view.appendParag( TQString::fromLatin1( "url" ) ); + view.appendParag( TQString::fromLatin1( "color test" ) ); + view.appendParag( TQString::fromLatin1( "another color test" ) ); + view.appendParag( TQString::fromLatin1( "another color test" ) ); + view.appendParag( TQString::fromLatin1( "simple attr test 123 \" oof>complicated attr test" ) ); + view.appendParag( TQString::fromLatin1( "\" 123 \" oof>\"third attr test 2\"" ) ); + view.appendParag( TQString::fromLatin1( "aaaaaa bbbbbb cccccccc ddddddddd eeeeeee" ) ); Timer t( &view ); return app.exec(); diff --git a/ksirc/ksview.cpp b/ksirc/ksview.cpp index 12ac357e..d9cac283 100644 --- a/ksirc/ksview.cpp +++ b/ksirc/ksview.cpp @@ -18,12 +18,12 @@ // $Id$ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -42,17 +42,17 @@ #include "nickColourMaker.h" #include "ksircprocess.h" -KSircView::KSircView(KSircProcess *proc, QWidget *parent, const char *name) +KSircView::KSircView(KSircProcess *proc, TQWidget *parent, const char *name) : KSirc::TextView(parent, name), m_proc(proc) { m_acceptFiles = false; m_timestamps = false; viewport()->setAcceptDrops(true); clear(); - connect( this, SIGNAL( linkClicked( const QMouseEvent *, const QString & ) ), - this, SLOT( anchorClicked( const QMouseEvent *, const QString & ) ) ); + connect( this, TQT_SIGNAL( linkClicked( const TQMouseEvent *, const TQString & ) ), + this, TQT_SLOT( anchorClicked( const TQMouseEvent *, const TQString & ) ) ); - QPixmap background = ksopts->backgroundPixmap(); + TQPixmap background = ksopts->backgroundPixmap(); if ( !background.isNull() ) viewport()->setBackgroundPixmap( background ); @@ -70,21 +70,21 @@ void KSircView::clear() KSirc::TextView::clear(); } -QString KSircView::makeTimeStamp() +TQString KSircView::makeTimeStamp() { - QTime now = QTime::currentTime(); - QString timeStamp = QString::fromLatin1( "[%1:%2:%3] " ) - .arg( QString::number( now.hour() ).rightJustify( 2, '0' ) ) - .arg( QString::number( now.minute() ).rightJustify( 2, '0' ) ) - .arg( QString::number( now.second() ).rightJustify( 2, '0' ) ); + TQTime now = TQTime::currentTime(); + TQString timeStamp = TQString::fromLatin1( "[%1:%2:%3] " ) + .arg( TQString::number( now.hour() ).rightJustify( 2, '0' ) ) + .arg( TQString::number( now.minute() ).rightJustify( 2, '0' ) ) + .arg( TQString::number( now.second() ).rightJustify( 2, '0' ) ); return timeStamp; } -void KSircView::saveURL( const QString &url ) +void KSircView::saveURL( const TQString &url ) { KURL kurl( url ); - KFileDialog *dlg = new KFileDialog( QString::null, QString::null /*filter*/, this /*parent*/, "filedialog" /*name*/, true /*modal*/ ); + KFileDialog *dlg = new KFileDialog( TQString::null, TQString::null /*filter*/, this /*parent*/, "filedialog" /*name*/, true /*modal*/ ); dlg->setKeepLocation( true ); @@ -104,24 +104,24 @@ void KSircView::saveURL( const QString &url ) delete dlg; } -QString KSircView::addLine(const QString &pixmap, const QColor &color, const QString &_text) +TQString KSircView::addLine(const TQString &pixmap, const TQColor &color, const TQString &_text) { //kdDebug(5008) << "Start Text: " << _text << endl; - QString richText( "" ); + TQString richText( "" ); richText = richText.arg( color.name() ); if ( !pixmap.isEmpty() ) - richText.prepend( QString::fromLatin1( "" ).arg( pixmap ) ); + richText.prepend( TQString::fromLatin1( "" ).arg( pixmap ) ); - QString timeStamp = QString::fromLatin1( "%2" ) + TQString timeStamp = TQString::fromLatin1( "%2" ) .arg( ksopts->textColor.name() ) .arg( makeTimeStamp() ); m_timeStamps.append(timeStamp); if ( m_timestamps ) richText.prepend( timeStamp ); - QString text = QStyleSheet::escape(_text); + TQString text = TQStyleSheet::escape(_text); // ### a bit of a hack: turn '<nick> message' into // <nick> message' . span itself isn't supported but it @@ -130,30 +130,30 @@ QString KSircView::addLine(const QString &pixmap, const QColor &color, const QSt // according to UV Kochavi , to prevent output like // 'nick< to catch queries. - QRegExp bidiRe( "^(<\\S+>)(.+)$" ); - text.replace( bidiRe, QString::fromLatin1( "\\1\\2" ) ); - QRegExp bidiRe2( "^(\\[\\S+\\])(.+)$" ); - text.replace( bidiRe2, QString::fromLatin1( "\\1\\2" ) ); - QRegExp bidiRe3( "^(>\\S+<)(.+)$" ); - text.replace( bidiRe3, QString::fromLatin1( "\\1\\2" ) ); - - QRegExp nickCol( "~n(.+)~n" ); + TQRegExp bidiRe( "^(<\\S+>)(.+)$" ); + text.replace( bidiRe, TQString::fromLatin1( "\\1\\2" ) ); + TQRegExp bidiRe2( "^(\\[\\S+\\])(.+)$" ); + text.replace( bidiRe2, TQString::fromLatin1( "\\1\\2" ) ); + TQRegExp bidiRe3( "^(>\\S+<)(.+)$" ); + text.replace( bidiRe3, TQString::fromLatin1( "\\1\\2" ) ); + + TQRegExp nickCol( "~n(.+)~n" ); nickCol.setMinimal(true); int pos; while( (pos = nickCol.search(text)) >= 0 ){ //kdDebug(5008) << "Found nick: " << nickCol.cap(1) << endl; - QString newText = nickCol.cap(1); + TQString newText = nickCol.cap(1); if( nickCol.cap(1) != m_proc->getNick()){ - QColor col = nickColourMaker::colourMaker()->findFg(nickCol.cap(1)); + TQColor col = nickColourMaker::colourMaker()->findFg(nickCol.cap(1)); - newText.prepend(QString("").arg(col.name())); + newText.prepend(TQString("").arg(col.name())); newText.append(""); } else { - QColor col = ksopts->ownNickColor.name(); + TQColor col = ksopts->ownNickColor.name(); if( ! col.isValid()) nickColourMaker::colourMaker()->findFg(nickCol.cap(1)); - newText.prepend(QString("").arg(col.name())); + newText.prepend(TQString("").arg(col.name())); newText.append(""); if(ksopts->ownNickBold){ newText.prepend(""); @@ -199,11 +199,11 @@ QString KSircView::addLine(const QString &pixmap, const QColor &color, const QSt } if (parser.beeped()) { - KNotifyClient::event(winId(), QString::fromLatin1("BeepReceived"), + KNotifyClient::event(winId(), TQString::fromLatin1("BeepReceived"), i18n("Beep Received")); } - QString logText = parag.plainText(); + TQString logText = parag.plainText(); // append timestamp if it's not already there if ( ! m_timestamps ) logText.prepend( makeTimeStamp() ); @@ -211,20 +211,20 @@ QString KSircView::addLine(const QString &pixmap, const QColor &color, const QSt return logText + '\n'; } -void KSircView::addRichText(const QString &_text) +void KSircView::addRichText(const TQString &_text) { //kdDebug(5008) << "Start Text: " << _text << endl; - QString text = _text; + TQString text = _text; - QRegExp re("^(\\[[0-9:]+\\] )"); - QString timeStamp; + TQRegExp re("^(\\[[0-9:]+\\] )"); + TQString timeStamp; if(re.search(text) >= 0){ timeStamp = re.cap(1); } else { - timeStamp = QString::fromLatin1( "%2" ) + timeStamp = TQString::fromLatin1( "%2" ) .arg( ksopts->textColor.name() ) .arg( makeTimeStamp() ); if ( m_timestamps ) @@ -254,10 +254,10 @@ void KSircView::enableTimeStamps(bool enable) setUpdatesEnabled( false ); m_timestamps = enable; KSirc::TextParagIterator paragIt = firstParag(); - QStringList::ConstIterator timeStampIt = m_timeStamps.begin(); + TQStringList::ConstIterator timeStampIt = m_timeStamps.begin(); for (; !paragIt.atEnd(); ++paragIt, ++timeStampIt ) { - QString text = paragIt.richText(); + TQString text = paragIt.richText(); if ( enable ) text.prepend( *timeStampIt ); else @@ -268,7 +268,7 @@ void KSircView::enableTimeStamps(bool enable) updateContents(); } -void KSircView::anchorClicked(const QMouseEvent *ev, const QString &url) +void KSircView::anchorClicked(const TQMouseEvent *ev, const TQString &url) { if ( (ev->button() & LeftButton) && (ev->state() & ShiftButton ) ) saveURL( url ); @@ -301,43 +301,43 @@ void KSircView::anchorClicked(const QMouseEvent *ev, const QString &url) } } -void KSircView::openBrowser(const QString &url ) +void KSircView::openBrowser(const TQString &url ) { - (void) new KRun( KURL( url.startsWith("www") ? QString::fromLatin1("http://") + url : url)); + (void) new KRun( KURL( url.startsWith("www") ? TQString::fromLatin1("http://") + url : url)); } -void KSircView::copyLinkToClipboard( const QString &url ) +void KSircView::copyLinkToClipboard( const TQString &url ) { - QApplication::clipboard()->setText( url, QClipboard::Clipboard ); + TQApplication::clipboard()->setText( url, QClipboard::Clipboard ); } -QColor KSircView::ircColor(int code) +TQColor KSircView::ircColor(int code) { if (code >= 0 && code < 16) return ksopts->ircColors[code]; - return QColor(); + return TQColor(); } -void KSircView::contentsDragEnterEvent(QDragEnterEvent* event) +void KSircView::contentsDragEnterEvent(TQDragEnterEvent* event) { - event->accept((QTextDrag::canDecode(event) || + event->accept((TQTextDrag::canDecode(event) || (m_acceptFiles && KURLDrag::canDecode(event))) && (!event->source() || event->source() != viewport())); } -void KSircView::contentsDragMoveEvent(QDragMoveEvent* event) +void KSircView::contentsDragMoveEvent(TQDragMoveEvent* event) { event->accept(!event->source() || event->source() != viewport()); } -void KSircView::contentsDropEvent(QDropEvent* event) +void KSircView::contentsDropEvent(TQDropEvent* event) { - QStringList urls; - QString text; + TQStringList urls; + TQString text; if (m_acceptFiles && KURLDrag::decodeLocalFiles(event, urls)) emit urlsDropped(urls); - else if (QTextDrag::decode(event, text)) + else if (TQTextDrag::decode(event, text)) emit textDropped(text); } diff --git a/ksirc/ksview.h b/ksirc/ksview.h index 8b26faea..a4ee782e 100644 --- a/ksirc/ksview.h +++ b/ksirc/ksview.h @@ -29,41 +29,41 @@ class KSircView : public KSirc::TextView { Q_OBJECT public: - KSircView(KSircProcess *proc, QWidget *parent, const char *name); + KSircView(KSircProcess *proc, TQWidget *parent, const char *name); virtual ~KSircView(); virtual void clear(); // returns the plain-text string added (for logging) - QString addLine(const QString &pixmap, const QColor &color, const QString &text); - void addRichText(const QString &_text); + TQString addLine(const TQString &pixmap, const TQColor &color, const TQString &text); + void addRichText(const TQString &_text); void enableTimeStamps(bool enable); void setAcceptFiles(bool _acceptFiles) { m_acceptFiles = _acceptFiles; } signals: - void urlsDropped(const QStringList&); - void textDropped(const QString&); + void urlsDropped(const TQStringList&); + void textDropped(const TQString&); protected: - virtual void contentsDragEnterEvent(QDragEnterEvent *); - virtual void contentsDragMoveEvent(QDragMoveEvent *); - virtual void contentsDropEvent(QDropEvent *); + virtual void contentsDragEnterEvent(TQDragEnterEvent *); + virtual void contentsDragMoveEvent(TQDragMoveEvent *); + virtual void contentsDropEvent(TQDropEvent *); private: virtual bool linksEnabled() const { return true; } - void openBrowser( const QString &url ); - void copyLinkToClipboard( const QString &url ); - static QString makeTimeStamp(); + void openBrowser( const TQString &url ); + void copyLinkToClipboard( const TQString &url ); + static TQString makeTimeStamp(); - void saveURL( const QString &url ); + void saveURL( const TQString &url ); private slots: - void anchorClicked(const QMouseEvent *ev, const QString &url); + void anchorClicked(const TQMouseEvent *ev, const TQString &url); - QColor ircColor(int); + TQColor ircColor(int); private: int m_lines; - QStringList m_timeStamps; + TQStringList m_timeStamps; bool m_acceptFiles; bool m_timestamps; KSircProcess *m_proc; diff --git a/ksirc/logfile.cpp b/ksirc/logfile.cpp index 6a15e51e..2246cd30 100644 --- a/ksirc/logfile.cpp +++ b/ksirc/logfile.cpp @@ -9,12 +9,12 @@ #include -#include +#include #include -LogFile::LogFile( const QString &channel, const QString &server ) - : m_channel( channel ), m_server( server ), m_file( new QFile() ), +LogFile::LogFile( const TQString &channel, const TQString &server ) + : m_channel( channel ), m_server( server ), m_file( new TQFile() ), m_flushTimerId( -1 ) { } @@ -39,16 +39,16 @@ void LogFile::open() assert( m_file->isOpen() == true ); - log( QString::fromLatin1( "### Log session started at " ) - + QDateTime::currentDateTime().toString() - + QString::fromLatin1( "###\n" ) ); + log( TQString::fromLatin1( "### Log session started at " ) + + TQDateTime::currentDateTime().toString() + + TQString::fromLatin1( "###\n" ) ); } void LogFile::closeLog() { - log( QString::fromLatin1( "### Log session terminated at " ) - + QDateTime::currentDateTime().toString() - + QString::fromLatin1( "###\n" ) ); + log( TQString::fromLatin1( "### Log session terminated at " ) + + TQDateTime::currentDateTime().toString() + + TQString::fromLatin1( "###\n" ) ); if ( m_flushTimerId != -1 ) killTimer( m_flushTimerId ); @@ -56,7 +56,7 @@ void LogFile::closeLog() m_file->close(); } -void LogFile::log( const QString &message ) +void LogFile::log( const TQString &message ) { m_file->writeBlock( message.local8Bit(), message.length() ); @@ -64,7 +64,7 @@ void LogFile::log( const QString &message ) m_flushTimerId = startTimer( 60000 ); // flush each minute } -void LogFile::timerEvent( QTimerEvent * ) +void LogFile::timerEvent( TQTimerEvent * ) { if ( m_file ) m_file->flush(); @@ -73,12 +73,12 @@ void LogFile::timerEvent( QTimerEvent * ) m_flushTimerId = -1; } -QString LogFile::makeLogFileName( const QString &channel, const QString &server, int suffix ) +TQString LogFile::makeLogFileName( const TQString &channel, const TQString &server, int suffix ) { - QString res = channel + '_'; + TQString res = channel + '_'; - QDate dt = QDate::currentDate(); - QString dateStr; + TQDate dt = TQDate::currentDate(); + TQString dateStr; dateStr.sprintf( "%.4d_%.2d_%.2d_", dt.year(), dt.month(), dt.day() ); res += dateStr; @@ -87,7 +87,7 @@ QString LogFile::makeLogFileName( const QString &channel, const QString &server, res += ".log"; if ( suffix > -1 ) - res += '.' + QString::number( suffix ); + res += '.' + TQString::number( suffix ); return locateLocal( "appdata", "logs/" + res ); } diff --git a/ksirc/logfile.h b/ksirc/logfile.h index 337b9912..1a343728 100644 --- a/ksirc/logfile.h +++ b/ksirc/logfile.h @@ -7,34 +7,34 @@ #ifndef __logfile_h__ #define __logfile_h__ -#include +#include class QFile; class LogFile : public QObject { public: - LogFile( const QString &channel, const QString &server ); + LogFile( const TQString &channel, const TQString &server ); virtual ~LogFile(); void open(); void closeLog(); - void log( const QString &message ); + void log( const TQString &message ); protected: - virtual void timerEvent( QTimerEvent * ); + virtual void timerEvent( TQTimerEvent * ); private: - QString m_channel; - QString m_server; + TQString m_channel; + TQString m_server; - QFile *m_file; + TQFile *m_file; int m_flushTimerId; - QString makeLogFileName( const QString &channel, const QString &server, int suffix = -1 ); + TQString makeLogFileName( const TQString &channel, const TQString &server, int suffix = -1 ); }; #endif diff --git a/ksirc/mditoplevel.cpp b/ksirc/mditoplevel.cpp index 3f35d464..73c464c3 100644 --- a/ksirc/mditoplevel.cpp +++ b/ksirc/mditoplevel.cpp @@ -1,7 +1,7 @@ -#include +#include -#include +#include #include #include @@ -17,11 +17,11 @@ #define ID_CLOSE 5 -void KSTabWidget::mousePressEvent(QMouseEvent *e) +void KSTabWidget::mousePressEvent(TQMouseEvent *e) { if(e->button() == RightButton){ - QPoint p = tabBar()->mapFromParent(e->pos()); - QTab *tab = tabBar()->selectTab(p); + TQPoint p = tabBar()->mapFromParent(e->pos()); + TQTab *tab = tabBar()->selectTab(p); if(tab){ int id = tab->identifier(); emit showContexMenu(page(id), tabBar()->mapToGlobal(p)); @@ -29,32 +29,32 @@ void KSTabWidget::mousePressEvent(QMouseEvent *e) } } -MDITopLevel::MDITopLevel(QWidget *parent, const char *name) +MDITopLevel::MDITopLevel(TQWidget *parent, const char *name) : KMainWindow(parent, name) { m_closing = false; m_tab = new KSTabWidget( this ); - m_tab->setTabPosition( QTabWidget::Bottom ); + m_tab->setTabPosition( TQTabWidget::Bottom ); setCentralWidget( m_tab ); - connect( m_tab, SIGNAL( currentChanged( QWidget * ) ), - this, SLOT( slotCurrentChanged( QWidget * ) ) ); + connect( m_tab, TQT_SIGNAL( currentChanged( TQWidget * ) ), + this, TQT_SLOT( slotCurrentChanged( TQWidget * ) ) ); - connect( m_tab, SIGNAL( showContexMenu(QWidget *, const QPoint &) ), - this, SLOT( slotShowContexMenu(QWidget *, const QPoint &) ) ); + connect( m_tab, TQT_SIGNAL( showContexMenu(TQWidget *, const TQPoint &) ), + this, TQT_SLOT( slotShowContexMenu(TQWidget *, const TQPoint &) ) ); KConfig *config = kapp->config(); config->setGroup("MDI"); - QSize s( 600, 360 ); + TQSize s( 600, 360 ); resize(config->readSizeEntry( "TopLevelSize", &s )); m_dirtyIcon = UserIcon( "star" ); m_addressedIcon = UserIcon( "info" ); m_pop = new KPopupMenu(m_tab, ""); - m_pop->insertItem( SmallIcon("fileclose"), i18n("Close"), this, SLOT( slotCloseLastWid() )); + m_pop->insertItem( SmallIcon("fileclose"), i18n("Close"), this, TQT_SLOT( slotCloseLastWid() )); } @@ -67,21 +67,21 @@ MDITopLevel::~MDITopLevel() config->writeEntry( "TopLevelSize", this->size() ); config->sync(); - QPtrListIterator it( m_tabWidgets ); + TQPtrListIterator it( m_tabWidgets ); for (; it.current(); ++it ) it.current()->disconnect( this, 0 ); kdDebug(5008) << "~MDITopLevel out" << endl; } -void MDITopLevel::addWidget( QWidget *widget, bool show ) +void MDITopLevel::addWidget( TQWidget *widget, bool show ) { if ( m_tabWidgets.containsRef( widget ) ) return; kdDebug(5008) << "In add widget" << endl; - widget->reparent( m_tab, 0, QPoint( 0, 0 ), show ); + widget->reparent( m_tab, 0, TQPoint( 0, 0 ), show ); if(show == TRUE){ showWidget(widget); @@ -89,19 +89,19 @@ void MDITopLevel::addWidget( QWidget *widget, bool show ) m_tabWidgets.append( widget ); - connect( widget, SIGNAL( destroyed() ) , - this, SLOT( slotWidgetDestroyed() ) ); + connect( widget, TQT_SIGNAL( destroyed() ) , + this, TQT_SLOT( slotWidgetDestroyed() ) ); - connect( widget, SIGNAL( changeChannel( const QString &, const QString & ) ), - this, SLOT( slotChangeChannelName( const QString &, const QString & ) ) ); + connect( widget, TQT_SIGNAL( changeChannel( const TQString &, const TQString & ) ), + this, TQT_SLOT( slotChangeChannelName( const TQString &, const TQString & ) ) ); widget->installEventFilter( this ); - connect( widget, SIGNAL( changed( bool, QString ) ), - this, SLOT( slotMarkPageDirty( bool ) ) ); + connect( widget, TQT_SIGNAL( changed( bool, TQString ) ), + this, TQT_SLOT( slotMarkPageDirty( bool ) ) ); } -void MDITopLevel::removeWidget( QWidget *widget ) +void MDITopLevel::removeWidget( TQWidget *widget ) { if (m_closing) return; @@ -112,17 +112,17 @@ void MDITopLevel::removeWidget( QWidget *widget ) widget->disconnect( this, 0 ); } -void MDITopLevel::hideWidget( QWidget *widget ) +void MDITopLevel::hideWidget( TQWidget *widget ) { m_tab->removePage( widget ); widget->hide(); } -void MDITopLevel::showWidget( QWidget *widget ) +void MDITopLevel::showWidget( TQWidget *widget ) { if(m_tab->indexOf(widget) == -1){ int space = widget->caption().find(" "); - QString cap = space < 1 ? widget->caption():widget->caption().left(space); + TQString cap = space < 1 ? widget->caption():widget->caption().left(space); m_tab->addTab( widget, cap); m_tab->showPage( widget ); m_tab->setCurrentPage( m_tab->indexOf(widget) ); @@ -145,7 +145,7 @@ void MDITopLevel::previous() m_tab->setCurrentPage(m_tab->count() - 1); } -void MDITopLevel::closeEvent( QCloseEvent *ev ) +void MDITopLevel::closeEvent( TQCloseEvent *ev ) { m_closing = true; // Don't use iterators on a list while deleting elements @@ -154,11 +154,11 @@ void MDITopLevel::closeEvent( QCloseEvent *ev ) kdDebug(5008) << "Mdi got close event " << endl; while ( m_tabWidgets.count() && (i++ < 100000)) { kdDebug(5008) << "MDITopLevel trying to close: " << m_tabWidgets.first()->name() << endl; - QGuardedPtr w = m_tabWidgets.take(0); + TQGuardedPtr w = m_tabWidgets.take(0); w->show(); w->close( false ); if(w) - delete (QWidget *)w; + delete (TQWidget *)w; } KMainWindow::closeEvent( ev ); @@ -167,18 +167,18 @@ void MDITopLevel::closeEvent( QCloseEvent *ev ) void MDITopLevel::slotWidgetDestroyed() { - const QWidget *widget = static_cast( sender() ); + const TQWidget *widget = static_cast( sender() ); m_tabWidgets.removeRef( widget ); removeFromAddressedList( widget ); } -bool MDITopLevel::eventFilter( QObject *obj, QEvent *ev ) +bool MDITopLevel::eventFilter( TQObject *obj, TQEvent *ev ) { - if ( ev->type() != QEvent::CaptionChange ) + if ( ev->type() != TQEvent::CaptionChange ) return false; - QWidget *widget = dynamic_cast( obj ); + TQWidget *widget = dynamic_cast( obj ); if ( !widget || !m_tabWidgets.containsRef( widget ) ) return false; @@ -189,13 +189,13 @@ bool MDITopLevel::eventFilter( QObject *obj, QEvent *ev ) return false; } -void MDITopLevel::slotCurrentChanged( QWidget *page ) +void MDITopLevel::slotCurrentChanged( TQWidget *page ) { - m_tab->setTabIconSet( page, QIconSet() ); + m_tab->setTabIconSet( page, TQIconSet() ); removeFromAddressedList( page ); - setPlainCaption( page->QWidget::caption() ); + setPlainCaption( page->TQWidget::caption() ); KSircTopLevel *kst = dynamic_cast( page ); if ( !kst ) @@ -207,7 +207,7 @@ void MDITopLevel::slotMarkPageDirty( bool addressed ) { // This is called when a line appeared in this channel. // addressed is true if it was addressed to the user - KMainWindow *window = dynamic_cast( const_cast( sender() ) ); + KMainWindow *window = dynamic_cast( const_cast( sender() ) ); if ( !window ) return; @@ -223,27 +223,27 @@ void MDITopLevel::slotMarkPageDirty( bool addressed ) } } -void MDITopLevel::slotChangeChannelName( const QString &, const QString &channelName ) +void MDITopLevel::slotChangeChannelName( const TQString &, const TQString &channelName ) { - KMainWindow *window = dynamic_cast( const_cast( sender() ) ); + KMainWindow *window = dynamic_cast( const_cast( sender() ) ); if ( !window ) return; - QString esc = channelName; + TQString esc = channelName; esc.replace("&", "&&"); m_tab->setTabLabel( window, esc ); removeFromAddressedList( window ); } -void MDITopLevel::removeFromAddressedList( const QWidget* w ) +void MDITopLevel::removeFromAddressedList( const TQWidget* w ) { // If this tab was showing a "you're being talked to" icon, remove it // and tell the servercontroller (so that it can update the docked icon). m_addressed.removeRef( w ); } -void MDITopLevel::slotShowContexMenu(QWidget *w, const QPoint &p) +void MDITopLevel::slotShowContexMenu(TQWidget *w, const TQPoint &p) { m_last_pop_wid = w; m_pop->popup(p); diff --git a/ksirc/mditoplevel.h b/ksirc/mditoplevel.h index 7f58619c..c0f1c010 100644 --- a/ksirc/mditoplevel.h +++ b/ksirc/mditoplevel.h @@ -1,8 +1,8 @@ #ifndef __mditoplevel_h__ #define __mditoplevel_h__ -#include -#include +#include +#include #include @@ -10,16 +10,16 @@ class KSTabWidget : public QTabWidget { Q_OBJECT public: - KSTabWidget ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 ) - : QTabWidget(parent, name, f) + KSTabWidget ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ) + : TQTabWidget(parent, name, f) { } protected: - virtual void mousePressEvent(QMouseEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); signals: - void showContexMenu(QWidget *, const QPoint &); + void showContexMenu(TQWidget *, const TQPoint &); }; @@ -30,45 +30,45 @@ class MDITopLevel : public KMainWindow { Q_OBJECT public: - MDITopLevel(QWidget *parent = 0, const char *name = 0); + MDITopLevel(TQWidget *parent = 0, const char *name = 0); virtual ~MDITopLevel(); - void addWidget( QWidget *widget, bool show ); + void addWidget( TQWidget *widget, bool show ); - void removeWidget( QWidget *widget ); + void removeWidget( TQWidget *widget ); - QTabWidget *tabWidget() const { return m_tab; } + TQTabWidget *tabWidget() const { return m_tab; } void next(); void previous(); - QPtrList &widgets() { return m_tabWidgets; } + TQPtrList &widgets() { return m_tabWidgets; } - void hideWidget( QWidget *widget ); - void showWidget( QWidget *widget ); + void hideWidget( TQWidget *widget ); + void showWidget( TQWidget *widget ); - virtual bool eventFilter( QObject *obj, QEvent *ev ); + virtual bool eventFilter( TQObject *obj, TQEvent *ev ); bool closing() const { return m_closing; } protected: - void removeFromAddressedList( const QWidget* w ); - virtual void closeEvent( QCloseEvent *ev ); + void removeFromAddressedList( const TQWidget* w ); + virtual void closeEvent( TQCloseEvent *ev ); private slots: void slotWidgetDestroyed(); - void slotCurrentChanged( QWidget *page ); + void slotCurrentChanged( TQWidget *page ); void slotMarkPageDirty( bool ); - void slotChangeChannelName( const QString &, const QString &newName ); - void slotShowContexMenu(QWidget *, const QPoint &); + void slotChangeChannelName( const TQString &, const TQString &newName ); + void slotShowContexMenu(TQWidget *, const TQPoint &); void slotCloseLastWid(); private: KSTabWidget *m_tab; KPopupMenu *m_pop; - QWidget *m_last_pop_wid; - QPtrList m_tabWidgets; - QPtrList m_addressed; - QPixmap m_dirtyIcon; - QPixmap m_addressedIcon; + TQWidget *m_last_pop_wid; + TQPtrList m_tabWidgets; + TQPtrList m_addressed; + TQPixmap m_dirtyIcon; + TQPixmap m_addressedIcon; bool m_closing; }; diff --git a/ksirc/messageReceiver.cpp b/ksirc/messageReceiver.cpp index f2ac6ee0..e60d82e3 100644 --- a/ksirc/messageReceiver.cpp +++ b/ksirc/messageReceiver.cpp @@ -1,6 +1,6 @@ #include "messageReceiver.h" -#include +#include #include #include #include @@ -36,7 +36,7 @@ UnicodeMessageReceiver::UnicodeMessageReceiver( KSircProcess *process ) { } -void UnicodeMessageReceiver::sirc_receive( QCString str, bool broadcast ) +void UnicodeMessageReceiver::sirc_receive( TQCString str, bool broadcast ) { assert( encoder() ); //kdDebug(5008) << "Encoder: " << encoder()->name() << endl; @@ -44,23 +44,23 @@ void UnicodeMessageReceiver::sirc_receive( QCString str, bool broadcast ) sirc_receive( encoder()->toUnicode( str ), broadcast ); } -void UnicodeMessageReceiver::setEncoding( const QString &encoding ) +void UnicodeMessageReceiver::setEncoding( const TQString &encoding ) { m_encoding = encoding; m_encoder = 0; } -QString UnicodeMessageReceiver::encoding() const +TQString UnicodeMessageReceiver::encoding() const { if ( m_encoding.isEmpty() ) - return QTextCodec::codecForLocale()->mimeName(); + return TQTextCodec::codecForLocale()->mimeName(); return m_encoding; } -QTextCodec *UnicodeMessageReceiver::encoder() const +TQTextCodec *UnicodeMessageReceiver::encoder() const { if ( m_encoding.isEmpty() ) { - return QTextCodec::codecForLocale(); + return TQTextCodec::codecForLocale(); } if ( !m_encoder ) { diff --git a/ksirc/messageReceiver.h b/ksirc/messageReceiver.h index a86817b0..e70e82f3 100644 --- a/ksirc/messageReceiver.h +++ b/ksirc/messageReceiver.h @@ -2,8 +2,8 @@ #ifndef KMESSAGERECEIVER_H #define KMESSAGERECEIVER_H -#include -#include +#include +#include class KSircProcess; class QTextCodec; @@ -15,7 +15,7 @@ struct filterRule { const char *to; }; -typedef QPtrList filterRuleList; +typedef TQPtrList filterRuleList; class KSircMessageReceiver { @@ -23,9 +23,9 @@ public: KSircMessageReceiver(KSircProcess *_proc); virtual ~KSircMessageReceiver(); - virtual void sirc_receive(QCString str, bool broadcast = false) = 0; + virtual void sirc_receive(TQCString str, bool broadcast = false) = 0; - virtual void control_message(int, QString) = 0; + virtual void control_message(int, TQString) = 0; bool getBroadcast(); void setBroadcast(bool bd); @@ -45,18 +45,18 @@ class UnicodeMessageReceiver : public KSircMessageReceiver public: UnicodeMessageReceiver( KSircProcess *process ); - virtual void sirc_receive(QCString str, bool broadcast = false); - virtual void sirc_receive(QString str, bool broadcast = false) = 0; + virtual void sirc_receive(TQCString str, bool broadcast = false); + virtual void sirc_receive(TQString str, bool broadcast = false) = 0; protected: - void setEncoding( const QString &encoding ); - QString encoding() const; + void setEncoding( const TQString &encoding ); + TQString encoding() const; - QTextCodec *encoder() const; + TQTextCodec *encoder() const; private: - QString m_encoding; - QTextCodec *m_encoder; + TQString m_encoding; + TQTextCodec *m_encoder; }; #endif diff --git a/ksirc/nickColourMaker.cpp b/ksirc/nickColourMaker.cpp index b3f793a6..ce866349 100644 --- a/ksirc/nickColourMaker.cpp +++ b/ksirc/nickColourMaker.cpp @@ -18,9 +18,9 @@ // $Id$ -#include -#include -#include +#include +#include +#include #include #include "nickColourMaker.h" @@ -33,7 +33,7 @@ nickColourMaker::nickColourMaker() s_ncm = this; } -int nickColourMaker::findIdx(QString nick) const +int nickColourMaker::findIdx(TQString nick) const { unsigned int value = 0; uint i; @@ -71,7 +71,7 @@ int nickColourMaker::findIdx(QString nick) const } -QColor nickColourMaker::findFg(QString nick) const +TQColor nickColourMaker::findFg(TQString nick) const { int value = findIdx(nick); diff --git a/ksirc/nickColourMaker.h b/ksirc/nickColourMaker.h index 239a7935..ab3593fd 100644 --- a/ksirc/nickColourMaker.h +++ b/ksirc/nickColourMaker.h @@ -7,10 +7,10 @@ #ifndef __nickcolourmaker_h__ #define __nickcolourmaker_h__ -#include -#include -#include -#include +#include +#include +#include +#include #include "ksopts.h" struct nickColourInfo @@ -26,9 +26,9 @@ class nickColourMaker public: nickColourMaker(); - int findIdx(QString nick) const; - QColor findFg(QString nick) const; - QColor operator[]( QString nick ) const + int findIdx(TQString nick) const; + TQColor findFg(TQString nick) const; + TQColor operator[]( TQString nick ) const { return findFg(nick); } @@ -38,7 +38,7 @@ public: private: static nickColourMaker *s_ncm; - QDict m_nicks; + TQDict m_nicks; }; #endif diff --git a/ksirc/objFinder.cpp b/ksirc/objFinder.cpp index 4625b6cf..5988903d 100644 --- a/ksirc/objFinder.cpp +++ b/ksirc/objFinder.cpp @@ -1,15 +1,15 @@ #include "objFinder.h" -#include -#include -#include +#include +#include +#include #include #include #include -QDict *objFinder::objList = new QDict; +TQDict *objFinder::objList = new TQDict; /* * So we can connect to the slots, etc @@ -17,7 +17,7 @@ QDict *objFinder::objList = new QDict; objFinder *objFind = new objFinder(); objFinder::objFinder() - : QObject() + : TQObject() { } @@ -25,8 +25,8 @@ objFinder::~objFinder() { } -void objFinder::insert(QObject *obj, const char *key){ - QString name; +void objFinder::insert(TQObject *obj, const char *key){ + TQString name; if(obj == 0x0){ qWarning("objFinder: Passed Null Object"); @@ -43,22 +43,22 @@ void objFinder::insert(QObject *obj, const char *key){ } } objList->insert(name, obj); - connect(obj, SIGNAL(destroyed()), - objFind, SLOT(objDest())); + connect(obj, TQT_SIGNAL(destroyed()), + objFind, TQT_SLOT(objDest())); emit objFind->inserted(obj); } -QObject *objFinder::find(const char *name, const char *inherits){ - QObject *found; - QDictIterator it(*objList); +TQObject *objFinder::find(const char *name, const char *inherits){ + TQObject *found; + TQDictIterator it(*objList); uint len = strlen(name); while(it.current()){ if(len == strlen(it.current()->name()) && strcmp(it.current()->name(), name) == 0) return it.current(); - QObjectList *qobl = it.current()->queryList(inherits, name, FALSE); - QObjectListIt itql( *qobl ); + TQObjectList *qobl = it.current()->queryList(inherits, name, FALSE); + TQObjectListIt itql( *qobl ); if(itql.current() != 0x0){ found = itql.current(); delete qobl; @@ -67,8 +67,8 @@ QObject *objFinder::find(const char *name, const char *inherits){ delete qobl; ++it; } - QWidgetList *all = QApplication::allWidgets(); - QWidgetListIt itW(*all); + TQWidgetList *all = TQApplication::allWidgets(); + TQWidgetListIt itW(*all); while(itW.current()){ if(len == strlen(itW.current()->name()) && strcmp(itW.current()->name(), name) == 0){ @@ -88,13 +88,13 @@ QObject *objFinder::find(const char *name, const char *inherits){ } void objFinder::dumpTree(){ - QDictIterator it(*objList); + TQDictIterator it(*objList); while(it.current()){ it.current()->dumpObjectTree(); ++it; } - QWidgetList *all = QApplication::allWidgets(); - QWidgetListIt itW(*all); + TQWidgetList *all = TQApplication::allWidgets(); + TQWidgetListIt itW(*all); while(itW.current()){ kdDebug(5008) << itW.current()->className() << "::" << itW.current()->name("unnamed") << endl; ++itW; @@ -102,14 +102,14 @@ void objFinder::dumpTree(){ } -QStringList objFinder::allObjects(){ - QStringList allNames; - QDictIterator it(*objList); +TQStringList objFinder::allObjects(){ + TQStringList allNames; + TQDictIterator it(*objList); while(it.current()){ - QObjectList *qobl = it.current()->queryList(); // Matches everything - QObjectListIt itql( *qobl ); + TQObjectList *qobl = it.current()->queryList(); // Matches everything + TQObjectListIt itql( *qobl ); while(itql.current()){ - QString name; + TQString name; name = itql.current()->className(); name += "::"; name += itql.current()->name("unnamed"); @@ -119,10 +119,10 @@ QStringList objFinder::allObjects(){ delete qobl; ++it; } - QWidgetList *all = QApplication::allWidgets(); - QWidgetListIt itW(*all); + TQWidgetList *all = TQApplication::allWidgets(); + TQWidgetListIt itW(*all); while(itW.current()){ - QString name; + TQString name; name = itW.current()->className(); name += "::"; name += itW.current()->name("unnamed"); @@ -133,9 +133,9 @@ QStringList objFinder::allObjects(){ return allNames; } -QString objFinder::randString(){ +TQString objFinder::randString(){ static bool runSrand = 0; - QString str = ""; + TQString str = ""; if(runSrand == 0){ srand(time(NULL)); } @@ -149,7 +149,7 @@ void objFinder::objDest(){ if(sender() == 0x0){ return; } - QDictIterator it(*objList); + TQDictIterator it(*objList); while(it.current()){ if(it.current() == sender()){ objList->remove(it.currentKey()); diff --git a/ksirc/objFinder.h b/ksirc/objFinder.h index 8777dd68..f4f6fbd2 100644 --- a/ksirc/objFinder.h +++ b/ksirc/objFinder.h @@ -1,24 +1,24 @@ #ifndef OBJFINGER_H #define OBJFINGER_H -#include -#include -#include +#include +#include +#include -class objFinder : public QObject { +class objFinder : public TQObject { Q_OBJECT public: objFinder(); virtual ~objFinder(); - static void insert(QObject *obj, const char *key = 0); - static QObject *find(const char *name, const char *inherits); + static void insert(TQObject *obj, const char *key = 0); + static TQObject *find(const char *name, const char *inherits); static void dumpTree(); - static QStringList allObjects(); + static TQStringList allObjects(); signals: - void inserted(QObject *obj); + void inserted(TQObject *obj); protected slots: void objDest(); @@ -28,10 +28,10 @@ private: * Don't allow the object to be created, all it's members are static */ - static QString randString(); + static TQString randString(); - static QDict *objList; + static TQDict *objList; }; diff --git a/ksirc/puke/commands.h b/ksirc/puke/commands.h index 3e45d8ba..50ff88b2 100644 --- a/ksirc/puke/commands.h +++ b/ksirc/puke/commands.h @@ -166,7 +166,7 @@ // cArg: not defined #define PUKE_WIDGET_RESIZE_ACK -1015 -// -1020 to -1040 defines QEvent types +// -1020 to -1040 defines TQEvent types // All arguments are 0 unless otherwise stated #define PUKE_WIDGET_EVENT_NONE -1020 // iArg: timerId @@ -347,7 +347,7 @@ // cArg: 0 #define PUKE_WIDGET_RECREATE_ACK -1091 -// QFrame gets 1100 +// TQFrame gets 1100 // 1100 defines QFrame // Desc: set Frame style @@ -587,11 +587,11 @@ // cArg: not defined #define PUKE_KSPROGRESS_CANCEL_ACK -1425 -// QTable View at 1500 +// TQTable View at 1500 // none yet -// QListBox at 1600 +// TQListBox at 1600 // Desc: insert string item // iWinId: window id @@ -935,7 +935,7 @@ // OBJECT base class #define PWIDGET_OBJECT 1 -// WIDGET defines a base QWidget class +// WIDGET defines a base TQWidget class #define PWIDGET_WIDGET 2 // FRAME defines a base class diff --git a/ksirc/puke/controller.cpp b/ksirc/puke/controller.cpp index 1e798be7..04017529 100644 --- a/ksirc/puke/controller.cpp +++ b/ksirc/puke/controller.cpp @@ -16,7 +16,7 @@ using namespace std; // iostream.h include cstring which puts strlen into // std:: namespace, which breaks Qt's strlen() call - // in qcstring.h (in gcc3's libstdc++) + // in tqcstring.h (in gcc3's libstdc++) #include #include @@ -50,7 +50,7 @@ using namespace std; // iostream.h include cstring which puts strlen into uint PukeController::uiBaseWinId = 10; // Gives a little seperation from the controller id -PukeController::PukeController(QString sock, QObject *parent, const char *name) : PObject( parent, name ) +PukeController::PukeController(TQString sock, TQObject *parent, const char *name) : PObject( parent, name ) { int len, prev_umask; struct sockaddr_un unix_addr; @@ -102,12 +102,12 @@ PukeController::PukeController(QString sock, QObject *parent, const char *name) fcntl(iListenFd, F_SETFL, O_NONBLOCK); // Set it non-block so that // accept() never blocks. - qsnListen = new QSocketNotifier(iListenFd, QSocketNotifier::Read, this, QString(name) + "_iListen"); - connect(qsnListen, SIGNAL(activated(int)), - this, SLOT(NewConnect(int))); + qsnListen = new TQSocketNotifier(iListenFd, TQSocketNotifier::Read, this, TQString(name) + "_iListen"); + connect(qsnListen, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(NewConnect(int))); - connect(objFind, SIGNAL(inserted(QObject *)), - this, SLOT(slotInserted(QObject *))); + connect(objFind, TQT_SIGNAL(inserted(TQObject *)), + this, TQT_SLOT(slotInserted(TQObject *))); qidConnectFd.setAutoDelete(TRUE); @@ -124,8 +124,8 @@ PukeController::PukeController(QString sock, QObject *parent, const char *name) * Connect outputMessage to the acutal write buffer function * outputMessage signals from pobjects are chained until they finally reach us. */ - connect(this, SIGNAL(outputMessage(int, PukeMessage *)), - this, SLOT(writeBuffer(int, PukeMessage *))); + connect(this, TQT_SIGNAL(outputMessage(int, PukeMessage *)), + this, TQT_SLOT(writeBuffer(int, PukeMessage *))); initHdlr(); // Setup message command handlers. @@ -142,7 +142,7 @@ PukeController::PukeController(QString sock, QObject *parent, const char *name) } void -PukeController::slotInserted(QObject *obj) +PukeController::slotInserted(TQObject *obj) { emit inserted(obj); } @@ -154,7 +154,7 @@ PukeController::~PukeController() unlink(qsPukeSocket); } -QStrList PukeController::allObjects() +TQStrList PukeController::allObjects() { return objFinder::allObjects(); } @@ -174,12 +174,12 @@ void PukeController::NewConnect(int) // cfd() never blocks. fdStatus *fds = new fdStatus(); - fds->sr = new QSocketNotifier(cfd, QSocketNotifier::Read, this); - fds->sw = new QSocketNotifier(cfd, QSocketNotifier::Write, this); - connect(fds->sr, SIGNAL(activated(int)), - this, SLOT(Traffic(int))); - connect(fds->sw, SIGNAL(activated(int)), - this, SLOT(Writeable(int))); + fds->sr = new TQSocketNotifier(cfd, TQSocketNotifier::Read, this); + fds->sw = new TQSocketNotifier(cfd, TQSocketNotifier::Write, this); + connect(fds->sr, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(Traffic(int))); + connect(fds->sw, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(Writeable(int))); qidConnectFd.insert(cfd, fds); qsnListen->setEnabled(TRUE); @@ -350,7 +350,7 @@ void PukeController::Traffic(int fd) } -void PukeController::ServMessage(QString, int, QString) +void PukeController::ServMessage(TQString, int, TQString) { } @@ -585,7 +585,7 @@ void PukeController::hdlrPukeFetchWidget(int fd, PukeMessage *pm) // Let's go looking for the widget // Match any class with the right name - QObject *obj = 0x0; + TQObject *obj = 0x0; if(parent() && (strcmp(name, parent()->name()) == 0)){ obj = parent(); } @@ -609,8 +609,8 @@ void PukeController::hdlrPukeFetchWidget(int fd, PukeMessage *pm) } ws->type = iType; - connect(ws->pwidget, SIGNAL(outputMessage(int, PukeMessage*)), - this, SIGNAL(outputMessage(int, PukeMessage*))); + connect(ws->pwidget, TQT_SIGNAL(outputMessage(int, PukeMessage*)), + this, TQT_SIGNAL(outputMessage(int, PukeMessage*))); // insertPBoject(fd, uiBaseWinId, ws); // The widget list has to exist since we have ourselves in the list @@ -637,7 +637,7 @@ void PukeController::hdlrPukeDeleteWidget(int fd, PukeMessage *pm) throw(errorCommandFailed(PUKE_INVALID, INVALID_DEL_NO_CONTROL)); /* - QIntDict *qidWS = WidgetList[fd]; + TQIntDict *qidWS = WidgetList[fd]; if(qidWS == 0){ kdDebug(5008) << "WidgetRunner:: no such set of widget descriptors?" << endl; throw(errorCommandFailed(PUKE_INVALID, INVALID_DEL_NO_SUCH_CONNECTION)); @@ -691,7 +691,7 @@ void PukeController::closefd(int fd) /* * Now let's remove all traces of the widgets */ - QIntDict *qidWS = WidgetList[fd]; + TQIntDict *qidWS = WidgetList[fd]; if(qidWS == 0){ kdDebug(5008) << "WidgetRunner:: Close called twice?" << endl; bClosing = FALSE; @@ -702,7 +702,7 @@ void PukeController::closefd(int fd) do { - QIntDictIterator it(*qidWS); + TQIntDictIterator it(*qidWS); if(it.count() == 0){ kdDebug(5008) << "WidgetRunner: nothing left to delete\n" << endl; break; @@ -778,7 +778,7 @@ PWidget *PukeController::id2pwidget(widgetId *pwi){ void PukeController::insertPObject(int fd, int iWinId, WidgetS *obj){ // If no widget list exists for this fd, create one if(WidgetList[fd] == NULL){ - QIntDict *qidWS = new QIntDict; + TQIntDict *qidWS = new TQIntDict; qidWS->setAutoDelete(TRUE); WidgetList.insert(fd, qidWS); } @@ -796,8 +796,8 @@ void PukeController::insertPObject(int fd, int iWinId, WidgetS *obj){ // Now connect to the destroyed signal so we can remove the object from the lists // Once it is deleted - connect(obj->pwidget, SIGNAL(destroyed()), - this, SLOT(pobjectDestroyed())); + connect(obj->pwidget, TQT_SIGNAL(destroyed()), + this, TQT_SLOT(pobjectDestroyed())); } void PukeController::pobjectDestroyed(){ @@ -868,7 +868,7 @@ void PukeController::messageHandler(int fd, PukeMessage *pm) { return; } - QString libName = "ksirc/lib"+QString::fromLatin1(pm->cArg); + TQString libName = "ksirc/lib"+TQString::fromLatin1(pm->cArg); if (libName.right(3) == ".so") libName = libName.left(libName.length()-2)+"la"; @@ -959,8 +959,8 @@ widgetId PukeController::createWidget(widgetId wI, PukeMessage *pm) } ws->type = iType; - connect(ws->pwidget, SIGNAL(outputMessage(int, PukeMessage*)), - this, SIGNAL(outputMessage(int, PukeMessage*))); + connect(ws->pwidget, TQT_SIGNAL(outputMessage(int, PukeMessage*)), + this, TQT_SIGNAL(outputMessage(int, PukeMessage*))); // insertPBoject(fd, uiBaseWinId, ws); // The widget list has to exist since we have ourselves in the list diff --git a/ksirc/puke/controller.h b/ksirc/puke/controller.h index 80728224..5daa1629 100644 --- a/ksirc/puke/controller.h +++ b/ksirc/puke/controller.h @@ -8,12 +8,12 @@ #ifndef PUKE_CONTROLLER_H #define PUKE_CONTROLLER_H -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "pmessage.h" #include "pobject.h" @@ -24,9 +24,9 @@ class PukeController; class KLibrary; typedef struct { - QString server; + TQString server; bool writeable; - QSocketNotifier *sr,*sw; + TQSocketNotifier *sr,*sw; } fdStatus; @@ -81,7 +81,7 @@ class PukeController : public PObject { Q_OBJECT public: - PukeController(QString socket = "", QObject *parent=0, const char *name=0); + PukeController(TQString socket = "", TQObject *parent=0, const char *name=0); virtual ~PukeController(); bool running; @@ -102,20 +102,20 @@ public: */ PWidget *id2pwidget(widgetId *pwi); - QStrList allObjects(); + TQStrList allObjects(); signals: - void PukeMessages(QString server, int command, QString args); - void inserted(QObject *); + void PukeMessages(TQString server, int command, TQString args); + void inserted(TQObject *); public slots: - void ServMessage(QString, int, QString); + void ServMessage(TQString, int, TQString); protected slots: void Traffic(int); void Writeable(int); void NewConnect(int); - void slotInserted(QObject *obj); + void slotInserted(TQObject *obj); /** * When we delete a widget, this removes it from our internal @@ -132,11 +132,11 @@ protected slots: private: - QString qsPukeSocket; + TQString qsPukeSocket; int iListenFd; bool bClosing; // Set true if we are closing, we don't try and close twice at the same time. - QSocketNotifier *qsnListen; - QIntDict qidConnectFd; + TQSocketNotifier *qsnListen; + TQIntDict qidConnectFd; /** * Controller ID is defined as 1 @@ -145,15 +145,15 @@ private: // List of widgets and the fle descriptors they belong too - QIntDict > WidgetList; + TQIntDict > WidgetList; // I use a char * key that's the %p (hex address) of the pwidget - QDict revWidgetList; + TQDict revWidgetList; enum { keySize = 10 }; // Funtions used to create new widget - QIntDict widgetCF; // widgetCreatingFuntion List + TQIntDict widgetCF; // widgetCreatingFuntion List - QIntDict qidCommandTable; + TQIntDict qidCommandTable; void initHdlr(); @@ -181,11 +181,11 @@ private: /** * NOT APPLICAABLE */ - void setWidget(QObject *) { } + void setWidget(TQObject *) { } /** * NOT APPLICAABLE */ - virtual QObject *widget() { return 0x0; } + virtual TQObject *widget() { return 0x0; } /** * Inserts a PObject into our internal list diff --git a/ksirc/puke/palistbox.cpp b/ksirc/puke/palistbox.cpp index 8f3f22f1..9f43b124 100644 --- a/ksirc/puke/palistbox.cpp +++ b/ksirc/puke/palistbox.cpp @@ -13,7 +13,7 @@ PAListBox::createWidget(CreateArgs &ca) plb->setDeleteAble(FALSE); } else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - lb = new aListBox((QWidget *) ca.parent->widget()); + lb = new aListBox((TQWidget *) ca.parent->widget()); else lb = new aListBox(); plb->setWidget(lb); @@ -123,7 +123,7 @@ void PAListBox::messageHandler(int fd, PukeMessage *pm) } } -void PAListBox::setWidget(QObject *_lb) +void PAListBox::setWidget(TQObject *_lb) { if(_lb != 0 && _lb->inherits("aListBox") == FALSE) { diff --git a/ksirc/puke/palistbox.h b/ksirc/puke/palistbox.h index 0731bef9..a902b018 100644 --- a/ksirc/puke/palistbox.h +++ b/ksirc/puke/palistbox.h @@ -19,7 +19,7 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_lb = 0x0); + virtual void setWidget(TQObject *_lb = 0x0); virtual aListBox *widget(); public slots: diff --git a/ksirc/puke/pbutton.cpp b/ksirc/puke/pbutton.cpp index 309f2ac7..edccbe81 100644 --- a/ksirc/puke/pbutton.cpp +++ b/ksirc/puke/pbutton.cpp @@ -1,7 +1,7 @@ #include -#include +#include #include @@ -11,11 +11,11 @@ PObject * PButton::createWidget(CreateArgs &ca) { PButton *pb = new PButton(ca.parent); - QButton *qb; + TQButton *qb; if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - qb = new QButton((QWidget *) ca.parent->widget()); + qb = new TQButton((TQWidget *) ca.parent->widget()); else - qb = new QButton(); + qb = new TQButton(); pb->setWidget(qb); pb->setWidgetId(ca.pwI); return pb; @@ -60,7 +60,7 @@ void PButton::messageHandler(int fd, PukeMessage *pm) if(checkWidget() == FALSE) return; - widget()->setPixmap(QPixmap(pm->cArg)); + widget()->setPixmap(TQPixmap(pm->cArg)); pmRet.iCommand = - pm->iCommand; pmRet.iWinId = pm->iWinId; @@ -82,24 +82,24 @@ void PButton::messageHandler(int fd, PukeMessage *pm) } } -void PButton::setWidget(QObject *_qb) +void PButton::setWidget(TQObject *_qb) { - if(_qb != 0 && _qb->inherits("QButton") == FALSE) + if(_qb != 0 && _qb->inherits("TQButton") == FALSE) { errorInvalidSet(_qb); return; } - button = (QButton *) _qb; + button = (TQButton *) _qb; if(button != 0){ - connect(button, SIGNAL(pressed()), - this, SLOT(buttonPressed())); - connect(button, SIGNAL(released()), - this, SLOT(buttonReleased())); - connect(button, SIGNAL(clicked()), - this, SLOT(buttonClicked())); - connect(button, SIGNAL(toggled(bool)), - this, SLOT(buttonToggled(bool))); + connect(button, TQT_SIGNAL(pressed()), + this, TQT_SLOT(buttonPressed())); + connect(button, TQT_SIGNAL(released()), + this, TQT_SLOT(buttonReleased())); + connect(button, TQT_SIGNAL(clicked()), + this, TQT_SLOT(buttonClicked())); + connect(button, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(buttonToggled(bool))); } PWidget::setWidget(_qb); @@ -107,7 +107,7 @@ void PButton::setWidget(QObject *_qb) } -QButton *PButton::widget() +TQButton *PButton::widget() { return button; } diff --git a/ksirc/puke/pbutton.h b/ksirc/puke/pbutton.h index e43bd681..addc7713 100644 --- a/ksirc/puke/pbutton.h +++ b/ksirc/puke/pbutton.h @@ -3,7 +3,7 @@ class PButton; -#include +#include #include "pmessage.h" #include "pwidget.h" #include "pobject.h" @@ -21,8 +21,8 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_qb = 0x0); - virtual QButton *widget(); + virtual void setWidget(TQObject *_qb = 0x0); + virtual TQButton *widget(); public slots: void buttonPressed(); @@ -31,7 +31,7 @@ public slots: void buttonToggled(bool); private: - QButton *button; + TQButton *button; void buttonMessage(int iCommand); bool checkWidget(); diff --git a/ksirc/puke/pframe.cpp b/ksirc/puke/pframe.cpp index fcff1d96..d0dc79e3 100644 --- a/ksirc/puke/pframe.cpp +++ b/ksirc/puke/pframe.cpp @@ -5,12 +5,12 @@ PObject * PFrame::createWidget(CreateArgs &ca) { PFrame *pw = new PFrame(ca.parent); - QFrame *tf; + TQFrame *tf; if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - tf = new QFrame((QWidget *) ca.parent->widget()); + tf = new TQFrame((TQWidget *) ca.parent->widget()); else - tf = new QFrame(); + tf = new TQFrame(); pw->setWidget(tf); pw->setWidgetId(ca.pwI); pw->setPukeController(ca.pc); @@ -61,20 +61,20 @@ void PFrame::messageHandler(int fd, PukeMessage *pm) } } -void PFrame::setWidget(QObject *w) +void PFrame::setWidget(TQObject *w) { - if(w != 0 && w->inherits("QFrame") == FALSE) + if(w != 0 && w->inherits("TQFrame") == FALSE) { errorInvalidSet(w); return; } - frame = (QFrame *) w; - PWidget::setWidget((QWidget *) w); + frame = (TQFrame *) w; + PWidget::setWidget((TQWidget *) w); } -QFrame *PFrame::widget() +TQFrame *PFrame::widget() { // kdDebug(5008) << "PFrame widget called" << endl; return frame; diff --git a/ksirc/puke/pframe.h b/ksirc/puke/pframe.h index e98750aa..8d7fbc82 100644 --- a/ksirc/puke/pframe.h +++ b/ksirc/puke/pframe.h @@ -3,7 +3,7 @@ class PFrame; -#include +#include #include "pmessage.h" #include "pwidget.h" @@ -18,11 +18,11 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *w = 0x0); - virtual QFrame *widget(); + virtual void setWidget(TQObject *w = 0x0); + virtual TQFrame *widget(); private: - QFrame *frame; + TQFrame *frame; }; #endif diff --git a/ksirc/puke/pkfiledialog.cpp b/ksirc/puke/pkfiledialog.cpp index c99aea9f..f78ae895 100644 --- a/ksirc/puke/pkfiledialog.cpp +++ b/ksirc/puke/pkfiledialog.cpp @@ -16,7 +16,7 @@ PKFileDialog::createWidget(CreateArgs &ca) pw->setDeleteAble(FALSE); } else // Never takes a parent in Puke - kfbd = new KFileDialog("/", QString::null, 0L, "PukeKFileDialog", TRUE); + kfbd = new KFileDialog("/", TQString::null, 0L, "PukeKFileDialog", TRUE); pw->setWidget(kfbd); pw->setWidgetId(ca.pwI); return pw; @@ -42,7 +42,7 @@ PKFileDialog::~PKFileDialog() void PKFileDialog::messageHandler(int fd, PukeMessage *pm) { - QString selFile; + TQString selFile; PukeMessage pmRet; if(widget() == 0){ kdDebug(5008) << "PKFileDialog: No Widget set" << endl; @@ -102,7 +102,7 @@ void PKFileDialog::messageHandler(int fd, PukeMessage *pm) } } -void PKFileDialog::setWidget(QObject *_kbfd) +void PKFileDialog::setWidget(TQObject *_kbfd) { if(_kbfd != 0 && _kbfd->inherits("KFileBaseDialog") == FALSE) { diff --git a/ksirc/puke/pkfiledialog.h b/ksirc/puke/pkfiledialog.h index c8dbea3f..dbfd7dd5 100644 --- a/ksirc/puke/pkfiledialog.h +++ b/ksirc/puke/pkfiledialog.h @@ -19,7 +19,7 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_f = 0x0); + virtual void setWidget(TQObject *_f = 0x0); virtual KFileDialog *widget(); public slots: diff --git a/ksirc/puke/plabel.cpp b/ksirc/puke/plabel.cpp index 17ca851d..4d2bba48 100644 --- a/ksirc/puke/plabel.cpp +++ b/ksirc/puke/plabel.cpp @@ -1,4 +1,4 @@ -#include +#include #include @@ -9,15 +9,15 @@ PObject * PLabel::createWidget(CreateArgs &ca) { PLabel *pw = new PLabel(ca.parent); - QLabel *le; - if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("QLabel") == TRUE){ - le = (QLabel *) ca.fetchedObj; + TQLabel *le; + if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQLabel") == TRUE){ + le = (TQLabel *) ca.fetchedObj; pw->setDeleteAble(FALSE); } else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - le = new QLabel((QWidget *) ca.parent->widget()); + le = new TQLabel((TQWidget *) ca.parent->widget()); else - le = new QLabel((QWidget *)0L); + le = new TQLabel((TQWidget *)0L); pw->setWidget(le); pw->setWidgetId(ca.pwI); return pw; @@ -61,7 +61,7 @@ void PLabel::messageHandler(int fd, PukeMessage *pm) if(!checkWidget()) return; - widget()->setPixmap(QPixmap(pm->cArg)); + widget()->setPixmap(TQPixmap(pm->cArg)); pmRet.iCommand = - pm->iCommand; pmRet.iWinId = pm->iWinId; pmRet.iArg = 0; @@ -72,7 +72,7 @@ void PLabel::messageHandler(int fd, PukeMessage *pm) if(!checkWidget()) return; - widget()->setMovie(QMovie(pm->cArg)); + widget()->setMovie(TQMovie(pm->cArg)); pmRet.iCommand = - pm->iCommand; pmRet.iWinId = pm->iWinId; pmRet.iArg = 0; @@ -95,21 +95,21 @@ void PLabel::messageHandler(int fd, PukeMessage *pm) } } -void PLabel::setWidget(QObject *_l) +void PLabel::setWidget(TQObject *_l) { - if(_l != 0 && _l->inherits("QLabel") == FALSE) + if(_l != 0 && _l->inherits("TQLabel") == FALSE) { errorInvalidSet(_l); return; } - label = (QLabel *) _l; + label = (TQLabel *) _l; PWidget::setWidget(_l); } -QLabel *PLabel::widget() +TQLabel *PLabel::widget() { return label; } diff --git a/ksirc/puke/plabel.h b/ksirc/puke/plabel.h index c53705b1..f68ffd28 100644 --- a/ksirc/puke/plabel.h +++ b/ksirc/puke/plabel.h @@ -3,7 +3,7 @@ class PLabel; -#include +#include #include "pmessage.h" #include "pframe.h" #include "controller.h" @@ -19,8 +19,8 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_obj = 0); - virtual QLabel *widget(); + virtual void setWidget(TQObject *_obj = 0); + virtual TQLabel *widget(); public slots: @@ -28,7 +28,7 @@ protected: bool checkWidget(); private: - QLabel *label; + TQLabel *label; }; #endif diff --git a/ksirc/puke/playout.cpp b/ksirc/puke/playout.cpp index 9690f418..ae4fa6d1 100644 --- a/ksirc/puke/playout.cpp +++ b/ksirc/puke/playout.cpp @@ -4,7 +4,7 @@ #include "playout.h" #include "commands.h" -PLayout::PLayout(QObject *pobject) +PLayout::PLayout(TQObject *pobject) : PObject(pobject) { // Connect slots as needed @@ -24,7 +24,7 @@ PLayout::~PLayout() PObject *PLayout::createWidget(CreateArgs &ca) { PLayout *pw = new PLayout(ca.parent); - QBoxLayout *qbl; + TQBoxLayout *qbl; int direction, border, iType, iParent; // Retreive the border and direction information out of the // carg string @@ -33,12 +33,12 @@ PObject *PLayout::createWidget(CreateArgs &ca) if((ca.parent != 0) && (ca.parent->widget()->isWidgetType() == TRUE)){ - qbl = new QBoxLayout((QWidget *) ca.parent->widget(), (QBoxLayout::Direction) direction, border); + qbl = new TQBoxLayout((TQWidget *) ca.parent->widget(), (TQBoxLayout::Direction) direction, border); // kdDebug(5008) << "Creating layout with parent: " << parent.iWinId << endl; } else{ - qbl = new QBoxLayout((QBoxLayout::Direction) direction, border); + qbl = new TQBoxLayout((TQBoxLayout::Direction) direction, border); // kdDebug(5008) << "Creating layout NO PARENT" << endl; } pw->setWidget(qbl); @@ -88,7 +88,7 @@ void PLayout::messageHandler(int fd, PukeMessage *pm) } PObject *pld = controller()->id2pobject(fd, pm->iWinId); PObject *pls = controller()->id2pobject(fd, pm->iArg); - if( (pld->widget()->inherits("QBoxLayout") == FALSE) || (pls->widget()->inherits("QBoxLayout") == FALSE)) + if( (pld->widget()->inherits("TQBoxLayout") == FALSE) || (pls->widget()->inherits("TQBoxLayout") == FALSE)) throw(errorCommandFailed(PUKE_LAYOUT_ADDLAYOUT_ACK, 1)); PLayout *plbd = (PLayout *) pld; PLayout *plbs = (PLayout *) pls; @@ -133,21 +133,21 @@ void PLayout::messageHandler(int fd, PukeMessage *pm) } -void PLayout::setWidget(QObject *_layout) +void PLayout::setWidget(TQObject *_layout) { // kdDebug(5008) << "PObject setwidget called" << endl; - if(_layout != 0 && _layout->inherits("QBoxLayout") == FALSE) + if(_layout != 0 && _layout->inherits("TQBoxLayout") == FALSE) { errorInvalidSet(_layout); return; } - layout = (QBoxLayout *) _layout; + layout = (TQBoxLayout *) _layout; PObject::setWidget(_layout); } -QBoxLayout *PLayout::widget() +TQBoxLayout *PLayout::widget() { return layout; } diff --git a/ksirc/puke/playout.h b/ksirc/puke/playout.h index 4aec01a1..90a606b8 100644 --- a/ksirc/puke/playout.h +++ b/ksirc/puke/playout.h @@ -3,8 +3,8 @@ class PLayout; -#include -#include +#include +#include #include "pmessage.h" #include "pobject.h" @@ -14,7 +14,7 @@ class PLayout : public PObject public: static PObject *createWidget(CreateArgs &ca); - PLayout(QObject *parent = 0); + PLayout(TQObject *parent = 0); virtual ~PLayout(); /** @@ -26,16 +26,16 @@ public: /** * Sets the current opbect */ - virtual void setWidget(QObject *qb = 0x0); + virtual void setWidget(TQObject *qb = 0x0); /** * Returns the current object */ - virtual QBoxLayout *widget(); + virtual TQBoxLayout *widget(); private: - QBoxLayout *layout; + TQBoxLayout *layout; }; diff --git a/ksirc/puke/plined.cpp b/ksirc/puke/plined.cpp index 3f3e6a09..56a4ddc0 100644 --- a/ksirc/puke/plined.cpp +++ b/ksirc/puke/plined.cpp @@ -9,11 +9,11 @@ PObject * PLineEdit::createWidget(CreateArgs &ca) { PLineEdit *pw = new PLineEdit(ca.parent); - QLineEdit *le; + TQLineEdit *le; if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - le = new QLineEdit((QWidget *) ca.parent->widget()); + le = new TQLineEdit((TQWidget *) ca.parent->widget()); else - le = new QLineEdit(0L); + le = new TQLineEdit(0L); pw->setWidget(le); pw->setWidgetId(ca.pwI); return pw; @@ -59,7 +59,7 @@ void PLineEdit::messageHandler(int fd, PukeMessage *pm) kdDebug(5008) << "PLineEdit: No Widget set" << endl; return; } - widget()->setEchoMode((QLineEdit::EchoMode) pm->iArg); + widget()->setEchoMode((TQLineEdit::EchoMode) pm->iArg); pmRet.iCommand = - pm->iCommand; pmRet.iWinId = pm->iWinId; pmRet.iArg = widget()->echoMode(); @@ -101,27 +101,27 @@ void PLineEdit::messageHandler(int fd, PukeMessage *pm) } } -void PLineEdit::setWidget(QObject *_le) +void PLineEdit::setWidget(TQObject *_le) { - if(_le != 0 && _le->inherits("QLineEdit") == FALSE) + if(_le != 0 && _le->inherits("TQLineEdit") == FALSE) { errorInvalidSet(_le); return; } - lineedit = (QLineEdit *) _le; + lineedit = (TQLineEdit *) _le; if(lineedit != 0){ - connect(lineedit, SIGNAL(textChanged(const char *)), - this, SLOT(updateText(const char *))); - connect(lineedit, SIGNAL(returnPressed()), - this, SLOT(returnPress())); + connect(lineedit, TQT_SIGNAL(textChanged(const char *)), + this, TQT_SLOT(updateText(const char *))); + connect(lineedit, TQT_SIGNAL(returnPressed()), + this, TQT_SLOT(returnPress())); } PWidget::setWidget(_le); } -QLineEdit *PLineEdit::widget() +TQLineEdit *PLineEdit::widget() { return lineedit; } diff --git a/ksirc/puke/plined.h b/ksirc/puke/plined.h index 78f04bdf..91ca7413 100644 --- a/ksirc/puke/plined.h +++ b/ksirc/puke/plined.h @@ -3,7 +3,7 @@ class PLineEdit; -#include +#include #include "pmessage.h" #include "pwidget.h" #include "controller.h" @@ -19,15 +19,15 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_f); - virtual QLineEdit *widget(); + virtual void setWidget(TQObject *_f); + virtual TQLineEdit *widget(); public slots: void updateText(const char *); void returnPress(); private: - QLineEdit *lineedit; + TQLineEdit *lineedit; }; #endif diff --git a/ksirc/puke/plistbox.cpp b/ksirc/puke/plistbox.cpp index 482e08c7..d0b98305 100644 --- a/ksirc/puke/plistbox.cpp +++ b/ksirc/puke/plistbox.cpp @@ -7,15 +7,15 @@ PObject * PListBox::createWidget(CreateArgs &ca) { PListBox *plb = new PListBox(ca.parent); - QListBox *lb; - if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("QListBox") == TRUE){ - lb = (QListBox *) ca.fetchedObj; + TQListBox *lb; + if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQListBox") == TRUE){ + lb = (TQListBox *) ca.fetchedObj; plb->setDeleteAble(FALSE); } else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - lb = new QListBox((QWidget *) ca.parent->widget()); + lb = new TQListBox((TQWidget *) ca.parent->widget()); else - lb = new QListBox(); + lb = new TQListBox(); plb->setWidget(lb); plb->setWidgetId(ca.pwI); return plb; @@ -71,7 +71,7 @@ void PListBox::messageHandler(int fd, PukeMessage *pm) if(!checkWidget()) return; - widget()->insertItem(QPixmap(pm->cArg), pm->iArg); + widget()->insertItem(TQPixmap(pm->cArg), pm->iArg); pmRet.iCommand = - pm->iCommand; pmRet.iWinId = pm->iWinId; pmRet.iArg = widget()->count(); @@ -122,7 +122,7 @@ void PListBox::messageHandler(int fd, PukeMessage *pm) } break; case PUKE_LISTBOX_SET_SCROLLBAR: - widget()->setVScrollBarMode( (bool) pm->iArg ? QListBox::AlwaysOn : QListBox::AlwaysOff ); + widget()->setVScrollBarMode( (bool) pm->iArg ? TQListBox::AlwaysOn : TQListBox::AlwaysOff ); pmRet.iCommand = PUKE_LISTBOX_SET_SCROLLBAR_ACK; pmRet.iWinId = pm->iWinId; pmRet.iArg = 0; @@ -130,7 +130,7 @@ void PListBox::messageHandler(int fd, PukeMessage *pm) emit outputMessage(fd, &pmRet); break; case PUKE_LISTBOX_SET_AUTO_SCROLLBAR: - widget()->setVScrollBarMode( (bool) pm->iArg ? QListBox::Auto : QListBox::AlwaysOff ); + widget()->setVScrollBarMode( (bool) pm->iArg ? TQListBox::Auto : TQListBox::AlwaysOff ); pmRet.iCommand = PUKE_LISTBOX_SET_AUTO_SCROLLBAR_ACK; pmRet.iWinId = pm->iWinId; pmRet.iArg = 0; @@ -150,27 +150,27 @@ void PListBox::messageHandler(int fd, PukeMessage *pm) } } -void PListBox::setWidget(QObject *_lb) +void PListBox::setWidget(TQObject *_lb) { - if(_lb != 0 && _lb->inherits("QListBox") == FALSE) + if(_lb != 0 && _lb->inherits("TQListBox") == FALSE) { errorInvalidSet(_lb); return; } - lb = (QListBox *) _lb; + lb = (TQListBox *) _lb; if(lb != 0){ - connect(lb, SIGNAL(highlighted(int)), - this, SLOT(highlighted(int))); - connect(lb, SIGNAL(selected(int)), - this, SLOT(selected(int))); + connect(lb, TQT_SIGNAL(highlighted(int)), + this, TQT_SLOT(highlighted(int))); + connect(lb, TQT_SIGNAL(selected(int)), + this, TQT_SLOT(selected(int))); } PFrame::setWidget(lb); } -QListBox *PListBox::widget() +TQListBox *PListBox::widget() { return lb; } diff --git a/ksirc/puke/plistbox.h b/ksirc/puke/plistbox.h index cad454a8..c7683b22 100644 --- a/ksirc/puke/plistbox.h +++ b/ksirc/puke/plistbox.h @@ -3,7 +3,7 @@ class PListBox; -#include +#include #include "pmessage.h" #include "ptablevw.h" #include "controller.h" @@ -19,8 +19,8 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_lb); - virtual QListBox *widget(); + virtual void setWidget(TQObject *_lb); + virtual TQListBox *widget(); public slots: void highlighted(int); @@ -30,7 +30,7 @@ protected: bool checkWidget(); private: - QListBox *lb; + TQListBox *lb; }; diff --git a/ksirc/puke/pmenudta.cpp b/ksirc/puke/pmenudta.cpp index 30b375fc..576ebc39 100644 --- a/ksirc/puke/pmenudta.cpp +++ b/ksirc/puke/pmenudta.cpp @@ -1,14 +1,14 @@ #include "pmenudta.h" #include "pobject.h" -#include +#include PMenuData::PMenuData(PObject *_child) : PObject() { child = _child; - connect(this, SIGNAL(outputMessage(int, PukeMessage*)), - child, SIGNAL(outputMessage(int, PukeMessage*))); + connect(this, TQT_SIGNAL(outputMessage(int, PukeMessage*)), + child, TQT_SIGNAL(outputMessage(int, PukeMessage*))); } PMenuData::~PMenuData() @@ -28,7 +28,7 @@ bool PMenuData::menuMessageHandler(int fd, PukeMessage *pm) switch(pm->iCommand){ case PUKE_MENUDATA_INSERT_TEXT: { - QPopupMenu *widget = (QPopupMenu *) child->widget(); + TQPopupMenu *widget = (TQPopupMenu *) child->widget(); id = widget->insertItem(pm->cArg); if(pm->iArg > 0){ widget->setAccel(pm->iArg, id); @@ -43,8 +43,8 @@ bool PMenuData::menuMessageHandler(int fd, PukeMessage *pm) } case PUKE_MENUDATA_INSERT_PIXMAP: { - QPopupMenu *widget = (QPopupMenu *) child->widget(); - id = widget->insertItem(QPixmap(pm->cArg)); + TQPopupMenu *widget = (TQPopupMenu *) child->widget(); + id = widget->insertItem(TQPixmap(pm->cArg)); if(pm->iArg > 0){ widget->setAccel(pm->iArg, id); } @@ -58,7 +58,7 @@ bool PMenuData::menuMessageHandler(int fd, PukeMessage *pm) } case PUKE_MENUDATA_REMOVE_ITEM: { - QPopupMenu *widget = (QPopupMenu *) child->widget(); + TQPopupMenu *widget = (TQPopupMenu *) child->widget(); widget->removeItem(pm->iArg); pmRet.iCommand = PUKE_MENUDATA_REMOVE_ITEM_ACK; diff --git a/ksirc/puke/pmenudta.h b/ksirc/puke/pmenudta.h index 0c3bfc6a..03227134 100644 --- a/ksirc/puke/pmenudta.h +++ b/ksirc/puke/pmenudta.h @@ -3,8 +3,8 @@ class PMenuData; -#include -#include +#include +#include #include "pmessage.h" #include "pframe.h" #include "pobject.h" @@ -18,17 +18,17 @@ class PMenuData; class PMenuDataHelper : public QMenuData { public: - PMenuDataHelper(QMenuData &qmd) { - memcpy(this, &qmd, sizeof(QMenuData)); + PMenuDataHelper(TQMenuData &qmd) { + memcpy(this, &qmd, sizeof(TQMenuData)); } int active() { - return QMenuData::actItem; + return TQMenuData::actItem; } int actItem; }; /** - * We're subclased off QMenuData so we can access it's internal proteted vars + * We're subclased off TQMenuData so we can access it's internal proteted vars * We do not initialize NOR create it!!!! */ @@ -42,12 +42,12 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); virtual bool menuMessageHandler(int fd, PukeMessage *pm); -// virtual void setWidget(QMenuData *_qmd); - // virtual QMenuData *widget(); +// virtual void setWidget(TQMenuData *_qmd); + // virtual TQMenuData *widget(); virtual int activeItem() { - return PMenuDataHelper(*((QMenuData *) child->widget())).active(); + return PMenuDataHelper(*((TQMenuData *) child->widget())).active(); } private: diff --git a/ksirc/puke/pmessage.h b/ksirc/puke/pmessage.h index 5c777b24..a93cd154 100644 --- a/ksirc/puke/pmessage.h +++ b/ksirc/puke/pmessage.h @@ -20,16 +20,16 @@ const uint iPukeHeader = 42U; #if 0 class errorInvalidSet { public: - errorInvalidSet(QObject *_from, const char *_to) + errorInvalidSet(TQObject *_from, const char *_to) : __from(_from), __to(_to) { } - QObject *from() { return __from; } + TQObject *from() { return __from; } const char *to() { return __to; } private: - QObject *__from; + TQObject *__from; const char *__to; }; diff --git a/ksirc/puke/pobject.cpp b/ksirc/puke/pobject.cpp index f2481a04..9e46e042 100644 --- a/ksirc/puke/pobject.cpp +++ b/ksirc/puke/pobject.cpp @@ -2,8 +2,8 @@ #include "commands.h" -PObject::PObject(QObject *pobject, const char *name) - : QObject(pobject, name) +PObject::PObject(TQObject *pobject, const char *name) + : TQObject(pobject, name) { // Connect slots as needed obj = 0; @@ -24,11 +24,11 @@ PObject::~PObject() PObject *PObject::createWidget(CreateArgs &ca) { PObject *pw = new PObject(ca.parent); - QObject *o; + TQObject *o; if(ca.parent != 0) - o = new QObject(ca.parent->widget()); + o = new TQObject(ca.parent->widget()); else - o = new QObject(); + o = new TQObject(); pw->setWidget(o); pw->setWidgetId(ca.pwI); pw->setPukeController(ca.pc); @@ -78,23 +78,23 @@ void PObject::messageHandler(int fd, PukeMessage *pm) } } -void PObject::setWidget(QObject *_o) +void PObject::setWidget(TQObject *_o) { // Disconnect everything from the object we where listning too // Just in case it fires something off, we don't want to get it if(widget() != 0){ - disconnect(widget(), SIGNAL(destroyed()), - this, SLOT(swidgetDestroyed())); + disconnect(widget(), TQT_SIGNAL(destroyed()), + this, TQT_SLOT(swidgetDestroyed())); } obj = _o; if(obj != 0){ - connect(widget(), SIGNAL(destroyed()), - this, SLOT(swidgetDestroyed())); + connect(widget(), TQT_SIGNAL(destroyed()), + this, TQT_SLOT(swidgetDestroyed())); } } -QObject *PObject::widget() +TQObject *PObject::widget() { // kdDebug(5008) << "PObject widget called" << endl; return obj; @@ -129,9 +129,9 @@ void PObject::manTerm() { manualTerm = TRUE; } -void PObject::errorInvalidSet(QObject *_w) +void PObject::errorInvalidSet(TQObject *_w) { - m_error = QString("Tried setting a %1 to %2").arg(_w->className()).arg(className()); + m_error = TQString("Tried setting a %1 to %2").arg(_w->className()).arg(className()); m_hasError = true; } #include "pobject.moc" diff --git a/ksirc/puke/pobject.h b/ksirc/puke/pobject.h index 8e5c7c5a..d27fab58 100644 --- a/ksirc/puke/pobject.h +++ b/ksirc/puke/pobject.h @@ -5,7 +5,7 @@ class PObject; class PukeController; class CreateArgs; -#include +#include #include "pmessage.h" @@ -26,18 +26,18 @@ public: /** * name of the widget which was fetched from kSirc, this has to be set explicitly */ - QObject *fetchedObj; + TQObject *fetchedObj; }; class PObject : public QObject { Q_OBJECT public: - PObject(QObject *parent = 0, const char *name = 0); + PObject(TQObject *parent = 0, const char *name = 0); virtual ~PObject(); /** - * Creates a new QObject and returns a PObject + * Creates a new TQObject and returns a PObject */ static PObject *createWidget(CreateArgs &ca); @@ -50,12 +50,12 @@ class PObject : public QObject /** * Sets the current opbect */ - virtual void setWidget(QObject *w); + virtual void setWidget(TQObject *w); /** * Returns the current object */ - virtual QObject *widget(); + virtual TQObject *widget(); /** * Sets the window id @@ -90,7 +90,7 @@ class PObject : public QObject /** * Returns error description */ - QString error() { + TQString error() { m_hasError = false; return m_error; } @@ -117,16 +117,16 @@ class PObject : public QObject protected: PukeController *controller(); - void errorInvalidSet(QObject *_w); + void errorInvalidSet(TQObject *_w); private: - QObject *obj; + TQObject *obj; PukeController *pController; widgetId wI; bool manualTerm; bool deleteAble; - QString m_error; + TQString m_error; bool m_hasError; }; diff --git a/ksirc/puke/pobjfinder.cpp b/ksirc/puke/pobjfinder.cpp index 0f510ea4..6870e142 100644 --- a/ksirc/puke/pobjfinder.cpp +++ b/ksirc/puke/pobjfinder.cpp @@ -19,8 +19,8 @@ PObjFinder::PObjFinder(PObject *parent) // We don't actually encase a widget since all the ObjFinder interface // is static setWidget(0x0); - connect(controller(), SIGNAL(inserted(QObject *)), - this, SLOT(newObject(QObject *))); + connect(controller(), TQT_SIGNAL(inserted(TQObject *)), + this, TQT_SLOT(newObject(TQObject *))); } PObjFinder::~PObjFinder() @@ -33,8 +33,8 @@ void PObjFinder::messageHandler(int fd, PukeMessage *pm) switch(pm->iCommand){ case PUKE_OBJFINDER_ALLOBJECTS: { - QString qscArg; - QStrList allObj = controller()->allObjects(); + TQString qscArg; + TQStrList allObj = controller()->allObjects(); for(uint i = 0; i <= allObj.count(); i++){ qscArg += allObj.at(i); qscArg += "\n"; @@ -54,7 +54,7 @@ void PObjFinder::messageHandler(int fd, PukeMessage *pm) } } -void PObjFinder::setWidget(QObject *_obj) +void PObjFinder::setWidget(TQObject *_obj) { PObject::setWidget(_obj); } @@ -66,8 +66,8 @@ objFinder *PObjFinder::widget() } -void PObjFinder::newObject(QObject *name){ - QString info; +void PObjFinder::newObject(TQObject *name){ + TQString info; info = name->className(); info += "::"; diff --git a/ksirc/puke/pobjfinder.h b/ksirc/puke/pobjfinder.h index 9149aa86..32b4ff86 100644 --- a/ksirc/puke/pobjfinder.h +++ b/ksirc/puke/pobjfinder.h @@ -18,11 +18,11 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_obj = 0); + virtual void setWidget(TQObject *_obj = 0); virtual objFinder *widget(); public slots: - virtual void newObject(QObject *obj); + virtual void newObject(TQObject *obj); protected: bool checkWidget(); diff --git a/ksirc/puke/ppopmenu.cpp b/ksirc/puke/ppopmenu.cpp index 4c07d800..cabf4d94 100644 --- a/ksirc/puke/ppopmenu.cpp +++ b/ksirc/puke/ppopmenu.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include "ppopmenu.h" @@ -7,15 +7,15 @@ PObject * PPopupMenu::createWidget(CreateArgs &ca) { PPopupMenu *pm = new PPopupMenu(ca.parent); - QPopupMenu *qpm; - if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("QPopupMenu") == TRUE){ - qpm= (QPopupMenu *) ca.fetchedObj; + TQPopupMenu *qpm; + if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQPopupMenu") == TRUE){ + qpm= (TQPopupMenu *) ca.fetchedObj; pm->setDeleteAble(FALSE); } else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - qpm = new QPopupMenu((QWidget *) ca.parent->widget()); + qpm = new TQPopupMenu((TQWidget *) ca.parent->widget()); else - qpm = new QPopupMenu(); + qpm = new TQPopupMenu(); pm->setWidget(qpm); pm->setWidgetId(ca.pwI); return pm; @@ -64,7 +64,7 @@ void PPopupMenu::messageHandler(int fd, PukeMessage *pm) return; } - widget()->popup(QCursor::pos(), 0); + widget()->popup(TQCursor::pos(), 0); pmRet.iCommand = - pm->iCommand; pmRet.iWinId = pm->iWinId; @@ -79,24 +79,24 @@ void PPopupMenu::messageHandler(int fd, PukeMessage *pm) } } -void PPopupMenu::setWidget(QObject *_menu) +void PPopupMenu::setWidget(TQObject *_menu) { - if(_menu != 0 && _menu->inherits("QPopupMenu") == FALSE) + if(_menu != 0 && _menu->inherits("TQPopupMenu") == FALSE) { errorInvalidSet(_menu); return; } - menu = (QPopupMenu *) _menu; + menu = (TQPopupMenu *) _menu; if(menu != 0x0){ - connect(menu, SIGNAL(activated(int)), - this, SLOT(got_activated(int))); + connect(menu, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(got_activated(int))); } PFrame::setWidget(menu); } -QPopupMenu *PPopupMenu::widget() +TQPopupMenu *PPopupMenu::widget() { return menu; } diff --git a/ksirc/puke/ppopmenu.h b/ksirc/puke/ppopmenu.h index 9044b935..4f5af16e 100644 --- a/ksirc/puke/ppopmenu.h +++ b/ksirc/puke/ppopmenu.h @@ -3,7 +3,7 @@ class PPopupMenu; -#include +#include #include "pobject.h" #include "pmessage.h" @@ -21,14 +21,14 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_menu); - virtual QPopupMenu *widget(); + virtual void setWidget(TQObject *_menu); + virtual TQPopupMenu *widget(); protected slots: void got_activated ( int itemId ); private: - QPopupMenu *menu; + TQPopupMenu *menu; PMenuData *pmd; }; diff --git a/ksirc/puke/pprogress.cpp b/ksirc/puke/pprogress.cpp index 75c7fa4b..09ed39d2 100644 --- a/ksirc/puke/pprogress.cpp +++ b/ksirc/puke/pprogress.cpp @@ -11,7 +11,7 @@ PProgress::createWidget(CreateArgs &ca) PProgress *pw = new PProgress(ca.parent); KSProgress *ksp; if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - ksp = new KSProgress((QWidget *) ca.parent->widget()); + ksp = new KSProgress((TQWidget *) ca.parent->widget()); else ksp = new KSProgress(); pw->setWidget(ksp); @@ -66,7 +66,7 @@ void PProgress::messageHandler(int fd, PukeMessage *pm) break; } case PUKE_KSPROGRESS_SET_TOPTEXT: - widget()->setTopText(QString(pm->cArg)); + widget()->setTopText(TQString(pm->cArg)); pmRet.iCommand = PUKE_KSPROGRESS_SET_TOPTEXT; pmRet.iWinId = pm->iWinId; pmRet.iArg = 0; @@ -74,7 +74,7 @@ void PProgress::messageHandler(int fd, PukeMessage *pm) emit outputMessage(fd, &pmRet); break; case PUKE_KSPROGRESS_SET_BOTTEXT: - widget()->setBotText(QString(pm->cArg)); + widget()->setBotText(TQString(pm->cArg)); pmRet.iCommand = PUKE_KSPROGRESS_SET_BOTTEXT; pmRet.iWinId = pm->iWinId; pmRet.iArg = 0; @@ -104,7 +104,7 @@ void PProgress::cancelPressed(){ emit outputMessage(widgetIden().fd, &pmRet); } -void PProgress::setWidget(QObject *_f) +void PProgress::setWidget(TQObject *_f) { // kdDebug(5008) << "PProgress setWidget called" << endl; if(_f != 0 && _f->inherits("KSProgress") == FALSE) @@ -115,8 +115,8 @@ void PProgress::setWidget(QObject *_f) ksp = (KSProgress *) _f; if(widget() != 0){ - connect(widget(), SIGNAL(cancel()), - this, SLOT(cancelPressed())); + connect(widget(), TQT_SIGNAL(cancel()), + this, TQT_SLOT(cancelPressed())); } PWidget::setWidget(ksp); diff --git a/ksirc/puke/pprogress.h b/ksirc/puke/pprogress.h index f81fd976..8542abab 100644 --- a/ksirc/puke/pprogress.h +++ b/ksirc/puke/pprogress.h @@ -19,7 +19,7 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_f); + virtual void setWidget(TQObject *_f); virtual KSProgress *widget(); protected slots: diff --git a/ksirc/puke/ppushbt.cpp b/ksirc/puke/ppushbt.cpp index 48cf6121..346abcd3 100644 --- a/ksirc/puke/ppushbt.cpp +++ b/ksirc/puke/ppushbt.cpp @@ -6,11 +6,11 @@ PObject * PPushButton::createWidget(CreateArgs &ca) { PPushButton *pb = new PPushButton(ca.parent); - QPushButton *qb; + TQPushButton *qb; if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - qb = new QPushButton((QWidget *) ca.parent->widget()); + qb = new TQPushButton((TQWidget *) ca.parent->widget()); else - qb = new QPushButton(0L); + qb = new TQPushButton(0L); pb->setWidget(qb); pb->setWidgetId(ca.pwI); return pb; @@ -43,15 +43,15 @@ void PPushButton::messageHandler(int fd, PukeMessage *pm) } } -void PPushButton::setWidget(QObject *_qb) +void PPushButton::setWidget(TQObject *_qb) { - if(_qb != 0 && _qb->inherits("QPushButton") == FALSE) + if(_qb != 0 && _qb->inherits("TQPushButton") == FALSE) { errorInvalidSet(_qb); return; } - button = (QPushButton *) _qb; + button = (TQPushButton *) _qb; if(_qb != 0){ } PButton::setWidget(_qb); @@ -59,7 +59,7 @@ void PPushButton::setWidget(QObject *_qb) } -QPushButton *PPushButton::widget() +TQPushButton *PPushButton::widget() { return button; } diff --git a/ksirc/puke/ppushbt.h b/ksirc/puke/ppushbt.h index 87336679..fd624a24 100644 --- a/ksirc/puke/ppushbt.h +++ b/ksirc/puke/ppushbt.h @@ -3,7 +3,7 @@ class PPushButton; -#include +#include #include "pmessage.h" #include "pbutton.h" #include "pobject.h" @@ -20,13 +20,13 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_b = 0); - virtual QPushButton *widget(); + virtual void setWidget(TQObject *_b = 0); + virtual TQPushButton *widget(); public slots: private: - QPushButton *button; + TQPushButton *button; }; diff --git a/ksirc/puke/ptabdialog.cpp b/ksirc/puke/ptabdialog.cpp index b0e3ba2c..4099aa0a 100644 --- a/ksirc/puke/ptabdialog.cpp +++ b/ksirc/puke/ptabdialog.cpp @@ -9,24 +9,24 @@ PObject * PTabDialog::createWidget(CreateArgs &ca) { PTabDialog *ptd = new PTabDialog(ca.parent); - QTabDialog *qtd; + TQTabDialog *qtd; // Retreive the border and direction information out of the // carg string - if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("QTabDialog") == TRUE){ - qtd = (QTabDialog *) ca.fetchedObj; + if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQTabDialog") == TRUE){ + qtd = (TQTabDialog *) ca.fetchedObj; ptd->setDeleteAble(FALSE); } else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - qtd = new QTabDialog((QWidget *) ca.parent->widget()); + qtd = new TQTabDialog((TQWidget *) ca.parent->widget()); else - qtd = new QTabDialog(); + qtd = new TQTabDialog(); ptd->setWidget(qtd); ptd->setWidgetId(ca.pwI); ptd->setPukeController(ca.pc); return ptd; } -PTabDialog::PTabDialog(QObject *) +PTabDialog::PTabDialog(TQObject *) : PWidget() { // Connect slots as needed @@ -76,22 +76,22 @@ void PTabDialog::messageHandler(int fd, PukeMessage *pm) } -void PTabDialog::setWidget(QObject *tb) +void PTabDialog::setWidget(TQObject *tb) { - if(tb != 0 && tb->inherits("QTabDialog") == FALSE) + if(tb != 0 && tb->inherits("TQTabDialog") == FALSE) { errorInvalidSet(tb); return; } - tab = (QTabDialog *) tb; + tab = (TQTabDialog *) tb; if(tab != 0){ } PObject::setWidget(tb); } -QTabDialog *PTabDialog::widget() +TQTabDialog *PTabDialog::widget() { // kdDebug(5008) << "PObject widget called" << endl; return tab; diff --git a/ksirc/puke/ptabdialog.h b/ksirc/puke/ptabdialog.h index 6e669074..17132301 100644 --- a/ksirc/puke/ptabdialog.h +++ b/ksirc/puke/ptabdialog.h @@ -3,7 +3,7 @@ class PTabDialog; -#include +#include #include "pmessage.h" #include "pwidget.h" @@ -13,7 +13,7 @@ class PTabDialog : public PWidget public: static PObject *createWidget(CreateArgs &ca); - PTabDialog(QObject *parent = 0); + PTabDialog(TQObject *parent = 0); virtual ~PTabDialog(); /** @@ -25,16 +25,16 @@ public: /** * Sets the current opbect */ - virtual void setWidget(QObject *tb); + virtual void setWidget(TQObject *tb); /** * Returns the current object */ - virtual QTabDialog *widget(); + virtual TQTabDialog *widget(); private: - QTabDialog *tab; + TQTabDialog *tab; }; diff --git a/ksirc/puke/ptablevw.cpp b/ksirc/puke/ptablevw.cpp index 1dba614b..7c744ac9 100644 --- a/ksirc/puke/ptablevw.cpp +++ b/ksirc/puke/ptablevw.cpp @@ -50,15 +50,15 @@ void PTableView::messageHandler(int fd, PukeMessage *pm) } } -void PTableView::setWidget(QObject *_tbv) +void PTableView::setWidget(TQObject *_tbv) { - if(_tbv != 0 && _tbv->inherits("QGridView") == FALSE) + if(_tbv != 0 && _tbv->inherits("TQGridView") == FALSE) { errorInvalidSet(_tbv); return; } - tbl = (QGridView *) _tbv; + tbl = (TQGridView *) _tbv; if(tbl != 0){ } PFrame::setWidget(_tbv); @@ -66,7 +66,7 @@ void PTableView::setWidget(QObject *_tbv) } -QGridView *PTableView::widget() +TQGridView *PTableView::widget() { return tbl; } diff --git a/ksirc/puke/ptablevw.h b/ksirc/puke/ptablevw.h index 33ba4015..c1043a4b 100644 --- a/ksirc/puke/ptablevw.h +++ b/ksirc/puke/ptablevw.h @@ -3,7 +3,7 @@ class PTableView; -#include +#include #include "pmessage.h" #include "pframe.h" @@ -21,13 +21,13 @@ public: virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *_tbl); - virtual QGridView *widget(); + virtual void setWidget(TQObject *_tbl); + virtual TQGridView *widget(); public slots: private: - QGridView *tbl; + TQGridView *tbl; }; #endif diff --git a/ksirc/puke/pwidget.cpp b/ksirc/puke/pwidget.cpp index d254832b..9ce99a2b 100644 --- a/ksirc/puke/pwidget.cpp +++ b/ksirc/puke/pwidget.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include PWidget::PWidget(PObject *) : PObject() @@ -54,15 +54,15 @@ PWidget::~PWidget() PObject *PWidget::createWidget(CreateArgs &ca) { PWidget *pw = new PWidget(); - QWidget *tw; - if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("QWidget") == TRUE){ - tw = (QWidget *) ca.fetchedObj; + TQWidget *tw; + if(ca.fetchedObj != 0 && ca.fetchedObj->inherits("TQWidget") == TRUE){ + tw = (TQWidget *) ca.fetchedObj; pw->setDeleteAble(FALSE); } else if(ca.parent != 0 && ca.parent->widget()->isWidgetType() == TRUE) - tw = new QWidget((QWidget *) ca.parent->widget()); + tw = new TQWidget((TQWidget *) ca.parent->widget()); else - tw = new QWidget(); + tw = new TQWidget(); pw->setWidget(tw); pw->setWidgetId(ca.pwI); pw->setPukeController(ca.pc); @@ -175,7 +175,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm) { pmRet.cArg = new char[15]; pmRet.iTextSize = 15; - QColor back = widget()->backgroundColor(); + TQColor back = widget()->backgroundColor(); sprintf(pmRet.cArg, "%d,%d,%d", back.red(), back.green(), back.blue()); pmRet.iCommand = -pm->iCommand; @@ -186,7 +186,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm) break; } case PUKE_WIDGET_SET_BACKGROUND_PIXMAP: - widget()->setBackgroundPixmap(QPixmap(pm->cArg)); + widget()->setBackgroundPixmap(TQPixmap(pm->cArg)); pmRet.iCommand = -pm->iCommand; pmRet.iWinId = pm->iWinId; @@ -195,7 +195,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm) emit outputMessage(fd, &pmRet); break; case PUKE_WIDGET_SET_BACKGROUND_MODE: - widget()->setBackgroundMode((QWidget::BackgroundMode) pm->iArg); + widget()->setBackgroundMode((TQWidget::BackgroundMode) pm->iArg); pmRet.iCommand = -pm->iCommand; pmRet.iWinId = pm->iWinId; @@ -208,15 +208,15 @@ void PWidget::messageHandler(int fd, PukeMessage *pm) { int *pos; pos = (int *) pm->cArg; - QColor bg(pos[0], pos[1], pos[2]); - QColorGroup cg = QColorGroup(widget()->colorGroup().foreground(), + TQColor bg(pos[0], pos[1], pos[2]); + TQColorGroup cg = TQColorGroup(widget()->colorGroup().foreground(), bg, widget()->colorGroup().light(), widget()->colorGroup().dark(), widget()->colorGroup().mid(), widget()->colorGroup().text(), bg); - widget()->setPalette(QPalette(cg,cg,cg)); + widget()->setPalette(TQPalette(cg,cg,cg)); pmRet.iCommand = -pm->iCommand; pmRet.iWinId = pm->iWinId; @@ -236,7 +236,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm) break; case PUKE_WIDGET_RECREATE: { - QWidget *nparent = 0x0; + TQWidget *nparent = 0x0; if(pm->iArg != 0x0){ widgetId wiWidget; wiWidget.fd = fd; @@ -250,7 +250,7 @@ void PWidget::messageHandler(int fd, PukeMessage *pm) qWarning("Recreate: %d %d %d", point_show[0], point_show[1], point_show[3]); - widget()->reparent(nparent, (WFlags) 0, QPoint(point_show[0], point_show[1]), point_show[3]); + widget()->reparent(nparent, (WFlags) 0, TQPoint(point_show[0], point_show[1]), point_show[3]); pmRet.iCommand = PUKE_WIDGET_RECREATE_ACK; pmRet.iWinId = pm->iWinId; @@ -264,29 +264,29 @@ void PWidget::messageHandler(int fd, PukeMessage *pm) } } -void PWidget::setWidget(QObject *_w) +void PWidget::setWidget(TQObject *_w) { - if(_w != 0 && _w->inherits("QWidget") == FALSE) + if(_w != 0 && _w->inherits("TQWidget") == FALSE) { errorInvalidSet(_w); return; } - w = (QWidget *) _w; + w = (TQWidget *) _w; if(w != 0){ widget()->installEventFilter(this); } PObject::setWidget(_w); } -QWidget *PWidget::widget() +TQWidget *PWidget::widget() { // kdDebug(5008) << "PWidget widget called" << endl; return w; } // PWidget specific -bool PWidget::eventFilter(QObject *o, QEvent *e) +bool PWidget::eventFilter(TQObject *o, TQEvent *e) { if(e->type() < 20 && e->type() >= 0){ (this->*(eventList[e->type()]))(o,e); @@ -307,7 +307,7 @@ bool PWidget::eventFilter(QObject *o, QEvent *e) return false; } -void PWidget::eventNone(QObject *, QEvent *e) +void PWidget::eventNone(TQObject *, TQEvent *e) { PukeMessage pm; widgetId wI; @@ -324,12 +324,12 @@ void PWidget::eventNone(QObject *, QEvent *e) } -void PWidget::eventTimer(QObject *, QEvent *e) +void PWidget::eventTimer(TQObject *, TQEvent *e) { PukeMessage pm; widgetId wI; - QTimerEvent *et = (QTimerEvent *)(e); + TQTimerEvent *et = (TQTimerEvent *)(e); wI = widgetIden(); pm.iCommand = PUKE_WIDGET_EVENT_TIMER; @@ -341,12 +341,12 @@ void PWidget::eventTimer(QObject *, QEvent *e) } -void PWidget::eventMouse(QObject *, QEvent *e) +void PWidget::eventMouse(TQObject *, TQEvent *e) { PukeMessage pm; widgetId wI; - QMouseEvent *me = (QMouseEvent *)(e); + TQMouseEvent *me = (TQMouseEvent *)(e); wI = widgetIden(); pm.iCommand = - e->type() - 1020; // 1020 offset for events @@ -368,12 +368,12 @@ void PWidget::eventMouse(QObject *, QEvent *e) } -void PWidget::eventKey(QObject *, QEvent *e) +void PWidget::eventKey(TQObject *, TQEvent *e) { PukeMessage pm; widgetId wI; - QKeyEvent *ke = (QKeyEvent *)(e); + TQKeyEvent *ke = (TQKeyEvent *)(e); wI = widgetIden(); pm.iCommand = - e->type() - 1020; // 1020 offset for events @@ -394,14 +394,14 @@ void PWidget::eventKey(QObject *, QEvent *e) } -void PWidget::eventFocus(QObject *, QEvent *e) +void PWidget::eventFocus(TQObject *, TQEvent *e) { PukeMessage pm; widgetId wI; // kdDebug(5008) << "PWidget: eventFocus" << endl; - QFocusEvent *fe = (QFocusEvent *)(e); + TQFocusEvent *fe = (TQFocusEvent *)(e); wI = widgetIden(); pm.iCommand = - e->type() - 1020; // 1020 offset for events @@ -418,7 +418,7 @@ void PWidget::eventFocus(QObject *, QEvent *e) delete[] pm.cArg; } -void PWidget::eventPaint(QObject *, QEvent *e) +void PWidget::eventPaint(TQObject *, TQEvent *e) { PukeMessage pm; widgetId wI; @@ -433,12 +433,12 @@ void PWidget::eventPaint(QObject *, QEvent *e) } -void PWidget::eventMove(QObject *, QEvent *e) +void PWidget::eventMove(TQObject *, TQEvent *e) { PukeMessage pm; widgetId wI; - QMoveEvent *me = (QMoveEvent *)(e); + TQMoveEvent *me = (TQMoveEvent *)(e); wI = widgetIden(); pm.iCommand = - e->type() - 1020; // 1020 offset for events @@ -460,12 +460,12 @@ void PWidget::eventMove(QObject *, QEvent *e) } -void PWidget::eventResize(QObject *, QEvent *e) +void PWidget::eventResize(TQObject *, TQEvent *e) { PukeMessage pm; widgetId wI; - QResizeEvent *re = (QResizeEvent *)(e); + TQResizeEvent *re = (TQResizeEvent *)(e); wI = widgetIden(); pm.iCommand = - e->type() - 1020; // 1020 offset for events diff --git a/ksirc/puke/pwidget.h b/ksirc/puke/pwidget.h index f7f748fb..68853e63 100644 --- a/ksirc/puke/pwidget.h +++ b/ksirc/puke/pwidget.h @@ -3,8 +3,8 @@ class PWidget; -#include -#include +#include +#include #include "pobject.h" #include "pmessage.h" @@ -20,25 +20,25 @@ class PWidget : public PObject virtual void messageHandler(int fd, PukeMessage *pm); - virtual void setWidget(QObject *w = 0x0); - virtual QWidget *widget(); + virtual void setWidget(TQObject *w = 0x0); + virtual TQWidget *widget(); protected: - bool eventFilter(QObject *o, QEvent *e); + bool eventFilter(TQObject *o, TQEvent *e); private: - QWidget *w; - - void (PWidget::*eventList[20])(QObject *, QEvent *); - - void eventNone(QObject *, QEvent *); - void eventTimer(QObject *, QEvent *); - void eventMouse(QObject *, QEvent *); - void eventKey(QObject *, QEvent *); - void eventFocus(QObject *, QEvent *); - void eventPaint(QObject *, QEvent *); - void eventMove(QObject *, QEvent *); - void eventResize(QObject *, QEvent *); + TQWidget *w; + + void (PWidget::*eventList[20])(TQObject *, TQEvent *); + + void eventNone(TQObject *, TQEvent *); + void eventTimer(TQObject *, TQEvent *); + void eventMouse(TQObject *, TQEvent *); + void eventKey(TQObject *, TQEvent *); + void eventFocus(TQObject *, TQEvent *); + void eventPaint(TQObject *, TQEvent *); + void eventMove(TQObject *, TQEvent *); + void eventResize(TQObject *, TQEvent *); }; diff --git a/ksirc/servercontroller.cpp b/ksirc/servercontroller.cpp index 0b03d1ab..0e7892b9 100644 --- a/ksirc/servercontroller.cpp +++ b/ksirc/servercontroller.cpp @@ -13,14 +13,14 @@ new_connection(): Creates popup asking for new connection - new_ksircprocess(QString): + new_ksircprocess(TQString): Args: - QString: new server name or IP to connect to. + TQString: new server name or IP to connect to. Action: Creates a new sirc process and window !default connected to the server. Does nothing if a server connection already exists. - add_toplevel(QString parent, QString child): + add_toplevel(TQString parent, TQString child): Args: parent: the server name that the new channel is being joined on child: the new channel name @@ -28,7 +28,7 @@ Adds "child" to the list of joined channles in the main window. Always call this on new window creation! - delete_toplevel(QString parent, QString child): + delete_toplevel(TQString parent, TQString child): Args: parent: the server name of which channel is closing child: the channle that is closing. IFF Emtpy, parent is @@ -40,7 +40,7 @@ new_channel: Creates popup asking for new channel name - new_toplevel(QString str): + new_toplevel(TQString str): Args: str: name of the new channel to be created Action: @@ -48,7 +48,7 @@ list and join the requested channel. Does nothing if nothing is selected in the tree list. - recvChangeChanel(QString parent, QString old, QString new): + recvChangeChanel(TQString parent, TQString old, TQString new): Args: parent: parent server connection old: the old name for the window @@ -78,8 +78,8 @@ #include #include "objFinder.h" -#include -#include +#include +#include #include #include @@ -98,7 +98,7 @@ #include #include -#include +#include #include "displayMgrSDI.h" #include "displayMgrMDI.h" @@ -116,7 +116,7 @@ DisplayMgr *displayMgr; servercontroller *servercontroller::s_self = 0; -servercontroller::servercontroller( QWidget*, const char* name ) +servercontroller::servercontroller( TQWidget*, const char* name ) : KMainWindow( 0, name ) { we_are_exiting = false; @@ -139,43 +139,43 @@ servercontroller::servercontroller( QWidget*, const char* name ) break; } - sci = new scInside(this, QCString(name) + "_mainview"); + sci = new scInside(this, TQCString(name) + "_mainview"); setCentralWidget(sci); - sci->setFrameStyle(QFrame::Box | QFrame::Raised); + sci->setFrameStyle(TQFrame::Box | TQFrame::Raised); ConnectionTree = sci->ConnectionTree; - connect(ConnectionTree, SIGNAL(clicked( QListViewItem * )), - this, SLOT(WindowSelected(QListViewItem *))); + connect(ConnectionTree, TQT_SIGNAL(clicked( TQListViewItem * )), + this, TQT_SLOT(WindowSelected(TQListViewItem *))); setFrameBorderWidth(5); - QPopupMenu *file = new QPopupMenu(this, QCString(name) + "_menu_file"); - KStdAction::quit(this, SLOT(endksirc()), actionCollection())->plug(file); + TQPopupMenu *file = new TQPopupMenu(this, TQCString(name) + "_menu_file"); + KStdAction::quit(this, TQT_SLOT(endksirc()), actionCollection())->plug(file); #ifndef NDEBUG - file->insertItem(i18n("Dump Object Tree"), this, SLOT(dump_obj())); - file->insertItem(i18n("Server Debug Window"), this, SLOT(server_debug())); + file->insertItem(i18n("Dump Object Tree"), this, TQT_SLOT(dump_obj())); + file->insertItem(i18n("Server Debug Window"), this, TQT_SLOT(server_debug())); #endif MenuBar->insertItem(i18n("&File"), file); - connections = new QPopupMenu(this, QCString(name) + "_menu_connections"); + connections = new TQPopupMenu(this, TQCString(name) + "_menu_connections"); - server_id = connections->insertItem(i18n("&New Server..."), this, SLOT(new_connection()), Key_F2 ); - join_id = connections->insertItem(i18n("&Join Channel..."), this, SLOT(new_channel()), Key_F3 ); + server_id = connections->insertItem(i18n("&New Server..."), this, TQT_SLOT(new_connection()), Key_F2 ); + join_id = connections->insertItem(i18n("&Join Channel..."), this, TQT_SLOT(new_channel()), Key_F3 ); connections->insertSeparator(); - connections->insertItem(i18n("&Do Autoconnect..."), this, SLOT(start_autoconnect_check())); + connections->insertItem(i18n("&Do Autoconnect..."), this, TQT_SLOT(start_autoconnect_check())); connections->setItemEnabled(join_id, FALSE); MenuBar->insertItem(i18n("&Connections"), connections); - options = new QPopupMenu(this, QCString(name) + "_menu_options"); + options = new TQPopupMenu(this, TQCString(name) + "_menu_options"); options->setCheckable(TRUE); options->insertItem(SmallIcon( "filter" ), i18n("&Filter Rule Editor..."), - this, SLOT(filter_rule_editor())); + this, TQT_SLOT(filter_rule_editor())); options->insertSeparator(); - KStdAction::configureNotifications(this, SLOT(notification_prefs()), actionCollection())->plug(options); + KStdAction::configureNotifications(this, TQT_SLOT(notification_prefs()), actionCollection())->plug(options); - KStdAction::preferences(this, SLOT(general_prefs()), actionCollection())->plug(options); + KStdAction::preferences(this, TQT_SLOT(general_prefs()), actionCollection())->plug(options); MenuBar->insertItem(i18n("&Settings"), options); @@ -188,7 +188,7 @@ servercontroller::servercontroller( QWidget*, const char* name ) "when in docked mode, since you don't need to click on the " "dock icon."), ALT+CTRL+Key_C, KKey::QtWIN+CTRL+Key_C, this, - SLOT(new_connection())); + TQT_SLOT(new_connection())); open_toplevels = 0; @@ -239,41 +239,41 @@ void servercontroller::checkDocking() void servercontroller::new_connection() { open_ksirc *w = new open_ksirc(); // Create new ksirc popup - connect(w, SIGNAL(open_ksircprocess(KSircServer &)), // connected ok to process - this, SLOT(new_ksircprocess(KSircServer &))); // start + connect(w, TQT_SIGNAL(open_ksircprocess(KSircServer &)), // connected ok to process + this, TQT_SLOT(new_ksircprocess(KSircServer &))); // start w->exec(); // show the sucker! delete w; } void servercontroller::new_ksircprocess(KSircServer &kss) { - QString server_id; + TQString server_id; int id = 1; if(kss.server().isEmpty()) // nothing entered, nothing done return; server_id = kss.server(); while(proc_list[server_id]){ // if it already exists, quit - server_id = QString("%1 %2").arg(kss.server()).arg(id++); + server_id = TQString("%1 %2").arg(kss.server()).arg(id++); } // Insert new base - QListViewItem *rootItem = new QListViewItem( ConnectionTree, server_id ); + TQListViewItem *rootItem = new TQListViewItem( ConnectionTree, server_id ); rootItem->setPixmap( 0, pic_server ); rootItem->setOpen( true ); // We do no_channel here since proc emits the signal in the // constructor, and we can't connect to before then, so we have to // do the dirty work here. - ProcMessage(server_id, ProcCommand::addTopLevel, QString("no_channel")); + ProcMessage(server_id, ProcCommand::addTopLevel, TQString("no_channel")); - KSircProcess *proc = new KSircProcess(server_id, kss, 0, (QString(name()) + "_" + server_id + "_ksp").ascii() ); // Create proc + KSircProcess *proc = new KSircProcess(server_id, kss, 0, (TQString(name()) + "_" + server_id + "_ksp").ascii() ); // Create proc //this->insertChild(proc); // Add it to out inheritance tree so we can retreive child widgets from it. objFinder::insert(proc); proc_list.insert(server_id, proc); // Add proc to hash - connect(proc, SIGNAL(ProcMessage(QString, int, QString)), - this, SLOT(ProcMessage(QString, int, QString))); - connect(this, SIGNAL(ServMessage(QString, int, QString)), - proc, SLOT(ServMessage(QString, int, QString))); + connect(proc, TQT_SIGNAL(ProcMessage(TQString, int, TQString)), + this, TQT_SLOT(ProcMessage(TQString, int, TQString))); + connect(this, TQT_SIGNAL(ServMessage(TQString, int, TQString)), + proc, TQT_SLOT(ServMessage(TQString, int, TQString))); if(!ConnectionTree->currentItem()){ // If nothing's highlighted ConnectionTree->setCurrentItem(rootItem); // highlight it. @@ -286,8 +286,8 @@ void servercontroller::new_ksircprocess(KSircServer &kss) void servercontroller::new_channel() { - QString server; - QListViewItem *citem = ConnectionTree->currentItem(); // get item + TQString server; + TQListViewItem *citem = ConnectionTree->currentItem(); // get item if(citem){ // if it exist, ie something is highlighted, continue if(proc_list[citem->text(0)]){ // If it's a match with a server, ok server = citem->text(0); @@ -303,10 +303,10 @@ void servercontroller::new_channel() if(server.isEmpty()) return; - KSircChannel ci(server, QString::null); + KSircChannel ci(server, TQString::null); NewWindowDialog w(ci); - connect(&w, SIGNAL(openTopLevel(const KSircChannel &)), - this, SLOT(new_toplevel(const KSircChannel &))); + connect(&w, TQT_SIGNAL(openTopLevel(const KSircChannel &)), + this, TQT_SLOT(new_toplevel(const KSircChannel &))); w.exec(); } @@ -330,8 +330,8 @@ void servercontroller::ToggleAutoCreate() void servercontroller::general_prefs() { KSPrefs *kp = new KSPrefs(); - connect(kp, SIGNAL(update(int)), - this, SLOT(configChange())); + connect(kp, TQT_SIGNAL(update(int)), + this, TQT_SLOT(configChange())); kp->resize(550, 450); kp->show(); } @@ -349,9 +349,9 @@ void servercontroller::dump_obj() } void servercontroller::server_debug() { - QListViewItem *citem = ConnectionTree->currentItem(); // get item + TQListViewItem *citem = ConnectionTree->currentItem(); // get item if(citem){ // if it exist, ie something is highlighted, continue - QString server; + TQString server; if(proc_list[citem->text(0)]){ // If it's a match with a server, ok server = citem->text(0); } @@ -373,12 +373,12 @@ void servercontroller::server_debug() void servercontroller::filter_rule_editor() { FilterRuleEditor *fe = new FilterRuleEditor(); - connect(fe, SIGNAL(destroyed()), - this, SLOT(slot_filters_update())); + connect(fe, TQT_SIGNAL(destroyed()), + this, TQT_SLOT(slot_filters_update())); fe->show(); } -void servercontroller::font_update(const QFont &font) +void servercontroller::font_update(const TQFont &font) { ksopts->defaultFont = font; /* configChange(); */ @@ -386,12 +386,12 @@ void servercontroller::font_update(const QFont &font) KConfig *kConfig = kapp->config(); kConfig->setGroup("GlobalOptions"); kConfig->sync(); - QApplication::setFont( font, true, "KSirc::TextView" ); + TQApplication::setFont( font, true, "KSirc::TextView" ); } void servercontroller::configChange() { - QDictIterator it( proc_list ); + TQDictIterator it( proc_list ); while(it.current()){ it.current()->filters_update(); it.current()->getWindowList()["!all"]->control_message(REREAD_CONFIG, ""); @@ -401,10 +401,10 @@ void servercontroller::configChange() m_kga->updateConnections(); } -void servercontroller::ProcMessage(QString server, int command, QString args) +void servercontroller::ProcMessage(TQString server, int command, TQString args) { - QListViewItem *serverItem = 0L; - QListViewItem *item = ConnectionTree->firstChild(); + TQListViewItem *serverItem = 0L; + TQListViewItem *item = ConnectionTree->firstChild(); while ( item ) { if ( !item->parent() && item->text(0) == server ) { serverItem = item; @@ -428,7 +428,7 @@ void servercontroller::ProcMessage(QString server, int command, QString args) // Args == nick comming on/offline. case ProcCommand::nickOffline: { - QListViewItem *online_item = findChild(serverItem, i18n("Online")); + TQListViewItem *online_item = findChild(serverItem, i18n("Online")); if(online_item){ item = findChild(online_item, args); delete item; @@ -442,9 +442,9 @@ void servercontroller::ProcMessage(QString server, int command, QString args) } case ProcCommand::nickOnline: { - QListViewItem *online_item = findChild(serverItem, i18n("Online")); + TQListViewItem *online_item = findChild(serverItem, i18n("Online")); if(!online_item){ - online_item = new QListViewItem(serverItem, i18n("Online")); + online_item = new TQListViewItem(serverItem, i18n("Online")); online_item->setPixmap( 0, pic_gf ); online_item->setOpen( true ); } @@ -454,7 +454,7 @@ void servercontroller::ProcMessage(QString server, int command, QString args) delete item; } } - item = new QListViewItem(online_item, args); + item = new TQListViewItem(online_item, args); item->setPixmap( 0, pic_run ); if(ksopts->runDocked && ksopts->dockPopups) KPassivePopup::message(i18n("%1 just came online on %2").arg(args).arg(server), dockWidget); @@ -490,7 +490,7 @@ void servercontroller::ProcMessage(QString server, int command, QString args) if(args[0] == '!') args.remove(0, 1); // If the first char is !, it's control, remove it // add a new child item with parent as it's parent - item = new QListViewItem( serverItem, args ); + item = new TQListViewItem( serverItem, args ); item->setPixmap( 0, pic_ppl ); open_toplevels++; @@ -543,7 +543,7 @@ void servercontroller::ProcMessage(QString server, int command, QString args) item = findChild( serverItem, old_s ); delete item; - item = new QListViewItem( serverItem, new_s ); + item = new TQListViewItem( serverItem, new_s ); item->setPixmap( 0, pic_ppl ); delete[] new_s; @@ -578,7 +578,7 @@ void servercontroller::ProcMessage(QString server, int command, QString args) void servercontroller::slot_filters_update() { - emit ServMessage(QString(), ServCommand::updateFilters, QString()); + emit ServMessage(TQString(), ServCommand::updateFilters, TQString()); } void servercontroller::saveGlobalProperties(KConfig *ksc) @@ -589,7 +589,7 @@ void servercontroller::saveGlobalProperties(KConfig *ksc) // Ignore all ! windows - QString group = ksc->group(); + TQString group = ksc->group(); ksc->setGroup( "KSircSession" ); SessionConfigMap::ConstIterator it = m_sessionConfig.begin(); @@ -597,15 +597,15 @@ void servercontroller::saveGlobalProperties(KConfig *ksc) ChannelSessionInfoList infoList = *it; - QStringList channels; - QString port = "6667"; - QStringList desktops; + TQStringList channels; + TQString port = "6667"; + TQStringList desktops; for ( ChannelSessionInfoList::ConstIterator sessionInfoIt = infoList.begin(); sessionInfoIt != infoList.end(); ++sessionInfoIt ) { channels << ( *sessionInfoIt ).name; port = ( *sessionInfoIt ).port; - desktops << QString::number( ( *sessionInfoIt ).desktop ); + desktops << TQString::number( ( *sessionInfoIt ).desktop ); } KConfigGroup( ksc, "KSircSession" ).writeEntry( it.key(), channels ); @@ -621,7 +621,7 @@ void servercontroller::saveGlobalProperties(KConfig *ksc) void servercontroller::readGlobalProperties(KConfig *ksc) { - QString group = ksc->group(); + TQString group = ksc->group(); // ksc == K Session Config @@ -631,22 +631,22 @@ void servercontroller::readGlobalProperties(KConfig *ksc) // commented in for testing... ksc->setGroup( "KSircSession" ); - QMap keyMap = ksc->entryMap( ksc->group() ); - QMap::Iterator it = keyMap.begin(); + TQMap keyMap = ksc->entryMap( ksc->group() ); + TQMap::Iterator it = keyMap.begin(); while(it != keyMap.end()) { - QString server = it.key(); - QString port = KConfigGroup( ksc, "KSircSessionPort" ).readEntry( server ); + TQString server = it.key(); + TQString port = KConfigGroup( ksc, "KSircSessionPort" ).readEntry( server ); // debug("%s", it.key().latin1()); KSircServer kss(server, port); new_ksircprocess( kss ); // sets up proc_list - QStringList channels = ksc->readListEntry( server ); + TQStringList channels = ksc->readListEntry( server ); - QStringList desktops = KConfigGroup( ksc, "KSircSessionDesktopNumbers" ).readListEntry( server ); + TQStringList desktops = KConfigGroup( ksc, "KSircSessionDesktopNumbers" ).readListEntry( server ); for(uint i = 0; i < channels.count(); i++){ - QString channel = channels[ i ]; + TQString channel = channels[ i ]; proc_list[ server ]->new_toplevel( KSircChannel(server, channel), true ); @@ -654,7 +654,7 @@ void servercontroller::readGlobalProperties(KConfig *ksc) if ( !topLevel || !topLevel->isTopLevel() ) continue; - QStringList::ConstIterator desktopNumberIt = desktops.at( i ); + TQStringList::ConstIterator desktopNumberIt = desktops.at( i ); if ( desktopNumberIt == desktops.end() ) continue; @@ -669,7 +669,7 @@ void servercontroller::readGlobalProperties(KConfig *ksc) ++it; } - QRect geom; + TQRect geom; // ksc->setGroup("ServerController"); // bool docked = ksc->readBoolEntry("Docked", FALSE); @@ -687,11 +687,11 @@ void servercontroller::readGlobalProperties(KConfig *ksc) void servercontroller::saveSessionConfig() { - QDictIterator ksp(proc_list); + TQDictIterator ksp(proc_list); for (; ksp.current(); ++ksp ) { ChannelSessionInfoList channels; - QDictIterator ksm(ksp.current()->getWindowList()); + TQDictIterator ksm(ksp.current()->getWindowList()); for (; ksm.current(); ++ksm ) if(ksm.currentKey()[0] != '!') { // Ignore !ksm's (system created) ChannelSessionInfo sessionInfo; @@ -714,20 +714,20 @@ void servercontroller::saveSessionConfig() } } -void servercontroller::showEvent( QShowEvent *e ) +void servercontroller::showEvent( TQShowEvent *e ) { - QWidget::showEvent( e ); + TQWidget::showEvent( e ); if ( !e->spontaneous() ) saveDockingStatus(); } -void servercontroller::hideEvent( QHideEvent * ) +void servercontroller::hideEvent( TQHideEvent * ) { /* - QWidget::hideEvent( e ); + TQWidget::hideEvent( e ); if ( !e->spontaneous() ) saveDockingStatus(); - if(QWidget::isMinimized()){ + if(TQWidget::isMinimized()){ hide(); KWin::setState(winId(), NET::SkipTaskbar); } @@ -750,27 +750,27 @@ void servercontroller::endksirc(){ exit(0); } -void servercontroller::closeEvent( QCloseEvent *e ) +void servercontroller::closeEvent( TQCloseEvent *e ) { we_are_exiting = true; saveSessionConfig(); KMainWindow::closeEvent( e ); } -void servercontroller::WindowSelected(QListViewItem *item) +void servercontroller::WindowSelected(TQListViewItem *item) { if ( !item ) return; - QListViewItem *parent_server = item->parent(); + TQListViewItem *parent_server = item->parent(); if(!parent_server) return; - QString txt = QString(parent_server->text(0)) + "_" + item->text(0) + "_toplevel"; - QWidget *obj = dynamic_cast( objFinder::find(txt.utf8(), "KSircTopLevel")); + TQString txt = TQString(parent_server->text(0)) + "_" + item->text(0) + "_toplevel"; + TQWidget *obj = dynamic_cast( objFinder::find(txt.utf8(), "KSircTopLevel")); if(obj == 0x0){ - txt =QString(parent_server->text(0)) + "_!" + item->text(0) + "_toplevel"; - obj = dynamic_cast( objFinder::find(txt.utf8(), "KSircTopLevel")); + txt =TQString(parent_server->text(0)) + "_!" + item->text(0) + "_toplevel"; + obj = dynamic_cast( objFinder::find(txt.utf8(), "KSircTopLevel")); } if(obj != 0x0){ @@ -782,14 +782,14 @@ void servercontroller::WindowSelected(QListViewItem *item) } -QListViewItem * servercontroller::findChild( QListViewItem *parent, - const QString& text ) +TQListViewItem * servercontroller::findChild( TQListViewItem *parent, + const TQString& text ) { if ( !parent || parent->childCount() == 0 ) { return 0L; } - QListViewItem *item = parent->firstChild(); + TQListViewItem *item = parent->firstChild(); while ( item ) { if ( item->text(0) == text ) { return item; @@ -800,13 +800,13 @@ QListViewItem * servercontroller::findChild( QListViewItem *parent, return 0L; } -void servercontroller::increaseNotificationCount(const QString& reason, const QString& text) +void servercontroller::increaseNotificationCount(const TQString& reason, const TQString& text) { dockWidget->startBlink(reason, text); m_notificationCount++; } -void servercontroller::decreaseNotificationCount(QString reason) +void servercontroller::decreaseNotificationCount(TQString reason) { m_notificationCount--; if ( m_notificationCount == 0 ) @@ -821,8 +821,8 @@ void servercontroller::decreaseNotificationCount(QString reason) void servercontroller::resetNotification() { m_notificationCount = 0; - dockWidget->stopBlink(QString::null, true); - QDictIterator it( proc_list ); + dockWidget->stopBlink(TQString::null, true); + TQDictIterator it( proc_list ); while(it.current()){ it.current()->filters_update(); it.current()->getWindowList()["!all"]->control_message(RESET_NOTIF, ""); @@ -840,21 +840,21 @@ void servercontroller::do_autoconnect() KConfig *conf = kapp->config(); conf->setGroup("AutoConnect"); - QStringList servers = conf->readListEntry("Servers"); + TQStringList servers = conf->readListEntry("Servers"); servers.sort(); - QStringList::ConstIterator ser = servers.begin(); + TQStringList::ConstIterator ser = servers.begin(); loop = 0; for( ; ser != servers.end(); ser++){ if(loop++ == stime){ stime++; - QString server = *ser; - QString port = "6667"; + TQString server = *ser; + TQString port = "6667"; bool usessl = false; - QString pass = QString::null; + TQString pass = TQString::null; - QRegExp rx("(.+) \\(SSL\\)(.*)"); + TQRegExp rx("(.+) \\(SSL\\)(.*)"); if(rx.search(server) >= 0){ server = rx.cap(1) + rx.cap(3); usessl = true; @@ -880,23 +880,23 @@ void servercontroller::do_autoconnect() ser = servers.begin(); for( ; ser != servers.end(); ser++){ - QStringList channels = conf->readListEntry(*ser); + TQStringList channels = conf->readListEntry(*ser); if(channels.empty() == FALSE){ channels.sort(); - QStringList::ConstIterator chan = channels.begin(); + TQStringList::ConstIterator chan = channels.begin(); for(; chan != channels.end(); chan++){ if(loop++ == ctime){ ctime++; - QString channel = *chan; - QString key = QString::null; - QRegExp crx("(.+) \\(key: (\\S+)\\)"); + TQString channel = *chan; + TQString key = TQString::null; + TQRegExp crx("(.+) \\(key: (\\S+)\\)"); if(crx.search(channel) >= 0){ channel = crx.cap(1); key = crx.cap(2); } - QString server = *ser; + TQString server = *ser; - QRegExp rx("^([^ :]+)"); + TQRegExp rx("^([^ :]+)"); if(rx.search(server) >= 0){ server = rx.cap(1); } @@ -916,8 +916,8 @@ void servercontroller::do_autoconnect() } void servercontroller::start_autoconnect() { - at = new QTimer(this); - connect(at, SIGNAL(timeout()), this, SLOT(do_autoconnect())); + at = new TQTimer(this); + connect(at, TQT_SIGNAL(timeout()), this, TQT_SLOT(do_autoconnect())); at->start(250, FALSE); } @@ -925,36 +925,36 @@ void servercontroller::start_autoconnect_check() { KConfig *conf = kapp->config(); conf->setGroup("AutoConnect"); - QStringList servers = conf->readListEntry("Servers"); + TQStringList servers = conf->readListEntry("Servers"); if(servers.count() == 0){ KSPrefs *kp = new KSPrefs(); - connect(kp, SIGNAL(update(int)), - this, SLOT(configChange())); + connect(kp, TQT_SIGNAL(update(int)), + this, TQT_SLOT(configChange())); kp->resize(550, 450); kp->showPage(7); /* Show auto connect page */ kp->show(); } else { - at = new QTimer(this); - connect(at, SIGNAL(timeout()), this, SLOT(do_autoconnect())); + at = new TQTimer(this); + connect(at, TQT_SIGNAL(timeout()), this, TQT_SLOT(do_autoconnect())); at->start(250, FALSE); } } -scInside::scInside ( QWidget * parent, const char * name, WFlags +scInside::scInside ( TQWidget * parent, const char * name, WFlags f ) - : QFrame(parent, name, f) + : TQFrame(parent, name, f) { - ASConn = new QLabel(i18n("Active server connections:"), this, "servercontroller_label"); - QFont asfont = ASConn->font(); + ASConn = new TQLabel(i18n("Active server connections:"), this, "servercontroller_label"); + TQFont asfont = ASConn->font(); asfont.setBold(TRUE); ASConn->setFont(asfont); ConnectionTree = new KListView(this, "connectiontree"); - ConnectionTree->addColumn(QString::null); + ConnectionTree->addColumn(TQString::null); ConnectionTree->setRootIsDecorated( true ); ConnectionTree->setSorting( 0 ); ConnectionTree->header()->hide(); @@ -966,9 +966,9 @@ scInside::~scInside() delete ConnectionTree; } -void scInside::resizeEvent ( QResizeEvent *e ) +void scInside::resizeEvent ( TQResizeEvent *e ) { - QFrame::resizeEvent(e); + TQFrame::resizeEvent(e); ASConn->setGeometry(10,10, width() - 20, ASConn->fontMetrics().height()+5); ConnectionTree->setGeometry(10, 10 + ASConn->height(), diff --git a/ksirc/servercontroller.h b/ksirc/servercontroller.h index 54d0292c..2f45f3b2 100644 --- a/ksirc/servercontroller.h +++ b/ksirc/servercontroller.h @@ -19,10 +19,10 @@ class dockServerController; class ServMessage; class ProcCommand; -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -69,15 +69,15 @@ class scInside : QFrame Q_OBJECT friend class servercontroller; public: - scInside ( QWidget *parent = 0L, const char * name = 0, WFlags f=0 ); + scInside ( TQWidget *parent = 0L, const char * name = 0, WFlags f=0 ); ~scInside(); protected: - virtual void resizeEvent ( QResizeEvent * ); + virtual void resizeEvent ( TQResizeEvent * ); private: KListView *ConnectionTree; - QLabel *ASConn; + TQLabel *ASConn; }; @@ -87,23 +87,23 @@ class servercontroller : public KMainWindow friend class dockServerController; public: - servercontroller ( QWidget* parent = 0L, const char* name = NULL ); + servercontroller ( TQWidget* parent = 0L, const char* name = NULL ); virtual ~servercontroller(); - const QDict &processes() const { return proc_list; } + const TQDict &processes() const { return proc_list; } static servercontroller *self() { return s_self; } /** * Someone is talking to the user (blue icon), notify him (using the docked icon). */ - void increaseNotificationCount(const QString& reason = QString::null, const QString& text = QString::null); + void increaseNotificationCount(const TQString& reason = TQString::null, const TQString& text = TQString::null); /** * The channel in which the user was talked to, has been read. * -> decrease count of blue icons. */ - void decreaseNotificationCount(QString reason = QString::null); + void decreaseNotificationCount(TQString reason = TQString::null); /** * This resets all notificaiton counts and allows new ones @@ -122,7 +122,7 @@ signals: */ virtual void filters_update(); - void ServMessage(QString server, int command, QString args); + void ServMessage(TQString server, int command, TQString args); public slots: // All slots are described in servercontroll.cpp file @@ -136,12 +136,12 @@ public slots: virtual void new_connection(); /** * Args: - * QString: new server name or IP to connect to. + * TQString: new server name or IP to connect to. * Action: * Creates a new sirc process and window !default connected to the * server. Does nothing if a server connection already exists. */ - // virtual void new_ksircprocess(QString); + // virtual void new_ksircprocess(TQString); virtual void new_ksircprocess(KSircServer &); /** * Creates popup asking for new channel name @@ -172,11 +172,11 @@ public slots: * Opens the dialog that lets the user configure system notifications */ virtual void notification_prefs(); - virtual void font_update(const QFont&); + virtual void font_update(const TQFont&); virtual void filter_rule_editor(); virtual void configChange(); - virtual void ProcMessage(QString server, int command, QString args); + virtual void ProcMessage(TQString server, int command, TQString args); /** * On quit we sync the config to disk and exit */ @@ -191,19 +191,19 @@ public slots: void start_autoconnect_check(); - QListViewItem * findChild( QListViewItem *parent, const QString& text ); + TQListViewItem * findChild( TQListViewItem *parent, const TQString& text ); protected slots: - void WindowSelected(QListViewItem *); + void WindowSelected(TQListViewItem *); void dump_obj(); void server_debug(); protected: - virtual void showEvent( QShowEvent *e ); - virtual void hideEvent( QHideEvent *e ); - virtual void closeEvent( QCloseEvent * ); + virtual void showEvent( TQShowEvent *e ); + virtual void hideEvent( TQHideEvent *e ); + virtual void closeEvent( TQCloseEvent * ); void saveDockingStatus(); void saveGlobalProperties(KConfig *); @@ -223,19 +223,19 @@ private: // Hold a list of all KSircProcess's for access latter. Index by server // name - QDict proc_list; - QPopupMenu *options, *connections; + TQDict proc_list; + TQPopupMenu *options, *connections; int join_id, server_id; KGlobalAccel *m_kga; int open_toplevels; - QPixmap pic_icon; - QPixmap pic_server; - QPixmap pic_gf; - QPixmap pic_run; - QPixmap pic_ppl; + TQPixmap pic_icon; + TQPixmap pic_server; + TQPixmap pic_gf; + TQPixmap pic_run; + TQPixmap pic_ppl; // PukeController *PukeC; @@ -249,18 +249,18 @@ private: { ChannelSessionInfo() : desktop( -1 ) {} - QString name; - QString port; + TQString name; + TQString port; int desktop; }; - typedef QValueList ChannelSessionInfoList; + typedef TQValueList ChannelSessionInfoList; - typedef QMap SessionConfigMap; + typedef TQMap SessionConfigMap; SessionConfigMap m_sessionConfig; static servercontroller *s_self; - QTimer *at; + TQTimer *at; nickColourMaker *m_ncm; }; diff --git a/ksirc/ssfeprompt.cpp b/ksirc/ssfeprompt.cpp index 46e68909..74868c5b 100644 --- a/ksirc/ssfeprompt.cpp +++ b/ksirc/ssfeprompt.cpp @@ -15,8 +15,8 @@ ssfePrompt::ssfePrompt ( - QString prompttext, - QWidget* parent, + TQString prompttext, + TQWidget* parent, const char* name ) : @@ -37,9 +37,9 @@ void ssfePrompt::terminate() done(0); } -QString ssfePrompt::text() +TQString ssfePrompt::text() { - QString text; + TQString text; text = SLine->text(); return text; } @@ -47,8 +47,8 @@ QString ssfePrompt::text() void ssfePrompt::setPassword(bool pass) { if(pass == TRUE) - SLine->setEchoMode(QLineEdit::Password); + SLine->setEchoMode(TQLineEdit::Password); else - SLine->setEchoMode(QLineEdit::Normal); + SLine->setEchoMode(TQLineEdit::Normal); } #include "ssfeprompt.moc" diff --git a/ksirc/ssfeprompt.h b/ksirc/ssfeprompt.h index ff777912..5a239869 100644 --- a/ksirc/ssfeprompt.h +++ b/ksirc/ssfeprompt.h @@ -20,14 +20,14 @@ public: ssfePrompt ( - QString prompttext, - QWidget* parent = NULL, + TQString prompttext, + TQWidget* parent = NULL, const char* name = NULL ); virtual ~ssfePrompt(); - QString text(); + TQString text(); void setPassword(bool); protected slots: diff --git a/ksirc/ssfepromptdata.cpp b/ksirc/ssfepromptdata.cpp index ce1dc368..94e52002 100644 --- a/ksirc/ssfepromptdata.cpp +++ b/ksirc/ssfepromptdata.cpp @@ -20,13 +20,13 @@ ssfepromptdata::ssfepromptdata ( - QWidget* parent, + TQWidget* parent, const char* name ) : Inherited( parent, name, TRUE, 20480 ) { - prompt = new QLabel( this, "Label_1" ); + prompt = new TQLabel( this, "Label_1" ); prompt->setGeometry( 10, 10, 220, 30 ); prompt->setMinimumSize( 10, 10 ); prompt->setMaximumSize( 32767, 32767 ); @@ -34,22 +34,22 @@ ssfepromptdata::ssfepromptdata prompt->setAlignment( 289 ); prompt->setMargin( -1 ); - SLine = new QLineEdit( this, "LineEdit_1" ); + SLine = new TQLineEdit( this, "LineEdit_1" ); SLine->setGeometry( 240, 10, 100, 30 ); SLine->setMinimumSize( 10, 10 ); SLine->setMaximumSize( 32767, 32767 ); - connect( SLine, SIGNAL(returnPressed()), SLOT(terminate()) ); + connect( SLine, TQT_SIGNAL(returnPressed()), TQT_SLOT(terminate()) ); SLine->setText( "" ); SLine->setMaxLength( 32767 ); - SLine->setEchoMode( QLineEdit::Normal ); + SLine->setEchoMode( TQLineEdit::Normal ); SLine->setFrame( TRUE ); - QPushButton* dlgedit_PushButton_1; + TQPushButton* dlgedit_PushButton_1; dlgedit_PushButton_1 = new KPushButton( KStdGuiItem::ok(), this, "PushButton_1" ); dlgedit_PushButton_1->setGeometry( 240, 50, 100, 30 ); dlgedit_PushButton_1->setMinimumSize( 10, 10 ); dlgedit_PushButton_1->setMaximumSize( 32767, 32767 ); - connect( dlgedit_PushButton_1, SIGNAL(clicked()), SLOT(terminate()) ); + connect( dlgedit_PushButton_1, TQT_SIGNAL(clicked()), TQT_SLOT(terminate()) ); dlgedit_PushButton_1->setAutoRepeat( FALSE ); dlgedit_PushButton_1->setAutoDefault( TRUE ); diff --git a/ksirc/ssfepromptdata.h b/ksirc/ssfepromptdata.h index c4b6a4e6..e4b97994 100644 --- a/ksirc/ssfepromptdata.h +++ b/ksirc/ssfepromptdata.h @@ -13,9 +13,9 @@ #ifndef ssfepromptdata_included #define ssfepromptdata_included -#include -#include -#include +#include +#include +#include class ssfepromptdata : public QDialog { @@ -25,7 +25,7 @@ public: ssfepromptdata ( - QWidget* parent = NULL, + TQWidget* parent = NULL, const char* name = NULL ); @@ -39,8 +39,8 @@ protected slots: virtual void terminate(); protected: - QLabel* prompt; - QLineEdit* SLine; + TQLabel* prompt; + TQLineEdit* SLine; }; diff --git a/ksirc/stringparserstate.h b/ksirc/stringparserstate.h index cd9220a4..04fb96ea 100644 --- a/ksirc/stringparserstate.h +++ b/ksirc/stringparserstate.h @@ -11,7 +11,7 @@ public: typedef CharType ValueType; typedef const CharType * ConstIterator; typedef _SizeType SizeType; - typedef QValueList ValueList; + typedef TQValueList ValueList; StringParserState( ConstIterator start, SizeType maxSteps, const ValueList &optionalEndItems = ValueList() ) diff --git a/ksirc/topic.cpp b/ksirc/topic.cpp index 9e0d8f3e..49334f43 100644 --- a/ksirc/topic.cpp +++ b/ksirc/topic.cpp @@ -8,12 +8,12 @@ #include "topic.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -28,27 +28,27 @@ #include "ksparser.h" -KSircTopic::KSircTopic( QWidget *parent, const char *name ) +KSircTopic::KSircTopic( TQWidget *parent, const char *name ) : KActiveLabel( parent, name ) { m_editor = 0; m_doEdit = false; m_height = 0; // setBackgroundColor( colorGroup().light() ); - setFrameStyle( QFrame::Panel | QFrame::Sunken ); - setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); + setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); + setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) ); setTextFormat( RichText ); - setWordWrap(QTextEdit::NoWrap); + setWordWrap(TQTextEdit::NoWrap); doResize(); // setAlignment( alignment() | WordBreak ); } -void KSircTopic::setText( const QString &_text) +void KSircTopic::setText( const TQString &_text) { m_text = _text; /* save a raw copy for us */ - QString text = _text; + TQString text = _text; - QString richText( "" ); + TQString richText( "" ); richText = richText.arg( ksopts->textColor.name() ); text.replace('&', "&"); @@ -64,12 +64,12 @@ void KSircTopic::setText( const QString &_text) // according to UV Kochavi , to prevent output like // 'nick< to catch queries. - QRegExp bidiRe( "^(<\\S+>)(.+)$" ); - text.replace( bidiRe, QString::fromLatin1( "\\1\\2" ) ); - QRegExp bidiRe2( "^(\\[\\S+\\])(.+)$" ); - text.replace( bidiRe2, QString::fromLatin1( "\\1\\2" ) ); - QRegExp bidiRe3( "^(>\\S+<)(.+)$" ); - text.replace( bidiRe3, QString::fromLatin1( "\\1\\2" ) ); + TQRegExp bidiRe( "^(<\\S+>)(.+)$" ); + text.replace( bidiRe, TQString::fromLatin1( "\\1\\2" ) ); + TQRegExp bidiRe2( "^(\\[\\S+\\])(.+)$" ); + text.replace( bidiRe2, TQString::fromLatin1( "\\1\\2" ) ); + TQRegExp bidiRe3( "^(>\\S+<)(.+)$" ); + text.replace( bidiRe3, TQString::fromLatin1( "\\1\\2" ) ); KSParser parser; richText += parser.parse( text ); @@ -82,12 +82,12 @@ void KSircTopic::setText( const QString &_text) } -void KSircTopic::contentsMouseDoubleClickEvent( QMouseEvent * ) +void KSircTopic::contentsMouseDoubleClickEvent( TQMouseEvent * ) { m_doEdit = true; } -void KSircTopic::contentsMouseReleaseEvent( QMouseEvent *e ) +void KSircTopic::contentsMouseReleaseEvent( TQMouseEvent *e ) { if ( m_doEdit ) { m_doEdit = false; @@ -99,12 +99,12 @@ void KSircTopic::contentsMouseReleaseEvent( QMouseEvent *e ) m_editor = new KSircTopicEditor( this ); - connect( m_editor, SIGNAL( returnPressed() ), - this, SLOT( setNewTopic() ) ); - connect( m_editor, SIGNAL( resized() ), - this, SLOT( slotEditResized() ) ); - connect( m_editor, SIGNAL( destroyed() ), - this, SLOT( doResize() ) ); + connect( m_editor, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( setNewTopic() ) ); + connect( m_editor, TQT_SIGNAL( resized() ), + this, TQT_SLOT( slotEditResized() ) ); + connect( m_editor, TQT_SIGNAL( destroyed() ), + this, TQT_SLOT( doResize() ) ); /* * If you don't do this order @@ -116,7 +116,7 @@ void KSircTopic::contentsMouseReleaseEvent( QMouseEvent *e ) m_editor->show(); m_editor->setText( m_text ); - QToolTip::remove(this); + TQToolTip::remove(this); } KActiveLabel::contentsMouseReleaseEvent(e); @@ -124,7 +124,7 @@ void KSircTopic::contentsMouseReleaseEvent( QMouseEvent *e ) void KSircTopic::setNewTopic() { - QString topic = m_editor->text().stripWhiteSpace(); + TQString topic = m_editor->text().stripWhiteSpace(); /* * don't change the channel display @@ -132,9 +132,9 @@ void KSircTopic::setNewTopic() * from the server. If we can't set the topic * don't make it look like it was set */ - QTimer::singleShot( 0, m_editor, SLOT( close() ) ); - disconnect( m_editor, SIGNAL( resized() ), - this, SLOT( slotEditResized() ) ); + TQTimer::singleShot( 0, m_editor, TQT_SLOT( close() ) ); + disconnect( m_editor, TQT_SIGNAL( resized() ), + this, TQT_SLOT( slotEditResized() ) ); doResize(); emit topicChange( topic ); } @@ -149,18 +149,18 @@ void KSircTopic::doResize() { int h; - QFontMetrics metrics( currentFont() ); + TQFontMetrics metrics( currentFont() ); h = metrics.lineSpacing()+8; m_height = h; setFixedHeight( h ); - QToolTip::remove(this); - QStringList sep = QStringList::split(" ", m_text); + TQToolTip::remove(this); + TQStringList sep = TQStringList::split(" ", m_text); int len = 0; - QString brok; - QStringList::Iterator it = sep.begin(); + TQString brok; + TQStringList::Iterator it = sep.begin(); for(; it != sep.end(); ++it) { brok += *it + " "; len += (*it).length(); @@ -170,30 +170,30 @@ void KSircTopic::doResize() } } - QToolTip::add(this, brok); + TQToolTip::add(this, brok); } -void KSircTopic::fontChange(QFont &f) +void KSircTopic::fontChange(TQFont &f) { KActiveLabel::fontChange(f); doResize(); } -KSircTopicEditor::KSircTopicEditor( QWidget *parent, const char *name ) - : QTextEdit( parent, name ) +KSircTopicEditor::KSircTopicEditor( TQWidget *parent, const char *name ) + : TQTextEdit( parent, name ) { setWFlags( WDestructiveClose ); - setFocusPolicy( QWidget::ClickFocus ); - connect( this, SIGNAL( textChanged () ), this, SLOT( slotMaybeResize() ) ); + setFocusPolicy( TQWidget::ClickFocus ); + connect( this, TQT_SIGNAL( textChanged () ), this, TQT_SLOT( slotMaybeResize() ) ); } -void KSircTopicEditor::keyPressEvent( QKeyEvent *ev ) +void KSircTopicEditor::keyPressEvent( TQKeyEvent *ev ) { if ( ev->key() == Key_Escape ) { ev->accept(); - QTimer::singleShot( 0, this, SLOT( close() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( close() ) ); return; } else if ( ev->key() == Key_Return ) @@ -202,26 +202,26 @@ void KSircTopicEditor::keyPressEvent( QKeyEvent *ev ) emit returnPressed(); return; } - QTextEdit::keyPressEvent( ev ); + TQTextEdit::keyPressEvent( ev ); } -void KSircTopicEditor::focusOutEvent( QFocusEvent * ) +void KSircTopicEditor::focusOutEvent( TQFocusEvent * ) { // we don't want to quit editing when someone brings up QLE's popup // menu - if ( QFocusEvent::reason() == QFocusEvent::Popup ) + if ( TQFocusEvent::reason() == TQFocusEvent::Popup ) { - QWidget *focusw = qApp->focusWidget(); + TQWidget *focusw = qApp->focusWidget(); if ( focusw && m_popup && focusw == m_popup ) return; } - QTimer::singleShot( 0, this, SLOT( close() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( close() ) ); } -QPopupMenu *KSircTopicEditor::createPopupMenu( const QPoint &pos ) +TQPopupMenu *KSircTopicEditor::createPopupMenu( const TQPoint &pos ) { - QPopupMenu *popup = QTextEdit::createPopupMenu( pos ); + TQPopupMenu *popup = TQTextEdit::createPopupMenu( pos ); m_popup = popup; return popup; } @@ -229,13 +229,13 @@ QPopupMenu *KSircTopicEditor::createPopupMenu( const QPoint &pos ) void KSircTopicEditor::slotMaybeResize() { if(text().contains("\n")){ - QString s = text(); + TQString s = text(); s.replace('\n', " "); setText(s); setCursorPosition(0, s.length()); } - QFontMetrics metrics( currentFont() ); + TQFontMetrics metrics( currentFont() ); int h = metrics.lineSpacing() * lines()+8; setFixedHeight( h ); diff --git a/ksirc/topic.h b/ksirc/topic.h index 73191128..e435d864 100644 --- a/ksirc/topic.h +++ b/ksirc/topic.h @@ -8,10 +8,10 @@ #define __topic_h__ #include -#include -#include -#include -#include +#include +#include +#include +#include class KSircTopicEditor; @@ -19,18 +19,18 @@ class KSircTopic : public KActiveLabel { Q_OBJECT public: - KSircTopic( QWidget *parent, const char *name = 0 ); + KSircTopic( TQWidget *parent, const char *name = 0 ); public slots: - virtual void setText( const QString &); + virtual void setText( const TQString &); signals: - void topicChange( const QString &newTopic ); + void topicChange( const TQString &newTopic ); protected: - virtual void contentsMouseDoubleClickEvent( QMouseEvent * ); - virtual void contentsMouseReleaseEvent( QMouseEvent * ); - virtual void fontChange(QFont &); + virtual void contentsMouseDoubleClickEvent( TQMouseEvent * ); + virtual void contentsMouseReleaseEvent( TQMouseEvent * ); + virtual void fontChange(TQFont &); private slots: void setNewTopic(); @@ -40,17 +40,17 @@ private slots: private: - QGuardedPtr m_editor; + TQGuardedPtr m_editor; bool m_doEdit; int m_height; - QString m_text; + TQString m_text; }; class KSircTopicEditor : public QTextEdit { Q_OBJECT public: - KSircTopicEditor( QWidget *parent, const char *name = 0 ); + KSircTopicEditor( TQWidget *parent, const char *name = 0 ); signals: void resized(); @@ -59,12 +59,12 @@ public slots: virtual void slotMaybeResize(); protected: - virtual void keyPressEvent( QKeyEvent *ev ); - virtual void focusOutEvent( QFocusEvent * ); - virtual QPopupMenu *createPopupMenu( const QPoint &pos ); + virtual void keyPressEvent( TQKeyEvent *ev ); + virtual void focusOutEvent( TQFocusEvent * ); + virtual TQPopupMenu *createPopupMenu( const TQPoint &pos ); private: - QGuardedPtr m_popup; + TQGuardedPtr m_popup; }; #endif diff --git a/ksirc/toplevel.cpp b/ksirc/toplevel.cpp index f064a291..f5f4d002 100644 --- a/ksirc/toplevel.cpp +++ b/ksirc/toplevel.cpp @@ -15,12 +15,12 @@ Signals: - outputLine(QString &): - output_toplevel(QString): + outputLine(TQString &): + output_toplevel(TQString): - closing(KSircTopLevel *, QString channel): + closing(KSircTopLevel *, TQString channel): - changeChannel(QString old, QString new): + changeChannel(TQString old, TQString new): currentWindow(KSircTopLevel *): @@ -49,15 +49,15 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -78,26 +78,26 @@ #include extern DisplayMgr *displayMgr; -//QPopupMenu *KSircTopLevel::user_controls = 0L; -QPtrList *KSircTopLevel::user_menu = 0L; -QStringList KSircTopLevel::cmd_menu; +//TQPopupMenu *KSircTopLevel::user_controls = 0L; +TQPtrList *KSircTopLevel::user_menu = 0L; +TQStringList KSircTopLevel::cmd_menu; void KSircTopLevel::initColors() { - QColorGroup cg_mainw = kapp->palette().active(); - cg_mainw.setColor(QColorGroup::Base, ksopts->backgroundColor); - cg_mainw.setColor(QColorGroup::Text, ksopts->textColor); - cg_mainw.setColor(QColorGroup::Link, ksopts->linkColor); - cg_mainw.setColor(QColorGroup::Highlight, ksopts->selBackgroundColor); - cg_mainw.setColor(QColorGroup::HighlightedText, ksopts->selForegroundColor); - mainw->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw)); - nicks->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw)); - linee->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw)); - lag->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw)); - cg_mainw.setColor(QColorGroup::Background, ksopts->backgroundColor); - cg_mainw.setColor(QColorGroup::Foreground, ksopts->textColor); - ksTopic->setPalette(QPalette(cg_mainw,cg_mainw, cg_mainw)); + TQColorGroup cg_mainw = kapp->palette().active(); + cg_mainw.setColor(TQColorGroup::Base, ksopts->backgroundColor); + cg_mainw.setColor(TQColorGroup::Text, ksopts->textColor); + cg_mainw.setColor(TQColorGroup::Link, ksopts->linkColor); + cg_mainw.setColor(TQColorGroup::Highlight, ksopts->selBackgroundColor); + cg_mainw.setColor(TQColorGroup::HighlightedText, ksopts->selForegroundColor); + mainw->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw)); + nicks->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw)); + linee->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw)); + lag->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw)); + cg_mainw.setColor(TQColorGroup::Background, ksopts->backgroundColor); + cg_mainw.setColor(TQColorGroup::Foreground, ksopts->textColor); + ksTopic->setPalette(TQPalette(cg_mainw,cg_mainw, cg_mainw)); selector->setFont( ksopts->defaultFont.family() ); mainw->setFont( ksopts->defaultFont ); nicks->setFont( ksopts->defaultFont ); @@ -109,7 +109,7 @@ KSircTopLevel::initColors() KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInfo, const char * name) : KMainWindow(0, name, 0/*no WDestructiveClose !*/), UnicodeMessageReceiver(_proc), - lastBeep( QTime::currentTime() ), + lastBeep( TQTime::currentTime() ), m_channelInfo(channelInfo) { @@ -119,9 +119,9 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf kapp->ref(); - m_topic = QString::null; + m_topic = TQString::null; - QCString kstl_name = QCString(QObject::name()) + "_" + "toplevel"; + TQCString kstl_name = TQCString(TQObject::name()) + "_" + "toplevel"; setName(kstl_name); if(!m_channelInfo.channel().isEmpty()) { @@ -130,7 +130,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf } else { - caption = QString::null; + caption = TQString::null; } Buffer = FALSE; @@ -149,34 +149,34 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf m_channelInfo.setEncoding(ksopts->chan(m_channelInfo).encoding); selector = new charSelector(); - connect(selector, SIGNAL(clicked()), this, SLOT(insertText())); + connect(selector, TQT_SIGNAL(clicked()), this, TQT_SLOT(insertText())); selector->setFont(ksopts->defaultFont.family()); - file = new QPopupMenu(this, QCString(QObject::name()) + "_popup_file"); + file = new TQPopupMenu(this, TQCString(TQObject::name()) + "_popup_file"); file->setCheckable(true); - KAction *act = KStdAction::openNew( this, SLOT( newWindow() ), actionCollection() ); + KAction *act = KStdAction::openNew( this, TQT_SLOT( newWindow() ), actionCollection() ); act->plug( file ); - file->insertItem(i18n("New Ser&ver..."), servercontroller::self(), SLOT(new_connection()), Key_F2); + file->insertItem(i18n("New Ser&ver..."), servercontroller::self(), TQT_SLOT(new_connection()), Key_F2); file->insertSeparator(); - file->insertItem(i18n("&DCC Manager..."), this, SLOT(showDCCMgr())); - file->insertItem(i18n("&Save to Logfile..."), this, SLOT(saveCurrLog()), CTRL + Key_S); + file->insertItem(i18n("&DCC Manager..."), this, TQT_SLOT(showDCCMgr())); + file->insertItem(i18n("&Save to Logfile..."), this, TQT_SLOT(saveCurrLog()), CTRL + Key_S); - tsitem = file->insertItem(i18n("Time St&"), this, SLOT(toggleTimestamp()), CTRL + Key_T); + tsitem = file->insertItem(i18n("Time St&"), this, TQT_SLOT(toggleTimestamp()), CTRL + Key_T); file->setItemChecked(tsitem, ksopts->chan(m_channelInfo).timeStamp); - fjpitem = file->insertItem(i18n("Hide Join/Part Messages"), this, SLOT(toggleFilterJoinPart())); + fjpitem = file->insertItem(i18n("Hide Join/Part Messages"), this, TQT_SLOT(toggleFilterJoinPart())); file->setItemChecked(fjpitem, ksopts->chan(m_channelInfo).filterJoinPart); - file->insertItem(i18n("Character &Table"), selector, SLOT(show()), CTRL + Key_H); - beepitem = file->insertItem(i18n("N&otify on Change"), this, SLOT(toggleBeep()), CTRL + Key_P); + file->insertItem(i18n("Character &Table"), selector, TQT_SLOT(show()), CTRL + Key_H); + beepitem = file->insertItem(i18n("N&otify on Change"), this, TQT_SLOT(toggleBeep()), CTRL + Key_P); file->setItemChecked(beepitem, ksopts->chan(m_channelInfo).beepOnMsg); encodingAction = new KSelectAction( i18n( "&Encoding" ), 0, this ); - connect( encodingAction, SIGNAL( activated() ), this, SLOT( setEncoding() ) ); - QStringList encodings = KGlobal::charsets()->descriptiveEncodingNames(); + connect( encodingAction, TQT_SIGNAL( activated() ), this, TQT_SLOT( setEncoding() ) ); + TQStringList encodings = KGlobal::charsets()->descriptiveEncodingNames(); - topicitem = file->insertItem(i18n("S&how Topic"), this, SLOT(toggleTopic()), CTRL + Key_O); + topicitem = file->insertItem(i18n("S&how Topic"), this, TQT_SLOT(toggleTopic()), CTRL + Key_O); if (isPrivateChat() || m_channelInfo.channel().startsWith("!no_channel")) { file->setItemEnabled(topicitem, false); } @@ -184,10 +184,10 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf file->setItemChecked(topicitem, ksopts->chan(m_channelInfo).topicShow); } - tickeritem = file->insertItem(i18n("Ticker &Mode"), this, SLOT(toggleTicker())); + tickeritem = file->insertItem(i18n("Ticker &Mode"), this, TQT_SLOT(toggleTicker())); // remove utf16/ucs2 as it just doesn't work for IRC - QStringList::Iterator encodingIt = encodings.begin(); + TQStringList::Iterator encodingIt = encodings.begin(); while ( encodingIt != encodings.end() ) { if ( ( *encodingIt ).find( "utf16" ) != -1 || ( *encodingIt ).find( "iso-10646" ) != -1 ) @@ -208,7 +208,7 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf setEncoding(); file->insertSeparator(); - act = KStdAction::close( this, SLOT( terminate() ), actionCollection() ); + act = KStdAction::close( this, TQT_SLOT( terminate() ), actionCollection() ); act->plug( file ); kmenu = menuBar(); @@ -217,26 +217,26 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf /* * Ok, let's look at the basic widget "layout" - * Everything belongs to q QFrame F, this is use so we + * Everything belongs to q TQFrame F, this is use so we * can give the KApplication a single main client widget, which is needs. * * A QVbox and a QHbox is used to ctronl the 3 sub widget - * The Modified QListBox is then added side by side with the User list box. + * The Modified TQListBox is then added side by side with the User list box. * The SLE is then fit bello. */ // kstInside does not setup fonts, etc, it simply handles sizing - top = new QVBox( this ); + top = new TQVBox( this ); ksTopic = new KSircTopic( top ); ksTopic->setFont(ksopts->defaultFont); - connect( ksTopic, SIGNAL( topicChange( const QString & ) ), - this, SLOT( setTopicIntern( const QString & ) ) ); + connect( ksTopic, TQT_SIGNAL( topicChange( const TQString & ) ), + this, TQT_SLOT( setTopicIntern( const TQString & ) ) ); - QCString kstn = QCString(QObject::name()) + "_"; + TQCString kstn = TQCString(TQObject::name()) + "_"; - pan = new QSplitter(QSplitter::Horizontal, top, kstn + "splitter"); + pan = new TQSplitter(TQSplitter::Horizontal, top, kstn + "splitter"); #if KDE_IS_VERSION(3,1,92) pan->setOpaqueResize( KGlobalSettings::opaqueResize() ); #else @@ -244,31 +244,31 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf #endif mainw = new KSircView(ksircProcess(), pan, kstn + "KSircView" ); - mainw->setFocusPolicy(QWidget::NoFocus); + mainw->setFocusPolicy(TQWidget::NoFocus); - nicks_box = new QVBox(pan); + nicks_box = new TQVBox(pan); channelButtons = new chanButtons(ksircProcess(), nicks_box); - connect(channelButtons, SIGNAL(mode(QString, int, QString)), - this, SLOT(setMode(QString, int, QString))); + connect(channelButtons, TQT_SIGNAL(mode(TQString, int, TQString)), + this, TQT_SLOT(setMode(TQString, int, TQString))); nicks = new aListBox(nicks_box, kstn + "aListBox"); - nicks->setFocusPolicy(QWidget::NoFocus); + nicks->setFocusPolicy(TQWidget::NoFocus); //nicks->hide(); // default = only the main widget - lag = new QLabel(nicks_box); - lag->setFrameStyle(QFrame::Panel|QFrame::Sunken); + lag = new TQLabel(nicks_box); + lag->setFrameStyle(TQFrame::Panel|TQFrame::Sunken); lag->setAlignment(Qt::AlignCenter | Qt::SingleLine); lag->setText(i18n("Lag: Wait")); - QValueList sizes; + TQValueList sizes; sizes << int(width()*0.85) << int(width()*0.15); pan->setSizes(sizes); - pan->setResizeMode( mainw, QSplitter::Stretch ); - pan->setResizeMode( nicks_box, QSplitter::Stretch ); + pan->setResizeMode( mainw, TQSplitter::Stretch ); + pan->setResizeMode( nicks_box, TQSplitter::Stretch ); -// f = new kstInside(top, QString(QObject::name()) + "_" + "kstIFrame"); +// f = new kstInside(top, TQString(TQObject::name()) + "_" + "kstIFrame"); top->setStretchFactor(pan, 1); setCentralWidget(top); // Tell the KApplication what the main widget is. @@ -291,15 +291,15 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf if(isPrivateChat()){ KConfig conf("ksirc/winlog/" + channelInfo.server() + "-" + channelInfo.channel(), false, false, "data"); - QString group = "Message-History"; + TQString group = "Message-History"; if(conf.hasGroup( group )){ conf.setGroup( group ); - QStringList strlist = conf.readListEntry("History"); + TQStringList strlist = conf.readListEntry("History"); if(strlist.count() > 0){ mainw->enableTimeStamps(true); - for ( QStringList::Iterator it = strlist.begin(); + for ( TQStringList::Iterator it = strlist.begin(); it != strlist.end(); ++it ) { mainw->addRichText(*it); @@ -311,12 +311,12 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf mainw->enableTimeStamps(ksopts->chan(m_channelInfo).timeStamp); - edit = new QPopupMenu(this); - act = KStdAction::copy( mainw, SLOT( copy() ), actionCollection() ); + edit = new TQPopupMenu(this); + act = KStdAction::copy( mainw, TQT_SLOT( copy() ), actionCollection() ); act->plug( edit ); - act = KStdAction::paste( this, SLOT( pasteToWindow() ), actionCollection() ); + act = KStdAction::paste( this, TQT_SLOT( pasteToWindow() ), actionCollection() ); act->plug( edit ); - edit->insertItem(i18n("C&lear Window"), this, SLOT(clearWindow()), CTRL + Key_L); + edit->insertItem(i18n("C&lear Window"), this, TQT_SLOT(clearWindow()), CTRL + Key_L); kmenu->insertItem(i18n("&Edit"), edit, -1, -1); linee = new aHistLineEdit(top, ""); @@ -353,34 +353,34 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf } - connect(mainw, SIGNAL(pasteReq( const QString& )), - this, SLOT( slotTextDropped( const QString& ))); + connect(mainw, TQT_SIGNAL(pasteReq( const TQString& )), + this, TQT_SLOT( slotTextDropped( const TQString& ))); nicks->setFont(ksopts->defaultFont); // setup line editor - linee->setFocusPolicy(QWidget::StrongFocus); + linee->setFocusPolicy(TQWidget::StrongFocus); linee->setFont(ksopts->defaultFont); if(ksopts->oneLineEntry == true) { - linee->setWordWrap(QTextEdit::NoWrap); + linee->setWordWrap(TQTextEdit::NoWrap); } else { - linee->setWordWrap(QTextEdit::WidgetWidth); + linee->setWordWrap(TQTextEdit::WidgetWidth); } - connect(linee, SIGNAL(gotFocus()), - this, SLOT(gotFocus())); - connect(linee, SIGNAL(lostFocus()), - this, SLOT(lostFocus())); - connect(linee, SIGNAL(pasteText(const QString&)), - this, SLOT(slotTextDropped(const QString&))); - connect(linee, SIGNAL(notTab()), - this, SLOT(lineeNotTab())); + connect(linee, TQT_SIGNAL(gotFocus()), + this, TQT_SLOT(gotFocus())); + connect(linee, TQT_SIGNAL(lostFocus()), + this, TQT_SLOT(lostFocus())); + connect(linee, TQT_SIGNAL(pasteText(const TQString&)), + this, TQT_SLOT(slotTextDropped(const TQString&))); + connect(linee, TQT_SIGNAL(notTab()), + this, TQT_SLOT(lineeNotTab())); - connect( linee, SIGNAL( gotReturnPressed() ), - this, SLOT( returnPressed() ) ); + connect( linee, TQT_SIGNAL( gotReturnPressed() ), + this, TQT_SLOT( returnPressed() ) ); linee->setFocus(); // Give SLE focus linee->slotMaybeResize(); @@ -421,56 +421,56 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf if(user_menu == 0) user_menu = UserControlMenu::parseKConfig(); - user_controls = new QPopupMenu(this); + user_controls = new TQPopupMenu(this); kmenu->insertItem(i18n("&Users"), user_controls); - command = new QPopupMenu(this); + command = new TQPopupMenu(this); setupCommandMenu(); int i = 0; - QDict cml; - for(QStringList::Iterator it = cmd_menu.begin(); + TQDict cml; + for(TQStringList::Iterator it = cmd_menu.begin(); it != cmd_menu.end(); ++it){ - QString top, item; + TQString top, item; top = (*it).section('/', 0, 0); item = (*it).section('/', 1, 1); if(!cml[top]) { - cml.insert(top, new QPopupMenu(this)); + cml.insert(top, new TQPopupMenu(this)); command->insertItem(top, cml[top]); } - cml[top]->insertItem(item, this, SLOT(cmd_process(int)), 0, i); + cml[top]->insertItem(item, this, TQT_SLOT(cmd_process(int)), 0, i); i++; } kmenu->insertItem(i18n("C&ommand"), command); - kmenu->insertItem( KStdGuiItem::help().text(), helpMenu( QString::null, false )); + kmenu->insertItem( KStdGuiItem::help().text(), helpMenu( TQString::null, false )); - connect(user_controls, SIGNAL(activated(int)), - this, SLOT(UserParseMenu(int))); + connect(user_controls, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(UserParseMenu(int))); - connect(nicks, SIGNAL(contextMenuRequested(int)), this, - SLOT(UserSelected(int))); - connect(nicks, SIGNAL(selectedNick(const QString &)), - this, SLOT(openQueryFromNick(const QString &))); - connect(nicks, SIGNAL(mouseButtonClicked ( int, QListBoxItem *, const QPoint &)), - this, SLOT(pasteToNickList(int, QListBoxItem *, const QPoint &))); - connect(nicks, SIGNAL(textDropped( const QListBoxItem *, const QString& )), - this, SLOT(dndTextToNickList(const QListBoxItem *, const QString&))); + connect(nicks, TQT_SIGNAL(contextMenuRequested(int)), this, + TQT_SLOT(UserSelected(int))); + connect(nicks, TQT_SIGNAL(selectedNick(const TQString &)), + this, TQT_SLOT(openQueryFromNick(const TQString &))); + connect(nicks, TQT_SIGNAL(mouseButtonClicked ( int, TQListBoxItem *, const TQPoint &)), + this, TQT_SLOT(pasteToNickList(int, TQListBoxItem *, const TQPoint &))); + connect(nicks, TQT_SIGNAL(textDropped( const TQListBoxItem *, const TQString& )), + this, TQT_SLOT(dndTextToNickList(const TQListBoxItem *, const TQString&))); UserUpdateMenu(); // Must call to update Popup. - accel = new QAccel(this, "accel"); + accel = new TQAccel(this, "accel"); accel->connectItem(accel->insertItem(SHIFT + Key_PageUp), this, - SLOT(AccelScrollUpPage())); + TQT_SLOT(AccelScrollUpPage())); accel->connectItem(accel->insertItem(SHIFT + Key_PageDown), this, - SLOT(AccelScrollDownPage())); + TQT_SLOT(AccelScrollDownPage())); /* * Pageup/dn @@ -479,41 +479,41 @@ KSircTopLevel::KSircTopLevel(KSircProcess *_proc, const KSircChannel &channelInf accel->connectItem(accel->insertItem(Key_PageUp), this, - SLOT(AccelScrollUpPage())); + TQT_SLOT(AccelScrollUpPage())); accel->connectItem(accel->insertItem(Key_PageDown), this, - SLOT(AccelScrollDownPage())); + TQT_SLOT(AccelScrollDownPage())); /* * These are not presently implemented, so let's not fill the logs. accel->connectItem(accel->insertItem(CTRL + Key_Return), this, - SLOT(AccelPriorMsgNick())); + TQT_SLOT(AccelPriorMsgNick())); accel->connectItem(accel->insertItem(CTRL + SHIFT + Key_Return), this, - SLOT(AccelNextMsgNick())); + TQT_SLOT(AccelNextMsgNick())); */ accel->connectItem(accel->insertItem(Key_Tab), // adds TAB accelerator this, // connected to the main - SLOT(TabNickCompletionNormal())); // TabNickCompletion() slot + TQT_SLOT(TabNickCompletionNormal())); // TabNickCompletion() slot accel->connectItem(accel->insertItem(SHIFT+Key_Tab), // adds TAB accelerator this, // connected to the main - SLOT(TabNickCompletionShift())); // TabNickCompletion() slot + TQT_SLOT(TabNickCompletionShift())); // TabNickCompletion() slot accel->connectItem(accel->insertItem(CTRL + Key_N), - this, SLOT(newWindow())); + this, TQT_SLOT(newWindow())); // accel->connectItem(accel->insertItem(CTRL + Key_S), -// this, SLOT(toggleTimestamp())); +// this, TQT_SLOT(toggleTimestamp())); // Drag & Drop - connect( mainw, SIGNAL( textDropped(const QString&) ), - SLOT( slotTextDropped(const QString&) )); - connect( mainw, SIGNAL( urlsDropped(const QStringList&) ), - SLOT( slotDropURLs(const QStringList&) )); - connect( nicks, SIGNAL( urlsDropped( const QStringList&, const QString& )), - SLOT( slotDccURLs( const QStringList&, const QString& ))); - connect( this, SIGNAL( changed(bool, QString) ), this, SLOT( doChange(bool, QString) )); + connect( mainw, TQT_SIGNAL( textDropped(const TQString&) ), + TQT_SLOT( slotTextDropped(const TQString&) )); + connect( mainw, TQT_SIGNAL( urlsDropped(const TQStringList&) ), + TQT_SLOT( slotDropURLs(const TQStringList&) )); + connect( nicks, TQT_SIGNAL( urlsDropped( const TQStringList&, const TQString& )), + TQT_SLOT( slotDccURLs( const TQStringList&, const TQString& ))); + connect( this, TQT_SIGNAL( changed(bool, TQString) ), this, TQT_SLOT( doChange(bool, TQString) )); mainw->setAcceptFiles( isPrivateChat() ); resize(600, 360); @@ -530,7 +530,7 @@ KSircTopLevel::~KSircTopLevel() // ksircProcess()->getWindowList().remove(m_channelInfo.channel()); // if((m_channelInfo.channel()[0] == '#') || (m_channelInfo.channel()[0] == '&')){ - // QString str = QString("/part ") + m_channelInfo.channel() + "\n"; + // TQString str = TQString("/part ") + m_channelInfo.channel() + "\n"; // emit outputLine(str); // } @@ -539,11 +539,11 @@ KSircTopLevel::~KSircTopLevel() { if ( isPublicChat() ) { kdDebug(5008) << "*** parting channel: " << m_channelInfo.channel() << endl; - QString str = QString("/part ") + m_channelInfo.channel() + "\n"; + TQString str = TQString("/part ") + m_channelInfo.channel() + "\n"; emit outputUnicodeLine(str); } else { - QStringList strlist; + TQStringList strlist; mainw->addLine("user|X", ksopts->channelColor, " Saved log of previous messages"); @@ -552,7 +552,7 @@ KSircTopLevel::~KSircTopLevel() for(KSirc::TextParagIterator ksit = mainw->firstParag(); ksit.atEnd() == 0; ++ksit) { - QString rt = ksit.richText(); + TQString rt = ksit.richText(); if(rt.contains("")) continue; @@ -565,7 +565,7 @@ KSircTopLevel::~KSircTopLevel() KConfig conf("ksirc/winlog/" + channelInfo().server() + "-" + channelInfo().channel(), false, false, "data"); - QString group = "Message-History"; + TQString group = "Message-History"; conf.setGroup( group ); @@ -583,13 +583,13 @@ KSircTopLevel::~KSircTopLevel() kdDebug(5008) << "~KSircToplevel out" << endl; } -void KSircTopLevel::setMode(QString mode, int mode_type, QString currentNick) +void KSircTopLevel::setMode(TQString mode, int mode_type, TQString currentNick) { - QString command; + TQString command; if (mode_type == 0) - command = QString::fromLatin1("/mode %1 %2\n").arg(m_channelInfo.channel()).arg(mode); + command = TQString::fromLatin1("/mode %1 %2\n").arg(m_channelInfo.channel()).arg(mode); else - command = QString::fromLatin1("/mode %1 %2\n").arg(currentNick).arg(mode); + command = TQString::fromLatin1("/mode %1 %2\n").arg(currentNick).arg(mode); sirc_write(command); linee->setFocus(); } @@ -598,8 +598,8 @@ void KSircTopLevel::setEncoding() { int index = encodingAction->currentItem(); if ( index == 0 ) {// default (locale) encoding - ksopts->chan(m_channelInfo).encoding = QString::null; - UnicodeMessageReceiver::setEncoding( QString::null ); + ksopts->chan(m_channelInfo).encoding = TQString::null; + UnicodeMessageReceiver::setEncoding( TQString::null ); } else { ksopts->chan(m_channelInfo).encoding = encodingAction->currentText(); @@ -713,7 +713,7 @@ void KSircTopLevel::TabNickCompletion(int dir) int start, end; int extra = 0; bool first = false; - QString s; + TQString s; if(tab_pressed == -1){ s = linee->text(); @@ -745,11 +745,11 @@ void KSircTopLevel::TabNickCompletion(int dir) lineeNotTab(); return; } - QString line = tab_nick + ": "; // tab_nick holds the last night since we haven't overritten it yet. + TQString line = tab_nick + ": "; // tab_nick holds the last night since we haven't overritten it yet. linee->setText(line); linee->setCursorPosition(line.length()); - connect(linee, SIGNAL(notTab()), - this, SLOT(lineeNotTab())); + connect(linee, TQT_SIGNAL(notTab()), + this, TQT_SLOT(lineeNotTab())); return; } @@ -800,12 +800,12 @@ void KSircTopLevel::TabNickCompletion(int dir) tab_pressed = tab; // setText causes lineeTextChanged to get called and erase tab_pressed - connect(linee, SIGNAL(notTab()), - this, SLOT(lineeNotTab())); + connect(linee, TQT_SIGNAL(notTab()), + this, TQT_SLOT(lineeNotTab())); } -void KSircTopLevel::sirc_receive(QString str, bool broadcast) +void KSircTopLevel::sirc_receive(TQString str, bool broadcast) { /* @@ -825,14 +825,14 @@ void KSircTopLevel::sirc_receive(QString str, bool broadcast) bool addressed = false; BufferedLine line; - // be careful not to use a QValueList iterator here, as it is possible + // be careful not to use a TQValueList iterator here, as it is possible // that we enter a local event loop (think of the ssfeprompt dialog!) // which might trigger a socketnotifier activation which in turn // might result in the execution of code that modifies the LineBuffer, // which would invalidate iterators (Simon) while ( LineBuffer.begin() != LineBuffer.end() ) { - QString plainText(""); + TQString plainText(""); line = *LineBuffer.begin(); LineBuffer.remove( LineBuffer.begin() ); @@ -850,7 +850,7 @@ void KSircTopLevel::sirc_receive(QString str, bool broadcast) } // detect /msg's -- needed when auto-create-window is off - if ( line.message.find( QRegExp( "^\\[~b.+~b\\].+$" ) ) == 0 ) + if ( line.message.find( TQRegExp( "^\\[~b.+~b\\].+$" ) ) == 0 ) addressedLine = true; if ( addressedLine == true && line.message.startsWith("* " + ksircProcess()->getNick())) @@ -871,22 +871,22 @@ void KSircTopLevel::sirc_receive(QString str, bool broadcast) LineBuffer.append( BufferedLine( str, broadcast ) ); } - QValueList list; - QValueList::iterator it; - QString values; + TQValueList list; + TQValueList::iterator it; + TQString values; list = pan->sizes(); it = list.begin(); while( it != list.end()){ - values += QString("%1 ").arg(*it); + values += TQString("%1 ").arg(*it); ++it; } } -void KSircTopLevel::sirc_line_return(const QString &text) +void KSircTopLevel::sirc_line_return(const TQString &text) { /* Take line from SLE, and output if to dsirc */ - QString s = text; + TQString s = text; if(s.length() == 0) return; @@ -901,34 +901,34 @@ void KSircTopLevel::sirc_line_return(const QString &text) } -void KSircTopLevel::sirc_write(const QString &str) +void KSircTopLevel::sirc_write(const TQString &str) { /* * Parse line forcommand we handle */ - QString command = str, plain = str.lower().simplifyWhiteSpace(); + TQString command = str, plain = str.lower().simplifyWhiteSpace(); if(plain.startsWith("/join ") || plain.startsWith("/j ") || plain.startsWith("/query ")) { - QString s = plain.mid(plain.find(' ')+1); + TQString s = plain.mid(plain.find(' ')+1); - QStringList channels = QStringList::split(",", s); - QStringList::ConstIterator it = channels.begin(); + TQStringList channels = TQStringList::split(",", s); + TQStringList::ConstIterator it = channels.begin(); for( ; it != channels.end(); ++it){ - QString name = *it; + TQString name = *it; //kdDebug(5008) << "Doing " << name << endl; - QRegExp rx("(\\S+)\\s*(\\S*)"); + TQRegExp rx("(\\S+)\\s*(\\S*)"); rx.search(name); KSircChannel ci(m_channelInfo.server(), rx.cap(1), // channel rx.cap(2)); // optional key - linee->setText(QString::null); + linee->setText(TQString::null); emit open_toplevel(ci); /* if(name[0] != '#'){ emit open_toplevel(name); - linee->setText(QString::null); + linee->setText(TQString::null); } else { emit outputUnicodeLine(plain + "\n"); @@ -941,11 +941,11 @@ void KSircTopLevel::sirc_write(const QString &str) } else if(plain.startsWith("/server ")) { plain.simplifyWhiteSpace(); - QRegExp rx("/server (\\S+) *(\\S*) *(\\S*)"); + TQRegExp rx("/server (\\S+) *(\\S*) *(\\S*)"); if(rx.search(str) >= 0){ - QString server = rx.cap(1); - QString port = rx.cap(2); - QString pass = rx.cap(3); + TQString server = rx.cap(1); + TQString port = rx.cap(2); + TQString pass = rx.cap(3); bool ssl = false; if(server.startsWith("+")){ @@ -953,7 +953,7 @@ void KSircTopLevel::sirc_write(const QString &str) ssl = true; } - KSircServer serv(server, port, QString::null, pass, ssl); + KSircServer serv(server, port, TQString::null, pass, ssl); servercontroller::self()->new_ksircprocess(serv); return; @@ -962,19 +962,19 @@ void KSircTopLevel::sirc_write(const QString &str) else if(plain.startsWith("/part") || plain.startsWith("/leave") || plain.startsWith("/hop")) { - QApplication::postEvent(this, new QCloseEvent()); // WE'RE DEAD - linee->setText(QString::null); + TQApplication::postEvent(this, new TQCloseEvent()); // WE'RE DEAD + linee->setText(TQString::null); return; } else if( plain.startsWith( "/bye" ) || plain.startsWith( "/exit" ) || plain.startsWith( "/quit" )) { - linee->setText( QString::null ); + linee->setText( TQString::null ); emit requestQuit( command.ascii() ); return; } else if ( plain.startsWith( "/away" ) ) { - QString awayEvalCommand = QString::fromLatin1( "/eval $publicAway = %1\n" ).arg( ksopts->publicAway ? '1' : '0' ); + TQString awayEvalCommand = TQString::fromLatin1( "/eval $publicAway = %1\n" ).arg( ksopts->publicAway ? '1' : '0' ); emit outputUnicodeLine( awayEvalCommand ); } @@ -985,11 +985,11 @@ void KSircTopLevel::sirc_write(const QString &str) if(!isSpecialWindow()) { // channel or private chat if(plain[0].latin1() != '/'){ - command.prepend(QString::fromLatin1("/msg %1 ").arg(m_channelInfo.channel())); + command.prepend(TQString::fromLatin1("/msg %1 ").arg(m_channelInfo.channel())); } else if(plain.startsWith("/me ")) { command.remove(0, 3); - command.prepend(QString("/de ") + m_channelInfo.channel()); + command.prepend(TQString("/de ") + m_channelInfo.channel()); } } @@ -1003,7 +1003,7 @@ void KSircTopLevel::sirc_write(const QString &str) mainw->scrollToBottom(true); } -bool KSircTopLevel::parse_input(const QString &string, QString &plainText) +bool KSircTopLevel::parse_input(const TQString &string, TQString &plainText) { /* * Parsing routines are broken into 3 majour sections @@ -1033,7 +1033,7 @@ bool KSircTopLevel::parse_input(const QString &string, QString &plainText) parseSucc *item = dynamic_cast(pResult); parseError *err = dynamic_cast(pResult); - QString logString; + TQString logString; if(item) { @@ -1069,14 +1069,14 @@ bool KSircTopLevel::parse_input(const QString &string, QString &plainText) } else { - logString = mainw->addLine( QString::null, ksopts->textColor, string ); + logString = mainw->addLine( TQString::null, ksopts->textColor, string ); if(ticker != NULL){ ticker->mergeString(string); } // If it contains our nick, move the speaker to the top // of the nick completion list if(string.contains("~o")){ - QRegExp rx("<(\\S+)>"); + TQRegExp rx("<(\\S+)>"); if ( (rx.search(logString) >= 0) && (rx.cap(1) != ksircProcess()->getNick()) ) { //kdDebug(5008) << "addCompleteNick: " << rx.cap(1) << endl; @@ -1099,10 +1099,10 @@ bool KSircTopLevel::parse_input(const QString &string, QString &plainText) void KSircTopLevel::returnPressed() { - QString s = linee->text(); + TQString s = linee->text(); uint i; - QChar c; + TQChar c; for(i = 0; (c = s[i]); i++){ switch(c.unicode()){ case 0336: @@ -1146,17 +1146,17 @@ void KSircTopLevel::UserParseMenu(int id) if(nicks->currentItem() < 0) return; - QString s; - s = QString("/eval $dest_nick='%1';\n").arg(nicks->text(nicks->currentItem())); + TQString s; + s = TQString("/eval $dest_nick='%1';\n").arg(nicks->text(nicks->currentItem())); sirc_write(s); // set $$dest_chan variable - s = QString("/eval $dest_chan='%1';\n").arg(m_channelInfo.channel()); + s = TQString("/eval $dest_chan='%1';\n").arg(m_channelInfo.channel()); sirc_write(s); - QString action = user_menu->at(id)->action; + TQString action = user_menu->at(id)->action; if (action.length() && action[0] == '/') action.remove(0, 1); - s = QString("/eval &docommand(eval{\"%1\"});\n").arg(action); - s.replace(QRegExp("\\$\\$"), "$"); + s = TQString("/eval &docommand(eval{\"%1\"});\n").arg(action); + s.replace(TQRegExp("\\$\\$"), "$"); sirc_write(s); } @@ -1192,12 +1192,12 @@ void KSircTopLevel::AccelScrollUpPage() void KSircTopLevel::newWindow() { - NewWindowDialog w(KSircChannel(m_channelInfo.server(), QString::null)); - connect(&w, SIGNAL(openTopLevel(const KSircChannel &)), SIGNAL(open_toplevel(const KSircChannel &))); + NewWindowDialog w(KSircChannel(m_channelInfo.server(), TQString::null)); + connect(&w, TQT_SIGNAL(openTopLevel(const KSircChannel &)), TQT_SIGNAL(open_toplevel(const KSircChannel &))); w.exec(); } -void KSircTopLevel::closeEvent(QCloseEvent *e) +void KSircTopLevel::closeEvent(TQCloseEvent *e) { KMainWindow::closeEvent( e ); e->accept(); @@ -1205,7 +1205,7 @@ void KSircTopLevel::closeEvent(QCloseEvent *e) //Let's not part the channel till we are acutally delete. // We should always get a close event, *BUT* we will always be deleted. // if( isPublicChat() ) { - // QString str = QString("/part ") + m_channelInfo.channel() + "\n"; + // TQString str = TQString("/part ") + m_channelInfo.channel() + "\n"; // emit outputLine(str); // } @@ -1217,9 +1217,9 @@ void KSircTopLevel::closeEvent(QCloseEvent *e) emit closing(this, m_channelInfo.channel()); } -void KSircTopLevel::focusChange(QWidget *w) +void KSircTopLevel::focusChange(TQWidget *w) { - QWidget *me = this; + TQWidget *me = this; if(w == me){ gotFocus(); } @@ -1233,7 +1233,7 @@ void KSircTopLevel::gotFocus() if(isVisible() == TRUE){ if(have_focus == 0){ if(m_channelInfo.channel()[0] != '!' ){ - QString str = QString("/join %1").arg(m_channelInfo.channel()); + TQString str = TQString("/join %1").arg(m_channelInfo.channel()); if(m_channelInfo.key().length() > 0){ str.append(" " + m_channelInfo.key()); } @@ -1247,7 +1247,7 @@ void KSircTopLevel::gotFocus() } if(m_gotMsgWithoutFocus == true){ m_gotMsgWithoutFocus = false; - servercontroller::self()->decreaseNotificationCount(QString("%1 -> %2 got message").arg(ksircProcess()->serverID()).arg(m_channelInfo.channel())); + servercontroller::self()->decreaseNotificationCount(TQString("%1 -> %2 got message").arg(ksircProcess()->serverID()).arg(m_channelInfo.channel())); } } @@ -1259,13 +1259,13 @@ void KSircTopLevel::lostFocus() } } -void KSircTopLevel::control_message(int command, QString str) +void KSircTopLevel::control_message(int command, TQString str) { switch(command){ case CHANGE_CHANNEL: // 001 is defined as changeChannel { - KSircChannel ci(m_channelInfo.server(), QString::null); - QRegExp rx("([^!]+)!+([^!]+)!*([^!]*)"); + KSircChannel ci(m_channelInfo.server(), TQString::null); + TQRegExp rx("([^!]+)!+([^!]+)!*([^!]*)"); if(rx.search(str) < 0){ ci.setChannel(str); } @@ -1285,22 +1285,22 @@ void KSircTopLevel::control_message(int command, QString str) logFile->open(); } setName(m_channelInfo.server().utf8() + "_" + m_channelInfo.channel().utf8() + "_" + "toplevel"); - pan->setName(QCString(QObject::name()) + "_" + "QSplitter"); - kmenu->setName(QCString(QObject::name()) + "_ktoolframe"); - linee->setName(QCString(QObject::name()) + "_" + "LineEnter"); + pan->setName(TQCString(TQObject::name()) + "_" + "TQSplitter"); + kmenu->setName(TQCString(TQObject::name()) + "_ktoolframe"); + linee->setName(TQCString(TQObject::name()) + "_" + "LineEnter"); kmenu->show(); setCaption(m_channelInfo.channel()); emit currentWindow(this); if(m_channelInfo.channel()[0] == '#' || m_channelInfo.channel()[0] == '&'){ - QString str = QString("/join %1 %2\n").arg(m_channelInfo.channel()).arg(m_channelInfo.key()); + TQString str = TQString("/join %1 %2\n").arg(m_channelInfo.channel()).arg(m_channelInfo.key()); kdDebug(5008) << "Doing /join " << m_channelInfo.channel() << " :" << str << endl; emit outputUnicodeLine(str); emit outputLine("/eval $query=''\n"); } else if (m_channelInfo.channel()[0] != '!') { - emit outputUnicodeLine(QString("/eval $query='%1'\n").arg(m_channelInfo.channel())); + emit outputUnicodeLine(TQString("/eval $query='%1'\n").arg(m_channelInfo.channel())); } bool isPrivate = isPrivateChat(); @@ -1356,7 +1356,7 @@ void KSircTopLevel::control_message(int command, QString str) case RESUME_UPDATES: Buffer = FALSE; if(LineBuffer.isEmpty() == FALSE) - sirc_receive(QString::null); + sirc_receive(TQString::null); break; case REREAD_CONFIG: emit freezeUpdates(TRUE); // Stop the list boxes update @@ -1380,10 +1380,10 @@ void KSircTopLevel::control_message(int command, QString str) } mainw->enableTimeStamps(ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].timeStamp); if(ksopts->oneLineEntry == true) { - linee->setWordWrap(QTextEdit::NoWrap); + linee->setWordWrap(TQTextEdit::NoWrap); } else { - linee->setWordWrap(QTextEdit::WidgetWidth); + linee->setWordWrap(TQTextEdit::WidgetWidth); } mainw->scrollToBottom(true); update(); @@ -1396,7 +1396,7 @@ void KSircTopLevel::control_message(int command, QString str) double lag = str.toDouble(&ok); if(ok == TRUE){ lag -= (lag*100.0 - int(lag*100.0))/100.0; - QString s_lag; + TQString s_lag; s_lag.sprintf("Lag: %.2f", lag); this->lag->setText(s_lag); } @@ -1413,7 +1413,7 @@ void KSircTopLevel::control_message(int command, QString str) } } -void KSircTopLevel::setTopic( const QString &topic ) +void KSircTopLevel::setTopic( const TQString &topic ) { m_topic = topic; ksTopic->setText( topic ); @@ -1434,11 +1434,11 @@ void KSircTopLevel::toggleFilterJoinPart() file->setItemChecked( fjpitem, ksopts->chan(m_channelInfo).filterJoinPart ); } -QString KSircTopLevel::findNick(QString part, uint which) +TQString KSircTopLevel::findNick(TQString part, uint which) { - QStringList matches; + TQStringList matches; - for (QStringList::ConstIterator it = completeNicks.begin(); + for (TQStringList::ConstIterator it = completeNicks.begin(); it != completeNicks.end(); ++it) { @@ -1462,33 +1462,33 @@ QString KSircTopLevel::findNick(QString part, uint which) if(which < matches.count()) return *(matches.at(which)); else - return QString::null; + return TQString::null; } - return QString::null; + return TQString::null; } -void KSircTopLevel::removeCompleteNick(const QString &nick) +void KSircTopLevel::removeCompleteNick(const TQString &nick) { - QStringList::Iterator it = completeNicks.find(nick); + TQStringList::Iterator it = completeNicks.find(nick); if (it != completeNicks.end()) completeNicks.remove(it); } -void KSircTopLevel::addCompleteNick(const QString &nick) +void KSircTopLevel::addCompleteNick(const TQString &nick) { removeCompleteNick(nick); completeNicks.prepend(nick); } -void KSircTopLevel::changeCompleteNick(const QString &oldNick, const QString &newNick) +void KSircTopLevel::changeCompleteNick(const TQString &oldNick, const TQString &newNick) { - QStringList::Iterator it = completeNicks.find(oldNick); + TQStringList::Iterator it = completeNicks.find(oldNick); if (it != completeNicks.end()) *it = newNick; } -void KSircTopLevel::openQueryFromNick(const QString &nick) +void KSircTopLevel::openQueryFromNick(const TQString &nick) { KSircChannel ci(m_channelInfo.server(), nick.lower()); emit open_toplevel(ci); @@ -1502,25 +1502,25 @@ void KSircTopLevel::pasteToWindow() } void KSircTopLevel::pasteToNickList(int button, - QListBoxItem *item, - const QPoint &) + TQListBoxItem *item, + const TQPoint &) { if(button == Qt::MidButton && item){ KSircChannel ci(m_channelInfo.server(), item->text().lower()); emit open_toplevel(ci); - QStringList lines = QStringList::split( '\n', + TQStringList lines = TQStringList::split( '\n', KApplication::clipboard()->text( QClipboard::Selection ), true ); - QStringList::ConstIterator it = lines.begin(); - QStringList::ConstIterator end = lines.end(); + TQStringList::ConstIterator it = lines.begin(); + TQStringList::ConstIterator end = lines.end(); for (; it != end; ++it ) { if ((*it).isEmpty()) continue; - QString str = - QString("/msg ") + item->text().lower() + " " + + TQString str = + TQString("/msg ") + item->text().lower() + " " + *it + "\n"; emit outputUnicodeLine(str); @@ -1529,25 +1529,25 @@ void KSircTopLevel::pasteToNickList(int button, } -void KSircTopLevel::dndTextToNickList(const QListBoxItem *item, - const QString& text) +void KSircTopLevel::dndTextToNickList(const TQListBoxItem *item, + const TQString& text) { if(item){ KSircChannel ci(m_channelInfo.server(), item->text().lower()); emit open_toplevel(ci); - QStringList lines = QStringList::split( '\n', + TQStringList lines = TQStringList::split( '\n', text, true ); - QStringList::ConstIterator it = lines.begin(); - QStringList::ConstIterator end = lines.end(); + TQStringList::ConstIterator it = lines.begin(); + TQStringList::ConstIterator end = lines.end(); for (; it != end; ++it ) { if ((*it).isEmpty()) continue; - QString str = - QString("/msg ") + item->text().lower() + " " + + TQString str = + TQString("/msg ") + item->text().lower() + " " + *it + "\n"; emit outputUnicodeLine(str); @@ -1557,11 +1557,11 @@ void KSircTopLevel::dndTextToNickList(const QListBoxItem *item, } enum KSircTopLevelCommands{ Ask, Parse, Escape }; -void KSircTopLevel::slotTextDropped( const QString& _text ) +void KSircTopLevel::slotTextDropped( const TQString& _text ) { if (_text.isEmpty()) return; - QString text = linee->text(); + TQString text = linee->text(); int curPos = linee->cursorPosition(); text = text.mid( 0, curPos ) + _text + text.mid( curPos ); @@ -1575,7 +1575,7 @@ void KSircTopLevel::slotTextDropped( const QString& _text ) if (lines > 4) { int result = KMessageBox::warningContinueCancel(this, i18n("You are about to send %1 lines of text.\nDo you really want to send that much?").arg(approx_lines), - QString::null, i18n("Send")); + TQString::null, i18n("Send")); if (result != KMessageBox::Continue) { // linee->setText(""); @@ -1587,21 +1587,21 @@ void KSircTopLevel::slotTextDropped( const QString& _text ) if(lines > 1){ linee->setUpdatesEnabled(FALSE); - QStringList lines = QStringList::split( '\n', text, true ); - QStringList::ConstIterator it = lines.begin(); - QStringList::ConstIterator end = lines.end(); + TQStringList lines = TQStringList::split( '\n', text, true ); + TQStringList::ConstIterator it = lines.begin(); + TQStringList::ConstIterator end = lines.end(); KSircTopLevelCommands commands = Ask; for (; it != end; ++it ) { if ((*it).isEmpty()) continue; - QString line = *it; + TQString line = *it; if ( line[0].latin1() == '/' ) { if ( commands == Ask ) switch ( KMessageBox::questionYesNo( this, i18n( "The text you pasted contains lines that start with /.\n" - "Should they be interpreted as IRC commands?" ), QString::null, i18n("Interpret"), i18n("Do Not Interpret") ) ) + "Should they be interpreted as IRC commands?" ), TQString::null, i18n("Interpret"), i18n("Do Not Interpret") ) ) { case KMessageBox::Yes: commands = Parse; @@ -1622,7 +1622,7 @@ void KSircTopLevel::slotTextDropped( const QString& _text ) linee->update(); } else{ - text.replace(QRegExp("\n"), ""); + text.replace(TQRegExp("\n"), ""); linee->setText(text); linee->setCursorPosition( curPos + _text.length() ); } @@ -1637,8 +1637,8 @@ void KSircTopLevel::clearWindow() void KSircTopLevel::lineeNotTab() { tab_pressed = -1; - disconnect(linee, SIGNAL(notTab()), - this, SLOT(lineeNotTab())); + disconnect(linee, TQT_SIGNAL(notTab()), + this, TQT_SLOT(lineeNotTab())); addCompleteNick(tab_nick); } @@ -1646,12 +1646,12 @@ void KSircTopLevel::toggleRootWindow() { } -bool KSircTopLevel::event( QEvent *e) +bool KSircTopLevel::event( TQEvent *e) { - if(e->type() == QEvent::ApplicationPaletteChange || - e->type() == QEvent::ApplicationFontChange) + if(e->type() == TQEvent::ApplicationPaletteChange || + e->type() == TQEvent::ApplicationFontChange) { - QTimer::singleShot(750, this, SLOT(initColors())); + TQTimer::singleShot(750, this, TQT_SLOT(initColors())); initColors(); } return KMainWindow::event(e); @@ -1659,14 +1659,14 @@ bool KSircTopLevel::event( QEvent *e) void KSircTopLevel::saveCurrLog() { - KURL url = KURL( KFileDialog::getSaveFileName(QString::null, + KURL url = KURL( KFileDialog::getSaveFileName(TQString::null, "*.log", 0L, i18n("Save Chat/Query Logfile"))); if( url.isEmpty()) return; KTempFile temp; - QTextStream *str = temp.textStream(); + TQTextStream *str = temp.textStream(); *str << mainw->plainText(); @@ -1679,7 +1679,7 @@ void KSircTopLevel::saveCurrLog() } -void KSircTopLevel::slotDropURLs( const QStringList& urls ) +void KSircTopLevel::slotDropURLs( const TQStringList& urls ) { if ( !isPrivateChat() ) return; @@ -1688,16 +1688,16 @@ void KSircTopLevel::slotDropURLs( const QStringList& urls ) } // sends the list of urls to $dest_nick -void KSircTopLevel::slotDccURLs( const QStringList& urls, const QString& nick ) +void KSircTopLevel::slotDccURLs( const TQStringList& urls, const TQString& nick ) { if ( urls.isEmpty() || nick.isEmpty() ) return; - QStringList::ConstIterator it = urls.begin(); - // QString s("/eval &docommand(eval{\"dcc send " + nick + " %1\"});\n"); - QString s("/dcc send " + nick + " %1\n"); + TQStringList::ConstIterator it = urls.begin(); + // TQString s("/eval &docommand(eval{\"dcc send " + nick + " %1\"});\n"); + TQString s("/dcc send " + nick + " %1\n"); for ( ; it != urls.end(); ++it ) { - QString file( *it ); + TQString file( *it ); kdDebug(5008) << "........ " << file << endl; if ( !file.isEmpty() ) sirc_write(s.arg( file )); @@ -1720,33 +1720,33 @@ bool KSircTopLevel::isSpecialWindow() const return (m_channelInfo.channel()[0] == '!'); } -void KSircTopLevel::outputUnicodeLine( const QString &message ) +void KSircTopLevel::outputUnicodeLine( const TQString &message ) { emit outputLine( encoder()->fromUnicode( message ) ); } -void KSircTopLevel::setTopicIntern( const QString &topic ) +void KSircTopLevel::setTopicIntern( const TQString &topic ) { - QString command = QString::fromLatin1( "/topic %1 %2\n" ).arg( m_channelInfo.channel() ).arg( topic ); + TQString command = TQString::fromLatin1( "/topic %1 %2\n" ).arg( m_channelInfo.channel() ).arg( topic ); sirc_write( command ); linee->setFocus(); } -void KSircTopLevel::doChange(bool pers, QString text) +void KSircTopLevel::doChange(bool pers, TQString text) { - QTime ctime = QTime::currentTime(); + TQTime ctime = TQTime::currentTime(); if (ksopts->channel[m_channelInfo.server()][m_channelInfo.channel()].beepOnMsg) { // beep only every 2 seconds otherwise it'll get very noisy in the room ;) if ( QABS( lastBeep.secsTo( ctime ) ) > 1 ) { if ( pers ) { int winId = !ticker ? topLevelWidget()->winId() : ticker->winId(); KNotifyClient::event(winId, - QString::fromLatin1("ChannelPersonal"), + TQString::fromLatin1("ChannelPersonal"), i18n("Your nick appeared on channel %1").arg(m_channelInfo.channel())); } else { int winId = !ticker ? topLevelWidget()->winId() : ticker->winId(); KNotifyClient::event(winId, - QString::fromLatin1("ChannelChanged"), + TQString::fromLatin1("ChannelChanged"), i18n("Channel %1 changed").arg(m_channelInfo.channel())); } lastBeep = ctime; @@ -1755,7 +1755,7 @@ void KSircTopLevel::doChange(bool pers, QString text) if(have_focus == 0 && pers == true && m_gotMsgWithoutFocus == false){ m_gotMsgWithoutFocus = true; - servercontroller::self()->increaseNotificationCount(QString("%1 -> %2").arg(ksircProcess()->serverID()).arg(m_channelInfo.channel()), text); + servercontroller::self()->increaseNotificationCount(TQString("%1 -> %2").arg(ksircProcess()->serverID()).arg(m_channelInfo.channel()), text); } } @@ -1804,7 +1804,7 @@ void KSircTopLevel::toggleTicker() ticker->show(); displayMgr->hide(this); - connect(ticker, SIGNAL(doubleClick()), this, SLOT(toggleTicker())); + connect(ticker, TQT_SIGNAL(doubleClick()), this, TQT_SLOT(toggleTicker())); } } @@ -1816,7 +1816,7 @@ bool KSircTopLevel::atBottom() void KSircTopLevel::cmd_process(int id) { if(cmd_menu.at(id) != cmd_menu.end()) { - QString item, arg, out; + TQString item, arg, out; item = cmd_menu[id].section('/', 1, 1); arg = cmd_menu[id].section('/', 2, 2); diff --git a/ksirc/toplevel.h b/ksirc/toplevel.h index ef8d4a57..8c64b150 100644 --- a/ksirc/toplevel.h +++ b/ksirc/toplevel.h @@ -1,7 +1,7 @@ #ifndef KSIRCTOPLEVEL_H #define KSIRCTOPLEVEL_H -#include +#include #include #include "ahistlineedit.h" @@ -54,18 +54,18 @@ public: * ready processing. This is a single line, and it NOT \n * terminated. */ - virtual void sirc_receive(QString str, bool broadcast = false); + virtual void sirc_receive(TQString str, bool broadcast = false); /** * Reimplement the ksircmessagereceiver control messages. These * are parsed and dealt with quickly. */ - virtual void control_message(int, QString); + virtual void control_message(int, TQString); - QWidget *lineEdit() const { return linee; } + TQWidget *lineEdit() const { return linee; } - void setTopic( const QString &topic ); - QString topic() const { return m_topic; } + void setTopic( const TQString &topic ); + TQString topic() const { return m_topic; } /** * This returns the current channel information for a toplevel @@ -78,10 +78,10 @@ signals: * output a new line. The line is correctly * linefeed terminated, etc. */ - void outputLine(QCString); + void outputLine(TQCString); /** * open a new toplevel widget with for the - * channel/user QString. + * channel/user TQString. */ void open_toplevel(const KSircChannel &); /** @@ -89,18 +89,18 @@ signals: * this window is closing. Refrence to outselves * is include. */ - void closing(KSircTopLevel *, QString channel); + void closing(KSircTopLevel *, TQString channel); /** * emitted when the user typed /quit, will disconnect from this * server and close all toplevels belonging to it. */ - void requestQuit( const QCString& command ); + void requestQuit( const TQCString& command ); /** * emitted when we change channel name * on the fly. old is the old channel name, new * is the new one. */ - void changeChannel(const QString &oldName, const QString &newName); + void changeChannel(const TQString &oldName, const TQString &newName); /** * emitted to say that KSircTopLevel * (this) is now the window with focus. Used by @@ -115,14 +115,14 @@ signals: /** * Emitted when a new message appeared in the irc window */ - void changed(bool, QString); + void changed(bool, TQString); public slots: /** * When enter is pressed, we read the SLE and output the results * after processing via emitting outputLine. */ - virtual void sirc_line_return(const QString &s); + virtual void sirc_line_return(const TQString &s); /** * Clears the message window @@ -134,7 +134,7 @@ public slots: * the widget that just got focus. Used in MDI modes * where the toplevel doesn't get focus in/out events. */ - void focusChange(QWidget *w); + void focusChange(TQWidget *w); protected slots: /** @@ -236,30 +236,30 @@ protected slots: * On a midle mouse button press to the nick list we open * a query window and paste the text there */ - void pasteToNickList(int button, QListBoxItem *item, const QPoint &pos); + void pasteToNickList(int button, TQListBoxItem *item, const TQPoint &pos); /** * dnd paste to nick list */ - void dndTextToNickList(const QListBoxItem *itom, const QString& text); + void dndTextToNickList(const TQListBoxItem *itom, const TQString& text); /** * open a toplevel on double click */ - void openQueryFromNick(const QString &); + void openQueryFromNick(const TQString &); /** * Some text was dropped on the listbox */ - void slotTextDropped(const QString&); + void slotTextDropped(const TQString&); /** * Calls slotDccURLs with the current nick we're talking to */ - void slotDropURLs(const QStringList& urls); + void slotDropURLs(const TQStringList& urls); /** * Sends the list of urls to nick */ - void slotDccURLs(const QStringList& urls, const QString& nick ); + void slotDccURLs(const TQStringList& urls, const TQString& nick ); /** * Re-apply color settings. @@ -275,7 +275,7 @@ protected slots: * Makes a beep when a change happens (if the user has this on) * the bool is TRUE if changed line contained user's nick */ - void doChange(bool, QString); + void doChange(bool, TQString); /** * show the ticker window @@ -298,32 +298,32 @@ protected: /** * Make sure to update colors correctly. */ - virtual bool event( QEvent *e); + virtual bool event( TQEvent *e); /** * Redfine closeEvent to emit closing and delete itself. */ - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); /** * Searches through the nick list and finds the nick with the best match. * which, arg2, selects nicks other than the first shouldarg1 match more * than 1 nick. */ - virtual QString findNick(QString, uint which = 0); + virtual TQString findNick(TQString, uint which = 0); /** * remove a nick from the prefered in nick completion list */ - virtual void removeCompleteNick(const QString &); + virtual void removeCompleteNick(const TQString &); /** * Adds a nick to the list of nicks to prefer in nick completion * or moves it to the top of the list if it was already there */ - virtual void addCompleteNick(const QString &); + virtual void addCompleteNick(const TQString &); /** * Changes a nick in the completion list if it has been listed, * otherwise does nothing */ - virtual void changeCompleteNick(const QString &, const QString &); + virtual void changeCompleteNick(const TQString &, const TQString &); virtual void setupCommandMenu(); @@ -344,33 +344,33 @@ protected: bool isSpecialWindow() const; private slots: - void setTopicIntern( const QString &topic ); + void setTopicIntern( const TQString &topic ); void insertText(); - void setMode(QString, int, QString currentNick=0); + void setMode(TQString, int, TQString currentNick=0); void setEncoding(); void returnPressed(); void toggleTopic(); private: - void outputUnicodeLine( const QString &message ); + void outputUnicodeLine( const TQString &message ); bool atBottom(); bool continued_line; charSelector *selector; chanButtons *channelButtons; - QSplitter *pan; - QVBox *nicks_box; - QVBox *top; + TQSplitter *pan; + TQVBox *nicks_box; + TQVBox *top; KMenuBar *kmenu; - QLabel *lag; + TQLabel *lag; enum {PING = 10, TOPIC = 20}; KSircView *mainw; aHistLineEdit *linee; aListBox *nicks; - //QString m_currentNick; + //TQString m_currentNick; //KSircProcess *proc; @@ -379,44 +379,44 @@ private: struct BufferedLine { BufferedLine() { wasBroadcast = false; } - BufferedLine( const QString &msg, bool broadc ) + BufferedLine( const TQString &msg, bool broadc ) { message = msg; wasBroadcast = broadc; } bool operator==( const BufferedLine &other ) { return message == other.message && wasBroadcast == other.wasBroadcast; } - QString message; + TQString message; bool wasBroadcast; }; bool Buffer; - QValueList LineBuffer; + TQValueList LineBuffer; // QPopupMenu's used for the menubar - QPopupMenu *file, *edit, *command; + TQPopupMenu *file, *edit, *command; - bool parse_input(const QString &string, QString &plainText); - void sirc_write(const QString &str); + bool parse_input(const TQString &string, TQString &plainText); + void sirc_write(const TQString &str); - QPopupMenu *user_controls; - static QPtrList *user_menu; + TQPopupMenu *user_controls; + static TQPtrList *user_menu; int opami; - QAccel *accel; + TQAccel *accel; /** * The channel name that we belong too. */ - //QString channel_name; + //TQString channel_name; /** * Caption at the top of the window. */ - QString caption; + TQString caption; /** * Current topic for the channel */ - QString m_topic; + TQString m_topic; /** * Does the window have focus? 1 when yes, 0 when no. @@ -433,7 +433,7 @@ private: * tab_nick holds the last nick found so when a blank tab is pressed * we pop the last niick and ": " up. */ - QString tab_saved, tab_nick; + TQString tab_saved, tab_nick; int tab_start, tab_end; // Ticker specific variables. @@ -447,20 +447,20 @@ private: * Size and position of the main window. Main window is returns this * this position when it reappears. */ - QRect myrect; + TQRect myrect; /** * Position of the main window */ - QPoint mypoint; + TQPoint mypoint; /** * Ticker's size and geometry */ - QRect tickerrect; + TQRect tickerrect; /** * Tickers position */ - QPoint tickerpoint; - QSize tickersize; + TQPoint tickerpoint; + TQSize tickersize; /** * Do we have a kick window open? * Remember not to open 2 @@ -475,9 +475,9 @@ private: ChannelParser *ChanParser; /** - * QSize maintains size information in case it changes somehow + * TQSize maintains size information in case it changes somehow */ - QSize current_size; + TQSize current_size; /** * ID of the timestamp menu item, to use in (un)checking it from slot @@ -508,13 +508,13 @@ private: * List of nicks already used in nick completion to give them * higher priority */ - QStringList completeNicks; + TQStringList completeNicks; /** * The time of the last beep to prevent your soundcard from detonating * in high traffic channels */ - QTime lastBeep; + TQTime lastBeep; KSircTopic *ksTopic; @@ -522,7 +522,7 @@ private: KSelectAction *encodingAction; - static QStringList cmd_menu; + static TQStringList cmd_menu; bool m_gotMsgWithoutFocus; diff --git a/ksirc/usercontrolmenu.cpp b/ksirc/usercontrolmenu.cpp index ca35e094..704b5511 100644 --- a/ksirc/usercontrolmenu.cpp +++ b/ksirc/usercontrolmenu.cpp @@ -4,10 +4,10 @@ #include #include -QPtrList UserControlMenu::UserMenu; +TQPtrList UserControlMenu::UserMenu; -UserControlMenu::UserControlMenu(const QString& _title, - const QString& _action, +UserControlMenu::UserControlMenu(const TQString& _title, + const TQString& _action, int _accel, int _type, bool _op_only) @@ -23,7 +23,7 @@ UserControlMenu::~UserControlMenu() { } -QPtrList *UserControlMenu::parseKConfig() +TQPtrList *UserControlMenu::parseKConfig() { // Reset the UserMenu to nothing before we start. @@ -102,7 +102,7 @@ QPtrList *UserControlMenu::parseKConfig() TRUE)); } else{ - QString key, cindex, title, action; + TQString key, cindex, title, action; int accel, type, oponly; for(int i = 0; i < items; i++){ cindex.sprintf("%d", i); @@ -138,8 +138,8 @@ void UserControlMenu::writeKConfig() kConfig->writeEntry("Number", items); - QString key; - QString cindex; + TQString key; + TQString cindex; UserControlMenu *ucm; int type; diff --git a/ksirc/usercontrolmenu.h b/ksirc/usercontrolmenu.h index 1f7a983a..02a313f9 100644 --- a/ksirc/usercontrolmenu.h +++ b/ksirc/usercontrolmenu.h @@ -1,8 +1,8 @@ #ifndef USERCONTROLLERMENU_H #define USERCONTROLLERMENU_H -#include -#include +#include +#include class UserControlMenu { public: @@ -11,28 +11,28 @@ class UserControlMenu { is public so there is no problems changing it in the future. Data is copied internally and deleted when finished. */ - UserControlMenu(const QString& _title = 0, - const QString& _action = 0, + UserControlMenu(const TQString& _title = 0, + const TQString& _action = 0, int _accel = 0, int _type = 0, bool _op_only = FALSE); ~UserControlMenu(); - static QPtrList UserMenu; + static TQPtrList UserMenu; - static QPtrList *parseKConfig(); + static TQPtrList *parseKConfig(); static void writeKConfig(); /** * title in the popup menu */ - QString title; + TQString title; /** * Action to preform, must be of the format "blah lbah %s blah" * where %s will be expanded into the selected nick. */ - QString action; + TQString action; /** * Accelerator key, currently does nothing. diff --git a/ktalkd/kcmktalkd/answmachpage.cpp b/ktalkd/kcmktalkd/answmachpage.cpp index c0aec185..3f426821 100644 --- a/ktalkd/kcmktalkd/answmachpage.cpp +++ b/ktalkd/kcmktalkd/answmachpage.cpp @@ -29,7 +29,7 @@ #include #include // for getenv -KAnswmachPageConfig::KAnswmachPageConfig( QWidget *parent, const char* name, +KAnswmachPageConfig::KAnswmachPageConfig( TQWidget *parent, const char* name, KSimpleConfig *_config) : KCModule (parent, name) { @@ -42,42 +42,42 @@ KAnswmachPageConfig::KAnswmachPageConfig( QWidget *parent, const char* name, config = _config; } - answmach_cb = new QCheckBox(i18n("&Activate answering machine"), this); + answmach_cb = new TQCheckBox(i18n("&Activate answering machine"), this); answmach_cb->adjustSize(); - mail_edit = new QLineEdit(this); + mail_edit = new TQLineEdit(this); mail_edit->adjustSize(); mail_edit->setMinimumWidth(150); - mail_label = new QLabel(mail_edit,i18n("&Mail address:"),this); + mail_label = new TQLabel(mail_edit,i18n("&Mail address:"),this); mail_label->adjustSize(); mail_label->setAlignment( ShowPrefix | AlignVCenter ); - subj_edit = new QLineEdit(this); + subj_edit = new TQLineEdit(this); subj_edit->adjustSize(); subj_edit->setMinimumWidth(150); - subj_label = new QLabel(subj_edit, i18n("Mail s&ubject:"),this); + subj_label = new TQLabel(subj_edit, i18n("Mail s&ubject:"),this); subj_label->adjustSize(); subj_label->setAlignment( ShowPrefix | AlignVCenter ); - subj_tip = new QLabel(i18n("Use %s for the caller name"),this); + subj_tip = new TQLabel(i18n("Use %s for the caller name"),this); subj_tip->setAlignment( ShowPrefix ); - head_edit = new QLineEdit(this); + head_edit = new TQLineEdit(this); head_edit->adjustSize(); head_edit->setMinimumWidth(150); - head_label = new QLabel(head_edit, i18n("Mail &first line:"),this); + head_label = new TQLabel(head_edit, i18n("Mail &first line:"),this); head_label->adjustSize(); head_label->setAlignment( ShowPrefix | AlignVCenter ); - head_tip = new QLabel( + head_tip = new TQLabel( i18n("Use first %s for caller name, and second %s for caller hostname"), this); head_tip->setAlignment( ShowPrefix ); - emptymail_cb = new QCheckBox(i18n("&Receive a mail even if no message left"), this); + emptymail_cb = new TQCheckBox(i18n("&Receive a mail even if no message left"), this); emptymail_cb->adjustSize(); - msg_ml = new QMultiLineEdit(this); + msg_ml = new TQMultiLineEdit(this); msg_ml->adjustSize(); msg_ml->setMinimumWidth(150); - msg_label = new QLabel(msg_ml, i18n("&Banner displayed on answering machine startup:"),this); + msg_label = new TQLabel(msg_ml, i18n("&Banner displayed on answering machine startup:"),this); msg_label->adjustSize(); msg_label->setAlignment( ShowPrefix | AlignVCenter ); @@ -86,24 +86,24 @@ KAnswmachPageConfig::KAnswmachPageConfig( QWidget *parent, const char* name, + head_tip->height() + emptymail_cb->height() + msg_label->height() + msg_ml->height() + 30; setMinimumSize(400, h); // 400 : otherwise, buttons may overlap - msg_default = new QString(i18n("The person you are asking to talk with is not answering.\n" + msg_default = new TQString(i18n("The person you are asking to talk with is not answering.\n" "Please leave a message to be delivered via email.\n" "Just start typing and when you have finished, exit normally.")); load(); - connect(answmach_cb, SIGNAL(clicked()), this, SLOT(answmachOnOff())); + connect(answmach_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(answmachOnOff())); // Emit changed(true) when anything changes - connect(answmach_cb, SIGNAL(clicked()), this, SLOT(slotChanged())); - connect(mail_edit, SIGNAL(textChanged(const QString&)), - this, SLOT(slotChanged())); - connect(subj_edit, SIGNAL(textChanged(const QString&)), - this, SLOT(slotChanged())); - connect(head_edit, SIGNAL(textChanged(const QString&)), - this, SLOT(slotChanged())); - connect(emptymail_cb, SIGNAL(clicked()), this, SLOT(slotChanged())); - connect(msg_ml, SIGNAL(textChanged()), this, SLOT(slotChanged())); + connect(answmach_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChanged())); + connect(mail_edit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotChanged())); + connect(subj_edit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotChanged())); + connect(head_edit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotChanged())); + connect(emptymail_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChanged())); + connect(msg_ml, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotChanged())); } @@ -128,10 +128,10 @@ void KAnswmachPageConfig::slotChanged() { emit changed(true); } -void KAnswmachPageConfig::resizeEvent(QResizeEvent *) { +void KAnswmachPageConfig::resizeEvent(TQResizeEvent *) { int h_txt = answmach_cb->height(); // taken for the general label height - int h_edt = mail_edit->height(); // taken for the general QLineEdit height + int h_edt = mail_edit->height(); // taken for the general TQLineEdit height int spc = h_txt / 3; int w = rect().width(); @@ -223,7 +223,7 @@ void KAnswmachPageConfig::load() { msg_ml->clear(); char m[]="Msg1"; // used as key to read configuration - QString msg; + TQString msg; while (!(msg=config->readEntry(m)).isNull()) { msg_ml->append(msg); @@ -249,7 +249,7 @@ void KAnswmachPageConfig::save() { config->writeEntry("EmptyMail", emptymail_cb->isChecked()); char m[]="Msg1"; // used as key to read configuration int linenr=0; - QString msg; + TQString msg; while ((linenr<8) && (linenrnumLines())) { config->writeEntry(m,msg_ml->textLine(linenr)); diff --git a/ktalkd/kcmktalkd/answmachpage.h b/ktalkd/kcmktalkd/answmachpage.h index 830cc32e..31032a93 100644 --- a/ktalkd/kcmktalkd/answmachpage.h +++ b/ktalkd/kcmktalkd/answmachpage.h @@ -24,16 +24,16 @@ #ifndef __KCONTROL_KANSWMACHPAGE_H__ #define __KCONTROL_KANSWMACHPAGE_H__ -#include +#include /* has to be before everything because of #define Unsorted 0 in X11/X.h !! */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include @@ -44,7 +44,7 @@ class KAnswmachPageConfig : public KCModule Q_OBJECT public: - KAnswmachPageConfig( QWidget *parent=0, const char* name=0, + KAnswmachPageConfig( TQWidget *parent=0, const char* name=0, KSimpleConfig *config=0 ); ~KAnswmachPageConfig( ); @@ -53,7 +53,7 @@ public: void defaults(); protected: - void resizeEvent(QResizeEvent *e); + void resizeEvent(TQResizeEvent *e); private slots: void answmachOnOff(); @@ -63,20 +63,20 @@ private: KSimpleConfig *config; bool delete_config; - QCheckBox *answmach_cb; - QLabel *mail_label; - QLineEdit *mail_edit; - QLabel *subj_label; - QLineEdit *subj_edit; - QLabel *subj_tip; - QLabel *head_label; - QLineEdit *head_edit; - QLabel *head_tip; - QCheckBox *emptymail_cb; - QLabel *msg_label; - QMultiLineEdit *msg_ml; + TQCheckBox *answmach_cb; + TQLabel *mail_label; + TQLineEdit *mail_edit; + TQLabel *subj_label; + TQLineEdit *subj_edit; + TQLabel *subj_tip; + TQLabel *head_label; + TQLineEdit *head_edit; + TQLabel *head_tip; + TQCheckBox *emptymail_cb; + TQLabel *msg_label; + TQMultiLineEdit *msg_ml; - QString *msg_default; + TQString *msg_default; }; #endif diff --git a/ktalkd/kcmktalkd/forwmachpage.cpp b/ktalkd/kcmktalkd/forwmachpage.cpp index 6475927f..0a6337f7 100644 --- a/ktalkd/kcmktalkd/forwmachpage.cpp +++ b/ktalkd/kcmktalkd/forwmachpage.cpp @@ -26,7 +26,7 @@ #include #include -KForwmachPageConfig::KForwmachPageConfig( QWidget *parent, const char* name, +KForwmachPageConfig::KForwmachPageConfig( TQWidget *parent, const char* name, KSimpleConfig *_config) : KCModule (parent, name) { @@ -38,26 +38,26 @@ KForwmachPageConfig::KForwmachPageConfig( QWidget *parent, const char* name, delete_config = false; config = _config; } - forwmach_cb = new QCheckBox(i18n("Activate &forward"), this); + forwmach_cb = new TQCheckBox(i18n("Activate &forward"), this); forwmach_cb->adjustSize(); - address_edit = new QLineEdit(this); + address_edit = new TQLineEdit(this); address_edit->adjustSize(); address_edit->setMinimumWidth(150); - address_label = new QLabel(address_edit,i18n("&Destination (user or user@host):"),this); + address_label = new TQLabel(address_edit,i18n("&Destination (user or user@host):"),this); address_label->adjustSize(); address_label->setAlignment( ShowPrefix | AlignVCenter ); - method_combo = new QComboBox(this); + method_combo = new TQComboBox(this); method_combo->insertItem("FWA"); method_combo->insertItem("FWR"); method_combo->insertItem("FWT"); method_combo->adjustSize(); method_combo->setMinimumWidth(80); - method_label = new QLabel(method_combo, i18n("Forward &method:"),this); + method_label = new TQLabel(method_combo, i18n("Forward &method:"),this); method_label->adjustSize(); method_label->setAlignment( ShowPrefix | AlignVCenter ); - expl_label = new QLabel(i18n( + expl_label = new TQLabel(i18n( "FWA: Forward announcement only. Direct connection. Not recommended.\n\ FWR: Forward all requests, changing info when necessary. Direct connection.\n\ FWT: Forward all requests and handle the talk request. No direct connection.\n\ @@ -75,12 +75,12 @@ See Help for further explanation.\n\ load(); - connect(forwmach_cb, SIGNAL(clicked()), this, SLOT(forwmachOnOff())); + connect(forwmach_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(forwmachOnOff())); // emit changed(true) on changes - connect(forwmach_cb, SIGNAL(clicked()), this, SLOT(slotChanged())); - connect(address_edit, SIGNAL(textChanged(const QString&)), this, SLOT(slotChanged())); - connect(method_combo, SIGNAL(activated(int)), this, SLOT(slotChanged())); + connect(forwmach_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChanged())); + connect(address_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotChanged())); + connect(method_combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChanged())); } KForwmachPageConfig::~KForwmachPageConfig( ) { @@ -100,9 +100,9 @@ void KForwmachPageConfig::slotChanged() { emit changed(true); } -void KForwmachPageConfig::resizeEvent(QResizeEvent *) { +void KForwmachPageConfig::resizeEvent(TQResizeEvent *) { int h_txt = forwmach_cb->height(); // taken for the general label height - int h_edt = address_edit->height(); // taken for the general QLineEdit height + int h_edt = address_edit->height(); // taken for the general TQLineEdit height int spc = h_txt / 3; int w = rect().width(); @@ -148,14 +148,14 @@ void KForwmachPageConfig::load() { config->setGroup("ktalkd"); - QString forward = config->readEntry("Forward","unset"); + TQString forward = config->readEntry("Forward","unset"); forwmach_cb->setChecked(forward!="unset"); if (forward != "unset" ) address_edit->setText(forward); else address_edit->setText(""); - QString forwardMethod = config->readEntry("ForwardMethod","FWR"); + TQString forwardMethod = config->readEntry("ForwardMethod","FWR"); for (int i=0; icount(); i++) if (forwardMethod == method_combo->text(i)) method_combo->setCurrentItem(i); diff --git a/ktalkd/kcmktalkd/forwmachpage.h b/ktalkd/kcmktalkd/forwmachpage.h index 4202fc30..1643aeef 100644 --- a/ktalkd/kcmktalkd/forwmachpage.h +++ b/ktalkd/kcmktalkd/forwmachpage.h @@ -24,16 +24,16 @@ #ifndef __KCONTROL_KFORWMACHPAGE_H__ #define __KCONTROL_KFORWMACHPAGE_H__ -#include +#include /* has to be before everything because of #define Unsorted 0 in X11/X.h !! */ -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include @@ -44,7 +44,7 @@ class KForwmachPageConfig : public KCModule Q_OBJECT public: - KForwmachPageConfig( QWidget *parent=0, const char* name=0, + KForwmachPageConfig( TQWidget *parent=0, const char* name=0, KSimpleConfig *config=0); ~KForwmachPageConfig( ); @@ -53,7 +53,7 @@ public: void defaults(); protected: - void resizeEvent(QResizeEvent *e); + void resizeEvent(TQResizeEvent *e); private slots: void forwmachOnOff(); @@ -63,12 +63,12 @@ private: KSimpleConfig *config; bool delete_config; - QCheckBox *forwmach_cb; - QLabel *address_label; - QLineEdit *address_edit; - QLabel *method_label; - QComboBox * method_combo; - QLabel *expl_label; + TQCheckBox *forwmach_cb; + TQLabel *address_label; + TQLineEdit *address_edit; + TQLabel *method_label; + TQComboBox * method_combo; + TQLabel *expl_label; }; #endif diff --git a/ktalkd/kcmktalkd/main.cpp b/ktalkd/kcmktalkd/main.cpp index 204606d9..06f1e9b8 100644 --- a/ktalkd/kcmktalkd/main.cpp +++ b/ktalkd/kcmktalkd/main.cpp @@ -27,18 +27,18 @@ #include #include #include -#include -#include +#include +#include -KTalkdConfigModule::KTalkdConfigModule(QWidget *parent, const char *name) +KTalkdConfigModule::KTalkdConfigModule(TQWidget *parent, const char *name) : KCModule(parent, name) { config = new KSimpleConfig("ktalkdrc"); announceconfig = new KSimpleConfig("ktalkannouncerc"); - QVBoxLayout *layout = new QVBoxLayout(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); - tab = new QTabWidget(this); + tab = new TQTabWidget(this); layout->addWidget(tab); @@ -50,9 +50,9 @@ KTalkdConfigModule::KTalkdConfigModule(QWidget *parent, const char *name) tab->addTab(answmachpage, i18n("Ans&wering Machine")); tab->addTab(forwmachpage, i18n("forward call", "&Forward")); - connect(soundpage, SIGNAL(changed(bool)), this, SIGNAL(changed(bool))); - connect(answmachpage, SIGNAL(changed(bool)), this, SIGNAL(changed(bool))); - connect(forwmachpage, SIGNAL(changed(bool)), this, SIGNAL(changed(bool))); + connect(soundpage, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool))); + connect(answmachpage, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool))); + connect(forwmachpage, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool))); } KTalkdConfigModule::~KTalkdConfigModule() { @@ -81,29 +81,29 @@ void KTalkdConfigModule::load() if (forwmachpage) forwmachpage->load(); } -void KTalkdConfigModule::resizeEvent(QResizeEvent *) +void KTalkdConfigModule::resizeEvent(TQResizeEvent *) { tab->setGeometry(0,0,width(),height()); } extern "C" { - KDE_EXPORT KCModule *create_ktalkd(QWidget *parent, const char *) + KDE_EXPORT KCModule *create_ktalkd(TQWidget *parent, const char *) { return new KTalkdConfigModule(parent, "kcmktalkd"); } - KDE_EXPORT KCModule *create_ktalkd_answmach(QWidget *parent, const char *) + KDE_EXPORT KCModule *create_ktalkd_answmach(TQWidget *parent, const char *) { return new KAnswmachPageConfig(parent, "kcmktalkd"); } - KDE_EXPORT KCModule *create_ktalkd_sound(QWidget *parent, const char *) + KDE_EXPORT KCModule *create_ktalkd_sound(TQWidget *parent, const char *) { return new KSoundPageConfig(parent, "kcmktalkd"); } - KDE_EXPORT KCModule *create_ktalkd_forwmach(QWidget *parent, const char *) + KDE_EXPORT KCModule *create_ktalkd_forwmach(TQWidget *parent, const char *) { return new KForwmachPageConfig(parent, "kcmktalkd"); } diff --git a/ktalkd/kcmktalkd/main.h b/ktalkd/kcmktalkd/main.h index 3fde07c4..ee6c8a12 100644 --- a/ktalkd/kcmktalkd/main.h +++ b/ktalkd/kcmktalkd/main.h @@ -38,7 +38,7 @@ class KTalkdConfigModule : public KCModule public: - KTalkdConfigModule(QWidget *parent, const char *name); + KTalkdConfigModule(TQWidget *parent, const char *name); virtual ~KTalkdConfigModule(); //void init(); @@ -47,13 +47,13 @@ public: void defaults(); protected: - void resizeEvent(QResizeEvent *); + void resizeEvent(TQResizeEvent *); private: KSimpleConfig *config; KSimpleConfig *announceconfig; - QTabWidget *tab; + TQTabWidget *tab; KSoundPageConfig *soundpage; KAnswmachPageConfig *answmachpage; diff --git a/ktalkd/kcmktalkd/soundpage.cpp b/ktalkd/kcmktalkd/soundpage.cpp index 8f53e304..289b180f 100644 --- a/ktalkd/kcmktalkd/soundpage.cpp +++ b/ktalkd/kcmktalkd/soundpage.cpp @@ -26,11 +26,11 @@ #include //for setenv -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -44,7 +44,7 @@ /* Lots of stuff taken from syssound.cpp */ -KSoundPageConfig::KSoundPageConfig( QWidget *parent, const char* name, +KSoundPageConfig::KSoundPageConfig( TQWidget *parent, const char* name, KSimpleConfig *_config, KSimpleConfig *_announceconfig) : KCModule (parent, name) { @@ -59,70 +59,70 @@ KSoundPageConfig::KSoundPageConfig( QWidget *parent, const char* name, announceconfig = _announceconfig; } - QBoxLayout* toplay = new QVBoxLayout(this, KDialog::marginHint(), + TQBoxLayout* toplay = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint() ); - QGroupBox* extprg_box = new QGroupBox(this); + TQGroupBox* extprg_box = new TQGroupBox(this); extprg_box->setColumnLayout( 0, Qt::Horizontal ); toplay->addWidget(extprg_box); - QGridLayout* l = new QGridLayout(extprg_box->layout()); + TQGridLayout* l = new TQGridLayout(extprg_box->layout()); extprg_edit = new KURLRequester(extprg_box); l->addWidget(extprg_edit, 2, 4); - extprg_label = new QLabel(extprg_edit,i18n("&Announcement program:"), extprg_box); + extprg_label = new TQLabel(extprg_edit,i18n("&Announcement program:"), extprg_box); l->addWidget(extprg_label, 2, 2); client_edit = new KURLRequester(extprg_box); l->addWidget(client_edit, 4, 4); - client_label = new QLabel(client_edit,i18n("&Talk client:"), extprg_box); + client_label = new TQLabel(client_edit,i18n("&Talk client:"), extprg_box); l->addWidget(client_label, 4, 2); toplay->addSpacing(10); - sound_cb = new QCheckBox(i18n("&Play sound"), this); + sound_cb = new TQCheckBox(i18n("&Play sound"), this); toplay->addWidget(sound_cb); - QGroupBox* sound_box = new QGroupBox(this); + TQGroupBox* sound_box = new TQGroupBox(this); toplay->addWidget(sound_box); - QBoxLayout* lay = new QVBoxLayout(sound_box, 10, 10); + TQBoxLayout* lay = new TQVBoxLayout(sound_box, 10, 10); int edit_h = client_edit->height(); // The height of a QLineEdit - sound_list = new QListBox(sound_box); + sound_list = new TQListBox(sound_box); sound_list->setMinimumHeight( 3 * edit_h ); sound_list->setAcceptDrops(true); sound_list->installEventFilter(this); - sound_label = new QLabel(sound_list,i18n("&Sound file:"), sound_box); + sound_label = new TQLabel(sound_list,i18n("&Sound file:"), sound_box); lay->addWidget(sound_label); - QBoxLayout* l2 = new QHBoxLayout(lay, 10); + TQBoxLayout* l2 = new TQHBoxLayout(lay, 10); l2->addWidget(sound_list); - btn_test = new QPushButton(i18n("&Test"), sound_box); + btn_test = new TQPushButton(i18n("&Test"), sound_box); l2->addWidget(btn_test); - sound_tip = new QLabel( + sound_tip = new TQLabel( i18n("Additional WAV files can be dropped onto the sound list."), sound_box); lay->addWidget(sound_tip); - QStringList strlist( KGlobal::dirs()->findAllResources( "sound" ) ); + TQStringList strlist( KGlobal::dirs()->findAllResources( "sound" ) ); sound_list->insertStringList( strlist ); load(); - connect(sound_cb, SIGNAL(clicked()), this, SLOT(soundOnOff())); - connect(btn_test, SIGNAL(clicked()), this, SLOT(playCurrentSound())); + connect(sound_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(soundOnOff())); + connect(btn_test, TQT_SIGNAL(clicked()), this, TQT_SLOT(playCurrentSound())); // emit changed(true) on changes - connect(extprg_edit->lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(slotChanged())); - connect(client_edit->lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(slotChanged())); + connect(extprg_edit->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotChanged())); + connect(client_edit->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotChanged())); } KSoundPageConfig::~KSoundPageConfig( ) { @@ -146,15 +146,15 @@ void KSoundPageConfig::slotChanged() { emit changed(true); } -bool KSoundPageConfig::eventFilter(QObject* /*o*/, QEvent* e) +bool KSoundPageConfig::eventFilter(TQObject* /*o*/, TQEvent* e) { - if (e->type() == QEvent::DragEnter) { - sound_listDragEnterEvent((QDragEnterEvent *) e); + if (e->type() == TQEvent::DragEnter) { + sound_listDragEnterEvent((TQDragEnterEvent *) e); return true; } - if (e->type() == QEvent::Drop) { - sound_listDropEvent((QDropEvent *) e); + if (e->type() == TQEvent::Drop) { + sound_listDropEvent((TQDropEvent *) e); return true; } @@ -162,12 +162,12 @@ bool KSoundPageConfig::eventFilter(QObject* /*o*/, QEvent* e) } -void KSoundPageConfig::sound_listDragEnterEvent(QDragEnterEvent* e) +void KSoundPageConfig::sound_listDragEnterEvent(TQDragEnterEvent* e) { e->accept(KURLDrag::canDecode(e)); } -void KSoundPageConfig::sound_listDropEvent(QDropEvent* e){ +void KSoundPageConfig::sound_listDropEvent(TQDropEvent* e){ KURL::List list; // This should never happen, but anyway... @@ -192,7 +192,7 @@ void KSoundPageConfig::sound_listDropEvent(QDropEvent* e){ { // Now check for the ending ".wav" if (url.path().right(4).upper() != ".WAV") { - QString msg = i18n("%1\ndoes not appear "\ + TQString msg = i18n("%1\ndoes not appear "\ "to be a WAV file.").arg(url.path()); KMessageBox::sorry(this, msg, i18n("Improper File Extension")); @@ -203,7 +203,7 @@ void KSoundPageConfig::sound_listDropEvent(QDropEvent* e){ if (!addToSound_List(url.path())) { // did not add file because it is already in the list - QString msg = i18n("The file %1 is already in the list").arg(url.path()); + TQString msg = i18n("The file %1 is already in the list").arg(url.path()); KMessageBox::information(this, msg, i18n("File Already in List")); @@ -213,7 +213,7 @@ void KSoundPageConfig::sound_listDropEvent(QDropEvent* e){ } } -int KSoundPageConfig::findInSound_List(QString sound) { +int KSoundPageConfig::findInSound_List(TQString sound) { // Searches for in sound_list. Returns position or -1 if not found bool found = false; @@ -229,13 +229,13 @@ int KSoundPageConfig::findInSound_List(QString sound) { return (found ? i-1 : -1); } -bool KSoundPageConfig::addToSound_List(QString sound){ +bool KSoundPageConfig::addToSound_List(TQString sound){ // Add "sound" to the sound list, but only if it is not already there bool found = (findInSound_List(sound) != -1); if (!found) { // Fine, the sound is not already in the sound list! - QString *tmp = new QString(sound); // take a copy... + TQString *tmp = new TQString(sound); // take a copy... sound_list->insertItem(*tmp); sound_list->setTopItem(sound_list->count()-1); @@ -247,7 +247,7 @@ bool KSoundPageConfig::addToSound_List(QString sound){ void KSoundPageConfig::playCurrentSound() { - QString hlp, sname; + TQString hlp, sname; int soundno; soundno = sound_list->currentItem(); @@ -287,7 +287,7 @@ void KSoundPageConfig::load() { config->setGroup("ktalkd"); announceconfig->setGroup("ktalkannounce"); - setenv("KDEBINDIR",QFile::encodeName(KStandardDirs::kde_default("exe")),false/*don't overwrite*/); + setenv("KDEBINDIR",TQFile::encodeName(KStandardDirs::kde_default("exe")),false/*don't overwrite*/); // for the first reading of the config file extprg_edit->lineEdit()->setText(config->readPathEntry("ExtPrg", @@ -298,7 +298,7 @@ void KSoundPageConfig::load() { bool b = announceconfig->readBoolEntry("Sound",true/*default value*/); sound_cb->setChecked(b); - const QString soundFile = announceconfig->readPathEntry("SoundFile"); + const TQString soundFile = announceconfig->readPathEntry("SoundFile"); if (!soundFile.isEmpty()) { int pos = findInSound_List(soundFile); diff --git a/ktalkd/kcmktalkd/soundpage.h b/ktalkd/kcmktalkd/soundpage.h index e47194a2..61fa24dc 100644 --- a/ktalkd/kcmktalkd/soundpage.h +++ b/ktalkd/kcmktalkd/soundpage.h @@ -24,10 +24,10 @@ #ifndef __KCONTROL_KSOUNDPAGE_H__ #define __KCONTROL_KSOUNDPAGE_H__ -#include +#include /* has to be before everything because of #define Unsorted 0 in X11/X.h !! */ -#include +#include #include @@ -48,7 +48,7 @@ class KSoundPageConfig : public KCModule Q_OBJECT public: - KSoundPageConfig( QWidget *parent=0, const char* name=0, + KSoundPageConfig( TQWidget *parent=0, const char* name=0, KSimpleConfig *config=0, KSimpleConfig *announceconfig=0); ~KSoundPageConfig( ); @@ -56,7 +56,7 @@ public: void save(); void defaults(); - bool eventFilter(QObject* o, QEvent* e); + bool eventFilter(TQObject* o, TQEvent* e); private slots: void soundOnOff(); @@ -64,26 +64,26 @@ private slots: void slotChanged(); // Sound DnD - void sound_listDragEnterEvent(QDragEnterEvent* e); - void sound_listDropEvent(QDropEvent* e); + void sound_listDragEnterEvent(TQDragEnterEvent* e); + void sound_listDropEvent(TQDropEvent* e); private: KSimpleConfig *config; KSimpleConfig *announceconfig; bool delete_config; - QLabel *extprg_label; + TQLabel *extprg_label; KURLRequester *extprg_edit; - QLabel *client_label; + TQLabel *client_label; KURLRequester *client_edit; - QCheckBox *sound_cb; - QLabel *sound_label; - QListBox *sound_list; - QLabel *sound_tip; - QPushButton *btn_test; - - int findInSound_List(QString sound); - bool addToSound_List(QString sound); + TQCheckBox *sound_cb; + TQLabel *sound_label; + TQListBox *sound_list; + TQLabel *sound_tip; + TQPushButton *btn_test; + + int findInSound_List(TQString sound); + bool addToSound_List(TQString sound); }; #endif diff --git a/ktalkd/ktalkd/machines/forwmach.cpp b/ktalkd/ktalkd/machines/forwmach.cpp index 4d6b2146..402e4f01 100644 --- a/ktalkd/ktalkd/machines/forwmach.cpp +++ b/ktalkd/ktalkd/machines/forwmach.cpp @@ -428,7 +428,7 @@ char * ForwMachine::forwMachFindMatch(TABLE_ENTRY * table, NEW_CTL_MSG * mp) void sig_handler(int signum) { - ktalk_debug("SIGNAL received : %d",signum); + ktalk_debug("TQT_SIGNAL received : %d",signum); ForwMachine * fwm = ForwMachine::getForwMachine(); fwm->processDelete(); } diff --git a/ktalkd/ktalkd/machines/talkconn.cpp b/ktalkd/ktalkd/machines/talkconn.cpp index 2836bc62..b2e5710a 100644 --- a/ktalkd/ktalkd/machines/talkconn.cpp +++ b/ktalkd/ktalkd/machines/talkconn.cpp @@ -164,7 +164,7 @@ struct in_addr TalkConnection::getReplyAddr (struct in_addr destination) { unsigned char *help1; unsigned char *help2; - /* disabled caching - I don't have QIntDict ... + /* disabled caching - I don't have TQIntDict ... result = replyAddrList [(long) destination.s_addr]; if (result) { return *result; @@ -215,7 +215,7 @@ struct in_addr TalkConnection::getReplyAddr (struct in_addr destination) { } return *result; } -/* QIntDict TalkConnection::replyAddrList; */ +/* TQIntDict TalkConnection::replyAddrList; */ /** Check the remote protocol. Result stored in . * @return 1 if succeeded to find at least 1 protocol */ diff --git a/ktalkd/ktalkd/readcfg++.cpp b/ktalkd/ktalkd/readcfg++.cpp index 07a10dc2..b18edbff 100644 --- a/ktalkd/ktalkd/readcfg++.cpp +++ b/ktalkd/ktalkd/readcfg++.cpp @@ -53,7 +53,7 @@ #include #include #include -#include +#include /* Ktalkd includes */ #include "readconf.h" @@ -89,7 +89,7 @@ int init_user_config(const char * l_name) if (!pw) return 0; else { struct stat buf; - QString cfgFileName, tkannFileName; + TQString cfgFileName, tkannFileName; /* Set $HOME, because KInstance uses it */ setenv("HOME",pw->pw_dir,1 /* overwrite */); @@ -103,14 +103,14 @@ ktalk_debug("%s",pw->pw_dir); ktalk_debug("%s","endpwent"); //WABA: New KConfig should be able to handle this gracefully: - if (stat(QFile::encodeName(tkannFileName),&buf)!=-1) { + if (stat(TQFile::encodeName(tkannFileName),&buf)!=-1) { // check if it exists, 'cause otherwise it would be created empty with // root as owner ! ktkanncfg = new KConfig(tkannFileName); ktkanncfg -> setGroup("ktalkannounce"); ktkanncfg -> setDollarExpansion(true); } else ktkanncfg = 0L; - if (stat(QFile::encodeName(cfgFileName),&buf)!=-1) { + if (stat(TQFile::encodeName(cfgFileName),&buf)!=-1) { // check if it exists, 'cause otherwise it would be created empty with // root as owner ! ktalkdcfg = new KConfig(cfgFileName); @@ -142,7 +142,7 @@ int read_user_config(const char * key, char * result, int max) cfg = ktalkdcfg; if (!cfg) return 0; // file doesn't exist - QString Qresult; + TQString Qresult; if ((Qresult = cfg -> readEntry(key, "unset")) != "unset") { qstrncpy( result, Qresult.ascii(), max); @@ -180,20 +180,20 @@ void end_user_config() int process_config_file(void) { // Where is ktalkdlg installed ? - QString ktalkdlg_dir = locate("exe", "ktalkdlg"); + TQString ktalkdlg_dir = locate("exe", "ktalkdlg"); ktalkdlg_dir.truncate( ktalkdlg_dir.findRev('/') ); // Has to be done, for any $KDEBINDIR in ktalkdrc. - setenv("KDEBINDIR", QFile::encodeName(ktalkdlg_dir), 0/*don't overwrite*/); + setenv("KDEBINDIR", TQFile::encodeName(ktalkdlg_dir), 0/*don't overwrite*/); KConfig * syscfg = new KConfig( "ktalkdrc" ); syscfg -> setGroup("ktalkd"); syscfg -> setDollarExpansion(true); - QString result; + TQString result; #define found(k) (!(result = syscfg -> readEntry(k)).isEmpty()) - // QString cfgStr = cfgStr0.stripWhiteSpace(); + // TQString cfgStr = cfgStr0.stripWhiteSpace(); if (found("AnswMach")) { Options.answmach=booleanresult(result.ascii()); @@ -212,19 +212,19 @@ int process_config_file(void) ktalk_debug("Sound : %d",Options.sound); } if (found("SoundFile")) { - qstrncpy(Options.soundfile,QFile::encodeName(result),S_CFGLINE); + qstrncpy(Options.soundfile,TQFile::encodeName(result),S_CFGLINE); ktalk_debug("SoundFile = %s",Options.soundfile); } if (found("SoundPlayer")) { - qstrncpy(Options.soundplayer,QFile::encodeName(result),S_CFGLINE); + qstrncpy(Options.soundplayer,TQFile::encodeName(result),S_CFGLINE); ktalk_debug("SoundPlayer = %s",Options.soundplayer); } if (found("SoundPlayerOpt")) { - qstrncpy(Options.soundplayeropt,QFile::encodeName(result),S_CFGLINE); + qstrncpy(Options.soundplayeropt,TQFile::encodeName(result),S_CFGLINE); ktalk_debug("SoundPlayerOpt = %s",Options.soundplayeropt); } if (found("MailProg")) { - qstrncpy(Options.mailprog,QFile::encodeName(result),S_CFGLINE); + qstrncpy(Options.mailprog,TQFile::encodeName(result),S_CFGLINE); ktalk_debug("Mail prog = %s",Options.mailprog); } /* text based announcement */ @@ -246,11 +246,11 @@ int process_config_file(void) } if (found("ExtPrg")) { - qstrncpy(Options.extprg,QFile::encodeName(result),S_CFGLINE); + qstrncpy(Options.extprg,TQFile::encodeName(result),S_CFGLINE); ktalk_debug("Ext prg = %s",Options.extprg); } else { /* has to work even without config file at all */ KStandardDirs stddirs; - qstrncpy(Options.extprg, QFile::encodeName(stddirs.findResource("exe","ktalkdlg")), S_CFGLINE-1); + qstrncpy(Options.extprg, TQFile::encodeName(stddirs.findResource("exe","ktalkdlg")), S_CFGLINE-1); } delete syscfg; diff --git a/ktalkd/ktalkd/unixsock.cpp b/ktalkd/ktalkd/unixsock.cpp index 34272405..9547ccf5 100644 --- a/ktalkd/ktalkd/unixsock.cpp +++ b/ktalkd/ktalkd/unixsock.cpp @@ -45,8 +45,8 @@ #include // Needed on some systems. #endif -#include -#include +#include +#include #include "includ.h" #include "proto.h" @@ -80,8 +80,8 @@ bool sendToKtalk (const char *username, const char *announce) } // find sockets of running ktalk clients - QString tempDir = "/tmp"; - QString templ = QString ("ktalk-") + username + "-"; + TQString tempDir = "/tmp"; + TQString templ = TQString ("ktalk-") + username + "-"; bool announceok = FALSE; char buffer [N_CHARS+2]; buffer [0] = 1; @@ -89,9 +89,9 @@ bool sendToKtalk (const char *username, const char *announce) unsigned int announcelen = strlen(buffer); unsigned int len; - DIR *dir = opendir (QFile::encodeName(tempDir)); + DIR *dir = opendir (TQFile::encodeName(tempDir)); struct dirent *entry; - QStrList dirList; + TQStrList dirList; struct sockaddr_un ktalkAddr; ktalkAddr.sun_family = AF_UNIX; while ((entry = readdir (dir))) { @@ -109,9 +109,9 @@ bool sendToKtalk (const char *username, const char *announce) // out who's talking to janet, all I need is to write // a small app that listens on /tmp/ktalk-janet-foo // - if (templ == QFile::decodeName(entry->d_name).left(templ.length())) { - QString path = tempDir + "/" + QFile::decodeName(entry->d_name); - strncpy (ktalkAddr.sun_path, QFile::encodeName(path), sizeof (ktalkAddr.sun_path)); + if (templ == TQFile::decodeName(entry->d_name).left(templ.length())) { + TQString path = tempDir + "/" + TQFile::decodeName(entry->d_name); + strncpy (ktalkAddr.sun_path, TQFile::encodeName(path), sizeof (ktalkAddr.sun_path)); len = sendto (sock, buffer, announcelen, 0, (struct sockaddr *) &ktalkAddr, sizeof (ktalkAddr)); if (len == announcelen) diff --git a/ktalkd/ktalkdlg/ktalkdlg.cpp b/ktalkd/ktalkdlg/ktalkdlg.cpp index b843c990..336c9a04 100644 --- a/ktalkd/ktalkdlg/ktalkdlg.cpp +++ b/ktalkd/ktalkdlg/ktalkdlg.cpp @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -42,21 +42,21 @@ #define MAX_DLG_LIFE RING_WAIT /* so that the dialog lasts exactly the time of an announce */ -class TimeoutDialog : public QMessageBox { +class TimeoutDialog : public TQMessageBox { public: TimeoutDialog (int timeout_ms, - const QString& caption, const QString &text, Icon icon, + const TQString& caption, const TQString &text, Icon icon, int button0, int button1, int button2, - QWidget *parent=0, const char *name=0, bool modal=TRUE, + TQWidget *parent=0, const char *name=0, bool modal=TRUE, WFlags f=WStyle_DialogBorder ): - QMessageBox (caption, text, icon, button0, button1, button2, + TQMessageBox (caption, text, icon, button0, button1, button2, parent, name, modal, f) {startTimer (timeout_ms);} ~TimeoutDialog () {killTimers ();} - virtual void timerEvent (QTimerEvent *) + virtual void timerEvent (TQTimerEvent *) {killTimers (); done (Rejected);} }; @@ -89,7 +89,7 @@ int main (int argc, char **argv) if (args->count() == 0) KCmdLineArgs::usage(i18n("'user@host' expected.")); - QString s; + TQString s; s.sprintf ("%d:%02d", localclock->tm_hour, localclock->tm_min); s = i18n ("Message from talk demon at ") + s + " ...\n" + i18n ("Talk connection requested by ") + args->arg(0); @@ -97,7 +97,7 @@ int main (int argc, char **argv) if ( args->count() == 2 ) { s += '\n'; - QString callee = args->arg(1); + TQString callee = args->arg(1); s += i18n ("for user %1").arg( callee.isEmpty() ? i18n("") : callee ); } @@ -105,12 +105,12 @@ int main (int argc, char **argv) TimeoutDialog dialog (MAX_DLG_LIFE * 1000, i18n ("Talk requested..."), s, - QMessageBox::Information, - QMessageBox::Yes | QMessageBox::Default, - QMessageBox::No | QMessageBox::Escape, + TQMessageBox::Information, + TQMessageBox::Yes | TQMessageBox::Default, + TQMessageBox::No | TQMessageBox::Escape, 0 ); - dialog.setButtonText( QMessageBox::Yes, i18n ("Respond") ); - dialog.setButtonText( QMessageBox::No, i18n ("Ignore") ); + dialog.setButtonText( TQMessageBox::Yes, i18n ("Respond") ); + dialog.setButtonText( TQMessageBox::No, i18n ("Ignore") ); a.setTopWidget (&dialog); @@ -123,7 +123,7 @@ int main (int argc, char **argv) bool bSound = cfg->readNumEntry ("Sound", 0); if (bSound) { - QString soundFile = cfg->readPathEntry ("SoundFile"); + TQString soundFile = cfg->readPathEntry ("SoundFile"); if (soundFile[0] != '/') soundFile = locate( "sound", soundFile ); @@ -134,17 +134,17 @@ int main (int argc, char **argv) //if (!audio) a.beep (); // If no audio is played (whatever reason), beep! int result = dialog.exec (); - if (result == QMessageBox::Yes) { + if (result == TQMessageBox::Yes) { dialog.killTimers (); kdDebug() << "Running talk client..." << endl; - QString konsole = locate("exe", "konsole"); - QString konsole_dir = konsole; + TQString konsole = locate("exe", "konsole"); + TQString konsole_dir = konsole; konsole_dir.truncate( konsole.findRev('/') ); - setenv("KDEBINDIR", QFile::encodeName(konsole_dir).data(), 0/*don't overwrite*/); - QString cmd0 = cfg->readPathEntry ("talkprg", konsole + " -e talk"); + setenv("KDEBINDIR", TQFile::encodeName(konsole_dir).data(), 0/*don't overwrite*/); + TQString cmd0 = cfg->readPathEntry ("talkprg", konsole + " -e talk"); - QString cmd = cmd0.stripWhiteSpace(); + TQString cmd = cmd0.stripWhiteSpace(); cmd += " '"; cmd += args->arg(0); cmd += "' &"; @@ -160,7 +160,7 @@ int main (int argc, char **argv) /* XXX: The sender's name or hostname may contain `rm -rf .` * That's why it's bad to use system() */ - system (QFile::encodeName(cmd)); + system (TQFile::encodeName(cmd)); kapp->quit(); } diff --git a/lanbrowsing/kcmlisa/findnic.cpp b/lanbrowsing/kcmlisa/findnic.cpp index 6e8b025e..721834c9 100644 --- a/lanbrowsing/kcmlisa/findnic.cpp +++ b/lanbrowsing/kcmlisa/findnic.cpp @@ -52,9 +52,9 @@ #if defined(HAVE_GETNAMEINFO) && defined(HAVE_GETIFADDRS) #include #include - #include + #include - QString flags_tos (unsigned int flags); + TQString flags_tos (unsigned int flags); #endif #include "findnic.h" @@ -190,10 +190,10 @@ NICList* findNICs() return nl; } -void suggestSettingsForAddress(const QString& addrMask, LisaConfigInfo& lci) +void suggestSettingsForAddress(const TQString& addrMask, LisaConfigInfo& lci) { - QString ip=addrMask.left(addrMask.find("/")); - QString mask=addrMask.mid(addrMask.find("/")+1); + TQString ip=addrMask.left(addrMask.find("/")); + TQString mask=addrMask.mid(addrMask.find("/")+1); if (mask[mask.length()-1]==';') mask=mask.left(mask.length()-1); @@ -208,10 +208,10 @@ void suggestSettingsForNic(MyNIC* nic, LisaConfigInfo& lci) lci.clear(); if (nic==0) return; - QString address = nic->addr; - QString netmask = nic->netmask; + TQString address = nic->addr; + TQString netmask = nic->netmask; - QString addrMask(address+"/"+netmask+";"); + TQString addrMask(address+"/"+netmask+";"); struct in_addr tmpaddr; inet_aton(nic->netmask.latin1(), &tmpaddr); unsigned int tmp= ntohl(tmpaddr.s_addr); @@ -266,30 +266,30 @@ void LisaConfigInfo::clear() } #if defined(HAVE_GETNAMEINFO) && defined(HAVE_GETIFADDRS) -QString flags_tos (unsigned int flags) +TQString flags_tos (unsigned int flags) { - QString tmp; + TQString tmp; if (flags & IFF_POINTOPOINT) { tmp += i18n("Point to Point"); } if (flags & IFF_BROADCAST) { if (tmp.length()) { - tmp += QString::fromLatin1(", "); + tmp += TQString::fromLatin1(", "); } tmp += i18n("Broadcast"); } if (flags & IFF_MULTICAST) { if (tmp.length()) { - tmp += QString::fromLatin1(", "); + tmp += TQString::fromLatin1(", "); } tmp += i18n("Multicast"); } if (flags & IFF_LOOPBACK) { if (tmp.length()) { - tmp += QString::fromLatin1(", "); + tmp += TQString::fromLatin1(", "); } tmp += i18n("Loopback"); } diff --git a/lanbrowsing/kcmlisa/findnic.h b/lanbrowsing/kcmlisa/findnic.h index 01140bcc..bff0aabb 100644 --- a/lanbrowsing/kcmlisa/findnic.h +++ b/lanbrowsing/kcmlisa/findnic.h @@ -21,8 +21,8 @@ #ifndef FINDNIC_H #define FINDNIC_H -#include -#include +#include +#include #include #include @@ -30,20 +30,20 @@ struct MyNIC { - QString name; - QString addr; - QString netmask; - QString state; - QString type; + TQString name; + TQString addr; + TQString netmask; + TQString state; + TQString type; }; struct LisaConfigInfo { LisaConfigInfo(); void clear(); - QString pingAddresses; - QString broadcastNetwork; - QString allowedAddresses; + TQString pingAddresses; + TQString broadcastNetwork; + TQString allowedAddresses; int secondWait; bool secondScan; int firstWait; @@ -54,7 +54,7 @@ struct LisaConfigInfo }; -typedef QPtrList NICList; +typedef TQPtrList NICList; //some plain C-like helper functions @@ -63,7 +63,7 @@ NICList* findNICs(); ///Enter some settings into lci which might be appropriate for nic void suggestSettingsForNic(MyNIC* nic, LisaConfigInfo& lci); -void suggestSettingsForAddress(const QString& addrMask, LisaConfigInfo& lci); +void suggestSettingsForAddress(const TQString& addrMask, LisaConfigInfo& lci); #endif diff --git a/lanbrowsing/kcmlisa/kcmkiolan.cpp b/lanbrowsing/kcmlisa/kcmkiolan.cpp index 981c6796..297f127b 100644 --- a/lanbrowsing/kcmlisa/kcmkiolan.cpp +++ b/lanbrowsing/kcmlisa/kcmkiolan.cpp @@ -20,39 +20,39 @@ #include "kcmkiolan.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include -IOSlaveSettings::IOSlaveSettings(const QString& config, QWidget *parent) +IOSlaveSettings::IOSlaveSettings(const TQString& config, TQWidget *parent) :KCModule(parent) ,m_config(config,false,true) { - QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); layout->setAutoAdd(true); - QGroupBox* group=new QGroupBox(1, Horizontal, i18n("Show Links for Following Services"), this); + TQGroupBox* group=new TQGroupBox(1, Horizontal, i18n("Show Links for Following Services"), this); m_ftpSettings=new PortSettingsBar(i18n("FTP (TCP, port 21): "), group); m_httpSettings=new PortSettingsBar(i18n("HTTP (TCP, port 80): "),group); m_nfsSettings=new PortSettingsBar(i18n("NFS (TCP, port 2049): "),group); m_smbSettings=new PortSettingsBar(i18n("Windows shares (TCP, ports 445 and 139):"),group); m_fishSettings=new PortSettingsBar(i18n("Secure Shell/Fish (TCP, port 22): "),group); - m_shortHostnames = new QCheckBox(i18n("Show &short hostnames (without domain suffix)"),this); + m_shortHostnames = new TQCheckBox(i18n("Show &short hostnames (without domain suffix)"),this); - QHBox *hbox=new QHBox(this); - QLabel *label=new QLabel(i18n("Default LISa server host: "), hbox); - m_defaultLisaHostLe=new QLineEdit(hbox); + TQHBox *hbox=new TQHBox(this); + TQLabel *label=new TQLabel(i18n("Default LISa server host: "), hbox); + m_defaultLisaHostLe=new TQLineEdit(hbox); label->setBuddy(m_defaultLisaHostLe); - QWidget *w=new QWidget(this); + TQWidget *w=new TQWidget(this); layout->setStretchFactor(m_ftpSettings,0); layout->setStretchFactor(m_httpSettings,0); layout->setStretchFactor(m_nfsSettings,0); @@ -61,13 +61,13 @@ IOSlaveSettings::IOSlaveSettings(const QString& config, QWidget *parent) layout->setStretchFactor(hbox,0); layout->setStretchFactor(w,1); - connect(m_ftpSettings,SIGNAL(changed()),this,SIGNAL(changed())); - connect(m_httpSettings,SIGNAL(changed()),this,SIGNAL(changed())); - connect(m_nfsSettings,SIGNAL(changed()),this,SIGNAL(changed())); - connect(m_smbSettings,SIGNAL(changed()),this,SIGNAL(changed())); - connect(m_fishSettings,SIGNAL(changed()),this,SIGNAL(changed())); - connect(m_shortHostnames,SIGNAL(clicked()),this,SIGNAL(changed())); - connect(m_defaultLisaHostLe, SIGNAL(textChanged(const QString&)),this,SIGNAL(changed())); + connect(m_ftpSettings,TQT_SIGNAL(changed()),this,TQT_SIGNAL(changed())); + connect(m_httpSettings,TQT_SIGNAL(changed()),this,TQT_SIGNAL(changed())); + connect(m_nfsSettings,TQT_SIGNAL(changed()),this,TQT_SIGNAL(changed())); + connect(m_smbSettings,TQT_SIGNAL(changed()),this,TQT_SIGNAL(changed())); + connect(m_fishSettings,TQT_SIGNAL(changed()),this,TQT_SIGNAL(changed())); + connect(m_shortHostnames,TQT_SIGNAL(clicked()),this,TQT_SIGNAL(changed())); + connect(m_defaultLisaHostLe, TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SIGNAL(changed())); } void IOSlaveSettings::load() diff --git a/lanbrowsing/kcmlisa/kcmkiolan.h b/lanbrowsing/kcmlisa/kcmkiolan.h index d6910640..9fd0b2a0 100644 --- a/lanbrowsing/kcmlisa/kcmkiolan.h +++ b/lanbrowsing/kcmlisa/kcmkiolan.h @@ -32,7 +32,7 @@ class IOSlaveSettings:public KCModule { Q_OBJECT public: - IOSlaveSettings(const QString& config, QWidget *parent=0); + IOSlaveSettings(const TQString& config, TQWidget *parent=0); virtual ~IOSlaveSettings() {}; void load(); void save(); @@ -40,14 +40,14 @@ class IOSlaveSettings:public KCModule void changed(); protected: KConfig m_config; - QCheckBox *m_shortHostnames; - QCheckBox *m_rlanSidebar; + TQCheckBox *m_shortHostnames; + TQCheckBox *m_rlanSidebar; PortSettingsBar *m_ftpSettings; PortSettingsBar *m_httpSettings; PortSettingsBar *m_nfsSettings; PortSettingsBar *m_smbSettings; PortSettingsBar *m_fishSettings; - QLineEdit *m_defaultLisaHostLe; + TQLineEdit *m_defaultLisaHostLe; }; #endif diff --git a/lanbrowsing/kcmlisa/kcmlisa.cpp b/lanbrowsing/kcmlisa/kcmlisa.cpp index ee415462..7819b217 100644 --- a/lanbrowsing/kcmlisa/kcmlisa.cpp +++ b/lanbrowsing/kcmlisa/kcmlisa.cpp @@ -29,13 +29,13 @@ #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -48,140 +48,140 @@ #include -LisaSettings::LisaSettings(const QString& config, QWidget *parent) +LisaSettings::LisaSettings(const TQString& config, TQWidget *parent) : KCModule(parent, "kcmlanbrowser") ,m_config(config,false,true) ,m_wizard(0) ,m_configFilename(config) ,m_changed(false) { - QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); layout->setAutoAdd(true); - QWidget *dummy(0); + TQWidget *dummy(0); - QVButtonGroup *gb=new QVButtonGroup(i18n("Tell LISa Daemon How to Search for Hosts"),this); + TQVButtonGroup *gb=new TQVButtonGroup(i18n("Tell LISa Daemon How to Search for Hosts"),this); gb->setInsideSpacing(10); - m_useNmblookup=new QCheckBox(i18n("Send &NetBIOS broadcasts using nmblookup"), gb); - QToolTip::add(m_useNmblookup,i18n("Only hosts running SMB servers will answer")); + m_useNmblookup=new TQCheckBox(i18n("Send &NetBIOS broadcasts using nmblookup"), gb); + TQToolTip::add(m_useNmblookup,i18n("Only hosts running SMB servers will answer")); - m_sendPings=new QCheckBox(i18n("Send &pings (ICMP echo packets)"), gb); - QToolTip::add(m_sendPings,i18n("All hosts running TCP/IP will answer")); + m_sendPings=new TQCheckBox(i18n("Send &pings (ICMP echo packets)"), gb); + TQToolTip::add(m_sendPings,i18n("All hosts running TCP/IP will answer")); - QHBox *hbox=new QHBox(gb); + TQHBox *hbox=new TQHBox(gb); hbox->setSpacing(10); - dummy=new QWidget(hbox); + dummy=new TQWidget(hbox); dummy->setMinimumWidth(10); - QLabel *label=new QLabel(i18n("To these &IP addresses:"),hbox); - QString comment = i18n("Enter all ranges to scan, using the format '192.168.0.1/255.255.255.0;10.0.0.1;255.0.0.0'"); - QToolTip::add(label,comment); + TQLabel *label=new TQLabel(i18n("To these &IP addresses:"),hbox); + TQString comment = i18n("Enter all ranges to scan, using the format '192.168.0.1/255.255.255.0;10.0.0.1;255.0.0.0'"); + TQToolTip::add(label,comment); m_pingAddresses=new KRestrictedLine(hbox,"a","0123456789.-/;"); - QToolTip::add(m_pingAddresses, comment); + TQToolTip::add(m_pingAddresses, comment); label->setBuddy(m_pingAddresses); - QGrid *addressesGrid = new QGrid(2, Qt::Horizontal, this); + TQGrid *addressesGrid = new TQGrid(2, Qt::Horizontal, this); addressesGrid->setSpacing(10); layout->setStretchFactor(addressesGrid,0); - label=new QLabel(i18n("&Broadcast network address:"),addressesGrid); + label=new TQLabel(i18n("&Broadcast network address:"),addressesGrid); comment=i18n("Your network address/subnet mask (e.g. 192.168.0.0/255.255.255.0;)"); - QToolTip::add(label, comment); + TQToolTip::add(label, comment); m_broadcastNetwork=new KRestrictedLine(addressesGrid,"a","0123456789./;"); - QToolTip::add(m_broadcastNetwork,comment); + TQToolTip::add(m_broadcastNetwork,comment); label->setBuddy(m_broadcastNetwork); - label=new QLabel(i18n("&Trusted IP addresses:"),addressesGrid); + label=new TQLabel(i18n("&Trusted IP addresses:"),addressesGrid); comment = i18n("Usually your network address/subnet mask (e.g. 192.168.0.0/255.255.255.0;)"); - QToolTip::add(label, comment); + TQToolTip::add(label, comment); m_allowedAddresses=new KRestrictedLine(addressesGrid,"a","0123456789./;"); - QToolTip::add(m_allowedAddresses, comment); + TQToolTip::add(m_allowedAddresses, comment); label->setBuddy(m_allowedAddresses); - dummy=new QWidget(this); + dummy=new TQWidget(this); layout->setStretchFactor(dummy,10); - hbox = new QHBox(this); + hbox = new TQHBox(this); hbox->setSpacing(10); -// m_autoSetup=new QPushButton(i18n("&Guided LISa Setup..."),hbox); - m_autoSetup=new QPushButton(i18n("Setup Wizard..."),hbox); +// m_autoSetup=new TQPushButton(i18n("&Guided LISa Setup..."),hbox); + m_autoSetup=new TQPushButton(i18n("Setup Wizard..."),hbox); m_autoSetup->setFixedWidth( m_autoSetup->sizeHint().width() ); - m_suggestSettings=new QPushButton(i18n("&Suggest Settings"),hbox); + m_suggestSettings=new TQPushButton(i18n("&Suggest Settings"),hbox); - new QWidget(hbox); + new TQWidget(hbox); - m_advancedSettingsButton=new QPushButton(i18n("Ad&vanced Settings..."),hbox); + m_advancedSettingsButton=new TQPushButton(i18n("Ad&vanced Settings..."),hbox); m_lisaAdvancedDlg=new KDialogBase(0,0,true,i18n("Advanced Settings for LISa"),KDialogBase::Close, KDialogBase::Close); - connect(m_advancedSettingsButton,SIGNAL(clicked()),m_lisaAdvancedDlg,SLOT(show())); + connect(m_advancedSettingsButton,TQT_SIGNAL(clicked()),m_lisaAdvancedDlg,TQT_SLOT(show())); - QVBox *vbox=m_lisaAdvancedDlg->makeVBoxMainWidget(); + TQVBox *vbox=m_lisaAdvancedDlg->makeVBoxMainWidget(); m_pingNames=new KEditListBox(i18n("&Additionally Check These Hosts"),vbox,"a",false, KEditListBox::Add|KEditListBox::Remove); m_pingNames->setMinimumHeight(180); - QToolTip::add(m_pingNames,i18n("The hosts listed here will be pinged")); + TQToolTip::add(m_pingNames,i18n("The hosts listed here will be pinged")); - dummy=new QWidget(vbox); + dummy=new TQWidget(vbox); dummy->setMinimumHeight(10); - m_deliverUnnamedHosts=new QCheckBox(i18n("Show &hosts without DNS names"),vbox); + m_deliverUnnamedHosts=new TQCheckBox(i18n("Show &hosts without DNS names"),vbox); - QGrid *advGrid = new QGrid(2, Qt::Horizontal, vbox); + TQGrid *advGrid = new TQGrid(2, Qt::Horizontal, vbox); advGrid->setSpacing(10); - label=new QLabel(i18n("Host list update interval:"),advGrid); - QToolTip::add(label,i18n("Search hosts after this number of seconds")); - m_updatePeriod=new QSpinBox(30,1800,10,advGrid); + label=new TQLabel(i18n("Host list update interval:"),advGrid); + TQToolTip::add(label,i18n("Search hosts after this number of seconds")); + m_updatePeriod=new TQSpinBox(30,1800,10,advGrid); m_updatePeriod->setSuffix(i18n(" sec")); - QToolTip::add(m_updatePeriod,i18n("Search hosts after this number of seconds")); + TQToolTip::add(m_updatePeriod,i18n("Search hosts after this number of seconds")); - m_secondScan=new QCheckBox(i18n("Always check twice for hosts when searching"),advGrid); - new QWidget(advGrid); + m_secondScan=new TQCheckBox(i18n("Always check twice for hosts when searching"),advGrid); + new TQWidget(advGrid); - label=new QLabel(i18n("Wait for replies from hosts after first scan:"),advGrid); - QToolTip::add(label,i18n("How long to wait for replies to the ICMP echo requests from hosts")); - m_firstWait=new QSpinBox(10,1000,50,advGrid); + label=new TQLabel(i18n("Wait for replies from hosts after first scan:"),advGrid); + TQToolTip::add(label,i18n("How long to wait for replies to the ICMP echo requests from hosts")); + m_firstWait=new TQSpinBox(10,1000,50,advGrid); m_firstWait->setSuffix(i18n(" ms")); - QToolTip::add(m_firstWait,i18n("How long to wait for replies to the ICMP echo requests from hosts")); + TQToolTip::add(m_firstWait,i18n("How long to wait for replies to the ICMP echo requests from hosts")); - label=new QLabel(i18n("Wait for replies from hosts after second scan:"),advGrid); - QToolTip::add(label,i18n("How long to wait for replies to the ICMP echo requests from hosts")); - m_secondWait=new QSpinBox(0,1000,50,advGrid); + label=new TQLabel(i18n("Wait for replies from hosts after second scan:"),advGrid); + TQToolTip::add(label,i18n("How long to wait for replies to the ICMP echo requests from hosts")); + m_secondWait=new TQSpinBox(0,1000,50,advGrid); m_secondWait->setSuffix(i18n(" ms")); - QToolTip::add(m_secondWait,i18n("How long to wait for replies to the ICMP echo requests from hosts")); + TQToolTip::add(m_secondWait,i18n("How long to wait for replies to the ICMP echo requests from hosts")); - label=new QLabel(i18n("Max. number of ping packets to send at once:"),advGrid); - m_maxPingsAtOnce=new QSpinBox(8,1024,5,advGrid); + label=new TQLabel(i18n("Max. number of ping packets to send at once:"),advGrid); + m_maxPingsAtOnce=new TQSpinBox(8,1024,5,advGrid); - dummy=new QWidget(advGrid); + dummy=new TQWidget(advGrid); dummy->setMinimumHeight(10); - connect(m_secondScan,SIGNAL(toggled(bool)),m_secondWait,SLOT(setEnabled(bool))); - connect(m_sendPings,SIGNAL(toggled(bool)),m_pingAddresses,SLOT(setEnabled(bool))); - - connect(m_pingAddresses,SIGNAL(textChanged(const QString&)),this,SIGNAL(changed())); - connect(m_allowedAddresses,SIGNAL(textChanged(const QString&)),this,SIGNAL(changed())); - connect(m_broadcastNetwork,SIGNAL(textChanged(const QString&)),this,SIGNAL(changed())); - - connect(m_pingAddresses,SIGNAL(returnPressed()),this,SIGNAL(changed())); - connect(m_allowedAddresses,SIGNAL(returnPressed()),this,SIGNAL(changed())); - connect(m_broadcastNetwork,SIGNAL(returnPressed()),this,SIGNAL(changed())); - - connect(m_sendPings,SIGNAL(toggled(bool)),this,SIGNAL(changed())); - connect(m_firstWait,SIGNAL(valueChanged(int)),this,SIGNAL(changed())); - connect(m_secondWait,SIGNAL(valueChanged(int)),this,SIGNAL(changed())); - connect(m_maxPingsAtOnce,SIGNAL(valueChanged(int)),this,SIGNAL(changed())); - connect(m_secondScan,SIGNAL(toggled(bool)),this,SIGNAL(changed())); - connect(m_deliverUnnamedHosts,SIGNAL(toggled(bool)),this,SIGNAL(changed())); - connect(m_updatePeriod,SIGNAL(valueChanged(int)),this,SIGNAL(changed())); - connect(m_pingNames,SIGNAL(changed()),this,SIGNAL(changed())); - connect(m_useNmblookup,SIGNAL(toggled(bool)),this,SIGNAL(changed())); - connect(m_autoSetup,SIGNAL(clicked()),this,SLOT(autoSetup())); - connect(m_suggestSettings,SIGNAL(clicked()),this,SLOT(suggestSettings())); - connect(this, SIGNAL(changed()), SLOT(slotChanged())); + connect(m_secondScan,TQT_SIGNAL(toggled(bool)),m_secondWait,TQT_SLOT(setEnabled(bool))); + connect(m_sendPings,TQT_SIGNAL(toggled(bool)),m_pingAddresses,TQT_SLOT(setEnabled(bool))); + + connect(m_pingAddresses,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SIGNAL(changed())); + connect(m_allowedAddresses,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SIGNAL(changed())); + connect(m_broadcastNetwork,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SIGNAL(changed())); + + connect(m_pingAddresses,TQT_SIGNAL(returnPressed()),this,TQT_SIGNAL(changed())); + connect(m_allowedAddresses,TQT_SIGNAL(returnPressed()),this,TQT_SIGNAL(changed())); + connect(m_broadcastNetwork,TQT_SIGNAL(returnPressed()),this,TQT_SIGNAL(changed())); + + connect(m_sendPings,TQT_SIGNAL(toggled(bool)),this,TQT_SIGNAL(changed())); + connect(m_firstWait,TQT_SIGNAL(valueChanged(int)),this,TQT_SIGNAL(changed())); + connect(m_secondWait,TQT_SIGNAL(valueChanged(int)),this,TQT_SIGNAL(changed())); + connect(m_maxPingsAtOnce,TQT_SIGNAL(valueChanged(int)),this,TQT_SIGNAL(changed())); + connect(m_secondScan,TQT_SIGNAL(toggled(bool)),this,TQT_SIGNAL(changed())); + connect(m_deliverUnnamedHosts,TQT_SIGNAL(toggled(bool)),this,TQT_SIGNAL(changed())); + connect(m_updatePeriod,TQT_SIGNAL(valueChanged(int)),this,TQT_SIGNAL(changed())); + connect(m_pingNames,TQT_SIGNAL(changed()),this,TQT_SIGNAL(changed())); + connect(m_useNmblookup,TQT_SIGNAL(toggled(bool)),this,TQT_SIGNAL(changed())); + connect(m_autoSetup,TQT_SIGNAL(clicked()),this,TQT_SLOT(autoSetup())); + connect(m_suggestSettings,TQT_SIGNAL(clicked()),this,TQT_SLOT(suggestSettings())); + connect(this, TQT_SIGNAL(changed()), TQT_SLOT(slotChanged())); } void LisaSettings::load() @@ -242,13 +242,13 @@ void LisaSettings::save() m_config.writeEntry("PingAddresses",m_sendPings->isChecked()?m_pingAddresses->text():""); m_config.writeEntry("AllowedAddresses",m_allowedAddresses->text()); m_config.writeEntry("BroadcastNetwork",m_broadcastNetwork->text()); - QStringList writeStuff; + TQStringList writeStuff; for (int i=0; icount(); i++) writeStuff.append(m_pingNames->text(i)); m_config.writeEntry("PingNames",writeStuff,';'); m_config.sync(); - chmod(QFile::encodeName(m_configFilename),S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); + chmod(TQFile::encodeName(m_configFilename),S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); } else { @@ -260,7 +260,7 @@ void LisaSettings::save() if (tmp.status() == 0 && tmp.textStream()) { m_tmpFilename = tmp.name(); - QTextStream &confStream = *(tmp.textStream()); + TQTextStream &confStream = *(tmp.textStream()); if (m_secondScan->isChecked()) confStream<<"SecondWait = "<<(m_secondWait->value()+5)/10<<"\n"; else @@ -282,15 +282,15 @@ void LisaSettings::save() confStream<<"PingAddresses = "<text().latin1()<<"\n"; confStream<<"AllowedAddresses = "<text().latin1()<<"\n"; confStream<<"BroadcastNetwork = "<text().latin1()<<"\n"; - QString writeStuff; + TQString writeStuff; for (int i=0; icount(); i++) writeStuff=writeStuff+m_pingNames->text(i).latin1()+";"; confStream<<"PingNames = "<count()>1) { - QString msg(i18n("You have more than one network interface installed.
    " + TQString msg(i18n("You have more than one network interface installed.
    " "Please make sure the suggested settings are correct.
    " "
    The following interfaces were found:

    ")); //not that easy to handle @@ -337,7 +337,7 @@ void LisaSettings::suggestSettings() { msg+=""+tmp->name+": "+tmp->addr+"/"+tmp->netmask+";
    "; } - KMessageBox::information(0,QString("%1").arg(msg)); + KMessageBox::information(0,TQString("%1").arg(msg)); } emit changed(); @@ -353,7 +353,7 @@ void LisaSettings::autoSetup() m_wizard->clearAll(); int result=m_wizard->exec(); - if (result!=QDialog::Accepted) + if (result!=TQDialog::Accepted) return; m_pingAddresses->setText(lci.pingAddresses); @@ -375,7 +375,7 @@ void LisaSettings::autoSetup() void LisaSettings::saveDone(KProcess *proc) { - unlink(QFile::encodeName(m_tmpFilename)); + unlink(TQFile::encodeName(m_tmpFilename)); KApplication::restoreOverrideCursor(); setEnabled(true); KMessageBox::information(0,i18n("The configuration has been saved to /etc/lisarc.\n" diff --git a/lanbrowsing/kcmlisa/kcmlisa.h b/lanbrowsing/kcmlisa/kcmlisa.h index 743df96b..42fef9af 100644 --- a/lanbrowsing/kcmlisa/kcmlisa.h +++ b/lanbrowsing/kcmlisa/kcmlisa.h @@ -38,7 +38,7 @@ class LisaSettings:public KCModule { Q_OBJECT public: - LisaSettings(const QString& config, QWidget *parent=0); + LisaSettings(const TQString& config, TQWidget *parent=0); virtual ~LisaSettings() {}; void load(); void save(); @@ -51,27 +51,27 @@ class LisaSettings:public KCModule void suggestSettings(); protected: KConfig m_config; - QPushButton *m_autoSetup; - QCheckBox *m_useNmblookup; - QCheckBox *m_sendPings; + TQPushButton *m_autoSetup; + TQCheckBox *m_useNmblookup; + TQCheckBox *m_sendPings; KRestrictedLine *m_pingAddresses; KEditListBox *m_pingNames; KRestrictedLine *m_allowedAddresses; KRestrictedLine *m_broadcastNetwork; - QSpinBox *m_firstWait; - QCheckBox *m_secondScan; - QSpinBox *m_secondWait; - QSpinBox *m_updatePeriod; - QCheckBox *m_deliverUnnamedHosts; - QSpinBox *m_maxPingsAtOnce; - QPushButton* m_suggestSettings; - QPushButton *m_advancedSettingsButton; + TQSpinBox *m_firstWait; + TQCheckBox *m_secondScan; + TQSpinBox *m_secondWait; + TQSpinBox *m_updatePeriod; + TQCheckBox *m_deliverUnnamedHosts; + TQSpinBox *m_maxPingsAtOnce; + TQPushButton* m_suggestSettings; + TQPushButton *m_advancedSettingsButton; KDialogBase *m_lisaAdvancedDlg; SetupWizard *m_wizard; private: - QString m_tmpFilename; - QString m_configFilename; + TQString m_tmpFilename; + TQString m_configFilename; bool m_changed; }; diff --git a/lanbrowsing/kcmlisa/kcmreslisa.cpp b/lanbrowsing/kcmlisa/kcmreslisa.cpp index 7e92b199..fcaf104c 100644 --- a/lanbrowsing/kcmlisa/kcmreslisa.cpp +++ b/lanbrowsing/kcmlisa/kcmreslisa.cpp @@ -20,15 +20,15 @@ #include "kcmreslisa.h" #include "findnic.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -36,7 +36,7 @@ #include #include -ResLisaSettings::ResLisaSettings(const QString& config, QWidget *parent) +ResLisaSettings::ResLisaSettings(const TQString& config, TQWidget *parent) : KCModule(parent) ,m_config(config,false,true) ,m_kiolanConfig("kio_lanrc",false,true) @@ -53,90 +53,90 @@ ResLisaSettings::ResLisaSettings(const QString& config, QWidget *parent) ,m_maxPingsAtOnce(0) ,m_reslisaAdvancedDlg(0) { - QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); layout->setAutoAdd(true); - QVButtonGroup *gb=new QVButtonGroup(i18n("Tell ResLISa Daemon How to Search for Hosts"),this); + TQVButtonGroup *gb=new TQVButtonGroup(i18n("Tell ResLISa Daemon How to Search for Hosts"),this); gb->setInsideSpacing(10); - m_useNmblookup=new QCheckBox(i18n("Send &NetBIOS broadcasts using &nmblookup"),gb); - QToolTip::add(m_useNmblookup,i18n("Only hosts running SMB servers will answer")); + m_useNmblookup=new TQCheckBox(i18n("Send &NetBIOS broadcasts using &nmblookup"),gb); + TQToolTip::add(m_useNmblookup,i18n("Only hosts running SMB servers will answer")); m_pingNames=new KEditListBox(i18n("A&dditionally Check These Hosts"),gb,"a",false, KEditListBox::Add|KEditListBox::Remove); - QToolTip::add(m_pingNames,i18n("The hosts listed here will be pinged.")); + TQToolTip::add(m_pingNames,i18n("The hosts listed here will be pinged.")); - QHBox *hbox=new QHBox(this); + TQHBox *hbox=new TQHBox(this); hbox->setSpacing(10); - QLabel *label=new QLabel(i18n("&Trusted addresses:"),hbox); - QString comment = i18n("Usually your network address/subnet mask (e.g. 192.168.0.0/255.255.255.0;)"); - QToolTip::add(label, comment); + TQLabel *label=new TQLabel(i18n("&Trusted addresses:"),hbox); + TQString comment = i18n("Usually your network address/subnet mask (e.g. 192.168.0.0/255.255.255.0;)"); + TQToolTip::add(label, comment); m_allowedAddresses=new KRestrictedLine(hbox,"a","0123456789./;"); - QToolTip::add(m_allowedAddresses,comment); + TQToolTip::add(m_allowedAddresses,comment); label->setBuddy(m_allowedAddresses); - m_rlanSidebar = new QCheckBox(i18n("Use &rlan:/ instead of lan:/ in Konqueror's navigation panel"), this); + m_rlanSidebar = new TQCheckBox(i18n("Use &rlan:/ instead of lan:/ in Konqueror's navigation panel"), this); - hbox = new QHBox(this); - m_suggestSettings=new QPushButton(i18n("&Suggest Settings"),hbox); + hbox = new TQHBox(this); + m_suggestSettings=new TQPushButton(i18n("&Suggest Settings"),hbox); - new QWidget(hbox); + new TQWidget(hbox); - m_advancedSettingsButton=new QPushButton(i18n("Ad&vanced Settings"),hbox); + m_advancedSettingsButton=new TQPushButton(i18n("Ad&vanced Settings"),hbox); m_reslisaAdvancedDlg=new KDialogBase(0,0,true,i18n("Advanced Settings for ResLISa"),KDialogBase::Close, KDialogBase::Close); - connect(m_advancedSettingsButton,SIGNAL(clicked()),m_reslisaAdvancedDlg,SLOT(show())); + connect(m_advancedSettingsButton,TQT_SIGNAL(clicked()),m_reslisaAdvancedDlg,TQT_SLOT(show())); - QVBox *vbox=m_reslisaAdvancedDlg->makeVBoxMainWidget(); + TQVBox *vbox=m_reslisaAdvancedDlg->makeVBoxMainWidget(); - m_deliverUnnamedHosts=new QCheckBox(i18n("Show &hosts without DNS names"),vbox); + m_deliverUnnamedHosts=new TQCheckBox(i18n("Show &hosts without DNS names"),vbox); - QGrid *advGrid = new QGrid(2, Qt::Horizontal, vbox); + TQGrid *advGrid = new TQGrid(2, Qt::Horizontal, vbox); advGrid->setSpacing(10); - label=new QLabel(i18n("Host list update interval:"),advGrid); - QToolTip::add(label,i18n("Search hosts after this number of seconds")); - m_updatePeriod=new QSpinBox(30,1800,10,advGrid); + label=new TQLabel(i18n("Host list update interval:"),advGrid); + TQToolTip::add(label,i18n("Search hosts after this number of seconds")); + m_updatePeriod=new TQSpinBox(30,1800,10,advGrid); m_updatePeriod->setSuffix(i18n(" sec")); - QToolTip::add(m_updatePeriod,i18n("Search hosts after this number of seconds")); + TQToolTip::add(m_updatePeriod,i18n("Search hosts after this number of seconds")); - m_secondScan=new QCheckBox(i18n("Always check twice for hosts when searching"),advGrid); - new QWidget(advGrid); + m_secondScan=new TQCheckBox(i18n("Always check twice for hosts when searching"),advGrid); + new TQWidget(advGrid); - label=new QLabel(i18n("Wait for replies from hosts after first scan:"),advGrid); - QToolTip::add(label,i18n("How long to wait for replies to the ICMP echo requests from hosts")); - m_firstWait=new QSpinBox(10,1000,50,advGrid); + label=new TQLabel(i18n("Wait for replies from hosts after first scan:"),advGrid); + TQToolTip::add(label,i18n("How long to wait for replies to the ICMP echo requests from hosts")); + m_firstWait=new TQSpinBox(10,1000,50,advGrid); m_firstWait->setSuffix(i18n(" ms")); - QToolTip::add(m_firstWait,i18n("How long to wait for replies to the ICMP echo requests from hosts")); + TQToolTip::add(m_firstWait,i18n("How long to wait for replies to the ICMP echo requests from hosts")); - label=new QLabel(i18n("Wait for replies from hosts after second scan:"),advGrid); - QToolTip::add(label,i18n("How long to wait for replies to the ICMP echo requests from hosts")); - m_secondWait=new QSpinBox(0,1000,50,advGrid); + label=new TQLabel(i18n("Wait for replies from hosts after second scan:"),advGrid); + TQToolTip::add(label,i18n("How long to wait for replies to the ICMP echo requests from hosts")); + m_secondWait=new TQSpinBox(0,1000,50,advGrid); m_secondWait->setSuffix(i18n(" ms")); - QToolTip::add(m_secondWait,i18n("How long to wait for replies to the ICMP echo requests from hosts")); + TQToolTip::add(m_secondWait,i18n("How long to wait for replies to the ICMP echo requests from hosts")); - label=new QLabel(i18n("Max. number of ping packets to send at once:"),advGrid); - m_maxPingsAtOnce=new QSpinBox(8,1024,5,advGrid); + label=new TQLabel(i18n("Max. number of ping packets to send at once:"),advGrid); + m_maxPingsAtOnce=new TQSpinBox(8,1024,5,advGrid); - QWidget *dummy=new QWidget(advGrid); + TQWidget *dummy=new TQWidget(advGrid); dummy->setMinimumHeight(10); - connect(m_secondScan,SIGNAL(toggled(bool)),m_secondWait,SLOT(setEnabled(bool))); + connect(m_secondScan,TQT_SIGNAL(toggled(bool)),m_secondWait,TQT_SLOT(setEnabled(bool))); - connect(m_allowedAddresses,SIGNAL(textChanged(const QString&)),this,SIGNAL(changed())); + connect(m_allowedAddresses,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SIGNAL(changed())); - connect(m_allowedAddresses,SIGNAL(returnPressed()),this,SIGNAL(changed())); + connect(m_allowedAddresses,TQT_SIGNAL(returnPressed()),this,TQT_SIGNAL(changed())); - connect(m_firstWait,SIGNAL(valueChanged(int)),this,SIGNAL(changed())); - connect(m_secondWait,SIGNAL(valueChanged(int)),this,SIGNAL(changed())); - connect(m_maxPingsAtOnce,SIGNAL(valueChanged(int)),this,SIGNAL(changed())); - connect(m_secondScan,SIGNAL(toggled(bool)),this,SIGNAL(changed())); - connect(m_deliverUnnamedHosts,SIGNAL(toggled(bool)),this,SIGNAL(changed())); - connect(m_updatePeriod,SIGNAL(valueChanged(int)),this,SIGNAL(changed())); - connect(m_pingNames,SIGNAL(changed()),this,SIGNAL(changed())); - connect(m_useNmblookup,SIGNAL(toggled(bool)),this,SIGNAL(changed())); - connect(m_suggestSettings,SIGNAL(clicked()),this,SLOT(suggestSettings())); - connect(m_rlanSidebar,SIGNAL(clicked()),this,SIGNAL(changed())); + connect(m_firstWait,TQT_SIGNAL(valueChanged(int)),this,TQT_SIGNAL(changed())); + connect(m_secondWait,TQT_SIGNAL(valueChanged(int)),this,TQT_SIGNAL(changed())); + connect(m_maxPingsAtOnce,TQT_SIGNAL(valueChanged(int)),this,TQT_SIGNAL(changed())); + connect(m_secondScan,TQT_SIGNAL(toggled(bool)),this,TQT_SIGNAL(changed())); + connect(m_deliverUnnamedHosts,TQT_SIGNAL(toggled(bool)),this,TQT_SIGNAL(changed())); + connect(m_updatePeriod,TQT_SIGNAL(valueChanged(int)),this,TQT_SIGNAL(changed())); + connect(m_pingNames,TQT_SIGNAL(changed()),this,TQT_SIGNAL(changed())); + connect(m_useNmblookup,TQT_SIGNAL(toggled(bool)),this,TQT_SIGNAL(changed())); + connect(m_suggestSettings,TQT_SIGNAL(clicked()),this,TQT_SLOT(suggestSettings())); + connect(m_rlanSidebar,TQT_SIGNAL(clicked()),this,TQT_SIGNAL(changed())); load(); } @@ -193,7 +193,7 @@ void ResLisaSettings::save() m_config.writeEntry("UpdatePeriod",m_updatePeriod->value()); m_config.writeEntry("AllowedAddresses",m_allowedAddresses->text()); //m_config.writeEntry("BroadcastNetwork",m_broadcastNetwork->text()); - QStringList writeStuff; + TQStringList writeStuff; for (int i=0; icount(); i++) writeStuff.append(m_pingNames->text(i)); m_config.writeEntry("PingNames",writeStuff,';'); @@ -217,8 +217,8 @@ void ResLisaSettings::suggestSettings() } MyNIC *nic=nics->first(); - QString address = nic->addr; - QString netmask = nic->netmask; + TQString address = nic->addr; + TQString netmask = nic->netmask; m_allowedAddresses->setText(address+"/"+netmask+";"); m_secondWait->setValue(0); m_secondScan->setChecked(FALSE); @@ -229,7 +229,7 @@ void ResLisaSettings::suggestSettings() m_useNmblookup->setChecked(true); if (nics->count()>1) { - QString msg(i18n("You have more than one network interface installed.
    " + TQString msg(i18n("You have more than one network interface installed.
    " "Please make sure the suggested settings are correct.
    " "
    The following interfaces were found:

    ")); //not that easy to handle @@ -237,9 +237,9 @@ void ResLisaSettings::suggestSettings() { msg+=""+tmp->name+": "+tmp->addr+"/"+tmp->netmask+";
    "; } - KMessageBox::information(0,QString("%1").arg(msg)); + KMessageBox::information(0,TQString("%1").arg(msg)); } - KMessageBox::information(0,QString("%1").arg(i18n("The ResLISa daemon is now configured " + KMessageBox::information(0,TQString("%1").arg(i18n("The ResLISa daemon is now configured " "correctly, hopefully.
    Make sure that the reslisa binary is installed suid root."))); emit changed(); diff --git a/lanbrowsing/kcmlisa/kcmreslisa.h b/lanbrowsing/kcmlisa/kcmreslisa.h index 6247cc81..adadd1cd 100644 --- a/lanbrowsing/kcmlisa/kcmreslisa.h +++ b/lanbrowsing/kcmlisa/kcmreslisa.h @@ -36,7 +36,7 @@ class ResLisaSettings:public KCModule { Q_OBJECT public: - ResLisaSettings(const QString& config, QWidget *parent=0); + ResLisaSettings(const TQString& config, TQWidget *parent=0); virtual ~ResLisaSettings() {} void load(); void save(); @@ -47,19 +47,19 @@ class ResLisaSettings:public KCModule protected: KConfig m_config; KConfig m_kiolanConfig; - QPushButton* m_advancedSettingsButton; - QPushButton* m_suggestSettings; - QCheckBox* m_useNmblookup; + TQPushButton* m_advancedSettingsButton; + TQPushButton* m_suggestSettings; + TQCheckBox* m_useNmblookup; KEditListBox *m_pingNames; KRestrictedLine *m_allowedAddresses; - QSpinBox *m_firstWait; - QCheckBox *m_secondScan; - QSpinBox *m_secondWait; - QSpinBox *m_updatePeriod; - QCheckBox *m_deliverUnnamedHosts; - QSpinBox *m_maxPingsAtOnce; - QCheckBox* m_rlanSidebar; + TQSpinBox *m_firstWait; + TQCheckBox *m_secondScan; + TQSpinBox *m_secondWait; + TQSpinBox *m_updatePeriod; + TQCheckBox *m_deliverUnnamedHosts; + TQSpinBox *m_maxPingsAtOnce; + TQCheckBox* m_rlanSidebar; KDialogBase* m_reslisaAdvancedDlg; }; diff --git a/lanbrowsing/kcmlisa/main.cpp b/lanbrowsing/kcmlisa/main.cpp index 7e68d345..00d03e52 100644 --- a/lanbrowsing/kcmlisa/main.cpp +++ b/lanbrowsing/kcmlisa/main.cpp @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -33,15 +33,15 @@ extern "C" { - KDE_EXPORT KCModule *create_lisa(QWidget *parent, const char *) + KDE_EXPORT KCModule *create_lisa(TQWidget *parent, const char *) { return new LisaSettings("/etc/lisarc", parent); } - KDE_EXPORT KCModule *create_reslisa(QWidget *parent, const char *) + KDE_EXPORT KCModule *create_reslisa(TQWidget *parent, const char *) { - return new ResLisaSettings(QDir::homeDirPath()+"/.reslisarc", parent); + return new ResLisaSettings(TQDir::homeDirPath()+"/.reslisarc", parent); } - KDE_EXPORT KCModule *create_kiolan(QWidget *parent, const char *) + KDE_EXPORT KCModule *create_kiolan(TQWidget *parent, const char *) { return new IOSlaveSettings("kio_lanrc", parent); } diff --git a/lanbrowsing/kcmlisa/portsettingsbar.cpp b/lanbrowsing/kcmlisa/portsettingsbar.cpp index 540ea894..3e94c730 100644 --- a/lanbrowsing/kcmlisa/portsettingsbar.cpp +++ b/lanbrowsing/kcmlisa/portsettingsbar.cpp @@ -21,20 +21,20 @@ #include "portsettingsbar.h" #include -#include +#include -PortSettingsBar::PortSettingsBar(const QString& title, QWidget *parent) -:QHBox(parent) +PortSettingsBar::PortSettingsBar(const TQString& title, TQWidget *parent) +:TQHBox(parent) { - QLabel* label=new QLabel(title, this); - m_box=new QComboBox(this); + TQLabel* label=new TQLabel(title, this); + m_box=new TQComboBox(this); label->setBuddy(m_box); m_box->insertItem(i18n("Check Availability")); m_box->insertItem(i18n("Always")); m_box->insertItem(i18n("Never")); - connect(m_box,SIGNAL(activated(int)),this,SIGNAL(changed())); + connect(m_box,TQT_SIGNAL(activated(int)),this,TQT_SIGNAL(changed())); } int PortSettingsBar::selected() const diff --git a/lanbrowsing/kcmlisa/portsettingsbar.h b/lanbrowsing/kcmlisa/portsettingsbar.h index 35c372f5..150390dc 100644 --- a/lanbrowsing/kcmlisa/portsettingsbar.h +++ b/lanbrowsing/kcmlisa/portsettingsbar.h @@ -21,8 +21,8 @@ #ifndef PORTSETTINGSBAR_H #define PORTSETTINGSBAR_H -#include -#include +#include +#include #define PORTSETTINGS_CHECK 0 #define PORTSETTINGS_PROVIDE 1 @@ -32,14 +32,14 @@ class PortSettingsBar:public QHBox { Q_OBJECT public: - PortSettingsBar(const QString& title, QWidget *parent=0); + PortSettingsBar(const TQString& title, TQWidget *parent=0); virtual ~PortSettingsBar() {}; int selected() const; void setChecked(int what); signals: void changed(); protected: - QComboBox *m_box; + TQComboBox *m_box; }; #endif diff --git a/lanbrowsing/kcmlisa/setupwizard.cpp b/lanbrowsing/kcmlisa/setupwizard.cpp index 8b304359..fbe8db4e 100644 --- a/lanbrowsing/kcmlisa/setupwizard.cpp +++ b/lanbrowsing/kcmlisa/setupwizard.cpp @@ -20,7 +20,7 @@ #include "setupwizard.h" -#include +#include #include #include @@ -31,8 +31,8 @@ #include #include -SetupWizard::SetupWizard(QWidget* parent, LisaConfigInfo* configInfo) - :QWizard(parent,"hallo",true) +SetupWizard::SetupWizard(TQWidget* parent, LisaConfigInfo* configInfo) + :TQWizard(parent,"hallo",true) ,m_page1(0) ,m_noNicPage(0) ,m_multiNicPage(0) @@ -60,7 +60,7 @@ SetupWizard::SetupWizard(QWidget* parent, LisaConfigInfo* configInfo) ,m_nics(0) ,m_configInfo(configInfo) { - QString title( i18n("LISa Network Neighborhood Setup") ); + TQString title( i18n("LISa Network Neighborhood Setup") ); setCaption(title); m_configInfo->clear(); @@ -121,9 +121,9 @@ void SetupWizard::clearAll() void SetupWizard::setupPage1() { - m_page1 = new QVBox( this ); + m_page1 = new TQVBox( this ); - new QLabel(i18n("

    This wizard will ask you a few questions about your network.

    " + new TQLabel(i18n("

    This wizard will ask you a few questions about your network.

    " "

    Usually you can simply keep the suggested settings.

    " "

    After you have finished the wizard, you will be able to browse and use " "shared resources on your LAN, not only Samba/Windows shares, but also " @@ -134,7 +134,7 @@ void SetupWizard::setupPage1() "only one LISa server can run on one machine."), m_page1); - QWidget *dummy=new QWidget(m_page1); + TQWidget *dummy=new TQWidget(m_page1); m_page1->setStretchFactor(dummy,10); m_page1->setSpacing(KDialog::spacingHint()); m_page1->setMargin(KDialog::marginHint()); @@ -145,23 +145,23 @@ void SetupWizard::setupPage1() void SetupWizard::setupMultiNicPage() { - m_multiNicPage=new QVBox(this); - new QLabel(i18n("

    More than one network interface card was found on your system.

    " + m_multiNicPage=new TQVBox(this); + new TQLabel(i18n("

    More than one network interface card was found on your system.

    " "

    Please choose the one to which your LAN is connected.

    "), m_multiNicPage); m_multiNicPage->setMargin(KDialog::marginHint()); m_multiNicPage->setSpacing(KDialog::spacingHint()); - m_nicListBox=new QListBox(m_multiNicPage); - m_nicListBox->setSelectionMode(QListBox::Single); + m_nicListBox=new TQListBox(m_multiNicPage); + m_nicListBox->setSelectionMode(TQListBox::Single); setHelpEnabled( m_multiNicPage, false ); } void SetupWizard::setupNoNicPage() { - m_noNicPage=new QVBox(this); - new QLabel(i18n("

    No network interface card was found on your system.

    " + m_noNicPage=new TQVBox(this); + new TQLabel(i18n("

    No network interface card was found on your system.

    " "

    Possible reason: no network card is installed. You probably want to cancel now " "or enter your IP address and network manually

    " "Example: 192.168.0.1/255.255.255.0.
    "), @@ -170,8 +170,8 @@ void SetupWizard::setupNoNicPage() m_noNicPage->setMargin(KDialog::marginHint()); m_noNicPage->setSpacing(KDialog::spacingHint()); m_manualAddress=new KRestrictedLine(m_noNicPage,"0123456789./"); - connect(m_manualAddress,SIGNAL(textChanged(const QString&)),this,SLOT(checkIPAddress(const QString&))); - QWidget *dummy=new QWidget(m_noNicPage); + connect(m_manualAddress,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(checkIPAddress(const TQString&))); + TQWidget *dummy=new TQWidget(m_noNicPage); m_noNicPage->setStretchFactor(dummy,10); setNextEnabled(m_noNicPage, false); @@ -181,24 +181,24 @@ void SetupWizard::setupNoNicPage() void SetupWizard::setupSearchPage() { - m_searchPage=new QVBox(this); - QLabel *info=new QLabel(i18n("There are two ways LISa can search hosts on your network."),m_searchPage); + m_searchPage=new TQVBox(this); + TQLabel *info=new TQLabel(i18n("There are two ways LISa can search hosts on your network."),m_searchPage); info->setTextFormat(Qt::RichText); - m_ping=new QCheckBox(i18n("Send pings"), m_searchPage); - info=new QLabel(i18n("All hosts with TCP/IP will respond,
    " + m_ping=new TQCheckBox(i18n("Send pings"), m_searchPage); + info=new TQLabel(i18n("All hosts with TCP/IP will respond,
    " "whether or not they are samba servers.
    " "Don\'t use it if your network is very large, i.e. more than 1000 hosts.
    "),m_searchPage); - m_nmblookup=new QCheckBox(i18n("Send NetBIOS broadcasts"),m_searchPage); - info=new QLabel(i18n("You need to have the samba package (nmblookup) installed.
    " + m_nmblookup=new TQCheckBox(i18n("Send NetBIOS broadcasts"),m_searchPage); + info=new TQLabel(i18n("You need to have the samba package (nmblookup) installed.
    " "Only samba/windows servers will respond.
    " "This method is not very reliable.
    " "You should enable it if you are part of a large network."),m_searchPage); info->setTextFormat(Qt::RichText); - QWidget *dummy=new QWidget(m_searchPage); + TQWidget *dummy=new TQWidget(m_searchPage); m_searchPage->setStretchFactor(dummy,10); m_searchPage->setSpacing(KDialog::spacingHint()); m_searchPage->setMargin(KDialog::marginHint()); - info=new QLabel(i18n("If unsure, keep it as is."),m_searchPage); + info=new TQLabel(i18n("If unsure, keep it as is."),m_searchPage); info->setAlignment(AlignRight|AlignVCenter); setHelpEnabled( m_searchPage, false ); @@ -206,13 +206,13 @@ void SetupWizard::setupSearchPage() void SetupWizard::setupAddressesPage() { - m_addressesPage=new QVBox(this); - QLabel *info=new QLabel(i18n("All IP addresses included in the specified range will be pinged.
    " + m_addressesPage=new TQVBox(this); + TQLabel *info=new TQLabel(i18n("All IP addresses included in the specified range will be pinged.
    " "If you are part of a small network, e.g. with network mask 255.255.255.0
    " "use your IP address/network mask.
    "),m_addressesPage); info->setTextFormat(Qt::RichText); m_pingAddresses=new KRestrictedLine(m_addressesPage,"0123456789./;-"); - info=new QLabel(i18n("
    There are four ways to specify address ranges:
    " + info=new TQLabel(i18n("
    There are four ways to specify address ranges:
    " "1. IP address/network mask, like 192.168.0.0/255.255.255.0;
    " "2. single IP addresses, like 10.0.0.23;
    " "3. continuous ranges, like 10.0.1.0-10.0.1.200;
    " @@ -220,11 +220,11 @@ void SetupWizard::setupAddressesPage() "You can also enter combinations of 1 to 4, separated by \";\", like
    " "192.168.0.0/255.255.255.0;10.0.0.0;10.0.1.1-10.0.1.100;
    "),m_addressesPage); info->setAlignment(AlignLeft|AlignVCenter|WordBreak); - QWidget *dummy=new QWidget(m_addressesPage); + TQWidget *dummy=new TQWidget(m_addressesPage); m_addressesPage->setStretchFactor(dummy,10); m_addressesPage->setSpacing(KDialog::spacingHint()); m_addressesPage->setMargin(KDialog::marginHint()); - info=new QLabel(i18n("If unsure, keep it as is."), m_addressesPage); + info=new TQLabel(i18n("If unsure, keep it as is."), m_addressesPage); info->setAlignment(AlignRight|AlignVCenter); setHelpEnabled( m_addressesPage, false ); @@ -232,21 +232,21 @@ void SetupWizard::setupAddressesPage() void SetupWizard::setupAllowedPage() { - m_allowedAddressesPage=new QVBox(this); - QLabel* info=new QLabel(i18n("This is a security related setting.
    " + m_allowedAddressesPage=new TQVBox(this); + TQLabel* info=new TQLabel(i18n("This is a security related setting.
    " "It provides a simple IP address based way to specify \"trusted\" hosts.
    " "Only hosts which fit into the addresses given here are accepted by LISa as clients. " "The list of hosts published by LISa will also only contain hosts which fit into this scheme.
    " "Usually you enter your IP address/network mask here."),m_allowedAddressesPage); info->setAlignment(AlignLeft|AlignVCenter|WordBreak); m_allowedAddresses=new KRestrictedLine(m_allowedAddressesPage,"0123456789./-;"); - m_trustedHostsLabel=new QLabel(m_allowedAddressesPage); + m_trustedHostsLabel=new TQLabel(m_allowedAddressesPage); - QWidget *dummy=new QWidget(m_allowedAddressesPage); + TQWidget *dummy=new TQWidget(m_allowedAddressesPage); m_allowedAddressesPage->setStretchFactor(dummy,10); m_allowedAddressesPage->setSpacing(KDialog::spacingHint()); m_allowedAddressesPage->setMargin(KDialog::marginHint()); - info=new QLabel(i18n("If unsure, keep it as is."), m_allowedAddressesPage); + info=new TQLabel(i18n("If unsure, keep it as is."), m_allowedAddressesPage); info->setAlignment(AlignRight|AlignVCenter); setHelpEnabled( m_allowedAddressesPage, false ); @@ -254,19 +254,19 @@ void SetupWizard::setupAllowedPage() void SetupWizard::setupBcastPage() { - m_bcastPage=new QVBox(this); - QLabel *info=new QLabel(i18n("
    Enter your IP address and network mask here, like 192.168.0.1/255.255.255.0"),m_bcastPage); + m_bcastPage=new TQVBox(this); + TQLabel *info=new TQLabel(i18n("
    Enter your IP address and network mask here, like 192.168.0.1/255.255.255.0"),m_bcastPage); info->setAlignment(AlignLeft|AlignVCenter|WordBreak); m_bcastAddress=new KRestrictedLine(m_bcastPage,"0123456789./"); - info=new QLabel(i18n("
    To reduce the network load, the LISa servers in one network
    " + info=new TQLabel(i18n("
    To reduce the network load, the LISa servers in one network
    " "cooperate with each other. Therefore you have to enter the broadcast
    " "address here. If you are connected to more than one network, choose
    " "one of the broadcast addresses."),m_bcastPage); info->setAlignment(AlignLeft|AlignVCenter|WordBreak); - QWidget *dummy=new QWidget(m_bcastPage); + TQWidget *dummy=new TQWidget(m_bcastPage); m_bcastPage->setStretchFactor(dummy,10); m_bcastPage->setSpacing(KDialog::spacingHint()); - info=new QLabel(i18n("If unsure, keep it as is."), m_bcastPage); + info=new TQLabel(i18n("If unsure, keep it as is."), m_bcastPage); info->setAlignment(AlignRight|AlignVCenter); m_bcastPage->setSpacing(KDialog::spacingHint()); @@ -276,23 +276,23 @@ void SetupWizard::setupBcastPage() void SetupWizard::setupUpdateIntervalPage() { - m_intervalPage=new QVBox(this); - QLabel *info=new QLabel(i18n("
    Enter the interval after which LISa, if busy, will update its host list."),m_intervalPage); + m_intervalPage=new TQVBox(this); + TQLabel *info=new TQLabel(i18n("
    Enter the interval after which LISa, if busy, will update its host list."),m_intervalPage); info->setTextFormat(Qt::RichText); - m_updatePeriod=new QSpinBox(300,1800,10,m_intervalPage); + m_updatePeriod=new TQSpinBox(300,1800,10,m_intervalPage); m_updatePeriod->setSuffix(i18n(" sec")); - info=new QLabel(i18n("
    Please note that the update interval will grow automatically by " + info=new TQLabel(i18n("
    Please note that the update interval will grow automatically by " "up to 16 times the value you enter here, if nobody accesses the LISa server. " "So if you enter 300 sec = 5 min here, this does not mean that LISa will ping " "your whole network every 5 minutes. The interval will increase up to 16 x 5 min = 80 min."),m_intervalPage); info->setAlignment(AlignLeft|AlignVCenter|WordBreak); - QWidget *dummy=new QWidget(m_intervalPage); + TQWidget *dummy=new TQWidget(m_intervalPage); m_intervalPage->setStretchFactor(dummy,10); m_intervalPage->setSpacing(KDialog::spacingHint()); m_intervalPage->setMargin(KDialog::marginHint()); - info=new QLabel(i18n("If unsure, keep it as is."), m_intervalPage); + info=new TQLabel(i18n("If unsure, keep it as is."), m_intervalPage); info->setAlignment(AlignRight|AlignVCenter); info->setTextFormat(Qt::RichText); @@ -301,53 +301,53 @@ void SetupWizard::setupUpdateIntervalPage() void SetupWizard::setupAdvancedSettingsPage() { - m_advancedPage=new QVBox(this); - QLabel *info=new QLabel(i18n("This page contains several settings you usually only
    " + m_advancedPage=new TQVBox(this); + TQLabel *info=new TQLabel(i18n("This page contains several settings you usually only
    " "need if LISa doesn't find all hosts in your network."),m_advancedPage); info->setTextFormat(Qt::RichText); - m_deliverUnnamedHosts=new QCheckBox(i18n("Re&port unnamed hosts"),m_advancedPage); - info=new QLabel(i18n("Should hosts for which LISa can\'t resolve the name be included in the host list?
    "),m_advancedPage); + m_deliverUnnamedHosts=new TQCheckBox(i18n("Re&port unnamed hosts"),m_advancedPage); + info=new TQLabel(i18n("Should hosts for which LISa can\'t resolve the name be included in the host list?
    "),m_advancedPage); - QHBox* hbox=new QHBox(m_advancedPage); + TQHBox* hbox=new TQHBox(m_advancedPage); - info=new QLabel(i18n("Wait for replies after first scan"),hbox); - m_firstWait=new QSpinBox(10,1000,50,hbox); + info=new TQLabel(i18n("Wait for replies after first scan"),hbox); + m_firstWait=new TQSpinBox(10,1000,50,hbox); m_firstWait->setSuffix(i18n(" ms")); - info=new QLabel(i18n("How long should LISa wait for answers to pings?
    " + info=new TQLabel(i18n("How long should LISa wait for answers to pings?
    " "If LISa doesn\'t find all hosts, try to increase this value.
    "),m_advancedPage); - hbox=new QHBox(m_advancedPage); - info=new QLabel(i18n("Max. number of pings to send at once"),hbox); + hbox=new TQHBox(m_advancedPage); + info=new TQLabel(i18n("Max. number of pings to send at once"),hbox); info->setTextFormat(Qt::RichText); - m_maxPingsAtOnce=new QSpinBox(8,1024,5,hbox); - info=new QLabel(i18n("How many ping packets should LISa send at once?
    " + m_maxPingsAtOnce=new TQSpinBox(8,1024,5,hbox); + info=new TQLabel(i18n("How many ping packets should LISa send at once?
    " "If LISa doesn't find all hosts you could try to decrease this value.
    "),m_advancedPage); - m_secondScan=new QCheckBox(i18n("Al&ways scan twice"),m_advancedPage); + m_secondScan=new TQCheckBox(i18n("Al&ways scan twice"),m_advancedPage); - hbox=new QHBox(m_advancedPage); + hbox=new TQHBox(m_advancedPage); // hbox->setSpacing(10); // WTF? - info=new QLabel(i18n("Wait for replies after second scan"),hbox); + info=new TQLabel(i18n("Wait for replies after second scan"),hbox); info->setTextFormat(Qt::RichText); - m_secondWait=new QSpinBox(0,1000,50,hbox); + m_secondWait=new TQSpinBox(0,1000,50,hbox); m_secondWait->setSuffix(i18n(" ms")); - info=new QLabel(i18n("If LISa doesn't find all hosts, enable this option."),m_advancedPage); + info=new TQLabel(i18n("If LISa doesn't find all hosts, enable this option."),m_advancedPage); //this would make the dialog to large //m_advancedPage->setSpacing(KDialog::spacingHint()); //m_advancedPage->setMargin(KDialog::marginHint()); - info=new QLabel(i18n("If unsure, keep it as is."), m_advancedPage); + info=new TQLabel(i18n("If unsure, keep it as is."), m_advancedPage); info->setAlignment(AlignRight|AlignVCenter); - connect(m_secondScan,SIGNAL(toggled(bool)),m_secondWait,SLOT(setEnabled(bool))); + connect(m_secondScan,TQT_SIGNAL(toggled(bool)),m_secondWait,TQT_SLOT(setEnabled(bool))); setHelpEnabled( m_advancedPage, false ); } void SetupWizard::setupFinalPage() { - m_finalPage=new QVBox(this); - QLabel *info=new QLabel(i18n("
    Your LAN browsing has been successfully set up.

    " + m_finalPage=new TQVBox(this); + TQLabel *info=new TQLabel(i18n("
    Your LAN browsing has been successfully set up.

    " "Make sure that the LISa server is started during the " "boot process. How this is done depends on your " "distribution and OS. Usually you have to insert it somewhere " @@ -357,7 +357,7 @@ void SetupWizard::setupFinalPage() "To test the server, try lan:/ in Konqueror.

    " "If you have problems or suggestions, visit http://lisa-home.sourceforge.net."),m_finalPage); info->setTextFormat(Qt::RichText); - QWidget *dummy=new QWidget(m_finalPage); + TQWidget *dummy=new TQWidget(m_finalPage); m_finalPage->setStretchFactor(dummy,10); m_finalPage->setSpacing(KDialog::spacingHint()); m_finalPage->setMargin(KDialog::marginHint()); @@ -398,7 +398,7 @@ void SetupWizard::next() m_nicListBox->clear(); for (MyNIC *nic=m_nics->first(); nic!=0; nic=m_nics->next()) { - QString tmp=nic->name+": "+nic->addr+"/"+nic->netmask+";"; + TQString tmp=nic->name+": "+nic->addr+"/"+nic->netmask+";"; m_nicListBox->insertItem(tmp); } m_nicListBox->setSelected(0,true); @@ -406,7 +406,7 @@ void SetupWizard::next() } else if (currentPage()==m_multiNicPage) { - QString nic=m_nicListBox->currentText(); + TQString nic=m_nicListBox->currentText(); unsigned int i=0; for (i=0; icount(); i++) { @@ -438,10 +438,10 @@ void SetupWizard::next() } setAppropriate(m_advancedPage, m_ping->isChecked()); } - QWizard::next(); + TQWizard::next(); } -void SetupWizard::showPage(QWidget* page) +void SetupWizard::showPage(TQWidget* page) { if (page==m_noNicPage) { @@ -457,7 +457,7 @@ void SetupWizard::showPage(QWidget* page) m_pingAddresses->setFocus(); else if (page==m_allowedAddressesPage) { - QString text; + TQString text; if (m_ping->isChecked()) text+=i18n("You can use the same syntax as on the previous page.
    "); else @@ -479,7 +479,7 @@ void SetupWizard::showPage(QWidget* page) else if (page==m_finalPage) setFinishEnabled(m_finalPage,true); - QWizard::showPage(page); + TQWizard::showPage(page); } void SetupWizard::setupRest() @@ -538,13 +538,13 @@ void SetupWizard::accept() m_configInfo->updatePeriod=m_updatePeriod->value(); m_configInfo->useNmblookup=m_nmblookup->isChecked(); m_configInfo->unnamedHosts=m_deliverUnnamedHosts->isChecked(); - QWizard::accept(); + TQWizard::accept(); } -void SetupWizard::checkIPAddress(const QString& addr) +void SetupWizard::checkIPAddress(const TQString& addr) { - QString address=addr.simplifyWhiteSpace(); - QRegExp regex("^\\d+\\.\\d+\\.\\d+\\.\\d+\\s*/\\s*\\d+\\.\\d+\\.\\d+\\.\\d+$"); + TQString address=addr.simplifyWhiteSpace(); + TQRegExp regex("^\\d+\\.\\d+\\.\\d+\\.\\d+\\s*/\\s*\\d+\\.\\d+\\.\\d+\\.\\d+$"); setNextEnabled(m_noNicPage, (regex.search(address,0)!=-1)); // setNextEnabled(m_noNicPage, (regex.find(address,0)!=-1)); } diff --git a/lanbrowsing/kcmlisa/setupwizard.h b/lanbrowsing/kcmlisa/setupwizard.h index b85d61c4..8ccd2a15 100644 --- a/lanbrowsing/kcmlisa/setupwizard.h +++ b/lanbrowsing/kcmlisa/setupwizard.h @@ -27,15 +27,15 @@ #include "findnic.h" -#include -#include +#include +#include #include -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -44,14 +44,14 @@ class SetupWizard:public QWizard { Q_OBJECT public: - SetupWizard(QWidget* parent, LisaConfigInfo* configInfo); + SetupWizard(TQWidget* parent, LisaConfigInfo* configInfo); ~SetupWizard(); - virtual void showPage(QWidget* page); + virtual void showPage(TQWidget* page); void clearAll(); protected slots: virtual void next(); virtual void accept(); - void checkIPAddress(const QString& address); + void checkIPAddress(const TQString& address); protected: void applyLisaConfigInfo(LisaConfigInfo& lci); @@ -67,32 +67,32 @@ class SetupWizard:public QWizard void setupFinalPage(); void setupRest(); - QVBox* m_page1; - QVBox* m_noNicPage; - QVBox* m_multiNicPage; - QVBox* m_searchPage; - QVBox* m_addressesPage; - QVBox* m_allowedAddressesPage; - QVBox* m_bcastPage; - QVBox* m_intervalPage; - QVBox* m_advancedPage; - QVBox* m_finalPage; + TQVBox* m_page1; + TQVBox* m_noNicPage; + TQVBox* m_multiNicPage; + TQVBox* m_searchPage; + TQVBox* m_addressesPage; + TQVBox* m_allowedAddressesPage; + TQVBox* m_bcastPage; + TQVBox* m_intervalPage; + TQVBox* m_advancedPage; + TQVBox* m_finalPage; - QListBox *m_nicListBox; - QLabel *m_trustedHostsLabel; - QCheckBox *m_ping; - QCheckBox *m_nmblookup; + TQListBox *m_nicListBox; + TQLabel *m_trustedHostsLabel; + TQCheckBox *m_ping; + TQCheckBox *m_nmblookup; KRestrictedLine* m_pingAddresses; KRestrictedLine* m_allowedAddresses; KRestrictedLine* m_bcastAddress; KRestrictedLine* m_manualAddress; - QSpinBox* m_updatePeriod; - QCheckBox* m_deliverUnnamedHosts; - QSpinBox* m_firstWait; - QSpinBox* m_maxPingsAtOnce; - QCheckBox* m_secondScan; - QSpinBox* m_secondWait; + TQSpinBox* m_updatePeriod; + TQCheckBox* m_deliverUnnamedHosts; + TQSpinBox* m_firstWait; + TQSpinBox* m_maxPingsAtOnce; + TQCheckBox* m_secondScan; + TQSpinBox* m_secondWait; NICList* m_nics; LisaConfigInfo* m_configInfo; diff --git a/lanbrowsing/kio_lan/kio_lan.cpp b/lanbrowsing/kio_lan/kio_lan.cpp index 89de40da..c1d79695 100644 --- a/lanbrowsing/kio_lan/kio_lan.cpp +++ b/lanbrowsing/kio_lan/kio_lan.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include @@ -87,7 +87,7 @@ int kdemain( int argc, char **argv ) return 0; } -LANProtocol::LANProtocol(int isLanIoslave, const QCString &pool, const QCString &app ) +LANProtocol::LANProtocol(int isLanIoslave, const TQCString &pool, const TQCString &app ) :TCPSlaveBase(7741,isLanIoslave?"lan":"rlan", pool, app) ,m_currentHost("") ,m_port(7741) @@ -275,7 +275,7 @@ int LANProtocol::rlanReadDataFromServer() sockaddr_un addr; memset((char*)&addr,0,sizeof(addr)); addr.sun_family=AF_LOCAL; - QCString socketname="/tmp/resLisa-"; + TQCString socketname="/tmp/resLisa-"; struct passwd *user = getpwuid( getuid() ); if ( user ) @@ -441,11 +441,11 @@ int LANProtocol::rlanReadDataFromServer() return 1; } -int LANProtocol::checkHost(const QString& host) +int LANProtocol::checkHost(const TQString& host) { kdDebug(7101)<<"LAN::checkHost() "<& _ports, in_addr ip ) +int LANProtocol::checkPort( TQValueVector& _ports, in_addr ip ) { int _port=0; struct sockaddr_in to_scan; @@ -567,7 +567,7 @@ int LANProtocol::checkPort( QValueVector& _ports, in_addr ip ) to_scan.sin_family = AF_INET; to_scan.sin_addr = ip; - for (QValueVector::iterator i= _ports.begin(); i != _ports.end(); i++) + for (TQValueVector::iterator i= _ports.begin(); i != _ports.end(); i++) { _port=(*i); kdDebug(7101)<<"LANProtocol::checkPort: "<<_port<& _ports, in_addr ip ) } -void LANProtocol::setHost( const QString& host, int port, const QString& , const QString& ) +void LANProtocol::setHost( const TQString& host, int port, const TQString& , const TQString& ) { if (m_isLanIoslave) { @@ -645,8 +645,8 @@ void LANProtocol::setHost( const QString& host, int port, const QString& , const void LANProtocol::mimetype( const KURL& url) { kdDebug(7101)<<"LANProtocol::mimetype -"<2) { @@ -745,8 +745,8 @@ void LANProtocol::stat( const KURL & url) entry.append(atom); - QString path( QFile::encodeName(url.path())); - QStringList pathList=QStringList::split( "/",path); + TQString path( TQFile::encodeName(url.path())); + TQStringList pathList=TQStringList::split( "/",path); if ((pathList.count()==2) && (pathList[1].upper()=="HTTP")) { atom.m_uds = KIO::UDS_FILE_TYPE; @@ -774,12 +774,12 @@ void LANProtocol::stat( const KURL & url) void LANProtocol::get(const KURL& url ) { - QString path(QFile::encodeName(url.path())); + TQString path(TQFile::encodeName(url.path())); kdDebug(7101)<<"LANProtocol::get: "< #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -44,7 +44,7 @@ struct MyProtocolInfo { int enabled; - QValueVector ports; + TQValueVector ports; //this should be large enough for things like "FTP" and so on char name[NAMELEN]; }; @@ -58,10 +58,10 @@ struct HostInfo class LANProtocol : public KIO::TCPSlaveBase { public: - LANProtocol (int isLanIoSlave, const QCString &pool, const QCString &app ); + LANProtocol (int isLanIoSlave, const TQCString &pool, const TQCString &app ); virtual ~LANProtocol(); - virtual void setHost( const QString& host, int port, const QString& user, const QString& pass ); + virtual void setHost( const TQString& host, int port, const TQString& user, const TQString& pass ); virtual void mimetype( const KURL& ); virtual void listDir( const KURL& url); @@ -69,19 +69,19 @@ class LANProtocol : public KIO::TCPSlaveBase virtual void get( const KURL& url ); protected: - QDict m_hostInfoCache; + TQDict m_hostInfoCache; int readDataFromServer(); int lanReadDataFromServer(); int rlanReadDataFromServer(); - int checkHost(const QString& host); - int checkPort(QValueVector& _ports, in_addr ip); - QString m_currentHost; + int checkHost(const TQString& host); + int checkPort(TQValueVector& _ports, in_addr ip); + TQString m_currentHost; unsigned short int m_port; MyProtocolInfo m_protocolInfo[KIOLAN_MAX]; int m_maxAge; bool m_isLanIoslave; bool m_shortHostnames; - QString m_defaultLisaHost; + TQString m_defaultLisaHost; }; #endif diff --git a/librss/article.cpp b/librss/article.cpp index e283b5c5..4161e0d5 100644 --- a/librss/article.cpp +++ b/librss/article.cpp @@ -15,18 +15,18 @@ #include #include -#include -#include +#include +#include using namespace RSS; struct Article::Private : public Shared { - QString title; + TQString title; KURL link; - QString description; - QDateTime pubDate; - QString guid; + TQString description; + TQDateTime pubDate; + TQString guid; bool guidIsPermaLink; }; @@ -39,17 +39,17 @@ Article::Article(const Article &other) : d(0) *this = other; } -Article::Article(const QDomNode &node) : d(new Private) +Article::Article(const TQDomNode &node) : d(new Private) { - QString elemText; + TQString elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("title"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull()) d->title = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("link"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull()) d->link = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("description"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull()) d->description = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("pubDate"))).isNull()) { + if (!(elemText = extractNode(node, TQString::fromLatin1("pubDate"))).isNull()) { time_t _time = KRFCDate::parseDate(elemText); /* \bug This isn't really the right way since it will set the date to * Jan 1 1970, 1:00:00 if the passed date was invalid; this means that @@ -57,7 +57,7 @@ Article::Article(const QDomNode &node) : d(new Private) */ d->pubDate.setTime_t(_time); } - if (!(elemText = extractNode(node, QString::fromLatin1("dc:date"))).isNull()) { + if (!(elemText = extractNode(node, TQString::fromLatin1("dc:date"))).isNull()) { time_t _time = KRFCDate::parseDateISO8601(elemText); /* \bug This isn't really the right way since it will set the date to * Jan 1 1970, 1:00:00 if the passed date was invalid; this means that @@ -66,12 +66,12 @@ Article::Article(const QDomNode &node) : d(new Private) d->pubDate.setTime_t(_time); } - QDomNode n = node.namedItem(QString::fromLatin1("guid")); + TQDomNode n = node.namedItem(TQString::fromLatin1("guid")); if (!n.isNull()) { d->guidIsPermaLink = true; - if (n.toElement().attribute(QString::fromLatin1("isPermaLink"), "true") == "false") d->guidIsPermaLink = false; + if (n.toElement().attribute(TQString::fromLatin1("isPermaLink"), "true") == "false") d->guidIsPermaLink = false; - if (!(elemText = extractNode(node, QString::fromLatin1("guid"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("guid"))).isNull()) d->guid = elemText; } } @@ -82,7 +82,7 @@ Article::~Article() delete d; } -QString Article::title() const +TQString Article::title() const { return d->title; } @@ -92,12 +92,12 @@ const KURL &Article::link() const return d->link; } -QString Article::description() const +TQString Article::description() const { return d->description; } -QString Article::guid() const +TQString Article::guid() const { return d->guid; } @@ -107,12 +107,12 @@ bool Article::guidIsPermaLink() const return d->guidIsPermaLink; } -const QDateTime &Article::pubDate() const +const TQDateTime &Article::pubDate() const { return d->pubDate; } -KURLLabel *Article::widget(QWidget *parent, const char *name) const +KURLLabel *Article::widget(TQWidget *parent, const char *name) const { KURLLabel *label = new KURLLabel(d->link.url(), d->title, parent, name); label->setUseTips(true); diff --git a/librss/article.h b/librss/article.h index 865a6bbc..d6c4a937 100644 --- a/librss/article.h +++ b/librss/article.h @@ -36,7 +36,7 @@ namespace RSS /** * A list of articles. */ - typedef QValueList
    List; + typedef TQValueList
    List; /** * Default constructor. @@ -51,10 +51,10 @@ namespace RSS /** * Constructs an Article from a piece of RSS markup. - * @param node A QDomNode which references the DOM leaf to be used + * @param node A TQDomNode which references the DOM leaf to be used * for constructing the Article. */ - Article(const QDomNode &node); + Article(const TQDomNode &node); /** * Assignment operator. @@ -86,10 +86,10 @@ namespace RSS /** * RSS 0.90 and upwards - * @return The headline of this article, or QString::null if + * @return The headline of this article, or TQString::null if * no headline was available. */ - QString title() const; + TQString title() const; /** * RSS 0.90 and upwards @@ -102,20 +102,20 @@ namespace RSS /** * RSS 0.91 and upwards - * @return A story synopsis, or QString::null if no description + * @return A story synopsis, or TQString::null if no description * was available. */ - QString description() const; + TQString description() const; /** * RSS 2.0 and upwards * @return An article GUID (globally unique identifier). */ - QString guid() const; + TQString guid() const; /** * RSS 2.0 and upwards - * @return If this article GUID is permalink. Has no meaning when guid() is QString::null. + * @return If this article GUID is permalink. Has no meaning when guid() is TQString::null. */ bool guidIsPermaLink() const; @@ -123,7 +123,7 @@ namespace RSS * RSS 2.0 and upwards * @return The date when the article was published. */ - const QDateTime &pubDate() const; + const TQDateTime &pubDate() const; /** * @param parent The parent widget for the KURLLabel. @@ -132,14 +132,14 @@ namespace RSS * This makes building a user-interface which contains the * information in this Article object more convenient. * The returned KURLLabel's caption will be the title(), clicking - * on it will emit the URL link(), and it has a QToolTip attached + * on it will emit the URL link(), and it has a TQToolTip attached * to it which displays the description() (in case it has one, * if there is no description, the URL which the label links to * will be used). * Note that you have to delete the KURLLabel object returned by * this method yourself. */ - KURLLabel *widget(QWidget *parent = 0, const char *name = 0) const; + KURLLabel *widget(TQWidget *parent = 0, const char *name = 0) const; private: struct Private; diff --git a/librss/document.cpp b/librss/document.cpp index 92f4093e..f551716a 100644 --- a/librss/document.cpp +++ b/librss/document.cpp @@ -18,9 +18,9 @@ #include #include -#include -#include -#include +#include +#include +#include using namespace RSS; @@ -37,20 +37,20 @@ struct Document::Private : public Shared } Version version; - QString title; - QString description; + TQString title; + TQString description; KURL link; Image *image; TextInput *textInput; Article::List articles; Language language; - QString copyright; - QDateTime pubDate; - QDateTime lastBuildDate; - QString rating; + TQString copyright; + TQDateTime pubDate; + TQDateTime lastBuildDate; + TQString rating; KURL docs; - QString managingEditor; - QString webMaster; + TQString managingEditor; + TQString webMaster; HourList skipHours; DayList skipDays; }; @@ -64,13 +64,13 @@ Document::Document(const Document &other) : d(0) *this = other; } -Document::Document(const QDomDocument &doc) : d(new Private) +Document::Document(const TQDomDocument &doc) : d(new Private) { - QString elemText; - QDomNode rootNode = doc.documentElement(); + TQString elemText; + TQDomNode rootNode = doc.documentElement(); // Determine the version of the present RSS markup. - QString attr = rootNode.toElement().attribute(QString::fromLatin1("xmlns"), QString::null); + TQString attr = rootNode.toElement().attribute(TQString::fromLatin1("xmlns"), TQString::null); if (!attr.isNull()) { /* * Hardcoding these URLs is actually a bad idea, since the DTD doesn't @@ -80,256 +80,256 @@ Document::Document(const QDomDocument &doc) : d(new Private) * distinguish the RSS versions by analyzing the relationship between * the nodes. */ - if (attr == QString::fromLatin1("http://my.netscape.com/rdf/simple/0.9/")) + if (attr == TQString::fromLatin1("http://my.netscape.com/rdf/simple/0.9/")) d->version = v0_90; - else if (attr == QString::fromLatin1("http://purl.org/rss/1.0/")) { + else if (attr == TQString::fromLatin1("http://purl.org/rss/1.0/")) { d->version = v1_0; } } else { - attr = rootNode.toElement().attribute(QString::fromLatin1("version"), QString::null); + attr = rootNode.toElement().attribute(TQString::fromLatin1("version"), TQString::null); if (!attr.isNull()) { - if (attr == QString::fromLatin1("0.91")) + if (attr == TQString::fromLatin1("0.91")) d->version = v0_91; - else if (attr == QString::fromLatin1("0.92")) + else if (attr == TQString::fromLatin1("0.92")) d->version = v0_92; - else if (attr == QString::fromLatin1("0.93")) + else if (attr == TQString::fromLatin1("0.93")) d->version = v0_93; - else if (attr == QString::fromLatin1("0.94")) + else if (attr == TQString::fromLatin1("0.94")) d->version = v0_94; - else if (attr == QString::fromLatin1("2.0") || attr == QString::fromLatin1("2")) + else if (attr == TQString::fromLatin1("2.0") || attr == TQString::fromLatin1("2")) d->version = v2_0; } } - QDomNode channelNode = rootNode.namedItem(QString::fromLatin1("channel")); + TQDomNode channelNode = rootNode.namedItem(TQString::fromLatin1("channel")); - if (!(elemText = extractNode(channelNode, QString::fromLatin1("title"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("title"))).isNull()) d->title = elemText; - if (!(elemText = extractNode(channelNode, QString::fromLatin1("description"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("description"))).isNull()) d->description = elemText; - if (!(elemText = extractNode(channelNode, QString::fromLatin1("link"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("link"))).isNull()) d->link = elemText; /* This is ugly but necessary since RSS 0.90 and 1.0 have a different parent * node for , and than RSS 0.91-0.94 and RSS 2.0. */ - QDomNode parentNode; + TQDomNode parentNode; if (d->version == v0_90 || d->version == v1_0) parentNode = rootNode; else parentNode = channelNode; - QDomNode n = parentNode.namedItem(QString::fromLatin1("image")); + TQDomNode n = parentNode.namedItem(TQString::fromLatin1("image")); if (!n.isNull()) d->image = new Image(n); - n = parentNode.namedItem(QString::fromLatin1("textinput")); + n = parentNode.namedItem(TQString::fromLatin1("textinput")); if (!n.isNull()) d->textInput = new TextInput(n); // Our (hopefully faster) version of elementsByTagName() for (n = parentNode.firstChild(); !n.isNull(); n = n.nextSibling()) { - const QDomElement e = n.toElement(); - if (e.tagName() == QString::fromLatin1("item")) + const TQDomElement e = n.toElement(); + if (e.tagName() == TQString::fromLatin1("item")) d->articles.append(Article(e)); } - if (!(elemText = extractNode(channelNode, QString::fromLatin1("copyright"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("copyright"))).isNull()) d->copyright = elemText; - if (!(elemText = extractNode(channelNode, QString::fromLatin1("language"))).isNull()) { - if (elemText == QString::fromLatin1("af")) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("language"))).isNull()) { + if (elemText == TQString::fromLatin1("af")) d->language = af; - else if (elemText == QString::fromLatin1("sq")) + else if (elemText == TQString::fromLatin1("sq")) d->language = sq; - else if (elemText == QString::fromLatin1("eu")) + else if (elemText == TQString::fromLatin1("eu")) d->language = eu; - else if (elemText == QString::fromLatin1("be")) + else if (elemText == TQString::fromLatin1("be")) d->language = be; - else if (elemText == QString::fromLatin1("bg")) + else if (elemText == TQString::fromLatin1("bg")) d->language = bg; - else if (elemText == QString::fromLatin1("ca")) + else if (elemText == TQString::fromLatin1("ca")) d->language = ca; - else if (elemText == QString::fromLatin1("zh-cn")) + else if (elemText == TQString::fromLatin1("zh-cn")) d->language = zh_cn; - else if (elemText == QString::fromLatin1("zh-tw")) + else if (elemText == TQString::fromLatin1("zh-tw")) d->language = zh_tw; - else if (elemText == QString::fromLatin1("hr")) + else if (elemText == TQString::fromLatin1("hr")) d->language = hr; - else if (elemText == QString::fromLatin1("cs")) + else if (elemText == TQString::fromLatin1("cs")) d->language = cs; - else if (elemText == QString::fromLatin1("da")) + else if (elemText == TQString::fromLatin1("da")) d->language = da; - else if (elemText == QString::fromLatin1("nl")) + else if (elemText == TQString::fromLatin1("nl")) d->language = nl; - else if (elemText == QString::fromLatin1("nl-be")) + else if (elemText == TQString::fromLatin1("nl-be")) d->language = nl_be; - else if (elemText == QString::fromLatin1("nl-nl")) + else if (elemText == TQString::fromLatin1("nl-nl")) d->language = nl_nl; - else if (elemText == QString::fromLatin1("en")) + else if (elemText == TQString::fromLatin1("en")) d->language = en; - else if (elemText == QString::fromLatin1("en-au")) + else if (elemText == TQString::fromLatin1("en-au")) d->language = en_au; - else if (elemText == QString::fromLatin1("en-bz")) + else if (elemText == TQString::fromLatin1("en-bz")) d->language = en_bz; - else if (elemText == QString::fromLatin1("en-ca")) + else if (elemText == TQString::fromLatin1("en-ca")) d->language = en_ca; - else if (elemText == QString::fromLatin1("en-ie")) + else if (elemText == TQString::fromLatin1("en-ie")) d->language = en_ie; - else if (elemText == QString::fromLatin1("en-jm")) + else if (elemText == TQString::fromLatin1("en-jm")) d->language = en_jm; - else if (elemText == QString::fromLatin1("en-nz")) + else if (elemText == TQString::fromLatin1("en-nz")) d->language = en_nz; - else if (elemText == QString::fromLatin1("en-ph")) + else if (elemText == TQString::fromLatin1("en-ph")) d->language = en_ph; - else if (elemText == QString::fromLatin1("en-za")) + else if (elemText == TQString::fromLatin1("en-za")) d->language = en_za; - else if (elemText == QString::fromLatin1("en-tt")) + else if (elemText == TQString::fromLatin1("en-tt")) d->language = en_tt; - else if (elemText == QString::fromLatin1("en-gb")) + else if (elemText == TQString::fromLatin1("en-gb")) d->language = en_gb; - else if (elemText == QString::fromLatin1("en-us")) + else if (elemText == TQString::fromLatin1("en-us")) d->language = en_us; - else if (elemText == QString::fromLatin1("en-zw")) + else if (elemText == TQString::fromLatin1("en-zw")) d->language = en_zw; - else if (elemText == QString::fromLatin1("fo")) + else if (elemText == TQString::fromLatin1("fo")) d->language = fo; - else if (elemText == QString::fromLatin1("fi")) + else if (elemText == TQString::fromLatin1("fi")) d->language = fi; - else if (elemText == QString::fromLatin1("fr")) + else if (elemText == TQString::fromLatin1("fr")) d->language = fr; - else if (elemText == QString::fromLatin1("fr-be")) + else if (elemText == TQString::fromLatin1("fr-be")) d->language = fr_be; - else if (elemText == QString::fromLatin1("fr-ca")) + else if (elemText == TQString::fromLatin1("fr-ca")) d->language = fr_ca; - else if (elemText == QString::fromLatin1("fr-fr")) + else if (elemText == TQString::fromLatin1("fr-fr")) d->language = fr_fr; - else if (elemText == QString::fromLatin1("fr-lu")) + else if (elemText == TQString::fromLatin1("fr-lu")) d->language = fr_lu; - else if (elemText == QString::fromLatin1("fr-mc")) + else if (elemText == TQString::fromLatin1("fr-mc")) d->language = fr_mc; - else if (elemText == QString::fromLatin1("fr-ch")) + else if (elemText == TQString::fromLatin1("fr-ch")) d->language = fr_ch; - else if (elemText == QString::fromLatin1("gl")) + else if (elemText == TQString::fromLatin1("gl")) d->language = gl; - else if (elemText == QString::fromLatin1("gd")) + else if (elemText == TQString::fromLatin1("gd")) d->language = gd; - else if (elemText == QString::fromLatin1("de")) + else if (elemText == TQString::fromLatin1("de")) d->language = de; - else if (elemText == QString::fromLatin1("de-at")) + else if (elemText == TQString::fromLatin1("de-at")) d->language = de_at; - else if (elemText == QString::fromLatin1("de-de")) + else if (elemText == TQString::fromLatin1("de-de")) d->language = de_de; - else if (elemText == QString::fromLatin1("de-li")) + else if (elemText == TQString::fromLatin1("de-li")) d->language = de_li; - else if (elemText == QString::fromLatin1("de-lu")) + else if (elemText == TQString::fromLatin1("de-lu")) d->language = de_lu; - else if (elemText == QString::fromLatin1("de-ch")) + else if (elemText == TQString::fromLatin1("de-ch")) d->language = de_ch; - else if (elemText == QString::fromLatin1("el")) + else if (elemText == TQString::fromLatin1("el")) d->language = el; - else if (elemText == QString::fromLatin1("hu")) + else if (elemText == TQString::fromLatin1("hu")) d->language = hu; - else if (elemText == QString::fromLatin1("is")) + else if (elemText == TQString::fromLatin1("is")) d->language = is; - else if (elemText == QString::fromLatin1("id")) + else if (elemText == TQString::fromLatin1("id")) d->language = id; - else if (elemText == QString::fromLatin1("ga")) + else if (elemText == TQString::fromLatin1("ga")) d->language = ga; - else if (elemText == QString::fromLatin1("it")) + else if (elemText == TQString::fromLatin1("it")) d->language = it; - else if (elemText == QString::fromLatin1("it-it")) + else if (elemText == TQString::fromLatin1("it-it")) d->language = it_it; - else if (elemText == QString::fromLatin1("it-ch")) + else if (elemText == TQString::fromLatin1("it-ch")) d->language = it_ch; - else if (elemText == QString::fromLatin1("ja")) + else if (elemText == TQString::fromLatin1("ja")) d->language = ja; - else if (elemText == QString::fromLatin1("ko")) + else if (elemText == TQString::fromLatin1("ko")) d->language = ko; - else if (elemText == QString::fromLatin1("mk")) + else if (elemText == TQString::fromLatin1("mk")) d->language = mk; - else if (elemText == QString::fromLatin1("no")) + else if (elemText == TQString::fromLatin1("no")) d->language = no; - else if (elemText == QString::fromLatin1("pl")) + else if (elemText == TQString::fromLatin1("pl")) d->language = pl; - else if (elemText == QString::fromLatin1("pt")) + else if (elemText == TQString::fromLatin1("pt")) d->language = pt; - else if (elemText == QString::fromLatin1("pt-br")) + else if (elemText == TQString::fromLatin1("pt-br")) d->language = pt_br; - else if (elemText == QString::fromLatin1("pt-pt")) + else if (elemText == TQString::fromLatin1("pt-pt")) d->language = pt_pt; - else if (elemText == QString::fromLatin1("ro")) + else if (elemText == TQString::fromLatin1("ro")) d->language = ro; - else if (elemText == QString::fromLatin1("ro-mo")) + else if (elemText == TQString::fromLatin1("ro-mo")) d->language = ro_mo; - else if (elemText == QString::fromLatin1("ro-ro")) + else if (elemText == TQString::fromLatin1("ro-ro")) d->language = ro_ro; - else if (elemText == QString::fromLatin1("ru")) + else if (elemText == TQString::fromLatin1("ru")) d->language = ru; - else if (elemText == QString::fromLatin1("ru-mo")) + else if (elemText == TQString::fromLatin1("ru-mo")) d->language = ru_mo; - else if (elemText == QString::fromLatin1("ru-ru")) + else if (elemText == TQString::fromLatin1("ru-ru")) d->language = ru_ru; - else if (elemText == QString::fromLatin1("sr")) + else if (elemText == TQString::fromLatin1("sr")) d->language = sr; - else if (elemText == QString::fromLatin1("sk")) + else if (elemText == TQString::fromLatin1("sk")) d->language = sk; - else if (elemText == QString::fromLatin1("sl")) + else if (elemText == TQString::fromLatin1("sl")) d->language = sl; - else if (elemText == QString::fromLatin1("es")) + else if (elemText == TQString::fromLatin1("es")) d->language = es; - else if (elemText == QString::fromLatin1("es-ar")) + else if (elemText == TQString::fromLatin1("es-ar")) d->language = es_ar; - else if (elemText == QString::fromLatin1("es-bo")) + else if (elemText == TQString::fromLatin1("es-bo")) d->language = es_bo; - else if (elemText == QString::fromLatin1("es-cl")) + else if (elemText == TQString::fromLatin1("es-cl")) d->language = es_cl; - else if (elemText == QString::fromLatin1("es-co")) + else if (elemText == TQString::fromLatin1("es-co")) d->language = es_co; - else if (elemText == QString::fromLatin1("es-cr")) + else if (elemText == TQString::fromLatin1("es-cr")) d->language = es_cr; - else if (elemText == QString::fromLatin1("es-do")) + else if (elemText == TQString::fromLatin1("es-do")) d->language = es_do; - else if (elemText == QString::fromLatin1("es-ec")) + else if (elemText == TQString::fromLatin1("es-ec")) d->language = es_ec; - else if (elemText == QString::fromLatin1("es-sv")) + else if (elemText == TQString::fromLatin1("es-sv")) d->language = es_sv; - else if (elemText == QString::fromLatin1("es-gt")) + else if (elemText == TQString::fromLatin1("es-gt")) d->language = es_gt; - else if (elemText == QString::fromLatin1("es-hn")) + else if (elemText == TQString::fromLatin1("es-hn")) d->language = es_hn; - else if (elemText == QString::fromLatin1("es-mx")) + else if (elemText == TQString::fromLatin1("es-mx")) d->language = es_mx; - else if (elemText == QString::fromLatin1("es-ni")) + else if (elemText == TQString::fromLatin1("es-ni")) d->language = es_ni; - else if (elemText == QString::fromLatin1("es-pa")) + else if (elemText == TQString::fromLatin1("es-pa")) d->language = es_pa; - else if (elemText == QString::fromLatin1("es-py")) + else if (elemText == TQString::fromLatin1("es-py")) d->language = es_py; - else if (elemText == QString::fromLatin1("es-pe")) + else if (elemText == TQString::fromLatin1("es-pe")) d->language = es_pe; - else if (elemText == QString::fromLatin1("es-pr")) + else if (elemText == TQString::fromLatin1("es-pr")) d->language = es_pr; - else if (elemText == QString::fromLatin1("es-es")) + else if (elemText == TQString::fromLatin1("es-es")) d->language = es_es; - else if (elemText == QString::fromLatin1("es-uy")) + else if (elemText == TQString::fromLatin1("es-uy")) d->language = es_uy; - else if (elemText == QString::fromLatin1("es-ve")) + else if (elemText == TQString::fromLatin1("es-ve")) d->language = es_ve; - else if (elemText == QString::fromLatin1("sv")) + else if (elemText == TQString::fromLatin1("sv")) d->language = sv; - else if (elemText == QString::fromLatin1("sv-fi")) + else if (elemText == TQString::fromLatin1("sv-fi")) d->language = sv_fi; - else if (elemText == QString::fromLatin1("sv-se")) + else if (elemText == TQString::fromLatin1("sv-se")) d->language = sv_se; - else if (elemText == QString::fromLatin1("tr")) + else if (elemText == TQString::fromLatin1("tr")) d->language = tr; - else if (elemText == QString::fromLatin1("uk")) + else if (elemText == TQString::fromLatin1("uk")) d->language = uk; else d->language = UndefinedLanguage; } - if (!(elemText = extractNode(channelNode, QString::fromLatin1("pubDate"))).isNull()) { + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("pubDate"))).isNull()) { time_t _time = KRFCDate::parseDate(elemText); /* \bug This isn't really the right way since it will set the date to * Jan 1 1970, 1:00:00 if the passed date was invalid; this means that @@ -338,7 +338,7 @@ Document::Document(const QDomDocument &doc) : d(new Private) d->pubDate.setTime_t(_time); } - if (!(elemText = extractNode(channelNode, QString::fromLatin1("dc:date"))).isNull()) { + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("dc:date"))).isNull()) { time_t _time = KRFCDate::parseDateISO8601(elemText); /* \bug This isn't really the right way since it will set the date to * Jan 1 1970, 1:00:00 if the passed date was invalid; this means that @@ -347,46 +347,46 @@ Document::Document(const QDomDocument &doc) : d(new Private) d->pubDate.setTime_t(_time); } - if (!(elemText = extractNode(channelNode, QString::fromLatin1("lastBuildDate"))).isNull()) { + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("lastBuildDate"))).isNull()) { time_t _time = KRFCDate::parseDate(elemText); d->lastBuildDate.setTime_t(_time); } - if (!(elemText = extractNode(channelNode, QString::fromLatin1("rating"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("rating"))).isNull()) d->rating = elemText; - if (!(elemText = extractNode(channelNode, QString::fromLatin1("docs"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("docs"))).isNull()) d->docs = elemText; - if (!(elemText = extractNode(channelNode, QString::fromLatin1("managingEditor"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("managingEditor"))).isNull()) d->managingEditor = elemText; - if (!(elemText = extractNode(channelNode, QString::fromLatin1("webMaster"))).isNull()) + if (!(elemText = extractNode(channelNode, TQString::fromLatin1("webMaster"))).isNull()) d->webMaster = elemText; - n = channelNode.namedItem(QString::fromLatin1("skipHours")); + n = channelNode.namedItem(TQString::fromLatin1("skipHours")); if (!n.isNull()) - for (QDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement()) - if (e.tagName() == QString::fromLatin1("hour")) + for (TQDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement()) + if (e.tagName() == TQString::fromLatin1("hour")) d->skipHours.append(e.text().toUInt()); - n = channelNode.namedItem(QString::fromLatin1("skipDays")); + n = channelNode.namedItem(TQString::fromLatin1("skipDays")); if (!n.isNull()) { Day day; - QString elemText; - for (QDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement()) - if (e.tagName() == QString::fromLatin1("day")) { + TQString elemText; + for (TQDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement()) + if (e.tagName() == TQString::fromLatin1("day")) { elemText = e.text().lower(); - if (elemText == QString::fromLatin1("monday")) + if (elemText == TQString::fromLatin1("monday")) day = Monday; - else if (elemText == QString::fromLatin1("tuesday")) + else if (elemText == TQString::fromLatin1("tuesday")) day = Tuesday; - else if (elemText == QString::fromLatin1("wednesday")) + else if (elemText == TQString::fromLatin1("wednesday")) day = Wednesday; - else if (elemText == QString::fromLatin1("thursday")) + else if (elemText == TQString::fromLatin1("thursday")) day = Thursday; - else if (elemText == QString::fromLatin1("friday")) + else if (elemText == TQString::fromLatin1("friday")) day = Friday; - else if (elemText == QString::fromLatin1("saturday")) + else if (elemText == TQString::fromLatin1("saturday")) day = Saturday; - else if (elemText == QString::fromLatin1("sunday")) + else if (elemText == TQString::fromLatin1("sunday")) day = Sunday; else day = UndefinedDay; @@ -407,26 +407,26 @@ Version Document::version() const return d->version; } -QString Document::verbVersion() const +TQString Document::verbVersion() const { switch (d->version) { - case v0_90: return QString::fromLatin1("0.90"); - case v0_91: return QString::fromLatin1("0.91"); - case v0_92: return QString::fromLatin1("0.92"); - case v0_93: return QString::fromLatin1("0.93"); - case v0_94: return QString::fromLatin1("0.94"); - case v1_0: return QString::fromLatin1("1.0"); - case v2_0: return QString::fromLatin1("2.0"); + case v0_90: return TQString::fromLatin1("0.90"); + case v0_91: return TQString::fromLatin1("0.91"); + case v0_92: return TQString::fromLatin1("0.92"); + case v0_93: return TQString::fromLatin1("0.93"); + case v0_94: return TQString::fromLatin1("0.94"); + case v1_0: return TQString::fromLatin1("1.0"); + case v2_0: return TQString::fromLatin1("2.0"); } - return QString::null; + return TQString::null; } -QString Document::title() const +TQString Document::title() const { return d->title; } -QString Document::description() const +TQString Document::description() const { return d->description; } @@ -466,22 +466,22 @@ Language Document::language() const return d->language; } -QString Document::copyright() const +TQString Document::copyright() const { return d->copyright; } -const QDateTime &Document::pubDate() const +const TQDateTime &Document::pubDate() const { return d->pubDate; } -const QDateTime &Document::lastBuildDate() const +const TQDateTime &Document::lastBuildDate() const { return d->lastBuildDate; } -QString Document::rating() const +TQString Document::rating() const { return d->rating; } @@ -491,12 +491,12 @@ const KURL &Document::docs() const return d->docs; } -QString Document::managingEditor() const +TQString Document::managingEditor() const { return d->managingEditor; } -QString Document::webMaster() const +TQString Document::webMaster() const { return d->webMaster; } diff --git a/librss/document.h b/librss/document.h index 90359871..fb02feb5 100644 --- a/librss/document.h +++ b/librss/document.h @@ -45,7 +45,7 @@ namespace RSS /** * Constructs a Document from a piece of XML markup. */ - Document(const QDomDocument &doc); + Document(const TQDomDocument &doc); /** * Assignment operator. @@ -70,28 +70,28 @@ namespace RSS /** * Convenience method. Differs from version() only in how the result * is returned. - * @return A QString representing the verbose version of the + * @return A TQString representing the verbose version of the * document. * @see version() */ - QString verbVersion() const; + TQString verbVersion() const; /** * RSS 0.90 and upwards - * @return The title of the RSS document, or QString::null if no + * @return The title of the RSS document, or TQString::null if no * title was available. This is often the name of the news source * from which the RSS document was retrieved. */ - QString title() const; + TQString title() const; /** * RSS 0.90 and upwards - * @return The description of the RSS document, or QString::null + * @return The description of the RSS document, or TQString::null * if no description was available. This is usually a short slogan * or description of the news source from which the RSS document * was retrieved. */ - QString description() const; + TQString description() const; /** * RSS 0.90 and upwards @@ -153,28 +153,28 @@ namespace RSS /** * RSS 0.91 and upwards * @return A copyright of the information contained in the RSS - * document, or QString::null if no copyright is available. + * document, or TQString::null if no copyright is available. */ - QString copyright() const; + TQString copyright() const; /** * RSS 0.91 and upwards * @return The date when the RSS document was published. */ - const QDateTime &pubDate() const; + const TQDateTime &pubDate() const; /** * RSS 0.91 and upwards. * @return The last time the channel was modified. */ - const QDateTime &lastBuildDate() const; + const TQDateTime &lastBuildDate() const; /** * RSS 0.91 and upwards * @return A PICS * rating for this page. */ - QString rating() const; + TQString rating() const; /** * RSS 0.91 and upwards @@ -192,16 +192,16 @@ namespace RSS * bull@mancuso.com (Bull Mancuso). * @see webMaster() */ - QString managingEditor() const; + TQString managingEditor() const; /** * RSS 0.91 and upwards * @return The email address of the webmaster for the site, the * person to contact if there are technical problems with the - * channel, or QString::null if this information isn't available. + * channel, or TQString::null if this information isn't available. * @see managingEditor() */ - QString webMaster() const; + TQString webMaster() const; /** * RSS 0.91 and upwards diff --git a/librss/global.h b/librss/global.h index 26c34d7e..ca929af0 100644 --- a/librss/global.h +++ b/librss/global.h @@ -126,12 +126,12 @@ namespace RSS /** * This type is used by Document::skipDays(). */ - typedef QValueList DayList; + typedef TQValueList DayList; /** * This type is used by Document::skipHours(). */ - typedef QValueList HourList; + typedef TQValueList HourList; } #endif // LIBRSS_GLOBAL_H diff --git a/librss/image.cpp b/librss/image.cpp index 66e3e135..4ab66698 100644 --- a/librss/image.cpp +++ b/librss/image.cpp @@ -14,9 +14,9 @@ #include #include -#include -#include -#include +#include +#include +#include using namespace RSS; @@ -25,39 +25,39 @@ struct Image::Private : public Shared Private() : height(31), width(88), pixmapBuffer(NULL) { } - QString title; + TQString title; KURL url; KURL link; - QString description; + TQString description; unsigned int height; unsigned int width; - QBuffer *pixmapBuffer; + TQBuffer *pixmapBuffer; }; -Image::Image() : QObject(), d(new Private) +Image::Image() : TQObject(), d(new Private) { } -Image::Image(const Image &other) : QObject(), d(0) +Image::Image(const Image &other) : TQObject(), d(0) { *this = other; } -Image::Image(const QDomNode &node) : QObject(), d(new Private) +Image::Image(const TQDomNode &node) : TQObject(), d(new Private) { - QString elemText; + TQString elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("title"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull()) d->title = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("url"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("url"))).isNull()) d->url = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("link"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull()) d->link = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("description"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull()) d->description = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("height"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("height"))).isNull()) d->height = elemText.toUInt(); - if (!(elemText = extractNode(node, QString::fromLatin1("width"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("width"))).isNull()) d->width = elemText.toUInt(); } @@ -71,7 +71,7 @@ Image::~Image() } } -QString Image::title() const +TQString Image::title() const { return d->title; } @@ -86,7 +86,7 @@ const KURL &Image::link() const return d->link; } -QString Image::description() const +TQString Image::description() const { return d->description; } @@ -111,21 +111,21 @@ void Image::getPixmap() d->pixmapBuffer->open(IO_WriteOnly); KIO::Job *job = KIO::get(d->url, false, false); - connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), - this, SLOT(slotData(KIO::Job *, const QByteArray &))); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotResult(KIO::Job *))); } -void Image::slotData(KIO::Job *, const QByteArray &data) +void Image::slotData(KIO::Job *, const TQByteArray &data) { d->pixmapBuffer->writeBlock(data.data(), data.size()); } void Image::slotResult(KIO::Job *job) { - QPixmap pixmap; + TQPixmap pixmap; if (!job->error()) - pixmap = QPixmap(d->pixmapBuffer->buffer()); + pixmap = TQPixmap(d->pixmapBuffer->buffer()); emit gotPixmap(pixmap); delete d->pixmapBuffer; diff --git a/librss/image.h b/librss/image.h index d93c3230..eeef8222 100644 --- a/librss/image.h +++ b/librss/image.h @@ -13,7 +13,7 @@ #include "global.h" -#include +#include class QDomNode; @@ -48,10 +48,10 @@ namespace RSS /** * Constructs an Image from a piece of RSS markup. - * @param node A QDomNode which references the DOM leaf to be used + * @param node A TQDomNode which references the DOM leaf to be used * for constructing the Image. */ - Image(const QDomNode &node); + Image(const TQDomNode &node); /** * Assignment operator. @@ -83,10 +83,10 @@ namespace RSS /** * RSS 0.90 and upwards - * @return The 'caption' of this image, or QString::null if no + * @return The 'caption' of this image, or TQString::null if no * caption is available. */ - QString title() const; + TQString title() const; /** * RSS 0.90 and upwards @@ -112,11 +112,11 @@ namespace RSS /** * RSS 0.91 and upwards * @return A description of what this picture shows, or - * QString::null if no description is available. Useful for + * TQString::null if no description is available. Useful for * people who deactivated images but want or need to know what is * shown. */ - QString description() const; + TQString description() const; /** * RSS 0.91 and upwards @@ -125,7 +125,7 @@ namespace RSS * this value to be between 1 and 400. * '0' if this information isn't available. This is merely provided * for completeness, you should not rely on this value but rather - * check what height the QPixmap as returned by gotPixmap() + * check what height the TQPixmap as returned by gotPixmap() * reports. */ unsigned int height() const; @@ -136,7 +136,7 @@ namespace RSS * default value is 88 pixels. The RSS 0.91 Specification requires * this value to be between 1 and 144. * This is merely provided for completeness, you should not rely - * on this value but rather check what width the QPixmap as + * on this value but rather check what width the TQPixmap as * returned by gotPixmap() reports. */ unsigned int width() const; @@ -156,10 +156,10 @@ namespace RSS * @param pixmap The pixmap as constructed from the data referenced * by the URL returned by link(). */ - void gotPixmap(const QPixmap &pixmap); + void gotPixmap(const TQPixmap &pixmap); private slots: - void slotData(KIO::Job *job, const QByteArray &data); + void slotData(KIO::Job *job, const TQByteArray &data); void slotResult(KIO::Job *job); private: diff --git a/librss/loader.cpp b/librss/loader.cpp index c38400f4..696d4f86 100644 --- a/librss/loader.cpp +++ b/librss/loader.cpp @@ -15,9 +15,9 @@ #include #include -#include -#include -#include +#include +#include +#include using namespace RSS; @@ -42,7 +42,7 @@ struct FileRetriever::Private delete buffer; } - QBuffer *buffer; + TQBuffer *buffer; int lastError; }; @@ -65,11 +65,11 @@ void FileRetriever::retrieveData(const KURL &url) d->buffer->open(IO_WriteOnly); KIO::Job *job = KIO::get(url, false, false); - connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), - SLOT(slotData(KIO::Job *, const QByteArray &))); - connect(job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *))); - connect(job, SIGNAL(permanentRedirection(KIO::Job *, const KURL &, const KURL &)), - SLOT(slotPermanentRedirection(KIO::Job *, const KURL &, const KURL &))); + connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *))); + connect(job, TQT_SIGNAL(permanentRedirection(KIO::Job *, const KURL &, const KURL &)), + TQT_SLOT(slotPermanentRedirection(KIO::Job *, const KURL &, const KURL &))); } int FileRetriever::errorCode() const @@ -77,14 +77,14 @@ int FileRetriever::errorCode() const return d->lastError; } -void FileRetriever::slotData(KIO::Job *, const QByteArray &data) +void FileRetriever::slotData(KIO::Job *, const TQByteArray &data) { d->buffer->writeBlock(data.data(), data.size()); } void FileRetriever::slotResult(KIO::Job *job) { - QByteArray data = d->buffer->buffer(); + TQByteArray data = d->buffer->buffer(); data.detach(); delete d->buffer; @@ -114,7 +114,7 @@ struct OutputRetriever::Private } KShellProcess *process; - QBuffer *buffer; + TQBuffer *buffer; int lastError; }; @@ -138,10 +138,10 @@ void OutputRetriever::retrieveData(const KURL &url) d->buffer->open(IO_WriteOnly); d->process = new KShellProcess(); - connect(d->process, SIGNAL(processExited(KProcess *)), - SLOT(slotExited(KProcess *))); - connect(d->process, SIGNAL(receivedStdout(KProcess *, char *, int)), - SLOT(slotOutput(KProcess *, char *, int))); + connect(d->process, TQT_SIGNAL(processExited(KProcess *)), + TQT_SLOT(slotExited(KProcess *))); + connect(d->process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + TQT_SLOT(slotOutput(KProcess *, char *, int))); *d->process << url.path(); d->process->start(KProcess::NotifyOnExit, KProcess::Stdout); } @@ -161,7 +161,7 @@ void OutputRetriever::slotExited(KProcess *p) if (!p->normalExit()) d->lastError = p->exitStatus(); - QByteArray data = d->buffer->buffer(); + TQByteArray data = d->buffer->buffer(); data.detach(); delete d->buffer; @@ -194,10 +194,10 @@ Loader *Loader::create() return new Loader; } -Loader *Loader::create(QObject *object, const char *slot) +Loader *Loader::create(TQObject *object, const char *slot) { Loader *loader = create(); - connect(loader, SIGNAL(loadingComplete(Loader *, Document, Status)), + connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)), object, slot); return loader; } @@ -218,8 +218,8 @@ void Loader::loadFrom(const KURL &url, DataRetriever *retriever) d->retriever = retriever; - connect(d->retriever, SIGNAL(dataRetrieved(const QByteArray &, bool)), - this, SLOT(slotRetrieverDone(const QByteArray &, bool))); + connect(d->retriever, TQT_SIGNAL(dataRetrieved(const TQByteArray &, bool)), + this, TQT_SLOT(slotRetrieverDone(const TQByteArray &, bool))); d->retriever->retrieveData(url); } @@ -229,7 +229,7 @@ int Loader::errorCode() const return d->lastError; } -void Loader::slotRetrieverDone(const QByteArray &data, bool success) +void Loader::slotRetrieverDone(const TQByteArray &data, bool success) { d->lastError = d->retriever->errorCode(); @@ -240,7 +240,7 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success) Status status = Success; if (success) { - QDomDocument doc; + TQDomDocument doc; /* Some servers insert whitespace before the declaration. * QDom doesn't tolerate that (and it's right, that's invalid XML), @@ -250,7 +250,7 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success) const char *charData = data.data(); int len = data.count(); - while (len && QChar(*charData).isSpace()) { + while (len && TQChar(*charData).isSpace()) { --len; ++charData; } @@ -259,12 +259,12 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success) * with the three leading unicode characters 0357, 0273, 0277. For * an example, check http://msdn.microsoft.com/rss.xml */ - if (len > 3 && QChar(*charData) == QChar(0357)) { + if (len > 3 && TQChar(*charData) == TQChar(0357)) { len -= 3; charData += 3; } - QByteArray tmpData; + TQByteArray tmpData; tmpData.setRawData(charData, len); if (doc.setContent(tmpData)) diff --git a/librss/loader.h b/librss/loader.h index 5f0c1447..8c4fcb4d 100644 --- a/librss/loader.h +++ b/librss/loader.h @@ -15,7 +15,7 @@ class KURL; -#include +#include namespace KIO { @@ -74,7 +74,7 @@ namespace RSS * wrong and that the data parameter might contain no or invalid * data. */ - void dataRetrieved(const QByteArray &data, bool success); + void dataRetrieved(const TQByteArray &data, bool success); private: DataRetriever(const DataRetriever &other); @@ -127,7 +127,7 @@ namespace RSS void permanentRedirection(const KURL &url); private slots: - void slotData(KIO::Job *job, const QByteArray &data); + void slotData(KIO::Job *job, const TQByteArray &data); void slotResult(KIO::Job *job); void slotPermanentRedirection(KIO::Job *job, const KURL &fromUrl, const KURL &toUrl); @@ -194,8 +194,8 @@ namespace RSS * * \code * Loader *loader = Loader::create(); - * connect(loader, SIGNAL(loadingComplete(Loader *, Document, Status)), - * this, SLOT(slotLoadingComplete(Loader *, Document, Status))); + * connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)), + * this, TQT_SLOT(slotLoadingComplete(Loader *, Document, Status))); * loader->loadFrom("http://www.blah.org/foobar.rdf", new FileRetriever); * \endcode * @@ -227,7 +227,7 @@ namespace RSS * if (status != RSS::Success) * return; * - * QString title = doc.title(); + * TQString title = doc.title(); * // do whatever you want with the information. * } * \endcode @@ -256,10 +256,10 @@ namespace RSS * Convenience method. Does the same as the above method except that * it also does the job of connecting the loadingComplete() signal * to the given slot for you. - * @param object A QObject which features the specified slot + * @param object A TQObject which features the specified slot * @param slot Which slot to connect to. */ - static Loader *create(QObject *object, const char *slot); + static Loader *create(TQObject *object, const char *slot); /** * Loads the RSS file referenced by the given URL using the @@ -305,7 +305,7 @@ namespace RSS void loadingComplete(Loader *loader, Document doc, Status status); private slots: - void slotRetrieverDone(const QByteArray &data, bool success); + void slotRetrieverDone(const TQByteArray &data, bool success); private: Loader(); diff --git a/librss/testlibrss.cpp b/librss/testlibrss.cpp index 6b6a83d3..2cbbe913 100644 --- a/librss/testlibrss.cpp +++ b/librss/testlibrss.cpp @@ -10,8 +10,8 @@ using namespace RSS; void Tester::test() { Loader *loader = Loader::create(); - connect( loader, SIGNAL( loadingComplete( Loader *, Document, Status ) ), - this, SLOT( slotLoadingComplete( Loader *, Document, Status ) ) ); + connect( loader, TQT_SIGNAL( loadingComplete( Loader *, Document, Status ) ), + this, TQT_SLOT( slotLoadingComplete( Loader *, Document, Status ) ) ); loader->loadFrom( "http://sourceforge.net/export/rss2_projnews.php?group_id=29057&rss_fulltext=1", new FileRetriever ); } diff --git a/librss/testlibrss.h b/librss/testlibrss.h index 2db10178..fda0b0a7 100644 --- a/librss/testlibrss.h +++ b/librss/testlibrss.h @@ -1,7 +1,7 @@ #ifndef TESTLIBRSS_H #define TESTLIBRSS_H -#include +#include #include "loader.h" #include "document.h" diff --git a/librss/textinput.cpp b/librss/textinput.cpp index 71d5e01c..f2af0940 100644 --- a/librss/textinput.cpp +++ b/librss/textinput.cpp @@ -13,15 +13,15 @@ #include -#include +#include using namespace RSS; struct TextInput::Private : public Shared { - QString title; - QString description; - QString name; + TQString title; + TQString description; + TQString name; KURL link; }; @@ -34,17 +34,17 @@ TextInput::TextInput(const TextInput &other) : d(0) *this = other; } -TextInput::TextInput(const QDomNode &node) : d(new Private) +TextInput::TextInput(const TQDomNode &node) : d(new Private) { - QString elemText; + TQString elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("title"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("title"))).isNull()) d->title = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("description"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("description"))).isNull()) d->description = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("name")))) + if (!(elemText = extractNode(node, TQString::fromLatin1("name")))) d->name = elemText; - if (!(elemText = extractNode(node, QString::fromLatin1("link"))).isNull()) + if (!(elemText = extractNode(node, TQString::fromLatin1("link"))).isNull()) d->link = elemText; } @@ -54,17 +54,17 @@ TextInput::~TextInput() delete d; } -QString TextInput::title() const +TQString TextInput::title() const { return d->title; } -QString TextInput::description() const +TQString TextInput::description() const { return d->description; } -QString TextInput::name() const +TQString TextInput::name() const { return d->name; } diff --git a/librss/textinput.h b/librss/textinput.h index 444e7280..ab7652ac 100644 --- a/librss/textinput.h +++ b/librss/textinput.h @@ -43,10 +43,10 @@ namespace RSS /** * Constructs a TextInput from a piece of RSS markup. - * @param node A QDomNode which references the DOM leaf to be used + * @param node A TQDomNode which references the DOM leaf to be used * for constructing the TextInput. */ - TextInput(const QDomNode &node); + TextInput(const TQDomNode &node); /** * Assignment operator. @@ -79,25 +79,25 @@ namespace RSS /** * RSS 0.90 and upwards * @return The title (often a label to be used for the input field) - * of the text input, or QString::null if no title is available. + * of the text input, or TQString::null if no title is available. */ - QString title() const; + TQString title() const; /** * RSS 0.90 and upwards * @return The description (usually used as a tooltip which appears * if the mouse hovers above the input field for a short time) of - * the text input, or QString::null if no description is + * the text input, or TQString::null if no description is * available. */ - QString description() const; + TQString description() const; /** * RSS 0.90 and upwards * @return The name of the text input (what's this for?) of the - * text input, or QString::null, if no name is available. + * text input, or TQString::null, if no name is available. */ - QString name() const; + TQString name() const; /** * RSS 0.90 and upwards diff --git a/librss/tools_p.cpp b/librss/tools_p.cpp index c88eecac..1c043849 100644 --- a/librss/tools_p.cpp +++ b/librss/tools_p.cpp @@ -10,17 +10,17 @@ */ #include "tools_p.h" -#include +#include -QString RSS::extractNode(const QDomNode &parent, const QString &elemName) +TQString RSS::extractNode(const TQDomNode &parent, const TQString &elemName) { - QDomNode node = parent.namedItem(elemName); + TQDomNode node = parent.namedItem(elemName); if (node.isNull()) - return QString::null; + return TQString::null; - QString result = node.toElement().text().simplifyWhiteSpace(); + TQString result = node.toElement().text().simplifyWhiteSpace(); if (result.isEmpty()) - return QString::null; + return TQString::null; return result; } diff --git a/librss/tools_p.h b/librss/tools_p.h index adc508b8..0d9c9801 100644 --- a/librss/tools_p.h +++ b/librss/tools_p.h @@ -24,7 +24,7 @@ namespace RSS unsigned int count; }; - QString extractNode(const QDomNode &parent, const QString &elemName); + TQString extractNode(const TQDomNode &parent, const TQString &elemName); } #endif // LIBRSS_TOOLS_P_H diff --git a/wifi/interface_dcop.h b/wifi/interface_dcop.h index 9a4149c0..4bbe7905 100644 --- a/wifi/interface_dcop.h +++ b/wifi/interface_dcop.h @@ -8,7 +8,7 @@ class dcop_interface : virtual public DCOPObject K_DCOP k_dcop: - virtual QString interface() const = 0; + virtual TQString interface() const = 0; }; #endif diff --git a/wifi/interface_wireless.cpp b/wifi/interface_wireless.cpp index 5ece6301..d04efa95 100644 --- a/wifi/interface_wireless.cpp +++ b/wifi/interface_wireless.cpp @@ -16,9 +16,9 @@ ***************************************************************************/ #include "interface_wireless.h" -#include -#include -#include +#include +#include +#include #ifndef WITHOUT_ARTS #include @@ -32,10 +32,10 @@ #include #include #include -#include +#include #include -Interface_wireless::Interface_wireless (QStringList * ignoreInterfaces) +Interface_wireless::Interface_wireless (TQStringList * ignoreInterfaces) { this->ignoreInterfaces = ignoreInterfaces; has_frequency = false; @@ -94,7 +94,7 @@ bool Interface_wireless::get_mode (int &ext_mode) } } -bool Interface_wireless::get_key (QString & ext_key, +bool Interface_wireless::get_key (TQString & ext_key, int &ext_size, int &ext_flags) { @@ -111,7 +111,7 @@ bool Interface_wireless::get_key (QString & ext_key, } } -QString Interface_wireless::get_essid () +TQString Interface_wireless::get_essid () { return essid; } @@ -126,13 +126,13 @@ int Interface_wireless::get_txpower_disabled() return txpower_disabled; } -bool Interface_wireless::get_AP_info (QString & mac, QString &/*ip*/) +bool Interface_wireless::get_AP_info (TQString & mac, TQString &/*ip*/) { mac = access_point_address; return false; } -QString Interface_wireless::get_IP_info () +TQString Interface_wireless::get_IP_info () { return ip_address; } @@ -142,7 +142,7 @@ double Interface_wireless::get_bitrate () return bitrate; } -QString Interface_wireless::get_interface_name () +TQString Interface_wireless::get_interface_name () { return interface_name; } @@ -196,12 +196,12 @@ MyTimeNotify::notifyTime () #endif QString -whois (const char *MAC_ADR, QStringList APList) +whois (const char *MAC_ADR, TQStringList APList) { - for (QStringList::Iterator it = APList.begin (); it != APList.end (); + for (TQStringList::Iterator it = APList.begin (); it != APList.end (); (it++)++) { - if ((*it) == (QString) MAC_ADR) + if ((*it) == (TQString) MAC_ADR) return *(++it); } return i18n ("UNKNOWN"); diff --git a/wifi/interface_wireless.h b/wifi/interface_wireless.h index 029a8156..0a92709e 100644 --- a/wifi/interface_wireless.h +++ b/wifi/interface_wireless.h @@ -20,9 +20,9 @@ #include "config.h" -#include -#include -#include +#include +#include +#include #ifndef WITHOUT_ARTS #include @@ -35,28 +35,28 @@ const int MAX_HISTORY = 240; // number of device states to be saved class Interface_wireless:public QObject { Q_OBJECT public: - Interface_wireless (QStringList * ignoreInterfaces); + Interface_wireless (TQStringList * ignoreInterfaces); virtual ~ Interface_wireless() { }; virtual bool get_device_freq (double &freq); // true: device returned valid frequency virtual bool get_mode (int &mode); // true: device returned valid mode info - virtual bool get_key (QString & key, int &size, int &flags); + virtual bool get_key (TQString & key, int &size, int &flags); // true: device has set up a valid crypto key - virtual QString get_essid (); - virtual bool get_AP_info (QString & mac, QString & ip); + virtual TQString get_essid (); + virtual bool get_AP_info (TQString & mac, TQString & ip); // true: could retrieve IP, false: returned IP info invalid - virtual QString get_IP_info (); + virtual TQString get_IP_info (); virtual double get_bitrate (); - virtual QString get_interface_name (); + virtual TQString get_interface_name (); // if no device is attached, return empty QString virtual bool get_current_quality (int &sig, int &noi, int &qua); // quality info is only valid when true - virtual QTable* get_available_networks () = 0; + virtual TQTable* get_available_networks () = 0; virtual bool get_has_txpower(); virtual int get_txpower_disabled(); - virtual void setActiveDevice( QString device ) = 0; + virtual void setActiveDevice( TQString device ) = 0; // stats int sigLevel[MAX_HISTORY]; int sigLevelMin, sigLevelMax; @@ -75,7 +75,7 @@ signals: void statusChanged (); void modeChanged (); void speedChanged (); - void essidChanged (QString essid); + void essidChanged (TQString essid); void txPowerChanged (); void statsUpdated (); protected: @@ -86,18 +86,18 @@ protected: bool has_mode; int mode; bool has_key; - QString key; + TQString key; int key_size; int key_flags; - QString essid; - QString access_point_address; - QString ip_address; + TQString essid; + TQString access_point_address; + TQString ip_address; double bitrate; - QString interface_name; + TQString interface_name; int socket; bool has_range; int range; - QStringList * ignoreInterfaces; + TQStringList * ignoreInterfaces; bool has_txpower; int txpower_disabled; }; @@ -120,6 +120,6 @@ public: #endif -QString whois (const char *MAC_ADR, QStringList APList); +TQString whois (const char *MAC_ADR, TQStringList APList); #endif /* INTERFACE_WIRELESS_H */ diff --git a/wifi/interface_wireless_wirelessextensions.cpp b/wifi/interface_wireless_wirelessextensions.cpp index 874eefb3..878b9460 100644 --- a/wifi/interface_wireless_wirelessextensions.cpp +++ b/wifi/interface_wireless_wirelessextensions.cpp @@ -17,9 +17,9 @@ #include "interface_wireless_wirelessextensions.h" #include -#include -#include -#include +#include +#include +#include #include @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include @@ -79,7 +79,7 @@ /* ================================== FROM IWCONFIG.C ================================== */ int -Interface_wireless_wirelessextensions::get_info (int skfd, const QString& interface, +Interface_wireless_wirelessextensions::get_info (int skfd, const TQString& interface, struct wireless_info& info) { struct iwreq wrq; @@ -248,7 +248,7 @@ Interface_wireless_wirelessextensions::get_info (int skfd, const QString& interf /* ================================ END IWCONFIG.C ================================ */ -Interface_wireless_wirelessextensions::Interface_wireless_wirelessextensions (QStringList * ignoreInterfaces) +Interface_wireless_wirelessextensions::Interface_wireless_wirelessextensions (TQStringList * ignoreInterfaces) : Interface_wireless(ignoreInterfaces) { } @@ -261,7 +261,7 @@ bool Interface_wireless_wirelessextensions::isSocketOpen() return (socket > 0); } -void Interface_wireless_wirelessextensions::setActiveDevice( QString device ) +void Interface_wireless_wirelessextensions::setActiveDevice( TQString device ) { kdDebug () << "activating wireless device " << device << endl; interface_name = device; @@ -287,30 +287,30 @@ void Interface_wireless_wirelessextensions::setNoActiveDevice( ) has_mode = false; mode = 0; has_key = 0; - key = QString::null; + key = TQString::null; key_size = 0; key_flags = 0; - essid = QString::null; - access_point_address = QString::null; - ip_address = QString::null; + essid = TQString::null; + access_point_address = TQString::null; + ip_address = TQString::null; bitrate = 0; has_range = false; has_txpower = false; txpower_disabled = 0; // propagate the changes - setActiveDevice( QString::null ); + setActiveDevice( TQString::null ); } -QStringList Interface_wireless_wirelessextensions::available_wifi_devices() +TQStringList Interface_wireless_wirelessextensions::available_wifi_devices() { - QFile procnetdev(PROC_NET_DEV); + TQFile procnetdev(PROC_NET_DEV); procnetdev.open (IO_ReadOnly); kdDebug () << "Autodetecting..." << endl; - QStringList liste; - QString device; + TQStringList liste; + TQString device; while (!procnetdev.atEnd()) { procnetdev.readLine (device, 9999); int pos = device.find (':'); @@ -344,11 +344,11 @@ bool Interface_wireless_wirelessextensions::autodetect_device() if (!isSocketOpen()) return false; - QStringList liste = available_wifi_devices(); + TQStringList liste = available_wifi_devices(); - for (QStringList::Iterator it = liste.begin (); it != liste.end (); ++it) + for (TQStringList::Iterator it = liste.begin (); it != liste.end (); ++it) { - QString device = *it; + TQString device = *it; kdDebug () << "[ " << device << " ] " << endl; wireless_info info; int result = get_info (socket, device, info); @@ -499,9 +499,9 @@ bool Interface_wireless_wirelessextensions::poll_device_info () if (sa->sa_family == AF_INET) { sin = (struct sockaddr_in *) sa; - if (ip_address != (QString) inet_ntoa (sin->sin_addr)) + if (ip_address != (TQString) inet_ntoa (sin->sin_addr)) emitStatusChanged = true; - ip_address = (QString) inet_ntoa (sin->sin_addr); + ip_address = (TQString) inet_ntoa (sin->sin_addr); } else { @@ -521,17 +521,17 @@ bool Interface_wireless_wirelessextensions::poll_device_info () return true; } -QTable* Interface_wireless_wirelessextensions::get_available_networks () +TQTable* Interface_wireless_wirelessextensions::get_available_networks () { - networks = new QTable(0,4,0); + networks = new TQTable(0,4,0); networks->horizontalHeader()->setLabel( 0, i18n("Network Name") ); networks->horizontalHeader()->setLabel( 1, i18n("Mode") ); networks->horizontalHeader()->setLabel( 2, i18n("Quality") ); networks->horizontalHeader()->setLabel( 3, i18n("WEP") ); KProcIO *iwlist = new KProcIO; - QString iwlist_bin = KStandardDirs::findExe("iwlist"); + TQString iwlist_bin = KStandardDirs::findExe("iwlist"); if(iwlist_bin.isEmpty()) iwlist_bin = KStandardDirs::findExe("iwlist", "/usr/local/sbin:/usr/sbin:/sbin"); if(iwlist_bin.isEmpty()) @@ -539,7 +539,7 @@ QTable* Interface_wireless_wirelessextensions::get_available_networks () *iwlist << iwlist_bin << interface_name << "scanning"; -// connect ( iwlist, SIGNAL ( readReady ( KProcIO * ) ), this, SLOT ( parseScanData ( KProcIO * ) ) ); +// connect ( iwlist, TQT_SIGNAL ( readReady ( KProcIO * ) ), this, TQT_SLOT ( parseScanData ( KProcIO * ) ) ); if ( !iwlist->start ( KProcess::Block ) ) KMessageBox::sorry ( 0, i18n ( "Unable to perform the scan. Please make sure the executable \"iwlist\" is in your $PATH." ), @@ -558,7 +558,7 @@ QTable* Interface_wireless_wirelessextensions::get_available_networks () void Interface_wireless_wirelessextensions::parseScanData ( KProcIO * iwlist ) { - QString data; + TQString data; int cellcount = 0, iteratecount = 0; bool ignoreRemainingBits = false; while ( iwlist->readln ( data, true ) >= 0 ) @@ -578,16 +578,16 @@ Interface_wireless_wirelessextensions::parseScanData ( KProcIO * iwlist ) } if ( data.contains ( "ESSID:" ) ) { - QString ssid = data.mid ( data.find ( "\"" ) + 1, data.length ( ) - data.find ( "\"" ) - 2 ); + TQString ssid = data.mid ( data.find ( "\"" ) + 1, data.length ( ) - data.find ( "\"" ) - 2 ); if ((ssid=="") || (ssid==" ")) ssid = "(hidden cell)"; networks->setText ( cellcount - 1, 0, ssid ); } if ( data.contains ( "Mode:" ) ) { if ( data.contains ( "Master" ) ) - networks->setText ( cellcount - 1, 1, QString ( i18n ( "Managed" ) ) ); + networks->setText ( cellcount - 1, 1, TQString ( i18n ( "Managed" ) ) ); if ( data.contains ( "Ad-Hoc" ) ) - networks->setText ( cellcount - 1, 1, QString ( i18n ( "Ad-Hoc" ) ) ); + networks->setText ( cellcount - 1, 1, TQString ( i18n ( "Ad-Hoc" ) ) ); // if could be that this cell belongs to an SSID already discovered, or that there are more than one // hidden cells, which doesn't give any new information. So, we first search for duplicates and delete // this row if it's a duplicate. If the same SSID is there once as Managed and once as Ad-Hoc it is no @@ -608,30 +608,30 @@ Interface_wireless_wirelessextensions::parseScanData ( KProcIO * iwlist ) if ( !ignoreRemainingBits && data.contains ( "Encryption key:" ) ) { if ( data.contains ( "off" ) ) - networks->setText ( cellcount - 1, 3, QString ( "off" ) ); + networks->setText ( cellcount - 1, 3, TQString ( "off" ) ); else - networks->setText ( cellcount - 1, 3, QString ( "on" ) ); + networks->setText ( cellcount - 1, 3, TQString ( "on" ) ); } if ( !ignoreRemainingBits && data.contains ( "Quality:" ) ) { - QString quality = data.mid ( data.find ( ":" ) + 1, data.find ( "/" ) - data.find ( ":" ) - 1 ); + TQString quality = data.mid ( data.find ( ":" ) + 1, data.find ( "/" ) - data.find ( ":" ) - 1 ); networks->setText ( cellcount - 1, 2, quality ); } if ( !ignoreRemainingBits && data.contains ( "Quality=" ) ) { - QString quality = data.mid ( data.find ( "=" ) + 1, data.find ( "/" ) - data.find ( "=" ) - 1 ); + TQString quality = data.mid ( data.find ( "=" ) + 1, data.find ( "/" ) - data.find ( "=" ) - 1 ); networks->setText ( cellcount - 1, 2, quality ); } if ( !ignoreRemainingBits && data.contains ( "wpa_ie" ) ) { - networks->setText ( cellcount - 1, 3, QString ( "WPA" ) ); + networks->setText ( cellcount - 1, 3, TQString ( "WPA" ) ); } if ( !ignoreRemainingBits && data.contains ( "rsn_ie" ) ) { - networks->setText ( cellcount - 1, 3, QString ( "WPA2" ) ); + networks->setText ( cellcount - 1, 3, TQString ( "WPA2" ) ); } } diff --git a/wifi/interface_wireless_wirelessextensions.h b/wifi/interface_wireless_wirelessextensions.h index 96d91566..b5e9782d 100644 --- a/wifi/interface_wireless_wirelessextensions.h +++ b/wifi/interface_wireless_wirelessextensions.h @@ -20,8 +20,8 @@ #include "config.h" -#include -#include +#include +#include #ifndef WITHOUT_ARTS #include @@ -41,11 +41,11 @@ extern "C" class Interface_wireless_wirelessextensions:public Interface_wireless { Q_OBJECT public: - Interface_wireless_wirelessextensions (QStringList * ignoreInterfaces); - QTable* get_available_networks (); + Interface_wireless_wirelessextensions (TQStringList * ignoreInterfaces); + TQTable* get_available_networks (); public: - void setActiveDevice( QString device ); + void setActiveDevice( TQString device ); public slots: bool poll_device_info (); @@ -53,12 +53,12 @@ public slots: private: bool isSocketOpen(); void setNoActiveDevice( ); - QStringList available_wifi_devices(); + TQStringList available_wifi_devices(); bool autodetect_device(); - QString print_scanning_token (struct iw_event *event); - int get_info (int skfd, const QString& interface, struct wireless_info& info); - QTable* networks; + TQString print_scanning_token (struct iw_event *event); + int get_info (int skfd, const TQString& interface, struct wireless_info& info); + TQTable* networks; private slots: void parseScanData ( KProcIO * iwlist ); }; diff --git a/wifi/kcmwifi/configcrypto.ui.h b/wifi/kcmwifi/configcrypto.ui.h index 6ada4aa4..261e3411 100644 --- a/wifi/kcmwifi/configcrypto.ui.h +++ b/wifi/kcmwifi/configcrypto.ui.h @@ -32,7 +32,7 @@ void ConfigCrypto::save( IfConfig &ifconfig ) } -void ConfigCrypto::slotUpdateKey1Status(const QString& key) +void ConfigCrypto::slotUpdateKey1Status(const TQString& key) { KeyStates status = ::Key::isValid( key ); switch (status) { @@ -63,7 +63,7 @@ void ConfigCrypto::slotUpdateKey1Status(const QString& key) } } -void ConfigCrypto::slotUpdateKey2Status(const QString& key) +void ConfigCrypto::slotUpdateKey2Status(const TQString& key) { KeyStates status = ::Key::isValid( key ); switch (status) { @@ -94,7 +94,7 @@ void ConfigCrypto::slotUpdateKey2Status(const QString& key) } } -void ConfigCrypto::slotUpdateKey3Status(const QString& key) +void ConfigCrypto::slotUpdateKey3Status(const TQString& key) { KeyStates status = ::Key::isValid( key ); switch (status) { @@ -125,7 +125,7 @@ void ConfigCrypto::slotUpdateKey3Status(const QString& key) } } -void ConfigCrypto::slotUpdateKey4Status(const QString& key) +void ConfigCrypto::slotUpdateKey4Status(const TQString& key) { KeyStates status = ::Key::isValid( key ); switch (status) { diff --git a/wifi/kcmwifi/ifconfigpage.cpp b/wifi/kcmwifi/ifconfigpage.cpp index 887c817d..8b96b63b 100644 --- a/wifi/kcmwifi/ifconfigpage.cpp +++ b/wifi/kcmwifi/ifconfigpage.cpp @@ -23,11 +23,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "configcrypto.h" #include "configpower.h" @@ -37,41 +37,41 @@ #include #include -IfConfigPage::IfConfigPage( int configNum, QWidget *parent, const char *name ) +IfConfigPage::IfConfigPage( int configNum, TQWidget *parent, const char *name ) : IfConfigPageBase( parent, name ), m_configNum( configNum ) { - connect( cb_pmEnabled, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) ); - connect( cb_useCrypto, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) ); - connect( le_networkName, SIGNAL( textChanged( const QString & ) ), - SIGNAL( changed() ) ); - connect( cmb_wifiMode, SIGNAL( activated( int ) ), SIGNAL( changed() ) ); - connect( cmb_speed, SIGNAL( activated( int ) ), SIGNAL( changed() ) ); - connect( cb_runScript, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) ); - connect( url_connectScript, SIGNAL( textChanged( const QString & ) ), - SIGNAL( changed() ) ); - connect( cb_Autodetect, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) ); - connect( le_interface, SIGNAL( textChanged( const QString & ) ), - SIGNAL( changed() ) ); - - connect( pb_setupPower, SIGNAL( clicked() ), SLOT( slotSetupPower() ) ); - connect( pb_setupCrypto, SIGNAL( clicked() ), SLOT( slotSetupCrypto() ) ); - - connect( cb_useCrypto, SIGNAL( toggled( bool ) ), - pb_setupCrypto, SLOT( setEnabled( bool ) ) ); - connect( cb_pmEnabled, SIGNAL( toggled( bool ) ), - pb_setupPower, SLOT( setEnabled( bool ) ) ); - connect( cb_runScript, SIGNAL( toggled( bool ) ), - lb_connectScript, SLOT( setEnabled( bool ) ) ); - connect( cb_runScript, SIGNAL( toggled( bool ) ), - lb_connectScript, SLOT( setEnabled( bool ) ) ); - connect( cb_runScript, SIGNAL( toggled( bool ) ), - lb_connectScript, SLOT( setEnabled( bool ) ) ); - connect( cb_Autodetect, SIGNAL( toggled( bool ) ), - le_interface, SLOT( setDisabled( bool ) ) ); - - connect( cb_Autodetect, SIGNAL( toggled( bool ) ), - this, SLOT ( slotResetInterface( bool ) ) ); + connect( cb_pmEnabled, TQT_SIGNAL( toggled( bool ) ), TQT_SIGNAL( changed() ) ); + connect( cb_useCrypto, TQT_SIGNAL( toggled( bool ) ), TQT_SIGNAL( changed() ) ); + connect( le_networkName, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SIGNAL( changed() ) ); + connect( cmb_wifiMode, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( changed() ) ); + connect( cmb_speed, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( changed() ) ); + connect( cb_runScript, TQT_SIGNAL( toggled( bool ) ), TQT_SIGNAL( changed() ) ); + connect( url_connectScript, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SIGNAL( changed() ) ); + connect( cb_Autodetect, TQT_SIGNAL( toggled( bool ) ), TQT_SIGNAL( changed() ) ); + connect( le_interface, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SIGNAL( changed() ) ); + + connect( pb_setupPower, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSetupPower() ) ); + connect( pb_setupCrypto, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSetupCrypto() ) ); + + connect( cb_useCrypto, TQT_SIGNAL( toggled( bool ) ), + pb_setupCrypto, TQT_SLOT( setEnabled( bool ) ) ); + connect( cb_pmEnabled, TQT_SIGNAL( toggled( bool ) ), + pb_setupPower, TQT_SLOT( setEnabled( bool ) ) ); + connect( cb_runScript, TQT_SIGNAL( toggled( bool ) ), + lb_connectScript, TQT_SLOT( setEnabled( bool ) ) ); + connect( cb_runScript, TQT_SIGNAL( toggled( bool ) ), + lb_connectScript, TQT_SLOT( setEnabled( bool ) ) ); + connect( cb_runScript, TQT_SIGNAL( toggled( bool ) ), + lb_connectScript, TQT_SLOT( setEnabled( bool ) ) ); + connect( cb_Autodetect, TQT_SIGNAL( toggled( bool ) ), + le_interface, TQT_SLOT( setDisabled( bool ) ) ); + + connect( cb_Autodetect, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT ( slotResetInterface( bool ) ) ); } void IfConfigPage::slotResetInterface( bool checked ) @@ -120,7 +120,7 @@ void IfConfigPage::save() IfConfig &ifconfig = config->m_ifConfig[ m_configNum ]; ifconfig.m_networkName = le_networkName->text(); - ifconfig.m_interface = cb_Autodetect->isChecked()? QString::null : + ifconfig.m_interface = cb_Autodetect->isChecked()? TQString::null : le_interface->text(); ifconfig.m_wifiMode = ( IfConfig::WifiMode ) cmb_wifiMode->currentItem(); ifconfig.m_speed = ( IfConfig::Speed ) cmb_speed->currentItem(); diff --git a/wifi/kcmwifi/ifconfigpage.h b/wifi/kcmwifi/ifconfigpage.h index d7db8a93..bb79f215 100644 --- a/wifi/kcmwifi/ifconfigpage.h +++ b/wifi/kcmwifi/ifconfigpage.h @@ -28,7 +28,7 @@ class IfConfigPage : public IfConfigPageBase Q_OBJECT public: - IfConfigPage( int configNum, QWidget *parent, const char *name ); + IfConfigPage( int configNum, TQWidget *parent, const char *name ); ~IfConfigPage() {} void load(); diff --git a/wifi/kcmwifi/kcmwifi.cpp b/wifi/kcmwifi/kcmwifi.cpp index 693edc92..743f3d2e 100644 --- a/wifi/kcmwifi/kcmwifi.cpp +++ b/wifi/kcmwifi/kcmwifi.cpp @@ -18,10 +18,10 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -39,13 +39,13 @@ #include "wificonfig.h" #include "vendorconfig.h" -typedef KGenericFactory < KCMWifi, QWidget > KWiFiFactory; +typedef KGenericFactory < KCMWifi, TQWidget > KWiFiFactory; K_EXPORT_COMPONENT_FACTORY (kcm_wifi, KWiFiFactory("kcmwifi") ) -KCMWifi::KCMWifi(QWidget * parent, const char *name, const QStringList &) +KCMWifi::KCMWifi(TQWidget * parent, const char *name, const TQStringList &) : KCModule (parent, name) { - tabs = new QTabWidget (this, "tabs"); + tabs = new TQTabWidget (this, "tabs"); m_mainConfig = new MainConfig(this, "m_mainConfig"); @@ -55,18 +55,18 @@ KCMWifi::KCMWifi(QWidget * parent, const char *name, const QStringList &) { IfConfigPage *ifConfigPage = new IfConfigPage( i, tabs, "m_configPage" ); tabs->addTab(ifConfigPage, i18n ("Config &%1").arg( i+1 )); - connect(ifConfigPage, SIGNAL(changed()), SLOT( slotChanged() ) ); + connect(ifConfigPage, TQT_SIGNAL(changed()), TQT_SLOT( slotChanged() ) ); m_ifConfigPage[ i ] = ifConfigPage; } - QVBoxLayout *top = new QVBoxLayout (this, 0, KDialog::spacingHint()); + TQVBoxLayout *top = new TQVBoxLayout (this, 0, KDialog::spacingHint()); top->addWidget( tabs ); top->addWidget( m_mainConfig ); top->addStretch(); - connect(m_mainConfig, SIGNAL(changed()), SLOT( slotChanged() ) ); - connect(m_mainConfig, SIGNAL(activateClicked()), SLOT(slotActivate())); + connect(m_mainConfig, TQT_SIGNAL(changed()), TQT_SLOT( slotChanged() ) ); + connect(m_mainConfig, TQT_SIGNAL(activateClicked()), TQT_SLOT(slotActivate())); if ( geteuid() != 0 ) { @@ -147,7 +147,7 @@ IfConfigPage* KCMWifi::addConfigTab( int count, bool vendor ) { IfConfigPage *ifConfigPage = new IfConfigPage( vendorBase + m_activeVendorCount, tabs, "m_configPage" ); tabs->addTab(ifConfigPage, i18n ("Vendor %1").arg( m_activeVendorCount+1 ) ); - connect(ifConfigPage, SIGNAL(changed()), SLOT( slotChanged() ) ); + connect(ifConfigPage, TQT_SIGNAL(changed()), TQT_SLOT( slotChanged() ) ); m_ifConfigPage[ vendorBase+m_activeVendorCount ] = ifConfigPage; m_mainConfig->registerConfig( vendorBase+m_activeVendorCount ); m_activeVendorCount++; @@ -170,7 +170,7 @@ IfConfigPage* KCMWifi::addConfigTab( int count, bool vendor ) { IfConfigPage *ifConfigPage = new IfConfigPage( i, tabs, "m_configPage" ); tabs->insertTab(ifConfigPage, i18n ("Config &%1").arg( i+1 ), i ); - connect(ifConfigPage, SIGNAL(changed()), SLOT( slotChanged() ) ); + connect(ifConfigPage, TQT_SIGNAL(changed()), TQT_SLOT( slotChanged() ) ); m_ifConfigPage[ i ] = ifConfigPage; m_mainConfig->registerConfig( i+1 ); retval = ifConfigPage; @@ -203,7 +203,7 @@ void KCMWifi::activate() { KProcess proc; - QStringList failedParts; + TQStringList failedParts; WifiConfig *config = WifiConfig::instance(); int index; @@ -219,7 +219,7 @@ void KCMWifi::activate() IfConfig ifconfig = config->m_ifConfig[ index ]; - QString tempInterface; + TQString tempInterface; if ( ifconfig.m_interface.isEmpty() ) { tempInterface = config->autoDetectInterface(); @@ -295,8 +295,8 @@ void KCMWifi::activate() if ( ifconfig.m_keys[ i ].isValid( ifconfig.m_keys[ i ].key() ) > INVALID ) { proc << "key" - << QString( "[%1]").arg( i+1 ) - << QString( "%1").arg( ifconfig.m_keys[ i ].rawKey() ); + << TQString( "[%1]").arg( i+1 ) + << TQString( "%1").arg( ifconfig.m_keys[ i ].rawKey() ); } } @@ -308,7 +308,7 @@ void KCMWifi::activate() proc << "key" << ifconfig.cryptomodeAsString(); proc << "key" - << QString( "[%1]" ).arg( ifconfig.activeKeyId() ); + << TQString( "[%1]" ).arg( ifconfig.activeKeyId() ); proc << "key" << "on"; } @@ -334,10 +334,10 @@ void KCMWifi::activate() { proc << "power" << "period" - << QString( "%1" ).arg( ifconfig.m_wakeupPeriod ); + << TQString( "%1" ).arg( ifconfig.m_wakeupPeriod ); proc << "power" << "timeout" - << QString( "%1" ).arg( ifconfig.m_sleepTimeout ); + << TQString( "%1" ).arg( ifconfig.m_sleepTimeout ); proc << ifconfig.powermodeAsString(); } @@ -361,7 +361,7 @@ void KCMWifi::activate() if ( ifconfig.m_runScript ) { proc.clearArguments(); - proc << QStringList::split( " ", ifconfig.m_connectScript ); + proc << TQStringList::split( " ", ifconfig.m_connectScript ); proc.start(KProcess::DontCare); } diff --git a/wifi/kcmwifi/kcmwifi.h b/wifi/kcmwifi/kcmwifi.h index 87822ac0..5ba2af33 100644 --- a/wifi/kcmwifi/kcmwifi.h +++ b/wifi/kcmwifi/kcmwifi.h @@ -23,7 +23,7 @@ #include -#include +#include class IfConfigPage; class MainConfig; @@ -34,7 +34,7 @@ class KCMWifi : public KCModule { Q_OBJECT public: - KCMWifi (QWidget * parent, const char *name, const QStringList &); + KCMWifi (TQWidget * parent, const char *name, const TQStringList &); ~KCMWifi (); void load(); @@ -55,7 +55,7 @@ protected slots: private: MainConfig *m_mainConfig; IfConfigPage *m_ifConfigPage[ 15 ]; // that makes 5 vendor configs - QTabWidget* tabs; + TQTabWidget* tabs; int m_activeVendorCount; }; diff --git a/wifi/kcmwifi/mainconfig.cpp b/wifi/kcmwifi/mainconfig.cpp index 9cdcfcec..c740df69 100644 --- a/wifi/kcmwifi/mainconfig.cpp +++ b/wifi/kcmwifi/mainconfig.cpp @@ -30,10 +30,10 @@ #include #include -#include -#include +#include +#include -MainConfig::MainConfig( QWidget *parent, const char *name ) +MainConfig::MainConfig( TQWidget *parent, const char *name ) : MainConfigBase( parent, name ) { WifiConfig *config = WifiConfig::instance(); @@ -43,12 +43,12 @@ MainConfig::MainConfig( QWidget *parent, const char *name ) } - connect( cb_usePreset, SIGNAL( toggled( bool ) ), SIGNAL( changed() ) ); - connect( cmb_presetConfig, SIGNAL( activated( int ) ), SIGNAL( changed() ) ); - connect( sb_numConfigs, SIGNAL( valueChanged( int ) ), SIGNAL( changed() ) ); + connect( cb_usePreset, TQT_SIGNAL( toggled( bool ) ), TQT_SIGNAL( changed() ) ); + connect( cmb_presetConfig, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( changed() ) ); + connect( sb_numConfigs, TQT_SIGNAL( valueChanged( int ) ), TQT_SIGNAL( changed() ) ); - connect( pb_activate, SIGNAL( clicked() ), SIGNAL( activateClicked() ) ); - connect( sb_numConfigs, SIGNAL( valueChanged( int ) ), SLOT( slotChangeNumConfigs( int ) ) ); + connect( pb_activate, TQT_SIGNAL( clicked() ), TQT_SIGNAL( activateClicked() ) ); + connect( sb_numConfigs, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotChangeNumConfigs( int ) ) ); } diff --git a/wifi/kcmwifi/mainconfig.h b/wifi/kcmwifi/mainconfig.h index 55458fa4..edc09560 100644 --- a/wifi/kcmwifi/mainconfig.h +++ b/wifi/kcmwifi/mainconfig.h @@ -30,7 +30,7 @@ class MainConfig : public MainConfigBase Q_OBJECT public: - MainConfig( QWidget *parent, const char *name=0 ); + MainConfig( TQWidget *parent, const char *name=0 ); ~MainConfig() {} void load(); diff --git a/wifi/kcmwifi/vendorconfig.cpp b/wifi/kcmwifi/vendorconfig.cpp index 36460c4a..e415c276 100644 --- a/wifi/kcmwifi/vendorconfig.cpp +++ b/wifi/kcmwifi/vendorconfig.cpp @@ -17,12 +17,12 @@ Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -54,19 +54,19 @@ VendorConfig::initSuSE_92plus ( ) /* configurations are located in /etc/sysconfig/network/ifcfg-wlan* there can be more than one if there are multiple wireless interfaces */ - QDir filelist ( "/etc/sysconfig/network", "ifcfg-wlan*" ); - QStringList files = filelist.entryList ( ); + TQDir filelist ( "/etc/sysconfig/network", "ifcfg-wlan*" ); + TQStringList files = filelist.entryList ( ); if ( files.count() == 0 ) { return; } - for ( QStringList::Iterator it = files.begin ( ); it != files.end ( ); ++it ) + for ( TQStringList::Iterator it = files.begin ( ); it != files.end ( ); ++it ) { if ( ( ( *it ).endsWith ( "~" ) ) == false ) { // ignore backup files - QFile configfile ( QString ( "/etc/sysconfig/network/%1" ).arg ( *it ) ); + TQFile configfile ( TQString ( "/etc/sysconfig/network/%1" ).arg ( *it ) ); configfile.open ( IO_ReadOnly ); kdDebug ( ) << "Opened SuSE configuration file " << configfile.name ( ) << "\n"; @@ -82,12 +82,12 @@ VendorConfig::initSuSE_92plus ( ) WifiConfig *config = WifiConfig::instance ( ); IfConfig & ifconfig = config->m_ifConfig[KCMWifi::vendorBase + m_totalConfigs]; - QString buffer; + TQString buffer; while ( configfile.readLine ( buffer, 255 ) != -1 ) { // lines look like WIRELESS_ESSID='bla', so split it into WIRELESS_ESSID and bla - QString var = buffer.section ( '=', 0, 0 ); - QString value = buffer.section ( '=', 1, 1 ); + TQString var = buffer.section ( '=', 0, 0 ); + TQString value = buffer.section ( '=', 1, 1 ); value = value.mid ( 1, value.length ( ) - 3 ); kdDebug ( ) << "Variable " << var << " contains " << value << ".\n"; // evaluate the meaningful lines @@ -157,7 +157,7 @@ VendorConfig::initSuSE_92plus ( ) void VendorConfig::initDebian ( ) { - QFile configfile ( QString ( "/etc/network/interfaces" ) ); + TQFile configfile ( TQString ( "/etc/network/interfaces" ) ); if ( !configfile.open ( IO_ReadOnly ) ) { return; @@ -176,12 +176,12 @@ is incremented _after_ successful setup of each given config. */ WifiConfig *config = WifiConfig::instance ( ); IfConfig & ifconfig = config->m_ifConfig[KCMWifi::vendorBase + m_totalConfigs]; - QString buffer; + TQString buffer; while ( configfile.readLine ( buffer, 255 ) != -1 ) { // lines look like wireless-defaultkey bla, so split it into wireless-defaultkey and bla - QString var = buffer.section ( ' ', 0, 0 ); - QString value = buffer.section ( ' ', 1, 1 ); + TQString var = buffer.section ( ' ', 0, 0 ); + TQString value = buffer.section ( ' ', 1, 1 ); kdDebug ( ) << "Variable " << var << " contains " << value << ".\n"; // evaluate the meaningful lines if ( var.startsWith ( "wireless", false ) ) diff --git a/wifi/kcmwifi/wificonfig.cpp b/wifi/kcmwifi/wificonfig.cpp index 5afd041f..53f1c7e0 100644 --- a/wifi/kcmwifi/wificonfig.cpp +++ b/wifi/kcmwifi/wificonfig.cpp @@ -17,7 +17,7 @@ Boston, MA 02110-1301, USA. */ -#include +#include #include #include @@ -28,23 +28,23 @@ #include "wificonfig.h" -static QStringList speedList; -static QStringList wifiModeList; -static QStringList cryptoModeList; -static QStringList powerModeList; +static TQStringList speedList; +static TQStringList wifiModeList; +static TQStringList cryptoModeList; +static TQStringList powerModeList; Key::Key() { } -Key::Key( const QString &key ) +Key::Key( const TQString &key ) { setKey( key ); } -QString Key::rawKey() const +TQString Key::rawKey() const { - QString s = m_key; + TQString s = m_key; if ( isValid( m_key ) >= STRING_64 ) s = "s:" + s; @@ -52,12 +52,12 @@ QString Key::rawKey() const return s; } -void Key::setKey( const QString &key ) +void Key::setKey( const TQString &key ) { m_key = key; } -KeyStates Key::isValid ( QString keyCandidate ) +KeyStates Key::isValid ( TQString keyCandidate ) { if (keyCandidate.isEmpty()) { kdDebug() << "Ignoring key: empty.\n"; @@ -117,9 +117,9 @@ IfConfig::IfConfig() void IfConfig::load( KConfig *config, int i ) { - QString entry; + TQString entry; - QString group = QString( "Configuration %1" ).arg( i+1 ); + TQString group = TQString( "Configuration %1" ).arg( i+1 ); config->setGroup( group ); m_networkName = config->readEntry( "NetworkName" ); @@ -150,7 +150,7 @@ void IfConfig::load( KConfig *config, int i ) void IfConfig::save( KConfig *config, int i ) { - QString group = QString( "Configuration %1" ).arg( i+1 ); + TQString group = TQString( "Configuration %1" ).arg( i+1 ); config->setGroup( group ); config->writeEntry( "NetworkName", m_networkName ); @@ -227,11 +227,11 @@ void WifiConfig::save() m_config->sync(); } -QString WifiConfig::autoDetectInterface() +TQString WifiConfig::autoDetectInterface() { m_detectedInterface.truncate( 0 ); - QFile procFile ( "/proc/net/dev" ); + TQFile procFile ( "/proc/net/dev" ); if ( !procFile.open( IO_ReadOnly ) ) { @@ -240,8 +240,8 @@ QString WifiConfig::autoDetectInterface() return m_detectedInterface; } - QStringList list; - QString line; + TQStringList list; + TQString line; while ( !procFile.atEnd() ) { @@ -262,14 +262,14 @@ QString WifiConfig::autoDetectInterface() return m_detectedInterface; } - for ( QStringList::Iterator it = list.begin (); it != list.end (); ++it ) + for ( TQStringList::Iterator it = list.begin (); it != list.end (); ++it ) { if ( ((*it).contains("wifi"))==0 ) { // if the name is wifiX, ignore KProcIO test; test << "iwconfig"; test << *it; - connect( &test, SIGNAL( readReady( KProcIO * ) ), - this, SLOT( slotTestInterface( KProcIO * ) ) ); + connect( &test, TQT_SIGNAL( readReady( KProcIO * ) ), + this, TQT_SLOT( slotTestInterface( KProcIO * ) ) ); test.start ( KProcess::Block ); } } @@ -286,7 +286,7 @@ QString WifiConfig::autoDetectInterface() void WifiConfig::slotTestInterface( KProcIO *proc ) { - QString output; + TQString output; proc->readln( output ); if ( output.find ( "no wireless extensions" ) == -1 ) { @@ -295,22 +295,22 @@ void WifiConfig::slotTestInterface( KProcIO *proc ) } } -QString IfConfig::speedAsString() +TQString IfConfig::speedAsString() { return speedList[ m_speed ]; } -QString IfConfig::wifimodeAsString() +TQString IfConfig::wifimodeAsString() { return wifiModeList[ m_wifiMode ]; } -QString IfConfig::cryptomodeAsString() +TQString IfConfig::cryptomodeAsString() { return cryptoModeList[ m_cryptoMode ]; } -QString IfConfig::powermodeAsString() +TQString IfConfig::powermodeAsString() { return powerModeList[ m_pmMode ]; } @@ -325,42 +325,42 @@ Key IfConfig::activeKey() return m_keys[ m_activeKey-1 ]; } -IfConfig::Speed IfConfig::convertToSpeedFromString( const QString &s ) +IfConfig::Speed IfConfig::convertToSpeedFromString( const TQString &s ) { return ( IfConfig::Speed )speedList.findIndex( s ); } -void IfConfig::speedFromString( const QString &s ) +void IfConfig::speedFromString( const TQString &s ) { m_speed = convertToSpeedFromString( s ); } -IfConfig::WifiMode IfConfig::convertToWifiModeFromString( const QString &s ) +IfConfig::WifiMode IfConfig::convertToWifiModeFromString( const TQString &s ) { return ( IfConfig::WifiMode )wifiModeList.findIndex( s ); } -void IfConfig::wifimodeFromString( const QString &s ) +void IfConfig::wifimodeFromString( const TQString &s ) { m_wifiMode = convertToWifiModeFromString( s ); } -IfConfig::CryptoMode IfConfig::convertToCryptoModeFromString( const QString &s ) +IfConfig::CryptoMode IfConfig::convertToCryptoModeFromString( const TQString &s ) { return ( IfConfig::CryptoMode )cryptoModeList.findIndex( s ); } -void IfConfig::cryptomodeFromString( const QString &s ) +void IfConfig::cryptomodeFromString( const TQString &s ) { m_cryptoMode = convertToCryptoModeFromString( s ); } -IfConfig::PowerMode IfConfig::convertToPowerModeFromString( const QString &s ) +IfConfig::PowerMode IfConfig::convertToPowerModeFromString( const TQString &s ) { return ( IfConfig::PowerMode )powerModeList.findIndex( s ); } -void IfConfig::powermodeFromString( const QString &s ) +void IfConfig::powermodeFromString( const TQString &s ) { m_pmMode = convertToPowerModeFromString( s ); } diff --git a/wifi/kcmwifi/wificonfig.h b/wifi/kcmwifi/wificonfig.h index b9186298..b78e32f6 100644 --- a/wifi/kcmwifi/wificonfig.h +++ b/wifi/kcmwifi/wificonfig.h @@ -20,8 +20,8 @@ #ifndef WIFICONFIG_H #define WIFICONFIG_H -#include -#include +#include +#include #include "kcmwifi.h" @@ -33,20 +33,20 @@ enum KeyStates { EMPTY=0, INVALID=1, HEX_64=2, HEX_128=3, HEX_256=4, STRING_64=5 class Key { public: - Key( const QString &key ); + Key( const TQString &key ); Key(); - QString key() const { return m_key; } - static KeyStates isValid( QString keyCandidate ); - QString rawKey() const; + TQString key() const { return m_key; } + static KeyStates isValid( TQString keyCandidate ); + TQString rawKey() const; - void setKey( const QString &key ); + void setKey( const TQString &key ); protected: - QString m_key; + TQString m_key; }; -typedef QValueList KeyList; +typedef TQValueList KeyList; class IfConfig { @@ -61,29 +61,29 @@ class IfConfig void load( KConfig *config, int i ); void save( KConfig *config, int i ); - QString speedAsString(); - QString wifimodeAsString(); - QString cryptomodeAsString(); - QString powermodeAsString(); + TQString speedAsString(); + TQString wifimodeAsString(); + TQString cryptomodeAsString(); + TQString powermodeAsString(); int activeKeyId(); Key activeKey(); - static Speed convertToSpeedFromString( const QString &s ); - static WifiMode convertToWifiModeFromString( const QString &s ); - static PowerMode convertToPowerModeFromString( const QString &s ); - static CryptoMode convertToCryptoModeFromString( const QString &s ); + static Speed convertToSpeedFromString( const TQString &s ); + static WifiMode convertToWifiModeFromString( const TQString &s ); + static PowerMode convertToPowerModeFromString( const TQString &s ); + static CryptoMode convertToCryptoModeFromString( const TQString &s ); - void speedFromString( const QString &s ); - void wifimodeFromString( const QString &s ); - void powermodeFromString( const QString &s ); - void cryptomodeFromString( const QString &s ); + void speedFromString( const TQString &s ); + void wifimodeFromString( const TQString &s ); + void powermodeFromString( const TQString &s ); + void cryptomodeFromString( const TQString &s ); - QString m_networkName; - QString m_interface; + TQString m_networkName; + TQString m_interface; WifiMode m_wifiMode; Speed m_speed; bool m_runScript; - QString m_connectScript; + TQString m_connectScript; bool m_useCrypto; CryptoMode m_cryptoMode; @@ -101,7 +101,7 @@ class WifiConfig : QObject Q_OBJECT public: static WifiConfig *instance(); - QString autoDetectInterface(); + TQString autoDetectInterface(); ~WifiConfig(); void load(); @@ -120,7 +120,7 @@ class WifiConfig : QObject KSimpleConfig *m_config; static WifiConfig *m_instance; - QString m_detectedInterface; + TQString m_detectedInterface; }; #endif // WIFICONFIG_H diff --git a/wifi/kwifimanager.cpp b/wifi/kwifimanager.cpp index 5e64a683..4267b7ed 100644 --- a/wifi/kwifimanager.cpp +++ b/wifi/kwifimanager.cpp @@ -20,14 +20,14 @@ #include // include files for QT -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include // include files for KDE #include @@ -62,10 +62,10 @@ #define ID_STATUS_MSG 1 -QStringList APs; +TQStringList APs; bool useAlternateStrengthCalc; -KWiFiManagerApp::KWiFiManagerApp (QWidget *, const char *name): +KWiFiManagerApp::KWiFiManagerApp (TQWidget *, const char *name): DCOPObject("dcop_interface"), KMainWindow (0, name), device(0), m_shuttingDown(false), m_iconSize( 22 ) { statistik = 0; @@ -73,11 +73,11 @@ DCOPObject("dcop_interface"), KMainWindow (0, name), device(0), m_shuttingDown(f useAlternateStrengthCalc = false; init_whois_db (); - QStringList *ignoreInterfaces; + TQStringList *ignoreInterfaces; if (kapp->isRestored()) - ignoreInterfaces = new QStringList(); + ignoreInterfaces = new TQStringList(); else - ignoreInterfaces = new QStringList( usedInterfacesList() ); + ignoreInterfaces = new TQStringList( usedInterfacesList() ); // substitute the following line with a different interface if required device = new Interface_wireless_wirelessextensions (ignoreInterfaces); @@ -102,14 +102,14 @@ DCOPObject("dcop_interface"), KMainWindow (0, name), device(0), m_shuttingDown(f fileDisableRadio->setEnabled (false); #endif - counter = new QTimer (this); - connect (counter, SIGNAL (timeout ()), device, SLOT (poll_device_info())); + counter = new TQTimer (this); + connect (counter, TQT_SIGNAL (timeout ()), device, TQT_SLOT (poll_device_info())); counter->start (1000); - tricorder_trigger = new QTimer (); - connect (tricorder_trigger, SIGNAL (timeout ()), this, - SLOT (tricorder_beep ())); - connect (trayicon, SIGNAL (quitSelected ()), this, SLOT (slotFileQuit ())); + tricorder_trigger = new TQTimer (); + connect (tricorder_trigger, TQT_SIGNAL (timeout ()), this, + TQT_SLOT (tricorder_beep ())); + connect (trayicon, TQT_SIGNAL (quitSelected ()), this, TQT_SLOT (slotFileQuit ())); slotToggleTric(); //set to value saved by KConfig setAutoSaveSettings(); @@ -143,26 +143,26 @@ void KWiFiManagerApp::init_whois_db () { KStandardDirs finder; - QString kdedir = + TQString kdedir = finder.findResourceDir ("data", "kwifimanager/locations/NOWHERE.loc"); kdedir += "kwifimanager/locations/"; - QDir *locations = new QDir (kdedir); + TQDir *locations = new TQDir (kdedir); if (!locations->exists ()) kdDebug () << "A grave error occurred while searching for files with AccessPoint information." << endl; - QStringList *entries = new QStringList (locations->entryList ()); - QString content; - QString content2; - for (QStringList::Iterator it = entries->begin (); it != entries->end (); + TQStringList *entries = new TQStringList (locations->entryList ()); + TQString content; + TQString content2; + for (TQStringList::Iterator it = entries->begin (); it != entries->end (); it++) { if ((*it) != "." && (*it) != "..") { - QFile datei (kdedir + (*it)); + TQFile datei (kdedir + (*it)); datei.open (IO_ReadOnly); while (datei.readLine (content, 255) != -1) { - QString temp (content); + TQString temp (content); content.truncate (content.find (' ')); content = content.upper (); content2 = temp.right (temp.length () - temp.find (' ') - 1); @@ -177,14 +177,14 @@ KWiFiManagerApp::init_whois_db () } void -KWiFiManagerApp::slotLogESSID (QString essid) +KWiFiManagerApp::slotLogESSID (TQString essid) { - QFile log_file( locateLocal( "data", "kwifimanager/kwifimanager.log", true ) ); + TQFile log_file( locateLocal( "data", "kwifimanager/kwifimanager.log", true ) ); kdDebug() << "Log file is " << log_file.name() << endl; if (!log_file.open (IO_WriteOnly | IO_Append)) kdDebug () << "Logging failed!" << endl; - QTextStream stream (&log_file); - stream << QDateTime::currentDateTime().toString ().latin1 (); + TQTextStream stream (&log_file); + stream << TQDateTime::currentDateTime().toString ().latin1 (); stream << " Entering network: " << essid.latin1() << endl; log_file.close (); } @@ -198,13 +198,13 @@ KWiFiManagerApp::slotTXPowerChanged () void KWiFiManagerApp::slotChangeTrayIcon () { - QPixmap* ICON; + TQPixmap* ICON; int sig, noi, str; double freq = 0.; bool validdata = device->get_current_quality (sig, noi, str); if ( settingsUseAlternateCalc->isChecked() ) str = sig - noi; int mode; - QLabel sstrength2( i18n("N/A"), 0, 0 ); + TQLabel sstrength2( i18n("N/A"), 0, 0 ); if ( ( device->get_txpower_disabled() ) || ( !device->get_device_freq ( freq ) ) ) { @@ -220,49 +220,49 @@ KWiFiManagerApp::slotChangeTrayIcon () } else if (validdata && (str > 45)) { - sstrength2.setText( QString::number(str) ); + sstrength2.setText( TQString::number(str) ); ICON = strength->EXCELLENT; if (led->state == false) led->On (); } else if (validdata && (str > 35)) { - sstrength2.setText( QString::number(str) ); + sstrength2.setText( TQString::number(str) ); ICON = strength->EXCELLENT; if (led->state == false) led->On (); } else if (validdata && (str > 25)) { - sstrength2.setText( QString::number(str) ); + sstrength2.setText( TQString::number(str) ); ICON = strength->EXCELLENT; if (led->state == false) led->On (); } else if (validdata && (str > 15)) { - sstrength2.setText( QString::number(str) ); + sstrength2.setText( TQString::number(str) ); ICON = strength->GOOD; if (led->state == false) led->On (); } else if (validdata && (str > 5)) { - sstrength2.setText( QString::number(str) ); + sstrength2.setText( TQString::number(str) ); ICON = strength->MARGINAL; if (led->state == false) led->On (); } else if (validdata && (str > 0)) { - sstrength2.setText( QString::number(str) ); + sstrength2.setText( TQString::number(str) ); ICON = strength->OOR_MINIMUM; if (led->state == true) led->Off (); } else if (((str == 0) && (mode == 2)) || (!validdata)) { - sstrength2.setText( QString::fromLatin1("0") ); + sstrength2.setText( TQString::fromLatin1("0") ); ICON = strength->OOR_DOWN; if (led->state == true) led->Off (); @@ -274,28 +274,28 @@ KWiFiManagerApp::slotChangeTrayIcon () led->Off (); } - QPixmap temp (m_iconSize+8, m_iconSize+8); - QPainter bla (&temp); + TQPixmap temp (m_iconSize+8, m_iconSize+8); + TQPainter bla (&temp); bla.fillRect (0, 0, m_iconSize+8, m_iconSize+8, backgroundBrush ()); - bla.drawPixmap ( QRect(1, 4, m_iconSize+2,m_iconSize+2), *ICON ); + bla.drawPixmap ( TQRect(1, 4, m_iconSize+2,m_iconSize+2), *ICON ); if (showStrength) { - static QFont labelfont ( "Helvetica", 10 ); + static TQFont labelfont ( "Helvetica", 10 ); - labelfont.setStyleHint( QFont::SansSerif ); - labelfont.setStretch( QFont::Condensed ); + labelfont.setStyleHint( TQFont::SansSerif ); + labelfont.setStretch( TQFont::Condensed ); labelfont.setBold( true ); sstrength2.setFont( labelfont ); sstrength2.setFixedSize( sstrength2.sizeHint() ); } - QPixmap labeltemp = QPixmap::grabWidget( &sstrength2 ); + TQPixmap labeltemp = TQPixmap::grabWidget( &sstrength2 ); labeltemp.setMask( labeltemp.createHeuristicMask() ); bla.drawPixmap (0, 0, labeltemp ); temp.setMask (temp.createHeuristicMask() ); trayicon->setPixmap ( temp ); this->setIcon( temp ); - QToolTip::add( trayicon, "SSID: "+device->get_essid() ); + TQToolTip::add( trayicon, "SSID: "+device->get_essid() ); } void @@ -305,43 +305,43 @@ KWiFiManagerApp::initActions () if (config->hasGroup("General")) config->setGroup("General"); fileDisableRadio = new KToggleAction (i18n ("&Disable Radio"), 0, this, - SLOT (slotDisableRadio ()), actionCollection (), "disable_radio"); + TQT_SLOT (slotDisableRadio ()), actionCollection (), "disable_radio"); fileDisableRadio->setChecked( false ); settingsUseAlternateCalc = new KToggleAction (i18n ("&Use Alternate Strength Calculation"), 0, this, - SLOT (slotToggleStrengthCalc ()), actionCollection (), "use_alt_calculation"); + TQT_SLOT (slotToggleStrengthCalc ()), actionCollection (), "use_alt_calculation"); settingsUseAlternateCalc->setChecked( config->readBoolEntry("useAlternateStrengthCalculation") ); slotToggleStrengthCalc(); //set to value saved by KConfig settingsShowStatsNoise = new KToggleAction (i18n ("Show &Noise Graph in Statistics Window"), 0, this, - SLOT (slotShowStatsNoise ()), actionCollection (), "show_stats_noise"); + TQT_SLOT (slotShowStatsNoise ()), actionCollection (), "show_stats_noise"); settingsShowStatsNoise->setChecked( config->readBoolEntry("showStatsNoise") ); slotShowStatsNoise(); //set to value saved by KConfig settingsShowStrengthNumber = new KToggleAction (i18n ("&Show Strength Number in System Tray"), 0, this, - SLOT (slotToggleShowStrengthNumber ()), actionCollection (), "show_strength_number_in_tray"); + TQT_SLOT (slotToggleShowStrengthNumber ()), actionCollection (), "show_strength_number_in_tray"); settingsShowStrengthNumber->setChecked( config->readBoolEntry("showStrengthNumberInTray") ); slotToggleShowStrengthNumber (); //set to value saved by KConfig - KStdAction::quit (this, SLOT (slotFileQuit ()), actionCollection ()); + KStdAction::quit (this, TQT_SLOT (slotFileQuit ()), actionCollection ()); new KAction (i18n ("Configuration &Editor..."), 0, this, - SLOT (slotStartConfigEditor ()), actionCollection (), "configuration_editor"); + TQT_SLOT (slotStartConfigEditor ()), actionCollection (), "configuration_editor"); new KAction (i18n ("Connection &Statistics"), 0, this, - SLOT (slotStartStatViewer ()), actionCollection (), "connection_statistics"); + TQT_SLOT (slotStartStatViewer ()), actionCollection (), "connection_statistics"); settingsAcousticScanning = new KToggleAction (i18n ("&Acoustic Scanning"), 0, this, - SLOT (slotToggleTric ()), + TQT_SLOT (slotToggleTric ()), actionCollection (), "acoustic_scanning"); settingsAcousticScanning->setChecked( config->readBoolEntry("acousticScanning") ); #ifdef WITHOUT_ARTS settingsAcousticScanning->setEnabled( false); #endif settingsStayInSystrayOnClose = new KToggleAction (i18n ("Stay in System &Tray on Close"), 0, this, - SLOT (slotToggleStayInSystray()), + TQT_SLOT (slotToggleStayInSystray()), actionCollection (), "stay_in_systray_on_close"); settingsStayInSystrayOnClose->setChecked( config->readBoolEntry("stayInSystrayOnClose") ); createGUI(); @@ -357,22 +357,22 @@ KWiFiManagerApp::initView () trayicon = new KSystemTray (this); trayicon->show (); - view = new QWidget (this, "mainwidget"); + view = new TQWidget (this, "mainwidget"); view->setBackgroundMode (PaletteBackground); setCentralWidget (view); - QGridLayout *zentrallayout = new QGridLayout (view); + TQGridLayout *zentrallayout = new TQGridLayout (view); zentrallayout->setMargin( KDialog::marginHint() ); speedmeter = new Speed (view, device); status = new Status (view, device); location = new Locator (view, device); strength = new Strength (view, device); pictogram = new Picture (view, device); - scan = new QPushButton (i18n("Scan for &Networks..."),view); + scan = new TQPushButton (i18n("Scan for &Networks..."),view); slotChangeWindowCaption (); - QToolTip::add (strength, i18n ("The current signal strength")); - QToolTip::add (speedmeter, i18n ("The speed at which the wireless LAN card is operating")); - QToolTip::add (status, i18n ("Detailed connection status")); - QToolTip::add (scan, i18n ("Performs a scan to discover the networks you can log into")); + TQToolTip::add (strength, i18n ("The current signal strength")); + TQToolTip::add (speedmeter, i18n ("The speed at which the wireless LAN card is operating")); + TQToolTip::add (status, i18n ("Detailed connection status")); + TQToolTip::add (scan, i18n ("Performs a scan to discover the networks you can log into")); pictogram->setMinimumSize (pictogram->mySizeHint()); strength->setMinimumSize (strength->mySizeHint()); speedmeter->setMinimumHeight (60); @@ -383,20 +383,20 @@ KWiFiManagerApp::initView () zentrallayout->addMultiCellWidget (status, 1, 2, 1, 1); zentrallayout->addWidget (scan, 2, 0); zentrallayout->addMultiCellWidget (location, 3, 3, 0, 1, Qt::AlignLeft); - connect (device, SIGNAL (interfaceChanged ()), this, SLOT (slotChangeWindowCaption ())); - connect (device, SIGNAL (strengthChanged ()), this, SLOT (slotChangeTrayIcon ())); - connect (device, SIGNAL (strengthChanged ()), strength, SLOT (repaint ())); - connect (device, SIGNAL (statusChanged ()), status, SLOT (repaint ())); - connect (device, SIGNAL (speedChanged ()), speedmeter, SLOT (repaint ())); - connect (device, SIGNAL (modeChanged ()), pictogram, SLOT (repaint ())); - connect (device, SIGNAL (essidChanged (QString)), this, SLOT (slotLogESSID (QString))); - connect (device, SIGNAL (essidChanged (QString)), location, SLOT (repaint ())); - connect (device, SIGNAL (statusChanged ()), location, SLOT (repaint ())); - connect (device, SIGNAL (txPowerChanged ()), this, SLOT (slotTXPowerChanged ())); - connect (device, SIGNAL (txPowerChanged ()), this, SLOT (slotChangeTrayIcon ())); - connect (device, SIGNAL (txPowerChanged ()), pictogram, SLOT (repaint ())); - connect (device, SIGNAL (txPowerChanged ()), strength, SLOT (repaint ())); - connect (scan, SIGNAL (clicked()), this, SLOT (slotNetworkScan())); + connect (device, TQT_SIGNAL (interfaceChanged ()), this, TQT_SLOT (slotChangeWindowCaption ())); + connect (device, TQT_SIGNAL (strengthChanged ()), this, TQT_SLOT (slotChangeTrayIcon ())); + connect (device, TQT_SIGNAL (strengthChanged ()), strength, TQT_SLOT (repaint ())); + connect (device, TQT_SIGNAL (statusChanged ()), status, TQT_SLOT (repaint ())); + connect (device, TQT_SIGNAL (speedChanged ()), speedmeter, TQT_SLOT (repaint ())); + connect (device, TQT_SIGNAL (modeChanged ()), pictogram, TQT_SLOT (repaint ())); + connect (device, TQT_SIGNAL (essidChanged (TQString)), this, TQT_SLOT (slotLogESSID (TQString))); + connect (device, TQT_SIGNAL (essidChanged (TQString)), location, TQT_SLOT (repaint ())); + connect (device, TQT_SIGNAL (statusChanged ()), location, TQT_SLOT (repaint ())); + connect (device, TQT_SIGNAL (txPowerChanged ()), this, TQT_SLOT (slotTXPowerChanged ())); + connect (device, TQT_SIGNAL (txPowerChanged ()), this, TQT_SLOT (slotChangeTrayIcon ())); + connect (device, TQT_SIGNAL (txPowerChanged ()), pictogram, TQT_SLOT (repaint ())); + connect (device, TQT_SIGNAL (txPowerChanged ()), strength, TQT_SLOT (repaint ())); + connect (scan, TQT_SIGNAL (clicked()), this, TQT_SLOT (slotNetworkScan())); } void @@ -427,7 +427,7 @@ KWiFiManagerApp::slotStartStatViewer () delete statistik; statistik = new Statistics (device, showStatsNoise); statistik->setFixedSize (590, 300); - connect(device,SIGNAL(statsUpdated()),statistik,SLOT(repaint())); + connect(device,TQT_SIGNAL(statsUpdated()),statistik,TQT_SLOT(repaint())); statistik->show (); } @@ -439,13 +439,13 @@ KWiFiManagerApp::slotDisableRadio () if ( disablePower != 0 && disablePower->isRunning() ) { return; } - QString interface = device->get_interface_name(); + TQString interface = device->get_interface_name(); if (interface.isEmpty()) { return; } - QString onOrOff; + TQString onOrOff; if ( fileDisableRadio->isChecked() ) { onOrOff = "on"; } else { @@ -460,7 +460,7 @@ KWiFiManagerApp::slotDisableRadio () //*disablePower << "kdesu" << "iwconfig" << "eth1" << "txpower" << onOrOff; *disablePower << "kdesu" << "iwconfig" << interface << "txpower" << onOrOff; - connect( disablePower, SIGNAL(processExited(KProcess*)), this, SLOT(slotDisablePowerProcessExited()) ); + connect( disablePower, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotDisablePowerProcessExited()) ); disablePower->start(KProcess::NotifyOnExit); } @@ -578,7 +578,7 @@ void KWiFiManagerApp::readProperties( KConfig* conf) else hide(); - QString dev = conf->readEntry( "wifidevice" ); + TQString dev = conf->readEntry( "wifidevice" ); if (!dev.isEmpty()) device->setActiveDevice(dev); } @@ -605,7 +605,7 @@ KWiFiManagerApp::queryExit() } // List of network interfaces used by all running kwifimanager applications -QStringList usedInterfacesList() +TQStringList usedInterfacesList() { // Register with DCOP DCOPClient *client = kapp->dcopClient(); @@ -613,19 +613,19 @@ QStringList usedInterfacesList() client->setDefaultObject( "dcop_interface" ); // shamelessly stolen from kdelibs/kio/booksmarks/kbookmarkimporter_crash.cc - QStringList ignoreInterfaces; + TQStringList ignoreInterfaces; QCStringList apps = client->registeredApplications(); for ( QCStringList::Iterator it = apps.begin(); it != apps.end(); ++it ) { - QCString &clientId = *it; + TQCString &clientId = *it; if ( qstrncmp(clientId, "kwifimanager", 12) != 0 ) continue; DCOPRef ask( clientId, "dcop_interface" ); DCOPReply reply = ask.call( "interface()" ); - QString interface; + TQString interface; if ( reply.isValid() ) { - QString i = reply; + TQString i = reply; interface = i; } if (!interface.isEmpty()) diff --git a/wifi/kwifimanager.h b/wifi/kwifimanager.h index cdf8c726..3d814b4e 100644 --- a/wifi/kwifimanager.h +++ b/wifi/kwifimanager.h @@ -47,7 +47,7 @@ class Statistics; class NetworkScanning; class Led; -extern QStringList usedInterfacesList(); +extern TQStringList usedInterfacesList(); enum speedlevels { AUTO, M1, M2, M55, M11 }; @@ -58,21 +58,21 @@ enum cryptomodes struct configuration_data { - QString net_name[5]; - QString disp_name[5]; + TQString net_name[5]; + TQString disp_name[5]; bool managed[5]; bool crypto_enabled[5]; int active_crypto_key[5]; - QString active_key_string[5]; - QString crypto1[5], crypto2[5], crypto3[5], crypto4[5]; + TQString active_key_string[5]; + TQString crypto1[5], crypto2[5], crypto3[5], crypto4[5]; bool crypto_is_string1[5], crypto_is_string2[5], crypto_is_string3[5], crypto_is_string4[5]; cryptomodes crypto_mode[5]; bool pm_enabled[5]; int sleep_time[5]; - QString sleep_time_string[5]; + TQString sleep_time_string[5]; int wake_time[5]; - QString wake_time_string[5]; + TQString wake_time_string[5]; speedlevels bitrate[5]; packetmode packet[5]; }; @@ -80,9 +80,9 @@ struct configuration_data class KWiFiManagerApp:public KMainWindow, virtual public dcop_interface { Q_OBJECT public: - KWiFiManagerApp (QWidget * parent = 0, const char * name = 0); + KWiFiManagerApp (TQWidget * parent = 0, const char * name = 0); ~KWiFiManagerApp (); - QString interface () const { return device ? device->get_interface_name() : QString::null; }; + TQString interface () const { return device ? device->get_interface_name() : TQString::null; }; public: bool startDocked() { return m_startDocked; } public slots: @@ -96,7 +96,7 @@ Q_OBJECT public: void slotToggleStayInSystray (); void slotChangeTrayIcon (); void slotChangeWindowCaption (); - void slotLogESSID (QString essid); + void slotLogESSID (TQString essid); void slotTXPowerChanged (); void slotShowStatsNoise (); void slotNetworkScan(); @@ -110,14 +110,14 @@ private: void initActions (); void initView (); Speed *speedmeter; - QBoxLayout *bla; - QLabel *profil; + TQBoxLayout *bla; + TQLabel *profil; Status *status; Strength *strength; Picture *pictogram; Locator *location; NetworkScanning* scanwidget; - QWidget *view; + TQWidget *view; Statistics *statistik; KToggleAction *fileDisableRadio; KToggleAction *settingsUseAlternateCalc; @@ -127,10 +127,10 @@ private: KToggleAction *settingsShowStrengthNumber; KSystemTray *trayicon; void init_whois_db (); - QTimer *tricorder_trigger, *counter; - QPixmap *pixmap; + TQTimer *tricorder_trigger, *counter; + TQPixmap *pixmap; Interface_wireless *device; - QPushButton * scan; + TQPushButton * scan; Led *led; KProcess* disablePower; bool showStrength; diff --git a/wifi/kwireless/kwireless.cpp b/wifi/kwireless/kwireless.cpp index ff584603..39b66a76 100644 --- a/wifi/kwireless/kwireless.cpp +++ b/wifi/kwireless/kwireless.cpp @@ -17,8 +17,8 @@ #include "kwirelesswidget.h" -KWireLess::KWireLess(const QString& configFile, Type type, - int actions, QWidget *parent, const char *name) +KWireLess::KWireLess(const TQString& configFile, Type type, + int actions, TQWidget *parent, const char *name) : KPanelApplet(configFile, type, actions, parent, name) { ksConfig = config(); @@ -68,7 +68,7 @@ int KWireLess::heightForWidth(int) const return widget->preferredHeight(); } -void KWireLess::resizeEvent(QResizeEvent *) +void KWireLess::resizeEvent(TQResizeEvent *) { widget->setGeometry(0, 0, width(), height()); } @@ -76,7 +76,7 @@ void KWireLess::resizeEvent(QResizeEvent *) extern "C" { - KDE_EXPORT KPanelApplet* init( QWidget *parent, const QString configFile) + KDE_EXPORT KPanelApplet* init( TQWidget *parent, const TQString configFile) { KGlobal::locale()->insertCatalogue("kwireless"); return new KWireLess(configFile, KPanelApplet::Normal, diff --git a/wifi/kwireless/kwireless.h b/wifi/kwireless/kwireless.h index 5a4597af..828ad184 100644 --- a/wifi/kwireless/kwireless.h +++ b/wifi/kwireless/kwireless.h @@ -15,7 +15,7 @@ #endif #include -#include +#include #include class KWireLessWidget; @@ -25,8 +25,8 @@ class KWireLess : public KPanelApplet Q_OBJECT public: - KWireLess(const QString& configFile, Type t = Normal, int actions = 0, - QWidget *parent = 0, const char *name = 0); + KWireLess(const TQString& configFile, Type t = Normal, int actions = 0, + TQWidget *parent = 0, const char *name = 0); ~KWireLess(); virtual int widthForHeight(int height) const; @@ -36,7 +36,7 @@ public: virtual void preferences(); protected: - void resizeEvent(QResizeEvent *); + void resizeEvent(TQResizeEvent *); private: KConfig *ksConfig; diff --git a/wifi/kwireless/kwirelesswidget.cpp b/wifi/kwireless/kwirelesswidget.cpp index 3ae2ff8c..08f4336b 100644 --- a/wifi/kwireless/kwirelesswidget.cpp +++ b/wifi/kwireless/kwirelesswidget.cpp @@ -7,11 +7,11 @@ http://www.hackerbuero.org $ */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include @@ -25,12 +25,12 @@ extern "C" { #include } -QPtrList KWireLessWidget::deviceInfo; -QMutex KWireLessWidget::mutex; -QTimer *KWireLessWidget::timer; +TQPtrList KWireLessWidget::deviceInfo; +TQMutex KWireLessWidget::mutex; +TQTimer *KWireLessWidget::timer; int KWireLessWidget::m_instances; -DeviceInfo::DeviceInfo(QString _device, QString _essid, QString _encr, +DeviceInfo::DeviceInfo(TQString _device, TQString _essid, TQString _encr, float _quality, float _signal, float _noise, int _bitrate) : m_device(_device), @@ -48,9 +48,9 @@ float DeviceInfo::quality() return m_quality; } -QString DeviceInfo::qualityString() +TQString DeviceInfo::qualityString() { - return i18n("%1%").arg(QString::number(m_quality*100, 'f', 0)); + return i18n("%1%").arg(TQString::number(m_quality*100, 'f', 0)); } float DeviceInfo::signal() @@ -58,9 +58,9 @@ float DeviceInfo::signal() return m_signal; } -QString DeviceInfo::signalString() +TQString DeviceInfo::signalString() { - return i18n("%1%").arg(QString::number(m_signal*100, 'f', 0)); + return i18n("%1%").arg(TQString::number(m_signal*100, 'f', 0)); } float DeviceInfo::noise() @@ -68,26 +68,26 @@ float DeviceInfo::noise() return m_noise ; } -QString DeviceInfo::noiseString() +TQString DeviceInfo::noiseString() { - return i18n("%1%").arg(QString::number(m_noise*100, 'f', 0)); + return i18n("%1%").arg(TQString::number(m_noise*100, 'f', 0)); } -const QString& DeviceInfo::device() +const TQString& DeviceInfo::device() { return m_device; } -const QString& DeviceInfo::essid() +const TQString& DeviceInfo::essid() { return m_essid; } -QString DeviceInfo::bitrateString() +TQString DeviceInfo::bitrateString() { - QString bitrate; - QTextOStream b(&bitrate); + TQString bitrate; + TQTextOStream b(&bitrate); b.precision(2); switch((int)log10(m_bitrate)) @@ -123,7 +123,7 @@ bool DeviceInfo::usesEncryption() return !m_encr.isEmpty(); } -QString DeviceInfo::encrString() +TQString DeviceInfo::encrString() { if(m_encr.isEmpty()) { @@ -135,8 +135,8 @@ QString DeviceInfo::encrString() } } -KWireLessWidget::KWireLessWidget(QWidget *parent, const char* name) - : QWidget(parent, name), +KWireLessWidget::KWireLessWidget(TQWidget *parent, const char* name) + : TQWidget(parent, name), mode(Horizontal), frameWidth(1), qualityBarWidth(6), @@ -149,8 +149,8 @@ KWireLessWidget::KWireLessWidget(QWidget *parent, const char* name) if(timer == 0) { // this way, only the poll() method of the first instance will // ever be called (intended behaviour): - timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), SLOT(poll())); + timer = new TQTimer(this); + connect(timer, TQT_SIGNAL(timeout()), TQT_SLOT(poll())); // single shot, will be restartet at the end of poll () timer->start(100, true); } @@ -181,26 +181,26 @@ void KWireLessWidget::setMode(KWireLessWidget::Mode _mode) mode = _mode; } -void KWireLessWidget::mousePressEvent(QMouseEvent *e) +void KWireLessWidget::mousePressEvent(TQMouseEvent *e) { - if( e->button() == QMouseEvent::LeftButton) + if( e->button() == TQMouseEvent::LeftButton) { PropertiesDialog dialog(this); - connect(this, SIGNAL(updateDeviceInfo(QPtrList *)), - &dialog, SLOT(update(QPtrList *))); + connect(this, TQT_SIGNAL(updateDeviceInfo(TQPtrList *)), + &dialog, TQT_SLOT(update(TQPtrList *))); dialog.exec(); } } -void KWireLessWidget::paintEvent(QPaintEvent*) +void KWireLessWidget::paintEvent(TQPaintEvent*) { // WORK_TO_DO: paint other devices, too: // for quick repaints, we need a buffered painter! int w, h, space; const int bevel = qualityBarWidth/2; - QPainter painter(this); - QPointArray points; - QColor color, brush; + TQPainter painter(this); + TQPointArray points; + TQColor color, brush; // do stuff that does not rely on device being valid (e.g., // non-nil): @@ -216,7 +216,7 @@ void KWireLessWidget::paintEvent(QPaintEvent*) w = space; } - painter.setPen(QPen(Qt::black, frameWidth)); + painter.setPen(TQPen(Qt::black, frameWidth)); painter.setBrush(KGlobalSettings::baseColor()); painter.drawRect(0, 0, w, h); @@ -267,12 +267,12 @@ void KWireLessWidget::paintEvent(QPaintEvent*) QMIN(position + bevel/2, w-frameWidth), frameWidth+qualityBarWidth-1, frameWidth, frameWidth+qualityBarWidth-1); } - painter.setPen(QPen(color)); + painter.setPen(TQPen(color)); painter.setBrush(brush); painter.drawPolygon(points); // draw the signal bar: - painter.setPen(QPen(Qt::darkRed)); + painter.setPen(TQPen(Qt::darkRed)); painter.setBrush(Qt::red); if(mode == Vertical) @@ -289,7 +289,7 @@ void KWireLessWidget::paintEvent(QPaintEvent*) painter.drawRect(x, y, w1, signalBarWidth); } // draw the noise bar: - painter.setPen(QPen(Qt::gray)); + painter.setPen(TQPen(Qt::gray)); painter.setBrush(Qt::lightGray); if(mode == Vertical) @@ -308,7 +308,7 @@ void KWireLessWidget::paintEvent(QPaintEvent*) } } -KWireLessWidget* KWireLessWidget::makeWireLessWidget(QWidget *parent, +KWireLessWidget* KWireLessWidget::makeWireLessWidget(TQWidget *parent, const char *name) { #if 1 diff --git a/wifi/kwireless/kwirelesswidget.h b/wifi/kwireless/kwirelesswidget.h index 5a374d07..3321b583 100644 --- a/wifi/kwireless/kwirelesswidget.h +++ b/wifi/kwireless/kwirelesswidget.h @@ -10,32 +10,32 @@ #ifndef KWIRELESS_WIDGET_H #define KWIRELESS_WIDGET_H -#include -#include -#include -#include +#include +#include +#include +#include class DeviceInfo { public: - DeviceInfo(QString _device=QString::null, QString _essid=QString::null, - QString _encr=QString::null, + DeviceInfo(TQString _device=TQString::null, TQString _essid=TQString::null, + TQString _encr=TQString::null, float _quality=0, float _signal=0, float _noise=0, int _bitrate=0); - QString bitrateString(); + TQString bitrateString(); float quality(); - QString qualityString(); + TQString qualityString(); float signal(); - QString signalString(); + TQString signalString(); float noise(); - QString noiseString(); - const QString& device(); - const QString& essid(); + TQString noiseString(); + const TQString& device(); + const TQString& essid(); bool usesEncryption(); - QString encrString(); + TQString encrString(); protected: - QString m_device; // the device name (e.g., eth1) - QString m_essid; // the network name + TQString m_device; // the device name (e.g., eth1) + TQString m_essid; // the network name // all this values are coefficients (values between 0 and 1): float m_quality; // link quality level @@ -43,7 +43,7 @@ protected: float m_signal; // the signal level // all these values are absolut, e.g., 11000000 = 11MBit/sec: int m_bitrate; // bit rate - QString m_encr; + TQString m_encr; }; /** This wigdet displays the information about one wireless device. @@ -58,10 +58,10 @@ public: Horizontal, Vertical }; - static KWireLessWidget* makeWireLessWidget(QWidget *parent = 0, + static KWireLessWidget* makeWireLessWidget(TQWidget *parent = 0, const char *name = 0); protected: - KWireLessWidget(QWidget *parent=0, const char* name=0); + KWireLessWidget(TQWidget *parent=0, const char* name=0); public: ~KWireLessWidget(); void setMode(Mode); @@ -70,8 +70,8 @@ public: int preferredWidth(); int instances(); protected: - void paintEvent(QPaintEvent*); - void mousePressEvent(QMouseEvent *e); + void paintEvent(TQPaintEvent*); + void mousePressEvent(TQMouseEvent *e); protected: Mode mode; int frameWidth; @@ -81,12 +81,12 @@ protected: // some static device information // a list of DeviceInfo objects, this needs to be filled by the // poll method: - static QPtrList deviceInfo; - static QTimer *timer; // the poll timer - static QMutex mutex; + static TQPtrList deviceInfo; + static TQTimer *timer; // the poll timer + static TQMutex mutex; static int m_instances; signals: - void updateDeviceInfo(QPtrList *); + void updateDeviceInfo(TQPtrList *); protected slots: /** poll() is system dependent and needs to be implemented by deriving classes. diff --git a/wifi/kwireless/linuxwirelesswidget.cpp b/wifi/kwireless/linuxwirelesswidget.cpp index de35b84b..3efdbf98 100644 --- a/wifi/kwireless/linuxwirelesswidget.cpp +++ b/wifi/kwireless/linuxwirelesswidget.cpp @@ -7,8 +7,8 @@ http://www.hackerbuero.org $ */ -#include -#include +#include +#include #include #include #include // for ::close @@ -21,9 +21,9 @@ extern "C" { } int LinuxWireLessWidget::socketFD; -QStringList LinuxWireLessWidget::deviceNames; +TQStringList LinuxWireLessWidget::deviceNames; -LinuxWireLessWidget::LinuxWireLessWidget(QWidget *parent, const char* name) +LinuxWireLessWidget::LinuxWireLessWidget(TQWidget *parent, const char* name) : KWireLessWidget(parent, name), m_number (-1) { @@ -37,7 +37,7 @@ LinuxWireLessWidget::~LinuxWireLessWidget() { kdDebug() << "KWireLessWidget dtor: closing FD, over and out." << endl; - ::close(socketFD); // prevent from using QWidget::close + ::close(socketFD); // prevent from using TQWidget::close socketFD = 0; } } @@ -91,7 +91,7 @@ void LinuxWireLessWidget::poll() } // ----- get the device information: - QStringList::Iterator it; + TQStringList::Iterator it; deviceInfo.clear(); for(it=deviceNames.begin(); it!=deviceNames.end(); ++it) @@ -110,7 +110,7 @@ void LinuxWireLessWidget::poll() } else { // WORK_TO_DO: decide whether updates are needed or not // create a DeviceInfo object and fill it: - QString dev, essid, encr; + TQString dev, essid, encr; float quality=0, signal=0, noise=0; int bitrate; @@ -192,7 +192,7 @@ void LinuxWireLessWidget::poll() if(updateToolTip) { DeviceInfo *info; - QString text; + TQString text; for(info=deviceInfo.first(); info; info=deviceInfo.next()) { @@ -203,7 +203,7 @@ void LinuxWireLessWidget::poll() .arg(info->qualityString()) .arg(info->bitrateString()); } - QToolTip::add(this, text); + TQToolTip::add(this, text); updateToolTip = false; } diff --git a/wifi/kwireless/linuxwirelesswidget.h b/wifi/kwireless/linuxwirelesswidget.h index 3bbd085c..fe695d68 100644 --- a/wifi/kwireless/linuxwirelesswidget.h +++ b/wifi/kwireless/linuxwirelesswidget.h @@ -16,7 +16,7 @@ class LinuxWireLessWidget : public KWireLessWidget { Q_OBJECT public: - LinuxWireLessWidget(QWidget *parent=0, const char* name=0); + LinuxWireLessWidget(TQWidget *parent=0, const char* name=0); ~LinuxWireLessWidget(); protected: /** poll() is supposed to read the information from @@ -24,7 +24,7 @@ protected: void poll(); static int socketFD; // the socket file descriptor to talk to the // driver - static QStringList deviceNames; + static TQStringList deviceNames; static int devEnumHandler(int skfd, char * ifname, char * args[], diff --git a/wifi/kwireless/propertytable.cpp b/wifi/kwireless/propertytable.cpp index 7011c691..7c73b1c2 100644 --- a/wifi/kwireless/propertytable.cpp +++ b/wifi/kwireless/propertytable.cpp @@ -7,11 +7,11 @@ http://www.hackerbuero.org $ */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include "propertytable.h" @@ -21,7 +21,7 @@ extern "C" { #include } -PropertyTable::PropertyTable(QWidget *parent, const char* name) +PropertyTable::PropertyTable(TQWidget *parent, const char* name) : PropertyTableBase(parent, name) { } @@ -30,7 +30,7 @@ PropertyTable::~PropertyTable() { } -PropertiesDialog::PropertiesDialog(QWidget *parent, const char *name) +PropertiesDialog::PropertiesDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Wireless Network Device Properties"), KDialogBase::Ok, KDialogBase::Ok, true), @@ -42,14 +42,14 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, const char *name) table->table->setSorting(false); table->table->setReadOnly(true); adjustSize(); - timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), SLOT(timeout())); + timer = new TQTimer(this); + connect(timer, TQT_SIGNAL(timeout()), TQT_SLOT(timeout())); timer->start(3000, false); - connect(table->cbDeviceSelector, SIGNAL(activated(int)), - SLOT(selected(int))); + connect(table->cbDeviceSelector, TQT_SIGNAL(activated(int)), + TQT_SLOT(selected(int))); } -void PropertiesDialog::update(QPtrList *_info) +void PropertiesDialog::update(TQPtrList *_info) { int selection = table->cbDeviceSelector->currentItem(); @@ -57,7 +57,7 @@ void PropertiesDialog::update(QPtrList *_info) info = _info; DeviceInfo *device; - QPtrListIterator it(*info); + TQPtrListIterator it(*info); table->cbDeviceSelector->clear(); @@ -102,7 +102,7 @@ void PropertiesDialog::selected(int index) device = info->at(index); } - QString fields[] = + TQString fields[] = { i18n("Device:"), i18n("ESSID (network name):"), @@ -114,7 +114,7 @@ void PropertiesDialog::selected(int index) }; const int NoOfFields = sizeof(fields)/sizeof(fields[0]); - QString values[] = + TQString values[] = { device->device(), device->essid(), diff --git a/wifi/kwireless/propertytable.h b/wifi/kwireless/propertytable.h index 4eadc78a..b8b7f004 100644 --- a/wifi/kwireless/propertytable.h +++ b/wifi/kwireless/propertytable.h @@ -11,7 +11,7 @@ #define KWIRELESS_PROPERTYTABLE_H #include -#include +#include #include "propertytablebase.h" class DeviceInfo; @@ -21,7 +21,7 @@ class PropertyTable : public PropertyTableBase { Q_OBJECT public: - PropertyTable(QWidget *parent = 0, const char* name = 0); + PropertyTable(TQWidget *parent = 0, const char* name = 0); ~PropertyTable(); }; @@ -30,14 +30,14 @@ class PropertiesDialog : public KDialogBase { Q_OBJECT public: - PropertiesDialog(QWidget *parent = 0, const char *name = 0); + PropertiesDialog(TQWidget *parent = 0, const char *name = 0); protected: PropertyTable *table; - QPtrList *info; + TQPtrList *info; bool wait; - QTimer *timer; + TQTimer *timer; public slots: - void update(QPtrList *); + void update(TQPtrList *); void timeout(); void selected(int); }; diff --git a/wifi/locator.cpp b/wifi/locator.cpp index dc4e4ce1..ad4e7945 100644 --- a/wifi/locator.cpp +++ b/wifi/locator.cpp @@ -15,13 +15,13 @@ * * ***************************************************************************/ -#include +#include #include "locator.h" #include "interface_wireless.h" -extern QStringList APs; +extern TQStringList APs; -Locator::Locator (QWidget * parent, Interface_wireless * device):QWidget (parent, +Locator::Locator (TQWidget * parent, Interface_wireless * device):TQWidget (parent, "KwiFiManager") { this->device = device; @@ -30,10 +30,10 @@ Locator::Locator (QWidget * parent, Interface_wireless * device):QWidget (parent void Locator::generateLocWidget () { - QString mac, ip; + TQString mac, ip; device->get_AP_info (mac, ip); sentence = - new QLabel (i18n ("AccessPoint: ") + whois (mac.local8Bit (), APs), this); + new TQLabel (i18n ("AccessPoint: ") + whois (mac.local8Bit (), APs), this); setFixedSize (QSize (sentence->sizeHint ().width () + 2, sentence->sizeHint ().height ())); @@ -42,14 +42,14 @@ Locator::generateLocWidget () (sentence->sizeHint ().width () + 2, sentence->sizeHint ().height ())); sentence->show (); - widgetbild = QPixmap::grabWidget (sentence); + widgetbild = TQPixmap::grabWidget (sentence); delete sentence; } void -Locator::paintEvent (QPaintEvent *) +Locator::paintEvent (TQPaintEvent *) { - QPainter *locatorpainter = new QPainter (this); + TQPainter *locatorpainter = new TQPainter (this); generateLocWidget (); locatorpainter->drawPixmap (0, 0, widgetbild); delete locatorpainter; diff --git a/wifi/locator.h b/wifi/locator.h index af63c70c..54f2c683 100644 --- a/wifi/locator.h +++ b/wifi/locator.h @@ -18,9 +18,9 @@ #ifndef LOCATOR_H #define LOCATOR_H -#include -#include -#include +#include +#include +#include #include @@ -29,12 +29,12 @@ class Interface_wireless; class Locator:public QWidget { public: - Locator (QWidget * parent, Interface_wireless * device); + Locator (TQWidget * parent, Interface_wireless * device); private: - void paintEvent (QPaintEvent *); + void paintEvent (TQPaintEvent *); void generateLocWidget (); - QPixmap widgetbild; - QLabel *sentence; + TQPixmap widgetbild; + TQLabel *sentence; Interface_wireless *device; }; diff --git a/wifi/networkscanning.cpp b/wifi/networkscanning.cpp index 5a15ffbc..7e2a0e12 100644 --- a/wifi/networkscanning.cpp +++ b/wifi/networkscanning.cpp @@ -17,11 +17,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -32,7 +32,7 @@ #include "networkscanning.h" #include "interface_wireless.h" -NetworkScanning::NetworkScanning (Interface_wireless * dev, QWidget * parent, const char * name ) : QWidget ( parent, name ) { +NetworkScanning::NetworkScanning (Interface_wireless * dev, TQWidget * parent, const char * name ) : TQWidget ( parent, name ) { device = dev; networkScan(); } @@ -52,24 +52,24 @@ NetworkScanning::networkScan () if ( networks->text( i, 3 ) == i18n( "off" )) networks->setRowReadOnly( i, true ); } - networks->setSelectionMode(QTable::SingleRow); - connect(networks,SIGNAL(selectionChanged()),this,SLOT(checkWEP())); + networks->setSelectionMode(TQTable::SingleRow); + connect(networks,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(checkWEP())); this->setCaption( i18n( "Scan Results" ) ); - QGridLayout* networkSelectionLayout = new QGridLayout ( this, 2, 3, 0, 5); - switchNet = new QPushButton( i18n( "Switch to Network..." ), this ); + TQGridLayout* networkSelectionLayout = new TQGridLayout ( this, 2, 3, 0, 5); + switchNet = new TQPushButton( i18n( "Switch to Network..." ), this ); switchNet->setEnabled(false); - QPushButton* close = new QPushButton( i18n( "Close" ), this ); + TQPushButton* close = new TQPushButton( i18n( "Close" ), this ); - networks->reparent( this, QPoint( 0, 0 ) ); + networks->reparent( this, TQPoint( 0, 0 ) ); networks->setLeftMargin( 0 ); networks->verticalHeader()->hide(); - connect ( close, SIGNAL( clicked() ), this, SLOT( hide() ) ); - connect ( switchNet, SIGNAL( clicked() ), this, SLOT( switchToNetwork() ) ); - connect ( networks, SIGNAL( currentChanged(int,int)), this, SLOT( checkSettings(int,int))); - connect ( networks, SIGNAL( valueChanged(int,int)), this, SLOT( checkSettings(int,int))); + connect ( close, TQT_SIGNAL( clicked() ), this, TQT_SLOT( hide() ) ); + connect ( switchNet, TQT_SIGNAL( clicked() ), this, TQT_SLOT( switchToNetwork() ) ); + connect ( networks, TQT_SIGNAL( currentChanged(int,int)), this, TQT_SLOT( checkSettings(int,int))); + connect ( networks, TQT_SIGNAL( valueChanged(int,int)), this, TQT_SLOT( checkSettings(int,int))); networkSelectionLayout->addMultiCellWidget( networks, 0, 0, 0, 2 ); networkSelectionLayout->addWidget( switchNet, 1, 0 ); @@ -113,20 +113,20 @@ NetworkScanning::switchToNetwork() return; } - QString cmdline; + TQString cmdline; - KTempFile* tempfile = new KTempFile( QString::null, QString::null, 0700 ); - QString tempfilename = tempfile->name(); + KTempFile* tempfile = new KTempFile( TQString::null, TQString::null, 0700 ); + TQString tempfilename = tempfile->name(); - cmdline = (QString)"ifconfig %1 down\n"; + cmdline = (TQString)"ifconfig %1 down\n"; cmdline = cmdline.arg( device->get_interface_name() ); write( tempfile->handle(), cmdline.ascii(), strlen( cmdline.ascii() ) ); - cmdline = (QString)"iwconfig %1 essid %2 mode %3 enc %4\n"; + cmdline = (TQString)"iwconfig %1 essid %2 mode %3 enc %4\n"; cmdline = cmdline.arg( device->get_interface_name() ); cmdline = cmdline.arg( KProcess::quote( networks->text( networks->currentRow(), 0 ) ) ); - QString modetemp; + TQString modetemp; if (networks->text( networks->currentRow(), 1 ) == i18n("Managed") ) modetemp = "Managed"; else modetemp = "Ad-Hoc"; cmdline = cmdline.arg( modetemp ); @@ -137,7 +137,7 @@ NetworkScanning::switchToNetwork() } write( tempfile->handle(), cmdline.ascii(), strlen( cmdline.ascii() ) ); - cmdline = (QString)"ifconfig %1 up\n"; + cmdline = (TQString)"ifconfig %1 up\n"; cmdline = cmdline.arg( device->get_interface_name() ); write( tempfile->handle(), cmdline.ascii(), strlen( cmdline.ascii() ) ); diff --git a/wifi/networkscanning.h b/wifi/networkscanning.h index 5964db3a..a09b7b69 100644 --- a/wifi/networkscanning.h +++ b/wifi/networkscanning.h @@ -19,7 +19,7 @@ #ifndef NETWORKSCANNING_H #define NETWORKSCANNING_H -#include +#include class QTable; class QPushButton; @@ -34,13 +34,13 @@ class NetworkScanning : public QWidget Q_OBJECT public: - NetworkScanning (Interface_wireless * dev, QWidget * parent = 0, const char * name = 0 ); + NetworkScanning (Interface_wireless * dev, TQWidget * parent = 0, const char * name = 0 ); protected: void networkScan (); - QTable* networks; + TQTable* networks; Interface_wireless * device; - QPushButton* switchNet; + TQPushButton* switchNet; protected slots: void checkSettings(int row, int); diff --git a/wifi/picture.cpp b/wifi/picture.cpp index 11d77cae..5e4d28c5 100644 --- a/wifi/picture.cpp +++ b/wifi/picture.cpp @@ -15,9 +15,9 @@ * * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include "picture.h" #include "interface_wireless.h" @@ -25,22 +25,22 @@ #define X_OFFSET 20 #define Y_OFFSET 10 -Picture::Picture (QWidget * parent, Interface_wireless * device):QWidget (parent, +Picture::Picture (TQWidget * parent, Interface_wireless * device):TQWidget (parent, "picture") { this->device = device; KStandardDirs finder; kdedir = finder.findResourceDir ("data", "kwifimanager/pics/no_card.png"); kdedir += "kwifimanager/pics/"; - NO_CARD = new QPixmap (kdedir + "no_card.png"); - AD_HOC = new QPixmap (kdedir + "ad_hoc.png"); - ALL_ALONE = new QPixmap (kdedir + "all_alone.png"); - AP_CONNECT = new QPixmap (kdedir + "ap_connect.png"); + NO_CARD = new TQPixmap (kdedir + "no_card.png"); + AD_HOC = new TQPixmap (kdedir + "ad_hoc.png"); + ALL_ALONE = new TQPixmap (kdedir + "all_alone.png"); + AP_CONNECT = new TQPixmap (kdedir + "ap_connect.png"); } -QSize Picture::mySizeHint() { +TQSize Picture::mySizeHint() { /* make this quite general, just in case someone uses different icons */ - QSize* temp = new QSize(NO_CARD->size()); + TQSize* temp = new TQSize(NO_CARD->size()); if (AD_HOC->size().width() > temp->width ()) { temp->setWidth (AD_HOC->size().width ()); } if (AD_HOC->size().height() > temp->height()) { temp->setHeight(AD_HOC->size().height()); } if (ALL_ALONE->size().width() > temp->width ()) { temp->setWidth (ALL_ALONE->size().width ()); } @@ -62,9 +62,9 @@ Picture::~Picture () } void -Picture::paintEvent (QPaintEvent *) +Picture::paintEvent (TQPaintEvent *) { - QPainter *picturepainter = new QPainter (this); + TQPainter *picturepainter = new TQPainter (this); double freq; int mode; device->get_mode (mode); diff --git a/wifi/picture.h b/wifi/picture.h index 8d9b6bfc..b863516e 100644 --- a/wifi/picture.h +++ b/wifi/picture.h @@ -24,13 +24,13 @@ class QSize; class Picture:public QWidget { public: - Picture (QWidget * parent, Interface_wireless * device); - QSize mySizeHint(); + Picture (TQWidget * parent, Interface_wireless * device); + TQSize mySizeHint(); ~Picture (); private: - void paintEvent (QPaintEvent *); - QPixmap *NO_CARD, *ALL_ALONE, *AD_HOC, *AP_CONNECT; - QString kdedir; + void paintEvent (TQPaintEvent *); + TQPixmap *NO_CARD, *ALL_ALONE, *AD_HOC, *AP_CONNECT; + TQString kdedir; Interface_wireless *device; }; diff --git a/wifi/speed.cpp b/wifi/speed.cpp index fdb7256c..ae199d90 100644 --- a/wifi/speed.cpp +++ b/wifi/speed.cpp @@ -15,23 +15,23 @@ * * ***************************************************************************/ -#include +#include #include #include #include "speed.h" #include "interface_wireless.h" -Speed::Speed (QWidget * parent, Interface_wireless * device):QWidget (parent, +Speed::Speed (TQWidget * parent, Interface_wireless * device):TQWidget (parent, "KWiFiManager") { this->device = device; } void -Speed::paintEvent (QPaintEvent *) +Speed::paintEvent (TQPaintEvent *) { - QPainter speedpainter (this); - QColor farbe; + TQPainter speedpainter (this); + TQColor farbe; farbe.setRgb (0, 255, 0); if (device->get_bitrate () < 6000000) farbe.setRgb (0, 200, 0); diff --git a/wifi/speed.h b/wifi/speed.h index 41f15b70..48b949b3 100644 --- a/wifi/speed.h +++ b/wifi/speed.h @@ -18,16 +18,16 @@ #ifndef SPEED_H #define SPEED_H -#include +#include class Interface_wireless; class Speed:public QWidget { public: - Speed (QWidget * parent, Interface_wireless * device); + Speed (TQWidget * parent, Interface_wireless * device); private: - void paintEvent (QPaintEvent *); + void paintEvent (TQPaintEvent *); Interface_wireless *device; }; diff --git a/wifi/statistics.cpp b/wifi/statistics.cpp index 2ad8d393..a7716de1 100644 --- a/wifi/statistics.cpp +++ b/wifi/statistics.cpp @@ -15,13 +15,13 @@ * * ***************************************************************************/ -#include -#include +#include +#include #include #include "statistics.h" #include "interface_wireless.h" -Statistics::Statistics (Interface_wireless * device, bool showStatsNoise):QWidget (0, +Statistics::Statistics (Interface_wireless * device, bool showStatsNoise):TQWidget (0, "KWiFiManager") { this->setCaption (i18n ("Statistics - KWiFiManager")); @@ -30,10 +30,10 @@ Statistics::Statistics (Interface_wireless * device, bool showStatsNoise):QWidge } void -Statistics::paintEvent (QPaintEvent *) +Statistics::paintEvent (TQPaintEvent *) { - statpainter = new QPainter (this); - QColor farbe (255, 255, 255); + statpainter = new TQPainter (this); + TQColor farbe (255, 255, 255); statpainter->drawText (40, 30, i18n ("Noise/Signal Level Statistics")); statpainter->drawText (150, 260, i18n ("BLUE = signal level, RED = noise level")); @@ -42,8 +42,8 @@ Statistics::paintEvent (QPaintEvent *) statpainter->drawText (21, 274, i18n ("-240 s")); statpainter->drawText (510, 274, i18n ("now")); statpainter->fillRect (41, 41, 480, 201, farbe); - QPointArray datensatz (240); - QPointArray datensatz2 (240); + TQPointArray datensatz (240); + TQPointArray datensatz2 (240); // we may need to scale the output to fit into the window, so here we // determine the range of values int bottom = @@ -53,8 +53,8 @@ Statistics::paintEvent (QPaintEvent *) (device->sigLevelMax > device->noiseLevelMax) ? device->sigLevelMax : device->noiseLevelMax; int datarange = top - bottom; - statpainter->drawText (10, 50, QString ("%1").arg (top)); - statpainter->drawText (10, 240, QString ("%1").arg (bottom)); + statpainter->drawText (10, 50, TQString ("%1").arg (top)); + statpainter->drawText (10, 240, TQString ("%1").arg (bottom)); // if values are all below 0, this indicates proper dBm values diff --git a/wifi/statistics.h b/wifi/statistics.h index f8c99dd9..dc43ef41 100644 --- a/wifi/statistics.h +++ b/wifi/statistics.h @@ -24,8 +24,8 @@ class Statistics:public QWidget public: Statistics (Interface_wireless * device, bool showStatsNoise); private: - QPainter * statpainter; - void paintEvent (QPaintEvent *); + TQPainter * statpainter; + void paintEvent (TQPaintEvent *); Interface_wireless *device; bool showStatsNoise; }; diff --git a/wifi/status.cpp b/wifi/status.cpp index b40fa67d..e7ace893 100644 --- a/wifi/status.cpp +++ b/wifi/status.cpp @@ -22,8 +22,8 @@ #include #include -Status::Status (QWidget * parent, Interface_wireless * device) - : QWidget (parent, "KWiFiManager status") +Status::Status (TQWidget * parent, Interface_wireless * device) + : TQWidget (parent, "KWiFiManager status") { this->device = device; } @@ -38,29 +38,29 @@ bool Status::generateStatsWidget () qual = 0; device->get_current_quality (sig, noi, qual); content = - new QGroupBox (2, Qt::Horizontal, i18n ("Status of Active Connection"), + new TQGroupBox (2, Qt::Horizontal, i18n ("Status of Active Connection"), this); bool has_freq = device->get_device_freq (freq); if ((!has_freq) || (qual == 0)) { - stat = new QLabel (i18n ("Searching for network: "), content); + stat = new TQLabel (i18n ("Searching for network: "), content); } else - stat = new QLabel (i18n ("Connected to network: "), content); - net_id = new QLabel (device->get_essid (), content); - ap_str = new QLabel (i18n ("Access point: "), content); + stat = new TQLabel (i18n ("Connected to network: "), content); + net_id = new TQLabel (device->get_essid (), content); + ap_str = new TQLabel (i18n ("Access point: "), content); QString mac, ip; device->get_AP_info (mac, ip); if ((mac != "44:44:44:44:44:44") && (mac != "00:00:00:00:00:00")) { - ap_ad = new QLabel (mac, content); + ap_ad = new TQLabel (mac, content); } else { - ap_ad = new QLabel (i18n("- no access point -"),content); + ap_ad = new TQLabel (i18n("- no access point -"),content); } - local_ip_string = new QLabel (i18n ("Local IP: "), content); - local_ip_content = new QLabel (device->get_IP_info (), content); - fr_str = new QLabel (i18n ("Frequency [channel]: "), content); + local_ip_string = new TQLabel (i18n ("Local IP: "), content); + local_ip_content = new TQLabel (device->get_IP_info (), content); + fr_str = new TQLabel (i18n ("Frequency [channel]: "), content); QString temp3 = "%1"; QString @@ -342,10 +342,10 @@ bool Status::generateStatsWidget () temp3 = temp3.arg (freq); } - fr = new QLabel ( has_freq ? temp2 + " [" + temp3 + "]" : "" , content); + fr = new TQLabel ( has_freq ? temp2 + " [" + temp3 + "]" : "" , content); if (geteuid () == 0) { - enc_str = new QLabel (i18n ("Encryption: "), content); + enc_str = new TQLabel (i18n ("Encryption: "), content); QString key; int @@ -356,26 +356,26 @@ bool Status::generateStatsWidget () // will the following line suffice? if (size == 0) { - enc = new QLabel (i18n ("off"), content); + enc = new TQLabel (i18n ("off"), content); } else - enc = new QLabel (i18n ("active"), content); + enc = new TQLabel (i18n ("active"), content); } // content->setFixedSize (content->sizeHint ()); content->setMinimumSize(content->sizeHint()); if ( content->minimumWidth() < 280 ) content->setMinimumWidth( 280 ); setFixedSize (content->minimumSize()); content->show (); - widgetbild = QPixmap::grabWidget (content); + widgetbild = TQPixmap::grabWidget (content); delete content; return true; } void -Status::paintEvent (QPaintEvent *) +Status::paintEvent (TQPaintEvent *) { - QPainter *paintArea = new QPainter (this); + TQPainter *paintArea = new TQPainter (this); generateStatsWidget (); paintArea->drawPixmap (0, 0, widgetbild); delete paintArea; diff --git a/wifi/status.h b/wifi/status.h index 0c7f0d3e..9b8aed52 100644 --- a/wifi/status.h +++ b/wifi/status.h @@ -18,25 +18,25 @@ #ifndef STATUS_H #define STATUS_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class Interface_wireless; class Status:public QWidget { public: - Status (QWidget * parent, Interface_wireless * device); + Status (TQWidget * parent, Interface_wireless * device); private: - void paintEvent (QPaintEvent *); + void paintEvent (TQPaintEvent *); bool generateStatsWidget (); - QGroupBox *content; - QLabel *stat, *net_id, *ap_str, *ap_ad, *fr_str, *fr, *enc_str, *enc, + TQGroupBox *content; + TQLabel *stat, *net_id, *ap_str, *ap_ad, *fr_str, *fr, *enc_str, *enc, *local_ip_content, *local_ip_string; - QPixmap widgetbild, widgetbildalt; + TQPixmap widgetbild, widgetbildalt; Interface_wireless *device; }; diff --git a/wifi/strength.cpp b/wifi/strength.cpp index 0bb43f6c..ad4314c0 100644 --- a/wifi/strength.cpp +++ b/wifi/strength.cpp @@ -15,10 +15,10 @@ * * ***************************************************************************/ -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -27,25 +27,25 @@ extern bool useAlternateStrengthCalc; -Strength::Strength (QWidget * parent, Interface_wireless * device):QWidget (parent, +Strength::Strength (TQWidget * parent, Interface_wireless * device):TQWidget (parent, "strength") { this->device = device; KStandardDirs finder; kdedir = finder.findResourceDir ("data", "kwifimanager/pics/no_card.png"); kdedir += "kwifimanager/pics/"; - NOT_CON_OFFLINE_ADHOC = new QPixmap (kdedir + "offline.png"); - EXCELLENT = new QPixmap (kdedir + "excellent.png"); - GOOD = new QPixmap (kdedir + "good.png"); - MARGINAL = new QPixmap (kdedir + "marginal.png"); - OOR_MINIMUM = new QPixmap (kdedir + "oor_minimum.png"); - OOR_DOWN = new QPixmap (kdedir + "oor_down.png"); + NOT_CON_OFFLINE_ADHOC = new TQPixmap (kdedir + "offline.png"); + EXCELLENT = new TQPixmap (kdedir + "excellent.png"); + GOOD = new TQPixmap (kdedir + "good.png"); + MARGINAL = new TQPixmap (kdedir + "marginal.png"); + OOR_MINIMUM = new TQPixmap (kdedir + "oor_minimum.png"); + OOR_DOWN = new TQPixmap (kdedir + "oor_down.png"); } -QSize Strength::mySizeHint () +TQSize Strength::mySizeHint () { /* make this quite general, just in case someone uses different icons */ - QSize* temp = new QSize(NOT_CON_OFFLINE_ADHOC->size()); + TQSize* temp = new TQSize(NOT_CON_OFFLINE_ADHOC->size()); if (EXCELLENT->size().width() > temp->width ()) { temp->setWidth (EXCELLENT->size().width ()); } if (EXCELLENT->size().height() > temp->height()) { temp->setHeight(EXCELLENT->size().height()); } if (GOOD->size().width() > temp->width ()) { temp->setWidth (GOOD->size().width ()); } @@ -62,7 +62,7 @@ QSize Strength::mySizeHint () temp->setHeight(temp->height() + 30); // up to now: this is the height required to get a decent logo display // now determine height of QLabels to calculate the extra needed height - QLabel heightTest( "ABC", 0 ); + TQLabel heightTest( "ABC", 0 ); temp->setHeight( temp->height() + 2 * heightTest.sizeHint().height() + 10 ); return *temp; } @@ -77,16 +77,16 @@ Strength::~Strength () } void -Strength::paintEvent (QPaintEvent * event) +Strength::paintEvent (TQPaintEvent * event) { updateInfo (event); } void -Strength::updateInfo (QPaintEvent *) +Strength::updateInfo (TQPaintEvent *) { - QPainter *strengthpainter = new QPainter (this); - QString sstrength1, sstrength2( i18n("N/A") ); + TQPainter *strengthpainter = new TQPainter (this); + TQString sstrength1, sstrength2( i18n("N/A") ); int mode; double freq; @@ -113,43 +113,43 @@ Strength::updateInfo (QPaintEvent *) else if (validdata && (strength > 45)) { sstrength1 = i18n("ULTIMATE"); - sstrength2 = QString::number(strength); + sstrength2 = TQString::number(strength); strengthpainter->drawPixmap (50, 10, *EXCELLENT); } else if (validdata && (strength > 35)) { sstrength1 = i18n("TOP"); - sstrength2 = QString::number(strength); + sstrength2 = TQString::number(strength); strengthpainter->drawPixmap (50, 10, *EXCELLENT); } else if (validdata && (strength > 25)) { sstrength1 = i18n("EXCELLENT"); - sstrength2 = QString::number(strength); + sstrength2 = TQString::number(strength); strengthpainter->drawPixmap (50, 10, *EXCELLENT); } else if (validdata && (strength > 15)) { sstrength1 = i18n("GOOD"); - sstrength2 = QString::number(strength); + sstrength2 = TQString::number(strength); strengthpainter->drawPixmap (50, 10, *GOOD); } else if (validdata && (strength > 5)) { sstrength1 = i18n("WEAK"); - sstrength2 = QString::number(strength); + sstrength2 = TQString::number(strength); strengthpainter->drawPixmap (50, 10, *MARGINAL); } else if (validdata && (strength > 0)) { sstrength1 = i18n("MINIMUM"); - sstrength2 = QString::number(strength); + sstrength2 = TQString::number(strength); strengthpainter->drawPixmap (50, 10, *OOR_MINIMUM); } else if (((strength == 0) && (mode == 2)) || (!validdata)) { sstrength1 = i18n("OUT OF RANGE"); - sstrength2 = QString::fromLatin1("0"); + sstrength2 = TQString::fromLatin1("0"); strengthpainter->drawPixmap (50, 10, *OOR_DOWN); } else diff --git a/wifi/strength.h b/wifi/strength.h index b03eb215..c8b9eb0b 100644 --- a/wifi/strength.h +++ b/wifi/strength.h @@ -17,7 +17,7 @@ #ifndef STRENGTH_H #define STRENGTH_H -#include +#include class Interface_wireless; class QSize; @@ -26,15 +26,15 @@ class Strength:public QWidget { Q_OBJECT public: - Strength (QWidget * parent, Interface_wireless * device); - QSize mySizeHint(); + Strength (TQWidget * parent, Interface_wireless * device); + TQSize mySizeHint(); ~Strength (); - QPixmap *NOT_CON_OFFLINE_ADHOC, *OOR_DOWN, *OOR_MINIMUM, *MARGINAL, *GOOD, *EXCELLENT; + TQPixmap *NOT_CON_OFFLINE_ADHOC, *OOR_DOWN, *OOR_MINIMUM, *MARGINAL, *GOOD, *EXCELLENT; public slots: - void updateInfo (QPaintEvent *); + void updateInfo (TQPaintEvent *); private: - QString kdedir; - void paintEvent (QPaintEvent *); + TQString kdedir; + void paintEvent (TQPaintEvent *); Interface_wireless *device; }; -- cgit v1.2.1