2016-02-18 21:11:59 +03:00
|
|
|
#include "lrsettingdialog.h"
|
|
|
|
#include "ui_lrsettingdialog.h"
|
|
|
|
|
2016-03-03 03:08:36 +03:00
|
|
|
namespace LimeReport{
|
|
|
|
|
2016-02-18 21:11:59 +03:00
|
|
|
SettingDialog::SettingDialog(QWidget *parent) :
|
|
|
|
QDialog(parent),
|
|
|
|
ui(new Ui::SettingDialog)
|
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
SettingDialog::~SettingDialog()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|
|
|
|
|
|
|
|
int SettingDialog::verticalGridStep()
|
|
|
|
{
|
|
|
|
return ui->verticalGridStep->value();
|
|
|
|
}
|
|
|
|
|
|
|
|
int SettingDialog::horizontalGridStep()
|
|
|
|
{
|
|
|
|
return ui->horizontalGridStep->value();
|
|
|
|
}
|
|
|
|
|
|
|
|
QFont SettingDialog::defaultFont()
|
|
|
|
{
|
|
|
|
QFont result = ui->defaultFont->currentFont();
|
|
|
|
result.setPointSize(ui->defaultFontSize->value());
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2016-06-24 23:10:47 +03:00
|
|
|
bool SettingDialog::suppressAbsentFieldsAndVarsWarnings()
|
|
|
|
{
|
|
|
|
return ui->cbSuppressWarnings->isChecked();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SettingDialog::setSuppressAbsentFieldsAndVarsWarnings(bool value){
|
|
|
|
ui->cbSuppressWarnings->setChecked(value);
|
|
|
|
}
|
|
|
|
|
2016-02-18 21:11:59 +03:00
|
|
|
void SettingDialog::setHorizontalGridStep(int value)
|
|
|
|
{
|
|
|
|
ui->horizontalGridStep->setValue(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
void SettingDialog::setVerticalGridStep(int value)
|
|
|
|
{
|
|
|
|
ui->verticalGridStep->setValue(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
void SettingDialog::setDefaultFont(const QFont &value)
|
|
|
|
{
|
|
|
|
ui->defaultFont->setCurrentFont(value);
|
|
|
|
ui->defaultFontSize->setValue(value.pointSize());
|
|
|
|
}
|
2016-03-03 03:08:36 +03:00
|
|
|
|
|
|
|
} // namespace LimeReport
|