-
Notifications
You must be signed in to change notification settings - Fork 0
/
statemanager.h
47 lines (39 loc) · 941 Bytes
/
statemanager.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
#ifndef STATEMANAGER_H
#define STATEMANAGER_H
//QT Classes
#include <QObject>
#include <QLayout>
//Custom Classes
#include "states/loadstate.h"
#include "states/menustate.h"
#include "custom_widgets/menubutton.h"
#include "custom_widgets/textinput.h"
#include "custom_widgets/processbutton.h"
class StateManager : public QObject
{
Q_OBJECT
public:
explicit StateManager(QMainWindow* window = nullptr);
~StateManager();
int randInt(int low, int high);
signals:
public slots:
void loadScreen(State *state);
void resize();
void nextMenu();
private:
void removeScreen();
QVector <QPlainTextEdit*> getInputs(State* state);
void stylize(QWidget* widget);
//Main Window
QMainWindow* window;
//Layout
QLayout* mainLayout;
State* currentState;
int currentStateNumber;
//All screens
QVector <State*> states;
//Timer
QTimer* timer;
};
#endif // STATEMANAGER_H