mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +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);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CCockpitComponent();
|
||||
virtual ~CCockpitComponent() override;
|
||||
|
||||
//! \copydoc CEnableForDockWidgetInfoArea::setParentDockWidgetInfoArea
|
||||
virtual bool setParentDockWidgetInfoArea(BlackGui::CDockWidgetInfoArea *parentDockableWidget) override;
|
||||
|
||||
@@ -36,8 +36,8 @@ namespace BlackGui
|
||||
DataLoad,
|
||||
CopyModels,
|
||||
CopySettingsAndCaches,
|
||||
FirstModelSet,
|
||||
ConfigSimulator,
|
||||
FirstModelSet,
|
||||
XSwiftBus,
|
||||
ConfigHotkeys
|
||||
};
|
||||
@@ -46,7 +46,7 @@ namespace BlackGui
|
||||
explicit CConfigurationWizard(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CConfigurationWizard();
|
||||
virtual ~CConfigurationWizard() override;
|
||||
|
||||
//! Was the last step skipped?
|
||||
bool lastStepSkipped() const;
|
||||
|
||||
@@ -75,11 +75,11 @@
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CInitialDataLoadComponent" name="comp_DataLoad">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>150</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -135,26 +135,6 @@
|
||||
</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"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="BlackGui::Components::CConfigSimulatorWizardPage" name="wp_Simulator">
|
||||
<property name="title">
|
||||
<string>Simulator</string>
|
||||
@@ -177,11 +157,38 @@
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CConfigSimulatorComponent" name="comp_Simulator">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>125</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</widget>
|
||||
</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>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -389,5 +396,21 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</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>
|
||||
</ui>
|
||||
|
||||
@@ -39,6 +39,11 @@ namespace BlackGui
|
||||
return ui->comp_OwnModels->requestModelsInBackground(simulator, onlyIfNotEmpty);
|
||||
}
|
||||
|
||||
int CDbOwnModelsDialog::getOwnModelsCount() const
|
||||
{
|
||||
return ui->comp_OwnModels->getOwnModelsCount();
|
||||
}
|
||||
|
||||
const CDbOwnModelsComponent *CDbOwnModelsDialog::modelsComponent() const
|
||||
{
|
||||
return ui->comp_OwnModels;
|
||||
|
||||
@@ -42,6 +42,9 @@ namespace BlackGui
|
||||
//! \copydoc CDbOwnModelsComponent::requestModelsInBackground
|
||||
bool requestModelsInBackground(const BlackMisc::Simulation::CSimulatorInfo &simulator, bool onlyIfNotEmpty);
|
||||
|
||||
//! \copydoc CDbOwnModelsComponent::getOwnModelsCount
|
||||
int getOwnModelsCount() const;
|
||||
|
||||
//! Direct access to component
|
||||
//! \remark allows to use the powerful component class
|
||||
const CDbOwnModelsComponent *modelsComponent() const;
|
||||
|
||||
@@ -145,8 +145,12 @@ namespace BlackGui
|
||||
void CFirstModelSetComponent::openOwnModelsDialog()
|
||||
{
|
||||
if (!sGui || sGui->isShuttingDown() || !sGui->getWebDataServices()) { return; }
|
||||
if (!m_modelsDialog) { return; }
|
||||
const bool reload = (QObject::sender() == ui->pb_ModelsTriggerReload);
|
||||
|
||||
const CSimulatorInfo simulator = ui->comp_SimulatorSelector->getValue();
|
||||
m_modelsDialog->setSimulator(simulator);
|
||||
|
||||
if (reload)
|
||||
{
|
||||
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);
|
||||
if (reply != QMessageBox::Yes) { return; }
|
||||
}
|
||||
const CSimulatorInfo simulator = ui->comp_SimulatorSelector->getValue();
|
||||
m_modelsDialog->requestModelsInBackground(simulator, true);
|
||||
}
|
||||
|
||||
const CSimulatorInfo simulator = ui->comp_SimulatorSelector->getValue();
|
||||
m_modelsDialog->setSimulator(simulator);
|
||||
bool loadOnlyIfNotEmpty = true;
|
||||
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();
|
||||
|
||||
// force UI update
|
||||
@@ -221,7 +228,7 @@ namespace BlackGui
|
||||
bool useAllModels = false;
|
||||
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)
|
||||
{
|
||||
useAllModels = true;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_Explaination">
|
||||
<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 name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
@@ -178,6 +178,9 @@
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="pb_ClearModelDir">
|
||||
<property name="toolTip">
|
||||
<string>clear directory or multiple directories</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>clear</string>
|
||||
</property>
|
||||
@@ -218,6 +221,7 @@
|
||||
<tabstop>pb_ModelsTriggerReload</tabstop>
|
||||
<tabstop>le_ModelSetInfo</tabstop>
|
||||
<tabstop>pb_ModelSet</tabstop>
|
||||
<tabstop>pb_CreateModelSet</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
@@ -13,13 +13,7 @@
|
||||
<property name="windowTitle">
|
||||
<string>Initial data loading</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vl_DataLoadComponent">
|
||||
<layout class="QVBoxLayout" name="vl_DataLoadComponent" stretch="0,1">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
@@ -34,13 +28,7 @@
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="fr_Header">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="hl_HeaderText" stretch="1,6">
|
||||
<layout class="QHBoxLayout" name="hl_HeaderText" stretch="0,1">
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_HeaderIcon">
|
||||
<property name="textFormat">
|
||||
@@ -54,7 +42,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_HeaderText">
|
||||
<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 name="wordWrap">
|
||||
<bool>true</bool>
|
||||
|
||||
Reference in New Issue
Block a user