mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15: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->comp_SimulatorSelector->setMode(CSimulatorSelector::CheckBoxes);
|
||||
ui->comp_SimulatorSelector->clear();
|
||||
ui->tvp_AircraftModels->setAircraftModelMode(CAircraftModelListModel::OwnModelSet);
|
||||
connect(ui->pb_StartCopying, &QPushButton::clicked, this, &CCopyModelsFromOtherSwiftVersionsComponent::copy);
|
||||
connect(ui->comp_OtherSwiftVersions, &COtherSwiftVersionsComponent::versionChanged, this, &CCopyModelsFromOtherSwiftVersionsComponent::onVersionChanged);
|
||||
}
|
||||
|
||||
CCopyModelsFromOtherSwiftVersionsComponent::~CCopyModelsFromOtherSwiftVersionsComponent()
|
||||
@@ -159,6 +161,16 @@ namespace BlackGui
|
||||
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()
|
||||
{
|
||||
Q_ASSERT_X(m_copyModels, Q_FUNC_INFO, "Missing widget");
|
||||
|
||||
@@ -48,6 +48,9 @@ namespace BlackGui
|
||||
//! Confirm override
|
||||
bool confirmOverride(const QString &msg);
|
||||
|
||||
//! Init the simulators which can be copied
|
||||
void onVersionChanged(const BlackMisc::CApplicationInfo &otherVersion);
|
||||
|
||||
QScopedPointer<Ui::CCopyModelsFromOtherSwiftVersionsComponent> ui;
|
||||
|
||||
// caches will be explicitly initialized in copy
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>508</width>
|
||||
<height>420</height>
|
||||
<height>495</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Copy models from other swift versions</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vl_CopyModelsFromOtherSwiftVersions" stretch="2,1,4">
|
||||
<layout class="QVBoxLayout" name="vl_CopyModelsFromOtherSwiftVersions" stretch="2,1,5">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_OtherSwiftVersions">
|
||||
<property name="title">
|
||||
@@ -25,7 +25,7 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
<height>125</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
|
||||
Reference in New Issue
Block a user