diff 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
line wrap: on
line diff
--- a/layer/SpectrumLayer.h	Wed May 02 14:26:51 2018 +0100
+++ b/layer/SpectrumLayer.h	Thu May 03 15:24:14 2018 +0100
@@ -23,7 +23,7 @@
 
 #include "data/model/DenseTimeValueModel.h"
 
-#include "PianoScale.h"
+#include "HorizontalScaleProvider.h"
 
 #include <QColor>
 #include <QMutex>
@@ -31,7 +31,7 @@
 class FFTModel;
 
 class SpectrumLayer : public SliceLayer,
-                      public PianoScale::HorizontalScaleProvider
+                      public HorizontalScaleProvider
 {
     Q_OBJECT
 
@@ -46,6 +46,9 @@
                                      std::vector<QRect> &extents) const override;
     virtual void paintCrosshairs(LayerGeometryProvider *, QPainter &, QPoint) const override;
 
+    virtual int getHorizontalScaleHeight(LayerGeometryProvider *, QPainter &) const;
+    virtual void paintHorizontalScale(LayerGeometryProvider *, QPainter &, int xorigin) const;
+    
     virtual QString getFeatureDescription(LayerGeometryProvider *v, QPoint &) const override;
 
     virtual void paint(LayerGeometryProvider *v, QPainter &paint, QRect rect) const override;
@@ -96,10 +99,10 @@
     virtual void toXml(QTextStream &stream, QString indent = "",
                        QString extraAttributes = "") const override;
 
-    virtual double getFrequencyForX(const LayerGeometryProvider *,
-                                    double x) const override;
-    virtual double getXForFrequency(const LayerGeometryProvider *,
-                                    double freq) const override;
+    virtual double getFrequencyForX(const LayerGeometryProvider *, double x)
+        const override;
+    virtual double getXForFrequency(const LayerGeometryProvider *, double freq)
+        const override;
 
 protected slots:
     void preferenceChanged(PropertyContainer::PropertyName name);