-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstateholder.h
38 lines (32 loc) · 870 Bytes
/
stateholder.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
#ifndef STATEHOLDER_H
#define STATEHOLDER_H
#include <QObject>
#include <QThread>
#include <QTime>
#include <QTimer>
#include "d_format.hpp"
class StateHolder : public QObject
{
Q_OBJECT
public:
explicit StateHolder();
~StateHolder();
signals:
void frameChanged(std::shared_ptr<Frame> renderFrame, int totalCount);
void fieldSizeChange(int w, int h, int cellSize);
void field3d(const P &minP, const P &maxP, double hMin, double hMax, double cellSize);
void staticObject(const SObj &sobj);
public slots:
void process(const Obj &obj);
void onNewConnection();
void tickChanged(int tick);
void update();
void onFileOpen(const QString &fileName);
private:
QThread thread;
std::vector<std::shared_ptr<Frame>> frames;
bool frameWasChanged = false;
QTime qtime;
QTimer *timer;
};
#endif // STATEHOLDER_H