Sayonara Player
GUI_SoundcloudArtistSearch.h
1/* GUI_SoundcloudArtistSearch.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 GUI_SOUNDCLOUDARTISTSEARCH_H
22#define GUI_SOUNDCLOUDARTISTSEARCH_H
23
24#include "Utils/Pimpl.h"
25#include "Gui/Utils/Widgets/Dialog.h"
26
27#include <QEvent>
28
29class ArtistList;
30class MetaDataList;
31class AlbumList;
32
33namespace Cover { class Location; }
34
35class QListWidget;
36
37UI_FWD(GUI_SoundcloudArtistSearch)
38
39namespace SC
40{
41 class Library;
42
44 public Gui::Dialog
45 {
46 Q_OBJECT
47 UI_CLASS_SHARED_PTR(GUI_SoundcloudArtistSearch)
48 PIMPL(GUI_ArtistSearch)
49
50 public:
51 explicit GUI_ArtistSearch(SC::Library* library, QWidget* parent=nullptr);
52 ~GUI_ArtistSearch() override;
53
54 private slots:
55 void searchClicked();
56 void clearClicked();
57 void addClicked();
58
59 void artistsFetched(const ArtistList& artists);
60 void artistsExtFetched(const ArtistList& artists);
61 void albumsFetched(const AlbumList& albums);
62 void tracksFetched(const MetaDataList& tracks);
63
64 void artistSelected(int idx);
65
66 void lineEditFocusEvent(QEvent::Type type);
67
68 private:
69 void initUserInterface();
70 void setTrackCountLabel(int trackCount);
71 void setPlaylistCountLabel(int playlistCount);
72 void startCoverLookup(const Cover::Location& location, QListWidget* targetView, int affectedRow);
73
74 protected:
75 void languageChanged() override;
76 void skinChanged() override;
77 };
78}
79#endif // GUI_SOUNDCLOUDARTISTSEARCH_H
Definition: Album.h:88
Definition: Artist.h:61
Definition: CoverLocation.h:39
Dialog with Settings connection. Also contains triggers for language_changed() and skin_changed()....
Definition: Dialog.h:37
The MetaDataList class.
Definition: MetaDataList.h:39
Definition: GUI_SoundcloudArtistSearch.h:45
Definition: SoundcloudLibrary.h:38
An interface class needed when implementing a library plugin.
Definition: LocalLibraryWatcher.h:31