1
/***************************************************************************
2
genrelistreader.cpp - description
5
copyright : (C) 2002 by Scott Wheeler
6
email : scott@slackorama.net
7
***************************************************************************/
9
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
***************************************************************************/
18
#include "genrelistreader.h"
20
////////////////////////////////////////////////////////////////////////////////
22
////////////////////////////////////////////////////////////////////////////////
24
GenreListReader::GenreListReader(GenreList *genreList)
29
GenreListReader::~GenreListReader()
33
bool GenreListReader::startElement(const QString&, const QString&, const QString& element, const QXmlAttributes& attributes)
35
if(element.lower() == "genre") {
37
if(attributes.index("id3v1") != -1)
38
id3v1 = attributes.value("id3v1").toInt();
48
bool GenreListReader::endElement(const QString&, const QString&, const QString& element)
50
if(element.lower() == "genre")
55
bool GenreListReader::characters(const QString& content)
58
list->append(Genre(content, id3v1));