QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
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; }
109 Q_UNUSED( properties )
110 Q_UNUSED( pathResolver )
117 QString mVisibleName;
118 QString mVisibleNamePlural;
149 , mCreateFunc( pfCreate )
150 , mPathResolverFunc( pfPathResolver )
167 if ( mPathResolverFunc )
168 mPathResolverFunc( properties, pathResolver, saving );
199 , mVisibleName( visibleName )
207 int type()
const {
return mType; }
248 Q_UNUSED( properties )
249 Q_UNUSED( pathResolver )
256 QString mVisibleName;
285 , mCreateFunc( pfCreate )
286 , mPathResolverFunc( pfPathResolver )
303 if ( mPathResolverFunc )
304 mPathResolverFunc( properties, pathResolver, saving );
338 LayoutItem = QGraphicsItem::UserType + 100,
372 PluginItem = LayoutTextTable + 10000,
456 void resolvePaths(
int type, QVariantMap &properties,
const QgsPathResolver &pathResolver,
bool saving )
const;
461 QMap< int, QString> itemTypes()
const;
469 void typeAdded(
int type,
const QString &name );
475 void multiFrameTypeAdded(
int type,
const QString &name );
482 QMap<int, QgsLayoutItemAbstractMetadata *> mMetadata;
483 QMap<int, QgsLayoutMultiFrameAbstractMetadata *> mMultiFrameMetadata;
504 ~TestLayoutItem() =
default;
508 void draw(
QgsRenderContext &context,
const QStyleOptionGraphicsItem *itemStyle =
nullptr )
override;
518 #endif //QGSLAYOUTITEMREGISTRY_H
@ LayoutPolygon
Polygon shape item.
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...
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.
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
Registry of available layout item types.
@ LayoutFrame
Frame item, part of a QgsLayoutMultiFrame object.
@ LayoutItem
Base class for items.
@ LayoutAttributeTable
Attribute table.
@ LayoutManualTable
Manual (fixed) table.
@ LayoutLegend
Legend item.
Resolves relative paths into absolute paths and vice versa. Used for writing.