QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
#include <qgsactionscope.h>
Public Member Functions | |
QgsActionScope () | |
Creates a new invalid action scope. More... | |
QgsActionScope (const QString &id, const QString &title, const QString &description, const QgsExpressionContextScope &expressionContextScope=QgsExpressionContextScope()) | |
Creates a new action scope. More... | |
QString | description () const |
The description should be a longer description of where actions in this scope are available. More... | |
QgsExpressionContextScope | expressionContextScope () const |
An expression scope may offer additional variables for an action scope. More... | |
QString | id () const |
A unique identifier for this action scope. More... | |
bool | isValid () const |
Returns if this scope is valid. More... | |
bool | operator== (const QgsActionScope &other) const |
Compares two action scopes. More... | |
void | setDescription (const QString &description) |
The description should be a longer description of where actions in this scope are available. More... | |
void | setExpressionContextScope (const QgsExpressionContextScope &expressionContextScope) |
An expression scope may offer additional variables for an action scope. More... | |
void | setId (const QString &id) |
A unique identifier for this action scope. More... | |
void | setTitle (const QString &title) |
The title is a human readable and translated string that will be presented to the user in the properties dialog. More... | |
QString | title () const |
The title is a human readable and translated string that will be presented to the user in the properties dialog. More... | |
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.
@clicked_x
and @clicked_y
in map coordinates. @field_index
, @field_name
and @field_value
. Definition at line 46 of file qgsactionscope.h.
|
explicit |
|
explicit |
Creates a new action scope.
For details concerning the parameters check the documentation of the corresponding properties.
Definition at line 24 of file qgsactionscope.cpp.
QString QgsActionScope::description | ( | ) | const |
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 expressionContextScope().
Definition at line 72 of file qgsactionscope.cpp.
QgsExpressionContextScope QgsActionScope::expressionContextScope | ( | ) | const |
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.
Definition at line 37 of file qgsactionscope.cpp.
QString QgsActionScope::id | ( | ) | const |
A unique identifier for this action scope.
Definition at line 47 of file qgsactionscope.cpp.
bool QgsActionScope::isValid | ( | ) | const |
bool QgsActionScope::operator== | ( | const QgsActionScope & | other | ) | const |
Compares two action scopes.
Definition at line 32 of file qgsactionscope.cpp.
void QgsActionScope::setDescription | ( | const QString & | 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 expressionContextScope().
Definition at line 77 of file qgsactionscope.cpp.
void QgsActionScope::setExpressionContextScope | ( | const QgsExpressionContextScope & | expressionContextScope | ) |
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.
Definition at line 42 of file qgsactionscope.cpp.
void QgsActionScope::setId | ( | const QString & | id | ) |
A unique identifier for this action scope.
Definition at line 52 of file qgsactionscope.cpp.
void QgsActionScope::setTitle | ( | const QString & | title | ) |
The title is a human readable and translated string that will be presented to the user in the properties dialog.
Definition at line 67 of file qgsactionscope.cpp.
QString QgsActionScope::title | ( | ) | const |
The title is a human readable and translated string that will be presented to the user in the properties dialog.
Definition at line 62 of file qgsactionscope.cpp.