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
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsvariableeditorwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsVariableEditorWidget : QWidget
{
%Docstring(signature="appended")
A tree based widget for editing expression context scope variables. The
widget allows editing variables from a
:py:class:`QgsExpressionContextScope`, and can optionally also show
inherited variables from a :py:class:`QgsExpressionContext`.
%End
%TypeHeaderCode
#include "qgsvariableeditorwidget.h"
%End
public:
QgsVariableEditorWidget( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsVariableEditorWidget.
:param parent: parent widget
%End
~QgsVariableEditorWidget();
void setContext( QgsExpressionContext *context );
%Docstring
Overwrites the :py:class:`QgsExpressionContext` for the widget. Setting
a context allows the widget to show all inherited variables for the
context, and highlight any overridden variables within scopes.
:param context: expression context
.. seealso:: :py:func:`context`
%End
QgsExpressionContext *context() const;
%Docstring
Returns the current expression context for the widget.
QgsVariableEditorWidget widgets are created with an empty context by
default.
.. seealso:: :py:func:`setContext`
%End
void setEditableScopeIndex( int scopeIndex );
%Docstring
Sets the editable scope for the widget. Only variables from the editable
scope can be modified by users.
:param scopeIndex: index of current editable scope. Set to -1 to disable
editing and make the widget read-only.
.. seealso:: :py:func:`editableScope`
%End
QgsExpressionContextScope *editableScope() const;
%Docstring
Returns the current editable scope for the widget.
:return: editable scope, or ``None`` if no editable scope is set
.. seealso:: :py:func:`setEditableScopeIndex`
%End
void setSettingGroup( const QString &group );
%Docstring
Sets the setting group for the widget. QgsVariableEditorWidget widgets
with the same setting group will synchronise their settings, e.g., the
size of columns in the tree widget.
:param group: setting group
.. seealso:: :py:func:`settingGroup`
%End
QString settingGroup() const;
%Docstring
Returns the setting group for the widget. QgsVariableEditorWidget
widgets with the same setting group will synchronise their settings,
e.g., the size of columns in the tree widget.
:return: setting group name
.. seealso:: :py:func:`setSettingGroup`
%End
QVariantMap variablesInActiveScope() const;
%Docstring
Returns a map variables set within the editable scope. Read only
variables are not returned. This method can be used to retrieve the
variables edited an added by users via the widget.
%End
public slots:
void reloadContext();
%Docstring
Reloads all scopes from the editor's current context. This method should
be called after adding or removing scopes from the attached context.
.. seealso:: :py:func:`context`
%End
signals:
void scopeChanged();
%Docstring
Emitted when the user has modified a scope using the widget.
%End
protected:
virtual void showEvent( QShowEvent *event );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsvariableeditorwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|