Mercurial > hg > svgui
comparison layer/SpectrumLayer.h @ 1282:f90a3c2f2930
Merge from branch horizontal-scale
author | Chris Cannam |
---|---|
date | Thu, 03 May 2018 15:24:14 +0100 |
parents | fc9d9f1103fa |
children | d79e21855aef |
comparison
equal
deleted
inserted
replaced
1279:a04f1012fca2 | 1282:f90a3c2f2930 |
---|---|
21 | 21 |
22 #include "base/Window.h" | 22 #include "base/Window.h" |
23 | 23 |
24 #include "data/model/DenseTimeValueModel.h" | 24 #include "data/model/DenseTimeValueModel.h" |
25 | 25 |
26 #include "PianoScale.h" | 26 #include "HorizontalScaleProvider.h" |
27 | 27 |
28 #include <QColor> | 28 #include <QColor> |
29 #include <QMutex> | 29 #include <QMutex> |
30 | 30 |
31 class FFTModel; | 31 class FFTModel; |
32 | 32 |
33 class SpectrumLayer : public SliceLayer, | 33 class SpectrumLayer : public SliceLayer, |
34 public PianoScale::HorizontalScaleProvider | 34 public HorizontalScaleProvider |
35 { | 35 { |
36 Q_OBJECT | 36 Q_OBJECT |
37 | 37 |
38 public: | 38 public: |
39 SpectrumLayer(); | 39 SpectrumLayer(); |
44 | 44 |
45 virtual bool getCrosshairExtents(LayerGeometryProvider *, QPainter &, QPoint cursorPos, | 45 virtual bool getCrosshairExtents(LayerGeometryProvider *, QPainter &, QPoint cursorPos, |
46 std::vector<QRect> &extents) const override; | 46 std::vector<QRect> &extents) const override; |
47 virtual void paintCrosshairs(LayerGeometryProvider *, QPainter &, QPoint) const override; | 47 virtual void paintCrosshairs(LayerGeometryProvider *, QPainter &, QPoint) const override; |
48 | 48 |
49 virtual int getHorizontalScaleHeight(LayerGeometryProvider *, QPainter &) const; | |
50 virtual void paintHorizontalScale(LayerGeometryProvider *, QPainter &, int xorigin) const; | |
51 | |
49 virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override; | 52 virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override; |
50 | 53 |
51 virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override; | 54 virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override; |
52 | 55 |
53 virtual VerticalPosition getPreferredFrameCountPosition() const override { | 56 virtual VerticalPosition getPreferredFrameCountPosition() const override { |
94 bool getShowPeaks() const { return m_showPeaks; } | 97 bool getShowPeaks() const { return m_showPeaks; } |
95 | 98 |
96 virtual void toXml(QTextStream &stream, QString indent = "", | 99 virtual void toXml(QTextStream &stream, QString indent = "", |
97 QString extraAttributes = "") const override; | 100 QString extraAttributes = "") const override; |
98 | 101 |
99 virtual double getFrequencyForX(const LayerGeometryProvider *, | 102 virtual double getFrequencyForX(const LayerGeometryProvider *, double x) |
100 double x) const override; | 103 const override; |
101 virtual double getXForFrequency(const LayerGeometryProvider *, | 104 virtual double getXForFrequency(const LayerGeometryProvider *, double freq) |
102 double freq) const override; | 105 const override; |
103 | 106 |
104 protected slots: | 107 protected slots: |
105 void preferenceChanged(PropertyContainer::PropertyName name); | 108 void preferenceChanged(PropertyContainer::PropertyName name); |
106 | 109 |
107 protected: | 110 protected: |