QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsSettingsEditorWidgetWrapperTemplate< T, V, U > Class Template Referenceabstract

This class is a base factory of editor for settings. More...

#include <qgssettingseditorwidgetwrapperimpl.h>

Inheritance diagram for QgsSettingsEditorWidgetWrapperTemplate< T, V, U >:
Inheritance graph
[legend]

Public Member Functions

 QgsSettingsEditorWidgetWrapperTemplate (QObject *parent=nullptr)
 Constructor. More...
 
virtual QgsSettingsEditorWidgetWrappercreateWrapper (QObject *parent=nullptr) const override=0
 Creates a new instance of the editor wrapper so it can be configured for a widget and a setting. More...
 
V * editor () const
 Returns the editor. More...
 
virtual QString id () const override=0
 This id of the type of settings it handles. More...
 
virtual bool setSettingFromWidget () const override=0
 Sets the setting value from the widget value The wrapper must be configured before calling this medthod. More...
 
const T * setting () const
 Returns the setting. More...
 
virtual bool setWidgetFromSetting () const override
 Sets the widget value from the setting value The wrapper must be configured before calling this medthod. More...
 
void setWidgetFromVariant (const QVariant &value) const override
 Sets the value of the widget The wrapper must be configured before calling this medthod. More...
 
virtual bool setWidgetValue (const U &value) const =0
 Sets the widget value. More...
 
virtual U valueFromWidget () const =0
 Returns the widget value. More...
 
QVariant variantValueFromWidget () const override
 Returns the value from the widget as a variant The wrapper must be configured before calling this medthod. More...
 
- Public Member Functions inherited from QgsSettingsEditorWidgetWrapper
 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...
 

Protected Member Functions

bool configureEditorPrivate (QWidget *editor, const QgsSettingsEntryBase *setting) override
 Configures an existing editor widget. More...
 
virtual void configureEditorPrivateImplementation ()
 To be re-implemented to implemeent type specific configuration (e.g. opacity for colors) More...
 
virtual QWidget * createEditorPrivate (QWidget *parent=nullptr) const override
 Creates the widgets. More...
 
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

V * mEditor = nullptr
 
const T * mSetting = nullptr
 
- Protected Attributes inherited from QgsSettingsEditorWidgetWrapper
QStringList mDynamicKeyPartList
 

Additional Inherited Members

- Static Public Member Functions inherited from QgsSettingsEditorWidgetWrapper
static QgsSettingsEditorWidgetWrapperfromWidget (const QWidget *widget)
 Creates a wrapper from the definition stored in a widget created by createEditor() More...
 

Detailed Description

template<class T, class V, class U>
class QgsSettingsEditorWidgetWrapperTemplate< T, V, U >

This class is a base factory of editor for settings.

Since
QGIS 3.32

Definition at line 46 of file qgssettingseditorwidgetwrapperimpl.h.

Constructor & Destructor Documentation

◆ QgsSettingsEditorWidgetWrapperTemplate()

template<class T , class V , class U >
QgsSettingsEditorWidgetWrapperTemplate< T, V, U >::QgsSettingsEditorWidgetWrapperTemplate ( QObject *  parent = nullptr)
inline

Constructor.

Definition at line 50 of file qgssettingseditorwidgetwrapperimpl.h.

Member Function Documentation

◆ configureEditorPrivate()

template<class T , class V , class U >
bool QgsSettingsEditorWidgetWrapperTemplate< T, V, U >::configureEditorPrivate ( QWidget *  editor,
const QgsSettingsEntryBase setting 
)
inlineoverrideprotectedvirtual

Configures an existing editor widget.

Implements QgsSettingsEditorWidgetWrapper.

Definition at line 98 of file qgssettingseditorwidgetwrapperimpl.h.

◆ configureEditorPrivateImplementation()

template<class T , class V , class U >
virtual void QgsSettingsEditorWidgetWrapperTemplate< T, V, U >::configureEditorPrivateImplementation ( )
inlineprotectedvirtual

To be re-implemented to implemeent type specific configuration (e.g. opacity for colors)

