|
QGIS API Documentation
3.0.2-Girona (307d082)
|
The QgsScaleBarSettings class stores the appearance and layout settings for scalebar drawing with QgsScaleBarRenderer. More...
#include <qgsscalebarsettings.h>
Public Types | |
| enum | Alignment { AlignLeft = 0, AlignMiddle, AlignRight } |
| Scalebar alignment. More... | |
| enum | SegmentSizeMode { SegmentSizeFixed = 0, SegmentSizeFitWidth = 1 } |
| Modes for setting size for scale bar segments. More... | |
Public Member Functions | |
| QgsScaleBarSettings () | |
| Constructor for QgsScaleBarSettings. More... | |
| Alignment | alignment () const |
| Returns the scalebar alignment. More... | |
| double | boxContentSpace () const |
| Returns the spacing (margin) between the scalebar box and content in millimeters. More... | |
| QBrush | brush () const |
| Returns the primary brush used for filling the scalebar. More... | |
| QBrush | brush2 () const |
| Returns the secondary brush for the scalebar. More... | |
| QColor | fillColor () const |
| Returns the color used for fills in the scalebar. More... | |
| QColor | fillColor2 () const |
| Returns the secondary color used for fills in the scalebar. More... | |
| QFont | font () const |
| Returns the font used for drawing text in the scalebar. More... | |
| QColor | fontColor () const |
| Returns the color used for drawing text in the scalebar. More... | |
| double | height () const |
| Returns the scalebar height (in millimeters). More... | |
| double | labelBarSpace () const |
| Returns the spacing (in millimeters) between labels and the scalebar. More... | |
| Qt::PenCapStyle | lineCapStyle () const |
| Returns the cap style used for drawing lines in the scalebar. More... | |
| QColor | lineColor () const |
| Returns the color used for lines in the scalebar. More... | |
| Qt::PenJoinStyle | lineJoinStyle () const |
| Returns the join style used for drawing lines in the scalebar. More... | |
| double | lineWidth () const |
| Returns the line width in millimeters for lines in the scalebar. More... | |
| double | mapUnitsPerScaleBarUnit () const |
| Returns the number of map units per scale bar unit used by the scalebar. More... | |
| double | maximumBarWidth () const |
| Returns the maximum width (in millimeters) for scale bar segments. More... | |
| double | minimumBarWidth () const |
| Returns the minimum width (in millimeters) for scale bar segments. More... | |
| int | numberOfSegments () const |
| Returns the number of segments included in the scalebar. More... | |
| int | numberOfSegmentsLeft () const |
| Returns the number of segments included in the left part of the scalebar. More... | |
| QPen | pen () const |
| Returns the pen used for drawing outlines in the scalebar. More... | |
| SegmentSizeMode | segmentSizeMode () const |
| Returns the size mode for the scale bar segments. More... | |
| void | setAlignment (Alignment alignment) |
| Sets the scalebar alignment. More... | |
| void | setBoxContentSpace (double space) |
| Sets the space (margin) between the scalebar box and content in millimeters. More... | |
| void | setBrush (const QBrush &brush) |
| Sets the primary brush used for filling the scalebar. More... | |
| void | setBrush2 (const QBrush &brush) |
| Sets the secondary brush used for filling the scalebar. More... | |
| void | setFillColor (const QColor &color) |
| Sets the color used for fills in the scalebar. More... | |
| void | setFillColor2 (const QColor &color) |
| Sets the secondary color used for fills in the scalebar. More... | |
| void | setFont (const QFont &font) |
| Sets the font used for drawing text in the scalebar. More... | |
| void | setFontColor (const QColor &color) |
| Sets the color used for drawing text in the scalebar. More... | |
| void | setHeight (double height) |
| Sets the scalebar height (in millimeters). More... | |
| void | setLabelBarSpace (double space) |
| Sets the spacing (in millimeters) between labels and the scalebar. More... | |
| void | setLineCapStyle (Qt::PenCapStyle style) |
| Sets the cap style used when drawing the lines in the scalebar. More... | |
| void | setLineColor (const QColor &color) |
| Sets the color used for lines in the scalebar. More... | |
| void | setLineJoinStyle (Qt::PenJoinStyle style) |
| Sets the join style used when drawing the lines in the scalebar. More... | |
| void | setLineWidth (double width) |
| Sets the line width in millimeters for lines in the scalebar. More... | |
| void | setMapUnitsPerScaleBarUnit (double units) |
| Sets the number of map units per scale bar unit used by the scalebar. More... | |
| void | setMaximumBarWidth (double width) |
| Sets the maximum width (in millimeters) for scale bar segments. More... | |
| void | setMinimumBarWidth (double width) |
| Sets the minimum width (in millimeters) for scale bar segments. More... | |
| void | setNumberOfSegments (int segments) |
| Sets the number of segments included in the scalebar. More... | |
| void | setNumberOfSegmentsLeft (int segments) |
| Sets the number of segments included in the left part of the scalebar. More... | |
| void | setPen (const QPen &pen) |
| Sets the pen used for drawing outlines in the scalebar. More... | |
| void | setSegmentSizeMode (SegmentSizeMode mode) |
| Sets the size mode for scale bar segments. More... | |
| void | setUnitLabel (const QString &label) |
| Sets the label for units. More... | |
| void | setUnits (QgsUnitTypes::DistanceUnit units) |
| Sets the distance units used by the scalebar. More... | |
| void | setUnitsPerSegment (double units) |
| Sets the number of scalebar units per segment. More... | |
| QString | unitLabel () const |
| Returns the label for units. More... | |
| QgsUnitTypes::DistanceUnit | units () const |
| Returns the distance units used by the scalebar. More... | |
| double | unitsPerSegment () const |
| Returns the number of scalebar units per segment. More... | |
The QgsScaleBarSettings class stores the appearance and layout settings for scalebar drawing with QgsScaleBarRenderer.
Definition at line 35 of file qgsscalebarsettings.h.
Scalebar alignment.
| Enumerator | |
|---|---|
| AlignLeft | Left aligned. |
| AlignMiddle | Center aligned. |
| AlignRight | Right aligned. |
Definition at line 42 of file qgsscalebarsettings.h.
Modes for setting size for scale bar segments.
| Enumerator | |
|---|---|
| SegmentSizeFixed | Scale bar segment size is fixed to a map unit. |
| SegmentSizeFitWidth | Scale bar segment size is calculated to fit a size range. |
Definition at line 52 of file qgsscalebarsettings.h.
|
inline |
Constructor for QgsScaleBarSettings.
Definition at line 61 of file qgsscalebarsettings.h.
|
inline |
Returns the scalebar alignment.
Definition at line 369 of file qgsscalebarsettings.h.
|
inline |
Returns the spacing (margin) between the scalebar box and content in millimeters.
Definition at line 357 of file qgsscalebarsettings.h.
|
inline |
Returns the primary brush used for filling the scalebar.
Definition at line 307 of file qgsscalebarsettings.h.
|
inline |
Returns the secondary brush for the scalebar.
This is used for alternating color style scalebars, such as single and double box styles.
Definition at line 321 of file qgsscalebarsettings.h.
|
inline |
Returns the color used for fills in the scalebar.
Definition at line 241 of file qgsscalebarsettings.h.
|
inline |
Returns the secondary color used for fills in the scalebar.
Definition at line 255 of file qgsscalebarsettings.h.
|
inline |
Returns the font used for drawing text in the scalebar.
Definition at line 214 of file qgsscalebarsettings.h.
|
inline |
Returns the color used for drawing text in the scalebar.
Definition at line 227 of file qgsscalebarsettings.h.
|
inline |
Returns the scalebar height (in millimeters).
Definition at line 333 of file qgsscalebarsettings.h.
|
inline |
Returns the spacing (in millimeters) between labels and the scalebar.
Definition at line 345 of file qgsscalebarsettings.h.
|
inline |
Returns the cap style used for drawing lines in the scalebar.
Definition at line 393 of file qgsscalebarsettings.h.
|
inline |
Returns the color used for lines in the scalebar.
Definition at line 268 of file qgsscalebarsettings.h.
|
inline |
Returns the join style used for drawing lines in the scalebar.
Definition at line 381 of file qgsscalebarsettings.h.
|
inline |
Returns the line width in millimeters for lines in the scalebar.
Definition at line 280 of file qgsscalebarsettings.h.
|
inline |
Returns the number of map units per scale bar unit used by the scalebar.
Definition at line 190 of file qgsscalebarsettings.h.
|
inline |
Returns the maximum width (in millimeters) for scale bar segments.
This property is only effective if the segmentSizeMode() is set to SegmentSizeFitWidth.
Definition at line 162 of file qgsscalebarsettings.h.
|
inline |
Returns the minimum width (in millimeters) for scale bar segments.
This property is only effective if the segmentSizeMode() is set to SegmentSizeFitWidth.
Definition at line 142 of file qgsscalebarsettings.h.
|
inline |
Returns the number of segments included in the scalebar.
Definition at line 83 of file qgsscalebarsettings.h.
|
inline |
Returns the number of segments included in the left part of the scalebar.
Definition at line 97 of file qgsscalebarsettings.h.
|
inline |
Returns the pen used for drawing outlines in the scalebar.
Definition at line 293 of file qgsscalebarsettings.h.
|
inline |
Returns the size mode for the scale bar segments.
Definition at line 124 of file qgsscalebarsettings.h.
|
inline |
Sets the scalebar alignment.
Definition at line 375 of file qgsscalebarsettings.h.
|
inline |
Sets the space (margin) between the scalebar box and content in millimeters.
Definition at line 363 of file qgsscalebarsettings.h.
|
inline |
Sets the primary brush used for filling the scalebar.
Definition at line 313 of file qgsscalebarsettings.h.
|
inline |
Sets the secondary brush used for filling the scalebar.
Definition at line 327 of file qgsscalebarsettings.h.
|
inline |
Sets the color used for fills in the scalebar.
Definition at line 248 of file qgsscalebarsettings.h.
|
inline |
Sets the secondary color used for fills in the scalebar.
Definition at line 262 of file qgsscalebarsettings.h.
|
inline |
Sets the font used for drawing text in the scalebar.
Definition at line 220 of file qgsscalebarsettings.h.
|
inline |
Sets the color used for drawing text in the scalebar.
Definition at line 234 of file qgsscalebarsettings.h.
|
inline |
Sets the scalebar height (in millimeters).
Definition at line 339 of file qgsscalebarsettings.h.
|
inline |
Sets the spacing (in millimeters) between labels and the scalebar.
Definition at line 351 of file qgsscalebarsettings.h.
|
inline |
Sets the cap style used when drawing the lines in the scalebar.
Definition at line 399 of file qgsscalebarsettings.h.
|
inline |
Sets the color used for lines in the scalebar.
Definition at line 274 of file qgsscalebarsettings.h.
|
inline |
Sets the join style used when drawing the lines in the scalebar.
Definition at line 387 of file qgsscalebarsettings.h.
|
inline |
Sets the line width in millimeters for lines in the scalebar.
Definition at line 286 of file qgsscalebarsettings.h.
|
inline |
Sets the number of map units per scale bar unit used by the scalebar.
Definition at line 196 of file qgsscalebarsettings.h.
|
inline |
Sets the maximum width (in millimeters) for scale bar segments.
This property is only effective if the segmentSizeMode() is set to SegmentSizeFitWidth.
Definition at line 172 of file qgsscalebarsettings.h.
|
inline |
Sets the minimum width (in millimeters) for scale bar segments.
This property is only effective if the segmentSizeMode() is set to SegmentSizeFitWidth.
Definition at line 152 of file qgsscalebarsettings.h.
|
inline |
Sets the number of segments included in the scalebar.
Definition at line 90 of file qgsscalebarsettings.h.
|
inline |
Sets the number of segments included in the left part of the scalebar.
Definition at line 104 of file qgsscalebarsettings.h.
|
inline |
Sets the pen used for drawing outlines in the scalebar.
Definition at line 299 of file qgsscalebarsettings.h.
|
inline |
Sets the size mode for scale bar segments.
Definition at line 132 of file qgsscalebarsettings.h.
|
inline |
|
inline |
Sets the distance units used by the scalebar.
Definition at line 184 of file qgsscalebarsettings.h.
|
inline |
Sets the number of scalebar units per segment.
Definition at line 116 of file qgsscalebarsettings.h.
|
inline |
Returns the label for units.
Definition at line 202 of file qgsscalebarsettings.h.
|
inline |
Returns the distance units used by the scalebar.
Definition at line 178 of file qgsscalebarsettings.h.
|
inline |
Returns the number of scalebar units per segment.
Definition at line 110 of file qgsscalebarsettings.h.
1.8.13