mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
Ref T219, changed login component so VATSIM and other server data can use values from pilot form
* also "other servers" can have homebase * use pilot form
This commit is contained in:
@@ -7,7 +7,16 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "ui_logincomponent.h"
|
||||
#include "logincomponent.h"
|
||||
#include "serverlistselector.h"
|
||||
#include "dbquickmappingwizard.h"
|
||||
#include "blackgui/editors/serverform.h"
|
||||
#include "blackgui/editors/pilotform.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackgui/loginmodebuttons.h"
|
||||
#include "blackgui/ticklabel.h"
|
||||
#include "blackgui/uppercasevalidator.h"
|
||||
#include "blackcore/context/contextaudio.h"
|
||||
#include "blackcore/context/contextnetwork.h"
|
||||
#include "blackcore/context/contextownaircraft.h"
|
||||
@@ -16,14 +25,6 @@
|
||||
#include "blackcore/data/globalsetup.h"
|
||||
#include "blackcore/network.h"
|
||||
#include "blackcore/simulator.h"
|
||||
#include "logincomponent.h"
|
||||
#include "serverlistselector.h"
|
||||
#include "dbquickmappingwizard.h"
|
||||
#include "blackgui/editors/serverform.h"
|
||||
#include "blackgui/guiapplication.h"
|
||||
#include "blackgui/loginmodebuttons.h"
|
||||
#include "blackgui/ticklabel.h"
|
||||
#include "blackgui/uppercasevalidator.h"
|
||||
#include "blackmisc/aviation/aircrafticaocode.h"
|
||||
#include "blackmisc/aviation/airlineicaocode.h"
|
||||
#include "blackmisc/aviation/airporticaocode.h"
|
||||
@@ -34,7 +35,7 @@
|
||||
#include "blackmisc/simulation/aircraftmodel.h"
|
||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||
#include "blackmisc/statusmessage.h"
|
||||
#include "ui_logincomponent.h"
|
||||
#include "blackconfig/buildconfig.h"
|
||||
|
||||
#include <QDialogButtonBox>
|
||||
#include <QGroupBox>
|
||||
@@ -45,8 +46,6 @@
|
||||
#include <QTabWidget>
|
||||
#include <QTimer>
|
||||
#include <QToolButton>
|
||||
#include <QCompleter>
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QStringBuilder>
|
||||
#include <QtGlobal>
|
||||
|
||||
@@ -75,23 +74,25 @@ namespace BlackGui
|
||||
ui(new Ui::CLoginComponent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
m_logoffCountdownTimer = new QTimer(this);
|
||||
m_logoffCountdownTimer->setObjectName("CLoginComponent:m_logoffCountdownTimer");
|
||||
m_logoffCountdownTimer.setObjectName("CLoginComponent:m_logoffCountdownTimer");
|
||||
ui->pb_LogoffTimeout->setMaximum(LogoffIntervalSeconds);
|
||||
ui->pb_LogoffTimeout->setValue(LogoffIntervalSeconds);
|
||||
connect(m_logoffCountdownTimer, &QTimer::timeout, this, &CLoginComponent::logoffCountdown);
|
||||
connect(&m_logoffCountdownTimer, &QTimer::timeout, this, &CLoginComponent::logoffCountdown);
|
||||
|
||||
ui->tw_Network->setCurrentIndex(0);
|
||||
ui->selector_AircraftIcao->displayWithIcaoDescription(false);
|
||||
ui->selector_AirlineIcao->displayWithIcaoDescription(false);
|
||||
ui->selector_AircraftIcao->displayMode(CDbAircraftIcaoSelectorComponent::DisplayIcaoAndId);
|
||||
ui->selector_AirlineIcao->displayMode(CDbAirlineIcaoSelectorComponent::DisplayVDesignatorAndId);
|
||||
|
||||
this->setOkButtonString(false);
|
||||
connect(ui->comp_OtherServers, &CServerListSelector::serverChanged, this, &CLoginComponent::onSelectedServerChanged);
|
||||
connect(ui->comp_VatsimServers, &CServerListSelector::serverChanged, this, &CLoginComponent::onSelectedServerChanged);
|
||||
connect(ui->tw_Network, &QTabWidget::currentChanged, this, &CLoginComponent::onServerTabWidgetChanged);
|
||||
|
||||
connect(ui->bb_OkCancel, &QDialogButtonBox::rejected, this, &CLoginComponent::loginCancelled);
|
||||
connect(ui->bb_OkCancel, &QDialogButtonBox::accepted, this, &CLoginComponent::toggleNetworkConnection);
|
||||
connect(ui->pb_OtherServersGotoSettings, &QPushButton::pressed, this, &CLoginComponent::requestNetworkSettings);
|
||||
connect(ui->tb_MappingWizard, &QToolButton::clicked, this, &CLoginComponent::mappingWizard);
|
||||
connect(ui->tb_UnhidePassword, &QToolButton::clicked, this, &CLoginComponent::unhidePassword);
|
||||
|
||||
ui->comp_FsdDetails->showEnableInfo(true);
|
||||
ui->comp_FsdDetails->setFsdSetupEnabled(false);
|
||||
@@ -100,30 +101,16 @@ namespace BlackGui
|
||||
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");
|
||||
ui->lblp_VatsimPassword->setToolTips("ok", "wrong");
|
||||
ui->lblp_VatsimRealName->setToolTips("ok", "wrong");
|
||||
|
||||
//! \fixme hardcoded padding, could maybe goto to stylesheet file
|
||||
ui->bb_OkCancel->button(QDialogButtonBox::Ok)->setStyleSheet("padding-left: 3px; padding-right: 3px;");
|
||||
|
||||
// Stored data
|
||||
this->loadRememberedVatsimData();
|
||||
this->loadRememberedUserData();
|
||||
|
||||
// Remark: The validators affect the signals such as returnPressed, editingFinished
|
||||
// So I use no ranges in the CUpperCaseValidators, as this disables the signals for invalid values
|
||||
|
||||
// VATSIM
|
||||
ui->le_VatsimId->setValidator(new QIntValidator(100000, 9999999, this));
|
||||
connect(ui->le_VatsimId, &QLineEdit::editingFinished, this, &CLoginComponent::validateVatsimValues);
|
||||
|
||||
ui->le_VatsimHomeAirport->setValidator(new CUpperCaseValidator(this));
|
||||
connect(ui->le_VatsimHomeAirport, &QLineEdit::editingFinished, this, &CLoginComponent::validateVatsimValues);
|
||||
|
||||
connect(ui->le_VatsimPassword, &QLineEdit::editingFinished, this, &CLoginComponent::validateVatsimValues);
|
||||
connect(ui->le_VatsimRealName, &QLineEdit::editingFinished, this, &CLoginComponent::validateVatsimValues);
|
||||
|
||||
// own aircraft
|
||||
ui->le_Callsign->setMaxLength(LogoffIntervalSeconds);
|
||||
ui->le_Callsign->setValidator(new CUpperCaseValidator(this));
|
||||
@@ -141,19 +128,18 @@ namespace BlackGui
|
||||
connect(sGui->getIContextSimulator(), &IContextSimulator::ownAircraftModelChanged, this, &CLoginComponent::simulatorModelChanged);
|
||||
}
|
||||
|
||||
// server and UI elements when in disconnect
|
||||
// server and UI elements when in disconnect state
|
||||
ui->frp_CurrentServer->setReadOnly(true);
|
||||
ui->frp_CurrentServer->showPasswordField(false);
|
||||
ui->gbp_LoginWithMode->setReadOnly(true);
|
||||
ui->tb_Timeout->setIcon(m_iconPause);
|
||||
connect(ui->tb_Timeout, &QToolButton::clicked, this, &CLoginComponent::toggleTimeout);
|
||||
|
||||
// web service data
|
||||
connect(sGui->getIContextNetwork(), &IContextNetwork::webServiceDataRead, this, &CLoginComponent::onWebServiceDataRead);
|
||||
connect(sGui->getWebDataServices(), &CWebDataServices::dataRead, this, &CLoginComponent::onWebServiceDataRead);
|
||||
|
||||
// inital setup, if data already available
|
||||
this->validateAircraftValues();
|
||||
this->validateVatsimValues();
|
||||
ui->editor_Pilot->validate();
|
||||
this->onWebServiceDataRead(CEntityFlags::VatsimDataFile, CEntityFlags::ReadFinished, -1);
|
||||
CServerList otherServers(m_otherTrafficNetworkServers.getThreadLocal());
|
||||
|
||||
@@ -165,11 +151,10 @@ namespace BlackGui
|
||||
}
|
||||
ui->comp_OtherServers->setServers(otherServers);
|
||||
|
||||
// init completers if data are already available
|
||||
if (sGui && sGui->hasWebDataServices())
|
||||
{
|
||||
this->initCompleters(CEntityFlags::AircraftIcaoEntity | CEntityFlags::AirlineIcaoEntity | CEntityFlags::AirportEntity);
|
||||
}
|
||||
connect(ui->pb_copyCredentialsVatsim, &QPushButton::clicked, this, &CLoginComponent::copyCredentialsToPilot);
|
||||
connect(ui->pb_CopyCredentialsOtherServers, &QPushButton::clicked, this, &CLoginComponent::copyCredentialsToPilot);
|
||||
this->setUiLoginState(false);
|
||||
|
||||
}
|
||||
|
||||
CLoginComponent::~CLoginComponent()
|
||||
@@ -177,12 +162,12 @@ namespace BlackGui
|
||||
|
||||
void CLoginComponent::mainInfoAreaChanged(const QWidget *currentWidget)
|
||||
{
|
||||
m_logoffCountdownTimer->stop(); // in any case stop the timer
|
||||
m_logoffCountdownTimer.stop(); // in any case stop the timer
|
||||
if (currentWidget != this && currentWidget != this->parentWidget())
|
||||
{
|
||||
const bool wasVisible = m_visible;
|
||||
m_visible = false;
|
||||
m_logoffCountdownTimer->stop();
|
||||
m_logoffCountdownTimer.stop();
|
||||
|
||||
if (wasVisible)
|
||||
{
|
||||
@@ -203,8 +188,7 @@ namespace BlackGui
|
||||
{
|
||||
m_visible = true;
|
||||
const bool isConnected = sGui->getIContextNetwork()->isConnected();
|
||||
this->setGuiVisibility(isConnected);
|
||||
this->setOkButtonString(isConnected);
|
||||
this->setUiLoginState(isConnected);
|
||||
if (isConnected) { this->startLogoffTimerCountdown(); }
|
||||
}
|
||||
}
|
||||
@@ -212,7 +196,7 @@ namespace BlackGui
|
||||
|
||||
void CLoginComponent::loginCancelled()
|
||||
{
|
||||
m_logoffCountdownTimer->stop();
|
||||
m_logoffCountdownTimer.stop();
|
||||
ui->pb_LogoffTimeout->setValue(LogoffIntervalSeconds);
|
||||
emit this->loginOrLogoffCancelled();
|
||||
}
|
||||
@@ -225,7 +209,11 @@ namespace BlackGui
|
||||
return;
|
||||
}
|
||||
const bool isConnected = sGui && sGui->getIContextNetwork()->isConnected();
|
||||
const bool vatsimLogin = (ui->tw_Network->currentWidget() == ui->pg_NetworkVatsim);
|
||||
const bool vatsimLogin = this->isVatsimNetworkTabSelected();
|
||||
|
||||
ui->editor_Pilot->setVatsimValidation(vatsimLogin);
|
||||
this->setUiLoginState(isConnected);
|
||||
|
||||
CServer currentServer; // used for login
|
||||
CSimulatedAircraft ownAircraft; // used own aircraft
|
||||
CStatusMessage msg;
|
||||
@@ -237,9 +225,10 @@ namespace BlackGui
|
||||
return;
|
||||
}
|
||||
|
||||
if (vatsimLogin && !this->validateVatsimValues())
|
||||
const CStatusMessageList pilotMsgs = ui->editor_Pilot->validate();
|
||||
if (pilotMsgs.isFailure())
|
||||
{
|
||||
CLogMessage(this).validationWarning("Invalid VATSIM data, login not possible");
|
||||
CLogMessage(this).validationWarning("Invalid pilot data, login not possible");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -248,9 +237,7 @@ namespace BlackGui
|
||||
this->updateOwnAircaftIcaoValuesFromGuiValues();
|
||||
|
||||
// Login mode
|
||||
const INetwork::LoginMode mode = ui->gbp_LoginMode->getLoginMode();
|
||||
ui->gbp_LoginWithMode->setLoginMode(mode);
|
||||
ui->gbp_LoginWithMode->setReadOnly(true); // need to be set after each change
|
||||
const INetwork::LoginMode mode = ui->frp_LoginMode->getLoginMode();
|
||||
switch (mode)
|
||||
{
|
||||
case INetwork::LoginStealth:
|
||||
@@ -265,16 +252,11 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
// Server
|
||||
if (vatsimLogin)
|
||||
{
|
||||
currentServer = this->getCurrentVatsimServer();
|
||||
const CUser vatsimUser = this->getUserFromVatsimGuiValues();
|
||||
currentServer.setUser(vatsimUser);
|
||||
}
|
||||
else
|
||||
{
|
||||
currentServer = this->getCurrentOtherServer();
|
||||
}
|
||||
currentServer = vatsimLogin ?
|
||||
this->getCurrentVatsimServer() :
|
||||
this->getCurrentOtherServer();
|
||||
const CUser user = this->getUserFromPilotGuiValues();
|
||||
currentServer.setUser(user);
|
||||
|
||||
// FSD setup, then override
|
||||
if (ui->comp_FsdDetails->isFsdSetupEnabled())
|
||||
@@ -325,10 +307,8 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CLoginComponent::onWebServiceDataRead(int entityInt, int stateInt, int number)
|
||||
void CLoginComponent::onWebServiceDataRead(CEntityFlags::Entity entity, CEntityFlags::ReadState state, int number)
|
||||
{
|
||||
const CEntityFlags::EntityFlag entity = static_cast<CEntityFlags::EntityFlag>(entityInt);
|
||||
const CEntityFlags::ReadState state = static_cast<CEntityFlags::ReadState>(stateInt);
|
||||
if (state != CEntityFlags::ReadFinished) { return; }
|
||||
Q_UNUSED(number);
|
||||
|
||||
@@ -338,37 +318,71 @@ namespace BlackGui
|
||||
if (vatsimFsdServers.isEmpty()) { return; }
|
||||
vatsimFsdServers.sortBy(&CServer::getName);
|
||||
const CServer currentServer = m_lastVatsimServer.get();
|
||||
ui->comp_VatsimServer->setServers(vatsimFsdServers, true);
|
||||
ui->comp_VatsimServer->preSelect(currentServer.getName());
|
||||
}
|
||||
else
|
||||
{
|
||||
this->initCompleters(entity);
|
||||
ui->comp_VatsimServers->setServers(vatsimFsdServers, true);
|
||||
ui->comp_VatsimServers->preSelect(currentServer.getName());
|
||||
}
|
||||
}
|
||||
|
||||
void CLoginComponent::loadRememberedVatsimData()
|
||||
void CLoginComponent::loadRememberedUserData()
|
||||
{
|
||||
const CServer lastServer = m_lastVatsimServer.get();
|
||||
const CServer lastServer = m_lastServer.get();
|
||||
if (!lastServer.isNull())
|
||||
{
|
||||
|
||||
ui->tw_Network->setCurrentWidget(
|
||||
lastServer.getServerType() == CServer::FSDServerVatsim ?
|
||||
ui->pg_NetworkVatsim : ui->pg_OtherServers);
|
||||
}
|
||||
|
||||
const CUser lastUser = lastServer.getUser();
|
||||
ui->editor_Pilot->setUser(lastUser);
|
||||
if (lastUser.hasCallsign())
|
||||
{
|
||||
ui->le_Callsign->setText(lastUser.getCallsign().asString());
|
||||
ui->le_VatsimId->setText(lastUser.getId());
|
||||
ui->le_VatsimPassword->setText(lastUser.getPassword());
|
||||
ui->le_VatsimHomeAirport->setText(lastUser.getHomeBase().asString());
|
||||
ui->le_VatsimRealName->setText(lastUser.getRealName());
|
||||
}
|
||||
else if (CBuildConfig::isLocalDeveloperDebugBuild())
|
||||
{
|
||||
ui->le_Callsign->setText("SWIFT");
|
||||
ui->le_VatsimId->setText("1288459");
|
||||
ui->le_VatsimPassword->setText("4769");
|
||||
ui->le_VatsimHomeAirport->setText("LOWI");
|
||||
ui->le_VatsimRealName->setText("Black Swift");
|
||||
}
|
||||
}
|
||||
|
||||
void CLoginComponent::copyCredentialsToPilot()
|
||||
{
|
||||
const QObject *s = QObject::sender();
|
||||
CServer server;
|
||||
if (s == ui->pb_CopyCredentialsOtherServers)
|
||||
{
|
||||
server = this->getCurrentOtherServer();
|
||||
}
|
||||
else if (s == ui->pb_copyCredentialsVatsim)
|
||||
{
|
||||
// the VATSIM server selected has no valid user credentials
|
||||
server = m_lastVatsimServer.get();
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
ui->editor_Pilot->setUser(server.getUser(), true);
|
||||
}
|
||||
|
||||
void CLoginComponent::onSelectedServerChanged(const CServer &server)
|
||||
{
|
||||
if (!m_updatePilotOnServerChanges) { return; }
|
||||
const bool vatsim = this->isVatsimNetworkTabSelected();
|
||||
const CUser user = vatsim ? this->getCurrentVatsimServer().getUser() : server.getUser();
|
||||
ui->editor_Pilot->setUser(user, true);
|
||||
}
|
||||
|
||||
void CLoginComponent::onServerTabWidgetChanged(int index)
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
if (!m_updatePilotOnServerChanges) { return; }
|
||||
const bool vatsim = this->isVatsimNetworkTabSelected();
|
||||
const CServer server = vatsim ? this->getCurrentVatsimServer() : this->getCurrentOtherServer();
|
||||
ui->editor_Pilot->setUser(server.getUser(), true);
|
||||
}
|
||||
|
||||
CLoginComponent::CGuiAircraftValues CLoginComponent::getAircraftValuesFromGui() const
|
||||
{
|
||||
CGuiAircraftValues values;
|
||||
@@ -380,21 +394,10 @@ namespace BlackGui
|
||||
return values;
|
||||
}
|
||||
|
||||
CLoginComponent::CVatsimValues CLoginComponent::getVatsimValuesFromGui() const
|
||||
CUser CLoginComponent::getUserFromPilotGuiValues() const
|
||||
{
|
||||
CVatsimValues values;
|
||||
values.vatsimHomeAirport = ui->le_VatsimHomeAirport->text().trimmed().toUpper();
|
||||
values.vatsimId = ui->le_VatsimId->text().trimmed();
|
||||
values.vatsimPassword = ui->le_VatsimPassword->text().trimmed();
|
||||
values.vatsimRealName = ui->le_VatsimRealName->text().simplified().trimmed();
|
||||
return values;
|
||||
}
|
||||
|
||||
CUser CLoginComponent::getUserFromVatsimGuiValues() const
|
||||
{
|
||||
const CVatsimValues values = this->getVatsimValuesFromGui();
|
||||
CUser user(values.vatsimId, values.vatsimRealName, "", values.vatsimPassword, getCallsignFromGui());
|
||||
user.setHomeBase(values.vatsimHomeAirport);
|
||||
CUser user = ui->editor_Pilot->getUser();
|
||||
user.setCallsign(this->getCallsignFromGui());
|
||||
return user;
|
||||
}
|
||||
|
||||
@@ -406,7 +409,14 @@ namespace BlackGui
|
||||
|
||||
CServer CLoginComponent::getCurrentVatsimServer() const
|
||||
{
|
||||
return ui->comp_VatsimServer->currentServer();
|
||||
CServer server = ui->comp_VatsimServers->currentServer();
|
||||
if (!server.getUser().hasValidVatsimId())
|
||||
{
|
||||
// normally VATSIM server have no valid user associated
|
||||
const CUser user = m_lastVatsimServer.get().getUser();
|
||||
server.setUser(user);
|
||||
}
|
||||
return server;
|
||||
}
|
||||
|
||||
CServer CLoginComponent::getCurrentOtherServer() const
|
||||
@@ -414,25 +424,11 @@ namespace BlackGui
|
||||
return ui->comp_OtherServers->currentServer();
|
||||
}
|
||||
|
||||
void CLoginComponent::setOkButtonString(bool connected)
|
||||
{
|
||||
const QString s = connected ? "Disconnect" : "Connect";
|
||||
ui->bb_OkCancel->button(QDialogButtonBox::Ok)->setText(s);
|
||||
}
|
||||
|
||||
void CLoginComponent::setGuiVisibility(bool connected)
|
||||
{
|
||||
ui->gbp_LoginMode->setVisible(!connected);
|
||||
ui->gb_OwnAircraft->setVisible(!connected);
|
||||
ui->gb_Network->setVisible(!connected);
|
||||
ui->fr_LogoffConfirmation->setVisible(connected);
|
||||
}
|
||||
|
||||
void CLoginComponent::startLogoffTimerCountdown()
|
||||
{
|
||||
ui->pb_LogoffTimeout->setValue(LogoffIntervalSeconds);
|
||||
m_logoffCountdownTimer->setInterval(1000);
|
||||
m_logoffCountdownTimer->start();
|
||||
m_logoffCountdownTimer.setInterval(1000);
|
||||
m_logoffCountdownTimer.start();
|
||||
}
|
||||
|
||||
void CLoginComponent::setOwnModelAndIcaoValues()
|
||||
@@ -526,25 +522,6 @@ namespace BlackGui
|
||||
return validCombinedType && validAirlineDesignator && validAircraftDesignator && validCallsign;
|
||||
}
|
||||
|
||||
bool CLoginComponent::validateVatsimValues()
|
||||
{
|
||||
CVatsimValues values = getVatsimValuesFromGui();
|
||||
|
||||
const bool validVatsimId = CUser::isValidVatsimId(values.vatsimId);
|
||||
ui->lblp_VatsimId->setTicked(validVatsimId);
|
||||
|
||||
const bool validHomeAirport = values.vatsimHomeAirport.isEmpty() || CAirportIcaoCode::isValidIcaoDesignator(values.vatsimHomeAirport);
|
||||
ui->lblp_VatsimHomeAirport->setTicked(validHomeAirport);
|
||||
|
||||
const bool validVatsimPassword = !values.vatsimPassword.isEmpty();
|
||||
ui->lblp_VatsimPassword->setTicked(validVatsimPassword);
|
||||
|
||||
const bool validRealUserName = !values.vatsimRealName.isEmpty();
|
||||
ui->lblp_VatsimRealName->setTicked(validRealUserName);
|
||||
|
||||
return validVatsimId && validHomeAirport && validVatsimPassword && validRealUserName;
|
||||
}
|
||||
|
||||
void CLoginComponent::changedAircraftIcao(const CAircraftIcaoCode &icao)
|
||||
{
|
||||
if (icao.isLoadedFromDb())
|
||||
@@ -574,7 +551,7 @@ namespace BlackGui
|
||||
ui->pb_LogoffTimeout->setValue(v);
|
||||
if (v <= 0)
|
||||
{
|
||||
m_logoffCountdownTimer->stop();
|
||||
m_logoffCountdownTimer.stop();
|
||||
this->toggleNetworkConnection();
|
||||
}
|
||||
}
|
||||
@@ -636,48 +613,30 @@ namespace BlackGui
|
||||
|
||||
void CLoginComponent::toggleTimeout()
|
||||
{
|
||||
if (m_logoffCountdownTimer->isActive())
|
||||
if (m_logoffCountdownTimer.isActive())
|
||||
{
|
||||
m_logoffCountdownTimer->stop();
|
||||
m_logoffCountdownTimer.stop();
|
||||
ui->tb_Timeout->setIcon(m_iconPlay);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_logoffCountdownTimer->start();
|
||||
m_logoffCountdownTimer.start();
|
||||
ui->tb_Timeout->setIcon(m_iconPause);
|
||||
}
|
||||
}
|
||||
|
||||
void CLoginComponent::unhidePassword()
|
||||
void CLoginComponent::setUiLoginState(bool connected)
|
||||
{
|
||||
static const QLineEdit::EchoMode originalMode = ui->le_VatsimPassword->echoMode();
|
||||
ui->le_VatsimPassword->setEchoMode(QLineEdit::Normal);
|
||||
QTimer::singleShot(5000, this, [ = ]
|
||||
{
|
||||
ui->le_VatsimPassword->setEchoMode(originalMode);
|
||||
});
|
||||
}
|
||||
ui->editor_Pilot->setReadOnly(connected);
|
||||
ui->editor_Pilot->setVisible(!connected);
|
||||
ui->gb_PilotsDetails->setVisible(!connected);
|
||||
ui->frp_LoginMode->setReadOnly(connected);
|
||||
ui->gb_OwnAircraft->setVisible(!connected);
|
||||
ui->tw_Network->setVisible(!connected);
|
||||
ui->fr_LogoffConfirmation->setVisible(connected);
|
||||
|
||||
void CLoginComponent::initCompleters(CEntityFlags::Entity entity)
|
||||
{
|
||||
// completers where possible
|
||||
if (sGui && sGui->hasWebDataServices())
|
||||
{
|
||||
if (entity.testFlag(CEntityFlags::AirportEntity) && !ui->le_VatsimHomeAirport->completer())
|
||||
{
|
||||
// one time init
|
||||
const QStringList airports = sGui->getWebDataServices()->getAirports().allIcaoCodes(true);
|
||||
if (!airports.isEmpty())
|
||||
{
|
||||
QCompleter *completer = new QCompleter(airports, this);
|
||||
QStyledItemDelegate *itemDelegate = new QStyledItemDelegate(completer);
|
||||
completer->popup()->setItemDelegate(itemDelegate);
|
||||
ui->le_VatsimHomeAirport->setCompleter(completer);
|
||||
completer->popup()->setObjectName("AirportCompleter");
|
||||
completer->popup()->setMinimumWidth(175);
|
||||
}
|
||||
}
|
||||
}
|
||||
const QString s = connected ? QStringLiteral("disconnect") : QStringLiteral("connect");
|
||||
ui->pb_Ok->setText(s);
|
||||
}
|
||||
|
||||
void CLoginComponent::highlightModelField(const CAircraftModel &model)
|
||||
@@ -701,6 +660,11 @@ namespace BlackGui
|
||||
ui->le_SimulatorModel->setStyleSheet(sheet.arg(color));
|
||||
}
|
||||
|
||||
bool CLoginComponent::isVatsimNetworkTabSelected() const
|
||||
{
|
||||
return (ui->tw_Network->currentWidget() == ui->pg_NetworkVatsim);
|
||||
}
|
||||
|
||||
CAircraftModel CLoginComponent::getPrefillModel() const
|
||||
{
|
||||
const CAircraftModel model = m_lastAircraftModel.get();
|
||||
@@ -722,9 +686,10 @@ namespace BlackGui
|
||||
changedCallsign = true;
|
||||
}
|
||||
CUser pilot = ownAircraft.getPilot();
|
||||
pilot.setRealName(CUser::beautifyRealName(ui->le_VatsimRealName->text()));
|
||||
pilot.setHomeBase(CAirportIcaoCode(ui->le_VatsimHomeAirport->text()));
|
||||
pilot.setId(ui->le_VatsimId->text());
|
||||
const CUser uiUser = ui->editor_Pilot->getUser();
|
||||
pilot.setRealName(uiUser.getRealName());
|
||||
pilot.setHomeBase(uiUser.getHomeBase());
|
||||
pilot.setId(uiUser.getId());
|
||||
pilot.setCallsign(CCallsign(cs));
|
||||
bool changedPilot = false;
|
||||
if (ownAircraft.getPilot() != pilot)
|
||||
|
||||
@@ -88,6 +88,52 @@ namespace BlackGui
|
||||
void loginDataChangedDigest();
|
||||
|
||||
private:
|
||||
//! GUI aircraft values, formatted
|
||||
struct CGuiAircraftValues
|
||||
{
|
||||
BlackMisc::Aviation::CCallsign ownCallsign;
|
||||
BlackMisc::Aviation::CAircraftIcaoCode ownAircraftIcao;
|
||||
BlackMisc::Aviation::CAirlineIcaoCode ownAirlineIcao;
|
||||
QString ownAircraftCombinedType;
|
||||
QString ownAircraftSimulatorModel;
|
||||
};
|
||||
|
||||
// -------------- values from GUI -----------------
|
||||
|
||||
//! Values from GUI
|
||||
CGuiAircraftValues getAircraftValuesFromGui() const;
|
||||
|
||||
//! User from VATSIM data
|
||||
BlackMisc::Network::CUser getUserFromPilotGuiValues() const;
|
||||
|
||||
//! Callsign from GUI
|
||||
BlackMisc::Aviation::CCallsign getCallsignFromGui() const;
|
||||
|
||||
//! Set ICAO values
|
||||
//! \return changed values?
|
||||
bool setGuiIcaoValues(const BlackMisc::Simulation::CAircraftModel &model, bool onlyIfEmpty);
|
||||
|
||||
// -------------- values to GUI -----------------
|
||||
|
||||
//! Update own callsign (own aircraft from what is set in the GUI)
|
||||
//! \return changed?
|
||||
bool updateOwnAircraftCallsignAndPilotFromGuiValues();
|
||||
|
||||
//! Update own ICAO values (own aircraft from what is set in the GUI)
|
||||
//! \return changed?
|
||||
bool updateOwnAircaftIcaoValuesFromGuiValues();
|
||||
|
||||
// -------------- others -----------------
|
||||
|
||||
//! Selected server (VATSIM)
|
||||
BlackMisc::Network::CServer getCurrentVatsimServer() const;
|
||||
|
||||
//! Selected server (others)
|
||||
BlackMisc::Network::CServer getCurrentOtherServer() const;
|
||||
|
||||
//! Get a prefill model
|
||||
BlackMisc::Simulation::CAircraftModel getPrefillModel() const;
|
||||
|
||||
//! Login cancelled
|
||||
void loginCancelled();
|
||||
|
||||
@@ -95,14 +141,11 @@ namespace BlackGui
|
||||
void toggleNetworkConnection();
|
||||
|
||||
//! VATSIM data file was loaded
|
||||
void onWebServiceDataRead(int entity, int stateInt, int number);
|
||||
void onWebServiceDataRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState state, int number);
|
||||
|
||||
//! Validate aircaft
|
||||
bool validateAircraftValues();
|
||||
|
||||
//! Validate VATSIM credentials
|
||||
bool validateVatsimValues();
|
||||
|
||||
//! Aircraft ICAO code has been changed
|
||||
void changedAircraftIcao(const BlackMisc::Aviation::CAircraftIcaoCode &icao);
|
||||
|
||||
@@ -127,97 +170,46 @@ namespace BlackGui
|
||||
//! Pause/Continue timeout
|
||||
void toggleTimeout();
|
||||
|
||||
//! Temp. unhide password
|
||||
void unhidePassword();
|
||||
|
||||
//! GUI aircraft values, formatted
|
||||
struct CGuiAircraftValues
|
||||
{
|
||||
BlackMisc::Aviation::CCallsign ownCallsign;
|
||||
BlackMisc::Aviation::CAircraftIcaoCode ownAircraftIcao;
|
||||
BlackMisc::Aviation::CAirlineIcaoCode ownAirlineIcao;
|
||||
QString ownAircraftCombinedType;
|
||||
QString ownAircraftSimulatorModel;
|
||||
};
|
||||
|
||||
//! VATSIM login data
|
||||
struct CVatsimValues
|
||||
{
|
||||
QString vatsimId;
|
||||
QString vatsimPassword;
|
||||
QString vatsimRealName;
|
||||
QString vatsimHomeAirport;
|
||||
};
|
||||
|
||||
// -------------- values from GUI -----------------
|
||||
|
||||
//! Values from GUI
|
||||
CGuiAircraftValues getAircraftValuesFromGui() const;
|
||||
|
||||
//! Values from GUI
|
||||
CVatsimValues getVatsimValuesFromGui() const;
|
||||
|
||||
//! User from VATSIM data
|
||||
BlackMisc::Network::CUser getUserFromVatsimGuiValues() const;
|
||||
|
||||
//! Callsign from GUI
|
||||
BlackMisc::Aviation::CCallsign getCallsignFromGui() const;
|
||||
|
||||
//! Set ICAO values
|
||||
//! \return changed values?
|
||||
bool setGuiIcaoValues(const BlackMisc::Simulation::CAircraftModel &model, bool onlyIfEmpty);
|
||||
|
||||
// -------------- values from GUI -----------------
|
||||
|
||||
//! Update own callsign (own aircraft from what is set in the GUI)
|
||||
//! \return changed?
|
||||
bool updateOwnAircraftCallsignAndPilotFromGuiValues();
|
||||
|
||||
//! Update own ICAO values (own aircraft from what is set in the GUI)
|
||||
//! \return changed?
|
||||
bool updateOwnAircaftIcaoValuesFromGuiValues();
|
||||
|
||||
// -------------- others -----------------
|
||||
//! Show / hide elements for UI depending on login state
|
||||
void setUiLoginState(bool connected);
|
||||
|
||||
//! Own model and ICAO data for GUI and own aircraft
|
||||
void setOwnModelAndIcaoValues();
|
||||
|
||||
//! Selected server (VATSIM)
|
||||
BlackMisc::Network::CServer getCurrentVatsimServer() const;
|
||||
|
||||
//! Selected server (others)
|
||||
BlackMisc::Network::CServer getCurrentOtherServer() const;
|
||||
|
||||
//! Set OK button string
|
||||
void setOkButtonString(bool connected);
|
||||
|
||||
//! Show/hide elements as appropriate
|
||||
void setGuiVisibility(bool connected);
|
||||
|
||||
//! Logoff countdown
|
||||
void startLogoffTimerCountdown();
|
||||
|
||||
//! Completers
|
||||
void initCompleters(BlackMisc::Network::CEntityFlags::Entity entity);
|
||||
|
||||
//! Highlight model field according to model data
|
||||
void highlightModelField(const BlackMisc::Simulation::CAircraftModel &model = {});
|
||||
|
||||
//! Load from settings
|
||||
void loadRememberedVatsimData();
|
||||
//! Is the VATSIM network tab selected?
|
||||
bool isVatsimNetworkTabSelected() const;
|
||||
|
||||
//! Get a prefill model
|
||||
BlackMisc::Simulation::CAircraftModel getPrefillModel() const;
|
||||
//! Load from settings
|
||||
void loadRememberedUserData();
|
||||
|
||||
//! Copy credentials to pilot
|
||||
void copyCredentialsToPilot();
|
||||
|
||||
//! Server changed
|
||||
void onSelectedServerChanged(const BlackMisc::Network::CServer &server);
|
||||
|
||||
//! Tab widget (server) changed
|
||||
void onServerTabWidgetChanged(int index);
|
||||
|
||||
QScopedPointer<Ui::CLoginComponent> ui;
|
||||
QScopedPointer<CDbQuickMappingWizard> m_mappingWizard;
|
||||
BlackMisc::CDigestSignal m_changedLoginDataDigestSignal { this, &CLoginComponent::loginDataChangedDigest, 1500, 10 };
|
||||
bool m_autoPopupWizard = false; //!< automatically popup wizard if mapping is needed
|
||||
bool m_visible = false; //!< is this component selected?
|
||||
bool m_updatePilotOnServerChanges = true;
|
||||
const QIcon m_iconPlay {":/famfamfam/icons/famfamfam/icons/silk/control_play_blue.png"};
|
||||
const QIcon m_iconPause {":/famfamfam/icons/famfamfam/icons/silk/control_pause_blue.png"};
|
||||
const int LogoffIntervalSeconds = 20; //!< time before logoff
|
||||
QTimer *m_logoffCountdownTimer { nullptr }; //!< timer for logoff countdown
|
||||
QTimer m_logoffCountdownTimer { this }; //!< timer for logoff countdown
|
||||
BlackMisc::CSettingReadOnly<BlackCore::Vatsim::TTrafficServers> m_otherTrafficNetworkServers { this, &CLoginComponent::reloadSettings };
|
||||
BlackMisc::CData<BlackMisc::Simulation::Data::TLastModel> m_lastAircraftModel { this }; //!< recently used aircraft model
|
||||
BlackMisc::CData<BlackMisc::Network::Data::TLastServer> m_lastServer { this }; //!< recently used server (VATSIM, other)
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>348</width>
|
||||
<height>625</height>
|
||||
<width>275</width>
|
||||
<height>677</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -34,12 +34,15 @@
|
||||
<property name="title">
|
||||
<string>Network</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gl_Network">
|
||||
<layout class="QVBoxLayout" name="vl_Network">
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>3</number>
|
||||
@@ -47,23 +50,10 @@
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="BlackGui::CLoginModeButtons" name="gbp_LoginMode">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Login mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
<item>
|
||||
<widget class="BlackGui::CLoginModeButtons" name="frp_LoginMode"/>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tw_Network">
|
||||
<property name="tabPosition">
|
||||
<enum>QTabWidget::North</enum>
|
||||
@@ -78,143 +68,62 @@
|
||||
<attribute name="title">
|
||||
<string>VATSIM</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gl_tabVatsim">
|
||||
<property name="leftMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="3" column="6">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_VatsimHomeAirport">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="le_VatsimId"/>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QLineEdit" name="le_VatsimPassword">
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::PasswordEchoOnEdit</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_VatsimPassword">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_VatsimId">
|
||||
<property name="text">
|
||||
<string>Id:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_VatsimId">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="6">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_VatsimRealName">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="le_VatsimHomeAirport">
|
||||
<property name="maxLength">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="placeholderText">
|
||||
<string>e.g. "KLAX"</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<layout class="QFormLayout" name="fl_VatsimServers">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_VatsimServer">
|
||||
<property name="text">
|
||||
<string>Server</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lbl_VatsimHomeAirport">
|
||||
<property name="toolTip">
|
||||
<string>Home airport, e.g. "KLAX"</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Home</string>
|
||||
</property>
|
||||
</widget>
|
||||
<item row="0" column="1">
|
||||
<widget class="BlackGui::Components::CServerListSelector" name="comp_VatsimServers"/>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="5">
|
||||
<widget class="BlackGui::Components::CServerListSelector" name="comp_VatsimServer"/>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="5">
|
||||
<widget class="QLineEdit" name="le_VatsimRealName">
|
||||
<property name="placeholderText">
|
||||
<string>e.g. Joe Doe</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="lbl_VatsimPassword">
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_VatsimRealName">
|
||||
<property name="text">
|
||||
<string>Real name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="6">
|
||||
<widget class="QWidget" name="wi_EmptyForSpace" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QToolButton" name="tb_UnhidePassword">
|
||||
<property name="toolTip">
|
||||
<string>unhide password</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../blackmisc/blackmisc.qrc">
|
||||
<normaloff>:/diagona/icons/diagona/icons/question-button.png</normaloff>:/diagona/icons/diagona/icons/question-button.png</iconset>
|
||||
</property>
|
||||
<item row="1" column="1">
|
||||
<widget class="QWidget" name="wi_VatsimButtons" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_VatsimButtons">
|
||||
<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>
|
||||
<spacer name="hs_VatsimButtons">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_copyCredentialsVatsim">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>copy credentials to pilot section</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> override pilot </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -224,24 +133,6 @@
|
||||
<string>Other servers</string>
|
||||
</attribute>
|
||||
<layout class="QFormLayout" name="fl_OtherServers">
|
||||
<property name="horizontalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_OtherServers">
|
||||
<property name="text">
|
||||
@@ -252,18 +143,52 @@
|
||||
<item row="0" column="1">
|
||||
<widget class="BlackGui::Components::CServerListSelector" name="comp_OtherServers"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_OtherServersEdit">
|
||||
<property name="text">
|
||||
<string>Edit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="pb_OtherServersGotoSettings">
|
||||
<property name="text">
|
||||
<string>goto settings</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="wi_OtherServersButtons" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_OtherServersButtons">
|
||||
<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>
|
||||
<spacer name="hs_OtherServersButtons">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_CopyCredentialsOtherServers">
|
||||
<property name="toolTip">
|
||||
<string>copy credentials to pilot section</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> override pilot </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_OtherServersGotoSettings">
|
||||
<property name="text">
|
||||
<string> goto settings </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -329,6 +254,32 @@
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<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="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="BlackGui::Components::CDbAircraftIcaoSelectorComponent" name="selector_AircraftIcao">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="5">
|
||||
<widget class="QWidget" name="wi_SimulatorModel" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_AircraftModel">
|
||||
@@ -379,29 +330,20 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="BlackGui::Components::CDbAircraftIcaoSelectorComponent" name="selector_AircraftIcao">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
<item row="1" column="2">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_Callsign">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="BlackGui::Components::CDbAirlineIcaoSelectorComponent" name="selector_AirlineIcao">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>75</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_Model">
|
||||
<property name="toolTip">
|
||||
<string>Launch </string>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
<property name="text">
|
||||
<string>Model</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -422,25 +364,8 @@
|
||||
</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="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="1" column="5">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_AircraftIcao">
|
||||
<item row="2" column="5">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_AirlineIcao">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -456,29 +381,6 @@
|
||||
</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>
|
||||
<property name="placeholderText">
|
||||
<string>e.g. DEMBZ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="5">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_AirlineIcao">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="le_AircraftCombinedType">
|
||||
<property name="toolTip">
|
||||
@@ -498,19 +400,29 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_AircraftCombinedType">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<item row="1" column="5">
|
||||
<widget class="BlackGui::CTickLabel" name="lblp_AircraftIcao">
|
||||
<property name="text">
|
||||
<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>
|
||||
<property name="placeholderText">
|
||||
<string>e.g. DEMBZ</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_AircraftCombinedType">
|
||||
<property name="toolTip">
|
||||
@@ -521,6 +433,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<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/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -568,58 +493,46 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>80</height>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="fr_CurrentLoginAddInfo">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_LoginAsAircraft">
|
||||
<property name="text">
|
||||
<string>Your aircraft:</string>
|
||||
<layout class="QGridLayout" name="gl_AddInfo" columnstretch="1,2,1">
|
||||
<item row="0" column="2">
|
||||
<widget class="QLineEdit" name="le_HomeBase">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_LoginSince">
|
||||
<property name="text">
|
||||
<string>Login since:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="le_LoginAsAircaft">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLineEdit" name="le_LoginSince">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_LoginAsAircraft">
|
||||
<property name="text">
|
||||
<string>Aircraft/home:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="3">
|
||||
<widget class="BlackGui::CLoginModeButtons" name="gbp_LoginWithMode">
|
||||
<property name="title">
|
||||
<string>Login mode</string>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="le_LoginSince">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -755,12 +668,6 @@
|
||||
<extends>QLabel</extends>
|
||||
<header>blackgui/ticklabel.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::CLoginModeButtons</class>
|
||||
<extends>QGroupBox</extends>
|
||||
<header>blackgui/loginmodebuttons.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CServerListSelector</class>
|
||||
<extends>QComboBox</extends>
|
||||
@@ -773,25 +680,25 @@
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Editors::CFsdSetupForm</class>
|
||||
<class>BlackGui::CLoginModeButtons</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/editors/fsdsetupform.h</header>
|
||||
<header>blackgui/loginmodebuttons.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Editors::CPilotForm</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/editors/pilotform.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>tw_Network</tabstop>
|
||||
<tabstop>le_VatsimId</tabstop>
|
||||
<tabstop>le_VatsimPassword</tabstop>
|
||||
<tabstop>le_VatsimRealName</tabstop>
|
||||
<tabstop>le_VatsimHomeAirport</tabstop>
|
||||
<tabstop>comp_VatsimServer</tabstop>
|
||||
<tabstop>le_Callsign</tabstop>
|
||||
<tabstop>selector_AircraftIcao</tabstop>
|
||||
<tabstop>le_AircraftCombinedType</tabstop>
|
||||
<tabstop>selector_AirlineIcao</tabstop>
|
||||
<tabstop>comp_OtherServers</tabstop>
|
||||
<tabstop>pb_OtherServersGotoSettings</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../../blackmisc/blackmisc.qrc"/>
|
||||
|
||||
Reference in New Issue
Block a user