QGIS API Documentation  2.8.2-Wien
 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  qgsvectorlayer.h - description
3  -------------------
4  begin : Oct 29, 2003
5  copyright : (C) 2003 by Gary E.Sherman
6  email : sherman at mrcc.com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSVECTORLAYER_H
19 #define QGSVECTORLAYER_H
20 
21 #include <QMap>
22 #include <QSet>
23 #include <QList>
24 #include <QStringList>
25 
26 #include "qgis.h"
27 #include "qgsmaplayer.h"
28 #include "qgsfeature.h"
29 #include "qgsfeatureiterator.h"
30 #include "qgseditorwidgetconfig.h"
31 #include "qgsfield.h"
32 #include "qgssnapper.h"
33 #include "qgsfield.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 
660  void addExpressionField( const QString& exp, const QgsField& fld );
661 
669  void removeExpressionField( int index );
670 
672  QgsLabel *label();
673 
674  const QgsLabel *label() const;
675 
676  QgsAttributeAction *actions() { return mActions; }
677 
683  int selectedFeatureCount();
684 
693  void select( QgsRectangle & rect, bool addToSelection );
694 
706  void modifySelection( QgsFeatureIds selectIds, QgsFeatureIds deselectIds );
707 
709  void invertSelection();
710 
712  void selectAll();
713 
715  QgsFeatureIds allFeatureIds();
716 
724  void invertSelectionInRectangle( QgsRectangle & rect );
725 
734  QgsFeatureList selectedFeatures();
735 
747  QgsFeatureIterator selectedFeaturesIterator( QgsFeatureRequest request = QgsFeatureRequest() );
748 
755  const QgsFeatureIds &selectedFeaturesIds() const;
756 
764  void setSelectedFeatures( const QgsFeatureIds &ids );
765 
767  QgsRectangle boundingBoxOfSelected();
768 
770  void setDiagramRenderer( QgsDiagramRendererV2* r );
771  const QgsDiagramRendererV2* diagramRenderer() const { return mDiagramRenderer; }
772 
773  void setDiagramLayerSettings( const QgsDiagramLayerSettings& s );
774  const QgsDiagramLayerSettings *diagramLayerSettings() const { return mDiagramLayerSettings; }
775 
777  QgsFeatureRendererV2* rendererV2();
779  void setRendererV2( QgsFeatureRendererV2* r );
780 
782  QGis::GeometryType geometryType() const;
783 
785  bool hasGeometryType() const;
786 
788  QGis::WkbType wkbType() const;
789 
791  QString providerType() const;
792 
796  virtual bool readXml( const QDomNode& layer_node ) override;
797 
801  virtual bool writeXml( QDomNode & layer_node, QDomDocument & doc ) override;
802 
811  virtual void saveStyleToDatabase( QString name, QString description,
812  bool useAsDefault, QString uiFileContent,
813  QString &msgError );
814 
823  virtual int listStylesInDatabase( QStringList &ids, QStringList &names,
824  QStringList &descriptions, QString &msgError );
825 
829  virtual QString getStyleFromDatabase( QString styleId, QString &msgError );
830 
837  virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag, bool loadFromLocalDb );
838 
843  virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag ) override;
844 
855  virtual bool applyNamedStyle( QString namedStyle, QString &errorMsg );
856 
861  QgsAttributeEditorElement* attributeEditorElementFromDomElement( QDomElement &elem, QObject* parent );
862 
868  bool readSymbology( const QDomNode& node, QString& errorMessage ) override;
869 
876  bool writeSymbology( QDomNode& node, QDomDocument& doc, QString& errorMessage ) const override;
877 
878  bool writeSld( QDomNode& node, QDomDocument& doc, QString& errorMessage ) const;
879  bool readSld( const QDomNode& node, QString& errorMessage ) override;
880 
888  virtual long featureCount() const;
889 
896  long featureCount( QgsSymbolV2* symbol );
897 
903  bool countSymbolFeatures( bool showProgress = true );
904 
912  virtual bool setSubsetString( QString subset );
913 
918  virtual QString subsetString();
919 
923  QgsFeatureIterator getFeatures( const QgsFeatureRequest& request = QgsFeatureRequest() );
924 
930  bool addFeature( QgsFeature& f, bool alsoUpdateExtent = true );
931 
938  bool updateFeature( QgsFeature &f );
939 
944  bool insertVertex( double x, double y, QgsFeatureId atFeatureId, int beforeVertex );
945 
950  bool moveVertex( double x, double y, QgsFeatureId atFeatureId, int atVertex );
951 
954  bool deleteVertex( QgsFeatureId atFeatureId, int atVertex );
955 
959  bool deleteSelectedFeatures( int *deletedCount = 0 );
960 
970  int addRing( const QList<QgsPoint>& ring );
971 
982  int addPart( const QList<QgsPoint>& ring );
983 
989  int translateFeature( QgsFeatureId featureId, double dx, double dy );
990 
998  int splitParts( const QList<QgsPoint>& splitLine, bool topologicalEditing = false );
999 
1007  int splitFeatures( const QList<QgsPoint>& splitLine, bool topologicalEditing = false );
1008 
1017  Q_DECL_DEPRECATED int removePolygonIntersections( QgsGeometry* geom, QgsFeatureIds ignoreFeatures = QgsFeatureIds() );
1018 
1024  int addTopologicalPoints( QgsGeometry* geom );
1025 
1033  int addTopologicalPoints( const QgsPoint& p );
1034 
1040  int insertSegmentVerticesForSnap( const QList<QgsSnappingResult>& snapResults );
1041 
1043  void enableLabels( bool on );
1044 
1046  bool hasLabelsEnabled() const;
1047 
1049  virtual bool isEditable() const override;
1050 
1052  virtual bool isReadOnly() const;
1053 
1055  virtual bool isModified() const;
1056 
1063  bool snapPoint( QgsPoint& point, double tolerance );
1064 
1072  int snapWithContext( const QgsPoint& startPoint,
1073  double snappingTolerance,
1074  QMultiMap < double, QgsSnappingResult > &snappingResults,
1075  QgsSnapper::SnappingType snap_to );
1076 
1078  virtual void reload() override;
1079 
1083  virtual QgsMapLayerRenderer* createMapRenderer( QgsRenderContext& rendererContext ) override;
1084 
1088  bool draw( QgsRenderContext& rendererContext ) override;
1089 
1091  void drawLabels( QgsRenderContext& rendererContext ) override;
1092 
1094  QgsRectangle extent() override;
1095 
1097  const QgsFields &pendingFields() const;
1098 
1100  QgsAttributeList pendingAllAttributesList();
1101 
1103  QgsAttributeList pendingPkAttributesList();
1104 
1106  int pendingFeatureCount();
1107 
1111  bool setReadOnly( bool readonly = true );
1112 
1114  bool startEditing();
1115 
1117  bool changeGeometry( QgsFeatureId fid, QgsGeometry* geom );
1118 
1125  Q_DECL_DEPRECATED bool changeAttributeValue( QgsFeatureId fid, int field, QVariant value, bool emitSignal );
1126 
1137  bool changeAttributeValue( QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue = QVariant() );
1138 
1141  bool addAttribute( const QgsField &field );
1142 
1144  void addAttributeAlias( int attIndex, QString aliasString );
1145 
1147  void remAttributeAlias( int attIndex );
1148 
1152  void addAttributeEditorWidget( QgsAttributeEditorElement* data );
1153 
1161  const QString editorWidgetV2( int fieldIdx ) const;
1162 
1172  const QString editorWidgetV2( const QString& fieldName ) const;
1173 
1181  const QgsEditorWidgetConfig editorWidgetV2Config( int fieldIdx ) const;
1182 
1192  const QgsEditorWidgetConfig editorWidgetV2Config( const QString& fieldName ) const;
1193 
1197  QList< QgsAttributeEditorElement* > &attributeEditorElements();
1201  void clearAttributeEditorWidgets();
1202 
1204  QString attributeAlias( int attributeIndex ) const;
1205 
1207  QString attributeDisplayName( int attributeIndex ) const;
1208 
1209  const QMap< QString, QString >& attributeAliases() const { return mAttributeAliasMap; }
1210 
1211  const QSet<QString>& excludeAttributesWMS() const { return mExcludeAttributesWMS; }
1212  void setExcludeAttributesWMS( const QSet<QString>& att ) { mExcludeAttributesWMS = att; }
1213 
1214  const QSet<QString>& excludeAttributesWFS() const { return mExcludeAttributesWFS; }
1215  void setExcludeAttributesWFS( const QSet<QString>& att ) { mExcludeAttributesWFS = att; }
1216 
1218  bool deleteAttribute( int attr );
1219 
1227  bool deleteAttributes( QList<int> attrs );
1228 
1230  bool addFeatures( QgsFeatureList features, bool makeSelected = true );
1231 
1233  bool deleteFeature( QgsFeatureId fid );
1234 
1250  bool commitChanges();
1251  const QStringList &commitErrors();
1252 
1256  bool rollBack( bool deleteBuffer = true );
1257 
1263  Q_DECL_DEPRECATED EditType editType( int idx );
1264 
1270  Q_DECL_DEPRECATED void setEditType( int idx, EditType edit );
1271 
1273  EditorLayout editorLayout();
1274 
1276  void setEditorLayout( EditorLayout editorLayout );
1277 
1306  void setEditorWidgetV2( int attrIdx, const QString& widgetType );
1307 
1323  void setEditorWidgetV2Config( int attrIdx, const QgsEditorWidgetConfig& config );
1324 
1330  Q_DECL_DEPRECATED void setCheckedState( int idx, QString checked, QString notChecked );
1331 
1333  QString editForm();
1334 
1336  void setEditForm( QString ui );
1337 
1340  QgsVectorLayer::FeatureFormSuppress featureFormSuppress() const { return mFeatureFormSuppress; }
1341 
1344  void setFeatureFormSuppress( QgsVectorLayer::FeatureFormSuppress s ) { mFeatureFormSuppress = s; }
1345 
1347  QString annotationForm() const { return mAnnotationForm; }
1348 
1350  void setAnnotationForm( const QString& ui );
1351 
1353  QString editFormInit();
1354 
1356  void setEditFormInit( QString function );
1357 
1362  Q_DECL_DEPRECATED QMap<QString, QVariant> valueMap( int idx );
1363 
1369  Q_DECL_DEPRECATED RangeData range( int idx );
1370 
1372  ValueRelationData valueRelation( int idx );
1373 
1380  QList<QgsRelation> referencingRelations( int idx );
1381 
1387  Q_DECL_DEPRECATED QString dateFormat( int idx );
1388 
1394  Q_DECL_DEPRECATED QSize widgetSize( int idx );
1395 
1397  bool fieldEditable( int idx );
1398 
1400  bool labelOnTop( int idx );
1401 
1403  void setFieldEditable( int idx, bool editable );
1404 
1406  void setLabelOnTop( int idx, bool onTop );
1407 
1409  QgsVectorLayerEditBuffer* editBuffer() { return mEditBuffer; }
1410 
1415  void beginEditCommand( QString text );
1416 
1418  void endEditCommand();
1419 
1421  void destroyEditCommand();
1422 
1424  int fieldNameIndex( const QString& fieldName ) const;
1425 
1428  {
1431  NoMarker
1432  };
1433 
1435  static void drawVertexMarker( double x, double y, QPainter& p, QgsVectorLayer::VertexMarkerType type, int vertexSize );
1436 
1438  void updateFields();
1439 
1441  void createJoinCaches();
1442 
1447  void uniqueValues( int index, QList<QVariant> &uniqueValues, int limit = -1 );
1448 
1450  QVariant minimumValue( int index );
1451 
1453  QVariant maximumValue( int index );
1454 
1455  /* Set the blending mode used for rendering each feature */
1456  void setFeatureBlendMode( const QPainter::CompositionMode &blendMode );
1457  /* Returns the current blending mode for features */
1458  QPainter::CompositionMode featureBlendMode() const;
1459 
1460  /* Set the transparency for the vector layer */
1461  void setLayerTransparency( int layerTransparency );
1462  /* Returns the current transparency for the vector layer */
1463  int layerTransparency() const;
1464 
1465  QString metadata() override;
1466 
1468  inline QgsGeometryCache* cache() { return mCache; }
1469 
1473  void setSimplifyMethod( const QgsVectorSimplifyMethod& simplifyMethod ) { mSimplifyMethod = simplifyMethod; }
1477  inline const QgsVectorSimplifyMethod& simplifyMethod() const { return mSimplifyMethod; }
1478 
1483  bool simplifyDrawingCanbeApplied( const QgsRenderContext& renderContext, QgsVectorSimplifyMethod::SimplifyHint simplifyHint ) const;
1484 
1485  public slots:
1493  void select( const QgsFeatureId &featureId );
1494 
1502  void select( const QgsFeatureIds& featureIds );
1503 
1511  void deselect( const QgsFeatureId featureId );
1512 
1520  void deselect( const QgsFeatureIds& featureIds );
1521 
1527  void removeSelection();
1528 
1532  virtual void updateExtents();
1533 
1535  void checkJoinLayerRemove( QString theLayerId );
1536 
1537  protected slots:
1538  void invalidateSymbolCountedFlag();
1539 
1540  signals:
1541 
1549  void selectionChanged( const QgsFeatureIds selected, const QgsFeatureIds deselected, const bool clearAndSelect );
1550 
1552  void selectionChanged();
1553 
1555  void layerModified();
1556 
1558  void beforeModifiedCheck() const;
1559 
1561  void editingStarted();
1562 
1564  void editingStopped();
1565 
1567  void beforeCommitChanges();
1568 
1570  void beforeRollBack();
1571 
1580  void attributeAdded( int idx );
1589  void attributeDeleted( int idx );
1590  void featureAdded( QgsFeatureId fid );
1591  void featureDeleted( QgsFeatureId fid );
1596  void updatedFields();
1597  void layerDeleted();
1598 
1599  void attributeValueChanged( QgsFeatureId fid, int idx, const QVariant & );
1600  void geometryChanged( QgsFeatureId fid, QgsGeometry &geom );
1601 
1603  void committedAttributesDeleted( const QString& layerId, const QgsAttributeList& deletedAttributes );
1604  void committedAttributesAdded( const QString& layerId, const QList<QgsField>& addedAttributes );
1605  void committedFeaturesAdded( const QString& layerId, const QgsFeatureList& addedFeatures );
1606  void committedFeaturesRemoved( const QString& layerId, const QgsFeatureIds& deletedFeatureIds );
1607  void committedAttributeValuesChanges( const QString& layerId, const QgsChangedAttributesMap& changedAttributesValues );
1608  void committedGeometriesChanges( const QString& layerId, const QgsGeometryMap& changedGeometries );
1609 
1610  void saveLayerToProject();
1611 
1613  void labelingFontNotFound( QgsVectorLayer* layer, const QString& fontfamily );
1614 
1616  void featureBlendModeChanged( const QPainter::CompositionMode &blendMode );
1617 
1619  void layerTransparencyChanged( int layerTransparency );
1620 
1626  void editCommandStarted( const QString& text );
1627 
1633  void editCommandEnded();
1634 
1640  void editCommandDestroyed();
1641 
1651  void readCustomSymbology( const QDomElement& element, QString& errorMessage );
1652 
1662  void writeCustomSymbology( QDomElement& element, QDomDocument& doc, QString& errorMessage ) const;
1663 
1664  private slots:
1665  void onRelationsLoaded();
1666  void onJoinedFieldsChanged();
1667 
1668  protected:
1670  void setExtent( const QgsRectangle &rect ) override;
1671 
1672  private: // Private methods
1673 
1675  QgsVectorLayer( const QgsVectorLayer & rhs );
1676 
1678  QgsVectorLayer & operator=( QgsVectorLayer const & rhs );
1679 
1684  bool setDataProvider( QString const & provider );
1685 
1687  QgsFeatureId findFreeId();
1688 
1697  void snapToGeometry( const QgsPoint& startPoint,
1698  QgsFeatureId featureId,
1699  QgsGeometry* geom,
1700  double sqrSnappingTolerance,
1701  QMultiMap<double, QgsSnappingResult>& snappingResults,
1702  QgsSnapper::SnappingType snap_to ) const;
1703 
1705  //void addJoinedAttributes( QgsFeature& f, bool all = false );
1706 
1708  void readSldLabeling( const QDomNode& node );
1709 
1710  private: // Private attributes
1711 
1713  QgsVectorDataProvider *mDataProvider;
1714 
1716  QString mDisplayField;
1717 
1719  QString mDisplayExpression;
1720 
1722  QString mProviderKey;
1723 
1725  QgsAttributeAction* mActions;
1726 
1728  bool mReadOnly;
1729 
1734  QgsFeatureIds mSelectedFeatureIds;
1735 
1737  QgsFields mUpdatedFields;
1738 
1740  QMap< QString, QString > mAttributeAliasMap;
1741 
1743  QList< QgsAttributeEditorElement* > mAttributeEditorElements;
1744 
1746  QSet<QString> mExcludeAttributesWMS;
1748  QSet<QString> mExcludeAttributesWFS;
1749 
1751  QList< TabData > mTabs;
1752 
1754  QGis::WkbType mWkbType;
1755 
1757  QgsFeatureRendererV2 *mRendererV2;
1758 
1760  QgsVectorSimplifyMethod mSimplifyMethod;
1761 
1763  QgsLabel *mLabel;
1764 
1766  bool mLabelOn;
1767 
1769  bool mLabelFontNotFoundNotified;
1770 
1772  QPainter::CompositionMode mFeatureBlendMode;
1773 
1775  int mLayerTransparency;
1776 
1778  bool mVertexMarkerOnlyForSelection;
1779 
1780  QStringList mCommitErrors;
1781 
1782  QMap< QString, bool> mFieldEditables;
1783  QMap< QString, bool> mLabelOnTop;
1784 
1785  QMap<QString, QString> mEditorWidgetV2Types;
1786  QMap<QString, QgsEditorWidgetConfig > mEditorWidgetV2Configs;
1787 
1789  EditorLayout mEditorLayout;
1790 
1791  QString mEditForm, mEditFormInit;
1792 
1795  QgsVectorLayer::FeatureFormSuppress mFeatureFormSuppress;
1796 
1797  //annotation form for this layer
1798  QString mAnnotationForm;
1799 
1801  QgsGeometryCache* mCache;
1802 
1804  QgsVectorLayerEditBuffer* mEditBuffer;
1806 
1807  //stores information about joined layers
1808  QgsVectorLayerJoinBuffer* mJoinBuffer;
1809 
1811  QgsExpressionFieldBuffer* mExpressionFieldBuffer;
1812 
1813  //diagram rendering object. 0 if diagram drawing is disabled
1814  QgsDiagramRendererV2* mDiagramRenderer;
1815 
1816  //stores infos about diagram placement (placement type, priority, position distance)
1817  QgsDiagramLayerSettings *mDiagramLayerSettings;
1818 
1819  bool mValidExtent;
1820  bool mLazyExtent;
1821 
1822  // Features in renderer classes counted
1823  bool mSymbolFeatureCounted;
1824 
1825  // Feature counts for each renderer symbol
1826  QMap<QgsSymbolV2*, long> mSymbolFeatureCountMap;
1827 
1829 };
1830 
1831 #endif