mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Ref T146, read only mode for login mode (so it can be used as display only UI element)
Also some minor tweaks/formatting
This commit is contained in:
committed by
Mathew Sutcliffe
parent
946bdb964e
commit
7ad666c346
@@ -65,9 +65,16 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CLoginModeButtons::setReadOnly(bool readonly)
|
||||
{
|
||||
ui->rb_LoginNormal->setEnabled(!readonly);
|
||||
ui->rb_LoginObserver->setEnabled(!readonly);
|
||||
ui->rb_LoginStealth->setEnabled(!readonly);
|
||||
}
|
||||
|
||||
void CLoginModeButtons::configureLoginModes()
|
||||
{
|
||||
if(CBuildConfig::isStableBranch() && !sGui->getIContextSimulator()->isSimulatorSimulating())
|
||||
if (CBuildConfig::isStableBranch() && !sGui->getIContextSimulator()->isSimulatorSimulating())
|
||||
{
|
||||
// Disable pilot login modes
|
||||
ui->rb_LoginNormal->setEnabled(false);
|
||||
@@ -85,4 +92,4 @@ namespace BlackGui
|
||||
ui->rb_LoginNormal->setChecked(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // ns
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
#include "blackcore/network.h"
|
||||
#include "blackgui/blackguiexport.h"
|
||||
|
||||
#include <QGroupBox>
|
||||
#include <QObject>
|
||||
#include <QScopedPointer>
|
||||
@@ -22,7 +21,6 @@
|
||||
class QWidget;
|
||||
|
||||
namespace Ui { class CLoginModeButtons; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
//! Display login modes (normal, stealth, ...)
|
||||
@@ -35,7 +33,7 @@ namespace BlackGui
|
||||
explicit CLoginModeButtons(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
~CLoginModeButtons();
|
||||
virtual ~CLoginModeButtons();
|
||||
|
||||
//! Get login mode, \sa BlackCore::INetwork::LoginMode
|
||||
BlackCore::INetwork::LoginMode getLoginMode() const;
|
||||
@@ -43,11 +41,14 @@ namespace BlackGui
|
||||
//! Set login mode
|
||||
void setLoginMode(BlackCore::INetwork::LoginMode mode);
|
||||
|
||||
//! Set to read only
|
||||
void setReadOnly(bool readonly);
|
||||
|
||||
private:
|
||||
void configureLoginModes();
|
||||
|
||||
QScopedPointer<Ui::CLoginModeButtons> ui;
|
||||
};
|
||||
}
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>271</width>
|
||||
<height>23</height>
|
||||
<width>257</width>
|
||||
<height>49</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -38,7 +38,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_LognMode">
|
||||
<property name="text">
|
||||
<string>Login mode</string>
|
||||
<string>Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user