Sayonara Player
GUI_SoundcloudArtistSearch.h
1 /* GUI_SoundcloudArtistSearch.h */
2 
3 /* Copyright (C) 2011-2016 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 #ifndef GUI_SOUNDCLOUDARTISTSEARCH_H
24 #define GUI_SOUNDCLOUDARTISTSEARCH_H
25 
26 #include <QDialog>
27 #include "GUI/Helper/SayonaraWidget/SayonaraDialog.h"
28 #include "3rdParty/Soundcloud/ui_GUI_SoundcloudArtistSearch.h"
29 #include "3rdParty/Soundcloud/src/SoundcloudLibrary.h"
30 #include "3rdParty/Soundcloud/src/SoundcloudDataFetcher.h"
31 
32 
34 {
35  Q_OBJECT
36 
37 public:
38  explicit GUI_SoundcloudArtistSearch(SoundcloudLibrary* library, QWidget *parent=nullptr);
39 
40 private slots:
41  void search_clicked();
42  void clear_clicked();
43  void add_clicked();
44  void close_clicked();
45 
46  void artists_fetched(const ArtistList& artists);
47  void artists_ext_fetched(const ArtistList& artists);
48  void albums_fetched(const AlbumList& albums);
49  void tracks_fetched(const MetaDataList& tracks);
50 
51  void artist_selected(int idx);
52 
53  void language_changed() override;
54 
55 private:
56  SoundcloudLibrary* _library=nullptr;
57  SoundcloudDataFetcher* _fetcher=nullptr;
58 
59 
60  MetaDataList _v_md;
61  AlbumList _albums;
62  ArtistList _searched_artists;
63  ArtistList _chosen_artists;
64 
65  quint64 _cur_artist_sc_id;
66 
67 private:
68  void set_tracks_label(int n_tracks);
69  void set_playlist_label(int n_playlists);
70 
71 };
72 
73 #endif // GUI_SOUNDCLOUDARTISTSEARCH_H
Definition: SoundcloudLibrary.h:29
Definition: GUI_SoundcloudArtistSearch.h:33
Definition: MetaDataList.h:44
The AlbumList class.
Definition: Album.h:72
ArtistList.
Definition: Artist.h:64
Dialog with Settings connection. Also contains triggers for language_changed() and skin_changed()...
Definition: SayonaraDialog.h:38
Definition: SoundcloudDataFetcher.h:34
Definition: ui_GUI_SoundcloudArtistSearch.h:184