QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsSettingsIntegerEditorWidgetWrapper Class Reference

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

#include <qgssettingseditorwidgetwrapperimpl.h>

Inheritance diagram for QgsSettingsIntegerEditorWidgetWrapper:
Inheritance graph
[legend]

Public Member Functions

 QgsSettingsIntegerEditorWidgetWrapper (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.
 
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 int &value) const override
 Sets the widget value.
 
int valueFromWidget () const override
 Returns the widget value.
 
- Public Member Functions inherited from QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryInteger, QSpinBox, int >
 QgsSettingsEditorWidgetWrapperTemplate (QObject *parent=nullptr)
 Constructor.
 
QSpinBox * editor () const
 Returns the editor.
 
const QgsSettingsEntryIntegersetting () 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.
 
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
 
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.
 

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 Member Functions inherited from QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryInteger, QSpinBox, int >
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 Attributes inherited from QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryInteger, QSpinBox, int >
QSpinBox * mEditor
 
const QgsSettingsEntryIntegermSetting
 
- Protected Attributes inherited from QgsSettingsEditorWidgetWrapper
QStringList mDynamicKeyPartList
 

Detailed Description

This class is a factory of editor for integer settings.

Since
QGIS 3.32

Definition at line 175 of file qgssettingseditorwidgetwrapperimpl.h.

Constructor & Destructor Documentation

◆ QgsSettingsIntegerEditorWidgetWrapper()

QgsSettingsIntegerEditorWidgetWrapper::QgsSettingsIntegerEditorWidgetWrapper ( QObject *  parent = nullptr)
inline

Constructor.

Definition at line 180 of file qgssettingseditorwidgetwrapperimpl.h.

Member Function Documentation

◆ createWrapper()

QgsSettingsEditorWidgetWrapper * QgsSettingsIntegerEditorWidgetWrapper::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< QgsSettingsEntryInteger, QSpinBox, int >.

Definition at line 183 of file qgssettingseditorwidgetwrapperimpl.h.

◆ id()

QString QgsSettingsIntegerEditorWidgetWrapper::id ( ) const
overridevirtual

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< QgsSettingsEntryInteger, QSpinBox, int >.

Definition at line 132 of file qgssettingseditorwidgetwrapperimpl.cpp.

◆ setSettingFromWidget()

bool QgsSettingsIntegerEditorWidgetWrapper::setSettingFromWidget ( ) const
overridevirtual

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

Implements QgsSettingsEditorWidgetWrapperTemplate< QgsSettingsEntryInteger, QSpinBox, int >.

Definition at line 151 of file qgssettingseditorwidgetwrapperimpl.cpp.

◆ setWidgetValue()

bool QgsSettingsIntegerEditorWidgetWrapper::setWidgetValue ( const int &  value) const
overridevirtual

◆ valueFromWidget()

int QgsSettingsIntegerEditorWidgetWrapper::valueFromWidget ( ) const
overridevirtual

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