QGIS/python/gui/auto_generated/qgsvariableeditorwidget.sip.in

138 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
2017-12-15 10:36:55 -04:00
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.
2017-06-08 11:26:03 +02:00
.. 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
2017-12-15 10:36:55 -04:00
Constructor for QgsVariableEditorWidget.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param parent: parent widget
2017-06-08 11:26:03 +02:00
%End
~QgsVariableEditorWidget();
void setContext( QgsExpressionContext *context );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param context: expression context
.. seealso:: :py:func:`context`
2017-06-08 11:26:03 +02:00
%End
QgsExpressionContext *context() const;
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the current expression context for the widget. QgsVariableEditorWidget widgets
are created with an empty context by default.
.. seealso:: :py:func:`setContext`
2017-06-08 11:26:03 +02:00
%End
void setEditableScopeIndex( int scopeIndex );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the editable scope for the widget. Only variables from the editable scope can
be modified by users.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param scopeIndex: index of current editable scope. Set to -1 to disable
editing and make the widget read-only.
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`editableScope`
2017-06-08 11:26:03 +02:00
%End
QgsExpressionContextScope *editableScope() const;
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the current editable scope for the widget.
:return: editable scope, or ``None`` if no editable scope is set
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setEditableScopeIndex`
2017-06-08 11:26:03 +02:00
%End
void setSettingGroup( const QString &group );
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param group: setting group
.. seealso:: :py:func:`settingGroup`
2017-06-08 11:26:03 +02:00
%End
QString settingGroup() const;
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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`
2017-06-08 11:26:03 +02:00
%End
2016-12-22 13:11:43 +01:00
QVariantMap variablesInActiveScope() const;
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
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.
2017-06-08 11:26:03 +02:00
%End
public slots:
void reloadContext();
%Docstring
2017-12-15 10:36:55 -04:00
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`
2017-06-08 11:26:03 +02:00
%End
signals:
void scopeChanged();
2017-06-08 11:26:03 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Emitted when the user has modified a scope using the widget.
2017-06-08 11:26:03 +02:00
%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 *
************************************************************************/