Skip to content

Commit

Permalink
Doxymentation and sip bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Aug 19, 2016
1 parent 633c1a3 commit fd4fe83
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 18 deletions.
5 changes: 5 additions & 0 deletions python/core/qgsattributeeditorelement.sip
Expand Up @@ -95,6 +95,11 @@ switch( sipCpp->type() )
*/
virtual QDomElement toDomElement( QDomDocument& doc ) const = 0;

/**
* Returns a clone of this element. To be implemented by subclasses.
*
* @note Added in QGIS 3.0
*/
virtual QgsAttributeEditorElement* clone( QgsAttributeEditorElement* parent ) const = 0 /Factory/;
};

Expand Down
36 changes: 26 additions & 10 deletions python/core/qgsvectorlayer.sip
Expand Up @@ -1077,16 +1077,6 @@ class QgsVectorLayer : QgsMapLayer
*/
bool renameAttribute( int attIndex, const QString& newName );

/**
* Get the configuration of the form used to represent this vector layer.
* This is a writable configuration that can directly be changed in place.
*
* @return The configuration of this layers' form
*
* @note Added in QGIS 2.14
*/
QgsEditFormConfig editFormConfig() const;

/**
* Returns the alias of an attribute name or a null string if there is no alias.
*
Expand Down Expand Up @@ -1352,6 +1342,26 @@ class QgsVectorLayer : QgsMapLayer

QgsExpressionContext createExpressionContext() const;

/**
* Get the configuration of the form used to represent this vector layer.
* This is a writable configuration that can directly be changed in place.
*
* @return The configuration of this layers' form
*
* @note Added in QGIS 2.14
*/
QgsEditFormConfig editFormConfig() const;

/**
* Get the configuration of the form used to represent this vector layer.
* This is a writable configuration that can directly be changed in place.
*
* @return The configuration of this layers' form
*
* @note Added in QGIS 3.0
*/
void setEditFormConfig( const QgsEditFormConfig& editFormConfig );

public slots:
/**
* Select feature by its ID
Expand Down Expand Up @@ -1625,6 +1635,12 @@ class QgsVectorLayer : QgsMapLayer
*/
void raiseError( const QString& msg );

/**
* Will be emitted whenever the edit form configuration of this layer changes.
*
* @Note added in QGIS 3.0
*/
void editFormConfigChanged();
protected:
/** Set the extent */
void setExtent( const QgsRectangle &rect );
Expand Down
5 changes: 5 additions & 0 deletions src/core/qgsattributeeditorelement.h
Expand Up @@ -87,6 +87,11 @@ class CORE_EXPORT QgsAttributeEditorElement
*/
virtual QDomElement toDomElement( QDomDocument& doc ) const = 0;

/**
* Returns a clone of this element. To be implemented by subclasses.
*
* @note Added in QGIS 3.0
*/
virtual QgsAttributeEditorElement* clone( QgsAttributeEditorElement* parent ) const = 0;

protected:
Expand Down
5 changes: 5 additions & 0 deletions src/core/qgseditformconfig.h
Expand Up @@ -88,6 +88,11 @@ class CORE_EXPORT QgsEditFormConfig
CodeSourceEnvironment = 3 //!< Use the python code available in the python environment
};

/**
* Copy constructor
*
* @note Added in QGIS 3.0
*/
QgsEditFormConfig( const QgsEditFormConfig& o );

QgsEditFormConfig& operator=( const QgsEditFormConfig& o );
Expand Down
4 changes: 4 additions & 0 deletions src/core/qgseditformconfig_p.h
Expand Up @@ -21,6 +21,8 @@
#include "qgsfield.h"
#include "qgseditformconfig.h"

/// @cond PRIVATE

class QgsEditFormConfigPrivate : public QSharedData
{
public:
Expand Down Expand Up @@ -92,4 +94,6 @@ class QgsEditFormConfigPrivate : public QSharedData

};

/// @endcond

#endif // QGSEDITFORMCONFIG_P_H
1 change: 0 additions & 1 deletion src/core/qgsvectorlayer.cpp
Expand Up @@ -2615,7 +2615,6 @@ bool QgsVectorLayer::setReadOnly( bool readonly )
return false;

mReadOnly = readonly;
emit readOnlyChanged();
return true;
}

Expand Down
23 changes: 16 additions & 7 deletions src/core/qgsvectorlayer.h
Expand Up @@ -1202,10 +1202,23 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte

const QMap< QString, QString >& attributeAliases() const { return mAttributeAliasMap; }

/**
* A set of attributes that are not advertised in WMS requests with QGIS server.
*/
const QSet<QString>& excludeAttributesWms() const { return mExcludeAttributesWMS; }
/**
* A set of attributes that are not advertised in WMS requests with QGIS server.
*/
void setExcludeAttributesWms( const QSet<QString>& att ) { mExcludeAttributesWMS = att; }

/**
* A set of attributes that are not advertised in WFS requests with QGIS server.
*/
const QSet<QString>& excludeAttributesWfs() const { return mExcludeAttributesWFS; }

/**
* A set of attributes that are not advertised in WFS requests with QGIS server.
*/
void setExcludeAttributesWfs( const QSet<QString>& att ) { mExcludeAttributesWFS = att; }

/** Delete an attribute field (but does not commit it) */
Expand Down Expand Up @@ -1745,18 +1758,14 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
*/
void displayExpressionChanged();

/**
* Emitted when the read only status changes
*
* @note added in 3.0
*/
void readOnlyChanged();

/**
* Signals an error related to this vector layer.
*/
void raiseError( const QString& msg );

/**
* Will be emitted whenever the edit form configuration of this layer changes.
*/
void editFormConfigChanged();

private slots:
Expand Down

0 comments on commit fd4fe83

Please sign in to comment.