QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsfeaturestore.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsfeaturestore.h
3  --------------------------------------
4  Date : February 2013
5  Copyright : (C) 2013 by Radim Blazek
6  Email : [email protected]
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 #ifndef QGSFEATURESTORE_H
16 #define QGSFEATURESTORE_H
17 
18 #include "qgis.h"
19 #include "qgsfeature.h"
20 #include "qgsfield.h"
21 #include "qgslogger.h"
23 #include <QList>
24 #include <QMetaType>
25 #include <QVariant>
26 
30 class CORE_EXPORT QgsFeatureStore
31 {
32  public:
35 
37  QgsFeatureStore( const QgsFeatureStore &rhs );
38 
40  QgsFeatureStore( const QgsFields& fields, const QgsCoordinateReferenceSystem& crs );
41 
43  ~QgsFeatureStore();
44 
46  QgsFields& fields() { return mFields; }
47 
49  void setFields( const QgsFields & fields ) { mFields = fields; }
50 
52  QgsCoordinateReferenceSystem crs() const { return mCrs; }
53 
55  void setCrs( const QgsCoordinateReferenceSystem& crs ) { mCrs = crs; }
56 
58  QgsFeatureList& features() { return mFeatures; }
59 
61  void setParams( const QMap<QString, QVariant> &theParams ) { mParams = theParams; }
62 
64  QMap<QString, QVariant> params() const { return mParams; }
65 
66  private:
68 
70 
72 
73  // Optional parameters
74  QMap<QString, QVariant> mParams;
75 };
76 
77 typedef QList<QgsFeatureStore> QgsFeatureStoreList;
78 
80 
82 
83 #endif