Mercurial > hg > svgui
annotate layer/SpectrumLayer.h @ 133:9e6b3e239b9d
* Add zoom thumbwheels to Pane. Implement horizontal thumbwheel, and
vertical depending on layer type (supported for waveform and spectrogram,
though wrong for log-scale spectrogram at the moment).
* Add bare bones of a spectrum layer.
* Add window icon
* Add shortcut for "insert time instant" on laptops without keypad enter (";")
* Delete FFT processing thread when it exits (at least, next time we're asked
for something interesting)
* Get audio file extensions from the file readers, and thus from libsndfile for
the wave file reader -- leads to rather a wide combo box in file dialog though
* Better refresh order for spectrogram (redraw centre section first)
author | Chris Cannam |
---|---|
date | Fri, 04 Aug 2006 17:01:37 +0000 |
parents | |
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 |