/************************************************************************ * This file has been generated automatically from * * * * src/core/actions/qgsactionscope.h * * * * Do not edit manually ! Edit header and run scripts/sipify.py again * ************************************************************************/ class QgsActionScope { %Docstring(signature="appended") An action scope defines a "place" for an action to be shown and may add additional expression variables. Each :py:class:`QgsAction` can be available in one or several action scopes. Examples ====================================== Canvas ------------------------------------ Show for canvas tools. Adds `@click_x` and `@click_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. %End %TypeHeaderCode #include "qgsactionscope.h" %End public: %TypeCode #include %End explicit QgsActionScope(); %Docstring Creates a new invalid action scope. %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 Returns the expression context scope for the action scope. An expression scope may offer additional variables for an action scope. This can be an `field_name` for the attribute which was clicked or `click_x` and `click_y` for actions which are available as map canvas clicks. .. seealso:: :py:func:`setExpressionContextScope` %End void setExpressionContextScope( const QgsExpressionContextScope &expressionContextScope ); %Docstring Sets the expression context scope for the action scope. An expression scope may offer additional variables for an action scope. This can be an `field_name` for the attribute which was clicked or `click_x` and `click_y` for actions which are available as map canvas clicks. .. seealso:: :py:func:`expressionContextScope` %End QString id() const; %Docstring Returns the unique identifier for this action scope. .. seealso:: :py:func:`setId` %End void setId( const QString &id ); %Docstring Sets the unique ``id`` for this action scope. .. seealso:: :py:func:`id` %End QString title() const; %Docstring Returns the action scope's title. The title is a human readable and translated string that will be presented to the user in the properties dialog. .. seealso:: :py:func:`setTitle` %End void setTitle( const QString &title ); %Docstring Sets the action scope's ``title``. The title should be a human readable and translated string that will be presented to the user in the properties dialog. .. seealso:: :py:func:`title` %End QString description() const; %Docstring Returns the action scope's description. 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`. .. seealso:: :py:func:`setDescription` %End void setDescription( const QString &description ); %Docstring Sets the action scope's ``description``. 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`. .. seealso:: :py:func:`description` %End bool isValid() const; %Docstring Returns ``True`` if this scope is valid. %End long __hash__(); %MethodCode sipRes = qHash( *sipCpp ); %End }; /************************************************************************ * This file has been generated automatically from * * * * src/core/actions/qgsactionscope.h * * * * Do not edit manually ! Edit header and run scripts/sipify.py again * ************************************************************************/