Sayonara Player
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Utils
MetaData
MetaDataList.h
1
/* MetaDataList.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 METADATALIST_H
22
#define METADATALIST_H
23
24
#include "MetaData.h"
25
#include "Utils/Library/Sortorder.h"
26
27
#include <QList>
28
29
#include <deque>
30
#include <functional>
31
32
class
MetaDataList :
33
public
std::deque<MetaData>
34
{
35
using
Parent = std::deque<MetaData>;
36
37
public
:
38
MetaDataList();
39
explicit
MetaDataList(
const
MetaData
& md);
40
41
MetaDataList(
const
MetaDataList&);
42
MetaDataList(MetaDataList&& other)
noexcept
;
43
44
MetaDataList& operator=(
const
MetaDataList& other);
45
MetaDataList& operator=(MetaDataList&& other)
noexcept
;
46
47
~MetaDataList();
48
49
void
removeTracks(
const
IndexSet& rows);
50
void
removeTracks(
int
first,
int
last);
51
void
removeTracks(std::function<
bool
(
const
MetaData
&)>&& attr);
52
53
void
moveTracks(
const
IndexSet& indexes,
int
targetIndex)
noexcept
;
54
void
copyTracks(
const
IndexSet& indexes,
int
targetIndex);
55
void
insertTracks(
const
MetaDataList& tracks,
int
targetIndex);
56
void
appendUnique(
const
MetaDataList& newTrack);
57
58
MetaDataList& operator<<(
const
MetaDataList& tracks);
59
MetaDataList& operator<<(
const
MetaData
& track);
60
MetaDataList& operator<<(MetaDataList&& tracks)
noexcept
;
61
MetaDataList& operator<<(
MetaData
&& track)
noexcept
;
62
63
const
MetaData
& operator[](
int
i)
const
;
64
MetaData
& operator[](
int
i);
65
66
[[nodiscard]]
int
count()
const
;
67
[[nodiscard]]
bool
isEmpty()
const
;
68
};
69
70
namespace
Util
71
{
72
QList<TrackID>
trackIds(
const
MetaDataList
& tracks);
73
QList<UniqueId>
uniqueIds(
const
MetaDataList
& tracks);
74
}
75
76
#endif
// METADATALIST_H
MetaDataList
Definition
MetaDataList.h:34
MetaData
Definition
MetaData.h:43
QList
Definition
EngineUtils.h:33
Util
Helper functions.
Definition
MetaTypeRegistry.h:25
Generated on
for Sayonara Player by
1.17.0