QgsAttributeAction Class Reference

#include <qgsattributeaction.h>

List of all members.


Detailed Description

Storage and management of actions associated with Qgis layer attributes.

Definition at line 68 of file qgsattributeaction.h.

Public Types

typedef std::list< QgsActionAttributeActions
typedef AttributeActions::const_iterator aIter

Public Member Functions

 QgsAttributeAction ()
 Constructor.
virtual ~QgsAttributeAction ()
 Destructor.
void addAction (QString name, QString action, bool capture=false)
 Add an action with the given name and action details.
void doAction (unsigned int index, const std::vector< std::pair< QString, QString > > &values, uint defaultValueIndex=0)
 Does the action using the given values. defaultValueIndex is an.
aIter retrieveAction (unsigned int index) const
 Returns a const_iterator that points to the QgsAction at the.
void clearActions ()
 Removes all actions.
const AttributeActions::const_iterator begin () const
 A const iterator to the start of the action pairs.
const AttributeActions::const_iterator end () const
 A const iterator to the one past the end of the action pairs.
int size () const
 Returns the number of stored actions.
bool writeXML (QDomNode &layer_node, QDomDocument &doc) const
 Writes the actions out in XML format.
bool readXML (QDomNode &layer_node)
 Reads the actions in in XML format.

Static Public Member Functions

static QString expandAction (QString action, const std::vector< std::pair< QString, QString > > &values, uint defaultValueIndex)
 Expands the given action, replacing all 's with the value as.

Private Attributes

AttributeActions mActions


Member Typedef Documentation

typedef std::list<QgsAction> QgsAttributeAction::AttributeActions

Definition at line 72 of file qgsattributeaction.h.

typedef AttributeActions::const_iterator QgsAttributeAction::aIter

Definition at line 73 of file qgsattributeaction.h.


Constructor & Destructor Documentation

QgsAttributeAction::QgsAttributeAction (  )  [inline]

Constructor.

Definition at line 76 of file qgsattributeaction.h.

virtual QgsAttributeAction::~QgsAttributeAction (  )  [inline, virtual]

Destructor.

Definition at line 79 of file qgsattributeaction.h.


Member Function Documentation

void QgsAttributeAction::addAction ( 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 ( unsigned int  index,
const std::vector< std::pair< QString, QString > > &  values,
uint  defaultValueIndex = 0 
)

Does the action using the given values. defaultValueIndex is an.

Definition at line 43 of file qgsattributeaction.cpp.

References QgsRunProcess::create(), end(), expandAction(), and retrieveAction().

QgsAttributeAction::aIter QgsAttributeAction::retrieveAction ( unsigned int  index  )  const

Returns a const_iterator that points to the QgsAction at the.

Definition at line 67 of file qgsattributeaction.cpp.

References end(), and mActions.

Referenced by doAction().

void QgsAttributeAction::clearActions (  )  [inline]

Removes all actions.

Definition at line 102 of file qgsattributeaction.h.

const AttributeActions::const_iterator QgsAttributeAction::begin (  )  const [inline]

A const iterator to the start of the action pairs.

Definition at line 105 of file qgsattributeaction.h.

Referenced by writeXML().

const AttributeActions::const_iterator QgsAttributeAction::end (  )  const [inline]

A const iterator to the one past the end of the action pairs.

Definition at line 109 of file qgsattributeaction.h.

Referenced by doAction(), retrieveAction(), and writeXML().

int QgsAttributeAction::size (  )  const [inline]

Returns the number of stored actions.

Definition at line 113 of file qgsattributeaction.h.

QString QgsAttributeAction::expandAction ( QString  action,
const std::vector< std::pair< QString, QString > > &  values,
uint  defaultValueIndex 
) [static]

Expands the given action, replacing all 's with the value as.

Definition at line 82 of file qgsattributeaction.cpp.

Referenced by doAction().

bool QgsAttributeAction::writeXML ( QDomNode &  layer_node,
QDomDocument &  doc 
) const

Writes the actions out in XML format.

Definition at line 119 of file qgsattributeaction.cpp.

References begin(), and end().

Referenced by QgsVectorLayer::writeXml().

bool QgsAttributeAction::readXML ( QDomNode &  layer_node  ) 

Reads the actions in in XML format.

Definition at line 138 of file qgsattributeaction.cpp.

References addAction().

Referenced by QgsVectorLayer::readXml().


Member Data Documentation

AttributeActions QgsAttributeAction::mActions [private]

Definition at line 129 of file qgsattributeaction.h.

Referenced by addAction(), and retrieveAction().


The documentation for this class was generated from the following files:
Generated on Fri Nov 21 01:51:20 2008 for Quantum GIS API Documentation by  doxygen 1.5.1