QGIS API Documentation  2.99.0-Master (23ddace)
Classes | Public Types | Signals | Public Member Functions | List of all members
QgsActionMenu Class Reference

This class is a menu that is populated automatically with the actions defined for a given layer. More...

#include <qgsactionmenu.h>

Inheritance diagram for QgsActionMenu:
Inheritance graph
[legend]

Classes

struct  ActionData
 

Public Types

enum  ActionType { Invalid, MapLayerAction, AttributeAction }
 

Signals

void reinit ()
 

Public Member Functions

 QgsActionMenu (QgsVectorLayer *layer, const QgsFeature &feature, const QString &actionScope, QWidget *parent=0)
 Constructs a new QgsActionMenu. More...
 
 QgsActionMenu (QgsVectorLayer *layer, const QgsFeatureId fid, const QString &actionScope, QWidget *parent=0)
 Constructs a new QgsActionMenu. More...
 
void setFeature (const QgsFeature &feature)
 Change the feature on which actions are performed. More...
 

Detailed Description

This class is a menu that is populated automatically with the actions defined for a given layer.

Definition at line 36 of file qgsactionmenu.h.

Member Enumeration Documentation

◆ ActionType

Enumerator
Invalid 

Invalid.

MapLayerAction 

Standard actions (defined by core or plugins)

AttributeAction 

Custom actions (manually defined in layer properties)

Definition at line 41 of file qgsactionmenu.h.

Constructor & Destructor Documentation

◆ QgsActionMenu() [1/2]

QgsActionMenu::QgsActionMenu ( QgsVectorLayer layer,
const QgsFeature feature,
const QString &  actionScope,
QWidget *  parent = 0 
)
explicit

Constructs a new QgsActionMenu.

Parameters
layerThe layer that this action will be run upon.
featureThe feature that this action will be run upon. Make sure that this feature is available for the lifetime of this object.
parentThe usual QWidget parent.
actionScopeThe action scope this menu will run in

Definition at line 23 of file qgsactionmenu.cpp.

◆ QgsActionMenu() [2/2]

QgsActionMenu::QgsActionMenu ( QgsVectorLayer layer,
const QgsFeatureId  fid,
const QString &  actionScope,
QWidget *  parent = 0 
)
explicit

Constructs a new QgsActionMenu.

Parameters
layerThe layer that this action will be run upon.
fidThe feature id of the feature for which this action will be run.
parentThe usual QWidget parent.
actionScopeThe action scope this menu will run in

Definition at line 33 of file qgsactionmenu.cpp.

Member Function Documentation

◆ reinit

void QgsActionMenu::reinit ( )
signal

◆ setFeature()

void QgsActionMenu::setFeature ( const QgsFeature feature)

Change the feature on which actions are performed.

Parameters
featureA 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 61 of file qgsactionmenu.cpp.


The documentation for this class was generated from the following files: