Skip to content
Permalink
Browse files

Add missing docs

  • Loading branch information
nyalldawson committed Jul 17, 2016
1 parent 0324de3 commit 503d0941eecc29804dcb882cc84634ae213daa94
@@ -453,7 +453,6 @@ and for forcing certain items to always sort on top.</li>
<li>The OutputUnit enum, including QgsSymbolV2::MM, QgsSymbolV2::MapUnit, QgsSymbolV2::Mixed, QgsSymbolV2::Pixel and QgsSymbolV2::Percentage has been moved to QgsUnitTypes
and renamed to RenderUnit. QgsSymbolV2::OutputUnitList was renamed to QgsUnitTypes::RenderUnitList. All methods which previously accepted QgsSymbolV2::OutputUnit
parameters or QgsSymbolV2::OutputUnitList parameters now take QgsUnitTypes::RenderUnit or QgsUnitTypes::RenderUnitList parameters respectively.</li>
<li>subsetString() was made const. This has no effect on PyQGIS code, but c++ code implementing derived layer classes will need to update the signature of this method to match.</li>
</ul>

\subsection qgis_api_break_3_0_QgsSymbolLayerV2Utils QgsSymbolLayerV2Utils
@@ -327,6 +327,7 @@ class QgsDxfExport
//! @note added in 2.15
void writeMText( const QString &layer, const QString &text, const QgsPointV2 &pt, double width, double angle, const QColor& color );

//! Calculates a scaling factor to convert from map units to a specified symbol unit.
static double mapUnitScaleFactor( double scaleDenominator, QgsUnitTypes::RenderUnit symbolUnits, QgsUnitTypes::DistanceUnit mapUnits );

//! Return cleaned layer name for use in DXF
@@ -8,13 +8,24 @@ class QgsXmlUtils
%End
public:

/* reading */

/** Decodes a distance unit from a DOM element.
* @param element DOM element to decode
* @returns distance units
* @see writeMapUnits()
*/
static QgsUnitTypes::DistanceUnit readMapUnits( const QDomElement& element );

static QgsRectangle readRectangle( const QDomElement& element );

/* writing */

/** Encodes a distance unit to a DOM element.
* @param units units to encode
* @param doc DOM document
* @returns element containing encoded units
* @see readMapUnits()
*/
static QDomElement writeMapUnits( QgsUnitTypes::DistanceUnit units, QDomDocument& doc );

static QDomElement writeRectangle( const QgsRectangle& rect, QDomDocument& doc );
};
@@ -57,13 +57,29 @@ class QgsEllipseSymbolLayerV2 : QgsMarkerSymbolLayerV2
void setSymbolWidthMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& symbolWidthMapUnitScale() const;

/** Sets the units for the symbol's height.
* @param unit symbol units
* @see symbolHeightUnit()
*/
void setSymbolHeightUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for the symbol's height.
* @see setSymbolHeightUnit()
*/
QgsUnitTypes::RenderUnit symbolHeightUnit() const;

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

/** Sets the units for the symbol's outline width.
* @param unit symbol units
* @see outlineWidthUnit()
*/
void setOutlineWidthUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for the symbol's outline width.
* @see setOutlineWidthUnit()
*/
QgsUnitTypes::RenderUnit outlineWidthUnit() const;

void setOutlineWidthMapUnitScale( const QgsMapUnitScale& scale);
@@ -68,13 +68,29 @@ class QgsSimpleFillSymbolLayerV2 : QgsFillSymbolLayerV2
void setOffset( QPointF offset );
QPointF offset();

/** Sets the units for the width of the fill's border.
* @param unit width units
* @see borderWidthUnit()
*/
void setBorderWidthUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for the width of the fill's border.
* @see setBorderWidthUnit()
*/
QgsUnitTypes::RenderUnit borderWidthUnit() const;

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

/** Sets the units for the fill's offset.
* @param unit offset units
* @see offsetUnit()
*/
void setOffsetUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for the fill's offset.
* @see setOffsetUnit()
*/
QgsUnitTypes::RenderUnit offsetUnit() const;

void setOffsetMapUnitScale( const QgsMapUnitScale& scale);
@@ -440,7 +456,15 @@ class QgsImageFillSymbolLayer: QgsFillSymbolLayerV2
virtual QgsSymbolV2* subSymbol();
virtual bool setSubSymbol( QgsSymbolV2* symbol /Transfer/ );

