Skip to content

Commit

Permalink
sync symbology-ng sips with headers (scripts/sipdiff)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed May 7, 2014
1 parent 4ecb178 commit 0a82f37
Show file tree
Hide file tree
Showing 12 changed files with 106 additions and 104 deletions.
3 changes: 0 additions & 3 deletions python/core/qgsmapunitscale.sip
Expand Up @@ -22,6 +22,3 @@ public:

double computeMapUnitsPerPixel(const QgsRenderContext& c) const;
};



12 changes: 5 additions & 7 deletions python/core/symbology-ng/qgsellipsesymbollayerv2.sip
Expand Up @@ -46,27 +46,25 @@ class QgsEllipseSymbolLayerV2 : QgsMarkerSymbolLayerV2

void setSymbolWidthUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit symbolWidthUnit() const;

void setSymbolWidthMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& symbolWidthMapUnitScale() const;

void setSymbolHeightUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit symbolHeightUnit() const;

void setSymbolHeightMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& symbolHeightMapUnitScale() const;

void setOutlineWidthUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outlineWidthUnit() const;

void setOutlineWidthMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& outlineWidthMapUnitScale() const;

void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale& scale);

void setMapUnitScale( const QgsMapUnitScale& scale );
QgsMapUnitScale mapUnitScale() const;
};


82 changes: 44 additions & 38 deletions python/core/symbology-ng/qgsfillsymbollayerv2.sip
Expand Up @@ -12,7 +12,7 @@ class QgsSimpleFillSymbolLayerV2 : QgsFillSymbolLayerV2
double borderWidth = DEFAULT_SIMPLEFILL_BORDERWIDTH,
Qt::PenJoinStyle penJoinStyle = DEFAULT_SIMPLEFILL_JOINSTYLE
);

// static stuff

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

double borderWidth() const;
void setBorderWidth( double borderWidth );

Qt::PenJoinStyle penJoinStyle() const;
void setPenJoinStyle( Qt::PenJoinStyle style );

Expand All @@ -70,20 +70,20 @@ class QgsSimpleFillSymbolLayerV2 : QgsFillSymbolLayerV2

void setBorderWidthUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit borderWidthUnit() const;

void setBorderWidthMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& borderWidthMapUnitScale() const;

void setOffsetUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit offsetUnit() const;

void setOffsetMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& offsetMapUnitScale() const;

void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale(const QgsMapUnitScale &scale);

void setMapUnitScale( const QgsMapUnitScale &scale );
QgsMapUnitScale mapUnitScale() const;

double estimateMaxBleed() const;
Expand Down Expand Up @@ -208,14 +208,14 @@ class QgsGradientFillSymbolLayerV2 : QgsFillSymbolLayerV2
/**Units for gradient fill offset*/
void setOffsetUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit offsetUnit() const;

void setOffsetMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& offsetMapUnitScale() const;
void setOutputUnit(QgsSymbolV2::OutputUnit unit);

void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;

void setMapUnitScale(const QgsMapUnitScale &scale);
void setMapUnitScale( const QgsMapUnitScale &scale );
QgsMapUnitScale mapUnitScale() const;

};
Expand All @@ -234,12 +234,9 @@ class QgsShapeburstFillSymbolLayerV2 : QgsFillSymbolLayerV2
ColorRamp
};

QgsShapeburstFillSymbolLayerV2( QColor color = DEFAULT_SIMPLEFILL_COLOR,
QColor color2 = Qt::white,
QgsShapeburstFillSymbolLayerV2( QColor color = DEFAULT_SIMPLEFILL_COLOR, QColor color2 = Qt::white,
ShapeburstColorType colorType = SimpleTwoColor,
int blurRadius = 0,
bool useWholeShape = true,
double maxDistance = 5 );
int blurRadius = 0, bool useWholeShape = true, double maxDistance = 5 );

virtual ~QgsShapeburstFillSymbolLayerV2();

Expand Down Expand Up @@ -324,6 +321,9 @@ class QgsShapeburstFillSymbolLayerV2 : QgsFillSymbolLayerV2
*/
QgsSymbolV2::OutputUnit distanceUnit() const;

