summaryrefslogtreecommitdiffstats
path: root/kpackage/pkgOptions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpackage/pkgOptions.cpp')
-rw-r--r--kpackage/pkgOptions.cpp98
1 files changed, 49 insertions, 49 deletions
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 <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kglobal.h>
@@ -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<param> &pars)
+void pkgOptions::setupWidgets(TQPtrList<param> &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<param> &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<param> &pars)
resize(800, 400);
}
-void pkgOptions::setup(packageInfo *p, const QString &type) {
- QPtrList<packageInfo> *pl = new QPtrList<packageInfo>;
+void pkgOptions::setup(packageInfo *p, const TQString &type) {
+ TQPtrList<packageInfo> *pl = new TQPtrList<packageInfo>;
pl->append(p);
setup(pl,type);
}
-bool pkgOptions::setup(QPtrList<packageInfo> *pl, const QString &)
+bool pkgOptions::setup(TQPtrList<packageInfo> *pl, const TQString &)
{
- QString s;
+ TQString s;
modified = FALSE;
packList = pl;
@@ -163,11 +163,11 @@ bool pkgOptions::setup(QPtrList<packageInfo> *pl, const QString &)
packages->clear();
packageInfo *p;
- QStringList plist, rlist, clist;
- QDict<QString> dict;
- QString mark("x");
+ TQStringList plist, rlist, clist;
+ TQDict<TQString> 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<packageInfo> *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<packageInfo> *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<packageInfo> *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<packageInfo> *p, bool &test)
+TQString pkgOptionsI::doPackages(int installFlags, TQPtrList<packageInfo> *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<packageInfo> *p, bool &test)
+TQString pkgOptionsU::doPackages(int installFlags, TQPtrList<packageInfo> *p, bool &test)
{
return pkgInt->uninstall(installFlags, p, test);
}