Sayonara Player
GUI_SoundcloudArtistSearch.h
1 /* GUI_SoundcloudArtistSearch.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 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);
47 
48  private slots:
49  void search_clicked();
50  void clear_clicked();
51  void add_clicked();
52  void close_clicked();
53 
54  void artists_fetched(const ArtistList& artists);
55  void artists_ext_fetched(const ArtistList& artists);
56  void albums_fetched(const AlbumList& albums);
57  void tracks_fetched(const MetaDataList& tracks);
58 
59  void artist_selected(int idx);
60 
61  private:
62  void set_tracks_label(int n_tracks);
63  void set_playlist_label(int n_playlists);
64  void language_changed() override;
65  };
66 }
67 #endif // GUI_SOUNDCLOUDARTISTSEARCH_H
Definition: GUI_SoundcloudArtistSearch.h:37
The MetaDataList class.
Definition: MetaDataList.h:38
The AlbumList class.
Definition: Album.h:85
Definition: SoundcloudLibrary.h:37
Dialog with Settings connection. Also contains triggers for language_changed() and skin_changed()...
Definition: Dialog.h:34
ArtistList.
Definition: Artist.h:69
Definition: SoundcloudLibraryContainer.h:30
An interface class needed when implementing a library plugin.
Definition: LibraryManager.h:36