mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
Allow to set login buttons
This commit is contained in:
@@ -25,7 +25,6 @@ namespace BlackGui
|
||||
CLoginModeButtons::~CLoginModeButtons()
|
||||
{ }
|
||||
|
||||
|
||||
BlackCore::INetwork::LoginMode BlackGui::CLoginModeButtons::getLoginMode() const
|
||||
{
|
||||
INetwork::LoginMode mode = INetwork::LoginNormal;
|
||||
@@ -39,4 +38,21 @@ namespace BlackGui
|
||||
}
|
||||
return mode;
|
||||
}
|
||||
|
||||
void CLoginModeButtons::setLoginMode(INetwork::LoginMode mode)
|
||||
{
|
||||
switch (mode)
|
||||
{
|
||||
case INetwork::LoginAsObserver:
|
||||
this->ui->rb_LoginObserver->setChecked(true);
|
||||
break;
|
||||
case INetwork::LoginStealth:
|
||||
this->ui->rb_LoginStealth->setChecked(true);
|
||||
break;
|
||||
default:
|
||||
case INetwork::LoginNormal:
|
||||
this->ui->rb_LoginNormal->setChecked(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,9 @@ namespace BlackGui
|
||||
//! Get login mode, \sa BlackCore::INetwork::LoginMode
|
||||
BlackCore::INetwork::LoginMode getLoginMode() const;
|
||||
|
||||
//! Set login mode
|
||||
void setLoginMode(BlackCore::INetwork::LoginMode mode);
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CLoginModeButtons> ui;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user