Sayonara Player
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Utils
MetaData
Album.h
1
/* Album.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 HEADER_ALBUM_H_
22
#define HEADER_ALBUM_H_
23
24
#include "Utils/MetaData/LibraryItem.h"
25
#include "Utils/Library/Sortorder.h"
26
#include <QMetaType>
27
#include <deque>
28
29
class
QVariant;
30
class
QStringList;
31
class
Album
;
32
33
Q_DECLARE_METATYPE(
Album
)
34
35
class Album :
36
public LibraryItem
37
{
38
PIMPL(Album)
39
40
public
:
41
Album();
42
Album(
const
Album& other);
43
Album(Album&& other)
noexcept
;
44
45
Album& operator=(
const
Album& other);
46
Album& operator=(Album&& other)
noexcept
;
47
bool
operator==(
const
Album& other)
const
=
delete
;
48
49
~Album()
override
;
50
51
[[nodiscard]] AlbumId id()
const
;
52
void
setId(
const
AlbumId&
id
);
53
54
[[nodiscard]] QString name()
const
;
55
void
setName(
const
QString& name);
56
57
[[nodiscard]] QStringList artists()
const
;
58
void
setArtists(
const
QStringList& artists);
59
60
[[nodiscard]] QString albumArtist()
const
;
61
void
setAlbumArtist(
const
QString& albumArtist);
62
63
[[nodiscard]] QStringList pathHint()
const
;
64
void
setPathHint(
const
QStringList& paths);
65
66
[[nodiscard]] Seconds durationSec()
const
;
67
void
setDurationSec(
const
Seconds& sec);
68
69
[[nodiscard]] TrackNum songcount()
const
;
70
void
setSongcount(
const
TrackNum& songs);
71
72
[[nodiscard]] Year year()
const
;
73
void
setYear(
const
Year& year);
74
75
[[nodiscard]] Disc disccount()
const
;
76
77
[[nodiscard]] Rating rating()
const
;
78
void
setRating(
const
Rating& rating);
79
80
[[nodiscard]]
bool
isSampler()
const
;
81
82
[[nodiscard]]
QList<Disc>
discnumbers()
const
;
83
void
setDiscnumbers(
const
QList<Disc>
& discnumbers);
84
85
[[nodiscard]] uint64_t creationDate()
const
;
86
void
setCreationDate(uint64_t date);
87
};
88
89
class
AlbumList
:
90
public
std::deque<Album>
91
{
92
public
:
93
[[nodiscard]]
int
count()
const
;
94
95
AlbumList
& operator<<(
const
Album
& album);
96
97
Album
& operator[](
int
idx);
98
const
Album
& operator[](
int
idx)
const
;
99
100
AlbumList
& appendUnique(
const
AlbumList
& other);
101
};
102
103
#endif
//HEADER_ALBUM_H_
104
105
AlbumList
Definition
Album.h:91
Album
Definition
Album.h:37
QList
Definition
EngineUtils.h:33
Generated on
for Sayonara Player by
1.17.0