ScriptSettingsBoolean.cc 1015 Bytes
Newer Older
1
2
3
4
#include "ScriptSettingsBoolean.hh"
#include "ACG/Utils/ColorConversion.hh"

ScriptSettingsBoolean::ScriptSettingsBoolean()
5
6
7
8
9
    : ScriptSettings(nullptr),
      widget_(nullptr)
{
    assert(false);
}
10
11

ScriptSettingsBoolean::ScriptSettingsBoolean(BooleanWidget *widget)
12
13
    : ScriptSettings(widget),
      widget_(widget)
14
15
16
{}

ScriptSettingsBoolean::ScriptSettingsBoolean(const ScriptSettingsBoolean &other)
17
18
    : ScriptSettings(other.widget_),
      widget_(other.widget_)
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{}

ScriptSettingsBoolean::~ScriptSettingsBoolean() {}

const Vector4 ScriptSettingsBoolean::colorTrue() const
{
    return ACG::to_Vec4d(widget_->colorTrue ->color());
}

const Vector4 ScriptSettingsBoolean::colorFalse() const
{
    return ACG::to_Vec4d(widget_->colorFalse->color());
}

void ScriptSettingsBoolean::setColorTrue(const Vector4 &color)
{
    widget_->colorTrue ->setColor(ACG::to_QColor(color));
}

void ScriptSettingsBoolean::setColorFalse(const Vector4 &color)
{
    widget_->colorFalse->setColor(ACG::to_QColor(color));
}