Skip to content

Commit 0a82f37

Browse files
committedMay 7, 2014
sync symbology-ng sips with headers (scripts/sipdiff)
1 parent 4ecb178 commit 0a82f37

12 files changed

+106
-104
lines changed
 

‎python/core/qgsmapunitscale.sip

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,3 @@ public:
2222

2323
double computeMapUnitsPerPixel(const QgsRenderContext& c) const;
2424
};
25-
26-
27-

‎python/core/symbology-ng/qgsellipsesymbollayerv2.sip

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,27 +46,25 @@ class QgsEllipseSymbolLayerV2 : QgsMarkerSymbolLayerV2
4646

4747
void setSymbolWidthUnit( QgsSymbolV2::OutputUnit unit );
4848
QgsSymbolV2::OutputUnit symbolWidthUnit() const;
49-
49+
5050
void setSymbolWidthMapUnitScale( const QgsMapUnitScale& scale);
5151
const QgsMapUnitScale& symbolWidthMapUnitScale() const;
5252

5353
void setSymbolHeightUnit( QgsSymbolV2::OutputUnit unit );
5454
QgsSymbolV2::OutputUnit symbolHeightUnit() const;
55-
55+
5656
void setSymbolHeightMapUnitScale( const QgsMapUnitScale& scale);
5757
const QgsMapUnitScale& symbolHeightMapUnitScale() const;
5858

5959
void setOutlineWidthUnit( QgsSymbolV2::OutputUnit unit );
6060
QgsSymbolV2::OutputUnit outlineWidthUnit() const;
61-
61+
6262
void setOutlineWidthMapUnitScale( const QgsMapUnitScale& scale);
6363
const QgsMapUnitScale& outlineWidthMapUnitScale() const;
6464

6565
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
6666
QgsSymbolV2::OutputUnit outputUnit() const;
67-
68-
void setMapUnitScale( const QgsMapUnitScale& scale);
67+
68+
void setMapUnitScale( const QgsMapUnitScale& scale );
6969
QgsMapUnitScale mapUnitScale() const;
7070
};
71-
72-

‎python/core/symbology-ng/qgsfillsymbollayerv2.sip

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class QgsSimpleFillSymbolLayerV2 : QgsFillSymbolLayerV2
1212
double borderWidth = DEFAULT_SIMPLEFILL_BORDERWIDTH,
1313
Qt::PenJoinStyle penJoinStyle = DEFAULT_SIMPLEFILL_JOINSTYLE
1414
);
15-
15+
1616
// static stuff
1717

1818
static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() ) /Factory/;
@@ -61,7 +61,7 @@ class QgsSimpleFillSymbolLayerV2 : QgsFillSymbolLayerV2
6161

6262
double borderWidth() const;
6363
void setBorderWidth( double borderWidth );
64-
64+
6565
Qt::PenJoinStyle penJoinStyle() const;
6666
void setPenJoinStyle( Qt::PenJoinStyle style );
6767

@@ -70,20 +70,20 @@ class QgsSimpleFillSymbolLayerV2 : QgsFillSymbolLayerV2
7070

7171
void setBorderWidthUnit( QgsSymbolV2::OutputUnit unit );
7272
QgsSymbolV2::OutputUnit borderWidthUnit() const;
73-
73+
7474
void setBorderWidthMapUnitScale( const QgsMapUnitScale& scale);
7575
const QgsMapUnitScale& borderWidthMapUnitScale() const;
7676

7777
void setOffsetUnit( QgsSymbolV2::OutputUnit unit );
7878
QgsSymbolV2::OutputUnit offsetUnit() const;
79-
79+
8080
void setOffsetMapUnitScale( const QgsMapUnitScale& scale);
8181
const QgsMapUnitScale& offsetMapUnitScale() const;
8282

8383
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
8484
QgsSymbolV2::OutputUnit outputUnit() const;
85-
86-
void setMapUnitScale(const QgsMapUnitScale &scale);
85+
86+
void setMapUnitScale( const QgsMapUnitScale &scale );
8787
QgsMapUnitScale mapUnitScale() const;
8888

8989
double estimateMaxBleed() const;
@@ -208,14 +208,14 @@ class QgsGradientFillSymbolLayerV2 : QgsFillSymbolLayerV2
208208
/**Units for gradient fill offset*/
209209
void setOffsetUnit( QgsSymbolV2::OutputUnit unit );
210210
QgsSymbolV2::OutputUnit offsetUnit() const;
211-
211+
212212
void setOffsetMapUnitScale( const QgsMapUnitScale& scale);
213213
const QgsMapUnitScale& offsetMapUnitScale() const;
214-
215-
void setOutputUnit(QgsSymbolV2::OutputUnit unit);
214+
215+
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
216216
QgsSymbolV2::OutputUnit outputUnit() const;
217217

218-
void setMapUnitScale(const QgsMapUnitScale &scale);
218+
void setMapUnitScale( const QgsMapUnitScale &scale );
219219
QgsMapUnitScale mapUnitScale() const;
220220

221221
};
@@ -234,12 +234,9 @@ class QgsShapeburstFillSymbolLayerV2 : QgsFillSymbolLayerV2
234234
ColorRamp
235235
};
236236

237-
QgsShapeburstFillSymbolLayerV2( QColor color = DEFAULT_SIMPLEFILL_COLOR,
238-
QColor color2 = Qt::white,
237+
QgsShapeburstFillSymbolLayerV2( QColor color = DEFAULT_SIMPLEFILL_COLOR, QColor color2 = Qt::white,
239238
ShapeburstColorType colorType = SimpleTwoColor,
240-
int blurRadius = 0,
241-
bool useWholeShape = true,
242-
double maxDistance = 5 );
239+
int blurRadius = 0, bool useWholeShape = true, double maxDistance = 5 );
243240

244241
virtual ~QgsShapeburstFillSymbolLayerV2();
245242

@@ -324,6 +321,9 @@ class QgsShapeburstFillSymbolLayerV2 : QgsFillSymbolLayerV2
324321
*/
325322
QgsSymbolV2::OutputUnit distanceUnit() const;
326323

324+
void setDistanceMapUnitScale( const QgsMapUnitScale& scale );
325+
const QgsMapUnitScale& distanceMapUnitScale() const;
326+
327327
/**Sets the color mode to use for the shapeburst fill. Shapeburst can either be drawn using a QgsVectorColorRampV2 color ramp
328328
* or by simply specificing a start and end color. setColorType is used to specify which mode to use for the fill.
329329
* @param colorType color type to use for shapeburst fill
@@ -374,7 +374,7 @@ class QgsShapeburstFillSymbolLayerV2 : QgsFillSymbolLayerV2
374374
* @see colorType
375375
*/
376376
QColor color2() const;
377-
377+
378378
/**Sets whether the shapeburst fill should ignore polygon rings when calculating
379379
* the buffered shading.
380380
* @param ignoreRings Set to true if buffers should ignore interior rings for polygons.
@@ -387,7 +387,7 @@ class QgsShapeburstFillSymbolLayerV2 : QgsFillSymbolLayerV2
387387
* @note added in 2.3
388388
* @see setIgnoreRings
389389
*/
390-
double ignoreRings() const;
390+
double ignoreRings() const;
391391

392392
/**Sets the offset for the shapeburst fill.
393393
* @param offset QPointF indicating the horizontal/vertical offset amount
@@ -418,10 +418,15 @@ class QgsShapeburstFillSymbolLayerV2 : QgsFillSymbolLayerV2
418418
* @see setOffsetUnit
419419
*/
420420
QgsSymbolV2::OutputUnit offsetUnit() const;
421-
421+
422422
void setOffsetMapUnitScale( const QgsMapUnitScale& scale);
423423
const QgsMapUnitScale& offsetMapUnitScale() const;
424424

425+
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
426+
QgsSymbolV2::OutputUnit outputUnit() const;
427+
428+
void setMapUnitScale( const QgsMapUnitScale &scale );
429+
QgsMapUnitScale mapUnitScale() const;
425430
};
426431

