QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
40 qDeleteAll( mRenderers );
45 return mRenderers.keys();
50 QStringList ids = mRenderers.keys();
52 std::sort( ids.begin(), ids.end(), [ = ](
const QString & a,
const QString & b )->bool
54 if ( sortKey( a ) < sortKey( b ) )
56 else if ( sortKey( a ) > sortKey( b ) )
60 const int res = QString::localeAwareCompare( visibleName( a ), visibleName( b ) );
89 if ( mRenderers.contains(
id ) )
90 return mRenderers.value(
id )->clone();
97 if ( mRenderers.contains(
id ) )
98 return mRenderers.value(
id )->visibleName();
105 if ( mRenderers.contains(
id ) )
106 return mRenderers.value(
id )->sortKey();
int sortKey(const QString &id) const
Returns the sorting key for the renderer with matching id.
virtual QString id() const =0
Returns the unique ID for this renderer.
@ TicksUp
Render ticks above line.
QStringList renderers() const
Returns a list of the renderer ids currently contained in the registry.
QString visibleName(const QString &id) const
Returns the translated, user-visible name for the renderer with matching id.
@ TicksMiddle
Render ticks crossing line.
@ TicksDown
Render ticks below line.
Scalebar style that draws a single box with alternating color for the segments.
void removeRenderer(const QString &id)
Removes the renderer with matching id from the registry.
void addRenderer(QgsScaleBarRenderer *renderer)
Adds a new renderer to the registry.
Double box with alternating colors.
QgsScaleBarRendererRegistry()
You should not normally need to create your own scalebar renderer registry.
Abstract base class for scale bar renderers.
QStringList sortedRendererList() const
Returns a list of the renderer ids currently contained in the registry, sorted in an order respecting...
QgsScaleBarRenderer * renderer(const QString &id) const
Creates a new scalebar renderer by id.
A scale bar that draws segments using short ticks.
Scalebar style that draws a stepped line representation of a scalebar.
A scale bar style that draws text in the form of '1:XXXXX'.
Scalebar style that draws a single box with alternating color for the segments, with horizontal lines...
~QgsScaleBarRendererRegistry()