/** Sets the units for the symbol's outline width.
* @param unit symbol units
* @see outlineWidthUnit()
*/
void setOutlineWidthUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for the symbol's outline width.
* @see setOutlineWidthUnit()
*/
QgsUnitTypes::RenderUnit outlineWidthUnit() const;

void setOutlineWidthMapUnitScale( const QgsMapUnitScale& scale);
@@ -676,13 +700,29 @@ class QgsSVGFillSymbolLayer: QgsImageFillSymbolLayer
void setSvgOutlineWidth( double w );
double svgOutlineWidth() const;

/** Sets the units for the width of the SVG images in the pattern.
* @param unit width units
* @see patternWidthUnit()
*/
void setPatternWidthUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for the width of the SVG images in the pattern.
* @see setPatternWidthUnit()
*/
QgsUnitTypes::RenderUnit patternWidthUnit() const;

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

/** Sets the units for the outline width.
* @param unit width units
* @see svgOutlineWidthUnit()
*/
void setSvgOutlineWidthUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for the outline width.
* @see setSvgOutlineWidthUnit()
*/
QgsUnitTypes::RenderUnit svgOutlineWidthUnit() const;

void setSvgOutlineWidthMapUnitScale( const QgsMapUnitScale& scale);
@@ -729,7 +769,18 @@ class QgsLinePatternFillSymbolLayer: QgsImageFillSymbolLayer
//getters and setters
void setLineAngle( double a );
double lineAngle() const;

/** Sets the distance between lines in the fill pattern.
* @param d distance. Units are specified by setDistanceUnit()
* @see distance()
* @see setDistanceUnit()
*/
void setDistance( double d );

/** Returns the distance between lines in the fill pattern. Units are retrieved by distanceUnit().
* @see setDistance()
* @see distanceUnit()
*/
double distance() const;
void setLineWidth( double w );
double lineWidth() const;
@@ -738,19 +789,45 @@ class QgsLinePatternFillSymbolLayer: QgsImageFillSymbolLayer
void setOffset( double offset );
double offset() const;

/** Sets the units for the distance between lines in the fill pattern.
* @param unit distance units
* @see distanceUnit()
* @see setDistance()
*/
void setDistanceUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for the distance between lines in the fill pattern.
* @see setDistanceUnit()
* @see distance()
*/
QgsUnitTypes::RenderUnit distanceUnit() const;

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

/** Sets the units for the line's width.
* @param unit width units
* @see lineWidthUnit()
*/
void setLineWidthUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for the line's width.
* @see setLineWidthUnit()
*/
QgsUnitTypes::RenderUnit lineWidthUnit() const;

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

/** Sets the units for the line pattern's offset.
* @param unit offset units
* @see offsetUnit()
*/
void setOffsetUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for the line pattern's offset.
* @see setOffsetUnit()
*/
QgsUnitTypes::RenderUnit offsetUnit() const;

void setOffsetMapUnitScale( const QgsMapUnitScale& scale);
@@ -811,13 +888,33 @@ class QgsPointPatternFillSymbolLayer : QgsImageFillSymbolLayer
bool setSubSymbol( QgsSymbolV2* symbol /Transfer/ );
virtual QgsSymbolV2* subSymbol();

/** Sets the units for the horizontal distance between points in the pattern.
* @param unit distance units
* @see distanceXUnit()
* @see setDistanceYUnit()
*/
void setDistanceXUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for the horizontal distance between points in the pattern.
* @see setDistanceXUnit()
* @see distanceYUnit()
*/
QgsUnitTypes::RenderUnit distanceXUnit() const;

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

/** Sets the units for the vertical distance between points in the pattern.
* @param unit distance units
* @see distanceYUnit()
* @see setDistanceXUnit()
*/
void setDistanceYUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for the vertical distance between points in the pattern.
* @see setDistanceYUnit()
* @see distanceXUnit()
*/
QgsUnitTypes::RenderUnit distanceYUnit() const;

