diff options
Diffstat (limited to 'kpackage/findf.cpp')
-rw-r--r-- | kpackage/findf.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
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 <qlineedit.h> -#include <qpainter.h> +#include <tqlineedit.h> +#include <tqpainter.h> #include <klocale.h> #include <kdebug.h> @@ -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 { |