summaryrefslogtreecommitdiffstats
path: root/kfind
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kfind
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kfind')
-rw-r--r--kfind/kdatecombo.cpp44
-rw-r--r--kfind/kdatecombo.h28
-rw-r--r--kfind/kfind.cpp38
-rw-r--r--kfind/kfind.h8
-rw-r--r--kfind/kfinddlg.cpp88
-rw-r--r--kfind/kfinddlg.h18
-rw-r--r--kfind/kfindpart.cpp38
-rw-r--r--kfind/kfindpart.h14
-rw-r--r--kfind/kftabdlg.cpp234
-rw-r--r--kfind/kftabdlg.h74
-rw-r--r--kfind/kfwin.cpp136
-rw-r--r--kfind/kfwin.h22
-rw-r--r--kfind/kquery.cpp96
-rw-r--r--kfind/kquery.h58
-rw-r--r--kfind/main.cpp8
15 files changed, 452 insertions, 452 deletions
diff --git a/kfind/kdatecombo.cpp b/kfind/kdatecombo.cpp
index c5f9e4553..95e4045ac 100644
--- a/kfind/kdatecombo.cpp
+++ b/kfind/kdatecombo.cpp
@@ -4,7 +4,7 @@
*
***********************************************************************/
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kglobal.h>
#include <klocale.h>
@@ -16,18 +16,18 @@
#include "kdatecombo.moc"
-KDateCombo::KDateCombo(QWidget *parent, const char *name ) : QComboBox(FALSE, parent,name)
+KDateCombo::KDateCombo(TQWidget *parent, const char *name ) : TQComboBox(FALSE, parent,name)
{
- QDate date = QDate::currentDate();
+ TQDate date = TQDate::currentDate();
initObject(date, parent, name);
}
-KDateCombo::KDateCombo(const QDate & date, QWidget *parent, const char *name) : QComboBox(FALSE, parent,name)
+KDateCombo::KDateCombo(const TQDate & date, TQWidget *parent, const char *name) : TQComboBox(FALSE, parent,name)
{
initObject(date, parent, name);
}
-void KDateCombo::initObject(const QDate & date, QWidget *, const char *)
+void KDateCombo::initObject(const TQDate & date, TQWidget *, const char *)
{
clearValidator();
popupFrame = new KPopupFrame(this, "popupFrame");
@@ -38,7 +38,7 @@ void KDateCombo::initObject(const QDate & date, QWidget *, const char *)
popupFrame->setMainWidget(datePicker);
setDate(date);
- connect(datePicker, SIGNAL(dateSelected(QDate)), this, SLOT(dateEnteredEvent(QDate)));
+ connect(datePicker, TQT_SIGNAL(dateSelected(TQDate)), this, TQT_SLOT(dateEnteredEvent(TQDate)));
}
KDateCombo::~KDateCombo()
@@ -47,22 +47,22 @@ KDateCombo::~KDateCombo()
delete popupFrame;
}
-QString KDateCombo::date2String(const QDate & date)
+TQString KDateCombo::date2String(const TQDate & date)
{
return(KGlobal::locale()->formatDate(date, true));
}
-QDate & KDateCombo::string2Date(const QString & str, QDate *qd)
+TQDate & KDateCombo::string2Date(const TQString & str, TQDate *qd)
{
return *qd = KGlobal::locale()->readDate(str);
}
-QDate & KDateCombo::getDate(QDate *currentDate)
+TQDate & KDateCombo::getDate(TQDate *currentDate)
{
return string2Date(currentText(), currentDate);
}
-bool KDateCombo::setDate(const QDate & newDate)
+bool KDateCombo::setDate(const TQDate & newDate)
{
if (newDate.isValid())
{
@@ -74,7 +74,7 @@ bool KDateCombo::setDate(const QDate & newDate)
return FALSE;
}
-void KDateCombo::dateEnteredEvent(QDate newDate)
+void KDateCombo::dateEnteredEvent(TQDate newDate)
{
if (!newDate.isValid())
newDate = datePicker->date();
@@ -82,36 +82,36 @@ void KDateCombo::dateEnteredEvent(QDate newDate)
setDate(newDate);
}
-void KDateCombo::mousePressEvent (QMouseEvent * e)
+void KDateCombo::mousePressEvent (TQMouseEvent * e)
{
- if (e->button() & QMouseEvent::LeftButton)
+ if (e->button() & TQMouseEvent::LeftButton)
{
if (rect().contains( e->pos()))
{
- QDate tempDate;
+ TQDate tempDate;
getDate(& tempDate);
datePicker->setDate(tempDate);
- popupFrame->popup(mapToGlobal(QPoint(0, height())));
+ popupFrame->popup(mapToGlobal(TQPoint(0, height())));
//datePicker->setFocus();
}
}
}
-bool KDateCombo::eventFilter (QObject*, QEvent* e)
+bool KDateCombo::eventFilter (TQObject*, TQEvent* e)
{
- if ( e->type() == QEvent::MouseButtonPress )
+ if ( e->type() == TQEvent::MouseButtonPress )
{
- QMouseEvent *me = (QMouseEvent *)e;
- QPoint p = mapFromGlobal( me->globalPos() );
+ TQMouseEvent *me = (TQMouseEvent *)e;
+ TQPoint p = mapFromGlobal( me->globalPos() );
if (rect().contains( p ) )
{
- QTimer::singleShot(10, this, SLOT(dateEnteredEvent()));
+ TQTimer::singleShot(10, this, TQT_SLOT(dateEnteredEvent()));
return true;
}
}
- else if ( e->type() == QEvent::KeyRelease )
+ else if ( e->type() == TQEvent::KeyRelease )
{
- QKeyEvent *k = (QKeyEvent *)e;
+ TQKeyEvent *k = (TQKeyEvent *)e;
//Press return == pick selected date and close the combo
if((k->key()==Qt::Key_Return)||(k->key()==Qt::Key_Enter))
{
diff --git a/kfind/kdatecombo.h b/kfind/kdatecombo.h
index 12f66174a..ab714a3ba 100644
--- a/kfind/kdatecombo.h
+++ b/kfind/kdatecombo.h
@@ -7,9 +7,9 @@
#ifndef KDATECOMBO_H
#define KDATECOMBO_H
-#include <qwidget.h>
-#include <qcombobox.h>
-#include <qdatetime.h>
+#include <tqwidget.h>
+#include <tqcombobox.h>
+#include <tqdatetime.h>
/**
*@author Beppe Grimaldi
@@ -18,32 +18,32 @@
class KDatePicker;
class KPopupFrame;
-class KDateCombo : public QComboBox {
+class KDateCombo : public TQComboBox {
Q_OBJECT
public:
- KDateCombo(QWidget *parent=0, const char *name=0);
- KDateCombo(const QDate & date, QWidget *parent=0, const char *name=0);
+ KDateCombo(TQWidget *parent=0, const char *name=0);
+ KDateCombo(const TQDate & date, TQWidget *parent=0, const char *name=0);
~KDateCombo();
- QDate & getDate(QDate *currentDate);
- bool setDate(const QDate & newDate);
+ TQDate & getDate(TQDate *currentDate);
+ bool setDate(const TQDate & newDate);
private:
KPopupFrame * popupFrame;
KDatePicker * datePicker;
- void initObject(const QDate & date, QWidget *parent, const char *name);
+ void initObject(const TQDate & date, TQWidget *parent, const char *name);
- QString date2String(const QDate &);
- QDate & string2Date(const QString &, QDate * );
+ TQString date2String(const TQDate &);
+ TQDate & string2Date(const TQString &, TQDate * );
protected:
- bool eventFilter (QObject*, QEvent*);
- virtual void mousePressEvent (QMouseEvent * e);
+ bool eventFilter (TQObject*, TQEvent*);
+ virtual void mousePressEvent (TQMouseEvent * e);
protected slots:
- void dateEnteredEvent(QDate d=QDate());
+ void dateEnteredEvent(TQDate d=TQDate());
};
#endif
diff --git a/kfind/kfind.cpp b/kfind/kfind.cpp
index 93c646a91..8908b26c8 100644
--- a/kfind/kfind.cpp
+++ b/kfind/kfind.cpp
@@ -26,15 +26,15 @@
**********************************************************************/
#include <kpushbutton.h>
-#include <qlayout.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
#include <kdialog.h>
#include <kdebug.h>
#include <klocale.h>
#include <kseparator.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include <kstdguiitem.h>
#include "kftabdlg.h"
@@ -42,11 +42,11 @@
#include "kfind.moc"
-Kfind::Kfind(QWidget *parent, const char *name)
- : QWidget( parent, name )
+Kfind::Kfind(TQWidget *parent, const char *name)
+ : TQWidget( parent, name )
{
kdDebug() << "Kfind::Kfind " << this << endl;
- QBoxLayout * mTopLayout = new QBoxLayout( this, QBoxLayout::LeftToRight,
+ TQBoxLayout * mTopLayout = new TQBoxLayout( this, TQBoxLayout::LeftToRight,
KDialog::marginHint(), KDialog::spacingHint() );
// create tabwidget
@@ -58,30 +58,30 @@ Kfind::Kfind(QWidget *parent, const char *name)
* pixel for me which is visually distracting (GS).
// create separator
KSeparator * mActionSep = new KSeparator( this );
- mActionSep->setFocusPolicy( QWidget::ClickFocus );
- mActionSep->setOrientation( QFrame::VLine );
+ mActionSep->setFocusPolicy( TQWidget::ClickFocus );
+ mActionSep->setOrientation( TQFrame::VLine );
mTopLayout->addWidget(mActionSep);
*/
// create button box
- QVBox * mButtonBox = new QVBox( this );
- QVBoxLayout *lay = (QVBoxLayout*)mButtonBox->layout();
+ TQVBox * mButtonBox = new TQVBox( this );
+ TQVBoxLayout *lay = (TQVBoxLayout*)mButtonBox->layout();
lay->addStretch(1);
mTopLayout->addWidget(mButtonBox);
mSearch = new KPushButton( KGuiItem(i18n("&Find"), "find"), mButtonBox );
mButtonBox->setSpacing( (tabWidget->sizeHint().height()-4*mSearch->sizeHint().height()) / 4);
- connect( mSearch, SIGNAL(clicked()), this, SLOT( startSearch() ) );
+ connect( mSearch, TQT_SIGNAL(clicked()), this, TQT_SLOT( startSearch() ) );
mStop = new KPushButton( KGuiItem(i18n("Stop"), "stop"), mButtonBox );
- connect( mStop, SIGNAL(clicked()), this, SLOT( stopSearch() ) );
+ connect( mStop, TQT_SIGNAL(clicked()), this, TQT_SLOT( stopSearch() ) );
mSave = new KPushButton( KStdGuiItem::saveAs(), mButtonBox );
- connect( mSave, SIGNAL(clicked()), this, SLOT( saveResults() ) );
+ connect( mSave, TQT_SIGNAL(clicked()), this, TQT_SLOT( saveResults() ) );
KPushButton * mClose = new KPushButton( KStdGuiItem::close(), mButtonBox );
- connect( mClose, SIGNAL(clicked()), this, SIGNAL( destroyMe() ) );
+ connect( mClose, TQT_SIGNAL(clicked()), this, TQT_SIGNAL( destroyMe() ) );
// react to search requests from widget
- connect( tabWidget, SIGNAL(startSearch()), this, SLOT( startSearch() ) );
+ connect( tabWidget, TQT_SIGNAL(startSearch()), this, TQT_SLOT( startSearch() ) );
mSearch->setEnabled(true); // Enable "Search"
mStop->setEnabled(false); // Disable "Stop"
@@ -164,7 +164,7 @@ void Kfind::setFocus()
tabWidget->setFocus();
}
-void Kfind::saveState( QDataStream *stream )
+void Kfind::saveState( TQDataStream *stream )
{
query->kill();
*stream << tabWidget->nameBox->currentText();
@@ -174,9 +174,9 @@ void Kfind::saveState( QDataStream *stream )
*stream << (int)( tabWidget->subdirsCb->isChecked() ? 0 : 1 );
}
-void Kfind::restoreState( QDataStream *stream )
+void Kfind::restoreState( TQDataStream *stream )
{
- QString namesearched, dirsearched,containing;
+ TQString namesearched, dirsearched,containing;
int typeIdx;
int subdirs;
*stream >> namesearched;
diff --git a/kfind/kfind.h b/kfind/kfind.h
index 9bc5d35e5..35fcb4b65 100644
--- a/kfind/kfind.h
+++ b/kfind/kfind.h
@@ -7,7 +7,7 @@
#ifndef KFIND_H
#define KFIND_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kfileitem.h>
#include <kdirlister.h>
@@ -23,7 +23,7 @@ class Kfind: public QWidget
Q_OBJECT
public:
- Kfind(QWidget * parent = 0, const char * name = 0);
+ Kfind(TQWidget * parent = 0, const char * name = 0);
~Kfind();
void setURL( const KURL &url );
@@ -31,8 +31,8 @@ public:
void setQuery(KQuery * q) { query = q; }
void searchFinished();
- void saveState( QDataStream *stream );
- void restoreState( QDataStream *stream );
+ void saveState( TQDataStream *stream );
+ void restoreState( TQDataStream *stream );
public slots:
void startSearch();
diff --git a/kfind/kfinddlg.cpp b/kfind/kfinddlg.cpp
index 4efafd2de..aeb6d2708 100644
--- a/kfind/kfinddlg.cpp
+++ b/kfind/kfinddlg.cpp
@@ -4,8 +4,8 @@
*
**********************************************************************/
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kglobal.h>
@@ -23,14 +23,14 @@
#include "kfinddlg.h"
#include "kfinddlg.moc"
-KfindDlg::KfindDlg(const KURL & url, QWidget *parent, const char *name)
- : KDialogBase( Plain, QString::null,
+KfindDlg::KfindDlg(const KURL & url, TQWidget *parent, const char *name)
+ : KDialogBase( Plain, TQString::null,
User1 | User2 | Apply | Close | Help, Apply,
parent, name, true, false,
KGuiItem(i18n("Stop"), "stop"),
KStdGuiItem::saveAs())
{
- QWidget::setCaption( i18n("Find Files/Folders" ) );
+ TQWidget::setCaption( i18n("Find Files/Folders" ) );
setButtonBoxOrientation(Vertical);
enableButton(Apply, true); // Enable "Find"
@@ -41,7 +41,7 @@ KfindDlg::KfindDlg(const KURL & url, QWidget *parent, const char *name)
isResultReported = false;
- QFrame *frame = plainPage();
+ TQFrame *frame = plainPage();
// create tabwidget
tabWidget = new KfindTabWidget( frame, "dialog");
@@ -54,28 +54,28 @@ KfindDlg::KfindDlg(const KURL & url, QWidget *parent, const char *name)
mStatusBar->insertFixedItem(i18n("AMiddleLengthText..."), 0, true);
setStatusMsg(i18n("Ready."));
mStatusBar->setItemAlignment(0, AlignLeft | AlignVCenter);
- mStatusBar->insertItem(QString::null, 1, 1, true);
+ mStatusBar->insertItem(TQString::null, 1, 1, true);
mStatusBar->setItemAlignment(1, AlignLeft | AlignVCenter);
- QVBoxLayout *vBox = new QVBoxLayout(frame);
+ TQVBoxLayout *vBox = new TQVBoxLayout(frame);
vBox->addWidget(tabWidget, 0);
vBox->addWidget(win, 1);
vBox->addWidget(mStatusBar, 0);
- connect(this, SIGNAL(applyClicked()),
- this, SLOT(startSearch()));
- connect(this, SIGNAL(user1Clicked()),
- this, SLOT(stopSearch()));
- connect(this, SIGNAL(user2Clicked()),
- win, SLOT(saveResults()));
+ connect(this, TQT_SIGNAL(applyClicked()),
+ this, TQT_SLOT(startSearch()));
+ connect(this, TQT_SIGNAL(user1Clicked()),
+ this, TQT_SLOT(stopSearch()));
+ connect(this, TQT_SIGNAL(user2Clicked()),
+ win, TQT_SLOT(saveResults()));
- connect(win ,SIGNAL(resultSelected(bool)),
- this,SIGNAL(resultSelected(bool)));
+ connect(win ,TQT_SIGNAL(resultSelected(bool)),
+ this,TQT_SIGNAL(resultSelected(bool)));
query = new KQuery(frame);
- connect(query, SIGNAL(addFile(const KFileItem*,const QString&)),
- SLOT(addFile(const KFileItem*,const QString&)));
- connect(query, SIGNAL(result(int)), SLOT(slotResult(int)));
+ connect(query, TQT_SIGNAL(addFile(const KFileItem*,const TQString&)),
+ TQT_SLOT(addFile(const KFileItem*,const TQString&)));
+ connect(query, TQT_SIGNAL(result(int)), TQT_SLOT(slotResult(int)));
dirwatch=NULL;
}
@@ -85,18 +85,18 @@ KfindDlg::~KfindDlg()
stopSearch();
}
-void KfindDlg::closeEvent(QCloseEvent *)
+void KfindDlg::closeEvent(TQCloseEvent *)
{
stopSearch();
slotClose();
}
-void KfindDlg::setProgressMsg(const QString &msg)
+void KfindDlg::setProgressMsg(const TQString &msg)
{
mStatusBar->changeItem(msg, 1);
}
-void KfindDlg::setStatusMsg(const QString &msg)
+void KfindDlg::setStatusMsg(const TQString &msg)
{
mStatusBar->changeItem(msg, 0);
}
@@ -121,8 +121,8 @@ void KfindDlg::startSearch()
if(dirwatch!=NULL)
delete dirwatch;
dirwatch=new KDirWatch();
- connect(dirwatch, SIGNAL(created(const QString&)), this, SLOT(slotNewItems(const QString&)));
- connect(dirwatch, SIGNAL(deleted(const QString&)), this, SLOT(slotDeleteItem(const QString&)));
+ connect(dirwatch, TQT_SIGNAL(created(const TQString&)), this, TQT_SLOT(slotNewItems(const TQString&)));
+ connect(dirwatch, TQT_SIGNAL(deleted(const TQString&)), this, TQT_SLOT(slotDeleteItem(const TQString&)));
dirwatch->addDir(query->url().path(),true);
#if 0
@@ -140,8 +140,8 @@ void KfindDlg::startSearch()
//Getting a list of all subdirs
if(tabWidget->isSearchRecursive() && (dirwatch->internalMethod() == KDirWatch::FAM))
{
- QStringList subdirs=getAllSubdirs(query->url().path());
- for(QStringList::Iterator it = subdirs.begin(); it != subdirs.end(); ++it)
+ TQStringList subdirs=getAllSubdirs(query->url().path());
+ for(TQStringList::Iterator it = subdirs.begin(); it != subdirs.end(); ++it)
dirwatch->addDir(*it,true);
}
#endif
@@ -203,7 +203,7 @@ void KfindDlg::slotResult(int errorCode)
}
-void KfindDlg::addFile(const KFileItem* item, const QString& matchingLine)
+void KfindDlg::addFile(const KFileItem* item, const TQString& matchingLine)
{
win->insertItem(*item,matchingLine);
@@ -214,7 +214,7 @@ void KfindDlg::addFile(const KFileItem* item, const QString& matchingLine)
}
int count = win->childCount();
- QString str = i18n("one file found", "%n files found", count);
+ TQString str = i18n("one file found", "%n files found", count);
setProgressMsg(str);
}
@@ -234,11 +234,11 @@ void KfindDlg::about ()
dlg.exec ();
}
-void KfindDlg::slotDeleteItem(const QString& file)
+void KfindDlg::slotDeleteItem(const TQString& file)
{
- kdDebug()<<QString("Will remove one item: %1").arg(file)<<endl;
- QListViewItem *iter;
- QString iterwithpath;
+ kdDebug()<<TQString("Will remove one item: %1").arg(file)<<endl;
+ TQListViewItem *iter;
+ TQString iterwithpath;
iter=win->firstChild();
while( iter ) {
@@ -253,16 +253,16 @@ void KfindDlg::slotDeleteItem(const QString& file)
}
}
-void KfindDlg::slotNewItems( const QString& file )
+void KfindDlg::slotNewItems( const TQString& file )
{
- kdDebug()<<QString("Will add this item")<<endl;
- QStringList newfiles;
- QListViewItem *checkiter;
- QString checkiterwithpath;
+ kdDebug()<<TQString("Will add this item")<<endl;
+ TQStringList newfiles;
+ TQListViewItem *checkiter;
+ TQString checkiterwithpath;
if(file.find(query->url().path(+1))==0)
{
- kdDebug()<<QString("Can be added, path OK")<<endl;
+ kdDebug()<<TQString("Can be added, path OK")<<endl;
checkiter=win->firstChild();
while( checkiter ) {
checkiterwithpath=query->url().path(+1)+checkiter->text(1)+checkiter->text(0);
@@ -270,19 +270,19 @@ void KfindDlg::slotNewItems( const QString& file )
return;
checkiter = checkiter->nextSibling();
}
- query->slotListEntries(QStringList(file));
+ query->slotListEntries(TQStringList(file));
}
}
-QStringList KfindDlg::getAllSubdirs(QDir d)
+TQStringList KfindDlg::getAllSubdirs(TQDir d)
{
- QStringList dirs;
- QStringList subdirs;
+ TQStringList dirs;
+ TQStringList subdirs;
- d.setFilter( QDir::Dirs );
+ d.setFilter( TQDir::Dirs );
dirs = d.entryList();
- for(QStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it)
+ for(TQStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it)
{
if((*it==".")||(*it==".."))
continue;
diff --git a/kfind/kfinddlg.h b/kfind/kfinddlg.h
index dd1aa718c..be889007b 100644
--- a/kfind/kfinddlg.h
+++ b/kfind/kfinddlg.h
@@ -25,29 +25,29 @@ class KfindDlg: public KDialogBase
Q_OBJECT
public:
- KfindDlg(const KURL & url, QWidget * parent = 0, const char * name = 0);
+ KfindDlg(const KURL & url, TQWidget * parent = 0, const char * name = 0);
~KfindDlg();
void copySelection();
- void setStatusMsg(const QString &);
- void setProgressMsg(const QString &);
+ void setStatusMsg(const TQString &);
+ void setProgressMsg(const TQString &);
private:
- void closeEvent(QCloseEvent *);
- /*Return a QStringList of all subdirs of d*/
- QStringList getAllSubdirs(QDir d);
+ void closeEvent(TQCloseEvent *);
+ /*Return a TQStringList of all subdirs of d*/
+ TQStringList getAllSubdirs(TQDir d);
public slots:
void startSearch();
void stopSearch();
void newSearch();
- void addFile(const KFileItem* item, const QString& matchingLine);
+ void addFile(const KFileItem* item, const TQString& matchingLine);
void setFocus();
void slotResult(int);
// void slotSearchDone();
void about ();
- void slotDeleteItem(const QString&);
- void slotNewItems( const QString& );
+ void slotDeleteItem(const TQString&);
+ void slotNewItems( const TQString& );
signals:
void haveResults(bool);
diff --git a/kfind/kfindpart.cpp b/kfind/kfindpart.cpp
index 4f5d8043f..92082019f 100644
--- a/kfind/kfindpart.cpp
+++ b/kfind/kfindpart.cpp
@@ -25,7 +25,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kinstance.h>
class KonqDirPart;
@@ -33,9 +33,9 @@ class KonqDirPart;
typedef KParts::GenericFactory<KFindPart> KFindFactory;
K_EXPORT_COMPONENT_FACTORY( libkfindpart, KFindFactory )
-KFindPart::KFindPart( QWidget * parentWidget, const char *widgetName,
- QObject *parent, const char *name ,
- const QStringList & /*args*/ )
+KFindPart::KFindPart( TQWidget * parentWidget, const char *widgetName,
+ TQObject *parent, const char *name ,
+ const TQStringList & /*args*/ )
: KonqDirPart (parent, name )/*KParts::ReadOnlyPart*/
{
setInstance( KFindFactory::instance() );
@@ -46,25 +46,25 @@ KFindPart::KFindPart( QWidget * parentWidget, const char *widgetName,
m_kfindWidget = new Kfind( parentWidget, widgetName );
m_kfindWidget->setMaximumHeight(m_kfindWidget->minimumSizeHint().height());
const KFileItem *item = ((KonqDirPart*)parent)->currentItem();
- kdDebug() << "Kfind: currentItem: " << ( item ? item->url().path().local8Bit() : QString("null") ) << endl;
- QDir d;
+ kdDebug() << "Kfind: currentItem: " << ( item ? item->url().path().local8Bit() : TQString("null") ) << endl;
+ TQDir d;
if( item && d.exists( item->url().path() ))
m_kfindWidget->setURL( item->url() );
setWidget( m_kfindWidget );
- connect( m_kfindWidget, SIGNAL(started()),
- this, SLOT(slotStarted()) );
- connect( m_kfindWidget, SIGNAL(destroyMe()),
- this, SLOT(slotDestroyMe()) );
- connect(m_kfindWidget->dirlister,SIGNAL(deleteItem(KFileItem*)), this, SLOT(removeFile(KFileItem*)));
- connect(m_kfindWidget->dirlister,SIGNAL(newItems(const KFileItemList&)), this, SLOT(newFiles(const KFileItemList&)));
+ connect( m_kfindWidget, TQT_SIGNAL(started()),
+ this, TQT_SLOT(slotStarted()) );
+ connect( m_kfindWidget, TQT_SIGNAL(destroyMe()),
+ this, TQT_SLOT(slotDestroyMe()) );
+ connect(m_kfindWidget->dirlister,TQT_SIGNAL(deleteItem(KFileItem*)), this, TQT_SLOT(removeFile(KFileItem*)));
+ connect(m_kfindWidget->dirlister,TQT_SIGNAL(newItems(const KFileItemList&)), this, TQT_SLOT(newFiles(const KFileItemList&)));
//setXMLFile( "kfind.rc" );
query = new KQuery(this);
- connect(query, SIGNAL(addFile(const KFileItem *, const QString&)),
- SLOT(addFile(const KFileItem *, const QString&)));
- connect(query, SIGNAL(result(int)),
- SLOT(slotResult(int)));
+ connect(query, TQT_SIGNAL(addFile(const KFileItem *, const TQString&)),
+ TQT_SLOT(addFile(const KFileItem *, const TQString&)));
+ connect(query, TQT_SIGNAL(result(int)),
+ TQT_SLOT(slotResult(int)));
m_kfindWidget->setQuery(query);
m_bShowsResult = false;
@@ -96,7 +96,7 @@ void KFindPart::slotStarted()
emit clear();
}
-void KFindPart::addFile(const KFileItem *item, const QString& /*matchingLine*/)
+void KFindPart::addFile(const KFileItem *item, const TQString& /*matchingLine*/)
{
// item is deleted by caller
// we need to clone it
@@ -173,7 +173,7 @@ void KFindPart::slotDestroyMe()
emit findClosed();
}
-void KFindPart::saveState( QDataStream& stream )
+void KFindPart::saveState( TQDataStream& stream )
{
KonqDirPart::saveState(stream);
@@ -188,7 +188,7 @@ void KFindPart::saveState( QDataStream& stream )
}
}
-void KFindPart::restoreState( QDataStream& stream )
+void KFindPart::restoreState( TQDataStream& stream )
{
KonqDirPart::restoreState(stream);
int nbitems;
diff --git a/kfind/kfindpart.h b/kfind/kfindpart.h
index 29b133b99..9c20d0eae 100644
--- a/kfind/kfindpart.h
+++ b/kfind/kfindpart.h
@@ -24,7 +24,7 @@
#include <kparts/part.h>
#include <kfileitem.h>
#include <kdebug.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <konq_dirpart.h>
class KQuery;
@@ -44,8 +44,8 @@ class KFindPart : public KonqDirPart//KParts::ReadOnlyPart
Q_OBJECT
Q_PROPERTY( bool showsResult READ showsResult )
public:
- KFindPart( QWidget * parentWidget, const char *widgetName,
- QObject *parent, const char *name, const QStringList & /*args*/ );
+ KFindPart( TQWidget * parentWidget, const char *widgetName,
+ TQObject *parent, const char *name, const TQStringList & /*args*/ );
virtual ~KFindPart();
static KAboutData *createAboutData();
@@ -56,8 +56,8 @@ public:
bool showsResult() const { return m_bShowsResult; }
- virtual void saveState( QDataStream &stream );
- virtual void restoreState( QDataStream &stream );
+ virtual void saveState( TQDataStream &stream );
+ virtual void restoreState( TQDataStream &stream );
// "Cut" icons : disable those whose URL is in lst, enable the rest //added for konqdirpart
virtual void disableIcons( const KURL::List & ){};
@@ -76,7 +76,7 @@ signals:
protected slots:
void slotStarted();
void slotDestroyMe();
- void addFile(const KFileItem *item, const QString& matchingLine);
+ void addFile(const KFileItem *item, const TQString& matchingLine);
/* An item has been removed, so update konqueror's view */
void removeFile(KFileItem *item);
void slotResult(int errorCode);
@@ -98,7 +98,7 @@ private:
/**
* The internal storage of file items
*/
- QPtrList<KFileItem> m_lstFileItems;
+ TQPtrList<KFileItem> m_lstFileItems;
};
#endif
diff --git a/kfind/kftabdlg.cpp b/kfind/kftabdlg.cpp
index 7f8f73f96..3d7615afd 100644
--- a/kfind/kftabdlg.cpp
+++ b/kfind/kftabdlg.cpp
@@ -4,17 +4,17 @@
*
**********************************************************************/
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qapplication.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
+#include <tqpushbutton.h>
+#include <tqapplication.h>
#include <kcalendarsystem.h>
#include <kglobal.h>
@@ -31,15 +31,15 @@
#include "kftabdlg.h"
// Static utility functions
-static void save_pattern(QComboBox *, const QString &, const QString &);
+static void save_pattern(TQComboBox *, const TQString &, const TQString &);
#define SPECIAL_TYPES 7
-class KSortedMimeTypeList : public QPtrList<KMimeType>
+class KSortedMimeTypeList : public TQPtrList<KMimeType>
{
public:
KSortedMimeTypeList() { };
- int compareItems(QPtrCollection::Item s1, QPtrCollection::Item s2)
+ int compareItems(TQPtrCollection::Item s1, TQPtrCollection::Item s2)
{
KMimeType *item1 = (KMimeType *) s1;
KMimeType *item2 = (KMimeType *) s2;
@@ -49,27 +49,27 @@ public:
}
};
-KfindTabWidget::KfindTabWidget(QWidget *parent, const char *name)
- : QTabWidget( parent, name ), regExpDialog(0)
+KfindTabWidget::KfindTabWidget(TQWidget *parent, const char *name)
+ : TQTabWidget( parent, name ), regExpDialog(0)
{
// This validator will be used for all numeric edit fields
//KDigitValidator *digitV = new KDigitValidator(this);
// ************ Page One ************
- pages[0] = new QWidget( this, "page1" );
+ pages[0] = new TQWidget( this, "page1" );
nameBox = new KComboBox(TRUE, pages[0], "combo1");
- nameBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); // allow smaller than widest entry
- QLabel * namedL = new QLabel(nameBox, i18n("&Named:"), pages[0], "named");
- QToolTip::add( namedL, i18n("You can use wildcard matching and \";\" for separating multiple names") );
+ nameBox->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); // allow smaller than widest entry
+ TQLabel * namedL = new TQLabel(nameBox, i18n("&Named:"), pages[0], "named");
+ TQToolTip::add( namedL, i18n("You can use wildcard matching and \";\" for separating multiple names") );
dirBox = new KComboBox(TRUE, pages[0], "combo2");
- dirBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); // allow smaller than widest entry
- QLabel * lookinL = new QLabel(dirBox, i18n("Look &in:"), pages[0], "named");
- subdirsCb = new QCheckBox(i18n("Include &subfolders"), pages[0]);
- caseSensCb = new QCheckBox(i18n("Case s&ensitive search"), pages[0]);
- browseB = new QPushButton(i18n("&Browse..."), pages[0]);
- useLocateCb = new QCheckBox(i18n("&Use files index"), pages[0]);
+ dirBox->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); // allow smaller than widest entry
+ TQLabel * lookinL = new TQLabel(dirBox, i18n("Look &in:"), pages[0], "named");
+ subdirsCb = new TQCheckBox(i18n("Include &subfolders"), pages[0]);
+ caseSensCb = new TQCheckBox(i18n("Case s&ensitive search"), pages[0]);
+ browseB = new TQPushButton(i18n("&Browse..."), pages[0]);
+ useLocateCb = new TQCheckBox(i18n("&Use files index"), pages[0]);
// Setup
@@ -83,10 +83,10 @@ KfindTabWidget::KfindTabWidget(QWidget *parent, const char *name)
nameBox->setFocus();
dirBox->setDuplicatesEnabled(FALSE);
- nameBox->setInsertionPolicy(QComboBox::AtTop);
- dirBox->setInsertionPolicy(QComboBox::AtTop);
+ nameBox->setInsertionPolicy(TQComboBox::AtTop);
+ dirBox->setInsertionPolicy(TQComboBox::AtTop);
- const QString nameWhatsThis
+ const TQString nameWhatsThis
= i18n("<qt>Enter the filename you are looking for. <br>"
"Alternatives may be separated by a semicolon \";\".<br>"
"<br>"
@@ -105,21 +105,21 @@ KfindTabWidget::KfindTabWidget(QWidget *parent, const char *name)
"having one character in between</li>"
"<li><b>My Document.kwd</b> finds a file of exactly that name</li>"
"</ul></qt>");
- QWhatsThis::add(nameBox,nameWhatsThis);
- QWhatsThis::add(namedL,nameWhatsThis);
- const QString whatsfileindex
+ TQWhatsThis::add(nameBox,nameWhatsThis);
+ TQWhatsThis::add(namedL,nameWhatsThis);
+ const TQString whatsfileindex
= i18n("<qt>This lets you use the files' index created by the <i>slocate</i> "
"package to speed-up the search; remember to update the index from time to time "
"(using <i>updatedb</i>)."
"</qt>");
- QWhatsThis::add(useLocateCb,whatsfileindex);
+ TQWhatsThis::add(useLocateCb,whatsfileindex);
// Layout
- QGridLayout *grid = new QGridLayout( pages[0], 3, 2,
+ TQGridLayout *grid = new TQGridLayout( pages[0], 3, 2,
KDialog::marginHint(),
KDialog::spacingHint() );
- QBoxLayout *subgrid = new QVBoxLayout( -1 , "subgrid" );
+ TQBoxLayout *subgrid = new TQVBoxLayout( -1 , "subgrid" );
grid->addWidget( namedL, 0, 0 );
grid->addMultiCellWidget( nameBox, 0, 0, 1, 2 );
grid->addWidget( lookinL, 1, 0 );
@@ -134,21 +134,21 @@ KfindTabWidget::KfindTabWidget(QWidget *parent, const char *name)
// Signals
- connect( browseB, SIGNAL(clicked()),
- this, SLOT(getDirectory()) );
+ connect( browseB, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(getDirectory()) );
- connect( nameBox, SIGNAL(activated(int)),
- this, SIGNAL(startSearch()));
+ connect( nameBox, TQT_SIGNAL(activated(int)),
+ this, TQT_SIGNAL(startSearch()));
// ************ Page Two
- pages[1] = new QWidget( this, "page2" );
+ pages[1] = new TQWidget( this, "page2" );
- findCreated = new QCheckBox(i18n("Find all files created or &modified:"), pages[1]);
- bg = new QButtonGroup();
- rb[0] = new QRadioButton(i18n("&between"), pages[1] );
- rb[1] = new QRadioButton(i18n("&during the previous"), pages[1] );
- QLabel * andL = new QLabel(i18n("and"), pages[1], "and");
+ findCreated = new TQCheckBox(i18n("Find all files created or &modified:"), pages[1]);
+ bg = new TQButtonGroup();
+ rb[0] = new TQRadioButton(i18n("&between"), pages[1] );
+ rb[1] = new TQRadioButton(i18n("&during the previous"), pages[1] );
+ TQLabel * andL = new TQLabel(i18n("and"), pages[1], "and");
betweenType = new KComboBox(FALSE, pages[1], "comboBetweenType");
betweenType->insertItem(i18n("minute(s)"));
betweenType->insertItem(i18n("hour(s)"));
@@ -158,22 +158,22 @@ KfindTabWidget::KfindTabWidget(QWidget *parent, const char *name)
betweenType->setCurrentItem(1);
- QDate dt = KGlobal::locale()->calendar()->addYears(QDate::currentDate(), -1);
+ TQDate dt = KGlobal::locale()->calendar()->addYears(TQDate::currentDate(), -1);
fromDate = new KDateCombo(dt, pages[1], "fromDate");
toDate = new KDateCombo(pages[1], "toDate");
- timeBox = new QSpinBox(1, 60, 1, pages[1], "timeBox");
+ timeBox = new TQSpinBox(1, 60, 1, pages[1], "timeBox");
sizeBox =new KComboBox(FALSE, pages[1], "sizeBox");
- QLabel * sizeL =new QLabel(sizeBox,i18n("File &size is:"), pages[1],"size");
- sizeEdit=new QSpinBox(0, INT_MAX, 1, pages[1], "sizeEdit" );
+ TQLabel * sizeL =new TQLabel(sizeBox,i18n("File &size is:"), pages[1],"size");
+ sizeEdit=new TQSpinBox(0, INT_MAX, 1, pages[1], "sizeEdit" );
sizeEdit->setValue(1);
sizeUnitBox =new KComboBox(FALSE, pages[1], "sizeUnitBox");
m_usernameBox = new KComboBox( true, pages[1], "m_combo1");
- QLabel *usernameLabel= new QLabel(m_usernameBox,i18n("Files owned by &user:"),pages[1]);
+ TQLabel *usernameLabel= new TQLabel(m_usernameBox,i18n("Files owned by &user:"),pages[1]);
m_groupBox = new KComboBox( true, pages[1], "m_combo2");
- QLabel *groupLabel= new QLabel(m_groupBox,i18n("Owned by &group:"),pages[1]);
+ TQLabel *groupLabel= new TQLabel(m_groupBox,i18n("Owned by &group:"),pages[1]);
sizeBox ->insertItem( i18n("(none)") );
sizeBox ->insertItem( i18n("At Least") );
@@ -191,19 +191,19 @@ KfindTabWidget::KfindTabWidget(QWidget *parent, const char *name)
m_usernameBox->setDuplicatesEnabled(FALSE);
m_groupBox->setDuplicatesEnabled(FALSE);
- m_usernameBox->setInsertionPolicy(QComboBox::AtTop);
- m_groupBox->setInsertionPolicy(QComboBox::AtTop);
+ m_usernameBox->setInsertionPolicy(TQComboBox::AtTop);
+ m_groupBox->setInsertionPolicy(TQComboBox::AtTop);
// Setup
- timeBox->setButtonSymbols(QSpinBox::PlusMinus);
+ timeBox->setButtonSymbols(TQSpinBox::PlusMinus);
rb[0]->setChecked(true);
bg->insert( rb[0] );
bg->insert( rb[1] );
// Layout
- QGridLayout *grid1 = new QGridLayout( pages[1], 5, 6,
+ TQGridLayout *grid1 = new TQGridLayout( pages[1], 5, 6,
KDialog::marginHint(),
KDialog::spacingHint() );
@@ -235,52 +235,52 @@ KfindTabWidget::KfindTabWidget(QWidget *parent, const char *name)
grid1->setRowStretch(6,1);
// Connect
- connect( findCreated, SIGNAL(toggled(bool)), SLOT(fixLayout()) );
- connect( bg, SIGNAL(clicked(int)), this, SLOT(fixLayout()) );
- connect( sizeBox, SIGNAL(highlighted(int)), this, SLOT(slotSizeBoxChanged(int)));
+ connect( findCreated, TQT_SIGNAL(toggled(bool)), TQT_SLOT(fixLayout()) );
+ connect( bg, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(fixLayout()) );
+ connect( sizeBox, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotSizeBoxChanged(int)));
// ************ Page Three
- pages[2] = new QWidget( this, "page3" );
+ pages[2] = new TQWidget( this, "page3" );
typeBox =new KComboBox(FALSE, pages[2], "typeBox");
- typeBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); // allow smaller than widest entry
- QLabel * typeL =new QLabel(typeBox, i18n("File &type:"), pages[2], "type");
+ typeBox->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); // allow smaller than widest entry
+ TQLabel * typeL =new TQLabel(typeBox, i18n("File &type:"), pages[2], "type");
textEdit=new KLineEdit(pages[2], "textEdit" );
- QLabel * textL =new QLabel(textEdit, i18n("C&ontaining text:"), pages[2], "text");
+ TQLabel * textL =new TQLabel(textEdit, i18n("C&ontaining text:"), pages[2], "text");
- connect( textEdit, SIGNAL(returnPressed(const QString &)), SIGNAL( startSearch()));
+ connect( textEdit, TQT_SIGNAL(returnPressed(const TQString &)), TQT_SIGNAL( startSearch()));
- const QString containingtext
+ const TQString containingtext
= i18n("<qt>If specified, only files that contain this text"
" are found. Note that not all file types from the list"
" above are supported. Please refer to the documentation"
" for a list of supported file types."
"</qt>");
- QToolTip::add(textEdit,containingtext);
- QWhatsThis::add(textL,containingtext);
+ TQToolTip::add(textEdit,containingtext);
+ TQWhatsThis::add(textL,containingtext);
- caseContextCb =new QCheckBox(i18n("Case s&ensitive"), pages[2]);
- binaryContextCb =new QCheckBox(i18n("Include &binary files"), pages[2]);
- regexpContentCb =new QCheckBox(i18n("Regular e&xpression"), pages[2]);
+ caseContextCb =new TQCheckBox(i18n("Case s&ensitive"), pages[2]);
+ binaryContextCb =new TQCheckBox(i18n("Include &binary files"), pages[2]);
+ regexpContentCb =new TQCheckBox(i18n("Regular e&xpression"), pages[2]);
- const QString binaryTooltip
+ const TQString binaryTooltip
= i18n("<qt>This lets you search in any type of file, "
"even those that usually do not contain text (for example "
"program files and images).</qt>");
- QToolTip::add(binaryContextCb,binaryTooltip);
+ TQToolTip::add(binaryContextCb,binaryTooltip);
- QPushButton* editRegExp = 0;
+ TQPushButton* editRegExp = 0;
if ( !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty() ) {
// The editor is available, so lets use it.
- editRegExp = new QPushButton(i18n("&Edit..."), pages[2], "editRegExp");
+ editRegExp = new TQPushButton(i18n("&Edit..."), pages[2], "editRegExp");
}
metainfokeyEdit=new KLineEdit(pages[2], "textEdit" );
metainfoEdit=new KLineEdit(pages[2], "textEdit" );
- QLabel * textMetaInfo = new QLabel(metainfoEdit, i18n("fo&r:"), pages[2], "text");
- QLabel * textMetaKey = new QLabel(metainfokeyEdit, i18n("Search &metainfo sections:"), pages[2], "text");
+ TQLabel * textMetaInfo = new TQLabel(metainfoEdit, i18n("fo&r:"), pages[2], "text");
+ TQLabel * textMetaKey = new TQLabel(metainfokeyEdit, i18n("Search &metainfo sections:"), pages[2], "text");
// Setup
typeBox->insertItem(i18n("All Files & Folders"));
@@ -306,9 +306,9 @@ KfindTabWidget::KfindTabWidget(QWidget *parent, const char *name)
if ( editRegExp ) {
// The editor was available, so lets use it.
- connect( regexpContentCb, SIGNAL(toggled(bool) ), editRegExp, SLOT(setEnabled(bool)) );
+ connect( regexpContentCb, TQT_SIGNAL(toggled(bool) ), editRegExp, TQT_SLOT(setEnabled(bool)) );
editRegExp->setEnabled(false);
- connect( editRegExp, SIGNAL(clicked()), this, SLOT( slotEditRegExp() ) );
+ connect( editRegExp, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotEditRegExp() ) );
}
else
regexpContentCb->hide();
@@ -317,7 +317,7 @@ KfindTabWidget::KfindTabWidget(QWidget *parent, const char *name)
tmp = sizeEdit->fontMetrics().width(" 00000 ");
sizeEdit->setMinimumSize(tmp, sizeEdit->sizeHint().height());
- QGridLayout *grid2 = new QGridLayout( pages[2], 5, 4,
+ TQGridLayout *grid2 = new TQGridLayout( pages[2], 5, 4,
KDialog::marginHint(),
KDialog::spacingHint() );
grid2->addWidget( typeL, 0, 0 );
@@ -346,7 +346,7 @@ KfindTabWidget::KfindTabWidget(QWidget *parent, const char *name)
// Setup
- const QString whatsmetainfo
+ const TQString whatsmetainfo
= i18n("<qt>Search within files' specific comments/metainfo<br>"
"These are some examples:<br>"
"<ul>"
@@ -354,17 +354,17 @@ KfindTabWidget::KfindTabWidget(QWidget *parent, const char *name)
"<li><b>Images (png...)</b> Search images with a special resolution, comment...</li>"
"</ul>"
"</qt>");
- const QString whatsmetainfokey
+ const TQString whatsmetainfokey
= i18n("<qt>If specified, search only in this field<br>"
"<ul>"
"<li><b>Audio files (mp3...)</b> This can be Title, Album...</li>"
"<li><b>Images (png...)</b> Search only in Resolution, Bitdepth...</li>"
"</ul>"
"</qt>");
- QWhatsThis::add(textMetaInfo,whatsmetainfo);
- QToolTip::add(metainfoEdit,whatsmetainfo);
- QWhatsThis::add(textMetaKey,whatsmetainfokey);
- QToolTip::add(metainfokeyEdit,whatsmetainfokey);
+ TQWhatsThis::add(textMetaInfo,whatsmetainfo);
+ TQToolTip::add(metainfoEdit,whatsmetainfo);
+ TQWhatsThis::add(textMetaKey,whatsmetainfokey);
+ TQToolTip::add(metainfokeyEdit,whatsmetainfokey);
fixLayout();
@@ -383,7 +383,7 @@ void KfindTabWidget::setURL( const KURL & url )
KConfig *conf = KGlobal::config();
conf->setGroup("History");
m_url = url;
- QStringList sl = conf->readPathListEntry("Directories");
+ TQStringList sl = conf->readPathListEntry("Directories");
dirBox->clear(); // make sure there is no old Stuff in there
if(!sl.isEmpty()) {
@@ -397,9 +397,9 @@ void KfindTabWidget::setURL( const KURL & url )
dirBox->setCurrentItem(indx);
}
else {
- QDir m_dir("/lib");
+ TQDir m_dir("/lib");
dirBox ->insertItem( m_url.prettyURL() );
- dirBox ->insertItem( "file:" + QDir::homeDirPath() );
+ dirBox ->insertItem( "file:" + TQDir::homeDirPath() );
dirBox ->insertItem( "file:/" );
dirBox ->insertItem( "file:/usr" );
if (m_dir.exists())
@@ -461,7 +461,7 @@ void KfindTabWidget::loadHistory()
// Load pattern history
KConfig *conf = KGlobal::config();
conf->setGroup("History");
- QStringList sl = conf->readListEntry("Patterns");
+ TQStringList sl = conf->readListEntry("Patterns");
if(!sl.isEmpty())
nameBox->insertStringList(sl);
else
@@ -479,9 +479,9 @@ void KfindTabWidget::loadHistory()
dirBox->setCurrentItem(indx);
}
else {
- QDir m_dir("/lib");
+ TQDir m_dir("/lib");
dirBox ->insertItem( m_url.prettyURL() );
- dirBox ->insertItem( "file:" + QDir::homeDirPath() );
+ dirBox ->insertItem( "file:" + TQDir::homeDirPath() );
dirBox ->insertItem( "file:/" );
dirBox ->insertItem( "file:/usr" );
if (m_dir.exists())
@@ -496,7 +496,7 @@ void KfindTabWidget::loadHistory()
void KfindTabWidget::slotEditRegExp()
{
if ( ! regExpDialog )
- regExpDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor", QString::null, this );
+ regExpDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor", TQString::null, this );
KRegExpEditorInterface *iface = static_cast<KRegExpEditorInterface *>( regExpDialog->qt_cast( "KRegExpEditorInterface" ) );
if ( !iface )
@@ -522,10 +522,10 @@ void KfindTabWidget::slotSizeBoxChanged(int index)
void KfindTabWidget::setDefaults()
{
- QDate dt = KGlobal::locale()->calendar()->addYears(QDate::currentDate(), -1);
+ TQDate dt = KGlobal::locale()->calendar()->addYears(TQDate::currentDate(), -1);
fromDate ->setDate(dt);
- toDate ->setDate(QDate::currentDate());
+ toDate ->setDate(TQDate::currentDate());
timeBox->setValue(1);
betweenType->setCurrentItem(1);
@@ -555,15 +555,15 @@ bool KfindTabWidget::isDateValid()
// If we can not parse either of the dates or
// "from" date is bigger than "to" date return FALSE.
- QDate hi1, hi2;
+ TQDate hi1, hi2;
- QString str;
+ TQString str;
if ( ! fromDate->getDate(&hi1).isValid() ||
! toDate->getDate(&hi2).isValid() )
str = i18n("The date is not valid.");
else if ( hi1 > hi2 )
str = i18n("Invalid date range.");
- else if ( QDate::currentDate() < hi1 )
+ else if ( TQDate::currentDate() < hi1 )
str = i18n("Unable to search dates in the future.");
if (!str.isNull()) {
@@ -590,7 +590,7 @@ void KfindTabWidget::setQuery(KQuery *query)
if (!itemAlreadyContained)
dirBox->insertItem(dirBox->currentText().stripWhiteSpace(),0);
- QString regex = nameBox->currentText().isEmpty() ? "*" : nameBox->currentText();
+ TQString regex = nameBox->currentText().isEmpty() ? "*" : nameBox->currentText();
query->setRegExp(regex, caseSensCb->isChecked());
itemAlreadyContained=false;
for (int idx=0; idx<nameBox->count(); idx++)
@@ -640,13 +640,13 @@ void KfindTabWidget::setQuery(KQuery *query)
query->setSizeRange(sizeBox->currentItem(),size,0);
// dates
- QDateTime epoch;
+ TQDateTime epoch;
epoch.setTime_t(0);
// Add date predicate
if (findCreated->isChecked()) { // Modified
if (rb[0]->isChecked()) { // Between dates
- QDate q1, q2;
+ TQDate q1, q2;
fromDate->getDate(&q1);
toDate->getDate(&q2);
@@ -712,7 +712,7 @@ void KfindTabWidget::setQuery(KQuery *query)
}
else
{
- query->setMimeType( QString::null );
+ query->setMimeType( TQString::null );
}
//Metainfo
@@ -725,17 +725,17 @@ void KfindTabWidget::setQuery(KQuery *query)
binaryContextCb->isChecked(), regexpContentCb->isChecked());
}
-QString KfindTabWidget::date2String(const QDate & date) {
+TQString KfindTabWidget::date2String(const TQDate & date) {
return(KGlobal::locale()->formatDate(date, true));
}
-QDate &KfindTabWidget::string2Date(const QString & str, QDate *qd) {
+TQDate &KfindTabWidget::string2Date(const TQString & str, TQDate *qd) {
return *qd = KGlobal::locale()->readDate(str);
}
void KfindTabWidget::getDirectory()
{
- QString result =
+ TQString result =
KFileDialog::getExistingDirectory( dirBox->text(dirBox->currentItem()).stripWhiteSpace(),
this );
@@ -806,10 +806,10 @@ bool KfindTabWidget::isSearchRecursive()
/**
Digit validator. Allows only digits to be typed.
**/
-KDigitValidator::KDigitValidator( QWidget * parent, const char *name )
- : QValidator( parent, name )
+KDigitValidator::KDigitValidator( TQWidget * parent, const char *name )
+ : TQValidator( parent, name )
{
- r = new QRegExp("^[0-9]*$");
+ r = new TQRegExp("^[0-9]*$");
}
KDigitValidator::~KDigitValidator()
@@ -817,31 +817,31 @@ KDigitValidator::~KDigitValidator()
delete r;
}
-QValidator::State KDigitValidator::validate( QString & input, int & ) const
+TQValidator::State KDigitValidator::validate( TQString & input, int & ) const
{
if (r->search(input) < 0) {
// Beep on user if he enters non-digit
- QApplication::beep();
- return QValidator::Invalid;
+ TQApplication::beep();
+ return TQValidator::Invalid;
}
else
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
}
//*******************************************************
// Static utility functions
//*******************************************************
-static void save_pattern(QComboBox *obj,
- const QString & group, const QString & entry)
+static void save_pattern(TQComboBox *obj,
+ const TQString & group, const TQString & entry)
{
- // QComboBox allows insertion of items more than specified by
+ // TQComboBox allows insertion of items more than specified by
// maxCount() (QT bug?). This API call will truncate list if needed.
obj->setMaxCount(15);
// make sure the current item is saved first so it will be the
// default when started next time
- QStringList sl;
- QString cur = obj->currentText();
+ TQStringList sl;
+ TQString cur = obj->currentText();
sl.append(cur);
for (int i = 0; i < obj->count(); i++) {
if( cur != obj->text(i) ) {
@@ -854,13 +854,13 @@ static void save_pattern(QComboBox *obj,
conf->writePathEntry(entry, sl);
}
-QSize KfindTabWidget::sizeHint() const
+TQSize KfindTabWidget::sizeHint() const
{
// #44662: avoid a huge default size when the comboboxes have very large items
// Like in minicli, we changed the combobox size policy so that they can resize down,
// and then we simply provide a reasonable size hint for the whole window, depending
// on the screen width.
- QSize sz = QTabWidget::sizeHint();
+ TQSize sz = TQTabWidget::sizeHint();
KfindTabWidget* me = const_cast<KfindTabWidget*>( this );
const int screenWidth = qApp->desktop()->screenGeometry(me).width();
if ( sz.width() > screenWidth / 2 )
diff --git a/kfind/kftabdlg.h b/kfind/kftabdlg.h
index 3ead70c99..179819dff 100644
--- a/kfind/kftabdlg.h
+++ b/kfind/kftabdlg.h
@@ -7,8 +7,8 @@
#ifndef KFTABDLG_H
#define KFTABDLG_H
-#include <qtabwidget.h>
-#include <qvalidator.h> // for KDigitValidator
+#include <tqtabwidget.h>
+#include <tqvalidator.h> // for KDigitValidator
#include <kurl.h>
#include <kmimetype.h>
@@ -34,7 +34,7 @@ class KfindTabWidget: public QTabWidget
Q_OBJECT
public:
- KfindTabWidget(QWidget * parent = 0, const char *name=0);
+ KfindTabWidget(TQWidget * parent = 0, const char *name=0);
virtual ~KfindTabWidget();
void initMimeTypes();
void initSpecialMimeTypes();
@@ -49,7 +49,7 @@ public:
void setURL( const KURL & url );
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
public slots:
void setFocus();
@@ -65,58 +65,58 @@ signals:
protected:
public:
- QComboBox *nameBox;
- QComboBox *dirBox;
+ TQComboBox *nameBox;
+ TQComboBox *dirBox;
// for first page
- QCheckBox *subdirsCb;
- QCheckBox *useLocateCb;
+ TQCheckBox *subdirsCb;
+ TQCheckBox *useLocateCb;
// for third page
- QComboBox *typeBox;
- QLineEdit * textEdit;
- QCheckBox *caseSensCb;
- QComboBox *m_usernameBox;
- QComboBox *m_groupBox;
+ TQComboBox *typeBox;
+ TQLineEdit * textEdit;
+ TQCheckBox *caseSensCb;
+ TQComboBox *m_usernameBox;
+ TQComboBox *m_groupBox;
//for fourth page
- QLineEdit *metainfoEdit;
- QLineEdit *metainfokeyEdit;
+ TQLineEdit *metainfoEdit;
+ TQLineEdit *metainfokeyEdit;
private:
bool isDateValid();
- QString date2String(const QDate &);
- QDate &string2Date(const QString &, QDate * );
+ TQString date2String(const TQDate &);
+ TQDate &string2Date(const TQString &, TQDate * );
- QWidget *pages[3];
+ TQWidget *pages[3];
//1st page
- QPushButton *browseB;
+ TQPushButton *browseB;
KfDirDialog *dirselector;
//2nd page
- QCheckBox *findCreated;
- QComboBox *betweenType;
- QButtonGroup *bg;
- QRadioButton *rb[2];
+ TQCheckBox *findCreated;
+ TQComboBox *betweenType;
+ TQButtonGroup *bg;
+ TQRadioButton *rb[2];
KDateCombo * fromDate;
KDateCombo * toDate;
- QSpinBox *timeBox;
+ TQSpinBox *timeBox;
//3rd page
- QComboBox *sizeBox;
- QComboBox *sizeUnitBox;
- QSpinBox *sizeEdit;
- QCheckBox *caseContextCb;
- QCheckBox *binaryContextCb;
- QCheckBox *regexpContentCb;
- QDialog *regExpDialog;
+ TQComboBox *sizeBox;
+ TQComboBox *sizeUnitBox;
+ TQSpinBox *sizeEdit;
+ TQCheckBox *caseContextCb;
+ TQCheckBox *binaryContextCb;
+ TQCheckBox *regexpContentCb;
+ TQDialog *regExpDialog;
KURL m_url;
KMimeType::List m_types;
- QStringList m_ImageTypes;
- QStringList m_VideoTypes;
- QStringList m_AudioTypes;
+ TQStringList m_ImageTypes;
+ TQStringList m_VideoTypes;
+ TQStringList m_AudioTypes;
};
class KDigitValidator : public QValidator
@@ -124,13 +124,13 @@ class KDigitValidator : public QValidator
Q_OBJECT
public:
- KDigitValidator(QWidget * parent, const char *name = 0 );
+ KDigitValidator(TQWidget * parent, const char *name = 0 );
~KDigitValidator();
- QValidator::State validate(QString & input, int &) const;
+ TQValidator::State validate(TQString & input, int &) const;
private:
- QRegExp *r;
+ TQRegExp *r;
};
#endif
diff --git a/kfind/kfwin.cpp b/kfind/kfwin.cpp
index 9eca22f19..2ee69aa14 100644
--- a/kfind/kfwin.cpp
+++ b/kfind/kfwin.cpp
@@ -14,12 +14,12 @@
#include <sys/stat.h>
#include <time.h>
-#include <qtextstream.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qclipboard.h>
-#include <qpixmap.h>
-#include <qdragobject.h>
+#include <tqtextstream.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqclipboard.h>
+#include <tqpixmap.h>
+#include <tqdragobject.h>
#include <kfiledialog.h>
#include <klocale.h>
@@ -34,7 +34,7 @@
#include <kpopupmenu.h>
#include <kio/netaccess.h>
#include <kurldrag.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -42,7 +42,7 @@
#include "kfwin.moc"
-template class QPtrList<KfFileLVI>;
+template class TQPtrList<KfFileLVI>;
// Permission strings
static const char* perm[4] = {
@@ -55,17 +55,17 @@ static const char* perm[4] = {
#define WO 2
#define NA 3
-KfFileLVI::KfFileLVI(KfindWindow* lv, const KFileItem &item, const QString& matchingLine)
- : QListViewItem(lv),
+KfFileLVI::KfFileLVI(KfindWindow* lv, const KFileItem &item, const TQString& matchingLine)
+ : TQListViewItem(lv),
fileitem(item)
{
- fileInfo = new QFileInfo(item.url().path());
+ fileInfo = new TQFileInfo(item.url().path());
- QString size = KGlobal::locale()->formatNumber(item.size(), 0);
+ TQString size = KGlobal::locale()->formatNumber(item.size(), 0);
- QDateTime dt;
+ TQDateTime dt;
dt.setTime_t(item.time(KIO::UDS_MODIFICATION_TIME));
- QString date = KGlobal::locale()->formatDateTime(dt);
+ TQString date = KGlobal::locale()->formatDateTime(dt);
int perm_index;
if(fileInfo->isReadable())
@@ -90,26 +90,26 @@ KfFileLVI::~KfFileLVI()
delete fileInfo;
}
-QString KfFileLVI::key(int column, bool) const
+TQString KfFileLVI::key(int column, bool) const
{
switch (column) {
case 2:
// Returns size in bytes. Used for sorting
- return QString().sprintf("%010d", fileInfo->size());
+ return TQString().sprintf("%010d", fileInfo->size());
case 3:
// Returns time in secs from 1/1/1970. Used for sorting
- return QString().sprintf("%010ld", fileitem.time(KIO::UDS_MODIFICATION_TIME));
+ return TQString().sprintf("%010ld", fileitem.time(KIO::UDS_MODIFICATION_TIME));
}
return text(column);
}
-KfindWindow::KfindWindow( QWidget *parent, const char *name )
+KfindWindow::KfindWindow( TQWidget *parent, const char *name )
: KListView( parent, name )
,m_baseDir("")
,m_menu(0)
{
- setSelectionMode( QListView::Extended );
+ setSelectionMode( TQListView::Extended );
setShowSortIndicator( TRUE );
addColumn(i18n("Name"));
@@ -131,24 +131,24 @@ KfindWindow::KfindWindow( QWidget *parent, const char *name )
resetColumns(true);
- connect( this, SIGNAL(selectionChanged()),
- this, SLOT( selectionHasChanged() ));
+ connect( this, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT( selectionHasChanged() ));
- connect(this, SIGNAL(contextMenu(KListView *, QListViewItem*,const QPoint&)),
- this, SLOT(slotContextMenu(KListView *,QListViewItem*,const QPoint&)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView *, TQListViewItem*,const TQPoint&)),
+ this, TQT_SLOT(slotContextMenu(KListView *,TQListViewItem*,const TQPoint&)));
- connect(this, SIGNAL(executed(QListViewItem*)),
- this, SLOT(slotExecute(QListViewItem*)));
+ connect(this, TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(slotExecute(TQListViewItem*)));
setDragEnabled(true);
}
-QString KfindWindow::reducedDir(const QString& fullDir)
+TQString KfindWindow::reducedDir(const TQString& fullDir)
{
if (fullDir.find(m_baseDir)==0)
{
- QString tmp=fullDir.mid(m_baseDir.length());
+ TQString tmp=fullDir.mid(m_baseDir.length());
return tmp;
};
return fullDir;
@@ -156,7 +156,7 @@ QString KfindWindow::reducedDir(const QString& fullDir)
void KfindWindow::beginSearch(const KURL& baseUrl)
{
- kdDebug()<<QString("beginSearch in: %1").arg(baseUrl.path())<<endl;
+ kdDebug()<<TQString("beginSearch in: %1").arg(baseUrl.path())<<endl;
m_baseDir=baseUrl.path(+1);
haveSelection = false;
clear();
@@ -166,7 +166,7 @@ void KfindWindow::endSearch()
{
}
-void KfindWindow::insertItem(const KFileItem &item, const QString& matchingLine)
+void KfindWindow::insertItem(const KFileItem &item, const TQString& matchingLine)
{
new KfFileLVI(this, item, matchingLine);
}
@@ -174,7 +174,7 @@ void KfindWindow::insertItem(const KFileItem &item, const QString& matchingLine)
// copy to clipboard aka X11 selection
void KfindWindow::copySelection()
{
- QDragObject *drag_obj = dragObject();
+ TQDragObject *drag_obj = dragObject();
if (drag_obj)
{
@@ -185,21 +185,21 @@ void KfindWindow::copySelection()
void KfindWindow::saveResults()
{
- QListViewItem *item;
+ TQListViewItem *item;
- KFileDialog *dlg = new KFileDialog(QString::null, QString::null, this,
+ KFileDialog *dlg = new KFileDialog(TQString::null, TQString::null, this,
"filedialog", true);
dlg->setOperationMode (KFileDialog::Saving);
dlg->setCaption(i18n("Save Results As"));
- QStringList list;
+ TQStringList list;
list << "text/plain" << "text/html";
dlg->setOperationMode(KFileDialog::Saving);
- dlg->setMimeFilter(list, QString("text/plain"));
+ dlg->setMimeFilter(list, TQString("text/plain"));
dlg->exec();
@@ -210,19 +210,19 @@ void KfindWindow::saveResults()
if (!u.isValid() || !u.isLocalFile())
return;
- QString filename = u.path();
+ TQString filename = u.path();
- QFile file(filename);
+ TQFile file(filename);
if ( !file.open(IO_WriteOnly) )
KMessageBox::error(parentWidget(),
i18n("Unable to save results."));
else {
- QTextStream stream( &file );
- stream.setEncoding( QTextStream::Locale );
+ TQTextStream stream( &file );
+ stream.setEncoding( TQTextStream::Locale );
if ( mimeType->name() == "text/html") {
- stream << QString::fromLatin1("<HTML><HEAD>\n"
+ stream << TQString::fromLatin1("<HTML><HEAD>\n"
"<!DOCTYPE %1>\n"
"<TITLE>%2</TITLE></HEAD>\n"
"<BODY><H1>%3</H1>"
@@ -234,21 +234,21 @@ void KfindWindow::saveResults()
item = firstChild();
while(item != NULL)
{
- QString path=((KfFileLVI*)item)->fileitem.url().url();
- QString pretty=((KfFileLVI*)item)->fileitem.url().htmlURL();
- stream << QString::fromLatin1("<DT><A HREF=\"") << path
- << QString::fromLatin1("\">") << pretty
- << QString::fromLatin1("</A>\n");
+ TQString path=((KfFileLVI*)item)->fileitem.url().url();
+ TQString pretty=((KfFileLVI*)item)->fileitem.url().htmlURL();
+ stream << TQString::fromLatin1("<DT><A HREF=\"") << path
+ << TQString::fromLatin1("\">") << pretty
+ << TQString::fromLatin1("</A>\n");
item = item->nextSibling();
}
- stream << QString::fromLatin1("</DL><P></BODY></HTML>\n");
+ stream << TQString::fromLatin1("</DL><P></BODY></HTML>\n");
}
else {
item = firstChild();
while(item != NULL)
{
- QString path=((KfFileLVI*)item)->fileitem.url().url();
+ TQString path=((KfFileLVI*)item)->fileitem.url().url();
stream << path << endl;
item = item->nextSibling();
}
@@ -267,7 +267,7 @@ void KfindWindow::selectionHasChanged()
{
emit resultSelected(true);
- QListViewItem *item = firstChild();
+ TQListViewItem *item = firstChild();
while(item != 0L)
{
if(isSelected(item)) {
@@ -285,13 +285,13 @@ void KfindWindow::selectionHasChanged()
void KfindWindow::deleteFiles()
{
- QString tmp = i18n("Do you really want to delete the selected file?",
+ TQString tmp = i18n("Do you really want to delete the selected file?",
"Do you really want to delete the %n selected files?",selectedItems().count());
if (KMessageBox::warningContinueCancel(parentWidget(), tmp, "", KGuiItem( i18n("&Delete"), "editdelete")) == KMessageBox::Cancel)
return;
// Iterate on all selected elements
- QPtrList<QListViewItem> selected = selectedItems();
+ TQPtrList<TQListViewItem> selected = selectedItems();
for ( uint i = 0; i < selected.count(); i++ ) {
KfFileLVI *item = (KfFileLVI *) selected.at(i);
KFileItem file = item->fileitem;
@@ -313,7 +313,7 @@ void KfindWindow::openFolder()
{
KFileItem fileitem = ((KfFileLVI *)currentItem())->fileitem;
KURL url = fileitem.url();
- url.setFileName(QString::null);
+ url.setFileName(TQString::null);
(void) new KRun(url);
}
@@ -323,7 +323,7 @@ void KfindWindow::openBinding()
((KfFileLVI*)currentItem())->fileitem.run();
}
-void KfindWindow::slotExecute(QListViewItem* item)
+void KfindWindow::slotExecute(TQListViewItem* item)
{
if (item==0)
return;
@@ -331,17 +331,17 @@ void KfindWindow::slotExecute(QListViewItem* item)
}
// Resizes KListView to occupy all visible space
-void KfindWindow::resizeEvent(QResizeEvent *e)
+void KfindWindow::resizeEvent(TQResizeEvent *e)
{
KListView::resizeEvent(e);
resetColumns(false);
clipper()->repaint();
}
-QDragObject * KfindWindow::dragObject()
+TQDragObject * KfindWindow::dragObject()
{
KURL::List uris;
- QPtrList<QListViewItem> selected = selectedItems();
+ TQPtrList<TQListViewItem> selected = selectedItems();
// create a list of URIs from selection
for ( uint i = 0; i < selected.count(); i++ )
@@ -356,9 +356,9 @@ QDragObject * KfindWindow::dragObject()
if ( uris.count() <= 0 )
return 0;
- QUriDrag *ud = new KURLDrag( uris, (QWidget *) this, "kfind uridrag" );
+ TQUriDrag *ud = new KURLDrag( uris, (TQWidget *) this, "kfind uridrag" );
- const QPixmap *pix = currentItem()->pixmap(0);
+ const TQPixmap *pix = currentItem()->pixmap(0);
if ( pix && !pix->isNull() )
ud->setPixmap( *pix );
@@ -367,12 +367,12 @@ QDragObject * KfindWindow::dragObject()
void KfindWindow::resetColumns(bool init)
{
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
if (init)
{
setColumnWidth(2, QMAX(fm.width(columnText(2)), fm.width("0000000")) + 15);
- QString sampleDate =
- KGlobal::locale()->formatDateTime(QDateTime::currentDateTime());
+ TQString sampleDate =
+ KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime());
setColumnWidth(3, QMAX(fm.width(columnText(3)), fm.width(sampleDate)) + 15);
setColumnWidth(4, QMAX(fm.width(columnText(4)), fm.width(i18n(perm[RO]))) + 15);
setColumnWidth(5, QMAX(fm.width(columnText(5)), fm.width("some text")) + 15);
@@ -390,7 +390,7 @@ void KfindWindow::resetColumns(bool init)
setColumnWidth(1, dir_w);
}
-void KfindWindow::slotContextMenu(KListView *,QListViewItem *item,const QPoint&p)
+void KfindWindow::slotContextMenu(KListView *,TQListViewItem *item,const TQPoint&p)
{
if (!item) return;
int count = selectedItems().count();
@@ -409,21 +409,21 @@ void KfindWindow::slotContextMenu(KListView *,QListViewItem *item,const QPoint&p
{
//menu = new KPopupMenu(item->text(0), this);
m_menu->insertTitle(item->text(0));
- m_menu->insertItem(SmallIcon("fileopen"),i18n("Menu item", "Open"), this, SLOT(openBinding()));
- m_menu->insertItem(SmallIcon("window_new"),i18n("Open Folder"), this, SLOT(openFolder()));
+ m_menu->insertItem(SmallIcon("fileopen"),i18n("Menu item", "Open"), this, TQT_SLOT(openBinding()));
+ m_menu->insertItem(SmallIcon("window_new"),i18n("Open Folder"), this, TQT_SLOT(openFolder()));
m_menu->insertSeparator();
- m_menu->insertItem(SmallIcon("editcopy"),i18n("Copy"), this, SLOT(copySelection()));
- m_menu->insertItem(SmallIcon("editdelete"),i18n("Delete"), this, SLOT(deleteFiles()));
+ m_menu->insertItem(SmallIcon("editcopy"),i18n("Copy"), this, TQT_SLOT(copySelection()));
+ m_menu->insertItem(SmallIcon("editdelete"),i18n("Delete"), this, TQT_SLOT(deleteFiles()));
m_menu->insertSeparator();
- m_menu->insertItem(i18n("Open With..."), this, SLOT(slotOpenWith()));
+ m_menu->insertItem(i18n("Open With..."), this, TQT_SLOT(slotOpenWith()));
m_menu->insertSeparator();
- m_menu->insertItem(i18n("Properties"), this, SLOT(fileProperties()));
+ m_menu->insertItem(i18n("Properties"), this, TQT_SLOT(fileProperties()));
}
else
{
m_menu->insertTitle(i18n("Selected Files"));
- m_menu->insertItem(SmallIcon("editcopy"),i18n("Copy"), this, SLOT(copySelection()));
- m_menu->insertItem(SmallIcon("editdelete"),i18n("Delete"), this, SLOT(deleteFiles()));
+ m_menu->insertItem(SmallIcon("editcopy"),i18n("Copy"), this, TQT_SLOT(copySelection()));
+ m_menu->insertItem(SmallIcon("editdelete"),i18n("Delete"), this, TQT_SLOT(deleteFiles()));
}
m_menu->popup(p, 1);
}
diff --git a/kfind/kfwin.h b/kfind/kfwin.h
index 0d55c8f6a..4d5a2d9dd 100644
--- a/kfind/kfwin.h
+++ b/kfind/kfwin.h
@@ -20,12 +20,12 @@ class KfindWindow;
class KfFileLVI : public QListViewItem
{
public:
- KfFileLVI(KfindWindow* lv, const KFileItem &item,const QString& matchingLine);
+ KfFileLVI(KfindWindow* lv, const KFileItem &item,const TQString& matchingLine);
~KfFileLVI();
- QString key(int column, bool) const;
+ TQString key(int column, bool) const;
- QFileInfo *fileInfo;
+ TQFileInfo *fileInfo;
KFileItem fileitem;
};
@@ -33,18 +33,18 @@ class KfindWindow: public KListView
{
Q_OBJECT
public:
- KfindWindow( QWidget * parent = 0, const char * name = 0 );
+ KfindWindow( TQWidget * parent = 0, const char * name = 0 );
void beginSearch(const KURL& baseUrl);
void endSearch();
- void insertItem(const KFileItem &item, const QString& matchingLine);
+ void insertItem(const KFileItem &item, const TQString& matchingLine);
- QString reducedDir(const QString& fullDir);
+ TQString reducedDir(const TQString& fullDir);
public slots:
void copySelection();
- void slotContextMenu(KListView *,QListViewItem *item,const QPoint&p);
+ void slotContextMenu(KListView *,TQListViewItem *item,const TQPoint&p);
private slots:
void deleteFiles();
@@ -53,19 +53,19 @@ private slots:
void saveResults();
void openBinding();
void selectionHasChanged();
- void slotExecute(QListViewItem*);
+ void slotExecute(TQListViewItem*);
void slotOpenWith();
protected:
- virtual void resizeEvent(QResizeEvent *e);
+ virtual void resizeEvent(TQResizeEvent *e);
- virtual QDragObject *dragObject();
+ virtual TQDragObject *dragObject();
signals:
void resultSelected(bool);
private:
- QString m_baseDir;
+ TQString m_baseDir;
KPopupMenu *m_menu;
bool haveSelection;
bool m_pressed;
diff --git a/kfind/kquery.cpp b/kfind/kquery.cpp
index 92b867567..4231f1aab 100644
--- a/kfind/kquery.cpp
+++ b/kfind/kquery.cpp
@@ -1,6 +1,6 @@
#include <stdlib.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <kfileitem.h>
#include <kfilemetainfo.h>
@@ -12,8 +12,8 @@
#include "kquery.h"
-KQuery::KQuery(QObject *parent, const char * name)
- : QObject(parent, name),
+KQuery::KQuery(TQObject *parent, const char * name)
+ : TQObject(parent, name),
m_sizemode(0), m_sizeboundary1(0), m_sizeboundary2(0),
m_timeFrom(0), m_timeTo(0),
job(0), m_insideCheckEntries(false), m_result(0)
@@ -21,9 +21,9 @@ KQuery::KQuery(QObject *parent, const char * name)
m_regexps.setAutoDelete(true);
m_fileItems.setAutoDelete(true);
processLocate = new KProcess(this);
- connect(processLocate,SIGNAL(receivedStdout(KProcess*, char*, int)),this,SLOT(slotreceivedSdtout(KProcess*,char*,int)));
- connect(processLocate,SIGNAL(receivedStderr(KProcess*, char*, int)),this,SLOT(slotreceivedSdterr(KProcess*,char*,int)));
- connect(processLocate,SIGNAL(processExited(KProcess*)),this,SLOT(slotendProcessLocate(KProcess*)));
+ connect(processLocate,TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),this,TQT_SLOT(slotreceivedSdtout(KProcess*,char*,int)));
+ connect(processLocate,TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),this,TQT_SLOT(slotreceivedSdterr(KProcess*,char*,int)));
+ connect(processLocate,TQT_SIGNAL(processExited(KProcess*)),this,TQT_SLOT(slotendProcessLocate(KProcess*)));
// Files with these mime types can be ignored, even if
// findFormatByFileContent() in some cases may claim that
@@ -87,10 +87,10 @@ void KQuery::start()
else
job = KIO::listDir( m_url, false );
- connect(job, SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)),
- SLOT(slotListEntries(KIO::Job *, const KIO::UDSEntryList &)));
- connect(job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *)));
- connect(job, SIGNAL(canceled(KIO::Job *)), SLOT(slotCanceled(KIO::Job *)));
+ connect(job, TQT_SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)),
+ TQT_SLOT(slotListEntries(KIO::Job *, const KIO::UDSEntryList &)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(canceled(KIO::Job *)), TQT_SLOT(slotCanceled(KIO::Job *)));
}
void KQuery::slotResult( KIO::Job * _job )
@@ -129,7 +129,7 @@ void KQuery::checkEntries()
if (m_insideCheckEntries)
return;
m_insideCheckEntries=true;
- metaKeyRx=new QRegExp(m_metainfokey,true,true);
+ metaKeyRx=new TQRegExp(m_metainfokey,true,true);
KFileItem * file = 0;
while ((file=m_fileItems.dequeue()))
{
@@ -143,13 +143,13 @@ void KQuery::checkEntries()
}
/* List of files found using slocate */
-void KQuery::slotListEntries( QStringList list )
+void KQuery::slotListEntries( TQStringList list )
{
KFileItem * file = 0;
- metaKeyRx=new QRegExp(m_metainfokey,true,true);
+ metaKeyRx=new TQRegExp(m_metainfokey,true,true);
- QStringList::Iterator it = list.begin();
- QStringList::Iterator end = list.end();
+ TQStringList::Iterator it = list.begin();
+ TQStringList::Iterator end = list.end();
for (; it != end; ++it)
{
@@ -164,7 +164,7 @@ void KQuery::slotListEntries( QStringList list )
/* Check if file meets the find's requirements*/
void KQuery::processQuery( KFileItem* file)
{
- QRegExp *filename_match;
+ TQRegExp *filename_match;
if ( file->name() == "." || file->name() == ".." )
return;
@@ -250,21 +250,21 @@ void KQuery::processQuery( KFileItem* file)
if ((!m_metainfo.isEmpty()) && (!m_metainfokey.isEmpty()))
{
bool foundmeta=false;
- QString filename = file->url().path();
+ TQString filename = file->url().path();
if(filename.startsWith("/dev/"))
return;
KFileMetaInfo metadatas(filename);
KFileMetaInfoItem metaitem;
- QStringList metakeys;
- QString strmetakeycontent;
+ TQStringList metakeys;
+ TQString strmetakeycontent;
if(metadatas.isEmpty())
return;
metakeys=metadatas.supportedKeys();
- for ( QStringList::Iterator it = metakeys.begin(); it != metakeys.end(); ++it )
+ for ( TQStringList::Iterator it = metakeys.begin(); it != metakeys.end(); ++it )
{
if (!metaKeyRx->exactMatch(*it))
continue;
@@ -281,7 +281,7 @@ void KQuery::processQuery( KFileItem* file)
}
// match contents...
- QString matchingLine;
+ TQString matchingLine;
if (!m_context.isEmpty())
{
@@ -296,11 +296,11 @@ void KQuery::processQuery( KFileItem* file)
// FIXME: doesn't work with non local files
- QString filename;
- QTextStream* stream=0;
- QFile qf;
- QRegExp xmlTags;
- QByteArray zippedXmlFileContent;
+ TQString filename;
+ TQTextStream* stream=0;
+ TQFile qf;
+ TQRegExp xmlTags;
+ TQByteArray zippedXmlFileContent;
// KWord's and OpenOffice.org's files are zipped...
if( ooo_mimetypes.findIndex(file->mimetype()) != -1 ||
@@ -326,8 +326,8 @@ void KQuery::processQuery( KFileItem* file)
zippedXmlFileContent = zipfileEntry->data();
xmlTags.setPattern("<.*>");
xmlTags.setMinimal(true);
- stream = new QTextStream(zippedXmlFileContent, IO_ReadOnly);
- stream->setEncoding(QTextStream::UnicodeUTF8);
+ stream = new TQTextStream(zippedXmlFileContent, IO_ReadOnly);
+ stream->setEncoding(TQTextStream::UnicodeUTF8);
isZippedOfficeDocument = true;
} else {
kdWarning() << "Cannot open supposed ZIP file " << file->url() << endl;
@@ -348,13 +348,13 @@ void KQuery::processQuery( KFileItem* file)
return;
qf.setName(filename);
qf.open(IO_ReadOnly);
- stream=new QTextStream(&qf);
- stream->setEncoding(QTextStream::Locale);
+ stream=new TQTextStream(&qf);
+ stream->setEncoding(TQTextStream::Locale);
}
while ( ! stream->atEnd() )
{
- QString str = stream->readLine();
+ TQString str = stream->readLine();
matchingLineNumber++;
if (str.isNull()) break;
@@ -365,7 +365,7 @@ void KQuery::processQuery( KFileItem* file)
{
if (m_regexp.search(str)>=0)
{
- matchingLine=QString::number(matchingLineNumber)+": "+str;
+ matchingLine=TQString::number(matchingLineNumber)+": "+str;
found = true;
break;
}
@@ -375,7 +375,7 @@ void KQuery::processQuery( KFileItem* file)
if ((!str.isNull()) && (!m_context.isNull())) {
if (str.find(m_context, 0, m_casesensitive) != -1)
{
- matchingLine=QString::number(matchingLineNumber)+": "+str;
+ matchingLine=TQString::number(matchingLineNumber)+": "+str;
found = true;
break;
}
@@ -394,7 +394,7 @@ void KQuery::processQuery( KFileItem* file)
emit addFile(file,matchingLine);
}
-void KQuery::setContext(const QString & context, bool casesensitive,
+void KQuery::setContext(const TQString & context, bool casesensitive,
bool search_binary, bool useRegexp)
{
m_context = context;
@@ -407,13 +407,13 @@ void KQuery::setContext(const QString & context, bool casesensitive,
m_regexp.setPattern(m_context);
}
-void KQuery::setMetaInfo(const QString &metainfo, const QString &metainfokey)
+void KQuery::setMetaInfo(const TQString &metainfo, const TQString &metainfokey)
{
m_metainfo=metainfo;
m_metainfokey=metainfokey;
}
-void KQuery::setMimeType(const QStringList &mimetype)
+void KQuery::setMimeType(const TQStringList &mimetype)
{
m_mimetype = mimetype;
}
@@ -436,28 +436,28 @@ void KQuery::setTimeRange(time_t from, time_t to)
m_timeTo = to;
}
-void KQuery::setUsername(QString username)
+void KQuery::setUsername(TQString username)
{
m_username = username;
}
-void KQuery::setGroupname(QString groupname)
+void KQuery::setGroupname(TQString groupname)
{
m_groupname = groupname;
}
-void KQuery::setRegExp(const QString &regexp, bool caseSensitive)
+void KQuery::setRegExp(const TQString &regexp, bool caseSensitive)
{
- QRegExp *regExp;
- QRegExp sep(";");
- QStringList strList=QStringList::split( sep, regexp, false);
-// QRegExp globChars ("[\\*\\?\\[\\]]", TRUE, FALSE);
+ TQRegExp *regExp;
+ TQRegExp sep(";");
+ TQStringList strList=TQStringList::split( sep, regexp, false);
+// TQRegExp globChars ("[\\*\\?\\[\\]]", TRUE, FALSE);
m_regexps.clear();
// m_regexpsContainsGlobs.clear();
- for ( QStringList::ConstIterator it = strList.begin(); it != strList.end(); ++it ) {
- regExp = new QRegExp((*it),caseSensitive,true);
+ for ( TQStringList::ConstIterator it = strList.begin(); it != strList.end(); ++it ) {
+ regExp = new TQRegExp((*it),caseSensitive,true);
// m_regexpsContainsGlobs.append(regExp->pattern().contains(globChars));
m_regexps.append(regExp);
}
@@ -480,7 +480,7 @@ void KQuery::setUseFileIndex(bool useLocate)
void KQuery::slotreceivedSdterr(KProcess* ,char* str,int)
{
- KMessageBox::error(NULL, QString(str), i18n("Error while using locate"));
+ KMessageBox::error(NULL, TQString(str), i18n("Error while using locate"));
}
void KQuery::slotreceivedSdtout(KProcess*,char* str,int l)
@@ -496,8 +496,8 @@ void KQuery::slotreceivedSdtout(KProcess*,char* str,int l)
void KQuery::slotendProcessLocate(KProcess*)
{
- QString qstr;
- QStringList strlist;
+ TQString qstr;
+ TQStringList strlist;
int i,j,k;
if((bufferLocateLength==0)||(bufferLocate==NULL))
diff --git a/kfind/kquery.h b/kfind/kquery.h
index c7e81fcfe..a599cdbf1 100644
--- a/kfind/kquery.h
+++ b/kfind/kquery.h
@@ -3,11 +3,11 @@
#include <time.h>
-#include <qobject.h>
-#include <qregexp.h>
-#include <qptrqueue.h>
-#include <qdir.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqregexp.h>
+#include <tqptrqueue.h>
+#include <tqdir.h>
+#include <tqstringlist.h>
#include <kio/job.h>
#include <kurl.h>
@@ -20,21 +20,21 @@ class KQuery : public QObject
Q_OBJECT
public:
- KQuery(QObject *parent = 0, const char * name = 0);
+ KQuery(TQObject *parent = 0, const char * name = 0);
~KQuery();
void setSizeRange( int mode, KIO::filesize_t value1, KIO::filesize_t value2 );
void setTimeRange( time_t from, time_t to );
- void setRegExp( const QString &regexp, bool caseSensitive );
+ void setRegExp( const TQString &regexp, bool caseSensitive );
void setRecursive( bool recursive );
void setPath(const KURL & url );
void setFileType( int filetype );
- void setMimeType( const QStringList & mimetype );
- void setContext( const QString & context, bool casesensitive,
+ void setMimeType( const TQStringList & mimetype );
+ void setContext( const TQString & context, bool casesensitive,
bool search_binary, bool useRegexp );
- void setUsername( QString username );
- void setGroupname( QString groupname );
- void setMetaInfo(const QString &metainfo, const QString &metainfokey);
+ void setUsername( TQString username );
+ void setGroupname( TQString groupname );
+ void setMetaInfo(const TQString &metainfo, const TQString &metainfokey);
void setUseFileIndex(bool);
void start();
@@ -47,7 +47,7 @@ class KQuery : public QObject
public slots:
/* List of files found using slocate */
- void slotListEntries(QStringList);
+ void slotListEntries(TQStringList);
protected slots:
/* List of files found using KIO */
void slotListEntries(KIO::Job *, const KIO::UDSEntryList &);
@@ -58,7 +58,7 @@ class KQuery : public QObject
void slotendProcessLocate(KProcess*);
signals:
- void addFile(const KFileItem *filename, const QString& matchingLine);
+ void addFile(const KFileItem *filename, const TQString& matchingLine);
void result(int);
private:
@@ -71,32 +71,32 @@ class KQuery : public QObject
KURL m_url;
time_t m_timeFrom;
time_t m_timeTo;
- QRegExp m_regexp;// regexp for file content
+ TQRegExp m_regexp;// regexp for file content
bool m_recursive;
- QStringList m_mimetype;
- QString m_context;
- QString m_username;
- QString m_groupname;
- QString m_metainfo;
- QString m_metainfokey;
+ TQStringList m_mimetype;
+ TQString m_context;
+ TQString m_username;
+ TQString m_groupname;
+ TQString m_metainfo;
+ TQString m_metainfokey;
bool m_casesensitive;
bool m_search_binary;
bool m_regexpForContent;
bool m_useLocate;
char* bufferLocate;
int bufferLocateLength;
- QStringList locateList;
+ TQStringList locateList;
KProcess *processLocate;
- QPtrList<QRegExp> m_regexps;// regexps for file name
-// QValueList<bool> m_regexpsContainsGlobs; // what should this be good for ? Alex
+ TQPtrList<TQRegExp> m_regexps;// regexps for file name
+// TQValueList<bool> m_regexpsContainsGlobs; // what should this be good for ? Alex
KIO::ListJob *job;
bool m_insideCheckEntries;
- QPtrQueue<KFileItem> m_fileItems;
- QRegExp* metaKeyRx;
+ TQPtrQueue<KFileItem> m_fileItems;
+ TQRegExp* metaKeyRx;
int m_result;
- QStringList ignore_mimetypes;
- QStringList ooo_mimetypes; // OpenOffice.org mimetypes
- QStringList koffice_mimetypes;
+ TQStringList ignore_mimetypes;
+ TQStringList ooo_mimetypes; // OpenOffice.org mimetypes
+ TQStringList koffice_mimetypes;
};
#endif
diff --git a/kfind/main.cpp b/kfind/main.cpp
index a92f0ddcd..eb19ef041 100644
--- a/kfind/main.cpp
+++ b/kfind/main.cpp
@@ -1,5 +1,5 @@
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <klocale.h>
@@ -53,9 +53,9 @@ int main( int argc, char ** argv )
if (args->count() > 0)
url = args->url(0);
if (url.isEmpty())
- url = QDir::currentDirPath();
+ url = TQDir::currentDirPath();
if (url.isEmpty())
- url = QDir::homeDirPath();
+ url = TQDir::homeDirPath();
args->clear();
KfindDlg kfinddlg(url, 0, "dialog");