diff --git a/src/blackgui/components/logincomponent.cpp b/src/blackgui/components/logincomponent.cpp
index 8d9185862..f1e81d7cf 100644
--- a/src/blackgui/components/logincomponent.cpp
+++ b/src/blackgui/components/logincomponent.cpp
@@ -147,7 +147,7 @@ namespace BlackGui
// inital setup, if data already available
this->validateAircraftValues();
- ui->editor_Pilot->validate();
+ ui->form_Pilot->validate();
this->onWebServiceDataRead(CEntityFlags::VatsimDataFile, CEntityFlags::ReadFinished, -1);
const CServerList otherServers(m_networkSetup.getOtherServersPlusTestServers());
ui->comp_OtherServers->setServers(otherServers);
@@ -215,16 +215,11 @@ namespace BlackGui
void CLoginComponent::toggleNetworkConnection()
{
if (!sGui || sGui->isShuttingDown()) { return; }
- if (ui->tw_Network->currentWidget() != ui->pg_NetworkVatsim && ui->tw_Network->currentWidget() != ui->pg_OtherServers)
- {
- this->showOverlayMessage(CStatusMessage(this).validationError("No login possible from this very tab, use VATSIM or other servers"), OverlayMessageMs);
- return;
- }
const bool isConnected = sGui && sGui->getIContextNetwork()->isConnected();
const bool vatsimLogin = this->isVatsimNetworkTabSelected();
- ui->editor_Pilot->setVatsimValidation(vatsimLogin);
+ ui->form_Pilot->setVatsimValidation(vatsimLogin);
this->setUiLoginState(isConnected);
CServer currentServer; // used for login
@@ -238,7 +233,7 @@ namespace BlackGui
return;
}
- const CStatusMessageList pilotMsgs = ui->editor_Pilot->validate();
+ const CStatusMessageList pilotMsgs = ui->form_Pilot->validate();
if (pilotMsgs.isFailure())
{
this->showOverlayMessage(CStatusMessage(this).validationWarning("Invalid pilot data, login not possible"), OverlayMessageMs);
@@ -353,11 +348,11 @@ namespace BlackGui
ui->tw_Network->setCurrentWidget(
lastServer.getServerType() == CServer::FSDServerVatsim ?
- ui->pg_NetworkVatsim : ui->pg_OtherServers);
+ ui->tb_NetworkVatsim : ui->tb_OtherServers);
}
const CUser lastUser = lastServer.getUser();
- ui->editor_Pilot->setUser(lastUser);
+ ui->form_Pilot->setUser(lastUser);
if (lastUser.hasCallsign())
{
ui->le_Callsign->setText(lastUser.getCallsign().asString());
@@ -382,7 +377,7 @@ namespace BlackGui
server = m_networkSetup.getLastVatsimServer();
}
else { return; }
- ui->editor_Pilot->setUser(server.getUser(), true);
+ ui->form_Pilot->setUser(server.getUser(), true);
}
void CLoginComponent::onSelectedServerChanged(const CServer &server)
@@ -390,7 +385,7 @@ namespace BlackGui
if (!m_updatePilotOnServerChanges) { return; }
const bool vatsim = this->isVatsimNetworkTabSelected();
const CUser user = vatsim ? this->getCurrentVatsimServer().getUser() : server.getUser();
- ui->editor_Pilot->setUser(user, true);
+ ui->form_Pilot->setUser(user, true);
}
void CLoginComponent::onServerTabWidgetChanged(int index)
@@ -399,15 +394,15 @@ namespace BlackGui
if (!m_updatePilotOnServerChanges) { return; }
const bool vatsim = this->isVatsimNetworkTabSelected();
const CServer server = vatsim ? this->getCurrentVatsimServer() : this->getCurrentOtherServer();
- ui->editor_Pilot->setUser(server.getUser(), true);
+ ui->form_Pilot->setUser(server.getUser(), true);
}
bool CLoginComponent::hasValidContexts()
{
if (!sGui || !sGui->supportsContexts()) { return false; }
- if (sGui->isShuttingDown()) { return false; }
- if (!sGui->getIContextSimulator()) { return false; }
- if (!sGui->getIContextNetwork()) { return false; }
+ if (sGui->isShuttingDown()) { return false; }
+ if (!sGui->getIContextSimulator()) { return false; }
+ if (!sGui->getIContextNetwork()) { return false; }
if (!sGui->getIContextOwnAircraft()) { return false; }
return true;
}
@@ -425,7 +420,7 @@ namespace BlackGui
CUser CLoginComponent::getUserFromPilotGuiValues() const
{
- CUser user = ui->editor_Pilot->getUser();
+ CUser user = ui->form_Pilot->getUser();
user.setCallsign(this->getCallsignFromGui());
return user;
}
@@ -629,6 +624,7 @@ namespace BlackGui
void CLoginComponent::mappingWizard()
{
+ if (!sGui || !sGui->getIContextOwnAircraft() || sGui->isShuttingDown()) { return; }
if (!m_mappingWizard)
{
m_mappingWizard.reset(new CDbQuickMappingWizard(this));
@@ -665,13 +661,8 @@ namespace BlackGui
void CLoginComponent::setUiLoginState(bool connected)
{
- 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);
+ ui->fr_LoginDisconnected->setVisible(!connected);
+ ui->fr_LogoffConfirmationConnected->setVisible(connected);
const QString s = connected ? QStringLiteral("disconnect") : QStringLiteral("connect");
ui->pb_Ok->setText(s);
@@ -700,7 +691,7 @@ namespace BlackGui
bool CLoginComponent::isVatsimNetworkTabSelected() const
{
- return (ui->tw_Network->currentWidget() == ui->pg_NetworkVatsim);
+ return (ui->tw_Network->currentWidget() == ui->tb_NetworkVatsim);
}
CAircraftModel CLoginComponent::getPrefillModel() const
@@ -724,7 +715,7 @@ namespace BlackGui
changedCallsign = true;
}
CUser pilot = ownAircraft.getPilot();
- const CUser uiUser = ui->editor_Pilot->getUser();
+ const CUser uiUser = ui->form_Pilot->getUser();
pilot.setRealName(uiUser.getRealName());
pilot.setHomeBase(uiUser.getHomeBase());
pilot.setId(uiUser.getId());
diff --git a/src/blackgui/components/logincomponent.ui b/src/blackgui/components/logincomponent.ui
index e0ecf56e3..69b15c546 100644
--- a/src/blackgui/components/logincomponent.ui
+++ b/src/blackgui/components/logincomponent.ui
@@ -6,8 +6,8 @@
0
0
- 273
- 622
+ 289
+ 750
@@ -30,11 +30,8 @@
1
-
-
-
- Matching logging
-
-
+
+
5
@@ -48,503 +45,684 @@
5
-
-
-
-
-
-
- -
-
-
- Network
-
-
-
- 6
-
-
- 3
-
-
- 3
-
-
- 3
-
-
- 3
-
-
-
-
-
- -
-
+
0
- 40
+ 100
-
- QTabWidget::North
+
+ Network
-
- 0
-
-
-
- Login at VATSIM
+
+
+ 6
-
- VATSIM
-
-
-
-
-
-
- Server
-
-
-
- -
-
-
- -
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- copy credentials to pilot section
-
-
- override pilot
-
-
-
-
-
-
-
-
-
-
- Other servers
-
-
- -
-
-
- Server
-
-
-
- -
-
-
- -
-
-
-
- 0
-
-
- 0
-
-
- 0
-
-
- 0
-
-
-
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- goto settings
-
-
-
- -
-
-
- copy credentials to pilot section
-
-
- override pilot
-
-
-
-
-
-
-
-
-
-
- FSD details
-
-
-
- 3
-
-
- 6
-
-
- 3
-
-
- 3
-
- -
-
-
-
-
-
-
- Voice
-
-
-
- 3
-
-
- 6
-
-
- 3
-
-
- 3
-
- -
-
-
-
-
-
-
-
-
-
- -
-
-
- Own aircraft
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
-
- false
-
-
-
- 6
-
-
- 10
-
-
- 6
-
-
- 3
-
-
-
-
-
-
- 75
- 0
-
-
-
- Qt::StrongFocus
-
-
-
- -
-
-
-
- 75
- 0
-
-
-
- Qt::StrongFocus
-
-
-
- -
-
-
- 0
+ 3
- 0
+ 3
- 0
+ 3
- 0
+ 3
-
-
-
- true
+
+
+
+ 0
+ 40
+
-
- unique model identifier
+
+ QTabWidget::North
+
+ 0
+
+
+
+ Login at VATSIM
+
+
+ VATSIM
+
+
+
-
+
+
+ Server
+
+
+
+ -
+
+
+ -
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ copy credentials to pilot section
+
+
+ override pilot
+
+
+
+
+
+
+
+
+
+
+ Other servers
+
+
+ -
+
+
+ Server
+
+
+
+ -
+
+
+ -
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ goto settings
+
+
+
+ -
+
+
+ copy credentials to pilot section
+
+
+ override pilot
+
+
+
+
+
+
+
+
- -
-
-
- ...
-
-
-
- :/diagona/icons/diagona/icons/arrow-circle-225.png:/diagona/icons/diagona/icons/arrow-circle-225.png
+
+
+
+ -
+
+
+
+ 0
+ 75
+
+
+
+ Details
+
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
-
+
+
+ 0
+
+
+ Mode
+
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
-
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+ FSD details
+
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+ -
+
+
+ true
+
+
+
+
+ 0
+ 0
+ 253
+ 55
+
+
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
+ 1
+
+
-
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+
+
+
+
+
+
+
+
+
+ Voice
+
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+ -
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+ Matching log
+
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+
+ 3
+
+ -
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
- -
-
-
- ...
-
-
-
- :/own/icons/own/swift3D/sw3DGreen-24.png:/own/icons/own/swift3D/sw3DGreen-24.png
+
+
+
+ -
+
+
+ Pilot's info
+
+
+
+ 2
+
+
+ 2
+
+
+ 2
+
+
+ 2
+
+
-
+
+
+
+ 0
+ 50
+
- -
-
-
-
+
-
+
+
+ Own aircraft
-
-
- -
-
-
- Launch
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter
-
- Model
-
-
-
- -
-
-
- Callsign
-
-
-
- -
-
-
- ICAO code e.g. B737, A320, F18
-
-
- Aircraft
-
-
-
- -
-
-
-
-
-
-
- -
-
-
- ICAO code e.g. DLH, LHA, ...
-
-
- Airline
-
-
-
- -
-
-
- e.g. L2J
-
-
-
-
-
-
-
-
- 3
-
-
- e.g. "L2J"
-
-
-
- -
-
-
-
-
-
-
- -
-
-
- e.g. DEMBZ
-
-
- Qt::ImhUppercaseOnly
-
-
- 10
-
-
- e.g. DEMBZ
-
-
-
- -
-
-
- Aircraft type e.g. L2J, L1P, ....
-
-
- Type
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
+
+ false
+
+
+ 6
+
+
+ 10
+
+
+ 6
+
+
+ 3
+
+
-
+
+
+
+ 75
+ 0
+
+
+
+ Qt::StrongFocus
+
+
+
+ -
+
+
+
+ 75
+ 0
+
+
+
+ Qt::StrongFocus
+
+
+
+ -
+
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+ true
+
+
+ unique model identifier
+
+
+
+ -
+
+
+ ...
+
+
+
+ :/diagona/icons/diagona/icons/arrow-circle-225.png:/diagona/icons/diagona/icons/arrow-circle-225.png
+
+
+
+ -
+
+
+ ...
+
+
+
+ :/own/icons/own/swift3D/sw3DGreen-24.png:/own/icons/own/swift3D/sw3DGreen-24.png
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ Launch
+
+
+ Model
+
+
+
+ -
+
+
+ Callsign
+
+
+
+ -
+
+
+ ICAO code e.g. B737, A320, F18
+
+
+ Aircraft
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ ICAO code e.g. DLH, LHA, ...
+
+
+ Airline
+
+
+
+ -
+
+
+ e.g. L2J
+
+
+
+
+
+
+
+
+ 3
+
+
+ e.g. "L2J"
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+ e.g. DEMBZ
+
+
+ Qt::ImhUppercaseOnly
+
+
+ 10
+
+
+ e.g. DEMBZ
+
+
+
+ -
+
+
+ Aircraft type e.g. L2J, L1P, ....
+
+
+ Type
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+
+
-
-
-
- Pilot's info
-
-
-
- 2
-
-
- 2
-
-
- 2
-
-
- 2
-
-
-
-
-
-
- 0
- 50
-
-
-
-
-
-
-
- -
-
+
0
0
-
+
- 0
+ 5
5
- 0
+ 5
5
+
-
+
+
+ Matching log.
+
+
+
-
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+
+
+
+
-
-
+
Current server and aircraft
@@ -619,7 +797,7 @@
-
-
+
QFrame::StyledPanel
@@ -779,6 +957,11 @@
tw_Network
comp_VatsimServers
pb_OverrideCredentialsVatsim
+ comp_OtherServers
+ pb_OtherServersGotoSettings
+ pb_OverrideCredentialsOtherServers
+ tw_Details
+ scrollArea
le_SimulatorModel
tb_SimulatorIcaoReverseLookup
tb_MappingWizard
@@ -792,9 +975,6 @@
tb_Timeout
pb_Ok
pb_Cancel
- comp_OtherServers
- pb_OtherServersGotoSettings
- pb_OverrideCredentialsOtherServers
diff --git a/src/blackgui/editors/fsdsetupform.cpp b/src/blackgui/editors/fsdsetupform.cpp
index b9ab310ba..11b307687 100644
--- a/src/blackgui/editors/fsdsetupform.cpp
+++ b/src/blackgui/editors/fsdsetupform.cpp
@@ -28,7 +28,7 @@ namespace BlackGui
this->resetToDefaultValues();
ui->cb_Override->setChecked(true);
ui->le_TextCodec->setCompleter(new QCompleter(textCodecNames(true, true), this));
- connect(ui->cb_Override, &QCheckBox::toggled, this, &CFsdSetupForm::enabledToggled);
+ connect(ui->cb_Override, &QCheckBox::toggled, this, &CFsdSetupForm::enabledToggled, Qt::QueuedConnection);
connect(ui->pb_SetDefaults, &QPushButton::clicked, this, &CFsdSetupForm::resetToDefaultValues);
}
@@ -90,6 +90,11 @@ namespace BlackGui
CGuiUtility::checkBoxReadOnly(ui->cb_FastPositionSend, readonly);
CGuiUtility::checkBoxReadOnly(ui->cb_GndFlagReceive, readonly);
CGuiUtility::checkBoxReadOnly(ui->cb_GndFlagSend, readonly);
+
+ if (readonly && ui->cb_Override->isChecked())
+ {
+ ui->cb_Override->setChecked(false);
+ }
this->forceStyleSheetUpdate();
}
diff --git a/src/blackgui/editors/serverform.cpp b/src/blackgui/editors/serverform.cpp
index a7c844e86..78c47a591 100644
--- a/src/blackgui/editors/serverform.cpp
+++ b/src/blackgui/editors/serverform.cpp
@@ -85,6 +85,9 @@ namespace BlackGui
void CServerForm::setReadOnly(bool readOnly)
{
+ ui->form_ServerFsd->setReadOnly(readOnly);
+ ui->form_Voice->setReadOnly(readOnly);
+
ui->le_NetworkId->setReadOnly(readOnly);
ui->le_RealName->setReadOnly(readOnly);
ui->le_Name->setReadOnly(readOnly);
@@ -92,7 +95,6 @@ namespace BlackGui
ui->le_Address->setReadOnly(readOnly);
ui->le_Port->setReadOnly(readOnly);
ui->le_Password->setReadOnly(readOnly);
- ui->form_ServerFsd->setReadOnly(readOnly);
ui->cb_ServerType->setEnabled(!readOnly);
ui->cbp_Ecosystem->setEnabled(!readOnly);
this->forceStyleSheetUpdate();
diff --git a/src/blackgui/editors/voicesetupform.cpp b/src/blackgui/editors/voicesetupform.cpp
index 65ac2a825..4e613f9f1 100644
--- a/src/blackgui/editors/voicesetupform.cpp
+++ b/src/blackgui/editors/voicesetupform.cpp
@@ -28,7 +28,7 @@ namespace BlackGui
QIntValidator *v = new QIntValidator(0, 65535, ui->le_VatsimUdpPort);
ui->le_VatsimUdpPort->setValidator(v);
this->resetToDefaultValues();
- connect(ui->cb_Override, &QCheckBox::toggled, this, &CVoiceSetupForm::enabledToggled);
+ connect(ui->cb_Override, &QCheckBox::toggled, this, &CVoiceSetupForm::enabledToggled, Qt::QueuedConnection);
connect(ui->pb_SetDefaults, &QPushButton::clicked, this, &CVoiceSetupForm::resetToDefaultValues);
}
@@ -72,6 +72,10 @@ namespace BlackGui
{
ui->pb_SetDefaults->setEnabled(!readonly);
ui->le_VatsimUdpPort->setReadOnly(readonly);
+ if (readonly && ui->cb_Override->isChecked())
+ {
+ ui->cb_Override->setChecked(false);
+ }
this->forceStyleSheetUpdate();
}