Sayonara Player
GUI_PlayerMenubar.h
1 /* GUI_PlayerMenubar.h */
2 
3 /* Copyright (C) 2011-2019 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_PLAYERMENUBAR_H
22 #define GUI_PLAYERMENUBAR_H
23 
24 #include "Gui/Utils/Shortcuts/ShortcutIdentifier.h"
25 #include "Gui/Utils/Widgets/WidgetTemplate.h"
26 #include "Utils/Pimpl.h"
27 
28 #include <QMenuBar>
29 
30 namespace Library
31 {
32  class Container;
33 }
34 
35 class Menubar :
36  public Gui::WidgetTemplate<QMenuBar>
37 {
38  Q_OBJECT
39  PIMPL(Menubar)
40 
41 signals:
42  void sig_close_clicked();
43  void sig_minimize_clicked();
44  void sig_logger_clicked();
45 
46 public:
47  explicit Menubar(QWidget* parent=nullptr);
48  ~Menubar();
49 
50  void insert_player_plugin_action(QAction* action);
51  void insert_preference_action(QAction* action);
52  QAction* update_current_library(Library::Container* library);
53  void show_library_action(bool visible);
54  void set_show_library_action_enabled(bool b);
55 
56 private:
57  void init_connections();
58  void style_changed();
59 
60 protected:
61  void language_changed() override;
62  void skin_changed() override;
63 
64 private slots:
65  void open_dir_clicked();
66  void open_files_clicked();
67  void shutdown_clicked();
68  void close_clicked();
69  void minimize_clicked();
70  void skin_toggled(bool b);
71  void big_cover_toggled(bool b);
72  void show_library_toggled(bool b);
73  void show_fullscreen_toggled(bool b);
74  void help_clicked();
75  void about_clicked();
76  void shortcut_changed(ShortcutIdentifier identifier);
77 };
78 
79 
80 #endif // GUI_PLAYERMENUBAR_H
Gui::WidgetTemplate
Template for Sayonara Widgets. This template is responsible for holding a reference to the settings.
Definition: WidgetTemplate.h:84
Library
An interface class needed when implementing a library plugin.
Definition: LocalLibraryWatcher.h:32
Library::Container
Definition: LibraryContainer.h:46
Menubar
Definition: GUI_PlayerMenubar.h:35