Rearranged Insight class member declaration

This commit is contained in:
Nav
2021-10-18 00:33:41 +01:00
parent e58bda3be1
commit dfb99b674b

View File

@@ -27,34 +27,6 @@ namespace Bloom
class Insight: public QObject, public Thread class Insight: public QObject, public Thread
{ {
Q_OBJECT Q_OBJECT
private:
std::string qtApplicationName = "Bloom";
std::array<char*, 1> qtApplicationArgv = {this->qtApplicationName.data()};
int qtApplicationArgc = 1;
ApplicationConfig applicationConfig;
EnvironmentConfig environmentConfig;
InsightConfig insightConfig;
EventManager& eventManager;
EventListenerPointer eventListener = std::make_shared<EventListener>("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();
public: public:
/** /**
@@ -94,6 +66,35 @@ namespace Bloom
*/ */
void run(); void run();
private:
std::string qtApplicationName = "Bloom";
std::array<char*, 1> qtApplicationArgv = {this->qtApplicationName.data()};
int qtApplicationArgc = 1;
ApplicationConfig applicationConfig;
EnvironmentConfig environmentConfig;
InsightConfig insightConfig;
EventManager& eventManager;
EventListenerPointer eventListener = std::make_shared<EventListener>("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. * Shuts down Insight. Called when the user closes the Insight window.
*/ */