0
0
mirror of https://github.com/fralx/LimeReport.git synced 2024-12-24 16:44:39 +03:00

Setting dialog has been modified to edit report settings

Setting dialog has been modified to edit report settings
This commit is contained in:
Arin Alex 2016-06-24 23:10:47 +03:00
parent a8b193de05
commit 779eefcab5
4 changed files with 107 additions and 69 deletions

View File

@ -394,11 +394,13 @@ void ReportDesignWidget::editSetting()
setting.setVerticalGridStep(m_verticalGridStep); setting.setVerticalGridStep(m_verticalGridStep);
setting.setHorizontalGridStep(m_horizontalGridStep); setting.setHorizontalGridStep(m_horizontalGridStep);
setting.setDefaultFont(m_defaultFont); setting.setDefaultFont(m_defaultFont);
setting.setSuppressAbsentFieldsAndVarsWarnings(m_report->suppressFieldAndVarError());
if (setting.exec()){ if (setting.exec()){
m_horizontalGridStep = setting.horizontalGridStep(); m_horizontalGridStep = setting.horizontalGridStep();
m_verticalGridStep = setting.verticalGridStep(); m_verticalGridStep = setting.verticalGridStep();
m_defaultFont = setting.defaultFont(); m_defaultFont = setting.defaultFont();
m_report->setSuppressFieldAndVarError(setting.suppressAbsentFieldsAndVarsWarnings());
applySettings(); applySettings();
} }
} }

View File

@ -32,6 +32,15 @@ QFont SettingDialog::defaultFont()
return result; return result;
} }
bool SettingDialog::suppressAbsentFieldsAndVarsWarnings()
{
return ui->cbSuppressWarnings->isChecked();
}
void SettingDialog::setSuppressAbsentFieldsAndVarsWarnings(bool value){
ui->cbSuppressWarnings->setChecked(value);
}
void SettingDialog::setHorizontalGridStep(int value) void SettingDialog::setHorizontalGridStep(int value)
{ {
ui->horizontalGridStep->setValue(value); ui->horizontalGridStep->setValue(value);

View File

@ -19,6 +19,8 @@ public:
int verticalGridStep(); int verticalGridStep();
int horizontalGridStep(); int horizontalGridStep();
QFont defaultFont(); QFont defaultFont();
bool suppressAbsentFieldsAndVarsWarnings();
void setSuppressAbsentFieldsAndVarsWarnings(bool value);
void setHorizontalGridStep(int value); void setHorizontalGridStep(int value);
void setVerticalGridStep(int value); void setVerticalGridStep(int value);
void setDefaultFont(const QFont& value); void setDefaultFont(const QFont& value);

View File

@ -7,13 +7,19 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>351</width> <width>351</width>
<height>185</height> <height>318</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Designer setting</string> <string>Designer setting</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Designer Setting</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
@ -102,6 +108,25 @@
</layout> </layout>
</widget> </widget>
</item> </item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Report Setting</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="cbSuppressWarnings">
<property name="text">
<string>Suppress absent fields and variables warning</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item> <item>
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
@ -153,8 +178,8 @@
<slot>accept()</slot> <slot>accept()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>248</x> <x>221</x>
<y>254</y> <y>307</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>157</x> <x>157</x>
@ -169,8 +194,8 @@
<slot>reject()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>316</x> <x>221</x>
<y>260</y> <y>307</y>
</hint> </hint>
<hint type="destinationlabel"> <hint type="destinationlabel">
<x>286</x> <x>286</x>