QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
QgsFeatureStore Class Reference

Container for features with the same fields and crs. More...

#include <qgsfeaturestore.h>

Collaboration diagram for QgsFeatureStore:
Collaboration graph
[legend]

Public Member Functions

 QgsFeatureStore ()
 Constructor. More...
 
 QgsFeatureStore (const QgsFeatureStore &rhs)
 Constructor. More...
 
 QgsFeatureStore (const QgsFields &fields, const QgsCoordinateReferenceSystem &crs)
 Constructor. More...
 
 ~QgsFeatureStore ()
 Destructor. More...
 
QgsFieldsfields ()
 Get fields list. More...
 
void setFields (const QgsFields &fields)
 Set fields. More...
 
QgsCoordinateReferenceSystem crs () const
 Get crs. More...
 
void setCrs (const QgsCoordinateReferenceSystem &crs)
 Set crs. More...
 
void addFeature (const QgsFeature &feature)
 Add feature. More...
 
QgsFeatureListfeatures ()
 Get features list reference. More...
 
void setParams (const QMap< QString, QVariant > &theParams)
 Set map of optional parameters. More...
 
QMap< QString, QVariant > params () const
 Get map of optional parameters. More...
 

Private Attributes

QgsFields mFields
 
QgsCoordinateReferenceSystem mCrs
 
QgsFeatureList mFeatures
 
QMap< QString, QVariant > mParams
 

Detailed Description

Container for features with the same fields and crs.

Definition at line 30 of file qgsfeaturestore.h.

Constructor & Destructor Documentation

QgsFeatureStore::QgsFeatureStore ( )

Constructor.

Definition at line 18 of file qgsfeaturestore.cpp.

QgsFeatureStore::QgsFeatureStore ( const QgsFeatureStore rhs)

Constructor.

Definition at line 22 of file qgsfeaturestore.cpp.

QgsFeatureStore::QgsFeatureStore ( const QgsFields fields,
const QgsCoordinateReferenceSystem crs 
)

Constructor.

Definition at line 30 of file qgsfeaturestore.cpp.

QgsFeatureStore::~QgsFeatureStore ( )

Destructor.

Definition at line 36 of file qgsfeaturestore.cpp.

Member Function Documentation

void QgsFeatureStore::addFeature ( const QgsFeature feature)

Add feature.

Feature's fields will be set to pointer to the store fields.

Parameters
feature
Note
added in 2.1

Definition at line 49 of file qgsfeaturestore.cpp.

References mFeatures, mFields, and QgsFeature::setFields().

QgsCoordinateReferenceSystem QgsFeatureStore::crs ( ) const
inline

Get crs.

Definition at line 52 of file qgsfeaturestore.h.

QgsFeatureList& QgsFeatureStore::features ( )
inline

Get features list reference.

Definition at line 64 of file qgsfeaturestore.h.

Referenced by QgsMapToolIdentify::identifyRasterLayer().

QgsFields& QgsFeatureStore::fields ( )
inline

Get fields list.

Definition at line 46 of file qgsfeaturestore.h.

Referenced by QgsMapToolIdentify::identifyRasterLayer(), and setFields().

QMap<QString, QVariant> QgsFeatureStore::params ( ) const
inline

Get map of optional parameters.

Definition at line 70 of file qgsfeaturestore.h.

Referenced by QgsMapToolIdentify::identifyRasterLayer().

void QgsFeatureStore::setCrs ( const QgsCoordinateReferenceSystem crs)
inline

Set crs.

Definition at line 55 of file qgsfeaturestore.h.

void QgsFeatureStore::setFields ( const QgsFields fields)

Set fields.

Resets feauters fields to pointer to new internal fields.

Definition at line 40 of file qgsfeaturestore.cpp.

References fields(), mFeatures, mFields, and QgsFeature::setFields().

void QgsFeatureStore::setParams ( const QMap< QString, QVariant > &  theParams)
inline

Set map of optional parameters.

Definition at line 67 of file qgsfeaturestore.h.

Member Data Documentation

QgsCoordinateReferenceSystem QgsFeatureStore::mCrs
private

Definition at line 75 of file qgsfeaturestore.h.

QgsFeatureList QgsFeatureStore::mFeatures
private

Definition at line 77 of file qgsfeaturestore.h.

Referenced by addFeature(), and setFields().

QgsFields QgsFeatureStore::mFields
private

Definition at line 73 of file qgsfeaturestore.h.

Referenced by addFeature(), and setFields().

QMap<QString, QVariant> QgsFeatureStore::mParams
private

Definition at line 80 of file qgsfeaturestore.h.


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