8 #include "ui_configurationwizard.h"
16 using namespace swift::misc::math;
26 ui->wp_CopyModels->setConfigComponent(ui->comp_CopyModels);
27 ui->wp_CopySettingsAndCaches->setConfigComponent(ui->comp_CopySettingsAndCachesComponent);
28 ui->wp_Simulator->setConfigComponent(ui->comp_Simulator);
29 ui->wp_SimulatorSpecific->setConfigComponent(ui->comp_InstallXSwiftBus, ui->comp_InstallFsxTerrainProbe);
30 ui->wp_DataLoad->setConfigComponent(ui->comp_DataLoad);
31 ui->wp_Hotkeys->setConfigComponent(ui->comp_Hotkeys);
32 ui->wp_Legal->setConfigComponent(ui->comp_LegalInformation);
33 ui->comp_Hotkeys->registerDummyPttEntry();
40 ui->tb_SimulatorSpecific->setCurrentWidget(ui->comp_InstallXSwiftBus);
43 const auto mm = std::minmax_element(ids.
begin(), ids.
end());
52 Q_ASSERT_X(
sGui, Q_FUNC_INFO,
"missing sGui");
55 if (!myself) {
return; }
60 this->setScreenGeometry();
74 void CConfigurationWizard::wizardCurrentIdChanged(
int id)
76 const int previousId = m_previousId;
77 const bool backward =
id < previousId;
78 const bool skipped = m_skipped;
84 this->setParentOpacity(0.5);
91 void CConfigurationWizard::clickedCustomButton(
int which)
98 else { m_skipped =
false; }
101 void CConfigurationWizard::ended() { this->setParentOpacity(1.0); }
103 void CConfigurationWizard::setParentOpacity(qreal opacity)
106 if (!parent) {
return; }
107 if (CMathUtils::epsilonEqual(
parent->windowOpacity(), opacity)) {
return; }
108 parent->setWindowOpacity(opacity);
111 void CConfigurationWizard::setScreenGeometry()
113 if (!
sGui) {
return; }
118 const int gw = g.
width();
119 const int gh = g.
height();
120 const int calcW = qRound(gw * 0.8);
121 const int calcH = qRound(gh * 0.9);
124 const int w = qMin(900, calcW);
125 const int h = qMin(750, calcH);
bool isShuttingDown() const
Is application shutting down?
static QRect currentScreenGeometry()
Current screen resolution.
void showHelp(const QString &subpath={}) const
Show help page (online help)
static void setWizardButtonWidths(QWizard *wizard)
Set button widths for a wizard.
Configure the most important settings.
static bool lastWizardStepSkipped(const QWizard *standardWizard)
Static version of CConfigurationWizard::lastStepSkipped.
virtual ~CConfigurationWizard()
Destructor.
bool lastStepSkipped() const
Was the last step skipped?
SWIFT_GUI_EXPORT swift::gui::CGuiApplication * sGui
Single instance of GUI application object.
High level reusable GUI components.
Free functions in swift::misc.
QList< T >::iterator begin()
QList< T >::iterator end()
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject * parent() const const
void currentIdChanged(int id)
QWizardPage * currentPage() const const
QWizardPage * page(int id) const const
QList< int > pageIds() const const
void setButtonText(QWizard::WizardButton which, const QString &text)
void setOption(QWizard::WizardOption option, bool on)