diff options
Diffstat (limited to 'amarok/src/threadmanager.h')
-rw-r--r-- | amarok/src/threadmanager.h | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/amarok/src/threadmanager.h b/amarok/src/threadmanager.h index 8ac62455..6d6406ac 100644 --- a/amarok/src/threadmanager.h +++ b/amarok/src/threadmanager.h @@ -76,15 +76,20 @@ */ -/// This class is because moc "is really good" (no nested Q_OBJECT classes) +/// This class is because tqmoc "is really good" (no nested TQ_OBJECT classes) class JobBase : public TQObject { -Q_OBJECT -protected: JobBase() : TQObject(), m_aborted( false ) {} -public slots: void abort() { m_aborted = true; } -protected: bool m_aborted; + Q_OBJECT + TQ_OBJECT + +protected: + JobBase() : TQObject(), m_aborted( false ) {} +public slots: + void abort() { m_aborted = true; } +protected: + bool m_aborted; }; -class ThreadManager : public QObject +class ThreadManager : public TQObject { public: class Thread; @@ -179,7 +184,7 @@ public: /** * Class Thread */ - class Thread : public QThread + class Thread : public TQThread { public: Thread(); @@ -229,8 +234,12 @@ public: * doesn't have to be called. */ - class Job : public JobBase, public QCustomEvent +#ifndef Q_MOC_RUN + + class Job : public JobBase, public TQCustomEvent { +// Q_OBJECT +// TQ_OBJECT friend class ThreadManager; //access to m_thread friend class ThreadManager::Thread; //access to m_aborted @@ -278,7 +287,7 @@ public: /** * If you set progress information, you should set this too, changing it when appropriate */ - void setStatus( const TQString &status ); + void settqStatus( const TQString &status ); /** * This shows the progressBar too, the user will be able to abort @@ -304,7 +313,7 @@ public: */ //void setVisible( bool ); - uint parentThreadId() { return m_parentThreadId; } + uint tqparentThreadId() { return m_tqparentThreadId; } protected: /** @@ -332,7 +341,7 @@ public: uint m_percentDone; uint m_progressDone; uint m_totalSteps; - uint m_parentThreadId; + uint m_tqparentThreadId; TQString m_description; TQString m_status; @@ -344,7 +353,7 @@ public: /** * @class DependentJob - * @short A Job that depends on the existence of a QObject + * @short A Job that depends on the existence of a TQObject * * This Job type is dependent on a TQObject instance, if that instance is * deleted, this Job will be aborted and safely deleted. @@ -366,13 +375,15 @@ public: * * It is only safe to have one dependent, if you depend on multiple objects * that might get deleted while you are running you should instead try to - * make the multiple objects children of one TQObject and depend on the - * top-most parent or best of all would be to make copies of the data you + * make the multiple objects tqchildren of one TQObject and depend on the + * top-most tqparent or best of all would be to make copies of the data you * need instead of being dependent. */ class DependentJob : public Job { +// Q_OBJECT +// TQ_OBJECT public: DependentJob( TQObject *dependent, const char *name ); @@ -387,6 +398,8 @@ public: DISABLE_GENERATED_MEMBER_FUNCTIONS_4( DependentJob ) }; +#endif Q_MOC_RUN + protected: ThreadManager( const ThreadManager& ); ThreadManager &operator=( const ThreadManager& ); |