Developer Documentation
Loading...
Searching...
No Matches
ScriptSettingsDouble.cc
1#include "ScriptSettingsDouble.hh"
2#include "ACG/Utils/ColorConversion.hh"
3
4ScriptSettingsDouble::ScriptSettingsDouble()
5 : ScriptSettings(nullptr),
6 widget_(nullptr)
7{
8 assert(false);
9}
10
11ScriptSettingsDouble::ScriptSettingsDouble(
12 DoubleWidget *widget)
13 : ScriptSettings(widget),
14 widget_(widget)
15{}
16
17ScriptSettingsDouble::ScriptSettingsDouble(
18 const ScriptSettingsDouble &other)
19 : ScriptSettings(other.widget_),
20 widget_(other.widget_)
21{}
22
23ScriptSettingsDouble::~ScriptSettingsDouble()
24{}
25
26double ScriptSettingsDouble::rangeMin() const
27{
28 return widget_->doubleFixedRangeMin->value();
29}
30
31double ScriptSettingsDouble::rangeMax() const
32{
33 return widget_->doubleFixedRangeMax->value();
34}
35
36const Vector4 ScriptSettingsDouble::colorMin() const
37{
38 return ACG::to_Vec4d( widget_->doubleMin->color());
39}
40
41const Vector4 ScriptSettingsDouble::colorMax() const
42{
43 return ACG::to_Vec4d( widget_->doubleMax->color());
44}
45
46void ScriptSettingsDouble::setColorMin(const Vector4 &color)
47{
48 widget_->doubleMin->setColor(ACG::to_QColor(color));
49}
50
51void ScriptSettingsDouble::setColorMax(const Vector4 &color)
52{
53 widget_->doubleMax->setColor(ACG::to_QColor(color));
54}
55
56bool ScriptSettingsDouble::useFixedRange() const
57{
58 return widget_->doubleFixedRange->isChecked();
59}
60
61bool ScriptSettingsDouble::mapOutsideRange() const
62{
63 return widget_->doubleMapOutsideRange->isChecked();
64}
65
66bool ScriptSettingsDouble::absolute() const
67{
68 return widget_->doubleAbsolute->isChecked();
69}
70
71void ScriptSettingsDouble::setUseColorCoder(bool useColorCoder)
72{
73 return widget_->doubleColorCoder->setChecked(useColorCoder);
74}
75
76void ScriptSettingsDouble::setUseFixedRange(bool useFixedRange)
77{
78 return widget_->doubleFixedRange->setChecked(useFixedRange);
79}
80
81void ScriptSettingsDouble::setRangeMin(double val)
82{
83 return widget_->doubleFixedRangeMin->setValue(val);
84}
85
86void ScriptSettingsDouble::setRangeMax(double val)
87{
88 return widget_->doubleFixedRangeMax->setValue(val);
89}
90
91void ScriptSettingsDouble::setMapOutsideRange(bool mapOutsideRange)
92{
93 return widget_->doubleMapOutsideRange->setChecked(mapOutsideRange);
94}
95
96void ScriptSettingsDouble::setAbsolute(bool absolute)
97{
98 return widget_->doubleAbsolute->setChecked(absolute);
99}
100
101bool ScriptSettingsDouble::useColorCoder() const
102{
103 return widget_->doubleColorCoder->isChecked();
104}