|
QGIS API Documentation
2.12.0-Lyon
|
An action which can run on map layers. More...
#include <qgsmaplayeractionregistry.h>

Public Types | |
| enum | Target { Layer = 1, SingleFeature = 2, MultipleFeatures = 4, AllActions = Layer | SingleFeature | MultipleFeatures } |
Signals | |
| void | triggeredForFeature (QgsMapLayer *layer, const QgsFeature &feature) |
| Triggered when action has been run for a specific feature. More... | |
| void | triggeredForFeatures (QgsMapLayer *layer, const QList< QgsFeature > featureList) |
| Triggered when action has been run for a specific list of features. More... | |
| void | triggeredForLayer (QgsMapLayer *layer) |
| Triggered when action has been run for a specific layer. More... | |
Public Member Functions | |
| QgsMapLayerAction (const QString &name, QObject *parent, const Targets &targets=AllActions, const QIcon &icon=QIcon()) | |
| Creates a map layer action which can run on any layer. More... | |
| QgsMapLayerAction (const QString &name, QObject *parent, QgsMapLayer *layer, const Targets &targets=AllActions, const QIcon &icon=QIcon()) | |
| Creates a map layer action which can run only on a specific layer. More... | |
| QgsMapLayerAction (const QString &name, QObject *parent, QgsMapLayer::LayerType layerType, const Targets &targets=AllActions, const QIcon &icon=QIcon()) | |
| 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 | setTargets (const Targets &targets) |
| Define the targets of the action. More... | |
| const Targets & | targets () const |
| Return availibity of action. More... | |
| void | triggerForFeature (QgsMapLayer *layer, const QgsFeature *feature) |
| Triggers the action with the specified layer and feature. More... | |
| void | triggerForFeatures (QgsMapLayer *layer, const QList< QgsFeature > &featureList) |
| Triggers the action with the specified layer and list of feature. More... | |
| void | triggerForLayer (QgsMapLayer *layer) |
| Triggers the action with the specified layer. More... | |
Public Member Functions inherited from QAction | |
| QAction (QObject *parent) | |
| QAction (const QString &text, QObject *parent) | |
| QAction (QObject *parent, const char *name) | |
| QAction (const QString &text, const QKeySequence &shortcut, QObject *parent, const char *name) | |
| QAction (const QIcon &icon, const QString &text, QObject *parent) | |
| QAction (const QIcon &icon, const QString &text, const QKeySequence &shortcut, QObject *parent, const char *name) | |
| ~QAction () | |
| QKeySequence | accel () const |
| QActionGroup * | actionGroup () const |
| void | activate (ActionEvent event) |
| void | activated (int i) |
| bool | addTo (QWidget *w) |
| QList< QGraphicsWidget * > | associatedGraphicsWidgets () const |
| QList< QWidget * > | associatedWidgets () const |
| bool | autoRepeat () const |
| void | changed () |
| QVariant | data () const |
| QFont | font () const |
| void | hover () |
| void | hovered () |
| QIcon | icon () const |
| QIcon | iconSet () const |
| QString | iconText () const |
| bool | isCheckable () const |
| bool | isChecked () const |
| bool | isEnabled () const |
| bool | isIconVisibleInMenu () const |
| bool | isOn () const |
| bool | isSeparator () const |
| bool | isToggleAction () const |
| bool | isVisible () const |
| QMenu * | menu () const |
| MenuRole | menuRole () const |
| QString | menuText () const |
| QWidget * | parentWidget () const |
| Priority | priority () const |
| bool | removeFrom (QWidget *w) |
| void | setAccel (const QKeySequence &shortcut) |
| void | setActionGroup (QActionGroup *group) |
| void | setAutoRepeat (bool) |
| void | setCheckable (bool) |
| void | setChecked (bool) |
| void | setData (const QVariant &userData) |
| void | setDisabled (bool b) |
| void | setEnabled (bool) |
| void | setFont (const QFont &font) |
| void | setIcon (const QIcon &icon) |
| void | setIconSet (const QIcon &i) |
| void | setIconText (const QString &text) |
| void | setIconVisibleInMenu (bool visible) |
| void | setMenu (QMenu *menu) |
| void | setMenuRole (MenuRole menuRole) |
| void | setMenuText (const QString &text) |
| void | setOn (bool b) |
| void | setPriority (Priority priority) |
| void | setSeparator (bool b) |
| void | setShortcut (const QKeySequence &shortcut) |
| void | setShortcutContext (Qt::ShortcutContext context) |
| void | setShortcuts (QKeySequence::StandardKey key) |
| void | setShortcuts (const QList< QKeySequence > &shortcuts) |
| void | setSoftKeyRole (SoftKeyRole softKeyRole) |
| void | setStatusTip (const QString &statusTip) |
| void | setText (const QString &text) |
| void | setToggleAction (bool b) |
| void | setToolTip (const QString &tip) |
| void | setVisible (bool) |
| void | setWhatsThis (const QString &what) |
| QKeySequence | shortcut () const |
| Qt::ShortcutContext | shortcutContext () const |
| QList< QKeySequence > | shortcuts () const |
| bool | showStatusText (QWidget *widget) |
| SoftKeyRole | softKeyRole () const |
| QString | statusTip () const |
| QString | text () const |
| void | toggle () |
| void | toggled (bool checked) |
| QString | toolTip () const |
| void | trigger () |
| void | triggered (bool checked) |
| QString | whatsThis () const |
Public Member Functions inherited from QObject | |
| QObject (QObject *parent) | |
| QObject (QObject *parent, const char *name) | |
| virtual | ~QObject () |
| bool | blockSignals (bool block) |
| QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
| const QObjectList & | children () const |
| const char * | className () const |
| bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
| void | deleteLater () |
| void | destroyed (QObject *obj) |
| bool | disconnect (const QObject *receiver, const char *method) |
| bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
| void | dumpObjectInfo () |
| void | dumpObjectTree () |
| QList< QByteArray > | dynamicPropertyNames () const |
| virtual bool | eventFilter (QObject *watched, QEvent *event) |
| T | findChild (const QString &name) const |
| QList< T > | findChildren (const QRegExp ®Exp) const |
| QList< T > | findChildren (const QString &name) const |
| bool | inherits (const char *className) const |
| void | insertChild (QObject *object) |
| void | installEventFilter (QObject *filterObj) |
| bool | isA (const char *className) const |
| bool | isWidgetType () const |
| void | killTimer (int id) |
| virtual const QMetaObject * | metaObject () const |
| void | moveToThread (QThread *targetThread) |
| const char * | name () const |
| const char * | name (const char *defaultName) const |
| QString | objectName () const |
| QObject * | parent () const |
| QVariant | property (const char *name) const |
| void | removeChild (QObject *object) |
| void | removeEventFilter (QObject *obj) |
| void | setName (const char *name) |
| void | setObjectName (const QString &name) |
| void | setParent (QObject *parent) |
| bool | setProperty (const char *name, const QVariant &value) |
| bool | signalsBlocked () const |
| int | startTimer (int interval) |
| QThread * | thread () const |
Additional Inherited Members | |
Static Public Member Functions inherited from QObject | |
| bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
| bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
| bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
| bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
| QString | tr (const char *sourceText, const char *disambiguation, int n) |
| QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions inherited from QAction | |
| virtual bool | event (QEvent *e) |
Protected Member Functions inherited from QObject | |
| bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
| virtual void | childEvent (QChildEvent *event) |
| virtual void | connectNotify (const char *signal) |
| virtual void | customEvent (QEvent *event) |
| virtual void | disconnectNotify (const char *signal) |
| int | receivers (const char *signal) const |
| QObject * | sender () const |
| int | senderSignalIndex () const |
| virtual void | timerEvent (QTimerEvent *event) |
Static Protected Member Functions inherited from QObject | |
| QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from QAction | |
| autoRepeat | |
| checkable | |
| checked | |
| enabled | |
| font | |
| icon | |
| iconText | |
| iconVisibleInMenu | |
| menuRole | |
| priority | |
| shortcut | |
| shortcutContext | |
| softKeyRole | |
| statusTip | |
| text | |
| toolTip | |
| visible | |
| whatsThis | |
Properties inherited from QObject | |
| objectName | |
An action which can run on map layers.
Definition at line 31 of file qgsmaplayeractionregistry.h.
| Enumerator | |
|---|---|
| Layer | |
| SingleFeature | |
| MultipleFeatures | |
| AllActions | |
Definition at line 37 of file qgsmaplayeractionregistry.h.
| QgsMapLayerAction::QgsMapLayerAction | ( | const QString & | name, |
| QObject * | parent, | ||
| const Targets & | targets = AllActions, |
||
| const QIcon & | icon = QIcon() |
||
| ) |
Creates a map layer action which can run on any layer.
Definition at line 19 of file qgsmaplayeractionregistry.cpp.
| QgsMapLayerAction::QgsMapLayerAction | ( | const QString & | name, |
| QObject * | parent, | ||
| QgsMapLayer * | layer, | ||
| const Targets & | targets = AllActions, |
||
| const QIcon & | icon = QIcon() |
||
| ) |
Creates a map layer action which can run only on a specific layer.
Definition at line 30 of file qgsmaplayeractionregistry.cpp.
| QgsMapLayerAction::QgsMapLayerAction | ( | const QString & | name, |
| QObject * | parent, | ||
| QgsMapLayer::LayerType | layerType, | ||
| const Targets & | targets = AllActions, |
||
| const QIcon & | icon = QIcon() |
||
| ) |
Creates a map layer action which can run on a specific type of layer.
Definition at line 41 of file qgsmaplayeractionregistry.cpp.
| QgsMapLayerAction::~QgsMapLayerAction | ( | ) |
Definition at line 51 of file qgsmaplayeractionregistry.cpp.
| bool QgsMapLayerAction::canRunUsingLayer | ( | QgsMapLayer * | layer | ) | const |
True if action can run using the specified layer.
Definition at line 57 of file qgsmaplayeractionregistry.cpp.
|
inline |
Define the targets of the action.
Definition at line 71 of file qgsmaplayeractionregistry.h.
|
inline |
Return availibity of action.
Definition at line 73 of file qgsmaplayeractionregistry.h.
|
signal |
Triggered when action has been run for a specific feature.
|
signal |
Triggered when action has been run for a specific list of features.
|
signal |
Triggered when action has been run for a specific layer.
| void QgsMapLayerAction::triggerForFeature | ( | QgsMapLayer * | layer, |
| const QgsFeature * | feature | ||
| ) |
Triggers the action with the specified layer and feature.
Definition at line 85 of file qgsmaplayeractionregistry.cpp.
| void QgsMapLayerAction::triggerForFeatures | ( | QgsMapLayer * | layer, |
| const QList< QgsFeature > & | featureList | ||
| ) |
Triggers the action with the specified layer and list of feature.
Definition at line 80 of file qgsmaplayeractionregistry.cpp.
| void QgsMapLayerAction::triggerForLayer | ( | QgsMapLayer * | layer | ) |
Triggers the action with the specified layer.
Definition at line 90 of file qgsmaplayeractionregistry.cpp.
1.8.9.1