-
Notifications
You must be signed in to change notification settings - Fork 0
/
Window.h
66 lines (57 loc) · 1.22 KB
/
Window.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
#ifndef WINDOW_H_
#define WINDOW_H_
#include <QtGui>
#include "Renderer.h"
#include "Simulation.h"
#include "CreatureBar.h"
#include "Incoming.h"
#include "Outgoing.h"
#define THREADS 1
#define STAT_INTERVAL 1000
#define DEVELOPER_MODE
class Window: public QMainWindow
{
Q_OBJECT
public:
Window(int threads);
virtual ~Window();
void initGui();
void closeEvent ( QCloseEvent * event );
public slots:
void valueChanged(int val);
void ageView();
void genomeView();
void lineageView();
void logoView();
void sizeView();
void energyView();
void energy2View();
void toxicView();
void injectedView();
void close();
void load(QString file);
void save(QString file);
void selectPond(QAction * pond);
void stat();
void savePond();
void loadPond();
void resetPond();
void resetAllPonds();
void configNetwork();
void addCell();
private:
void closing();
Simulation *simulation;
Renderer *renderer;
CreatureBar *creatureBar;
QSlider *slider;
QActionGroup *viewsGroup;
QActionGroup *pondsGroup;
QSemaphore *sema; //controls the rendering and loading
QList <Simulation *>*simus;
QQueue <struct Cell>*genepool;
QSemaphore *genepoolblocker;
Incoming *incRequests;
Outgoing *outRequests;
};
#endif /*WINDOW_H_*/