13 #ifndef __SCORELISTMODEL_H__ 14 #define __SCORELISTMODEL_H__ 36 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
37 QVariant
data(
const QModelIndex& index,
int role)
const override;
61 constexpr
static ScoreVersionIndex INDEX_CURRENT = -1;
62 constexpr
static ScoreVersionIndex INDEX_LAST_SAVED = -2;
63 constexpr
static ScoreVersionIndex INDEX_SESSION_START = -3;
65 ScoreVersion(
Score* score,
const QString& name, ScoreVersionIndex index,
const QFileInfo& fileInfo,
bool recent)
66 : score(score), name(name), index(index), fileInfo(fileInfo), recent(recent) {}
68 : score(score), name(name), index(index), recent(recent) {}
84 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
85 QVariant
data(
const QModelIndex& index,
int role)
const override;
89 int getPosition(ScoreVersionIndex index)
const;
void tabMoved(int from, int to)
Definition: scorelistmodel.cpp:114
MasterScore * _score
Definition: scorelistmodel.h:78
ScoreVersion(Score *score, const QString &name, ScoreVersionIndex index, bool recent)
Definition: scorelistmodel.h:67
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Definition: scorelistmodel.cpp:45
QFileInfo fileInfo
Definition: scorelistmodel.h:58
ScoreTab * _tab
Definition: scorelistmodel.h:31
int ScoreVersionIndex
Definition: scorelistmodel.h:52
Definition: scoretab.h:47
Definition: scorelistmodel.h:54
Score * score
Definition: scorelistmodel.h:55
const MasterScore * score() const
Definition: scorelistmodel.h:87
Definition: scorelistmodel.h:75
ScoreVersionIndex index
Definition: scorelistmodel.h:57
QVector< int > _usedRoles
Definition: scorelistmodel.h:29
bool recent
Definition: scorelistmodel.h:59
ScoreListModel(const QList< MasterScore *> *scoreList, ScoreTab *tab, QObject *parent=nullptr)
Definition: scorelistmodel.cpp:29
std::vector< ScoreVersion > _versions
Definition: scorelistmodel.h:79
Definition: scorelistmodel.h:26
Definition: aeolus.cpp:26
const ScoreVersion & getScoreVersion(int idx) const
Definition: scorelistmodel.h:88
ScoreVersion(Score *score, const QString &name, ScoreVersionIndex index, const QFileInfo &fileInfo, bool recent)
Definition: scorelistmodel.h:65
void tabInserted(int idx)
Definition: scorelistmodel.cpp:86
void tabRemoved(int idx)
Definition: scorelistmodel.cpp:95
QVariant data(const QModelIndex &index, int role) const override
Definition: scorelistmodel.cpp:56
Score * getScore(int idx) const
Definition: scorelistmodel.cpp:75
QString name
Definition: scorelistmodel.h:56
const QList< MasterScore * > * _scoreList
Definition: scorelistmodel.h:30
void tabRenamed(int idx)
Definition: scorelistmodel.cpp:104