summaryrefslogtreecommitdiff
path: root/src/createinstancedialogpages.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2020-07-29 22:14:43 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2020-11-03 11:39:06 -0500
commit58479e4b00d399e3025558104e50c75ef609dda0 (patch)
treeeca6526d52b32da32a1fbebe412702713aca5d79 /src/createinstancedialogpages.h
parenta97638249de0a9a4c17dc28805c35df489a64e26 (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.h9
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);