summaryrefslogtreecommitdiffstats
path: root/knode/utilities.h
diff options
context:
space:
mode:
Diffstat (limited to 'knode/utilities.h')
-rw-r--r--knode/utilities.h78
1 files changed, 39 insertions, 39 deletions
diff --git a/knode/utilities.h b/knode/utilities.h
index 31f83d98..9d018096 100644
--- a/knode/utilities.h
+++ b/knode/utilities.h
@@ -17,11 +17,11 @@
#include <kurl.h>
-#include <qfile.h>
+#include <tqfile.h>
-#include <qglobal.h>
-#include <qptrvector.h>
-#include <qptrlist.h>
+#include <tqglobal.h>
+#include <tqptrvector.h>
+#include <tqptrlist.h>
class QWidget;
class QString;
@@ -36,18 +36,18 @@ class KTempFile;
// utility classes
//*****************************************************************************
-/** clone of QSortedList... */
-template<class type> class Q_EXPORT QSortedVector : public QPtrVector<type>
+/** clone of TQSortedList... */
+template<class type> class Q_EXPORT QSortedVector : public TQPtrVector<type>
{
public:
QSortedVector() {}
- QSortedVector ( uint size ) : QPtrVector<type>(size) {}
- QSortedVector( const QSortedVector<type> &l ) : QPtrVector<type>(l) {}
- ~QSortedVector() { QPtrVector<type>::clear(); }
+ QSortedVector ( uint size ) : TQPtrVector<type>(size) {}
+ QSortedVector( const QSortedVector<type> &l ) : TQPtrVector<type>(l) {}
+ ~QSortedVector() { TQPtrVector<type>::clear(); }
QSortedVector<type> &operator=(const QSortedVector<type> &l)
- { return (QSortedVector<type>&)QPtrList<type>::operator=(l); }
+ { return (QSortedVector<type>&)TQPtrList<type>::operator=(l); }
- virtual int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 )
+ virtual int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 )
{ if ( *((type*)s1) == *((type*)s2) ) return 0; return ( *((type*)s1) < *((type*)s2) ? -1 : 1 ); }
};
@@ -55,13 +55,13 @@ public:
//==============================================================================
-class KNFile : public QFile {
+class KNFile : public TQFile {
public:
- KNFile(const QString& fname=QString::null);
+ KNFile(const TQString& fname=TQString::null);
~KNFile();
- const QCString& readLine();
- const QCString& readLineWnewLine();
+ const TQCString& readLine();
+ const TQCString& readLineWnewLine();
/** searches for the string from the current file position
returns -1 when the string wasn't found. */
int findString(const char *s);
@@ -69,7 +69,7 @@ class KNFile : public QFile {
protected:
bool increaseBuffer();
- QCString buffer;
+ TQCString buffer;
char *dataPtr;
int filePos, readBytes;
};
@@ -82,20 +82,20 @@ class KNSaveHelper {
public:
- KNSaveHelper(QString saveName, QWidget *parent);
+ KNSaveHelper(TQString saveName, TQWidget *parent);
~KNSaveHelper();
/** returns a file open for writing */
- QFile* getFile(const QString &dialogTitle);
+ TQFile* getFile(const TQString &dialogTitle);
private:
- QWidget *p_arent;
- QString s_aveName;
+ TQWidget *p_arent;
+ TQString s_aveName;
KURL url;
- QFile* file;
+ TQFile* file;
KTempFile* tmpFile;
- static QString lastPath;
+ static TQString lastPath;
};
@@ -107,25 +107,25 @@ class KNLoadHelper {
public:
- KNLoadHelper(QWidget *parent);
+ KNLoadHelper(TQWidget *parent);
~KNLoadHelper();
/** opens a file dialog and returns a file open for reading */
- KNFile* getFile( const QString &dialogTitle );
+ KNFile* getFile( const TQString &dialogTitle );
/** tries to access the file specified by the url and returns
a file open for reading */
KNFile* setURL(KURL url);
- /** returns the file after getFile(QString) of setURL(url) was called */
+ /** returns the file after getFile(TQString) of setURL(url) was called */
KNFile* getFile()const { return f_ile; };
KURL getURL() const { return u_rl; };
private:
- QWidget *p_arent;
+ TQWidget *p_arent;
KURL u_rl;
KNFile *f_ile;
- QString t_empName;
- static QString l_astPath;
+ TQString t_empName;
+ static TQString l_astPath;
};
@@ -140,26 +140,26 @@ public:
/** list selection dialog, used instead of a popup menu
when a select action is called via the keyboard.
returns -1 when the user canceled the dialog. */
- static int selectDialog(QWidget *parent, const QString &caption, const QStringList &options, int initialValue);
+ static int selectDialog(TQWidget *parent, const TQString &caption, const TQStringList &options, int initialValue);
- static void saveWindowSize(const QString &name, const QSize &s);
- static void restoreWindowSize(const QString &name, QWidget *d, const QSize &defaultSize);
+ static void saveWindowSize(const TQString &name, const TQSize &s);
+ static void restoreWindowSize(const TQString &name, TQWidget *d, const TQSize &defaultSize);
- static const QString encryptStr(const QString& aStr);
- static const QString decryptStr(const QString& aStr);
- static QString rot13(const QString &s);
+ static const TQString encryptStr(const TQString& aStr);
+ static const TQString decryptStr(const TQString& aStr);
+ static TQString rot13(const TQString &s);
/** used for rewarping a text when replying to a message or inserting a file into a box */
- static QString rewrapStringList(QStringList text, int wrapAt, QChar quoteChar, bool stopAtSig, bool alwaysSpace);
+ static TQString rewrapStringList(TQStringList text, int wrapAt, TQChar quoteChar, bool stopAtSig, bool alwaysSpace);
/** use this for all internal files */
- static void displayInternalFileError(QWidget *w=0);
+ static void displayInternalFileError(TQWidget *w=0);
/** use this for all external files */
- static void displayExternalFileError(QWidget *w=0);
+ static void displayExternalFileError(TQWidget *w=0);
/** use this for remote files */
- static void displayRemoteFileError(QWidget *w=0);
+ static void displayRemoteFileError(TQWidget *w=0);
/** use this for error on temporary files */
- static void displayTempFileError(QWidget *w=0);
+ static void displayTempFileError(TQWidget *w=0);
};