QGIS API Documentation  master-6227475
src/core/qgsfeaturestore.h
Go to the documentation of this file.
00001 /***************************************************************************
00002      qgsfeaturestore.h
00003      --------------------------------------
00004     Date                 : February 2013
00005     Copyright            : (C) 2013 by Radim Blazek
00006     Email                : radim.blazek@gmail.com
00007  ***************************************************************************
00008  *                                                                         *
00009  *   This program is free software; you can redistribute it and/or modify  *
00010  *   it under the terms of the GNU General Public License as published by  *
00011  *   the Free Software Foundation; either version 2 of the License, or     *
00012  *   (at your option) any later version.                                   *
00013  *                                                                         *
00014  ***************************************************************************/
00015 #ifndef QGSFEATURESTORE_H
00016 #define QGSFEATURESTORE_H
00017 
00018 #include "qgis.h"
00019 #include "qgsfeature.h"
00020 #include "qgsfield.h"
00021 #include "qgslogger.h"
00022 #include "qgscoordinatereferencesystem.h"
00023 #include <QList>
00024 #include <QMetaType>
00025 #include <QVariant>
00026 
00030 class CORE_EXPORT QgsFeatureStore
00031 {
00032   public:
00034     QgsFeatureStore();
00035 
00037     QgsFeatureStore( const QgsFeatureStore &rhs );
00038 
00040     QgsFeatureStore( const QgsFields& fields, const QgsCoordinateReferenceSystem& crs );
00041 
00043     ~QgsFeatureStore();
00044 
00046     QgsFields& fields() { return mFields; }
00047 
00049     void setFields( const QgsFields & fields ) { mFields = fields; }
00050 
00052     QgsCoordinateReferenceSystem crs() const { return mCrs; }
00053 
00055     void setCrs( const QgsCoordinateReferenceSystem& crs ) { mCrs = crs; }
00056 
00058     QgsFeatureList& features() { return mFeatures; }
00059 
00061     void setParams( const QMap<QString, QVariant> &theParams ) { mParams = theParams; }
00062 
00064     QMap<QString, QVariant> params() const { return mParams; }
00065 
00066   private:
00067     QgsFields mFields;
00068 
00069     QgsCoordinateReferenceSystem mCrs;
00070 
00071     QgsFeatureList mFeatures;
00072 
00073     // Optional parameters
00074     QMap<QString, QVariant> mParams;
00075 };
00076 
00077 typedef QList<QgsFeatureStore> QgsFeatureStoreList;
00078 
00079 Q_DECLARE_METATYPE( QgsFeatureStore );
00080 
00081 Q_DECLARE_METATYPE( QgsFeatureStoreList );
00082 
00083 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines