@@ -8,9 +8,12 Q_LOGGING_CATEGORY(LOG_SqpApplication, "SqpApplication") | |||
|
8 | 8 | |
|
9 | 9 | class SqpApplication::SqpApplicationPrivate { |
|
10 | 10 | public: |
|
11 | SqpApplicationPrivate() : m_DataSourceController{std::make_unique<DataSourceController>()} | |
|
11 | SqpApplicationPrivate() | |
|
12 | : m_DataSourceController{std::make_unique<DataSourceController>()}, | |
|
13 | m_VisualizationController{std::make_unique<VisualizationController>()} | |
|
12 | 14 | { |
|
13 | 15 | m_DataSourceController->moveToThread(&m_DataSourceControllerThread); |
|
16 | m_VisualizationController->moveToThread(&m_VisualizationControllerThread); | |
|
14 | 17 | } |
|
15 | 18 | |
|
16 | 19 | virtual ~SqpApplicationPrivate() |
@@ -19,14 +22,14 public: | |||
|
19 | 22 | m_DataSourceControllerThread.quit(); |
|
20 | 23 | m_DataSourceControllerThread.wait(); |
|
21 | 24 | |
|
22 | m_VisualizationThread.quit(); | |
|
23 | m_VisualizationThread.wait(); | |
|
25 | m_VisualizationControllerThread.quit(); | |
|
26 | m_VisualizationControllerThread.wait(); | |
|
24 | 27 | } |
|
25 | 28 | |
|
26 | 29 | std::unique_ptr<DataSourceController> m_DataSourceController; |
|
27 | 30 | std::unique_ptr<VisualizationController> m_VisualizationController; |
|
28 | 31 | QThread m_DataSourceControllerThread; |
|
29 | QThread m_VisualizationThread; | |
|
32 | QThread m_VisualizationControllerThread; | |
|
30 | 33 | }; |
|
31 | 34 | |
|
32 | 35 | |
@@ -40,14 +43,14 SqpApplication::SqpApplication(int &argc, char **argv) | |||
|
40 | 43 | connect(&impl->m_DataSourceControllerThread, &QThread::finished, |
|
41 | 44 | impl->m_DataSourceController.get(), &DataSourceController::finalize); |
|
42 | 45 | |
|
43 |
connect(&impl->m_VisualizationThread, &QThread::started, |
|
|
44 | &VisualizationController::initialize); | |
|
45 |
connect(&impl->m_VisualizationThread, &QThread::finished, |
|
|
46 | &VisualizationController::finalize); | |
|
46 | connect(&impl->m_VisualizationControllerThread, &QThread::started, | |
|
47 | impl->m_VisualizationController.get(), &VisualizationController::initialize); | |
|
48 | connect(&impl->m_VisualizationControllerThread, &QThread::finished, | |
|
49 | impl->m_VisualizationController.get(), &VisualizationController::finalize); | |
|
47 | 50 | |
|
48 | 51 | |
|
49 | 52 | impl->m_DataSourceControllerThread.start(); |
|
50 | impl->m_VisualizationThread.start(); | |
|
53 | impl->m_VisualizationControllerThread.start(); | |
|
51 | 54 | } |
|
52 | 55 | |
|
53 | 56 | SqpApplication::~SqpApplication() |
General Comments 0
You need to be logged in to leave comments.
Login now