-
Notifications
You must be signed in to change notification settings - Fork 0
/
boteditor.h
70 lines (50 loc) · 1.22 KB
/
boteditor.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
#ifndef BOTEDITOR_H
#define BOTEDITOR_H
#include <QDialog>
#include <QTimer>
#include <QSpinBox>
#include <QSignalMapper>
#include <QFileDialog>
#include <QMessageBox>
#include <cmath>
#include "botstruct.h"
QT_BEGIN_NAMESPACE
namespace Ui { class BotEditor; }
QT_END_NAMESPACE
class BotEditor : public QDialog
{
Q_OBJECT
public:
explicit BotEditor(QWidget *parent = nullptr);
~BotEditor();
void loadBot(Bot *bot);
void startMon();
void stopMon();
void single();
private:
Ui::BotEditor *ui;
QSignalMapper *tableSignalMapper;
QSignalMapper *infoSignalMapper;
QTimer *infoUpdateTimer;
QTimer *tableUpdateTimer;
Bot *bot;
uint columnCount = 10;
bool inited = false;
bool monitoring = false;
void disableUI(bool control=false);
void enableUI(bool control=false);
void genome2File(QFile *file);
void file2Genome(QFile *file);
void closeEvent(QCloseEvent *event);
private slots:
void renderInfo();
void renderTable();
void resetSelection();
void botKilled();
void botInfoEdited(int index);
void botGenomeEdited(int genomeIndex);
void saveGenome();
void loadGenome();
};
QStringList progression(uint max);
#endif // BOTEDITOR_H