diff options
author | Gehad elrobey <gehadelrobey@gmail.com> | 2015-07-12 05:00:03 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2015-07-20 15:28:20 +0300 |
commit | ad531c25fbf4094f2cbfd54018fe74d710b547f1 (patch) | |
tree | a44f688d1a8e14891fea59595639d400e6c7499e /qt-ui/printoptions.h | |
parent | dcedc8ebea5a686f87d51daefa83728696d26b1a (diff) | |
download | subsurface-ad531c25fbf4094f2cbfd54018fe74d710b547f1.tar.gz |
Printing: show colors in edit tab
- Add default color struct
- Init the color struct with default colors
- Show color text in labels
- Preview colors
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'qt-ui/printoptions.h')
-rw-r--r-- | qt-ui/printoptions.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/qt-ui/printoptions.h b/qt-ui/printoptions.h index 3a5c2b179..92064d223 100644 --- a/qt-ui/printoptions.h +++ b/qt-ui/printoptions.h @@ -26,13 +26,30 @@ struct template_options { int color_palette_index; double font_size; double line_spacing; + struct color_palette_struct { + QColor color1; + QColor color2; + QColor color3; + QColor color4; + QColor color5; + bool operator!=(const color_palette_struct &other) const { + return other.color1 != color1 + || other.color2 != color2 + || other.color3 != color3 + || other.color4 != color4 + || other.color5 != color5; + } + } color_palette; bool operator!=(const template_options &other) const { return other.font_index != font_index || other.color_palette_index != color_palette_index || other.font_size != font_size - || other.line_spacing != line_spacing; + || other.line_spacing != line_spacing + || other.color_palette != color_palette; } -}; + }; + +extern template_options::color_palette_struct almond_colors; // should be based on a custom QPrintDialog class class PrintOptions : public QWidget { |