kwave  18.07.70
GenreType.h
Go to the documentation of this file.
1 /*************************************************************************
2  GenreType.h - Map for genre types
3  -------------------
4  begin : Wed Sep 01 2002
5  copyright : (C) 2002 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
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. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef GENRE_TYPE_H
19 #define GENRE_TYPE_H
20 
21 #include "config.h"
22 
23 #include <QtGlobal>
24 #include <QMap>
25 #include <QString>
26 #include <QStringList>
27 
28 namespace Kwave
29 {
30 
31  class Q_DECL_EXPORT GenreType
32  {
33  private:
34 
36  GenreType();
37 
38  public:
39 
41  virtual ~GenreType() {}
42 
49  static QString name(int id, bool localized);
50 
52  static int fromID3(const QString &tag);
53 
55  static int id(const QString &name);
56 
58  static QStringList allTypes();
59 
60  protected:
61 
63  static void fill();
64 
65  private:
66 
68  static QMap<int, const char*> m_map;
69 
70  };
71 }
72 
73 #endif /* GENRE_TYPE_H */
74 
75 //***************************************************************************
76 //***************************************************************************
Definition: App.h:33
static QMap< int, const char * > m_map
Definition: GenreType.h:68
const char name[16]
Definition: memcpy.c:510
virtual ~GenreType()
Definition: GenreType.h:41