diff layer/NoteLayer.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 47cb32bb35ab
line wrap: on
line diff
--- a/layer/NoteLayer.h	Thu May 11 15:02:14 2006 +0000
+++ b/layer/NoteLayer.h	Fri May 12 14:40:43 2006 +0000
@@ -73,9 +73,10 @@
     QColor getBaseColour() const { return m_colour; }
 
     enum VerticalScale {
-	MinMaxRangeScale,
-	MIDIRangeScale,
-	FrequencyScale
+        AutoAlignScale,
+        LinearScale,
+        LogScale,
+        MIDIRangeScale
     };
 
     void setVerticalScale(VerticalScale scale);
@@ -87,7 +88,10 @@
 
     virtual int getCompletion() const { return m_model->getCompletion(); }
 
-    virtual bool getValueExtents(float &min, float &max, QString &unit) const;
+    virtual bool getValueExtents(float &min, float &max,
+                                 bool &log, QString &unit) const;
+
+    virtual bool getDisplayExtents(float &min, float &max) const;
 
     virtual QString toXmlString(QString indent = "",
 				QString extraAttributes = "") const;
@@ -95,8 +99,10 @@
     void setProperties(const QXmlAttributes &attributes);
 
 protected:
+    void getScaleExtents(View *, float &min, float &max, bool &log) const;
     int getYForValue(View *v, float value) const;
     float getValueForY(View *v, int y) const;
+    bool shouldConvertMIDIToHz() const;
 
     NoteModel::PointList getLocalPoints(View *v, int) const;