/************************************************************************ * This file has been generated automatically from * * * * src/core/qgsactionscope.h * * * * Do not edit manually ! Edit header and run scripts/sipify.pl again * ************************************************************************/ class QgsActionScope { %Docstring An action scope defines a "place" for an action to be shown and may add additional expression variables. Each QgsAction can be available in one or several action scopes. Examples: ---------
Canvas
Show for canvas tools. Adds `@clicked_x` and `@clicked_y` in map coordinates.
Feature
Show in feature specific places like the attribute table or feature form.
Field
Show in context menus for individual fields (e.g. attribute table). Adds `@field_index`, `@field_name` and `@field_value`.
Layer
Show in attribute table and work on the layer or selection.
.. versionadded:: 3.0 %End %TypeHeaderCode #include "qgsactionscope.h" %End public: %TypeCode #include %End explicit QgsActionScope(); %Docstring Creates a new invalid action scope. .. versionadded:: 3.0 %End explicit QgsActionScope( const QString &id, const QString &title, const QString &description, const QgsExpressionContextScope &expressionContextScope = QgsExpressionContextScope() ); %Docstring Creates a new action scope. For details concerning the parameters check the documentation of the corresponding properties. %End bool operator==( const QgsActionScope &other ) const; QgsExpressionContextScope expressionContextScope() const; %Docstring An expression scope may offer additional variables for an action scope. This can be an `field_name` for the attribute which was clicked or `clicked_x` and `clicked_y` for actions which are available as map canvas clicks. .. versionadded:: 3.0 %End void setExpressionContextScope( const QgsExpressionContextScope &expressionContextScope ); %Docstring \copydoc :py:func:`~QgsActionScope.expressionContextScope` %End QString id() const; %Docstring A unique identifier for this action scope. .. versionadded:: 3.0 %End void setId( const QString &id ); %Docstring \copydoc :py:func:`~QgsActionScope.id` %End QString title() const; %Docstring The title is a human readable and translated string that will be presented to the user in the properties dialog. .. versionadded:: 3.0 %End void setTitle( const QString &title ); %Docstring \copydoc :py:func:`~QgsActionScope.title` %End QString description() const; %Docstring The description should be a longer description of where actions in this scope are available. It is not necessary to list the available expression variables in here, they are extracted automatically from the :py:func:`~QgsActionScope.expressionContextScope`. .. versionadded:: 3.0 %End void setDescription( const QString &description ); %Docstring \copydoc :py:func:`~QgsActionScope.description` %End bool isValid() const; %Docstring Returns if this scope is valid. .. versionadded:: 3.0 %End long __hash__(); %MethodCode sipRes = qHash( *sipCpp ); %End }; /************************************************************************ * This file has been generated automatically from * * * * src/core/qgsactionscope.h * * * * Do not edit manually ! Edit header and run scripts/sipify.pl again * ************************************************************************/