QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
|
Base class for settings editor wrappers. More...
#include <qgssettingseditorwidgetwrapper.h>
Public Member Functions | |
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. | |
virtual QgsSettingsEditorWidgetWrapper * | createWrapper (QObject *parent=nullptr) const =0 |
Creates a new instance of the editor wrapper so it can be configured for a widget and a setting. | |
virtual QString | id () const =0 |
This id of the type of settings it handles. | |
virtual bool | setSettingFromWidget () const =0 |
Sets the setting value from the widget value The wrapper must be configured before calling this medthod. | |
virtual bool | setWidgetFromSetting () const =0 |
Sets the widget value from the setting value The wrapper must be configured before calling this medthod. | |
virtual void | setWidgetFromVariant (const QVariant &value) const =0 |
Sets the value of the widget The wrapper must be configured before calling this medthod. | |
virtual QVariant | variantValueFromWidget () const =0 |
Returns the value from the widget as a variant The wrapper must be configured before calling this medthod. | |
Static Public Member Functions | |
static QgsSettingsEditorWidgetWrapper * | fromWidget (const QWidget *widget) |
Creates a wrapper from the definition stored in a widget created by createEditor() | |
Protected Member Functions | |
virtual bool | configureEditorPrivate (QWidget *editor, const QgsSettingsEntryBase *setting)=0 |
Configures an existing editor widget. | |
virtual QWidget * | createEditorPrivate (QWidget *parent=nullptr) const =0 |
Creates the widgets. | |
Protected Attributes | |
QStringList | mDynamicKeyPartList |
Base class for settings editor wrappers.
Definition at line 32 of file qgssettingseditorwidgetwrapper.h.
QgsSettingsEditorWidgetWrapper::QgsSettingsEditorWidgetWrapper | ( | QObject * | parent = nullptr | ) |
Constructor.
Definition at line 36 of file qgssettingseditorwidgetwrapper.cpp.
|
virtualdefault |
bool QgsSettingsEditorWidgetWrapper::configureEditor | ( | QWidget * | editor, |
const QgsSettingsEntryBase * | setting, | ||
const QStringList & | dynamicKeyPartList = QStringList() |
||
) |
Configures the editor according the setting.
Definition at line 51 of file qgssettingseditorwidgetwrapper.cpp.
|
protectedpure virtual |
Configures an existing editor widget.
Implemented in QgsSettingsEditorWidgetWrapperTemplate< T, V, U >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryBool, QCheckBox, bool >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryColor, QgsColorButton, QColor >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryDouble, QDoubleSpinBox, double >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< FLAGS >, QComboBox, FLAGS >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryInteger, QSpinBox, int >, and QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryString, QLineEdit, QString >.
QWidget * QgsSettingsEditorWidgetWrapper::createEditor | ( | const QgsSettingsEntryBase * | setting, |
const QStringList & | dynamicKeyPartList = QStringList() , |
||
QWidget * | parent = nullptr |
||
) |
Creates the editor widget for the given setting.
Definition at line 41 of file qgssettingseditorwidgetwrapper.cpp.
|
protectedpure virtual |
Creates the widgets.
Implemented in QgsSettingsEditorWidgetWrapperTemplate< T, V, U >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryBool, QCheckBox, bool >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryColor, QgsColorButton, QColor >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryDouble, QDoubleSpinBox, double >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< FLAGS >, QComboBox, FLAGS >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryInteger, QSpinBox, int >, and QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryString, QLineEdit, QString >.
|
pure virtual |
Creates a new instance of the editor wrapper so it can be configured for a widget and a setting.
Implemented in QgsSettingsStringEditorWidgetWrapper, QgsSettingsBoolEditorWidgetWrapper, QgsSettingsIntegerEditorWidgetWrapper, QgsSettingsDoubleEditorWidgetWrapper, QgsSettingsColorEditorWidgetWrapper, QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >, QgsSettingsEnumEditorWidgetWrapper< ENUM >, QgsSettingsEditorWidgetWrapperTemplate< T, V, U >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryBool, QCheckBox, bool >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryColor, QgsColorButton, QColor >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryDouble, QDoubleSpinBox, double >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< FLAGS >, QComboBox, FLAGS >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryInteger, QSpinBox, int >, and QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryString, QLineEdit, QString >.
|
static |
Creates a wrapper from the definition stored in a widget created by createEditor()
Definition at line 25 of file qgssettingseditorwidgetwrapper.cpp.
|
pure virtual |
This id of the type of settings it handles.
Implemented in QgsSettingsStringEditorWidgetWrapper, QgsSettingsBoolEditorWidgetWrapper, QgsSettingsIntegerEditorWidgetWrapper, QgsSettingsDoubleEditorWidgetWrapper, QgsSettingsColorEditorWidgetWrapper, QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >, QgsSettingsEnumEditorWidgetWrapper< ENUM >, QgsSettingsEditorWidgetWrapperTemplate< T, V, U >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryBool, QCheckBox, bool >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryColor, QgsColorButton, QColor >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryDouble, QDoubleSpinBox, double >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< FLAGS >, QComboBox, FLAGS >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryInteger, QSpinBox, int >, and QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryString, QLineEdit, QString >.
|
pure virtual |
Sets the setting value from the widget value The wrapper must be configured before calling this medthod.
Implemented in QgsSettingsStringEditorWidgetWrapper, QgsSettingsBoolEditorWidgetWrapper, QgsSettingsIntegerEditorWidgetWrapper, QgsSettingsDoubleEditorWidgetWrapper, QgsSettingsColorEditorWidgetWrapper, QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >, QgsSettingsEnumEditorWidgetWrapper< ENUM >, QgsSettingsEditorWidgetWrapperTemplate< T, V, U >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryBool, QCheckBox, bool >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryColor, QgsColorButton, QColor >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryDouble, QDoubleSpinBox, double >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< FLAGS >, QComboBox, FLAGS >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryInteger, QSpinBox, int >, and QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryString, QLineEdit, QString >.
|
pure virtual |
Sets the widget value from the setting value The wrapper must be configured before calling this medthod.
Implemented in QgsSettingsEditorWidgetWrapperTemplate< T, V, U >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryBool, QCheckBox, bool >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryColor, QgsColorButton, QColor >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryDouble, QDoubleSpinBox, double >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< FLAGS >, QComboBox, FLAGS >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryInteger, QSpinBox, int >, and QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryString, QLineEdit, QString >.
|
pure virtual |
Sets the value of the widget The wrapper must be configured before calling this medthod.
Implemented in QgsSettingsEditorWidgetWrapperTemplate< T, V, U >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryBool, QCheckBox, bool >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryColor, QgsColorButton, QColor >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryDouble, QDoubleSpinBox, double >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< FLAGS >, QComboBox, FLAGS >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryInteger, QSpinBox, int >, and QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryString, QLineEdit, QString >.
|
pure virtual |
Returns the value from the widget as a variant The wrapper must be configured before calling this medthod.
Implemented in QgsSettingsEditorWidgetWrapperTemplate< T, V, U >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryBool, QCheckBox, bool >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryColor, QgsColorButton, QColor >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryDouble, QDoubleSpinBox, double >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< ENUM >, QComboBox, ENUM >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryEnumFlag< FLAGS >, QComboBox, FLAGS >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryInteger, QSpinBox, int >, QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryString, QLineEdit, QString >, QgsSettingsFlagsEditorWidgetWrapper< ENUM, FLAGS >, and QgsSettingsEnumEditorWidgetWrapper< ENUM >.
|
protected |
Definition at line 91 of file qgssettingseditorwidgetwrapper.h.