Mercurial > hg > svgui
diff widgets/Thumbwheel.h @ 187:e7cf6044c2a0
* better icon
* support range mappers in thumbwheel
* supply range mapper for vertical zoom from spectrogram
* fix bug in fftmodel for scaled ffts
* make the various widgets all respond to double-click for edit, middle-click
for reset, ctrl-left-click for reset
author | Chris Cannam |
---|---|
date | Fri, 12 Jan 2007 14:49:18 +0000 |
parents | 42118892f428 |
children | 5b7472db612b |
line wrap: on
line diff
--- a/widgets/Thumbwheel.h Fri Jan 05 15:49:10 2007 +0000 +++ b/widgets/Thumbwheel.h Fri Jan 12 14:49:18 2007 +0000 @@ -18,6 +18,8 @@ #include <QWidget> +class RangeMapper; + class Thumbwheel : public QWidget { Q_OBJECT @@ -41,6 +43,12 @@ virtual void wheelEvent(QWheelEvent *e); virtual void paintEvent(QPaintEvent *e); + void setRangeMapper(RangeMapper *mapper); // I take ownership, will delete + const RangeMapper *getRangeMapper() const { return m_rangeMapper; } + float getMappedValue() const; + + void setShowToolTip(bool show); + QSize sizeHint() const; signals: @@ -54,13 +62,19 @@ void setTracking(bool tracking); void setShowScale(bool show); void setValue(int value); + void setMappedValue(float mappedValue); void resetToDefault(); +protected slots: + void updateMappedValue(int value); + private: int m_min; int m_max; int m_default; int m_value; + float m_mappedValue; + bool m_noMappedUpdate; float m_rotation; Qt::Orientation m_orientation; float m_speed; @@ -70,6 +84,8 @@ bool m_atDefault; QPoint m_clickPos; float m_clickRotation; + bool m_showTooltip; + RangeMapper *m_rangeMapper; }; #endif