Ref T659, login dialog and connected signal/slots with main GUI

This commit is contained in:
Klaus Basan
2019-07-19 03:10:08 +02:00
committed by Mat Sutcliffe
parent 7e4e4f0d37
commit 83e8597b14
6 changed files with 47 additions and 8 deletions

View File

@@ -19,10 +19,29 @@ namespace BlackGui
{
ui->setupUi(this);
this->setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
connect(ui->comp_LoginComponent, &CLoginAdvComponent::loginOrLogoffSuccessful, this, &CLoginDialog::onLoginOrLogoffSuccessful);
connect(ui->comp_LoginComponent, &CLoginAdvComponent::loginOrLogoffCancelled, this, &CLoginDialog::onLoginOrLogoffCancelled);
connect(ui->comp_LoginComponent, &CLoginAdvComponent::requestNetworkSettings, this, &CLoginDialog::onRequestNetworkSettings);
}
CLoginDialog::~CLoginDialog()
{ }
void CLoginDialog::onLoginOrLogoffCancelled()
{
this->reject();
}
void CLoginDialog::onLoginOrLogoffSuccessful()
{
this->accept();
}
void CLoginDialog::onRequestNetworkSettings()
{
emit this->requestNetworkSettings();
this->close();
}
} // ns
}// ns

View File

@@ -33,7 +33,15 @@ namespace BlackGui
//! Destructor
virtual ~CLoginDialog() override;
signals:
//! Request server settings
void requestNetworkSettings();
private:
void onLoginOrLogoffCancelled();
void onLoginOrLogoffSuccessful();
void onRequestNetworkSettings();
QScopedPointer<Ui::CLoginDialog> ui;
};

View File

@@ -6,10 +6,16 @@
<rect>
<x>0</x>
<y>0</y>
<width>640</width>
<height>480</height>
<width>350</width>
<height>500</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>350</width>
<height>500</height>
</size>
</property>
<property name="windowTitle">
<string>Login dialog</string>
</property>