427432
/**Base class for polygon renderers generating texture images*/
@@ -441,14 +446,14 @@ class QgsImageFillSymbolLayer: QgsFillSymbolLayerV2
441446

442447
void setOutlineWidthUnit( QgsSymbolV2::OutputUnit unit );
443448
QgsSymbolV2::OutputUnit outlineWidthUnit() const;
444-
449+
445450
void setOutlineWidthMapUnitScale( const QgsMapUnitScale& scale);
446451
const QgsMapUnitScale& outlineWidthMapUnitScale() const;
447-
448-
void setOutputUnit(QgsSymbolV2::OutputUnit unit);
452+
453+
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
449454
QgsSymbolV2::OutputUnit outputUnit() const;
450455

451-
void setMapUnitScale(const QgsMapUnitScale &scale);
456+
void setMapUnitScale( const QgsMapUnitScale& scale );
452457
QgsMapUnitScale mapUnitScale() const;
453458

454459
virtual double estimateMaxBleed() const;
@@ -502,19 +507,22 @@ class QgsSVGFillSymbolLayer: QgsImageFillSymbolLayer
502507

503508
void setPatternWidthUnit( QgsSymbolV2::OutputUnit unit );
504509
QgsSymbolV2::OutputUnit patternWidthUnit() const;
505-
510+
506511
void setPatternWidthMapUnitScale( const QgsMapUnitScale& scale);
507512
const QgsMapUnitScale& patternWidthMapUnitScale() const;
508513

509514
void setSvgOutlineWidthUnit( QgsSymbolV2::OutputUnit unit );
510515
QgsSymbolV2::OutputUnit svgOutlineWidthUnit() const;
511-
516+
512517
void setSvgOutlineWidthMapUnitScale( const QgsMapUnitScale& scale);
513518
const QgsMapUnitScale& svgOutlineWidthMapUnitScale() const;
514519

515520
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
516521
QgsSymbolV2::OutputUnit outputUnit() const;
517522

523+
void setMapUnitScale( const QgsMapUnitScale &scale );
524+
QgsMapUnitScale mapUnitScale() const;
525+
518526
protected:
519527
void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
520528
};
@@ -561,26 +569,26 @@ class QgsLinePatternFillSymbolLayer: QgsImageFillSymbolLayer
561569

562570
void setDistanceUnit( QgsSymbolV2::OutputUnit unit );
563571
QgsSymbolV2::OutputUnit distanceUnit() const;
564-
572+
565573
void setDistanceMapUnitScale( const QgsMapUnitScale& scale);
566574
const QgsMapUnitScale& distanceMapUnitScale() const;
567575

568576
void setLineWidthUnit( QgsSymbolV2::OutputUnit unit );
569577
QgsSymbolV2::OutputUnit lineWidthUnit() const;
570-
578+
571579
void setLineWidthMapUnitScale( const QgsMapUnitScale& scale);
572580
const QgsMapUnitScale& lineWidthMapUnitScale() const;
573581

574582
void setOffsetUnit( QgsSymbolV2::OutputUnit unit );
575583
QgsSymbolV2::OutputUnit offsetUnit() const;
576-
584+
577585
void setOffsetMapUnitScale( const QgsMapUnitScale& scale);
578586
const QgsMapUnitScale& offsetMapUnitScale() const;
579587

580588
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
581589
QgsSymbolV2::OutputUnit outputUnit() const;
582-
583-
void setMapUnitScale( const QgsMapUnitScale& scale);
590+
591+
void setMapUnitScale( const QgsMapUnitScale& scale );
584592
QgsMapUnitScale mapUnitScale() const;
585593

586594
bool setSubSymbol( QgsSymbolV2* symbol );
@@ -632,32 +640,32 @@ class QgsPointPatternFillSymbolLayer : QgsImageFillSymbolLayer
632640

