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 class ArtistList;
28 class MetaDataList;
29 class AlbumList;
30 
31 UI_FWD(GUI_SoundcloudArtistSearch)
32 
33 namespace SC
34 {
35  class Library;
36 
38  public Gui::Dialog
39  {
40  Q_OBJECT
41  UI_CLASS(GUI_SoundcloudArtistSearch)
42  PIMPL(GUI_ArtistSearch)
43 
44  public:
45  explicit GUI_ArtistSearch(SC::Library* library, QWidget* parent=nullptr);
46  ~GUI_ArtistSearch() override;
47 
48  private slots:
49  void searchClicked();
50  void clearClicked();
51  void addClicked();
52  void closeClicked();
53 
54  void artistsFetched(const ArtistList& artists);
55  void artistsExtFetched(const ArtistList& artists);
56  void albumsFetched(const AlbumList& albums);
57  void tracksFetched(const MetaDataList& tracks);
58 
59  void artistSelected(int idx);
60 
61  private:
62  void setTrackCountLabel(int trackCount);
63  void setPlaylistCountLabel(int playlistCount);
64 
65  protected:
66  void languageChanged() override;
67  void skinChanged() override;
68  };
69 }
70 #endif // GUI_SOUNDCLOUDARTISTSEARCH_H
ArtistList
ArtistList.
Definition: Artist.h:77
MetaDataList
The MetaDataList class.
Definition: MetaDataList.h:37
Gui::Dialog
Dialog with Settings connection. Also contains triggers for language_changed() and skin_changed()....
Definition: Dialog.h:37
Library
An interface class needed when implementing a library plugin.
Definition: LocalLibraryWatcher.h:31
AlbumList
The AlbumList class.
Definition: Album.h:100
SC::Library
Definition: SoundcloudLibrary.h:39
SC::GUI_ArtistSearch
Definition: GUI_SoundcloudArtistSearch.h:39