QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
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;
241 static bool propertyAssociatesWithParentMultiframe( DataDefinedProperty property );
291 void setCustomProperty(
const QString &key,
const QVariant &value );
302 QVariant customProperty(
const QString &key,
const QVariant &defaultValue = QVariant() )
const;
311 void removeCustomProperty(
const QString &key );
319 QStringList customProperties()
const;
351 bool writeObjectPropertiesToElement( QDomElement &parentElement, QDomDocument &document,
const QgsReadWriteContext &context )
const;
361 bool readObjectPropertiesFromElement(
const QDomElement &parentElement,
const QDomDocument &document,
const QgsReadWriteContext &context );
375 static void initPropertyDefinitions();
377 friend class TestQgsLayoutObject;
381 #endif //QGSLAYOUTOBJECT_H
@ ScalebarFillColor2
Scalebar secondary fill color (deprecated, use data defined properties on scalebar fill symbol 2 inst...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
@ MapGridAnnotationDisplayTop
Map annotation display top.
@ MapGridFrameLineThickness
Map grid frame line thickness.
Layout item for basic filled shapes (e.g. rectangles, ellipses).
@ ItemRotation
Rotation of item.
@ StartDateTime
Temporal range's start DateTime.
Item representing the paper in a layout.
virtual void refresh()
Refreshes the object, causing a recalculation of any property overrides.
The class is used as a container of context for various read/write operations on other objects.
@ ScalebarRightSegments
Number of segments on the right of 0 (since QGIS 3.26)
@ ScalebarLineColor
Scalebar line color (deprecated, use data defined properties on scalebar line symbol instead)
Layout item for node based polyline shapes.
QgsObjectCustomProperties mCustomProperties
Custom properties for object.
@ PaperWidth
Paper width (deprecated)
@ PaperOrientation
Paper orientation.
@ MapGridAnnotationDisplayLeft
Map annotation display left.
@ LegendColumnCount
Legend column count.
@ ItemHeight
Height of item.
QgsPropertyCollection mDataDefinedProperties
@ AttributeTableSourceLayer
Attribute table source layer.
@ PictureSvgStrokeColor
SVG stroke color.
@ MapXMin
Map extent x minimum.
@ MapGridOffsetY
Map grid offset Y.
@ PictureSvgStrokeWidth
SVG stroke width.
@ BlendMode
Item blend mode.
void setDataDefinedProperties(const QgsPropertyCollection &collection)
Sets the objects's property collection, used for data defined overrides.
@ MapGridFrameDivisionsTop
Map frame division display top.
A layout item subclass for map legends.
@ MapYMin
Map extent y minimum.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
@ PositionX
X position on page.
@ AllProperties
All properties for item.
@ MapGridFrameMargin
Map grid frame margin.
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
@ MapGridAnnotationDisplayBottom
Map annotation display bottom.
Base class for frame items, which form a layout multiframe item.
QgsCompositionConverter class converts a QGIS 2.x composition to a QGIS 3.x layout.
@ ScalebarRightSegmentSubdivisions
Number of subdivisions per segment on right of 0 (since QGIS 3.26)
@ ScalebarMinimumWidth
Scalebar segment minimum width (since QGIS 3.26)
@ MapRotation
Map rotation.
@ MapGridIntervalX
Map grid interval X.
@ MapXMax
Map extent x maximum.
@ MapYMax
Map extent y maximum.
const QgsPropertyCollection & dataDefinedProperties() const
Returns a reference to the object's property collection, used for data defined overrides.
@ ScalebarSegmentWidth
Scalebar width in map units of a single segment (since QGIS 3.26)
@ ScalebarLeftSegments
Number of segments on the left of 0 (since QGIS 3.26)
@ MapGridCrossSize
Map grid cross size.
@ ExcludeFromExports
Exclude item from exports.
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
@ MapGridOffsetX
Map grid offset X.
Base class for graphical items within a QgsLayout.
@ ScalebarHeight
Scalebar height (since QGIS 3.26)
@ ScalebarLineWidth
Scalebar line width (deprecated, use data defined properties on scalebar line symbol instead)
@ MapLabelMargin
Map label margin.
A container for grouping several QgsLayoutItems.
@ PageNumber
Page number for item placement.
@ PaperHeight
Paper height (deprecated)
@ MapGridEnabled
Map grid enabled.
A layout item subclass that displays SVG files or raster format images (jpg, png, ....
@ MapAtlasMargin
Map atlas margin.
Layout graphical items for displaying a map.
QgsPropertyCollection & dataDefinedProperties()
Returns a reference to the object's property collection, used for data defined overrides.
@ LegendTitle
Legend title.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
@ BackgroundColor
Item background color.
@ TestProperty
Dummy property with no effect on item.
@ PositionY
Y position on page.
QPointer< QgsLayout > mLayout
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Simple key-value store (keys = strings, values = variants) that supports loading/saving to/from XML i...
@ MapGridLabelDistance
Map grid label distance.
PropertyValueType
Specifies whether the value returned by a function should be the original, user set value,...
@ MapGridFrameDivisionsRight
Map frame division display right.
Layout item for node based polygon shapes.
@ MapGridAnnotationDisplayRight
Map annotation display right.
@ MapGridIntervalY
Map grid interval Y.
@ FrameColor
Item frame color.
A layout item subclass for text labels.
A layout item subclass for scale bars.
@ MapGridFrameSize
Map grid frame size.
@ NumPages
Number of pages in composition (deprecated)
@ EndDateTime
Temporal range's end DateTime.
@ MapGridFrameDivisionsBottom
Map frame division display bottom.
@ SourceUrl
Html source url.
@ MapStylePreset
Layer and style map theme.
@ MapGridFrameDivisionsLeft
Map frame division display left.
@ ScalebarFillColor
Scalebar fill color (deprecated, use data defined properties on scalebar fill symbol 1 instead)
Abstract interface for generating an expression context.
@ PresetPaperSize
Preset paper size for composition.
@ PictureSvgBackgroundColor
SVG background color.
@ ScalebarSubdivisionHeight
Scalebar subdivision height (since QGIS 3.26)
@ ScalebarMaximumWidth
Scalebar segment maximum width (since QGIS 3.26)
@ Transparency
Item transparency (deprecated)
DataDefinedProperty
Data defined properties for different item types.
A base class for objects which belong to a layout.
@ PictureSource
Picture source url.
@ MapLayers
Map layer set.
@ ItemWidth
Width of item.