mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 20:40:29 +08:00
Wizard fixes as discussed here: https://swift-project.slack.com/archives/G7GD2UP9C/p1534597257000200
- improved message for initial data loading - Simulator wizard page before 1st model set page - 1st model set component, forced directory loading (and not just displaying model cache)
This commit is contained in:
@@ -38,7 +38,7 @@ namespace BlackGui
|
|||||||
explicit CCockpitComponent(QWidget *parent = nullptr);
|
explicit CCockpitComponent(QWidget *parent = nullptr);
|
||||||
|
|
||||||
//! Destructor
|
//! Destructor
|
||||||
virtual ~CCockpitComponent();
|
virtual ~CCockpitComponent() override;
|
||||||
|
|
||||||
//! \copydoc CEnableForDockWidgetInfoArea::setParentDockWidgetInfoArea
|
//! \copydoc CEnableForDockWidgetInfoArea::setParentDockWidgetInfoArea
|
||||||
virtual bool setParentDockWidgetInfoArea(BlackGui::CDockWidgetInfoArea *parentDockableWidget) override;
|
virtual bool setParentDockWidgetInfoArea(BlackGui::CDockWidgetInfoArea *parentDockableWidget) override;
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ namespace BlackGui
|
|||||||
DataLoad,
|
DataLoad,
|
||||||
CopyModels,
|
CopyModels,
|
||||||
CopySettingsAndCaches,
|
CopySettingsAndCaches,
|
||||||
FirstModelSet,
|
|
||||||
ConfigSimulator,
|
ConfigSimulator,
|
||||||
|
FirstModelSet,
|
||||||
XSwiftBus,
|
XSwiftBus,
|
||||||
ConfigHotkeys
|
ConfigHotkeys
|
||||||
};
|
};
|
||||||
@@ -46,7 +46,7 @@ namespace BlackGui
|
|||||||
explicit CConfigurationWizard(QWidget *parent = nullptr);
|
explicit CConfigurationWizard(QWidget *parent = nullptr);
|
||||||
|
|
||||||
//! Destructor
|
//! Destructor
|
||||||
virtual ~CConfigurationWizard();
|
virtual ~CConfigurationWizard() override;
|
||||||
|
|
||||||
//! Was the last step skipped?
|
//! Was the last step skipped?
|
||||||
bool lastStepSkipped() const;
|
bool lastStepSkipped() const;
|
||||||
|
|||||||
@@ -75,11 +75,11 @@
|
|||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="BlackGui::Components::CInitialDataLoadComponent" name="comp_DataLoad">
|
<widget class="BlackGui::Components::CInitialDataLoadComponent" name="comp_DataLoad">
|
||||||
<property name="frameShape">
|
<property name="minimumSize">
|
||||||
<enum>QFrame::StyledPanel</enum>
|
<size>
|
||||||
</property>
|
<width>0</width>
|
||||||
<property name="frameShadow">
|
<height>150</height>
|
||||||
<enum>QFrame::Raised</enum>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -135,26 +135,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="BlackGui::Components::CFirstModelSetWizardPage" name="wp_FirstModelSet">
|
|
||||||
<property name="title">
|
|
||||||
<string>First model set</string>
|
|
||||||
</property>
|
|
||||||
<property name="subTitle">
|
|
||||||
<string>Create a simple model set (for a start)</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="vl_FirstModelSet">
|
|
||||||
<item alignment="Qt::AlignRight">
|
|
||||||
<widget class="QPushButton" name="pb_SkipFirstModelSet">
|
|
||||||
<property name="text">
|
|
||||||
<string> I do this later / do not need this </string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="BlackGui::Components::CFirstModelSetComponent" name="comp_FirstModelSet"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="BlackGui::Components::CConfigSimulatorWizardPage" name="wp_Simulator">
|
<widget class="BlackGui::Components::CConfigSimulatorWizardPage" name="wp_Simulator">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Simulator</string>
|
<string>Simulator</string>
|
||||||
@@ -177,11 +157,38 @@
|
|||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="BlackGui::Components::CConfigSimulatorComponent" name="comp_Simulator">
|
<widget class="BlackGui::Components::CConfigSimulatorComponent" name="comp_Simulator">
|
||||||
<property name="frameShape">
|
<property name="minimumSize">
|
||||||
<enum>QFrame::StyledPanel</enum>
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>125</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
</widget>
|
||||||
<enum>QFrame::Raised</enum>
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="BlackGui::Components::CFirstModelSetWizardPage" name="wp_FirstModelSet">
|
||||||
|
<property name="title">
|
||||||
|
<string>First model set</string>
|
||||||
|
</property>
|
||||||
|
<property name="subTitle">
|
||||||
|
<string>Create a simple model set (for a start)</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="vl_FirstModelSet">
|
||||||
|
<item alignment="Qt::AlignRight">
|
||||||
|
<widget class="QPushButton" name="pb_SkipFirstModelSet">
|
||||||
|
<property name="text">
|
||||||
|
<string> I do this later / do not need this </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="BlackGui::Components::CFirstModelSetComponent" name="comp_FirstModelSet">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>175</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -389,5 +396,21 @@
|
|||||||
</hint>
|
</hint>
|
||||||
</hints>
|
</hints>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>pb_SkipFirstModelSet</sender>
|
||||||
|
<signal>clicked()</signal>
|
||||||
|
<receiver>CConfigurationWizard</receiver>
|
||||||
|
<slot>next()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>678</x>
|
||||||
|
<y>67</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>804</x>
|
||||||
|
<y>121</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
@@ -39,6 +39,11 @@ namespace BlackGui
|
|||||||
return ui->comp_OwnModels->requestModelsInBackground(simulator, onlyIfNotEmpty);
|
return ui->comp_OwnModels->requestModelsInBackground(simulator, onlyIfNotEmpty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CDbOwnModelsDialog::getOwnModelsCount() const
|
||||||
|
{
|
||||||
|
return ui->comp_OwnModels->getOwnModelsCount();
|
||||||
|
}
|
||||||
|
|
||||||
const CDbOwnModelsComponent *CDbOwnModelsDialog::modelsComponent() const
|
const CDbOwnModelsComponent *CDbOwnModelsDialog::modelsComponent() const
|
||||||
{
|
{
|
||||||
return ui->comp_OwnModels;
|
return ui->comp_OwnModels;
|
||||||
|
|||||||
@@ -42,6 +42,9 @@ namespace BlackGui
|
|||||||
//! \copydoc CDbOwnModelsComponent::requestModelsInBackground
|
//! \copydoc CDbOwnModelsComponent::requestModelsInBackground
|
||||||
bool requestModelsInBackground(const BlackMisc::Simulation::CSimulatorInfo &simulator, bool onlyIfNotEmpty);
|
bool requestModelsInBackground(const BlackMisc::Simulation::CSimulatorInfo &simulator, bool onlyIfNotEmpty);
|
||||||
|
|
||||||
|
//! \copydoc CDbOwnModelsComponent::getOwnModelsCount
|
||||||
|
int getOwnModelsCount() const;
|
||||||
|
|
||||||
//! Direct access to component
|
//! Direct access to component
|
||||||
//! \remark allows to use the powerful component class
|
//! \remark allows to use the powerful component class
|
||||||
const CDbOwnModelsComponent *modelsComponent() const;
|
const CDbOwnModelsComponent *modelsComponent() const;
|
||||||
|
|||||||
@@ -145,8 +145,12 @@ namespace BlackGui
|
|||||||
void CFirstModelSetComponent::openOwnModelsDialog()
|
void CFirstModelSetComponent::openOwnModelsDialog()
|
||||||
{
|
{
|
||||||
if (!sGui || sGui->isShuttingDown() || !sGui->getWebDataServices()) { return; }
|
if (!sGui || sGui->isShuttingDown() || !sGui->getWebDataServices()) { return; }
|
||||||
|
if (!m_modelsDialog) { return; }
|
||||||
const bool reload = (QObject::sender() == ui->pb_ModelsTriggerReload);
|
const bool reload = (QObject::sender() == ui->pb_ModelsTriggerReload);
|
||||||
|
|
||||||
|
const CSimulatorInfo simulator = ui->comp_SimulatorSelector->getValue();
|
||||||
|
m_modelsDialog->setSimulator(simulator);
|
||||||
|
|
||||||
if (reload)
|
if (reload)
|
||||||
{
|
{
|
||||||
if (!sGui->getWebDataServices()->hasDbModelData())
|
if (!sGui->getWebDataServices()->hasDbModelData())
|
||||||
@@ -154,12 +158,15 @@ namespace BlackGui
|
|||||||
const QMessageBox::StandardButton reply = QMessageBox::warning(this->mainWindow(), "DB data", "No DB data, models cannot be consolidated. Load anyway?", QMessageBox::Yes | QMessageBox::No);
|
const QMessageBox::StandardButton reply = QMessageBox::warning(this->mainWindow(), "DB data", "No DB data, models cannot be consolidated. Load anyway?", QMessageBox::Yes | QMessageBox::No);
|
||||||
if (reply != QMessageBox::Yes) { return; }
|
if (reply != QMessageBox::Yes) { return; }
|
||||||
}
|
}
|
||||||
const CSimulatorInfo simulator = ui->comp_SimulatorSelector->getValue();
|
|
||||||
m_modelsDialog->requestModelsInBackground(simulator, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
const CSimulatorInfo simulator = ui->comp_SimulatorSelector->getValue();
|
bool loadOnlyIfNotEmpty = true;
|
||||||
m_modelsDialog->setSimulator(simulator);
|
if (m_modelsDialog->getOwnModelsCount() > 0)
|
||||||
|
{
|
||||||
|
const QMessageBox::StandardButton reply = QMessageBox::warning(this->mainWindow(), "Model loading", "Reload the models?\nThe xisting cache data will we overridden.", QMessageBox::Yes | QMessageBox::No);
|
||||||
|
if (reply == QMessageBox::Yes) { loadOnlyIfNotEmpty = false; }
|
||||||
|
}
|
||||||
|
m_modelsDialog->requestModelsInBackground(simulator, loadOnlyIfNotEmpty);
|
||||||
|
}
|
||||||
m_modelsDialog->exec();
|
m_modelsDialog->exec();
|
||||||
|
|
||||||
// force UI update
|
// force UI update
|
||||||
@@ -221,7 +228,7 @@ namespace BlackGui
|
|||||||
bool useAllModels = false;
|
bool useAllModels = false;
|
||||||
if (!ui->comp_Distributors->hasSelectedDistributors())
|
if (!ui->comp_Distributors->hasSelectedDistributors())
|
||||||
{
|
{
|
||||||
const QMessageBox::StandardButton reply = QMessageBox::question(this->mainWindow(), "Models", "No distributors selected, use all model?", QMessageBox::Yes | QMessageBox::No);
|
const QMessageBox::StandardButton reply = QMessageBox::question(this->mainWindow(), "Models", "No distributors selected, use all models?", QMessageBox::Yes | QMessageBox::No);
|
||||||
if (reply == QMessageBox::Yes)
|
if (reply == QMessageBox::Yes)
|
||||||
{
|
{
|
||||||
useAllModels = true;
|
useAllModels = true;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="lbl_Explaination">
|
<widget class="QLabel" name="lbl_Explaination">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p><span style=" font-size:9pt;">The model set defines which aircraft you will use in the simulator. From all models you have installed on your disk you can select a subset actually being used.<br/><br/>1) Reload your models if not already done<br/>2) Create your model set and SAVE the model set</span></p></body></html></string>
|
<string><html><head/><body><p><span style=" font-size:9pt;">The model set defines aircraft you will use in the simulator. From all models you have installed on your disk you can select a subset actually being used for model matching.<br/><br/>1) Reload your models if not already done<br/>2) Create your model set and SAVE the model set</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="textFormat">
|
<property name="textFormat">
|
||||||
<enum>Qt::RichText</enum>
|
<enum>Qt::RichText</enum>
|
||||||
@@ -178,6 +178,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="1" column="2">
|
||||||
<widget class="QPushButton" name="pb_ClearModelDir">
|
<widget class="QPushButton" name="pb_ClearModelDir">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>clear directory or multiple directories</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>clear</string>
|
<string>clear</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -218,6 +221,7 @@
|
|||||||
<tabstop>pb_ModelsTriggerReload</tabstop>
|
<tabstop>pb_ModelsTriggerReload</tabstop>
|
||||||
<tabstop>le_ModelSetInfo</tabstop>
|
<tabstop>le_ModelSetInfo</tabstop>
|
||||||
<tabstop>pb_ModelSet</tabstop>
|
<tabstop>pb_ModelSet</tabstop>
|
||||||
|
<tabstop>pb_CreateModelSet</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -13,13 +13,7 @@
|
|||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Initial data loading</string>
|
<string>Initial data loading</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<layout class="QVBoxLayout" name="vl_DataLoadComponent" stretch="0,1">
|
||||||
<enum>QFrame::StyledPanel</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Raised</enum>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="vl_DataLoadComponent">
|
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>4</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -34,13 +28,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="fr_Header">
|
<widget class="QFrame" name="fr_Header">
|
||||||
<property name="sizePolicy">
|
<layout class="QHBoxLayout" name="hl_HeaderText" stretch="0,1">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QHBoxLayout" name="hl_HeaderText" stretch="1,6">
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="lbl_HeaderIcon">
|
<widget class="QLabel" name="lbl_HeaderIcon">
|
||||||
<property name="textFormat">
|
<property name="textFormat">
|
||||||
@@ -54,7 +42,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="lbl_HeaderText">
|
<widget class="QLabel" name="lbl_HeaderText">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p>We recommend to download an initial data set. This may take some time, but then you can start to use all tools with full functionality.</p></body></html></string>
|
<string><html><head/><body><p><span style=" font-size:10pt;">We recommend to download an initial data set. This may take some time, but then you can start to use all tools with full functionality. You can wait until the load is completed and you see entries for all cache values (C#). Or you can already move on, </span><span style=" font-size:10pt; font-weight:600;">loading continues in background</span><span style=" font-size:10pt;">.</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
|||||||
Reference in New Issue
Block a user