Skip to content

Commit 02b3fb8

Browse files
committedAug 10, 2016
Labeling tests
(cherry-picked from 01e6c04)
1 parent 0123b7b commit 02b3fb8

File tree

15 files changed

+659
-0
lines changed

15 files changed

+659
-0
lines changed
 

‎tests/src/python/test_qgspallabeling_placement.py

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,121 @@ def test_point_ordered_symbol_bound_offset(self):
271271
self.removeMapLayer(self.layer)
272272
self.layer = None
273273

274+
def test_polygon_placement_perimeter(self):
275+
# Default polygon perimeter placement
276+
self.layer = TestQgsPalLabeling.loadFeatureLayer('polygon_perimeter')
277+
self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
278+
self.lyr.placement = QgsPalLayerSettings.Line
279+
self.checkTest()
280+
self.removeMapLayer(self.layer)
281+
self.layer = None
282+
283+
def test_small_polygon_placement_perimeter(self):
284+
# Default polygon perimeter placement for small polygon
285+
self.layer = TestQgsPalLabeling.loadFeatureLayer('polygon_small')
286+
self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
287+
self.lyr.placement = QgsPalLayerSettings.Line
288+
self.checkTest()
289+
self.removeMapLayer(self.layer)
290+
self.layer = None
291+
292+
def test_small_polygon_perimeter_only_fit(self):
293+
# Polygon perimeter placement for small polygon when set to only show labels which fit in polygon
294+
self.layer = TestQgsPalLabeling.loadFeatureLayer('polygon_small')
295+
self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
296+
self.lyr.placement = QgsPalLayerSettings.Line
297+
self.lyr.fitInPolygonOnly = True
298+
self.checkTest()
299+
self.removeMapLayer(self.layer)
300+
self.layer = None
301+
302+
def test_small_polygon_curvedperimeter_only_fit(self):
303+
# Polygon perimeter placement for small polygon when set to only show labels which fit in polygon
304+
self.layer = TestQgsPalLabeling.loadFeatureLayer('polygon_small')
305+
self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
306+
self.lyr.placement = QgsPalLayerSettings.PerimeterCurved
307+
self.lyr.fitInPolygonOnly = True
308+
self.checkTest()
309+
self.removeMapLayer(self.layer)
310+
self.layer = None
311+
312+
def test_small_polygon_over_point_only_fit(self):
313+
# Polygon over point placement for small polygon when set to only show labels which fit in polygon
314+
self.layer = TestQgsPalLabeling.loadFeatureLayer('polygon_small')
315+
self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
316+
self.lyr.placement = QgsPalLayerSettings.OverPoint
317+
self.lyr.fitInPolygonOnly = True
318+
self.checkTest()
319+
self.removeMapLayer(self.layer)
320+
self.layer = None
321+
322+
def test_prefer_line_curved_above_instead_of_below(self):
323+
# Test that labeling a line using curved labels when both above and below placement are allowed that above
324+
# is preferred
325+
self.layer = TestQgsPalLabeling.loadFeatureLayer('line')
326+
self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
327+
self.lyr.placement = QgsPalLayerSettings.Curved
328+
self.lyr.placementFlags = QgsPalLayerSettings.AboveLine | QgsPalLayerSettings.BelowLine | QgsPalLayerSettings.MapOrientation
329+
self.checkTest()
330+
self.removeMapLayer(self.layer)
331+
self.layer = None
332+
333+
def test_prefer_line_curved_above_instead_of_online(self):
334+
# Test that labeling a line using curved labels when both above and online placement are allowed that above
335+
# is preferred
336+
self.layer = TestQgsPalLabeling.loadFeatureLayer('line')
337+
self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
338+
self.lyr.placement = QgsPalLayerSettings.Curved
339+
self.lyr.placementFlags = QgsPalLayerSettings.AboveLine | QgsPalLayerSettings.OnLine | QgsPalLayerSettings.MapOrientation
340+
self.checkTest()
341+
self.removeMapLayer(self.layer)
342+
self.layer = None
343+
344+
def test_prefer_line_curved_below_instead_of_online(self):
345+
# Test that labeling a line using curved labels when both below and online placement are allowed that below
346+
# is preferred
347+
self.layer = TestQgsPalLabeling.loadFeatureLayer('line')
348+
self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
349+
self.lyr.placement = QgsPalLayerSettings.Curved
350+
self.lyr.placementFlags = QgsPalLayerSettings.BelowLine | QgsPalLayerSettings.OnLine | QgsPalLayerSettings.MapOrientation
351+
self.checkTest()
352+
self.removeMapLayer(self.layer)
353+
self.layer = None
354+
355+
def test_prefer_line_above_instead_of_below(self):
356+
# Test that labeling a line using parallel labels when both above and below placement are allowed that above
357+
# is preferred
358+
self.layer = TestQgsPalLabeling.loadFeatureLayer('line')
359+
self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
360+
self.lyr.placement = QgsPalLayerSettings.Line
361+
self.lyr.placementFlags = QgsPalLayerSettings.AboveLine | QgsPalLayerSettings.BelowLine | QgsPalLayerSettings.MapOrientation
362+
self.checkTest()
363+
self.removeMapLayer(self.layer)
364+
self.layer = None
365+
366+
def test_prefer_line_above_instead_of_online(self):
367+
# Test that labeling a line using parallel labels when both above and online placement are allowed that above
368+
# is preferred
369+
self.layer = TestQgsPalLabeling.loadFeatureLayer('line')
370+
self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
371+
self.lyr.placement = QgsPalLayerSettings.Line
372+
self.lyr.placementFlags = QgsPalLayerSettings.AboveLine | QgsPalLayerSettings.OnLine | QgsPalLayerSettings.MapOrientation
373+
#self.checkTest()
374+
self.removeMapLayer(self.layer)
375+
self.layer = None
376+
377+
def test_prefer_line_below_instead_of_online(self):
378+
# Test that labeling a line using parallel labels when both below and online placement are allowed that below
379+
# is preferred
380+
self.layer = TestQgsPalLabeling.loadFeatureLayer('line')
381+
self._TestMapSettings = self.cloneMapSettings(self._MapSettings)
382+
self.lyr.placement = QgsPalLayerSettings.Line
383+
self.lyr.placementFlags = QgsPalLayerSettings.BelowLine | QgsPalLayerSettings.OnLine | QgsPalLayerSettings.MapOrientation
384+
#self.checkTest()
385+
self.removeMapLayer(self.layer)
386+
self.layer = None
387+
388+
274389
if __name__ == '__main__':
275390
# NOTE: unless PAL_SUITE env var is set all test class methods will be run
276391
# SEE: test_qgspallabeling_tests.suiteTests() to define suite
Binary file not shown.
Lines changed: 272 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,272 @@
1+
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
2+
<qgis version="2.99.0-Master" simplifyAlgorithm="0" minimumScale="100000" maximumScale="1e+08" simplifyDrawingHints="1" simplifyDrawingTol="1" simplifyMaxScale="1" hasScaleBasedVisibilityFlag="0" simplifyLocal="1">
3+
<edittypes>
4+
<edittype widgetv2type="TextEdit" name="pkuid">
5+
<widgetv2config IsMultiline="0" fieldEditable="1" constraint="" UseHtml="0" labelOnTop="0" constraintDescription="" notNull="0"/>
6+
</edittype>
7+
<edittype widgetv2type="TextEdit" name="ftype">
8+
<widgetv2config IsMultiline="0" fieldEditable="1" constraint="" UseHtml="0" labelOnTop="0" constraintDescription="" notNull="0"/>
9+
</edittype>
10+
<edittype widgetv2type="TextEdit" name="text">
11+
<widgetv2config IsMultiline="0" fieldEditable="1" constraint="" UseHtml="0" labelOnTop="0" constraintDescription="" notNull="0"/>
12+
</edittype>
13+
</edittypes>
14+
<renderer-v2 forceraster="0" symbollevels="0" type="singleSymbol" enableorderby="0">
15+
<symbols>
16+
<symbol alpha="1" clip_to_extent="1" type="fill" name="0">
17+
<layer pass="0" class="SimpleFill" locked="0">
18+
<prop k="border_width_map_unit_scale" v="0,0,0,0,0,0"/>
19+
<prop k="color" v="133,149,161,255"/>
20+
<prop k="joinstyle" v="bevel"/>
21+
<prop k="offset" v="0,0"/>
22+
<prop k="offset_map_unit_scale" v="0,0,0,0,0,0"/>
23+
<prop k="offset_unit" v="MM"/>
24+
<prop k="outline_color" v="0,0,0,255"/>
25+
<prop k="outline_style" v="no"/>
26+
<prop k="outline_width" v="0.26"/>
27+
<prop k="outline_width_unit" v="MM"/>
28+
<prop k="style" v="solid"/>
29+
</layer>
30+
</symbol>
31+
</symbols>
32+
<rotation/>
33+
<sizescale scalemethod="diameter"/>
34+
</renderer-v2>
35+
<labeling type="simple"/>
36+
<customproperties>
37+
<property key="embeddedWidgets/count" value="0"/>
38+
<property key="labeling" value="pal"/>
39+
<property key="labeling/addDirectionSymbol" value="false"/>
40+
<property key="labeling/angleOffset" value="0"/>
41+
<property key="labeling/blendMode" value="0"/>
42+
<property key="labeling/bufferBlendMode" value="0"/>
43+
<property key="labeling/bufferColorA" value="255"/>
44+
<property key="labeling/bufferColorB" value="255"/>
45+
<property key="labeling/bufferColorG" value="255"/>
46+
<property key="labeling/bufferColorR" value="255"/>
47+
<property key="labeling/bufferDraw" value="false"/>
48+
<property key="labeling/bufferJoinStyle" value="64"/>
49+
<property key="labeling/bufferNoFill" value="false"/>
50+
<property key="labeling/bufferSize" value="1"/>
51+
<property key="labeling/bufferSizeInMapUnits" value="false"/>
52+
<property key="labeling/bufferSizeMapUnitMaxScale" value="0"/>
53+
<property key="labeling/bufferSizeMapUnitMinScale" value="0"/>
54+
<property key="labeling/bufferSizeMapUnitScale" value="0,0,0,0,0,0"/>
55+
<property key="labeling/bufferTransp" value="0"/>
56+
<property key="labeling/centroidInside" value="false"/>
57+
<property key="labeling/centroidWhole" value="false"/>
58+
<property key="labeling/decimals" value="3"/>
59+
<property key="labeling/displayAll" value="false"/>
60+
<property key="labeling/dist" value="0"/>
61+
<property key="labeling/distInMapUnits" value="false"/>
62+
<property key="labeling/distMapUnitMaxScale" value="0"/>
63+
<property key="labeling/distMapUnitMinScale" value="0"/>
64+
<property key="labeling/distMapUnitScale" value="0,0,0,0,0,0"/>
65+
<property key="labeling/drawLabels" value="true"/>
66+
<property key="labeling/enabled" value="true"/>
67+
<property key="labeling/fieldName" value="text"/>
68+
<property key="labeling/fitInPolygonOnly" value="false"/>
69+
<property key="labeling/fontCapitals" value="0"/>
70+
<property key="labeling/fontFamily" value="Ubuntu"/>
71+
<property key="labeling/fontItalic" value="true"/>
72+
<property key="labeling/fontLetterSpacing" value="0"/>
73+
<property key="labeling/fontLimitPixelSize" value="false"/>
74+
<property key="labeling/fontMaxPixelSize" value="10000"/>
75+
<property key="labeling/fontMinPixelSize" value="3"/>
76+
<property key="labeling/fontSize" value="11"/>
77+
<property key="labeling/fontSizeInMapUnits" value="false"/>
78+
<property key="labeling/fontSizeMapUnitMaxScale" value="0"/>
79+
<property key="labeling/fontSizeMapUnitMinScale" value="0"/>
80+
<property key="labeling/fontSizeMapUnitScale" value="0,0,0,0,0,0"/>
81+
<property key="labeling/fontStrikeout" value="false"/>
82+
<property key="labeling/fontUnderline" value="false"/>
83+
<property key="labeling/fontWeight" value="63"/>
84+
<property key="labeling/fontWordSpacing" value="0"/>
85+
<property key="labeling/formatNumbers" value="false"/>
86+
<property key="labeling/isExpression" value="false"/>
87+
<property key="labeling/labelOffsetInMapUnits" value="true"/>
88+
<property key="labeling/labelOffsetMapUnitMaxScale" value="0"/>
89+
<property key="labeling/labelOffsetMapUnitMinScale" value="0"/>
90+
<property key="labeling/labelOffsetMapUnitScale" value="0,0,0,0,0,0"/>
91+
<property key="labeling/labelPerPart" value="false"/>
92+
<property key="labeling/leftDirectionSymbol" value="&lt;"/>
93+
<property key="labeling/limitNumLabels" value="false"/>
94+
<property key="labeling/maxCurvedCharAngleIn" value="20"/>
95+
<property key="labeling/maxCurvedCharAngleOut" value="-20"/>
96+
<property key="labeling/maxNumLabels" value="2000"/>
97+
<property key="labeling/mergeLines" value="false"/>
98+
<property key="labeling/minFeatureSize" value="0"/>
99+
<property key="labeling/multilineAlign" value="0"/>
100+
<property key="labeling/multilineHeight" value="1"/>
101+
<property key="labeling/namedStyle" value="Medium Italic"/>
102+
<property key="labeling/obstacle" value="true"/>
103+
<property key="labeling/obstacleFactor" value="1"/>
104+
<property key="labeling/obstacleType" value="0"/>
105+
<property key="labeling/offsetType" value="0"/>
106+
<property key="labeling/placeDirectionSymbol" value="0"/>
107+
<property key="labeling/placement" value="1"/>
108+
<property key="labeling/placementFlags" value="10"/>
109+
<property key="labeling/plussign" value="false"/>
110+
<property key="labeling/predefinedPositionOrder" value="TR,TL,BR,BL,R,L,TSR,BSR"/>
111+
<property key="labeling/preserveRotation" value="true"/>
112+
<property key="labeling/previewBkgrdColor" value="#ffffff"/>
113+
<property key="labeling/priority" value="5"/>
114+
<property key="labeling/quadOffset" value="4"/>
115+
<property key="labeling/repeatDistance" value="0"/>
116+
<property key="labeling/repeatDistanceMapUnitMaxScale" value="0"/>
117+
<property key="labeling/repeatDistanceMapUnitMinScale" value="0"/>
118+
<property key="labeling/repeatDistanceMapUnitScale" value="0,0,0,0,0,0"/>
119+
<property key="labeling/repeatDistanceUnit" value="1"/>
120+
<property key="labeling/reverseDirectionSymbol" value="false"/>
121+
<property key="labeling/rightDirectionSymbol" value=">"/>
122+
<property key="labeling/scaleMax" value="10000000"/>
123+
<property key="labeling/scaleMin" value="1"/>
124+
<property key="labeling/scaleVisibility" value="false"/>
125+
<property key="labeling/shadowBlendMode" value="6"/>
126+
<property key="labeling/shadowColorB" value="0"/>
127+
<property key="labeling/shadowColorG" value="0"/>
128+
<property key="labeling/shadowColorR" value="0"/>
129+
<property key="labeling/shadowDraw" value="false"/>
130+
<property key="labeling/shadowOffsetAngle" value="135"/>
131+
<property key="labeling/shadowOffsetDist" value="1"/>
132+
<property key="labeling/shadowOffsetGlobal" value="true"/>
133+
<property key="labeling/shadowOffsetMapUnitMaxScale" value="0"/>
134+
<property key="labeling/shadowOffsetMapUnitMinScale" value="0"/>
135+
<property key="labeling/shadowOffsetMapUnitScale" value="0,0,0,0,0,0"/>
136+
<property key="labeling/shadowOffsetUnits" value="1"/>
137+
<property key="labeling/shadowRadius" value="1.5"/>
138+
<property key="labeling/shadowRadiusAlphaOnly" value="false"/>
139+
<property key="labeling/shadowRadiusMapUnitMaxScale" value="0"/>
140+
<property key="labeling/shadowRadiusMapUnitMinScale" value="0"/>
141+
<property key="labeling/shadowRadiusMapUnitScale" value="0,0,0,0,0,0"/>
142+
<property key="labeling/shadowRadiusUnits" value="1"/>
143+
<property key="labeling/shadowScale" value="100"/>
144+
<property key="labeling/shadowTransparency" value="30"/>
145+
<property key="labeling/shadowUnder" value="0"/>
146+
<property key="labeling/shapeBlendMode" value="0"/>
147+
<property key="labeling/shapeBorderColorA" value="255"/>
148+
<property key="labeling/shapeBorderColorB" value="128"/>
149+
<property key="labeling/shapeBorderColorG" value="128"/>
150+
<property key="labeling/shapeBorderColorR" value="128"/>
151+
<property key="labeling/shapeBorderWidth" value="0"/>
152+
<property key="labeling/shapeBorderWidthMapUnitMaxScale" value="0"/>
153+
<property key="labeling/shapeBorderWidthMapUnitMinScale" value="0"/>
154+
<property key="labeling/shapeBorderWidthMapUnitScale" value="0,0,0,0,0,0"/>
155+
<property key="labeling/shapeBorderWidthUnits" value="1"/>
156+
<property key="labeling/shapeDraw" value="false"/>
157+
<property key="labeling/shapeFillColorA" value="255"/>
158+
<property key="labeling/shapeFillColorB" value="255"/>
159+
<property key="labeling/shapeFillColorG" value="255"/>
160+
<property key="labeling/shapeFillColorR" value="255"/>
161+
<property key="labeling/shapeJoinStyle" value="64"/>
162+
<property key="labeling/shapeOffsetMapUnitMaxScale" value="0"/>
163+
<property key="labeling/shapeOffsetMapUnitMinScale" value="0"/>
164+
<property key="labeling/shapeOffsetMapUnitScale" value="0,0,0,0,0,0"/>
165+
<property key="labeling/shapeOffsetUnits" value="1"/>
166+
<property key="labeling/shapeOffsetX" value="0"/>
167+
<property key="labeling/shapeOffsetY" value="0"/>
168+
<property key="labeling/shapeRadiiMapUnitMaxScale" value="0"/>
169+
<property key="labeling/shapeRadiiMapUnitMinScale" value="0"/>
170+
<property key="labeling/shapeRadiiMapUnitScale" value="0,0,0,0,0,0"/>
171+
<property key="labeling/shapeRadiiUnits" value="1"/>
172+
<property key="labeling/shapeRadiiX" value="0"/>
173+
<property key="labeling/shapeRadiiY" value="0"/>
174+
<property key="labeling/shapeRotation" value="0"/>
175+
<property key="labeling/shapeRotationType" value="0"/>
176+
<property key="labeling/shapeSVGFile" value=""/>
177+
<property key="labeling/shapeSizeMapUnitMaxScale" value="0"/>
178+
<property key="labeling/shapeSizeMapUnitMinScale" value="0"/>
179+
<property key="labeling/shapeSizeMapUnitScale" value="0,0,0,0,0,0"/>
180+
<property key="labeling/shapeSizeType" value="0"/>
181+
<property key="labeling/shapeSizeUnits" value="1"/>
182+
<property key="labeling/shapeSizeX" value="0"/>
183+
<property key="labeling/shapeSizeY" value="0"/>
184+
<property key="labeling/shapeTransparency" value="0"/>
185+
<property key="labeling/shapeType" value="0"/>
186+
<property key="labeling/textColorA" value="255"/>
187+
<property key="labeling/textColorB" value="0"/>
188+
<property key="labeling/textColorG" value="0"/>
189+
<property key="labeling/textColorR" value="0"/>
190+
<property key="labeling/textTransp" value="0"/>
191+
<property key="labeling/upsidedownLabels" value="0"/>
192+
<property key="labeling/wrapChar" value=""/>
193+
<property key="labeling/xOffset" value="0"/>
194+
<property key="labeling/yOffset" value="0"/>
195+
<property key="labeling/zIndex" value="0"/>
196+
<property key="variableNames" value="_fields_"/>
197+
<property key="variableValues" value=""/>
198+
</customproperties>
199+
<blendMode>0</blendMode>
200+
<featureBlendMode>0</featureBlendMode>
201+
<layerTransparency>0</layerTransparency>
202+
<SingleCategoryDiagramRenderer diagramType="Histogram" sizeLegend="0" attributeLegend="1">
203+
<DiagramCategory penColor="#000000" labelPlacementMethod="XHeight" penWidth="0" diagramOrientation="Up" sizeScale="0,0,0,0,0,0" minimumSize="0" barWidth="5" penAlpha="255" maxScaleDenominator="1e+08" backgroundColor="#ffffff" transparency="0" width="15" scaleDependency="Area" backgroundAlpha="255" angleOffset="1440" scaleBasedVisibility="0" enabled="0" height="15" lineSizeScale="0,0,0,0,0,0" sizeType="MM" lineSizeType="MM" minScaleDenominator="100000">
204+
<fontProperties description="Ubuntu,11,-1,5,50,0,0,0,0,0" style=""/>
205+
<attribute field="" color="#000000" label=""/>
206+
</DiagramCategory>
207+
<symbol alpha="1" clip_to_extent="1" type="marker" name="sizeSymbol">
208+
<layer pass="0" class="SimpleMarker" locked="0">
209+
<prop k="angle" v="0"/>
210+
<prop k="color" v="255,0,0,255"/>
211+
<prop k="horizontal_anchor_point" v="1"/>
212+
<prop k="joinstyle" v="bevel"/>
213+
<prop k="name" v="circle"/>
214+
<prop k="offset" v="0,0"/>
215+
<prop k="offset_map_unit_scale" v="0,0,0,0,0,0"/>
216+
<prop k="offset_unit" v="MM"/>
217+
<prop k="outline_color" v="0,0,0,255"/>
218+
<prop k="outline_style" v="solid"/>
219+
<prop k="outline_width" v="0"/>
220+
<prop k="outline_width_map_unit_scale" v="0,0,0,0,0,0"/>
221+
<prop k="outline_width_unit" v="MM"/>
222+
<prop k="scale_method" v="diameter"/>
223+
<prop k="size" v="2"/>
224+
<prop k="size_map_unit_scale" v="0,0,0,0,0,0"/>
225+
<prop k="size_unit" v="MM"/>
226+
<prop k="vertical_anchor_point" v="1"/>
227+
</layer>
228+
</symbol>
229+
</SingleCategoryDiagramRenderer>
230+
<DiagramLayerSettings yPosColumn="-1" showColumn="-1" linePlacementFlags="10" placement="0" dist="0" xPosColumn="-1" priority="0" obstacle="0" zIndex="0" showAll="1"/>
231+
<annotationform></annotationform>
232+
<excludeAttributesWMS/>
233+
<excludeAttributesWFS/>
234+
<attributeactions default="-1"/>
235+
<attributetableconfig actionWidgetStyle="dropDown" sortExpression="" sortOrder="0">
236+
<columns>
237+
<column width="-1" hidden="0" type="field" name="pkuid"/>
238+
<column width="-1" hidden="0" type="field" name="ftype"/>
239+
<column width="-1" hidden="0" type="field" name="text"/>
240+
<column width="-1" hidden="1" type="actions"/>
241+
</columns>
242+
</attributetableconfig>
243+
<editform></editform>
244+
<editforminit/>
245+
<editforminitcodesource>0</editforminitcodesource>
246+
<editforminitfilepath></editforminitfilepath>
247+
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
248+
"""
249+
QGIS forms can have a Python function that is called when the form is
250+
opened.
251+
252+
Use this function to add extra logic to your forms.
253+
254+
Enter the name of the function in the "Python Init function"
255+
field.
256+
An example follows:
257+
"""
258+
from PyQt4.QtGui import QWidget
259+
260+
def my_form_open(dialog, layer, feature):
261+
geom = feature.geometry()
262+
control = dialog.findChild(QWidget, "MyLineEdit")
263+
]]></editforminitcode>
264+
<featformsuppress>0</featformsuppress>
265+
<editorlayout>generatedlayout</editorlayout>
266+
<widgets/>
267+
<conditionalstyles>
268+
<rowstyles/>
269+
<fieldstyles/>
270+
</conditionalstyles>
271+
<layerGeometryType>2</layerGeometryType>
272+
</qgis>
Lines changed: 272 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,272 @@
1+
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
2+
<qgis version="2.99.0-Master" simplifyAlgorithm="0" minimumScale="100000" maximumScale="1e+08" simplifyDrawingHints="1" simplifyDrawingTol="1" simplifyMaxScale="1" hasScaleBasedVisibilityFlag="0" simplifyLocal="1">
3+
<edittypes>
4+
<edittype widgetv2type="TextEdit" name="pkuid">
5+
<widgetv2config IsMultiline="0" fieldEditable="1" constraint="" UseHtml="0" labelOnTop="0" constraintDescription="" notNull="0"/>
6+
</edittype>
7+
<edittype widgetv2type="TextEdit" name="ftype">
8+
<widgetv2config IsMultiline="0" fieldEditable="1" constraint="" UseHtml="0" labelOnTop="0" constraintDescription="" notNull="0"/>
9+
</edittype>
10+
<edittype widgetv2type="TextEdit" name="text">
11+
<widgetv2config IsMultiline="0" fieldEditable="1" constraint="" UseHtml="0" labelOnTop="0" constraintDescription="" notNull="0"/>
12+
</edittype>
13+
</edittypes>
14+
<renderer-v2 forceraster="0" symbollevels="0" type="singleSymbol" enableorderby="0">
15+
<symbols>
16+
<symbol alpha="1" clip_to_extent="1" type="fill" name="0">
17+
<layer pass="0" class="SimpleFill" locked="0">
18+
<prop k="border_width_map_unit_scale" v="0,0,0,0,0,0"/>
19+
<prop k="color" v="133,149,161,255"/>
20+
<prop k="joinstyle" v="bevel"/>
21+
<prop k="offset" v="0,0"/>
22+
<prop k="offset_map_unit_scale" v="0,0,0,0,0,0"/>
23+
<prop k="offset_unit" v="MM"/>
24+
<prop k="outline_color" v="0,0,0,255"/>
25+
<prop k="outline_style" v="no"/>
26+
<prop k="outline_width" v="0.26"/>
27+
<prop k="outline_width_unit" v="MM"/>
28+
<prop k="style" v="solid"/>
29+
</layer>
30+
</symbol>
31+
</symbols>
32+
<rotation/>
33+
<sizescale scalemethod="diameter"/>
34+
</renderer-v2>
35+
<labeling type="simple"/>
36+
<customproperties>
37+
<property key="embeddedWidgets/count" value="0"/>
38+
<property key="labeling" value="pal"/>
39+
<property key="labeling/addDirectionSymbol" value="false"/>
40+
<property key="labeling/angleOffset" value="0"/>
41+
<property key="labeling/blendMode" value="0"/>
42+
<property key="labeling/bufferBlendMode" value="0"/>
43+
<property key="labeling/bufferColorA" value="255"/>
44+
<property key="labeling/bufferColorB" value="255"/>
45+
<property key="labeling/bufferColorG" value="255"/>
46+
<property key="labeling/bufferColorR" value="255"/>
47+
<property key="labeling/bufferDraw" value="false"/>
48+
<property key="labeling/bufferJoinStyle" value="64"/>
49+
<property key="labeling/bufferNoFill" value="false"/>
50+
<property key="labeling/bufferSize" value="1"/>
51+
<property key="labeling/bufferSizeInMapUnits" value="false"/>
52+
<property key="labeling/bufferSizeMapUnitMaxScale" value="0"/>
53+
<property key="labeling/bufferSizeMapUnitMinScale" value="0"/>
54+
<property key="labeling/bufferSizeMapUnitScale" value="0,0,0,0,0,0"/>
55+
<property key="labeling/bufferTransp" value="0"/>
56+
<property key="labeling/centroidInside" value="false"/>
57+
<property key="labeling/centroidWhole" value="false"/>
58+
<property key="labeling/decimals" value="3"/>
59+
<property key="labeling/displayAll" value="false"/>
60+
<property key="labeling/dist" value="0"/>
61+
<property key="labeling/distInMapUnits" value="false"/>
62+
<property key="labeling/distMapUnitMaxScale" value="0"/>
63+
<property key="labeling/distMapUnitMinScale" value="0"/>
64+
<property key="labeling/distMapUnitScale" value="0,0,0,0,0,0"/>
65+
<property key="labeling/drawLabels" value="true"/>
66+
<property key="labeling/enabled" value="true"/>
67+
<property key="labeling/fieldName" value="text"/>
68+
<property key="labeling/fitInPolygonOnly" value="false"/>
69+
<property key="labeling/fontCapitals" value="0"/>
70+
<property key="labeling/fontFamily" value="Ubuntu"/>
71+
<property key="labeling/fontItalic" value="true"/>
72+
<property key="labeling/fontLetterSpacing" value="0"/>
73+
<property key="labeling/fontLimitPixelSize" value="false"/>
74+
<property key="labeling/fontMaxPixelSize" value="10000"/>
75+
<property key="labeling/fontMinPixelSize" value="3"/>
76+
<property key="labeling/fontSize" value="11"/>
77+
<property key="labeling/fontSizeInMapUnits" value="false"/>
78+
<property key="labeling/fontSizeMapUnitMaxScale" value="0"/>
79+
<property key="labeling/fontSizeMapUnitMinScale" value="0"/>
80+
<property key="labeling/fontSizeMapUnitScale" value="0,0,0,0,0,0"/>
81+
<property key="labeling/fontStrikeout" value="false"/>
82+
<property key="labeling/fontUnderline" value="false"/>
83+
<property key="labeling/fontWeight" value="63"/>
84+
<property key="labeling/fontWordSpacing" value="0"/>
85+
<property key="labeling/formatNumbers" value="false"/>
86+
<property key="labeling/isExpression" value="false"/>
87+
<property key="labeling/labelOffsetInMapUnits" value="true"/>
88+
<property key="labeling/labelOffsetMapUnitMaxScale" value="0"/>
89+
<property key="labeling/labelOffsetMapUnitMinScale" value="0"/>
90+
<property key="labeling/labelOffsetMapUnitScale" value="0,0,0,0,0,0"/>
91+
<property key="labeling/labelPerPart" value="false"/>
92+
<property key="labeling/leftDirectionSymbol" value="&lt;"/>
93+
<property key="labeling/limitNumLabels" value="false"/>
94+
<property key="labeling/maxCurvedCharAngleIn" value="20"/>
95+
<property key="labeling/maxCurvedCharAngleOut" value="-20"/>
96+
<property key="labeling/maxNumLabels" value="2000"/>
97+
<property key="labeling/mergeLines" value="false"/>
98+
<property key="labeling/minFeatureSize" value="0"/>
99+
<property key="labeling/multilineAlign" value="0"/>
100+
<property key="labeling/multilineHeight" value="1"/>
101+
<property key="labeling/namedStyle" value="Medium Italic"/>
102+
<property key="labeling/obstacle" value="true"/>
103+
<property key="labeling/obstacleFactor" value="1"/>
104+
<property key="labeling/obstacleType" value="0"/>
105+
<property key="labeling/offsetType" value="0"/>
106+
<property key="labeling/placeDirectionSymbol" value="0"/>
107+
<property key="labeling/placement" value="2"/>
108+
<property key="labeling/placementFlags" value="10"/>
109+
<property key="labeling/plussign" value="false"/>
110+
<property key="labeling/predefinedPositionOrder" value="TR,TL,BR,BL,R,L,TSR,BSR"/>
111+
<property key="labeling/preserveRotation" value="true"/>
112+
<property key="labeling/previewBkgrdColor" value="#ffffff"/>
113+
<property key="labeling/priority" value="5"/>
114+
<property key="labeling/quadOffset" value="4"/>
115+
<property key="labeling/repeatDistance" value="0"/>
116+
<property key="labeling/repeatDistanceMapUnitMaxScale" value="0"/>
117+
<property key="labeling/repeatDistanceMapUnitMinScale" value="0"/>
118+
<property key="labeling/repeatDistanceMapUnitScale" value="0,0,0,0,0,0"/>
119+
<property key="labeling/repeatDistanceUnit" value="1"/>
120+
<property key="labeling/reverseDirectionSymbol" value="false"/>
121+
<property key="labeling/rightDirectionSymbol" value=">"/>
122+
<property key="labeling/scaleMax" value="10000000"/>
123+
<property key="labeling/scaleMin" value="1"/>
124+
<property key="labeling/scaleVisibility" value="false"/>
125+
<property key="labeling/shadowBlendMode" value="6"/>
126+
<property key="labeling/shadowColorB" value="0"/>
127+
<property key="labeling/shadowColorG" value="0"/>
128+
<property key="labeling/shadowColorR" value="0"/>
129+
<property key="labeling/shadowDraw" value="false"/>
130+
<property key="labeling/shadowOffsetAngle" value="135"/>
131+
<property key="labeling/shadowOffsetDist" value="1"/>
132+
<property key="labeling/shadowOffsetGlobal" value="true"/>
133+
<property key="labeling/shadowOffsetMapUnitMaxScale" value="0"/>
134+
<property key="labeling/shadowOffsetMapUnitMinScale" value="0"/>
135+
<property key="labeling/shadowOffsetMapUnitScale" value="0,0,0,0,0,0"/>
136+
<property key="labeling/shadowOffsetUnits" value="1"/>
137+
<property key="labeling/shadowRadius" value="1.5"/>
138+
<property key="labeling/shadowRadiusAlphaOnly" value="false"/>
139+
<property key="labeling/shadowRadiusMapUnitMaxScale" value="0"/>
140+
<property key="labeling/shadowRadiusMapUnitMinScale" value="0"/>
141+
<property key="labeling/shadowRadiusMapUnitScale" value="0,0,0,0,0,0"/>
142+
<property key="labeling/shadowRadiusUnits" value="1"/>
143+
<property key="labeling/shadowScale" value="100"/>
144+
<property key="labeling/shadowTransparency" value="30"/>
145+
<property key="labeling/shadowUnder" value="0"/>
146+
<property key="labeling/shapeBlendMode" value="0"/>
147+
<property key="labeling/shapeBorderColorA" value="255"/>
148+
<property key="labeling/shapeBorderColorB" value="128"/>
149+
<property key="labeling/shapeBorderColorG" value="128"/>
150+
<property key="labeling/shapeBorderColorR" value="128"/>
151+
<property key="labeling/shapeBorderWidth" value="0"/>
152+
<property key="labeling/shapeBorderWidthMapUnitMaxScale" value="0"/>
153+
<property key="labeling/shapeBorderWidthMapUnitMinScale" value="0"/>
154+
<property key="labeling/shapeBorderWidthMapUnitScale" value="0,0,0,0,0,0"/>
155+
<property key="labeling/shapeBorderWidthUnits" value="1"/>
156+
<property key="labeling/shapeDraw" value="false"/>
157+
<property key="labeling/shapeFillColorA" value="255"/>
158+
<property key="labeling/shapeFillColorB" value="255"/>
159+
<property key="labeling/shapeFillColorG" value="255"/>
160+
<property key="labeling/shapeFillColorR" value="255"/>
161+
<property key="labeling/shapeJoinStyle" value="64"/>
162+
<property key="labeling/shapeOffsetMapUnitMaxScale" value="0"/>
163+
<property key="labeling/shapeOffsetMapUnitMinScale" value="0"/>
164+
<property key="labeling/shapeOffsetMapUnitScale" value="0,0,0,0,0,0"/>
165+
<property key="labeling/shapeOffsetUnits" value="1"/>
166+
<property key="labeling/shapeOffsetX" value="0"/>
167+
<property key="labeling/shapeOffsetY" value="0"/>
168+
<property key="labeling/shapeRadiiMapUnitMaxScale" value="0"/>
169+
<property key="labeling/shapeRadiiMapUnitMinScale" value="0"/>
170+
<property key="labeling/shapeRadiiMapUnitScale" value="0,0,0,0,0,0"/>
171+
<property key="labeling/shapeRadiiUnits" value="1"/>
172+
<property key="labeling/shapeRadiiX" value="0"/>
173+
<property key="labeling/shapeRadiiY" value="0"/>
174+
<property key="labeling/shapeRotation" value="0"/>
175+
<property key="labeling/shapeRotationType" value="0"/>
176+
<property key="labeling/shapeSVGFile" value=""/>
177+
<property key="labeling/shapeSizeMapUnitMaxScale" value="0"/>
178+
<property key="labeling/shapeSizeMapUnitMinScale" value="0"/>
179+
<property key="labeling/shapeSizeMapUnitScale" value="0,0,0,0,0,0"/>
180+
<property key="labeling/shapeSizeType" value="0"/>
181+
<property key="labeling/shapeSizeUnits" value="1"/>
182+
<property key="labeling/shapeSizeX" value="0"/>
183+
<property key="labeling/shapeSizeY" value="0"/>
184+
<property key="labeling/shapeTransparency" value="0"/>
185+
<property key="labeling/shapeType" value="0"/>
186+
<property key="labeling/textColorA" value="255"/>
187+
<property key="labeling/textColorB" value="0"/>
188+
<property key="labeling/textColorG" value="0"/>
189+
<property key="labeling/textColorR" value="0"/>
190+
<property key="labeling/textTransp" value="0"/>
191+
<property key="labeling/upsidedownLabels" value="0"/>
192+
<property key="labeling/wrapChar" value=""/>
193+
<property key="labeling/xOffset" value="0"/>
194+
<property key="labeling/yOffset" value="0"/>
195+
<property key="labeling/zIndex" value="0"/>
196+
<property key="variableNames" value="_fields_"/>
197+
<property key="variableValues" value=""/>
198+
</customproperties>
199+
<blendMode>0</blendMode>
200+
<featureBlendMode>0</featureBlendMode>
201+
<layerTransparency>0</layerTransparency>
202+
<SingleCategoryDiagramRenderer diagramType="Histogram" sizeLegend="0" attributeLegend="1">
203+
<DiagramCategory penColor="#000000" labelPlacementMethod="XHeight" penWidth="0" diagramOrientation="Up" sizeScale="0,0,0,0,0,0" minimumSize="0" barWidth="5" penAlpha="255" maxScaleDenominator="1e+08" backgroundColor="#ffffff" transparency="0" width="15" scaleDependency="Area" backgroundAlpha="255" angleOffset="1440" scaleBasedVisibility="0" enabled="0" height="15" lineSizeScale="0,0,0,0,0,0" sizeType="MM" lineSizeType="MM" minScaleDenominator="100000">
204+
<fontProperties description="Ubuntu,11,-1,5,50,0,0,0,0,0" style=""/>
205+
<attribute field="" color="#000000" label=""/>
206+
</DiagramCategory>
207+
<symbol alpha="1" clip_to_extent="1" type="marker" name="sizeSymbol">
208+
<layer pass="0" class="SimpleMarker" locked="0">
209+
<prop k="angle" v="0"/>
210+
<prop k="color" v="255,0,0,255"/>
211+
<prop k="horizontal_anchor_point" v="1"/>
212+
<prop k="joinstyle" v="bevel"/>
213+
<prop k="name" v="circle"/>
214+
<prop k="offset" v="0,0"/>
215+
<prop k="offset_map_unit_scale" v="0,0,0,0,0,0"/>
216+
<prop k="offset_unit" v="MM"/>
217+
<prop k="outline_color" v="0,0,0,255"/>
218+
<prop k="outline_style" v="solid"/>
219+
<prop k="outline_width" v="0"/>
220+
<prop k="outline_width_map_unit_scale" v="0,0,0,0,0,0"/>
221+
<prop k="outline_width_unit" v="MM"/>
222+
<prop k="scale_method" v="diameter"/>
223+
<prop k="size" v="2"/>
224+
<prop k="size_map_unit_scale" v="0,0,0,0,0,0"/>
225+
<prop k="size_unit" v="MM"/>
226+
<prop k="vertical_anchor_point" v="1"/>
227+
</layer>
228+
</symbol>
229+
</SingleCategoryDiagramRenderer>
230+
<DiagramLayerSettings yPosColumn="-1" showColumn="-1" linePlacementFlags="10" placement="0" dist="0" xPosColumn="-1" priority="0" obstacle="0" zIndex="0" showAll="1"/>
231+
<annotationform></annotationform>
232+
<excludeAttributesWMS/>
233+
<excludeAttributesWFS/>
234+
<attributeactions default="-1"/>
235+
<attributetableconfig actionWidgetStyle="dropDown" sortExpression="" sortOrder="0">
236+
<columns>
237+
<column width="-1" hidden="0" type="field" name="pkuid"/>
238+
<column width="-1" hidden="0" type="field" name="ftype"/>
239+
<column width="-1" hidden="0" type="field" name="text"/>
240+
<column width="-1" hidden="1" type="actions"/>
241+
</columns>
242+
</attributetableconfig>
243+
<editform></editform>
244+
<editforminit/>
245+
<editforminitcodesource>0</editforminitcodesource>
246+
<editforminitfilepath></editforminitfilepath>
247+
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
248+
"""
249+
QGIS forms can have a Python function that is called when the form is
250+
opened.
251+
252+
Use this function to add extra logic to your forms.
253+
254+
Enter the name of the function in the "Python Init function"
255+
field.
256+
An example follows:
257+
"""
258+
from PyQt4.QtGui import QWidget
259+
260+
def my_form_open(dialog, layer, feature):
261+
geom = feature.geometry()
262+
control = dialog.findChild(QWidget, "MyLineEdit")
263+
]]></editforminitcode>
264+
<featformsuppress>0</featformsuppress>
265+
<editorlayout>generatedlayout</editorlayout>
266+
<widgets/>
267+
<conditionalstyles>
268+
<rowstyles/>
269+
<fieldstyles/>
270+
</conditionalstyles>
271+
<layerGeometryType>2</layerGeometryType>
272+
</qgis>

0 commit comments

Comments
 (0)
Please sign in to comment.