QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
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. | |
void | layerChanged (QgsVectorLayer *layer) |
Emitted when the context's layer is changed. | |
Public Member Functions | |
QgsLayoutReportContext (QgsLayout *layout) | |
Constructor for QgsLayoutReportContext. | |
QgsGeometry | currentGeometry (const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem()) const |
Returns the current feature() geometry in the given crs. | |
QgsFeature | feature () const |
Returns the current feature for evaluating the layout. | |
QgsVectorLayer * | layer () const |
Returns the vector layer associated with the layout's context. | |
Q_DECL_DEPRECATED QVector< qreal > | predefinedScales () const |
Returns the current list of predefined scales for use with the layout. | |
void | setFeature (const QgsFeature &feature) |
Sets the current feature for evaluating the layout. | |
void | setLayer (QgsVectorLayer *layer) |
Sets the vector layer associated with the layout's context. | |
Q_DECL_DEPRECATED void | setPredefinedScales (const QVector< qreal > &scales) |
Sets the list of predefined scales to use with the layout. | |
Friends | |
class | QgsLayoutExporter |
class | TestQgsLayout |
Stores information relating to the current reporting context for a layout.
Definition at line 31 of file qgslayoutreportcontext.h.
QgsLayoutReportContext::QgsLayoutReportContext | ( | QgsLayout * | layout | ) |
Constructor for QgsLayoutReportContext.
Definition at line 23 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 61 of file qgslayoutreportcontext.h.
QgsVectorLayer * QgsLayoutReportContext::layer | ( | ) | const |
Returns the vector layer associated with the layout's context.
Definition at line 67 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 102 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 28 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 72 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 79 of file qgslayoutreportcontext.cpp.
|
friend |
Definition at line 130 of file qgslayoutreportcontext.h.
|
friend |
Definition at line 131 of file qgslayoutreportcontext.h.