Skip to content
Permalink
Browse files
PyQGIS fixes: added few typedefs (IIRC they were not supported by som…
…e old SIP versions) and added missing signals in QgsVectorLayer

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14978 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Dec 27, 2010
1 parent 3d7ecc7 commit eebdb4320ad24251b0b3b077d726617d67349f55
Showing with 33 additions and 1 deletion.
  1. +15 −0 python/core/qgsfeature.sip
  2. +16 −0 python/core/qgsvectorlayer.sip
  3. +2 −1 src/core/qgsvectorlayer.h
@@ -1,5 +1,20 @@


// key = field index, value = field value
typedef QMap<int, QVariant> QgsAttributeMap;

// key = feature id, value = changed attributes
typedef QMap<int, QMap<int, QVariant> > QgsChangedAttributesMap;

// key = feature id, value = changed geometry
typedef QMap<int, QgsGeometry> QgsGeometryMap;

// key = field index, value = field name
typedef QMap<int, QString> QgsFieldNameMap;

typedef QList<QgsFeature> QgsFeatureList;


class QgsFeature
{
%TypeHeaderCode
@@ -1,3 +1,9 @@

typedef QList<int> QgsAttributeList;
typedef QSet<int> QgsFeatureIds;
typedef QSet<int> QgsAttributeIds;


class QgsVectorLayer : QgsMapLayer
{
%TypeHeaderCode
@@ -574,6 +580,16 @@ signals:

void attributeValueChanged(int fid, int idx, const QVariant &);

/** Signals emitted after committing changes
\note added in v1.6 */
void committedAttributesDeleted( const QString& layerId, const QgsAttributeIds& deletedAttributeIds );
void committedAttributesAdded( const QString& layerId, const QList<QgsField>& addedAttributes );
void committedFeaturesAdded( const QString& layerId, const QgsFeatureList& addedFeatures );
void committedFeaturesRemoved( const QString& layerId, const QgsFeatureIds& deletedFeatureIds );
void committedAttributeValuesChanges( const QString& layerId, const QgsChangedAttributesMap& changedAttributesValues );
void committedGeometriesChanges( const QString& layerId, const QgsGeometryMap& changedGeometries );


private: // Private methods

/** vector layers are not copyable */
@@ -629,7 +629,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer

void attributeValueChanged( int fid, int idx, const QVariant & );

/** Signals emitted after committing changes */
/** Signals emitted after committing changes
\note added in v1.6 */
void committedAttributesDeleted( const QString& layerId, const QgsAttributeIds& deletedAttributeIds );
void committedAttributesAdded( const QString& layerId, const QList<QgsField>& addedAttributes );
void committedFeaturesAdded( const QString& layerId, const QgsFeatureList& addedFeatures );

0 comments on commit eebdb43

Please sign in to comment.