Skip to content

Commit

Permalink
Add missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 14, 2016
1 parent 0736bf7 commit 21eab8c
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 0 deletions.
21 changes: 21 additions & 0 deletions python/core/qgsmaplayer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,12 @@ class QgsMapLayer : QObject
*/
virtual QString loadNamedStyle( const QString& uri, bool &resultFlag /Out/ );

/** Retrieve a named style for this layer from a sqlite database.
* @param db path to sqlite database
* @param uri uri for table
* @param qml will be set to QML style content from database
* @returns true if style was successfully loaded
*/
virtual bool loadNamedStyleFromDb( const QString &db, const QString &uri, QString &qml /Out/ );

/**
Expand Down Expand Up @@ -500,7 +506,22 @@ class QgsMapLayer : QObject
*/
virtual QString saveNamedStyle( const QString &uri, bool &resultFlag /Out/ );

/** Saves the properties of this layer to an SLD format file.
* @param uri uri of destination for exported SLD file.
* @param resultFlag a reference to a flag that will be set to false if
* the SLD file could not be generated
* @returns a string with any status or error messages
* @see loadSldStyle()
*/
virtual QString saveSldStyle( const QString &uri, bool &resultFlag ) const;

/** Attempts to style the layer using the formatting from an SLD type file.
* @param uri uri of source SLD file
* @param resultFlag a reference to a flag that will be set to false if
* the SLD file could not be loaded
* @returns a string with any status or error messages
* @see saveSldStyle()
*/
virtual QString loadSldStyle( const QString &uri, bool &resultFlag );

virtual bool readSld( const QDomNode &node, QString &errorMessage );
Expand Down
6 changes: 6 additions & 0 deletions python/core/qgsvectorlayer.sip
Original file line number Diff line number Diff line change
Expand Up @@ -1083,8 +1083,14 @@ class QgsVectorLayer : QgsMapLayer
* 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.
* @see commitErrors()
*/
bool commitChanges();

/** Returns a list containing any error messages generated when attempting
* to commit changes to the layer.
* @see commitChanges()
*/
QStringList commitErrors() const;

/** Stop editing and discard the edits
Expand Down
21 changes: 21 additions & 0 deletions src/core/qgsmaplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,12 @@ class CORE_EXPORT QgsMapLayer : public QObject
*/
virtual QString loadNamedStyle( const QString& uri, bool &resultFlag );

/** Retrieve a named style for this layer from a sqlite database.
* @param db path to sqlite database
* @param uri uri for table
* @param qml will be set to QML style content from database
* @returns true if style was successfully loaded
*/
virtual bool loadNamedStyleFromDb( const QString &db, const QString &uri, QString &qml );

/**
Expand Down Expand Up @@ -520,7 +526,22 @@ class CORE_EXPORT QgsMapLayer : public QObject
*/
virtual QString saveNamedStyle( const QString &uri, bool &resultFlag );

/** Saves the properties of this layer to an SLD format file.
* @param uri uri of destination for exported SLD file.
* @param resultFlag a reference to a flag that will be set to false if
* the SLD file could not be generated
* @returns a string with any status or error messages
* @see loadSldStyle()
*/
virtual QString saveSldStyle( const QString &uri, bool &resultFlag ) const;

/** Attempts to style the layer using the formatting from an SLD type file.
* @param uri uri of source SLD file
* @param resultFlag a reference to a flag that will be set to false if
* the SLD file could not be loaded
* @returns a string with any status or error messages
* @see saveSldStyle()
*/
virtual QString loadSldStyle( const QString &uri, bool &resultFlag );

virtual bool readSld( const QDomNode &node, QString &errorMessage )
Expand Down
6 changes: 6 additions & 0 deletions src/core/qgsvectorlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -1472,8 +1472,14 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
* 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.
* @see commitErrors()
*/
bool commitChanges();

/** Returns a list containing any error messages generated when attempting
* to commit changes to the layer.
* @see commitChanges()
*/
QStringList commitErrors() const;

/** Stop editing and discard the edits
Expand Down
5 changes: 5 additions & 0 deletions src/core/qgsvectorlayerfeatureiterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ class QgsVectorLayerFeatureIterator;
class QgsVectorLayerFeatureSource : public QgsAbstractFeatureSource
{
public:

/** Constructor for QgsVectorLayerFeatureSource.
* @param layer source layer
*/
explicit QgsVectorLayerFeatureSource( const QgsVectorLayer* layer );

~QgsVectorLayerFeatureSource();

virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest& request ) override;
Expand Down

0 comments on commit 21eab8c

Please sign in to comment.