Developer Documentation

ScriptSettingsBoolean.cc
1 #include "ScriptSettingsBoolean.hh"
2 #include "ACG/Utils/ColorConversion.hh"
3
4 ScriptSettingsBoolean::ScriptSettingsBoolean()
5 : ScriptSettings(nullptr),
6 widget_(nullptr)
7 {
8 assert(false);
9 }
10
11 ScriptSettingsBoolean::ScriptSettingsBoolean(BooleanWidget *widget)
12 : ScriptSettings(widget),
13 widget_(widget)
14 {}
15
16 ScriptSettingsBoolean::ScriptSettingsBoolean(const ScriptSettingsBoolean &other)
17 : ScriptSettings(other.widget_),
18 widget_(other.widget_)
19 {}
20
21 ScriptSettingsBoolean::~ScriptSettingsBoolean() {}
22
23 const Vector4 ScriptSettingsBoolean::colorTrue() const
24 {
25 return ACG::to_Vec4d(widget_->colorTrue ->color());
26 }
27
28 const Vector4 ScriptSettingsBoolean::colorFalse() const
29 {
30 return ACG::to_Vec4d(widget_->colorFalse->color());
31 }
32
33 void ScriptSettingsBoolean::setColorTrue(const Vector4 &color)
34 {
35 widget_->colorTrue ->setColor(ACG::to_QColor(color));
36 }
37
38 void ScriptSettingsBoolean::setColorFalse(const Vector4 &color)
39 {
40 widget_->colorFalse->setColor(ACG::to_QColor(color));
41 }
42
ScriptSettings
Definition: ScriptSettings.hh:10
BooleanWidget
Definition: BooleanWidget.hh:46
OpenMesh::VectorT
Definition: Vector11T.hh:83
ScriptSettingsBoolean
Definition: ScriptSettingsBoolean.hh:11