QGIS API Documentation
2.2.0-Valmiera
|
This class tracks map layer actions. More...
#include <qgsmaplayeractionregistry.h>
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. | |
QgsMapLayerAction * | defaultActionForLayer (QgsMapLayer *layer) |
Returns the default action for a layer. |
Static Public Member Functions | |
static QgsMapLayerActionRegistry * | instance () |
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 QgsMapLayerActionRegistry * | mInstance = 0 |
This class tracks map layer actions.
Definition at line 80 of file qgsmaplayeractionregistry.h.
QgsMapLayerActionRegistry::~QgsMapLayerActionRegistry | ( | ) |
Definition at line 111 of file qgsmaplayeractionregistry.cpp.
|
protected |
protected constructor
Definition at line 106 of file qgsmaplayeractionregistry.cpp.
Referenced by instance().
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.
|
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.
|
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.
|
private |
Definition at line 118 of file qgsmaplayeractionregistry.h.
Referenced by defaultActionForLayer(), removeMapLayerAction(), and setDefaultActionForLayer().
|
staticprivate |
Definition at line 114 of file qgsmaplayeractionregistry.h.
Referenced by instance().
|
private |
Definition at line 116 of file qgsmaplayeractionregistry.h.
Referenced by addMapLayerAction(), mapLayerActions(), and removeMapLayerAction().