QGIS/python/gui/qgsvariableeditorwidget.sip

128 lines
3.9 KiB
Plaintext
Raw Normal View History

2017-06-08 11:26:03 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsvariableeditorwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsVariableEditorWidget : QWidget
{
2017-06-08 11:26:03 +02:00
%Docstring
A tree based widget for editing expression context scope variables. The widget allows editing
variables from a QgsExpressionContextScope, and can optionally also show inherited
variables from a QgsExpressionContext.
.. versionadded:: 2.12
%End
2017-06-08 11:26:03 +02:00
%TypeHeaderCode
#include "qgsvariableeditorwidget.h"
%End
public:
QgsVariableEditorWidget( QWidget *parent /TransferThis/ = 0 );
2017-06-08 11:26:03 +02:00
%Docstring
Constructor for QgsVariableEditorWidget.
\param parent parent widget
%End
~QgsVariableEditorWidget();
void setContext( QgsExpressionContext *context );
2017-06-08 11:26:03 +02:00
%Docstring
Overwrites the 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:: context()
%End
QgsExpressionContext *context() const;
2017-06-08 11:26:03 +02:00
%Docstring
Returns the current expression context for the widget. QgsVariableEditorWidget widgets
are created with an empty context by default.
.. seealso:: setContext()
:rtype: QgsExpressionContext
%End
void setEditableScopeIndex( int scopeIndex );
2017-06-08 11:26:03 +02:00
%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:: editableScope()
%End
QgsExpressionContextScope *editableScope() const;
2017-06-08 11:26:03 +02:00
%Docstring
Returns the current editable scope for the widget.
:return: editable scope, or 0 if no editable scope is set
.. seealso:: setEditableScopeIndex()
:rtype: QgsExpressionContextScope
%End
void setSettingGroup( const QString &group );
2017-06-08 11:26:03 +02:00
%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:: settingGroup()
%End
QString settingGroup() const;
2017-06-08 11:26:03 +02:00
%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:: setSettingGroup()
:rtype: str
%End
2016-12-22 13:11:43 +01:00
QVariantMap variablesInActiveScope() const;
2017-06-08 11:26:03 +02:00
%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.
:rtype: QVariantMap
%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:: context()
%End
signals:
void scopeChanged();
2017-06-08 11:26:03 +02:00
%Docstring
Emitted when the user has modified a scope using the widget.
%End
protected:
2017-06-08 11:26:03 +02:00
virtual void showEvent( QShowEvent *event );
};
2017-06-08 11:26:03 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsvariableeditorwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/