29 mGeometryCache.clear();
46 if ( mLayer->crs() == crs )
52 auto it = mGeometryCache.constFind( crs.
srsid() );
53 if ( it != mGeometryCache.constEnd() )
61 mGeometryCache[crs.
srsid()] = transformed;
79 mPredefinedScales = scales;
81 std::sort( mPredefinedScales.begin(), mPredefinedScales.end() );
bool isValid() const
Returns the validity of this feature.
QgsGeometry currentGeometry(const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem()) const
Returns the current feature() geometry in the given crs.
void changed()
Emitted certain settings in the context is changed, e.g.
A geometry is the spatial representation of a feature.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
bool hasGeometry() const
Returns true if the feature has an associated geometry.
void setPredefinedScales(const QVector< qreal > &scales)
Sets the list of predefined scales to use with the layout.
QgsVectorLayer * layer() const
Returns the vector layer associated with the layout's context.
void setLayer(QgsVectorLayer *layer)
Sets the vector layer associated with the layout's context.
QgsLayoutReportContext(QgsLayout *layout)
Constructor for QgsLayoutReportContext.
void layerChanged(QgsVectorLayer *layer)
Emitted when the context's layer is changed.
QgsGeometry geometry() const
Returns the geometry associated with this feature.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
OperationResult transform(const QgsCoordinateTransform &ct, QgsCoordinateTransform::TransformDirection direction=QgsCoordinateTransform::ForwardTransform, bool transformZ=false)
Transforms this geometry as described by the coordinate transform ct.
This class represents a coordinate reference system (CRS).
QgsProject * project() const
The project associated with the layout.
QgsFeature feature() const
Returns the current feature for evaluating the layout.
long srsid() const
Returns the internal CRS ID, if available.
Represents a vector layer which manages a vector based data sets.
void setFeature(const QgsFeature &feature)
Sets the current feature for evaluating the layout.
bool isValid() const
Returns whether this CRS is correctly initialized and usable.