Sayonara Player
LocalLibraryMenu.h
1 /* LocalLibraryMenu.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 LOCALLIBRARYMENU_H
22 #define LOCALLIBRARYMENU_H
23 
24 #include <QMenu>
25 #include <QAction>
26 
27 #include "GUI/Utils/Widgets/WidgetTemplate.h"
28 
29 #include "Utils/Pimpl.h"
30 
31 
32 class QString;
33 class PreferenceAction;
34 
35 namespace Library
36 {
38  public Gui::WidgetTemplate<QMenu>
39  {
40  Q_OBJECT
41  PIMPL(LocalLibraryMenu)
42 
43  signals:
44  void sig_reload_library();
45  void sig_import_file();
46  void sig_import_folder();
47  void sig_info();
48 
49  void sig_name_changed(const QString& name);
50  void sig_path_changed(const QString& path);
51 
52  public:
53  explicit LocalLibraryMenu(const QString& name, const QString& path, QWidget* parent=nullptr);
54  virtual ~LocalLibraryMenu();
55 
56  void refresh_name(const QString& name);
57  void refresh_path(const QString& path);
58 
59  void set_show_album_covers_checked(bool checked);
60  void set_library_busy(bool b);
61  void add_preference_action(PreferenceAction* action);
62 
63  private:
64  void init_menu();
65 
66  protected:
67  void language_changed() override;
68  void skin_changed() override;
69 
70  private slots:
71  void show_album_covers_triggered(bool b);
72  void show_album_artists_triggered(bool b);
73 
74  void show_album_covers_changed();
75  void show_album_artists_changed();
76 
77  void realtime_search_changed();
78 
79  void edit_clicked();
80  void edit_accepted();
81  };
82 }
83 
84 #endif // LOCALLIBRARYMENU_H
Template for Sayonara Widgets. This template is responsible for holding a reference to the settings...
Definition: WidgetTemplate.h:47
Definition: PreferenceAction.h:35
An interface class needed when implementing a library plugin.
Definition: CachingThread.h:31
Definition: LocalLibraryMenu.h:37