633641
void setDistanceXUnit( QgsSymbolV2::OutputUnit unit );
634642
QgsSymbolV2::OutputUnit distanceXUnit() const;
635-
643+
636644
void setDistanceXMapUnitScale( const QgsMapUnitScale& scale);
637645
const QgsMapUnitScale& distanceXMapUnitScale() const;
638646

639647
void setDistanceYUnit( QgsSymbolV2::OutputUnit unit );
640648
QgsSymbolV2::OutputUnit distanceYUnit() const;
641-
649+
642650
void setDistanceYMapUnitScale( const QgsMapUnitScale& scale);
643651
const QgsMapUnitScale& distanceYMapUnitScale() const;
644652

645653
void setDisplacementXUnit( QgsSymbolV2::OutputUnit unit );
646654
QgsSymbolV2::OutputUnit displacementXUnit() const;
647-
655+
648656
void setDisplacementXMapUnitScale( const QgsMapUnitScale& scale);
649657
const QgsMapUnitScale& displacementXMapUnitScale() const;
650658

651659
void setDisplacementYUnit( QgsSymbolV2::OutputUnit unit );
652660
QgsSymbolV2::OutputUnit displacementYUnit() const;
653-
661+
654662
void setDisplacementYMapUnitScale( const QgsMapUnitScale& scale);
655663
const QgsMapUnitScale& displacementYMapUnitScale() const;
656664

657665
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
658666
QgsSymbolV2::OutputUnit outputUnit() const;
659-
660-
void setMapUnitScale(const QgsMapUnitScale &scale);
667+
668+
void setMapUnitScale( const QgsMapUnitScale &scale );
661669
QgsMapUnitScale mapUnitScale() const;
662670

663671
virtual QSet<QString> usedAttributes() const;
@@ -704,11 +712,9 @@ class QgsCentroidFillSymbolLayerV2 : QgsFillSymbolLayerV2
704712

705713
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
706714
QgsSymbolV2::OutputUnit outputUnit() const;
707-
715+
708716
void setMapUnitScale(const QgsMapUnitScale &scale);
709717
QgsMapUnitScale mapUnitScale() const;
710718

711719
virtual QSet<QString> usedAttributes() const;
712720
};
713-
714-

‎python/core/symbology-ng/qgslinesymbollayerv2.sip

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class QgsSimpleLineSymbolLayerV2 : QgsLineSymbolLayerV2
3434

3535
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
3636
QgsSymbolV2::OutputUnit outputUnit() const;
37-
38-
void setMapUnitScale(const QgsMapUnitScale &scale);
37+
38+
void setMapUnitScale( const QgsMapUnitScale &scale );
3939
QgsMapUnitScale mapUnitScale() const;
4040

4141
double estimateMaxBleed() const;
@@ -56,16 +56,16 @@ class QgsSimpleLineSymbolLayerV2 : QgsLineSymbolLayerV2
5656

5757
void setOffsetUnit( QgsSymbolV2::OutputUnit unit );
5858
QgsSymbolV2::OutputUnit offsetUnit() const;
59-
59+
6060
void setOffsetMapUnitScale( const QgsMapUnitScale& scale);
6161
const QgsMapUnitScale& offsetMapUnitScale() const;
6262

6363
bool useCustomDashPattern() const;
6464
void setUseCustomDashPattern( bool b );
6565

66-
QgsSymbolV2::OutputUnit customDashPatternUnit() const;
6766
void setCustomDashPatternUnit( QgsSymbolV2::OutputUnit unit );
68-
67+
QgsSymbolV2::OutputUnit customDashPatternUnit() const;
68+
6969
const QgsMapUnitScale& customDashPatternMapUnitScale() const;
7070
void setCustomDashPatternMapUnitScale( const QgsMapUnitScale& scale);
7171

@@ -78,6 +78,7 @@ class QgsSimpleLineSymbolLayerV2 : QgsLineSymbolLayerV2
7878
void setDrawInsidePolygon( bool drawInsidePolygon );
7979

8080
QVector<qreal> dxfCustomDashPattern( QgsSymbolV2::OutputUnit& unit ) const;
81+
Qt::PenStyle dxfPenStyle() const;
8182

