QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
16 #ifndef QGSLAYOUTITEMREGISTRY_H
17 #define QGSLAYOUTITEMREGISTRY_H
19 #include "qgis_core.h"
23 #include <QGraphicsItem>
57 , mVisibleName( visibleName )
58 , mVisibleNamePlural( visiblePluralName.isEmpty() ? visibleName : visiblePluralName )
66 int type()
const {
return mType; }
94 Q_UNUSED( properties )
95 Q_UNUSED( pathResolver )
102 QString mVisibleName;
103 QString mVisibleNamePlural;
134 , mCreateFunc( pfCreate )
135 , mPathResolverFunc( pfPathResolver )
152 if ( mPathResolverFunc )
153 mPathResolverFunc( properties, pathResolver, saving );
184 , mVisibleName( visibleName )
192 int type()
const {
return mType; }
218 Q_UNUSED( properties )
219 Q_UNUSED( pathResolver )
226 QString mVisibleName;
255 , mCreateFunc( pfCreate )
256 , mPathResolverFunc( pfPathResolver )
273 if ( mPathResolverFunc )
274 mPathResolverFunc( properties, pathResolver, saving );
308 LayoutItem = QGraphicsItem::UserType + 100,
342 PluginItem = LayoutTextTable + 10000,
411 void resolvePaths(
int type, QVariantMap &properties,
const QgsPathResolver &pathResolver,
bool saving )
const;
416 QMap< int, QString> itemTypes()
const;
437 QMap<int, QgsLayoutItemAbstractMetadata *> mMetadata;
438 QMap<int, QgsLayoutMultiFrameAbstractMetadata *> mMultiFrameMetadata;
459 ~TestLayoutItem() =
default;
463 void draw(
QgsRenderContext &context,
const QStyleOptionGraphicsItem *itemStyle =
nullptr )
override;
473 #endif //QGSLAYOUTITEMREGISTRY_H
@ LayoutPolygon
Polygon shape item.
static QIcon getThemeIcon(const QString &name)
Helper to get a theme icon.
Contains information about the context of a rendering operation.
std::function< QgsLayoutItem *(QgsLayout *)> QgsLayoutItemCreateFunc
Layout item creation function.
Abstract base class for layout items with the ability to distribute the content to several frames (Qg...
void typeAdded(int type, const QString &name)
Emitted whenever a new item type is added to the registry, with the specified type and visible name.
QgsLayoutItemRegistry & operator=(const QgsLayoutItemRegistry &rh)=delete
QgsLayoutItemRegistry cannot be copied.
virtual void draw(QgsLayoutItemRenderContext &context)=0
Draws the item's contents using the specified item render context.
@ LayoutGroup
Grouped item.
int type() const override
Returns a unique graphics item type identifier.
std::function< void(QVariantMap &, const QgsPathResolver &, bool)> QgsLayoutMultiFramePathResolverFunc
Layout multiframe path resolver function.
std::function< void(QVariantMap &, const QgsPathResolver &, bool)> QgsLayoutItemPathResolverFunc
Layout item path resolver function.
@ LayoutPolyline
Polyline shape item.
Base class for graphical items within a QgsLayout.
@ LayoutScaleBar
Scale bar item.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
@ LayoutPicture
Picture item.
@ LayoutMarker
Marker item.
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
A graphical widget to display and interact with QgsLayouts.
@ LayoutTextTable
Preset text table.
std::function< QgsLayoutMultiFrame *(QgsLayout *)> QgsLayoutMultiFrameCreateFunc
Layout multiframe creation function.
@ LayoutHtml
Html multiframe item.
Registry of available layout item types.
@ LayoutFrame
Frame item, part of a QgsLayoutMultiFrame object.
@ LayoutItem
Base class for items.
@ LayoutAttributeTable
Attribute table.
QgsLayoutItemRegistry(const QgsLayoutItemRegistry &rh)=delete
QgsLayoutItemRegistry cannot be copied.
@ LayoutManualTable
Manual (fixed) table.
@ LayoutLegend
Legend item.
Resolves relative paths into absolute paths and vice versa.
void multiFrameTypeAdded(int type, const QString &name)
Emitted whenever a new multiframe type is added to the registry, with the specified type and visible ...