This commit is contained in:
Klaus Basan
2018-08-12 02:40:07 +02:00
parent 9894ec59b8
commit 9bb3f98489
18 changed files with 45 additions and 71 deletions

View File

@@ -49,17 +49,17 @@ namespace BlackGui
{
QWidget *w = qobject_cast<QWidget *>(QObject::sender());
if (!w) { return; }
if (!sGui->getIContextOwnAircraft()) { return; }
if (!sGui || sGui->isShuttingDown() || !sGui->getIContextOwnAircraft()) { return; }
CTransponder::TransponderMode mode;
if (this->m_ledStandby.data() == w)
if (m_ledStandby.data() == w)
{
mode = CTransponder::StateStandby;
}
else if (this->m_ledIdent.data() == w)
else if (m_ledIdent.data() == w)
{
mode = CTransponder::StateIdent;
}
else if (this->m_ledModes.data() == w)
else if (m_ledModes.data() == w)
{
mode = CTransponder::ModeC;
}
@@ -86,9 +86,9 @@ namespace BlackGui
ledLayout->addWidget(m_ledStandby.data());
ledLayout->addWidget(m_ledModes.data());
ledLayout->addWidget(m_ledIdent.data());
connect(this->m_ledIdent.data(), &CLedWidget::clicked, this, &CCockpitTransponderModeLedsComponent::ps_onLedClicked);
connect(this->m_ledModes.data(), &CLedWidget::clicked, this, &CCockpitTransponderModeLedsComponent::ps_onLedClicked);
connect(this->m_ledStandby.data(), &CLedWidget::clicked, this, &CCockpitTransponderModeLedsComponent::ps_onLedClicked);
connect(m_ledIdent.data(), &CLedWidget::clicked, this, &CCockpitTransponderModeLedsComponent::onLedClicked);
connect(m_ledModes.data(), &CLedWidget::clicked, this, &CCockpitTransponderModeLedsComponent::onLedClicked);
connect(m_ledStandby.data(), &CLedWidget::clicked, this, &CCockpitTransponderModeLedsComponent::onLedClicked);
this->setLayout(ledLayout);
// if context is already available set mode

View File

@@ -23,13 +23,10 @@
#include <QObject>
#include <QScopedPointer>
class QWidget;
namespace BlackGui
{
namespace Components
{
//! LEDs representing transponder mode state
class BLACKGUI_EXPORT CCockpitTransponderModeLedsComponent :
public QFrame,

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>640</width>
<height>400</height>
<height>412</height>
</rect>
</property>
<property name="windowTitle">
@@ -58,7 +58,7 @@
<property name="verticalSpacing">
<number>10</number>
</property>
<item row="0" column="1">
<item row="0" column="1" alignment="Qt::AlignLeft">
<widget class="BlackGui::Components::CSimulatorSelector" name="comp_SimulatorSelector"/>
</item>
<item row="4" column="1" colspan="4">

View File

@@ -22,7 +22,6 @@
#include <QString>
class QPoint;
class QWidget;
namespace Ui { class CInfoBarStatusComponent; }
namespace BlackGui
@@ -41,10 +40,7 @@ namespace BlackGui
//!Destructor
virtual ~CInfoBarStatusComponent();
//! Init the LEDs
void initLeds();
//! DBus used
//! DBus used?
void setDBusStatus(bool dbus);
//! Tooltip for DBus

View File

@@ -34,9 +34,6 @@
#include <QScopedPointer>
#include <QString>
class QTimer;
class QWidget;
namespace BlackMisc
{
namespace Simulation
@@ -219,7 +216,7 @@ namespace BlackGui
bool m_autoPopupWizard = false; //!< automatically popup wizard if mapping is needed
bool m_visible = false; //!< is this component selected?
bool m_updatePilotOnServerChanges = true;
const QIcon m_iconPlay {":/famfamfam/icons/famfamfam/icons/silk/control_play_blue.png"};
const QIcon m_iconPlay {":/famfamfam/icons/famfamfam/icons/silk/control_play_blue.png"};
const QIcon m_iconPause {":/famfamfam/icons/famfamfam/icons/silk/control_pause_blue.png"};
const int LogoffIntervalSeconds = 20; //!< time before logoff
QTimer m_logoffCountdownTimer; //!< timer for logoff countdown

View File

@@ -17,8 +17,6 @@
#include <QTimer>
#include <QScopedPointer>
class QWidget;
namespace Ui { class CRegisterComponent; }
namespace BlackGui
{
@@ -26,8 +24,7 @@ namespace BlackGui
{
//! Show registered applications (registered with core) in the GUI
//! \sa BlackCore::Context::IContextApplication::getRegisteredApplications
class BLACKGUI_EXPORT CRegisterComponent :
public QFrame
class BLACKGUI_EXPORT CRegisterComponent : public QFrame
{
Q_OBJECT

View File

@@ -21,7 +21,6 @@
#include <QTimer>
class QStringList;
class QWidget;
namespace BlackGui
{