diff options
Diffstat (limited to 'src/citra_qt/game_list.h')
| -rw-r--r-- | src/citra_qt/game_list.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/citra_qt/game_list.h b/src/citra_qt/game_list.h new file mode 100644 index 000000000..0950d9622 --- /dev/null +++ b/src/citra_qt/game_list.h | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <QModelIndex> | ||
| 8 | #include <QSettings> | ||
| 9 | #include <QStandardItem> | ||
| 10 | #include <QStandardItemModel> | ||
| 11 | #include <QString> | ||
| 12 | #include <QTreeView> | ||
| 13 | #include <QWidget> | ||
| 14 | |||
| 15 | class GameListWorker; | ||
| 16 | |||
| 17 | |||
| 18 | class GameList : public QWidget { | ||
| 19 | Q_OBJECT | ||
| 20 | |||
| 21 | public: | ||
| 22 | enum { | ||
| 23 | COLUMN_FILE_TYPE, | ||
| 24 | COLUMN_NAME, | ||
| 25 | COLUMN_SIZE, | ||
| 26 | COLUMN_COUNT, // Number of columns | ||
| 27 | }; | ||
| 28 | |||
| 29 | GameList(QWidget* parent = nullptr); | ||
| 30 | ~GameList() override; | ||
| 31 | |||
| 32 | void PopulateAsync(const QString& dir_path, bool deep_scan); | ||
| 33 | |||
| 34 | void SaveInterfaceLayout(QSettings& settings); | ||
| 35 | void LoadInterfaceLayout(QSettings& settings); | ||
| 36 | |||
| 37 | public slots: | ||
| 38 | void AddEntry(QList<QStandardItem*> entry_items); | ||
| 39 | |||
| 40 | private slots: | ||
| 41 | void ValidateEntry(const QModelIndex& item); | ||
| 42 | void DonePopulating(); | ||
| 43 | |||
| 44 | signals: | ||
| 45 | void GameChosen(QString game_path); | ||
| 46 | void ShouldCancelWorker(); | ||
| 47 | |||
| 48 | private: | ||
| 49 | QTreeView* tree_view = nullptr; | ||
| 50 | QStandardItemModel* item_model = nullptr; | ||
| 51 | GameListWorker* current_worker = nullptr; | ||
| 52 | }; | ||