diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2022-05-17 11:47:01 +0200 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2023-07-09 17:20:40 +0200 |
| commit | d13f6bb870cdda71257f665367be8ef9fca86255 (patch) | |
| tree | 52e214718478f1e52856572f5aa1a2ac58537f9f /src/createinstancedialog.h | |
| parent | 86bb01ba9eac879d3685c439ac9da0028bc4bc80 (diff) | |
Apply clang-format.
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 |
