mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-05 09:45:44 +08:00
refs #768, use new tooltips in login comment
(plus some minor adjustments)
This commit is contained in:
@@ -129,7 +129,7 @@ namespace BlackGui
|
|||||||
connect(ui->le_AircraftCombinedType, &QLineEdit::editingFinished, this, &CLoginComponent::ps_validateAircraftValues);
|
connect(ui->le_AircraftCombinedType, &QLineEdit::editingFinished, this, &CLoginComponent::ps_validateAircraftValues);
|
||||||
connect(ui->selector_AircraftIcao, &CDbAircraftIcaoSelectorComponent::changedAircraftIcao, this, &CLoginComponent::ps_changedAircraftIcao);
|
connect(ui->selector_AircraftIcao, &CDbAircraftIcaoSelectorComponent::changedAircraftIcao, this, &CLoginComponent::ps_changedAircraftIcao);
|
||||||
connect(ui->selector_AirlineIcao, &CDbAirlineIcaoSelectorComponent::changedAirlineIcao, this, &CLoginComponent::ps_changedAirlineIcao);
|
connect(ui->selector_AirlineIcao, &CDbAirlineIcaoSelectorComponent::changedAirlineIcao, this, &CLoginComponent::ps_changedAirlineIcao);
|
||||||
connect(ui->tb_SimulatorIcaoReverseLookup, &QToolButton::clicked, this, &CLoginComponent::ps_reverseLookupAircraftIcaoData);
|
connect(ui->tb_SimulatorIcaoReverseLookup, &QToolButton::clicked, this, &CLoginComponent::ps_reverseLookupAircraftModel);
|
||||||
|
|
||||||
if (sGui && sGui->getIContextSimulator())
|
if (sGui && sGui->getIContextSimulator())
|
||||||
{
|
{
|
||||||
@@ -455,6 +455,7 @@ namespace BlackGui
|
|||||||
ui->le_SimulatorModel->setText("");
|
ui->le_SimulatorModel->setText("");
|
||||||
this->highlightModelField();
|
this->highlightModelField();
|
||||||
}
|
}
|
||||||
|
ui->le_SimulatorModel->setToolTip(model.asHtmlSummary());
|
||||||
|
|
||||||
// reset the model
|
// reset the model
|
||||||
if (model.isLoadedFromDb())
|
if (model.isLoadedFromDb())
|
||||||
@@ -566,7 +567,7 @@ namespace BlackGui
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLoginComponent::ps_reverseLookupAircraftIcaoData()
|
void CLoginComponent::ps_reverseLookupAircraftModel()
|
||||||
{
|
{
|
||||||
if (!sGui->getIContextSimulator()->isSimulatorAvailable()) { return; }
|
if (!sGui->getIContextSimulator()->isSimulatorAvailable()) { return; }
|
||||||
const CAircraftModel model(sGui->getIContextOwnAircraft()->getOwnAircraft().getModel());
|
const CAircraftModel model(sGui->getIContextOwnAircraft()->getOwnAircraft().getModel());
|
||||||
@@ -576,15 +577,15 @@ namespace BlackGui
|
|||||||
void CLoginComponent::ps_simulatorModelChanged(const CAircraftModel &model)
|
void CLoginComponent::ps_simulatorModelChanged(const CAircraftModel &model)
|
||||||
{
|
{
|
||||||
Q_ASSERT_X(sGui && sGui->getIContextNetwork(), Q_FUNC_INFO, "Missing context");
|
Q_ASSERT_X(sGui && sGui->getIContextNetwork(), Q_FUNC_INFO, "Missing context");
|
||||||
const bool isConnected = sGui && sGui->getIContextNetwork()->isConnected();
|
const bool isNetworkConnected = sGui && sGui->getIContextNetwork()->isConnected();
|
||||||
if (isConnected) { return; }
|
if (isNetworkConnected) { return; }
|
||||||
const QString modelStr(model.hasModelString() ? model.getModelString() : "<unknown>");
|
const QString modelStr(model.hasModelString() ? model.getModelString() : "<unknown>");
|
||||||
if (!model.hasModelString())
|
if (!model.hasModelString())
|
||||||
{
|
{
|
||||||
CLogMessage(this).validationInfo("Invalid lookup for '%1' successful: %2") << modelStr << model.toQString();
|
CLogMessage(this).validationInfo("Invalid lookup for '%1' successful: %2") << modelStr << model.toQString();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->setGuiIcaoValues(model, false);
|
this->setOwnModelAndIcaoValues();
|
||||||
|
|
||||||
// open dialog for model mapping
|
// open dialog for model mapping
|
||||||
if (this->m_autoPopupWizard && !model.isLoadedFromDb())
|
if (this->m_autoPopupWizard && !model.isLoadedFromDb())
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ namespace BlackGui
|
|||||||
void loginDataChanged();
|
void loginDataChanged();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
//! Main info area chnaged
|
//! Main info area changed
|
||||||
void mainInfoAreaChanged(const QWidget *currentWidget);
|
void mainInfoAreaChanged(const QWidget *currentWidget);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
@@ -114,7 +114,7 @@ namespace BlackGui
|
|||||||
void ps_logoffCountdown();
|
void ps_logoffCountdown();
|
||||||
|
|
||||||
//! Reverse lookup model
|
//! Reverse lookup model
|
||||||
void ps_reverseLookupAircraftIcaoData();
|
void ps_reverseLookupAircraftModel();
|
||||||
|
|
||||||
//! Simulator model has been changed
|
//! Simulator model has been changed
|
||||||
void ps_simulatorModelChanged(const BlackMisc::Simulation::CAircraftModel &model);
|
void ps_simulatorModelChanged(const BlackMisc::Simulation::CAircraftModel &model);
|
||||||
|
|||||||
Reference in New Issue
Block a user