diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-07-29 22:14:43 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-11-03 11:39:06 -0500 |
| commit | 58479e4b00d399e3025558104e50c75ef609dda0 (patch) | |
| tree | eca6526d52b32da32a1fbebe412702713aca5d79 /src/createinstancedialogpages.h | |
| parent | a97638249de0a9a4c17dc28805c35df489a64e26 (diff) | |
filter for games
replaced the button box with a regular widget with vertical layout
it was doing weird things to buttons with focus when removing and adding buttons on the fly because of filtering
Diffstat (limited to 'src/createinstancedialogpages.h')
| -rw-r--r-- | src/createinstancedialogpages.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/createinstancedialogpages.h b/src/createinstancedialogpages.h index b8366234..f2f4216d 100644 --- a/src/createinstancedialogpages.h +++ b/src/createinstancedialogpages.h @@ -1,10 +1,12 @@ #ifndef MODORGANIZER_CREATEINSTANCEDIALOGPAGES_INCLUDED #define MODORGANIZER_CREATEINSTANCEDIALOGPAGES_INCLUDED +#include "createinstancedialog.h" +#include <filterwidget.h> + #include <QLabel> #include <QLineEdit> #include <QCommandLinkButton> -#include "createinstancedialog.h" namespace MOBase { class IPluginGame; } @@ -107,16 +109,19 @@ private: std::vector<std::unique_ptr<Game>> m_games; Game* m_selection; - + MOBase::FilterWidget m_filter; std::vector<MOBase::IPluginGame*> sortedGamePlugins() const; Game* findGame(MOBase::IPluginGame* game); void createGames(); void updateButton(Game* g); void selectButton(Game* g); + void clearButtons(); + void addButton(QAbstractButton* b); QCommandLinkButton* createCustomButton(); void createGameButton(Game* g); void fillList(); + void onFilter(); Game* checkInstallation(const QString& path, Game* g); MOBase::IPluginGame* findAnotherGame(const QString& path); bool confirmUnknown(const QString& path, MOBase::IPluginGame* game); |
