QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
QgsAdvancedDigitizingToolMetadata Class Reference

Convenience metadata class that uses static functions to handle advanced digitizing tool creation. More...

#include <qgsadvanceddigitizingtoolsregistry.h>

Inheritance diagram for QgsAdvancedDigitizingToolMetadata:
Inheritance graph
[legend]

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.
 
QgsAdvancedDigitizingToolcreateTool (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.
 

Protected Attributes

QgsAdvancedDigitizingToolFunc mToolFunc = nullptr
 

Detailed Description

Convenience metadata class that uses static functions to handle advanced digitizing tool creation.

Note
not available in Python bindings
Since
QGIS 3.40

Definition at line 81 of file qgsadvanceddigitizingtoolsregistry.h.

Constructor & Destructor Documentation

◆ QgsAdvancedDigitizingToolMetadata()

QgsAdvancedDigitizingToolMetadata::QgsAdvancedDigitizingToolMetadata ( const QString &  name,
const QString &  visibleName,
const QIcon &  icon = QIcon(),
const QgsAdvancedDigitizingToolFunc toolFunction = nullptr 
)
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.

Member Function Documentation

◆ createTool()

QgsAdvancedDigitizingTool * QgsAdvancedDigitizingToolMetadata::createTool ( QgsMapCanvas canvas,
QgsAdvancedDigitizingDockWidget cadDockWidget 
)
overridevirtual

Returns new tool of this type. Return nullptr on error.

Reimplemented from QgsAdvancedDigitizingToolAbstractMetadata.

Definition at line 25 of file qgsadvanceddigitizingtoolsregistry.cpp.

◆ setToolFunction()

void QgsAdvancedDigitizingToolMetadata::setToolFunction ( const QgsAdvancedDigitizingToolFunc function)
inline

Sets the tool creation function.

Definition at line 104 of file qgsadvanceddigitizingtoolsregistry.h.

◆ toolFunction()

QgsAdvancedDigitizingToolFunc QgsAdvancedDigitizingToolMetadata::toolFunction ( ) const
inline

Returns the tool creation function.

Definition at line 101 of file qgsadvanceddigitizingtoolsregistry.h.

Member Data Documentation

◆ mToolFunc

QgsAdvancedDigitizingToolFunc QgsAdvancedDigitizingToolMetadata::mToolFunc = nullptr
protected

Definition at line 109 of file qgsadvanceddigitizingtoolsregistry.h.


The documentation for this class was generated from the following files: