annotate layer/SpectrumLayer.h @ 137:10a82b2bbb8b

* experiment with finer zoom level changes when using h thumbwheel
author Chris Cannam
date Tue, 22 Aug 2006 14:18:28 +0000
parents 9e6b3e239b9d
children aaa3a53dbb10
rev   line source
Chris@133 1
Chris@133 2 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@133 3
Chris@133 4 /*
Chris@133 5 Sonic Visualiser
Chris@133 6 An audio file viewer and annotation editor.
Chris@133 7 Centre for Digital Music, Queen Mary, University of London.
Chris@133 8 This file copyright 2006 Chris Cannam.
Chris@133 9
Chris@133 10 This program is free software; you can redistribute it and/or
Chris@133 11 modify it under the terms of the GNU General Public License as
Chris@133 12 published by the Free Software Foundation; either version 2 of the
Chris@133 13 License, or (at your option) any later version. See the file
Chris@133 14 COPYING included with this distribution for more information.
Chris@133 15 */
Chris@133 16
Chris@133 17 #ifndef _SPECTRUM_LAYER_H_
Chris@133 18 #define _SPECTRUM_LAYER_H_
Chris@133 19
Chris@133 20 #include "Layer.h"
Chris@133 21
Chris@133 22 #include "data/model/DenseTimeValueModel.h"
Chris@133 23
Chris@133 24 #include <QColor>
Chris@133 25
Chris@133 26 class FFTModel;
Chris@133 27
Chris@133 28 class SpectrumLayer : public Layer
Chris@133 29 {
Chris@133 30 Q_OBJECT
Chris@133 31
Chris@133 32 public:
Chris@133 33 SpectrumLayer();
Chris@133 34 ~SpectrumLayer();
Chris@133 35
Chris@133 36 void setModel(DenseTimeValueModel *model);
Chris@133 37 virtual const Model *getModel() const { return m_model; }
Chris@133 38 virtual void paint(View *v, QPainter &paint, QRect rect) const;
Chris@133 39
Chris@133 40 virtual void setProperties(const QXmlAttributes &);
Chris@133 41
Chris@133 42 virtual bool getValueExtents(float &min, float &max,
Chris@133 43 bool &logarithmic, QString &unit) const;
Chris@133 44
Chris@133 45 virtual bool isLayerScrollable(const View *v) const { return false; }
Chris@133 46
Chris@133 47 virtual QString getPropertyLabel(const PropertyName &) const { return ""; }
Chris@133 48
Chris@133 49 protected:
Chris@133 50 DenseTimeValueModel *m_model;
Chris@133 51 FFTModel *m_fft;
Chris@133 52 QColor m_colour;
Chris@133 53 };
Chris@133 54
Chris@133 55 #endif