QGIS/python/core/layout/qgslayoutobject.sip

168 lines
4.5 KiB
Plaintext
Raw Normal View History

2017-06-30 17:01:52 +10:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutobject.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsLayoutObject: QObject
{
%Docstring
A base class for objects which belong to a layout.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgslayoutobject.h"
%End
public:
enum DataDefinedProperty
{
NoProperty,
AllProperties,
TestProperty,
//composer
PresetPaperSize,
PaperWidth,
PaperHeight,
NumPages,
PaperOrientation,
//general
PageNumber,
PositionX,
PositionY,
ItemWidth,
ItemHeight,
ItemRotation,
Transparency,
Opacity,
BlendMode,
ExcludeFromExports,
FrameColor,
BackgroundColor,
//composer
MapRotation,
MapScale,
MapXMin,
MapYMin,
MapXMax,
MapYMax,
MapAtlasMargin,
MapLayers,
MapStylePreset,
//composer
PictureSource,
PictureSvgBackgroundColor,
PictureSvgStrokeColor,
PictureSvgStrokeWidth,
//html
SourceUrl,
//legend
LegendTitle,
LegendColumnCount,
//scalebar
ScalebarFillColor,
ScalebarFillColor2,
ScalebarLineColor,
ScalebarLineWidth,
};
static const QgsPropertiesDefinition &propertyDefinitions();
%Docstring
Returns the layout object property definitions.
:rtype: QgsPropertiesDefinition
%End
2017-06-30 17:01:52 +10:00
QgsLayoutObject( QgsLayout *layout );
%Docstring
Constructor for QgsLayoutObject, with the specified parent ``layout``.
.. note::
While ownership of a QgsLayoutObject is not passed to the layout,
classes which are derived from QgsLayoutObject (such as QgsLayoutItem)
may transfer their ownership to a layout upon construction.
%End
QgsLayout *layout();
%Docstring
Returns the layout the object is attached to.
:rtype: QgsLayout
%End
QgsPropertyCollection &dataDefinedProperties();
%Docstring
Returns a reference to the object's property collection, used for data defined overrides.
.. seealso:: setDataDefinedProperties()
:rtype: QgsPropertyCollection
%End
void setDataDefinedProperties( const QgsPropertyCollection &collection );
%Docstring
Sets the objects's property collection, used for data defined overrides.
\param collection property collection. Existing properties will be replaced.
.. seealso:: dataDefinedProperties()
%End
void setCustomProperty( const QString &key, const QVariant &value );
%Docstring
Set a custom property for the object.
\param key property key. If a property with the same key already exists it will be overwritten.
\param value property value
.. seealso:: customProperty()
.. seealso:: removeCustomProperty()
.. seealso:: customProperties()
%End
QVariant customProperty( const QString &key, const QVariant &defaultValue = QVariant() ) const;
%Docstring
Read a custom property from the object.
\param key property key
\param defaultValue default value to return if property with matching key does not exist
:return: value of matching property
.. seealso:: setCustomProperty()
.. seealso:: removeCustomProperty()
.. seealso:: customProperties()
:rtype: QVariant
%End
void removeCustomProperty( const QString &key );
%Docstring
Remove a custom property from the object.
\param key property key
.. seealso:: setCustomProperty()
.. seealso:: customProperty()
.. seealso:: customProperties()
%End
QStringList customProperties() const;
%Docstring
Return list of keys stored in custom properties for the object.
.. seealso:: setCustomProperty()
.. seealso:: customProperty()
.. seealso:: removeCustomProperty()
:rtype: list of str
%End
2017-06-30 17:01:52 +10:00
protected:
2017-06-30 17:01:52 +10:00
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutobject.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/