diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
commit | 2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch) | |
tree | 18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/filehandler.h | |
parent | 1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff) | |
download | tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip |
TQt4 port tellico
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/filehandler.h')
-rw-r--r-- | src/filehandler.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/filehandler.h b/src/filehandler.h index 9000478..d4c6af0 100644 --- a/src/filehandler.h +++ b/src/filehandler.h @@ -14,9 +14,9 @@ #ifndef FILEHANDLER_H #define FILEHANDLER_H -#include <qstring.h> -#include <qcstring.h> // needed for QByteArray -#include <qptrlist.h> +#include <tqstring.h> +#include <tqcstring.h> // needed for TQByteArray +#include <tqptrlist.h> class KURL; class KSaveFile; @@ -25,8 +25,8 @@ namespace KIO { class Job; } -class QDomDocument; -class QIODevice; +class TQDomDocument; +class TQIODevice; namespace Tellico { class ImageFactory; @@ -51,16 +51,16 @@ public: class FileRef { public: bool open(bool quiet=false); - QIODevice* file() const { return m_device; } - const QString& fileName() const { return m_filename; } + TQIODevice* file() const { return m_device; } + const TQString& fileName() const { return m_filename; } bool isValid() const { return m_isValid; } ~FileRef(); private: friend class FileHandler; FileRef(const KURL& url, bool quiet=false, bool allowCompressed=false); - QIODevice* m_device; - QString m_filename; + TQIODevice* m_device; + TQString m_filename; bool m_isValid; }; friend class FileRef; @@ -83,24 +83,24 @@ public: * @param allowCompressed Whether to check if the file is compressed or not * @return A string containing the contents of a file */ - static QString readTextFile(const KURL& url, bool quiet=false, bool useUTF8=false, bool allowCompressed=false); + static TQString readTextFile(const KURL& url, bool quiet=false, bool useUTF8=false, bool allowCompressed=false); /** - * Read contents of an XML file into a QDomDocument. + * Read contents of an XML file into a TQDomDocument. * * @param url The URL of the file * @param processNamespace Whether to process the namespace of the XML file * @param quiet Whether error messages should be shown - * @return A QDomDocument containing the contents of a file + * @return A TQDomDocument containing the contents of a file */ - static QDomDocument readXMLFile(const KURL& url, bool processNamespace, bool quiet=false); + static TQDomDocument readXMLFile(const KURL& url, bool processNamespace, bool quiet=false); /** - * Read contents of a data file into a QByteArray. + * Read contents of a data file into a TQByteArray. * * @param url The URL of the file * @param quiet Whether error messages should be shown - * @return A QByteArray of the file's contents + * @return A TQByteArray of the file's contents */ - static QByteArray readDataFile(const KURL& url, bool quiet=false); + static TQByteArray readDataFile(const KURL& url, bool quiet=false); /** * Writes the contents of a string to a url. If the file already exists, a "~" is appended * and the existing file is moved. If the file is remote, a temporary file is written and @@ -112,7 +112,7 @@ public: * @param force Whether to force the write * @return A boolean indicating success */ - static bool writeTextURL(const KURL& url, const QString& text, bool encodeUTF8, bool force=false, bool quiet=false); + static bool writeTextURL(const KURL& url, const TQString& text, bool encodeUTF8, bool force=false, bool quiet=false); /** * Writes data to a url. If the file already exists, a "~" is appended * and the existing file is moved. If the file is remote, a temporary file is written and @@ -123,7 +123,7 @@ public: * @param force Whether to force the write * @return A boolean indicating success */ - static bool writeDataURL(const KURL& url, const QByteArray& data, bool force=false, bool quiet=false); + static bool writeDataURL(const KURL& url, const TQByteArray& data, bool force=false, bool quiet=false); /** * Checks to see if a URL exists already, and if so, queries the user. * @@ -136,7 +136,7 @@ public: private: class ItemDeleter; friend class ItemDeleter; - static QPtrList<ItemDeleter> s_deleterList; + static TQPtrList<ItemDeleter> s_deleterList; /** * Read contents of a file into an image. It's private since everything should use the @@ -156,7 +156,7 @@ private: * @param encodeUTF8 Whether to use UTF-8 encoding, or Locale * @return A boolean indicating success */ - static bool writeTextFile(KSaveFile& file, const QString& text, bool encodeUTF8); + static bool writeTextFile(KSaveFile& file, const TQString& text, bool encodeUTF8); /** * Writes data to a file. * @@ -164,7 +164,7 @@ private: * @param data The data * @return A boolean indicating success */ - static bool writeDataFile(KSaveFile& file, const QByteArray& data); + static bool writeDataFile(KSaveFile& file, const TQByteArray& data); }; } // end namespace |