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) |
MetaDouble () | |
MetaDouble (double val) | |
MetaDouble (const MetaDouble &o) | |
virtual bool | setData (int subId, const QString &index, const QVariant &val) |
void | setValue (double v) |
virtual QString | toString (const QString &) const |
double | value () const |
GeopsyCore::MetaDouble::MetaDouble | ( | ) | [inline] |
{_value=0;}
GeopsyCore::MetaDouble::MetaDouble | ( | double | val | ) | [inline] |
: MetaData() {_value=val;}
GeopsyCore::MetaDouble::MetaDouble | ( | const MetaDouble & | o | ) | [inline] |
: MetaData(o) {_value=o._value;}
int GeopsyCore::MetaDouble::compare | ( | int | subId, |
const QString & | index, | ||
const MetaData * | o | ||
) | const [virtual] |
Reimplemented from GeopsyCore::MetaData.
References value().
{ Q_UNUSED(valueIndex); Q_UNUSED(dataIndex); double v1=value(); double v2=reinterpret_cast<const MetaDouble *>(o)->value(); if(v1<v2) return -1; else if(v1>v2) return 1; else return 0; }
virtual QVariant GeopsyCore::MetaDouble::data | ( | int | subId, |
const QString & | index | ||
) | const [inline, virtual] |
Reimplemented from GeopsyCore::MetaData.
{Q_UNUSED(subId); Q_UNUSED(index); return _value;}
virtual bool GeopsyCore::MetaDouble::fromString | ( | const QString & | , |
QString | string | ||
) | [inline, virtual] |
Reimplemented from GeopsyCore::MetaData.
{bool ok; setValue(string.toDouble(&ok)); return ok;}
bool GeopsyCore::MetaDouble::setData | ( | int | subId, |
const QString & | index, | ||
const QVariant & | val | ||
) | [virtual] |
Reimplemented from GeopsyCore::MetaData.
{ Q_UNUSED(valueIndex); Q_UNUSED(dataIndex); bool ok; _value=val.toDouble(&ok); return ok; }
void GeopsyCore::MetaDouble::setValue | ( | double | v | ) | [inline] |
{_value=v;}
virtual QString GeopsyCore::MetaDouble::toString | ( | const QString & | ) | const [inline, virtual] |
Reimplemented from GeopsyCore::MetaData.
{return QString::number(_value, 'g', 20);}
double GeopsyCore::MetaDouble::value | ( | ) | const [inline] |
Referenced by compare().
{return _value;}