diff options
Diffstat (limited to 'src/createinstancedialog.h')
| -rw-r--r-- | src/createinstancedialog.h | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/src/createinstancedialog.h b/src/createinstancedialog.h index 8e8fe517..fe3c5646 100644 --- a/src/createinstancedialog.h +++ b/src/createinstancedialog.h @@ -3,9 +3,18 @@ #include <QDialog> -namespace MOBase { class IPluginGame; } -namespace Ui { class CreateInstanceDialog; }; -namespace cid { class Page; } +namespace MOBase +{ +class IPluginGame; +} +namespace Ui +{ +class CreateInstanceDialog; +}; +namespace cid +{ +class Page; +} class PluginContainer; class Settings; @@ -71,9 +80,8 @@ public: Paths paths; }; - - CreateInstanceDialog( - const PluginContainer& pc, Settings* s, QWidget *parent = nullptr); + CreateInstanceDialog(const PluginContainer& pc, Settings* s, + QWidget* parent = nullptr); ~CreateInstanceDialog(); @@ -87,7 +95,7 @@ public: void setSinglePage(const QString& instanceName) { for (auto&& p : m_pages) { - if (auto* tp=dynamic_cast<Page*>(p.get())) { + if (auto* tp = dynamic_cast<Page*>(p.get())) { tp->setSkip(false); } else { p->setSkip(true); @@ -103,7 +111,7 @@ public: Page* getPage() { for (auto&& p : m_pages) { - if (auto* tp=dynamic_cast<Page*>(p.get())) { + if (auto* tp = dynamic_cast<Page*>(p.get())) { return tp; } } @@ -111,11 +119,10 @@ public: return nullptr; } - // moves to the next page; if `allowFinish` is true, calls finish() if // currently on the last page // - void next(bool allowFinish=true); + void next(bool allowFinish = true); // moves to the previous page, if any // @@ -144,7 +151,6 @@ public: // void finish(); - // updates the navigation buttons based on the current page // void updateNavigation(); @@ -176,10 +182,9 @@ private: bool m_switching; bool m_singlePage; - // creates a shortcut for the given sequence // - void addShortcut(QKeySequence seq, std::function<void ()> f); + void addShortcut(QKeySequence seq, std::function<void()> f); // creates a shortcut for the given sequence and executes the action when // activated @@ -219,4 +224,4 @@ private: } }; -#endif // MODORGANIZER_CREATEINSTANCEDIALOG_INCLUDED +#endif // MODORGANIZER_CREATEINSTANCEDIALOG_INCLUDED |
