taginfo.h 1.1 KB
Newer Older
Camilo Higuita's avatar
Camilo Higuita committed
1 2
#ifndef TAGINFO_H
#define TAGINFO_H
3

Camilo Higuita's avatar
Camilo Higuita committed
4 5
#include <QString>
#include <QByteArray>
6
#include <QObject>
Camilo Higuita's avatar
Camilo Higuita committed
7

8 9 10
#include <./3rdparty/taglib/tag.h>
#include <./3rdparty/taglib/fileref.h>

11 12 13
namespace TagLib
{
    class FileRef;
14 15
}

16
class TagInfo : public QObject
Camilo Higuita's avatar
Camilo Higuita committed
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
        Q_OBJECT
    public:
        TagInfo(QObject *parent = nullptr);
        ~TagInfo();
        bool feed(const QString &url);
        QString getAlbum() const;
        QString getTitle() const;
        QString getArtist() const;
        int getTrack() const;
        QString getGenre() const;
        QString fileName() const;
        QString getComment() const;
        QByteArray getCover() const;
        int getDuration() const;
        uint getYear() const;

        void setAlbum(const QString &album) ;
        void setTitle(const QString &title);
        void setTrack(const int &track);
        void setArtist(const QString &artist);
        void setGenre(const QString &genre);
        void setComment(const QString &comment);
        void setCover(const QByteArray &array);

    private:
        TagLib::FileRef file;
        QString path;
Camilo Higuita's avatar
Camilo Higuita committed
46 47 48
};

#endif // TAGINFO_H