mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-30 05:51:23 +08:00
refs #886, adjusted QWizard to previous changes
* use QWizardPage derived classes * added simulator config page
This commit is contained in:
committed by
Mathew Sutcliffe
parent
5b92b2068e
commit
2c2a043e40
@@ -19,9 +19,9 @@ namespace BlackGui
|
|||||||
ui(new Ui::CConfigurationWizard)
|
ui(new Ui::CConfigurationWizard)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
ui->wp_CopyCaches->setConfigComponent(ui->comp_CopyCaches);
|
||||||
connect(ui->wp_CopyCaches, &QWizardPage::completeChanged, ui->comp_CopyCaches, &CCopyConfigurationComponent::copySelectedFiles);
|
ui->wp_CopySettings->setConfigComponent(ui->comp_CopySettings);
|
||||||
connect(ui->wp_CopySettings, &QWizardPage::completeChanged, ui->comp_CopySettings, &CCopyConfigurationComponent::copySelectedFiles);
|
ui->wp_Simulator->setConfigComponent(ui->comp_Simulator);
|
||||||
connect(this, &QWizard::currentIdChanged, this, &CConfigurationWizard::wizardCurrentIdChanged);
|
connect(this, &QWizard::currentIdChanged, this, &CConfigurationWizard::wizardCurrentIdChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,19 +32,13 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
Q_UNUSED(id);
|
Q_UNUSED(id);
|
||||||
const QWizardPage *page = this->currentPage();
|
const QWizardPage *page = this->currentPage();
|
||||||
if (page == ui->wp_Simulator)
|
if (page == ui->wp_CopyCaches)
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
else if (page == ui->wp_CopyCaches)
|
|
||||||
{
|
{
|
||||||
ui->comp_CopyCaches->setCacheMode();
|
ui->comp_CopyCaches->setCacheMode();
|
||||||
ui->comp_CopyCaches->initCurrentDirectories();
|
|
||||||
}
|
}
|
||||||
else if (page == ui->wp_CopySettings)
|
else if (page == ui->wp_CopySettings)
|
||||||
{
|
{
|
||||||
ui->comp_CopySettings->setSettingsMode();
|
ui->comp_CopySettings->setSettingsMode();
|
||||||
ui->comp_CopySettings->initCurrentDirectories();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
@@ -25,112 +25,7 @@
|
|||||||
<property name="wizardStyle">
|
<property name="wizardStyle">
|
||||||
<enum>QWizard::ClassicStyle</enum>
|
<enum>QWizard::ClassicStyle</enum>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWizardPage" name="wp_Simulator">
|
<widget class="BlackGui::Components::CCopyConfigurationWizardPage" name="wp_CopySettings">
|
||||||
<property name="title">
|
|
||||||
<string>Your simulator</string>
|
|
||||||
</property>
|
|
||||||
<property name="subTitle">
|
|
||||||
<string>The simulator(s) you are using</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="vl_Simulators">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QFrame" name="fr_Simulator">
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Sunken</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gl_Simulators">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item row="1" column="0" alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QCheckBox" name="cb_P3D">
|
|
||||||
<property name="text">
|
|
||||||
<string>P3D</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1" alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QCheckBox" name="cb_FSX">
|
|
||||||
<property name="text">
|
|
||||||
<string>FSX</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2" alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QCheckBox" name="cb_FS9">
|
|
||||||
<property name="text">
|
|
||||||
<string>FS9</string>
|
|
||||||
</property>
|
|
||||||
<property name="iconSize">
|
|
||||||
<size>
|
|
||||||
<width>64</width>
|
|
||||||
<height>64</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="3" alignment="Qt::AlignHCenter">
|
|
||||||
<widget class="QCheckBox" name="cb_XP">
|
|
||||||
<property name="text">
|
|
||||||
<string>XPlane</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="lbl_P3D">
|
|
||||||
<property name="text">
|
|
||||||
<string><img width="100" src=":/simulators/icons/simulators/Prepar3D.png"/></string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLabel" name="lbl_FSX">
|
|
||||||
<property name="text">
|
|
||||||
<string><img width="100" src=":/simulators/icons/simulators/FSX.png"/></string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3">
|
|
||||||
<widget class="QLabel" name="lbl_XP">
|
|
||||||
<property name="text">
|
|
||||||
<string><img width="100" src=":/simulators/icons/simulators/XPlane.png"/></string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QLabel" name="lbl_FS9">
|
|
||||||
<property name="text">
|
|
||||||
<string><img width="100" src=":/simulators/icons/simulators/FS9.png"/></string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWizardPage" name="wp_CopySettings">
|
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Copy configuration from another installation</string>
|
<string>Copy configuration from another installation</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -162,7 +57,7 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWizardPage" name="wp_CopyCaches">
|
<widget class="BlackGui::Components::CCopyConfigurationWizardPage" name="wp_CopyCaches">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Copy configuration from another installation</string>
|
<string>Copy configuration from another installation</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -200,6 +95,38 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="BlackGui::Components::CConfigSimulatorWizardPage" name="wp_Simulator">
|
||||||
|
<property name="title">
|
||||||
|
<string>Simulator</string>
|
||||||
|
</property>
|
||||||
|
<property name="subTitle">
|
||||||
|
<string>Simulator(s) you are using</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="vl_SimulatorSetup">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="BlackGui::Components::CConfigSimulatorComponent" name="comp_Simulator">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
@@ -208,6 +135,24 @@
|
|||||||
<header>blackgui/components/copyconfigurationcomponent.h</header>
|
<header>blackgui/components/copyconfigurationcomponent.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>BlackGui::Components::CConfigSimulatorComponent</class>
|
||||||
|
<extends>QFrame</extends>
|
||||||
|
<header>blackgui/components/configsimulatorcomponent.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>BlackGui::Components::CConfigSimulatorWizardPage</class>
|
||||||
|
<extends>QWizardPage</extends>
|
||||||
|
<header>blackgui/components/configsimulatorcomponent.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>BlackGui::Components::CCopyConfigurationWizardPage</class>
|
||||||
|
<extends>QWizardPage</extends>
|
||||||
|
<header>blackgui/components/copyconfigurationcomponent.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
Reference in New Issue
Block a user