Skip to content

Commit

Permalink
Added config() to QgsEditorWidgetWrapper SIP wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Nov 20, 2015
1 parent 84e4539 commit 7cc0a21
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion python/gui/editorwidgets/core/qgseditorwidgetwrapper.sip
Expand Up @@ -16,6 +16,7 @@
class QgsEditorWidgetWrapper : QObject
{
%TypeHeaderCode
#include <qgseditorwidgetconfig.h>
#include <qgseditorwidgetwrapper.h>
%End

Expand All @@ -32,7 +33,31 @@ class QgsEditorWidgetWrapper : QObject

QWidget* widget();
virtual void setConfig( QMap<QString, QVariant> config );
QVariant config( QString key );

/**
* Use this to access the configuration.
*
* @param key The configuration option you want to load
* @param defaultVal Default value
*
* @return the value assigned to this configuration option
*/
QVariant config( const QString& key, const QVariant& defaultVal = QVariant() );

/**
* Returns the whole config
*
* @return The configuration
*/
const QgsEditorWidgetConfig config();

/**
* Access the QgsVectorLayer, you are working on
*
* @return The layer
*
* @see field()
*/
QgsVectorLayer* layer();

/**
Expand Down

0 comments on commit 7cc0a21

Please sign in to comment.