Quantum GIS API Documentation  1.7.4
Classes | Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
QgsVectorLayer Class Reference

Vector layer backed by a data source provider. More...

#include <qgsvectorlayer.h>

Inheritance diagram for QgsVectorLayer:
Inheritance graph
[legend]
Collaboration diagram for QgsVectorLayer:
Collaboration graph
[legend]

List of all members.

Classes

struct  RangeData

Public Types

enum  EditType {
  LineEdit, UniqueValues, UniqueValuesEditable, ValueMap,
  Classification, EditRange, SliderRange, CheckBox,
  FileName, Enumeration, Immutable, Hidden,
  TextEdit, Calendar, DialRange
}
enum  VertexMarkerType { SemiTransparentCircle, Cross, NoMarker }
 Editing vertex markers. More...

Public Slots

void select (int featureId, bool emitSignal=true)
 Select feature by its ID, optionally emit signal selectionChanged()
void deselect (int featureId, bool emitSignal=true)
 Deselect feature by its ID, optionally emit signal selectionChanged()
void removeSelection (bool emitSignal=true)
 Clear selection.
void triggerRepaint ()
virtual void updateExtents ()
 Update the extents for the layer.
void checkJoinLayerRemove (QString theLayerId)
 Check if there is a join with a layer that will be removed.

Signals

void selectionChanged ()
 This signal is emited when selection was changed.
void layerModified (bool onlyGeometry)
 This signal is emitted when modifications has been done on layer.
void editingStarted ()
void editingStopped ()
void attributeAdded (int idx)
void attributeDeleted (int idx)
void featureAdded (int fid)
void featureDeleted (int fid)
void layerDeleted ()
void attributeValueChanged (int fid, int idx, const QVariant &)
void committedAttributesDeleted (const QString &layerId, const QgsAttributeIds &deletedAttributeIds)
 Signals emitted after committing changes.
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)

Public Member Functions

 QgsVectorLayer (QString path=QString::null, QString baseName=QString::null, QString providerLib=QString::null, bool loadDefaultStyleFlag=true)
 Constructor.
virtual ~QgsVectorLayer ()
 Destructor.
QString storageType () const
 Returns the permanent storage type for this layer as a friendly name.
QString capabilitiesString () const
 Capabilities for this layer in a friendly format.
QString dataComment () const
 Returns a comment for the data in the layer.
void setDisplayField (QString fldName="")
 Set the primary display field to be used in the identify results dialog.
const QString displayField () const
 Returns the primary display field name used in the identify results dialog.
QgsVectorDataProviderdataProvider ()
 Returns the data provider.
const QgsVectorDataProviderdataProvider () const
 Returns the data provider in a const-correct manner.
void setProviderEncoding (const QString &encoding)
 Sets the textencoding of the data provider.
void setCoordinateSystem ()
 Setup the coordinate system tranformation for the layer.
void addJoin (QgsVectorJoinInfo joinInfo)
 Joins another vector layer to this layer.
void removeJoin (const QString &joinLayerId)
 Removes a vector layer join.
const QList< QgsVectorJoinInfo > & vectorJoins () const
QgsLabellabel ()
 Get the label object associated with this layer.
const QgsLabellabel () const
QgsAttributeActionactions ()
int selectedFeatureCount ()
 The number of features that are selected in this layer.
