forked from ppikula/quadtri
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDrawingArea.h
More file actions
55 lines (41 loc) · 1.12 KB
/
DrawingArea.h
File metadata and controls
55 lines (41 loc) · 1.12 KB
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
53
54
55
#ifndef DRAWINGAREA_H
#define DRAWINGAREA_H
#include <QtGui>
#include "Polygon.h"
#include "DrawingScene.h"
#include "DrawingStep.h"
class DrawingArea : public QWidget
{
Q_OBJECT
public:
explicit DrawingArea(QWidget *parent = 0);
void startStep(DrawingStep::StepType type);
void stopStep();
void addToQueue(QGraphicsItem *item);
void clearAll();
void clear();
Polygon *polygon() {return basePolygon;}
QList<Polygon*> holesInPoly() {return holes;}
QString polyString();
private slots:
void startStopPoly();
void startStopInnerPloly();
void selectedViewsChanged();
signals:
void polyChanged(Polygon *poly,QList<Polygon*> holes);
public slots:
void polyUpdate();
void sceneDoubleCliked(QGraphicsSceneMouseEvent *event);
private:
/* Controls */
QGraphicsView *view;
DrawingScene *scene;
QPushButton *startStopBut,*startStopInner;
QGroupBox *groupBox;
QRadioButton *noneRadio,*quadrantRadio,*trianglesRadio;
/* Logic items */
Polygon *basePolygon;
QList<Polygon*> holes;
QList<DrawingStep*> renderQueue;
};
#endif // DRAWINGAREA_H