comparison data/model/ImageModel.h @ 1040:a1cd5abcb38b cxx11

Introduce and use a samplerate type
author Chris Cannam
date Wed, 04 Mar 2015 12:01:04 +0000
parents 59e7fe1b1003
children 57633d605547
comparison
equal deleted inserted replaced
1039:b14064bd1f97 1040:a1cd5abcb38b
53 .arg(encodeEntities(image)) 53 .arg(encodeEntities(image))
54 .arg(encodeEntities(label)) 54 .arg(encodeEntities(label))
55 .arg(extraAttributes); 55 .arg(extraAttributes);
56 } 56 }
57 57
58 QString toDelimitedDataString(QString delimiter, int sampleRate) const 58 QString toDelimitedDataString(QString delimiter, sv_samplerate_t sampleRate) const
59 { 59 {
60 QStringList list; 60 QStringList list;
61 list << RealTime::frame2RealTime(frame, sampleRate).toString().c_str(); 61 list << RealTime::frame2RealTime(frame, sampleRate).toString().c_str();
62 list << image; 62 list << image;
63 if (label != "") list << label; 63 if (label != "") list << label;
87 class ImageModel : public SparseModel<ImagePoint> 87 class ImageModel : public SparseModel<ImagePoint>
88 { 88 {
89 Q_OBJECT 89 Q_OBJECT
90 90
91 public: 91 public:
92 ImageModel(int sampleRate, int resolution, bool notifyOnAdd = true) : 92 ImageModel(sv_samplerate_t sampleRate, int resolution, bool notifyOnAdd = true) :
93 SparseModel<ImagePoint>(sampleRate, resolution, notifyOnAdd) 93 SparseModel<ImagePoint>(sampleRate, resolution, notifyOnAdd)
94 { } 94 { }
95 95
96 QString getTypeName() const { return tr("Image"); } 96 QString getTypeName() const { return tr("Image"); }
97 97