mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-19 03:45:30 +08:00
fix(ui): Disable broken quick mapping wizard
This commit is contained in:
@@ -384,7 +384,7 @@ add_library(gui SHARED
|
|||||||
components/dbreducemodelduplicates.cpp
|
components/dbreducemodelduplicates.cpp
|
||||||
components/countryselector.ui
|
components/countryselector.ui
|
||||||
components/coordinatedialog.ui
|
components/coordinatedialog.ui
|
||||||
components/dbquickmappingwizard.h
|
#components/dbquickmappingwizard.h
|
||||||
components/dbmodelcomponent.cpp
|
components/dbmodelcomponent.cpp
|
||||||
components/modelconverterxsetupcomponent.cpp
|
components/modelconverterxsetupcomponent.cpp
|
||||||
components/logcomponent.h
|
components/logcomponent.h
|
||||||
@@ -509,7 +509,7 @@ add_library(gui SHARED
|
|||||||
components/mappingcomponent.ui
|
components/mappingcomponent.ui
|
||||||
components/datasettingscomponent.h
|
components/datasettingscomponent.h
|
||||||
components/dbmodelworkbenchcomponent.cpp
|
components/dbmodelworkbenchcomponent.cpp
|
||||||
components/dbquickmappingwizard.ui
|
#components/dbquickmappingwizard.ui
|
||||||
components/aircraftpartshistory.cpp
|
components/aircraftpartshistory.cpp
|
||||||
components/radarcomponent.ui
|
components/radarcomponent.ui
|
||||||
components/simbriefdownloaddialog.h
|
components/simbriefdownloaddialog.h
|
||||||
@@ -677,7 +677,7 @@ add_library(gui SHARED
|
|||||||
components/logcomponent.cpp
|
components/logcomponent.cpp
|
||||||
components/configurationwizard.cpp
|
components/configurationwizard.cpp
|
||||||
components/downloadcomponent.ui
|
components/downloadcomponent.ui
|
||||||
components/dbquickmappingwizard.cpp
|
#components/dbquickmappingwizard.cpp
|
||||||
components/aircraftcombinedtypeselector.h
|
components/aircraftcombinedtypeselector.h
|
||||||
components/dbownmodelsetformdialog.cpp
|
components/dbownmodelsetformdialog.cpp
|
||||||
components/dbmodelworkbenchcomponent.ui
|
components/dbmodelworkbenchcomponent.ui
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
#include "ui_loginadvcomponent.h"
|
#include "ui_loginadvcomponent.h"
|
||||||
#include "loginadvcomponent.h"
|
#include "loginadvcomponent.h"
|
||||||
#include "blackgui/components/serverlistselector.h"
|
#include "blackgui/components/serverlistselector.h"
|
||||||
#include "blackgui/components/dbquickmappingwizard.h"
|
|
||||||
#include "blackgui/editors/serverform.h"
|
#include "blackgui/editors/serverform.h"
|
||||||
#include "blackgui/editors/pilotform.h"
|
#include "blackgui/editors/pilotform.h"
|
||||||
#include "blackgui/guiapplication.h"
|
#include "blackgui/guiapplication.h"
|
||||||
|
|||||||
@@ -38,8 +38,6 @@ namespace BlackMisc::Simulation
|
|||||||
}
|
}
|
||||||
namespace BlackGui::Components
|
namespace BlackGui::Components
|
||||||
{
|
{
|
||||||
class CDbQuickMappingWizard;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Login component to flight network
|
* Login component to flight network
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
#include "ui_logincomponent.h"
|
#include "ui_logincomponent.h"
|
||||||
#include "logincomponent.h"
|
#include "logincomponent.h"
|
||||||
#include "blackgui/components/serverlistselector.h"
|
#include "blackgui/components/serverlistselector.h"
|
||||||
#include "blackgui/components/dbquickmappingwizard.h"
|
|
||||||
#include "blackgui/editors/serverform.h"
|
#include "blackgui/editors/serverform.h"
|
||||||
#include "blackgui/editors/pilotform.h"
|
#include "blackgui/editors/pilotform.h"
|
||||||
#include "blackgui/guiapplication.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_Cancel, &QPushButton::clicked, this, &CLoginComponent::loginCancelled, Qt::QueuedConnection);
|
||||||
connect(ui->pb_Ok, &QPushButton::clicked, this, &CLoginComponent::toggleNetworkConnection, 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_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);
|
connect(&m_networkSetup, &CNetworkSetup::setupChanged, this, &CLoginComponent::reloadOtherServersSetup, Qt::QueuedConnection);
|
||||||
|
|
||||||
ui->form_FsdDetails->showEnableInfo(true);
|
ui->form_FsdDetails->showEnableInfo(true);
|
||||||
@@ -728,12 +726,6 @@ namespace BlackGui::Components
|
|||||||
}
|
}
|
||||||
this->setOwnModelAndIcaoValues(reverseModel);
|
this->setOwnModelAndIcaoValues(reverseModel);
|
||||||
|
|
||||||
// open dialog for model mapping
|
|
||||||
if (m_autoPopupWizard && !reverseModel.isLoadedFromDb())
|
|
||||||
{
|
|
||||||
this->mappingWizard();
|
|
||||||
}
|
|
||||||
|
|
||||||
// check state of own aircraft
|
// check state of own aircraft
|
||||||
this->updateOwnAircraftCallsignAndPilotFromGuiValues();
|
this->updateOwnAircraftCallsignAndPilotFromGuiValues();
|
||||||
|
|
||||||
@@ -741,31 +733,6 @@ namespace BlackGui::Components
|
|||||||
m_changedLoginDataDigestSignal.inputSignal();
|
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()
|
void CLoginComponent::toggleTimeout()
|
||||||
{
|
{
|
||||||
if (m_logoffCountdownTimer.isActive())
|
if (m_logoffCountdownTimer.isActive())
|
||||||
|
|||||||
@@ -41,8 +41,6 @@ namespace BlackMisc::Simulation
|
|||||||
}
|
}
|
||||||
namespace BlackGui::Components
|
namespace BlackGui::Components
|
||||||
{
|
{
|
||||||
class CDbQuickMappingWizard;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Login component to flight network
|
* Login component to flight network
|
||||||
*/
|
*/
|
||||||
@@ -184,9 +182,6 @@ namespace BlackGui::Components
|
|||||||
//! Simulator model has been changed
|
//! Simulator model has been changed
|
||||||
void onSimulatorModelChanged(const BlackMisc::Simulation::CAircraftModel &model);
|
void onSimulatorModelChanged(const BlackMisc::Simulation::CAircraftModel &model);
|
||||||
|
|
||||||
//! Launch mapping wizard
|
|
||||||
void mappingWizard();
|
|
||||||
|
|
||||||
//! Pause/Continue timeout
|
//! Pause/Continue timeout
|
||||||
void toggleTimeout();
|
void toggleTimeout();
|
||||||
|
|
||||||
@@ -242,9 +237,7 @@ namespace BlackGui::Components
|
|||||||
static constexpr int LogoffIntervalSeconds = 20; //!< time before logoff
|
static constexpr int LogoffIntervalSeconds = 20; //!< time before logoff
|
||||||
|
|
||||||
QScopedPointer<Ui::CLoginComponent> ui;
|
QScopedPointer<Ui::CLoginComponent> ui;
|
||||||
QScopedPointer<CDbQuickMappingWizard> m_mappingWizard; //!< mapping wizard
|
|
||||||
BlackMisc::CDigestSignal m_changedLoginDataDigestSignal { this, &CLoginComponent::loginDataChangedDigest, 1500, 10 };
|
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_updatePilotOnServerChanges = true;
|
||||||
bool m_networkConnected = false;
|
bool m_networkConnected = false;
|
||||||
bool m_simulatorConnected = false;
|
bool m_simulatorConnected = false;
|
||||||
|
|||||||
@@ -467,23 +467,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -906,7 +889,6 @@
|
|||||||
<tabstop>form_Pilot</tabstop>
|
<tabstop>form_Pilot</tabstop>
|
||||||
<tabstop>le_SimulatorModel</tabstop>
|
<tabstop>le_SimulatorModel</tabstop>
|
||||||
<tabstop>pb_SimulatorLookup</tabstop>
|
<tabstop>pb_SimulatorLookup</tabstop>
|
||||||
<tabstop>pb_MappingWizard</tabstop>
|
|
||||||
<tabstop>le_Callsign</tabstop>
|
<tabstop>le_Callsign</tabstop>
|
||||||
<tabstop>selector_AircraftIcao</tabstop>
|
<tabstop>selector_AircraftIcao</tabstop>
|
||||||
<tabstop>le_AircraftCombinedType</tabstop>
|
<tabstop>le_AircraftCombinedType</tabstop>
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
#include "ui_loginoverviewcomponent.h"
|
#include "ui_loginoverviewcomponent.h"
|
||||||
#include "loginoverviewcomponent.h"
|
#include "loginoverviewcomponent.h"
|
||||||
#include "blackgui/components/serverlistselector.h"
|
#include "blackgui/components/serverlistselector.h"
|
||||||
#include "blackgui/components/dbquickmappingwizard.h"
|
|
||||||
#include "blackgui/editors/serverform.h"
|
#include "blackgui/editors/serverform.h"
|
||||||
#include "blackgui/editors/pilotform.h"
|
#include "blackgui/editors/pilotform.h"
|
||||||
#include "blackgui/guiapplication.h"
|
#include "blackgui/guiapplication.h"
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#include "ownaircraftcomponent.h"
|
#include "ownaircraftcomponent.h"
|
||||||
#include "ui_ownaircraftcomponent.h"
|
#include "ui_ownaircraftcomponent.h"
|
||||||
#include "blackgui/components/dbquickmappingwizard.h"
|
|
||||||
|
|
||||||
#include "blackgui/uppercasevalidator.h"
|
#include "blackgui/uppercasevalidator.h"
|
||||||
#include "blackgui/guiapplication.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_AircraftIcao, &CDbAircraftIcaoSelectorComponent::changedAircraftIcao, this, &COwnAircraftComponent::changedAircraftIcao, Qt::QueuedConnection);
|
||||||
connect(ui->selector_AirlineIcao, &CDbAirlineIcaoSelectorComponent::changedAirlineIcao, this, &COwnAircraftComponent::changedAirlineIcao, 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_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);
|
connect(ui->pb_Clear, &QPushButton::clicked, this, &COwnAircraftComponent::clearLivery, Qt::QueuedConnection);
|
||||||
|
|
||||||
if (sGui && sGui->getIContextSimulator())
|
if (sGui && sGui->getIContextSimulator())
|
||||||
@@ -126,12 +124,6 @@ namespace BlackGui::Components
|
|||||||
}
|
}
|
||||||
this->setOwnModelAndIcaoValues(reverseModel);
|
this->setOwnModelAndIcaoValues(reverseModel);
|
||||||
|
|
||||||
// open dialog for model mapping
|
|
||||||
if (m_autoPopupWizard && !reverseModel.isLoadedFromDb())
|
|
||||||
{
|
|
||||||
this->mappingWizard();
|
|
||||||
}
|
|
||||||
|
|
||||||
emit this->aircraftDataChanged();
|
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()
|
bool COwnAircraftComponent::updateOwnAircaftIcaoValuesFromGuiValues()
|
||||||
{
|
{
|
||||||
if (!this->hasValidContexts()) { return false; }
|
if (!this->hasValidContexts()) { return false; }
|
||||||
|
|||||||
@@ -22,8 +22,6 @@ namespace Ui
|
|||||||
}
|
}
|
||||||
namespace BlackGui::Components
|
namespace BlackGui::Components
|
||||||
{
|
{
|
||||||
class CDbQuickMappingWizard;
|
|
||||||
|
|
||||||
//! Own aircraft
|
//! Own aircraft
|
||||||
class COwnAircraftComponent : public QFrame
|
class COwnAircraftComponent : public QFrame
|
||||||
{
|
{
|
||||||
@@ -74,9 +72,6 @@ namespace BlackGui::Components
|
|||||||
void aircraftDataChanged();
|
void aircraftDataChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//! Launch mapping wizard
|
|
||||||
void mappingWizard();
|
|
||||||
|
|
||||||
//! Lookup own model
|
//! Lookup own model
|
||||||
void lookupOwnAircraftModel();
|
void lookupOwnAircraftModel();
|
||||||
|
|
||||||
@@ -111,8 +106,6 @@ namespace BlackGui::Components
|
|||||||
//! Get a prefill model
|
//! Get a prefill model
|
||||||
BlackMisc::Simulation::CAircraftModel getPrefillModel() const;
|
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
|
BlackMisc::CData<BlackMisc::Simulation::Data::TLastModel> m_lastAircraftModel { this }; //!< recently used aircraft model
|
||||||
QScopedPointer<Ui::COwnAircraftComponent> ui;
|
QScopedPointer<Ui::COwnAircraftComponent> ui;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -140,23 +140,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -325,7 +308,6 @@
|
|||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>le_SimulatorModel</tabstop>
|
<tabstop>le_SimulatorModel</tabstop>
|
||||||
<tabstop>pb_SimulatorLookup</tabstop>
|
<tabstop>pb_SimulatorLookup</tabstop>
|
||||||
<tabstop>pb_MappingWizard</tabstop>
|
|
||||||
<tabstop>cb_Model</tabstop>
|
<tabstop>cb_Model</tabstop>
|
||||||
<tabstop>comp_ModelStringCompleter</tabstop>
|
<tabstop>comp_ModelStringCompleter</tabstop>
|
||||||
<tabstop>cb_Livery</tabstop>
|
<tabstop>cb_Livery</tabstop>
|
||||||
|
|||||||
Reference in New Issue
Block a user