QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
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;
263 void setCustomProperty(
const QString &key,
const QVariant &value );
274 QVariant customProperty(
const QString &key,
const QVariant &defaultValue = QVariant() )
const;
283 void removeCustomProperty(
const QString &key );
291 QStringList customProperties()
const;
323 bool writeObjectPropertiesToElement( QDomElement &parentElement, QDomDocument &document,
const QgsReadWriteContext &context )
const;
333 bool readObjectPropertiesFromElement(
const QDomElement &parentElement,
const QDomDocument &document,
const QgsReadWriteContext &context );
347 static void initPropertyDefinitions();
349 friend class TestQgsLayoutObject;
353 #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...
@ 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.
@ ScalebarLineColor
Scalebar line color (deprecated, use data defined properties on scalebar line symbol instead)
QgsObjectCustomProperties mCustomProperties
Custom properties for object.
@ PaperWidth
Paper width (deprecated)
@ PaperOrientation
Paper orientation.
@ 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.
@ 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.
QgsCompositionConverter class converts a QGIS 2.x composition to a QGIS 3.x layout.
@ 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.
@ 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.
@ ScalebarLineWidth
Scalebar line width (deprecated, use data defined properties on scalebar line symbol instead)
@ MapLabelMargin
Map label margin.
@ PageNumber
Page number for item placement.
@ PaperHeight
Paper height (deprecated)
@ MapGridEnabled
Map grid enabled.
@ 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.
@ MapGridLabelDistance
Map grid label distance.
PropertyValueType
Specifies whether the value returned by a function should be the original, user set value,...
@ MapGridIntervalY
Map grid interval Y.
@ FrameColor
Item frame color.
@ MapGridFrameSize
Map grid frame size.
@ NumPages
Number of pages in composition (deprecated)
@ EndDateTime
Temporal range's end DateTime.
@ SourceUrl
Html source url.
@ MapStylePreset
Layer and style map theme.
@ ScalebarFillColor
Scalebar fill color (deprecated, use data defined properties on scalebar fill symbol 1 instead)
@ PresetPaperSize
Preset paper size for composition.
@ PictureSvgBackgroundColor
SVG background color.
@ Transparency
Item transparency (deprecated)
DataDefinedProperty
Data defined properties for different item types.
@ PictureSource
Picture source url.
@ MapLayers
Map layer set.
@ ItemWidth
Width of item.