mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 11:05:44 +08:00
Reorder login page
* 2 sections: login/logoff status * select server, then details (not in same tab widget which is misleading) * call readonly on subforms
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user