diff options
author | Arno <arno@disconnect.de> | 2017-04-09 04:10:32 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2017-04-09 04:10:32 +0200 |
commit | 5e69e8130c9f207e5f8e3222841e7771c56ccd24 (patch) | |
tree | 36823d71b03aea9eefac15fc9303518b6ae0b836 /playerwidget.h | |
parent | 8d0f7783a4db453ccb0ac5f05798f277f5c01f65 (diff) | |
download | BeetPlayer-5e69e8130c9f207e5f8e3222841e7771c56ccd24.tar.gz BeetPlayer-5e69e8130c9f207e5f8e3222841e7771c56ccd24.tar.bz2 BeetPlayer-5e69e8130c9f207e5f8e3222841e7771c56ccd24.zip |
Show volume as tray icon message
Use a QTimer to prevent the messages to pile up on every volume change.
Only show it when the timer isn't running. The timeout value of 500msecs
is totally arbitrary.
The mStarting thingy prevents showing the message twice while
constructing (setupGui and readSettings).
Diffstat (limited to 'playerwidget.h')
-rw-r--r-- | playerwidget.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/playerwidget.h b/playerwidget.h index f42a882..6ef5dd1 100644 --- a/playerwidget.h +++ b/playerwidget.h @@ -14,6 +14,7 @@ class QTextEdit; class QMediaPlayer; class QToolBar; class QAction; +class QTimer; class BeetPlayerProxy; class BeetView; class QSystemTrayIcon; @@ -45,6 +46,7 @@ class PlayerWidget : public QWidget { void doDeleteFiles(); void volumeUp(); void volumeDown(); + void showVolume(); void doFilter(); void clearFilter(); void reindex(); @@ -118,7 +120,10 @@ class PlayerWidget : public QWidget { quint64 mPlayListLength; QString mCurDir; QString mCurWinTitle; + QString mCurToolTip; QSystemTrayIcon *mTrayIcon; + QTimer *mVolumeTimer; + bool mStarting; }; #endif // PLAYERWIDGET_H |