QGIS API Documentation 3.41.0-Master (3291e9ff48b)
|
The QgsScaleBarRendererRegistry manages registered scalebar renderers. More...
#include <qgsscalebarrendererregistry.h>
Public Member Functions | |
QgsScaleBarRendererRegistry () | |
You should not normally need to create your own scalebar renderer registry. | |
~QgsScaleBarRendererRegistry () | |
void | addRenderer (QgsScaleBarRenderer *renderer) |
Adds a new renderer to the registry. | |
void | removeRenderer (const QString &id) |
Removes the renderer with matching id from the registry. | |
QgsScaleBarRenderer * | renderer (const QString &id) const |
Creates a new scalebar renderer by id. | |
QStringList | renderers () const |
Returns a list of the renderer ids currently contained in the registry. | |
QStringList | sortedRendererList () const |
Returns a list of the renderer ids currently contained in the registry, sorted in an order respecting the renderer's sort keys and display strings. | |
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. | |
The QgsScaleBarRendererRegistry manages registered scalebar renderers.
A reference to the QgsScaleBarRendererRegistry can be obtained from QgsApplication::scalebarRendererRegistry().
Definition at line 33 of file qgsscalebarrendererregistry.h.
|
explicit |
You should not normally need to create your own scalebar renderer registry.
Use the one provided by QgsApplication::scalebarRendererRegistry()
instead.
Definition at line 26 of file qgsscalebarrendererregistry.cpp.
QgsScaleBarRendererRegistry::~QgsScaleBarRendererRegistry | ( | ) |
Definition at line 38 of file qgsscalebarrendererregistry.cpp.
void QgsScaleBarRendererRegistry::addRenderer | ( | QgsScaleBarRenderer * | renderer | ) |
Adds a new renderer to the registry.
Ownership is transferred to the registry.
Definition at line 71 of file qgsscalebarrendererregistry.cpp.
void QgsScaleBarRendererRegistry::removeRenderer | ( | const QString & | id | ) |
Removes the renderer with matching id from the registry.
Definition at line 79 of file qgsscalebarrendererregistry.cpp.
QgsScaleBarRenderer * QgsScaleBarRendererRegistry::renderer | ( | const QString & | id | ) | const |
Creates a new scalebar renderer by id.
If there is no such id registered, nullptr
will be returned instead.
The caller takes ownership of the returned object.
Definition at line 87 of file qgsscalebarrendererregistry.cpp.
QStringList QgsScaleBarRendererRegistry::renderers | ( | ) | const |
Returns a list of the renderer ids currently contained in the registry.
Definition at line 43 of file qgsscalebarrendererregistry.cpp.
QStringList QgsScaleBarRendererRegistry::sortedRendererList | ( | ) | const |
Returns a list of the renderer ids currently contained in the registry, sorted in an order respecting the renderer's sort keys and display strings.
Definition at line 48 of file qgsscalebarrendererregistry.cpp.
int QgsScaleBarRendererRegistry::sortKey | ( | const QString & | id | ) | const |
Returns the sorting key for the renderer with matching id.
Definition at line 103 of file qgsscalebarrendererregistry.cpp.
QString QgsScaleBarRendererRegistry::visibleName | ( | const QString & | id | ) | const |
Returns the translated, user-visible name for the renderer with matching id.
Definition at line 95 of file qgsscalebarrendererregistry.cpp.