-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplayer.h
42 lines (32 loc) · 851 Bytes
/
player.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
#ifndef PLAYER_H
#define PLAYER_H
#include <QMediaPlayer>
#include <QMediaPlaylist>
#include <taglib/tag.h>
#include <taglib/fileref.h>
#include <taglib/id3v2tag.h>
#include <taglib/mpegfile.h>
#include <taglib/id3v2frame.h>
#include <taglib/id3v2header.h>
#include <taglib/attachedpictureframe.h>
QT_BEGIN_NAMESPACE
class QAbstractItemView;
class QMediaPlayer;
QT_END_NAMESPACE
class PlaylistModel;
using namespace TagLib;
class Player : public QObject {
Q_OBJECT
public:
explicit Player(QObject *parent = nullptr);
void addToPlaylist(const QList<QUrl> &urls);
public slots:
void open();
QString getTimeInfo(qint64 currentInfo);
public:
QString getAlbumArt(QUrl url);
QMediaPlayer *m_player = nullptr;
QMediaPlaylist *m_playlist = nullptr;
PlaylistModel *m_playlistModel = nullptr;
};
#endif // PLAYER_H