Developer Documentation

ScriptSettingsVector.hh
1 #ifndef SCRIPTSETTINGSVECTOR_HH
2 #define SCRIPTSETTINGSVECTOR_HH
3
4 #include <QObject>
5 #include "ScriptSettings.hh"
6
7 #include "Widgets/VectorWidget.hh"
8 #include "ACG/Math/VectorT.hh"
9 #include "OpenFlipper/common/DataTypes.hh"
10
11 class ScriptSettingsVector : public ScriptSettings
12 {
13 Q_OBJECT
14
15 Q_PROPERTY(Type type READ type WRITE setType)
16 Q_PROPERTY(bool normalize READ normalize WRITE setNormalize)
17 Q_PROPERTY(bool doScale READ doScale WRITE setDoScale)
18 Q_PROPERTY(double scaleFactor READ scaleFactor WRITE setScaleFactor)
19 Q_PROPERTY(Vector4 lineColor READ lineColor WRITE setLineColor)
20 Q_PROPERTY(double lineWidth READ lineWidth WRITE setLineWidth)
21
22 public:
23 enum class Type {Strokes, Rgb, Edges, LengthColor};
24 Q_ENUM(Type)
25
26 explicit ScriptSettingsVector();
27 explicit ScriptSettingsVector(VectorWidget *widget);
28 explicit ScriptSettingsVector(const ScriptSettingsVector &other);
29 virtual ~ScriptSettingsVector();
30
31 Type type() const;
32 bool normalize() const;
33 bool doScale() const;
34 double scaleFactor() const;
35 Vector4 lineColor() const;
36 double lineWidth();
37
38 public slots:
39 void setType(Type type);
40 void setNormalize(bool normalize);
41 void setDoScale(bool doScale);
42 void setScaleFactor(double scaleFactor);
43 void setLineColor(const Vector4 &lineColor);
44 void setLineWidth(double width);
45
46 private:
47 VectorWidget *widget_;
48 };
49 Q_DECLARE_METATYPE(ScriptSettingsVector)
50
51 #endif // SCRIPTSETTINGSVECTOR_HH
DataTypes.hh
VectorWidget
Definition: VectorWidget.hh:46
ScriptSettings
Definition: ScriptSettings.hh:10
OpenMesh::VectorT
Definition: Vector11T.hh:83
ScriptSettingsVector
Definition: ScriptSettingsVector.hh:11