forked from OpenDDS/OpenDDS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShapesWidget.hpp
56 lines (43 loc) · 1.08 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
#ifndef _SHAPESWIDGET_HPP
#define _SHAPESWIDGET_HPP
// Tell GCC to ignore implicitly declared copy methods as long as
// Qt is not compliant.
#ifdef __GNUC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-copy"
#endif
#include <QtWidgets/QWidget>
#include <QtCore/QRect>
#include <QtGui/QPixmap>
#ifdef __GNUC__
# pragma GCC diagnostic pop
#endif
#include <vector>
#include <Shape.hpp>
class ShapesWidget : public QWidget
{
Q_OBJECT
public:
typedef std::vector<std::shared_ptr<Shape> > ShapeList;
typedef std::vector<QRect> FilterList;
public:
ShapesWidget(QWidget *parent = 0);
virtual ~ShapesWidget();
public:
void addFilter(const QRect& filter);
void displayFilter(const QRect& currentFilter);
public slots:
void nextAnimationFrame();
void addShape(std::shared_ptr<Shape> shape);
protected:
void paintEvent(QPaintEvent *event);
private:
ShapesWidget(const ShapesWidget& orig);
private:
ShapeList shapeList_;
FilterList filterList_;
QRect currentFilter_;
bool showCurrentFilter_;
QPixmap logo_;
};
#endif /* _SHAPESWIDGET_HPP */