| 
    QGIS API Documentation
    3.14.0-Pi (9f7028fd23)
    
   | 
 
 
 
 
Go to the documentation of this file.
   30 void QgsLayoutObject::initPropertyDefinitions()
 
   32   if ( !sPropertyDefinitions.isEmpty() )
 
   40           "|<b>B5</b>|<b>B4</b>|<b>B3</b>|<b>B2</b>|<b>B1</b>|<b>B0</b>" 
   41           "|<b>Legal</b>|<b>Ansi A</b>|<b>Ansi B</b>|<b>Ansi C</b>|<b>Ansi D</b>|<b>Ansi E</b>" 
   42           "|<b>Arch A</b>|<b>Arch B</b>|<b>Arch C</b>|<b>Arch D</b>|<b>Arch E</b>|<b>Arch E1</b>]" 
  101   QgsLayoutObject::initPropertyDefinitions();
 
  102   return sPropertyDefinitions;
 
  109   initPropertyDefinitions();
 
  152     return mLayout->createExpressionContext();
 
  162   if ( parentElement.isNull() )
 
  168   QDomElement objectElement = document.createElement( QStringLiteral( 
"LayoutObject" ) );
 
  170   QDomElement ddPropsElement = document.createElement( QStringLiteral( 
"dataDefinedProperties" ) );
 
  172   objectElement.appendChild( ddPropsElement );
 
  177   parentElement.appendChild( objectElement );
 
  184   if ( parentElement.isNull() )
 
  189   QDomNodeList objectNodeList = parentElement.elementsByTagName( QStringLiteral( 
"LayoutObject" ) );
 
  190   if ( objectNodeList.size() < 1 )
 
  194   QDomElement objectElement = objectNodeList.at( 0 ).toElement();
 
  196   QDomNode propsNode = objectElement.namedItem( QStringLiteral( 
"dataDefinedProperties" ) );
 
  197   if ( !propsNode.isNull() )
 
  
@ 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...
 
void removeCustomProperty(const QString &key)
Remove a custom property from the object.
 
QVariant customProperty(const QString &key, const QVariant &defaultValue=QVariant()) const
Read a custom property from the object.
 
const QgsLayout * layout() const
Returns the layout the object is attached to.
 
@ MapGridFrameLineThickness
Map grid frame line thickness.
 
@ ItemRotation
Rotation of item.
 
@ StartDateTime
Temporal range's start DateTime.
 
virtual void refresh()
Refreshes the object, causing a recalculation of any property overrides.
 
static QgsExpressionContextScope * globalScope()
Creates a new scope which contains variables and functions relating to the global QGIS context.
 
@ ScalebarLineColor
Scalebar line color (deprecated, use data defined properties on scalebar line symbol instead)
 
@ DataTypeString
Property requires a string value.
 
QgsObjectCustomProperties mCustomProperties
Custom properties for object.
 
@ PaperWidth
Paper width (deprecated)
 
@ PaperOrientation
Paper orientation.
 
virtual bool readXml(const QDomElement &collectionElem, const QgsPropertiesDefinition &definitions)
Reads property collection state from an XML element.
 
@ LegendColumnCount
Legend column count.
 
@ ItemHeight
Height of item.
 
@ IntegerPositiveGreaterZero
Non-zero positive integer values.
 
QgsPropertyCollection mDataDefinedProperties
 
@ Double
Double value (including negative values)
 
void readXml(const QDomNode &parentNode, const QString &keyStartsWith=QString())
Read store contents from an XML node.
 
void refreshed()
Emitted when the layout has been refreshed and items should also be refreshed and updated.
 
@ AttributeTableSourceLayer
Attribute table source layer.
 
@ DateTime
DateTime value.
 
@ PictureSvgStrokeColor
SVG stroke color.
 
@ MapXMin
Map extent x minimum.
 
@ MapGridOffsetY
Map grid offset Y.
 
@ PictureSvgStrokeWidth
SVG stroke width.
 
@ String
Any string value.
 
@ BlendMode
Item blend mode.
 
@ MapYMin
Map extent y minimum.
 
@ Rotation
Rotation (value between 0-360 degrees)
 
QgsLayoutObject(QgsLayout *layout)
Constructor for QgsLayoutObject, with the specified parent layout.
 
@ PositionX
X position on page.
 
@ MapGridFrameMargin
Map grid frame margin.
 
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.
 
@ MapRotation
Map rotation.
 
@ ColorWithAlpha
Color with alpha channel.
 
@ MapGridIntervalX
Map grid interval X.
 
@ MapXMax
Map extent x maximum.
 
@ MapYMax
Map extent y maximum.
 
@ MapGridCrossSize
Map grid cross size.
 
void setValue(const QString &key, const QVariant &value)
Add an entry to the store with the specified key.
 
@ ExcludeFromExports
Exclude item from exports.
 
Definition for a property.
 
@ MapGridOffsetX
Map grid offset X.
 
void changed()
Emitted certain settings in the context is changed, e.g.
 
void setCustomProperty(const QString &key, const QVariant &value)
Set a custom property for the object.
 
@ ScalebarLineWidth
Scalebar line width (deprecated, use data defined properties on scalebar line symbol instead)
 
@ MapLabelMargin
Map label margin.
 
void remove(const QString &key)
Removes a key (entry) from the store.
 
@ PageNumber
Page number for item placement.
 
@ PaperHeight
Paper height (deprecated)
 
@ MapGridEnabled
Map grid enabled.
 
@ MapAtlasMargin
Map atlas margin.
 
@ IntegerPositive
Positive integer values (including 0)
 
QgsExpressionContext createExpressionContext() const override
Creates an expression context relating to the objects' current state.
 
@ LegendTitle
Legend title.
 
@ BackgroundColor
Item background color.
 
bool readObjectPropertiesFromElement(const QDomElement &parentElement, const QDomDocument &document, const QgsReadWriteContext &context)
Sets object properties from a DOM element.
 
@ 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.
 
QStringList keys() const
Returns a list of all stored keys.
 
@ MapGridLabelDistance
Map grid label distance.
 
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
Returns the value for the given key.
 
QStringList customProperties() const
Returns list of keys stored in custom properties for the object.
 
@ 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.
 
@ StrokeWidth
Line stroke width.
 
@ PictureSvgBackgroundColor
SVG background color.
 
bool writeObjectPropertiesToElement(QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context) const
Stores object properties within an XML DOM element.
 
void writeXml(QDomNode &parentNode, QDomDocument &doc) const
Writes the store contents to an XML node.
 
@ Transparency
Item transparency (deprecated)
 
virtual bool writeXml(QDomElement &collectionElem, const QgsPropertiesDefinition &definitions) const
Writes the current state of the property collection into an XML element.
 
@ PictureSource
Picture source url.
 
@ MapLayers
Map layer set.
 
@ ItemWidth
Width of item.
 
@ DoublePositive
Positive double value (including 0)
 
static const QgsPropertiesDefinition & propertyDefinitions()
Returns the layout object property definitions.