summaryrefslogtreecommitdiffstats
path: root/katapult/plugins/catalogs/documentcatalog/documentcatalog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'katapult/plugins/catalogs/documentcatalog/documentcatalog.cpp')
-rw-r--r--katapult/plugins/catalogs/documentcatalog/documentcatalog.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/katapult/plugins/catalogs/documentcatalog/documentcatalog.cpp b/katapult/plugins/catalogs/documentcatalog/documentcatalog.cpp
index 883ac23..38acba3 100644
--- a/katapult/plugins/catalogs/documentcatalog/documentcatalog.cpp
+++ b/katapult/plugins/catalogs/documentcatalog/documentcatalog.cpp
@@ -25,7 +25,7 @@
#include <knuminput.h>
#include <kcombobox.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <actionregistry.h>
@@ -40,7 +40,7 @@
K_EXPORT_COMPONENT_FACTORY( katapult_documentcatalog,
KGenericFactory<DocumentCatalog>( "katapult_documentcatalog" ) )
-DocumentCatalog::DocumentCatalog(QObject *, const char *, const QStringList&)
+DocumentCatalog::DocumentCatalog(TQObject *, const char *, const TQStringList&)
: KatapultCatalog()
{
_minQueryLen = 1;
@@ -58,7 +58,7 @@ DocumentCatalog::~DocumentCatalog()
void DocumentCatalog::initialize()
{
- dir = QDir::home();
+ dir = TQDir::home();
refreshFolders();
refreshFiles();
}
@@ -69,9 +69,9 @@ void DocumentCatalog::refreshFolders()
files.clear();
currentDirDoc = 0;
filesListed = FALSE;
- QStringList folderNames = dir.entryList(QDir::Dirs);
- for(QStringList::Iterator it = folderNames.begin(); it != folderNames.end(); ++it) {
- QString dirname = *it;
+ TQStringList folderNames = dir.entryList(TQDir::Dirs);
+ for(TQStringList::Iterator it = folderNames.begin(); it != folderNames.end(); ++it) {
+ TQString dirname = *it;
if(!dirname.startsWith("."))
folders.append(dirname);
}
@@ -79,13 +79,13 @@ void DocumentCatalog::refreshFolders()
void DocumentCatalog::refreshFiles()
{
- const QFileInfoList *fileList = dir.entryInfoList();
+ const TQFileInfoList *fileList = dir.entryInfoList();
Directory *item = new Directory(currentPath, dir.absPath());
currentDirDoc = item;
files.append(item);
- for(QPtrListStdIterator<QFileInfo> it = fileList->begin(); it != fileList->end(); ++it) {
- const QFileInfo *file = *it;
+ for(TQPtrListStdIterator<TQFileInfo> it = fileList->begin(); it != fileList->end(); ++it) {
+ const TQFileInfo *file = *it;
if(!file->fileName().startsWith(".")) {
if(file->isDir())
files.append(new Directory(currentPath+file->fileName(), file->absFilePath()));
@@ -98,37 +98,37 @@ void DocumentCatalog::refreshFiles()
void DocumentCatalog::queryChanged()
{
- int newStatus = 0;
+ int newtqStatus = 0;
if(query() == "")
{
// reset query
- dir = QDir::home();
+ dir = TQDir::home();
currentPath = "";
queryMatched = 0;
refreshFolders();
} else {
if(query().length() >= minQueryLen())
{
- QString path = query().lower().remove(0, queryMatched);
+ TQString path = query().lower().remove(0, queryMatched);
int index;
- while((index = path.find('/')) != -1) {
- QString folderQuery = path.left(index);
- QString guess = QString::null;
+ while((index = path.tqfind('/')) != -1) {
+ TQString folderQuery = path.left(index);
+ TQString guess = TQString();
- for(QStringList::Iterator it = folders.begin(); it != folders.end(); ++it) {
- QString folderName = *it;
+ for(TQStringList::Iterator it = folders.begin(); it != folders.end(); ++it) {
+ TQString folderName = *it;
if(folderName.lower().startsWith(folderQuery) && (guess.isNull() || folderName.length() < guess.length()))
guess = folderName;
}
- if(guess == QString::null) {
- path = QString::null;
+ if(guess == TQString()) {
+ path = TQString();
break;
}
if(!dir.cd(guess)) {
- path = QString::null;
+ path = TQString();
break;
}
refreshFolders();
@@ -151,7 +151,7 @@ void DocumentCatalog::queryChanged()
files.removeRef(currentDirDoc);
currentDirDoc = 0;
}
- QPtrListIterator<Document> it(files);
+ TQPtrListIterator<Document> it(files);
Document *document;
while((document = it.current()) != 0) {
++it;
@@ -169,21 +169,21 @@ void DocumentCatalog::queryChanged()
if(currentDirDoc != 0 && path.isEmpty())
newBestMatch = Match(currentDirDoc, 100, currentPath.length());
- newStatus |= S_Active;
+ newtqStatus |= S_Active;
if(files.count() > 0)
{
- newStatus |= S_HasResults;
+ newtqStatus |= S_HasResults;
if(files.count() > 1 || files.at(0)->className() == "Directory")
- newStatus |= S_Multiple;
+ newtqStatus |= S_Multiple;
} else
- newStatus |= S_NoResults;
+ newtqStatus |= S_NoResults;
setBestMatch(newBestMatch);
} else {
setBestMatch(Match());
}
}
- setStatus(newStatus);
+ settqStatus(newtqStatus);
}
unsigned int DocumentCatalog::minQueryLen() const
@@ -203,15 +203,15 @@ void DocumentCatalog::writeSettings(KConfigBase *config)
config->writeEntry("showPreview", _showPreview);
}
-QWidget * DocumentCatalog::configure()
+TQWidget * DocumentCatalog::configure()
{
DocumentCatalogSettings *settings = new DocumentCatalogSettings();
settings->minQueryLen->setValue(_minQueryLen);
- connect(settings->minQueryLen, SIGNAL(valueChanged(int)), this, SLOT(minQueryLenChanged(int)));
+ connect(settings->minQueryLen, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(minQueryLenChanged(int)));
settings->showPreview->setChecked(_showPreview);
- connect(settings->showPreview, SIGNAL(toggled(bool)), this, SLOT(toggleshowPreview(bool)));
+ connect(settings->showPreview, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(toggleshowPreview(bool)));
return settings;
}