Skip to content

Commit

Permalink
Unify appearance and behaviour of export settings dialogs
Browse files Browse the repository at this point in the history
(cherry picked from commit 0297b2c)
  • Loading branch information
nyalldawson committed Dec 11, 2018
1 parent 93fd5de commit c8b83c4
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 41 deletions.
4 changes: 2 additions & 2 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -3998,7 +3998,7 @@ bool QgsLayoutDesignerDialog::getSvgExportSettings( QgsLayoutExporter::SvgExport
}

// open options dialog
QDialog dialog;
QDialog dialog( this );
Ui::QgsSvgExportOptionsDialog options;
options.setupUi( &dialog );

Expand Down Expand Up @@ -4068,7 +4068,7 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport
}

// open options dialog
QDialog dialog;
QDialog dialog( this );
Ui::QgsPdfExportOptionsDialog options;
options.setupUi( &dialog );

Expand Down
72 changes: 37 additions & 35 deletions src/ui/layout/qgslayoutimageexportoptions.ui
Expand Up @@ -7,26 +7,19 @@
<x>0</x>
<y>0</y>
<width>533</width>
<height>394</height>
<height>424</height>
</rect>
</property>
<property name="windowTitle">
<string>Image Export Options</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox">
<property name="title">
<string>Export Options</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Export resolution</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="label_13">
<property name="text">
Expand All @@ -50,6 +43,13 @@
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Export resolution</string>
</property>
</widget>
</item>
<item row="1" column="2" colspan="2">
<widget class="QgsSpinBox" name="mWidthSpinBox">
<property name="specialValueText">
Expand Down Expand Up @@ -114,6 +114,26 @@
</property>
</spacer>
</item>
<item row="4" column="0" colspan="5">
<widget class="QCheckBox" name="mGenerateWorldFile">
<property name="toolTip">
<string>If checked, a separate world file which georeferences exported images will be created</string>
</property>
<property name="text">
<string>Generate world file</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="5">
<widget class="QCheckBox" name="mAntialiasingCheckBox">
<property name="toolTip">
<string>If unchecked, the generated images will not be antialiased</string>
</property>
<property name="text">
<string>Enable antialiasing</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down Expand Up @@ -143,7 +163,7 @@
<item>
<widget class="QgsSpinBox" name="mLeftMarginSpinBox">
<property name="suffix">
<string> px</string>
<string/>
</property>
<property name="maximum">
<number>1000</number>
Expand All @@ -160,7 +180,7 @@
<item>
<widget class="QgsSpinBox" name="mRightMarginSpinBox">
<property name="suffix">
<string> px</string>
<string/>
</property>
<property name="maximum">
<number>1000</number>
Expand All @@ -179,7 +199,7 @@
<item row="0" column="1">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Top margin</string>
<string>Top margin (px)</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -212,7 +232,7 @@
<item row="0" column="2">
<widget class="QgsSpinBox" name="mTopMarginSpinBox">
<property name="suffix">
<string> px</string>
<string/>
</property>
<property name="maximum">
<number>1000</number>
Expand All @@ -222,7 +242,7 @@
<item row="2" column="2">
<widget class="QgsSpinBox" name="mBottomMarginSpinBox">
<property name="suffix">
<string> px</string>
<string/>
</property>
<property name="maximum">
<number>1000</number>
Expand All @@ -234,26 +254,6 @@
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="mGenerateWorldFile">
<property name="toolTip">
<string>If checked, a separate world file which georeferences exported images will be created</string>
</property>
<property name="text">
<string>Generate world file</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="mAntialiasingCheckBox">
<property name="toolTip">
<string>If unchecked, the generated images will not be antialiased</string>
</property>
<property name="text">
<string>Enable antialiasing</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
Expand Down Expand Up @@ -283,7 +283,7 @@
<customwidget>
<class>QgsCollapsibleGroupBoxBasic</class>
<extends>QGroupBox</extends>
<header>qgscollapsiblegroupbox.h</header>
<header location="global">qgscollapsiblegroupbox.h</header>
<container>1</container>
</customwidget>
<customwidget>
Expand All @@ -296,6 +296,8 @@
<tabstop>mResolutionSpinBox</tabstop>
<tabstop>mWidthSpinBox</tabstop>
<tabstop>mHeightSpinBox</tabstop>
<tabstop>mAntialiasingCheckBox</tabstop>
<tabstop>mGenerateWorldFile</tabstop>
<tabstop>mClipToContentGroupBox</tabstop>
<tabstop>mTopMarginSpinBox</tabstop>
<tabstop>mLeftMarginSpinBox</tabstop>
Expand Down
4 changes: 2 additions & 2 deletions src/ui/layout/qgspdfexportoptions.ui
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>489</width>
<height>190</height>
<height>197</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -17,7 +17,7 @@
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox">
<property name="title">
<string>PDF Options</string>
<string>Export Options</string>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
<item row="1" column="0" colspan="2">
Expand Down
4 changes: 2 additions & 2 deletions src/ui/layout/qgssvgexportoptions.ui
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>489</width>
<height>351</height>
<height>385</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -17,7 +17,7 @@
<item>
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox">
<property name="title">
<string>SVG Options</string>
<string>Export Options</string>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
<item row="0" column="0" colspan="2">
Expand Down

0 comments on commit c8b83c4

Please sign in to comment.