fix(ui): Disable broken quick mapping wizard

This commit is contained in:
Lars Toenning
2024-08-23 21:07:28 +02:00
parent da98932997
commit f65d54d750
10 changed files with 3 additions and 123 deletions

View File

@@ -384,7 +384,7 @@ add_library(gui SHARED
components/dbreducemodelduplicates.cpp
components/countryselector.ui
components/coordinatedialog.ui
components/dbquickmappingwizard.h
#components/dbquickmappingwizard.h
components/dbmodelcomponent.cpp
components/modelconverterxsetupcomponent.cpp
components/logcomponent.h
@@ -509,7 +509,7 @@ add_library(gui SHARED
components/mappingcomponent.ui
components/datasettingscomponent.h
components/dbmodelworkbenchcomponent.cpp
components/dbquickmappingwizard.ui
#components/dbquickmappingwizard.ui
components/aircraftpartshistory.cpp
components/radarcomponent.ui
components/simbriefdownloaddialog.h
@@ -677,7 +677,7 @@ add_library(gui SHARED
components/logcomponent.cpp
components/configurationwizard.cpp
components/downloadcomponent.ui
components/dbquickmappingwizard.cpp
#components/dbquickmappingwizard.cpp
components/aircraftcombinedtypeselector.h
components/dbownmodelsetformdialog.cpp
components/dbmodelworkbenchcomponent.ui

View File

@@ -4,7 +4,6 @@
#include "ui_loginadvcomponent.h"
#include "loginadvcomponent.h"
#include "blackgui/components/serverlistselector.h"
#include "blackgui/components/dbquickmappingwizard.h"
#include "blackgui/editors/serverform.h"
#include "blackgui/editors/pilotform.h"
#include "blackgui/guiapplication.h"

View File

@@ -38,8 +38,6 @@ namespace BlackMisc::Simulation
}
namespace BlackGui::Components
{
class CDbQuickMappingWizard;
/*!
* Login component to flight network
*/

View File

@@ -4,7 +4,6 @@
#include "ui_logincomponent.h"
#include "logincomponent.h"
#include "blackgui/components/serverlistselector.h"
#include "blackgui/components/dbquickmappingwizard.h"
#include "blackgui/editors/serverform.h"
#include "blackgui/editors/pilotform.h"
#include "blackgui/guiapplication.h"
@@ -88,7 +87,6 @@ namespace BlackGui::Components
connect(ui->pb_Cancel, &QPushButton::clicked, this, &CLoginComponent::loginCancelled, Qt::QueuedConnection);
connect(ui->pb_Ok, &QPushButton::clicked, this, &CLoginComponent::toggleNetworkConnection, Qt::QueuedConnection);
connect(ui->pb_OtherServersGotoSettings, &QPushButton::pressed, this, &CLoginComponent::requestNetworkSettings);
connect(ui->pb_MappingWizard, &QToolButton::clicked, this, &CLoginComponent::mappingWizard, Qt::QueuedConnection);
connect(&m_networkSetup, &CNetworkSetup::setupChanged, this, &CLoginComponent::reloadOtherServersSetup, Qt::QueuedConnection);
ui->form_FsdDetails->showEnableInfo(true);
@@ -728,12 +726,6 @@ namespace BlackGui::Components
}
this->setOwnModelAndIcaoValues(reverseModel);
// open dialog for model mapping
if (m_autoPopupWizard && !reverseModel.isLoadedFromDb())
{
this->mappingWizard();
}
// check state of own aircraft
this->updateOwnAircraftCallsignAndPilotFromGuiValues();
@@ -741,31 +733,6 @@ namespace BlackGui::Components
m_changedLoginDataDigestSignal.inputSignal();
}
void CLoginComponent::mappingWizard()
{
if (!sGui || !sGui->getIContextOwnAircraft() || sGui->isShuttingDown()) { return; }
if (!sGui->hasMinimumMappingVersion()) { return; }
if (!m_mappingWizard)
{
m_mappingWizard.reset(new CDbQuickMappingWizard(this));
}
if (sGui->getIContextSimulator()->isSimulatorAvailable())
{
// preset on model
const CAircraftModel model(sGui->getIContextOwnAircraft()->getOwnAircraft().getModel());
m_mappingWizard->presetModel(model);
}
else
{
// preset on GUI values only
const CAircraftIcaoCode icao(ui->selector_AircraftIcao->getAircraftIcao());
m_mappingWizard->presetAircraftIcao(icao);
}
m_mappingWizard->show();
}
void CLoginComponent::toggleTimeout()
{
if (m_logoffCountdownTimer.isActive())

View File

@@ -41,8 +41,6 @@ namespace BlackMisc::Simulation
}
namespace BlackGui::Components
{
class CDbQuickMappingWizard;
/*!
* Login component to flight network
*/
@@ -184,9 +182,6 @@ namespace BlackGui::Components
//! Simulator model has been changed
void onSimulatorModelChanged(const BlackMisc::Simulation::CAircraftModel &model);
//! Launch mapping wizard
void mappingWizard();
//! Pause/Continue timeout
void toggleTimeout();
@@ -242,9 +237,7 @@ namespace BlackGui::Components
static constexpr int LogoffIntervalSeconds = 20; //!< time before logoff
QScopedPointer<Ui::CLoginComponent> ui;
QScopedPointer<CDbQuickMappingWizard> m_mappingWizard; //!< mapping wizard
BlackMisc::CDigestSignal m_changedLoginDataDigestSignal { this, &CLoginComponent::loginDataChangedDigest, 1500, 10 };
bool m_autoPopupWizard = false; //!< automatically popup wizard if mapping is needed
bool m_updatePilotOnServerChanges = true;
bool m_networkConnected = false;
bool m_simulatorConnected = false;

View File

@@ -467,23 +467,6 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_MappingWizard">
<property name="maximumSize">
<size>
<width>35</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>quick mapping wizard</string>
</property>
<property name="icon">
<iconset>
<normaloff>:/own/icons/own/swift3D/sw3DGreen-24.png</normaloff>:/own/icons/own/swift3D/sw3DGreen-24.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -906,7 +889,6 @@
<tabstop>form_Pilot</tabstop>
<tabstop>le_SimulatorModel</tabstop>
<tabstop>pb_SimulatorLookup</tabstop>
<tabstop>pb_MappingWizard</tabstop>
<tabstop>le_Callsign</tabstop>
<tabstop>selector_AircraftIcao</tabstop>
<tabstop>le_AircraftCombinedType</tabstop>

View File

@@ -4,7 +4,6 @@
#include "ui_loginoverviewcomponent.h"
#include "loginoverviewcomponent.h"
#include "blackgui/components/serverlistselector.h"
#include "blackgui/components/dbquickmappingwizard.h"
#include "blackgui/editors/serverform.h"
#include "blackgui/editors/pilotform.h"
#include "blackgui/guiapplication.h"

View File

@@ -3,7 +3,6 @@
#include "ownaircraftcomponent.h"
#include "ui_ownaircraftcomponent.h"
#include "blackgui/components/dbquickmappingwizard.h"
#include "blackgui/uppercasevalidator.h"
#include "blackgui/guiapplication.h"
@@ -65,7 +64,6 @@ namespace BlackGui::Components
connect(ui->selector_AircraftIcao, &CDbAircraftIcaoSelectorComponent::changedAircraftIcao, this, &COwnAircraftComponent::changedAircraftIcao, Qt::QueuedConnection);
connect(ui->selector_AirlineIcao, &CDbAirlineIcaoSelectorComponent::changedAirlineIcao, this, &COwnAircraftComponent::changedAirlineIcao, Qt::QueuedConnection);
connect(ui->pb_SimulatorLookup, &QPushButton::clicked, this, &COwnAircraftComponent::lookupOwnAircraftModel);
connect(ui->pb_MappingWizard, &QPushButton::clicked, this, &COwnAircraftComponent::mappingWizard, Qt::QueuedConnection);
connect(ui->pb_Clear, &QPushButton::clicked, this, &COwnAircraftComponent::clearLivery, Qt::QueuedConnection);
if (sGui && sGui->getIContextSimulator())
@@ -126,12 +124,6 @@ namespace BlackGui::Components
}
this->setOwnModelAndIcaoValues(reverseModel);
// open dialog for model mapping
if (m_autoPopupWizard && !reverseModel.isLoadedFromDb())
{
this->mappingWizard();
}
emit this->aircraftDataChanged();
}
@@ -349,31 +341,6 @@ namespace BlackGui::Components
}
}
void COwnAircraftComponent::mappingWizard()
{
if (!sGui || !sGui->getIContextOwnAircraft() || sGui->isShuttingDown()) { return; }
if (!sGui->hasMinimumMappingVersion()) { return; }
if (!m_mappingWizard)
{
m_mappingWizard.reset(new CDbQuickMappingWizard(this));
}
if (sGui->getIContextSimulator()->isSimulatorAvailable())
{
// preset on model
const CAircraftModel model(sGui->getIContextOwnAircraft()->getOwnAircraft().getModel());
m_mappingWizard->presetModel(model);
}
else
{
// preset on GUI values only
const CAircraftIcaoCode icao(ui->selector_AircraftIcao->getAircraftIcao());
m_mappingWizard->presetAircraftIcao(icao);
}
m_mappingWizard->show();
}
bool COwnAircraftComponent::updateOwnAircaftIcaoValuesFromGuiValues()
{
if (!this->hasValidContexts()) { return false; }

View File

@@ -22,8 +22,6 @@ namespace Ui
}
namespace BlackGui::Components
{
class CDbQuickMappingWizard;
//! Own aircraft
class COwnAircraftComponent : public QFrame
{
@@ -74,9 +72,6 @@ namespace BlackGui::Components
void aircraftDataChanged();
private:
//! Launch mapping wizard
void mappingWizard();
//! Lookup own model
void lookupOwnAircraftModel();
@@ -111,8 +106,6 @@ namespace BlackGui::Components
//! Get a prefill model
BlackMisc::Simulation::CAircraftModel getPrefillModel() const;
bool m_autoPopupWizard = false; //!< automatically popup wizard if mapping is needed
QScopedPointer<CDbQuickMappingWizard> m_mappingWizard; //!< mapping wizard
BlackMisc::CData<BlackMisc::Simulation::Data::TLastModel> m_lastAircraftModel { this }; //!< recently used aircraft model
QScopedPointer<Ui::COwnAircraftComponent> ui;
};

View File

@@ -140,23 +140,6 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pb_MappingWizard">
<property name="maximumSize">
<size>
<width>35</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>quick mapping wizard</string>
</property>
<property name="icon">
<iconset resource="../../blackmisc/blackmisc.qrc">
<normaloff>:/own/icons/own/swift3D/sw3DGreen-24.png</normaloff>:/own/icons/own/swift3D/sw3DGreen-24.png</iconset>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -325,7 +308,6 @@
<tabstops>
<tabstop>le_SimulatorModel</tabstop>
<tabstop>pb_SimulatorLookup</tabstop>
<tabstop>pb_MappingWizard</tabstop>
<tabstop>cb_Model</tabstop>
<tabstop>comp_ModelStringCompleter</tabstop>
<tabstop>cb_Livery</tabstop>