Sayonara Player
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Gui
Library
TableView
AlbumModel.h
1
/* AlbumModel.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
/*
22
* AlbumModel.h
23
*
24
* Created on: Apr 26, 2011
25
* Author: Michael Lugmair (Lucio Carreras)
26
*/
27
28
#ifndef LIBRARYITEMMODELALBUMS_H_
29
#define LIBRARYITEMMODELALBUMS_H_
30
31
#include "Gui/Library/ItemModel.h"
32
#include "Utils/Pimpl.h"
33
34
namespace
Tagging
35
{
36
class
TagReader
;
37
class
TagWriter
;
38
}
39
40
namespace
Library
41
{
42
class
AlbumModel :
43
public
ItemModel
44
{
45
Q_OBJECT
46
PIMPL(AlbumModel)
47
48
public
:
49
AlbumModel(
const
std::shared_ptr<Tagging::TagReader>& tagReader,
50
const
std::shared_ptr<Tagging::TagWriter>& tagWriter,
51
AbstractLibrary
* library, QObject* parent);
52
~AlbumModel()
override
;
53
54
[[nodiscard]] Qt::ItemFlags flags(
const
QModelIndex& index)
const override
;
55
[[nodiscard]]
int
rowCount(
const
QModelIndex& parent)
const override
;
56
[[nodiscard]] QVariant data(
const
QModelIndex& index,
int
role)
const override
;
57
bool
setData(
const
QModelIndex& index,
const
QVariant& value,
int
role = Qt::DisplayRole)
override
;
58
59
[[nodiscard]]
Cover::Location
cover(
const
QModelIndexList& indexes)
const override
;
60
[[nodiscard]] Id mapIndexToId(
int
index)
const override
;
61
62
[[nodiscard]]
const
MetaDataList
& selectedMetadata()
const override
;
63
[[nodiscard]]
int
itemCount()
const override
;
64
[[nodiscard]] QString searchableString(
int
index,
const
QString& prefix)
const override
;
65
[[nodiscard]] QString mergeSuggestion(
int
index)
const override
;
66
67
private
slots:
68
void
albumChanged(
int
index);
69
};
70
}
71
72
#endif
/* LIBRARYITEMMODELALBUMS_H_ */
AbstractLibrary
Definition
AbstractLibrary.h:41
Cover::Location
Definition
CoverLocation.h:39
MetaDataList
Definition
MetaDataList.h:34
Tagging::TagReader
Definition
TagReader.h:34
Tagging::TagWriter
Definition
TagWriter.h:33
Tagging
The GUI_TagEdit class.
Definition
Engine.h:33
Generated on
for Sayonara Player by
1.17.0