diff widgets/Panner.h @ 188:dd573e090eed

* Add range input dialog * Make Panner support middle-click/ctrl-left-click to reset and emit doubleClicked when doubleClicked instead of resetting * Use range input dialog to enter new values for panner on double-click
author Chris Cannam
date Fri, 12 Jan 2007 21:52:56 +0000
parents 42118892f428
children 5b7472db612b
line wrap: on
line diff
--- a/widgets/Panner.h	Fri Jan 12 14:49:18 2007 +0000
+++ b/widgets/Panner.h	Fri Jan 12 21:52:56 2007 +0000
@@ -31,6 +31,8 @@
     void setThumbColour(QColor colour);
     void setAlpha(int backgroundAlpha, int thumbAlpha);
 
+    void getRectExtents(float &x0, float &y0, float &width, float &height);
+
     virtual void mousePressEvent(QMouseEvent *e);
     virtual void mouseDoubleClickEvent(QMouseEvent *e);
     virtual void mouseMoveEvent(QMouseEvent *e);
@@ -57,6 +59,12 @@
      */
     void rectCentreMoved(float, float);
 
+    /**
+     * Emitted when the panner is double-clicked (for the "customer"
+     * code to pop up a value editing dialog, for example).
+     */
+    void doubleClicked();
+
 public slots:
     /** 
      * Set the extents of the panned rectangle within the overall
@@ -91,10 +99,11 @@
      */
     void setRectCentreY(float y);
 
+    void resetToDefault();
+
 protected:
     void normalise();
     void emitAndUpdate();
-    void resetToDefault();
 
     float m_rectX;
     float m_rectY;