void setDistanceMapUnitScale( const QgsMapUnitScale& scale );
const QgsMapUnitScale& distanceMapUnitScale() const;

/**Sets the color mode to use for the shapeburst fill. Shapeburst can either be drawn using a QgsVectorColorRampV2 color ramp
* or by simply specificing a start and end color. setColorType is used to specify which mode to use for the fill.
* @param colorType color type to use for shapeburst fill
Expand Down Expand Up @@ -374,7 +374,7 @@ class QgsShapeburstFillSymbolLayerV2 : QgsFillSymbolLayerV2
* @see colorType
*/
QColor color2() const;

/**Sets whether the shapeburst fill should ignore polygon rings when calculating
* the buffered shading.
* @param ignoreRings Set to true if buffers should ignore interior rings for polygons.
Expand All @@ -387,7 +387,7 @@ class QgsShapeburstFillSymbolLayerV2 : QgsFillSymbolLayerV2
* @note added in 2.3
* @see setIgnoreRings
*/
double ignoreRings() const;
double ignoreRings() const;

/**Sets the offset for the shapeburst fill.
* @param offset QPointF indicating the horizontal/vertical offset amount
Expand Down Expand Up @@ -418,10 +418,15 @@ class QgsShapeburstFillSymbolLayerV2 : QgsFillSymbolLayerV2
* @see setOffsetUnit
*/
QgsSymbolV2::OutputUnit offsetUnit() const;

void setOffsetMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& offsetMapUnitScale() const;

void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;

void setMapUnitScale( const QgsMapUnitScale &scale );
QgsMapUnitScale mapUnitScale() const;
};

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

void setOutlineWidthUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outlineWidthUnit() const;

void setOutlineWidthMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& outlineWidthMapUnitScale() const;
void setOutputUnit(QgsSymbolV2::OutputUnit unit);

void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;

void setMapUnitScale(const QgsMapUnitScale &scale);
void setMapUnitScale( const QgsMapUnitScale& scale );
QgsMapUnitScale mapUnitScale() const;

virtual double estimateMaxBleed() const;
Expand Down Expand Up @@ -502,19 +507,22 @@ class QgsSVGFillSymbolLayer: QgsImageFillSymbolLayer

void setPatternWidthUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit patternWidthUnit() const;

void setPatternWidthMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& patternWidthMapUnitScale() const;

void setSvgOutlineWidthUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit svgOutlineWidthUnit() const;

void setSvgOutlineWidthMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& svgOutlineWidthMapUnitScale() const;

void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;

void setMapUnitScale( const QgsMapUnitScale &scale );
QgsMapUnitScale mapUnitScale() const;

protected:
void applyDataDefinedSettings( const QgsSymbolV2RenderContext& context );
};
Expand Down Expand Up @@ -561,26 +569,26 @@ class QgsLinePatternFillSymbolLayer: QgsImageFillSymbolLayer

void setDistanceUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit distanceUnit() const;

void setDistanceMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& distanceMapUnitScale() const;

void setLineWidthUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit lineWidthUnit() const;

void setLineWidthMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& lineWidthMapUnitScale() const;

void setOffsetUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit offsetUnit() const;

void setOffsetMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& offsetMapUnitScale() const;

void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale& scale);

void setMapUnitScale( const QgsMapUnitScale& scale );
QgsMapUnitScale mapUnitScale() const;

bool setSubSymbol( QgsSymbolV2* symbol );
Expand Down Expand Up @@ -632,32 +640,32 @@ class QgsPointPatternFillSymbolLayer : QgsImageFillSymbolLayer

void setDistanceXUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit distanceXUnit() const;

void setDistanceXMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& distanceXMapUnitScale() const;

void setDistanceYUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit distanceYUnit() const;

void setDistanceYMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& distanceYMapUnitScale() const;

void setDisplacementXUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit displacementXUnit() const;

void setDisplacementXMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& displacementXMapUnitScale() const;

void setDisplacementYUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit displacementYUnit() const;

void setDisplacementYMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& displacementYMapUnitScale() const;

void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale(const QgsMapUnitScale &scale);

void setMapUnitScale( const QgsMapUnitScale &scale );
QgsMapUnitScale mapUnitScale() const;

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

void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;

