From 0b085f79b12ee2ca60278c324e419f47f47ae100 Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Thu, 23 Jul 2015 15:20:48 +0200 Subject: Printing: set the default tab to the correct one The first tab is the default tab. Signed-off-by: Gehad elrobey Signed-off-by: Lubomir I. Ivanov --- qt-ui/templateedit.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui/templateedit.ui') diff --git a/qt-ui/templateedit.ui b/qt-ui/templateedit.ui index 4f9c9c2ed..7e636f0ee 100644 --- a/qt-ui/templateedit.ui +++ b/qt-ui/templateedit.ui @@ -39,7 +39,7 @@ - 2 + 0 -- cgit v1.2.3-70-g09d2 From 61a8ac09b03a47cc728834765f6c652a20ce8a3f Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Sun, 26 Jul 2015 08:34:32 +0200 Subject: Printing: fix TemplateEdit layout Make the TemplateEdit dialog resizable. Signed-off-by: Gehad elrobey Signed-off-by: Lubomir I. Ivanov --- qt-ui/templateedit.ui | 890 ++++++++++++++++++++++++++------------------------ 1 file changed, 471 insertions(+), 419 deletions(-) (limited to 'qt-ui/templateedit.ui') diff --git a/qt-ui/templateedit.ui b/qt-ui/templateedit.ui index 7e636f0ee..073db237b 100644 --- a/qt-ui/templateedit.ui +++ b/qt-ui/templateedit.ui @@ -6,436 +6,488 @@ 0 0 - 774 + 770 433 Edit Template - - - - 400 - 380 - 341 - 32 - - - - Qt::Horizontal - - - QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - 300 - 30 - 441 - 331 - - - - 0 - - - - Style - - - - - 10 - 20 - 401 - 171 - - - - - - - - - Font - - - - - - - - Arial - - - - - Impact - - - - - Georgia - - - - - Courier - - - - - Verdana + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Preview + + + + + + + + 0 + 0 + + + + + 180 + 240 + + + + + 180 + 254 + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + false + + + 0 + + + + Style + + + + + + + + + + Font + + + + + + + + Arial + + + + + Impact + + + + + Georgia + + + + + Courier + + + + + Verdana + + + + + + + + + + + + Font size + + + + + + + 9 + + + 18 + + + + + + + + + + + Color pallet + + + + + + + + Almond + + + + + Custom + + + + + + + + + + + + Line spacing + + + + + + + 1.000000000000000 + + + 3.000000000000000 + + + 0.250000000000000 + + + 1.250000000000000 + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + Template + + + + + + Qt::ScrollBarAsNeeded - - - - - - - - - - - Font size - - - - - - - 9 - - - 18 - - - - - - - - - - - Color pallet - - - - - - - - Almond + + QPlainTextEdit::NoWrap - - - - Custom - - - - - - - - - - - - Line spacing - - - - - - - 1.000000000000000 - - - 3.000000000000000 - - - 0.250000000000000 - - - 1.250000000000000 - - - - - - - - - - - Template - - - - - 0 - 0 - 441 - 301 - - - - Qt::ScrollBarAsNeeded + + + + + + + + 16777215 + 16777215 + + + + Colors + + + + + + + + + + + 0 + 0 + + + + Background + + + + + + + + 0 + 0 + + + + color1 + + + Qt::AlignCenter + + + + + + + Edit + + + + + + + + + + + + 0 + 0 + + + + Table cells + + + + + + + + 0 + 0 + + + + color2 + + + Qt::AlignCenter + + + + + + + Edit + + + + + + + + + + + + 0 + 0 + + + + Text 1 + + + + + + + + 0 + 0 + + + + color3 + + + Qt::AlignCenter + + + + + + + Edit + + + + + + + + + + + + 0 + 0 + + + + Text 2 + + + + + + + + 0 + 0 + + + + color4 + + + Qt::AlignCenter + + + + + + + Edit + + + + + + + + + + + + 0 + 0 + + + + Borders + + + + + + + + 0 + 0 + + + + color5 + + + Qt::AlignCenter + + + + + + + Edit + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + + Qt::Horizontal - - QPlainTextEdit::NoWrap - - - - - - Colors - - - - - 10 - 30 - 411 - 171 - + + QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - 0 - 0 - - - - Background - - - - - - - - 0 - 0 - - - - color1 - - - Qt::AlignCenter - - - - - - - Edit - - - - - - - - - - - - 0 - 0 - - - - Table cells - - - - - - - - 0 - 0 - - - - color2 - - - Qt::AlignCenter - - - - - - - Edit - - - - - - - - - - - - 0 - 0 - - - - Text 1 - - - - - - - - 0 - 0 - - - - color3 - - - Qt::AlignCenter - - - - - - - Edit - - - - - - - - - - - - 0 - 0 - - - - Text 2 - - - - - - - - 0 - 0 - - - - color4 - - - Qt::AlignCenter - - - - - - - Edit - - - - - - - - - - - - 0 - 0 - - - - Borders - - - - - - - - 0 - 0 - - - - color5 - - - Qt::AlignCenter - - - - - - - Edit - - - - - - - - - - - - 30 - 30 - 59 - 14 - - - - Preview - - - - - - 50 - 70 - 211 - 291 - - - - - - + + -- cgit v1.2.3-70-g09d2 From d41d79b549cdfb0ff3c785eae09a504a46fb4b96 Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Sun, 26 Jul 2015 19:13:23 +0200 Subject: Printing: add the "Shades of blue" color theme Signed-off-by: Gehad elrobey Signed-off-by: Lubomir I. Ivanov --- qt-ui/printdialog.cpp | 12 ++++++++++-- qt-ui/printoptions.h | 2 +- qt-ui/templateedit.cpp | 13 ++++++++++--- qt-ui/templateedit.ui | 5 +++++ 4 files changed, 26 insertions(+), 6 deletions(-) (limited to 'qt-ui/templateedit.ui') diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp index 8717766a1..d5a16df11 100644 --- a/qt-ui/printdialog.cpp +++ b/qt-ui/printdialog.cpp @@ -12,7 +12,7 @@ #define SETTINGS_GROUP "PrintDialog" -template_options::color_palette_struct almond_colors, custom_colors; +template_options::color_palette_struct almond_colors, blueshades_colors, custom_colors; PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f) { @@ -22,6 +22,11 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f almond_colors.color3 = QColor::fromRgb(136, 160, 150); almond_colors.color4 = QColor::fromRgb(187, 171, 139); almond_colors.color5 = QColor::fromRgb(239, 130, 117); + blueshades_colors.color1 = QColor::fromRgb(182, 192, 206); + blueshades_colors.color2 = QColor::fromRgb(142, 152, 166); + blueshades_colors.color3 = QColor::fromRgb(31, 49, 75); + blueshades_colors.color4 = QColor::fromRgb(21, 45, 84); + blueshades_colors.color5 = QColor::fromRgb(5, 25, 56); // check if the options were previously stored in the settings; if not use some defaults. QSettings s; @@ -68,7 +73,10 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f case 0: // almond templateOptions.color_palette = almond_colors; break; - case 1: // custom + case 1: // blueshades + templateOptions.color_palette = blueshades_colors; + break; + case 2: // custom templateOptions.color_palette = custom_colors; break; } diff --git a/qt-ui/printoptions.h b/qt-ui/printoptions.h index 528c5ed4d..5a4ca3504 100644 --- a/qt-ui/printoptions.h +++ b/qt-ui/printoptions.h @@ -44,7 +44,7 @@ struct template_options { } }; -extern template_options::color_palette_struct almond_colors, custom_colors; +extern template_options::color_palette_struct almond_colors, blueshades_colors, custom_colors; // should be based on a custom QPrintDialog class class PrintOptions : public QWidget { diff --git a/qt-ui/templateedit.cpp b/qt-ui/templateedit.cpp index de280f7a8..c26740506 100644 --- a/qt-ui/templateedit.cpp +++ b/qt-ui/templateedit.cpp @@ -95,7 +95,10 @@ void TemplateEdit::on_colorpalette_currentIndexChanged(int index) case 0: // almond newTemplateOptions.color_palette = almond_colors; break; - case 1: // custom + case 1: // blueshades + newTemplateOptions.color_palette = blueshades_colors; + break; + case 2: // custom newTemplateOptions.color_palette = custom_colors; break; } @@ -115,7 +118,7 @@ void TemplateEdit::saveSettings() printOptions->p_template = "custom.html"; TemplateLayout::writeTemplate("custom.html", ui->plainTextEdit->toPlainText()); } - if (templateOptions->color_palette_index == 1) { + if (templateOptions->color_palette_index == 2) { custom_colors = templateOptions->color_palette; } } @@ -148,6 +151,10 @@ void TemplateEdit::colorSelect(QAbstractButton *button) newTemplateOptions.color_palette = almond_colors; custom_colors = newTemplateOptions.color_palette; break; + case 1: // blueshades + newTemplateOptions.color_palette = blueshades_colors; + custom_colors = newTemplateOptions.color_palette; + break; } //change selected color @@ -174,6 +181,6 @@ void TemplateEdit::colorSelect(QAbstractButton *button) newTemplateOptions.color_palette.color5 = color; break; } - newTemplateOptions.color_palette_index = 1; + newTemplateOptions.color_palette_index = 2; updatePreview(); } diff --git a/qt-ui/templateedit.ui b/qt-ui/templateedit.ui index 073db237b..1442954cf 100644 --- a/qt-ui/templateedit.ui +++ b/qt-ui/templateedit.ui @@ -173,6 +173,11 @@ Almond + + + Shades of blue + + Custom -- cgit v1.2.3-70-g09d2