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