Skip to content
Permalink
Browse files

Merge pull request #2489 from elpaso/qgseditorwidgetwrapper-config-added

Added config() to QgsEditorWidgetWrapper SIP wrapper
  • Loading branch information
elpaso committed Nov 20, 2015
2 parents ecfdde5 + 8c24e1e commit 4180c1e275aed28cb30dbb5264d4751349aea3a3
@@ -32,7 +32,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
*/
const 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();

/**
@@ -52,7 +52,7 @@ void QgsWidgetWrapper::setContext( const QgsAttributeEditorContext &context )
mContext = context;
}

QVariant QgsWidgetWrapper::config( const QString& key, const QVariant& defaultVal )
const QVariant QgsWidgetWrapper::config( const QString& key, const QVariant& defaultVal )
{
if ( mConfig.contains( key ) )
{
@@ -87,7 +87,7 @@ class GUI_EXPORT QgsWidgetWrapper : public QObject
*
* @return the value assigned to this configuration option
*/
QVariant config( const QString& key, const QVariant& defaultVal = QVariant() );
const QVariant config( const QString& key, const QVariant& defaultVal = QVariant() );

/**
* Returns the whole config

0 comments on commit 4180c1e

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