|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
Nature picker model (select-model variant; see SpeciesSelectModel). More...
#include <natureselectmodel.h>
Public Types | |
| enum | ItemRoles { IndRole = Qt::UserRole + 1 , NameRole } |
| Picker columns (mapped in roleNames()). More... | |
Public Member Functions | |
| NatureSelectModel () | |
| 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 | natureToListIndex (int ind) |
Row index for nature ind. | |
Public Attributes | |
| QVector< NatureSelectEntry * > | natureListCache |
| Cached picker rows. | |
Nature picker model (select-model variant; see SpeciesSelectModel).
Standard picker: cached rows + natureToListIndex() for combo highlighting. Exposed as brg.natureSelectModel.
Definition at line 36 of file natureselectmodel.h.
Picker columns (mapped in roleNames()).
| Enumerator | |
|---|---|
| IndRole | |
| NameRole | |
Definition at line 42 of file natureselectmodel.h.
| NatureSelectModel::NatureSelectModel | ( | ) |
Definition at line 32 of file natureselectmodel.cpp.
References natureListCache.
|
overridevirtual |
Row+role value.
Definition at line 93 of file natureselectmodel.cpp.
References IndRole, NameRole, and natureListCache.
| int NatureSelectModel::natureToListIndex | ( | int | ind | ) |
Row index for nature ind.
Definition at line 128 of file natureselectmodel.cpp.
References natureListCache.
|
overridevirtual |
Role -> QML name.
Definition at line 118 of file natureselectmodel.cpp.
|
overridevirtual |
| QVector<NatureSelectEntry*> NatureSelectModel::natureListCache |
Cached picker rows.
Definition at line 53 of file natureselectmodel.h.
Referenced by data(), NatureSelectModel(), natureToListIndex(), and rowCount().