mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
refs #768, login component
* opens wizard when a model is unknown * now uses new completers
This commit is contained in:
@@ -16,9 +16,10 @@
|
||||
#include "blackcore/data/globalsetup.h"
|
||||
#include "blackcore/network.h"
|
||||
#include "blackcore/simulator.h"
|
||||
#include "blackgui/components/logincomponent.h"
|
||||
#include "logincomponent.h"
|
||||
#include "serverlistselector.h"
|
||||
#include "dbquickmappingwizard.h"
|
||||
#include "blackgui/editors/serverform.h"
|
||||
#include "blackgui/components/serverlistselector.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackgui/loginmodebuttons.h"
|
||||
#include "blackgui/ticklabel.h"
|
||||
@@ -79,19 +80,23 @@ namespace BlackGui
|
||||
ui->pb_LogoffTimeout->setValue(LogoffIntervalSeconds);
|
||||
connect(this->m_logoffCountdownTimer, &QTimer::timeout, this, &CLoginComponent::ps_logoffCountdown);
|
||||
|
||||
ui->selector_AircraftIcao->displayWithIcaoDescription(false);
|
||||
ui->selector_AirlineIcao->displayWithIcaoDescription(false);
|
||||
ui->selector_AircraftIcao->displayMode(CDbAircraftIcaoSelectorComponent::DisplayIcaoAndId);
|
||||
ui->selector_AirlineIcao->displayMode(CDbAirlineIcaoSelectorComponent::DisplayVDesignatorAndId);
|
||||
|
||||
setOkButtonString(false);
|
||||
connect(ui->bb_OkCancel, &QDialogButtonBox::rejected, this, &CLoginComponent::ps_loginCancelled);
|
||||
connect(ui->bb_OkCancel, &QDialogButtonBox::accepted, this, &CLoginComponent::ps_toggleNetworkConnection);
|
||||
connect(ui->pb_OtherServersGotoSettings, &QPushButton::pressed, this, &CLoginComponent::requestNetworkSettings);
|
||||
connect(ui->tb_MappingWizard, &QToolButton::clicked, this, &CLoginComponent::ps_mappingWizard);
|
||||
|
||||
ui->comp_FsdDetails->showEnableInfo(true);
|
||||
ui->comp_FsdDetails->setFsdSetupEnabled(false);
|
||||
|
||||
ui->lblp_SimulatorModel->setToolTips("available", "unavailable");
|
||||
ui->lblp_SimulatorModel->setPixmapUnticked(CIcons::empty());
|
||||
ui->lblp_AircraftCombinedType->setToolTips("ok", "wrong");
|
||||
ui->lblp_AircraftIcaoAirline->setToolTips("ok", "wrong");
|
||||
ui->lblp_AircraftIcaoDesignator->setToolTips("ok", "wrong");
|
||||
ui->lblp_AirlineIcao->setToolTips("ok", "wrong");
|
||||
ui->lblp_AircraftIcao->setToolTips("ok", "wrong");
|
||||
ui->lblp_Callsign->setToolTips("ok", "wrong");
|
||||
ui->lblp_VatsimHomeAirport->setToolTips("ok", "wrong");
|
||||
ui->lblp_VatsimId->setToolTips("ok", "wrong");
|
||||
@@ -122,15 +127,9 @@ namespace BlackGui
|
||||
ui->le_AircraftCombinedType->setMaxLength(3);
|
||||
ui->le_AircraftCombinedType->setValidator(new CUpperCaseValidator(this));
|
||||
connect(ui->le_AircraftCombinedType, &QLineEdit::editingFinished, this, &CLoginComponent::ps_validateAircraftValues);
|
||||
|
||||
ui->le_AirlineIcaoDesignator->setMaxLength(5);
|
||||
ui->le_AirlineIcaoDesignator->setValidator(new CUpperCaseValidator(this));
|
||||
connect(ui->le_AirlineIcaoDesignator, &QLineEdit::editingFinished, this, &CLoginComponent::ps_validateAircraftValues);
|
||||
|
||||
ui->le_AircraftIcaoDesignator->setMaxLength(5);
|
||||
ui->le_AircraftIcaoDesignator->setValidator(new CUpperCaseValidator(this));
|
||||
connect(ui->le_AircraftIcaoDesignator, &QLineEdit::editingFinished, this, &CLoginComponent::ps_validateAircraftValues);
|
||||
connect(ui->tb_SimulatorIcaoReverseLookup, &QToolButton::clicked, this, &CLoginComponent::ps_reverseLookupModel);
|
||||
connect(ui->selector_AircraftIcao, &CDbAircraftIcaoSelectorComponent::changedAircraftIcao, this, &CLoginComponent::ps_changedAircraftIcao);
|
||||
connect(ui->selector_AirlineIcao, &CDbAirlineIcaoSelectorComponent::changedAirlineIcao, this, &CLoginComponent::ps_changedAirlineIcao);
|
||||
connect(ui->tb_SimulatorIcaoReverseLookup, &QToolButton::clicked, this, &CLoginComponent::ps_reverseLookupAircraftIcaoData);
|
||||
|
||||
if (sGui && sGui->getIContextSimulator())
|
||||
{
|
||||
@@ -156,6 +155,12 @@ namespace BlackGui
|
||||
CLogMessage(this).info("Added servers for testing");
|
||||
}
|
||||
ui->comp_OtherServers->setServers(otherServers);
|
||||
|
||||
// init completers if data are already available
|
||||
if (sGui && sGui->hasWebDataServices())
|
||||
{
|
||||
this->initCompleters(CEntityFlags::AircraftIcaoEntity | CEntityFlags::AirlineIcaoEntity | CEntityFlags::AirportEntity);
|
||||
}
|
||||
}
|
||||
|
||||
CLoginComponent::~CLoginComponent()
|
||||
@@ -229,18 +234,18 @@ namespace BlackGui
|
||||
CAirlineIcaoCode airlineCode(ownAircraft.getAirlineIcaoCode());
|
||||
|
||||
bool setIcaoCodes = false;
|
||||
if (!ownAircraft.hasAircraftDesignator() && !aircraftValues.ownAircraftIcaoTypeDesignator.isEmpty())
|
||||
if (!ownAircraft.hasAircraftDesignator() && aircraftValues.ownAircraftIcao.hasValidDesignator())
|
||||
{
|
||||
aircraftCode = CAircraftIcaoCode(aircraftValues.ownAircraftIcaoTypeDesignator, aircraftValues.ownAircraftCombinedType);
|
||||
aircraftCode = aircraftValues.ownAircraftIcao;
|
||||
setIcaoCodes = true;
|
||||
}
|
||||
if (!ownAircraft.hasAircraftDesignator() && !aircraftValues.ownAircraftIcaoAirline.isEmpty())
|
||||
if (!ownAircraft.hasAircraftDesignator() && aircraftValues.ownAirlineIcao.hasValidDesignator())
|
||||
{
|
||||
airlineCode = CAirlineIcaoCode(aircraftValues.ownAircraftIcaoAirline);
|
||||
airlineCode = aircraftValues.ownAirlineIcao;
|
||||
setIcaoCodes = true;
|
||||
}
|
||||
|
||||
if (ownAircraft.getCallsign().asString() != aircraftValues.ownCallsign)
|
||||
if (ownAircraft.getCallsign() != aircraftValues.ownCallsign)
|
||||
{
|
||||
ownAircraft.setCallsign(aircraftValues.ownCallsign);
|
||||
sGui->getIContextOwnAircraft()->updateOwnCallsign(ownAircraft.getCallsign());
|
||||
@@ -366,9 +371,9 @@ namespace BlackGui
|
||||
CLoginComponent::CGuiAircraftValues CLoginComponent::getAircraftValuesFromGui() const
|
||||
{
|
||||
CGuiAircraftValues values;
|
||||
values.ownCallsign = ui->le_Callsign->text().trimmed().toUpper();
|
||||
values.ownAircraftIcaoTypeDesignator = CAircraftIcaoCode::normalizeDesignator(ui->le_AircraftIcaoDesignator->text());
|
||||
values.ownAircraftIcaoAirline = CAirlineIcaoCode::normalizeDesignator(ui->le_AirlineIcaoDesignator->text());
|
||||
values.ownCallsign = CCallsign(ui->le_Callsign->text().trimmed().toUpper());
|
||||
values.ownAircraftIcao = ui->selector_AircraftIcao->getAircraftIcao();
|
||||
values.ownAirlineIcao = ui->selector_AirlineIcao->getAirlineIcao();
|
||||
values.ownAircraftCombinedType = ui->le_AircraftCombinedType->text().trimmed().toUpper();
|
||||
values.ownAircraftSimulatorModel = ui->le_SimulatorModel->text().trimmed().toUpper();
|
||||
return values;
|
||||
@@ -440,7 +445,8 @@ namespace BlackGui
|
||||
if (simulating)
|
||||
{
|
||||
model = sGui->getIContextOwnAircraft()->getOwnAircraft().getModel();
|
||||
ui->le_SimulatorModel->setText(model.getModelString());
|
||||
ui->le_SimulatorModel->setText(model.getModelStringAndDbKey());
|
||||
this->highlightModelField(model);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -450,7 +456,8 @@ namespace BlackGui
|
||||
model = this->m_currentAircraftModel.get();
|
||||
if (!model.hasAircraftDesignator()) { model = defaultModel; }
|
||||
ui->gbp_LoginMode->setLoginMode(INetwork::LoginNormal); //! \todo Set observer mode without simulator, currently not working in OBS mode
|
||||
ui->le_SimulatorModel->setText("No simulator");
|
||||
ui->le_SimulatorModel->setText("");
|
||||
this->highlightModelField();
|
||||
}
|
||||
|
||||
if (model.hasAircraftDesignator())
|
||||
@@ -462,13 +469,13 @@ namespace BlackGui
|
||||
void CLoginComponent::setGuiIcaoValues(const CAircraftModel &model, bool onlyIfEmpty)
|
||||
{
|
||||
ui->le_SimulatorModel->setText(model.getModelStringAndDbKey());
|
||||
if (!onlyIfEmpty || ui->le_AircraftIcaoDesignator->text().trimmed().isEmpty())
|
||||
if (!onlyIfEmpty || !ui->selector_AircraftIcao->isSet())
|
||||
{
|
||||
ui->le_AircraftIcaoDesignator->setText(model.getAircraftIcaoCode().getDesignator());
|
||||
ui->selector_AircraftIcao->setAircraftIcao(model.getAircraftIcaoCode());
|
||||
}
|
||||
if (!onlyIfEmpty || ui->le_AirlineIcaoDesignator->text().trimmed().isEmpty())
|
||||
if (!onlyIfEmpty || !ui->selector_AirlineIcao->isSet())
|
||||
{
|
||||
ui->le_AirlineIcaoDesignator->setText(model.getAirlineIcaoCode().getDesignator());
|
||||
ui->selector_AirlineIcao->setAirlineIcao(model.getAirlineIcaoCode());
|
||||
}
|
||||
if (!onlyIfEmpty || ui->le_AircraftCombinedType->text().trimmed().isEmpty())
|
||||
{
|
||||
@@ -484,20 +491,17 @@ namespace BlackGui
|
||||
const bool validCombinedType = CAircraftIcaoCode::isValidCombinedType(values.ownAircraftCombinedType);
|
||||
ui->lblp_AircraftCombinedType->setTicked(validCombinedType);
|
||||
|
||||
const bool validAirlineDesignator = values.ownAircraftIcaoAirline.isEmpty() || CAircraftIcaoCode::isValidDesignator(values.ownAircraftIcaoAirline);
|
||||
ui->lblp_AircraftIcaoAirline->setTicked(validAirlineDesignator);
|
||||
const bool validAirlineDesignator = values.ownAirlineIcao.hasValidDesignator();
|
||||
ui->lblp_AirlineIcao->setTicked(validAirlineDesignator);
|
||||
|
||||
const bool validIcaoDesignator = CAircraftIcaoCode::isValidDesignator(values.ownAircraftIcaoTypeDesignator);
|
||||
ui->lblp_AircraftIcaoDesignator->setTicked(validIcaoDesignator);
|
||||
const bool validAircraftDesignator = values.ownAircraftIcao.hasValidDesignator();
|
||||
ui->lblp_AircraftIcao->setTicked(validAircraftDesignator);
|
||||
|
||||
const bool validCallsign = CCallsign::isValidAircraftCallsign(values.ownCallsign);
|
||||
ui->lblp_Callsign->setTicked(validCallsign);
|
||||
|
||||
const bool validSimulatorModel = !values.ownAircraftSimulatorModel.isEmpty();
|
||||
ui->lblp_SimulatorModel->setTicked(validSimulatorModel);
|
||||
|
||||
// model intentionally ignored
|
||||
return validCombinedType && validAirlineDesignator && validIcaoDesignator && validCallsign;
|
||||
return validCombinedType && validAirlineDesignator && validAircraftDesignator && validCallsign;
|
||||
}
|
||||
|
||||
bool CLoginComponent::ps_validateVatsimValues()
|
||||
@@ -519,6 +523,21 @@ namespace BlackGui
|
||||
return validVatsimId && validHomeAirport && validVatsimPassword && validRealUserName;
|
||||
}
|
||||
|
||||
void CLoginComponent::ps_changedAircraftIcao(const CAircraftIcaoCode &icao)
|
||||
{
|
||||
if (icao.isLoadedFromDb())
|
||||
{
|
||||
ui->le_AircraftCombinedType->setText(icao.getCombinedType());
|
||||
}
|
||||
this->ps_validateAircraftValues();
|
||||
}
|
||||
|
||||
void CLoginComponent::ps_changedAirlineIcao(const CAirlineIcaoCode &icao)
|
||||
{
|
||||
Q_UNUSED(icao);
|
||||
this->ps_validateAircraftValues();
|
||||
}
|
||||
|
||||
void CLoginComponent::ps_reloadSettings()
|
||||
{
|
||||
CServerList otherServers(this->m_otherTrafficNetworkServers.getThreadLocal());
|
||||
@@ -538,67 +557,62 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CLoginComponent::ps_reverseLookupModel()
|
||||
void CLoginComponent::ps_reverseLookupAircraftIcaoData()
|
||||
{
|
||||
if (!sGui->getIContextSimulator()->isSimulatorAvailable()) { return; }
|
||||
const CAircraftModel model(sGui->getIContextOwnAircraft()->getOwnAircraft().getModel());
|
||||
const QString modelStr(model.hasModelString() ? model.getModelString() : "<unknown>");
|
||||
if (model.getAircraftIcaoCode().hasDesignator())
|
||||
{
|
||||
CLogMessage(this).validationInfo("Reverse lookup for '%1' successful: %2") << modelStr << model.toQString();
|
||||
|
||||
// update GUI
|
||||
this->setGuiIcaoValues(model, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
CLogMessage(this).validationInfo("Reverse lookup for '%1'' failed, set data manually") << modelStr;
|
||||
}
|
||||
this->ps_simulatorModelChanged(model);
|
||||
}
|
||||
|
||||
void CLoginComponent::ps_simulatorModelChanged(const CAircraftModel &model)
|
||||
{
|
||||
const bool isConnected = sGui && sGui->getIContextNetwork()->isConnected();
|
||||
if (isConnected) { return; }
|
||||
const QString modelStr(model.hasModelString() ? model.getModelString() : "<unknown>");
|
||||
if (!model.hasModelString())
|
||||
{
|
||||
CLogMessage(this).validationInfo("Invalid lookup for '%1' successful: %2") << modelStr << model.toQString();
|
||||
return;
|
||||
}
|
||||
this->setGuiIcaoValues(model, false);
|
||||
this->ps_reverseLookupModel();
|
||||
|
||||
// open dialog for model mapping
|
||||
if (this->m_autoPopupWizard && !model.isLoadedFromDb())
|
||||
{
|
||||
this->ps_mappingWizard();
|
||||
}
|
||||
}
|
||||
|
||||
void CLoginComponent::ps_mappingWizard()
|
||||
{
|
||||
if (!this->m_mappingWizard)
|
||||
{
|
||||
this->m_mappingWizard.reset(new CDbQuickMappingWizard(this));
|
||||
}
|
||||
|
||||
if (sGui->getIContextSimulator()->isSimulatorAvailable())
|
||||
{
|
||||
// preset on model
|
||||
const CAircraftModel model(sGui->getIContextOwnAircraft()->getOwnAircraft().getModel());
|
||||
this->m_mappingWizard->presetModel(model);
|
||||
}
|
||||
else
|
||||
{
|
||||
// preset on GUI values only
|
||||
const CAircraftIcaoCode icao(ui->selector_AircraftIcao->getAircraftIcao());
|
||||
this->m_mappingWizard->presetAircraftIcao(icao);
|
||||
}
|
||||
this->m_mappingWizard->show();
|
||||
}
|
||||
|
||||
void CLoginComponent::initCompleters(CEntityFlags::Entity entity)
|
||||
{
|
||||
// completers where possible
|
||||
if (sGui && sGui->getWebDataServices())
|
||||
if (sGui && sGui->hasWebDataServices())
|
||||
{
|
||||
if (entity.testFlag(CEntityFlags::AircraftIcaoEntity) && !ui->le_AircraftIcaoDesignator->completer())
|
||||
{
|
||||
const QStringList aircraftDesignators = sGui->getWebDataServices()->getAircraftIcaoCodes().toCompleterStrings();
|
||||
if (!aircraftDesignators.isEmpty())
|
||||
{
|
||||
QCompleter *completer = new QCompleter(aircraftDesignators, this);
|
||||
QStyledItemDelegate *itemDelegate = new QStyledItemDelegate(completer);
|
||||
completer->popup()->setItemDelegate(itemDelegate);
|
||||
ui->le_AircraftIcaoDesignator->setCompleter(completer);
|
||||
completer->popup()->setObjectName("AircraftCompleter");
|
||||
completer->popup()->setMinimumWidth(175);
|
||||
}
|
||||
}
|
||||
|
||||
if (entity.testFlag(CEntityFlags::AirlineIcaoEntity) && !ui->le_AirlineIcaoDesignator->completer())
|
||||
{
|
||||
const QStringList airlineDesignators = sGui->getWebDataServices()->getAirlineIcaoCodes().toIcaoDesignatorNameCountryCompleterStrings();
|
||||
if (!airlineDesignators.isEmpty())
|
||||
{
|
||||
QCompleter *completer = new QCompleter(airlineDesignators, this);
|
||||
QStyledItemDelegate *itemDelegate = new QStyledItemDelegate(completer);
|
||||
completer->popup()->setItemDelegate(itemDelegate);
|
||||
ui->le_AirlineIcaoDesignator->setCompleter(completer);
|
||||
completer->popup()->setObjectName("AirlineCompleter");
|
||||
completer->popup()->setMinimumWidth(175);
|
||||
}
|
||||
}
|
||||
|
||||
if (entity.testFlag(CEntityFlags::AirportEntity) && !ui->le_VatsimHomeAirport->completer())
|
||||
{
|
||||
// one time init
|
||||
const QStringList airports = sGui->getWebDataServices()->getAirports().allIcaoCodes(true);
|
||||
if (!airports.isEmpty())
|
||||
{
|
||||
@@ -612,5 +626,26 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CLoginComponent::highlightModelField(const CAircraftModel &model)
|
||||
{
|
||||
static const QString error("rgba(255, 0, 0, 40%)");
|
||||
static const QString warning("rgba(255, 255, 0, 40%)");
|
||||
static const QString ok("rgba(0, 255, 0, 40%)");
|
||||
QString color(ok);
|
||||
if (!model.hasModelString())
|
||||
{
|
||||
color = error;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!model.isLoadedFromDb())
|
||||
{
|
||||
color = warning;
|
||||
}
|
||||
}
|
||||
static const QString sheet("background-color: %1;");
|
||||
ui->le_SimulatorModel->setStyleSheet(sheet.arg(color));
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@@ -45,7 +45,11 @@ namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
{
|
||||
//! Login component
|
||||
class CDbQuickMappingWizard;
|
||||
|
||||
/*!
|
||||
* Login component to flight network
|
||||
*/
|
||||
class BLACKGUI_EXPORT CLoginComponent :
|
||||
public QFrame
|
||||
{
|
||||
@@ -58,6 +62,9 @@ namespace BlackGui
|
||||
//! Constructor
|
||||
explicit CLoginComponent(QWidget *parent = nullptr);
|
||||
|
||||
//! Automatically popup
|
||||
void setAutoPopupWizad(bool autoPopup);
|
||||
|
||||
//! Destructor
|
||||
~CLoginComponent();
|
||||
|
||||
@@ -91,6 +98,12 @@ namespace BlackGui
|
||||
//! Validate VATSIM credentials
|
||||
bool ps_validateVatsimValues();
|
||||
|
||||
//! Aircraft ICAO code has been changed
|
||||
void ps_changedAircraftIcao(const BlackMisc::Aviation::CAircraftIcaoCode &icao);
|
||||
|
||||
//! Airline ICAO code has been changed
|
||||
void ps_changedAirlineIcao(const BlackMisc::Aviation::CAirlineIcaoCode &icao);
|
||||
|
||||
//! Settings have been changed
|
||||
void ps_reloadSettings();
|
||||
|
||||
@@ -98,18 +111,21 @@ namespace BlackGui
|
||||
void ps_logoffCountdown();
|
||||
|
||||
//! Reverse lookup model
|
||||
void ps_reverseLookupModel();
|
||||
void ps_reverseLookupAircraftIcaoData();
|
||||
|
||||
//! Simulator model has been changed
|
||||
void ps_simulatorModelChanged(const BlackMisc::Simulation::CAircraftModel &model);
|
||||
|
||||
//! Launch mapping wizard
|
||||
void ps_mappingWizard();
|
||||
|
||||
private:
|
||||
//! GUI aircraft values, formatted
|
||||
struct CGuiAircraftValues
|
||||
{
|
||||
QString ownCallsign;
|
||||
QString ownAircraftIcaoTypeDesignator;
|
||||
QString ownAircraftIcaoAirline;
|
||||
BlackMisc::Aviation::CCallsign ownCallsign;
|
||||
BlackMisc::Aviation::CAircraftIcaoCode ownAircraftIcao;
|
||||
BlackMisc::Aviation::CAirlineIcaoCode ownAirlineIcao;
|
||||
QString ownAircraftCombinedType;
|
||||
QString ownAircraftSimulatorModel;
|
||||
};
|
||||
@@ -162,13 +178,18 @@ namespace BlackGui
|
||||
//! Completers
|
||||
void initCompleters(BlackMisc::Network::CEntityFlags::Entity entity);
|
||||
|
||||
//! Highlight model field according to model data
|
||||
void highlightModelField(const BlackMisc::Simulation::CAircraftModel &model = {});
|
||||
|
||||
QScopedPointer<Ui::CLoginComponent> ui;
|
||||
QScopedPointer<CDbQuickMappingWizard> m_mappingWizard;
|
||||
bool m_autoPopupWizard = false; //!< automatically popup wizard if mapping is needed
|
||||
bool m_visible = false; //!< is this component selected?
|
||||
const int LogoffIntervalSeconds = 10;
|
||||
QTimer *m_logoffCountdownTimer { nullptr };
|
||||
const int LogoffIntervalSeconds = 10; //!< time before logoff
|
||||
QTimer *m_logoffCountdownTimer { nullptr }; //!< timer used logoff countdown
|
||||
BlackMisc::CSettingReadOnly<BlackCore::Vatsim::TTrafficServers> m_otherTrafficNetworkServers { this, &CLoginComponent::ps_reloadSettings };
|
||||
BlackMisc::CSetting<BlackGui::Settings::TOwnAircraftModel> m_currentAircraftModel { this };
|
||||
BlackMisc::CData<BlackCore::Data::TVatsimCurrentServer> m_currentVatsimServer { this };
|
||||
BlackMisc::CSetting<BlackGui::Settings::TOwnAircraftModel> m_currentAircraftModel { this }; //!< current settings of aircraft
|
||||
BlackMisc::CData<BlackCore::Data::TVatsimCurrentServer> m_currentVatsimServer { this }; //!< cache for current VATSIM server
|
||||
};
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@@ -10,14 +10,8 @@
|
||||
<height>576</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Frame</string>
|
||||
<string>Login component</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
@@ -152,7 +146,11 @@
|
||||
<widget class="BlackGui::Components::CServerListSelector" name="comp_VatsimServer"/>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="4">
|
||||
<widget class="QLineEdit" name="le_VatsimRealName"/>
|
||||
<widget class="QLineEdit" name="le_VatsimRealName">
|
||||
<property name="placeholderText">
|
||||
<string>e.g. Joe Doe</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="le_VatsimId"/>
|
||||
@@ -313,30 +311,84 @@
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item row="4" column="0">
|
||||
<item row="2" column="3">
|
||||
<widget class="QLabel" name="lbl_AircraftIcaoAirline">
|
||||
<property name="toolTip">
|
||||
<string>e.g. DLH, LHA, ...</string>
|
||||
<string>ICAO code e.g. DLH, LHA, ...</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ICAO airline</string>
|
||||
<string>Airline</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="le_AirlineIcaoDesignator">
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="le_Callsign">
|
||||
<property name="toolTip">
|
||||
<string>e.g. DLH</string>
|
||||
<string>e.g. DEMBZ</string>
|
||||
</property>
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhUppercaseOnly</set>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>128</number>
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>e.g. "DLH"</string>
|
||||
<string>e.g. DEMBZ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_Callsign">
|
||||
<property name="text">
|
||||
<string>Callsign</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="lbl_AircraftIcaoDesignator">
|
||||
<property name="toolTip">
|
||||
<string>ICAO code e.g. B737, A320, F18</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Aircraft</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_Callsign">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_AircraftIcao">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_Model">
|
||||
<property name="toolTip">
|
||||
<string>Launch </string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Model</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_AircraftCombinedType">
|
||||
<property name="toolTip">
|
||||
<string>Aircraft type e.g. L2J, L1P, ....</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Type</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="le_AircraftCombinedType">
|
||||
<property name="toolTip">
|
||||
<string>e.g. L2J</string>
|
||||
@@ -355,129 +407,102 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QLabel" name="lbl_AircraftCombinedType">
|
||||
<property name="toolTip">
|
||||
<string>e.g. L2J, L1P, ....</string>
|
||||
</property>
|
||||
<item row="2" column="5">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_AirlineIcao">
|
||||
<property name="text">
|
||||
<string>Aircraft type</string>
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_Callsign">
|
||||
<item row="2" column="2">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_AircraftCombinedType">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Callsign</string>
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="le_Callsign">
|
||||
<property name="toolTip">
|
||||
<string>e.g. DEMBZ</string>
|
||||
</property>
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhUppercaseOnly</set>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item row="0" column="1" colspan="5">
|
||||
<widget class="QWidget" name="wi_SimulatorModel" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_AircraftModel">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="le_SimulatorModel">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>unique model identifier</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="tb_SimulatorIcaoReverseLookup">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../blackmisc/blackmisc.qrc">
|
||||
<normaloff>:/diagona/icons/diagona/icons/arrow-circle-225.png</normaloff>:/diagona/icons/diagona/icons/arrow-circle-225.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="tb_MappingWizard">
|
||||
<property name="text">
|
||||
<string>...</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>
|
||||
<item row="1" column="4">
|
||||
<widget class="QLineEdit" name="le_AircraftIcaoDesignator">
|
||||
<property name="toolTip">
|
||||
<string>e.g. B737</string>
|
||||
<widget class="BlackGui::Components::CDbAircraftIcaoSelectorComponent" name="selector_AircraftIcao">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>128</number>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>e.g. "B737"</string>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="lbl_AircraftIcaoDesignator">
|
||||
<property name="toolTip">
|
||||
<string>e.g. B737, A320, F18</string>
|
||||
<item row="2" column="4">
|
||||
<widget class="BlackGui::Components::CDbAirlineIcaoSelectorComponent" name="selector_AirlineIcao">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ICAO designator</string>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_AircraftIcaoDesignator">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_AircraftIcaoAirline">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="5">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_AircraftCombinedType">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_Callsign">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_SimulatorModel">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="4">
|
||||
<widget class="QLineEdit" name="le_SimulatorModel">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>unique model identifier</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="hl_AircraftModel">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_SimulatorModel">
|
||||
<property name="text">
|
||||
<string>Model</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="tb_SimulatorIcaoReverseLookup">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../blackmisc/blackmisc.qrc">
|
||||
<normaloff>:/diagona/icons/diagona/icons/arrow-circle-225.png</normaloff>:/diagona/icons/diagona/icons/arrow-circle-225.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -602,6 +627,18 @@
|
||||
<header>blackgui/editors/fsdsetupform.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CDbAircraftIcaoSelectorComponent</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/components/dbaircrafticaoselectorcomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CDbAirlineIcaoSelectorComponent</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/components/dbairlineicaoselectorcomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>tw_Network</tabstop>
|
||||
@@ -610,11 +647,10 @@
|
||||
<tabstop>le_VatsimRealName</tabstop>
|
||||
<tabstop>le_VatsimHomeAirport</tabstop>
|
||||
<tabstop>comp_VatsimServer</tabstop>
|
||||
<tabstop>le_SimulatorModel</tabstop>
|
||||
<tabstop>le_Callsign</tabstop>
|
||||
<tabstop>le_AircraftIcaoDesignator</tabstop>
|
||||
<tabstop>le_AirlineIcaoDesignator</tabstop>
|
||||
<tabstop>selector_AircraftIcao</tabstop>
|
||||
<tabstop>le_AircraftCombinedType</tabstop>
|
||||
<tabstop>selector_AirlineIcao</tabstop>
|
||||
<tabstop>comp_OtherServers</tabstop>
|
||||
<tabstop>pb_OtherServersGotoSettings</tabstop>
|
||||
</tabstops>
|
||||
|
||||
Reference in New Issue
Block a user