24 #ifndef QGSATTRIBUTEACTION_H
25 #define QGSATTRIBUTEACTION_H
54 mType( type ), mName( name ), mAction( action ), mCaptureOutput( capture ) {}
57 QString
name()
const {
return mName; }
60 QString
action()
const {
return mAction; }
66 bool capture()
const {
return mCaptureOutput; }
71 return mType == Generic ||
72 mType == GenericPython ||
76 #elif defined(Q_OS_MAC)
113 void removeAction(
int index );
120 void doAction(
int index,
122 int defaultValueIndex = 0 );
131 void doAction(
int index,
133 const QMap<QString, QVariant> *substitutionMap = 0 );
144 QString expandAction( QString action,
const QgsAttributeMap &attributes, uint defaultValueIndex );
156 QString expandAction( QString action,
158 const QMap<QString, QVariant> *substitutionMap = 0 );
162 bool writeXML( QDomNode& layer_node, QDomDocument& doc )
const;
165 bool readXML(
const QDomNode& layer_node );
167 int size()
const {
return mActions.size(); }
172 static void setPythonExecute(
void ( * )(
const QString & ) );
175 int defaultAction()
const {
return mDefaultAction < 0 || mDefaultAction >=
size() ? 0 : mDefaultAction; }
181 static void ( *smPythonExecute )(
const QString & );
184 void ( *executePython )(
const QString & ) = 0 );