diff options
Diffstat (limited to 'kexi/core/kexiblobbuffer.h')
-rw-r--r-- | kexi/core/kexiblobbuffer.h | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/kexi/core/kexiblobbuffer.h b/kexi/core/kexiblobbuffer.h index bd593ab2..adf307a0 100644 --- a/kexi/core/kexiblobbuffer.h +++ b/kexi/core/kexiblobbuffer.h @@ -20,10 +20,10 @@ #ifndef KEXIBLOBBUFFER_H #define KEXIBLOBBUFFER_H -#include <qobject.h> -#include <qintdict.h> -#include <qdict.h> -#include <qpixmap.h> +#include <tqobject.h> +#include <tqintdict.h> +#include <tqdict.h> +#include <tqpixmap.h> #include <kurl.h> @@ -69,7 +69,7 @@ namespace KexiDB by a single interger, memory can be handled more effectively. Example use cases: - A large pixmap file "abc.jpg" is loaded as QByteArray <b>once</b> and buffered: + A large pixmap file "abc.jpg" is loaded as TQByteArray <b>once</b> and buffered: integer identifier is returned. Then, multiple image widgets are using "abc.jpg" for displaying. Duplicating an image widget means only duplicating it's properties @@ -77,15 +77,16 @@ namespace KexiDB Creating a new image widget and assiging the same "abc.jpg" pixmap, means only referencing KexiBLOBBuffer using the same identifier. */ -class KEXICORE_EXPORT KexiBLOBBuffer : public QObject +class KEXICORE_EXPORT KexiBLOBBuffer : public TQObject { Q_OBJECT + TQ_OBJECT private: class Item; public: //! long integer for unique identifying blobs -//! @todo Qt4: will be changed +//! @todo TQt4: will be changed typedef long Id_t; //! Access to KexiBLOBBuffer singleton @@ -116,17 +117,17 @@ class KEXICORE_EXPORT KexiBLOBBuffer : public QObject Handle& operator=(const Handle& handle); - QByteArray data() const { return m_item ? m_item->data() : QByteArray(); } + TQByteArray data() const { return m_item ? m_item->data() : TQByteArray(); } - QPixmap pixmap() const { return m_item ? m_item->pixmap() : QPixmap(); } + TQPixmap pixmap() const { return m_item ? m_item->pixmap() : TQPixmap(); } /*! Sets "stored" flag to true by setting non-temporary identifier. Only call this method for unstored (in memory) BLOBs */ void setStoredWidthID(Id_t id); - QString originalFileName() const { return m_item ? m_item->name: QString::null; } + TQString originalFileName() const { return m_item ? m_item->name: TQString(); } - QString mimeType() const { return m_item ? m_item->mimeType : QString::null; } + TQString mimeType() const { return m_item ? m_item->mimeType : TQString(); } Id_t folderId() const { return m_item ? m_item->folderId : 0; } @@ -159,11 +160,11 @@ class KEXICORE_EXPORT KexiBLOBBuffer : public QObject @param identifier Object's identifier. If positive, the "stored" flag for the data will be set to true with \a identifer, otherwise (the default) the BLOB data will have "stored" flag set to false, and a new temporary identifier will be assigned. */ - Handle insertObject(const QByteArray& data, const QString& name, - const QString& caption, const QString& mimeType, Id_t identifier = 0); + Handle insertObject(const TQByteArray& data, const TQString& name, + const TQString& caption, const TQString& mimeType, Id_t identifier = 0); /*! Inserts a new pixmap available in memory, e.g. coming from clipboard. */ - Handle insertPixmap(const QPixmap& pixmap); + Handle insertPixmap(const TQPixmap& pixmap); /*! \return an object for a given \a id. If \a stored is true, stored BLOBs buffer is browsed, otherwise unstored (in memory) BLOBs buffer is browsed. @@ -188,29 +189,29 @@ class KEXICORE_EXPORT KexiBLOBBuffer : public QObject private: class KEXICORE_EXPORT Item { public: - Item(const QByteArray& data, Id_t ident, + Item(const TQByteArray& data, Id_t ident, bool stored, - const QString& name = QString::null, - const QString& caption = QString::null, - const QString& mimeType = QString::null, + const TQString& name = TQString(), + const TQString& caption = TQString(), + const TQString& mimeType = TQString(), Id_t folderId = 0, - const QPixmap& pixmap = QPixmap()); + const TQPixmap& pixmap = TQPixmap()); ~Item(); - QPixmap pixmap() const; - QByteArray data() const; + TQPixmap pixmap() const; + TQByteArray data() const; // KexiBLOBBuffer* buf; // KURL url; - QString name; - QString caption; //!< @todo for future use within image gallery - QString mimeType; + TQString name; + TQString caption; //!< @todo for future use within image gallery + TQString mimeType; uint refs; Id_t id; Id_t folderId; bool stored : 1; - QString prettyURL; //!< helper + TQString prettyURL; //!< helper private: - QByteArray *m_data; - QPixmap *m_pixmap; + TQByteArray *m_data; + TQPixmap *m_pixmap; bool *m_pixmapLoaded; //!< *m_pixmapLoaded will be set in Info::pixmap(), //!< to avoid multiple pixmap decoding when it previously failed friend class KexiBLOBBuffer; |