mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 15:45:46 +08:00
Ref T659, login dialog and connected signal/slots with main GUI
This commit is contained in:
committed by
Mat Sutcliffe
parent
7e4e4f0d37
commit
83e8597b14
@@ -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
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user