Files
pilotclient/src/blackgui/components/flightplancomponent.h
Roland Winklmeier f4c2939253 Fix BlackGui header includes
* Include only what is used
* Use forward declaration when possible
* Sorted includes

refs #598
2016-05-20 01:31:11 +02:00

115 lines
3.4 KiB
C++

/* Copyright (C) 2013
* 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_FLIGHTPLANCOMPONENT_H
#define BLACKGUI_FLIGHTPLANCOMPONENT_H
#include "blackgui/blackguiexport.h"
#include "blackmisc/aviation/flightplan.h"
#include "blackmisc/identifier.h"
#include "blackmisc/statusmessagelist.h"
#include <QObject>
#include <QScopedPointer>
#include <QString>
#include <QTabWidget>
#include <QtGlobal>
class QWidget;
namespace BlackMisc { namespace Simulation { class CSimulatedAircraft; } }
namespace Ui { class CFlightPlanComponent; }
namespace BlackGui
{
namespace Components
{
//! Flight plan widget
class BLACKGUI_EXPORT CFlightPlanComponent :
public QTabWidget
{
Q_OBJECT
public:
//! Constructor
explicit CFlightPlanComponent(QWidget *parent = nullptr);
//! Destructor
~CFlightPlanComponent();
public slots:
//! Login data were set
void loginDataSet();
//! Prefill with aircraft data
void prefillWithAircraftData(const BlackMisc::Simulation::CSimulatedAircraft &ownAircraft);
//! Prefill with aircraft dara
void fillWithFlightPlanData(const BlackMisc::Aviation::CFlightPlan &flightPlan);
//! Get this flight plan
BlackMisc::Aviation::CFlightPlan getFlightPlan() const;
private:
QScopedPointer<Ui::CFlightPlanComponent> ui;
//! My flight plan
BlackMisc::Aviation::CFlightPlan m_flightPlan;
//! Validate, generates status messages
BlackMisc::CStatusMessageList validateAndInitializeFlightPlan(BlackMisc::Aviation::CFlightPlan &fligtPlan);
//! Flightplan identifier
BlackMisc::CIdentifier m_identifier;
//! Default value for airport ICAO airports
static const QString &defaultIcao() { static const QString d("ICAO"); return d; }
//! Default value for time
static const QString &defaultTime() { static const QString t("00:00"); return t; }
//! Identifier
BlackMisc::CIdentifier flightPlanIdentifier();
private slots:
//! Call \sa ps_buildRemarksString from combo box signal
void ps_currentTextChangedToBuildRemarks(const QString &text) { this->ps_buildRemarksString(); Q_UNUSED(text); }
//! Send flightplan
void ps_sendFlightPlan();
//! Reset Flightplan
void ps_resetFlightPlan();
//! Set SELCAL in own aircrafr
void ps_setSelcalInOwnAircraft();
//! Load Flightplan
void ps_loadFlightPlanFromNetwork();
//! Validate Flightplan
void ps_validateFlightPlan();
//! Remark
void ps_buildRemarksString();
//! Copy over
void ps_copyRemarks();
//! Show generator tab page
void ps_currentTabGenerator();
};
}
}
#endif // guard