mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Style
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include <QTimer>
|
||||
|
||||
class QStringList;
|
||||
class QWidget;
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user