Sayonara Player
UserTaggingOperations.h
1 /* UserTaggingOperations.h */
2 
3 /* Copyright (C) 2011-2019 Lucio Carreras
4  *
5  * This file is part of sayonara player
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11 
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16 
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef USERTAGGINGOPERATIONS_H
22 #define USERTAGGINGOPERATIONS_H
23 
24 #include <QObject>
25 #include "Utils/Pimpl.h"
26 
27 class Genre;
28 
29 namespace Tagging
30 {
32  public QObject
33  {
34  Q_OBJECT
35  PIMPL(UserOperations)
36 
37  signals:
38  void sig_finished();
39  void sig_progress(int);
40 
41  public:
42  UserOperations(LibraryId library_id, QObject* parent=nullptr);
43  ~UserOperations();
44 
45  void set_track_rating(const MetaData& md, Rating rating);
46  void set_track_rating(const MetaDataList& v_md, Rating rating);
47 
48  void set_album_rating(const Album& album, Rating rating);
49 
50  void merge_artists(const Util::Set<Id>& artist_ids, ArtistId target_artist_id);
51  void merge_albums(const Util::Set<Id>& albums_ids, AlbumId target_album_id);
52 
53  void add_genre(const IdSet ids, const Genre& genre);
54  void delete_genre(const Genre& genre);
55  void rename_genre(const Genre& genre, const Genre& new_genre);
56  void add_genre_to_md(const MetaDataList& v_md, const Genre& genre);
57  };
58 }
59 
60 #endif // USERTAGGINGOPERATIONS_H
MetaDataList
The MetaDataList class.
Definition: MetaDataList.h:37
Util::Set
A set structure. Inherited from std::set with some useful methods. For integer and String this set is...
Definition: Set.h:35
Genre
Definition: Genre.h:30
Album
The Album class.
Definition: Album.h:39
Tagging
The GUI_TagEdit class.
Definition: GenreFetcher.h:33
MetaData
The MetaData class.
Definition: MetaData.h:44
Tagging::UserOperations
Definition: UserTaggingOperations.h:31