Mercurial > hg > svgui
comparison widgets/AudioDial.h @ 167:53b9c7656798
* Use RangeMappers in various places in plugin parameters, layer properties,
playback parameters &c
author | Chris Cannam |
---|---|
date | Mon, 16 Oct 2006 20:42:23 +0000 |
parents | 705f05ab42e3 |
children | d4be66d61c04 |
comparison
equal
deleted
inserted
replaced
166:48182241f594 | 167:53b9c7656798 |
---|---|
39 */ | 39 */ |
40 | 40 |
41 #include <QDial> | 41 #include <QDial> |
42 #include <map> | 42 #include <map> |
43 | 43 |
44 class RangeMapper; | |
45 | |
44 /** | 46 /** |
45 * AudioDial is a nicer-looking QDial that by default reacts to mouse | 47 * AudioDial is a nicer-looking QDial that by default reacts to mouse |
46 * movement on horizontal and vertical axes instead of in a radial | 48 * movement on horizontal and vertical axes instead of in a radial |
47 * motion. Move the mouse up or right to increment the value, down or | 49 * motion. Move the mouse up or right to increment the value, down or |
48 * left to decrement it. AudioDial also responds to the mouse wheel. | 50 * left to decrement it. AudioDial also responds to the mouse wheel. |
66 ~AudioDial(); | 68 ~AudioDial(); |
67 | 69 |
68 const QColor& getKnobColor() const { return m_knobColor; } | 70 const QColor& getKnobColor() const { return m_knobColor; } |
69 const QColor& getMeterColor() const { return m_meterColor; } | 71 const QColor& getMeterColor() const { return m_meterColor; } |
70 bool getMouseDial() const { return m_mouseDial; } | 72 bool getMouseDial() const { return m_mouseDial; } |
73 | |
74 void setRangeMapper(RangeMapper *mapper); // I take ownership, will delete | |
75 | |
76 float mappedValue() const; | |
71 | 77 |
72 public slots: | 78 public slots: |
73 /** | 79 /** |
74 * Set the colour of the knob. The default is to inherit the | 80 * Set the colour of the knob. The default is to inherit the |
75 * colour from the widget's palette. | 81 * colour from the widget's palette. |
109 | 115 |
110 // Alternate mouse behavior tracking. | 116 // Alternate mouse behavior tracking. |
111 bool m_mouseDial; | 117 bool m_mouseDial; |
112 bool m_mousePressed; | 118 bool m_mousePressed; |
113 QPoint m_posMouse; | 119 QPoint m_posMouse; |
120 | |
121 RangeMapper *m_rangeMapper; | |
114 }; | 122 }; |
115 | 123 |
116 | 124 |
117 #endif // __AudioDial_h | 125 #endif // __AudioDial_h |
118 | 126 |