From aa3a1ca934bc541bddd3fa136a85f106f7da266e Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:25:18 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1157635 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kcron/ctcron.cpp | 26 +- kcron/ctcron.h | 10 +- kcron/cthost.h | 6 +- kcron/ktapp.cpp | 62 ++-- kcron/ktapp.h | 8 +- kcron/kticon.cpp | 28 +- kcron/kticon.h | 30 +- kcron/ktlistcron.cpp | 18 +- kcron/ktlistcron.h | 6 +- kcron/ktlistitem.cpp | 6 +- kcron/ktlistitem.h | 6 +- kcron/ktlisttask.cpp | 12 +- kcron/ktlisttask.h | 2 +- kcron/ktlisttasks.cpp | 10 +- kcron/ktlisttasks.h | 6 +- kcron/ktlistvar.cpp | 12 +- kcron/ktlistvar.h | 2 +- kcron/ktlistvars.cpp | 10 +- kcron/ktlistvars.h | 6 +- kcron/ktprint.cpp | 18 +- kcron/ktprint.h | 8 +- kcron/ktprintopt.cpp | 16 +- kcron/ktprintopt.h | 8 +- kcron/kttask.cpp | 226 ++++++------ kcron/kttask.h | 62 ++-- kcron/ktvariable.cpp | 38 +- kcron/ktvariable.h | 24 +- kcron/ktview.cpp | 108 +++--- kcron/ktview.h | 16 +- kdat/Archive.cpp | 40 +-- kdat/Archive.h | 20 +- kdat/ArchiveInfoWidget.cpp | 40 +-- kdat/ArchiveInfoWidget.h | 16 +- kdat/BackupDlg.cpp | 114 +++--- kdat/BackupDlg.h | 40 +-- kdat/BackupOptDlg.cpp | 22 +- kdat/BackupOptDlg.h | 14 +- kdat/BackupProfile.cpp | 46 +-- kdat/BackupProfile.h | 42 +-- kdat/BackupProfileInfoWidget.cpp | 50 +-- kdat/BackupProfileInfoWidget.h | 12 +- kdat/BackupProfileManager.cpp | 20 +- kdat/BackupProfileManager.h | 16 +- kdat/BackupProfileWidget.cpp | 98 ++--- kdat/BackupProfileWidget.h | 40 +-- kdat/ErrorHandler.cpp | 34 +- kdat/File.cpp | 22 +- kdat/File.h | 18 +- kdat/FileInfoWidget.cpp | 64 ++-- kdat/FileInfoWidget.h | 22 +- kdat/FormatOptDlg.cpp | 38 +- kdat/FormatOptDlg.h | 18 +- kdat/ImageCache.cpp | 58 +-- kdat/ImageCache.h | 52 +-- kdat/IndexDlg.cpp | 90 ++--- kdat/IndexDlg.h | 34 +- kdat/InfoShellWidget.cpp | 14 +- kdat/InfoShellWidget.h | 8 +- kdat/KDatMainWindow.cpp | 280 +++++++-------- kdat/KDatMainWindow.h | 62 ++-- kdat/LoggerWidget.cpp | 24 +- kdat/LoggerWidget.h | 10 +- kdat/Node.cpp | 146 ++++---- kdat/Node.h | 90 ++--- kdat/Options.cpp | 8 +- kdat/Options.h | 16 +- kdat/OptionsDlg.cpp | 12 +- kdat/OptionsDlg.h | 4 +- kdat/Range.cpp | 2 +- kdat/Range.h | 6 +- kdat/Tape.cpp | 94 ++--- kdat/Tape.h | 18 +- kdat/TapeDrive.cpp | 6 +- kdat/TapeDrive.h | 6 +- kdat/TapeFileInfoWidget.cpp | 44 +-- kdat/TapeFileInfoWidget.h | 16 +- kdat/TapeInfoWidget.cpp | 76 ++-- kdat/TapeInfoWidget.h | 26 +- kdat/TapeManager.cpp | 28 +- kdat/TapeManager.h | 18 +- kdat/TarParser.h | 6 +- kdat/Util.cpp | 16 +- kdat/Util.h | 8 +- kdat/VerifyDlg.cpp | 106 +++--- kdat/VerifyDlg.h | 34 +- kdat/VerifyOptDlg.cpp | 48 +-- kdat/VerifyOptDlg.h | 14 +- kdat/ktreeview.cpp | 142 ++++---- kdat/ktreeview.h | 104 +++--- kdat/main.cpp | 4 +- kfile-plugins/deb/kfile_deb.cpp | 42 +-- kfile-plugins/deb/kfile_deb.h | 2 +- kfile-plugins/rpm/kfile_rpm.cpp | 46 +-- kfile-plugins/rpm/kfile_rpm.h | 2 +- knetworkconf/knetworkconf/kadddevicecontainer.cpp | 70 ++-- knetworkconf/knetworkconf/kadddevicecontainer.h | 26 +- .../knetworkconf/kadddevicedlgextension.ui.h | 2 +- knetworkconf/knetworkconf/kaddknownhostdlg.ui.h | 4 +- knetworkconf/knetworkconf/kaddressvalidator.cpp | 32 +- knetworkconf/knetworkconf/kaddressvalidator.h | 24 +- knetworkconf/knetworkconf/kdnsinfo.cpp | 20 +- knetworkconf/knetworkconf/kdnsinfo.h | 36 +- knetworkconf/knetworkconf/kknownhostinfo.cpp | 10 +- knetworkconf/knetworkconf/kknownhostinfo.h | 18 +- knetworkconf/knetworkconf/knetworkconf.cpp | 262 +++++++------- knetworkconf/knetworkconf/knetworkconf.h | 88 ++--- knetworkconf/knetworkconf/knetworkconfdlg.ui.h | 4 +- knetworkconf/knetworkconf/knetworkconfigparser.cpp | 360 +++++++++---------- knetworkconf/knetworkconf/knetworkconfigparser.h | 80 ++--- knetworkconf/knetworkconf/knetworkconfmodule.cpp | 14 +- knetworkconf/knetworkconf/knetworkconfmodule.h | 6 +- knetworkconf/knetworkconf/knetworkinfo.cpp | 20 +- knetworkconf/knetworkconf/knetworkinfo.h | 34 +- knetworkconf/knetworkconf/knetworkinterface.cpp | 44 +-- knetworkconf/knetworkconf/knetworkinterface.h | 68 ++-- .../knetworkconf/kprofileslistviewtooltip.h | 50 +-- knetworkconf/knetworkconf/kroutinginfo.cpp | 24 +- knetworkconf/knetworkconf/kroutinginfo.h | 38 +- knetworkconf/knetworkconf/kwirelessinterface.cpp | 12 +- knetworkconf/knetworkconf/kwirelessinterface.h | 20 +- knetworkconf/knetworkconf/main.cpp | 2 +- kpackage/cache.cpp | 68 ++-- kpackage/cache.h | 30 +- kpackage/debAptInterface.cpp | 140 ++++---- kpackage/debAptInterface.h | 34 +- kpackage/debDpkgInterface.cpp | 30 +- kpackage/debDpkgInterface.h | 12 +- kpackage/debInterface.cpp | 120 +++---- kpackage/debInterface.h | 56 +-- kpackage/fbsdInterface.cpp | 156 ++++---- kpackage/fbsdInterface.h | 52 +-- kpackage/findf.cpp | 72 ++-- kpackage/findf.h | 44 +-- kpackage/gentooInterface.cpp | 104 +++--- kpackage/gentooInterface.h | 28 +- kpackage/kio.cpp | 22 +- kpackage/kio.h | 14 +- kpackage/kissInterface.cpp | 64 ++-- kpackage/kissInterface.h | 26 +- kpackage/kpPty.cpp | 68 ++-- kpackage/kpPty.h | 34 +- kpackage/kpTerm.cpp | 72 ++-- kpackage/kpTerm.h | 32 +- kpackage/kpackage.cpp | 142 ++++---- kpackage/kpackage.h | 36 +- kpackage/kplview.cpp | 80 ++--- kpackage/kplview.h | 50 +-- kpackage/main.cpp | 10 +- kpackage/managementWidget.cpp | 142 ++++---- kpackage/managementWidget.h | 50 +-- kpackage/options.cpp | 122 +++---- kpackage/options.h | 72 ++-- kpackage/packageDisplay.cpp | 116 +++--- kpackage/packageDisplay.h | 38 +- kpackage/packageInfo.cpp | 124 +++---- kpackage/packageInfo.h | 44 +-- kpackage/packageProperties.cpp | 58 +-- kpackage/packageProperties.h | 26 +- kpackage/pkgInterface.cpp | 110 +++--- kpackage/pkgInterface.h | 100 +++--- kpackage/pkgOptions.cpp | 98 ++--- kpackage/pkgOptions.h | 50 +-- kpackage/procbuf.cpp | 28 +- kpackage/procbuf.h | 18 +- kpackage/rpmInterface.cpp | 174 ++++----- kpackage/rpmInterface.h | 62 ++-- kpackage/search.cpp | 40 +-- kpackage/search.h | 10 +- kpackage/slackInterface.cpp | 162 ++++----- kpackage/slackInterface.h | 30 +- kpackage/updateLoc.cpp | 200 +++++------ kpackage/updateLoc.h | 134 +++---- kpackage/utils.cpp | 6 +- kpackage/utils.h | 2 +- ksysv/ActionList.cpp | 14 +- ksysv/ActionList.h | 10 +- ksysv/Data.cpp | 20 +- ksysv/Data.h | 54 +-- ksysv/IOCore.cpp | 88 ++--- ksysv/IOCore.h | 28 +- ksysv/OldView.cpp | 396 ++++++++++----------- ksysv/OldView.h | 76 ++-- ksysv/PreferencesDialog.cpp | 78 ++-- ksysv/PreferencesDialog.h | 18 +- ksysv/Properties.cpp | 70 ++-- ksysv/Properties.h | 28 +- ksysv/RunlevelAuthIcon.cpp | 34 +- ksysv/RunlevelAuthIcon.h | 14 +- ksysv/ServiceDlg.cpp | 32 +- ksysv/ServiceDlg.h | 12 +- ksysv/SpinBox.cpp | 32 +- ksysv/SpinBox.h | 16 +- ksysv/TopWidget.cpp | 312 ++++++++-------- ksysv/TopWidget.h | 6 +- ksysv/kbusymanager.cpp | 10 +- ksysv/kdltooltip.cpp | 26 +- ksysv/kdltooltip.h | 8 +- ksysv/kscroller.cpp | 56 +-- ksysv/kscroller.h | 30 +- ksysv/ksv_conf.cpp | 30 +- ksysv/ksv_conf.h | 58 +-- ksysv/ksv_core.cpp | 60 ++-- ksysv/ksv_core.h | 16 +- ksysv/ksv_service.cpp | 6 +- ksysv/ksv_service.h | 14 +- ksysv/ksvapplication.cpp | 2 +- ksysv/ksvconfigwizard.cpp | 22 +- ksysv/ksvconfigwizard.h | 10 +- ksysv/ksvdrag.cpp | 32 +- ksysv/ksvdrag.h | 10 +- ksysv/ksvdraglist.cpp | 156 ++++---- ksysv/ksvdraglist.h | 122 +++---- ksysv/ksvlookandfeel.cpp | 14 +- ksysv/ksvlookandfeel.h | 16 +- ksysv/ksvmiscconfig.cpp | 6 +- ksysv/ksvmiscconfig.h | 2 +- ksysv/ksvpathconfig.cpp | 6 +- ksysv/ksvpathconfig.h | 2 +- ksysv/trash.cpp | 44 +-- ksysv/trash.h | 20 +- kuser/addUser.cpp | 28 +- kuser/addUser.h | 8 +- kuser/delUser.cpp | 18 +- kuser/delUser.h | 8 +- kuser/editDefaults.cpp | 26 +- kuser/editDefaults.h | 14 +- kuser/editGroup.cpp | 102 +++--- kuser/editGroup.h | 12 +- kuser/kglobal.cpp | 2 +- kuser/kglobal_.h | 2 +- kuser/kgroup.cpp | 44 +-- kuser/kgroup.h | 64 ++-- kuser/kgroupfiles.cpp | 76 ++-- kuser/kgroupfiles.h | 6 +- kuser/kgroupldap.cpp | 50 +-- kuser/kgroupldap.h | 16 +- kuser/kgroupsystem.cpp | 8 +- kuser/kgroupsystem.h | 6 +- kuser/kgroupvw.cpp | 20 +- kuser/kgroupvw.h | 8 +- kuser/kuser.cpp | 264 +++++++------- kuser/kuser.h | 134 +++---- kuser/kuserfiles.cpp | 120 +++---- kuser/kuserfiles.h | 6 +- kuser/kuserldap.cpp | 104 +++--- kuser/kuserldap.h | 22 +- kuser/kusersystem.cpp | 20 +- kuser/kusersystem.h | 6 +- kuser/kuservw.cpp | 26 +- kuser/kuservw.h | 10 +- kuser/main.cpp | 2 +- kuser/mainView.cpp | 50 +-- kuser/mainView.h | 14 +- kuser/mainWidget.cpp | 80 ++--- kuser/misc.cpp | 42 +-- kuser/misc.h | 20 +- kuser/propdlg.cpp | 264 +++++++------- kuser/propdlg.h | 70 ++-- kuser/pwddlg.cpp | 12 +- kuser/pwddlg.h | 6 +- kuser/selectconn.cpp | 34 +- kuser/selectconn.h | 6 +- kuser/sha1.h | 2 +- kuser/sid.cpp | 18 +- kuser/sid.h | 16 +- lilo-config/common/String.h | 2 +- lilo-config/kde-qt-common/EditWidget.cpp | 24 +- lilo-config/kde-qt-common/EditWidget.h | 38 +- lilo-config/kde-qt-common/expert.cpp | 12 +- lilo-config/kde-qt-common/expert.h | 8 +- lilo-config/kde-qt-common/general.cpp | 100 +++--- lilo-config/kde-qt-common/general.h | 10 +- lilo-config/kde-qt-common/images.cpp | 114 +++--- lilo-config/kde-qt-common/images.h | 16 +- lilo-config/kde-qt-common/mainwidget.cpp | 16 +- lilo-config/kde-qt-common/mainwidget.h | 16 +- lilo-config/kde-qt-common/ui.h | 16 +- lilo-config/kde/Details.cpp | 62 ++-- lilo-config/kde/Details.h | 12 +- lilo-config/kde/InputBox.cpp | 12 +- lilo-config/kde/InputBox.h | 10 +- lilo-config/kde/kcontrol.cpp | 10 +- lilo-config/kde/kcontrol.h | 6 +- lilo-config/qt/Details.cpp | 68 ++-- lilo-config/qt/Details.h | 16 +- lilo-config/qt/InputBox.cpp | 24 +- lilo-config/qt/InputBox.h | 18 +- lilo-config/qt/standalone.cpp | 68 ++-- lilo-config/qt/standalone.h | 28 +- secpolicy/pamview.cpp | 44 +-- secpolicy/pamview.h | 8 +- secpolicy/ppitem.cpp | 10 +- secpolicy/ppitem.h | 8 +- secpolicy/secpolicywin.cpp | 10 +- secpolicy/secpolicywin.h | 2 +- 295 files changed, 6604 insertions(+), 6604 deletions(-) diff --git a/kcron/ctcron.cpp b/kcron/ctcron.cpp index 853f6de..bcc51e4 100644 --- a/kcron/ctcron.cpp +++ b/kcron/ctcron.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -42,7 +42,7 @@ CTCron::CTCron(bool _syscron, string _login) : tmp.close(); tmpFileName = tmp.name(); - QString readCommand; + TQString readCommand; if (uid == 0) // root, so provide requested crontab @@ -56,8 +56,8 @@ CTCron::CTCron(bool _syscron, string _login) : } else { - readCommand = QString("crontab -u ") + _login.c_str() + " -l > " + KProcess::quote(tmpFileName); - writeCommand = QString("crontab -u ") + _login.c_str() + " " + KProcess::quote(tmpFileName); + readCommand = TQString("crontab -u ") + _login.c_str() + " -l > " + KProcess::quote(tmpFileName); + writeCommand = TQString("crontab -u ") + _login.c_str() + " " + KProcess::quote(tmpFileName); if (!initFromPasswd(getpwnam(_login.c_str()))) { error = i18n("No password entry found for user '%1'").arg(_login.c_str()); @@ -86,9 +86,9 @@ CTCron::CTCron(bool _syscron, string _login) : // Don't set error if it can't be read, it means the user // doesn't have a crontab. - if (system(QFile::encodeName(readCommand)) == 0) + if (system(TQFile::encodeName(readCommand)) == 0) { - ifstream cronfile(QFile::encodeName(tmpFileName)); + ifstream cronfile(TQFile::encodeName(tmpFileName)); cronfile >> *this; } @@ -106,8 +106,8 @@ CTCron::CTCron(const struct passwd *pwd) : tmp.close(); tmpFileName = tmp.name(); - QString readCommand = QString("crontab -u ") + QString(pwd->pw_name) + " -l > " + KProcess::quote(tmpFileName); - writeCommand = QString("crontab -u ") + QString(pwd->pw_name) + " " + KProcess::quote(tmpFileName); + TQString readCommand = TQString("crontab -u ") + TQString(pwd->pw_name) + " -l > " + KProcess::quote(tmpFileName); + writeCommand = TQString("crontab -u ") + TQString(pwd->pw_name) + " " + KProcess::quote(tmpFileName); initFromPasswd(pwd); @@ -119,9 +119,9 @@ CTCron::CTCron(const struct passwd *pwd) : // Don't set error if it can't be read, it means the user // doesn't have a crontab. - if (system(QFile::encodeName(readCommand)) == 0) + if (system(TQFile::encodeName(readCommand)) == 0) { - ifstream cronfile(QFile::encodeName(tmpFileName)); + ifstream cronfile(TQFile::encodeName(tmpFileName)); cronfile >> *this; } @@ -265,17 +265,17 @@ CTCron::~CTCron() void CTCron::apply() { // write to temp file - ofstream cronfile(QFile::encodeName(tmpFileName)); + ofstream cronfile(TQFile::encodeName(tmpFileName)); cronfile << *this << flush; // install temp file into crontab - if (system(QFile::encodeName(writeCommand)) != 0) + if (system(TQFile::encodeName(writeCommand)) != 0) { error = i18n("An error occurred while updating crontab."); } // remove the temp file - (void) unlink(QFile::encodeName(tmpFileName)); + (void) unlink(TQFile::encodeName(tmpFileName)); if (isError()) return; diff --git a/kcron/ctcron.h b/kcron/ctcron.h index b8d03fe..2aaf01b 100644 --- a/kcron/ctcron.h +++ b/kcron/ctcron.h @@ -19,7 +19,7 @@ #include #include -#include // Anarchy! -WABA +#include // Anarchy! -WABA class CTException; class CTTask; @@ -94,7 +94,7 @@ public: /** * Return error description */ - QString errorMessage() { QString r = error; error = QString::null; return r; } + TQString errorMessage() { TQString r = error; error = TQString::null; return r; } /** @@ -138,10 +138,10 @@ private: unsigned int initialTaskCount; unsigned int initialVariableCount; - QString writeCommand; - QString tmpFileName; + TQString writeCommand; + TQString tmpFileName; - QString error; + TQString error; protected: // Initialize member variables from the struct passwd. diff --git a/kcron/cthost.h b/kcron/cthost.h index 6d601c3..022ff54 100644 --- a/kcron/cthost.h +++ b/kcron/cthost.h @@ -18,7 +18,7 @@ #include #include -#include // Whatever +#include // Whatever class CTCron; struct passwd; @@ -78,7 +78,7 @@ public: /** * Error message */ - QString errorMessage() { QString r = error; error = QString::null; return r; } + TQString errorMessage() { TQString r = error; error = TQString::null; return r; } /** @@ -110,7 +110,7 @@ private: CTCron* createCTCron(bool _syscron = false, std::string _login = ""); CTCron* createCTCron(const struct passwd *); - QString error; + TQString error; }; typedef std::vector::iterator CTCronIterator; diff --git a/kcron/ktapp.cpp b/kcron/ktapp.cpp index 76f0e08..35c009c 100644 --- a/kcron/ktapp.cpp +++ b/kcron/ktapp.cpp @@ -59,8 +59,8 @@ KTApp::KTApp() : KMainWindow(0) KPopupMenu *editMenu = static_cast(guiFactory()->container("edit", this)); KPopupMenu *settingsMenu = static_cast(guiFactory()->container("settings", this)); - connect(editMenu,SIGNAL(highlighted(int)),this,SLOT(statusEditCallback(int))); - connect(settingsMenu,SIGNAL(highlighted(int)),this,SLOT(statusSettingsCallback(int))); + connect(editMenu,TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(statusEditCallback(int))); + connect(settingsMenu,TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(statusSettingsCallback(int))); // Read options. readOptions(); } @@ -111,33 +111,33 @@ const CTHost& KTApp::getCTHost() const } -QString KTApp::caption() +TQString KTApp::caption() { - QString cap(kapp->caption()); + TQString cap(kapp->caption()); return cap; } void KTApp::setupActions() { //File Menu - KStdAction::save(this, SLOT(slotFileSave()), actionCollection()); - KStdAction::print(this, SLOT(slotFilePrint()), actionCollection()); - KStdAction::quit(this, SLOT(slotFileQuit()), actionCollection()); + KStdAction::save(this, TQT_SLOT(slotFileSave()), actionCollection()); + KStdAction::print(this, TQT_SLOT(slotFilePrint()), actionCollection()); + KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection()); //Edit menu - KStdAction::cut(this, SLOT(slotEditCut()), actionCollection()); - KStdAction::copy(this, SLOT(slotEditCopy()), actionCollection()); - KStdAction::paste(this, SLOT(slotEditPaste()), actionCollection()); - (void)new KAction(i18n("&New..."), KStdAccel::openNew(), this,SLOT(slotEditNew()),actionCollection(),"edit_new"); + KStdAction::cut(this, TQT_SLOT(slotEditCut()), actionCollection()); + KStdAction::copy(this, TQT_SLOT(slotEditCopy()), actionCollection()); + KStdAction::paste(this, TQT_SLOT(slotEditPaste()), actionCollection()); + (void)new KAction(i18n("&New..."), KStdAccel::openNew(), this,TQT_SLOT(slotEditNew()),actionCollection(),"edit_new"); //I don't like this KStdAccel::open() for modifying, but I'm just porting this to xmlui - (void)new KAction(i18n("M&odify..."), KStdAccel::open(), this,SLOT(slotEditModify()),actionCollection(),"edit_modify"); - (void)new KAction(i18n("&Delete"), 0, this,SLOT(slotEditDelete()),actionCollection(),"edit_delete"); - (void)new KAction(i18n("&Enabled"), 0, this,SLOT(slotEditEnable()),actionCollection(),"edit_enable"); - (void)new KAction(i18n("&Run Now"), 0, this,SLOT(slotEditRunNow()),actionCollection(),"edit_run"); + (void)new KAction(i18n("M&odify..."), KStdAccel::open(), this,TQT_SLOT(slotEditModify()),actionCollection(),"edit_modify"); + (void)new KAction(i18n("&Delete"), 0, this,TQT_SLOT(slotEditDelete()),actionCollection(),"edit_delete"); + (void)new KAction(i18n("&Enabled"), 0, this,TQT_SLOT(slotEditEnable()),actionCollection(),"edit_enable"); + (void)new KAction(i18n("&Run Now"), 0, this,TQT_SLOT(slotEditRunNow()),actionCollection(),"edit_run"); //Settings menu - (void)new KAction(i18n("Show &Toolbar"), 0, this,SLOT(slotViewToolBar()),actionCollection(),"show_toolbar"); - (void)new KAction(i18n("Show &Statusbar"), 0, this,SLOT(slotViewStatusBar()),actionCollection(),"show_statusbar"); + (void)new KAction(i18n("Show &Toolbar"), 0, this,TQT_SLOT(slotViewToolBar()),actionCollection(),"show_toolbar"); + (void)new KAction(i18n("Show &Statusbar"), 0, this,TQT_SLOT(slotViewStatusBar()),actionCollection(),"show_statusbar"); } @@ -149,26 +149,26 @@ void KTApp::initStatusBar() void KTApp::saveOptions() { - config->setGroup(QString("General Options")); - config->writeEntry(QString("Geometry"), size()); - config->writeEntry(QString("Show Toolbar"), toolBar()->isVisible()); - config->writeEntry(QString("Show Statusbar"), statusBar()->isVisible()); - config->writeEntry(QString("ToolBarPos"), (int)toolBar()->barPos()); + config->setGroup(TQString("General Options")); + config->writeEntry(TQString("Geometry"), size()); + config->writeEntry(TQString("Show Toolbar"), toolBar()->isVisible()); + config->writeEntry(TQString("Show Statusbar"), statusBar()->isVisible()); + config->writeEntry(TQString("ToolBarPos"), (int)toolBar()->barPos()); } void KTApp::readOptions() { - config->setGroup(QString("General Options")); + config->setGroup(TQString("General Options")); KPopupMenu *settingsMenu = static_cast(guiFactory()->container("settings", this)); // bar status settings - bool bViewToolbar = config->readBoolEntry(QString("Show Toolbar"), true); + bool bViewToolbar = config->readBoolEntry(TQString("Show Toolbar"), true); settingsMenu->setItemChecked(settingsMenu->idAt(0),bViewToolbar); if (!bViewToolbar) toolBar()->hide(); - bool bViewStatusbar = config->readBoolEntry(QString("Show Statusbar"), true); + bool bViewStatusbar = config->readBoolEntry(TQString("Show Statusbar"), true); settingsMenu->setItemChecked(settingsMenu->idAt(1),bViewStatusbar); if (!bViewStatusbar) statusBar()->hide(); @@ -176,12 +176,12 @@ void KTApp::readOptions() // bar position settings KToolBar::BarPosition tool_bar_pos; tool_bar_pos=(KToolBar::BarPosition) - config->readNumEntry(QString("ToolBarPos"), + config->readNumEntry(TQString("ToolBarPos"), KToolBar::Top); toolBar()->setBarPos(tool_bar_pos); - QSize size=config->readSizeEntry(QString("Geometry")); + TQSize size=config->readSizeEntry(TQString("Geometry")); // Minimum size is 350 by 250 @@ -212,7 +212,7 @@ bool KTApp::queryClose() int retVal = KMessageBox::warningYesNoCancel(win, i18n("Scheduled tasks have been modified.\nDo you want to save changes?"), - QString::null, + TQString::null, KStdGuiItem::save(), KStdGuiItem::discard() ); @@ -274,7 +274,7 @@ void KTApp::slotFileQuit() close(); } -void KTApp::slotEdit(const QPoint& qp) +void KTApp::slotEdit(const TQPoint& qp) { KPopupMenu *editMenu = static_cast(guiFactory()->container("edit", this)); editMenu->exec(qp, 0); @@ -374,14 +374,14 @@ void KTApp::slotViewStatusBar() slotStatusMsg(i18n("Ready.")); } -void KTApp::slotStatusMsg(const QString & text) +void KTApp::slotStatusMsg(const TQString & text) { statusBar()->clear(); statusBar()->changeItem(text, statusMessage); setCaption(i18n("Task Scheduler"), cthost->dirty()); } -void KTApp::slotStatusHelpMsg(const QString & text) +void KTApp::slotStatusHelpMsg(const TQString & text) { statusBar()->message(text, 2000); } diff --git a/kcron/ktapp.h b/kcron/ktapp.h index c42ad06..37a830b 100644 --- a/kcron/ktapp.h +++ b/kcron/ktapp.h @@ -125,7 +125,7 @@ public slots: /** * Pop up an edit menu. */ - void slotEdit(const QPoint& qp); + void slotEdit(const TQPoint& qp); /** * Put the marked objects on the clipboard and remove it from the @@ -182,7 +182,7 @@ public slots: * Changes the status bar contents for the standard label permanently; * used to indicate current actions. */ - void slotStatusMsg(const QString & text); + void slotStatusMsg(const TQString & text); /** * Changes the status message of the whole status bar for two seconds, @@ -190,7 +190,7 @@ public slots: * messages that give information about actions for toolbar icons and * menu entries. */ - void slotStatusHelpMsg(const QString & text); + void slotStatusHelpMsg(const TQString & text); /** Enables/disables modification buttons */ @@ -223,7 +223,7 @@ private: /** * Get application caption. */ - QString caption(); + TQString caption(); /** * Initialize actions. diff --git a/kcron/kticon.cpp b/kcron/kticon.cpp index eff9f3e..ef6b861 100644 --- a/kcron/kticon.cpp +++ b/kcron/kticon.cpp @@ -11,22 +11,22 @@ #include "kticon.h" -#include +#include #include #include -QPixmap KTIcon::getMiniIcon(const QString& name) +TQPixmap KTIcon::getMiniIcon(const TQString& name) { return SmallIcon(name); } -QPixmap KTIcon::getIcon(const QString& name) +TQPixmap KTIcon::getIcon(const TQString& name) { return BarIcon(name); } -QPixmap KTIcon::application(bool mini) +TQPixmap KTIcon::application(bool mini) { if (mini) return getMiniIcon("kcron"); @@ -34,7 +34,7 @@ QPixmap KTIcon::application(bool mini) return getIcon("kcron"); } -QPixmap KTIcon::system(bool mini) +TQPixmap KTIcon::system(bool mini) { if (mini) return getMiniIcon("openterm"); @@ -42,7 +42,7 @@ QPixmap KTIcon::system(bool mini) return getIcon("openterm"); } -QPixmap KTIcon::user(bool mini) +TQPixmap KTIcon::user(bool mini) { if (mini) return getMiniIcon("kuser"); @@ -50,7 +50,7 @@ QPixmap KTIcon::user(bool mini) return getIcon("kuser"); } -QPixmap KTIcon::variables(bool mini) +TQPixmap KTIcon::variables(bool mini) { if (mini) return getMiniIcon("folder"); @@ -58,7 +58,7 @@ QPixmap KTIcon::variables(bool mini) return getIcon("folder"); } -QPixmap KTIcon::variable(bool mini) +TQPixmap KTIcon::variable(bool mini) { if (mini) return getMiniIcon("mime_empty"); @@ -66,7 +66,7 @@ QPixmap KTIcon::variable(bool mini) return getIcon("mime_empty"); } -QPixmap KTIcon::mail(bool mini) +TQPixmap KTIcon::mail(bool mini) { if (mini) return getMiniIcon("mail_generic"); @@ -74,7 +74,7 @@ QPixmap KTIcon::mail(bool mini) return getIcon("mail_generic"); } -QPixmap KTIcon::shell(bool mini) +TQPixmap KTIcon::shell(bool mini) { if (mini) return getMiniIcon("openterm"); @@ -82,7 +82,7 @@ QPixmap KTIcon::shell(bool mini) return getIcon("openterm"); } -QPixmap KTIcon::home(bool mini) +TQPixmap KTIcon::home(bool mini) { if (mini) return getMiniIcon("gohome"); @@ -90,7 +90,7 @@ QPixmap KTIcon::home(bool mini) return getIcon("gohome"); } -QPixmap KTIcon::path(bool mini) +TQPixmap KTIcon::path(bool mini) { if (mini) return getMiniIcon("folder"); @@ -98,7 +98,7 @@ QPixmap KTIcon::path(bool mini) return getIcon("folder"); } -QPixmap KTIcon::tasks(bool mini) +TQPixmap KTIcon::tasks(bool mini) { if (mini) return getMiniIcon("folder"); @@ -106,7 +106,7 @@ QPixmap KTIcon::tasks(bool mini) return getIcon("folder"); } -QPixmap KTIcon::task(bool mini) +TQPixmap KTIcon::task(bool mini) { if (mini) return getMiniIcon("gear"); diff --git a/kcron/kticon.h b/kcron/kticon.h index 013f726..15a8a91 100644 --- a/kcron/kticon.h +++ b/kcron/kticon.h @@ -12,8 +12,8 @@ #ifndef KTICON_H #define KTICON_H -#include -#include +#include +#include /** * Wraps all icons used by the application. @@ -24,19 +24,19 @@ class KTIcon public: - static QPixmap getMiniIcon(const QString& name); - static QPixmap getIcon(const QString& name); - static QPixmap application(bool mini); - static QPixmap system(bool mini); - static QPixmap user(bool mini); - static QPixmap variables(bool mini); - static QPixmap variable(bool mini); - static QPixmap mail(bool mini); - static QPixmap shell(bool mini); - static QPixmap home(bool mini); - static QPixmap path(bool mini); - static QPixmap tasks(bool mini); - static QPixmap task(bool mini); + static TQPixmap getMiniIcon(const TQString& name); + static TQPixmap getIcon(const TQString& name); + static TQPixmap application(bool mini); + static TQPixmap system(bool mini); + static TQPixmap user(bool mini); + static TQPixmap variables(bool mini); + static TQPixmap variable(bool mini); + static TQPixmap mail(bool mini); + static TQPixmap shell(bool mini); + static TQPixmap home(bool mini); + static TQPixmap path(bool mini); + static TQPixmap tasks(bool mini); + static TQPixmap task(bool mini); }; diff --git a/kcron/ktlistcron.cpp b/kcron/ktlistcron.cpp index e2535bb..05dadb3 100644 --- a/kcron/ktlistcron.cpp +++ b/kcron/ktlistcron.cpp @@ -11,7 +11,7 @@ #include "ktlistcron.h" -#include +#include #include #include "ctcron.h" @@ -26,14 +26,14 @@ KTListCron::KTListCron(KTListItem* parent, const char* name, refresh(); } -KTListCron::KTListCron(QListView* parent, const char* name, +KTListCron::KTListCron(TQListView* parent, const char* name, CTCron* _ctcron) : KTListItem(parent, name, _ctcron) { refresh(); } -KTListCron::KTListCron(QListView* parent, CTCron* _ctcron) : +KTListCron::KTListCron(TQListView* parent, CTCron* _ctcron) : KTListItem(parent, (const char*)0, _ctcron) { refresh(); @@ -44,21 +44,21 @@ void KTListCron::refresh() setPixmap(0, getCTCron()->login.c_str() == (i18n("(System Crontab)")) ? KTIcon::system(true) : KTIcon::user(true)); - QString userName = QString::fromLocal8Bit(getCTCron()->login.c_str()); + TQString userName = TQString::fromLocal8Bit(getCTCron()->login.c_str()); if (getCTCron()->login != getCTCron()->name) { - userName += QString(" ("); - userName += QString::fromLocal8Bit(getCTCron()->name.c_str()); - userName += QString(")"); + userName += TQString(" ("); + userName += TQString::fromLocal8Bit(getCTCron()->name.c_str()); + userName += TQString(")"); } setText(0, userName); } void KTListCron::print (KTPrint& printer) const { - QString userInfo; - userInfo = QString::fromLocal8Bit(getCTCron()->name.c_str()); + TQString userInfo; + userInfo = TQString::fromLocal8Bit(getCTCron()->name.c_str()); KTListItem* ktli = (KTListItem*)this->firstChild(); Q_CHECK_PTR(ktli); diff --git a/kcron/ktlistcron.h b/kcron/ktlistcron.h index 9fe5fe2..713a375 100644 --- a/kcron/ktlistcron.h +++ b/kcron/ktlistcron.h @@ -19,7 +19,7 @@ #include "ktlistitem.h" /** - * QListViewItem view of a CTCron. + * TQListViewItem view of a CTCron. */ class KTListCron : public KTListItem { @@ -33,12 +33,12 @@ public: /** * Construct tasks or variables folder from root. */ - KTListCron(QListView* parent, const char* name, CTCron* _ctcron); + KTListCron(TQListView* parent, const char* name, CTCron* _ctcron); /** * Construct user folder from root. */ - KTListCron(QListView* parent, CTCron* _ctcron); + KTListCron(TQListView* parent, CTCron* _ctcron); /** * Refresh. diff --git a/kcron/ktlistitem.cpp b/kcron/ktlistitem.cpp index 02cd163..ef2ad0e 100644 --- a/kcron/ktlistitem.cpp +++ b/kcron/ktlistitem.cpp @@ -15,13 +15,13 @@ #include "ctcron.h" KTListItem::KTListItem(KTListItem* parent, const char* name, CTCron* _ctcron) : - QListViewItem(parent, name), + TQListViewItem(parent, name), ctcron(_ctcron) { } -KTListItem::KTListItem(QListView* parent, const char* name, CTCron* _ctcron) : - QListViewItem(parent, name), +KTListItem::KTListItem(TQListView* parent, const char* name, CTCron* _ctcron) : + TQListViewItem(parent, name), ctcron(_ctcron) { } diff --git a/kcron/ktlistitem.h b/kcron/ktlistitem.h index 6d10974..718fb79 100644 --- a/kcron/ktlistitem.h +++ b/kcron/ktlistitem.h @@ -16,13 +16,13 @@ #include #endif -#include +#include class KTPrint; class CTCron; /** - * An enhanced QListViewItem that ensures all list view items have the + * An enhanced TQListViewItem that ensures all list view items have the * same interface. */ class KTListItem : public QListViewItem @@ -37,7 +37,7 @@ public: /** * Construct a non-root list view item from a CTCron. */ - KTListItem(QListView* parent, const char* name, CTCron* _ctcron); + KTListItem(TQListView* parent, const char* name, CTCron* _ctcron); /** * Destructor. diff --git a/kcron/ktlisttask.cpp b/kcron/ktlisttask.cpp index b496b77..17a1378 100644 --- a/kcron/ktlisttask.cpp +++ b/kcron/ktlisttask.cpp @@ -30,12 +30,12 @@ KTListTask::KTListTask(KTListItem* parent, void KTListTask::refresh() { - setText(0, QString::fromLocal8Bit(cttask->comment.c_str())); + setText(0, TQString::fromLocal8Bit(cttask->comment.c_str())); if (cttask->enabled) { - setText(1, QString::fromLocal8Bit(cttask->command.c_str())); - setText(2, QString::fromLocal8Bit(cttask->describe().c_str())); + setText(1, TQString::fromLocal8Bit(cttask->command.c_str())); + setText(2, TQString::fromLocal8Bit(cttask->describe().c_str())); } else { @@ -48,10 +48,10 @@ void KTListTask::refresh() void KTListTask::print (KTPrint &printer) const { - printer.print(QString::fromLocal8Bit(cttask->comment.c_str()), 1, KTPrint::alignTextLeft); + printer.print(TQString::fromLocal8Bit(cttask->comment.c_str()), 1, KTPrint::alignTextLeft); if (cttask->enabled) { - printer.print(QString::fromLocal8Bit(cttask->command.c_str()),2, KTPrint::alignTextCenter); - printer.print(QString::fromLocal8Bit(cttask->describe().c_str()),3, KTPrint::alignTextRight); + printer.print(TQString::fromLocal8Bit(cttask->command.c_str()),2, KTPrint::alignTextCenter); + printer.print(TQString::fromLocal8Bit(cttask->describe().c_str()),3, KTPrint::alignTextRight); } else printer.print(i18n("Disabled."), 3, KTPrint::alignTextRight); diff --git a/kcron/ktlisttask.h b/kcron/ktlisttask.h index bd8054e..3384745 100644 --- a/kcron/ktlisttask.h +++ b/kcron/ktlisttask.h @@ -21,7 +21,7 @@ class CTTask; /** - * QListViewItem with a CTTask. + * TQListViewItem with a CTTask. */ class KTListTask : public KTListItem { diff --git a/kcron/ktlisttasks.cpp b/kcron/ktlisttasks.cpp index e1fc19b..95c7779 100644 --- a/kcron/ktlisttasks.cpp +++ b/kcron/ktlisttasks.cpp @@ -11,7 +11,7 @@ #include "ktlisttasks.h" -#include +#include #include // i18n() #include @@ -30,13 +30,13 @@ KTListTasks::KTListTasks(KTListItem* parent, CTCron* _ctcron) : refresh(); } -KTListTasks::KTListTasks(QListView* parent, CTCron* _ctcron) : +KTListTasks::KTListTasks(TQListView* parent, CTCron* _ctcron) : KTListItem(parent, 0, _ctcron) { refresh(); } -QString KTListTasks::getDescription() +TQString KTListTasks::getDescription() { return i18n("Tasks"); } @@ -66,11 +66,11 @@ void KTListTasks::refresh() void KTListTasks::print (KTPrint& printer) const { - QFont stnd; + TQFont stnd; stnd = printer.getFont(); - printer.setFont(QFont( KGlobalSettings::generalFont().family(), 10, QFont::Bold )); + printer.setFont(TQFont( KGlobalSettings::generalFont().family(), 10, TQFont::Bold )); printer.print (i18n("Task name:"), 1, KTPrint::alignTextLeft); printer.print (i18n("Program:"), 2, KTPrint::alignTextCenter); printer.print (i18n("Description:"),3,KTPrint::alignTextRight); diff --git a/kcron/ktlisttasks.h b/kcron/ktlisttasks.h index 075edde..6d3ec3b 100644 --- a/kcron/ktlisttasks.h +++ b/kcron/ktlisttasks.h @@ -21,7 +21,7 @@ class QString; /** - * QListViewItem of a "tasks" folder. + * TQListViewItem of a "tasks" folder. */ class KTListTasks : public KTListItem { @@ -35,12 +35,12 @@ public: /** * Construct tasks folder from root. */ - KTListTasks(QListView* parent, CTCron* _ctcron); + KTListTasks(TQListView* parent, CTCron* _ctcron); /** * Internationalized description. */ - static QString getDescription(); + static TQString getDescription(); /** * Create. diff --git a/kcron/ktlistvar.cpp b/kcron/ktlistvar.cpp index 1157683..e6c4f6a 100644 --- a/kcron/ktlistvar.cpp +++ b/kcron/ktlistvar.cpp @@ -30,12 +30,12 @@ KTListVar::KTListVar(KTListItem* parent, CTCron* _ctcron, void KTListVar::refresh() { - setText (0,QString::fromLocal8Bit(ctvar->variable.c_str())); + setText (0,TQString::fromLocal8Bit(ctvar->variable.c_str())); if (ctvar->enabled) { - setText (1,QString::fromLocal8Bit(ctvar->value.c_str())); - setText (2,QString::fromLocal8Bit(ctvar->comment.c_str())); + setText (1,TQString::fromLocal8Bit(ctvar->value.c_str())); + setText (2,TQString::fromLocal8Bit(ctvar->comment.c_str())); } else { @@ -57,10 +57,10 @@ void KTListVar::refresh() void KTListVar::print(KTPrint& printer) const { - printer.print(QString::fromLocal8Bit(ctvar->variable.c_str()), 1, KTPrint::alignTextLeft); + printer.print(TQString::fromLocal8Bit(ctvar->variable.c_str()), 1, KTPrint::alignTextLeft); if (ctvar->enabled) { - printer.print(QString::fromLocal8Bit(ctvar->value.c_str()),2, KTPrint::alignTextCenter); - printer.print(QString::fromLocal8Bit(ctvar->comment.c_str()),3,KTPrint::alignTextRight); + printer.print(TQString::fromLocal8Bit(ctvar->value.c_str()),2, KTPrint::alignTextCenter); + printer.print(TQString::fromLocal8Bit(ctvar->comment.c_str()),3,KTPrint::alignTextRight); } else printer.print(i18n("Disabled."),3, KTPrint::alignTextRight); diff --git a/kcron/ktlistvar.h b/kcron/ktlistvar.h index c5880a4..0d4e7f0 100644 --- a/kcron/ktlistvar.h +++ b/kcron/ktlistvar.h @@ -21,7 +21,7 @@ class CTVariable; /** - * QListViewItem with a CTVariable. + * TQListViewItem with a CTVariable. */ class KTListVar : public KTListItem { diff --git a/kcron/ktlistvars.cpp b/kcron/ktlistvars.cpp index 6bdde2d..64d43a1 100644 --- a/kcron/ktlistvars.cpp +++ b/kcron/ktlistvars.cpp @@ -12,7 +12,7 @@ #include "ktlistvars.h" -#include +#include #include // i18n() #include @@ -31,7 +31,7 @@ KTListVars::KTListVars(KTListItem* parent, CTCron* _ctcron) : refresh(); } -KTListVars::KTListVars(QListView* parent, CTCron* _ctcron) : +KTListVars::KTListVars(TQListView* parent, CTCron* _ctcron) : KTListItem(parent, 0, _ctcron) { refresh(); @@ -62,10 +62,10 @@ void KTListVars::refresh() void KTListVars::print(KTPrint& printer) const { - QFont stnd; + TQFont stnd; stnd = printer.getFont() ; - printer.setFont(QFont( KGlobalSettings::generalFont().family(), 10, QFont::Bold )); + printer.setFont(TQFont( KGlobalSettings::generalFont().family(), 10, TQFont::Bold )); printer.print(i18n("Variable:"), 1, KTPrint::alignTextLeft); printer.print(i18n("Value:"), 2, KTPrint::alignTextCenter); @@ -93,7 +93,7 @@ void KTListVars::print(KTPrint& printer) const printer.levelColumns(20); } -QString KTListVars::getDescription() +TQString KTListVars::getDescription() { return i18n("Variables"); } diff --git a/kcron/ktlistvars.h b/kcron/ktlistvars.h index b338082..91a145a 100644 --- a/kcron/ktlistvars.h +++ b/kcron/ktlistvars.h @@ -22,7 +22,7 @@ class QString; /** - * QListViewItem of a "variables" folder. + * TQListViewItem of a "variables" folder. */ class KTListVars : public KTListItem { @@ -36,12 +36,12 @@ public: /** * Construct variables folder from root. */ - KTListVars(QListView* parent, CTCron* _ctcron); + KTListVars(TQListView* parent, CTCron* _ctcron); /** * Internationalized description. */ - static QString getDescription(); + static TQString getDescription(); /** * Refresh. diff --git a/kcron/ktprint.cpp b/kcron/ktprint.cpp index 423b6a1..b1de5c6 100644 --- a/kcron/ktprint.cpp +++ b/kcron/ktprint.cpp @@ -11,9 +11,9 @@ * (at your option) any later version. * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include @@ -80,12 +80,12 @@ bool KTPrint:: start () if (prnt->setup(0L, i18n("Print Cron Tab"))) { //Setup a printer if (paint!=NULL) delete paint; - paint = new QPainter (); + paint = new TQPainter (); paint->begin(prnt); paint->setTabStops(20); // Setup a defualt tab stop size //Get the information about the page size - QPaintDeviceMetrics metrics (prnt); + TQPaintDeviceMetrics metrics (prnt); width = metrics.width () - (leftMargin + rightMargin); height = metrics.height () - (topMargin + bottomMargin); return true; @@ -94,17 +94,17 @@ bool KTPrint:: start () return false; } -void KTPrint :: setFont (const QFont &font) +void KTPrint :: setFont (const TQFont &font) { paint->setFont(font); } -QFont KTPrint :: getFont () const +TQFont KTPrint :: getFont () const { return paint->font(); } -void KTPrint :: print (const QString &str, int col, int alignment, bool wordWrap) +void KTPrint :: print (const TQString &str, int col, int alignment, bool wordWrap) { //Prints the string str into the column col using //the remaining arguments as format flags @@ -132,7 +132,7 @@ void KTPrint :: print (const QString &str, int col, int alignment, bool wordWrap //Whats left of the page int remainder (height - columns[col-1]->height); - QRect rect=paint->boundingRect(columns[col-1]->start,columns[col-1]->height, columns[col-1]->width(), remainder,format, str); + TQRect rect=paint->boundingRect(columns[col-1]->start,columns[col-1]->height, columns[col-1]->width(), remainder,format, str); if (rect.height() <= remainder) { diff --git a/kcron/ktprint.h b/kcron/ktprint.h index da22ff3..c5351e1 100644 --- a/kcron/ktprint.h +++ b/kcron/ktprint.h @@ -77,17 +77,17 @@ public: /** * Set the font to be used */ - void setFont (const QFont &font); + void setFont (const TQFont &font); /** * Get the current font */ - QFont getFont ()const; + TQFont getFont ()const; /** * Print text */ - void print (const QString &str, int col =1, int alignment=KTPrint::defaultLeftMargin, bool wordWrap = true); + void print (const TQString &str, int col =1, int alignment=KTPrint::defaultLeftMargin, bool wordWrap = true); /** * Constructs the columns @@ -165,7 +165,7 @@ private: /** * Pointer to a painter object */ - QPainter *paint; + TQPainter *paint; /** * Whether we are root or not diff --git a/kcron/ktprintopt.cpp b/kcron/ktprintopt.cpp index 68315c5..f609869 100644 --- a/kcron/ktprintopt.cpp +++ b/kcron/ktprintopt.cpp @@ -11,8 +11,8 @@ * (at your option) any later version. * ***************************************************************************/ -#include -#include +#include +#include #include #include @@ -25,12 +25,12 @@ KTPrintOpt::KTPrintOpt(bool root) : { m_title = i18n("Cron Options"); - QVBoxLayout *main_ = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + TQVBoxLayout *main_ = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); - chkPrintCrontab = new QCheckBox(i18n("Print cron&tab"), this, "chkPrintCrontab"); + chkPrintCrontab = new TQCheckBox(i18n("Print cron&tab"), this, "chkPrintCrontab"); main_->addWidget(chkPrintCrontab); - chkPrintAllUsers = new QCheckBox(i18n("Print &all users"), this, "chkPrintAllUsers"); + chkPrintAllUsers = new TQCheckBox(i18n("Print &all users"), this, "chkPrintAllUsers"); main_->addWidget(chkPrintAllUsers); if (!root) { @@ -44,9 +44,9 @@ KTPrintOpt::~KTPrintOpt() } void -KTPrintOpt::setOptions(const QMap& opts) +KTPrintOpt::setOptions(const TQMap& opts) { - QString value; + TQString value; value = opts["crontab"]; chkPrintCrontab->setChecked(value == "true"); @@ -58,7 +58,7 @@ KTPrintOpt::setOptions(const QMap& opts) } } -void KTPrintOpt::getOptions(QMap& opts, bool) +void KTPrintOpt::getOptions(TQMap& opts, bool) { opts["crontab"] = chkPrintCrontab->isChecked() ? "true" : "false"; opts["allusers"] = chkPrintAllUsers->isChecked() ? "true" : "false"; diff --git a/kcron/ktprintopt.h b/kcron/ktprintopt.h index 0ab1810..8523432 100644 --- a/kcron/ktprintopt.h +++ b/kcron/ktprintopt.h @@ -40,13 +40,13 @@ public: ~KTPrintOpt(); - void setOptions(const QMap& options); - void getOptions(QMap& options, bool incldef = false); + void setOptions(const TQMap& options); + void getOptions(TQMap& options, bool incldef = false); private: - QCheckBox* chkPrintCrontab; - QCheckBox* chkPrintAllUsers; + TQCheckBox* chkPrintCrontab; + TQCheckBox* chkPrintAllUsers; }; #endif diff --git a/kcron/kttask.cpp b/kcron/kttask.cpp index 500cab4..88e5567 100644 --- a/kcron/kttask.cpp +++ b/kcron/kttask.cpp @@ -11,15 +11,15 @@ #include "kttask.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -36,37 +36,37 @@ class KTPushButton : public QPushButton { public: - KTPushButton(QWidget * parent, const char * name = 0 ) - : QPushButton(parent, name), isSelected(false), isDirty(false) + KTPushButton(TQWidget * parent, const char * name = 0 ) + : TQPushButton(parent, name), isSelected(false), isDirty(false) { updatePalette(); } void updatePalette() { - palNormal = ((QWidget *)parent())->palette(); + palNormal = ((TQWidget *)parent())->palette(); palSelected = palNormal; - for(int cg = (int) QPalette::Disabled; cg < (int) QPalette::NColorGroups; cg++) + for(int cg = (int) TQPalette::Disabled; cg < (int) TQPalette::NColorGroups; cg++) { - palSelected.setColor((QPalette::ColorGroup)cg, QColorGroup::Button, - palSelected.color((QPalette::ColorGroup)cg, QColorGroup::Highlight)); - palSelected.setColor((QPalette::ColorGroup)cg, QColorGroup::ButtonText, - palSelected.color((QPalette::ColorGroup)cg, QColorGroup::HighlightedText)); + palSelected.setColor((TQPalette::ColorGroup)cg, TQColorGroup::Button, + palSelected.color((TQPalette::ColorGroup)cg, TQColorGroup::Highlight)); + palSelected.setColor((TQPalette::ColorGroup)cg, TQColorGroup::ButtonText, + palSelected.color((TQPalette::ColorGroup)cg, TQColorGroup::HighlightedText)); } isDirty = true; } - bool event( QEvent *e) + bool event( TQEvent *e) { - if (e->type() == QEvent::ParentPaletteChange) + if (e->type() == TQEvent::ParentPaletteChange) { updatePalette(); update(); } - return QPushButton::event(e); + return TQPushButton::event(e); } - void drawButton ( QPainter *p ) + void drawButton ( TQPainter *p ) { if (isDirty || (isOn() != isSelected)) // Prevent infinite recursion { @@ -77,48 +77,48 @@ public: else setPalette(palNormal); } - QPushButton::drawButton(p); + TQPushButton::drawButton(p); } - void drawButtonLabel ( QPainter *p ) + void drawButtonLabel ( TQPainter *p ) { p->save(); if (isOn()) { - QFont f = p->font(); + TQFont f = p->font(); f.setUnderline(true); p->setFont(f); } - QPushButton::drawButtonLabel(p); + TQPushButton::drawButtonLabel(p); p->restore(); } bool isSelected; bool isDirty; - QPalette palSelected; - QPalette palNormal; + TQPalette palSelected; + TQPalette palNormal; }; -KTTask::KTTask(CTTask* _cttask, const QString & _caption) +KTTask::KTTask(CTTask* _cttask, const TQString & _caption) :KDialog( 0, "kttask", true, WStyle_DialogBorder ) { cttask = _cttask; bool everyDay(true); - QVBoxLayout *ml = new QVBoxLayout( this, KDialogBase::spacingHint() ); + TQVBoxLayout *ml = new TQVBoxLayout( this, KDialogBase::spacingHint() ); - QHBoxLayout *h1 = new QHBoxLayout( ml, KDialogBase::spacingHint() ); + TQHBoxLayout *h1 = new TQHBoxLayout( ml, KDialogBase::spacingHint() ); // user - labUser = new QLabel( i18n("&Run as:"), this, "labUser" ); + labUser = new TQLabel( i18n("&Run as:"), this, "labUser" ); h1->addWidget( labUser ); - leUser = new QLineEdit( this, "leUser"); + leUser = new TQLineEdit( this, "leUser"); labUser->setBuddy(leUser); h1->addWidget( leUser ); if (cttask->system()) { - leUser->setText(QString::fromLocal8Bit(cttask->user.c_str())); + leUser->setText(TQString::fromLocal8Bit(cttask->user.c_str())); } else { @@ -127,92 +127,92 @@ KTTask::KTTask(CTTask* _cttask, const QString & _caption) } // icon - labIcon = new QLabel(this, "labIcon"); + labIcon = new TQLabel(this, "labIcon"); labIcon->setFixedSize(32, 32); h1->addStretch( 1 ); h1->addWidget( labIcon ); // comment - QHBoxLayout *h2 = new QHBoxLayout( ml, KDialogBase::spacingHint() ); + TQHBoxLayout *h2 = new TQHBoxLayout( ml, KDialogBase::spacingHint() ); - labComment = new QLabel( i18n("&Comment:"), this, "labComment" ); + labComment = new TQLabel( i18n("&Comment:"), this, "labComment" ); h2->addWidget( labComment ); - leComment = new QLineEdit(this, "leComment"); + leComment = new TQLineEdit(this, "leComment"); labComment->setBuddy(leComment); h2->addWidget( leComment ); - leComment->setText(QString::fromLocal8Bit(cttask->comment.c_str())); + leComment->setText(TQString::fromLocal8Bit(cttask->comment.c_str())); // command - QHBoxLayout *h3 = new QHBoxLayout( ml, KDialogBase::spacingHint() ); + TQHBoxLayout *h3 = new TQHBoxLayout( ml, KDialogBase::spacingHint() ); - labCommand = new QLabel( i18n("&Program:"), this, "labCommand" ); + labCommand = new TQLabel( i18n("&Program:"), this, "labCommand" ); h3->addWidget( labCommand ); - leCommand = new QLineEdit(this, "leCommand"); + leCommand = new TQLineEdit(this, "leCommand"); labCommand->setBuddy(leCommand); h3->addWidget( leCommand ); - leCommand->setText(QString::fromLocal8Bit(cttask->command.c_str())); + leCommand->setText(TQString::fromLocal8Bit(cttask->command.c_str())); labComment->setFixedWidth( QMAX( labComment->width(), labCommand->width()) ); labCommand->setFixedWidth( QMAX( labComment->width(), labCommand->width()) ); slotCommandChanged(); - pbBrowse = new QPushButton(this, "pbBrowse"); + pbBrowse = new TQPushButton(this, "pbBrowse"); pbBrowse->setText(i18n("&Browse...")); h3->addWidget( pbBrowse ); - QHBoxLayout *h3a = new QHBoxLayout( ml, KDialogBase::spacingHint() ); + TQHBoxLayout *h3a = new TQHBoxLayout( ml, KDialogBase::spacingHint() ); // enabled - chkEnabled = new QCheckBox(i18n("&Enabled"), this, "chkEnabled"); + chkEnabled = new TQCheckBox(i18n("&Enabled"), this, "chkEnabled"); chkEnabled->setChecked(cttask->enabled); h3a->addWidget( chkEnabled ); - QHBoxLayout *h4 = new QHBoxLayout( ml, KDialogBase::spacingHint() ); + TQHBoxLayout *h4 = new TQHBoxLayout( ml, KDialogBase::spacingHint() ); ml->addSpacing( 2 * KDialogBase::spacingHint() ); // months - bgMonth = new QButtonGroup( i18n("Months"), this, "bgMonth"); + bgMonth = new TQButtonGroup( i18n("Months"), this, "bgMonth"); h4->addWidget( bgMonth ); - QVBoxLayout *vmonths = new QVBoxLayout( bgMonth, KDialogBase::spacingHint() ); + TQVBoxLayout *vmonths = new TQVBoxLayout( bgMonth, KDialogBase::spacingHint() ); vmonths->addSpacing( 2 * KDialogBase::spacingHint() ); for (int mo = 1; mo <= 12; mo++) { - cbMonth[mo] = new QCheckBox(bgMonth, "cbMonth"); - cbMonth[mo]->setText(QString::fromLocal8Bit(cttask->month.getName(mo).c_str())); + cbMonth[mo] = new TQCheckBox(bgMonth, "cbMonth"); + cbMonth[mo]->setText(TQString::fromLocal8Bit(cttask->month.getName(mo).c_str())); cbMonth[mo]->setChecked(cttask->month.get(mo)); vmonths->addWidget( cbMonth[mo], AlignLeft ); if (!cttask->month.get(mo)) everyDay = false; } - pbAllMonths = new QPushButton(bgMonth, "pbAllMonths"); + pbAllMonths = new TQPushButton(bgMonth, "pbAllMonths"); pbAllMonths->setText( i18n("Set All") ); vmonths->addWidget( pbAllMonths, AlignLeft ); - QVBoxLayout *v1 = new QVBoxLayout( h4, KDialogBase::spacingHint() ); + TQVBoxLayout *v1 = new TQVBoxLayout( h4, KDialogBase::spacingHint() ); // days of the month - bgDayOfMonth = new QButtonGroup( i18n("Days of Month"), this, "bgDayOfMonth"); + bgDayOfMonth = new TQButtonGroup( i18n("Days of Month"), this, "bgDayOfMonth"); v1->addWidget( bgDayOfMonth ); - QPushButton* day; - QString tmp; + TQPushButton* day; + TQString tmp; - QVBoxLayout *vdays = new QVBoxLayout( bgDayOfMonth, KDialogBase::spacingHint() ); + TQVBoxLayout *vdays = new TQVBoxLayout( bgDayOfMonth, KDialogBase::spacingHint() ); vdays->addSpacing( 2 * KDialogBase::spacingHint() ); - QHBoxLayout *hdays = 0; + TQHBoxLayout *hdays = 0; for (int dm = 1; dm <= 31; dm++) { if( (dm % 7) == 1 ) - hdays = new QHBoxLayout( vdays, KDialogBase::spacingHint() ); + hdays = new TQHBoxLayout( vdays, KDialogBase::spacingHint() ); day = new KTPushButton(bgDayOfMonth); day->setFixedSize(25, 25); @@ -225,50 +225,50 @@ KTTask::KTTask(CTTask* _cttask, const QString & _caption) hdays->addWidget( day, AlignLeft ); } hdays->addStretch( 1 ); - pbAllDaysOfMonth = new QPushButton(bgDayOfMonth, "pbAllDaysOfMonth"); + pbAllDaysOfMonth = new TQPushButton(bgDayOfMonth, "pbAllDaysOfMonth"); pbAllDaysOfMonth->setText( i18n("Set All") ); hdays->addWidget( pbAllDaysOfMonth, AlignLeft ); // days of the week - bgDayOfWeek = new QButtonGroup( i18n("Days of Week"), this, "bgDayOfWeek"); + bgDayOfWeek = new TQButtonGroup( i18n("Days of Week"), this, "bgDayOfWeek"); v1->addWidget( bgDayOfWeek ); - QVBoxLayout *v3 = new QVBoxLayout( bgDayOfWeek, KDialogBase::spacingHint() ); + TQVBoxLayout *v3 = new TQVBoxLayout( bgDayOfWeek, KDialogBase::spacingHint() ); v3->addSpacing( 2 * KDialogBase::spacingHint() ); for (int dw = 1; dw <= 7; dw++) { - cbDayOfWeek[dw] = new QCheckBox(bgDayOfWeek); - cbDayOfWeek[dw]->setText(QString::fromLocal8Bit(cttask->dayOfWeek.getName(dw).c_str())); + cbDayOfWeek[dw] = new TQCheckBox(bgDayOfWeek); + cbDayOfWeek[dw]->setText(TQString::fromLocal8Bit(cttask->dayOfWeek.getName(dw).c_str())); cbDayOfWeek[dw]->setChecked(cttask->dayOfWeek.get(dw)); v3->addWidget( cbDayOfWeek[dw] ); if (!cttask->dayOfWeek.get(dw)) everyDay = false; } - pbAllDaysOfWeek = new QPushButton(bgDayOfWeek, "pbAllDaysOfWeek"); + pbAllDaysOfWeek = new TQPushButton(bgDayOfWeek, "pbAllDaysOfWeek"); pbAllDaysOfWeek->setText( i18n("Set All") ); v3->addWidget( pbAllDaysOfWeek, AlignLeft ); - QVBoxLayout *v2 = new QVBoxLayout( h4, KDialogBase::spacingHint() ); + TQVBoxLayout *v2 = new TQVBoxLayout( h4, KDialogBase::spacingHint() ); // daily - bgEveryDay = new QButtonGroup( i18n("Daily"), this, "bgEveryDay"); + bgEveryDay = new TQButtonGroup( i18n("Daily"), this, "bgEveryDay"); v2->addWidget( bgEveryDay ); - QVBoxLayout *v9 = new QVBoxLayout( bgEveryDay, KDialogBase::spacingHint() ); + TQVBoxLayout *v9 = new TQVBoxLayout( bgEveryDay, KDialogBase::spacingHint() ); v9->addSpacing( 2 * KDialogBase::spacingHint() ); - cbEveryDay = new QCheckBox( i18n("Run every day"), bgEveryDay, "cbEveryDay"); + cbEveryDay = new TQCheckBox( i18n("Run every day"), bgEveryDay, "cbEveryDay"); cbEveryDay->setChecked(everyDay); v9->addWidget( cbEveryDay ); // hours - bgHour = new QButtonGroup( i18n("Hours"), this, "bgHour"); + bgHour = new TQButtonGroup( i18n("Hours"), this, "bgHour"); v2->addWidget( bgHour ); - QVBoxLayout *v4 = new QVBoxLayout( bgHour, KDialogBase::spacingHint() ); + TQVBoxLayout *v4 = new TQVBoxLayout( bgHour, KDialogBase::spacingHint() ); v4->addSpacing( 2 * KDialogBase::spacingHint() ); - labAM = new QLabel( i18n("AM"), bgHour, "labAM"); + labAM = new TQLabel( i18n("AM"), bgHour, "labAM"); labAM->setAlignment(AlignRight | AlignVCenter); v4->addWidget( labAM ); @@ -282,37 +282,37 @@ KTTask::KTTask(CTTask* _cttask, const QString & _caption) pbHour[ho]->setFixedSize(25, 25); } - QHBoxLayout *hhours = new QHBoxLayout( v4, KDialogBase::spacingHint() ); + TQHBoxLayout *hhours = new TQHBoxLayout( v4, KDialogBase::spacingHint() ); for (int ho1 = 0; ho1 <= 11; ho1++) { if( ho1 == 6 ) - hhours = new QHBoxLayout( v4, KDialogBase::spacingHint() ); + hhours = new TQHBoxLayout( v4, KDialogBase::spacingHint() ); hhours->addWidget( pbHour[ho1] ); } - labPM = new QLabel( i18n("PM"), bgHour, "labPM"); + labPM = new TQLabel( i18n("PM"), bgHour, "labPM"); labPM->setAlignment(AlignRight | AlignVCenter); v4->addWidget( labPM ); - hhours = new QHBoxLayout( v4, KDialogBase::spacingHint() ); + hhours = new TQHBoxLayout( v4, KDialogBase::spacingHint() ); for (int ho1 = 12; ho1 <= 23; ho1++) { if( ho1 == 18 ) - hhours = new QHBoxLayout( v4, KDialogBase::spacingHint() ); + hhours = new TQHBoxLayout( v4, KDialogBase::spacingHint() ); hhours->addWidget( pbHour[ho1] ); } - hhours = new QHBoxLayout( v4, KDialogBase::spacingHint() ); - pbAllHours = new QPushButton(bgHour, "pbAllHours"); + hhours = new TQHBoxLayout( v4, KDialogBase::spacingHint() ); + pbAllHours = new TQPushButton(bgHour, "pbAllHours"); pbAllHours->setText( i18n("Set All") ); hhours->addWidget( pbAllHours, AlignLeft ); // minutes - bgMinute = new QButtonGroup( i18n("Minutes"), this, "bgMinute"); + bgMinute = new TQButtonGroup( i18n("Minutes"), this, "bgMinute"); v2->addWidget( bgMinute ); - QVBoxLayout *vmin = new QVBoxLayout( bgMinute, KDialogBase::spacingHint() ); + TQVBoxLayout *vmin = new TQVBoxLayout( bgMinute, KDialogBase::spacingHint() ); vmin->addSpacing( 2 * KDialogBase::spacingHint() ); for (int mi = 0; mi <= 55; mi+=5) @@ -324,21 +324,21 @@ KTTask::KTTask(CTTask* _cttask, const QString & _caption) pbMinute[mi]->setFixedSize(25, 25); } - QHBoxLayout *hmin = new QHBoxLayout( vmin, KDialogBase::spacingHint() ); + TQHBoxLayout *hmin = new TQHBoxLayout( vmin, KDialogBase::spacingHint() ); for (int mi1 = 0; mi1 <= 55; mi1+=5) { if( mi1 == 30 ) - hmin = new QHBoxLayout( vmin, KDialogBase::spacingHint() ); + hmin = new TQHBoxLayout( vmin, KDialogBase::spacingHint() ); hmin->addWidget( pbMinute[mi1] ); } - hmin = new QHBoxLayout( vmin, KDialogBase::spacingHint() ); - pbAllMinutes = new QPushButton(bgMinute, "pbAllMinutes"); + hmin = new TQHBoxLayout( vmin, KDialogBase::spacingHint() ); + pbAllMinutes = new TQPushButton(bgMinute, "pbAllMinutes"); pbAllMinutes->setText( i18n("Set All") ); hmin->addWidget( pbAllMinutes, AlignLeft ); - QHBoxLayout *h5 = new QHBoxLayout( ml, KDialogBase::spacingHint() ); + TQHBoxLayout *h5 = new TQHBoxLayout( ml, KDialogBase::spacingHint() ); h5->addStretch( 1 ); // OK @@ -365,42 +365,42 @@ KTTask::KTTask(CTTask* _cttask, const QString & _caption) } // connect them up - connect(pbBrowse, SIGNAL(clicked()), SLOT(slotBrowse())); - connect(leCommand, SIGNAL(textChanged(const QString&)), - SLOT(slotCommandChanged())); - connect(cbEveryDay, SIGNAL(clicked()), SLOT(slotDailyChanged())); - connect(pbOk, SIGNAL(clicked()), SLOT(slotOK())); - connect(pbCancel, SIGNAL(clicked()), SLOT(slotCancel())); - connect(pbAllMonths, SIGNAL(clicked()), SLOT(slotAllMonths())); + connect(pbBrowse, TQT_SIGNAL(clicked()), TQT_SLOT(slotBrowse())); + connect(leCommand, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(slotCommandChanged())); + connect(cbEveryDay, TQT_SIGNAL(clicked()), TQT_SLOT(slotDailyChanged())); + connect(pbOk, TQT_SIGNAL(clicked()), TQT_SLOT(slotOK())); + connect(pbCancel, TQT_SIGNAL(clicked()), TQT_SLOT(slotCancel())); + connect(pbAllMonths, TQT_SIGNAL(clicked()), TQT_SLOT(slotAllMonths())); for (int mo = 1; mo <= 12; mo++) { - connect(cbMonth[mo], SIGNAL(clicked()), SLOT(slotMonthChanged())); + connect(cbMonth[mo], TQT_SIGNAL(clicked()), TQT_SLOT(slotMonthChanged())); } - connect(pbAllDaysOfMonth, SIGNAL(clicked()), SLOT(slotAllDaysOfMonth())); + connect(pbAllDaysOfMonth, TQT_SIGNAL(clicked()), TQT_SLOT(slotAllDaysOfMonth())); for (int dm = 1; dm <= 31; dm++) { - connect(pbDayOfMonth[dm], SIGNAL(clicked()), SLOT(slotDayOfMonthChanged())); + connect(pbDayOfMonth[dm], TQT_SIGNAL(clicked()), TQT_SLOT(slotDayOfMonthChanged())); } - connect(pbAllDaysOfWeek, SIGNAL(clicked()), SLOT(slotAllDaysOfWeek())); + connect(pbAllDaysOfWeek, TQT_SIGNAL(clicked()), TQT_SLOT(slotAllDaysOfWeek())); for (int dw = 1; dw <= 7; dw++) { - connect(cbDayOfWeek[dw], SIGNAL(clicked()), SLOT(slotDayOfWeekChanged())); + connect(cbDayOfWeek[dw], TQT_SIGNAL(clicked()), TQT_SLOT(slotDayOfWeekChanged())); } - connect(pbAllHours, SIGNAL(clicked()), SLOT(slotAllHours())); + connect(pbAllHours, TQT_SIGNAL(clicked()), TQT_SLOT(slotAllHours())); for (int ho = 0; ho <= 23; ho++) { - connect(pbHour[ho], SIGNAL(clicked()), SLOT(slotHourChanged())); + connect(pbHour[ho], TQT_SIGNAL(clicked()), TQT_SLOT(slotHourChanged())); } - connect(pbAllMinutes, SIGNAL(clicked()), SLOT(slotAllMinutes())); + connect(pbAllMinutes, TQT_SIGNAL(clicked()), TQT_SLOT(slotAllMinutes())); for (int mi = 0; mi <= 55; mi+=5) { - connect(pbMinute[mi], SIGNAL(clicked()), SLOT(slotMinuteChanged())); + connect(pbMinute[mi], TQT_SIGNAL(clicked()), TQT_SLOT(slotMinuteChanged())); } // key acceleration key_accel = new KAccel(this); - key_accel->insert(KStdAccel::Open, this, SLOT(slotOK())); - key_accel->insert(KStdAccel::Close, this, SLOT(slotCancel())); - key_accel->insert(KStdAccel::Quit, this, SLOT(slotCancel())); + key_accel->insert(KStdAccel::Open, this, TQT_SLOT(slotOK())); + key_accel->insert(KStdAccel::Close, this, TQT_SLOT(slotCancel())); + key_accel->insert(KStdAccel::Quit, this, TQT_SLOT(slotCancel())); key_accel->readSettings(); setFixedSize( minimumSize() ); @@ -419,7 +419,7 @@ KTTask::~KTTask() void KTTask::slotCommandChanged() { /* - QString qs(leCommand->text()); + TQString qs(leCommand->text()); int beginPos(qs.findRev("/", qs.length()) + 1); if (beginPos < 0) beginPos = 0; @@ -427,9 +427,9 @@ void KTTask::slotCommandChanged() int endPos(qs.findRev(" ", qs.length())); if (endPos < 0) endPos = qs.length(); - QString iconName(qs.mid(beginPos, endPos-beginPos) + ".xpm"); + TQString iconName(qs.mid(beginPos, endPos-beginPos) + ".xpm"); - QPixmap qp(KTIcon::getIcon(iconName)); + TQPixmap qp(KTIcon::getIcon(iconName)); if (qp.isNull()) labIcon->setPixmap(KTIcon::task(false)); else @@ -520,8 +520,8 @@ void KTTask::slotOK() } // Now validate - QString message(i18n("Please enter the following to schedule the task:\n")); - QString sep("\n- "); + TQString message(i18n("Please enter the following to schedule the task:\n")); + TQString sep("\n- "); bool showMessage(false); if (leCommand->text().isEmpty()) @@ -608,13 +608,13 @@ void KTTask::slotOK() // make sure the file name is a good one if we have an // absolute path - QString qs(leCommand->text()); + TQString qs(leCommand->text()); if (qs.find("/") == 0) { int spacePos(qs.find(" ")); if (spacePos < 0) spacePos = qs.length(); - QString programName(qs.left(spacePos)); - QFileInfo file(programName); + TQString programName(qs.left(spacePos)); + TQFileInfo file(programName); if (!file.isReadable()) { @@ -636,7 +636,7 @@ void KTTask::slotOK() // save work in process if (!cttask->user.empty()) { - cttask->user = QFile::encodeName(leUser->text()); + cttask->user = TQFile::encodeName(leUser->text()); } else { diff --git a/kcron/kttask.h b/kcron/kttask.h index c4d24bf..ae925d1 100644 --- a/kcron/kttask.h +++ b/kcron/kttask.h @@ -37,7 +37,7 @@ public: /** * Initialize from CTTask. */ - KTTask(CTTask* _cttask = 0, const QString &_caption=""); + KTTask(CTTask* _cttask = 0, const TQString &_caption=""); /** * Destroy. @@ -136,47 +136,47 @@ private: // Widgets. - QLabel* labUser; - QLineEdit* leUser; + TQLabel* labUser; + TQLineEdit* leUser; - QLabel* labIcon; + TQLabel* labIcon; - QLabel* labComment; - QLineEdit* leComment; + TQLabel* labComment; + TQLineEdit* leComment; - QLabel* labCommand; - QLineEdit* leCommand; - QPushButton* pbBrowse; + TQLabel* labCommand; + TQLineEdit* leCommand; + TQPushButton* pbBrowse; - QCheckBox* chkEnabled; + TQCheckBox* chkEnabled; - QButtonGroup* bgMonth; - QCheckBox* cbMonth[13]; - QPushButton* pbAllMonths; + TQButtonGroup* bgMonth; + TQCheckBox* cbMonth[13]; + TQPushButton* pbAllMonths; - QButtonGroup* bgDayOfMonth; - QPushButton* pbDayOfMonth[32]; - QPushButton* pbAllDaysOfMonth; + TQButtonGroup* bgDayOfMonth; + TQPushButton* pbDayOfMonth[32]; + TQPushButton* pbAllDaysOfMonth; - QButtonGroup* bgDayOfWeek; - QCheckBox* cbDayOfWeek[8]; - QPushButton* pbAllDaysOfWeek; + TQButtonGroup* bgDayOfWeek; + TQCheckBox* cbDayOfWeek[8]; + TQPushButton* pbAllDaysOfWeek; - QButtonGroup* bgEveryDay; - QCheckBox* cbEveryDay; + TQButtonGroup* bgEveryDay; + TQCheckBox* cbEveryDay; - QButtonGroup* bgHour; - QLabel* labAM; - QLabel* labPM; - QPushButton* pbHour[25]; - QPushButton* pbAllHours; + TQButtonGroup* bgHour; + TQLabel* labAM; + TQLabel* labPM; + TQPushButton* pbHour[25]; + TQPushButton* pbAllHours; - QButtonGroup* bgMinute; - QPushButton* pbMinute[61]; - QPushButton* pbAllMinutes; + TQButtonGroup* bgMinute; + TQPushButton* pbMinute[61]; + TQPushButton* pbAllMinutes; - QPushButton* pbOk; - QPushButton* pbCancel; + TQPushButton* pbOk; + TQPushButton* pbCancel; }; diff --git a/kcron/ktvariable.cpp b/kcron/ktvariable.cpp index 014bdf6..19cbba0 100644 --- a/kcron/ktvariable.cpp +++ b/kcron/ktvariable.cpp @@ -11,7 +11,7 @@ #include "ktvariable.h" -#include +#include #include // kapp #include // i18n() @@ -22,22 +22,22 @@ #include "kticon.h" -KTVariable::KTVariable(CTVariable* _ctvar,const QString &_caption) : +KTVariable::KTVariable(CTVariable* _ctvar,const TQString &_caption) : KDialogBase(0, "ktvariable", true, _caption, Ok|Cancel, Ok, true), ctvar( _ctvar) { - QFrame *page = makeMainWidget(); - QGridLayout *layout = new QGridLayout( page, 5, 3, 0, spacingHint() ); + TQFrame *page = makeMainWidget(); + TQGridLayout *layout = new TQGridLayout( page, 5, 3, 0, spacingHint() ); layout->setRowStretch(3, 1); layout->setColStretch(1, 1); setIcon(KTIcon::application(true)); // variable - labVariable = new QLabel(i18n("&Variable:"), page, "labVariable"); + labVariable = new TQLabel(i18n("&Variable:"), page, "labVariable"); layout->addWidget(labVariable, 1, 0, Qt::AlignLeft | Qt::AlignTop); - cmbVariable = new QComboBox(true, page, "cmbVariable"); + cmbVariable = new TQComboBox(true, page, "cmbVariable"); layout->addWidget(cmbVariable, 1, 1); cmbVariable->insertItem("HOME"); @@ -48,20 +48,20 @@ KTVariable::KTVariable(CTVariable* _ctvar,const QString &_caption) : labVariable->setBuddy(cmbVariable); // icon - labIcon = new QLabel(page, "labIcon"); + labIcon = new TQLabel(page, "labIcon"); layout->addMultiCellWidget(labIcon, 0, 1, 2, 2); // value - labValue = new QLabel(i18n("Va&lue:"), page, "labValue"); + labValue = new TQLabel(i18n("Va&lue:"), page, "labValue"); layout->addWidget(labValue, 2, 0, Qt::AlignLeft | Qt::AlignTop); - leValue = new QLineEdit(page, "leValue"); + leValue = new TQLineEdit(page, "leValue"); layout->addMultiCellWidget(leValue, 2, 2, 1, 2); leValue->setMaxLength(255); labValue->setBuddy(leValue); // comment - labComment = new QLabel(i18n("Co&mment:"), page, "labComment"); + labComment = new TQLabel(i18n("Co&mment:"), page, "labComment"); layout->addWidget(labComment, 3, 0, Qt::AlignLeft | Qt::AlignTop); teComment = new KTextEdit(page, "teComment"); @@ -71,26 +71,26 @@ KTVariable::KTVariable(CTVariable* _ctvar,const QString &_caption) : labComment->setBuddy(teComment); // enabled - chkEnabled = new QCheckBox(i18n("&Enabled"), page, "chkEnabled"); + chkEnabled = new TQCheckBox(i18n("&Enabled"), page, "chkEnabled"); layout->addWidget(chkEnabled, 4, 0); // set starting field values - cmbVariable->setEditText(QString::fromLocal8Bit(ctvar->variable.c_str())); + cmbVariable->setEditText(TQString::fromLocal8Bit(ctvar->variable.c_str())); slotVariableChanged(); - leValue->setText(QString::fromLocal8Bit(ctvar->value.c_str())); + leValue->setText(TQString::fromLocal8Bit(ctvar->value.c_str())); - teComment->setText(QString::fromLocal8Bit(ctvar->comment.c_str())); + teComment->setText(TQString::fromLocal8Bit(ctvar->comment.c_str())); chkEnabled->setChecked(ctvar->enabled); cmbVariable->setFocus(); // connect them up - connect(cmbVariable,SIGNAL(highlighted(const QString&)), - SLOT(slotVariableChanged())); - connect(cmbVariable,SIGNAL(activated(const QString&)), - SLOT(slotVariableChanged())); + connect(cmbVariable,TQT_SIGNAL(highlighted(const TQString&)), + TQT_SLOT(slotVariableChanged())); + connect(cmbVariable,TQT_SIGNAL(activated(const TQString&)), + TQT_SLOT(slotVariableChanged())); } KTVariable::~KTVariable() @@ -99,7 +99,7 @@ KTVariable::~KTVariable() void KTVariable::slotVariableChanged() { - QString variable = cmbVariable->currentText(); + TQString variable = cmbVariable->currentText(); if (variable == "HOME") { labIcon->setPixmap(KTIcon::home(false)); diff --git a/kcron/ktvariable.h b/kcron/ktvariable.h index eb5eb57..7870ef3 100644 --- a/kcron/ktvariable.h +++ b/kcron/ktvariable.h @@ -16,10 +16,10 @@ #include #endif -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -39,7 +39,7 @@ public: /** * Initialize from CTVariable. */ - KTVariable(CTVariable* _ctvar = 0, const QString &_caption=""); + KTVariable(CTVariable* _ctvar = 0, const TQString &_caption=""); /** * Destroy. @@ -67,18 +67,18 @@ private: // Widgets. - QLabel* labIcon; + TQLabel* labIcon; - QLabel* labVariable; - QComboBox* cmbVariable; + TQLabel* labVariable; + TQComboBox* cmbVariable; - QLabel* labValue; - QLineEdit* leValue; + TQLabel* labValue; + TQLineEdit* leValue; - QLabel* labComment; + TQLabel* labComment; KTextEdit* teComment; - QCheckBox* chkEnabled; + TQCheckBox* chkEnabled; }; #endif // KTVARIABLE_H diff --git a/kcron/ktview.cpp b/kcron/ktview.cpp index 87c90c0..27341de 100644 --- a/kcron/ktview.cpp +++ b/kcron/ktview.cpp @@ -24,12 +24,12 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -51,8 +51,8 @@ #include "kttask.h" #include "ktprint.h" -KTView::KTView(QWidget *parent, const char* name) : - QWidget(parent, name), +KTView::KTView(TQWidget *parent, const char* name) : + TQWidget(parent, name), listView(0), currentCTCron(0), currentIsTask(true), @@ -67,17 +67,17 @@ KTView::KTView(QWidget *parent, const char* name) : refresh(); listView->setSelected(listView->firstChild(), true); - connect(this, SIGNAL(enableModificationButtons(bool)), parent, - SLOT(slotEnableModificationButtons(bool))); + connect(this, TQT_SIGNAL(enableModificationButtons(bool)), parent, + TQT_SLOT(slotEnableModificationButtons(bool))); - connect(this, SIGNAL(enablePaste(bool)), parent, - SLOT(slotEnablePaste(bool))); + connect(this, TQT_SIGNAL(enablePaste(bool)), parent, + TQT_SLOT(slotEnablePaste(bool))); - connect(this, SIGNAL(enableRunNow(bool)), parent, - SLOT(slotEnableRunNow(bool))); + connect(this, TQT_SIGNAL(enableRunNow(bool)), parent, + TQT_SLOT(slotEnableRunNow(bool))); - connect(this, SIGNAL(enableEnabled(bool)), parent, - SLOT(slotEnableEnabled(bool))); + connect(this, TQT_SIGNAL(enableEnabled(bool)), parent, + TQT_SLOT(slotEnableEnabled(bool))); } void KTView::disableIcons() @@ -89,11 +89,11 @@ void KTView::disableIcons() void KTView::refresh() { - QListView* tmpListView(listView); + TQListView* tmpListView(listView); - listView = new QListView(this); + listView = new TQListView(this); - listView->setFrameStyle(QListView::Panel | QListView::Sunken); + listView->setFrameStyle(TQListView::Panel | TQListView::Sunken); listView->setRootIsDecorated(true); listView->setAllColumnsShowFocus(true); listView->setShowSortIndicator(true); @@ -109,7 +109,7 @@ void KTView::refresh() listView->addColumn(i18n("Description")); for (int item = 0; item <=2; item++) - listView->setColumnWidthMode(item, QListView::Maximum); + listView->setColumnWidthMode(item, TQListView::Maximum); // for each user for (CTCronIterator i = const_cast(cth).cron.begin(); @@ -163,17 +163,17 @@ void KTView::refresh() resizeEvent(); - connect(listView, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), - SLOT(slotMenu(QListViewItem*, const QPoint&, int))); + connect(listView, TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)), + TQT_SLOT(slotMenu(TQListViewItem*, const TQPoint&, int))); - connect(listView, SIGNAL(selectionChanged(QListViewItem*)), - SLOT(slotSetCurrent(QListViewItem*))); + connect(listView, TQT_SIGNAL(selectionChanged(TQListViewItem*)), + TQT_SLOT(slotSetCurrent(TQListViewItem*))); - connect(listView, SIGNAL(doubleClicked(QListViewItem*)), - SLOT(slotEdit(QListViewItem*))); + connect(listView, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + TQT_SLOT(slotEdit(TQListViewItem*))); - connect(listView, SIGNAL(returnPressed(QListViewItem*)), - SLOT(slotEdit(QListViewItem*))); + connect(listView, TQT_SIGNAL(returnPressed(TQListViewItem*)), + TQT_SLOT(slotEdit(TQListViewItem*))); // switch to the new view if (tmpListView) @@ -264,21 +264,21 @@ void KTView::print () const void KTView :: pageHeading (KTListItem* user, KTPrint &printer) const { - QFont stnd; - QString logonInfo; - QDateTime now (QDateTime::currentDateTime()); + TQFont stnd; + TQString logonInfo; + TQDateTime now (TQDateTime::currentDateTime()); char hostName[20]; gethostname(hostName, 20); // SSA : Fix Me user name, logon name and host name musst be // SSA : not only in us-ascii ?? logonInfo = i18n("user on host", "%1 <%2> on %3") - .arg(QString::fromLocal8Bit(user->getCTCron()->name.c_str())) - .arg(QString::fromLocal8Bit(user->getCTCron()->login.c_str())) - .arg(QString::fromLocal8Bit(hostName)); + .arg(TQString::fromLocal8Bit(user->getCTCron()->name.c_str())) + .arg(TQString::fromLocal8Bit(user->getCTCron()->login.c_str())) + .arg(TQString::fromLocal8Bit(hostName)); stnd = printer.getFont(); - printer.setFont(QFont( KGlobalSettings::generalFont().family(), 14, QFont::Bold )); + printer.setFont(TQFont( KGlobalSettings::generalFont().family(), 14, TQFont::Bold )); printer.print (i18n("Scheduled Tasks"), 2, KTPrint::alignTextCenter, false); printer.print (logonInfo, 2, KTPrint::alignTextCenter, false); @@ -311,7 +311,7 @@ KTView::~KTView() delete listView; } -void KTView::resizeEvent (QResizeEvent*) +void KTView::resizeEvent (TQResizeEvent*) { listView->setFixedWidth(width()); listView->setFixedHeight(height()); @@ -423,46 +423,46 @@ void KTView::remove() refresh(); } -QString KTView::absolute() const +TQString KTView::absolute() const { - QString fullCommand = QString::fromLocal8Bit(currentCTTask->command.c_str()); - QString command(fullCommand); + TQString fullCommand = TQString::fromLocal8Bit(currentCTTask->command.c_str()); + TQString command(fullCommand); int pos(command.find(" ")); if (pos > 0) command = command.left(pos); if (command.find("/") == 0) return fullCommand; - QString path = QString::fromLocal8Bit(currentCTCron->path().c_str()); + TQString path = TQString::fromLocal8Bit(currentCTCron->path().c_str()); int begin(0); int end(0); - QString prefix; - QString full; + TQString prefix; + TQString full; while ((end = path.find(":", begin)) > 0) { prefix = path.mid(begin, begin + end) + "/"; full = prefix + command; - if (QFileInfo(full).isExecutable()) - return QString(prefix + fullCommand); + if (TQFileInfo(full).isExecutable()) + return TQString(prefix + fullCommand); begin = end + 1; } prefix = path.mid(begin, begin + end) + "/"; full = prefix + command; - if (QFileInfo(full).isExecutable()) - return QString(prefix + fullCommand); - return QString(""); + if (TQFileInfo(full).isExecutable()) + return TQString(prefix + fullCommand); + return TQString(""); } void KTView::run() const { - QString command(absolute() + " &"); - system(QFile::encodeName(command)); + TQString command(absolute() + " &"); + system(TQFile::encodeName(command)); } void KTView::enable(bool enable) { - QListViewItem* qlvi = listView->currentItem(); + TQListViewItem* qlvi = listView->currentItem(); if (currentIsTask) { @@ -482,7 +482,7 @@ void KTView::enable(bool enable) } } -void KTView::slotMenu(QListViewItem* qlvi, const QPoint& qp, int /*i*/) +void KTView::slotMenu(TQListViewItem* qlvi, const TQPoint& qp, int /*i*/) { if (qlvi !=0 ) { listView->setSelected(qlvi, true); @@ -491,14 +491,14 @@ void KTView::slotMenu(QListViewItem* qlvi, const QPoint& qp, int /*i*/) } } -void KTView::slotEdit(QListViewItem* /*qlvi*/) +void KTView::slotEdit(TQListViewItem* /*qlvi*/) { edit(); } -void KTView::slotSetCurrent (QListViewItem* qlvi) +void KTView::slotSetCurrent (TQListViewItem* qlvi) { - QListViewItem* parent = qlvi->parent(); + TQListViewItem* parent = qlvi->parent(); if (qlvi->text(0) == KTListVars::getDescription()) { diff --git a/kcron/ktview.h b/kcron/ktview.h index e25129a..1588661 100644 --- a/kcron/ktview.h +++ b/kcron/ktview.h @@ -16,7 +16,7 @@ #include #endif -#include +#include class QString; class QListView; @@ -40,7 +40,7 @@ public: /** * Initializes view. */ - KTView (QWidget* parent = 0, const char* name=0); + KTView (TQWidget* parent = 0, const char* name=0); /** * Destructor. @@ -132,33 +132,33 @@ public slots: /** * Pop up context sensitive menu. */ - void slotMenu(QListViewItem* qlvi, const QPoint& qp, int i); + void slotMenu(TQListViewItem* qlvi, const TQPoint& qp, int i); /** * Default action, edit. */ - void slotEdit(QListViewItem* qlvi = 0); + void slotEdit(TQListViewItem* qlvi = 0); protected slots: /** * Set current and update menu */ - void slotSetCurrent (QListViewItem* qlvi); + void slotSetCurrent (TQListViewItem* qlvi); protected: /** * Resize view contents. */ - virtual void resizeEvent (QResizeEvent* = 0); + virtual void resizeEvent (TQResizeEvent* = 0); private: /** * Get absolute path of command. */ - QString absolute() const; + TQString absolute() const; /** * Refresh view from underlying objects. @@ -173,7 +173,7 @@ private: /** * Tree view of the crontab entries. */ - QListView* listView; + TQListView* listView; /** * Current user's crontab. diff --git a/kdat/Archive.cpp b/kdat/Archive.cpp index 0933265..5e8ef65 100644 --- a/kdat/Archive.cpp +++ b/kdat/Archive.cpp @@ -18,7 +18,7 @@ #include -#include +#include #include @@ -26,7 +26,7 @@ #include "Options.h" #include "TapeManager.h" -Archive::Archive( Tape* tape, int ctime, const QString & name ) +Archive::Archive( Tape* tape, int ctime, const TQString & name ) : _stubbed( FALSE ), _fptr( 0 ), _offset( 0 ), @@ -108,7 +108,7 @@ void Archive::readAll( int version ) { read( version ); - QPtrListIterator i( getChildren() ); + TQPtrListIterator i( getChildren() ); for ( ; i.current(); ++i ) { i.current()->readAll( version ); } @@ -140,7 +140,7 @@ void Archive::write( FILE* fptr ) // Child range list. ival = _ranges.getRanges().count(); fwrite( &ival, sizeof( ival ), 1, _fptr ); - QPtrListIterator it( _ranges.getRanges() ); + TQPtrListIterator it( _ranges.getRanges() ); for ( ; it.current(); ++it ) { ival = it.current()->getStart(); fwrite( &ival, sizeof( ival ), 1, _fptr ); @@ -159,7 +159,7 @@ void Archive::write( FILE* fptr ) } //===== Write files ===== - QPtrListIterator i( getChildren() ); + TQPtrListIterator i( getChildren() ); int count = 0; for ( ; i.current(); ++i, count++ ) { // Fill in the file offset. @@ -186,7 +186,7 @@ int Archive::getEndBlock() return _endBlock; } -QString Archive::getName() +TQString Archive::getName() { read(); @@ -198,14 +198,14 @@ Tape* Archive::getTape() return _tape; } -const QPtrList& Archive::getChildren() +const TQPtrList& Archive::getChildren() { read(); return _children; } -const QPtrList& Archive::getRanges() +const TQPtrList& Archive::getRanges() { read(); @@ -226,7 +226,7 @@ void Archive::setEndBlock( int endBlock ) TapeManager::instance()->tapeModified( _tape ); } -void Archive::setName( const QString & name ) +void Archive::setName( const TQString & name ) { read(); @@ -258,13 +258,13 @@ void Archive::addChild( File* file ) _children.append( file ); } -File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, const QString & filename ) +File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, const TQString & filename ) { read(); - QStringList path; + TQStringList path; - QString fn( filename ); + TQString fn( filename ); int idx = 0; while ( ( idx = fn.find( '/' ) ) > -1 ) { path.append( fn.left( idx + 1 ) ); @@ -285,10 +285,10 @@ File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, con return file; } - QString dir = path.first(); + TQString dir = path.first(); //path.remove(path.first()); path.remove(path.begin()); - QPtrListIterator i( getChildren() ); + TQPtrListIterator i( getChildren() ); File* parent = 0; for ( ; i.current() ; ++i ) { if ( i.current()->getName() == dir ) { @@ -302,12 +302,12 @@ File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, con addChild( parent ); } - for ( QStringList::Iterator j = path.begin(); + for ( TQStringList::Iterator j = path.begin(); j != path.end(); ++j ) { - QString dir = *j; + TQString dir = *j; File* pparent = parent; - QPtrListIterator i( pparent->getChildren() ); + TQPtrListIterator i( pparent->getChildren() ); for ( parent = 0; i.current() ; ++i ) { if ( i.current()->getName() == dir ) { parent = i.current(); @@ -333,10 +333,10 @@ void Archive::calcRanges() _ranges.clear(); - QPtrListIterator it( getChildren() ); + TQPtrListIterator it( getChildren() ); for ( ; it.current(); ++it ) { it.current()->calcRanges(); - QPtrListIterator it2( it.current()->getRanges() ); + TQPtrListIterator it2( it.current()->getRanges() ); for ( ; it2.current(); ++it2 ) { _ranges.addRange( it2.current()->getStart(), it2.current()->getEnd() ); } @@ -347,7 +347,7 @@ void Archive::calcRanges() //%%% into one big contiguous range. if ( _ranges.getRanges().count() > 1 ) { kdDebug() << "Archive::calcRanges() -- extra ranges detected, fixing..." << endl; - QPtrListIterator iter( _ranges.getRanges() ); + TQPtrListIterator iter( _ranges.getRanges() ); for ( ; iter.current(); ++iter ) { kdDebug() << "Archive::calcRanges() -- range = " << iter.current() << " to " << iter.current()->getEnd() << endl; } diff --git a/kdat/Archive.h b/kdat/Archive.h index b64ae36..9f42684 100644 --- a/kdat/Archive.h +++ b/kdat/Archive.h @@ -21,8 +21,8 @@ #include -#include -#include +#include +#include #include "File.h" @@ -38,8 +38,8 @@ class Archive { int _ctime; FILE* _fptr; int _offset; - QString _name; - QPtrList _children; + TQString _name; + TQPtrList _children; RangeList _ranges; Tape* _tape; public: @@ -50,7 +50,7 @@ public: * @param ctime The create time of the archive. * @param name The name given to this archive by the user. */ - Archive( Tape* tape, int ctime, const QString & name ); + Archive( Tape* tape, int ctime, const TQString & name ); /** * Create a new stubbed instance of an archive. The file pointer and @@ -113,7 +113,7 @@ public: * * @return The name of this archive. */ - QString getName(); + TQString getName(); /** * Get the tape that contains this archive. @@ -127,14 +127,14 @@ public: * * @return A list of the immediate children of this archive. */ - const QPtrList& getChildren(); + const TQPtrList& getChildren(); /** * Get the list of ranges of this file and all of its children. * * @return A list of ranges. */ - const QPtrList& getRanges(); + const TQPtrList& getRanges(); /** * Set the ending tape block for this archive. @@ -148,7 +148,7 @@ public: * * @param name The new archive name. */ - void setName( const QString & name ); + void setName( const TQString & name ); /** * Add a new top level file as a child of this archive. @@ -173,7 +173,7 @@ public: * * @return A pointer to the newly created file entry. */ - File* addFile( int size, int mtime, int startRecord, int endRecord, const QString & filename ); + File* addFile( int size, int mtime, int startRecord, int endRecord, const TQString & filename ); /** * Recursively calculate the list of ranges for all of the archive's children. diff --git a/kdat/ArchiveInfoWidget.cpp b/kdat/ArchiveInfoWidget.cpp index 225d229..c3838d4 100644 --- a/kdat/ArchiveInfoWidget.cpp +++ b/kdat/ArchiveInfoWidget.cpp @@ -18,9 +18,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -35,13 +35,13 @@ #include "ArchiveInfoWidget.moc" -ArchiveInfoWidget::ArchiveInfoWidget( QWidget* parent, const char* name ) - : QWidget( parent, name ), +ArchiveInfoWidget::ArchiveInfoWidget( TQWidget* parent, const char* name ) + : TQWidget( parent, name ), _archive( 0 ) { - QLabel* lbl1 = new QLabel( i18n( "Archive name:" ), this ); - QLabel* lbl2 = new QLabel( i18n( "Created on:" ), this ); - QLabel* lbl3 = new QLabel( i18n( "Size:" ), this ); + TQLabel* lbl1 = new TQLabel( i18n( "Archive name:" ), this ); + TQLabel* lbl2 = new TQLabel( i18n( "Created on:" ), this ); + TQLabel* lbl3 = new TQLabel( i18n( "Size:" ), this ); int max = lbl1->sizeHint().width(); if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width(); @@ -51,45 +51,45 @@ ArchiveInfoWidget::ArchiveInfoWidget( QWidget* parent, const char* name ) lbl2->setFixedSize( max, lbl2->sizeHint().height() ); lbl3->setFixedSize( max, lbl3->sizeHint().height() ); - _archiveName = new QLineEdit( this ); + _archiveName = new TQLineEdit( this ); _archiveName->setFixedHeight( _archiveName->sizeHint().height() ); - _ctime = new QLabel( "???", this ); + _ctime = new TQLabel( "???", this ); _ctime->setFixedHeight( _ctime->sizeHint().height() ); - _size = new QLabel( "???", this ); + _size = new TQLabel( "???", this ); _size->setFixedHeight( _size->sizeHint().height() ); _apply = new KPushButton( KStdGuiItem::apply(), this ); _apply->setFixedSize( 80, _apply->sizeHint().height() ); _apply->setEnabled( FALSE ); - QVBoxLayout* l1 = new QVBoxLayout( this, 4, 4 ); + TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 ); - QHBoxLayout* l1_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1 = new TQHBoxLayout(); l1->addLayout( l1_1 ); l1_1->addWidget( lbl1 ); l1_1->addWidget( _archiveName, 1 ); - QHBoxLayout* l1_2 = new QHBoxLayout(); + TQHBoxLayout* l1_2 = new TQHBoxLayout(); l1->addLayout( l1_2 ); l1_2->addWidget( lbl2 ); l1_2->addWidget( _ctime ); - QHBoxLayout* l1_3 = new QHBoxLayout(); + TQHBoxLayout* l1_3 = new TQHBoxLayout(); l1->addLayout( l1_3 ); l1_3->addWidget( lbl3 ); l1_3->addWidget( _size ); l1->addStretch( 1 ); - QHBoxLayout* l1_4 = new QHBoxLayout(); + TQHBoxLayout* l1_4 = new TQHBoxLayout(); l1->addLayout( l1_4 ); l1_4->addStretch( 1 ); l1_4->addWidget( _apply ); - connect( _archiveName, SIGNAL( textChanged( const QString& ) ), this, SLOT( slotTextChanged( const QString& ) ) ); - connect( _apply , SIGNAL( clicked() ) , this, SLOT( slotApply() ) ); + connect( _archiveName, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( slotTextChanged( const TQString& ) ) ); + connect( _apply , TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotApply() ) ); } ArchiveInfoWidget::~ArchiveInfoWidget() @@ -106,7 +106,7 @@ void ArchiveInfoWidget::setArchive( Archive* archive ) _archiveName->setText( _archive->getName() ); - QString tmp; + TQString tmp; time_t tm = _archive->getCTime(); tmp = ctime( &tm ); tmp = tmp.stripWhiteSpace(); @@ -122,7 +122,7 @@ void ArchiveInfoWidget::setArchive( Archive* archive ) _size->setText( Util::kbytesToString( used ) ); } -void ArchiveInfoWidget::slotTextChanged( const QString& text ) +void ArchiveInfoWidget::slotTextChanged( const TQString& text ) { if ( !_archive ) { return; diff --git a/kdat/ArchiveInfoWidget.h b/kdat/ArchiveInfoWidget.h index 83d7bab..a34d1c9 100644 --- a/kdat/ArchiveInfoWidget.h +++ b/kdat/ArchiveInfoWidget.h @@ -19,7 +19,7 @@ #ifndef _ArchiveInfoWidget_h_ #define _ArchiveInfoWidget_h_ -#include +#include class QLabel; class QLineEdit; @@ -30,21 +30,21 @@ class Archive; /** * @short Display/edit information about an archive index. */ -class ArchiveInfoWidget : public QWidget { +class ArchiveInfoWidget : public TQWidget { Q_OBJECT Archive* _archive; - QLineEdit* _archiveName; - QLabel* _ctime; - QLabel* _size; - QPushButton* _apply; + TQLineEdit* _archiveName; + TQLabel* _ctime; + TQLabel* _size; + TQPushButton* _apply; private slots: - void slotTextChanged( const QString& text ); + void slotTextChanged( const TQString& text ); void slotApply(); public: /** * Create a new archive info widget. */ - ArchiveInfoWidget( QWidget* parent = 0, const char* name = 0 ); + ArchiveInfoWidget( TQWidget* parent = 0, const char* name = 0 ); /** * Destroy the archive info widget. diff --git a/kdat/BackupDlg.cpp b/kdat/BackupDlg.cpp index 1f237ab..8a26d2a 100644 --- a/kdat/BackupDlg.cpp +++ b/kdat/BackupDlg.cpp @@ -25,9 +25,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -49,10 +49,10 @@ #include "BackupDlg.moc" -BackupDlg::BackupDlg( const QString & archiveName, const QString & workingDir, const QStringList& files, bool oneFilesystem, bool incremental, - const QString & snapshot, bool removeSnapshot, int archiveSize, Tape* tape, - QWidget* parent, const char* name ) - : QDialog( parent, name, TRUE ), +BackupDlg::BackupDlg( const TQString & archiveName, const TQString & workingDir, const TQStringList& files, bool oneFilesystem, bool incremental, + const TQString & snapshot, bool removeSnapshot, int archiveSize, Tape* tape, + TQWidget* parent, const char* name ) + : TQDialog( parent, name, TRUE ), _proc( NULL ), _tarParser( NULL ), _archiveName( archiveName ), @@ -86,109 +86,109 @@ BackupDlg::BackupDlg( const QString & archiveName, const QString & workingDir, c // const int labelWidth = 96; const int labelWidth = 110; - QFrame* f1 = new QFrame( this ); - f1->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + TQFrame* f1 = new TQFrame( this ); + f1->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - QFrame* f2 = new QFrame( this ); - f2->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + TQFrame* f2 = new TQFrame( this ); + f2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - QLabel* lbl1 = new QLabel( i18n( "Elapsed time:" ), f1 ); + TQLabel* lbl1 = new TQLabel( i18n( "Elapsed time:" ), f1 ); lbl1->setFixedSize( labelWidth, lbl1->sizeHint().height() ); - _elapsedTime = new QLabel( i18n( "00:00:00" ), f1 ); + _elapsedTime = new TQLabel( i18n( "00:00:00" ), f1 ); _elapsedTime->setFixedHeight( _elapsedTime->sizeHint().height() ); - QLabel* lbl2 = new QLabel( i18n( "Time remaining:" ), f2 ); + TQLabel* lbl2 = new TQLabel( i18n( "Time remaining:" ), f2 ); lbl2->setFixedSize( labelWidth, lbl2->sizeHint().height() ); - _timeRemaining = new QLabel( i18n( "00:00:00" ), f2 ); + _timeRemaining = new TQLabel( i18n( "00:00:00" ), f2 ); _timeRemaining->setFixedHeight( _timeRemaining->sizeHint().height() ); - QLabel* lbl3 = new QLabel( i18n( "Total KB:" ), f1 ); + TQLabel* lbl3 = new TQLabel( i18n( "Total KB:" ), f1 ); lbl3->setFixedSize( labelWidth, lbl3->sizeHint().height() ); - QLabel* totalKbytes = new QLabel( Util::kbytesToString( archiveSize ), f1 ); + TQLabel* totalKbytes = new TQLabel( Util::kbytesToString( archiveSize ), f1 ); totalKbytes->setFixedHeight( totalKbytes->sizeHint().height() ); - QLabel* lbl4 = new QLabel( i18n( "KB written:" ), f2 ); + TQLabel* lbl4 = new TQLabel( i18n( "KB written:" ), f2 ); lbl4->setFixedSize( labelWidth, lbl4->sizeHint().height() ); - _kbytesWritten = new QLabel( i18n( "0KB" ), f2 ); + _kbytesWritten = new TQLabel( i18n( "0KB" ), f2 ); _kbytesWritten->setFixedHeight( _kbytesWritten->sizeHint().height() ); - QLabel* lbl5 = new QLabel( i18n( "Transfer rate:" ), f1 ); + TQLabel* lbl5 = new TQLabel( i18n( "Transfer rate:" ), f1 ); lbl5->setFixedSize( labelWidth, lbl5->sizeHint().height() ); - _transferRate = new QLabel( i18n( "0KB/min" ), f1 ); + _transferRate = new TQLabel( i18n( "0KB/min" ), f1 ); _transferRate->setFixedHeight( _transferRate->sizeHint().height() ); - QLabel* lbl6 = new QLabel( i18n( "Files:" ), f2 ); + TQLabel* lbl6 = new TQLabel( i18n( "Files:" ), f2 ); lbl6->setFixedSize( labelWidth, lbl6->sizeHint().height() ); - _fileCount = new QLabel( i18n( "0" ), f2 ); + _fileCount = new TQLabel( i18n( "0" ), f2 ); _fileCount->setFixedHeight( _fileCount->sizeHint().height() ); _log = new LoggerWidget( i18n( "Backup log:" ), this ); _ok = new KPushButton( KStdGuiItem::ok(), this ); _ok->setFixedSize( 80, _ok->sizeHint().height() ); - connect( _ok, SIGNAL( clicked() ), this, SLOT( slotOK() ) ); + connect( _ok, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOK() ) ); _ok->setEnabled( FALSE ); - _save = new QPushButton( i18n( "Save Log..." ), this ); + _save = new TQPushButton( i18n( "Save Log..." ), this ); _save->setFixedSize( 80, _save->sizeHint().height() ); - connect( _save, SIGNAL( clicked() ), _log, SLOT( save() ) ); + connect( _save, TQT_SIGNAL( clicked() ), _log, TQT_SLOT( save() ) ); _save->setEnabled( FALSE ); _abort = new KPushButton( KStdGuiItem::cancel(), this ); _abort->setFixedSize( 80, _abort->sizeHint().height() ); - connect( _abort, SIGNAL( clicked() ), this, SLOT( slotAbort() ) ); + connect( _abort, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAbort() ) ); - QVBoxLayout* l1 = new QVBoxLayout( this, 8, 4 ); + TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 ); - QHBoxLayout* l1_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1 = new TQHBoxLayout(); l1->addLayout( l1_1 ); l1_1->addStrut( 3 * lbl1->height() + 16 ); l1_1->addWidget( f1 ); l1_1->addWidget( f2 ); - QVBoxLayout* l1_1_1 = new QVBoxLayout( f1, 4, 4 ); + TQVBoxLayout* l1_1_1 = new TQVBoxLayout( f1, 4, 4 ); - QHBoxLayout* l1_1_1_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1_1_1 = new TQHBoxLayout(); l1_1_1->addLayout( l1_1_1_1 ); l1_1_1_1->addWidget( lbl1 ); l1_1_1_1->addWidget( _elapsedTime, 1 ); - QHBoxLayout* l1_1_1_2 = new QHBoxLayout(); + TQHBoxLayout* l1_1_1_2 = new TQHBoxLayout(); l1_1_1->addLayout( l1_1_1_2 ); l1_1_1_2->addWidget( lbl3 ); l1_1_1_2->addWidget( totalKbytes, 1 ); - QHBoxLayout* l1_1_1_3 = new QHBoxLayout(); + TQHBoxLayout* l1_1_1_3 = new TQHBoxLayout(); l1_1_1->addLayout( l1_1_1_3 ); l1_1_1_3->addWidget( lbl5 ); l1_1_1_3->addWidget( _transferRate, 1 ); - QVBoxLayout* l1_1_2 = new QVBoxLayout( f2, 4, 4 ); + TQVBoxLayout* l1_1_2 = new TQVBoxLayout( f2, 4, 4 ); - QHBoxLayout* l1_1_2_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1_2_1 = new TQHBoxLayout(); l1_1_2->addLayout( l1_1_2_1 ); l1_1_2_1->addWidget( lbl2 ); l1_1_2_1->addWidget( _timeRemaining, 1 ); - QHBoxLayout* l1_1_2_2 = new QHBoxLayout(); + TQHBoxLayout* l1_1_2_2 = new TQHBoxLayout(); l1_1_2->addLayout( l1_1_2_2 ); l1_1_2_2->addWidget( lbl4 ); l1_1_2_2->addWidget( _kbytesWritten, 1 ); - QHBoxLayout* l1_1_2_3 = new QHBoxLayout(); + TQHBoxLayout* l1_1_2_3 = new TQHBoxLayout(); l1_1_2->addLayout( l1_1_2_3 ); l1_1_2_3->addWidget( lbl6 ); l1_1_2_3->addWidget( _fileCount, 1 ); l1->addWidget( _log, 1 ); - QHBoxLayout* l1_2 = new QHBoxLayout(); + TQHBoxLayout* l1_2 = new TQHBoxLayout(); l1->addLayout( l1_2 ); l1_2->addStretch( 1 ); l1_2->addWidget( _ok ); @@ -207,14 +207,14 @@ void BackupDlg::show() _archive = new Archive( _tape, time( NULL ), _archiveName.utf8() ); - chdir( QFile::encodeName(_workingDir) ); + chdir( TQFile::encodeName(_workingDir) ); if ( _removeSnapshot ) { - unlink( QFile::encodeName(_snapshot) ); + unlink( TQFile::encodeName(_snapshot) ); } _tarParser = new TarParser(); - connect( _tarParser, SIGNAL( sigEntry( const QString &, int, int, int ) ), this, SLOT( slotEntry( const QString &, int, int, int ) ) ); + connect( _tarParser, TQT_SIGNAL( sigEntry( const TQString &, int, int, int ) ), this, TQT_SLOT( slotEntry( const TQString &, int, int, int ) ) ); _proc = new KProcess(); *_proc << Options::instance()->getTarCommand(); @@ -237,16 +237,16 @@ void BackupDlg::show() } // Backup all files in current working directory. - QDir dir; + TQDir dir; //roland - //QStringList::Iterator i = dir.entryList( QDir::All, QDir::Name | QDir::DirsFirst ).begin(); - QStringList FilesList = dir.entryList( QDir::All, QDir::Name | QDir::DirsFirst ); - QStringList::Iterator i = FilesList.begin(); + //TQStringList::Iterator i = dir.entryList( TQDir::All, TQDir::Name | TQDir::DirsFirst ).begin(); + TQStringList FilesList = dir.entryList( TQDir::All, TQDir::Name | TQDir::DirsFirst ); + TQStringList::Iterator i = FilesList.begin(); //roland for ( ; !(*i).isNull() ; ++i ) { if ( *i != "." && *i != ".." ) { if ( _oneFilesystem ) { - if ( lstat( QFile::encodeName(*i), &info ) == 0 ) + if ( lstat( TQFile::encodeName(*i), &info ) == 0 ) { if ( info.st_dev == device ) { *_proc << *i; @@ -264,7 +264,7 @@ void BackupDlg::show() /* 2002-01-28 LEW */ // printf("Fixing to list the files/dirs to be dumped:\n"); /* 2002-01-28 LEW */ - for ( QStringList::Iterator it = _files.begin(); + for ( TQStringList::Iterator it = _files.begin(); it != _files.end(); ++it ) { /* 2002-01-28 LEW */ @@ -281,14 +281,14 @@ void BackupDlg::show() return; } - connect( _proc, SIGNAL( processExited( KProcess* ) ), this, SLOT( slotProcessExited( KProcess* ) ) ); - connect( _proc, SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, SLOT( slotStdout( KProcess*, char*, int ) ) ); + connect( _proc, TQT_SIGNAL( processExited( KProcess* ) ), this, TQT_SLOT( slotProcessExited( KProcess* ) ) ); + connect( _proc, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, TQT_SLOT( slotStdout( KProcess*, char*, int ) ) ); startTimer( 1000 ); _proc->start( KProcess::NotifyOnExit, KProcess::Stdout ); - QDialog::show(); + TQDialog::show(); } void BackupDlg::slotProcessExited( KProcess* ) @@ -299,7 +299,7 @@ void BackupDlg::slotProcessExited( KProcess* ) if ( _fileName.length() > 0 ) { _archive->addFile( _fileSize, _fileMTime, _fileStartRecord, _totalRecords, _fileName ); - _fileName = QString::null; + _fileName = TQString::null; } TapeDrive::instance()->close(); @@ -349,7 +349,7 @@ void BackupDlg::slotStdout( KProcess*, char* buf, int len ) } } -void BackupDlg::slotEntry( const QString& name, int size, int mtime, int record ) +void BackupDlg::slotEntry( const TQString& name, int size, int mtime, int record ) { if ( _fileName.length() > 0 ) { _archive->addFile( _fileSize, _fileMTime, _fileStartRecord, record, _fileName ); @@ -364,7 +364,7 @@ void BackupDlg::slotEntry( const QString& name, int size, int mtime, int record _fileMTime = mtime; _fileStartRecord = record; - QString tmp; + TQString tmp; tmp.setNum( ++_numFiles ); _fileCount->setText( tmp ); _log->append( name ); @@ -395,7 +395,7 @@ void BackupDlg::slotAbort() _abort->setEnabled( FALSE ); } -void BackupDlg::timerEvent( QTimerEvent* ) +void BackupDlg::timerEvent( TQTimerEvent* ) { updateStats(); } @@ -406,10 +406,10 @@ void BackupDlg::updateStats() return; } - QString str; + TQString str; int elapsed = time( NULL ) - _startTime; - str = QString::fromUtf8( QCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8().data(), elapsed / 3600, elapsed / 60 % 60, elapsed % 60 ) ); + str = TQString::fromUtf8( TQCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8().data(), elapsed / 3600, elapsed / 60 % 60, elapsed % 60 ) ); _elapsedTime->setText( str ); int remain = 0; @@ -419,7 +419,7 @@ void BackupDlg::updateStats() if ( remain < 0 ) { remain = 0; } - str = QString::fromUtf8( QCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8().data(), remain / 3600, remain / 60 % 60, remain % 60 ) ); + str = TQString::fromUtf8( TQCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8().data(), remain / 3600, remain / 60 % 60, remain % 60 ) ); _timeRemaining->setText( str ); str = Util::kbytesToString( (int)_totalKBytes ); diff --git a/kdat/BackupDlg.h b/kdat/BackupDlg.h index d15f5c4..c3c602b 100644 --- a/kdat/BackupDlg.h +++ b/kdat/BackupDlg.h @@ -19,7 +19,7 @@ #ifndef _BackupDlg_h_ #define _BackupDlg_h_ -#include +#include class QLabel; class QPushButton; @@ -35,30 +35,30 @@ class TarParser; /** * @short Status dialog for backing up files. */ -class BackupDlg : public QDialog { +class BackupDlg : public TQDialog { Q_OBJECT KProcess* _proc; TarParser* _tarParser; - QString _archiveName; - QString _workingDir; - QStringList _files; + TQString _archiveName; + TQString _workingDir; + TQStringList _files; bool _oneFilesystem; bool _incremental; - QString _snapshot; + TQString _snapshot; bool _removeSnapshot; int _archiveSize; Tape* _tape; float _totalKBytes; uint _totalRecords; - QLabel* _elapsedTime; - QLabel* _timeRemaining; - QLabel* _kbytesWritten; - QLabel* _transferRate; - QLabel* _fileCount; + TQLabel* _elapsedTime; + TQLabel* _timeRemaining; + TQLabel* _kbytesWritten; + TQLabel* _transferRate; + TQLabel* _fileCount; LoggerWidget* _log; - QPushButton* _ok; - QPushButton* _save; - QPushButton* _abort; + TQPushButton* _ok; + TQPushButton* _save; + TQPushButton* _abort; int _startTime; Archive* _archive; bool _aborted; @@ -67,7 +67,7 @@ class BackupDlg : public QDialog { int _fileSize; int _fileMTime; int _fileStartRecord; - QString _fileName; + TQString _fileName; void updateStats(); private slots: @@ -75,10 +75,10 @@ private slots: void slotStdout( KProcess* proc, char* buf, int len ); void slotOK(); void slotAbort(); - void slotEntry( const QString& name, int size, int mtime, int record ); + void slotEntry( const TQString& name, int size, int mtime, int record ); protected: void show(); - void timerEvent( QTimerEvent* e ); + void timerEvent( TQTimerEvent* e ); public: /** * Create a backup dialog. @@ -95,9 +95,9 @@ public: * @param parent The parent widget for this dialog. * @param name The name of this widget. */ - BackupDlg( const QString & archiveName, const QString & workingDir, const QStringList& files, bool oneFilesystem, bool incremental, - const QString & snapshot, bool removeSnapshot, int archiveSize, Tape* tape, - QWidget* parent = 0, const char* name = 0 ); + BackupDlg( const TQString & archiveName, const TQString & workingDir, const TQStringList& files, bool oneFilesystem, bool incremental, + const TQString & snapshot, bool removeSnapshot, int archiveSize, Tape* tape, + TQWidget* parent = 0, const char* name = 0 ); /** * Destroy the backup dialog. diff --git a/kdat/BackupOptDlg.cpp b/kdat/BackupOptDlg.cpp index de4622a..b5311ac 100644 --- a/kdat/BackupOptDlg.cpp +++ b/kdat/BackupOptDlg.cpp @@ -18,7 +18,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -#include +#include #include #include @@ -30,8 +30,8 @@ #include "BackupOptDlg.moc" -BackupOptDlg::BackupOptDlg( BackupProfile* backupProfile, QWidget* parent, const char* name ) - : QDialog( parent, name, TRUE ) +BackupOptDlg::BackupOptDlg( BackupProfile* backupProfile, TQWidget* parent, const char* name ) + : TQDialog( parent, name, TRUE ) { setIconText( i18n( "KDat: Backup Options" ) ); setCaption( i18n( "KDat: Backup Options" ) ); @@ -43,15 +43,15 @@ BackupOptDlg::BackupOptDlg( BackupProfile* backupProfile, QWidget* parent, const KPushButton* ok = new KPushButton( KStdGuiItem::ok(), this ); ok->setFixedSize( 80, ok->sizeHint().height() ); - connect( ok, SIGNAL( clicked() ), this, SLOT( accept() ) ); + connect( ok, TQT_SIGNAL( clicked() ), this, TQT_SLOT( accept() ) ); KPushButton* cancel = new KPushButton( KStdGuiItem::cancel(), this ); cancel->setFixedSize( 80, ok->sizeHint().height() ); - connect( cancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); + connect( cancel, TQT_SIGNAL( clicked() ), this, TQT_SLOT( reject() ) ); - QVBoxLayout* l1 = new QVBoxLayout( this, 8, 4 ); + TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 ); l1->addWidget( _profile, 1 ); - QHBoxLayout* l1_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1 = new TQHBoxLayout(); l1->addLayout( l1_1 ); l1_1->addStretch( 1 ); l1_1->addWidget( ok ); @@ -64,17 +64,17 @@ BackupOptDlg::~BackupOptDlg() { } -QString BackupOptDlg::getArchiveName() +TQString BackupOptDlg::getArchiveName() { return _profile->getArchiveName(); } -QString BackupOptDlg::getWorkingDirectory() +TQString BackupOptDlg::getWorkingDirectory() { return _profile->getWorkingDirectory(); } -const QStringList& BackupOptDlg::getRelativeFiles() +const TQStringList& BackupOptDlg::getRelativeFiles() { return _profile->getRelativeFiles(); } @@ -89,7 +89,7 @@ bool BackupOptDlg::isIncremental() return _profile->isIncremental(); } -QString BackupOptDlg::getSnapshotFile() +TQString BackupOptDlg::getSnapshotFile() { return _profile->getSnapshotFile(); } diff --git a/kdat/BackupOptDlg.h b/kdat/BackupOptDlg.h index f76a7da..10047dc 100644 --- a/kdat/BackupOptDlg.h +++ b/kdat/BackupOptDlg.h @@ -19,7 +19,7 @@ #ifndef _BackupOptDlg_h_ #define _BackupOptDlg_h_ -#include +#include class BackupProfile; class BackupProfileWidget; @@ -27,7 +27,7 @@ class BackupProfileWidget; /** * @short Display/edit the parameters for a backup operation. */ -class BackupOptDlg : public QDialog { +class BackupOptDlg : public TQDialog { Q_OBJECT BackupProfileWidget* _profile; public: @@ -36,7 +36,7 @@ public: * * @param backupProfile The backup profile. */ - BackupOptDlg( BackupProfile* backupProfile, QWidget* parent=0, const char* name=0 ); + BackupOptDlg( BackupProfile* backupProfile, TQWidget* parent=0, const char* name=0 ); /** * Destroy the backup options dialog. @@ -48,21 +48,21 @@ public: * * @return The name of the new archive. */ - QString getArchiveName(); + TQString getArchiveName(); /** * Query the working directory for the tar command. * * @return The working directory. */ - QString getWorkingDirectory(); + TQString getWorkingDirectory(); /** * Query the list of files to backup, relative to the working directory. * * @return The file list. */ - const QStringList& getRelativeFiles(); + const TQStringList& getRelativeFiles(); /** * Query whether or not to cross filesystem boundaries when performing the @@ -85,7 +85,7 @@ public: * * @return The name of the snapshot file. */ - QString getSnapshotFile(); + TQString getSnapshotFile(); /** * Query whether to remove the snapshot file before beginning an diff --git a/kdat/BackupProfile.cpp b/kdat/BackupProfile.cpp index 2116005..72506d4 100644 --- a/kdat/BackupProfile.cpp +++ b/kdat/BackupProfile.cpp @@ -20,7 +20,7 @@ #include #include -#include +#include #include @@ -32,7 +32,7 @@ BackupProfile::BackupProfile() { } -BackupProfile::BackupProfile( const QString & name ) +BackupProfile::BackupProfile( const TQString & name ) : _name( name ), _lastSavedName( name ) { @@ -45,9 +45,9 @@ BackupProfile::~BackupProfile() void BackupProfile::load() { - QString filename = locateLocal( "appdata", _lastSavedName + ".bp"); + TQString filename = locateLocal( "appdata", _lastSavedName + ".bp"); - FILE* fptr = fopen( QFile::encodeName(filename), "r" ); + FILE* fptr = fopen( TQFile::encodeName(filename), "r" ); if ( !fptr ) { return; } @@ -76,7 +76,7 @@ void BackupProfile::load() sscanf( buf, "%d", &filecount ); for ( int i = 0; i < filecount; i++ ) { fgets( buf, 4096, fptr ); - QString filename = buf; + TQString filename = buf; filename.truncate( filename.length() - 1 ); _absoluteFiles.append( filename ); } @@ -105,7 +105,7 @@ void BackupProfile::load() void BackupProfile::save() { - QString filename = locateLocal( "appdata", _lastSavedName + ".bp"); + TQString filename = locateLocal( "appdata", _lastSavedName + ".bp"); bool null_name_p = _lastSavedName.isEmpty(); _lastSavedName = _name.copy(); @@ -114,9 +114,9 @@ void BackupProfile::save() return; } - unlink( QFile::encodeName(filename) ); + unlink( TQFile::encodeName(filename) ); - FILE* fptr = fopen( QFile::encodeName(filename), "w" ); + FILE* fptr = fopen( TQFile::encodeName(filename), "w" ); if ( !fptr ) { return; } @@ -126,7 +126,7 @@ void BackupProfile::save() fprintf( fptr, "%s\n", _archiveName.utf8().data() ); fprintf( fptr, "%s\n", _workingDirectory.utf8().data() ); fprintf( fptr, "%d\n", _absoluteFiles.count() ); - for ( QStringList::Iterator it = _absoluteFiles.begin(); + for ( TQStringList::Iterator it = _absoluteFiles.begin(); it != _absoluteFiles.end(); ++it ) fprintf( fptr, "%s\n", (*it).utf8().data() ); @@ -138,17 +138,17 @@ void BackupProfile::save() fclose( fptr ); } -QString BackupProfile::getName() +TQString BackupProfile::getName() { return _name; } -QString BackupProfile::getArchiveName() +TQString BackupProfile::getArchiveName() { return _archiveName; } -QString BackupProfile::getWorkingDirectory() +TQString BackupProfile::getWorkingDirectory() { return _workingDirectory; @@ -162,12 +162,12 @@ QString BackupProfile::getWorkingDirectory() #endif } -const QStringList& BackupProfile::getRelativeFiles() +const TQStringList& BackupProfile::getRelativeFiles() { return _relativeFiles; } -const QStringList& BackupProfile::getAbsoluteFiles() +const TQStringList& BackupProfile::getAbsoluteFiles() { return _absoluteFiles; } @@ -182,7 +182,7 @@ bool BackupProfile::isIncremental() return _incremental; } -QString BackupProfile::getSnapshotFile() +TQString BackupProfile::getSnapshotFile() { return _snapshotFile; } @@ -192,21 +192,21 @@ bool BackupProfile::getRemoveSnapshot() return _removeSnapshot; } -void BackupProfile::setName( const QString & name ) +void BackupProfile::setName( const TQString & name ) { _name = name; BackupProfileManager::instance()->backupProfileModified( this ); } -void BackupProfile::setArchiveName( const QString & archiveName ) +void BackupProfile::setArchiveName( const TQString & archiveName ) { _archiveName = archiveName; BackupProfileManager::instance()->backupProfileModified( this ); } -void BackupProfile::setWorkingDirectory( const QString & workingDirectory ) +void BackupProfile::setWorkingDirectory( const TQString & workingDirectory ) { _workingDirectory = workingDirectory; @@ -216,12 +216,12 @@ void BackupProfile::setWorkingDirectory( const QString & workingDirectory ) BackupProfileManager::instance()->backupProfileModified( this ); } -void BackupProfile::setAbsoluteFiles( const QStringList& files ) +void BackupProfile::setAbsoluteFiles( const TQStringList& files ) { _absoluteFiles = files; // Make sure working directory is still valid. - QStringList::Iterator it = _absoluteFiles.begin(); + TQStringList::Iterator it = _absoluteFiles.begin(); for ( ; it != _absoluteFiles.end(); ++it ) @@ -257,7 +257,7 @@ void BackupProfile::setIncremental( bool incremental ) BackupProfileManager::instance()->backupProfileModified( this ); } -void BackupProfile::setSnapshotFile( const QString & snapshotFile ) +void BackupProfile::setSnapshotFile( const TQString & snapshotFile ) { _snapshotFile = snapshotFile; @@ -279,11 +279,11 @@ void BackupProfile::calcRelativeFiles() remove++; } - for ( QStringList::Iterator it = _absoluteFiles.begin(); + for ( TQStringList::Iterator it = _absoluteFiles.begin(); it != _absoluteFiles.end(); ++it ) { - QString fn = *it; + TQString fn = *it; fn.remove( 0, remove ); if ( fn.isEmpty() ) { fn = "."; diff --git a/kdat/BackupProfile.h b/kdat/BackupProfile.h index 2438fc5..048690d 100644 --- a/kdat/BackupProfile.h +++ b/kdat/BackupProfile.h @@ -19,22 +19,22 @@ #ifndef _BackupProfile_h_ #define _BackupProfile_h_ -#include -#include +#include +#include /** * @short This class stores all the information necessary to perform a backup. */ class BackupProfile { - QString _name; - QString _lastSavedName; - QString _archiveName; - QString _workingDirectory; - QStringList _relativeFiles; - QStringList _absoluteFiles; + TQString _name; + TQString _lastSavedName; + TQString _archiveName; + TQString _workingDirectory; + TQStringList _relativeFiles; + TQStringList _absoluteFiles; bool _oneFilesystem; bool _incremental; - QString _snapshotFile; + TQString _snapshotFile; bool _removeSnapshot; void calcRelativeFiles(); @@ -49,7 +49,7 @@ public: * * @param name The name of the backup profile. */ - BackupProfile( const QString & name ); + BackupProfile( const TQString & name ); /** * Destroy the backup profile. @@ -72,35 +72,35 @@ public: * * @return The name of this profile. */ - QString getName(); + TQString getName(); /** * Query the name of the archive. * * @return The name of the new archive. */ - QString getArchiveName(); + TQString getArchiveName(); /** * Query the working directory for the tar command. * * @return The working directory. */ - QString getWorkingDirectory(); + TQString getWorkingDirectory(); /** * Query the list of files to backup, relative to the working directory. * * @return The file list. */ - const QStringList& getRelativeFiles(); + const TQStringList& getRelativeFiles(); /** * Query the list of files to backup, with their full paths. * * @return The file list. */ - const QStringList& getAbsoluteFiles(); + const TQStringList& getAbsoluteFiles(); /** * Query whether or not to cross filesystem boundaries when performing the @@ -123,7 +123,7 @@ public: * * @return The name of the snapshot file. */ - QString getSnapshotFile(); + TQString getSnapshotFile(); /** * Query whether to remove the snapshot file before beginning an @@ -138,28 +138,28 @@ public: * * @param name The name of this profile. */ - void setName( const QString & name ); + void setName( const TQString & name ); /** * Set the name of the archive. * * @param archiveName The name of the new archive. */ - void setArchiveName( const QString & archiveName ); + void setArchiveName( const TQString & archiveName ); /** * Set the working directory for the tar command. * * @param workingDirectory The working directory. */ - void setWorkingDirectory( const QString & workingDirectory ); + void setWorkingDirectory( const TQString & workingDirectory ); /** * Set the list of files to backup, with their full paths. * * @param files The file list. */ - void setAbsoluteFiles( const QStringList& files ); + void setAbsoluteFiles( const TQStringList& files ); /** * Set whether or not to cross filesystem boundaries when performing the @@ -183,7 +183,7 @@ public: * * @param snapshotFile The name of the snapshot file. */ - void setSnapshotFile( const QString & snapshotFile ); + void setSnapshotFile( const TQString & snapshotFile ); /** * Set whether to remove the snapshot file before beginning an diff --git a/kdat/BackupProfileInfoWidget.cpp b/kdat/BackupProfileInfoWidget.cpp index e294c04..7e4a918 100644 --- a/kdat/BackupProfileInfoWidget.cpp +++ b/kdat/BackupProfileInfoWidget.cpp @@ -19,9 +19,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -36,52 +36,52 @@ #include "BackupProfileInfoWidget.moc" -BackupProfileInfoWidget::BackupProfileInfoWidget( QWidget* parent, const char* name ) - : QWidget( parent, name ), +BackupProfileInfoWidget::BackupProfileInfoWidget( TQWidget* parent, const char* name ) + : TQWidget( parent, name ), _backupProfile( 0 ) { - QLabel* lbl1 = new QLabel( i18n( "Backup profile name:" ), this ); + TQLabel* lbl1 = new TQLabel( i18n( "Backup profile name:" ), this ); int max = lbl1->sizeHint().width(); lbl1->setFixedSize( max, lbl1->sizeHint().height() ); - _name = new QLineEdit( this ); + _name = new TQLineEdit( this ); _name->setFixedHeight( _name->sizeHint().height() ); _profile = new BackupProfileWidget( this ); - QPushButton* getSelection = new QPushButton( i18n( "Files >>" ), this ); + TQPushButton* getSelection = new TQPushButton( i18n( "Files >>" ), this ); getSelection->setFixedSize( 80, getSelection->sizeHint().height() ); - QPushButton* setSelection = new QPushButton( i18n( "<< Files" ), this ); + TQPushButton* setSelection = new TQPushButton( i18n( "<< Files" ), this ); setSelection->setFixedSize( 80, setSelection->sizeHint().height() ); _apply = new KPushButton( KStdGuiItem::apply(), this ); _apply->setFixedSize( 80, _apply->sizeHint().height() ); _apply->setEnabled( FALSE ); - QVBoxLayout* l1 = new QVBoxLayout( this, 4, 4 ); + TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 ); - QHBoxLayout* l1_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1 = new TQHBoxLayout(); l1->addLayout( l1_1 ); l1_1->addWidget( lbl1 ); l1_1->addWidget( _name, 1 ); l1->addWidget( _profile, 1 ); - QHBoxLayout* l1_2 = new QHBoxLayout(); + TQHBoxLayout* l1_2 = new TQHBoxLayout(); l1->addLayout( l1_2 ); l1_2->addWidget( setSelection ); l1_2->addWidget( getSelection ); l1_2->addStretch( 1 ); l1_2->addWidget( _apply ); - connect( setSelection, SIGNAL( clicked() ) , this, SLOT( slotSetSelection() ) ); - connect( getSelection, SIGNAL( clicked() ) , this, SLOT( slotGetSelection() ) ); - connect( _name , SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) ); - connect( _profile , SIGNAL( sigSomethingChanged() ) , this, SLOT( slotSomethingChanged() ) ); - connect( _apply , SIGNAL( clicked() ) , this, SLOT( slotApply() ) ); + connect( setSelection, TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotSetSelection() ) ); + connect( getSelection, TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotGetSelection() ) ); + connect( _name , TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) ); + connect( _profile , TQT_SIGNAL( sigSomethingChanged() ) , this, TQT_SLOT( slotSomethingChanged() ) ); + connect( _apply , TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotApply() ) ); } BackupProfileInfoWidget::~BackupProfileInfoWidget() @@ -111,8 +111,8 @@ bool BackupProfileInfoWidget::isModified() return TRUE; } - QString one = _backupProfile->getWorkingDirectory(); - QString two = _profile->getWorkingDirectory(); + TQString one = _backupProfile->getWorkingDirectory(); + TQString two = _profile->getWorkingDirectory(); // 7/31/01: this breaks // if ( _profile->getWorkingDirectory() != _backupProfile->getWorkingDirectory() ) { if( one != two ){ @@ -123,10 +123,10 @@ bool BackupProfileInfoWidget::isModified() return TRUE; } - QStringList list1 = _profile->getAbsoluteFiles(); - QStringList list2 = _backupProfile->getAbsoluteFiles(); - QStringList::Iterator i = list1.begin(); - QStringList::Iterator j = list2.begin(); + TQStringList list1 = _profile->getAbsoluteFiles(); + TQStringList list2 = _backupProfile->getAbsoluteFiles(); + TQStringList::Iterator i = list1.begin(); + TQStringList::Iterator j = list2.begin(); for ( ; i != list1.end(); ++i ) { for ( ; j != list2.end(); ++j ) { if ( *i == *j ) { @@ -158,7 +158,7 @@ bool BackupProfileInfoWidget::isModified() return FALSE; } -void BackupProfileInfoWidget::slotTextChanged( const QString & ) +void BackupProfileInfoWidget::slotTextChanged( const TQString & ) { if ( !_backupProfile ) { return; @@ -203,7 +203,7 @@ void BackupProfileInfoWidget::slotSetSelection() void BackupProfileInfoWidget::slotGetSelection() { - QStringList files; + TQStringList files; KDatMainWindow::getInstance()->getBackupFiles( files ); _profile->setAbsoluteFiles( files ); } diff --git a/kdat/BackupProfileInfoWidget.h b/kdat/BackupProfileInfoWidget.h index 413cf63..53ca292 100644 --- a/kdat/BackupProfileInfoWidget.h +++ b/kdat/BackupProfileInfoWidget.h @@ -19,23 +19,23 @@ #ifndef _BackupProfileInfoWidget_h_ #define _BackupProfileInfoWidget_h_ -#include +#include class BackupProfileWidget; /** * @short Display/edit information about a backup profile. */ -class BackupProfileInfoWidget : public QWidget { +class BackupProfileInfoWidget : public TQWidget { Q_OBJECT BackupProfile* _backupProfile; - QLineEdit* _name; + TQLineEdit* _name; BackupProfileWidget* _profile; - QPushButton* _apply; + TQPushButton* _apply; bool isModified(); private slots: - void slotTextChanged( const QString & text ); + void slotTextChanged( const TQString & text ); void slotSomethingChanged(); void slotApply(); void slotSetSelection(); @@ -44,7 +44,7 @@ public: /** * Create a new backup profile info widget. */ - BackupProfileInfoWidget( QWidget* parent = 0, const char* name = 0 ); + BackupProfileInfoWidget( TQWidget* parent = 0, const char* name = 0 ); /** * Destroy the backup profile widget. diff --git a/kdat/BackupProfileManager.cpp b/kdat/BackupProfileManager.cpp index 7fc2411..7b42ab7 100644 --- a/kdat/BackupProfileManager.cpp +++ b/kdat/BackupProfileManager.cpp @@ -19,8 +19,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -34,14 +34,14 @@ BackupProfileManager::BackupProfileManager() _backupProfiles.setAutoDelete( TRUE ); // Get a list of all available backup profiles. - QStringList relList; + TQStringList relList; (void) KGlobal::dirs()->findAllResources( "appdata", "*.bp", false, true, relList); - for(QStringList::Iterator it = relList.begin(); + for(TQStringList::Iterator it = relList.begin(); it != relList.end(); it++) { - QString fn = *it; + TQString fn = *it; // Strip extension _backupProfileNames.append( fn.left( fn.length() - 3 ) ); } @@ -62,12 +62,12 @@ BackupProfileManager* BackupProfileManager::instance() return _instance; } -const QStringList& BackupProfileManager::getBackupProfileNames() +const TQStringList& BackupProfileManager::getBackupProfileNames() { return _backupProfileNames; } -BackupProfile* BackupProfileManager::findBackupProfile( const QString & name ) +BackupProfile* BackupProfileManager::findBackupProfile( const TQString & name ) { BackupProfile* backupProfile = _backupProfiles[ name ]; @@ -97,10 +97,10 @@ void BackupProfileManager::removeBackupProfile( BackupProfile* backupProfile ) emit sigBackupProfileRemoved( backupProfile ); // Remove the index file. - QString filename = locateLocal( "appdata", - QString(backupProfile->getName()) + ".bp"); + TQString filename = locateLocal( "appdata", + TQString(backupProfile->getName()) + ".bp"); - unlink( QFile::encodeName(filename) ); + unlink( TQFile::encodeName(filename) ); _backupProfileNames.remove( backupProfile->getName() ); _backupProfiles.remove( backupProfile->getName() ); diff --git a/kdat/BackupProfileManager.h b/kdat/BackupProfileManager.h index fa6939e..418d807 100644 --- a/kdat/BackupProfileManager.h +++ b/kdat/BackupProfileManager.h @@ -19,8 +19,8 @@ #ifndef _BackupProfileManager_h_ #define _BackupProfileManager_h_ -#include -#include +#include +#include #include "BackupProfile.h" @@ -37,13 +37,13 @@ * * The BackupProfileManager follows the Singleton pattern. */ -class BackupProfileManager : public QObject { +class BackupProfileManager : public TQObject { Q_OBJECT static BackupProfileManager* _instance; - QDict _backupProfiles; - QStringList _backupProfileNames; + TQDict _backupProfiles; + TQStringList _backupProfileNames; BackupProfileManager(); public: @@ -59,9 +59,9 @@ public: /** * Get the list of all known backup profiles. * - * @return a QStringList containing the backup profile names. + * @return a TQStringList containing the backup profile names. */ - const QStringList& getBackupProfileNames(); + const TQStringList& getBackupProfileNames(); /** * Retrieve the named backup profile. @@ -69,7 +69,7 @@ public: * @param name The name of the backup profile. * @return A pointer to the backup profile. */ - BackupProfile* findBackupProfile( const QString & name ); + BackupProfile* findBackupProfile( const TQString & name ); /** * Add a new backup profile. diff --git a/kdat/BackupProfileWidget.cpp b/kdat/BackupProfileWidget.cpp index 0b4dfa0..45acb56 100644 --- a/kdat/BackupProfileWidget.cpp +++ b/kdat/BackupProfileWidget.cpp @@ -16,13 +16,13 @@ // along with this program; 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 +#include +#include #include @@ -33,58 +33,58 @@ #include "BackupProfileWidget.moc" -BackupProfileWidget::BackupProfileWidget( QWidget* parent, const char* name ) +BackupProfileWidget::BackupProfileWidget( TQWidget* parent, const char* name ) : KTabCtl( parent, name ) { - QWidget* one = new QWidget( this ); + TQWidget* one = new TQWidget( this ); addTab( one, i18n( "Backup" ) ); - QLabel* lbl1 = new QLabel( i18n( "Archive name:" ), one ); + TQLabel* lbl1 = new TQLabel( i18n( "Archive name:" ), one ); lbl1->setFixedSize( lbl1->sizeHint() ); - _archiveName = new QLineEdit( one ); + _archiveName = new TQLineEdit( one ); _archiveName->setFixedHeight( _archiveName->sizeHint().height() ); - QLabel* lbl2 = new QLabel( i18n( "Working folder:" ), one ); + TQLabel* lbl2 = new TQLabel( i18n( "Working folder:" ), one ); lbl2->setFixedSize( lbl2->sizeHint() ); - _workingDir = new QComboBox( FALSE, one ); + _workingDir = new TQComboBox( FALSE, one ); _workingDir->setFixedHeight( _workingDir->sizeHint().height() ); - QLabel* lbl3 = new QLabel( i18n( "Backup files:" ), one ); + TQLabel* lbl3 = new TQLabel( i18n( "Backup files:" ), one ); lbl3->setFixedHeight( lbl3->sizeHint().height() ); - _files = new QListBox( one ); + _files = new TQListBox( one ); - QWidget* two = new QWidget( this ); + TQWidget* two = new TQWidget( this ); addTab( two, i18n( "Tar Options" ) ); - _oneFilesystem = new QCheckBox( i18n( "Stay on one filesystem" ), two ); + _oneFilesystem = new TQCheckBox( i18n( "Stay on one filesystem" ), two ); _oneFilesystem->setFixedHeight( _oneFilesystem->sizeHint().height() ); - _incremental = new QCheckBox( i18n( "GNU listed incremental" ), two ); + _incremental = new TQCheckBox( i18n( "GNU listed incremental" ), two ); _incremental->setFixedHeight( _incremental->sizeHint().height() ); - connect( _incremental, SIGNAL( toggled( bool ) ), this, SLOT( slotIncrementalToggled( bool ) ) ); + connect( _incremental, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotIncrementalToggled( bool ) ) ); - _snapshotLabel = new QLabel( i18n( "Snapshot file:" ), two ); + _snapshotLabel = new TQLabel( i18n( "Snapshot file:" ), two ); _snapshotLabel->setFixedSize( _snapshotLabel->sizeHint() ); - _snapshotFile = new QLineEdit( two ); + _snapshotFile = new TQLineEdit( two ); _snapshotFile->setFixedHeight( _snapshotFile->sizeHint().height() ); - _removeSnapshot = new QCheckBox( i18n( "Remove snapshot file before backup" ), two ); + _removeSnapshot = new TQCheckBox( i18n( "Remove snapshot file before backup" ), two ); _removeSnapshot->setFixedHeight( _removeSnapshot->sizeHint().height() ); slotIncrementalToggled( FALSE ); - QVBoxLayout* l1 = new QVBoxLayout( one, 8, 4 ); + TQVBoxLayout* l1 = new TQVBoxLayout( one, 8, 4 ); - QHBoxLayout* l1_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1 = new TQHBoxLayout(); l1->addLayout( l1_1 ); l1_1->addWidget( lbl1 ); l1_1->addWidget( _archiveName, 1 ); - QHBoxLayout* l1_2 = new QHBoxLayout(); + TQHBoxLayout* l1_2 = new TQHBoxLayout(); l1->addLayout( l1_2 ); l1_2->addWidget( lbl2 ); l1_2->addWidget( _workingDir, 1 ); @@ -92,36 +92,36 @@ BackupProfileWidget::BackupProfileWidget( QWidget* parent, const char* name ) l1->addWidget( lbl3 ); l1->addWidget( _files, 1 ); - QVBoxLayout* l2 = new QVBoxLayout( two, 8, 4 ); + TQVBoxLayout* l2 = new TQVBoxLayout( two, 8, 4 ); l2->addWidget( _oneFilesystem ); l2->addWidget( _incremental ); - QHBoxLayout* l2_1 = new QHBoxLayout(); + TQHBoxLayout* l2_1 = new TQHBoxLayout(); l2->addLayout( l2_1 ); l2_1->addSpacing( 20 ); l2_1->addWidget( _snapshotLabel ); l2_1->addWidget( _snapshotFile, 1 ); - QHBoxLayout* l2_2 = new QHBoxLayout(); + TQHBoxLayout* l2_2 = new TQHBoxLayout(); l2->addLayout( l2_2 ); l2_2->addSpacing( 20 ); l2_2->addWidget( _removeSnapshot ); l2->addStretch( 1 ); - connect( _archiveName , SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) ); - connect( _workingDir , SIGNAL( activated( const QString & ) ) , this, SLOT( slotWorkingDirActivated( const QString & ) ) ); - connect( _oneFilesystem , SIGNAL( toggled( bool ) ) , this, SLOT( slotToggled( bool ) ) ); - connect( _incremental , SIGNAL( toggled( bool ) ) , this, SLOT( slotIncrementalToggled( bool ) ) ); - connect( _snapshotFile , SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) ); - connect( _removeSnapshot, SIGNAL( toggled( bool ) ) , this, SLOT( slotToggled( bool ) ) ); + connect( _archiveName , TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) ); + connect( _workingDir , TQT_SIGNAL( activated( const TQString & ) ) , this, TQT_SLOT( slotWorkingDirActivated( const TQString & ) ) ); + connect( _oneFilesystem , TQT_SIGNAL( toggled( bool ) ) , this, TQT_SLOT( slotToggled( bool ) ) ); + connect( _incremental , TQT_SIGNAL( toggled( bool ) ) , this, TQT_SLOT( slotIncrementalToggled( bool ) ) ); + connect( _snapshotFile , TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) ); + connect( _removeSnapshot, TQT_SIGNAL( toggled( bool ) ) , this, TQT_SLOT( slotToggled( bool ) ) ); } BackupProfileWidget::~BackupProfileWidget() { } -void BackupProfileWidget::slotTextChanged( const QString & ) +void BackupProfileWidget::slotTextChanged( const TQString & ) { emit sigSomethingChanged(); } @@ -140,21 +140,21 @@ void BackupProfileWidget::slotIncrementalToggled( bool set ) emit sigSomethingChanged(); } -void BackupProfileWidget::slotWorkingDirActivated( const QString & text ) +void BackupProfileWidget::slotWorkingDirActivated( const TQString & text ) { while ( FALSE == _relativeFiles.isEmpty() ) { - QString my_first = _relativeFiles.first(); + TQString my_first = _relativeFiles.first(); _relativeFiles.remove( my_first ); } _files->clear(); - QStringList::Iterator i = _absoluteFiles.begin(); + TQStringList::Iterator i = _absoluteFiles.begin(); int remove = text.length(); if ( remove > 1 ) { remove++; } for ( ; i != _absoluteFiles.end(); ++i ) { - QString fn = *i; + TQString fn = *i; fn.remove( 0, remove ); if ( fn.isEmpty() ) { fn = "."; @@ -175,8 +175,8 @@ void BackupProfileWidget::setBackupProfile( BackupProfile* backupProfile ) if ( !backupProfile->getWorkingDirectory().isNull() ) { for ( int ii = 0; ii < _workingDir->count(); ii++ ) { - QString one = _workingDir->text( ii ); - QString two = backupProfile->getWorkingDirectory(); + TQString one = _workingDir->text( ii ); + TQString two = backupProfile->getWorkingDirectory(); // if ( _workingDir->text( ii ) == backupProfile->getWorkingDirectory() ) { if( one == two ){ _workingDir->setCurrentItem( ii ); @@ -186,7 +186,7 @@ void BackupProfileWidget::setBackupProfile( BackupProfile* backupProfile ) } // slotWorkingDirActivated( _workingDir->currentText() ); - QString one = _workingDir->currentText(); + TQString one = _workingDir->currentText(); slotWorkingDirActivated( one ); _oneFilesystem->setChecked( backupProfile->isOneFilesystem() ); @@ -197,12 +197,12 @@ void BackupProfileWidget::setBackupProfile( BackupProfile* backupProfile ) slotIncrementalToggled( backupProfile->isIncremental() ); } -void BackupProfileWidget::setAbsoluteFiles( const QStringList& files ) +void BackupProfileWidget::setAbsoluteFiles( const TQStringList& files ) { // Copy the string list. _absoluteFiles = files; - QString prefix = Util::longestCommonPath( files ); + TQString prefix = Util::longestCommonPath( files ); _workingDir->clear(); for ( int pos = prefix.length(); pos > 0; pos = prefix.findRev( '/', pos - 1 ) ) { @@ -214,12 +214,12 @@ void BackupProfileWidget::setAbsoluteFiles( const QStringList& files ) slotWorkingDirActivated( _workingDir->currentText() ); } -QString BackupProfileWidget::getArchiveName() +TQString BackupProfileWidget::getArchiveName() { return _archiveName->text(); } -QString BackupProfileWidget::getWorkingDirectory() +TQString BackupProfileWidget::getWorkingDirectory() { if ( _workingDir->count() > 0 ) { return _workingDir->currentText(); @@ -228,12 +228,12 @@ QString BackupProfileWidget::getWorkingDirectory() } } -const QStringList& BackupProfileWidget::getRelativeFiles() +const TQStringList& BackupProfileWidget::getRelativeFiles() { return _relativeFiles; } -const QStringList& BackupProfileWidget::getAbsoluteFiles() +const TQStringList& BackupProfileWidget::getAbsoluteFiles() { return _absoluteFiles; } @@ -248,7 +248,7 @@ bool BackupProfileWidget::isIncremental() return _incremental->isChecked(); } -QString BackupProfileWidget::getSnapshotFile() +TQString BackupProfileWidget::getSnapshotFile() { return _snapshotFile->text(); } diff --git a/kdat/BackupProfileWidget.h b/kdat/BackupProfileWidget.h index 08826b9..945f725 100644 --- a/kdat/BackupProfileWidget.h +++ b/kdat/BackupProfileWidget.h @@ -20,7 +20,7 @@ #define _BackupProfileWidget_h_ #include -#include +#include class QCheckBox; class QComboBox; @@ -35,21 +35,21 @@ class BackupProfile; */ class BackupProfileWidget : public KTabCtl { Q_OBJECT - QLineEdit* _archiveName; - QComboBox* _workingDir; - QListBox* _files; - QCheckBox* _oneFilesystem; - QCheckBox* _incremental; - QLabel* _snapshotLabel; - QLineEdit* _snapshotFile; - QCheckBox* _removeSnapshot; - QStringList _absoluteFiles; - QStringList _relativeFiles; + TQLineEdit* _archiveName; + TQComboBox* _workingDir; + TQListBox* _files; + TQCheckBox* _oneFilesystem; + TQCheckBox* _incremental; + TQLabel* _snapshotLabel; + TQLineEdit* _snapshotFile; + TQCheckBox* _removeSnapshot; + TQStringList _absoluteFiles; + TQStringList _relativeFiles; private slots: - void slotTextChanged( const QString & text ); + void slotTextChanged( const TQString & text ); void slotIncrementalToggled( bool set ); void slotToggled( bool set ); - void slotWorkingDirActivated( const QString & text ); + void slotWorkingDirActivated( const TQString & text ); public: /** * Create a backup profile widget. @@ -59,7 +59,7 @@ public: * @param parent The parent widget of this dialog. * @param name The widget name of this dialog. */ - BackupProfileWidget( QWidget* parent=0, const char* name=0 ); + BackupProfileWidget( TQWidget* parent=0, const char* name=0 ); /** * Destroy the backup profile widget. @@ -78,35 +78,35 @@ public: * * @param files The list. */ - void setAbsoluteFiles( const QStringList& files ); + void setAbsoluteFiles( const TQStringList& files ); /** * Query the name of the archive. * * @return The name of the new archive. */ - QString getArchiveName(); + TQString getArchiveName(); /** * Query the working directory for the tar command. * * @return The working directory. */ - QString getWorkingDirectory(); + TQString getWorkingDirectory(); /** * Query the list of files to backup, relative to the working directory. * * @return The file list. */ - const QStringList& getRelativeFiles(); + const TQStringList& getRelativeFiles(); /** * Query the list of files to backup, with full paths. * * @return The file list. */ - const QStringList& getAbsoluteFiles(); + const TQStringList& getAbsoluteFiles(); /** * Query whether or not to cross filesystem boundaries when performing the @@ -129,7 +129,7 @@ public: * * @return The name of the snapshot file. */ - QString getSnapshotFile(); + TQString getSnapshotFile(); /** * Query whether to remove the snapshot file before beginning an diff --git a/kdat/ErrorHandler.cpp b/kdat/ErrorHandler.cpp index 7a60295..aee1c58 100644 --- a/kdat/ErrorHandler.cpp +++ b/kdat/ErrorHandler.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include //#include //#include @@ -45,7 +45,7 @@ void error_handler(int err_sig); void error_handler(int err_sig) { - QString base1a, base1b, base2a, base2b, msg1, msg2, msg3; + TQString base1a, base1b, base2a, base2b, msg1, msg2, msg3; int i; base1a = i18n( " caught.\nExit the program from File->Quit or do " @@ -64,44 +64,44 @@ void error_handler(int err_sig) switch (err_sig) { case SIGHUP: fprintf(stderr, "kdat: SIGHUP signal (\"Hangup (POSIX)\") caught\n"); - i = QMessageBox::critical( (QWidget *)NULL, + i = TQMessageBox::critical( (TQWidget *)NULL, msg3, i18n( "SIGHUP signal (\"Hangup (POSIX)\")" ).append( msg1 ), - QMessageBox::Ignore, QMessageBox::Abort, QMessageBox::NoButton); - if( i == QMessageBox::Abort ){ abort(); } + TQMessageBox::Ignore, TQMessageBox::Abort, TQMessageBox::NoButton); + if( i == TQMessageBox::Abort ){ abort(); } break; case SIGINT: fprintf(stderr, "kdat: SIGINT signal (\"Interrupt (ANSI)\") caught\n"); - i = QMessageBox::critical( (QWidget *)NULL, + i = TQMessageBox::critical( (TQWidget *)NULL, msg3, i18n( "SIGINT signal (\"Interrupt (ANSI)\")" ).append( msg1 ), - QMessageBox::Ignore, QMessageBox::Abort, QMessageBox::NoButton); - if( i == QMessageBox::Abort ){ abort(); } + TQMessageBox::Ignore, TQMessageBox::Abort, TQMessageBox::NoButton); + if( i == TQMessageBox::Abort ){ abort(); } break; case SIGFPE: fprintf(stderr, "kdat: SIGFPE signal (\"Floating-point exception (ANSI)\") caught\n"); - i = QMessageBox::critical( (QWidget *)NULL, + i = TQMessageBox::critical( (TQWidget *)NULL, msg3, i18n("SIGFPE signal (\"Floating-point exception (ANSI)\")").append (msg2), - QMessageBox::Ignore, QMessageBox::Abort, QMessageBox::NoButton); - if( i == QMessageBox::Abort ){ abort(); } + TQMessageBox::Ignore, TQMessageBox::Abort, TQMessageBox::NoButton); + if( i == TQMessageBox::Abort ){ abort(); } break; case SIGSEGV: fprintf(stderr, "kdat: SIGSEGV signal (\"Segmentation violation (ANSI)\") caught\n"); - i = QMessageBox::critical( (QWidget *)NULL, + i = TQMessageBox::critical( (TQWidget *)NULL, msg3, i18n( "SIGSEGV signal (\"Segmentation violation (ANSI)\")").append(msg2), /* button1, button2 */ - QMessageBox::Ignore, QMessageBox::Abort, QMessageBox::NoButton); - if( i == QMessageBox::Abort ){ abort(); } + TQMessageBox::Ignore, TQMessageBox::Abort, TQMessageBox::NoButton); + if( i == TQMessageBox::Abort ){ abort(); } break; case SIGTERM: fprintf(stderr, "kdat: SIGTERM signal (\"Termination (ANSI)\") caught\n"); - i = QMessageBox::critical( (QWidget *)NULL, + i = TQMessageBox::critical( (TQWidget *)NULL, msg3, i18n( "SIGTERM signal (\"Termination (ANSI)\")").append(msg1), - QMessageBox::Ignore, QMessageBox::Abort, QMessageBox::NoButton); - if( i == QMessageBox::Abort ){ abort(); } + TQMessageBox::Ignore, TQMessageBox::Abort, TQMessageBox::NoButton); + if( i == TQMessageBox::Abort ){ abort(); } break; } diff --git a/kdat/File.cpp b/kdat/File.cpp index 7fc8f97..fd766b3 100644 --- a/kdat/File.cpp +++ b/kdat/File.cpp @@ -21,7 +21,7 @@ #include "File.h" -File::File( File* parent, int size, int mtime, int startRecord, int endRecord, const QString & name ) +File::File( File* parent, int size, int mtime, int startRecord, int endRecord, const TQString & name ) : _stubbed( FALSE ), _name( name ), _parent( parent ) @@ -122,7 +122,7 @@ void File::readAll( int version ) { read( version ); - QPtrListIterator i( getChildren() ); + TQPtrListIterator i( getChildren() ); for ( ; i.current(); ++i ) { i.current()->readAll( version ); } @@ -156,7 +156,7 @@ void File::write( FILE* fptr ) // Child range list. ival = _ranges.getRanges().count(); fwrite( &ival, sizeof( ival ), 1, fptr ); - QPtrListIterator it( _ranges.getRanges() ); + TQPtrListIterator it( _ranges.getRanges() ); for ( ; it.current(); ++it ) { ival = it.current()->getStart(); fwrite( &ival, sizeof( ival ), 1, fptr ); @@ -178,7 +178,7 @@ void File::write( FILE* fptr ) ival = _children.count(); fwrite( &ival, sizeof( ival ), 1, fptr ); - QPtrListIterator i( _children ); + TQPtrListIterator i( _children ); int count = 0; for ( ; i.current(); ++i, count++ ) { // Fill in the file offset. @@ -226,16 +226,16 @@ int File::getEndRecord() return _union._data._endRecord; } -QString File::getName() +TQString File::getName() { read(); return _name; } -QString File::getFullPathName() +TQString File::getFullPathName() { - QString tmp = _name.copy(); + TQString tmp = _name.copy(); for ( File* parent = getParent(); parent; parent = parent->getParent() ) { tmp.prepend( parent->getName() ); } @@ -248,14 +248,14 @@ File* File::getParent() return _parent; } -const QPtrList& File::getChildren() +const TQPtrList& File::getChildren() { read(); return _children; } -const QPtrList& File::getRanges() +const TQPtrList& File::getRanges() { read(); @@ -276,10 +276,10 @@ void File::calcRanges() _ranges.clear(); _ranges.addRange( getStartRecord(), getEndRecord() ); - QPtrListIterator it( getChildren() ); + TQPtrListIterator it( getChildren() ); for ( ; it.current(); ++it ) { it.current()->calcRanges(); - QPtrListIterator it2( it.current()->getRanges() ); + TQPtrListIterator it2( it.current()->getRanges() ); for ( ; it2.current(); ++it2 ) { _ranges.addRange( it2.current()->getStart(), it2.current()->getEnd() ); } diff --git a/kdat/File.h b/kdat/File.h index 0dda512..75b1d87 100644 --- a/kdat/File.h +++ b/kdat/File.h @@ -21,8 +21,8 @@ #include -#include -#include +#include +#include #include "Range.h" #include "kdat.h" @@ -44,9 +44,9 @@ class File { int _offset; } _stub; } _union; - QString _name; + TQString _name; File* _parent; - QPtrList _children; + TQPtrList _children; RangeList _ranges; public: /** @@ -63,7 +63,7 @@ public: * the file's path name should be passed in. The rest of the * path is determined by this file entry's ancestors. */ - File( File* parent, int size, int mtime, int startRecord, int endRecord, const QString & name ); + File( File* parent, int size, int mtime, int startRecord, int endRecord, const TQString & name ); /** * Create a new stubbed instance of a file entry. The file pointer and @@ -153,14 +153,14 @@ public: * * @return The file's name. */ - QString getName(); + TQString getName(); /** * Get the full path name of the file. * * @return The full path to the file. */ - QString getFullPathName(); + TQString getFullPathName(); /** * Get the file entry's parent. A NULL parent indicates that this is one @@ -176,14 +176,14 @@ public: * * @return A list of the immediate children of this file entry. */ - const QPtrList& getChildren(); + const TQPtrList& getChildren(); /** * Get the list of ranges of this file and all of its children. * * @return A list of ranges. */ - const QPtrList& getRanges(); + const TQPtrList& getRanges(); /** * Add a new file entry as a child of this file entry. diff --git a/kdat/FileInfoWidget.cpp b/kdat/FileInfoWidget.cpp index 4a2a986..5b75cf7 100644 --- a/kdat/FileInfoWidget.cpp +++ b/kdat/FileInfoWidget.cpp @@ -22,10 +22,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -36,16 +36,16 @@ #include "FileInfoWidget.moc" -FileInfoWidget::FileInfoWidget( QWidget* parent, const char* name ) - : QWidget( parent, name ) +FileInfoWidget::FileInfoWidget( TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { - QLabel* lbl1 = new QLabel( i18n( "File name:" ), this ); - QLabel* lbl2 = new QLabel( i18n( "Created on:" ), this ); - QLabel* lbl3 = new QLabel( i18n( "Last modified:" ), this ); - QLabel* lbl4 = new QLabel( i18n( "Last accessed:" ), this ); - QLabel* lbl5 = new QLabel( i18n( "Size:" ), this ); - QLabel* lbl6 = new QLabel( i18n( "Owner:" ), this ); - QLabel* lbl7 = new QLabel( i18n( "Group:" ), this ); + TQLabel* lbl1 = new TQLabel( i18n( "File name:" ), this ); + TQLabel* lbl2 = new TQLabel( i18n( "Created on:" ), this ); + TQLabel* lbl3 = new TQLabel( i18n( "Last modified:" ), this ); + TQLabel* lbl4 = new TQLabel( i18n( "Last accessed:" ), this ); + TQLabel* lbl5 = new TQLabel( i18n( "Size:" ), this ); + TQLabel* lbl6 = new TQLabel( i18n( "Owner:" ), this ); + TQLabel* lbl7 = new TQLabel( i18n( "Group:" ), this ); int max = lbl1->sizeHint().width(); if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width(); @@ -63,60 +63,60 @@ FileInfoWidget::FileInfoWidget( QWidget* parent, const char* name ) lbl6->setFixedSize( max, lbl6->sizeHint().height() ); lbl7->setFixedSize( max, lbl7->sizeHint().height() ); - _fileName = new QLabel( "???", this ); + _fileName = new TQLabel( "???", this ); _fileName->setFixedHeight( _fileName->sizeHint().height() ); - _ctime = new QLabel( "???", this ); + _ctime = new TQLabel( "???", this ); _ctime->setFixedHeight( _ctime->sizeHint().height() ); - _mtime = new QLabel( "???", this ); + _mtime = new TQLabel( "???", this ); _mtime->setFixedHeight( _mtime->sizeHint().height() ); - _atime = new QLabel( "???", this ); + _atime = new TQLabel( "???", this ); _atime->setFixedHeight( _atime->sizeHint().height() ); - _size = new QLabel( "???", this ); + _size = new TQLabel( "???", this ); _size->setFixedHeight( _size->sizeHint().height() ); - _owner = new QLabel( "???", this ); + _owner = new TQLabel( "???", this ); _owner->setFixedHeight( _owner->sizeHint().height() ); - _group = new QLabel( "???", this ); + _group = new TQLabel( "???", this ); _group->setFixedHeight( _group->sizeHint().height() ); - QVBoxLayout* l1 = new QVBoxLayout( this, 4, 4 ); + TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 ); - QHBoxLayout* l1_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1 = new TQHBoxLayout(); l1->addLayout( l1_1 ); l1_1->addWidget( lbl1 ); l1_1->addWidget( _fileName, 1 ); - QHBoxLayout* l1_2 = new QHBoxLayout(); + TQHBoxLayout* l1_2 = new TQHBoxLayout(); l1->addLayout( l1_2 ); l1_2->addWidget( lbl2 ); l1_2->addWidget( _ctime, 1 ); - QHBoxLayout* l1_3 = new QHBoxLayout(); + TQHBoxLayout* l1_3 = new TQHBoxLayout(); l1->addLayout( l1_3 ); l1_3->addWidget( lbl3 ); l1_3->addWidget( _mtime, 1 ); - QHBoxLayout* l1_4 = new QHBoxLayout(); + TQHBoxLayout* l1_4 = new TQHBoxLayout(); l1->addLayout( l1_4 ); l1_4->addWidget( lbl4 ); l1_4->addWidget( _atime, 1 ); - QHBoxLayout* l1_5 = new QHBoxLayout(); + TQHBoxLayout* l1_5 = new TQHBoxLayout(); l1->addLayout( l1_5 ); l1_5->addWidget( lbl5 ); l1_5->addWidget( _size, 1 ); - QHBoxLayout* l1_6 = new QHBoxLayout(); + TQHBoxLayout* l1_6 = new TQHBoxLayout(); l1->addLayout( l1_6 ); l1_6->addWidget( lbl6 ); l1_6->addWidget( _owner, 1 ); - QHBoxLayout* l1_7 = new QHBoxLayout(); + TQHBoxLayout* l1_7 = new TQHBoxLayout(); l1->addLayout( l1_7 ); l1_7->addWidget( lbl7 ); l1_7->addWidget( _group, 1 ); @@ -128,7 +128,7 @@ FileInfoWidget::~FileInfoWidget() { } -void FileInfoWidget::setFile( const QString & name ) +void FileInfoWidget::setFile( const TQString & name ) { if ( name.isNull() ) { return; @@ -137,10 +137,10 @@ void FileInfoWidget::setFile( const QString & name ) _fileName->setText( name ); struct stat info; - lstat( QFile::encodeName(name), &info ); + lstat( TQFile::encodeName(name), &info ); - QString tmp; - QDateTime datetime; + TQString tmp; + TQDateTime datetime; datetime.setTime_t(info.st_ctime); _ctime->setText( KGlobal::locale()->formatDateTime(datetime, false) ); diff --git a/kdat/FileInfoWidget.h b/kdat/FileInfoWidget.h index c763886..9b2d227 100644 --- a/kdat/FileInfoWidget.h +++ b/kdat/FileInfoWidget.h @@ -19,22 +19,22 @@ #ifndef _FileInfoWidget_h_ #define _FileInfoWidget_h_ -#include +#include class QLabel; /** * @short Display information about a local file. */ -class FileInfoWidget : public QWidget { +class FileInfoWidget : public TQWidget { Q_OBJECT - QLabel* _fileName; - QLabel* _ctime; - QLabel* _mtime; - QLabel* _atime; - QLabel* _size; - QLabel* _owner; - QLabel* _group; + TQLabel* _fileName; + TQLabel* _ctime; + TQLabel* _mtime; + TQLabel* _atime; + TQLabel* _size; + TQLabel* _owner; + TQLabel* _group; public: /** * Create a new file info widget. @@ -42,7 +42,7 @@ public: * @param parent The parent widget. * @param name The name of this widget. */ - FileInfoWidget( QWidget* parent = 0, const char* name = 0 ); + FileInfoWidget( TQWidget* parent = 0, const char* name = 0 ); /** * Destroy the file info widget. @@ -52,7 +52,7 @@ public: /** * Display the information for the given file. */ - void setFile( const QString & name ); + void setFile( const TQString & name ); }; #endif diff --git a/kdat/FormatOptDlg.cpp b/kdat/FormatOptDlg.cpp index 8ed79f9..81a74f4 100644 --- a/kdat/FormatOptDlg.cpp +++ b/kdat/FormatOptDlg.cpp @@ -18,10 +18,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -34,14 +34,14 @@ #include "FormatOptDlg.moc" -FormatOptDlg::FormatOptDlg( const QString & def, QWidget* parent, const char* name ) - : QDialog( parent, name, TRUE ) +FormatOptDlg::FormatOptDlg( const TQString & def, TQWidget* parent, const char* name ) + : TQDialog( parent, name, TRUE ) { setIconText( i18n( "KDat: Format Options" ) ); setCaption( i18n( "KDat: Format Options" ) ); - QLabel* lbl1 = new QLabel( i18n( "Tape name:" ), this ); - QLabel* lbl2 = new QLabel( i18n( "Tape size:" ), this ); + TQLabel* lbl1 = new TQLabel( i18n( "Tape name:" ), this ); + TQLabel* lbl2 = new TQLabel( i18n( "Tape size:" ), this ); int max = lbl1->sizeHint().width(); if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width(); @@ -49,14 +49,14 @@ FormatOptDlg::FormatOptDlg( const QString & def, QWidget* parent, const char* na lbl1->setFixedSize( max, lbl1->sizeHint().height() ); lbl2->setFixedSize( max, lbl2->sizeHint().height() ); - _entry = new QLineEdit( this ); + _entry = new TQLineEdit( this ); _entry->setText( def ); _entry->setFixedHeight( _entry->sizeHint().height() ); - _tapeSize = new QLineEdit( this ); + _tapeSize = new TQLineEdit( this ); _tapeSize->setFixedSize( 48, _tapeSize->sizeHint().height() ); - _tapeSizeUnits = new QComboBox( this ); + _tapeSizeUnits = new TQComboBox( this ); _tapeSizeUnits->setFixedSize( 48, _tapeSizeUnits->sizeHint().height() ); _tapeSizeUnits->insertItem( "MB" ); _tapeSizeUnits->insertItem( "GB" ); @@ -66,10 +66,10 @@ FormatOptDlg::FormatOptDlg( const QString & def, QWidget* parent, const char* na KPushButton* cancel = new KPushButton( KStdGuiItem::cancel(), this ); cancel->setFixedSize( 80, cancel->sizeHint().height() ); - QVBoxLayout* l1 = new QVBoxLayout( this, 8, 4 ); - QHBoxLayout* l2 = new QHBoxLayout(); - QHBoxLayout* l3 = new QHBoxLayout(); - QHBoxLayout* l4 = new QHBoxLayout(); + TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 ); + TQHBoxLayout* l2 = new TQHBoxLayout(); + TQHBoxLayout* l3 = new TQHBoxLayout(); + TQHBoxLayout* l4 = new TQHBoxLayout(); l1->addLayout( l2, 0 ); l1->addLayout( l3, 0 ); @@ -94,9 +94,9 @@ FormatOptDlg::FormatOptDlg( const QString & def, QWidget* parent, const char* na _entry->setFocus(); _entry->selectAll(); - connect( _entry, SIGNAL( returnPressed() ), this, SLOT( okClicked() ) ); - connect( ok , SIGNAL( clicked() ) , this, SLOT( okClicked() ) ); - connect( cancel, SIGNAL( clicked() ) , this, SLOT( reject() ) ); + connect( _entry, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( okClicked() ) ); + connect( ok , TQT_SIGNAL( clicked() ) , this, TQT_SLOT( okClicked() ) ); + connect( cancel, TQT_SIGNAL( clicked() ) , this, TQT_SLOT( reject() ) ); int size = Options::instance()->getDefaultTapeSize(); if ( ( size >= 1024*1024 ) && ( size % ( 1024*1024 ) == 0 ) ) { @@ -131,7 +131,7 @@ void FormatOptDlg::okClicked() accept(); } -QString FormatOptDlg::getName() +TQString FormatOptDlg::getName() { return _name; } diff --git a/kdat/FormatOptDlg.h b/kdat/FormatOptDlg.h index b4c5540..b75baeb 100644 --- a/kdat/FormatOptDlg.h +++ b/kdat/FormatOptDlg.h @@ -19,8 +19,8 @@ #ifndef _FormatOptDlg_h_ #define _FormatOptDlg_h_ -#include -#include +#include +#include class QComboBox; class QLineEdit; @@ -28,13 +28,13 @@ class QLineEdit; /** * @short Display/edit options for formatting a tape. */ -class FormatOptDlg : public QDialog { +class FormatOptDlg : public TQDialog { Q_OBJECT - QString _name; + TQString _name; int _size; - QLineEdit* _entry; - QLineEdit* _tapeSize; - QComboBox* _tapeSizeUnits; + TQLineEdit* _entry; + TQLineEdit* _tapeSize; + TQComboBox* _tapeSizeUnits; private slots: void okClicked(); public: @@ -45,7 +45,7 @@ public: * @param parent The parent widget for the dialog. * @param name The name for the dialog. */ - FormatOptDlg( const QString & def, QWidget* parent=0, const char* name=0 ); + FormatOptDlg( const TQString & def, TQWidget* parent=0, const char* name=0 ); /** * Destroy the format options dialog. @@ -57,7 +57,7 @@ public: * * @return The name for the tape being formatted. */ - QString getName(); + TQString getName(); /** * Get the capacity of the new tape. diff --git a/kdat/ImageCache.cpp b/kdat/ImageCache.cpp index 016fc61..c50d807 100644 --- a/kdat/ImageCache.cpp +++ b/kdat/ImageCache.cpp @@ -16,7 +16,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -#include +#include #include #include @@ -26,24 +26,24 @@ ImageCache::ImageCache() { KIconLoader *l = KGlobal::iconLoader(); /* 2002-01-24 FP */ - // _archive = new QPixmap(l->iconPath("package", KIcon::Toolbar)); - _archive = new QPixmap(l->iconPath("tar", KIcon::Small)); + // _archive = new TQPixmap(l->iconPath("package", KIcon::Toolbar)); + _archive = new TQPixmap(l->iconPath("tar", KIcon::Small)); /* 2002-01-24 FP */ - _backup = new QPixmap(l->iconPath("kdat_backup", KIcon::Toolbar)); - _file = new QPixmap(l->iconPath("mime_empty", KIcon::Small)); - _folderClosed = new QPixmap(l->iconPath("folder_blue", KIcon::Small)); - _folderOpen = new QPixmap(l->iconPath("folder_blue_open", KIcon::Small)); - _restore = new QPixmap(l->iconPath("kdat_restore", KIcon::Toolbar)); - _selectAll = new QPixmap(l->iconPath("kdat_select_all", KIcon::Toolbar)); - _selectNone = new QPixmap(l->iconPath("kdat_select_none", KIcon::Toolbar)); - _selectSome = new QPixmap(l->iconPath("kdat_select_some", KIcon::Toolbar)); + _backup = new TQPixmap(l->iconPath("kdat_backup", KIcon::Toolbar)); + _file = new TQPixmap(l->iconPath("mime_empty", KIcon::Small)); + _folderClosed = new TQPixmap(l->iconPath("folder_blue", KIcon::Small)); + _folderOpen = new TQPixmap(l->iconPath("folder_blue_open", KIcon::Small)); + _restore = new TQPixmap(l->iconPath("kdat_restore", KIcon::Toolbar)); + _selectAll = new TQPixmap(l->iconPath("kdat_select_all", KIcon::Toolbar)); + _selectNone = new TQPixmap(l->iconPath("kdat_select_none", KIcon::Toolbar)); + _selectSome = new TQPixmap(l->iconPath("kdat_select_some", KIcon::Toolbar)); // 2002-01-28 FP - // _tape = new QPixmap(l->iconPath("kdat_archive", KIcon::Toolbar)); - _tape = new QPixmap(l->iconPath("kdat", KIcon::Small)); + // _tape = new TQPixmap(l->iconPath("kdat_archive", KIcon::Toolbar)); + _tape = new TQPixmap(l->iconPath("kdat", KIcon::Small)); // 2002-01-28 FP - _tapeMounted = new QPixmap(l->iconPath("kdat_mounted", KIcon::Toolbar)); - _tapeUnmounted = new QPixmap(l->iconPath("kdat_unmounted", KIcon::Toolbar)); - _verify = new QPixmap(l->iconPath("kdat_verify", KIcon::Toolbar)); + _tapeMounted = new TQPixmap(l->iconPath("kdat_mounted", KIcon::Toolbar)); + _tapeUnmounted = new TQPixmap(l->iconPath("kdat_unmounted", KIcon::Toolbar)); + _verify = new TQPixmap(l->iconPath("kdat_verify", KIcon::Toolbar)); } ImageCache::~ImageCache() @@ -71,67 +71,67 @@ ImageCache* ImageCache::instance() return _instance; } -const QPixmap* ImageCache::getArchive() +const TQPixmap* ImageCache::getArchive() { return _archive; } -const QPixmap* ImageCache::getBackup() +const TQPixmap* ImageCache::getBackup() { return _backup; } -const QPixmap* ImageCache::getFile() +const TQPixmap* ImageCache::getFile() { return _file; } -const QPixmap* ImageCache::getFolderClosed() +const TQPixmap* ImageCache::getFolderClosed() { return _folderClosed; } -const QPixmap* ImageCache::getFolderOpen() +const TQPixmap* ImageCache::getFolderOpen() { return _folderOpen; } -const QPixmap* ImageCache::getRestore() +const TQPixmap* ImageCache::getRestore() { return _restore; } -const QPixmap* ImageCache::getSelectAll() +const TQPixmap* ImageCache::getSelectAll() { return _selectAll; } -const QPixmap* ImageCache::getSelectNone() +const TQPixmap* ImageCache::getSelectNone() { return _selectNone; } -const QPixmap* ImageCache::getSelectSome() +const TQPixmap* ImageCache::getSelectSome() { return _selectSome; } -const QPixmap* ImageCache::getTape() +const TQPixmap* ImageCache::getTape() { return _tape; } -const QPixmap* ImageCache::getTapeMounted() +const TQPixmap* ImageCache::getTapeMounted() { return _tapeMounted; } -const QPixmap* ImageCache::getTapeUnmounted() +const TQPixmap* ImageCache::getTapeUnmounted() { return _tapeUnmounted; } -const QPixmap* ImageCache::getVerify() +const TQPixmap* ImageCache::getVerify() { return _verify; } diff --git a/kdat/ImageCache.h b/kdat/ImageCache.h index b9bf59b..acf9b29 100644 --- a/kdat/ImageCache.h +++ b/kdat/ImageCache.h @@ -27,19 +27,19 @@ class QPixmap; class ImageCache { static ImageCache* _instance; - QPixmap* _archive; - QPixmap* _backup; - QPixmap* _file; - QPixmap* _folderClosed; - QPixmap* _folderOpen; - QPixmap* _restore; - QPixmap* _selectAll; - QPixmap* _selectNone; - QPixmap* _selectSome; - QPixmap* _tape; - QPixmap* _tapeMounted; - QPixmap* _tapeUnmounted; - QPixmap* _verify; + TQPixmap* _archive; + TQPixmap* _backup; + TQPixmap* _file; + TQPixmap* _folderClosed; + TQPixmap* _folderOpen; + TQPixmap* _restore; + TQPixmap* _selectAll; + TQPixmap* _selectNone; + TQPixmap* _selectSome; + TQPixmap* _tape; + TQPixmap* _tapeMounted; + TQPixmap* _tapeUnmounted; + TQPixmap* _verify; ImageCache(); public: @@ -60,91 +60,91 @@ public: * * @return A pointer to the icon. */ - const QPixmap* getArchive(); + const TQPixmap* getArchive(); /** * Get the toolbar icon used for the backup action. * * @return A pointer to the icon. */ - const QPixmap* getBackup(); + const TQPixmap* getBackup(); /** * Get the tree-node icon used for files. * * @return A pointer to the icon. */ - const QPixmap* getFile(); + const TQPixmap* getFile(); /** * Get the tree-node icon used for a closed folder. * * @return A pointer to the icon. */ - const QPixmap* getFolderClosed(); + const TQPixmap* getFolderClosed(); /** * Get the tree-node icon used for an open folder. * * @return A pointer to the icon. */ - const QPixmap* getFolderOpen(); + const TQPixmap* getFolderOpen(); /** * Get the toolbar icon used for the restore action. * * @return A pointer to the icon. */ - const QPixmap* getRestore(); + const TQPixmap* getRestore(); /** * Get the tree-node icon used when all subnodes are selected. * * @return A pointer to the icon. */ - const QPixmap* getSelectAll(); + const TQPixmap* getSelectAll(); /** * Get the tree-node icon used when no subnodes are selected. * * @return A pointer to the icon. */ - const QPixmap* getSelectNone(); + const TQPixmap* getSelectNone(); /** * Get the tree-node icon used when some subnodes are selected. * * @return A pointer to the icon. */ - const QPixmap* getSelectSome(); + const TQPixmap* getSelectSome(); /** * Get the tree-node icon used for tape indexes. * * @return A pointer to the icon. */ - const QPixmap* getTape(); + const TQPixmap* getTape(); /** * Get the tree-node/toolbar icon used for a mounted tape drive. * * @return A pointer to the icon. */ - const QPixmap* getTapeMounted(); + const TQPixmap* getTapeMounted(); /** * Get the tree-node/toolbar icon used for an unmounted tape drive. * * @return A pointer to the icon. */ - const QPixmap* getTapeUnmounted(); + const TQPixmap* getTapeUnmounted(); /** * Get the toolbar icon used for the verify action. * * @return A pointer to the icon. */ - const QPixmap* getVerify(); + const TQPixmap* getVerify(); }; #endif diff --git a/kdat/IndexDlg.cpp b/kdat/IndexDlg.cpp index decea36..7a0d71a 100644 --- a/kdat/IndexDlg.cpp +++ b/kdat/IndexDlg.cpp @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -41,8 +41,8 @@ #include "IndexDlg.moc" -IndexDlg::IndexDlg( Tape* tape, QWidget* parent, const char* name ) - : QDialog( parent, name, TRUE ), +IndexDlg::IndexDlg( Tape* tape, TQWidget* parent, const char* name ) + : TQDialog( parent, name, TRUE ), _tarParser( NULL ), _tape( tape ), _archive( NULL ), @@ -63,109 +63,109 @@ IndexDlg::IndexDlg( Tape* tape, QWidget* parent, const char* name ) const int labelWidth = 96; - QFrame* f1 = new QFrame( this ); - f1->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + TQFrame* f1 = new TQFrame( this ); + f1->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - QFrame* f2 = new QFrame( this ); - f2->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + TQFrame* f2 = new TQFrame( this ); + f2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - QLabel* lbl1 = new QLabel( i18n( "Elapsed time:" ), f1 ); + TQLabel* lbl1 = new TQLabel( i18n( "Elapsed time:" ), f1 ); lbl1->setFixedSize( labelWidth, lbl1->sizeHint().height() ); - _elapsedTime = new QLabel( i18n( "00:00:00" ), f1 ); + _elapsedTime = new TQLabel( i18n( "00:00:00" ), f1 ); _elapsedTime->setFixedHeight( _elapsedTime->sizeHint().height() ); - QLabel* lbl2 = new QLabel( i18n( "Archives:" ), f2 ); + TQLabel* lbl2 = new TQLabel( i18n( "Archives:" ), f2 ); lbl2->setFixedSize( labelWidth, lbl2->sizeHint().height() ); - _archives = new QLabel( i18n( "0" ), f2 ); + _archives = new TQLabel( i18n( "0" ), f2 ); _archives->setFixedHeight( _archives->sizeHint().height() ); - QLabel* lbl3 = new QLabel( i18n( "KB read:" ), f1 ); + TQLabel* lbl3 = new TQLabel( i18n( "KB read:" ), f1 ); lbl3->setFixedSize( labelWidth, lbl3->sizeHint().height() ); - _kbytesRead = new QLabel( i18n( "0KB" ), f1 ); + _kbytesRead = new TQLabel( i18n( "0KB" ), f1 ); _kbytesRead->setFixedHeight( _kbytesRead->sizeHint().height() ); - QLabel* lbl4 = new QLabel( i18n( "Files:" ), f2 ); + TQLabel* lbl4 = new TQLabel( i18n( "Files:" ), f2 ); lbl4->setFixedSize( labelWidth, lbl4->sizeHint().height() ); - _files = new QLabel( i18n( "0" ), f2 ); + _files = new TQLabel( i18n( "0" ), f2 ); _files->setFixedHeight( _kbytesRead->sizeHint().height() ); - QLabel* lbl5 = new QLabel( i18n( "Transfer rate:" ), f1 ); + TQLabel* lbl5 = new TQLabel( i18n( "Transfer rate:" ), f1 ); lbl5->setFixedSize( labelWidth, lbl5->sizeHint().height() ); - _transferRate = new QLabel( i18n( "0KB/min" ), f1 ); + _transferRate = new TQLabel( i18n( "0KB/min" ), f1 ); _transferRate->setFixedHeight( _transferRate->sizeHint().height() ); - QLabel* lbl6 = new QLabel( i18n( "Total files:" ), f2 ); + TQLabel* lbl6 = new TQLabel( i18n( "Total files:" ), f2 ); lbl6->setFixedSize( labelWidth, lbl6->sizeHint().height() ); - _totalFiles = new QLabel( i18n( "0" ), f2 ); + _totalFiles = new TQLabel( i18n( "0" ), f2 ); _totalFiles->setFixedHeight( _totalFiles->sizeHint().height() ); _log = new LoggerWidget( i18n( "Index log:" ), this ); _ok = new KPushButton( KStdGuiItem::ok(), this ); _ok->setFixedSize( 80, _ok->sizeHint().height() ); - connect( _ok, SIGNAL( clicked() ), this, SLOT( slotOK() ) ); + connect( _ok, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOK() ) ); _ok->setEnabled( FALSE ); - _save = new QPushButton( i18n( "Save Log..." ), this ); + _save = new TQPushButton( i18n( "Save Log..." ), this ); _save->setFixedSize( 80, _save->sizeHint().height() ); - connect( _save, SIGNAL( clicked() ), _log, SLOT( save() ) ); + connect( _save, TQT_SIGNAL( clicked() ), _log, TQT_SLOT( save() ) ); _save->setEnabled( FALSE ); - _abort = new QPushButton( i18n( "Abort" ), this ); + _abort = new TQPushButton( i18n( "Abort" ), this ); _abort->setFixedSize( 80, _abort->sizeHint().height() ); - connect( _abort, SIGNAL( clicked() ), this, SLOT( slotAbort() ) ); + connect( _abort, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAbort() ) ); - QVBoxLayout* l1 = new QVBoxLayout( this, 8, 4 ); + TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 ); - QHBoxLayout* l1_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1 = new TQHBoxLayout(); l1->addLayout( l1_1 ); l1_1->addStrut( 3 * lbl1->height() + 16 ); l1_1->addWidget( f1 ); l1_1->addWidget( f2 ); - QVBoxLayout* l1_1_1 = new QVBoxLayout( f1, 4, 4 ); + TQVBoxLayout* l1_1_1 = new TQVBoxLayout( f1, 4, 4 ); - QHBoxLayout* l1_1_1_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1_1_1 = new TQHBoxLayout(); l1_1_1->addLayout( l1_1_1_1 ); l1_1_1_1->addWidget( lbl1 ); l1_1_1_1->addWidget( _elapsedTime, 1 ); - QHBoxLayout* l1_1_1_2 = new QHBoxLayout(); + TQHBoxLayout* l1_1_1_2 = new TQHBoxLayout(); l1_1_1->addLayout( l1_1_1_2 ); l1_1_1_2->addWidget( lbl3 ); l1_1_1_2->addWidget( _kbytesRead, 1 ); - QHBoxLayout* l1_1_1_3 = new QHBoxLayout(); + TQHBoxLayout* l1_1_1_3 = new TQHBoxLayout(); l1_1_1->addLayout( l1_1_1_3 ); l1_1_1_3->addWidget( lbl5 ); l1_1_1_3->addWidget( _transferRate, 1 ); - QVBoxLayout* l1_1_2 = new QVBoxLayout( f2, 4, 4 ); + TQVBoxLayout* l1_1_2 = new TQVBoxLayout( f2, 4, 4 ); - QHBoxLayout* l1_1_2_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1_2_1 = new TQHBoxLayout(); l1_1_2->addLayout( l1_1_2_1 ); l1_1_2_1->addWidget( lbl2 ); l1_1_2_1->addWidget( _archives, 1 ); - QHBoxLayout* l1_1_2_2 = new QHBoxLayout(); + TQHBoxLayout* l1_1_2_2 = new TQHBoxLayout(); l1_1_2->addLayout( l1_1_2_2 ); l1_1_2_2->addWidget( lbl4 ); l1_1_2_2->addWidget( _files, 1 ); - QHBoxLayout* l1_1_2_3 = new QHBoxLayout(); + TQHBoxLayout* l1_1_2_3 = new TQHBoxLayout(); l1_1_2->addLayout( l1_1_2_3 ); l1_1_2_3->addWidget( lbl6 ); l1_1_2_3->addWidget( _totalFiles, 1 ); l1->addWidget( _log, 1 ); - QHBoxLayout* l1_2 = new QHBoxLayout(); + TQHBoxLayout* l1_2 = new TQHBoxLayout(); l1->addLayout( l1_2 ); l1_2->addStretch( 1 ); l1_2->addWidget( _ok ); @@ -182,10 +182,10 @@ void IndexDlg::show() { startTimer( 100 ); - QDialog::show(); + TQDialog::show(); } -void IndexDlg::slotEntry( const QString & name, int size, int mtime, int record ) +void IndexDlg::slotEntry( const TQString & name, int size, int mtime, int record ) { if ( !_fileName.isEmpty() ) { _archive->addFile( _fileSize, _fileMTime, _fileStartRecord, record, _fileName ); @@ -200,7 +200,7 @@ void IndexDlg::slotEntry( const QString & name, int size, int mtime, int record // printf("IndexDlg::slotEntry called with \"%s\", %d bytes\n", name.latin1(), size); /* 2002-01-28 LEW */ - QString tmp; + TQString tmp; tmp.setNum( ++_numFiles ); _files->setText( tmp ); _totalFileCount++; @@ -225,7 +225,7 @@ void IndexDlg::slotAbort() _aborted = TRUE; } -void IndexDlg::timerEvent( QTimerEvent* ) +void IndexDlg::timerEvent( TQTimerEvent* ) { killTimers(); @@ -253,7 +253,7 @@ void IndexDlg::timerEvent( QTimerEvent* ) _startTime = time( NULL ); int oldElapsed = 0; - QString msg; + TQString msg; int count; char *buf = new char[Options::instance()->getTapeBlockSize()]; bool atLeastOneGoodRead = TRUE; @@ -263,7 +263,7 @@ void IndexDlg::timerEvent( QTimerEvent* ) delete _tarParser; _tarParser = new TarParser(); - connect( _tarParser, SIGNAL( sigEntry( const QString &, int, int, int ) ), this, SLOT( slotEntry( const QString &, int, int, int ) ) ); + connect( _tarParser, TQT_SIGNAL( sigEntry( const TQString &, int, int, int ) ), this, TQT_SLOT( slotEntry( const TQString &, int, int, int ) ) ); int endBlock = 0; int leftover = 0; @@ -280,7 +280,7 @@ void IndexDlg::timerEvent( QTimerEvent* ) msg = i18n( "Archive %1" ).arg( _archiveCount ); _archive = new Archive( _tape, 0, msg ); - _fileName = QString::null; + _fileName = TQString::null; _fileSize = -1; _fileMTime = -1; _fileStartRecord = -1; @@ -339,10 +339,10 @@ void IndexDlg::timerEvent( QTimerEvent* ) void IndexDlg::updateStats() { - QString str; + TQString str; int elapsed = time( NULL ) - _startTime; - str = QString::fromUtf8( QCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8(), elapsed / 3600, elapsed / 60 % 60, elapsed % 60 ) ); + str = TQString::fromUtf8( TQCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8(), elapsed / 3600, elapsed / 60 % 60, elapsed % 60 ) ); _elapsedTime->setText( str ); str = Util::kbytesToString( (int)_totalKBytes ); diff --git a/kdat/IndexDlg.h b/kdat/IndexDlg.h index e624cf5..96556db 100644 --- a/kdat/IndexDlg.h +++ b/kdat/IndexDlg.h @@ -19,8 +19,8 @@ #ifndef _IndexDlg_h_ #define _IndexDlg_h_ -#include -#include +#include +#include #include "Range.h" @@ -36,22 +36,22 @@ class TarParser; /** * @short Status dialog for recreating a tape index. */ -class IndexDlg : public QDialog { +class IndexDlg : public TQDialog { Q_OBJECT TarParser* _tarParser; Tape* _tape; Archive* _archive; - QString _leftover; - QLabel* _elapsedTime; - QLabel* _kbytesRead; - QLabel* _transferRate; - QLabel* _archives; - QLabel* _files; - QLabel* _totalFiles; + TQString _leftover; + TQLabel* _elapsedTime; + TQLabel* _kbytesRead; + TQLabel* _transferRate; + TQLabel* _archives; + TQLabel* _files; + TQLabel* _totalFiles; LoggerWidget* _log; - QPushButton* _ok; - QPushButton* _save; - QPushButton* _abort; + TQPushButton* _ok; + TQPushButton* _save; + TQPushButton* _abort; int _startTime; float _totalKBytes; int _archiveCount; @@ -63,16 +63,16 @@ class IndexDlg : public QDialog { int _fileSize; int _fileMTime; int _fileStartRecord; - QString _fileName; + TQString _fileName; void updateStats(); private slots: void slotOK(); void slotAbort(); - void slotEntry( const QString & name, int size, int mtime, int record ); + void slotEntry( const TQString & name, int size, int mtime, int record ); protected: void show(); - void timerEvent( QTimerEvent* e ); + void timerEvent( TQTimerEvent* e ); public: /** * Create a new tape index dialog. @@ -81,7 +81,7 @@ public: * @param parent The parent widget for this dialog. * @param name The name of this dialog. */ - IndexDlg( Tape* tape, QWidget* parent = 0, const char* name = 0 ); + IndexDlg( Tape* tape, TQWidget* parent = 0, const char* name = 0 ); /** * Destroy the tape index dialog. diff --git a/kdat/InfoShellWidget.cpp b/kdat/InfoShellWidget.cpp index e7c3189..fc96e8c 100644 --- a/kdat/InfoShellWidget.cpp +++ b/kdat/InfoShellWidget.cpp @@ -16,15 +16,15 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -#include -#include +#include +#include #include "InfoShellWidget.h" #include "InfoShellWidget.moc" -InfoShellWidget::InfoShellWidget( QWidget* parent, const char* name ) - : QWidget( parent, name ) +InfoShellWidget::InfoShellWidget( TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { } @@ -32,12 +32,12 @@ InfoShellWidget::~InfoShellWidget() { } -void InfoShellWidget::resizeEvent( QResizeEvent* ) +void InfoShellWidget::resizeEvent( TQResizeEvent* ) { if ( children() ) { - QObjectListIt i( *children() ); + TQObjectListIt i( *children() ); for ( ; i.current(); ++i ) { - ((QWidget*)i.current())->resize( size() ); + ((TQWidget*)i.current())->resize( size() ); } } } diff --git a/kdat/InfoShellWidget.h b/kdat/InfoShellWidget.h index c1379ee..f7046db 100644 --- a/kdat/InfoShellWidget.h +++ b/kdat/InfoShellWidget.h @@ -19,12 +19,12 @@ #ifndef _InfoShellWidget_h_ #define _InfoShellWidget_h_ -#include +#include /** * @short A suitable parent for the info widgets. */ -class InfoShellWidget : public QWidget { +class InfoShellWidget : public TQWidget { Q_OBJECT public: /** @@ -33,7 +33,7 @@ public: * @param parent The parent widget. * @param name The name of this widget. */ - InfoShellWidget( QWidget* parent = 0, const char* name = 0 ); + InfoShellWidget( TQWidget* parent = 0, const char* name = 0 ); /** * Destroy the info shell widget. @@ -43,7 +43,7 @@ protected: /** * Resize all children to fill all of the available space within the shell. */ - virtual void resizeEvent( QResizeEvent* e ); + virtual void resizeEvent( TQResizeEvent* e ); }; #endif diff --git a/kdat/KDatMainWindow.cpp b/kdat/KDatMainWindow.cpp index 925ad92..bd14b8e 100644 --- a/kdat/KDatMainWindow.cpp +++ b/kdat/KDatMainWindow.cpp @@ -22,12 +22,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -68,7 +68,7 @@ #include "kdat.h" #include "ktreeview.h" #include -#include +#include #include #include "KDatMainWindow.moc" @@ -97,75 +97,75 @@ KDatMainWindow::KDatMainWindow() setCaption( i18n( "KDat: " ) ); // Create object popup menus. - _tapeDriveMenu = new QPopupMenu(); - _tapeDriveMenu->insertItem( i18n( "Mount Tape" ) , this, SLOT( fileMountTape() ) ); - _tapeDriveMenu->insertItem( i18n( "Recreate Tape Index" ), this, SLOT( fileIndexTape() ) ); + _tapeDriveMenu = new TQPopupMenu(); + _tapeDriveMenu->insertItem( i18n( "Mount Tape" ) , this, TQT_SLOT( fileMountTape() ) ); + _tapeDriveMenu->insertItem( i18n( "Recreate Tape Index" ), this, TQT_SLOT( fileIndexTape() ) ); _tapeDriveMenu->insertSeparator(); - _tapeDriveMenu->insertItem( i18n( "Format Tape..." ), this, SLOT( fileFormatTape() ) ); + _tapeDriveMenu->insertItem( i18n( "Format Tape..." ), this, TQT_SLOT( fileFormatTape() ) ); - _archiveMenu = new QPopupMenu(); - _archiveMenu->insertItem( i18n( "Delete Archive" ), this, SLOT( fileDeleteArchive() ) ); + _archiveMenu = new TQPopupMenu(); + _archiveMenu->insertItem( i18n( "Delete Archive" ), this, TQT_SLOT( fileDeleteArchive() ) ); - _mountedArchiveMenu = new QPopupMenu(); - _mountedArchiveMenu->insertItem( i18n( "Verify..." ) , this, SLOT( fileVerify() ) ); - _mountedArchiveMenu->insertItem( i18n( "Restore..." ) , this, SLOT( fileRestore() ) ); + _mountedArchiveMenu = new TQPopupMenu(); + _mountedArchiveMenu->insertItem( i18n( "Verify..." ) , this, TQT_SLOT( fileVerify() ) ); + _mountedArchiveMenu->insertItem( i18n( "Restore..." ) , this, TQT_SLOT( fileRestore() ) ); _mountedArchiveMenu->insertSeparator(); - _mountedArchiveMenu->insertItem( i18n( "Delete Archive" ), this, SLOT( fileDeleteArchive() ) ); + _mountedArchiveMenu->insertItem( i18n( "Delete Archive" ), this, TQT_SLOT( fileDeleteArchive() ) ); - _mountedTapeFileMenu = new QPopupMenu(); - _mountedTapeFileMenu->insertItem( i18n( "Verify..." ) , this, SLOT( fileVerify() ) ); - _mountedTapeFileMenu->insertItem( i18n( "Restore..." ), this, SLOT( fileRestore() ) ); + _mountedTapeFileMenu = new TQPopupMenu(); + _mountedTapeFileMenu->insertItem( i18n( "Verify..." ) , this, TQT_SLOT( fileVerify() ) ); + _mountedTapeFileMenu->insertItem( i18n( "Restore..." ), this, TQT_SLOT( fileRestore() ) ); - _localFileMenu = new QPopupMenu(); - _localFileMenu->insertItem( i18n( "Backup..." ), this, SLOT( fileBackup() ) ); + _localFileMenu = new TQPopupMenu(); + _localFileMenu->insertItem( i18n( "Backup..." ), this, TQT_SLOT( fileBackup() ) ); - _tapeMenu = new QPopupMenu(); - _tapeMenu->insertItem( i18n( "Delete Tape Index" ), this, SLOT( fileDeleteIndex() ) ); + _tapeMenu = new TQPopupMenu(); + _tapeMenu->insertItem( i18n( "Delete Tape Index" ), this, TQT_SLOT( fileDeleteIndex() ) ); - _backupProfileRootMenu = new QPopupMenu(); - _backupProfileRootMenu->insertItem( i18n( "Create Backup Profile" ), this, SLOT( fileNewBackupProfile() ) ); + _backupProfileRootMenu = new TQPopupMenu(); + _backupProfileRootMenu->insertItem( i18n( "Create Backup Profile" ), this, TQT_SLOT( fileNewBackupProfile() ) ); - _backupProfileMenu = new QPopupMenu(); - _backupProfileMenu->insertItem( i18n( "Backup..." ), this, SLOT( fileBackup() ) ); + _backupProfileMenu = new TQPopupMenu(); + _backupProfileMenu->insertItem( i18n( "Backup..." ), this, TQT_SLOT( fileBackup() ) ); _backupProfileMenu->insertSeparator(); - _backupProfileMenu->insertItem( i18n( "Delete Backup Profile" ), this, SLOT( fileDeleteBackupProfile() ) ); + _backupProfileMenu->insertItem( i18n( "Delete Backup Profile" ), this, TQT_SLOT( fileDeleteBackupProfile() ) ); _fileMenu = new QPopupMenu; - _fileMenu->insertItem( i18n( "Backup..." ) , this, SLOT( fileBackup() ) ); - _fileMenu->insertItem( i18n( "Restore..." ) , this, SLOT( fileRestore() ) ); - _fileMenu->insertItem( i18n( "Verify..." ) , this, SLOT( fileVerify() ) ); - _fileMenu->insertItem( i18n( "Mount Tape" ) , this, SLOT( fileMountTape() ) ); - _fileMenu->insertItem( i18n( "Recreate Tape Index" ) , this, SLOT( fileIndexTape() ) ); - _fileMenu->insertItem( i18n( "Create Backup Profile" ), this, SLOT( fileNewBackupProfile() ) ); + _fileMenu->insertItem( i18n( "Backup..." ) , this, TQT_SLOT( fileBackup() ) ); + _fileMenu->insertItem( i18n( "Restore..." ) , this, TQT_SLOT( fileRestore() ) ); + _fileMenu->insertItem( i18n( "Verify..." ) , this, TQT_SLOT( fileVerify() ) ); + _fileMenu->insertItem( i18n( "Mount Tape" ) , this, TQT_SLOT( fileMountTape() ) ); + _fileMenu->insertItem( i18n( "Recreate Tape Index" ) , this, TQT_SLOT( fileIndexTape() ) ); + _fileMenu->insertItem( i18n( "Create Backup Profile" ), this, TQT_SLOT( fileNewBackupProfile() ) ); _fileMenu->insertSeparator(); - _fileMenu->insertItem( i18n( "Delete Archive" ) , this, SLOT( fileDeleteArchive() ) ); - _fileMenu->insertItem( i18n( "Delete Index" ) , this, SLOT( fileDeleteIndex() ) ); - _fileMenu->insertItem( i18n( "Delete Backup Profile" ), this, SLOT( fileDeleteBackupProfile() ) ); - _fileMenu->insertItem( i18n( "Format Tape..." ) , this, SLOT( fileFormatTape() ) ); + _fileMenu->insertItem( i18n( "Delete Archive" ) , this, TQT_SLOT( fileDeleteArchive() ) ); + _fileMenu->insertItem( i18n( "Delete Index" ) , this, TQT_SLOT( fileDeleteIndex() ) ); + _fileMenu->insertItem( i18n( "Delete Backup Profile" ), this, TQT_SLOT( fileDeleteBackupProfile() ) ); + _fileMenu->insertItem( i18n( "Format Tape..." ) , this, TQT_SLOT( fileFormatTape() ) ); _fileMenu->insertSeparator(); - _fileMenu->insertItem( SmallIcon("exit"), i18n( "&Quit" ) , this, SLOT( fileQuit() ), CTRL + Key_Q ); + _fileMenu->insertItem( SmallIcon("exit"), i18n( "&Quit" ) , this, TQT_SLOT( fileQuit() ), CTRL + Key_Q ); _editMenu = new QPopupMenu; - _editMenu->insertItem( SmallIcon("configure"), i18n( "Configure KDat..." ) , this, SLOT( editPreferences() ) ); + _editMenu->insertItem( SmallIcon("configure"), i18n( "Configure KDat..." ) , this, TQT_SLOT( editPreferences() ) ); _menu = new KMenuBar( this ); _menu->insertItem( i18n( "&File" ), _fileMenu ); _menu->insertItem( i18n( "&Settings" ), _editMenu ); _menu->insertSeparator(); - QString about = i18n( "KDat Version %1\n\nKDat is a tar-based tape archiver.\n\nCopyright (c) 1998-2000 Sean Vyain\nCopyright (c) 2001-2002 Lawrence Widman\nkdat@cardiothink.com" ).arg( KDAT_VERSION ); + TQString about = i18n( "KDat Version %1\n\nKDat is a tar-based tape archiver.\n\nCopyright (c) 1998-2000 Sean Vyain\nCopyright (c) 2001-2002 Lawrence Widman\nkdat@cardiothink.com" ).arg( KDAT_VERSION ); _menu->insertItem( i18n( "&Help" ), helpMenu( about ) ); _toolbar = new KToolBar( this ); - _toolbar->insertButton( *ImageCache::instance()->getTapeUnmounted(), 0, SIGNAL( clicked( int ) ), this, SLOT( fileMountTape() ), TRUE, i18n( "Mount/unmount tape" ) ); + _toolbar->insertButton( *ImageCache::instance()->getTapeUnmounted(), 0, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( fileMountTape() ), TRUE, i18n( "Mount/unmount tape" ) ); _toolbar->insertSeparator(); - _toolbar->insertButton( *ImageCache::instance()->getBackup() , 1, SIGNAL( clicked( int ) ), this, SLOT( fileBackup() ) , TRUE, i18n( "Backup" ) ); + _toolbar->insertButton( *ImageCache::instance()->getBackup() , 1, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( fileBackup() ) , TRUE, i18n( "Backup" ) ); _toolbar->setButtonIconSet( 1, BarIconSet("kdat_backup")); - _toolbar->insertButton( *ImageCache::instance()->getRestore(), 2, SIGNAL( clicked( int ) ), this, SLOT( fileRestore() ), TRUE, i18n( "Restore" ) ); + _toolbar->insertButton( *ImageCache::instance()->getRestore(), 2, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( fileRestore() ), TRUE, i18n( "Restore" ) ); _toolbar->setButtonIconSet( 2, BarIconSet("kdat_restore")); - _toolbar->insertButton( *ImageCache::instance()->getVerify() , 3, SIGNAL( clicked( int ) ), this, SLOT( fileVerify() ) , TRUE, i18n( "Verify" ) ); + _toolbar->insertButton( *ImageCache::instance()->getVerify() , 3, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( fileVerify() ) , TRUE, i18n( "Verify" ) ); _toolbar->setButtonIconSet( 3, BarIconSet("kdat_verify")); addToolBar( _toolbar ); @@ -173,9 +173,9 @@ KDatMainWindow::KDatMainWindow() _statusBar->insertItem( i18n( "Ready." ), 0 ); #ifdef KDAT_HORIZONTAL_LAYOUT /* 2002-01-20 LEW */ - _panner = new QSplitter( QSplitter::Horizontal, this, "panner"); + _panner = new TQSplitter( TQSplitter::Horizontal, this, "panner"); #else - _panner = new QSplitter( QSplitter::Vertical, this, "panner"); + _panner = new TQSplitter( TQSplitter::Vertical, this, "panner"); #endif /* KDAT_HORIZONTAL_LAYOUT */ // Create info viewers. @@ -197,12 +197,12 @@ KDatMainWindow::KDatMainWindow() _tree->setMinimumHeight( 300 ); #endif /* KDAT_HORIZONTAL_LAYOUT */ - connect( _tree, SIGNAL( expanding( KTreeViewItem*, bool& ) ), this, SLOT( localExpanding( KTreeViewItem*, bool& ) ) ); - connect( _tree, SIGNAL( expanded( int ) ), this, SLOT( localExpanded( int ) ) ); - connect( _tree, SIGNAL( collapsed( int ) ), this, SLOT( localCollapsed( int ) ) ); - connect( _tree, SIGNAL( selected( int ) ), this, SLOT( localSelected( int ) ) ); - connect( _tree, SIGNAL( highlighted( int ) ), this, SLOT( localHighlighted( int ) ) ); - connect( _tree, SIGNAL( popupMenu( int, const QPoint& ) ), this, SLOT( localPopupMenu( int, const QPoint& ) ) ); + connect( _tree, TQT_SIGNAL( expanding( KTreeViewItem*, bool& ) ), this, TQT_SLOT( localExpanding( KTreeViewItem*, bool& ) ) ); + connect( _tree, TQT_SIGNAL( expanded( int ) ), this, TQT_SLOT( localExpanded( int ) ) ); + connect( _tree, TQT_SIGNAL( collapsed( int ) ), this, TQT_SLOT( localCollapsed( int ) ) ); + connect( _tree, TQT_SIGNAL( selected( int ) ), this, TQT_SLOT( localSelected( int ) ) ); + connect( _tree, TQT_SIGNAL( highlighted( int ) ), this, TQT_SLOT( localHighlighted( int ) ) ); + connect( _tree, TQT_SIGNAL( popupMenu( int, const TQPoint& ) ), this, TQT_SLOT( localPopupMenu( int, const TQPoint& ) ) ); setCentralWidget( _panner ); @@ -211,14 +211,14 @@ KDatMainWindow::KDatMainWindow() _tree->insertItem( _backupProfileRootNode = new BackupProfileRootNode() ); _tree->insertItem( new TapeIndexRootNode() ); - connect( TapeDrive::instance(), SIGNAL( sigStatus( const QString & ) ), this, SLOT( status( const QString & ) ) ); + connect( TapeDrive::instance(), TQT_SIGNAL( sigStatus( const TQString & ) ), this, TQT_SLOT( status( const TQString & ) ) ); setTapePresent( FALSE ); - connect( Options::instance(), SIGNAL( sigTapeDevice() ), this, SLOT( slotTapeDevice() ) ); + connect( Options::instance(), TQT_SIGNAL( sigTapeDevice() ), this, TQT_SLOT( slotTapeDevice() ) ); - connect( TapeManager::instance(), SIGNAL( sigTapeMounted() ) , this, SLOT( slotTapeMounted() ) ); - connect( TapeManager::instance(), SIGNAL( sigTapeUnmounted() ), this, SLOT( slotTapeUnmounted() ) ); + connect( TapeManager::instance(), TQT_SIGNAL( sigTapeMounted() ) , this, TQT_SLOT( slotTapeMounted() ) ); + connect( TapeManager::instance(), TQT_SIGNAL( sigTapeUnmounted() ), this, TQT_SLOT( slotTapeUnmounted() ) ); configureUI( 0 ); } @@ -241,7 +241,7 @@ KDatMainWindow::~KDatMainWindow() } -void KDatMainWindow::popupTapeDriveMenu( const QPoint& p ) +void KDatMainWindow::popupTapeDriveMenu( const TQPoint& p ) { // Configure menu before popping up. if ( TapeManager::instance()->getMountedTape() ) { @@ -255,22 +255,22 @@ void KDatMainWindow::popupTapeDriveMenu( const QPoint& p ) _tapeDriveMenu->popup( p ); } -void KDatMainWindow::popupArchiveMenu( const QPoint& p ) +void KDatMainWindow::popupArchiveMenu( const TQPoint& p ) { _archiveMenu->popup( p ); } -void KDatMainWindow::popupMountedArchiveMenu( const QPoint& p ) +void KDatMainWindow::popupMountedArchiveMenu( const TQPoint& p ) { _mountedArchiveMenu->popup( p ); } -void KDatMainWindow::popupMountedTapeFileMenu( const QPoint& p ) +void KDatMainWindow::popupMountedTapeFileMenu( const TQPoint& p ) { _mountedTapeFileMenu->popup( p ); } -void KDatMainWindow::popupLocalFileMenu( const QPoint& p ) +void KDatMainWindow::popupLocalFileMenu( const TQPoint& p ) { // Configure menu before popping up. _localFileMenu->setItemEnabled( _localFileMenu->idAt( 0 ), ( TapeManager::instance()->getMountedTape() != 0 ) && ( !TapeDrive::instance()->isReadOnly() ) ); @@ -278,17 +278,17 @@ void KDatMainWindow::popupLocalFileMenu( const QPoint& p ) _localFileMenu->popup( p ); } -void KDatMainWindow::popupTapeMenu( const QPoint& p ) +void KDatMainWindow::popupTapeMenu( const TQPoint& p ) { _tapeMenu->popup( p ); } -void KDatMainWindow::popupBackupProfileRootMenu( const QPoint& p ) +void KDatMainWindow::popupBackupProfileRootMenu( const TQPoint& p ) { _backupProfileRootMenu->popup( p ); } -void KDatMainWindow::popupBackupProfileMenu( const QPoint& p ) +void KDatMainWindow::popupBackupProfileMenu( const TQPoint& p ) { // Configure menu before popping up. _backupProfileMenu->setItemEnabled( _backupProfileMenu->idAt( 0 ), ( TapeManager::instance()->getMountedTape() != 0 ) && ( !TapeDrive::instance()->isReadOnly() ) ); @@ -345,7 +345,7 @@ void KDatMainWindow::showTapeFileInfo( File* file ) _tapeFileInfo->show(); } -void KDatMainWindow::showFileInfo( const QString & name ) +void KDatMainWindow::showFileInfo( const TQString & name ) { assert( !name.isNull() ); @@ -402,7 +402,7 @@ void KDatMainWindow::localHighlighted( int index ) configureUI( TapeManager::instance()->getMountedTape() ); } -void KDatMainWindow::localPopupMenu( int index, const QPoint& p ) +void KDatMainWindow::localPopupMenu( int index, const TQPoint& p ) { Node* item = (Node*)_tree->itemAt( index ); item->popupMenu( p ); @@ -416,11 +416,11 @@ void KDatMainWindow::fileBackup() // To the i18n translator: I apologize for this long text on the last day to submit // i18n changes. But, the program isn't very usable without this information. Thanks. LEW // (later today): now the program works correctly! Why? Beats me! - QString msg = i18n("KDat will dump your files properly to tape, but may not be able\n" + TQString msg = i18n("KDat will dump your files properly to tape, but may not be able\n" "to restore them. To restore your files by hand, you need to know\n" "the name of the *non-rewinding* version of your tape device %1.\n" ).arg(Options::instance()->getTapeDevice()); - QString msg2 = i18n("For example, if your device is /dev/st0, the non-rewinding version\n" + TQString msg2 = i18n("For example, if your device is /dev/st0, the non-rewinding version\n" "is /dev/nst0. If your device name doesn't look like that, type\n" "\"ls -l %2\" in a terminal window to see the real name of your\n" "tape drive. Substitute that name for /dev/nst0 below.\n" @@ -445,11 +445,11 @@ void KDatMainWindow::fileBackup() backupProfile.setSnapshotFile( bp->getSnapshotFile() ); backupProfile.setRemoveSnapshot( bp->getRemoveSnapshot() ); } else { - QString name; - name = i18n( "Archive created on %1" ).arg( KGlobal::locale()->formatDate(QDate::currentDate(), true) ); + TQString name; + name = i18n( "Archive created on %1" ).arg( KGlobal::locale()->formatDate(TQDate::currentDate(), true) ); name = name.stripWhiteSpace(); - QStringList files; + TQStringList files; getBackupFiles( files ); backupProfile.setArchiveName( name ); @@ -462,7 +462,7 @@ void KDatMainWindow::fileBackup() int ret = 0; BackupOptDlg dlg( &backupProfile, this ); - if ( dlg.exec() == QDialog::Accepted ) { + if ( dlg.exec() == TQDialog::Accepted ) { // Begin backup. status( i18n( "Performing backup..." ) ); int size = calcBackupSize( dlg.getWorkingDirectory(), dlg.isOneFilesystem(), dlg.getRelativeFiles(), dlg.isIncremental(), dlg.getSnapshotFile(), dlg.getRemoveSnapshot() ); @@ -475,14 +475,14 @@ void KDatMainWindow::fileBackup() // Make sure the archive will fit on the tape. int tapeSize = 1; - QPtrListIterator i( TapeManager::instance()->getMountedTape()->getChildren() ); + TQPtrListIterator i( TapeManager::instance()->getMountedTape()->getChildren() ); if ( i.toLast() != NULL ) { tapeSize = i.current()->getEndBlock(); tapeSize = (int)((float)tapeSize / 1024.0 * (float)Options::instance()->getTapeBlockSize()) + 1; } if ( tapeSize + size >= TapeManager::instance()->getMountedTape()->getSize() ) { // Warn user that tape is probably too short. - QString msg; + TQString msg; msg = i18n( "WARNING: The estimated archive size is %1 KB but " "the tape has only %2 KB of space!\n" "Back up anyway?" ) @@ -531,7 +531,7 @@ void KDatMainWindow::fileBackup() } // All done. - if ( ret == QDialog::Accepted ) { + if ( ret == TQDialog::Accepted ) { status( i18n( "Backup complete." ) ); } else { status( i18n( "Backup aborted." ) ); @@ -552,7 +552,7 @@ void KDatMainWindow::doVerify( bool restore ) { RangeableNode* rangeableNode = 0; MountedArchiveNode* archiveNode = 0; - QStringList files; + TQStringList files; Archive* archive = 0; // Check for marked files first. for ( int i = _tapeDriveNode->childCount() - 1; i >= 0; i-- ) { @@ -586,7 +586,7 @@ void KDatMainWindow::doVerify( bool restore ) } assert( archive ); - QPtrListIterator it( archive->getTape()->getChildren() ); + TQPtrListIterator it( archive->getTape()->getChildren() ); int fileno; for ( fileno = 1; ( it.current() ) && ( it.current() != archive ); ++it, fileno++ ); @@ -595,7 +595,7 @@ void KDatMainWindow::doVerify( bool restore ) RangeList ranges; if ( rangeableNode ) { - QPtrListIterator it( rangeableNode->getRanges() ); + TQPtrListIterator it( rangeableNode->getRanges() ); for ( ; it.current(); ++it ) { ranges.addRange( it.current()->getStart(), it.current()->getEnd() ); } @@ -625,7 +625,7 @@ void KDatMainWindow::doVerify( bool restore ) } } else { // Compile a list of files to verify/restore. - QPtrStack stack; + TQPtrStack stack; // Make sure the mounted archive node has populated its children. if ( archiveNode->childCount() == 0 ) { @@ -640,7 +640,7 @@ void KDatMainWindow::doVerify( bool restore ) while ( stack.count() > 0 ) { sel = stack.pop(); if ( sel->isSelected() ) { - QPtrListIterator it( sel->getRanges() ); + TQPtrListIterator it( sel->getRanges() ); for ( ; it.current(); ++it ) { ranges.addRange( it.current()->getStart(), it.current()->getEnd() ); } @@ -662,7 +662,7 @@ void KDatMainWindow::doVerify( bool restore ) char buf[1024]; VerifyOptDlg dlg( getcwd( buf, 1024 ), files, restore, this ); - if ( dlg.exec() == QDialog::Accepted ) { + if ( dlg.exec() == TQDialog::Accepted ) { if ( restore ) { status( i18n( "Restore in progress..." ) ); } else { @@ -671,7 +671,7 @@ void KDatMainWindow::doVerify( bool restore ) VerifyDlg verifyDlg( dlg.getWorkingDirectory(), fileno, ranges, restore, this ); int ret = verifyDlg.exec(); - if ( ret == QDialog::Accepted ) { + if ( ret == TQDialog::Accepted ) { if ( restore ) { status( i18n( "Restore complete." ) ); } else { @@ -689,7 +689,7 @@ void KDatMainWindow::doVerify( bool restore ) void KDatMainWindow::fileMountTape() { - static QString msg; + static TQString msg; // construct helpful error message (same as in fileFormatTape()) msg = i18n("There appears to be no tape in the drive %1. Please\n" @@ -725,8 +725,8 @@ void KDatMainWindow::fileIndexTape() if ( result == KMessageBox::Continue) { TapeManager::instance()->getMountedTape()->clear(); IndexDlg dlg( TapeManager::instance()->getMountedTape(), this ); - if ( dlg.exec() == QDialog::Accepted ) { - QString title; + if ( dlg.exec() == TQDialog::Accepted ) { + TQString title; title = i18n( "KDat: %1" ).arg( TapeManager::instance()->getMountedTape()->getName() ); setCaption( title ); setIconText( title ); @@ -758,7 +758,7 @@ void KDatMainWindow::fileDeleteArchive() assert( archive ); Tape* tape = archive->getTape(); - QPtrListIterator i( tape->getChildren() ); + TQPtrListIterator i( tape->getChildren() ); for ( ; i.current(); ++i ) { if ( i.current() == archive ) { break; @@ -769,13 +769,13 @@ void KDatMainWindow::fileDeleteArchive() ++i; if ( i.current() ) { // There are other archives after this one on the tape. - QString list; + TQString list; for ( ; i.current(); ++i ) { list.append( "\n " ); list.append( i.current()->getName() ); } - QString msg = + TQString msg = i18n( "An archive cannot be removed from the middle of the tape. If\nthe archive '%1' is deleted then\nthe following archives will also be deleted:\n%2\n\nDelete all listed archives?" ).arg(archive->getName()).arg(list); int result = KMessageBox::warningContinueCancel( this, msg, i18n("Delete Archive"), i18n("Delete All")); @@ -789,7 +789,7 @@ void KDatMainWindow::fileDeleteArchive() } } else { // This is the last (known) archive on the tape. - QString msg = + TQString msg = i18n( "Really delete the archive '%1'?" ).arg(archive->getName()); int result = KMessageBox::warningContinueCancel( this, msg, i18n("Delete Archive"), i18n("Delete")); @@ -823,7 +823,7 @@ void KDatMainWindow::fileDeleteIndex() return; } - QString msg = + TQString msg = i18n( "Really delete the index for '%1'?" ).arg(tape->getName()); int result = KMessageBox::warningContinueCancel( this, msg, i18n("Delete Tape Index"), i18n("Delete")); @@ -839,7 +839,7 @@ void KDatMainWindow::fileDeleteIndex() void KDatMainWindow::fileFormatTape() { - static QString msg; + static TQString msg; // construct helpful error message (same as in fileMountTape()) msg = i18n("There appears to be no tape in the drive %1. Please\n" @@ -864,10 +864,10 @@ void KDatMainWindow::fileFormatTape() "Are you sure you want to continue?" ), i18n("Format Tape"), i18n("Format")); if (result == KMessageBox::Continue ) { - QString name; - name = i18n( "Tape created on %1" ).arg( KGlobal::locale()->formatDate(QDate::currentDate(), true) ); + TQString name; + name = i18n( "Tape created on %1" ).arg( KGlobal::locale()->formatDate(TQDate::currentDate(), true) ); FormatOptDlg dlg( name.stripWhiteSpace(), this ); - if ( dlg.exec() != QDialog::Accepted ) { + if ( dlg.exec() != TQDialog::Accepted ) { return; } @@ -896,11 +896,11 @@ void KDatMainWindow::fileNewBackupProfile() BackupProfile* backupProfile = new BackupProfile(); // Pick a unique name. - QString name; + TQString name; for ( int i = 1; ; i++ ) { name = i18n( "Backup Profile %1").arg( i ); - QStringList list = BackupProfileManager::instance()->getBackupProfileNames(); - QStringList::Iterator it = list.begin(); + TQStringList list = BackupProfileManager::instance()->getBackupProfileNames(); + TQStringList::Iterator it = list.begin(); for ( ; it != list.end(); ++it ) { if ( name == *it ) { break; @@ -912,7 +912,7 @@ void KDatMainWindow::fileNewBackupProfile() } } - QStringList files; + TQStringList files; getBackupFiles( files ); backupProfile->setName( name ); @@ -945,7 +945,7 @@ void KDatMainWindow::fileDeleteBackupProfile() BackupProfile* backupProfile = ((BackupProfileNode*)sel)->getBackupProfile(); assert( backupProfile ); - QString msg = + TQString msg = i18n("Really delete backup profile '%1'?").arg(backupProfile->getName()); int result = KMessageBox::warningContinueCancel( this, msg, i18n("Delete Backup Profile"), i18n("Delete")); @@ -1003,7 +1003,7 @@ void KDatMainWindow::setTapePresent( bool tapePresent, bool eject ) KMessageBox::sorry( this, i18n( "This tape has not been formatted by KDat." )); } else { int result = KMessageBox::questionYesNo( this, - i18n( "This tape has not been formatted by KDat.\n\nWould you like to format it now?" ), QString::null, i18n("Format"), i18n("Do Not Format")); + i18n( "This tape has not been formatted by KDat.\n\nWould you like to format it now?" ), TQString::null, i18n("Format"), i18n("Do Not Format")); if (result == KMessageBox::Yes) { fileFormatTape(); return; @@ -1020,7 +1020,7 @@ void KDatMainWindow::setTapePresent( bool tapePresent, bool eject ) } } -void KDatMainWindow::status( const QString & msg ) +void KDatMainWindow::status( const TQString & msg ) { _statusBar->changeItem( msg, 0 ); KApplication::kApplication()->processEvents(); @@ -1035,26 +1035,26 @@ void KDatMainWindow::show() // 2002-01-21 LEW: returns backup size in KB, or -1 if user chose // to abort the backup. -int KDatMainWindow::calcBackupSize( const QString& workingDir, bool local, const QStringList& files, - bool incremental, const QString& snapshot, bool removeSnapshot ) +int KDatMainWindow::calcBackupSize( const TQString& workingDir, bool local, const TQStringList& files, + bool incremental, const TQString& snapshot, bool removeSnapshot ) { int return_value; - chdir( QFile::encodeName(workingDir) ); + chdir( TQFile::encodeName(workingDir) ); bool useSnapshot = !snapshot.isEmpty() && !removeSnapshot; int tmp = 0; if ( incremental && !removeSnapshot ) { - QFile snap( snapshot ); + TQFile snap( snapshot ); if ( snap.exists() && snap.open( IO_ReadOnly ) ) { - QTextStream t( &snap ); + TQTextStream t( &snap ); t >> tmp; } else { useSnapshot = FALSE; } } - QDateTime mtime; + TQDateTime mtime; mtime.setTime_t( tmp ); int size = 0; @@ -1065,12 +1065,12 @@ int KDatMainWindow::calcBackupSize( const QString& workingDir, bool local, const // cancelled the backup via the dialog. /* 2002-01-24 LEW: end of backup-cancel dialog */ - QStringList filesTmp = files; - QStringList::Iterator ii = filesTmp.begin(); + TQStringList filesTmp = files; + TQStringList::Iterator ii = filesTmp.begin(); for ( ; ii != filesTmp.end(); ++ii ) { // Is this a normal file, or a directory? - QFileInfo finfo( *ii ); + TQFileInfo finfo( *ii ); if ( !finfo.isDir() ) { if ( ( !useSnapshot ) || ( finfo.lastModified() > mtime ) ) { size += finfo.size() / 512; @@ -1081,34 +1081,34 @@ int KDatMainWindow::calcBackupSize( const QString& workingDir, bool local, const continue; } - QPtrStack dirStack; - dirStack.push( new QString( *ii ) ); + TQPtrStack dirStack; + dirStack.push( new TQString( *ii ) ); // If stay on one file system, get device of starting directory. dev_t device = 0; struct stat info; if ( local ) { - if ( lstat( QFile::encodeName(*ii), &info ) != 0 ) { + if ( lstat( TQFile::encodeName(*ii), &info ) != 0 ) { device = 0; } else { device = info.st_dev; } } - QString msg; + TQString msg; // msg.truncate( 4095 ); - QDir dir; + TQDir dir; const QFileInfoList* infoList; while ( !dirStack.isEmpty() ) { if( stop_flag == TRUE ) break; - QString* path = dirStack.pop(); + TQString* path = dirStack.pop(); msg = i18n("Estimating backup size: %1, %2" ) .arg(Util::kbytesToString( size / 2 )) .arg(KStringHandler::csqueeze(*path, 60)); status( msg ); KApplication::kApplication()->processEvents(); dir.setPath( *path ); - infoList = dir.entryInfoList( QDir::Hidden | QDir::Files | QDir::Dirs, 0 ); + infoList = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, 0 ); if ( infoList ) { QFileInfoListIterator i( *infoList ); for ( ; i.current(); ++i ) { @@ -1117,13 +1117,13 @@ int KDatMainWindow::calcBackupSize( const QString& workingDir, bool local, const if ( i.current()->isSymLink() ) { } else if ( i.current()->isDir() ) { if ( local ) { - if ( lstat( QFile::encodeName(i.current()->absFilePath()), &info ) == 0 ) { + if ( lstat( TQFile::encodeName(i.current()->absFilePath()), &info ) == 0 ) { if ( device == info.st_dev ) { - dirStack.push( new QString( i.current()->absFilePath() ) ); + dirStack.push( new TQString( i.current()->absFilePath() ) ); } } } else { - dirStack.push( new QString( i.current()->absFilePath() ) ); + dirStack.push( new TQString( i.current()->absFilePath() ) ); } } else if ( ( !useSnapshot ) || ( i.current()->lastModified() > mtime ) ) { size += i.current()->size() / 512; @@ -1147,7 +1147,7 @@ int KDatMainWindow::calcBackupSize( const QString& workingDir, bool local, const return return_value; } -void KDatMainWindow::getBackupFiles( QStringList& files ) +void KDatMainWindow::getBackupFiles( TQStringList& files ) { if ( !_rootNode->isSelected() && !_rootNode->hasSelectedChildren() ) { // Backup the entire subtree. @@ -1156,7 +1156,7 @@ void KDatMainWindow::getBackupFiles( QStringList& files ) } } else { // Compile a list of files to backup. - QPtrStack stack; + TQPtrStack stack; stack.push( _rootNode ); ArchiveableNode* sel = 0; while ( stack.count() > 0 ) { @@ -1172,13 +1172,13 @@ void KDatMainWindow::getBackupFiles( QStringList& files ) } } -void KDatMainWindow::setBackupFiles( const QStringList& files ) +void KDatMainWindow::setBackupFiles( const TQStringList& files ) { _rootNode->setSelected( FALSE ); - QString tmp; - QStringList filesTmp = files; - QStringList::Iterator it = filesTmp.begin(); + TQString tmp; + TQStringList filesTmp = files; + TQStringList::Iterator it = filesTmp.begin(); for ( ; it != filesTmp.end(); ++it ) { ArchiveableNode* n = _rootNode; while ( n ) { @@ -1231,7 +1231,7 @@ void KDatMainWindow::configureUI( Tape* tape ) // Title bar if ( tape ) { - QString title; + TQString title; title = i18n( "KDat: %1" ).arg(tape->getName()); setCaption( title ); setIconText( title ); @@ -1311,7 +1311,7 @@ void KDatMainWindow::configureUI( Tape* tape ) void KDatMainWindow::readProperties( KConfig* config ) { - QValueList sizes; + TQValueList sizes; sizes << config->readNumEntry( "panner", 50 ); _panner->setSizes( sizes ); } @@ -1325,7 +1325,7 @@ void KDatMainWindow::saveProperties( KConfig* config ) void KDatMainWindow::create_backup_dialog() { /* 2002-01-24 LEW: start of backup-cancel dialog */ - static QString stop_button_text, stop_button_caption; + static TQString stop_button_text, stop_button_caption; stop_button_text = i18n("Click \"CANCEL\" to stop the backup process.\n" "For example, you may quickly see that the size of\n" @@ -1343,26 +1343,26 @@ void KDatMainWindow::create_backup_dialog() // _backupdialog->resize(370,200); /* 2002-01-28 LEW */ _backupdialog->resize(370,260); - _lbl = new QLabel( stop_button_text, _backupdialog ); - // _lbl->setGeometry( QRect( 30, 20, 350, 140 ) ); /* 2002-01-28 LEW */ - _lbl->setGeometry( QRect( 30, 20, 350, 200 ) ); + _lbl = new TQLabel( stop_button_text, _backupdialog ); + // _lbl->setGeometry( TQRect( 30, 20, 350, 140 ) ); /* 2002-01-28 LEW */ + _lbl->setGeometry( TQRect( 30, 20, 350, 200 ) ); _cancel = new KPushButton( KStdGuiItem::cancel(), _backupdialog ); _cancel->setFixedSize( 80, _cancel->sizeHint().height() ); _cancel->setEnabled( TRUE ); /* 2002-01-24 LEW: looks like we can't increase the button width to accomodate a wider message :( */ - // _cancel->setGeometry( QRect( 50, 170, 0, 0 ) ); /* 2002-01-28 LEW */ - _cancel->setGeometry( QRect( 50, 230, 0, 0 ) ); - connect( _cancel, SIGNAL( clicked() ), this, SLOT( backupCancel() ) ); + // _cancel->setGeometry( TQRect( 50, 170, 0, 0 ) ); /* 2002-01-28 LEW */ + _cancel->setGeometry( TQRect( 50, 230, 0, 0 ) ); + connect( _cancel, TQT_SIGNAL( clicked() ), this, TQT_SLOT( backupCancel() ) ); _continue = new KPushButton( KStdGuiItem::cont(), _backupdialog ); _continue->setFixedSize( 80, _continue->sizeHint().height() ); _continue->setEnabled( TRUE ); _continue->setDefault( TRUE ); - // _continue->setGeometry( QRect( 200, 170, 0, 0 ) ); /* 2002-01-28 LEW */ - _continue->setGeometry( QRect( 200, 230, 0, 0 ) ); - connect( _continue, SIGNAL( clicked() ), this, SLOT( backupContinue() ) ); + // _continue->setGeometry( TQRect( 200, 170, 0, 0 ) ); /* 2002-01-28 LEW */ + _continue->setGeometry( TQRect( 200, 230, 0, 0 ) ); + connect( _continue, TQT_SIGNAL( clicked() ), this, TQT_SLOT( backupContinue() ) ); _backupdialog->show(); } diff --git a/kdat/KDatMainWindow.h b/kdat/KDatMainWindow.h index 33e6732..9091975 100644 --- a/kdat/KDatMainWindow.h +++ b/kdat/KDatMainWindow.h @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include class KMenuBar; class QSplitter; @@ -57,20 +57,20 @@ class KDatMainWindow : public KMainWindow { private: bool _destroyed; KMenuBar* _menu; - QPopupMenu* _fileMenu; - QPopupMenu* _editMenu; + TQPopupMenu* _fileMenu; + TQPopupMenu* _editMenu; KToolBar* _toolbar; KStatusBar* _statusBar; - QSplitter* _panner; + TQSplitter* _panner; KTreeView* _tree; - QPopupMenu* _tapeDriveMenu; - QPopupMenu* _archiveMenu; - QPopupMenu* _mountedArchiveMenu; - QPopupMenu* _mountedTapeFileMenu; - QPopupMenu* _localFileMenu; - QPopupMenu* _tapeMenu; - QPopupMenu* _backupProfileRootMenu; - QPopupMenu* _backupProfileMenu; + TQPopupMenu* _tapeDriveMenu; + TQPopupMenu* _archiveMenu; + TQPopupMenu* _mountedArchiveMenu; + TQPopupMenu* _mountedTapeFileMenu; + TQPopupMenu* _localFileMenu; + TQPopupMenu* _tapeMenu; + TQPopupMenu* _backupProfileRootMenu; + TQPopupMenu* _backupProfileMenu; ArchiveInfoWidget* _archiveInfo; BackupProfileInfoWidget* _backupProfileInfo; TapeFileInfoWidget* _tapeFileInfo; @@ -84,8 +84,8 @@ private: void doVerify( bool restore = FALSE ); void setTapePresent( bool tapePresent, bool eject = TRUE ); - int calcBackupSize( const QString& workingDir, bool local, const QStringList& files, - bool incremental, const QString& snapshot, bool removeSnapshot ); + int calcBackupSize( const TQString& workingDir, bool local, const TQStringList& files, + bool incremental, const TQString& snapshot, bool removeSnapshot ); KDatMainWindow(); @@ -93,9 +93,9 @@ private: // used in calcBackupSize() to see whether user cancelled the on-going // backup to tape. KDialog* _backupdialog; - QPushButton* _cancel; - QPushButton* _continue; - QLabel* _lbl; + TQPushButton* _cancel; + TQPushButton* _continue; + TQLabel* _lbl; int stop_flag; void create_backup_dialog(); // 2002-01-24 LEW @@ -106,7 +106,7 @@ private slots: void localCollapsed( int index ); void localSelected( int index ); void localHighlighted( int index ); - void localPopupMenu( int index, const QPoint& p ); + void localPopupMenu( int index, const TQPoint& p ); void fileBackup(); void fileRestore(); @@ -153,56 +153,56 @@ public: * * @param p The upper left corner of the menu. */ - void popupTapeDriveMenu( const QPoint& p ); + void popupTapeDriveMenu( const TQPoint& p ); /** * Display the archive node popup menu. * * @param p The upper left corner of the menu. */ - void popupArchiveMenu( const QPoint& p ); + void popupArchiveMenu( const TQPoint& p ); /** * Display the mounted archive node popup menu. * * @param p The upper left corner of the menu. */ - void popupMountedArchiveMenu( const QPoint& p ); + void popupMountedArchiveMenu( const TQPoint& p ); /** * Display the mounted tape file node popup menu. * * @param p The upper left corner of the menu. */ - void popupMountedTapeFileMenu( const QPoint& p ); + void popupMountedTapeFileMenu( const TQPoint& p ); /** * Display the local file node popup menu. * * @param p The upper left corner of the menu. */ - void popupLocalFileMenu( const QPoint& p ); + void popupLocalFileMenu( const TQPoint& p ); /** * Display the tape index node popup menu. * * @param p The upper left corner of the menu. */ - void popupTapeMenu( const QPoint& p ); + void popupTapeMenu( const TQPoint& p ); /** * Display the backup profile root node popup menu. * * @param p The upper left corner of the menu. */ - void popupBackupProfileRootMenu( const QPoint& p ); + void popupBackupProfileRootMenu( const TQPoint& p ); /** * Display the backup profile node popup menu. * * @param p The upper left corner of the menu. */ - void popupBackupProfileMenu( const QPoint& p ); + void popupBackupProfileMenu( const TQPoint& p ); /** * Hide all of the info viewers. @@ -242,7 +242,7 @@ public: * * @param file The full path name of the file to display. */ - void showFileInfo( const QString & name ); + void showFileInfo( const TQString & name ); /** * Make sure that the user interface is consistent for the given mounted @@ -258,14 +258,14 @@ public: * * @param files This list will be filled with the selected files. */ - void getBackupFiles( QStringList& files ); + void getBackupFiles( TQStringList& files ); /** * Set the list of all the files selected for backup. * * @param files This list will become the selection. */ - void setBackupFiles( const QStringList& files ); + void setBackupFiles( const TQStringList& files ); public slots: /** @@ -273,7 +273,7 @@ public slots: * * @param msg The message to display. */ - void status( const QString & msg ); + void status( const TQString & msg ); /** * Initialize the KDat main window before displaying. diff --git a/kdat/LoggerWidget.cpp b/kdat/LoggerWidget.cpp index ac0bdc5..11921c2 100644 --- a/kdat/LoggerWidget.cpp +++ b/kdat/LoggerWidget.cpp @@ -16,9 +16,9 @@ // along with this program; 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 @@ -29,16 +29,16 @@ #include "LoggerWidget.moc" -LoggerWidget::LoggerWidget( const QString & title, QWidget* parent, const char* name ) - : QWidget( parent, name ) +LoggerWidget::LoggerWidget( const TQString & title, TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { - QLabel* lbl1 = new QLabel( title, this ); + TQLabel* lbl1 = new TQLabel( title, this ); lbl1->setFixedHeight( lbl1->sizeHint().height() ); - _mle = new QMultiLineEdit( this ); + _mle = new TQMultiLineEdit( this ); _mle->setReadOnly( TRUE ); - QVBoxLayout* l1 = new QVBoxLayout( this, 0, 4 ); + TQVBoxLayout* l1 = new TQVBoxLayout( this, 0, 4 ); l1->addWidget( lbl1 ); l1->addWidget( _mle, 1 ); } @@ -47,7 +47,7 @@ LoggerWidget::~LoggerWidget() { } -void LoggerWidget::append( const QString & text ) +void LoggerWidget::append( const TQString & text ) { _mle->append( text ); _mle->setCursorPosition( _mle->numLines(), 0 ); @@ -55,9 +55,9 @@ void LoggerWidget::append( const QString & text ) void LoggerWidget::save() { - QString file = KFileDialog::getSaveFileName( QString::null, QString::null, this ); + TQString file = KFileDialog::getSaveFileName( TQString::null, TQString::null, this ); if ( !file.isNull() ) { - QFile f( file ); + TQFile f( file ); if ( f.exists() ) { int result = KMessageBox::warningContinueCancel( this, i18n( "Log file exists, overwrite?" ), @@ -67,7 +67,7 @@ void LoggerWidget::save() return; } if ( f.open( IO_WriteOnly ) ) { - QCString line; + TQCString line; for ( int i = 0; i < _mle->numLines(); i++ ) { line = _mle->textLine( i ).utf8(); f.writeBlock( line, line.length() ); diff --git a/kdat/LoggerWidget.h b/kdat/LoggerWidget.h index 76afb78..3c57d68 100644 --- a/kdat/LoggerWidget.h +++ b/kdat/LoggerWidget.h @@ -19,16 +19,16 @@ #ifndef _LoggerWidget_h_ #define _LoggerWidget_h_ -#include +#include class QMultiLineEdit; /** * @short A titled logging widget with a save option. */ -class LoggerWidget : public QWidget { +class LoggerWidget : public TQWidget { Q_OBJECT - QMultiLineEdit* _mle; + TQMultiLineEdit* _mle; public: /** * Create a titled logging widget @@ -37,7 +37,7 @@ public: * @param parent The parent widget. * @param name The name of this widget. */ - LoggerWidget( const QString & title, QWidget* parent = 0, const char* name = 0 ); + LoggerWidget( const TQString & title, TQWidget* parent = 0, const char* name = 0 ); /** * Destroy the logging widget. @@ -50,7 +50,7 @@ public: * * @param text The text to append. */ - void append( const QString & text ); + void append( const TQString & text ); public slots: /** * Prompt the user for a file name, and save the contents of the log to diff --git a/kdat/Node.cpp b/kdat/Node.cpp index 828ad69..7e42855 100644 --- a/kdat/Node.cpp +++ b/kdat/Node.cpp @@ -20,9 +20,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -40,7 +40,7 @@ #include "Node.moc" -Node::Node( int type, const QString & text, const QPixmap& pixmap ) +Node::Node( int type, const TQString & text, const TQPixmap& pixmap ) : KTreeViewItem( text, pixmap ), _type( type ) { @@ -132,7 +132,7 @@ void Node::selected() KDatMainWindow::getInstance()->hideInfo(); } -void Node::popupMenu( const QPoint& ) +void Node::popupMenu( const TQPoint& ) { } @@ -160,7 +160,7 @@ bool TapeNode::validate() } // Add/update existing archives. - QPtrListIterator i( _tape->getChildren() ); + TQPtrListIterator i( _tape->getChildren() ); ArchiveNode* n; for ( ; i.current(); ++i ) { n = findArchiveNode( i.current() ); @@ -215,7 +215,7 @@ void TapeNode::expanding( bool expand ) return; } - QPtrListIterator f( _tape->getChildren() ); + TQPtrListIterator f( _tape->getChildren() ); for ( ; f.current(); ++f ) { insertNode( new ArchiveNode( f.current() ) ); } @@ -226,7 +226,7 @@ void TapeNode::selected() KDatMainWindow::getInstance()->showTapeInfo( _tape ); } -void TapeNode::popupMenu( const QPoint& p ) +void TapeNode::popupMenu( const TQPoint& p ) { KDatMainWindow::getInstance()->popupTapeMenu( p ); } @@ -284,7 +284,7 @@ void ArchiveNode::expanding( bool expand ) return; } - QPtrListIterator f( _archive->getChildren() ); + TQPtrListIterator f( _archive->getChildren() ); for ( ; f.current(); ++f ) { if ( f.current()->getName()[f.current()->getName().length()-1] == '/' ) { insertNode( new TapeDirectoryNode( f.current() ) ); @@ -299,7 +299,7 @@ void ArchiveNode::selected() KDatMainWindow::getInstance()->showArchiveInfo( _archive ); } -void ArchiveNode::popupMenu( const QPoint& p ) +void ArchiveNode::popupMenu( const TQPoint& p ) { KDatMainWindow::getInstance()->popupArchiveMenu( p ); } @@ -342,7 +342,7 @@ void TapeDirectoryNode::expanding( bool expand ) return; } - QPtrListIterator f( _file->getChildren() ); + TQPtrListIterator f( _file->getChildren() ); for ( ; f.current(); ++f ) { if ( f.current()->getName()[f.current()->getName().length()-1] == '/' ) { insertNode( new TapeDirectoryNode( f.current() ) ); @@ -399,7 +399,7 @@ void TapeFileNode::selected() KDatMainWindow::getInstance()->showTapeFileInfo( _file ); } -SelectableNode::SelectableNode( int type, const QString & text, const QPixmap& pixmap, int state ) +SelectableNode::SelectableNode( int type, const TQString & text, const TQPixmap& pixmap, int state ) : Node( type, text, pixmap ), _state( state ) { @@ -463,7 +463,7 @@ void SelectableNode::doSetSelected( bool select ) } } -const QPixmap* SelectableNode::getSelectPixmap() const +const TQPixmap* SelectableNode::getSelectPixmap() const { switch ( _state ) { case SelAll: @@ -480,7 +480,7 @@ const QPixmap* SelectableNode::getSelectPixmap() const } } -bool SelectableNode::mousePressEvent( const QPoint& point ) +bool SelectableNode::mousePressEvent( const TQPoint& point ) { if ( _selectRect.contains( point ) ) { switch ( _state ) { @@ -502,7 +502,7 @@ bool SelectableNode::mousePressEvent( const QPoint& point ) } } -void SelectableNode::paint( QPainter* p, int indent, const QColorGroup& cg, +void SelectableNode::paint( TQPainter* p, int indent, const TQColorGroup& cg, bool highlighted ) const { assert(getParent() != 0); /* can't paint root item */ @@ -526,7 +526,7 @@ void SelectableNode::paint( QPainter* p, int indent, const QColorGroup& cg, paintExpandButton(p, indent, cellHeight); } - const QPixmap* pm = getSelectPixmap(); + const TQPixmap* pm = getSelectPixmap(); p->drawPixmap( indent, ( height() - pm->height() ) / 2, *pm ); _selectRect.setRect( indent, ( height() - pm->height() ) / 2, 12, 12 ); @@ -541,15 +541,15 @@ void SelectableNode::paint( QPainter* p, int indent, const QColorGroup& cg, p->restore(); } -void SelectableNode::paintText( QPainter* p, int indent, int cellHeight, - const QColorGroup& cg, bool highlighted ) const +void SelectableNode::paintText( TQPainter* p, int indent, int cellHeight, + const TQColorGroup& cg, bool highlighted ) const { int textX = indent + 12 + 4 + pixmap.width() + 4; int textY = cellHeight - ((cellHeight - p->fontMetrics().ascent() - p->fontMetrics().leading()) / 2); if (highlighted) { paintHighlight(p, indent, cg, owner->hasFocus(), - (Qt::GUIStyle)owner->style().styleHint(QStyle::SH_GUIStyle)); // Qt3 doesn't make this easy ;) + (Qt::GUIStyle)owner->style().styleHint(TQStyle::SH_GUIStyle)); // Qt3 doesn't make this easy ;) p->setPen(cg.base()); p->setBackgroundColor(cg.text()); } @@ -560,22 +560,22 @@ void SelectableNode::paintText( QPainter* p, int indent, int cellHeight, p->drawText(textX, textY, text); } -int SelectableNode::width( int indent, const QFontMetrics& fm ) const +int SelectableNode::width( int indent, const TQFontMetrics& fm ) const { int maxWidth = pixmap.width(); maxWidth += (4 + 12 + 4 + fm.width(text)); return maxWidth == 0 ? -1 : indent + maxWidth + 3; } -QRect SelectableNode::textBoundingRect(int indent) const +TQRect SelectableNode::textBoundingRect(int indent) const { - const QFontMetrics& fm = owner->fontMetrics(); + const TQFontMetrics& fm = owner->fontMetrics(); int cellHeight = height(fm); int rectX = indent + 12 + 4 + pixmap.width() + 3; int rectY = (cellHeight - fm.ascent() - fm.leading()) / 2 + 2; int rectW = fm.width(text) + 1; int rectH = fm.ascent() + fm.leading(); - return QRect(rectX, rectY, rectW, rectH); + return TQRect(rectX, rectY, rectW, rectH); } bool SelectableNode::isType( int type ) @@ -610,7 +610,7 @@ void SelectableNode::setSelected( bool select ) KDatMainWindow::getInstance()->configureUI( TapeManager::instance()->getMountedTape() ); } -RangeableNode::RangeableNode( int type, const QString & text, const QPixmap& pixmap, int state ) +RangeableNode::RangeableNode( int type, const TQString & text, const TQPixmap& pixmap, int state ) : SelectableNode( type, text, pixmap, state ) { } @@ -636,7 +636,7 @@ Archive* MountedArchiveNode::getArchive() return _archive; } -const QPtrList& MountedArchiveNode::getRanges() +const TQPtrList& MountedArchiveNode::getRanges() { return _archive->getRanges(); } @@ -684,7 +684,7 @@ void MountedArchiveNode::expanding( bool expand ) return; } - QPtrListIterator f( _archive->getChildren() ); + TQPtrListIterator f( _archive->getChildren() ); for ( ; f.current(); ++f ) { if ( f.current()->getName()[f.current()->getName().length()-1] == '/' ) { insertNode( new MountedTapeDirectoryNode( f.current(), _state == SelSome ? SelNone : _state ) ); @@ -699,7 +699,7 @@ void MountedArchiveNode::selected() KDatMainWindow::getInstance()->showArchiveInfo( _archive ); } -void MountedArchiveNode::popupMenu( const QPoint& p ) +void MountedArchiveNode::popupMenu( const TQPoint& p ) { KDatMainWindow::getInstance()->popupMountedArchiveMenu( p ); } @@ -726,7 +726,7 @@ File* MountedTapeDirectoryNode::getFile() return _file; } -QString MountedTapeDirectoryNode::getFullPath() +TQString MountedTapeDirectoryNode::getFullPath() { if ( _fullPath.length() == 0 ) { _fullPath = getText() + "/"; @@ -739,7 +739,7 @@ QString MountedTapeDirectoryNode::getFullPath() return _fullPath; } -const QPtrList& MountedTapeDirectoryNode::getRanges() +const TQPtrList& MountedTapeDirectoryNode::getRanges() { return _file->getRanges(); } @@ -784,7 +784,7 @@ void MountedTapeDirectoryNode::expanding( bool expand ) return; } - QPtrListIterator f( _file->getChildren() ); + TQPtrListIterator f( _file->getChildren() ); for ( ; f.current(); ++f ) { if ( f.current()->getName()[f.current()->getName().length()-1] == '/' ) { insertNode( new MountedTapeDirectoryNode( f.current(), _state == SelSome ? SelNone : _state ) ); @@ -809,7 +809,7 @@ void MountedTapeDirectoryNode::selected() KDatMainWindow::getInstance()->showTapeFileInfo( _file ); } -void MountedTapeDirectoryNode::popupMenu( const QPoint& p ) +void MountedTapeDirectoryNode::popupMenu( const TQPoint& p ) { KDatMainWindow::getInstance()->popupMountedTapeFileMenu( p ); } @@ -832,7 +832,7 @@ File* MountedTapeFileNode::getFile() return _file; } -QString MountedTapeFileNode::getFullPath() +TQString MountedTapeFileNode::getFullPath() { if ( _fullPath.length() == 0 ) { _fullPath = getText(); @@ -845,7 +845,7 @@ QString MountedTapeFileNode::getFullPath() return _fullPath; } -const QPtrList& MountedTapeFileNode::getRanges() +const TQPtrList& MountedTapeFileNode::getRanges() { return _file->getRanges(); } @@ -886,12 +886,12 @@ void MountedTapeFileNode::selected() KDatMainWindow::getInstance()->showTapeFileInfo( _file ); } -void MountedTapeFileNode::popupMenu( const QPoint& p ) +void MountedTapeFileNode::popupMenu( const TQPoint& p ) { KDatMainWindow::getInstance()->popupMountedTapeFileMenu( p ); } -ArchiveableNode::ArchiveableNode( int type, const QString & text, const QPixmap& pixmap, int state ) +ArchiveableNode::ArchiveableNode( int type, const TQString & text, const TQPixmap& pixmap, int state ) : SelectableNode( type, text, pixmap, state ) { } @@ -912,7 +912,7 @@ RootNode::RootNode() setDelayedExpanding( TRUE ); } -QString RootNode::getFullPath() +TQString RootNode::getFullPath() { if ( _fullPath.length() == 0 ) { _fullPath = "/"; @@ -967,7 +967,7 @@ void RootNode::expanding( bool expand ) _mtime = statinfo.st_mtime; } - QDir dir( "/" ); + TQDir dir( "/" ); if ( dir.exists() ) { // Make sure we can read the directory. if ( !dir.isReadable() ) { @@ -976,7 +976,7 @@ void RootNode::expanding( bool expand ) } // Fill in the child's children. - const QFileInfoList* list = dir.entryInfoList( QDir::Hidden | QDir::Files | QDir::Dirs, QDir::Name | QDir::DirsFirst ); + const QFileInfoList* list = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, TQDir::Name | TQDir::DirsFirst ); if ( list ) { QFileInfoListIterator it( *list ); for ( ; it.current(); ++it ) { @@ -1007,19 +1007,19 @@ void RootNode::selected() KDatMainWindow::getInstance()->showFileInfo( "/" ); } -void RootNode::popupMenu( const QPoint& p ) +void RootNode::popupMenu( const TQPoint& p ) { KDatMainWindow::getInstance()->popupLocalFileMenu( p ); } -DirectoryNode::DirectoryNode( const QString & text, int state ) +DirectoryNode::DirectoryNode( const TQString & text, int state ) : ArchiveableNode( DirectoryNodeType, text, *ImageCache::instance()->getFolderClosed(), state ), _mtime( -1 ) { setDelayedExpanding( TRUE ); } -QString DirectoryNode::getFullPath() +TQString DirectoryNode::getFullPath() { if ( _fullPath.isEmpty() ) { _fullPath = ((ArchiveableNode*)getParent())->getFullPath() + getText() + "/"; @@ -1042,7 +1042,7 @@ void DirectoryNode::expanding( bool expand ) expand = TRUE; // Construct the full path. - QString path; + TQString path; Node* n; for ( n = this; n->getType() != RootNodeType; n = (Node*)n->getParent() ) { path.prepend( "/" ); @@ -1053,7 +1053,7 @@ void DirectoryNode::expanding( bool expand ) // If we already have some children, check to see if the directory has been modified. if ( childCount() > 0 ) { struct stat statinfo; - if ( stat( QFile::encodeName(path), &statinfo ) < 0 ) { + if ( stat( TQFile::encodeName(path), &statinfo ) < 0 ) { kdError() << "Can't stat " << path << endl; expand = FALSE; return; @@ -1074,7 +1074,7 @@ void DirectoryNode::expanding( bool expand ) } } else { struct stat statinfo; - if ( stat( QFile::encodeName(path), &statinfo ) < 0 ) { + if ( stat( TQFile::encodeName(path), &statinfo ) < 0 ) { kdError() << "Can't stat " << path << endl; expand = FALSE; return; @@ -1083,7 +1083,7 @@ void DirectoryNode::expanding( bool expand ) _mtime = statinfo.st_mtime; } - QDir dir( path ); + TQDir dir( path ); if ( dir.exists() ) { // Make sure we can read the directory. if ( !dir.isReadable() ) { @@ -1092,7 +1092,7 @@ void DirectoryNode::expanding( bool expand ) } // Fill in the child's children. - const QFileInfoList* list = dir.entryInfoList( QDir::Hidden | QDir::Files | QDir::Dirs, QDir::Name | QDir::DirsFirst ); + const QFileInfoList* list = dir.entryInfoList( TQDir::Hidden | TQDir::Files | TQDir::Dirs, TQDir::Name | TQDir::DirsFirst ); if ( list ) { QFileInfoListIterator it( *list ); for ( ; it.current(); ++it ) { @@ -1121,7 +1121,7 @@ void DirectoryNode::collapsed() void DirectoryNode::selected() { // Construct the full path. - QString path; + TQString path; Node* n; for ( n = this; n->getType() != RootNodeType; n = (Node*)n->getParent() ) { path.prepend( "/" ); @@ -1133,17 +1133,17 @@ void DirectoryNode::selected() KDatMainWindow::getInstance()->showFileInfo( path ); } -void DirectoryNode::popupMenu( const QPoint& p ) +void DirectoryNode::popupMenu( const TQPoint& p ) { KDatMainWindow::getInstance()->popupLocalFileMenu( p ); } -FileNode::FileNode( const QString & text, int state ) +FileNode::FileNode( const TQString & text, int state ) : ArchiveableNode( FileNodeType, text, *ImageCache::instance()->getFile(), state ) { } -QString FileNode::getFullPath() +TQString FileNode::getFullPath() { if ( _fullPath.isEmpty() ) { _fullPath = ((ArchiveableNode*)getParent())->getFullPath() + getText(); @@ -1164,7 +1164,7 @@ bool FileNode::isType( int type ) void FileNode::selected() { // Construct the full path. - QString path; + TQString path; Node* n; for ( n = this; n->getType() != RootNodeType; n = (Node*)n->getParent() ) { path.prepend( "/" ); @@ -1176,7 +1176,7 @@ void FileNode::selected() KDatMainWindow::getInstance()->showFileInfo( path ); } -void FileNode::popupMenu( const QPoint& p ) +void FileNode::popupMenu( const TQPoint& p ) { KDatMainWindow::getInstance()->popupLocalFileMenu( p ); } @@ -1186,9 +1186,9 @@ TapeDriveNode::TapeDriveNode() { setDelayedExpanding( TRUE ); - connect( TapeManager::instance(), SIGNAL( sigTapeMounted() ) , this, SLOT( slotTapeMounted() ) ); - connect( TapeManager::instance(), SIGNAL( sigTapeUnmounted() ) , this, SLOT( slotTapeUnmounted() ) ); - connect( TapeManager::instance(), SIGNAL( sigTapeModified( Tape* ) ), this, SLOT( slotTapeModified( Tape* ) ) ); + connect( TapeManager::instance(), TQT_SIGNAL( sigTapeMounted() ) , this, TQT_SLOT( slotTapeMounted() ) ); + connect( TapeManager::instance(), TQT_SIGNAL( sigTapeUnmounted() ) , this, TQT_SLOT( slotTapeUnmounted() ) ); + connect( TapeManager::instance(), TQT_SIGNAL( sigTapeModified( Tape* ) ), this, TQT_SLOT( slotTapeModified( Tape* ) ) ); } bool TapeDriveNode::isType( int type ) @@ -1214,7 +1214,7 @@ void TapeDriveNode::expanding( bool expand ) return; } - QPtrListIterator f( TapeManager::instance()->getMountedTape()->getChildren() ); + TQPtrListIterator f( TapeManager::instance()->getMountedTape()->getChildren() ); for ( ; f.current(); ++f ) { insertNode( new MountedArchiveNode( f.current() ) ); } @@ -1229,7 +1229,7 @@ void TapeDriveNode::selected() } } -void TapeDriveNode::popupMenu( const QPoint& p ) +void TapeDriveNode::popupMenu( const TQPoint& p ) { KDatMainWindow::getInstance()->popupTapeDriveMenu( p ); } @@ -1283,7 +1283,7 @@ void TapeDriveNode::slotTapeModified( Tape* tape ) } // Add/update existing archives. - QPtrListIterator i( tape->getChildren() ); + TQPtrListIterator i( tape->getChildren() ); MountedArchiveNode* n; for ( ; i.current(); ++i ) { n = findArchiveNode( i.current() ); @@ -1336,9 +1336,9 @@ TapeIndexRootNode::TapeIndexRootNode() { setDelayedExpanding( TRUE ); - connect( TapeManager::instance(), SIGNAL( sigTapeAdded( Tape* ) ) , this, SLOT( slotTapeAdded( Tape* ) ) ); - connect( TapeManager::instance(), SIGNAL( sigTapeRemoved( Tape* ) ) , this, SLOT( slotTapeRemoved( Tape* ) ) ); - connect( TapeManager::instance(), SIGNAL( sigTapeModified( Tape* ) ), this, SLOT( slotTapeModified( Tape* ) ) ); + connect( TapeManager::instance(), TQT_SIGNAL( sigTapeAdded( Tape* ) ) , this, TQT_SLOT( slotTapeAdded( Tape* ) ) ); + connect( TapeManager::instance(), TQT_SIGNAL( sigTapeRemoved( Tape* ) ) , this, TQT_SLOT( slotTapeRemoved( Tape* ) ) ); + connect( TapeManager::instance(), TQT_SIGNAL( sigTapeModified( Tape* ) ), this, TQT_SLOT( slotTapeModified( Tape* ) ) ); } bool TapeIndexRootNode::isType( int type ) @@ -1358,8 +1358,8 @@ void TapeIndexRootNode::expanding( bool expand ) return; } - QStringList list = TapeManager::instance()->getTapeIDs(); - QStringList::Iterator i = list.begin(); + TQStringList list = TapeManager::instance()->getTapeIDs(); + TQStringList::Iterator i = list.begin(); for ( ; i != list.end(); ++i ) { Tape* tape = TapeManager::instance()->findTape( *i ); if ( tape ) { @@ -1461,7 +1461,7 @@ void BackupProfileNode::selected() KDatMainWindow::getInstance()->showBackupProfileInfo( _backupProfile ); } -void BackupProfileNode::popupMenu( const QPoint& p ) +void BackupProfileNode::popupMenu( const TQPoint& p ) { KDatMainWindow::getInstance()->popupBackupProfileMenu( p ); } @@ -1471,12 +1471,12 @@ BackupProfileRootNode::BackupProfileRootNode() { setDelayedExpanding( TRUE ); - connect( BackupProfileManager::instance(), SIGNAL( sigBackupProfileAdded( BackupProfile* ) ) , - this, SLOT( slotBackupProfileAdded( BackupProfile* ) ) ); - connect( BackupProfileManager::instance(), SIGNAL( sigBackupProfileRemoved( BackupProfile* ) ) , - this, SLOT( slotBackupProfileRemoved( BackupProfile* ) ) ); - connect( BackupProfileManager::instance(), SIGNAL( sigBackupProfileModified( BackupProfile* ) ), - this, SLOT( slotBackupProfileModified( BackupProfile* ) ) ); + connect( BackupProfileManager::instance(), TQT_SIGNAL( sigBackupProfileAdded( BackupProfile* ) ) , + this, TQT_SLOT( slotBackupProfileAdded( BackupProfile* ) ) ); + connect( BackupProfileManager::instance(), TQT_SIGNAL( sigBackupProfileRemoved( BackupProfile* ) ) , + this, TQT_SLOT( slotBackupProfileRemoved( BackupProfile* ) ) ); + connect( BackupProfileManager::instance(), TQT_SIGNAL( sigBackupProfileModified( BackupProfile* ) ), + this, TQT_SLOT( slotBackupProfileModified( BackupProfile* ) ) ); } void BackupProfileRootNode::setSelected( BackupProfile* pBackupProfile ) @@ -1512,8 +1512,8 @@ void BackupProfileRootNode::expanding( bool expand ) return; } - QStringList list = BackupProfileManager::instance()->getBackupProfileNames(); - QStringList::Iterator i = list.begin(); + TQStringList list = BackupProfileManager::instance()->getBackupProfileNames(); + TQStringList::Iterator i = list.begin(); for ( ; i != list.end(); ++i ) { BackupProfile* backupProfile = BackupProfileManager::instance()->findBackupProfile( *i ); if ( backupProfile ) { @@ -1532,7 +1532,7 @@ void BackupProfileRootNode::collapsed() setPixmap( *ImageCache::instance()->getFolderClosed() ); } -void BackupProfileRootNode::popupMenu( const QPoint& p ) +void BackupProfileRootNode::popupMenu( const TQPoint& p ) { KDatMainWindow::getInstance()->popupBackupProfileRootMenu( p ); } diff --git a/kdat/Node.h b/kdat/Node.h index 84dfea8..e33f7f8 100644 --- a/kdat/Node.h +++ b/kdat/Node.h @@ -19,7 +19,7 @@ #ifndef _Node_h_ #define _Node_h_ -#include +#include #include "ktreeview.h" @@ -65,7 +65,7 @@ public: * @param text Text label for the node. * @param pixmap A pixmap to display to the left of the text. */ - Node( int type, const QString & text, const QPixmap& pixmap ); + Node( int type, const TQString & text, const TQPixmap& pixmap ); /** * There must be a virtual destructor in the base class so that all the @@ -121,7 +121,7 @@ public: * This method is called when the user right-clicks the mouse over the * node. */ - virtual void popupMenu( const QPoint& ); + virtual void popupMenu( const TQPoint& ); }; class ArchiveNode; @@ -179,7 +179,7 @@ public: * This method is called when the user right-clicks the mouse over the * node. */ - virtual void popupMenu( const QPoint& p ); + virtual void popupMenu( const TQPoint& p ); }; /** @@ -234,7 +234,7 @@ public: * This method is called when the user right-clicks the mouse over the * node. */ - virtual void popupMenu( const QPoint& p ); + virtual void popupMenu( const TQPoint& p ); }; /** @@ -325,21 +325,21 @@ public: */ class SelectableNode : public Node { protected: - mutable QRect _selectRect; + mutable TQRect _selectRect; enum { SelAll, SelNone, SelSome }; int _state; void doUpdateState(); void doSetSelected( bool select ); - const QPixmap* getSelectPixmap() const; - - virtual bool mousePressEvent( const QPoint& point ); - virtual void paint( QPainter* p, int indent, - const QColorGroup& cg, bool highlighted ) const; - virtual void paintText( QPainter* p, int indent, int cellHeight, - const QColorGroup& cg, bool highlighted ) const; - virtual int width( int indent, const QFontMetrics& fm ) const; - virtual QRect textBoundingRect( int indent ) const; + const TQPixmap* getSelectPixmap() const; + + virtual bool mousePressEvent( const TQPoint& point ); + virtual void paint( TQPainter* p, int indent, + const TQColorGroup& cg, bool highlighted ) const; + virtual void paintText( TQPainter* p, int indent, int cellHeight, + const TQColorGroup& cg, bool highlighted ) const; + virtual int width( int indent, const TQFontMetrics& fm ) const; + virtual TQRect textBoundingRect( int indent ) const; public: /** * Create a selectable node. @@ -349,7 +349,7 @@ public: * @param pixmap A pixmap to display to the left of the text. * @param state The initial selection state of the node. */ - SelectableNode( int type, const QString & text, const QPixmap& pixmap, int state ); + SelectableNode( int type, const TQString & text, const TQPixmap& pixmap, int state ); /** * Determine whether the node is an instance of the given node type. @@ -394,13 +394,13 @@ public: * @param pixmap A pixmap to display to the left of the text. * @param state The initial selection state of the node. */ - RangeableNode( int type, const QString & text, const QPixmap& pixmap, int state ); + RangeableNode( int type, const TQString & text, const TQPixmap& pixmap, int state ); /** * Get a list of all the selected ranges for the subtree rooted at this * node. */ - virtual const QPtrList& getRanges() = 0; + virtual const TQPtrList& getRanges() = 0; /** * Determine whether the node is an instance of the given node type. @@ -442,7 +442,7 @@ public: * Get a list of all the selected ranges for the subtree rooted at this * node. */ - virtual const QPtrList& getRanges(); + virtual const TQPtrList& getRanges(); /** * Select/deselect this node and all of its children. @@ -476,7 +476,7 @@ public: * This method is called when the user right-clicks the mouse over the * node. */ - virtual void popupMenu( const QPoint& p ); + virtual void popupMenu( const TQPoint& p ); }; /** @@ -484,7 +484,7 @@ public: */ class MountedTapeDirectoryNode : public RangeableNode { File* _file; - QString _fullPath; + TQString _fullPath; public: /** * Create a tape directory node. @@ -507,13 +507,13 @@ public: * * @return The full path name of the directory. */ - QString getFullPath(); + TQString getFullPath(); /** * Get a list of all the selected ranges for the subtree rooted at this * node. */ - virtual const QPtrList& getRanges(); + virtual const TQPtrList& getRanges(); /** * Select/deselect this node and all of its children. @@ -556,7 +556,7 @@ public: * This method is called when the user right-clicks the mouse over the * node. */ - virtual void popupMenu( const QPoint& p ); + virtual void popupMenu( const TQPoint& p ); }; /** @@ -564,7 +564,7 @@ public: */ class MountedTapeFileNode : public RangeableNode { File* _file; - QString _fullPath; + TQString _fullPath; public: /** * Create a tape file node. @@ -587,13 +587,13 @@ public: * * @return The full path name of the file. */ - QString getFullPath(); + TQString getFullPath(); /** * Get a list of all the selected ranges for the subtree rooted at this * node. */ - virtual const QPtrList& getRanges(); + virtual const TQPtrList& getRanges(); /** * Select/deselect this node and all of its children. @@ -619,7 +619,7 @@ public: * This method is called when the user right-clicks the mouse over the * node. */ - virtual void popupMenu( const QPoint& p ); + virtual void popupMenu( const TQPoint& p ); }; /** @@ -627,7 +627,7 @@ public: */ class ArchiveableNode : public SelectableNode { protected: - QString _fullPath; + TQString _fullPath; public: /** * Create a new archiveable node. @@ -637,7 +637,7 @@ public: * @param pixmap A pixmap to display to the left of the text. * @param state The initial selection state of the node. */ - ArchiveableNode( int type, const QString & text, const QPixmap& pixmap, int state ); + ArchiveableNode( int type, const TQString & text, const TQPixmap& pixmap, int state ); /** * Compute the full path name of this node. Nodes representing @@ -645,7 +645,7 @@ public: * * @return The full path of the file that this node represents. */ - virtual QString getFullPath() = 0; + virtual TQString getFullPath() = 0; /** * Determine whether the node is an instance of the given node type. @@ -672,7 +672,7 @@ public: * * @return The full path of the file that this node represents. */ - virtual QString getFullPath(); + virtual TQString getFullPath(); /** * Determine whether the node is an instance of the given node type. @@ -708,7 +708,7 @@ public: * This method is called when the user right-clicks the mouse over the * node. */ - virtual void popupMenu( const QPoint& p ); + virtual void popupMenu( const TQPoint& p ); }; /** @@ -724,7 +724,7 @@ public: * traversing the tree to the root node. * @param state The initial selection state of the node. */ - DirectoryNode( const QString & text, int state ); + DirectoryNode( const TQString & text, int state ); /** * Compute the full path name of this node. Nodes representing @@ -732,7 +732,7 @@ public: * * @return The full path of the file that this node represents. */ - virtual QString getFullPath(); + virtual TQString getFullPath(); /** * Determine whether the node is an instance of the given node type. @@ -768,7 +768,7 @@ public: * This method is called when the user right-clicks the mouse over the * node. */ - virtual void popupMenu( const QPoint& p ); + virtual void popupMenu( const TQPoint& p ); }; /** @@ -783,7 +783,7 @@ public: * traversing the tree to the root node. * @param state The initial selection state of the node. */ - FileNode( const QString & text, int state ); + FileNode( const TQString & text, int state ); /** * Compute the full path name of this node. Nodes representing @@ -791,7 +791,7 @@ public: * * @return The full path of the file that this node represents. */ - virtual QString getFullPath(); + virtual TQString getFullPath(); /** * Determine whether the node is an instance of the given node type. @@ -809,13 +809,13 @@ public: * This method is called when the user right-clicks the mouse over the * node. */ - virtual void popupMenu( const QPoint& p ); + virtual void popupMenu( const TQPoint& p ); }; /** * @short This node represents a tape drive. */ -class TapeDriveNode : public QObject, public Node { +class TapeDriveNode : public TQObject, public Node { Q_OBJECT MountedArchiveNode* findArchiveNode( Archive* archive ); @@ -848,7 +848,7 @@ public: * This method is called when the user right-clicks the mouse over the * node. */ - virtual void popupMenu( const QPoint& p ); + virtual void popupMenu( const TQPoint& p ); public slots: /** * This slot is called when the tape is mounted. @@ -872,7 +872,7 @@ public slots: /** * @short This node represents the root of the tape index subtree. */ -class TapeIndexRootNode : public QObject, public Node { +class TapeIndexRootNode : public TQObject, public Node { Q_OBJECT TapeNode* findTapeNode( Tape* tape ); @@ -972,13 +972,13 @@ public: * This method is called when the user right-clicks the mouse over the * node. */ - virtual void popupMenu( const QPoint& ); + virtual void popupMenu( const TQPoint& ); }; /** * @short This node represents the root of the backup profile subtree. */ -class BackupProfileRootNode : public QObject, public Node { +class BackupProfileRootNode : public TQObject, public Node { Q_OBJECT BackupProfileNode* findBackupProfileNode( BackupProfile* backupProfile ); @@ -1023,7 +1023,7 @@ public: * This method is called when the user right-clicks the mouse over the * node. */ - virtual void popupMenu( const QPoint& ); + virtual void popupMenu( const TQPoint& ); public slots: /** * Add a new child node for the new backup profile. diff --git a/kdat/Options.cpp b/kdat/Options.cpp index 71a784e..234d802 100644 --- a/kdat/Options.cpp +++ b/kdat/Options.cpp @@ -62,12 +62,12 @@ int Options::getTapeBlockSize() return _tapeBlockSize; } -QString Options::getTapeDevice() +TQString Options::getTapeDevice() { return _tapeDevice; } -QString Options::getTarCommand() +TQString Options::getTarCommand() { return _tarCommand; } @@ -110,7 +110,7 @@ void Options::setTapeBlockSize( int bytes ) } } -void Options::setTapeDevice( const QString & str ) +void Options::setTapeDevice( const TQString & str ) { if ( getTapeDevice() != str ) { _tapeDevice = str; @@ -119,7 +119,7 @@ void Options::setTapeDevice( const QString & str ) } } -void Options::setTarCommand( const QString & str ) +void Options::setTarCommand( const TQString & str ) { if ( getTarCommand() != str ) { _tarCommand = str; diff --git a/kdat/Options.h b/kdat/Options.h index 4f65795..d9701ea 100644 --- a/kdat/Options.h +++ b/kdat/Options.h @@ -19,20 +19,20 @@ #ifndef _Options_h_ #define _Options_h_ -#include +#include class KConfig; /** * @short The central repository for user preferences. */ -class Options : public QObject { +class Options : public TQObject { Q_OBJECT KConfig* _config; int _defaultTapeSize; int _tapeBlockSize; - QString _tapeDevice; - QString _tarCommand; + TQString _tapeDevice; + TQString _tarCommand; bool _loadOnMount; bool _lockOnMount; bool _ejectOnUnmount; @@ -74,14 +74,14 @@ public: * * @return The tape device path. */ - QString getTapeDevice(); + TQString getTapeDevice(); /** * Get the full path to the tar command. * * @return The path to the tar command. */ - QString getTarCommand(); + TQString getTarCommand(); /** * Get whether to load the tape before attempting to mount it. @@ -130,14 +130,14 @@ public: * * @param str The full path to the tape device. */ - void setTapeDevice( const QString & str ); + void setTapeDevice( const TQString & str ); /** * Set the path to the tar command. * * @param str The full path to the tar command. */ - void setTarCommand( const QString & str ); + void setTarCommand( const TQString & str ); /** * Set whether to load the tape before attempting to mount it. diff --git a/kdat/OptionsDlg.cpp b/kdat/OptionsDlg.cpp index ba07773..f056bbf 100644 --- a/kdat/OptionsDlg.cpp +++ b/kdat/OptionsDlg.cpp @@ -24,7 +24,7 @@ #include "OptionsDlg.h" #include "OptionsDlgWidget.h" -#include +#include #include #include @@ -34,18 +34,18 @@ #include #include "OptionsDlg.moc" -OptionsDlg::OptionsDlg( QWidget* parent, const char* name ) +OptionsDlg::OptionsDlg( TQWidget* parent, const char* name ) : KDialogBase( Swallow, i18n ("Options"), Ok | Apply | Cancel, Ok, parent, name, true, true ), apply (0) { _baseWidget = new OptionsDlgWidget ( 0 ); setMainWidget (_baseWidget); - connect( _baseWidget, SIGNAL( valueChanged () ), this, SLOT( slotChanged() ) ); + connect( _baseWidget, TQT_SIGNAL( valueChanged () ), this, TQT_SLOT( slotChanged() ) ); - connect( this, SIGNAL( okClicked () ), this, SLOT( slotOK() ) ); - connect( this, SIGNAL( applyClicked() ), this, SLOT( slotApply() ) ); - connect( this, SIGNAL( cancelClicked() ), this, SLOT( slotCancel() ) ); + connect( this, TQT_SIGNAL( okClicked () ), this, TQT_SLOT( slotOK() ) ); + connect( this, TQT_SIGNAL( applyClicked() ), this, TQT_SLOT( slotApply() ) ); + connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( slotCancel() ) ); int size = Options::instance()->getDefaultTapeSize(); if ( ( size >= 1024*1024 ) && ( size % ( 1024*1024 ) == 0 ) ) { diff --git a/kdat/OptionsDlg.h b/kdat/OptionsDlg.h index 9e62fd7..1f7dcd5 100644 --- a/kdat/OptionsDlg.h +++ b/kdat/OptionsDlg.h @@ -41,7 +41,7 @@ public: * @param parent The parent widget of the dialog. * @param name The name of the dialog. */ - OptionsDlg( QWidget* parent = 0, const char* name = 0 ); + OptionsDlg( TQWidget* parent = 0, const char* name = 0 ); /** * Destroy the options dialog. @@ -50,7 +50,7 @@ public: private: bool configChanged; OptionsDlgWidget *_baseWidget; - QPushButton* apply; + TQPushButton* apply; }; #endif diff --git a/kdat/Range.cpp b/kdat/Range.cpp index b2836aa..00e0e2b 100644 --- a/kdat/Range.cpp +++ b/kdat/Range.cpp @@ -58,7 +58,7 @@ RangeList::~RangeList() } } -const QPtrList& RangeList::getRanges() const +const TQPtrList& RangeList::getRanges() const { return _ranges; } diff --git a/kdat/Range.h b/kdat/Range.h index 5b042c3..20542ca 100644 --- a/kdat/Range.h +++ b/kdat/Range.h @@ -19,7 +19,7 @@ #ifndef _Range_h_ #define _Range_h_ -#include +#include /** * @short This class represents a range of tar records. @@ -69,7 +69,7 @@ public: * A simple list of Ranges. */ class RangeList { - QPtrList _ranges; + TQPtrList _ranges; public: /** * Create an empty list of ranges. @@ -86,7 +86,7 @@ public: * * @return The list of ranges. */ - const QPtrList& getRanges() const; + const TQPtrList& getRanges() const; /** * Intelligently add the given range to the list of ranges. If possible, diff --git a/kdat/Tape.cpp b/kdat/Tape.cpp index b015376..ff35d1a 100644 --- a/kdat/Tape.cpp +++ b/kdat/Tape.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -131,13 +131,13 @@ void Tape::read() /* 2002-01-28 LEW */ // printf("Preparing to read tape data\n" ); - // QString filename1 = locateLocal( "appdata", _id); + // TQString filename1 = locateLocal( "appdata", _id); // printf("The tape data are in \"%s\"\n", filename1.ascii() ); /* 2002-01-28 LEW */ if ( !_fptr ) { - QString filename = locateLocal( "appdata", _id); - _fptr = fopen( QFile::encodeName(filename), "r" ); + TQString filename = locateLocal( "appdata", _id); + _fptr = fopen( TQFile::encodeName(filename), "r" ); /* 2002-01-28 LEW */ #ifdef DEBUG @@ -226,7 +226,7 @@ void Tape::readAll( int version ) { read(); - QPtrListIterator i( _children ); + TQPtrListIterator i( _children ); for ( ; i.current(); ++i ) { i.current()->readAll( version ); } @@ -234,7 +234,7 @@ void Tape::readAll( int version ) void Tape::write() { - QString filename = locateLocal( "appdata", _id); + TQString filename = locateLocal( "appdata", _id); /* 2002-01-28 LEW */ #ifdef DEBUG @@ -244,7 +244,7 @@ void Tape::write() /* 2002-01-28 LEW */ if ( !_fptr ) { - _fptr = fopen( QFile::encodeName(filename), "w" ); + _fptr = fopen( TQFile::encodeName(filename), "w" ); /* 2002-01-31 LEW */ #ifdef DEBUG @@ -259,7 +259,7 @@ void Tape::write() return; } } else { - freopen( QFile::encodeName(filename), "w", _fptr ); + freopen( TQFile::encodeName(filename), "w", _fptr ); /* 2002-01-31 LEW */ #ifdef DEBUG // printf("Reopened new archive file \"%s\". %s %d\n", @@ -292,7 +292,7 @@ void Tape::write() } //===== Write archives ===== - QPtrListIterator i( _children ); + TQPtrListIterator i( _children ); int count = 0; for ( ; i.current(); ++i, count++ ) { // Fill in the file offset. @@ -304,17 +304,17 @@ void Tape::write() i.current()->write( _fptr ); } - freopen( QFile::encodeName(filename), "r+", _fptr ); + freopen( TQFile::encodeName(filename), "r+", _fptr ); } -QString Tape::getID() +TQString Tape::getID() { read(); return _id; } -QString Tape::getName() +TQString Tape::getName() { read(); @@ -342,14 +342,14 @@ int Tape::getSize() return _size; } -const QPtrList& Tape::getChildren() +const TQPtrList& Tape::getChildren() { read(); return _children; } -void Tape::setName( const QString & name ) +void Tape::setName( const TQString & name ) { /* 2002-01-31 LEW */ int i; @@ -363,8 +363,8 @@ void Tape::setName( const QString & name ) } // change file to read-write so we can update it 2002-01-31 LEW - QString filename = locateLocal( "appdata", _id); - freopen( QFile::encodeName(filename), "r+", _fptr ); + TQString filename = locateLocal( "appdata", _id); + freopen( TQFile::encodeName(filename), "r+", _fptr ); _name = name; @@ -377,7 +377,7 @@ void Tape::setName( const QString & name ) down a bug that turns out to be unrelated. The errors I'm looking for here haven't happened in real use, so there is no rush to add these checks in KDE 3.0. Thanks. - LW */ - QString msg = i18n("Error during fseek #1 while accessing archive: \""); + TQString msg = i18n("Error during fseek #1 while accessing archive: \""); msg.append( getID() ); msg.append( "\": " ); msg.append( i18n(strerror( errno )) ); @@ -390,7 +390,7 @@ void Tape::setName( const QString & name ) { clearerr( _fptr ); #ifdef DEBUG /* Can't create new i18n strings now, so we'll save this for KDE 3.1 */ - QString msg = i18n("Error while accessing string #1 in archive: \""); + TQString msg = i18n("Error while accessing string #1 in archive: \""); msg.append( getID() ); msg.append( "\": " ); msg.append( i18n(strerror( errno )) ); @@ -403,7 +403,7 @@ void Tape::setName( const QString & name ) { clearerr( _fptr ); #ifdef DEBUG /* Can't create new i18n strings now, so we'll save this for KDE 3.1 */ - QString msg = i18n("Error while accessing string #2 in archive: \""); + TQString msg = i18n("Error while accessing string #2 in archive: \""); msg.append( getID() ); msg.append( "\": " ); msg.append( i18n(strerror( errno )) ); @@ -416,7 +416,7 @@ void Tape::setName( const QString & name ) { clearerr( _fptr ); #ifdef DEBUG /* Can't create new i18n strings now, so we'll save this for KDE 3.1 */ - QString msg = i18n("Error during fseek #2 while accessing archive: \""); + TQString msg = i18n("Error during fseek #2 while accessing archive: \""); msg.append( getID() ); msg.append( "\": " ); msg.append( i18n(strerror( errno )) ); @@ -433,7 +433,7 @@ void Tape::setName( const QString & name ) I fixed the bug that caused this error to occur. Thanks - LW */ if( ( i < 4096 ) || ( ferror( _fptr ) != 0 )){ clearerr( _fptr ); - QString msg = i18n("Error while updating archive name: "); + TQString msg = i18n("Error while updating archive name: "); msg.append( i18n(strerror( errno )) ); printf("%s\n", msg.latin1()); KMessageBox::error(NULL, msg, i18n("File Access Error")); @@ -451,7 +451,7 @@ void Tape::setName( const QString & name ) /* 2002-01-31 LEW */ // change back to read-only 2002-01-31 LEW - freopen( QFile::encodeName(filename), "r", _fptr ); + freopen( TQFile::encodeName(filename), "r", _fptr ); TapeManager::instance()->tapeModified( this ); } @@ -466,8 +466,8 @@ void Tape::setMTime( int mtime ) } // change file to read-write so we can update it 2002-01-31 LEW - QString filename = locateLocal( "appdata", _id); - freopen( QFile::encodeName(filename), "r+", _fptr ); + TQString filename = locateLocal( "appdata", _id); + freopen( TQFile::encodeName(filename), "r+", _fptr ); _mtime = mtime; @@ -480,7 +480,7 @@ void Tape::setMTime( int mtime ) fflush( _fptr ); // change back to read-only 2002-01-31 LEW - freopen( QFile::encodeName(filename), "r", _fptr ); + freopen( TQFile::encodeName(filename), "r", _fptr ); TapeManager::instance()->tapeModified( this ); } @@ -497,8 +497,8 @@ void Tape::setSize( int size ) _size = size; // change file to read-write so we can update it 2002-01-31 LEW - QString filename = locateLocal( "appdata", _id); - freopen( QFile::encodeName(filename), "r+", _fptr ); + TQString filename = locateLocal( "appdata", _id); + freopen( TQFile::encodeName(filename), "r+", _fptr ); char buf[4096]; fseek( _fptr, 0, SEEK_SET ); @@ -509,7 +509,7 @@ void Tape::setSize( int size ) fflush( _fptr ); // change back to read-only 2002-01-31 LEW - freopen( QFile::encodeName(filename), "r", _fptr ); + freopen( TQFile::encodeName(filename), "r", _fptr ); TapeManager::instance()->tapeModified( this ); } @@ -523,8 +523,8 @@ void Tape::addChild( Archive* archive ) read(); // change file to read-write so we can update it 2002-01-31 LEW - QString filename = locateLocal( "appdata", _id); - freopen( QFile::encodeName(filename), "r+", _fptr ); + TQString filename = locateLocal( "appdata", _id); + freopen( TQFile::encodeName(filename), "r+", _fptr ); archive->calcRanges(); @@ -548,7 +548,7 @@ void Tape::addChild( Archive* archive ) setMTime( time( NULL ) ); // change back to read-only 2002-01-31 LEW - freopen( QFile::encodeName(filename), "r", _fptr ); + freopen( TQFile::encodeName(filename), "r", _fptr ); /* 2002-01-28 LEW */ // printf("Done adding archive to tape file\n" ); @@ -580,13 +580,13 @@ void Tape::removeChild( Archive* archive ) here = ftell( _fptr ); } - QString filename = locateLocal( "appdata", _id); - truncate( QFile::encodeName(filename), here ); - freopen( QFile::encodeName(filename), "r+", _fptr ); + TQString filename = locateLocal( "appdata", _id); + truncate( TQFile::encodeName(filename), here ); + freopen( TQFile::encodeName(filename), "r+", _fptr ); fflush( _fptr ); // change back to read-only 2002-01-31 LEW - freopen( QFile::encodeName(filename), "r", _fptr ); + freopen( TQFile::encodeName(filename), "r", _fptr ); setMTime( time( NULL ) ); } @@ -612,13 +612,13 @@ void Tape::clear() fseek( _fptr, MAX_NUM_ARCHIVES * 4, SEEK_CUR ); int here = ftell( _fptr ); - QString filename = locateLocal( "appdata", _id); - truncate( QFile::encodeName(filename), here ); - freopen( QFile::encodeName(filename), "r+", _fptr ); + TQString filename = locateLocal( "appdata", _id); + truncate( TQFile::encodeName(filename), here ); + freopen( TQFile::encodeName(filename), "r+", _fptr ); fflush( _fptr ); // change back to read-only 2002-01-31 LEW - freopen( QFile::encodeName(filename), "r", _fptr ); + freopen( TQFile::encodeName(filename), "r", _fptr ); setMTime( time( NULL ) ); } @@ -634,7 +634,7 @@ void Tape::readVersion1Index( FILE* fptr ) KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading tape ID failed." ), i18n("Index File Error") ); return; } - QCString tapeID = buf; + TQCString tapeID = buf; tapeID.truncate( tapeID.length() - 1 ); if ( tapeID !=_id ) { KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Tape ID on tape does not match tape ID in index file." ), i18n("Index File Error") ); @@ -683,7 +683,7 @@ void Tape::readVersion1Index( FILE* fptr ) KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading archive name failed." ), i18n("Index File Error") ); return; } - QString archiveName = buf; + TQString archiveName = buf; archiveName.truncate( archiveName.length() - 1 ); // Read archive time stamp. @@ -720,7 +720,7 @@ void Tape::readVersion1Index( FILE* fptr ) } int archiveNumFiles = atoi( buf ); - QString tmpFileName; + TQString tmpFileName; int tmpFileSize = -1; int tmpFileMTime = -1; int tmpFileStartRecord = -1; @@ -730,7 +730,7 @@ void Tape::readVersion1Index( FILE* fptr ) KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading file name failed." ), i18n("Index File Error") ); return; } - QString fileName = buf; + TQString fileName = buf; fileName.truncate( fileName.length() - 1 ); // Read file size. @@ -781,7 +781,7 @@ void Tape::readVersion2Index( FILE* fptr ) KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading tape ID failed." ), i18n("Index File Error") ); return; } - QCString tapeID = buf; + TQCString tapeID = buf; tapeID.truncate( tapeID.length() - 1 ); if ( tapeID != _id ) { KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Tape ID on tape does not match tape ID in index file." ), i18n("Index File Error") ); @@ -843,7 +843,7 @@ void Tape::readVersion3Index( FILE* fptr ) KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading tape ID failed." ), i18n("Index File Error") ); return; } - QCString tapeID = buf; + TQCString tapeID = buf; tapeID.truncate( tapeID.length() - 1 ); if ( tapeID != _id ) { KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Tape ID on tape does not match tape ID in index file." ), i18n("Index File Error") ); @@ -886,7 +886,7 @@ void Tape::readVersion4Index( FILE* fptr ) KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Reading tape ID failed." ), i18n("Index File Error") ); return; } - QCString tapeID = buf; + TQCString tapeID = buf; tapeID.truncate( tapeID.length() - 1 ); if ( tapeID != _id ) { KMessageBox::error( KDatMainWindow::getInstance(), i18n( "Tape ID on tape does not match tape ID in index file." ), i18n("Index File Error") ); @@ -926,7 +926,7 @@ void Tape::readVersion4Index( FILE* fptr ) void Tape::calcRanges() { - QPtrListIterator it( getChildren() ); + TQPtrListIterator it( getChildren() ); for ( ; it.current(); ++it ) { it.current()->calcRanges(); } diff --git a/kdat/Tape.h b/kdat/Tape.h index eab7cb3..335619c 100644 --- a/kdat/Tape.h +++ b/kdat/Tape.h @@ -19,8 +19,8 @@ #ifndef _Tape_h_ #define _Tape_h_ -#include -#include +#include +#include #include "Archive.h" @@ -29,12 +29,12 @@ */ class Tape { bool _stubbed; - QCString _id; + TQCString _id; int _ctime; int _mtime; - QString _name; + TQString _name; int _size; - QPtrList _children; + TQPtrList _children; FILE* _fptr; @@ -77,14 +77,14 @@ public: * * @return The tape id. */ - QString getID(); + TQString getID(); /** * Get the user-specified name for the tape. * * @return The name of the tape. */ - QString getName(); + TQString getName(); /** * Get the date and time that the tape was formatted. @@ -112,14 +112,14 @@ public: * * @return The list of all archives on the tape. */ - const QPtrList& getChildren(); + const TQPtrList& getChildren(); /** * Set the name for the tape. * * @param name The new name for the tape. */ - void setName( const QString & name ); + void setName( const TQString & name ); /** * Set the modification time for the tape to be the current time.. diff --git a/kdat/TapeDrive.cpp b/kdat/TapeDrive.cpp index 64cb46f..2e4c59b 100644 --- a/kdat/TapeDrive.cpp +++ b/kdat/TapeDrive.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include @@ -430,9 +430,9 @@ void TapeDrive::open() close(); // Open the tape device. - _fd = ::open( QFile::encodeName(Options::instance()->getTapeDevice()), O_RDWR ); + _fd = ::open( TQFile::encodeName(Options::instance()->getTapeDevice()), O_RDWR ); if ( _fd < 0 ) { - _fd = ::open( QFile::encodeName(Options::instance()->getTapeDevice()), O_RDONLY ); + _fd = ::open( TQFile::encodeName(Options::instance()->getTapeDevice()), O_RDONLY ); if ( _fd < 0 ) { return; } else { diff --git a/kdat/TapeDrive.h b/kdat/TapeDrive.h index 4709eed..b777bc0 100644 --- a/kdat/TapeDrive.h +++ b/kdat/TapeDrive.h @@ -19,14 +19,14 @@ #ifndef _TapeDrive_h_ #define _TapeDrive_h_ -#include +#include class Tape; /** * @short An OO interface to the tape drive. */ -class TapeDrive : public QObject { +class TapeDrive : public TQObject { Q_OBJECT int _fd; bool _readOnly; @@ -241,7 +241,7 @@ signals: * * @param msg The informational message. */ - void sigStatus( const QString & msg ); + void sigStatus( const TQString & msg ); }; #endif diff --git a/kdat/TapeFileInfoWidget.cpp b/kdat/TapeFileInfoWidget.cpp index de5a453..239d7f1 100644 --- a/kdat/TapeFileInfoWidget.cpp +++ b/kdat/TapeFileInfoWidget.cpp @@ -18,8 +18,8 @@ #include -#include -#include +#include +#include #include @@ -30,14 +30,14 @@ #include "TapeFileInfoWidget.moc" -TapeFileInfoWidget::TapeFileInfoWidget( QWidget* parent, const char* name ) - : QWidget( parent, name ) +TapeFileInfoWidget::TapeFileInfoWidget( TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { - QLabel* lbl1 = new QLabel( i18n( "File name:" ), this ); - QLabel* lbl2 = new QLabel( i18n( "Last modified:" ), this ); - QLabel* lbl3 = new QLabel( i18n( "Size:" ), this ); - QLabel* lbl4 = new QLabel( i18n( "Start record:" ), this ); - QLabel* lbl5 = new QLabel( i18n( "End record:" ), this ); + TQLabel* lbl1 = new TQLabel( i18n( "File name:" ), this ); + TQLabel* lbl2 = new TQLabel( i18n( "Last modified:" ), this ); + TQLabel* lbl3 = new TQLabel( i18n( "Size:" ), this ); + TQLabel* lbl4 = new TQLabel( i18n( "Start record:" ), this ); + TQLabel* lbl5 = new TQLabel( i18n( "End record:" ), this ); int max = lbl1->sizeHint().width(); if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width(); @@ -51,44 +51,44 @@ TapeFileInfoWidget::TapeFileInfoWidget( QWidget* parent, const char* name ) lbl4->setFixedSize( max, lbl4->sizeHint().height() ); lbl5->setFixedSize( max, lbl5->sizeHint().height() ); - _fileName = new QLabel( "???", this ); + _fileName = new TQLabel( "???", this ); _fileName->setFixedHeight( _fileName->sizeHint().height() ); - _mtime = new QLabel( "???", this ); + _mtime = new TQLabel( "???", this ); _mtime->setFixedHeight( _mtime->sizeHint().height() ); - _size = new QLabel( "???", this ); + _size = new TQLabel( "???", this ); _size->setFixedHeight( _size->sizeHint().height() ); - _startRecord = new QLabel( "???", this ); + _startRecord = new TQLabel( "???", this ); _startRecord->setFixedHeight( _startRecord->sizeHint().height() ); - _endRecord = new QLabel( "???", this ); + _endRecord = new TQLabel( "???", this ); _endRecord->setFixedHeight( _endRecord->sizeHint().height() ); - QVBoxLayout* l1 = new QVBoxLayout( this, 4, 4 ); + TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 ); - QHBoxLayout* l1_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1 = new TQHBoxLayout(); l1->addLayout( l1_1 ); l1_1->addWidget( lbl1 ); l1_1->addWidget( _fileName, 1 ); - QHBoxLayout* l1_2 = new QHBoxLayout(); + TQHBoxLayout* l1_2 = new TQHBoxLayout(); l1->addLayout( l1_2 ); l1_2->addWidget( lbl2 ); l1_2->addWidget( _mtime, 1 ); - QHBoxLayout* l1_3 = new QHBoxLayout(); + TQHBoxLayout* l1_3 = new TQHBoxLayout(); l1->addLayout( l1_3 ); l1_3->addWidget( lbl3 ); l1_3->addWidget( _size, 1 ); - QHBoxLayout* l1_4 = new QHBoxLayout(); + TQHBoxLayout* l1_4 = new TQHBoxLayout(); l1->addLayout( l1_4 ); l1_4->addWidget( lbl4 ); l1_4->addWidget( _startRecord, 1 ); - QHBoxLayout* l1_5 = new QHBoxLayout(); + TQHBoxLayout* l1_5 = new TQHBoxLayout(); l1->addLayout( l1_5 ); l1_5->addWidget( lbl5 ); l1_5->addWidget( _endRecord, 1 ); @@ -110,7 +110,7 @@ void TapeFileInfoWidget::setFile( File* file ) _fileName->setText( _file->getName() ); - QString tmp; + TQString tmp; time_t tm = _file->getMTime(); tmp = ctime( &tm ); tmp = tmp.stripWhiteSpace(); @@ -121,7 +121,7 @@ void TapeFileInfoWidget::setFile( File* file ) _endRecord->setText( Util::bytesToString( _file->getEndRecord() ) ); if ( _file->isDirectory() ) { - QPtrListIterator it( _file->getRanges() ); + TQPtrListIterator it( _file->getRanges() ); int records = 0; for ( ; it.current(); ++it ) { records += it.current()->getEnd() - it.current()->getStart(); diff --git a/kdat/TapeFileInfoWidget.h b/kdat/TapeFileInfoWidget.h index 0eaa2a6..e38cd6e 100644 --- a/kdat/TapeFileInfoWidget.h +++ b/kdat/TapeFileInfoWidget.h @@ -19,7 +19,7 @@ #ifndef _TapeFileInfoWidget_h_ #define _TapeFileInfoWidget_h_ -#include +#include class QLabel; @@ -28,14 +28,14 @@ class File; /** * @short Display information about a tape file. */ -class TapeFileInfoWidget : public QWidget { +class TapeFileInfoWidget : public TQWidget { Q_OBJECT File* _file; - QLabel* _fileName; - QLabel* _mtime; - QLabel* _startRecord; - QLabel* _endRecord; - QLabel* _size; + TQLabel* _fileName; + TQLabel* _mtime; + TQLabel* _startRecord; + TQLabel* _endRecord; + TQLabel* _size; public: /** * Create a new tape file info widget. @@ -43,7 +43,7 @@ public: * @param parent The parent widget. * @param name The name of this widget. */ - TapeFileInfoWidget( QWidget* parent = 0, const char* name = 0 ); + TapeFileInfoWidget( TQWidget* parent = 0, const char* name = 0 ); /** * Destroy the tape file info widget. diff --git a/kdat/TapeInfoWidget.cpp b/kdat/TapeInfoWidget.cpp index 8a22656..1455743 100644 --- a/kdat/TapeInfoWidget.cpp +++ b/kdat/TapeInfoWidget.cpp @@ -19,10 +19,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -37,17 +37,17 @@ #include "TapeInfoWidget.moc" -TapeInfoWidget::TapeInfoWidget( QWidget* parent, const char* name ) - : QWidget( parent, name ), +TapeInfoWidget::TapeInfoWidget( TQWidget* parent, const char* name ) + : TQWidget( parent, name ), _tape( 0 ) { - QLabel* lbl1 = new QLabel( i18n( "Tape name:" ), this ); - QLabel* lbl2 = new QLabel( i18n( "Tape size:" ), this ); - QLabel* lbl3 = new QLabel( i18n( "Tape ID:" ), this ); - QLabel* lbl4 = new QLabel( i18n( "Created on:" ), this ); - QLabel* lbl5 = new QLabel( i18n( "Last modified:" ), this ); - QLabel* lbl6 = new QLabel( i18n( "Archive count:" ), this ); - QLabel* lbl7 = new QLabel( i18n( "Space used:" ), this ); + TQLabel* lbl1 = new TQLabel( i18n( "Tape name:" ), this ); + TQLabel* lbl2 = new TQLabel( i18n( "Tape size:" ), this ); + TQLabel* lbl3 = new TQLabel( i18n( "Tape ID:" ), this ); + TQLabel* lbl4 = new TQLabel( i18n( "Created on:" ), this ); + TQLabel* lbl5 = new TQLabel( i18n( "Last modified:" ), this ); + TQLabel* lbl6 = new TQLabel( i18n( "Archive count:" ), this ); + TQLabel* lbl7 = new TQLabel( i18n( "Space used:" ), this ); int max = lbl1->sizeHint().width(); if ( lbl2->sizeHint().width() > max ) max = lbl2->sizeHint().width(); @@ -65,86 +65,86 @@ TapeInfoWidget::TapeInfoWidget( QWidget* parent, const char* name ) lbl6->setFixedSize( max, lbl6->sizeHint().height() ); lbl7->setFixedSize( max, lbl7->sizeHint().height() ); - _tapeName = new QLineEdit( this ); + _tapeName = new TQLineEdit( this ); _tapeName->setFixedHeight( _tapeName->sizeHint().height() ); - _tapeSize = new QLineEdit( this ); + _tapeSize = new TQLineEdit( this ); _tapeSize->setFixedSize( 48, _tapeSize->sizeHint().height() ); - _tapeSizeUnits = new QComboBox( this ); + _tapeSizeUnits = new TQComboBox( this ); _tapeSizeUnits->setFixedSize( 48, _tapeSizeUnits->sizeHint().height() ); _tapeSizeUnits->insertItem( "MB" ); _tapeSizeUnits->insertItem( "GB" ); - _tapeID = new QLabel( "???", this ); + _tapeID = new TQLabel( "???", this ); _tapeID->setFixedHeight( _tapeID->sizeHint().height() ); - _ctime = new QLabel( "???", this ); + _ctime = new TQLabel( "???", this ); _ctime->setFixedHeight( _ctime->sizeHint().height() ); - _mtime = new QLabel( "???", this ); + _mtime = new TQLabel( "???", this ); _mtime->setFixedHeight( _mtime->sizeHint().height() ); - _archiveCount = new QLabel( "???", this ); + _archiveCount = new TQLabel( "???", this ); _archiveCount->setFixedHeight( _archiveCount->sizeHint().height() ); - _spaceUsed = new QLabel( "???", this ); + _spaceUsed = new TQLabel( "???", this ); _spaceUsed->setFixedHeight( _spaceUsed->sizeHint().height() ); _apply = new KPushButton( KStdGuiItem::apply(), this ); _apply->setFixedSize( 80, _apply->sizeHint().height() ); _apply->setEnabled( FALSE ); - QVBoxLayout* l1 = new QVBoxLayout( this, 4, 4 ); + TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 ); - QHBoxLayout* l1_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1 = new TQHBoxLayout(); l1->addLayout( l1_1 ); l1_1->addWidget( lbl1 ); l1_1->addWidget( _tapeName, 1 ); - QHBoxLayout* l1_2 = new QHBoxLayout(); + TQHBoxLayout* l1_2 = new TQHBoxLayout(); l1->addLayout( l1_2 ); l1_2->addWidget( lbl2 ); l1_2->addWidget( _tapeSize ); l1_2->addWidget( _tapeSizeUnits ); l1_2->addStretch( 1 ); - QHBoxLayout* l1_3 = new QHBoxLayout(); + TQHBoxLayout* l1_3 = new TQHBoxLayout(); l1->addLayout( l1_3 ); l1_3->addWidget( lbl3 ); l1_3->addWidget( _tapeID ); - QHBoxLayout* l1_4 = new QHBoxLayout(); + TQHBoxLayout* l1_4 = new TQHBoxLayout(); l1->addLayout( l1_4 ); l1_4->addWidget( lbl4 ); l1_4->addWidget( _ctime ); - QHBoxLayout* l1_5 = new QHBoxLayout(); + TQHBoxLayout* l1_5 = new TQHBoxLayout(); l1->addLayout( l1_5 ); l1_5->addWidget( lbl5 ); l1_5->addWidget( _mtime ); - QHBoxLayout* l1_6 = new QHBoxLayout(); + TQHBoxLayout* l1_6 = new TQHBoxLayout(); l1->addLayout( l1_6 ); l1_6->addWidget( lbl6 ); l1_6->addWidget( _archiveCount ); - QHBoxLayout* l1_7 = new QHBoxLayout(); + TQHBoxLayout* l1_7 = new TQHBoxLayout(); l1->addLayout( l1_7 ); l1_7->addWidget( lbl7 ); l1_7->addWidget( _spaceUsed ); l1->addStretch( 1 ); - QHBoxLayout* l1_8 = new QHBoxLayout(); + TQHBoxLayout* l1_8 = new TQHBoxLayout(); l1->addLayout( l1_8 ); l1_8->addStretch( 1 ); l1_8->addWidget( _apply ); - connect( _tapeName , SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) ); - connect( _tapeSize , SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) ); - connect( _tapeSizeUnits, SIGNAL( activated( int ) ) , this, SLOT( slotActivated( int ) ) ); - connect( _apply , SIGNAL( clicked() ) , this, SLOT( slotApply() ) ); + connect( _tapeName , TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) ); + connect( _tapeSize , TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) ); + connect( _tapeSizeUnits, TQT_SIGNAL( activated( int ) ) , this, TQT_SLOT( slotActivated( int ) ) ); + connect( _apply , TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotApply() ) ); } TapeInfoWidget::~TapeInfoWidget() @@ -171,7 +171,7 @@ void TapeInfoWidget::setTape( Tape* tape ) size /= 1024; _tapeSizeUnits->setCurrentItem( 0 ); } - QString tmp; + TQString tmp; tmp.setNum( size ); _tapeSize->setText( tmp ); @@ -190,7 +190,7 @@ void TapeInfoWidget::setTape( Tape* tape ) tmp.setNum( _tape->getChildren().count() ); _archiveCount->setText( tmp ); - QPtrListIterator i( _tape->getChildren() ); + TQPtrListIterator i( _tape->getChildren() ); int used = 1; for ( ; i.current(); ++i ) { used += i.current()->getEndBlock(); @@ -202,7 +202,7 @@ void TapeInfoWidget::setTape( Tape* tape ) used *= blockSize / 1024; } if ( _tape->getSize() > 0 ) { - tmp = QString::fromLatin1( "%1 / %2 (%3%)") + tmp = TQString::fromLatin1( "%1 / %2 (%3%)") .arg(Util::kbytesToString( used )) .arg(Util::kbytesToString( _tape->getSize() )) .arg(used * 100 / _tape->getSize() ); @@ -230,7 +230,7 @@ bool TapeInfoWidget::isModified() return _tape->getSize() != size; } -void TapeInfoWidget::slotTextChanged( const QString & ) +void TapeInfoWidget::slotTextChanged( const TQString & ) { if ( !_tape ) { return; diff --git a/kdat/TapeInfoWidget.h b/kdat/TapeInfoWidget.h index 4b3b3a2..74bde2d 100644 --- a/kdat/TapeInfoWidget.h +++ b/kdat/TapeInfoWidget.h @@ -19,7 +19,7 @@ #ifndef _TapeInfoWidget_h_ #define _TapeInfoWidget_h_ -#include +#include class QComboBox; class QLabel; @@ -31,29 +31,29 @@ class Tape; /** * @short Display/edit information about a tape index. */ -class TapeInfoWidget : public QWidget { +class TapeInfoWidget : public TQWidget { Q_OBJECT Tape* _tape; - QLineEdit* _tapeName; - QLineEdit* _tapeSize; - QComboBox* _tapeSizeUnits; - QLabel* _tapeID; - QLabel* _ctime; - QLabel* _mtime; - QLabel* _archiveCount; - QLabel* _spaceUsed; - QPushButton* _apply; + TQLineEdit* _tapeName; + TQLineEdit* _tapeSize; + TQComboBox* _tapeSizeUnits; + TQLabel* _tapeID; + TQLabel* _ctime; + TQLabel* _mtime; + TQLabel* _archiveCount; + TQLabel* _spaceUsed; + TQPushButton* _apply; bool isModified(); private slots: - void slotTextChanged( const QString & text ); + void slotTextChanged( const TQString & text ); void slotActivated( int index ); void slotApply(); public: /** * Create a new tape info widget. */ - TapeInfoWidget( QWidget* parent = 0, const char* name = 0 ); + TapeInfoWidget( TQWidget* parent = 0, const char* name = 0 ); /** * Destroy the tape info widget. diff --git a/kdat/TapeManager.cpp b/kdat/TapeManager.cpp index 5de218e..919872f 100644 --- a/kdat/TapeManager.cpp +++ b/kdat/TapeManager.cpp @@ -19,9 +19,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -36,20 +36,20 @@ TapeManager::TapeManager() _tapes.setAutoDelete( TRUE ); // Get a list of all available tape indexes. - QStringList relList; + TQStringList relList; // Fix 2002-01-24 c/o RG. The problem was: "Tape Index is empty, but I did // just a few minutes ago a 1st backup onto the the tape." // (void) KGlobal::dirs()->findAllResources( "appdata", ".*:[0-9]+", false, true, relList); (void) KGlobal::dirs()->findAllResources( "appdata", "*:[0-9]*", false, true, relList); - for(QStringList::Iterator it = relList.begin(); + for(TQStringList::Iterator it = relList.begin(); it != relList.end(); it++) { - QString fn = *it; - // Convert to outdated QStringList :-) - _tapeIDs.append( QFile::encodeName(fn) ); + TQString fn = *it; + // Convert to outdated TQStringList :-) + _tapeIDs.append( TQFile::encodeName(fn) ); } } @@ -68,21 +68,21 @@ TapeManager* TapeManager::instance() return _instance; } -const QStringList& TapeManager::getTapeIDs() +const TQStringList& TapeManager::getTapeIDs() { return _tapeIDs; } -Tape* TapeManager::findTape( const QString & id ) +Tape* TapeManager::findTape( const TQString & id ) { /* 2002-01-26 LEW */ // printf("Contents of _tapeIDs: %d entries\n", _tapes.count()); - // for ( QStringList::Iterator it = _tapeIDs.begin(); it != _tapeIDs.end(); ++it ) { + // for ( TQStringList::Iterator it = _tapeIDs.begin(); it != _tapeIDs.end(); ++it ) { // printf("%s\n", (*it).latin1()); // } // printf("\n"); - // QDictIterator it( _tapes ); + // TQDictIterator it( _tapes ); // printf("Contents of _tapes: %d entries\n", _tapes.count()); // for( ; it.current(); ++it ) // printf("index ?: %s (%d)\n", it.current()->getName().latin1(), @@ -118,9 +118,9 @@ void TapeManager::removeTape( Tape* tape ) emit sigTapeRemoved( tape ); // Remove the index file. - QString filename = locateLocal( "appdata", tape->getID() ); + TQString filename = locateLocal( "appdata", tape->getID() ); - unlink( QFile::encodeName(filename) ); + unlink( TQFile::encodeName(filename) ); _tapeIDs.remove( tape->getID() ); _tapes.remove( tape->getID() ); diff --git a/kdat/TapeManager.h b/kdat/TapeManager.h index bc91aab..b571605 100644 --- a/kdat/TapeManager.h +++ b/kdat/TapeManager.h @@ -19,9 +19,9 @@ #ifndef _TapeManager_h_ #define _TapeManager_h_ -#include -#include -#include +#include +#include +#include #include "Tape.h" @@ -41,13 +41,13 @@ * * The TapeManager follows the Singleton pattern. */ -class TapeManager : public QObject { +class TapeManager : public TQObject { Q_OBJECT static TapeManager* _instance; - QDict _tapes; - QStringList _tapeIDs; + TQDict _tapes; + TQStringList _tapeIDs; Tape* _mountedTape; TapeManager(); @@ -64,9 +64,9 @@ public: /** * Get the list of all known tape IDs. * - * @return a QStringList containing the tape IDs. + * @return a TQStringList containing the tape IDs. */ - const QStringList& getTapeIDs(); + const TQStringList& getTapeIDs(); /** * Retrieve the index for a tape. @@ -74,7 +74,7 @@ public: * @param id the ID of the tape. * @return the tape's index. */ - Tape* findTape( const QString & id ); + Tape* findTape( const TQString & id ); /** * Add a new tape index. diff --git a/kdat/TarParser.h b/kdat/TarParser.h index b43fd35..8dd4058 100644 --- a/kdat/TarParser.h +++ b/kdat/TarParser.h @@ -19,7 +19,7 @@ #ifndef _TarParser_h_ #define _TarParser_h_ -#include +#include /* Standard Archive Format - Standard TAR - USTAR. */ @@ -166,7 +166,7 @@ union record /** * @short A parser for GNU tar archives. */ -class TarParser : public QObject { +class TarParser : public TQObject { Q_OBJECT char _buf[512]; int _bufIdx; @@ -201,7 +201,7 @@ signals: * @param mtime The last modification time for the file. * @param record The tar record that this file begins on. */ - void sigEntry( const QString & name, int size, int mtime, int record ); + void sigEntry( const TQString & name, int size, int mtime, int record ); }; #endif diff --git a/kdat/Util.cpp b/kdat/Util.cpp index 7fb06a3..11e7219 100644 --- a/kdat/Util.cpp +++ b/kdat/Util.cpp @@ -16,26 +16,26 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -#include +#include #include #include #include "Util.h" -QString Util::bytesToString( uint bytes ) +TQString Util::bytesToString( uint bytes ) { return KGlobal::locale()->formatNumber(bytes, 0); } -QString Util::kbytesToString( uint kbytes ) +TQString Util::kbytesToString( uint kbytes ) { return KGlobal::locale()->formatNumber(kbytes, 0) + 'k'; } -QString Util::longestCommonPath( const QStringList& files ) +TQString Util::longestCommonPath( const TQStringList& files ) { - QStringList filesTmp = files; - QStringList::Iterator i = filesTmp.begin(); + TQStringList filesTmp = files; + TQStringList::Iterator i = filesTmp.begin(); uint minLen = (*i).length(); for ( ; i != filesTmp.end(); ++i ) { @@ -46,7 +46,7 @@ QString Util::longestCommonPath( const QStringList& files ) uint j; for ( j = 0; j < minLen; j++ ) { i = filesTmp.begin(); - QString first = *i; + TQString first = *i; for ( ; i != filesTmp.end(); ++i ) { if ( first.left(j) != (*i).left(j) ) { // Prefixes are NOT the same. @@ -59,7 +59,7 @@ QString Util::longestCommonPath( const QStringList& files ) } } i = filesTmp.begin(); - QString prefix = *i; + TQString prefix = *i; int idx = prefix.findRev( '/', j ); if ( idx > -1 ) { prefix = prefix.left( prefix.findRev( '/', j ) ); diff --git a/kdat/Util.h b/kdat/Util.h index bf761e5..846dbc6 100644 --- a/kdat/Util.h +++ b/kdat/Util.h @@ -19,7 +19,7 @@ #ifndef _Util_h_ #define _Util_h_ -#include +#include /** * @short A collection of common useful methods. @@ -30,18 +30,18 @@ public: * Format the given number of bytes into a comma-separated string of * digits. */ - static QString bytesToString( uint bytes ); + static TQString bytesToString( uint bytes ); /** * Format the given number of kilobytes into a comma-separated string of * digits, followed by a 'k'. */ - static QString kbytesToString( uint kbytes ); + static TQString kbytesToString( uint kbytes ); /** * Find the longest common path prefix for a list of files. */ - static QString longestCommonPath( const QStringList& files ); + static TQString longestCommonPath( const TQStringList& files ); }; #endif diff --git a/kdat/VerifyDlg.cpp b/kdat/VerifyDlg.cpp index 6714322..92fe9cf 100644 --- a/kdat/VerifyDlg.cpp +++ b/kdat/VerifyDlg.cpp @@ -24,9 +24,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -44,9 +44,9 @@ #include "VerifyDlg.moc" -VerifyDlg::VerifyDlg( const QString & workingDir, int fileno, const RangeList& ranges, - bool restore, QWidget* parent, const char* name ) - : QDialog( parent, name, TRUE ), +VerifyDlg::VerifyDlg( const TQString & workingDir, int fileno, const RangeList& ranges, + bool restore, TQWidget* parent, const char* name ) + : TQDialog( parent, name, TRUE ), _restore( restore ), _proc( NULL ), _workingDir( workingDir ), @@ -59,7 +59,7 @@ VerifyDlg::VerifyDlg( const QString & workingDir, int fileno, const RangeList& r _done( FALSE ) { // Calculate size of verify. - QPtrListIterator i( _ranges.getRanges() ); + TQPtrListIterator i( _ranges.getRanges() ); _archiveSize = 0; for ( ; i.current(); ++i ) { _archiveSize += i.current()->getEnd() - i.current()->getStart(); @@ -82,52 +82,52 @@ VerifyDlg::VerifyDlg( const QString & workingDir, int fileno, const RangeList& r // const int labelWidth = 96; const int labelWidth = 110; - QFrame* f1 = new QFrame( this ); - f1->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + TQFrame* f1 = new TQFrame( this ); + f1->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - QFrame* f2 = new QFrame( this ); - f2->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + TQFrame* f2 = new TQFrame( this ); + f2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - QLabel* lbl1 = new QLabel( i18n( "Elapsed time:" ), f1 ); + TQLabel* lbl1 = new TQLabel( i18n( "Elapsed time:" ), f1 ); lbl1->setFixedSize( labelWidth, lbl1->sizeHint().height() ); - _elapsedTime = new QLabel( i18n( "00:00:00" ), f1 ); + _elapsedTime = new TQLabel( i18n( "00:00:00" ), f1 ); _elapsedTime->setFixedHeight( _elapsedTime->sizeHint().height() ); - QLabel* lbl2 = new QLabel( i18n( "Time remaining:" ), f2 ); + TQLabel* lbl2 = new TQLabel( i18n( "Time remaining:" ), f2 ); lbl2->setFixedSize( labelWidth, lbl2->sizeHint().height() ); - _timeRemaining = new QLabel( i18n( "00:00:00" ), f2 ); + _timeRemaining = new TQLabel( i18n( "00:00:00" ), f2 ); _timeRemaining->setFixedHeight( _timeRemaining->sizeHint().height() ); - QLabel* lbl3 = new QLabel( i18n( "Total KB:" ), f1 ); + TQLabel* lbl3 = new TQLabel( i18n( "Total KB:" ), f1 ); lbl3->setFixedSize( labelWidth, lbl3->sizeHint().height() ); - QLabel* totalKbytes = new QLabel( Util::kbytesToString( _archiveSize ), f1 ); + TQLabel* totalKbytes = new TQLabel( Util::kbytesToString( _archiveSize ), f1 ); totalKbytes->setFixedHeight( totalKbytes->sizeHint().height() ); - QLabel* lbl4 = new QLabel( i18n( "KB read:" ), f2 ); + TQLabel* lbl4 = new TQLabel( i18n( "KB read:" ), f2 ); lbl4->setFixedSize( labelWidth, lbl4->sizeHint().height() ); - _kbytesRead = new QLabel( i18n( "0KB" ), f2 ); + _kbytesRead = new TQLabel( i18n( "0KB" ), f2 ); _kbytesRead->setFixedHeight( _kbytesRead->sizeHint().height() ); - QLabel* lbl5 = new QLabel( i18n( "Transfer rate:" ), f1 ); + TQLabel* lbl5 = new TQLabel( i18n( "Transfer rate:" ), f1 ); lbl5->setFixedSize( labelWidth, lbl5->sizeHint().height() ); - _transferRate = new QLabel( i18n( "0KB/min" ), f1 ); + _transferRate = new TQLabel( i18n( "0KB/min" ), f1 ); _transferRate->setFixedHeight( _transferRate->sizeHint().height() ); - QLabel* lbl6; + TQLabel* lbl6; if ( _restore ) { - lbl6 = new QLabel( i18n( "Files:" ), f2 ); + lbl6 = new TQLabel( i18n( "Files:" ), f2 ); lbl6->setFixedSize( labelWidth, lbl6->sizeHint().height() ); } else { - lbl6 = new QLabel( i18n( "Differences:" ), f2 ); + lbl6 = new TQLabel( i18n( "Differences:" ), f2 ); lbl6->setFixedSize( labelWidth, lbl6->sizeHint().height() ); } - _files = new QLabel( "0", f2 ); + _files = new TQLabel( "0", f2 ); _files->setFixedHeight( _files->sizeHint().height() ); if ( _restore ) { @@ -138,63 +138,63 @@ VerifyDlg::VerifyDlg( const QString & workingDir, int fileno, const RangeList& r _ok = new KPushButton( KStdGuiItem::ok(), this ); _ok->setFixedSize( 80, _ok->sizeHint().height() ); - connect( _ok, SIGNAL( clicked() ), this, SLOT( slotOK() ) ); + connect( _ok, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOK() ) ); _ok->setEnabled( FALSE ); - _save = new QPushButton( i18n( "&Save Log..." ), this ); + _save = new TQPushButton( i18n( "&Save Log..." ), this ); _save->setFixedSize( 80, _save->sizeHint().height() ); - connect( _save, SIGNAL( clicked() ), _log, SLOT( save() ) ); + connect( _save, TQT_SIGNAL( clicked() ), _log, TQT_SLOT( save() ) ); _save->setEnabled( FALSE ); - _abort = new QPushButton( i18n( "&Abort" ), this ); + _abort = new TQPushButton( i18n( "&Abort" ), this ); _abort->setFixedSize( 80, _abort->sizeHint().height() ); - connect( _abort, SIGNAL( clicked() ), this, SLOT( slotAbort() ) ); + connect( _abort, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAbort() ) ); - QVBoxLayout* l1 = new QVBoxLayout( this, 8, 4 ); + TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 ); - QHBoxLayout* l1_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1 = new TQHBoxLayout(); l1->addLayout( l1_1 ); l1_1->addStrut( 3 * lbl1->height() + 16 ); l1_1->addWidget( f1 ); l1_1->addWidget( f2 ); - QVBoxLayout* l1_1_1 = new QVBoxLayout( f1, 4, 4 ); + TQVBoxLayout* l1_1_1 = new TQVBoxLayout( f1, 4, 4 ); - QHBoxLayout* l1_1_1_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1_1_1 = new TQHBoxLayout(); l1_1_1->addLayout( l1_1_1_1 ); l1_1_1_1->addWidget( lbl1 ); l1_1_1_1->addWidget( _elapsedTime, 1 ); - QHBoxLayout* l1_1_1_2 = new QHBoxLayout(); + TQHBoxLayout* l1_1_1_2 = new TQHBoxLayout(); l1_1_1->addLayout( l1_1_1_2 ); l1_1_1_2->addWidget( lbl3 ); l1_1_1_2->addWidget( totalKbytes, 1 ); - QHBoxLayout* l1_1_1_3 = new QHBoxLayout(); + TQHBoxLayout* l1_1_1_3 = new TQHBoxLayout(); l1_1_1->addLayout( l1_1_1_3 ); l1_1_1_3->addWidget( lbl5 ); l1_1_1_3->addWidget( _transferRate, 1 ); - QVBoxLayout* l1_1_2 = new QVBoxLayout( f2, 4, 4 ); + TQVBoxLayout* l1_1_2 = new TQVBoxLayout( f2, 4, 4 ); - QHBoxLayout* l1_1_2_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1_2_1 = new TQHBoxLayout(); l1_1_2->addLayout( l1_1_2_1 ); l1_1_2_1->addWidget( lbl2 ); l1_1_2_1->addWidget( _timeRemaining, 1 ); - QHBoxLayout* l1_1_2_2 = new QHBoxLayout(); + TQHBoxLayout* l1_1_2_2 = new TQHBoxLayout(); l1_1_2->addLayout( l1_1_2_2 ); l1_1_2_2->addWidget( lbl4 ); l1_1_2_2->addWidget( _kbytesRead, 1 ); - QHBoxLayout* l1_1_2_3 = new QHBoxLayout(); + TQHBoxLayout* l1_1_2_3 = new TQHBoxLayout(); l1_1_2->addLayout( l1_1_2_3 ); l1_1_2_3->addWidget( lbl6 ); l1_1_2_3->addWidget( _files, 1 ); l1->addWidget( _log, 1 ); - QHBoxLayout* l1_2 = new QHBoxLayout(); + TQHBoxLayout* l1_2 = new TQHBoxLayout(); l1->addLayout( l1_2 ); l1_2->addStretch( 1 ); l1_2->addWidget( _ok ); @@ -208,7 +208,7 @@ VerifyDlg::~VerifyDlg() void VerifyDlg::show() { - chdir( QFile::encodeName(_workingDir) ); + chdir( TQFile::encodeName(_workingDir) ); _proc = new KProcess(); //_proc->setExecutable( Options::instance()->getTarCommand() ); @@ -219,16 +219,16 @@ void VerifyDlg::show() *_proc << "-dvf" << "-"; } - connect( _proc, SIGNAL( processExited( KProcess* ) ), this, SLOT( slotProcessExited( KProcess* ) ) ); - connect( _proc, SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, SLOT( slotStdout( KProcess*, char*, int ) ) ); - connect( _proc, SIGNAL( wroteStdin( KProcess* ) ), this, SLOT( slotWroteStdin( KProcess* ) ) ); + connect( _proc, TQT_SIGNAL( processExited( KProcess* ) ), this, TQT_SLOT( slotProcessExited( KProcess* ) ) ); + connect( _proc, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), this, TQT_SLOT( slotStdout( KProcess*, char*, int ) ) ); + connect( _proc, TQT_SIGNAL( wroteStdin( KProcess* ) ), this, TQT_SLOT( slotWroteStdin( KProcess* ) ) ); _startTime = time( NULL ); startTimer( 100 ); _proc->start( KProcess::NotifyOnExit, KProcess::All ); - QDialog::show(); + TQDialog::show(); } void VerifyDlg::slotProcessExited( KProcess* ) @@ -247,7 +247,7 @@ void VerifyDlg::slotProcessExited( KProcess* ) void VerifyDlg::slotStdout( KProcess*, char* buf, int len ) { - QString data; + TQString data; data.replace( 0, len, buf ); /* 2002-02-23 RG */ // data[len] = '\0'; @@ -280,7 +280,7 @@ void VerifyDlg::slotStdout( KProcess*, char* buf, int len ) } _leftover.remove( 0, newlineIndex + 1 ); - QString tmp; + TQString tmp; tmp.setNum( _fileCount ); _files->setText( tmp ); } @@ -305,7 +305,7 @@ void VerifyDlg::slotAbort() _aborted = TRUE; } -void VerifyDlg::timerEvent( QTimerEvent* ) +void VerifyDlg::timerEvent( TQTimerEvent* ) { killTimers(); @@ -314,7 +314,7 @@ void VerifyDlg::timerEvent( QTimerEvent* ) int bytesToRead; int count; char *buf = new char[Options::instance()->getTapeBlockSize()]; - QPtrListIterator i( _ranges.getRanges() ); + TQPtrListIterator i( _ranges.getRanges() ); for ( ; ( !_done ) && ( !_aborted ) && ( i.current() ); ++i ) { // Move to the beginning of the next range. TapeDrive::instance()->seek( _fileno, i.current()->getStart() ); @@ -389,10 +389,10 @@ void VerifyDlg::timerEvent( QTimerEvent* ) void VerifyDlg::updateStats() { - QString str; + TQString str; int elapsed = time( NULL ) - _startTime; - str= QString::fromUtf8( QCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8(), elapsed / 3600, elapsed / 60 % 60, elapsed % 60 ) ); + str= TQString::fromUtf8( TQCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8(), elapsed / 3600, elapsed / 60 % 60, elapsed % 60 ) ); _elapsedTime->setText( str ); int remain = 0; @@ -402,7 +402,7 @@ void VerifyDlg::updateStats() if ( remain < 0 ) { remain = 0; } - str = QString::fromUtf8( QCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8(), remain / 3600, remain / 60 % 60, remain % 60 ) ); + str = TQString::fromUtf8( TQCString().sprintf( i18n( "%02d:%02d:%02d" ).utf8(), remain / 3600, remain / 60 % 60, remain % 60 ) ); _timeRemaining->setText( str ); str = Util::kbytesToString( (int)_totalKBytes ); diff --git a/kdat/VerifyDlg.h b/kdat/VerifyDlg.h index 0d7648e..a0ac521 100644 --- a/kdat/VerifyDlg.h +++ b/kdat/VerifyDlg.h @@ -19,8 +19,8 @@ #ifndef _VerifyDlg_h_ #define _VerifyDlg_h_ -#include -#include +#include +#include #include "Range.h" @@ -35,23 +35,23 @@ class TapeDrive; /** * @short Status dialog for verifying/restoring parts of an archive. */ -class VerifyDlg : public QDialog { +class VerifyDlg : public TQDialog { Q_OBJECT bool _restore; KProcess* _proc; - QString _workingDir; + TQString _workingDir; int _fileno; const RangeList& _ranges; - QString _leftover; - QLabel* _elapsedTime; - QLabel* _timeRemaining; - QLabel* _kbytesRead; - QLabel* _transferRate; - QLabel* _files; + TQString _leftover; + TQLabel* _elapsedTime; + TQLabel* _timeRemaining; + TQLabel* _kbytesRead; + TQLabel* _transferRate; + TQLabel* _files; LoggerWidget* _log; - QPushButton* _ok; - QPushButton* _save; - QPushButton* _abort; + TQPushButton* _ok; + TQPushButton* _save; + TQPushButton* _abort; int _startTime; float _totalKBytes; int _fileCount; @@ -59,7 +59,7 @@ class VerifyDlg : public QDialog { bool _wroteStdin; bool _aborted; bool _done; - QString _lastFileName; + TQString _lastFileName; void updateStats(); private slots: @@ -70,7 +70,7 @@ private slots: void slotAbort(); protected: void show(); - void timerEvent( QTimerEvent* e ); + void timerEvent( TQTimerEvent* e ); public: /** * Create a new verify/restore dialog. @@ -82,8 +82,8 @@ public: * @param parent The parent widget for the dialog. * @param name The name of this widget. */ - VerifyDlg( const QString & workingDir, int fileno, const RangeList& ranges, - bool restore = FALSE, QWidget* parent = 0, const char* name = 0 ); + VerifyDlg( const TQString & workingDir, int fileno, const RangeList& ranges, + bool restore = FALSE, TQWidget* parent = 0, const char* name = 0 ); /** * Destroy the verify/restore dialog. diff --git a/kdat/VerifyOptDlg.cpp b/kdat/VerifyOptDlg.cpp index 3eb272d..f65d41f 100644 --- a/kdat/VerifyOptDlg.cpp +++ b/kdat/VerifyOptDlg.cpp @@ -18,10 +18,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -33,8 +33,8 @@ #include "VerifyOptDlg.moc" -VerifyOptDlg::VerifyOptDlg( const QString & def, const QStringList& files, bool restore, QWidget* parent, const char* name ) - : QDialog( parent, name, TRUE ), +VerifyOptDlg::VerifyOptDlg( const TQString & def, const TQStringList& files, bool restore, TQWidget* parent, const char* name ) + : TQDialog( parent, name, TRUE ), _restore( restore ) { if ( _restore ) { @@ -45,30 +45,30 @@ VerifyOptDlg::VerifyOptDlg( const QString & def, const QStringList& files, bool setCaption( i18n( "KDat: Verify Options" ) ); } - QLabel* lbl1; + TQLabel* lbl1; if ( _restore ) { - lbl1 = new QLabel( i18n( "Restore to folder:" ), this ); + lbl1 = new TQLabel( i18n( "Restore to folder:" ), this ); } else { - lbl1 = new QLabel( i18n( "Verify in folder:" ), this ); + lbl1 = new TQLabel( i18n( "Verify in folder:" ), this ); } lbl1->setFixedSize( lbl1->sizeHint() ); - _entry = new QLineEdit( this ); + _entry = new TQLineEdit( this ); _entry->setText( def ); _entry->setFixedHeight( _entry->sizeHint().height() ); - QPushButton* browse = new QPushButton( i18n( "..." ), this ); + TQPushButton* browse = new TQPushButton( i18n( "..." ), this ); browse->setFixedSize( browse->sizeHint() ); - QLabel* lbl2; + TQLabel* lbl2; if ( _restore ) { - lbl2 = new QLabel( i18n( "Restore files:" ), this ); + lbl2 = new TQLabel( i18n( "Restore files:" ), this ); } else { - lbl2 = new QLabel( i18n( "Verify files:" ), this ); + lbl2 = new TQLabel( i18n( "Verify files:" ), this ); } lbl2->setFixedHeight( lbl2->sizeHint().height() ); - QListBox* fileList = new QListBox( this ); + TQListBox* fileList = new TQListBox( this ); fileList->insertStringList(files); KPushButton* ok = new KPushButton( KStdGuiItem::ok(), this ); @@ -76,9 +76,9 @@ VerifyOptDlg::VerifyOptDlg( const QString & def, const QStringList& files, bool KPushButton* cancel = new KPushButton( KStdGuiItem::cancel(), this ); cancel->setFixedSize( 80, cancel->sizeHint().height() ); - QVBoxLayout* l1 = new QVBoxLayout( this, 8, 4 ); + TQVBoxLayout* l1 = new TQVBoxLayout( this, 8, 4 ); - QHBoxLayout* l1_1 = new QHBoxLayout(); + TQHBoxLayout* l1_1 = new TQHBoxLayout(); l1->addLayout( l1_1 ); l1_1->addWidget( lbl1 ); l1_1->addWidget( _entry, 1 ); @@ -87,7 +87,7 @@ VerifyOptDlg::VerifyOptDlg( const QString & def, const QStringList& files, bool l1->addWidget( lbl2 ); l1->addWidget( fileList, 1 ); - QHBoxLayout* l1_2 = new QHBoxLayout(); + TQHBoxLayout* l1_2 = new TQHBoxLayout(); l1->addLayout( l1_2, 0 ); l1_2->addStretch( 1 ); l1_2->addWidget( ok, 0 ); @@ -98,10 +98,10 @@ VerifyOptDlg::VerifyOptDlg( const QString & def, const QStringList& files, bool _entry->setFocus(); _entry->selectAll(); - connect( _entry, SIGNAL( returnPressed() ), this, SLOT( okClicked() ) ); - connect( browse, SIGNAL( clicked() ) , this, SLOT( slotBrowse() ) ); - connect( ok , SIGNAL( clicked() ) , this, SLOT( okClicked() ) ); - connect( cancel, SIGNAL( clicked() ) , this, SLOT( reject() ) ); + connect( _entry, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( okClicked() ) ); + connect( browse, TQT_SIGNAL( clicked() ) , this, TQT_SLOT( slotBrowse() ) ); + connect( ok , TQT_SIGNAL( clicked() ) , this, TQT_SLOT( okClicked() ) ); + connect( cancel, TQT_SIGNAL( clicked() ) , this, TQT_SLOT( reject() ) ); } VerifyOptDlg::~VerifyOptDlg() @@ -114,14 +114,14 @@ void VerifyOptDlg::okClicked() accept(); } -QString VerifyOptDlg::getWorkingDirectory() +TQString VerifyOptDlg::getWorkingDirectory() { return _workingDir; } void VerifyOptDlg::slotBrowse() { - QString tmp; + TQString tmp; tmp = KFileDialog::getExistingDirectory( _entry->text() ); if ( tmp.length() ) { _entry->setText( tmp ); diff --git a/kdat/VerifyOptDlg.h b/kdat/VerifyOptDlg.h index f5023e4..67275a3 100644 --- a/kdat/VerifyOptDlg.h +++ b/kdat/VerifyOptDlg.h @@ -19,8 +19,8 @@ #ifndef _VerifyOptDlg_h_ #define _VerifyOptDlg_h_ -#include -#include +#include +#include class QLineEdit; @@ -30,11 +30,11 @@ class QLineEdit; * The verify and restore operations are similiar enough that their options * have been combined into a single dialog. */ -class VerifyOptDlg : public QDialog { +class VerifyOptDlg : public TQDialog { Q_OBJECT bool _restore; - QString _workingDir; - QLineEdit* _entry; + TQString _workingDir; + TQLineEdit* _entry; private slots: void okClicked(); void slotBrowse(); @@ -48,7 +48,7 @@ public: * @param parent The parent widget for the dialog. * @param name The name for the dialog. */ - VerifyOptDlg( const QString & def, const QStringList& files, bool restore = FALSE, QWidget* parent = 0, const char* name = 0 ); + VerifyOptDlg( const TQString & def, const TQStringList& files, bool restore = FALSE, TQWidget* parent = 0, const char* name = 0 ); /** * Destroy the verify/restore options dialog. @@ -60,7 +60,7 @@ public: * * @return The working directory for the verify/restore operation. */ - QString getWorkingDirectory(); + TQString getWorkingDirectory(); }; #endif diff --git a/kdat/ktreeview.cpp b/kdat/ktreeview.cpp index 334a834..90d445e 100644 --- a/kdat/ktreeview.cpp +++ b/kdat/ktreeview.cpp @@ -24,11 +24,11 @@ #include #include "ktreeview.moc" -#include /* used for QApplication::closingDown() */ -#include /* used for keyboard interface */ -#include /* used to paint items */ -#include -#include +#include /* used for TQApplication::closingDown() */ +#include /* used for keyboard interface */ +#include /* used to paint items */ +#include +#include #include /* @@ -40,7 +40,7 @@ */ // constructor -KTreeViewItem::KTreeViewItem(const QString& theText) : +KTreeViewItem::KTreeViewItem(const TQString& theText) : owner(0), numChildren(0), doExpandButton(true), @@ -57,8 +57,8 @@ KTreeViewItem::KTreeViewItem(const QString& theText) : } // constructor that takes a pixmap -KTreeViewItem::KTreeViewItem(const QString& theText, - const QPixmap& thePixmap) : +KTreeViewItem::KTreeViewItem(const TQString& theText, + const TQPixmap& thePixmap) : owner(0), numChildren(0), doExpandButton(true), @@ -110,14 +110,14 @@ void KTreeViewItem::appendChild(KTreeViewItem* newChild) // returns the bounding rectangle of the item content (not including indent // and branches) for hit testing -QRect KTreeViewItem::boundingRect(int indent) const +TQRect KTreeViewItem::boundingRect(int indent) const { - const QFontMetrics& fm = owner->fontMetrics(); + const TQFontMetrics& fm = owner->fontMetrics(); int rectX = indent; int rectY = 1; int rectW = width(indent, fm) - rectX; int rectH = height(fm) - 2; - return QRect(rectX, rectY, rectW, rectH); + return TQRect(rectX, rectY, rectW, rectH); } // returns the child item at the specified index @@ -153,12 +153,12 @@ int KTreeViewItem::childIndex(KTreeViewItem* searched) const } // indicates whether mouse press is in expand button -inline bool KTreeViewItem::expandButtonClicked(const QPoint& coord) const +inline bool KTreeViewItem::expandButtonClicked(const TQPoint& coord) const { return expandButton.contains(coord); } -bool KTreeViewItem::mousePressEvent( const QPoint& ) +bool KTreeViewItem::mousePressEvent( const TQPoint& ) { return FALSE; } @@ -176,7 +176,7 @@ KTreeViewItem* KTreeViewItem::getParent() const } // returns reference to the item pixmap -const QPixmap& KTreeViewItem::getPixmap() const +const TQPixmap& KTreeViewItem::getPixmap() const { return pixmap; } @@ -188,7 +188,7 @@ KTreeViewItem* KTreeViewItem::getSibling() const } // returns a pointer to the item text -const QString& KTreeViewItem::getText() const +const TQString& KTreeViewItem::getText() const { return text; } @@ -219,7 +219,7 @@ int KTreeViewItem::height() const // returns the maximum height of text and pixmap including margins // or -1 if item is empty -- SHOULD NEVER BE -1! -int KTreeViewItem::height(const QFontMetrics& fm) const +int KTreeViewItem::height(const TQFontMetrics& fm) const { int maxHeight = pixmap.height(); int textHeight = fm.ascent() + fm.leading(); @@ -277,7 +277,7 @@ bool KTreeViewItem::isVisible() const } // paint this item, including tree branches and expand button -void KTreeViewItem::paint(QPainter* p, int indent, const QColorGroup& cg, +void KTreeViewItem::paint(TQPainter* p, int indent, const TQColorGroup& cg, bool highlighted) const { assert(getParent() != 0); /* can't paint root item */ @@ -312,7 +312,7 @@ void KTreeViewItem::paint(QPainter* p, int indent, const QColorGroup& cg, p->restore(); } -void KTreeViewItem::paintExpandButton(QPainter* p, int indent, int cellHeight) const +void KTreeViewItem::paintExpandButton(TQPainter* p, int indent, int cellHeight) const { int parentLeaderX = indent - (22 / 2); int cellCenterY = cellHeight / 2; @@ -333,22 +333,22 @@ void KTreeViewItem::paintExpandButton(QPainter* p, int indent, int cellHeight) c } // paint the highlight -void KTreeViewItem::paintHighlight(QPainter* p, int indent, const QColorGroup& colorGroup, +void KTreeViewItem::paintHighlight(TQPainter* p, int indent, const TQColorGroup& colorGroup, bool hasFocus, Qt::GUIStyle style) const { - QColor fc; + TQColor fc; if (style == Qt::WindowsStyle) fc = Qt::darkBlue; /* hardcoded in Qt */ else fc = colorGroup.text(); - QRect textRect = textBoundingRect(indent); + TQRect textRect = textBoundingRect(indent); int t,l,b,r; textRect.coords(&l, &t, &r, &b); p->fillRect(textRect, fc); /* draw highlight background */ if (hasFocus) { if(style == Qt::WindowsStyle) { /* draw Windows style highlight */ textRect.setCoords(l - 1, t - 1, r + 1, b + 1); - p->setPen(QPen(Qt::yellow, 0, Qt::DotLine)); + p->setPen(TQPen(Qt::yellow, 0, Qt::DotLine)); p->setBackgroundColor(fc); p->setBackgroundMode(Qt::OpaqueMode); p->drawRect(textRect); @@ -364,15 +364,15 @@ void KTreeViewItem::paintHighlight(QPainter* p, int indent, const QColorGroup& c } // draw the text, highlighted if requested -void KTreeViewItem::paintText(QPainter* p, int indent, int cellHeight, - const QColorGroup& cg, bool highlighted) const +void KTreeViewItem::paintText(TQPainter* p, int indent, int cellHeight, + const TQColorGroup& cg, bool highlighted) const { int textX = indent + pixmap.width() + 4; int textY = cellHeight - ((cellHeight - p->fontMetrics().ascent() - p->fontMetrics().leading()) / 2); if (highlighted) { paintHighlight(p, indent, cg, owner->hasFocus(), - (Qt::GUIStyle)owner->style().styleHint(QStyle::SH_GUIStyle)); // Qt3 doesn't make this easy ;) + (Qt::GUIStyle)owner->style().styleHint(TQStyle::SH_GUIStyle)); // Qt3 doesn't make this easy ;) p->setPen(cg.base()); p->setBackgroundColor(cg.text()); } @@ -384,7 +384,7 @@ void KTreeViewItem::paintText(QPainter* p, int indent, int cellHeight, } // paint the tree structure -void KTreeViewItem::paintTree(QPainter* p, int indent, int cellHeight) const +void KTreeViewItem::paintTree(TQPainter* p, int indent, int cellHeight) const { int parentLeaderX = indent - (22 / 2); int cellCenterY = cellHeight / 2; @@ -504,7 +504,7 @@ void KTreeViewItem::setExpanded(bool is) } // sets the item pixmap to the given pixmap -void KTreeViewItem::setPixmap(const QPixmap& pm) +void KTreeViewItem::setPixmap(const TQPixmap& pm) { pixmap = pm; if ( owner ) { @@ -514,7 +514,7 @@ void KTreeViewItem::setPixmap(const QPixmap& pm) } // sets the item text to the given string -void KTreeViewItem::setText(const QString& t) +void KTreeViewItem::setText(const TQString& t) { text = t; if ( owner ) { @@ -536,17 +536,17 @@ void KTreeViewItem::synchNumChildren() /* * returns the bounding rect of the item text in cell coordinates couldn't - * get QFontMetrics::boundingRect() to work right so I made my own + * get TQFontMetrics::boundingRect() to work right so I made my own */ -QRect KTreeViewItem::textBoundingRect(int indent) const +TQRect KTreeViewItem::textBoundingRect(int indent) const { - const QFontMetrics& fm = owner->fontMetrics(); + const TQFontMetrics& fm = owner->fontMetrics(); int cellHeight = height(fm); int rectX = indent + pixmap.width() + 3; int rectY = (cellHeight - fm.ascent() - fm.leading()) / 2 + 2; int rectW = fm.width(text) + 1; int rectH = fm.ascent() + fm.leading(); - return QRect(rectX, rectY, rectW, rectH); + return TQRect(rectX, rectY, rectW, rectH); } // returns the total width of text and pixmap, including margins, spacing @@ -556,7 +556,7 @@ int KTreeViewItem::width(int indent) const return width(indent, owner->fontMetrics()); } -int KTreeViewItem::width(int indent, const QFontMetrics& fm) const +int KTreeViewItem::width(int indent, const TQFontMetrics& fm) const { int maxWidth = pixmap.width(); maxWidth += (4 + fm.width(text)); @@ -573,10 +573,10 @@ int KTreeViewItem::width(int indent, const QFontMetrics& fm) const */ // constructor -KTreeView::KTreeView(QWidget *parent, +KTreeView::KTreeView(TQWidget *parent, const char *name, WFlags f) : - QGridView(parent, name, f), + TQGridView(parent, name, f), clearing(false), current(-1), drawExpandButton(true), @@ -598,11 +598,11 @@ KTreeView::KTreeView(QWidget *parent, //switch(style().guiStyle()) { //case WindowsStyle: //case MotifStyle: - setFrameStyle(QFrame::WinPanel | QFrame::Sunken); + setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); setBackgroundColor(colorGroup().base()); //break; /*default: - setFrameStyle(QFrame::Panel | QFrame::Plain); + setFrameStyle(TQFrame::Panel | TQFrame::Plain); setLineWidth(1); }*/ // setAcceptFocus(true); @@ -628,7 +628,7 @@ KTreeView::~KTreeView() // appends a child to the item at the given index with the given text // and pixmap -void KTreeView::appendChildItem(const QString & theText, const QPixmap& thePixmap, +void KTreeView::appendChildItem(const TQString & theText, const TQPixmap& thePixmap, int index) { KTreeViewItem* item = new KTreeViewItem(theText, thePixmap); @@ -638,7 +638,7 @@ void KTreeView::appendChildItem(const QString & theText, const QPixmap& thePixma // appends a child to the item at the end of the given path with // the given text and pixmap -void KTreeView::appendChildItem(const QString & theText, const QPixmap& thePixmap, +void KTreeView::appendChildItem(const TQString & theText, const TQPixmap& thePixmap, const KPath& thePath) { KTreeViewItem* item = new KTreeViewItem(theText, thePixmap); @@ -692,8 +692,8 @@ bool KTreeView::bottomScrollBar() const } // find item at specified index and change pixmap and/or text -void KTreeView::changeItem(const QString & newText, - const QPixmap *newPixmap, +void KTreeView::changeItem(const TQString & newText, + const TQPixmap *newPixmap, int index) { KTreeViewItem *item = itemAt(index); @@ -702,8 +702,8 @@ void KTreeView::changeItem(const QString & newText, } // find item at end of specified path, and change pixmap and/or text -void KTreeView::changeItem(const QString & newText, - const QPixmap* newPixmap, +void KTreeView::changeItem(const TQString & newText, + const TQPixmap* newPixmap, const KPath& thePath) { KTreeViewItem* item = itemAt(thePath); @@ -723,7 +723,7 @@ void KTreeView::clear() bool autoU = autoUpdate(); setAutoUpdate(FALSE); - QPtrStack stack; + TQPtrStack stack; stack.push(treeRoot); while(!stack.isEmpty()) { KTreeViewItem *item = stack.pop(); @@ -741,7 +741,7 @@ void KTreeView::clear() } } clearing = FALSE; - if(goingDown || QApplication::closingDown()) + if(goingDown || TQApplication::closingDown()) return; if(autoU && isVisible()) repaint(); @@ -875,7 +875,7 @@ int KTreeView::indentSpacing() // or after the item at the given index, depending on the value // of prefix // if index is negative, appends item to tree at root level -bool KTreeView::insertItem(const QString & theText, const QPixmap& thePixmap, +bool KTreeView::insertItem(const TQString & theText, const TQPixmap& thePixmap, int row, bool prefix) { KTreeViewItem* refItem = itemAt(row); @@ -892,7 +892,7 @@ bool KTreeView::insertItem(const QString & theText, const QPixmap& thePixmap, // inserts a new item with the specified text and pixmap before // or after the item at the end of the given path, depending on the value // of prefix -bool KTreeView::insertItem(const QString & theText, const QPixmap& thePixmap, +bool KTreeView::insertItem(const TQString & theText, const TQPixmap& thePixmap, const KPath& path, bool prefix) { KTreeViewItem* refItem = itemAt(path); @@ -1269,7 +1269,7 @@ void KTreeView::appendChildItem(KTreeViewItem* theParent, // changes the given item with the new text and/or pixmap void KTreeView::changeItem(KTreeViewItem* toChange, int itemRow, - const QString & newText, const QPixmap* newPixmap) + const TQString & newText, const TQPixmap* newPixmap) { int indent = indentation(toChange); int oldWidth = toChange->width(indent); @@ -1388,10 +1388,10 @@ void KTreeView::fixChildren(KTreeViewItem *parentItem) } } -// handles QFocusEvent processing by setting current item to top +// handles TQFocusEvent processing by setting current item to top // row if there is no current item, and updates cell to add or // delete the focus rectangle on the highlight bar -void KTreeView::focusInEvent(QFocusEvent *) +void KTreeView::focusInEvent(TQFocusEvent *) { if(current < 0 && numRows() > 0) setCurrentItem(rowAt(contentsY())); @@ -1406,7 +1406,7 @@ void KTreeView::forEveryItem(KForEveryM func, void *user) { KTreeViewItem *item = treeRoot->getChild(); - QPtrStack stack; + TQPtrStack stack; while(item) { stack.push(item); while(!stack.isEmpty()) { @@ -1432,7 +1432,7 @@ void KTreeView::forEveryItem(KForEveryM func, void KTreeView::forEveryVisibleItem(KForEveryM func, void *user) { - QPtrStack stack; + TQPtrStack stack; KTreeViewItem *item = treeRoot->getChild(); do { while(item) { @@ -1528,7 +1528,7 @@ void KTreeView::itemPath(KTreeViewItem* item, KPath& path) const assert(item->owner == this); if (item != treeRoot) { itemPath(item->getParent(), path); - path.push(new QString(item->getText())); + path.push(new TQString(item->getText())); } } @@ -1551,7 +1551,7 @@ void KTreeView::join(KTreeViewItem *item) } // handles keyboard interface to tree list -void KTreeView::keyPressEvent(QKeyEvent *e) +void KTreeView::keyPressEvent(TQKeyEvent *e) { if(numRows() == 0) @@ -1658,11 +1658,11 @@ void KTreeView::lowerItem(KTreeViewItem *item) // handle mouse double click events by selecting the clicked item // and emitting the signal -void KTreeView::mouseDoubleClickEvent(QMouseEvent *e) +void KTreeView::mouseDoubleClickEvent(TQMouseEvent *e) { // find out which row has been clicked - QPoint mouseCoord = viewportToContents(e->pos()); + TQPoint mouseCoord = viewportToContents(e->pos()); int itemClicked = rowAt(mouseCoord.y()); // if a valid row was not clicked, do nothing @@ -1677,7 +1677,7 @@ void KTreeView::mouseDoubleClickEvent(QMouseEvent *e) int cellY = cellHeight()*itemClicked; int cellX = 0; - QPoint cellCoord(mouseCoord.x() - cellX, mouseCoord.y() - cellY); + TQPoint cellCoord(mouseCoord.x() - cellX, mouseCoord.y() - cellY); // hit test item int indent = indentation(item); @@ -1686,7 +1686,7 @@ void KTreeView::mouseDoubleClickEvent(QMouseEvent *e) } // handle mouse movement events -void KTreeView::mouseMoveEvent(QMouseEvent *e) +void KTreeView::mouseMoveEvent(TQMouseEvent *e) { // in rubberband_mode we actually scroll the window now if (rubberband_mode) @@ -1697,7 +1697,7 @@ void KTreeView::mouseMoveEvent(QMouseEvent *e) // handle single mouse presses -void KTreeView::mousePressEvent(QMouseEvent *e) +void KTreeView::mousePressEvent(TQMouseEvent *e) { // first: check which button was pressed @@ -1720,7 +1720,7 @@ void KTreeView::mousePressEvent(QMouseEvent *e) } // find out which row has been clicked - QPoint mouseCoord = viewportToContents(e->pos()); + TQPoint mouseCoord = viewportToContents(e->pos()); int itemClicked = rowAt(mouseCoord.y()); // nothing to do if not on valid row @@ -1734,7 +1734,7 @@ void KTreeView::mousePressEvent(QMouseEvent *e) // translate mouse coord to cell coord int cellX = 0; int cellY = cellHeight()*itemClicked; - QPoint cellCoord(mouseCoord.x() - cellX, mouseCoord.y() - cellY); + TQPoint cellCoord(mouseCoord.x() - cellX, mouseCoord.y() - cellY); /* hit expand button (doesn't set currentItem) */ if(item->expandButtonClicked(cellCoord)) { @@ -1752,13 +1752,13 @@ void KTreeView::mousePressEvent(QMouseEvent *e) else if (item->boundingRect(indentation(item)).contains(cellCoord)) { setCurrentItem(itemClicked); // highlight item if ( e->button() == RightButton ) { - emit popupMenu( itemClicked, mapToGlobal( QPoint( e->pos().x(), e->pos().y() ) ) ); + emit popupMenu( itemClicked, mapToGlobal( TQPoint( e->pos().x(), e->pos().y() ) ) ); } } } // handle mouse release events -void KTreeView::mouseReleaseEvent(QMouseEvent *e) +void KTreeView::mouseReleaseEvent(TQMouseEvent *e) { /* if it's the MMB end rubberbanding */ if (rubberband_mode && e->button()==MidButton) @@ -1779,7 +1779,7 @@ void KTreeView::draw_rubberband() */ if (!rubberband_mode) return; - QPainter paint(this); + TQPainter paint(this); paint.setPen(white); paint.setRasterOp(XorROP); paint.drawRect(xOffset()*viewWidth()/totalWidth(), @@ -1790,7 +1790,7 @@ void KTreeView::draw_rubberband() } // rubberband move: start move -void KTreeView::start_rubberband(const QPoint& where) +void KTreeView::start_rubberband(const TQPoint& where) { #if 0 if (rubberband_mode) { // Oops! @@ -1826,13 +1826,13 @@ void KTreeView::end_rubberband() } // rubberband move: handle mouse moves -void KTreeView::move_rubberband(const QPoint& where) +void KTreeView::move_rubberband(const TQPoint& where) { #if 0 if (!rubberband_mode) return; // look how much the mouse moved and calc the new scroll position - QPoint delta = where - rubber_startMouse; + TQPoint delta = where - rubber_startMouse; int nx = rubber_startX + delta.x() * totalWidth() / viewWidth(); int ny = rubber_startY + delta.y() * totalHeight() / viewHeight(); @@ -1852,14 +1852,14 @@ void KTreeView::move_rubberband(const QPoint& where) // paints the cell at the specified row and col // col is ignored for now since there is only one -void KTreeView::paintCell(QPainter* p, int row, int) +void KTreeView::paintCell(TQPainter* p, int row, int) { KTreeViewItem* item = itemAt(row); if (item == 0) return; - p->setClipRect(cellRect(), QPainter::CoordPainter ); - QColorGroup cg = colorGroup(); + p->setClipRect(cellRect(), TQPainter::CoordPainter ); + TQColorGroup cg = colorGroup(); int indent = indentation(item); item->paint(p, indent, cg, current == row); /* highlighted */ @@ -1889,7 +1889,7 @@ KTreeViewItem* KTreeView::recursiveFind(KPath& path) return treeRoot; // get the next key - QString* searchString = path.pop(); + TQString* searchString = path.pop(); // find the parent item KTreeViewItem* parent = recursiveFind(path); diff --git a/kdat/ktreeview.h b/kdat/ktreeview.h index ad1fe6b..5c6b52b 100644 --- a/kdat/ktreeview.h +++ b/kdat/ktreeview.h @@ -23,13 +23,13 @@ #ifndef KDE_KTREE_VIEW_H #define KDE_KTREE_VIEW_H -#include /* used in items */ -#include /* used to specify tree paths */ -#include /* used in items */ -#include /* base class for widget */ +#include /* used in items */ +#include /* used to specify tree paths */ +#include /* used in items */ +#include /* base class for widget */ // use stack of strings to represent path information -typedef QPtrStack KPath; +typedef TQPtrStack KPath; class KTreeView; /* forward declaration */ @@ -50,8 +50,8 @@ public: * KTreeView::appendChildItem and KTreeView::insertChildItem that do * not take a KTreeViewItem set the delete-children flag to true.) */ - KTreeViewItem(const QString& theText = QString()); // text can not be null when added to the list! - KTreeViewItem(const QString& theText, const QPixmap& thePixmap); + KTreeViewItem(const TQString& theText = TQString()); // text can not be null when added to the list! + KTreeViewItem(const TQString& theText, const TQPixmap& thePixmap); /** * Destructor. It destroys its children if this item has been marked @@ -86,12 +86,12 @@ public: /** * Determines whether the specified point is inside the expand button. */ - bool expandButtonClicked(const QPoint& coord) const; + bool expandButtonClicked(const TQPoint& coord) const; /** * Give the item a chance to process the mouse event. */ - virtual bool mousePressEvent( const QPoint& coord ); + virtual bool mousePressEvent( const TQPoint& coord ); /** * Returns a pointer to the first child item in this item's sub tree, or @@ -107,9 +107,9 @@ public: /** * Returns a reference to this item's pixmap. If there is no pixmap * associated with this item, it will return a reference to a valid, - * null QPixmap. + * null TQPixmap. */ - const QPixmap& getPixmap() const; + const TQPixmap& getPixmap() const; /** * Returns a pointer to the next item in the same branch below this @@ -120,7 +120,7 @@ public: /** * Returns this item's text. */ - const QString& getText() const; + const TQString& getText() const; /** * Indicates whether this item has any children. @@ -197,19 +197,19 @@ public: * Sets the item pixmap to the given pixmap. It does not redraw the * item or update the owning KTreeView. */ - void setPixmap(const QPixmap& pm); + void setPixmap(const TQPixmap& pm); /** * Sets the item text. This function does not redraw the item or update * the owning KTreeView. */ - void setText(const QString& t); + void setText(const TQString& t); protected: /** * Returns the bounding rectangle of the item. */ - virtual QRect boundingRect(int indent) const; + virtual TQRect boundingRect(int indent) const; /** * Returns the hieght of the item. The default implementation uses font @@ -221,36 +221,36 @@ protected: * Returns the height of the item depending on the passed-in font * metrics. */ - virtual int height(const QFontMetrics& fm) const; + virtual int height(const TQFontMetrics& fm) const; /** * Paints the item: pixmap, text, expand button, parent branches */ - virtual void paint(QPainter* p, int indent, - const QColorGroup& cg, bool highlighted) const; + virtual void paint(TQPainter* p, int indent, + const TQColorGroup& cg, bool highlighted) const; /** * paints the expand button */ - virtual void paintExpandButton(QPainter* p, int indent, int cellHeight) const; + virtual void paintExpandButton(TQPainter* p, int indent, int cellHeight) const; /** * paints the highlighted text */ - virtual void paintHighlight(QPainter* p, int indent, - const QColorGroup& cg, bool hasFocus, + virtual void paintHighlight(TQPainter* p, int indent, + const TQColorGroup& cg, bool hasFocus, Qt::GUIStyle style) const; /** * paints the item's text */ - virtual void paintText(QPainter* p, int indent, int cellHeight, - const QColorGroup& cg, bool highlighted) const; + virtual void paintText(TQPainter* p, int indent, int cellHeight, + const TQColorGroup& cg, bool highlighted) const; /** * paints the item's tree part. */ - virtual void paintTree(QPainter* p, int indent, int cellHeight) const; + virtual void paintTree(TQPainter* p, int indent, int cellHeight) const; /** * Internal function that counts the number of child items. @@ -260,7 +260,7 @@ protected: /** * Returns the bounding rectangle of the text. */ - virtual QRect textBoundingRect(int indent) const; + virtual TQRect textBoundingRect(int indent) const; /** * Returns the width of the item taking into account the specified @@ -273,7 +273,7 @@ protected: * Returns the width of the item depending on the passed-in font * metrics and taking into account the specified indentation. */ - virtual int width(int indent, const QFontMetrics& fm) const; + virtual int width(int indent, const TQFontMetrics& fm) const; protected: /** The KTreeView that this item belongs to */ @@ -284,12 +284,12 @@ protected: bool delayedExpanding; bool doTree; bool doText; - mutable QRect expandButton; /* is set in paint() */ + mutable TQRect expandButton; /* is set in paint() */ KTreeViewItem* child; KTreeViewItem* parent; KTreeViewItem* sibling; - QPixmap pixmap; - QString text; + TQPixmap pixmap; + TQString text; bool deleteChildren; }; @@ -406,7 +406,7 @@ public: * current item to -1, and sets default values for scroll bars (both * auto). */ - KTreeView(QWidget* parent = 0, const char* name = 0, WFlags f = 0); + KTreeView(TQWidget* parent = 0, const char* name = 0, WFlags f = 0); /* * Desctructor. Deletes all items from the topmost level that have been @@ -420,13 +420,13 @@ public: * children. A KTreeViewItem is created for which the delete-children * flag is set to true. */ - void appendChildItem(const QString & theText, const QPixmap& thePixmap, + void appendChildItem(const TQString & theText, const TQPixmap& thePixmap, int index); /** * Same as above except that the parent item is specified by a path. */ - void appendChildItem(const QString & theText, const QPixmap& thePixmap, + void appendChildItem(const TQString & theText, const TQPixmap& thePixmap, const KPath& thePath); /** @@ -473,16 +473,16 @@ public: enabled. If changing only the text or pixmap, set the other parameter to 0. */ - void changeItem(const QString & newText, - const QPixmap *newPixmap, + void changeItem(const TQString & newText, + const TQPixmap *newPixmap, int index); /** Same as above function, except item to change is specified by a path through the tree. */ - void changeItem(const QString & newText, - const QPixmap *newPixmap, + void changeItem(const TQString & newText, + const TQPixmap *newPixmap, const KPath& thePath); /** @@ -570,7 +570,7 @@ public: * delete-children flag is set to true. Returns true if the item has * been successfully inserted in the tree, otherwise false. */ - bool insertItem(const QString & theText, const QPixmap& thePixmap, + bool insertItem(const TQString & theText, const TQPixmap& thePixmap, int row = -1, bool prefix = true); /** @@ -578,7 +578,7 @@ public: * insert position. If there is no item at the specified path, the item * is simply appended to the tree at the topmost level. */ - bool insertItem(const QString & theText, const QPixmap& thePixmap, + bool insertItem(const TQString & theText, const TQPixmap& thePixmap, const KPath& thePath, bool prefix = true); /** @@ -780,7 +780,7 @@ signals: void highlighted(int index); void selected(int index); - void popupMenu( int index, const QPoint& ); + void popupMenu( int index, const TQPoint& ); protected: /** * Appends theChild to theParent as a new direct child. All internal @@ -790,8 +790,8 @@ protected: void appendChildItem(KTreeViewItem* theParent, KTreeViewItem* theChild); void changeItem(KTreeViewItem* toChange, - int itemRow, const QString & newText, - const QPixmap* newPixmap); + int itemRow, const TQString & newText, + const TQPixmap* newPixmap); /** * Collapses the specified subtree and updates the display. subRoot * need not be visible. @@ -807,7 +807,7 @@ protected: */ void expandSubTree(KTreeViewItem* subRoot); void fixChildren(KTreeViewItem *parentItem); - virtual void focusInEvent(QFocusEvent *e); + virtual void focusInEvent(TQFocusEvent *e); void forEveryItem(KForEveryM func, void *user); void forEveryVisibleItem(KForEveryM func, @@ -839,16 +839,16 @@ protected: void itemPath(KTreeViewItem* item, KPath& path) const; void join(KTreeViewItem *item); - virtual void keyPressEvent(QKeyEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); int level(KTreeViewItem* item) const; void lowerItem(KTreeViewItem *item); - virtual void mouseDoubleClickEvent(QMouseEvent *e); - virtual void mouseMoveEvent(QMouseEvent *e); - virtual void mousePressEvent(QMouseEvent *e); - virtual void mouseReleaseEvent(QMouseEvent *e); - virtual void paintCell(QPainter *p, int row, int col); + virtual void mouseDoubleClickEvent(TQMouseEvent *e); + virtual void mouseMoveEvent(TQMouseEvent *e); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void mouseReleaseEvent(TQMouseEvent *e); + virtual void paintCell(TQPainter *p, int row, int col); /* - * virtual void paintItem(QPainter *p, KTreeViewItem *item, + * virtual void paintItem(TQPainter *p, KTreeViewItem *item, * bool highlighted); */ void raiseItem(KTreeViewItem* item); @@ -887,13 +887,13 @@ protected: // Rainer Bawidamann: move window in "rubberband" mode bool rubberband_mode; // true if in "rubberband_mode" - QPoint rubber_startMouse; // where the user pressed the MMB + TQPoint rubber_startMouse; // where the user pressed the MMB int rubber_height, rubber_width, // the size if the rubberband rect rubber_startX, rubber_startY; // the x/yOffset() when the MMB was pressed void draw_rubberband(); - void start_rubberband(const QPoint& where); + void start_rubberband(const TQPoint& where); void end_rubberband(); - void move_rubberband(const QPoint& where); + void move_rubberband(const TQPoint& where); }; #endif // KDE_KTREE_VIEW_H diff --git a/kdat/main.cpp b/kdat/main.cpp index 0d17ce8..6f988b2 100644 --- a/kdat/main.cpp +++ b/kdat/main.cpp @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/kfile-plugins/deb/kfile_deb.cpp b/kfile-plugins/deb/kfile_deb.cpp index b66e062..3839764 100644 --- a/kfile-plugins/deb/kfile_deb.cpp +++ b/kfile-plugins/deb/kfile_deb.cpp @@ -25,14 +25,14 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include +#include #include #include #include @@ -43,8 +43,8 @@ typedef KGenericFactory DebFactory; K_EXPORT_COMPONENT_FACTORY(kfile_deb, DebFactory( "kfile_deb" )) -KDebPlugin::KDebPlugin(QObject *parent, const char *name, - const QStringList &args) +KDebPlugin::KDebPlugin(TQObject *parent, const char *name, + const TQStringList &args) : KFilePlugin(parent, name, args) { @@ -53,10 +53,10 @@ KDebPlugin::KDebPlugin(QObject *parent, const char *name, group = addGroupInfo(info, "General", i18n("General")); KFileMimeTypeInfo::ItemInfo* item; - item = addItemInfo(group, "Name", i18n("Name"), QVariant::String); - item = addItemInfo(group, "Version", i18n("Version"), QVariant::String); - item = addItemInfo(group, "Summary", i18n("Summary"), QVariant::String); - item = addItemInfo(group, "Size", i18n("Size"), QVariant::Int); + item = addItemInfo(group, "Name", i18n("Name"), TQVariant::String); + item = addItemInfo(group, "Version", i18n("Version"), TQVariant::String); + item = addItemInfo(group, "Summary", i18n("Summary"), TQVariant::String); + item = addItemInfo(group, "Size", i18n("Size"), TQVariant::Int); } bool KDebPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) @@ -64,7 +64,7 @@ bool KDebPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) KAr debfile (info.path()); if ( !debfile.open( IO_ReadOnly ) ) { - kdDebug(7034) << "Couldn't open " << QFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; return false; } @@ -75,7 +75,7 @@ bool KDebPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) return false; } - QIODevice* filterDev = KFilterDev::device( static_cast( controlentry )->device(), "application/x-gzip" ); + TQIODevice* filterDev = KFilterDev::device( static_cast( controlentry )->device(), "application/x-gzip" ); if ( !filterDev ) { kdWarning(7034) << "Couldn't create filter device for control.tar.gz" << endl; return false; @@ -95,19 +95,19 @@ bool KDebPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) Q_ASSERT( controlfile ); if (controlfile) { KFileMetaInfoGroup group = appendGroup(info, "General"); - QByteArray control( static_cast(controlfile)->data() ); + TQByteArray control( static_cast(controlfile)->data() ); // Now process control array - QBuffer controldev(control); + TQBuffer controldev(control); controldev.open( IO_ReadOnly ); while (!controldev.atEnd()) { char linebuf[100]; controldev.readLine(linebuf, sizeof( linebuf )); - QString line(linebuf); - int fieldstart = line.find(QRegExp(":"), 0) + 2; + TQString line(linebuf); + int fieldstart = line.find(TQRegExp(":"), 0) + 2; if (fieldstart == 1) break; - QString fieldname = line.mid(0, fieldstart - 2); - QString fielddata = line.mid(fieldstart, line.length() - fieldstart - 1); + TQString fieldname = line.mid(0, fieldstart - 2); + TQString fielddata = line.mid(fieldstart, line.length() - fieldstart - 1); if (fieldname == "Package") appendItem(group, "Name", fielddata); else if (fieldname == "Version") appendItem(group, "Version", fielddata); diff --git a/kfile-plugins/deb/kfile_deb.h b/kfile-plugins/deb/kfile_deb.h index 9fd1bb0..cfa5376 100644 --- a/kfile-plugins/deb/kfile_deb.h +++ b/kfile-plugins/deb/kfile_deb.h @@ -29,7 +29,7 @@ class KDebPlugin: public KFilePlugin Q_OBJECT public: - KDebPlugin( QObject *parent, const char *name, const QStringList& args ); + KDebPlugin( TQObject *parent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); diff --git a/kfile-plugins/rpm/kfile_rpm.cpp b/kfile-plugins/rpm/kfile_rpm.cpp index 049b017..9089b4b 100644 --- a/kfile-plugins/rpm/kfile_rpm.cpp +++ b/kfile-plugins/rpm/kfile_rpm.cpp @@ -21,7 +21,7 @@ #include #include -#include +#include #if !defined(__osf__) #include @@ -36,8 +36,8 @@ typedef KGenericFactory RpmFactory; K_EXPORT_COMPONENT_FACTORY(kfile_rpm, RpmFactory( "kfile_rpm" )) -KRpmPlugin::KRpmPlugin(QObject *parent, const char *name, - const QStringList &args) +KRpmPlugin::KRpmPlugin(TQObject *parent, const char *name, + const TQStringList &args) : KFilePlugin(parent, name, args) { @@ -46,38 +46,38 @@ KRpmPlugin::KRpmPlugin(QObject *parent, const char *name, group = addGroupInfo(info, "General", i18n("General")); KFileMimeTypeInfo::ItemInfo* item; - item = addItemInfo(group, "Name", i18n("Name"), QVariant::String); - item = addItemInfo(group, "Version", i18n("Version"), QVariant::String); - item = addItemInfo(group, "Release", i18n("Release"), QVariant::Int); - item = addItemInfo(group, "Summary", i18n("Summary"), QVariant::String); + item = addItemInfo(group, "Name", i18n("Name"), TQVariant::String); + item = addItemInfo(group, "Version", i18n("Version"), TQVariant::String); + item = addItemInfo(group, "Release", i18n("Release"), TQVariant::Int); + item = addItemInfo(group, "Summary", i18n("Summary"), TQVariant::String); setAttributes ( item, KFileMimeTypeInfo::Description ); - item = addItemInfo(group, "Group", i18n("Group"), QVariant::String); - item = addItemInfo(group, "Size", i18n("Size"), QVariant::Int); + item = addItemInfo(group, "Group", i18n("Group"), TQVariant::String); + item = addItemInfo(group, "Size", i18n("Size"), TQVariant::Int); setUnit ( item, KFileMimeTypeInfo::Bytes ); - item = addItemInfo(group, "Vendor", i18n("Vendor"), QVariant::String ); - item = addItemInfo(group, "Packager", i18n("Packager"), QVariant::String ); - item = addItemInfo(group, "Archive Offset", i18n("Archive Offset"), QVariant::Int); - item = addItemInfo(group, "Comment", i18n("Comment"), QVariant::String); + item = addItemInfo(group, "Vendor", i18n("Vendor"), TQVariant::String ); + item = addItemInfo(group, "Packager", i18n("Packager"), TQVariant::String ); + item = addItemInfo(group, "Archive Offset", i18n("Archive Offset"), TQVariant::Int); + item = addItemInfo(group, "Comment", i18n("Comment"), TQVariant::String); setAttributes( item, KFileMimeTypeInfo::MultiLine ); group = addGroupInfo(info, "All tags", i18n("All tags")); - addVariableInfo(group, QVariant::String, 0); + addVariableInfo(group, TQVariant::String, 0); } bool KRpmPlugin::readInfo( KFileMetaInfo& info, uint what) { - QFile file(info.path()); + TQFile file(info.path()); int pass; KFileMetaInfoGroup general, all; if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << QFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; return false; } - QDataStream dstream(&file); - dstream.setByteOrder(QDataStream::BigEndian); + TQDataStream dstream(&file); + dstream.setByteOrder(TQDataStream::BigEndian); general = appendGroup(info, "General"); if (what == KFileMetaInfo::Everything) all = appendGroup(info, "All tags"); @@ -102,7 +102,7 @@ bool KRpmPlugin::readInfo( KFileMetaInfo& info, uint what) if (entries < 500) while (entries--) { // Just in case something goes wrong, limit to 500 uint32_t tag, type, offset, count; - QString tagname; + TQString tagname; dstream >> tag >> type >> offset >> count; offset += storepos; @@ -126,18 +126,18 @@ bool KRpmPlugin::readInfo( KFileMetaInfo& info, uint what) case RPM_INT32_TYPE: uint32_t int32tag; dstream >> int32tag; if ( !tagname.isEmpty() ) appendItem(general, tagname, int(int32tag)); - if ( all.isValid() ) appendItem(all, QString("%1").arg( tag ), QString("%1").arg( int32tag )); + if ( all.isValid() ) appendItem(all, TQString("%1").arg( tag ), TQString("%1").arg( int32tag )); break; case RPM_INT16_TYPE: uint16_t int16tag; dstream >> int16tag; if ( !tagname.isEmpty() ) appendItem(general, tagname, int(int16tag)); - if ( all.isValid() ) appendItem(all, QString("%1").arg( tag ), QString("%1").arg( int16tag )); + if ( all.isValid() ) appendItem(all, TQString("%1").arg( tag ), TQString("%1").arg( int16tag )); break; case RPM_I18NSTRING_TYPE: // Fallthru - case RPM_STRING_TYPE: QString strtag; char in; + case RPM_STRING_TYPE: TQString strtag; char in; while ( ( in = file.getch() ) != '\0' ) strtag += in; if ( !tagname.isEmpty() ) appendItem(general, tagname, strtag); - if( all.isValid() ) appendItem(all, QString("%1").arg( tag ), strtag); + if( all.isValid() ) appendItem(all, TQString("%1").arg( tag ), strtag); break; } file.at(oldPos); // Restore old position diff --git a/kfile-plugins/rpm/kfile_rpm.h b/kfile-plugins/rpm/kfile_rpm.h index 797fc49..3911665 100644 --- a/kfile-plugins/rpm/kfile_rpm.h +++ b/kfile-plugins/rpm/kfile_rpm.h @@ -29,7 +29,7 @@ class KRpmPlugin: public KFilePlugin Q_OBJECT public: - KRpmPlugin( QObject *parent, const char *name, const QStringList& args ); + KRpmPlugin( TQObject *parent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); diff --git a/knetworkconf/knetworkconf/kadddevicecontainer.cpp b/knetworkconf/knetworkconf/kadddevicecontainer.cpp index 7ed7e0f..129d5c9 100644 --- a/knetworkconf/knetworkconf/kadddevicecontainer.cpp +++ b/knetworkconf/knetworkconf/kadddevicecontainer.cpp @@ -17,7 +17,7 @@ ***************************************************************************/ #include "kadddevicecontainer.h" -KAddDeviceContainer::KAddDeviceContainer(QWidget *parent, const char *name) +KAddDeviceContainer::KAddDeviceContainer(TQWidget *parent, const char *name) : KDialog(parent, name) { _modified = false; @@ -29,16 +29,16 @@ KAddDeviceContainer::KAddDeviceContainer(QWidget *parent, const char *name) //Create dialog that contains the KAddDeviceDlg and KAddDeviceWifiExt (when //configuring a wireless interface) widgets - QPixmap activeEthernetDeviceImg(BarIcon("network_connected_lan_knc")); + TQPixmap activeEthernetDeviceImg(BarIcon("network_connected_lan_knc")); setIcon(activeEthernetDeviceImg); //First create a main QHBoxLayout - mainLayout = new QVBoxLayout( this, 10, 2, "mainLayout"); + mainLayout = new TQVBoxLayout( this, 10, 2, "mainLayout"); //Create the Addvanced settings, Ok and Cancel buttons and add them to a QHBoxLayout - buttonsLayout = new QHBoxLayout( 0, 0, 4, "buttonsLayout"); + buttonsLayout = new TQHBoxLayout( 0, 0, 4, "buttonsLayout"); kpbAdvanced = new KPushButton( this, "kpbAdvanced" ); buttonsLayout->addWidget( kpbAdvanced ); - buttonsSpacer = new QSpacerItem( 70, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + buttonsSpacer = new TQSpacerItem( 70, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); buttonsLayout->addItem( buttonsSpacer ); kpbApply = new KPushButton( this, "kpbApply" ); @@ -49,47 +49,47 @@ KAddDeviceContainer::KAddDeviceContainer(QWidget *parent, const char *name) kpbCancel = new KPushButton( this, "kpbCancel" ); buttonsLayout->addWidget( kpbCancel ); - setCaption( QString::null ); + setCaption( TQString::null ); kpbAdvanced->setText( i18n( "&Advanced Settings" ) ); - QToolTip::add( kpbAdvanced, i18n( "Toggle between advanced and basic settings" ) ); - QWhatsThis::add( kpbAdvanced, i18n( "Toggle between advanced and basic settings" ) ); + TQToolTip::add( kpbAdvanced, i18n( "Toggle between advanced and basic settings" ) ); + TQWhatsThis::add( kpbAdvanced, i18n( "Toggle between advanced and basic settings" ) ); kpbApply->setText( i18n( "&OK" ) ); - QToolTip::add( kpbApply, i18n( "Apply changes" ) ); + TQToolTip::add( kpbApply, i18n( "Apply changes" ) ); kpbCancel->setText( i18n( "&Cancel" ) ); - QToolTip::add( kpbCancel, i18n( "Forget changes" ) ); + TQToolTip::add( kpbCancel, i18n( "Forget changes" ) ); //Creat and add the KAddDeviceDlg widget to the main layout addDlg = new KAddDeviceDlg(this); mainLayout->addWidget(addDlg); - mainLayout->setResizeMode(QLayout::Auto); + mainLayout->setResizeMode(TQLayout::Auto); //Setup connections - connect((KAddDeviceDlgExtension*)extension(),SIGNAL(valueChangedSignal(int)),this,SLOT(toggleApplyButtonSlot(int))); - connect(addDlg->kleIPAddress,SIGNAL(textChanged(const QString&)),this,SLOT(toggleApplyButtonSlot(const QString&))); -// connect(addDlg->kleGateway,SIGNAL(textChanged(const QString&)),this,SLOT(toggleApplyButtonSlot(const QString&))); - connect(addDlg->kcbNetmask,SIGNAL(activated(int)),this,SLOT(toggleApplyButtonSlot(int))); - connect(addDlg->kcbAutoBootProto,SIGNAL(activated(const QString&)),this,SLOT(toggleApplyButtonSlot(const QString&))); - connect(addDlg->kcbstartAtBoot,SIGNAL(stateChanged(int)),this,SLOT(toggleApplyButtonSlot(int))); - connect(addDlg->rbBootProtoAuto,SIGNAL(toggled(bool)),this,SLOT(toggleAdvancedOptionsSlot(bool))); - connect(addDlg->rbBootProtoAuto,SIGNAL(toggled(bool)),kpbAdvanced,SLOT(setDisabled(bool))); - connect(addDlg->rbBootProtoAuto,SIGNAL(stateChanged(int)),this,SLOT(toggleApplyButtonSlot(int))); - // connect(addDlg->rbBootProtoAuto,SIGNAL(toggled(bool)),addDlg->kleIPAddress,SLOT(setDisabled(bool))); - // connect(addDlg->rbBootProtoAuto,SIGNAL(toggled(bool)),addDlg->kcbNetmask,SLOT(setDisabled(bool))); - // connect(addDlg->rbBootProtoManual,SIGNAL(toggled(bool)),addDlg->kcbAutoBootProto,SLOT(setDisabled(bool))); - connect(kpbCancel,SIGNAL(clicked()),this,SLOT(cancelSlot())); - connect(kpbApply,SIGNAL(clicked()),this,SLOT(verifyDeviceInfoSlot())); - connect(kpbAdvanced,SIGNAL(clicked()),this,SLOT(advancedOptionsSlot())); + connect((KAddDeviceDlgExtension*)extension(),TQT_SIGNAL(valueChangedSignal(int)),this,TQT_SLOT(toggleApplyButtonSlot(int))); + connect(addDlg->kleIPAddress,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(toggleApplyButtonSlot(const TQString&))); +// connect(addDlg->kleGateway,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(toggleApplyButtonSlot(const TQString&))); + connect(addDlg->kcbNetmask,TQT_SIGNAL(activated(int)),this,TQT_SLOT(toggleApplyButtonSlot(int))); + connect(addDlg->kcbAutoBootProto,TQT_SIGNAL(activated(const TQString&)),this,TQT_SLOT(toggleApplyButtonSlot(const TQString&))); + connect(addDlg->kcbstartAtBoot,TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(toggleApplyButtonSlot(int))); + connect(addDlg->rbBootProtoAuto,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(toggleAdvancedOptionsSlot(bool))); + connect(addDlg->rbBootProtoAuto,TQT_SIGNAL(toggled(bool)),kpbAdvanced,TQT_SLOT(setDisabled(bool))); + connect(addDlg->rbBootProtoAuto,TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(toggleApplyButtonSlot(int))); + // connect(addDlg->rbBootProtoAuto,TQT_SIGNAL(toggled(bool)),addDlg->kleIPAddress,TQT_SLOT(setDisabled(bool))); + // connect(addDlg->rbBootProtoAuto,TQT_SIGNAL(toggled(bool)),addDlg->kcbNetmask,TQT_SLOT(setDisabled(bool))); + // connect(addDlg->rbBootProtoManual,TQT_SIGNAL(toggled(bool)),addDlg->kcbAutoBootProto,TQT_SLOT(setDisabled(bool))); + connect(kpbCancel,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelSlot())); + connect(kpbApply,TQT_SIGNAL(clicked()),this,TQT_SLOT(verifyDeviceInfoSlot())); + connect(kpbAdvanced,TQT_SIGNAL(clicked()),this,TQT_SLOT(advancedOptionsSlot())); } void KAddDeviceContainer::addWirelessWidget(){ extDlg = new KAddDeviceWifiExt(this); mainLayout->addWidget( extDlg ); - connect(extDlg->kleEssid,SIGNAL(textChanged(const QString&)),this,SLOT(toggleApplyButtonSlot(const QString&))); - connect(extDlg->kleWepKey,SIGNAL(textChanged(const QString&)),this,SLOT(toggleApplyButtonSlot(const QString&))); - connect(extDlg->qcbKeyType,SIGNAL(activated(const QString&)),this,SLOT(toggleApplyButtonSlot(const QString&))); + connect(extDlg->kleEssid,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(toggleApplyButtonSlot(const TQString&))); + connect(extDlg->kleWepKey,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(toggleApplyButtonSlot(const TQString&))); + connect(extDlg->qcbKeyType,TQT_SIGNAL(activated(const TQString&)),this,TQT_SLOT(toggleApplyButtonSlot(const TQString&))); } -void KAddDeviceContainer::toggleApplyButtonSlot( const QString & ) +void KAddDeviceContainer::toggleApplyButtonSlot( const TQString & ) { toggleApplyButtonSlot(0); } @@ -119,10 +119,10 @@ void KAddDeviceContainer::verifyDeviceInfoSlot() if (addDlg->rbBootProtoManual->isChecked()) { - QString ipAddress = addDlg->kleIPAddress->text(); - QString netmask = addDlg->kcbNetmask->currentText(); - QString broadcast = advancedOptions->kleBroadcast->text(); - QString gateway = advancedOptions->kleGateway->text(); + TQString ipAddress = addDlg->kleIPAddress->text(); + TQString netmask = addDlg->kcbNetmask->currentText(); + TQString broadcast = advancedOptions->kleBroadcast->text(); + TQString gateway = advancedOptions->kleGateway->text(); if (!KAddressValidator::isValidIPAddress(ipAddress)) { @@ -197,7 +197,7 @@ KAddDeviceContainer::~KAddDeviceContainer() void KAddDeviceContainer::addButtons() { - widgetHSpacer = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Expanding ); + widgetHSpacer = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); mainLayout->addItem( widgetHSpacer ); mainLayout->addLayout( buttonsLayout ); } diff --git a/knetworkconf/knetworkconf/kadddevicecontainer.h b/knetworkconf/knetworkconf/kadddevicecontainer.h index 5b1f6a6..d749576 100644 --- a/knetworkconf/knetworkconf/kadddevicecontainer.h +++ b/knetworkconf/knetworkconf/kadddevicecontainer.h @@ -17,13 +17,13 @@ #ifndef KADDDEVICECONTAINER_H #define KADDDEVICECONTAINER_H -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -47,7 +47,7 @@ class KAddDeviceContainer : public KDialog { Q_OBJECT public: - KAddDeviceContainer(QWidget *parent = 0, const char *name = 0); + KAddDeviceContainer(TQWidget *parent = 0, const char *name = 0); ~KAddDeviceContainer(); KPushButton* kpbAdvanced; @@ -64,15 +64,15 @@ class KAddDeviceContainer : public KDialog void makeButtonsResizeable(); protected: - QVBoxLayout* mainLayout; - QHBoxLayout* buttonsLayout; - QSpacerItem* buttonsSpacer; - QSpacerItem* widgetHSpacer; + TQVBoxLayout* mainLayout; + TQHBoxLayout* buttonsLayout; + TQSpacerItem* buttonsSpacer; + TQSpacerItem* widgetHSpacer; bool _modified; bool _advanced; protected slots: - void toggleApplyButtonSlot( const QString & ); + void toggleApplyButtonSlot( const TQString & ); void toggleApplyButtonSlot( int ); void toggleAdvancedOptionsSlot(bool enabled ); void verifyDeviceInfoSlot(); diff --git a/knetworkconf/knetworkconf/kadddevicedlgextension.ui.h b/knetworkconf/knetworkconf/kadddevicedlgextension.ui.h index 455cabf..1e38f60 100644 --- a/knetworkconf/knetworkconf/kadddevicedlgextension.ui.h +++ b/knetworkconf/knetworkconf/kadddevicedlgextension.ui.h @@ -12,7 +12,7 @@ void KAddDeviceDlgExtension::init() } -void KAddDeviceDlgExtension::valueChanged( const QString &s ) +void KAddDeviceDlgExtension::valueChanged( const TQString &s ) { emit valueChangedSignal(0); } diff --git a/knetworkconf/knetworkconf/kaddknownhostdlg.ui.h b/knetworkconf/knetworkconf/kaddknownhostdlg.ui.h index 49ea4b7..701e1b2 100644 --- a/knetworkconf/knetworkconf/kaddknownhostdlg.ui.h +++ b/knetworkconf/knetworkconf/kaddknownhostdlg.ui.h @@ -63,8 +63,8 @@ void KAddKnownHostDlg::editHostSlot() dlg.setCaption(i18n("Edit Alias")); dlg.lIPAddress->setText(i18n("Alias:")); dlg.setAddingAlias(true); - QListBoxItem *item = klbAliases->item(currentPos); - QString currentText = item->text(); + TQListBoxItem *item = klbAliases->item(currentPos); + TQString currentText = item->text(); dlg.kleNewServer->setText(currentText); dlg.kpbAddServer->setText(i18n("&OK")); dlg.exec(); diff --git a/knetworkconf/knetworkconf/kaddressvalidator.cpp b/knetworkconf/knetworkconf/kaddressvalidator.cpp index b80e737..03d21c6 100644 --- a/knetworkconf/knetworkconf/kaddressvalidator.cpp +++ b/knetworkconf/knetworkconf/kaddressvalidator.cpp @@ -28,8 +28,8 @@ KAddressValidator::KAddressValidator(){ KAddressValidator::~KAddressValidator(){ } /** Validates if the address written by the user is a valid one. Return true if it is and false if not. */ -bool KAddressValidator::isValidIPAddress(QString addr){ - QString s = ""; +bool KAddressValidator::isValidIPAddress(TQString addr){ + TQString s = ""; int i; int number; bool ok; @@ -53,8 +53,8 @@ bool KAddressValidator::isValidIPAddress(QString addr){ else return false; } -bool KAddressValidator::isNetmaskValid(QString addr){ - QString s = ""; +bool KAddressValidator::isNetmaskValid(TQString addr){ + TQString s = ""; int i; int number; bool ok; @@ -76,8 +76,8 @@ bool KAddressValidator::isNetmaskValid(QString addr){ } -bool KAddressValidator::isNetworkValid(const QString &addr){ - QString s = ""; +bool KAddressValidator::isNetworkValid(const TQString &addr){ + TQString s = ""; int i; int number; bool ok; @@ -98,8 +98,8 @@ bool KAddressValidator::isNetworkValid(const QString &addr){ return false; } -bool KAddressValidator::isBroadcastValid(QString addr){ - QString s = ""; +bool KAddressValidator::isBroadcastValid(TQString addr){ + TQString s = ""; int i; int number; bool ok; @@ -182,12 +182,12 @@ unsigned long int KAddressValidator::calc_broadcast(unsigned long int addr, int unsigned long int KAddressValidator::calc_network(unsigned long int addr, int prefix){ return (addr & prefix2mask(prefix)); } -/** Is a wrapper function to calc_network that receives the IP address and netsmask as QString and -returns the network value also as a QString, or NULL if it couldn't be calculated. */ -QString KAddressValidator::calculateNetwork(QString addr,QString netmask){ +/** Is a wrapper function to calc_network that receives the IP address and netsmask as TQString and +returns the network value also as a TQString, or NULL if it couldn't be calculated. */ +TQString KAddressValidator::calculateNetwork(TQString addr,TQString netmask){ struct in_addr _addr, _netmask, _network; int prefix = 0; - QString s; + TQString s; if (addr.isNull() || netmask.isNull()) return NULL; //bad address if (!inet_pton(AF_INET,addr.latin1(),&_addr)) @@ -210,12 +210,12 @@ QString KAddressValidator::calculateNetwork(QString addr,QString netmask){ return s; } -/** Is a wrapper function to calc_broadcast that receives the IP address and netsmask as QString and -returns the broadcast value also as a QString, or NULL if it couldn't be calculated. */ -QString KAddressValidator::calculateBroadcast(QString addr, QString netmask){ +/** Is a wrapper function to calc_broadcast that receives the IP address and netsmask as TQString and +returns the broadcast value also as a TQString, or NULL if it couldn't be calculated. */ +TQString KAddressValidator::calculateBroadcast(TQString addr, TQString netmask){ struct in_addr _addr, _netmask, _network; int prefix = 0; - QString s; + TQString s; if (addr.isNull() || netmask.isNull()) return NULL; //bad address if (!inet_pton(AF_INET,addr.latin1(),&_addr)) diff --git a/knetworkconf/knetworkconf/kaddressvalidator.h b/knetworkconf/knetworkconf/kaddressvalidator.h index 32dcc37..9e1df59 100644 --- a/knetworkconf/knetworkconf/kaddressvalidator.h +++ b/knetworkconf/knetworkconf/kaddressvalidator.h @@ -41,7 +41,7 @@ #include #include #include -#include +#include /**Class that has simple methods for validating IP addresses, netmasks, calculating broadcast and network addresses. @@ -54,20 +54,20 @@ public: KAddressValidator(); ~KAddressValidator(); /** Validates if the address written by the user is a valid one. Return true if it is and false if not. */ - static bool isValidIPAddress(QString addr); + static bool isValidIPAddress(TQString addr); /** Validates if the Netmask written by the user is a valid one. Return true if it is and false if not. */ - static bool isNetmaskValid(QString addr); + static bool isNetmaskValid(TQString addr); /** Validates if the Network written by the user is a valid one. Return true if it is and false if not. */ - static bool isNetworkValid(const QString &addr); + static bool isNetworkValid(const TQString &addr); /** Validates if the Broadcast written by the user is a valid one. Return true if it is and false if not. */ - static bool isBroadcastValid(QString addr); - - /** Is a wrapper function to calc_network that receives the IP address and netsmask as QString and - returns the network value also as a QString, or NULL if it couldn't be calculated. */ - static QString calculateNetwork(QString addr,QString netmask); -/** Is a wrapper function to calc_broadcast that receives the IP address and netsmask as QString and -returns the broadcast value also as a QString, or NULL if it couldn't be calculated. */ - static QString calculateBroadcast(QString addr, QString netmask); + static bool isBroadcastValid(TQString addr); + + /** Is a wrapper function to calc_network that receives the IP address and netsmask as TQString and + returns the network value also as a TQString, or NULL if it couldn't be calculated. */ + static TQString calculateNetwork(TQString addr,TQString netmask); +/** Is a wrapper function to calc_broadcast that receives the IP address and netsmask as TQString and +returns the broadcast value also as a TQString, or NULL if it couldn't be calculated. */ + static TQString calculateBroadcast(TQString addr, TQString netmask); private: // Private methods /** \fn unsigned long int calc_broadcast(unsigned long int addr, int prefix) diff --git a/knetworkconf/knetworkconf/kdnsinfo.cpp b/knetworkconf/knetworkconf/kdnsinfo.cpp index 357bc49..724118c 100644 --- a/knetworkconf/knetworkconf/kdnsinfo.cpp +++ b/knetworkconf/knetworkconf/kdnsinfo.cpp @@ -21,33 +21,33 @@ KDNSInfo::KDNSInfo(){ } KDNSInfo::~KDNSInfo(){ } -QStringList KDNSInfo::getNameServers(){ +TQStringList KDNSInfo::getNameServers(){ return nameServers; } -QString KDNSInfo::getDomainName(){ +TQString KDNSInfo::getDomainName(){ return domainName; } -QString KDNSInfo::getMachineName(){ +TQString KDNSInfo::getMachineName(){ return machineName; } -QStringList KDNSInfo::getSearchDomains(){ +TQStringList KDNSInfo::getSearchDomains(){ return searchDomains; } -void KDNSInfo::setNameServers(const QStringList &nameServers){ +void KDNSInfo::setNameServers(const TQStringList &nameServers){ KDNSInfo::nameServers = nameServers; } -void KDNSInfo::setDomainName(const QString &domain){ +void KDNSInfo::setDomainName(const TQString &domain){ KDNSInfo::domainName = domain; } -void KDNSInfo::setMachineName(const QString &machine){ +void KDNSInfo::setMachineName(const TQString &machine){ KDNSInfo::machineName = machine; } -void KDNSInfo::setSearchDomains(const QStringList &searchDomains){ +void KDNSInfo::setSearchDomains(const TQStringList &searchDomains){ KDNSInfo::searchDomains = searchDomains; } -QPtrList KDNSInfo::getKnownHostsList(){ +TQPtrList KDNSInfo::getKnownHostsList(){ return knownHosts; } void KDNSInfo::addKnownHost(KKnownHostInfo *host){ @@ -56,6 +56,6 @@ void KDNSInfo::addKnownHost(KKnownHostInfo *host){ bool KDNSInfo::removeKnownHost(int index){ return knownHosts.remove(index); } -void KDNSInfo::setKnownHostsList(QPtrList hostsList){ +void KDNSInfo::setKnownHostsList(TQPtrList hostsList){ KDNSInfo::knownHosts = hostsList; } diff --git a/knetworkconf/knetworkconf/kdnsinfo.h b/knetworkconf/knetworkconf/kdnsinfo.h index e81a7cb..9c1a27d 100644 --- a/knetworkconf/knetworkconf/kdnsinfo.h +++ b/knetworkconf/knetworkconf/kdnsinfo.h @@ -18,9 +18,9 @@ #ifndef KDNSINFO_H #define KDNSINFO_H -#include -#include -#include +#include +#include +#include #include "kknownhostinfo.h" /** @@ -31,25 +31,25 @@ class KDNSInfo { public: KDNSInfo(); ~KDNSInfo(); - QString getDomainName(); - QString getMachineName(); - QStringList getNameServers(); - QStringList getSearchDomains(); - void setNameServers(const QStringList &nameServer); - void setSearchDomains(const QStringList &searchDomains); - void setDomainName(const QString &domain); - void setMachineName(const QString &machine); - QPtrList getKnownHostsList(); + TQString getDomainName(); + TQString getMachineName(); + TQStringList getNameServers(); + TQStringList getSearchDomains(); + void setNameServers(const TQStringList &nameServer); + void setSearchDomains(const TQStringList &searchDomains); + void setDomainName(const TQString &domain); + void setMachineName(const TQString &machine); + TQPtrList getKnownHostsList(); void addKnownHost(KKnownHostInfo *host); bool removeKnownHost(int index); - void setKnownHostsList(QPtrList hostsList); + void setKnownHostsList(TQPtrList hostsList); private: // Private attributes - QStringList nameServers; - QStringList searchDomains; - QString domainName; - QString machineName; + TQStringList nameServers; + TQStringList searchDomains; + TQString domainName; + TQString machineName; /** List of known hosts (/etc/hosts). */ - QPtrList knownHosts; + TQPtrList knownHosts; }; #endif diff --git a/knetworkconf/knetworkconf/kknownhostinfo.cpp b/knetworkconf/knetworkconf/kknownhostinfo.cpp index 7e779f1..a83fc77 100644 --- a/knetworkconf/knetworkconf/kknownhostinfo.cpp +++ b/knetworkconf/knetworkconf/kknownhostinfo.cpp @@ -22,21 +22,21 @@ KKnownHostInfo::KKnownHostInfo(){ KKnownHostInfo::~KKnownHostInfo(){ } /** No descriptions */ -QString KKnownHostInfo::getIpAddress(){ +TQString KKnownHostInfo::getIpAddress(){ return ipAddress; } -QStringList KKnownHostInfo::getAliases(){ +TQStringList KKnownHostInfo::getAliases(){ return aliases; } -void KKnownHostInfo::setIpAddress(QString ipAddress){ +void KKnownHostInfo::setIpAddress(TQString ipAddress){ KKnownHostInfo::ipAddress = ipAddress; } -void KKnownHostInfo::addAlias(QString alias){ +void KKnownHostInfo::addAlias(TQString alias){ KKnownHostInfo::aliases.append(alias); } -void KKnownHostInfo::setAliases(QStringList aliases){ +void KKnownHostInfo::setAliases(TQStringList aliases){ KKnownHostInfo::aliases = aliases; } diff --git a/knetworkconf/knetworkconf/kknownhostinfo.h b/knetworkconf/knetworkconf/kknownhostinfo.h index 584639e..1023f59 100644 --- a/knetworkconf/knetworkconf/kknownhostinfo.h +++ b/knetworkconf/knetworkconf/kknownhostinfo.h @@ -18,8 +18,8 @@ #ifndef KKNOWNHOSTINFO_H #define KKNOWNHOSTINFO_H -#include -#include +#include +#include /**Class that represents an entry in the /etc/hosts file. *@author Juan Luis Baptiste @@ -29,16 +29,16 @@ class KKnownHostInfo { public: KKnownHostInfo(); ~KKnownHostInfo(); - QStringList getAliases(); - QString getIpAddress(); - void setAliases(QStringList aliases); - void addAlias(QString alias); - void setIpAddress(QString ipAddress); + TQStringList getAliases(); + TQString getIpAddress(); + void setAliases(TQStringList aliases); + void addAlias(TQString alias); + void setIpAddress(TQString ipAddress); private: // Private attributes /** IP address of the known Host. */ - QString ipAddress; + TQString ipAddress; /** Lists of aliases of the known host. */ - QStringList aliases; + TQStringList aliases; }; #endif diff --git a/knetworkconf/knetworkconf/knetworkconf.cpp b/knetworkconf/knetworkconf/knetworkconf.cpp index bc39c0e..8723d4b 100644 --- a/knetworkconf/knetworkconf/knetworkconf.cpp +++ b/knetworkconf/knetworkconf/knetworkconf.cpp @@ -19,7 +19,7 @@ #include "knetworkconf.h" -KNetworkConf::KNetworkConf(QWidget *parent, const char *name) : DCOPObject("KNetworkConfIface"), KNetworkConfDlg(parent, name) +KNetworkConf::KNetworkConf(TQWidget *parent, const char *name) : DCOPObject("KNetworkConfIface"), KNetworkConfDlg(parent, name) { netInfo = 0L; makeButtonsResizeable(); @@ -29,18 +29,18 @@ KNetworkConf::KNetworkConf(QWidget *parent, const char *name) : DCOPObject("KNet klvProfilesList->setAllColumnsShowFocus(true); klvProfilesList->setRenameable(0,true); klvProfilesList->setRenameable(1,true); - QToolTip::remove( &(QListView)klvProfilesList ); + TQToolTip::remove( &(TQListView)klvProfilesList ); tooltip = new KProfilesListViewToolTip(klvProfilesList); //Connect signals emmitted by the backend to know when data is ready to be painted. - connect(config,SIGNAL(readyLoadingNetworkInfo()),this,SLOT(getNetworkInfoSlot())); - connect(config,SIGNAL(readyLoadingNetworkInfo()),this,SLOT(showMainWindow())); - connect(config,SIGNAL(readyLoadingNetworkInfo()),this,SLOT(enableSignals())); - connect(config, SIGNAL(setReadOnly(bool)),this,SLOT(setReadOnlySlot(bool))); + connect(config,TQT_SIGNAL(readyLoadingNetworkInfo()),this,TQT_SLOT(getNetworkInfoSlot())); + connect(config,TQT_SIGNAL(readyLoadingNetworkInfo()),this,TQT_SLOT(showMainWindow())); + connect(config,TQT_SIGNAL(readyLoadingNetworkInfo()),this,TQT_SLOT(enableSignals())); + connect(config, TQT_SIGNAL(setReadOnly(bool)),this,TQT_SLOT(setReadOnlySlot(bool))); connect(klvCardList, - SIGNAL(contextMenu(KListView*,QListViewItem*,const QPoint&)), + TQT_SIGNAL(contextMenu(KListView*,TQListViewItem*,const TQPoint&)), this, - SLOT(showInterfaceContextMenuSlot(KListView*,QListViewItem*, const QPoint&))); + TQT_SLOT(showInterfaceContextMenuSlot(KListView*,TQListViewItem*, const TQPoint&))); // Register with DCOP - No longer needed as now we are a kcontrol module? if ( !kapp->dcopClient()->isRegistered() ) { @@ -70,7 +70,7 @@ void KNetworkConf::getNetworkInfoSlot() } else { - //QPtrList deviceList; + //TQPtrList deviceList; routingInfo = netInfo->getRoutingInfo(); dnsInfo = netInfo->getDNSInfo(); profilesList = netInfo->getProfilesList(); @@ -93,20 +93,20 @@ void KNetworkConf::getNetworkInfoSlot() void KNetworkConf::loadNetworkDevicesInfo() { KNetworkInterface *device; - QPixmap activeEthernetDeviceImg(locate("icon","hicolor/22x22/actions/network_connected_lan_knc.png")); - QPixmap inactiveEthernetDeviceImg(locate("icon","hicolor/22x22/actions/network_disconnected_lan.png")); - QPixmap activeWirelessDeviceImg(locate("icon","hicolor/22x22/actions/network_traffic_wlan.png")); - QPixmap inactiveWirelessDeviceImg(locate("icon","hicolor/22x22/actions/network_disconnected_wlan.png")); + TQPixmap activeEthernetDeviceImg(locate("icon","hicolor/22x22/actions/network_connected_lan_knc.png")); + TQPixmap inactiveEthernetDeviceImg(locate("icon","hicolor/22x22/actions/network_disconnected_lan.png")); + TQPixmap activeWirelessDeviceImg(locate("icon","hicolor/22x22/actions/network_traffic_wlan.png")); + TQPixmap inactiveWirelessDeviceImg(locate("icon","hicolor/22x22/actions/network_disconnected_wlan.png")); klvCardList->clear(); - QPtrList deviceList = netInfo->getDeviceList(); + TQPtrList deviceList = netInfo->getDeviceList(); for (device = deviceList.first(); device; device = deviceList.next()) { if ( device->getType() != "loopback" ) { if (klvCardList->findItem(device->getDeviceName(),0,CaseSensitive|ExactMatch) == 0) { - QListViewItem * item = new QListViewItem( klvCardList, 0 ); + TQListViewItem * item = new TQListViewItem( klvCardList, 0 ); if (device->isActive()) { @@ -138,7 +138,7 @@ void KNetworkConf::loadNetworkDevicesInfo() else item->setText(2,device->getBootProto()); item->setText(4,device->getDescription()); - QStringList l = deviceNamesList.grep(device->getDeviceName()); + TQStringList l = deviceNamesList.grep(device->getDeviceName()); if (l.size() == 0) deviceNamesList.append(device->getDeviceName()); } @@ -151,7 +151,7 @@ void KNetworkConf::loadNetworkDevicesInfo() */ void KNetworkConf::quitSlot(){ int code = 0; - connect( config, SIGNAL(readyLoadingNetworkInfo()), this, SLOT(quitSlot()) ); + connect( config, TQT_SIGNAL(readyLoadingNetworkInfo()), this, TQT_SLOT(quitSlot()) ); if (modified) { code = KMessageBox::warningYesNoCancel(this, @@ -170,8 +170,8 @@ void KNetworkConf::enableButtonsSlot(){ if (!readOnly) { kpbConfigureNetworkInterface->setEnabled(true); - QListViewItem *item = klvCardList->currentItem(); - QString currentDevice = item->text(0); + TQListViewItem *item = klvCardList->currentItem(); + TQString currentDevice = item->text(0); KNetworkInterface *dev = getDeviceInfo(currentDevice); if (dev->isActive()) @@ -204,8 +204,8 @@ void KNetworkConf::editServerSlot(){ { int currentPos = klbDomainServerList->currentItem(); dlg.setCaption(i18n("Edit Server")); - QListBoxItem *item = klbDomainServerList->item(currentPos); - QString currentText = item->text(); + TQListBoxItem *item = klbDomainServerList->item(currentPos); + TQString currentText = item->text(); dlg.kleNewServer->setText(currentText); dlg.kpbAddServer->setText(i18n("&OK")); dlg.exec(); @@ -221,7 +221,7 @@ void KNetworkConf::editServerSlot(){ /** Pops up the window for adding a new interface. */ void KNetworkConf::configureDeviceSlot(){ - QListViewItem *item = klvCardList->currentItem(); + TQListViewItem *item = klvCardList->currentItem(); KWirelessInterface *wifiDev = NULL; //KAddDeviceContainer *configDlg = new KAddDeviceContainer(this,0); @@ -229,7 +229,7 @@ void KNetworkConf::configureDeviceSlot(){ if (item != NULL) { - QString currentDevice = item->text(0); + TQString currentDevice = item->text(0); configDlg.setCaption(i18n("Configure Device %1").arg(currentDevice)); KNetworkInterface *dev = getDeviceInfo(currentDevice); KAddDeviceDlgExtension *advancedOptions = (KAddDeviceDlgExtension *)configDlg.extension(); @@ -336,9 +336,9 @@ void KNetworkConf::configureDeviceSlot(){ dev->setIpAddress(configDlg.addDlg->kleIPAddress->text().stripWhiteSpace()); dev->setGateway(advancedOptions->kleGateway->text().stripWhiteSpace()); dev->setNetmask(configDlg.addDlg->kcbNetmask->currentText().stripWhiteSpace()); - QString network = KAddressValidator::calculateNetwork(dev->getIpAddress().stripWhiteSpace(),dev->getNetmask().stripWhiteSpace()); + TQString network = KAddressValidator::calculateNetwork(dev->getIpAddress().stripWhiteSpace(),dev->getNetmask().stripWhiteSpace()); dev->setNetwork(network); - QString broadcast = advancedOptions->kleBroadcast->text().stripWhiteSpace(); + TQString broadcast = advancedOptions->kleBroadcast->text().stripWhiteSpace(); if (broadcast.isEmpty()) broadcast = KAddressValidator::calculateBroadcast(dev->getIpAddress().stripWhiteSpace(),dev->getNetmask().stripWhiteSpace()); dev->setBroadcast(broadcast); @@ -363,9 +363,9 @@ void KNetworkConf::configureDeviceSlot(){ } /**Returns the info of the network device 'device or NULL if not found.'*/ -KNetworkInterface * KNetworkConf::getDeviceInfo(QString device){ - QPtrList deviceList = netInfo->getDeviceList(); - QPtrListIterator i(deviceList); +KNetworkInterface * KNetworkConf::getDeviceInfo(TQString device){ + TQPtrList deviceList = netInfo->getDeviceList(); + TQPtrListIterator i(deviceList); KNetworkInterface *temp; while ((temp = i.current()) != 0) { @@ -379,9 +379,9 @@ KNetworkInterface * KNetworkConf::getDeviceInfo(QString device){ } /**Returns the name of the network device that corresponds to the IP address 'ipAddr' or NULL if not found.'*/ -QString KNetworkConf::getDeviceName(QString ipAddr){ - QPtrList deviceList = netInfo->getDeviceList(); - QPtrListIterator i(deviceList); +TQString KNetworkConf::getDeviceName(TQString ipAddr){ + TQPtrList deviceList = netInfo->getDeviceList(); + TQPtrListIterator i(deviceList); KNetworkInterface *temp; while ((temp = i.current()) != 0) { @@ -412,8 +412,8 @@ void KNetworkConf::loadRoutingInfo(){ //because some platforms (Debian-like ones) seems that don't handle the concept of a default //gateway, instead a gateway per interface. KNetworkInterface *device; - QString defaultGwDevice = routingInfo->getGatewayDevice(); - QPtrList deviceList = netInfo->getDeviceList(); + TQString defaultGwDevice = routingInfo->getGatewayDevice(); + TQPtrList deviceList = netInfo->getDeviceList(); for (device = deviceList.first(); device; device = deviceList.next()) { if ( device->getDeviceName() == defaultGwDevice ) @@ -437,7 +437,7 @@ void KNetworkConf::loadRoutingInfo(){ } void KNetworkConf::loadDNSInfo(){ - QStringList nameServers; + TQStringList nameServers; if (dnsInfo == NULL) KMessageBox::error(this,i18n("Could not open file '/etc/resolv.conf' for reading."), i18n("Error Loading Config Files")); @@ -447,24 +447,24 @@ void KNetworkConf::loadDNSInfo(){ kleDomainName->setText(dnsInfo->getDomainName()); klbDomainServerList->clear(); nameServers = dnsInfo->getNameServers(); - for ( QStringList::Iterator it = nameServers.begin(); it != nameServers.end(); ++it) + for ( TQStringList::Iterator it = nameServers.begin(); it != nameServers.end(); ++it) { klbDomainServerList->insertItem(*it); } klvKnownHosts->clear(); knownHostsList = dnsInfo->getKnownHostsList(); - QPtrListIterator it(knownHostsList); + TQPtrListIterator it(knownHostsList); KKnownHostInfo *host; while ((host = it.current()) != 0) { ++it; if (!(host->getIpAddress().isEmpty())) { - QListViewItem * item = new QListViewItem( klvKnownHosts, 0 ); + TQListViewItem * item = new TQListViewItem( klvKnownHosts, 0 ); item->setText(0,host->getIpAddress()); - QStringList aliasesList = host->getAliases(); - QString aliases; - for ( QStringList::Iterator it = aliasesList.begin(); it != aliasesList.end(); ++it ) + TQStringList aliasesList = host->getAliases(); + TQString aliases; + for ( TQStringList::Iterator it = aliasesList.begin(); it != aliasesList.end(); ++it ) { aliases += *it+" "; } @@ -475,7 +475,7 @@ void KNetworkConf::loadDNSInfo(){ } void KNetworkConf::loadNetworkProfiles(){ - QPtrListIterator it(profilesList); + TQPtrListIterator it(profilesList); KNetworkInfo *profile = NULL; klvProfilesList->clear(); @@ -484,7 +484,7 @@ void KNetworkConf::loadNetworkProfiles(){ ++it; if (!profile->getProfileName().isEmpty()) { - QListViewItem * item = new QListViewItem( klvProfilesList, 0 ); + TQListViewItem * item = new TQListViewItem( klvProfilesList, 0 ); item->setText(0,profile->getProfileName()); } } @@ -517,7 +517,7 @@ void KNetworkConf::setReadOnly(bool state){ KNetworkConf::readOnly = state; } /** No descriptions */ -void KNetworkConf::enableApplyButtonSlot(const QString &text){ +void KNetworkConf::enableApplyButtonSlot(const TQString &text){ enableApplyButtonSlot(); } /** No descriptions */ @@ -538,9 +538,9 @@ void KNetworkConf::moveUpServerSlot(){ if (antPos >= 0) { - QListBoxItem *current = klbDomainServerList->item(curPos); - QListBoxItem *ant = current->prev(); - QString antText = ant->text(); + TQListBoxItem *current = klbDomainServerList->item(curPos); + TQListBoxItem *ant = current->prev(); + TQString antText = ant->text(); klbDomainServerList->removeItem(antPos); klbDomainServerList->insertItem(antText,curPos); enableApplyButtonSlot(); @@ -554,8 +554,8 @@ void KNetworkConf::moveDownServerSlot(){ { if (klbDomainServerList->count() >= nextPos) { - QListBoxItem *current = klbDomainServerList->item(curPos); - QString curText = current->text(); + TQListBoxItem *current = klbDomainServerList->item(curPos); + TQString curText = current->text(); klbDomainServerList->removeItem(curPos); klbDomainServerList->insertItem(curText,nextPos); klbDomainServerList->setSelected(nextPos,true); @@ -569,7 +569,7 @@ void KNetworkConf::disableAll(){ kleDomainName->setReadOnly(true); tlDomainName->setEnabled(false); tlHostName->setEnabled(false); - disconnect(klvCardList,SIGNAL(doubleClicked(QListViewItem *)),this,SLOT(configureDeviceSlot())); + disconnect(klvCardList,TQT_SIGNAL(doubleClicked(TQListViewItem *)),this,TQT_SLOT(configureDeviceSlot())); klvCardList->setEnabled(false); kpbUpButton->setEnabled(false); kpbDownButton->setEnabled(false); @@ -615,9 +615,9 @@ void KNetworkConf::saveInfoSlot(){ //because some platforms (Debian-like ones) get the default gateway from there //instead from the default gateway field. funny huh? KNetworkInterface *device; - QString defaultGwDevice = routingInfo->getGatewayDevice(); - QString defaultGwAddress = routingInfo->getGateway(); - QPtrList deviceList = netInfo->getDeviceList(); + TQString defaultGwDevice = routingInfo->getGatewayDevice(); + TQString defaultGwAddress = routingInfo->getGateway(); + TQPtrList deviceList = netInfo->getDeviceList(); for (device = deviceList.first(); device; device = deviceList.next()) { if ( device->getGateway().length() == 0 ) @@ -633,19 +633,19 @@ void KNetworkConf::saveInfoSlot(){ modified = false; } } -/** Creates a QStringList with the IP addresses contained in the QListBox of name servers. */ -QStringList KNetworkConf::getNamserversList(KListBox * serverList){ - QStringList list; +/** Creates a TQStringList with the IP addresses contained in the TQListBox of name servers. */ +TQStringList KNetworkConf::getNamserversList(KListBox * serverList){ + TQStringList list; for (unsigned i = 0; i < serverList->count(); i++) { list.append(serverList->text(i)); } return list; } -/** Creates a QPtrList with the info contained in the KListView of name servers. */ -QPtrList KNetworkConf::getKnownHostsList(KListView * hostsList){ - QPtrList list; - QListViewItem *it = hostsList->firstChild(); +/** Creates a TQPtrList with the info contained in the KListView of name servers. */ +TQPtrList KNetworkConf::getKnownHostsList(KListView * hostsList){ + TQPtrList list; + TQListViewItem *it = hostsList->firstChild(); for (int i = 0; i < hostsList->childCount(); i++) { KKnownHostInfo *host = new KKnownHostInfo(); @@ -654,7 +654,7 @@ QPtrList KNetworkConf::getKnownHostsList(KListView * hostsList){ { host->setIpAddress(it->text(0)); // host->setHostName(it->text(1)); - host->setAliases(QStringList::split(" ",it->text(1))); + host->setAliases(TQStringList::split(" ",it->text(1))); it = it->nextSibling(); list.append(host); } @@ -662,16 +662,16 @@ QPtrList KNetworkConf::getKnownHostsList(KListView * hostsList){ return list; } -QString KNetworkConf::getVersion(){ +TQString KNetworkConf::getVersion(){ return version; } -void KNetworkConf::setVersion(QString ver){ +void KNetworkConf::setVersion(TQString ver){ KNetworkConf::version = ver; } /** Changes the state of device 'dev' to DEVICE_UP or DEVICE_DOWN. Return true on success, false on failure. */ -void KNetworkConf::changeDeviceState(const QString &dev, int state){ +void KNetworkConf::changeDeviceState(const TQString &dev, int state){ // If the text "Changing device state" is user visible it cannot be the // name parameter to the constructor. KInterfaceUpDownDlg* dialog = new KInterfaceUpDownDlg(this,"Changing device state"); @@ -684,12 +684,12 @@ void KNetworkConf::changeDeviceState(const QString &dev, int state){ dialog->setModal(true); dialog->show(); - procDeviceState = new QProcess(this); - QString cmd; + procDeviceState = new TQProcess(this); + TQString cmd; procDeviceState->addArgument( locate("data",BACKEND_PATH) ); //If the platform couldn't be autodetected specify it manually - if (netInfo->getPlatformName() != QString::null) + if (netInfo->getPlatformName() != TQString::null) { procDeviceState->addArgument( "--platform" ); procDeviceState->addArgument( netInfo->getPlatformName() ); @@ -701,10 +701,10 @@ void KNetworkConf::changeDeviceState(const QString &dev, int state){ else if (state == DEVICE_DOWN) procDeviceState->addArgument("enable_iface::"+dev+"::0" ); - connect( procDeviceState, SIGNAL(readyReadStdout()),this, SLOT(readFromStdoutUpDown()) ); - connect( procDeviceState, SIGNAL(readyReadStderr()),this, SLOT(readFromStdErrUpDown()) ); - connect( procDeviceState, SIGNAL(processExited()),this, SLOT(verifyDeviceStateChanged()) ); - connect( procDeviceState, SIGNAL(processExited()), dialog, SLOT(close()) ); + connect( procDeviceState, TQT_SIGNAL(readyReadStdout()),this, TQT_SLOT(readFromStdoutUpDown()) ); + connect( procDeviceState, TQT_SIGNAL(readyReadStderr()),this, TQT_SLOT(readFromStdErrUpDown()) ); + connect( procDeviceState, TQT_SIGNAL(processExited()),this, TQT_SLOT(verifyDeviceStateChanged()) ); + connect( procDeviceState, TQT_SIGNAL(processExited()), dialog, TQT_SLOT(close()) ); currentDevice = dev; commandOutput = ""; @@ -725,10 +725,10 @@ void KNetworkConf::readFromStdoutUpDown(){ void KNetworkConf::verifyDeviceStateChanged(){ KNetworkInterface *dev; - QPixmap activeEthernetDeviceImg(BarIcon("network_connected_lan_knc")); - QPixmap inactiveEthernetDeviceImg(BarIcon("network_disconnected_lan")); - QPixmap activeWirelessDeviceImg(BarIcon("network_traffic_wlan")); - QPixmap inactiveWirelessDeviceImg(BarIcon("network_disconnected_wlan")); + TQPixmap activeEthernetDeviceImg(BarIcon("network_connected_lan_knc")); + TQPixmap inactiveEthernetDeviceImg(BarIcon("network_disconnected_lan")); + TQPixmap activeWirelessDeviceImg(BarIcon("network_traffic_wlan")); + TQPixmap inactiveWirelessDeviceImg(BarIcon("network_disconnected_wlan")); commandOutput = commandOutput.section('\n',1); if (commandErrOutput.length() > 0) @@ -740,7 +740,7 @@ void KNetworkConf::verifyDeviceStateChanged(){ } else if (commandOutput == "\n") { - QListViewItem *item = klvCardList->findItem(currentDevice,0,ExactMatch); + TQListViewItem *item = klvCardList->findItem(currentDevice,0,ExactMatch); if (item != NULL) { dev = getDeviceInfo(currentDevice); @@ -776,10 +776,10 @@ void KNetworkConf::verifyDeviceStateChanged(){ } } /** Returns a list of strings of all the configured devices. */ -QStringList KNetworkConf::getDeviceList(){ - QStringList list; +TQStringList KNetworkConf::getDeviceList(){ + TQStringList list; KNetworkInterface * device; - QPtrList deviceList = netInfo->getDeviceList(); + TQPtrList deviceList = netInfo->getDeviceList(); for (device = deviceList.first(); device; device = deviceList.next()) { list.append(device->getDeviceName()); @@ -788,13 +788,13 @@ QStringList KNetworkConf::getDeviceList(){ } /** No descriptions */ bool KNetworkConf::valuesChanged(KNetworkInterface *dev, - QString bootProto, - QString netmask, - QString ipAddr, - QString gateway, + TQString bootProto, + TQString netmask, + TQString ipAddr, + TQString gateway, bool onBoot, - QString desc, - QString broadcast){ + TQString desc, + TQString broadcast){ if ((dev->getBootProto() != bootProto) || (dev->getNetmask() != netmask) || (dev->getIpAddress() != ipAddr) || @@ -808,7 +808,7 @@ bool KNetworkConf::valuesChanged(KNetworkInterface *dev, return false; } -/** Sets the QPushButton::autoResize() in true for all buttons. */ +/** Sets the TQPushButton::autoResize() in true for all buttons. */ void KNetworkConf::makeButtonsResizeable(){ kpbConfigureNetworkInterface->setAutoResize(true); kcbGwDevice->setAutoResize(true); @@ -864,13 +864,13 @@ void KNetworkConf::disableInterfaceSlot() void KNetworkConf::addKnownHostSlot(){ KAddKnownHostDlg dlg(this,0); dlg.setCaption(i18n("Add New Static Host")); - QString aliases; + TQString aliases; dlg.exec(); if (!dlg.kleIpAddress->text().isEmpty() && dlg.klbAliases->firstItem() > 0 ) { - QListViewItem * item = new QListViewItem( klvKnownHosts, 0 ); + TQListViewItem * item = new TQListViewItem( klvKnownHosts, 0 ); item->setText(0,dlg.kleIpAddress->text()); @@ -897,23 +897,23 @@ void KNetworkConf::editKnownHostSlot() { KAddKnownHostDlg dlg(this,0); dlg.setCaption(i18n("Edit Static Host")); - QListViewItem *item = klvKnownHosts->currentItem(); + TQListViewItem *item = klvKnownHosts->currentItem(); dlg.kleIpAddress->setText(item->text(0)); - QStringList aliases = QStringList::split( " ", item->text(1) ); + TQStringList aliases = TQStringList::split( " ", item->text(1) ); int n = 0; - for ( QStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it, ++n ) + for ( TQStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it, ++n ) { - QString alias = *it; + TQString alias = *it; dlg.klbAliases->insertItem(alias,n); } dlg.exec(); - QString _aliases; + TQString _aliases; if (!dlg.kleIpAddress->text().isEmpty() && dlg.klbAliases->firstItem() > 0 ) { - QListViewItem * item = klvKnownHosts->currentItem(); + TQListViewItem * item = klvKnownHosts->currentItem(); item->setText(0,dlg.kleIpAddress->text()); @@ -937,23 +937,23 @@ void KNetworkConf::readFromStdErrUpDown() commandErrOutput.append(procDeviceState->readStderr()); } /** Sees if a device is active or not in the ifconfig output. Not very nice, but it works. Inthe future, this has to be managed by gst. */ -bool KNetworkConf::isDeviceActive(const QString &device, const QString &ifconfigOutput){ - QString temp = ifconfigOutput.section(device,1,1); +bool KNetworkConf::isDeviceActive(const TQString &device, const TQString &ifconfigOutput){ + TQString temp = ifconfigOutput.section(device,1,1); if (temp.isEmpty()) return false; else { - QString temp2 = temp.section("UP",0,0); //two firts lines of the device info. - QString temp3 = temp2.section("\n",0,0); //Link encap:Ethernet HWaddr 00:00:21:C5:99:A0 - QString temp4 = temp2.section("\n",1,1); //inet addr:192.168.1.1 Bcast:192.255.255.255 Mask:255.0.0.0 + TQString temp2 = temp.section("UP",0,0); //two firts lines of the device info. + TQString temp3 = temp2.section("\n",0,0); //Link encap:Ethernet HWaddr 00:00:21:C5:99:A0 + TQString temp4 = temp2.section("\n",1,1); //inet addr:192.168.1.1 Bcast:192.255.255.255 Mask:255.0.0.0 temp3 = temp3.stripWhiteSpace(); temp4 = temp4.stripWhiteSpace(); - QString temp5 = temp3.section(" ",4,4); //00:00:21:C5:99:A0 - QString temp6 = temp4.section(" ",1,1); // addr:192.168.1.1 + TQString temp5 = temp3.section(" ",4,4); //00:00:21:C5:99:A0 + TQString temp6 = temp4.section(" ",1,1); // addr:192.168.1.1 temp6 = temp6.section(":",1,1); //192.168.1.1 - QString temp7 = temp4.section(" ",3,3); //Bcast:192.255.255.255 + TQString temp7 = temp4.section(" ",3,3); //Bcast:192.255.255.255 temp7 = temp7.section(":",1,1); //192.255.255.255 - QString temp8 = temp4.section(" ",5,5); // Mask:255.0.0.0 + TQString temp8 = temp4.section(" ",5,5); // Mask:255.0.0.0 temp8 = temp8.section(":",1,1); //255.0.0.0 //If the ip address is empty it must be a dhcp interface, so fill these fields: @@ -977,14 +977,14 @@ void KNetworkConf::setReadOnlySlot(bool state) } /*Shows a context menu when right-clicking in the interface list*/ -void KNetworkConf::showInterfaceContextMenuSlot(KListView* lv, QListViewItem* lvi, const QPoint& pt) +void KNetworkConf::showInterfaceContextMenuSlot(KListView* lv, TQListViewItem* lvi, const TQPoint& pt) { KPopupMenu *context = new KPopupMenu( this ); Q_CHECK_PTR( context ); - context->insertItem( "&Enable Interface", this, SLOT(enableInterfaceSlot())); - context->insertItem( "&Disable Interface", this, SLOT(disableInterfaceSlot())); - QListViewItem *item = klvCardList->currentItem(); - QString currentDevice = item->text(0); + context->insertItem( "&Enable Interface", this, TQT_SLOT(enableInterfaceSlot())); + context->insertItem( "&Disable Interface", this, TQT_SLOT(disableInterfaceSlot())); + TQListViewItem *item = klvCardList->currentItem(); + TQString currentDevice = item->text(0); KNetworkInterface *dev = getDeviceInfo(currentDevice); if (dev->isActive()) @@ -998,27 +998,27 @@ void KNetworkConf::showInterfaceContextMenuSlot(KListView* lv, QListViewItem* lv context->setItemEnabled(1,false); } context->insertSeparator(2); - context->insertItem( "&Configure Interface...", this, SLOT(configureDeviceSlot())); + context->insertItem( "&Configure Interface...", this, TQT_SLOT(configureDeviceSlot())); context->popup(pt); - //context->insertItem( "About &Qt", this, SLOT(aboutQt()) ); + //context->insertItem( "About &Qt", this, TQT_SLOT(aboutQt()) ); } void KNetworkConf::enableSignals() { tooltip->setProfiles(netInfo->getProfilesList()); - connect(kleDefaultRoute,SIGNAL(textChanged(const QString&)),this,SLOT(enableApplyButtonSlot(const QString&))); - connect(kleDomainName,SIGNAL(textChanged(const QString&)),this,SLOT(enableApplyButtonSlot(const QString&))); - connect(kleHostName,SIGNAL(textChanged(const QString&)),this,SLOT(enableApplyButtonSlot(const QString&))); + connect(kleDefaultRoute,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(enableApplyButtonSlot(const TQString&))); + connect(kleDomainName,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(enableApplyButtonSlot(const TQString&))); + connect(kleHostName,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(enableApplyButtonSlot(const TQString&))); } void KNetworkConf::enableProfileSlot() { //Get selected profile - QListViewItem *item = klvProfilesList->currentItem(); + TQListViewItem *item = klvProfilesList->currentItem(); if (item != NULL) { - QString selectedProfile = item->text(0); + TQString selectedProfile = item->text(0); //And search for it in the profiles list KNetworkInfo *profile = getProfile(netInfo->getProfilesList(),selectedProfile); @@ -1027,7 +1027,7 @@ void KNetworkConf::enableProfileSlot() profile->setProfilesList(netInfo->getProfilesList()); config->saveNetworkInfo(profile); modified = false; - //connect( config, SIGNAL(readyLoadingNetworkInfo()), this, SLOT(showSelectedProfile(selectedProfile)) ); + //connect( config, TQT_SIGNAL(readyLoadingNetworkInfo()), this, TQT_SLOT(showSelectedProfile(selectedProfile)) ); } else KMessageBox::error(this, @@ -1036,9 +1036,9 @@ void KNetworkConf::enableProfileSlot() } } -KNetworkInfo *KNetworkConf::getProfile(QPtrList profilesList, QString selectedProfile) +KNetworkInfo *KNetworkConf::getProfile(TQPtrList profilesList, TQString selectedProfile) { - QPtrListIterator it(profilesList); + TQPtrListIterator it(profilesList); KNetworkInfo *net = NULL; while ((net = it.current()) != 0) @@ -1055,19 +1055,19 @@ void KNetworkConf::createProfileSlot() if (!netInfo) return; bool ok; - QString newProfileName = KInputDialog::getText(i18n("Create New Network Profile"), + TQString newProfileName = KInputDialog::getText(i18n("Create New Network Profile"), i18n("Name of new profile:"), - QString::null, &ok, this ); + TQString::null, &ok, this ); if ( ok && !newProfileName.isEmpty() ) { - QPtrList profiles = netInfo->getProfilesList(); + TQPtrList profiles = netInfo->getProfilesList(); KNetworkInfo *currentProfile = getProfile(profiles,newProfileName); KNetworkInfo *newProfile = new KNetworkInfo(); //If there isn't a profile with the new name we add it to the list. if (currentProfile == NULL) { - QListViewItem *newItem = new QListViewItem( klvProfilesList,newProfileName); + TQListViewItem *newItem = new TQListViewItem( klvProfilesList,newProfileName); //memcpy(newProfile,netInfo,sizeof(netInfo) + sizeof(KRoutingInfo) + sizeof(KDNSInfo)); //Is there a better way to copy an object? the above memcpy doesn't do the trick @@ -1091,9 +1091,9 @@ void KNetworkConf::createProfileSlot() } -/*void KNetworkConf::updateProfileNameSlot(QListViewItem *item) +/*void KNetworkConf::updateProfileNameSlot(TQListViewItem *item) { - QString newName = item->text(0); + TQString newName = item->text(0); if (newName.isEmpty()) KMessageBox::error(this, @@ -1116,20 +1116,20 @@ void KNetworkConf::createProfileSlot() void KNetworkConf::removeProfileSlot() { - QListViewItem *item= klvProfilesList->selectedItem(); + TQListViewItem *item= klvProfilesList->selectedItem(); if (item != NULL) { /* if (KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to delete the selected network profile?"), i18n("Delete Profile"),KStdGuiItem::del()) == KMessageBox::Continue)*/ { - QString selectedProfile = item->text(0); - QPtrList profiles = netInfo->getProfilesList(); + TQString selectedProfile = item->text(0); + TQPtrList profiles = netInfo->getProfilesList(); KNetworkInfo *profileToDelete = NULL; for ( profileToDelete = profiles.first(); profileToDelete; profileToDelete = profiles.next() ) { - QString profileName = profileToDelete->getProfileName(); + TQString profileName = profileToDelete->getProfileName(); if (profileName == selectedProfile) { profiles.remove(profileToDelete); @@ -1146,17 +1146,17 @@ void KNetworkConf::removeProfileSlot() void KNetworkConf::updateProfileSlot() { - QListViewItem *item= klvProfilesList->selectedItem(); + TQListViewItem *item= klvProfilesList->selectedItem(); if (item != NULL) { - QString selectedProfile = item->text(0); - QPtrList profiles = netInfo->getProfilesList(); + TQString selectedProfile = item->text(0); + TQPtrList profiles = netInfo->getProfilesList(); KNetworkInfo *profileToUpdate = NULL; KNetworkInfo *newProfile = new KNetworkInfo(); for ( profileToUpdate = profiles.first(); profileToUpdate; profileToUpdate = profiles.next() ) { - QString profileName = profileToUpdate->getProfileName(); + TQString profileName = profileToUpdate->getProfileName(); if (profileName == selectedProfile) { qDebug("profile updated"); diff --git a/knetworkconf/knetworkconf/knetworkconf.h b/knetworkconf/knetworkconf/knetworkconf.h index 3416776..813b150 100644 --- a/knetworkconf/knetworkconf/knetworkconf.h +++ b/knetworkconf/knetworkconf/knetworkconf.h @@ -29,17 +29,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 #include @@ -78,13 +78,13 @@ class KNetworkConf : public KNetworkConfDlg, virtual public KNetworkConfIface Q_OBJECT public: /** construtor */ - KNetworkConf(QWidget* parent=0, const char *name=0); + KNetworkConf(TQWidget* parent=0, const char *name=0); /** destructor */ ~KNetworkConf(); /** Puts the application in read-only mode. This happens when the user runing the application isn't root. */ void setReadOnly(bool state); - void setVersion(QString ver); - QString getVersion(); + void setVersion(TQString ver); + TQString getVersion(); /** Disables all buttons a line edit widgets when the user has read only access. */ void disableAll(); @@ -99,38 +99,38 @@ class KNetworkConf : public KNetworkConfDlg, virtual public KNetworkConfIface private: // Private attributes /** */ KNetworkConfigParser *config; - KNetworkInterface * getDeviceInfo(QString device); - QString getDeviceName(QString ipAddr); - /** Creates a QStringList with the IP addresses contained in the QListBox of name servers. */ - QStringList getNamserversList(KListBox * serverList); -/** Creates a QPtrList with the info contained in the KListView of name servers. */ - QPtrList getKnownHostsList(KListView * hostsList); - QString currentDevice; + KNetworkInterface * getDeviceInfo(TQString device); + TQString getDeviceName(TQString ipAddr); + /** Creates a TQStringList with the IP addresses contained in the TQListBox of name servers. */ + TQStringList getNamserversList(KListBox * serverList); +/** Creates a TQPtrList with the info contained in the KListView of name servers. */ + TQPtrList getKnownHostsList(KListView * hostsList); + TQString currentDevice; KRoutingInfo *routingInfo; KDNSInfo *dnsInfo; bool reloaded; - QString commandOutput; - QProcess *procUpdateDevice; - QProcess *procDeviceState; - QStringList deviceNamesList; + TQString commandOutput; + TQProcess *procUpdateDevice; + TQProcess *procDeviceState; + TQStringList deviceNamesList; bool devicesModified; bool readOnly; - QPtrList knownHostsList; - QPtrList profilesList; + TQPtrList knownHostsList; + TQPtrList profilesList; bool nameServersModified; /** The program's version. */ - QString version; + TQString version; bool modified; bool devStateChanged; /** */ KNetworkInfo * netInfo; /** Has the errors throwed by GST when executed. */ - QString commandErrOutput; + TQString commandErrOutput; /** Changes the state of device 'dev' to DEVICE_UP or DEVICE_DOWN. Return true on success, false on failure. */ - void changeDeviceState(const QString &dev, int state); - KNetworkInfo *getProfile(QPtrList profilesList, QString selectedProfile); - void showSelectedProfile(QString profile); + void changeDeviceState(const TQString &dev, int state); + KNetworkInfo *getProfile(TQPtrList profilesList, TQString selectedProfile); + void showSelectedProfile(TQString profile); KProfilesListViewToolTip *tooltip; public slots: @@ -157,22 +157,22 @@ class KNetworkConf : public KNetworkConfDlg, virtual public KNetworkConfIface /** Shows the help browser. Hopefully some day it will be one :-). */ virtual void helpSlot(); virtual void enableApplyButtonSlot(bool); - virtual void enableApplyButtonSlot(const QString &text); + virtual void enableApplyButtonSlot(const TQString &text); /** Saves all the modified info of devices, routes,etc. */ virtual void moveDownServerSlot(); virtual void moveUpServerSlot(); virtual void removeServerSlot(); bool valuesChanged(KNetworkInterface *dev, - QString bootProto, - QString netmask, - QString ipAddr, - QString gateway, + TQString bootProto, + TQString netmask, + TQString ipAddr, + TQString gateway, bool onBoot, - QString desc, - QString broadcast); + TQString desc, + TQString broadcast); /** Returns a list of strings of all the configured devices. */ - QStringList getDeviceList(); - /** Sets the QPushButton::autoResize() in true for all buttons. */ + TQStringList getDeviceList(); + /** Sets the TQPushButton::autoResize() in true for all buttons. */ void makeButtonsResizeable(); /** Adds a new host to the KListView that has the known hosts. */ @@ -189,16 +189,16 @@ class KNetworkConf : public KNetworkConfDlg, virtual public KNetworkConfIface void showMainWindow(); void verifyDeviceStateChanged(); /** Sees if a device is active or not in the ifconfig output. Not very nice, but it works. Inthe future, this has to be managed by gst. */ - bool isDeviceActive(const QString &device, const QString &ifconfigOutput); + bool isDeviceActive(const TQString &device, const TQString &ifconfigOutput); /*Shows a context menu when right-clicking in the interface list*/ - void showInterfaceContextMenuSlot(KListView*, QListViewItem*, const QPoint&); + void showInterfaceContextMenuSlot(KListView*, TQListViewItem*, const TQPoint&); /** Enable some signals in the GUI that need to be enabled *after* the loading of the network info is done.*/ void enableSignals (); virtual void enableProfileSlot(); virtual void createProfileSlot(); - //virtual void updateProfileNameSlot(QListViewItem *item); + //virtual void updateProfileNameSlot(TQListViewItem *item); virtual void removeProfileSlot(); virtual void updateProfileSlot(); diff --git a/knetworkconf/knetworkconf/knetworkconfdlg.ui.h b/knetworkconf/knetworkconf/knetworkconfdlg.ui.h index 69a1275..68bb00f 100644 --- a/knetworkconf/knetworkconf/knetworkconfdlg.ui.h +++ b/knetworkconf/knetworkconf/knetworkconfdlg.ui.h @@ -43,7 +43,7 @@ void KNetworkConfDlg::enableApplyButtonSlot( bool ) } -void KNetworkConfDlg::enableApplyButtonSlot( const QString & ) +void KNetworkConfDlg::enableApplyButtonSlot( const TQString & ) { } @@ -150,7 +150,7 @@ void KNetworkConfDlg::updateProfileNameSlot() } -void KNetworkConfDlg::updateProfileNameSlot( QListViewItem *item ) +void KNetworkConfDlg::updateProfileNameSlot( TQListViewItem *item ) { } diff --git a/knetworkconf/knetworkconf/knetworkconfigparser.cpp b/knetworkconf/knetworkconf/knetworkconfigparser.cpp index 2e2351d..ceacdac 100644 --- a/knetworkconf/knetworkconf/knetworkconfigparser.cpp +++ b/knetworkconf/knetworkconf/knetworkconfigparser.cpp @@ -21,20 +21,20 @@ KNetworkConfigParser::KNetworkConfigParser(){ networkInfo = new KNetworkInfo(); - QString platform; + TQString platform; bool askAgain = readAskAgain(platform); if (!askAgain || platform.length() > 0) runDetectionScript(platform); else - runDetectionScript(QString::null); + runDetectionScript(TQString::null); } /** Runs the gst backend to get network values. You can pass to the script a specific platform to load using the platform parameter. */ -void KNetworkConfigParser::runDetectionScript(QString platform){ +void KNetworkConfigParser::runDetectionScript(TQString platform){ KDetectDistroDlg* dialog = new KDetectDistroDlg(0, 0); dialog->show(); - procDetect = new QProcess(this); - QString pathToProgram = locate("data",BACKEND_PATH); + procDetect = new TQProcess(this); + TQString pathToProgram = locate("data",BACKEND_PATH); if (pathToProgram.isEmpty()) { KMessageBox::error(0, @@ -46,17 +46,17 @@ void KNetworkConfigParser::runDetectionScript(QString platform){ else { procDetect->addArgument( pathToProgram ); - if (platform != QString::null) + if (platform != TQString::null) { procDetect->addArgument( "--platform" ); procDetect->addArgument( platform ); } procDetect->addArgument( "--get" ); - connect( this, SIGNAL(readyLoadingNetworkInfo()), dialog, SLOT(close()) ); - connect( this, SIGNAL(errorDetectingPlatform()), dialog, SLOT(close()) ); - connect( procDetect, SIGNAL(processExited()), this, SLOT(readNetworkInfo()) ); - connect( procDetect, SIGNAL(readyReadStdout()),this, SLOT(concatXMLOutputSlot())); - connect( procDetect, SIGNAL(readyReadStderr()),this, SLOT(readXMLErrSlot())); + connect( this, TQT_SIGNAL(readyLoadingNetworkInfo()), dialog, TQT_SLOT(close()) ); + connect( this, TQT_SIGNAL(errorDetectingPlatform()), dialog, TQT_SLOT(close()) ); + connect( procDetect, TQT_SIGNAL(processExited()), this, TQT_SLOT(readNetworkInfo()) ); + connect( procDetect, TQT_SIGNAL(readyReadStdout()),this, TQT_SLOT(concatXMLOutputSlot())); + connect( procDetect, TQT_SIGNAL(readyReadStderr()),this, TQT_SLOT(readXMLErrSlot())); if ( !procDetect->start() ) { @@ -70,10 +70,10 @@ void KNetworkConfigParser::runDetectionScript(QString platform){ } /** runs gst to find out the state of network devices.It runs the command: $knetworkconf_home/backends/networkconf [--platform platform] -d list_ifaces. */ -void KNetworkConfigParser::listIfaces(const QString &platform){ - procDetect = new QProcess(this); +void KNetworkConfigParser::listIfaces(const TQString &platform){ + procDetect = new TQProcess(this); procDetect->addArgument( locate("data",BACKEND_PATH) ); - if (platform != QString::null) + if (platform != TQString::null) { procDetect->addArgument( "--platform" ); procDetect->addArgument( platform ); @@ -82,9 +82,9 @@ void KNetworkConfigParser::listIfaces(const QString &platform){ procDetect->addArgument( "-d" ); procDetect->addArgument( "list_ifaces" ); - connect( procDetect, SIGNAL(processExited()), this, SLOT(readListIfacesSlot()) ); - connect( procDetect, SIGNAL(readyReadStdout()),this, SLOT(concatXMLOutputSlot())); - connect( procDetect, SIGNAL(readyReadStderr()),this, SLOT(readXMLErrSlot())); + connect( procDetect, TQT_SIGNAL(processExited()), this, TQT_SLOT(readListIfacesSlot()) ); + connect( procDetect, TQT_SIGNAL(readyReadStdout()),this, TQT_SLOT(concatXMLOutputSlot())); + connect( procDetect, TQT_SIGNAL(readyReadStderr()),this, TQT_SLOT(readXMLErrSlot())); xmlOuput = ""; xmlErr = ""; @@ -98,15 +98,15 @@ void KNetworkConfigParser::listIfaces(const QString &platform){ } void KNetworkConfigParser::readListIfacesSlot(){ - QPtrList tempDeviceList; + TQPtrList tempDeviceList; //The gst backend puts a \n at the beginning of the xml output, so //we have to erase it first before we parse it. xmlOuput = xmlOuput.section('\n',1); qDebug("XML -d list_ifaces: %s",xmlOuput.latin1()); - QString err; + TQString err; int x,y; - QDomDocument doc( "network-ifaces"); + TQDomDocument doc( "network-ifaces"); if ( !doc.setContent( xmlOuput.utf8(),false,&err,&x,&y ) ) { KMessageBox::error(0, @@ -114,16 +114,16 @@ void KNetworkConfigParser::readListIfacesSlot(){ i18n("Error While Listing Network Interfaces")); // qDebug("error: %s %d,%d",err.latin1(),x,y); } - QDomElement root = doc.documentElement(); - QDomNode node = root.firstChild(); + TQDomElement root = doc.documentElement(); + TQDomNode node = root.firstChild(); while( !node.isNull() ) { if ( node.isElement() && node.nodeName() == "interface" ) { - QDomElement interface = node.toElement(); + TQDomElement interface = node.toElement(); KNetworkInterface *tempDevice = new KNetworkInterface(); - tempDevice = getInterfaceInfo(interface,QString::null); + tempDevice = getInterfaceInfo(interface,TQString::null); if (tempDevice->getType().lower() != LOOPBACK_IFACE_TYPE) { @@ -163,14 +163,14 @@ unsigned KNetworkConfigParser::numDevices(){ return _numDevices; } -void KNetworkConfigParser::setProgramVersion(QString ver) +void KNetworkConfigParser::setProgramVersion(TQString ver) { KNetworkConfigParser::programVersion = ver; } void KNetworkConfigParser::readIfconfigOutput(){ - QString s = proc->readStdout(); + TQString s = proc->readStdout(); ifconfigOutput = s; } @@ -184,7 +184,7 @@ void KNetworkConfigParser::readIfconfigOutput(){ */ void KNetworkConfigParser::loadRoutingInfo( KRoutingInfo *routingInfo){ #ifndef Q_OS_FREEBSD - QFile f( "/proc/net/route"); + TQFile f( "/proc/net/route"); if ( !f.open(IO_ReadOnly) ) { KMessageBox::error(0, @@ -193,14 +193,14 @@ void KNetworkConfigParser::loadRoutingInfo( KRoutingInfo *routingInfo){ } else { - QTextStream t( &f ); // use a text stream - QString s; + TQTextStream t( &f ); // use a text stream + TQString s; while (!t.eof()) { s = t.readLine(); // line of text excluding '\n' - QString interface = s.section('\t',0,0); - QString destination = s.section('\t',1,1); - QString gw = s.section('\t',2,2); + TQString interface = s.section('\t',0,0); + TQString destination = s.section('\t',1,1); + TQString gw = s.section('\t',2,2); if (destination == "00000000") { @@ -213,13 +213,13 @@ void KNetworkConfigParser::loadRoutingInfo( KRoutingInfo *routingInfo){ #endif } QString -KNetworkConfigParser::hexIPv4ToDecIPv4(const QString &hex) +KNetworkConfigParser::hexIPv4ToDecIPv4(const TQString &hex) { bool ok; - QString dec = ""; - QString dec2 = ""; - QString temp = ""; - QString temp2 = ""; + TQString dec = ""; + TQString dec2 = ""; + TQString temp = ""; + TQString temp2 = ""; #if Q_BYTE_ORDER == Q_LITTLE_ENDIAN temp = hex.mid(6,2); @@ -265,16 +265,16 @@ KNetworkConfigParser::hexIPv4ToDecIPv4(const QString &hex) void KNetworkConfigParser::saveNetworkInfo(KNetworkInfo *networkInfo) { this->networkInfo = networkInfo; - QPtrList devList = networkInfo->getDeviceList(); - QPtrList profileList = networkInfo->getProfilesList(); + TQPtrList devList = networkInfo->getDeviceList(); + TQPtrList profileList = networkInfo->getProfilesList(); dnsInfo = networkInfo->getDNSInfo(); routingInfo = networkInfo->getRoutingInfo(); //Start xml file - QDomDocument doc( "network []" ); - QDomProcessingInstruction instr = doc.createProcessingInstruction("xml","version=\"1.0\" "); + TQDomDocument doc( "network []" ); + TQDomProcessingInstruction instr = doc.createProcessingInstruction("xml","version=\"1.0\" "); doc.appendChild(instr); - QDomElement root = doc.createElement( "network" ); + TQDomElement root = doc.createElement( "network" ); doc.appendChild( root ); addRoutingInfoToXMLDoc(&doc, &root, routingInfo); @@ -283,12 +283,12 @@ void KNetworkConfigParser::saveNetworkInfo(KNetworkInfo *networkInfo) addNetworkProfilesToXMLDoc(&doc, &root, profileList); //If we don't add this comment to the end of the xml file, the gst process never exits! - QDomComment endComment = doc.createComment(" GST: end of request "); + TQDomComment endComment = doc.createComment(" GST: end of request "); doc.appendChild( endComment ); - QString xml = doc.toString(); + TQString xml = doc.toString(); qDebug("--set XML:\n%s",xml.latin1()); - procSaveNetworkInfo = new QProcess(this); + procSaveNetworkInfo = new TQProcess(this); procSaveNetworkInfo->addArgument( locate("data",BACKEND_PATH) ); if (!networkInfo->getPlatformName().isEmpty()) @@ -298,21 +298,21 @@ void KNetworkConfigParser::saveNetworkInfo(KNetworkInfo *networkInfo) } procSaveNetworkInfo->addArgument( "--set" ); -// KDetectDistroDlg* dialog = new KDetectDistroDlg(0, 0, true,QDialog::WStyle_Customize|QDialog::WStyle_NormalBorder|QDialog::WStyle_Title|QDialog::WStyle_SysMenu); //made it semi-modal - KDetectDistroDlg* dialog = new KDetectDistroDlg((QWidget*)parent(), 0, true); +// KDetectDistroDlg* dialog = new KDetectDistroDlg(0, 0, true,TQDialog::WStyle_Customize|TQDialog::WStyle_NormalBorder|TQDialog::WStyle_Title|TQDialog::WStyle_SysMenu); //made it semi-modal + KDetectDistroDlg* dialog = new KDetectDistroDlg((TQWidget*)parent(), 0, true); dialog->setCaption(i18n("Reloading Network")); dialog->text->setText(i18n("%1Please wait while saving the network settings...%2").arg("
").arg("
")); dialog->show(); xmlOuput = ""; - connect( this, SIGNAL(readyLoadingNetworkInfo()), dialog, SLOT(close()) ); - connect(procSaveNetworkInfo,SIGNAL(readyReadStdout()),this,SLOT(readFromStdoutSaveNetworkInfo())); - connect(procSaveNetworkInfo,SIGNAL(wroteToStdin()),this,SLOT(sendNetworkInfoSavedSignalSlot())); - connect(procSaveNetworkInfo,SIGNAL(processExited()),this,SLOT(listIfacesSlot())); + connect( this, TQT_SIGNAL(readyLoadingNetworkInfo()), dialog, TQT_SLOT(close()) ); + connect(procSaveNetworkInfo,TQT_SIGNAL(readyReadStdout()),this,TQT_SLOT(readFromStdoutSaveNetworkInfo())); + connect(procSaveNetworkInfo,TQT_SIGNAL(wroteToStdin()),this,TQT_SLOT(sendNetworkInfoSavedSignalSlot())); + connect(procSaveNetworkInfo,TQT_SIGNAL(processExited()),this,TQT_SLOT(listIfacesSlot())); processRunning = true; - connect( procSaveNetworkInfo, SIGNAL(processExited()), this, SLOT(processExitedSlot()) ); + connect( procSaveNetworkInfo, TQT_SIGNAL(processExited()), this, TQT_SLOT(processExitedSlot()) ); if ( !procSaveNetworkInfo->start() ) { @@ -333,25 +333,25 @@ void KNetworkConfigParser::processExitedSlot() { processRunning = false; } -void KNetworkConfigParser::addNetworkProfilesToXMLDoc(QDomDocument *doc, QDomNode *root, QPtrList profileList) +void KNetworkConfigParser::addNetworkProfilesToXMLDoc(TQDomDocument *doc, TQDomNode *root, TQPtrList profileList) { - QPtrListIterator profileIt(profileList); + TQPtrListIterator profileIt(profileList); KNetworkInfo *profile; - QDomElement tag = doc->createElement( "profiledb" ); + TQDomElement tag = doc->createElement( "profiledb" ); root->appendChild( tag ); while ( (profile = profileIt.current()) != 0) { ++profileIt; - QPtrList devList = profile->getDeviceList(); + TQPtrList devList = profile->getDeviceList(); KDNSInfo *dnsInfo = profile->getDNSInfo(); KRoutingInfo *routingInfo = profile->getRoutingInfo(); - QDomElement profileTag = doc->createElement( "profile" ); + TQDomElement profileTag = doc->createElement( "profile" ); tag.appendChild( profileTag ); - QDomElement innerTag = doc->createElement( "name" ); + TQDomElement innerTag = doc->createElement( "name" ); profileTag.appendChild( innerTag ); - QDomText t = doc->createTextNode( profile->getProfileName() ); + TQDomText t = doc->createTextNode( profile->getProfileName() ); innerTag.appendChild( t ); addRoutingInfoToXMLDoc(doc, &profileTag, routingInfo); @@ -360,10 +360,10 @@ void KNetworkConfigParser::addNetworkProfilesToXMLDoc(QDomDocument *doc, QDomNod } } -void KNetworkConfigParser::addNetworkInterfacesToXMLDoc(QDomDocument *doc, QDomNode *root, QPtrList devList) +void KNetworkConfigParser::addNetworkInterfacesToXMLDoc(TQDomDocument *doc, TQDomNode *root, TQPtrList devList) { KNetworkInterface *device; - QPtrListIterator devIt(devList); + TQPtrListIterator devIt(devList); //Save in the configuration file the description of the interfaces as //the backend no longer handles this @@ -378,15 +378,15 @@ void KNetworkConfigParser::addNetworkInterfacesToXMLDoc(QDomDocument *doc, QDomN if (device->getBootProto().isEmpty()) continue; - QDomElement tag = doc->createElement( "interface" ); + TQDomElement tag = doc->createElement( "interface" ); tag.setAttribute("type",device->getType()); root->appendChild( tag ); - QDomElement configurationTag; + TQDomElement configurationTag; configurationTag = doc->createElement( "configuration" ); tag.appendChild( configurationTag ); - QDomElement innerTag; - QDomText t; + TQDomElement innerTag; + TQDomText t; if ((device->getBootProto().lower() != "dhcp") && (device->getBootProto().lower() != "bootp")) { if (!device->getIpAddress().isEmpty()) @@ -502,16 +502,16 @@ void KNetworkConfigParser::addNetworkInterfacesToXMLDoc(QDomDocument *doc, QDomN } } -void KNetworkConfigParser::addDNSInfoToXMLDoc(QDomDocument *doc, QDomNode *root, KDNSInfo *dnsInfo) +void KNetworkConfigParser::addDNSInfoToXMLDoc(TQDomDocument *doc, TQDomNode *root, KDNSInfo *dnsInfo) { - QStringList nameServerList = dnsInfo->getNameServers(); - QPtrList knownHostsList = dnsInfo->getKnownHostsList(); - QPtrListIterator knownHostsIt(knownHostsList); + TQStringList nameServerList = dnsInfo->getNameServers(); + TQPtrList knownHostsList = dnsInfo->getKnownHostsList(); + TQPtrListIterator knownHostsIt(knownHostsList); KKnownHostInfo *host; - QDomElement tag = doc->createElement( "hostname" ); + TQDomElement tag = doc->createElement( "hostname" ); root->appendChild( tag ); - QDomText t = doc->createTextNode( dnsInfo->getMachineName() ); + TQDomText t = doc->createTextNode( dnsInfo->getMachineName() ); tag.appendChild( t ); tag = doc->createElement( "domain" ); root->appendChild( tag ); @@ -519,7 +519,7 @@ void KNetworkConfigParser::addDNSInfoToXMLDoc(QDomDocument *doc, QDomNode *root, tag.appendChild( t ); //Add the list of name servers - for ( QStringList::Iterator it = nameServerList.begin(); it != nameServerList.end(); ++it ) { + for ( TQStringList::Iterator it = nameServerList.begin(); it != nameServerList.end(); ++it ) { tag = doc->createElement( "nameserver" ); root->appendChild( tag ); t = doc->createTextNode( *it ); @@ -532,7 +532,7 @@ void KNetworkConfigParser::addDNSInfoToXMLDoc(QDomDocument *doc, QDomNode *root, ++knownHostsIt; tag = doc->createElement( "statichost" ); root->appendChild( tag ); - QDomElement innerTag; + TQDomElement innerTag; if (!host->getIpAddress().isEmpty()) { innerTag = doc->createElement( "ip" ); @@ -540,9 +540,9 @@ void KNetworkConfigParser::addDNSInfoToXMLDoc(QDomDocument *doc, QDomNode *root, t = doc->createTextNode( host->getIpAddress() ); innerTag.appendChild( t ); } - QStringList aliases = host->getAliases(); + TQStringList aliases = host->getAliases(); - for ( QStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it ) + for ( TQStringList::Iterator it = aliases.begin(); it != aliases.end(); ++it ) { innerTag = doc->createElement( "alias" ); tag.appendChild( innerTag ); @@ -552,11 +552,11 @@ void KNetworkConfigParser::addDNSInfoToXMLDoc(QDomDocument *doc, QDomNode *root, } } -void KNetworkConfigParser::addRoutingInfoToXMLDoc(QDomDocument *doc, QDomNode *root, KRoutingInfo *routingInfo) +void KNetworkConfigParser::addRoutingInfoToXMLDoc(TQDomDocument *doc, TQDomNode *root, KRoutingInfo *routingInfo) { - QDomElement tag = doc->createElement( "gateway" ); + TQDomElement tag = doc->createElement( "gateway" ); root->appendChild( tag ); - QDomText t = doc->createTextNode( routingInfo->getGateway() ); + TQDomText t = doc->createTextNode( routingInfo->getGateway() ); tag.appendChild( t ); tag = doc->createElement( "gatewaydev" ); @@ -573,7 +573,7 @@ KNetworkInfo * KNetworkConfigParser::getNetworkInfo(){ /** Parses all of the ... entries in the xml configuration file. Returns a KWirelessInterface object that contains all the info of the wireless interface. */ -KWirelessInterface * KNetworkConfigParser::getWirelessInterfaceInfo(QDomElement interface, const QString &type){ +KWirelessInterface * KNetworkConfigParser::getWirelessInterfaceInfo(TQDomElement interface, const TQString &type){ KWirelessInterface *wifiDevice = new KWirelessInterface(); KNetworkInterface *tempDevice = NULL; @@ -585,37 +585,37 @@ KWirelessInterface * KNetworkConfigParser::getWirelessInterfaceInfo(QDomElement memcpy(wifiDevice,tempDevice,sizeof(KNetworkInterface)); //wifiDevice = static_cast(tempDevice); - QDomNode node = interface.firstChild(); + TQDomNode node = interface.firstChild(); while ( !node.isNull() ) { if ( node.isElement() ) { - QString nodeName =node.nodeName(); + TQString nodeName =node.nodeName(); //Parsing --get interfaces configuration if ( node.isElement() && node.nodeName() == "configuration" ) { - QDomNode configNode = node.firstChild(); + TQDomNode configNode = node.firstChild(); while ( !configNode.isNull() ) { if ( configNode.isElement() ) { - QString configNodeName =configNode.nodeName(); + TQString configNodeName =configNode.nodeName(); if ( configNodeName == "key" ) { - QDomElement e = configNode.toElement(); + TQDomElement e = configNode.toElement(); wifiDevice->setWepKey(e.text()); } else if ( configNodeName == "essid" ) { - QDomElement e = configNode.toElement(); + TQDomElement e = configNode.toElement(); wifiDevice->setEssid(e.text()); } else if ( configNodeName == "key_type" ) { - QDomElement e = configNode.toElement(); + TQDomElement e = configNode.toElement(); wifiDevice->setKeyType(e.text()); } configNode = configNode.nextSibling(); @@ -631,8 +631,8 @@ KWirelessInterface * KNetworkConfigParser::getWirelessInterfaceInfo(QDomElement /** Parses all of the ... entries in the xml configuration file. Returns a KNetworkInterface object with all the info of the interface.*/ -KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(QDomElement interface, const QString &type){ - QDomNode node = interface.firstChild(); +KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(TQDomElement interface, const TQString &type){ + TQDomNode node = interface.firstChild(); KNetworkInterface *tempDevice = new KNetworkInterface(); //tempDevice->setDescription(i18n("Ethernet Network Device")); @@ -640,21 +640,21 @@ KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(QDomElement interface { if ( node.isElement() ) { - QString nodeName =node.nodeName(); + TQString nodeName =node.nodeName(); //Parsing --get interfaces configuration if ( node.isElement() && node.nodeName() == "configuration" ) { - QDomNode configNode = node.firstChild(); + TQDomNode configNode = node.firstChild(); while ( !configNode.isNull() ) { if ( configNode.isElement() ) { - QString configNodeName =configNode.nodeName(); + TQString configNodeName =configNode.nodeName(); if ( configNodeName == "auto" ) { - QDomElement e = configNode.toElement(); + TQDomElement e = configNode.toElement(); if (e.text() == "1") tempDevice->setOnBoot("yes"); else @@ -662,36 +662,36 @@ KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(QDomElement interface } else if ( configNodeName == "bootproto" ) { - QDomElement e = configNode.toElement(); + TQDomElement e = configNode.toElement(); tempDevice->setBootProto(e.text()); } if ( configNodeName == "address" || configNodeName == "addr") { - QDomElement e = configNode.toElement(); + TQDomElement e = configNode.toElement(); if (!e.text().isEmpty()) tempDevice->setIpAddress(e.text()); } else if ( configNodeName == "gateway") { - QDomElement e = configNode.toElement(); + TQDomElement e = configNode.toElement(); if (!e.text().isEmpty()) tempDevice->setGateway(e.text()); } else if ( configNodeName == "netmask" || configNodeName == "mask") { - QDomElement e = configNode.toElement(); + TQDomElement e = configNode.toElement(); if (!e.text().isEmpty()) tempDevice->setNetmask(e.text()); } else if ( configNodeName == "network" ) { - QDomElement e = configNode.toElement(); + TQDomElement e = configNode.toElement(); if (!e.text().isEmpty()) tempDevice->setNetwork(e.text()); } else if ( configNodeName == "broadcast" || configNodeName == "bdcast") { - QDomElement e = configNode.toElement(); + TQDomElement e = configNode.toElement(); if (!e.text().isEmpty()) tempDevice->setBroadcast(e.text()); } @@ -703,19 +703,19 @@ KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(QDomElement interface //Parse -d list_ifaces interfaces configuration if ( nodeName == "addr") { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); if (!e.text().isEmpty()) tempDevice->setIpAddress(e.text()); } else if ( nodeName == "mask") { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); if (!e.text().isEmpty()) tempDevice->setNetmask(e.text()); } else if ( nodeName == "bdcast") { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); if (!e.text().isEmpty()) tempDevice->setBroadcast(e.text()); } @@ -724,7 +724,7 @@ KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(QDomElement interface //These ones are common for both --get and -d list_ifaces else if ( nodeName == "dev" ) { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); tempDevice->setDeviceName(e.text()); } //we had to add the OR because the xml sintax when listing the interfaces @@ -732,7 +732,7 @@ KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(QDomElement interface //address->addr, etc... else if ( nodeName == "enabled" || nodeName == "active") { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); if (e.text() == "1") tempDevice->setActive(true); else @@ -740,17 +740,17 @@ KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(QDomElement interface } else if ( nodeName == "hwaddr" ) { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); if (!e.text().isEmpty()) tempDevice->setMacAddress(e.text()); } } node = node.nextSibling(); } - if (type != QString::null) + if (type != TQString::null) tempDevice->setType(type); - QString description; + TQString description; KSimpleConfig cfg("knetworkconfrc"); cfg.setGroup("Interfaces"); description = cfg.readEntry(tempDevice->getDeviceName()); @@ -778,26 +778,26 @@ KNetworkInterface * KNetworkConfigParser::getInterfaceInfo(QDomElement interface } /** Parses all of the ... entries in the xml configuration file. */ -KKnownHostInfo * KNetworkConfigParser::getStaticHostInfo(QDomElement host) +KKnownHostInfo * KNetworkConfigParser::getStaticHostInfo(TQDomElement host) { - QDomNode node = host.firstChild(); + TQDomNode node = host.firstChild(); KKnownHostInfo *tempHost = new KKnownHostInfo(); while ( !node.isNull() ) { if ( node.isElement() ) { - QString nodeName =node.nodeName(); + TQString nodeName =node.nodeName(); if ( nodeName == "ip") { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); if (!e.text().isEmpty()) tempHost->setIpAddress(e.text()); } else if ( nodeName == "alias") { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); if (!e.text().isEmpty()) tempHost->addAlias(e.text()); } @@ -811,7 +811,7 @@ KKnownHostInfo * KNetworkConfigParser::getStaticHostInfo(QDomElement host) /** Reads the xml with the network info. */ void KNetworkConfigParser::readNetworkInfo() { - QPtrList profilesList; + TQPtrList profilesList; //deviceList.clear(); //The gst backend puts a \n at the beginning of the xml output, so //we have to erase it first before we can parse it. @@ -822,15 +822,15 @@ void KNetworkConfigParser::readNetworkInfo() //user a dialog with all the supported platforms to choose. if (xmlErr.contains("platform_unsup::")) { - connect( this, SIGNAL(readyLoadingSupportedPlatforms()), this, SLOT(showSupportedPlatformsDialogSlot()) ); + connect( this, TQT_SIGNAL(readyLoadingSupportedPlatforms()), this, TQT_SLOT(showSupportedPlatformsDialogSlot()) ); loadSupportedPlatforms(); emit errorDetectingPlatform(); } else //parse the XML file { - QString err; + TQString err; int x,y; - QDomDocument doc( "network"); + TQDomDocument doc( "network"); if ( !doc.setContent( xmlOuput.utf8(),false,&err,&x,&y ) ) { KMessageBox::error(0, @@ -839,8 +839,8 @@ void KNetworkConfigParser::readNetworkInfo() // qDebug("error: %s %d,%d",err.latin1(),x,y); } - QDomElement root = doc.documentElement(); - QDomNode node = root.firstChild(); + TQDomElement root = doc.documentElement(); + TQDomNode node = root.firstChild(); //Load first the network information parseNetworkInfo(node, networkInfo, false); @@ -851,22 +851,22 @@ void KNetworkConfigParser::readNetworkInfo() { if ( node.isElement()) { - QString nodeName = node.nodeName(); + TQString nodeName = node.nodeName(); if ( nodeName == "profiledb" ) { - QDomNode profileNode = node.firstChild(); + TQDomNode profileNode = node.firstChild(); while( !profileNode.isNull() ) { if ( profileNode.isElement()) { - QString profileName = profileNode.nodeName(); + TQString profileName = profileNode.nodeName(); if (profileNode.isElement() && profileName == "profile") { KNetworkInfo * networkProfile = new KNetworkInfo(); - QDomNode profileConfigurationNode = profileNode.firstChild(); + TQDomNode profileConfigurationNode = profileNode.firstChild(); parseNetworkInfo(profileConfigurationNode, networkProfile, true); profilesList.append(networkProfile); } @@ -881,44 +881,44 @@ void KNetworkConfigParser::readNetworkInfo() } } -void KNetworkConfigParser::parseNetworkInfo(QDomNode node, KNetworkInfo *_networkInfo, bool isProfile){ - QPtrList deviceList; +void KNetworkConfigParser::parseNetworkInfo(TQDomNode node, KNetworkInfo *_networkInfo, bool isProfile){ + TQPtrList deviceList; KDNSInfo *_dnsInfo = new KDNSInfo(); KRoutingInfo *_routingInfo = new KRoutingInfo(); - QStringList serverList; - QPtrList tempDeviceList; - QPtrList knownHostsList; + TQStringList serverList; + TQPtrList tempDeviceList; + TQPtrList knownHostsList; while( !node.isNull() ) { if ( node.isElement()) { - QString nodeName = node.nodeName(); + TQString nodeName = node.nodeName(); //Get the gatway if ( nodeName == "gateway" ) { - QDomElement gateway = node.toElement(); + TQDomElement gateway = node.toElement(); _routingInfo->setGateway(gateway.text()); } else if ( nodeName == "gatewaydev" ) { - QDomElement gatewaydev = node.toElement(); + TQDomElement gatewaydev = node.toElement(); _routingInfo->setGatewayDevice(gatewaydev.text()); } //The name of the profile, in the case it's a profile ;) else if ( nodeName == "name" && isProfile) { - QDomElement profileName = node.toElement(); + TQDomElement profileName = node.toElement(); _networkInfo->setProfileName(profileName.text()); } //Get the network interfaces else if ( nodeName == "interface" ) { - QDomElement interface = node.toElement(); + TQDomElement interface = node.toElement(); - QString attr = interface.attribute("type").lower(); + TQString attr = interface.attribute("type").lower(); //We have hardcoded to load only the supported interface types, //for now, ethernet, loopback and wireless, thus loopback interfaces //aren't shown. @@ -939,26 +939,26 @@ void KNetworkConfigParser::parseNetworkInfo(QDomNode node, KNetworkInfo *_networ //Get domain and host names else if ( nodeName == "hostname" ) { - QDomElement hostname = node.toElement(); + TQDomElement hostname = node.toElement(); _dnsInfo->setMachineName(hostname.text()); } else if ( nodeName == "domain" ) { - QDomElement domainname = node.toElement(); + TQDomElement domainname = node.toElement(); _dnsInfo->setDomainName(domainname.text()); } //Get the nameServers else if ( nodeName == "nameserver" ) { - QDomElement nameserver = node.toElement(); + TQDomElement nameserver = node.toElement(); serverList.append(nameserver.text()); } //Get the static hosts else if ( nodeName == "statichost" ) { - QDomElement host = node.toElement(); + TQDomElement host = node.toElement(); KKnownHostInfo *tempHost = getStaticHostInfo(host); knownHostsList.append(tempHost); } @@ -982,7 +982,7 @@ void KNetworkConfigParser::parseNetworkInfo(QDomNode node, KNetworkInfo *_networ //return _networkInfo; } void KNetworkConfigParser::readFromStdoutReloadScript(){ - QString s = procReloadNetwork->readStdout(); + TQString s = procReloadNetwork->readStdout(); reloadScriptOutput.append(s); } /** emits a signal when the network changes have benn saved. */ @@ -990,7 +990,7 @@ void KNetworkConfigParser::sendNetworkInfoSavedSignalSlot(){ procSaveNetworkInfo->closeStdin(); } -/** Concatenates into a QString the xml output of the network backend. */ +/** Concatenates into a TQString the xml output of the network backend. */ void KNetworkConfigParser::concatXMLOutputSlot(){ xmlOuput.append(procDetect->readStdout()); } @@ -1000,14 +1000,14 @@ void KNetworkConfigParser::readXMLErrSlot(){ } /** lists all platforms supported by GST. */ void KNetworkConfigParser::loadSupportedPlatforms(){ - procDetect = new QProcess(this); + procDetect = new TQProcess(this); procDetect->addArgument( locate("data",BACKEND_PATH) ); procDetect->addArgument( "-d" ); procDetect->addArgument( "platforms" ); - connect( procDetect, SIGNAL(processExited()), this, SLOT(readSupportedPlatformsSlot()) ); + connect( procDetect, TQT_SIGNAL(processExited()), this, TQT_SLOT(readSupportedPlatformsSlot()) ); xmlOuput = ""; - connect( procDetect, SIGNAL(readyReadStdout()),this, SLOT(concatXMLOutputSlot())); -// connect( procDetect, SIGNAL(readyReadStderr()),this, SLOT(readXMLErrSlot())); + connect( procDetect, TQT_SIGNAL(readyReadStdout()),this, TQT_SLOT(concatXMLOutputSlot())); +// connect( procDetect, TQT_SIGNAL(readyReadStderr()),this, TQT_SLOT(readXMLErrSlot())); if ( !procDetect->start() ) { @@ -1023,21 +1023,21 @@ void KNetworkConfigParser::readSupportedPlatformsSlot(){ //The gst backend puts a \n at the beginning of the xml output, so //we have to erase it first before we parse it. xmlOuput = xmlOuput.section('\n',1); - QDomDocument doc( "platforms" ); + TQDomDocument doc( "platforms" ); if ( !doc.setContent( xmlOuput.utf8() ) ) { KMessageBox::error(0, i18n("Could not parse the list of supported platforms from the network configuration backend."), i18n("Error Obtaining Supported Platforms List")); } - QDomElement root = doc.documentElement(); - QDomNode node = root.firstChild(); - QString s; + TQDomElement root = doc.documentElement(); + TQDomNode node = root.firstChild(); + TQString s; while( !node.isNull() ) { if ( node.isElement() && node.nodeName() == "platform" ) { - QDomElement platform = node.toElement(); + TQDomElement platform = node.toElement(); s = getPlatformInfo(platform); } supportedPlatformsList << s; @@ -1046,22 +1046,22 @@ void KNetworkConfigParser::readSupportedPlatformsSlot(){ emit readyLoadingSupportedPlatforms(); } /** Returns the info of a platform in the form of 'key:value' . */ -QString KNetworkConfigParser::getPlatformInfo(QDomElement platform){ - QDomNode node = platform.firstChild(); - QString s; +TQString KNetworkConfigParser::getPlatformInfo(TQDomElement platform){ + TQDomNode node = platform.firstChild(); + TQString s; while ( !node.isNull() ) { if ( node.isElement() ) { if ( node.nodeName() == "key" ) { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); s += e.text(); s += ":"; } else if ( node.nodeName() == "name" ) { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); s += e.text(); } @@ -1075,100 +1075,100 @@ QString KNetworkConfigParser::getPlatformInfo(QDomElement platform){ void KNetworkConfigParser::showSupportedPlatformsDialogSlot(){ KSelectDistroDlg* dialog = new KSelectDistroDlg(0, 0); - for ( QStringList::Iterator it = supportedPlatformsList.begin(); it != supportedPlatformsList.end(); ++it ) + for ( TQStringList::Iterator it = supportedPlatformsList.begin(); it != supportedPlatformsList.end(); ++it ) { - QString key = (*it); + TQString key = (*it); key = key.section(":",0,0); - QString name = (*it); + TQString name = (*it); name = name.section(":",1,1); if (key.contains("debian")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/debian.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/debian.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("mandriva")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/mandriva.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/mandriva.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("conectiva")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/conectiva.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/conectiva.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("pld")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/pld.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/pld.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("redhat")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/redhat.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/redhat.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("suse")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/suse.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/suse.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("turbolinux")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/turbolinux.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/turbolinux.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("fedora")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/fedora.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/fedora.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("openna")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/openna.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/openna.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("slackware")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/slackware.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/slackware.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("freebsd")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/freebsd.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/freebsd.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("gentoo")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/gentoo.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/gentoo.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("blackpanther")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/blackpanther.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/blackpanther.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("rpath")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/rpath.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/rpath.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("vine")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/vine.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/vine.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("ubuntu")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/kubuntu.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/kubuntu.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("yoper")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/yoper.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/yoper.png")); dialog->klbDistroList->insertItem(distroImg, name); } else if (key.contains("ark")) { - QPixmap distroImg(locate("data","knetworkconf/pixmaps/ark.png")); + TQPixmap distroImg(locate("data","knetworkconf/pixmaps/ark.png")); dialog->klbDistroList->insertItem(distroImg, name); } } @@ -1178,13 +1178,13 @@ void KNetworkConfigParser::showSupportedPlatformsDialogSlot(){ else { int i = 0; - QStringList::Iterator it = supportedPlatformsList.begin(); + TQStringList::Iterator it = supportedPlatformsList.begin(); while (i < dialog->klbDistroList->currentItem()) { i++; ++it; } - QString key = (*it); + TQString key = (*it); key = key.section(":",0,0); //clean variables and run again the detection script but now don't //auto-detect. @@ -1197,7 +1197,7 @@ void KNetworkConfigParser::showSupportedPlatformsDialogSlot(){ } } -void KNetworkConfigParser::saveAskAgain(const QString &platform, bool askAgain) +void KNetworkConfigParser::saveAskAgain(const TQString &platform, bool askAgain) { KSimpleConfig cfg("knetworkconfrc"); cfg.setGroup("General"); @@ -1206,7 +1206,7 @@ void KNetworkConfigParser::saveAskAgain(const QString &platform, bool askAgain) cfg.sync(); } -bool KNetworkConfigParser::readAskAgain(QString &platform) +bool KNetworkConfigParser::readAskAgain(TQString &platform) { KSimpleConfig cfg("knetworkconfrc"); cfg.setGroup("General"); @@ -1223,9 +1223,9 @@ void KNetworkConfigParser::listIfacesSlot(){ listIfaces(networkInfo->getPlatformName()); } /**Returns the info of the network device 'device or NULL if not found.'*/ -KNetworkInterface * KNetworkConfigParser::getDeviceInfo(QString device){ - QPtrList deviceList = networkInfo->getDeviceList(); - QPtrListIterator i(deviceList); +KNetworkInterface * KNetworkConfigParser::getDeviceInfo(TQString device){ + TQPtrList deviceList = networkInfo->getDeviceList(); + TQPtrListIterator i(deviceList); KNetworkInterface *temp; while ((temp = i.current()) != 0) { diff --git a/knetworkconf/knetworkconf/knetworkconfigparser.h b/knetworkconf/knetworkconf/knetworkconfigparser.h index 0c2254e..f0af15f 100644 --- a/knetworkconf/knetworkconf/knetworkconfigparser.h +++ b/knetworkconf/knetworkconf/knetworkconfigparser.h @@ -33,14 +33,14 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -57,14 +57,14 @@ *@author Juan Luis Baptiste */ -class KNetworkConfigParser : public QObject { +class KNetworkConfigParser : public TQObject { Q_OBJECT public: KNetworkConfigParser(); ~KNetworkConfigParser(); /** return tyhe number of configured devices. */ unsigned numDevices(); - void setProgramVersion(QString ver); + void setProgramVersion(TQString ver); /** Reads /proc/net/route looking for the default gateway. */ void loadRoutingInfo(KRoutingInfo *routingInfo); /** Saves the new network configuration. */ @@ -72,28 +72,28 @@ class KNetworkConfigParser : public QObject { /** Loads the network info from a xml file generated by the gnome system tools network backends that are included with this app. */ KNetworkInfo * getNetworkInfo(); - QProcess * proc; - QProcess * procDetect; - QProcess * procSaveNetworkInfo; + TQProcess * proc; + TQProcess * procDetect; + TQProcess * procSaveNetworkInfo; /** Variable to know if there is an dhcp device configured, so we can know if we need to save the defauilt gw info or not. */ bool dhcpDevice; - KNetworkInterface * getDeviceInfo(QString device); + KNetworkInterface * getDeviceInfo(TQString device); public slots: /** runs gst to find out the state of network devices.It runs the command: $knetworkconf_home/backends/networkconf [--platform platform] -d list_ifaces */ - void listIfaces(const QString &platform); + void listIfaces(const TQString &platform); private slots: /** Runs the gst backend to get network values. You can pass to the script a specific platform to load using the platform parameter. */ - void runDetectionScript(QString platform); + void runDetectionScript(TQString platform); void readIfconfigOutput(); void readNetworkInfo(); void readFromStdoutReloadScript(); /** emits a signal when the network changes have benn saved. */ void sendNetworkInfoSavedSignalSlot(); - /** Concatenates into a QString the xml output of the network backend. */ + /** Concatenates into a TQString the xml output of the network backend. */ void concatXMLOutputSlot(); void readXMLErrSlot(); /** Shows the dialog with all the supported platforms by GST. */ @@ -109,56 +109,56 @@ class KNetworkConfigParser : public QObject { void processExitedSlot(); private: - //QPtrList deviceList; - QPtrList tempList; + //TQPtrList deviceList; + TQPtrList tempList; KNetworkInterface *newDevice; bool isUp; /** Counts the number of configured devices that had been found. */ unsigned _numDevices; KRoutingInfo *routingInfo; KDNSInfo *dnsInfo; - QString programVersion; + TQString programVersion; /** The output of ifconfig command that needs to be parsed in readIfconfigOutput()*/ - QString ifconfigOutput; + TQString ifconfigOutput; KNetworkInfo * networkInfo; - QPtrList knownHostsList; - QString hexIPv4ToDecIPv4(const QString &hex); + TQPtrList knownHostsList; + TQString hexIPv4ToDecIPv4(const TQString &hex); /** lists all platforms supported by GST. */ void loadSupportedPlatforms(); /** Returns the info of a platform in the form of 'key:value' . */ - QString getPlatformInfo(QDomElement platform); + TQString getPlatformInfo(TQDomElement platform); /** save process is running */ bool processRunning; /** Shows a progress dialog while the networl is being reloaded. */ KInterfaceUpDownDlg * kpdReloadStatusDlg; - QProcess *procReloadNetwork; - QString reloadScriptOutput; + TQProcess *procReloadNetwork; + TQString reloadScriptOutput; /** Contains the network configuration en xml format. */ /** List of supported platforms. */ - QStringList supportedPlatformsList; - QString xmlOuput; - QString xmlErr; + TQStringList supportedPlatformsList; + TQString xmlOuput; + TQString xmlErr; /** Temporal device list to be used when loading the dhcp devices info */ - QPtrList tempDevList; + TQPtrList tempDevList; /** Parses all of the ... entries in the xml configuration file. */ - KKnownHostInfo * getStaticHostInfo(QDomElement host); + KKnownHostInfo * getStaticHostInfo(TQDomElement host); /** Saves the option to show again or not the platform using KSimpleConfig*/ - void saveAskAgain(const QString &platform, bool askAgain); + void saveAskAgain(const TQString &platform, bool askAgain); /**Returns if the show platform should be shown again or not and the saved platform*/ - bool readAskAgain(QString &platform); - void parseNetworkInfo(QDomNode node, KNetworkInfo *networkInfo, bool isProfile); - void addRoutingInfoToXMLDoc(QDomDocument *doc, QDomNode *root, KRoutingInfo *routingInfo); - void addDNSInfoToXMLDoc(QDomDocument *doc, QDomNode *root, KDNSInfo *dnsInfo); - void addNetworkInterfacesToXMLDoc(QDomDocument *doc, QDomNode *root, QPtrList devList); - void addNetworkProfilesToXMLDoc(QDomDocument *doc, QDomNode *root, QPtrList profileList); + bool readAskAgain(TQString &platform); + void parseNetworkInfo(TQDomNode node, KNetworkInfo *networkInfo, bool isProfile); + void addRoutingInfoToXMLDoc(TQDomDocument *doc, TQDomNode *root, KRoutingInfo *routingInfo); + void addDNSInfoToXMLDoc(TQDomDocument *doc, TQDomNode *root, KDNSInfo *dnsInfo); + void addNetworkInterfacesToXMLDoc(TQDomDocument *doc, TQDomNode *root, TQPtrList devList); + void addNetworkProfilesToXMLDoc(TQDomDocument *doc, TQDomNode *root, TQPtrList profileList); protected: // Protected methods /** Parses all of the ... entries in the xml configuration file. */ - virtual KNetworkInterface *getInterfaceInfo(QDomElement interface, const QString &type); + virtual KNetworkInterface *getInterfaceInfo(TQDomElement interface, const TQString &type); /** Parses all of the ... entries in the xml configuration file. Returns a KWirelessInterface object that contains all the info of the wireless interface. */ - virtual KWirelessInterface *getWirelessInterfaceInfo(QDomElement interface, const QString &type); + virtual KWirelessInterface *getWirelessInterfaceInfo(TQDomElement interface, const TQString &type); signals: // Signals /** emmited when the xml file is finished reading. */ diff --git a/knetworkconf/knetworkconf/knetworkconfmodule.cpp b/knetworkconf/knetworkconf/knetworkconfmodule.cpp index 03b8554..3f67b0c 100644 --- a/knetworkconf/knetworkconf/knetworkconfmodule.cpp +++ b/knetworkconf/knetworkconf/knetworkconfmodule.cpp @@ -17,19 +17,19 @@ #include #include -#include +#include #include #include "knetworkconfmodule.h" -KNetworkConfModule::KNetworkConfModule(QWidget* parent, const char *name/*, QStringList list*/) +KNetworkConfModule::KNetworkConfModule(TQWidget* parent, const char *name/*, TQStringList list*/) : KCModule(parent,name) { - QVBoxLayout *top = new QVBoxLayout(this); + TQVBoxLayout *top = new TQVBoxLayout(this); conf = new KNetworkConf(this); - conf->setVersion(QString(VERSION)); + conf->setVersion(TQString(VERSION)); conf->setReadOnly(false); top->addWidget(conf); @@ -39,7 +39,7 @@ KNetworkConfModule::KNetworkConfModule(QWidget* parent, const char *name/*, QStr conf->setReadOnly(true); } - connect(conf,SIGNAL(networkStateChanged(bool)),SLOT(configChanged(bool))); + connect(conf,TQT_SIGNAL(networkStateChanged(bool)),TQT_SLOT(configChanged(bool))); setButtons(KCModule::Apply|KCModule::Help); } @@ -74,7 +74,7 @@ bool KNetworkConfModule::useRootOnlyMsg() const return true; } -QString KNetworkConfModule::rootOnlyMsg() const +TQString KNetworkConfModule::rootOnlyMsg() const { return "Changing the network configuration requires root access"; } @@ -108,7 +108,7 @@ KAboutData *aboutData = new KAboutData( "knetworkconf", I18N_NOOP("KNetworkConf" return aboutData;// Memory leak, oh well... } -QString KNetworkConfModule::quickHelp() const +TQString KNetworkConfModule::quickHelp() const { return i18n("%1Network configuration%2This module allows you to configure your TCP/IP settings.%3").arg("

").arg("

").arg("

"); } diff --git a/knetworkconf/knetworkconf/knetworkconfmodule.h b/knetworkconf/knetworkconf/knetworkconfmodule.h index 424dc94..6dedaed 100644 --- a/knetworkconf/knetworkconf/knetworkconfmodule.h +++ b/knetworkconf/knetworkconf/knetworkconfmodule.h @@ -27,7 +27,7 @@ class KNetworkConfModule : public KCModule Q_OBJECT public: - KNetworkConfModule(QWidget* parent, const char *name/*, QStringList list*/); + KNetworkConfModule(TQWidget* parent, const char *name/*, TQStringList list*/); ~KNetworkConfModule(); void load(); @@ -35,9 +35,9 @@ public: int buttons(); bool useRootOnlyMsg() const; - QString rootOnlyMsg() const; + TQString rootOnlyMsg() const; KAboutData* aboutData() const; - QString quickHelp() const; + TQString quickHelp() const; private slots: void configChanged(bool); diff --git a/knetworkconf/knetworkconf/knetworkinfo.cpp b/knetworkconf/knetworkconf/knetworkinfo.cpp index 182bc14..ccbf511 100644 --- a/knetworkconf/knetworkconf/knetworkinfo.cpp +++ b/knetworkconf/knetworkconf/knetworkinfo.cpp @@ -21,7 +21,7 @@ KNetworkInfo::KNetworkInfo(){ } KNetworkInfo::~KNetworkInfo(){ } -void KNetworkInfo::setDeviceList(QPtrList deviceList){ +void KNetworkInfo::setDeviceList(TQPtrList deviceList){ KNetworkInfo::deviceList = deviceList; } void KNetworkInfo::setRoutingInfo(KRoutingInfo *routingInfo){ @@ -31,7 +31,7 @@ void KNetworkInfo::setDNSInfo(KDNSInfo *dnsInfo){ KNetworkInfo::dnsInfo = dnsInfo; } -QPtrList KNetworkInfo::getDeviceList(){ +TQPtrList KNetworkInfo::getDeviceList(){ return deviceList; } KRoutingInfo * KNetworkInfo::getRoutingInfo(){ @@ -41,35 +41,35 @@ KDNSInfo * KNetworkInfo::getDNSInfo(){ return dnsInfo; } -void KNetworkInfo::setNetworkScript(QString script){ +void KNetworkInfo::setNetworkScript(TQString script){ KNetworkInfo::networkScript = script; } -QString KNetworkInfo::getNetworkScript(){ +TQString KNetworkInfo::getNetworkScript(){ return networkScript; } /** Returns the platform name KnetworkConf is running on. */ -QString KNetworkInfo::getPlatformName(){ +TQString KNetworkInfo::getPlatformName(){ return platformName; } /** Sets the platform name KNetworkConf is running on. */ -void KNetworkInfo::setPlatformName(QString name){ +void KNetworkInfo::setPlatformName(TQString name){ KNetworkInfo::platformName = name; } -void KNetworkInfo::setProfilesList(QPtrList profilesList){ +void KNetworkInfo::setProfilesList(TQPtrList profilesList){ KNetworkInfo::profilesList = profilesList; } -QPtrList KNetworkInfo::getProfilesList(){ +TQPtrList KNetworkInfo::getProfilesList(){ return profilesList; } /** Returns the platform name KnetworkConf is running on. */ -QString KNetworkInfo::getProfileName(){ +TQString KNetworkInfo::getProfileName(){ return profileName; } /** Sets the platform name KNetworkConf is running on. */ -void KNetworkInfo::setProfileName(QString profileName){ +void KNetworkInfo::setProfileName(TQString profileName){ KNetworkInfo::profileName = profileName; } diff --git a/knetworkconf/knetworkconf/knetworkinfo.h b/knetworkconf/knetworkconf/knetworkinfo.h index 7ae8b25..59c3dc0 100644 --- a/knetworkconf/knetworkconf/knetworkinfo.h +++ b/knetworkconf/knetworkconf/knetworkinfo.h @@ -18,8 +18,8 @@ #ifndef KNETWORKINFO_H #define KNETWORKINFO_H -#include -#include +#include +#include #include "knetworkinterface.h" #include "kwirelessinterface.h" #include "kaddressvalidator.h" @@ -35,34 +35,34 @@ class KNetworkInfo { KNetworkInfo(); ~KNetworkInfo(); private: // Private attributes - QPtrList deviceList; + TQPtrList deviceList; KRoutingInfo *routingInfo; /** Path to the network script that permits starting/stopping/reloading the network. */ - QString networkScript; + TQString networkScript; KDNSInfo *dnsInfo; /** Platform name. */ - QString platformName; - QPtrList profilesList; - QString profileName; + TQString platformName; + TQPtrList profilesList; + TQString profileName; public: // Public attributes - void setDeviceList(QPtrList deviceList); + void setDeviceList(TQPtrList deviceList); void setRoutingInfo(KRoutingInfo *routingInfo); void setDNSInfo(KDNSInfo *dnsInfo); - QPtrList getDeviceList(); + TQPtrList getDeviceList(); KRoutingInfo *getRoutingInfo(); KDNSInfo *getDNSInfo(); - QString getNetworkScript(); - void setNetworkScript(QString script); + TQString getNetworkScript(); + void setNetworkScript(TQString script); /** Returns the platform name KnetworkConf is running on. */ - QString getPlatformName(); + TQString getPlatformName(); /** Sets the platform name KNetworkConf is running on. */ - void setPlatformName(QString name); - void setProfilesList(QPtrList profilesList); - QPtrList getProfilesList(); - void setProfileName(QString profileName); - QString getProfileName(); + void setPlatformName(TQString name); + void setProfilesList(TQPtrList profilesList); + TQPtrList getProfilesList(); + void setProfileName(TQString profileName); + TQString getProfileName(); }; #endif diff --git a/knetworkconf/knetworkconf/knetworkinterface.cpp b/knetworkconf/knetworkconf/knetworkinterface.cpp index 4e48c27..0a7fad5 100644 --- a/knetworkconf/knetworkconf/knetworkinterface.cpp +++ b/knetworkconf/knetworkconf/knetworkinterface.cpp @@ -22,53 +22,53 @@ KNetworkInterface::KNetworkInterface(){ KNetworkInterface::~KNetworkInterface(){ } -QString KNetworkInterface::getBootProto(){ +TQString KNetworkInterface::getBootProto(){ return bootProto; } -QString KNetworkInterface::getBroadcast(){ +TQString KNetworkInterface::getBroadcast(){ return broadcast; } -QString KNetworkInterface::getDeviceName(){ +TQString KNetworkInterface::getDeviceName(){ return deviceName; } -QString KNetworkInterface::getIpAddress(){ +TQString KNetworkInterface::getIpAddress(){ return ipAddress; } -QString KNetworkInterface::getNetmask(){ +TQString KNetworkInterface::getNetmask(){ return netmask; } -QString KNetworkInterface::getNetwork(){ +TQString KNetworkInterface::getNetwork(){ return network; } -QString KNetworkInterface::getOnBoot(){ +TQString KNetworkInterface::getOnBoot(){ return onBoot; } -QString KNetworkInterface::getGateway(){ +TQString KNetworkInterface::getGateway(){ return gateway; } -void KNetworkInterface::setBootProto(const QString &bootProto){ +void KNetworkInterface::setBootProto(const TQString &bootProto){ KNetworkInterface::bootProto = bootProto; } -void KNetworkInterface::setBroadcast(const QString &broadcast){ +void KNetworkInterface::setBroadcast(const TQString &broadcast){ KNetworkInterface::broadcast = broadcast; } -void KNetworkInterface::setDeviceName(const QString &deviceName){ +void KNetworkInterface::setDeviceName(const TQString &deviceName){ KNetworkInterface::deviceName = deviceName; } -void KNetworkInterface::setIpAddress(const QString &ipAddress){ +void KNetworkInterface::setIpAddress(const TQString &ipAddress){ KNetworkInterface::ipAddress = ipAddress; } -void KNetworkInterface::setNetmask(const QString &netmask){ +void KNetworkInterface::setNetmask(const TQString &netmask){ KNetworkInterface::netmask = netmask; } -void KNetworkInterface::setNetwork(const QString &network){ +void KNetworkInterface::setNetwork(const TQString &network){ KNetworkInterface::network = network; } -void KNetworkInterface::setOnBoot(const QString &onBoot){ +void KNetworkInterface::setOnBoot(const TQString &onBoot){ KNetworkInterface::onBoot = onBoot; } -void KNetworkInterface::setGateway(const QString &gateway){ +void KNetworkInterface::setGateway(const TQString &gateway){ KNetworkInterface::gateway = gateway; } bool KNetworkInterface::isActive(){ @@ -78,27 +78,27 @@ void KNetworkInterface::setActive(bool active){ KNetworkInterface::active = active; } /** No descriptions */ -QString KNetworkInterface::getMacAddress(){ +TQString KNetworkInterface::getMacAddress(){ return hwAddress; } /** No descriptions */ -void KNetworkInterface::setMacAddress(const QString &addr){ +void KNetworkInterface::setMacAddress(const TQString &addr){ KNetworkInterface::hwAddress = addr; } /** No descriptions */ -QString KNetworkInterface::getDescription(){ +TQString KNetworkInterface::getDescription(){ return description; } /** No descriptions */ -void KNetworkInterface::setDescription(const QString &desc){ +void KNetworkInterface::setDescription(const TQString &desc){ KNetworkInterface::description = desc; } /** No descriptions */ -QString KNetworkInterface::getType(){ +TQString KNetworkInterface::getType(){ return type; } /** No descriptions */ -void KNetworkInterface::setType(const QString &type){ +void KNetworkInterface::setType(const TQString &type){ KNetworkInterface::type = type; } diff --git a/knetworkconf/knetworkconf/knetworkinterface.h b/knetworkconf/knetworkconf/knetworkinterface.h index 859afc6..65ccfc0 100644 --- a/knetworkconf/knetworkconf/knetworkinterface.h +++ b/knetworkconf/knetworkconf/knetworkinterface.h @@ -18,7 +18,7 @@ #ifndef KNETWORKINTERFACE_H #define KNETWORKINTERFACE_H -#include +#include /**This class has all the values associated with a network interface. *@author Juan Luis Baptiste @@ -29,55 +29,55 @@ class KNetworkInterface { KNetworkInterface(); ~KNetworkInterface(); - QString getBootProto(); - QString getBroadcast(); - QString getDeviceName(); - QString getIpAddress(); - QString getNetmask(); - QString getNetwork(); - QString getOnBoot(); - QString getGateway(); - void setBootProto(const QString &bootProto); - void setBroadcast(const QString &broadcast); - void setDeviceName(const QString &deviceName); - void setIpAddress(const QString &ipAddress); - void setNetmask(const QString &netmask); - void setNetwork(const QString &network); - void setOnBoot(const QString &onBoot); - void setGateway(const QString &gateway); + TQString getBootProto(); + TQString getBroadcast(); + TQString getDeviceName(); + TQString getIpAddress(); + TQString getNetmask(); + TQString getNetwork(); + TQString getOnBoot(); + TQString getGateway(); + void setBootProto(const TQString &bootProto); + void setBroadcast(const TQString &broadcast); + void setDeviceName(const TQString &deviceName); + void setIpAddress(const TQString &ipAddress); + void setNetmask(const TQString &netmask); + void setNetwork(const TQString &network); + void setOnBoot(const TQString &onBoot); + void setGateway(const TQString &gateway); bool isActive(); void setActive(bool active); - void setMacAddress(const QString &addr); - QString getMacAddress(); - void setDescription(const QString &desc); - QString getDescription(); - void setType(const QString &type); - QString getType(); + void setMacAddress(const TQString &addr); + TQString getMacAddress(); + void setDescription(const TQString &desc); + TQString getDescription(); + void setType(const TQString &type); + TQString getType(); private: // Private attributes /** Interface name (i.e. eth0, eth1, etc). */ - QString deviceName; + TQString deviceName; /** Boot protocol of the device (static, dhcp). */ - QString bootProto; + TQString bootProto; /** IPv4 address of the interface. */ - QString ipAddress; + TQString ipAddress; /** The Netmask. */ - QString netmask; + TQString netmask; /** The network. */ - QString network; + TQString network; /** The broadcast. */ - QString broadcast; + TQString broadcast; /** thetermines if this device is configured at boot time. */ - QString onBoot; + TQString onBoot; /** default gateway for this device. */ - QString gateway; + TQString gateway; bool active; /** The MAC address. */ - QString hwAddress; + TQString hwAddress; /** A little description about the network device. */ - QString description; + TQString description; /** Type of interface (ethernet,wireless,loopback or modem)*/ - QString type; + TQString type; }; #endif diff --git a/knetworkconf/knetworkconf/kprofileslistviewtooltip.h b/knetworkconf/knetworkconf/kprofileslistviewtooltip.h index c0c6bce..ec65c68 100644 --- a/knetworkconf/knetworkconf/kprofileslistviewtooltip.h +++ b/knetworkconf/knetworkconf/kprofileslistviewtooltip.h @@ -17,10 +17,10 @@ #ifndef KPROFILESLISTVIEWTOOLTIP_H #define KPROFILESLISTVIEWTOOLTIP_H -#include -#include -#include -#include +#include +#include +#include +#include #include "knetworkinfo.h" #include "knetworkconfigparser.h" @@ -28,39 +28,39 @@ class KProfilesListViewToolTip : public QToolTip { public: - KProfilesListViewToolTip(QListView* parent); - void setProfiles(QPtrList profiles_); + KProfilesListViewToolTip(TQListView* parent); + void setProfiles(TQPtrList profiles_); ~KProfilesListViewToolTip(); protected: - void maybeTip( const QPoint& p ); - KNetworkInfo *getProfile(QPtrList profilesList, QString selectedProfile); + void maybeTip( const TQPoint& p ); + KNetworkInfo *getProfile(TQPtrList profilesList, TQString selectedProfile); private: - QListView* listView; + TQListView* listView; //KNetworkConf* conf; - QPtrList profiles; + TQPtrList profiles; }; -inline void KProfilesListViewToolTip::setProfiles(QPtrList profiles_) +inline void KProfilesListViewToolTip::setProfiles(TQPtrList profiles_) { profiles = profiles_; } -inline KProfilesListViewToolTip::KProfilesListViewToolTip( QListView* parent ):QToolTip( parent->viewport() ), listView( parent ) {} +inline KProfilesListViewToolTip::KProfilesListViewToolTip( TQListView* parent ):TQToolTip( parent->viewport() ), listView( parent ) {} -inline void KProfilesListViewToolTip::maybeTip( const QPoint& p ) +inline void KProfilesListViewToolTip::maybeTip( const TQPoint& p ) { if ( !listView ) return; - const QListViewItem* item = listView->itemAt( p ); + const TQListViewItem* item = listView->itemAt( p ); if ( !item ) return; - const QRect itemRect = listView->itemRect( item ); + const TQRect itemRect = listView->itemRect( item ); if ( !itemRect.isValid() ) return; @@ -70,22 +70,22 @@ inline void KProfilesListViewToolTip::maybeTip( const QPoint& p ) if ( col == -1 ) return; - const QRect headerRect = listView->header()->sectionRect( col ); + const TQRect headerRect = listView->header()->sectionRect( col ); if ( !headerRect.isValid() ) return; - const QRect cellRect( headerRect.left(), itemRect.top(),headerRect.width() + 60, itemRect.height() ); + const TQRect cellRect( headerRect.left(), itemRect.top(),headerRect.width() + 60, itemRect.height() ); - QString tipStr; + TQString tipStr; if( col == 0 ) { - tipStr = QString(i18n("Network Configuration of this Profile:" )); + tipStr = TQString(i18n("Network Configuration of this Profile:" )); KNetworkInfo *profile = getProfile(profiles,item->text(0)); if (profile != NULL) { - QPtrList devices = profile->getDeviceList(); + TQPtrList devices = profile->getDeviceList(); KNetworkInterface *device = NULL; for (device = devices.first(); device; device = devices.next()) { @@ -93,7 +93,7 @@ inline void KProfilesListViewToolTip::maybeTip( const QPoint& p ) { tipStr.append(i18n("

Interface: %1").arg(device->getDeviceName().latin1())); tipStr.append(i18n("
Type: %1").arg(device->getType())); - QString bootProto; + TQString bootProto; if (device->getBootProto() == "none") bootProto = "Manual"; else @@ -112,8 +112,8 @@ inline void KProfilesListViewToolTip::maybeTip( const QPoint& p ) KDNSInfo *dns = profile->getDNSInfo(); tipStr.append(i18n("
Domain Name: %1").arg(dns->getDomainName())); tipStr.append(i18n("
Machine Name: %1").arg(dns->getMachineName())); - QStringList nameServers = dns->getNameServers(); - for ( QStringList::Iterator it = nameServers.begin(); it != nameServers.end(); ++it) + TQStringList nameServers = dns->getNameServers(); + for ( TQStringList::Iterator it = nameServers.begin(); it != nameServers.end(); ++it) { tipStr.append(i18n("
DNS Name Server: %1").arg((*it))); } @@ -122,9 +122,9 @@ inline void KProfilesListViewToolTip::maybeTip( const QPoint& p ) tip( cellRect, tipStr ); } -inline KNetworkInfo *KProfilesListViewToolTip::getProfile(QPtrList profilesList, QString selectedProfile) +inline KNetworkInfo *KProfilesListViewToolTip::getProfile(TQPtrList profilesList, TQString selectedProfile) { - QPtrListIterator it(profilesList); + TQPtrListIterator it(profilesList); KNetworkInfo *net = NULL; while ((net = it.current()) != 0) diff --git a/knetworkconf/knetworkconf/kroutinginfo.cpp b/knetworkconf/knetworkconf/kroutinginfo.cpp index ebf8380..9695fa0 100644 --- a/knetworkconf/knetworkconf/kroutinginfo.cpp +++ b/knetworkconf/knetworkconf/kroutinginfo.cpp @@ -21,40 +21,40 @@ KRoutingInfo::KRoutingInfo(){ } KRoutingInfo::~KRoutingInfo(){ } -QString KRoutingInfo::isNetworkingEnabled(){ +TQString KRoutingInfo::isNetworkingEnabled(){ return networking; } -QString KRoutingInfo::isForwardIPv4Enabled(){ +TQString KRoutingInfo::isForwardIPv4Enabled(){ return forwardIPv4; } -QString KRoutingInfo::getHostName(){ +TQString KRoutingInfo::getHostName(){ return hostName; } -QString KRoutingInfo::getDomainName(){ +TQString KRoutingInfo::getDomainName(){ return domainName; } -QString KRoutingInfo::getGateway(){ +TQString KRoutingInfo::getGateway(){ return gateway; } -QString KRoutingInfo::getGatewayDevice(){ +TQString KRoutingInfo::getGatewayDevice(){ return gatewayDevice; } -void KRoutingInfo::setNetworkingEnabled(const QString &networking){ +void KRoutingInfo::setNetworkingEnabled(const TQString &networking){ KRoutingInfo::networking = networking; } -void KRoutingInfo::setForwardIPv4Enabled(const QString &forwardIPv4){ +void KRoutingInfo::setForwardIPv4Enabled(const TQString &forwardIPv4){ KRoutingInfo::forwardIPv4 = forwardIPv4; } -void KRoutingInfo::setHostName(const QString &hostName){ +void KRoutingInfo::setHostName(const TQString &hostName){ KRoutingInfo::hostName = hostName; } -void KRoutingInfo::setDomainName(const QString &domainName){ +void KRoutingInfo::setDomainName(const TQString &domainName){ KRoutingInfo::domainName = domainName; } -void KRoutingInfo::setGateway(const QString &gateway){ +void KRoutingInfo::setGateway(const TQString &gateway){ KRoutingInfo::gateway = gateway; } -void KRoutingInfo::setGatewayDevice(const QString &gatewayDevice){ +void KRoutingInfo::setGatewayDevice(const TQString &gatewayDevice){ KRoutingInfo::gatewayDevice = gatewayDevice; } diff --git a/knetworkconf/knetworkconf/kroutinginfo.h b/knetworkconf/knetworkconf/kroutinginfo.h index 1092f88..febcd18 100644 --- a/knetworkconf/knetworkconf/kroutinginfo.h +++ b/knetworkconf/knetworkconf/kroutinginfo.h @@ -18,7 +18,7 @@ #ifndef KROUTINGINFO_H #define KROUTINGINFO_H -#include +#include /**Has all the routing info of the machine, like default gateway, default gateway device, @@ -32,26 +32,26 @@ public: KRoutingInfo(); ~KRoutingInfo(); private: // Private attributes - QString networking; - QString forwardIPv4; - QString hostName; - QString domainName; - QString gateway; - QString gatewayDevice; + TQString networking; + TQString forwardIPv4; + TQString hostName; + TQString domainName; + TQString gateway; + TQString gatewayDevice; public: // Public attributes - QString isNetworkingEnabled(); - QString isForwardIPv4Enabled(); - QString getHostName(); - QString getGatewayDevice(); - QString getGateway(); - QString getDomainName(); - void setNetworkingEnabled(const QString &networking); - void setForwardIPv4Enabled(const QString &forwardIPv4); - void setHostName(const QString &hostName); - void setDomainName(const QString &domainName); - void setGateway(const QString &gateway); - void setGatewayDevice(const QString &gatewayDevice); + TQString isNetworkingEnabled(); + TQString isForwardIPv4Enabled(); + TQString getHostName(); + TQString getGatewayDevice(); + TQString getGateway(); + TQString getDomainName(); + void setNetworkingEnabled(const TQString &networking); + void setForwardIPv4Enabled(const TQString &forwardIPv4); + void setHostName(const TQString &hostName); + void setDomainName(const TQString &domainName); + void setGateway(const TQString &gateway); + void setGatewayDevice(const TQString &gatewayDevice); }; diff --git a/knetworkconf/knetworkconf/kwirelessinterface.cpp b/knetworkconf/knetworkconf/kwirelessinterface.cpp index c24d237..08d2b29 100644 --- a/knetworkconf/knetworkconf/kwirelessinterface.cpp +++ b/knetworkconf/knetworkconf/kwirelessinterface.cpp @@ -25,31 +25,31 @@ KWirelessInterface::~KWirelessInterface() { } -QString KWirelessInterface::getEssid() +TQString KWirelessInterface::getEssid() { return essid; } -QString KWirelessInterface::getWepKey() +TQString KWirelessInterface::getWepKey() { return wepKey; } -void KWirelessInterface::setWepKey(QString newKey) +void KWirelessInterface::setWepKey(TQString newKey) { wepKey = newKey; } -void KWirelessInterface::setEssid(QString newEssid) +void KWirelessInterface::setEssid(TQString newEssid) { essid = newEssid; } -QString KWirelessInterface::getKeyType() +TQString KWirelessInterface::getKeyType() { return keyType; } -void KWirelessInterface::setKeyType(QString type) +void KWirelessInterface::setKeyType(TQString type) { keyType = type; } diff --git a/knetworkconf/knetworkconf/kwirelessinterface.h b/knetworkconf/knetworkconf/kwirelessinterface.h index 982d68b..25549b9 100644 --- a/knetworkconf/knetworkconf/kwirelessinterface.h +++ b/knetworkconf/knetworkconf/kwirelessinterface.h @@ -18,7 +18,7 @@ #define KWIRELESSINTERFACE_H #include -#include +#include /** Class that represents a wireless network interface. It inherits from KNetworkInterface. @@ -32,17 +32,17 @@ class KWirelessInterface : public KNetworkInterface ~KWirelessInterface(); - QString getEssid(); - QString getWepKey(); - void setEssid(QString newEssid); - void setWepKey(QString newKey); - QString getKeyType(); - void setKeyType(QString type); + TQString getEssid(); + TQString getWepKey(); + void setEssid(TQString newEssid); + void setWepKey(TQString newKey); + TQString getKeyType(); + void setKeyType(TQString type); private: - QString essid; - QString wepKey; - QString keyType; + TQString essid; + TQString wepKey; + TQString keyType; }; #endif diff --git a/knetworkconf/knetworkconf/main.cpp b/knetworkconf/knetworkconf/main.cpp index 336d33e..8ebe038 100644 --- a/knetworkconf/knetworkconf/main.cpp +++ b/knetworkconf/knetworkconf/main.cpp @@ -40,7 +40,7 @@ K_EXPORT_COMPONENT_FACTORY( knetworkconfmodule, KDEDFactory( "kcm_knetworkconfmo extern "C" { - KDE_EXPORT KCModule *create_knetworkconfmodule(QWidget *parent, const char *name) + KDE_EXPORT KCModule *create_knetworkconfmodule(TQWidget *parent, const char *name) { KGlobal::locale()->insertCatalogue("knetworkconf"); return new KNetworkConfModule(parent, name); diff --git a/kpackage/cache.cpp b/kpackage/cache.cpp index 1877728..a50e838 100644 --- a/kpackage/cache.cpp +++ b/kpackage/cache.cpp @@ -37,8 +37,8 @@ extern Opts *opts; ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -cacheObj::cacheObj(const QString &Pbase, const QString &Plocation, const QString &PcacheFile, - const QString &Poption, bool Psubdirs) +cacheObj::cacheObj(const TQString &Pbase, const TQString &Plocation, const TQString &PcacheFile, + const TQString &Poption, bool Psubdirs) { base = Pbase; location = Plocation; @@ -50,48 +50,48 @@ cacheObj::cacheObj(const QString &Pbase, const QString &Plocation, const QString cacheObj::~cacheObj() {} -QString cacheObj::PDir() +TQString cacheObj::PDir() { struct stat buf; - stat(QFile::encodeName(QDir::homeDirPath()), &buf); + stat(TQFile::encodeName(TQDir::homeDirPath()), &buf); - QString tmpd = opts->CacheDir ; + TQString tmpd = opts->CacheDir ; - QDir d(tmpd); + TQDir d(tmpd); if (!d.exists()) { if (!d.mkdir(tmpd)) { KpMsgE(i18n("Cannot create folder %1").arg(tmpd),TRUE); tmpd = ""; } else { - chown(QFile::encodeName(tmpd),buf.st_uid,buf.st_gid); + chown(TQFile::encodeName(tmpd),buf.st_uid,buf.st_gid); } } return tmpd; } -QString cacheObj::CDir() +TQString cacheObj::CDir() { - QString tmpd = PDir(); + TQString tmpd = PDir(); if (!tmpd.isEmpty()) { struct stat buf; - stat(QFile::encodeName(tmpd),&buf); + stat(TQFile::encodeName(tmpd),&buf); tmpd += "dir/"; - QDir d(tmpd); + TQDir d(tmpd); if (!d.exists()) { if (!d.mkdir(tmpd)) { KpMsgE(i18n("Cannot create folder %1").arg(tmpd),TRUE); tmpd = ""; } else { - chown(QFile::encodeName(tmpd),buf.st_uid,buf.st_gid); + chown(TQFile::encodeName(tmpd),buf.st_uid,buf.st_gid); } } } return tmpd; } -int cacheObj::newDCache(const QString &url, const QString &fn, QString &fname) { +int cacheObj::newDCache(const TQString &url, const TQString &fn, TQString &fname) { KURL u(url); if ( !u.isValid() ) { @@ -99,7 +99,7 @@ int cacheObj::newDCache(const QString &url, const QString &fn, QString &fname) return -1; } - QString tmpd = cacheObj::CDir(); + TQString tmpd = cacheObj::CDir(); if (tmpd.isEmpty()) { return -1; } else { @@ -114,7 +114,7 @@ int cacheObj::newDCache(const QString &url, const QString &fn, QString &fname) return 1; } - QFileInfo f(fname); + TQFileInfo f(fname); if (f.exists() && f.size() > 0) { return 0;; @@ -126,42 +126,42 @@ int cacheObj::newDCache(const QString &url, const QString &fn, QString &fname) } } -void cacheObj::rmDCache(const QString &fn) { - QString tmpd = cacheObj::CDir(); +void cacheObj::rmDCache(const TQString &fn) { + TQString tmpd = cacheObj::CDir(); tmpd += fn; if (!tmpd.isEmpty()) { - unlink(QFile::encodeName(tmpd)); + unlink(TQFile::encodeName(tmpd)); } } void cacheObj::clearDCache() { - QString tmpd = cacheObj::CDir(); + TQString tmpd = cacheObj::CDir(); if (!tmpd.isEmpty()) { - QDir d(tmpd); + TQDir d(tmpd); CacheList cl(d) ; for (CacheList::iterator it = cl.begin() ; it != cl.end() ; ++it) { - QString s = tmpd; + TQString s = tmpd; s += *it; - unlink(QFile::encodeName(s)); + unlink(TQFile::encodeName(s)); } - unlink(QFile::encodeName(cl.getCLFileName())) ; // also delete the kpackage_cachelist file + unlink(TQFile::encodeName(cl.getCLFileName())) ; // also delete the kpackage_cachelist file } } void cacheObj::clearPCache() { - QString tmpd = cacheObj::PDir(); + TQString tmpd = cacheObj::PDir(); if (!tmpd.isEmpty()) { - QDir d(tmpd); + TQDir d(tmpd); CacheList cl(d); for (CacheList::iterator it = cl.begin() ; it != cl.end() ; ++it) { - QString s = tmpd ; + TQString s = tmpd ; s += *it; - unlink(QFile::encodeName(s)); + unlink(TQFile::encodeName(s)); } - unlink(QFile::encodeName(cl.getCLFileName())) ; // also delete the kpackage_cachelist file + unlink(TQFile::encodeName(cl.getCLFileName())) ; // also delete the kpackage_cachelist file } } @@ -178,7 +178,7 @@ LcacheObj::~LcacheObj() ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -CacheList::CacheList (const QDir& dir) +CacheList::CacheList (const TQDir& dir) { CLFile.setName (dir.path() + "/kpackage_cachelist") ; read() ; @@ -188,8 +188,8 @@ void CacheList::read () { kdDebug() << "reading cachelist: " << CLFile.name() << "\n" ; if (CLFile.open (IO_ReadOnly)) { - QTextStream stream (&CLFile) ; - QString line ; + TQTextStream stream (&CLFile) ; + TQString line ; while (!stream.eof()) { line = stream.readLine() ; if (line[0] != '#') { // not a comment @@ -207,10 +207,10 @@ void CacheList::write () { kdDebug() << "writing cachelist: " << CLFile.name() << "\n" ; if (CLFile.open (IO_WriteOnly)) { - QTextStream stream (&CLFile) ; + TQTextStream stream (&CLFile) ; stream << "# This file contains a list of files that have been cached in this folder.\n" ; stream << "# Please only delete this if you want kpackage to forget what it has cached.\n" ; - for (QStringList::iterator it = begin() ; it != end() ; ++it) { + for (TQStringList::iterator it = begin() ; it != end() ; ++it) { stream << *it << "\n" ; } CLFile.close() ; @@ -220,7 +220,7 @@ void CacheList::write () } } -QString CacheList::getCLFileName () const +TQString CacheList::getCLFileName () const { return CLFile.name() ; } diff --git a/kpackage/cache.h b/kpackage/cache.h index 02dc830..2a54b7c 100644 --- a/kpackage/cache.h +++ b/kpackage/cache.h @@ -29,8 +29,8 @@ #ifndef CACHE_H #define CACHE_H -#include -#include +#include +#include #include @@ -45,29 +45,29 @@ class LcacheObj; class cacheObj { public: - QString base; - QString location; - QString cacheFile; - QString option; + TQString base; + TQString location; + TQString cacheFile; + TQString option; bool subdirs; - cacheObj(const QString &Pbase, const QString &Plocation, const QString &PcacheFile, const QString &Poption = QString::null, bool Psubdirs = FALSE); + cacheObj(const TQString &Pbase, const TQString &Plocation, const TQString &PcacheFile, const TQString &Poption = TQString::null, bool Psubdirs = FALSE); ~cacheObj(); - static QString PDir(); + static TQString PDir(); // return path of kpackage cache directory - static QString CDir(); + static TQString CDir(); // return path of kpackage directory cache - static int newDCache(const QString &url, const QString &fn, QString &fname); + static int newDCache(const TQString &url, const TQString &fn, TQString &fname); // Checks directory cache // -1 Cann't get cache file name // 0 Cache file exists // 1 Cache file doesn't exit // fname return file name - static void rmDCache(const QString &fn); + static void rmDCache(const TQString &fn); static void clearDCache(); static void clearPCache(); @@ -75,7 +75,7 @@ public: ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -class LcacheObj: public QPtrList +class LcacheObj: public TQPtrList { public: LcacheObj(); @@ -94,17 +94,17 @@ public: /** * create (and read) a cachelist object for the directory dir **/ - CacheList (const QDir& dir) ; + CacheList (const TQDir& dir) ; /** * write this cachelist to disk **/ void write (void) ; - QString getCLFileName (void) const ; + TQString getCLFileName (void) const ; private: - QFile CLFile ; + TQFile CLFile ; void read (void) ; } ; diff --git a/kpackage/debAptInterface.cpp b/kpackage/debAptInterface.cpp index 9dffb39..9139adf 100644 --- a/kpackage/debAptInterface.cpp +++ b/kpackage/debAptInterface.cpp @@ -60,8 +60,8 @@ DEBAPT::DEBAPT():DEB() locatedialog->dLocations(1, 8, this, i18n("Folders", "F"), "Deb", "*.deb", i18n("Location of Folders Containing Debian Packages")); - connect(locatedialog,SIGNAL(returnVal(LcacheObj *)), - this,SLOT(setAvail(LcacheObj *))); + connect(locatedialog,TQT_SIGNAL(returnVal(LcacheObj *)), + this,TQT_SLOT(setAvail(LcacheObj *))); locatedialog->apply_slot(); paramsInst.append(new param(i18n("Download only"),FALSE,FALSE,"-d")); @@ -93,28 +93,28 @@ DEBAPT::~DEBAPT() ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -bool DEBAPT::isType(char *, const QString &) +bool DEBAPT::isType(char *, const TQString &) { return false; } void DEBAPT::makeMenu(KActionCollection* act) { - updateM = new KAction( i18n("&Update"), QString::null, + updateM = new KAction( i18n("&Update"), TQString::null, 0, this, - SLOT(updateS()), act, "debapt_update"); + TQT_SLOT(updateS()), act, "debapt_update"); - upgradeM = new KAction( i18n("U&pgrade"), QString::null, + upgradeM = new KAction( i18n("U&pgrade"), TQString::null, 0, this, - SLOT(upgradeS()), act, "debapt_upgrade"); + TQT_SLOT(upgradeS()), act, "debapt_upgrade"); - fixupM = new KAction( i18n("&Fixup"), QString::null, + fixupM = new KAction( i18n("&Fixup"), TQString::null, 0, this, - SLOT(fixupS()), act, "debapt_fixup"); + TQT_SLOT(fixupS()), act, "debapt_fixup"); - fileM = new KAction( i18n("&Apt-File Update"), QString::null, + fileM = new KAction( i18n("&Apt-File Update"), TQString::null, 0, this, - SLOT(fileS()), act, "debapt_file"); + TQT_SLOT(fileS()), act, "debapt_file"); } void DEBAPT::setMenu(KActionCollection*, bool enable) @@ -160,7 +160,7 @@ void DEBAPT::fileS() } } -void DEBAPT::listPackages(QPtrList *pki) +void DEBAPT::listPackages(TQPtrList *pki) { if (hostName.isEmpty()) { listInstalledPackages(pki); @@ -173,24 +173,24 @@ void DEBAPT::listPackages(QPtrList *pki) } } -void DEBAPT::listRemotePackages(QPtrList *pki) +void DEBAPT::listRemotePackages(TQPtrList *pki) { listRPack(pki); } -void DEBAPT::listRPack(QPtrList *pki) +void DEBAPT::listRPack(TQPtrList *pki) { int NLINES = 70000; packageInfo *p; - QStringList plist; + TQStringList plist; kpackage->setStatus(i18n("Querying DEB APT remote package list: %1").arg(hostName)); kpackage->setPercent(0); - QString cmd = "cat " STATUS; + TQString cmd = "cat " STATUS; - QStringList list = kpty->run(cmd); + TQStringList list = kpty->run(cmd); kpackage->setStatus(i18n("Processing DEB APT remote package list: %1").arg(hostName)); // kdDebug() << "P=" << list.count() <<"\n"; kpackage->setPercent(50); @@ -198,12 +198,12 @@ void DEBAPT::listRPack(QPtrList *pki) if (list.count() > 0) { - QString s; + TQString s; kpackage->setPercent(50 ); int cnt = 0; - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { cnt++; if (cnt % (NLINES/20) == 0) { kpackage->setPercent(((cnt * 100)/ NLINES ) + 50); @@ -232,12 +232,12 @@ void DEBAPT::listRPack(QPtrList *pki) kpackage->setPercent(100); } -void DEBAPT::listAvail(QPtrList *pki) +void DEBAPT::listAvail(TQPtrList *pki) { int NLINES = 150000; packageInfo *p; - QStringList plist; + TQStringList plist; // kdDebug() << "H=" << hostName << "\n"; if (hostName.isEmpty()) @@ -246,7 +246,7 @@ void DEBAPT::listAvail(QPtrList *pki) kpackage->setStatus(i18n("Querying DEB APT available list: %1").arg(hostName)); kpackage->setPercent(0); - QStringList list = kpty->run("apt-cache dumpavail"); + TQStringList list = kpty->run("apt-cache dumpavail"); if (hostName.isEmpty()) kpackage->setStatus(i18n("Processing DEB APT available list")); else @@ -257,12 +257,12 @@ void DEBAPT::listAvail(QPtrList *pki) if (list.count() > 0) { - QString s; + TQString s; kpackage->setPercent(50 ); int cnt = 0; - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { cnt++; if (cnt % (NLINES/20) == 0) { kpackage->setPercent(((cnt * 100)/ NLINES ) + 50); @@ -288,12 +288,12 @@ void DEBAPT::listAvail(QPtrList *pki) kpackage->setPercent(100); } -QStringList DEBAPT::listInstalls(const QStringList &packs, bool install, bool &cancel) +TQStringList DEBAPT::listInstalls(const TQStringList &packs, bool install, bool &cancel) { bool extras=FALSE, found=FALSE; - QString match; - QString s = "apt-get -s "; + TQString match; + TQString s = "apt-get -s "; if (install) { s += "install "; match = " extra packages "; @@ -302,12 +302,12 @@ QStringList DEBAPT::listInstalls(const QStringList &packs, bool install, bool & s += "remove "; } - for ( QStringList::ConstIterator it = packs.begin(); it != packs.end(); ++it ) { + for ( TQStringList::ConstIterator it = packs.begin(); it != packs.end(); ++it ) { s += *it; s += " "; } - QStringList list = kpty->run(s, TRUE, TRUE); + TQStringList list = kpty->run(s, TRUE, TRUE); if (!kpty->inSession) { cancel = TRUE; // Root login did not work } else { @@ -315,8 +315,8 @@ QStringList DEBAPT::listInstalls(const QStringList &packs, bool install, bool & } // kdDebug() << "LS=" << list.count() << "\n"; - QString packAll; - for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { + TQString packAll; + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { // kdDebug() << "M=" << *it << "\n"; if ((*it).find(match) >= 0 || extras) { if (extras) { @@ -332,32 +332,32 @@ QStringList DEBAPT::listInstalls(const QStringList &packs, bool install, bool & } if (!found) { - QStringList nill; + TQStringList nill; return nill; } else { - QStringList plist = QStringList::split(' ',packAll); + TQStringList plist = TQStringList::split(' ',packAll); return plist; } } ////////////////////////////////////////////////////////////////////////////// -QStringList DEBAPT::FindFile(const QString &name, bool searchAll) +TQStringList DEBAPT::FindFile(const TQString &name, bool searchAll) { if (searchAll) { if (ifExe("apt-file") || !hostName.isEmpty()) { - QString s = "apt-file search "; + TQString s = "apt-file search "; s += name; - QStringList filelist = kpty->run(s); + TQStringList filelist = kpty->run(s); - for ( QStringList::Iterator it = filelist.begin(); it != filelist.end(); ++it ) { + for ( TQStringList::Iterator it = filelist.begin(); it != filelist.end(); ++it ) { int p = (*it).find(": "); if( p !=-1 ) (*it).replace(p, 2, "\t"); } if (filelist.count() == 1) { - QStringList::Iterator it = filelist.begin(); + TQStringList::Iterator it = filelist.begin(); if ((*it).find("not found") >= 0) { filelist.remove(it); } @@ -366,7 +366,7 @@ QStringList DEBAPT::FindFile(const QString &name, bool searchAll) return filelist; } else { KpMsg("Error",i18n("The %1 program needs to be installed").arg("apt-file"), TRUE); - QStringList nill; + TQStringList nill; return nill; } } else { @@ -375,9 +375,9 @@ QStringList DEBAPT::FindFile(const QString &name, bool searchAll) } -QStringList DEBAPT::getFileList(packageInfo *p) +TQStringList DEBAPT::getFileList(packageInfo *p) { - QString fn( p->getFilename()); + TQString fn( p->getFilename()); if(!fn.isEmpty()) return getUFileList(fn); else { @@ -392,10 +392,10 @@ QStringList DEBAPT::getFileList(packageInfo *p) } } - QStringList DEBAPT::getRFileList(packageInfo *p) + TQStringList DEBAPT::getRFileList(packageInfo *p) { - QString from; - QString name = p->getProperty("name"); + TQString from; + TQString name = p->getProperty("name"); from = "cat " INFODIR; from += name; @@ -405,9 +405,9 @@ QStringList DEBAPT::getFileList(packageInfo *p) } ////////////////////////////////////////////////////////////////////////////// -QString DEBAPT::doUninstall(int uninstallFlags, const QString &packs, bool &test) +TQString DEBAPT::doUninstall(int uninstallFlags, const TQString &packs, bool &test) { - QString s = env + "apt-get remove "; + TQString s = env + "apt-get remove "; s += setOptions(uninstallFlags, paramsUninst); s += packs; @@ -420,16 +420,16 @@ QString DEBAPT::doUninstall(int uninstallFlags, const QString &packs, bool &test } ////////////////////////////////////////////////////////////////////////////// -QString DEBAPT::install(int installFlags, QPtrList *p, +TQString DEBAPT::install(int installFlags, TQPtrList *p, bool &test) { - QString packs = ""; - QString files = ""; + TQString packs = ""; + TQString files = ""; packageInfo *i; for (i = p->first(); i!= 0; i = p->next()) { - QString file = i->getFilename(); - QString fname = i->fetchFilename(); + TQString file = i->getFilename(); + TQString fname = i->fetchFilename(); if (!file.isEmpty()) { files += KProcess::quote(file); @@ -447,9 +447,9 @@ QString DEBAPT::install(int installFlags, QPtrList *p, } } -QString DEBAPT::doInstall(int installFlags, const QString &packs, bool &test) +TQString DEBAPT::doInstall(int installFlags, const TQString &packs, bool &test) { - QString s = env + "apt-get install "; + TQString s = env + "apt-get install "; s += setOptions(installFlags, paramsInst); s += packs; @@ -464,7 +464,7 @@ QString DEBAPT::doInstall(int installFlags, const QString &packs, bool &test) ////////////////////////////////////////////////////////////////////////////// -QStringList DEBAPT::readApt() +TQStringList DEBAPT::readApt() { if (hostName.isEmpty()) { return readAptF(); @@ -473,14 +473,14 @@ QStringList DEBAPT::readApt() } } -QStringList DEBAPT::readAptS() +TQStringList DEBAPT::readAptS() { - QString cmd = "cat -E " APT_SOURCE; + TQString cmd = "cat -E " APT_SOURCE; - QStringList list = kpty->run(cmd); + TQStringList list = kpty->run(cmd); if (!kpty->Result) { - QString s; - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + TQString s; + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { (*it).truncate((*it).length() - 1); (*it) = (*it).stripWhiteSpace(); } @@ -490,13 +490,13 @@ QStringList DEBAPT::readAptS() } } -QStringList DEBAPT::readAptF() +TQStringList DEBAPT::readAptF() { - QStringList lines; - QFile file( "/etc/apt/sources.list" ); + TQStringList lines; + TQFile file( "/etc/apt/sources.list" ); if ( file.open( IO_ReadOnly ) ) { - QTextStream stream( &file ); - QString line; + TQTextStream stream( &file ); + TQString line; while ( !stream.atEnd() ) { line = stream.readLine(); // line of text excluding '\n' line = line.stripWhiteSpace(); @@ -509,11 +509,11 @@ QStringList DEBAPT::readAptF() } } -void DEBAPT::writeApt(const QStringList &list) { +void DEBAPT::writeApt(const TQStringList &list) { kdDebug() << "writeApt\n"; - QString cmd = "sh -c \"/bin/echo -e '"; - for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { - QString s = *it; + TQString cmd = "sh -c \"/bin/echo -e '"; + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { + TQString s = *it; s.replace("\""," "); s.replace("'"," "); s.replace("!"," "); @@ -525,8 +525,8 @@ void DEBAPT::writeApt(const QStringList &list) { cmd += "mv /etc/apt/sources.list /etc/apt/sources.list.b; mv /etc/apt/sources.list.n /etc/apt/sources.list; fi\" "; - QStringList rlist = kpty->run(cmd,TRUE,TRUE); - //for ( QStringList::Iterator it = rlist.begin(); it != rlist.end(); ++it ) { + TQStringList rlist = kpty->run(cmd,TRUE,TRUE); + //for ( TQStringList::Iterator it = rlist.begin(); it != rlist.end(); ++it ) { // kdDebug() << "SL=" << *it << "\n"; //} } diff --git a/kpackage/debAptInterface.h b/kpackage/debAptInterface.h index 71e52ea..2e23ac5 100644 --- a/kpackage/debAptInterface.h +++ b/kpackage/debAptInterface.h @@ -43,30 +43,30 @@ public: DEBAPT(); ~DEBAPT(); - virtual bool isType(char *buf, const QString &fname); + virtual bool isType(char *buf, const TQString &fname); - void listPackages(QPtrList *pki); - QStringList listInstalls(const QStringList &packs, bool install, bool &cancel); + void listPackages(TQPtrList *pki); + TQStringList listInstalls(const TQStringList &packs, bool install, bool &cancel); - QString doUninstall(int uninstallFlags, const QString &packs, bool &test); - QString doInstall(int installFlags, const QString &packs, bool &test); - QString install(int installFlags, QPtrList *p, + TQString doUninstall(int uninstallFlags, const TQString &packs, bool &test); + TQString doInstall(int installFlags, const TQString &packs, bool &test); + TQString install(int installFlags, TQPtrList *p, bool &test); - virtual QStringList FindFile(const QString &name, bool seachAll=false); + virtual TQStringList FindFile(const TQString &name, bool seachAll=false); - void listRemotePackages(QPtrList *pki); - QStringList getFileList(packageInfo *p); + void listRemotePackages(TQPtrList *pki); + TQStringList getFileList(packageInfo *p); KAction *updateM, *upgradeM, *fixupM, *fileM; void makeMenu(KActionCollection* act); void setMenu(KActionCollection* act, bool enable); - QStringList readApt(); - QStringList readAptS(); - QStringList readAptF(); - void writeApt(const QStringList &list); + TQStringList readApt(); + TQStringList readAptS(); + TQStringList readAptF(); + void writeApt(const TQStringList &list); private slots: void updateS(); @@ -75,10 +75,10 @@ private slots: void fileS(); private: - void listAvail(QPtrList *pki); - void listRPack(QPtrList *pki); - QStringList getRFileList(packageInfo *p); + void listAvail(TQPtrList *pki); + void listRPack(TQPtrList *pki); + TQStringList getRFileList(packageInfo *p); - QString env; + TQString env; }; #endif diff --git a/kpackage/debDpkgInterface.cpp b/kpackage/debDpkgInterface.cpp index 896bdfb..a1c4504 100644 --- a/kpackage/debDpkgInterface.cpp +++ b/kpackage/debDpkgInterface.cpp @@ -77,8 +77,8 @@ DEBDPKG::DEBDPKG():DEB() locatedialog->dLocations(2, 6, this, i18n("Folders", "F"), "Deb", "*.deb", i18n("Location of Folders Containing Debian Packages")); - connect(locatedialog,SIGNAL(returnVal(LcacheObj *)), - this,SLOT(setAvail(LcacheObj *))); + connect(locatedialog,TQT_SIGNAL(returnVal(LcacheObj *)), + this,TQT_SLOT(setAvail(LcacheObj *))); locatedialog->apply_slot(); paramsInst.append(new param(i18n("Allow Downgrade"),TRUE,TRUE,"--refuse-downgrade")); @@ -102,27 +102,27 @@ DEBDPKG::~DEBDPKG() } ////////////////////////////////////////////////////////////////////////////// -void DEBDPKG::distPackages(QPtrList *pki, cacheObj *cp) +void DEBDPKG::distPackages(TQPtrList *pki, cacheObj *cp) { LcacheObj *cList = new LcacheObj(); - QString loc = cp->base; + TQString loc = cp->base; - QStringList opt = QStringList::split('\n',cp->option); - QStringList::Iterator ocIt = opt.begin(); - QString rel = *ocIt; - QString arch = *(++ocIt); + TQStringList opt = TQStringList::split('\n',cp->option); + TQStringList::Iterator ocIt = opt.begin(); + TQString rel = *ocIt; + TQString arch = *(++ocIt); - QString parts[3] = {"main", "contrib", "non-free"}; + TQString parts[3] = {"main", "contrib", "non-free"}; for (int i = 0; i < 3; i++) { - QString file = loc + "/dists/"; + TQString file = loc + "/dists/"; file += rel; file += "/"; file += parts[i]; file += "/binary-"; file += arch; file += "/Packages"; - QString s; - QString tmp = cp->cacheFile; + TQString s; + TQString tmp = cp->cacheFile; tmp += s.setNum(i); cacheObj *cp = new cacheObj(loc,file,tmp); cList->append(cp); @@ -131,7 +131,7 @@ void DEBDPKG::distPackages(QPtrList *pki, cacheObj *cp) listUnIPackages(pki, cList); } -void DEBDPKG::listPackages(QPtrList *pki) +void DEBDPKG::listPackages(TQPtrList *pki) { listInstalledPackages(pki); if (packageLoc) { @@ -146,9 +146,9 @@ void DEBDPKG::listPackages(QPtrList *pki) // Call the script to uninstall packages setting parameters // to dpkg dependent on flags, returning whether everyting worked ////////////////////////////////////////////////////////////////////////////// -QString DEBDPKG::doUninstall(int uninstallFlags, const QString &packs, bool &test) +TQString DEBDPKG::doUninstall(int uninstallFlags, const TQString &packs, bool &test) { - QString s = "dpkg "; + TQString s = "dpkg "; // The -r or -p flag is set by setOptions s += setOptions(uninstallFlags, paramsUninst); s += packs; diff --git a/kpackage/debDpkgInterface.h b/kpackage/debDpkgInterface.h index f65ccf0..fe9f422 100644 --- a/kpackage/debDpkgInterface.h +++ b/kpackage/debDpkgInterface.h @@ -43,19 +43,19 @@ public: DEBDPKG(); ~DEBDPKG(); - QString doUninstall(int installFlags, const QString &packs, bool &test); + TQString doUninstall(int installFlags, const TQString &packs, bool &test); - void listPackList(QPtrList *pki, const QString &fname, + void listPackList(TQPtrList *pki, const TQString &fname, cacheObj *cp); - void listPackages(QPtrList *pki); - void distPackages(QPtrList *pki, cacheObj *cp); + void listPackages(TQPtrList *pki); + void distPackages(TQPtrList *pki, cacheObj *cp); public slots: protected: - packageInfo *getIPackageInfo(const QString &name); - packageInfo *getUPackageInfo(const QString &name); + packageInfo *getIPackageInfo(const TQString &name); + packageInfo *getUPackageInfo(const TQString &name); }; diff --git a/kpackage/debInterface.cpp b/kpackage/debInterface.cpp index 4c79485..41146fe 100644 --- a/kpackage/debInterface.cpp +++ b/kpackage/debInterface.cpp @@ -78,7 +78,7 @@ DEB::~DEB() ////////////////////////////////////////////////////////////////////////////// // check if debian file -bool DEB::isType(char *buf, const QString &) +bool DEB::isType(char *buf, const TQString &) { if (hasProgram) { if (!strcmp(buf,"!\n")) { @@ -92,13 +92,13 @@ bool DEB::isType(char *buf, const QString &) } } -void DEB::distPackages(QPtrList *, cacheObj *) +void DEB::distPackages(TQPtrList *, cacheObj *) { } -void DEB::listUnIPackages(QPtrList *pki, LcacheObj *pCache) +void DEB::listUnIPackages(TQPtrList *pki, LcacheObj *pCache) { - QString s; + TQString s; cacheObj *cp; for (cp = pCache->first(); cp != 0; cp = pCache->next()) { @@ -119,7 +119,7 @@ void DEB::listUnIPackages(QPtrList *pki, LcacheObj *pCache) } } -bool DEB::parseName(const QString &name, QString *n, QString *v) +bool DEB::parseName(const TQString &name, TQString *n, TQString *v) { int d1, d2, s1; @@ -138,17 +138,17 @@ bool DEB::parseName(const QString &name, QString *n, QString *v) return FALSE; } -void DEB::listInstalledPackages(QPtrList *pki) +void DEB::listInstalledPackages(TQPtrList *pki) { listPackList(pki,STATUS,0); } -void DEB::listPackList(QPtrList *pki, const QString &fname, cacheObj *cp) +void DEB::listPackList(TQPtrList *pki, const TQString &fname, cacheObj *cp) { bool local = FALSE; packageInfo *p; - QStringList list; - QString sline( i18n("Querying DEB package list: ")+fname ); + TQStringList list; + TQString sline( i18n("Querying DEB package list: ")+fname ); if (cp) { KURL u(cp->base); @@ -158,12 +158,12 @@ void DEB::listPackList(QPtrList *pki, const QString &fname, cacheOb kpackage->setStatus(sline); kpackage->setPercent(0); - QFile file(STATUS); - QString s; + TQFile file(STATUS); + TQString s; bool fileOpened= file.open(IO_ReadOnly); if (fileOpened) { - QTextStream stream( &file ); + TQTextStream stream( &file ); s = ""; while ( !s.isNull() ) { s = stream.readLine(); @@ -190,7 +190,7 @@ void DEB::listPackList(QPtrList *pki, const QString &fname, cacheOb ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -packageInfo *DEB::getPackageInfo(char mode, const QString &name, const QString &) +packageInfo *DEB::getPackageInfo(char mode, const TQString &name, const TQString &) { if (mode == 'i') { if (hostName.isEmpty()) { @@ -202,19 +202,19 @@ packageInfo *DEB::getPackageInfo(char mode, const QString &name, const QString & return getUPackageInfo(name); } -packageInfo *DEB::getIPackageInfo( const QString &name) +packageInfo *DEB::getIPackageInfo( const TQString &name) { // query an installed package! packageInfo *pki = 0; - QString search; - QStringList list; + TQString search; + TQStringList list; search = "Package: "+ name; - QFile f(STATUS); + TQFile f(STATUS); if ( f.open(IO_ReadOnly) ) { - QTextStream t( &f ); - QString s; + TQTextStream t( &f ); + TQString s; while ( !t.eof() ) { s = t.readLine(); @@ -238,15 +238,15 @@ packageInfo *DEB::getIPackageInfo( const QString &name) return pki; } -packageInfo *DEB::getIRPackageInfo( const QString &name) +packageInfo *DEB::getIRPackageInfo( const TQString &name) { // query an remote installed package packageInfo *pki = 0; - QString s = "dpkg --status "; + TQString s = "dpkg --status "; s += name; - QStringList list = kpty->run(s); - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + TQStringList list = kpty->run(s); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { // kdDebug() << "U=" << *it << "\n"; if ((*it).find("Package:") >= 0) { kdDebug() << "found\n"; @@ -269,16 +269,16 @@ packageInfo *DEB::getIRPackageInfo( const QString &name) return pki; } -packageInfo *DEB::getUPackageInfo( const QString &name) +packageInfo *DEB::getUPackageInfo( const TQString &name) { // query an uninstalled package packageInfo *pki = 0; - QString s = "dpkg --info "; + TQString s = "dpkg --info "; s += KProcess::quote(name); - QStringList list = kpty->run(s); - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + TQStringList list = kpty->run(s); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { // kdDebug() << "U=" << *it << "\n"; if ((*it).find("Package:") >= 0) { // kdDebug() << "found\n"; @@ -301,20 +301,20 @@ packageInfo *DEB::getUPackageInfo( const QString &name) ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -packageInfo *DEB::collectInfo(QStringList &ln, pkgInterface *pkgInt) +packageInfo *DEB::collectInfo(TQStringList &ln, pkgInterface *pkgInt) { if (!pkgInt) { pkgInt = this; } - QMap a; + TQMap a; - QString key, val; + TQString key, val; bool bad_install = FALSE; bool available = FALSE; bool haveName = FALSE; - for ( QStringList::Iterator it = ln.begin(); it != ln.end(); ++it ) { + for ( TQStringList::Iterator it = ln.begin(); it != ln.end(); ++it ) { loop: int col = (*it).find(':'); key = ((*it).left(col)).lower(); @@ -334,7 +334,7 @@ packageInfo *DEB::collectInfo(QStringList &ln, pkgInterface *pkgInt) } } else if (key == "description") { a.insert("summary", val); - QString desc; + TQString desc; while (++it != ln.end()) { if ((*it)[0] == ' ') { desc += *it; @@ -394,19 +394,19 @@ packageInfo *DEB::collectInfo(QStringList &ln, pkgInterface *pkgInt) ////////////////////////////////////////////////////////////////////////////// -QStringList DEB::getChangeLog(packageInfo *p) { - QString fn( p->getFilename()); +TQStringList DEB::getChangeLog(packageInfo *p) { + TQString fn( p->getFilename()); if(!fn.isEmpty()) return 0; else return getIChangeLog(p); } -QStringList DEB::getIChangeLog(packageInfo *p) +TQStringList DEB::getIChangeLog(packageInfo *p) { - QString from; - QStringList ret; - QString name = p->getProperty("name"); + TQString from; + TQStringList ret; + TQString name = p->getProperty("name"); from = "zcat /usr/share/doc/"; from += name; @@ -447,9 +447,9 @@ bool DEB::changeTab(packageInfo *p) { ////////////////////////////////////////////////////////////////////////////// -QStringList DEB::getFileList(packageInfo *p) +TQStringList DEB::getFileList(packageInfo *p) { - QString fn( p->getFilename()); + TQString fn( p->getFilename()); if(!fn.isEmpty()) return getUFileList(fn); else @@ -457,13 +457,13 @@ QStringList DEB::getFileList(packageInfo *p) } // query an installed package -QStringList DEB::getIFileList(packageInfo *p) +TQStringList DEB::getIFileList(packageInfo *p) { FILE *file; - QString name = p->getProperty("name"); - QStringList filelist; + TQString name = p->getProperty("name"); + TQStringList filelist; - QString vb( INFODIR + name + ".list"); + TQString vb( INFODIR + name + ".list"); file= fopen(vb.ascii(),"r"); if (file) { @@ -478,17 +478,17 @@ QStringList DEB::getIFileList(packageInfo *p) } // query an uninstalled package -QStringList DEB::getUFileList(const QString &fn) +TQStringList DEB::getUFileList(const TQString &fn) { - QString s = "dpkg --contents "; + TQString s = "dpkg --contents "; s += "'"; s += fn; s += "'"; - QStringList filelist = kpty->run(s); + TQStringList filelist = kpty->run(s); int pt = -1; - for ( QStringList::Iterator it = filelist.begin(); + for ( TQStringList::Iterator it = filelist.begin(); it != filelist.end(); ++it ) { // kdDebug() << "F=" << *it << "\n"; if (pt < 0) { @@ -501,21 +501,21 @@ QStringList DEB::getUFileList(const QString &fn) ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -QStringList DEB::FindFile(const QString &name, bool) +TQStringList DEB::FindFile(const TQString &name, bool) { - QString s = "dpkg -S "; + TQString s = "dpkg -S "; s += name; - QStringList filelist = kpty->run(s); + TQStringList filelist = kpty->run(s); - for ( QStringList::Iterator it = filelist.begin(); it != filelist.end(); ++it ) { + for ( TQStringList::Iterator it = filelist.begin(); it != filelist.end(); ++it ) { int p = (*it).find(": "); if( p !=-1 ) (*it).replace(p, 2, "\t"); } if (filelist.count() == 1) { - QStringList::Iterator it = filelist.begin(); + TQStringList::Iterator it = filelist.begin(); if ((*it).find("not found") >= 0) { filelist.remove(it); } @@ -543,10 +543,10 @@ void DEB::setAvail(LcacheObj *slist) ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -QString DEB::uninstall(int uninstallFlags, QPtrList *p, +TQString DEB::uninstall(int uninstallFlags, TQPtrList *p, bool &test) { - QString packs = ""; + TQString packs = ""; packageInfo *i; for (i = p->first(); i!= 0; i = p->next()) { @@ -557,14 +557,14 @@ QString DEB::uninstall(int uninstallFlags, QPtrList *p, } ////////////////////////////////////////////////////////////////////////////// -QString DEB::install(int installFlags, QPtrList *p, +TQString DEB::install(int installFlags, TQPtrList *p, bool &test) { - QString packs = ""; + TQString packs = ""; packageInfo *i; for (i = p->first(); i!= 0; i = p->next()) { - QString fname = i->fetchFilename(); + TQString fname = i->fetchFilename(); if (!fname.isEmpty()) { packs += KProcess::quote(fname); packs += " "; @@ -579,9 +579,9 @@ QString DEB::install(int installFlags, QPtrList *p, ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -QString DEB::doInstall(int installFlags, const QString &packs, bool &test) +TQString DEB::doInstall(int installFlags, const TQString &packs, bool &test) { - QString s = "dpkg -i "; + TQString s = "dpkg -i "; s += setOptions(installFlags, paramsInst); s += packs; diff --git a/kpackage/debInterface.h b/kpackage/debInterface.h index 98307f8..9cc450d 100644 --- a/kpackage/debInterface.h +++ b/kpackage/debInterface.h @@ -30,12 +30,12 @@ #include "../config.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include @@ -59,12 +59,12 @@ public: DEB(); ~DEB(); - virtual bool isType(char *buf, const QString &fname); + virtual bool isType(char *buf, const TQString &fname); - virtual packageInfo *getPackageInfo(char mode, const QString &name, - const QString &version); - virtual QStringList getFileList(packageInfo *p); - virtual QStringList getChangeLog(packageInfo *p); + virtual packageInfo *getPackageInfo(char mode, const TQString &name, + const TQString &version); + virtual TQStringList getFileList(packageInfo *p); + virtual TQStringList getChangeLog(packageInfo *p); bool filesTab(packageInfo *p); // If files tab is to be enabled @@ -72,38 +72,38 @@ public: bool changeTab(packageInfo *p); // If change log tab is to be enabled - virtual void listInstalledPackages(QPtrList *pki); + virtual void listInstalledPackages(TQPtrList *pki); - virtual QStringList FindFile(const QString &name, bool seachAll=false); - virtual bool parseName(const QString &name, QString *n, QString *v); + virtual TQStringList FindFile(const TQString &name, bool seachAll=false); + virtual bool parseName(const TQString &name, TQString *n, TQString *v); - virtual packageInfo* collectInfo(QStringList &ln, pkgInterface *pkgInt = 0); + virtual packageInfo* collectInfo(TQStringList &ln, pkgInterface *pkgInt = 0); - QString uninstall(int uninstallFlags, QPtrList *p, + TQString uninstall(int uninstallFlags, TQPtrList *p, bool &test); - QString install(int installFlags, QPtrList *p, + TQString install(int installFlags, TQPtrList *p, bool &test); - QString doInstall(int installFlags, const QString &packs, bool &test); + TQString doInstall(int installFlags, const TQString &packs, bool &test); public slots: void setLocation(); void setAvail(LcacheObj *); protected: - packageInfo *getIPackageInfo(const QString &name); - packageInfo *getIRPackageInfo(const QString &name); - packageInfo *getUPackageInfo(const QString &name); + packageInfo *getIPackageInfo(const TQString &name); + packageInfo *getIRPackageInfo(const TQString &name); + packageInfo *getUPackageInfo(const TQString &name); - QStringList getIChangeLog(packageInfo *p); + TQStringList getIChangeLog(packageInfo *p); - void listPackList(QPtrList *pki, - const QString &fname, cacheObj *cp); + void listPackList(TQPtrList *pki, + const TQString &fname, cacheObj *cp); - virtual void distPackages(QPtrList *pki, cacheObj *cp); - void listUnIPackages(QPtrList *pki, LcacheObj *pCache); + virtual void distPackages(TQPtrList *pki, cacheObj *cp); + void listUnIPackages(TQPtrList *pki, LcacheObj *pCache); - QStringList getIFileList(packageInfo *p); - QStringList getUFileList(const QString &fn); + TQStringList getIFileList(packageInfo *p); + TQStringList getUFileList(const TQString &fn); }; #endif diff --git a/kpackage/fbsdInterface.cpp b/kpackage/fbsdInterface.cpp index 980ad36..8b5a6d6 100644 --- a/kpackage/fbsdInterface.cpp +++ b/kpackage/fbsdInterface.cpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include @@ -66,7 +66,7 @@ fbsdInterface::fbsdInterface():pkgInterface() { packagePattern = "*.tgz *.tbz"; typeID = "/tbz"; - QDict ports(17777, false); + TQDict ports(17777, false); queryMsg = i18n("Querying package list: "); locatedialog = new Locations(i18n("Location of BSD Packages and Ports")); @@ -74,7 +74,7 @@ fbsdInterface::fbsdInterface():pkgInterface() { i18n("Location of Ports Tree (e.g. /usr/ports or /usr/opt)"),FALSE); locatedialog->dLocations(1, 6, this, i18n("Packages"), "Pkg", "*.tbz", i18n("Location of Folders Containing BSD Packages or Package Trees")); - connect(locatedialog, SIGNAL(returnVal(LcacheObj *)), this, SLOT(setAvail(LcacheObj *))); + connect(locatedialog, TQT_SIGNAL(returnVal(LcacheObj *)), this, TQT_SLOT(setAvail(LcacheObj *))); locatedialog->apply_slot(); paramsInst.append(new param(i18n("Ignore Scripts"),FALSE,FALSE,"-I")); @@ -92,11 +92,11 @@ fbsdInterface::~fbsdInterface() { } -bool fbsdInterface::isType(char *, const QString &fname) { +bool fbsdInterface::isType(char *, const TQString &fname) { // These files are .tgz or .tbz files. Pass it to pkg_info and see whether it // succeeds. if (hasProgram) { - QString cmd = PKG_INFO_BIN; // cmd += "_q"; + TQString cmd = PKG_INFO_BIN; // cmd += "_q"; cmd += " -q "; cmd += fname; kpty->run(cmd); @@ -110,23 +110,23 @@ bool fbsdInterface::isType(char *, const QString &fname) { } } -static void insertGroups(QMap *a, QString cats) +static void insertGroups(TQMap *a, TQString cats) { /* Create the list of groups (which is space-separated), and then ** iterate through it with the iterator i. count is just to ** distinguish the first entry (count==0) from the rest, since ** the key used in a->insert() needs to be different. */ - QStringList grlist = QStringList::split(' ',cats); + TQStringList grlist = TQStringList::split(' ',cats); unsigned int count = 0; - for (QStringList::Iterator i = grlist.begin(); + for (TQStringList::Iterator i = grlist.begin(); i != grlist.end(); ++count,++i) { a->insert( (count ? "also in" : "group"), *i); } } -packageInfo *fbsdInterface::getPackageInfo(char mode, const QString &pname, const QString &version) { - QString name( pname); +packageInfo *fbsdInterface::getPackageInfo(char mode, const TQString &pname, const TQString &version) { + TQString name( pname); bool installed = false; kpackage->setStatus(i18n("Getting package info")); @@ -136,14 +136,14 @@ packageInfo *fbsdInterface::getPackageInfo(char mode, const QString &pname, cons name += "-" + version; } - QMap a; + TQMap a; // Get the package name first (for mode = 'u'). if (mode == 'u') { - QString cmd = PKG_INFO_BIN; // cmd += "_qf"; + TQString cmd = PKG_INFO_BIN; // cmd += "_qf"; cmd += " -qf "; cmd += name; - QStringList list = kpty->run(cmd); + TQStringList list = kpty->run(cmd); int last_dir = name.find('/'); if (last_dir != -1) { @@ -155,10 +155,10 @@ packageInfo *fbsdInterface::getPackageInfo(char mode, const QString &pname, cons } if (list.count() > 0) { - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { // Look for a line of the form '@name ' if ((*it).left(5) == "@name") { - QString n = (*it).mid(6); + TQString n = (*it).mid(6); addNV(a, n); break; } @@ -169,19 +169,19 @@ packageInfo *fbsdInterface::getPackageInfo(char mode, const QString &pname, cons // Open a pipe to a pkg_info process in order to read the one line comment // and description for the package. This works for both installed packages // and for files. - QString cmd = PKG_INFO_BIN; // cmd += "_q"; + TQString cmd = PKG_INFO_BIN; // cmd += "_q"; cmd += " -q "; cmd += name; - QStringList list = kpty->run(cmd); + TQStringList list = kpty->run(cmd); - QStringList::Iterator it = list.begin(); + TQStringList::Iterator it = list.begin(); if (list.count() > 0) { - QStringList::Iterator it = list.begin(); + TQStringList::Iterator it = list.begin(); a["summary"] = *it; it++; - QString desc; + TQString desc; int prevlen = 0, len; for ( ; it != list.end(); ++it ) { len = (*it).length(); @@ -205,7 +205,7 @@ packageInfo *fbsdInterface::getPackageInfo(char mode, const QString &pname, cons } a["description"] = desc; } else { - kpackage->setStatus(QString::null); + kpackage->setStatus(TQString::null); return 0; } @@ -213,11 +213,11 @@ packageInfo *fbsdInterface::getPackageInfo(char mode, const QString &pname, cons ret->packageState = installed? packageInfo::INSTALLED : packageInfo::AVAILABLE; ret->fixup(); if (!installed) ret->smerge(typeID); - kpackage->setStatus(QString::null); + kpackage->setStatus(TQString::null); return ret; } -QStringList fbsdInterface::getChangeLog(packageInfo *) { +TQStringList fbsdInterface::getChangeLog(packageInfo *) { return 0; } @@ -230,32 +230,32 @@ bool fbsdInterface::changeTab(packageInfo *) { return FALSE; } -QStringList fbsdInterface::getFileList(packageInfo *p) { +TQStringList fbsdInterface::getFileList(packageInfo *p) { // Run pkg_info on the package name to get the file list. // The file list is returned on stdout, one per line. kpackage->setStatus(i18n("Getting file list")); - QStringList ret; + TQStringList ret; // Find the full name 'name-version', or just 'name' if version is empty. // Check first that it is actually installed. - QString name( p->getProperty("filename")); + TQString name( p->getProperty("filename")); if (!name.isEmpty() && (p->packageState != packageInfo::INSTALLED)) { - QString qbname( p->getProperty("base")); + TQString qbname( p->getProperty("base")); if (!qbname.isEmpty()) name = qbname + "/" + name; } else { if (!p->hasProperty("name")) { ret.append(i18n("Can't find package name!")); - kpackage->setStatus(QString::null); + kpackage->setStatus(TQString::null); return ret; } name = p->getProperty("name"); - QString version( p->getProperty("version")); + TQString version( p->getProperty("version")); if (!version.isEmpty()) { name = name + "-" + version; } @@ -263,24 +263,24 @@ QStringList fbsdInterface::getFileList(packageInfo *p) { // Open a pipe to a pkg_info process in order to read the file list. // This works for both installed packages and for files. - QString cmd = PKG_INFO_BIN; // cmd += "_Lq"; + TQString cmd = PKG_INFO_BIN; // cmd += "_Lq"; cmd += " -L -q "; cmd += name; - QStringList list = kpty->run(cmd); + TQStringList list = kpty->run(cmd); ret = list; - kpackage->setStatus(QString::null); + kpackage->setStatus(TQString::null); return ret; } -// QPtrList *verify(packageInfo *p, QPtrList *files); +// TQPtrList *verify(packageInfo *p, TQPtrList *files); -QString fbsdInterface::doUninstall(int uninstallFlags, const QString &packs, bool &) +TQString fbsdInterface::doUninstall(int uninstallFlags, const TQString &packs, bool &) { - QString s = PKG_DELETE_BIN; + TQString s = PKG_DELETE_BIN; s += " "; s += setOptions(uninstallFlags, paramsUninst); s += packs; @@ -291,10 +291,10 @@ QString fbsdInterface::doUninstall(int uninstallFlags, const QString &packs, boo } -QString fbsdInterface::doInstall(int installFlags, const QString &packs, bool &) +TQString fbsdInterface::doInstall(int installFlags, const TQString &packs, bool &) { - QString s = PKG_ADD_BIN; + TQString s = PKG_ADD_BIN; s += " "; s += setOptions(installFlags, paramsInst); s += packs; @@ -304,35 +304,35 @@ QString fbsdInterface::doInstall(int installFlags, const QString &packs, bool &) return s; } -QString fbsdInterface::uninstall(int uninstallFlags, packageInfo *p, bool &test) +TQString fbsdInterface::uninstall(int uninstallFlags, packageInfo *p, bool &test) { - QString packs( p->getProperty("name")); - QString vers( p->getProperty("version")); + TQString packs( p->getProperty("name")); + TQString vers( p->getProperty("version")); if (vers.length() > 0) packs += "-" + vers; return doUninstall(uninstallFlags, packs, test); } -QString fbsdInterface::uninstall(int uninstallFlags, QPtrList *p, bool &test) +TQString fbsdInterface::uninstall(int uninstallFlags, TQPtrList *p, bool &test) { - QString packs ; + TQString packs ; packageInfo *i; for (i = p->first(); i!= 0; i = p->next()) { packs += i->getProperty("name"); - QString vers( i->getProperty("version")); + TQString vers( i->getProperty("version")); if (vers.length() != 0) packs += "-" + vers; packs += " "; } return doUninstall( uninstallFlags, packs, test); } -QStringList fbsdInterface::FindFile(const QString &, bool) { - QStringList tmp; +TQStringList fbsdInterface::FindFile(const TQString &, bool) { + TQStringList tmp; return tmp; } -bool fbsdInterface::parseName(const QString &name, QString *n, QString *v) { +bool fbsdInterface::parseName(const TQString &name, TQString *n, TQString *v) { int m1; m1 = name.findRev('-'); @@ -342,12 +342,12 @@ bool fbsdInterface::parseName(const QString &name, QString *n, QString *v) { return true; } -void fbsdInterface::addNV(QMap &d, const QString &name) { - QString n, v; +void fbsdInterface::addNV(TQMap &d, const TQString &name) { + TQString n, v; if (!parseName(name, &n, &v)) { n = name; - v = QString::null; + v = TQString::null; } d.insert("name", n); @@ -369,10 +369,10 @@ void fbsdInterface::setAvail(LcacheObj *slist) { if (cp && !cp->location.isEmpty()) { for (; cp != 0; cp = packageLoc->next()) { - QString oldloc = cp->location; + TQString oldloc = cp->location; cp->location += "/INDEX"; - QString s = getPackList(cp); - if (!s.isEmpty()) bsdPortsIndexItem::processFile(this, QFile::encodeName(s), true, oldloc); + TQString s = getPackList(cp); + if (!s.isEmpty()) bsdPortsIndexItem::processFile(this, TQFile::encodeName(s), true, oldloc); cp->location = oldloc; } } @@ -380,7 +380,7 @@ void fbsdInterface::setAvail(LcacheObj *slist) { // Try /usr/port/INDEX- on FreeBSD struct utsname fbsdName; if(uname(&fbsdName) != -1 && !strcmp(fbsdName.sysname, "FreeBSD")) - bsdPortsIndexItem::processFile(this, QString("/usr/ports/INDEX-").append(*fbsdName.release), false, "/usr/ports"); + bsdPortsIndexItem::processFile(this, TQString("/usr/ports/INDEX-").append(*fbsdName.release), false, "/usr/ports"); // Try the standard ports tree locations. bsdPortsIndexItem::processFile(this, "/usr/ports/INDEX", false, "/usr/ports"); // FreeBSD/OpenBSD @@ -388,17 +388,17 @@ void fbsdInterface::setAvail(LcacheObj *slist) { } -void fbsdInterface::listPackages(QPtrList *pki) { +void fbsdInterface::listPackages(TQPtrList *pki) { kdDebug() << k_funcinfo << endl; listInstalledPackages(pki); - QDictIterator it( ports ); // See QDictIterator + TQDictIterator it( ports ); // See QDictIterator for( ; it.current(); ++it ) { bsdPortsIndexItem *scan = it.current(); if (!scan->installed /*&& scan->bin */) { - QMap a; + TQMap a; addNV(a, scan->fields[bsdPortsIndexItem::NAME]); a["summary"] = scan->fields[bsdPortsIndexItem::COMMENT]; @@ -424,7 +424,7 @@ void fbsdInterface::listPackages(QPtrList *pki) { } -int fbsdInterface::parseItem(QStringList::Iterator &it, QString &name, QString &value, QString separator, QStringList list ) { +int fbsdInterface::parseItem(TQStringList::Iterator &it, TQString &name, TQString &value, TQString separator, TQStringList list ) { if ((*it).left(separator.length()) == separator) { name = *it; name = name.mid(separator.length()); @@ -450,11 +450,11 @@ int fbsdInterface::parseItem(QStringList::Iterator &it, QString &name, QString & return 1; } -int fbsdInterface::pathInfo(QMap &a) +int fbsdInterface::pathInfo(TQMap &a) { int pkg_state = packageInfo::INSTALLED; if (a["group"].isEmpty()) { - QString s, ps; + TQString s, ps; ps = a["name"]; if (ps.isEmpty()) s = ps; @@ -463,22 +463,22 @@ int fbsdInterface::pathInfo(QMap &a) ps = a["version"]; if (!ps.isEmpty()) - s.append(QString("-")+(ps)); + s.append(TQString("-")+(ps)); kdDebug() << "Package " << (s) << " has no group." << endl; /* This must be an installed package with no INDEX entry, ** which usually means that the port has been updated. */ - QString cmd = PKG_INFO_BIN; + TQString cmd = PKG_INFO_BIN; // cmd += "2"; cmd += " -ol "; cmd += INFO_SEPARATOR; - QStringList list = kpty->run(cmd); + TQStringList list = kpty->run(cmd); if (list.count() > 0) { - QStringList::Iterator it = list.begin(); - QString name, value; + TQStringList::Iterator it = list.begin(); + TQString name, value; parseItem(it, name, value, INFO_SEPARATOR, list); // Information parseItem(it, name, value, INFO_SEPARATOR, list); // Path @@ -492,7 +492,7 @@ int fbsdInterface::pathInfo(QMap &a) return pkg_state; } - void fbsdInterface::listInstalledPackages(QPtrList *pki) { + void fbsdInterface::listInstalledPackages(TQPtrList *pki) { kdDebug() << k_funcinfo << endl; // Open a pipe to a pkg_info process in order to read the comment, name @@ -500,10 +500,10 @@ int fbsdInterface::pathInfo(QMap &a) kpackage->setStatus(i18n("Querying BSD packages database for installed packages")); - QString cmd = PKG_INFO_BIN; + TQString cmd = PKG_INFO_BIN; cmd += " -acdl "; cmd += INFO_SEPARATOR; - QStringList list = kpty->run(cmd); + TQStringList list = kpty->run(cmd); // We should now get: // INFO_SEPARATORInformation for pkgname: @@ -518,17 +518,17 @@ int fbsdInterface::pathInfo(QMap &a) // INFO_SEPARATOR // INFO_SEPARATORInformation for [etc] - QMap a; - QString name, value; + TQMap a; + TQString name, value; if (list.count() > 0) { - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { parseItem(it, name, value, INFO_SEPARATOR, list); // Information // Find the last word on this line (which should be the package name) minus a trailing :. - QString pkg = name.section(' ',-1); + TQString pkg = name.section(' ',-1); if (pkg.isEmpty()) { KpMsgE(i18n("Unexpected output from pkg_info (looking for package name): %1").arg(value), TRUE); - kpackage->setStatus(QString::null); + kpackage->setStatus(TQString::null); return; } else { if (pkg[pkg.length()-1] == ':') { @@ -577,16 +577,16 @@ int fbsdInterface::pathInfo(QMap &a) } -bsdPortsIndexItem::bsdPortsIndexItem(fbsdInterface *parent, char *desc, bool binaries, const QString &dname) : bin(binaries), port(!binaries), installed(false) { - fields = QStringList::split('|', desc, TRUE); - QString name = fields[NAME]; +bsdPortsIndexItem::bsdPortsIndexItem(fbsdInterface *parent, char *desc, bool binaries, const TQString &dname) : bin(binaries), port(!binaries), installed(false) { + fields = TQStringList::split('|', desc, TRUE); + TQString name = fields[NAME]; bsdPortsIndexItem *port = parent->ports[name]; if (port) { port->bin = port->bin || bin; port->port = port->port || port; if (binaries) { - port->bin_filename = QString(name) + ".tbz"; + port->bin_filename = TQString(name) + ".tbz"; port->bin_filename_base = dname + "/"; } fields[NAME] = ""; // Acts as a 'not used' tag. @@ -594,13 +594,13 @@ bsdPortsIndexItem::bsdPortsIndexItem(fbsdInterface *parent, char *desc, bool bin } if (binaries) { - bin_filename = QString(name) + ".tbz"; + bin_filename = TQString(name) + ".tbz"; bin_filename_base = dname + "/"; } } -void bsdPortsIndexItem::processFile(fbsdInterface *parent, const QString &fname, bool binaries, const QString &dname) { +void bsdPortsIndexItem::processFile(fbsdInterface *parent, const TQString &fname, bool binaries, const TQString &dname) { // Read the file in to a buffer and null terminate it. struct stat s; diff --git a/kpackage/fbsdInterface.h b/kpackage/fbsdInterface.h index 270b0c9..4966711 100644 --- a/kpackage/fbsdInterface.h +++ b/kpackage/fbsdInterface.h @@ -34,8 +34,8 @@ //#ifdef HAVE_FBSD_PKGTOOLS -#include -#include +#include +#include #include "packageInfo.h" #include "pkgInterface.h" @@ -54,11 +54,11 @@ public: void init(); - bool isType(char *buf, const QString &fname); + bool isType(char *buf, const TQString &fname); - packageInfo *getPackageInfo(char mode, const QString &name, const QString &version); - QStringList getFileList(packageInfo *p); - QStringList getChangeLog(packageInfo *p); + packageInfo *getPackageInfo(char mode, const TQString &name, const TQString &version); + TQStringList getFileList(packageInfo *p); + TQStringList getChangeLog(packageInfo *p); bool filesTab(packageInfo *p); // If files tab is to be enabled @@ -66,33 +66,33 @@ public: bool changeTab(packageInfo *p); // If change log tab is to be enabled - QString uninstall(int uninstallFlags, QPtrList *p, bool &test); - QString uninstall(int uninstallFlags, packageInfo *p, bool &test); - QString doUninstall(int uninstallFlags, const QString &packs, bool &test); - QString doInstall(int installFlags, const QString &packs, bool &test); + TQString uninstall(int uninstallFlags, TQPtrList *p, bool &test); + TQString uninstall(int uninstallFlags, packageInfo *p, bool &test); + TQString doUninstall(int uninstallFlags, const TQString &packs, bool &test); + TQString doInstall(int installFlags, const TQString &packs, bool &test); - QStringList FindFile(const QString &name, bool seachAll=false); - void collectDepends(packageInfo *p, const QString &name, int src); - bool parseName(const QString& name, QString *n, QString *v); + TQStringList FindFile(const TQString &name, bool seachAll=false); + void collectDepends(packageInfo *p, const TQString &name, int src); + bool parseName(const TQString& name, TQString *n, TQString *v); - void listInstalledPackages(QPtrList *pki); - void listPackages(QPtrList *pki); + void listInstalledPackages(TQPtrList *pki); + void listPackages(TQPtrList *pki); - QDict ports; + TQDict ports; public slots: void setLocation(); void setAvail(LcacheObj *); private: /** - * @short Add the name and version identifiers to a QMap. + * @short Add the name and version identifiers to a TQMap. * * name is parsed in to name and version and these are added to * d. Errors are handled. */ - void addNV(QMap &d, const QString &name); - int parseItem(QStringList::Iterator &it, QString &name, QString &value, QString separator, QStringList list ); - int pathInfo(QMap &a); + void addNV(TQMap &d, const TQString &name); + int parseItem(TQStringList::Iterator &it, TQString &name, TQString &value, TQString separator, TQStringList list ); + int pathInfo(TQMap &a); }; @@ -117,7 +117,7 @@ public: * * dname is the name of the base directory of this ports/packages tree. */ - bsdPortsIndexItem(fbsdInterface *parent, char *desc, bool binaries, const QString &dname); + bsdPortsIndexItem(fbsdInterface *parent, char *desc, bool binaries, const TQString &dname); /** @short true if this has a binary packages. */ bool bin; @@ -131,13 +131,13 @@ public: /** @short The next item in this linked list */ bsdPortsIndexItem *next; - QStringList fields; + TQStringList fields; enum {NAME=0, PATH, PREFIX, COMMENT, DESC_PATH, MAINT, CATS, BDEPS, RDEPS}; - QString bin_filename; - QString bin_filename_base; - QString port_dirname; + TQString bin_filename; + TQString bin_filename_base; + TQString port_dirname; /** * @short Given the path to an INDEX file process each port in it. @@ -145,7 +145,7 @@ public: * binaries should be true if the file is an index for packages, false for ports. * dname is the base directory. */ - static void processFile(fbsdInterface *parent, const QString &fname, bool binaries, const QString &dname); + static void processFile(fbsdInterface *parent, const TQString &fname, bool binaries, const TQString &dname); private: unsigned int name_hash; diff --git a/kpackage/findf.cpp b/kpackage/findf.cpp index 20e6a7c..9b51944 100644 --- a/kpackage/findf.cpp +++ b/kpackage/findf.cpp @@ -26,8 +26,8 @@ #include "../config.h" -#include -#include +#include +#include #include #include @@ -43,7 +43,7 @@ extern pkgInterface *kpinterface[]; extern Opts *opts; -FindF::FindF(QWidget *parent) +FindF::FindF(TQWidget *parent) : KDialogBase(parent, "find_file", false, i18n("Find File"), User1 | Close, User1, true, @@ -51,28 +51,28 @@ FindF::FindF(QWidget *parent) { tick = UserIcon("ptick"); - QFrame *page = makeMainWidget(); + TQFrame *page = makeMainWidget(); - setFocusPolicy(QWidget::StrongFocus); + setFocusPolicy(TQWidget::StrongFocus); - QVBoxLayout* vtop = new QVBoxLayout( page, 10, 10, "vtop"); - QFrame *frame1 = new QGroupBox(i18n("Find Package"), page, "frame1"); + TQVBoxLayout* vtop = new TQVBoxLayout( page, 10, 10, "vtop"); + TQFrame *frame1 = new TQGroupBox(i18n("Find Package"), page, "frame1"); vtop->addWidget(frame1,1); - QGridLayout* gtop = new QGridLayout( frame1, 1, 1, 20 ); + TQGridLayout* gtop = new TQGridLayout( frame1, 1, 1, 20 ); // gtop->setMargin( KDialog::marginHint() ); gtop->setSpacing( KDialog::spacingHint() ); - value = new QLineEdit( frame1, "value" ); - connect(value,SIGNAL(textChanged ( const QString & )),this,SLOT(textChanged ( const QString & ))); + value = new TQLineEdit( frame1, "value" ); + connect(value,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(textChanged ( const TQString & ))); value->setFocus(); - QLabel *valueLabel = new QLabel(value, i18n("Find:"), frame1); + TQLabel *valueLabel = new TQLabel(value, i18n("Find:"), frame1); valueLabel->setAlignment( AlignRight ); tab = new KListView(frame1, "tab"); - connect(tab, SIGNAL(selectionChanged ( QListViewItem * )), - this, SLOT(search( QListViewItem * ))); + connect(tab, TQT_SIGNAL(selectionChanged ( TQListViewItem * )), + this, TQT_SLOT(search( TQListViewItem * ))); tab->addColumn(i18n("Installed"),18); tab->addColumn(i18n("Type"),110); tab->addColumn("",0); // Hidden column for package type @@ -82,9 +82,9 @@ FindF::FindF(QWidget *parent) tab->setSorting(1); if (kpackage->management->dirInstPackages->find("apt-file/deb")) { - searchAll = new QCheckBox(i18n("Also search uninstalled packages"), frame1, "searchAll"); + searchAll = new TQCheckBox(i18n("Also search uninstalled packages"), frame1, "searchAll"); } else { - searchAll = new QCheckBox(i18n("Also search uninstalled packages (apt-file needs to be installed)"), frame1, "searchAll"); + searchAll = new TQCheckBox(i18n("Also search uninstalled packages (apt-file needs to be installed)"), frame1, "searchAll"); } searchAll->setChecked(FALSE); @@ -94,8 +94,8 @@ FindF::FindF(QWidget *parent) gtop->addWidget(searchAll, 2, 0); - connect(this, SIGNAL(user1Clicked()), this, SLOT(ok_slot())); - connect(this, SIGNAL(closeClicked()), this, SLOT(done_slot())); + connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(ok_slot())); + connect(this, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(done_slot())); enableButton(User1 , false); show(); @@ -121,7 +121,7 @@ void FindF::checkSearchAll() searchAll->setEnabled(hasAll); } -void FindF::textChanged ( const QString & text) +void FindF::textChanged ( const TQString & text) { enableButton(User1 , !text.isEmpty()); } @@ -131,37 +131,37 @@ void FindF::ok_slot() doFind(value->text()); } -void FindF::doFind(const QString &str) +void FindF::doFind(const TQString &str) { - QString t; + TQString t; int i, cnt = 0; bool all = searchAll->isChecked(); - QApplication::setOverrideCursor( waitCursor ); + TQApplication::setOverrideCursor( waitCursor ); tab->clear(); for (i = 0; i < kpinterfaceN; i++) { if (kpinterface[i] && opts->handlePackage[i]) { - QStringList filelist = kpinterface[i]->FindFile(str, all); + TQStringList filelist = kpinterface[i]->FindFile(str, all); if (filelist.count() > 0) { cnt++; - for ( QStringList::Iterator it = filelist.begin(); it != filelist.end(); ++it ) { + for ( TQStringList::Iterator it = filelist.begin(); it != filelist.end(); ++it ) { if ((*it).find("diversion by") >= 0) { - new QListViewItem(tab, "", *it); + new TQListViewItem(tab, "", *it); } int t1 = (*it).find('\t'); - QString s1 = (*it).left(t1); - QString s2 = (*it).right((*it).length()-t1); + TQString s1 = (*it).left(t1); + TQString s2 = (*it).right((*it).length()-t1); s2 = s2.stripWhiteSpace(); - QListViewItem *ql = new QListViewItem(tab, "", kpinterface[i]->name, kpinterface[i]->head, s1, s2); + TQListViewItem *ql = new TQListViewItem(tab, "", kpinterface[i]->name, kpinterface[i]->head, s1, s2); - QString tx = s1 + kpinterface[i]->typeID; + TQString tx = s1 + kpinterface[i]->typeID; if (kpackage->management->dirInstPackages->find(tx)) { ql->setPixmap(0,tick); } @@ -171,10 +171,10 @@ void FindF::doFind(const QString &str) } if (!cnt) { - new QListViewItem(tab, "", i18n("--Nothing found--")); + new TQListViewItem(tab, "", i18n("--Nothing found--")); } - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } void FindF::done_slot() @@ -182,14 +182,14 @@ void FindF::done_slot() hide(); } -void FindF::resizeEvent(QResizeEvent *){ +void FindF::resizeEvent(TQResizeEvent *){ } -void FindF::search(QListViewItem *item) +void FindF::search(TQListViewItem *item) { int p; - QString s = item->text(3); + TQString s = item->text(3); s = s.stripWhiteSpace(); kdDebug() << "searchF=" << s << "\n"; @@ -203,12 +203,12 @@ void FindF::search(QListViewItem *item) kpackage->management->treeList->changePack(k); } -void FindF::dragEnterEvent(QDragEnterEvent* e) +void FindF::dragEnterEvent(TQDragEnterEvent* e) { e->accept(KURLDrag::canDecode(e)); } -void FindF::dropEvent(QDropEvent *de) // something has been dropped +void FindF::dropEvent(TQDropEvent *de) // something has been dropped { KURL::List list; if (!KURLDrag::decode(de, list) || list.isEmpty()) @@ -217,7 +217,7 @@ void FindF::dropEvent(QDropEvent *de) // something has been dropped const KURL &url = list.first(); if (url.isLocalFile()) { - QString file = url.path(-1); + TQString file = url.path(-1); value->setText(file); doFind(file); } else { diff --git a/kpackage/findf.h b/kpackage/findf.h index 5208c05..62b8a0e 100644 --- a/kpackage/findf.h +++ b/kpackage/findf.h @@ -34,14 +34,14 @@ #include // Qt Headers -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE headers #include @@ -55,26 +55,26 @@ class FindF : public KDialogBase public: - FindF ( QWidget *parent = 0); + FindF ( TQWidget *parent = 0); ~FindF(); - void resizeEvent(QResizeEvent *); - void dropEvent(QDropEvent *); - void dragEnterEvent(QDragEnterEvent* e); + void resizeEvent(TQResizeEvent *); + void dropEvent(TQDropEvent *); + void dragEnterEvent(TQDragEnterEvent* e); void checkSearchAll(); private: - void doFind(const QString &str); + void doFind(const TQString &str); // Do the actual search - QLineEdit *value; - QListView *tab; - QVBoxLayout* vl; - QVBoxLayout* vtop, vf; + TQLineEdit *value; + TQListView *tab; + TQVBoxLayout* vl; + TQVBoxLayout* vtop, vf; - QHBoxLayout* hb; - QCheckBox *searchAll; - QPixmap tick; + TQHBoxLayout* hb; + TQCheckBox *searchAll; + TQPixmap tick; signals: void findf_signal(); @@ -83,8 +83,8 @@ signals: public slots: void done_slot(); void ok_slot(); - void search(QListViewItem *); - void textChanged ( const QString & text); + void search(TQListViewItem *); + void textChanged ( const TQString & text); }; diff --git a/kpackage/gentooInterface.cpp b/kpackage/gentooInterface.cpp index a8ef275..448b74c 100644 --- a/kpackage/gentooInterface.cpp +++ b/kpackage/gentooInterface.cpp @@ -69,12 +69,12 @@ Gentoo::Gentoo() archesPossible << "~x86" << "x86"; portageDir="/usr/portage/"; - QFile f(portageDir+"profiles/package.mask"); + TQFile f(portageDir+"profiles/package.mask"); if (f.open(IO_ReadOnly)) { - QTextStream stream( &f ); + TQTextStream stream( &f ); - QString line; + TQString line; while (!stream.atEnd()) { line = stream.readLine(); @@ -96,15 +96,15 @@ Gentoo::~Gentoo() } ////////////////////////////////////////////////////////////////////////////// -bool Gentoo::isType(char * /*buf*/, const QString &) +bool Gentoo::isType(char * /*buf*/, const TQString &) { return false; } -bool Gentoo::parseName(const QString& name, QString *n, QString *v) +bool Gentoo::parseName(const TQString& name, TQString *n, TQString *v) { // Taken from the portage code, should be correct - QRegExp r("([^/]+)-((\\d+(\\.\\d+)*[a-z]*)(_(alpha|beta|pre|rc|p)\\d*)?(-r(\\d+))?)$"); + TQRegExp r("([^/]+)-((\\d+(\\.\\d+)*[a-z]*)(_(alpha|beta|pre|rc|p)\\d*)?(-r(\\d+))?)$"); r.search(name); @@ -117,25 +117,25 @@ bool Gentoo::parseName(const QString& name, QString *n, QString *v) return true; } -void Gentoo::listInstalledPackages(QPtrList *pki) +void Gentoo::listInstalledPackages(TQPtrList *pki) { - QString vb; + TQString vb; packageInfo *p; - QString sline = i18n("Looking for Gentoo packages: "); + TQString sline = i18n("Looking for Gentoo packages: "); kpackage->setStatus(sline); kpackage->setPercent(0); - QFile f(portageDir+"profiles/categories"); + TQFile f(portageDir+"profiles/categories"); if (!f.open(IO_ReadOnly)) { kdWarning() << "Couldn't open categories file" << endl; return; } - QTextStream stream( &f ); - QStringList categories; + TQTextStream stream( &f ); + TQStringList categories; while (!stream.atEnd()) { categories.append(stream.readLine()); @@ -143,7 +143,7 @@ void Gentoo::listInstalledPackages(QPtrList *pki) int categoriesCount = categories.count(); int categoriesDone = 0; - for (QStringList::Iterator category = categories.begin(); category != categories.end(); ++category) + for (TQStringList::Iterator category = categories.begin(); category != categories.end(); ++category) { kpackage->setPercent(categoriesDone/categoriesCount); categoriesDone += 100; @@ -151,9 +151,9 @@ void Gentoo::listInstalledPackages(QPtrList *pki) if (*category == "packages" || *category == "local" || *category == "virtual") continue; - QDir d("/var/db/pkg/"+*category); - QStringList packages = d.entryList(QDir::Dirs); - for (QStringList::Iterator it = packages.begin(); it != packages.end(); ++it) + TQDir d("/var/db/pkg/"+*category); + TQStringList packages = d.entryList(TQDir::Dirs); + for (TQStringList::Iterator it = packages.begin(); it != packages.end(); ++it) { if (*it != "." && *it != "..") { @@ -168,20 +168,20 @@ void Gentoo::listInstalledPackages(QPtrList *pki) } } d.setPath("/var/cache/edb/dep/"+*category); - packages = d.entryList(QDir::Files); - for (QStringList::Iterator it = packages.begin(); it != packages.end(); ++it) + packages = d.entryList(TQDir::Files); + for (TQStringList::Iterator it = packages.begin(); it != packages.end(); ++it) { if (*it != "." && *it != "..") { bool isMasked = false; - QString version, name; + TQString version, name; if (!parseName(*it, &name, &version)) { kdDebug() << "Couldn't parse name: " << *it << endl; continue; } - for (QStringList::Iterator maskIt = packageMask.begin(); maskIt != packageMask.end(); ++maskIt) + for (TQStringList::Iterator maskIt = packageMask.begin(); maskIt != packageMask.end(); ++maskIt) { // FIXME Should all be handled, just not implemented yet if ((*maskIt).startsWith("<") || (*maskIt).startsWith("=") || (*maskIt).startsWith("~") || (*maskIt).startsWith(">")) @@ -217,10 +217,10 @@ void Gentoo::listInstalledPackages(QPtrList *pki) ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // mode: i = query installed u = query uninstalled -packageInfo *Gentoo::getPackageInfo(char mode, const QString &name, const QString &version) +packageInfo *Gentoo::getPackageInfo(char mode, const TQString &name, const TQString &version) { packageInfo *pki = 0; - QString vb,search; + TQString vb,search; switch(mode) { @@ -242,16 +242,16 @@ packageInfo *Gentoo::getPackageInfo(char mode, const QString &name, const QStrin ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -packageInfo *Gentoo::collectInstalledInfo(const QString& name, const QString& category) +packageInfo *Gentoo::collectInstalledInfo(const TQString& name, const TQString& category) { - QMap a; + TQMap a; - QIODevice* iod(KFilterDev::deviceForFile("/var/db/pkg/"+category+"/"+name+"/environment.bz2","application/x-bzip2", true)); - QString line; + TQIODevice* iod(KFilterDev::deviceForFile("/var/db/pkg/"+category+"/"+name+"/environment.bz2","application/x-bzip2", true)); + TQString line; if (!iod->open(IO_ReadOnly)) return 0; - QTextStream stream( iod ); - QString n, version, description; + TQTextStream stream( iod ); + TQString n, version, description; while (!stream.atEnd()) { line = stream.readLine(); @@ -285,9 +285,9 @@ packageInfo *Gentoo::collectInstalledInfo(const QString& name, const QString& ca } ////////////////////////////////////////////////////////////////////////////// -packageInfo *Gentoo::collectUninstalledInfo(const QString& name, const QString& category, const QString& version) +packageInfo *Gentoo::collectUninstalledInfo(const TQString& name, const TQString& category, const TQString& version) { - QMap a; + TQMap a; a.insert("name", name); a.insert("group", category); @@ -295,7 +295,7 @@ packageInfo *Gentoo::collectUninstalledInfo(const QString& name, const QString& a.insert("base", portageDir+category+"/"+name); a.insert("filename", name+"-"+version+".ebuild"); - QFile f("/var/cache/edb/dep/"+category+"/"+name+"-"+version); + TQFile f("/var/cache/edb/dep/"+category+"/"+name+"-"+version); if (!f.open(IO_ReadOnly)) { kdDebug() << "Couldn't read: " << name << "-" << version << endl; @@ -316,19 +316,19 @@ packageInfo *Gentoo::collectUninstalledInfo(const QString& name, const QString& // 11: IUSE // Skip first 7 lines for now - QTextStream stream( &f ); + TQTextStream stream( &f ); for (int i=0; i < 7 && !stream.atEnd(); i++) stream.readLine(); if (!stream.atEnd()) a.insert("summary", stream.readLine()); - QStringList keywords = QStringList::split(' ', stream.readLine()); + TQStringList keywords = TQStringList::split(' ', stream.readLine()); bool works = false; - for (QStringList::Iterator it = keywords.begin(); it != keywords.end(); ++it) + for (TQStringList::Iterator it = keywords.begin(); it != keywords.end(); ++it) { - for (QStringList::Iterator it2 = archesPossible.begin(); it2 != archesPossible.end(); ++it2) + for (TQStringList::Iterator it2 = archesPossible.begin(); it2 != archesPossible.end(); ++it2) { if (*it == *it2) { @@ -354,12 +354,12 @@ packageInfo *Gentoo::collectUninstalledInfo(const QString& name, const QString& ////////////////////////////////////////////////////////////////////////////// -QStringList Gentoo::getChangeLog(packageInfo *p) { - QStringList clog; - QFile f(portageDir+p->getProperty("group")+"/"+p->getProperty("name")+"/ChangeLog"); +TQStringList Gentoo::getChangeLog(packageInfo *p) { + TQStringList clog; + TQFile f(portageDir+p->getProperty("group")+"/"+p->getProperty("name")+"/ChangeLog"); if (!f.open(IO_ReadOnly)) return clog; - QTextStream stream(&f); + TQTextStream stream(&f); while (!stream.atEnd()) clog.append(stream.readLine()); return clog; @@ -375,16 +375,16 @@ bool Gentoo::changeTab(packageInfo *) { } ////////////////////////////////////////////////////////////////////////////// -QStringList Gentoo::getFileList(packageInfo *p) +TQStringList Gentoo::getFileList(packageInfo *p) { - QStringList filelist; + TQStringList filelist; - QFile f("/var/db/pkg/"+p->getProperty("group")+"/"+p->getProperty("name")+"-"+p->getProperty("version")+"/CONTENTS"); + TQFile f("/var/db/pkg/"+p->getProperty("group")+"/"+p->getProperty("name")+"-"+p->getProperty("version")+"/CONTENTS"); if (!f.open(IO_ReadOnly)) return filelist; - QTextStream stream(&f); - QString line; - QRegExp removeEnd("(.*)( [a-f0-9]{32} [0-9]+| -> [^ ] [0-9]+| -> [^\\(]*\\([^\\)]*\\))$"); + TQTextStream stream(&f); + TQString line; + TQRegExp removeEnd("(.*)( [a-f0-9]{32} [0-9]+| -> [^ ] [0-9]+| -> [^\\(]*\\([^\\)]*\\))$"); while (!stream.atEnd()) { line = stream.readLine(); @@ -395,7 +395,7 @@ QStringList Gentoo::getFileList(packageInfo *p) line = line.mid(pos+1); removeEnd.search(line); - QString cap = removeEnd.cap(1); + TQString cap = removeEnd.cap(1); if (!cap.isEmpty()) line = cap; @@ -406,9 +406,9 @@ QStringList Gentoo::getFileList(packageInfo *p) } ////////////////////////////////////////////////////////////////////////////// -QString Gentoo::uninstall(int , QPtrList *plist, bool &test) +TQString Gentoo::uninstall(int , TQPtrList *plist, bool &test) { - QString cmd; + TQString cmd; packageInfo *pk; if (test) @@ -424,9 +424,9 @@ QString Gentoo::uninstall(int , QPtrList *plist, bool &test) } ////////////////////////////////////////////////////////////////////////////// -QString Gentoo::install(int, QPtrList *plist, bool &test) +TQString Gentoo::install(int, TQPtrList *plist, bool &test) { - QString cmd; + TQString cmd; packageInfo *pk; if (test) @@ -443,9 +443,9 @@ QString Gentoo::install(int, QPtrList *plist, bool &test) ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -QStringList Gentoo::FindFile(const QString &, bool) +TQStringList Gentoo::FindFile(const TQString &, bool) { - return QStringList(); + return TQStringList(); } diff --git a/kpackage/gentooInterface.h b/kpackage/gentooInterface.h index 12eaedb..1a99f56 100644 --- a/kpackage/gentooInterface.h +++ b/kpackage/gentooInterface.h @@ -31,12 +31,12 @@ public: Gentoo(); ~Gentoo(); - bool isType(char *buf, const QString &fname); + bool isType(char *buf, const TQString &fname); param *initinstallOptions(); param *inituninstallOptions(); - packageInfo *getPackageInfo(char mode, const QString &name, const QString &version); - QStringList getFileList(packageInfo *p); - QStringList getChangeLog(packageInfo *p); + packageInfo *getPackageInfo(char mode, const TQString &name, const TQString &version); + TQStringList getFileList(packageInfo *p); + TQStringList getChangeLog(packageInfo *p); bool filesTab(packageInfo *p); // If files tab is to be enabled @@ -44,24 +44,24 @@ public: bool changeTab(packageInfo *p); // If change log tab is to be enabled - QStringList FindFile(const QString &name, bool seachAll=false); - bool parseName(const QString& name, QString *n, QString *v); + TQStringList FindFile(const TQString &name, bool seachAll=false); + bool parseName(const TQString& name, TQString *n, TQString *v); public slots: void setLocation(); void setAvail(LcacheObj *); private: - packageInfo* collectInstalledInfo(const QString& name, const QString& category); - packageInfo* collectUninstalledInfo(const QString& name, const QString& category, const QString& version); - void listInstalledPackages(QPtrList *pki); + packageInfo* collectInstalledInfo(const TQString& name, const TQString& category); + packageInfo* collectUninstalledInfo(const TQString& name, const TQString& category, const TQString& version); + void listInstalledPackages(TQPtrList *pki); - QString install(int installFlags, QPtrList *plist, bool &test); - QString uninstall(int uninstallFlags, QPtrList *plist, bool &test); + TQString install(int installFlags, TQPtrList *plist, bool &test); + TQString uninstall(int uninstallFlags, TQPtrList *plist, bool &test); - QStringList archesPossible; - QString portageDir; - QStringList packageMask; + TQStringList archesPossible; + TQString portageDir; + TQStringList packageMask; }; diff --git a/kpackage/kio.cpp b/kpackage/kio.cpp index 1eb6f52..f11ed53 100644 --- a/kpackage/kio.cpp +++ b/kpackage/kio.cpp @@ -32,11 +32,11 @@ Kio::Kio() { } -bool Kio::download(const KURL & from, const QString & to) +bool Kio::download(const KURL & from, const TQString & to) { KIO::Job *iojob = KIO::file_copy(from, to); - connect( iojob, SIGNAL( result(KIO::Job*) ), - SLOT( slotIOJobFinished( KIO::Job* ))); + connect( iojob, TQT_SIGNAL( result(KIO::Job*) ), + TQT_SLOT( slotIOJobFinished( KIO::Job* ))); // missing modal widget hack here. // I'd recommend using KIO::NetAccess instead (David). kapp->enter_loop(); @@ -61,13 +61,13 @@ Kiod::~Kiod() delete fileT; } -bool Kiod::listDir(const QString &url, const QString &fname, bool subdirs) +bool Kiod::listDir(const TQString &url, const TQString &fname, bool subdirs) { delete file; - file = new QFile(fname); + file = new TQFile(fname); if (file->open(IO_WriteOnly)) { delete fileT; - fileT = new QTextStream(file); + fileT = new TQTextStream(file); KIO::ListJob *job; if (!subdirs) job = KIO::listDir( url ); @@ -76,10 +76,10 @@ bool Kiod::listDir(const QString &url, const QString &fname, bool subdirs) kdDebug() << "started " << job << " " << subdirs << endl; - QObject::connect( job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ), - SLOT( slotListEntries( KIO::Job*, const KIO::UDSEntryList& ) ) ); - QObject::connect( job, SIGNAL( result( KIO::Job * ) ), - SLOT( slotFinished( KIO::Job* ) ) ); + TQObject::connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ), + TQT_SLOT( slotListEntries( KIO::Job*, const KIO::UDSEntryList& ) ) ); + TQObject::connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + TQT_SLOT( slotFinished( KIO::Job* ) ) ); kapp->enter_loop(); @@ -95,7 +95,7 @@ bool Kiod::listDir(const QString &url, const QString &fname, bool subdirs) void Kiod::slotListEntries( KIO::Job *, const KIO::UDSEntryList& entries ) { long size = 0; - QString text; + TQString text; KIO::UDSEntryList::ConstIterator entryIt = entries.begin(); diff --git a/kpackage/kio.h b/kpackage/kio.h index 60614ea..6e3a414 100644 --- a/kpackage/kio.h +++ b/kpackage/kio.h @@ -31,9 +31,9 @@ #include -#include -#include -#include +#include +#include +#include #include "../config.h" #include @@ -44,7 +44,7 @@ class Kio: public QObject public: Kio(); - bool download(const KURL & from, const QString & to); + bool download(const KURL & from, const TQString & to); private: bool worked; @@ -61,11 +61,11 @@ public: Kiod(); ~Kiod(); - bool listDir(const QString &url, const QString &fname, bool subdirs); + bool listDir(const TQString &url, const TQString &fname, bool subdirs); private: - QFile *file; - QTextStream *fileT; + TQFile *file; + TQTextStream *fileT; bool worked; private slots: diff --git a/kpackage/kissInterface.cpp b/kpackage/kissInterface.cpp index a568a18..29de45f 100644 --- a/kpackage/kissInterface.cpp +++ b/kpackage/kissInterface.cpp @@ -34,8 +34,8 @@ #include -#include -#include +#include +#include #include #include @@ -74,8 +74,8 @@ KISS::KISS():pkgInterface() "KISS", "*.installer", i18n("Location of Folders Containing KISS Packages")); - connect(locatedialog,SIGNAL(returnVal(LcacheObj *)), - this,SLOT(setAvail(LcacheObj *))); + connect(locatedialog,TQT_SIGNAL(returnVal(LcacheObj *)), + this,TQT_SLOT(setAvail(LcacheObj *))); locatedialog->apply_slot(); queryMsg = i18n("Querying KISS package list: "); @@ -99,10 +99,10 @@ KISS::~KISS() ////////////////////////////////////////////////////////////////////////////// // check if kiss file -bool KISS::isType(char *buf, const QString &) +bool KISS::isType(char *buf, const TQString &) { if (hasProgram) { - QString tmp = buf; + TQString tmp = buf; if (tmp.find("perl",0,false) >= 0) return true; else @@ -112,7 +112,7 @@ bool KISS::isType(char *buf, const QString &) } } -bool KISS::parseName(const QString& name, QString *n, QString *v) +bool KISS::parseName(const TQString& name, TQString *n, TQString *v) { int d1, d2, s1; @@ -131,12 +131,12 @@ bool KISS::parseName(const QString& name, QString *n, QString *v) return FALSE; } -void KISS::listInstalledPackages(QPtrList *pki) +void KISS::listInstalledPackages(TQPtrList *pki) { - QString vb; + TQString vb; packageInfo *p; - QString sline = i18n("Querying KISS package list: "); + TQString sline = i18n("Querying KISS package list: "); reader.setup("kiss"); *reader.proc << "-qq"; @@ -167,10 +167,10 @@ void KISS::listInstalledPackages(QPtrList *pki) ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // mode: i = query installed u = query uninstalled -packageInfo *KISS::getPackageInfo(char mode, const QString &name, const QString &) +packageInfo *KISS::getPackageInfo(char mode, const TQString &name, const TQString &) { packageInfo *pki = 0; - QString vb,search; + TQString vb,search; switch(mode) { @@ -193,8 +193,8 @@ packageInfo *KISS::getPackageInfo(char mode, const QString &name, const QString if (reader.start(0,TRUE)) { pki = collectInfo(reader.buf.ascii()); - QFileInfo fi(name); - QString s; + TQFileInfo fi(name); + TQString s; s.setNum(fi.size()); pki->info.insert("file-size", s); } @@ -208,10 +208,10 @@ packageInfo *KISS::getPackageInfo(char mode, const QString &name, const QString ////////////////////////////////////////////////////////////////////////////// packageInfo *KISS::collectInfo(const char *_inp) { - QMap a; + TQMap a; char *str, *xstr; - QString qstr; + TQString qstr; char *inp = qstrdup(_inp); str = strtok(inp,"\n"); @@ -250,7 +250,7 @@ packageInfo *KISS::collectInfo(const char *_inp) } else if (!strcmp("size",str)) { a.insert("file-size", xstr); } else if (!strcmp("installed-size",str)) { - QString str = xstr; + TQString str = xstr; a.insert("size", str + "000"); } else { a.insert(str, xstr); @@ -269,7 +269,7 @@ packageInfo *KISS::collectInfo(const char *_inp) ////////////////////////////////////////////////////////////////////////////// -QStringList KISS::getChangeLog(packageInfo *) { +TQStringList KISS::getChangeLog(packageInfo *) { return 0; } @@ -283,10 +283,10 @@ bool KISS::changeTab(packageInfo *) { } ////////////////////////////////////////////////////////////////////////////// -QStringList KISS::getFileList(packageInfo *p) +TQStringList KISS::getFileList(packageInfo *p) { - QString vb, fn; - QString name; + TQString vb, fn; + TQString name; char mode; fn = p->getFilename(); @@ -295,7 +295,7 @@ QStringList KISS::getFileList(packageInfo *p) else mode = 'i'; - QStringList filelist; + TQStringList filelist; switch(mode) { @@ -343,9 +343,9 @@ QStringList KISS::getFileList(packageInfo *p) // Call the script to install packages setting parameters // to kiss dependent on flags ////////////////////////////////////////////////////////////////////////////// -QString KISS::uninstall(int uninstallFlags, QPtrList *plist, bool &test) +TQString KISS::uninstall(int uninstallFlags, TQPtrList *plist, bool &test) { - QString packs; + TQString packs; packageInfo *pk; for (pk = plist->first(); pk != 0; pk = plist->next()) { @@ -355,7 +355,7 @@ QString KISS::uninstall(int uninstallFlags, QPtrList *plist, bool & return 0; } -QString KISS::doUninstall(int, const QString &packs, bool &) +TQString KISS::doUninstall(int, const TQString &packs, bool &) { return "kiss -d " + packs; } @@ -364,12 +364,12 @@ QString KISS::doUninstall(int, const QString &packs, bool &) // Call the script to install packages setting parameters // to kiss dependent on flags, returning whether everyting worked ////////////////////////////////////////////////////////////////////////////// -QString KISS::install(int installFlags, QPtrList *plist, bool &test) +TQString KISS::install(int installFlags, TQPtrList *plist, bool &test) { packageInfo *pk; int i = 0; for (pk = plist->first(); pk != 0; pk = plist->next()) { - QString fname = pk->fetchFilename(); + TQString fname = pk->fetchFilename(); if (!fname.isEmpty()) { doInstall(installFlags, fname, test); i++; @@ -378,22 +378,22 @@ QString KISS::install(int installFlags, QPtrList *plist, bool &test return 0; } -QString KISS::doInstall(int, const QString &packs, bool &) +TQString KISS::doInstall(int, const TQString &packs, bool &) { return "perl " + packs; } ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -QStringList KISS::FindFile(const QString &name, bool) +TQStringList KISS::FindFile(const TQString &name, bool) { - QString s = "kiss -p "; + TQString s = "kiss -p "; s += name; - QStringList filelist; + TQStringList filelist; // filelist = kpty->run(s); - // for ( QStringList::Iterator it = filelist.begin(); it != filelist.end(); ++it ) { + // for ( TQStringList::Iterator it = filelist.begin(); it != filelist.end(); ++it ) { // *it = *it + '\t' + name ; // } diff --git a/kpackage/kissInterface.h b/kpackage/kissInterface.h index 4a4484d..1f411eb 100644 --- a/kpackage/kissInterface.h +++ b/kpackage/kissInterface.h @@ -29,8 +29,8 @@ #include "../config.h" -#include -#include +#include +#include #include #include "procbuf.h" @@ -48,12 +48,12 @@ public: KISS(); ~KISS(); - bool isType(char *buf, const QString &fname); + bool isType(char *buf, const TQString &fname); param *initinstallOptions(); param *inituninstallOptions(); - packageInfo *getPackageInfo(char mode, const QString &name, const QString &version); - QStringList getFileList(packageInfo *p); - QStringList getChangeLog(packageInfo *p); + packageInfo *getPackageInfo(char mode, const TQString &name, const TQString &version); + TQStringList getFileList(packageInfo *p); + TQStringList getChangeLog(packageInfo *p); bool filesTab(packageInfo *p); // If files tab is to be enabled @@ -61,8 +61,8 @@ public: bool changeTab(packageInfo *p); // If change log tab is to be enabled - QStringList FindFile(const QString &name, bool seachAll=false); - bool parseName(const QString& name, QString *n, QString *v); + TQStringList FindFile(const TQString &name, bool seachAll=false); + bool parseName(const TQString& name, TQString *n, TQString *v); public slots: void setLocation(); @@ -70,13 +70,13 @@ public slots: private: packageInfo* collectInfo(const char *inp); - void listInstalledPackages(QPtrList *pki); + void listInstalledPackages(TQPtrList *pki); - QString install(int installFlags, QPtrList *plist, bool &test); - QString uninstall(int uninstallFlags, QPtrList *plist, bool &test); + TQString install(int installFlags, TQPtrList *plist, bool &test); + TQString uninstall(int uninstallFlags, TQPtrList *plist, bool &test); - QString doUninstall(int installFlags, const QString &packs, bool &test); - QString doInstall(int installFlags, const QString &packs, bool &test); + TQString doUninstall(int installFlags, const TQString &packs, bool &test); + TQString doInstall(int installFlags, const TQString &packs, bool &test); procbuf reader; }; diff --git a/kpackage/kpPty.cpp b/kpackage/kpPty.cpp index b395483..23eb15f 100644 --- a/kpackage/kpPty.cpp +++ b/kpackage/kpPty.cpp @@ -27,8 +27,8 @@ #include "../config.h" -#include -#include +#include +#include #include #include @@ -49,7 +49,7 @@ const int PROMPT = -1; extern Opts *opts; ////////////////////////////////////////////////////////////////////////////// -kpKProcIO::kpKProcIO ( QTextCodec *_codec) +kpKProcIO::kpKProcIO ( TQTextCodec *_codec) : KProcIO(_codec) { } @@ -61,38 +61,38 @@ kpKProcIO::~kpKProcIO() bool kpKProcIO::sstart (RunMode runmode) { - connect (this, SIGNAL (receivedStdout (KProcess *, char *, int)), - this, SLOT (received (KProcess *, char *, int))); + connect (this, TQT_SIGNAL (receivedStdout (KProcess *, char *, int)), + this, TQT_SLOT (received (KProcess *, char *, int))); - connect (this, SIGNAL (wroteStdin(KProcess *)), - this, SLOT (sent (KProcess *))); + connect (this, TQT_SIGNAL (wroteStdin(KProcess *)), + this, TQT_SLOT (sent (KProcess *))); return KProcess::start (runmode,( KProcess::Communication) ( KProcess::Stdin | KProcess::Stdout)); } ////////////////////////////////////////////////////////////////////////////// -kpPty::kpPty() : QObject() +kpPty::kpPty() : TQObject() { pty = new kpKProcIO(); pty->setUsePty(KProcess::All, false); - connect(pty, SIGNAL(readReady(KProcIO *)), this, - SLOT(readLines())); - connect(pty, SIGNAL(processExited(KProcess *)), this, - SLOT(done())); + connect(pty, TQT_SIGNAL(readReady(KProcIO *)), this, + TQT_SLOT(readLines())); + connect(pty, TQT_SIGNAL(processExited(KProcess *)), this, + TQT_SLOT(done())); pty->pty()->setWinSize(0,80); - tm = new QTimer(this); - connect(tm, SIGNAL(timeout()), this, SLOT(slotTimeout())); + tm = new TQTimer(this); + connect(tm, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); eventLoop = FALSE; inSession = FALSE; pUnterm = FALSE; loginSession = FALSE; - codec = QTextCodec::codecForLocale(); - QMap passwords; + codec = TQTextCodec::codecForLocale(); + TQMap passwords; } @@ -147,14 +147,14 @@ bool kpPty::startSession(bool needRoot) kdDebug() << "kpPty::startSession TRUE\n"; loginSession = TRUE; int ret; - QString s = "echo START=$?\n"; + TQString s = "echo START=$?\n"; FULL_RESTART: interact = FALSE; retList.clear(); pty->resetAll(); - QString passMsg; + TQString passMsg; kdDebug() << "privCmd=" << opts->privCmd << "\n"; if (opts->privCmd == Opts::SSHcmd || !hostName.isEmpty()) { passMsg = i18n("The action you requested uses ssh. Please enter the password or pass phrase.\n"); @@ -189,7 +189,7 @@ bool kpPty::startSession(bool needRoot) inSession = TRUE; } } else if (Result == PASSWORD) { // We got a password prompt - QCString pass; + TQCString pass; int res; interact = TRUE; // kdDebug() << "H=" << hostName << " PH=" << passwords[hostName] << " PT=" << passwordTried <<"\n"; @@ -198,7 +198,7 @@ bool kpPty::startSession(bool needRoot) res = 1; } else { kdDebug() << "Passwd=" << retList.last() << "\n"; - QString msg = passMsg; + TQString msg = passMsg; // kdDebug() << "privCmd=" << opts->privCmd << " host=" << hostName.isEmpty() << "\n"; if (opts->privCmd == Opts::SSHcmd || !hostName.isEmpty()) { msg += retList.last(); @@ -224,11 +224,11 @@ bool kpPty::startSession(bool needRoot) inSession = TRUE; kdDebug() << "kpPty::startSession TRUE\n"; } else { // process return code - pty->writeStdin(QCString("\04"), false); // SU doesn't listen to ^C + pty->writeStdin(TQCString("\04"), false); // SU doesn't listen to ^C if (interact) { goto FULL_RESTART; } else { - QString errMsg = retList.join(" "); + TQString errMsg = retList.join(" "); KpMsgE(errMsg, TRUE); inSession = FALSE; } @@ -244,15 +244,15 @@ bool kpPty::startSession(bool needRoot) return inSession; } -void kpPty::breakUpCmd(const QString &cmd) +void kpPty::breakUpCmd(const TQString &cmd) { kdDebug() << " kpPty::run CMD=\""<< cmd <<"\" pty = " << pty << endl; bool quote = FALSE; - QString s; - QStringList cl = QStringList::split(" ", cmd); + TQString s; + TQStringList cl = TQStringList::split(" ", cmd); - for ( QStringList::Iterator it = cl.begin(); it != cl.end(); ++it ) { + for ( TQStringList::Iterator it = cl.begin(); it != cl.end(); ++it ) { int lastPt = (*it).length() - 1; if ((*it)[0] == '\'') { // Start of quoted string s = *it; @@ -278,7 +278,7 @@ void kpPty::breakUpCmd(const QString &cmd) } } -QStringList kpPty::run(const QString &cmd, bool inLoop, bool needRoot) +TQStringList kpPty::run(const TQString &cmd, bool inLoop, bool needRoot) { Result = 0; @@ -296,7 +296,7 @@ QStringList kpPty::run(const QString &cmd, bool inLoop, bool needRoot) } else { if (startSession(needRoot)) { kdDebug() << "CMDroot='"<< cmd <<"'\n"; - QString s = cmd + ";echo RESULT=$?"; + TQString s = cmd + ";echo RESULT=$?"; pty->writeStdin(s); kdDebug() << " kpPty::run session\n"; } else { @@ -331,7 +331,7 @@ void kpPty::finish(int ret) { kdDebug() << "kpPty::finish " << ret << "\n"; - QStringList::Iterator l; + TQStringList::Iterator l; Result = ret; if (ret == PROMPT) { // Called program executed in session @@ -375,14 +375,14 @@ void kpPty::readLines() { bool unterm = FALSE; - QString stext; + TQString stext; while(pty->readln(stext, false, &unterm) >= 0) { stext = codec->toUnicode(stext.ascii(), stext.length()); emit textIn(stext, !unterm); // kdDebug() << "[" << pUnterm << "-" << unterm << "-" << stext << ">\n"; if (pUnterm) { - QStringList::Iterator lst = retList.fromLast(); + TQStringList::Iterator lst = retList.fromLast(); if (lst != retList.end()) { stext = *lst + stext; @@ -410,7 +410,7 @@ void kpPty::readLines() emit textIn("\r \n", false); finish(PROMPT); } else if (loginSession) { - QRegExp rx( "^[^:]+:[\\s]*$"); // Password prompt + TQRegExp rx( "^[^:]+:[\\s]*$"); // Password prompt if (rx.search(retList.last()) >= 0) { kdDebug() << loginSession << " " <writeStdin(s, false); @@ -431,7 +431,7 @@ void kpPty::keyOut(char ch) void kpPty::done() { int ret = pty->exitStatus(); - QString stext; + TQString stext; //kdDebug() << "Done (" << ret << ")" << endl; diff --git a/kpackage/kpPty.h b/kpackage/kpPty.h index f427ef8..bf303f2 100644 --- a/kpackage/kpPty.h +++ b/kpackage/kpPty.h @@ -27,11 +27,11 @@ #ifndef KPPTY_H #define KPPTY_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -43,7 +43,7 @@ class kpKProcIO: public KProcIO public: - kpKProcIO ( QTextCodec *_codec = 0); + kpKProcIO ( TQTextCodec *_codec = 0); ~kpKProcIO(); bool sstart (RunMode runmode); @@ -57,12 +57,12 @@ public: kpPty(); ~kpPty(); - QStringList run(const QString &cmd, bool inLoop = TRUE, + TQStringList run(const TQString &cmd, bool inLoop = TRUE, bool needRoot= FALSE); bool startSession(bool needRoot); void close(); - QString remote; + TQString remote; int Result; // True if have started a session bool inSession; @@ -76,8 +76,8 @@ public slots: void keyOut(char); signals: - void textIn(const QString &, bool); - void result(QStringList &, int); + void textIn(const TQString &, bool); + void result(TQStringList &, int); private: void finish(int ret); @@ -85,21 +85,21 @@ private: void startSsh(); void startSu(); void startSudo(); - void breakUpCmd(const QString &); + void breakUpCmd(const TQString &); bool needSession(bool needRoot); kpKProcIO* pty; - QTimer *tm; - QStringList retList; - QRegExp terminator; + TQTimer *tm; + TQStringList retList; + TQRegExp terminator; bool pUnterm; - QString uptext; + TQString uptext; // True if in event loop bool eventLoop; // True if trying to login bool loginSession; - QTextCodec *codec; - QMap passwords; + TQTextCodec *codec; + TQMap passwords; }; diff --git a/kpackage/kpTerm.cpp b/kpackage/kpTerm.cpp index 0336da9..aab6ab8 100644 --- a/kpackage/kpTerm.cpp +++ b/kpackage/kpTerm.cpp @@ -27,7 +27,7 @@ #include "../config.h" -#include +#include #include #include @@ -38,8 +38,8 @@ ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -kpTerm::kpTerm(kpPty *pt, QWidget * parent, const char * name ) : - QTextEdit(parent,name) +kpTerm::kpTerm(kpPty *pt, TQWidget * parent, const char * name ) : + TQTextEdit(parent,name) { pty = pt; setFont(KGlobalSettings::fixedFont()); @@ -51,25 +51,25 @@ kpTerm::kpTerm(kpPty *pt, QWidget * parent, const char * name ) : void kpTerm::doConnect() { - connect(pty, SIGNAL(textIn(const QString &, bool)), this, - SLOT(textIn(const QString &, bool))); - connect(pty,SIGNAL(result(QStringList &, int)), - this,SLOT(slotResult(QStringList &, int))); - connect(this, SIGNAL(keyOut(char)), pty, - SLOT(keyOut(char))); + connect(pty, TQT_SIGNAL(textIn(const TQString &, bool)), this, + TQT_SLOT(textIn(const TQString &, bool))); + connect(pty,TQT_SIGNAL(result(TQStringList &, int)), + this,TQT_SLOT(slotResult(TQStringList &, int))); + connect(this, TQT_SIGNAL(keyOut(char)), pty, + TQT_SLOT(keyOut(char))); } void kpTerm::doUnconnect() { - disconnect(pty, SIGNAL(textIn(const QString &, bool)), this, - SLOT(textIn(const QString &, bool))); - disconnect(pty,SIGNAL(result(QStringList &, int)), - this,SLOT(slotResult(QStringList &, int))); - disconnect(this, SIGNAL(keyOut(char)), pty, - SLOT(keyOut(char))); + disconnect(pty, TQT_SIGNAL(textIn(const TQString &, bool)), this, + TQT_SLOT(textIn(const TQString &, bool))); + disconnect(pty,TQT_SIGNAL(result(TQStringList &, int)), + this,TQT_SLOT(slotResult(TQStringList &, int))); + disconnect(this, TQT_SIGNAL(keyOut(char)), pty, + TQT_SLOT(keyOut(char))); } -bool kpTerm::run(const QString &cmd, QStringList &r) +bool kpTerm::run(const TQString &cmd, TQStringList &r) { setReadOnly(FALSE); setFocus(); @@ -95,21 +95,21 @@ void kpTerm::done() clearFocus(); } -void kpTerm::keyPressEvent ( QKeyEvent * e ) +void kpTerm::keyPressEvent ( TQKeyEvent * e ) { // kdDebug() << "K=" << e->ascii() << "," << e->ascii() << "\n"; if (e->ascii()) { emit keyOut(e->ascii()); } else { - QTextEdit::keyPressEvent (e); + TQTextEdit::keyPressEvent (e); } setCursorPosition(9999,9999); } -void kpTerm::textIn(const QString &stext, bool bNewLine) +void kpTerm::textIn(const TQString &stext, bool bNewLine) { - QRegExp chrs("[\\010\\012\\015]"); - QString del = "\010"; + TQRegExp chrs("[\\010\\012\\015]"); + TQString del = "\010"; // kdDebug() << "Tin=[" << stext << "]\n"; if (stext.find(chrs) < 0) { insert( stext ); @@ -141,7 +141,7 @@ void kpTerm::textIn(const QString &stext, bool bNewLine) moveCursor(MoveEnd, false); } -void kpTerm::insert ( const QString & str, bool) { +void kpTerm::insert ( const TQString & str, bool) { int x,y; getCursorPosition(&y,&x); @@ -152,11 +152,11 @@ void kpTerm::insert ( const QString & str, bool) { getCursorPosition(&y,&x); // kdDebug() << "k=" << y << "," << x <<"\n"; } - QTextEdit::insert(str,(bool)FALSE); + TQTextEdit::insert(str,(bool)FALSE); } } -void kpTerm::slotResult(QStringList &rlist, int ret) +void kpTerm::slotResult(TQStringList &rlist, int ret) { emit result(rlist, ret); doUnconnect(); @@ -169,28 +169,28 @@ void kpTerm::slotResult(QStringList &rlist, int ret) // Dialog window for password prompt // ////////////////////////////////////////////////////////////////////////////// -kpRun::kpRun( QWidget *parent) - : KDialogBase(parent, "kpRun", true, QString::null, +kpRun::kpRun( TQWidget *parent) + : KDialogBase(parent, "kpRun", true, TQString::null, Cancel, Cancel, true ) { - QVBox *page = makeVBoxMainWidget(); - title = new QLabel("", page); - QFont f( KGlobalSettings::generalFont()); + TQVBox *page = makeVBoxMainWidget(); + title = new TQLabel("", page); + TQFont f( KGlobalSettings::generalFont()); f.setBold(true); f.setPointSize(f.pointSize()+4); title->setFont(f); term = new kpTerm(kpty,page); resize(600, 300); - connect(term,SIGNAL(result(QStringList &, int)), - this,SLOT(slotResult(QStringList &, int))); + connect(term,TQT_SIGNAL(result(TQStringList &, int)), + this,TQT_SLOT(slotResult(TQStringList &, int))); hide(); } -bool kpRun::run(QString cmd, QString msg) +bool kpRun::run(TQString cmd, TQString msg) { - QStringList r; + TQStringList r; title->setText(msg); if (!cmd.isEmpty()) { @@ -203,17 +203,17 @@ bool kpRun::run(QString cmd, QString msg) } } -void kpRun::addText(const QStringList &ret) +void kpRun::addText(const TQStringList &ret) { int last = ret.count()-1; int i = 0; - for ( QStringList::ConstIterator it = ret.begin(); it != ret.end(); ++it, ++i ) { + for ( TQStringList::ConstIterator it = ret.begin(); it != ret.end(); ++it, ++i ) { // kdDebug() << "ks=" << *it << "\n"; term->textIn(*it, (i != last)); } } -void kpRun::slotResult(QStringList &, int ret) +void kpRun::slotResult(TQStringList &, int ret) { if (ret == 0 || ret == 666) { term->clear(); diff --git a/kpackage/kpTerm.h b/kpackage/kpTerm.h index 7767565..00ac57a 100644 --- a/kpackage/kpTerm.h +++ b/kpackage/kpTerm.h @@ -31,10 +31,10 @@ #include "../config.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -47,23 +47,23 @@ class kpTerm: public QTextEdit Q_OBJECT public: - kpTerm(kpPty *pt, QWidget * parent=0, const char * name=0); - void keyPressEvent ( QKeyEvent * e ); - bool run(const QString &cmd, QStringList &r); + kpTerm(kpPty *pt, TQWidget * parent=0, const char * name=0); + void keyPressEvent ( TQKeyEvent * e ); + bool run(const TQString &cmd, TQStringList &r); void doConnect(); void doUnconnect(); - void insert ( const QString & str, bool mark=FALSE ); + void insert ( const TQString & str, bool mark=FALSE ); kpPty *pty; void cancel(); void done(); public slots: - void textIn(const QString &, bool); - void slotResult(QStringList &, int); + void textIn(const TQString &, bool); + void slotResult(TQStringList &, int); signals: void keyOut(char); - void result(QStringList &, int); + void result(TQStringList &, int); }; @@ -74,17 +74,17 @@ class kpRun: public KDialogBase Q_OBJECT public: - kpRun(QWidget *parent = 0); - bool run(QString cmd, QString title); - void addText(const QStringList &ret); + kpRun(TQWidget *parent = 0); + bool run(TQString cmd, TQString title); + void addText(const TQStringList &ret); public slots: - void slotResult(QStringList &, int); + void slotResult(TQStringList &, int); void slotCancel(); private: kpTerm *term; - QLabel *title; + TQLabel *title; }; ////////////////////////////////////////////////////////////////////////////// #endif diff --git a/kpackage/kpackage.cpp b/kpackage/kpackage.cpp index 5c328e1..c5dd2eb 100644 --- a/kpackage/kpackage.cpp +++ b/kpackage/kpackage.cpp @@ -31,9 +31,9 @@ #include "../config.h" -#include -#include -#include +#include +#include +#include #include #include @@ -93,94 +93,94 @@ KPKG::KPKG(KConfig *_config) void KPKG::setupMenu() { - pack_open = KStdAction::open(kpackage, SLOT(fileOpen()), + pack_open = KStdAction::open(kpackage, TQT_SLOT(fileOpen()), actionCollection()); - recent = KStdAction::openRecent(this, SLOT(openRecent(const KURL&)), + recent = KStdAction::openRecent(this, TQT_SLOT(openRecent(const KURL&)), actionCollection()); recent->loadEntries( config ); pack_find = new KAction( i18n("Find &Package..."), "find", KStdAccel::shortcut(KStdAccel::Find), kpackage, - SLOT(find()), actionCollection(), "pack_find"); + TQT_SLOT(find()), actionCollection(), "pack_find"); pack_findf = new KAction( i18n("Find &File..."), "filefind", 0, kpackage, - SLOT(findf()), actionCollection(), "pack_findf"); + TQT_SLOT(findf()), actionCollection(), "pack_findf"); kpack_reload = new KAction( i18n("&Reload"), "reload", KStdAccel::shortcut(KStdAccel::Reload), kpackage, - SLOT(reload()), actionCollection(), "kpack_reload"); + TQT_SLOT(reload()), actionCollection(), "kpack_reload"); - (void) KStdAction::quit(kpackage, SLOT(fileQuit()), + (void) KStdAction::quit(kpackage, TQT_SLOT(fileQuit()), actionCollection()); - pack_prev = KStdAction::back(kpackage->management->treeList, SLOT(previous()), + pack_prev = KStdAction::back(kpackage->management->treeList, TQT_SLOT(previous()), actionCollection(),"pack_prev"); - pack_next = KStdAction::forward(kpackage->management->treeList, SLOT(next()), + pack_next = KStdAction::forward(kpackage->management->treeList, TQT_SLOT(next()), actionCollection(),"pack_next"); (void) (new KAction( i18n("&Expand Tree"), "ftout", 0, kpackage, - SLOT(expandTree()), actionCollection(), "kpack_expand")); + TQT_SLOT(expandTree()), actionCollection(), "kpack_expand")); (void) (new KAction( i18n("&Collapse Tree"), "ftin", 0, kpackage, - SLOT(collapseTree()), actionCollection(), "kpack_collapse")); + TQT_SLOT(collapseTree()), actionCollection(), "kpack_collapse")); - (void) (new KAction( i18n("Clear &Marked"), QString::null, + (void) (new KAction( i18n("Clear &Marked"), TQString::null, 0, kpackage, - SLOT(clearMarked()), actionCollection(), "kpack_clear")); + TQT_SLOT(clearMarked()), actionCollection(), "kpack_clear")); - (void) (new KAction( i18n("Mark &All"), QString::null, + (void) (new KAction( i18n("Mark &All"), TQString::null, 0, kpackage, - SLOT(markAll()), actionCollection(), "kpack_markall")); + TQT_SLOT(markAll()), actionCollection(), "kpack_markall")); - pack_install = new KAction( i18n("&Install"), QString::null, + pack_install = new KAction( i18n("&Install"), TQString::null, 0, kpackage->management, - SLOT(installSingleClicked()), actionCollection(), "install_single"); + TQT_SLOT(installSingleClicked()), actionCollection(), "install_single"); pack_install->setEnabled(false); kpackage->management->setInstallAction(pack_install); - pack_uninstall = new KAction( i18n("&Uninstall"), QString::null, + pack_uninstall = new KAction( i18n("&Uninstall"), TQString::null, 0, kpackage->management, - SLOT(uninstallSingleClicked()), actionCollection(), "uninstall_single"); + TQT_SLOT(uninstallSingleClicked()), actionCollection(), "uninstall_single"); pack_uninstall->setEnabled(false); kpackage->management->setUninstallAction(pack_uninstall); - (void) (new KAction( i18n("&Install Marked"), QString::null, + (void) (new KAction( i18n("&Install Marked"), TQString::null, 0, kpackage->management, - SLOT(installMultClicked()), actionCollection(), "install_marked")); + TQT_SLOT(installMultClicked()), actionCollection(), "install_marked")); - (void) (new KAction( i18n("&Uninstall Marked"), QString::null, + (void) (new KAction( i18n("&Uninstall Marked"), TQString::null, 0, kpackage->management, - SLOT(uninstallMultClicked()), actionCollection(), "uninstall_marked")); + TQT_SLOT(uninstallMultClicked()), actionCollection(), "uninstall_marked")); setStandardToolBarMenuEnabled(true); - KStdAction::configureToolbars( this, SLOT(configureToolBars()), + KStdAction::configureToolbars( this, TQT_SLOT(configureToolBars()), actionCollection()); - KStdAction::saveOptions( this, SLOT(saveSettings()), actionCollection()); + KStdAction::saveOptions( this, TQT_SLOT(saveSettings()), actionCollection()); - KStdAction::keyBindings( guiFactory(), SLOT(configureShortcuts()), actionCollection()); + KStdAction::keyBindings( guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); (void) (new KAction( i18n("Configure &KPackage..."), "configure", 0, this, - SLOT(setOptions()), actionCollection(), "kpack_options")); + TQT_SLOT(setOptions()), actionCollection(), "kpack_options")); - (void) (new KAction( i18n("Clear Package &Folder Cache"), QString::null, + (void) (new KAction( i18n("Clear Package &Folder Cache"), TQString::null, 0, this, - SLOT(clearDCache()), actionCollection(), "clear_dcache")); + TQT_SLOT(clearDCache()), actionCollection(), "clear_dcache")); - (void) (new KAction( i18n("Clear &Package Cache"), QString::null, + (void) (new KAction( i18n("Clear &Package Cache"), TQString::null, 0, this, - SLOT(clearPCache()), actionCollection(), "clear_pcache")); + TQT_SLOT(clearPCache()), actionCollection(), "clear_pcache")); int i; for (i = 0; i < kpinterfaceN; i++) { @@ -230,7 +230,7 @@ void KPKG::openRecent(const KURL& url){ kpackage->openNetFile( url ); } -void KPKG::add_recent_file(const QString &newfile){ +void KPKG::add_recent_file(const TQString &newfile){ KURL url = KURL(newfile); @@ -239,7 +239,7 @@ void KPKG::add_recent_file(const QString &newfile){ void KPKG::configureToolBars() { KEditToolbar dlg(actionCollection()); - connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig())); + connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig())); dlg.exec(); } @@ -287,7 +287,7 @@ void KPKG::saveProperties(KConfig *config ) void KPKG::readProperties(KConfig *config) { - QString entry = config->readPathEntry("Name"); // no default + TQString entry = config->readPathEntry("Name"); // no default if (entry.isNull()) return; kpackage->openNetFiles(entry); @@ -302,8 +302,8 @@ bool KPKG::queryClose() { ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -KPACKAGE::KPACKAGE(KConfig *_config, QWidget *parent) - : QWidget(parent) +KPACKAGE::KPACKAGE(KConfig *_config, TQWidget *parent) + : TQWidget(parent) { // Save copy of config @@ -329,7 +329,7 @@ KPACKAGE::~KPACKAGE() } // resize event -- arrange the widgets -void KPACKAGE::resizeEvent(QResizeEvent *re) +void KPACKAGE::resizeEvent(TQResizeEvent *re) { re = re; // prevent warning arrangeWidgets(); @@ -364,12 +364,12 @@ void KPACKAGE::destroyModeWidgets() // Set up the status bar void KPACKAGE::setupStatusBar() { - statusbar = new QFrame(this); - statusbar->setFrameStyle(QFrame::Raised | QFrame::Panel); + statusbar = new TQFrame(this); + statusbar->setFrameStyle(TQFrame::Raised | TQFrame::Panel); processProgress = new KProgress(100,statusbar); processProgress->setTextEnabled(FALSE); - status = new QLabel(i18n("Management Mode"), statusbar); + status = new TQLabel(i18n("Management Mode"), statusbar); } // Arrange the widgets nicely @@ -455,13 +455,13 @@ void KPACKAGE::collapseTree() management->treeList->collapseTree(management->treeList); } -pkgInterface *KPACKAGE::pkType(const QString &fname) +pkgInterface *KPACKAGE::pkType(const TQString &fname) { // Get the package information for this package char buf[51]; int i; - FILE *file= fopen(QFile::encodeName(fname),"r"); + FILE *file= fopen(TQFile::encodeName(fname),"r"); if (file) { fgets(buf,sizeof(buf)-1,file); buf[50] = 0; @@ -504,28 +504,28 @@ int KPACKAGE::typeIndex(pkgInterface *type) { return -1; } -void KPACKAGE::openNetFiles (const QStringList &urls, bool install ) +void KPACKAGE::openNetFiles (const TQStringList &urls, bool install ) { - QStringList files; + TQStringList files; int i; int index; - QPtrList **lst = new QPtrList*[kpinterfaceN]; + TQPtrList **lst = new TQPtrList*[kpinterfaceN]; packageInfo *pk = 0; kdDebug() << "openNetFiles\n"; - for (QStringList::ConstIterator it = urls.begin(); it != urls.end(); ++it) { + for (TQStringList::ConstIterator it = urls.begin(); it != urls.end(); ++it) { files.append(fetchNetFile(*it)); kpkg->add_recent_file(*it); } for (i = 0; i < kpinterfaceN; i++) { if (kpinterface[i]) { - lst[i] = new QPtrList; + lst[i] = new TQPtrList; } } - for (QStringList::Iterator t = files.begin(); t != files.end(); ++t) { + for (TQStringList::Iterator t = files.begin(); t != files.end(); ++t) { pkgInterface *type = pkType(*t); index = typeIndex(type); if (index >= 0) { @@ -579,10 +579,10 @@ void KPACKAGE::openNetFile(const KURL &url, bool install ) -QString KPACKAGE::getFileName(const KURL & url, QString &cacheName ) +TQString KPACKAGE::getFileName(const KURL & url, TQString &cacheName ) { - QString none = ""; - QString fname = ""; + TQString none = ""; + TQString fname = ""; if ( !url.isValid() ) { KpMsgE(i18n("Malformed URL: %1").arg(url.url()),TRUE); @@ -594,13 +594,13 @@ QString KPACKAGE::getFileName(const KURL & url, QString &cacheName ) fname = url.path(); } else { - QString tmpd = cacheObj::PDir(); + TQString tmpd = cacheObj::PDir(); if (!tmpd.isEmpty()) { - QString cacheFile = tmpd + url.fileName(); + TQString cacheFile = tmpd + url.fileName(); cacheName = cacheFile; - QFileInfo f(cacheFile); + TQFileInfo f(cacheFile); if (f.exists() && (opts->DCache != Opts::NEVER)) { fname = cacheFile; } @@ -612,9 +612,9 @@ QString KPACKAGE::getFileName(const KURL & url, QString &cacheName ) bool KPACKAGE::isFileLocal( const KURL & url ) { - QString cf; + TQString cf; - QString f = getFileName(url, cf); + TQString f = getFileName(url, cf); if (cf.isEmpty()) { return false; @@ -627,12 +627,12 @@ bool KPACKAGE::isFileLocal( const KURL & url ) } } -QString KPACKAGE::fetchNetFile( const KURL & url ) +TQString KPACKAGE::fetchNetFile( const KURL & url ) { - QString cf; + TQString cf; - QString f = getFileName(url, cf); + TQString f = getFileName(url, cf); if (cf.isEmpty()) { return ""; @@ -649,9 +649,9 @@ QString KPACKAGE::fetchNetFile( const KURL & url ) if (kio.download(url, cf)) { setStatus(i18n("KIO finished")); - QFileInfo fi(cf); + TQFileInfo fi(cf); if (!(fi.exists() && fi.size() > 0)) { - unlink(QFile::encodeName(cf)); + unlink(TQFile::encodeName(cf)); return ""; } else { CacheList cl(fi.dirPath()); @@ -672,7 +672,7 @@ void KPACKAGE::fileOpenUrl(){ bool ok; - QString url = KInputDialog::getText( QString::null, + TQString url = KInputDialog::getText( TQString::null, i18n( "Open location:" ), save_url.prettyURL(), &ok, this ); if ( ok ) @@ -696,15 +696,15 @@ void KPACKAGE::findf(){ findialog = new FindF(this); } -KFileDialog* KPACKAGE::getFileDialog(const QString &captiontext) +KFileDialog* KPACKAGE::getFileDialog(const TQString &captiontext) { if(!file_dialog) { - file_dialog = new KFileDialog(QDir::currentDirPath(), "", + file_dialog = new KFileDialog(TQDir::currentDirPath(), "", this,"file_dialog",TRUE); } - QString pat; + TQString pat; for (int i = 0; i < kpinterfaceN; i++) { if (kpinterface[i] && opts->handlePackage[i]) { pat += kpinterface[i]->packagePattern; @@ -718,12 +718,12 @@ KFileDialog* KPACKAGE::getFileDialog(const QString &captiontext) return file_dialog; } -void KPACKAGE::dragEnterEvent(QDragEnterEvent* e) +void KPACKAGE::dragEnterEvent(TQDragEnterEvent* e) { e->accept(KURLDrag::canDecode(e)); } -void KPACKAGE::dropEvent(QDropEvent *de) // something has been dropped +void KPACKAGE::dropEvent(TQDropEvent *de) // something has been dropped { KURL::List list; if (!KURLDrag::decode(de, list) || list.isEmpty()) @@ -732,13 +732,13 @@ void KPACKAGE::dropEvent(QDropEvent *de) // something has been dropped openNetFiles(list.toStringList()); } -void KPACKAGE::setStatus(const QString &s) // set the text in the status bar +void KPACKAGE::setStatus(const TQString &s) // set the text in the status bar { status->setText(s); kapp->processEvents(); // refresh the screen } -QString KPACKAGE::getStatus() // get the text in the status bar +TQString KPACKAGE::getStatus() // get the text in the status bar { if(status) return status->text(); diff --git a/kpackage/kpackage.h b/kpackage/kpackage.h index 07d22da..8e13643 100644 --- a/kpackage/kpackage.h +++ b/kpackage/kpackage.h @@ -66,7 +66,7 @@ class KPACKAGE : public QWidget ///////////// METHODS ------------------------------------------------------ public: - KPACKAGE(KConfig *_config, QWidget *parent); + KPACKAGE(KConfig *_config, TQWidget *parent); // Constructor ~KPACKAGE(); @@ -76,13 +76,13 @@ public: OPEN_READONLY = 2, OPEN_INSERT = 4 }; - void setStatus(const QString &s); + void setStatus(const TQString &s); // this sets the status bar's string to s void setPercent(int x); // this set the status bar's progress to x - QString getStatus(); + TQString getStatus(); // this gets the current status string on the status bar // void setMode(int newmode, pkgInterface *type, int refresh); @@ -90,33 +90,33 @@ public: void setup(); - pkgInterface *pkType(const QString &fname); + pkgInterface *pkType(const TQString &fname); // find type of package int typeIndex(pkgInterface *); // convert interface pointer to index - void openNetFiles(const QStringList &urls, bool install=TRUE); + void openNetFiles(const TQStringList &urls, bool install=TRUE); void openNetFile(const KURL & url, bool install=TRUE); // open a file given a URL - QString fetchNetFile(const KURL & url); + TQString fetchNetFile(const KURL & url); // fetch a file given a URL - static QString getFileName(const KURL & url, QString &cacheName); + static TQString getFileName(const KURL & url, TQString &cacheName); // return file name, if not local file cachename is name for cache entry static bool isFileLocal( const KURL & url ); // true if URL refers to local or cached file protected: - void resizeEvent(QResizeEvent *re); + void resizeEvent(TQResizeEvent *re); // This is called when the widget is resized - void dropEvent(QDropEvent *); + void dropEvent(TQDropEvent *); // This is called when a URL has been dropped in the drop zone - void dragEnterEvent(QDragEnterEvent* e); + void dragEnterEvent(TQDragEnterEvent* e); private: @@ -133,7 +133,7 @@ private: // This arranges the widgets in the window (should be called after a // resize event) - KFileDialog* getFileDialog(const QString &captiontext); + KFileDialog* getFileDialog(const TQString &captiontext); ///////////// SLOTS -------------------------------------------------------- public slots: @@ -199,13 +199,13 @@ private: // Menu item identifiers - QFrame *statusbar; + TQFrame *statusbar; // the status bar KProgress *processProgress; // Progress bar for showing progress - QLabel *status; + TQLabel *status; // The actual status KFileDialog *file_dialog; @@ -238,7 +238,7 @@ public: KPKG(KConfig *_config); // Constructor - void add_recent_file(const QString &newfile); + void add_recent_file(const TQString &newfile); // keep list of files accessed void writeSettings(); @@ -273,7 +273,7 @@ private: void setupMenu(); // This sets up the menubar - QStrList recent_files; + TQStrList recent_files; KAction *pack_open; KAction *pack_find; @@ -326,11 +326,11 @@ extern kpPty *kpty; extern kpRun *kprun; extern kpRun *kpstart; -extern QString hostName; +extern TQString hostName; extern pkgInterface *kpinterface[]; -void KpMsg(const QString &lab, const QString &msg, bool stop); -void KpMsgE(const QString &msg, bool stop = FALSE); +void KpMsg(const TQString &lab, const TQString &msg, bool stop); +void KpMsgE(const TQString &msg, bool stop = FALSE); #endif diff --git a/kpackage/kplview.cpp b/kpackage/kplview.cpp index 1889150..5b7d76c 100644 --- a/kpackage/kplview.cpp +++ b/kpackage/kplview.cpp @@ -25,9 +25,9 @@ */ #include "../config.h" -#include -#include -#include +#include +#include +#include #include #include @@ -43,30 +43,30 @@ #define MPOS 1 -KpTreeList::KpTreeList( QWidget *parent ) : +KpTreeList::KpTreeList( TQWidget *parent ) : KListView (parent) { markPkg = 0; setShowSortIndicator(true); - QPtrStack stack(); + TQPtrStack stack(); readTreeType(); - setFrameStyle(QFrame::Panel|QFrame::Sunken); + setFrameStyle(TQFrame::Panel|TQFrame::Sunken); setLineWidth(2); setItemMargin(2); addColumn(i18n("Package")); - setColumnWidthMode(0,QListView::Manual); + setColumnWidthMode(0,TQListView::Manual); addColumn(i18n("Mark")); - setColumnWidthMode(1,QListView::Manual); + setColumnWidthMode(1,TQListView::Manual); addColumn(i18n("Summary")); - setColumnWidthMode(2,QListView::Manual); + setColumnWidthMode(2,TQListView::Manual); addColumn(i18n("Size")); - setColumnWidthMode(3,QListView::Manual); + setColumnWidthMode(3,TQListView::Manual); addColumn(i18n("Version")); - setColumnWidthMode(4,QListView::Manual); + setColumnWidthMode(4,TQListView::Manual); addColumn(i18n("Old Version")); - setColumnWidthMode(5,QListView::Manual); + setColumnWidthMode(5,TQListView::Manual); // setAllColumnsShowFocus(TRUE); setRootIsDecorated(TRUE); @@ -93,13 +93,13 @@ KpTreeListItem *KpTreeList::currentItem() return (KpTreeListItem *)KListView::currentItem(); } -void KpTreeList::contentsMousePressEvent ( QMouseEvent * e ) +void KpTreeList::contentsMousePressEvent ( TQMouseEvent * e ) { bool markUpdate = false; if (e->button() == LeftButton) { if (inMark(e->x())) { - QPoint vp = contentsToViewport(e->pos()); + TQPoint vp = contentsToViewport(e->pos()); KpTreeListItem *i = ( KpTreeListItem *)itemAt( vp ); if (i && i->childCount() == 0) { if (e->state() == ShiftButton) { @@ -151,7 +151,7 @@ bool KpTreeList::inMark(int x) { int i; - QHeader* const thisHeader = header(); + TQHeader* const thisHeader = header(); int mpos = thisHeader->mapToIndex(MPOS); for (i = 0; i < mpos; i++) @@ -259,7 +259,7 @@ void KpTreeList::markAll(KpTreeListItem *item) } } -void KpTreeList::findMarked(KpTreeListItem *item, QPtrList &selList) +void KpTreeList::findMarked(KpTreeListItem *item, TQPtrList &selList) { while (item) { if (item->childCount() > 0) { @@ -348,7 +348,7 @@ void KpTreeList::collapseTree(KpTreeListItem *pitem) /////////////////////////////////////////////////////////////////////////// // A package has been highlighted in the list tree -void KpTreeList::packageHighlighted(QListViewItem *item, packageDisplayWidget *packageDisplay) +void KpTreeList::packageHighlighted(TQListViewItem *item, packageDisplayWidget *packageDisplay) { KpTreeListItem *sel = (KpTreeListItem *)item; @@ -382,7 +382,7 @@ void KpTreeList::packageHighlighted(QListViewItem *item, packageDisplayWidget *p notPress = false; } -KpTreeListItem *KpTreeList::search(const QString &str, const QString &head, +KpTreeListItem *KpTreeList::search(const TQString &str, const TQString &head, KpTreeListItem *start) { KpTreeListItem *item = firstChild(); @@ -403,7 +403,7 @@ KpTreeListItem *KpTreeList::search(const QString &str, const QString &head, return 0; } -KpTreeListItem *KpTreeList::search(const QString &str, bool subStr, bool wrap, +KpTreeListItem *KpTreeList::search(const TQString &str, bool subStr, bool wrap, bool start=FALSE) { if (!firstChild()) @@ -427,7 +427,7 @@ bool KpTreeList::searchChild(KpTreeListItem *it) { do { if (!searchSkip) { - QString s = it->text(0); + TQString s = it->text(0); // kdDebug() << "s='" << s << "'='" << searchStr << "\n"; if ((it->childCount() == 0) && (it->info->display(treeType)) && (searchSubstr ? s.contains(searchStr,FALSE) : s == searchStr)) { @@ -455,7 +455,7 @@ bool KpTreeList::searchChild(KpTreeListItem *it) KpTreeListItem *KpTreeList::changePack(KpTreeListItem *searchResult, bool push) { if (searchResult) { - QListViewItem *i; + TQListViewItem *i; i = searchResult; while ((i = i->parent())) { @@ -560,7 +560,7 @@ void KpTreeList::readTreeConfig() int i,n; int num[] = {185,37,180,54,95,95}; - QString colpos; + TQString colpos; for (i = 0; i < 6; i++) { colpos.setNum(i); n = config->readNumEntry(colpos,num[i]); @@ -571,14 +571,14 @@ void KpTreeList::readTreeConfig() ////////////////////////////////////////////////////////////////////////////// -KpTreeListItem::KpTreeListItem( QListViewItem *parent, packageInfo* pinfo, - const QPixmap& thePixmap, - QString label1, QString label2 , - QString label3 , QString label4 , - QString label5 , QString label6 , - QString label7 , QString label8 +KpTreeListItem::KpTreeListItem( TQListViewItem *parent, packageInfo* pinfo, + const TQPixmap& thePixmap, + TQString label1, TQString label2 , + TQString label3 , TQString label4 , + TQString label5 , TQString label6 , + TQString label7 , TQString label8 -) : QListViewItem(parent, label1, label2, label3, label4, label5, +) : TQListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) { info = pinfo; @@ -589,12 +589,12 @@ KpTreeListItem::KpTreeListItem( QListViewItem *parent, packageInfo* pinfo, } KpTreeListItem::KpTreeListItem( KListView *parent, packageInfo* pinfo, - const QPixmap& thePixmap, - QString label1, QString label2 , - QString label3 , QString label4 , - QString label5 , QString label6 , - QString label7 , QString label8 -) : QListViewItem(parent, label1, label2, label3, label4, label5, + const TQPixmap& thePixmap, + TQString label1, TQString label2 , + TQString label3 , TQString label4 , + TQString label5 , TQString label6 , + TQString label7 , TQString label8 +) : TQListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) { info = pinfo; @@ -606,12 +606,12 @@ KpTreeListItem::KpTreeListItem( KListView *parent, packageInfo* pinfo, KpTreeListItem *KpTreeListItem::firstChild() { - return (KpTreeListItem *)QListViewItem::firstChild(); + return (KpTreeListItem *)TQListViewItem::firstChild(); } KpTreeListItem *KpTreeListItem::nextSibling() { - return (KpTreeListItem *)QListViewItem::nextSibling(); + return (KpTreeListItem *)TQListViewItem::nextSibling(); } void KpTreeListItem::toggleMark() @@ -644,10 +644,10 @@ void KpTreeListItem::show() setup(); } -int KpTreeListItem::compare( QListViewItem *i, int col, bool ascending ) const +int KpTreeListItem::compare( TQListViewItem *i, int col, bool ascending ) const { // Make sorting more certain if (col == 3) { // size column - QString k, j; + TQString k, j; j = key( col, ascending ); j = j.replace(' ','0'); @@ -660,7 +660,7 @@ int KpTreeListItem::compare( QListViewItem *i, int col, bool ascending ) const // kdDebug() << k <<"=" << j << "\n"; return j.compare(k); } else { - return QListViewItem::compare(i, col, ascending); + return TQListViewItem::compare(i, col, ascending); } } diff --git a/kpackage/kplview.h b/kpackage/kplview.h index 7931c99..1bbd08f 100644 --- a/kpackage/kplview.h +++ b/kpackage/kplview.h @@ -32,11 +32,11 @@ // Standard Headers // Qt Headers -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // KDE headers #include "klistview.h" @@ -52,9 +52,9 @@ class KpTreeList: public KListView Q_OBJECT public: - KpTreeList ( QWidget * parent = 0); + KpTreeList ( TQWidget * parent = 0); - void contentsMousePressEvent ( QMouseEvent * e ); + void contentsMousePressEvent ( TQMouseEvent * e ); bool inMark(int x); @@ -64,7 +64,7 @@ public: KpTreeListItem *markPkg; - QPtrList stack; + TQPtrList stack; // Stack of jumped to packages void sweep(bool init); @@ -72,7 +72,7 @@ public: void expand(); // sweep tree expanding everything - void findMarked(KpTreeListItem *item, QPtrList &selList); + void findMarked(KpTreeListItem *item, TQPtrList &selList); // generate list of marked tree items void clearMarked(KpTreeListItem *item); // unmark marked tree items @@ -95,12 +95,12 @@ public: void countMarked(KpTreeListItem *, int &cntInstall, int &cntUnInstall); // Count marked packages that can be installed/uninstalled - void packageHighlighted(QListViewItem *item, packageDisplayWidget *packageDisplay); + void packageHighlighted(TQListViewItem *item, packageDisplayWidget *packageDisplay); // A package has been highlighted in the list tree - KpTreeListItem *search(const QString &str, const QString &head, + KpTreeListItem *search(const TQString &str, const TQString &head, KpTreeListItem *start = 0); - KpTreeListItem *search(const QString &str, bool subStr, bool wrap, bool start); + KpTreeListItem *search(const TQString &str, bool subStr, bool wrap, bool start); // search for a package in tree KpTreeListItem *changePack(KpTreeListItem *searchResult, bool push = true); // Change to other package @@ -137,7 +137,7 @@ private: KpTreeListItem *searchCitem; bool searchSkip, searchSubstr; - QString searchStr; + TQString searchStr; KpTreeListItem *searchResult; // globals used by searchChild for start from current position, // skip to current item before search flag, substring search flag, @@ -155,20 +155,20 @@ signals: class KpTreeListItem : public QListViewItem { public: - KpTreeListItem( QListViewItem *parent, packageInfo* pinfo, - const QPixmap& thePixmap, - QString label1 = 0, QString label2 = 0, - QString label3 = 0, QString label4 = 0, - QString label5 = 0, QString label6 = 0, - QString label7 = 0, QString label8 = 0); + KpTreeListItem( TQListViewItem *parent, packageInfo* pinfo, + const TQPixmap& thePixmap, + TQString label1 = 0, TQString label2 = 0, + TQString label3 = 0, TQString label4 = 0, + TQString label5 = 0, TQString label6 = 0, + TQString label7 = 0, TQString label8 = 0); KpTreeListItem( KListView *parent, packageInfo* pinfo, - const QPixmap& thePixmap, - QString label1 = 0, QString label2 = 0, - QString label3 = 0, QString label4 = 0, - QString label5 = 0, QString label6 = 0, - QString label7 = 0, QString label8 = 0); + const TQPixmap& thePixmap, + TQString label1 = 0, TQString label2 = 0, + TQString label3 = 0, TQString label4 = 0, + TQString label5 = 0, TQString label6 = 0, + TQString label7 = 0, TQString label8 = 0); KpTreeListItem *firstChild(); @@ -181,7 +181,7 @@ public: void hide(); void show(); - virtual int compare( QListViewItem *i, int col, bool ascending ) const; + virtual int compare( TQListViewItem *i, int col, bool ascending ) const; packageInfo *info; bool marked; diff --git a/kpackage/main.cpp b/kpackage/main.cpp index 781d741..3ee47cd 100644 --- a/kpackage/main.cpp +++ b/kpackage/main.cpp @@ -33,7 +33,7 @@ #include "../config.h" #include "kpackage.h" -#include +#include #include #include @@ -74,7 +74,7 @@ kpRun *kprun; kpRun *kpstart; Opts *opts; -QString hostName; +TQString hostName; pkgInterface *kpinterface[kpinterfaceN]; @@ -93,12 +93,12 @@ int main(int argc, char **argv) int j = 0; // Make sure PATH has the right directories in it - QCString path = getenv("PATH"); + TQCString path = getenv("PATH"); path = "PATH=" + path + ":/sbin:/usr/sbin:/usr/local/bin"; putenv(strdup(path.data())); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QString remoteHost = args->getOption("remote"); + TQString remoteHost = args->getOption("remote"); if (remoteHost.isEmpty() || remoteHost == "localhost") { hostName = ""; @@ -140,7 +140,7 @@ int main(int argc, char **argv) kpkg->setCaption(hostName); if (args->count()) { // an argument has been given - QStringList files; + TQStringList files; for(int i = 0; i < args->count(); i++) { files.append(args->url(i).url()); } diff --git a/kpackage/managementWidget.cpp b/kpackage/managementWidget.cpp index 50cda53..e8dbcb6 100644 --- a/kpackage/managementWidget.cpp +++ b/kpackage/managementWidget.cpp @@ -29,8 +29,8 @@ */ -#include -#include +#include +#include #include #include @@ -52,7 +52,7 @@ extern Opts *opts; -KpListViewSearchLine::KpListViewSearchLine(QWidget *parent, KpTreeList *listView) +KpListViewSearchLine::KpListViewSearchLine(TQWidget *parent, KpTreeList *listView) :KListViewSearchLine(parent, listView) { list = listView; @@ -62,7 +62,7 @@ KpListViewSearchLine::~KpListViewSearchLine() { } -void KpListViewSearchLine::updateSearch(const QString &s) +void KpListViewSearchLine::updateSearch(const TQString &s) { list->expand(); KListViewSearchLine::updateSearch(s); @@ -72,27 +72,27 @@ void KpListViewSearchLine::updateSearch(const QString &s) // constructor -- initialise variables -managementWidget::managementWidget(QWidget *parent) - : QFrame(parent) +managementWidget::managementWidget(TQWidget *parent) + : TQFrame(parent) { install_action = 0; uninstall_action = 0; - allPackages = new QPtrList; + allPackages = new TQPtrList; tType[0] = i18n("Installed"); tType[1] = i18n("Updated"); tType[2] = i18n("New"); tType[3] = i18n("All"); - dirInstPackages = new QDict(7717); - dirUninstPackages = new QDict(7717); - dirInfoPackages = new QDict(7717); + dirInstPackages = new TQDict(7717); + dirUninstPackages = new TQDict(7717); + dirInfoPackages = new TQDict(7717); setupWidgets(); - connect(treeList,SIGNAL(updateMarked()), - this, SLOT( checkMarked())); + connect(treeList,TQT_SIGNAL(updateMarked()), + this, TQT_SLOT( checkMarked())); } managementWidget::~managementWidget() @@ -103,7 +103,7 @@ managementWidget::~managementWidget() // delete dirUninstPackages; } -void managementWidget::resizeEvent(QResizeEvent *) +void managementWidget::resizeEvent(TQResizeEvent *) { arrangeWidgets(); } @@ -111,46 +111,46 @@ void managementWidget::resizeEvent(QResizeEvent *) void managementWidget::setupWidgets() { - QTab t; + TQTab t; - top = new QBoxLayout(this,QBoxLayout::TopToBottom); - vPan = new QSplitter(QSplitter::Horizontal, this); + top = new TQBoxLayout(this,TQBoxLayout::TopToBottom); + vPan = new TQSplitter(TQSplitter::Horizontal, this); top->addWidget(vPan); // the left panel - leftpanel = new QFrame(vPan); - leftbox = new QBoxLayout(leftpanel,QBoxLayout::TopToBottom); + leftpanel = new TQFrame(vPan); + leftbox = new TQBoxLayout(leftpanel,TQBoxLayout::TopToBottom); - QTabBar *ltab = new QTabBar(leftpanel); + TQTabBar *ltab = new TQTabBar(leftpanel); treeList = new KpTreeList(leftpanel); for (int i = 0; i < 4; i++) { - QTab *t = new QTab(); + TQTab *t = new TQTab(); t->setText( tType[i] ); ltab->addTab(t); } // Quick Search Bar searchToolBar = new KToolBar( leftpanel, "search toolbar"); - QToolButton *clearSearch = new QToolButton(searchToolBar); + TQToolButton *clearSearch = new TQToolButton(searchToolBar); 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: "),searchToolBar); + (void) new TQLabel(i18n("Search: "),searchToolBar); searchLine = new KpListViewSearchLine(searchToolBar, treeList); // searchLine->setKeepParentsVisible(false); - connect( clearSearch, SIGNAL( pressed() ), searchLine, SLOT( clear() )); + connect( clearSearch, TQT_SIGNAL( pressed() ), searchLine, TQT_SLOT( clear() )); - QValueList clist; clist.append(0); clist.append(2); + TQValueList clist; clist.append(0); clist.append(2); searchLine->setSearchColumns(clist); searchToolBar->setStretchableWidget( searchLine ); - connect( treeList, SIGNAL( cleared() ), searchLine, SLOT( clear() )); + connect( treeList, TQT_SIGNAL( cleared() ), searchLine, TQT_SLOT( clear() )); - connect(ltab,SIGNAL(selected (int)),SLOT(tabChanged(int))); + connect(ltab,TQT_SIGNAL(selected (int)),TQT_SLOT(tabChanged(int))); ltab->setCurrentTab(treeList->treeType); leftbox->addWidget(ltab,10); @@ -159,16 +159,16 @@ void managementWidget::setupWidgets() leftbox->addStretch(); - lbuttons = new QBoxLayout(QBoxLayout::LeftToRight); + lbuttons = new TQBoxLayout(TQBoxLayout::LeftToRight); - luinstButton = new QPushButton(i18n("Uninstall Marked"),leftpanel); + luinstButton = new TQPushButton(i18n("Uninstall Marked"),leftpanel); luinstButton->setEnabled(FALSE); - connect(luinstButton,SIGNAL(clicked()), - SLOT(uninstallMultClicked())); - linstButton = new QPushButton(i18n("Install Marked"),leftpanel); + connect(luinstButton,TQT_SIGNAL(clicked()), + TQT_SLOT(uninstallMultClicked())); + linstButton = new TQPushButton(i18n("Install Marked"),leftpanel); linstButton->setEnabled(FALSE); - connect(linstButton,SIGNAL(clicked()), - SLOT(installMultClicked())); + connect(linstButton,TQT_SIGNAL(clicked()), + TQT_SLOT(installMultClicked())); leftbox->addLayout(lbuttons,0); // top level layout as child @@ -177,27 +177,27 @@ void managementWidget::setupWidgets() lbuttons->addWidget(luinstButton,1,AlignBottom); lbuttons->addStretch(1); - connect(treeList, SIGNAL(selectionChanged(QListViewItem *)), - SLOT(packageHighlighted(QListViewItem *))); + connect(treeList, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + TQT_SLOT(packageHighlighted(TQListViewItem *))); // the right panel - rightpanel = new QFrame(vPan); - rightbox = new QBoxLayout(rightpanel,QBoxLayout::TopToBottom); + rightpanel = new TQFrame(vPan); + rightbox = new TQBoxLayout(rightpanel,TQBoxLayout::TopToBottom); packageDisplay = new packageDisplayWidget(rightpanel); - // connect(this, SIGNAL(changePackage(packageInfo *)), - // packageDisplay, SLOT(changePackage(packageInfo *))); + // connect(this, TQT_SIGNAL(changePackage(packageInfo *)), + // packageDisplay, TQT_SLOT(changePackage(packageInfo *))); - rbuttons = new QBoxLayout(QBoxLayout::LeftToRight); + rbuttons = new TQBoxLayout(TQBoxLayout::LeftToRight); - uinstButton = new QPushButton(i18n("Uninstall"),rightpanel); + uinstButton = new TQPushButton(i18n("Uninstall"),rightpanel); uinstButton->setEnabled(FALSE); - connect(uinstButton,SIGNAL(clicked()), - SLOT(uninstallSingleClicked())); - instButton = new QPushButton(i18n("Install"),rightpanel); + connect(uinstButton,TQT_SIGNAL(clicked()), + TQT_SLOT(uninstallSingleClicked())); + instButton = new TQPushButton(i18n("Install"),rightpanel); instButton->setEnabled(FALSE); - connect(instButton,SIGNAL(clicked()), - SLOT(installSingleClicked())); + connect(instButton,TQT_SIGNAL(clicked()), + TQT_SLOT(installSingleClicked())); // Setup the `right panel' layout @@ -235,7 +235,7 @@ void managementWidget::readPSeparator() int w1 = config->readNumEntry("panel1Width",200); int w2 = config->readNumEntry("panel2Width",200); - QValueList size; + TQValueList size; size << w1 << w2; vPan->setSizes(size); } @@ -309,15 +309,15 @@ void managementWidget::collectData(bool refresh) return; // if refresh not required already initialised } - QApplication::setOverrideCursor( waitCursor ); + TQApplication::setOverrideCursor( waitCursor ); // stop clear() sending selectionChanged signal - disconnect(treeList, SIGNAL(selectionChanged(QListViewItem *)), - this, SLOT(packageHighlighted(QListViewItem *))); + disconnect(treeList, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQT_SLOT(packageHighlighted(TQListViewItem *))); treeList->hide(); // hide list tree treeList->clear(); // empty it - connect(treeList, SIGNAL(selectionChanged(QListViewItem *)), - SLOT(packageHighlighted(QListViewItem *))); + connect(treeList, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + TQT_SLOT(packageHighlighted(TQListViewItem *))); packageDisplay->changePackage(0); @@ -326,7 +326,7 @@ void managementWidget::collectData(bool refresh) delete allPackages; } - allPackages = new QPtrList; + allPackages = new TQPtrList; allPackages->setAutoDelete(TRUE); dirInstPackages->clear(); @@ -343,7 +343,7 @@ void managementWidget::collectData(bool refresh) // Rebuild the list tree rebuildListTree(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } // Rebuild the list tree @@ -384,7 +384,7 @@ void managementWidget::rebuildListTree() } // A package has been highlighted in the list tree -void managementWidget::packageHighlighted(QListViewItem *item) +void managementWidget::packageHighlighted(TQListViewItem *item) { treeList->packageHighlighted(item, packageDisplay); @@ -399,12 +399,12 @@ void managementWidget::packageHighlighted(QListViewItem *item) void managementWidget::installSingleClicked() { int result; - QPtrList plist; + TQPtrList plist; packageInfo *package = packageDisplay->package; if (package) { - QString filename = package->getFilename(); + TQString filename = package->getFilename(); kdDebug() << "File=" << filename <<"\n"; pkgInterface *interface = package->interface; if (interface->noFetch || !filename.isEmpty()) { @@ -414,7 +414,7 @@ void managementWidget::installSingleClicked() } result = interface->installation->exec(); - if (interface->installation->result() == QDialog::Accepted || + if (interface->installation->result() == TQDialog::Accepted || interface->installation->modified) { // it was accepted, so the package has been installed packageInfo *inf; @@ -433,9 +433,9 @@ void managementWidget::installSingleClicked() // kdDebug() << "Result=" << result <<"\n"; } else { - QString url = package->getUrl(); + TQString url = package->getUrl(); if (!url.isEmpty()) { - QString s = kpackage->fetchNetFile(url); + TQString s = kpackage->fetchNetFile(url); if (!s.isEmpty()) { packageDisplay->changePackage(package); setupInstButton(); @@ -457,14 +457,14 @@ void managementWidget::installMultClicked() int i; KpTreeListItem *it; packageInfo *inf; - QPtrList **lst = new QPtrList*[kpinterfaceN]; + TQPtrList **lst = new TQPtrList*[kpinterfaceN]; selList.clear(); treeList->findMarked(treeList->firstChild(), selList); for (i = 0; i < kpinterfaceN; i++) { if (kpinterface[i]) { - lst[i] = new QPtrList; + lst[i] = new TQPtrList; for (it = selList.first(); it != 0; it = selList.next()) { if (it->info->interface == kpinterface[i] && it->childCount() == 0 && @@ -505,7 +505,7 @@ void managementWidget::installMultClicked() void managementWidget::uninstallSingleClicked() { int result; - QPtrList plist; + TQPtrList plist; packageInfo *package = packageDisplay->package; @@ -517,7 +517,7 @@ void managementWidget::uninstallSingleClicked() } result = interface->uninstallation->exec(); - if(result == QDialog::Accepted || + if(result == TQDialog::Accepted || interface->installation->modified) { packageInfo *inf; for (inf = plist.first(); inf != 0; inf = plist.next()) { @@ -545,13 +545,13 @@ void managementWidget::uninstallMultClicked() int i; KpTreeListItem *it; packageInfo *inf; - QPtrList **lst = new QPtrList*[kpinterfaceN]; + TQPtrList **lst = new TQPtrList*[kpinterfaceN]; selList.clear(); treeList->findMarked(treeList->firstChild(), selList); for (i = 0; i < kpinterfaceN; i++) { if (kpinterface[i]) { - lst[i] = new QPtrList; + lst[i] = new TQPtrList; for (it = selList.first(); it != 0; it = selList.next()) { if (it->info->interface == kpinterface[i] && it->childCount() == 0 && @@ -596,7 +596,7 @@ void managementWidget::doChangePackage(packageInfo *p) /////////////////////////////////////////////////////////////////////////// -KpTreeListItem *managementWidget::search(QString str, bool subStr, bool wrap, +KpTreeListItem *managementWidget::search(TQString str, bool subStr, bool wrap, bool start) { return treeList->search(str, subStr, wrap, start); @@ -606,11 +606,11 @@ KpTreeListItem *managementWidget::search(QString str, bool subStr, bool wrap, /////////////////////////////////////////////////////////////////////////// KpTreeListItem *managementWidget::updatePackage(packageInfo *pki, bool install) { - QString version; + TQString version; KpTreeListItem *q; if (allPackages) { - QString name(pki->getProperty("name")); + TQString name(pki->getProperty("name")); if (pki->hasProperty("version")) version = pki->getProperty("version"); else @@ -618,7 +618,7 @@ KpTreeListItem *managementWidget::updatePackage(packageInfo *pki, bool install) pkgInterface *interface = pki->interface; packageInfo *pnew = interface->getPackageInfo('i', name, version); packageInfo *ptree; - QString pkgId = name + interface->typeID; + TQString pkgId = name + interface->typeID; if (install) { if (pnew) { diff --git a/kpackage/managementWidget.h b/kpackage/managementWidget.h index bf1c6d1..eefc4c7 100644 --- a/kpackage/managementWidget.h +++ b/kpackage/managementWidget.h @@ -43,14 +43,14 @@ // Standard Headers // Qt Headers -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE headers #include @@ -74,12 +74,12 @@ class KpListViewSearchLine : public KListViewSearchLine public: - KpListViewSearchLine(QWidget *parent, KpTreeList *listView); + KpListViewSearchLine(TQWidget *parent, KpTreeList *listView); ~KpListViewSearchLine(); - void updateSearch(const QString &s = QString::null); + void updateSearch(const TQString &s = TQString::null); private: KpTreeList *list; @@ -92,7 +92,7 @@ class managementWidget : public QFrame ///////////// METHODS ------------------------------------------------------ public: - managementWidget(QWidget *parent); + managementWidget(TQWidget *parent); // Constructor ~managementWidget(); @@ -108,10 +108,10 @@ public: void doChangePackage(packageInfo *p); // emit change package - KpTreeListItem *search(QString str, bool subStr, bool wrap, + KpTreeListItem *search(TQString str, bool subStr, bool wrap, bool start=FALSE); protected: - void resizeEvent(QResizeEvent *re); + void resizeEvent(TQResizeEvent *re); // This is called when the widget is resized private: @@ -157,7 +157,7 @@ private: void setInstallAction(KAction *a) { install_action = a; } void setUninstallAction(KAction *a) { uninstall_action = a; } - void packageHighlighted(QListViewItem *); + void packageHighlighted(TQListViewItem *); // This is called when a package has been highlighted in the list tree void tabChanged(int); @@ -172,43 +172,43 @@ private: ///////////// DATA --------------------------------------------------------- private: - QPushButton *linstButton,*luinstButton,*instButton,*uinstButton; + TQPushButton *linstButton,*luinstButton,*instButton,*uinstButton; // This button is used to (un)install the selected package packageDisplayWidget *packageDisplay; // This widget displays the package info / file-list - QBoxLayout *top, *leftbox, *rightbox, *lbuttons, *rbuttons; + TQBoxLayout *top, *leftbox, *rightbox, *lbuttons, *rbuttons; // These are the geometry managers - QFrame *leftpanel, *rightpanel; + TQFrame *leftpanel, *rightpanel; // frame to put QBox in - QTabWidget *ltab; + TQTabWidget *ltab; // tab between various treelist displays - QSplitter *vPan; + TQSplitter *vPan; // veritcal panner between panels KToolBar *searchToolBar; - QPtrList selList; + TQPtrList selList; // list for selected packages - QString tType[4]; + TQString tType[4]; // identifiers for tree display public: - QPtrList *allPackages; + TQPtrList *allPackages; // The list of packages - QDict *dirInstPackages; + TQDict *dirInstPackages; // maps installed package name to package - QDict *dirUninstPackages; + TQDict *dirUninstPackages; // maps uninstalled package name to package - QDict *dirInfoPackages; + TQDict *dirInfoPackages; // maps Info package name to package KpTreeList *treeList; diff --git a/kpackage/options.cpp b/kpackage/options.cpp index d2c2c20..8d86470 100644 --- a/kpackage/options.cpp +++ b/kpackage/options.cpp @@ -32,19 +32,19 @@ #include "options.h" #include "cache.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 #include @@ -53,7 +53,7 @@ extern Opts *opts; ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -Options::Options(QWidget *parent) +Options::Options(TQWidget *parent) : KDialogBase(Tabbed, i18n("Options"), Ok | Cancel, Ok, parent, 0, false){ fRemote = false; @@ -70,25 +70,25 @@ Options::Options(QWidget *parent) } { - QVBox *page = addVBoxPage(i18n("&Types")); + TQVBox *page = addVBoxPage(i18n("&Types")); - framet = new QGroupBox(1,Qt::Horizontal,i18n("Handle Package Type"), page); + framet = new TQGroupBox(1,Qt::Horizontal,i18n("Handle Package Type"), page); - hh = new QGroupBox(1,Qt::Horizontal,i18n("Remote Host"),framet); - huse = new QCheckBox(i18n("Use remote host (Debian APT only):"),hh); - connect(huse, SIGNAL(clicked()), this, SLOT(useRemote())); + hh = new TQGroupBox(1,Qt::Horizontal,i18n("Remote Host"),framet); + huse = new TQCheckBox(i18n("Use remote host (Debian APT only):"),hh); + connect(huse, TQT_SIGNAL(clicked()), this, TQT_SLOT(useRemote())); hosts = new KComboBox( true, hh, "combo" ); KCompletion *comp = hosts->completionObject(); - connect(hosts,SIGNAL(returnPressed(const QString&)),comp,SLOT(addItem(const QString&))); - connect(hosts,SIGNAL(returnPressed()),this,SLOT(insHosts())); + connect(hosts,TQT_SIGNAL(returnPressed(const TQString&)),comp,TQT_SLOT(addItem(const TQString&))); + connect(hosts,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(insHosts())); hosts->setMaxCount(20); hosts->setDuplicatesEnabled(false); - hosts->setInsertionPolicy(QComboBox::AtTop); - // hosts->setInsertionPolicy(QComboBox::NoInsertion); + hosts->setInsertionPolicy(TQComboBox::AtTop); + // hosts->setInsertionPolicy(TQComboBox::NoInsertion); hosts->setTrapReturnKey(true); int i; - QString msgStr; + TQString msgStr; for (i = 0; i < kpinterfaceN; i++) { if (kpinterface[i]) { if (kpinterface[i]->hasProgram) { @@ -99,11 +99,11 @@ Options::Options(QWidget *parent) .arg(kpinterface[i]->name) .arg(kpinterface[i]->errExe); } - packageBox[i] = new QGroupBox(2,Qt::Horizontal,msgStr, framet, "box"); - packageHandle[i] = new QCheckBox(i18n("Enable"), packageBox[i]); - connect(packageHandle[i], SIGNAL(clicked()), this, SLOT(scanLocates())); - locate[i] = new QPushButton(i18n("Location of Packages"),packageBox[i]); - connect(locate[i], SIGNAL(clicked()), kpinterface[i], SLOT(setLocation())); + packageBox[i] = new TQGroupBox(2,Qt::Horizontal,msgStr, framet, "box"); + packageHandle[i] = new TQCheckBox(i18n("Enable"), packageBox[i]); + connect(packageHandle[i], TQT_SIGNAL(clicked()), this, TQT_SLOT(scanLocates())); + locate[i] = new TQPushButton(i18n("Location of Packages"),packageBox[i]); + connect(locate[i], TQT_SIGNAL(clicked()), kpinterface[i], TQT_SLOT(setLocation())); } else { packageHandle[i] = 0; } @@ -111,81 +111,81 @@ Options::Options(QWidget *parent) } { - QVBox *page = addVBoxPage(i18n("Cac&he")); + TQVBox *page = addVBoxPage(i18n("Cac&he")); - bc = new QButtonGroup(page); + bc = new TQButtonGroup(page); bc->setTitle(i18n("Cache Remote Package Folders")); - connect( bc, SIGNAL(clicked(int)), SLOT(PDCache(int)) ); + connect( bc, TQT_SIGNAL(clicked(int)), TQT_SLOT(PDCache(int)) ); - QVBoxLayout* vc = new QVBoxLayout( bc, 15, 10, "vc"); + TQVBoxLayout* vc = new TQVBoxLayout( bc, 15, 10, "vc"); vc->addSpacing( bc->fontMetrics().height() ); - dcache[0] = new QRadioButton(i18n("Always"),bc); + dcache[0] = new TQRadioButton(i18n("Always"),bc); vc->addWidget(dcache[0]); - dcache[1] = new QRadioButton(i18n("During a session"),bc); + dcache[1] = new TQRadioButton(i18n("During a session"),bc); vc->addWidget(dcache[1]); - dcache[2] = new QRadioButton(i18n("Never"),bc); + dcache[2] = new TQRadioButton(i18n("Never"),bc); vc->addWidget(dcache[2]); - bp = new QButtonGroup(page); + bp = new TQButtonGroup(page); bp->setTitle(i18n("Cache Remote Package Files")); - connect( bp, SIGNAL(clicked(int)), SLOT(PPCache(int)) ); + connect( bp, TQT_SIGNAL(clicked(int)), TQT_SLOT(PPCache(int)) ); - QVBoxLayout* vp = new QVBoxLayout( bp, 15, 10, "vp"); + TQVBoxLayout* vp = new TQVBoxLayout( bp, 15, 10, "vp"); vp->addSpacing( bp->fontMetrics().height() ); - pcache[0] = new QRadioButton(i18n("Always"),bp); + pcache[0] = new TQRadioButton(i18n("Always"),bp); vp->addWidget(pcache[0]); - pcache[1] = new QRadioButton(i18n("During a session"),bp); + pcache[1] = new TQRadioButton(i18n("During a session"),bp); vp->addWidget(pcache[1]); - pcache[2] = new QRadioButton(i18n("Never"),bp); + pcache[2] = new TQRadioButton(i18n("Never"),bp); vp->addWidget(pcache[2]); - QGroupBox* cd = new QGroupBox (1, Qt::Horizontal, i18n("Cache Folder"), page) ; - cd->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Fixed) ; + TQGroupBox* cd = new TQGroupBox (1, Qt::Horizontal, i18n("Cache Folder"), page) ; + cd->setSizePolicy (TQSizePolicy::Expanding, TQSizePolicy::Fixed) ; cachedir = new KURLRequester("", cd, "cachedir"); } { - QWidget *page = addVBoxPage(i18n("&Misc")); - QVBoxLayout *vf = new QVBoxLayout(page); + TQWidget *page = addVBoxPage(i18n("&Misc")); + TQVBoxLayout *vf = new TQVBoxLayout(page); // vf->setSpacing(KDialog::spacingHint()); vf->setMargin(0); - bs = new QButtonGroup(page); + bs = new TQButtonGroup(page); bs->setTitle(i18n("Execute Privileged Commands Using")); - connect( bs, SIGNAL(clicked(int)), SLOT(PPrivs(int)) ); + connect( bs, TQT_SIGNAL(clicked(int)), TQT_SLOT(PPrivs(int)) ); - QVBoxLayout* vs = new QVBoxLayout( bs, 15, 10, "bs"); + TQVBoxLayout* vs = new TQVBoxLayout( bs, 15, 10, "bs"); vs->addSpacing( bs->fontMetrics().height() ); - privs[0] = new QRadioButton(i18n("su command"),bs); + privs[0] = new TQRadioButton(i18n("su command"),bs); vs->addWidget(privs[0]); - privs[1] = new QRadioButton(i18n("sudo command"),bs); + privs[1] = new TQRadioButton(i18n("sudo command"),bs); vs->addWidget(privs[1]); - privs[2] = new QRadioButton(i18n("ssh command"),bs); + privs[2] = new TQRadioButton(i18n("ssh command"),bs); vs->addWidget(privs[2]); - valid = new QCheckBox(i18n("Verify file list"), page, "valid"); + valid = new TQCheckBox(i18n("Verify file list"), page, "valid"); vf->addWidget(valid,0,AlignLeft); - pkgRead = new QCheckBox(i18n("Read information from all local package files"), page, "pkgr"); + pkgRead = new TQCheckBox(i18n("Read information from all local package files"), page, "pkgr"); vf->addWidget(pkgRead,0,AlignLeft); vf->addSpacing(100); } - connect( this, SIGNAL(okClicked()), SLOT(apply_slot()) ); - connect( this, SIGNAL(closeClicked()), SLOT(cancel_slot()) ); - connect( this, SIGNAL(cancelClicked()), SLOT(cancel_slot()) ); + connect( this, TQT_SIGNAL(okClicked()), TQT_SLOT(apply_slot()) ); + connect( this, TQT_SIGNAL(closeClicked()), TQT_SLOT(cancel_slot()) ); + connect( this, TQT_SIGNAL(cancelClicked()), TQT_SLOT(cancel_slot()) ); setValues(); @@ -195,7 +195,7 @@ Options::Options(QWidget *parent) void Options::insHosts() { // kdDebug() << "insHosts " << "\n"; bool found = false; - QString s = hosts->currentText(); + TQString s = hosts->currentText(); int i; for (i = 0; i < hosts->count(); i++) { @@ -309,7 +309,7 @@ void Options::apply_slot() insHosts(); opts->hostList.clear(); int i; - QString prev; + TQString prev; for (i = 0; i < hosts->count(); i++) { // kdDebug() << "=" << prev << "=" << hosts->text(i) << "=\n"; if (prev != hosts->text(i)) @@ -317,7 +317,7 @@ void Options::apply_slot() prev = hosts->text(i); } - QString remoteHost = hosts->currentText(); + TQString remoteHost = hosts->currentText(); if ((fRemote != huse->isChecked()) || huse->isChecked() && (remoteHost != hostName)) { newHost = true; @@ -333,7 +333,7 @@ void Options::apply_slot() opts->DCache = dc; opts->PCache = pc; opts->privCmd = prc; - cachedir->lineEdit()->setText (QDir(cachedir->lineEdit()->text()).path().append("/")) ; // make sure that cache directory ends with "/" + cachedir->lineEdit()->setText (TQDir(cachedir->lineEdit()->text()).path().append("/")) ; // make sure that cache directory ends with "/" opts->CacheDir = cachedir->lineEdit()->text() ; for (i = 0; i < kpinterfaceN; i++) { @@ -377,7 +377,7 @@ void Options::PPrivs(int r) ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -Opts::Opts(const QString &initHost) +Opts::Opts(const TQString &initHost) { readSettings(initHost); } @@ -386,7 +386,7 @@ Opts::~Opts() { } -void Opts::readSettings(const QString &initHost) +void Opts::readSettings(const TQString &initHost) { KConfig *config = kapp->config(); @@ -409,7 +409,7 @@ void Opts::readSettings(const QString &initHost) if (PCache >2) { PCache = 0; } - CacheDir = config->readPathEntry("Cache_Directory", QDir::homeDirPath() + "/.kpackage/"); + CacheDir = config->readPathEntry("Cache_Directory", TQDir::homeDirPath() + "/.kpackage/"); // Backward compatability bool useSSH = config->readNumEntry("Use_SSH",0); diff --git a/kpackage/options.h b/kpackage/options.h index 4f8b1e7..c1aa840 100644 --- a/kpackage/options.h +++ b/kpackage/options.h @@ -35,10 +35,10 @@ #include // Qt Headers -#include -#include -#include -#include +#include +#include +#include +#include // KDE headers #include @@ -65,7 +65,7 @@ class Options : public KDialogBase public: - Options ( QWidget *parent = 0); + Options ( TQWidget *parent = 0); ~Options(); void restore(); @@ -80,45 +80,45 @@ private: bool PkgRead; bool fRemote; int DCache, dc, PCache, pc, privCmd, prc; - QString CacheDir; + TQString CacheDir; - QVBoxLayout* vl; + TQVBoxLayout* vl; - QVBoxLayout* vt; - QGroupBox *framet; - QGroupBox *packageBox[kpinterfaceN]; - QCheckBox *packageHandle[kpinterfaceN]; - QPushButton *locate[kpinterfaceN]; + TQVBoxLayout* vt; + TQGroupBox *framet; + TQGroupBox *packageBox[kpinterfaceN]; + TQCheckBox *packageHandle[kpinterfaceN]; + TQPushButton *locate[kpinterfaceN]; - QGroupBox *hh; - QCheckBox *huse; + TQGroupBox *hh; + TQCheckBox *huse; KComboBox *hosts; - QVBoxLayout* vb; - QButtonGroup *bg; - QRadioButton *disp[4]; + TQVBoxLayout* vb; + TQButtonGroup *bg; + TQRadioButton *disp[4]; - QVBoxLayout* vc; - QButtonGroup *bc; - QRadioButton *dcache[3]; + TQVBoxLayout* vc; + TQButtonGroup *bc; + TQRadioButton *dcache[3]; - QVBoxLayout* vp; - QButtonGroup *bp; - QRadioButton *pcache[3]; + TQVBoxLayout* vp; + TQButtonGroup *bp; + TQRadioButton *pcache[3]; - QVBoxLayout* vs; - QButtonGroup *bs; - QRadioButton *privs[3]; + TQVBoxLayout* vs; + TQButtonGroup *bs; + TQRadioButton *privs[3]; KURLRequester *cachedir; - QVBoxLayout* vr; - QGroupBox *framer; - QCheckBox *pkgRead; + TQVBoxLayout* vr; + TQGroupBox *framer; + TQCheckBox *pkgRead; - QVBoxLayout* vf; - QGroupBox *framem; - QCheckBox *valid; + TQVBoxLayout* vf; + TQGroupBox *framem; + TQCheckBox *valid; public slots: @@ -140,13 +140,13 @@ private slots: class Opts { public: - void readSettings(const QString &initHost = ""); + void readSettings(const TQString &initHost = ""); void writeSettings(); void readLaterSettings(); // options to be setup after package interfaces setup - QStringList hostList; + TQStringList hostList; // list of hosts to choose from bool VerifyFL; @@ -170,10 +170,10 @@ public: // which command to use to execute priveliged commands enum {SUcmd=0, SUDOcmd=1, SSHcmd=2}; - QString CacheDir; + TQString CacheDir; // cache directory - Opts(const QString &initHost); + Opts(const TQString &initHost); ~Opts(); }; ////////////////////////////////////////////////////////////////////////////// diff --git a/kpackage/packageDisplay.cpp b/kpackage/packageDisplay.cpp index 67b0754..6eabc9d 100644 --- a/kpackage/packageDisplay.cpp +++ b/kpackage/packageDisplay.cpp @@ -33,9 +33,9 @@ // Qt headers -#include -#include -#include +#include +#include +#include #include #include @@ -55,8 +55,8 @@ extern Opts *opts; // constructor -packageDisplayWidget::packageDisplayWidget(QWidget *parent) - : QTabWidget(parent) +packageDisplayWidget::packageDisplayWidget(TQWidget *parent) + : TQTabWidget(parent) { // Initially we're not dealing with any package package=NULL; @@ -68,7 +68,7 @@ packageDisplayWidget::packageDisplayWidget(QWidget *parent) tick = UserIcon("ptick"); cross = UserIcon("cross"); question = UserIcon("question"); - blank = new QPixmap(); + blank = new TQPixmap(); } @@ -79,20 +79,20 @@ packageDisplayWidget::~packageDisplayWidget() void packageDisplayWidget::setupWidgets() { - proptab = new QVBox( this); + proptab = new TQVBox( this); curTab = proptab; - fltab = new QVBox( this); - cltab = new QVBox( this); + fltab = new TQVBox( this); + cltab = new TQVBox( this); packageProperties = new packagePropertiesWidget(proptab); fileList = new kpFileList(fltab, this); - connect(fileList, SIGNAL(executed(QListViewItem *)), - this, SLOT( openBinding(QListViewItem *)) ); - connect(fileList, SIGNAL(returnPressed(QListViewItem *)), - this, SLOT( openBinding(QListViewItem *)) ); + connect(fileList, TQT_SIGNAL(executed(TQListViewItem *)), + this, TQT_SLOT( openBinding(TQListViewItem *)) ); + connect(fileList, TQT_SIGNAL(returnPressed(TQListViewItem *)), + this, TQT_SLOT( openBinding(TQListViewItem *)) ); - changeLog = new QTextEdit(cltab); + changeLog = new TQTextEdit(cltab); addTab(proptab, i18n("Properties")); addTab(fltab, i18n("File List")); @@ -105,18 +105,18 @@ void packageDisplayWidget::setupWidgets() if (isTabEnabled(proptab)) setTabEnabled(proptab,false); - connect(this,SIGNAL(currentChanged(QWidget *)), this, SLOT(tabSelected(QWidget *))); + connect(this,TQT_SIGNAL(currentChanged(TQWidget *)), this, TQT_SLOT(tabSelected(TQWidget *))); } -void packageDisplayWidget::tabSelected(QWidget *tab) +void packageDisplayWidget::tabSelected(TQWidget *tab) { curTab = tab; tabSet(tab); } -void packageDisplayWidget::tabSet(QWidget *tab) +void packageDisplayWidget::tabSet(TQWidget *tab) { - disconnect(this,SIGNAL(currentChanged(QWidget *)), this, SLOT(tabSelected(QWidget *))); + disconnect(this,TQT_SIGNAL(currentChanged(TQWidget *)), this, TQT_SLOT(tabSelected(TQWidget *))); if(tab == proptab) { packageProperties->show(); fileList->hide(); @@ -146,12 +146,12 @@ void packageDisplayWidget::tabSet(QWidget *tab) } setCurrentPage(2); } - connect(this,SIGNAL(currentChanged(QWidget *)), this, SLOT(tabSelected(QWidget *))); + connect(this,TQT_SIGNAL(currentChanged(TQWidget *)), this, TQT_SLOT(tabSelected(TQWidget *))); } void packageDisplayWidget::noPackage() { - disconnect(this,SIGNAL(currentChanged(QWidget *)), this, SLOT(tabSelected(QWidget *))); + disconnect(this,TQT_SIGNAL(currentChanged(TQWidget *)), this, TQT_SLOT(tabSelected(TQWidget *))); if (isTabEnabled(fltab)) { fileList->setColumnText(0,""); @@ -168,7 +168,7 @@ void packageDisplayWidget::noPackage() fileList->clear(); changeLog->setText(""); - connect(this,SIGNAL(currentChanged(QWidget *)), this, SLOT(tabSelected(QWidget *))); + connect(this,TQT_SIGNAL(currentChanged(TQWidget *)), this, TQT_SLOT(tabSelected(TQWidget *))); } // Change packages @@ -177,12 +177,12 @@ void packageDisplayWidget::changePackage(packageInfo *p) // This is to stop selectionChanged firing off here - disconnect(fileList, SIGNAL(executed(QListViewItem *)), - this, SLOT( openBinding(QListViewItem *)) ); - disconnect(fileList, SIGNAL(returnPressed(QListViewItem *)), - this, SLOT( openBinding(QListViewItem *)) ); - disconnect(fileList, SIGNAL(contextMenu(KListView *, QListViewItem *, const QPoint &)), - fileList, SLOT( openContext(KListView *, QListViewItem *, const QPoint &)) ); + disconnect(fileList, TQT_SIGNAL(executed(TQListViewItem *)), + this, TQT_SLOT( openBinding(TQListViewItem *)) ); + disconnect(fileList, TQT_SIGNAL(returnPressed(TQListViewItem *)), + this, TQT_SLOT( openBinding(TQListViewItem *)) ); + disconnect(fileList, TQT_SIGNAL(contextMenu(KListView *, TQListViewItem *, const TQPoint &)), + fileList, TQT_SLOT( openContext(KListView *, TQListViewItem *, const TQPoint &)) ); if (package && package != p) { @@ -196,12 +196,12 @@ void packageDisplayWidget::changePackage(packageInfo *p) if (!p) { // change to no package noPackage(); } else { - QString u = package->getFilename(); + TQString u = package->getFilename(); if (!package->updated && !u.isEmpty()) { packageInfo *np = package->interface->getPackageInfo('u', u, 0); if (np) { - QMap::Iterator it; // update info entries in p + TQMap::Iterator it; // update info entries in p for ( it = np->info.begin(); it != np->info.end(); ++it ) { package->info.replace(it.key(),it.data()); } @@ -230,12 +230,12 @@ void packageDisplayWidget::changePackage(packageInfo *p) } - connect(fileList, SIGNAL(executed(QListViewItem *)), - this, SLOT( openBinding(QListViewItem *)) ); - connect(fileList, SIGNAL(returnPressed(QListViewItem *)), - this, SLOT( openBinding(QListViewItem *)) ); - connect(fileList, SIGNAL(contextMenu(KListView *, QListViewItem *, const QPoint &)), - fileList, SLOT( openContext(KListView *, QListViewItem *, const QPoint &)) ); + connect(fileList, TQT_SIGNAL(executed(TQListViewItem *)), + this, TQT_SLOT( openBinding(TQListViewItem *)) ); + connect(fileList, TQT_SIGNAL(returnPressed(TQListViewItem *)), + this, TQT_SLOT( openBinding(TQListViewItem *)) ); + connect(fileList, TQT_SIGNAL(contextMenu(KListView *, TQListViewItem *, const TQPoint &)), + fileList, TQT_SLOT( openContext(KListView *, TQListViewItem *, const TQPoint &)) ); } @@ -244,8 +244,8 @@ void packageDisplayWidget::updateChangeLog() if (!package) return; - QStringList lines; - QString stmp; + TQStringList lines; + TQString stmp; lines = package->interface->getChangeLog(package); @@ -253,7 +253,7 @@ void packageDisplayWidget::updateChangeLog() changeLog->hide(); if (lines.count() > 1) { changeLog->setText(""); - for (QStringList::ConstIterator it = lines.begin(); + for (TQStringList::ConstIterator it = lines.begin(); (it != lines.end()); it++) { if (! (*it).isEmpty()) @@ -276,8 +276,8 @@ void packageDisplayWidget::updateFileList() return; // Get a list of files in the package - QStringList files; - QStringList errorfiles; + TQStringList files; + TQStringList errorfiles; // set the status kpackage->setStatus(i18n("Updating File List")); @@ -311,7 +311,7 @@ void packageDisplayWidget::updateFileList() uint c=0, p=0; uint step = (files.count() / 100) + 1; - QString ftmp; + TQString ftmp; ftmp.setNum(files.count()); ftmp += i18n(" Files"); @@ -319,10 +319,10 @@ void packageDisplayWidget::updateFileList() fileList->hide(); fileList->setSorting(-1); - QListViewItem *q; + TQListViewItem *q; // Go through all the files - for (QStringList::ConstIterator it = files.begin(); (it != files.end()); ) { + for (TQStringList::ConstIterator it = files.begin(); (it != files.end()); ) { // Update the status progress c++; if(c > step) { @@ -333,14 +333,14 @@ void packageDisplayWidget::updateFileList() int error=0; - QString cur = *it; + TQString cur = *it; it++; - QPixmap pixmap; + TQPixmap pixmap; if (installed) { // see if file failed verification, if ( errorfiles.count() > 0) { - for( QStringList::ConstIterator itError = errorfiles.begin(); + for( TQStringList::ConstIterator itError = errorfiles.begin(); (itError != errorfiles.end()); (itError++) ) { if (cur == *itError) { @@ -363,16 +363,16 @@ void packageDisplayWidget::updateFileList() kpackage->setPercent(100); } - kpFileList::kpFileList(QWidget* parent, packageDisplayWidget* parent2) : KListView(parent) + kpFileList::kpFileList(TQWidget* parent, packageDisplayWidget* parent2) : KListView(parent) { hide(); addColumn("name"); setRootIsDecorated(TRUE); - connect(this, SIGNAL(contextMenu(KListView *, QListViewItem *, const QPoint &)), - this, SLOT( openContext(KListView *, QListViewItem *, const QPoint &)) ); + connect(this, TQT_SIGNAL(contextMenu(KListView *, TQListViewItem *, const TQPoint &)), + this, TQT_SLOT( openContext(KListView *, TQListViewItem *, const TQPoint &)) ); FileListMenu = new KPopupMenu(); - openwith = FileListMenu->insertItem(i18n("&Open With..."),parent2,SLOT(__openBindingWith())); + openwith = FileListMenu->insertItem(i18n("&Open With..."),parent2,TQT_SLOT(__openBindingWith())); pkDisplay = parent2; } @@ -383,7 +383,7 @@ void packageDisplayWidget::updateFileList() openBindingWith(fileList->selectedItem()); } - void packageDisplayWidget::openBindingWith(QListViewItem *index) + void packageDisplayWidget::openBindingWith(TQListViewItem *index) { if ( !index ) return; KURL url; @@ -394,7 +394,7 @@ void packageDisplayWidget::updateFileList() } - void kpFileList::openContext(KListView *, QListViewItem *, const QPoint &p) + void kpFileList::openContext(KListView *, TQListViewItem *, const TQPoint &p) { FileListMenu->setItemEnabled(openwith, (selectedItem() && pkDisplay->package && pkDisplay->package->getFilename().isEmpty()) ? TRUE : FALSE); @@ -407,25 +407,25 @@ void packageDisplayWidget::updateFileList() KListView::clear(); } - QString kpFileList::item2Path(QListViewItem *it) + TQString kpFileList::item2Path(TQListViewItem *it) { - QString res; + TQString res; res = it ? it->text(0) : NULL; return res; } - QListViewItem* kpFileList::insert(const QString &cur, const QPixmap &pixmap) + TQListViewItem* kpFileList::insert(const TQString &cur, const TQPixmap &pixmap) { - QListViewItem* q; + TQListViewItem* q; - q = new QListViewItem(this, cur); + q = new TQListViewItem(this, cur); if (q) q->setPixmap(0,pixmap); return q; } - void packageDisplayWidget::openBinding(QListViewItem *index) + void packageDisplayWidget::openBinding(TQListViewItem *index) { if ( !index ) return; KURL url; diff --git a/kpackage/packageDisplay.h b/kpackage/packageDisplay.h index 5631925..c85ff52 100644 --- a/kpackage/packageDisplay.h +++ b/kpackage/packageDisplay.h @@ -9,7 +9,7 @@ // // The file list will be displayed using a tree list. // -// The widget is mainly a QTabDialog with two tabs: Info and FileList. +// The widget is mainly a TQTabDialog with two tabs: Info and FileList. // The Info tab is the default one. */ @@ -42,10 +42,10 @@ #include "../config.h" // Qt Headers -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -60,18 +60,18 @@ class kpFileList : public KListView public: - kpFileList(QWidget* parent, packageDisplayWidget* parent2); + kpFileList(TQWidget* parent, packageDisplayWidget* parent2); - QString item2Path(QListViewItem *it); + TQString item2Path(TQListViewItem *it); public slots: - void openContext(KListView *, QListViewItem *, const QPoint &); + void openContext(KListView *, TQListViewItem *, const TQPoint &); virtual void clear(); - QListViewItem* insert(const QString &cur, const QPixmap &pixmap); + TQListViewItem* insert(const TQString &cur, const TQPixmap &pixmap); private: @@ -89,7 +89,7 @@ class packageDisplayWidget : public QTabWidget friend class kpFileList; ///////////// METHODS ------------------------------------------------------ public: - packageDisplayWidget(QWidget *parent=0); + packageDisplayWidget(TQWidget *parent=0); // Constructor ~packageDisplayWidget(); @@ -113,17 +113,17 @@ private: // This updates the change log to match that found with the currently // selected package - void tabSet(QWidget *); + void tabSet(TQWidget *); // Set display for corresponding tab ///////////// SLOTS -------------------------------------------------------- public slots: - void tabSelected(QWidget *); + void tabSelected(TQWidget *); - void openBinding(QListViewItem *); + void openBinding(TQListViewItem *); - void openBindingWith(QListViewItem *); + void openBindingWith(TQListViewItem *); void __openBindingWith(); @@ -137,21 +137,21 @@ public: private: - QTabWidget *tabbar; + TQTabWidget *tabbar; // The tab bar - QVBox *proptab, *fltab, *cltab; + TQVBox *proptab, *fltab, *cltab; - QWidget *curTab; + TQWidget *curTab; // current active tab kpFileList *fileList; // This holds the file list (and is used as a page on the tab dialog) - QTextEdit *changeLog; + TQTextEdit *changeLog; // Holds changelog - QPixmap tick, cross, question, *blank; + TQPixmap tick, cross, question, *blank; // The pixmaps for the filelist packagePropertiesWidget *packageProperties; diff --git a/kpackage/packageInfo.cpp b/kpackage/packageInfo.cpp index 1e19afc..6ea0ffa 100644 --- a/kpackage/packageInfo.cpp +++ b/kpackage/packageInfo.cpp @@ -35,8 +35,8 @@ // Standard headers #include -#include -#include +#include +#include #include // KDE headers @@ -54,11 +54,11 @@ #include "options.h" // Global pixmap for -QPixmap *pict = NULL; +TQPixmap *pict = NULL; ////////////////////////////////////////////////////////////////////////////// // Constructor -- get the pixmap -packageInfo::packageInfo(QMap _info, pkgInterface *type) +packageInfo::packageInfo(TQMap _info, pkgInterface *type) { interface = type; info = _info; @@ -66,11 +66,11 @@ packageInfo::packageInfo(QMap _info, pkgInterface *type) item = NULL; packageState = UNSET; updated = FALSE; - url = QString::null; + url = TQString::null; } // Another constructor, for a packge with a url -packageInfo::packageInfo(QMap _info, const QString &_url) +packageInfo::packageInfo(TQMap _info, const TQString &_url) { info = _info; url = _url; @@ -82,19 +82,19 @@ packageInfo::~packageInfo() } // Return a property -QString packageInfo::getProperty(const QString &property) +TQString packageInfo::getProperty(const TQString &property) { - QString result = info[property]; + TQString result = info[property]; if (result.isEmpty()) { - return QString::null; + return TQString::null; } return result; } // Check for existance of a property -bool packageInfo::hasProperty(const QString &property) +bool packageInfo::hasProperty(const TQString &property) { - QString s = info[property]; + TQString s = info[property]; if (s.isEmpty()) return false; else @@ -105,7 +105,7 @@ bool packageInfo::hasProperty(const QString &property) void packageInfo::fixup() { if (info["name"].isEmpty()) { - QString q; + TQString q; q.setNum((long)this); info.insert("name", q); } @@ -121,13 +121,13 @@ void packageInfo::fixup() } // Set the file name -void packageInfo::setFilename(const QString &f) +void packageInfo::setFilename(const TQString &f) { url = f; } // Get the url -QString packageInfo::getUrl() +TQString packageInfo::getUrl() { if (url.isEmpty()) { if (hasProperty("base") && hasProperty("filename")) { @@ -137,14 +137,14 @@ QString packageInfo::getUrl() return url; } -QString packageInfo::fetchFilename() +TQString packageInfo::fetchFilename() { - QString f = getFilename(); + TQString f = getFilename(); if (!f.isEmpty()) { return f; } else { - QString aurl = getUrl(); + TQString aurl = getUrl(); if (!aurl.isEmpty()) { return kpackage->fetchNetFile(aurl); } else { @@ -155,7 +155,7 @@ QString packageInfo::fetchFilename() bool packageInfo::isFileLocal() { - QString aurl = getUrl(); + TQString aurl = getUrl(); if (!aurl.isEmpty()) { return KPACKAGE::isFileLocal(aurl); } @@ -179,10 +179,10 @@ bool packageInfo::isFetchable() return false; } -QString packageInfo::getFilename() +TQString packageInfo::getFilename() { - QString cn = ""; - QString aurl = getUrl(); + TQString cn = ""; + TQString aurl = getUrl(); if (!aurl.isEmpty()) { return KPACKAGE::getFileName(aurl,cn); } else { @@ -190,11 +190,11 @@ QString packageInfo::getFilename() } } -int packageInfo::getDigElement(const QString &str, int *pos) +int packageInfo::getDigElement(const TQString &str, int *pos) // Extract the next element from the string // All digits { - QString s = str; + TQString s = str; if (*pos < 0) return -1; @@ -203,7 +203,7 @@ int packageInfo::getDigElement(const QString &str, int *pos) if (s.isEmpty()) return -1; - QRegExp ndig("[^0-9]"); + TQRegExp ndig("[^0-9]"); int nf = 0; int val = 0; @@ -223,23 +223,23 @@ int packageInfo::getDigElement(const QString &str, int *pos) return val; } -QString packageInfo::getNdigElement(const QString &string, int *pos) +TQString packageInfo::getNdigElement(const TQString &string, int *pos) // Extract the next element from the string // All all non-digits { - QString s(string); + TQString s(string); if (*pos < 0) - return QString::null; + return TQString::null; s = s.mid(*pos); if (s.isEmpty()) - return QString::null; + return TQString::null; - QString str; + TQString str; int nf = 0; - QRegExp idig("[0-9]"); + TQRegExp idig("[0-9]"); if ((s[0] < '0') || (s[0] > '9') ) { nf = s.find(idig); @@ -260,7 +260,7 @@ QString packageInfo::getNdigElement(const QString &string, int *pos) } -int packageInfo::pnewer(const QString &s, const QString &sp) +int packageInfo::pnewer(const TQString &s, const TQString &sp) { int ns = 0, nsp = 0, vs, vsp; @@ -280,8 +280,8 @@ int packageInfo::pnewer(const QString &s, const QString &sp) else if (vs > vsp) return -1; - QString svs = getNdigElement(s,&ns); - QString svsp = getNdigElement(sp,&nsp); + TQString svs = getNdigElement(s,&ns); + TQString svsp = getNdigElement(sp,&nsp); // kdDebug() << "vs=" << ns << " " << svs << " sp=" << nsp << " " << svsp << "\n"; if (svs.isEmpty() && svsp.isEmpty()) return 0; @@ -303,7 +303,7 @@ int packageInfo::pnewer(const QString &s, const QString &sp) } } -static bool split(QString orig, char seperator, QString &first, QString &second) +static bool split(TQString orig, char seperator, TQString &first, TQString &second) { int pos = orig.find(seperator); if (pos > 0) { @@ -316,12 +316,12 @@ static bool split(QString orig, char seperator, QString &first, QString &second) int packageInfo::newer(packageInfo *p) { - QString mySerial; // Serial number of this package - QString myVersion; // Version of this package - QString myRelease; // Release of this package + TQString mySerial; // Serial number of this package + TQString myVersion; // Version of this package + TQString myRelease; // Release of this package // Version of this package - QString s = getProperty("version"); + TQString s = getProperty("version"); (void) split(s, ':', mySerial, s); if (!split(s, '-', myVersion, myRelease)) @@ -330,9 +330,9 @@ int packageInfo::newer(packageInfo *p) } // Version of other package - QString hisSerial; // Serial number of the other package - QString hisVersion; // Version of the other package - QString hisRelease; // Release of the other package + TQString hisSerial; // Serial number of the other package + TQString hisVersion; // Version of the other package + TQString hisRelease; // Release of the other package s = p->getProperty("version"); if (p->hasProperty("release")) { @@ -392,7 +392,7 @@ bool packageInfo::display(int treeType) KpTreeListItem *packageInfo::place(KpTreeList *tree, bool insertI) { KpTreeListItem *search = tree->firstChild(), *parent=NULL, *child=NULL; - QString qtmp, tmp; + TQString qtmp, tmp; bool doit = FALSE; doit = TRUE; @@ -405,8 +405,8 @@ KpTreeListItem *packageInfo::place(KpTreeList *tree, bool insertI) qtmp += getProperty("group"); int cnt = 0; - QStringList list = QStringList::split("/",qtmp); - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + TQStringList list = TQStringList::split("/",qtmp); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { KpTreeListItem *group; if( search && (group=findGroup(*it, search)) ) { @@ -431,7 +431,7 @@ KpTreeListItem *packageInfo::place(KpTreeList *tree, bool insertI) if(item) delete item; - QString sz = ""; + TQString sz = ""; if (!info["size"].isEmpty()) { sz = info["size"].stripWhiteSpace(); if (sz.length() > 3) @@ -449,22 +449,22 @@ KpTreeListItem *packageInfo::place(KpTreeList *tree, bool insertI) } sz = sz.rightJustify(6,' '); - QString ver = ""; + TQString ver = ""; if (!info["version"].isEmpty()) { ver = info["version"]; } - QString over = ""; + TQString over = ""; if (!info["old-version"].isEmpty()) { over = info["old-version"]; } - QString summary = ""; + TQString summary = ""; if (!info["summary"].isEmpty()) { summary = info["summary"]; } - QPixmap pic; + TQPixmap pic; if (packageState == BAD_INSTALL) { pic = interface->bad_pict; } else if (packageState == UPDATED) { @@ -504,14 +504,14 @@ KpTreeListItem *packageInfo::getItem() } ////////////////////////////////////////////////////////////////////////////// -bool packageInfo::smerge( const QString &exp) { +bool packageInfo::smerge( const TQString &exp) { - QDict *dirInfoPackages = kpackage->management->dirInfoPackages; - QString pname = getProperty("name") + exp; + TQDict *dirInfoPackages = kpackage->management->dirInfoPackages; + TQString pname = getProperty("name") + exp; packageInfo *pi = dirInfoPackages->find(pname); if (pi) { - QMap::Iterator it; + TQMap::Iterator it; for ( it = pi->info.begin(); it != pi->info.end(); ++it ) { if (!(it.key() == "size" && !info["size"].isEmpty()) || @@ -526,7 +526,7 @@ bool packageInfo::smerge( const QString &exp) { } ////////////////////////////////////////////////////////////////////////////// -void packageInfo::pkgFileIns(const QString &fileName) +void packageInfo::pkgFileIns(const TQString &fileName) { info.insert("filename", fileName); info.insert("base", "/"); @@ -535,20 +535,20 @@ void packageInfo::pkgFileIns(const QString &fileName) packageState = packageInfo::NEW; place(kpackage->management->treeList,TRUE); - QString pname = getProperty("name") + interface->typeID; + TQString pname = getProperty("name") + interface->typeID; kpackage->management->dirUninstPackages->insert(pname,this); } } ////////////////////////////////////////////////////////////////////////////// -bool packageInfo::pkgInsert(QPtrList *pki, const QString &exp, +bool packageInfo::pkgInsert(TQPtrList *pki, const TQString &exp, bool installed, bool infoPackage) { - QDict *dirInstPackages = kpackage->management->dirInstPackages; - QDict *dirUninstPackages = kpackage->management->dirUninstPackages; - QDict *dirInfoPackages = kpackage->management->dirInfoPackages; + TQDict *dirInstPackages = kpackage->management->dirInstPackages; + TQDict *dirUninstPackages = kpackage->management->dirUninstPackages; + TQDict *dirInfoPackages = kpackage->management->dirInfoPackages; - QString pname = getProperty("name") + exp; + TQString pname = getProperty("name") + exp; // printf("U1=%s\n",pname.data()); bool shouldUpdate = TRUE; @@ -589,7 +589,7 @@ bool packageInfo::pkgInsert(QPtrList *pki, const QString &exp, if (hidden) { packageState = HIDDEN; } else { - QString version = pi->getProperty("version"); + TQString version = pi->getProperty("version"); if (version.isEmpty()) { if (pi->packageState == NOLIST) packageState = NEW; @@ -603,7 +603,7 @@ bool packageInfo::pkgInsert(QPtrList *pki, const QString &exp, } else { info.insert("old-version",version); } - QString group = getProperty("group"); + TQString group = getProperty("group"); if (group == "NEW") { if (pi->hasProperty("group")) { info.replace("group", diff --git a/kpackage/packageInfo.h b/kpackage/packageInfo.h index be0dbb3..1ce24a3 100644 --- a/kpackage/packageInfo.h +++ b/kpackage/packageInfo.h @@ -45,12 +45,12 @@ #define PACKAGEINFO_H #include "../config.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include class pkgInterface; class KpTreeListItem; @@ -61,11 +61,11 @@ class KpTreeList; class packageInfo { public: - packageInfo(QMap _info, pkgInterface *type); + packageInfo(TQMap _info, pkgInterface *type); // Constructor: create a packageInfo object using the property // dictionary from _info - packageInfo(QMap _info, const QString &_filename); + packageInfo(TQMap _info, const TQString &_filename); // Constructor: same as above, but also sets filename to _filename. // This is used in the case that the package info was obtained from // an uninstalled package. @@ -76,12 +76,12 @@ public: /** * Look ups the property `property' from the dictionary */ - QString getProperty(const QString &property); + TQString getProperty(const TQString &property); /** * Checks whether the property `property' is defined in the dictionary */ - bool hasProperty(const QString &property); + bool hasProperty(const TQString &property); void fixup(); // Initialize fields if missing @@ -94,9 +94,9 @@ public: // returns the treelist item object for this package or // NULL if the object hasn't been placed - void setFilename(const QString &f); + void setFilename(const TQString &f); - QString getUrl(); + TQString getUrl(); // return URL of package file bool isFileLocal(); @@ -108,22 +108,22 @@ public: bool isFetchable(); // True if package needs to be fetched - QString getFilename(); + TQString getFilename(); - QString fetchFilename(); + TQString fetchFilename(); // gets the filename, fetching package if necessary int newer(packageInfo *p); // if package p is newer - void pkgFileIns(const QString &fileName); + void pkgFileIns(const TQString &fileName); // Insert a package from a file into package tree - bool pkgInsert(QPtrList *pki, const QString &exp, bool installed, + bool pkgInsert(TQPtrList *pki, const TQString &exp, bool installed, bool infoPackage = FALSE); // insert packgeInfo either installed or not installed - QMap info; + TQMap info; // This stores the property dictionary of the package KpTreeListItem *item; @@ -133,7 +133,7 @@ public: pkgInterface *interface; // interface points to the class of the package (deb, rpm etc) - bool smerge( const QString &exp); + bool smerge( const TQString &exp); // merge with already existing NOLIST package info bool display(int treeType); @@ -146,14 +146,14 @@ public: bool updated; private: - int getDigElement(const QString &s, int *pos); - QString getNdigElement(const QString &s, int *pos); + int getDigElement(const TQString &s, int *pos); + TQString getNdigElement(const TQString &s, int *pos); // break up version string - int pnewer(const QString &s, const QString &sp); + int pnewer(const TQString &s, const TQString &sp); // compare parts of a version string - QString url; + TQString url; // This stores the filename of the package the info was obtained from. // If it is empty then the info was obtained from an installed package. diff --git a/kpackage/packageProperties.cpp b/kpackage/packageProperties.cpp index b05a00c..2e1aca7 100644 --- a/kpackage/packageProperties.cpp +++ b/kpackage/packageProperties.cpp @@ -37,16 +37,16 @@ #include "managementWidget.h" packagePropertiesWidget::packagePropertiesWidget - (QWidget *parent) + (TQWidget *parent) : KTextBrowser(parent) { - QDict trl(53); - QStringList pList(); - QStringList cList(); + TQDict trl(53); + TQStringList pList(); + TQStringList cList(); // hide(); package=NULL; - QColorGroup cg = colorGroup(); + TQColorGroup cg = colorGroup(); setBackgroundColor(cg.base()); initTranslate(); } @@ -55,9 +55,9 @@ packagePropertiesWidget::~packagePropertiesWidget() { } -void packagePropertiesWidget::iList(const QString &txt, const QString &itxt) +void packagePropertiesWidget::iList(const TQString &txt, const TQString &itxt) { - trl.insert(txt, new QString(itxt)); + trl.insert(txt, new TQString(itxt)); pList.append(txt); } @@ -115,7 +115,7 @@ void packagePropertiesWidget::changePackage(packageInfo *p) cList.clear(); if (p) { // append properties in ordered list to current list - for ( QStringList::Iterator s = pList.begin(); + for ( TQStringList::Iterator s = pList.begin(); s != pList.end(); ++s) { @@ -124,7 +124,7 @@ void packagePropertiesWidget::changePackage(packageInfo *p) } } // append other properties to end - QMap::Iterator it; + TQMap::Iterator it; for ( it = p->info.begin(); it != p->info.end(); ++it ) { if (!trl.find(it.key())) { if (!it.data().isEmpty()) @@ -138,11 +138,11 @@ void packagePropertiesWidget::changePackage(packageInfo *p) stmp += p->getProperty("name"); stmp += "


"; stmp += ""; stmp += propName; stmp += "
"; - QString f = p->getProperty(*s); + TQString f = p->getProperty(*s); if (*s == "maintainer" || *s == "packager") { - f.replace(QRegExp("<"),"<"); - f.replace(QRegExp(">"),">"); + f.replace(TQRegExp("<"),"<"); + f.replace(TQRegExp(">"),">"); } if (*s == "filename") { int p = f.findRev("/"); @@ -186,40 +186,40 @@ void packagePropertiesWidget::changePackage(packageInfo *p) update(); } -void packagePropertiesWidget::depends(const QString &f) { +void packagePropertiesWidget::depends(const TQString &f) { // printf("d=%s\n",f.data()); int i = 0; - QStringList list = QStringList::split(',',f); - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + TQStringList list = TQStringList::split(',',f); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { if (i++ > 0) stmp += ","; dor((*it)); } } -void packagePropertiesWidget::dor(const QString &f) { +void packagePropertiesWidget::dor(const TQString &f) { // printf("o=%s\n",f.data()); int i = 0; - QStringList list = QStringList::split('|',f); - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + TQStringList list = TQStringList::split('|',f); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { if (i++ > 0) stmp += "|"; delement((*it)); } } -void packagePropertiesWidget::delement(const QString &f) { +void packagePropertiesWidget::delement(const TQString &f) { int n = f.find("("); if (n < 0) { n = f.length(); } - QString u = f.left(n); - QString uf = package->interface->provMap(u.stripWhiteSpace()); + TQString u = f.left(n); + TQString uf = package->interface->provMap(u.stripWhiteSpace()); - QString us = uf + package->interface->typeID; + TQString us = uf + package->interface->typeID; bool inst = false, uninst = false; if (kpackage->management->dirInstPackages->find(us)) { @@ -242,11 +242,11 @@ void packagePropertiesWidget::delement(const QString &f) { if (uninst) stmp += ""; if (n < (signed)f.length()) - stmp += f.mid(n).replace(QRegExp("<"),"<"); + stmp += f.mid(n).replace(TQRegExp("<"),"<"); } -void packagePropertiesWidget::setSource(const QString &name) { - QString s = name; +void packagePropertiesWidget::setSource(const TQString &name) { + TQString s = name; if (s.startsWith("http:") || s.startsWith("ftp:")) { @@ -261,7 +261,7 @@ void packagePropertiesWidget::setSource(const QString &name) { s = s.mid(1); } - QString ind = s + package->interface->typeID; + TQString ind = s + package->interface->typeID; packageInfo *p = kpackage->management->dirInstPackages->find(ind); if (p) { kpackage->management->treeList->changePack(p->getItem(), package->getItem() != 0); diff --git a/kpackage/packageProperties.h b/kpackage/packageProperties.h index 0b7e035..e5532f3 100644 --- a/kpackage/packageProperties.h +++ b/kpackage/packageProperties.h @@ -36,9 +36,9 @@ // Standard Headers // Qt Headers -#include -#include -#include +#include +#include +#include // KDE Headers #include @@ -55,7 +55,7 @@ class packagePropertiesWidget : public KTextBrowser ///////////// METHODS ------------------------------------------------------ public: - packagePropertiesWidget(QWidget *parent=0); + packagePropertiesWidget(TQWidget *parent=0); // constructor ~packagePropertiesWidget(); @@ -63,7 +63,7 @@ public: void changePackage(packageInfo *p); - void setSource( const QString & name ); + void setSource( const TQString & name ); // url selected protected: @@ -75,27 +75,27 @@ private: packageInfo *package; void initTranslate(); - void iList(const QString &txt, const QString &itxt); + void iList(const TQString &txt, const TQString &itxt); - QDict trl ; + TQDict trl ; // allow for translation of labels - QStringList pList; + TQStringList pList; // list specifying order of property distplay - QStringList cList; + TQStringList cList; // list giving order of currently displayed properties - QString stmp; + TQString stmp; // text accumulation buffer - void depends(const QString &f); + void depends(const TQString &f); // translate depends string - void dor(const QString &f); + void dor(const TQString &f); // translate depends string - void delement(const QString &f); + void delement(const TQString &f); // translate depends element }; diff --git a/kpackage/pkgInterface.cpp b/kpackage/pkgInterface.cpp index eeb6f74..7382ff5 100644 --- a/kpackage/pkgInterface.cpp +++ b/kpackage/pkgInterface.cpp @@ -39,7 +39,7 @@ extern Opts *opts; ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -param::param(const QString &nameP, bool initP, bool invertP, const QString &flagP) +param::param(const TQString &nameP, bool initP, bool invertP, const TQString &flagP) { name = nameP; init = initP; @@ -48,7 +48,7 @@ param::param(const QString &nameP, bool initP, bool invertP, const QString &fla flagA = ""; } -param::param(const QString &nameP, bool initP, bool invertP, const QString &flagP, const QString &flagAP ) +param::param(const TQString &nameP, bool initP, bool invertP, const TQString &flagP, const TQString &flagAP ) { name = nameP; init = initP; @@ -64,7 +64,7 @@ param::~param() ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -pkgInterface::pkgInterface( ) : QObject(), new_pict(), updated_pict() +pkgInterface::pkgInterface( ) : TQObject(), new_pict(), updated_pict() { packageLoc = 0; @@ -100,14 +100,14 @@ void pkgInterface::setMenu(KActionCollection*, bool ) } ////////////////////////////////////////////////////////////////////////////// -QStringList pkgInterface::depends(const QString &, int ) {return 0;} +TQStringList pkgInterface::depends(const TQString &, int ) {return 0;} -QString pkgInterface::doUninstall(int, const QString &, bool &) {return 0;} -QString pkgInterface::doInstall(int, const QString &, bool &) {return 0;} +TQString pkgInterface::doUninstall(int, const TQString &, bool &) {return 0;} +TQString pkgInterface::doInstall(int, const TQString &, bool &) {return 0;} //////////////////////////////////////////////////////////////////////////// -bool pkgInterface::ifExe(QString exe) { +bool pkgInterface::ifExe(TQString exe) { if (!KGlobal::dirs()->findExe( exe ).isNull()) { return TRUE; } else { @@ -118,12 +118,12 @@ bool pkgInterface::ifExe(QString exe) { } -void pkgInterface::listPackages(QPtrList *pki) +void pkgInterface::listPackages(TQPtrList *pki) { listInstalledPackages(pki); if (packageLoc) { for (cacheObj *cp = packageLoc->first(); cp != 0; cp = packageLoc->next()) { - QString s = getDir(cp); + TQString s = getDir(cp); if (!s.isEmpty()) listDir(pki, s, cp->location, cp->subdirs); } @@ -133,20 +133,20 @@ void pkgInterface::listPackages(QPtrList *pki) void pkgInterface::smerge(packageInfo *) { } -void pkgInterface::listDir(QPtrList *pki, const QString &fname, const QString &dir, bool subdirs) +void pkgInterface::listDir(TQPtrList *pki, const TQString &fname, const TQString &dir, bool subdirs) { // fname - path to directory or cached remote infromation file // dir - url of directory - QString name, size, rfile; + TQString name, size, rfile; packageInfo *p; - QString sline( queryMsg + fname ); + TQString sline( queryMsg + fname ); kpackage->setStatus(sline); kdDebug() << "listDir fn=" << fname << " dir=" << dir << endl; - QDir d(fname,packagePattern); + TQDir d(fname,packagePattern); if (subdirs) d.setMatchAllDirs( TRUE ); // list contains subdirs @@ -155,16 +155,16 @@ void pkgInterface::listDir(QPtrList *pki, const QString &fname, con if (d.exists()) { if ( d.isReadable() ) { - QString pn; + TQString pn; const QFileInfoList *list = d.entryInfoList(); QFileInfoListIterator it( *list ); // create list iterator - QFileInfo *fi; // pointer for traversing + TQFileInfo *fi; // pointer for traversing while ( (fi=it.current()) ) { // for each entry... if ( fi->isDir() ) { // entry is a subdir - if ( fi->fileName() != QString::fromLatin1(".") && - fi->fileName() != QString::fromLatin1("..") ) + if ( fi->fileName() != TQString::fromLatin1(".") && + fi->fileName() != TQString::fromLatin1("..") ) { // not current dir and not parent dir // -> recursive call: @@ -197,13 +197,13 @@ void pkgInterface::listDir(QPtrList *pki, const QString &fname, con } } else { // directory is not readable - kdDebug() << QString("WARNING: directory '%1' not readable (will be ignored) !\n").arg(d.absPath() ) << endl; + kdDebug() << TQString("WARNING: directory '%1' not readable (will be ignored) !\n").arg(d.absPath() ) << endl; } } else { - QFile f(fname); + TQFile f(fname); if ( f.open(IO_ReadOnly) ) { - QTextStream t( &f ); - QString name; + TQTextStream t( &f ); + TQString name; while ( !t.eof() ) { name = t.readLine(); if (!t.eof() ) { @@ -222,13 +222,13 @@ void pkgInterface::listDir(QPtrList *pki, const QString &fname, con } } -packageInfo *pkgInterface::collectDir(const QString &name, const QString &size, const QString &dir) +packageInfo *pkgInterface::collectDir(const TQString &name, const TQString &size, const TQString &dir) { kdDebug() << "collectDir " << name << " " << size << " " << dir << endl; - QString n,v; + TQString n,v; if (parseName(name, &n, &v)) { - QMap a; + TQMap a; a.insert("group", "NEW"); a.insert("name", n); @@ -245,17 +245,17 @@ packageInfo *pkgInterface::collectDir(const QString &name, const QString &size, return 0; } -QString pkgInterface::getPackList(cacheObj *cp) +TQString pkgInterface::getPackList(cacheObj *cp) { - QString tmpf; + TQString tmpf; int res; - QString url = cp->location; + TQString url = cp->location; kdDebug() << "pkgInterface::getPackList " << url << " " << cp->cacheFile << "\n"; if ((res = cacheObj::newDCache(url, cp->cacheFile, tmpf))) { if (res < 0) return 0; - unlink(QFile::encodeName(tmpf)); + unlink(TQFile::encodeName(tmpf)); if (kpkg) kpackage->setStatus(i18n("Starting Kio")); @@ -263,9 +263,9 @@ QString pkgInterface::getPackList(cacheObj *cp) if (kio.download(url, tmpf)) { if (kpkg) kpackage->setStatus(i18n("Kio finished")); - QFileInfo f(tmpf); + TQFileInfo f(tmpf); if (!(f.exists() && f.size() > 0)) { - unlink(QFile::encodeName(tmpf)); + unlink(TQFile::encodeName(tmpf)); return ""; } else { return tmpf; @@ -280,18 +280,18 @@ QString pkgInterface::getPackList(cacheObj *cp) } } -QString pkgInterface::getDir(cacheObj *cp) { +TQString pkgInterface::getDir(cacheObj *cp) { int res; - QString tmpDir; - QString url = cp->location; + TQString tmpDir; + TQString url = cp->location; if ((res = cacheObj::newDCache(url, cp->cacheFile, tmpDir))) { if (res < 0) - return QString::null; + return TQString::null; Kiod kiod; if (kiod.listDir(url,tmpDir, cp->subdirs)) { - QFileInfo fi (tmpDir); + TQFileInfo fi (tmpDir); CacheList cl (fi.dirPath()); cl.append (fi.fileName()); cl.write(); @@ -299,7 +299,7 @@ QString pkgInterface::getDir(cacheObj *cp) { } else { KpMsgE(i18n("Cannot read folder %1").arg(url),FALSE); unlink(tmpDir.ascii()); - return QString::null; + return TQString::null; } } else { return tmpDir; @@ -309,19 +309,19 @@ QString pkgInterface::getDir(cacheObj *cp) { ////////////////////////////////////////////////////////////////////////////// -QString pkgInterface::provMap(const QString &p) +TQString pkgInterface::provMap(const TQString &p) { // kdDebug() << "provMap=>" << p << endl; return p; } ////////////////////////////////////////////////////////////////////////////// -QStringList pkgInterface::verify(packageInfo *, const QStringList &files) +TQStringList pkgInterface::verify(packageInfo *, const TQStringList &files) { int p = 0; uint c = 0; - QStringList errorlist; - QDir d; + TQStringList errorlist; + TQDir d; if (hostName.isEmpty()) { @@ -330,7 +330,7 @@ QStringList pkgInterface::verify(packageInfo *, const QStringList &files) kpackage->setStatus(i18n("Verifying")); kpackage->setPercent(0); - for( QStringList::ConstIterator it = files.begin(); + for( TQStringList::ConstIterator it = files.begin(); it != files.end(); it++) { @@ -352,17 +352,17 @@ QStringList pkgInterface::verify(packageInfo *, const QStringList &files) } ////////////////////////////////////////////////////////////////////////////// -QString pkgInterface::uninstall(int uninstallFlags, packageInfo *p, bool &test) +TQString pkgInterface::uninstall(int uninstallFlags, packageInfo *p, bool &test) { - QString packs( p->getProperty("name")); + TQString packs( p->getProperty("name")); return doUninstall(uninstallFlags, packs, test); } ////////////////////////////////////////////////////////////////////////////// -QString pkgInterface::uninstall(int uninstallFlags, QPtrList *p, bool &test) +TQString pkgInterface::uninstall(int uninstallFlags, TQPtrList *p, bool &test) { - QString packs; + TQString packs; packageInfo *i; for (i = p->first(); i!= 0; i = p->next()) { @@ -373,21 +373,21 @@ QString pkgInterface::uninstall(int uninstallFlags, QPtrList *p, bo } ////////////////////////////////////////////////////////////////////////////// -QString pkgInterface::install(int installFlags, packageInfo *p, bool &test) +TQString pkgInterface::install(int installFlags, packageInfo *p, bool &test) { - QString fname = p->fetchFilename(); + TQString fname = p->fetchFilename(); return doInstall(installFlags, fname, test); } ////////////////////////////////////////////////////////////////////////////// -QString pkgInterface::install(int installFlags, QPtrList *p, bool &test) +TQString pkgInterface::install(int installFlags, TQPtrList *p, bool &test) { - QString packs = ""; + TQString packs = ""; packageInfo *i; for (i = p->first(); i!= 0; i = p->next()) { - QString fname = i->fetchFilename(); + TQString fname = i->fetchFilename(); if (!fname.isEmpty()) { packs += fname; packs += " "; @@ -397,7 +397,7 @@ QString pkgInterface::install(int installFlags, QPtrList *p, bool & } ////////////////////////////////////////////////////////////////////////////// -QStringList pkgInterface::listInstalls(const QStringList &packs, bool , bool &cancel) +TQStringList pkgInterface::listInstalls(const TQStringList &packs, bool , bool &cancel) { cancel = FALSE; return packs; @@ -405,10 +405,10 @@ QStringList pkgInterface::listInstalls(const QStringList &packs, bool , bool &c ////////////////////////////////////////////////////////////////////////////// -QString pkgInterface::setOptions(int flags, QPtrList ¶ms) +TQString pkgInterface::setOptions(int flags, TQPtrList ¶ms) { int i; - QString s; + TQString s; param *p; i = 0; @@ -423,12 +423,12 @@ QString pkgInterface::setOptions(int flags, QPtrList ¶ms) return s; } - QStringList pkgInterface::readApt() + TQStringList pkgInterface::readApt() { return 0; } - void pkgInterface::writeApt(const QStringList &) + void pkgInterface::writeApt(const TQStringList &) { } diff --git a/kpackage/pkgInterface.h b/kpackage/pkgInterface.h index 3094af8..839ada2 100644 --- a/kpackage/pkgInterface.h +++ b/kpackage/pkgInterface.h @@ -29,9 +29,9 @@ #define PKG_IFACE_H #include "../config.h" -#include -#include -#include +#include +#include +#include #include #include @@ -53,15 +53,15 @@ class KActionCollection; class param { public: - param(const QString &nameP, bool initP, bool invertP, const QString &flagP); - param(const QString &nameP, bool initP, bool invertP, const QString &flagP, const QString &flagAP); + param(const TQString &nameP, bool initP, bool invertP, const TQString &flagP); + param(const TQString &nameP, bool initP, bool invertP, const TQString &flagP, const TQString &flagAP); ~param(); - QString name; // Name of flag + TQString name; // Name of flag bool init; // Initial value bool invert; // Whether it needs to be inverted - QString flag; // text flag on command - QString flagA; // text flag on command + TQString flag; // text flag on command + TQString flagA; // text flag on command }; ////////////////////////////////////////////////////////////////////////////// @@ -74,33 +74,33 @@ public: pkgInterface(); virtual ~pkgInterface(); - virtual bool isType(char *buf, const QString &fname) = 0; + virtual bool isType(char *buf, const TQString &fname) = 0; // looks at start of file to check that package is correct type virtual void makeMenu(KActionCollection* act); virtual void setMenu(KActionCollection* act, bool enable); - bool ifExe(QString exe); + bool ifExe(TQString exe); // Check if this executable exists - virtual packageInfo *getPackageInfo(char mode, const QString &name, - const QString &version) = 0; + virtual packageInfo *getPackageInfo(char mode, const TQString &name, + const TQString &version) = 0; // get info on installed or uninstalled package. version is only set if // mode is 'i' (ie, if the package is already installed). - virtual QStringList getFileList(packageInfo *p) = 0; + virtual TQStringList getFileList(packageInfo *p) = 0; // get list of files in the package - virtual QStringList depends(const QString &name, int src); + virtual TQStringList depends(const TQString &name, int src); // check dependencies for package - virtual QStringList verify(packageInfo *p, const QStringList &files); + virtual TQStringList verify(packageInfo *p, const TQStringList &files); // check the installed files in a package - virtual QStringList FindFile(const QString &name, bool seachAll=false) = 0; + virtual TQStringList FindFile(const TQString &name, bool seachAll=false) = 0; // search for packages containg a file - virtual QStringList getChangeLog(packageInfo *p) = 0; + virtual TQStringList getChangeLog(packageInfo *p) = 0; // Get change log virtual bool filesTab(packageInfo *p) = 0; @@ -109,68 +109,68 @@ public: virtual bool changeTab(packageInfo *p) = 0; // If change log tab is to be enabled - virtual bool parseName(const QString &name, QString *n, QString *v) = 0; + virtual bool parseName(const TQString &name, TQString *n, TQString *v) = 0; // breakup file name into package name and version - virtual void listPackages(QPtrList *pki); + virtual void listPackages(TQPtrList *pki); // scan various locations for list of packages - virtual void listInstalledPackages(QPtrList *pki) = 0; + virtual void listInstalledPackages(TQPtrList *pki) = 0; // produce list of currently installed packages - virtual QStringList listInstalls(const QStringList &packs, bool install, bool &cancel); + virtual TQStringList listInstalls(const TQStringList &packs, bool install, bool &cancel); // Convert list of packages requested to install to list of all packages to install virtual void smerge(packageInfo *p); // merge in package info entry - QString getDir(cacheObj *cp); + TQString getDir(cacheObj *cp); // list directory local or remote - void listDir(QPtrList *pki, const QString &fname, const QString &dir, bool subdirs = FALSE); + void listDir(TQPtrList *pki, const TQString &fname, const TQString &dir, bool subdirs = FALSE); // list the packages in a directory - packageInfo *collectDir(const QString &name, const QString &size, const QString &dir); + packageInfo *collectDir(const TQString &name, const TQString &size, const TQString &dir); // build packageInfo object from directory entry - QString getPackList(cacheObj *cp); + TQString getPackList(cacheObj *cp); // get packages information file - virtual QString provMap(const QString &p); + virtual TQString provMap(const TQString &p); // convert from package depends to package - QString setOptions(int flags, QPtrList ¶ms); + TQString setOptions(int flags, TQPtrList ¶ms); // convert un/install flags to text - virtual QString doUninstall(int uninstallFlags, const QString &packs, bool &test); - virtual QString doInstall(int installFlags, const QString &packs, bool &test); - virtual QString uninstall(int uninstallFlags, QPtrList *p, + virtual TQString doUninstall(int uninstallFlags, const TQString &packs, bool &test); + virtual TQString doInstall(int installFlags, const TQString &packs, bool &test); + virtual TQString uninstall(int uninstallFlags, TQPtrList *p, bool &test); - virtual QString uninstall(int uninstallFlags, packageInfo *p, + virtual TQString uninstall(int uninstallFlags, packageInfo *p, bool &test); - virtual QString install(int installFlags, QPtrList *p, + virtual TQString install(int installFlags, TQPtrList *p, bool &test); - virtual QString install(int installFlags, packageInfo *p, + virtual TQString install(int installFlags, packageInfo *p, bool &test); - virtual QStringList readApt(); - virtual void writeApt(const QStringList &list); + virtual TQStringList readApt(); + virtual void writeApt(const TQStringList &list); ///////////// DATA /////////////////////// pkgOptions *uninstallation, *installation; - QString icon; + TQString icon; // name icon file - QString head; + TQString head; // capitalized name of package type - QString name; + TQString name; // More descriptive name - QPixmap pict, bad_pict, new_pict, updated_pict; + TQPixmap pict, bad_pict, new_pict, updated_pict; // icons for package states - QPixmap folder; + TQPixmap folder; // icon for package group - QPixmap markInst; - QPixmap markUnInst; + TQPixmap markInst; + TQPixmap markUnInst; // icon indicating mark for install/uninstall Locations *locatedialog; @@ -181,13 +181,13 @@ public: bool dirOK; // variables related to reading packages from directories - QString packagePattern; - QString queryMsg; - QString typeID; + TQString packagePattern; + TQString queryMsg; + TQString typeID; // Parameters for reading packages from directories - QPtrList paramsInst; - QPtrList paramsUninst; + TQPtrList paramsInst; + TQPtrList paramsUninst; bool noFetch; // kpackage doesn't fetch this type of package itself @@ -195,13 +195,13 @@ public: bool defaultHandle; // This package type defaults to on - QString errExe; + TQString errExe; // The name of an executable that wasn't found - QString procMsg; + TQString procMsg; // for running processes - QString DELMSG; + TQString DELMSG; bool hasRemote; // can access on remote host diff --git a/kpackage/pkgOptions.cpp b/kpackage/pkgOptions.cpp index 19a3c5e..bf3975e 100644 --- a/kpackage/pkgOptions.cpp +++ b/kpackage/pkgOptions.cpp @@ -27,7 +27,7 @@ #include "../config.h" // qt headers -#include +#include #include #include @@ -47,10 +47,10 @@ /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// -pkgOptions::pkgOptions(pkgInterface *pki, QWidget *parent, const QString &caption) +pkgOptions::pkgOptions(pkgInterface *pki, TQWidget *parent, const TQString &caption) : KDialog(parent,0,TRUE) { - // setFrameStyle(QFrame::Raised | QFrame::Panel); + // setFrameStyle(TQFrame::Raised | TQFrame::Panel); pkgInt = pki; @@ -69,55 +69,55 @@ pkgOptions::~pkgOptions() } // Set up the sub-widgets -void pkgOptions::setupWidgets(QPtrList &pars) +void pkgOptions::setupWidgets(TQPtrList &pars) { int i; // Create widgets - title = new QLabel("", this); - QFont f( KGlobalSettings::generalFont()); + title = new TQLabel("", this); + TQFont f( KGlobalSettings::generalFont()); f.setBold(true); f.setPointSize(f.pointSize()+6); title->setFont(f); // title->setAutoResize(TRUE); // title->update(); - installButton = new QPushButton(insType,this); + installButton = new TQPushButton(insType,this); cancelButton = new KPushButton(KStdGuiItem::cancel(),this); // count number of buttons bnumber = pars.count(); - Boxs = new QCheckBox *[bnumber]; + Boxs = new TQCheckBox *[bnumber]; param *p; i = 0; for ( p=pars.first(); p != 0; p=pars.next(), i++ ) { - Boxs[i] = new QCheckBox(p->name, this); + Boxs[i] = new TQCheckBox(p->name, this); Boxs[i]->setChecked(p->init); } - Keep = new QCheckBox(i18n("Keep this window"), this); + Keep = new TQCheckBox(i18n("Keep this window"), this); // Connections - connect(installButton,SIGNAL(clicked()),SLOT(pkginstallButtonClicked())); - connect(cancelButton,SIGNAL(clicked()),SLOT(cancelButtonClicked())); - connect(Keep, SIGNAL(toggled(bool)), SLOT(keepToggle(bool))); + connect(installButton,TQT_SIGNAL(clicked()),TQT_SLOT(pkginstallButtonClicked())); + connect(cancelButton,TQT_SIGNAL(clicked()),TQT_SLOT(cancelButtonClicked())); + connect(Keep, TQT_SIGNAL(toggled(bool)), TQT_SLOT(keepToggle(bool))); // Do the layout - vlayout = new QBoxLayout(this, QBoxLayout::TopToBottom, marginHint(), spacingHint()); + vlayout = new TQBoxLayout(this, TQBoxLayout::TopToBottom, marginHint(), spacingHint()); vlayout->addWidget(title,0); { - hlayout = new QBoxLayout(vlayout,QBoxLayout::LeftToRight, spacingHint()); + hlayout = new TQBoxLayout(vlayout,TQBoxLayout::LeftToRight, spacingHint()); { - layout = new QBoxLayout(hlayout,QBoxLayout::TopToBottom, spacingHint()); + layout = new TQBoxLayout(hlayout,TQBoxLayout::TopToBottom, spacingHint()); packages = new KListView(this); layout->addWidget(packages,20); packages->addColumn(i18n("PACKAGES"),200); - connect(packages, SIGNAL(selectionChanged ( QListViewItem * )), - this, SLOT(slotSearch( QListViewItem * ))); + connect(packages, TQT_SIGNAL(selectionChanged ( TQListViewItem * )), + this, TQT_SLOT(slotSearch( TQListViewItem * ))); layout->addStretch(1); for (i = 0; i < bnumber; i++) { @@ -125,14 +125,14 @@ void pkgOptions::setupWidgets(QPtrList &pars) } layout->addWidget(new KSeparator(KSeparator::HLine, this), 2); - QBoxLayout *slayout = new QBoxLayout(layout, QBoxLayout::LeftToRight); + TQBoxLayout *slayout = new TQBoxLayout(layout, TQBoxLayout::LeftToRight); slayout->addStretch(1); slayout->addWidget(Keep, 1); slayout->addStretch(1); layout->addWidget(new KSeparator(KSeparator::HLine, this), 2); - QBoxLayout *buttons = new QBoxLayout(QBoxLayout::LeftToRight); + TQBoxLayout *buttons = new TQBoxLayout(TQBoxLayout::LeftToRight); layout->addLayout(buttons); buttons->addWidget(installButton,2); @@ -147,15 +147,15 @@ void pkgOptions::setupWidgets(QPtrList &pars) resize(800, 400); } -void pkgOptions::setup(packageInfo *p, const QString &type) { - QPtrList *pl = new QPtrList; +void pkgOptions::setup(packageInfo *p, const TQString &type) { + TQPtrList *pl = new TQPtrList; pl->append(p); setup(pl,type); } -bool pkgOptions::setup(QPtrList *pl, const QString &) +bool pkgOptions::setup(TQPtrList *pl, const TQString &) { - QString s; + TQString s; modified = FALSE; packList = pl; @@ -163,11 +163,11 @@ bool pkgOptions::setup(QPtrList *pl, const QString &) packages->clear(); packageInfo *p; - QStringList plist, rlist, clist; - QDict dict; - QString mark("x"); + TQStringList plist, rlist, clist; + TQDict dict; + TQString mark("x"); for ( p = pl->first(); p != 0; p = pl->next() ) { - QString file = p->getFilename(); + TQString file = p->getFilename(); plist += p->getProperty("name"); if (file.isEmpty()) { clist += p->getProperty("name"); @@ -183,10 +183,10 @@ bool pkgOptions::setup(QPtrList *pl, const QString &) reject(); return false; } - for ( QStringList::Iterator it = rlist.begin(); it != rlist.end(); ++it ) { + for ( TQStringList::Iterator it = rlist.begin(); it != rlist.end(); ++it ) { if (!dict[*it]) { plist.append(*it); - QString dirIndex = *it + pkgInt->typeID; + TQString dirIndex = *it + pkgInt->typeID; if (installer) { pk = kpackage->management->dirUninstPackages->find(dirIndex); } else { @@ -205,9 +205,9 @@ bool pkgOptions::setup(QPtrList *pl, const QString &) s = i18n("%1: 1 %2 Package","%1: %n %2 Packages",plist.count()).arg(insType,pkgInt->name); title->setText(s); - for (QStringList::Iterator pit = plist.begin(); pit != plist.end(); ++pit ) { + for (TQStringList::Iterator pit = plist.begin(); pit != plist.end(); ++pit ) { // kdDebug() << "P=" << *pit << "\n"; - new QListViewItem(packages, *pit); + new TQListViewItem(packages, *pit); } cancelButton->setGuiItem(KStdGuiItem::cancel()); return TRUE; @@ -217,7 +217,7 @@ bool pkgOptions::setup(QPtrList *pl, const QString &) void pkgOptions::pkginstallButtonClicked() { int i; - QStringList r; + TQStringList r; modified = TRUE; // Collect data from check boxes @@ -228,7 +228,7 @@ void pkgOptions::pkginstallButtonClicked() } test = FALSE; - QString s = doPackages(installFlags, packList, test); + TQString s = doPackages(installFlags, packList, test); // A "0=" or "1=" indicates it was actually (un)installed by the doPackages // routine instead of just returning a command to execute @@ -238,8 +238,8 @@ void pkgOptions::pkginstallButtonClicked() } else if (s.left(2) == "1=") { term->textIn(s.mid(2), true); } else { - connect(term,SIGNAL(result(QStringList &, int)), - this,SLOT(slotResult(QStringList &, int))); + connect(term,TQT_SIGNAL(result(TQStringList &, int)), + this,TQT_SLOT(slotResult(TQStringList &, int))); installButton->setEnabled(FALSE); @@ -252,9 +252,9 @@ void pkgOptions::pkginstallButtonClicked() } } -void pkgOptions::slotSearch(QListViewItem *item) +void pkgOptions::slotSearch(TQListViewItem *item) { - QString s = item->text(0); + TQString s = item->text(0); kdDebug() << "searchI=" << s << "h=" << pkgInt->head <<"\n"; packageInfo *p; @@ -269,12 +269,12 @@ void pkgOptions::slotSearch(QListViewItem *item) void pkgOptions::reset() { installButton->setEnabled(TRUE); cancelButton->setGuiItem(KGuiItem(i18n("Done"))); //clear icon - disconnect(term,SIGNAL(result(QStringList &, int)), - this,SLOT(slotResult(QStringList &, int))); + disconnect(term,TQT_SIGNAL(result(TQStringList &, int)), + this,TQT_SLOT(slotResult(TQStringList &, int))); running = FALSE; } -void pkgOptions::slotResult(QStringList &, int ret) +void pkgOptions::slotResult(TQStringList &, int ret) { reset(); if (ret == 0 && !test && !keep) { @@ -301,21 +301,21 @@ void pkgOptions::cancelButtonClicked() accept(); } -void pkgOptions::closeEvent ( QCloseEvent * e ) { +void pkgOptions::closeEvent ( TQCloseEvent * e ) { kdDebug() << "pkgOptions::QCloseEvent\n"; terminate(); - QWidget::closeEvent (e); + TQWidget::closeEvent (e); } -void pkgOptions::showEvent ( QShowEvent *e ) { +void pkgOptions::showEvent ( TQShowEvent *e ) { // kdDebug() << "pkgOptions::showEvent\n"; getKeep(); modified = FALSE; running = FALSE; - QWidget::showEvent(e); + TQWidget::showEvent(e); } void pkgOptions::keepToggle(bool kp) @@ -342,7 +342,7 @@ void pkgOptions::getKeep() /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// -pkgOptionsI::pkgOptionsI(pkgInterface *pkg, QWidget *parent): +pkgOptionsI::pkgOptionsI(pkgInterface *pkg, TQWidget *parent): pkgOptions(pkg, parent, i18n("Install")) { insType = i18n("Install"); @@ -350,14 +350,14 @@ pkgOptionsI::pkgOptionsI(pkgInterface *pkg, QWidget *parent): setupWidgets(pkg->paramsInst); } -QString pkgOptionsI::doPackages(int installFlags, QPtrList *p, bool &test) +TQString pkgOptionsI::doPackages(int installFlags, TQPtrList *p, bool &test) { return pkgInt->install(installFlags, p, test); } /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// -pkgOptionsU::pkgOptionsU(pkgInterface *pkg, QWidget *parent): +pkgOptionsU::pkgOptionsU(pkgInterface *pkg, TQWidget *parent): pkgOptions(pkg, parent, i18n("Uninstall")) { insType = i18n("Uninstall"); @@ -365,7 +365,7 @@ pkgOptionsU::pkgOptionsU(pkgInterface *pkg, QWidget *parent): setupWidgets(pkg->paramsUninst); } -QString pkgOptionsU::doPackages(int installFlags, QPtrList *p, bool &test) +TQString pkgOptionsU::doPackages(int installFlags, TQPtrList *p, bool &test) { return pkgInt->uninstall(installFlags, p, test); } diff --git a/kpackage/pkgOptions.h b/kpackage/pkgOptions.h index 707c340..1cf8d94 100644 --- a/kpackage/pkgOptions.h +++ b/kpackage/pkgOptions.h @@ -33,11 +33,11 @@ #include "../config.h" // Qt headers -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -53,20 +53,20 @@ class pkgOptions : public KDialog { Q_OBJECT public: - pkgOptions( pkgInterface *pki, QWidget *parent=0, const QString &caption=QString::null); + pkgOptions( pkgInterface *pki, TQWidget *parent=0, const TQString &caption=TQString::null); ~pkgOptions(); - bool setup(QPtrList *pl, const QString &type); - void setup(packageInfo *p, const QString &type); + bool setup(TQPtrList *pl, const TQString &type); + void setup(packageInfo *p, const TQString &type); void reset(); - virtual QString doPackages(int installFlags, QPtrList *p, + virtual TQString doPackages(int installFlags, TQPtrList *p, bool &test) = 0; - QCheckBox **Boxs; + TQCheckBox **Boxs; // options buttons - QCheckBox *Keep; + TQCheckBox *Keep; // keep window KListView *packages; @@ -74,7 +74,7 @@ public: int bnumber; // number of option buttons - QLabel *title; + TQLabel *title; // Widget title kpTerm *term; @@ -87,16 +87,16 @@ public: protected: // This sets up the sub-widgets - void setupWidgets(QPtrList &pars); + void setupWidgets(TQPtrList &pars); private slots: virtual void pkginstallButtonClicked(); virtual void cancelButtonClicked(); - void slotSearch(QListViewItem *item); + void slotSearch(TQListViewItem *item); void keepToggle(bool); public slots: - void slotResult(QStringList &rlist, int ret); + void slotResult(TQStringList &rlist, int ret); signals: // This signal indicates that the widget has finished. @@ -104,25 +104,25 @@ signals: protected: // The layout managers - QBoxLayout *layout, *hlayout, *vlayout; + TQBoxLayout *layout, *hlayout, *vlayout; // Sub widgets - QPushButton *installButton; + TQPushButton *installButton; KPushButton *cancelButton; - QString insType; + TQString insType; bool installer; // install or uninstall bool keep; // keep the window - QPtrList *packList; + TQPtrList *packList; void getKeep(); - void showEvent (QShowEvent *); - void closeEvent (QCloseEvent * e ); + void showEvent (TQShowEvent *); + void closeEvent (TQCloseEvent * e ); void terminate(); }; @@ -134,8 +134,8 @@ class pkgOptionsI: public pkgOptions { Q_OBJECT public: - pkgOptionsI(pkgInterface *pkg, QWidget *parent = 0); - QString doPackages(int installFlags, QPtrList *p, bool &test); + pkgOptionsI(pkgInterface *pkg, TQWidget *parent = 0); + TQString doPackages(int installFlags, TQPtrList *p, bool &test); }; /////////////////////////////////////////////////////////////////////////// @@ -144,8 +144,8 @@ class pkgOptionsU: public pkgOptions { Q_OBJECT public: - pkgOptionsU(pkgInterface *pkg, QWidget *parent = 0); - QString doPackages(int installFlags, QPtrList *p, bool &test); + pkgOptionsU(pkgInterface *pkg, TQWidget *parent = 0); + TQString doPackages(int installFlags, TQPtrList *p, bool &test); }; #endif diff --git a/kpackage/procbuf.cpp b/kpackage/procbuf.cpp index c994d70..568e651 100644 --- a/kpackage/procbuf.cpp +++ b/kpackage/procbuf.cpp @@ -29,13 +29,13 @@ #include #include "kpackage.h" #include -#include +#include #include -Modal::Modal(QString msg, QWidget *parent, const char * name ) +Modal::Modal(TQString msg, TQWidget *parent, const char * name ) : KDialog( parent, name, TRUE ) { - QLabel *line1 = new QLabel(msg,this); + TQLabel *line1 = new TQLabel(msg,this); line1->setAlignment(AlignCenter); line1->setAutoResize(true); @@ -49,24 +49,24 @@ void Modal::terminate() procbuf::procbuf() { m = NULL; - tm = new QTimer(this); - connect(tm, SIGNAL(timeout()), this, SLOT(slotTimeout())); + tm = new TQTimer(this); + connect(tm, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); } procbuf::~procbuf() { } -void procbuf::setup(QString cmd) +void procbuf::setup(TQString cmd) { buf.truncate(0); proc = new KProcess(); - connect(proc, SIGNAL( receivedStdout(KProcess *, char *, int)), - this, SLOT(slotReadInfo(KProcess *, char *, int))); - connect(proc, SIGNAL( receivedStderr(KProcess *, char *, int)), - this, SLOT(slotReadInfo(KProcess *, char *, int))); - connect(proc, SIGNAL( processExited(KProcess *)), - this, SLOT(slotExited(KProcess *))); + connect(proc, TQT_SIGNAL( receivedStdout(KProcess *, char *, int)), + this, TQT_SLOT(slotReadInfo(KProcess *, char *, int))); + connect(proc, TQT_SIGNAL( receivedStderr(KProcess *, char *, int)), + this, TQT_SLOT(slotReadInfo(KProcess *, char *, int))); + connect(proc, TQT_SIGNAL( processExited(KProcess *)), + this, TQT_SLOT(slotExited(KProcess *))); proc->clearArguments(); *proc << cmd; command = cmd; @@ -107,8 +107,8 @@ void procbuf::slotTimeout() // kdDebug() << "TTT\n"; } -int procbuf::start (QString msg, bool errorDlg, - int timeout, QString timeMsg ) +int procbuf::start (TQString msg, bool errorDlg, + int timeout, TQString timeMsg ) { if (timeout) { tm->start(timeout*1000, TRUE); diff --git a/kpackage/procbuf.h b/kpackage/procbuf.h index 8463810..be5bad3 100644 --- a/kpackage/procbuf.h +++ b/kpackage/procbuf.h @@ -29,8 +29,8 @@ #include "../config.h" #include #include -#include -#include +#include +#include #ifndef PROCBUF #define PROCBUF @@ -38,7 +38,7 @@ class Modal : public KDialog { Q_OBJECT public: - Modal(QString msg, QWidget *parent, const char * name ); + Modal(TQString msg, TQWidget *parent, const char * name ); void terminate(); }; @@ -49,16 +49,16 @@ class procbuf: public QObject public: procbuf(); ~procbuf(); - void setup(QString); - int start(QString msg, bool errorDlg = TRUE, - int timeout=0, QString timeMsg = ""); + void setup(TQString); + int start(TQString msg, bool errorDlg = TRUE, + int timeout=0, TQString timeMsg = ""); - QString buf; + TQString buf; KProcess *proc; Modal *m; - QString command; + TQString command; bool timed; - QTimer *tm; + TQTimer *tm; public slots: void slotReadInfo(KProcess *, char *, int); diff --git a/kpackage/rpmInterface.cpp b/kpackage/rpmInterface.cpp index 655e6b8..8096a78 100644 --- a/kpackage/rpmInterface.cpp +++ b/kpackage/rpmInterface.cpp @@ -59,8 +59,8 @@ RPM::RPM():pkgInterface() locatedialog->dLocations(7,6, this, i18n("Folder","F"), "Rpm","*.rpm", i18n("Location of Folders Containing RPM Packages")); - connect(locatedialog,SIGNAL(returnVal(LcacheObj *)), - this,SLOT(setAvail(LcacheObj *))); + connect(locatedialog,TQT_SIGNAL(returnVal(LcacheObj *)), + this,TQT_SLOT(setAvail(LcacheObj *))); locatedialog->apply_slot(); paramsInst.append(new param(i18n("Upgrade"),TRUE,FALSE,"-U","-i")); @@ -77,7 +77,7 @@ RPM::RPM():pkgInterface() queryMsg = i18n("Querying RPM package list: "); - QDict provides(1433,false); + TQDict provides(1433,false); infoList.append("name/%{NAME}"); infoList.append("version/%{VERSION}"); @@ -101,7 +101,7 @@ RPM::RPM():pkgInterface() RPM::~RPM(){} -bool RPM::isType(char *buf, const QString & /* fname */) +bool RPM::isType(char *buf, const TQString & /* fname */) { if (hasProgram) { if ((unsigned char)buf[0] == 0355 && (unsigned char)buf[1] == 0253 && @@ -114,7 +114,7 @@ bool RPM::isType(char *buf, const QString & /* fname */) } } -bool RPM::parseName(const QString &name, QString *n, QString *v) +bool RPM::parseName(const TQString &name, TQString *n, TQString *v) { int d1, d2, s1, s2; @@ -136,10 +136,10 @@ bool RPM::parseName(const QString &name, QString *n, QString *v) return FALSE; } -QString RPM::packageQuery() { - QString cmd = " --queryformat '"; - for ( QStringList::Iterator it = infoList.begin(); it != infoList.end(); ++it ) { - QStringList s = QStringList::split("/",*it); +TQString RPM::packageQuery() { + TQString cmd = " --queryformat '"; + for ( TQStringList::Iterator it = infoList.begin(); it != infoList.end(); ++it ) { + TQStringList s = TQStringList::split("/",*it); cmd += "=="; cmd += s[0]; cmd += "\\n"; @@ -150,20 +150,20 @@ QString RPM::packageQuery() { return cmd; } -void RPM::listInstalledPackages(QPtrList *pki) +void RPM::listInstalledPackages(TQPtrList *pki) { int NLINES = 70000; packageInfo *p; - QStringList plist; + TQStringList plist; - QString cmd = "rpm -q -a"; + TQString cmd = "rpm -q -a"; cmd += packageQuery(); kpackage->setStatus(i18n("Querying RPM package list")); kpackage->setPercent(0); - QStringList list = kpty->run(cmd); + TQStringList list = kpty->run(cmd); kpackage->setStatus(i18n("Processing RPM package list")); // kdDebug() << "P=" << list.count() <<"\n"; kpackage->setPercent(50); @@ -171,11 +171,11 @@ void RPM::listInstalledPackages(QPtrList *pki) if (list.count() > 0) { - QString s; + TQString s; kpackage->setPercent(0 ); int cnt = 0; - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { cnt++; if (cnt % (NLINES/20) == 0) { kpackage->setPercent((cnt * 100)/ NLINES ); @@ -201,14 +201,14 @@ void RPM::listInstalledPackages(QPtrList *pki) kpackage->setPercent(100); } -packageInfo* RPM::collectInfo(QStringList &ln) { +packageInfo* RPM::collectInfo(TQStringList &ln) { bool haveName = FALSE; - QMap a; + TQMap a; - QString name, value; + TQString name, value; - for ( QStringList::Iterator it = ln.begin(); it != ln.end(); ++it ) { + for ( TQStringList::Iterator it = ln.begin(); it != ln.end(); ++it ) { if ((*it).left(2) == "==" && (*it).length() >= 2) { name = (*it).right((*it).length() - 2); } @@ -231,8 +231,8 @@ packageInfo* RPM::collectInfo(QStringList &ln) { } else if (name == "buildtime") { a.insert("build-time", value); } else if (name == "requires") { - value = value.replace(QRegExp("\\(\\)"),""); - value = value.replace(QRegExp("\\( \\)"),""); + value = value.replace(TQRegExp("\\(\\)"),""); + value = value.replace(TQRegExp("\\( \\)"),""); value = value.stripWhiteSpace(); if (value.endsWith(",")) { value.truncate(value.length()-1); @@ -240,20 +240,20 @@ packageInfo* RPM::collectInfo(QStringList &ln) { a.insert("depends", value); } else if (name == "provides") { int s = 0, n; - QString t; + TQString t; if (!(*a.find("name")).isEmpty()) { while ((n = value.find(",",s)) > 0) { t = value.mid(s,n-s); t = t.stripWhiteSpace(); if (!t.isEmpty()) - provides.insert(t,new QString(*a.find("name"))); + provides.insert(t,new TQString(*a.find("name"))); s = n+1; } t = value.mid(s); t = t.stripWhiteSpace(); if (!t.isEmpty()) - provides.insert(t,new QString(*a.find("name"))); + provides.insert(t,new TQString(*a.find("name"))); value = value.stripWhiteSpace(); if (value.endsWith(",")) { @@ -268,8 +268,8 @@ packageInfo* RPM::collectInfo(QStringList &ln) { } - QString vers = a["version"]; - QString rel = a["release"]; + TQString vers = a["version"]; + TQString rel = a["release"]; if (!vers.isEmpty() && !rel.isEmpty()) { vers += "-"; vers += rel; @@ -289,10 +289,10 @@ packageInfo* RPM::collectInfo(QStringList &ln) { ////////////////////////////////////////////////////////////////////////////// -QStringList RPM::getChangeLog(packageInfo *p) +TQStringList RPM::getChangeLog(packageInfo *p) { - QStringList clog; - QString fn( p->getFilename()); + TQStringList clog; + TQString fn( p->getFilename()); if(!fn.isEmpty()) return getUChangeLog(fn); @@ -304,26 +304,26 @@ QStringList RPM::getChangeLog(packageInfo *p) // query an installed package -QStringList RPM::getIChangeLog(packageInfo *p) +TQStringList RPM::getIChangeLog(packageInfo *p) { - QString name = p->getProperty("name"); + TQString name = p->getProperty("name"); - QString cmd = "rpm -q --changelog "; + TQString cmd = "rpm -q --changelog "; cmd += name; - QStringList filelist = kpty->run(cmd); + TQStringList filelist = kpty->run(cmd); return filelist; } // query an uninstalled package -QStringList RPM::getUChangeLog(const QString &fn) +TQStringList RPM::getUChangeLog(const TQString &fn) { - QString cmd = "rpm -q --changelog -p "; + TQString cmd = "rpm -q --changelog -p "; cmd += quotePath(fn); - QStringList filelist = kpty->run(cmd); + TQStringList filelist = kpty->run(cmd); return filelist; } @@ -350,10 +350,10 @@ bool RPM::changeTab(packageInfo *p) { ////////////////////////////////////////////////////////////////////////////// -QStringList RPM::getFileList(packageInfo *p) +TQStringList RPM::getFileList(packageInfo *p) { - QStringList filelist; - QString fn( p->getFilename()); + TQStringList filelist; + TQString fn( p->getFilename()); if(!fn.isEmpty()) return getUFileList(fn); @@ -366,32 +366,32 @@ QStringList RPM::getFileList(packageInfo *p) // query an installed package -QStringList RPM::getIFileList(packageInfo *p) +TQStringList RPM::getIFileList(packageInfo *p) { - QString name = p->getProperty("name"); + TQString name = p->getProperty("name"); - QString cmd = "rpm -q -l "; + TQString cmd = "rpm -q -l "; cmd += name; - QStringList filelist = kpty->run(cmd); + TQStringList filelist = kpty->run(cmd); return filelist; } // query an uninstalled package -QStringList RPM::getUFileList(const QString &fn) +TQStringList RPM::getUFileList(const TQString &fn) { - QString cmd = "rpm -q -l -p "; + TQString cmd = "rpm -q -l -p "; cmd += quotePath(fn); - QStringList filelist = kpty->run(cmd); + TQStringList filelist = kpty->run(cmd); return filelist; } ////////////////////////////////////////////////////////////////////////////// -packageInfo *RPM::getPackageInfo(char mode, const QString &name, const QString &) +packageInfo *RPM::getPackageInfo(char mode, const TQString &name, const TQString &) { if (mode == 'i') { return getIPackageInfo(name); @@ -399,15 +399,15 @@ packageInfo *RPM::getPackageInfo(char mode, const QString &name, const QString & return getUPackageInfo(name); } -packageInfo *RPM::getIPackageInfo( const QString &name ) +packageInfo *RPM::getIPackageInfo( const TQString &name ) { // query an installed package! - QString cmd = "rpm -q"; + TQString cmd = "rpm -q"; cmd += packageQuery(); cmd += " "; cmd += name; - QStringList infoList = kpty->run(cmd); + TQStringList infoList = kpty->run(cmd); packageInfo *pki = collectInfo(infoList); if (pki) { pki->packageState = packageInfo::INSTALLED; @@ -416,15 +416,15 @@ packageInfo *RPM::getIPackageInfo( const QString &name ) return pki; } -packageInfo *RPM::getUPackageInfo( const QString &name ) +packageInfo *RPM::getUPackageInfo( const TQString &name ) { // query an uninstalled package - QString cmd = "rpm -q"; + TQString cmd = "rpm -q"; cmd += packageQuery(); cmd += " -p "; cmd += quotePath(name); - QStringList infoList = kpty->run(cmd); + TQStringList infoList = kpty->run(cmd); packageInfo *pki = collectInfo(infoList); if (pki) { pki->updated = TRUE; @@ -437,11 +437,11 @@ packageInfo *RPM::getUPackageInfo( const QString &name ) return pki; } -QString RPM::provMap( const QString &p ) +TQString RPM::provMap( const TQString &p ) { - QString *r = provides[p]; + TQString *r = provides[p]; if (r) { - QString s = *r; + TQString s = *r; // printf("%s=>%s\n",p.data(),s.data()); return s; } else { @@ -451,22 +451,22 @@ QString RPM::provMap( const QString &p ) ////////////////////////////////////////////////////////////////////////////// -void RPM::collectDepends(packageInfo *p, const QString &name, int src) +void RPM::collectDepends(packageInfo *p, const TQString &name, int src) { - QString cmd = "rpm -V --nofiles "; + TQString cmd = "rpm -V --nofiles "; if (src) { cmd += "-p "; } cmd += quotePath(name); // cmd = "cat /home/toivo/rpm.deps"; - QStringList list = kpty->run(cmd); + TQStringList list = kpty->run(cmd); if (list.count() > 0) { - QStringList::Iterator it = list.begin(); + TQStringList::Iterator it = list.begin(); int pt = (*it).find(":"); if (pt > 0) { - QString s = (*it).mid(pt+1); + TQString s = (*it).mid(pt+1); if (!s.isEmpty()) { // kdDebug() << "S=" << s << "\n"; p->info.insert("unsatisfied dependencies", s); @@ -491,9 +491,9 @@ void RPM::setAvail(LcacheObj *slist) ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -QString RPM::uninstall(int uninstallFlags, QPtrList *plist, bool &test) +TQString RPM::uninstall(int uninstallFlags, TQPtrList *plist, bool &test) { - QStringList files; + TQStringList files; packageInfo *pk; for (pk = plist->first(); pk != 0; pk = plist->next()) { @@ -507,9 +507,9 @@ QString RPM::uninstall(int uninstallFlags, QPtrList *plist, bool &t } } -QString RPM::uninstall(int uninstallFlags, packageInfo *p, bool &test) +TQString RPM::uninstall(int uninstallFlags, packageInfo *p, bool &test) { - QStringList files; + TQStringList files; files.append( p->getProperty("name") ); if (getuid() == 0) { @@ -519,12 +519,12 @@ QString RPM::uninstall(int uninstallFlags, packageInfo *p, bool &test) } } -QString RPM::doUninstP(int uninstallFlags, const QStringList &files, bool &test) +TQString RPM::doUninstP(int uninstallFlags, const TQStringList &files, bool &test) { - QString s = "rpm -e "; + TQString s = "rpm -e "; s += setOptions(uninstallFlags, paramsUninst); - for (QStringList::ConstIterator it = files.begin(); it != files.end(); ++it ) { + for (TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it ) { s += " "; s += *it; } @@ -541,12 +541,12 @@ QString RPM::doUninstP(int uninstallFlags, const QStringList &files, bool &test) ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -QString RPM::install(int installFlags, QPtrList *plist, bool &test) +TQString RPM::install(int installFlags, TQPtrList *plist, bool &test) { - QStringList files; + TQStringList files; for (packageInfo *pk = plist->first(); pk != 0; pk = plist->next()) { - QString fname( pk->fetchFilename() ); + TQString fname( pk->fetchFilename() ); if (!fname.isEmpty()) { files.append(quotePath(fname)); } @@ -559,9 +559,9 @@ QString RPM::install(int installFlags, QPtrList *plist, bool &test) } } -QString RPM::install(int installFlags, packageInfo *p, bool &test) +TQString RPM::install(int installFlags, packageInfo *p, bool &test) { - QStringList files; + TQStringList files; files.append(quotePath(p->fetchFilename())); if (getuid() == 0) { return doinstP(installFlags,files,test); @@ -571,12 +571,12 @@ QString RPM::install(int installFlags, packageInfo *p, bool &test) } -QString RPM::doinstP(int installFlags, const QStringList &files, bool &test) +TQString RPM::doinstP(int installFlags, const TQStringList &files, bool &test) { - QString s = "rpm "; + TQString s = "rpm "; s += setOptions(installFlags, paramsInst); - for (QStringList::ConstIterator it = files.begin(); it != files.end(); ++it ) { + for (TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it ) { s += " "; s += *it; } @@ -589,19 +589,19 @@ QString RPM::doinstP(int installFlags, const QStringList &files, bool &test) return s; } - QStringList RPM::verify(packageInfo *p, const QStringList &files){ + TQStringList RPM::verify(packageInfo *p, const TQStringList &files){ return pkgInterface::verify(p,files);} ////////////////////////////////////////////////////////////////////////////// -QStringList RPM::FindFile(const QString &name, bool) { - QString cmd = "rpm -q -a --filesbypkg"; +TQStringList RPM::FindFile(const TQString &name, bool) { + TQString cmd = "rpm -q -a --filesbypkg"; - QStringList list = kpty->run(cmd); - QStringList retlist; + TQStringList list = kpty->run(cmd); + TQStringList retlist; if (kpty->Result > 0) { list.clear(); } else { - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { int p = (*it).find(" "); int nm = (*it).find(name,p); if (nm >= 0) { @@ -615,17 +615,17 @@ QStringList RPM::FindFile(const QString &name, bool) { } ////////////////////////////////////////////////////////////////////////////// -QString RPM::quotePath( const QString &path) { - QString s = path; +TQString RPM::quotePath( const TQString &path) { + TQString s = path; s = s.replace(" ","\\ "); return ( "'" + s + "'" ); } ////////////////////////////////////////////////////////////////////////////// - QStringList RPM::depends(const QString &, int){return 0;} + TQStringList RPM::depends(const TQString &, int){return 0;} - QString RPM::doUninst(int, const QStringList &, bool &){return "0=";} - QString RPM::doinst(int, const QStringList &, bool &){return "0=";} + TQString RPM::doUninst(int, const TQStringList &, bool &){return "0=";} + TQString RPM::doinst(int, const TQStringList &, bool &){return "0=";} #include "rpmInterface.moc" diff --git a/kpackage/rpmInterface.h b/kpackage/rpmInterface.h index a1357ef..a7db803 100644 --- a/kpackage/rpmInterface.h +++ b/kpackage/rpmInterface.h @@ -30,7 +30,7 @@ #include "../config.h" -#include +#include #include "packageInfo.h" #include "pkgInterface.h" @@ -46,11 +46,11 @@ public: RPM(); ~RPM(); - bool isType(char *buf, const QString &fname); + bool isType(char *buf, const TQString &fname); - packageInfo *getPackageInfo(char mode, const QString &name, const QString &version); - QStringList getFileList(packageInfo *p); - QStringList getChangeLog(packageInfo *p); + packageInfo *getPackageInfo(char mode, const TQString &name, const TQString &version); + TQStringList getFileList(packageInfo *p); + TQStringList getChangeLog(packageInfo *p); bool filesTab(packageInfo *p); // If files tab is to be enabled @@ -58,50 +58,50 @@ public: bool changeTab(packageInfo *p); // If change log tab is to be enabled - QStringList depends(const QString &name, int src); - QStringList verify(packageInfo *p, const QStringList &files); + TQStringList depends(const TQString &name, int src); + TQStringList verify(packageInfo *p, const TQStringList &files); - QString uninstall(int uninstallFlags, QPtrList *p, bool &test); - QString uninstall(int uninstallFlags, packageInfo *p, bool &test); - QString doUninst(int uninstallFlags, const QStringList &files, bool &test); - QString doUninstP(int uninstallFlags, const QStringList &files, bool &test); + TQString uninstall(int uninstallFlags, TQPtrList *p, bool &test); + TQString uninstall(int uninstallFlags, packageInfo *p, bool &test); + TQString doUninst(int uninstallFlags, const TQStringList &files, bool &test); + TQString doUninstP(int uninstallFlags, const TQStringList &files, bool &test); - QString install(int installFlags, QPtrList *p, bool &test); - QString install(int installFlags, packageInfo *p, bool &test); - QString doinst(int installFlags, const QStringList &files, bool &test); - QString doinstP(int installFlags, const QStringList &files, bool &test); + TQString install(int installFlags, TQPtrList *p, bool &test); + TQString install(int installFlags, packageInfo *p, bool &test); + TQString doinst(int installFlags, const TQStringList &files, bool &test); + TQString doinstP(int installFlags, const TQStringList &files, bool &test); - QStringList FindFile(const QString &name, bool seachAll=false); - void collectDepends(packageInfo *p, const QString &name, int src); - bool parseName(const QString &name, QString *n, QString *v); + TQStringList FindFile(const TQString &name, bool seachAll=false); + void collectDepends(packageInfo *p, const TQString &name, int src); + bool parseName(const TQString &name, TQString *n, TQString *v); - QString provMap(const QString &p); + TQString provMap(const TQString &p); public slots: void setLocation(); void setAvail(LcacheObj *); private: - packageInfo* collectInfo(QStringList &ln); + packageInfo* collectInfo(TQStringList &ln); - void listInstalledPackages(QPtrList *pki); + void listInstalledPackages(TQPtrList *pki); - QDict provides; + TQDict provides; bool rpmSetup; - QStringList infoList; + TQStringList infoList; - QString packageQuery(); + TQString packageQuery(); - QStringList getIFileList( packageInfo *p ); - QStringList getUFileList( const QString &fn ); + TQStringList getIFileList( packageInfo *p ); + TQStringList getUFileList( const TQString &fn ); - QStringList getIChangeLog( packageInfo *p ); - QStringList getUChangeLog( const QString &fn ); + TQStringList getIChangeLog( packageInfo *p ); + TQStringList getUChangeLog( const TQString &fn ); - packageInfo *getIPackageInfo( const QString &name); - packageInfo *getUPackageInfo( const QString &name); + packageInfo *getIPackageInfo( const TQString &name); + packageInfo *getUPackageInfo( const TQString &name); - QString quotePath( const QString &path); + TQString quotePath( const TQString &path); }; diff --git a/kpackage/search.cpp b/kpackage/search.cpp index e4254f4..2f774bf 100644 --- a/kpackage/search.cpp +++ b/kpackage/search.cpp @@ -30,52 +30,52 @@ #include "managementWidget.h" #include "search.h" #include -#include -#include -#include -#include +#include +#include +#include +#include -Search::Search(QWidget *parent, const char * name) +Search::Search(TQWidget *parent, const char * name) : KDialogBase(parent, name, false, i18n("Find Package"), User1 | Close, User1, true, KGuiItem( i18n("&Find"), "find")) { - QFrame *page = makeMainWidget(); + TQFrame *page = makeMainWidget(); - setFocusPolicy(QWidget::StrongFocus); + setFocusPolicy(TQWidget::StrongFocus); - QVBoxLayout* vtop = new QVBoxLayout( page, 10, 10, "vtop"); + TQVBoxLayout* vtop = new TQVBoxLayout( page, 10, 10, "vtop"); - QFrame *frame1 = new QGroupBox(i18n("Find Package"), page, "frame1"); + TQFrame *frame1 = new TQGroupBox(i18n("Find Package"), page, "frame1"); vtop->addWidget(frame1,1); - QVBoxLayout* vf = new QVBoxLayout( frame1, 20, 10, "vf"); + TQVBoxLayout* vf = new TQVBoxLayout( frame1, 20, 10, "vf"); - value = new QLineEdit( frame1, "v"); + value = new TQLineEdit( frame1, "v"); vf->addWidget(value,0); value->setFocus(); value->setFixedHeight(value->sizeHint().height()); value->setMinimumWidth(250); - connect(value, SIGNAL(textChanged(const QString &)),this, SLOT(textChanged(const QString &))); + connect(value, TQT_SIGNAL(textChanged(const TQString &)),this, TQT_SLOT(textChanged(const TQString &))); - QHBoxLayout* hc = new QHBoxLayout( ); + TQHBoxLayout* hc = new TQHBoxLayout( ); vf->addLayout(hc,0); - substr = new QCheckBox(i18n("Sub string"), frame1, "substr"); + substr = new TQCheckBox(i18n("Sub string"), frame1, "substr"); substr->setChecked(TRUE); hc->addWidget(substr,1,AlignLeft); substr->setFixedSize(substr->sizeHint()); hc->addStretch(1); - wrap = new QCheckBox(i18n("Wrap search"), frame1, "wrap"); + wrap = new TQCheckBox(i18n("Wrap search"), frame1, "wrap"); wrap->setChecked(TRUE); hc->addWidget(wrap,1,AlignRight); wrap->setFixedSize(wrap->sizeHint()); enableButton( User1, false ); - connect(this, SIGNAL(user1Clicked()), this, SLOT(ok_slot())); - connect(this, SIGNAL(closeClicked()), this, SLOT(done_slot())); + connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(ok_slot())); + connect(this, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(done_slot())); show(); } @@ -84,16 +84,16 @@ Search::~Search() { } -void Search::textChanged(const QString &text) +void Search::textChanged(const TQString &text) { enableButton( User1, !text.isEmpty() ); } void Search::ok_slot() { - QListViewItem *pkg; + TQListViewItem *pkg; - QString to_find = value->text(); + TQString to_find = value->text(); to_find = to_find.stripWhiteSpace(); pkg = kpackage->management->search(to_find, diff --git a/kpackage/search.h b/kpackage/search.h index e5ae2cd..51987d0 100644 --- a/kpackage/search.h +++ b/kpackage/search.h @@ -49,13 +49,13 @@ class Search : public KDialogBase public: - Search ( QWidget *parent = 0, const char * name=0); + Search ( TQWidget *parent = 0, const char * name=0); ~Search(); private: - QCheckBox *substr; - QCheckBox *wrap; - QLineEdit *value; + TQCheckBox *substr; + TQCheckBox *wrap; + TQLineEdit *value; signals: void search_signal(); @@ -64,6 +64,6 @@ signals: public slots: void done_slot(); void ok_slot(); - void textChanged(const QString &); + void textChanged(const TQString &); }; #endif diff --git a/kpackage/slackInterface.cpp b/kpackage/slackInterface.cpp index 8b80f2d..6e6d993 100644 --- a/kpackage/slackInterface.cpp +++ b/kpackage/slackInterface.cpp @@ -34,9 +34,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -92,8 +92,8 @@ SLACK::SLACK():pkgInterface() "Slackware", "*.tgz *.tar.gz", i18n("Location of Folders Containing Slackware Packages")); - connect(locatedialog,SIGNAL(returnVal(LcacheObj *)), - this,SLOT(setAvail(LcacheObj *))); + connect(locatedialog,TQT_SIGNAL(returnVal(LcacheObj *)), + this,TQT_SLOT(setAvail(LcacheObj *))); locatedialog->apply_slot(); paramsInst.append(new param(i18n("Test (do not install)"),FALSE,FALSE,"-warn")); @@ -114,26 +114,26 @@ SLACK::~SLACK() ////////////////////////////////////////////////////////////////////////////// void SLACK::initTranslate() { - trl = new QDict(53); - - trl->insert("a",new QString(i18n("Base System"))); - trl->insert("ap",new QString(i18n("Linux Applications"))); - trl->insert("d",new QString(i18n("Program Development"))); - trl->insert("e",new QString(i18n("GNU EMacs"))); - trl->insert("f",new QString(i18n("FAQs"))); - trl->insert("k",new QString(i18n("Kernel Source"))); - trl->insert("n",new QString(i18n("Networking"))); - trl->insert("t",new QString(i18n("TeX Distribution"))); - trl->insert("tcl",new QString(i18n("TCL Script Language"))); - trl->insert("x",new QString(i18n("X Window System"))); - trl->insert("xap",new QString(i18n("X Applications"))); - trl->insert("xd",new QString(i18n("X Development Tools"))); - trl->insert("xv",new QString(i18n("XView and OpenLook"))); - trl->insert("y",new QString(i18n("Games"))); + trl = new TQDict(53); + + trl->insert("a",new TQString(i18n("Base System"))); + trl->insert("ap",new TQString(i18n("Linux Applications"))); + trl->insert("d",new TQString(i18n("Program Development"))); + trl->insert("e",new TQString(i18n("GNU EMacs"))); + trl->insert("f",new TQString(i18n("FAQs"))); + trl->insert("k",new TQString(i18n("Kernel Source"))); + trl->insert("n",new TQString(i18n("Networking"))); + trl->insert("t",new TQString(i18n("TeX Distribution"))); + trl->insert("tcl",new TQString(i18n("TCL Script Language"))); + trl->insert("x",new TQString(i18n("X Window System"))); + trl->insert("xap",new TQString(i18n("X Applications"))); + trl->insert("xd",new TQString(i18n("X Development Tools"))); + trl->insert("xv",new TQString(i18n("XView and OpenLook"))); + trl->insert("y",new TQString(i18n("Games"))); } // check if slack file -bool SLACK::isType(char *buf, const QString &) +bool SLACK::isType(char *buf, const TQString &) { if (hasProgram) { if ((unsigned char)buf[0] == 037 && (unsigned char)buf[1] == 0213 ) { @@ -145,21 +145,21 @@ bool SLACK::isType(char *buf, const QString &) } } -bool SLACK::parseName(const QString &name, QString *n, QString *v) +bool SLACK::parseName(const TQString &name, TQString *n, TQString *v) { int s1; s1 = name.findRev('.'); if (s1 > 0) { *n = name.left(s1); - v = new QString(""); + v = new TQString(""); return TRUE; } return FALSE; } -void SLACK::listPackages(QPtrList *pki) +void SLACK::listPackages(TQPtrList *pki) { - QString s; + TQString s; cacheObj *cp; if (packageLoc) { @@ -195,23 +195,23 @@ void SLACK::listPackages(QPtrList *pki) } } -void SLACK::listInstalledPackages(QPtrList *pki) +void SLACK::listInstalledPackages(TQPtrList *pki) { FILE *file; char linebuf[1024]; - QString vb; + TQString vb; packageInfo *p; - QString fn, dr = DIR; + TQString fn, dr = DIR; - QDir d(DIR); + TQDir d(DIR); if (d.exists()) { - QString sline = i18n("Querying SLACK package list: "); + TQString sline = i18n("Querying SLACK package list: "); kpackage->setStatus(sline); const QFileInfoList *list = d.entryInfoList(); int count = list->count(); QFileInfoListIterator it( *list ); // create list iterator - QFileInfo *fi; // pointer for traversing + TQFileInfo *fi; // pointer for traversing kpackage->setPercent(0); int cnt = 0; @@ -222,9 +222,9 @@ void SLACK::listInstalledPackages(QPtrList *pki) if (!fi->isDir() && fi->isReadable()) { fn = dr + fi->fileName(); - file = fopen(QFile::encodeName(fn),"r"); + file = fopen(TQFile::encodeName(fn),"r"); if (file) { - vb = QString::null; + vb = TQString::null; while (fgets(linebuf,sizeof(linebuf),file)) { if (strcmp(linebuf,FILELIST)) { vb += linebuf; @@ -249,22 +249,22 @@ void SLACK::listInstalledPackages(QPtrList *pki) } ////////////////////////////////////////////////////////////////////////////// -void SLACK::listPackList(QPtrList *pki, const QString &s, cacheObj *cp, int insState) +void SLACK::listPackList(TQPtrList *pki, const TQString &s, cacheObj *cp, int insState) { int np; - QString vb; + TQString vb; char linebuf[1024]; FILE *file; packageInfo *p; - QString sline = i18n("Querying SLACK package list: "); + TQString sline = i18n("Querying SLACK package list: "); sline += cp->location; kpackage->setStatus(sline); kpackage->setPercent(0); np = 0; - file= fopen(QFile::encodeName(s), "r"); + file= fopen(TQFile::encodeName(s), "r"); vb = ""; if (file) { @@ -303,12 +303,12 @@ void SLACK::listPackList(QPtrList *pki, const QString &s, cacheObj ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // mode: i = query installed u = query uninstalled -packageInfo *SLACK::getPackageInfo(char mode, const QString &name, const QString &) +packageInfo *SLACK::getPackageInfo(char mode, const TQString &name, const TQString &) { char linebuf[1024]; packageInfo *pki = 0; - QString vb, search, fn; - QString n,v; + TQString vb, search, fn; + TQString n,v; FILE *file; switch(mode) { @@ -316,9 +316,9 @@ packageInfo *SLACK::getPackageInfo(char mode, const QString &name, const QString // query an installed package! case 'i': fn = DIR + name; - file = fopen(QFile::encodeName(fn),"r"); + file = fopen(TQFile::encodeName(fn),"r"); if (file) { - vb = QString::null; + vb = TQString::null; while (fgets(linebuf,sizeof(linebuf),file)) { if (strcmp(linebuf,FILELIST)) { vb += linebuf; @@ -337,17 +337,17 @@ packageInfo *SLACK::getPackageInfo(char mode, const QString &name, const QString //////////////////////////////////////////////////////////////////// // query an uninstalled package case 'u': - QFile f(name); + TQFile f(name); if (f.exists()) { - QMap a; + TQMap a; a.insert("group", i18n("OTHER")); a.insert("filename", name); - QFileInfo f(name); + TQFileInfo f(name); a.insert("name", f.baseName()); - QString st; + TQString st; st.setNum(f.size()); a.insert("file-size", st); @@ -367,11 +367,11 @@ packageInfo *SLACK::getPackageInfo(char mode, const QString &name, const QString ////////////////////////////////////////////////////////////////////////////// packageInfo *SLACK::collectInfo(const char *_inp, int insState) { - QString stmp, fn = ""; - QMap a; + TQString stmp, fn = ""; + TQMap a; char *str, *xstr; - QString qstr; + TQString qstr; char *inp = qstrdup(_inp); str = strtok(inp,"\n"); @@ -397,14 +397,14 @@ packageInfo *SLACK::collectInfo(const char *_inp, int insState) if (!strcmp("package name",str)) { fn = xstr; - QString st = xstr; + TQString st = xstr; if (st.right(4) == ".tgz") a.insert("name", st.left(st.length() - 4)); else a.insert("name", st); } else if (!strcmp("package description",str)) { int i = 0; - QString qstr = ""; + TQString qstr = ""; while ((str = strtok(NULL,"\n"))) { xstr = strchr(str,':'); @@ -430,15 +430,15 @@ packageInfo *SLACK::collectInfo(const char *_inp, int insState) } a.insert("description", qstr); } else if (!strcmp("package location",str)) { - QString sl = xstr; + TQString sl = xstr; if (insState != INSTALLED) { int sls = sl.findRev("/"); if (sls >= 0) { - QRegExp num("[0-9][0-9]*"); + TQRegExp num("[0-9][0-9]*"); int slf = sl.find(num,sls); if (slf >= 0) { sls++; - QString gt = sl.mid(sls,slf-sls); + TQString gt = sl.mid(sls,slf-sls); if (trl->find(gt)) { gt = *trl->find(gt); } @@ -456,13 +456,13 @@ packageInfo *SLACK::collectInfo(const char *_inp, int insState) a.insert("group", xstr); } else if (!strcmp("compressed package size",str) || !strcmp("package size (compressed)",str)) { - QString stmp = xstr; + TQString stmp = xstr; stmp.truncate(stmp.length() - 2); stmp += "000"; a.insert("file-size", stmp); } else if (!strcmp("uncompressed package size",str) || !strcmp("package size (uncompressed)",str)) { - QString stmp = xstr; + TQString stmp = xstr; stmp.truncate(stmp.length() - 2); stmp += "000"; a.insert("size", stmp); @@ -488,7 +488,7 @@ packageInfo *SLACK::collectInfo(const char *_inp, int insState) ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -QStringList SLACK::getChangeLog(packageInfo *) { +TQStringList SLACK::getChangeLog(packageInfo *) { return 0; } @@ -502,12 +502,12 @@ bool SLACK::changeTab(packageInfo *) { ////////////////////////////////////////////////////////////////////////////// -QStringList SLACK::getFileList(packageInfo *p) +TQStringList SLACK::getFileList(packageInfo *p) { char linebuf[1024]; - QString st, fn; + TQString st, fn; FILE *file; - QString name; + TQString name; char mode; fn = p->getFilename(); @@ -516,7 +516,7 @@ QStringList SLACK::getFileList(packageInfo *p) else mode = 'i'; - QStringList filelist; + TQStringList filelist; switch(mode) { //////////////////////////////////////////////////////////////////////// @@ -525,7 +525,7 @@ QStringList SLACK::getFileList(packageInfo *p) name = p->getProperty("name"); fn = DIR + name; - file = fopen(QFile::encodeName(fn),"r"); + file = fopen(TQFile::encodeName(fn),"r"); if (file) { while (fgets(linebuf,sizeof(linebuf),file)) { if (!strcmp(linebuf,FILELIST)) { @@ -549,7 +549,7 @@ QStringList SLACK::getFileList(packageInfo *p) case 'u': name = fn; - QString s = "sh -c 'cat "; + TQString s = "sh -c 'cat "; s += fn; s += "|gunzip |tar -t -f -'"; @@ -564,9 +564,9 @@ QStringList SLACK::getFileList(packageInfo *p) // Call the script to uninstall packages setting parameters // to slack dependent on flags, returning whether everyting worked ////////////////////////////////////////////////////////////////////////////// -QString SLACK::doUninstall(int uninstallFlags, const QString &packs, bool &) +TQString SLACK::doUninstall(int uninstallFlags, const TQString &packs, bool &) { - QString s = "removepkg "; + TQString s = "removepkg "; s += setOptions(uninstallFlags, paramsUninst); s += packs; @@ -579,13 +579,13 @@ QString SLACK::doUninstall(int uninstallFlags, const QString &packs, bool &) // Call the script to install packages setting parameters // to slack dependent on flags, returning whether everyting worked ////////////////////////////////////////////////////////////////////////////// -QString SLACK::install(int installFlags, QPtrList *plist, bool &test) +TQString SLACK::install(int installFlags, TQPtrList *plist, bool &test) { packageInfo *pk; int i = 0; - QString packs = ""; + TQString packs = ""; for (pk = plist->first(); pk != 0; pk = plist->next()) { - QString fname = pk->fetchFilename(); + TQString fname = pk->fetchFilename(); if ( !fname.isEmpty() ) { packs += fname + " "; i++; @@ -594,10 +594,10 @@ QString SLACK::install(int installFlags, QPtrList *plist, bool &tes return doInstall(installFlags, packs, test); } -QString SLACK::doInstall(int installFlags, const QString &packs, bool &) +TQString SLACK::doInstall(int installFlags, const TQString &packs, bool &) { - QString s = "installpkg "; + TQString s = "installpkg "; s += setOptions(installFlags, paramsInst); s += packs; @@ -608,23 +608,23 @@ QString SLACK::doInstall(int installFlags, const QString &packs, bool &) ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -QStringList SLACK::FindFile(const QString &name, bool) +TQStringList SLACK::FindFile(const TQString &name, bool) { FILE *file; char linebuf[1024]; - QString buf, st; - QString fn, dr = DIR; - QStringList filelist; + TQString buf, st; + TQString fn, dr = DIR; + TQStringList filelist; - QDir d(DIR); + TQDir d(DIR); if (d.exists()) { - QString sline = i18n("Querying SLACK package list: "); + TQString sline = i18n("Querying SLACK package list: "); kpackage->setStatus(sline); const QFileInfoList *list = d.entryInfoList(); int count = list->count(); QFileInfoListIterator it( *list ); // create list iterator - QFileInfo *fi; // pointer for traversing + TQFileInfo *fi; // pointer for traversing kpackage->setPercent(0); int cnt = 0; @@ -635,7 +635,7 @@ QStringList SLACK::FindFile(const QString &name, bool) if (!fi->isDir() && fi->isReadable()) { fn = dr + fi->fileName(); - file = fopen(QFile::encodeName(fn),"r"); + file = fopen(TQFile::encodeName(fn),"r"); if (file) { while (fgets(linebuf,sizeof(linebuf),file)) { if (!strcmp(linebuf,FILELIST)) { @@ -643,12 +643,12 @@ QStringList SLACK::FindFile(const QString &name, bool) } } while (fgets(linebuf,sizeof(linebuf),file)) { - if (QString::fromLocal8Bit(linebuf).find(name) != -1) { + if (TQString::fromLocal8Bit(linebuf).find(name) != -1) { st = "/"; st += linebuf; st.truncate(st.length() -1); if (st.left(8) != "/install") { - QString s = fi->fileName(); + TQString s = fi->fileName(); s += "\t"; s += st; filelist.append(s); diff --git a/kpackage/slackInterface.h b/kpackage/slackInterface.h index c11a7c2..f6ed3fc 100644 --- a/kpackage/slackInterface.h +++ b/kpackage/slackInterface.h @@ -29,7 +29,7 @@ #include "../config.h" -#include +#include #include #include "pkgInterface.h" @@ -46,12 +46,12 @@ public: SLACK(); ~SLACK(); - bool isType(char *buf, const QString &fname); + bool isType(char *buf, const TQString &fname); - packageInfo *getPackageInfo(char mode, const QString &name, - const QString &version); - QStringList getFileList(packageInfo *p); - QStringList getChangeLog(packageInfo *p); + packageInfo *getPackageInfo(char mode, const TQString &name, + const TQString &version); + TQStringList getFileList(packageInfo *p); + TQStringList getChangeLog(packageInfo *p); bool filesTab(packageInfo *p); // If files tab is to be enabled @@ -59,10 +59,10 @@ public: bool changeTab(packageInfo *p); // If change log tab is to be enabled - QStringList FindFile(const QString &name, bool seachAll=false); - bool parseName(const QString& name, QString *n, QString *v); + TQStringList FindFile(const TQString &name, bool seachAll=false); + bool parseName(const TQString& name, TQString *n, TQString *v); - QString install(int installFlags, QPtrList *plist, bool &test); + TQString install(int installFlags, TQPtrList *plist, bool &test); public slots: void setLocation(); @@ -70,20 +70,20 @@ public slots: private: packageInfo* collectInfo(const char *inp, int insState); - void listInstalledPackages(QPtrList *pki); + void listInstalledPackages(TQPtrList *pki); - QString doUninstall(int installFlags, const QString &packs, bool &test); - QString doInstall(int installFlags, const QString &packs, bool &test); + TQString doUninstall(int installFlags, const TQString &packs, bool &test); + TQString doInstall(int installFlags, const TQString &packs, bool &test); - void listPackages(QPtrList *pki); - void listPackList(QPtrList *pki, const QString &s, + void listPackages(TQPtrList *pki); + void listPackList(TQPtrList *pki, const TQString &s, cacheObj *cp, int insState); void initTranslate(); void smerge(packageInfo *p); - QDict *trl; + TQDict *trl; }; #endif diff --git a/kpackage/updateLoc.cpp b/kpackage/updateLoc.cpp index cf4e582..60e43e4 100644 --- a/kpackage/updateLoc.cpp +++ b/kpackage/updateLoc.cpp @@ -32,26 +32,26 @@ #include "options.h" #include "cache.h" -#include -#include +#include +#include #include #include #include ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -apanel::apanel( QWidget *parent, +apanel::apanel( TQWidget *parent, const char * name ) - : QWidget( parent, name ) + : TQWidget( parent, name ) { puse = 0; - pack = new QHBoxLayout(this); + pack = new TQHBoxLayout(this); { - puse = new QCheckBox(i18n("Use"),this); + puse = new TQCheckBox(i18n("Use"),this); pack->addWidget(puse,0); - pent = new QLineEdit(this); + pent = new TQLineEdit(this); pent->setMinimumWidth(600); pack->addWidget(pent,0); @@ -62,13 +62,13 @@ apanel::~apanel() { } -QString apanel::getText() const +TQString apanel::getText() const { - QString s = pent->text(); + TQString s = pent->text(); return s; } -void apanel::setText(const QString &s) +void apanel::setText(const TQString &s) { pent->setText(s); } @@ -99,29 +99,29 @@ void apanel::clear() ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -dpanel::dpanel( QWidget *parent, const char * name ) - : QWidget( parent, name ) +dpanel::dpanel( TQWidget *parent, const char * name ) + : TQWidget( parent, name ) { puse = 0; psubdirs = 0; - pack = new QHBoxLayout(this); + pack = new TQHBoxLayout(this); { - pent = new QLineEdit(this); + pent = new TQLineEdit(this); pent->setMinimumWidth(280); pack->addWidget(pent,0); - pbut = new QPushButton("...",this); + pbut = new TQPushButton("...",this); pack->addWidget(pbut,0); - connect(pbut, SIGNAL(clicked()), this, SLOT(dirOpen())); + connect(pbut, TQT_SIGNAL(clicked()), this, TQT_SLOT(dirOpen())); } } -dpanel::dpanel(dpanel *basep, const QString &Pfilter, bool bsubdirs, - QWidget *parent, const char * name ) - : QWidget( parent, name ) +dpanel::dpanel(dpanel *basep, const TQString &Pfilter, bool bsubdirs, + TQWidget *parent, const char * name ) + : TQWidget( parent, name ) { filter = Pfilter; puse = 0; @@ -129,28 +129,28 @@ dpanel::dpanel(dpanel *basep, const QString &Pfilter, bool bsubdirs, base = basep; - pack = new QHBoxLayout(this); + pack = new TQHBoxLayout(this); { - puse = new QCheckBox(i18n("Use"),this); + puse = new TQCheckBox(i18n("Use"),this); pack->addWidget(puse,0); - pent = new QLineEdit(this); + pent = new TQLineEdit(this); pent->setMinimumWidth(280); pack->addWidget(pent,0); if (bsubdirs) { - psubdirs = new QCheckBox(i18n("Subfolders"),this); + psubdirs = new TQCheckBox(i18n("Subfolders"),this); psubdirs->setFixedSize(psubdirs->sizeHint()); pack->addWidget(psubdirs,0); } - pbut = new QPushButton("...",this); + pbut = new TQPushButton("...",this); pack->addWidget(pbut,0); if (base) - connect(pbut, SIGNAL(clicked()), this, SLOT(fileOpen())); + connect(pbut, TQT_SIGNAL(clicked()), this, TQT_SLOT(fileOpen())); else - connect(pbut, SIGNAL(clicked()), this, SLOT(dirOpen())); + connect(pbut, TQT_SIGNAL(clicked()), this, TQT_SLOT(dirOpen())); } } @@ -159,13 +159,13 @@ dpanel::~dpanel() { } -QString dpanel::getText() const +TQString dpanel::getText() const { - QString s = pent->text(); + TQString s = pent->text(); return s; } -void dpanel::setText(const QString &s) +void dpanel::setText(const TQString &s) { pent->setText(s); } @@ -209,7 +209,7 @@ void dpanel::setSubdirs(int n) void dpanel::fileOpen() { - QString st; + TQString st; if (base && getText().isEmpty()) { st = base->getText(); @@ -231,7 +231,7 @@ void dpanel::fileOpen() void dpanel::dirOpen() { - QString st; + TQString st; if (base && getText().isEmpty()) { st = base->getText(); @@ -252,29 +252,29 @@ void dpanel::dirOpen() ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -updateLoc::updateLoc(QWidget *p, int panelNumber, pkgInterface *inter, const QString &iname) - : QWidget(p,"updateLoc",FALSE) +updateLoc::updateLoc(TQWidget *p, int panelNumber, pkgInterface *inter, const TQString &iname) + : TQWidget(p,"updateLoc",FALSE) { interName = iname; interface = inter; panNumber = panelNumber; - vf = new QVBoxLayout( this, 15, 10, "vf"); + vf = new TQVBoxLayout( this, 15, 10, "vf"); } updateLoc::~updateLoc() { } -void updateLoc::doBase(const QString & bmsg) +void updateLoc::doBase(const TQString & bmsg) { base = 0; if (haveBase) { - fbase = new QGroupBox(bmsg, this); + fbase = new TQGroupBox(bmsg, this); fbase->setColumnLayout(0, Qt::Vertical ); fbase->layout()->setSpacing( KDialog::spacingHint() ); fbase->layout()->setMargin( KDialog::marginHint() ); - vbase = new QVBoxLayout(fbase->layout()); + vbase = new TQVBoxLayout(fbase->layout()); vf->addWidget(fbase,1); base = new dpanel(fbase); vbase->addWidget(base,0); @@ -285,8 +285,8 @@ void updateLoc::doBase(const QString & bmsg) ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -aUpdateLoc::aUpdateLoc(QWidget *p, int panelNumber, pkgInterface *inter, const QString &iname, - int numberLines, const QString &label) +aUpdateLoc::aUpdateLoc(TQWidget *p, int panelNumber, pkgInterface *inter, const TQString &iname, + int numberLines, const TQString &label) : updateLoc(p, panelNumber, inter, iname) { @@ -297,16 +297,16 @@ aUpdateLoc::aUpdateLoc(QWidget *p, int panelNumber, pkgInterface *inter, const Q ap[0] = 0; - QGroupBox *floc = new QGroupBox(1,Qt::Vertical, label, this); + TQGroupBox *floc = new TQGroupBox(1,Qt::Vertical, label, this); vf->addWidget(floc,1); - QScrollView* sv = new QScrollView(floc); - sv->setHScrollBarMode(QScrollView::AlwaysOff); - sv->setResizePolicy(QScrollView::AutoOneFit); + TQScrollView* sv = new TQScrollView(floc); + sv->setHScrollBarMode(TQScrollView::AlwaysOff); + sv->setResizePolicy(TQScrollView::AutoOneFit); - QFrame *f = new QFrame(sv->viewport()); + TQFrame *f = new TQFrame(sv->viewport()); sv->addChild(f); - QVBoxLayout *vloc = new QVBoxLayout(f, 0, 3, "vloc"); + TQVBoxLayout *vloc = new TQVBoxLayout(f, 0, 3, "vloc"); for (int i = 0; i < numLines; i++) { ap[i] = new apanel( f); @@ -323,14 +323,14 @@ aUpdateLoc::~aUpdateLoc() void aUpdateLoc::readSettings() { int i = 0; - QString a,b; + TQString a,b; for (int i = 0; i < numLines; i++) { ap[i]->clear(); } - QStringList list = interface->readApt(); - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + TQStringList list = interface->readApt(); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { if (!(*it).isEmpty()) { if ((*it).left(1) == "#") { ap[i]->setText(((*it).mid(1)).stripWhiteSpace()); @@ -349,10 +349,10 @@ void aUpdateLoc::readSettings() } void aUpdateLoc::writeSettings() { - QStringList list; - QString s; + TQStringList list; + TQString s; - QString ln; + TQString ln; for (int i = 0; i < numLines; i++) { if (!ap[i]) break; @@ -377,9 +377,9 @@ void aUpdateLoc::applyS(LcacheObj *) { ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -pdUpdateLoc::pdUpdateLoc(QWidget *p, int panelNumber, pkgInterface *inter, const QString &iname, - int numberLines, const QString &filter, - const QString &lmsg, QString bmsg, +pdUpdateLoc::pdUpdateLoc(TQWidget *p, int panelNumber, pkgInterface *inter, const TQString &iname, + int numberLines, const TQString &filter, + const TQString &lmsg, TQString bmsg, bool subdirs ) : updateLoc(p, panelNumber, inter, iname) { @@ -393,7 +393,7 @@ pdUpdateLoc::pdUpdateLoc(QWidget *p, int panelNumber, pkgInterface *inter, const dp[0] = 0; - QString pn; + TQString pn; pn.setNum(panNumber); pn += "_"; @@ -408,12 +408,12 @@ pdUpdateLoc::pdUpdateLoc(QWidget *p, int panelNumber, pkgInterface *inter, const doBase(bmsg); - QGroupBox *floc = new QGroupBox(lmsg, this); + TQGroupBox *floc = new TQGroupBox(lmsg, this); floc->setColumnLayout(0, Qt::Vertical ); floc->layout()->setSpacing( KDialog::spacingHint() ); floc->layout()->setMargin( KDialog::marginHint() ); vf->addWidget(floc,1); - QVBoxLayout *vloc = new QVBoxLayout(floc->layout()); + TQVBoxLayout *vloc = new TQVBoxLayout(floc->layout()); for (int i = 0; i < numLines; i++) { dp[i] = new dpanel(base, filter, subdirs, floc); @@ -430,7 +430,7 @@ pdUpdateLoc::~pdUpdateLoc() void pdUpdateLoc::applyS(LcacheObj *slist) { - QString t,pn,cn,pv,prev,opts; + TQString t,pn,cn,pv,prev,opts; cacheObj *CObj; KConfig *config = kapp->config(); config->setGroup(interName); @@ -446,13 +446,13 @@ void pdUpdateLoc::applyS(LcacheObj *slist) pv = packL + pn.setNum(i); prev = config->readEntry(pv); if (prev != dp[i]->getText()) - cacheObj::rmDCache(QString(cn + pn.setNum(i))); + cacheObj::rmDCache(TQString(cn + pn.setNum(i))); // create cache object corresponding to this entry if (dp[i]->getUse()) { t = dp[i]->getText(); if (!t.isEmpty()) { - CObj = new cacheObj(haveBase ? base->getText() : QString::null, + CObj = new cacheObj(haveBase ? base->getText() : TQString::null, t, cn + pn.setNum(i), "", dp[i]->getSubdirs()); slist->append(CObj); // printf("T=%s\n",t.data()); @@ -464,7 +464,7 @@ void pdUpdateLoc::applyS(LcacheObj *slist) void pdUpdateLoc::readSettings() { - QString pv, pn; + TQString pv, pn; KConfig *config = kapp->config(); @@ -487,7 +487,7 @@ void pdUpdateLoc::readSettings() void pdUpdateLoc::writeSettings() { - QString pv, pn; + TQString pv, pn; KConfig *config = kapp->config(); @@ -512,9 +512,9 @@ void pdUpdateLoc::writeSettings() ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -cUpdateLoc::cUpdateLoc(QWidget *p, int panelNumber, pkgInterface *inter, const QString &iname, - int numberLines, const QString &baseMsg, - const QString &boxLabels, const QString &boxValues) +cUpdateLoc::cUpdateLoc(TQWidget *p, int panelNumber, pkgInterface *inter, const TQString &iname, + int numberLines, const TQString &baseMsg, + const TQString &boxLabels, const TQString &boxValues) : updateLoc(p, panelNumber, inter, iname) { if (numberLines > PNUM) @@ -526,7 +526,7 @@ cUpdateLoc::cUpdateLoc(QWidget *p, int panelNumber, pkgInterface *inter, const Q combo[0] = 0; - QString pn; + TQString pn; pn.setNum(panNumber); pn += "_"; @@ -535,28 +535,28 @@ cUpdateLoc::cUpdateLoc(QWidget *p, int panelNumber, pkgInterface *inter, const Q availB = "Available_Base"; availB += pn; - QStringList kc = QStringList::split('\n', boxLabels); - QStringList::Iterator kcIt = kc.begin(); + TQStringList kc = TQStringList::split('\n', boxLabels); + TQStringList::Iterator kcIt = kc.begin(); - QStringList oc = QStringList::split('\n', boxValues); - QStringList::Iterator ocIt = oc.begin(); + TQStringList oc = TQStringList::split('\n', boxValues); + TQStringList::Iterator ocIt = oc.begin(); doBase(baseMsg); for (int i = 0; i < numLines; i++) { - QGroupBox *floc = new QGroupBox(*kcIt, this); + TQGroupBox *floc = new TQGroupBox(*kcIt, this); floc->setColumnLayout(0, Qt::Vertical ); floc->layout()->setSpacing( KDialog::spacingHint() ); floc->layout()->setMargin( KDialog::marginHint() ); vf->addWidget(floc,1); - QVBoxLayout *vloc = new QVBoxLayout(floc->layout()); + TQVBoxLayout *vloc = new TQVBoxLayout(floc->layout()); combo[i] = new KComboBox( true, floc); KCompletion *comp = combo[i]->completionObject(); - connect(combo[i],SIGNAL(returnPressed(const QString&)) - ,comp,SLOT(addItem(const QString&))); - combo[i]->insertStringList(QStringList::split(' ',*ocIt)); + connect(combo[i],TQT_SIGNAL(returnPressed(const TQString&)) + ,comp,TQT_SLOT(addItem(const TQString&))); + combo[i]->insertStringList(TQStringList::split(' ',*ocIt)); vloc->addWidget(combo[i]); if (kcIt != kc.end()) { ++kcIt; @@ -575,7 +575,7 @@ cUpdateLoc::~cUpdateLoc() void cUpdateLoc::applyS(LcacheObj *slist) { - QString t,pn,cn,pv,prev,opts; + TQString t,pn,cn,pv,prev,opts; cacheObj *CObj; KConfig *config = kapp->config(); config->setGroup(interName); @@ -599,7 +599,7 @@ cUpdateLoc::~cUpdateLoc() void cUpdateLoc::readSettings() { - QString pv, pn; + TQString pv, pn; KConfig *config = kapp->config(); @@ -621,7 +621,7 @@ void cUpdateLoc::readSettings() void cUpdateLoc::writeSettings() { - QString pv, pn; + TQString pv, pn; KConfig *config = kapp->config(); @@ -642,27 +642,27 @@ void cUpdateLoc::writeSettings() ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -Locations::Locations(const QString &msg) +Locations::Locations(const TQString &msg) : KDialogBase(Tabbed, msg, Ok | Cancel, Ok, 0, "Locations", false) { numPanels = 0; - connect( this, SIGNAL(okClicked()), SLOT(write_slot()) ); + connect( this, TQT_SIGNAL(okClicked()), TQT_SLOT(write_slot()) ); } void Locations::dLocations(int numberDirs, int numberLines, - pkgInterface *inter, const QString &iname, - const QString &label, const QString &filter, const QString &dirMsg, + pkgInterface *inter, const TQString &iname, + const TQString &label, const TQString &filter, const TQString &dirMsg, bool subdirs) { - QString nm; + TQString nm; for (int i = numPanels ; (i < numPanels + numberDirs) && (i < PANNUM); i++) { - QString mp = iname; + TQString mp = iname; nm.setNum(i+1); mp += nm; - QVBox *page = addVBoxPage(mp); + TQVBox *page = addVBoxPage(mp); pn[i] = new pdUpdateLoc(page, i, inter, label, numberLines, filter, dirMsg, NULL, subdirs); @@ -671,17 +671,17 @@ void Locations::dLocations(int numberDirs, int numberLines, } void Locations::pLocations(int numberDirs, int numberLines, - pkgInterface *inter, const QString &iname, const QString &label, - const QString &filter, - const QString &packMsg, QString baseMsg, bool subdirs) + pkgInterface *inter, const TQString &iname, const TQString &label, + const TQString &filter, + const TQString &packMsg, TQString baseMsg, bool subdirs) { - QString nm; + TQString nm; for (int i = numPanels; (i < numPanels + numberDirs) && (i < PANNUM); i++) { - QString mp = iname; + TQString mp = iname; nm.setNum(i+1); mp += nm; - QVBox *page = addVBoxPage(mp); + TQVBox *page = addVBoxPage(mp); pn[i] = new pdUpdateLoc(page, i, inter, label, numberLines, filter, packMsg, baseMsg, subdirs); @@ -690,16 +690,16 @@ void Locations::pLocations(int numberDirs, int numberLines, } void Locations::cLocations(int numberDirs, int numberLines, - pkgInterface *inter, const QString &iname, const QString &label, - const QString &boxLables, const QString &baseMsg, const QString &boxValues) + pkgInterface *inter, const TQString &iname, const TQString &label, + const TQString &boxLables, const TQString &baseMsg, const TQString &boxValues) { - QString nm; + TQString nm; for (int i = numPanels; (i < numPanels + numberDirs) && (i < PANNUM); i++) { - QString mp = iname; + TQString mp = iname; nm.setNum(i+1); mp += nm; - QVBox *page = addVBoxPage(mp); + TQVBox *page = addVBoxPage(mp); pn[i] = new cUpdateLoc(page, i, inter, label, numberLines, baseMsg, boxLables, boxValues); @@ -708,15 +708,15 @@ void Locations::cLocations(int numberDirs, int numberLines, } void Locations::aLocations(int numberDirs, int numberLines, - pkgInterface *inter, const QString &iname, const QString &label) + pkgInterface *inter, const TQString &iname, const TQString &label) { - QString nm; + TQString nm; for (int i = numPanels; (i < numPanels + numberDirs) && (i < PANNUM); i++) { - QString mp = iname; + TQString mp = iname; nm.setNum(i+1); mp += nm; - QVBox *page = addVBoxPage(mp); + TQVBox *page = addVBoxPage(mp); pn[i] = new aUpdateLoc(page, i, inter, iname, numberLines, label); } diff --git a/kpackage/updateLoc.h b/kpackage/updateLoc.h index 269bf74..d9879f3 100644 --- a/kpackage/updateLoc.h +++ b/kpackage/updateLoc.h @@ -35,15 +35,15 @@ #include // Qt Headers -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // KDE headers #include @@ -62,14 +62,14 @@ class dpanel : public QWidget Q_OBJECT public: - dpanel(QWidget *parent, const char * name = 0); - dpanel(dpanel *basep, const QString &Pfilter, bool bsubdirs, - QWidget *parent, const char * name = 0); + dpanel(TQWidget *parent, const char * name = 0); + dpanel(dpanel *basep, const TQString &Pfilter, bool bsubdirs, + TQWidget *parent, const char * name = 0); ~dpanel(); - QString getText() const; - void setText(const QString &s); + TQString getText() const; + void setText(const TQString &s); bool getUse() const; void setUse(int n); bool getSubdirs() const; @@ -77,14 +77,14 @@ public: private: - QCheckBox *psubdirs; - QCheckBox *puse; - QHBoxLayout* pack; - QLineEdit *pent; - QPushButton *pbut; + TQCheckBox *psubdirs; + TQCheckBox *puse; + TQHBoxLayout* pack; + TQLineEdit *pent; + TQPushButton *pbut; dpanel *base; - QString filter; + TQString filter; public slots: void fileOpen(); @@ -99,21 +99,21 @@ class apanel : public QWidget Q_OBJECT public: - apanel( QWidget *parent, const char * name = 0 ); + apanel( TQWidget *parent, const char * name = 0 ); ~apanel(); - QString getText() const; - void setText(const QString &s); + TQString getText() const; + void setText(const TQString &s); bool getUse(); void setUse(int n); void clear(); private: - QCheckBox *puse; - QHBoxLayout* pack; - QLineEdit *pent; + TQCheckBox *puse; + TQHBoxLayout* pack; + TQLineEdit *pent; @@ -129,7 +129,7 @@ class updateLoc : public QWidget public: - updateLoc (QWidget *p, int panelNumber, pkgInterface *inter, const QString &iname); + updateLoc (TQWidget *p, int panelNumber, pkgInterface *inter, const TQString &iname); ~updateLoc(); virtual void readSettings() = 0; @@ -137,20 +137,20 @@ public: virtual void applyS(LcacheObj *slist) = 0; - void doBase(const QString &bmsg); + void doBase(const TQString &bmsg); - QString interName; + TQString interName; int panNumber; bool haveBase; pkgInterface *interface; - QVBoxLayout *vf; + TQVBoxLayout *vf; dpanel *base; - QGroupBox *fbase; - QVBoxLayout* vbase; + TQGroupBox *fbase; + TQVBoxLayout* vbase; }; ////////////////////////////////////////////////////////////////////////////// @@ -161,8 +161,8 @@ class aUpdateLoc : public updateLoc public: - aUpdateLoc (QWidget *p, int panelNumber, pkgInterface *inter, const QString &iname, - int numberLines, const QString &label); + aUpdateLoc (TQWidget *p, int panelNumber, pkgInterface *inter, const TQString &iname, + int numberLines, const TQString &label); ~aUpdateLoc(); @@ -173,21 +173,21 @@ public: private: - QString packL, packU, packS, availB; + TQString packL, packU, packS, availB; int wdth; - QPushButton *butloc; + TQPushButton *butloc; - QHBoxLayout* hloc; + TQHBoxLayout* hloc; int numLines; enum { PNUM = 100 }; apanel *ap[PNUM]; - QVBoxLayout* vl; - QVBoxLayout* vtop; - QGroupBox *frame1; + TQVBoxLayout* vl; + TQVBoxLayout* vtop; + TQGroupBox *frame1; KButtonBox* hb; }; @@ -200,9 +200,9 @@ class pdUpdateLoc : public updateLoc public: - pdUpdateLoc (QWidget *p, int panelNumber, pkgInterface *inter, - const QString &iname, int numberLines, const QString &filter, - const QString &lmsg, QString bmsg = 0, + pdUpdateLoc (TQWidget *p, int panelNumber, pkgInterface *inter, + const TQString &iname, int numberLines, const TQString &filter, + const TQString &lmsg, TQString bmsg = 0, bool subdirs = FALSE); ~pdUpdateLoc(); @@ -214,21 +214,21 @@ public: private: - QString packL, packU, packS, availB; + TQString packL, packU, packS, availB; int wdth; - QPushButton *butloc; + TQPushButton *butloc; - QHBoxLayout* hloc; + TQHBoxLayout* hloc; int numLines; enum { PNUM = 40 }; dpanel *dp[PNUM]; - QVBoxLayout* vl; - QVBoxLayout* vtop; - QGroupBox *frame1; + TQVBoxLayout* vl; + TQVBoxLayout* vtop; + TQGroupBox *frame1; KButtonBox* hb; }; @@ -241,9 +241,9 @@ class cUpdateLoc : public updateLoc public: - cUpdateLoc (QWidget *p, int panelNumber, pkgInterface *inter, - const QString &iname, int numberLines, const QString &baseMsg, - const QString &boxLabels, const QString &boxValues); + cUpdateLoc (TQWidget *p, int panelNumber, pkgInterface *inter, + const TQString &iname, int numberLines, const TQString &baseMsg, + const TQString &boxLabels, const TQString &boxValues); ~cUpdateLoc(); @@ -254,19 +254,19 @@ public: private: - QString packC, availB; + TQString packC, availB; - QPushButton *butloc; + TQPushButton *butloc; - QHBoxLayout* hloc; + TQHBoxLayout* hloc; int numLines; enum { PNUM = 40 }; KComboBox *combo[PNUM]; - QVBoxLayout* vl; - QVBoxLayout* vtop; - QGroupBox *frame1; + TQVBoxLayout* vl; + TQVBoxLayout* vtop; + TQGroupBox *frame1; KButtonBox* hb; @@ -281,26 +281,26 @@ class Locations : public KDialogBase Q_OBJECT public: - Locations( const QString &msg); + Locations( const TQString &msg); ~Locations(); void dLocations(int numberDirs, int numberLines, - pkgInterface *inter, const QString &iname, - const QString &label, const QString &filter, const QString &dirMsg, + pkgInterface *inter, const TQString &iname, + const TQString &label, const TQString &filter, const TQString &dirMsg, bool subdirs=TRUE ); void pLocations(int numberDirs, int numberLines, - pkgInterface *inter, const QString &iname, - const QString &label, const QString &filter, - const QString &packMsg, QString baseMsg = 0, + pkgInterface *inter, const TQString &iname, + const TQString &label, const TQString &filter, + const TQString &packMsg, TQString baseMsg = 0, bool subdirs=FALSE); void cLocations(int numberDirs, int numberLines, - pkgInterface *inter, const QString &iname, const QString &label, - const QString &boxLabels, const QString &baseMsg, const QString &boxValues); + pkgInterface *inter, const TQString &iname, const TQString &label, + const TQString &boxLabels, const TQString &baseMsg, const TQString &boxValues); void aLocations(int numberDirs, int numberLines, - pkgInterface *inter, const QString &iname, const QString &label); + pkgInterface *inter, const TQString &iname, const TQString &label); diff --git a/kpackage/utils.cpp b/kpackage/utils.cpp index 4f0ef44..679b037 100644 --- a/kpackage/utils.cpp +++ b/kpackage/utils.cpp @@ -32,12 +32,12 @@ #include "utils.h" #include "kplview.h" -void KpMsgE( const QString &msg, bool stop) +void KpMsgE( const TQString &msg, bool stop) { KpMsg( "Error", msg, stop); } -void KpMsg(const QString &lab, const QString &msg, bool stop) +void KpMsg(const TQString &lab, const TQString &msg, bool stop) { if (stop) KMessageBox::sorry(kpkg, msg, lab); @@ -45,7 +45,7 @@ void KpMsg(const QString &lab, const QString &msg, bool stop) KMessageBox::information(kpkg, msg, lab); } -KpTreeListItem *findGroup(const QString &name, KpTreeListItem *search) +KpTreeListItem *findGroup(const TQString &name, KpTreeListItem *search) { if(!search) return NULL; diff --git a/kpackage/utils.h b/kpackage/utils.h index 5cf30d9..4608965 100644 --- a/kpackage/utils.h +++ b/kpackage/utils.h @@ -33,7 +33,7 @@ class KpTreeListItem; -KpTreeListItem *findGroup(const QString &name, KpTreeListItem *search); +KpTreeListItem *findGroup(const TQString &name, KpTreeListItem *search); #endif diff --git a/ksysv/ActionList.cpp b/ksysv/ActionList.cpp index a2e2de8..21caa93 100644 --- a/ksysv/ActionList.cpp +++ b/ksysv/ActionList.cpp @@ -12,7 +12,7 @@ * * ***************************************************************************/ -#include +#include #include "ksvdraglist.h" #include "ActionList.h" @@ -147,8 +147,8 @@ void CompoundAction::undo() // ActionList // ////////////////////////////////// -ActionList::ActionList (QObject* parent, const char* name) - : QObject(parent, name) +ActionList::ActionList (TQObject* parent, const char* name) + : TQObject(parent, name) { setAutoDelete(false); } @@ -162,7 +162,7 @@ void ActionList::undoLast() if (!count()) return; - KSVAction* a = QPtrStack::pop(); + KSVAction* a = TQPtrStack::pop(); a->undo(); emit undone(); @@ -182,7 +182,7 @@ void ActionList::redoLast() if (!count()) return; - KSVAction* a = QPtrStack::pop(); + KSVAction* a = TQPtrStack::pop(); a->redo(); emit undone(); @@ -199,7 +199,7 @@ void ActionList::redoAll() void ActionList::push (KSVAction* a) { - QPtrStack::push(a); + TQPtrStack::push(a); if (count() == 1) emit filled(); @@ -208,7 +208,7 @@ void ActionList::push (KSVAction* a) void ActionList::clear() { setAutoDelete (true); - QPtrStack::clear(); + TQPtrStack::clear(); setAutoDelete (false); emit empty(); diff --git a/ksysv/ActionList.h b/ksysv/ActionList.h index f420b48..5f5a047 100644 --- a/ksysv/ActionList.h +++ b/ksysv/ActionList.h @@ -15,8 +15,8 @@ #ifndef KSV_ACTIONLIST_H #define KSV_ACTIONLIST_H -#include -#include +#include +#include class KSVData; class KSVDragList; @@ -103,15 +103,15 @@ private: -class ActionList : public QObject, private QPtrStack +class ActionList : public TQObject, private TQPtrStack { Q_OBJECT public: - ActionList (QObject* parent, const char* name); + ActionList (TQObject* parent, const char* name); virtual ~ActionList (); - KSVAction* top () const { return QPtrStack::top(); } + KSVAction* top () const { return TQPtrStack::top(); } public slots: void undoLast (); diff --git a/ksysv/Data.cpp b/ksysv/Data.cpp index caa4a1b..5b8221c 100644 --- a/ksysv/Data.cpp +++ b/ksysv/Data.cpp @@ -1,6 +1,6 @@ // (c) 2000 Peter Putzer -#include +#include #include #include "Data.h" @@ -11,8 +11,8 @@ KSVData::KSVData () mNr = mOldNr = 0; } -KSVData::KSVData (const QString& file, const QString& path, - const QString& label, Q_INT8 nr) +KSVData::KSVData (const TQString& file, const TQString& path, + const TQString& label, Q_INT8 nr) : mPath (path), mLabel (label), mFilename (file) { @@ -94,7 +94,7 @@ bool KSVData::operator< (const KSVData& rhs) const return mNr< rhs.mNr; } -void KSVData::setPath (const QString& s) +void KSVData::setPath (const TQString& s) { if (mPath != s) mOtherChanged = true; @@ -102,7 +102,7 @@ void KSVData::setPath (const QString& s) mPath = s; } -void KSVData::setLabel (const QString& s) +void KSVData::setLabel (const TQString& s) { if (!mLabelChanged && mLabel != s) { @@ -113,7 +113,7 @@ void KSVData::setLabel (const QString& s) mLabel = s; } -void KSVData::setFilename (const QString& s) +void KSVData::setFilename (const TQString& s) { if (!mFilenameChanged && mFilename != s) { @@ -124,7 +124,7 @@ void KSVData::setFilename (const QString& s) mFilename = s; } -void KSVData::setRunlevel (const QString& s) +void KSVData::setRunlevel (const TQString& s) { mRunlevel = s; } @@ -146,12 +146,12 @@ void KSVData::setChanged (bool val) mNrChanged = mLabelChanged = mOtherChanged = mFilenameChanged = val; } -void KSVData::setOriginalRunlevel (const QString& rl) +void KSVData::setOriginalRunlevel (const TQString& rl) { mOriginalRunlevel = rl; } -QDataStream& operator<< (QDataStream& stream, const KSVData& data) +TQDataStream& operator<< (TQDataStream& stream, const KSVData& data) { return stream << data.mPath << data.mFilename @@ -168,7 +168,7 @@ QDataStream& operator<< (QDataStream& stream, const KSVData& data) } -QDataStream& operator>> (QDataStream& stream, KSVData& data) +TQDataStream& operator>> (TQDataStream& stream, KSVData& data) { stream >> data.mPath >> data.mFilename diff --git a/ksysv/Data.h b/ksysv/Data.h index e282346..974194a 100644 --- a/ksysv/Data.h +++ b/ksysv/Data.h @@ -9,7 +9,7 @@ class KSVData { public: KSVData (); - KSVData (const QString& file, const QString& path, const QString& label, Q_INT8 nr); + KSVData (const TQString& file, const TQString& path, const TQString& label, Q_INT8 nr); KSVData (const KSVData& rhs); inline ~KSVData () {} @@ -17,19 +17,19 @@ public: bool operator== (const KSVData& rhs) const; bool operator< (const KSVData& rhs) const; - inline QString filenameAndPath () const { return mPath + "/" + mFilename; } + inline TQString filenameAndPath () const { return mPath + "/" + mFilename; } - inline const QString& path () const { return mPath; } - inline const QString& label () const { return mLabel; } - inline const QString& filename () const { return mFilename; } - inline const QString& runlevel () const { return mRunlevel; } + inline const TQString& path () const { return mPath; } + inline const TQString& label () const { return mLabel; } + inline const TQString& filename () const { return mFilename; } + inline const TQString& runlevel () const { return mRunlevel; } inline Q_INT8 number () const { return mNr; } - inline const QString& numberString () const { return mNumberString; } + inline const TQString& numberString () const { return mNumberString; } - inline const QString& oldLabel () const { return mOldLabel; } - inline const QString& oldFilename () const { return mOldFilename; } - inline const QString& originalRunlevel () const { return mOldFilename; } + inline const TQString& oldLabel () const { return mOldLabel; } + inline const TQString& oldFilename () const { return mOldFilename; } + inline const TQString& originalRunlevel () const { return mOldFilename; } inline Q_INT8 oldNumber () const { return mOldNr; } inline bool numberChanged () const { return mNrChanged; } @@ -42,26 +42,26 @@ public: inline void setNumberChanged (bool val) { mNrChanged = val; } inline void setNewEntry (bool val) { mNewEntry = val; } - void setPath (const QString&); - void setLabel (const QString&); - void setFilename (const QString&); - void setRunlevel (const QString&); - void setOriginalRunlevel (const QString&); + void setPath (const TQString&); + void setLabel (const TQString&); + void setFilename (const TQString&); + void setRunlevel (const TQString&); + void setOriginalRunlevel (const TQString&); void setNumber (Q_INT8 nr); void setChanged (bool); private: - friend QDataStream& operator<< (QDataStream&, const KSVData&); - friend QDataStream& operator>> (QDataStream&, KSVData&); + friend TQDataStream& operator<< (TQDataStream&, const KSVData&); + friend TQDataStream& operator>> (TQDataStream&, KSVData&); - QString mPath; - QString mLabel; - QString mFilename; - QString mRunlevel; + TQString mPath; + TQString mLabel; + TQString mFilename; + TQString mRunlevel; Q_INT8 mNr; - QString mOldLabel; - QString mOldFilename; - QString mOriginalRunlevel; + TQString mOldLabel; + TQString mOldFilename; + TQString mOriginalRunlevel; Q_INT8 mOldNr; bool mNrChanged; @@ -70,10 +70,10 @@ private: bool mFilenameChanged; bool mNewEntry; - QString mNumberString; + TQString mNumberString; }; -QDataStream& operator<< (QDataStream& stream, const KSVData& data); -QDataStream& operator>> (QDataStream& stream, KSVData& data); +TQDataStream& operator<< (TQDataStream& stream, const KSVData& data); +TQDataStream& operator>> (TQDataStream& stream, KSVData& data); #endif // KSV_DATA_H diff --git a/ksysv/IOCore.cpp b/ksysv/IOCore.cpp index c61dec6..434d051 100644 --- a/ksysv/IOCore.cpp +++ b/ksysv/IOCore.cpp @@ -18,10 +18,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -36,15 +36,15 @@ #include "ksv_core.h" #include "ksv_conf.h" -QString ksv::IO::relToAbs (const QString& dir, const QString& rel) +TQString ksv::IO::relToAbs (const TQString& dir, const TQString& rel) { if (rel.left(1) != "/") - return QDir::cleanDirPath (dir + "/" + rel); + return TQDir::cleanDirPath (dir + "/" + rel); else - return QDir::cleanDirPath (rel); + return TQDir::cleanDirPath (rel); } -void ksv::IO::removeFile (const QFileInfo& info, QDir& dir, QString& rich, QString& plain) +void ksv::IO::removeFile (const TQFileInfo& info, TQDir& dir, TQString& rich, TQString& plain) { if (!dir.remove(info.fileName(), FALSE)) { @@ -69,26 +69,26 @@ void ksv::IO::removeFile (const QFileInfo& info, QDir& dir, QString& rich, QStri } } -void ksv::IO::dissectFilename (const QString& file, QString& base, int& nr) +void ksv::IO::dissectFilename (const TQString& file, TQString& base, int& nr) { - QString tmp = file.mid(1, file.length()); + TQString tmp = file.mid(1, file.length()); nr = tmp.left(2).toInt(); base = tmp.mid(2, tmp.length()); } void ksv::IO::makeSymlink (const KSVData& data, int runlevel, bool start, - QString& rich, QString& plain) + TQString& rich, TQString& plain) { - const QString symName = QString("%1%2%3").arg(start ? "S" : "K").arg(data.numberString()).arg(data.label()); - const QString symPath = QString("%1/rc%2.d/").arg(KSVConfig::self()->runlevelPath()).arg(runlevel); + const TQString symName = TQString("%1%2%3").arg(start ? "S" : "K").arg(data.numberString()).arg(data.label()); + const TQString symPath = TQString("%1/rc%2.d/").arg(KSVConfig::self()->runlevelPath()).arg(runlevel); - const QString symbol = symPath + symName; - QString target = data.filename(); + const TQString symbol = symPath + symName; + TQString target = data.filename(); - if (QDir::isRelativePath(target)) - target = ksv::IO::makeRelativePath(QDir::cleanDirPath(symPath), - QDir::cleanDirPath(data.path())) + data.filename(); + if (TQDir::isRelativePath(target)) + target = ksv::IO::makeRelativePath(TQDir::cleanDirPath(symPath), + TQDir::cleanDirPath(data.path())) + data.filename(); if (symlink(target.local8Bit(), symbol.local8Bit()) == 0) { @@ -109,15 +109,15 @@ void ksv::IO::makeSymlink (const KSVData& data, int runlevel, bool start, } } -QString ksv::IO::makeRelativePath (const QString& from, const QString& to) +TQString ksv::IO::makeRelativePath (const TQString& from, const TQString& to) { - if (QDir::isRelativePath(from) || QDir::isRelativePath(to)) - return QString::null; + if (TQDir::isRelativePath(from) || TQDir::isRelativePath(to)) + return TQString::null; int pos = 0; const int f_length = from.length(); - QStringList from_list; + TQStringList from_list; while (pos > -1) { const int old = pos + 1; @@ -137,7 +137,7 @@ QString ksv::IO::makeRelativePath (const QString& from, const QString& to) const int t_length = to.length(); - QStringList to_list; + TQStringList to_list; pos = 0; while (pos > -1) @@ -165,7 +165,7 @@ QString ksv::IO::makeRelativePath (const QString& from, const QString& to) && *from_list.at(lcp) == *to_list.at(lcp)) lcp++; - QString result; + TQString result; for (int i = f_c - lcp; i > 0; --i) result += "../"; @@ -175,11 +175,11 @@ QString ksv::IO::makeRelativePath (const QString& from, const QString& to) return result; } -bool ksv::IO::loadSavedConfiguration (QDataStream& s, - QValueList* start, - QValueList* stop) +bool ksv::IO::loadSavedConfiguration (TQDataStream& s, + TQValueList* start, + TQValueList* stop) { - QCString magic; + TQCString magic; s >> magic; if (magic != "KSysV") return false; @@ -190,18 +190,18 @@ bool ksv::IO::loadSavedConfiguration (QDataStream& s, if (version != 3) return false; // too old - QDateTime saveTime; + TQDateTime saveTime; s >> saveTime; for (int i = 0; i < ksv::runlevelNumber; ++i) { - QString rlMagic; - QString section; + TQString rlMagic; + TQString section; s >> rlMagic; s >> section; - if (rlMagic != QString::fromLatin1("RUNLEVEL %1").arg(i)) + if (rlMagic != TQString::fromLatin1("RUNLEVEL %1").arg(i)) return false; if (section != "START") @@ -232,25 +232,25 @@ bool ksv::IO::loadSavedConfiguration (QDataStream& s, return true; } -bool ksv::IO::saveConfiguration (QDataStream& s, +bool ksv::IO::saveConfiguration (TQDataStream& s, KSVDragList** start, KSVDragList** stop) { Q_INT32 version = 3; - s << QCString("KSysV") + s << TQCString("KSysV") << version - << QDateTime::currentDateTime(); // save date + << TQDateTime::currentDateTime(); // save date for (int i = 0; i < ksv::runlevelNumber; ++i) { Q_INT32 numberOfItems = start[i]->childCount(); - s << QString::fromLatin1 ("RUNLEVEL %1").arg (i) - << QString::fromLatin1 ("START") + s << TQString::fromLatin1 ("RUNLEVEL %1").arg (i) + << TQString::fromLatin1 ("START") << numberOfItems; - for (QListViewItemIterator it (start[i]); + for (TQListViewItemIterator it (start[i]); it.current(); ++it) { @@ -259,10 +259,10 @@ bool ksv::IO::saveConfiguration (QDataStream& s, numberOfItems = stop[i]->childCount(); - s << QString::fromLatin1 ("STOP") + s << TQString::fromLatin1 ("STOP") << numberOfItems; - for (QListViewItemIterator it (stop[i]); + for (TQListViewItemIterator it (stop[i]); it.current(); ++it) { @@ -273,19 +273,19 @@ bool ksv::IO::saveConfiguration (QDataStream& s, return true; } -KTrader::OfferList ksv::IO::servicesForFile (const QString& filename) +KTrader::OfferList ksv::IO::servicesForFile (const TQString& filename) { static KTrader* trader = KTrader::self(); static KMimeMagic* magic = KMimeMagic::self(); - const QString mimetype = magic->findFileType(filename)->mimeType(); + const TQString mimetype = magic->findFileType(filename)->mimeType(); return trader->query (mimetype, "Type == 'Application'"); } -KService::Ptr ksv::IO::preferredServiceForFile (const QString& filename) +KService::Ptr ksv::IO::preferredServiceForFile (const TQString& filename) { static KMimeMagic* magic = KMimeMagic::self(); - const QString mimetype = magic->findFileType(filename)->mimeType(); + const TQString mimetype = magic->findFileType(filename)->mimeType(); return KServiceTypeProfile::preferredService (mimetype, "Application"); } diff --git a/ksysv/IOCore.h b/ksysv/IOCore.h index 37ac4e5..f62611f 100644 --- a/ksysv/IOCore.h +++ b/ksysv/IOCore.h @@ -17,8 +17,8 @@ #ifndef KSV_IOCORE_H #define KSV_IOCORE_H -#include -#include +#include +#include #include #include @@ -34,28 +34,28 @@ namespace ksv { namespace IO { - void removeFile (const QFileInfo& info, QDir& dir, - QString& rich, QString& plain); + void removeFile (const TQFileInfo& info, TQDir& dir, + TQString& rich, TQString& plain); - QString relToAbs (const QString& dir, const QString& rel); + TQString relToAbs (const TQString& dir, const TQString& rel); void makeSymlink (const KSVData& data, int runlevel, bool start, - QString& rich, QString& plain); + TQString& rich, TQString& plain); - void dissectFilename (const QString& file, QString& name, int& nr); + void dissectFilename (const TQString& file, TQString& name, int& nr); - QString makeRelativePath (const QString& from, const QString& to); + TQString makeRelativePath (const TQString& from, const TQString& to); - bool saveConfiguration (QDataStream&, + bool saveConfiguration (TQDataStream&, KSVDragList** start, KSVDragList** stop); - bool loadSavedConfiguration (QDataStream&, - QValueList* start, - QValueList* stop); + bool loadSavedConfiguration (TQDataStream&, + TQValueList* start, + TQValueList* stop); - KTrader::OfferList servicesForFile (const QString& filename); - KService::Ptr preferredServiceForFile (const QString& filename); + KTrader::OfferList servicesForFile (const TQString& filename); + KService::Ptr preferredServiceForFile (const TQString& filename); } // namespace IO } // namespace ksv diff --git a/ksysv/OldView.cpp b/ksysv/OldView.cpp index 6e9f7d3..75572b9 100644 --- a/ksysv/OldView.cpp +++ b/ksysv/OldView.cpp @@ -22,24 +22,24 @@ #include #endif -#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 #include @@ -73,14 +73,14 @@ #include "TopWidget.h" KSVContent::KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* parent, const char* name) - : QSplitter (QSplitter::Vertical, parent, name), + : TQSplitter (TQSplitter::Vertical, parent, name), startRL (new KSVDragList*[ksv::runlevelNumber]), stopRL (new KSVDragList*[ksv::runlevelNumber]), conf(KSVConfig::self()), mScriptBox (0L), - mRunlevels (new QVBox*[ksv::runlevelNumber]), + mRunlevels (new TQVBox*[ksv::runlevelNumber]), mOrigin (0L), - mOpenWithMenu (openWithMenu), m_buffer( QCString() ) + mOpenWithMenu (openWithMenu), m_buffer( TQCString() ) { setOpaqueResize( KGlobalSettings::opaqueResize() ); @@ -93,7 +93,7 @@ KSVContent::KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* parent, const cha mScriptMenu->insertTitle (i18n ("Services Menu"), -1, 0); mScroller = new KScroller (this); - mContent = new QFrame(mScroller, "KSysV Real Content"); + mContent = new TQFrame(mScroller, "KSysV Real Content"); mScroller->setContent (mContent); @@ -102,12 +102,12 @@ KSVContent::KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* parent, const cha // watch services dir KDirWatch* dirwatch = KDirWatch::self(); dirwatch->addDir (conf->scriptPath ()); - connect (dirwatch, SIGNAL (dirty (const QString&)), - this, SLOT (updateServicesAfterChange (const QString&))); - connect (dirwatch, SIGNAL (created (const QString&)), - this, SLOT (updateServicesAfterChange (const QString&))); - connect (dirwatch, SIGNAL (deleted (const QString&)), - this, SLOT (updateServicesAfterChange (const QString&))); + connect (dirwatch, TQT_SIGNAL (dirty (const TQString&)), + this, TQT_SLOT (updateServicesAfterChange (const TQString&))); + connect (dirwatch, TQT_SIGNAL (created (const TQString&)), + this, TQT_SLOT (updateServicesAfterChange (const TQString&))); + connect (dirwatch, TQT_SIGNAL (deleted (const TQString&)), + this, TQT_SLOT (updateServicesAfterChange (const TQString&))); setSizes(KSVContent::panningFactorToSplitter (conf->panningFactor())); @@ -126,7 +126,7 @@ KSVContent::KSVContent (KPopupMenu* openWithMenu, KSVTopLevel* parent, const cha textDisplay->setStyleSheet (ksv::styleSheet()); // Open With... menu - connect (mOpenWithMenu, SIGNAL (activated (int)), this, SLOT (openWith (int))); + connect (mOpenWithMenu, TQT_SIGNAL (activated (int)), this, TQT_SLOT (openWith (int))); calcMinSize(); } @@ -143,7 +143,7 @@ KSVContent::~KSVContent() } -void KSVContent::updateServicesAfterChange (const QString& dir) +void KSVContent::updateServicesAfterChange (const TQString& dir) { if (!dir.startsWith(conf->scriptPath())) return; @@ -184,30 +184,30 @@ void KSVContent::updateRunlevelsAfterChange () void KSVContent::initLList() { - QHBoxLayout *lay = new QHBoxLayout( mContent, KDialog::marginHint(), KDialog::spacingHint() ); - mScriptBox = new QVBox (mContent); + TQHBoxLayout *lay = new TQHBoxLayout( mContent, KDialog::marginHint(), KDialog::spacingHint() ); + mScriptBox = new TQVBox (mContent); lay->addWidget(mScriptBox); mScriptBox->setSpacing (KDialog::spacingHint()); - QVBox* scriptLabelBox = new QVBox (mScriptBox); - QLabel* servL = new QLabel (i18n("&Available\n" \ + TQVBox* scriptLabelBox = new TQVBox (mScriptBox); + TQLabel* servL = new TQLabel (i18n("&Available\n" \ "Services"), scriptLabelBox); // provide quickhelp - QWhatsThis::add (scriptLabelBox, + TQWhatsThis::add (scriptLabelBox, i18n("

These are the services available on your computer. " \ "To start a service, drag it onto the Start " \ "section of a runlevel.

" \ "

To stop one, do the same for the Stop section.

")); - QFont bold_font = QFont(KGlobalSettings::generalFont()); + TQFont bold_font = TQFont(KGlobalSettings::generalFont()); bold_font.setBold(TRUE); servL->setFont(bold_font); scripts = new KServiceDragList (scriptLabelBox, "Scripts"); scripts->setAcceptDrops (false); - scripts->setColumnWidthMode (KSVItem::SortNumber, QListView::Manual); + scripts->setColumnWidthMode (KSVItem::SortNumber, TQListView::Manual); scripts->setColumnWidth(KSVItem::SortNumber,0); scripts->setSorting (KSVItem::ServiceName); scripts->header()->setResizeEnabled (false, 0); @@ -219,26 +219,26 @@ void KSVContent::initLList() servL->setBuddy(scripts); // doubleclick && return - connect (scripts, SIGNAL(executed(QListViewItem*)), - this, SLOT(slotScriptProperties(QListViewItem*))); - connect (scripts, SIGNAL (returnPressed (QListViewItem*)), - this, SLOT (slotScriptProperties (QListViewItem*))); + connect (scripts, TQT_SIGNAL(executed(TQListViewItem*)), + this, TQT_SLOT(slotScriptProperties(TQListViewItem*))); + connect (scripts, TQT_SIGNAL (returnPressed (TQListViewItem*)), + this, TQT_SLOT (slotScriptProperties (TQListViewItem*))); // context menus - connect (scripts, SIGNAL (contextMenu (KListView*, QListViewItem*, const QPoint&)), - this, SLOT (popupServicesMenu (KListView*, QListViewItem*, const QPoint&))); + connect (scripts, TQT_SIGNAL (contextMenu (KListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT (popupServicesMenu (KListView*, TQListViewItem*, const TQPoint&))); // for cut & copy - connect (scripts, SIGNAL (newOrigin ()), - this, SLOT (fwdOrigin ())); + connect (scripts, TQT_SIGNAL (newOrigin ()), + this, TQT_SLOT (fwdOrigin ())); // for origin updates - connect (scripts, SIGNAL (newOrigin (KSVDragList*)), - this, SLOT (fwdOrigin (KSVDragList*))); + connect (scripts, TQT_SIGNAL (newOrigin (KSVDragList*)), + this, TQT_SLOT (fwdOrigin (KSVDragList*))); trash = new KSVTrash(mScriptBox, "Trash"); - connect (trash, SIGNAL (undoAction (KSVAction*)), this, SLOT (fwdUndoAction (KSVAction*))); - QWhatsThis::add (trash, + connect (trash, TQT_SIGNAL (undoAction (KSVAction*)), this, TQT_SLOT (fwdUndoAction (KSVAction*))); + TQWhatsThis::add (trash, i18n ("

You can drag services from a runlevel onto " \ "the trashcan to " \ "delete them from that runlevel.

The Undo command "\ @@ -246,17 +246,17 @@ void KSVContent::initLList() for(int i = 0; i < ksv::runlevelNumber; ++i) { - mRunlevels[i] = new QVBox (mContent); + mRunlevels[i] = new TQVBox (mContent); lay->addWidget(mRunlevels[i]); mRunlevels[i]->setSpacing (KDialog::spacingHint()); - // create QString for label - QString _label (i18n("Runlevel &%1").arg(i)); + // create TQString for label + TQString _label (i18n("Runlevel &%1").arg(i)); // and for the name - QString _name (i18n("Runlevel %1").arg(i)); + TQString _name (i18n("Runlevel %1").arg(i)); - QVBox* startBox = new QVBox (mRunlevels[i]); - QWhatsThis::add (startBox, + TQVBox* startBox = new TQVBox (mRunlevels[i]); + TQWhatsThis::add (startBox, i18n("

These are the services started in runlevel %1.

" \ "

The number shown on the left of the icon " \ "determines the order in which the services are started. " \ @@ -264,17 +264,17 @@ void KSVContent::initLList() "sorting number can be generated.

If that's not possible, you have " \ "to change the number manually via the Properties dialog box.

").arg(i)); - QLabel* rlL = new QLabel(_label, startBox); - new QLabel(i18n("Start"), startBox); + TQLabel* rlL = new TQLabel(_label, startBox); + new TQLabel(i18n("Start"), startBox); rlL->setFont(bold_font); // create the "START" list: startRL[i] = new KSVDragList(startBox, (_name + " START").latin1()); startRL[i]->setDefaultIcon(SmallIcon("ksysv_start")); - QVBox* stopBox = new QVBox (mRunlevels[i]); - new QLabel(i18n("Stop"), stopBox); - QWhatsThis::add (stopBox, + TQVBox* stopBox = new TQVBox (mRunlevels[i]); + new TQLabel(i18n("Stop"), stopBox); + TQWhatsThis::add (stopBox, i18n("

These are the services stopped in runlevel %1.

" \ "

The number shown on the left of the icon " \ "determines the order in which the services are stopped. " \ @@ -290,64 +290,64 @@ void KSVContent::initLList() rlL->setBuddy(startRL[i]); // for cut'n'paste - connect (startRL[i], SIGNAL (newOrigin ()), - this, SLOT (fwdOrigin ())); - connect (startRL[i], SIGNAL (newOrigin (KSVDragList*)), - this, SLOT (fwdOrigin (KSVDragList*))); - - connect (stopRL[i], SIGNAL (newOrigin ()), - this, SLOT (fwdOrigin ())); - connect (stopRL[i], SIGNAL (newOrigin (KSVDragList*)), - this, SLOT (fwdOrigin (KSVDragList*))); + connect (startRL[i], TQT_SIGNAL (newOrigin ()), + this, TQT_SLOT (fwdOrigin ())); + connect (startRL[i], TQT_SIGNAL (newOrigin (KSVDragList*)), + this, TQT_SLOT (fwdOrigin (KSVDragList*))); + + connect (stopRL[i], TQT_SIGNAL (newOrigin ()), + this, TQT_SLOT (fwdOrigin ())); + connect (stopRL[i], TQT_SIGNAL (newOrigin (KSVDragList*)), + this, TQT_SLOT (fwdOrigin (KSVDragList*))); } lay->addStretch(1); - connect (scripts, SIGNAL(undoAction(KSVAction*)), - this, SLOT(fwdUndoAction(KSVAction*))); + connect (scripts, TQT_SIGNAL(undoAction(KSVAction*)), + this, TQT_SLOT(fwdUndoAction(KSVAction*))); // add text-diplay widget - textDisplay = new QTextEdit( QString::null, QString::null, this, "TextDisplayWidget" ); + textDisplay = new TQTextEdit( TQString::null, TQString::null, this, "TextDisplayWidget" ); textDisplay->setTextFormat( Qt::RichText ); textDisplay->setReadOnly( true ); for (int i = 0; i < ksv::runlevelNumber; ++i) { - connect (startRL[i], SIGNAL(newOrigin()), stopRL[i], SLOT(slotNewOrigin())); - connect (stopRL[i], SIGNAL(newOrigin()), startRL[i], SLOT(slotNewOrigin())); + connect (startRL[i], TQT_SIGNAL(newOrigin()), stopRL[i], TQT_SLOT(slotNewOrigin())); + connect (stopRL[i], TQT_SIGNAL(newOrigin()), startRL[i], TQT_SLOT(slotNewOrigin())); - connect (startRL[i], SIGNAL(undoAction(KSVAction*)), - this, SLOT(fwdUndoAction(KSVAction*))); - connect (stopRL[i], SIGNAL(undoAction(KSVAction*)), - this, SLOT(fwdUndoAction(KSVAction*))); + connect (startRL[i], TQT_SIGNAL(undoAction(KSVAction*)), + this, TQT_SLOT(fwdUndoAction(KSVAction*))); + connect (stopRL[i], TQT_SIGNAL(undoAction(KSVAction*)), + this, TQT_SLOT(fwdUndoAction(KSVAction*))); // doubleclick && return - connect (startRL[i], SIGNAL(executed(QListViewItem*)), - this, SLOT(slotDoubleClick(QListViewItem*))); - connect (stopRL[i], SIGNAL(executed(QListViewItem*)), - this, SLOT(slotDoubleClick(QListViewItem*))); - connect (startRL[i], SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(slotDoubleClick(QListViewItem*))); - connect (stopRL[i], SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(slotDoubleClick(QListViewItem*))); + connect (startRL[i], TQT_SIGNAL(executed(TQListViewItem*)), + this, TQT_SLOT(slotDoubleClick(TQListViewItem*))); + connect (stopRL[i], TQT_SIGNAL(executed(TQListViewItem*)), + this, TQT_SLOT(slotDoubleClick(TQListViewItem*))); + connect (startRL[i], TQT_SIGNAL(returnPressed(TQListViewItem*)), + this, TQT_SLOT(slotDoubleClick(TQListViewItem*))); + connect (stopRL[i], TQT_SIGNAL(returnPressed(TQListViewItem*)), + this, TQT_SLOT(slotDoubleClick(TQListViewItem*))); // context menus - connect (startRL[i], SIGNAL (contextMenu (KListView*, QListViewItem*, const QPoint&)), - this, SLOT (popupRunlevelMenu (KListView*, QListViewItem*, const QPoint&))); - connect (stopRL[i], SIGNAL (contextMenu (KListView*, QListViewItem*, const QPoint&)), - this, SLOT (popupRunlevelMenu (KListView*, QListViewItem*, const QPoint&))); + connect (startRL[i], TQT_SIGNAL (contextMenu (KListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT (popupRunlevelMenu (KListView*, TQListViewItem*, const TQPoint&))); + connect (stopRL[i], TQT_SIGNAL (contextMenu (KListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT (popupRunlevelMenu (KListView*, TQListViewItem*, const TQPoint&))); // cannot generate sorting number - connect (startRL[i], SIGNAL(cannotGenerateNumber()), - this, SLOT(fwdCannotGenerateNumber())); - connect (stopRL[i], SIGNAL(cannotGenerateNumber()), - this, SLOT(fwdCannotGenerateNumber())); + connect (startRL[i], TQT_SIGNAL(cannotGenerateNumber()), + this, TQT_SLOT(fwdCannotGenerateNumber())); + connect (stopRL[i], TQT_SIGNAL(cannotGenerateNumber()), + this, TQT_SLOT(fwdCannotGenerateNumber())); // connecting origin things for "Scripts", too - connect (scripts, SIGNAL(newOrigin()), startRL[i], SLOT(slotNewOrigin())); - connect (scripts, SIGNAL(newOrigin()), stopRL[i], SLOT(slotNewOrigin())); - connect (startRL[i], SIGNAL(newOrigin()), scripts, SLOT(slotNewOrigin())); - connect (stopRL[i], SIGNAL(newOrigin()), scripts, SLOT(slotNewOrigin())); + connect (scripts, TQT_SIGNAL(newOrigin()), startRL[i], TQT_SLOT(slotNewOrigin())); + connect (scripts, TQT_SIGNAL(newOrigin()), stopRL[i], TQT_SLOT(slotNewOrigin())); + connect (startRL[i], TQT_SIGNAL(newOrigin()), scripts, TQT_SLOT(slotNewOrigin())); + connect (stopRL[i], TQT_SIGNAL(newOrigin()), scripts, TQT_SLOT(slotNewOrigin())); // use this loop for setting tooltips startRL[i]->setToolTip (i18n("Drag here to start services\n" \ @@ -359,11 +359,11 @@ void KSVContent::initLList() { if (i != j) { - connect (startRL[i], SIGNAL (newOrigin()), startRL[j], SLOT (slotNewOrigin())); - connect (stopRL[i], SIGNAL (newOrigin()), stopRL[j], SLOT (slotNewOrigin())); + connect (startRL[i], TQT_SIGNAL (newOrigin()), startRL[j], TQT_SLOT (slotNewOrigin())); + connect (stopRL[i], TQT_SIGNAL (newOrigin()), stopRL[j], TQT_SLOT (slotNewOrigin())); - connect (startRL[i], SIGNAL(newOrigin()), stopRL[j], SLOT(slotNewOrigin())); - connect (stopRL[i], SIGNAL(newOrigin()), startRL[j], SLOT(slotNewOrigin())); + connect (startRL[i], TQT_SIGNAL(newOrigin()), stopRL[j], TQT_SLOT(slotNewOrigin())); + connect (stopRL[i], TQT_SIGNAL(newOrigin()), startRL[j], TQT_SLOT(slotNewOrigin())); } } } @@ -375,14 +375,14 @@ void KSVContent::fwdUndoAction (KSVAction* a) } void KSVContent::initScripts() { - QDir scriptDir = QDir(conf->scriptPath()); + TQDir scriptDir = TQDir(conf->scriptPath()); if (!scriptDir.exists()) return; - scriptDir.setFilter (QDir::Files | QDir::Hidden | - QDir::NoSymLinks | QDir::Executable); + scriptDir.setFilter (TQDir::Files | TQDir::Hidden | + TQDir::NoSymLinks | TQDir::Executable); - scriptDir.setSorting (QDir::Name); + scriptDir.setSorting (TQDir::Name); // const QFileInfoList *scriptList = scriptDir.entryInfoList(); QFileInfoListIterator it (*scriptDir.entryInfoList()); @@ -394,7 +394,7 @@ void KSVContent::initScripts() { scripts->setEnabled(false); scripts->clear(); - QFileInfo* fi; QString name; + TQFileInfo* fi; TQString name; while ((fi = it.current())) { name = fi->fileName(); @@ -422,18 +422,18 @@ void KSVContent::initRunlevels() startRL[i]->clear(); stopRL[i]->clear(); - const QString _path = conf->runlevelPath() + QString("/rc%1.d").arg(i); + const TQString _path = conf->runlevelPath() + TQString("/rc%1.d").arg(i); - if (!QDir(_path).exists()) + if (!TQDir(_path).exists()) continue; - QDir d = QDir(_path); - d.setFilter( QDir::Files ); - d.setSorting( QDir::Name ); + TQDir d = TQDir(_path); + d.setFilter( TQDir::Files ); + d.setSorting( TQDir::Name ); const QFileInfoList *rlList = d.entryInfoList(); QFileInfoListIterator it( *rlList ); // create list iterator - QFileInfo* fi; // pointer for traversing + TQFileInfo* fi; // pointer for traversing while ( (fi=it.current()) ) { // for each file... @@ -446,19 +446,19 @@ void KSVContent::initRunlevels() } } -void KSVContent::info2Widget( QFileInfo* info, int index ) +void KSVContent::info2Widget( TQFileInfo* info, int index ) { if (!info->exists()) return; - QString f_name = info->fileName(); + TQString f_name = info->fileName(); - QFileInfo link_info = QFileInfo(info->readLink()); - QString l_base = link_info.fileName(); + TQFileInfo link_info = TQFileInfo(info->readLink()); + TQString l_base = link_info.fileName(); - QString l_path = ksv::IO::relToAbs(conf->scriptPath(), link_info.dirPath(FALSE)); + TQString l_path = ksv::IO::relToAbs(conf->scriptPath(), link_info.dirPath(FALSE)); - QString name; + TQString name; int number; ksv::IO::dissectFilename( f_name, name, number ); @@ -483,7 +483,7 @@ void KSVContent::slotWriteSysV() // process "Start" KSVItem* item = 0L; - for (QListViewItemIterator it (startRL[i]); + for (TQListViewItemIterator it (startRL[i]); (item = static_cast (it.current())); ++it) { @@ -492,7 +492,7 @@ void KSVContent::slotWriteSysV() } // process "Stop" - for (QListViewItemIterator it (stopRL[i]); + for (TQListViewItemIterator it (stopRL[i]); (item = static_cast (it.current())); ++it) { @@ -507,7 +507,7 @@ void KSVContent::slotWriteSysV() } void KSVContent::writeToDisk(const KSVData& _w, int _rl, bool _start) { - QString rich, plain; + TQString rich, plain; ksv::IO::makeSymlink (_w, _rl, _start, rich, plain); appendLog(rich, plain); } @@ -525,13 +525,13 @@ void KSVContent::repaintRunlevels () void KSVContent::clearRL(int _rl) { - QString path = conf->runlevelPath() + QString("/rc%1.d").arg(_rl); + TQString path = conf->runlevelPath() + TQString("/rc%1.d").arg(_rl); - QDir dir (path); + TQDir dir (path); KSVData* d = 0L; - for (QPtrListIterator it (startRL[_rl]->getDeletedItems()); + for (TQPtrListIterator it (startRL[_rl]->getDeletedItems()); (d = it.current()); ++it) { @@ -539,9 +539,9 @@ void KSVContent::clearRL(int _rl) if (d->newEntry() && d->originalRunlevel() != startRL[_rl]->name()) break; - QFileInfo file (path + QString("/S%1%2").arg(d->numberString()).arg(d->label())); + TQFileInfo file (path + TQString("/S%1%2").arg(d->numberString()).arg(d->label())); - QString rich, plain; + TQString rich, plain; ksv::IO::removeFile (file, dir, rich, plain); appendLog(rich, plain); } @@ -549,7 +549,7 @@ void KSVContent::clearRL(int _rl) // keep GUI alive qApp->processEvents(); - for (QPtrListIterator it (stopRL[_rl]->getDeletedItems()); + for (TQPtrListIterator it (stopRL[_rl]->getDeletedItems()); (d = it.current()); ++it) { @@ -557,9 +557,9 @@ void KSVContent::clearRL(int _rl) if (d->newEntry() && d->originalRunlevel() != stopRL[_rl]->name()) break; - QFileInfo file (path + QString("/K%1%2").arg(d->numberString()).arg(d->label())); + TQFileInfo file (path + TQString("/K%1%2").arg(d->numberString()).arg(d->label())); - QString rich, plain; + TQString rich, plain; ksv::IO::removeFile (file, dir, rich, plain); appendLog(rich, plain); } @@ -574,18 +574,18 @@ void KSVContent::infoOnData (KSVItem* item) KSVData newState = oldState; KSVEntryPropertiesDialog* props = new KSVEntryPropertiesDialog (newState, kapp->mainWidget()); - connect (props, SIGNAL (editService (const QString&)), - this, SLOT (editService (const QString&))); - connect (props, SIGNAL (startService (const QString&)), - this, SLOT (startService (const QString&))); - connect (props, SIGNAL (stopService (const QString&)), - this, SLOT (stopService (const QString&))); - connect (props, SIGNAL (restartService (const QString&)), - this, SLOT (restartService (const QString&))); + connect (props, TQT_SIGNAL (editService (const TQString&)), + this, TQT_SLOT (editService (const TQString&))); + connect (props, TQT_SIGNAL (startService (const TQString&)), + this, TQT_SLOT (startService (const TQString&))); + connect (props, TQT_SIGNAL (stopService (const TQString&)), + this, TQT_SLOT (stopService (const TQString&))); + connect (props, TQT_SIGNAL (restartService (const TQString&)), + this, TQT_SLOT (restartService (const TQString&))); int res = props->exec(); - if (res == QDialog::Accepted + if (res == TQDialog::Accepted && !(oldState == newState && oldState.number() == newState.number())) { item->copy (newState); @@ -601,16 +601,16 @@ void KSVContent::stopService () KSVContent::stopService (getOrigin()->currentItem()->filenameAndPath()); } -void KSVContent::stopService (const QString& path) +void KSVContent::stopService (const TQString& path) { KProcess *_proc = new KProcess(); _proc->clearArguments(); *_proc << path << "stop"; - connect(_proc, SIGNAL(processExited(KProcess*)), this, SLOT(slotExitedProcess(KProcess*))); - connect(_proc, SIGNAL(receivedStdout(KProcess*, char*, int)), this, SLOT(slotOutputOrError(KProcess*, char*, int))); - connect(_proc, SIGNAL(receivedStderr(KProcess*, char*, int)), this, SLOT(slotOutputOrError(KProcess*, char*, int))); + connect(_proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotExitedProcess(KProcess*))); + connect(_proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int))); + connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int))); // refresh textDisplay appendLog(i18n("** Stopping %1 **
").arg(path), @@ -627,16 +627,16 @@ void KSVContent::startService () KSVContent::startService (getOrigin()->currentItem()->filenameAndPath()); } -void KSVContent::startService (const QString& path) +void KSVContent::startService (const TQString& path) { KProcess* _proc = new KProcess(); _proc->clearArguments(); *_proc << path << "start"; - connect(_proc, SIGNAL(processExited(KProcess*)), this, SLOT(slotExitedProcess(KProcess*))); - connect(_proc, SIGNAL(receivedStdout(KProcess*, char*, int)), this, SLOT(slotOutputOrError(KProcess*, char*, int))); - connect(_proc, SIGNAL(receivedStderr(KProcess*, char*, int)), this, SLOT(slotOutputOrError(KProcess*, char*, int))); + connect(_proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotExitedProcess(KProcess*))); + connect(_proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int))); + connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int))); // refresh textDisplay appendLog(i18n("** Starting %1 **
").arg(path), @@ -653,7 +653,7 @@ void KSVContent::editService() editService (getOrigin()->currentItem()->filenameAndPath()); } -void KSVContent::editService (const QString& path) +void KSVContent::editService (const TQString& path) { // unfortunately KRun::run() only takes an URL-list instead of a single // URL as an argument. @@ -666,7 +666,7 @@ void KSVContent::restartService () KSVContent::restartService (getOrigin()->currentItem()->filenameAndPath()); } -void KSVContent::restartService (const QString& path) +void KSVContent::restartService (const TQString& path) { // restarting KProcess *_proc = new KProcess(); @@ -674,9 +674,9 @@ void KSVContent::restartService (const QString& path) *_proc << path << "restart"; - connect(_proc, SIGNAL(processExited(KProcess*)), this, SLOT(slotExitDuringRestart(KProcess*))); - connect(_proc, SIGNAL(receivedStdout(KProcess*, char*, int)), this, SLOT(slotOutputOrError(KProcess*, char*, int))); - connect(_proc, SIGNAL(receivedStderr(KProcess*, char*, int)), this, SLOT(slotOutputOrError(KProcess*, char*, int))); + connect(_proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotExitDuringRestart(KProcess*))); + connect(_proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int))); + connect(_proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int))); // refresh textDisplay appendLog(i18n("** Re-starting %1 **
").arg(path), @@ -690,7 +690,7 @@ void KSVContent::restartService (const QString& path) void KSVContent::slotOutputOrError( KProcess*, char* _buffer, int _buflen) { if (_buflen > 0) { - m_buffer += QCString( _buffer, _buflen + 1 ); + m_buffer += TQCString( _buffer, _buflen + 1 ); appendLog( m_buffer ); } } @@ -707,23 +707,23 @@ void KSVContent::slotScriptsNotRemovable() emit sigNotRemovable(); } -void KSVContent::slotDoubleClick (QListViewItem* item) { +void KSVContent::slotDoubleClick (TQListViewItem* item) { infoOnData(static_cast(item)); } -void KSVContent::slotScriptProperties(QListViewItem* item) +void KSVContent::slotScriptProperties(TQListViewItem* item) { KSVServicePropertiesDialog* prop = new KSVServicePropertiesDialog (*static_cast (item)->data(), kapp->mainWidget()); - connect (prop, SIGNAL (editService (const QString&)), - this, SLOT (editService (const QString&))); - connect (prop, SIGNAL (startService (const QString&)), - this, SLOT (startService (const QString&))); - connect (prop, SIGNAL (stopService (const QString&)), - this, SLOT (stopService (const QString&))); - connect (prop, SIGNAL (restartService (const QString&)), - this, SLOT (restartService (const QString&))); + connect (prop, TQT_SIGNAL (editService (const TQString&)), + this, TQT_SLOT (editService (const TQString&))); + connect (prop, TQT_SIGNAL (startService (const TQString&)), + this, TQT_SLOT (startService (const TQString&))); + connect (prop, TQT_SIGNAL (stopService (const TQString&)), + this, TQT_SLOT (stopService (const TQString&))); + connect (prop, TQT_SIGNAL (restartService (const TQString&)), + this, TQT_SLOT (restartService (const TQString&))); prop->exec(); @@ -737,9 +737,9 @@ void KSVContent::slotExitDuringRestart( KProcess* proc ) // signals connected that screw up our output proc->clearArguments(); - connect(proc, SIGNAL(processExited(KProcess*)), this, SLOT(slotExitedProcess(KProcess*))); - connect(proc, SIGNAL(receivedStdout(KProcess*, char*, int)), this, SLOT(slotOutputOrError(KProcess*, char*, int))); - connect(proc, SIGNAL(receivedStderr(KProcess*, char*, int)), this, SLOT(slotOutputOrError(KProcess*, char*, int))); + connect(proc, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotExitedProcess(KProcess*))); + connect(proc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int))); + connect(proc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotOutputOrError(KProcess*, char*, int))); proc->start(KProcess::NotifyOnExit, KProcess::AllOutput); } @@ -765,7 +765,7 @@ void KSVContent::setDisplayScriptOutput(bool val) calcMinSize(); } -int KSVContent::splitterToPanningFactor (const QValueList& list) +int KSVContent::splitterToPanningFactor (const TQValueList& list) { const int cont_size = *list.at(0); const int log_size = *list.at(1); @@ -773,9 +773,9 @@ int KSVContent::splitterToPanningFactor (const QValueList& list) return cont_size * 100 / (cont_size + log_size); } -const QValueList& KSVContent::panningFactorToSplitter (int panningFactor) +const TQValueList& KSVContent::panningFactorToSplitter (int panningFactor) { - static QValueList res; + static TQValueList res; res.clear(); res << panningFactor << 100 - panningFactor; @@ -783,7 +783,7 @@ const QValueList& KSVContent::panningFactorToSplitter (int panningFactor) return res; } -void KSVContent::appendLog (const QString& rich, const QString& plain) +void KSVContent::appendLog (const TQString& rich, const TQString& plain) { static bool changed = false; @@ -798,21 +798,21 @@ void KSVContent::appendLog (const QString& rich, const QString& plain) textDisplay->append (rich); } -void KSVContent::appendLog(const QCString& _buffer) +void KSVContent::appendLog(const TQCString& _buffer) { - QStringList _lines = QStringList::split( "\n", QString::fromLocal8Bit( _buffer ) ); - for ( QStringList::Iterator it = _lines.begin(); it != _lines.end(); ++it ) + TQStringList _lines = TQStringList::split( "\n", TQString::fromLocal8Bit( _buffer ) ); + for ( TQStringList::Iterator it = _lines.begin(); it != _lines.end(); ++it ) appendLog( *it, *it ); - m_buffer = QCString(); + m_buffer = TQCString(); } -const QString& KSVContent::log () const +const TQString& KSVContent::log () const { return mLogText; } -const QString& KSVContent::xmlLog () const +const TQString& KSVContent::xmlLog () const { return mXMLLogText; } @@ -836,11 +836,11 @@ void KSVContent::fwdOrigin (KSVDragList* list) mOrigin = list; } -void KSVContent::showEvent (QShowEvent* e) +void KSVContent::showEvent (TQShowEvent* e) { calcMinSize(); - QSplitter::showEvent (e); + TQSplitter::showEvent (e); } void KSVContent::reSortRL() @@ -868,22 +868,22 @@ void KSVContent::pasteAppend() } } -void KSVContent::resizeEvent (QResizeEvent* e) +void KSVContent::resizeEvent (TQResizeEvent* e) { updatePanningFactor(); - QSplitter::resizeEvent (e); + TQSplitter::resizeEvent (e); } -void KSVContent::moveEvent (QMoveEvent* e) +void KSVContent::moveEvent (TQMoveEvent* e) { - QSplitter::moveEvent (e); + TQSplitter::moveEvent (e); } -void KSVContent::setColors (const QColor& newNormal, - const QColor& newSelected, - const QColor& changedNormal, - const QColor& changedSelected) +void KSVContent::setColors (const TQColor& newNormal, + const TQColor& newSelected, + const TQColor& changedNormal, + const TQColor& changedSelected) { for (int i = 0; i < ksv::runlevelNumber; ++i) { @@ -903,7 +903,7 @@ void KSVContent::setColors (const QColor& newNormal, void KSVContent::multiplexEnabled (bool val) { - QListView* list = getOrigin(); + TQListView* list = getOrigin(); if (list) @@ -928,7 +928,7 @@ void KSVContent::multiplexEnabled (bool val) emit newOrigin (); KSVConfig *config = KSVConfig::self(); - QFileInfo *file = new QFileInfo( config->scriptPath() ); + TQFileInfo *file = new TQFileInfo( config->scriptPath() ); if ( !file->exists() ) { @@ -994,7 +994,7 @@ void KSVContent::showRunlevel (int index) calcMinSize(); } -void KSVContent::popupRunlevelMenu (KListView* list, QListViewItem* i, const QPoint& p) +void KSVContent::popupRunlevelMenu (KListView* list, TQListViewItem* i, const TQPoint& p) { if (i) mItemMenu->exec (p, 1); @@ -1005,7 +1005,7 @@ void KSVContent::popupRunlevelMenu (KListView* list, QListViewItem* i, const QPo } } -void KSVContent::popupServicesMenu (KListView*, QListViewItem* i, const QPoint& p) +void KSVContent::popupServicesMenu (KListView*, TQListViewItem* i, const TQPoint& p) { if (i) { @@ -1026,7 +1026,7 @@ void KSVContent::popupServicesMenu (KListView*, QListViewItem* i, const QPoint& if (i >= 1) mOpenWithMenu->insertSeparator(); - mOpenWithMenu->insertItem (i18n ("&Other..."), this, SLOT (openWith())); + mOpenWithMenu->insertItem (i18n ("&Other..."), this, TQT_SLOT (openWith())); mScriptMenu->exec (p, 1); } @@ -1080,8 +1080,8 @@ void KSVContent::calcMinSize () mContent->layout()->setEnabled(true); } -void KSVContent::mergeLoadedPackage (QValueList* start, - QValueList* stop) +void KSVContent::mergeLoadedPackage (TQValueList* start, + TQValueList* stop) { for (int i = 0; i < ksv::runlevelNumber; ++i) { @@ -1090,12 +1090,12 @@ void KSVContent::mergeLoadedPackage (QValueList* start, } } -void KSVContent::merge (QValueList& list, KSVDragList* widget) +void KSVContent::merge (TQValueList& list, KSVDragList* widget) { - typedef QMap LoadMap; + typedef TQMap LoadMap; LoadMap loaded; - for (QValueListIterator it = list.begin(); + for (TQValueListIterator it = list.begin(); it != list.end(); ++it) { @@ -1126,10 +1126,10 @@ void KSVContent::merge (QValueList& list, KSVDragList* widget) kapp->processEvents (); } - QPtrList deleteList; + TQPtrList deleteList; deleteList.setAutoDelete (true); - for (QListViewItemIterator it (widget); it.current(); ++it) + for (TQListViewItemIterator it (widget); it.current(); ++it) { KSVItem* item = static_cast (it.current()); diff --git a/ksysv/OldView.h b/ksysv/OldView.h index 8a6899e..4e2c668 100644 --- a/ksysv/OldView.h +++ b/ksysv/OldView.h @@ -15,9 +15,9 @@ #ifndef KSV_VIEW_H #define KSV_VIEW_H -#include -#include -#include +#include +#include +#include #include @@ -54,51 +54,51 @@ public: KSVDragList* getOrigin(); - const QString& log() const; - const QString& xmlLog() const; + const TQString& log() const; + const TQString& xmlLog() const; - void setColors (const QColor& newNormal, - const QColor& newSelected, - const QColor& changedNormal, - const QColor& changedSelected); + void setColors (const TQColor& newNormal, + const TQColor& newSelected, + const TQColor& changedNormal, + const TQColor& changedSelected); - void mergeLoadedPackage (QValueList* start, - QValueList* stop); + void mergeLoadedPackage (TQValueList* start, + TQValueList* stop); public slots: void slotWriteSysV(); void infoOnData(KSVItem* data); void setDisplayScriptOutput(bool val); - void slotScriptProperties (QListViewItem*); + void slotScriptProperties (TQListViewItem*); void multiplexEnabled (bool); void hideRunlevel (int index); void showRunlevel (int index); protected: - virtual void resizeEvent (QResizeEvent* e); - virtual void moveEvent (QMoveEvent* e); - virtual void showEvent (QShowEvent*); + virtual void resizeEvent (TQResizeEvent* e); + virtual void moveEvent (TQMoveEvent* e); + virtual void showEvent (TQShowEvent*); private slots: void calcMinSize (); void fwdOrigin (KSVDragList*); void startService(); - void startService (const QString& path); + void startService (const TQString& path); void stopService(); - void stopService (const QString& path); + void stopService (const TQString& path); void restartService(); - void restartService (const QString& path); + void restartService (const TQString& path); void editService(); - void editService (const QString& path); + void editService (const TQString& path); void slotOutputOrError( KProcess* _p, char* _buffer, int _buflen ); void slotExitedProcess(KProcess* proc); void slotScriptsNotRemovable(); - void slotDoubleClick (QListViewItem*); + void slotDoubleClick (TQListViewItem*); void slotExitDuringRestart(KProcess* proc); - void appendLog(const QString& rich, const QString& plain); - void appendLog(const QCString& _buffer); + void appendLog(const TQString& rich, const TQString& plain); + void appendLog(const TQCString& _buffer); void fwdCannotGenerateNumber(); void fwdOrigin(); void reSortRL(); @@ -106,10 +106,10 @@ private slots: void fwdUndoAction(KSVAction*); void updatePanningFactor(); - void popupRunlevelMenu (KListView*, QListViewItem*, const QPoint&); - void popupServicesMenu (KListView*, QListViewItem*, const QPoint&); + void popupRunlevelMenu (KListView*, TQListViewItem*, const TQPoint&); + void popupServicesMenu (KListView*, TQListViewItem*, const TQPoint&); - void updateServicesAfterChange (const QString&); + void updateServicesAfterChange (const TQString&); void updateRunlevelsAfterChange (); void repaintRunlevels (); @@ -119,7 +119,7 @@ private slots: signals: void sigUpdateParent(); - void sigRun (const QString&); + void sigRun (const TQString&); void sigStop(); void sigNotRemovable(); void cannotGenerateNumber(); @@ -133,20 +133,20 @@ signals: void newOrigin(); private: - static int splitterToPanningFactor (const QValueList&); - static const QValueList& panningFactorToSplitter (int); + static int splitterToPanningFactor (const TQValueList&); + static const TQValueList& panningFactorToSplitter (int); - void merge (QValueList& list, KSVDragList* widget); + void merge (TQValueList& list, KSVDragList* widget); void initLList(); void initScripts(); void initRunlevels(); - void info2Widget (QFileInfo* info, int index); + void info2Widget (TQFileInfo* info, int index); void writeToDisk (const KSVData& _w, int _rl, bool _start); void clearRL( int _rl ); friend class KSVTopLevel; - QFrame* mContent; + TQFrame* mContent; KScroller* mScroller; KSVDragList** startRL; @@ -157,23 +157,23 @@ private: KPopupMenu* mContextMenu; KPopupMenu* mScriptMenu; KSVTrash* trash; - QTextEdit* textDisplay; + TQTextEdit* textDisplay; KSVConfig* conf; - QVBox* mScriptBox; - QVBox** mRunlevels; - QWidget* mBuffer; + TQVBox* mScriptBox; + TQVBox** mRunlevels; + TQWidget* mBuffer; KSVDragList* mOrigin; - QString mLogText, mXMLLogText; + TQString mLogText, mXMLLogText; - QSize mMinSize; + TQSize mMinSize; KPopupMenu* mOpenWithMenu; KTrader::OfferList mOpenWithOffers; - QCString m_buffer; + TQCString m_buffer; }; #endif diff --git a/ksysv/PreferencesDialog.cpp b/ksysv/PreferencesDialog.cpp index b0a2c42..b2ad038 100644 --- a/ksysv/PreferencesDialog.cpp +++ b/ksysv/PreferencesDialog.cpp @@ -1,14 +1,14 @@ // (c) 2000 Peter Putzer -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -28,7 +28,7 @@ #include "PreferencesDialog.h" -KSVPreferences::KSVPreferences (QWidget* parent) +KSVPreferences::KSVPreferences (TQWidget* parent) : KDialogBase (IconList, i18n("Configure"), Help|Ok|Apply|Cancel, Ok, parent, "KSysV Preferences", true, true), mConfig (KSVConfig::self()) @@ -38,53 +38,53 @@ KSVPreferences::KSVPreferences (QWidget* parent) /** * Look & Feel Page */ - QFrame* lafPage = addPage (i18n ("Look & Feel"), QString::null, DesktopIcon ("colorize", 32)); + TQFrame* lafPage = addPage (i18n ("Look & Feel"), TQString::null, DesktopIcon ("colorize", 32)); mLookAndFeel = new KSVLookAndFeel (lafPage); - connect( mLookAndFeel, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) ); + connect( mLookAndFeel, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); - QVBoxLayout* lafLayout = new QVBoxLayout (lafPage); + TQVBoxLayout* lafLayout = new TQVBoxLayout (lafPage); lafLayout->addWidget (mLookAndFeel); // /** // * Colors Page // */ -// QFrame* colorPage = addPage (i18n("Colors"), QString::null, DesktopIcon ("colorize", 32)); +// TQFrame* colorPage = addPage (i18n("Colors"), TQString::null, DesktopIcon ("colorize", 32)); // mColorConfig = new KSVColorConfig(colorPage); -// QVBoxLayout* colorLayout = new QVBoxLayout(colorPage); +// TQVBoxLayout* colorLayout = new TQVBoxLayout(colorPage); // colorLayout->addWidget(mColorConfig); // /** // * Fonts Page // */ -// QFrame* fontPage = addPage (i18n("Fonts"), QString::null, DesktopIcon ("fonts", 32)); +// TQFrame* fontPage = addPage (i18n("Fonts"), TQString::null, DesktopIcon ("fonts", 32)); // mFontConfig = new KSVFontConfig(fontPage); -// QVBoxLayout* fontLayout = new QVBoxLayout (fontPage); +// TQVBoxLayout* fontLayout = new TQVBoxLayout (fontPage); // fontLayout->addWidget(mFontConfig); /** * Paths Page */ - QFrame* pathPage = addPage (i18n ("Paths"), QString::null, DesktopIcon ("kfm", 32)); + TQFrame* pathPage = addPage (i18n ("Paths"), TQString::null, DesktopIcon ("kfm", 32)); mPathConfig = new KSVPathConfig(pathPage); - connect( mPathConfig, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) ); + connect( mPathConfig, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); - QVBoxLayout *pathLayout = new QVBoxLayout (pathPage); + TQVBoxLayout *pathLayout = new TQVBoxLayout (pathPage); pathLayout->addWidget (mPathConfig); /** * Miscellaneous Page */ - QFrame* miscPage = addPage (i18n ("Miscellaneous"), i18n("Settings Not Fitting Anywhere Else"), + TQFrame* miscPage = addPage (i18n ("Miscellaneous"), i18n("Settings Not Fitting Anywhere Else"), DesktopIcon ("misc", 32)); mMiscConfig = new KSVMiscConfig(miscPage); - connect( mMiscConfig, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) ); + connect( mMiscConfig, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); - QVBoxLayout *miscLayout = new QVBoxLayout (miscPage); + TQVBoxLayout *miscLayout = new TQVBoxLayout (miscPage); miscLayout->addWidget (mMiscConfig); - connect (mMiscConfig->mShowAll, SIGNAL (clicked()), this, SLOT (showAllMessages())); + connect (mMiscConfig->mShowAll, TQT_SIGNAL (clicked()), this, TQT_SLOT (showAllMessages())); reReadConfig(); enableButton( Apply, false ); @@ -138,7 +138,7 @@ bool KSVPreferences::checkPaths () { bool result = true; - if (!QDir(mPathConfig->mServicesPath->text()).exists()) + if (!TQDir(mPathConfig->mServicesPath->text()).exists()) result = (KMessageBox::warningContinueCancel(this, i18n ("The service folder you specified does " "not exist.\n" @@ -148,7 +148,7 @@ bool KSVPreferences::checkPaths () i18n ("Warning")) != KMessageBox::Cancel); - if (!QDir(mPathConfig->mRunlevelPath->text()).exists()) + if (!TQDir(mPathConfig->mRunlevelPath->text()).exists()) result = result && (KMessageBox::warningContinueCancel(this, i18n ("The runlevel folder you specified does " @@ -171,22 +171,22 @@ void KSVPreferences::slotOk () } } -QColor KSVPreferences::newNormal() const +TQColor KSVPreferences::newNormal() const { return mLookAndFeel->mNewNormal->color(); } -QColor KSVPreferences::newSelected() const +TQColor KSVPreferences::newSelected() const { return mLookAndFeel->mNewSelected->color(); } -QColor KSVPreferences::changedNormal() const +TQColor KSVPreferences::changedNormal() const { return mLookAndFeel->mChangedNormal->color(); } -QColor KSVPreferences::changedSelected() const +TQColor KSVPreferences::changedSelected() const { return mLookAndFeel->mChangedSelected->color(); } @@ -203,7 +203,7 @@ void KSVPreferences::setConfig () { // if necessary, update service path { - QString sp = mPathConfig->mServicesPath->text(); + TQString sp = mPathConfig->mServicesPath->text(); if (sp != mConfig->scriptPath()) { mConfig->setScriptPath (sp); @@ -214,7 +214,7 @@ void KSVPreferences::setConfig () // if necesssary, update root path for runlevels { - QString rp = mPathConfig->mRunlevelPath->text(); + TQString rp = mPathConfig->mRunlevelPath->text(); if (rp != mConfig->runlevelPath ()) { mConfig->setRunlevelPath (rp); @@ -233,10 +233,10 @@ void KSVPreferences::setConfig () // if necessary, update colors { - QColor nn = newNormal(); - QColor ns = newSelected(); - QColor cn = changedNormal(); - QColor cs = changedSelected(); + TQColor nn = newNormal(); + TQColor ns = newSelected(); + TQColor cn = changedNormal(); + TQColor cs = changedSelected(); if (nn != mConfig->newNormalColor() || ns != mConfig->newSelectedColor() || @@ -254,8 +254,8 @@ void KSVPreferences::setConfig () // if necessary, update fonts { - const QFont& sf = mLookAndFeel->serviceFont(); - const QFont& ns = mLookAndFeel->numberFont(); + const TQFont& sf = mLookAndFeel->serviceFont(); + const TQFont& ns = mLookAndFeel->numberFont(); if (sf != mConfig->serviceFont() || ns != mConfig->numberFont()) { @@ -281,7 +281,7 @@ void KSVPreferences::reReadMessages() mMiscConfig->mWarnSortingNumber->setChecked (mConfig->showMessage (ksv::CouldNotGenerateSortingNumber)); } -void KSVPreferences::showEvent (QShowEvent* e) +void KSVPreferences::showEvent (TQShowEvent* e) { reReadMessages(); diff --git a/ksysv/PreferencesDialog.h b/ksysv/PreferencesDialog.h index ba7d938..1615355 100644 --- a/ksysv/PreferencesDialog.h +++ b/ksysv/PreferencesDialog.h @@ -3,7 +3,7 @@ #ifndef PREFERENCES_DIALOG_H #define PREFERENCES_DIALOG_H -#include +#include #include class QPushButton; @@ -22,16 +22,16 @@ public: static KSVPreferences* self (); virtual ~KSVPreferences (); - QColor newNormal () const; - QColor newSelected () const; - QColor changedNormal () const; - QColor changedSelected () const; + TQColor newNormal () const; + TQColor newSelected () const; + TQColor changedNormal () const; + TQColor changedSelected () const; - QString runlevelPath () const; - QString scriptPath () const; + TQString runlevelPath () const; + TQString scriptPath () const; protected: - virtual void showEvent (QShowEvent* e); + virtual void showEvent (TQShowEvent* e); signals: void updateColors (); @@ -52,7 +52,7 @@ private slots: private: friend class KSVTopLevel; - KSVPreferences (QWidget* parent); + KSVPreferences (TQWidget* parent); void setConfig (); bool checkPaths(); void reReadMessages(); diff --git a/ksysv/Properties.cpp b/ksysv/Properties.cpp index 7379b74..62f4a65 100644 --- a/ksysv/Properties.cpp +++ b/ksysv/Properties.cpp @@ -1,13 +1,13 @@ // (c) 2000 Peter Putzer -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -21,7 +21,7 @@ #include "Data.h" #include "Properties.h" -KSVServicePropertiesDialog::KSVServicePropertiesDialog (KSVData& data, QWidget* parent) +KSVServicePropertiesDialog::KSVServicePropertiesDialog (KSVData& data, TQWidget* parent) : KPropertiesDialog (KURL(data.filenameAndPath()), parent, "KSVServicePropertiesDialog", true, false), mData (data) @@ -44,31 +44,31 @@ KSVServicesPage::KSVServicesPage (KSVData& data, KPropertiesDialog* props) { mPage->setSpacing (KDialog::spacingHint()); - QVBox* desc = new QVBox (mPage); + TQVBox* desc = new TQVBox (mPage); desc->setSpacing (1); - QLabel* label = new QLabel(i18n("Description:"), desc); + TQLabel* label = new TQLabel(i18n("Description:"), desc); label->setFixedHeight (label->sizeHint().height()); - QString text; + TQString text; ksv::getServiceDescription (data.filename(), text); - mDesc = new QTextView (QString("

%1

").arg (text), QString::null, desc); + mDesc = new TQTextView (TQString("

%1

").arg (text), TQString::null, desc); - QButtonGroup* buttons = new QButtonGroup (1, Vertical, i18n ("Actions"), mPage); - QPushButton* b = new QPushButton (i18n ("&Edit"), buttons); - connect (b, SIGNAL (clicked()), props, SLOT (doEdit())); + TQButtonGroup* buttons = new TQButtonGroup (1, Vertical, i18n ("Actions"), mPage); + TQPushButton* b = new TQPushButton (i18n ("&Edit"), buttons); + connect (b, TQT_SIGNAL (clicked()), props, TQT_SLOT (doEdit())); - QFrame* spacer = new QFrame (buttons); + TQFrame* spacer = new TQFrame (buttons); spacer->setMinimumWidth (KDialog::spacingHint()); - b = new QPushButton (i18n ("&Start"), buttons); - connect (b, SIGNAL (clicked()), props, SLOT (doStart())); + b = new TQPushButton (i18n ("&Start"), buttons); + connect (b, TQT_SIGNAL (clicked()), props, TQT_SLOT (doStart())); - b = new QPushButton (i18n ("S&top"), buttons); - connect (b, SIGNAL (clicked()), props, SLOT (doStop())); + b = new TQPushButton (i18n ("S&top"), buttons); + connect (b, TQT_SIGNAL (clicked()), props, TQT_SLOT (doStop())); - b = new QPushButton (i18n ("&Restart"), buttons); - connect (b, SIGNAL (clicked()), props, SLOT (doRestart())); + b = new TQPushButton (i18n ("&Restart"), buttons); + connect (b, TQT_SIGNAL (clicked()), props, TQT_SLOT (doRestart())); } KSVServicesPage::~KSVServicesPage () @@ -100,7 +100,7 @@ void KSVServicePropertiesDialog::doRestart () } -KSVEntryPropertiesDialog::KSVEntryPropertiesDialog (KSVData& data, QWidget* parent) +KSVEntryPropertiesDialog::KSVEntryPropertiesDialog (KSVData& data, TQWidget* parent) : KPropertiesDialog (data.label(), parent, "KSVEntryPropertiesDialog", true), mData (data) { @@ -121,25 +121,25 @@ KSVEntryPage::KSVEntryPage (KSVData& data, KPropertiesDialog* props) mPage (props->addPage (i18n("&Entry"))), mIndex (props->pageIndex (mPage)) { - QGridLayout* top = new QGridLayout (mPage, 4, 2, 0, KDialog::spacingHint()); + TQGridLayout* top = new TQGridLayout (mPage, 4, 2, 0, KDialog::spacingHint()); - QLabel* labelLabel = new QLabel (i18n ("&Name:"), mPage); + TQLabel* labelLabel = new TQLabel (i18n ("&Name:"), mPage); mLabelEdit = new KLineEdit (mPage); mLabelEdit->setText (mData.label()); labelLabel->setBuddy (mLabelEdit); - QLabel* serviceLabel = new QLabel (i18n ("&Points to service:"), mPage); + TQLabel* serviceLabel = new TQLabel (i18n ("&Points to service:"), mPage); mServiceEdit = new KLineEdit (mPage); mServiceEdit->setCompletionObject (ksv::serviceCompletion(), true); mServiceEdit->setText (mData.filename()); serviceLabel->setBuddy (mServiceEdit); - QLabel* numberLabel = new QLabel (i18n ("&Sorting number:"), mPage); + TQLabel* numberLabel = new TQLabel (i18n ("&Sorting number:"), mPage); mNumberEdit = new KSVSpinBox (mPage); mNumberEdit->setValue (mData.number()); numberLabel->setBuddy (mNumberEdit); - QLabel* iconLabel = new QLabel (mPage); + TQLabel* iconLabel = new TQLabel (mPage); iconLabel->setPixmap (DesktopIcon ("ksysv", 48)); top->addWidget (labelLabel, 0, 0); @@ -150,12 +150,12 @@ KSVEntryPage::KSVEntryPage (KSVData& data, KPropertiesDialog* props) top->addWidget (mNumberEdit, 2, 1); top->addWidget (iconLabel, 3, 0); - connect (mServiceEdit, SIGNAL (textChanged (const QString&)), - this, SLOT (emitChanged())); - connect (mLabelEdit, SIGNAL (textChanged (const QString&)), - this, SLOT (emitChanged())); - connect (mNumberEdit, SIGNAL (valueChanged (int)), - this, SLOT (emitChanged())); + connect (mServiceEdit, TQT_SIGNAL (textChanged (const TQString&)), + this, TQT_SLOT (emitChanged())); + connect (mLabelEdit, TQT_SIGNAL (textChanged (const TQString&)), + this, TQT_SLOT (emitChanged())); + connect (mNumberEdit, TQT_SIGNAL (valueChanged (int)), + this, TQT_SLOT (emitChanged())); } KSVEntryPage::~KSVEntryPage () diff --git a/ksysv/Properties.h b/ksysv/Properties.h index 0e3225d..d26cb91 100644 --- a/ksysv/Properties.h +++ b/ksysv/Properties.h @@ -19,14 +19,14 @@ class KSVServicePropertiesDialog : public KPropertiesDialog Q_OBJECT public: - KSVServicePropertiesDialog (KSVData& data, QWidget* parent); + KSVServicePropertiesDialog (KSVData& data, TQWidget* parent); virtual ~KSVServicePropertiesDialog (); signals: - void startService (const QString&); - void stopService (const QString&); - void restartService (const QString&); - void editService (const QString&); + void startService (const TQString&); + void stopService (const TQString&); + void restartService (const TQString&); + void editService (const TQString&); private slots: void doEdit (); @@ -44,14 +44,14 @@ class KSVEntryPropertiesDialog : public KPropertiesDialog Q_OBJECT public: - KSVEntryPropertiesDialog (KSVData& data, QWidget* parent); + KSVEntryPropertiesDialog (KSVData& data, TQWidget* parent); virtual ~KSVEntryPropertiesDialog (); signals: - void startService (const QString&); - void stopService (const QString&); - void restartService (const QString&); - void editService (const QString&); + void startService (const TQString&); + void stopService (const TQString&); + void restartService (const TQString&); + void editService (const TQString&); private slots: void doEdit (); @@ -80,12 +80,12 @@ private slots: private: KSVData& mData; - QFrame* mPage; + TQFrame* mPage; int mIndex; KLineEdit* mServiceEdit; KLineEdit* mLabelEdit; - QSpinBox* mNumberEdit; + TQSpinBox* mNumberEdit; }; class KSVServicesPage : public KPropsDlgPlugin @@ -102,8 +102,8 @@ public: private: KSVData& mData; - QVBox* mPage; - QTextView* mDesc; + TQVBox* mPage; + TQTextView* mDesc; int mIndex; }; diff --git a/ksysv/RunlevelAuthIcon.cpp b/ksysv/RunlevelAuthIcon.cpp index e086df1..bac5b30 100644 --- a/ksysv/RunlevelAuthIcon.cpp +++ b/ksysv/RunlevelAuthIcon.cpp @@ -1,9 +1,9 @@ // (c) 2000 Peter Putzer -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -12,14 +12,14 @@ #include "ksv_core.h" #include "RunlevelAuthIcon.h" -#include +#include -RunlevelAuthIcon::RunlevelAuthIcon (const QString& servicesPath, const QString& runlevelPath, - QWidget* parent, const char* name) +RunlevelAuthIcon::RunlevelAuthIcon (const TQString& servicesPath, const TQString& runlevelPath, + TQWidget* parent, const char* name) : KAuthIcon (parent, name), - mTimer (new QTimer (this)), - mServicesInfo (new QFileInfo (servicesPath)), - mRLInfo (new QFileInfo* [ksv::runlevelNumber]), + mTimer (new TQTimer (this)), + mServicesInfo (new TQFileInfo (servicesPath)), + mRLInfo (new TQFileInfo* [ksv::runlevelNumber]), mOld (false), mInterval (1000), mCheckEnabled(false) @@ -36,15 +36,15 @@ RunlevelAuthIcon::RunlevelAuthIcon (const QString& servicesPath, const QString& lockBox->setPixmap (lockPM); lockBox->setMargin (1); - lockBox->setFrameStyle (QFrame::NoFrame); + lockBox->setFrameStyle (TQFrame::NoFrame); lockBox->setFixedSize (lockBox->sizeHint()); - connect (mTimer, SIGNAL (timeout()), this, SLOT (timerEvent())); + connect (mTimer, TQT_SIGNAL (timeout()), this, TQT_SLOT (timerEvent())); mTimer->start (mInterval); for (int i = 0; i < ksv::runlevelNumber; ++i) { - mRLInfo[i] = new QFileInfo ((runlevelPath + "/rc%1.d").arg(i)); + mRLInfo[i] = new TQFileInfo ((runlevelPath + "/rc%1.d").arg(i)); } updateStatus(); @@ -75,8 +75,8 @@ void RunlevelAuthIcon::updateStatus () lockBox->setPixmap (res ? openLockPM : lockPM); lockLabel->setText (res ? openLockText : lockText); - QToolTip::remove (this); - QToolTip::add (this, lockLabel->text()); + TQToolTip::remove (this); + TQToolTip::add (this, lockLabel->text()); mOld = res; emit authChanged (res); @@ -107,7 +107,7 @@ void RunlevelAuthIcon::timerEvent () updateStatus(); } -void RunlevelAuthIcon::setServicesPath (const QString& path) +void RunlevelAuthIcon::setServicesPath (const TQString& path) { mTimer->stop(); @@ -116,7 +116,7 @@ void RunlevelAuthIcon::setServicesPath (const QString& path) mTimer->start(mInterval); } -void RunlevelAuthIcon::setRunlevelPath (const QString& path) +void RunlevelAuthIcon::setRunlevelPath (const TQString& path) { mTimer->stop(); diff --git a/ksysv/RunlevelAuthIcon.h b/ksysv/RunlevelAuthIcon.h index d33f24d..c4dddd5 100644 --- a/ksysv/RunlevelAuthIcon.h +++ b/ksysv/RunlevelAuthIcon.h @@ -13,8 +13,8 @@ class RunlevelAuthIcon : public KAuthIcon Q_PROPERTY (int refreshInterval READ refreshInterval WRITE setRefreshInterval) public: - RunlevelAuthIcon (const QString& scriptPath, const QString& runlevelPath, - QWidget* parent = 0L, const char* name = 0L); + RunlevelAuthIcon (const TQString& scriptPath, const TQString& runlevelPath, + TQWidget* parent = 0L, const char* name = 0L); virtual ~RunlevelAuthIcon (); @@ -26,8 +26,8 @@ public: public slots: virtual void updateStatus (); - void setServicesPath (const QString& servicesPath); - void setRunlevelPath (const QString& runlevelPath); + void setServicesPath (const TQString& servicesPath); + void setRunlevelPath (const TQString& runlevelPath); void setRefreshInterval (int); @@ -37,9 +37,9 @@ private slots: void timerEvent (); private: - QTimer* mTimer; - QFileInfo* mServicesInfo; - QFileInfo** mRLInfo; + TQTimer* mTimer; + TQFileInfo* mServicesInfo; + TQFileInfo** mRLInfo; bool mOld; int mInterval; diff --git a/ksysv/ServiceDlg.cpp b/ksysv/ServiceDlg.cpp index 0564028..4b7d4ef 100644 --- a/ksysv/ServiceDlg.cpp +++ b/ksysv/ServiceDlg.cpp @@ -12,11 +12,11 @@ * * ***************************************************************************/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -27,22 +27,22 @@ #define MIN_SIZE(A) A->setMinimumSize(A->sizeHint()) -ServiceDlg::ServiceDlg (const QString& action, const QString& label, - QWidget* parent, const char* name) +ServiceDlg::ServiceDlg (const TQString& action, const TQString& label, + TQWidget* parent, const char* name) : KDialogBase (parent, name, false, action, Apply|Close, Apply, true) { - QWidget* page = new QWidget (this); + TQWidget* page = new TQWidget (this); - QBoxLayout* top = new QVBoxLayout (page, 0, spacingHint()); + TQBoxLayout* top = new TQVBoxLayout (page, 0, spacingHint()); - mServices = new QComboBox (false, page); - QLabel* desc = new QLabel(label, page); + mServices = new TQComboBox (false, page); + TQLabel* desc = new TQLabel(label, page); MIN_SIZE(desc); desc->setBuddy(mServices); MIN_SIZE(mServices); mServices->setMinimumWidth(mServices->minimumSize().width() * 2); - QBoxLayout* serv_layout = new QHBoxLayout(); + TQBoxLayout* serv_layout = new TQHBoxLayout(); top->addLayout (serv_layout); serv_layout->addWidget(desc); serv_layout->addWidget(mServices); @@ -73,13 +73,13 @@ void ServiceDlg::resetChooser(KSVDragList* list, bool edit) return; // initialize the combobox - for (QListViewItemIterator it (list); + for (TQListViewItemIterator it (list); it.current(); ++it) { const KSVItem* item = static_cast (it.current()); - QFileInfo info (item->filenameAndPath()); + TQFileInfo info (item->filenameAndPath()); if (edit) { @@ -100,14 +100,14 @@ void ServiceDlg::resetChooser(KSVDragList* list, bool edit) void ServiceDlg::show () { - QDialog::show (); + TQDialog::show (); emit display (true); } void ServiceDlg::hide () { - QDialog::hide (); + TQDialog::hide (); emit display (false); } diff --git a/ksysv/ServiceDlg.h b/ksysv/ServiceDlg.h index 34fb69c..84781e7 100644 --- a/ksysv/ServiceDlg.h +++ b/ksysv/ServiceDlg.h @@ -16,7 +16,7 @@ #define KSV_SERVICE_DIALOG_H #include -#include +#include class KSVDragList; class KSVItem; @@ -28,8 +28,8 @@ class ServiceDlg : public KDialogBase Q_OBJECT public: - ServiceDlg (const QString& action, const QString& label, - QWidget* parent = 0, const char* name = 0); + ServiceDlg (const TQString& action, const TQString& label, + TQWidget* parent = 0, const char* name = 0); virtual ~ServiceDlg(); int count() const; @@ -42,14 +42,14 @@ public slots: void toggle (); private: - QComboBox* mServices; - QMap mMapServices; + TQComboBox* mServices; + TQMap mMapServices; protected slots: virtual void slotApply(); signals: - void doAction (const QString& on); + void doAction (const TQString& on); void display (bool); }; diff --git a/ksysv/SpinBox.cpp b/ksysv/SpinBox.cpp index 63a217a..fd93954 100644 --- a/ksysv/SpinBox.cpp +++ b/ksysv/SpinBox.cpp @@ -1,14 +1,14 @@ // (c) 2000 Peter Putzer -#include +#include #include #include "ksv_core.h" #include "SpinBox.h" -KSVSpinBox::KSVSpinBox (QWidget* parent, const char* name) - : QSpinBox (0, 99, 1, parent, name), +KSVSpinBox::KSVSpinBox (TQWidget* parent, const char* name) + : TQSpinBox (0, 99, 1, parent, name), KCompletionBase (), mClearedSelection (false) { @@ -17,19 +17,19 @@ KSVSpinBox::KSVSpinBox (QWidget* parent, const char* name) editor()->installEventFilter (this); - connect (editor(), SIGNAL (textChanged (const QString&)), - comp, SLOT (slotMakeCompletion (const QString&))); - connect (comp, SIGNAL (match (const QString&)), - this, SLOT (handleMatch (const QString&))); + connect (editor(), TQT_SIGNAL (textChanged (const TQString&)), + comp, TQT_SLOT (slotMakeCompletion (const TQString&))); + connect (comp, TQT_SIGNAL (match (const TQString&)), + this, TQT_SLOT (handleMatch (const TQString&))); } KSVSpinBox::~KSVSpinBox () { } -QString KSVSpinBox::mapValueToText (int value) +TQString KSVSpinBox::mapValueToText (int value) { - QString result; + TQString result; if (value < 10) result.sprintf("%.2i", value); @@ -39,9 +39,9 @@ QString KSVSpinBox::mapValueToText (int value) return result; } -void KSVSpinBox::setCompletedText (const QString& text) +void KSVSpinBox::setCompletedText (const TQString& text) { - QLineEdit* e = editor (); + TQLineEdit* e = editor (); const int pos = e->cursorPosition(); e->setText (text); @@ -50,24 +50,24 @@ void KSVSpinBox::setCompletedText (const QString& text) e->setCursorPosition (pos); } -void KSVSpinBox::setCompletedItems (const QStringList& /*items*/) +void KSVSpinBox::setCompletedItems (const TQStringList& /*items*/) { // dont know what is supposed to be in here but it has to be defined // because else the lack of this damn thing is making it abstract } -void KSVSpinBox::handleMatch (const QString& match) +void KSVSpinBox::handleMatch (const TQString& match) { if (!match.isNull() && editor()->text().length() < 2 && !mClearedSelection) setCompletedText (match); } -bool KSVSpinBox::eventFilter (QObject* o, QEvent* e) +bool KSVSpinBox::eventFilter (TQObject* o, TQEvent* e) { Q_UNUSED(o); - if (e->type() == QEvent::KeyPress) + if (e->type() == TQEvent::KeyPress) { - QKeyEvent* ke = static_cast (e); + TQKeyEvent* ke = static_cast (e); switch (ke->key()) { diff --git a/ksysv/SpinBox.h b/ksysv/SpinBox.h index 147fc88..c48f09e 100644 --- a/ksysv/SpinBox.h +++ b/ksysv/SpinBox.h @@ -3,27 +3,27 @@ #ifndef KSV_SPINBOX_H #define KSV_SPINBOX_H -#include +#include #include -class KSVSpinBox : public QSpinBox, public KCompletionBase +class KSVSpinBox : public TQSpinBox, public KCompletionBase { Q_OBJECT public: - KSVSpinBox (QWidget* parent, const char* name = 0L); + KSVSpinBox (TQWidget* parent, const char* name = 0L); virtual ~KSVSpinBox (); - virtual bool eventFilter (QObject*, QEvent*); - virtual void setCompletedText (const QString&); - virtual void setCompletedItems (const QStringList&); + virtual bool eventFilter (TQObject*, TQEvent*); + virtual void setCompletedText (const TQString&); + virtual void setCompletedItems (const TQStringList&); protected: - virtual QString mapValueToText (int value); + virtual TQString mapValueToText (int value); private slots: - void handleMatch (const QString&); + void handleMatch (const TQString&); private: bool mClearedSelection; diff --git a/ksysv/TopWidget.cpp b/ksysv/TopWidget.cpp index 854c9cf..6b2e675 100644 --- a/ksysv/TopWidget.cpp +++ b/ksysv/TopWidget.cpp @@ -28,28 +28,28 @@ #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 +#include +#include +#include +#include +#include +#include +#include #include #include @@ -84,7 +84,7 @@ #include "OldView.h" #include "IOCore.h" #include "TopWidget.h" -#include +#include #include namespace Status @@ -127,7 +127,7 @@ KSVTopLevel::KSVTopLevel() mEditDlg (new ServiceDlg (i18n("Edit Service"), i18n("&Choose which service to edit:"), this)), - mVisible (new QCheckBox*[ksv::runlevelNumber]) + mVisible (new TQCheckBox*[ksv::runlevelNumber]) { setCaption(false); @@ -139,27 +139,27 @@ KSVTopLevel::KSVTopLevel() setCentralWidget(mView); // ensure that the statusbar gets updated correctly - connect (mView, SIGNAL(sigRun(const QString&)), this, SLOT(slotUpdateRunning(const QString&))); - connect (mView, SIGNAL(sigStop()), statusBar(), SLOT(clear())); - connect (mView, SIGNAL(cannotGenerateNumber()), this, SLOT(catchCannotGenerateNumber())); - connect (mView, SIGNAL(undoAction(KSVAction*)), this, SLOT(pushUndoAction(KSVAction*))); - connect (mView, SIGNAL(logChanged()), this, SLOT(enableLogActions())); + connect (mView, TQT_SIGNAL(sigRun(const TQString&)), this, TQT_SLOT(slotUpdateRunning(const TQString&))); + connect (mView, TQT_SIGNAL(sigStop()), statusBar(), TQT_SLOT(clear())); + connect (mView, TQT_SIGNAL(cannotGenerateNumber()), this, TQT_SLOT(catchCannotGenerateNumber())); + connect (mView, TQT_SIGNAL(undoAction(KSVAction*)), this, TQT_SLOT(pushUndoAction(KSVAction*))); + connect (mView, TQT_SIGNAL(logChanged()), this, TQT_SLOT(enableLogActions())); // cut & copy - connect (mView, SIGNAL (newOrigin()), - this, SLOT (dispatchEdit())); + connect (mView, TQT_SIGNAL (newOrigin()), + this, TQT_SLOT (dispatchEdit())); // undo - connect (mUndoList, SIGNAL(empty()), this, SLOT(disableUndo())); - connect (mUndoList, SIGNAL(filled()), this, SLOT(enableUndo())); + connect (mUndoList, TQT_SIGNAL(empty()), this, TQT_SLOT(disableUndo())); + connect (mUndoList, TQT_SIGNAL(filled()), this, TQT_SLOT(enableUndo())); // and redo - connect (mRedoList, SIGNAL(empty()), this, SLOT(disableRedo())); - connect (mRedoList, SIGNAL(filled()), this, SLOT(enableRedo())); + connect (mRedoList, TQT_SIGNAL(empty()), this, TQT_SLOT(disableRedo())); + connect (mRedoList, TQT_SIGNAL(filled()), this, TQT_SLOT(enableRedo())); // paste - connect (kapp->clipboard(), SIGNAL (dataChanged()), - this, SLOT (dispatchEdit())); + connect (kapp->clipboard(), TQT_SIGNAL (dataChanged()), + this, TQT_SLOT (dispatchEdit())); // init mView according to saved preferences slotReadConfig(); @@ -186,23 +186,23 @@ KSVTopLevel::~KSVTopLevel() void KSVTopLevel::initTools() { - connect (mStartDlg, SIGNAL(doAction(const QString&)), - mView, SLOT(startService(const QString&))); - connect (mStopDlg, SIGNAL(doAction(const QString&)), - mView, SLOT(editService(const QString&))); - connect (mRestartDlg, SIGNAL(doAction(const QString&)), - mView, SLOT(restartService(const QString&))); - connect (mEditDlg, SIGNAL(doAction(const QString&)), - mView, SLOT(editService(const QString&))); - - connect (mStartDlg, SIGNAL (display (bool)), - this, SLOT (dispatchStartService (bool))); - connect (mStopDlg, SIGNAL (display (bool)), - this, SLOT (dispatchStopService (bool))); - connect (mRestartDlg, SIGNAL (display (bool)), - this, SLOT (dispatchRestartService (bool))); - connect (mEditDlg, SIGNAL (display (bool)), - this, SLOT (dispatchEditService (bool))); + connect (mStartDlg, TQT_SIGNAL(doAction(const TQString&)), + mView, TQT_SLOT(startService(const TQString&))); + connect (mStopDlg, TQT_SIGNAL(doAction(const TQString&)), + mView, TQT_SLOT(editService(const TQString&))); + connect (mRestartDlg, TQT_SIGNAL(doAction(const TQString&)), + mView, TQT_SLOT(restartService(const TQString&))); + connect (mEditDlg, TQT_SIGNAL(doAction(const TQString&)), + mView, TQT_SLOT(editService(const TQString&))); + + connect (mStartDlg, TQT_SIGNAL (display (bool)), + this, TQT_SLOT (dispatchStartService (bool))); + connect (mStopDlg, TQT_SIGNAL (display (bool)), + this, TQT_SLOT (dispatchStopService (bool))); + connect (mRestartDlg, TQT_SIGNAL (display (bool)), + this, TQT_SLOT (dispatchRestartService (bool))); + connect (mEditDlg, TQT_SIGNAL (display (bool)), + this, TQT_SLOT (dispatchEditService (bool))); } @@ -211,48 +211,48 @@ void KSVTopLevel::initActions () KActionCollection* coll = actionCollection(); // setup File menu - mFileRevert = KStdAction::revert (this, SLOT (slotClearChanges()), coll); + mFileRevert = KStdAction::revert (this, TQT_SLOT (slotClearChanges()), coll); mFileRevert->setText (i18n("Re&vert Configuration")); - mFileLoad = KStdAction::open (this, SLOT (load()), coll); + mFileLoad = KStdAction::open (this, TQT_SLOT (load()), coll); mFileLoad->setText (i18n ("&Open...")); - mFileSave = KStdAction::save(this, SLOT(slotAcceptChanges()), coll); + mFileSave = KStdAction::save(this, TQT_SLOT(slotAcceptChanges()), coll); mFileSave->setText (i18n("&Save Configuration")); - mFileSaveAs = KStdAction::saveAs (this, SLOT (saveAs ()), coll); + mFileSaveAs = KStdAction::saveAs (this, TQT_SLOT (saveAs ()), coll); - mFileSaveLog = KStdAction::save (this, SLOT(slotSaveLog()), coll, "ksysv_save_log"); + mFileSaveLog = KStdAction::save (this, TQT_SLOT(slotSaveLog()), coll, "ksysv_save_log"); mFileSaveLog->setText (i18n("Save &Log...")); mFileSaveLog->setShortcut (Key_L+CTRL); mFileSaveLog->setEnabled (false); // disabled due to complexity - // mFilePrint = KStdAction::print (this, SLOT (print()), coll); + // mFilePrint = KStdAction::print (this, TQT_SLOT (print()), coll); - mFilePrintLog = KStdAction::print(this, SLOT(printLog()), coll, "ksysv_print_log"); + mFilePrintLog = KStdAction::print(this, TQT_SLOT(printLog()), coll, "ksysv_print_log"); mFilePrintLog->setText( i18n("&Print Log...")); mFilePrintLog->setEnabled (false); - mFileQuit = KStdAction::quit(this, SLOT(close()), coll); + mFileQuit = KStdAction::quit(this, TQT_SLOT(close()), coll); // setup Edit menu - mEditUndo = KStdAction::undo(this, SLOT(editUndo()), coll); + mEditUndo = KStdAction::undo(this, TQT_SLOT(editUndo()), coll); mEditUndo->setEnabled (false); - mEditRedo = KStdAction::redo(this, SLOT(editRedo()), coll); + mEditRedo = KStdAction::redo(this, TQT_SLOT(editRedo()), coll); mEditUndo->setEnabled (false); - mEditCut = KStdAction::cut(this, SLOT(editCut()), coll); - mEditCopy = KStdAction::copy(this, SLOT(editCopy()), coll); - mEditPaste = KStdAction::paste(this, SLOT(editPaste()), coll); - mPasteAppend = KStdAction::paste (this, SLOT (pasteAppend()), + mEditCut = KStdAction::cut(this, TQT_SLOT(editCut()), coll); + mEditCopy = KStdAction::copy(this, TQT_SLOT(editCopy()), coll); + mEditPaste = KStdAction::paste(this, TQT_SLOT(editPaste()), coll); + mPasteAppend = KStdAction::paste (this, TQT_SLOT (pasteAppend()), coll, "ksysv_paste_append"); mEditProperties = new KAction (i18n("P&roperties"), 0, - this, SLOT(properties()), + this, TQT_SLOT(properties()), coll, "ksysv_properties"); mOpenDefault = new KAction (i18n ("&Open"), 0, - this, SLOT (editService()), + this, TQT_SLOT (editService()), coll, "ksysv_open_service"); mOpenWith = new KActionMenu (i18n ("Open &With"), coll, "ksysv_open_with"); @@ -260,30 +260,30 @@ void KSVTopLevel::initActions () // setup Settings menu createStandardStatusBarAction(); setStandardToolBarMenuEnabled(true); - KStdAction::keyBindings (this, SLOT(configureKeys()), coll); - KStdAction::configureToolbars (this, SLOT(configureToolbars()), coll); - KStdAction::saveOptions(this, SLOT(saveOptions()), coll); - KStdAction::preferences(this, SLOT(slotShowConfig()), coll); + KStdAction::keyBindings (this, TQT_SLOT(configureKeys()), coll); + KStdAction::configureToolbars (this, TQT_SLOT(configureToolbars()), coll); + KStdAction::saveOptions(this, TQT_SLOT(saveOptions()), coll); + KStdAction::preferences(this, TQT_SLOT(slotShowConfig()), coll); mOptionsToggleLog = new KToggleAction (i18n("Show &Log"), "toggle_log", 0, - this, SLOT (toggleLog()), + this, TQT_SLOT (toggleLog()), coll, "ksysv_toggle_log"); mOptionsToggleLog->setCheckedState(i18n("Hide &Log")); // setup Tools menu mToolsStartService = new KToggleAction (i18n("&Start Service..."), "ksysv_start", 0, - mStartDlg, SLOT (toggle()), + mStartDlg, TQT_SLOT (toggle()), coll, "ksysv_start_service"); mToolsStopService = new KToggleAction (i18n("&Stop Service..."), "ksysv_stop", 0, - mStopDlg, SLOT (toggle()), + mStopDlg, TQT_SLOT (toggle()), coll, "ksysv_stop_service"); mToolsRestartService = new KToggleAction (i18n("&Restart Service..."), 0, - mRestartDlg, SLOT (toggle()), + mRestartDlg, TQT_SLOT (toggle()), coll, "ksysv_restart_service"); mToolsEditService = new KToggleAction (i18n("&Edit Service..."), 0, - mEditDlg, SLOT (toggle()), + mEditDlg, TQT_SLOT (toggle()), coll, "ksysv_edit_service"); createGUI(xmlFile()); @@ -390,36 +390,36 @@ void KSVTopLevel::initStatusBar() { KStatusBar* status = statusBar(); - QHBox* visBox = new QHBox (status, "visBox"); - QButtonGroup* group = new QButtonGroup (this, "visButtonGroup"); + TQHBox* visBox = new TQHBox (status, "visBox"); + TQButtonGroup* group = new TQButtonGroup (this, "visButtonGroup"); group->hide(); - connect (group, SIGNAL (clicked (int)), this, SLOT (toggleRunlevel (int))); + connect (group, TQT_SIGNAL (clicked (int)), this, TQT_SLOT (toggleRunlevel (int))); - QWhatsThis::add (visBox, i18n ("

Click on the checkboxes to show or "\ + TQWhatsThis::add (visBox, i18n ("

Click on the checkboxes to show or "\ "hide runlevels.

" \ "

The list of currently visible runlevels is saved "\ "when you use the Save Options command.

")); - QToolTip::add (visBox, i18n ("Show only the selected runlevels")); + TQToolTip::add (visBox, i18n ("Show only the selected runlevels")); - new QLabel (i18n("Show runlevels:"), visBox, "visLabel"); + new TQLabel (i18n("Show runlevels:"), visBox, "visLabel"); for (int i = 0; i < ksv::runlevelNumber; ++i) { - QString label; label.setNum (i); + TQString label; label.setNum (i); - mVisible[i] = new QCheckBox (label, visBox, label.latin1()); + mVisible[i] = new TQCheckBox (label, visBox, label.latin1()); mVisible[i]->setChecked (mConfig->showRunlevel (i)); group->insert (mVisible[i]); } - QHBox* authIconBox = new QHBox (status, "AuthIconBox"); - QWidget* strut = new QWidget (authIconBox, "Strut"); + TQHBox* authIconBox = new TQHBox (status, "AuthIconBox"); + TQWidget* strut = new TQWidget (authIconBox, "Strut"); strut->setFixedWidth (KDialog::spacingHint()); mAuth = new RunlevelAuthIcon (mConfig->scriptPath(), mConfig->runlevelPath(), authIconBox); - connect (mAuth, SIGNAL (authChanged(bool)), mView, SLOT(multiplexEnabled(bool))); - connect (mAuth, SIGNAL (authChanged(bool)), this, SLOT(writingEnabled(bool))); + connect (mAuth, TQT_SIGNAL (authChanged(bool)), mView, TQT_SLOT(multiplexEnabled(bool))); + connect (mAuth, TQT_SIGNAL (authChanged(bool)), this, TQT_SLOT(writingEnabled(bool))); - QWhatsThis::add (authIconBox, i18n ("

If the lock is closed , "\ + TQWhatsThis::add (authIconBox, i18n ("

If the lock is closed , "\ "you don't have the right " \ "permissions to edit the init configuration.

" \ "

Either restart %1 as root (or another more privileged user), " \ @@ -444,20 +444,20 @@ void KSVTopLevel::slotShowConfig() { mPreferences = KSVPreferences::self(); - connect (mPreferences, SIGNAL (updateColors ()), - this, SLOT (updateColors ())); + connect (mPreferences, TQT_SIGNAL (updateColors ()), + this, TQT_SLOT (updateColors ())); - connect (mPreferences, SIGNAL (updateServicesPath ()), - this, SLOT (updateServicesPath ())); + connect (mPreferences, TQT_SIGNAL (updateServicesPath ()), + this, TQT_SLOT (updateServicesPath ())); - connect (mPreferences, SIGNAL (updateRunlevelsPath ()), - this, SLOT (updateRunlevelsPath ())); + connect (mPreferences, TQT_SIGNAL (updateRunlevelsPath ()), + this, TQT_SLOT (updateRunlevelsPath ())); - connect (mPreferences, SIGNAL (updateFonts ()), - mView, SLOT (repaintRunlevels ())); + connect (mPreferences, TQT_SIGNAL (updateFonts ()), + mView, TQT_SLOT (repaintRunlevels ())); } -// mPreferences->setInitialSize (QSize (400,300), true); +// mPreferences->setInitialSize (TQSize (400,300), true); mPreferences->exec(); } @@ -497,7 +497,7 @@ void KSVTopLevel::saveOptions() mConfig->writeSettings(); } -void KSVTopLevel::slotUpdateRunning (const QString& text) +void KSVTopLevel::slotUpdateRunning (const TQString& text) { statusBar()->changeItem(text, Status::Changed); } @@ -563,7 +563,7 @@ void KSVTopLevel::setChanged (bool val) mFileSave->setEnabled (val); // update statusbar - statusBar()->changeItem(val ? i18n(" Changed") : QString::null, Status::Changed); + statusBar()->changeItem(val ? i18n(" Changed") : TQString::null, Status::Changed); // clear messages statusBar()->clear(); @@ -632,32 +632,32 @@ void KSVTopLevel::print() // prt.setDocName(kapp->aboutData()->programName() + " Configuration"); // prt.setCreator(kapp->aboutData()->programName()); -// static QPrintDialog* dlg = new QPrintDialog (&prt, this, "KSysV Print Dialog"); +// static TQPrintDialog* dlg = new TQPrintDialog (&prt, this, "KSysV Print Dialog"); // dlg->setCaption(kapp->makeStdCaption (i18n("Print"))); -// if (dlg->exec() == QDialog::Accepted) +// if (dlg->exec() == TQDialog::Accepted) // { // int y = 10; -// QPainter p; +// TQPainter p; // p.begin( &prt ); -// QPaintDeviceMetrics metrics (&prt); +// TQPaintDeviceMetrics metrics (&prt); -// p.setFont (QFont("courier", 20, QFont::Bold)); -// QFontMetrics fm = p.fontMetrics(); +// p.setFont (TQFont("courier", 20, TQFont::Bold)); +// TQFontMetrics fm = p.fontMetrics(); // p.drawText (10, y, i18n("%1 Configuration of %2") // .arg (kapp->aboutData()->programName()) // .arg (ksv::hostname())); // y += fm.lineSpacing(); -// p.drawText (10, y, QDateTime::currentDateTime().toString()); +// p.drawText (10, y, TQDateTime::currentDateTime().toString()); // y += fm.lineSpacing() * 2; // an extra empty line // for (int i = 0; i < ksv::runlevelNumber; ++i) // { -// p.setFont (QFont("courier", 16, QFont::Bold)); -// QFontMetrics fm = p.fontMetrics(); +// p.setFont (TQFont("courier", 16, TQFont::Bold)); +// TQFontMetrics fm = p.fontMetrics(); // p.drawText (10, y, i18n ("Runlevel %1").arg(i)); // y += fm.lineSpacing(); @@ -669,10 +669,10 @@ void KSVTopLevel::print() // checkPage -// p.setFont (QFont("courier", 10)); +// p.setFont (TQFont("courier", 10)); // fm = p.fontMetrics(); -// for (QListViewItemIterator it (mView->startRL[i]); +// for (TQListViewItemIterator it (mView->startRL[i]); // it.current(); // ++it) // { @@ -686,7 +686,7 @@ void KSVTopLevel::print() // } -// p.setFont (QFont("courier", 16, QFont::Bold)); +// p.setFont (TQFont("courier", 16, TQFont::Bold)); // fm = p.fontMetrics(); // y += fm.lineSpacing(); // an extra empty line // p.drawText (10, y, i18n ("Stopped Services")); @@ -694,10 +694,10 @@ void KSVTopLevel::print() // checkPage -// p.setFont (QFont("courier", 10)); +// p.setFont (TQFont("courier", 10)); // fm = p.fontMetrics(); -// for (QListViewItemIterator it (mView->stopRL[i]); +// for (TQListViewItemIterator it (mView->stopRL[i]); // it.current(); // ++it) // { @@ -710,22 +710,22 @@ void KSVTopLevel::print() // } // checkPage -// p.setFont (QFont("courier", 16, QFont::Bold)); +// p.setFont (TQFont("courier", 16, TQFont::Bold)); // fm = p.fontMetrics(); // y += fm.lineSpacing() * 3; // two extra empty line // } -// // QStringList lines = QStringList::split ('\n', mView->log(), true); -// // for(QStringList::Iterator it = lines.begin(); +// // TQStringList lines = TQStringList::split ('\n', mView->log(), true); +// // for(TQStringList::Iterator it = lines.begin(); // // it != lines.end(); // // ++it) // // { // // y += fm.ascent(); -// // QString line = *it; +// // TQString line = *it; // // if (line.isNull()) // // line = " "; -// // line.replace( QRegExp("\t"), " " ); +// // line.replace( TQRegExp("\t"), " " ); // // strncpy(buf,line.data(),160); @@ -754,33 +754,33 @@ void KSVTopLevel::printLog() { KBusyManager::self()->setBusy (true); - QPainter p (prt); - QPaintDeviceMetrics pm (prt); + TQPainter p (prt); + TQPaintDeviceMetrics pm (prt); const int height = pm.height(); const int width = pm.width(); - QStringList lines = QStringList::split ('\n', mView->xmlLog(), true); - QStringList::Iterator line = lines.begin(); + TQStringList lines = TQStringList::split ('\n', mView->xmlLog(), true); + TQStringList::Iterator line = lines.begin(); int y = 0; { - QSimpleRichText rheading (i18n("

KDE Sys-V Init Editor Log

"), - QFont("times"), QString::null, ksv::styleSheet(), - QMimeSourceFactory::defaultFactory()); + TQSimpleRichText rheading (i18n("

KDE Sys-V Init Editor Log

"), + TQFont("times"), TQString::null, ksv::styleSheet(), + TQMimeSourceFactory::defaultFactory()); rheading.setWidth (&p, width); int tmp_h = rheading.height(); - QRegion region (0, y, width, tmp_h); + TQRegion region (0, y, width, tmp_h); rheading.draw (&p, 0, y, region, colorGroup(), 0L); y += tmp_h; - QSimpleRichText rdate (i18n("

Printed on %1



").arg(KGlobal::locale()->formatDateTime(QDateTime::currentDateTime())), - QFont("times"), QString::null, ksv::styleSheet(), - QMimeSourceFactory::defaultFactory()); + TQSimpleRichText rdate (i18n("

Printed on %1



").arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime())), + TQFont("times"), TQString::null, ksv::styleSheet(), + TQMimeSourceFactory::defaultFactory()); rdate.setWidth (&p, width); tmp_h = rdate.height(); - QRegion r2 (0, y, width, tmp_h); + TQRegion r2 (0, y, width, tmp_h); rdate.draw (&p, 0, y, r2, colorGroup(), 0L); y += tmp_h; @@ -790,15 +790,15 @@ void KSVTopLevel::printLog() { while (y < height) { - QSimpleRichText rich (*line, QFont("times"), QString::null, ksv::styleSheet(), - QMimeSourceFactory::defaultFactory()); + TQSimpleRichText rich (*line, TQFont("times"), TQString::null, ksv::styleSheet(), + TQMimeSourceFactory::defaultFactory()); rich.setWidth (&p, width); int tmp_h = rich.height(); if (y + tmp_h > height) break; - QRegion region (0, y, width, tmp_h); + TQRegion region (0, y, width, tmp_h); rich.draw (&p, 0, y, region, colorGroup(), 0L); y += tmp_h; @@ -842,7 +842,7 @@ void KSVTopLevel::catchCannotGenerateNumber() 5000); } -void KSVTopLevel::closeEvent (QCloseEvent* e) +void KSVTopLevel::closeEvent (TQCloseEvent* e) { if (KBusyManager::self()->isBusy()) { @@ -890,7 +890,7 @@ void KSVTopLevel::dispatchEdit () } else { - QMimeSource* mime = kapp->clipboard()->data(); + TQMimeSource* mime = kapp->clipboard()->data(); if (mime && mime->provides ("application/x-ksysv")) setPaste (true); @@ -922,23 +922,23 @@ void KSVTopLevel::disableRedo () void KSVTopLevel::slotSaveLog() { - static const QString& filter = ksv::logFileFilter(); - static const QString& ext = ksv::logFileExtension(); - QString filename = KFileDialog::getSaveFileName(0L, filter, this); + static const TQString& filter = ksv::logFileFilter(); + static const TQString& ext = ksv::logFileExtension(); + TQString filename = KFileDialog::getSaveFileName(0L, filter, this); if (filename.isEmpty()) return; else if (filename.right(ext.length()) != ext) filename += ext; - QFile file(filename); + TQFile file(filename); file.open( IO_WriteOnly | IO_Raw ); - QTextStream s(&file); + TQTextStream s(&file); s << "KDE System V Init Editor" << endl - << QDateTime::currentDateTime().toString() + << TQDateTime::currentDateTime().toString() << endl << endl << mView->log() << endl; @@ -981,7 +981,7 @@ void KSVTopLevel::configureKeys () void KSVTopLevel::configureToolbars () { KEditToolbar dlg(filteredActions(), xmlFile(), true, this); - connect(&dlg, SIGNAL( newToolbarConfig() ), this, SLOT( slotNewToolbarConfig() )); + connect(&dlg, TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() )); dlg.exec(); } @@ -1034,21 +1034,21 @@ void KSVTopLevel::toggleRunlevel (int index) void KSVTopLevel::saveAs () { - static const QString& filter = ksv::nativeFileFilter(); - static const QString& ext = ksv::nativeFileExtension(); - QString filename = KFileDialog::getSaveFileName(0L, filter, this); + static const TQString& filter = ksv::nativeFileFilter(); + static const TQString& ext = ksv::nativeFileExtension(); + TQString filename = KFileDialog::getSaveFileName(0L, filter, this); if (filename.isEmpty()) return; else if (filename.right(ext.length()) != ext) filename += ext; - QFile file(filename); + TQFile file(filename); // we're busy KBusyManager::self()->setBusy (true); file.open (IO_WriteOnly | IO_Raw); - QDataStream s (&file); + TQDataStream s (&file); if (ksv::IO::saveConfiguration (s, mView->startRL, mView->stopRL)) { @@ -1066,19 +1066,19 @@ void KSVTopLevel::saveAs () void KSVTopLevel::load () { - static const QString& filter = ksv::nativeFileFilter(); - QString filename = KFileDialog::getOpenFileName(0L, filter, this); + static const TQString& filter = ksv::nativeFileFilter(); + TQString filename = KFileDialog::getOpenFileName(0L, filter, this); if (filename.isEmpty()) return; - QFile file(filename); + TQFile file(filename); KBusyManager::self()->setBusy (true); file.open (IO_ReadOnly | IO_Raw); - QDataStream s (&file); - QValueList* startLists = new QValueList[ksv::runlevelNumber]; - QValueList* stopLists = new QValueList[ksv::runlevelNumber]; + TQDataStream s (&file); + TQValueList* startLists = new TQValueList[ksv::runlevelNumber]; + TQValueList* stopLists = new TQValueList[ksv::runlevelNumber]; if (ksv::IO::loadSavedConfiguration (s, startLists, stopLists)) { diff --git a/ksysv/TopWidget.h b/ksysv/TopWidget.h index 6415538..e9a852f 100644 --- a/ksysv/TopWidget.h +++ b/ksysv/TopWidget.h @@ -49,7 +49,7 @@ public slots: protected: virtual bool queryExit(); - virtual void closeEvent( QCloseEvent* e ); + virtual void closeEvent( TQCloseEvent* e ); void initTools(); void initActions (); void initStatusBar(); @@ -65,7 +65,7 @@ private slots: void pasteAppend (); void toggleLog(); void saveOptions(); - void slotUpdateRunning (const QString&); + void slotUpdateRunning (const TQString&); void editCut(); void editCopy(); void editPaste(); @@ -146,7 +146,7 @@ private: ServiceDlg* mEditDlg; RunlevelAuthIcon* mAuth; - QCheckBox** mVisible; + TQCheckBox** mVisible; }; #endif // KSV_TOPWIDGET_H diff --git a/ksysv/kbusymanager.cpp b/ksysv/kbusymanager.cpp index d6c6e9c..ad9c86a 100644 --- a/ksysv/kbusymanager.cpp +++ b/ksysv/kbusymanager.cpp @@ -24,8 +24,8 @@ */ #include "kbusymanager.h" -#include -#include +#include +#include #include #include @@ -42,7 +42,7 @@ public: { } - QValueStack Stack; + TQValueStack Stack; int Size; }; @@ -64,7 +64,7 @@ void KBusyManager::setBusy (bool val) d->Size++; if (val) - QApplication::setOverrideCursor (KCursor::waitCursor()); + TQApplication::setOverrideCursor (KCursor::waitCursor()); kapp->mainWidget()->setEnabled (!val); } @@ -77,7 +77,7 @@ void KBusyManager::restore () bool oldBusy = d->Stack.pop(); if (oldBusy) - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); kapp->mainWidget()->setEnabled (!d->Stack.top()); } diff --git a/ksysv/kdltooltip.cpp b/ksysv/kdltooltip.cpp index a0947ce..7b3a421 100644 --- a/ksysv/kdltooltip.cpp +++ b/ksysv/kdltooltip.cpp @@ -12,17 +12,17 @@ * * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include "ksvdraglist.h" #include "kdltooltip.h" -KDLToolTip::KDLToolTip (KSVDragList *parent, QToolTipGroup* group) - : QToolTip(parent, group), +KDLToolTip::KDLToolTip (KSVDragList *parent, TQToolTipGroup* group) + : TQToolTip(parent, group), mParent (parent) { } @@ -31,16 +31,16 @@ KDLToolTip::~KDLToolTip() { } -void KDLToolTip::maybeTip (const QPoint& p) +void KDLToolTip::maybeTip (const TQPoint& p) { if (!mParent->displayToolTips()) return; - QString text; - QRect rect; + TQString text; + TQRect rect; - const QRect vert = mParent->verticalScrollBar()->geometry(); - const QRect horiz = mParent->horizontalScrollBar()->geometry(); + const TQRect vert = mParent->verticalScrollBar()->geometry(); + const TQRect horiz = mParent->horizontalScrollBar()->geometry(); if (vert.contains(p)) { @@ -62,8 +62,8 @@ void KDLToolTip::maybeTip (const QPoint& p) } else { - QPoint rp = mParent->viewport()->mapFromParent (p); - QListViewItem* i = mParent->itemAt (rp); + TQPoint rp = mParent->viewport()->mapFromParent (p); + TQListViewItem* i = mParent->itemAt (rp); KSVItem* item = static_cast (i); rect = mParent->header()->geometry(); @@ -82,7 +82,7 @@ void KDLToolTip::maybeTip (const QPoint& p) { rect = mParent->rect(); - QListViewItem* last = mParent->lastItem(); + TQListViewItem* last = mParent->lastItem(); if (last) rect.setTop (mParent->viewport()->mapToParent (mParent->itemRect(last).bottomRight()).y()); diff --git a/ksysv/kdltooltip.h b/ksysv/kdltooltip.h index a107383..53685a4 100644 --- a/ksysv/kdltooltip.h +++ b/ksysv/kdltooltip.h @@ -15,7 +15,7 @@ #ifndef KDLTOOLTIP_H #define KDLTOOLTIP_H -#include +#include class KSVDragList; @@ -26,14 +26,14 @@ class KSVDragList; class KDLToolTip : public QToolTip { public: - KDLToolTip (KSVDragList *parent, QToolTipGroup* group = 0L); + KDLToolTip (KSVDragList *parent, TQToolTipGroup* group = 0L); virtual ~KDLToolTip(); protected: /** - * Reimplemented from QToolTip for internal reasons. + * Reimplemented from TQToolTip for internal reasons. */ - virtual void maybeTip (const QPoint&); + virtual void maybeTip (const TQPoint&); private: KSVDragList* mParent; diff --git a/ksysv/kscroller.cpp b/ksysv/kscroller.cpp index 1f69b74..fc71368 100644 --- a/ksysv/kscroller.cpp +++ b/ksysv/kscroller.cpp @@ -1,8 +1,8 @@ // (c) 2000 Peter Putzer -#include -#include -#include +#include +#include +#include #include #include @@ -20,15 +20,15 @@ public: ~KScrollerPrivate () {} - QWidget* setCornerWidget; + TQWidget* setCornerWidget; }; -KScroller::KScroller (QWidget* parent, const char* name) - : QFrame (parent, name), +KScroller::KScroller (TQWidget* parent, const char* name) + : TQFrame (parent, name), d (new KScrollerPrivate()), - mVertical (new QScrollBar (QScrollBar::Vertical, this)), - mHorizontal (new QScrollBar (QScrollBar::Horizontal, this)), - mCornerWidget (new QWidget (this)), + mVertical (new TQScrollBar (TQScrollBar::Vertical, this)), + mHorizontal (new TQScrollBar (TQScrollBar::Horizontal, this)), + mCornerWidget (new TQWidget (this)), mContent (0L), mVerticalOld (0), mHorizontalOld (0) @@ -37,10 +37,10 @@ KScroller::KScroller (QWidget* parent, const char* name) mVertical->hide(); mHorizontal->hide(); - connect (mVertical, SIGNAL (valueChanged (int)), - this, SLOT (scrollVertical (int))); - connect (mHorizontal, SIGNAL (valueChanged (int)), - this, SLOT (scrollHorizontal (int))); + connect (mVertical, TQT_SIGNAL (valueChanged (int)), + this, TQT_SLOT (scrollVertical (int))); + connect (mHorizontal, TQT_SIGNAL (valueChanged (int)), + this, TQT_SLOT (scrollHorizontal (int))); } KScroller::~KScroller () @@ -48,7 +48,7 @@ KScroller::~KScroller () delete d; } -void KScroller::setContent (QWidget* content) +void KScroller::setContent (TQWidget* content) { delete mContent; @@ -56,7 +56,7 @@ void KScroller::setContent (QWidget* content) updateScrollBars(); } -void KScroller::setCornerWidget (QWidget* corner) +void KScroller::setCornerWidget (TQWidget* corner) { delete mCornerWidget; @@ -65,31 +65,31 @@ void KScroller::setCornerWidget (QWidget* corner) updateScrollBars(); } -QWidget* KScroller::cornerWidget () +TQWidget* KScroller::cornerWidget () { return d->setCornerWidget; } -void KScroller::resizeEvent (QResizeEvent* e) +void KScroller::resizeEvent (TQResizeEvent* e) { - QFrame::resizeEvent (e); + TQFrame::resizeEvent (e); updateScrollBars(); } -QSize KScroller::minimumSizeHint() const +TQSize KScroller::minimumSizeHint() const { - QSize size = sizeHint(); + TQSize size = sizeHint(); if (size.width() > 300) size.setWidth(300); return size; } -QSize KScroller::sizeHint() const +TQSize KScroller::sizeHint() const { - QSize size = mContent->minimumSize(); - int extra = kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent, 0 ); - size += QSize( extra, extra ); + TQSize size = mContent->minimumSize(); + int extra = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent, 0 ); + size += TQSize( extra, extra ); return size; } @@ -97,7 +97,7 @@ void KScroller::updateScrollBars () { int w = width(); int h = height(); - QSize cs = mContent->minimumSize(); + TQSize cs = mContent->minimumSize(); setupVertical ( cs.width(), cs.height(), w, h); setupHorizontal ( cs.width(), cs.height(), w, h); @@ -113,7 +113,7 @@ void KScroller::setupHorizontal (int cw, int, int w, int h) if (cw > w) { - int extra = kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent, 0 ); + int extra = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent, 0 ); if (!mVertical->isHidden()) w -= extra; @@ -139,7 +139,7 @@ void KScroller::setupVertical (int, int ch, int w, int h) if (ch > h) { - int extra = kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent, 0 ); + int extra = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent, 0 ); mVertical->setRange (0, ch - h); mVertical->setPageStep (h); mVertical->setLineStep (25); @@ -175,7 +175,7 @@ void KScroller::setupCornerWidget (int w, int h) { if (!mVertical->isHidden() && !mHorizontal->isHidden()) { - int extra = kapp->style().pixelMetric( QStyle::PM_ScrollBarExtent, 0 ); + int extra = kapp->style().pixelMetric( TQStyle::PM_ScrollBarExtent, 0 ); mCornerWidget->raise(); mCornerWidget->setGeometry (w - extra, h - extra, extra, extra); diff --git a/ksysv/kscroller.h b/ksysv/kscroller.h index 09329f1..dcaba97 100644 --- a/ksysv/kscroller.h +++ b/ksysv/kscroller.h @@ -2,7 +2,7 @@ #ifndef KSCROLLER_H #define KSCROLLER_H -#include +#include class QScrollBar; @@ -24,7 +24,7 @@ public: * @param parent the parent of this widget (passed on as ususal). * @param name the name of this widget (as above). */ - KScroller (QWidget* parent = 0L, const char* name = 0L); + KScroller (TQWidget* parent = 0L, const char* name = 0L); /** * Destructor. @@ -34,22 +34,22 @@ public: /** * @return the vertical scrollbar. */ - inline QScrollBar* verticalScrollBar () { return mVertical; } + inline TQScrollBar* verticalScrollBar () { return mVertical; } /** * @return the horizontal scrollbar. */ - inline QScrollBar* horizontalScrollBar () { return mHorizontal; } + inline TQScrollBar* horizontalScrollBar () { return mHorizontal; } /** * @return the current content, or 0L if none set. */ - inline QWidget* content () { return mContent; } + inline TQWidget* content () { return mContent; } /** * @return the current corner widget, or 0L if none set. */ - QWidget* cornerWidget (); + TQWidget* cornerWidget (); public slots: /** @@ -58,7 +58,7 @@ public slots: * * @param content has to be a child of the KScroller. */ - void setContent (QWidget* content); + void setContent (TQWidget* content); /** * Sets the corner widget (the small widget that's located where the vertical and horizontal scrollbars @@ -66,7 +66,7 @@ public slots: * * @param corner has to be a child of the KScroller. */ - void setCornerWidget (QWidget* corner); + void setCornerWidget (TQWidget* corner); /** * Update the scrollbars. Call whenever you change the contents minimumSize. @@ -77,17 +77,17 @@ protected: /** * Reimplemented for internal reasons, the API is not affected. */ - virtual void resizeEvent (QResizeEvent*); + virtual void resizeEvent (TQResizeEvent*); /** * Reimplemented for internal reasons, the API is not affected. */ - virtual QSize sizeHint() const; + virtual TQSize sizeHint() const; /** * Reimplemented for internal reasons, the API is not affected. */ - virtual QSize minimumSizeHint() const; + virtual TQSize minimumSizeHint() const; private slots: @@ -137,11 +137,11 @@ private: class KScrollerPrivate; KScrollerPrivate* d; - QScrollBar* mVertical; - QScrollBar* mHorizontal; - QWidget* mCornerWidget; + TQScrollBar* mVertical; + TQScrollBar* mHorizontal; + TQWidget* mCornerWidget; - QWidget* mContent; + TQWidget* mContent; int mVerticalOld; int mHorizontalOld; diff --git a/ksysv/ksv_conf.cpp b/ksysv/ksv_conf.cpp index aa7ce8b..8522030 100644 --- a/ksysv/ksv_conf.cpp +++ b/ksysv/ksv_conf.cpp @@ -53,7 +53,7 @@ void KSVConfig::readSettings() mChangedSelectedColor = mConfig->readColorEntry ("Changed Selected Text", &Qt::red); mConfig->setGroup("Fonts"); - QFont tmp = KGlobalSettings::generalFont(); + TQFont tmp = KGlobalSettings::generalFont(); mServiceFont = mConfig->readFontEntry ("Service Font", &tmp); tmp = KGlobalSettings::fixedFont(); mNumberFont = mConfig->readFontEntry ("Number Font", &tmp); @@ -128,9 +128,9 @@ void KSVConfig::readRunlevels () { mConfig->setGroup ("Runlevels"); - QValueList list = mConfig->readIntListEntry ("Show Runlevels"); + TQValueList list = mConfig->readIntListEntry ("Show Runlevels"); - for (QValueList::Iterator it = list.begin(); it != list.end(); ++it) + for (TQValueList::Iterator it = list.begin(); it != list.end(); ++it) mShowRunlevel[*it] = true; if (mShowRunlevel.isEmpty()) @@ -140,9 +140,9 @@ void KSVConfig::readRunlevels () void KSVConfig::writeRunlevels () { - QValueList list; + TQValueList list; - for (QMap::Iterator it = mShowRunlevel.begin(); it != mShowRunlevel.end(); ++it) + for (TQMap::Iterator it = mShowRunlevel.begin(); it != mShowRunlevel.end(); ++it) if (it.data()) list.append (it.key()); @@ -155,20 +155,20 @@ void KSVConfig::setShowRunlevel (int index, bool state) mShowRunlevel[index] = state; } -QPoint KSVConfig::position() const +TQPoint KSVConfig::position() const { mConfig->setGroup("Geometry"); - return QPoint(mConfig->readNumEntry("X-Position", 0), + return TQPoint(mConfig->readNumEntry("X-Position", 0), mConfig->readNumEntry("Y-Position", 0)); } -void KSVConfig::setScriptPath (const QString& path) +void KSVConfig::setScriptPath (const TQString& path) { mScriptPath = path; } -void KSVConfig::setRunlevelPath (const QString& path) +void KSVConfig::setRunlevelPath (const TQString& path) { mRunlevelPath = path; } @@ -180,32 +180,32 @@ KSVConfig* KSVConfig::self() return &conf; } -void KSVConfig::setNewNormalColor (const QColor& col) +void KSVConfig::setNewNormalColor (const TQColor& col) { mNewNormalColor = col; } -void KSVConfig::setNewSelectedColor (const QColor& col) +void KSVConfig::setNewSelectedColor (const TQColor& col) { mNewSelectedColor = col; } -void KSVConfig::setChangedNormalColor (const QColor& col) +void KSVConfig::setChangedNormalColor (const TQColor& col) { mChangedNormalColor = col; } -void KSVConfig::setChangedSelectedColor (const QColor& col) +void KSVConfig::setChangedSelectedColor (const TQColor& col) { mChangedSelectedColor = col; } -void KSVConfig::setNumberFont (const QFont& font) +void KSVConfig::setNumberFont (const TQFont& font) { mNumberFont = font; } -void KSVConfig::setServiceFont (const QFont& font) +void KSVConfig::setServiceFont (const TQFont& font) { mServiceFont = font; } diff --git a/ksysv/ksv_conf.h b/ksysv/ksv_conf.h index f17176a..a676270 100644 --- a/ksysv/ksv_conf.h +++ b/ksysv/ksv_conf.h @@ -15,11 +15,11 @@ #ifndef KSV_CONF_H #define KSV_CONF_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "ksv_core.h" @@ -42,16 +42,16 @@ public: mShowLog = val; } - void setNewNormalColor (const QColor& color); - void setNewSelectedColor (const QColor& color); - void setChangedNormalColor (const QColor& color); - void setChangedSelectedColor (const QColor& color); + void setNewNormalColor (const TQColor& color); + void setNewSelectedColor (const TQColor& color); + void setChangedNormalColor (const TQColor& color); + void setChangedSelectedColor (const TQColor& color); - void setServiceFont (const QFont& font); - void setNumberFont (const QFont& font); + void setServiceFont (const TQFont& font); + void setNumberFont (const TQFont& font); - void setScriptPath (const QString& path); - void setRunlevelPath (const QString& path); + void setScriptPath (const TQString& path); + void setRunlevelPath (const TQString& path); inline void setConfigured( bool val = true ) { @@ -73,16 +73,16 @@ public: return mPanningFactor; } - inline const QFont& serviceFont () const { return mServiceFont; } - inline const QFont& numberFont () const { return mNumberFont; } + inline const TQFont& serviceFont () const { return mServiceFont; } + inline const TQFont& numberFont () const { return mNumberFont; } - QPoint position() const; + TQPoint position() const; - inline const QColor& newNormalColor () const { return mNewNormalColor; } - inline const QColor& newSelectedColor () const { return mNewSelectedColor; } + inline const TQColor& newNormalColor () const { return mNewNormalColor; } + inline const TQColor& newSelectedColor () const { return mNewSelectedColor; } - inline const QColor& changedNormalColor () const { return mChangedNormalColor; } - inline const QColor& changedSelectedColor () const { return mChangedSelectedColor; } + inline const TQColor& changedNormalColor () const { return mChangedNormalColor; } + inline const TQColor& changedSelectedColor () const { return mChangedSelectedColor; } bool showRunlevel (int index) const; void setShowRunlevel (int index, bool state); @@ -98,12 +98,12 @@ public: return mConfigured; } - inline const QString& scriptPath() const + inline const TQString& scriptPath() const { return mScriptPath; } - inline const QString& runlevelPath() const + inline const TQString& runlevelPath() const { return mRunlevelPath; } @@ -121,22 +121,22 @@ public: private: KSVConfig (); - QString mScriptPath; - QString mRunlevelPath; + TQString mScriptPath; + TQString mRunlevelPath; bool mShowLog; bool mConfigured; KConfig* mConfig; int mPanningFactor; - QColor mNewNormalColor, mNewSelectedColor; - QColor mChangedNormalColor, mChangedSelectedColor; + TQColor mNewNormalColor, mNewSelectedColor; + TQColor mChangedNormalColor, mChangedSelectedColor; bool mShowDescription; - QMap mShowRunlevel; + TQMap mShowRunlevel; - QFont mServiceFont; - QFont mNumberFont; + TQFont mServiceFont; + TQFont mNumberFont; }; #endif // KSV_CONF_H diff --git a/ksysv/ksv_core.cpp b/ksysv/ksv_core.cpp index a4e2b2c..6611211 100644 --- a/ksysv/ksv_core.cpp +++ b/ksysv/ksv_core.cpp @@ -12,8 +12,8 @@ * * ***************************************************************************/ -#include -#include +#include +#include #include #include @@ -29,7 +29,7 @@ const int ksv::runlevelNumber = 7; KAboutData* ksv::about = 0L; -bool ksv::getServiceDescription (const QString& path, QString& res) +bool ksv::getServiceDescription (const TQString& path, TQString& res) { KSVService* tmp = KSVService::newService (path, KSVConfig::self()->runlevelPath()); res = i18n ("No description available."); @@ -46,13 +46,13 @@ bool ksv::getServiceDescription (const QString& path, QString& res) return result; } -QString ksv::breakWords (const QString& s, int amount) +TQString ksv::breakWords (const TQString& s, int amount) { - QString res; + TQString res; int left = s.length(); int maximum = amount; - QString str = s; + TQString str = s; while (left > maximum) { @@ -78,43 +78,43 @@ QString ksv::breakWords (const QString& s, int amount) return res; } -const QString& ksv::copyrightSymbol () +const TQString& ksv::copyrightSymbol () { - static QString c = QString::fromUtf8 ("©"); + static TQString c = TQString::fromUtf8 ("©"); return c; } -QStyleSheet* ksv::styleSheet () +TQStyleSheet* ksv::styleSheet () { - static QStyleSheet style; + static TQStyleSheet style; static bool initialized = false; if (!initialized) { - QStyleSheetItem* item = new QStyleSheetItem (&style, "vip"); // very important + TQStyleSheetItem* item = new TQStyleSheetItem (&style, "vip"); // very important item->setLogicalFontSize (5); - item->setFontWeight (QFont::Bold); - item->setDisplayMode (QStyleSheetItem::DisplayBlock); + item->setFontWeight (TQFont::Bold); + item->setDisplayMode (TQStyleSheetItem::DisplayBlock); - item = new QStyleSheetItem (&style, "rl"); // runlevel + item = new TQStyleSheetItem (&style, "rl"); // runlevel item->setLogicalFontSize (4); - item->setFontWeight (QFont::Bold); -// item->setDisplayMode (QStyleSheetItem::DisplayBlock); + item->setFontWeight (TQFont::Bold); +// item->setDisplayMode (TQStyleSheetItem::DisplayBlock); - item = new QStyleSheetItem (&style, "start"); // start section + item = new TQStyleSheetItem (&style, "start"); // start section item->setColor (Qt::green); // item->setContexts ("rl"); - item = new QStyleSheetItem (&style, "stop"); // stop section + item = new TQStyleSheetItem (&style, "stop"); // stop section item->setColor (Qt::red); // item->setContexts ("rl"); - item = new QStyleSheetItem (&style, "error"); // signal an error + item = new TQStyleSheetItem (&style, "error"); // signal an error item->setColor (Qt::red); item->setLogicalFontSizeStep (1); - item = new QStyleSheetItem (&style, "cmd"); // command line + item = new TQStyleSheetItem (&style, "cmd"); // command line item->setFontFamily (KGlobalSettings::fixedFont().family()); } @@ -137,7 +137,7 @@ KCompletion* ksv::numberCompletion () { for (int value = 0; value < 100; value += 10) { - QString result = QString::number (value); + TQString result = TQString::number (value); if (value < 10) result.sprintf("%.2i", value); @@ -149,32 +149,32 @@ KCompletion* ksv::numberCompletion () return ∁ } -const QString& ksv::logFileFilter () +const TQString& ksv::logFileFilter () { - static QString filter = "*" + ksv::logFileExtension() + "|" + - QString(kapp->caption() + i18n(" log files") + " (*" + ksv::logFileExtension() + ")"); + static TQString filter = "*" + ksv::logFileExtension() + "|" + + TQString(kapp->caption() + i18n(" log files") + " (*" + ksv::logFileExtension() + ")"); return filter; } -const QString& ksv::nativeFileFilter () +const TQString& ksv::nativeFileFilter () { - static QString filter = "*" + ksv::nativeFileExtension() + "|" + static TQString filter = "*" + ksv::nativeFileExtension() + "|" + i18n("Saved Init Configurations") + " (*" + ksv::nativeFileExtension() + ")"; return filter; } -const QString& ksv::logFileExtension () +const TQString& ksv::logFileExtension () { - static QString ext = ".ksysv_log"; + static TQString ext = ".ksysv_log"; return ext; } -const QString& ksv::nativeFileExtension () +const TQString& ksv::nativeFileExtension () { - static QString ext = ".ksysv"; + static TQString ext = ".ksysv"; return ext; } diff --git a/ksysv/ksv_core.h b/ksysv/ksv_core.h index 58d1fa2..6817a5d 100644 --- a/ksysv/ksv_core.h +++ b/ksysv/ksv_core.h @@ -23,22 +23,22 @@ class KSVItem; namespace ksv { - bool getServiceDescription (const QString& path, QString& res); + bool getServiceDescription (const TQString& path, TQString& res); - QString breakWords (const QString& s, int amount); + TQString breakWords (const TQString& s, int amount); /** * \return the Unicode string for the (c) symbol. */ - const QString& copyrightSymbol (); + const TQString& copyrightSymbol (); - QStyleSheet* styleSheet (); + TQStyleSheet* styleSheet (); - const QString& logFileFilter (); - const QString& nativeFileFilter (); + const TQString& logFileFilter (); + const TQString& nativeFileFilter (); - const QString& logFileExtension (); - const QString& nativeFileExtension (); + const TQString& logFileExtension (); + const TQString& nativeFileExtension (); KCompletion* serviceCompletion (); KCompletion* numberCompletion (); diff --git a/ksysv/ksv_service.cpp b/ksysv/ksv_service.cpp index e13ab6f..0aa8ffb 100644 --- a/ksysv/ksv_service.cpp +++ b/ksysv/ksv_service.cpp @@ -15,14 +15,14 @@ #include #include "leveldb.h" -KSVService::KSVService (const QString &name, const QString &basedir) +KSVService::KSVService (const TQString &name, const TQString &basedir) : name_ (name), base_ (basedir) { } -KSVService* KSVService::newService (const QString &name, const QString &basedir) +KSVService* KSVService::newService (const TQString &name, const TQString &basedir) { struct service service; @@ -70,7 +70,7 @@ int KSVService::set (int level, bool on) return ::doSetService ("/etc/rc.d", service, level, on); } -QString KSVService::description () const +TQString KSVService::description () const { return desc_.stripWhiteSpace(); } diff --git a/ksysv/ksv_service.h b/ksysv/ksv_service.h index cdf42e1..9cab355 100644 --- a/ksysv/ksv_service.h +++ b/ksysv/ksv_service.h @@ -15,7 +15,7 @@ #ifndef KSV_SERVICE_H #define KSV_SERVICE_H -#include +#include /** * The long description for this class goes here @@ -31,7 +31,7 @@ public: /** * Named constructor */ - static KSVService* newService (const QString &name, const QString &basedir); + static KSVService* newService (const TQString &name, const TQString &basedir); /** * Destructor @@ -56,7 +56,7 @@ public: /** * Returns the description of the service */ - QString description () const; + TQString description () const; private: /** @@ -76,22 +76,22 @@ protected: /** * Constructor */ - KSVService (const QString &name, const QString &basedir); + KSVService (const TQString &name, const TQString &basedir); /** * Name of the service */ - QString name_; + TQString name_; /** * Description of the service (i.e. what it does) */ - QString desc_; + TQString desc_; /** * Base dir for storing runlevel dirs */ - QString base_; + TQString base_; int levels, kPriority, sPriority; }; diff --git a/ksysv/ksvapplication.cpp b/ksysv/ksvapplication.cpp index d305712..d45278c 100644 --- a/ksysv/ksvapplication.cpp +++ b/ksysv/ksvapplication.cpp @@ -8,7 +8,7 @@ int KSVApplication::newInstance () { - QWidget* main = mainWidget(); + TQWidget* main = mainWidget(); if (main) KWin::activateWindow (main->winId()); diff --git a/ksysv/ksvconfigwizard.cpp b/ksysv/ksvconfigwizard.cpp index 6a197cb..acbdb04 100644 --- a/ksysv/ksvconfigwizard.cpp +++ b/ksysv/ksvconfigwizard.cpp @@ -25,12 +25,12 @@ */ #include "ksvconfigwizard.h" -#include +#include #include #include #include -#include +#include /* * Constructs a KSVConfigWizard which is a child of 'parent', with the @@ -39,7 +39,7 @@ * The wizard will by default be modeless, unless you set 'modal' to * TRUE to construct a modal wizard. */ -KSVConfigWizard::KSVConfigWizard (QWidget* parent, const char* name, bool modal, WFlags fl) +KSVConfigWizard::KSVConfigWizard (TQWidget* parent, const char* name, bool modal, WFlags fl) : ConfigWizard (parent, name, modal, fl), mChosenDistribution (Debian) { @@ -55,8 +55,8 @@ KSVConfigWizard::KSVConfigWizard (QWidget* parent, const char* name, bool modal, setFinishEnabled (mFinishedPage, true); // some connections - connect (this, SIGNAL (selected (const QString&)), - this, SLOT (selectedPage (const QString&))); + connect (this, TQT_SIGNAL (selected (const TQString&)), + this, TQT_SLOT (selectedPage (const TQString&))); // hide cancel-button cancelButton()->hide(); @@ -72,7 +72,7 @@ KSVConfigWizard::~KSVConfigWizard() void KSVConfigWizard::browseServices() { - QString path = KFileDialog::getExistingDirectory(mServicesPath->text(), this); + TQString path = KFileDialog::getExistingDirectory(mServicesPath->text(), this); if (!path.isEmpty()) mServicesPath->setText(path); @@ -82,7 +82,7 @@ void KSVConfigWizard::browseServices() void KSVConfigWizard::browseRunlevels() { - QString path = KFileDialog::getExistingDirectory(mRunlevelPath->text(), this); + TQString path = KFileDialog::getExistingDirectory(mRunlevelPath->text(), this); if (!path.isEmpty()) mRunlevelPath->setText(path); @@ -90,7 +90,7 @@ void KSVConfigWizard::browseRunlevels() mRunlevelPath->setFocus(); } -void KSVConfigWizard::selectedPage (const QString& title) +void KSVConfigWizard::selectedPage (const TQString& title) { if (title == "Configuration Complete") finishButton()->setDefault (true); @@ -98,12 +98,12 @@ void KSVConfigWizard::selectedPage (const QString& title) nextButton()->setDefault (true); } -QString KSVConfigWizard::runlevelPath () +TQString KSVConfigWizard::runlevelPath () { return mRunlevelPath->text(); } -QString KSVConfigWizard::servicesPath () +TQString KSVConfigWizard::servicesPath () { return mServicesPath->text(); } @@ -112,7 +112,7 @@ void KSVConfigWizard::chooseDistribution(int which) { mChosenDistribution = static_cast (which); - QString rlpath; QString spath; + TQString rlpath; TQString spath; switch (mChosenDistribution) { case Debian: diff --git a/ksysv/ksvconfigwizard.h b/ksysv/ksvconfigwizard.h index 35e8c7f..20c11c7 100644 --- a/ksysv/ksvconfigwizard.h +++ b/ksysv/ksvconfigwizard.h @@ -27,19 +27,19 @@ #define KSVCONFIGWIZARD_H #include "configwizard.h" -#include +#include class KSVConfigWizard : public ConfigWizard { Q_OBJECT public: - KSVConfigWizard( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + KSVConfigWizard( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~KSVConfigWizard(); public: - QString runlevelPath(); - QString servicesPath(); + TQString runlevelPath(); + TQString servicesPath(); protected slots: void browseRunlevels(); @@ -47,7 +47,7 @@ protected slots: void browseServices(); private slots: - void selectedPage (const QString&); + void selectedPage (const TQString&); private: typedef enum { diff --git a/ksysv/ksvdrag.cpp b/ksysv/ksvdrag.cpp index 1f24417..7d94536 100644 --- a/ksysv/ksvdrag.cpp +++ b/ksysv/ksvdrag.cpp @@ -1,7 +1,7 @@ // (c) 2000 Peter Putzer -#include -#include +#include +#include #include @@ -12,27 +12,27 @@ class KSVDrag::Private { public: - QByteArray mNative; - QString mText; + TQByteArray mNative; + TQString mText; KURL mURL; }; -KSVDrag::KSVDrag (const KSVData& item, QWidget* source, const char* name) - : QDragObject (source, name), +KSVDrag::KSVDrag (const KSVData& item, TQWidget* source, const char* name) + : TQDragObject (source, name), d (new Private()) { - QDataStream ds (d->mNative, IO_ReadWrite); + TQDataStream ds (d->mNative, IO_ReadWrite); ds << item; d->mText = item.filenameAndPath (); d->mURL.setPath (item.path() + "/" + item.filename()); } -KSVDrag::KSVDrag (const KSVItem& item, QWidget* source, const char* name) - : QDragObject (source, name), +KSVDrag::KSVDrag (const KSVItem& item, TQWidget* source, const char* name) + : TQDragObject (source, name), d (new Private()) { - QDataStream ds (d->mNative, IO_ReadWrite); + TQDataStream ds (d->mNative, IO_ReadWrite); ds << *item.data(); d->mText = item.toString(); @@ -65,9 +65,9 @@ const char* KSVDrag::format (int i) const } } -QByteArray KSVDrag::encodedData (const char* format) const +TQByteArray KSVDrag::encodedData (const char* format) const { - QByteArray res; + TQByteArray res; if (!strcmp (format, "application/x-ksysv")) { @@ -75,22 +75,22 @@ QByteArray KSVDrag::encodedData (const char* format) const } else if (!strcmp (format, "text/plain")) { - QDataStream ds (res, IO_ReadWrite); + TQDataStream ds (res, IO_ReadWrite); ds << d->mText; } else if (!strcmp (format, "text/uri-list")) { - res = QCString(d->mURL.url().latin1()).copy(); + res = TQCString(d->mURL.url().latin1()).copy(); } return res; } -bool KSVDrag::decodeNative (const QMimeSource* mime, KSVData& data) +bool KSVDrag::decodeNative (const TQMimeSource* mime, KSVData& data) { if (mime && mime->provides ("application/x-ksysv")) { - QDataStream ds (mime->encodedData ("application/x-ksysv"), IO_ReadOnly); + TQDataStream ds (mime->encodedData ("application/x-ksysv"), IO_ReadOnly); ds >> data; return true; diff --git a/ksysv/ksvdrag.h b/ksysv/ksvdrag.h index 272f16d..bbbb415 100644 --- a/ksysv/ksvdrag.h +++ b/ksysv/ksvdrag.h @@ -3,7 +3,7 @@ #ifndef KSVDRAG_H #define KSVDRAG_H -#include +#include class KSVData; class KSVItem; @@ -14,14 +14,14 @@ class KSVDrag : public QDragObject Q_OBJECT public: - KSVDrag (const KSVData& item, QWidget* dragSource = 0L, const char* name = 0L); - KSVDrag (const KSVItem& item, QWidget* dragSource = 0L, const char* name = 0L); + KSVDrag (const KSVData& item, TQWidget* dragSource = 0L, const char* name = 0L); + KSVDrag (const KSVItem& item, TQWidget* dragSource = 0L, const char* name = 0L); virtual ~KSVDrag(); virtual const char* format (int i) const; - QByteArray encodedData (const char*) const; + TQByteArray encodedData (const char*) const; - static bool decodeNative (const QMimeSource*, KSVData&); + static bool decodeNative (const TQMimeSource*, KSVData&); private: enum diff --git a/ksysv/ksvdraglist.cpp b/ksysv/ksvdraglist.cpp index b0bd9bd..ea2e264 100644 --- a/ksysv/ksvdraglist.cpp +++ b/ksysv/ksvdraglist.cpp @@ -33,16 +33,16 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -58,7 +58,7 @@ #include "ActionList.h" KSVItem::KSVItem (KListView* view) - : QListViewItem (view), + : TQListViewItem (view), mData (new KSVData()), mConfig (KSVConfig::self()), mNewNormalColor (mConfig->newNormalColor()), @@ -69,7 +69,7 @@ KSVItem::KSVItem (KListView* view) } KSVItem::KSVItem (const KSVItem& item) - : QListViewItem (item.listView()), + : TQListViewItem (item.listView()), mData (new KSVData(*item.mData)), mConfig (KSVConfig::self()), mNewNormalColor (mConfig->newNormalColor()), @@ -84,7 +84,7 @@ KSVItem::KSVItem (const KSVItem& item) } KSVItem::KSVItem (KSVDragList* view, const KSVData& data) - : QListViewItem (view), + : TQListViewItem (view), mData (new KSVData (data)), mConfig (KSVConfig::self()), mNewNormalColor (mConfig->newNormalColor()), @@ -105,13 +105,13 @@ void KSVItem::copy (const KSVData& item) setText (ServiceName, mData->label()); } -QString KSVItem::key (int, bool) const +TQString KSVItem::key (int, bool) const { return mData->numberString() + mData->label(); } -KSVItem::KSVItem (KListView* view, QString file, QString path, QString label, Q_INT8 nr ) - : QListViewItem (view), +KSVItem::KSVItem (KListView* view, TQString file, TQString path, TQString label, Q_INT8 nr ) + : TQListViewItem (view), mData (new KSVData (file, path, label, nr)), mConfig (KSVConfig::self()), mNewNormalColor (mConfig->newNormalColor()), @@ -128,7 +128,7 @@ KSVItem::~KSVItem() delete mData; } -void KSVItem::paintCell (QPainter* p, const QColorGroup& cg, int column, int width, int align) +void KSVItem::paintCell (TQPainter* p, const TQColorGroup& cg, int column, int width, int align) { switch (column) { @@ -141,30 +141,30 @@ void KSVItem::paintCell (QPainter* p, const QColorGroup& cg, int column, int wid break; } - QColorGroup colors = cg; + TQColorGroup colors = cg; if (mData->newEntry()) { - colors.setColor (QColorGroup::Text, mNewNormalColor); - colors.setColor (QColorGroup::HighlightedText, mNewSelectedColor); + colors.setColor (TQColorGroup::Text, mNewNormalColor); + colors.setColor (TQColorGroup::HighlightedText, mNewSelectedColor); } else if (mData->changed()) { - colors.setColor (QColorGroup::Text, mChangedNormalColor); - colors.setColor (QColorGroup::HighlightedText, mChangedSelectedColor); + colors.setColor (TQColorGroup::Text, mChangedNormalColor); + colors.setColor (TQColorGroup::HighlightedText, mChangedSelectedColor); } - QListViewItem::paintCell (p, colors, column, width, align); + TQListViewItem::paintCell (p, colors, column, width, align); } -QString KSVItem::toString() const +TQString KSVItem::toString() const { return filenameAndPath(); } -QString KSVItem::tooltip () const +TQString KSVItem::tooltip () const { - QString result; + TQString result; if (mConfig->showDescription()) { @@ -191,20 +191,20 @@ void KSVItem::setNew ( bool val ) } -QPixmap KSVItem::paintDragIcon (const QFont& font, const QColorGroup&) const +TQPixmap KSVItem::paintDragIcon (const TQFont& font, const TQColorGroup&) const { - QFontMetrics metric (font); - QRect textRect = metric.boundingRect (label()); - const QPixmap& icon = *pixmap (Icon); + TQFontMetrics metric (font); + TQRect textRect = metric.boundingRect (label()); + const TQPixmap& icon = *pixmap (Icon); const int margin = listView()->itemMargin(); const int width = icon.width() + margin * 2 + textRect.width(); const int height = kMax (icon.height(), textRect.height()); - QPixmap result (width, height); + TQPixmap result (width, height); result.fill (white); - QPainter p (&result); + TQPainter p (&result); p.drawPixmap (0, 0, icon); p.setFont (font); @@ -214,7 +214,7 @@ QPixmap KSVItem::paintDragIcon (const QFont& font, const QColorGroup&) const label()); p.end(); - QBitmap mask (width, height); + TQBitmap mask (width, height); p.begin (&mask); p.setFont (font); @@ -228,35 +228,35 @@ QPixmap KSVItem::paintDragIcon (const QFont& font, const QColorGroup&) const AlignLeft | AlignVCenter, label()); - QBrush brush (color0); + TQBrush brush (color0); brush.setStyle(Dense5Pattern); p.fillRect (0, 0, width, height, brush); p.end(); result.setMask(mask); - result.setOptimization(QPixmap::BestOptim); + result.setOptimization(TQPixmap::BestOptim); return result; } -void KSVItem::setIcon (const QPixmap& icon) +void KSVItem::setIcon (const TQPixmap& icon) { setPixmap (Icon, icon); } -void KSVItem::setLabel (const QString& label) +void KSVItem::setLabel (const TQString& label) { mData->setLabel (label); setText (ServiceName, label); } -void KSVItem::setRunlevel (const QString& runlevel) +void KSVItem::setRunlevel (const TQString& runlevel) { mData->setRunlevel (runlevel); } -void KSVItem::setFilename (const QString& file) +void KSVItem::setFilename (const TQString& file) { mData->setFilename (file); } @@ -268,27 +268,27 @@ void KSVItem::setNumber (Q_INT8 nr) setText(SortNumber, mData->numberString()); } -void KSVItem::setPath (const QString& path) +void KSVItem::setPath (const TQString& path) { mData->setPath (path); } -void KSVItem::setNewNormalColor (const QColor& col) +void KSVItem::setNewNormalColor (const TQColor& col) { mNewNormalColor = col; } -void KSVItem::setNewSelectedColor (const QColor& col) +void KSVItem::setNewSelectedColor (const TQColor& col) { mNewSelectedColor = col; } -void KSVItem::setChangedNormalColor (const QColor& col) +void KSVItem::setChangedNormalColor (const TQColor& col) { mChangedNormalColor = col; } -void KSVItem::setChangedSelectedColor (const QColor& col) +void KSVItem::setChangedSelectedColor (const TQColor& col) { mChangedSelectedColor = col; } @@ -298,7 +298,7 @@ void KSVItem::setChanged (bool val) mData->setChanged (val); } -void KSVItem::setOriginalRunlevel (const QString& rl) +void KSVItem::setOriginalRunlevel (const TQString& rl) { mData->setOriginalRunlevel (rl); } @@ -309,7 +309,7 @@ void KSVItem::setOriginalRunlevel (const QString& rl) // KSVDragList //----------------------- -KSVDragList::KSVDragList ( QWidget* parent, const char* name ) +KSVDragList::KSVDragList ( TQWidget* parent, const char* name ) : KListView (parent, name), mItemToDrag (0L), mDragMenu (new KPopupMenu (this)), @@ -326,7 +326,7 @@ KSVDragList::KSVDragList ( QWidget* parent, const char* name ) setAcceptDrops(true); setDropVisualizer (true); - QHeader* h = header(); + TQHeader* h = header(); h->setClickEnabled (false); addColumn (i18n("No.")); // SortNumber @@ -358,8 +358,8 @@ KSVDragList::KSVDragList ( QWidget* parent, const char* name ) mRMList.setAutoDelete(true); // catch drops - connect (this, SIGNAL (dropped (QDropEvent*, QListViewItem*)), - this, SLOT (drop (QDropEvent*, QListViewItem*))); + connect (this, TQT_SIGNAL (dropped (TQDropEvent*, TQListViewItem*)), + this, TQT_SLOT (drop (TQDropEvent*, TQListViewItem*))); } KSVDragList::~KSVDragList() @@ -370,11 +370,11 @@ KSVDragList::~KSVDragList() delete toolTip; } -void KSVDragList::initItem (QString file, QString path, QString name, Q_INT8 nr) +void KSVDragList::initItem (TQString file, TQString path, TQString name, Q_INT8 nr) { KSVItem* tmp = new KSVItem(this, file, path, name, nr); - tmp->setRunlevel(QObject::name()); - tmp->setOriginalRunlevel(QObject::name()); + tmp->setRunlevel(TQObject::name()); + tmp->setOriginalRunlevel(TQObject::name()); tmp->setIcon (mIcon); @@ -388,11 +388,11 @@ void KSVDragList::initItem (QString file, QString path, QString name, Q_INT8 nr) repaint(false); } -void KSVDragList::setDefaultIcon (const QPixmap& icon) +void KSVDragList::setDefaultIcon (const TQPixmap& icon) { mIcon = icon; - for (QListViewItemIterator it (firstChild()); it.current(); ++it) + for (TQListViewItemIterator it (firstChild()); it.current(); ++it) { static_cast (it.current())->setIcon (mIcon); } @@ -405,12 +405,12 @@ void KSVDragList::clear () clearRMList(); } -void KSVDragList::setNewNormalColor ( const QColor& col ) +void KSVDragList::setNewNormalColor ( const TQColor& col ) { mNewNormalColor = col; KSVItem* item; - for (QListViewItemIterator it (firstChild()); + for (TQListViewItemIterator it (firstChild()); (item = static_cast(it.current())); ++it) { @@ -418,12 +418,12 @@ void KSVDragList::setNewNormalColor ( const QColor& col ) } } -void KSVDragList::setNewSelectedColor (const QColor& col) +void KSVDragList::setNewSelectedColor (const TQColor& col) { mNewSelectedColor = col; KSVItem* item; - for (QListViewItemIterator it (firstChild()); + for (TQListViewItemIterator it (firstChild()); (item = static_cast(it.current())); ++it) { @@ -431,7 +431,7 @@ void KSVDragList::setNewSelectedColor (const QColor& col) } } -Q_INT8 KSVDragList::generateNumber (const QString& label, +Q_INT8 KSVDragList::generateNumber (const TQString& label, const KSVData* itemBelow, const KSVData* itemAbove) const { Q_INT8 high = itemBelow ? itemBelow->number() : -1; @@ -468,12 +468,12 @@ Q_INT8 KSVDragList::generateNumber (Q_INT8 high, Q_INT8 low) const return result; } -void KSVDragList::setChangedNormalColor (const QColor& col) +void KSVDragList::setChangedNormalColor (const TQColor& col) { mChangedNormalColor = col; KSVItem* item; - for (QListViewItemIterator it (firstChild()); + for (TQListViewItemIterator it (firstChild()); (item = static_cast (it.current())); ++it) { @@ -481,12 +481,12 @@ void KSVDragList::setChangedNormalColor (const QColor& col) } } -void KSVDragList::setChangedSelectedColor (const QColor& col) +void KSVDragList::setChangedSelectedColor (const TQColor& col) { mChangedSelectedColor = col; KSVItem* item; - for (QListViewItemIterator it (firstChild()); + for (TQListViewItemIterator it (firstChild()); (item = static_cast (it.current())); ++it) { @@ -498,7 +498,7 @@ KSVItem* KSVDragList::match (const KSVData& data) { KSVItem* res = 0L; - for (QListViewItemIterator it (this); + for (TQListViewItemIterator it (this); (res = static_cast (it.current())); ++it) { @@ -539,7 +539,7 @@ void KSVDragList::startDrag () } //KSVDrag* KSVDragList::dragObject () -QDragObject* KSVDragList::dragObject () +TQDragObject* KSVDragList::dragObject () { if (mItemToDrag) { @@ -549,14 +549,14 @@ QDragObject* KSVDragList::dragObject () return 0L; } -bool KSVDragList::acceptDrag (QDropEvent* e) const +bool KSVDragList::acceptDrag (TQDropEvent* e) const { e->acceptAction (); return acceptDrops() && e->provides ("application/x-ksysv"); } -void KSVDragList::focusInEvent (QFocusEvent* e) +void KSVDragList::focusInEvent (TQFocusEvent* e) { KListView::focusInEvent(e); @@ -575,7 +575,7 @@ bool KSVDragList::removeFromRMList (const KSVData& item) { KSVData* res = 0L; - for (QPtrListIterator it (mRMList); + for (TQPtrListIterator it (mRMList); it.current(); ++it) { @@ -666,15 +666,15 @@ bool KSVDragList::insert (const KSVData& data, const KSVItem* where, KSVAction*& return success; } -void KSVDragList::drop (QDropEvent* e, QListViewItem* after) +void KSVDragList::drop (TQDropEvent* e, TQListViewItem* after) { KSVData data; KSVDragList* source = static_cast (e->source()); - QPopupMenu* menu = 0L; + TQPopupMenu* menu = 0L; // hack to empty the cursor stack after DND - QApplication::restoreOverrideCursor(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); if ((!source) || (!strcmp(source->name(), "Scripts"))) menu = mDragCopyMenu; @@ -687,10 +687,10 @@ void KSVDragList::drop (QDropEvent* e, QListViewItem* after) { int res = -1; - if (e->action() == QDropEvent::Copy && source != this) + if (e->action() == TQDropEvent::Copy && source != this) res = Copy; else - res = menu->exec (QCursor::pos(), 1); + res = menu->exec (TQCursor::pos(), 1); if (res == -1) // operation cancelled return; @@ -720,7 +720,7 @@ bool KSVDragList::addToRMList (const KSVData& item) { KSVData* res = 0L; - for (QPtrListIterator it (mRMList); + for (TQPtrListIterator it (mRMList); it.current(); ++it) { @@ -753,7 +753,7 @@ void KSVDragList::setEnabled (bool enable) if (testWState (WState_Disabled)) { clearWState (WState_Disabled); - // setBackgroundFromMode(); // this is private in QWidget... + // setBackgroundFromMode(); // this is private in TQWidget... // well it doesn't really matter in this case enabledChange( TRUE ); } @@ -765,7 +765,7 @@ void KSVDragList::setEnabled (bool enable) if (focusWidget() == this) focusNextPrevChild (TRUE); setWState (WState_Disabled); - // setBackgroundFromMode(); // this is private in QWidget... + // setBackgroundFromMode(); // this is private in TQWidget... // well it doesn't really matter in this case enabledChange (FALSE); } @@ -776,7 +776,7 @@ void KSVDragList::setEnabled (bool enable) // KServiceDragList -KServiceDragList::KServiceDragList (QWidget* parent, const char* name) +KServiceDragList::KServiceDragList (TQWidget* parent, const char* name) : KSVDragList (parent, name) { } diff --git a/ksysv/ksvdraglist.h b/ksysv/ksvdraglist.h index f5474b8..dfc9285 100644 --- a/ksysv/ksvdraglist.h +++ b/ksysv/ksvdraglist.h @@ -34,9 +34,9 @@ #ifndef KSVDRAGLIST_H #define KSVDRAGLIST_H -#include -#include -#include +#include +#include +#include #include @@ -67,10 +67,10 @@ public: KSVItem (KListView*); KSVItem (const KSVItem&); explicit KSVItem (KSVDragList*, const KSVData&); - KSVItem (KListView* view, QString file, QString path, QString label, Q_INT8 nr ); + KSVItem (KListView* view, TQString file, TQString path, TQString label, Q_INT8 nr ); virtual ~KSVItem (); - virtual QString key (int col, bool ascending) const; + virtual TQString key (int col, bool ascending) const; inline bool isChanged() const { return mData->changed(); } @@ -78,15 +78,15 @@ public: inline bool isLabelChanged() const { return mData->labelChanged(); } inline bool isNew() const { return mData->newEntry(); } - inline const QString& oldFilename() const { return mData->oldFilename(); } - inline const QString& filename() const { return mData->filename(); } - inline const QString& oldLabel() const { return mData->oldLabel(); } - inline const QString& label() const { return mData->label(); } - inline const QString& runlevel() const { return mData->runlevel(); } + inline const TQString& oldFilename() const { return mData->oldFilename(); } + inline const TQString& filename() const { return mData->filename(); } + inline const TQString& oldLabel() const { return mData->oldLabel(); } + inline const TQString& label() const { return mData->label(); } + inline const TQString& runlevel() const { return mData->runlevel(); } - inline QString filenameAndPath() const { return mData->filenameAndPath (); } + inline TQString filenameAndPath() const { return mData->filenameAndPath (); } - inline const QString& path() const { return mData->path(); } + inline const TQString& path() const { return mData->path(); } inline Q_INT8 number() const { return mData->number(); } inline Q_INT8 oldNumber() const { return mData->oldNumber(); } @@ -96,46 +96,46 @@ public: KSVData* data () { return mData; } const KSVData* data () const { return mData; } - QString toString () const; + TQString toString () const; inline bool operator== (const KSVItem & rhs) const { return mData == rhs.mData; } - inline const QColor& newNormalColor () const + inline const TQColor& newNormalColor () const { return mNewNormalColor; } - inline const QColor& changedNormalColor () const + inline const TQColor& changedNormalColor () const { return mChangedNormalColor; } - inline QString originalRunlevel() const { return mData->originalRunlevel(); } + inline TQString originalRunlevel() const { return mData->originalRunlevel(); } - void setIcon (const QPixmap& icon); - void setLabel (const QString& label); - void setFilename (const QString& file); - void setRunlevel (const QString& runlevel); + void setIcon (const TQPixmap& icon); + void setLabel (const TQString& label); + void setFilename (const TQString& file); + void setRunlevel (const TQString& runlevel); void setNumber (Q_INT8 nr); - void setPath (const QString& path); + void setPath (const TQString& path); void setChanged (bool); - void setNewNormalColor (const QColor&); - void setChangedNormalColor (const QColor&); - void setNewSelectedColor (const QColor&); - void setChangedSelectedColor (const QColor&); + void setNewNormalColor (const TQColor&); + void setChangedNormalColor (const TQColor&); + void setNewSelectedColor (const TQColor&); + void setChangedSelectedColor (const TQColor&); void setNew (bool); - void setOriginalRunlevel (const QString&); + void setOriginalRunlevel (const TQString&); inline void setNumberChanged (bool val) { mData->setNumberChanged (val); } - QString tooltip () const; - virtual void paintCell (QPainter* p, const QColorGroup& cg, int column, int width, int align); + TQString tooltip () const; + virtual void paintCell (TQPainter* p, const TQColorGroup& cg, int column, int width, int align); protected: friend class KSVDragList; friend class KServiceDragList; - QPixmap paintDragIcon (const QFont& f, const QColorGroup& g) const; + TQPixmap paintDragIcon (const TQFont& f, const TQColorGroup& g) const; private: friend class KSVDrag; @@ -143,10 +143,10 @@ private: KSVData* mData; KSVConfig* mConfig; - QColor mNewNormalColor; - QColor mNewSelectedColor; - QColor mChangedNormalColor; - QColor mChangedSelectedColor; + TQColor mNewNormalColor; + TQColor mNewSelectedColor; + TQColor mChangedNormalColor; + TQColor mChangedSelectedColor; }; class KSVDragList : public KListView @@ -154,7 +154,7 @@ class KSVDragList : public KListView Q_OBJECT public: - KSVDragList ( QWidget* parent = 0, const char* name = 0 ); + KSVDragList ( TQWidget* parent = 0, const char* name = 0 ); virtual ~KSVDragList(); virtual void clear(); @@ -162,12 +162,12 @@ public: inline bool displayToolTips () const { return mDisplayToolTips; } inline bool commonToolTips () const { return mCommonToolTips; } - inline const QString& tooltip () const { return mToolTip; } - inline const QString& horizontalScrollBarTip () const { return mHorizontalTip; } - inline const QString& verticalScrollBarTip () const { return mVerticalTip; } + inline const TQString& tooltip () const { return mToolTip; } + inline const TQString& horizontalScrollBarTip () const { return mHorizontalTip; } + inline const TQString& verticalScrollBarTip () const { return mVerticalTip; } - virtual void initItem (QString file, QString path, QString name, Q_INT8 nr); - QPtrList& getDeletedItems() { return mRMList; } + virtual void initItem (TQString file, TQString path, TQString name, Q_INT8 nr); + TQPtrList& getDeletedItems() { return mRMList; } /** * @return whether this is the currently "selected" KSVDragList. @@ -185,7 +185,7 @@ public: bool insert (const KSVData& data, const KSVItem* where, KSVAction*& action); - inline const QPixmap& defaultIcon() const { return mIcon; } + inline const TQPixmap& defaultIcon() const { return mIcon; } bool removeFromRMList (const KSVData&); bool addToRMList (const KSVData&); @@ -195,29 +195,29 @@ public: inline void setDisplayToolTips (bool val) { mDisplayToolTips = val; } inline void setCommonToolTips (bool val) { mCommonToolTips = val; } - inline void setHorizontalScrollBarTip (const QString& t) { mHorizontalTip = t; } - inline void setVerticalScrollBarTip (const QString& t) { mVerticalTip = t; } - inline void setToolTip (const QString& t) { mToolTip = t; } + inline void setHorizontalScrollBarTip (const TQString& t) { mHorizontalTip = t; } + inline void setVerticalScrollBarTip (const TQString& t) { mVerticalTip = t; } + inline void setToolTip (const TQString& t) { mToolTip = t; } public slots: - void setNewNormalColor (const QColor &); - void setChangedNormalColor (const QColor &); - void setNewSelectedColor (const QColor &); - void setChangedSelectedColor (const QColor &); + void setNewNormalColor (const TQColor &); + void setChangedNormalColor (const TQColor &); + void setNewSelectedColor (const TQColor &); + void setChangedSelectedColor (const TQColor &); void setOrigin (bool); inline void slotNewOrigin() { setOrigin (false); } - void setDefaultIcon (const QPixmap& icon); + void setDefaultIcon (const TQPixmap& icon); - void drop (QDropEvent*, QListViewItem*); + void drop (TQDropEvent*, TQListViewItem*); virtual void setEnabled (bool); protected: - virtual void focusInEvent (QFocusEvent*); - virtual bool acceptDrag (QDropEvent*) const; - virtual QDragObject* dragObject (); + virtual void focusInEvent (TQFocusEvent*); + virtual bool acceptDrag (TQDropEvent*) const; + virtual TQDragObject* dragObject (); // virtual KSVDrag* dragObject (); virtual void startDrag (); @@ -232,20 +232,20 @@ protected: /** * A convenience function that also takes the label into account */ - Q_INT8 generateNumber (const QString& label, const KSVData* itemAbove, const KSVData* itemBelow) const; + Q_INT8 generateNumber (const TQString& label, const KSVData* itemAbove, const KSVData* itemBelow) const; KSVItem* mItemToDrag; private: - QPixmap mIcon; + TQPixmap mIcon; bool mOrigin; - QPtrList mRMList; + TQPtrList mRMList; - QColor mNewNormalColor; - QColor mNewSelectedColor; - QColor mChangedNormalColor; - QColor mChangedSelectedColor; + TQColor mNewNormalColor; + TQColor mNewSelectedColor; + TQColor mChangedNormalColor; + TQColor mChangedSelectedColor; KPopupMenu* mDragMenu; KPopupMenu* mDragCopyMenu; @@ -253,7 +253,7 @@ private: KDLToolTip* toolTip; typedef enum { Copy, Move } DragAction; - QString mToolTip, mHorizontalTip, mVerticalTip; + TQString mToolTip, mHorizontalTip, mVerticalTip; bool mDisplayToolTips, mCommonToolTips; signals: @@ -267,7 +267,7 @@ signals: class KServiceDragList : public KSVDragList { public: - KServiceDragList (QWidget* parent = 0L, const char* name = 0L); + KServiceDragList (TQWidget* parent = 0L, const char* name = 0L); virtual ~KServiceDragList (); protected: diff --git a/ksysv/ksvlookandfeel.cpp b/ksysv/ksvlookandfeel.cpp index 29e4de5..0e0fa58 100644 --- a/ksysv/ksvlookandfeel.cpp +++ b/ksysv/ksvlookandfeel.cpp @@ -25,8 +25,8 @@ */ #include "ksvlookandfeel.h" -#include -#include +#include +#include #include #include @@ -35,7 +35,7 @@ * Constructs a KSVLookAndFeel which is a child of 'parent', with the * name 'name' and widget flags set to 'f' */ -KSVLookAndFeel::KSVLookAndFeel( QWidget* parent, const char* name, WFlags fl ) +KSVLookAndFeel::KSVLookAndFeel( TQWidget* parent, const char* name, WFlags fl ) : LookAndFeel( parent, name, fl ) { mTopLayout->setSpacing (KDialog::spacingHint()); @@ -70,18 +70,18 @@ void KSVLookAndFeel::chooseServiceFont() emit configChanged(); } -void KSVLookAndFeel::setServiceFont (const QFont& font) +void KSVLookAndFeel::setServiceFont (const TQFont& font) { mServiceFontPreview->setFont(font); - mServiceFontPreview->setText(font.family() + " " + QString::number(font.pointSize())); + mServiceFontPreview->setText(font.family() + " " + TQString::number(font.pointSize())); mServiceFont = font; } -void KSVLookAndFeel::setNumberFont (const QFont& font) +void KSVLookAndFeel::setNumberFont (const TQFont& font) { mNumberFontPreview->setFont(font); - mNumberFontPreview->setText(font.family() + " " + QString::number(font.pointSize())); + mNumberFontPreview->setText(font.family() + " " + TQString::number(font.pointSize())); mNumberFont = font; } diff --git a/ksysv/ksvlookandfeel.h b/ksysv/ksvlookandfeel.h index 5e59a91..7f825cf 100644 --- a/ksysv/ksvlookandfeel.h +++ b/ksysv/ksvlookandfeel.h @@ -8,20 +8,20 @@ #define KSVLOOKANDFEEL_H #include "lookandfeelconfig.h" -#include +#include class KSVLookAndFeel : public LookAndFeel { Q_OBJECT public: - KSVLookAndFeel( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + KSVLookAndFeel( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~KSVLookAndFeel(); - inline const QFont& serviceFont() const { return mServiceFont; } - inline const QFont& numberFont() const { return mNumberFont; } + inline const TQFont& serviceFont() const { return mServiceFont; } + inline const TQFont& numberFont() const { return mNumberFont; } - void setServiceFont (const QFont& font); - void setNumberFont (const QFont& font); + void setServiceFont (const TQFont& font); + void setNumberFont (const TQFont& font); signals: void configChanged(); @@ -32,8 +32,8 @@ protected slots: void slotChanged(); private: - QFont mServiceFont; - QFont mNumberFont; + TQFont mServiceFont; + TQFont mNumberFont; }; #endif // KSVLOOKANDFEEL_H diff --git a/ksysv/ksvmiscconfig.cpp b/ksysv/ksvmiscconfig.cpp index 05e9126..a3c27ac 100644 --- a/ksysv/ksvmiscconfig.cpp +++ b/ksysv/ksvmiscconfig.cpp @@ -25,8 +25,8 @@ */ #include "ksvmiscconfig.h" -#include -#include +#include +#include #include @@ -34,7 +34,7 @@ * Constructs a KSVMiscConfig which is a child of 'parent', with the * name 'name' and widget flags set to 'f' */ -KSVMiscConfig::KSVMiscConfig( QWidget* parent, const char* name, WFlags fl ) +KSVMiscConfig::KSVMiscConfig( TQWidget* parent, const char* name, WFlags fl ) : MiscConfiguration( parent, name, fl ) { mSpacer->setFixedHeight (KDialog::spacingHint()); diff --git a/ksysv/ksvmiscconfig.h b/ksysv/ksvmiscconfig.h index 8195d00..cf332e1 100644 --- a/ksysv/ksvmiscconfig.h +++ b/ksysv/ksvmiscconfig.h @@ -32,7 +32,7 @@ class KSVMiscConfig : public MiscConfiguration Q_OBJECT public: - KSVMiscConfig( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + KSVMiscConfig( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~KSVMiscConfig(); signals: diff --git a/ksysv/ksvpathconfig.cpp b/ksysv/ksvpathconfig.cpp index bf7be35..cba5b77 100644 --- a/ksysv/ksvpathconfig.cpp +++ b/ksysv/ksvpathconfig.cpp @@ -32,7 +32,7 @@ * Constructs a KSVPathConfig which is a child of 'parent', with the * name 'name' and widget flags set to 'f' */ -KSVPathConfig::KSVPathConfig( QWidget* parent, const char* name, WFlags fl ) +KSVPathConfig::KSVPathConfig( TQWidget* parent, const char* name, WFlags fl ) : PathConfiguration( parent, name, fl ) { mSpacer->setFixedHeight (KDialog::spacingHint()); @@ -48,7 +48,7 @@ KSVPathConfig::~KSVPathConfig() void KSVPathConfig::browseServices() { - QString path = KFileDialog::getExistingDirectory(mServicesPath->text(), this); + TQString path = KFileDialog::getExistingDirectory(mServicesPath->text(), this); if (!path.isEmpty()) mServicesPath->setText(path); @@ -58,7 +58,7 @@ void KSVPathConfig::browseServices() void KSVPathConfig::browseRunlevels() { - QString path = KFileDialog::getExistingDirectory(mRunlevelPath->text(), this); + TQString path = KFileDialog::getExistingDirectory(mRunlevelPath->text(), this); if (!path.isEmpty()) mRunlevelPath->setText(path); diff --git a/ksysv/ksvpathconfig.h b/ksysv/ksvpathconfig.h index 8cced64..fe73e56 100644 --- a/ksysv/ksvpathconfig.h +++ b/ksysv/ksvpathconfig.h @@ -32,7 +32,7 @@ class KSVPathConfig : public PathConfiguration Q_OBJECT public: - KSVPathConfig( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + KSVPathConfig( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~KSVPathConfig(); signals: diff --git a/ksysv/trash.cpp b/ksysv/trash.cpp index 8420687..aab746c 100644 --- a/ksysv/trash.cpp +++ b/ksysv/trash.cpp @@ -14,9 +14,9 @@ // Trash Can -#include -#include -#include +#include +#include +#include #include #include @@ -29,23 +29,23 @@ #include "ActionList.h" #include "trash.h" -KSVTrash::KSVTrash (QWidget* parent, const char* name) - : QFrame (parent, name), +KSVTrash::KSVTrash (TQWidget* parent, const char* name) + : TQFrame (parent, name), mKIL (KGlobal::iconLoader()), - mLabel (new QLabel(this)), + mLabel (new TQLabel(this)), mOpen (false) { setLineWidth(1); setMidLineWidth(0); - setFrameStyle (QFrame::StyledPanel | QFrame::Sunken); + setFrameStyle (TQFrame::StyledPanel | TQFrame::Sunken); mLabel->setPixmap(mKIL->loadIcon("trashcan_empty", KIcon::Desktop)); mPixmapWidth = mLabel->pixmap()->width(); mLabel->setGeometry(5, 7, mPixmapWidth, mPixmapWidth); - QToolTip::add(mLabel, i18n("Drag here to remove services")); - QToolTip::add(this, i18n("Drag here to remove services")); + TQToolTip::add(mLabel, i18n("Drag here to remove services")); + TQToolTip::add(this, i18n("Drag here to remove services")); setMinimumSize(sizeHint()); setAcceptDrops(true); @@ -58,7 +58,7 @@ KSVTrash::~KSVTrash() { } -void KSVTrash::dropEvent (QDropEvent* e) +void KSVTrash::dropEvent (TQDropEvent* e) { KSVData data; KSVDragList* list = static_cast (e->source()); @@ -80,12 +80,12 @@ void KSVTrash::dropEvent (QDropEvent* e) } } -void KSVTrash::dragMoveEvent ( QDragMoveEvent* e ) +void KSVTrash::dragMoveEvent ( TQDragMoveEvent* e ) { if (e->provides ("application/x-ksysv") && e->source() && strcmp (e->source()->name(), "Scripts")) { - QPainter p; + TQPainter p; p.begin(mLabel); p.drawPixmap( 0, 0, mKIL->loadIcon("trashcan_full", KIcon::Desktop) ); @@ -98,7 +98,7 @@ void KSVTrash::dragMoveEvent ( QDragMoveEvent* e ) e->ignore(); } -void KSVTrash::dragLeaveEvent ( QDragLeaveEvent* ) +void KSVTrash::dragLeaveEvent ( TQDragLeaveEvent* ) { if (mOpen) { @@ -107,22 +107,22 @@ void KSVTrash::dragLeaveEvent ( QDragLeaveEvent* ) } } -bool KSVTrash::eventFilter( QObject *, QEvent *e ) +bool KSVTrash::eventFilter( TQObject *, TQEvent *e ) { switch (e->type()) { - case QEvent::DragMove: - dragMoveEvent ( static_cast (e) ); + case TQEvent::DragMove: + dragMoveEvent ( static_cast (e) ); return true; break; - case QEvent::DragLeave: - dragLeaveEvent ( static_cast (e) ); + case TQEvent::DragLeave: + dragLeaveEvent ( static_cast (e) ); return true; break; - case QEvent::Drop: - dropEvent ( static_cast (e) ); + case TQEvent::Drop: + dropEvent ( static_cast (e) ); return true; break; @@ -131,9 +131,9 @@ bool KSVTrash::eventFilter( QObject *, QEvent *e ) } } -QSize KSVTrash::sizeHint() const +TQSize KSVTrash::sizeHint() const { - static QSize size = QSize (mPixmapWidth + 2 * 5, mPixmapWidth + 2 * 7); + static TQSize size = TQSize (mPixmapWidth + 2 * 5, mPixmapWidth + 2 * 7); return size; } diff --git a/ksysv/trash.h b/ksysv/trash.h index 7772d19..40925e0 100644 --- a/ksysv/trash.h +++ b/ksysv/trash.h @@ -15,9 +15,9 @@ #ifndef KSV_TRASH_H #define KSV_TRASH_H -#include -#include -#include +#include +#include +#include // forward declarations class QLabel; @@ -30,32 +30,32 @@ class KSVTrash : public QFrame Q_OBJECT public: - KSVTrash (QWidget* parent = 0, const char* name = 0); + KSVTrash (TQWidget* parent = 0, const char* name = 0); virtual ~KSVTrash(); - virtual QSize sizeHint() const; + virtual TQSize sizeHint() const; protected: /** * Overridden from @ref QDropSite */ - virtual void dragMoveEvent ( QDragMoveEvent* ); + virtual void dragMoveEvent ( TQDragMoveEvent* ); /** * Overridden from @ref QDropSite */ - virtual void dragLeaveEvent ( QDragLeaveEvent* ); + virtual void dragLeaveEvent ( TQDragLeaveEvent* ); /** * Overridden from @ref QDropSite */ - virtual void dropEvent ( QDropEvent* ); + virtual void dropEvent ( TQDropEvent* ); - virtual bool eventFilter ( QObject*, QEvent* ); + virtual bool eventFilter ( TQObject*, TQEvent* ); private: KIconLoader* mKIL; - QLabel* mLabel; + TQLabel* mLabel; bool mOpen; int mPixmapWidth; diff --git a/kuser/addUser.cpp b/kuser/addUser.cpp index 4bd957e..347c46f 100644 --- a/kuser/addUser.cpp +++ b/kuser/addUser.cpp @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include #include @@ -38,18 +38,18 @@ #include addUser::addUser( KU::KUser *AUser, bool useprivategroup, - QWidget *parent, const char *name ) : + TQWidget *parent, const char *name ) : propdlg( AUser, useprivategroup, parent, name ) { - QGroupBox *group = new QGroupBox(frontpage); + TQGroupBox *group = new TQGroupBox(frontpage); group->setTitle(i18n("New Account Options")); - QVBoxLayout *groupLayout = new QVBoxLayout(group, marginHint(), spacingHint()); + TQVBoxLayout *groupLayout = new TQVBoxLayout(group, marginHint(), spacingHint()); groupLayout->addSpacing(group->fontMetrics().lineSpacing()); groupLayout->setAutoAdd(true); - createhome = new QCheckBox(i18n("Create home folder"), group); + createhome = new TQCheckBox(i18n("Create home folder"), group); createhome->setChecked(true); - copyskel = new QCheckBox(i18n("Copy skeleton"), group); - connect(createhome, SIGNAL(toggled(bool)), copyskel, SLOT(setEnabled(bool))); + copyskel = new TQCheckBox(i18n("Copy skeleton"), group); + connect(createhome, TQT_SIGNAL(toggled(bool)), copyskel, TQT_SLOT(setEnabled(bool))); frontlayout->addMultiCellWidget(group, frontrow, frontrow, 0, 2); if ( useprivategroup ) pbprigr->setEnabled( false ); @@ -104,8 +104,8 @@ bool addUser::checkHome() struct stat s; int r; - QString h_dir = user->getHomeDir(); - r = stat( QFile::encodeName(h_dir), &s ); + TQString h_dir = user->getHomeDir(); + r = stat( TQFile::encodeName(h_dir), &s ); if ( (r == -1) && (errno == ENOENT) ) return true; @@ -115,7 +115,7 @@ bool addUser::checkHome() if ( KMessageBox:: warningContinueCancel ( 0, i18n("Folder %1 already exists!\n%2 may become owner and permissions may change.\nDo you really want to use %3?"). - arg(h_dir).arg(user->getName()).arg(h_dir), QString::null, KStdGuiItem::cont() ) == KMessageBox::Cancel ) + arg(h_dir).arg(user->getName()).arg(h_dir), TQString::null, KStdGuiItem::cont() ) == KMessageBox::Cancel ) return false; else @@ -130,14 +130,14 @@ bool addUser::checkHome() bool addUser::checkMailBox() { - QString mailboxpath; + TQString mailboxpath; KU::KUser *user = mUsers.first(); struct stat s; int r; - mailboxpath = QFile::decodeName(MAIL_SPOOL_DIR) + "/" + user->getName(); - r = stat(QFile::encodeName(mailboxpath), &s); + mailboxpath = TQFile::decodeName(MAIL_SPOOL_DIR) + "/" + user->getName(); + r = stat(TQFile::encodeName(mailboxpath), &s); if ((r == -1) && (errno == ENOENT)) return true; diff --git a/kuser/addUser.h b/kuser/addUser.h index 786bdea..0f16c95 100644 --- a/kuser/addUser.h +++ b/kuser/addUser.h @@ -21,14 +21,14 @@ #ifndef _KU_ADDUSER_H_ #define _KU_ADDUSER_H_ -#include +#include #include "propdlg.h" class addUser: public propdlg { Q_OBJECT public: addUser(KU::KUser *AUser, bool useprivategroup, - QWidget *parent = 0, const char *name = 0 ); + TQWidget *parent = 0, const char *name = 0 ); void setCreateHomeDir(bool b) { createhome->setChecked(b); } @@ -42,8 +42,8 @@ protected: bool checkHome(); bool checkMailBox(); - QCheckBox *createhome; - QCheckBox *copyskel; + TQCheckBox *createhome; + TQCheckBox *copyskel; }; #endif // _KU_ADDUSER_H diff --git a/kuser/delUser.cpp b/kuser/delUser.cpp index 1d545bc..b1ee7e0 100644 --- a/kuser/delUser.cpp +++ b/kuser/delUser.cpp @@ -18,23 +18,23 @@ #include "delUser.h" -#include -#include -#include +#include +#include +#include #include -delUser::delUser(KU::KUser *AUser, QWidget *parent, const char *name) +delUser::delUser(KU::KUser *AUser, TQWidget *parent, const char *name) : KDialogBase( parent, name, true, i18n("Delete User"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ) { - QVBox *page = makeVBoxMainWidget(); - new QLabel( i18n("

Deleting user %1" + TQVBox *page = makeVBoxMainWidget(); + new TQLabel( i18n("

Deleting user %1" "

Also perform the following actions:").arg(AUser->getName()), page); - m_deleteHomeDir = new QCheckBox(i18n("Delete &home folder: %1").arg(AUser->getHomeDir()), page); - QString mailboxpath = QFile::decodeName(MAIL_SPOOL_DIR) + "/" + AUser->getName(); - m_deleteMailBox = new QCheckBox(i18n("Delete &mailbox: %1").arg(mailboxpath), page); + m_deleteHomeDir = new TQCheckBox(i18n("Delete &home folder: %1").arg(AUser->getHomeDir()), page); + TQString mailboxpath = TQFile::decodeName(MAIL_SPOOL_DIR) + "/" + AUser->getName(); + m_deleteMailBox = new TQCheckBox(i18n("Delete &mailbox: %1").arg(mailboxpath), page); setButtonGuiItem(KDialogBase::Ok, KStdGuiItem::del()); } diff --git a/kuser/delUser.h b/kuser/delUser.h index 0317a9b..1e4bc21 100644 --- a/kuser/delUser.h +++ b/kuser/delUser.h @@ -21,14 +21,14 @@ #define _KU_DELUSER_H_ #include -#include +#include #include "kuser.h" class delUser: public KDialogBase { Q_OBJECT public: - delUser(KU::KUser *AUser, QWidget *parent = 0, const char *name = 0); + delUser(KU::KUser *AUser, TQWidget *parent = 0, const char *name = 0); bool getDeleteHomeDir() { return m_deleteHomeDir->isChecked(); } @@ -36,8 +36,8 @@ public: { return m_deleteMailBox->isChecked(); } private: - QCheckBox *m_deleteHomeDir; - QCheckBox *m_deleteMailBox; + TQCheckBox *m_deleteHomeDir; + TQCheckBox *m_deleteMailBox; }; #endif // _KU_DELUSER_H diff --git a/kuser/editDefaults.cpp b/kuser/editDefaults.cpp index 82aba32..75ca1e7 100644 --- a/kuser/editDefaults.cpp +++ b/kuser/editDefaults.cpp @@ -37,7 +37,7 @@ #include "passwordpolicy.h" #include "misc.h" -editDefaults::editDefaults( KConfigSkeleton *config, QWidget *parent, const char *name ) : +editDefaults::editDefaults( KConfigSkeleton *config, TQWidget *parent, const char *name ) : KConfigDialog( parent, name, config, IconList, Default|Ok|Apply|Cancel|Help, Ok, true ) { @@ -76,7 +76,7 @@ editDefaults::editDefaults( KConfigSkeleton *config, QWidget *parent, const char page3->addTab( page3b, i18n("Settings") ); page3c = new LdapSamba( this ); - connect( page3c->domQuery, SIGNAL(clicked()), SLOT(slotQueryClicked()) ); + connect( page3c->domQuery, TQT_SIGNAL(clicked()), TQT_SLOT(slotQueryClicked()) ); page3->addTab( page3c, i18n("Samba") ); addPage( page3, i18n("LDAP"), "", i18n("LDAP Source Settings") ); } @@ -91,9 +91,9 @@ void editDefaults::slotQueryClicked() mDomain.sid = ""; mDomain.ridbase = 1000; - QStringList attrs; - QString filter = "(objectClass=sambaDomain)"; - QString dom = page3c->kcfg_samdomain->text(); + TQStringList attrs; + TQString filter = "(objectClass=sambaDomain)"; + TQString dom = page3c->kcfg_samdomain->text(); if ( !dom.isEmpty() ) filter = "(&(sambaDomainName=" + dom + ")"+filter+")"; attrs.append("sambaDomainName"); attrs.append("sambaSID"); @@ -107,10 +107,10 @@ void editDefaults::slotQueryClicked() mLdif.startParsing(); KIO::Job *job = KIO::get( _url, true, false ); // job->addMetaData("no-auth-prompt","true"); - connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ), - this, SLOT( loadData( KIO::Job*, const QByteArray& ) ) ); - connect( job, SIGNAL( result( KIO::Job* ) ), - this, SLOT( loadResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( loadData( KIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( loadResult( KIO::Job* ) ) ); mProg = new KProgressDialog( this, 0, i18n("LDAP Query"), _url.prettyURL(), true ); mProg->progressBar()->setValue( 0 ); @@ -135,7 +135,7 @@ void editDefaults::slotQueryClicked() kdDebug() << "domQueryx" << endl; } -void editDefaults::loadData( KIO::Job*, const QByteArray& d ) +void editDefaults::loadData( KIO::Job*, const TQByteArray& d ) { KABC::LDIF::ParseVal ret; @@ -149,11 +149,11 @@ void editDefaults::loadData( KIO::Job*, const QByteArray& d ) switch ( ret ) { case KABC::LDIF::Item: if ( mLdif.attr() == "sambaDomainName" ) - mDomain.name = QString::fromUtf8( mLdif.val(), mLdif.val().size() ); + mDomain.name = TQString::fromUtf8( mLdif.val(), mLdif.val().size() ); else if ( mLdif.attr() == "sambaSID" ) - mDomain.sid = QString::fromUtf8( mLdif.val(), mLdif.val().size() ); + mDomain.sid = TQString::fromUtf8( mLdif.val(), mLdif.val().size() ); else if ( mLdif.attr() == "sambaAlgorithmicRidBase" ) - mDomain.ridbase = QString::fromUtf8( mLdif.val(), mLdif.val().size() ).toUInt(); + mDomain.ridbase = TQString::fromUtf8( mLdif.val(), mLdif.val().size() ).toUInt(); break; case KABC::LDIF::EndEntry: mProg->progressBar()->advance( 1 ); diff --git a/kuser/editDefaults.h b/kuser/editDefaults.h index dbe9dd6..c6d40c8 100644 --- a/kuser/editDefaults.h +++ b/kuser/editDefaults.h @@ -21,7 +21,7 @@ #ifndef _KU_EDITDEFAULTS_H_ #define _KU_EDITDEFAULTS_H_ -#include +#include #include #include #include @@ -32,27 +32,27 @@ namespace KABC { class LdapConfigWidget; } namespace KIO { class Job; } typedef struct SambaDomain { - QString name; - QString sid; + TQString name; + TQString sid; uint ridbase; }; class editDefaults : public KConfigDialog { Q_OBJECT public: - editDefaults( KConfigSkeleton *config, QWidget* parent, const char * name = 0 ); + editDefaults( KConfigSkeleton *config, TQWidget* parent, const char * name = 0 ); private: KProgressDialog *mProg; LdapSamba *page3c; KABC::LdapConfigWidget *ldconf; KABC::LDIF mLdif; bool mCancelled; - QString mErrorMsg; - QValueList mResult; + TQString mErrorMsg; + TQValueList mResult; SambaDomain mDomain; private slots: void slotQueryClicked(); - void loadData( KIO::Job*, const QByteArray& d ); + void loadData( KIO::Job*, const TQByteArray& d ); void loadResult( KIO::Job* job); }; diff --git a/kuser/editGroup.cpp b/kuser/editGroup.cpp index 1ef74d8..2f6a4cf 100644 --- a/kuser/editGroup.cpp +++ b/kuser/editGroup.cpp @@ -19,11 +19,11 @@ **/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -35,7 +35,7 @@ #include "editGroup.h" editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, - QWidget* parent, const char* name) + TQWidget* parent, const char* name) : KDialogBase(parent, name, true, i18n("Group Properties"), Ok | Cancel, Ok, true) { kg = akg; @@ -50,17 +50,17 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, rid.rid = 513; rid.name = i18n("Domain Users"); rid.desc = i18n("Users"); mRids.append( rid ); rid.rid = 514; rid.name = i18n("Domain Guests"); rid.desc = i18n("Guests"); mRids.append( rid ); - QFrame *page = makeMainWidget(); - QGridLayout *layout = new QGridLayout( page, 10, 3, marginHint(), spacingHint() ); - QLabel *lb; + TQFrame *page = makeMainWidget(); + TQGridLayout *layout = new TQGridLayout( page, 10, 3, marginHint(), spacingHint() ); + TQLabel *lb; - lb = new QLabel( page ); + lb = new TQLabel( page ); lb->setText(i18n("Group number:")); legid = new KLineEdit(page); // ensure it fits at least 20 characters legid->setText( "XXXXXXXXXXXXXXXXXXX" ); - legid->setText( QString::number(kg->getGID()) ); - legid->setValidator( new QIntValidator(this) ); + legid->setText( TQString::number(kg->getGID()) ); + legid->setValidator( new TQIntValidator(this) ); legid->setEnabled( mAdd ); legid->setReadOnly( ro ); lb->setBuddy( legid ); @@ -68,25 +68,25 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, layout->addMultiCellWidget( legid, 0, 0, 1, 2 ); if ( mSamba ) { - lb = new QLabel( page ); + lb = new TQLabel( page ); lb->setText(i18n("Group rid:")); lerid = new KComboBox( page ); lerid->setEditable( !ro ); - QValueList::Iterator it; + TQValueList::Iterator it; for ( it = mRids.begin(); it != mRids.end(); ++it ) { - lerid->insertItem( QString::number( (*it).rid ) + " - " + (*it).name ); + lerid->insertItem( TQString::number( (*it).rid ) + " - " + (*it).name ); } - lerid->setCurrentText( QString::number( sid.getRID() ) ); - lerid->setValidator (new QIntValidator(this) ); + lerid->setCurrentText( TQString::number( sid.getRID() ) ); + lerid->setValidator (new TQIntValidator(this) ); lerid->setEnabled( mAdd ); - connect( lerid, SIGNAL(activated(int)), SLOT(ridSelected(int)) ); + connect( lerid, TQT_SIGNAL(activated(int)), TQT_SLOT(ridSelected(int)) ); lb->setBuddy( lerid ); layout->addWidget( lb, 1, 0 ); layout->addMultiCellWidget( lerid, 1, 1, 1, 2 ); } - lb = new QLabel( page ); + lb = new TQLabel( page ); lb->setText(i18n("Group name:")); legrpname = new KLineEdit( page ); @@ -100,7 +100,7 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, layout->addMultiCellWidget( legrpname, 2, 2, 1, 2 ); if ( mSamba ) { - lb = new QLabel( page ); + lb = new TQLabel( page ); lb->setText(i18n("Description:")); ledesc = new KLineEdit(page); ledesc->setText( kg->getDesc() ); @@ -109,7 +109,7 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, layout->addWidget( lb, 3, 0 ); layout->addMultiCellWidget( ledesc, 3, 3, 1, 2 ); - lb = new QLabel( page ); + lb = new TQLabel( page ); lb->setText(i18n("Display name:")); ledispname = new KLineEdit(page); ledispname->setText( kg->getDisplayName() ); @@ -118,7 +118,7 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, layout->addWidget( lb, 4, 0 ); layout->addMultiCellWidget( ledispname, 4, 4, 1, 2 ); - lb = new QLabel( page ); + lb = new TQLabel( page ); lb->setText(i18n("Type:")); letype = new KComboBox( page ); letype->insertItem( i18n("Domain") ); @@ -139,7 +139,7 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, layout->addWidget( lb, 5, 0 ); layout->addMultiCellWidget( letype, 5, 5, 1, 2 ); - lb = new QLabel( page ); + lb = new TQLabel( page ); lb->setText(i18n("Domain SID:")); ledomsid = new KLineEdit(page); ledomsid->setText( sid.getDOM() ); @@ -148,42 +148,42 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, layout->addWidget( lb, 6, 0 ); layout->addMultiCellWidget( ledomsid, 6, 6, 1, 2 ); - cbsamba = new QCheckBox( i18n("Disable Samba group information"), page ); + cbsamba = new TQCheckBox( i18n("Disable Samba group information"), page ); layout->addMultiCellWidget( cbsamba, 7, 7, 0, 2 ); - connect( cbsamba, SIGNAL(toggled(bool)), ledesc, SLOT(setDisabled(bool)) ); - connect( cbsamba, SIGNAL(toggled(bool)), ledispname, SLOT(setDisabled(bool)) ); - connect( cbsamba, SIGNAL(toggled(bool)), letype, SLOT(setDisabled(bool)) ); - connect( cbsamba, SIGNAL(toggled(bool)), ledomsid, SLOT(setDisabled(bool)) ); - if ( mAdd ) connect( cbsamba, SIGNAL(toggled(bool)), lerid, SLOT(setDisabled(bool)) ); + connect( cbsamba, TQT_SIGNAL(toggled(bool)), ledesc, TQT_SLOT(setDisabled(bool)) ); + connect( cbsamba, TQT_SIGNAL(toggled(bool)), ledispname, TQT_SLOT(setDisabled(bool)) ); + connect( cbsamba, TQT_SIGNAL(toggled(bool)), letype, TQT_SLOT(setDisabled(bool)) ); + connect( cbsamba, TQT_SIGNAL(toggled(bool)), ledomsid, TQT_SLOT(setDisabled(bool)) ); + if ( mAdd ) connect( cbsamba, TQT_SIGNAL(toggled(bool)), lerid, TQT_SLOT(setDisabled(bool)) ); if ( !mAdd ) cbsamba->setChecked( !( kg->getCaps() & KU::KGroup::Cap_Samba ) ); } m_list_in = new KListView(page); m_list_in->setFullWidth(true); // Single column, full widget width. m_list_in->addColumn(i18n("Users in Group")); - m_list_in->setSelectionMode( QListView::Extended ); + m_list_in->setSelectionMode( TQListView::Extended ); layout->addWidget( m_list_in, 8, 0 ); - QVBox *vbox = new QVBox(page); - QPushButton *btadd = new QPushButton(i18n("Add <-"), vbox); - QPushButton *btdel = new QPushButton(i18n("Remove ->"), vbox); + TQVBox *vbox = new TQVBox(page); + TQPushButton *btadd = new TQPushButton(i18n("Add <-"), vbox); + TQPushButton *btdel = new TQPushButton(i18n("Remove ->"), vbox); layout->addWidget( vbox, 8, 1 ); m_list_notin = new KListView(page); m_list_notin->setFullWidth(true); // Single column, full widget width. m_list_notin->addColumn(i18n("Users NOT in Group")); - m_list_notin->setSelectionMode(QListView::Extended); + m_list_notin->setSelectionMode(TQListView::Extended); layout->addWidget( m_list_notin, 8, 2 ); -// QString whatstr = i18n("Select the users that should be in this kg->"); -// QWhatsThis::add(m_list, whatstr); -// connect(this,SIGNAL(okClicked(void)), - //this,SLOT(okClicked())); +// TQString whatstr = i18n("Select the users that should be in this kg->"); +// TQWhatsThis::add(m_list, whatstr); +// connect(this,TQT_SIGNAL(okClicked(void)), + //this,TQT_SLOT(okClicked())); for (unsigned int i = 0; igetUsers().count(); i++) { KU::KUser *user; user = kug->getUsers()[i]; - QString userName = user->getName(); + TQString userName = user->getName(); if ( kg->lookup_user(userName) || user->getGID() == kg->getGID() ) { KListViewItem *item = new KListViewItem(m_list_in, userName); if ( user->getGID() == kg->getGID() ) item->setSelectable( false ); @@ -192,8 +192,8 @@ editGroup::editGroup(KU::KGroup *akg, bool samba, bool add, } } - connect(btadd, SIGNAL(clicked()), SLOT(addClicked())); - connect(btdel, SIGNAL(clicked()), SLOT(delClicked())); + connect(btadd, TQT_SIGNAL(clicked()), TQT_SLOT(addClicked())); + connect(btdel, TQT_SIGNAL(clicked()), TQT_SLOT(delClicked())); if ( ro ) { btadd->setEnabled( false ); @@ -207,7 +207,7 @@ editGroup::~editGroup() void editGroup::ridSelected( int index ) { - lerid->setCurrentText( QString::number( mRids[ index ].rid ) ); + lerid->setCurrentText( TQString::number( mRids[ index ].rid ) ); legrpname->setText( mRids[ index ].name ); ledesc->setText( mRids[ index ].desc ); ledispname->setText( mRids[ index ].name ); @@ -215,8 +215,8 @@ void editGroup::ridSelected( int index ) void editGroup::addClicked() { - QListViewItem *item, *next; - QString name; + TQListViewItem *item, *next; + TQString name; item = m_list_notin->firstChild(); while ( item ) { @@ -232,8 +232,8 @@ void editGroup::addClicked() void editGroup::delClicked() { - QListViewItem *item, *next; - QString name; + TQListViewItem *item, *next; + TQString name; item = m_list_in->firstChild(); while ( item ) { @@ -256,7 +256,7 @@ void editGroup::slotOk() SID sid; kg->clear(); - QString s; + TQString s; s = legid->text(); if ( mSamba && !cbsamba->isChecked() ) { @@ -311,13 +311,13 @@ void editGroup::slotOk() kg->setDisplayName( ledispname->text() ); } else { kg->setCaps( 0 ); - kg->setSID( QString::null ); - kg->setDesc( QString::null ); - kg->setDisplayName( QString::null ); + kg->setSID( TQString::null ); + kg->setDesc( TQString::null ); + kg->setDisplayName( TQString::null ); kg->setType( 0 ); } - QListViewItem *item; + TQListViewItem *item; item = m_list_in->firstChild(); while ( item ) { kg->addUser( item->text( 0 ) ); diff --git a/kuser/editGroup.h b/kuser/editGroup.h index 3d6334b..c3e8c76 100644 --- a/kuser/editGroup.h +++ b/kuser/editGroup.h @@ -22,7 +22,7 @@ #ifndef _KU_EDITGROUP_H_ #define _KU_EDITGROUP_H_ -#include +#include #include #include #include @@ -36,7 +36,7 @@ class editGroup : public KDialogBase public: editGroup(KU::KGroup *akg, bool samba, bool add, - QWidget* parent = NULL, const char* name = NULL); + TQWidget* parent = NULL, const char* name = NULL); virtual ~editGroup(); @@ -59,12 +59,12 @@ private: KLineEdit *ledesc; KLineEdit *ledomsid; KComboBox *letype; - QCheckBox *cbsamba; - QString mOldName; + TQCheckBox *cbsamba; + TQString mOldName; typedef struct _RID { uint rid; - QString name,desc; + TQString name,desc; } RID; - QValueList mRids; + TQValueList mRids; }; #endif // _KU_EDITGROUP_H_ diff --git a/kuser/kglobal.cpp b/kuser/kglobal.cpp index 93a7cce..201bdf7 100644 --- a/kuser/kglobal.cpp +++ b/kuser/kglobal.cpp @@ -36,7 +36,7 @@ KUserGlobals::KUserGlobals() groups = 0; } -void KUserGlobals::initCfg( const QString &connection ) +void KUserGlobals::initCfg( const TQString &connection ) { if ( cfg ) { cfg->writeConfig(); diff --git a/kuser/kglobal_.h b/kuser/kglobal_.h index 2cf8dbe..e210fd2 100644 --- a/kuser/kglobal_.h +++ b/kuser/kglobal_.h @@ -29,7 +29,7 @@ public: KUserGlobals(); ~KUserGlobals(); void init(); - void initCfg( const QString &connection ); + void initCfg( const TQString &connection ); KUserPrefsBase *kcfg() { return cfg; } KU::KUsers &getUsers(); diff --git a/kuser/kgroup.cpp b/kuser/kgroup.cpp index 44fc31c..77fcc91 100644 --- a/kuser/kgroup.cpp +++ b/kuser/kgroup.cpp @@ -18,7 +18,7 @@ * Boston, MA 02110-1301, USA. **/ -#include +#include #include @@ -28,7 +28,7 @@ KU::KGroup::KGroup() { - pwd = QString::fromLatin1("*"); + pwd = TQString::fromLatin1("*"); gid = 0; type = 2; caps = 0; @@ -68,12 +68,12 @@ int KU::KGroup::getCaps() return caps; } -const QString &KU::KGroup::getName() const +const TQString &KU::KGroup::getName() const { return name; } -const QString &KU::KGroup::getPwd() const +const TQString &KU::KGroup::getPwd() const { return pwd; } @@ -93,22 +93,22 @@ int KU::KGroup::getType() const return type; } -const QString &KU::KGroup::getDisplayName() const +const TQString &KU::KGroup::getDisplayName() const { return displayname; } -const QString &KU::KGroup::getDesc() const +const TQString &KU::KGroup::getDesc() const { return desc; } -void KU::KGroup::setName(const QString &data) +void KU::KGroup::setName(const TQString &data) { name = data; } -void KU::KGroup::setPwd(const QString &data) +void KU::KGroup::setPwd(const TQString &data) { pwd = data; } @@ -128,22 +128,22 @@ void KU::KGroup::setType(int data) type = data; } -void KU::KGroup::setDisplayName(const QString &data) +void KU::KGroup::setDisplayName(const TQString &data) { displayname = data; } -void KU::KGroup::setDesc(const QString &data) +void KU::KGroup::setDesc(const TQString &data) { desc = data; } -bool KU::KGroup::lookup_user(const QString &name) +bool KU::KGroup::lookup_user(const TQString &name) { return (u.find(name) != u.end()); } -bool KU::KGroup::addUser(const QString &name) +bool KU::KGroup::addUser(const TQString &name) { if (!lookup_user(name)) { u.append(name); @@ -152,7 +152,7 @@ bool KU::KGroup::addUser(const QString &name) return false; } -bool KU::KGroup::removeUser(const QString &name) +bool KU::KGroup::removeUser(const TQString &name) { return ( u.remove(name) > 0 ); } @@ -162,7 +162,7 @@ uint KU::KGroup::count() const return u.count(); } -QString KU::KGroup::user(uint i) +TQString KU::KGroup::user(uint i) { return u[i]; } @@ -178,10 +178,10 @@ KU::KGroups::KGroups(KUserPrefsBase *cfg) mCfg = cfg; } -KU::KGroup *KU::KGroups::lookup(const QString &name) +KU::KGroup *KU::KGroups::lookup(const TQString &name) { KU::KGroup *group; - QPtrListIterator it( mGroups ); + TQPtrListIterator it( mGroups ); while ( (group = it.current()) != 0 && group->getName() != name ) ++it; return group; @@ -190,7 +190,7 @@ KU::KGroup *KU::KGroups::lookup(const QString &name) KU::KGroup *KU::KGroups::lookup(gid_t gid) { KU::KGroup *group; - QPtrListIterator it( mGroups ); + TQPtrListIterator it( mGroups ); while ( (group = it.current()) != 0 && group->getGID() != gid ) ++it; return group; @@ -199,16 +199,16 @@ KU::KGroup *KU::KGroups::lookup(gid_t gid) KU::KGroup *KU::KGroups::lookup_sam( const SID &sid ) { KU::KGroup *group; - QPtrListIterator it( mGroups ); + TQPtrListIterator it( mGroups ); while ( (group = it.current()) != 0 && group->getSID() != sid ) ++it; return group; } -KU::KGroup *KU::KGroups::lookup_sam( const QString &sid ) +KU::KGroup *KU::KGroups::lookup_sam( const TQString &sid ) { KU::KGroup *group; - QPtrListIterator it( mGroups ); + TQPtrListIterator it( mGroups ); while ( (group = it.current()) != 0 && group->getSID().getSID() != sid ) ++it; return group; @@ -217,7 +217,7 @@ KU::KGroup *KU::KGroups::lookup_sam( const QString &sid ) KU::KGroup *KU::KGroups::lookup_sam( uint rid ) { KU::KGroup *group; - QPtrListIterator it( mGroups ); + TQPtrListIterator it( mGroups ); while ( (group = it.current()) != 0 && group->getSID().getRID() != rid ) ++it; return group; @@ -270,7 +270,7 @@ uint KU::KGroups::count() const return mGroups.count(); } -const QString &KU::KGroups::getDOMSID() const +const TQString &KU::KGroups::getDOMSID() const { return domsid; } diff --git a/kuser/kgroup.h b/kuser/kgroup.h index c91f496..e3deae0 100644 --- a/kuser/kgroup.h +++ b/kuser/kgroup.h @@ -23,9 +23,9 @@ #include -#include -#include -#include +#include +#include +#include #include "kuserprefs.h" #include "sid.h" @@ -46,27 +46,27 @@ public: void setCaps( int data ); int getCaps(); - const QString &getName() const; - const QString &getPwd() const; + const TQString &getName() const; + const TQString &getPwd() const; gid_t getGID() const; const SID &getSID() const; int getType() const; - const QString &getDisplayName() const; - const QString &getDesc() const; + const TQString &getDisplayName() const; + const TQString &getDesc() const; - void setName(const QString &data); - void setPwd(const QString &data); + void setName(const TQString &data); + void setPwd(const TQString &data); void setGID(gid_t data); void setSID(const SID &data); void setType(int data); - void setDisplayName(const QString &data); - void setDesc(const QString &data); + void setDisplayName(const TQString &data); + void setDesc(const TQString &data); - bool addUser(const QString &name); - bool removeUser(const QString &name); - bool lookup_user(const QString &name); + bool addUser(const TQString &name); + bool removeUser(const TQString &name); + bool lookup_user(const TQString &name); uint count() const; - QString user(uint i); + TQString user(uint i); void clear(); protected: @@ -79,10 +79,10 @@ protected: SID sid; int type; int caps; - QString displayname; - QString desc; + TQString displayname; + TQString desc; - QStringList u; + TQStringList u; }; class KGroups { @@ -94,24 +94,24 @@ public: Cap_Samba = 8 }; - typedef QPtrListIterator DelIt; - typedef QPtrListIterator AddIt; - typedef QMapIterator ModIt; + typedef TQPtrListIterator DelIt; + typedef TQPtrListIterator AddIt; + typedef TQMapIterator ModIt; - QPtrList mDelSucc; - QPtrList mAddSucc; - QMap mModSucc; + TQPtrList mDelSucc; + TQPtrList mAddSucc; + TQMap mModSucc; KGroups( KUserPrefsBase *cfg ); virtual ~KGroups(); int getCaps() const { return caps; } - const QString &getDOMSID() const; + const TQString &getDOMSID() const; - KGroup *lookup( const QString &name ); + KGroup *lookup( const TQString &name ); KGroup *lookup( gid_t gid ); KGroup *lookup_sam( const SID &sid ); - KGroup *lookup_sam( const QString &sid ); + KGroup *lookup_sam( const TQString &sid ); KGroup *lookup_sam( uint rid ); KGroup *first(); @@ -136,13 +136,13 @@ public: protected: KUserPrefsBase *mCfg; - QPtrList mGroups; + TQPtrList mGroups; - QPtrList mDel; - QPtrList mAdd; - QMap mMod; + TQPtrList mDel; + TQPtrList mAdd; + TQMap mMod; int caps; - QString domsid; + TQString domsid; }; } diff --git a/kuser/kgroupfiles.cpp b/kuser/kgroupfiles.cpp index bab8841..cd4d2e0 100644 --- a/kuser/kgroupfiles.cpp +++ b/kuser/kgroupfiles.cpp @@ -31,8 +31,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -69,9 +69,9 @@ bool KGroupFiles::reload() struct group *p; KU::KGroup *tmpKG = 0; struct stat st; - QString filename; - QString group_filename; - QString nisgroup_filename; + TQString filename; + TQString group_filename; + TQString nisgroup_filename; int rc = 0; int group_errno = 0; int nisgroup_errno = 0; @@ -92,10 +92,10 @@ bool KGroupFiles::reload() // Start reading group file(s) for(int k = 0; k < MAXFILES; k++) { - rc = stat(QFile::encodeName(filename), &st); + rc = stat(TQFile::encodeName(filename), &st); if(rc != 0) { KMessageBox::error( 0, i18n("stat call on file %1 failed: %2\nCheck KUser settings."). - arg(filename).arg(QString::fromLatin1(strerror(errno))) ); + arg(filename).arg(TQString::fromLatin1(strerror(errno))) ); if( (processing_file & GROUP) != 0 ) { group_errno = errno; if(!nisgroup_filename.isEmpty()) { @@ -118,8 +118,8 @@ bool KGroupFiles::reload() // We are reading our configuration specified group file #ifdef HAVE_FGETGRENT - FILE *fgrp = fopen(QFile::encodeName(filename), "r"); - QString tmp; + FILE *fgrp = fopen(TQFile::encodeName(filename), "r"); + TQString tmp; if (fgrp == NULL) { KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(filename) ); return FALSE; @@ -132,13 +132,13 @@ bool KGroupFiles::reload() #endif tmpKG = new KU::KGroup(); tmpKG->setGID(p->gr_gid); - tmpKG->setName(QString::fromLocal8Bit(p->gr_name)); - tmpKG->setPwd(QString::fromLocal8Bit(p->gr_passwd)); + tmpKG->setName(TQString::fromLocal8Bit(p->gr_name)); + tmpKG->setPwd(TQString::fromLocal8Bit(p->gr_passwd)); char *u_name; int i = 0; while ((u_name = p->gr_mem[i])!=0) { - tmpKG->addUser(QString::fromLocal8Bit(u_name)); + tmpKG->addUser(TQString::fromLocal8Bit(u_name)); i++; } @@ -182,10 +182,10 @@ bool KGroupFiles::save() gid_t mingid = 0; int nis_groups_written = 0; gid_t tmp_gid = 0; - QString tmpGe, tmpSe, tmp2; - QString group_filename, new_group_filename; - QString gshadow_filename, new_gshadow_filename; - QString nisgroup_filename, new_nisgroup_filename; + TQString tmpGe, tmpSe, tmp2; + TQString group_filename, new_group_filename; + TQString gshadow_filename, new_gshadow_filename; + TQString nisgroup_filename, new_nisgroup_filename; char errors_found = '\0'; #define NOMINGID 0x01 @@ -194,16 +194,16 @@ bool KGroupFiles::save() // read KUser configuration info group_filename = mCfg->groupsrc(); - new_group_filename = group_filename + QString::fromLatin1(KU_CREATE_EXT); + new_group_filename = group_filename + TQString::fromLatin1(KU_CREATE_EXT); #ifdef HAVE_SHADOW gshadow_filename = mCfg->gshadowsrc(); if ( !KStandardDirs::exists( gshadow_filename ) ) - gshadow_filename = QString::null; + gshadow_filename = TQString::null; else - new_gshadow_filename = gshadow_filename + QString::fromLatin1(KU_CREATE_EXT); + new_gshadow_filename = gshadow_filename + TQString::fromLatin1(KU_CREATE_EXT); #endif nisgroup_filename = mCfg->nisgroupsrc(); - new_nisgroup_filename = nisgroup_filename + QString::fromLatin1(KU_CREATE_EXT); + new_nisgroup_filename = nisgroup_filename + TQString::fromLatin1(KU_CREATE_EXT); if( nisgroup_filename != group_filename ) { mingid = mCfg->nismingid(); } @@ -232,14 +232,14 @@ bool KGroupFiles::save() // Open file(s) if(!group_filename.isEmpty()) { - if((group_fd = fopen(QFile::encodeName(new_group_filename), "w")) == NULL) { + if((group_fd = fopen(TQFile::encodeName(new_group_filename), "w")) == NULL) { KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_group_filename) ); return false; } } if(!gshadow_filename.isEmpty()) { - if((gshadow_fd = fopen(QFile::encodeName(new_gshadow_filename), "w")) == NULL) { + if((gshadow_fd = fopen(TQFile::encodeName(new_gshadow_filename), "w")) == NULL) { KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_gshadow_filename) ); if ( group_fd ) fclose ( group_fd ); return false; @@ -247,7 +247,7 @@ bool KGroupFiles::save() } if(!nisgroup_filename.isEmpty() && (nisgroup_filename != group_filename)) { - if((nisgroup_fd = fopen(QFile::encodeName(new_nisgroup_filename), "w")) == NULL) { + if((nisgroup_fd = fopen(TQFile::encodeName(new_nisgroup_filename), "w")) == NULL) { KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_nisgroup_filename) ); if ( group_fd ) fclose ( group_fd ); if ( gshadow_fd ) fclose ( gshadow_fd ); @@ -255,7 +255,7 @@ bool KGroupFiles::save() } } - QPtrListIterator it( mGroups ); + TQPtrListIterator it( mGroups ); KU::KGroup *gr; bool addok = false; @@ -265,7 +265,7 @@ bool KGroupFiles::save() if ( gr == 0 ) { if ( addok ) break; - it = QPtrListIterator ( mAdd ); + it = TQPtrListIterator ( mAdd ); gr = (*it); addok = true; if ( gr == 0 ) break; @@ -291,7 +291,7 @@ bool KGroupFiles::save() tmp_gid = gr->getGID(); tmpGe += ":" + gr->getPwd() + ":" + - QString::number( gr->getGID() ) + ":"; + TQString::number( gr->getGID() ) + ":"; tmpSe = gr->getName() + ":!::"; for (uint j=0; jcount(); j++) { if (j != 0) { @@ -331,26 +331,26 @@ bool KGroupFiles::save() if(group_fd) { fclose(group_fd); - chmod(QFile::encodeName(new_group_filename), mode); - chown(QFile::encodeName(new_group_filename), uid, gid); - rename(QFile::encodeName(new_group_filename), - QFile::encodeName(group_filename)); + chmod(TQFile::encodeName(new_group_filename), mode); + chown(TQFile::encodeName(new_group_filename), uid, gid); + rename(TQFile::encodeName(new_group_filename), + TQFile::encodeName(group_filename)); } if(gshadow_fd) { fclose(gshadow_fd); - chmod(QFile::encodeName(new_gshadow_filename), mode); - chown(QFile::encodeName(new_gshadow_filename), uid, gid); - rename(QFile::encodeName(new_gshadow_filename), - QFile::encodeName(gshadow_filename)); + chmod(TQFile::encodeName(new_gshadow_filename), mode); + chown(TQFile::encodeName(new_gshadow_filename), uid, gid); + rename(TQFile::encodeName(new_gshadow_filename), + TQFile::encodeName(gshadow_filename)); } if(nisgroup_fd) { fclose(nisgroup_fd); - chmod(QFile::encodeName(nisgroup_filename), mode); - chown(QFile::encodeName(nisgroup_filename), uid, gid); - rename(QFile::encodeName(new_nisgroup_filename), - QFile::encodeName(nisgroup_filename)); + chmod(TQFile::encodeName(nisgroup_filename), mode); + chown(TQFile::encodeName(nisgroup_filename), uid, gid); + rename(TQFile::encodeName(new_nisgroup_filename), + TQFile::encodeName(nisgroup_filename)); } if( (errors_found & NOMINGID) != 0 ) { diff --git a/kuser/kgroupfiles.h b/kuser/kgroupfiles.h index b2725bc..6918d61 100644 --- a/kuser/kgroupfiles.h +++ b/kuser/kgroupfiles.h @@ -23,9 +23,9 @@ #include -#include -#include -#include +#include +#include +#include #include "kgroup.h" diff --git a/kuser/kgroupldap.cpp b/kuser/kgroupldap.cpp index 1a84148..2f66b27 100644 --- a/kuser/kgroupldap.cpp +++ b/kuser/kgroupldap.cpp @@ -16,8 +16,8 @@ * Boston, MA 02110-1301, USA. **/ -#include -#include +#include +#include #include #include @@ -70,13 +70,13 @@ KGroupLDAP::~KGroupLDAP() mGroups.clear(); } -QString KGroupLDAP::getRDN( KU::KGroup *group ) +TQString KGroupLDAP::getRDN( KU::KGroup *group ) { switch ( mCfg->ldapgrouprdn() ) { case KUserPrefsBase::EnumLdapgrouprdn::cn: return "cn=" + group->getName(); case KUserPrefsBase::EnumLdapgrouprdn::gidNumber: - return "gidNumber=" + QString::number( group->getGID() ); + return "gidNumber=" + TQString::number( group->getGID() ); default: return ""; } @@ -87,12 +87,12 @@ void KGroupLDAP::result( KIO::Job *job ) delete mProg; mCancel = false; if ( job->error() ) { - QString errstr = job->errorString(); + TQString errstr = job->errorString(); if ( !errstr.isEmpty() ) { if ( ldif.isEmpty() ) KMessageBox::error( 0, errstr ); else - KMessageBox::detailedError( 0, errstr, QString::fromUtf8( ldif, ldif.size()-1 ) ); + KMessageBox::detailedError( 0, errstr, TQString::fromUtf8( ldif, ldif.size()-1 ) ); } mOk = false; } else { @@ -100,7 +100,7 @@ void KGroupLDAP::result( KIO::Job *job ) } } -void KGroupLDAP::data( KIO::Job*, const QByteArray& data ) +void KGroupLDAP::data( KIO::Job*, const TQByteArray& data ) { if ( data.size() ) { mParser.setLDIF( data ); @@ -109,15 +109,15 @@ void KGroupLDAP::data( KIO::Job*, const QByteArray& data ) } KABC::LDIF::ParseVal ret; - QString name, val; - QByteArray value; + TQString name, val; + TQByteArray value; do { ret = mParser.nextItem(); switch ( ret ) { case KABC::LDIF::Item: name = mParser.attr().lower(); value = mParser.val(); - val = QString::fromUtf8( value, value.size() ); + val = TQString::fromUtf8( value, value.size() ); if ( name == "objectclass" ) { if ( val.lower() == "sambagroupmapping" ) mGroup->setCaps( KU::KGroup::Cap_Samba ); @@ -170,10 +170,10 @@ bool KGroupLDAP::reload() ldif = ""; KIO::Job *job = KIO::get( mUrl, true, false ); - connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ), - this, SLOT( data( KIO::Job*, const QByteArray& ) ) ); - connect( job, SIGNAL( result( KIO::Job* ) ), - this, SLOT( result( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( result( KIO::Job* ) ) ); mProg->exec(); if ( mCancel ) job->kill(); @@ -193,15 +193,15 @@ bool KGroupLDAP::dbcommit() mProg = new KProgressDialog( 0, "", i18n("LDAP Operation"), "", true ); KIO::Job *job = KIO::put( mUrl, -1, false, false, false ); - connect( job, SIGNAL( dataReq( KIO::Job*, QByteArray& ) ), - this, SLOT( putData( KIO::Job*, QByteArray& ) ) ); - connect( job, SIGNAL( result( KIO::Job* ) ), - this, SLOT( result( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray& ) ), + this, TQT_SLOT( putData( KIO::Job*, TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( result( KIO::Job* ) ) ); mProg->exec(); return( mOk ); } -void KGroupLDAP::putData( KIO::Job*, QByteArray& data ) +void KGroupLDAP::putData( KIO::Job*, TQByteArray& data ) { ModIt mit = mMod.begin(); @@ -243,7 +243,7 @@ void KGroupLDAP::addData( KU::KGroup *group ) ldif += KABC::LDIF::assembleLine( "cn", group->getName() ) + "\n" + - KABC::LDIF::assembleLine( "gidnumber", QString::number(group->getGID()) ) + "\n" + + KABC::LDIF::assembleLine( "gidnumber", TQString::number(group->getGID()) ) + "\n" + KABC::LDIF::assembleLine( "userpassword", group->getPwd() ) + "\n"; for ( uint i=0; i < group->count(); i++ ) { ldif += KABC::LDIF::assembleLine( "memberuid", group->user(i) ) + "\n"; @@ -253,7 +253,7 @@ void KGroupLDAP::addData( KU::KGroup *group ) KABC::LDIF::assembleLine( "sambasid", group->getSID().getSID() ) + "\n" + KABC::LDIF::assembleLine( "displayname", group->getDisplayName() ) + "\n" + KABC::LDIF::assembleLine( "description", group->getDesc() ) + "\n" + - KABC::LDIF::assembleLine( "sambagrouptype", QString::number( group->getType() ) ) + "\n"; + KABC::LDIF::assembleLine( "sambagrouptype", TQString::number( group->getType() ) ) + "\n"; } ldif += "\n\n"; kdDebug() << "ldif: " << ldif << endl; @@ -268,8 +268,8 @@ void KGroupLDAP::delData( KU::KGroup *group ) void KGroupLDAP::modData( KU::KGroup *group ) { - QString oldrdn = getRDN( mGroup ); - QString newrdn = getRDN( group ); + TQString oldrdn = getRDN( mGroup ); + TQString newrdn = getRDN( group ); ldif = ""; if ( oldrdn != newrdn ) { @@ -290,7 +290,7 @@ void KGroupLDAP::modData( KU::KGroup *group ) "-\nreplace: cn\n" + KABC::LDIF::assembleLine( "cn", group->getName() ) + "\n-\nreplace: gidnumber\n" + - KABC::LDIF::assembleLine( "gidnumber", QString::number(group->getGID()) ) + + KABC::LDIF::assembleLine( "gidnumber", TQString::number(group->getGID()) ) + "\n-\nreplace: userpassword\n" + KABC::LDIF::assembleLine( "userpassword", group->getPwd() ) + "\n-\nreplace: memberuid\n"; @@ -307,7 +307,7 @@ void KGroupLDAP::modData( KU::KGroup *group ) "\n-\nreplace: description\n" + KABC::LDIF::assembleLine( "description", group->getDesc() ) + "\n-\nreplace: sambagrouptype\n" + - KABC::LDIF::assembleLine( "sambagrouptype", QString::number( group->getType() ) ) + "\n"; + KABC::LDIF::assembleLine( "sambagrouptype", TQString::number( group->getType() ) ) + "\n"; } else { ldif += "-\nreplace: sambasid\n"; ldif += "-\nreplace: displayname\n"; diff --git a/kuser/kgroupldap.h b/kuser/kgroupldap.h index ece0185..40c1ef4 100644 --- a/kuser/kgroupldap.h +++ b/kuser/kgroupldap.h @@ -21,9 +21,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -32,7 +32,7 @@ #include "kgroup.h" -class KGroupLDAP : public QObject, public KU::KGroups { +class KGroupLDAP : public TQObject, public KU::KGroups { Q_OBJECT public: KGroupLDAP( KUserPrefsBase *cfg ); @@ -42,8 +42,8 @@ public: virtual bool dbcommit(); private slots: - void data( KIO::Job*, const QByteArray& ); - void putData( KIO::Job *job, QByteArray& data ); + void data( KIO::Job*, const TQByteArray& ); + void putData( KIO::Job *job, TQByteArray& data ); void result( KIO::Job* ); private: KABC::LDIF mParser; @@ -54,9 +54,9 @@ private: bool first, mOk, mCancel; int mAdv; - QCString ldif; + TQCString ldif; - QString getRDN( KU::KGroup *group ); + TQString getRDN( KU::KGroup *group ); void addData( KU::KGroup *group ); void delData( KU::KGroup *group ); void modData( KU::KGroup *group ); diff --git a/kuser/kgroupsystem.cpp b/kuser/kgroupsystem.cpp index 1cb2f13..f30176f 100644 --- a/kuser/kgroupsystem.cpp +++ b/kuser/kgroupsystem.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include @@ -52,13 +52,13 @@ bool KGroupSystem::reload() while ((p = getgrent()) != NULL) { tmpKG = new KU::KGroup(); tmpKG->setGID(p->gr_gid); - tmpKG->setName(QString::fromLocal8Bit(p->gr_name)); - tmpKG->setPwd(QString::fromLocal8Bit(p->gr_passwd)); + tmpKG->setName(TQString::fromLocal8Bit(p->gr_name)); + tmpKG->setPwd(TQString::fromLocal8Bit(p->gr_passwd)); char *u_name; int i = 0; while ((u_name = p->gr_mem[i])!=0) { - tmpKG->addUser(QString::fromLocal8Bit(u_name)); + tmpKG->addUser(TQString::fromLocal8Bit(u_name)); i++; } diff --git a/kuser/kgroupsystem.h b/kuser/kgroupsystem.h index b26dea8..80b30e1 100644 --- a/kuser/kgroupsystem.h +++ b/kuser/kgroupsystem.h @@ -23,9 +23,9 @@ #include -#include -#include -#include +#include +#include +#include #include "kgroup.h" diff --git a/kuser/kgroupvw.cpp b/kuser/kgroupvw.cpp index 2641554..76af939 100644 --- a/kuser/kgroupvw.cpp +++ b/kuser/kgroupvw.cpp @@ -29,7 +29,7 @@ KGroupViewItem::KGroupViewItem(KListView *parent, KU::KGroup *aku) { } -int KGroupViewItem::compare( QListViewItem *i, int col, bool ascending ) const +int KGroupViewItem::compare( TQListViewItem *i, int col, bool ascending ) const { switch ( col ) { case 0: { @@ -49,20 +49,20 @@ int KGroupViewItem::compare( QListViewItem *i, int col, bool ascending ) const return ( rid1 < rid2) ? -1: 1; } default: - return QListViewItem::compare( i, col, ascending ); + return TQListViewItem::compare( i, col, ascending ); } } -QString KGroupViewItem::text(int num) const +TQString KGroupViewItem::text(int num) const { switch(num) { - case 0: return QString::number(mGroup->getGID()); + case 0: return TQString::number(mGroup->getGID()); case 1: return mGroup->getName(); case 2: return ( mGroup->getCaps() & KU::KGroup::Cap_Samba ) ? - mGroup->getSID().getDOM() : QString::null; + mGroup->getSID().getDOM() : TQString::null; case 3: return ( mGroup->getCaps() & KU::KGroup::Cap_Samba ) ? - QString::number( mGroup->getSID().getRID() ) : QString::null; + TQString::number( mGroup->getSID().getRID() ) : TQString::null; case 4: { if ( mGroup->getCaps() & KU::KGroup::Cap_Samba ) { switch ( mGroup->getType() ) { @@ -72,20 +72,20 @@ QString KGroupViewItem::text(int num) const default: return i18n("Unknown"); } } else { - return QString::null; + return TQString::null; } } case 5: return mGroup->getDisplayName(); case 6: return mGroup->getDesc(); } - return QString::null; + return TQString::null; } -KGroupView::KGroupView(QWidget *parent, const char *name) +KGroupView::KGroupView(TQWidget *parent, const char *name) : KListView( parent, name ) { - setSelectionMode( QListView::Extended ); + setSelectionMode( TQListView::Extended ); } KGroupView::~KGroupView() diff --git a/kuser/kgroupvw.h b/kuser/kgroupvw.h index 4667f8c..5dd1fb8 100644 --- a/kuser/kgroupvw.h +++ b/kuser/kgroupvw.h @@ -21,7 +21,7 @@ #ifndef _KU_GROUPVW_H_ #define _KU_GROUPVW_H_ -#include +#include #include @@ -33,8 +33,8 @@ public: KGroupViewItem(KListView *parent, KU::KGroup *aku); KU::KGroup *group() { return mGroup; } private: - virtual QString text ( int ) const; - virtual int compare( QListViewItem *i, int col, bool ascending ) const; + virtual TQString text ( int ) const; + virtual int compare( TQListViewItem *i, int col, bool ascending ) const; KU::KGroup *mGroup; }; @@ -44,7 +44,7 @@ class KGroupView : public KListView Q_OBJECT public: - KGroupView( QWidget* parent = 0, const char* name = 0 ); + KGroupView( TQWidget* parent = 0, const char* name = 0 ); virtual ~KGroupView(); diff --git a/kuser/kuser.cpp b/kuser/kuser.cpp index 2fd9ff1..2ef2e80 100644 --- a/kuser/kuser.cpp +++ b/kuser/kuser.cpp @@ -31,8 +31,8 @@ #include #endif #include -#include -#include +#include +#include #include "kglobal_.h" #include "kuser.h" @@ -163,37 +163,37 @@ bool KU::KUser::getCopySkel() return isCopySkel; } -const QString &KU::KUser::getName() const +const TQString &KU::KUser::getName() const { return p_name; } -const QString &KU::KUser::getSurname() const +const TQString &KU::KUser::getSurname() const { return p_surname; } -const QString &KU::KUser::getEmail() const +const TQString &KU::KUser::getEmail() const { return p_email; } -const QString &KU::KUser::getPwd() const +const TQString &KU::KUser::getPwd() const { return p_pwd; } -const QString &KU::KUser::getHomeDir() const +const TQString &KU::KUser::getHomeDir() const { return p_dir; } -const QString &KU::KUser::getShell() const +const TQString &KU::KUser::getShell() const { return p_shell; } -const QString &KU::KUser::getFullName() const +const TQString &KU::KUser::getFullName() const { return p_fname; } @@ -205,38 +205,38 @@ bool KU::KUser::getDisabled() const // FreeBSD apparently uses the GECOS fields differently than other Unices. // Create some better named functions to make the FreeBSD code clear -const QString &KU::KUser::getOffice() const +const TQString &KU::KUser::getOffice() const { return p_office; } -const QString &KU::KUser::getWorkPhone() const +const TQString &KU::KUser::getWorkPhone() const { return p_ophone; } -const QString &KU::KUser::getHomePhone() const +const TQString &KU::KUser::getHomePhone() const { return p_hphone; } // New fields needed for the FreeBSD /etc/master.passwd file -const QString &KU::KUser::getClass() const +const TQString &KU::KUser::getClass() const { return p_class; } -const QString &KU::KUser::getOffice1() const +const TQString &KU::KUser::getOffice1() const { return p_office1; } -const QString &KU::KUser::getOffice2() const +const TQString &KU::KUser::getOffice2() const { return p_office2; } -const QString &KU::KUser::getAddress() const +const TQString &KU::KUser::getAddress() const { return p_address; } @@ -251,7 +251,7 @@ gid_t KU::KUser::getGID() const return p_gid; } -const QString &KU::KUser::getSPwd() const +const TQString &KU::KUser::getSPwd() const { return s_pwd; } @@ -291,42 +291,42 @@ time_t KU::KUser::getExpire() const return p_expire; } -const QString &KU::KUser::getLMPwd() const // sam_lmpwd, +const TQString &KU::KUser::getLMPwd() const // sam_lmpwd, { return sam_lmpwd; } -const QString &KU::KUser::getNTPwd() const //sam_ntpwd, +const TQString &KU::KUser::getNTPwd() const //sam_ntpwd, { return sam_ntpwd; } -const QString &KU::KUser::getLoginScript() const //sam_loginscript, +const TQString &KU::KUser::getLoginScript() const //sam_loginscript, { return sam_loginscript; } -const QString &KU::KUser::getProfilePath() const // sam_profile, +const TQString &KU::KUser::getProfilePath() const // sam_profile, { return sam_profile; } -const QString &KU::KUser::getHomeDrive() const //sam_homedrive, +const TQString &KU::KUser::getHomeDrive() const //sam_homedrive, { return sam_homedrive; } -const QString &KU::KUser::getHomePath() const //sam_homepath; +const TQString &KU::KUser::getHomePath() const //sam_homepath; { return sam_homepath; } -const QString &KU::KUser::getWorkstations() const //sam_workstation; +const TQString &KU::KUser::getWorkstations() const //sam_workstation; { return sam_workstations; } -const QString &KU::KUser::getDomain() const //sam_domain; +const TQString &KU::KUser::getDomain() const //sam_domain; { return sam_domain; } @@ -341,37 +341,37 @@ const SID &KU::KUser::getPGSID() const //pgroup_sid; return pgroup_sid; } -void KU::KUser::setName(const QString &data) +void KU::KUser::setName(const TQString &data) { p_name = data; } -void KU::KUser::setSurname(const QString &data) +void KU::KUser::setSurname(const TQString &data) { p_surname = data; } -void KU::KUser::setEmail(const QString &data) +void KU::KUser::setEmail(const TQString &data) { p_email = data; } -void KU::KUser::setPwd(const QString &data) +void KU::KUser::setPwd(const TQString &data) { p_pwd = data; } -void KU::KUser::setHomeDir(const QString &data) +void KU::KUser::setHomeDir(const TQString &data) { p_dir = data; } -void KU::KUser::setShell(const QString &data) +void KU::KUser::setShell(const TQString &data) { p_shell = data; } -void KU::KUser::setFullName(const QString &data) +void KU::KUser::setFullName(const TQString &data) { p_fname = data; } @@ -383,23 +383,23 @@ void KU::KUser::setDisabled(bool data) // FreeBSD apparently uses the GECOS fields differently than other Unices. // Create some better named functions to make the FreeBSD code clear -void KU::KUser::setOffice(const QString &data) +void KU::KUser::setOffice(const TQString &data) { p_office = data; } -void KU::KUser::setWorkPhone(const QString &data) +void KU::KUser::setWorkPhone(const TQString &data) { p_ophone = data; } -void KU::KUser::setHomePhone(const QString &data) +void KU::KUser::setHomePhone(const TQString &data) { p_hphone = data; } // New fields needed for the FreeBSD /etc/master.passwd file -void KU::KUser::setClass(const QString &data) +void KU::KUser::setClass(const TQString &data) { p_class = data; } @@ -414,17 +414,17 @@ void KU::KUser::setExpire(time_t data) p_expire = data; } -void KU::KUser::setOffice1(const QString &data) +void KU::KUser::setOffice1(const TQString &data) { p_office1 = data; } -void KU::KUser::setOffice2(const QString &data) +void KU::KUser::setOffice2(const TQString &data) { p_office2 = data; } -void KU::KUser::setAddress(const QString &data) +void KU::KUser::setAddress(const TQString &data) { p_address = data; } @@ -439,7 +439,7 @@ void KU::KUser::setGID(gid_t data) p_gid = data; } -void KU::KUser::setSPwd(const QString &data) +void KU::KUser::setSPwd(const TQString &data) { s_pwd = data; } @@ -464,42 +464,42 @@ void KU::KUser::setInactive(int data) s_inact = data; } -void KU::KUser::setLMPwd( const QString &data ) // sam_lmpwd, +void KU::KUser::setLMPwd( const TQString &data ) // sam_lmpwd, { sam_lmpwd = data; } -void KU::KUser::setNTPwd( const QString &data ) //sam_ntpwd, +void KU::KUser::setNTPwd( const TQString &data ) //sam_ntpwd, { sam_ntpwd = data; } -void KU::KUser::setLoginScript( const QString &data ) //sam_loginscript, +void KU::KUser::setLoginScript( const TQString &data ) //sam_loginscript, { sam_loginscript = data; } -void KU::KUser::setProfilePath( const QString &data) // sam_profile, +void KU::KUser::setProfilePath( const TQString &data) // sam_profile, { sam_profile = data; } -void KU::KUser::setHomeDrive( const QString &data ) //sam_homedrive, +void KU::KUser::setHomeDrive( const TQString &data ) //sam_homedrive, { sam_homedrive = data; } -void KU::KUser::setHomePath( const QString &data ) //sam_homepath; +void KU::KUser::setHomePath( const TQString &data ) //sam_homepath; { sam_homepath = data; } -void KU::KUser::setWorkstations( const QString &data ) //sam_workstation; +void KU::KUser::setWorkstations( const TQString &data ) //sam_workstation; { sam_workstations = data; } -void KU::KUser::setDomain( const QString &data ) //sam_domain +void KU::KUser::setDomain( const TQString &data ) //sam_domain { sam_domain = data; } @@ -551,40 +551,40 @@ int KU::KUser::createHome() KMessageBox::sorry( 0, i18n("Cannot create home folder for %1: it is null or empty.").arg(p_name) ); return(0); } - if (mkdir(QFile::encodeName(p_dir), 0700) != 0) { + if (mkdir(TQFile::encodeName(p_dir), 0700) != 0) { if (errno != EEXIST) { - KMessageBox::error( 0, i18n("Cannot create home folder %1.\nError: %2").arg(p_dir).arg(QString::fromLocal8Bit(strerror(errno))) ); + KMessageBox::error( 0, i18n("Cannot create home folder %1.\nError: %2").arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) ); return(0); } } - if (chown(QFile::encodeName(p_dir), p_uid, p_gid) != 0) { - KMessageBox::error( 0, i18n("Cannot change owner of home folder %1.\nError: %2").arg(p_dir).arg(QString::fromLocal8Bit(strerror(errno))) ); + if (chown(TQFile::encodeName(p_dir), p_uid, p_gid) != 0) { + KMessageBox::error( 0, i18n("Cannot change owner of home folder %1.\nError: %2").arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) ); return(1); } - if (chmod(QFile::encodeName(p_dir), KU_HOMEDIR_PERM) != 0) { - KMessageBox::error( 0, i18n("Cannot change permissions on home folder %1.\nError: %2").arg(p_dir).arg(QString::fromLocal8Bit(strerror(errno))) ); + if (chmod(TQFile::encodeName(p_dir), KU_HOMEDIR_PERM) != 0) { + KMessageBox::error( 0, i18n("Cannot change permissions on home folder %1.\nError: %2").arg(p_dir).arg(TQString::fromLocal8Bit(strerror(errno))) ); return(1); } return(1); } -int KU::KUser::tryCreate(const QString &dir) +int KU::KUser::tryCreate(const TQString &dir) { struct stat sb; int rc = 0; - rc = stat(QFile::encodeName(dir), &sb); + rc = stat(TQFile::encodeName(dir), &sb); if (rc == 0) { if (S_ISDIR(sb.st_mode)) { if (KMessageBox::warningContinueCancel( 0, i18n("Folder %1 already exists!\nWill make %2 owner and change permissions.\nDo you want to continue?").arg(dir).arg(p_name), - QString::null, KStdGuiItem::cont() ) == KMessageBox::Continue) { + TQString::null, KStdGuiItem::cont() ) == KMessageBox::Continue) { - if (chown(QFile::encodeName(dir), p_uid, p_gid) != 0) { - KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2") .arg(dir).arg(QString::fromLocal8Bit(strerror(errno))) ); + if (chown(TQFile::encodeName(dir), p_uid, p_gid) != 0) { + KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2") .arg(dir).arg(TQString::fromLocal8Bit(strerror(errno))) ); } return(0); } else { @@ -597,16 +597,16 @@ int KU::KUser::tryCreate(const QString &dir) } } else { if (errno == ENOENT) { - if (mkdir(QFile::encodeName(dir), 0700) != 0) { - KMessageBox::error( 0, i18n("Cannot create %1 folder.\nError: %2").arg(dir).arg(QString::fromLocal8Bit(strerror(errno)))); + if (mkdir(TQFile::encodeName(dir), 0700) != 0) { + KMessageBox::error( 0, i18n("Cannot create %1 folder.\nError: %2").arg(dir).arg(TQString::fromLocal8Bit(strerror(errno)))); return(-1); } - if (chown(QFile::encodeName(dir), p_uid, p_gid) != 0) { - KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2").arg(dir).arg(QString::fromLocal8Bit(strerror(errno))) ); + if (chown(TQFile::encodeName(dir), p_uid, p_gid) != 0) { + KMessageBox::error( 0, i18n("Cannot change owner of %1 folder.\nError: %2").arg(dir).arg(TQString::fromLocal8Bit(strerror(errno))) ); } return(0); } else { - KMessageBox::error( 0, i18n("stat call on %1 failed.\nError: %2").arg(dir).arg(QString::fromLocal8Bit(strerror(errno))) ); + KMessageBox::error( 0, i18n("stat call on %1 failed.\nError: %2").arg(dir).arg(TQString::fromLocal8Bit(strerror(errno))) ); return(-1); } } @@ -614,91 +614,91 @@ int KU::KUser::tryCreate(const QString &dir) int KU::KUser::createMailBox() { - QString mailboxpath; + TQString mailboxpath; int fd; - mailboxpath = QFile::decodeName(MAIL_SPOOL_DIR) + "/" + p_name; - if((fd = open(QFile::encodeName(mailboxpath), O_CREAT|O_EXCL|O_WRONLY, + mailboxpath = TQFile::decodeName(MAIL_SPOOL_DIR) + "/" + p_name; + if((fd = open(TQFile::encodeName(mailboxpath), O_CREAT|O_EXCL|O_WRONLY, S_IRUSR|S_IWUSR)) < 0) { if (errno != EEXIST) { KMessageBox::error( 0, i18n("Cannot create %1: %2") .arg(mailboxpath) - .arg(QString::fromLocal8Bit(strerror(errno))) ); + .arg(TQString::fromLocal8Bit(strerror(errno))) ); return -1; } } close(fd); - if (chown(QFile::encodeName(mailboxpath), p_uid, KU_MAILBOX_GID) != 0) { + if (chown(TQFile::encodeName(mailboxpath), p_uid, KU_MAILBOX_GID) != 0) { KMessageBox::error( 0, i18n("Cannot change owner on mailbox: %1\nError: %2") - .arg(mailboxpath).arg(QString::fromLocal8Bit(strerror(errno))) ); + .arg(mailboxpath).arg(TQString::fromLocal8Bit(strerror(errno))) ); return -1; } - if (chmod(QFile::encodeName(mailboxpath), KU_MAILBOX_PERM) != 0) { + if (chmod(TQFile::encodeName(mailboxpath), KU_MAILBOX_PERM) != 0) { KMessageBox::error( 0, i18n("Cannot change permissions on mailbox: %1\nError: %2") - .arg(mailboxpath).arg(QString::fromLocal8Bit(strerror(errno))) ); + .arg(mailboxpath).arg(TQString::fromLocal8Bit(strerror(errno))) ); return -1; } return 0; } -void KU::KUser::copyDir(const QString &srcPath, const QString &dstPath) +void KU::KUser::copyDir(const TQString &srcPath, const TQString &dstPath) { mode_t mode; - QDir s(srcPath); - QDir d(dstPath); + TQDir s(srcPath); + TQDir d(dstPath); - QString dot = QString::fromLatin1("."); - QString dotdot = QString::fromLatin1(".."); + TQString dot = TQString::fromLatin1("."); + TQString dotdot = TQString::fromLatin1(".."); - s.setFilter( QDir::All | QDir::Hidden | QDir::System ); + s.setFilter( TQDir::All | TQDir::Hidden | TQDir::System ); for (uint i=0; isetFullName( name ); caps & Cap_BSD ? user->setOffice( field1 ) : user->setOffice1( field1 ); @@ -870,7 +870,7 @@ void KU::KUsers::fillGecos(KU::KUser *user, const char *gecos) bool KU::KUsers::doCreate(KU::KUser *user) { - QString h_dir; + TQString h_dir; if(user->getCreateMailBox()) { user->createMailBox(); @@ -909,10 +909,10 @@ bool KU::KUsers::doDelete( KU::KUser *user ) return TRUE; } -KU::KUser *KU::KUsers::lookup(const QString & name) +KU::KUser *KU::KUsers::lookup(const TQString & name) { KU::KUser *user; - QPtrListIterator it( mUsers ); + TQPtrListIterator it( mUsers ); while ( (user = it.current()) != 0 && user->getName() != name ) ++it; return user; @@ -921,7 +921,7 @@ KU::KUser *KU::KUsers::lookup(const QString & name) KU::KUser *KU::KUsers::lookup(uid_t uid) { KU::KUser *user; - QPtrListIterator it( mUsers ); + TQPtrListIterator it( mUsers ); while ( (user = it.current()) != 0 && user->getUID() != uid ) ++it; return user; @@ -930,16 +930,16 @@ KU::KUser *KU::KUsers::lookup(uid_t uid) KU::KUser *KU::KUsers::lookup_sam( const SID &sid ) { KU::KUser *user; - QPtrListIterator it( mUsers ); + TQPtrListIterator it( mUsers ); while ( (user = it.current()) != 0 && user->getSID() != sid ) ++it; return user; } -KU::KUser *KU::KUsers::lookup_sam( const QString &sid ) +KU::KUser *KU::KUsers::lookup_sam( const TQString &sid ) { KU::KUser *user; - QPtrListIterator it( mUsers ); + TQPtrListIterator it( mUsers ); while ( (user = it.current()) != 0 && user->getSID().getSID() != sid ) ++it; return user; @@ -948,7 +948,7 @@ KU::KUser *KU::KUsers::lookup_sam( const QString &sid ) KU::KUser *KU::KUsers::lookup_sam( uint rid ) { KU::KUser *user; - QPtrListIterator it( mUsers ); + TQPtrListIterator it( mUsers ); while ( (user = it.current()) != 0 && user->getSID().getRID() != rid ) ++it; return user; diff --git a/kuser/kuser.h b/kuser/kuser.h index 4e3c24e..ee6dbab 100644 --- a/kuser/kuser.h +++ b/kuser/kuser.h @@ -23,8 +23,8 @@ #include -#include -#include +#include +#include #include "globals.h" #include "sid.h" @@ -48,25 +48,25 @@ public: int getCaps(); //General - const QString &getName() const; - const QString &getSurname() const; - const QString &getEmail() const; - const QString &getPwd() const; - const QString &getHomeDir() const; - const QString &getShell() const; - const QString &getFullName() const; + const TQString &getName() const; + const TQString &getSurname() const; + const TQString &getEmail() const; + const TQString &getPwd() const; + const TQString &getHomeDir() const; + const TQString &getShell() const; + const TQString &getFullName() const; uid_t getUID() const; uid_t getGID() const; bool getDisabled() const; - void setName(const QString &data); - void setSurname(const QString &data); - void setEmail(const QString &data); - void setPwd(const QString &data); - void setHomeDir(const QString &data); - void setShell(const QString &data); - void setFullName(const QString &data); + void setName(const TQString &data); + void setSurname(const TQString &data); + void setEmail(const TQString &data); + void setPwd(const TQString &data); + void setHomeDir(const TQString &data); + void setShell(const TQString &data); + void setFullName(const TQString &data); void setUID(uid_t data); void setGID(uid_t data); @@ -74,27 +74,27 @@ public: //gecos //--BSD gecos - const QString &getOffice() const; - const QString &getWorkPhone() const; - const QString &getHomePhone() const; - const QString &getClass() const; + const TQString &getOffice() const; + const TQString &getWorkPhone() const; + const TQString &getHomePhone() const; + const TQString &getClass() const; //--BSD end - const QString &getOffice1() const; - const QString &getOffice2() const; - const QString &getAddress() const; + const TQString &getOffice1() const; + const TQString &getOffice2() const; + const TQString &getAddress() const; //--BSD - void setOffice(const QString &data); - void setWorkPhone(const QString &data); - void setHomePhone(const QString &data); - void setClass(const QString &data); + void setOffice(const TQString &data); + void setWorkPhone(const TQString &data); + void setHomePhone(const TQString &data); + void setClass(const TQString &data); //--BSD end - void setOffice1(const QString &data); - void setOffice2(const QString &data); - void setAddress(const QString &data); + void setOffice1(const TQString &data); + void setOffice2(const TQString &data); + void setAddress(const TQString &data); //shadow - const QString &getSPwd() const; + const TQString &getSPwd() const; time_t getExpire() const; time_t getLastChange() const; int getMin() const; @@ -103,7 +103,7 @@ public: int getInactive() const; int getFlag() const; - void setSPwd(const QString &data); + void setSPwd(const TQString &data); void setLastChange(time_t data); void setMin(int data); void setMax(int data); @@ -113,25 +113,25 @@ public: void setFlag(int data); //samba - const QString &getLMPwd() const; // sam_lmpwd, - const QString &getNTPwd() const; //sam_ntpwd, - const QString &getLoginScript() const; //sam_loginscript, - const QString &getProfilePath() const; // sam_profile, - const QString &getHomeDrive() const; //sam_homedrive, - const QString &getHomePath() const; //sam_homepath; - const QString &getWorkstations() const; //sam_workstations - const QString &getDomain() const; //sam_domain + const TQString &getLMPwd() const; // sam_lmpwd, + const TQString &getNTPwd() const; //sam_ntpwd, + const TQString &getLoginScript() const; //sam_loginscript, + const TQString &getProfilePath() const; // sam_profile, + const TQString &getHomeDrive() const; //sam_homedrive, + const TQString &getHomePath() const; //sam_homepath; + const TQString &getWorkstations() const; //sam_workstations + const TQString &getDomain() const; //sam_domain const SID &getSID() const; //sid, const SID &getPGSID() const; //pgroup_sid; - void setLMPwd( const QString &data ); // sam_lmpwd, - void setNTPwd( const QString &data ); //sam_ntpwd, - void setLoginScript( const QString &data ); //sam_loginscript, - void setProfilePath( const QString &data); // sam_profile, - void setHomeDrive( const QString &data ); //sam_homedrive, - void setHomePath( const QString &data ); //sam_homepath; - void setWorkstations( const QString &data ); //sam_workstations - void setDomain( const QString &data ); //sam_domain + void setLMPwd( const TQString &data ); // sam_lmpwd, + void setNTPwd( const TQString &data ); //sam_ntpwd, + void setLoginScript( const TQString &data ); //sam_loginscript, + void setProfilePath( const TQString &data); // sam_profile, + void setHomeDrive( const TQString &data ); //sam_homedrive, + void setHomePath( const TQString &data ); //sam_homepath; + void setWorkstations( const TQString &data ); //sam_workstations + void setDomain( const TQString &data ); //sam_domain void setSID( const SID &data ); //sid, void setPGSID( const SID &data ); //pgroup_sid; @@ -152,7 +152,7 @@ protected: friend class KUsers; int createHome(); - int tryCreate(const QString &dir); + int tryCreate(const TQString &dir); int createMailBox(); int copySkel(); @@ -161,7 +161,7 @@ protected: int removeMailBox(); int removeProcesses(); - void copyDir(const QString &srcPath, const QString &dstPath); + void copyDir(const TQString &srcPath, const TQString &dstPath); int caps; QString @@ -226,24 +226,24 @@ public: Cap_Disable_POSIX = 32, Cap_BSD = 64 }; - typedef QPtrListIterator DelIt; - typedef QPtrListIterator AddIt; - typedef QMapIterator ModIt; + typedef TQPtrListIterator DelIt; + typedef TQPtrListIterator AddIt; + typedef TQMapIterator ModIt; - QPtrList mDelSucc; - QPtrList mAddSucc; - QMap mModSucc; + TQPtrList mDelSucc; + TQPtrList mAddSucc; + TQMap mModSucc; KUsers(KUserPrefsBase *cfg); virtual ~KUsers(); - KUser *lookup(const QString & name); + KUser *lookup(const TQString & name); KUser *lookup(uid_t uid); KUser *lookup_sam( const SID &sid ); - KUser *lookup_sam( const QString &sid ); + KUser *lookup_sam( const TQString &sid ); KUser *lookup_sam( uint rid ); int getCaps() { return caps; } - const QString &getDOMSID() const; + const TQString &getDOMSID() const; KUser *first(); KUser *next(); @@ -274,7 +274,7 @@ public: * Must be reimplemented in various backends. It should encode @param password * into the appropriate fields in @param user. */ - virtual void createPassword( KUser *user, const QString &password ) = 0; + virtual void createPassword( KUser *user, const TQString &password ) = 0; /** * Must load the users from the storage backend. */ @@ -286,20 +286,20 @@ public: virtual bool dbcommit() = 0; protected: - QPtrList mUsers; + TQPtrList mUsers; int caps; KUserPrefsBase *mCfg; - QPtrList mDel; - QPtrList mAdd; - QMap mMod; + TQPtrList mDel; + TQPtrList mAdd; + TQMap mMod; - QString domsid; + TQString domsid; bool doCreate( KUser *user ); bool doDelete( KUser *user ); - void parseGecos( const char *gecos, QString &name, - QString &field1, QString &field2, QString &field3 ); + void parseGecos( const char *gecos, TQString &name, + TQString &field1, TQString &field2, TQString &field3 ); void fillGecos( KUser *user, const char *gecos ); }; diff --git a/kuser/kuserfiles.cpp b/kuser/kuserfiles.cpp index 5c987bc..5ccfe58 100644 --- a/kuser/kuserfiles.cpp +++ b/kuser/kuserfiles.cpp @@ -34,8 +34,8 @@ #include #endif -#include -#include +#include +#include #include "kglobal_.h" #include "kuserfiles.h" @@ -93,9 +93,9 @@ bool KUserFiles::loadpwd() passwd *p; KU::KUser *tmpKU = 0; struct stat st; - QString filename; - QString passwd_filename; - QString nispasswd_filename; + TQString filename; + TQString passwd_filename; + TQString nispasswd_filename; int rc = 0; int passwd_errno = 0; int nispasswd_errno = 0; @@ -126,9 +126,9 @@ bool KUserFiles::loadpwd() // Start reading passwd file(s) for(int i = 0; i < MAXFILES; i++) { - rc = stat(QFile::encodeName(filename), &st); + rc = stat(TQFile::encodeName(filename), &st); if(rc != 0) { - KMessageBox::error( 0, i18n("Stat call on file %1 failed: %2\nCheck KUser settings.").arg(filename).arg(QString::fromLocal8Bit(strerror(errno))) ); + KMessageBox::error( 0, i18n("Stat call on file %1 failed: %2\nCheck KUser settings.").arg(filename).arg(TQString::fromLocal8Bit(strerror(errno))) ); if( (processing_file & P_PASSWD) != 0 ) { passwd_errno = errno; if(!nispasswd_filename.isEmpty()) { @@ -150,10 +150,10 @@ bool KUserFiles::loadpwd() pwd_gid = st.st_gid; // We are reading our configuration specified passwd file - QString tmp; + TQString tmp; #ifdef HAVE_FGETPWENT - FILE *fpwd = fopen(QFile::encodeName(filename), "r"); + FILE *fpwd = fopen(TQFile::encodeName(filename), "r"); if(fpwd == NULL) { KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(filename) ); return FALSE; @@ -168,18 +168,18 @@ bool KUserFiles::loadpwd() tmpKU->setCaps( KU::KUser::Cap_POSIX ); tmpKU->setUID(p->pw_uid); tmpKU->setGID(p->pw_gid); - tmpKU->setName(QString::fromLocal8Bit(p->pw_name)); - tmp = QString::fromLocal8Bit( p->pw_passwd ); + tmpKU->setName(TQString::fromLocal8Bit(p->pw_name)); + tmp = TQString::fromLocal8Bit( p->pw_passwd ); if ( tmp != "x" && tmp != "*" && !tmp.startsWith("!") ) tmpKU->setDisabled( false ); else tmpKU->setDisabled( true ); if ( tmp.startsWith("!") ) tmp.remove(0, 1); tmpKU->setPwd( tmp ); - tmpKU->setHomeDir(QString::fromLocal8Bit(p->pw_dir)); - tmpKU->setShell(QString::fromLocal8Bit(p->pw_shell)); + tmpKU->setHomeDir(TQString::fromLocal8Bit(p->pw_dir)); + tmpKU->setShell(TQString::fromLocal8Bit(p->pw_shell)); #if defined(__FreeBSD__) || defined(__bsdi__) - tmpKU->setClass(QString::fromLatin1(p->pw_class)); + tmpKU->setClass(TQString::fromLatin1(p->pw_class)); tmpKU->setLastChange(p->pw_change); tmpKU->setExpire(p->pw_expire); #endif @@ -220,7 +220,7 @@ bool KUserFiles::loadpwd() bool KUserFiles::loadsdw() { #ifdef HAVE_SHADOW - QString shadow_file,tmp; + TQString shadow_file,tmp; struct spwd *spw; KU::KUser *up = NULL; struct stat st; @@ -229,7 +229,7 @@ bool KUserFiles::loadsdw() if ( shadow_file.isEmpty() ) return TRUE; - stat( QFile::encodeName(shadow_file), &st); + stat( TQFile::encodeName(shadow_file), &st); sdw_mode = st.st_mode & 0666; sdw_uid = st.st_uid; sdw_gid = st.st_gid; @@ -237,7 +237,7 @@ bool KUserFiles::loadsdw() #ifdef HAVE_FGETSPENT FILE *f; kdDebug() << "open shadow file: " << shadow_file << endl; - if ((f = fopen( QFile::encodeName(shadow_file), "r")) == NULL) { + if ((f = fopen( TQFile::encodeName(shadow_file), "r")) == NULL) { KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(shadow_file) ); caps &= ~Cap_Shadow; return TRUE; @@ -249,12 +249,12 @@ bool KUserFiles::loadsdw() #endif kdDebug() << "shadow entry: " << spw->sp_namp << endl; - if ((up = lookup(QString::fromLocal8Bit(spw->sp_namp))) == NULL) { - KMessageBox::error( 0, i18n("No /etc/passwd entry for %1.\nEntry will be removed at the next `Save'-operation.").arg(QString::fromLocal8Bit(spw->sp_namp)) ); + if ((up = lookup(TQString::fromLocal8Bit(spw->sp_namp))) == NULL) { + KMessageBox::error( 0, i18n("No /etc/passwd entry for %1.\nEntry will be removed at the next `Save'-operation.").arg(TQString::fromLocal8Bit(spw->sp_namp)) ); continue; } - tmp = QString::fromLocal8Bit( spw->sp_pwdp ); + tmp = TQString::fromLocal8Bit( spw->sp_pwdp ); if ( tmp.startsWith("!!") || tmp == "*" ) { up->setDisabled( true ); tmp.remove( 0, 2 ); @@ -298,11 +298,11 @@ bool KUserFiles::savepwd() uid_t minuid = 0; int nis_users_written = 0; uid_t tmp_uid = 0; - QString s; - QString s1; - QString tmp, tmp2; - QString passwd_filename; - QString nispasswd_filename; + TQString s; + TQString s1; + TQString tmp, tmp2; + TQString passwd_filename; + TQString nispasswd_filename; char errors_found = '\0'; @@ -313,10 +313,10 @@ bool KUserFiles::savepwd() passwd_filename = mCfg->passwdsrc(); nispasswd_filename = mCfg->nispasswdsrc(); - QString new_passwd_filename = - passwd_filename + QString::fromLatin1(KU_CREATE_EXT); - QString new_nispasswd_filename = - nispasswd_filename+QString::fromLatin1(KU_CREATE_EXT); + TQString new_passwd_filename = + passwd_filename + TQString::fromLatin1(KU_CREATE_EXT); + TQString new_nispasswd_filename = + nispasswd_filename+TQString::fromLatin1(KU_CREATE_EXT); if( nispasswd_filename != passwd_filename ) { minuid = mCfg->nisminuid(); @@ -342,24 +342,24 @@ bool KUserFiles::savepwd() if(!passwd_filename.isEmpty()) { if ((passwd_fd = - fopen(QFile::encodeName(new_passwd_filename),"w")) == NULL) + fopen(TQFile::encodeName(new_passwd_filename),"w")) == NULL) KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(passwd_filename) ); } if(!nispasswd_filename.isEmpty() && (nispasswd_filename != passwd_filename)){ if ((nispasswd_fd = - fopen(QFile::encodeName(new_nispasswd_filename),"w")) == NULL) + fopen(TQFile::encodeName(new_nispasswd_filename),"w")) == NULL) KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(nispasswd_filename) ); } - QPtrListIterator it( mUsers ); + TQPtrListIterator it( mUsers ); KU::KUser *user; bool addok = false; user = (*it); while (true) { if ( user == 0 ) { if ( addok ) break; - it = QPtrListIterator ( mAdd ); + it = TQPtrListIterator ( mAdd ); user = (*it); addok = true; if ( user == 0 ) break; @@ -393,11 +393,11 @@ bool KUserFiles::savepwd() s = user->getName() + ":" + tmp + ":" + - QString::number( user->getUID() ) + ":" + - QString::number( user->getGID() ) + ":" + + TQString::number( user->getUID() ) + ":" + + TQString::number( user->getGID() ) + ":" + user->getClass() + ":" + - QString::number( user->getLastChange() ) + ":" + - QString::number( user->getExpire() ) + ":"; + TQString::number( user->getLastChange() ) + ":" + + TQString::number( user->getExpire() ) + ":"; s1 = user->getFullName() + "," + @@ -411,8 +411,8 @@ bool KUserFiles::savepwd() s = user->getName() + ":" + tmp + ":" + - QString::number( user->getUID() ) + ":" + - QString::number( user->getGID() ) + ":"; + TQString::number( user->getUID() ) + ":" + + TQString::number( user->getGID() ) + ":"; s1 = user->getFullName() + "," + @@ -457,18 +457,18 @@ bool KUserFiles::savepwd() if(passwd_fd) { fclose(passwd_fd); - chmod(QFile::encodeName(new_passwd_filename), pwd_mode); - chown(QFile::encodeName(new_passwd_filename), pwd_uid, pwd_gid); - rename(QFile::encodeName(new_passwd_filename), - QFile::encodeName(passwd_filename)); + chmod(TQFile::encodeName(new_passwd_filename), pwd_mode); + chown(TQFile::encodeName(new_passwd_filename), pwd_uid, pwd_gid); + rename(TQFile::encodeName(new_passwd_filename), + TQFile::encodeName(passwd_filename)); } if(nispasswd_fd) { fclose(nispasswd_fd); - chmod(QFile::encodeName(new_nispasswd_filename), pwd_mode); - chown(QFile::encodeName(new_nispasswd_filename), pwd_uid, pwd_gid); - rename(QFile::encodeName(new_nispasswd_filename), - QFile::encodeName(nispasswd_filename)); + chmod(TQFile::encodeName(new_nispasswd_filename), pwd_mode); + chown(TQFile::encodeName(new_nispasswd_filename), pwd_uid, pwd_gid); + rename(TQFile::encodeName(new_nispasswd_filename), + TQFile::encodeName(nispasswd_filename)); } if( (errors_found & NOMINUID) != 0 ) { @@ -506,13 +506,13 @@ bool KUserFiles::savesdw() { #ifdef HAVE_SHADOW bool addok = false; - QString tmp; + TQString tmp; FILE *f; struct spwd *spwp; struct spwd s; KU::KUser *up; - QString shadow_file = mCfg->shadowsrc(); - QString new_shadow_file = shadow_file+QString::fromLatin1(KU_CREATE_EXT); + TQString shadow_file = mCfg->shadowsrc(); + TQString new_shadow_file = shadow_file+TQString::fromLatin1(KU_CREATE_EXT); if ( shadow_file.isEmpty() ) return TRUE; @@ -522,7 +522,7 @@ bool KUserFiles::savesdw() s_backuped = TRUE; } - if ((f = fopen(QFile::encodeName(new_shadow_file), "w")) == NULL) { + if ((f = fopen(TQFile::encodeName(new_shadow_file), "w")) == NULL) { KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_shadow_file) ); return FALSE; } @@ -530,13 +530,13 @@ bool KUserFiles::savesdw() s.sp_namp = (char *)malloc(200); s.sp_pwdp = (char *)malloc(200); - QPtrListIterator it( mUsers ); + TQPtrListIterator it( mUsers ); up = (*it); while (true) { if ( up == 0 ) { if ( addok ) break; - it = QPtrListIterator ( mAdd ); + it = TQPtrListIterator ( mAdd ); up = (*it); addok = true; if ( up == 0 ) break; @@ -551,7 +551,7 @@ bool KUserFiles::savesdw() strncpy( s.sp_namp, up->getName().local8Bit(), 200 ); if ( up->getDisabled() ) - strncpy( s.sp_pwdp, QString("!!" + up->getSPwd()).local8Bit(), 200 ); + strncpy( s.sp_pwdp, TQString("!!" + up->getSPwd()).local8Bit(), 200 ); else strncpy( s.sp_pwdp, up->getSPwd().local8Bit(), 200 ); @@ -572,10 +572,10 @@ bool KUserFiles::savesdw() } fclose(f); - chmod(QFile::encodeName(new_shadow_file), sdw_mode); - chown(QFile::encodeName(new_shadow_file), sdw_uid, sdw_gid); - rename(QFile::encodeName(new_shadow_file), - QFile::encodeName(shadow_file)); + chmod(TQFile::encodeName(new_shadow_file), sdw_mode); + chown(TQFile::encodeName(new_shadow_file), sdw_uid, sdw_gid); + rename(TQFile::encodeName(new_shadow_file), + TQFile::encodeName(shadow_file)); free(s.sp_namp); free(s.sp_pwdp); @@ -584,11 +584,11 @@ bool KUserFiles::savesdw() } -void KUserFiles::createPassword( KU::KUser *user, const QString &password ) +void KUserFiles::createPassword( KU::KUser *user, const TQString &password ) { if ( caps & Cap_Shadow ) { user->setSPwd( encryptPass( password, mCfg->md5shadow() ) ); - user->setPwd( QString::fromLatin1("x") ); + user->setPwd( TQString::fromLatin1("x") ); } else user->setPwd( encryptPass( password, false ) ); } diff --git a/kuser/kuserfiles.h b/kuser/kuserfiles.h index bb19c45..f641ca7 100644 --- a/kuser/kuserfiles.h +++ b/kuser/kuserfiles.h @@ -23,8 +23,8 @@ #include -#include -#include +#include +#include #include "kuser.h" @@ -35,7 +35,7 @@ public: virtual bool dbcommit(); virtual bool reload(); - virtual void createPassword( KU::KUser *user, const QString &password ); + virtual void createPassword( KU::KUser *user, const TQString &password ); private: bool pw_backuped; diff --git a/kuser/kuserldap.cpp b/kuser/kuserldap.cpp index 9eb6afe..9555cb5 100644 --- a/kuser/kuserldap.cpp +++ b/kuser/kuserldap.cpp @@ -16,7 +16,7 @@ * Boston, MA 02110-1301, USA. **/ -#include +#include #include #include @@ -81,12 +81,12 @@ void KUserLDAP::result( KIO::Job *job ) delete mProg; mCancel = false; if ( job->error() ) { - QString errstr = job->errorString(); + TQString errstr = job->errorString(); if ( !errstr.isEmpty() ) { if ( ldif.isEmpty() ) KMessageBox::error( 0, errstr ); else - KMessageBox::detailedError( 0, errstr, QString::fromUtf8( ldif, ldif.size()-1 ) ); + KMessageBox::detailedError( 0, errstr, TQString::fromUtf8( ldif, ldif.size()-1 ) ); } mOk = false; } else { @@ -94,7 +94,7 @@ void KUserLDAP::result( KIO::Job *job ) } } -void KUserLDAP::data( KIO::Job *, const QByteArray& data ) +void KUserLDAP::data( KIO::Job *, const TQByteArray& data ) { if ( data.size() ) { mParser.setLDIF( data ); @@ -103,15 +103,15 @@ void KUserLDAP::data( KIO::Job *, const QByteArray& data ) } KABC::LDIF::ParseVal ret; - QString name, val; - QByteArray value; + TQString name, val; + TQByteArray value; do { ret = mParser.nextItem(); switch ( ret ) { case KABC::LDIF::Item: name = mParser.attr().lower(); value = mParser.val(); - val = QString::fromUtf8( value, value.size() ); + val = TQString::fromUtf8( value, value.size() ); if ( name == "objectclass" ) { if ( val.lower() == "posixaccount" ) mUser->setCaps( mUser->getCaps() | KU::KUser::Cap_POSIX ); @@ -144,8 +144,8 @@ void KUserLDAP::data( KIO::Job *, const QByteArray& data ) else mUser->setOffice2( val ); } else if ( name == "gecos" ) { - QString name, f1, f2, f3; - parseGecos( QCString( value.data(), value.size()+1 ), name, f1, f2, f3 ); + TQString name, f1, f2, f3; + parseGecos( TQCString( value.data(), value.size()+1 ), name, f1, f2, f3 ); if ( mUser->getFullName().isEmpty() ) mUser->setFullName( val ); if ( mUser->getOffice1().isEmpty() ) mUser->setOffice1( f1 ); if ( mUser->getOffice2().isEmpty() ) mUser->setOffice2( f1 ); @@ -248,10 +248,10 @@ bool KUserLDAP::reload() ldif = ""; KIO::Job *job = KIO::get( mUrl, true, false ); - connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ), - this, SLOT( data( KIO::Job*, const QByteArray& ) ) ); - connect( job, SIGNAL( result( KIO::Job* ) ), - this, SLOT( result( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), + this, TQT_SLOT( data( KIO::Job*, const TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( result( KIO::Job* ) ) ); // job->addMetaData( "SERVER_CTRL0", "1.2.840.113556.1.4.473 true: uidNumber"); mProg->exec(); if ( mCancel ) job->kill(); @@ -259,15 +259,15 @@ bool KUserLDAP::reload() return( mOk ); } -QString KUserLDAP::getRDN(KU::KUser *user) +TQString KUserLDAP::getRDN(KU::KUser *user) { switch ( mCfg->ldapuserrdn() ) { case KUserPrefsBase::EnumLdapuserrdn::uid: return "uid=" + user->getName(); case KUserPrefsBase::EnumLdapuserrdn::uidNumber: - return "uidNumber=" + QString::number( user->getUID() ); + return "uidNumber=" + TQString::number( user->getUID() ); case KUserPrefsBase::EnumLdapuserrdn::cn: { - QString cn = mCfg->ldapcnfullname() ? user->getFullName() : user->getName(); + TQString cn = mCfg->ldapcnfullname() ? user->getFullName() : user->getName(); if ( cn.isEmpty() ) cn = user->getName(); return "cn=" + cn; } @@ -275,7 +275,7 @@ QString KUserLDAP::getRDN(KU::KUser *user) return ""; } -void KUserLDAP::createPassword( KU::KUser *user, const QString &password ) +void KUserLDAP::createPassword( KU::KUser *user, const TQString &password ) { switch ( mCfg->ldappasswordhash() ) { case KUserPrefsBase::EnumLdappasswordhash::Clear: @@ -290,10 +290,10 @@ void KUserLDAP::createPassword( KU::KUser *user, const QString &password ) break; } case KUserPrefsBase::EnumLdappasswordhash::SMD5: { - QCString salt = genSalt( 4 ); - QCString pwd = password.utf8() + salt; + TQCString salt = genSalt( 4 ); + TQCString pwd = password.utf8() + salt; KMD5::Digest digest; - QByteArray hash(20); + TQByteArray hash(20); KMD5 md5( pwd ); md5.rawDigest( digest ); @@ -304,7 +304,7 @@ void KUserLDAP::createPassword( KU::KUser *user, const QString &password ) } case KUserPrefsBase::EnumLdappasswordhash::SHA: { struct sha1_ctx ctx; - QByteArray hash(20); + TQByteArray hash(20); sha1_init( &ctx ); sha1_update( &ctx, (const Q_UINT8*) password.utf8().data(), @@ -315,9 +315,9 @@ void KUserLDAP::createPassword( KU::KUser *user, const QString &password ) } case KUserPrefsBase::EnumLdappasswordhash::SSHA: { struct sha1_ctx ctx; - QByteArray hash(24); - QCString salt = genSalt( 4 ); - QCString pwd = password.utf8() + salt; + TQByteArray hash(24); + TQCString salt = genSalt( 4 ); + TQCString pwd = password.utf8() + salt; sha1_init( &ctx ); sha1_update( &ctx, (const Q_UINT8*) pwd.data(), pwd.length() ); @@ -331,7 +331,7 @@ void KUserLDAP::createPassword( KU::KUser *user, const QString &password ) if ( caps & Cap_Samba ) { Q_UINT8 hex[33]; - QByteArray ntlmhash; + TQByteArray ntlmhash; ntlmhash = KNTLM::ntlmHash( password ); unsigned char *hash = (unsigned char*) ntlmhash.data(); @@ -341,11 +341,11 @@ void KUserLDAP::createPassword( KU::KUser *user, const QString &password ) hash[6], hash[7], hash[8], hash[9], hash[10], hash[11], hash[12], hash[13], hash[14], hash[15]); - user->setNTPwd( QString::fromLatin1( (const char*) &hex, 32 ) ); + user->setNTPwd( TQString::fromLatin1( (const char*) &hex, 32 ) ); if ( mCfg->lanmanhash() ) { - QByteArray lmhash; + TQByteArray lmhash; lmhash = KNTLM::lmHash( password ); unsigned char *hash = (unsigned char*) lmhash.data(); snprintf( (char*) &hex, 33, @@ -354,7 +354,7 @@ void KUserLDAP::createPassword( KU::KUser *user, const QString &password ) hash[6], hash[7], hash[8], hash[9], hash[10], hash[11], hash[12], hash[13], hash[14], hash[15]); - user->setLMPwd( QString::fromLatin1( (const char*) &hex, 32 ) ); + user->setLMPwd( TQString::fromLatin1( (const char*) &hex, 32 ) ); } else { user->setLMPwd( "" ); } @@ -363,7 +363,7 @@ void KUserLDAP::createPassword( KU::KUser *user, const QString &password ) void KUserLDAP::getLDIF( KU::KUser *user, bool mod ) { - QString gecos, cn, pwd, samflags; + TQString gecos, cn, pwd, samflags; ldif.resize( 0 ); pwd = user->getPwd(); @@ -372,7 +372,7 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod ) cn = mCfg->ldapcnfullname() ? user->getFullName() : user->getName(); if ( cn.isEmpty() ) cn = user->getName(); - gecos = QString::fromLatin1("%1,%2,%3,%4") + gecos = TQString::fromLatin1("%1,%2,%3,%4") .arg(user->getFullName()) .arg(user->getOffice1()) .arg(user->getOffice2()) @@ -385,8 +385,8 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod ) ldif = ""; if ( mod ) { - QString oldrdn = getRDN( mUser ); - QString newrdn = getRDN( user ); + TQString oldrdn = getRDN( mUser ); + TQString newrdn = getRDN( user ); if ( oldrdn != newrdn ) { ldif = "dn: " + oldrdn.utf8() + "," + mUrl.dn().utf8() + "\n" + @@ -417,9 +417,9 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod ) ldif += "objectClass: sambaSamAccount\n"; } if ( mod && mObjectClasses.contains( mUser ) ) { - QStringList ocs = mObjectClasses[ mUser ]; + TQStringList ocs = mObjectClasses[ mUser ]; kdDebug() << user->getName() << " has additional objectclasses: " << ocs.join(",") << endl; - QValueListIterator it; + TQValueListIterator it; for ( it = ocs.begin(); it != ocs.end(); ++it ) { ldif += "objectClass: "; ldif += (*it).utf8(); @@ -447,13 +447,13 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod ) if ( user->getCaps() & KU::KUser::Cap_POSIX ) { if ( mod ) ldif += "replace: uidnumber\n"; ldif += KABC::LDIF::assembleLine( "uidnumber", - QString::number( user->getUID() ) )+"\n"; + TQString::number( user->getUID() ) )+"\n"; if ( mod ) ldif += "-\nreplace: gidnumber\n"; ldif += KABC::LDIF::assembleLine( "gidnumber", - QString::number( user->getGID() ) )+"\n"; + TQString::number( user->getGID() ) )+"\n"; if ( mod ) ldif += "-\nreplace: gecos\n"; - ldif += KABC::LDIF::assembleLine( "gecos", !mCfg->ldapgecos() ? QCString() : - QCString( gecos.latin1() ) )+"\n"; + ldif += KABC::LDIF::assembleLine( "gecos", !mCfg->ldapgecos() ? TQCString() : + TQCString( gecos.latin1() ) )+"\n"; if ( mod ) ldif += "-\nreplace: homedirectory\n"; ldif += KABC::LDIF::assembleLine( "homedirectory", user->getHomeDir() )+"\n"; @@ -514,11 +514,11 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod ) user->getPGSID().getSID() ) + "\n"; if ( mod ) ldif += "-\nreplace: sambapwdlastset\n"; ldif += KABC::LDIF::assembleLine( "sambapwdlastset", - QString::number( user->getLastChange() ) ) + "\n"; + TQString::number( user->getLastChange() ) ) + "\n"; if ( mod ) ldif += "-\nreplace: sambakickofftime\n"; if ( user->getExpire() != -1 ) ldif += KABC::LDIF::assembleLine( "sambakickofftime", - QString::number( user->getExpire() ) ) + "\n"; + TQString::number( user->getExpire() ) ) + "\n"; if ( mod ) ldif += "-\n"; } else { if ( mod ) { @@ -556,25 +556,25 @@ void KUserLDAP::getLDIF( KU::KUser *user, bool mod ) if ( user->getCaps() & KU::KUser::Cap_POSIX ) { if ( mod ) ldif += "replace: shadowlastchange\n"; //sambapwdlastset ldif += KABC::LDIF::assembleLine( "shadowlastchange", - QString::number( timeToDays( user->getLastChange() ) ) ) + "\n"; + TQString::number( timeToDays( user->getLastChange() ) ) ) + "\n"; if ( mod ) ldif += "-\nreplace: shadowmin\n"; //sambaPwdCanChange ldif += KABC::LDIF::assembleLine( "shadowmin", - QString::number( user->getMin() ) ) + "\n"; + TQString::number( user->getMin() ) ) + "\n"; if ( mod ) ldif += "-\nreplace: shadowmax\n"; //sambaPwdMustChange ldif += KABC::LDIF::assembleLine( "shadowmax", - QString::number( user->getMax() ) ) + "\n"; + TQString::number( user->getMax() ) ) + "\n"; if ( mod ) ldif += "-\nreplace: shadowwarning\n"; ldif += KABC::LDIF::assembleLine( "shadowwarning", - QString::number( user->getWarn() ) ) + "\n"; + TQString::number( user->getWarn() ) ) + "\n"; if ( mod ) ldif += "-\nreplace: shadowinactive\n"; ldif += KABC::LDIF::assembleLine( "shadowinactive", - QString::number( user->getInactive() ) ) + "\n"; + TQString::number( user->getInactive() ) ) + "\n"; if ( mod ) ldif += "-\nreplace: shadowexpire\n"; //sambaKickoffTime ldif += KABC::LDIF::assembleLine( "shadowexpire", - QString::number( timeToDays( user->getExpire() ) ) ) + "\n"; + TQString::number( timeToDays( user->getExpire() ) ) ) + "\n"; if ( mod ) ldif += "-\nreplace: shadowflag\n"; ldif += KABC::LDIF::assembleLine( "shadowflag", - QString::number( user->getFlag() ) ) + "\n"; + TQString::number( user->getFlag() ) ) + "\n"; if ( mod ) ldif += "-\n"; } else { if ( mod ) { @@ -610,15 +610,15 @@ bool KUserLDAP::dbcommit() mProg = new KProgressDialog( 0, "", i18n("LDAP Operation"), "", true ); KIO::Job *job = KIO::put( mUrl, -1, false, false, false ); - connect( job, SIGNAL( dataReq( KIO::Job*, QByteArray& ) ), - this, SLOT( putData( KIO::Job*, QByteArray& ) ) ); - connect( job, SIGNAL( result( KIO::Job* ) ), - this, SLOT( result( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray& ) ), + this, TQT_SLOT( putData( KIO::Job*, TQByteArray& ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( result( KIO::Job* ) ) ); mProg->exec(); return( mOk ); } -void KUserLDAP::putData( KIO::Job *, QByteArray& data ) +void KUserLDAP::putData( KIO::Job *, TQByteArray& data ) { ModIt mit = mMod.begin(); diff --git a/kuser/kuserldap.h b/kuser/kuserldap.h index 8d921c1..6af91cc 100644 --- a/kuser/kuserldap.h +++ b/kuser/kuserldap.h @@ -21,9 +21,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -32,7 +32,7 @@ #include "kuser.h" -class KUserLDAP : public QObject, public KU::KUsers { +class KUserLDAP : public TQObject, public KU::KUsers { Q_OBJECT public: KUserLDAP(KUserPrefsBase *cfg); @@ -42,8 +42,8 @@ public: virtual bool dbcommit(); private slots: - void data( KIO::Job*, const QByteArray& ); - void putData( KIO::Job *job, QByteArray& data ); + void data( KIO::Job*, const TQByteArray& ); + void putData( KIO::Job *job, TQByteArray& data ); void result( KIO::Job* ); private: KABC::LDIF mParser; @@ -52,16 +52,16 @@ private: bool mOk, mCancel; KU::KUser *mUser, *mDelUser, *mAddUser; int mAdv; - QCString ldif; + TQCString ldif; int schemaversion; - QStringList mOc; - QMap mObjectClasses; + TQStringList mOc; + TQMap mObjectClasses; - QString getRDN( KU::KUser *user ); + TQString getRDN( KU::KUser *user ); void getLDIF( KU::KUser *user, bool mod ); void delData( KU::KUser *user ); - virtual void createPassword( KU::KUser *user, const QString &password ); + virtual void createPassword( KU::KUser *user, const TQString &password ); }; #endif // _KUSERLDAP_H_ diff --git a/kuser/kusersystem.cpp b/kuser/kusersystem.cpp index ef0247f..8c67fcb 100644 --- a/kuser/kusersystem.cpp +++ b/kuser/kusersystem.cpp @@ -25,7 +25,7 @@ #include #endif -#include +#include #include #include @@ -70,25 +70,25 @@ bool KUserSystem::loadpwd() { passwd *p; KU::KUser *tmpKU = 0; - QString tmp; + TQString tmp; setpwent(); //This should be enough for BSDs while ((p = getpwent()) != NULL) { tmpKU = new KU::KUser(); tmpKU->setUID(p->pw_uid); tmpKU->setGID(p->pw_gid); - tmpKU->setName(QString::fromLocal8Bit(p->pw_name)); - tmp = QString::fromLocal8Bit( p->pw_passwd ); + tmpKU->setName(TQString::fromLocal8Bit(p->pw_name)); + tmp = TQString::fromLocal8Bit( p->pw_passwd ); if ( tmp != "x" && tmp != "*" && !tmp.startsWith("!") ) tmpKU->setDisabled( false ); else tmpKU->setDisabled( true ); if ( tmp.startsWith("!") ) tmp.remove(0, 1); tmpKU->setPwd( tmp ); - tmpKU->setHomeDir(QString::fromLocal8Bit(p->pw_dir)); - tmpKU->setShell(QString::fromLocal8Bit(p->pw_shell)); + tmpKU->setHomeDir(TQString::fromLocal8Bit(p->pw_dir)); + tmpKU->setShell(TQString::fromLocal8Bit(p->pw_shell)); #if defined(__FreeBSD__) || defined(__bsdi__) - tmpKU->setClass(QString::fromLatin1(p->pw_class)); + tmpKU->setClass(TQString::fromLatin1(p->pw_class)); tmpKU->setLastChange(p->pw_change); tmpKU->setExpire(p->pw_expire); #endif @@ -109,16 +109,16 @@ bool KUserSystem::loadsdw() #ifdef HAVE_SHADOW struct spwd *spw; KU::KUser *up = NULL; - QString tmp; + TQString tmp; setspent(); while ((spw = getspent())) { // read a shadow password structure - if ((up = lookup(QString::fromLocal8Bit(spw->sp_namp))) == NULL) { + if ((up = lookup(TQString::fromLocal8Bit(spw->sp_namp))) == NULL) { continue; } - tmp = QString::fromLocal8Bit( spw->sp_pwdp ); + tmp = TQString::fromLocal8Bit( spw->sp_pwdp ); if ( tmp.startsWith("!!") || tmp == "*" ) { up->setDisabled( true ); tmp.remove( 0, 2 ); diff --git a/kuser/kusersystem.h b/kuser/kusersystem.h index b982447..8316731 100644 --- a/kuser/kusersystem.h +++ b/kuser/kusersystem.h @@ -23,8 +23,8 @@ #include -#include -#include +#include +#include #include "kuser.h" @@ -35,7 +35,7 @@ public: virtual bool dbcommit() { return true; } virtual bool reload(); - virtual void createPassword( KU::KUser * /*user*/, const QString & /*password*/ ) {} + virtual void createPassword( KU::KUser * /*user*/, const TQString & /*password*/ ) {} private: diff --git a/kuser/kuservw.cpp b/kuser/kuservw.cpp index 766700c..f34581c 100644 --- a/kuser/kuservw.cpp +++ b/kuser/kuservw.cpp @@ -29,7 +29,7 @@ KUserViewItem::KUserViewItem(KListView *parent, KU::KUser *aku) { } -int KUserViewItem::compare( QListViewItem *i, int col, bool ascending ) const +int KUserViewItem::compare( TQListViewItem *i, int col, bool ascending ) const { if ( col == 0 ) { uid_t uid1, uid2; @@ -40,50 +40,50 @@ int KUserViewItem::compare( QListViewItem *i, int col, bool ascending ) const if ( uid1 == uid2 ) return 0; return ( uid1 < uid2) ? -1: 1; } else { - return QListViewItem::compare( i, col, ascending ); + return TQListViewItem::compare( i, col, ascending ); } } -void KUserViewItem::paintCell( QPainter *p, const QColorGroup &cg, +void KUserViewItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment ) { - QColorGroup _cg( cg ); - QColor c = _cg.text(); + TQColorGroup _cg( cg ); + TQColor c = _cg.text(); if ( mUser->getDisabled() ) - _cg.setColor( QColorGroup::Text, KGlobalSettings::visitedLinkColor() ); + _cg.setColor( TQColorGroup::Text, KGlobalSettings::visitedLinkColor() ); KListViewItem::paintCell( p, _cg, column, width, alignment ); - _cg.setColor( QColorGroup::Text, c ); + _cg.setColor( TQColorGroup::Text, c ); } -QString KUserViewItem::text(int num) const +TQString KUserViewItem::text(int num) const { switch(num) { case 0: return mUser->getCaps() & KU::KUser::Cap_POSIX ? - QString::number( mUser->getUID() ) : QString::null; + TQString::number( mUser->getUID() ) : TQString::null; case 1: return mUser->getName(); case 2: return mUser->getFullName(); case 3: return mUser->getHomeDir(); case 4: return mUser->getShell(); case 5: return mUser->getSID().getDOM(); case 6: return mUser->getCaps() & KU::KUser::Cap_Samba ? - QString::number( mUser->getSID().getRID() ) : QString::null; + TQString::number( mUser->getSID().getRID() ) : TQString::null; case 7: return mUser->getLoginScript(); case 8: return mUser->getProfilePath(); case 9: return mUser->getHomeDrive(); case 10: return mUser->getHomePath(); } - return QString::null; + return TQString::null; } -KUserView::KUserView(QWidget *parent, const char *name) +KUserView::KUserView(TQWidget *parent, const char *name) : KListView( parent, name ) { - setSelectionMode( QListView::Extended ); + setSelectionMode( TQListView::Extended ); } KUserView::~KUserView() diff --git a/kuser/kuservw.h b/kuser/kuservw.h index 3f28948..b9fa4de 100644 --- a/kuser/kuservw.h +++ b/kuser/kuservw.h @@ -21,7 +21,7 @@ #ifndef _KU_USERVW_H_ #define _KU_USERVW_H_ -#include +#include #include @@ -33,10 +33,10 @@ public: KUserViewItem(KListView *parent, KU::KUser *aku); KU::KUser *user() { return mUser; } private: - virtual QString text ( int ) const; - virtual void paintCell( QPainter *p, const QColorGroup &cg, + virtual TQString text ( int ) const; + virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment ); - virtual int compare( QListViewItem *i, int col, bool ascending ) const; + virtual int compare( TQListViewItem *i, int col, bool ascending ) const; KU::KUser *mUser; }; @@ -45,7 +45,7 @@ class KUserView : public KListView Q_OBJECT public: - KUserView( QWidget* parent = 0, const char* name = 0 ); + KUserView( TQWidget* parent = 0, const char* name = 0 ); virtual ~KUserView(); diff --git a/kuser/main.cpp b/kuser/main.cpp index d6b4bfb..638011d 100644 --- a/kuser/main.cpp +++ b/kuser/main.cpp @@ -18,7 +18,7 @@ * Boston, MA 02110-1301, USA. **/ -#include +#include #include #include diff --git a/kuser/mainView.cpp b/kuser/mainView.cpp index 4f4e388..9c9b5d8 100644 --- a/kuser/mainView.cpp +++ b/kuser/mainView.cpp @@ -22,8 +22,8 @@ #include -#include -#include +#include +#include #include #include @@ -39,7 +39,7 @@ #include "pwddlg.h" #include "editGroup.h" -mainView::mainView(QWidget *parent) : QTabWidget(parent) +mainView::mainView(TQWidget *parent) : TQTabWidget(parent) { init(); } @@ -52,13 +52,13 @@ void mainView::init() { lbgroups = new KGroupView( this, "lbgroups" ); addTab( lbgroups, i18n("Groups")); - connect(lbusers, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(userSelected())); - connect(lbusers, SIGNAL(returnPressed(QListViewItem *)), this, SLOT(userSelected())); + connect(lbusers, TQT_SIGNAL(doubleClicked(TQListViewItem *)), this, TQT_SLOT(userSelected())); + connect(lbusers, TQT_SIGNAL(returnPressed(TQListViewItem *)), this, TQT_SLOT(userSelected())); - connect(lbgroups, SIGNAL(doubleClicked(QListViewItem *)), this, SLOT(groupSelected())); - connect(lbgroups, SIGNAL(returnPressed(QListViewItem *)), this, SLOT(groupSelected())); + connect(lbgroups, TQT_SIGNAL(doubleClicked(TQListViewItem *)), this, TQT_SLOT(groupSelected())); + connect(lbgroups, TQT_SIGNAL(returnPressed(TQListViewItem *)), this, TQT_SLOT(groupSelected())); - connect(this, SIGNAL(currentChanged(QWidget *)), this, SLOT(slotTabChanged())); + connect(this, TQT_SIGNAL(currentChanged(TQWidget *)), this, TQT_SLOT(slotTabChanged())); } mainView::~mainView() @@ -132,11 +132,11 @@ void mainView::userdel() if (!user) return; - QString username = user->getName(); + TQString username = user->getName(); gid_t gid = user->getGID(); delUser dlg(user, this); - if ( dlg.exec() == QDialog::Rejected ) + if ( dlg.exec() == TQDialog::Rejected ) return; user->setDeleteHome( dlg.getDeleteHomeDir() ); @@ -165,7 +165,7 @@ void mainView::userdel() if ( group && KMessageBox::questionYesNo( 0, i18n("You are using private groups.\n" "Do you want to delete the user's private group '%1'?") - .arg(group->getName()), QString::null, + .arg(group->getName()), TQString::null, KStdGuiItem::del(), i18n("Do Not Delete")) == KMessageBox::Yes) { kdDebug() << "del private group" << endl; kug->getGroups().del( group ); @@ -196,9 +196,9 @@ void mainView::useradd() */ if ( samba ) rid = SID::uid2rid( uid ); bool ok; - QString name = KInputDialog::getText( QString::null, + TQString name = KInputDialog::getText( TQString::null, i18n("Please type the name of the new user:"), - QString::null, &ok ); + TQString::null, &ok ); if ( !ok ) return; @@ -246,7 +246,7 @@ void mainView::useradd() au.setCreateHomeDir( kug->kcfg()->createHomeDir() ); au.setCopySkel( kug->kcfg()->copySkel() ); - if ( au.exec() == QDialog::Rejected ) { + if ( au.exec() == TQDialog::Rejected ) { delete tk; return; } @@ -305,13 +305,13 @@ void mainView::setpwd() if ( count > 1 ) { if ( KMessageBox::questionYesNo( 0, i18n("You have selected %1 users. Do you really want to change the password for all the selected users?") - .arg( count ), QString::null, i18n("Change"), i18n("Do Not Change") ) == KMessageBox::No ) return; + .arg( count ), TQString::null, i18n("Change"), i18n("Do Not Change") ) == KMessageBox::No ) return; } pwddlg d( this ); - if ( d.exec() != QDialog::Accepted ) return; + if ( d.exec() != TQDialog::Accepted ) return; KU::KUser newuser, *user; - QListViewItem *item; + TQListViewItem *item; item = lbusers->firstChild(); while ( item ) { @@ -347,7 +347,7 @@ void mainView::groupSelected() } editGroup egdlg( &newGroup, samba, false ); - if ( egdlg.exec() == QDialog::Accepted ) { + if ( egdlg.exec() == TQDialog::Accepted ) { kug->getGroups().mod( tmpKG, newGroup ); updateGroups(); } @@ -355,8 +355,8 @@ void mainView::groupSelected() void mainView::userSelected() { - QListViewItem *item; - QPtrList ulist; + TQListViewItem *item; + TQPtrList ulist; item = lbusers->firstChild(); while ( item ) { @@ -368,7 +368,7 @@ void mainView::userSelected() if ( ulist.isEmpty() ) return; propdlg editUser( ulist, this ); - if ( editUser.exec() == QDialog::Rejected ) return; + if ( editUser.exec() == TQDialog::Rejected ) return; KU::KUser *user, newuser; user = ulist.first(); @@ -415,7 +415,7 @@ void mainView::grpadd() } editGroup egdlg( tk, samba, true ); - if ( egdlg.exec() == QDialog::Rejected ) { + if ( egdlg.exec() == TQDialog::Rejected ) { delete tk; return; } @@ -430,7 +430,7 @@ void mainView::grpedit() void mainView::grpdel() { - QListViewItem *item; + TQListViewItem *item; KU::KGroup *group = NULL; int selected = 0; @@ -458,12 +458,12 @@ void mainView::grpdel() case 1: if (KMessageBox::warningContinueCancel( 0, i18n("Do you really want to delete the group '%1'?").arg(group->getName()), - QString::null, KStdGuiItem::del()) != KMessageBox::Continue) return; + TQString::null, KStdGuiItem::del()) != KMessageBox::Continue) return; break; default: if (KMessageBox::warningContinueCancel( 0, i18n("Do you really want to delete the %1 selected groups?").arg(selected), - QString::null, KStdGuiItem::del()) != KMessageBox::Continue) return; + TQString::null, KStdGuiItem::del()) != KMessageBox::Continue) return; } item = lbgroups->firstChild(); diff --git a/kuser/mainView.h b/kuser/mainView.h index 5304ea3..736cdb3 100644 --- a/kuser/mainView.h +++ b/kuser/mainView.h @@ -23,19 +23,19 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "kuservw.h" #include "kgroupvw.h" -class mainView : public QTabWidget { +class mainView : public TQTabWidget { Q_OBJECT public: - mainView(QWidget *parent = 0); + mainView(TQWidget *parent = 0); ~mainView(); void init(); diff --git a/kuser/mainWidget.cpp b/kuser/mainWidget.cpp index 91b5862..afdb557 100644 --- a/kuser/mainWidget.cpp +++ b/kuser/mainWidget.cpp @@ -18,8 +18,8 @@ * Boston, MA 02110-1301, USA. **/ -#include -#include +#include +#include #include #include @@ -68,46 +68,46 @@ bool mainWidget::queryClose() void mainWidget::setupActions() { - KStdAction::quit(this, SLOT(close()), actionCollection()); - KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), actionCollection()); + KStdAction::quit(this, TQT_SLOT(close()), actionCollection()); + KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); - KStdAction::preferences(this, SLOT(properties()), actionCollection()); + KStdAction::preferences(this, TQT_SLOT(properties()), actionCollection()); -#define BarIconC(x) BarIcon(QString::fromLatin1(x)) +#define BarIconC(x) BarIcon(TQString::fromLatin1(x)) - (void) new KAction(i18n("&Add..."), QIconSet(BarIconC("add_user")), 0, md, - SLOT(useradd()), actionCollection(), "add_user"); + (void) new KAction(i18n("&Add..."), TQIconSet(BarIconC("add_user")), 0, md, + TQT_SLOT(useradd()), actionCollection(), "add_user"); - (void) new KAction(i18n("&Edit..."), QIconSet(BarIconC("edit_user")), 0, md, - SLOT(useredit()), actionCollection(), "edit_user"); + (void) new KAction(i18n("&Edit..."), TQIconSet(BarIconC("edit_user")), 0, md, + TQT_SLOT(useredit()), actionCollection(), "edit_user"); - (void) new KAction(i18n("&Delete..."), QIconSet(BarIconC("delete_user")), 0, md, - SLOT(userdel()), actionCollection(), "delete_user"); + (void) new KAction(i18n("&Delete..."), TQIconSet(BarIconC("delete_user")), 0, md, + TQT_SLOT(userdel()), actionCollection(), "delete_user"); (void) new KAction(i18n("&Set Password..."), - 0, md, SLOT(setpwd()), actionCollection(), "set_password_user"); + 0, md, TQT_SLOT(setpwd()), actionCollection(), "set_password_user"); - (void) new KAction(i18n("&Add..."), QIconSet(BarIconC("add_group")), 0, md, - SLOT(grpadd()), actionCollection(), "add_group"); + (void) new KAction(i18n("&Add..."), TQIconSet(BarIconC("add_group")), 0, md, + TQT_SLOT(grpadd()), actionCollection(), "add_group"); - (void) new KAction(i18n("&Edit..."), QIconSet(BarIconC("edit_group")), 0, md, - SLOT(grpedit()), actionCollection(), "edit_group"); + (void) new KAction(i18n("&Edit..."), TQIconSet(BarIconC("edit_group")), 0, md, + TQT_SLOT(grpedit()), actionCollection(), "edit_group"); - (void) new KAction(i18n("&Delete"), QIconSet(BarIconC("delete_group")), 0, md, - SLOT(grpdel()), actionCollection(), "delete_group"); + (void) new KAction(i18n("&Delete"), TQIconSet(BarIconC("delete_group")), 0, md, + TQT_SLOT(grpdel()), actionCollection(), "delete_group"); - (void) new KAction(i18n("&Reload"), QIconSet(BarIconC("reload")), 0, this, - SLOT(reload()), actionCollection(), "reload"); + (void) new KAction(i18n("&Reload"), TQIconSet(BarIconC("reload")), 0, this, + TQT_SLOT(reload()), actionCollection(), "reload"); #undef BarIconC (void) new KAction(i18n("&Select Connection..."), 0, this, - SLOT(selectconn()), actionCollection(), "select_conn"); + TQT_SLOT(selectconn()), actionCollection(), "select_conn"); mShowSys = new KToggleAction(i18n("Show System Users/Groups"), 0, 0, this, - SLOT(showSys()), actionCollection(), "show_sys"); + TQT_SLOT(showSys()), actionCollection(), "show_sys"); mShowSys->setCheckedState(i18n("Hide System Users/Groups")); mShowSys->setChecked( kug->kcfg()->showsys() ); } @@ -123,7 +123,7 @@ void mainWidget::showSys() void mainWidget::properties() { editDefaults *eddlg = new editDefaults( kug->kcfg(), this ); - connect(eddlg, SIGNAL(settingsChanged()), this, SLOT(slotApplySettings())); + connect(eddlg, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotApplySettings())); eddlg->show(); } @@ -147,14 +147,14 @@ void mainWidget::init() actionCollection()->action("delete_user")->setEnabled( rw ); actionCollection()->action("set_password_user")->setEnabled( rw ); if ( rw ) { - connect( md, SIGNAL(userSelected(bool)), - actionCollection()->action("edit_user"), SLOT(setEnabled(bool)) ); - connect( md, SIGNAL(userSelected(bool)), - actionCollection()->action("delete_user"), SLOT(setEnabled(bool)) ); - connect( md, SIGNAL(userSelected(bool)), - actionCollection()->action("set_password_user"), SLOT(setEnabled(bool)) ); + connect( md, TQT_SIGNAL(userSelected(bool)), + actionCollection()->action("edit_user"), TQT_SLOT(setEnabled(bool)) ); + connect( md, TQT_SIGNAL(userSelected(bool)), + actionCollection()->action("delete_user"), TQT_SLOT(setEnabled(bool)) ); + connect( md, TQT_SIGNAL(userSelected(bool)), + actionCollection()->action("set_password_user"), TQT_SLOT(setEnabled(bool)) ); } else { - disconnect( md, SIGNAL(userSelected(bool)), 0, 0 ); + disconnect( md, TQT_SIGNAL(userSelected(bool)), 0, 0 ); } rw = ! ( kug->getGroups().getCaps() & KU::KGroups::Cap_ReadOnly ); @@ -163,16 +163,16 @@ void mainWidget::init() actionCollection()->action("edit_group")->setEnabled( rw ); actionCollection()->action("delete_group")->setEnabled( rw ); if ( rw ) { - connect( md, SIGNAL(groupSelected(bool)), - actionCollection()->action("edit_group"), SLOT(setEnabled(bool)) ); - connect( md, SIGNAL(groupSelected(bool)), - actionCollection()->action("delete_group"), SLOT(setEnabled(bool)) ); + connect( md, TQT_SIGNAL(groupSelected(bool)), + actionCollection()->action("edit_group"), TQT_SLOT(setEnabled(bool)) ); + connect( md, TQT_SIGNAL(groupSelected(bool)), + actionCollection()->action("delete_group"), TQT_SLOT(setEnabled(bool)) ); } else { - disconnect( md, SIGNAL(groupSelected(bool)), 0, 0 ); + disconnect( md, TQT_SIGNAL(groupSelected(bool)), 0, 0 ); } md->reloadUsers(); md->reloadGroups(); - QTimer::singleShot( 0, md, SLOT(slotTabChanged()) ); + TQTimer::singleShot( 0, md, TQT_SLOT(slotTabChanged()) ); } void mainWidget::slotApplySettings() @@ -184,7 +184,7 @@ void mainWidget::slotApplySettings() void mainWidget::slotApplyConnection() { kdDebug() << "slotApplyConnection()" << endl; - QString conn = sc->connSelected(); + TQString conn = sc->connSelected(); kug->kcfg()->setConnection( conn ); kug->initCfg( conn ); slotApplySettings(); @@ -193,8 +193,8 @@ void mainWidget::slotApplyConnection() void mainWidget::selectconn() { sc = new SelectConn( kug->kcfg()->connection(), this, "selectconn" ); - connect( sc, SIGNAL(applyClicked()), SLOT(slotApplyConnection()) ); - connect( sc, SIGNAL(okClicked()), SLOT(slotApplyConnection()) ); + connect( sc, TQT_SIGNAL(applyClicked()), TQT_SLOT(slotApplyConnection()) ); + connect( sc, TQT_SIGNAL(okClicked()), TQT_SLOT(slotApplyConnection()) ); sc->show(); } diff --git a/kuser/misc.cpp b/kuser/misc.cpp index 4215c40..c16f563 100644 --- a/kuser/misc.cpp +++ b/kuser/misc.cpp @@ -28,21 +28,21 @@ #ifdef HAVE_CRYPT_H #include #endif -#include +#include #include #include "misc.h" #include "kglobal_.h" -bool backup(const QString & name) +bool backup(const TQString & name) { - QString tmp = name + QString::fromLatin1(KU_BACKUP_EXT); - QFile::remove( tmp ); + TQString tmp = name + TQString::fromLatin1(KU_BACKUP_EXT); + TQFile::remove( tmp ); - if (copyFile(QFile::encodeName(name), QFile::encodeName(tmp)) == -1) + if (copyFile(TQFile::encodeName(name), TQFile::encodeName(tmp)) == -1) { - QString str; + TQString str; KMessageBox::error( 0, i18n("Can't create backup file for %1").arg(name) ); return false; } @@ -58,10 +58,10 @@ time_t now() { #define BLOCK_SIZE 65536 -int copyFile(const QString & from, const QString & to) +int copyFile(const TQString & from, const TQString & to) { - QFile fi; - QFile fo; + TQFile fi; + TQFile fo; char buf[BLOCK_SIZE]; fi.setName(from); @@ -95,9 +95,9 @@ int copyFile(const QString & from, const QString & to) return (0); } -QStringList readShells() +TQStringList readShells() { - QStringList shells; + TQStringList shells; FILE *f = fopen(SHELL_FILE,"r"); if (f) { @@ -110,31 +110,31 @@ QStringList readShells() s[strlen(s)-1]=0; if ((s[0])&&(s[0]!='#')) - shells.append(QFile::decodeName(s)); + shells.append(TQFile::decodeName(s)); } fclose(f); } return shells; } -void addShell(const QString &shell) +void addShell(const TQString &shell) { - QStringList shells = readShells(); + TQStringList shells = readShells(); if (shells.contains(shell)) return; FILE *f = fopen(SHELL_FILE,"a"); if (f) { - fputs(QFile::encodeName(shell).data(), f); + fputs(TQFile::encodeName(shell).data(), f); fputc('\n', f); } fclose(f); } -QCString genSalt( int len ) +TQCString genSalt( int len ) { - QCString salt( len + 1 ); + TQCString salt( len + 1 ); const char * set = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"; salt[0] = set[getpid() % strlen(set)]; @@ -144,9 +144,9 @@ QCString genSalt( int len ) return salt; } -QString encryptPass( const QString &pass, bool md5 ) +TQString encryptPass( const TQString &pass, bool md5 ) { - QCString salt; + TQCString salt; char tmp[128]; if ( md5 ) { @@ -157,8 +157,8 @@ QString encryptPass( const QString &pass, bool md5 ) } else { salt = genSalt( 2 ); } - strcpy( tmp, crypt( QFile::encodeName( pass ), salt ) ); - return QString::fromLocal8Bit( tmp ); + strcpy( tmp, crypt( TQFile::encodeName( pass ), salt ) ); + return TQString::fromLocal8Bit( tmp ); } int timeToDays(time_t time) diff --git a/kuser/misc.h b/kuser/misc.h index 87485e6..b1f3f95 100644 --- a/kuser/misc.h +++ b/kuser/misc.h @@ -25,20 +25,20 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include class KUser; -bool backup(const QString & name); -QCString genSalt( int len ); -QString encryptPass( const QString &pass, bool md5 ); +bool backup(const TQString & name); +TQCString genSalt( int len ); +TQString encryptPass( const TQString &pass, bool md5 ); time_t now(); -int copyFile(const QString & from, const QString & to); -QStringList readShells(); -void addShell(const QString &shell); +int copyFile(const TQString & from, const TQString & to); +TQStringList readShells(); +void addShell(const TQString &shell); int timeToDays(time_t time); time_t daysToTime(int days); diff --git a/kuser/propdlg.cpp b/kuser/propdlg.cpp index 726cec1..17c96d4 100644 --- a/kuser/propdlg.cpp +++ b/kuser/propdlg.cpp @@ -21,35 +21,35 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include -#include +#include #include "propdlg.h" #include "pwddlg.h" #include "kglobal_.h" #include "misc.h" -void propdlg::addRow(QWidget *parent, QGridLayout *layout, int row, - QWidget *widget, const QString &label, const QString &what, +void propdlg::addRow(TQWidget *parent, TQGridLayout *layout, int row, + TQWidget *widget, const TQString &label, const TQString &what, bool two_column, bool nochange) { - QLabel *lab = new QLabel(widget, label, parent); + TQLabel *lab = new TQLabel(widget, label, parent); lab->setMinimumSize(lab->sizeHint()); widget->setMinimumSize(widget->sizeHint()); layout->addWidget(lab, row, 0); if (!what.isEmpty()) { - QWhatsThis::add(lab, what); - QWhatsThis::add(widget, what); + TQWhatsThis::add(lab, what); + TQWhatsThis::add(widget, what); } if (two_column) layout->addMultiCellWidget(widget, row, row, 1, 2); @@ -57,18 +57,18 @@ void propdlg::addRow(QWidget *parent, QGridLayout *layout, int row, layout->addWidget(widget, row, 1); if ( !nochange || ro ) return; - QCheckBox *nc = new QCheckBox( i18n("Do not change"), parent ); + TQCheckBox *nc = new TQCheckBox( i18n("Do not change"), parent ); layout->addWidget( nc, row, 3 ); nc->hide(); mNoChanges[ widget ] = nc; } -KIntSpinBox *propdlg::addDaysGroup(QWidget *parent, QGridLayout *layout, int row, - const QString &title, bool never) +KIntSpinBox *propdlg::addDaysGroup(TQWidget *parent, TQGridLayout *layout, int row, + const TQString &title, bool never) { KIntSpinBox *days; - QLabel *label = new QLabel( title, parent ); + TQLabel *label = new TQLabel( title, parent ); layout->addMultiCellWidget( label, row, row, 0, 1, AlignRight ); days = new KIntSpinBox( parent ); @@ -86,9 +86,9 @@ KIntSpinBox *propdlg::addDaysGroup(QWidget *parent, QGridLayout *layout, int row } layout->addWidget( days, row, 2 ); - connect(days, SIGNAL(valueChanged(int)), this, SLOT(changed())); + connect(days, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed())); - QCheckBox *nc = new QCheckBox( i18n("Do not change"), parent ); + TQCheckBox *nc = new TQCheckBox( i18n("Do not change"), parent ); layout->addWidget( nc, row, 3 ); nc->hide(); mNoChanges[ days ] = nc; @@ -100,66 +100,66 @@ void propdlg::initDlg() { ro = kug->getUsers().getCaps() & KU::KUsers::Cap_ReadOnly; - QString whatstr; + TQString whatstr; // Tab 1: User Info { - QFrame *frame = addPage(i18n("User Info")); - QGridLayout *layout = new QGridLayout(frame, 20, 4, marginHint(), spacingHint()); + TQFrame *frame = addPage(i18n("User Info")); + TQGridLayout *layout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint()); int row = 0; frontpage = frame; frontlayout = layout; - lbuser = new QLabel(frame); + lbuser = new TQLabel(frame); // whatstr = i18n("WHAT IS THIS: User login"); addRow(frame, layout, row++, lbuser, i18n("User login:"), whatstr, false, false); leid = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: User Id"); - leid->setValidator(new QIntValidator(frame)); + leid->setValidator(new TQIntValidator(frame)); addRow(frame, layout, row++, leid, i18n("&User ID:"), whatstr); - connect(leid, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leid, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); if ( !ro ) { - pbsetpwd = new QPushButton(i18n("Set &Password..."), frame); + pbsetpwd = new TQPushButton(i18n("Set &Password..."), frame); layout->addWidget(pbsetpwd, 0, 2); - connect(pbsetpwd, SIGNAL(clicked()), this, SLOT(setpwd())); + connect(pbsetpwd, TQT_SIGNAL(clicked()), this, TQT_SLOT(setpwd())); } lefname = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Full Name"); addRow(frame, layout, row++, lefname, i18n("Full &name:"), whatstr); - connect(lefname, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(lefname, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); lefname->setFocus(); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_InetOrg ) { lesurname = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Surname"); addRow(frame, layout, row++, lesurname, i18n("Surname:"), whatstr); - connect(lesurname, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(lesurname, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); lemail = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Email"); addRow(frame, layout, row++, lemail, i18n("Email address:"), whatstr); - connect(lemail, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(lemail, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); } leshell = new KComboBox(true, frame); leshell->clear(); leshell->insertItem(i18n("")); - QStringList shells = readShells(); + TQStringList shells = readShells(); shells.sort(); leshell->insertStringList(shells); - connect(leshell, SIGNAL(activated(const QString &)), this, SLOT(changed())); - connect(leshell, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leshell, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(changed())); + connect(leshell, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Login Shell"); addRow(frame, layout, row++, leshell, i18n("&Login shell:"), whatstr); lehome = new KLineEdit(frame); - connect(lehome, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(lehome, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Home Directory"); addRow(frame, layout, row++, lehome, i18n("&Home folder:"), whatstr); @@ -167,48 +167,48 @@ void propdlg::initDlg() // differently than Linux. if ( kug->getUsers().getCaps() & KU::KUsers::Cap_BSD ) { leoffice = new KLineEdit(frame); - connect(leoffice, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leoffice, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Office"); addRow(frame, layout, row++, leoffice, i18n("&Office:"), whatstr); leophone = new KLineEdit(frame); - connect(leophone, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leophone, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Office Phone"); addRow(frame, layout, row++, leophone, i18n("Offi&ce Phone:"), whatstr); lehphone = new KLineEdit(frame); - connect(lehphone, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(lehphone, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Home Phone"); addRow(frame, layout, row++, lehphone, i18n("Ho&me Phone:"), whatstr); leclass = new KLineEdit(frame); - connect(leclass, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leclass, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Login class"); addRow(frame, layout, row++, leclass, i18n("Login class:"), whatstr, true); } else { leoffice1 = new KLineEdit(frame); - connect(leoffice1, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leoffice1, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Office1"); addRow(frame, layout, row++, leoffice1, i18n("&Office #1:"), whatstr); leoffice2 = new KLineEdit(frame); - connect(leoffice2, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leoffice2, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Office2"); addRow(frame, layout, row++, leoffice2, i18n("O&ffice #2:"), whatstr); leaddress = new KLineEdit(frame); - connect(leaddress, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leaddress, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); // whatstr = i18n("WHAT IS THIS: Address"); addRow(frame, layout, row++, leaddress, i18n("&Address:"), whatstr); } - cbdisabled = new QCheckBox(frame); - connect(cbdisabled, SIGNAL(stateChanged(int)), this, SLOT(changed())); + cbdisabled = new TQCheckBox(frame); + connect(cbdisabled, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); addRow(frame, layout, row++, cbdisabled, i18n("Account &disabled"), whatstr); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Disable_POSIX ) { - cbposix = new QCheckBox(frame); - connect(cbposix, SIGNAL(stateChanged(int)), this, SLOT(changed())); - connect(cbposix, SIGNAL(stateChanged(int)), this, SLOT(cbposixChanged())); + cbposix = new TQCheckBox(frame); + connect(cbposix, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); + connect(cbposix, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(cbposixChanged())); addRow(frame, layout, row++, cbposix, i18n("Disable &POSIX account information"), whatstr); } else { cbposix = 0; @@ -221,19 +221,19 @@ void propdlg::initDlg() kug->getUsers().getCaps() & KU::KUsers::Cap_BSD ) { // Tab 2 : Password Management - QFrame *frame = addPage(i18n("Password Management")); - QGridLayout *layout = new QGridLayout(frame, 20, 4, marginHint(), spacingHint()); + TQFrame *frame = addPage(i18n("Password Management")); + TQGridLayout *layout = new TQGridLayout(frame, 20, 4, marginHint(), spacingHint()); int row = 0; - QDateTime time; - leslstchg = new QLabel(frame); - addRow(frame, layout, row++, leslstchg, i18n("Last password change:"), QString::null, true); + TQDateTime time; + leslstchg = new TQLabel(frame); + addRow(frame, layout, row++, leslstchg, i18n("Last password change:"), TQString::null, true); layout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); row++; if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Shadow ) { - layout->addWidget( new QLabel( i18n("POSIX parameters:"), frame ), row++, 0 ); + layout->addWidget( new TQLabel( i18n("POSIX parameters:"), frame ), row++, 0 ); lesmin = addDaysGroup(frame, layout, row++, i18n("Time before password may ¬ be changed after last password change:"), false); lesmax = addDaysGroup(frame, layout, row++, i18n("Time when password &expires after last password change:") ); leswarn = addDaysGroup(frame, layout, row++, i18n("Time before password expires to &issue an expire warning:")); @@ -243,104 +243,104 @@ void propdlg::initDlg() } /* if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) { - layout->addWidget( new QLabel( "SAMBA parameters:", frame ), row++, 0 ); + layout->addWidget( new TQLabel( "SAMBA parameters:", frame ), row++, 0 ); layout->addMultiCellWidget(new KSeparator(KSeparator::HLine, frame), row, row, 0, 3); row++; } */ - QLabel *label = new QLabel( i18n("&Account will expire on:"), frame ); + TQLabel *label = new TQLabel( i18n("&Account will expire on:"), frame ); layout->addWidget( label, row, 0 ); lesexpire = new KDateTimeWidget( frame ); label->setBuddy( lesexpire ); layout->addMultiCellWidget( lesexpire, row, row, 1, 2); - cbexpire = new QCheckBox( i18n("Never"), frame ); + cbexpire = new TQCheckBox( i18n("Never"), frame ); layout->addWidget( cbexpire, row++, 3 ); - connect( lesexpire, SIGNAL(valueChanged(const QDateTime&)), this, SLOT(changed()) ); - connect( cbexpire, SIGNAL(stateChanged(int)), this, SLOT(changed()) ); - connect( cbexpire, SIGNAL(toggled(bool)), lesexpire, SLOT(setDisabled(bool)) ); + connect( lesexpire, TQT_SIGNAL(valueChanged(const TQDateTime&)), this, TQT_SLOT(changed()) ); + connect( cbexpire, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed()) ); + connect( cbexpire, TQT_SIGNAL(toggled(bool)), lesexpire, TQT_SLOT(setDisabled(bool)) ); } // Tab 3: Samba if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) { - QFrame *frame = addPage(i18n("Samba")); - QGridLayout *layout = new QGridLayout(frame, 10, 4, marginHint(), spacingHint()); + TQFrame *frame = addPage(i18n("Samba")); + TQGridLayout *layout = new TQGridLayout(frame, 10, 4, marginHint(), spacingHint()); int row = 0; lerid = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Rid"); - lerid->setValidator(new QIntValidator(frame)); + lerid->setValidator(new TQIntValidator(frame)); addRow(frame, layout, row++, lerid, i18n("RID:"), whatstr); - connect(lerid, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(lerid, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); leliscript = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); addRow(frame, layout, row++, leliscript, i18n("Login script:"), whatstr); - connect(leliscript, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leliscript, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); leprofile = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); addRow(frame, layout, row++, leprofile, i18n("Profile path:"), whatstr); - connect(leprofile, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leprofile, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); lehomedrive = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); addRow(frame, layout, row++, lehomedrive, i18n("Home drive:"), whatstr); - connect(lehomedrive, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(lehomedrive, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); lehomepath = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); addRow(frame, layout, row++, lehomepath, i18n("Home path:"), whatstr); - connect(lehomepath, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(lehomepath, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); leworkstations = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); addRow(frame, layout, row++, leworkstations, i18n("User workstations:"), whatstr); - connect(leworkstations, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(leworkstations, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); ledomain = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); addRow(frame, layout, row++, ledomain, i18n("Domain name:"), whatstr); - connect(ledomain, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(ledomain, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); ledomsid = new KLineEdit(frame); // whatstr = i18n("WHAT IS THIS: Login script"); addRow(frame, layout, row++, ledomsid, i18n("Domain SID:"), whatstr); - connect(ledomsid, SIGNAL(textChanged(const QString &)), this, SLOT(changed())); + connect(ledomsid, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changed())); - cbsamba = new QCheckBox(frame); - connect(cbsamba, SIGNAL(stateChanged(int)), this, SLOT(changed())); - connect(cbsamba, SIGNAL(stateChanged(int)), this, SLOT(cbsambaChanged())); + cbsamba = new TQCheckBox(frame); + connect(cbsamba, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(changed())); + connect(cbsamba, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(cbsambaChanged())); addRow(frame, layout, row++, cbsamba, i18n("Disable &Samba account information"), whatstr); } // Tab 4: Groups { - QFrame *frame = addPage(i18n("Groups")); - QGridLayout *layout = new QGridLayout(frame, 2, 2, marginHint(), spacingHint()); + TQFrame *frame = addPage(i18n("Groups")); + TQGridLayout *layout = new TQGridLayout(frame, 2, 2, marginHint(), spacingHint()); lstgrp = new KListView(frame); lstgrp->setFullWidth(true); // Single column, full widget width. lstgrp->addColumn( i18n("Groups") ); - if ( ro ) lstgrp->setSelectionMode( QListView::NoSelection ); -// QString whatstr = i18n("Select the groups that this user belongs to."); - QWhatsThis::add(lstgrp, whatstr); + if ( ro ) lstgrp->setSelectionMode( TQListView::NoSelection ); +// TQString whatstr = i18n("Select the groups that this user belongs to."); + TQWhatsThis::add(lstgrp, whatstr); layout->addMultiCellWidget(lstgrp, 0, 0, 0, 1); - leprigr = new QLabel( i18n("Primary group: "), frame ); + leprigr = new TQLabel( i18n("Primary group: "), frame ); layout->addWidget( leprigr, 1, 0 ); if ( !ro ) { - pbprigr = new QPushButton( i18n("Set as Primary"), frame ); + pbprigr = new TQPushButton( i18n("Set as Primary"), frame ); layout->addWidget( pbprigr, 1, 1 ); - connect( pbprigr, SIGNAL(clicked()), this, SLOT(setpgroup()) ); + connect( pbprigr, TQT_SIGNAL(clicked()), this, TQT_SLOT(setpgroup()) ); } - connect( lstgrp, SIGNAL(clicked(QListViewItem *)), this, SLOT(gchanged()) ); + connect( lstgrp, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(gchanged()) ); } } -propdlg::propdlg( const QPtrList &users, - QWidget *parent, const char *name ) : +propdlg::propdlg( const TQPtrList &users, + TQWidget *parent, const char *name ) : KDialogBase(Tabbed, i18n("User Properties"), Ok | Cancel, Ok, parent, name, true) { @@ -355,7 +355,7 @@ propdlg::propdlg( const QPtrList &users, } propdlg::propdlg( KU::KUser *AUser, bool fixedprivgroup, - QWidget *parent, const char *name ) : + TQWidget *parent, const char *name ) : KDialogBase(Tabbed, i18n("User Properties"), Ok | Cancel, Ok, parent, name, true) { @@ -373,7 +373,7 @@ propdlg::~propdlg() void propdlg::cbposixChanged() { - bool posix = !( cbposix->state() == QButton::On ); + bool posix = !( cbposix->state() == TQButton::On ); leid->setEnabled( posix & ( mUsers.getFirst() == mUsers.getLast() ) ); leshell->setEnabled( posix ); lehome->setEnabled( posix ); @@ -387,7 +387,7 @@ void propdlg::cbposixChanged() void propdlg::cbsambaChanged() { - bool samba = !( cbsamba->state() == QButton::On ); + bool samba = !( cbsamba->state() == TQButton::On ); lerid->setEnabled( samba & ( mUsers.getFirst() == mUsers.getLast() ) ); leliscript->setEnabled( samba ); leprofile->setEnabled( samba ); @@ -398,7 +398,7 @@ void propdlg::cbsambaChanged() ledomsid->setEnabled( samba ); } -void propdlg::setLE( KLineEdit *le, const QString &val, bool first ) +void propdlg::setLE( KLineEdit *le, const TQString &val, bool first ) { if ( first ) { le->setText( val ); @@ -415,7 +415,7 @@ void propdlg::setLE( KLineEdit *le, const QString &val, bool first ) } } -void propdlg::setCB( QCheckBox *cb, bool val, bool first ) +void propdlg::setCB( TQCheckBox *cb, bool val, bool first ) { if ( first ) { cb->setChecked( val ); @@ -455,7 +455,7 @@ void propdlg::selectuser() oldrid = user->getSID().getRID(); oldshell = user->getShell(); lstchg = user->getLastChange(); - QDateTime datetime; + TQDateTime datetime; datetime.setTime_t( lstchg ); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Shadow || kug->getUsers().getCaps() & KU::KUsers::Cap_Samba || @@ -466,10 +466,10 @@ void propdlg::selectuser() if ( one ) { lbuser->setText( user->getName() ); - leid->setText( QString::number( user->getUID() ) ); + leid->setText( TQString::number( user->getUID() ) ); if ( ro ) leid->setReadOnly( true ); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) { - lerid->setText( QString::number( user->getSID().getRID() ) ); + lerid->setText( TQString::number( user->getSID().getRID() ) ); if ( ro ) lerid->setReadOnly( true ); } } else { @@ -483,12 +483,12 @@ void propdlg::selectuser() while ( user ) { setLE( lefname, user->getFullName(), first ); - QString home; + TQString home; home = user->getHomeDir(); if ( !one ) home.replace( user->getName(), "%U" ); setLE( lehome, home, first ); - QString shell = user->getShell(); + TQString shell = user->getShell(); if ( first ) { if ( !shell.isEmpty() ) { bool tested = false; @@ -521,7 +521,7 @@ void propdlg::selectuser() if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) { setLE( leliscript, user->getLoginScript(), first ); - QString profile; + TQString profile; profile = user->getProfilePath(); if ( !one ) profile.replace( user->getName(), "%U" ); setLE( leprofile, profile, first ); @@ -544,7 +544,7 @@ void propdlg::selectuser() lstchg = 0; } - QDateTime expire; + TQDateTime expire; expire.setTime_t( user->getExpire() ); kdDebug() << "expiration: " << user->getExpire() << endl; setCB( cbexpire, (int) expire.toTime_t() == -1, first ); @@ -594,8 +594,8 @@ void propdlg::loadgroups( bool fixedprivgroup ) KU::KGroup *group = kug->getGroups().first(); while ( group ) { - QString groupName = group->getName(); - QCheckListItem *item = new QCheckListItem(lstgrp, groupName, QCheckListItem::CheckBox); + TQString groupName = group->getName(); + TQCheckListItem *item = new TQCheckListItem(lstgrp, groupName, TQCheckListItem::CheckBox); KU::KUser *user = mUsers.first(); while ( user ) { bool prigr = @@ -618,7 +618,7 @@ void propdlg::loadgroups( bool fixedprivgroup ) else if ( item->isOn() != on ) { item->setTristate( true ); - item->setState( QCheckListItem::NoChange ); + item->setState( TQCheckListItem::NoChange ); } user = mUsers.next(); } @@ -629,7 +629,7 @@ void propdlg::loadgroups( bool fixedprivgroup ) KU::KUser *user = mUsers.first(); kdDebug() << "privgroup: " << user->getName() << endl; if ( !wasprivgr ) { - QCheckListItem *item = new QCheckListItem(lstgrp, user->getName(), QCheckListItem::CheckBox); + TQCheckListItem *item = new TQCheckListItem(lstgrp, user->getName(), TQCheckListItem::CheckBox); item->setOn(true); item->setEnabled(false); primaryGroup = user->getName(); @@ -641,19 +641,19 @@ void propdlg::loadgroups( bool fixedprivgroup ) void propdlg::setpgroup() { isgchanged = true; - QCheckListItem *item; - item = (QCheckListItem *) lstgrp->selectedItem(); + TQCheckListItem *item; + item = (TQCheckListItem *) lstgrp->selectedItem(); if ( item == 0 || item->text() == primaryGroup ) return; bool prevPrimaryGroupWasOn = primaryGroupWasOn; - primaryGroup = ((QCheckListItem *) lstgrp->selectedItem())->text(); + primaryGroup = ((TQCheckListItem *) lstgrp->selectedItem())->text(); - item = (QCheckListItem *) lstgrp->firstChild(); + item = (TQCheckListItem *) lstgrp->firstChild(); while(item) { - QString groupName = item->text(); + TQString groupName = item->text(); if ( !item->isEnabled() ) { item->setEnabled(true); @@ -668,14 +668,14 @@ void propdlg::setpgroup() item->repaint(); } - item = (QCheckListItem *) item->nextSibling(); + item = (TQCheckListItem *) item->nextSibling(); } leprigr->setText( i18n("Primary group: ") + primaryGroup ); } void propdlg::changed() { - QWidget *widget = (QWidget*) sender(); + TQWidget *widget = (TQWidget*) sender(); if ( mNoChanges.contains( widget ) ) mNoChanges[ widget ]->setChecked( false ); ischanged = true; kdDebug() << "changed" << endl; @@ -686,30 +686,30 @@ void propdlg::gchanged() isgchanged = true; } -QString propdlg::mergeLE( KLineEdit *le, const QString &val, bool one ) +TQString propdlg::mergeLE( KLineEdit *le, const TQString &val, bool one ) { - QCheckBox *cb = 0; + TQCheckBox *cb = 0; if ( mNoChanges.contains( le ) ) cb = mNoChanges[ le ]; return ( one || ( cb && !cb->isChecked() ) ) ? le->text() : val; } int propdlg::mergeSB( KIntSpinBox *sb, int val, bool one ) { - QCheckBox *cb = 0; + TQCheckBox *cb = 0; if ( mNoChanges.contains( sb ) ) cb = mNoChanges[ sb ]; return ( one || ( cb && !cb->isChecked() ) ) ? sb->value() : val; } void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser ) { - QDateTime epoch ; + TQDateTime epoch ; epoch.setTime_t(0); bool one = ( mUsers.getFirst() == mUsers.getLast() ); bool posix, samba = false; newuser->copy( user ); - if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Disable_POSIX && cbposix->state() != QButton::NoChange ) { + if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Disable_POSIX && cbposix->state() != TQButton::NoChange ) { if ( cbposix->isChecked() ) newuser->setCaps( newuser->getCaps() & ~KU::KUser::Cap_POSIX ); else @@ -727,7 +727,7 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser ) } newuser->setFullName( mergeLE( lefname, user->getFullName(), one ) ); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Samba ) { - if ( cbsamba->state() != QButton::NoChange ) { + if ( cbsamba->state() != TQButton::NoChange ) { if ( cbsamba->isChecked() ) newuser->setCaps( newuser->getCaps() & ~KU::KUser::Cap_Samba ); else @@ -743,17 +743,17 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser ) } newuser->setSID( sid ); newuser->setLoginScript( samba ? - mergeLE( leliscript, user->getLoginScript(), one ) : QString::null ); + mergeLE( leliscript, user->getLoginScript(), one ) : TQString::null ); newuser->setProfilePath( samba ? - mergeLE( leprofile, user->getProfilePath(), one ).replace( "%U", newuser->getName() ) : QString::null ); + mergeLE( leprofile, user->getProfilePath(), one ).replace( "%U", newuser->getName() ) : TQString::null ); newuser->setHomeDrive( samba ? - mergeLE( lehomedrive, user->getHomeDrive(), one ) : QString::null ); + mergeLE( lehomedrive, user->getHomeDrive(), one ) : TQString::null ); newuser->setHomePath( samba ? - mergeLE( lehomepath, user->getHomePath(), one ).replace( "%U", newuser->getName() ) : QString::null ); + mergeLE( lehomepath, user->getHomePath(), one ).replace( "%U", newuser->getName() ) : TQString::null ); newuser->setWorkstations( samba ? - mergeLE( leworkstations, user->getWorkstations(), one ) : QString::null ); + mergeLE( leworkstations, user->getWorkstations(), one ) : TQString::null ); newuser->setDomain( samba ? - mergeLE( ledomain, user->getDomain(), one ) : QString::null ); + mergeLE( ledomain, user->getDomain(), one ) : TQString::null ); } if ( kug->getUsers().getCaps() & KU::KUsers::Cap_BSD ) { @@ -769,7 +769,7 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser ) newuser->setHomeDir( posix ? mergeLE( lehome, user->getHomeDir(), one ).replace( "%U", newuser->getName() ) : - QString::null ); + TQString::null ); if ( posix ) { if ( leshell->currentItem() == 0 && ismoreshells ) { newuser->setShell( user->getShell() ); @@ -777,15 +777,15 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser ) ( leshell->currentItem() == 0 && !ismoreshells ) || ( leshell->currentItem() == 1 && ismoreshells ) ) { - newuser->setShell( QString::null ); + newuser->setShell( TQString::null ); } else { // TODO: Check shell. newuser->setShell( leshell->currentText() ); } } else - newuser->setShell( QString::null ); + newuser->setShell( TQString::null ); - newuser->setDisabled( (cbdisabled->state() == QButton::NoChange) ? user->getDisabled() : cbdisabled->isChecked() ); + newuser->setDisabled( (cbdisabled->state() == TQButton::NoChange) ? user->getDisabled() : cbdisabled->isChecked() ); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_InetOrg ) { newuser->setSurname( mergeLE( lesurname, user->getSurname(), one ) ); @@ -804,13 +804,13 @@ void propdlg::mergeUser( KU::KUser *user, KU::KUser *newuser ) ( (kug->getUsers().getCaps() & KU::KUsers::Cap_BSD) && posix ) ) { switch ( cbexpire->state() ) { - case QButton::NoChange: + case TQButton::NoChange: newuser->setExpire( user->getExpire() ); break; - case QButton::On: + case TQButton::On: newuser->setExpire( -1 ); break; - case QButton::Off: + case TQButton::Off: newuser->setExpire( !one && lesexpire->dateTime().toTime_t() == 0 ? user->getExpire() : lesexpire->dateTime().toTime_t() ); break; @@ -834,14 +834,14 @@ bool propdlg::saveg() { if ( !isgchanged ) return true; - QCheckListItem *item = (QCheckListItem *) lstgrp->firstChild(); + TQCheckListItem *item = (TQCheckListItem *) lstgrp->firstChild(); KU::KGroup *group; while(item) { kdDebug() << "saveg: group name: " << item->text() << endl; group = kug->getGroups().lookup(item->text()); - if ( group && item->state() != QCheckListItem::NoChange ) { + if ( group && item->state() != TQCheckListItem::NoChange ) { KU::KGroup newgroup( group ); bool mod = false; @@ -860,16 +860,16 @@ bool propdlg::saveg() if ( mod ) kug->getGroups().mod( group, newgroup ); } - item = (QCheckListItem *) item->nextSibling(); + item = (TQCheckListItem *) item->nextSibling(); } return true; } -bool propdlg::checkShell(const QString &shell) +bool propdlg::checkShell(const TQString &shell) { if (shell.isEmpty()) return true; - QStringList shells = readShells(); + TQStringList shells = readShells(); return shells.contains(shell); } @@ -909,11 +909,11 @@ void propdlg::setpwd() { pwddlg pd( this ); - if ( pd.exec() == QDialog::Accepted ) { + if ( pd.exec() == TQDialog::Accepted ) { ischanged = true; newpass = pd.getPassword(); lstchg = now(); - QDateTime datetime; + TQDateTime datetime; datetime.setTime_t( lstchg ); if ( kug->getUsers().getCaps() & KU::KUsers::Cap_Shadow || kug->getUsers().getCaps() & KU::KUsers::Cap_Samba || @@ -957,7 +957,7 @@ void propdlg::slotOk() } } - QString newshell; + TQString newshell; if (leshell->currentItem() != 0) newshell = leshell->currentText(); @@ -968,7 +968,7 @@ void propdlg::slotOk() i18n("

The shell %1 is not yet listed in the file %2. " "In order to use this shell you must add it to " "this file first." - "

Do you want to add it now?").arg(newshell).arg(QFile::decodeName(SHELL_FILE)), + "

Do you want to add it now?").arg(newshell).arg(TQFile::decodeName(SHELL_FILE)), i18n("Unlisted Shell"), i18n("&Add Shell"), i18n("Do &Not Add")); diff --git a/kuser/propdlg.h b/kuser/propdlg.h index 2832574..a1dc85d 100644 --- a/kuser/propdlg.h +++ b/kuser/propdlg.h @@ -21,14 +21,14 @@ #ifndef _KU_PROPDLG_H_ #define _KU_PROPDLG_H_ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -44,10 +44,10 @@ class propdlg : public KDialogBase Q_OBJECT public: - propdlg( const QPtrList &users, - QWidget *parent = 0, const char *name = 0 ); + propdlg( const TQPtrList &users, + TQWidget *parent = 0, const char *name = 0 ); propdlg( KU::KUser *AUser, bool fixedprivgroup, - QWidget *parent = 0, const char *name = 0 ); + TQWidget *parent = 0, const char *name = 0 ); ~propdlg(); void mergeUser( KU::KUser *user, KU::KUser *newuser ); @@ -68,43 +68,43 @@ protected: bool saveg(); bool check(); void loadgroups( bool fixedprivgroup ); - bool checkShell(const QString &shell); - void addRow( QWidget *parent, QGridLayout *layout, int row, - QWidget *widget, const QString &label, const QString &what, + bool checkShell(const TQString &shell); + void addRow( TQWidget *parent, TQGridLayout *layout, int row, + TQWidget *widget, const TQString &label, const TQString &what, bool two_column=true, bool nochange=true ); - void setLE( KLineEdit *le, const QString &val, bool first ); - void setCB( QCheckBox *cb, bool val, bool first ); + void setLE( KLineEdit *le, const TQString &val, bool first ); + void setCB( TQCheckBox *cb, bool val, bool first ); void setSB( KIntSpinBox *sb, int val, bool first ); - QString mergeLE( KLineEdit *le, const QString &val, bool one ); + TQString mergeLE( KLineEdit *le, const TQString &val, bool one ); int mergeSB( KIntSpinBox *sb, int val, bool one ); - KIntSpinBox *addDaysGroup( QWidget *parent, QGridLayout *layout, int row, - const QString &title, bool never=true ); + KIntSpinBox *addDaysGroup( TQWidget *parent, TQGridLayout *layout, int row, + const TQString &title, bool never=true ); - QFrame *frontpage; - QGridLayout *frontlayout; + TQFrame *frontpage; + TQGridLayout *frontlayout; int frontrow; - QPtrList mUsers; - QMap mNoChanges; + TQPtrList mUsers; + TQMap mNoChanges; bool ismoreshells; bool ischanged; bool isgchanged; uid_t olduid; uint oldrid; - QString oldshell; - QString primaryGroup; + TQString oldshell; + TQString primaryGroup; bool primaryGroupWasOn; bool ro; - QString newpass; + TQString newpass; time_t lstchg; KListView *lstgrp; - QPushButton *pbsetpwd; + TQPushButton *pbsetpwd; - QLabel *lbuser; + TQLabel *lbuser; KLineEdit *leid; KLineEdit *lefname; KLineEdit *lesurname; @@ -122,19 +122,19 @@ protected: KLineEdit *leoffice2; KLineEdit *leaddress; - QCheckBox *cbdisabled; - QCheckBox *cbposix; - QCheckBox *cbsamba; - QLabel *leprigr; - QPushButton *pbprigr; + TQCheckBox *cbdisabled; + TQCheckBox *cbposix; + TQCheckBox *cbsamba; + TQLabel *leprigr; + TQPushButton *pbprigr; - QLabel *leslstchg; + TQLabel *leslstchg; KIntSpinBox *lesmin; KIntSpinBox *lesmax; KIntSpinBox *leswarn; KIntSpinBox *lesinact; KDateTimeWidget *lesexpire; - QCheckBox *cbexpire; + TQCheckBox *cbexpire; //samba specific: KLineEdit *lerid; diff --git a/kuser/pwddlg.cpp b/kuser/pwddlg.cpp index 3c8f9cd..a6f531e 100644 --- a/kuser/pwddlg.cpp +++ b/kuser/pwddlg.cpp @@ -18,19 +18,19 @@ * Boston, MA 02110-1301, USA. **/ -#include +#include #include #include "pwddlg.h" #include "misc.h" -pwddlg::pwddlg( QWidget* parent, const char* name ) +pwddlg::pwddlg( TQWidget* parent, const char* name ) : KDialogBase(parent, name, true, i18n("Enter Password"), Ok | Cancel, Ok, true) { - QGrid *page = makeGridMainWidget(2, QGrid::Horizontal); + TQGrid *page = makeGridMainWidget(2, TQGrid::Horizontal); - QLabel* lb1 = new QLabel(page, "lb1"); + TQLabel* lb1 = new TQLabel(page, "lb1"); lb1->setText(i18n("Password:")); lb1->setMinimumSize(lb1->sizeHint()); lb1->setAlignment(AlignRight|AlignVCenter); @@ -46,7 +46,7 @@ pwddlg::pwddlg( QWidget* parent, const char* name ) lepw1->setFocus(); lepw1->setEchoMode(KLineEdit::Password); - QLabel* lb2 = new QLabel(page, "lb2"); + TQLabel* lb2 = new TQLabel(page, "lb2"); lb2->setText(i18n("Verify:")); lb2->setMinimumSize(lb2->sizeHint()); lb2->setAlignment(AlignRight|AlignVCenter); @@ -80,7 +80,7 @@ void pwddlg::slotOk() } } -QString pwddlg::getPassword() const +TQString pwddlg::getPassword() const { return lepw1->text(); } diff --git a/kuser/pwddlg.h b/kuser/pwddlg.h index 485a806..4f90392 100644 --- a/kuser/pwddlg.h +++ b/kuser/pwddlg.h @@ -21,7 +21,7 @@ #ifndef _KU_PWDDLG_H_ #define _KU_PWDDLG_H_ -#include +#include #include #include @@ -29,10 +29,10 @@ class pwddlg : public KDialogBase { Q_OBJECT public: - pwddlg( QWidget* parent = NULL, const char* name = NULL ); + pwddlg( TQWidget* parent = NULL, const char* name = NULL ); ~pwddlg(); - QString getPassword() const; + TQString getPassword() const; protected slots: void slotOk(); diff --git a/kuser/selectconn.cpp b/kuser/selectconn.cpp index f5a6385..138c9ce 100644 --- a/kuser/selectconn.cpp +++ b/kuser/selectconn.cpp @@ -16,12 +16,12 @@ * Boston, MA 02110-1301, USA. **/ -#include -#include +#include +#include -#include -#include -#include +#include +#include +#include #include #include @@ -33,29 +33,29 @@ #include "selectconn.h" #include "editDefaults.h" -SelectConn::SelectConn(const QString &selected, QWidget* parent, const char * name) : +SelectConn::SelectConn(const TQString &selected, TQWidget* parent, const char * name) : KDialogBase( Plain, WStyle_DialogBorder, parent, name, true, i18n("Connection Selection"), Ok | Apply | Cancel | User1 | User2 | User3 ) { - QStringList conns; + TQStringList conns; setButtonText( User3, i18n("&New...") ); setButtonText( User2, i18n("&Edit") ); setButtonText( User1, i18n("&Delete") ); - QFrame *page = plainPage(); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n("Defined connections:"), page ); + TQFrame *page = plainPage(); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() ); + TQLabel *label = new TQLabel( i18n("Defined connections:"), page ); mCombo = new KComboBox( page ); mSelected = selected; kdDebug() << "selected item: " << mSelected << endl; conns = kapp->sharedConfig()->groupList(); - QStringList::iterator it = conns.begin(); + TQStringList::iterator it = conns.begin(); int i = 0, sel = 0; while ( it != conns.end() ) { if ( (*it).startsWith( "connection-" ) ) { - (*it).remove( QRegExp("^connection-") ); + (*it).remove( TQRegExp("^connection-") ); if ( (*it) == mSelected ) sel = i; i++; it++; @@ -70,14 +70,14 @@ SelectConn::SelectConn(const QString &selected, QWidget* parent, const char * na topLayout->addWidget( mCombo ); } -QString SelectConn::connSelected() +TQString SelectConn::connSelected() { return mCombo->currentText(); } void SelectConn::slotUser3() { - newconn = KInputDialog::getText( QString::null, + newconn = KInputDialog::getText( TQString::null, i18n("Please type the name of the new connection:") ); if ( newconn.isEmpty() ) return; if ( kapp->sharedConfig()->groupList().contains( "connection-" + newconn ) ) { @@ -88,7 +88,7 @@ void SelectConn::slotUser3() KUserPrefsBase kcfg( kapp->sharedConfig(), newconn ); editDefaults eddlg( &kcfg, this ); - connect(&eddlg, SIGNAL(settingsChanged()), this, SLOT(slotNewApplySettings())); + connect(&eddlg, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotNewApplySettings())); eddlg.exec(); if ( newconn.isEmpty() ) @@ -111,14 +111,14 @@ void SelectConn::slotUser2() kcfg.readConfig(); editDefaults eddlg( &kcfg, this ); - connect( &eddlg, SIGNAL(settingsChanged()), this, SLOT(slotApplySettings()) ); + connect( &eddlg, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(slotApplySettings()) ); eddlg.exec(); } void SelectConn::slotUser1() { - QString conn = connSelected(); + TQString conn = connSelected(); if ( KMessageBox::warningContinueCancel( 0, i18n("Do you really want to delete the connection '%1'?"). arg( conn ),i18n("Delete Connection"),KStdGuiItem::del() ) == KMessageBox::Cancel ) return; diff --git a/kuser/selectconn.h b/kuser/selectconn.h index 674e148..d201a39 100644 --- a/kuser/selectconn.h +++ b/kuser/selectconn.h @@ -25,8 +25,8 @@ class SelectConn : public KDialogBase { Q_OBJECT public: - SelectConn( const QString &selected, QWidget* parent, const char * name); - QString connSelected(); + SelectConn( const TQString &selected, TQWidget* parent, const char * name); + TQString connSelected(); protected slots: void slotUser1(); void slotUser2(); @@ -37,7 +37,7 @@ protected slots: protected: KComboBox *mCombo; - QString conn, newconn, mSelected; + TQString conn, newconn, mSelected; }; #endif // _KU_SELECTCONN_H_ diff --git a/kuser/sha1.h b/kuser/sha1.h index d6b62ad..8fa2d66 100644 --- a/kuser/sha1.h +++ b/kuser/sha1.h @@ -21,7 +21,7 @@ #ifndef _SHA1_H_ #define _SHA1_H_ -#include +#include struct sha1_ctx { Q_UINT64 count; diff --git a/kuser/sid.cpp b/kuser/sid.cpp index e1080c6..01cdf0e 100644 --- a/kuser/sid.cpp +++ b/kuser/sid.cpp @@ -30,7 +30,7 @@ uint SID::mAlgRidBase = 1000; SID::SID() { - mRid = 0; mSid = QString::null; mDom = QString::null; + mRid = 0; mSid = TQString::null; mDom = TQString::null; } SID::SID( const SID &sid ) @@ -38,7 +38,7 @@ SID::SID( const SID &sid ) setSID( sid.getSID() ); } -SID::SID( const QString &sid ) +SID::SID( const TQString &sid ) { setSID( sid ); } @@ -74,13 +74,13 @@ bool SID::isEmpty() const void SID::updateSID() { - mSid = mDom + QString::fromLatin1("-") + QString::number( mRid ); + mSid = mDom + TQString::fromLatin1("-") + TQString::number( mRid ); } -void SID::setSID( const QString &sid ) +void SID::setSID( const TQString &sid ) { int pos; - QString rid; + TQString rid; mSid = sid; pos = sid.findRev( '-' ); @@ -89,7 +89,7 @@ void SID::setSID( const QString &sid ) mRid = rid.toUInt(); } -void SID::setRID( const QString &rid ) +void SID::setRID( const TQString &rid ) { mRid = rid.toUInt(); updateSID(); @@ -101,13 +101,13 @@ void SID::setRID( uint rid ) updateSID(); } -void SID::setDOM( const QString &dom ) +void SID::setDOM( const TQString &dom ) { mDom = dom; updateSID(); } -const QString& SID::getSID() const +const TQString& SID::getSID() const { return mSid; } @@ -117,7 +117,7 @@ uint SID::getRID() const return mRid; } -const QString& SID::getDOM() const +const TQString& SID::getDOM() const { return mDom; } diff --git a/kuser/sid.h b/kuser/sid.h index e856b77..f8f8e0c 100644 --- a/kuser/sid.h +++ b/kuser/sid.h @@ -19,26 +19,26 @@ #ifndef _SID_H_ #define _SID_H_ -#include +#include class SID { public: SID(); - SID( const QString &sid ); + SID( const TQString &sid ); SID( const SID &sid ); ~SID(); bool operator== ( const SID &sid ) const; bool operator!= ( const SID &sid ) const; bool isEmpty() const; - void setSID( const QString &sid ); - void setRID( const QString &rid ); + void setSID( const TQString &sid ); + void setRID( const TQString &rid ); void setRID( uint rid ); - void setDOM( const QString &dom ); - const QString &getSID() const; + void setDOM( const TQString &dom ); + const TQString &getSID() const; uint getRID() const ; - const QString &getDOM() const; + const TQString &getDOM() const; static uint uid2rid( uint uid ); static uint gid2rid( uint gid ); @@ -46,7 +46,7 @@ public: static uint getAlgRidBase() { return mAlgRidBase; }; private: void updateSID(); - QString mSid, mDom; + TQString mSid, mDom; uint mRid; static uint mAlgRidBase; }; diff --git a/lilo-config/common/String.h b/lilo-config/common/String.h index 7b12af5..354c427 100644 --- a/lilo-config/common/String.h +++ b/lilo-config/common/String.h @@ -27,7 +27,7 @@ ** Bug reports and questions can be sent to kde-devel@kde.org */ /* Somewhat more sane string handling functions... * - * Should be portable, therefore we aren't simply using QString. */ + * Should be portable, therefore we aren't simply using TQString. */ #ifndef _STRING_H_ #define _STRING_H_ 1 diff --git a/lilo-config/kde-qt-common/EditWidget.cpp b/lilo-config/kde-qt-common/EditWidget.cpp index fad957a..292e016 100644 --- a/lilo-config/kde-qt-common/EditWidget.cpp +++ b/lilo-config/kde-qt-common/EditWidget.cpp @@ -28,20 +28,20 @@ */ #include "EditWidget.moc" #include "ui.h" -EditWidget::EditWidget(QString const label, QString const text, bool isFile, QWidget *parent, const char *name, WFlags f, bool allowLines):QHBox(allowLines, parent, name, f) +EditWidget::EditWidget(TQString const label, TQString const text, bool isFile, TQWidget *parent, const char *name, WFlags f, bool allowLines):TQHBox(allowLines, parent, name, f) { setMargin(SPACE_MARGIN); setSpacing(SPACE_INSIDE); - lbl=new QLabel(label, this); + lbl=new TQLabel(label, this); setStretchFactor(lbl, 0); - line=new QLineEdit(text, this); + line=new TQLineEdit(text, this); setStretchFactor(line, 1); - connect(line, SIGNAL(textChanged(const QString &)), SIGNAL(textChanged(const QString &))); - connect(line, SIGNAL(returnPressed()), SIGNAL(returnPressed())); + connect(line, TQT_SIGNAL(textChanged(const TQString &)), TQT_SIGNAL(textChanged(const TQString &))); + connect(line, TQT_SIGNAL(returnPressed()), TQT_SIGNAL(returnPressed())); lbl->setBuddy(line); if(isFile) { - select=new QPushButton(_("Select..."), this); - connect(select, SIGNAL(clicked()), SLOT(selectFileClicked())); + select=new TQPushButton(_("Select..."), this); + connect(select, TQT_SIGNAL(clicked()), TQT_SLOT(selectFileClicked())); select->resize(select->minimumSizeHint()); setStretchFactor(select, 0); } else @@ -49,11 +49,11 @@ EditWidget::EditWidget(QString const label, QString const text, bool isFile, QWi } void EditWidget::selectFileClicked() { - QString filename=FileDlg::getOpenFileName(QString::null, QString::null, this); + TQString filename=FileDlg::getOpenFileName(TQString::null, TQString::null, this); if(!filename.isEmpty()) line->setText(filename); } -QSize EditWidget::sizeHint() const +TQSize EditWidget::sizeHint() const { int w=2*SPACE_MARGIN+lbl->sizeHint().width()+SPACE_INSIDE+line->sizeHint().width(); int h=lbl->sizeHint().height(); @@ -64,9 +64,9 @@ QSize EditWidget::sizeHint() const if(hsizeHint().height()) h=select->sizeHint().height(); } - return QSize(w, h); + return TQSize(w, h); } -QSize EditWidget::minimumSizeHint() const +TQSize EditWidget::minimumSizeHint() const { int w=2*SPACE_MARGIN+lbl->minimumSizeHint().width()+SPACE_INSIDE+line->minimumSizeHint().width(); int h=lbl->minimumSizeHint().height(); @@ -77,5 +77,5 @@ QSize EditWidget::minimumSizeHint() const if(hminimumSizeHint().height()) h=select->minimumSizeHint().height(); } - return QSize(w, h); + return TQSize(w, h); } diff --git a/lilo-config/kde-qt-common/EditWidget.h b/lilo-config/kde-qt-common/EditWidget.h index 515c65e..0a64750 100644 --- a/lilo-config/kde-qt-common/EditWidget.h +++ b/lilo-config/kde-qt-common/EditWidget.h @@ -28,32 +28,32 @@ */ #ifndef _EDITWIDGET_H_ #define _EDITWIDGET_H_ 1 -#include -#include -#include -#include +#include +#include +#include +#include class EditWidget:public QHBox { Q_OBJECT public: - EditWidget(QString const label="", QString const text="", bool isFile=false, QWidget *parent=0, const char *name=0, WFlags f=0, bool allowLines=true); - void setLabel(QString const &label) { lbl->setText(label); }; - QString text() const { return line->text(); }; - QString displayText() const { return line->displayText(); }; + EditWidget(TQString const label="", TQString const text="", bool isFile=false, TQWidget *parent=0, const char *name=0, WFlags f=0, bool allowLines=true); + void setLabel(TQString const &label) { lbl->setText(label); }; + TQString text() const { return line->text(); }; + TQString displayText() const { return line->displayText(); }; int maxLength() const { return line->maxLength(); }; virtual void setMaxLength(int l) { line->setMaxLength(l); }; virtual void setFrame(bool b) { line->setFrame(b); }; bool frame() const { return line->frame(); }; - virtual void setEchoMode(QLineEdit::EchoMode e) { line->setEchoMode(e); }; - QLineEdit::EchoMode echoMode() const { return line->echoMode(); }; + virtual void setEchoMode(TQLineEdit::EchoMode e) { line->setEchoMode(e); }; + TQLineEdit::EchoMode echoMode() const { return line->echoMode(); }; void setReadOnly(bool b) const { line->setReadOnly(b); }; bool isReadOnly() const { return line->isReadOnly(); }; - virtual void setValidator(const QValidator *v) { line->setValidator(v); }; - const QValidator *validator() const { return line->validator(); }; + virtual void setValidator(const TQValidator *v) { line->setValidator(v); }; + const TQValidator *validator() const { return line->validator(); }; virtual void setSelection(int s, int e) { line->setSelection(s, e); }; virtual void setCursorPosition(int p) { line->setCursorPosition(p); }; int cursorPosition() const { return line->cursorPosition(); }; - bool validateAndSet(const QString &s, int a, int b, int c) { return line->validateAndSet(s, a, b, c); }; + bool validateAndSet(const TQString &s, int a, int b, int c) { return line->validateAndSet(s, a, b, c); }; void cut() { line->cut(); }; void copy() const { line->copy(); }; void paste() { line->paste(); }; @@ -70,19 +70,19 @@ public: void setEdited(bool e) { line->setEdited(e); }; bool edited() const { return line->edited(); }; bool hasMarkedText() const { return line->hasMarkedText(); }; - QString markedText() const { return line->markedText(); }; - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + TQString markedText() const { return line->markedText(); }; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; public slots: - virtual void setText(const QString &text) { line->setText(text); }; + virtual void setText(const TQString &text) { line->setText(text); }; void selectAll() { line->selectAll(); }; void deselect() { line->deselect(); }; void clearValidator() { line->clearValidator(); }; - void insert(const QString &s) { line->insert(s); }; + void insert(const TQString &s) { line->insert(s); }; void clear() { line->clear(); }; void selectFileClicked(); signals: - void textChanged(const QString &); + void textChanged(const TQString &); void returnPressed(); private: QLabel *lbl; diff --git a/lilo-config/kde-qt-common/expert.cpp b/lilo-config/kde-qt-common/expert.cpp index dea58e9..d74b6b6 100644 --- a/lilo-config/kde-qt-common/expert.cpp +++ b/lilo-config/kde-qt-common/expert.cpp @@ -28,17 +28,17 @@ */ #include "expert.moc" #include -#include +#include #include #include -Expert::Expert(liloconf *l, QWidget *parent, const char *name):QWidget(parent, name) +Expert::Expert(liloconf *l, TQWidget *parent, const char *name):TQWidget(parent, name) { lilo=l; - layout=new QHBoxLayout(this); - edit=new QMultiLineEdit(this); + layout=new TQHBoxLayout(this); + edit=new TQMultiLineEdit(this); layout->addWidget(edit); - connect(edit, SIGNAL(textChanged()), SIGNAL(configChanged())); - QWhatsThis::add(edit, _("You can edit the lilo.conf file directly here. All changes you make here are automatically transferred to the graphical interface.")); + connect(edit, TQT_SIGNAL(textChanged()), TQT_SIGNAL(configChanged())); + TQWhatsThis::add(edit, _("You can edit the lilo.conf file directly here. All changes you make here are automatically transferred to the graphical interface.")); update(); } Expert::~Expert() diff --git a/lilo-config/kde-qt-common/expert.h b/lilo-config/kde-qt-common/expert.h index d9d6afb..e2fec97 100644 --- a/lilo-config/kde-qt-common/expert.h +++ b/lilo-config/kde-qt-common/expert.h @@ -29,14 +29,14 @@ #ifndef _EXPERT_H_ #define _EXPERT_H_ 1 #include -#include -#include -#include +#include +#include +#include class Expert:public QWidget { Q_OBJECT public: - Expert(liloconf *l=0, QWidget *parent=0, const char *name=0); + Expert(liloconf *l=0, TQWidget *parent=0, const char *name=0); ~Expert(); void setCfg(liloconf *l) { lilo=l; }; void makeReadOnly(); diff --git a/lilo-config/kde-qt-common/general.cpp b/lilo-config/kde-qt-common/general.cpp index 7944409..2040025 100644 --- a/lilo-config/kde-qt-common/general.cpp +++ b/lilo-config/kde-qt-common/general.cpp @@ -29,75 +29,75 @@ #include "general.moc" #include "EditWidget.h" #include -#include +#include #include -#include +#include #include -General::General(liloconf *l, QWidget *parent, const char *name):QWidget(parent, name) +General::General(liloconf *l, TQWidget *parent, const char *name):TQWidget(parent, name) { lilo=l; - QVBoxLayout *layout=new QVBoxLayout(this); + TQVBoxLayout *layout=new TQVBoxLayout(this); layout->setMargin(SPACE_MARGIN); layout->setSpacing(SPACE_INSIDE); - QHBox *drv=new QHBox(this); - QLabel *drive_lbl=new QLabel(_("Install &boot record to drive/partition:"), drv); - drive=new QComboBox(false, drv); + TQHBox *drv=new TQHBox(this); + TQLabel *drive_lbl=new TQLabel(_("Install &boot record to drive/partition:"), drv); + drive=new TQComboBox(false, drv); drive_lbl->setBuddy(drive); StringList p=ptable::disklist(); p+=ptable::partlist(); p.sort(); for(StringList::const_iterator it=p.begin(); it!=p.end(); it++) drive->insertItem((*it).cstr()); - connect(drive, SIGNAL(activated(int)), SIGNAL(configChanged())); + connect(drive, TQT_SIGNAL(activated(int)), TQT_SIGNAL(configChanged())); layout->addWidget(drv); - QWhatsThis::add(drv, _("Select the drive or partition you want to install the LILO boot loader to here. Unless you intend to use other boot managers in addition to LILO, this should be the MBR (master boot record) of your boot drive.
In this case, you should probably select /dev/hda if your boot drive is an IDE drive or /dev/sda if your boot drive is SCSI.")); + TQWhatsThis::add(drv, _("Select the drive or partition you want to install the LILO boot loader to here. Unless you intend to use other boot managers in addition to LILO, this should be the MBR (master boot record) of your boot drive.
In this case, you should probably select /dev/hda if your boot drive is an IDE drive or /dev/sda if your boot drive is SCSI.")); - QHBox *to=new QHBox(this); - QLabel *to_lbl=new QLabel(_("Boot the default kernel/OS &after:"), to); - timeout=new QSpinBox(0, 1000000, 1, to); + TQHBox *to=new TQHBox(this); + TQLabel *to_lbl=new TQLabel(_("Boot the default kernel/OS &after:"), to); + timeout=new TQSpinBox(0, 1000000, 1, to); timeout->setSuffix(_("/10 seconds")); - connect(timeout, SIGNAL(valueChanged(int)), SIGNAL(configChanged())); + connect(timeout, TQT_SIGNAL(valueChanged(int)), TQT_SIGNAL(configChanged())); to_lbl->setBuddy(timeout); layout->addWidget(to); - QWhatsThis::add(to, _("LILO will wait the amount of time specified here before booting the kernel (or OS) marked as default in the Images tab.")); + TQWhatsThis::add(to, _("LILO will wait the amount of time specified here before booting the kernel (or OS) marked as default in the Images tab.")); - QHBox *modes=new QHBox(this); - linear=new QCheckBox(_("Use &linear mode"), modes); - connect(linear, SIGNAL(clicked()), SIGNAL(configChanged())); - QWhatsThis::add(linear, _("Check this box if you want to use the linear mode.
Linear mode tells the boot loader the location of kernels in linear addressing rather than sector/head/cylinder.
linear mode is required for some SCSI drives, and shouldn't hurt unless you're planning to create a boot disk to be used with a different computer.
See the lilo.conf man page for details.")); - compact=new QCheckBox(_("Use &compact mode"), modes); - connect(compact, SIGNAL(clicked()), SIGNAL(configChanged())); - QWhatsThis::add(compact, _("Check this box if you want to use the compact mode.
The compact mode tries to merge read requests for adjacent sectors into a single read request. This reduces load time and keeps the boot map smaller, but will not work on all systems.")); + TQHBox *modes=new TQHBox(this); + linear=new TQCheckBox(_("Use &linear mode"), modes); + connect(linear, TQT_SIGNAL(clicked()), TQT_SIGNAL(configChanged())); + TQWhatsThis::add(linear, _("Check this box if you want to use the linear mode.
Linear mode tells the boot loader the location of kernels in linear addressing rather than sector/head/cylinder.
linear mode is required for some SCSI drives, and shouldn't hurt unless you're planning to create a boot disk to be used with a different computer.
See the lilo.conf man page for details.")); + compact=new TQCheckBox(_("Use &compact mode"), modes); + connect(compact, TQT_SIGNAL(clicked()), TQT_SIGNAL(configChanged())); + TQWhatsThis::add(compact, _("Check this box if you want to use the compact mode.
The compact mode tries to merge read requests for adjacent sectors into a single read request. This reduces load time and keeps the boot map smaller, but will not work on all systems.")); layout->addWidget(modes); - QHBox *opts=new QHBox(this); - lock=new QCheckBox(_("&Record boot command lines for defaults"), opts); - connect(lock, SIGNAL(clicked()), SIGNAL(configChanged())); - QWhatsThis::add(lock, ""+_("Checking this box enables automatic recording of boot command lines as the defaults for the following boots. This way, lilo \"locks\" on a choice until it is manually overridden.\nThis sets the lock option in lilo.conf.")); - restricted=new QCheckBox(_("R&estrict parameters"), opts); - connect(restricted, SIGNAL(clicked()), SIGNAL(configChanged())); - connect(restricted, SIGNAL(clicked()), SLOT(check_pw())); - QWhatsThis::add(restricted, _("If this box is checked, a password (entered below) is required only if any parameters are changed (i.e. the user can boot linux, but not linux single or linux init=/bin/sh).\nThis sets the restricted option in lilo.conf.
This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the Operating systems tab and select Details.")); + TQHBox *opts=new TQHBox(this); + lock=new TQCheckBox(_("&Record boot command lines for defaults"), opts); + connect(lock, TQT_SIGNAL(clicked()), TQT_SIGNAL(configChanged())); + TQWhatsThis::add(lock, ""+_("Checking this box enables automatic recording of boot command lines as the defaults for the following boots. This way, lilo \"locks\" on a choice until it is manually overridden.\nThis sets the lock option in lilo.conf.")); + restricted=new TQCheckBox(_("R&estrict parameters"), opts); + connect(restricted, TQT_SIGNAL(clicked()), TQT_SIGNAL(configChanged())); + connect(restricted, TQT_SIGNAL(clicked()), TQT_SLOT(check_pw())); + TQWhatsThis::add(restricted, _("If this box is checked, a password (entered below) is required only if any parameters are changed (i.e. the user can boot linux, but not linux single or linux init=/bin/sh).\nThis sets the restricted option in lilo.conf.
This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the Operating systems tab and select Details.")); layout->addWidget(opts); - QHBox *pw=new QHBox(this); - use_password=new QCheckBox(_("Require &password:"), pw); - connect(use_password, SIGNAL(clicked()), SIGNAL(configChanged())); - connect(use_password, SIGNAL(clicked()), SLOT(check_pw())); - password=new QLineEdit(pw); + TQHBox *pw=new TQHBox(this); + use_password=new TQCheckBox(_("Require &password:"), pw); + connect(use_password, TQT_SIGNAL(clicked()), TQT_SIGNAL(configChanged())); + connect(use_password, TQT_SIGNAL(clicked()), TQT_SLOT(check_pw())); + password=new TQLineEdit(pw); password->setMaxLength(15); - password->setEchoMode(QLineEdit::Password); - connect(password, SIGNAL(textChanged(const QString &)), SIGNAL(configChanged())); - QWhatsThis::add(pw, _("Enter the password required for bootup (if any) here. If restricted above is checked, the password is required for additional parameters only.
WARNING: The password is stored in clear text in /etc/lilo.conf. You'll want to make sure nobody untrusted can read this file. Also, you probably don't want to use your normal/root password here.
This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the Operating systems tab and select Details.")); + password->setEchoMode(TQLineEdit::Password); + connect(password, TQT_SIGNAL(textChanged(const TQString &)), TQT_SIGNAL(configChanged())); + TQWhatsThis::add(pw, _("Enter the password required for bootup (if any) here. If restricted above is checked, the password is required for additional parameters only.
WARNING: The password is stored in clear text in /etc/lilo.conf. You'll want to make sure nobody untrusted can read this file. Also, you probably don't want to use your normal/root password here.
This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the Operating systems tab and select Details.")); layout->addWidget(pw); - QHBox *vgab=new QHBox(this); - QLabel *vlbl=new QLabel(_("&Default graphics mode on text console:"), vgab); - vga=new QComboBox(false, vgab); + TQHBox *vgab=new TQHBox(this); + TQLabel *vlbl=new TQLabel(_("&Default graphics mode on text console:"), vgab); + vga=new TQComboBox(false, vgab); vlbl->setBuddy(vga); - QWhatsThis::add(vgab, _("You can select the default graphics mode here.
If you intend to use a VGA graphics mode, you must compile the kernel with support for framebuffer devices. The ask setting brings up a prompt at boot time.
This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the Operating systems tab and select Details.")); + TQWhatsThis::add(vgab, _("You can select the default graphics mode here.
If you intend to use a VGA graphics mode, you must compile the kernel with support for framebuffer devices. The ask setting brings up a prompt at boot time.
This sets a default for all Linux kernels you want to boot. If you need a per-kernel setting, go to the Operating systems tab and select Details.")); vga->insertItem(_("default")); vga->insertItem(_("ask")); vga->insertItem(_("text 80x25 (0)")); @@ -124,12 +124,12 @@ General::General(liloconf *l, QWidget *parent, const char *name):QWidget(parent, vga->insertItem(_("VGA 1280x1024, 32767 colors (793)")); vga->insertItem(_("VGA 1280x1024, 65536 colors (794)")); vga->insertItem(_("VGA 1280x1024, 16.7M colors (795)")); - connect( vga, SIGNAL(activated ( int )), SIGNAL(configChanged())); + connect( vga, TQT_SIGNAL(activated ( int )), TQT_SIGNAL(configChanged())); layout->addWidget(vgab); - prompt=new QCheckBox(_("Enter LILO &prompt automatically"), this); - QWhatsThis::add(prompt, _("If this box is checked, LILO goes to the LILO prompt whether or not a key is pressed. If it is turned off, LILO boots the default operating system unless shift is pressed (in that case, it goes to the LILO prompt).
This sets the prompt option in lilo.conf.")); - connect(prompt, SIGNAL(clicked()), SIGNAL(configChanged())); + prompt=new TQCheckBox(_("Enter LILO &prompt automatically"), this); + TQWhatsThis::add(prompt, _("If this box is checked, LILO goes to the LILO prompt whether or not a key is pressed. If it is turned off, LILO boots the default operating system unless shift is pressed (in that case, it goes to the LILO prompt).
This sets the prompt option in lilo.conf.")); + connect(prompt, TQT_SIGNAL(clicked()), TQT_SIGNAL(configChanged())); layout->addWidget(prompt); @@ -137,9 +137,9 @@ General::General(liloconf *l, QWidget *parent, const char *name):QWidget(parent, } void General::saveChanges() { - QString to; + TQString to; to.sprintf("%u", timeout->value()); - QString boot = drive->currentText(); + TQString boot = drive->currentText(); lilo->defaults.set("boot", boot.isEmpty() ? "" : boot.latin1()); lilo->defaults.set("timeout", to.latin1()); if(compact->isChecked() && lilo->defaults.grep("^[ \t]*compact[ \t]*$").empty()) @@ -166,7 +166,7 @@ void General::saveChanges() if(!lilo->defaults.grep("[ \t]*vga[ \t]*=").empty()) lilo->defaults.remove(lilo->defaults.grep("[ \t]*vga[ \t]*=")); } else { - QString mode=vga->currentText(); + TQString mode=vga->currentText(); if(mode!="ask") { mode=mode.mid(mode.find('(')+1); mode=mode.left(mode.length()-1); @@ -180,7 +180,7 @@ void General::saveChanges() } void General::update() { - QString boot=lilo->defaults.get("boot").cstr(); + TQString boot=lilo->defaults.get("boot").cstr(); for(int i=0; icount(); i++) if(drive->text(i)==boot) drive->setCurrentItem(i); @@ -194,7 +194,7 @@ void General::update() if(!pw.empty()) password->setText(lilo->defaults.get("password").cstr()); check_pw(); - QString mode=lilo->defaults.get("vga", "").cstr(); + TQString mode=lilo->defaults.get("vga", "").cstr(); if(mode.isEmpty()) vga->setCurrentItem(0); else if(mode=="ask") diff --git a/lilo-config/kde-qt-common/general.h b/lilo-config/kde-qt-common/general.h index 7e88a90..d925ad1 100644 --- a/lilo-config/kde-qt-common/general.h +++ b/lilo-config/kde-qt-common/general.h @@ -29,15 +29,15 @@ #ifndef _GENERAL_H_ #define _GENERAL_H_ 1 #include -#include -#include -#include -#include +#include +#include +#include +#include class General:public QWidget { Q_OBJECT public: - General(liloconf *l=0, QWidget *parent=0, const char *name=0); + General(liloconf *l=0, TQWidget *parent=0, const char *name=0); void makeReadOnly(); signals: void configChanged(); diff --git a/lilo-config/kde-qt-common/images.cpp b/lilo-config/kde-qt-common/images.cpp index 98dd1cb..9159d97 100644 --- a/lilo-config/kde-qt-common/images.cpp +++ b/lilo-config/kde-qt-common/images.cpp @@ -28,9 +28,9 @@ */ #include "images.moc" #include -#include -#include -#include +#include +#include +#include #ifdef USE_KDE #include "kde/InputBox.h" @@ -40,63 +40,63 @@ #include "qt/Details.h" #endif -Images::Images(liloconf *l, QWidget *parent, const char *name):QWidget(parent, name) +Images::Images(liloconf *l, TQWidget *parent, const char *name):TQWidget(parent, name) { - current=""; previous=""; // Using QString::null gives problems! + current=""; previous=""; // Using TQString::null gives problems! lilo=l; - layout=new QHBoxLayout(this); + layout=new TQHBoxLayout(this); layout->setMargin(SPACE_MARGIN); layout->setSpacing(SPACE_INSIDE); - images=new QListBox(this); + images=new TQListBox(this); layout->addWidget(images, 1); - connect(images, SIGNAL(highlighted(const QString &)), SLOT(imageSelected(const QString &))); - QWhatsThis::add(images, _("This is the list of kernels and operating systems you can currently boot. Select which one you want to edit here.")); + connect(images, TQT_SIGNAL(highlighted(const TQString &)), TQT_SLOT(imageSelected(const TQString &))); + TQWhatsThis::add(images, _("This is the list of kernels and operating systems you can currently boot. Select which one you want to edit here.")); - parameters=new QVBox(this); + parameters=new TQVBox(this); parameters->setMargin(SPACE_MARGIN); parameters->setSpacing(SPACE_INSIDE); layout->addWidget(parameters, 2); image=new EditWidget(_("&Kernel:"), "", true, parameters); - QWhatsThis::add(image, _("Enter the filename of the kernel you want to boot here.")); - connect(image, SIGNAL(textChanged(const QString &)), this, SIGNAL(configChanged())); + TQWhatsThis::add(image, _("Enter the filename of the kernel you want to boot here.")); + connect(image, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SIGNAL(configChanged())); label=new EditWidget(_("&Label:"), "", false, parameters); - QWhatsThis::add(label, _("Enter the label (name) of the kernel you want to boot here.")); - connect(label, SIGNAL(textChanged(const QString &)), this, SIGNAL(configChanged())); + TQWhatsThis::add(label, _("Enter the label (name) of the kernel you want to boot here.")); + connect(label, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SIGNAL(configChanged())); root=new EditWidget(_("&Root filesystem:"), "", true, parameters); - QWhatsThis::add(root, _("Enter the root filesystem (i.e. the partition that will be mounted as / at boot time) for the kernel you want to boot here.")); - connect(root, SIGNAL(textChanged(const QString &)), this, SIGNAL(configChanged())); + TQWhatsThis::add(root, _("Enter the root filesystem (i.e. the partition that will be mounted as / at boot time) for the kernel you want to boot here.")); + connect(root, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SIGNAL(configChanged())); initrd=new EditWidget(_("&Initial ramdisk:"), "", true, parameters); - QWhatsThis::add(initrd, _("If you want to use an initial ramdisk (initrd) for this kernel, enter its filename here. Leave this field blank if you don't intend to use an initial ramdisk for this kernel.")); - connect(initrd, SIGNAL(textChanged(const QString &)), this, SIGNAL(configChanged())); + TQWhatsThis::add(initrd, _("If you want to use an initial ramdisk (initrd) for this kernel, enter its filename here. Leave this field blank if you don't intend to use an initial ramdisk for this kernel.")); + connect(initrd, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SIGNAL(configChanged())); append=new EditWidget(_("E&xtra parameters:"), "", false, parameters); - QWhatsThis::add(append, _("Enter any extra parameters you wish to pass to the kernel here. Usually, this can be left blank.
This sets the append option in lilo.conf.")); - connect(append, SIGNAL(textChanged(const QString &)), this, SIGNAL(configChanged())); + TQWhatsThis::add(append, _("Enter any extra parameters you wish to pass to the kernel here. Usually, this can be left blank.
This sets the append option in lilo.conf.")); + connect(append, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SIGNAL(configChanged())); - actions=new QVBox(this); + actions=new TQVBox(this); actions->setMargin(SPACE_MARGIN); actions->setSpacing(SPACE_INSIDE); layout->addWidget(actions); - dflt=new QPushButton(_("Set &Default"), actions); - QWhatsThis::add(dflt, _("Boot this kernel/OS if the user doesn't make a different choice")); - connect(dflt, SIGNAL(clicked()), SLOT(dfltClicked())); - details=new QPushButton(_("De&tails"), actions); - QWhatsThis::add(details, _("This button brings up a dialog box with further, less commonly used, options.")); - connect(details, SIGNAL(clicked()), SLOT(detailsClicked())); - probe=new QPushButton(_("&Probe"), actions); - connect(probe, SIGNAL(clicked()), SLOT(probeClicked())); - QWhatsThis::add(probe, _("Automatically generate a (hopefully) reasonable lilo.conf for your system")); - check=new QPushButton(_("&Check Configuration"), actions); - connect(check, SIGNAL(clicked()), SLOT(checkClicked())); - QWhatsThis::add(check, _("Run LILO in test mode to see if the configuration is ok")); - addKrnl=new QPushButton(_("Add &Kernel..."), actions); - connect(addKrnl, SIGNAL(clicked()), SLOT(addKrnlClicked())); - QWhatsThis::add(addKrnl, _("Add a new Linux kernel to the boot menu")); - addOS=new QPushButton(_("Add Other &OS..."), actions); - connect(addOS, SIGNAL(clicked()), SLOT(addOSClicked())); - QWhatsThis::add(addOS, _("Add a non-Linux OS to the boot menu")); - remove=new QPushButton(_("&Remove Entry"), actions); - connect(remove, SIGNAL(clicked()), SLOT(removeClicked())); - QWhatsThis::add(remove, _("Remove entry from the boot menu")); + dflt=new TQPushButton(_("Set &Default"), actions); + TQWhatsThis::add(dflt, _("Boot this kernel/OS if the user doesn't make a different choice")); + connect(dflt, TQT_SIGNAL(clicked()), TQT_SLOT(dfltClicked())); + details=new TQPushButton(_("De&tails"), actions); + TQWhatsThis::add(details, _("This button brings up a dialog box with further, less commonly used, options.")); + connect(details, TQT_SIGNAL(clicked()), TQT_SLOT(detailsClicked())); + probe=new TQPushButton(_("&Probe"), actions); + connect(probe, TQT_SIGNAL(clicked()), TQT_SLOT(probeClicked())); + TQWhatsThis::add(probe, _("Automatically generate a (hopefully) reasonable lilo.conf for your system")); + check=new TQPushButton(_("&Check Configuration"), actions); + connect(check, TQT_SIGNAL(clicked()), TQT_SLOT(checkClicked())); + TQWhatsThis::add(check, _("Run LILO in test mode to see if the configuration is ok")); + addKrnl=new TQPushButton(_("Add &Kernel..."), actions); + connect(addKrnl, TQT_SIGNAL(clicked()), TQT_SLOT(addKrnlClicked())); + TQWhatsThis::add(addKrnl, _("Add a new Linux kernel to the boot menu")); + addOS=new TQPushButton(_("Add Other &OS..."), actions); + connect(addOS, TQT_SIGNAL(clicked()), TQT_SLOT(addOSClicked())); + TQWhatsThis::add(addOS, _("Add a non-Linux OS to the boot menu")); + remove=new TQPushButton(_("&Remove Entry"), actions); + connect(remove, TQT_SIGNAL(clicked()), TQT_SLOT(removeClicked())); + TQWhatsThis::add(remove, _("Remove entry from the boot menu")); update(); } Images::~Images() @@ -131,7 +131,7 @@ void Images::probeClicked() // SLOT void Images::dfltClicked() // SLOT { if (images->currentItem() < 0) return; - lilo->setDefault(images->currentText().replace(QRegExp(" (default)", true, true), "").latin1()); + lilo->setDefault(images->currentText().replace(TQRegExp(" (default)", true, true), "").latin1()); update(); emit configChanged(); } @@ -139,7 +139,7 @@ void Images::detailsClicked() // SLOT { liloimage *l=lilo->images[current.latin1()]; Details *d = new Details(l, this); - if(d->exec()==QDialog::Accepted) { + if(d->exec()==TQDialog::Accepted) { String tmp; tmp=l->grep("^[ \t]*read-only[ \t]*"); if(d->isReadOnly() && tmp.empty()) @@ -172,7 +172,7 @@ void Images::detailsClicked() // SLOT } void Images::checkClicked() // SLOT { - QString LiloOut=lilo->liloOut().cstr(); + TQString LiloOut=lilo->liloOut().cstr(); if(lilo->isOk()) { LiloOut=_("Configuration ok. LILO said:\n")+LiloOut; InformationOK(this, LiloOut, _("Configuration OK"), "lilo-config.confOK"); @@ -193,9 +193,9 @@ void Images::addKrnlClicked() // SLOT e.insert(e.end(), l2); e.insert(e.end(), l3); InputBox *label=new InputBox(e, this); - if(label->exec()==QDialog::Accepted) { - QStringList s=label->text(); - QStringList::Iterator it=s.begin(); + if(label->exec()==TQDialog::Accepted) { + TQStringList s=label->text(); + TQStringList::Iterator it=s.begin(); String kernel=(*it).latin1(); it++; String label=(*it).latin1(); @@ -217,9 +217,9 @@ void Images::addOSClicked() // SLOT e.insert(e.end(), l0); e.insert(e.end(), l1); InputBox *label=new InputBox(e, this); - if(label->exec()==QDialog::Accepted) { - QStringList s=label->text(); - QStringList::Iterator it=s.begin(); + if(label->exec()==TQDialog::Accepted) { + TQStringList s=label->text(); + TQStringList::Iterator it=s.begin(); String disk=(*it).latin1(); it++; String label=(*it).latin1(); @@ -233,7 +233,7 @@ void Images::removeClicked() // SLOT { if(images->currentItem()==-1) return; - QString s=images->currentText(); + TQString s=images->currentText(); if(s.right(10)==" (default)") s=s.left(s.length()-10); if (s.isNull()) @@ -244,9 +244,9 @@ void Images::removeClicked() // SLOT emit configChanged(); } -QString value(QString const &s) +TQString value(TQString const &s) { - QString r=s.mid(s.find('=')+1).simplifyWhiteSpace(); + TQString r=s.mid(s.find('=')+1).simplifyWhiteSpace(); if(r.left(1)=="\"") r=r.mid(1); if(r.right(1)=="\"") @@ -256,11 +256,11 @@ QString value(QString const &s) return r; } -void Images::imageSelected(const QString &i) // SLOT +void Images::imageSelected(const TQString &i) // SLOT { bool blocked = signalsBlocked(); blockSignals(true); - QString s=i; + TQString s=i; if(s.right(10)==" (default)") s=s.left(s.length()-10); if(previous!=s && !previous.isEmpty()) { @@ -274,7 +274,7 @@ void Images::imageSelected(const QString &i) // SLOT current=s; liloimage *l=lilo->images[s.latin1()]; if(l) { - QString img=value(l->grep("^[ \t]*(image|other)[ \t]*=").cstr()); + TQString img=value(l->grep("^[ \t]*(image|other)[ \t]*=").cstr()); image->setText(img); label->setText(s); if(l->isLinux()) { diff --git a/lilo-config/kde-qt-common/images.h b/lilo-config/kde-qt-common/images.h index 62c6124..6a089f4 100644 --- a/lilo-config/kde-qt-common/images.h +++ b/lilo-config/kde-qt-common/images.h @@ -29,18 +29,18 @@ #ifndef _IMAGES_H_ #define _IMAGES_H_ 1 #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include "EditWidget.h" class Images:public QWidget { Q_OBJECT public: - Images(liloconf *l=0, QWidget *parent=0, const char *name=0); + Images(liloconf *l=0, TQWidget *parent=0, const char *name=0); ~Images(); void setCfg(liloconf *l) { lilo=l; }; void makeReadOnly(); @@ -55,7 +55,7 @@ private slots: void addKrnlClicked(); void addOSClicked(); void removeClicked(); - void imageSelected(const QString &i); + void imageSelected(const TQString &i); signals: void configChanged(); private: diff --git a/lilo-config/kde-qt-common/mainwidget.cpp b/lilo-config/kde-qt-common/mainwidget.cpp index 6d76dc5..bb966f2 100644 --- a/lilo-config/kde-qt-common/mainwidget.cpp +++ b/lilo-config/kde-qt-common/mainwidget.cpp @@ -29,21 +29,21 @@ #include "mainwidget.moc" #include "ui.h" -MainWidget::MainWidget(QWidget *parent, const char *name) - : QTabWidget(parent, name) +MainWidget::MainWidget(TQWidget *parent, const char *name) + : TQTabWidget(parent, name) { l=new liloconf(); general=new General(l, this); - connect(general, SIGNAL(configChanged()), SIGNAL(configChanged())); + connect(general, TQT_SIGNAL(configChanged()), TQT_SIGNAL(configChanged())); images=new Images(l, this); - connect(images, SIGNAL(configChanged()), SIGNAL(configChanged())); + connect(images, TQT_SIGNAL(configChanged()), TQT_SIGNAL(configChanged())); expert=new Expert(l, this); - connect(expert, SIGNAL(configChanged()), SIGNAL(configChanged())); - connect(expert, SIGNAL(configChanged()), images, SLOT(update())); + connect(expert, TQT_SIGNAL(configChanged()), TQT_SIGNAL(configChanged())); + connect(expert, TQT_SIGNAL(configChanged()), images, TQT_SLOT(update())); addTab(general, _("&General Options")); addTab(images, _("&Operating Systems")); addTab(expert, _("&Expert")); - connect(this, SIGNAL(selected(const QString &)), SLOT(tabChanged(const QString &))); + connect(this, TQT_SIGNAL(selected(const TQString &)), TQT_SLOT(tabChanged(const TQString &))); load(); arrangeWidgets(); } @@ -89,7 +89,7 @@ void MainWidget::reset() void MainWidget::arrangeWidgets() { } -void MainWidget::tabChanged(QString const &lbl) // SLOT +void MainWidget::tabChanged(TQString const &lbl) // SLOT { if(previous==_("&Expert")) expert->saveChanges(); diff --git a/lilo-config/kde-qt-common/mainwidget.h b/lilo-config/kde-qt-common/mainwidget.h index 46696e8..716931d 100644 --- a/lilo-config/kde-qt-common/mainwidget.h +++ b/lilo-config/kde-qt-common/mainwidget.h @@ -28,18 +28,18 @@ */ #ifndef _MAINWIDGET_H_ #define _MAINWIDGET_H_ 1 -#include -#include -#include -#include +#include +#include +#include +#include #include "general.h" #include "images.h" #include "expert.h" -class MainWidget: public QTabWidget { +class MainWidget: public TQTabWidget { Q_OBJECT public: - MainWidget(QWidget *parent, const char *name=0); + MainWidget(TQWidget *parent, const char *name=0); void arrangeWidgets(); void makeReadOnly(); public slots: @@ -47,11 +47,11 @@ public slots: void save(); void reset(); void defaults(); - void tabChanged(const QString &lbl); + void tabChanged(const TQString &lbl); signals: void configChanged(); private: - QString previous; + TQString previous; General *general; Images *images; Expert *expert; diff --git a/lilo-config/kde-qt-common/ui.h b/lilo-config/kde-qt-common/ui.h index e672847..4454bde 100644 --- a/lilo-config/kde-qt-common/ui.h +++ b/lilo-config/kde-qt-common/ui.h @@ -52,19 +52,19 @@ #define SPACE_MARGIN KDialog::marginHint() #define SPACE_INSIDE KDialog::spacingHint() #else -#include -#include -#include -#include +#include +#include +#include +#include #define _(x) tr(x) #define WarningYesNo(parent, caption, text) \ - QMessageBox::warning(parent, caption, text, QMessageBox::Yes, QMessageBox::No) + TQMessageBox::warning(parent, caption, text, TQMessageBox::Yes, TQMessageBox::No) #define ErrorOK(parent, caption, text) \ - QMessageBox::information(parent, caption, text) + TQMessageBox::information(parent, caption, text) #define InformationOK(parent, text, caption, dontShowAgainName) \ - QMessageBox::information(parent, caption, text) + TQMessageBox::information(parent, caption, text) #define CriticalErrorOK(parent, text, caption) \ - QMessageBox::critical(parent, caption, text) + TQMessageBox::critical(parent, caption, text) #define TabBar QTabWidget #define FileDlg QFileDialog #define SPACE_MARGIN 5 diff --git a/lilo-config/kde/Details.cpp b/lilo-config/kde/Details.cpp index 4e19b14..0775e8d 100644 --- a/lilo-config/kde/Details.cpp +++ b/lilo-config/kde/Details.cpp @@ -26,25 +26,25 @@ */ #include "Details.moc" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -Details::Details(liloimage *lilo, QWidget *parent, const char *name, WFlags /* f */) - : KDialogBase(parent, name, true, QString::null, Ok|Cancel, Ok, true) +Details::Details(liloimage *lilo, TQWidget *parent, const char *name, WFlags /* f */) + : KDialogBase(parent, name, true, TQString::null, Ok|Cancel, Ok, true) { l=lilo; - QVBox *page = makeVBoxMainWidget(); + TQVBox *page = makeVBoxMainWidget(); - QHBox *vgab=new QHBox(page); - QLabel *vlbl=new QLabel(_("&Graphics mode on text console:"), vgab); - vga=new QComboBox(false, vgab); + TQHBox *vgab=new TQHBox(page); + TQLabel *vlbl=new TQLabel(_("&Graphics mode on text console:"), vgab); + vga=new TQComboBox(false, vgab); vlbl->setBuddy(vga); - QWhatsThis::add(vgab, _("You can select the graphics mode for this kernel here.
If you intend to use a VGA graphics mode, you must compile the kernel with support for framebuffer devices. The ask setting brings up a prompt at boot time.")); + TQWhatsThis::add(vgab, _("You can select the graphics mode for this kernel here.
If you intend to use a VGA graphics mode, you must compile the kernel with support for framebuffer devices. The ask setting brings up a prompt at boot time.")); vga->insertItem(_("default")); vga->insertItem(_("ask")); vga->insertItem(_("text 80x25 (0)")); @@ -72,29 +72,29 @@ Details::Details(liloimage *lilo, QWidget *parent, const char *name, WFlags /* f vga->insertItem(_("VGA 1280x1024, 65536 colors (794)")); vga->insertItem(_("VGA 1280x1024, 16.7M colors (795)")); - readonly=new QCheckBox(_("Mount root filesystem &read-only"), page); - QWhatsThis::add(readonly, _("Mount the root filesystem for this kernel read-only. Since the init scripts normally take care of remounting the root filesystem in read-write mode after running some checks, this should always be turned on.
Don't turn this off unless you know what you're doing.")); + readonly=new TQCheckBox(_("Mount root filesystem &read-only"), page); + TQWhatsThis::add(readonly, _("Mount the root filesystem for this kernel read-only. Since the init scripts normally take care of remounting the root filesystem in read-write mode after running some checks, this should always be turned on.
Don't turn this off unless you know what you're doing.")); - unsafe=new QCheckBox(_("Do not check &partition table"), page); - QWhatsThis::add(unsafe, _("This turns off some sanity checks while writing the configuration. This should not be used under \"normal\" circumstances, but it can be useful, for example, by providing the capability of booting from a floppy disk, without having a floppy in the drive every time you run lilo.
This sets the unsafe keyword in lilo.conf.")); + unsafe=new TQCheckBox(_("Do not check &partition table"), page); + TQWhatsThis::add(unsafe, _("This turns off some sanity checks while writing the configuration. This should not be used under \"normal\" circumstances, but it can be useful, for example, by providing the capability of booting from a floppy disk, without having a floppy in the drive every time you run lilo.
This sets the unsafe keyword in lilo.conf.")); - QHBox *opts=new QHBox(page); - lock=new QCheckBox(_("&Record boot command lines for defaults"), opts); - QWhatsThis::add(lock, "" + _("Checking this box enables automatic recording of boot command lines as the default for the following bootups. This way, lilo \"locks\" on a choice until it is manually overridden.
This sets the lock option in lilo.conf")); - restricted=new QCheckBox(_("R&estrict parameters"), opts); - connect(restricted, SIGNAL(clicked()), SLOT(check_pw())); - QWhatsThis::add(restricted, _("If this box is checked, a password (entered below) is required only if any parameters are changed (i.e. the user can boot linux, but not linux single or linux init=/bin/sh).\nThis sets the restricted option in lilo.conf.")); + TQHBox *opts=new TQHBox(page); + lock=new TQCheckBox(_("&Record boot command lines for defaults"), opts); + TQWhatsThis::add(lock, "" + _("Checking this box enables automatic recording of boot command lines as the default for the following bootups. This way, lilo \"locks\" on a choice until it is manually overridden.
This sets the lock option in lilo.conf")); + restricted=new TQCheckBox(_("R&estrict parameters"), opts); + connect(restricted, TQT_SIGNAL(clicked()), TQT_SLOT(check_pw())); + TQWhatsThis::add(restricted, _("If this box is checked, a password (entered below) is required only if any parameters are changed (i.e. the user can boot linux, but not linux single or linux init=/bin/sh).\nThis sets the restricted option in lilo.conf.")); - QHBox *pw=new QHBox(page); - use_password=new QCheckBox(_("Require &password:"), pw); - connect(use_password, SIGNAL(clicked()), SLOT(check_pw())); - password=new QLineEdit(pw); + TQHBox *pw=new TQHBox(page); + use_password=new TQCheckBox(_("Require &password:"), pw); + connect(use_password, TQT_SIGNAL(clicked()), TQT_SLOT(check_pw())); + password=new TQLineEdit(pw); password->setMaxLength(15); - password->setEchoMode(QLineEdit::Password); - QWhatsThis::add(pw, _("Enter the password required for bootup (if any) here. If restricted above is checked, the password is required for additional parameters only.
WARNING: The password is stored in clear text in /etc/lilo.conf. You'll want to make sure nobody untrusted can read this file. Also, you probably don't want to use your normal/root password here.")); + password->setEchoMode(TQLineEdit::Password); + TQWhatsThis::add(pw, _("Enter the password required for bootup (if any) here. If restricted above is checked, the password is required for additional parameters only.
WARNING: The password is stored in clear text in /etc/lilo.conf. You'll want to make sure nobody untrusted can read this file. Also, you probably don't want to use your normal/root password here.")); if(l) { - QString mode=l->get("vga", "").cstr(); + TQString mode=l->get("vga", "").cstr(); if(mode.isEmpty()) vga->setCurrentItem(0); else if(mode=="ask") @@ -121,9 +121,9 @@ void Details::check_pw() password->setEnabled(restricted->isChecked() || use_password->isChecked()); } -QString Details::vgaMode() const +TQString Details::vgaMode() const { - QString s=vga->currentText(); + TQString s=vga->currentText(); if(s=="default") return ""; else if(s!="ask") { diff --git a/lilo-config/kde/Details.h b/lilo-config/kde/Details.h index e752f0b..2e9f0f6 100644 --- a/lilo-config/kde/Details.h +++ b/lilo-config/kde/Details.h @@ -30,22 +30,22 @@ #include #include -#include -#include -#include +#include +#include +#include class Details:public KDialogBase { Q_OBJECT public: - Details(liloimage *lilo, QWidget *parent=0, const char *name=0, WFlags f=0); + Details(liloimage *lilo, TQWidget *parent=0, const char *name=0, WFlags f=0); bool isReadOnly() const { return readonly->isChecked(); }; - QString vgaMode() const; + TQString vgaMode() const; bool isUnsafe() const { return unsafe->isChecked(); }; bool isLocked() const { return lock->isChecked(); }; bool isRestricted() const { return restricted->isChecked(); }; bool usePassword() const { return use_password->isChecked(); }; - QString Password() const { return password->text(); }; + TQString Password() const { return password->text(); }; private slots: void check_pw(); private: diff --git a/lilo-config/kde/InputBox.cpp b/lilo-config/kde/InputBox.cpp index a338c20..3a707cf 100644 --- a/lilo-config/kde/InputBox.cpp +++ b/lilo-config/kde/InputBox.cpp @@ -27,17 +27,17 @@ ** Bug reports and questions can be sent to kde-devel@kde.org */ #include "InputBox.moc" -#include -#include +#include +#include #include -InputBox::InputBox(entries e, QWidget *parent, const char *name, bool hasCancel, WFlags f) - : KDialogBase(parent, name, true, QString::null, hasCancel ? Ok | Cancel : Ok, Ok, true ) +InputBox::InputBox(entries e, TQWidget *parent, const char *name, bool hasCancel, WFlags f) + : KDialogBase(parent, name, true, TQString::null, hasCancel ? Ok | Cancel : Ok, Ok, true ) { - QVBox *page = makeVBoxMainWidget(); + TQVBox *page = makeVBoxMainWidget(); for(entries::iterator it=e.begin(); it!=e.end(); it++) { EditWidget *ed=new EditWidget((*it).label, (*it).dflt, (*it).isFile, page); - QWhatsThis::add(ed, (*it).help); + TQWhatsThis::add(ed, (*it).help); edit.insert(edit.end(), ed); } } diff --git a/lilo-config/kde/InputBox.h b/lilo-config/kde/InputBox.h index d263161..9bf88cd 100644 --- a/lilo-config/kde/InputBox.h +++ b/lilo-config/kde/InputBox.h @@ -31,8 +31,8 @@ #include -#include -#include +#include +#include #include "EditWidget.h" #include @@ -40,10 +40,10 @@ class InputBox:public KDialogBase { Q_OBJECT public: - typedef struct { QString label; QString dflt; bool isFile; QString help; } entry; + typedef struct { TQString label; TQString dflt; bool isFile; TQString help; } entry; typedef std::list entries; - InputBox(entries e, QWidget *parent=0, const char *name=0, bool hasCancel=true, WFlags f=0); - QStringList const text() const { QStringList s; for(std::list::const_iterator it=edit.begin(); it!=edit.end(); it++) s << (*it)->text(); return s; }; + InputBox(entries e, TQWidget *parent=0, const char *name=0, bool hasCancel=true, WFlags f=0); + TQStringList const text() const { TQStringList s; for(std::list::const_iterator it=edit.begin(); it!=edit.end(); it++) s << (*it)->text(); return s; }; private: std::list edit; }; diff --git a/lilo-config/kde/kcontrol.cpp b/lilo-config/kde/kcontrol.cpp index 2db98af..846edc8 100644 --- a/lilo-config/kde/kcontrol.cpp +++ b/lilo-config/kde/kcontrol.cpp @@ -31,17 +31,17 @@ #include #include #include -#include +#include #include #include -KControl::KControl(QWidget *parent, const char *name) +KControl::KControl(TQWidget *parent, const char *name) : KCModule(parent, name) { - QVBoxLayout *layout=new QVBoxLayout(this); + TQVBoxLayout *layout=new TQVBoxLayout(this); m=new MainWidget(this, name); layout->addWidget(m); - connect(m, SIGNAL(configChanged()), SLOT(configChanged())); + connect(m, TQT_SIGNAL(configChanged()), TQT_SLOT(configChanged())); if (getuid() != 0) { m->makeReadOnly(); } @@ -79,7 +79,7 @@ void KControl::configChanged() // SLOT extern "C" { - KDE_EXPORT KCModule *create_lilo(QWidget *parent, const char *name) + KDE_EXPORT KCModule *create_lilo(TQWidget *parent, const char *name) { return new KControl(parent, "kcmlilo"); } diff --git a/lilo-config/kde/kcontrol.h b/lilo-config/kde/kcontrol.h index d06d834..edb64d9 100644 --- a/lilo-config/kde/kcontrol.h +++ b/lilo-config/kde/kcontrol.h @@ -29,8 +29,8 @@ /* ** Bug reports and questions can be sent to kde-devel@kde.org */ -#include -#include +#include +#include #include #include "mainwidget.h" @@ -39,7 +39,7 @@ class KAboutData; class KControl: public KCModule { Q_OBJECT public: - KControl(QWidget *parent, const char *name); + KControl(TQWidget *parent, const char *name); void load(); void save(); void defaults(); diff --git a/lilo-config/qt/Details.cpp b/lilo-config/qt/Details.cpp index eae3ed5..944ba0d 100644 --- a/lilo-config/qt/Details.cpp +++ b/lilo-config/qt/Details.cpp @@ -26,25 +26,25 @@ */ #include "Details.moc" -#include -#include -#include -#include +#include +#include +#include +#include #include -Details::Details(liloimage *lilo, QWidget *parent, const char *name, WFlags f):QDialog(parent, name, true, f) +Details::Details(liloimage *lilo, TQWidget *parent, const char *name, WFlags f):TQDialog(parent, name, true, f) { l=lilo; - QVBoxLayout *layout=new QVBoxLayout(this); + TQVBoxLayout *layout=new TQVBoxLayout(this); layout->setMargin(SPACE_MARGIN); layout->setSpacing(SPACE_INSIDE); - QHBox *vgab=new QHBox(this); - QLabel *vlbl=new QLabel(_("&Graphics mode on text console:"), vgab); - vga=new QComboBox(false, vgab); + TQHBox *vgab=new TQHBox(this); + TQLabel *vlbl=new TQLabel(_("&Graphics mode on text console:"), vgab); + vga=new TQComboBox(false, vgab); vlbl->setBuddy(vga); - QWhatsThis::add(vgab, _("You can select the graphics mode for this kernel here.
If you intend to use a VGA graphics mode, you must compile the kernel with support for framebuffer devices. The ask setting brings up a prompt at boot time.")); + TQWhatsThis::add(vgab, _("You can select the graphics mode for this kernel here.
If you intend to use a VGA graphics mode, you must compile the kernel with support for framebuffer devices. The ask setting brings up a prompt at boot time.")); vga->insertItem(_("default")); vga->insertItem(_("ask")); vga->insertItem(_("text 80x25 (0)")); @@ -73,40 +73,40 @@ Details::Details(liloimage *lilo, QWidget *parent, const char *name, WFlags f):Q vga->insertItem(_("VGA 1280x1024, 16.7M colors (795)")); layout->addWidget(vgab); - readonly=new QCheckBox(_("Mount root filesystem &read-only"), this); - QWhatsThis::add(readonly, _("Mount the root filesystem for this kernel read-only. Since the init scripts normally take care of remounting the root filesystem in read-write mode after running some checks, this should always be turned on.
Don't turn this off unless you know what you're doing.")); + readonly=new TQCheckBox(_("Mount root filesystem &read-only"), this); + TQWhatsThis::add(readonly, _("Mount the root filesystem for this kernel read-only. Since the init scripts normally take care of remounting the root filesystem in read-write mode after running some checks, this should always be turned on.
Don't turn this off unless you know what you're doing.")); layout->addWidget(readonly); - unsafe=new QCheckBox(_("Do not check &partition table"), this); - QWhatsThis::add(unsafe, _("This turns off some sanity checks while writing the configuration. This shouldn't be used under \"normal\" circumstances, but it's useful, for example, for installing the possibility to boot from a floppy disk without having a floppy in the drive every time you run lilo.
This sets the unsafe keyword in lilo.conf.")); + unsafe=new TQCheckBox(_("Do not check &partition table"), this); + TQWhatsThis::add(unsafe, _("This turns off some sanity checks while writing the configuration. This shouldn't be used under \"normal\" circumstances, but it's useful, for example, for installing the possibility to boot from a floppy disk without having a floppy in the drive every time you run lilo.
This sets the unsafe keyword in lilo.conf.")); layout->addWidget(unsafe); - QHBox *opts=new QHBox(this); - lock=new QCheckBox(_("&Record boot command lines for defaults"), opts); - QWhatsThis::add(lock, ""+_("Checking this box enables automatic recording of boot command lines as the default for the following bootups. This way, lilo \"locks\" on a choice until it is manually overridden.
This sets the lock option in lilo.conf")); - restricted=new QCheckBox(_("R&estrict parameters"), opts); - connect(restricted, SIGNAL(clicked()), SLOT(check_pw())); - QWhatsThis::add(restricted, _("If this box is checked, a password (entered below) is required only if any parameters are changed (i.e. the user can boot linux, but not linux single or linux init=/bin/sh).\nThis sets the restricted option in lilo.conf.")); + TQHBox *opts=new TQHBox(this); + lock=new TQCheckBox(_("&Record boot command lines for defaults"), opts); + TQWhatsThis::add(lock, ""+_("Checking this box enables automatic recording of boot command lines as the default for the following bootups. This way, lilo \"locks\" on a choice until it is manually overridden.
This sets the lock option in lilo.conf")); + restricted=new TQCheckBox(_("R&estrict parameters"), opts); + connect(restricted, TQT_SIGNAL(clicked()), TQT_SLOT(check_pw())); + TQWhatsThis::add(restricted, _("If this box is checked, a password (entered below) is required only if any parameters are changed (i.e. the user can boot linux, but not linux single or linux init=/bin/sh).\nThis sets the restricted option in lilo.conf.")); layout->addWidget(opts); - QHBox *pw=new QHBox(this); - use_password=new QCheckBox(_("Require &password:"), pw); - connect(use_password, SIGNAL(clicked()), SLOT(check_pw())); - password=new QLineEdit(pw); + TQHBox *pw=new TQHBox(this); + use_password=new TQCheckBox(_("Require &password:"), pw); + connect(use_password, TQT_SIGNAL(clicked()), TQT_SLOT(check_pw())); + password=new TQLineEdit(pw); password->setMaxLength(15); - password->setEchoMode(QLineEdit::Password); - QWhatsThis::add(pw, _("Enter the password required for bootup (if any) here. If restricted above is checked, the password is required for additional parameters only.
WARNING: The password is stored in clear text in /etc/lilo.conf. You'll want to make sure nobody untrusted can read this file. Also, you probably don't want to use your normal/root password here.")); + password->setEchoMode(TQLineEdit::Password); + TQWhatsThis::add(pw, _("Enter the password required for bootup (if any) here. If restricted above is checked, the password is required for additional parameters only.
WARNING: The password is stored in clear text in /etc/lilo.conf. You'll want to make sure nobody untrusted can read this file. Also, you probably don't want to use your normal/root password here.")); layout->addWidget(pw); - QHBox *btns=new QHBox(this); - ok=new QPushButton(_("&OK"), btns); - cancel=new QPushButton(_("&Cancel"), btns); + TQHBox *btns=new TQHBox(this); + ok=new TQPushButton(_("&OK"), btns); + cancel=new TQPushButton(_("&Cancel"), btns); layout->addWidget(btns); - connect(cancel, SIGNAL(clicked()), SLOT(reject())); - connect(ok, SIGNAL(clicked()), SLOT(accept())); + connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); + connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(accept())); if(l) { - QString mode=l->get("vga", "").cstr(); + TQString mode=l->get("vga", "").cstr(); if(mode.isEmpty()) vga->setCurrentItem(0); else if(mode=="ask") @@ -131,9 +131,9 @@ void Details::check_pw() { password->setEnabled(restricted->isChecked() || use_password->isChecked()); } -QString Details::vgaMode() const +TQString Details::vgaMode() const { - QString s=vga->currentText(); + TQString s=vga->currentText(); if(s=="default") return ""; else if(s!="ask") { diff --git a/lilo-config/qt/Details.h b/lilo-config/qt/Details.h index f189430..c7c7f98 100644 --- a/lilo-config/qt/Details.h +++ b/lilo-config/qt/Details.h @@ -27,23 +27,23 @@ #ifndef _DETAILS_H_ #define _DETAILS_H_ 1 #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class Details:public QDialog { Q_OBJECT public: - Details(liloimage *lilo, QWidget *parent=0, const char *name=0, WFlags f=0); + Details(liloimage *lilo, TQWidget *parent=0, const char *name=0, WFlags f=0); bool isReadOnly() const { return readonly->isChecked(); }; - QString vgaMode() const; + TQString vgaMode() const; bool isUnsafe() const { return unsafe->isChecked(); }; bool isLocked() const { return lock->isChecked(); }; bool isRestricted() const { return restricted->isChecked(); }; bool usePassword() const { return use_password->isChecked(); }; - QString Password() const { return password->text(); }; + TQString Password() const { return password->text(); }; private slots: void check_pw(); private: diff --git a/lilo-config/qt/InputBox.cpp b/lilo-config/qt/InputBox.cpp index f95989b..9836a91 100644 --- a/lilo-config/qt/InputBox.cpp +++ b/lilo-config/qt/InputBox.cpp @@ -26,31 +26,31 @@ */ #include "InputBox.moc" -#include -#include -#include +#include +#include +#include #include -InputBox::InputBox(entries e, QWidget *parent, const char *name, bool hasCancel, WFlags f):QDialog(parent, name, true, f) +InputBox::InputBox(entries e, TQWidget *parent, const char *name, bool hasCancel, WFlags f):TQDialog(parent, name, true, f) { - QVBoxLayout *layout=new QVBoxLayout(this); + TQVBoxLayout *layout=new TQVBoxLayout(this); layout->setMargin(SPACE_MARGIN); layout->setSpacing(SPACE_INSIDE); for(entries::iterator it=e.begin(); it!=e.end(); it++) { EditWidget *ed=new EditWidget((*it).label, (*it).dflt, (*it).isFile, this); - QWhatsThis::add(ed, (*it).help); + TQWhatsThis::add(ed, (*it).help); layout->addWidget(ed); edit.insert(edit.end(), ed); } if(hasCancel) { - QHBox *btns=new QHBox(this); - ok=new QPushButton(_("&OK"), btns); - cancel=new QPushButton(_("&Cancel"), btns); + TQHBox *btns=new TQHBox(this); + ok=new TQPushButton(_("&OK"), btns); + cancel=new TQPushButton(_("&Cancel"), btns); layout->addWidget(btns); - connect(cancel, SIGNAL(clicked()), SLOT(reject())); + connect(cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); } else { - ok=new QPushButton(_("&OK"), this); + ok=new TQPushButton(_("&OK"), this); layout->addWidget(ok); } - connect(ok, SIGNAL(clicked()), SLOT(accept())); + connect(ok, TQT_SIGNAL(clicked()), TQT_SLOT(accept())); } diff --git a/lilo-config/qt/InputBox.h b/lilo-config/qt/InputBox.h index da2371b..f4be6e9 100644 --- a/lilo-config/qt/InputBox.h +++ b/lilo-config/qt/InputBox.h @@ -27,23 +27,23 @@ #ifndef _INPUTBOX_H_ #define _INPUTBOX_H_ 1 -#include -#include -#include -#include +#include +#include +#include +#include #include "EditWidget.h" #include class InputBox:public QDialog { Q_OBJECT public: - typedef struct { QString label; QString dflt; bool isFile; QString help; } entry; + typedef struct { TQString label; TQString dflt; bool isFile; TQString help; } entry; typedef std::list entries; - InputBox(entries e, QWidget *parent=0, const char *name=0, bool hasCancel=true, WFlags f=0); - QStringList const text() const { QStringList s; for(std::list::const_iterator it=edit.begin(); it!=edit.end(); it++) s << (*it)->text(); return s; }; + InputBox(entries e, TQWidget *parent=0, const char *name=0, bool hasCancel=true, WFlags f=0); + TQStringList const text() const { TQStringList s; for(std::list::const_iterator it=edit.begin(); it!=edit.end(); it++) s << (*it)->text(); return s; }; private: std::list edit; - QPushButton *ok; - QPushButton *cancel; + TQPushButton *ok; + TQPushButton *cancel; }; #endif diff --git a/lilo-config/qt/standalone.cpp b/lilo-config/qt/standalone.cpp index 268ad21..4dc73e2 100644 --- a/lilo-config/qt/standalone.cpp +++ b/lilo-config/qt/standalone.cpp @@ -25,42 +25,42 @@ ** Bug reports and questions can be sent to kde-devel@kde.org */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include "standalone.moc" -Standalone::Standalone(QWidget *parent, const char *name):QWidget(parent,name) +Standalone::Standalone(TQWidget *parent, const char *name):TQWidget(parent,name) { m=new MainWidget(this); - connect(m, SIGNAL(configChanged()), SLOT(configChanged())); - actions=new QHButtonGroup(this); - _whatsthis=new QPushButton(_("&What's This?"), actions); + connect(m, TQT_SIGNAL(configChanged()), TQT_SLOT(configChanged())); + actions=new TQHButtonGroup(this); + _whatsthis=new TQPushButton(_("&What's This?"), actions); _whatsthis->setAccel(SHIFT+Key_F1); - QWhatsThis::add(_whatsthis, _("The What's This? button is part of this program's help system. Click on the What's This? button then on any widget in the window to get information (like this) on it.")); - connect(_whatsthis, SIGNAL(clicked()), SLOT(whatsthis())); - _help=new QPushButton(_("&Help"), actions); + TQWhatsThis::add(_whatsthis, _("The What's This? button is part of this program's help system. Click on the What's This? button then on any widget in the window to get information (like this) on it.")); + connect(_whatsthis, TQT_SIGNAL(clicked()), TQT_SLOT(whatsthis())); + _help=new TQPushButton(_("&Help"), actions); _help->setAccel(Key_F1); - QWhatsThis::add(_help, _("This button calls up the program's online help system. If it does nothing, no help file has been written (yet); in that case, use the What's This button on the left.")); - connect(_help, SIGNAL(clicked()), this, SLOT(help())); - _deflt=new QPushButton(_("&Default"), actions); - QWhatsThis::add(_deflt, _("This button resets all parameters to some (hopefully sane) default values.")); - connect(_deflt, SIGNAL(clicked()), this, SLOT(defaults())); - _reset=new QPushButton(_("&Reset"), actions); - QWhatsThis::add(_reset, _("This button resets all parameters to what they were before you started the program.")); - connect(_reset, SIGNAL(clicked()), this, SLOT(reset())); - _apply=new QPushButton(_("&Apply"), actions); - QWhatsThis::add(_apply, _("This button saves all your changes without exiting.")); - connect(_apply, SIGNAL(clicked()), this, SLOT(apply())); - _ok=new QPushButton(_("&OK"), actions); - QWhatsThis::add(_ok, _("This button saves all your changes and exits the program.")); - connect(_ok, SIGNAL(clicked()), this, SLOT(ok())); - _cancel=new QPushButton(_("&Cancel"), actions); - QWhatsThis::add(_cancel, _("This button exits the program without saving your changes.")); - connect(_cancel, SIGNAL(clicked()), this, SLOT(cancel())); + TQWhatsThis::add(_help, _("This button calls up the program's online help system. If it does nothing, no help file has been written (yet); in that case, use the What's This button on the left.")); + connect(_help, TQT_SIGNAL(clicked()), this, TQT_SLOT(help())); + _deflt=new TQPushButton(_("&Default"), actions); + TQWhatsThis::add(_deflt, _("This button resets all parameters to some (hopefully sane) default values.")); + connect(_deflt, TQT_SIGNAL(clicked()), this, TQT_SLOT(defaults())); + _reset=new TQPushButton(_("&Reset"), actions); + TQWhatsThis::add(_reset, _("This button resets all parameters to what they were before you started the program.")); + connect(_reset, TQT_SIGNAL(clicked()), this, TQT_SLOT(reset())); + _apply=new TQPushButton(_("&Apply"), actions); + TQWhatsThis::add(_apply, _("This button saves all your changes without exiting.")); + connect(_apply, TQT_SIGNAL(clicked()), this, TQT_SLOT(apply())); + _ok=new TQPushButton(_("&OK"), actions); + TQWhatsThis::add(_ok, _("This button saves all your changes and exits the program.")); + connect(_ok, TQT_SIGNAL(clicked()), this, TQT_SLOT(ok())); + _cancel=new TQPushButton(_("&Cancel"), actions); + TQWhatsThis::add(_cancel, _("This button exits the program without saving your changes.")); + connect(_cancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(cancel())); _apply->setEnabled(false); setMinimumWidth(actions->sizeHint().width()+10); arrangeWidgets(); @@ -72,15 +72,15 @@ void Standalone::arrangeWidgets() actions->setGeometry(SPACE_MARGIN, height()-actions->sizeHint().height()-SPACE_MARGIN, width()-2*SPACE_MARGIN, actions->sizeHint().height()); } -void Standalone::resizeEvent(QResizeEvent *e) +void Standalone::resizeEvent(TQResizeEvent *e) { - QWidget::resizeEvent(e); + TQWidget::resizeEvent(e); arrangeWidgets(); } void Standalone::whatsthis() { - QWhatsThis::enterWhatsThisMode(); + TQWhatsThis::enterWhatsThisMode(); } void Standalone::help() { @@ -113,12 +113,12 @@ void Standalone::configChanged() // SLOT } int main(int argc, char **argv) { - QApplication a(argc, argv); + TQApplication a(argc, argv); Standalone *s=new Standalone(0); int ret; - a.setStyle(new QWindowsStyle()); + a.setStyle(new TQWindowsStyle()); a.setMainWidget(s); - QObject::connect(s, SIGNAL(done()), &a, SLOT(quit())); + TQObject::connect(s, TQT_SIGNAL(done()), &a, TQT_SLOT(quit())); s->show(); ret=a.exec(); delete s; diff --git a/lilo-config/qt/standalone.h b/lilo-config/qt/standalone.h index 8b0fa16..3d5c4bf 100644 --- a/lilo-config/qt/standalone.h +++ b/lilo-config/qt/standalone.h @@ -27,17 +27,17 @@ #ifndef _STANDALONE_H_ #define _STANDALONE_H_ 1 -#include -#include -#include -#include +#include +#include +#include +#include #include "mainwidget.h" class Standalone: public QWidget { Q_OBJECT public: - Standalone(QWidget *parent=0, const char *name=0); - void resizeEvent(QResizeEvent *e); + Standalone(TQWidget *parent=0, const char *name=0); + void resizeEvent(TQResizeEvent *e); public slots: void whatsthis(); void help(); @@ -52,13 +52,13 @@ signals: private: void arrangeWidgets(); MainWidget *m; - QHButtonGroup *actions; - QPushButton *_whatsthis; - QPushButton *_help; - QPushButton *_deflt; - QPushButton *_reset; - QPushButton *_apply; - QPushButton *_ok; - QPushButton *_cancel; + TQHButtonGroup *actions; + TQPushButton *_whatsthis; + TQPushButton *_help; + TQPushButton *_deflt; + TQPushButton *_reset; + TQPushButton *_apply; + TQPushButton *_ok; + TQPushButton *_cancel; }; #endif diff --git a/secpolicy/pamview.cpp b/secpolicy/pamview.cpp index f16ac4d..963ce20 100644 --- a/secpolicy/pamview.cpp +++ b/secpolicy/pamview.cpp @@ -22,14 +22,14 @@ * */ -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -40,21 +40,21 @@ #include -PamView::PamView(QWidget *parent, const char *name) - : QWidget(parent, name) +PamView::PamView(TQWidget *parent, const char *name) + : TQWidget(parent, name) { - QHBoxLayout *topl = new QHBoxLayout(this); + TQHBoxLayout *topl = new TQHBoxLayout(this); - QVBoxLayout *leftl = new QVBoxLayout; + TQVBoxLayout *leftl = new QVBoxLayout; topl->addLayout(leftl); - QLabel *label = new QLabel(i18n("Available services:"), this); + TQLabel *label = new TQLabel(i18n("Available services:"), this); leftl->addWidget(label); - servicesLB = new QListBox(this); + servicesLB = new TQListBox(this); leftl->addWidget(servicesLB); - propertiesLV = new QListView(this); + propertiesLV = new TQListView(this); propertiesLV->addColumn(i18n("Category")); propertiesLV->addColumn(i18n("Level")); propertiesLV->addColumn(i18n("Module")); @@ -75,8 +75,8 @@ void PamView::init() void PamView::initServices() { - QDir d("/etc/pam.d"); - d.setFilter(QDir::Files|QDir::Readable); + TQDir d("/etc/pam.d"); + d.setFilter(TQDir::Files|TQDir::Readable); if (!d.exists()) { KMessageBox::error(this, i18n("/etc/pam.d folder does not exist.\n" @@ -87,20 +87,20 @@ void PamView::initServices() const QFileInfoList *list = d.entryInfoList(); QFileInfoListIterator it(*list); - QFileInfo *fi; + TQFileInfo *fi; while ((fi = it.current()) != 0) { servicesLB->insertItem(fi->fileName()); - QFile f(fi->filePath()); + TQFile f(fi->filePath()); if (f.open(IO_ReadOnly)) { - QTextStream t(&f); - QString s; + TQTextStream t(&f); + TQString s; while (!t.eof()) { s = t.readLine().stripWhiteSpace(); if (s.isEmpty() || (s[0] == '#')) continue; PamPropertiesItem *item = new PamPropertiesItem(fi->filePath(), - QStringList::split(QRegExp("\\s"), s), + TQStringList::split(TQRegExp("\\s"), s), propertiesLV); propertiesLV->insertItem(item); } diff --git a/secpolicy/pamview.h b/secpolicy/pamview.h index ea41634..c2a6084 100644 --- a/secpolicy/pamview.h +++ b/secpolicy/pamview.h @@ -25,7 +25,7 @@ #ifndef _PAMVIEW_H #define _PAMVIEW_H -#include +#include class QListBox; class QListView; @@ -34,7 +34,7 @@ class PamView : public QWidget { Q_OBJECT public: - PamView(QWidget *parent = 0, const char *name = 0); + PamView(TQWidget *parent = 0, const char *name = 0); virtual ~PamView(); protected: @@ -42,8 +42,8 @@ protected: void initServices(); private: - QListBox *servicesLB; - QListView *propertiesLV; + TQListBox *servicesLB; + TQListView *propertiesLV; }; #endif diff --git a/secpolicy/ppitem.cpp b/secpolicy/ppitem.cpp index 05fb358..30ef550 100644 --- a/secpolicy/ppitem.cpp +++ b/secpolicy/ppitem.cpp @@ -22,13 +22,13 @@ * */ -#include +#include #include "ppitem.h" -PamPropertiesItem::PamPropertiesItem(QString fileName, - QStringList properties, - QListView *parent) - : QListViewItem(parent) +PamPropertiesItem::PamPropertiesItem(TQString fileName, + TQStringList properties, + TQListView *parent) + : TQListViewItem(parent) { int i = properties.count(); if (i > 0) diff --git a/secpolicy/ppitem.h b/secpolicy/ppitem.h index 591d729..d9204ae 100644 --- a/secpolicy/ppitem.h +++ b/secpolicy/ppitem.h @@ -25,16 +25,16 @@ #ifndef _PPITEM_H #define _PPITEM_H -#include +#include class PamPropertiesItem : public QListViewItem { public: - PamPropertiesItem(QString fileName, QStringList properties, - QListView *parent); + PamPropertiesItem(TQString fileName, TQStringList properties, + TQListView *parent); private: - QString category, level, lib; + TQString category, level, lib; }; #endif diff --git a/secpolicy/secpolicywin.cpp b/secpolicy/secpolicywin.cpp index 64a454d..f74c4e9 100644 --- a/secpolicy/secpolicywin.cpp +++ b/secpolicy/secpolicywin.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include "pamview.h" @@ -41,11 +41,11 @@ SecPolicyWin::SecPolicyWin(const char *name) setCentralWidget(view); KMenuBar *mBar = menuBar(); - QPopupMenu *fileMenu = new QPopupMenu(this); - fileMenu->insertItem(i18n("&Quit"), kapp, SLOT(closeAllWindows()), KStdAccel::shortcut(KStdAccel::Quit)); + TQPopupMenu *fileMenu = new TQPopupMenu(this); + fileMenu->insertItem(i18n("&Quit"), kapp, TQT_SLOT(closeAllWindows()), KStdAccel::shortcut(KStdAccel::Quit)); mBar->insertItem(i18n("&File"), fileMenu); - connect(kapp, SIGNAL(lastWindowClosed()), kapp, SLOT(quit())); + connect(kapp, TQT_SIGNAL(lastWindowClosed()), kapp, TQT_SLOT(quit())); adjustSize(); // work around KTMainWindow sizing bug. @@ -58,7 +58,7 @@ SecPolicyWin::~SecPolicyWin() { } -void SecPolicyWin::closeEvent(QCloseEvent *e) +void SecPolicyWin::closeEvent(TQCloseEvent *e) { e->accept(); } diff --git a/secpolicy/secpolicywin.h b/secpolicy/secpolicywin.h index a58b8a6..078fafa 100644 --- a/secpolicy/secpolicywin.h +++ b/secpolicy/secpolicywin.h @@ -36,7 +36,7 @@ public: ~SecPolicyWin(); protected: - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); private: PamView *view; -- cgit v1.2.1