mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
86 lines
2.2 KiB
C++
86 lines
2.2 KiB
C++
/* Copyright (C) 2015
|
|
* 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 and at http://www.swift-project.org/license.html. 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_INTERNALSCOMPONENT_H
|
|
#define BLACKGUI_INTERNALSCOMPONENT_H
|
|
|
|
#include "blackgui/blackguiexport.h"
|
|
#include "blackmisc/aviation/aircraftparts.h"
|
|
|
|
#include <QObject>
|
|
#include <QScopedPointer>
|
|
#include <QWidget>
|
|
|
|
class QShowEvent;
|
|
|
|
namespace Ui { class CInternalsComponent; }
|
|
|
|
namespace BlackGui
|
|
{
|
|
namespace Components
|
|
{
|
|
//! Internals for debugging, statistics
|
|
class BLACKGUI_EXPORT CInternalsComponent :
|
|
public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
//! Constructor
|
|
explicit CInternalsComponent(QWidget *parent = nullptr);
|
|
|
|
//! Destructor
|
|
~CInternalsComponent();
|
|
|
|
protected:
|
|
//! \copydoc QWidget::showEvent
|
|
virtual void showEvent(QShowEvent *event) override;
|
|
|
|
private slots:
|
|
//! Send aircraft parts
|
|
void ps_sendAircraftParts();
|
|
|
|
//! Set all lights
|
|
void ps_setAllLights();
|
|
|
|
//! Set all engines
|
|
void ps_setAllEngines();
|
|
|
|
//! GUI to JSON
|
|
void ps_guiToJson();
|
|
|
|
//! Enable / disable debugging
|
|
void ps_enableDebug(int state);
|
|
|
|
//! Send the text message
|
|
void ps_sendTextMessage();
|
|
|
|
//! Send a dummy status message
|
|
void ps_logStatusMessage();
|
|
|
|
private:
|
|
QScopedPointer<Ui::CInternalsComponent> ui;
|
|
|
|
//! Get parts object
|
|
BlackMisc::Aviation::CAircraftParts guiToAircraftParts() const;
|
|
|
|
//! GUI set by parts
|
|
void partsToGui(const BlackMisc::Aviation::CAircraftParts &parts);
|
|
|
|
//! Set the context flags
|
|
void contextFlagsToGui();
|
|
};
|
|
|
|
} // namespace
|
|
} // namespace
|
|
|
|
#endif // guard
|