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:
protected:
void paintEvent(QPaintEvent *);
void mouseReleaseEvent(QMouseEvent *);
+ void timerEvent(QTimerEvent *e);
+
+private:
QString name;
bool transparent;
- QTimer *timer;
+ int elevatorTimer;
};
#endif // TRANSLUCENTBUTTON_H