Sayonara Player
AlbumCoverFetchThread.h
1 /* AlbumCoverFetchThread.h */
2 
3 /* Copyright (C) 2011-2017 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 
22 
23 #ifndef ALBUMCOVERFETCHTHREAD_H
24 #define ALBUMCOVERFETCHTHREAD_H
25 
26 #include <QThread>
27 #include <QModelIndex>
28 
29 #include "Utils/Pimpl.h"
30 
31 namespace Cover
32 {
33  class Location;
34 }
35 
36 class Album;
48 class AlbumCoverFetchThread : public QThread
49 {
50  Q_OBJECT
52 
53 signals:
54  void sig_next();
55 
56 protected:
57  void run() override;
58 
59 public:
60  AlbumCoverFetchThread(QObject* parent=nullptr);
62 
68  void add_data(const QString& hash, const Cover::Location& cl);
69 
75  void done(bool success);
76 
80  void stop();
81 
86  QString current_hash() const;
87 
92  Cover::Location current_cover_location() const;
93 };
94 
95 #endif // ALBUMCOVERFETCHTHREAD_H
The CoverLocation class.
Definition: CoverLocation.h:41
This class organizes requests for new Covers for the AlbumCoverView. When looking for covers...
Definition: AlbumCoverFetchThread.h:48
The Album class.
Definition: Album.h:38
Definition: SomaFMStation.h:33