mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 18:35:35 +08:00
Ref T286, "version changed" in copy models
This commit is contained in:
@@ -34,8 +34,10 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->comp_SimulatorSelector->setMode(CSimulatorSelector::CheckBoxes);
|
ui->comp_SimulatorSelector->setMode(CSimulatorSelector::CheckBoxes);
|
||||||
|
ui->comp_SimulatorSelector->clear();
|
||||||
ui->tvp_AircraftModels->setAircraftModelMode(CAircraftModelListModel::OwnModelSet);
|
ui->tvp_AircraftModels->setAircraftModelMode(CAircraftModelListModel::OwnModelSet);
|
||||||
connect(ui->pb_StartCopying, &QPushButton::clicked, this, &CCopyModelsFromOtherSwiftVersionsComponent::copy);
|
connect(ui->pb_StartCopying, &QPushButton::clicked, this, &CCopyModelsFromOtherSwiftVersionsComponent::copy);
|
||||||
|
connect(ui->comp_OtherSwiftVersions, &COtherSwiftVersionsComponent::versionChanged, this, &CCopyModelsFromOtherSwiftVersionsComponent::onVersionChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
CCopyModelsFromOtherSwiftVersionsComponent::~CCopyModelsFromOtherSwiftVersionsComponent()
|
CCopyModelsFromOtherSwiftVersionsComponent::~CCopyModelsFromOtherSwiftVersionsComponent()
|
||||||
@@ -159,6 +161,16 @@ namespace BlackGui
|
|||||||
return reply == QMessageBox::Yes;
|
return reply == QMessageBox::Yes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CCopyModelsFromOtherSwiftVersionsComponent::onVersionChanged(const CApplicationInfo &otherVersion)
|
||||||
|
{
|
||||||
|
const CSimulatorInfo cacheSims = m_modelCaches.otherVersionSimulatorsWithFile(otherVersion);
|
||||||
|
const CSimulatorInfo setSims = m_modelSetCaches.otherVersionSimulatorsWithFile(otherVersion);
|
||||||
|
|
||||||
|
ui->cb_ModelCache->setChecked(cacheSims.isAnySimulator());
|
||||||
|
ui->cb_ModelSet->setChecked(setSims.isAnySimulator());
|
||||||
|
ui->comp_SimulatorSelector->setValue(setSims);
|
||||||
|
}
|
||||||
|
|
||||||
bool CCopyModelsFromOtherSwiftVersionsWizardPage::validatePage()
|
bool CCopyModelsFromOtherSwiftVersionsWizardPage::validatePage()
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(m_copyModels, Q_FUNC_INFO, "Missing widget");
|
Q_ASSERT_X(m_copyModels, Q_FUNC_INFO, "Missing widget");
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ namespace BlackGui
|
|||||||
//! Confirm override
|
//! Confirm override
|
||||||
bool confirmOverride(const QString &msg);
|
bool confirmOverride(const QString &msg);
|
||||||
|
|
||||||
|
//! Init the simulators which can be copied
|
||||||
|
void onVersionChanged(const BlackMisc::CApplicationInfo &otherVersion);
|
||||||
|
|
||||||
QScopedPointer<Ui::CCopyModelsFromOtherSwiftVersionsComponent> ui;
|
QScopedPointer<Ui::CCopyModelsFromOtherSwiftVersionsComponent> ui;
|
||||||
|
|
||||||
// caches will be explicitly initialized in copy
|
// caches will be explicitly initialized in copy
|
||||||
|
|||||||
@@ -7,13 +7,13 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>508</width>
|
<width>508</width>
|
||||||
<height>420</height>
|
<height>495</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Copy models from other swift versions</string>
|
<string>Copy models from other swift versions</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="vl_CopyModelsFromOtherSwiftVersions" stretch="2,1,4">
|
<layout class="QVBoxLayout" name="vl_CopyModelsFromOtherSwiftVersions" stretch="2,1,5">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="gb_OtherSwiftVersions">
|
<widget class="QGroupBox" name="gb_OtherSwiftVersions">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>50</height>
|
<height>125</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
Reference in New Issue
Block a user