forked from OpenDDS/OpenDDS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDDSShapeDynamics.hpp
66 lines (55 loc) · 1.28 KB
/
DDSShapeDynamics.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
66
#ifndef _DDSSHAPEDYNAMICS_HPP
#define _DDSSHAPEDYNAMICS_HPP
#include "ShapeTypeTypeSupportC.h"
#include <ShapeDynamics.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 <QtCore/QRect>
#include <QtGui/QtGui>
#include <Shape.hpp>
#ifdef __GNUC__
# pragma GCC diagnostic pop
#endif
#define CN 9
class DDSShapeDynamics : public ShapeDynamics {
public:
enum {
BLUE = 0,
RED = 1,
GREEN = 2,
ORANGE = 3,
YELLOW = 4,
MAGENTA = 5,
CYAN = 6,
GRAY = 7,
BLACK = 8
};
public:
DDSShapeDynamics(
int x0, int y0,
org::omg::dds::demo::ShapeTypeDataReader_var& shapeReader,
const std::string& color,
int colorIdx);
virtual ~DDSShapeDynamics();
public:
void setShape(std::shared_ptr<Shape> shape) {
shape_ = shape;
}
virtual void simulate();
private:
DDSShapeDynamics(const DDSShapeDynamics& orig);
std::shared_ptr<Shape> shape_;
int x0_;
int y0_;
org::omg::dds::demo::ShapeTypeDataReader_var shapeReader_;
bool attached_;
std::string color_;
int colorIdx_;
QColor colorList_[CN];
bool updateBounds_;
};
#endif /* _DDSSHAPEDYNAMICS_HPP */