forked from spygg/QBaiduFm
-
Notifications
You must be signed in to change notification settings - Fork 1
/
widget.h
86 lines (67 loc) · 1.79 KB
/
widget.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include <QJsonParseError>
#include <QJsonDocument>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QEventLoop>
#include <QNetworkCookieJar>
#include <QNetworkCookie>
#include <QMediaPlayer>
#include "logindlg.h"
#include "channelswidget.h"
#include "lyrics.h"
#include "volpannel.h"
#include "widget.h"
#include "aristpicture.h"
#include "getsongplaylistid.h"
#include "getsongreallink.h"
#include "getaristpic.h"
#include "getlrc.h"
namespace Ui {
class Widget;
}
class Widget : public QWidget
{
Q_OBJECT
public:
explicit Widget(QWidget *parent = 0);
~Widget();
public slots:
void on_settingtoolButton_clicked();
void on_voltoolButton_clicked();
void on_showChanneltoolButton_clicked();
void channelChangedSlot(CHANNEL_INFO channel);
void on_nexttoolButton_clicked();
void on_prevtoolButton_clicked();
void pauseSlot(bool pause);
void on_downloadtoolButton_clicked();
private:
Ui::Widget *ui;
void closeEvent(QCloseEvent *event);
private:
QMediaPlayer *m_pPlayer;
LoginDlg *m_userLonIndlg;
CHANNEL_INFO m_currentChannelId;
ChannelsWidget *m_channelWidget;
QList <QString> m_songIdList;
int m_iCurrentSongIndex;
SONG_INFO m_currentSongInfo;
QNetworkCookieJar *m_cookJar;
void play(int index);
void nextSong();
void prevSong();
void initSongIdList();
void mediaStatusChanged(QMediaPlayer::MediaStatus status);
void positionChanged(qint64 position);
void durationChanged(qint64 duration);
void setPosition(qint64 position);
void volChannged(qint64 position);
signals:
void channelInfoSignal(QString channel);
private slots:
void errorOccur(QMediaPlayer::Error);
};
#endif // WIDGET_H