-
Notifications
You must be signed in to change notification settings - Fork 1
/
playerwidget.h
51 lines (37 loc) · 944 Bytes
/
playerwidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef PLAYERWIDGET_H
#define PLAYERWIDGET_H
# include <QWidget>
# include <QModelIndex>
# include "playbackmanager.h"
namespace Ui {
class PlayerWidget;
}
class PlayerWidget : public QWidget
{
Q_OBJECT
public:
explicit PlayerWidget(QWidget *parent = 0);
~PlayerWidget();
public slots:
void handlePlayRequest(QModelIndex index);
void togglePlayPause();
void playNextSong();
void playPreviousSong();
void handleArtworkUpdate(int id, QPixmap& p);
signals:
void playbackStarted();
void songChanged(QString title, QString user);
// === private parts
private: // - methods
void setupPlaybackManager();
private slots:
void handleSliderUserMove();
void setPlayButtonIcon();
void setPauseButtonIcon();
private: // - attributes
PlaybackManager *soundManager;
Ui::PlayerWidget *ui;
QModelIndex currentSongIndex;
int currentSongId;
};
#endif // PLAYERWIDGET_H