diff view/Pane.h @ 267:4ed1446ad604

* more on measurement tool -- pull out some logic from pane to layer &c still more to do
author Chris Cannam
date Thu, 21 Jun 2007 16:12:00 +0000
parents aee39d8c0b83
children 21c7152ddba8
line wrap: on
line diff
--- a/view/Pane.h	Thu Jun 21 14:05:23 2007 +0000
+++ b/view/Pane.h	Thu Jun 21 16:12:00 2007 +0000
@@ -88,25 +88,11 @@
     virtual void wheelEvent(QWheelEvent *e);
     virtual void resizeEvent(QResizeEvent *e);
 
-    // pull this out into another class at some point
-
-    struct MeasureRect {
-        QPoint start;
-        QPoint end;
-        long startFrame; // only valid for a layer that hasTimeXAxis
-        long endFrame;   // ditto
-    };
-
-    typedef std::vector<MeasureRect> MeasureRectList; // should be x-ordered
-    typedef std::map<Layer *, MeasureRectList> MeasureRectMap;
-
     void drawVerticalScale(QRect r, Layer *, QPainter &);
     void drawFeatureDescription(Layer *, QPainter &);
     void drawCentreLine(int, QPainter &);
     void drawDurationAndRate(QRect, const Model *, int, QPainter &);
     void drawLayerNames(QRect, QPainter &);
-    void drawMeasurementRects(Layer *, QPainter &);
-    void drawMeasurementRect(Layer *, MeasureRect &, QPainter &);
     void drawEditingSelection(QPainter &);
 
     virtual bool render(QPainter &paint, int x0, size_t f0, size_t f1);
@@ -141,10 +127,6 @@
     bool m_shiftPressed;
     bool m_ctrlPressed;
 
-    MeasureRectMap m_measureRects;
-    MeasureRect m_draggingRect;
-    bool m_haveDraggingRect;
-
     bool m_navigating;
     bool m_resizing;
     size_t m_dragCentreFrame;
@@ -169,9 +151,8 @@
     Thumbwheel *m_vthumb;
     NotifyingPushButton *m_reset;
 
-    static QCursor m_measureCursor1;
-    static QCursor m_measureCursor2;
-    static bool m_measureCursorsCreated;
+    static QCursor *m_measureCursor1;
+    static QCursor *m_measureCursor2;
 };
 
 #endif