mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-17 00:09:36 -04:00
140 lines
4.3 KiB
Plaintext
140 lines
4.3 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/settings/qgssettingseditorwidgetwrapper.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsSettingsEditorWidgetWrapper : QObject
|
|
{
|
|
%Docstring(signature="appended")
|
|
Base class for settings editor wrappers.
|
|
|
|
.. versionadded:: 3.32
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgssettingseditorwidgetwrapper.h"
|
|
%End
|
|
public:
|
|
static QgsSettingsEditorWidgetWrapper *fromWidget( const QWidget *widget );
|
|
%Docstring
|
|
Creates a wrapper from the definition stored in a ``widget`` created by
|
|
:py:func:`~QgsSettingsEditorWidgetWrapper.createEditor`
|
|
%End
|
|
|
|
QgsSettingsEditorWidgetWrapper( QObject *parent = 0 );
|
|
%Docstring
|
|
Constructor
|
|
%End
|
|
|
|
virtual ~QgsSettingsEditorWidgetWrapper();
|
|
|
|
virtual QString id() const = 0;
|
|
%Docstring
|
|
This id of the type of settings it handles
|
|
|
|
.. note::
|
|
|
|
This mostly correspond to the content of :py:class:`Qgis`.SettingsType but it's a string since custom Python implementation are possible.
|
|
%End
|
|
|
|
virtual QgsSettingsEditorWidgetWrapper *createWrapper( QObject *parent = 0 ) const = 0 /Factory/;
|
|
%Docstring
|
|
Creates a new instance of the editor wrapper so it can be configured for
|
|
a widget and a setting
|
|
%End
|
|
|
|
QWidget *createEditor( const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList = QStringList(), QWidget *parent = 0 ) /TransferBack/;
|
|
%Docstring
|
|
Creates the editor widget for the given ``setting``
|
|
%End
|
|
|
|
bool configureEditor( QWidget *editor, const QgsSettingsEntryBase *setting, const QStringList &dynamicKeyPartList = QStringList() );
|
|
%Docstring
|
|
Configures the ``editor`` according the setting
|
|
%End
|
|
|
|
virtual bool setWidgetFromSetting() const = 0;
|
|
%Docstring
|
|
Sets the widget value from the setting value The wrapper must be
|
|
configured before calling this medthod
|
|
%End
|
|
|
|
virtual bool setSettingFromWidget() const = 0;
|
|
%Docstring
|
|
Sets the setting value from the widget value The wrapper must be
|
|
configured before calling this medthod
|
|
%End
|
|
|
|
virtual QVariant variantValueFromWidget() const = 0;
|
|
%Docstring
|
|
Returns the value from the widget as a variant The wrapper must be
|
|
configured before calling this medthod
|
|
%End
|
|
|
|
virtual bool setWidgetFromVariant( const QVariant &value ) const = 0;
|
|
%Docstring
|
|
Sets the ``value`` of the widget The wrapper must be configured before
|
|
calling this medthod
|
|
%End
|
|
|
|
void configureAutomaticUpdate( QDialog *dialog = 0 );
|
|
%Docstring
|
|
Configure the settings update behavior when a widget value is changed.
|
|
|
|
If a ``dialog`` is provided, the setting will be updated when the dialog
|
|
is accepted. If not, the setting will be updated directly at each widget
|
|
value change.
|
|
|
|
.. note::
|
|
|
|
This must called after :py:func:`~QgsSettingsEditorWidgetWrapper.createEditor` or :py:func:`~QgsSettingsEditorWidgetWrapper.configureEditor`.
|
|
|
|
.. versionadded:: 3.40
|
|
%End
|
|
|
|
QStringList dynamicKeyPartList() const;
|
|
%Docstring
|
|
Returns the dynamic key parts
|
|
|
|
.. versionadded:: 3.40
|
|
%End
|
|
|
|
|
|
protected:
|
|
virtual QWidget *createEditorPrivate( QWidget *parent = 0 ) const = 0 /TransferBack/;
|
|
%Docstring
|
|
Creates the widgets
|
|
%End
|
|
|
|
virtual bool configureEditorPrivate( QWidget *editor /TransferBack/, const QgsSettingsEntryBase *setting /KeepReference/ ) = 0;
|
|
%Docstring
|
|
Configures an existing ``editor`` widget
|
|
%End
|
|
|
|
virtual void enableAutomaticUpdatePrivate() = 0;
|
|
%Docstring
|
|
Enables automatic update, which causes the setting to be updated
|
|
immediately when the widget value is changed.
|
|
|
|
.. versionadded:: 3.40
|
|
%End
|
|
|
|
};
|
|
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/settings/qgssettingseditorwidgetwrapper.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|