mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
refs #886, wizard
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -36,6 +36,9 @@ namespace BlackGui
|
||||
virtual ~CConfigurationWizard();
|
||||
|
||||
private:
|
||||
//! The current page has changed
|
||||
void wizardCurrentIdChanged(int id);
|
||||
|
||||
QScopedPointer<Ui::CConfigurationWizard> ui;
|
||||
};
|
||||
} // ns
|
||||
|
||||
@@ -6,24 +6,33 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>640</width>
|
||||
<height>480</height>
|
||||
<width>600</width>
|
||||
<height>500</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>500</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>swift configuration wizard</string>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="wizardStyle">
|
||||
<enum>QWizard::ClassicStyle</enum>
|
||||
</property>
|
||||
<widget class="QWizardPage" name="wp_CopyConfiguration">
|
||||
<widget class="QWizardPage" name="wp_Simulator">
|
||||
<property name="title">
|
||||
<string>Copy configuration</string>
|
||||
<string>Your simulator</string>
|
||||
</property>
|
||||
<property name="subTitle">
|
||||
<string>Copy cache and setting values</string>
|
||||
<string>The simulator(s) you are using</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vl_CopyConfiguration">
|
||||
<layout class="QVBoxLayout" name="vl_Simulators">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
@@ -37,7 +46,112 @@
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CCopyConfigurationComponent" name="comp_CopyConfiguration">
|
||||
<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">
|
||||
<string>Copy configuration from another installation</string>
|
||||
</property>
|
||||
<property name="subTitle">
|
||||
<string>Copy settings</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vl_CopySettings">
|
||||
<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::CCopyConfigurationComponent" name="comp_CopySettings">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
@@ -48,7 +162,44 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWizardPage" name="wizardPage2"/>
|
||||
<widget class="QWizardPage" name="wp_CopyCaches">
|
||||
<property name="title">
|
||||
<string>Copy configuration from another installation</string>
|
||||
</property>
|
||||
<property name="subTitle">
|
||||
<string>Cache data</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vl_CopyCaches">
|
||||
<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::CCopyConfigurationComponent" name="comp_CopyCaches">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
||||
Reference in New Issue
Block a user