8283
double dxfWidth( const QgsDxfExport& e, const QgsSymbolV2RenderContext& context ) const;
8384
QColor dxfColor( const QgsSymbolV2RenderContext& context ) const;
@@ -150,7 +151,7 @@ class QgsMarkerLineSymbolLayerV2 : QgsLineSymbolLayerV2
150151

151152
Placement placement() const;
152153
void setPlacement( Placement p );
153-
154+
154155
/**Returns the offset along the line for the marker placement. For Interval placements, this is the distance
155156
* between the start of the line and the first marker. For FirstVertex and LastVertex placements, this is the
156157
* distance between the marker and the start of the line or the end of the line respectively.
@@ -175,7 +176,7 @@ class QgsMarkerLineSymbolLayerV2 : QgsLineSymbolLayerV2
175176
* @see setPlacement
176177
*/
177178
void setOffsetAlongLine( double offsetAlongLine );
178-
179+
179180
/**Returns the unit used for calculating the offset along line for markers.
180181
* @returns Offset along line unit type.
181182
* @see setOffsetAlongLineUnit
@@ -189,7 +190,7 @@ class QgsMarkerLineSymbolLayerV2 : QgsLineSymbolLayerV2
189190
* @see setOffsetAlongLine
190191
*/
191192
void setOffsetAlongLineUnit( QgsSymbolV2::OutputUnit unit );
192-
193+
193194
/**Returns the map unit scale used for calculating the offset in map units along line for markers.
194195
* @returns Offset along line map unit scale.
195196
*/
@@ -198,24 +199,24 @@ class QgsMarkerLineSymbolLayerV2 : QgsLineSymbolLayerV2
198199
/**Sets the map unit scale used for calculating the offset in map units along line for markers.
199200
* @param scale Offset along line map unit scale.
200201
*/
201-
void setOffsetAlongLineMapUnitScale(const QgsMapUnitScale& scale);
202+
void setOffsetAlongLineMapUnitScale( const QgsMapUnitScale& scale );
202203

203-
QgsSymbolV2::OutputUnit intervalUnit() const;
204204
void setIntervalUnit( QgsSymbolV2::OutputUnit unit );
205-
206-
void setIntervalMapUnitScale( const QgsMapUnitScale& scale);
205+
QgsSymbolV2::OutputUnit intervalUnit() const;
206+
207+
void setIntervalMapUnitScale( const QgsMapUnitScale& scale );
207208
const QgsMapUnitScale& intervalMapUnitScale() const;
208209

209-
QgsSymbolV2::OutputUnit offsetUnit() const;
210210
void setOffsetUnit( QgsSymbolV2::OutputUnit unit );
211-
212-
void setOffsetMapUnitScale( const QgsMapUnitScale& scale);
211+
QgsSymbolV2::OutputUnit offsetUnit() const;
212+
213+
void setOffsetMapUnitScale( const QgsMapUnitScale& scale );
213214
const QgsMapUnitScale& offsetMapUnitScale() const;
214215

215216
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
216217
QgsSymbolV2::OutputUnit outputUnit() const;
217-
218-
void setMapUnitScale( const QgsMapUnitScale& scale);
218+
219+
void setMapUnitScale( const QgsMapUnitScale& scale );
219220
QgsMapUnitScale mapUnitScale() const;
220221

221222
protected:
@@ -225,5 +226,3 @@ class QgsMarkerLineSymbolLayerV2 : QgsLineSymbolLayerV2
225226
void renderPolylineCentral( const QPolygonF& points, QgsSymbolV2RenderContext& context );
226227
double markerAngle( const QPolygonF& points, bool isRing, int vertex );
227228
};
228-
229-

‎python/core/symbology-ng/qgsmarkersymbollayerv2.sip

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,20 @@ class QgsSimpleMarkerSymbolLayerV2 : QgsMarkerSymbolLayerV2
6161
double outlineWidth() const;
6262
void setOutlineWidth( double w );
6363

