Sayonara Player
CoverButton.h
1 /* CoverButton.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 #ifndef COVER_BUTTON_H
22 #define COVER_BUTTON_H
23 
24 #include <QPushButton>
25 
26 #include "Helper/Pimpl.h"
27 
28 class CoverLocation;
29 class QIcon;
30 
35 class CoverButton : public QPushButton
36 {
37  Q_OBJECT
38  PIMPL(CoverButton)
39 
40 signals:
41  void sig_cover_replaced();
42  void sig_cover_found();
43 
44 public:
45  explicit CoverButton(QWidget* parent=nullptr);
46  virtual ~CoverButton();
47 
48  void set_cover_location(const CoverLocation& cl);
49  void force_icon(const QIcon& icon);
50 
51 private slots:
52  void cover_button_clicked();
53  void alternative_cover_fetched(const CoverLocation& cl);
54  void cover_found(const CoverLocation& cl);
55  void set_cover_image(const QString& cover_path);
56 };
57 
58 #endif
The CoverButton class.
Definition: CoverButton.h:35
The CoverLocation class.
Definition: CoverLocation.h:37