QGIS/python/core/qgsfeatureattribute.sip
wonder 46a2d125a2 Merged refactoring branch back to trunk.
git-svn-id: http://svn.osgeo.org/qgis/trunk@6415 c8812cc2-4d05-0410-92ff-de0c093fc19c
2007-01-09 02:39:15 +00:00

54 lines
1.0 KiB
Plaintext

/** \class QgsFeatureAttribute - Feature attribute class.
* \brief Encapsulates a single feature attribute.
*@author Gary E.Sherman
*/
class QgsFeatureAttribute
{
%TypeHeaderCode
#include <qgsfeatureattribute.h>
%End
public:
//! Constructor
QgsFeatureAttribute(const QString & field = 0, const QString & value = 0, bool num = false);
//! Destructor
~QgsFeatureAttribute();
/**
* Get the field name for this feature attribute
* @return Field name
*/
const QString & fieldName() const;
/**
* Get the field value for this feature attribute
* @return Field value
*/
const QString & fieldValue() const;
/**
* Returns whether value is numeric or not
* @return Numeric flag
*/
bool isNumeric() const;
void setFieldName(QString name);
void setFieldValue(QString thevalue);
void setNumeric(bool num = true);
SIP_PYOBJECT __repr__();
%MethodCode
QString str = sipCpp->fieldName() + " = " + sipCpp->fieldValue();
sipRes = PyString_FromString(str.toLocal8Bit().data());
%End
}; // class QgsFeatureAttribute