summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/eek-color-def.cpp21
-rw-r--r--src/widgets/eek-color-def.h1
2 files changed, 22 insertions, 0 deletions
diff --git a/src/widgets/eek-color-def.cpp b/src/widgets/eek-color-def.cpp
index d7cb41b38..6334061c2 100644
--- a/src/widgets/eek-color-def.cpp
+++ b/src/widgets/eek-color-def.cpp
@@ -62,6 +62,27 @@ ColorDef::ColorDef() :
{
}
+ColorDef::ColorDef( ColorType type ) :
+ descr(),
+ type(type),
+ r(0),
+ g(0),
+ b(0),
+ editable(false)
+{
+ switch (type) {
+ case CLEAR:
+ descr = _("remove");
+ break;
+ case NONE:
+ descr = _("none");
+ break;
+ case RGB:
+ descr = "";
+ break;
+ }
+}
+
ColorDef::ColorDef( unsigned int r, unsigned int g, unsigned int b, const std::string& description ) :
descr(description),
type(RGB),
diff --git a/src/widgets/eek-color-def.h b/src/widgets/eek-color-def.h
index 764a28b12..7e54182d6 100644
--- a/src/widgets/eek-color-def.h
+++ b/src/widgets/eek-color-def.h
@@ -55,6 +55,7 @@ public:
enum ColorType{CLEAR, NONE, RGB};
ColorDef();
+ ColorDef(ColorType type);
ColorDef( unsigned int r, unsigned int g, unsigned int b, const std::string& description );
virtual ~ColorDef();