diff options
Diffstat (limited to 'src/kvilib/system/kvi_thread.h')
-rw-r--r-- | src/kvilib/system/kvi_thread.h | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/kvilib/system/kvi_thread.h b/src/kvilib/system/kvi_thread.h index bd6dab3b..f024505f 100644 --- a/src/kvilib/system/kvi_thread.h +++ b/src/kvilib/system/kvi_thread.h @@ -26,11 +26,11 @@ #include "kvi_heapobject.h" #include "kvi_string.h" -#include <qnamespace.h> -#include <qobject.h> -#include <qsocketnotifier.h> +#include <tqnamespace.h> +#include <tqobject.h> +#include <tqsocketnotifier.h> #include "kvi_pointerlist.h" -#include <qevent.h> +#include <tqevent.h> // @@ -181,7 +181,7 @@ private: bool m_bRunning; bool m_bStartingUp; KviMutex * m_pRunningMutex; - KviPointerList<QEvent> * m_pLocalEventQueue; + KviPointerList<TQEvent> * m_pLocalEventQueue; public: // public KviThread interface // HANDLE WITH CARE @@ -215,14 +215,14 @@ protected: void exit(); // The tricky part: threadsafe event dispatching // Slave thread -> main thread objects - void postEvent(QObject *o,QEvent *e); + void postEvent(TQObject *o,TQEvent *e); private: void setRunning(bool bRunning); void setStartingUp(bool bStartingUp); }; -// QEvent::Type for Thread events -#define KVI_THREAD_EVENT (((int)QEvent::User) + 2000) +// TQEvent::Type for Thread events +#define KVI_THREAD_EVENT (((int)TQEvent::User) + 2000) // CONSTANTS FOR KviThreadEvent::eventId(); @@ -261,14 +261,14 @@ private: // #warning "Get rid of the m_szMessage member of KviThreadEvent : eventual data should be passed with a KviThreadDataEvent" // Base class for all thread events -class KVILIB_API KviThreadEvent : public QEvent, public KviHeapObject +class KVILIB_API KviThreadEvent : public TQEvent, public KviHeapObject { protected: int m_eventId; KviThread * m_pSender; public: KviThreadEvent(int evId,KviThread * sender = 0) - : QEvent((QEvent::Type)KVI_THREAD_EVENT) , m_eventId(evId) , m_pSender(sender) {}; + : TQEvent((TQEvent::Type)KVI_THREAD_EVENT) , m_eventId(evId) , m_pSender(sender) {}; virtual ~KviThreadEvent(){}; public: // This is the sender of the event @@ -329,25 +329,26 @@ protected: typedef struct _KviThreadPendingEvent { - QObject *o; - QEvent *e; + TQObject *o; + TQEvent *e; } KviThreadPendingEvent; -class KVILIB_API KviThreadManager : public QObject +class KVILIB_API KviThreadManager : public TQObject { friend class KviApp; friend class KviThread; Q_OBJECT + TQ_OBJECT protected: // These should be private...but we don't want anyone to complain // Treat as private plz. KviThreadManager(); ~KviThreadManager(); public: - static void killPendingEvents(QObject * receiver); + static void killPendingEvents(TQObject * receiver); private: #ifndef COMPILE_ON_WINDOWS - QSocketNotifier * m_pSn; + TQSocketNotifier * m_pSn; #endif KviMutex * m_pMutex; // This class performs only atomic operations KviPointerList<KviThread> * m_pThreadList; @@ -365,8 +366,8 @@ protected: void threadEnteredWaitState(); void threadLeftWaitState(); - void postSlaveEvent(QObject *o,QEvent *e); - void killPendingEventsByReceiver(QObject * receiver); + void postSlaveEvent(TQObject *o,TQEvent *e); + void killPendingEventsByReceiver(TQObject * receiver); // Public to KviApp only static void globalInit(); static void globalDestroy(); |