Sayonara Player
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Components
MetaDataInfo
LibraryItemInfo.h
1
/* LibraryItemInfo.h */
2
/*
3
* Copyright (C) 2011-2024 Michael Lugmair
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_LIBRARYITEMINFO_H
22
#define SAYONARA_PLAYER_LIBRARYITEMINFO_H
23
24
#include "Utils/Pimpl.h"
25
#include "Utils/Set.h"
26
#include "Utils/typedefs.h"
27
28
#include <QList>
29
#include <QPair>
30
31
enum class
InfoStrings :
32
uint8_t
33
{
34
TrackCount = 0,
35
AlbumCount,
36
ArtistCount,
37
CreateDate,
38
ModifyDate,
39
Filesize,
40
PlayingTime,
41
Year,
42
Sampler,
43
Bitrate,
44
Genre
,
45
Filetype,
46
Comment
47
};
48
49
class
QString;
50
namespace
Cover
51
{
52
class
Location
;
53
}
54
class
MetaDataList
;
55
class
LibraryItemInfo
56
{
57
PIMPL(LibraryItemInfo)
58
59
public
:
60
using
AdditionalInfo =
QList<QPair<QString, QString>
>;
61
62
explicit
LibraryItemInfo(
const
MetaDataList
& metaDataList);
63
virtual
~LibraryItemInfo();
64
65
[[nodiscard]]
virtual
auto
additionalData()
const
-> AdditionalInfo = 0;
66
[[nodiscard]]
virtual
auto
coverLocation()
const
->
Cover::Location
= 0;
67
[[nodiscard]]
virtual
auto
header()
const
-> QString = 0;
68
[[nodiscard]]
virtual
auto
subheader()
const
-> QString = 0;
69
70
[[nodiscard]] QStringList paths()
const
;
71
[[nodiscard]] AdditionalInfo additionalInfo()
const
;
72
73
[[nodiscard]]
const
Util::Set<QString>
& albums()
const
;
74
75
static
QString convertInfoKeyToString(InfoStrings infoKey);
76
77
protected
:
78
[[nodiscard]]
const
Util::Set<QString>
& artists()
const
;
79
[[nodiscard]]
const
Util::Set<QString>
& albumArtists()
const
;
80
81
[[nodiscard]]
const
Util::Set<AlbumId>
& albumIds()
const
;
82
[[nodiscard]]
const
Util::Set<ArtistId>
& artistIds()
const
;
83
84
[[nodiscard]] QString calcArtistString()
const
;
85
[[nodiscard]] QString calcAlbumString()
const
;
86
};
87
88
#endif
//SAYONARA_PLAYER_LIBRARYITEMINFO_H
Cover::Location
Definition
CoverLocation.h:39
Genre
Definition
Genre.h:31
MetaDataList
Definition
MetaDataList.h:34
QList
Definition
EngineUtils.h:33
Util::Set
A set structure. Inherited from std::set with some useful methods. For integer and String this set is...
Definition
Set.h:37
Generated on
for Sayonara Player by
1.17.0