void select (QgsRectangle &rect, bool lock)
 Select features found within the search rectangle (in layer's coordinates)
void invertSelection ()
 Select not selected features and deselect selected ones.
void invertSelectionInRectangle (QgsRectangle &rect)
 Invert selection of features found within the search rectangle (in layer's coordinates)
QgsFeatureList selectedFeatures ()
 Get a copy of the user-selected features.
const QgsFeatureIdsselectedFeaturesIds () const
 Return reference to identifiers of selected features.
void setSelectedFeatures (const QgsFeatureIds &ids)
 Change selection to the new set of features.
QgsRectangle boundingBoxOfSelected ()
 Returns the bounding box of the selected features.
bool copySymbologySettings (const QgsMapLayer &other)
 Copies the symbology settings from another layer.
bool hasCompatibleSymbology (const QgsMapLayer &other) const
 Returns true if this layer can be in the same symbology group with another layer.
const QgsRendererrenderer () const
 Returns a pointer to the renderer.
void setRenderer (QgsRenderer *r)
 Sets the renderer.
void setDiagramRenderer (QgsDiagramRendererV2 *r)
 Sets diagram rendering object (takes ownership)
const QgsDiagramRendererV2diagramRenderer () const
void setDiagramLayerSettings (const QgsDiagramLayerSettings &s)
const QgsDiagramLayerSettingsdiagramLayerSettings () const
QgsFeatureRendererV2rendererV2 ()
 Return renderer V2.
void setRendererV2 (QgsFeatureRendererV2 *r)
 Set renderer V2.
bool isUsingRendererV2 ()
 Return whether using renderer V2.
void setUsingRendererV2 (bool usingRendererV2)
 set whether to use renderer V2 for drawing.
void drawRendererV2 (QgsRenderContext &rendererContext, bool labeling)
 Draw layer with renderer V2.
void drawRendererV2Levels (QgsRenderContext &rendererContext, bool labeling)
 Draw layer with renderer V2 using symbol levels.
QGis::GeometryType geometryType () const
 Returns point, line or polygon.
bool hasGeometryType () const
 Returns true if this is a geometry layer and false in case of NoGeometry (table only) or UnknownGeometry.
QGis::WkbType wkbType () const
 Returns the WKBType or WKBUnknown in case of error.
QString providerType () const
 Return the provider type for this layer.
virtual bool readXml (QDomNode &layer_node)
 reads vector layer specific state from project file Dom node.
virtual bool writeXml (QDomNode &layer_node, QDomDocument &doc)
 write vector layer specific state to project file Dom node.
bool readSymbology (const QDomNode &node, QString &errorMessage)
 Read the symbology for the current layer from the Dom node supplied.
bool writeSymbology (QDomNode &node, QDomDocument &doc, QString &errorMessage) const
 Write the symbology for the layer into the docment provided.
virtual long featureCount () const
 Number of features in the layer.
virtual long updateFeatureCount () const
 This function does nothing useful, it's kept only for compatibility.
virtual bool setSubsetString (QString subset)
 Set the string (typically sql) used to define a subset of the layer.
virtual QString subsetString ()
 Get the string (typically sql) used to define a subset of the layer.
void select (QgsAttributeList fetchAttributes, QgsRectangle rect=QgsRectangle(), bool fetchGeometry=true, bool useIntersect=false)
 Select features with or without attributes in a given window.
bool nextFeature (QgsFeature &feature)
 fetch a feature (after select)
bool featureAtId (int featureId, QgsFeature &f, bool fetchGeometries=true, bool fetchAttributes=true)
 Gets the feature at the given feature id.
bool addFeature (QgsFeature &f, bool alsoUpdateExtent=true)
 Adds a feature.
bool insertVertex (double x, double y, int atFeatureId, int beforeVertex)
 Insert a new vertex before the given vertex number, in the given ring, item (first number is index 0), and feature Not meaningful for Point geometries.
bool moveVertex (double x, double y, int atFeatureId, int atVertex)
 Moves the vertex at the given position number, ring and item (first number is index 0), and feature to the given coordinates.
bool deleteVertex (int atFeatureId, int atVertex)
 Deletes a vertex from a feature.
bool deleteSelectedFeatures ()
 Deletes the selected features.
int addRing (const QList< QgsPoint > &ring)
 Adds a ring to polygon/multipolygon features.
int addIsland (const QList< QgsPoint > &ring)
 Adds a new island polygon to a multipolygon feature.
int translateFeature (int featureId, double dx, double dy)
 Translates feature by dx, dy.
int splitFeatures (const QList< QgsPoint > &splitLine, bool topologicalEditing=false)
 Splits features cut by the given line.
int removePolygonIntersections (QgsGeometry *geom)
 Changes the specified geometry such that it has no intersections with other polygon (or multipolygon) geometries in this vector layer.
int addTopologicalPoints (QgsGeometry *geom)
 Adds topological points for every vertex of the geometry.
int addTopologicalPoints (const QgsPoint &p)
 Adds a vertex to segments which intersect point p but don't already have a vertex there.
int insertSegmentVerticesForSnap (const QList< QgsSnappingResult > &snapResults)
 Inserts vertices to the snapped segments.
void enableLabels (bool on)
 Set labels on.
bool hasLabelsEnabled (void) const
 Label is on.
virtual bool isEditable () const
 Returns true if the provider is in editing mode.
virtual bool isReadOnly () const
 Returns true if the provider is in read-only mode.
virtual bool isModified () const
 Returns true if the provider has been modified since the last commit.
bool snapPoint (QgsPoint &point, double tolerance)
 Snaps a point to the closest vertex if there is one within the snapping tolerance.
int snapWithContext (const QgsPoint &startPoint, double snappingTolerance, QMultiMap< double, QgsSnappingResult > &snappingResults, QgsSnapper::SnappingType snap_to)
 Snaps to segment or vertex within given tolerance.
virtual void reload ()
 Synchronises with changes in the datasource.
bool draw (QgsRenderContext &rendererContext)
 Draws the layer.
void drawLabels (QgsRenderContext &rendererContext)
 Draws the layer labels using coordinate transformation.
const QgsFieldMappendingFields () const
 returns field list in the to-be-committed state
QgsAttributeList pendingAllAttributesList ()
 returns list of attributes
int pendingFeatureCount ()
 returns feature count after commit
bool setReadOnly (bool readonly=true)
 Make layer read-only (editing disabled) or not.
void setModified (bool modified=true, bool onlyGeometryWasModified=false)
 Sets whether some features are modified or not.
bool startEditing ()
 Make layer editable.
bool changeGeometry (int fid, QgsGeometry *geom)
 change feature's geometry
bool changeAttributeValue (int fid, int field, QVariant value, bool emitSignal=true)
 changed an attribute value (but does not commit it)
bool addAttribute (const QgsField &field)
 add an attribute field (but does not commit it) returns true if the field was added
Q_DECL_DEPRECATED bool addAttribute (QString name, QString type)
 add an attribute field (but does not commit it) returns true if the field was added
void addAttributeAlias (int attIndex, QString aliasString)
 Sets an alias (a display name) for attributes to display in dialogs.
QString attributeAlias (int attributeIndex) const
 Returns the alias of an attribute name or an empty string if there is no alias.
QString attributeDisplayName (int attributeIndex) const
 Convenience function that returns the attribute alias if defined or the field name else.
bool deleteAttribute (int attr)
 delete an attribute field (but does not commit it)
bool addFeatures (QgsFeatureList features, bool makeSelected=true)
 Insert a copy of the given features into the layer (but does not commit it)
bool deleteFeature (int fid)
 delete a feature from the layer (but does not commit it)
bool commitChanges ()
 Attempts to commit any changes to disk.
const QStringList & commitErrors ()
bool rollBack ()
 Stop editing and discard the edits.
EditType editType (int idx)
 get edit type
void setEditType (int idx, EditType edit)
 set edit type
void setCheckedState (int idx, QString checked, QString notChecked)
 set string representing 'true' for a checkbox (added in 1.4)
QPair< QString, QString > checkedState (int idx)
 return string representing 'true' for a checkbox (added in 1.4)
QString editForm ()
 get edit form (added in 1.4)
void setEditForm (QString ui)
 set edit form (added in 1.4)
QString annotationForm () const
 get annotation form (added in 1.5)
void setAnnotationForm (const QString &ui)
 set annotation form for layer (added in 1.5)
QString editFormInit ()
 get python function for edit form initialization (added in 1.4)
void setEditFormInit (QString function)
 set python function for edit form initialization (added in 1.4)
QMap< QString, QVariant > & valueMap (int idx)
 access value map
RangeDatarange (int idx)
 access range
void addOverlay (QgsVectorOverlay *overlay)
 Adds a new overlay to this class.
void removeOverlay (const QString &typeName)
 Removes all overlays of a given type.
void vectorOverlays (QList< QgsVectorOverlay * > &overlayList)
 Returns pointers to the overlays of this layer.
QgsVectorOverlayfindOverlayByType (const QString &typeName)
 Returns the (first) overlay of a type, e.g.
void beginEditCommand (QString text)
 Create edit command for undo/redo operations.
void endEditCommand ()
 Finish edit command and add it to undo/redo stack.
void destroyEditCommand ()
 Destroy active command and reverts all changes in it.
void undoEditCommand (QgsUndoCommand *cmd)
 Execute undo operation.
void redoEditCommand (QgsUndoCommand *cmd)
 Execute redo operation.
int fieldNameIndex (const QString &fieldName) const
 Returns the index of a field name or -1 if the field does not exist.
void updateFieldMap ()
 Assembles mUpdatedFields considering provider fields, joined fields and added fields.
void createJoinCaches ()
 Caches joined attributes if required (and not already done)
void uniqueValues (int index, QList< QVariant > &uniqueValues, int limit=-1)
 Returns unique values for column.
QVariant minimumValue (int index)
 Returns minimum value for an attribute column or invalid variant in case of error.
QVariant maximumValue (int index)
 Returns maximum value for an attribute column or invalid variant in case of error.

Static Public Member Functions

static void drawVertexMarker (double x, double y, QPainter &p, QgsVectorLayer::VertexMarkerType type, int vertexSize)
 Draws a vertex symbol at (screen) coordinates x, y.

Private Member Functions

 QgsVectorLayer (QgsVectorLayer const &rhs)
 vector layers are not copyable
QgsVectorLayeroperator= (QgsVectorLayer const &rhs)
 vector layers are not copyable
bool setDataProvider (QString const &provider)
 bind layer to a specific data provider
void drawFeature (QgsRenderContext &renderContext, QgsFeature &fet, QImage *marker)
 Draws features.
void transformPoint (double &x, double &y, const QgsMapToPixel *mtp, const QgsCoordinateTransform *ct)
 Convenience function to transform the given point.
void transformPoints (std::vector< double > &x, std::vector< double > &y, std::vector< double > &z, QgsRenderContext &renderContext)
unsigned char * drawLineString (unsigned char *WKBlinestring, QgsRenderContext &renderContext)
 Draw the linestring as given in the WKB format.
unsigned char * drawPolygon (unsigned char *WKBpolygon, QgsRenderContext &renderContext)
 Draw the polygon as given in the WKB format.
int findFreeId ()
 Goes through all features and finds a free id (e.g.
void deleteCachedGeometries ()
 Deletes the geometries in mCachedGeometries.
void snapToGeometry (const QgsPoint &startPoint, int featureId, QgsGeometry *geom, double sqrSnappingTolerance, QMultiMap< double, QgsSnappingResult > &snappingResults, QgsSnapper::SnappingType snap_to) const
 Snaps to a geometry and adds the result to the multimap if it is within the snapping result.
int boundingBoxFromPointList (const QList< QgsPoint > &list, double &xmin, double &ymin, double &xmax, double &ymax) const
 Little helper function that gives bounding box from a list of points.
void updateFeatureAttributes (QgsFeature &f, bool all=false)
 Update feature with uncommited attribute updates and joined attributes.
void addJoinedFeatureAttributes (QgsFeature &f, const QgsVectorJoinInfo &joinInfo, const QString &joinFieldName, const QVariant &joinValue, const QgsAttributeList &attributes, int attributeIndexOffset)
 Adds joined attributes to a feature.
void updateFeatureGeometry (QgsFeature &f)
 Update feature with uncommited geometry updates.
void editGeometryChange (int featureId, QgsGeometry &geometry)
 Record changed geometry, store in active command (if any)
void editFeatureAdd (QgsFeature &feature)
 Record added feature, store in active command (if any)
void editFeatureDelete (int featureId)
 Record deleted feature, store in active command (if any)
void editAttributeChange (int featureId, int field, QVariant value)
 Record changed attribute, store in active command (if any)
void stopRendererV2 (QgsRenderContext &rendererContext, QgsSingleSymbolRendererV2 *selRenderer)
 Stop version 2 renderer and selected renderer (if required)
void updateAttributeMapIndex (QgsAttributeMap &map, int oldIndex, int newIndex) const
 Updates an index in an attribute map to a new value (usually necessary because of a join operation)
void prepareLabelingAndDiagrams (QgsRenderContext &rendererContext, QgsAttributeList &attributes, bool &labeling)
 Registers label and diagram layer.

Static Private Member Functions

static
QgsVectorLayer::VertexMarkerType 
currentVertexMarkerType ()
 Reads vertex marker type from settings.
static int currentVertexMarkerSize ()
 Reads vertex marker size from settings.

Private Attributes

int mUpdateThreshold
 Update threshold for drawing features as they are read.
QgsVectorDataProvidermDataProvider
 Pointer to data provider derived from the abastract base class QgsDataProvider.
QString mDisplayField
 index of the primary label field
QString mProviderKey
 Data provider key.
QgsAttributeActionmActions
 The user-defined actions that are accessed from the Identify Results dialog box.
bool mEditable
 Flag indicating whether the layer is in editing mode or not.
bool mReadOnly
 Flag indicating whether the layer is in read-only mode (editing disabled) or not.
bool mModified
 Flag indicating whether the layer has been modified since the last commit.
QgsGeometryMap mCachedGeometries
 cache of the committed geometries retrieved *for the current display*
QgsRectangle mCachedGeometriesRect
 extent for which there are cached geometries
QgsFeatureIds mSelectedFeatureIds
 Set holding the feature IDs that are activated.
QgsFeatureIds mDeletedFeatureIds
 Deleted feature IDs which are not commited.
QgsFeatureList mAddedFeatures
 New features which are not commited.
QgsChangedAttributesMap mChangedAttributeValues
 Changed attributes values which are not commited.
QgsAttributeIds mDeletedAttributeIds
 deleted attributes fields which are not commited
QgsAttributeIds mAddedAttributeIds
 added attributes fields which are not commited
QgsGeometryMap mChangedGeometries
 Changed geometries which are not commited.
QgsFieldMap mUpdatedFields
 field map to commit
QMap< QString, QString > mAttributeAliasMap
 Map that stores the aliases for attributes.
int mMaxUpdatedIndex
 max field index
int mWkbType
 Geometry type as defined in enum WkbType (qgis.h)
QgsUndoCommandmActiveCommand
QgsRenderermRenderer
 Renderer object which holds the information about how to display the features.
QgsFeatureRendererV2mRendererV2
 Renderer V2.
bool mUsingRendererV2
 whether to use V1 or V2 renderer
QgsLabelmLabel
 Label.
bool mLabelOn
 Display labels.
QgsVectorLayer::VertexMarkerType mCurrentVertexMarkerType
 The current type of editing marker.
int mCurrentVertexMarkerSize
 The current size of editing marker.
bool mVertexMarkerOnlyForSelection
 Flag if the vertex markers should be drawn only for selection (true) or for all features (false)
QList< QgsVectorOverlay * > mOverlays
 List of overlays.
QStringList mCommitErrors
QMap< QString, EditTypemEditTypes
QMap< QString, QMap< QString,
QVariant > > 
mValueMaps
QMap< QString, RangeDatamRanges
QMap< QString, QPair< QString,
QString > > 
mCheckedStates
QString mEditForm
QString mEditFormInit
QString mAnnotationForm
bool mFetching
QgsRectangle mFetchRect
QgsAttributeList mFetchAttributes
QgsAttributeList mFetchProvAttributes
bool mFetchGeometry
QSet< int > mFetchConsidered
QgsGeometryMap::iterator mFetchChangedGeomIt
QgsFeatureList::iterator mFetchAddedFeaturesIt
QgsVectorLayerJoinBuffermJoinBuffer
QgsDiagramRendererV2mDiagramRenderer
QgsDiagramLayerSettingsmDiagramLayerSettings

Detailed Description

Vector layer backed by a data source provider.

Definition at line 87 of file qgsvectorlayer.h.


Member Enumeration Documentation

Enumerator:
LineEdit 
UniqueValues 
UniqueValuesEditable 
ValueMap 
Classification 
EditRange 
SliderRange 
CheckBox 
FileName 
Enumeration 
Immutable 
Hidden 
TextEdit 
Calendar 
DialRange 

Definition at line 92 of file qgsvectorlayer.h.

Editing vertex markers.

Note:
public from version 1.4
Enumerator:
SemiTransparentCircle 
Cross 
NoMarker 

Definition at line 636 of file qgsvectorlayer.h.


Constructor & Destructor Documentation

QgsVectorLayer::QgsVectorLayer ( QString  path = QString::null,
QString  baseName = QString::null,
QString  providerLib = QString::null,
bool  loadDefaultStyleFlag = true 
)
QgsVectorLayer::QgsVectorLayer ( QgsVectorLayer const &  rhs) [private]

vector layers are not copyable


Member Function Documentation

Definition at line 173 of file qgsvectorlayer.h.

bool QgsVectorLayer::addAttribute ( const QgsField field)

add an attribute field (but does not commit it) returns true if the field was added

Note:
added in version 1.2

Definition at line 3322 of file qgsvectorlayer.cpp.

References attributeAdded(), isEditable(), mActiveCommand, mAddedAttributeIds, mDataProvider, mMaxUpdatedIndex, mUpdatedFields, QgsField::name(), setModified(), QgsUndoCommand::storeAttributeAdd(), and QgsVectorDataProvider::supportedType().

Referenced by addAttribute().

bool QgsVectorLayer::addAttribute ( QString  name,
QString  type 
)

add an attribute field (but does not commit it) returns true if the field was added

Deprecated:

Definition at line 3356 of file qgsvectorlayer.cpp.

References addAttribute(), mDataProvider, QgsVectorDataProvider::nativeTypes(), and QgsMapLayer::type().

void QgsVectorLayer::addAttributeAlias ( int  attIndex,
QString  aliasString 
)

Sets an alias (a display name) for attributes to display in dialogs.

Note:
added in version 1.2

Definition at line 3367 of file qgsvectorlayer.cpp.

References layerModified(), mAttributeAliasMap, QgsMapLayer::name(), and pendingFields().

bool QgsVectorLayer::addFeature ( QgsFeature f,
bool  alsoUpdateExtent = true 
)

Adds a feature.

Parameters:
ffeature to add
alsoUpdateExtentIf True, will also go to the effort of e.g. updating the extents.
Returns:
True in case of success and False in case of error

Definition at line 1899 of file qgsvectorlayer.cpp.

References QgsVectorDataProvider::AddFeatures, QgsVectorDataProvider::capabilities(), editFeatureAdd(), featureAdded(), QgsFeature::geometry(), QgsFeature::id(), isEditable(), mCachedGeometries, mDataProvider, QgsDebugMsg, QgsFeature::setFeatureId(), setModified(), and updateExtents().

Referenced by addFeatures().

bool QgsVectorLayer::addFeatures ( QgsFeatureList  features,
bool  makeSelected = true 
)

Insert a copy of the given features into the layer (but does not commit it)

Definition at line 3867 of file qgsvectorlayer.cpp.

References addFeature(), QgsVectorDataProvider::AddFeatures, QgsVectorDataProvider::capabilities(), isEditable(), mDataProvider, mSelectedFeatureIds, selectionChanged(), QgsMapLayer::setCacheImage(), and updateExtents().

Referenced by splitFeatures().

int QgsVectorLayer::addIsland ( const QList< QgsPoint > &  ring)

Adds a new island polygon to a multipolygon feature.

Returns:
0 in case of success, 1 if selected feature is not multipolygon, 2 if ring is not a valid geometry, 3 if new polygon ring not disjoint with existing rings, 4 if no feature was selected, 5 if several features are selected, 6 if selected geometry not found

Definition at line 2135 of file qgsvectorlayer.cpp.

References QgsGeometry::addIsland(), editGeometryChange(), featureAtId(), QgsFeature::geometryAndOwnership(), hasGeometryType(), mAddedFeatures, mCachedGeometries, mChangedGeometries, mSelectedFeatureIds, QgsDebugMsg, and setModified().

Joins another vector layer to this layer.

Parameters:
joinInfojoin object containing join layer id, target and source field
Note:
added in 1.7

Definition at line 4920 of file qgsvectorlayer.cpp.

References QgsVectorLayerJoinBuffer::addJoin(), mJoinBuffer, and updateFieldMap().

void QgsVectorLayer::addJoinedFeatureAttributes ( QgsFeature f,
const QgsVectorJoinInfo joinInfo,
const QString &  joinFieldName,
const QVariant &  joinValue,
const QgsAttributeList attributes,
int  attributeIndexOffset 
) [private]

Adds joined attributes to a feature.

Parameters:
fthe feature to add the attributes
joinInfovector join
joinFieldNamename of the (source) join Field
joinValuelookup value for join
attributes(join layer) attribute indices to add
attributeIndexOffsetindex offset to get from join layer attribute index to layer index

Definition at line 1560 of file qgsvectorlayer.cpp.

References QgsFeature::addAttribute(), QgsFeature::attributeMap(), QgsVectorJoinInfo::cachedAttributes, dataProvider(), QgsMapLayerRegistry::instance(), QgsVectorJoinInfo::joinLayerId, QgsMapLayerRegistry::mapLayer(), nextFeature(), select(), QgsDataProvider::setSubsetString(), QgsDataProvider::subsetString(), and subsetString().

Adds a new overlay to this class.

QgsVectorLayer takes ownership of the object

Note:
this method was added in version 1.1

Definition at line 4499 of file qgsvectorlayer.cpp.

References mOverlays.

int QgsVectorLayer::addRing ( const QList< QgsPoint > &  ring)

Adds a ring to polygon/multipolygon features.

Returns:
0 in case of success, 1 problem with feature type, 2 ring not closed, 3 ring not valid, 4 ring crosses existing rings, 5 no feature found where ring can be inserted

Definition at line 2098 of file qgsvectorlayer.cpp.

References QgsGeometry::addRing(), boundingBoxFromPointList(), editGeometryChange(), QgsFeature::geometry(), hasGeometryType(), QgsFeature::id(), nextFeature(), select(), setModified(), QgsRectangle::setXMaximum(), QgsRectangle::setXMinimum(), QgsRectangle::setYMaximum(), and QgsRectangle::setYMinimum().

Adds topological points for every vertex of the geometry.

Parameters:
geomthe geometry where each vertex is added to segments of other features
Note:
geom is not going to be modified by the function
Returns:
0 in case of success
See also:
addTopologicalPoints

Definition at line 2417 of file qgsvectorlayer.cpp.

References QgsGeometry::asMultiPolygon(), QgsGeometry::asMultiPolyline(), QgsGeometry::asPolygon(), QgsGeometry::asPolyline(), hasGeometryType(), QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPolygon, QGis::WKBPolygon25D, QgsGeometry::wkbType(), and wkbType().

Referenced by splitFeatures().

Adds a vertex to segments which intersect point p but don't already have a vertex there.

If a feature already has a vertex at position p, no additional vertex is inserted. This method is useful for topological editing.

Parameters:
pposition of the vertex
Returns:
0 in case of success

Definition at line 2524 of file qgsvectorlayer.cpp.

References QGis::Feet, hasGeometryType(), insertSegmentVerticesForSnap(), QgsCoordinateReferenceSystem::mapUnits(), QgsMapLayer::mCRS, QGis::Meters, QgsSnapper::SnapToSegment, QgsSnapper::SnapToVertex, and snapWithContext().

QString QgsVectorLayer::annotationForm ( ) const [inline]

get annotation form (added in 1.5)

Definition at line 573 of file qgsvectorlayer.h.

Referenced by QgsFormAnnotationItem::QgsFormAnnotationItem().

void QgsVectorLayer::attributeAdded ( int  idx) [signal]
QString QgsVectorLayer::attributeAlias ( int  attributeIndex) const

Returns the alias of an attribute name or an empty string if there is no alias.

Note:
added in version 1.2

Definition at line 3378 of file qgsvectorlayer.cpp.

References mAttributeAliasMap, QgsMapLayer::name(), and pendingFields().

Referenced by attributeDisplayName(), and QgsComposerAttributeTable::initializeAliasMap().

void QgsVectorLayer::attributeDeleted ( int  idx) [signal]
QString QgsVectorLayer::attributeDisplayName ( int  attributeIndex) const

Convenience function that returns the attribute alias if defined or the field name else.

Note:
added in version 1.2

Definition at line 3388 of file qgsvectorlayer.cpp.

References attributeAlias(), and pendingFields().

Referenced by QgsLegendModel::addVectorLayerItems(), and QgsAttributeAction::expandAction().

void QgsVectorLayer::attributeValueChanged ( int  fid,
int  idx,
const QVariant &   
) [signal]
void QgsVectorLayer::beginEditCommand ( QString  text)

Create edit command for undo/redo operations.

Parameters:
texttext which is to be displayed in undo window

Definition at line 4641 of file qgsvectorlayer.cpp.

References mActiveCommand.

int QgsVectorLayer::boundingBoxFromPointList ( const QList< QgsPoint > &  list,
double &  xmin,
double &  ymin,
double &  xmax,
double &  ymax 
) const [private]

Little helper function that gives bounding box from a list of points.

Returns:
0 in case of success

Definition at line 4138 of file qgsvectorlayer.cpp.

References MathUtils::max().

Referenced by addRing(), and splitFeatures().

Capabilities for this layer in a friendly format.

Definition at line 218 of file qgsvectorlayer.cpp.

References QgsVectorDataProvider::capabilitiesString(), and mDataProvider.

bool QgsVectorLayer::changeAttributeValue ( int  fid,
int  field,
QVariant  value,
bool  emitSignal = true 
)

changed an attribute value (but does not commit it)

Definition at line 3308 of file qgsvectorlayer.cpp.

References attributeValueChanged(), editAttributeChange(), isEditable(), and setModified().

bool QgsVectorLayer::changeGeometry ( int  fid,
QgsGeometry geom 
)

change feature's geometry

Note:
added in version 1.2

Definition at line 3294 of file qgsvectorlayer.cpp.

References editGeometryChange(), hasGeometryType(), mCachedGeometries, mDataProvider, mEditable, and setModified().

QPair< QString, QString > QgsVectorLayer::checkedState ( int  idx)

return string representing 'true' for a checkbox (added in 1.4)

Definition at line 4897 of file qgsvectorlayer.cpp.

References mCheckedStates, QgsMapLayer::name(), and pendingFields().

Referenced by QgsAttributeEditor::retrieveValue(), and QgsAttributeEditor::setValue().

void QgsVectorLayer::checkJoinLayerRemove ( QString  theLayerId) [slot]

Check if there is a join with a layer that will be removed.

Note:
added in 1.7

Definition at line 4926 of file qgsvectorlayer.cpp.

References removeJoin().

Referenced by QgsVectorLayer().

Attempts to commit any changes to disk.

Returns the result of the attempt. If a commit fails, the in-memory changes are left alone.

This allows editing to continue if the commit failed on e.g. a disallowed value in a Postgres database - the user can re-edit and try again.

The commits occur in distinct stages, (add attributes, add features, change attribute values, change geometries, delete features, delete attributes) so if a stage fails, it's difficult to roll back cleanly. Therefore any error message also includes which stage failed so that the user has some chance of repairing the damage cleanly.

Definition at line 3466 of file qgsvectorlayer.cpp.

References QgsVectorDataProvider::AddAttributes, QgsVectorDataProvider::addAttributes(), QgsVectorDataProvider::AddFeatures, QgsVectorDataProvider::addFeatures(), QgsVectorDataProvider::capabilities(), QgsVectorDataProvider::ChangeAttributeValues, QgsVectorDataProvider::changeAttributeValues(), QgsVectorDataProvider::ChangeGeometries, QgsVectorDataProvider::changeGeometryValues(), committedAttributesAdded(), committedAttributesDeleted(), committedAttributeValuesChanges(), committedFeaturesAdded(), committedFeaturesRemoved(), committedGeometriesChanges(), QgsVectorDataProvider::DeleteAttributes, QgsVectorDataProvider::deleteAttributes(), deleteCachedGeometries(), QgsVectorDataProvider::DeleteFeatures, QgsVectorDataProvider::deleteFeatures(), editingStopped(), QgsVectorDataProvider::fields(), QgsFeature::id(), isEditable(), mAddedAttributeIds, mAddedFeatures, mChangedAttributeValues, mChangedGeometries, mCommitErrors, mDataProvider, mDeletedAttributeIds, mDeletedFeatureIds, mEditable, mUpdatedFields, QgsMapLayer::name(), QgsDebugMsg, QgsMapLayer::setCacheImage(), QgsFeature::setGeometry(), setModified(), QgsMapLayer::undoStack(), QgsDataProvider::updateExtents(), and updateFieldMap().

const QStringList & QgsVectorLayer::commitErrors ( )

Definition at line 3761 of file qgsvectorlayer.cpp.

References mCommitErrors.

void QgsVectorLayer::committedAttributesAdded ( const QString &  layerId,
const QList< QgsField > &  addedAttributes 
) [signal]

Referenced by commitChanges().

void QgsVectorLayer::committedAttributesDeleted ( const QString &  layerId,
const QgsAttributeIds deletedAttributeIds 
) [signal]

Signals emitted after committing changes.

Note:
added in v1.6

Referenced by commitChanges().

void QgsVectorLayer::committedAttributeValuesChanges ( const QString &  layerId,
const QgsChangedAttributesMap changedAttributesValues 
) [signal]

Referenced by commitChanges().

void QgsVectorLayer::committedFeaturesAdded ( const QString &  layerId,
const QgsFeatureList addedFeatures 
) [signal]

Referenced by commitChanges().

void QgsVectorLayer::committedFeaturesRemoved ( const QString &  layerId,
const QgsFeatureIds deletedFeatureIds 
) [signal]

Referenced by commitChanges().

void QgsVectorLayer::committedGeometriesChanges ( const QString &  layerId,
const QgsGeometryMap changedGeometries 
) [signal]

Referenced by commitChanges().

bool QgsVectorLayer::copySymbologySettings ( const QgsMapLayer other) [virtual]

Copies the symbology settings from another layer.

Returns true in case of success

Implements QgsMapLayer.

Definition at line 3913 of file qgsvectorlayer.cpp.

References QgsRenderer::clone(), hasGeometryType(), and mRenderer.

Caches joined attributes if required (and not already done)

Note:
added in 1.7

Definition at line 5005 of file qgsvectorlayer.cpp.

References QgsVectorLayerJoinBuffer::containsJoins(), QgsVectorLayerJoinBuffer::createJoinCaches(), and mJoinBuffer.

int QgsVectorLayer::currentVertexMarkerSize ( ) [static, private]

Reads vertex marker size from settings.

Definition at line 4191 of file qgsvectorlayer.cpp.

Referenced by draw(), and drawRendererV2Levels().

Reads vertex marker type from settings.

Definition at line 4173 of file qgsvectorlayer.cpp.

References Cross, NoMarker, and SemiTransparentCircle.

Referenced by draw(), and drawRendererV2Levels().

QString QgsVectorLayer::dataComment ( ) const

Returns a comment for the data in the layer.

Definition at line 227 of file qgsvectorlayer.cpp.

References QgsVectorDataProvider::dataComment(), and mDataProvider.

Returns the data provider in a const-correct manner.

Definition at line 1286 of file qgsvectorlayer.cpp.

References mDataProvider.

bool QgsVectorLayer::deleteAttribute ( int  attr)

Deletes the geometries in mCachedGeometries.

Definition at line 1134 of file qgsvectorlayer.cpp.

References mCachedGeometries, and mCachedGeometriesRect.

Referenced by commitChanges(), draw(), rollBack(), and ~QgsVectorLayer().

bool QgsVectorLayer::deleteFeature ( int  fid)

delete a feature from the layer (but does not commit it)

Definition at line 3431 of file qgsvectorlayer.cpp.

References editFeatureDelete(), featureDeleted(), isEditable(), mDeletedFeatureIds, mSelectedFeatureIds, and setModified().

Referenced by deleteSelectedFeatures().

bool QgsVectorLayer::deleteVertex ( int  atFeatureId,
int  atVertex 
)
void QgsVectorLayer::deselect ( int  featureId,
bool  emitSignal = true 
) [slot]

Deselect feature by its ID, optionally emit signal selectionChanged()

Definition at line 1170 of file qgsvectorlayer.cpp.

References mSelectedFeatureIds, selectionChanged(), and QgsMapLayer::setCacheImage().

Referenced by invertSelectionInRectangle().

Destroy active command and reverts all changes in it.

Definition at line 4659 of file qgsvectorlayer.cpp.

References mActiveCommand, and undoEditCommand().

Definition at line 216 of file qgsvectorlayer.h.

Definition at line 213 of file qgsvectorlayer.h.

const QString QgsVectorLayer::displayField ( ) const

Returns the primary display field name used in the identify results dialog.

Definition at line 4390 of file qgsvectorlayer.cpp.

References mDisplayField.

Referenced by writeSymbology().

bool QgsVectorLayer::draw ( QgsRenderContext rendererContext) [virtual]
void QgsVectorLayer::drawFeature ( QgsRenderContext renderContext,
QgsFeature fet,
QImage *  marker 
) [private]
void QgsVectorLayer::drawLabels ( QgsRenderContext rendererContext) [virtual]
unsigned char * QgsVectorLayer::drawLineString ( unsigned char *  WKBlinestring,
QgsRenderContext renderContext 
) [private]
unsigned char * QgsVectorLayer::drawPolygon ( unsigned char *  WKBpolygon,
QgsRenderContext renderContext 
) [private]
void QgsVectorLayer::drawRendererV2 ( QgsRenderContext rendererContext,
bool  labeling 
)
void QgsVectorLayer::drawRendererV2Levels ( QgsRenderContext rendererContext,
bool  labeling 
)
void QgsVectorLayer::drawVertexMarker ( double  x,
double  y,
QPainter &  p,
QgsVectorLayer::VertexMarkerType  type,
int  vertexSize 
) [static]

Draws a vertex symbol at (screen) coordinates x, y.

(Useful to assist vertex editing.)

Note:
public and static from version 1.4

Definition at line 1141 of file qgsvectorlayer.cpp.

References Cross, and SemiTransparentCircle.

Referenced by drawLineString(), drawPolygon(), and QgsFeatureRendererV2::renderVertexMarker().

void QgsVectorLayer::editAttributeChange ( int  featureId,
int  field,
QVariant  value 
) [private]

Record changed attribute, store in active command (if any)

Definition at line 4587 of file qgsvectorlayer.cpp.

References mActiveCommand, mAddedFeatures, mChangedAttributeValues, and QgsUndoCommand::storeAttributeChange().

Referenced by changeAttributeValue().

void QgsVectorLayer::editFeatureAdd ( QgsFeature feature) [private]

Record added feature, store in active command (if any)

Definition at line 4569 of file qgsvectorlayer.cpp.

References mActiveCommand, mAddedFeatures, and QgsUndoCommand::storeFeatureAdd().

Referenced by addFeature().

void QgsVectorLayer::editFeatureDelete ( int  featureId) [private]

Record deleted feature, store in active command (if any)

Definition at line 4578 of file qgsvectorlayer.cpp.

References mActiveCommand, mDeletedFeatureIds, and QgsUndoCommand::storeFeatureDelete().

Referenced by deleteFeature().

get edit form (added in 1.4)

Definition at line 4442 of file qgsvectorlayer.cpp.

References mEditForm.

get python function for edit form initialization (added in 1.4)

Definition at line 4457 of file qgsvectorlayer.cpp.

References mEditFormInit.

void QgsVectorLayer::editGeometryChange ( int  featureId,
QgsGeometry geometry 
) [private]

Record changed geometry, store in active command (if any)

Definition at line 4559 of file qgsvectorlayer.cpp.

References mActiveCommand, mChangedGeometries, and QgsUndoCommand::storeGeometryChange().

Referenced by addIsland(), addRing(), changeGeometry(), deleteVertex(), insertVertex(), moveVertex(), splitFeatures(), and translateFeature().

void QgsVectorLayer::editingStarted ( ) [signal]

Referenced by startEditing().

void QgsVectorLayer::editingStopped ( ) [signal]

Referenced by commitChanges(), and rollBack().

void QgsVectorLayer::enableLabels ( bool  on)

Set labels on.

Definition at line 2591 of file qgsvectorlayer.cpp.

References mLabelOn.

Referenced by readSymbology().

Finish edit command and add it to undo/redo stack.

Definition at line 4649 of file qgsvectorlayer.cpp.

References mActiveCommand, and QgsMapLayer::undoStack().

void QgsVectorLayer::featureAdded ( int  fid) [signal]
bool QgsVectorLayer::featureAtId ( int  featureId,
QgsFeature f,
bool  fetchGeometries = true,
bool  fetchAttributes = true 
)
long QgsVectorLayer::featureCount ( ) const [virtual]

Number of features in the layer.

This is necessary if features are added/deleted or the layer has been subsetted. If the data provider chooses not to support this feature, the total number of features can be returned.

Returns:
long containing number of features

Definition at line 1430 of file qgsvectorlayer.cpp.

References QgsVectorDataProvider::featureCount(), mDataProvider, and QgsDebugMsg.

Referenced by QgsGeometryAnalyzer::buffer(), QgsGeometryAnalyzer::centroids(), QgsGeometryAnalyzer::convexHull(), QgsSearchQueryBuilder::countRecords(), QgsGeometryAnalyzer::dissolve(), draw(), drawLabels(), drawRendererV2(), drawRendererV2Levels(), QgsOverlayAnalyzer::intersection(), and QgsGeometryAnalyzer::simplify().

void QgsVectorLayer::featureDeleted ( int  fid) [signal]
int QgsVectorLayer::fieldNameIndex ( const QString &  fieldName) const
int QgsVectorLayer::findFreeId ( ) [private]

Goes through all features and finds a free id (e.g.

to give it temporarily to a not-commited feature)

QgsVectorOverlay * QgsVectorLayer::findOverlayByType ( const QString &  typeName)

Returns the (first) overlay of a type, e.g.

diagram or label

Note:
this method was added in version 1.1

Definition at line 4520 of file qgsvectorlayer.cpp.

References mOverlays.

bool QgsVectorLayer::hasCompatibleSymbology ( const QgsMapLayer other) const [virtual]

Returns true if this layer can be in the same symbology group with another layer.

Implements QgsMapLayer.

Definition at line 3944 of file qgsvectorlayer.cpp.

References QgsVectorDataProvider::fields(), mDataProvider, QgsMapLayer::name(), and QgsMapLayer::type().

bool QgsVectorLayer::hasLabelsEnabled ( void  ) const

Label is on.

Definition at line 2596 of file qgsvectorlayer.cpp.

References mLabelOn.

Referenced by readSymbology(), and writeSymbology().

int QgsVectorLayer::insertSegmentVerticesForSnap ( const QList< QgsSnappingResult > &  snapResults)

Inserts vertices to the snapped segments.

This is useful for topological editing if snap to segment is enabled.

Parameters:
snapResultsresults collected from the snapping operation
Returns:
0 in case of success

Definition at line 4115 of file qgsvectorlayer.cpp.

References hasGeometryType(), insertVertex(), QgsPoint::x(), and QgsPoint::y().

Referenced by addTopologicalPoints().

bool QgsVectorLayer::insertVertex ( double  x,
double  y,
int  atFeatureId,
int  beforeVertex 
)

Insert a new vertex before the given vertex number, in the given ring, item (first number is index 0), and feature Not meaningful for Point geometries.

Definition at line 1945 of file qgsvectorlayer.cpp.

References editGeometryChange(), hasGeometryType(), QgsGeometry::insertVertex(), mCachedGeometries, mChangedGeometries, mDataProvider, mEditable, and setModified().

Referenced by insertSegmentVerticesForSnap().

Select not selected features and deselect selected ones.

Definition at line 1208 of file qgsvectorlayer.cpp.

References QgsFeature::id(), mSelectedFeatureIds, nextFeature(), removeSelection(), select(), selectionChanged(), and QgsMapLayer::setCacheImage().

Invert selection of features found within the search rectangle (in layer's coordinates)

Definition at line 1234 of file qgsvectorlayer.cpp.

References deselect(), QgsFeature::id(), mSelectedFeatureIds, nextFeature(), QgsRectangle::normalize(), select(), selectionChanged(), and QgsMapLayer::setCacheImage().

bool QgsVectorLayer::isEditable ( ) const [virtual]
bool QgsVectorLayer::isModified ( ) const [virtual]

Returns true if the provider has been modified since the last commit.

Definition at line 4415 of file qgsvectorlayer.cpp.

References mModified.

Referenced by rollBack().

bool QgsVectorLayer::isReadOnly ( ) const [virtual]

Returns true if the provider is in read-only mode.

Note:
added in 1.6

Definition at line 4400 of file qgsvectorlayer.cpp.

References mReadOnly.

Return whether using renderer V2.

Note:
added in 1.4

Definition at line 4546 of file qgsvectorlayer.cpp.

References mUsingRendererV2.

Referenced by QgsLegendModel::addLayer(), QgsSymbologyV2Conversion::rendererV1toV2(), QgsSymbologyV2Conversion::rendererV2toV1(), and QgsLegendModel::updateLayer().

Get the label object associated with this layer.

Definition at line 2581 of file qgsvectorlayer.cpp.

References mLabel.

Referenced by QgsQuickPrint::scaleTextLabels().

const QgsLabel * QgsVectorLayer::label ( ) const

Definition at line 2586 of file qgsvectorlayer.cpp.

References mLabel.

void QgsVectorLayer::layerDeleted ( ) [signal]

Referenced by ~QgsVectorLayer().

void QgsVectorLayer::layerModified ( bool  onlyGeometry) [signal]

This signal is emitted when modifications has been done on layer.

Referenced by addAttributeAlias(), and setModified().

QVariant QgsVectorLayer::maximumValue ( int  index)
QVariant QgsVectorLayer::minimumValue ( int  index)
bool QgsVectorLayer::moveVertex ( double  x,
double  y,
int  atFeatureId,
int  atVertex 
)

Moves the vertex at the given position number, ring and item (first number is index 0), and feature to the given coordinates.

Definition at line 1984 of file qgsvectorlayer.cpp.

References editGeometryChange(), hasGeometryType(), mCachedGeometries, mChangedGeometries, mDataProvider, mEditable, QgsGeometry::moveVertex(), and setModified().

fetch a feature (after select)

Parameters:
featurebuffer to read the feature into
Returns:
true, if a feature was fetched, false, if there are no more features

Definition at line 1698 of file qgsvectorlayer.cpp.

References QgsFeature::attributeMap(), dataProvider(), QgsVectorDataProvider::featureAtId(), QgsFeature::id(), QgsRectangle::isEmpty(), mAddedFeatures, mChangedGeometries, mDataProvider, mEditable, mFetchAddedFeaturesIt, mFetchAttributes, mFetchChangedGeomIt, mFetchConsidered, mFetchGeometry, mFetching, mFetchProvAttributes, mFetchRect, QgsDebugMsg, QgsFeature::setAttributeMap(), QgsFeature::setFeatureId(), QgsFeature::setGeometry(), QgsFeature::setValid(), and updateFeatureAttributes().

Referenced by QgsVectorLayerJoinBuffer::addJoinedFeatureAttributes(), addJoinedFeatureAttributes(), addRing(), boundingBoxOfSelected(), QgsGeometryAnalyzer::buffer(), QgsVectorLayerJoinBuffer::cacheJoinLayer(), QgsGeometryAnalyzer::centroids(), QgsGeometryAnalyzer::convexHull(), QgsSearchQueryBuilder::countRecords(), QgsGraduatedSymbolRendererV2::createRenderer(), QgsGeometryAnalyzer::dissolve(), draw(), drawLabels(), drawRendererV2(), drawRendererV2Levels(), QgsComposerAttributeTable::getFeatureAttributes(), QgsSearchQueryBuilder::getFieldValues(), QgsOverlayAnalyzer::intersection(), invertSelection(), invertSelectionInRectangle(), maximumValue(), minimumValue(), removePolygonIntersections(), select(), QgsFormAnnotationItem::setFeatureForMapPosition(), QgsGeometryAnalyzer::simplify(), snapWithContext(), splitFeatures(), uniqueValues(), updateExtents(), and QgsVectorFileWriter::writeAsVectorFormat().

QgsVectorLayer& QgsVectorLayer::operator= ( QgsVectorLayer const &  rhs) [private]

vector layers are not copyable

returns feature count after commit

Definition at line 3459 of file qgsvectorlayer.cpp.

References QgsVectorDataProvider::featureCount(), mAddedFeatures, mDataProvider, and mDeletedFeatureIds.

void QgsVectorLayer::prepareLabelingAndDiagrams ( QgsRenderContext rendererContext,
QgsAttributeList attributes,
bool &  labeling 
) [private]

Registers label and diagram layer.

Parameters:
rendererContextrender context
attributesattributes needed for labeling and diagrams will be added to the list
labelingout: true if there will be labeling (ng) for this layer

Definition at line 5204 of file qgsvectorlayer.cpp.

References QgsLabelingEngineInterface::addDiagramLayer(), QgsDiagramRendererV2::diagramAttributes(), QgsRenderContext::labelingEngine(), mDiagramLayerSettings, mDiagramRenderer, QgsLabelingEngineInterface::prepareLayer(), QgsDiagramLayerSettings::renderer, QgsDiagramLayerSettings::xPosColumn, and QgsDiagramLayerSettings::yPosColumn.

Referenced by draw().

QString QgsVectorLayer::providerType ( ) const

Return the provider type for this layer.

Definition at line 237 of file qgsvectorlayer.cpp.

References mProviderKey.

Referenced by QgsMapLayer::saveNamedStyle(), QgsMapLayer::writeXML(), and writeXml().

access range

Definition at line 4483 of file qgsvectorlayer.cpp.

References mRanges, pendingFields(), and QgsDebugMsg.

Referenced by QgsAttributeEditor::createAttributeEditor().

bool QgsVectorLayer::readSymbology ( const QDomNode &  node,
QString &  errorMessage 
) [virtual]
bool QgsVectorLayer::readXml ( QDomNode &  layer_node) [virtual]
void QgsVectorLayer::reload ( ) [virtual]

Synchronises with changes in the datasource.

Note:
added in version 1.6

Reimplemented from QgsMapLayer.

Definition at line 941 of file qgsvectorlayer.cpp.

References mDataProvider, and QgsDataProvider::reloadData().

void QgsVectorLayer::removeJoin ( const QString &  joinLayerId)

Removes a vector layer join.

Note:
added in 1.7

Definition at line 4931 of file qgsvectorlayer.cpp.

References mJoinBuffer, QgsVectorLayerJoinBuffer::removeJoin(), and updateFieldMap().

Referenced by checkJoinLayerRemove().

void QgsVectorLayer::removeOverlay ( const QString &  typeName)

Removes all overlays of a given type.

Note:
this method was added in version 1.1

Definition at line 4504 of file qgsvectorlayer.cpp.

References mOverlays.

Changes the specified geometry such that it has no intersections with other polygon (or multipolygon) geometries in this vector layer.

Parameters:
geomgeometry to modify
Returns:
0 in case of success

Definition at line 2382 of file qgsvectorlayer.cpp.

References QgsGeometry::boundingBox(), QgsFeature::geometry(), hasGeometryType(), QgsGeometry::makeDifference(), nextFeature(), QGis::Polygon, select(), and QgsGeometry::type().

Referenced by QgsGeometry::avoidIntersections().

void QgsVectorLayer::removeSelection ( bool  emitSignal = true) [slot]

Clear selection.

Definition at line 1260 of file qgsvectorlayer.cpp.

References mSelectedFeatureIds, selectionChanged(), and QgsMapLayer::setCacheImage().

Referenced by invertSelection(), and select().

Return renderer V2.

Note:
added in 1.4

Definition at line 4534 of file qgsvectorlayer.cpp.

References mRendererV2.

Referenced by QgsLegendModel::addVectorLayerItemsV2(), QgsAttributeEditor::createAttributeEditor(), and QgsSymbologyV2Conversion::rendererV2toV1().

void QgsVectorLayer::select ( QgsRectangle rect,
bool  lock 
)
void QgsVectorLayer::select ( QgsAttributeList  fetchAttributes,
QgsRectangle  rect = QgsRectangle(),
bool  fetchGeometry = true,
bool  useIntersect = false 
)

Select features with or without attributes in a given window.

Parameters:
fetchAttributesindizes of attributes to fetch
rectwindow (QgsRectangle() for all)
fetchGeometryfetch features with geometry
useIntersectfetch only features that actually intersect the window (not just the bounding box)

Definition at line 1634 of file qgsvectorlayer.cpp.

References QgsVectorLayerJoinBuffer::containsJoins(), QgsVectorDataProvider::fields(), mAddedFeatures, QgsVectorLayerJoinBuffer::maximumIndex(), mChangedGeometries, mDataProvider, mDeletedFeatureIds, mEditable, mFetchAddedFeaturesIt, mFetchAttributes, mFetchChangedGeomIt, mFetchConsidered, mFetchGeometry, mFetching, mFetchProvAttributes, mFetchRect, mJoinBuffer, QgsVectorLayerJoinBuffer::select(), and QgsVectorDataProvider::select().

void QgsVectorLayer::select ( int  featureId,
bool  emitSignal = true 
) [slot]

Select feature by its ID, optionally emit signal selectionChanged()

Definition at line 1157 of file qgsvectorlayer.cpp.

References mSelectedFeatureIds, selectionChanged(), and QgsMapLayer::setCacheImage().

The number of features that are selected in this layer.

Definition at line 3812 of file qgsvectorlayer.cpp.

References mSelectedFeatureIds.

Referenced by QgsMapCanvas::zoomToSelected().

void QgsVectorLayer::setAnnotationForm ( const QString &  ui)

set annotation form for layer (added in 1.5)

Definition at line 4452 of file qgsvectorlayer.cpp.

References mAnnotationForm.

void QgsVectorLayer::setCheckedState ( int  idx,
QString  checked,
QString  notChecked 
)

set string representing 'true' for a checkbox (added in 1.4)

Definition at line 4890 of file qgsvectorlayer.cpp.

References mCheckedStates, QgsMapLayer::name(), and pendingFields().

bool QgsVectorLayer::setDataProvider ( QString const &  provider) [private]

Definition at line 5250 of file qgsvectorlayer.cpp.

References mDiagramLayerSettings.

Sets diagram rendering object (takes ownership)

Definition at line 1317 of file qgsvectorlayer.cpp.

References mDiagramRenderer.

void QgsVectorLayer::setDisplayField ( QString  fldName = "")

Set the primary display field to be used in the identify results dialog.

sets the preferred display field based on some fuzzy logic

Definition at line 245 of file qgsvectorlayer.cpp.

References hasGeometryType(), mDisplayField, pendingFields(), and QgsDebugMsg.

Referenced by readSymbology(), and setDataProvider().

void QgsVectorLayer::setEditForm ( QString  ui)

set edit form (added in 1.4)

Definition at line 4447 of file qgsvectorlayer.cpp.

References mEditForm.

void QgsVectorLayer::setEditFormInit ( QString  function)

set python function for edit form initialization (added in 1.4)

Definition at line 4462 of file qgsvectorlayer.cpp.

References mEditFormInit.

void QgsVectorLayer::setEditType ( int  idx,
EditType  edit 
)

set edit type

Definition at line 4435 of file qgsvectorlayer.cpp.

References mEditTypes, QgsMapLayer::name(), pendingFields(), and QgsMapLayer::type().

void QgsVectorLayer::setModified ( bool  modified = true,
bool  onlyGeometryWasModified = false 
)
void QgsVectorLayer::setProviderEncoding ( const QString &  encoding)

Sets the textencoding of the data provider.

Definition at line 1291 of file qgsvectorlayer.cpp.

References mDataProvider, and QgsVectorDataProvider::setEncoding().

bool QgsVectorLayer::setReadOnly ( bool  readonly = true)

Make layer read-only (editing disabled) or not.

Returns:
false if the layer is in editing yet
Note:
added in 1.6

Definition at line 4405 of file qgsvectorlayer.cpp.

References mEditable, and mReadOnly.

Set renderer V2.

Note:
added in 1.4

Definition at line 4538 of file qgsvectorlayer.cpp.

References hasGeometryType(), and mRendererV2.

Referenced by QgsVectorLayer(), readSymbology(), QgsSymbologyV2Conversion::rendererV1toV2(), and QgsSymbologyV2Conversion::rendererV2toV1().

Change selection to the new set of features.

Definition at line 3801 of file qgsvectorlayer.cpp.

References mSelectedFeatureIds, selectionChanged(), and QgsMapLayer::setCacheImage().

bool QgsVectorLayer::setSubsetString ( QString  subset) [virtual]

Set the string (typically sql) used to define a subset of the layer.

Parameters:
subsetThe subset string. This may be the where clause of a sql statement or other defintion string specific to the underlying dataprovider and data store.
Returns:
true, when setting the subset string was successful, false otherwise (added in 1.4)

Definition at line 1507 of file qgsvectorlayer.cpp.

References QgsDataProvider::dataSourceUri(), mDataProvider, QgsMapLayer::mDataSource, QgsDebugMsg, QgsMapLayer::setCacheImage(), QgsDataProvider::setSubsetString(), and updateExtents().

void QgsVectorLayer::setUsingRendererV2 ( bool  usingRendererV2)

set whether to use renderer V2 for drawing.

Note:
added in 1.4

Definition at line 4550 of file qgsvectorlayer.cpp.

References hasGeometryType(), and mUsingRendererV2.

Referenced by QgsVectorLayer(), readSymbology(), QgsSymbologyV2Conversion::rendererV1toV2(), and QgsSymbologyV2Conversion::rendererV2toV1().

bool QgsVectorLayer::snapPoint ( QgsPoint point,
double  tolerance 
)

Snaps a point to the closest vertex if there is one within the snapping tolerance.

Parameters:
pointThe point which is set to the position of a vertex if there is one within the snapping tolerance. If there is no point within this tolerance, point is left unchanged.
toleranceThe snapping tolerance
Returns:
true if point has been snapped, false if no vertex within search tolerance

Definition at line 3981 of file qgsvectorlayer.cpp.

References hasGeometryType(), QgsPoint::setX(), QgsPoint::setY(), QgsSnapper::SnapToVertex, and snapWithContext().

void QgsVectorLayer::snapToGeometry ( const QgsPoint startPoint,
int  featureId,
QgsGeometry geom,
double  sqrSnappingTolerance,
QMultiMap< double, QgsSnappingResult > &  snappingResults,
QgsSnapper::SnappingType  snap_to 
) const [private]

Snaps to a geometry and adds the result to the multimap if it is within the snapping result.

Parameters:
startPointstart point of the snap
featureIdid of feature
geomgeometry to snap
sqrSnappingTolerancesquared search tolerance of the snap
snappingResultslist to which the result is appended
snap_tosnap to vertex or to segment

Definition at line 4055 of file qgsvectorlayer.cpp.

References QgsSnappingResult::afterVertex, QgsSnappingResult::afterVertexNr, QgsSnappingResult::beforeVertex, QgsSnappingResult::beforeVertexNr, QgsGeometry::closestSegmentWithContext(), QgsGeometry::closestVertex(), geometryType(), QgsSnappingResult::layer, QGis::Point, QgsSnappingResult::snappedAtGeometry, QgsSnappingResult::snappedVertex, QgsSnappingResult::snappedVertexNr, QgsSnapper::SnapToSegment, QgsSnapper::SnapToVertex, QgsSnapper::SnapToVertexAndSegment, and QgsGeometry::vertexAt().

Referenced by snapWithContext().

int QgsVectorLayer::snapWithContext ( const QgsPoint startPoint,
double  snappingTolerance,
QMultiMap< double, QgsSnappingResult > &  snappingResults,
QgsSnapper::SnappingType  snap_to 
)

Snaps to segment or vertex within given tolerance.

Parameters:
startPointpoint to snap (in layer coordinates)
snappingTolerancedistance tolerance for snapping
snappingResultssnapping results. Key is the distance between startPoint and snapping target
snap_toto segment / to vertex
Returns:
0 in case of success

Definition at line 4006 of file qgsvectorlayer.cpp.

References QgsGeometry::boundingBox(), QgsRectangle::contains(), QgsFeature::geometry(), hasGeometryType(), QgsFeature::id(), QgsRectangle::intersects(), mCachedGeometries, mCachedGeometriesRect, mDataProvider, nextFeature(), select(), snapToGeometry(), QgsPoint::x(), and QgsPoint::y().

Referenced by addTopologicalPoints(), and snapPoint().

int QgsVectorLayer::splitFeatures ( const QList< QgsPoint > &  splitLine,
bool  topologicalEditing = false 
)
void QgsVectorLayer::stopRendererV2 ( QgsRenderContext rendererContext,
QgsSingleSymbolRendererV2 selRenderer 
) [private]

Stop version 2 renderer and selected renderer (if required)

Definition at line 5182 of file qgsvectorlayer.cpp.

References mRendererV2, QgsSingleSymbolRendererV2::stopRender(), and QgsFeatureRendererV2::stopRender().

Referenced by drawRendererV2Levels().

QString QgsVectorLayer::storageType ( ) const

Returns the permanent storage type for this layer as a friendly name.

Definition at line 208 of file qgsvectorlayer.cpp.

References mDataProvider, and QgsVectorDataProvider::storageType().

QString QgsVectorLayer::subsetString ( ) [virtual]

Get the string (typically sql) used to define a subset of the layer.

Returns:
The subset string or QString::null if not implemented by the provider

Definition at line 1497 of file qgsvectorlayer.cpp.

References mDataProvider, QgsDebugMsg, and QgsDataProvider::subsetString().

Referenced by addJoinedFeatureAttributes().

void QgsVectorLayer::transformPoint ( double &  x,
double &  y,
const QgsMapToPixel mtp,
const QgsCoordinateTransform ct 
) [inline, private]

Convenience function to transform the given point.

Definition at line 4359 of file qgsvectorlayer.cpp.

References QgsMapToPixel::transformInPlace(), and QgsCoordinateTransform::transformInPlace().

Referenced by drawFeature().

void QgsVectorLayer::transformPoints ( std::vector< double > &  x,
std::vector< double > &  y,
std::vector< double > &  z,
QgsRenderContext renderContext 
) [inline, private]
int QgsVectorLayer::translateFeature ( int  featureId,
double  dx,
double  dy 
)

Translates feature by dx, dy.

Parameters:
featureIdid of the feature to translate
dxtranslation of x-coordinate
dytranslation of y-coordinate
Returns:
0 in case of success

Definition at line 2212 of file qgsvectorlayer.cpp.

References editGeometryChange(), QgsVectorDataProvider::featureAtId(), QgsFeature::geometry(), hasGeometryType(), mAddedFeatures, mCachedGeometries, mChangedGeometries, mDataProvider, setModified(), and QgsGeometry::translate().

void QgsVectorLayer::uniqueValues ( int  index,
QList< QVariant > &  uniqueValues,
int  limit = -1 
)
void QgsVectorLayer::updateAttributeMapIndex ( QgsAttributeMap map,
int  oldIndex,
int  newIndex 
) const [private]

Updates an index in an attribute map to a new value (usually necessary because of a join operation)

Definition at line 5192 of file qgsvectorlayer.cpp.

Referenced by updateFieldMap().

void QgsVectorLayer::updateExtents ( ) [virtual, slot]
void QgsVectorLayer::updateFeatureAttributes ( QgsFeature f,
bool  all = false 
) [private]
long QgsVectorLayer::updateFeatureCount ( ) const [virtual]

This function does nothing useful, it's kept only for compatibility.

Todo:
to be removed

Definition at line 1441 of file qgsvectorlayer.cpp.

Update feature with uncommited geometry updates.

Definition at line 1627 of file qgsvectorlayer.cpp.

References QgsFeature::id(), mChangedGeometries, and QgsFeature::setGeometry().

Referenced by selectedFeatures().

QMap< QString, QVariant > & QgsVectorLayer::valueMap ( int  idx)

access value map

Definition at line 4467 of file qgsvectorlayer.cpp.

References mValueMaps, pendingFields(), and QgsDebugMsg.

Referenced by QgsAttributeEditor::createAttributeEditor().

const QList< QgsVectorJoinInfo > & QgsVectorLayer::vectorJoins ( ) const
Note:
added in 1.7

Definition at line 4937 of file qgsvectorlayer.cpp.

References mJoinBuffer, and QgsVectorLayerJoinBuffer::vectorJoins().

Referenced by QgsProject::_getMapLayers().

void QgsVectorLayer::vectorOverlays ( QList< QgsVectorOverlay * > &  overlayList)

Returns pointers to the overlays of this layer.

Note:
this method was added in version 1.1

Definition at line 4515 of file qgsvectorlayer.cpp.

References mOverlays.

Referenced by QgsMapRenderer::render().

Returns the WKBType or WKBUnknown in case of error.

Definition at line 1380 of file qgsvectorlayer.cpp.

References mWkbType.

Referenced by addTopologicalPoints(), drawFeature(), drawLineString(), drawPolygon(), and QgsVectorFileWriter::writeAsVectorFormat().

bool QgsVectorLayer::writeSymbology ( QDomNode &  node,
QDomDocument &  doc,
QString &  errorMessage 
) const [virtual]
bool QgsVectorLayer::writeXml ( QDomNode &  layer_node,
QDomDocument &  doc 
) [virtual]

write vector layer specific state to project file Dom node.

Note:
Called by QgsMapLayer::writeXML().

Reimplemented from QgsMapLayer.

Definition at line 2813 of file qgsvectorlayer.cpp.

References QgsVectorDataProvider::encoding(), geometryType(), mDataProvider, mJoinBuffer, providerType(), QGis::qgisVectorGeometryType, QgsDebugMsg, writeSymbology(), and QgsVectorLayerJoinBuffer::writeXml().


Member Data Documentation

The user-defined actions that are accessed from the Identify Results dialog box.

Definition at line 838 of file qgsvectorlayer.h.

Referenced by QgsVectorLayer(), readSymbology(), writeSymbology(), and ~QgsVectorLayer().

added attributes fields which are not commited

Definition at line 879 of file qgsvectorlayer.h.

Referenced by addAttribute(), commitChanges(), deleteAttribute(), redoEditCommand(), rollBack(), startEditing(), undoEditCommand(), and updateFieldMap().

New features which are not commited.

Note a feature can be added and then changed, therefore the details here can be overridden by mChangedAttributeValues and mChangedGeometries.

Definition at line 870 of file qgsvectorlayer.h.

Referenced by addIsland(), commitChanges(), editAttributeChange(), editFeatureAdd(), featureAtId(), maximumValue(), minimumValue(), nextFeature(), pendingFeatureCount(), redoEditCommand(), rollBack(), select(), selectedFeatures(), translateFeature(), undoEditCommand(), uniqueValues(), updateExtents(), and updateFieldMap().

Definition at line 934 of file qgsvectorlayer.h.

Referenced by readSymbology(), setAnnotationForm(), and writeSymbology().

QMap< QString, QString > QgsVectorLayer::mAttributeAliasMap [private]

Map that stores the aliases for attributes.

Key is the attribute name and value the alias for that attribute

Definition at line 888 of file qgsvectorlayer.h.

Referenced by addAttributeAlias(), attributeAlias(), readSymbology(), and writeSymbology().

cache of the committed geometries retrieved *for the current display*

Definition at line 850 of file qgsvectorlayer.h.

Referenced by addFeature(), addIsland(), changeGeometry(), deleteCachedGeometries(), deleteVertex(), draw(), drawRendererV2(), drawRendererV2Levels(), insertVertex(), moveVertex(), snapWithContext(), splitFeatures(), and translateFeature().

extent for which there are cached geometries

Definition at line 853 of file qgsvectorlayer.h.

Referenced by deleteCachedGeometries(), draw(), and snapWithContext().

QMap< QString, QPair<QString, QString> > QgsVectorLayer::mCheckedStates [private]

Definition at line 930 of file qgsvectorlayer.h.

Referenced by checkedState(), readSymbology(), setCheckedState(), and writeSymbology().

QStringList QgsVectorLayer::mCommitErrors [private]

Definition at line 925 of file qgsvectorlayer.h.

Referenced by commitChanges(), and commitErrors().

The current size of editing marker.

Definition at line 917 of file qgsvectorlayer.h.

Referenced by draw(), drawLineString(), and drawPolygon().

The current type of editing marker.

Definition at line 914 of file qgsvectorlayer.h.

Referenced by draw(), drawLineString(), and drawPolygon().

deleted attributes fields which are not commited

Definition at line 876 of file qgsvectorlayer.h.

Referenced by commitChanges(), deleteAttribute(), maximumValue(), minimumValue(), redoEditCommand(), rollBack(), startEditing(), undoEditCommand(), uniqueValues(), and updateFieldMap().

Deleted feature IDs which are not commited.

Note a feature can be added and then deleted again before the change is committed - in that case the added feature would be removed from mAddedFeatures only and *not* entered here.

Definition at line 865 of file qgsvectorlayer.h.

Referenced by commitChanges(), deleteFeature(), editFeatureDelete(), featureAtId(), maximumValue(), minimumValue(), pendingFeatureCount(), redoEditCommand(), select(), undoEditCommand(), uniqueValues(), and updateExtents().

QString QgsVectorLayer::mDisplayField [private]

index of the primary label field

Definition at line 832 of file qgsvectorlayer.h.

Referenced by displayField(), and setDisplayField().

bool QgsVectorLayer::mEditable [private]
QString QgsVectorLayer::mEditForm [private]

Definition at line 932 of file qgsvectorlayer.h.

Referenced by editForm(), readSymbology(), setEditForm(), and writeSymbology().

QString QgsVectorLayer::mEditFormInit [private]

Definition at line 932 of file qgsvectorlayer.h.

Referenced by editFormInit(), readSymbology(), setEditFormInit(), and writeSymbology().

QMap< QString, EditType > QgsVectorLayer::mEditTypes [private]

Definition at line 927 of file qgsvectorlayer.h.

Referenced by editType(), readSymbology(), setEditType(), and writeSymbology().

QgsFeatureList::iterator QgsVectorLayer::mFetchAddedFeaturesIt [private]

Definition at line 944 of file qgsvectorlayer.h.

Referenced by nextFeature(), and select().

Definition at line 938 of file qgsvectorlayer.h.

Referenced by nextFeature(), select(), selectedFeatures(), and updateFeatureAttributes().

QgsGeometryMap::iterator QgsVectorLayer::mFetchChangedGeomIt [private]

Definition at line 943 of file qgsvectorlayer.h.

Referenced by nextFeature(), and select().

QSet<int> QgsVectorLayer::mFetchConsidered [private]

Definition at line 942 of file qgsvectorlayer.h.

Referenced by nextFeature(), and select().

Definition at line 940 of file qgsvectorlayer.h.

Referenced by nextFeature(), and select().

bool QgsVectorLayer::mFetching [private]

Definition at line 936 of file qgsvectorlayer.h.

Referenced by nextFeature(), and select().

Definition at line 939 of file qgsvectorlayer.h.

Referenced by nextFeature(), and select().

Definition at line 937 of file qgsvectorlayer.h.

Referenced by nextFeature(), and select().

bool QgsVectorLayer::mLabelOn [private]

Display labels.

Definition at line 911 of file qgsvectorlayer.h.

Referenced by drawLabels(), enableLabels(), hasLabelsEnabled(), and setDataProvider().

max field index

Definition at line 891 of file qgsvectorlayer.h.

Referenced by addAttribute(), startEditing(), and updateFieldMap().

bool QgsVectorLayer::mModified [private]

Flag indicating whether the layer has been modified since the last commit.

Definition at line 847 of file qgsvectorlayer.h.

Referenced by isModified(), and setModified().

List of overlays.

Vector overlays will be rendered on top of all maplayers

Definition at line 923 of file qgsvectorlayer.h.

Referenced by addOverlay(), findOverlayByType(), removeOverlay(), vectorOverlays(), writeSymbology(), and ~QgsVectorLayer().

QString QgsVectorLayer::mProviderKey [private]

Data provider key.

Definition at line 835 of file qgsvectorlayer.h.

Referenced by providerType(), QgsVectorLayer(), readXml(), and setDataProvider().

QMap< QString, RangeData > QgsVectorLayer::mRanges [private]

Definition at line 929 of file qgsvectorlayer.h.

Referenced by range(), readSymbology(), and writeSymbology().

bool QgsVectorLayer::mReadOnly [private]

Flag indicating whether the layer is in read-only mode (editing disabled) or not.

Definition at line 844 of file qgsvectorlayer.h.

Referenced by isReadOnly(), setReadOnly(), and startEditing().

Renderer object which holds the information about how to display the features.

Definition at line 899 of file qgsvectorlayer.h.

Referenced by copySymbologySettings(), draw(), drawLabels(), drawLineString(), drawPolygon(), readSymbology(), renderer(), setRenderer(), writeSymbology(), and ~QgsVectorLayer().

Set holding the feature IDs that are activated.

Note that if a feature subsequently gets deleted (i.e. by its addition to mDeletedFeatureIds), it always needs to be removed from mSelectedFeatureIds as well.

Definition at line 859 of file qgsvectorlayer.h.

Referenced by addFeatures(), addIsland(), boundingBoxOfSelected(), deleteFeature(), deleteSelectedFeatures(), deselect(), draw(), drawLabels(), drawRendererV2(), drawRendererV2Levels(), invertSelection(), invertSelectionInRectangle(), removeSelection(), select(), selectedFeatureCount(), selectedFeatures(), selectedFeaturesIds(), and setSelectedFeatures().

Update threshold for drawing features as they are read.

A value of zero indicates that no features will be drawn until all have been read

Definition at line 826 of file qgsvectorlayer.h.

Referenced by draw(), and drawRendererV2().

whether to use V1 or V2 renderer

Definition at line 905 of file qgsvectorlayer.h.

Referenced by draw(), isUsingRendererV2(), QgsVectorLayer(), setUsingRendererV2(), and writeSymbology().

QMap< QString, QMap<QString, QVariant> > QgsVectorLayer::mValueMaps [private]

Definition at line 928 of file qgsvectorlayer.h.

Referenced by readSymbology(), valueMap(), and writeSymbology().

Flag if the vertex markers should be drawn only for selection (true) or for all features (false)

Definition at line 920 of file qgsvectorlayer.h.

Referenced by draw().

int QgsVectorLayer::mWkbType [private]

Geometry type as defined in enum WkbType (qgis.h)

Definition at line 894 of file qgsvectorlayer.h.

Referenced by setDataProvider(), and wkbType().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines