diff options
author | Owen Williams <owilliams@mixxx.org> | 2013-12-07 09:35:50 -0500 |
---|---|---|
committer | Owen Williams <owilliams@mixxx.org> | 2013-12-08 09:46:02 -0500 |
commit | d8545a93d777a34972ddb02591f86cd5da3e1a21 (patch) | |
tree | aab3b9eb242d41844bdf40547c0ef90eb7045875 /src/widget/wpushbutton.h | |
parent | 25830a28f39cbafacf505e77d8390d908b8d61d3 (diff) |
Create long-press latching mode for pushbuttons
Diffstat (limited to 'src/widget/wpushbutton.h')
-rw-r--r-- | src/widget/wpushbutton.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/widget/wpushbutton.h b/src/widget/wpushbutton.h index f700f1120d..2e344eca97 100644 --- a/src/widget/wpushbutton.h +++ b/src/widget/wpushbutton.h @@ -55,6 +55,12 @@ class WPushButton : public WWidget public slots: void setValue(double); + private slots: + void slotCheckSetLatching(); + + signals: + void valueChangedLatched(double); + protected: virtual void paintEvent(QPaintEvent *); virtual void mousePressEvent(QMouseEvent *e); @@ -72,8 +78,11 @@ class WPushButton : public WWidget QPixmap **m_pPixmaps; // Associated background pixmap QPixmap *m_pPixmapBack; + // short click toggle button long click push button. ControlPushButton::ButtonMode m_leftButtonMode, m_rightButtonMode; QTimer m_clickTimer; + // Keep track if latching is still valid. + bool m_bLatchActive; }; #endif |