summaryrefslogtreecommitdiffstats
path: root/src/yuzu/game_list_p.h
diff options
context:
space:
mode:
authorzhupengfei <zhupengfei321@sina.cn>2018-07-23 12:43:34 +0200
committerfearlessTobi <thm.frey@gmail.com>2018-09-21 18:47:41 +0200
commit44228ee3ed5ab70c47f766a597893152027f8153 (patch)
tree1d530a754f84042b1f5f71a9e6c702bbfdbdde99 /src/yuzu/game_list_p.h
parentAdded support for uncompressed NSOs (#1374) (diff)
downloadyuzu-44228ee3ed5ab70c47f766a597893152027f8153.tar
yuzu-44228ee3ed5ab70c47f766a597893152027f8153.tar.gz
yuzu-44228ee3ed5ab70c47f766a597893152027f8153.tar.bz2
yuzu-44228ee3ed5ab70c47f766a597893152027f8153.tar.lz
yuzu-44228ee3ed5ab70c47f766a597893152027f8153.tar.xz
yuzu-44228ee3ed5ab70c47f766a597893152027f8153.tar.zst
yuzu-44228ee3ed5ab70c47f766a597893152027f8153.zip
Diffstat (limited to '')
-rw-r--r--src/yuzu/game_list_p.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/yuzu/game_list_p.h b/src/yuzu/game_list_p.h
index b6272d536..7c0c47346 100644
--- a/src/yuzu/game_list_p.h
+++ b/src/yuzu/game_list_p.h
@@ -16,6 +16,7 @@
#include <QObject>
#include <QStandardItem>
#include <QString>
+#include <QWidget>
#include "common/common_types.h"
#include "common/logging/log.h"
@@ -176,3 +177,42 @@ public:
return data(SizeRole).toULongLong() < other.data(SizeRole).toULongLong();
}
};
+
+class GameList;
+class QHBoxLayout;
+class QTreeView;
+class QLabel;
+class QLineEdit;
+class QToolButton;
+
+class GameListSearchField : public QWidget {
+ Q_OBJECT
+
+public:
+ explicit GameListSearchField(GameList* parent = nullptr);
+
+ void setFilterResult(int visible, int total);
+
+ void clear();
+ void setFocus();
+
+private:
+ class KeyReleaseEater : public QObject {
+ public:
+ explicit KeyReleaseEater(GameList* gamelist);
+
+ private:
+ GameList* gamelist = nullptr;
+ QString edit_filter_text_old;
+
+ protected:
+ // EventFilter in order to process systemkeys while editing the searchfield
+ 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;
+};