diff options
Diffstat (limited to 'kpackage/packageDisplay.cpp')
-rw-r--r-- | kpackage/packageDisplay.cpp | 116 |
1 files changed, 58 insertions, 58 deletions
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 <qapplication.h> -#include <qfileinfo.h> -#include <qtextedit.h> +#include <tqapplication.h> +#include <tqfileinfo.h> +#include <tqtextedit.h> #include <kdebug.h> #include <kiconloader.h> @@ -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<QString, QString>::Iterator it; // update info entries in p + TQMap<TQString, TQString>::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; |