summaryrefslogtreecommitdiffstats
path: root/src/imagefactory.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-02 06:40:27 +0000
commit2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch)
tree18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/imagefactory.h
parent1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff)
downloadtellico-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/imagefactory.h')
-rw-r--r--src/imagefactory.h74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/imagefactory.h b/src/imagefactory.h
index efb3009..f653d83 100644
--- a/src/imagefactory.h
+++ b/src/imagefactory.h
@@ -18,8 +18,8 @@
#include <kurl.h>
-#include <qcolor.h>
-#include <qcache.h>
+#include <tqcolor.h>
+#include <tqcache.h>
class KTempDir;
@@ -31,13 +31,13 @@ namespace Tellico {
class StyleOptions {
public:
- QString fontFamily;
+ TQString fontFamily;
int fontSize;
- QColor baseColor;
- QColor textColor;
- QColor highlightedBaseColor;
- QColor highlightedTextColor;
- QString imgDir;
+ TQColor baseColor;
+ TQColor textColor;
+ TQColor highlightedBaseColor;
+ TQColor highlightedTextColor;
+ TQString imgDir;
};
/**
@@ -61,8 +61,8 @@ public:
*
* @return The full path
*/
- static QString tempDir();
- static QString dataDir();
+ static TQString tempDir();
+ static TQString dataDir();
/**
* Add an image, reading it from a URL, which is the case when adding a new image from the
@@ -72,30 +72,30 @@ public:
* @param quiet If any error should not be reported.
* @return The image id, empty if null
*/
- static QString addImage(const KURL& url, bool quiet=false,
+ static TQString addImage(const KURL& url, bool quiet=false,
const KURL& referrer = KURL(), bool linkOnly=false);
/**
- * Add an image, reading it from a regular QImage, which is the case when dragging and dropping
- * an image in the @ref ImageWidget. The format has to be included, since the QImage doesn't
+ * Add an image, reading it from a regular TQImage, which is the case when dragging and dropping
+ * an image in the @ref ImageWidget. The format has to be included, since the TQImage doesn't
* 'know' what format it came from.
*
* @param image The qimage
* @param format The image format, probably "PNG"
* @return The image id, empty if null
*/
- static QString addImage(const QImage& image, const QString& format);
- static QString addImage(const QPixmap& image, const QString& format);
+ static TQString addImage(const TQImage& image, const TQString& format);
+ static TQString addImage(const TQPixmap& image, const TQString& format);
/**
* Add an image, reading it from data, which is the case when reading from the data file. The
* @p id isn't strictly needed, since it can be reconstructed from the image data and format, but
* since it's already known, go ahead and use it.
*
* @param data The image data
- * @param format The image format, from Qt's output format list
+ * @param format The image format, from TQt's output format list
* @param id The internal id of the image
* @return The image id, empty if null
*/
- static QString addImage(const QByteArray& data, const QString& format, const QString& id);
+ static TQString addImage(const TQByteArray& data, const TQString& format, const TQString& id);
/**
* Writes an image to a file. ImageFactory keeps track of which images were already written
@@ -106,8 +106,8 @@ public:
* @param force Force the image to be written, even if it already has been
* @return Whether the save was successful
*/
- static bool writeImage(const QString& id, const KURL& targetDir, bool force=false);
- static bool writeCachedImage(const QString& id, CacheDir dir, bool force = false);
+ static bool writeImage(const TQString& id, const KURL& targetDir, bool force=false);
+ static bool writeCachedImage(const TQString& id, CacheDir dir, bool force = false);
/**
* Returns an image reference given its id. If none is found, a null image
@@ -116,13 +116,13 @@ public:
* @param id The image id
* @return The image referencenter
*/
- static const Data::Image& imageById(const QString& id);
- static Data::ImageInfo imageInfo(const QString& id);
+ static const Data::Image& imageById(const TQString& id);
+ static Data::ImageInfo imageInfo(const TQString& id);
static void cacheImageInfo(const Data::ImageInfo& info);
// basically returns !imageById().isNull()
- static bool validImage(const QString& id);
+ static bool validImage(const TQString& id);
- static QPixmap pixmap(const QString& id, int w, int h);
+ static TQPixmap pixmap(const TQString& id, int w, int h);
/**
* Clear the image cache and dict
@@ -134,12 +134,12 @@ public:
*/
static void createStyleImages(const StyleOptions& options = StyleOptions());
- static void removeImage(const QString& id_, bool deleteImage);
+ static void removeImage(const TQString& id_, bool deleteImage);
static StringSet imagesNotInCache();
static void setLocalDirectory(const KURL& url);
// local save directory
- static QString localDir();
+ static TQString localDir();
private:
/**
@@ -153,40 +153,40 @@ private:
static const Data::Image& addImageImpl(const KURL& url, bool quiet=false,
const KURL& referrer = KURL(), bool linkOnly = false);
/**
- * Add an image, reading it from a regular QImage, which is the case when dragging and dropping
- * an image in the @ref ImageWidget. The format has to be included, since the QImage doesn't
+ * Add an image, reading it from a regular TQImage, which is the case when dragging and dropping
+ * an image in the @ref ImageWidget. The format has to be included, since the TQImage doesn't
* 'know' what format it came from.
*
* @param image The qimage
* @param format The image format, probably "PNG"
* @return The image
*/
- static const Data::Image& addImageImpl(const QImage& image, const QString& format);
+ static const Data::Image& addImageImpl(const TQImage& image, const TQString& format);
/**
* Add an image, reading it from data, which is the case when reading from the data file. The
* @p id isn't strictly needed, since it can be reconstructed from the image data and format, but
* since it's already known, go ahead and use it.
*
* @param data The image data
- * @param format The image format, from Qt's output format list
+ * @param format The image format, from TQt's output format list
* @param id The internal id of the image
* @return The image
*/
- static const Data::Image& addImageImpl(const QByteArray& data, const QString& format, const QString& id);
+ static const Data::Image& addImageImpl(const TQByteArray& data, const TQString& format, const TQString& id);
- static const Data::Image& addCachedImageImpl(const QString& id, CacheDir dir);
- static bool hasImage(const QString& id);
+ static const Data::Image& addCachedImageImpl(const TQString& id, CacheDir dir);
+ static bool hasImage(const TQString& id);
static void releaseImages();
static bool s_needInit;
- static QDict<Data::Image> s_imageDict;
- static QCache<Data::Image> s_imageCache;
- static QCache<QPixmap> s_pixmapCache;
- static QMap<QString, Data::ImageInfo> s_imageInfoMap;
+ static TQDict<Data::Image> s_imageDict;
+ static TQCache<Data::Image> s_imageCache;
+ static TQCache<TQPixmap> s_pixmapCache;
+ static TQMap<TQString, Data::ImageInfo> s_imageInfoMap;
static StringSet s_imagesInTmpDir; // the id's of the images written to tmp directory
static StringSet s_imagesToRelease;
static KTempDir* s_tmpDir;
- static QString s_localDir;
+ static TQString s_localDir;
static const Data::Image s_null;
};