QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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>

Classes

struct  ActionData

Public Types

enum  ActionType { Invalid, MapLayerAction, AttributeAction }

Signals

void reinit ()

Public Member Functions

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

Detailed Description

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

Definition at line 30 of file qgsactionmenu.h.

Member Enumeration Documentation

Enumerator:
Invalid 

Invalid.

MapLayerAction 

Standard actions (defined by core or plugins)

AttributeAction 

Custom actions (manually defined in layer properties)

Definition at line 35 of file qgsactionmenu.h.

Constructor & Destructor Documentation

QgsActionMenu::QgsActionMenu ( QgsVectorLayer layer,
const QgsFeature feature,
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.

Definition at line 19 of file qgsactionmenu.cpp.

QgsActionMenu::QgsActionMenu ( QgsVectorLayer layer,
const QgsFeatureId  fid,
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.

Definition at line 30 of file qgsactionmenu.cpp.

QgsActionMenu::~QgsActionMenu ( )

Destructor.

Definition at line 69 of file qgsactionmenu.cpp.

Member Function Documentation

void QgsActionMenu::reinit ( )
signal
void QgsActionMenu::setFeature ( 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 77 of file qgsactionmenu.cpp.

void QgsActionMenu::setFeature ( QgsFeatureId  feature)

setFeature

Parameters
feature

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