forked from atolab/dds-ishapes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShapesWidget.hpp
65 lines (53 loc) · 1.11 KB
/
ShapesWidget.hpp
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
56
57
58
59
60
61
62
63
64
65
#ifndef _SHAPESWIDGET_HPP
#define _SHAPESWIDGET_HPP
/** @file */
/**
* @addtogroup demos_iShapes
*/
/** @{*/
#include <QtWidgets/QWidget>
#include <QtCore/QRect>
#include <QtGui/QPixmap>
#include <vector>
#include <Shape.hpp>
namespace demo { namespace ishapes {
class ShapesWidget : public QWidget
{
Q_OBJECT
public:
typedef std::vector<Shape::ref_type > ShapeList;
typedef std::vector<QRect> FilterList;
public:
ShapesWidget(QWidget *parent = 0);
virtual ~ShapesWidget();
public:
void addFilter(const QRect& filter);
void displayFilter(const QRect& currentFilter);
bool paused()
{
return paused_;
}
void paused(const bool p)
{
paused_ = p;
}
public slots:
void nextAnimationFrame();
void addShape(Shape::ref_type shape);
protected:
void paintEvent(QPaintEvent *event);
private:
ShapesWidget(const ShapesWidget& orig);
private:
ShapeList shapeList_;
FilterList filterList_;
QRect currentFilter_;
bool showCurrentFilter_;
QPixmap logo_;
QPixmap simd_;
bool paused_;
};
}
}
/** @}*/
#endif /* _SHAPESWIDGET_HPP */