mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
Ref T573, small XPDR mode selector/display
This commit is contained in:
committed by
Mat Sutcliffe
parent
53d5ed96af
commit
6adfc6b93f
55
src/blackgui/components/transpondermodecomponent.h
Normal file
55
src/blackgui/components/transpondermodecomponent.h
Normal file
@@ -0,0 +1,55 @@
|
||||
/* Copyright (C) 2019
|
||||
* swift project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution. No part of swift project, including this file, may be copied, modified, propagated,
|
||||
* or distributed except according to the terms contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_COMPONENTS_TRANSPONDERMODECOMPONENT_H
|
||||
#define BLACKGUI_COMPONENTS_TRANSPONDERMODECOMPONENT_H
|
||||
|
||||
#include "blackmisc/aviation/transponder.h"
|
||||
#include "blackmisc/identifiable.h"
|
||||
#include <QFrame>
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui { class CTransponderModeComponent; }
|
||||
namespace BlackMisc { class CIdentifier; namespace Simulation { class CSimulatedAircraft; }}
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
{
|
||||
/**
|
||||
* Small component to display XPDR mode
|
||||
*/
|
||||
class CTransponderModeComponent : public QFrame, BlackMisc::CIdentifiable
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Ctor
|
||||
explicit CTransponderModeComponent(QWidget *parent = nullptr);
|
||||
|
||||
//! Dtor
|
||||
virtual ~CTransponderModeComponent() override;
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CTransponderModeComponent> ui;
|
||||
BlackMisc::Aviation::CTransponder m_transponder;
|
||||
|
||||
//! Init
|
||||
void init();
|
||||
|
||||
//! Clicked
|
||||
void onClicked();
|
||||
|
||||
//! Changed cockpit data
|
||||
void onChangedAircraftCockpit(const BlackMisc::Simulation::CSimulatedAircraft &aircraft, const BlackMisc::CIdentifier &originator);
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user