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  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 
55 private:
56  void init_connections();
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 show_library_toggled(bool b);
70  void show_fullscreen_toggled(bool b);
71  void help_clicked();
72  void about_clicked();
73  void awa_translators_finished();
74 
75  // ShortcutWidget interface
76 public:
77  QString get_shortcut_text(const QString& shortcut_identifier) const override;
78 };
79 
80 
81 #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:30