Ref T659, renamed buttons and use "alwaysOverride" function

This commit is contained in:
Klaus Basan
2019-08-06 20:12:45 +02:00
committed by Mat Sutcliffe
parent 04812581ea
commit 1d7e3dc9aa
3 changed files with 16 additions and 5 deletions

View File

@@ -80,8 +80,8 @@ namespace BlackGui
{
ui->setupUi(this);
connect(ui->pb_Cancel, &QPushButton::clicked, this, &CLoginAdvComponent::loginCancelled, Qt::QueuedConnection);
connect(ui->pb_Ok, &QPushButton::clicked, this, &CLoginAdvComponent::toggleNetworkConnection, Qt::QueuedConnection);
connect(ui->pb_Cancel, &QPushButton::clicked, this, &CLoginAdvComponent::loginCancelled, Qt::QueuedConnection);
connect(ui->pb_Connect, &QPushButton::clicked, this, &CLoginAdvComponent::toggleNetworkConnection, Qt::QueuedConnection);
connect(ui->comp_NetworkDetails, &CNetworkDetailsComponent::overridePilot, this, &CLoginAdvComponent::overrideCredentialsToPilot, Qt::QueuedConnection);
connect(ui->comp_NetworkDetails, &CNetworkDetailsComponent::requestNetworkSettings, this, &CLoginAdvComponent::requestNetworkSettings, Qt::QueuedConnection);
@@ -91,6 +91,9 @@ namespace BlackGui
this->setForceSmall(true);
this->showKillButton(false);
// override details/voice
ui->comp_NetworkDetails->setAlwaysAllowOverride(true);
// auto logoff
// we decided to make it difficult for users to disable it
if (!CBuildConfig::isLocalDeveloperDebugBuild())
@@ -237,6 +240,11 @@ namespace BlackGui
}
}
void CLoginAdvComponent::resetState()
{
ui->comp_NetworkDetails->resetState();
}
void CLoginAdvComponent::loadRememberedUserData()
{
const CServer lastServer = m_networkSetup.getLastServer();

View File

@@ -73,6 +73,9 @@ namespace BlackGui
//! Login requested
void toggleNetworkConnection();
//! Reset state
void resetState();
signals:
//! Login
void loginOrLogoffSuccessful();

View File

@@ -217,9 +217,9 @@
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="pb_Ok">
<widget class="QPushButton" name="pb_Connect">
<property name="text">
<string>ok</string>
<string>connect</string>
</property>
</widget>
</item>
@@ -267,7 +267,7 @@
<tabstops>
<tabstop>form_Pilot</tabstop>
<tabstop>cb_AutoLogoff</tabstop>
<tabstop>pb_Ok</tabstop>
<tabstop>pb_Connect</tabstop>
<tabstop>pb_Cancel</tabstop>
</tabstops>
<resources/>