-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathengine.h
More file actions
35 lines (31 loc) · 706 Bytes
/
engine.h
File metadata and controls
35 lines (31 loc) · 706 Bytes
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
#ifndef ENGINE_H
#define ENGINE_H
#include <QObject>
#include <QTimer>
#include <vector>
#include "directedgraph.h"
class Engine: public QObject
{
Q_OBJECT
public:
DirectedGraph * graph;
static Engine * engine;
static Engine * getInstance(){
if(engine==NULL){
engine=new Engine();
}
return engine;
}
DirectedGraph * getGraph();
void removeGraph();
private:
explicit Engine(QObject *parent = 0);
Engine(const Engine & en);
signals:
void changedGraph(QObject * sender);
public slots:
void updateGraph(QObject * sender = NULL);
void changeGraphSize(int newSize);
void setGraph(DirectedGraph *);
};
#endif // ENGINE_H