-
Notifications
You must be signed in to change notification settings - Fork 0
/
inputscene.h
52 lines (45 loc) · 1.15 KB
/
inputscene.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 INPUTSCENE_H
#define INPUTSCENE_H
#include <QObject>
#include <QGraphicsScene>
#include <QGraphicsSimpleTextItem>
#include <QDebug>
#include <QGraphicsSceneMouseEvent>
#include <QList>
#include <QKeyEvent>
#include <QDialog>
#include <QTime>
class InputScene : public QGraphicsScene
{
Q_OBJECT
public:
explicit InputScene(QObject *parent = 0, QList<QString> *chars = 0, bool iterable = false);
~InputScene();
signals:
public slots:
private:
QGraphicsSimpleTextItem *commandText;
QGraphicsSimpleTextItem *xText;
QGraphicsSimpleTextItem *responseText;
QGraphicsEllipseItem *circle;
void mousePressEvent(QGraphicsSceneMouseEvent *event);
void keyPressEvent(QKeyEvent *event);
void keyReleaseEvent(QKeyEvent *event);
QList<QString> *chars, *charsCopy;
QObject *parent;
int count;
QChar actual;
bool firstAction;
QTime lastTime;
QTime firstActionTime;
int actionCount, wrong;
bool withControl, withShift;
bool controlPressed, shiftPressed;
bool click;
int yMouse, xMouse;
int clickCount;
int distanceSum;
bool iterable;
void initialize();
};
#endif // INPUTSCENE_H