64-
QgsSymbolV2::OutputUnit outlineWidthUnit() const;
6564
void setOutlineWidthUnit( QgsSymbolV2::OutputUnit u );
66-
65+
QgsSymbolV2::OutputUnit outlineWidthUnit() const;
66+
6767
void setOutlineWidthMapUnitScale( const QgsMapUnitScale& scale);
6868
const QgsMapUnitScale& outlineWidthMapUnitScale() const;
6969

7070
bool writeDxf( QgsDxfExport& e, double mmMapUnitScaleFactor, const QString& layerName, const QgsSymbolV2RenderContext* context, const QgsFeature* f, const QPointF& shift = QPointF( 0.0, 0.0 ) ) const;
7171

72+
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
73+
QgsSymbolV2::OutputUnit outputUnit() const;
74+
75+
void setMapUnitScale( const QgsMapUnitScale& scale );
76+
QgsMapUnitScale mapUnitScale() const;
77+
7278
protected:
7379

7480
void drawMarker( QPainter* p, QgsSymbolV2RenderContext& context );
@@ -127,13 +133,16 @@ class QgsSvgMarkerSymbolLayerV2 : QgsMarkerSymbolLayerV2
127133

128134
void setOutlineWidthUnit( QgsSymbolV2::OutputUnit unit );
129135
QgsSymbolV2::OutputUnit outlineWidthUnit() const;
130-
136+
131137
void setOutlineWidthMapUnitScale( const QgsMapUnitScale& scale);
132138
const QgsMapUnitScale& outlineWidthMapUnitScale() const;
133139

134140
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
135141
QgsSymbolV2::OutputUnit outputUnit() const;
136142

143+
void setMapUnitScale( const QgsMapUnitScale& scale );
144+
QgsMapUnitScale mapUnitScale() const;
145+
137146
bool writeDxf( QgsDxfExport& e, double mmMapUnitScaleFactor, const QString& layerName, const QgsSymbolV2RenderContext* context, const QgsFeature* f, const QPointF& shift = QPointF( 0.0, 0.0 ) ) const;
138147
};
139148

@@ -179,5 +188,3 @@ class QgsFontMarkerSymbolLayerV2 : QgsMarkerSymbolLayerV2
179188
QChar character() const;
180189
void setCharacter( QChar ch );
181190
};
182-
183-

‎python/core/symbology-ng/qgssymbollayerv2.sip

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ class QgsSymbolLayerV2
110110

111111
virtual void setOutputUnit( QgsSymbolV2::OutputUnit unit );
112112
virtual QgsSymbolV2::OutputUnit outputUnit() const;
113-
114-
virtual void setMapUnitScale( const QgsMapUnitScale& mapUnitScale );
113+
114+
virtual void setMapUnitScale( const QgsMapUnitScale& scale );
115115
virtual QgsMapUnitScale mapUnitScale() const;
116116

117117
// used only with rending with symbol levels is turned on (0 = first pass, 1 = second, ...)
@@ -200,20 +200,20 @@ class QgsMarkerSymbolLayerV2 : QgsSymbolLayerV2
200200

201201
void setOffsetUnit( QgsSymbolV2::OutputUnit unit );
202202
QgsSymbolV2::OutputUnit offsetUnit() const;
203-
203+
204204
void setOffsetMapUnitScale( const QgsMapUnitScale& scale);
205205
const QgsMapUnitScale& offsetMapUnitScale() const;
206206

207207
void setSizeUnit( QgsSymbolV2::OutputUnit unit );
208208
QgsSymbolV2::OutputUnit sizeUnit() const;
209-
209+
210210
void setSizeMapUnitScale( const QgsMapUnitScale& scale);
211211
const QgsMapUnitScale& sizeMapUnitScale() const;
212212

213-
virtual void setOutputUnit( QgsSymbolV2::OutputUnit unit );
214-
virtual QgsSymbolV2::OutputUnit outputUnit() const;
215-
216-
void setMapUnitScale( const QgsMapUnitScale& scale);
213+
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
214+
QgsSymbolV2::OutputUnit outputUnit() const;
215+
216+
void setMapUnitScale( const QgsMapUnitScale& scale );
217217
QgsMapUnitScale mapUnitScale() const;
218218

