diff options
author | bunnei <bunneidev@gmail.com> | 2018-09-27 17:09:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-27 17:09:11 -0400 |
commit | f7da74d18e977aa94d19e7dc6a19e75df48708e4 (patch) | |
tree | 10092377231b349f48fb0c98ad98ebfe7905ba58 /src/yuzu/game_list.h | |
parent | fc2419e441dbd2270460c8fe7a92e515c0789fa5 (diff) | |
parent | 44228ee3ed5ab70c47f766a597893152027f8153 (diff) |
Merge pull request #1360 from FearlessTobi/port-3979
Port citra-emu/citra#3979 game_list: move SearchField to game_list_p.h and fix untranslated text
Diffstat (limited to 'src/yuzu/game_list.h')
-rw-r--r-- | src/yuzu/game_list.h | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/src/yuzu/game_list.h b/src/yuzu/game_list.h index 3bf51870e..05e115e19 100644 --- a/src/yuzu/game_list.h +++ b/src/yuzu/game_list.h @@ -22,6 +22,7 @@ #include "yuzu/compatibility_list.h" class GameListWorker; +class GameListSearchField; class GMainWindow; namespace FileSys { @@ -46,33 +47,6 @@ public: COLUMN_COUNT, // Number of columns }; - class SearchField : public QWidget { - public: - void setFilterResult(int visible, int total); - void clear(); - void setFocus(); - explicit SearchField(GameList* parent = nullptr); - - private: - class KeyReleaseEater : public QObject { - public: - explicit KeyReleaseEater(GameList* gamelist); - - private: - GameList* gamelist = nullptr; - QString edit_filter_text_old; - - protected: - bool eventFilter(QObject* obj, QEvent* event) override; - }; - QHBoxLayout* layout_filter = nullptr; - QTreeView* tree_view = nullptr; - QLabel* label_filter = nullptr; - QLineEdit* edit_filter = nullptr; - QLabel* label_filter_result = nullptr; - QToolButton* button_filter_close = nullptr; - }; - explicit GameList(std::shared_ptr<FileSys::VfsFilesystem> vfs, GMainWindow* parent = nullptr); ~GameList() override; @@ -110,7 +84,7 @@ private: void RefreshGameDirectory(); std::shared_ptr<FileSys::VfsFilesystem> vfs; - SearchField* search_field; + GameListSearchField* search_field; GMainWindow* main_window = nullptr; QVBoxLayout* layout = nullptr; QTreeView* tree_view = nullptr; @@ -118,6 +92,8 @@ private: GameListWorker* current_worker = nullptr; QFileSystemWatcher* watcher = nullptr; CompatibilityList compatibility_list; + + friend class GameListSearchField; }; Q_DECLARE_METATYPE(GameListOpenTarget); |