summaryrefslogtreecommitdiffstats
path: root/src/backgroundmanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/backgroundmanager.h')
-rw-r--r--src/backgroundmanager.h71
1 files changed, 36 insertions, 35 deletions
diff --git a/src/backgroundmanager.h b/src/backgroundmanager.h
index 0db7898..2d1a442 100644
--- a/src/backgroundmanager.h
+++ b/src/backgroundmanager.h
@@ -21,12 +21,12 @@
#ifndef BACKGROUNDMANAGER_H
#define BACKGROUNDMANAGER_H
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qcolor.h>
-#include <qtimer.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqcolor.h>
+#include <tqtimer.h>
/** A node in the list of background images of BackgroundManager.
* It can only be used by BackgroundManager because it is an internal structure of this manager.
@@ -37,14 +37,14 @@ class BackgroundEntry
friend class BackgroundManager;
protected:
- BackgroundEntry(const QString &location);
+ BackgroundEntry(const TQString &location);
~BackgroundEntry();
- QString name;
- QString location;
+ TQString name;
+ TQString location;
bool tiled; /// << Only valid after some object subscribed to this image! Because it's only read at this time.
- QPixmap *pixmap; /// << Only valid (non-null) after some object subscribed to this image! Because it's only read at this time.
- QPixmap *preview; /// << Only valid (non-null) after some object requested the preview.
+ TQPixmap *pixmap; /// << Only valid (non-null) after some object subscribed to this image! Because it's only read at this time.
+ TQPixmap *preview; /// << Only valid (non-null) after some object requested the preview.
int customersCount;
};
@@ -57,18 +57,18 @@ class OpaqueBackgroundEntry
friend class BackgroundManager;
protected:
- OpaqueBackgroundEntry(const QString &name, const QColor &color);
+ OpaqueBackgroundEntry(const TQString &name, const TQColor &color);
~OpaqueBackgroundEntry();
- QString name;
- QColor color;
- QPixmap *pixmap;
+ TQString name;
+ TQColor color;
+ TQPixmap *pixmap;
int customersCount;
};
/** Manage the list of background images.
* BASIC FUNCTIONNING OF A BACKGROUND CHOOSER:
- * It get all image names with imageNames() to put them in eg. a QComboBox and then,
+ * It get all image names with imageNames() to put them in eg. a TQComboBox and then,
* when it's time to get the preview of an image it call preview() with the image name to get it.
* Preview are only computed on demand and then cached to fast the next demands (only the pointer will have to be returned).
* Previews are scalled to fit in a rectangle of 100 by 75 pixels, and with a white background color.
@@ -85,45 +85,46 @@ class OpaqueBackgroundEntry
* if nothing is subscribed to them (to free memory).
* @author S�astien Laot
*/
-class BackgroundManager : private QObject
+class BackgroundManager : private TQObject
{
Q_OBJECT
+ TQ_OBJECT
private:
/// LIST OF IMAGES:
- typedef QValueList<BackgroundEntry*> BackgroundsList;
- typedef QValueList<OpaqueBackgroundEntry*> OpaqueBackgroundsList;
+ typedef TQValueList<BackgroundEntry*> BackgroundsList;
+ typedef TQValueList<OpaqueBackgroundEntry*> OpaqueBackgroundsList;
public:
/// CONTRUCTOR AND DESTRUCTOR:
BackgroundManager();
~BackgroundManager();
/// SUBSCRIPTION TO IMAGES:
- bool subscribe(const QString &image); /// << @Return true if the loading is a success. In the counter-case, calling methods below is unsafe with this @p image name.
- bool subscribe(const QString &image, const QColor &color); /// << Idem.
- void unsubscribe(const QString &image);
- void unsubscribe(const QString &image, const QColor &color);
+ bool subscribe(const TQString &image); /// << @Return true if the loading is a success. In the counter-case, calling methods below is unsafe with this @p image name.
+ bool subscribe(const TQString &image, const TQColor &color); /// << Idem.
+ void unsubscribe(const TQString &image);
+ void unsubscribe(const TQString &image, const TQColor &color);
/// GETTING THE IMAGES AND PROPERTIES:
- QPixmap* pixmap(const QString &image);
- QPixmap* opaquePixmap(const QString &image, const QColor &color);
- bool tiled(const QString &image);
+ TQPixmap* pixmap(const TQString &image);
+ TQPixmap* opaquePixmap(const TQString &image, const TQColor &color);
+ bool tiled(const TQString &image);
/// LIST OF IMAGES AND PREVIEWS:
- bool exists(const QString &image);
- QStringList imageNames();
- QPixmap* preview(const QString &image);
+ bool exists(const TQString &image);
+ TQStringList imageNames();
+ TQPixmap* preview(const TQString &image);
/// USED FOR EXPORTATION:
- QString pathForImageName(const QString &image); /// << It is STRONGLY advised to not use those two methods unless it's to copy (export) the images or something like that...
- QString previewPathForImageName(const QString &image);
+ TQString pathForImageName(const TQString &image); /// << It is STRONGLY advised to not use those two methods unless it's to copy (export) the images or something like that...
+ TQString previewPathForImageName(const TQString &image);
/// USED FOR IMPORTATION:
- void addImage(const QString &fullPath);
+ void addImage(const TQString &fullPath);
private:
- BackgroundEntry* backgroundEntryFor(const QString &image);
- OpaqueBackgroundEntry* opaqueBackgroundEntryFor(const QString &image, const QColor &color);
+ BackgroundEntry* backgroundEntryFor(const TQString &image);
+ OpaqueBackgroundEntry* opaqueBackgroundEntryFor(const TQString &image, const TQColor &color);
private:
BackgroundsList m_backgroundsList;
OpaqueBackgroundsList m_opaqueBackgroundsList;
- QTimer m_garbageTimer;
+ TQTimer m_garbageTimer;
private slots:
void requestDelayedGarbage();
void doGarbage();