QGIS API Documentation
3.6.0-Noosa (5873452)
|
Stores information relating to the current reporting context for a layout. More...
#include <qgslayoutreportcontext.h>
Signals | |
void | changed () |
Emitted certain settings in the context is changed, e.g. More... | |
void | layerChanged (QgsVectorLayer *layer) |
Emitted when the context's layer is changed. More... | |
Public Member Functions | |
QgsLayoutReportContext (QgsLayout *layout) | |
Constructor for QgsLayoutReportContext. More... | |
QgsGeometry | currentGeometry (const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem()) const |
Returns the current feature() geometry in the given crs. More... | |
QgsFeature | feature () const |
Returns the current feature for evaluating the layout. More... | |
QgsVectorLayer * | layer () const |
Returns the vector layer associated with the layout's context. More... | |
QVector< qreal > | predefinedScales () const |
Returns the current list of predefined scales for use with the layout. More... | |
void | setFeature (const QgsFeature &feature) |
Sets the current feature for evaluating the layout. More... | |
void | setLayer (QgsVectorLayer *layer) |
Sets the vector layer associated with the layout's context. More... | |
void | setPredefinedScales (const QVector< qreal > &scales) |
Sets the list of predefined scales to use with the layout. More... | |
Friends | |
class | QgsLayoutExporter |
class | TestQgsLayout |
Stores information relating to the current reporting context for a layout.
Definition at line 32 of file qgslayoutreportcontext.h.
QgsLayoutReportContext::QgsLayoutReportContext | ( | QgsLayout * | layout | ) |
Constructor for QgsLayoutReportContext.
Definition at line 22 of file qgslayoutreportcontext.cpp.
|
signal |
Emitted certain settings in the context is changed, e.g.
by setting a new feature or vector layer for the context.
QgsGeometry QgsLayoutReportContext::currentGeometry | ( | const QgsCoordinateReferenceSystem & | crs = QgsCoordinateReferenceSystem() | ) | const |
|
inline |
Returns the current feature for evaluating the layout.
This feature may be used for altering an item's content and appearance for a report or atlas layout.
Definition at line 62 of file qgslayoutreportcontext.h.
QgsVectorLayer * QgsLayoutReportContext::layer | ( | ) | const |
Returns the vector layer associated with the layout's context.
Definition at line 66 of file qgslayoutreportcontext.cpp.
|
signal |
Emitted when the context's layer is changed.
|
inline |
Returns the current list of predefined scales for use with the layout.
Definition at line 101 of file qgslayoutreportcontext.h.
void QgsLayoutReportContext::setFeature | ( | const QgsFeature & | feature | ) |
Sets the current feature for evaluating the layout.
This feature may be used for altering an item's content and appearance for a report or atlas layout.
Emits the changed() signal.
Definition at line 27 of file qgslayoutreportcontext.cpp.
void QgsLayoutReportContext::setLayer | ( | QgsVectorLayer * | layer | ) |
Sets the vector layer associated with the layout's context.
Emits the changed() signal.
Definition at line 71 of file qgslayoutreportcontext.cpp.
void QgsLayoutReportContext::setPredefinedScales | ( | const QVector< qreal > & | scales | ) |
Sets the list of predefined scales to use with the layout.
This is used for maps which are set to the predefined atlas scaling mode.
Definition at line 78 of file qgslayoutreportcontext.cpp.
|
friend |
Definition at line 129 of file qgslayoutreportcontext.h.
|
friend |
Definition at line 130 of file qgslayoutreportcontext.h.