Skip to content

Commit 87e6b13

Browse files
committedFeb 28, 2014
Vector save as dialog: use one column layout (like raster save as)
1 parent 2081fc9 commit 87e6b13

File tree

3 files changed

+262
-317
lines changed

3 files changed

+262
-317
lines changed
 

‎src/app/ogr/qgsvectorlayersaveasdialog.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ void QgsVectorLayerSaveAsDialog::setup()
8787
mSymbologyExportComboBox->addItem( tr( "Feature symbology" ), QgsVectorFileWriter::FeatureSymbology );
8888
mSymbologyExportComboBox->addItem( tr( "Symbol layer symbology" ), QgsVectorFileWriter::SymbolLayerSymbology );
8989
on_mSymbologyExportComboBox_currentIndexChanged( mSymbologyExportComboBox->currentText() );
90-
mOptionsButton->setChecked( settings.value( "/UI/vectorLayerSaveAsOptionsVisible" ).toBool() );
9190
}
9291

9392
QList<QPair<QLabel*, QWidget*> > QgsVectorLayerSaveAsDialog::createControls( const QMap<QString, QgsVectorFileWriter::Option*>& options )
@@ -170,7 +169,6 @@ void QgsVectorLayerSaveAsDialog::accept()
170169
settings.setValue( "/UI/lastVectorFileFilterDir", QFileInfo( filename() ).absolutePath() );
171170
settings.setValue( "/UI/lastVectorFormat", format() );
172171
settings.setValue( "/UI/encoding", encoding() );
173-
settings.setValue( "/UI/vectorLayerSaveAsOptionsVisible", mOptionsButton->isChecked() );
174172
QDialog::accept();
175173
}
176174

@@ -453,8 +451,3 @@ void QgsVectorLayerSaveAsDialog::on_mSymbologyExportComboBox_currentIndexChanged
453451
mScaleSpinBox->setEnabled( scaleEnabled );
454452
mScaleLabel->setEnabled( scaleEnabled );
455453
}
456-
457-
void QgsVectorLayerSaveAsDialog::on_mOptionsButton_toggled( bool checked )
458-
{
459-
mOptionsGroupBox->setVisible( checked );
460-
}

‎src/app/ogr/qgsvectorlayersaveasdialog.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ class QgsVectorLayerSaveAsDialog : public QDialog, private Ui::QgsVectorLayerSav
6464
void on_browseCRS_clicked();
6565
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
6666
void on_mSymbologyExportComboBox_currentIndexChanged( const QString& text );
67-
void on_mOptionsButton_toggled( bool checked );
6867
void accept();
6968

7069
private:

‎src/ui/qgsvectorlayersaveasdialogbase.ui

