Skip to content

Commit 0931de1

Browse files
author
timlinux
committedNov 13, 2010
Tidy up for the options window to use top tabs as per gui discussion at Wroclaw Hackfest
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14614 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

2 files changed

+94
-243
lines changed

2 files changed

+94
-243
lines changed
 

‎src/app/qgsoptions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,15 +389,15 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
389389
} //default is central point
390390

391391
restoreGeometry( settings.value( "/Windows/Options/geometry" ).toByteArray() );
392-
listWidget->setCurrentRow( settings.value( "/Windows/Options/row" ).toInt() );
392+
tabWidget->setCurrentIndex( settings.value( "/Windows/Options/row" ).toInt() );
393393
}
394394

395395
//! Destructor
396396
QgsOptions::~QgsOptions()
397397
{
398398
QSettings settings;
399399
settings.setValue( "/Windows/Options/geometry", saveGeometry() );
400-
settings.setValue( "/Windows/Options/row", listWidget->currentRow() );
400+
settings.setValue( "/Windows/Options/row", tabWidget->currentIndex() );
401401
}
402402

403403
void QgsOptions::on_pbnSelectionColor_clicked()

‎src/ui/qgsoptionsbase.ui

Lines changed: 92 additions & 241 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>700</width>
10-
<height>442</height>
9+
<width>804</width>
10+
<height>567</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
@@ -20,199 +20,7 @@
2020
<bool>true</bool>
2121
</property>
2222
<layout class="QGridLayout" name="gridLayout_3">
23-
<item row="0" column="0">
24-
<widget class="QListWidget" name="listWidget">
25-
<property name="minimumSize">
26-
<size>
27-
<width>110</width>
28-
<height>0</height>
29-
</size>
30-
</property>
31-
<property name="maximumSize">
32-
<size>
33-
<width>110</width>
34-
<height>16777215</height>
35-
</size>
36-
</property>
37-
<property name="frameShape">
38-
<enum>QFrame::NoFrame</enum>
39-
</property>
40-
<property name="frameShadow">
41-
<enum>QFrame::Plain</enum>
42-
</property>
43-
<property name="horizontalScrollBarPolicy">
44-
<enum>Qt::ScrollBarAlwaysOff</enum>
45-
</property>
46-
<property name="editTriggers">
47-
<set>QAbstractItemView::NoEditTriggers</set>
48-
</property>
49-
<property name="showDropIndicator" stdset="0">
50-
<bool>false</bool>
51-
</property>
52-
<property name="iconSize">
53-
<size>
54-
<width>64</width>
55-
<height>64</height>
56-
</size>
57-
</property>
58-
<property name="textElideMode">
59-
<enum>Qt::ElideNone</enum>
60-
</property>
61-
<property name="flow">
62-
<enum>QListView::TopToBottom</enum>
63-
</property>
64-
<property name="isWrapping" stdset="0">
65-
<bool>false</bool>
66-
</property>
67-
<property name="resizeMode">
68-
<enum>QListView::Adjust</enum>
69-
</property>
70-
<property name="spacing">
71-
<number>9</number>
72-
</property>
73-
<property name="viewMode">
74-
<enum>QListView::IconMode</enum>
75-
</property>
76-
<property name="wordWrap">
77-
<bool>true</bool>
78-
</property>
79-
<property name="currentRow">
80-
<number>0</number>
81-
</property>
82-
<item>
83-
<property name="text">
84-
<string>General</string>
85-
</property>
86-
<property name="textAlignment">
87-
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
88-
</property>
89-
<property name="icon">
90-
<iconset resource="../../images/images.qrc">
91-
<normaloff>:/images/themes/default/propertyicons/general.png</normaloff>:/images/themes/default/propertyicons/general.png</iconset>
92-
</property>
93-
<property name="flags">
94-
<set>ItemIsSelectable|ItemIsUserCheckable|ItemIsEnabled</set>
95-
</property>
96-
</item>
97-
<item>
98-
<property name="text">
99-
<string>Rendering &amp; SVG</string>
100-
</property>
101-
<property name="textAlignment">
102-
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
103-
</property>
104-
<property name="icon">
105-
<iconset resource="../../images/images.qrc">
106-
<normaloff>:/images/themes/default/propertyicons/rendering.png</normaloff>:/images/themes/default/propertyicons/rendering.png</iconset>
107-
</property>
108-
<property name="flags">
109-
<set>ItemIsSelectable|ItemIsUserCheckable|ItemIsEnabled</set>
110-
</property>
111-
</item>
112-
<item>
113-
<property name="text">
114-
<string>Map tools</string>
115-
</property>
116-
<property name="textAlignment">
117-
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
118-
</property>
119-
<property name="icon">
120-
<iconset resource="../../images/images.qrc">
121-
<normaloff>:/images/themes/default/propertyicons/map_tools.png</normaloff>:/images/themes/default/propertyicons/map_tools.png</iconset>
122-
</property>
123-
<property name="flags">
124-
<set>ItemIsSelectable|ItemIsUserCheckable|ItemIsEnabled</set>
125-
</property>
126-
</item>
127-
<item>
128-
<property name="text">
129-
<string>Overlay</string>
130-
</property>
131-
<property name="textAlignment">
132-
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
133-
</property>
134-
<property name="icon">
135-
<iconset resource="../../images/images.qrc">
136-
<normaloff>:/images/themes/default/propertyicons/overlay.png</normaloff>:/images/themes/default/propertyicons/overlay.png</iconset>
137-
</property>
138-
<property name="flags">
139-
<set>ItemIsSelectable|ItemIsUserCheckable|ItemIsEnabled</set>
140-
</property>
141-
</item>
142-
<item>
143-
<property name="text">
144-
<string>Digitizing</string>
145-
</property>
146-
<property name="textAlignment">
147-
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
148-
</property>
149-
<property name="icon">
150-
<iconset resource="../../images/images.qrc">
151-
<normaloff>:/images/themes/default/propertyicons/digitising.png</normaloff>:/images/themes/default/propertyicons/digitising.png</iconset>
152-
</property>
153-
<property name="flags">
154-
<set>ItemIsSelectable|ItemIsUserCheckable|ItemIsEnabled</set>
155-
</property>
156-
</item>
157-
<item>
158-
<property name="text">
159-
<string>CRS</string>
160-
</property>
161-
<property name="textAlignment">
162-
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
163-
</property>
164-
<property name="icon">
165-
<iconset resource="../../images/images.qrc">
166-
<normaloff>:/images/themes/default/propertyicons/CRS.png</normaloff>:/images/themes/default/propertyicons/CRS.png</iconset>
167-
</property>
168-
<property name="flags">
169-
<set>ItemIsSelectable|ItemIsUserCheckable|ItemIsEnabled</set>
170-
</property>
171-
</item>
172-
<item>
173-
<property name="text">
174-
<string>Locale</string>
175-
</property>
176-
<property name="textAlignment">
177-
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
178-
</property>
179-
<property name="icon">
180-
<iconset resource="../../images/images.qrc">
181-
<normaloff>:/images/themes/default/propertyicons/locale.png</normaloff>:/images/themes/default/propertyicons/locale.png</iconset>
182-
</property>
183-
<property name="flags">
184-
<set>ItemIsSelectable|ItemIsUserCheckable|ItemIsEnabled</set>
185-
</property>
186-
</item>
187-
<item>
188-
<property name="text">
189-
<string>Network &amp; Proxy</string>
190-
</property>
191-
<property name="textAlignment">
192-
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
193-
</property>
194-
<property name="icon">
195-
<iconset resource="../../images/images.qrc">
196-
<normaloff>:/images/themes/default/propertyicons/network_and_proxy.png</normaloff>:/images/themes/default/propertyicons/network_and_proxy.png</iconset>
197-
</property>
198-
<property name="flags">
199-
<set>ItemIsSelectable|ItemIsUserCheckable|ItemIsEnabled</set>
200-
</property>
201-
</item>
202-
<item>
203-
<property name="text">
204-
<string notr="true"/>
205-
</property>
206-
<property name="textAlignment">
207-
<set>AlignHCenter|AlignVCenter|AlignCenter</set>
208-
</property>
209-
<property name="flags">
210-
<set>NoItemFlags</set>
211-
</property>
212-
</item>
213-
</widget>
214-
</item>
215-
<item row="1" column="0" colspan="2">
23+
<item row="1" column="0">
21624
<widget class="QDialogButtonBox" name="buttonBox">
21725
<property name="orientation">
21826
<enum>Qt::Horizontal</enum>
@@ -222,12 +30,25 @@
22230
</property>
22331
</widget>
22432
</item>
225-
<item row="0" column="1">
226-
<widget class="QStackedWidget" name="stackedWidget">
33+
<item row="0" column="0">
34+
<widget class="QTabWidget" name="tabWidget">
22735
<property name="currentIndex">
22836
<number>0</number>
22937
</property>
230-
<widget class="QWidget" name="stackedWidgetPage1">
38+
<property name="iconSize">
39+
<size>
40+
<width>32</width>
41+
<height>32</height>
42+
</size>
43+
</property>
44+
<widget class="QWidget" name="tabWidgetPage1" native="true">
45+
<attribute name="icon">
46+
<iconset resource="../../images/images.qrc">
47+
<normaloff>:/images/themes/default/propertyicons/general.png</normaloff>:/images/themes/default/propertyicons/general.png</iconset>
48+
</attribute>
49+
<attribute name="title">
50+
<string>General</string>
51+
</attribute>
23152
<layout class="QGridLayout" name="gridLayout_7">
23253
<item row="0" column="0">
23354
<widget class="QScrollArea" name="scrollArea_2">
@@ -239,7 +60,7 @@
23960
<rect>
24061
<x>0</x>
24162
<y>0</y>
242-
<width>530</width>
63+
<width>746</width>
24364
<height>530</height>
24465
</rect>
24566
</property>
@@ -497,7 +318,14 @@
497318
</item>
498319
</layout>
499320
</widget>
500-
<widget class="QWidget" name="stackedWidgetPage2">
321+
<widget class="QWidget" name="tabWidgetPage2" native="true">
322+
<attribute name="icon">
323+
<iconset resource="../../images/images.qrc">
324+
<normaloff>:/images/themes/default/propertyicons/rendering.png</normaloff>:/images/themes/default/propertyicons/rendering.png</iconset>
325+
</attribute>
326+
<attribute name="title">
327+
<string>Rendering</string>
328+
</attribute>
501329
<layout class="QGridLayout" name="gridLayout_9">
502330
<item row="0" column="0">
503331
<widget class="QScrollArea" name="scrollArea_3">
@@ -509,8 +337,8 @@
509337
<rect>
510338
<x>0</x>
511339
<y>0</y>
512-
<width>659</width>
513-
<height>551</height>
340+
<width>746</width>
341+
<height>473</height>
514342
</rect>
515343
</property>
516344
<layout class="QGridLayout" name="gridLayout_8">
@@ -661,7 +489,14 @@
661489
</item>
662490
</layout>
663491
</widget>
664-
<widget class="QWidget" name="stackedWidgetPage3">
492+
<widget class="QWidget" name="tabWidgetPage3" native="true">
493+
<attribute name="icon">
494+
<iconset resource="../../images/images.qrc">
495+
<normaloff>:/images/themes/default/propertyicons/map_tools.png</normaloff>:/images/themes/default/propertyicons/map_tools.png</iconset>
496+
</attribute>
497+
<attribute name="title">
498+
<string>Map tools</string>
499+
</attribute>
665500
<layout class="QGridLayout" name="gridLayout_6">
666501
<item row="0" column="0">
667502
<widget class="QScrollArea" name="scrollArea">
@@ -673,8 +508,8 @@
673508
<rect>
674509
<x>0</x>
675510
<y>0</y>
676-
<width>659</width>
677-
<height>551</height>
511+
<width>746</width>
512+
<height>490</height>
678513
</rect>
679514
</property>
680515
<layout class="QGridLayout" name="gridLayout_4">
@@ -934,7 +769,14 @@
934769
</item>
935770
</layout>
936771
</widget>
937-
<widget class="QWidget" name="stackedWidgetPage4">
772+
<widget class="QWidget" name="tabWidgetPage4" native="true">
773+
<attribute name="icon">
774+
<iconset resource="../../images/images.qrc">
775+
<normaloff>:/images/themes/default/propertyicons/overlay.png</normaloff>:/images/themes/default/propertyicons/overlay.png</iconset>
776+
</attribute>
777+
<attribute name="title">
778+
<string>Overlays</string>
779+
</attribute>
938780
<layout class="QGridLayout" name="gridLayout_11">
939781
<item row="0" column="0">
940782
<widget class="QScrollArea" name="scrollArea_4">
@@ -946,8 +788,8 @@
946788
<rect>
947789
<x>0</x>
948790
<y>0</y>
949-
<width>659</width>
950-
<height>551</height>
791+
<width>762</width>
792+
<height>448</height>
951793
</rect>
952794
</property>
953795
<layout class="QGridLayout" name="gridLayout_10">
@@ -1002,7 +844,14 @@
1002844
</item>
1003845
</layout>
1004846
</widget>
1005-
<widget class="QWidget" name="stackedWidgetPage5">
847+
<widget class="QWidget" name="tabWidgetPage5" native="true">
848+
<attribute name="icon">
849+
<iconset resource="../../images/images.qrc">
850+
<normaloff>:/images/themes/default/propertyicons/digitising.png</normaloff>:/images/themes/default/propertyicons/digitising.png</iconset>
851+
</attribute>
852+
<attribute name="title">
853+
<string>Digitizing</string>
854+
</attribute>
1006855
<layout class="QGridLayout" name="gridLayout_14">
1007856
<item row="0" column="0">
1008857
<widget class="QScrollArea" name="scrollArea_5">
@@ -1014,8 +863,8 @@
1014863
<rect>
1015864
<x>0</x>
1016865
<y>0</y>
1017-
<width>659</width>
1018-
<height>551</height>
866+
<width>762</width>
867+
<height>448</height>
1019868
</rect>
1020869
</property>
1021870
<layout class="QGridLayout" name="gridLayout_13">
@@ -1289,7 +1138,7 @@
12891138
<string>Reuse last entered attribute values</string>
12901139
</property>
12911140
<property name="tristate">
1292-
<bool>false</bool>
1141+
<bool>false</bool>
12931142
</property>
12941143
</widget>
12951144
</item>
@@ -1325,7 +1174,14 @@
13251174
</item>
13261175
</layout>
13271176
</widget>
1328-
<widget class="QWidget" name="stackedWidgetPage6">
1177+
<widget class="QWidget" name="tabWidgetPage6" native="true">
1178+
<attribute name="icon">
1179+
<iconset resource="../../images/images.qrc">
1180+
<normaloff>:/images/themes/default/propertyicons/CRS.png</normaloff>:/images/themes/default/propertyicons/CRS.png</iconset>
1181+
</attribute>
1182+
<attribute name="title">
1183+
<string>CRS</string>
1184+
</attribute>
13291185
<layout class="QGridLayout" name="gridLayout_16">
13301186
<item row="0" column="0">
13311187
<widget class="QScrollArea" name="scrollArea_6">
@@ -1337,8 +1193,8 @@
13371193
<rect>
13381194
<x>0</x>
13391195
<y>0</y>
1340-
<width>659</width>
1341-
<height>551</height>
1196+
<width>746</width>
1197+
<height>531</height>
13421198
</rect>
13431199
</property>
13441200
<layout class="QGridLayout" name="gridLayout_15">
@@ -1414,7 +1270,14 @@
14141270
</item>
14151271
</layout>
14161272
</widget>
1417-
<widget class="QWidget" name="stackedWidgetPage7">
1273+
<widget class="QWidget" name="tabWidgetPage7" native="true">
1274+
<attribute name="icon">
1275+
<iconset resource="../../images/images.qrc">
1276+
<normaloff>:/images/themes/default/propertyicons/locale.png</normaloff>:/images/themes/default/propertyicons/locale.png</iconset>
1277+
</attribute>
1278+
<attribute name="title">
1279+
<string>Locale</string>
1280+
</attribute>
14181281
<layout class="QGridLayout" name="gridLayout_18">
14191282
<item row="0" column="0">
14201283
<widget class="QScrollArea" name="scrollArea_7">
@@ -1426,8 +1289,8 @@
14261289
<rect>
14271290
<x>0</x>
14281291
<y>0</y>
1429-
<width>659</width>
1430-
<height>551</height>
1292+
<width>746</width>
1293+
<height>548</height>
14311294
</rect>
14321295
</property>
14331296
<layout class="QGridLayout" name="gridLayout_17">
@@ -1498,7 +1361,14 @@
14981361
</item>
14991362
</layout>
15001363
</widget>
1501-
<widget class="QWidget" name="stackedWidgetPage8">
1364+
<widget class="QWidget" name="tabWidgetPage8" native="true">
1365+
<attribute name="icon">
1366+
<iconset resource="../../images/images.qrc">
1367+
<normaloff>:/images/themes/default/propertyicons/network_and_proxy.png</normaloff>:/images/themes/default/propertyicons/network_and_proxy.png</iconset>
1368+
</attribute>
1369+
<attribute name="title">
1370+
<string>Network</string>
1371+
</attribute>
15021372
<layout class="QGridLayout" name="gridLayout_19">
15031373
<item row="0" column="0">
15041374
<widget class="QScrollArea" name="scrollArea_8">
@@ -1510,8 +1380,8 @@
15101380
<rect>
15111381
<x>0</x>
15121382
<y>0</y>
1513-
<width>659</width>
1514-
<height>551</height>
1383+
<width>746</width>
1384+
<height>538</height>
15151385
</rect>
15161386
</property>
15171387
<layout class="QGridLayout" name="gridLayout_20">
@@ -1696,9 +1566,6 @@
16961566
<property name="text">
16971567
<string>WMS search address</string>
16981568
</property>
1699-
<property name="buddy">
1700-
<cstring>leWmsSearch</cstring>
1701-
</property>
17021569
</widget>
17031570
</item>
17041571
<item>
@@ -1743,7 +1610,7 @@
17431610
</customwidget>
17441611
</customwidgets>
17451612
<tabstops>
1746-
<tabstop>stackedWidget</tabstop>
1613+
<tabstop>tabWidget</tabstop>
17471614
<tabstop>chbAskToSaveProjectChanges</tabstop>
17481615
<tabstop>chbWarnOldProjectVersion</tabstop>
17491616
<tabstop>pbnSelectionColor</tabstop>
@@ -1835,21 +1702,5 @@
18351702
</hint>
18361703
</hints>
18371704
</connection>
1838-
<connection>
1839-
<sender>listWidget</sender>
1840-
<signal>currentRowChanged(int)</signal>
1841-
<receiver>stackedWidget</receiver>
1842-
<slot>setCurrentIndex(int)</slot>
1843-
<hints>
1844-
<hint type="sourcelabel">
1845-
<x>113</x>
1846-
<y>25</y>
1847-
</hint>
1848-
<hint type="destinationlabel">
1849-
<x>808</x>
1850-
<y>18</y>
1851-
</hint>
1852-
</hints>
1853-
</connection>
18541705
</connections>
18551706
</ui>

0 commit comments

Comments
 (0)
Please sign in to comment.