Sayonara Player
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Gui
Plugins
Engine
GUI_Spectrum.h
1
/* GUI_Spectrum.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_SPECTRUM_H
22
#define GUI_SPECTRUM_H
23
24
#include "VisualPlugin.h"
25
#include "Utils/Pimpl.h"
26
#include "Interfaces/Engine/AudioDataReceiver.h"
27
#include "Interfaces/AudioDataProvider.h"
28
29
#include <vector>
30
31
UI_FWD(
GUI_Spectrum
)
32
33
class
SpectrumDataProvider
;
34
class
GUI_Spectrum :
35
public
VisualPlugin,
36
public
Engine::SpectrumDataReceiver
37
{
38
Q_OBJECT
39
UI_CLASS(GUI_Spectrum)
40
PIMPL(GUI_Spectrum)
41
42
public
:
43
explicit
GUI_Spectrum(
SpectrumDataProvider
* dataProvider,
PlayManager
* playManager, QWidget* parent =
nullptr
);
44
~GUI_Spectrum()
override
;
45
46
[[nodiscard]] QString
name
()
const override
;
47
[[nodiscard]] QString
displayName
()
const override
;
48
[[nodiscard]]
bool
isActive()
const override
;
49
50
void
setSpectrum(
const
std::vector<float>& spectrum)
override
;
51
52
protected
:
53
void
initUi
()
override
;
54
void
retranslate()
override
;
55
56
[[nodiscard]] QWidget* widget()
override
;
57
[[nodiscard]]
bool
hasSmallButtons()
const override
;
58
void
finalizeInitialization()
override
;
59
void
paint()
override
;
60
61
[[nodiscard]]
ColorStyle
extractStyle(
const
RawColorStyle
& rawColorStyle)
const override
;
62
bool
applyStyle(
const
ColorStyle
& colorStyle)
override
;
63
64
[[nodiscard]]
int
loadStyleIndex()
const override
;
65
void
saveStyleIndex(
int
index)
const override
;
66
67
[[nodiscard]]
bool
isFadeoutCompleted()
const override
;
68
69
void
notifyDataProvider(
bool
isActive)
override
;
70
71
protected
slots:
// NOLINT(*-redundant-access-specifiers)
72
void
doFadeoutStep()
override
;
73
};
74
75
#endif
// GUI_SPECTRUM_H
Engine::SpectrumDataReceiver
The SpectrumReceiver class.
Definition
AudioDataReceiver.h:48
GUI_Spectrum
Definition
GUI_Spectrum.h:37
GUI_Spectrum::initUi
void initUi() override
GUI will be initialized on first show up. Please use this to make Sayonara starting fast.
GUI_Spectrum::displayName
QString displayName() const override
must be overwritten
GUI_Spectrum::name
QString name() const override
must be overwritten
PlayManager
Definition
PlayManager.h:34
SpectrumDataProvider
Definition
AudioDataProvider.h:45
ColorStyle
Definition
VisualStyleTypes.h:37
RawColorStyle
Definition
VisualStyleTypes.h:58
Generated on
for Sayonara Player by
1.17.0