![]() |
hivemind 1.0.0
|
Handles the main window of Hivemind. More...
#include <main_window.h>
Signals | |
void | ScenarioCompiled (std::pair< CompileScenario::Scenario::RouteMap::iterator, CompileScenario::Scenario::RouteMap::iterator >) |
void | ScenarioLoaded () |
void | AgentAdded (std::pair< std::vector< Core::Agent >::iterator, std::vector< Core::Agent >::iterator >) |
void | SyncAgentColor () |
Public Member Functions | |
MainWindow (QWidget *parent=nullptr) | |
Constructs the main window. | |
~MainWindow () | |
Descructs the main window. | |
Private Slots | |
void | SaveScenario (const std::string &filepath) |
void | LoadScenario (const std::string &filepath) |
void | UpdateScenario (float, float, float) |
void | CompileScenario () |
void | CreateNewAgent () |
Private Member Functions | |
void | ConnectSlotsAndSignals () |
Private Attributes | |
MenuBar * | m_MenuBar |
The menu bar of the main window. | |
MainContent * | m_MainContent |
The main content of the main window. | |
std::shared_ptr< CompileScenario::Scenario > | m_Scenario |
MapDialog * | m_ScenarioSettingsDialog |
Handles the main window of Hivemind.
This class is responsible for handling the main window of Hivemind, which contains the core functionality such as scenario editing, simulation and launching.
Definition at line 17 of file main_window.h.
Gui::MainWindow::MainWindow | ( | QWidget * | parent = nullptr | ) |
Constructs the main window.
parent | The parent widget of main window |
Definition at line 18 of file main_window.cpp.
References ConnectSlotsAndSignals(), CreateNewAgent(), m_MainContent, and m_MenuBar.
Gui::MainWindow::~MainWindow | ( | ) |
Descructs the main window.
Definition at line 37 of file main_window.cpp.
|
signal |
Referenced by ConnectSlotsAndSignals(), CreateNewAgent(), and LoadScenario().
|
privateslot |
Definition at line 161 of file main_window.cpp.
References m_Scenario, and ScenarioCompiled().
Referenced by ConnectSlotsAndSignals().
|
private |
Definition at line 40 of file main_window.cpp.
References AgentAdded(), CompileScenario(), CreateNewAgent(), Gui::MapViewer::DataReceived(), MapManagement::MapManager::GotImage(), KeyframeManagement::KeyframeManager::Instance(), MapManagement::MapManager::Instance(), LoadScenario(), m_MenuBar, m_ScenarioSettingsDialog, MapManagement::MapManager::RequestImage(), SaveScenario(), ScenarioCompiled(), ScenarioLoaded(), SyncAgentColor(), UpdateScenario(), and Gui::MapViewer::WaitForData().
Referenced by MainWindow().
|
privateslot |
Definition at line 169 of file main_window.cpp.
References AgentAdded(), getRandomColor(), m_Scenario, and SyncAgentColor().
Referenced by ConnectSlotsAndSignals(), and MainWindow().
|
privateslot |
Definition at line 145 of file main_window.cpp.
References AgentAdded(), m_Scenario, and ScenarioLoaded().
Referenced by ConnectSlotsAndSignals().
|
privateslot |
Definition at line 139 of file main_window.cpp.
References m_Scenario.
Referenced by ConnectSlotsAndSignals().
|
signal |
Referenced by CompileScenario(), and ConnectSlotsAndSignals().
|
signal |
Referenced by ConnectSlotsAndSignals(), and LoadScenario().
|
signal |
Referenced by ConnectSlotsAndSignals(), and CreateNewAgent().
|
privateslot |
Definition at line 154 of file main_window.cpp.
References m_Scenario.
Referenced by ConnectSlotsAndSignals().
|
private |
The main content of the main window.
Basically all content other than the menubar.
Definition at line 55 of file main_window.h.
Referenced by MainWindow().
|
private |
The menu bar of the main window.
Definition at line 51 of file main_window.h.
Referenced by ConnectSlotsAndSignals(), and MainWindow().
|
private |
Definition at line 57 of file main_window.h.
Referenced by CompileScenario(), CreateNewAgent(), LoadScenario(), SaveScenario(), and UpdateScenario().
|
private |
Definition at line 58 of file main_window.h.
Referenced by ConnectSlotsAndSignals().