16 #ifndef _SPARSE_VALUE_MODEL_H_ 17 #define _SPARSE_VALUE_MODEL_H_ 30 template <
typename Po
intType>
35 bool notifyOnAdd =
true) :
36 SparseModel<PointType>(sampleRate, resolution, notifyOnAdd),
43 float valueMinimum,
float valueMaximum,
44 bool notifyOnAdd =
true) :
45 SparseModel<PointType>(sampleRate, resolution, notifyOnAdd),
69 bool allChange =
false;
71 if (!
ISNAN(point.value) && !
ISINF(point.value)) {
116 virtual void toXml(QTextStream &stream,
118 QString extraAttributes =
"")
const 120 std::cerr <<
"SparseValueModel::toXml: extraAttributes = \"" 121 << extraAttributes.toStdString() << std::endl;
126 QString(
"%1 minimum=\"%2\" maximum=\"%3\" units=\"%4\"")
virtual void deletePoint(const PointType &point)
Remove a point.
void registerUnit(QString unit)
virtual void toXml(QTextStream &out, QString indent="", QString extraAttributes="") const
Stream this exportable object out to XML on a text stream.
virtual float getValueMaximum() const
virtual float getValueMinimum() const
QString getTypeName() const
Return the type of the model.
virtual void addPoint(const PointType &point)
Add a point.
static QString encodeEntities(QString)
virtual QString getScaleUnits() const
SparseValueModel(int sampleRate, int resolution, bool notifyOnAdd=true)
SparseValueModel(int sampleRate, int resolution, float valueMinimum, float valueMaximum, bool notifyOnAdd=true)
Model containing sparse data (points with some properties) of which one of the properties is an arbit...
virtual void setScaleUnits(QString units)
static UnitDatabase * getInstance()
void modelChanged()
Emitted when a model has been edited (or more data retrieved from cache, in the case of a cached mode...
virtual void addPoint(const PointType &point)
Add a point.
virtual void toXml(QTextStream &stream, QString indent="", QString extraAttributes="") const
Stream this exportable object out to XML on a text stream.
virtual void deletePoint(const PointType &point)
Remove a point.
Model containing sparse data (points with some properties).