hivemind 1.0.0
Loading...
Searching...
No Matches
main_window.h
Go to the documentation of this file.
1#pragma once
2
3#include "gui/main_content.h"
4#include "gui/map_dialog.h"
5#include "gui/menu_bar.h"
6
7#include <QMainWindow>
8
9namespace Gui
10{
11
12 /// \brief Handles the main window of Hivemind
13 ///
14 /// This class is responsible for handling the main window of Hivemind,
15 /// which contains the core functionality such as scenario editing,
16 /// simulation and launching.
17 class MainWindow : public QMainWindow
18 {
19 Q_OBJECT
20
21 public:
22 /// \brief Constructs the main window
23 ///
24 /// \param parent The parent widget of main window
25 MainWindow(QWidget* parent = nullptr);
26
27 /// \brief Descructs the main window
29
30 signals:
32 std::pair<CompileScenario::Scenario::RouteMap::iterator,
33 CompileScenario::Scenario::RouteMap::iterator>);
35 void AgentAdded(std::pair<std::vector<Core::Agent>::iterator,
36 std::vector<Core::Agent>::iterator>);
38
39 private:
41
42 private slots:
43 void SaveScenario(const std::string& filepath);
44 void LoadScenario(const std::string& filepath);
45 void UpdateScenario(float, float, float);
46 void CompileScenario();
47 void CreateNewAgent();
48
49 private:
50 /// \brief The menu bar of the main window.
52
53 /// \brief The main content of the main window. Basically all content
54 /// other than the menubar.
56
57 std::shared_ptr<CompileScenario::Scenario> m_Scenario;
59 };
60
61} // namespace Gui
The main content of the main window.
Definition: main_content.h:17
Handles the main window of Hivemind.
Definition: main_window.h:18
std::shared_ptr< CompileScenario::Scenario > m_Scenario
Definition: main_window.h:57
void UpdateScenario(float, float, float)
~MainWindow()
Descructs the main window.
Definition: main_window.cpp:37
void AgentAdded(std::pair< std::vector< Core::Agent >::iterator, std::vector< Core::Agent >::iterator >)
void LoadScenario(const std::string &filepath)
void CompileScenario()
void SyncAgentColor()
MainContent * m_MainContent
The main content of the main window.
Definition: main_window.h:55
MapDialog * m_ScenarioSettingsDialog
Definition: main_window.h:58
MenuBar * m_MenuBar
The menu bar of the main window.
Definition: main_window.h:51
void ScenarioLoaded()
void SaveScenario(const std::string &filepath)
void ScenarioCompiled(std::pair< CompileScenario::Scenario::RouteMap::iterator, CompileScenario::Scenario::RouteMap::iterator >)
void ConnectSlotsAndSignals()
Definition: main_window.cpp:40
The MapDialog class represents a dialog window for inputting map data.
Definition: map_dialog.h:16
The main menubar of the user interface.
Definition: menu_bar.h:14
Definition: action.h:6