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