All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
#include <MetaData.h>
Public Member Functions | |
| virtual int | compare (int subId, const QString &index, const MetaData *o) const |
| virtual QVariant | data (int subId, const QString &index) const |
| virtual bool | fromString (const QString &, QString string) |
| MetaInteger () | |
| MetaInteger (int val) | |
| MetaInteger (const MetaInteger &o) | |
| virtual bool | setData (int subId, const QString &index, const QVariant &val) |
| void | setValue (int v) |
| virtual QString | toString (const QString &) const |
| int | value () const |
| GeopsyCore::MetaInteger::MetaInteger | ( | ) | [inline] |
{_value=0;}
| GeopsyCore::MetaInteger::MetaInteger | ( | int | val | ) | [inline] |
: MetaData() {_value=val;}
| GeopsyCore::MetaInteger::MetaInteger | ( | const MetaInteger & | o | ) | [inline] |
: MetaData(o) {_value=o._value;}
| int GeopsyCore::MetaInteger::compare | ( | int | subId, |
| const QString & | index, | ||
| const MetaData * | o | ||
| ) | const [virtual] |
Reimplemented from GeopsyCore::MetaData.
References value().
{
Q_UNUSED(valueIndex);
Q_UNUSED(dataIndex);
int v1=value();
int v2=reinterpret_cast<const MetaInteger *>(o)->value();
if(v1<v2) return -1;
else if(v1>v2) return 1;
else return 0;
}
| virtual QVariant GeopsyCore::MetaInteger::data | ( | int | subId, |
| const QString & | index | ||
| ) | const [inline, virtual] |
Reimplemented from GeopsyCore::MetaData.
{Q_UNUSED(subId); Q_UNUSED(index); return _value;}
| virtual bool GeopsyCore::MetaInteger::fromString | ( | const QString & | , |
| QString | string | ||
| ) | [inline, virtual] |
Reimplemented from GeopsyCore::MetaData.
{bool ok; setValue(string.toInt(&ok)); return ok;}
| bool GeopsyCore::MetaInteger::setData | ( | int | subId, |
| const QString & | index, | ||
| const QVariant & | val | ||
| ) | [virtual] |
Reimplemented from GeopsyCore::MetaData.
{
Q_UNUSED(valueIndex);
Q_UNUSED(dataIndex);
bool ok;
_value=val.toInt(&ok);
return ok;
}
| void GeopsyCore::MetaInteger::setValue | ( | int | v | ) | [inline] |
{_value=v;}
| virtual QString GeopsyCore::MetaInteger::toString | ( | const QString & | ) | const [inline, virtual] |
Reimplemented from GeopsyCore::MetaData.
{return QString::number(_value);}
| int GeopsyCore::MetaInteger::value | ( | ) | const [inline] |
Referenced by compare().
{return _value;}