2015-06-26 02:21:03 +00:00
|
|
|
#ifndef TEMPLATEEDIT_H
|
|
|
|
#define TEMPLATEEDIT_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
2015-07-05 05:29:46 +00:00
|
|
|
#include "templatelayout.h"
|
2015-06-26 02:21:03 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class TemplateEdit;
|
|
|
|
}
|
|
|
|
|
|
|
|
class TemplateEdit : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2015-07-05 05:26:39 +00:00
|
|
|
explicit TemplateEdit(QWidget *parent, struct print_options *printOptions, struct template_options *templateOptions);
|
2015-06-26 02:21:03 +00:00
|
|
|
~TemplateEdit();
|
2015-06-29 01:24:29 +00:00
|
|
|
private slots:
|
|
|
|
void on_fontsize_valueChanged(int font_size);
|
|
|
|
|
|
|
|
void on_linespacing_valueChanged(double line_spacing);
|
|
|
|
|
2017-03-06 16:41:54 +00:00
|
|
|
void on_borderwidth_valueChanged(double border_width);
|
|
|
|
|
2015-06-29 01:24:29 +00:00
|
|
|
void on_fontSelection_currentIndexChanged(int index);
|
|
|
|
|
|
|
|
void on_colorpalette_currentIndexChanged(int index);
|
|
|
|
|
2015-07-10 23:37:27 +00:00
|
|
|
void on_buttonBox_clicked(QAbstractButton *button);
|
2015-07-05 05:29:46 +00:00
|
|
|
|
2015-07-12 03:54:00 +00:00
|
|
|
void colorSelect(QAbstractButton *button);
|
|
|
|
|
2015-06-26 02:21:03 +00:00
|
|
|
private:
|
|
|
|
Ui::TemplateEdit *ui;
|
2015-07-12 03:54:00 +00:00
|
|
|
QButtonGroup *btnGroup;
|
2015-07-29 17:49:50 +00:00
|
|
|
bool editingCustomColors;
|
2015-06-29 01:16:19 +00:00
|
|
|
struct template_options *templateOptions;
|
2015-07-10 23:06:43 +00:00
|
|
|
struct template_options newTemplateOptions;
|
2015-07-05 05:26:39 +00:00
|
|
|
struct print_options *printOptions;
|
2015-07-05 05:29:46 +00:00
|
|
|
QString grantlee_template;
|
2015-07-10 23:37:27 +00:00
|
|
|
void saveSettings();
|
2015-07-11 10:50:14 +00:00
|
|
|
void updatePreview();
|
|
|
|
|
2015-06-26 02:21:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TEMPLATEEDIT_H
|