-
Notifications
You must be signed in to change notification settings - Fork 0
/
graphics.h
52 lines (37 loc) · 977 Bytes
/
graphics.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 GRAPHICS_H
#define GRAPHICS_H
#include <QWidget>
#include <QGraphicsLineItem>
#include <QGraphicsSceneMouseEvent>
#include <QShortcut>
#include <QTimer>
#include "ui_graphics.h"
#include "graphicsscene.h"
namespace Ui {
class Graphics;
}
class Graphics : public QWidget, Ui_Graphics
{
Q_OBJECT
public:
explicit Graphics(QWidget *parent = 0);
~Graphics();
bool eventFilter(QObject *object, QEvent *event);
private:
GraphicsScene *scene;
Ui::Graphics *ui;
QShortcut *keyEsc;
int resizeCount;
int gridScale;
void initScene();
void setEmptyDots(QGraphicsLineItem *lineItem);
private slots:
void slotSetCenterOn(DotItem *dotItem, int dotNumber);
void slotShowTurnChange();
void slotchangeScore(int scoreChange,QColor playerColor);
void slotSaveHistoryScore(DotItem *);
void slotRegainHistoryScore(DotItem *);
void slotClearGameProgress();
void slotProgressBar();
};
#endif // GRAPHICS_H