-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
89 lines (76 loc) · 3.21 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
* TEAM S.A.M.B.A.M:
* Adam Liu, Aidan Spendlove, Sam Hill,
* Blake England, Matthew Johnson, Michael Wadley
*
* GitHub: https://github.com/University-of-Utah-CS3505/A9EduApp
* Project: Assignment 9 - Educational App
* File: mainwindow.h
*/
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "Box2D/Common/b2Math.h"
#include <QMainWindow>
#include <QRandomGenerator>
QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE
class MainWindow: public QMainWindow {
Q_OBJECT
public:
MainWindow(QWidget* parent = nullptr);
~MainWindow();
private:
/// @brief The UI object
Ui::MainWindow* ui;
/// @brief Controls dynamic in progress label.
QTimer* labelTimer;
QString buttonSelectedStylesheet =
"QPushButton{ background-color: #3f424a; border-style: solid; border-color: black; border-width: 1px; border-radius:0px; } "
"QPushButton:hover { background-color: #3f424a; } QPushButton:hover:pressed { background-color: #5f6470; }";
QString buttonDeselectedStylesheet =
"QPushButton{ background-color: #25272b; border-style: solid; border-color: black; border-width: 1px; border-radius:0px; } "
"QPushButton:hover { background-color: #3f424a; } QPushButton:hover:pressed { background-color: #5f6470; }";
QString colorCheckboxDefaultStyle = "QCheckBox { color: gray; } QCheckBox::indicator:unchecked { border-style:inset; border-color:gray; "
"border-width: 1px; border-radius:3px; width: 25px; height: 25px; }";
signals:
/// @brief Signals to the simulation to update the shape color.
void updateShapeColor(bool override, QColor color);
/// @brief Signals to the simulation to update the background color.
void updateBackgroundColor(bool override, QColor color);
/// @brief Signals to the simulation to update the circle radius.
void updateCircleRadius(int width);
public slots:
/// @brief Slot called when a simulation begins.
void updateSimulationLabel();
private slots:
/// @brief Display the ... animation on the simulation screen.
void startLabelTimer(int milliseconds);
/// @brief Stop the ... animation on the simulation screen.
void stopLabelTimer();
/// @brief Slot called when a button is clicked.
void returnToSettingsButtonClicked();
/// @brief Slot called when a button is clicked.
void startButtonClicked();
/// @brief Slot called when a button is clicked
void exitButtonClicked();
/// @brief Slot called when a button is clicked
void returnHomeClicked();
/// @brief Slot called when a button is clicked
void generalSettingsClicked();
/// @brief Slot called when a button is clicked
void shapeSettingsClicked();
/// @brief Slot called when a button is clicked
void colorSettingsClicked();
/// @brief Slot called when a dropdown option is selected
void shapeSelected(int shape);
/// @brief Slot called when a spinbox is changed
void setCircleRadius(int radius);
/// @brief Slot called when a checkbox is selected
void shapeColorOverride(bool override);
/// @brief Slot called when a checkbox is selected
void backgroundColorOverride(bool override);
};
#endif // MAINWINDOW_H