-
Notifications
You must be signed in to change notification settings - Fork 0
/
puzzleboard.cpp
34 lines (25 loc) · 1.07 KB
/
puzzleboard.cpp
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
#include "puzzleboard.h"
#include <QBrush>
PuzzleBoard::PuzzleBoard()
{
setRect(600, 300, 400, 400);
setBrush(QBrush(QColor(200, 200, 200)));
setAcceptDrops(true);
setZValue(-1);
boardPoints = new QVector<QPointF>;
boardPoints->push_back(QPointF(600, 300)); boardPoints->push_back(QPointF(700, 300));
boardPoints->push_back(QPointF(800, 300)); boardPoints->push_back(QPointF(900, 300));
boardPoints->push_back(QPointF(600, 400)); boardPoints->push_back(QPointF(700, 400));
boardPoints->push_back(QPointF(800, 400)); boardPoints->push_back(QPointF(900, 400));
boardPoints->push_back(QPointF(600, 500)); boardPoints->push_back(QPointF(700, 500));
boardPoints->push_back(QPointF(800, 500)); boardPoints->push_back(QPointF(900, 500));
boardPoints->push_back(QPointF(600, 600)); boardPoints->push_back(QPointF(700, 600));
boardPoints->push_back(QPointF(800, 600)); boardPoints->push_back(QPointF(900, 600));
board = rect();
}
PuzzleBoard::~PuzzleBoard()
{}
QVector<QPointF>* PuzzleBoard::getBoardPoints()
{
return boardPoints;
}