diff layer/TimeValueLayer.h @ 101:0f36cdf407a6 sv1-v0.9rc1

* Make vertical scale alignment modes work in note layer as well as time-value layer, and several significant fixes to it * Make it possible to draw notes properly on the note layer * Show units (and frequencies etc in note layer's case) in the time-value and note layer description boxes * Minor fix to item edit dialog layout * Some minor menu rearrangement * Comment out a lot of debug output * Add SV website and reference URLs to Help menu, and add code to (attempt to) open them in the user's preferred browser
author Chris Cannam
date Fri, 12 May 2006 14:40:43 +0000
parents 4b98bda7e94d
children 999ae0f7d10c
line wrap: on
line diff
--- a/layer/TimeValueLayer.h	Thu May 11 15:02:14 2006 +0000
+++ b/layer/TimeValueLayer.h	Fri May 12 14:40:43 2006 +0000
@@ -88,10 +88,10 @@
     PlotStyle getPlotStyle() const { return m_plotStyle; }
 
     enum VerticalScale {
+        AutoAlignScale,
         LinearScale,
         LogScale,
-        PlusMinusOneScale,
-        FrequencyScale
+        PlusMinusOneScale
     };
     
     void setVerticalScale(VerticalScale scale);
@@ -107,7 +107,10 @@
         return m_plotStyle == PlotSegmentation && m_model->hasTextLabels();
     }
 
-    virtual bool getValueExtents(float &min, float &max, QString &unit) const;
+    virtual bool getValueExtents(float &min, float &max,
+                                 bool &logarithmic, QString &unit) const;
+
+    virtual bool getDisplayExtents(float &min, float &max) const;
 
     virtual QString toXmlString(QString indent = "",
 				QString extraAttributes = "") const;
@@ -115,10 +118,10 @@
     void setProperties(const QXmlAttributes &attributes);
 
 protected:
+    void getScaleExtents(View *, float &min, float &max, bool &log) const;
     int getYForValue(View *, float value) const;
     float getValueForY(View *, int y) const;
-
-    QColor getColourForValue(float value) const;
+    QColor getColourForValue(View *v, float value) const;
 
     SparseTimeValueModel::PointList getLocalPoints(View *v, int) const;