6#include <QAbstractListModel>
10#include <QtQml/qqmlregistration.h>
54 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
55 QVariant
data(
const QModelIndex&
index,
int role = Qt::DisplayRole)
const override;
56 QHash<int, QByteArray>
roleNames()
const override;
77 QVariantList
cells()
const;
80 Q_INVOKABLE
void scrollBy(
int delta);
99 QVariant sourceData(
const BarRow& row,
int sourceRole)
const;
100 QVariant roleData(
const BarRow& row,
int role)
const;
101 int sourceCount()
const;
102 int normalizedSourceRow(
int row)
const;
103 int sourceRowForVisualRow(
int visualRow)
const;
104 int slotForRow(
int row)
const;
105 void disconnectSourceModel();
106 void connectSourceModel();
108 void emitAllRowsChanged();
109 void ensureCellList(
int count);
110 void setSlotOffsetValue(
int offset);
112 void updateCellAtSlot(
int slot,
const BarRow& row);
113 void updateCellForVisualRow(
int row);
114 void updateCellsForSourceRows(
int first,
int last);
115 void updateAllCells();
116 void disconnectVisualState();
117 void connectVisualState();
118 void syncCurrentIndexFromVisualState();
120 QPointer<Lr2SelectItemModel> m_sourceModel;
121 QPointer<Lr2SelectVisualState> m_visualState;
122 QList<QMetaObject::Connection> m_sourceConnections;
123 QMetaObject::Connection m_visualStateConnection;
124 QList<BarRow> m_rows;
125 QList<QPointer<Lr2SelectBarCell>> m_cellObjects;
126 QVariantList m_cellValues;
127 int m_logicalCount = 0;
128 int m_rowCountLimit = 0;
130 int m_currentIndex = 0;
131 int m_slotOffset = 0;
QByteArray data
Definition Lr2FontCache.cpp:25
int count
Definition Lr2SkinParser.cpp:1067
zip_uint64_t index
Definition SongAssetStore.cpp:436
Definition Lr2SelectBarCell.h:8
Definition Lr2SelectBarModel.h:14
void currentIndexChanged()
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Definition Lr2SelectBarModel.cpp:24
int slotOffset
Definition Lr2SelectBarModel.h:23
Roles
Definition Lr2SelectBarModel.h:27
@ EntryKeyRole
Definition Lr2SelectBarModel.h:31
@ TextRole
Definition Lr2SelectBarModel.h:32
@ RowRole
Definition Lr2SelectBarModel.h:28
@ KeymodeRole
Definition Lr2SelectBarModel.h:37
@ SlotRole
Definition Lr2SelectBarModel.h:29
@ SourceRowRole
Definition Lr2SelectBarModel.h:30
@ RankRole
Definition Lr2SelectBarModel.h:43
@ DifficultyRole
Definition Lr2SelectBarModel.h:36
@ TitleTypeRole
Definition Lr2SelectBarModel.h:33
@ LabelMaskRole
Definition Lr2SelectBarModel.h:44
@ FolderLikeRole
Definition Lr2SelectBarModel.h:40
@ PlayLevelRole
Definition Lr2SelectBarModel.h:35
@ LampRole
Definition Lr2SelectBarModel.h:42
@ GraphRanksRole
Definition Lr2SelectBarModel.h:46
@ ChartLikeRole
Definition Lr2SelectBarModel.h:38
@ EntryLikeRole
Definition Lr2SelectBarModel.h:39
@ BodyTypeRole
Definition Lr2SelectBarModel.h:34
@ RawItemRole
Definition Lr2SelectBarModel.h:47
@ RankingRole
Definition Lr2SelectBarModel.h:41
@ ArenaAvailabilityRole
Definition Lr2SelectBarModel.h:48
@ GraphLampsRole
Definition Lr2SelectBarModel.h:45
void setCurrentIndex(int index)
Definition Lr2SelectBarModel.cpp:123
QHash< int, QByteArray > roleNames() const override
Definition Lr2SelectBarModel.cpp:35
Q_INVOKABLE void scrollBy(int delta)
Definition Lr2SelectBarModel.cpp:184
void rowCountLimitChanged()
void sourceModelChanged()
Q_INVOKABLE void rebuild()
Definition Lr2SelectBarModel.cpp:180
void visualStateChanged()
QML_ELEMENTLr2SelectItemModel * sourceModel
Definition Lr2SelectBarModel.h:17
int rowCountLimit
Definition Lr2SelectBarModel.h:19
int logicalCount
Definition Lr2SelectBarModel.h:18
void logicalCountChanged()
void setVisualState(Lr2SelectVisualState *state)
Definition Lr2SelectBarModel.cpp:161
void setCenterRow(int row)
Definition Lr2SelectBarModel.cpp:110
Lr2SelectVisualState * visualState
Definition Lr2SelectBarModel.h:22
QVariantList cells
Definition Lr2SelectBarModel.h:24
void setSourceModel(Lr2SelectItemModel *model)
Definition Lr2SelectBarModel.cpp:65
void setRowCountLimit(int count)
Definition Lr2SelectBarModel.cpp:96
int centerRow
Definition Lr2SelectBarModel.h:20
void setLogicalCount(int count)
Definition Lr2SelectBarModel.cpp:80
int currentIndex
Definition Lr2SelectBarModel.h:21
Definition Lr2SelectItemModel.h:16
Definition Lr2SelectVisualState.h:6