aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/templateedit.cpp
AgeCommit message (Collapse)Author
2015-07-28Printing: don't name color templates with confusing numbersGravatar Gehad elrobey
Use the color_palette enum instead. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-28Printing: add the "Shades of blue" color themeGravatar Gehad elrobey
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-28Printing: use grantlee templates from the current existing template listGravatar Gehad elrobey
We use templates from the grantlee templates list created and dynamically. So we don't need static templates anymore. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: add default case to switchGravatar Gehad elrobey
Add default case to fix switch warning. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: change 'Discard' to 'Cancel' buttonGravatar Gehad elrobey
Cancel button is more relevant to the dialog message. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: add custom color paletteGravatar Gehad elrobey
We can use custom color palette to edit current color palette. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: implement edit buttons in color tabGravatar Gehad elrobey
Add button group and attached edit buttons to it. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: show colors in edit tabGravatar Gehad elrobey
- 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>
2015-07-20Printing: update preview on field changesGravatar Gehad elrobey
- Trigger re-rendering on the QPixmap if fields changed. - Change template selection to custom if template text changed. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: update preview on apply settingsGravatar Gehad elrobey
On update call Printer to render on the QPixmap. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: add apply button to TemplateEdit classGravatar Gehad elrobey
Add apply button to the dialog, Update the preview after applying the new settings. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: save only if data is changed in template_optionsGravatar Gehad elrobey
Check if data is changed before saving the new settings. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: add preview to TemplateEdit dialogGravatar Gehad elrobey
Show QPixmap in QLabel, Use Printer class to render the Preview on the QPixmap. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-20Printing: show confirmation message before overwriting the templateGravatar Gehad elrobey
Before overwriting the new template show confirmation message. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05Printing: implement QPlainTextEdit in TemplateEditGravatar Gehad elrobey
This is the main area to edit the templates inside Subsurface. Whenever the user edits a template the edited template is saved in custom.html and custom.html is considered the selected printing template. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05Printing: move template_options to print_options.hGravatar Gehad elrobey
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05Printing: add QSettings for TemplateEdit classGravatar Gehad elrobey
TemplateOptions struct must be saved to QSettings after the window is closed, also it must be recalled when initializing the window. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05Printing: add template_options struct that contains templateGravatar Gehad elrobey
The template_options struct holds the settings variables in the code. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05Printing: add TemplateEdit form to source treeGravatar Gehad elrobey
The TemplateEdit class works to customize the tempalate before printing, User can select the font-size, font-type, color-palette, linespacing and editing the template HTML code. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>