QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsSettingsEditorWidgetWrapper Class Referenceabstract

Base class for settings editor wrappers. More...

#include <qgssettingseditorwidgetwrapper.h>

Inheritance diagram for QgsSettingsEditorWidgetWrapper:
Inheritance graph
[legend]

Public Member Functions

 QgsSettingsEditorWidgetWrapper (QObject *parent=nullptr)
 Constructor. More...
 
virtual ~QgsSettingsEditorWidgetWrapper ()=default
 
bool configureEditor (QWidget *editor, const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList=QStringList())
 Configures the editor according the setting. More...
 
QWidget * createEditor (const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList=QStringList(), QWidget *parent=nullptr)
 Creates the editor widget for the given setting. More...
 
virtual QgsSettingsEditorWidgetWrappercreateWrapper (QObject *parent=nullptr) const =0
 Creates a new instance of the editor wrapper so it can be configured for a widget and a setting. More...
 
virtual QString id () const =0
 This id of the type of settings it handles. More...
 
virtual bool setSettingFromWidget () const =0
 Sets the setting value from the widget value The wrapper must be configured before calling this medthod. More...
 
virtual bool setWidgetFromSetting () const =0
 Sets the widget value from the setting value The wrapper must be configured before calling this medthod. More...
 
virtual void setWidgetFromVariant (const QVariant &value) const =0
 Sets the value of the widget The wrapper must be configured before calling this medthod. More...
 
virtual QVariant variantValueFromWidget () const =0
 Returns the value from the widget as a variant The wrapper must be configured before calling this medthod. More...
 

Static Public Member Functions

static QgsSettingsEditorWidgetWrapperfromWidget (const QWidget *widget)
 Creates a wrapper from the definition stored in a widget created by createEditor() More...
 

Protected Member Functions

virtual bool configureEditorPrivate (QWidget *editor, const QgsSettingsEntryBase *setting)=0
 Configures an existing editor widget. More...
 
virtual QWidget * createEditorPrivate (QWidget *parent=nullptr) const =0
 Creates the widgets. More...
 

Protected Attributes

QStringList mDynamicKeyPartList
 

Detailed Description

Base class for settings editor wrappers.

Since
QGIS 3.32

Definition at line 32 of file qgssettingseditorwidgetwrapper.h.

Constructor & Destructor Documentation

◆ QgsSettingsEditorWidgetWrapper()

QgsSettingsEditorWidgetWrapper::QgsSettingsEditorWidgetWrapper ( QObject *  parent = nullptr)

Constructor.

Definition at line 36 of file qgssettingseditorwidgetwrapper.cpp.

◆ ~QgsSettingsEditorWidgetWrapper()

virtual QgsSettingsEditorWidgetWrapper::~QgsSettingsEditorWidgetWrapper ( )
virtualdefault

Member Function Documentation

◆ configureEditor()

bool QgsSettingsEditorWidgetWrapper::configureEditor ( QWidget *  editor,
const QgsSettingsEntryBase setting,
const QStringList &  dynamicKeyPartList = QStringList() 
)

Configures the editor according the setting.

Definition at line 51 of file qgssettingseditorwidgetwrapper.cpp.

◆ configureEditorPrivate()

virtual bool QgsSettingsEditorWidgetWrapper::configureEditorPrivate ( QWidget *  editor,
const QgsSettingsEntryBase setting 
)
protectedpure virtual

◆ createEditor()

QWidget * QgsSettingsEditorWidgetWrapper::createEditor ( const QgsSettingsEntryBase setting,
const QStringList &  dynamicKeyPartList = QStringList(),
QWidget *  parent = nullptr 
)

Creates the editor widget for the given setting.

Definition at line 41 of file qgssettingseditorwidgetwrapper.cpp.

◆ createEditorPrivate()

virtual QWidget * QgsSettingsEditorWidgetWrapper::createEditorPrivate ( QWidget *  parent = nullptr) const
protectedpure virtual

◆ createWrapper()

virtual QgsSettingsEditorWidgetWrapper * QgsSettingsEditorWidgetWrapper::createWrapper ( QObject *  parent = nullptr) const
pure virtual

◆ fromWidget()

QgsSettingsEditorWidgetWrapper * QgsSettingsEditorWidgetWrapper::fromWidget ( const QWidget *  widget)
static

Creates a wrapper from the definition stored in a widget created by createEditor()

Definition at line 25 of file qgssettingseditorwidgetwrapper.cpp.

◆ id()

virtual QString QgsSettingsEditorWidgetWrapper::id ( ) const
pure virtual

◆ setSettingFromWidget()

virtual bool QgsSettingsEditorWidgetWrapper::setSettingFromWidget ( ) const
pure virtual

◆ setWidgetFromSetting()

virtual bool QgsSettingsEditorWidgetWrapper::setWidgetFromSetting ( ) const
pure virtual

◆ setWidgetFromVariant()

virtual void QgsSettingsEditorWidgetWrapper::setWidgetFromVariant ( const QVariant &  value) const
pure virtual

◆ variantValueFromWidget()

virtual QVariant QgsSettingsEditorWidgetWrapper::variantValueFromWidget ( ) const
pure virtual

Member Data Documentation

◆ mDynamicKeyPartList

QStringList QgsSettingsEditorWidgetWrapper::mDynamicKeyPartList
protected

Definition at line 91 of file qgssettingseditorwidgetwrapper.h.


The documentation for this class was generated from the following files: