DeltaQt
Version 0.2.0 End user documentation
A C++/Qt library for parsing DELTA (DEscription Language for TAxonomy) files
|
#include <annotatedvalue.h>
Public Member Functions | |
AnnotatedValue () | |
QVariant | value (void) const |
QString | note (void) const |
void | clear (void) |
void | setValue (QVariant value) |
void | setNote (QString note) |
bool | isValid () const |
int | toInt (bool *ok) const |
AnnotatedValue::AnnotatedValue | ( | ) |
Creates an empty value; i.e. isValid() == false
void AnnotatedValue::clear | ( | void | ) |
Clear the value and annotation.
bool AnnotatedValue::isValid | ( | ) | const |
Returns true if either the value is valid or there is an attached note.
QString AnnotatedValue::note | ( | void | ) | const |
Get the note/annotation associated with the value. May be an empty string.
void AnnotatedValue::setNote | ( | QString | note | ) |
Set the note to note.
void AnnotatedValue::setValue | ( | QVariant | value | ) |
Set the value to value.
int AnnotatedValue::toInt | ( | bool * | ok | ) | const |
Attempts to convert the value to an int. If successfull, the int is returned, otherwise 0 is retuned.
If ok is not null *ok is set to true if the value could be converted to an int; otherwise *ok is set to false.
QVariant AnnotatedValue::value | ( | void | ) | const |