219219
void setHorizontalAnchorPoint( HorizontalAnchorPoint h );
@@ -232,7 +232,7 @@ class QgsMarkerSymbolLayerV2 : QgsSymbolLayerV2
232232
void markerOffset( const QgsSymbolV2RenderContext& context, double width, double height,
233233
QgsSymbolV2::OutputUnit widthUnit, QgsSymbolV2::OutputUnit heightUnit,
234234
double& offsetX, double& offsetY,
235-
const QgsMapUnitScale& widthMapUnitScale, const QgsMapUnitScale& heightMapUnitScale ) const /PyName=markerOffset2/;
235+
const QgsMapUnitScale &widthMapUnitScale, const QgsMapUnitScale &heightMapUnitScale ) const /PyName=markerOffset2/;
236236

237237
static QPointF _rotatedOffset( const QPointF& offset, double angle );
238238
};
@@ -254,10 +254,16 @@ class QgsLineSymbolLayerV2 : QgsSymbolLayerV2
254254

255255
void setWidthUnit( QgsSymbolV2::OutputUnit unit );
256256
QgsSymbolV2::OutputUnit widthUnit() const;
257-
257+
258258
void setWidthMapUnitScale( const QgsMapUnitScale& scale);
259259
const QgsMapUnitScale& widthMapUnitScale() const;
260260

261+
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
262+
QgsSymbolV2::OutputUnit outputUnit() const;
263+
264+
void setMapUnitScale( const QgsMapUnitScale& scale );
265+
QgsMapUnitScale mapUnitScale() const;
266+
261267
void drawPreviewIcon( QgsSymbolV2RenderContext& context, QSize size );
262268

263269
virtual double dxfWidth( const QgsDxfExport& e, const QgsSymbolV2RenderContext& context ) const;
@@ -285,5 +291,3 @@ class QgsFillSymbolLayerV2 : QgsSymbolLayerV2
285291
/**Default method to render polygon*/
286292
void _renderPolygon( QPainter* p, const QPolygonF& points, const QList<QPolygonF>* rings, QgsSymbolV2RenderContext& context );
287293
};
288-
289-

‎python/core/symbology-ng/qgssymbollayerv2utils.sip

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ class QgsSymbolLayerV2Utils
4242
static QString encodePoint( QPointF point );
4343
static QPointF decodePoint( QString str );
4444

45+
static QString encodeMapUnitScale( const QgsMapUnitScale& mapUnitScale );
46+
static QgsMapUnitScale decodeMapUnitScale( const QString& str );
47+
4548
static QString encodeRealVector( const QVector<qreal>& v );
4649
static QVector<qreal> decodeRealVector( const QString& s );
4750

@@ -148,7 +151,7 @@ class QgsSymbolLayerV2Utils
148151
double offset = 0.0,
149152
const QVector<qreal>* dashPattern = 0 );
150153
/**Create ogr feature style string for brush
151-
@param fillColr fill color*/
154+
@param fillColr fill color*/
152155
static QString ogrFeatureStyleBrush( const QColor& fillColr );
153156

154157
static void createRotationElement( QDomDocument &doc, QDomElement &element, QString rotationFunc );
@@ -190,9 +193,9 @@ class QgsSymbolLayerV2Utils
190193
static QColor parseColor( QString colorStr );
191194

192195
/**Returns the line width scale factor depending on the unit and the paint device*/
193-
static double lineWidthScaleFactor( const QgsRenderContext& c, QgsSymbolV2::OutputUnit u, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() );
196+
static double lineWidthScaleFactor( const QgsRenderContext& c, QgsSymbolV2::OutputUnit u, const QgsMapUnitScale& scale = QgsMapUnitScale() );
194197
/**Returns scale factor painter units -> pixel dimensions*/
195-
static double pixelSizeScaleFactor( const QgsRenderContext& c, QgsSymbolV2::OutputUnit u, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() );
198+
static double pixelSizeScaleFactor( const QgsRenderContext& c, QgsSymbolV2::OutputUnit u, const QgsMapUnitScale& scale = QgsMapUnitScale() );
196199
/**Creates a render context for a pixel based device*/
197200
static QgsRenderContext createRenderContext( QPainter* p );
198201

