-
Notifications
You must be signed in to change notification settings - Fork 0
/
GrimoireCalculator.h
59 lines (50 loc) · 1.25 KB
/
GrimoireCalculator.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
#ifndef GRIMOIRECALCULATOR_H
#define GRIMOIRECALCULATOR_H
#include <QtWidgets/QMainWindow>
#include <cmath>
#include <qmessagebox.h>
#include <string>
#include <sys/stat.h>
#include <fstream>
#include <QCloseEvent>
#include <thread>
#include "ui_GrimoireCalculator.h"
class GrimoireCalculator : public QMainWindow
{
Q_OBJECT
public:
GrimoireCalculator(QWidget *parent = Q_NULLPTR);
private:
Ui::GrimoireCalculatorClass ui;
int timeHour;
int timeMin;
int timeSec;
bool realTimeActivated = false;
std::thread realTimeThread;
bool _calculate();
void _updateCost();
void _updateTime();
void _updateTimeFormat();
void _activateSpell(int spellCost);
void _errorDisplay(QString &errorMessage);
void _readState();
void _saveState();
void _realTime();
void closeEvent(QCloseEvent *event);
private slots:
void calculatePressed();
void maxCurrentMagicPressed();
void realTimePressed();
void helpPressed();
void aboutPressed();
void spell1Pressed();
void spell2Pressed();
void spell3Pressed();
void spell4Pressed();
void spell5Pressed();
void spell6Pressed();
void spell7Pressed();
void spell8Pressed();
void spell9Pressed();
};
#endif // GRIMOIRECALCULATOR_H