Sayonara Player
GUI_PlayerMenubar.h
1 /* GUI_PlayerMenubar.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 
22 
23 #ifndef GUI_PLAYERMENUBAR_H
24 #define GUI_PLAYERMENUBAR_H
25 
26 #include <QMenuBar>
27 #include "GUI/Utils/Widgets/WidgetTemplate.h"
28 #include "GUI/Utils/Shortcuts/ShortcutWidget.h"
29 #include "Utils/Pimpl.h"
30 
31 class QMenu;
32 class QAction;
33 
34 class Menubar :
35  public Gui::WidgetTemplate<QMenuBar>,
36  public ShortcutWidget
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_library_action(QMenu* new_library_menu, const QString& name);
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 awa_translators_finished();
77  void shortcut_changed(ShortcutIdentifier identifier);
78 
79 };
80 
81 
82 #endif // GUI_PLAYERMENUBAR_H
Template for Sayonara Widgets. This template is responsible for holding a reference to the settings.
Definition: WidgetTemplate.h:47
Definition: GUI_PlayerMenubar.h:34
Interface that should be implemented when using configurable shortcuts.
Definition: ShortcutWidget.h:32