source:
GTP/trunk/Lib/Vis/Preprocessing/src/QtInterface/QtPreprocessorThread.h
@
2608
Revision 2608, 687 bytes checked in by bittner, 17 years ago (diff) | |
---|---|
|
Rev | Line | |
---|---|---|
[1387] | 1 | #ifndef __QT_PREPROCESSOR_THREAD_H |
2 | #define __QT_PREPROCESSOR_THREAD_H | |
3 | ||
[2608] | 4 | #ifdef USE_QT |
[1926] | 5 | |
[1387] | 6 | #include <QThread> |
7 | #include "PreprocessorThread.h" | |
8 | ||
9 | namespace GtpVisibilityPreprocessor { | |
10 | ||
11 | class Preprocessor; | |
12 | ||
[1613] | 13 | class QtPreprocessorThread : public PreprocessorThread, public QThread |
[1387] | 14 | { |
15 | public: | |
[1926] | 16 | QtPreprocessorThread(Preprocessor *p, QObject *parent = 0); |
17 | ~QtPreprocessorThread(); | |
[1867] | 18 | |
[1926] | 19 | void InitThread() { |
20 | PreprocessorThread::InitThread(); | |
21 | } | |
22 | void RunThread() { | |
23 | start(QThread::LowPriority); | |
24 | } | |
[1867] | 25 | |
[1926] | 26 | // This function has to be defined by the thread library used... |
27 | virtual int GetCurrentThreadId() const; | |
28 | ||
[1387] | 29 | protected: |
[1926] | 30 | void run() { |
31 | Main(); | |
32 | } | |
[1387] | 33 | }; |
34 | ||
35 | } | |
[1926] | 36 | |
[1387] | 37 | #endif |
[2608] | 38 | #endif |
Note: See TracBrowser
for help on using the repository browser.