QGIS API Documentation  2.6.0-Brighton
 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;
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;
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;
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 
185  bool operator==( const QgsVectorJoinInfo& other ) const
186  {
187  return targetFieldName == other.targetFieldName &&
188  joinLayerId == other.joinLayerId &&
189  joinFieldName == other.joinFieldName &&
190  joinFieldsSubset == other.joinFieldsSubset &&
191  memoryCache == other.memoryCache;
192  }
193 
196  void setJoinFieldNamesSubset( QStringList* fieldNamesSubset ) { joinFieldsSubset = QSharedPointer<QStringList>( fieldNamesSubset ); }
199  QStringList* joinFieldNamesSubset() const { return joinFieldsSubset.data(); }
200 
201 protected:
203  QSharedPointer<QStringList> joinFieldsSubset;
204 };
205 
468 class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
469 {
470  Q_OBJECT
471 
472  public:
475  {
476  GeneratedLayout = 0,
477  TabLayout = 1,
478  UiFileLayout = 2
479  };
480 
484  enum EditType
485  {
507  };
508 
512  {
513  SuppressDefault = 0, // use the application-wide setting
514  SuppressOn = 1,
515  SuppressOff = 2
516  };
517 
518  struct RangeData
519  {
520  RangeData() { mMin = QVariant( 0 ); mMax = QVariant( 5 ); mStep = QVariant( 1 );}
521  RangeData( QVariant theMin, QVariant theMax, QVariant theStep )
522  : mMin( theMin ), mMax( theMax ), mStep( theStep ) {}
523 
524  QVariant mMin;
525  QVariant mMax;
526  QVariant mStep;
527  };
528 
530  {
532  ValueRelationData( QString layer, QString key, QString value, bool allowNull, bool orderByValue,
533  bool allowMulti = false,
534  QString filterExpression = QString::null )
535  : mLayer( layer )
536  , mKey( key )
537  , mValue( value )
538  , mFilterExpression( filterExpression )
539  , mAllowNull( allowNull )
540  , mOrderByValue( orderByValue )
541  , mAllowMulti( allowMulti )
542  {}
543 
544  QString mLayer;
545  QString mKey;
546  QString mValue;
550  bool mAllowMulti; /* allow selection of multiple keys */
551  };
552 
553  struct GroupData
554  {
556  GroupData( QString name, QList<QString> fields )
557  : mName( name ), mFields( fields ) {}
558  QString mName;
559  QList<QString> mFields;
560  };
561 
562  struct TabData
563  {
564  TabData() {}
565  TabData( QString name, QList<QString> fields, QList<GroupData> groups )
566  : mName( name ), mFields( fields ), mGroups( groups ) {}
567  QString mName;
568  QList<QString> mFields;
569  QList<GroupData> mGroups;
570  };
571 
585  QgsVectorLayer( QString path = QString::null, QString baseName = QString::null,
586  QString providerLib = QString::null, bool loadDefaultStyleFlag = true );
587 
589  virtual ~QgsVectorLayer();
590 
592  QString storageType() const;
593 
595  QString capabilitiesString() const;
596 
598  QString dataComment() const;
599 
601  void setDisplayField( QString fldName = "" );
602 
604  const QString displayField() const;
605 
612  void setDisplayExpression( const QString &displayExpression );
613 
620  const QString displayExpression();
621 
623  QgsVectorDataProvider* dataProvider();
624 
628  const QgsVectorDataProvider* dataProvider() const;
629 
631  void setProviderEncoding( const QString& encoding );
632 
634  void setCoordinateSystem();
635 
639  bool addJoin( const QgsVectorJoinInfo& joinInfo );
640 
642  void removeJoin( const QString& joinLayerId );
643 
644  const QList< QgsVectorJoinInfo >& vectorJoins() const;
645 
654  void addExpressionField( const QString& exp, const QgsField& fld );
655 
663  void removeExpressionField( int index );
664 
666  QgsLabel *label();
667 
668  const QgsLabel *label() const;
669 
670  QgsAttributeAction *actions() { return mActions; }
671 
677  int selectedFeatureCount();
678 
687  void select( QgsRectangle & rect, bool addToSelection );
688 
700  void modifySelection( QgsFeatureIds selectIds, QgsFeatureIds deselectIds );
701 
703  void invertSelection();
704 
706  void selectAll();
707 
709  QgsFeatureIds allFeatureIds();
710 
718  void invertSelectionInRectangle( QgsRectangle & rect );
719 
728  QgsFeatureList selectedFeatures();
729 
741  QgsFeatureIterator selectedFeaturesIterator( QgsFeatureRequest request = QgsFeatureRequest() );
742 
749  const QgsFeatureIds &selectedFeaturesIds() const;
750 
758  void setSelectedFeatures( const QgsFeatureIds &ids );
759 
761  QgsRectangle boundingBoxOfSelected();
762 
764  void setDiagramRenderer( QgsDiagramRendererV2* r );
765  const QgsDiagramRendererV2* diagramRenderer() const { return mDiagramRenderer; }
766 
767  void setDiagramLayerSettings( const QgsDiagramLayerSettings& s );
768  const QgsDiagramLayerSettings *diagramLayerSettings() const { return mDiagramLayerSettings; }
769 
771  QgsFeatureRendererV2* rendererV2();
774  void setRendererV2( QgsFeatureRendererV2* r );
775 
777  QGis::GeometryType geometryType() const;
778 
780  bool hasGeometryType() const;
781 
783  QGis::WkbType wkbType() const;
784 
786  QString providerType() const;
787 
791  virtual bool readXml( const QDomNode& layer_node );
792 
796  virtual bool writeXml( QDomNode & layer_node, QDomDocument & doc );
797 
806  virtual void saveStyleToDatabase( QString name, QString description,
807  bool useAsDefault, QString uiFileContent,
808  QString &msgError );
809 
818  virtual int listStylesInDatabase( QStringList &ids, QStringList &names,
819  QStringList &descriptions, QString &msgError );
820 
824  virtual QString getStyleFromDatabase( QString styleId, QString &msgError );
825 
832  virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag, bool loadFromLocalDb );
833 
838  virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag );
839 
840  virtual bool applyNamedStyle( QString namedStyle, QString errorMsg );
841 
846  QgsAttributeEditorElement* attributeEditorElementFromDomElement( QDomElement &elem, QObject* parent );
847 
853  bool readSymbology( const QDomNode& node, QString& errorMessage );
854 
861  bool writeSymbology( QDomNode& node, QDomDocument& doc, QString& errorMessage ) const;
862 
863  bool writeSld( QDomNode& node, QDomDocument& doc, QString& errorMessage ) const;
864  bool readSld( const QDomNode& node, QString& errorMessage );
865 
873  virtual long featureCount() const;
874 
881  long featureCount( QgsSymbolV2* symbol );
882 
888  bool countSymbolFeatures( bool showProgress = true );
889 
897  virtual bool setSubsetString( QString subset );
898 
903  virtual QString subsetString();
904 
908  QgsFeatureIterator getFeatures( const QgsFeatureRequest& request = QgsFeatureRequest() );
909 
915  bool addFeature( QgsFeature& f, bool alsoUpdateExtent = true );
916 
923  bool updateFeature( QgsFeature &f );
924 
929  bool insertVertex( double x, double y, QgsFeatureId atFeatureId, int beforeVertex );
930 
935  bool moveVertex( double x, double y, QgsFeatureId atFeatureId, int atVertex );
936 
939  bool deleteVertex( QgsFeatureId atFeatureId, int atVertex );
940 
944  bool deleteSelectedFeatures();
945 
955  int addRing( const QList<QgsPoint>& ring );
956 
967  int addPart( const QList<QgsPoint>& ring );
968 
974  int translateFeature( QgsFeatureId featureId, double dx, double dy );
975 
983  int splitParts( const QList<QgsPoint>& splitLine, bool topologicalEditing = false );
984 
992  int splitFeatures( const QList<QgsPoint>& splitLine, bool topologicalEditing = false );
993 
1002  Q_DECL_DEPRECATED int removePolygonIntersections( QgsGeometry* geom, QgsFeatureIds ignoreFeatures = QgsFeatureIds() );
1003 
1009  int addTopologicalPoints( QgsGeometry* geom );
1010 
1018  int addTopologicalPoints( const QgsPoint& p );
1019 
1025  int insertSegmentVerticesForSnap( const QList<QgsSnappingResult>& snapResults );
1026 
1028  void enableLabels( bool on );
1029 
1031  bool hasLabelsEnabled() const;
1032 
1034  virtual bool isEditable() const;
1035 
1038  virtual bool isReadOnly() const;
1039 
1041  virtual bool isModified() const;
1042 
1049  bool snapPoint( QgsPoint& point, double tolerance );
1050 
1058  int snapWithContext( const QgsPoint& startPoint,
1059  double snappingTolerance,
1060  QMultiMap < double, QgsSnappingResult > &snappingResults,
1061  QgsSnapper::SnappingType snap_to );
1062 
1064  virtual void reload();
1065 
1069  virtual QgsMapLayerRenderer* createMapRenderer( QgsRenderContext& rendererContext );
1070 
1074  bool draw( QgsRenderContext& rendererContext );
1075 
1077  void drawLabels( QgsRenderContext& rendererContext );
1078 
1080  QgsRectangle extent();
1081 
1083  const QgsFields &pendingFields() const;
1084 
1086  QgsAttributeList pendingAllAttributesList();
1087 
1089  QgsAttributeList pendingPkAttributesList();
1090 
1092  int pendingFeatureCount();
1093 
1097  bool setReadOnly( bool readonly = true );
1098 
1100  bool startEditing();
1101 
1103  bool changeGeometry( QgsFeatureId fid, QgsGeometry* geom );
1104 
1111  Q_DECL_DEPRECATED bool changeAttributeValue( QgsFeatureId fid, int field, QVariant value, bool emitSignal );
1112 
1123  bool changeAttributeValue( QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue = QVariant() );
1124 
1128  bool addAttribute( const QgsField &field );
1129 
1131  void addAttributeAlias( int attIndex, QString aliasString );
1132 
1134  void remAttributeAlias( int attIndex );
1135 
1139  void addAttributeEditorWidget( QgsAttributeEditorElement* data );
1140 
1148  const QString editorWidgetV2( int fieldIdx ) const;
1149 
1159  const QString editorWidgetV2( const QString& fieldName ) const;
1160 
1168  const QgsEditorWidgetConfig editorWidgetV2Config( int fieldIdx ) const;
1169 
1179  const QgsEditorWidgetConfig editorWidgetV2Config( const QString& fieldName ) const;
1180 
1184  QList< QgsAttributeEditorElement* > &attributeEditorElements();
1188  void clearAttributeEditorWidgets();
1189 
1191  QString attributeAlias( int attributeIndex ) const;
1192 
1194  QString attributeDisplayName( int attributeIndex ) const;
1195 
1196  const QMap< QString, QString >& attributeAliases() const { return mAttributeAliasMap; }
1197 
1198  const QSet<QString>& excludeAttributesWMS() const { return mExcludeAttributesWMS; }
1199  void setExcludeAttributesWMS( const QSet<QString>& att ) { mExcludeAttributesWMS = att; }
1200 
1201  const QSet<QString>& excludeAttributesWFS() const { return mExcludeAttributesWFS; }
1202  void setExcludeAttributesWFS( const QSet<QString>& att ) { mExcludeAttributesWFS = att; }
1203 
1205  bool deleteAttribute( int attr );
1206 
1214  bool deleteAttributes( QList<int> attrs );
1215 
1217  bool addFeatures( QgsFeatureList features, bool makeSelected = true );
1218 
1220  bool deleteFeature( QgsFeatureId fid );
1221 
1237  bool commitChanges();
1238  const QStringList &commitErrors();
1239 
1243  bool rollBack( bool deleteBuffer = true );
1244 
1250  Q_DECL_DEPRECATED EditType editType( int idx );
1251 
1257  Q_DECL_DEPRECATED void setEditType( int idx, EditType edit );
1258 
1260  EditorLayout editorLayout();
1261 
1263  void setEditorLayout( EditorLayout editorLayout );
1264 
1293  void setEditorWidgetV2( int attrIdx, const QString& widgetType );
1294 
1310  void setEditorWidgetV2Config( int attrIdx, const QgsEditorWidgetConfig& config );
1311 
1317  Q_DECL_DEPRECATED void setCheckedState( int idx, QString checked, QString notChecked );
1318 
1320  QString editForm();
1321 
1323  void setEditForm( QString ui );
1324 
1327  QgsVectorLayer::FeatureFormSuppress featureFormSuppress() const { return mFeatureFormSuppress; }
1328 
1331  void setFeatureFormSuppress( QgsVectorLayer::FeatureFormSuppress s ) { mFeatureFormSuppress = s; }
1332 
1334  QString annotationForm() const { return mAnnotationForm; }
1335 
1337  void setAnnotationForm( const QString& ui );
1338 
1340  QString editFormInit();
1341 
1343  void setEditFormInit( QString function );
1344 
1349  Q_DECL_DEPRECATED QMap<QString, QVariant> valueMap( int idx );
1350 
1356  Q_DECL_DEPRECATED RangeData range( int idx );
1357 
1359  ValueRelationData valueRelation( int idx );
1360 
1367  QList<QgsRelation> referencingRelations( int idx );
1368 
1374  Q_DECL_DEPRECATED QString dateFormat( int idx );
1375 
1381  Q_DECL_DEPRECATED QSize widgetSize( int idx );
1382 
1384  bool fieldEditable( int idx );
1385 
1387  bool labelOnTop( int idx );
1388 
1390  void setFieldEditable( int idx, bool editable );
1391 
1393  void setLabelOnTop( int idx, bool onTop );
1394 
1396  QgsVectorLayerEditBuffer* editBuffer() { return mEditBuffer; }
1397 
1402  void beginEditCommand( QString text );
1403 
1405  void endEditCommand();
1406 
1408  void destroyEditCommand();
1409 
1412  int fieldNameIndex( const QString& fieldName ) const;
1413 
1417  {
1420  NoMarker
1421  };
1422 
1425  static void drawVertexMarker( double x, double y, QPainter& p, QgsVectorLayer::VertexMarkerType type, int vertexSize );
1426 
1428  void updateFields();
1429 
1431  void createJoinCaches();
1432 
1437  void uniqueValues( int index, QList<QVariant> &uniqueValues, int limit = -1 );
1438 
1440  QVariant minimumValue( int index );
1441 
1443  QVariant maximumValue( int index );
1444 
1445  /* Set the blending mode used for rendering each feature */
1446  void setFeatureBlendMode( const QPainter::CompositionMode &blendMode );
1447  /* Returns the current blending mode for features */
1448  QPainter::CompositionMode featureBlendMode() const;
1449 
1450  /* Set the transparency for the vector layer */
1451  void setLayerTransparency( int layerTransparency );
1452  /* Returns the current transparency for the vector layer */
1453  int layerTransparency() const;
1454 
1455  QString metadata();
1456 
1458  inline QgsGeometryCache* cache() { return mCache; }
1459 
1463  void setSimplifyMethod( const QgsVectorSimplifyMethod& simplifyMethod ) { mSimplifyMethod = simplifyMethod; }
1467  inline const QgsVectorSimplifyMethod& simplifyMethod() const { return mSimplifyMethod; }
1468 
1473  bool simplifyDrawingCanbeApplied( const QgsRenderContext& renderContext, QgsVectorSimplifyMethod::SimplifyHint simplifyHint ) const;
1474 
1475  public slots:
1483  void select( const QgsFeatureId &featureId );
1484 
1492  void select( const QgsFeatureIds& featureIds );
1493 
1501  void deselect( const QgsFeatureId featureId );
1502 
1510  void deselect( const QgsFeatureIds& featureIds );
1511 
1517  void removeSelection();
1518 
1522  virtual void updateExtents();
1523 
1525  void checkJoinLayerRemove( QString theLayerId );
1526 
1527  protected slots:
1528  void invalidateSymbolCountedFlag();
1529 
1530  signals:
1531 
1539  void selectionChanged( const QgsFeatureIds selected, const QgsFeatureIds deselected, const bool clearAndSelect );
1540 
1542  void selectionChanged();
1543 
1545  void layerModified();
1546 
1548  void beforeModifiedCheck() const;
1549 
1551  void editingStarted();
1552 
1554  void editingStopped();
1555 
1557  void beforeCommitChanges();
1558 
1560  void beforeRollBack();
1561 
1570  void attributeAdded( int idx );
1579  void attributeDeleted( int idx );
1580  void featureAdded( QgsFeatureId fid );
1581  void featureDeleted( QgsFeatureId fid );
1586  void updatedFields();
1587  void layerDeleted();
1588 
1589  void attributeValueChanged( QgsFeatureId fid, int idx, const QVariant & );
1590  void geometryChanged( QgsFeatureId fid, QgsGeometry &geom );
1591 
1593  void committedAttributesDeleted( const QString& layerId, const QgsAttributeList& deletedAttributes );
1594  void committedAttributesAdded( const QString& layerId, const QList<QgsField>& addedAttributes );
1595  void committedFeaturesAdded( const QString& layerId, const QgsFeatureList& addedFeatures );
1596  void committedFeaturesRemoved( const QString& layerId, const QgsFeatureIds& deletedFeatureIds );
1597  void committedAttributeValuesChanges( const QString& layerId, const QgsChangedAttributesMap& changedAttributesValues );
1598  void committedGeometriesChanges( const QString& layerId, const QgsGeometryMap& changedGeometries );
1599 
1600  void saveLayerToProject();
1601 
1603  void labelingFontNotFound( QgsVectorLayer* layer, const QString& fontfamily );
1604 
1606  void featureBlendModeChanged( const QPainter::CompositionMode &blendMode );
1607 
1609  void layerTransparencyChanged( int layerTransparency );
1610 
1616  void editCommandStarted( const QString& text );
1617 
1623  void editCommandEnded();
1624 
1630  void editCommandDestroyed();
1631 
1641  void readCustomSymbology( const QDomElement& element, QString& errorMessage );
1642 
1652  void writeCustomSymbology( QDomElement& element, QDomDocument& doc, QString& errorMessage ) const;
1653 
1654  private slots:
1655  void onRelationsLoaded();
1656  void onJoinedFieldsChanged();
1657 
1658  protected:
1660  void setExtent( const QgsRectangle &rect );
1661 
1662  private: // Private methods
1663 
1665  QgsVectorLayer( const QgsVectorLayer & rhs );
1666 
1668  QgsVectorLayer & operator=( QgsVectorLayer const & rhs );
1669 
1674  bool setDataProvider( QString const & provider );
1675 
1677  QgsFeatureId findFreeId();
1678 
1687  void snapToGeometry( const QgsPoint& startPoint,
1688  QgsFeatureId featureId,
1689  QgsGeometry* geom,
1690  double sqrSnappingTolerance,
1691  QMultiMap<double, QgsSnappingResult>& snappingResults,
1692  QgsSnapper::SnappingType snap_to ) const;
1693 
1695  //void addJoinedAttributes( QgsFeature& f, bool all = false );
1696 
1698  void readSldLabeling( const QDomNode& node );
1699 
1700  private: // Private attributes
1701 
1703  QgsVectorDataProvider *mDataProvider;
1704 
1706  QString mDisplayField;
1707 
1709  QString mDisplayExpression;
1710 
1712  QString mProviderKey;
1713 
1715  QgsAttributeAction* mActions;
1716 
1718  bool mReadOnly;
1719 
1724  QgsFeatureIds mSelectedFeatureIds;
1725 
1727  QgsFields mUpdatedFields;
1728 
1730  QMap< QString, QString > mAttributeAliasMap;
1731 
1733  QList< QgsAttributeEditorElement* > mAttributeEditorElements;
1734 
1736  QSet<QString> mExcludeAttributesWMS;
1738  QSet<QString> mExcludeAttributesWFS;
1739 
1741  QList< TabData > mTabs;
1742 
1744  int mWkbType;
1745 
1747  QgsFeatureRendererV2 *mRendererV2;
1748 
1750  QgsVectorSimplifyMethod mSimplifyMethod;
1751 
1753  QgsLabel *mLabel;
1754 
1756  bool mLabelOn;
1757 
1759  bool mLabelFontNotFoundNotified;
1760 
1762  QPainter::CompositionMode mFeatureBlendMode;
1763 
1765  int mLayerTransparency;
1766 
1768  QgsVectorLayer::VertexMarkerType mCurrentVertexMarkerType;
1769 
1771  int mCurrentVertexMarkerSize;
1772 
1774  bool mVertexMarkerOnlyForSelection;
1775 
1776  QStringList mCommitErrors;
1777 
1778  QMap< QString, bool> mFieldEditables;
1779  QMap< QString, bool> mLabelOnTop;
1780 
1781  QMap<QString, QString> mEditorWidgetV2Types;
1782  QMap<QString, QgsEditorWidgetConfig > mEditorWidgetV2Configs;
1783 
1785  EditorLayout mEditorLayout;
1786 
1787  QString mEditForm, mEditFormInit;
1788 
1791  QgsVectorLayer::FeatureFormSuppress mFeatureFormSuppress;
1792 
1793  //annotation form for this layer
1794  QString mAnnotationForm;
1795 
1797  QgsGeometryCache* mCache;
1798 
1800  QgsVectorLayerEditBuffer* mEditBuffer;
1802 
1803  //stores information about joined layers
1804  QgsVectorLayerJoinBuffer* mJoinBuffer;
1805 
1807  QgsExpressionFieldBuffer* mExpressionFieldBuffer;
1808 
1809  //diagram rendering object. 0 if diagram drawing is disabled
1810  QgsDiagramRendererV2* mDiagramRenderer;
1811 
1812  //stores infos about diagram placement (placement type, priority, position distance)
1813  QgsDiagramLayerSettings *mDiagramLayerSettings;
1814 
1815  bool mValidExtent;
1816  bool mLazyExtent;
1817 
1818  // Features in renderer classes counted
1819  bool mSymbolFeatureCounted;
1820 
1821  // Feature counts for each renderer symbol
1822  QMap<QgsSymbolV2*, long> mSymbolFeatureCountMap;
1823 
1825 };
1826 
1827 #endif