QGIS API Documentation 3.41.0-Master (3c143d501a8)
|
This class is a base factory of editor for settings. More...
#include <qgssettingseditorwidgetwrapperimpl.h>
Public Member Functions | |
QgsSettingsEditorWidgetWrapperTemplate (QObject *parent=nullptr) | |
Constructor. | |
virtual QgsSettingsEditorWidgetWrapper * | createWrapper (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. | |
V * | editor () const |
Returns the editor. | |
virtual QString | id () const override=0 |
This id of the type of settings it handles. | |
virtual bool | setSettingFromWidget () const override=0 |
Sets the setting value from the widget value The wrapper must be configured before calling this medthod. | |
const T * | 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. | |
virtual bool | setWidgetValue (const U &value) const =0 |
Sets the widget value. | |
virtual U | valueFromWidget () const =0 |
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 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 | |
bool | configureEditorPrivate (QWidget *editor, const QgsSettingsEntryBase *setting) override |
Configures an existing editor widget. | |
virtual void | configureEditorPrivateImplementation () |
To be re-implemented to implemeent type specific configuration (e.g. opacity for colors) | |
virtual QWidget * | createEditorPrivate (QWidget *parent=nullptr) const override |
Creates the widgets. | |
Protected Member Functions inherited from QgsSettingsEditorWidgetWrapper | |
virtual void | enableAutomaticUpdatePrivate ()=0 |
Enables automatic update, which causes the setting to be updated immediately when the widget value is changed. | |
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 QgsSettingsEditorWidgetWrapper * | fromWidget (const QWidget *widget) |
Creates a wrapper from the definition stored in a widget created by createEditor() | |
This class is a base factory of editor for settings.
Definition at line 46 of file qgssettingseditorwidgetwrapperimpl.h.
|
inline |
Constructor.
Definition at line 50 of file qgssettingseditorwidgetwrapperimpl.h.
|
inlineoverrideprotectedvirtual |
Configures an existing editor widget.
Implements QgsSettingsEditorWidgetWrapper.
Definition at line 98 of file qgssettingseditorwidgetwrapperimpl.h.
|
inlineprotectedvirtual |
To be re-implemented to implemeent type specific configuration (e.g. opacity for colors)
Reimplemented in QgsSettingsColorButtonWrapper, QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >, and QgsSettingsEnumEditorWidgetWrapper< ENUM >.
Definition at line 112 of file qgssettingseditorwidgetwrapperimpl.h.
|
inlineoverrideprotectedvirtual |
Creates the widgets.
Implements QgsSettingsEditorWidgetWrapper.
Definition at line 91 of file qgssettingseditorwidgetwrapperimpl.h.
|
overridepure virtual |
Creates a new instance of the editor wrapper so it can be configured for a widget and a setting.
Implements QgsSettingsEditorWidgetWrapper.
Implemented in QgsSettingsStringLineEditWrapper, QgsSettingsStringComboBoxWrapper, QgsSettingsBoolCheckBoxWrapper, QgsSettingsIntegerSpinBoxWrapper, QgsSettingsDoubleSpinBoxWrapper, QgsSettingsColorButtonWrapper, QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >, and QgsSettingsEnumEditorWidgetWrapper< ENUM >.
|
inline |
Returns the editor.
Definition at line 83 of file qgssettingseditorwidgetwrapperimpl.h.
|
overridepure virtual |
This id of the type of settings it handles.
Implements QgsSettingsEditorWidgetWrapper.
Implemented in QgsSettingsStringLineEditWrapper, QgsSettingsStringComboBoxWrapper, QgsSettingsBoolCheckBoxWrapper, QgsSettingsIntegerSpinBoxWrapper, QgsSettingsDoubleSpinBoxWrapper, QgsSettingsColorButtonWrapper, QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >, and QgsSettingsEnumEditorWidgetWrapper< ENUM >.
|
overridepure virtual |
Sets the setting value from the widget value The wrapper must be configured before calling this medthod.
Implements QgsSettingsEditorWidgetWrapper.
Implemented in QgsSettingsStringLineEditWrapper, QgsSettingsStringComboBoxWrapper, QgsSettingsBoolCheckBoxWrapper, QgsSettingsIntegerSpinBoxWrapper, QgsSettingsDoubleSpinBoxWrapper, QgsSettingsColorButtonWrapper, QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >, and QgsSettingsEnumEditorWidgetWrapper< ENUM >.
|
inline |
Returns the setting.
Definition at line 86 of file qgssettingseditorwidgetwrapperimpl.h.
|
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.
|
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.
|
pure virtual |
Sets the widget value.
Implemented in QgsSettingsBoolCheckBoxWrapper, QgsSettingsDoubleSpinBoxWrapper, QgsSettingsEnumEditorWidgetWrapper< ENUM >, QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >, QgsSettingsIntegerSpinBoxWrapper, QgsSettingsColorButtonWrapper, QgsSettingsStringLineEditWrapper, and QgsSettingsStringComboBoxWrapper.
|
pure virtual |
Returns the widget value.
Implemented in QgsSettingsStringLineEditWrapper, QgsSettingsStringComboBoxWrapper, QgsSettingsBoolCheckBoxWrapper, QgsSettingsIntegerSpinBoxWrapper, QgsSettingsDoubleSpinBoxWrapper, QgsSettingsColorButtonWrapper, QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >, and QgsSettingsEnumEditorWidgetWrapper< ENUM >.
|
inlineoverridevirtual |
Returns the value from the widget as a variant The wrapper must be configured before calling this medthod.
Implements QgsSettingsEditorWidgetWrapper.
Reimplemented in QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >, and QgsSettingsEnumEditorWidgetWrapper< ENUM >.
Definition at line 74 of file qgssettingseditorwidgetwrapperimpl.h.
|
protected |
Definition at line 115 of file qgssettingseditorwidgetwrapperimpl.h.
|
protected |
Definition at line 114 of file qgssettingseditorwidgetwrapperimpl.h.