From dfb99b674b4926ea3e8a7589b5a8bdbcd2bc64c9 Mon Sep 17 00:00:00 2001 From: Nav Date: Mon, 18 Oct 2021 00:33:41 +0100 Subject: [PATCH] Rearranged Insight class member declaration --- src/Insight/Insight.hpp | 59 +++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/src/Insight/Insight.hpp b/src/Insight/Insight.hpp index 6317d73c..6b128858 100644 --- a/src/Insight/Insight.hpp +++ b/src/Insight/Insight.hpp @@ -26,35 +26,7 @@ namespace Bloom */ class Insight: public QObject, public Thread { - Q_OBJECT - private: - std::string qtApplicationName = "Bloom"; - std::array qtApplicationArgv = {this->qtApplicationName.data()}; - int qtApplicationArgc = 1; - - ApplicationConfig applicationConfig; - EnvironmentConfig environmentConfig; - InsightConfig insightConfig; - - EventManager& eventManager; - EventListenerPointer eventListener = std::make_shared("InsightEventListener"); - - QApplication application; - InsightWorker* insightWorker = new InsightWorker(this->eventManager); - InsightWindow* mainWindow = new InsightWindow(*(this->insightWorker)); - - TargetControllerConsole targetControllerConsole = TargetControllerConsole( - this->eventManager, - *(this->eventListener) - ); - - /** - * Insight consists of two threads - the main thread where the main Qt event loop runs (for the GUI), and - * a single worker thread to handle any blocking/time-expensive operations. - */ - QThread* workerThread = nullptr; - - void startup(); + Q_OBJECT public: /** @@ -94,6 +66,35 @@ namespace Bloom */ void run(); + private: + std::string qtApplicationName = "Bloom"; + std::array qtApplicationArgv = {this->qtApplicationName.data()}; + int qtApplicationArgc = 1; + + ApplicationConfig applicationConfig; + EnvironmentConfig environmentConfig; + InsightConfig insightConfig; + + EventManager& eventManager; + EventListenerPointer eventListener = std::make_shared("InsightEventListener"); + + QApplication application; + InsightWorker* insightWorker = new InsightWorker(this->eventManager); + InsightWindow* mainWindow = new InsightWindow(*(this->insightWorker)); + + TargetControllerConsole targetControllerConsole = TargetControllerConsole( + this->eventManager, + *(this->eventListener) + ); + + /** + * Insight consists of two threads - the main thread where the main Qt event loop runs (for the GUI), and + * a single worker thread to handle any blocking/time-expensive operations. + */ + QThread* workerThread = nullptr; + + void startup(); + /** * Shuts down Insight. Called when the user closes the Insight window. */