RhythmGame 1.4.3
Loading...
Searching...
No Matches
Lr2SelectBarCell.h
Go to the documentation of this file.
1#pragma once
2
3#include <QObject>
4#include <QString>
5#include <QVariant>
6#include <QtQml/qqmlregistration.h>
7
8class Lr2SelectBarCell : public QObject {
9 Q_OBJECT
10 QML_ELEMENT
11 Q_PROPERTY(int row READ row WRITE setRow NOTIFY rowChanged)
12 Q_PROPERTY(QVariant entry READ entry WRITE setEntry NOTIFY entryChanged)
13 Q_PROPERTY(bool valid READ isValid WRITE setValid NOTIFY validChanged)
14 Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
15 Q_PROPERTY(int titleType READ titleType WRITE setTitleType NOTIFY titleTypeChanged)
16 Q_PROPERTY(int bodyType READ bodyType WRITE setBodyType NOTIFY bodyTypeChanged)
17 Q_PROPERTY(int playLevel READ playLevel WRITE setPlayLevel NOTIFY playLevelChanged)
18 Q_PROPERTY(int difficulty READ difficulty WRITE setDifficulty NOTIFY difficultyChanged)
19 Q_PROPERTY(int keymode READ keymode WRITE setKeymode NOTIFY keymodeChanged)
20 Q_PROPERTY(bool ranking READ isRanking WRITE setRanking NOTIFY rankingChanged)
21 Q_PROPERTY(bool chartLike READ isChartLike WRITE setChartLike NOTIFY chartLikeChanged)
22 Q_PROPERTY(bool entryLike READ isEntryLike WRITE setEntryLike NOTIFY entryLikeChanged)
23 Q_PROPERTY(bool folderLike READ isFolderLike WRITE setFolderLike NOTIFY folderLikeChanged)
24 Q_PROPERTY(int lamp READ lamp WRITE setLamp NOTIFY lampChanged)
25 Q_PROPERTY(int rank READ rank WRITE setRank NOTIFY rankChanged)
26 Q_PROPERTY(int labelMask READ labelMask WRITE setLabelMask NOTIFY labelMaskChanged)
27 Q_PROPERTY(QVariantList graphLamps READ graphLamps WRITE setGraphLamps NOTIFY graphLampsChanged)
28 Q_PROPERTY(QVariantList graphRanks READ graphRanks WRITE setGraphRanks NOTIFY graphRanksChanged)
29
30public:
31 explicit Lr2SelectBarCell(QObject* parent = nullptr);
32
33 int row() const;
34 void setRow(int value);
35
36 QVariant entry() const;
37 void setEntry(const QVariant& value);
38
39 bool isValid() const;
40 void setValid(bool value);
41
42 QString text() const;
43 void setText(const QString& value);
44
45 int titleType() const;
46 void setTitleType(int value);
47
48 int bodyType() const;
49 void setBodyType(int value);
50
51 int playLevel() const;
52 void setPlayLevel(int value);
53
54 int difficulty() const;
55 void setDifficulty(int value);
56
57 int keymode() const;
58 void setKeymode(int value);
59
60 bool isRanking() const;
61 void setRanking(bool value);
62
63 bool isChartLike() const;
64 void setChartLike(bool value);
65
66 bool isEntryLike() const;
67 void setEntryLike(bool value);
68
69 bool isFolderLike() const;
70 void setFolderLike(bool value);
71
72 int lamp() const;
73 void setLamp(int value);
74
75 int rank() const;
76 void setRank(int value);
77
78 int labelMask() const;
79 void setLabelMask(int value);
80
81 QVariantList graphLamps() const;
82 void setGraphLamps(const QVariantList& value);
83
84 QVariantList graphRanks() const;
85 void setGraphRanks(const QVariantList& value);
86
87 Q_INVOKABLE int bodyTypeValue() const;
88 Q_INVOKABLE QVariant bodySource(const QVariant& sources, const QVariant& fallback) const;
89 Q_INVOKABLE bool textVisible(int titleType) const;
90 Q_INVOKABLE QString textForTitleType(int titleType) const;
91 Q_INVOKABLE bool numberVisible(int variant) const;
92 Q_INVOKABLE int numberValueForVariant(int variant) const;
93 Q_INVOKABLE int numberValueOrInvisibleForVariant(int variant) const;
94 Q_INVOKABLE bool lampVisibleForKind(int kind) const;
95 Q_INVOKABLE int lampForKind(int kind) const;
96 Q_INVOKABLE bool rankingForKind(int kind) const;
97 Q_INVOKABLE bool rankVisibleForKind(int kind) const;
98 Q_INVOKABLE int rankForKind(int kind) const;
99 Q_INVOKABLE bool overlayVisibleForKind(int kind, int variant) const;
100 qreal graphValueForType(int graphType, int segment) const;
101
102 Q_INVOKABLE void setCore(int row,
103 bool valid,
104 const QString& text,
105 int titleType,
106 int bodyType,
107 int playLevel,
108 int difficulty,
109 int keymode,
110 bool ranking,
111 bool chartLike,
112 bool entryLike,
113 bool folderLike,
114 int lamp,
115 int rank,
116 int labelMask,
117 const QVariantList& graphLamps,
118 const QVariantList& graphRanks);
119
120signals:
140
141private:
142 int m_row = -1;
143 QVariant m_entry;
144 bool m_valid = false;
145 QString m_text;
146 int m_titleType = -1;
147 int m_bodyType = 0;
148 int m_playLevel = 0;
149 int m_difficulty = 0;
150 int m_keymode = 0;
151 bool m_ranking = false;
152 bool m_chartLike = false;
153 bool m_entryLike = false;
154 bool m_folderLike = false;
155 int m_lamp = 0;
156 int m_rank = 0;
157 int m_labelMask = 0;
158 QVariantList m_graphLamps;
159 QVariantList m_graphRanks;
160};
double value
Definition BmsNotesData.cpp:35
Definition Lr2SelectBarCell.h:8
int titleType
Definition Lr2SelectBarCell.h:15
Q_INVOKABLE bool lampVisibleForKind(int kind) const
Definition Lr2SelectBarCell.cpp:201
Q_INVOKABLE QVariant bodySource(const QVariant &sources, const QVariant &fallback) const
Definition Lr2SelectBarCell.cpp:161
void setLamp(int value)
Definition Lr2SelectBarCell.cpp:125
Q_INVOKABLE int bodyTypeValue() const
Definition Lr2SelectBarCell.cpp:159
Q_INVOKABLE bool textVisible(int titleType) const
Definition Lr2SelectBarCell.cpp:169
Q_INVOKABLE int lampForKind(int kind) const
Definition Lr2SelectBarCell.cpp:205
void setEntry(const QVariant &value)
Definition Lr2SelectBarCell.cpp:41
Q_INVOKABLE int rankForKind(int kind) const
Definition Lr2SelectBarCell.cpp:217
bool chartLike
Definition Lr2SelectBarCell.h:21
Q_INVOKABLE void setCore(int row, bool valid, const QString &text, int titleType, int bodyType, int playLevel, int difficulty, int keymode, bool ranking, bool chartLike, bool entryLike, bool folderLike, int lamp, int rank, int labelMask, const QVariantList &graphLamps, const QVariantList &graphRanks)
Definition Lr2SelectBarCell.cpp:245
QVariant entry
Definition Lr2SelectBarCell.h:12
void setGraphRanks(const QVariantList &value)
Definition Lr2SelectBarCell.cpp:153
int difficulty
Definition Lr2SelectBarCell.h:18
void setFolderLike(bool value)
Definition Lr2SelectBarCell.cpp:118
void setText(const QString &value)
Definition Lr2SelectBarCell.cpp:55
bool valid
Definition Lr2SelectBarCell.h:13
Q_INVOKABLE bool overlayVisibleForKind(int kind, int variant) const
Definition Lr2SelectBarCell.cpp:221
void setBodyType(int value)
Definition Lr2SelectBarCell.cpp:69
Q_INVOKABLE bool numberVisible(int variant) const
Definition Lr2SelectBarCell.cpp:177
void setKeymode(int value)
Definition Lr2SelectBarCell.cpp:90
Q_INVOKABLE int numberValueOrInvisibleForVariant(int variant) const
Definition Lr2SelectBarCell.cpp:197
bool isEntryLike() const
Definition Lr2SelectBarCell.cpp:110
void setDifficulty(int value)
Definition Lr2SelectBarCell.cpp:83
int labelMask
Definition Lr2SelectBarCell.h:26
void graphLampsChanged()
bool isValid() const
Definition Lr2SelectBarCell.cpp:47
QString text
Definition Lr2SelectBarCell.h:14
void setTitleType(int value)
Definition Lr2SelectBarCell.cpp:62
void setEntryLike(bool value)
Definition Lr2SelectBarCell.cpp:111
void chartLikeChanged()
bool entryLike
Definition Lr2SelectBarCell.h:22
bool ranking
Definition Lr2SelectBarCell.h:20
bool isRanking() const
Definition Lr2SelectBarCell.cpp:96
int playLevel
Definition Lr2SelectBarCell.h:17
qreal graphValueForType(int graphType, int segment) const
Definition Lr2SelectBarCell.cpp:237
QML_ELEMENTint row
Definition Lr2SelectBarCell.h:11
void setRank(int value)
Definition Lr2SelectBarCell.cpp:132
void labelMaskChanged()
void setChartLike(bool value)
Definition Lr2SelectBarCell.cpp:104
void setValid(bool value)
Definition Lr2SelectBarCell.cpp:48
void setGraphLamps(const QVariantList &value)
Definition Lr2SelectBarCell.cpp:146
Q_INVOKABLE bool rankVisibleForKind(int kind) const
Definition Lr2SelectBarCell.cpp:213
void playLevelChanged()
Q_INVOKABLE QString textForTitleType(int titleType) const
Definition Lr2SelectBarCell.cpp:173
void bodyTypeChanged()
void entryLikeChanged()
bool folderLike
Definition Lr2SelectBarCell.h:23
void setPlayLevel(int value)
Definition Lr2SelectBarCell.cpp:76
int lamp
Definition Lr2SelectBarCell.h:24
QVariantList graphLamps
Definition Lr2SelectBarCell.h:27
void setLabelMask(int value)
Definition Lr2SelectBarCell.cpp:139
Q_INVOKABLE int numberValueForVariant(int variant) const
Definition Lr2SelectBarCell.cpp:193
int bodyType
Definition Lr2SelectBarCell.h:16
void setRow(int value)
Definition Lr2SelectBarCell.cpp:34
void graphRanksChanged()
bool isChartLike() const
Definition Lr2SelectBarCell.cpp:103
void folderLikeChanged()
void setRanking(bool value)
Definition Lr2SelectBarCell.cpp:97
QVariantList graphRanks
Definition Lr2SelectBarCell.h:28
int rank
Definition Lr2SelectBarCell.h:25
void titleTypeChanged()
int keymode
Definition Lr2SelectBarCell.h:19
bool isFolderLike() const
Definition Lr2SelectBarCell.cpp:117
void difficultyChanged()
Q_INVOKABLE bool rankingForKind(int kind) const
Definition Lr2SelectBarCell.cpp:209