mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 10:55:32 +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()
|
void CLoginModeButtons::configureLoginModes()
|
||||||
{
|
{
|
||||||
if(CBuildConfig::isStableBranch() && !sGui->getIContextSimulator()->isSimulatorSimulating())
|
if (CBuildConfig::isStableBranch() && !sGui->getIContextSimulator()->isSimulatorSimulating())
|
||||||
{
|
{
|
||||||
// Disable pilot login modes
|
// Disable pilot login modes
|
||||||
ui->rb_LoginNormal->setEnabled(false);
|
ui->rb_LoginNormal->setEnabled(false);
|
||||||
@@ -85,4 +92,4 @@ namespace BlackGui
|
|||||||
ui->rb_LoginNormal->setChecked(true);
|
ui->rb_LoginNormal->setChecked(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} // ns
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
#include "blackcore/network.h"
|
#include "blackcore/network.h"
|
||||||
#include "blackgui/blackguiexport.h"
|
#include "blackgui/blackguiexport.h"
|
||||||
|
|
||||||
#include <QGroupBox>
|
#include <QGroupBox>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
@@ -22,7 +21,6 @@
|
|||||||
class QWidget;
|
class QWidget;
|
||||||
|
|
||||||
namespace Ui { class CLoginModeButtons; }
|
namespace Ui { class CLoginModeButtons; }
|
||||||
|
|
||||||
namespace BlackGui
|
namespace BlackGui
|
||||||
{
|
{
|
||||||
//! Display login modes (normal, stealth, ...)
|
//! Display login modes (normal, stealth, ...)
|
||||||
@@ -35,7 +33,7 @@ namespace BlackGui
|
|||||||
explicit CLoginModeButtons(QWidget *parent = nullptr);
|
explicit CLoginModeButtons(QWidget *parent = nullptr);
|
||||||
|
|
||||||
//! Destructor
|
//! Destructor
|
||||||
~CLoginModeButtons();
|
virtual ~CLoginModeButtons();
|
||||||
|
|
||||||
//! Get login mode, \sa BlackCore::INetwork::LoginMode
|
//! Get login mode, \sa BlackCore::INetwork::LoginMode
|
||||||
BlackCore::INetwork::LoginMode getLoginMode() const;
|
BlackCore::INetwork::LoginMode getLoginMode() const;
|
||||||
@@ -43,11 +41,14 @@ namespace BlackGui
|
|||||||
//! Set login mode
|
//! Set login mode
|
||||||
void setLoginMode(BlackCore::INetwork::LoginMode mode);
|
void setLoginMode(BlackCore::INetwork::LoginMode mode);
|
||||||
|
|
||||||
|
//! Set to read only
|
||||||
|
void setReadOnly(bool readonly);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void configureLoginModes();
|
void configureLoginModes();
|
||||||
|
|
||||||
QScopedPointer<Ui::CLoginModeButtons> ui;
|
QScopedPointer<Ui::CLoginModeButtons> ui;
|
||||||
};
|
};
|
||||||
}
|
} // ns
|
||||||
|
|
||||||
#endif // guard
|
#endif // guard
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>271</width>
|
<width>257</width>
|
||||||
<height>23</height>
|
<height>49</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="lbl_LognMode">
|
<widget class="QLabel" name="lbl_LognMode">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Login mode</string>
|
<string>Mode</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user