Apply smooth paging patch. New version 0.4.7.
[dorian] / widgets / translucentbutton.h
index 26488cf..5e26707 100644 (file)
@@ -10,18 +10,21 @@ class QMouseEvent;
 class QTimer;
 
 /**
- * A button that is transparent, but can temporarily made opaque by flashing it.
+ * A button that is transparent, but can temporarily be made opaque by
+ * flashing it.
  */
 class TranslucentButton: public QLabel
 {
     Q_OBJECT
 
 public:
-    static const int pixels;
     explicit TranslucentButton(const QString &iconName, QWidget *parent);
+    ~TranslucentButton();
+    static const int pixels;
+    static const int elevatorInterval;
 
 public slots:
-    void flash(int duration = 3000);
+    void flash(int duration = 700);
     void stopFlash();
 
 signals:
@@ -30,9 +33,12 @@ signals:
 protected:
     void paintEvent(QPaintEvent *);
     void mouseReleaseEvent(QMouseEvent *);
+    void timerEvent(QTimerEvent *e);
+
+private:
     QString name;
     bool transparent;
-    QTimer *timer;
+    int elevatorTimer;
 };
 
 #endif // TRANSLUCENTBUTTON_H