Commit 77af1cda authored by Scott Wheeler's avatar Scott Wheeler

Made QString a base class for Genre.

svn path=/trunk/kdemultimedia/juk/; revision=141274
parent daa0956f
......@@ -21,33 +21,22 @@
// public members
////////////////////////////////////////////////////////////////////////////////
Genre::Genre()
Genre::Genre() : QString()
{
name = QString::null;
id3v1 = 255;
}
Genre::Genre(QString genreName, int id3v1Number)
Genre::Genre(QString genreName, int id3v1Number) : QString(genreName)
{
name = genreName;
id3v1 = id3v1Number;
}
QString Genre::getName()
{
return(name);
}
int Genre::getId3v1()
{
return(id3v1);
}
void Genre::setName(QString genreName)
{
name = genreName;
}
void Genre::setId3v1(int id3v1Number)
{
id3v1 = id3v1Number;
......
......@@ -20,16 +20,14 @@
#include <qstring.h>
class Genre
class Genre : public QString
{
public:
Genre();
Genre(QString genreName, int id3v1Number);
QString getName();
int getId3v1();
void setName(QString genreName);
void setId3v1(int number);
private:
......
......@@ -70,6 +70,6 @@ void GenreList::initializeIndex()
index.clear();
index.resize(count());
for(GenreList::Iterator it = begin(); it != end(); ++it) {
index[(*it).getId3v1()] = (*it).getName();
index[(*it).getId3v1()] = static_cast<QString>(*it);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment