diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /lib/store/KoStore.h | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/store/KoStore.h')
-rw-r--r-- | lib/store/KoStore.h | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/lib/store/KoStore.h b/lib/store/KoStore.h index 38409688..04ff6cdf 100644 --- a/lib/store/KoStore.h +++ b/lib/store/KoStore.h @@ -21,13 +21,13 @@ #ifndef __koStore_h_ #define __koStore_h_ -#include <qstring.h> -#include <qstringlist.h> -#include <qiodevice.h> -#include <qvaluestack.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqiodevice.h> +#include <tqvaluestack.h> #include <koffice_export.h> -class QWidget; +class TQWidget; class KURL; @@ -58,14 +58,14 @@ public: * to be written in the file for "mime-magic" identification. * Only meaningful if mode is Write, and if backend!=Directory. */ - static KoStore* createStore( const QString& fileName, Mode mode, const QCString & appIdentification = "", Backend backend = Auto ); + static KoStore* createStore( const TQString& fileName, Mode mode, const TQCString & appIdentification = "", Backend backend = Auto ); /** - * Create a store for any kind of QIODevice: file, memory buffer... - * KoStore will take care of opening the QIODevice. + * Create a store for any kind of TQIODevice: file, memory buffer... + * KoStore will take care of opening the TQIODevice. * This method doesn't support the Directory store! */ - static KoStore* createStore( QIODevice *device, Mode mode, const QCString & appIdentification = "", Backend backend = Auto ); + static KoStore* createStore( TQIODevice *device, Mode mode, const TQCString & appIdentification = "", Backend backend = Auto ); /** * Open a store (i.e. the representation on disk of a KOffice document). @@ -87,7 +87,7 @@ public: * @since 1.4 * @bug saving not completely implemented (fixed temporary file) */ - static KoStore* createStore( QWidget* window, const KURL& url, Mode mode, const QCString & appIdentification = "", Backend backend = Auto ); + static KoStore* createStore( TQWidget* window, const KURL& url, Mode mode, const TQCString & appIdentification = "", Backend backend = Auto ); /** * Destroys the store (i.e. closes the file on the hard disk) @@ -100,7 +100,7 @@ public: * If the tar:/ prefix is missing it's assumed to be a relative URI. * @return true on success. */ - bool open( const QString & name ); + bool open( const TQString & name ); /** * Check whether a file inside the store is currently opened with open(), @@ -120,38 +120,38 @@ public: * (slightly faster than read() calls) * You need to call @ref open first, and @ref close afterwards. */ - QIODevice* device() const; + TQIODevice* device() const; /** * Read data from the currently opened file. You can also use the streams * for this. */ - QByteArray read( unsigned long int max ); + TQByteArray read( unsigned long int max ); /** * Write data into the currently opened file. You can also use the streams * for this. */ - Q_LONG write( const QByteArray& _data ); + TQ_LONG write( const TQByteArray& _data ); /** * Read data from the currently opened file. You can also use the streams * for this. * @return size of data read, -1 on error */ - Q_LONG read( char *_buffer, Q_ULONG _len ); + TQ_LONG read( char *_buffer, TQ_ULONG _len ); /** * Write data into the currently opened file. You can also use the streams * for this. */ - virtual Q_LONG write( const char* _data, Q_ULONG _len ); + virtual TQ_LONG write( const char* _data, TQ_ULONG _len ); /** * @return the size of the currently opened file, -1 on error. * Can be used as an argument for the read methods, for instance */ - QIODevice::Offset size() const; + TQIODevice::Offset size() const; /** * @return true if an error occurred @@ -172,7 +172,7 @@ public: * opening a stream. * Note: Operates on internal names */ - bool enterDirectory( const QString& directory ); + bool enterDirectory( const TQString& directory ); /** * Leaves a directory. Equivalent to "cd .." @@ -185,13 +185,13 @@ public: * Returns the current path including a trailing slash. * Note: Returns a path in "internal name" style */ - QString currentPath() const; + TQString currentPath() const; /** * Returns the current directory. * Note: Returns a path in "internal name" style */ - QString currentDirectory() const; + TQString currentDirectory() const; /** @@ -210,14 +210,14 @@ public: * @return true if the given file exists in the current directory, * i.e. if open(fileName) will work. */ - bool hasFile( const QString& fileName ) const; + bool hasFile( const TQString& fileName ) const; /** * Imports a local file into a store * @param fileName file on hard disk * @param destName file in the store */ - bool addLocalFile( const QString &fileName, const QString &destName ); + bool addLocalFile( const TQString &fileName, const TQString &destName ); /** * Imports a local directory @@ -225,7 +225,7 @@ public: * @param dest path in the store where the directory should get saved * @return the directory index */ - QStringList addLocalDirectory( const QString &dirPath, const QString &dest ); + TQStringList addLocalDirectory( const TQString &dirPath, const TQString &dest ); /** @@ -233,12 +233,12 @@ public: * @param srcName file in the store * @param fileName file on a disk */ - bool extractFile( const QString &srcName, const QString &fileName ); + bool extractFile( const TQString &srcName, const TQString &fileName ); //@{ - /// See QIODevice - bool at( QIODevice::Offset pos ); - QIODevice::Offset at() const; + /// See TQIODevice + bool at( TQIODevice::Offset pos ); + TQIODevice::Offset at() const; bool atEnd() const; //@} @@ -264,7 +264,7 @@ protected: * @param name "absolute path" (in the archive) to the file to open * @return true on success */ - virtual bool openWrite( const QString& name ) = 0; + virtual bool openWrite( const TQString& name ) = 0; /** * Open the file @p name in the store, for reading. * On success, this method must set m_stream to a stream from which we can read, @@ -272,7 +272,7 @@ protected: * @param name "absolute path" (in the archive) to the file to open * @return true on success */ - virtual bool openRead( const QString& name ) = 0; + virtual bool openRead( const TQString& name ) = 0; /** * @return true on success @@ -287,21 +287,21 @@ protected: * Enter a subdirectory of the current directory. * The directory might not exist yet in Write mode. */ - virtual bool enterRelativeDirectory( const QString& dirName ) = 0; + virtual bool enterRelativeDirectory( const TQString& dirName ) = 0; /** * Enter a directory where we've been before. * It is guaranteed to always exist. */ - virtual bool enterAbsoluteDirectory( const QString& path ) = 0; + virtual bool enterAbsoluteDirectory( const TQString& path ) = 0; /** * Check if a file exists inside the store. * @param absPath the absolute path inside the store, i.e. not relative to the current directory */ - virtual bool fileExists( const QString& absPath ) const = 0; + virtual bool fileExists( const TQString& absPath ) const = 0; private: - static Backend determineBackend( QIODevice* dev ); + static Backend determineBackend( TQIODevice* dev ); /** * Conversion routine @@ -316,18 +316,18 @@ private: * * see specification (koffice/lib/store/SPEC) for details. */ - QString toExternalNaming( const QString & _internalNaming ) const; + TQString toExternalNaming( const TQString & _internalNaming ) const; /** * Expands a full path name for a stream (directories+filename) */ - QString expandEncodedPath( QString intern ) const; + TQString expandEncodedPath( TQString intern ) const; /** * Expands only directory names(!) * Needed for the path handling code, as we only operate on internal names */ - QString expandEncodedDirectory( QString intern ) const; + TQString expandEncodedDirectory( TQString intern ) const; mutable enum { @@ -340,28 +340,28 @@ private: * Enter *one* single directory. Nothing like foo/bar/bleh allowed. * Performs some checking when in Read mode */ - bool enterDirectoryInternal( const QString& directory ); + bool enterDirectoryInternal( const TQString& directory ); protected: Mode m_mode; /// Store the filenames (with full path inside the archive) when writing, to avoid duplicates - QStringList m_strFiles; + TQStringList m_strFiles; /// The "current directory" (path) - QStringList m_currentPath; + TQStringList m_currentPath; /// Used to push/pop directories to make it easy to save/restore the state - QValueStack<QString> m_directoryStack; + TQValueStack<TQString> m_directoryStack; /// Current filename (between an open() and a close()) - QString m_sName; + TQString m_sName; /// Current size of the file named m_sName - QIODevice::Offset m_iSize; + TQIODevice::Offset m_iSize; /// The stream for the current read or write operation - QIODevice * m_stream; + TQIODevice * m_stream; bool m_bIsOpen; /// Must be set by the constructor. |