summaryrefslogtreecommitdiff
path: root/src/createinstancedialog.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2020-11-08 23:55:17 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2020-11-08 23:55:17 -0500
commit3cc568a852e9b64bb6e0f34f74869965d04f6a0c (patch)
tree16e4c247803ffb84e58e4e06f4e7696364ab822b /src/createinstancedialog.h
parentd7ae42d3775f88d5cd63fa2f8860bd31e18f981e (diff)
keyboard nav for create instance dialog
change the skip intro setting on click instead of on completion ctrl+f in game page
Diffstat (limited to 'src/createinstancedialog.h')
-rw-r--r--src/createinstancedialog.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/createinstancedialog.h b/src/createinstancedialog.h
index d541f45e..8e8fe517 100644
--- a/src/createinstancedialog.h
+++ b/src/createinstancedialog.h
@@ -27,6 +27,11 @@ class CreateInstanceDialog : public QDialog
Q_OBJECT
public:
+ enum class Actions
+ {
+ Find = 1
+ };
+
// instance type
//
enum Types
@@ -107,9 +112,10 @@ public:
}
- // moves to the next page calls finish() if on the last one
+ // moves to the next page; if `allowFinish` is true, calls finish() if
+ // currently on the last page
//
- void next();
+ void next(bool allowFinish=true);
// moves to the previous page, if any
//
@@ -171,6 +177,19 @@ private:
bool m_singlePage;
+ // creates a shortcut for the given sequence
+ //
+ void addShortcut(QKeySequence seq, std::function<void ()> f);
+
+ // creates a shortcut for the given sequence and executes the action when
+ // activated
+ //
+ void addShortcutAction(QKeySequence seq, Actions a);
+
+ // calls action() with the given action on the selected page, if any
+ //
+ void doAction(Actions a);
+
// called from setSinglePage(), does whatever doesn't need the T
//
void setSinglePageImpl(const QString& instanceName);