QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
This class is a factory of editor for enum settings. More...
#include <qgssettingsenumflageditorwidgetwrapper.h>
Public Member Functions | |
QgsSettingsEnumEditorWidgetWrapper (QObject *parent=nullptr) | |
Constructor. | |
QgsSettingsEditorWidgetWrapper * | createWrapper (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. | |
void | setDisplayStrings (const QMap< ENUM, QString > &displayStrings) |
This will set the display strings so they can be readable and translatable. | |
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. | |
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< 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 QgsSettingsEditorWidgetWrapper * | fromWidget (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 |
This class is a factory of editor for enum settings.
Definition at line 146 of file qgssettingsenumflageditorwidgetwrapper.h.
|
inline |
Constructor.
Definition at line 150 of file qgssettingsenumflageditorwidgetwrapper.h.
|
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 226 of file qgssettingsenumflageditorwidgetwrapper.h.
|
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 175 of file qgssettingsenumflageditorwidgetwrapper.h.
|
inlineoverridevirtual |
Enables automatic update, which causes the setting to be updated immediately when the widget value is changed.
Implements QgsSettingsEditorWidgetWrapper.
Definition at line 154 of file qgssettingsenumflageditorwidgetwrapper.h.
|
inlineoverridevirtual |
This id of the type of settings it handles.
Implements QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >.
Definition at line 163 of file qgssettingsenumflageditorwidgetwrapper.h.
|
inline |
This will set the display strings so they can be readable and translatable.
This must be called before calling createEditor or configureEditor.
Definition at line 173 of file qgssettingsenumflageditorwidgetwrapper.h.
|
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 183 of file qgssettingsenumflageditorwidgetwrapper.h.
|
inlineoverridevirtual |
Sets the widget value.
Implements QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >.
Definition at line 210 of file qgssettingsenumflageditorwidgetwrapper.h.
|
inlineoverridevirtual |
Returns the widget value.
Implements QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >.
Definition at line 197 of file qgssettingsenumflageditorwidgetwrapper.h.
|
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 177 of file qgssettingsenumflageditorwidgetwrapper.h.