Reimplemented in QgsSettingsColorEditorWidgetWrapper, QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >, and QgsSettingsEnumEditorWidgetWrapper< ENUM >.

Definition at line 112 of file qgssettingseditorwidgetwrapperimpl.h.

◆ createEditorPrivate()

template<class T , class V , class U >
virtual QWidget * QgsSettingsEditorWidgetWrapperTemplate< T, V, U >::createEditorPrivate ( QWidget *  parent = nullptr) const
inlineoverrideprotectedvirtual

Creates the widgets.

Implements QgsSettingsEditorWidgetWrapper.

Definition at line 91 of file qgssettingseditorwidgetwrapperimpl.h.

◆ createWrapper()

template<class T , class V , class U >
virtual QgsSettingsEditorWidgetWrapper * QgsSettingsEditorWidgetWrapperTemplate< T, V, U >::createWrapper ( QObject *  parent = nullptr) const
overridepure virtual

◆ editor()

template<class T , class V , class U >
V * QgsSettingsEditorWidgetWrapperTemplate< T, V, U >::editor ( ) const
inline

Returns the editor.

Definition at line 83 of file qgssettingseditorwidgetwrapperimpl.h.

◆ id()

template<class T , class V , class U >
virtual QString QgsSettingsEditorWidgetWrapperTemplate< T, V, U >::id ( ) const
overridepure virtual

◆ setSettingFromWidget()

template<class T , class V , class U >
virtual bool QgsSettingsEditorWidgetWrapperTemplate< T, V, U >::setSettingFromWidget ( ) const
overridepure virtual

◆ setting()

template<class T , class V , class U >
const T * QgsSettingsEditorWidgetWrapperTemplate< T, V, U >::setting ( ) const
inline

Returns the setting.

Definition at line 86 of file qgssettingseditorwidgetwrapperimpl.h.

◆ setWidgetFromSetting()

template<class T , class V , class U >
virtual bool QgsSettingsEditorWidgetWrapperTemplate< T, V, U >::setWidgetFromSetting ( ) const
inlineoverridevirtual

Sets the widget value from the setting value The wrapper must be configured before calling this medthod.

Implements QgsSettingsEditorWidgetWrapper.

Definition at line 55 of file qgssettingseditorwidgetwrapperimpl.h.

◆ setWidgetFromVariant()

template<class T , class V , class U >
void QgsSettingsEditorWidgetWrapperTemplate< T, V, U >::setWidgetFromVariant ( const QVariant &  value) const
inlineoverridevirtual

Sets the value of the widget The wrapper must be configured before calling this medthod.

Implements QgsSettingsEditorWidgetWrapper.

Definition at line 66 of file qgssettingseditorwidgetwrapperimpl.h.

◆ setWidgetValue()

template<class T , class V , class U >
virtual bool QgsSettingsEditorWidgetWrapperTemplate< T, V, U >::setWidgetValue ( const U &  value) const
pure virtual

◆ valueFromWidget()

template<class T , class V , class U >
virtual U QgsSettingsEditorWidgetWrapperTemplate< T, V, U >::valueFromWidget ( ) const
pure virtual

◆ variantValueFromWidget()

template<class T , class V , class U >
QVariant QgsSettingsEditorWidgetWrapperTemplate< T, V, U >::variantValueFromWidget ( ) const
inlineoverridevirtual

Returns the value from the widget as a variant The wrapper must be configured before calling this medthod.

Implements QgsSettingsEditorWidgetWrapper.

Definition at line 74 of file qgssettingseditorwidgetwrapperimpl.h.

Member Data Documentation

◆ mEditor

template<class T , class V , class U >
V* QgsSettingsEditorWidgetWrapperTemplate< T, V, U >::mEditor = nullptr
protected

Definition at line 115 of file qgssettingseditorwidgetwrapperimpl.h.

◆ mSetting

template<class T , class V , class U >
const T* QgsSettingsEditorWidgetWrapperTemplate< T, V, U >::mSetting = nullptr
protected

Definition at line 114 of file qgssettingseditorwidgetwrapperimpl.h.


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