-
Notifications
You must be signed in to change notification settings - Fork 1
/
playlistitem.h
65 lines (51 loc) · 1.23 KB
/
playlistitem.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
#ifndef PLAYLISTITEM_H
#define PLAYLISTITEM_H
#include <QObject>
#include <QFuture>
#include <QUrl>
class AVFile;
class PlayListItem : public QObject
{
Q_OBJECT
public:
PlayListItem(QUrl s);
virtual ~PlayListItem();
bool isBusy();
bool isValid();
bool isLocalFile();
QUrl getUrl();
void setUrl(QUrl url);
QString getUrlHash();
QString getUrlString();
QString getUrlStringLocal();
// representation related methods
static int getColumnsCount();
static QString getColumnName(int col);
QString getColumn(int col);
void setColumn(int col, QString value);
// histogramm related methods
void ensureHistogram();
bool hasHistogram();
QString getHistogramDataPath();
QImage * getHistogrammImage(size_t width, size_t height);
// avfile related methods
AVFile * getAVFile();
static bool ensurePath();
private:
QUrl source;
QString artist;
QString title;
QString album;
int duration;
bool busy;
QString getArtist();
QString getTitle();
QString getAlbum();
QString getFormattedDuration();
void readTags();
void writeTags();
void analyze();
signals:
void histogramUpdated();
};
#endif // PLAYLISTITEM_H