diff --git a/src/blackgui/components/configurationwizard.cpp b/src/blackgui/components/configurationwizard.cpp index f50afd3e4..ae5e85176 100644 --- a/src/blackgui/components/configurationwizard.cpp +++ b/src/blackgui/components/configurationwizard.cpp @@ -19,9 +19,33 @@ namespace BlackGui ui(new Ui::CConfigurationWizard) { ui->setupUi(this); + + connect(ui->wp_CopyCaches, &QWizardPage::completeChanged, ui->comp_CopyCaches, &CCopyConfigurationComponent::copySelectedFiles); + connect(ui->wp_CopySettings, &QWizardPage::completeChanged, ui->comp_CopySettings, &CCopyConfigurationComponent::copySelectedFiles); + connect(this, &QWizard::currentIdChanged, this, &CConfigurationWizard::wizardCurrentIdChanged); } CConfigurationWizard::~CConfigurationWizard() { } + + void CConfigurationWizard::wizardCurrentIdChanged(int id) + { + Q_UNUSED(id); + const QWizardPage *page = this->currentPage(); + if (page == ui->wp_Simulator) + { + // + } + else if (page == ui->wp_CopyCaches) + { + ui->comp_CopyCaches->setCacheMode(); + ui->comp_CopyCaches->initCurrentDirectories(); + } + else if (page == ui->wp_CopySettings) + { + ui->comp_CopySettings->setSettingsMode(); + ui->comp_CopySettings->initCurrentDirectories(); + } + } } // ns } // ns diff --git a/src/blackgui/components/configurationwizard.h b/src/blackgui/components/configurationwizard.h index 4c1156b6e..6c0af8bba 100644 --- a/src/blackgui/components/configurationwizard.h +++ b/src/blackgui/components/configurationwizard.h @@ -36,6 +36,9 @@ namespace BlackGui virtual ~CConfigurationWizard(); private: + //! The current page has changed + void wizardCurrentIdChanged(int id); + QScopedPointer ui; }; } // ns diff --git a/src/blackgui/components/configurationwizard.ui b/src/blackgui/components/configurationwizard.ui index 850d00d12..583390d35 100644 --- a/src/blackgui/components/configurationwizard.ui +++ b/src/blackgui/components/configurationwizard.ui @@ -6,24 +6,33 @@ 0 0 - 640 - 480 + 600 + 500 + + + 500 + 500 + + swift configuration wizard + + true + QWizard::ClassicStyle - + - Copy configuration + Your simulator - Copy cache and setting values + The simulator(s) you are using - + 4 @@ -37,7 +46,112 @@ 4 - + + + QFrame::Sunken + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + P3D + + + + + + + FSX + + + + + + + FS9 + + + + 64 + 64 + + + + + + + + XPlane + + + + + + + <img width="100" src=":/simulators/icons/simulators/Prepar3D.png"/> + + + + + + + <img width="100" src=":/simulators/icons/simulators/FSX.png"/> + + + + + + + <img width="100" src=":/simulators/icons/simulators/XPlane.png"/> + + + + + + + <img width="100" src=":/simulators/icons/simulators/FS9.png"/> + + + + + + + + + + + Copy configuration from another installation + + + Copy settings + + + + 4 + + + 4 + + + 4 + + + 4 + + + 0 @@ -48,7 +162,44 @@ - + + + Copy configuration from another installation + + + Cache data + + + + 4 + + + 4 + + + 4 + + + 4 + + + + + + 0 + 100 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + +