summaryrefslogtreecommitdiffstats
path: root/playerwidget.h
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2017-03-05 17:23:33 +0100
committerArno <arno@disconnect.de>2017-03-05 17:23:33 +0100
commit2ff72f033af3f24ffb816bc19a34fc794f585775 (patch)
treebe21b99d6ac7ebf60d398daca79567bb6e5b0565 /playerwidget.h
parent51990db36b7b4c1ff8ca72ff16ded36c72be24b9 (diff)
downloadBeetPlayer-2ff72f033af3f24ffb816bc19a34fc794f585775.tar.gz
BeetPlayer-2ff72f033af3f24ffb816bc19a34fc794f585775.tar.bz2
BeetPlayer-2ff72f033af3f24ffb816bc19a34fc794f585775.zip
Implement statusBar
Display in statusBar: * viewMode * number of files in playlist * length of playlist in h:m:s * player status (Stopped, Playing, Paused)
Diffstat (limited to 'playerwidget.h')
-rw-r--r--playerwidget.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/playerwidget.h b/playerwidget.h
index 383cbc3..bbe8333 100644
--- a/playerwidget.h
+++ b/playerwidget.h
@@ -21,8 +21,9 @@ class PlayerWidget : public QWidget {
public:
enum ItemType { Artist, Album, Song, Genre };
enum PopulateType { FilterType, IdType, EmptyType };
- enum CustomRoles { TypeRole = Qt::UserRole + 1, IdRole = Qt::UserRole + 2, FullPathRole = Qt::UserRole + 3, GenreRole = Qt::UserRole + 4, ArtistRole = Qt::UserRole + 5, TitleRole = Qt::UserRole + 6, AlbumRole = Qt::UserRole + 7 };
+ enum CustomRoles { TypeRole = Qt::UserRole + 1, IdRole = Qt::UserRole + 2, FullPathRole = Qt::UserRole + 3, GenreRole = Qt::UserRole + 4, ArtistRole = Qt::UserRole + 5, TitleRole = Qt::UserRole + 6, AlbumRole = Qt::UserRole + 7, LengthRole = Qt::UserRole + 8 };
explicit PlayerWidget(QWidget *parent = 0);
+ const QMediaPlayer* player() const { return mPlayer; }
public slots:
void doPopulateByArtist();
@@ -51,6 +52,13 @@ class PlayerWidget : public QWidget {
void continuePlaying(QMediaPlayer::State state);
void expand();
+ signals:
+ void viewModeChanged(const QString &viewMode);
+ void playModeChanged(const QString &playMode);
+ void numFilesChanged(int numFiles);
+ void playListLengthChanged(quint64 secs);
+ void message(const QString &msg);
+
private:
void setupGui();
void createActions();
@@ -82,6 +90,7 @@ class PlayerWidget : public QWidget {
QAction *mPlayA;
QAction *mStopA;
qint64 mDurSecs;
+ quint64 mPlayListLength;
};
#endif // PLAYERWIDGET_H