Use nested namespaces (C++17 feature)

This commit is contained in:
Mat Sutcliffe
2021-09-15 21:44:54 +01:00
parent 3f2e5b0b69
commit 57d32da826
1345 changed files with 146075 additions and 150376 deletions

View File

@@ -16,69 +16,66 @@
#include <QScopedPointer>
namespace Ui { class CConfigurationWizard; }
namespace BlackGui
namespace BlackGui::Components
{
namespace Components
/**
* Configure the most important settings
*/
class BLACKGUI_EXPORT CConfigurationWizard : public QWizard
{
/**
* Configure the most important settings
*/
class BLACKGUI_EXPORT CConfigurationWizard : public QWizard
Q_OBJECT
public:
//! Page ids
enum Pages
{
Q_OBJECT
public:
//! Page ids
enum Pages
{
Legal,
DataLoad,
CopyModels,
CopySettingsAndCaches,
ConfigSimulator,
FirstModelSet,
XSwiftBus,
ConfigHotkeys
};
//! Constructor
explicit CConfigurationWizard(QWidget *parent = nullptr);
//! Destructor
virtual ~CConfigurationWizard() override;
//! Was the last step skipped?
bool lastStepSkipped() const;
//! Static version of CConfigurationWizard::lastStepSkipped
static bool lastWizardStepSkipped(const QWizard *standardWizard);
protected:
//! \copydoc QObject::event
virtual bool event(QEvent *event) override;
private:
//! The current page has changed
void wizardCurrentIdChanged(int id);
//! Custom button was clicked
void clickedCustomButton(int which);
//! Accepted or rejected
void ended();
//! Set the parent's window opacity
void setParentOpacity(qreal opacity);
//! Set screen geometry based on screen resolution
void setScreenGeometry();
QScopedPointer<Ui::CConfigurationWizard> ui;
int m_previousId = -1;
int m_minId = -1;
int m_maxId = -1;
bool m_skipped = false;
Legal,
DataLoad,
CopyModels,
CopySettingsAndCaches,
ConfigSimulator,
FirstModelSet,
XSwiftBus,
ConfigHotkeys
};
} // ns
//! Constructor
explicit CConfigurationWizard(QWidget *parent = nullptr);
//! Destructor
virtual ~CConfigurationWizard() override;
//! Was the last step skipped?
bool lastStepSkipped() const;
//! Static version of CConfigurationWizard::lastStepSkipped
static bool lastWizardStepSkipped(const QWizard *standardWizard);
protected:
//! \copydoc QObject::event
virtual bool event(QEvent *event) override;
private:
//! The current page has changed
void wizardCurrentIdChanged(int id);
//! Custom button was clicked
void clickedCustomButton(int which);
//! Accepted or rejected
void ended();
//! Set the parent's window opacity
void setParentOpacity(qreal opacity);
//! Set screen geometry based on screen resolution
void setScreenGeometry();
QScopedPointer<Ui::CConfigurationWizard> ui;
int m_previousId = -1;
int m_minId = -1;
int m_maxId = -1;
bool m_skipped = false;
};
} // ns
#endif // guard