void setMapUnitScale(const QgsMapUnitScale &scale);
QgsMapUnitScale mapUnitScale() const;

virtual QSet<QString> usedAttributes() const;
};


37 changes: 18 additions & 19 deletions python/core/symbology-ng/qgslinesymbollayerv2.sip
Expand Up @@ -34,8 +34,8 @@ class QgsSimpleLineSymbolLayerV2 : QgsLineSymbolLayerV2

void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale(const QgsMapUnitScale &scale);

void setMapUnitScale( const QgsMapUnitScale &scale );
QgsMapUnitScale mapUnitScale() const;

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

void setOffsetUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit offsetUnit() const;

void setOffsetMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& offsetMapUnitScale() const;

bool useCustomDashPattern() const;
void setUseCustomDashPattern( bool b );

QgsSymbolV2::OutputUnit customDashPatternUnit() const;
void setCustomDashPatternUnit( QgsSymbolV2::OutputUnit unit );

QgsSymbolV2::OutputUnit customDashPatternUnit() const;

const QgsMapUnitScale& customDashPatternMapUnitScale() const;
void setCustomDashPatternMapUnitScale( const QgsMapUnitScale& scale);

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

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

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

Placement placement() const;
void setPlacement( Placement p );

/**Returns the offset along the line for the marker placement. For Interval placements, this is the distance
* between the start of the line and the first marker. For FirstVertex and LastVertex placements, this is the
* distance between the marker and the start of the line or the end of the line respectively.
Expand All @@ -175,7 +176,7 @@ class QgsMarkerLineSymbolLayerV2 : QgsLineSymbolLayerV2
* @see setPlacement
*/
void setOffsetAlongLine( double offsetAlongLine );

/**Returns the unit used for calculating the offset along line for markers.
* @returns Offset along line unit type.
* @see setOffsetAlongLineUnit
Expand All @@ -189,7 +190,7 @@ class QgsMarkerLineSymbolLayerV2 : QgsLineSymbolLayerV2
* @see setOffsetAlongLine
*/
void setOffsetAlongLineUnit( QgsSymbolV2::OutputUnit unit );

/**Returns the map unit scale used for calculating the offset in map units along line for markers.
* @returns Offset along line map unit scale.
*/
Expand All @@ -198,24 +199,24 @@ class QgsMarkerLineSymbolLayerV2 : QgsLineSymbolLayerV2
/**Sets the map unit scale used for calculating the offset in map units along line for markers.
* @param scale Offset along line map unit scale.
*/
void setOffsetAlongLineMapUnitScale(const QgsMapUnitScale& scale);
void setOffsetAlongLineMapUnitScale( const QgsMapUnitScale& scale );

QgsSymbolV2::OutputUnit intervalUnit() const;
void setIntervalUnit( QgsSymbolV2::OutputUnit unit );

void setIntervalMapUnitScale( const QgsMapUnitScale& scale);
QgsSymbolV2::OutputUnit intervalUnit() const;

void setIntervalMapUnitScale( const QgsMapUnitScale& scale );
const QgsMapUnitScale& intervalMapUnitScale() const;

QgsSymbolV2::OutputUnit offsetUnit() const;
void setOffsetUnit( QgsSymbolV2::OutputUnit unit );

void setOffsetMapUnitScale( const QgsMapUnitScale& scale);
QgsSymbolV2::OutputUnit offsetUnit() const;

void setOffsetMapUnitScale( const QgsMapUnitScale& scale );
const QgsMapUnitScale& offsetMapUnitScale() const;

void setOutputUnit( QgsSymbolV2::OutputUnit unit );
QgsSymbolV2::OutputUnit outputUnit() const;
void setMapUnitScale( const QgsMapUnitScale& scale);

void setMapUnitScale( const QgsMapUnitScale& scale );
QgsMapUnitScale mapUnitScale() const;

protected:
Expand All @@ -225,5 +226,3 @@ class QgsMarkerLineSymbolLayerV2 : QgsLineSymbolLayerV2
void renderPolylineCentral( const QPolygonF& points, QgsSymbolV2RenderContext& context );
double markerAngle( const QPolygonF& points, bool isRing, int vertex );
};


0 comments on commit 0a82f37

Please sign in to comment.