16 #ifndef _EDITABLE_DENSE_THREE_DIMENSIONAL_MODEL_H_ 17 #define _EDITABLE_DENSE_THREE_DIMENSIONAL_MODEL_H_ 21 #include <QReadWriteLock> 49 bool notifyOnAdd =
true);
51 virtual bool isOK()
const;
144 virtual void setBinNames(std::vector<QString> names);
187 virtual void setCompletion(
int completion,
bool update =
true);
195 virtual void toXml(QTextStream &out,
197 QString extraAttributes =
"")
const;
virtual bool isOK() const
Return true if the model was constructed successfully.
virtual void toXml(QTextStream &out, QString indent="", QString extraAttributes="") const
Stream this exportable object out to XML on a text stream.
virtual void setMinimumLevel(float sz)
Set the minimum value of the value in a bin.
long m_sinceLastNotifyMax
virtual bool isColumnAvailable(int x) const
Return true if there are data available for the given column.
virtual QString toDelimitedDataStringSubset(QString delimiter, int f0, int f1) const
virtual QString getBinValueUnit() const
Obtain the name of the unit of the values returned from getBinValue(), if any.
virtual QString getBinName(int n) const
Return the name of bin n.
std::vector< float > m_binValues
long m_sinceLastNotifyMin
virtual void setBinName(int n, QString)
Set the name of bin n.
virtual float getValueAt(int x, int n) const
Get a single value, from the n'th bin of the given column.
virtual QString toDelimitedDataString(QString delimiter) const
virtual void setCompletion(int completion, bool update=true)
virtual int getStartFrame() const
Return the first audio frame spanned by the model.
virtual float getMinimumLevel() const
Return the minimum value of the value in each bin.
QString getTypeName() const
Return the type of the model.
EditableDenseThreeDimensionalModel(int sampleRate, int resolution, int yBinCount, CompressionType compression, bool notifyOnAdd=true)
virtual float getMaximumLevel() const
Return the maximum value of the value in each bin.
bool shouldUseLogValueScale() const
Return true if the distribution of values in the bins is such as to suggest a log scale (mapping to c...
virtual int getHeight() const
Return the number of bins in each set of bins.
Column expandAndRetrieve(int index) const
virtual void setBinValueUnit(QString unit)
Set the name of the unit of the values return from getBinValue() if any.
virtual void setStartFrame(int)
Set the frame offset of the first column.
virtual int getCompletion() const
virtual Column getColumn(int x) const
Get the set of bin values at the given column.
virtual float getBinValue(int n) const
Return the value of bin n, if any.
virtual void setBinNames(std::vector< QString > names)
Set the names of all bins.
virtual int getResolution() const
Return the number of sample frames covered by each set of bins.
Model is the base class for all data models that represent any sort of data on a time scale based on ...
virtual void setMaximumLevel(float sz)
Set the maximum value of the value in a bin.
std::vector< signed char > m_trunc
void truncateAndStore(int index, const Column &values)
virtual int getSampleRate() const
Return the frame rate in frames per second.
virtual int getEndFrame() const
Return the last audio frame spanned by the model.
CompressionType m_compression
virtual Model * clone() const
Return a copy of this model.
virtual void setResolution(int sz)
Set the number of sample frames covered by each set of bins.
virtual void setBinValues(std::vector< float > values)
Set the values of all bins (separate from their labels).
virtual void setHeight(int sz)
Set the number of bins in each set of bins.
QVector< Column > ValueMatrix
virtual void setColumn(int x, const Column &values)
Set the entire set of bin values at the given column.
std::vector< QString > m_binNames
virtual bool hasBinValues() const
Return true if the bins have values as well as names.
virtual int getWidth() const
Return the number of columns.