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