summaryrefslogtreecommitdiffstats
path: root/templatelayout.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-20 06:14:19 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-20 06:14:19 -0700
commite3a8ff74934c8f5a11ee962650e889464da55522 (patch)
tree6bd206e1df040c4b504e00f5c71e295b8d17b6bd /templatelayout.h
parent7baa18db5fe33f5797e4603a4c2efafc6b474bd0 (diff)
parent599920c6cfd87a213634097045e29f592390438b (diff)
downloadsubsurface-e3a8ff74934c8f5a11ee962650e889464da55522.tar.gz
Merge branch 'custom-print' of github.com:neolit123/subsurface
Diffstat (limited to 'templatelayout.h')
-rw-r--r--templatelayout.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/templatelayout.h b/templatelayout.h
index 622f7d7a0..e37e9e868 100644
--- a/templatelayout.h
+++ b/templatelayout.h
@@ -79,6 +79,7 @@ public:
Q_DECLARE_METATYPE(Dive)
Q_DECLARE_METATYPE(template_options)
+Q_DECLARE_METATYPE(print_options)
GRANTLEE_BEGIN_LOOKUP(Dive)
if (property == "number")
@@ -123,6 +124,26 @@ if (property == "font") {
return object.font_size / 9.0;
} else if (property == "line_spacing") {
return object.line_spacing;
+} else if (property == "color1") {
+ return object.color_palette.color1.name();
+} else if (property == "color2") {
+ return object.color_palette.color2.name();
+} else if (property == "color3") {
+ return object.color_palette.color3.name();
+} else if (property == "color4") {
+ return object.color_palette.color4.name();
+} else if (property == "color5") {
+ return object.color_palette.color5.name();
+}
+GRANTLEE_END_LOOKUP
+
+GRANTLEE_BEGIN_LOOKUP(print_options)
+if (property == "grayscale") {
+ if (object.color_selected) {
+ return "";
+ } else {
+ return "-webkit-filter: grayscale(100%)";
+ }
}
GRANTLEE_END_LOOKUP