diff options
Diffstat (limited to 'src/progressmanager.h')
-rw-r--r-- | src/progressmanager.h | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/progressmanager.h b/src/progressmanager.h index 5eaac3b..e82064e 100644 --- a/src/progressmanager.h +++ b/src/progressmanager.h @@ -17,9 +17,9 @@ #ifndef TELLICO_PROGRESSMANAGER_H #define TELLICO_PROGRESSMANAGER_H -#include <qobject.h> -#include <qmap.h> -#include <qguardedptr.h> +#include <tqobject.h> +#include <tqmap.h> +#include <tqguardedptr.h> namespace Tellico { @@ -28,23 +28,24 @@ class ProgressManager; /** * @author Robby Stephenson */ -class ProgressItem : public QObject { +class ProgressItem : public TQObject { Q_OBJECT + TQ_OBJECT friend class ProgressManager; public: class Done { public: - Done(const QObject* obj) : m_object(obj) {} + Done(const TQObject* obj) : m_object(obj) {} ~Done(); private: - const QObject* m_object; + const TQObject* m_object; }; bool canCancel() const { return m_canCancel; } - const QString& label() const { return m_label; } - void setLabel(const QString& label); + const TQString& label() const { return m_label; } + void setLabel(const TQString& label); // uint progress() const { return m_total ? (100*m_completed/m_total) : 0; } uint progress() const { return m_progress; } @@ -63,11 +64,11 @@ signals: protected: /* Only to be used by the ProgressManager */ - ProgressItem(const QString& label, bool canCancel); + ProgressItem(const TQString& label, bool canCancel); virtual ~ProgressItem(); private: - QString m_label; + TQString m_label; bool m_canCancel; uint m_progress; uint m_total; @@ -77,21 +78,22 @@ private: /** * @author Robby Stephenson */ -class ProgressManager : public QObject { +class ProgressManager : public TQObject { Q_OBJECT + TQ_OBJECT public: virtual ~ProgressManager() {} static ProgressManager* self() { if(!s_self) s_self = new ProgressManager(); return s_self; } - ProgressItem& newProgressItem(const QObject* owner, const QString& label, bool canCancel = false) { + ProgressItem& newProgressItem(const TQObject* owner, const TQString& label, bool canCancel = false) { return newProgressItemImpl(owner, label, canCancel); } - void setProgress(const QObject* owner, uint steps); - void setTotalSteps(const QObject* owner, uint steps); - void setDone(const QObject* owner); + void setProgress(const TQObject* owner, uint steps); + void setTotalSteps(const TQObject* owner, uint steps); + void setDone(const TQObject* owner); bool anyCanBeCancelled() const; @@ -113,10 +115,10 @@ private: ProgressManager(); ProgressManager(const ProgressManager&); // no copies - ProgressItem& newProgressItemImpl(const QObject* owner, const QString& label, bool canCancel); + ProgressItem& newProgressItemImpl(const TQObject* owner, const TQString& label, bool canCancel); void setDone(ProgressItem* item); - typedef QMap<QGuardedPtr<const QObject>, QGuardedPtr<ProgressItem> > ProgressMap; + typedef TQMap<TQGuardedPtr<const TQObject>, TQGuardedPtr<ProgressItem> > ProgressMap; ProgressMap m_items; static ProgressManager* s_self; |