QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
Convenience metadata class that uses static functions to handle advanced digitizing tool creation. More...
#include <qgsadvanceddigitizingtoolsregistry.h>
Public Member Functions | |
QgsAdvancedDigitizingToolMetadata (const QString &name, const QString &visibleName, const QIcon &icon=QIcon(), const QgsAdvancedDigitizingToolFunc &toolFunction=nullptr) | |
Constructor for QgsAdvancedDigitizingToolAbstractMetadata with the specified tool name. | |
QgsAdvancedDigitizingTool * | createTool (QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget) override |
Returns new tool of this type. Return nullptr on error. | |
void | setToolFunction (const QgsAdvancedDigitizingToolFunc &function) |
Sets the tool creation function. | |
QgsAdvancedDigitizingToolFunc | toolFunction () const |
Returns the tool creation function. | |
Public Member Functions inherited from QgsAdvancedDigitizingToolAbstractMetadata | |
QgsAdvancedDigitizingToolAbstractMetadata (const QString &name, const QString &visibleName, const QIcon &icon=QIcon()) | |
Constructor for QgsAdvancedDigitizingToolAbstractMetadata with the specified tool name. | |
virtual | ~QgsAdvancedDigitizingToolAbstractMetadata ()=default |
QIcon | icon () const |
Returns the tool's icon. | |
QString | name () const |
Returns the tool's unique name. | |
QString | visibleName () const |
Returns the tool's translatable user-friendly name. | |
Protected Attributes | |
QgsAdvancedDigitizingToolFunc | mToolFunc = nullptr |
Protected Attributes inherited from QgsAdvancedDigitizingToolAbstractMetadata | |
QIcon | mIcon |
QString | mName |
QString | mVisibleName |
Convenience metadata class that uses static functions to handle advanced digitizing tool creation.
Definition at line 81 of file qgsadvanceddigitizingtoolsregistry.h.
|
inline |
Constructor for QgsAdvancedDigitizingToolAbstractMetadata with the specified tool name.
visibleName should be set to a translated, user visible name identifying the corresponding annotation item.
An optional icon can be set, which will be used by the advanced digitizing dock widget.
A tool creation function can be declared through the toolFunction parameter.
Definition at line 94 of file qgsadvanceddigitizingtoolsregistry.h.
|
overridevirtual |
Returns new tool of this type. Return nullptr
on error.
Reimplemented from QgsAdvancedDigitizingToolAbstractMetadata.
Definition at line 25 of file qgsadvanceddigitizingtoolsregistry.cpp.
|
inline |
Sets the tool creation function.
Definition at line 104 of file qgsadvanceddigitizingtoolsregistry.h.
|
inline |
Returns the tool creation function.
Definition at line 101 of file qgsadvanceddigitizingtoolsregistry.h.
|
protected |
Definition at line 109 of file qgsadvanceddigitizingtoolsregistry.h.