17 #ifndef QGSLAYOUTOBJECT_H 18 #define QGSLAYOUTOBJECT_H 20 #include "qgis_core.h" 58 if (
QgsLayoutItem *item = qobject_cast< QgsLayoutItem * >( sipCpp ) )
62 switch ( item->type() )
70 case QGraphicsItem::UserType + 101:
71 sipType = sipType_QgsLayoutItemGroup;
74 case QGraphicsItem::UserType + 102:
75 sipType = sipType_QgsLayoutItemPage;
78 case QGraphicsItem::UserType + 103:
79 sipType = sipType_QgsLayoutItemMap;
82 case QGraphicsItem::UserType + 104:
83 sipType = sipType_QgsLayoutItemPicture;
86 case QGraphicsItem::UserType + 105:
87 sipType = sipType_QgsLayoutItemLabel;
90 case QGraphicsItem::UserType + 106:
91 sipType = sipType_QgsLayoutItemLegend;
94 case QGraphicsItem::UserType + 107:
95 sipType = sipType_QgsLayoutItemShape;
98 case QGraphicsItem::UserType + 108:
99 sipType = sipType_QgsLayoutItemPolygon;
102 case QGraphicsItem::UserType + 109:
103 sipType = sipType_QgsLayoutItemPolyline;
106 case QGraphicsItem::UserType + 110:
107 sipType = sipType_QgsLayoutItemScaleBar;
110 case QGraphicsItem::UserType + 111:
111 sipType = sipType_QgsLayoutFrame;
118 sipType = sipType_QgsLayoutItem;
271 void setCustomProperty(
const QString &key,
const QVariant &value );
282 QVariant customProperty(
const QString &key,
const QVariant &defaultValue = QVariant() )
const;
291 void removeCustomProperty(
const QString &key );
299 QStringList customProperties()
const;
331 bool writeObjectPropertiesToElement( QDomElement &parentElement, QDomDocument &document,
const QgsReadWriteContext &context )
const;
341 bool readObjectPropertiesFromElement(
const QDomElement &parentElement,
const QDomDocument &document,
const QgsReadWriteContext &context );
355 static void initPropertyDefinitions();
357 friend class TestQgsLayoutObject;
361 #endif //QGSLAYOUTOBJECT_H Map frame division display right.
The class is used as a container of context for various read/write operations on other objects...
Base class for graphical items within a QgsLayout.
A layout item subclass for text labels.
Layer and style map theme.
QgsObjectCustomProperties mCustomProperties
Custom properties for object.
Exclude item from exports.
QgsPropertyCollection & dataDefinedProperties()
Returns a reference to the object's property collection, used for data defined overrides.
A container for grouping several QgsLayoutItems.
Scalebar fill color (deprecated, use data defined properties on scalebar fill symbol 1 instead) ...
A layout item subclass that displays SVG files or raster format images (jpg, png, ...
Layout item for node based polygon shapes.
Temporal range's start DateTime.
Dummy property with no effect on item.
Number of pages in composition (deprecated)
PropertyValueType
Specifies whether the value returned by a function should be the original, user set value...
Attribute table source layer.
Map grid frame line thickness.
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
Layout graphical items for displaying a map.
Layout item for node based polyline shapes.
Scalebar secondary fill color (deprecated, use data defined properties on scalebar fill symbol 2 inst...
QgsPropertyCollection mDataDefinedProperties
Item transparency (deprecated)
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Layout item for basic filled shapes (e.g.
QPointer< QgsLayout > mLayout
Map annotation display top.
Map frame division display left.
Page number for item placement.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Scalebar line width (deprecated, use data defined properties on scalebar line symbol instead) ...
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
Abstract interface for generating an expression context.
QgsCompositionConverter class converts a QGIS 2.x composition to a QGIS 3.x layout.
Temporal range's end DateTime.
Map frame division display top.
void setDataDefinedProperties(const QgsPropertyCollection &collection)
Sets the objects's property collection, used for data defined overrides.
Map annotation display bottom.
Preset paper size for composition.
Paper height (deprecated)
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Simple key-value store (keys = strings, values = variants) that supports loading/saving to/from XML i...
A layout item subclass for scale bars.
A base class for objects which belong to a layout.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
Map annotation display right.
Map annotation display left.
A layout item subclass for map legends.
virtual void refresh()
Refreshes the object, causing a recalculation of any property overrides.
DataDefinedProperty
Data defined properties for different item types.
Base class for frame items, which form a layout multiframe item.
Map frame division display bottom.
Scalebar line color (deprecated, use data defined properties on scalebar line symbol instead) ...
const QgsPropertyCollection & dataDefinedProperties() const
Returns a reference to the object's property collection, used for data defined overrides.
Item representing the paper in a layout.