Miam-Player  0.8.0
A nice music player
cover.h
Go to the documentation of this file.
1 #ifndef COVER_H
2 #define COVER_H
3 
4 #include <QString>
5 #include <QUrl>
6 
7 #include "miamcore_global.h"
8 
15 {
16 private:
18  QString _mimeType;
19 
21  QString _format;
22 
23  QByteArray _data;
24 
25  bool _hasChanged;
26 
27 public:
28  Cover(const QByteArray &byteArray, const QString &mimeType = QString());
29 
31  Cover(const QString &fileName);
32 
33  inline std::string mimeType() const { return _mimeType.toStdString(); }
34 
35  inline const QByteArray byteArray() const { return _data; }
36 
37  inline const char* format() { return _format.toStdString().data(); }
38 
39  inline bool hasChanged() const { return _hasChanged && !_data.isEmpty(); }
40 
41  inline void setChanged(bool changed) { this->_hasChanged = changed; }
42 };
43 
44 #endif // COVER_H
std::string mimeType() const
Definition: cover.h:33
The Cover class.
Definition: cover.h:14
void setChanged(bool changed)
Definition: cover.h:41
bool hasChanged() const
Definition: cover.h:39
const QByteArray byteArray() const
Definition: cover.h:35
#define MIAMCORE_LIBRARY
Definition: miamcore_global.h:10
const char * format()
Definition: cover.h:37