From 6e1bb58ee8ace739615e42cff02f07ee396edb6e Mon Sep 17 00:00:00 2001 From: archshift Date: Mon, 31 Aug 2015 21:35:33 -0700 Subject: Initial implementation of a game list --- src/citra_qt/game_list.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/citra_qt/game_list.h (limited to 'src/citra_qt/game_list.h') diff --git a/src/citra_qt/game_list.h b/src/citra_qt/game_list.h new file mode 100644 index 000000000..ab09edce3 --- /dev/null +++ b/src/citra_qt/game_list.h @@ -0,0 +1,48 @@ +// Copyright 2015 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include +#include +#include +#include +#include +#include + +class GameListWorker; + + +class GameList : public QWidget { + Q_OBJECT + +public: + enum { + COLUMN_FILE_TYPE, + COLUMN_NAME, + COLUMN_SIZE, + COLUMN_COUNT, // Number of columns + }; + + GameList(QWidget* parent = nullptr); + ~GameList() override; + + void PopulateAsync(const QString& dir_path, bool deep_scan); + +public slots: + void AddEntry(QList entry_items); + +private slots: + void ValidateEntry(const QModelIndex& item); + void DonePopulating(); + +signals: + void GameChosen(QString game_path); + void ShouldCancelWorker(); + +private: + QTreeView* tree_view = nullptr; + QStandardItemModel* item_model = nullptr; + GameListWorker* current_worker = nullptr; +}; -- cgit v1.2.3