QGIS API Documentation  2.4.0-Chugiak
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Signals | Public Member Functions | Private Attributes | List of all members
QgsMapLayerAction Class Reference

An action which can run on map layers. More...

#include <qgsmaplayeractionregistry.h>

Inheritance diagram for QgsMapLayerAction:
Inheritance graph
[legend]
Collaboration diagram for QgsMapLayerAction:
Collaboration graph
[legend]

Signals

void triggeredForFeature (QgsMapLayer *layer, QgsFeature *feature)
 Triggered when action has been run for a specific feature. More...
 
void triggeredForLayer (QgsMapLayer *layer)
 Triggered when action has been run for a specific layer. More...
 

Public Member Functions

 QgsMapLayerAction (QString name, QObject *parent)
 Creates a map layer action which can run on any layer. More...
 
 QgsMapLayerAction (QString name, QObject *parent, QgsMapLayer *layer)
 Creates a map layer action which can run only on a specific layer. More...
 
 QgsMapLayerAction (QString name, QObject *parent, QgsMapLayer::LayerType layerType)
 Creates a map layer action which can run on a specific type of layer. More...
 
 ~QgsMapLayerAction ()
 
bool canRunUsingLayer (QgsMapLayer *layer) const
 True if action can run using the specified layer. More...
 
void triggerForFeature (QgsMapLayer *layer, QgsFeature *feature)
 Triggers the action with the specified layer and feature. More...
 
void triggerForLayer (QgsMapLayer *layer)
 Triggers the action with the specified layer. More...
 

Private Attributes

bool mSingleLayer
 
QgsMapLayer * mActionLayer
 
bool mSpecificLayerType
 
QgsMapLayer::LayerType mLayerType
 

Detailed Description

An action which can run on map layers.

Definition at line 31 of file qgsmaplayeractionregistry.h.

Constructor & Destructor Documentation

QgsMapLayerAction::QgsMapLayerAction ( QString  name,
QObject *  parent 
)

Creates a map layer action which can run on any layer.

Definition at line 19 of file qgsmaplayeractionregistry.cpp.

QgsMapLayerAction::QgsMapLayerAction ( QString  name,
QObject *  parent,
QgsMapLayer *  layer 
)

Creates a map layer action which can run only on a specific layer.

Definition at line 28 of file qgsmaplayeractionregistry.cpp.

QgsMapLayerAction::QgsMapLayerAction ( QString  name,
QObject *  parent,
QgsMapLayer::LayerType  layerType 
)

Creates a map layer action which can run on a specific type of layer.

Definition at line 37 of file qgsmaplayeractionregistry.cpp.

QgsMapLayerAction::~QgsMapLayerAction ( )

Member Function Documentation

bool QgsMapLayerAction::canRunUsingLayer ( QgsMapLayer *  layer) const

True if action can run using the specified layer.

Definition at line 52 of file qgsmaplayeractionregistry.cpp.

References mActionLayer, mLayerType, mSingleLayer, mSpecificLayerType, and QgsMapLayer::type().

void QgsMapLayerAction::triggeredForFeature ( QgsMapLayer *  layer,
QgsFeature *  feature 
)
signal

Triggered when action has been run for a specific feature.

Referenced by triggerForFeature().

void QgsMapLayerAction::triggeredForLayer ( QgsMapLayer *  layer)
signal

Triggered when action has been run for a specific layer.

Referenced by triggerForLayer().

void QgsMapLayerAction::triggerForFeature ( QgsMapLayer *  layer,
QgsFeature *  feature 
)

Triggers the action with the specified layer and feature.

This also emits the triggeredForLayer( QgsMapLayer *) and triggered() slots

Definition at line 75 of file qgsmaplayeractionregistry.cpp.

References triggeredForFeature(), and triggerForLayer().

Referenced by QgsAttributeTableModel::executeMapLayerAction().

void QgsMapLayerAction::triggerForLayer ( QgsMapLayer *  layer)

Triggers the action with the specified layer.

This also emits the triggered() slot.

Definition at line 82 of file qgsmaplayeractionregistry.cpp.

References triggeredForLayer().

Referenced by triggerForFeature().

Member Data Documentation

QgsMapLayer* QgsMapLayerAction::mActionLayer
private

Definition at line 67 of file qgsmaplayeractionregistry.h.

Referenced by canRunUsingLayer().

QgsMapLayer::LayerType QgsMapLayerAction::mLayerType
private

Definition at line 72 of file qgsmaplayeractionregistry.h.

Referenced by canRunUsingLayer().

bool QgsMapLayerAction::mSingleLayer
private

Definition at line 65 of file qgsmaplayeractionregistry.h.

Referenced by canRunUsingLayer().

bool QgsMapLayerAction::mSpecificLayerType
private

Definition at line 70 of file qgsmaplayeractionregistry.h.

Referenced by canRunUsingLayer().


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