mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
rename settings editor widget wrappers (#58974)
to allow more than 1 widget type to be supported for each type of setting
This commit is contained in:
parent
699c004a5d
commit
ec839e9d7c
@ -4,22 +4,22 @@ try:
|
||||
except NameError:
|
||||
pass
|
||||
try:
|
||||
QgsSettingsStringEditorWidgetWrapper.__group__ = ['settings']
|
||||
QgsSettingsStringLineEditWrapper.__group__ = ['settings']
|
||||
except NameError:
|
||||
pass
|
||||
try:
|
||||
QgsSettingsBoolEditorWidgetWrapper.__group__ = ['settings']
|
||||
QgsSettingsBoolCheckBoxWrapper.__group__ = ['settings']
|
||||
except NameError:
|
||||
pass
|
||||
try:
|
||||
QgsSettingsIntegerEditorWidgetWrapper.__group__ = ['settings']
|
||||
QgsSettingsIntegerSpinBoxWrapper.__group__ = ['settings']
|
||||
except NameError:
|
||||
pass
|
||||
try:
|
||||
QgsSettingsDoubleEditorWidgetWrapper.__group__ = ['settings']
|
||||
QgsSettingsDoubleSpinBoxWrapper.__group__ = ['settings']
|
||||
except NameError:
|
||||
pass
|
||||
try:
|
||||
QgsSettingsColorEditorWidgetWrapper.__group__ = ['settings']
|
||||
QgsSettingsColorButtonWrapper.__group__ = ['settings']
|
||||
except NameError:
|
||||
pass
|
||||
|
@ -78,10 +78,10 @@ To be re-implemented to implemeent type specific configuration (e.g. opacity for
|
||||
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryString,QLineEdit,QString> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryStringQLineEditQStringBase;
|
||||
|
||||
class QgsSettingsStringEditorWidgetWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryStringQLineEditQStringBase
|
||||
class QgsSettingsStringLineEditWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryStringQLineEditQStringBase
|
||||
{
|
||||
%Docstring(signature="appended")
|
||||
This class is a factory of editor for string settings
|
||||
This class is a factory of editor for string settings with a line edit
|
||||
|
||||
.. versionadded:: 3.32
|
||||
%End
|
||||
@ -91,7 +91,7 @@ This class is a factory of editor for string settings
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryString,QLineEdit,QString> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryStringQLineEditQStringBase;
|
||||
%End
|
||||
public:
|
||||
QgsSettingsStringEditorWidgetWrapper( QObject *parent = 0 );
|
||||
QgsSettingsStringLineEditWrapper( QObject *parent = 0 );
|
||||
%Docstring
|
||||
Constructor
|
||||
%End
|
||||
@ -115,12 +115,13 @@ Constructor
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryBool,QCheckBox,bool> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryBoolQCheckBoxboolBase;
|
||||
|
||||
class QgsSettingsBoolEditorWidgetWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryBoolQCheckBoxboolBase
|
||||
class QgsSettingsBoolCheckBoxWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryBoolQCheckBoxboolBase
|
||||
{
|
||||
%Docstring(signature="appended")
|
||||
This class is a factory of editor for boolean settings
|
||||
This class is a factory of editor for boolean settings with a checkbox
|
||||
|
||||
.. versionadded:: 3.32
|
||||
%End
|
||||
@ -130,7 +131,7 @@ This class is a factory of editor for boolean settings
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryBool,QCheckBox,bool> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryBoolQCheckBoxboolBase;
|
||||
%End
|
||||
public:
|
||||
QgsSettingsBoolEditorWidgetWrapper( QObject *parent = 0 );
|
||||
QgsSettingsBoolCheckBoxWrapper( QObject *parent = 0 );
|
||||
%Docstring
|
||||
Constructor
|
||||
%End
|
||||
@ -156,10 +157,10 @@ Constructor
|
||||
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryInteger,QSpinBox,int> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryIntegerQSpinBoxintBase;
|
||||
|
||||
class QgsSettingsIntegerEditorWidgetWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryIntegerQSpinBoxintBase
|
||||
class QgsSettingsIntegerSpinBoxWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryIntegerQSpinBoxintBase
|
||||
{
|
||||
%Docstring(signature="appended")
|
||||
This class is a factory of editor for integer settings
|
||||
This class is a factory of editor for integer settings with a spin box
|
||||
|
||||
.. versionadded:: 3.32
|
||||
%End
|
||||
@ -169,7 +170,7 @@ This class is a factory of editor for integer settings
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryInteger,QSpinBox,int> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryIntegerQSpinBoxintBase;
|
||||
%End
|
||||
public:
|
||||
QgsSettingsIntegerEditorWidgetWrapper( QObject *parent = 0 );
|
||||
QgsSettingsIntegerSpinBoxWrapper( QObject *parent = 0 );
|
||||
%Docstring
|
||||
Constructor
|
||||
%End
|
||||
@ -196,10 +197,10 @@ Constructor
|
||||
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryDouble,QDoubleSpinBox,double> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryDoubleQDoubleSpinBoxdoubleBase;
|
||||
|
||||
class QgsSettingsDoubleEditorWidgetWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryDoubleQDoubleSpinBoxdoubleBase
|
||||
class QgsSettingsDoubleSpinBoxWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryDoubleQDoubleSpinBoxdoubleBase
|
||||
{
|
||||
%Docstring(signature="appended")
|
||||
This class is a factory of editor for double settings
|
||||
This class is a factory of editor for double settings with a double spin box
|
||||
|
||||
.. versionadded:: 3.32
|
||||
%End
|
||||
@ -209,7 +210,7 @@ This class is a factory of editor for double settings
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryDouble,QDoubleSpinBox,double> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryDoubleQDoubleSpinBoxdoubleBase;
|
||||
%End
|
||||
public:
|
||||
QgsSettingsDoubleEditorWidgetWrapper( QObject *parent = 0 );
|
||||
QgsSettingsDoubleSpinBoxWrapper( QObject *parent = 0 );
|
||||
%Docstring
|
||||
Constructor
|
||||
%End
|
||||
@ -236,10 +237,10 @@ Constructor
|
||||
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryColor,QgsColorButton,QColor> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryColorQgsColorButtonQColorBase;
|
||||
|
||||
class QgsSettingsColorEditorWidgetWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryColorQgsColorButtonQColorBase
|
||||
class QgsSettingsColorButtonWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryColorQgsColorButtonQColorBase
|
||||
{
|
||||
%Docstring(signature="appended")
|
||||
This class is a factory of editor for color settings
|
||||
This class is a factory of editor for color settings with a color button
|
||||
|
||||
.. versionadded:: 3.32
|
||||
%End
|
||||
@ -249,7 +250,7 @@ This class is a factory of editor for color settings
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryColor,QgsColorButton,QColor> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryColorQgsColorButtonQColorBase;
|
||||
%End
|
||||
public:
|
||||
QgsSettingsColorEditorWidgetWrapper( QObject *parent = 0 );
|
||||
QgsSettingsColorButtonWrapper( QObject *parent = 0 );
|
||||
%Docstring
|
||||
Constructor
|
||||
%End
|
||||
|
@ -76,3 +76,10 @@ QgsMapLayerAction.EnabledOnlyWhenEditable = _Qgis.MapLayerActionFlag.EnabledOnly
|
||||
QgsMapLayerAction.EnabledOnlyWhenEditable.is_monkey_patched = True
|
||||
QgsMapLayerAction.EnabledOnlyWhenEditable.__doc__ = "Action should be shown only for editable layers"
|
||||
QgsMapLayerAction.Flags = _Qgis.MapLayerActionFlags
|
||||
|
||||
# monkey patch old settings wrappers
|
||||
QgsSettingsStringEditorWidgetWrapper = QgsSettingsStringLineEditWrapper
|
||||
QgsSettingsBoolEditorWidgetWrapper = QgsSettingsBoolCheckBoxWrapper
|
||||
QgsSettingsIntegerEditorWidgetWrapper = QgsSettingsIntegerSpinBoxWrapper
|
||||
QgsSettingsDoubleEditorWidgetWrapper = QgsSettingsDoubleSpinBoxWrapper
|
||||
QgsSettingsColorEditorWidgetWrapper = QgsSettingsColorButtonWrapper
|
||||
|
@ -4,22 +4,22 @@ try:
|
||||
except NameError:
|
||||
pass
|
||||
try:
|
||||
QgsSettingsStringEditorWidgetWrapper.__group__ = ['settings']
|
||||
QgsSettingsStringLineEditWrapper.__group__ = ['settings']
|
||||
except NameError:
|
||||
pass
|
||||
try:
|
||||
QgsSettingsBoolEditorWidgetWrapper.__group__ = ['settings']
|
||||
QgsSettingsBoolCheckBoxWrapper.__group__ = ['settings']
|
||||
except NameError:
|
||||
pass
|
||||
try:
|
||||
QgsSettingsIntegerEditorWidgetWrapper.__group__ = ['settings']
|
||||
QgsSettingsIntegerSpinBoxWrapper.__group__ = ['settings']
|
||||
except NameError:
|
||||
pass
|
||||
try:
|
||||
QgsSettingsDoubleEditorWidgetWrapper.__group__ = ['settings']
|
||||
QgsSettingsDoubleSpinBoxWrapper.__group__ = ['settings']
|
||||
except NameError:
|
||||
pass
|
||||
try:
|
||||
QgsSettingsColorEditorWidgetWrapper.__group__ = ['settings']
|
||||
QgsSettingsColorButtonWrapper.__group__ = ['settings']
|
||||
except NameError:
|
||||
pass
|
||||
|
@ -78,10 +78,10 @@ To be re-implemented to implemeent type specific configuration (e.g. opacity for
|
||||
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryString,QLineEdit,QString> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryStringQLineEditQStringBase;
|
||||
|
||||
class QgsSettingsStringEditorWidgetWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryStringQLineEditQStringBase
|
||||
class QgsSettingsStringLineEditWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryStringQLineEditQStringBase
|
||||
{
|
||||
%Docstring(signature="appended")
|
||||
This class is a factory of editor for string settings
|
||||
This class is a factory of editor for string settings with a line edit
|
||||
|
||||
.. versionadded:: 3.32
|
||||
%End
|
||||
@ -91,7 +91,7 @@ This class is a factory of editor for string settings
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryString,QLineEdit,QString> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryStringQLineEditQStringBase;
|
||||
%End
|
||||
public:
|
||||
QgsSettingsStringEditorWidgetWrapper( QObject *parent = 0 );
|
||||
QgsSettingsStringLineEditWrapper( QObject *parent = 0 );
|
||||
%Docstring
|
||||
Constructor
|
||||
%End
|
||||
@ -115,12 +115,13 @@ Constructor
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryBool,QCheckBox,bool> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryBoolQCheckBoxboolBase;
|
||||
|
||||
class QgsSettingsBoolEditorWidgetWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryBoolQCheckBoxboolBase
|
||||
class QgsSettingsBoolCheckBoxWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryBoolQCheckBoxboolBase
|
||||
{
|
||||
%Docstring(signature="appended")
|
||||
This class is a factory of editor for boolean settings
|
||||
This class is a factory of editor for boolean settings with a checkbox
|
||||
|
||||
.. versionadded:: 3.32
|
||||
%End
|
||||
@ -130,7 +131,7 @@ This class is a factory of editor for boolean settings
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryBool,QCheckBox,bool> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryBoolQCheckBoxboolBase;
|
||||
%End
|
||||
public:
|
||||
QgsSettingsBoolEditorWidgetWrapper( QObject *parent = 0 );
|
||||
QgsSettingsBoolCheckBoxWrapper( QObject *parent = 0 );
|
||||
%Docstring
|
||||
Constructor
|
||||
%End
|
||||
@ -156,10 +157,10 @@ Constructor
|
||||
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryInteger,QSpinBox,int> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryIntegerQSpinBoxintBase;
|
||||
|
||||
class QgsSettingsIntegerEditorWidgetWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryIntegerQSpinBoxintBase
|
||||
class QgsSettingsIntegerSpinBoxWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryIntegerQSpinBoxintBase
|
||||
{
|
||||
%Docstring(signature="appended")
|
||||
This class is a factory of editor for integer settings
|
||||
This class is a factory of editor for integer settings with a spin box
|
||||
|
||||
.. versionadded:: 3.32
|
||||
%End
|
||||
@ -169,7 +170,7 @@ This class is a factory of editor for integer settings
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryInteger,QSpinBox,int> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryIntegerQSpinBoxintBase;
|
||||
%End
|
||||
public:
|
||||
QgsSettingsIntegerEditorWidgetWrapper( QObject *parent = 0 );
|
||||
QgsSettingsIntegerSpinBoxWrapper( QObject *parent = 0 );
|
||||
%Docstring
|
||||
Constructor
|
||||
%End
|
||||
@ -196,10 +197,10 @@ Constructor
|
||||
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryDouble,QDoubleSpinBox,double> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryDoubleQDoubleSpinBoxdoubleBase;
|
||||
|
||||
class QgsSettingsDoubleEditorWidgetWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryDoubleQDoubleSpinBoxdoubleBase
|
||||
class QgsSettingsDoubleSpinBoxWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryDoubleQDoubleSpinBoxdoubleBase
|
||||
{
|
||||
%Docstring(signature="appended")
|
||||
This class is a factory of editor for double settings
|
||||
This class is a factory of editor for double settings with a double spin box
|
||||
|
||||
.. versionadded:: 3.32
|
||||
%End
|
||||
@ -209,7 +210,7 @@ This class is a factory of editor for double settings
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryDouble,QDoubleSpinBox,double> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryDoubleQDoubleSpinBoxdoubleBase;
|
||||
%End
|
||||
public:
|
||||
QgsSettingsDoubleEditorWidgetWrapper( QObject *parent = 0 );
|
||||
QgsSettingsDoubleSpinBoxWrapper( QObject *parent = 0 );
|
||||
%Docstring
|
||||
Constructor
|
||||
%End
|
||||
@ -236,10 +237,10 @@ Constructor
|
||||
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryColor,QgsColorButton,QColor> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryColorQgsColorButtonQColorBase;
|
||||
|
||||
class QgsSettingsColorEditorWidgetWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryColorQgsColorButtonQColorBase
|
||||
class QgsSettingsColorButtonWrapper : QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryColorQgsColorButtonQColorBase
|
||||
{
|
||||
%Docstring(signature="appended")
|
||||
This class is a factory of editor for color settings
|
||||
This class is a factory of editor for color settings with a color button
|
||||
|
||||
.. versionadded:: 3.32
|
||||
%End
|
||||
@ -249,7 +250,7 @@ This class is a factory of editor for color settings
|
||||
typedef QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryColor,QgsColorButton,QColor> QgsSettingsEditorWidgetWrapperTemplateQgsSettingsEntryColorQgsColorButtonQColorBase;
|
||||
%End
|
||||
public:
|
||||
QgsSettingsColorEditorWidgetWrapper( QObject *parent = 0 );
|
||||
QgsSettingsColorButtonWrapper( QObject *parent = 0 );
|
||||
%Docstring
|
||||
Constructor
|
||||
%End
|
||||
|
@ -29,11 +29,11 @@
|
||||
|
||||
QgsSettingsEditorWidgetRegistry::QgsSettingsEditorWidgetRegistry()
|
||||
{
|
||||
addWrapper( new QgsSettingsStringEditorWidgetWrapper() );
|
||||
addWrapper( new QgsSettingsBoolEditorWidgetWrapper() );
|
||||
addWrapper( new QgsSettingsIntegerEditorWidgetWrapper() );
|
||||
addWrapper( new QgsSettingsDoubleEditorWidgetWrapper() );
|
||||
addWrapper( new QgsSettingsColorEditorWidgetWrapper() );
|
||||
addWrapper( new QgsSettingsStringLineEditWrapper() );
|
||||
addWrapper( new QgsSettingsBoolCheckBoxWrapper() );
|
||||
addWrapper( new QgsSettingsIntegerSpinBoxWrapper() );
|
||||
addWrapper( new QgsSettingsDoubleSpinBoxWrapper() );
|
||||
addWrapper( new QgsSettingsColorButtonWrapper() );
|
||||
|
||||
// enum
|
||||
#if defined( HAVE_QTSERIALPORT )
|
||||
|
@ -27,12 +27,12 @@
|
||||
// String
|
||||
// *******
|
||||
|
||||
QString QgsSettingsStringEditorWidgetWrapper::id() const
|
||||
QString QgsSettingsStringLineEditWrapper::id() const
|
||||
{
|
||||
return QString::fromUtf8( sSettingsTypeMetaEnum.valueToKey( static_cast<int>( Qgis::SettingsType::String ) ) );
|
||||
}
|
||||
|
||||
bool QgsSettingsStringEditorWidgetWrapper::setWidgetValue( const QString &value ) const
|
||||
bool QgsSettingsStringLineEditWrapper::setWidgetValue( const QString &value ) const
|
||||
{
|
||||
if ( mEditor )
|
||||
{
|
||||
@ -46,7 +46,7 @@ bool QgsSettingsStringEditorWidgetWrapper::setWidgetValue( const QString &value
|
||||
return false;
|
||||
}
|
||||
|
||||
void QgsSettingsStringEditorWidgetWrapper::enableAutomaticUpdatePrivate()
|
||||
void QgsSettingsStringLineEditWrapper::enableAutomaticUpdatePrivate()
|
||||
{
|
||||
QObject::connect( this->mEditor, &QLineEdit::textChanged, this, [ = ]( const QString & text )
|
||||
{
|
||||
@ -54,7 +54,7 @@ void QgsSettingsStringEditorWidgetWrapper::enableAutomaticUpdatePrivate()
|
||||
} );
|
||||
}
|
||||
|
||||
bool QgsSettingsStringEditorWidgetWrapper::setSettingFromWidget() const
|
||||
bool QgsSettingsStringLineEditWrapper::setSettingFromWidget() const
|
||||
{
|
||||
if ( mEditor )
|
||||
{
|
||||
@ -68,7 +68,7 @@ bool QgsSettingsStringEditorWidgetWrapper::setSettingFromWidget() const
|
||||
return false;
|
||||
}
|
||||
|
||||
QString QgsSettingsStringEditorWidgetWrapper::valueFromWidget() const
|
||||
QString QgsSettingsStringLineEditWrapper::valueFromWidget() const
|
||||
{
|
||||
if ( mEditor )
|
||||
{
|
||||
@ -85,12 +85,12 @@ QString QgsSettingsStringEditorWidgetWrapper::valueFromWidget() const
|
||||
// Boolean
|
||||
// *******
|
||||
|
||||
QString QgsSettingsBoolEditorWidgetWrapper::id() const
|
||||
QString QgsSettingsBoolCheckBoxWrapper::id() const
|
||||
{
|
||||
return QString::fromUtf8( sSettingsTypeMetaEnum.valueToKey( static_cast<int>( Qgis::SettingsType::Bool ) ) );
|
||||
}
|
||||
|
||||
bool QgsSettingsBoolEditorWidgetWrapper::setWidgetValue( const bool &value ) const
|
||||
bool QgsSettingsBoolCheckBoxWrapper::setWidgetValue( const bool &value ) const
|
||||
{
|
||||
if ( mEditor )
|
||||
{
|
||||
@ -104,7 +104,7 @@ bool QgsSettingsBoolEditorWidgetWrapper::setWidgetValue( const bool &value ) con
|
||||
return false;
|
||||
}
|
||||
|
||||
void QgsSettingsBoolEditorWidgetWrapper::enableAutomaticUpdatePrivate()
|
||||
void QgsSettingsBoolCheckBoxWrapper::enableAutomaticUpdatePrivate()
|
||||
{
|
||||
QObject::connect( this->mEditor, &QCheckBox::clicked, this, [ = ]( bool checked )
|
||||
{
|
||||
@ -112,7 +112,7 @@ void QgsSettingsBoolEditorWidgetWrapper::enableAutomaticUpdatePrivate()
|
||||
} );
|
||||
}
|
||||
|
||||
bool QgsSettingsBoolEditorWidgetWrapper::setSettingFromWidget() const
|
||||
bool QgsSettingsBoolCheckBoxWrapper::setSettingFromWidget() const
|
||||
{
|
||||
if ( mEditor )
|
||||
{
|
||||
@ -126,7 +126,7 @@ bool QgsSettingsBoolEditorWidgetWrapper::setSettingFromWidget() const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool QgsSettingsBoolEditorWidgetWrapper::valueFromWidget() const
|
||||
bool QgsSettingsBoolCheckBoxWrapper::valueFromWidget() const
|
||||
{
|
||||
|
||||
if ( mEditor )
|
||||
@ -145,12 +145,12 @@ bool QgsSettingsBoolEditorWidgetWrapper::valueFromWidget() const
|
||||
// Integer
|
||||
// *******
|
||||
|
||||
QString QgsSettingsIntegerEditorWidgetWrapper::id() const
|
||||
QString QgsSettingsIntegerSpinBoxWrapper::id() const
|
||||
{
|
||||
return QString::fromUtf8( sSettingsTypeMetaEnum.valueToKey( static_cast<int>( Qgis::SettingsType::Integer ) ) );
|
||||
}
|
||||
|
||||
bool QgsSettingsIntegerEditorWidgetWrapper::setWidgetValue( const int &value ) const
|
||||
bool QgsSettingsIntegerSpinBoxWrapper::setWidgetValue( const int &value ) const
|
||||
{
|
||||
if ( mEditor )
|
||||
{
|
||||
@ -164,7 +164,7 @@ bool QgsSettingsIntegerEditorWidgetWrapper::setWidgetValue( const int &value ) c
|
||||
return false;
|
||||
}
|
||||
|
||||
void QgsSettingsIntegerEditorWidgetWrapper::enableAutomaticUpdatePrivate()
|
||||
void QgsSettingsIntegerSpinBoxWrapper::enableAutomaticUpdatePrivate()
|
||||
{
|
||||
QObject::connect( this->mEditor, qOverload<int>( &QSpinBox::valueChanged ), this, [ = ]( int value )
|
||||
{
|
||||
@ -172,7 +172,7 @@ void QgsSettingsIntegerEditorWidgetWrapper::enableAutomaticUpdatePrivate()
|
||||
} );
|
||||
}
|
||||
|
||||
bool QgsSettingsIntegerEditorWidgetWrapper::setSettingFromWidget() const
|
||||
bool QgsSettingsIntegerSpinBoxWrapper::setSettingFromWidget() const
|
||||
{
|
||||
if ( mEditor )
|
||||
{
|
||||
@ -186,7 +186,7 @@ bool QgsSettingsIntegerEditorWidgetWrapper::setSettingFromWidget() const
|
||||
return false;
|
||||
}
|
||||
|
||||
int QgsSettingsIntegerEditorWidgetWrapper::valueFromWidget() const
|
||||
int QgsSettingsIntegerSpinBoxWrapper::valueFromWidget() const
|
||||
{
|
||||
if ( mEditor )
|
||||
{
|
||||
@ -205,12 +205,12 @@ int QgsSettingsIntegerEditorWidgetWrapper::valueFromWidget() const
|
||||
// Double
|
||||
// *******
|
||||
|
||||
QString QgsSettingsDoubleEditorWidgetWrapper::id() const
|
||||
QString QgsSettingsDoubleSpinBoxWrapper::id() const
|
||||
{
|
||||
return QString::fromUtf8( sSettingsTypeMetaEnum.valueToKey( static_cast<int>( Qgis::SettingsType::Double ) ) );
|
||||
}
|
||||
|
||||
bool QgsSettingsDoubleEditorWidgetWrapper::setWidgetValue( const double &value ) const
|
||||
bool QgsSettingsDoubleSpinBoxWrapper::setWidgetValue( const double &value ) const
|
||||
{
|
||||
if ( mEditor )
|
||||
{
|
||||
@ -224,7 +224,7 @@ bool QgsSettingsDoubleEditorWidgetWrapper::setWidgetValue( const double &value )
|
||||
return false;
|
||||
}
|
||||
|
||||
void QgsSettingsDoubleEditorWidgetWrapper::enableAutomaticUpdatePrivate()
|
||||
void QgsSettingsDoubleSpinBoxWrapper::enableAutomaticUpdatePrivate()
|
||||
{
|
||||
QObject::connect( this->mEditor, qOverload<double>( &QDoubleSpinBox::valueChanged ), this, [ = ]( double value )
|
||||
{
|
||||
@ -232,7 +232,7 @@ void QgsSettingsDoubleEditorWidgetWrapper::enableAutomaticUpdatePrivate()
|
||||
} );
|
||||
}
|
||||
|
||||
bool QgsSettingsDoubleEditorWidgetWrapper::setSettingFromWidget() const
|
||||
bool QgsSettingsDoubleSpinBoxWrapper::setSettingFromWidget() const
|
||||
{
|
||||
if ( mEditor )
|
||||
{
|
||||
@ -246,7 +246,7 @@ bool QgsSettingsDoubleEditorWidgetWrapper::setSettingFromWidget() const
|
||||
return false;
|
||||
}
|
||||
|
||||
double QgsSettingsDoubleEditorWidgetWrapper::valueFromWidget() const
|
||||
double QgsSettingsDoubleSpinBoxWrapper::valueFromWidget() const
|
||||
{
|
||||
if ( mEditor )
|
||||
{
|
||||
@ -263,12 +263,12 @@ double QgsSettingsDoubleEditorWidgetWrapper::valueFromWidget() const
|
||||
// Color
|
||||
// *******
|
||||
|
||||
QString QgsSettingsColorEditorWidgetWrapper::id() const
|
||||
QString QgsSettingsColorButtonWrapper::id() const
|
||||
{
|
||||
return QString::fromUtf8( sSettingsTypeMetaEnum.valueToKey( static_cast<int>( Qgis::SettingsType::Color ) ) );
|
||||
}
|
||||
|
||||
bool QgsSettingsColorEditorWidgetWrapper::setWidgetValue( const QColor &value ) const
|
||||
bool QgsSettingsColorButtonWrapper::setWidgetValue( const QColor &value ) const
|
||||
{
|
||||
if ( mEditor )
|
||||
{
|
||||
@ -282,7 +282,7 @@ bool QgsSettingsColorEditorWidgetWrapper::setWidgetValue( const QColor &value )
|
||||
return false;
|
||||
}
|
||||
|
||||
void QgsSettingsColorEditorWidgetWrapper::configureEditorPrivateImplementation()
|
||||
void QgsSettingsColorButtonWrapper::configureEditorPrivateImplementation()
|
||||
{
|
||||
if ( mEditor )
|
||||
{
|
||||
@ -294,7 +294,7 @@ void QgsSettingsColorEditorWidgetWrapper::configureEditorPrivateImplementation()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsSettingsColorEditorWidgetWrapper::enableAutomaticUpdatePrivate()
|
||||
void QgsSettingsColorButtonWrapper::enableAutomaticUpdatePrivate()
|
||||
{
|
||||
QObject::connect( this->mEditor, &QgsColorButton::colorChanged, this, [ = ]( const QColor & color )
|
||||
{
|
||||
@ -302,7 +302,7 @@ void QgsSettingsColorEditorWidgetWrapper::enableAutomaticUpdatePrivate()
|
||||
} );
|
||||
}
|
||||
|
||||
bool QgsSettingsColorEditorWidgetWrapper::setSettingFromWidget() const
|
||||
bool QgsSettingsColorButtonWrapper::setSettingFromWidget() const
|
||||
{
|
||||
if ( mEditor )
|
||||
{
|
||||
@ -316,7 +316,7 @@ bool QgsSettingsColorEditorWidgetWrapper::setSettingFromWidget() const
|
||||
return false;
|
||||
}
|
||||
|
||||
QColor QgsSettingsColorEditorWidgetWrapper::valueFromWidget() const
|
||||
QColor QgsSettingsColorButtonWrapper::valueFromWidget() const
|
||||
{
|
||||
if ( mEditor )
|
||||
{
|
||||
|
@ -118,19 +118,19 @@ class QgsSettingsEditorWidgetWrapperTemplate : public QgsSettingsEditorWidgetWra
|
||||
|
||||
/**
|
||||
* \ingroup gui
|
||||
* \brief This class is a factory of editor for string settings
|
||||
* \brief This class is a factory of editor for string settings with a line edit
|
||||
*
|
||||
* \since QGIS 3.32
|
||||
*/
|
||||
class GUI_EXPORT QgsSettingsStringEditorWidgetWrapper : public QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryString, QLineEdit, QString>
|
||||
class GUI_EXPORT QgsSettingsStringLineEditWrapper : public QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryString, QLineEdit, QString>
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
//! Constructor
|
||||
QgsSettingsStringEditorWidgetWrapper( QObject *parent = nullptr )
|
||||
QgsSettingsStringLineEditWrapper( QObject *parent = nullptr )
|
||||
: QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryString, QLineEdit, QString>( parent ) {}
|
||||
|
||||
QgsSettingsEditorWidgetWrapper *createWrapper( QObject *parent = nullptr ) const override {return new QgsSettingsStringEditorWidgetWrapper( parent );}
|
||||
QgsSettingsEditorWidgetWrapper *createWrapper( QObject *parent = nullptr ) const override {return new QgsSettingsStringLineEditWrapper( parent );}
|
||||
|
||||
QString id() const override;
|
||||
|
||||
@ -143,21 +143,22 @@ class GUI_EXPORT QgsSettingsStringEditorWidgetWrapper : public QgsSettingsEditor
|
||||
void enableAutomaticUpdatePrivate() override;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* \ingroup gui
|
||||
* \brief This class is a factory of editor for boolean settings
|
||||
* \brief This class is a factory of editor for boolean settings with a checkbox
|
||||
*
|
||||
* \since QGIS 3.32
|
||||
*/
|
||||
class GUI_EXPORT QgsSettingsBoolEditorWidgetWrapper : public QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryBool, QCheckBox, bool>
|
||||
class GUI_EXPORT QgsSettingsBoolCheckBoxWrapper : public QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryBool, QCheckBox, bool>
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
//! Constructor
|
||||
QgsSettingsBoolEditorWidgetWrapper( QObject *parent = nullptr )
|
||||
QgsSettingsBoolCheckBoxWrapper( QObject *parent = nullptr )
|
||||
: QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryBool, QCheckBox, bool>( parent ) {}
|
||||
|
||||
QgsSettingsEditorWidgetWrapper *createWrapper( QObject *parent = nullptr ) const override {return new QgsSettingsBoolEditorWidgetWrapper( parent );}
|
||||
QgsSettingsEditorWidgetWrapper *createWrapper( QObject *parent = nullptr ) const override {return new QgsSettingsBoolCheckBoxWrapper( parent );}
|
||||
|
||||
QString id() const override;
|
||||
|
||||
@ -172,19 +173,19 @@ class GUI_EXPORT QgsSettingsBoolEditorWidgetWrapper : public QgsSettingsEditorWi
|
||||
|
||||
/**
|
||||
* \ingroup gui
|
||||
* \brief This class is a factory of editor for integer settings
|
||||
* \brief This class is a factory of editor for integer settings with a spin box
|
||||
*
|
||||
* \since QGIS 3.32
|
||||
*/
|
||||
class GUI_EXPORT QgsSettingsIntegerEditorWidgetWrapper : public QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryInteger, QSpinBox, int>
|
||||
class GUI_EXPORT QgsSettingsIntegerSpinBoxWrapper : public QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryInteger, QSpinBox, int>
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
//! Constructor
|
||||
QgsSettingsIntegerEditorWidgetWrapper( QObject *parent = nullptr )
|
||||
QgsSettingsIntegerSpinBoxWrapper( QObject *parent = nullptr )
|
||||
: QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryInteger, QSpinBox, int>( parent ) {}
|
||||
|
||||
QgsSettingsEditorWidgetWrapper *createWrapper( QObject *parent = nullptr ) const override {return new QgsSettingsIntegerEditorWidgetWrapper( parent );}
|
||||
QgsSettingsEditorWidgetWrapper *createWrapper( QObject *parent = nullptr ) const override {return new QgsSettingsIntegerSpinBoxWrapper( parent );}
|
||||
|
||||
QString id() const override;
|
||||
|
||||
@ -200,19 +201,19 @@ class GUI_EXPORT QgsSettingsIntegerEditorWidgetWrapper : public QgsSettingsEdito
|
||||
|
||||
/**
|
||||
* \ingroup gui
|
||||
* \brief This class is a factory of editor for double settings
|
||||
* \brief This class is a factory of editor for double settings with a double spin box
|
||||
*
|
||||
* \since QGIS 3.32
|
||||
*/
|
||||
class GUI_EXPORT QgsSettingsDoubleEditorWidgetWrapper : public QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryDouble, QDoubleSpinBox, double>
|
||||
class GUI_EXPORT QgsSettingsDoubleSpinBoxWrapper : public QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryDouble, QDoubleSpinBox, double>
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
//! Constructor
|
||||
QgsSettingsDoubleEditorWidgetWrapper( QObject *parent = nullptr )
|
||||
QgsSettingsDoubleSpinBoxWrapper( QObject *parent = nullptr )
|
||||
: QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryDouble, QDoubleSpinBox, double>( parent ) {}
|
||||
|
||||
QgsSettingsEditorWidgetWrapper *createWrapper( QObject *parent = nullptr ) const override {return new QgsSettingsDoubleEditorWidgetWrapper( parent );}
|
||||
QgsSettingsEditorWidgetWrapper *createWrapper( QObject *parent = nullptr ) const override {return new QgsSettingsDoubleSpinBoxWrapper( parent );}
|
||||
|
||||
QString id() const override;
|
||||
|
||||
@ -228,19 +229,19 @@ class GUI_EXPORT QgsSettingsDoubleEditorWidgetWrapper : public QgsSettingsEditor
|
||||
|
||||
/**
|
||||
* \ingroup gui
|
||||
* \brief This class is a factory of editor for color settings
|
||||
* \brief This class is a factory of editor for color settings with a color button
|
||||
*
|
||||
* \since QGIS 3.32
|
||||
*/
|
||||
class GUI_EXPORT QgsSettingsColorEditorWidgetWrapper : public QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryColor, QgsColorButton, QColor>
|
||||
class GUI_EXPORT QgsSettingsColorButtonWrapper : public QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryColor, QgsColorButton, QColor>
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
//! Constructor
|
||||
QgsSettingsColorEditorWidgetWrapper( QObject *parent = nullptr )
|
||||
QgsSettingsColorButtonWrapper( QObject *parent = nullptr )
|
||||
: QgsSettingsEditorWidgetWrapperTemplate<QgsSettingsEntryColor, QgsColorButton, QColor>( parent ) {}
|
||||
|
||||
QgsSettingsEditorWidgetWrapper *createWrapper( QObject *parent = nullptr ) const override {return new QgsSettingsColorEditorWidgetWrapper( parent );}
|
||||
QgsSettingsEditorWidgetWrapper *createWrapper( QObject *parent = nullptr ) const override {return new QgsSettingsColorButtonWrapper( parent );}
|
||||
|
||||
QString id() const override;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user