diff widgets/AudioDial.h @ 168:d4be66d61c04

* Make audio dial remember its more accurate mapped value as well as its display position * Add tool tip support to audio dial to show values
author Chris Cannam
date Tue, 17 Oct 2006 13:04:49 +0000
parents 53b9c7656798
children dbd34ff746c7
line wrap: on
line diff
--- a/widgets/AudioDial.h	Mon Oct 16 20:42:23 2006 +0000
+++ b/widgets/AudioDial.h	Tue Oct 17 13:04:49 2006 +0000
@@ -72,8 +72,10 @@
     bool getMouseDial() const { return m_mouseDial; }
 
     void setRangeMapper(RangeMapper *mapper); // I take ownership, will delete
+    const RangeMapper *rangeMapper() const { return m_rangeMapper; }
+    float mappedValue() const;
 
-    float mappedValue() const;
+    void setShowToolTip(bool show);
 
 public slots:
     /**
@@ -107,17 +109,24 @@
     virtual void mouseReleaseEvent(QMouseEvent *pMouseEvent);
     virtual void mouseDoubleClickEvent(QMouseEvent *pMouseEvent);
 
+protected slots:
+    void updateMappedValue(int value);
+
 private:
     QColor m_knobColor;
     QColor m_meterColor;
     
     int m_defaultValue;
+    float m_mappedValue;
+    bool m_noMappedUpdate;
 
     // Alternate mouse behavior tracking.
     bool m_mouseDial;
     bool m_mousePressed;
     QPoint m_posMouse;
 
+    bool m_showTooltip;
+
     RangeMapper *m_rangeMapper;
 };