Sayonara Player
UserTaggingOperations.h
1 /* UserTaggingOperations.h */
2 
3 /* Copyright (C) 2011-2020 Michael Lugmair (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 {
31  class Editor;
33  public QObject
34  {
35  Q_OBJECT
36  PIMPL(UserOperations)
37 
38  signals:
39  void sigFinished();
40  void sigProgress(int);
41 
42  public:
43  UserOperations(LibraryId libraryId, QObject* parent=nullptr);
44  ~UserOperations() override;
45 
46  void setTrackRating(const MetaData& md, Rating rating);
47  void setTrackRating(const MetaDataList& tracks, Rating rating);
48 
49  void setAlbumRating(const Album& album, Rating rating);
50 
51  void mergeArtists(const Util::Set<Id>& artisIids, ArtistId targetArtistId);
52  void mergeAlbums(const Util::Set<Id>& albumsIds, AlbumId targetAlbumId);
53 
54  void addGenre(const IdSet ids, const Genre& genre);
55  void deleteGenre(const Genre& genre);
56  void renameGenre(const Genre& genre, const Genre& newGenre);
57  void applyGenreToMetadata(const MetaDataList& tracks, const Genre& genre);
58 
59  private:
60  Editor* createEditor();
61  void runEditor(Editor* editor);
62  };
63 }
64 
65 #endif // USERTAGGINGOPERATIONS_H
Definition: UserTaggingOperations.h:32
The MetaData class.
Definition: MetaData.h:45
The MetaDataList class.
Definition: MetaDataList.h:35
The GUI_TagEdit class.
Definition: GenreFetcher.h:33
A set structure. Inherited from std::set with some useful methods. For integer and String this set is...
Definition: Set.h:35
Definition: Genre.h:30
The Album class.
Definition: Album.h:39
The TagEdit class Metadata has to be added using the set_metadata(const MetaDataList&) method....
Definition: Editor.h:41