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 
22 
23 #ifndef GUI_PLAYERMENUBAR_H
24 #define GUI_PLAYERMENUBAR_H
25 
26 #include "Gui/Utils/Widgets/WidgetTemplate.h"
27 #include "Gui/Utils/Shortcuts/ShortcutWidget.h"
28 #include "Utils/Pimpl.h"
29 
30 #include <QMenuBar>
31 
32 class Menubar :
33  public Gui::WidgetTemplate<QMenuBar>,
34  public ShortcutWidget
35 {
36  Q_OBJECT
37  PIMPL(Menubar)
38 
39 signals:
40  void sig_close_clicked();
41  void sig_minimize_clicked();
42  void sig_logger_clicked();
43 
44 public:
45  explicit Menubar(QWidget* parent=nullptr);
46  ~Menubar();
47 
48  void insert_player_plugin_action(QAction* action);
49  void insert_preference_action(QAction* action);
50  QAction* update_library_action(QMenu* new_library_menu, const QString& name);
51  void show_library_action(bool visible);
52  void set_show_library_action_enabled(bool b);
53 
54 private:
55  void init_connections();
56  void style_changed();
57 
58 protected:
59  void language_changed() override;
60  void skin_changed() override;
61 
62 private slots:
63  void open_dir_clicked();
64  void open_files_clicked();
65  void shutdown_clicked();
66  void close_clicked();
67  void minimize_clicked();
68  void skin_toggled(bool b);
69  void big_cover_toggled(bool b);
70  void show_library_toggled(bool b);
71  void show_fullscreen_toggled(bool b);
72  void help_clicked();
73  void about_clicked();
74  void shortcut_changed(ShortcutIdentifier identifier);
75 };
76 
77 
78 #endif // GUI_PLAYERMENUBAR_H
Template for Sayonara Widgets. This template is responsible for holding a reference to the settings...
Definition: WidgetTemplate.h:76
Definition: GUI_PlayerMenubar.h:32
Interface that should be implemented when using configurable shortcuts.
Definition: ShortcutWidget.h:32