QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
16 #ifndef QGSLAYOUTITEMGUIREGISTRY_H
17 #define QGSLAYOUTITEMGUIREGISTRY_H
24 #include <QGraphicsItem>
53 FlagNoCreationTools = 1 << 1,
55 Q_DECLARE_FLAGS( Flags, Flag )
69 , mIsNodeBased( isNodeBased )
70 , mName( visibleName )
79 int type()
const {
return mType; }
84 Flags
flags()
const {
return mFlags; }
89 QString
groupId()
const {
return mGroupId; }
142 bool mIsNodeBased =
false;
186 bool isNodeBased =
false,
187 QgsLayoutItemAbstractGuiMetadata::Flags flags = QgsLayoutItemAbstractGuiMetadata::Flags(),
190 , mIcon( creationIcon )
191 , mWidgetFunc( pfWidget )
192 , mRubberBandFunc( pfRubberBand )
193 , mCreateFunc( pfCreateFunc )
294 QgsLayoutItemGuiGroup(
const QString &
id = QString(),
const QString &name = QString(),
const QIcon &icon = QIcon() )
391 void newItemAddedToLayout(
int metadataId,
QgsLayoutItem *item );
411 QAbstractGraphicsShapeItem *createNodeItemRubberBand(
int metadataId,
QgsLayoutView *view )
SIP_SKIP;
416 QList< int > itemMetadataIds()
const;
424 void typeAdded(
int metadataId );
431 QMap< int, QgsLayoutItemAbstractGuiMetadata *> mMetadata;
433 QMap< QString, QgsLayoutItemGuiGroup > mItemGroups;
437 #endif //QGSLAYOUTITEMGUIREGISTRY_H
std::function< void(QgsLayoutItem *)> QgsLayoutItemAddedToLayoutFunc
Layout item added to layout callback.
static QIcon getThemeIcon(const QString &name)
Helper to get a theme icon.
Stores GUI metadata about a group of layout item classes.
QIcon icon
Icon for group.
std::function< QgsLayoutItemBaseWidget *(QgsLayoutItem *)> QgsLayoutItemWidgetFunc
Layout item configuration widget creation function.
std::function< QgsLayoutItem *(QgsLayout *)> QgsLayoutItemCreateFunc
Layout item creation function.
std::function< QAbstractGraphicsShapeItem *(QgsLayoutView *)> QgsLayoutNodeItemRubberBandFunc
Layout node based rubber band creation function.
QString id
Unique (untranslated) group ID string.
QString name
Translated group name.
Base class for graphical items within a QgsLayout.
QgsLayoutItemGuiGroup(const QString &id=QString(), const QString &name=QString(), const QIcon &icon=QIcon())
Constructor for QgsLayoutItemGuiGroup.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
std::function< QgsLayoutViewRubberBand *(QgsLayoutView *)> QgsLayoutItemRubberBandFunc
Layout rubber band creation function.
Registry of available layout item GUI behavior.