Cluedo Solver v1.0
Cluedo game solver making deductions.
Loading...
Searching...
No Matches
MainWindow.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "../Solver.hpp"
5#include "NewGameModal.hpp"
6#include "PlayerDataModal.hpp"
7
10
11namespace Cluedo {
12
13namespace UI {
14
28public:
30 explicit MainWindow();
31
33 void show();
34
35private:
36 void show_game_menu();
37 void show_settings_menu();
38 void show_about_menu();
39 void show_menubar();
40
41 void show_information_history_section();
42 void show_solutions_section();
43
44 enum class Style {
45 Light,
46 Dark
47 };
48
49 Style m_style { Style::Dark };
50
51 std::optional<Solver> m_solver;
52 std::vector<std::pair<std::string, Solver>> m_information_history;
53 std::vector<Solver::SolutionProbabilityPair> m_solutions;
54
55 bool m_show_new_game_modal { false };
56 NewGameModal m_new_game_modal;
57
58 bool m_show_add_information_modal { false };
59 AddInformationModal m_add_information_modal;
60
61 bool m_show_player_data_modal { false };
62 PlayerDataModal m_player_data_modal;
63};
64
65}
66
67}
The file that contains the definition of the Cluedo::UI::AddInformationModal class.
The file that contains the definition of the Cluedo::UI::NewGameModal class.
The file that contains the definition of the Cluedo::UI::PlayerDataModal class.
The file that contains the definition of the Cluedo::Solver class.
A modal used to add information to the solver.
Definition AddInformationModal.hpp:24
MainWindow()
Constructs the window.
Definition MainWindow.cpp:13
void show()
Shows the window.
Definition MainWindow.cpp:160
A modal used to create a new game.
Definition NewGameModal.hpp:19
A modal that shows the player data of a running game.
Definition PlayerDataModal.hpp:16