diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:25:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:25:18 +0000 |
commit | aa3a1ca934bc541bddd3fa136a85f106f7da266e (patch) | |
tree | 9ad0b795aed8fa4ac30c2fe0fd1aacb8175714c0 /kpackage/updateLoc.cpp | |
parent | b10cf7066791a2f362495890cd50c984e8025412 (diff) | |
download | tdeadmin-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/updateLoc.cpp')
-rw-r--r-- | kpackage/updateLoc.cpp | 200 |
1 files changed, 100 insertions, 100 deletions
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 <qvbox.h> -#include <qscrollview.h> +#include <tqvbox.h> +#include <tqscrollview.h> #include <klocale.h> #include <kmessagebox.h> #include <kcombobox.h> ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// -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); } |