summaryrefslogtreecommitdiff
path: root/src/createinstancedialogpages.h
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2022-05-17 11:47:01 +0200
committerMikaël Capelle <capelle.mikael@gmail.com>2023-07-09 17:20:40 +0200
commitd13f6bb870cdda71257f665367be8ef9fca86255 (patch)
tree52e214718478f1e52856572f5aa1a2ac58537f9f /src/createinstancedialogpages.h
parent86bb01ba9eac879d3685c439ac9da0028bc4bc80 (diff)
Apply clang-format.
Diffstat (limited to 'src/createinstancedialogpages.h')
-rw-r--r--src/createinstancedialogpages.h47
1 files changed, 14 insertions, 33 deletions
diff --git a/src/createinstancedialogpages.h b/src/createinstancedialogpages.h
index 7237bfb2..d9751a52 100644
--- a/src/createinstancedialogpages.h
+++ b/src/createinstancedialogpages.h
@@ -4,14 +4,16 @@
#include "createinstancedialog.h"
#include <filterwidget.h>
+#include <QCommandLinkButton>
#include <QLabel>
#include <QLineEdit>
-#include <QCommandLinkButton>
-namespace MOBase { class IPluginGame; }
+namespace MOBase
+{
+class IPluginGame;
+}
class NexusConnectionUI;
-
namespace cid
{
@@ -19,7 +21,6 @@ namespace cid
//
QString makeDefaultPath(const std::wstring& dir);
-
// remembers the original text of the given label and, if it contains a %1,
// sets it in setText()
//
@@ -42,7 +43,6 @@ private:
QString m_original;
};
-
// one page in the wizard
//
// each page can implement one or more selected*() below; those are called
@@ -81,13 +81,11 @@ public:
//
void next();
-
// called from the dialog when an action is requested on the current page;
// returns true when handled
//
virtual bool action(CreateInstanceDialog::Actions a);
-
// returns the instance type
//
virtual CreateInstanceDialog::Types selectedInstanceType() const;
@@ -119,7 +117,6 @@ protected:
bool m_skip;
bool m_firstActivation;
-
// called every time a page is shown in the screen; `firstTime` is true for
// first activation
//
@@ -130,7 +127,6 @@ protected:
virtual bool doSkip() const;
};
-
// introduction page, can be disabled by a global setting
//
class IntroPage : public Page
@@ -148,7 +144,6 @@ private:
bool m_skip;
};
-
// instance type page
//
class TypePage : public Page
@@ -181,7 +176,6 @@ private:
CreateInstanceDialog::Types m_type;
};
-
// game plugin page, displays a list of command buttons for each game, along
// with a "browse" button for custom directories and filtering stuff
//
@@ -221,14 +215,13 @@ public:
// returns the selected game directory
QString selectedGameLocation() const override;
-
// selects the given game and toggles its associated button; the game
// directory can be overridden
//
// pops up a directory selection dialog if `dir` is empty and the plugin
// hasn't detected the game
//
- void select(MOBase::IPluginGame* game, const QString& dir={});
+ void select(MOBase::IPluginGame* game, const QString& dir = {});
// pops up a directory selection dialog and looks for a plugin to manage
// it
@@ -260,9 +253,8 @@ private:
// or by the user
bool installed = false;
-
Game(MOBase::IPluginGame* g);
- Game(const Game&) = delete;
+ Game(const Game&) = delete;
Game& operator=(const Game&) = delete;
};
@@ -276,7 +268,6 @@ private:
// filter
MOBase::FilterWidget m_filter;
-
// returns a list of all the game plugins sorted with natsort
//
std::vector<MOBase::IPluginGame*> sortedGamePlugins() const;
@@ -319,7 +310,6 @@ private:
//
QCommandLinkButton* createCustomButton();
-
// clears the button list and adds all the buttons to it, depending on
// filtering and stuff
//
@@ -351,9 +341,9 @@ private:
// 2) use the selection anyway, selectedGame is returned; or
// 3) cancel, null is returned
//
- MOBase::IPluginGame* confirmOtherGame(
- const QString& path,
- MOBase::IPluginGame* selectedGame, MOBase::IPluginGame* guessedGame);
+ MOBase::IPluginGame* confirmOtherGame(const QString& path,
+ MOBase::IPluginGame* selectedGame,
+ MOBase::IPluginGame* guessedGame);
// detects if the given path likely contains a Microsoft Store game
//
@@ -365,7 +355,6 @@ private:
bool confirmMicrosoftStore(const QString& path, MOBase::IPluginGame* game);
};
-
// game variants page; displays a list of command buttons for game variants, as
// reported by the game plugin
//
@@ -408,12 +397,10 @@ private:
// selected variant
QString m_selection;
-
// fills the list with buttons
void fillList();
};
-
// instance name page; displays a textbox where the user can enter a name and
// does basic checks to make sure the name is valid and not a duplicate
//
@@ -461,7 +448,6 @@ private:
// whether the instance name is valid
bool m_okay;
-
// called when the user modifies the textbox, remember that it has changed and
// calls verify()
//
@@ -477,7 +463,6 @@ private:
bool checkName(QString parentDir, QString name);
};
-
// instance paths page; shows a single textbox for the base directory, or a
// series of textboxes for all the configurable paths if the advanced checkbox
// is checked
@@ -523,7 +508,6 @@ private:
// whether the paths are valid
bool m_okay;
-
// called when the user changes any textbox, checks the path and updates nav
//
void onChanged();
@@ -547,9 +531,8 @@ private:
// returns false if the path is invalid or already exists, sets the given
// labels accordingly
//
- bool checkPath(
- QString path,
- PlaceholderLabel& existsLabel, PlaceholderLabel& invalidLabel);
+ bool checkPath(QString path, PlaceholderLabel& existsLabel,
+ PlaceholderLabel& invalidLabel);
// replaces %base_dir% in the given path by whatever's in the base path
// textbox
@@ -574,7 +557,6 @@ private:
void setIfEmpty(QLineEdit* e, const QString& path, bool force);
};
-
// nexus connection page; this reuses the ui found in the settings dialog and
// is skipped if there's already an api key in the credentials manager
//
@@ -603,7 +585,6 @@ private:
bool m_skip;
};
-
// shows a text log of all the creation parameters
//
class ConfirmationPage : public Page
@@ -626,6 +607,6 @@ private:
QString dirLine(const QString& caption, const QString& path) const;
};
-} // namespace
+} // namespace cid
-#endif // MODORGANIZER_CREATEINSTANCEDIALOGPAGES_INCLUDED
+#endif // MODORGANIZER_CREATEINSTANCEDIALOGPAGES_INCLUDED