Brief description of class still missing. More...
#include <Sample.h>
Public Member Functions | |
bool | isValid () const |
bool | read (QTextStream &s) |
Sample () | |
Sample (double x, double y) | |
Sample (const Point2D &p) | |
Sample (const Sample &s) | |
void | setValid (bool v) |
Brief description of class still missing.
Full description of class still missing
Sample::Sample | ( | ) | [inline] |
: Point2D() {_valid=true;}
Sample::Sample | ( | double | x, |
double | y | ||
) | [inline] |
Sample::Sample | ( | const Point2D & | p | ) | [inline] |
: Point2D(p) {_valid=true;}
Sample::Sample | ( | const Sample & | s | ) | [inline] |
: Point2D(s) {_valid=s._valid;}
bool Sample::isValid | ( | ) | const [inline] |
Always return true. Used by Curve.
Reimplemented from QGpCoreTools::Point2D.
Referenced by Histogram2D::countSamples().
{return _valid;}
bool Sample::read | ( | QTextStream & | s | ) |
Description of constructor still missing
References QGpCoreTools::StringSection::nextField(), QGpCoreTools::Point2D::setX(), QGpCoreTools::Point2D::setY(), QGpCoreTools::StringSection::toDouble(), and TRACE.
Referenced by HistogramReader::parse().
{ TRACE; QString line; do { line=s.readLine(); } while(!line.isEmpty() && line[0]=='#'); if(!line.isEmpty()) { const QChar * ptr=0; StringSection field,fields(line); field=fields.nextField(ptr); setX(field.toDouble()); field=fields.nextField(ptr); setY(field.toDouble()); field=fields.nextField(ptr); if(field.isValid()) _valid=field.toBool(); return true; } else { return false; } }
void Sample::setValid | ( | bool | v | ) | [inline] |