Sayonara Player
Loading...
Searching...
No Matches
GUI_SoundcloudArtistSearch.h
1/* GUI_SoundcloudArtistSearch.h */
2
3/* Copyright (C) 2011-2024 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
34{
35 class Location;
36}
37
38class QListWidget;
39
40UI_FWD(GUI_SoundcloudArtistSearch)
41
42namespace SC
43{
44 class Library;
45
47 public Gui::Dialog
48 {
49 Q_OBJECT
50 UI_CLASS_SHARED_PTR(GUI_SoundcloudArtistSearch)
51 PIMPL(GUI_ArtistSearch)
52
53 public:
54 explicit GUI_ArtistSearch(SC::Library* library, QWidget* parent = nullptr);
55 ~GUI_ArtistSearch() override;
56
57 private slots:
58 void searchClicked();
59 void clearClicked();
60 void addClicked();
61
62 void artistsFetched(const ArtistList& artists);
63 void artistsExtFetched(const ArtistList& artists);
64 void albumsFetched(const AlbumList& albums);
65 void tracksFetched(const MetaDataList& tracks);
66
67 void artistSelected(int idx);
68
69 void lineEditFocusEvent(QEvent::Type type);
70
71 private:
72 void initUserInterface();
73 void setTrackCountLabel(int trackCount);
74 void setPlaylistCountLabel(int playlistCount);
75 void startCoverLookup(const Cover::Location& location, QListWidget* targetView, int affectedRow);
76
77 protected:
78 void languageChanged() override;
79 void skinChanged() override;
80 };
81}
82#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
Definition MetaDataList.h:34
Definition GUI_SoundcloudArtistSearch.h:48
Definition SoundcloudLibrary.h:38