QGIS API Documentation  2.9.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsvectorlayer.h
Go to the documentation of this file.
1 
2 /***************************************************************************
3  qgsvectorlayer.h - description
4  -------------------
5  begin : Oct 29, 2003
6  copyright : (C) 2003 by Gary E.Sherman
7  email : sherman at mrcc.com
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 
19 #ifndef QGSVECTORLAYER_H
20 #define QGSVECTORLAYER_H
21 
22 #include <QMap>
23 #include <QSet>
24 #include <QList>
25 #include <QStringList>
26 
27 #include "qgis.h"
28 #include "qgsmaplayer.h"
29 #include "qgsfeature.h"
30 #include "qgsfeatureiterator.h"
31 #include "qgseditorwidgetconfig.h"
32 #include "qgsfield.h"
33 #include "qgssnapper.h"
34 #include "qgsrelation.h"
36 
37 class QPainter;
38 class QImage;
39 
41 class QgsAttributeAction;
48 class QgsFeatureRequest;
49 class QgsGeometry;
50 class QgsGeometryCache;
51 class QgsGeometryVertexIndex;
52 class QgsLabel;
53 class QgsMapToPixel;
54 class QgsRectangle;
55 class QgsRectangle;
56 class QgsRelation;
57 class QgsRelationManager;
59 class QgsSymbolV2;
63 
64 typedef QList<int> QgsAttributeList;
65 typedef QSet<int> QgsAttributeIds;
66 
67 class CORE_EXPORT QgsAttributeEditorElement : public QObject
68 {
69  Q_OBJECT
70  public:
71 
73  {
77  AeTypeInvalid
78  };
79 
80  QgsAttributeEditorElement( AttributeEditorType type, QString name, QObject *parent = NULL )
81  : QObject( parent ), mType( type ), mName( name ) {}
82 
84 
85  QString name() const { return mName; }
86  AttributeEditorType type() const { return mType; }
87 
88  virtual QDomElement toDomElement( QDomDocument& doc ) const = 0;
89 
90  protected:
92  QString mName;
93 };
94 
96 {
97  public:
98  QgsAttributeEditorContainer( QString name, QObject *parent )
99  : QgsAttributeEditorElement( AeTypeContainer, name, parent )
100  , mIsGroupBox( true )
101  {}
102 
104 
105  virtual QDomElement toDomElement( QDomDocument& doc ) const override;
106  virtual void addChildElement( QgsAttributeEditorElement *widget );
107  virtual void setIsGroupBox( bool isGroupBox ) { mIsGroupBox = isGroupBox; }
108  virtual bool isGroupBox() const { return mIsGroupBox; }
109  QList<QgsAttributeEditorElement*> children() const { return mChildren; }
110  virtual QList<QgsAttributeEditorElement*> findElements( AttributeEditorType type ) const;
111 
112  private:
113  bool mIsGroupBox;
114  QList<QgsAttributeEditorElement*> mChildren;
115 };
116 
117 
119 {
120  public:
121  QgsAttributeEditorField( QString name, int idx, QObject *parent )
122  : QgsAttributeEditorElement( AeTypeField, name, parent ), mIdx( idx ) {}
123 
125 
126  virtual QDomElement toDomElement( QDomDocument& doc ) const override;
127  int idx() const { return mIdx; }
128 
129  private:
130  int mIdx;
131 };
132 
135 {
136  public:
137  QgsAttributeEditorRelation( QString name, const QString &relationId, QObject *parent )
138  : QgsAttributeEditorElement( AeTypeRelation, name, parent )
139  , mRelationId( relationId ) {}
140 
141  QgsAttributeEditorRelation( QString name, const QgsRelation& relation, QObject *parent )
142  : QgsAttributeEditorElement( AeTypeRelation, name, parent )
143  , mRelationId( relation.id() )
144  , mRelation( relation ) {}
145 
147 
148  virtual QDomElement toDomElement( QDomDocument& doc ) const override;
149  const QgsRelation& relation() const { return mRelation; }
150 
157  bool init( QgsRelationManager *relManager );
158 
159  private:
160  QString mRelationId;
161  QgsRelation mRelation;
162 };
163 
164 
165 struct CORE_EXPORT QgsVectorJoinInfo
166 {
170  QString joinLayerId;
172  QString joinFieldName;
178  QHash< QString, QgsAttributes> cachedAttributes;
179 
184 
188  QString prefix;
189 
190  bool operator==( const QgsVectorJoinInfo& other ) const
191  {
192  return targetFieldName == other.targetFieldName &&
193  joinLayerId == other.joinLayerId &&
194  joinFieldName == other.joinFieldName &&
195  joinFieldsSubset == other.joinFieldsSubset &&
196  memoryCache == other.memoryCache &&
197  prefix == other.prefix;
198  }
199 
202  void setJoinFieldNamesSubset( QStringList* fieldNamesSubset ) { joinFieldsSubset = QSharedPointer<QStringList>( fieldNamesSubset ); }
205  QStringList* joinFieldNamesSubset() const { return joinFieldsSubset.data(); }
206 
207 protected:
209  QSharedPointer<QStringList> joinFieldsSubset;
210 };
211 
474 class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
475 {
476  Q_OBJECT
477 
478  public:
481  {
482  GeneratedLayout = 0,
483  TabLayout = 1,
484  UiFileLayout = 2
485  };
486 
490  enum EditType
491  {
513  };
514 
518  {
519  SuppressDefault = 0, // use the application-wide setting
520  SuppressOn = 1,
521  SuppressOff = 2
522  };
523 
524  struct RangeData
525  {
526  RangeData() { mMin = QVariant( 0 ); mMax = QVariant( 5 ); mStep = QVariant( 1 );}
527  RangeData( QVariant theMin, QVariant theMax, QVariant theStep )
528  : mMin( theMin ), mMax( theMax ), mStep( theStep ) {}
529 
530  QVariant mMin;
531  QVariant mMax;
532  QVariant mStep;
533  };
534 
536  {
537  ValueRelationData() : mAllowNull( false ), mOrderByValue( false ), mAllowMulti( false ) {}
538  ValueRelationData( QString layer, QString key, QString value, bool allowNull, bool orderByValue,
539  bool allowMulti = false,
540  QString filterExpression = QString::null )
541  : mLayer( layer )
542  , mKey( key )
543  , mValue( value )
544  , mFilterExpression( filterExpression )
545  , mAllowNull( allowNull )
546  , mOrderByValue( orderByValue )
547  , mAllowMulti( allowMulti )
548  {}
549 
550  QString mLayer;
551  QString mKey;
552  QString mValue;
556  bool mAllowMulti; /* allow selection of multiple keys */
557  };
558 
559  struct GroupData
560  {
562  GroupData( QString name, QList<QString> fields )
563  : mName( name ), mFields( fields ) {}
564  QString mName;
565  QList<QString> mFields;
566  };
567 
568  struct TabData
569  {
570  TabData() {}
571  TabData( QString name, QList<QString> fields, QList<GroupData> groups )
572  : mName( name ), mFields( fields ), mGroups( groups ) {}
573  QString mName;
574  QList<QString> mFields;
575  QList<GroupData> mGroups;
576  };
577 
591  QgsVectorLayer( QString path = QString::null, QString baseName = QString::null,
592  QString providerLib = QString::null, bool loadDefaultStyleFlag = true );
593 
595  virtual ~QgsVectorLayer();
596 
598  QString storageType() const;
599 
601  QString capabilitiesString() const;
602 
604  QString dataComment() const;
605 
607  void setDisplayField( QString fldName = "" );
608 
610  const QString displayField() const;
611 
618  void setDisplayExpression( const QString &displayExpression );
619 
626  const QString displayExpression();
627 
629  QgsVectorDataProvider* dataProvider();
630 
634  const QgsVectorDataProvider* dataProvider() const;
635 
637  void setProviderEncoding( const QString& encoding );
638 
640  void setCoordinateSystem();
641 
645  bool addJoin( const QgsVectorJoinInfo& joinInfo );
646 
648  void removeJoin( const QString& joinLayerId );
649 
650  const QList< QgsVectorJoinInfo >& vectorJoins() const;
651 
662  int addExpressionField( const QString& exp, const QgsField& fld );
663 
671  void removeExpressionField( int index );
672 
682  const QString expressionField( int index );
683 
693  void updateExpressionField( int index, const QString& exp );
694 
696  QgsLabel *label();
697 
698  const QgsLabel *label() const;
699 
700  QgsAttributeAction *actions() { return mActions; }
701 
707  int selectedFeatureCount();
708 
717  void select( QgsRectangle & rect, bool addToSelection );
718 
730  void modifySelection( QgsFeatureIds selectIds, QgsFeatureIds deselectIds );
731 
733  void invertSelection();
734 
736  void selectAll();
737 
739  QgsFeatureIds allFeatureIds();
740 
748  void invertSelectionInRectangle( QgsRectangle & rect );
749 
758  QgsFeatureList selectedFeatures();
759 
771  QgsFeatureIterator selectedFeaturesIterator( QgsFeatureRequest request = QgsFeatureRequest() );
772 
779  const QgsFeatureIds &selectedFeaturesIds() const;
780 
788  void setSelectedFeatures( const QgsFeatureIds &ids );
789 
791  QgsRectangle boundingBoxOfSelected();
792 
797  bool labelsEnabled() const;
798 
803  bool diagramsEnabled() const;
804 
806  void setDiagramRenderer( QgsDiagramRendererV2* r );
807  const QgsDiagramRendererV2* diagramRenderer() const { return mDiagramRenderer; }
808 
809  void setDiagramLayerSettings( const QgsDiagramLayerSettings& s );
810  const QgsDiagramLayerSettings *diagramLayerSettings() const { return mDiagramLayerSettings; }
811 
813  QgsFeatureRendererV2* rendererV2();
815  void setRendererV2( QgsFeatureRendererV2* r );
816 
818  QGis::GeometryType geometryType() const;
819 
821  bool hasGeometryType() const;
822 
824  QGis::WkbType wkbType() const;
825 
827  QString providerType() const;
828 
832  virtual bool readXml( const QDomNode& layer_node ) override;
833 
837  virtual bool writeXml( QDomNode & layer_node, QDomDocument & doc ) override;
838 
847  virtual void saveStyleToDatabase( QString name, QString description,
848  bool useAsDefault, QString uiFileContent,
849  QString &msgError );
850 
859  virtual int listStylesInDatabase( QStringList &ids, QStringList &names,
860  QStringList &descriptions, QString &msgError );
861 
865  virtual QString getStyleFromDatabase( QString styleId, QString &msgError );
866 
873  virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag, bool loadFromLocalDb );
874 
879  virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag ) override;
880 
891  virtual bool applyNamedStyle( QString namedStyle, QString &errorMsg );
892 
897  QgsAttributeEditorElement* attributeEditorElementFromDomElement( QDomElement &elem, QObject* parent );
898 
904  bool readSymbology( const QDomNode& node, QString& errorMessage ) override;
905 
912  bool writeSymbology( QDomNode& node, QDomDocument& doc, QString& errorMessage ) const override;
913 
914  bool writeSld( QDomNode& node, QDomDocument& doc, QString& errorMessage ) const;
915  bool readSld( const QDomNode& node, QString& errorMessage ) override;
916 
924  virtual long featureCount() const;
925 
932  long featureCount( QgsSymbolV2* symbol );
933 
937  void setDataSource( QString dataSource, QString baseName, QString provider , bool loadDefaultStyleFlag = false );
938 
944  bool countSymbolFeatures( bool showProgress = true );
945 
953  virtual bool setSubsetString( QString subset );
954 
959  virtual QString subsetString();
960 
964  QgsFeatureIterator getFeatures( const QgsFeatureRequest& request = QgsFeatureRequest() );
965 
971  bool addFeature( QgsFeature& f, bool alsoUpdateExtent = true );
972 
979  bool updateFeature( QgsFeature &f );
980 
985  bool insertVertex( double x, double y, QgsFeatureId atFeatureId, int beforeVertex );
986 
991  bool moveVertex( double x, double y, QgsFeatureId atFeatureId, int atVertex );
992 
995  bool deleteVertex( QgsFeatureId atFeatureId, int atVertex );
996 
1000  bool deleteSelectedFeatures( int *deletedCount = 0 );
1001 
1011  int addRing( const QList<QgsPoint>& ring );
1012 
1023  int addPart( const QList<QgsPoint>& ring );
1024 
1030  int translateFeature( QgsFeatureId featureId, double dx, double dy );
1031 
1039  int splitParts( const QList<QgsPoint>& splitLine, bool topologicalEditing = false );
1040 
1048  int splitFeatures( const QList<QgsPoint>& splitLine, bool topologicalEditing = false );
1049 
1058  Q_DECL_DEPRECATED int removePolygonIntersections( QgsGeometry* geom, QgsFeatureIds ignoreFeatures = QgsFeatureIds() );
1059 
1065  int addTopologicalPoints( const QgsGeometry* geom );
1066 
1074  int addTopologicalPoints( const QgsPoint& p );
1075 
1081  int insertSegmentVerticesForSnap( const QList<QgsSnappingResult>& snapResults );
1082 
1086  Q_DECL_DEPRECATED void enableLabels( bool on );
1087 
1091  Q_DECL_DEPRECATED bool hasLabelsEnabled() const;
1092 
1094  virtual bool isEditable() const override;
1095 
1097  virtual bool isReadOnly() const;
1098 
1100  virtual bool isModified() const;
1101 
1108  bool snapPoint( QgsPoint& point, double tolerance );
1109 
1117  int snapWithContext( const QgsPoint& startPoint,
1118  double snappingTolerance,
1119  QMultiMap < double, QgsSnappingResult > &snappingResults,
1120  QgsSnapper::SnappingType snap_to );
1121 
1123  virtual void reload() override;
1124 
1128  virtual QgsMapLayerRenderer* createMapRenderer( QgsRenderContext& rendererContext ) override;
1129 
1133  bool draw( QgsRenderContext& rendererContext ) override;
1134 
1138  Q_DECL_DEPRECATED void drawLabels( QgsRenderContext& rendererContext ) override;
1139 
1141  QgsRectangle extent() override;
1142 
1144  const QgsFields &pendingFields() const;
1145 
1147  QgsAttributeList pendingAllAttributesList();
1148 
1150  QgsAttributeList pendingPkAttributesList();
1151 
1153  int pendingFeatureCount();
1154 
1158  bool setReadOnly( bool readonly = true );
1159 
1161  bool startEditing();
1162 
1164  bool changeGeometry( QgsFeatureId fid, QgsGeometry* geom );
1165 
1172  Q_DECL_DEPRECATED bool changeAttributeValue( QgsFeatureId fid, int field, QVariant value, bool emitSignal );
1173 
1184  bool changeAttributeValue( QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue = QVariant() );
1185 
1188  bool addAttribute( const QgsField &field );
1189 
1191  void addAttributeAlias( int attIndex, QString aliasString );
1192 
1194  void remAttributeAlias( int attIndex );
1195 
1199  void addAttributeEditorWidget( QgsAttributeEditorElement* data );
1200 
1208  const QString editorWidgetV2( int fieldIdx ) const;
1209 
1219  const QString editorWidgetV2( const QString& fieldName ) const;
1220 
1228  const QgsEditorWidgetConfig editorWidgetV2Config( int fieldIdx ) const;
1229 
1239  const QgsEditorWidgetConfig editorWidgetV2Config( const QString& fieldName ) const;
1240 
1244  QList< QgsAttributeEditorElement* > &attributeEditorElements();
1248  void clearAttributeEditorWidgets();
1249 
1251  QString attributeAlias( int attributeIndex ) const;
1252 
1254  QString attributeDisplayName( int attributeIndex ) const;
1255 
1256  const QMap< QString, QString >& attributeAliases() const { return mAttributeAliasMap; }
1257 
1258  const QSet<QString>& excludeAttributesWMS() const { return mExcludeAttributesWMS; }
1259  void setExcludeAttributesWMS( const QSet<QString>& att ) { mExcludeAttributesWMS = att; }
1260 
1261  const QSet<QString>& excludeAttributesWFS() const { return mExcludeAttributesWFS; }
1262  void setExcludeAttributesWFS( const QSet<QString>& att ) { mExcludeAttributesWFS = att; }
1263 
1265  bool deleteAttribute( int attr );
1266 
1274  bool deleteAttributes( QList<int> attrs );
1275 
1277  bool addFeatures( QgsFeatureList features, bool makeSelected = true );
1278 
1280  bool deleteFeature( QgsFeatureId fid );
1281 
1297  bool commitChanges();
1298  const QStringList &commitErrors();
1299 
1303  bool rollBack( bool deleteBuffer = true );
1304 
1310  Q_DECL_DEPRECATED EditType editType( int idx );
1311 
1317  Q_DECL_DEPRECATED void setEditType( int idx, EditType edit );
1318 
1320  EditorLayout editorLayout();
1321 
1323  void setEditorLayout( EditorLayout editorLayout );
1324 
1353  void setEditorWidgetV2( int attrIdx, const QString& widgetType );
1354 
1370  void setEditorWidgetV2Config( int attrIdx, const QgsEditorWidgetConfig& config );
1371 
1377  Q_DECL_DEPRECATED void setCheckedState( int idx, QString checked, QString notChecked );
1378 
1380  QString editForm();
1381 
1383  void setEditForm( QString ui );
1384 
1387  QgsVectorLayer::FeatureFormSuppress featureFormSuppress() const { return mFeatureFormSuppress; }
1388 
1391  void setFeatureFormSuppress( QgsVectorLayer::FeatureFormSuppress s ) { mFeatureFormSuppress = s; }
1392 
1394  QString annotationForm() const { return mAnnotationForm; }
1395 
1397  void setAnnotationForm( const QString& ui );
1398 
1400  QString editFormInit();
1401 
1403  void setEditFormInit( QString function );
1404 
1409  Q_DECL_DEPRECATED QMap<QString, QVariant> valueMap( int idx );
1410 
1416  Q_DECL_DEPRECATED RangeData range( int idx );
1417 
1419  ValueRelationData valueRelation( int idx );
1420 
1427  QList<QgsRelation> referencingRelations( int idx );
1428 
1434  Q_DECL_DEPRECATED QString dateFormat( int idx );
1435 
1441  Q_DECL_DEPRECATED QSize widgetSize( int idx );
1442 
1444  bool fieldEditable( int idx );
1445 
1447  bool labelOnTop( int idx );
1448 
1450  void setFieldEditable( int idx, bool editable );
1451 
1453  void setLabelOnTop( int idx, bool onTop );
1454 
1456  QgsVectorLayerEditBuffer* editBuffer() { return mEditBuffer; }
1457 
1462  void beginEditCommand( QString text );
1463 
1465  void endEditCommand();
1466 
1468  void destroyEditCommand();
1469 
1471  int fieldNameIndex( const QString& fieldName ) const;
1472 
1475  {
1478  NoMarker
1479  };
1480 
1482  static void drawVertexMarker( double x, double y, QPainter& p, QgsVectorLayer::VertexMarkerType type, int vertexSize );
1483 
1485  void updateFields();
1486 
1488  void createJoinCaches();
1489 
1494  void uniqueValues( int index, QList<QVariant> &uniqueValues, int limit = -1 );
1495 
1497  QVariant minimumValue( int index );
1498 
1500  QVariant maximumValue( int index );
1501 
1510  QList< QVariant > getValues( const QString &fieldOrExpression, bool &ok, bool selectedOnly = false );
1511 
1522  QList< double > getDoubleValues( const QString &fieldOrExpression, bool &ok, bool selectedOnly = false, int* nullCount = 0 );
1523 
1525  void setFeatureBlendMode( const QPainter::CompositionMode &blendMode );
1527  QPainter::CompositionMode featureBlendMode() const;
1528 
1530  void setLayerTransparency( int layerTransparency );
1532  int layerTransparency() const;
1533 
1534  QString metadata() override;
1535 
1537  inline QgsGeometryCache* cache() { return mCache; }
1538 
1542  void setSimplifyMethod( const QgsVectorSimplifyMethod& simplifyMethod ) { mSimplifyMethod = simplifyMethod; }
1546  inline const QgsVectorSimplifyMethod& simplifyMethod() const { return mSimplifyMethod; }
1547 
1552  bool simplifyDrawingCanbeApplied( const QgsRenderContext& renderContext, QgsVectorSimplifyMethod::SimplifyHint simplifyHint ) const;
1553 
1554  public slots:
1562  void select( const QgsFeatureId &featureId );
1563 
1571  void select( const QgsFeatureIds& featureIds );
1572 
1580  void deselect( const QgsFeatureId featureId );
1581 
1589  void deselect( const QgsFeatureIds& featureIds );
1590 
1596  void removeSelection();
1597 
1601  virtual void updateExtents();
1602 
1604  void checkJoinLayerRemove( QString theLayerId );
1605 
1606  protected slots:
1607  void invalidateSymbolCountedFlag();
1608 
1609  signals:
1610 
1618  void selectionChanged( const QgsFeatureIds selected, const QgsFeatureIds deselected, const bool clearAndSelect );
1619 
1621  void selectionChanged();
1622 
1624  void layerModified();
1625 
1627  void beforeModifiedCheck() const;
1628 
1630  void editingStarted();
1631 
1633  void editingStopped();
1634 
1636  void beforeCommitChanges();
1637 
1639  void beforeRollBack();
1640 
1649  void attributeAdded( int idx );
1658  void attributeDeleted( int idx );
1659  void featureAdded( QgsFeatureId fid );
1660  void featureDeleted( QgsFeatureId fid );
1665  void updatedFields();
1666  void layerDeleted();
1667 
1668  void attributeValueChanged( QgsFeatureId fid, int idx, const QVariant & );
1669  void geometryChanged( QgsFeatureId fid, QgsGeometry &geom );
1670 
1672  void committedAttributesDeleted( const QString& layerId, const QgsAttributeList& deletedAttributes );
1673  void committedAttributesAdded( const QString& layerId, const QList<QgsField>& addedAttributes );
1674  void committedFeaturesAdded( const QString& layerId, const QgsFeatureList& addedFeatures );
1675  void committedFeaturesRemoved( const QString& layerId, const QgsFeatureIds& deletedFeatureIds );
1676  void committedAttributeValuesChanges( const QString& layerId, const QgsChangedAttributesMap& changedAttributesValues );
1677  void committedGeometriesChanges( const QString& layerId, const QgsGeometryMap& changedGeometries );
1678 
1679  void saveLayerToProject();
1680 
1682  void labelingFontNotFound( QgsVectorLayer* layer, const QString& fontfamily );
1683 
1685  void featureBlendModeChanged( const QPainter::CompositionMode &blendMode );
1686 
1688  void layerTransparencyChanged( int layerTransparency );
1689 
1695  void editCommandStarted( const QString& text );
1696 
1702  void editCommandEnded();
1703 
1709  void editCommandDestroyed();
1710 
1720  void readCustomSymbology( const QDomElement& element, QString& errorMessage );
1721 
1731  void writeCustomSymbology( QDomElement& element, QDomDocument& doc, QString& errorMessage ) const;
1732 
1733 
1734  private slots:
1735  void onRelationsLoaded();
1736  void onJoinedFieldsChanged();
1737 
1738  protected:
1740  void setExtent( const QgsRectangle &rect ) override;
1741 
1742  private: // Private methods
1743 
1745  QgsVectorLayer( const QgsVectorLayer & rhs );
1746 
1748  QgsVectorLayer & operator=( QgsVectorLayer const & rhs );
1749 
1750 
1755  bool setDataProvider( QString const & provider );
1756 
1758  QgsFeatureId findFreeId();
1759 
1768  void snapToGeometry( const QgsPoint& startPoint,
1769  QgsFeatureId featureId,
1770  const QgsGeometry *geom,
1771  double sqrSnappingTolerance,
1772  QMultiMap<double, QgsSnappingResult>& snappingResults,
1773  QgsSnapper::SnappingType snap_to ) const;
1774 
1776  //void addJoinedAttributes( QgsFeature& f, bool all = false );
1777 
1779  void readSldLabeling( const QDomNode& node );
1780 
1781  private: // Private attributes
1782 
1784  QgsVectorDataProvider *mDataProvider;
1785 
1787  QString mDisplayField;
1788 
1790  QString mDisplayExpression;
1791 
1793  QString mProviderKey;
1794 
1796  QgsAttributeAction* mActions;
1797 
1799  bool mReadOnly;
1800 
1805  QgsFeatureIds mSelectedFeatureIds;
1806 
1808  QgsFields mUpdatedFields;
1809 
1811  QMap< QString, QString > mAttributeAliasMap;
1812 
1814  QList< QgsAttributeEditorElement* > mAttributeEditorElements;
1815 
1817  QSet<QString> mExcludeAttributesWMS;
1819  QSet<QString> mExcludeAttributesWFS;
1820 
1822  QList< TabData > mTabs;
1823 
1825  QGis::WkbType mWkbType;
1826 
1828  QgsFeatureRendererV2 *mRendererV2;
1829 
1831  QgsVectorSimplifyMethod mSimplifyMethod;
1832 
1834  QgsLabel *mLabel;
1835 
1837  bool mLabelOn;
1838 
1840  bool mLabelFontNotFoundNotified;
1841 
1843  QPainter::CompositionMode mFeatureBlendMode;
1844 
1846  int mLayerTransparency;
1847 
1849  bool mVertexMarkerOnlyForSelection;
1850 
1851  QStringList mCommitErrors;
1852 
1853  QMap< QString, bool> mFieldEditables;
1854  QMap< QString, bool> mLabelOnTop;
1855 
1856  QMap<QString, QString> mEditorWidgetV2Types;
1857  QMap<QString, QgsEditorWidgetConfig > mEditorWidgetV2Configs;
1858 
1860  EditorLayout mEditorLayout;
1861 
1862  QString mEditForm, mEditFormInit;
1863 
1866  QgsVectorLayer::FeatureFormSuppress mFeatureFormSuppress;
1867 
1868  //annotation form for this layer
1869  QString mAnnotationForm;
1870 
1872  QgsGeometryCache* mCache;
1873 
1875  QgsVectorLayerEditBuffer* mEditBuffer;
1877 
1878  //stores information about joined layers
1879  QgsVectorLayerJoinBuffer* mJoinBuffer;
1880 
1882  QgsExpressionFieldBuffer* mExpressionFieldBuffer;
1883 
1884  //diagram rendering object. 0 if diagram drawing is disabled
1885  QgsDiagramRendererV2* mDiagramRenderer;
1886 
1887  //stores infos about diagram placement (placement type, priority, position distance)
1888  QgsDiagramLayerSettings *mDiagramLayerSettings;
1889 
1890  bool mValidExtent;
1891  bool mLazyExtent;
1892 
1893  // Features in renderer classes counted
1894  bool mSymbolFeatureCounted;
1895 
1896  // Feature counts for each renderer symbol
1897  QMap<QgsSymbolV2*, long> mSymbolFeatureCountMap;
1898 
1900 };
1901 
1902 #endif