Sayonara Player
Loading...
Searching...
No Matches
src
Utils
MetaData
Artist.h
1
/* Artist.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_ARTIST_H_
22
#define SAYONARA_ARTIST_H_
23
24
#include "Utils/MetaData/LibraryItem.h"
25
#include "Utils/Library/Sortorder.h"
26
#include "Utils/Pimpl.h"
27
28
#include <QStringList>
29
#include <QMetaType>
30
#include <deque>
31
32
class
Artist
:
33
public
LibraryItem
34
{
35
PIMPL(
Artist
)
36
37
public
:
38
Artist
();
39
Artist
(
const
Artist
& other);
40
Artist
(
Artist
&& other)
noexcept
;
41
42
Artist
& operator=(
const
Artist
& other);
43
Artist
& operator=(
Artist
&& other)
noexcept
;
44
45
~Artist
()
override
;
46
47
[[nodiscard]] QString name()
const
;
48
void
setName(
const
QString& name);
49
50
[[nodiscard]] uint16_t songcount()
const
;
51
void
setSongcount(
const
uint16_t& value);
52
53
[[nodiscard]] ArtistId id()
const
;
54
void
setId(
const
ArtistId& value);
55
};
56
57
Q_DECLARE_METATYPE(
Artist
)
58
59
class
ArtistList
:
60
public std::deque<
Artist
>
61
{
62
public
:
63
[[nodiscard]]
int
count()
const
;
64
65
ArtistList
& operator<<(
const
Artist
& artist);
66
ArtistList
& appendUnique(
const
ArtistList
& other);
67
68
static
QString majorArtist(
const
QStringList& artists);
69
};
70
71
#endif
ArtistList
Definition
Artist.h:61
Artist
Definition
Artist.h:34
LibraryItem
The LibraryItem class.
Definition
LibraryItem.h:64
Generated on Mon May 27 2024 00:00:00 for Sayonara Player by
1.11.0