summaryrefslogtreecommitdiffstats
path: root/kpackage/options.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:25:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:25:18 +0000
commitaa3a1ca934bc541bddd3fa136a85f106f7da266e (patch)
tree9ad0b795aed8fa4ac30c2fe0fd1aacb8175714c0 /kpackage/options.cpp
parentb10cf7066791a2f362495890cd50c984e8025412 (diff)
downloadtdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.tar.gz
tdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1157635 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpackage/options.cpp')
-rw-r--r--kpackage/options.cpp122
1 files changed, 61 insertions, 61 deletions
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 <qvbox.h>
-#include <qcheckbox.h>
+#include <tqvbox.h>
+#include <tqcheckbox.h>
#include <klocale.h>
#include <kdebug.h>
#include <kurlrequester.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qtabdialog.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqtabdialog.h>
#include <kcombobox.h>
#include <klineedit.h>
@@ -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);