void setDistanceYMapUnitScale( const QgsMapUnitScale& scale);
@@ -57,7 +57,15 @@ class QgsSimpleLineSymbolLayerV2 : QgsLineSymbolLayerV2
bool useCustomDashPattern() const;
void setUseCustomDashPattern( bool b );

/** Sets the units for lengths used in the custom dash pattern.
* @param unit length units
* @see customDashPatternUnit()
*/
void setCustomDashPatternUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for lengths used in the custom dash pattern.
* @see setCustomDashPatternUnit()
*/
QgsUnitTypes::RenderUnit customDashPatternUnit() const;

const QgsMapUnitScale& customDashPatternMapUnitScale() const;
@@ -170,12 +178,17 @@ class QgsMarkerLineSymbolLayerV2 : QgsLineSymbolLayerV2
void setRotateMarker( bool rotate );

/**
* The interval between individual markers.
* Returns the interval between individual markers. Units are specified through intervalUnits().
* @see setInterval()
* @see intervalUnit()
*/
double interval() const;

/**
* The interval between individual markers.
* Sets the interval between individual markers.
* @param interval interval size. Units are specified through setIntervalUnits()
* @see interval()
* @see setIntervalUnits()
*/
void setInterval( double interval );

@@ -238,7 +251,17 @@ class QgsMarkerLineSymbolLayerV2 : QgsLineSymbolLayerV2
*/
void setOffsetAlongLineMapUnitScale( const QgsMapUnitScale& scale );

/** Sets the units for the interval between markers.
* @param unit interval units
* @see intervalUnit()
* @see setInterval()
*/
void setIntervalUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for the interval between markers.
* @see setIntervalUnit()
* @see interval()
*/
QgsUnitTypes::RenderUnit intervalUnit() const;

void setIntervalMapUnitScale( const QgsMapUnitScale& scale );
@@ -448,7 +448,15 @@ class QgsSvgMarkerSymbolLayerV2 : QgsMarkerSymbolLayerV2
double outlineWidth() const;
void setOutlineWidth( double w );

/** Sets the units for the outline width.
* @param unit width units
* @see outlineWidthUnit()
*/
void setOutlineWidthUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for the outline width.
* @see outlineWidthUnit()
*/
QgsUnitTypes::RenderUnit outlineWidthUnit() const;

void setOutlineWidthMapUnitScale( const QgsMapUnitScale& scale);
@@ -142,7 +142,22 @@ class QgsSymbolLayerV2
be affected by data defined symbology rules.*/
virtual double estimateMaxBleed() const;

/** Sets the units to use for sizes and widths within the symbol layer. Individual
* symbol layer subclasses will interpret this in different ways, eg a marker symbol
* layer may use it to specify the units for the marker size, while a line symbol
* layer may use it to specify the units for the line width.
* @param unit output units
* @see outputUnit()
*/
virtual void setOutputUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units to use for sizes and widths within the symbol layer. Individual
* symbol layer subclasses will interpret this in different ways, eg a marker symbol
* layer may use it to specify the units for the marker size, while a line symbol
* layer may use it to specify the units for the line width.
* @returns output unit, or UnknownRenderUnit if the symbol layer contains mixed units
* @see setOutputUnit()
*/
virtual QgsUnitTypes::RenderUnit outputUnit() const;

virtual void setMapUnitScale( const QgsMapUnitScale& scale );
@@ -608,13 +623,29 @@ class QgsLineSymbolLayerV2 : QgsSymbolLayerV2
double offset() const;
void setOffset( double offset );

/** Sets the units for the line's width.
* @param unit width units
* @see widthUnit()
*/
void setWidthUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for the line's width.
* @see setWidthUnit()
*/
QgsUnitTypes::RenderUnit widthUnit() const;

void setWidthMapUnitScale( const QgsMapUnitScale& scale);
const QgsMapUnitScale& widthMapUnitScale() const;

/** Sets the units for the line's offset.
* @param unit offset units
* @see offsetUnit()
*/
void setOffsetUnit( QgsUnitTypes::RenderUnit unit );

/** Returns the units for the line's offset.
* @see setOffsetUnit()
*/
QgsUnitTypes::RenderUnit offsetUnit() const;

void setOffsetMapUnitScale( const QgsMapUnitScale& scale );

0 comments on commit 503d094

Please sign in to comment.
You can’t perform that action at this time.