QGIS API Documentation  3.4.15-Madeira (e83d02e274)
Public Member Functions | Properties | List of all members
QgsQuickFeatureLayerPair Class Reference

Pair of QgsFeature and QgsVectorLayer. More...

#include <qgsquickfeaturelayerpair.h>

Public Member Functions

 QgsQuickFeatureLayerPair ()
 Constructs invalid feature-layer pair. More...
 
 QgsQuickFeatureLayerPair (const QgsFeature &feature, QgsVectorLayer *layer)
 Constructor of a new feature-layer pair. More...
 
QgsFeature feature () const
 Feature that belongs to layer. More...
 
QgsFeaturefeatureRef ()
 Feature that belongs to layer. More...
 
bool isValid () const
 Whether. More...
 
QgsVectorLayerlayer () const
 Vector layer to which the feature belongs. More...
 
bool operator!= (const QgsQuickFeatureLayerPair &other) const
 
bool operator== (const QgsQuickFeatureLayerPair &other) const
 

Properties

QgsFeature feature
 Feature that belongs to layer. More...
 
QgsVectorLayer layer
 Vector layer to which the feature belongs. More...
 
bool valid
 Whether. More...
 

Detailed Description

Pair of QgsFeature and QgsVectorLayer.

Vector layer is commonly used to gather geometry type or CRS for the feature.

Note that the feature may or may not be part of the layer's features

Note
QML Type: QgsQuickFeatureLayerPair
Since
QGIS 3.4

Definition at line 40 of file qgsquickfeaturelayerpair.h.

Constructor & Destructor Documentation

QgsQuickFeatureLayerPair::QgsQuickFeatureLayerPair ( )
default

Constructs invalid feature-layer pair.

QgsQuickFeatureLayerPair::QgsQuickFeatureLayerPair ( const QgsFeature feature,
QgsVectorLayer layer 
)

Constructor of a new feature-layer pair.

Parameters
featureQgsFeature associated.
layerVector layer which the feature belongs to

Definition at line 23 of file qgsquickfeaturelayerpair.cpp.

Member Function Documentation

QgsFeature QgsQuickFeatureLayerPair::feature ( ) const

Feature that belongs to layer.

This is a readonly property.

QgsFeature & QgsQuickFeatureLayerPair::featureRef ( )

Feature that belongs to layer.

This is a readonly property.

Definition at line 39 of file qgsquickfeaturelayerpair.cpp.

bool QgsQuickFeatureLayerPair::isValid ( ) const

Whether.

  • layer is not nullptr
  • feature is valid
  • feature has geometry and the geometry is the same as geometry expected by layer

This is a readonly property.

Definition at line 44 of file qgsquickfeaturelayerpair.cpp.

QgsVectorLayer* QgsQuickFeatureLayerPair::layer ( ) const

Vector layer to which the feature belongs.

May be nullptr if pair is not valid

This is a readonly property.

bool QgsQuickFeatureLayerPair::operator!= ( const QgsQuickFeatureLayerPair other) const

Definition at line 54 of file qgsquickfeaturelayerpair.cpp.

bool QgsQuickFeatureLayerPair::operator== ( const QgsQuickFeatureLayerPair other) const

Definition at line 49 of file qgsquickfeaturelayerpair.cpp.

Property Documentation

QgsFeature QgsQuickFeatureLayerPair::feature
read

Feature that belongs to layer.

This is a readonly property.

Definition at line 56 of file qgsquickfeaturelayerpair.h.

QgsVectorLayer * QgsQuickFeatureLayerPair::layer
read

Vector layer to which the feature belongs.

May be nullptr if pair is not valid

This is a readonly property.

Definition at line 49 of file qgsquickfeaturelayerpair.h.

bool QgsQuickFeatureLayerPair::valid
read

Whether.

  • layer is not nullptr
  • feature is valid
  • feature has geometry and the geometry is the same as geometry expected by layer

This is a readonly property.

Definition at line 66 of file qgsquickfeaturelayerpair.h.


The documentation for this class was generated from the following files: