|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
Status-condition picker model (select-model variant; see SpeciesSelectModel). More...
#include <statusselectmodel.h>
Public Types | |
| enum | ItemRoles { IndRole = Qt::UserRole + 1 , NameRole } |
| Picker columns (mapped in roleNames()). More... | |
Public Member Functions | |
| StatusSelectModel () | |
| virtual int | rowCount (const QModelIndex &parent) const override |
| Row count. | |
| virtual QVariant | data (const QModelIndex &index, int role) const override |
| Row+role value. | |
| virtual QHash< int, QByteArray > | roleNames () const override |
| Role -> QML name. | |
| int | statusToListIndex (int ind) |
Row index for status ind. | |
Public Attributes | |
| QVector< StatusSelectEntry * > | statusListCache |
| Cached picker rows. | |
Status-condition picker model (select-model variant; see SpeciesSelectModel).
Standard picker: cached rows + statusToListIndex() for combo highlighting. Exposed as brg.statusSelectModel.
Definition at line 36 of file statusselectmodel.h.
Picker columns (mapped in roleNames()).
| Enumerator | |
|---|---|
| IndRole | |
| NameRole | |
Definition at line 42 of file statusselectmodel.h.
| StatusSelectModel::StatusSelectModel | ( | ) |
Definition at line 29 of file statusselectmodel.cpp.
References statusListCache.
|
overridevirtual |
Row+role value.
Definition at line 55 of file statusselectmodel.cpp.
References IndRole, NameRole, and statusListCache.
|
overridevirtual |
Role -> QML name.
Definition at line 80 of file statusselectmodel.cpp.
|
overridevirtual |
| int StatusSelectModel::statusToListIndex | ( | int | ind | ) |
Row index for status ind.
Definition at line 90 of file statusselectmodel.cpp.
References statusListCache.
| QVector<StatusSelectEntry*> StatusSelectModel::statusListCache |
Cached picker rows.
Definition at line 53 of file statusselectmodel.h.
Referenced by data(), rowCount(), StatusSelectModel(), and statusToListIndex().