@@ -248,5 +251,3 @@ class QgsSymbolLayerV2Utils
248251
*/
249252
static QString fieldOrExpressionFromExpression( QgsExpression* expression );
250253
};
251-
252-

‎python/core/symbology-ng/qgssymbolv2.sip

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class QgsSymbolV2
9292

9393
OutputUnit outputUnit() const;
9494
void setOutputUnit( OutputUnit u );
95-
95+
9696
QgsMapUnitScale mapUnitScale() const;
9797
void setMapUnitScale( const QgsMapUnitScale& scale );
9898

@@ -139,7 +139,7 @@ class QgsSymbolV2RenderContext
139139

140140
QgsSymbolV2::OutputUnit outputUnit() const;
141141
void setOutputUnit( QgsSymbolV2::OutputUnit u );
142-
142+
143143
QgsMapUnitScale mapUnitScale() const;
144144
void setMapUnitScale( const QgsMapUnitScale& scale);
145145

@@ -255,5 +255,3 @@ class QgsFillSymbolV2 : QgsSymbolV2
255255

256256
virtual QgsSymbolV2* clone() const /Factory/;
257257
};
258-
259-

‎python/core/symbology-ng/qgsvectorfieldsymbollayer.sip

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,13 @@ class QgsVectorFieldSymbolLayer : QgsMarkerSymbolLayerV2
6363

6464
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
6565
QgsSymbolV2::OutputUnit outputUnit() const;
66-
67-
void setMapUnitScale( const QgsMapUnitScale& scale);
66+
67+
void setMapUnitScale( const QgsMapUnitScale& scale );
6868
QgsMapUnitScale mapUnitScale() const;
6969

7070
void setDistanceUnit( QgsSymbolV2::OutputUnit unit );
7171
QgsSymbolV2::OutputUnit distanceUnit() const;
72-
72+
7373
void setDistanceMapUnitScale( const QgsMapUnitScale& scale);
7474
const QgsMapUnitScale& distanceMapUnitScale() const;
7575
};
76-
77-

‎python/gui/symbology-ng/qgssymbollayerv2widget.sip

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ class QgsSVGFillSymbolLayerWidget : QgsSymbolLayerV2Widget
270270

271271
protected:
272272
void insertIcons();
273-
274273
/**Enables or disables svg fill color, border color and border width based on whether the
275274
* svg file supports custom parameters.
276275
* @param resetValues set to true to overwrite existing layer fill color, border color and border width
@@ -357,5 +356,3 @@ class QgsCentroidFillSymbolLayerV2Widget : QgsSymbolLayerV2Widget
357356
virtual void setSymbolLayer( QgsSymbolLayerV2* layer );
358357
virtual QgsSymbolLayerV2* symbolLayer();
359358
};
360-
361-

‎python/gui/symbology-ng/qgssymbolslistwidget.sip

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,3 @@ class QgsSymbolsListWidget : QWidget
3131
void updateSymbolColor();
3232
void updateSymbolInfo();
3333
};
34-
35-

‎src/core/symbology-ng/qgsmarkersymbollayerv2.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ class CORE_EXPORT QgsSimpleMarkerSymbolLayerV2 : public QgsMarkerSymbolLayerV2
9898

9999
bool writeDxf( QgsDxfExport& e, double mmMapUnitScaleFactor, const QString& layerName, const QgsSymbolV2RenderContext* context, const QgsFeature* f, const QPointF& shift = QPointF( 0.0, 0.0 ) ) const;
100100

101-
102101
void setOutputUnit( QgsSymbolV2::OutputUnit unit );
103102
QgsSymbolV2::OutputUnit outputUnit() const;
104103

0 commit comments

Comments
 (0)
Please sign in to comment.