#include <qgsattributeaction.h>

Public Member Functions | |
| QgsAttributeAction (QgsVectorLayer *layer) | |
| Constructor. | |
| virtual | ~QgsAttributeAction () |
| Destructor. | |
| void | addAction (QgsAction::ActionType type, QString name, QString action, bool capture=false) |
| Add an action with the given name and action details. | |
| void | doAction (int index, const QgsAttributeMap &attributes, int defaultValueIndex=0, void(*executePython)(const QString &)=0) |
| Does the action using the given values. defaultValueIndex is an. | |
| void | clearActions () |
| Removes all actions. | |
| QString | expandAction (QString action, const QgsAttributeMap &attributes, uint defaultValueIndex) |
| Expands the given action, replacing all 's with the value as. | |
| bool | writeXML (QDomNode &layer_node, QDomDocument &doc) const |
| Writes the actions out in XML format. | |
| bool | readXML (const QDomNode &layer_node) |
| Reads the actions in in XML format. | |
| int | size () const |
| QgsAction & | at (int idx) |
| QgsAction & | operator[] (int idx) |
Static Public Member Functions | |
| static void | setPythonExecute (void(*)(const QString &)) |
Private Attributes | |
| QList< QgsAction > | mActions |
| QgsVectorLayer * | mLayer |
Static Private Attributes | |
| static void(* | smPythonExecute )(const QString &) |
Definition at line 95 of file qgsattributeaction.h.
| QgsAttributeAction::QgsAttributeAction | ( | QgsVectorLayer * | layer | ) | [inline] |
| virtual QgsAttributeAction::~QgsAttributeAction | ( | ) | [inline, virtual] |
| void QgsAttributeAction::addAction | ( | QgsAction::ActionType | type, | |
| QString | name, | |||
| QString | action, | |||
| bool | capture = false | |||
| ) |
Add an action with the given name and action details.
Definition at line 37 of file qgsattributeaction.cpp.
References mActions.
Referenced by readXML().
| void QgsAttributeAction::doAction | ( | int | index, | |
| const QgsAttributeMap & | attributes, | |||
| int | defaultValueIndex = 0, |
|||
| void(*)(const QString &) | executePython = 0 | |||
| ) |
Does the action using the given values. defaultValueIndex is an.
Definition at line 42 of file qgsattributeaction.cpp.
References QgsAction::action(), at(), QgsAction::capture(), QgsRunProcess::create(), expandAction(), QgsAction::GenericPython, QgsAction::runable(), size(), smPythonExecute, and QgsAction::type().
| void QgsAttributeAction::clearActions | ( | ) | [inline] |
| QString QgsAttributeAction::expandAction | ( | QString | action, | |
| const QgsAttributeMap & | attributes, | |||
| uint | defaultValueIndex | |||
| ) |
Expands the given action, replacing all 's with the value as.
Definition at line 83 of file qgsattributeaction.cpp.
References QgsVectorLayer::attributeDisplayName(), mLayer, and QgsVectorLayer::pendingFields().
Referenced by doAction().
| bool QgsAttributeAction::writeXML | ( | QDomNode & | layer_node, | |
| QDomDocument & | doc | |||
| ) | const |
Writes the actions out in XML format.
Definition at line 134 of file qgsattributeaction.cpp.
References mActions.
Referenced by QgsVectorLayer::writeSymbology().
| bool QgsAttributeAction::readXML | ( | const QDomNode & | layer_node | ) |
Reads the actions in in XML format.
Definition at line 152 of file qgsattributeaction.cpp.
References addAction(), and mActions.
Referenced by QgsVectorLayer::readSymbology().
| int QgsAttributeAction::size | ( | ) | const [inline] |
| QgsAction& QgsAttributeAction::at | ( | int | idx | ) | [inline] |
| QgsAction& QgsAttributeAction::operator[] | ( | int | idx | ) | [inline] |
Definition at line 137 of file qgsattributeaction.h.
| void QgsAttributeAction::setPythonExecute | ( | void(*)(const QString &) | runPython | ) | [static] |
QList<QgsAction> QgsAttributeAction::mActions [private] |
Definition at line 142 of file qgsattributeaction.h.
Referenced by addAction(), readXML(), and writeXML().
QgsVectorLayer* QgsAttributeAction::mLayer [private] |
| void(* QgsAttributeAction::smPythonExecute)(const QString &)=0 | ( | const QString & | ) | [static, private] |
Referenced by doAction(), and setPythonExecute().
1.5.6