diff layer/TimeValueLayer.h @ 944:78c152e4db95

Merge from branch tonioni
author Chris Cannam
date Mon, 20 Apr 2015 09:12:17 +0100
parents 251dd0abc7b7
children 94e4952a6774
line wrap: on
line diff
--- a/layer/TimeValueLayer.h	Thu Jan 15 10:42:00 2015 +0000
+++ b/layer/TimeValueLayer.h	Mon Apr 20 09:12:17 2015 +0100
@@ -43,12 +43,12 @@
     virtual void paintVerticalScale(View *v, bool, QPainter &paint, QRect rect) const;
 
     virtual QString getFeatureDescription(View *v, QPoint &) const;
-    virtual QString getLabelPreceding(int) const;
+    virtual QString getLabelPreceding(sv_frame_t) const;
 
-    virtual bool snapToFeatureFrame(View *v, int &frame,
+    virtual bool snapToFeatureFrame(View *v, sv_frame_t &frame,
 				    int &resolution,
 				    SnapType snap) const;
-    virtual bool snapToSimilarFeature(View *v, int &frame,
+    virtual bool snapToSimilarFeature(View *v, sv_frame_t &frame,
                                       int &resolution,
                                       SnapType snap) const;
 
@@ -66,12 +66,12 @@
 
     virtual bool editOpen(View *v, QMouseEvent *);
 
-    virtual void moveSelection(Selection s, int newStartFrame);
+    virtual void moveSelection(Selection s, sv_frame_t newStartFrame);
     virtual void resizeSelection(Selection s, Selection newSize);
     virtual void deleteSelection(Selection s);
 
     virtual void copy(View *v, Selection s, Clipboard &to);
-    virtual bool paste(View *v, const Clipboard &from, int frameOffset,
+    virtual bool paste(View *v, const Clipboard &from, sv_frame_t frameOffset,
                        bool interactive);
 
     virtual const Model *getModel() const { return m_model; }
@@ -130,11 +130,11 @@
         return m_plotStyle == PlotSegmentation && m_model->hasTextLabels();
     }
 
-    virtual bool getValueExtents(float &min, float &max,
+    virtual bool getValueExtents(double &min, double &max,
                                  bool &logarithmic, QString &unit) const;
 
-    virtual bool getDisplayExtents(float &min, float &max) const;
-    virtual bool setDisplayExtents(float min, float max);
+    virtual bool getDisplayExtents(double &min, double &max) const;
+    virtual bool setDisplayExtents(double min, double max);
 
     virtual int getVerticalZoomSteps(int &defaultStep) const;
     virtual int getCurrentVerticalZoomStep() const;
@@ -155,13 +155,13 @@
     }
 
     /// VerticalScaleLayer and ColourScaleLayer methods
-    virtual int getYForValue(View *, float value) const;
-    virtual float getValueForY(View *, int y) const;
+    virtual int getYForValue(View *, double value) const;
+    virtual double getValueForY(View *, int y) const;
     virtual QString getScaleUnits() const;
-    virtual QColor getColourForValue(View *v, float value) const;
+    virtual QColor getColourForValue(View *v, double value) const;
 
 protected:
-    void getScaleExtents(View *, float &min, float &max, bool &log) const;
+    void getScaleExtents(View *, double &min, double &max, bool &log) const;
     bool shouldAutoAlign() const;
 
     SparseTimeValueModel::PointList getLocalPoints(View *v, int) const;
@@ -179,8 +179,8 @@
     bool m_drawSegmentDivisions;
     bool m_derivative;
 
-    mutable float m_scaleMinimum;
-    mutable float m_scaleMaximum;
+    mutable double m_scaleMinimum;
+    mutable double m_scaleMaximum;
 
     void finish(SparseTimeValueModel::EditCommand *command) {
         Command *c = command->finish();