9 #include "ui_transpondermodecomponent.h"
16 using namespace swift::misc::aviation;
17 using namespace swift::misc::simulation;
18 using namespace swift::core::context;
22 CTransponderModeComponent::CTransponderModeComponent(QWidget *parent)
27 Q_ASSERT_X(
sGui, Q_FUNC_INFO,
"Need sApp");
30 connect(ui->tb_TransponderMode, &QToolButton::released,
this, &CTransponderModeComponent::onClicked,
31 Qt::QueuedConnection);
33 &CTransponderModeComponent::onChangedAircraftCockpit, Qt::QueuedConnection);
38 QPointer<CTransponderModeComponent> myself(
this);
40 if (!myself) {
return; }
47 void CTransponderModeComponent::init()
52 this->setVisible(
false);
56 this->setVisible(
true);
64 this->setToolTip(m_transponder.
toQString());
67 void CTransponderModeComponent::onClicked()
75 void CTransponderModeComponent::onChangedAircraftCockpit(
const CSimulatedAircraft &aircraft,
78 if (this->
identifier() == originator) {
return; }
const context::IContextOwnAircraft * getIContextOwnAircraft() const
Direct access to contexts if a CCoreFacade has been initialized.
bool isShuttingDown() const
Is application shutting down?
bool supportsContexts(bool ignoreShutdownTest=false) const
Supports contexts.
virtual bool setTransponderMode(swift::misc::aviation::CTransponder::TransponderMode mode)=0
Set XPDR mode.
virtual swift::misc::simulation::CSimulatedAircraft getOwnAircraft() const =0
Get own aircraft.
Small component to display XPDR mode.
void changed()
value has been changed
virtual ~CTransponderModeComponent()
Dtor.
Base class with a member CIdentifier to be inherited by a class which has an identity in the environm...
const CIdentifier & identifier() const
Get identifier.
Value object encapsulating information identifying a component of a modular distributed swift process...
void toggleTransponderMode()
Transponder mode toggled.
QString getModeAsShortString() const
Transponder mode as short string.
TransponderMode getTransponderMode() const
Transponder mode.
QString toQString(bool i18n=false) const
Cast as QString.
Comprehensive information of an aircraft.
const aviation::CTransponder & getTransponder() const
Get transponder.
SWIFT_GUI_EXPORT swift::gui::CGuiApplication * sGui
Single instance of GUI application object.
High level reusable GUI components.
Free functions in swift::misc.
auto singleShot(int msec, QObject *target, F &&task)
Starts a single-shot timer which will call a task in the thread of the given object when it times out...