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 =
nullptr,
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
Stores GUI metadata about a group of layout item classes.
Base class for graphical items within a QgsLayout.
A graphical widget to display and interact with QgsLayouts.
QString name
Translated group name.
QIcon icon
Icon for group.
static QIcon getThemeIcon(const QString &name)
Helper to get a theme icon.
Registry of available layout item GUI behavior.
QString id
Unique (untranslated) group ID string.
std::function< QgsLayoutViewRubberBand *(QgsLayoutView *)> QgsLayoutItemRubberBandFunc
Layout rubber band creation function.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
std::function< QAbstractGraphicsShapeItem *(QgsLayoutView *)> QgsLayoutNodeItemRubberBandFunc
Layout node based rubber band creation function.
QgsLayoutViewRubberBand is an abstract base class for temporary rubber band items in various shapes...
std::function< void(QgsLayoutItem *)> QgsLayoutItemAddedToLayoutFunc
Layout item added to layout callback.
std::function< QgsLayoutItem *(QgsLayout *)> QgsLayoutItemCreateFunc
Layout item creation function.
std::function< QgsLayoutItemBaseWidget *(QgsLayoutItem *)> QgsLayoutItemWidgetFunc
Layout item configuration widget creation function.
QgsLayoutItemGuiGroup(const QString &id=QString(), const QString &name=QString(), const QIcon &icon=QIcon())
Constructor for QgsLayoutItemGuiGroup.