QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
47 if ( featureCount > 0 )
64 QList< QgsGeometry > geoms;
QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest()) const FINAL
Queries the layer for features specified in request.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
QgsCoordinateReferenceSystem crs
void combineExtentWith(const QgsRectangle &rect)
Expands the rectangle so that it covers both the original rectangle and the given rectangle.
const QgsMapSettings & mapSettings() const
Gets access to properties used for map rendering.
void flashGeometries(const QList< QgsGeometry > &geometries, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem(), const QColor &startColor=QColor(255, 0, 0, 255), const QColor &endColor=QColor(255, 0, 0, 0), int flashes=3, int duration=500)
Causes a set of geometries to flash within the canvas.
QgsRectangle layerExtentToOutputExtent(const QgsMapLayer *layer, QgsRectangle extent) const
transform bounding box from layer's CRS to output CRS
static QList< QgsExpressionContextScope * > globalProjectLayerScopes(const QgsMapLayer *layer)
Creates a list of three scopes: global, layer's project and layer.
QgsFeatureRequest & setExpressionContext(const QgsExpressionContext &context)
Sets the expression context used to evaluate filter expressions.
static long zoomToMatchingFeatures(QgsMapCanvas *canvas, QgsVectorLayer *layer, const QString &filter)
Zooms a map canvas to features from the specified layer which match the given filter expression strin...
QgsFeatureRequest & setFilterExpression(const QString &expression)
Set the filter expression.
static long flashMatchingFeatures(QgsMapCanvas *canvas, QgsVectorLayer *layer, const QString &filter)
Flashes features from the specified layer which match the given filter expression string with a map c...
const QgsAbstractGeometry * constGet() const
Returns a non-modifiable (const) reference to the underlying abstract geometry primitive.
QgsFeatureRequest & setNoAttributes()
Set that no attributes will be fetched.
virtual bool isEmpty() const
Returns true if the geometry is empty.
void zoomToFeatureExtent(QgsRectangle &rect)
Zooms to feature extent.
bool nextFeature(QgsFeature &f)
bool hasGeometry() const
Returns true if the feature has an associated geometry.
QgsRectangle boundingBox() const
Returns the bounding box of the geometry.
void setMinimal()
Set a rectangle so that min corner is at max and max corner is at min.