Subgroup: Layout
Class: QgsLayoutItemAbstractGuiMetadata¶
-
class
qgis.gui.
QgsLayoutItemAbstractGuiMetadata
¶ Bases:
sip.wrapper
Stores GUI metadata about one layout item class.
This is a companion to QgsLayoutItemAbstractMetadata, storing only the components related to the GUI behavior of a layout item.
Note
In C++ you can use QgsLayoutItemGuiMetadata convenience class.
New in version 3.0: Methods
createItem
Creates an instance of the corresponding item type. createItemWidget
Creates a configuration widget for an item
of this type.createNodeRubberBand
Creates a rubber band for use when creating layout node based items of this type. createRubberBand
Creates a rubber band for use when creating layout items of this type. creationIcon
Returns an icon representing creation of the layout item type. flags
Returns item flags. groupId
Returns the item group ID, if set. isNodeBased
Returns true if the associated item is a node based item. newItemAddedToLayout
Called when a newly created item of the associated type has been added to a layout. type
Returns the unique item type code for the layout item class. visibleName
Returns a translated, user visible name identifying the corresponding layout item. Attributes
FlagNoCreationTools
-
class
Flag
¶ Bases:
int
-
FlagNoCreationTools
= 2¶
-
class
Flags
¶ Bases:
sip.wrapper
QgsLayoutItemAbstractGuiMetadata.Flags(Union[QgsLayoutItemAbstractGuiMetadata.Flags, QgsLayoutItemAbstractGuiMetadata.Flag]) QgsLayoutItemAbstractGuiMetadata.Flags(QgsLayoutItemAbstractGuiMetadata.Flags)
-
createItem
(self, layout: QgsLayout) → QgsLayoutItem¶ Creates an instance of the corresponding item type.
-
createItemWidget
(self, item: QgsLayoutItem) → QgsLayoutItemBaseWidget¶ Creates a configuration widget for an
item
of this type. Can return None if no configuration GUI is required.
-
createNodeRubberBand
(self, view: QgsLayoutView) → QAbstractGraphicsShapeItem¶ Creates a rubber band for use when creating layout node based items of this type. Can return None if no rubber band should be created. The default behavior is to return None.
See also
-
createRubberBand
(self, view: QgsLayoutView) → QgsLayoutViewRubberBand¶ Creates a rubber band for use when creating layout items of this type. Can return None if no rubber band should be created. The default behavior is to create a rectangular rubber band.
See also
-
creationIcon
(self) → QIcon¶ Returns an icon representing creation of the layout item type.
-
flags
(self) → QgsLayoutItemAbstractGuiMetadata.Flags¶ Returns item flags.
-
groupId
(self) → str¶ Returns the item group ID, if set.
-
isNodeBased
(self) → bool¶ Returns true if the associated item is a node based item.
-
newItemAddedToLayout
(self, item: QgsLayoutItem)¶ Called when a newly created item of the associated type has been added to a layout.
This is only called for additions which result from GUI operations - i.e. it is not called for items added from templates.
-
type
(self) → int¶ Returns the unique item type code for the layout item class.
-
visibleName
(self) → str¶ Returns a translated, user visible name identifying the corresponding layout item.
-
class