11#include <QAbstractProxyModel>
12#include <boost/icl/interval_map.hpp>
40 QVariant
hitData = QVariant::fromValue(
nullptr);
56 Q_PROPERTY(
bool pressed READ isPressed NOTIFY pressedChanged)
58 bool holdingLongNote READ isHoldingLongNote NOTIFY holdingLongNoteChanged)
61 QList<
int> timeToPositionIndexMapping;
62 boost::icl::interval_map<
double, std::set<qint64>> lnBodies;
65 bool holdingLongNote =
false;
67 void setHoldingLongNote(
bool holdingLongNote);
72 NoteTypeRole = Qt::UserRole + 1,
83 explicit ColumnState(QList<NoteState> notes, QObject* parent =
nullptr);
84 auto rowCount(
const QModelIndex& parent)
const ->
int override;
85 auto data(
const QModelIndex&
index,
int role)
const -> QVariant
override;
86 auto roleNames() const -> QHash<
int, QByteArray> override;
88 auto isPressed() const ->
bool;
89 auto isHoldingLongNote() const ->
bool;
90 auto getNotes() const -> const QList<
NoteState>& {
return notes; }
91 auto getNotes() -> QList<NoteState>& {
return notes; }
92 auto mapTimeIndexToPositionIndex(int64_t timeIndex)
const -> int;
94 auto getLnBeginBounds(
double position)
const
95 -> std::optional<std::pair<int, int>>;
105 Q_PROPERTY(
Time time MEMBER time)
120 QList<BarLineState> barLines;
124 QObject* parent =
nullptr);
125 auto rowCount(
const QModelIndex& parent)
const ->
int override;
126 auto data(
const QModelIndex&
index,
int role)
const -> QVariant
override;
127 auto getBarlines()
const ->
const QList<BarLineState>&;
141 Q_PROPERTY(
double topPosition READ getTopPosition WRITE setTopPosition
142 NOTIFY topPositionChanged)
146 Q_PROPERTY(
double bottomPosition READ getBottomPosition WRITE
147 setBottomPosition NOTIFY bottomPositionChanged)
148 Q_PROPERTY(
bool pressed READ isPressed NOTIFY pressedChanged)
150 bool holdingLongNote READ isHoldingLongNote NOTIFY holdingLongNoteChanged)
152 double topPosition = 0.0;
153 double bottomPosition = 0.0;
158 bool holdingLongNote = false;
160 void setHoldingLongNote(
bool holdingLongNote);
162 void setRows(
int first,
int end);
167 auto getTopPosition() const ->
double {
return topPosition; }
168 void setTopPosition(
double value);
170 void setBottomPosition(
double value);
171 Q_INVOKABLE
void setVisibleRange(
double bottom,
double top);
176 const QModelIndex& parent = QModelIndex()) const
177 -> QModelIndex override;
178 auto parent(const QModelIndex& child) const -> QModelIndex override;
179 auto rowCount(const QModelIndex& parent) const ->
int override;
180 auto columnCount(const QModelIndex& parent) const ->
int override;
181 auto mapToSource(const QModelIndex& proxyIndex) const
182 -> QModelIndex override;
183 auto mapFromSource(const QModelIndex& sourceIndex) const
184 -> QModelIndex override;
186 void topPositionChanged();
187 void bottomPositionChanged();
188 void pressedChanged();
189 void holdingLongNoteChanged();
203 Q_PROPERTY(
double topPosition READ getTopPosition WRITE setTopPosition
204 NOTIFY topPositionChanged)
208 Q_PROPERTY(
double bottomPosition READ getBottomPosition WRITE
209 setBottomPosition NOTIFY bottomPositionChanged)
211 double topPosition = 0.0;
212 double bottomPosition = 0.0;
218 QObject* parent =
nullptr);
220 auto getTopPosition() const ->
double {
return topPosition; }
221 void setTopPosition(
double value);
223 void setBottomPosition(
double value);
224 Q_INVOKABLE
void setVisibleRange(
double bottom,
double top);
231 auto mapToSource(
const QModelIndex& proxyIndex)
const
232 -> QModelIndex
override;
233 auto mapFromSource(
const QModelIndex& sourceIndex)
const
234 -> QModelIndex
override;
237 const QModelIndex& parent = QModelIndex()) const
238 -> QModelIndex override;
239 auto parent(const QModelIndex& child) const -> QModelIndex override;
240 auto rowCount(const QModelIndex& parent) const ->
int override;
241 auto columnCount(const QModelIndex& parent) const ->
int override;
242 auto
data(const QModelIndex&
index,
int role = Qt::DisplayRole) const
243 -> QVariant override;
252 Q_PROPERTY(QList<Filter*> columnStates READ getColumnFilters CONSTANT)
258 QList<
Filter*> columnFilters;
259 double position = 0.0;
260 std::optional<
double> noteVisiblePositionSpan;
261 std::optional<
double> barLineVisiblePositionSpan;
263 void updateVisibleRanges();
268 QObject* parent =
nullptr);
270 auto getColumnFilters() -> QList<
Filter*>;
274 void setPosition(
double value);
279 Q_INVOKABLE
void setVisiblePositionSpans(
double noteSpan,
bool pressed
Definition BeatorajaReplayImporter.cpp:65
double value
Definition BmsNotesData.cpp:35
int column
Definition BmsReplayData.cpp:41
std::optional< int > noteIndex
Definition BmsReplayData.cpp:40
QByteArray data
Definition Lr2FontCache.cpp:25
zip_uint64_t index
Definition SongAssetStore.cpp:436
Definition NoteState.h:103
The state of the barlines in the chart.
Definition NoteState.h:118
A filter model that only shows the barlines that are in the visible area.
Definition NoteState.h:198
auto getBottomPosition() const -> double
Definition NoteState.h:222
void topPositionChanged()
void bottomPositionChanged()
The state of a single column, including its notes and whether it is currently pressed.
Definition NoteState.h:54
Role
Definition NoteState.h:71
@ BelowBottomRole
Definition NoteState.h:76
@ NoteOtherEndHitRole
Definition NoteState.h:75
@ HeldLongNoteRole
Definition NoteState.h:79
@ NoteHitRole
Definition NoteState.h:74
@ NotePositionRole
Definition NoteState.h:73
@ LongNoteEndPositionRole
Definition NoteState.h:77
@ StaticLongNoteCandidateRole
Definition NoteState.h:80
@ VisibleNoteRole
Definition NoteState.h:78
void holdingLongNoteChanged()
auto getNotes() -> QList< NoteState > &
Definition NoteState.h:91
A filter model that only shows the notes that are in the visible area.
Definition NoteState.h:136
auto getBottomPosition() const -> double
Definition NoteState.h:169
auto isHoldingLongNote() const -> bool
Definition NoteState.h:173
auto isPressed() const -> bool
Definition NoteState.h:172
The state of gameplay columns and barlines.
Definition NoteState.h:250
A very generic event that happened during gameplay.
Definition HitEvent.h:19
Definition NoteState.h:20
Note note
Definition NoteState.h:22
double longNoteEndPosition
Definition NoteState.h:45
QVariant otherEndHitData
Definition NoteState.h:32
bool belowBottom
Definition NoteState.h:36
QVariant hitData
Definition NoteState.h:27
qint64 index
Definition NoteState.h:23
bool hit
Definition NoteState.h:42
bool otherEndHit
Definition NoteState.h:43
Definition BmsNotes.h:119
Classes and functions mostly related to gameplay.
Definition ArenaGameplaySource.h:10