id3tag.h 2.33 KB
Newer Older
1 2 3 4 5
/***************************************************************************
                          id3tag.h  -  description
                             -------------------
    begin                : Sun Feb 17 2002
    copyright            : (C) 2002 by Scott Wheeler
6
    email                : wheeler@kde.org
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
***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef ID3TAG_H
#define ID3TAG_H

#include <qstring.h>

#include <id3/tag.h>

#include "tag.h"

class ID3Tag : public Tag
{
public:
    ID3Tag(const QString &file);
    virtual ~ID3Tag();

    virtual void save();
34
    virtual bool hasTag() const;
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53

    virtual QString track() const;
    virtual QString artist() const;
    virtual QString album() const;
    virtual Genre   genre() const;
    virtual int trackNumber() const;
    virtual QString trackNumberString() const;
    virtual int year() const;
    virtual QString yearString() const;
    virtual QString comment() const;

    virtual void setTrack(const QString &value);
    virtual void setArtist(const QString &value);
    virtual void setAlbum(const QString &value);
    virtual void setGenre(const Genre &value);
    virtual void setTrackNumber(int value);
    virtual void setYear(int value);
    virtual void setComment(const QString &value);

54 55 56 57
    virtual QString bitrateString() const;
    virtual QString lengthString() const;
    virtual int seconds() const;

58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
private:
    ID3_Tag tag;
    QString fileName;
    bool changed;

    QString tagTrack;
    QString tagArtist;
    QString tagAlbum;
    Genre tagGenre;
    int tagTrackNumber;
    QString tagTrackNumberString;
    int tagYear;
    QString tagYearString;
    QString tagComment;
    bool tagExists;
73 74

    KFileMetaInfo metaInfo;
75 76 77
};

#endif