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.
This commit is contained in:
parent
87872aa369
commit
11da018ea6
3 changed files with 54 additions and 39 deletions
|
@ -15,6 +15,7 @@
|
|||
#include <QRunnable>
|
||||
#include <QStandardItem>
|
||||
#include <QString>
|
||||
#include <QWidget>
|
||||
#include "citra_qt/ui_settings.h"
|
||||
#include "citra_qt/util/util.h"
|
||||
#include "common/file_util.h"
|
||||
|
@ -408,3 +409,45 @@ private:
|
|||
void AddFstEntriesToGameList(const std::string& dir_path, unsigned int recursion,
|
||||
GameListDir* parent_dir);
|
||||
};
|
||||
|
||||
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();
|
||||
|
||||
int visible;
|
||||
int total;
|
||||
|
||||
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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue