QGIS API Documentation
3.0.2-Girona (307d082)
|
Scalebar style that draws a single box with alternating color for the segments. More...
#include <qgssingleboxscalebarrenderer.h>
Public Member Functions | |
QgsSingleBoxScaleBarRenderer ()=default | |
Constructor for QgsSingleBoxScaleBarRenderer. More... | |
void | draw (QgsRenderContext &context, const QgsScaleBarSettings &settings, const QgsScaleBarRenderer::ScaleBarContext &scaleContext) const override |
Draws the scalebar using the specified settings and scaleContext to a destination render context. More... | |
QString | name () const override |
Returns the unique name for this style. More... | |
Public Member Functions inherited from QgsScaleBarRenderer | |
QgsScaleBarRenderer ()=default | |
Constructor for QgsScaleBarRenderer. More... | |
virtual | ~QgsScaleBarRenderer ()=default |
virtual QSizeF | calculateBoxSize (const QgsScaleBarSettings &settings, const QgsScaleBarRenderer::ScaleBarContext &scaleContext) const |
Calculates the required box size (in millimeters) for a scalebar using the specified settings and scaleContext. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from QgsScaleBarRenderer | |
void | drawDefaultLabels (QgsRenderContext &context, const QgsScaleBarSettings &settings, const QgsScaleBarRenderer::ScaleBarContext &scaleContext) const |
Draws default scalebar labels using the specified settings and scaleContext to a destination render context. More... | |
QString | firstLabelString (const QgsScaleBarSettings &settings) const |
Returns the text used for the first label in the scalebar. More... | |
double | firstLabelXOffset (const QgsScaleBarSettings &settings) const |
Returns the x-offset (in millimeters) used for the first label in the scalebar. More... | |
QList< double > | segmentPositions (const QgsScaleBarRenderer::ScaleBarContext &scaleContext, const QgsScaleBarSettings &settings) const |
Returns a list of positions for each segment within the scalebar. More... | |
QList< double > | segmentWidths (const QgsScaleBarRenderer::ScaleBarContext &scaleContext, const QgsScaleBarSettings &settings) const |
Returns a list of widths of each segment of the scalebar. More... | |
Scalebar style that draws a single box with alternating color for the segments.
Definition at line 31 of file qgssingleboxscalebarrenderer.h.
|
default |
Constructor for QgsSingleBoxScaleBarRenderer.
|
overridevirtual |
Draws the scalebar using the specified settings and scaleContext to a destination render context.
Implements QgsScaleBarRenderer.
Definition at line 23 of file qgssingleboxscalebarrenderer.cpp.
|
inlineoverridevirtual |
Returns the unique name for this style.
Implements QgsScaleBarRenderer.
Definition at line 40 of file qgssingleboxscalebarrenderer.h.