Lines changed: 262 additions & 309 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>592</width>
10-
<height>394</height>
9+
<width>591</width>
10+
<height>632</height>
1111
</rect>
1212
</property>
1313
<property name="sizePolicy">
@@ -19,351 +19,304 @@
1919
<property name="windowTitle">
2020
<string>Save vector layer as...</string>
2121
</property>
22-
<layout class="QGridLayout" name="gridLayout">
23-
<property name="sizeConstraint">
24-
<enum>QLayout::SetMinAndMaxSize</enum>
25-
</property>
26-
<item row="4" column="0" colspan="2">
27-
<widget class="QDialogButtonBox" name="buttonBox">
28-
<property name="orientation">
29-
<enum>Qt::Horizontal</enum>
30-
</property>
31-
<property name="standardButtons">
32-
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
33-
</property>
22+
<layout class="QVBoxLayout" name="verticalLayout_2">
23+
<item>
24+
<widget class="QWidget" name="widget" native="true">
25+
<layout class="QGridLayout" name="gridLayout_4">
26+
<item row="1" column="1">
27+
<widget class="QLineEdit" name="leFilename">
28+
<property name="enabled">
29+
<bool>false</bool>
30+
</property>
31+
</widget>
32+
</item>
33+
<item row="1" column="2">
34+
<widget class="QPushButton" name="browseFilename">
35+
<property name="enabled">
36+
<bool>false</bool>
37+
</property>
38+
<property name="text">
39+
<string>Browse</string>
40+
</property>
41+
</widget>
42+
</item>
43+
<item row="1" column="0">
44+
<widget class="QLabel" name="label">
45+
<property name="text">
46+
<string>Save as</string>
47+
</property>
48+
<property name="buddy">
49+
<cstring>leFilename</cstring>
50+
</property>
51+
</widget>
52+
</item>
53+
<item row="3" column="0">
54+
<widget class="QLabel" name="label_3">
55+
<property name="text">
56+
<string>CRS</string>
57+
</property>
58+
<property name="buddy">
59+
<cstring>leCRS</cstring>
60+
</property>
61+
</widget>
62+
</item>
63+
<item row="3" column="1" colspan="2">
64+
<widget class="QComboBox" name="mCRSSelection"/>
65+
</item>
66+
<item row="0" column="1" colspan="2">
67+
<widget class="QComboBox" name="mFormatComboBox"/>
68+
</item>
69+
<item row="0" column="0">
70+
<widget class="QLabel" name="label_2">
71+
<property name="text">
72+
<string>Format</string>
73+
</property>
74+
<property name="buddy">
75+
<cstring>mFormatComboBox</cstring>
76+
</property>
77+
</widget>
78+
</item>
79+
<item row="4" column="2">
80+
<widget class="QPushButton" name="browseCRS">
81+
<property name="text">
82+
<string>Browse</string>
83+
</property>
84+
</widget>
85+
</item>
86+
<item row="4" column="1">
87+
<widget class="QLineEdit" name="leCRS">
88+
<property name="enabled">
89+
<bool>false</bool>
90+
</property>
91+
<property name="readOnly">
92+
<bool>true</bool>
93+
</property>
94+
</widget>
95+
</item>
96+
</layout>
3497
</widget>
3598
</item>
36-
<item row="0" column="0" colspan="2">
37-
<widget class="QWidget" name="widget_3" native="true">
38-
<layout class="QGridLayout" name="gridLayout_5">
39-
<property name="margin">
40-
<number>0</number>
99+
<item>
100+
<widget class="QScrollArea" name="scrollArea">
101+
<property name="widgetResizable">
102+
<bool>true</bool>
103+
</property>
104+
<widget class="QWidget" name="scrollAreaWidgetContents">
105+
<property name="geometry">
106+
<rect>
107+
<x>0</x>
108+
<y>0</y>
109+
<width>562</width>
110+
<height>458</height>
111+
</rect>
41112
</property>
42-
<item row="0" column="0">
43-
<widget class="QSplitter" name="splitter">
44-
<property name="orientation">
45-
<enum>Qt::Horizontal</enum>
46-
</property>
47-
<widget class="QWidget" name="widget" native="true">
48-
<layout class="QGridLayout" name="gridLayout_4">
49-
<item row="1" column="0">
50-
<widget class="QLabel" name="label">
51-
<property name="text">
52-
<string>Save as</string>
53-
</property>
54-
<property name="buddy">
55-
<cstring>leFilename</cstring>
56-
</property>
57-
</widget>
58-
</item>
59-
<item row="4" column="0">
60-
<widget class="QLabel" name="label_3">
61-
<property name="text">
62-
<string>CRS</string>
63-
</property>
64-
<property name="buddy">
65-
<cstring>leCRS</cstring>
66-
</property>
67-
</widget>
68-
</item>
69-
<item row="6" column="2">
70-
<widget class="QComboBox" name="mSymbologyExportComboBox"/>
71-
</item>
72-
<item row="5" column="0" colspan="2">
73-
<widget class="QLineEdit" name="leCRS">
74-
<property name="enabled">
75-
<bool>false</bool>
76-
</property>
77-
<property name="readOnly">
78-
<bool>true</bool>
79-
</property>
80-
</widget>
81-
</item>
82-
<item row="4" column="1" colspan="2">
83-
<widget class="QComboBox" name="mCRSSelection"/>
84-
</item>
85-
<item row="2" column="0" colspan="2">
86-
<widget class="QLineEdit" name="leFilename">
87-
<property name="enabled">
88-
<bool>false</bool>
89-
</property>
90-
</widget>
91-
</item>
92-
<item row="3" column="1" colspan="2">
93-
<widget class="QComboBox" name="mEncodingComboBox"/>
94-
</item>
95-
<item row="7" column="0">
96-
<widget class="QLabel" name="mScaleLabel">
97-
<property name="text">
98-
<string>Scale</string>
99-
</property>
100-
</widget>
101-
</item>
102-
<item row="10" column="0" colspan="2">
103-
<widget class="QCheckBox" name="mAddToCanvas">
104-
<property name="text">
105-
<string>Add saved file to map</string>
106-
</property>
107-
</widget>
108-
</item>
109-
<item row="0" column="1" colspan="2">
110-
<widget class="QComboBox" name="mFormatComboBox"/>
111-
</item>
113+
<layout class="QVBoxLayout" name="verticalLayout">
114+
<item>
115+
<layout class="QHBoxLayout" name="horizontalLayout_3">
116+
<item>
117+
<widget class="QLabel" name="label_4">
118+
<property name="text">
119+
<string>Encoding</string>
120+
</property>
121+
<property name="buddy">
122+
<cstring>mEncodingComboBox</cstring>
123+
</property>
124+
</widget>
125+
</item>
126+
<item>
127+
<widget class="QComboBox" name="mEncodingComboBox"/>
128+
</item>
129+
</layout>
130+
</item>
131+
<item>
132+
<widget class="QCheckBox" name="mSkipAttributeCreation">
133+
<property name="toolTip">
134+
<string>This allows one to surpress attribute creation as some OGR drivers (eg. DGN, DXF) don't support it.</string>
135+
</property>
136+
<property name="text">
137+
<string>Skip attribute creation</string>
138+
</property>
139+
</widget>
140+
</item>
141+
<item>
142+
<widget class="QCheckBox" name="mAddToCanvas">
143+
<property name="text">
144+
<string>Add saved file to map</string>
145+
</property>
146+
</widget>
147+
</item>
148+
<item>
149+
<layout class="QHBoxLayout" name="horizontalLayout_2">
150+
<item>
151+
<widget class="QLabel" name="mSymbologyExportLabel">
152+
<property name="text">
153+
<string>Symbology export</string>
154+
</property>
155+
</widget>
156+
</item>
157+
<item>
158+
<widget class="QComboBox" name="mSymbologyExportComboBox"/>
159+
</item>
160+
</layout>
161+
</item>
162+
<item>
163+
<layout class="QHBoxLayout" name="horizontalLayout">
164+
<item>
165+
<widget class="QLabel" name="mScaleLabel">
166+
<property name="text">
167+
<string>Scale</string>
168+
</property>
169+
</widget>
170+
</item>
171+
<item>
172+
<widget class="QSpinBox" name="mScaleSpinBox">
173+
<property name="prefix">
174+
<string>1:</string>
175+
</property>
176+
<property name="maximum">
177+
<number>999999999</number>
178+
</property>
179+
<property name="value">
180+
<number>50000</number>
181+
</property>
182+
</widget>
183+
</item>
184+
</layout>
185+
</item>
186+
<item>
187+
<widget class="QgsCollapsibleGroupBox" name="mDatasourceOptionsGroupBox">
188+
<property name="title">
189+
<string>Datasource Options</string>
190+
</property>
191+
<layout class="QFormLayout" name="formLayout">
192+
<property name="fieldGrowthPolicy">
193+
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
194+
</property>
195+
</layout>
196+
</widget>
197+
</item>
198+
<item>
199+
<widget class="QgsCollapsibleGroupBox" name="mLayerOptionsGroupBox">
200+
<property name="title">
201+
<string>Layer Options</string>
202+
</property>
203+
<layout class="QFormLayout" name="formLayout_2">
204+
<property name="fieldGrowthPolicy">
205+
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
206+
</property>
207+
</layout>
208+
</widget>
209+
</item>
210+
<item>
211+
<widget class="QgsCollapsibleGroupBox" name="mOgrOptionsGroupBox">
212+
<property name="title">
213+
<string>Custom Options</string>
214+
</property>
215+
<property name="collapsed" stdset="0">
216+
<bool>true</bool>
217+
</property>
218+
<layout class="QGridLayout" name="gridLayout_3">
112219
<item row="0" column="0">
113-
<widget class="QLabel" name="label_2">
220+
<widget class="QLabel" name="label_5">
114221
<property name="text">
115-
<string>Format</string>
222+
<string>Data source</string>
223+
</property>
224+
<property name="alignment">
225+
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
116226
</property>
117227
<property name="buddy">
118-
<cstring>mFormatComboBox</cstring>
228+
<cstring>mOgrDatasourceOptions</cstring>
119229
</property>
120230
</widget>
121231
</item>
122-
<item row="8" column="1">
123-
<spacer name="verticalSpacer_3">
124-
<property name="orientation">
125-
<enum>Qt::Vertical</enum>
232+
<item row="0" column="1">
233+
<widget class="QTextEdit" name="mOgrDatasourceOptions">
234+
<property name="sizePolicy">
235+
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
236+
<horstretch>0</horstretch>
237+
<verstretch>0</verstretch>
238+
</sizepolicy>
126239
</property>
127-
<property name="sizeHint" stdset="0">
240+
<property name="minimumSize">
128241
<size>
129-
<width>20</width>
130-
<height>40</height>
242+
<width>0</width>
243+
<height>0</height>
131244
</size>
132245
</property>
133-
</spacer>
134-
</item>
135-
<item row="7" column="1" colspan="2">
136-
<widget class="QSpinBox" name="mScaleSpinBox">
137-
<property name="prefix">
138-
<string>1:</string>
139-
</property>
140-
<property name="maximum">
141-
<number>999999999</number>
246+
<property name="maximumSize">
247+
<size>
248+
<width>16777215</width>
249+
<height>16777215</height>
250+
</size>
142251
</property>
143-
<property name="value">
144-
<number>50000</number>
252+
<property name="baseSize">
253+
<size>
254+
<width>0</width>
255+
<height>0</height>
256+
</size>
145257
</property>
146258
</widget>
147259
</item>
148-
<item row="6" column="0">
149-
<widget class="QLabel" name="mSymbologyExportLabel">
260+
<item row="1" column="0">
261+
<widget class="QLabel" name="label_6">
150262
<property name="text">
151-
<string>Symbology export</string>
263+
<string>Layer</string>
152264
</property>
153-
</widget>
154-
</item>
155-
<item row="3" column="0">
156-
<widget class="QLabel" name="label_4">
157-
<property name="text">
158-
<string>Encoding</string>
265+
<property name="alignment">
266+
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
159267
</property>
160268
<property name="buddy">
161-
<cstring>mEncodingComboBox</cstring>
162-
</property>
163-
</widget>
164-
</item>
165-
<item row="5" column="2">
166-
<widget class="QPushButton" name="browseCRS">
167-
<property name="text">
168-
<string>Browse</string>
169-
</property>
170-
</widget>
171-
</item>
172-
<item row="9" column="0" colspan="2">
173-
<widget class="QCheckBox" name="mSkipAttributeCreation">
174-
<property name="toolTip">
175-
<string>This allows one to surpress attribute creation as some OGR drivers (eg. DGN, DXF) don't support it.</string>
176-
</property>
177-
<property name="text">
178-
<string>Skip attribute creation</string>
269+
<cstring>mOgrLayerOptions</cstring>
179270
</property>
180271
</widget>
181272
</item>
182-
<item row="2" column="2">
183-
<widget class="QPushButton" name="browseFilename">
184-
<property name="enabled">
185-
<bool>false</bool>
186-
</property>
187-
<property name="text">
188-
<string>Browse</string>
189-
</property>
190-
</widget>
191-
</item>
192-
<item row="11" column="0" colspan="3">
193-
<widget class="QToolButton" name="mOptionsButton">
194-
<property name="enabled">
195-
<bool>true</bool>
196-
</property>
273+
<item row="1" column="1">
274+
<widget class="QTextEdit" name="mOgrLayerOptions">
197275
<property name="sizePolicy">
198-
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
276+
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
199277
<horstretch>0</horstretch>
200278
<verstretch>0</verstretch>
201279
</sizepolicy>
202280
</property>
203-
<property name="text">
204-
<string>More Options &gt;&gt;</string>
205-
</property>
206-
<property name="checkable">
207-
<bool>true</bool>
208-
</property>
209-
<property name="checked">
210-
<bool>true</bool>
211-
</property>
212-
</widget>
213-
</item>
214-
</layout>
215-
</widget>
216-
<widget class="QWidget" name="mOptionsGroupBox" native="true">
217-
<layout class="QGridLayout" name="gridLayout_2">
218-
<property name="topMargin">
219-
<number>0</number>
220-
</property>
221-
<property name="rightMargin">
222-
<number>0</number>
223-
</property>
224-
<property name="bottomMargin">
225-
<number>0</number>
226-
</property>
227-
<item row="0" column="0">
228-
<widget class="QgsCollapsibleGroupBox" name="mDatasourceOptionsGroupBox">
229-
<property name="title">
230-
<string>Datasource Options</string>
231-
</property>
232-
<layout class="QFormLayout" name="formLayout">
233-
<property name="fieldGrowthPolicy">
234-
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
235-
</property>
236-
</layout>
237-
</widget>
238-
</item>
239-
<item row="2" column="0">
240-
<widget class="QgsCollapsibleGroupBox" name="mOgrOptionsGroupBox">
241-
<property name="title">
242-
<string>Custom Options</string>
243-
</property>
244-
<property name="collapsed" stdset="0">
245-
<bool>true</bool>
246-
</property>
247-
<layout class="QGridLayout" name="gridLayout_3">
248-
<item row="0" column="0">
249-
<widget class="QLabel" name="label_5">
250-
<property name="text">
251-
<string>Data source</string>
252-
</property>
253-
<property name="alignment">
254-
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
255-
</property>
256-
<property name="buddy">
257-
<cstring>mOgrDatasourceOptions</cstring>
258-
</property>
259-
</widget>
260-
</item>
261-
<item row="0" column="1">
262-
<widget class="QTextEdit" name="mOgrDatasourceOptions">
263-
<property name="sizePolicy">
264-
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
265-
<horstretch>0</horstretch>
266-
<verstretch>0</verstretch>
267-
</sizepolicy>
268-
</property>
269-
<property name="minimumSize">
270-
<size>
271-
<width>0</width>
272-
<height>0</height>
273-
</size>
274-
</property>
275-
<property name="maximumSize">
276-
<size>
277-
<width>16777215</width>
278-
<height>16777215</height>
279-
</size>
280-
</property>
281-
<property name="baseSize">
282-
<size>
283-
<width>0</width>
284-
<height>0</height>
285-
</size>
286-
</property>
287-
</widget>
288-
</item>
289-
<item row="1" column="0">
290-
<widget class="QLabel" name="label_6">
291-
<property name="text">
292-
<string>Layer</string>
293-
</property>
294-
<property name="alignment">
295-
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
296-
</property>
297-
<property name="buddy">
298-
<cstring>mOgrLayerOptions</cstring>
299-
</property>
300-
</widget>
301-
</item>
302-
<item row="1" column="1">
303-
<widget class="QTextEdit" name="mOgrLayerOptions">
304-
<property name="sizePolicy">
305-
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
306-
<horstretch>0</horstretch>
307-
<verstretch>0</verstretch>
308-
</sizepolicy>
309-
</property>
310-
<property name="minimumSize">
311-
<size>
312-
<width>0</width>
313-
<height>0</height>
314-
</size>
315-
</property>
316-
<property name="maximumSize">
317-
<size>
318-
<width>16777215</width>
319-
<height>16777215</height>
320-
</size>
321-
</property>
322-
<property name="baseSize">
323-
<size>
324-
<width>0</width>
325-
<height>0</height>
326-
</size>
327-
</property>
328-
</widget>
329-
</item>
330-
</layout>
331-
<zorder>label_6</zorder>
332-
<zorder>label_5</zorder>
333-
<zorder>mOgrDatasourceOptions</zorder>
334-
<zorder>mOgrLayerOptions</zorder>
335-
</widget>
336-
</item>
337-
<item row="1" column="0">
338-
<widget class="QgsCollapsibleGroupBox" name="mLayerOptionsGroupBox">
339-
<property name="title">
340-
<string>Layer Options</string>
281+
<property name="minimumSize">
282+
<size>
283+
<width>0</width>
284+
<height>0</height>
285+
</size>
341286
</property>
342-
<layout class="QFormLayout" name="formLayout_2">
343-
<property name="fieldGrowthPolicy">
344-
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
345-
</property>
346-
</layout>
347-
</widget>
348-
</item>
349-
<item row="3" column="0">
350-
<spacer name="verticalSpacer_2">
351-
<property name="orientation">
352-
<enum>Qt::Vertical</enum>
287+
<property name="maximumSize">
288+
<size>
289+
<width>16777215</width>
290+
<height>16777215</height>
291+
</size>
353292
</property>
354-
<property name="sizeHint" stdset="0">
293+
<property name="baseSize">
355294
<size>
356-
<width>20</width>
357-
<height>40</height>
295+
<width>0</width>
296+
<height>0</height>
358297
</size>
359298
</property>
360-
</spacer>
299+
</widget>
361300
</item>
362301
</layout>
302+
<zorder>label_6</zorder>
303+
<zorder>label_5</zorder>
304+
<zorder>mOgrDatasourceOptions</zorder>
305+
<zorder>mOgrLayerOptions</zorder>
363306
</widget>
364-
</widget>
365-
</item>
366-
</layout>
307+
</item>
308+
</layout>
309+
</widget>
310+
</widget>
311+
</item>
312+
<item>
313+
<widget class="QDialogButtonBox" name="buttonBox">
314+
<property name="orientation">
315+
<enum>Qt::Horizontal</enum>
316+
</property>
317+
<property name="standardButtons">
318+
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok</set>
319+
</property>
367320
</widget>
368321
</item>
369322
</layout>

0 commit comments

Comments
 (0)
Please sign in to comment.