Skip to content
Permalink
Browse files

Merge pull request #5215 from m-kuhn/metaCode

Doxymentation and de-noising
  • Loading branch information
m-kuhn committed Sep 18, 2017
2 parents 15bc5ed + d8de869 commit b9a700075b62b533fb4722cc9f0f9002848bce42
Showing with 14 additions and 21 deletions.
  1. +4 −3 python/core/qgsvectorlayer.sip
  2. +0 −15 src/core/qgsvectordataprovider.cpp
  3. +10 −3 src/core/qgsvectorlayer.h
@@ -349,19 +349,20 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator, QgsFeatureSin

QString storageType() const;
%Docstring
Returns the permanent storage type for this layer as a friendly name.
Returns the permanent storage type for this layer as a friendly name.
This is obtained from the data provider and does not follow any standard.
:rtype: str
%End

QString capabilitiesString() const;
%Docstring
Capabilities for this layer in a friendly format.
Capabilities for this layer, comma separated and translated.
:rtype: str
%End

QString dataComment() const;
%Docstring
Returns a comment for the data in the layer
Returns a description for this layer as defined in the data provider.
:rtype: str
%End

@@ -209,92 +209,77 @@ QString QgsVectorDataProvider::capabilitiesString() const
if ( abilities & QgsVectorDataProvider::AddFeatures )
{
abilitiesList += tr( "Add Features" );
QgsDebugMsg( "Capability: Add Features" );
}

if ( abilities & QgsVectorDataProvider::DeleteFeatures )
{
abilitiesList += tr( "Delete Features" );
QgsDebugMsg( "Capability: Delete Features" );
}

if ( abilities & QgsVectorDataProvider::ChangeAttributeValues )
{
abilitiesList += tr( "Change Attribute Values" );
QgsDebugMsg( "Capability: Change Attribute Values" );
}

if ( abilities & QgsVectorDataProvider::AddAttributes )
{
abilitiesList += tr( "Add Attributes" );
QgsDebugMsg( "Capability: Add Attributes" );
}

if ( abilities & QgsVectorDataProvider::DeleteAttributes )
{
abilitiesList += tr( "Delete Attributes" );
QgsDebugMsg( "Capability: Delete Attributes" );
}

if ( abilities & QgsVectorDataProvider::RenameAttributes )
{
abilitiesList += tr( "Rename Attributes" );
QgsDebugMsg( "Capability: Rename Attributes" );
}

if ( abilities & QgsVectorDataProvider::CreateSpatialIndex )
{
// TODO: Tighten up this test. See QgsOgrProvider for details.
abilitiesList += tr( "Create Spatial Index" );
QgsDebugMsg( "Capability: Create Spatial Index" );
}

if ( abilities & QgsVectorDataProvider::CreateAttributeIndex )
{
abilitiesList += tr( "Create Attribute Indexes" );
QgsDebugMsg( "Capability: Create Attribute Index" );
}

if ( abilities & QgsVectorDataProvider::SelectAtId )
{
abilitiesList += tr( "Fast Access to Features at ID" );
QgsDebugMsg( "Capability: Select at ID" );
}

if ( abilities & QgsVectorDataProvider::ChangeGeometries )
{
abilitiesList += tr( "Change Geometries" );
QgsDebugMsg( "Capability: Change Geometries" );
}

if ( abilities & QgsVectorDataProvider::SimplifyGeometries )
{
abilitiesList += tr( "Presimplify Geometries" );
QgsDebugMsg( "Capability: Simplify Geometries before fetching the feature" );
}

if ( abilities & QgsVectorDataProvider::SimplifyGeometriesWithTopologicalValidation )
{
abilitiesList += tr( "Presimplify Geometries with Validity Check" );
QgsDebugMsg( "Capability: Simplify Geometries before fetch the feature ensuring that the result is a valid geometry" );
}

if ( abilities & QgsVectorDataProvider::ChangeFeatures )
{
abilitiesList += tr( "Simultaneous Geometry and Attribute Updates" );
QgsDebugMsg( "Capability: change both feature attributes and geometry at once" );
}

if ( abilities & QgsVectorDataProvider::TransactionSupport )
{
abilitiesList += tr( "Transactions" );
QgsDebugMsg( "Capability: transactions" );
}

if ( abilities & QgsVectorDataProvider::CircularGeometries )
{
abilitiesList += tr( "Curved Geometries" );
QgsDebugMsg( "Supports circular geometry types (circularstring, compoundcurve, curvepolygon)" );
}

return abilitiesList.join( QStringLiteral( ", " ) );
@@ -413,13 +413,20 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
*/
virtual QgsVectorLayer *clone() const override SIP_FACTORY;

//! Returns the permanent storage type for this layer as a friendly name.
/**
* Returns the permanent storage type for this layer as a friendly name.
* This is obtained from the data provider and does not follow any standard.
*/
QString storageType() const;

//! Capabilities for this layer in a friendly format.
/**
* Capabilities for this layer, comma separated and translated.
*/
QString capabilitiesString() const;

//! Returns a comment for the data in the layer
/**
* Returns a description for this layer as defined in the data provider.
*/
QString dataComment() const;

/**

0 comments on commit b9a7000

Please sign in to comment.
You can’t perform that action at this time.