Skip to content

Commit 4e1dcad

Browse files
author
timlinux
committed
Gui cleanups for interopolation plugin: use labels formatting compliant with qgis ui guide. Get rid of extra layouts. Improve layout. Use qrc file for resources. Make plugin icon consistent with requirements for docu team.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9214 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 76ec56b commit 4e1dcad

7 files changed

+156
-155
lines changed

src/plugins/interpolation/CMakeLists.txt

+14-3
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,29 @@ SET (INTERPOLATION_MOC_HDRS
3636
qgsinterpolationdialog.h
3737
)
3838

39+
SET (INTERPOLATION_RCCS interpolator.qrc)
3940
########################################################
4041
# Build
4142

4243
QT4_WRAP_UI (INTERPOLATION_UIS_H ${INTERPOLATION_UIS})
4344

4445
QT4_WRAP_CPP (INTERPOLATION_MOC_SRCS ${INTERPOLATION_MOC_HDRS})
4546

46-
ADD_LIBRARY (interpolationplugin MODULE ${INTERPOLATION_SRCS} ${INTERPOLATION_MOC_SRCS} ${INTERPOLATION_RCC_SRCS} ${INTERPOLATION_UIS_H})
47+
QT4_ADD_RESOURCES(INTERPOLATION_RCC_SRCS ${INTERPOLATION_RCCS})
48+
49+
ADD_LIBRARY (interpolationplugin MODULE
50+
${INTERPOLATION_SRCS}
51+
${INTERPOLATION_MOC_SRCS}
52+
${INTERPOLATION_RCC_SRCS}
53+
${INTERPOLATION_UIS_H})
4754

4855
INCLUDE_DIRECTORIES(
4956
${CMAKE_CURRENT_BINARY_DIR}
5057
${GEOS_INCLUDE_DIR}
51-
../../core ../../core/raster ../../core/renderer ../../core/symbology
58+
../../core
59+
../../core/raster
60+
../../core/renderer
61+
../../core/symbology
5262
../../gui
5363
..
5464
.
@@ -65,4 +75,5 @@ TARGET_LINK_LIBRARIES(interpolationplugin
6575

6676
INSTALL(TARGETS interpolationplugin
6777
RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
68-
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR})
78+
LIBRARY DESTINATION ${QGIS_PLUGIN_DIR}
79+
)
283 Bytes
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<RCC>
2+
<qresource prefix="/interpolator" >
3+
<file>options.png</file>
4+
<file>interpolation.png</file>
5+
</qresource>
6+
</RCC>

src/plugins/interpolation/mIconInterpolation.xpm

-33
This file was deleted.

src/plugins/interpolation/options.png

3.71 KB
Loading

src/plugins/interpolation/qgsinterpolationdialogbase.ui

