Chris@133: Chris@133: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@133: Chris@133: /* Chris@133: Sonic Visualiser Chris@133: An audio file viewer and annotation editor. Chris@133: Centre for Digital Music, Queen Mary, University of London. Chris@133: This file copyright 2006 Chris Cannam. Chris@133: Chris@133: This program is free software; you can redistribute it and/or Chris@133: modify it under the terms of the GNU General Public License as Chris@133: published by the Free Software Foundation; either version 2 of the Chris@133: License, or (at your option) any later version. See the file Chris@133: COPYING included with this distribution for more information. Chris@133: */ Chris@133: Chris@133: #ifndef _SPECTRUM_LAYER_H_ Chris@133: #define _SPECTRUM_LAYER_H_ Chris@133: Chris@133: #include "Layer.h" Chris@133: Chris@133: #include "data/model/DenseTimeValueModel.h" Chris@133: Chris@133: #include Chris@133: Chris@133: class FFTModel; Chris@133: Chris@133: class SpectrumLayer : public Layer Chris@133: { Chris@133: Q_OBJECT Chris@133: Chris@133: public: Chris@133: SpectrumLayer(); Chris@133: ~SpectrumLayer(); Chris@133: Chris@133: void setModel(DenseTimeValueModel *model); Chris@133: virtual const Model *getModel() const { return m_model; } Chris@133: virtual void paint(View *v, QPainter &paint, QRect rect) const; Chris@133: Chris@133: virtual void setProperties(const QXmlAttributes &); Chris@133: Chris@133: virtual bool getValueExtents(float &min, float &max, Chris@133: bool &logarithmic, QString &unit) const; Chris@133: Chris@133: virtual bool isLayerScrollable(const View *v) const { return false; } Chris@133: Chris@133: virtual QString getPropertyLabel(const PropertyName &) const { return ""; } Chris@133: Chris@133: protected: Chris@133: DenseTimeValueModel *m_model; Chris@133: FFTModel *m_fft; Chris@133: QColor m_colour; Chris@133: }; Chris@133: Chris@133: #endif