summaryrefslogtreecommitdiff
path: root/src/rendersettings.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-12-19 14:41:11 (GMT)
committerMarius Kintel <marius@kintel.net>2011-12-19 14:41:11 (GMT)
commit87ce149df2581361e8975bd1a0addf2b6ef61e3d (patch)
treec68db815a72cc767b6d51be0a57e9946c5f0a619 /src/rendersettings.cc
parentba1f0b7489dd5fa9bdc8c44068040f13113b40d0 (diff)
parent638743e2201c6869b48857dd2db5ec01df665162 (diff)
Merge branch 'master' into boost_filesystem
Conflicts: boost.pri tests/CMakeLists.txt
Diffstat (limited to 'src/rendersettings.cc')
-rw-r--r--src/rendersettings.cc35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/rendersettings.cc b/src/rendersettings.cc
new file mode 100644
index 0000000..ee57c34
--- /dev/null
+++ b/src/rendersettings.cc
@@ -0,0 +1,35 @@
+#include "rendersettings.h"
+
+RenderSettings *RenderSettings::inst(bool erase)
+{
+ static RenderSettings *instance = new RenderSettings;
+ if (erase) {
+ delete instance;
+ instance = NULL;
+ }
+ return instance;
+}
+
+RenderSettings::RenderSettings()
+{
+ this->colors[BACKGROUND_COLOR] = QColor(0xff, 0xff, 0xe5);
+ this->colors[OPENCSG_FACE_FRONT_COLOR] = QColor(0xf9, 0xd7, 0x2c);
+ this->colors[OPENCSG_FACE_BACK_COLOR] = QColor(0x9d, 0xcb, 0x51);
+ this->colors[CGAL_FACE_FRONT_COLOR] = QColor(0xf9, 0xd7, 0x2c);
+ this->colors[CGAL_FACE_BACK_COLOR] = QColor(0x9d, 0xcb, 0x51);
+ this->colors[CGAL_FACE_2D_COLOR] = QColor(0x00, 0xbf, 0x99);
+ this->colors[CGAL_EDGE_FRONT_COLOR] = QColor(0xff, 0x00, 0x00);
+ this->colors[CGAL_EDGE_BACK_COLOR] = QColor(0xff, 0x00, 0x00);
+ this->colors[CGAL_EDGE_2D_COLOR] = QColor(0xff, 0x00, 0x00);
+ this->colors[CROSSHAIR_COLOR] = QColor(0x80, 0x00, 0x00);
+}
+
+QColor RenderSettings::color(RenderColor idx) const
+{
+ return this->colors[idx];
+}
+
+void RenderSettings::setColors(const QMap<RenderColor, QColor> &colors)
+{
+ this->colors = colors;
+}
contact: Jan Huwald // Impressum