17#ifndef QGSSCALEBARRENDERER_H
18#define QGSSCALEBARRENDERER_H
47 FlagUsesLineSymbol = 1 << 0,
48 FlagUsesFillSymbol = 1 << 1,
49 FlagUsesAlternateFillSymbol = 1 << 2,
50 FlagRespectsUnits = 1 << 3,
51 FlagRespectsMapUnitsPerScaleBarUnit = 1 << 4,
52 FlagUsesUnitLabel = 1 << 5,
53 FlagUsesSegments = 1 << 6,
54 FlagUsesLabelBarSpace = 1 << 7,
55 FlagUsesLabelVerticalPlacement = 1 << 8,
56 FlagUsesLabelHorizontalPlacement = 1 << 8,
57 FlagUsesAlignment = 1 << 9,
58 FlagUsesSubdivisions = 1 << 10,
59 FlagUsesDivisionSymbol = 1 << 11,
60 FlagUsesSubdivisionSymbol = 1 << 12,
61 FlagUsesSubdivisionsHeight = 1 << 13,
76 double segmentWidth { 0.0 };
109 virtual QString
id()
const = 0;
122 virtual Flags flags()
const;
129 virtual int sortKey()
const;
Contains information about the context of a rendering operation.
Abstract base class for scale bar renderers.
virtual void draw(QgsRenderContext &context, const QgsScaleBarSettings &settings, const QgsScaleBarRenderer::ScaleBarContext &scaleContext) const =0
Draws the scalebar using the specified settings and scaleContext to a destination render context.
Q_DECL_DEPRECATED QString name() const
Returns the unique name for this style.
virtual ~QgsScaleBarRenderer()=default
virtual QString visibleName() const =0
Returns the user friendly, translated name for the renderer.
QgsScaleBarRenderer()=default
Constructor for QgsScaleBarRenderer.
virtual QgsScaleBarRenderer * clone() const =0
Returns a clone of the renderer.
Flag
Flags which control scalebar renderer behavior.
virtual QString id() const =0
Returns the unique ID for this renderer.
The QgsScaleBarSettings class stores the appearance and layout settings for scalebar drawing with Qgs...
#define SIP_ENUM_BASETYPE(type)
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)
Contains parameters regarding scalebar calculations.
Flags flags
Scalebar renderer flags.
QSizeF size
Destination size for scalebar.