Hint when only observer mode is enabled because of no simulator attached

This commit is contained in:
Klaus Basan
2019-01-19 11:26:29 +01:00
committed by Mat Sutcliffe
parent 5d46017af2
commit 898e8560d9
2 changed files with 13 additions and 3 deletions

View File

@@ -28,6 +28,7 @@ namespace BlackGui
ui(new Ui::CLoginModeButtons)
{
ui->setupUi(this);
ui->lbl_NoSimulator->setVisible(false);
this->configureLoginModes();
connect(sGui->getIContextSimulator(), &IContextSimulator::simulatorStatusChanged, this, &CLoginModeButtons::configureLoginModes, Qt::QueuedConnection);
}
@@ -86,12 +87,13 @@ namespace BlackGui
if (!sGui->getIContextSimulator() || (!sGui->isDeveloperFlagSet() && !sGui->getIContextSimulator()->isSimulatorSimulating()))
{
// Disable pilot login modes
// Disable pilot login modes, only observer
ui->rb_LoginNormal->setEnabled(false);
ui->rb_LoginStealth->setEnabled(false);
ui->rb_LoginNormal->setToolTip("No simulator available");
ui->rb_LoginStealth->setToolTip("No simulator available");
ui->rb_LoginObserver->setChecked(true);
ui->lbl_NoSimulator->setVisible(true);
}
else
{
@@ -100,6 +102,7 @@ namespace BlackGui
ui->rb_LoginNormal->setToolTip({});
ui->rb_LoginStealth->setToolTip({});
ui->rb_LoginNormal->setChecked(true);
ui->lbl_NoSimulator->setVisible(false);
}
ui->rb_LoginStealth->setVisible(false); // 2019-01 hide as based on discussion with RR

View File

@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>324</width>
<width>363</width>
<height>22</height>
</rect>
</property>
@@ -38,7 +38,7 @@
<item>
<widget class="QLabel" name="lbl_LognMode">
<property name="text">
<string>Login mode</string>
<string>Mode</string>
</property>
</widget>
</item>
@@ -66,6 +66,13 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_NoSimulator">
<property name="text">
<string>No simulator!</string>
</property>
</widget>
</item>
<item>
<spacer name="hs_LoginModeButtons">
<property name="orientation">