|
QGIS API Documentation
2.6.0-Brighton
|
A base class for objects which belong to a map composition. More...
#include <qgscomposerobject.h>

Public Types | |
| enum | DataDefinedProperty { NoProperty = 0, AllProperties, TestProperty, PresetPaperSize, PaperWidth, PaperHeight, NumPages, PaperOrientation, PageNumber, PositionX, PositionY, ItemWidth, ItemHeight, ItemRotation, Transparency, BlendMode, ExcludeFromExports, MapRotation, MapScale, MapXMin, MapYMin, MapXMax, MapYMax, MapAtlasMargin, PictureSource, SourceUrl } |
| Data defined properties for different item types. More... | |
| enum | PropertyValueType { EvaluatedValue = 0, OriginalValue } |
| Specifies whether the value returned by a function should be the original, user set value, or the current evaluated value for the property. More... | |
Public Slots | |
| virtual void | repaint () |
| Triggers a redraw for the item. | |
| virtual void | refreshDataDefinedProperty (const DataDefinedProperty property=AllProperties) |
| Refreshes a data defined property for the item by reevaluating the property's value and redrawing the item with this new value. | |
Signals | |
| void | itemChanged () |
| Emitted when the item changes. | |
Public Member Functions | |
| QgsComposerObject (QgsComposition *composition) | |
| Constructor. | |
| virtual | ~QgsComposerObject () |
| const QgsComposition * | composition () const |
| Returns the composition the item is attached to. | |
| QgsComposition * | composition () |
| virtual bool | writeXML (QDomElement &elem, QDomDocument &doc) const |
| Stores item state in DOM element. | |
| virtual bool | readXML (const QDomElement &itemElem, const QDomDocument &doc) |
| Sets item state from DOM element. | |
| QgsDataDefined * | dataDefinedProperty (const DataDefinedProperty property) const |
| Returns a reference to the data defined settings for one of the item's data defined properties. | |
| void | setDataDefinedProperty (const DataDefinedProperty property, const bool active, const bool useExpression, const QString &expression, const QString &field) |
| Sets parameters for a data defined property for the item. | |
Protected Member Functions | |
| bool | dataDefinedEvaluate (const QgsComposerObject::DataDefinedProperty property, QVariant &expressionValue) |
| Evaluate a data defined property and return the calculated value. | |
Protected Attributes | |
| QgsComposition * | mComposition |
| QMap < QgsComposerObject::DataDefinedProperty, QString > | mDataDefinedNames |
| Map of data defined properties for the item to string name to use when exporting item to xml. | |
Friends | |
| class | TestQgsComposerObject |
A base class for objects which belong to a map composition.
Data defined properties for different item types.
| QgsComposerObject::QgsComposerObject | ( | QgsComposition * | composition | ) |
Constructor.
| composition | parent composition |
|
virtual |
|
inline |
Returns the composition the item is attached to.
|
inline |
Reimplemented in QgsComposerMultiFrame.
|
protected |
Evaluate a data defined property and return the calculated value.
| property | data defined property to evaluate |
| expressionValue | QVariant for storing the evaluated value |
| QgsDataDefined * QgsComposerObject::dataDefinedProperty | ( | const DataDefinedProperty | property | ) | const |
Returns a reference to the data defined settings for one of the item's data defined properties.
| property | data defined property to return |
|
signal |
Emitted when the item changes.
Signifies that the item widgets must update the gui elements.
|
virtual |
Sets item state from DOM element.
| itemElem | is DOM node corresponding to item tag |
| doc | is DOM document |
Reimplemented in QgsComposerMap, QgsComposerMapGrid, QgsComposerScaleBar, QgsComposerArrow, QgsComposerLegend, QgsComposerMapOverview, QgsComposerPicture, QgsComposerLabel, QgsComposerAttributeTable, QgsPaperItem, QgsComposerItemGroup, QgsComposerMapItem, QgsComposerShape, QgsComposerTextTable, QgsComposerFrame, and QgsComposerTable.
|
virtualslot |
Refreshes a data defined property for the item by reevaluating the property's value and redrawing the item with this new value.
| property | data defined property to refresh. If property is set to QgsComposerItem::AllProperties then all data defined properties for the item will be refreshed. |
|
virtualslot |
Triggers a redraw for the item.
| void QgsComposerObject::setDataDefinedProperty | ( | const DataDefinedProperty | property, |
| const bool | active, | ||
| const bool | useExpression, | ||
| const QString & | expression, | ||
| const QString & | field | ||
| ) |
Sets parameters for a data defined property for the item.
| property | data defined property to set |
| active | true if data defined property is active, false if it is disabled |
| useExpression | true if the expression should be used |
| expression | expression for data defined property |
| field | field name if the data defined property should take its value from a field |
|
virtual |
Stores item state in DOM element.
| elem | is DOM element corresponding to item tag |
| doc | is the DOM document |
Reimplemented in QgsComposerMap, QgsComposerMapGrid, QgsComposerScaleBar, QgsComposerArrow, QgsComposerLegend, QgsComposerMapOverview, QgsComposerPicture, QgsComposerLabel, QgsComposerAttributeTable, QgsPaperItem, QgsComposerFrame, QgsComposerTable, QgsComposerItemGroup, QgsComposerShape, QgsComposerMapItem, and QgsComposerTextTable.
|
friend |
|
protected |
|
protected |
Map of data defined properties for the item to string name to use when exporting item to xml.
1.8.1.2