summaryrefslogtreecommitdiffstats
path: root/qt-ui/printdialog.cpp
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2015-07-12 05:00:03 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2015-07-20 15:28:20 +0300
commitad531c25fbf4094f2cbfd54018fe74d710b547f1 (patch)
treea44f688d1a8e14891fea59595639d400e6c7499e /qt-ui/printdialog.cpp
parentdcedc8ebea5a686f87d51daefa83728696d26b1a (diff)
downloadsubsurface-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/printdialog.cpp')
-rw-r--r--qt-ui/printdialog.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp
index 0a2c7898f..c999e8f25 100644
--- a/qt-ui/printdialog.cpp
+++ b/qt-ui/printdialog.cpp
@@ -12,8 +12,17 @@
#define SETTINGS_GROUP "PrintDialog"
+template_options::color_palette_struct almond_colors;
+
PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f)
{
+ // initialize const colors
+ almond_colors.color1 = QColor::fromRgb(243, 234, 207);
+ almond_colors.color2 = QColor::fromRgb(253, 204, 156);
+ almond_colors.color3 = QColor::fromRgb(136, 160, 150);
+ almond_colors.color4 = QColor::fromRgb(187, 171, 139);
+ almond_colors.color5 = QColor::fromRgb(239, 130, 117);
+
// check if the options were previously stored in the settings; if not use some defaults.
QSettings s;
bool stored = s.childGroups().contains(SETTINGS_GROUP);
@@ -41,6 +50,8 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f
templateOptions.line_spacing = s.value("line_spacing").toDouble();
}
+ templateOptions.color_palette = almond_colors;
+
// create a print options object and pass our options struct
optionsWidget = new PrintOptions(this, &printOptions, &templateOptions);