-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenericindicator.h
52 lines (45 loc) · 1.07 KB
/
genericindicator.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
#ifndef GENERICINDICATOR_H
#define GENERICINDICATOR_H
#include <QWidget>
#include "gamestate.h"
#include "instrument_panel.h"
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonValue>
#include <QPoint>
#include <QSize>
#include <QLabel>
#include <QString>
#include <QFont>
#include <QMouseEvent>
#include <QWheelEvent>
#include <QFontMetrics>
class GenericIndicator : public QWidget
{
Q_OBJECT
public:
explicit GenericIndicator(QJsonObject params, int nr, InstrumentPanel *parent = 0, bool edit=1, bool overlay=0);
virtual void mousePressEvent(QMouseEvent *);
virtual void mouseMoveEvent(QMouseEvent *);
virtual void mouseReleaseEvent(QMouseEvent *);
virtual void wheelEvent(QWheelEvent *);
virtual int get_nr()
{
return nr;
}
virtual float getFontSize()
{ return fonts;}
signals:
public slots:
virtual void update_ind(Gamestate*);
protected:
bool editMode;
bool moving;
bool gridMoving;
float fonts;
QJsonObject params;
QLabel text;
int nr;
bool overlay;
};
#endif // GENERICINDICATOR_H