9
* Copyright (C) 2014 Urs Fleisch
11
* This file is part of Kid3.
13
* Kid3 is free software; you can redistribute it and/or modify
14
* it under the terms of the GNU General Public License as published by
15
* the Free Software Foundation; either version 2 of the License, or
16
* (at your option) any later version.
18
* Kid3 is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
23
* You should have received a copy of the GNU General Public License
24
* along with this program. If not, see <http://www.gnu.org/licenses/>.
30
#include <QStandardItemModel>
36
class KID3_CORE_EXPORT GenreModel : public QStandardItemModel {
41
* @param id3v1 true to create genres for ID3v1
42
* @param parent parent widget
44
explicit GenreModel(bool id3v1, QObject* parent = 0);
49
virtual ~GenreModel();
52
* Initialize module with genres.
53
* This method is called by the constructor. It shall be called after
54
* construction if genre settings are changed.
59
* Get the row for a genre.
60
* If the genre is not found, it is added at the returned row.
61
* @param genreStr genre string
64
Q_INVOKABLE int getRowForGenre(const QString& genreStr);
70
#endif // GENREMODEL_H