Skip to content

Commit 41af53b

Browse files
author
timlinux
committedMay 21, 2008
Gui tidy ups for the project props dialog as part of the general GUI revision
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8487 c8812cc2-4d05-0410-92ff-de0c093fc19c

File tree

2 files changed

+221
-214
lines changed

2 files changed

+221
-214
lines changed
 

‎src/app/qgsprojectproperties.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,13 @@ QgsProjectProperties::QgsProjectProperties(QgsMapCanvas* mapCanvas, QWidget *par
7373
// position display is set (manual or automatic)
7474
bool automaticPrecision = QgsProject::instance()->readBoolEntry("PositionPrecision","/Automatic");
7575
if (automaticPrecision)
76+
{
7677
radAutomatic->setChecked(true);
78+
}
7779
else
80+
{
7881
radManual->setChecked(true);
82+
}
7983

8084
int dp = QgsProject::instance()->readNumEntry("PositionPrecision", "/DecimalPlaces");
8185
spinBoxDP->setValue(dp);

‎src/ui/qgsprojectpropertiesbase.ui

Lines changed: 217 additions & 214 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<rect>
66
<x>0</x>
77
<y>0</y>
8-
<width>750</width>
9-
<height>615</height>
8+
<width>452</width>
9+
<height>495</height>
1010
</rect>
1111
</property>
1212
<property name="windowTitle" >
@@ -22,12 +22,6 @@
2222
<bool>true</bool>
2323
</property>
2424
<layout class="QGridLayout" >
25-
<property name="margin" >
26-
<number>9</number>
27-
</property>
28-
<property name="spacing" >
29-
<number>6</number>
30-
</property>
3125
<item row="0" column="0" >
3226
<widget class="QTabWidget" name="tabWidget" >
3327
<property name="currentIndex" >
@@ -38,108 +32,47 @@
3832
<string>General</string>
3933
</attribute>
4034
<layout class="QGridLayout" >
41-
<property name="margin" >
42-
<number>9</number>
43-
</property>
44-
<property name="spacing" >
45-
<number>6</number>
46-
</property>
4735
<item row="0" column="0" >
4836
<widget class="QGroupBox" name="titleBox" >
4937
<property name="title" >
50-
<string>Project Title</string>
38+
<string>Title and colors</string>
5139
</property>
5240
<layout class="QGridLayout" >
53-
<property name="margin" >
54-
<number>11</number>
55-
</property>
56-
<property name="spacing" >
57-
<number>6</number>
58-
</property>
5941
<item row="0" column="0" >
60-
<widget class="QLineEdit" name="titleEdit" >
61-
<property name="toolTip" >
62-
<string>Descriptive project name</string>
63-
</property>
42+
<widget class="QLabel" name="label_2" >
6443
<property name="text" >
65-
<string>Default project title</string>
44+
<string>Project title</string>
6645
</property>
6746
</widget>
6847
</item>
69-
</layout>
70-
</widget>
71-
</item>
72-
<item row="2" column="0" >
73-
<widget class="QGroupBox" name="btnGrpPrecision" >
74-
<property name="title" >
75-
<string>Precision</string>
76-
</property>
77-
<layout class="QHBoxLayout" >
78-
<property name="margin" >
79-
<number>11</number>
80-
</property>
81-
<property name="spacing" >
82-
<number>6</number>
83-
</property>
84-
<item>
85-
<widget class="QRadioButton" name="radAutomatic" >
48+
<item row="0" column="1" colspan="3" >
49+
<widget class="QLineEdit" name="titleEdit" >
8650
<property name="toolTip" >
87-
<string>Automatically sets the number of decimal places in the mouse position display</string>
88-
</property>
89-
<property name="whatsThis" >
90-
<string>The number of decimal places that are used when displaying the mouse position is automatically set to be enough so that moving the mouse by one pixel gives a change in the position display</string>
51+
<string>Descriptive project name</string>
9152
</property>
9253
<property name="text" >
93-
<string>Automatic</string>
94-
</property>
95-
<property name="checked" >
96-
<bool>true</bool>
54+
<string>Default project title</string>
9755
</property>
9856
</widget>
9957
</item>
100-
<item>
101-
<widget class="QRadioButton" name="radManual" >
102-
<property name="toolTip" >
103-
<string>Sets the number of decimal places to use for the mouse position display</string>
104-
</property>
105-
<property name="whatsThis" >
106-
<string>Sets the number of decimal places to use for the mouse position display</string>
107-
</property>
58+
<item row="1" column="0" >
59+
<widget class="QLabel" name="textLabel1" >
10860
<property name="text" >
109-
<string>Manual</string>
110-
</property>
111-
</widget>
112-
</item>
113-
<item>
114-
<widget class="QSpinBox" name="spinBoxDP" >
115-
<property name="toolTip" >
116-
<string>The number of decimal places for the manual option</string>
117-
</property>
118-
<property name="whatsThis" >
119-
<string>The number of decimal places for the manual option</string>
120-
</property>
121-
</widget>
122-
</item>
123-
<item>
124-
<widget class="QLabel" name="textLabel3" >
125-
<property name="sizePolicy" >
126-
<sizepolicy>
127-
<hsizetype>0</hsizetype>
128-
<vsizetype>0</vsizetype>
129-
<horstretch>0</horstretch>
130-
<verstretch>0</verstretch>
131-
</sizepolicy>
61+
<string>Selection color</string>
13262
</property>
133-
<property name="text" >
134-
<string>decimal places</string>
63+
<property name="buddy" >
64+
<cstring>pbnSelectionColour</cstring>
13565
</property>
13666
</widget>
13767
</item>
138-
<item>
68+
<item row="1" column="2" >
13969
<spacer>
14070
<property name="orientation" >
14171
<enum>Qt::Horizontal</enum>
14272
</property>
73+
<property name="sizeType" >
74+
<enum>QSizePolicy::Expanding</enum>
75+
</property>
14376
<property name="sizeHint" >
14477
<size>
14578
<width>40</width>
@@ -148,32 +81,7 @@
14881
</property>
14982
</spacer>
15083
</item>
151-
</layout>
152-
</widget>
153-
</item>
154-
<item row="4" column="0" >
155-
<widget class="QGroupBox" name="groupBox" >
156-
<property name="title" >
157-
<string>Map Appearance</string>
158-
</property>
159-
<layout class="QHBoxLayout" >
160-
<property name="margin" >
161-
<number>11</number>
162-
</property>
163-
<property name="spacing" >
164-
<number>6</number>
165-
</property>
166-
<item>
167-
<widget class="QLabel" name="textLabel1" >
168-
<property name="text" >
169-
<string>Selection Color:</string>
170-
</property>
171-
<property name="buddy" >
172-
<cstring>pbnSelectionColour</cstring>
173-
</property>
174-
</widget>
175-
</item>
176-
<item>
84+
<item row="1" column="3" >
17785
<widget class="QgsColorButton" name="pbnSelectionColour" >
17886
<property name="minimumSize" >
17987
<size>
@@ -186,14 +94,21 @@
18694
</property>
18795
</widget>
18896
</item>
189-
<item>
97+
<item row="2" column="0" colspan="2" >
98+
<widget class="QLabel" name="label" >
99+
<property name="text" >
100+
<string>Background color</string>
101+
</property>
102+
<property name="buddy" >
103+
<cstring>pbnCanvasColor</cstring>
104+
</property>
105+
</widget>
106+
</item>
107+
<item row="2" column="2" >
190108
<spacer>
191109
<property name="orientation" >
192110
<enum>Qt::Horizontal</enum>
193111
</property>
194-
<property name="sizeType" >
195-
<enum>QSizePolicy::Expanding</enum>
196-
</property>
197112
<property name="sizeHint" >
198113
<size>
199114
<width>40</width>
@@ -202,17 +117,7 @@
202117
</property>
203118
</spacer>
204119
</item>
205-
<item>
206-
<widget class="QLabel" name="label" >
207-
<property name="text" >
208-
<string>Background Color:</string>
209-
</property>
210-
<property name="buddy" >
211-
<cstring>pbnCanvasColor</cstring>
212-
</property>
213-
</widget>
214-
</item>
215-
<item>
120+
<item row="2" column="3" >
216121
<widget class="QgsColorButton" name="pbnCanvasColor" >
217122
<property name="minimumSize" >
218123
<size>
@@ -225,87 +130,26 @@
225130
</property>
226131
</widget>
227132
</item>
228-
<item>
229-
<spacer>
230-
<property name="orientation" >
231-
<enum>Qt::Horizontal</enum>
232-
</property>
233-
<property name="sizeHint" >
234-
<size>
235-
<width>40</width>
236-
<height>20</height>
237-
</size>
238-
</property>
239-
</spacer>
240-
</item>
241133
</layout>
242134
</widget>
243135
</item>
244-
<item row="3" column="0" >
245-
<widget class="QGroupBox" name="grpDigitizing" >
246-
<property name="sizePolicy" >
247-
<sizepolicy>
248-
<hsizetype>5</hsizetype>
249-
<vsizetype>7</vsizetype>
250-
<horstretch>0</horstretch>
251-
<verstretch>0</verstretch>
252-
</sizepolicy>
253-
</property>
254-
<property name="title" >
255-
<string>Digitizing</string>
256-
</property>
257-
<widget class="QCheckBox" name="mEnableTopologicalEditingCheckBox" >
258-
<property name="geometry" >
259-
<rect>
260-
<x>11</x>
261-
<y>21</y>
262-
<width>371</width>
263-
<height>31</height>
264-
</rect>
265-
</property>
266-
<property name="text" >
267-
<string>Enable topological editing</string>
268-
</property>
269-
</widget>
270-
<widget class="QPushButton" name="mSnappingOptionsPushButton" >
271-
<property name="geometry" >
272-
<rect>
273-
<x>11</x>
274-
<y>95</y>
275-
<width>194</width>
276-
<height>36</height>
277-
</rect>
278-
</property>
279-
<property name="text" >
280-
<string>Snapping options...</string>
281-
</property>
282-
</widget>
283-
<widget class="QCheckBox" name="mAvoidIntersectionsCheckBox" >
284-
<property name="geometry" >
285-
<rect>
286-
<x>11</x>
287-
<y>58</y>
288-
<width>371</width>
289-
<height>31</height>
290-
</rect>
291-
</property>
292-
<property name="text" >
293-
<string>Avoid intersections of new polygons</string>
294-
</property>
295-
</widget>
296-
</widget>
297-
</item>
298136
<item row="1" column="0" >
299137
<widget class="QGroupBox" name="btnGrpMapUnits" >
300138
<property name="title" >
301-
<string>Map Units</string>
139+
<string>Map units</string>
302140
</property>
303141
<layout class="QHBoxLayout" >
304-
<property name="margin" >
142+
<property name="leftMargin" >
143+
<number>11</number>
144+
</property>
145+
<property name="topMargin" >
305146
<number>11</number>
306147
</property>
307-
<property name="spacing" >
308-
<number>6</number>
148+
<property name="rightMargin" >
149+
<number>11</number>
150+
</property>
151+
<property name="bottomMargin" >
152+
<number>11</number>
309153
</property>
310154
<item>
311155
<widget class="QRadioButton" name="radMeters" >
@@ -331,18 +175,102 @@
331175
</property>
332176
</widget>
333177
</item>
334-
<item>
335-
<spacer>
336-
<property name="orientation" >
337-
<enum>Qt::Horizontal</enum>
178+
</layout>
179+
</widget>
180+
</item>
181+
<item row="2" column="0" >
182+
<widget class="QGroupBox" name="btnGrpPrecision" >
183+
<property name="title" >
184+
<string>Precision</string>
185+
</property>
186+
<layout class="QGridLayout" >
187+
<item row="0" column="0" >
188+
<widget class="QRadioButton" name="radAutomatic" >
189+
<property name="toolTip" >
190+
<string>Automatically sets the number of decimal places in the mouse position display</string>
338191
</property>
339-
<property name="sizeHint" >
340-
<size>
341-
<width>40</width>
342-
<height>20</height>
343-
</size>
192+
<property name="whatsThis" >
193+
<string>The number of decimal places that are used when displaying the mouse position is automatically set to be enough so that moving the mouse by one pixel gives a change in the position display</string>
344194
</property>
345-
</spacer>
195+
<property name="text" >
196+
<string>Automatic</string>
197+
</property>
198+
<property name="checked" >
199+
<bool>true</bool>
200+
</property>
201+
</widget>
202+
</item>
203+
<item row="0" column="1" >
204+
<widget class="QRadioButton" name="radManual" >
205+
<property name="toolTip" >
206+
<string>Sets the number of decimal places to use for the mouse position display</string>
207+
</property>
208+
<property name="whatsThis" >
209+
<string>Sets the number of decimal places to use for the mouse position display</string>
210+
</property>
211+
<property name="text" >
212+
<string>Manual</string>
213+
</property>
214+
</widget>
215+
</item>
216+
<item row="0" column="2" >
217+
<widget class="QSpinBox" name="spinBoxDP" >
218+
<property name="toolTip" >
219+
<string>The number of decimal places for the manual option</string>
220+
</property>
221+
<property name="whatsThis" >
222+
<string>The number of decimal places for the manual option</string>
223+
</property>
224+
</widget>
225+
</item>
226+
<item row="0" column="3" >
227+
<widget class="QLabel" name="textLabel3" >
228+
<property name="sizePolicy" >
229+
<sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
230+
<horstretch>0</horstretch>
231+
<verstretch>0</verstretch>
232+
</sizepolicy>
233+
</property>
234+
<property name="text" >
235+
<string>decimal places</string>
236+
</property>
237+
</widget>
238+
</item>
239+
</layout>
240+
</widget>
241+
</item>
242+
<item row="3" column="0" >
243+
<widget class="QGroupBox" name="grpDigitizing" >
244+
<property name="sizePolicy" >
245+
<sizepolicy vsizetype="Expanding" hsizetype="Preferred" >
246+
<horstretch>0</horstretch>
247+
<verstretch>0</verstretch>
248+
</sizepolicy>
249+
</property>
250+
<property name="title" >
251+
<string>Digitizing</string>
252+
</property>
253+
<layout class="QGridLayout" >
254+
<item row="0" column="0" >
255+
<widget class="QCheckBox" name="mEnableTopologicalEditingCheckBox" >
256+
<property name="text" >
257+
<string>Enable topological editing</string>
258+
</property>
259+
</widget>
260+
</item>
261+
<item row="1" column="0" >
262+
<widget class="QCheckBox" name="mAvoidIntersectionsCheckBox" >
263+
<property name="text" >
264+
<string>Avoid intersections of new polygons</string>
265+
</property>
266+
</widget>
267+
</item>
268+
<item row="2" column="0" >
269+
<widget class="QPushButton" name="mSnappingOptionsPushButton" >
270+
<property name="text" >
271+
<string>Snapping options...</string>
272+
</property>
273+
</widget>
346274
</item>
347275
</layout>
348276
</widget>
@@ -354,11 +282,17 @@
354282
<string>Projection</string>
355283
</attribute>
356284
<layout class="QGridLayout" >
357-
<property name="margin" >
285+
<property name="leftMargin" >
358286
<number>11</number>
359287
</property>
360-
<property name="spacing" >
361-
<number>6</number>
288+
<property name="topMargin" >
289+
<number>11</number>
290+
</property>
291+
<property name="rightMargin" >
292+
<number>11</number>
293+
</property>
294+
<property name="bottomMargin" >
295+
<number>11</number>
362296
</property>
363297
<item row="0" column="0" >
364298
<widget class="QCheckBox" name="cbxProjectionEnabled" >
@@ -401,18 +335,87 @@
401335
</customwidget>
402336
</customwidgets>
403337
<tabstops>
404-
<tabstop>tabWidget</tabstop>
405338
<tabstop>titleEdit</tabstop>
339+
<tabstop>pbnSelectionColour</tabstop>
340+
<tabstop>pbnCanvasColor</tabstop>
406341
<tabstop>radMeters</tabstop>
407342
<tabstop>radFeet</tabstop>
408343
<tabstop>radDecimalDegrees</tabstop>
409344
<tabstop>radAutomatic</tabstop>
410345
<tabstop>radManual</tabstop>
411346
<tabstop>spinBoxDP</tabstop>
412-
<tabstop>pbnSelectionColour</tabstop>
413-
<tabstop>pbnCanvasColor</tabstop>
347+
<tabstop>mEnableTopologicalEditingCheckBox</tabstop>
348+
<tabstop>mAvoidIntersectionsCheckBox</tabstop>
349+
<tabstop>mSnappingOptionsPushButton</tabstop>
414350
<tabstop>cbxProjectionEnabled</tabstop>
351+
<tabstop>tabWidget</tabstop>
352+
<tabstop>buttonBox</tabstop>
415353
</tabstops>
416354
<resources/>
417-
<connections/>
355+
<connections>
356+
<connection>
357+
<sender>radManual</sender>
358+
<signal>clicked(bool)</signal>
359+
<receiver>spinBoxDP</receiver>
360+
<slot>setEnabled(bool)</slot>
361+
<hints>
362+
<hint type="sourcelabel" >
363+
<x>229</x>
364+
<y>280</y>
365+
</hint>
366+
<hint type="destinationlabel" >
367+
<x>416</x>
368+
<y>286</y>
369+
</hint>
370+
</hints>
371+
</connection>
372+
<connection>
373+
<sender>radManual</sender>
374+
<signal>clicked(bool)</signal>
375+
<receiver>textLabel3</receiver>
376+
<slot>setEnabled(bool)</slot>
377+
<hints>
378+
<hint type="sourcelabel" >
379+
<x>240</x>
380+
<y>281</y>
381+
</hint>
382+
<hint type="destinationlabel" >
383+
<x>583</x>
384+
<y>290</y>
385+
</hint>
386+
</hints>
387+
</connection>
388+
<connection>
389+
<sender>radAutomatic</sender>
390+
<signal>clicked(bool)</signal>
391+
<receiver>spinBoxDP</receiver>
392+
<slot>setDisabled(bool)</slot>
393+
<hints>
394+
<hint type="sourcelabel" >
395+
<x>100</x>
396+
<y>290</y>
397+
</hint>
398+
<hint type="destinationlabel" >
399+
<x>395</x>
400+
<y>285</y>
401+
</hint>
402+
</hints>
403+
</connection>
404+
<connection>
405+
<sender>radAutomatic</sender>
406+
<signal>clicked(bool)</signal>
407+
<receiver>textLabel3</receiver>
408+
<slot>setDisabled(bool)</slot>
409+
<hints>
410+
<hint type="sourcelabel" >
411+
<x>87</x>
412+
<y>284</y>
413+
</hint>
414+
<hint type="destinationlabel" >
415+
<x>589</x>
416+
<y>285</y>
417+
</hint>
418+
</hints>
419+
</connection>
420+
</connections>
418421
</ui>

0 commit comments

Comments
 (0)
Please sign in to comment.