Sayonara Player
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Gui
InfoDialog
InfoDialogContainer.h
1
/* InfoDialogContainer.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 SAYONARA_PLAYER_INFO_DIALOG_CONTAINER_H
22
#define SAYONARA_PLAYER_INFO_DIALOG_CONTAINER_H
23
24
#include "Utils/Pimpl.h"
25
#include <QObject>
26
27
enum class
OpenMode :
28
uint8_t
29
{
30
Info,
31
Edit,
32
Lyrics,
33
Cover
34
};
35
36
class
GUI_InfoDialog
;
37
38
class
InfoDialogContainer
;
39
class
InfoDialogContainerAsyncHandler :
40
public
QObject
41
{
42
Q_OBJECT
43
PIMPL(InfoDialogContainerAsyncHandler)
44
45
friend
class
InfoDialogContainer;
46
47
public
:
48
~InfoDialogContainerAsyncHandler()
override
;
49
50
private
:
51
InfoDialogContainerAsyncHandler(InfoDialogContainer* container, OpenMode openMode);
52
53
bool
start();
54
[[nodiscard]]
bool
isRunning()
const
;
55
56
private
slots:
57
void
scannerFinished();
58
};
59
60
class
InfoDialogContainer
61
{
62
PIMPL(InfoDialogContainer)
63
64
friend
class
InfoDialogContainerAsyncHandler;
65
66
friend
class
GUI_InfoDialog;
67
68
public
:
69
InfoDialogContainer();
70
virtual
~InfoDialogContainer();
71
72
protected
:
73
enum
EditTab
74
{
75
TabText,
76
TabCover,
77
TabTagsFromPath
78
};
79
80
[[nodiscard]]
virtual
MD::Interpretation metadataInterpretation()
const
= 0;
81
82
[[nodiscard]]
virtual
MetaDataList
infoDialogData()
const
= 0;
83
84
[[nodiscard]]
virtual
QWidget* getParentWidget() = 0;
85
86
[[nodiscard]]
virtual
bool
hasMetadata()
const
;
87
88
[[nodiscard]]
virtual
QStringList pathlist()
const
;
89
90
virtual
void
showInfo();
91
92
virtual
void
showLyrics();
93
94
virtual
void
showEdit();
95
96
virtual
void
showCoverEdit();
97
98
private
:
99
bool
initDialog(OpenMode openMode);
100
101
void
go(OpenMode openMode,
const
MetaDataList
& tracks);
102
};
103
104
#endif
// SAYONARA_PLAYER_INFO_DIALOG_CONTAINER_H
GUI_InfoDialog
Definition
GUI_InfoDialog.h:40
InfoDialogContainer
Definition
InfoDialogContainer.h:61
MetaDataList
Definition
MetaDataList.h:34
Generated on
for Sayonara Player by
1.17.0