QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | List of all members
QgsMapLayerActionRegistry Class Reference

This class tracks map layer actions. More...

#include <qgsmaplayeractionregistry.h>

Collaboration diagram for QgsMapLayerActionRegistry:
Collaboration graph
[legend]

Signals

void changed ()
 Triggered when an action is added or removed from the registry.

Public Member Functions

 ~QgsMapLayerActionRegistry ()
void addMapLayerAction (QgsMapLayerAction *action)
 Adds a map layer action to the registry.
QList< QgsMapLayerAction * > mapLayerActions (QgsMapLayer *layer)
 Returns the map layer actions which can run on the specified layer.
bool removeMapLayerAction (QgsMapLayerAction *action)
 Removes a map layer action from the registry.
void setDefaultActionForLayer (QgsMapLayer *layer, QgsMapLayerAction *action)
 Sets the default action for a layer.
QgsMapLayerActiondefaultActionForLayer (QgsMapLayer *layer)
 Returns the default action for a layer.

Static Public Member Functions

static QgsMapLayerActionRegistryinstance ()
 Returns the instance pointer, creating the object on the first call.

Protected Member Functions

 QgsMapLayerActionRegistry (QObject *parent=0)
 protected constructor

Private Attributes

QList< QgsMapLayerAction * > mMapLayerActionList
QMap< QgsMapLayer
*, QgsMapLayerAction * > 
mDefaultLayerActionMap

Static Private Attributes

static QgsMapLayerActionRegistrymInstance = 0

Detailed Description

This class tracks map layer actions.

Definition at line 80 of file qgsmaplayeractionregistry.h.

Constructor & Destructor Documentation

QgsMapLayerActionRegistry::~QgsMapLayerActionRegistry ( )

Definition at line 111 of file qgsmaplayeractionregistry.cpp.

QgsMapLayerActionRegistry::QgsMapLayerActionRegistry ( QObject *  parent = 0)
protected

protected constructor

Definition at line 106 of file qgsmaplayeractionregistry.cpp.

Referenced by instance().

Member Function Documentation

void QgsMapLayerActionRegistry::addMapLayerAction ( QgsMapLayerAction action)

Adds a map layer action to the registry.

Definition at line 116 of file qgsmaplayeractionregistry.cpp.

References changed(), and mMapLayerActionList.

void QgsMapLayerActionRegistry::changed ( )
signal

Triggered when an action is added or removed from the registry.

Referenced by addMapLayerAction(), and removeMapLayerAction().

QgsMapLayerAction * QgsMapLayerActionRegistry::defaultActionForLayer ( QgsMapLayer layer)

Returns the default action for a layer.

Definition at line 164 of file qgsmaplayeractionregistry.cpp.

References mDefaultLayerActionMap.

QgsMapLayerActionRegistry * QgsMapLayerActionRegistry::instance ( )
static

Returns the instance pointer, creating the object on the first call.

Definition at line 93 of file qgsmaplayeractionregistry.cpp.

References mInstance, and QgsMapLayerActionRegistry().

Referenced by QgsDualView::viewWillShowContextMenu(), and QgsMapLayerAction::~QgsMapLayerAction().

QList< QgsMapLayerAction * > QgsMapLayerActionRegistry::mapLayerActions ( QgsMapLayer layer)

Returns the map layer actions which can run on the specified layer.

Definition at line 122 of file qgsmaplayeractionregistry.cpp.

References mMapLayerActionList.

Referenced by QgsDualView::viewWillShowContextMenu().

bool QgsMapLayerActionRegistry::removeMapLayerAction ( QgsMapLayerAction action)

Removes a map layer action from the registry.

Definition at line 137 of file qgsmaplayeractionregistry.cpp.

References changed(), mDefaultLayerActionMap, and mMapLayerActionList.

Referenced by QgsMapLayerAction::~QgsMapLayerAction().

void QgsMapLayerActionRegistry::setDefaultActionForLayer ( QgsMapLayer layer,
QgsMapLayerAction action 
)

Sets the default action for a layer.

Definition at line 159 of file qgsmaplayeractionregistry.cpp.

References mDefaultLayerActionMap.

Member Data Documentation

QMap< QgsMapLayer*, QgsMapLayerAction* > QgsMapLayerActionRegistry::mDefaultLayerActionMap
private
QgsMapLayerActionRegistry * QgsMapLayerActionRegistry::mInstance = 0
staticprivate

Definition at line 114 of file qgsmaplayeractionregistry.h.

Referenced by instance().

QList< QgsMapLayerAction* > QgsMapLayerActionRegistry::mMapLayerActionList
private

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