Sayonara Player
GUI_AlternativeCovers.h
1/* GUI_AlternativeCovers.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
22/*
23 * GUI_AlternativeCovers.h
24 *
25 * Created on: Jul 1, 2011
26 * Author: Michael Lugmair (Lucio Carreras)
27 */
28
29#ifndef GUI_ALTERNATE_COVERS_H_
30#define GUI_ALTERNATE_COVERS_H_
31
32#include "Gui/Utils/Widgets/Dialog.h"
33#include "Utils/Pimpl.h"
34#include <QPixmap>
35
36namespace Cover
37{
38 class Location;
39}
40
42
43
49 public Gui::Dialog
50{
51 Q_OBJECT
53 UI_CLASS(GUI_AlternativeCovers)
54
55 signals:
56 void sigCoverChanged(const Cover::Location& coverLocation);
57
58 public:
59 explicit GUI_AlternativeCovers(const Cover::Location& coverLocation, bool silent, QWidget* parent);
60 ~GUI_AlternativeCovers() override;
61
62 void setCoverLocation(const Cover::Location& coverLocation);
63
64 public slots:
65 void start();
66 void stop();
67
68 private slots:
69 void okClicked();
70 void applyClicked();
71 void openFileDialog();
72
73 void coverPressed(const QModelIndex& index);
74 void coverLookupStarted();
75 void coverLookupFinished(bool);
76 void coverFound(const QPixmap& cover);
77
78 void readyForProgressbar();
79
80 void coverServersChanged();
81 void autostartToggled(bool b);
82 void rbAutosearchToggled(bool b);
83 void wwwActiveChanged();
84
85 void searchTextEdited(const QString& text);
86
87 private:
88 void initUi();
89 void reset();
90 void reloadCombobox();
91 void initSaveToLibrary();
92
93 protected:
94 void showEvent(QShowEvent* e) override;
95 void resizeEvent(QResizeEvent* e) override;
96 void languageChanged() override;
97};
98
99#endif /* GUI_ALTERNATE_COVERS_H_ */
Definition: CoverLocation.h:39
The GUI_AlternativeCovers class.
Definition: GUI_AlternativeCovers.h:50