-
Notifications
You must be signed in to change notification settings - Fork 2
/
playermainwindow.h
71 lines (61 loc) · 1.78 KB
/
playermainwindow.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
#ifndef PLAYERMAINWINDOW_H
#define PLAYERMAINWINDOW_H
#include <QMainWindow>
#include <QMediaPlayer>
#include <QMediaPlaylist>
#include <QTimer>
#include <QMediaMetaData>
#include <QAudioRecorder>
#include <QCamera>
#include <QCameraViewfinder>
#include <QCameraImageCapture>
#include "common.h"
#include "database.h"
#include "osdlyricswidget.h"
namespace Ui {
class PlayerMainWindow;
}
class Network;
class PlayerMainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit PlayerMainWindow(QWidget *parent = 0);
~PlayerMainWindow();
void setupConnections();
void closeEvent(QCloseEvent *event);
public slots:
void openLocalMedia();
void openInternetURL();
void playButtonClicked();
void prevButtonClicked();
void nextButtonClicked();
void playSliderValueChanged(int value);
void volumeDialValueChanged(int value);
void channelIndexChanged(int index);
void playerStateChanged(QMediaPlayer::State state);
void mediaStatusChanged(QMediaPlayer::MediaStatus status);
void playProgressUpdate();
void metaDataUpdate();
void playOnlineMedia(int index);
void addCurrentSongToFavorites();
void playSongInFavorites();
void showAbout();
//networks
void channelsDownloaded(QList<KChannel> *channelList);
void mediaInfoListDownloaded(QList<KMediaInfo> *mediaInfoList);
void mediaInfoDownloaded(KMediaInfo mediaInfo);
void AlbumImageDownloaded(QByteArray *imageData);
private:
Ui::PlayerMainWindow *ui;
QMediaPlayer *mediaPlayer;
QMediaPlaylist *localMediaPlayList, *onlineMediaPlayList;
QList<KMediaInfo> *onlineMediaList;
QTimer *progressTimer;
Network *network;
bool onlineMode;
Database db;
bool dbOK;
OSDLyricsWidget *osdLyricsWidget;
};
#endif // PLAYERMAINWINDOW_H