summaryrefslogtreecommitdiff
path: root/src/yuzu/game_list.h
diff options
context:
space:
mode:
authorzhupengfei <zhupengfei321@sina.cn>2018-07-23 18:43:34 +0800
committerfearlessTobi <thm.frey@gmail.com>2018-09-21 18:47:41 +0200
commit44228ee3ed5ab70c47f766a597893152027f8153 (patch)
tree1d530a754f84042b1f5f71a9e6c702bbfdbdde99 /src/yuzu/game_list.h
parent1db1e013e0f8f3383e486d4f47d88d1bdb6e2769 (diff)
game_list: move SearchField to game_list_p.h and fix untranslated text
I have tested and made sure the text is translatable, but this would require a translation update to take effect.
Diffstat (limited to 'src/yuzu/game_list.h')
-rw-r--r--src/yuzu/game_list.h32
1 files changed, 4 insertions, 28 deletions
diff --git a/src/yuzu/game_list.h b/src/yuzu/game_list.h
index 2713e7b54..ba7921bdb 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 {
@@ -43,33 +44,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;
@@ -105,7 +79,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;
@@ -113,6 +87,8 @@ private:
GameListWorker* current_worker = nullptr;
QFileSystemWatcher* watcher = nullptr;
CompatibilityList compatibility_list;
+
+ friend class GameListSearchField;
};
Q_DECLARE_METATYPE(GameListOpenTarget);