Skip to content

Commit c8b83c4

Browse files
committedDec 11, 2018
Unify appearance and behaviour of export settings dialogs
(cherry picked from commit 0297b2c)
1 parent 93fd5de commit c8b83c4

File tree

4 files changed

+43
-41
lines changed

4 files changed

+43
-41
lines changed
 

‎src/app/layout/qgslayoutdesignerdialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3998,7 +3998,7 @@ bool QgsLayoutDesignerDialog::getSvgExportSettings( QgsLayoutExporter::SvgExport
39983998
}
39993999

40004000
// open options dialog
4001-
QDialog dialog;
4001+
QDialog dialog( this );
40024002
Ui::QgsSvgExportOptionsDialog options;
40034003
options.setupUi( &dialog );
40044004

@@ -4068,7 +4068,7 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport
40684068
}
40694069

40704070
// open options dialog
4071-
QDialog dialog;
4071+
QDialog dialog( this );
40724072
Ui::QgsPdfExportOptionsDialog options;
40734073
options.setupUi( &dialog );
40744074

‎src/ui/layout/qgslayoutimageexportoptions.ui

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,19 @@
77
<x>0</x>
88
<y>0</y>
99
<width>533</width>
10-
<height>394</height>
10+
<height>424</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
1414
<string>Image Export Options</string>
1515
</property>
1616
<layout class="QVBoxLayout" name="verticalLayout">
1717
<item>
18-
<widget class="QGroupBox" name="groupBox">
18+
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox">
1919
<property name="title">
2020
<string>Export Options</string>
2121
</property>
2222
<layout class="QGridLayout" name="gridLayout">
23-
<item row="0" column="0" colspan="2">
24-
<widget class="QLabel" name="label_9">
25-
<property name="text">
26-
<string>Export resolution</string>
27-
</property>
28-
</widget>
29-
</item>
3023
<item row="2" column="0" colspan="2">
3124
<widget class="QLabel" name="label_13">
3225
<property name="text">
@@ -50,6 +43,13 @@
5043
</property>
5144
</widget>
5245
</item>
46+
<item row="0" column="0" colspan="2">
47+
<widget class="QLabel" name="label_9">
48+
<property name="text">
49+
<string>Export resolution</string>
50+
</property>
51+
</widget>
52+
</item>
5353
<item row="1" column="2" colspan="2">
5454
<widget class="QgsSpinBox" name="mWidthSpinBox">
5555
<property name="specialValueText">
@@ -114,6 +114,26 @@
114114
</property>
115115
</spacer>
116116
</item>
117+
<item row="4" column="0" colspan="5">
118+
<widget class="QCheckBox" name="mGenerateWorldFile">
119+
<property name="toolTip">
120+
<string>If checked, a separate world file which georeferences exported images will be created</string>
121+
</property>
122+
<property name="text">
123+
<string>Generate world file</string>
124+
</property>
125+
</widget>
126+
</item>
127+
<item row="3" column="0" colspan="5">
128+
<widget class="QCheckBox" name="mAntialiasingCheckBox">
129+
<property name="toolTip">
130+
<string>If unchecked, the generated images will not be antialiased</string>
131+
</property>
132+
<property name="text">
133+
<string>Enable antialiasing</string>
134+
</property>
135+
</widget>
136+
</item>
117137
</layout>
118138
</widget>
119139
</item>
@@ -143,7 +163,7 @@
143163
<item>
144164
<widget class="QgsSpinBox" name="mLeftMarginSpinBox">
145165
<property name="suffix">
146-
<string> px</string>
166+
<string/>
147167
</property>
148168
<property name="maximum">
149169
<number>1000</number>
@@ -160,7 +180,7 @@
160180
<item>
161181
<widget class="QgsSpinBox" name="mRightMarginSpinBox">
162182
<property name="suffix">
163-
<string> px</string>
183+
<string/>
164184
</property>
165185
<property name="maximum">
166186
<number>1000</number>
@@ -179,7 +199,7 @@
179199
<item row="0" column="1">
180200
<widget class="QLabel" name="label_4">
181201
<property name="text">
182-
<string>Top margin</string>
202+
<string>Top margin (px)</string>
183203
</property>
184204
</widget>
185205
</item>
@@ -212,7 +232,7 @@
212232
<item row="0" column="2">
213233
<widget class="QgsSpinBox" name="mTopMarginSpinBox">
214234
<property name="suffix">
215-
<string> px</string>
235+
<string/>
216236
</property>
217237
<property name="maximum">
218238
<number>1000</number>
@@ -222,7 +242,7 @@
222242
<item row="2" column="2">
223243
<widget class="QgsSpinBox" name="mBottomMarginSpinBox">
224244
<property name="suffix">
225-
<string> px</string>
245+
<string/>
226246
</property>
227247
<property name="maximum">
228248
<number>1000</number>
@@ -234,26 +254,6 @@
234254
</layout>
235255
</widget>
236256
</item>
237-
<item>
238-
<widget class="QCheckBox" name="mGenerateWorldFile">
239-
<property name="toolTip">
240-
<string>If checked, a separate world file which georeferences exported images will be created</string>
241-
</property>
242-
<property name="text">
243-
<string>Generate world file</string>
244-
</property>
245-
</widget>
246-
</item>
247-
<item>
248-
<widget class="QCheckBox" name="mAntialiasingCheckBox">
249-
<property name="toolTip">
250-
<string>If unchecked, the generated images will not be antialiased</string>
251-
</property>
252-
<property name="text">
253-
<string>Enable antialiasing</string>
254-
</property>
255-
</widget>
256-
</item>
257257
<item>
258258
<spacer name="verticalSpacer">
259259
<property name="orientation">
@@ -283,7 +283,7 @@
283283
<customwidget>
284284
<class>QgsCollapsibleGroupBoxBasic</class>
285285
<extends>QGroupBox</extends>
286-
<header>qgscollapsiblegroupbox.h</header>
286+
<header location="global">qgscollapsiblegroupbox.h</header>
287287
<container>1</container>
288288
</customwidget>
289289
<customwidget>
@@ -296,6 +296,8 @@
296296
<tabstop>mResolutionSpinBox</tabstop>
297297
<tabstop>mWidthSpinBox</tabstop>
298298
<tabstop>mHeightSpinBox</tabstop>
299+
<tabstop>mAntialiasingCheckBox</tabstop>
300+
<tabstop>mGenerateWorldFile</tabstop>
299301
<tabstop>mClipToContentGroupBox</tabstop>
300302
<tabstop>mTopMarginSpinBox</tabstop>
301303
<tabstop>mLeftMarginSpinBox</tabstop>

‎src/ui/layout/qgspdfexportoptions.ui

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<x>0</x>
88
<y>0</y>
99
<width>489</width>
10-
<height>190</height>
10+
<height>197</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
@@ -17,7 +17,7 @@
1717
<item>
1818
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox">
1919
<property name="title">
20-
<string>PDF Options</string>
20+
<string>Export Options</string>
2121
</property>
2222
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
2323
<item row="1" column="0" colspan="2">

‎src/ui/layout/qgssvgexportoptions.ui

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<x>0</x>
88
<y>0</y>
99
<width>489</width>
10-
<height>351</height>
10+
<height>385</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
@@ -17,7 +17,7 @@
1717
<item>
1818
<widget class="QgsCollapsibleGroupBoxBasic" name="groupBox">
1919
<property name="title">
20-
<string>SVG Options</string>
20+
<string>Export Options</string>
2121
</property>
2222
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
2323
<item row="0" column="0" colspan="2">

0 commit comments

Comments
 (0)
Please sign in to comment.