QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS > Class Template Reference

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

#include <qgssettingsenumflageditorwidgetwrapper.h>

Inheritance diagram for QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >:
Inheritance graph
[legend]

Public Member Functions

 QgsSettingsFlagsEditorWidgetWrapper (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.
 
void enableAutomaticUpdatePrivate () override
 Enables automatic update, which causes the setting to be updated immediately when the widget value is changed.
 
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 FLAGS &value) const override
 Sets the widget value.
 
FLAGS 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< FLAGS >, QComboBox, FLAGS >
 QgsSettingsEditorWidgetWrapperTemplate (QObject *parent=nullptr)
 Constructor.
 
QComboBox * editor () const
 Returns the editor.
 
const QgsSettingsEntryEnumFlag< FLAGS > * 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.
 
bool 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
 
void configureAutomaticUpdate (QDialog *dialog=nullptr)
 Configure the settings update behavior when a widget value is changed.
 
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.
 
QStringList dynamicKeyPartList () const
 Returns the dynamic key parts.
 

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< FLAGS >, QComboBox, FLAGS >
bool configureEditorPrivate (QWidget *editor, const QgsSettingsEntryBase *setting) override
 Configures an existing editor widget.
 
virtual QWidget * createEditorPrivate (QWidget *parent=nullptr) const override
 Creates the widgets.
 

Protected Attributes

QStandardItemModel mModel
 
- Protected Attributes inherited from QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< FLAGS >, QComboBox, FLAGS >
QComboBox * mEditor
 
const QgsSettingsEntryEnumFlag< FLAGS > * mSetting
 
- 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()
 

Detailed Description

template<class ENUM, class FLAGS>
class QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >

This class is a factory of editor for flags settings.

Since
QGIS 3.32

Definition at line 38 of file qgssettingsenumflageditorwidgetwrapper.h.

Constructor & Destructor Documentation

◆ QgsSettingsFlagsEditorWidgetWrapper()

template<class ENUM , class FLAGS >
QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >::QgsSettingsFlagsEditorWidgetWrapper ( QObject *  parent = nullptr)
inline

Constructor.

Definition at line 42 of file qgssettingsenumflageditorwidgetwrapper.h.

Member Function Documentation

◆ configureEditorPrivateImplementation()

template<class ENUM , class FLAGS >
void QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >::configureEditorPrivateImplementation ( )
inlineoverrideprotectedvirtual

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

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

Definition at line 123 of file qgssettingsenumflageditorwidgetwrapper.h.

◆ createWrapper()

template<class ENUM , class FLAGS >
QgsSettingsEditorWidgetWrapper * QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >::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< FLAGS >, QComboBox, FLAGS >.

Definition at line 55 of file qgssettingsenumflageditorwidgetwrapper.h.

◆ enableAutomaticUpdatePrivate()

template<class ENUM , class FLAGS >
void QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >::enableAutomaticUpdatePrivate ( )
inlineoverridevirtual

Enables automatic update, which causes the setting to be updated immediately when the widget value is changed.

Since
QGIS 3.40

Implements QgsSettingsEditorWidgetWrapper.

Definition at line 46 of file qgssettingsenumflageditorwidgetwrapper.h.

◆ id()

template<class ENUM , class FLAGS >
virtual QString QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >::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< FLAGS >, QComboBox, FLAGS >.

Definition at line 57 of file qgssettingsenumflageditorwidgetwrapper.h.

◆ setSettingFromWidget()

template<class ENUM , class FLAGS >
bool QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >::setSettingFromWidget ( ) const
inlineoverridevirtual

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

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

Definition at line 68 of file qgssettingsenumflageditorwidgetwrapper.h.

◆ setWidgetValue()

template<class ENUM , class FLAGS >
bool QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >::setWidgetValue ( const FLAGS &  value) const
inlineoverridevirtual

◆ valueFromWidget()

template<class ENUM , class FLAGS >
FLAGS QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >::valueFromWidget ( ) const
inlineoverridevirtual

◆ variantValueFromWidget()

template<class ENUM , class FLAGS >
QVariant QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >::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< FLAGS >, QComboBox, FLAGS >.

Definition at line 62 of file qgssettingsenumflageditorwidgetwrapper.h.

Member Data Documentation

◆ mModel

template<class ENUM , class FLAGS >
QStandardItemModel QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >::mModel
protected

Definition at line 138 of file qgssettingsenumflageditorwidgetwrapper.h.


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