+135-116
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<x>0</x>
77
<y>0</y>
88
<width>485</width>
9-
<height>538</height>
9+
<height>372</height>
1010
</rect>
1111
</property>
1212
<property name="sizePolicy" >
@@ -16,7 +16,7 @@
1616
</sizepolicy>
1717
</property>
1818
<property name="windowTitle" >
19-
<string>Dialog</string>
19+
<string>Interpolation plugin</string>
2020
</property>
2121
<layout class="QGridLayout" >
2222
<item row="0" column="0" >
@@ -32,39 +32,58 @@
3232
</property>
3333
<layout class="QGridLayout" >
3434
<item row="0" column="0" >
35-
<layout class="QHBoxLayout" >
36-
<item>
37-
<widget class="QLabel" name="mInputVectorLayerLabel" >
38-
<property name="text" >
39-
<string>Input vector layer:</string>
40-
</property>
41-
</widget>
42-
</item>
43-
<item>
44-
<widget class="QComboBox" name="mInputLayerComboBox" />
45-
</item>
46-
</layout>
35+
<widget class="QLabel" name="mInputVectorLayerLabel" >
36+
<property name="text" >
37+
<string>Input vector layer</string>
38+
</property>
39+
<property name="buddy" >
40+
<cstring>mInputLayerComboBox</cstring>
41+
</property>
42+
</widget>
43+
</item>
44+
<item row="0" column="1" >
45+
<widget class="QComboBox" name="mInputLayerComboBox" >
46+
<property name="sizePolicy" >
47+
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
48+
<horstretch>0</horstretch>
49+
<verstretch>0</verstretch>
50+
</sizepolicy>
51+
</property>
52+
</widget>
4753
</item>
4854
<item row="1" column="0" >
55+
<widget class="QLabel" name="label" >
56+
<property name="text" >
57+
<string/>
58+
</property>
59+
</widget>
60+
</item>
61+
<item row="1" column="1" >
4962
<widget class="QCheckBox" name="mUseZCoordCheckBox" >
5063
<property name="text" >
5164
<string>Use z-Coordinate for interpolation</string>
5265
</property>
5366
</widget>
5467
</item>
5568
<item row="2" column="0" >
56-
<layout class="QHBoxLayout" >
57-
<item>
58-
<widget class="QLabel" name="mInterpolationAttributeLabel" >
59-
<property name="text" >
60-
<string>Interpolation attribute: </string>
61-
</property>
62-
</widget>
63-
</item>
64-
<item>
65-
<widget class="QComboBox" name="mInterpolationAttributeComboBox" />
66-
</item>
67-
</layout>
69+
<widget class="QLabel" name="mInterpolationAttributeLabel" >
70+
<property name="text" >
71+
<string>Interpolation attribute </string>
72+
</property>
73+
<property name="buddy" >
74+
<cstring>mInterpolationAttributeComboBox</cstring>
75+
</property>
76+
</widget>
77+
</item>
78+
<item row="2" column="1" >
79+
<widget class="QComboBox" name="mInterpolationAttributeComboBox" >
80+
<property name="sizePolicy" >
81+
<sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
82+
<horstretch>0</horstretch>
83+
<verstretch>0</verstretch>
84+
</sizepolicy>
85+
</property>
86+
</widget>
6887
</item>
6988
</layout>
7089
</widget>
@@ -81,96 +100,82 @@
81100
<string>Output</string>
82101
</property>
83102
<layout class="QGridLayout" >
84-
<item row="0" column="0" colspan="2" >
85-
<layout class="QHBoxLayout" >
86-
<item>
87-
<widget class="QLabel" name="mInterpolationLabel" >
88-
<property name="text" >
89-
<string>Interpolation method:</string>
90-
</property>
91-
</widget>
92-
</item>
93-
<item>
94-
<widget class="QComboBox" name="mInterpolationMethodComboBox" />
95-
</item>
96-
</layout>
103+
<item row="0" column="0" >
104+
<widget class="QLabel" name="mInterpolationLabel" >
105+
<property name="text" >
106+
<string>Interpolation method</string>
107+
</property>
108+
<property name="buddy" >
109+
<cstring>mInterpolationMethodComboBox</cstring>
110+
</property>
111+
</widget>
112+
</item>
113+
<item row="0" column="1" >
114+
<widget class="QComboBox" name="mInterpolationMethodComboBox" />
115+
</item>
116+
<item row="0" column="2" >
117+
<widget class="QToolButton" name="mConfigureInterpolationButton" >
118+
<property name="text" >
119+
<string>...</string>
120+
</property>
121+
<property name="icon" >
122+
<iconset resource="interpolator.qrc" >:/interpolator/options.png</iconset>
123+
</property>
124+
</widget>
97125
</item>
98126
<item row="1" column="0" >
99-
<widget class="QPushButton" name="mConfigureInterpolationButton" >
127+
<widget class="QLabel" name="mNumberOfColumnsLabel" >
100128
<property name="text" >
101-
<string>Configure interpolation method...</string>
129+
<string>Number of columns</string>
130+
</property>
131+
<property name="buddy" >
132+
<cstring>mNumberOfColumnsSpinBox</cstring>
102133
</property>
103134
</widget>
104135
</item>
105-
<item row="1" column="1" >
106-
<spacer>
107-
<property name="orientation" >
108-
<enum>Qt::Horizontal</enum>
109-
</property>
110-
<property name="sizeHint" stdset="0" >
111-
<size>
112-
<width>51</width>
113-
<height>20</height>
114-
</size>
115-
</property>
116-
</spacer>
117-
</item>
118-
<item row="2" column="0" colspan="2" >
119-
<layout class="QHBoxLayout" >
120-
<item>
121-
<widget class="QLabel" name="mNumberOfColumnsLabel" >
122-
<property name="text" >
123-
<string>Number of columns:</string>
124-
</property>
125-
</widget>
126-
</item>
127-
<item>
128-
<widget class="QSpinBox" name="mNumberOfColumnsSpinBox" >
129-
<property name="maximum" >
130-
<number>10000000</number>
131-
</property>
132-
</widget>
133-
</item>
134-
</layout>
135-
</item>
136-
<item row="3" column="0" colspan="2" >
137-
<layout class="QHBoxLayout" >
138-
<item>
139-
<widget class="QLabel" name="mNumberOfRowsLabel" >
140-
<property name="text" >
141-
<string>Number of rows:</string>
142-
</property>
143-
</widget>
144-
</item>
145-
<item>
146-
<widget class="QSpinBox" name="mNumberOfRowsSpinBox" >
147-
<property name="maximum" >
148-
<number>10000000</number>
149-
</property>
150-
</widget>
151-
</item>
152-
</layout>
153-
</item>
154-
<item row="4" column="0" colspan="2" >
155-
<layout class="QHBoxLayout" >
156-
<item>
157-
<widget class="QLabel" name="mOutputFileLabel" >
158-
<property name="text" >
159-
<string>Output File: </string>
160-
</property>
161-
</widget>
162-
</item>
163-
<item>
164-
<widget class="QLineEdit" name="mOutputFileLineEdit" />
165-
</item>
166-
<item>
167-
<widget class="QPushButton" name="mOutputFileButton" >
168-
<property name="text" >
169-
<string>...</string>
170-
</property>
171-
</widget>
172-
</item>
173-
</layout>
136+
<item row="1" column="1" colspan="2" >
137+
<widget class="QSpinBox" name="mNumberOfColumnsSpinBox" >
138+
<property name="maximum" >
139+
<number>10000000</number>
140+
</property>
141+
</widget>
142+
</item>
143+
<item row="2" column="0" >
144+
<widget class="QLabel" name="mNumberOfRowsLabel" >
145+
<property name="text" >
146+
<string>Number of rows</string>
147+
</property>
148+
<property name="buddy" >
149+
<cstring>mNumberOfRowsSpinBox</cstring>
150+
</property>
151+
</widget>
152+
</item>
153+
<item row="2" column="1" colspan="2" >
154+
<widget class="QSpinBox" name="mNumberOfRowsSpinBox" >
155+
<property name="maximum" >
156+
<number>10000000</number>
157+
</property>
158+
</widget>
159+
</item>
160+
<item row="3" column="0" >
161+
<widget class="QLabel" name="mOutputFileLabel" >
162+
<property name="text" >
163+
<string>Output file </string>
164+
</property>
165+
<property name="buddy" >
166+
<cstring>mOutputFileLineEdit</cstring>
167+
</property>
168+
</widget>
169+
</item>
170+
<item row="3" column="1" >
171+
<widget class="QLineEdit" name="mOutputFileLineEdit" />
172+
</item>
173+
<item row="3" column="2" >
174+
<widget class="QToolButton" name="mOutputFileButton" >
175+
<property name="text" >
176+
<string>...</string>
177+
</property>
178+
</widget>
174179
</item>
175180
</layout>
176181
</widget>
@@ -181,13 +186,27 @@
181186
<enum>Qt::Horizontal</enum>
182187
</property>
183188
<property name="standardButtons" >
184-
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
189+
<set>QDialogButtonBox::Cancel|QDialogButtonBox::NoButton|QDialogButtonBox::Ok</set>
185190
</property>
186191
</widget>
187192
</item>
188193
</layout>
189194
</widget>
190-
<resources/>
195+
<tabstops>
196+
<tabstop>mInputLayerComboBox</tabstop>
197+
<tabstop>mUseZCoordCheckBox</tabstop>
198+
<tabstop>mInterpolationAttributeComboBox</tabstop>
199+
<tabstop>mInterpolationMethodComboBox</tabstop>
200+
<tabstop>mConfigureInterpolationButton</tabstop>
201+
<tabstop>mNumberOfColumnsSpinBox</tabstop>
202+
<tabstop>mNumberOfRowsSpinBox</tabstop>
203+
<tabstop>mOutputFileLineEdit</tabstop>
204+
<tabstop>mOutputFileButton</tabstop>
205+
<tabstop>buttonBox</tabstop>
206+
</tabstops>
207+
<resources>
208+
<include location="interpolator.qrc" />
209+
</resources>
191210
<connections>
192211
<connection>
193212
<sender>buttonBox</sender>
@@ -196,8 +215,8 @@
196215
<slot>accept()</slot>
197216
<hints>
198217
<hint type="sourcelabel" >
199-
<x>248</x>
200-
<y>254</y>
218+
<x>257</x>
219+
<y>362</y>
201220
</hint>
202221
<hint type="destinationlabel" >
203222
<x>157</x>
@@ -212,8 +231,8 @@
212231
<slot>reject()</slot>
213232
<hints>
214233
<hint type="sourcelabel" >
215-
<x>316</x>
216-
<y>260</y>
234+
<x>325</x>
235+
<y>362</y>
217236
</hint>
218237
<hint type="destinationlabel" >
219238
<x>286</x>

0 commit comments

Comments
 (0)