Sayonara Player
Loading...
Searching...
No Matches
src
Gui
History
HistoryEntryModel.h
1
/* HistoryEntryModel.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 HISTORYENTRYMODEL_H
22
#define HISTORYENTRYMODEL_H
23
24
#include <QObject>
25
#include <QAbstractTableModel>
26
27
#include "Utils/Pimpl.h"
28
#include "Utils/Session/SessionUtils.h"
29
30
namespace
Session
31
{
32
class
Manager;
33
}
34
35
class
MetaDataList
;
36
37
class
HistoryEntryModel
:
38
public
QAbstractTableModel
39
{
40
Q_OBJECT
41
PIMPL(
HistoryEntryModel
)
42
43
signals:
44
void
sigRowsAdded();
45
46
public
:
47
HistoryEntryModel
(
Session::Manager
* sessionManager, Session::Timecode timecode, QObject* parent =
nullptr
);
48
~HistoryEntryModel
()
override
;
49
50
[[nodiscard]] QVariant headerData(
int
section, Qt::Orientation orientation,
int
role)
const override
;
51
[[nodiscard]]
int
rowCount(
const
QModelIndex& parent)
const override
;
52
[[nodiscard]]
int
columnCount(
const
QModelIndex& parent)
const override
;
53
[[nodiscard]] QVariant data(
const
QModelIndex& index,
int
role)
const override
;
54
[[nodiscard]] Qt::ItemFlags flags(
const
QModelIndex& index)
const override
;
55
[[nodiscard]] QMimeData* mimeData(
const
QModelIndexList& indexes)
const override
;
56
[[nodiscard]]
MetaDataList
tracksByIndexes(
const
QModelIndexList& indexes)
const
;
57
58
private
:
59
[[nodiscard]]
const
Session::Entry
& entry(
int
row)
const
;
60
61
private
slots:
// NOLINT(readability-redundant-access-specifiers)
62
void
historyChanged(Session::Id
id
);
63
64
protected
:
65
void
languageChanged();
66
};
67
68
#endif
// HISTORYENTRYMODEL_H
HistoryEntryModel
Definition
HistoryEntryModel.h:39
MetaDataList
Definition
MetaDataList.h:34
Session::Manager
Definition
Session.h:37
Session::Entry
Definition
SessionUtils.h:36
Generated on Mon May 6 2024 00:00:00 for Sayonara Player by
1.9.7