mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
c44496e23d
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
#include "templateedit.h"
|
|
#include "printoptions.h"
|
|
#include "ui_templateedit.h"
|
|
|
|
TemplateEdit::TemplateEdit(QWidget *parent, struct print_options *printOptions, struct template_options *templateOptions) :
|
|
QDialog(parent),
|
|
ui(new Ui::TemplateEdit)
|
|
{
|
|
ui->setupUi(this);
|
|
this->templateOptions = templateOptions;
|
|
this->printOptions = printOptions;
|
|
|
|
// restore the settings and init the UI
|
|
ui->fontSelection->setCurrentIndex(templateOptions->font_index);
|
|
ui->fontsize->setValue(templateOptions->font_size);
|
|
ui->colorpalette->setCurrentIndex(templateOptions->color_palette_index);
|
|
ui->linespacing->setValue(templateOptions->line_spacing);
|
|
}
|
|
|
|
TemplateEdit::~TemplateEdit()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void TemplateEdit::on_fontsize_valueChanged(int font_size)
|
|
{
|
|
templateOptions->font_size = font_size;
|
|
}
|
|
|
|
void TemplateEdit::on_linespacing_valueChanged(double line_spacing)
|
|
{
|
|
templateOptions->line_spacing = line_spacing;
|
|
}
|
|
|
|
void TemplateEdit::on_fontSelection_currentIndexChanged(int index)
|
|
{
|
|
templateOptions->font_index = index;
|
|
}
|
|
|
|
void TemplateEdit::on_colorpalette_currentIndexChanged(int index)
|
|
{
|
|
templateOptions->color_palette_index = index;
|
|
}
|