QgsLayoutItemAbstractMetadata class
Stores metadata about one layout item class.
Contents
A companion class, QgsLayoutItemAbstractGuiMetadata, handles the GUI behavior of QgsLayoutItems.
Derived classes
- class QgsLayoutItemMetadata
- Convenience metadata class that uses static functions to create layout items and their configuration widgets.
Constructors, destructors, conversion operators
- QgsLayoutItemAbstractMetadata(int type, const QString& visibleName)
- Constructor for QgsLayoutItemAbstractMetadata with the specified class type and visibleName.
Public functions
- auto createItem(QgsLayout* layout) -> QgsLayoutItem* pure virtual
- Creates a layout item of this class for a specified layout.
- void resolvePaths(QVariantMap& properties, const QgsPathResolver& pathResolver, bool saving) virtual
- Resolve paths in the item's properties (if there are any paths).
- auto type() const -> int
- Returns the unique item type code for the layout item class.
- auto visibleName() const -> QString
- Returns a translated, user visible name for the layout item class.
Function documentation
void QgsLayoutItemAbstractMetadata:: resolvePaths(QVariantMap& properties,
const QgsPathResolver& pathResolver,
bool saving) virtual
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.