Sayonara Player
GUI_PlayerMenubar.h
1/* GUI_PlayerMenubar.h */
2
3/* Copyright (C) 2011-2020 Michael Lugmair (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
30namespace Library
31{
32 class AbstractContainer;
33}
34
35namespace PlayerPlugin
36{
37 class Base;
38}
39
40class PlaylistCreator;
41
42class Menubar :
43 public Gui::WidgetTemplate<QMenuBar>
44{
45 Q_OBJECT
46 PIMPL(Menubar)
47
48 signals:
49 void sigCloseClicked();
50 void sigMinimizeClicked();
51 void sigLoggerClicked();
52
53 public:
54 explicit Menubar(PlaylistCreator* playlistCreator, QWidget* parent = nullptr);
55 ~Menubar() override;
56
57 void insertPreferenceAction(QAction* action);
58
59 void showLibraryAction(bool visible);
60 void setShowLibraryActionEnabled(bool b);
61 void showLibraryMenu(bool b);
62
63 private:
64 void initDonateLink();
65 void initConnections();
66 void styleChanged();
67 void initLanguages();
68 void initSkin();
69
70 QAction* changeCurrentLibrary(Library::AbstractContainer* library);
71
72 private slots: // NOLINT(readability-redundant-access-specifiers)
73 void openDirClicked();
74 void openFilesClicked();
75 void shutdownClicked();
76 void closeClicked();
77 void minimizeClicked();
78 void skinToggled(bool b);
79 void bigCoverToggled(bool b);
80 void showLibraryToggled(bool b);
81 void showFullscreenToggled(bool b);
82 void helpClicked();
83 void aboutClicked();
84 void shortcutChanged(ShortcutIdentifier identifier);
85 void pluginAdded(PlayerPlugin::Base* plugin);
86
87 protected:
88 void languageChanged() override;
89 void skinChanged() override;
90};
91
92#endif // GUI_PLAYERMENUBAR_H
Template for Sayonara Widgets. This template is responsible for holding a reference to the settings.
Definition: WidgetTemplate.h:87
This container is only used internally to avoid Ui dependencies in the Components....
Definition: AbstractLibraryContainer.h:20
Definition: GUI_PlayerMenubar.h:44
Definition: PlayerPluginBase.h:40
Definition: PlaylistInterface.h:56
An interface class needed when implementing a library plugin.
Definition: LocalLibraryWatcher.h:31
Interface for PlayerPlugin classes. get_name() and language_changed() must be overwritten.
Definition: GUI_Player.h:43