|
QGIS API Documentation 3.99.0-Master (f78f5286a64)
|
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... | |
| typedef QFlags< Flag > | Flags |
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. | |
| virtual | ~QgsLayoutItemAbstractGuiMetadata ()=default |
| virtual QgsLayoutItem * | createItem (QgsLayout *layout) |
| Creates an instance of the corresponding item type. | |
| virtual QgsLayoutItemBaseWidget * | createItemWidget (QgsLayoutItem *item) |
| Creates a configuration widget for an item of this type. | |
| virtual QGraphicsItem * | createNodeRubberBand (QgsLayoutView *view) |
| Creates a rubber band for use when creating layout node based items of this type. | |
| virtual QgsLayoutViewRubberBand * | createRubberBand (QgsLayoutView *view) |
| Creates a rubber band for use when creating layout items of this type. | |
| virtual QIcon | creationIcon () const |
| Returns an icon representing creation of the layout item type. | |
| Flags | flags () const |
| Returns item flags. | |
| QString | groupId () const |
| Returns the item group ID, if set. | |
| virtual void | handleDoubleClick (QgsLayoutItem *item, Qgis::MouseHandlesAction action) |
| Called when a layout item is double-clicked. | |
| bool | isNodeBased () const |
Returns true if the associated item is a node based item. | |
| virtual void | newItemAddedToLayout (QgsLayoutItem *item) |
| Called when a newly created item of the associated type has been added to a layout. | |
| int | type () const |
| Returns the unique item type code for the layout item class. | |
| QString | visibleName () const |
| Returns a translated, user visible name identifying the corresponding layout item. | |
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 45 of file qgslayoutitemguiregistry.h.
| typedef QFlags< Flag > QgsLayoutItemAbstractGuiMetadata::Flags |
Definition at line 53 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 49 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 64 of file qgslayoutitemguiregistry.h.
|
virtualdefault |
|
virtual |
Creates an instance of the corresponding item type.
Reimplemented in QgsLayoutItemGuiMetadata.
Definition at line 36 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 122 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 31 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 26 of file qgslayoutitemguiregistry.cpp.
|
inlinevirtual |
Returns an icon representing creation of the layout item type.
Reimplemented in QgsLayoutItemGuiMetadata.
Definition at line 102 of file qgslayoutitemguiregistry.h.
|
inline |
Returns item flags.
Definition at line 82 of file qgslayoutitemguiregistry.h.
|
inline |
Returns the item group ID, if set.
Definition at line 87 of file qgslayoutitemguiregistry.h.
|
virtual |
Called when a layout item is double-clicked.
The action parameter is used to specify which mouse handle, if any, was clicked If no mouse handle is selected, Qgis::MouseHandlesAction::NoAction is used
Reimplemented in QgsLayoutItemGuiMetadata.
Definition at line 45 of file qgslayoutitemguiregistry.cpp.
|
inline |
Returns true if the associated item is a node based item.
Definition at line 92 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 41 of file qgslayoutitemguiregistry.cpp.
|
inline |
Returns the unique item type code for the layout item class.
Definition at line 77 of file qgslayoutitemguiregistry.h.
|
inline |
Returns a translated, user visible name identifying the corresponding layout item.
Definition at line 97 of file qgslayoutitemguiregistry.h.