Sayonara Player
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Gui
Player
GUI_Player.h
1
/* GUI_Simpleplayer.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_SIMPLEPLAYER_H
22
#define GUI_SIMPLEPLAYER_H
23
24
#include "Gui/Utils/GuiClass.h"
25
#include "Gui/Utils/Widgets/Widget.h"
26
#include "Utils/Message/MessageReceiverInterface.h"
27
#include "Utils/Pimpl.h"
28
29
#include <QSystemTrayIcon>
30
31
class
GUI_TrayIcon
;
32
class
GUI_Logger
;
33
class
QAction;
34
class
QMessageBox;
35
36
UI_FWD(
GUI_Player
)
37
38
class
CoverDataProvider
;
39
class
DynamicPlaybackChecker
;
40
namespace
Library
41
{
42
class
InfoAccessor
;
43
class
PluginHandler
;
44
}
45
class
Shutdown
;
46
namespace
PlayerPlugin
47
{
48
class
Base
;
49
}
50
51
namespace
Playlist
52
{
53
class
Handler;
54
}
55
56
class
PlayManager
;
57
class
NotificationHandler
;
58
59
class
GUI_Player :
60
public
Gui::MainWindow
,
61
public
MessageReceiverInterface
62
{
63
Q_OBJECT
64
PIMPL(GUI_Player)
65
UI_CLASS_SHARED_PTR(GUI_Player)
66
67
public
:
68
GUI_Player(
PlayManager
* playManager,
Playlist::Handler
* playlistHandler,
69
Library::PluginHandler
* libraryPluginHandler,
CoverDataProvider
* coverProvider,
70
Shutdown
* shutdown,
NotificationHandler
* notificationHandler,
71
DynamicPlaybackChecker
* dynamicPlaybackChecker,
Library::InfoAccessor
* libraryAccessor,
72
QWidget* parent);
73
~GUI_Player()
override
;
74
75
void
registerPreferenceDialog(QAction* dialog_action);
76
void
shutdown()
override
;
77
78
protected
:
79
void
closeEvent(QCloseEvent* e)
override
;
80
void
resizeEvent(QResizeEvent* e)
override
;
81
bool
event(QEvent* e)
override
;
82
83
// NOLINTNEXTLINE(google-default-arguments)
84
Message::Answer
errorReceived(
const
QString& error,
const
QString& senderName = QString())
override
;
85
// NOLINTNEXTLINE(google-default-arguments)
86
Message::Answer
warningReceived(
const
QString& error,
const
QString& senderName = QString())
override
;
87
// NOLINTNEXTLINE(google-default-arguments)
88
Message::Answer
infoReceived(
const
QString& error,
const
QString& senderName = QString())
override
;
89
// NOLINTNEXTLINE(google-default-arguments)
90
Message::Answer
questionReceived(
const
QString& info,
const
QString& senderName = QString(),
91
Message::QuestionType
type = Message::QuestionType::YesNo)
override
;
92
93
void
languageChanged()
override
;
94
95
private
slots:
96
void
playError(
const
QString& message);
97
98
void
splitterMainMoved(
int
pos,
int
idx);
99
void
splitterControlsMoved(
int
pos,
int
idx);
100
101
void
currentLibraryChanged();
102
103
void
minimize();
104
105
void
trayIconActivated(QSystemTrayIcon::ActivationReason reason);
106
107
void
pluginAdded(
PlayerPlugin::Base
* plugin);
108
void
pluginActionTriggered(
bool
b);
109
110
private
:
// NOLINT(readability-redundant-access-specifiers)
111
void
initLanguage();
112
void
initTrayActions();
113
void
initConnections();
114
void
initLibrary();
115
void
initControlSplitter();
116
void
initMainSplitter();
117
void
initFontChangeFix();
118
void
initGeometry();
119
120
void
checkControlSplitter();
121
122
void
fullscreenChanged();
123
void
initControls();
124
void
controlstyleChanged();
125
126
void
showLibraryChanged();
127
void
addCurrentLibrary();
128
void
removeCurrentLibrary();
129
130
};
131
132
#endif
// GUI_SIMPLEPLAYER_H
CoverDataProvider
Definition
CoverDataProvider.h:28
DynamicPlaybackChecker
Definition
DynamicPlaybackChecker.h:29
GUI_Logger
Definition
GUI_Logger.h:53
GUI_Player
Definition
GUI_Player.h:62
GUI_TrayIcon
Definition
GUI_TrayIcon.h:68
Gui::MainWindow
The SayonaraMainWindow class.
Definition
Widget.h:65
Library::InfoAccessor
Definition
LibraryManager.h:36
Library::PluginHandler
Definition
LibraryPluginHandler.h:40
NotificationHandler
Definition
NotificationHandler.h:29
PlayManager
Definition
PlayManager.h:34
PlayerPlugin::Base
Definition
PlayerPluginBase.h:40
Playlist::Handler
Definition
PlaylistHandler.h:57
Shutdown
Definition
Shutdown.h:33
Message::Answer
Answer
The GlobalMessage class.
Definition
Message.h:36
Message::QuestionType
QuestionType
The GlobalMessage class.
Definition
Message.h:50
PlayerPlugin
Interface for PlayerPlugin classes. get_name() and language_changed() must be overwritten.
Definition
GUI_Player.h:47
Generated on
for Sayonara Player by
1.17.0