summaryrefslogtreecommitdiffstats
path: root/src/kio_locate.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 21:50:57 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 21:50:57 +0000
commit8af7968d9309f6869a93ff6f1a4ef51bcff964fb (patch)
treef875b03e53eb9170c93fc2d2a9d1047e570789e8 /src/kio_locate.h
parent0cbbdc735b3069758b90527554e43ad905e46665 (diff)
downloadtdeio-locate-8af7968d9309f6869a93ff6f1a4ef51bcff964fb.tar.gz
tdeio-locate-8af7968d9309f6869a93ff6f1a4ef51bcff964fb.zip
TQt4 port kio-locate
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kio-locate@1239314 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/kio_locate.h')
-rw-r--r--src/kio_locate.h63
1 files changed, 32 insertions, 31 deletions
diff --git a/src/kio_locate.h b/src/kio_locate.h
index d5df32c..f944c5c 100644
--- a/src/kio_locate.h
+++ b/src/kio_locate.h
@@ -59,11 +59,11 @@
#ifndef _kio_locate_H_
#define _kio_locate_H_
-#include <qcstring.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdict.h>
-#include <qvaluelist.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
+#include <tqvaluelist.h>
#include <kio/global.h>
#include <kio/slavebase.h>
@@ -71,7 +71,7 @@
#include "locater.h"
#include "pattern.h"
-class QCString;
+class TQCString;
class KURL;
@@ -79,9 +79,9 @@ class KURL;
class LocateItem;
class LocateDirectory;
-typedef QValueList<LocateItem> LocateItems;
-typedef QDict<LocateDirectory> LocateDirectories;
-typedef QDictIterator<LocateDirectory> LocateDirectoriesIterator;
+typedef TQValueList<LocateItem> LocateItems;
+typedef TQDict<LocateDirectory> LocateDirectories;
+typedef TQDictIterator<LocateDirectory> LocateDirectoriesIterator;
enum LocateCaseSensitivity { caseAuto, caseSensitive, caseInsensitive };
enum LocateCollapsedIcon { iconBlue, iconGreen, iconGrey, iconOrange, iconRed, iconViolet, iconYellow };
@@ -93,14 +93,15 @@ enum LocateCollapsedIcon { iconBlue, iconGreen, iconGrey, iconOrange, iconRed, i
* Enables you to enter "locate:pattern" wherever an URL can be used
* in KDE.
*/
-class LocateProtocol : public QObject, public KIO::SlaveBase
+class LocateProtocol : public TQObject, public KIO::SlaveBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
*/
- LocateProtocol(const QCString &pool_socket, const QCString &app_socket);
+ LocateProtocol(const TQCString &pool_socket, const TQCString &app_socket);
virtual ~LocateProtocol();
@@ -137,13 +138,13 @@ class LocateProtocol : public QObject, public KIO::SlaveBase
* @param subItems the number of hits beneath this one
* (or 0 for a regular hit)
*/
- virtual void addHit(const QString& path, int subItems = 0);
+ virtual void addHit(const TQString& path, int subItems = 0);
const LocateRegExp& getRegExp() const;
int getCollapseDirectoryThreshold() const;
private slots:
- void processLocateOutput(const QStringList& items);
+ void processLocateOutput(const TQStringList& items);
void locateFinished();
void configFinished();
void updateConfig();
@@ -152,9 +153,9 @@ class LocateProtocol : public QObject, public KIO::SlaveBase
Locater m_locater;
KURL m_url;
- QString m_locatePattern;
+ TQString m_locatePattern;
LocateRegExp m_locateRegExp; // Equals m_locatePattern, but regexp.
- QString m_locateDirectory; // Includes a trailing slash.
+ TQString m_locateDirectory; // Includes a trailing slash.
LocateRegExpList m_regExps; // List of extra filtering regexps.
LocateCaseSensitivity m_caseSensitivity; // For current search.
@@ -166,25 +167,25 @@ class LocateProtocol : public QObject, public KIO::SlaveBase
LocateCaseSensitivity m_caseSensitivity; // Default case sensitivity.
int m_collapseDirectoryThreshold; // Maximum number of hits in a directory
// before a directory search is created
- QString m_collapsedDisplay; // Format string used for collapsed directories.
+ TQString m_collapsedDisplay; // Format string used for collapsed directories.
LocateCollapsedIcon m_collapsedIcon; // Icon used for collapsed directories.
LocateRegExpList m_whiteList; // Path must match at least one regexp in this list.
LocateRegExpList m_blackList; // Path may not match any regexp in this list.
} m_config;
bool m_configUpdated; // Used in config methods to check if config was cancelled or okay'ed.
- QString m_pendingPath; // Must be processed as soon as new output becomes available.
+ TQString m_pendingPath; // Must be processed as soon as new output becomes available.
LocateDirectory *m_baseDir; // The toplevel directory, e.g. "/usr/".
LocateDirectory *m_curDir; // The current directory (while locating).
KIO::UDSEntryList m_entries; // Used to cache a lot of hits and list them all at once.
- QString partToPattern(const QString& part, bool forLocate);
- bool isMatching(const QString& file);
- QString pathToDisplay(const QString& path, int subItems = 0);
+ TQString partToPattern(const TQString& part, bool forLocate);
+ bool isMatching(const TQString& file);
+ TQString pathToDisplay(const TQString& path, int subItems = 0);
void addPreviousLocateOutput();
- void processPath(const QString &path, const QString &nextPath);
+ void processPath(const TQString &path, const TQString &nextPath);
bool isSearchRequest();
bool isConfigRequest();
@@ -194,7 +195,7 @@ class LocateProtocol : public QObject, public KIO::SlaveBase
void configRequest();
void helpRequest();
- bool isCaseSensitive(const QString& text);
+ bool isCaseSensitive(const TQString& text);
/**
* Composes a locater:... url for the current search parameters
@@ -202,7 +203,7 @@ class LocateProtocol : public QObject, public KIO::SlaveBase
* @param directory the directory in which we should be searched
* @return the url that envokes the specified search
*/
- QString makeLocaterUrl(const QString& dir);
+ TQString makeLocaterUrl(const TQString& dir);
/**
* This function has to check whether we are accessed via the standard
@@ -217,7 +218,7 @@ class LocateProtocol : public QObject, public KIO::SlaveBase
*/
void setUrl(const KURL& url);
- void outputHtml(const QString& body);
+ void outputHtml(const TQString& body);
};
@@ -232,10 +233,10 @@ class LocateItem
{
public:
LocateItem();
- LocateItem(const QString& path, int subItems);
+ LocateItem(const TQString& path, int subItems);
public:
- QString m_path;
+ TQString m_path;
int m_subItems;
};
@@ -250,23 +251,23 @@ class LocateItem
class LocateDirectory
{
public:
- LocateDirectory(LocateDirectory *parent, const QString& path);
+ LocateDirectory(LocateDirectory *tqparent, const TQString& path);
- LocateDirectory *addPath(const QString& path);
+ LocateDirectory *addPath(const TQString& path);
void prepareListing(const LocateProtocol* protocol, int skip);
void listItems(LocateProtocol *protocol);
void debugTrace(int level = 0);
public:
- QString m_path; // Including trailing slash.
+ TQString m_path; // Including trailing slash.
LocateDirectory *m_parent;
LocateDirectories m_childs;
LocateItems m_items;
int m_itemsCount;
int m_fullCount;
- LocateDirectory *getSubDirectory(const QString& relPath);
- void addItem(const QString& path);
+ LocateDirectory *getSubDirectory(const TQString& relPath);
+ void addItem(const TQString& path);
int countMatchingItems(const LocateProtocol *protocol, int skip);
};