1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
|
/************************************************************************
* 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 *
************************************************************************/
|