Revision 1947,
830 bytes
checked in by mattausch, 18 years ago
(diff) |
|
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[1947] | 1 | //#ifdef USE_QT
|
---|
[1926] | 2 |
|
---|
[1387] | 3 | #include <QApplication>
|
---|
| 4 | #include "QtPreprocessorThread.h"
|
---|
| 5 | #include "Camera.h"
|
---|
| 6 | #include "KdTree.h"
|
---|
| 7 | #include "SceneGraph.h"
|
---|
| 8 | #include "Preprocessor.h"
|
---|
| 9 |
|
---|
| 10 |
|
---|
| 11 | namespace GtpVisibilityPreprocessor {
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | QtPreprocessorThread::QtPreprocessorThread(Preprocessor *p,
|
---|
[1926] | 15 | QObject *parent)
|
---|
| 16 | : PreprocessorThread(p), QThread(parent)
|
---|
[1387] | 17 | {
|
---|
[1926] | 18 | if (p->mQuitOnFinish)
|
---|
[1715] | 19 | {
|
---|
[1926] | 20 | connect(this, SIGNAL(finished()), qApp, SLOT(closeAllWindows(void)));
|
---|
[1715] | 21 | }
|
---|
[1387] | 22 | }
|
---|
| 23 |
|
---|
| 24 |
|
---|
| 25 | QtPreprocessorThread::~QtPreprocessorThread()
|
---|
| 26 | {
|
---|
[1926] | 27 | cerr << "Preprocessor thread destructor...\n";
|
---|
[1387] | 28 | }
|
---|
| 29 |
|
---|
[1926] | 30 |
|
---|
[1867] | 31 | int
|
---|
| 32 | QtPreprocessorThread::GetCurrentThreadId() const
|
---|
| 33 | {
|
---|
| 34 | QThread *thread = currentThread();
|
---|
| 35 | for (int i=0; i < sThreads.size(); i++)
|
---|
| 36 | if (sThreads[i] == (QtPreprocessorThread *)thread)
|
---|
| 37 | return i+1;
|
---|
| 38 | return 0;
|
---|
[1387] | 39 | }
|
---|
| 40 |
|
---|
[1867] | 41 | }
|
---|
| 42 |
|
---|
[1947] | 43 | //#endif |
---|
Note: See
TracBrowser
for help on using the repository browser.