|
Pokered Save Editor 2
Pokemon Red & Blue save file editor - Qt 6 C++/QML
|
Recent-files list model for the start screen. More...
#include <recentfilesmodel.h>
Public Types | |
| enum | RecentFileRoles { PathRole = Qt::UserRole + 1 , EnabledRole , FileIndexRole } |
| Columns (mapped in roleNames()). More... | |
Public Member Functions | |
| RecentFilesModel (FileManagement *file) | |
| 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. | |
Recent-files list model for the start screen.
Wraps FileManagement's recent-files list (see CreditsModel for the convention), shortening each path for display and tracking enabled/index per row. Exposed as brg.recentFilesModel.
Definition at line 29 of file recentfilesmodel.h.
Columns (mapped in roleNames()).
| Enumerator | |
|---|---|
| PathRole | |
| EnabledRole | |
| FileIndexRole | |
Definition at line 35 of file recentfilesmodel.h.
| RecentFilesModel::RecentFilesModel | ( | FileManagement * | file | ) |
| file | the file controller. |
Definition at line 29 of file recentfilesmodel.cpp.
References FileManagement::recentFilesChanged().
|
overridevirtual |
Row+role value.
Definition at line 43 of file recentfilesmodel.cpp.
References EnabledRole, FileIndexRole, and PathRole.
|
overridevirtual |
Role -> QML name.
Definition at line 74 of file recentfilesmodel.cpp.
References EnabledRole, FileIndexRole, and PathRole.
|
overridevirtual |
Row count.
Definition at line 34 of file recentfilesmodel.cpp.