diff widgets/Thumbwheel.h @ 133:9e6b3e239b9d

* Add zoom thumbwheels to Pane. Implement horizontal thumbwheel, and vertical depending on layer type (supported for waveform and spectrogram, though wrong for log-scale spectrogram at the moment). * Add bare bones of a spectrum layer. * Add window icon * Add shortcut for "insert time instant" on laptops without keypad enter (";") * Delete FFT processing thread when it exits (at least, next time we're asked for something interesting) * Get audio file extensions from the file readers, and thus from libsndfile for the wave file reader -- leads to rather a wide combo box in file dialog though * Better refresh order for spectrogram (redraw centre section first)
author Chris Cannam
date Fri, 04 Aug 2006 17:01:37 +0000
parents 5d3a483856ff
children 793df5f0c6cb
line wrap: on
line diff
--- a/widgets/Thumbwheel.h	Thu Aug 03 15:40:11 2006 +0000
+++ b/widgets/Thumbwheel.h	Fri Aug 04 17:01:37 2006 +0000
@@ -23,20 +23,15 @@
     Q_OBJECT
 
 public:
-    Thumbwheel(int min, int max, int defaultValue,
-               Qt::Orientation orientation, QWidget *parent = 0);
+    Thumbwheel(Qt::Orientation orientation, QWidget *parent = 0);
     virtual ~Thumbwheel();
 
-    void setSpeed(float speed);
+    int getMinimumValue() const;
+    int getMaximumValue() const;
+    int getDefaultValue() const;
     float getSpeed() const;
-
-    void setTracking(bool tracking);
     bool getTracking() const;
-
-    void setShowScale(bool show);
     bool getShowScale() const;
-
-    void setValue(int value);
     int getValue() const;
 
     virtual void mousePressEvent(QMouseEvent *e);
@@ -51,6 +46,16 @@
 signals:
     void valueChanged(int);
 
+public slots:
+    void setMinimumValue(int min);
+    void setMaximumValue(int max);
+    void setDefaultValue(int deft);
+    void setSpeed(float speed);
+    void setTracking(bool tracking);
+    void setShowScale(bool show);
+    void setValue(int value);
+    void resetToDefault();
+
 private:
     int m_min;
     int m_max;
@@ -61,6 +66,7 @@
     bool m_tracking;
     bool m_showScale;
     bool m_clicked;
+    bool m_atDefault;
     QPoint m_clickPos;
     int m_clickValue;
 };