Merge pull request #5215 from m-kuhn/metaCode

Doxymentation and de-noising
This commit is contained in:
Matthias Kuhn 2017-09-18 20:43:14 +02:00 committed by GitHub
commit b9a700075b
3 changed files with 14 additions and 21 deletions

View File

@ -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

View File

@ -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( ", " ) );

View File

@ -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;
/**