40  qDeleteAll( mRenderers );
 
 
   45  return mRenderers.keys();
 
 
   50  QStringList ids = mRenderers.keys();
 
   52  std::sort( ids.begin(), ids.end(), [
this]( 
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();
 
 
Double box with alternating colors.
 
Scalebar style that draws a single box with alternating color for the segments, with horizontal lines...
 
A scale bar style that draws text in the form of '1:XXXXX'.
 
void addRenderer(QgsScaleBarRenderer *renderer)
Adds a new renderer to the registry.
 
QStringList sortedRendererList() const
Returns a list of the renderer ids currently contained in the registry, sorted in an order respecting...
 
QStringList renderers() const
Returns a list of the renderer ids currently contained in the registry.
 
int sortKey(const QString &id) const
Returns the sorting key for the renderer with matching id.
 
QString visibleName(const QString &id) const
Returns the translated, user-visible name for the renderer with matching id.
 
QgsScaleBarRendererRegistry()
You should not normally need to create your own scalebar renderer registry.
 
QgsScaleBarRenderer * renderer(const QString &id) const
Creates a new scalebar renderer by id.
 
void removeRenderer(const QString &id)
Removes the renderer with matching id from the registry.
 
~QgsScaleBarRendererRegistry()
 
Abstract base class for scale bar renderers.
 
virtual QString id() const =0
Returns the unique ID for this renderer.
 
Scalebar style that draws a single box with alternating color for the segments.
 
Scalebar style that draws a stepped line representation of a scalebar.
 
A scale bar that draws segments using short ticks.
 
@ TicksUp
Render ticks above line.
 
@ TicksMiddle
Render ticks crossing line.
 
@ TicksDown
Render ticks below line.