QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
Stores metadata about one layout item class. More...
#include <qgslayoutitemregistry.h>
Public Member Functions | |
QgsLayoutItemAbstractMetadata (int type, const QString &visibleName, const QString &visiblePluralName=QString()) | |
Constructor for QgsLayoutItemAbstractMetadata with the specified class type and visibleName. | |
virtual | ~QgsLayoutItemAbstractMetadata ()=default |
virtual QgsLayoutItem * | createItem (QgsLayout *layout)=0 |
Creates a layout item of this class for a specified layout. | |
virtual void | resolvePaths (QVariantMap &properties, const QgsPathResolver &pathResolver, bool saving) |
Resolve paths in the item's properties (if there are any paths). | |
int | type () const |
Returns the unique item type code for the layout item class. | |
QString | visibleName () const |
Returns a translated, user visible name for the layout item class. | |
QString | visiblePluralName () const |
Returns a translated, user visible name for plurals of the layout item class (e.g. | |
Stores metadata about one layout item class.
A companion class, QgsLayoutItemAbstractGuiMetadata, handles the GUI behavior of QgsLayoutItems.
Definition at line 44 of file qgslayoutitemregistry.h.
|
inline |
Constructor for QgsLayoutItemAbstractMetadata with the specified class type and visibleName.
The optional visiblePluralName argument can be used to specify a plural variant of the item type.
Definition at line 54 of file qgslayoutitemregistry.h.
|
virtualdefault |
|
pure virtual |
Creates a layout item of this class for a specified layout.
Implemented in QgsLayoutItemMetadata.
|
inlinevirtual |
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 in QgsLayoutItemMetadata.
Definition at line 106 of file qgslayoutitemregistry.h.
|
inline |
Returns the unique item type code for the layout item class.
Definition at line 65 of file qgslayoutitemregistry.h.
|
inline |
Returns a translated, user visible name for the layout item class.
Definition at line 71 of file qgslayoutitemregistry.h.
|
inline |
Returns a translated, user visible name for plurals of the layout item class (e.g.
"Labels" for a "Label" item).
Definition at line 77 of file qgslayoutitemregistry.h.