This class is a menu that is populated automatically with the actions defined for a given layer.
More...
#include <qgsactionmenu.h>
This class is a menu that is populated automatically with the actions defined for a given layer.
Definition at line 37 of file qgsactionmenu.h.
◆ ActionType
Enumerator |
---|
Invalid | Invalid.
|
MapLayerAction | Standard actions (defined by core or plugins)
|
AttributeAction | Custom actions (manually defined in layer properties)
|
Definition at line 42 of file qgsactionmenu.h.
◆ QgsActionMenu() [1/2]
QgsActionMenu::QgsActionMenu |
( |
QgsVectorLayer * |
layer, |
|
|
const QgsFeature & |
feature, |
|
|
const QString & |
actionScope, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
|
explicit |
Constructs a new QgsActionMenu.
- Parameters
-
layer | The layer that this action will be run upon. |
feature | The feature that this action will be run upon. Make sure that this feature is available for the lifetime of this object. |
parent | The usual QWidget parent. |
actionScope | The action scope this menu will run in |
Definition at line 23 of file qgsactionmenu.cpp.
◆ QgsActionMenu() [2/2]
QgsActionMenu::QgsActionMenu |
( |
QgsVectorLayer * |
layer, |
|
|
QgsFeatureId |
fid, |
|
|
const QString & |
actionScope, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
|
explicit |
Constructs a new QgsActionMenu.
- Parameters
-
layer | The layer that this action will be run upon. |
fid | The feature id of the feature for which this action will be run. |
parent | The usual QWidget parent. |
actionScope | The action scope this menu will run in |
Definition at line 33 of file qgsactionmenu.cpp.
◆ expressionContextScope()
Returns an expression context scope used to resolve underlying actions.
- Since
- QGIS 3.0
Definition at line 204 of file qgsactionmenu.cpp.
◆ menuActions()
QList< QgsAction > QgsActionMenu::menuActions |
( |
| ) |
|
◆ reinit
void QgsActionMenu::reinit |
( |
| ) |
|
|
signal |
◆ setExpressionContextScope()
Sets an expression context scope used to resolve underlying actions.
- Since
- QGIS 3.0
Definition at line 198 of file qgsactionmenu.cpp.
◆ setFeature()
void QgsActionMenu::setFeature |
( |
const QgsFeature & |
feature | ) |
|
Change the feature on which actions are performed.
- Parameters
-
feature | A feature. Will not take ownership. It's the callers responsibility to keep the feature as long as the menu is displayed and the action is running. |
Definition at line 65 of file qgsactionmenu.cpp.
◆ setMode()
Change the mode of the actions.
- Parameters
-
mode | The mode of the attribute form |
Definition at line 70 of file qgsactionmenu.cpp.
The documentation for this class was generated from the following files: