QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Stores GUI metadata about one layout item class. More...
#include <qgslayoutitemguiregistry.h>
Public Types | |
enum | Flag { FlagNoCreationTools = 1 << 1 } |
Flags for controlling how a items behave in the GUI. More... | |
Public Member Functions | |
QgsLayoutItemAbstractGuiMetadata (int type, const QString &visibleName, const QString &groupId=QString(), bool isNodeBased=false, Flags flags=QgsLayoutItemAbstractGuiMetadata::Flags()) | |
Constructor for QgsLayoutItemAbstractGuiMetadata with the specified class type. More... | |
virtual | ~QgsLayoutItemAbstractGuiMetadata ()=default |
virtual QgsLayoutItem * | createItem (QgsLayout *layout) |
Creates an instance of the corresponding item type. More... | |
virtual QgsLayoutItemBaseWidget * | createItemWidget (QgsLayoutItem *item) |
Creates a configuration widget for an item of this type. More... | |
virtual QAbstractGraphicsShapeItem * | createNodeRubberBand (QgsLayoutView *view) |
Creates a rubber band for use when creating layout node based items of this type. More... | |
virtual QgsLayoutViewRubberBand * | createRubberBand (QgsLayoutView *view) |
Creates a rubber band for use when creating layout items of this type. More... | |
virtual QIcon | creationIcon () const |
Returns an icon representing creation of the layout item type. More... | |
Flags | flags () const |
Returns item flags. More... | |
QString | groupId () const |
Returns the item group ID, if set. More... | |
bool | isNodeBased () const |
Returns true if the associated item is a node based item. More... | |
virtual void | newItemAddedToLayout (QgsLayoutItem *item) |
Called when a newly created item of the associated type has been added to a layout. More... | |
int | type () const |
Returns the unique item type code for the layout item class. More... | |
QString | visibleName () const |
Returns a translated, user visible name identifying the corresponding layout item. More... | |
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.
Definition at line 46 of file qgslayoutitemguiregistry.h.
Flags for controlling how a items behave in the GUI.
Enumerator | |
---|---|
FlagNoCreationTools | Do not show item creation tools for the item type. |
Definition at line 51 of file qgslayoutitemguiregistry.h.
|
inline |
Constructor for QgsLayoutItemAbstractGuiMetadata with the specified class type.
visibleName should be set to a translated, user visible name identifying the corresponding layout item.
An optional groupId can be set, which allows grouping of related layout item classes. See QgsLayoutItemGuiMetadata for details.
If isNodeBased is true
, then the corresponding item is a node based item.
Definition at line 66 of file qgslayoutitemguiregistry.h.
|
virtualdefault |
|
virtual |
Creates an instance of the corresponding item type.
Reimplemented in QgsLayoutItemGuiMetadata.
Definition at line 35 of file qgslayoutitemguiregistry.cpp.
|
inlinevirtual |
Creates a configuration widget for an item of this type.
Can return nullptr
if no configuration GUI is required.
Reimplemented in QgsLayoutItemGuiMetadata.
Definition at line 109 of file qgslayoutitemguiregistry.h.
|
virtual |
Creates a rubber band for use when creating layout node based items of this type.
Can return nullptr
if no rubber band should be created. The default behavior is to return nullptr
.
Reimplemented in QgsLayoutItemGuiMetadata.
Definition at line 30 of file qgslayoutitemguiregistry.cpp.
|
virtual |
Creates a rubber band for use when creating layout items of this type.
Can return nullptr
if no rubber band should be created. The default behavior is to create a rectangular rubber band.
Reimplemented in QgsLayoutItemGuiMetadata.
Definition at line 25 of file qgslayoutitemguiregistry.cpp.
|
inlinevirtual |
Returns an icon representing creation of the layout item type.
Reimplemented in QgsLayoutItemGuiMetadata.
Definition at line 104 of file qgslayoutitemguiregistry.h.
|
inline |
Returns item flags.
Definition at line 84 of file qgslayoutitemguiregistry.h.
|
inline |
Returns the item group ID, if set.
Definition at line 89 of file qgslayoutitemguiregistry.h.
|
inline |
Returns true
if the associated item is a node based item.
Definition at line 94 of file qgslayoutitemguiregistry.h.
|
virtual |
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.
Reimplemented in QgsLayoutItemGuiMetadata.
Definition at line 40 of file qgslayoutitemguiregistry.cpp.
|
inline |
Returns the unique item type code for the layout item class.
Definition at line 79 of file qgslayoutitemguiregistry.h.
|
inline |
Returns a translated, user visible name identifying the corresponding layout item.
Definition at line 99 of file qgslayoutitemguiregistry.h.