QGIS API Documentation
3.6.0-Noosa (5873452)
|
Convenience metadata class that uses static functions to create layout items and their configuration widgets. More...
#include <qgslayoutitemregistry.h>
Public Member Functions | |
QgsLayoutItemMetadata (int type, const QString &visibleName, const QgsLayoutItemCreateFunc &pfCreate, const QgsLayoutItemPathResolverFunc &pfPathResolver=nullptr) | |
Constructor for QgsLayoutItemMetadata with the specified class type and visibleName, and function pointers for the various item creation functions. More... | |
QgsLayoutItemCreateFunc | createFunction () const |
Returns the classes' item creation function. More... | |
QgsLayoutItem * | createItem (QgsLayout *layout) override |
Creates a layout item of this class for a specified layout. More... | |
QgsLayoutItemPathResolverFunc | pathResolverFunction () const |
Returns the classes' path resolver function. More... | |
void | resolvePaths (QVariantMap &properties, const QgsPathResolver &pathResolver, bool saving) override |
Resolve paths in the item's properties (if there are any paths). More... | |
Public Member Functions inherited from QgsLayoutItemAbstractMetadata | |
QgsLayoutItemAbstractMetadata (int type, const QString &visibleName) | |
Constructor for QgsLayoutItemAbstractMetadata with the specified class type and visibleName. More... | |
virtual | ~QgsLayoutItemAbstractMetadata ()=default |
int | type () const |
Returns the unique item type code for the layout item class. More... | |
QString | visibleName () const |
Returns a translated, user visible name for the layout item class. More... | |
Protected Attributes | |
QgsLayoutItemCreateFunc | mCreateFunc = nullptr |
QgsLayoutItemPathResolverFunc | mPathResolverFunc = nullptr |
Convenience metadata class that uses static functions to create layout items and their configuration widgets.
Definition at line 109 of file qgslayoutitemregistry.h.
|
inline |
Constructor for QgsLayoutItemMetadata with the specified class type and visibleName, and function pointers for the various item creation functions.
Definition at line 117 of file qgslayoutitemregistry.h.
|
inline |
Returns the classes' item creation function.
Definition at line 128 of file qgslayoutitemregistry.h.
|
inlineoverridevirtual |
Creates a layout item of this class for a specified layout.
Implements QgsLayoutItemAbstractMetadata.
Definition at line 135 of file qgslayoutitemregistry.h.
|
inline |
Returns the classes' path resolver function.
Definition at line 133 of file qgslayoutitemregistry.h.
|
inlineoverridevirtual |
Resolve paths in the item's properties (if there are any paths).
When saving is true, paths are converted from absolute to relative, when saving is false, paths are converted from relative to absolute. This ensures that paths in project files can be relative, but in item instances the paths are always absolute.
Reimplemented from QgsLayoutItemAbstractMetadata.
Definition at line 137 of file qgslayoutitemregistry.h.
|
protected |
Definition at line 144 of file qgslayoutitemregistry.h.
|
protected |
Definition at line 145 of file qgslayoutitemregistry.h.