Sayonara Player
GUI_SoundcloudLibrary.h
1 /* GUI_SoundCloudLibrary.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_SOUNDCLOUDLIBRARY_H
24 #define GUI_SOUNDCLOUDLIBRARY_H
25 
26 #include "ui_GUI_SoundcloudLibrary.h"
27 
28 #include "GUI/Library/GUI_AbstractLibrary.h"
29 #include "Interfaces/LibraryInterface/LibraryContainer/LibraryContainer.h"
30 
31 #include "src/SoundcloudLibrary.h"
32 #include "ui/GUI_SoundcloudArtistSearch.h"
33 
35  public GUI_AbstractLibrary,
37 {
38  friend class GUI_AbstractLibrary;
39  Q_OBJECT
40 
41 
42 public:
43  explicit GUI_SoundCloudLibrary(SoundcloudLibrary* library, QWidget *parent=nullptr);
44 
45  QComboBox* get_libchooser() const;
46  QMenu* get_menu() const;
47 
48 
49 protected:
50  virtual Library::TrackDeletionMode show_delete_dialog(int n_tracks);
51  virtual void init_shortcuts() override;
52 
53 protected slots:
54  void btn_add_clicked();
55 
56 
57 private:
58  GUI_SoundcloudArtistSearch* _artist_search=nullptr;
59  QMenu* _library_menu=nullptr;
60 
61 };
62 
63 
66 {
67 
68  Q_OBJECT
69  Q_PLUGIN_METADATA(IID "com.sayonara-player.soundcloud_library")
70  Q_INTERFACES(LibraryContainerInterface)
71 
72 
73 private:
74  GUI_SoundCloudLibrary* ui=nullptr;
75 
76 public:
77 
78  SoundcloudLibraryContainer(QObject* parent=nullptr);
79 
80  // override from LibraryViewInterface
81  QString get_name() const override;
82  QString get_display_name() const override;
83  QIcon get_icon() const override;
84  QWidget* get_ui() const override;
85  QComboBox* get_libchooser() override;
86  QMenu* get_menu() override;
87  void init_ui() override;
88 
89 };
90 
91 
92 #endif // GUI_SOUNDCLOUDLIBRARY_H
Definition: SoundcloudLibrary.h:29
Definition: GUI_SoundcloudArtistSearch.h:34
Definition: ui_GUI_SoundcloudLibrary.h:284
Definition: GUI_SoundcloudLibrary.h:34
An interface class needed when implementing a library plugin.
Definition: LibraryContainer.h:42
Definition: GUI_AbstractLibrary.h:57
Definition: SoundcloudLibraryContainer.h:29