QGIS API Documentation 3.39.0-Master (47f7b3a4989)
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
QgsSettingsEnumEditorWidgetWrapper< ENUM > Class Template Reference

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

#include <qgssettingsenumflageditorwidgetwrapper.h>

Inheritance diagram for QgsSettingsEnumEditorWidgetWrapper< ENUM >:
Inheritance graph
[legend]

Public Member Functions

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

Protected Member Functions

void configureEditorPrivateImplementation () override
 To be re-implemented to implemeent type specific configuration (e.g. opacity for colors)
 
- Protected Member Functions inherited from QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >
bool configureEditorPrivate (QWidget *editor, const QgsSettingsEntryBase *setting) override
 Configures an existing editor widget.
 
virtual QWidget * createEditorPrivate (QWidget *parent=nullptr) const override
 Creates the widgets.
 

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()
 
- Protected Attributes inherited from QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >
QComboBox * mEditor
 
const QgsSettingsEntryEnumFlag< ENUM > * mSetting
 
- Protected Attributes inherited from QgsSettingsEditorWidgetWrapper
QStringList mDynamicKeyPartList
 

Detailed Description

template<class ENUM>
class QgsSettingsEnumEditorWidgetWrapper< ENUM >

This class is a factory of editor for enum settings.

Since
QGIS 3.32

Definition at line 139 of file qgssettingsenumflageditorwidgetwrapper.h.

Constructor & Destructor Documentation

◆ QgsSettingsEnumEditorWidgetWrapper()

template<class ENUM >
QgsSettingsEnumEditorWidgetWrapper< ENUM >::QgsSettingsEnumEditorWidgetWrapper ( QObject *  parent = nullptr)
inline

Constructor.

Definition at line 143 of file qgssettingsenumflageditorwidgetwrapper.h.

Member Function Documentation

◆ configureEditorPrivateImplementation()

template<class ENUM >
void QgsSettingsEnumEditorWidgetWrapper< ENUM >::configureEditorPrivateImplementation ( )
inlineoverrideprotectedvirtual

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

Reimplemented from QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >.

Definition at line 204 of file qgssettingsenumflageditorwidgetwrapper.h.

◆ createWrapper()

template<class ENUM >
QgsSettingsEditorWidgetWrapper * QgsSettingsEnumEditorWidgetWrapper< ENUM >::createWrapper ( QObject *  parent = nullptr) const
inlineoverridevirtual

Creates a new instance of the editor wrapper so it can be configured for a widget and a setting.

Implements QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >.

Definition at line 152 of file qgssettingsenumflageditorwidgetwrapper.h.

◆ id()

template<class ENUM >
virtual QString QgsSettingsEnumEditorWidgetWrapper< ENUM >::id ( ) const
inlineoverridevirtual

This id of the type of settings it handles.

Note
This mostly correspond to the content of Qgis::SettingsType but it's a string since custom Python implementation are possible.

Implements QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >.

Definition at line 147 of file qgssettingsenumflageditorwidgetwrapper.h.

◆ setSettingFromWidget()

template<class ENUM >
bool QgsSettingsEnumEditorWidgetWrapper< ENUM >::setSettingFromWidget ( ) const
inlineoverridevirtual

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

Implements QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >.

Definition at line 160 of file qgssettingsenumflageditorwidgetwrapper.h.

◆ setWidgetValue()

template<class ENUM >
bool QgsSettingsEnumEditorWidgetWrapper< ENUM >::setWidgetValue ( const ENUM &  value) const
inlineoverridevirtual

◆ valueFromWidget()

template<class ENUM >
ENUM QgsSettingsEnumEditorWidgetWrapper< ENUM >::valueFromWidget ( ) const
inlineoverridevirtual

◆ variantValueFromWidget()

template<class ENUM >
QVariant QgsSettingsEnumEditorWidgetWrapper< ENUM >::variantValueFromWidget ( ) const
inlineoverridevirtual

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

Reimplemented from QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >.

Definition at line 154 of file qgssettingsenumflageditorwidgetwrapper.h.


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