17 #ifndef QGSSCALEBARRENDERER_H
18 #define QGSSCALEBARRENDERER_H
20 #include "qgis_core.h"
48 FlagUsesLineSymbol = 1 << 0,
49 FlagUsesFillSymbol = 1 << 1,
50 FlagUsesAlternateFillSymbol = 1 << 2,
51 FlagRespectsUnits = 1 << 3,
52 FlagRespectsMapUnitsPerScaleBarUnit = 1 << 4,
53 FlagUsesUnitLabel = 1 << 5,
54 FlagUsesSegments = 1 << 6,
55 FlagUsesLabelBarSpace = 1 << 7,
56 FlagUsesLabelVerticalPlacement = 1 << 8,
57 FlagUsesLabelHorizontalPlacement = 1 << 8,
58 FlagUsesAlignment = 1 << 9,
59 FlagUsesSubdivisions = 1 << 10,
60 FlagUsesDivisionSymbol = 1 << 11,
61 FlagUsesSubdivisionSymbol = 1 << 12,
62 FlagUsesSubdivisionsHeight = 1 << 13,
64 Q_DECLARE_FLAGS( Flags, Flag )
77 double segmentWidth { 0.0 };
110 virtual QString
id()
const = 0;
123 virtual Flags flags()
const;
130 virtual int sortKey()
const;
Contains information about the context of a rendering operation.
Abstract base class for scale bar renderers.
Flag
Flags which control scalebar renderer behavior.
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 QgsScaleBarRenderer * clone() const =0
Returns a clone of the renderer.
virtual QString visibleName() const =0
Returns the user friendly, translated name for the renderer.
QgsScaleBarRenderer()=default
Constructor for QgsScaleBarRenderer.
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...
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsField::ConfigurationFlags) CORE_EXPORT QDataStream &operator<<(QDataStream &out
Writes the field to stream out. QGIS version compatibility is not guaranteed.
Contains parameters regarding scalebar calculations.
Flags flags
Scalebar renderer flags.
QSizeF size
Destination size for scalebar.