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
27class Genre;
28
29namespace 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 Rating oldRating(TrackID trackId) const;
49 Rating newRating(TrackID trackId) const;
50
51 void setAlbumRating(const Album& album, Rating rating);
52
53 void mergeArtists(const Util::Set<Id>& artisIids, ArtistId targetArtistId);
54 void mergeAlbums(const Util::Set<Id>& albumsIds, AlbumId targetAlbumId);
55
56 void addGenre(const IdSet ids, const Genre& genre);
57 void deleteGenre(const Genre& genre);
58 void renameGenre(const Genre& genre, const Genre& newGenre);
59 void applyGenreToMetadata(const MetaDataList& tracks, const Genre& genre);
60
61 private:
62 Editor* createEditor();
63 void runEditor(Editor* editor);
64 };
65}
66
67#endif // USERTAGGINGOPERATIONS_H
Definition: Album.h:37
Definition: Genre.h:31
The MetaDataList class.
Definition: MetaDataList.h:39
The MetaData class.
Definition: MetaData.h:47
The TagEdit class Metadata has to be added using the set_metadata(const MetaDataList&) method....
Definition: Editor.h:43
Definition: UserTaggingOperations.h:34
A set structure. Inherited from std::set with some useful methods. For integer and String this set is...
Definition: Set.h:37
The GUI_TagEdit class.
Definition: GenreFetcher.h:34