6 #include "ui_flightplandialog.h"
12 using namespace swift::misc::aviation;
13 using namespace swift::core::context;
18 CFlightPlanDialog::CFlightPlanDialog(QWidget *parent) : QDialog(parent), ui(new Ui::
CFlightPlanDialog)
21 this->setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
23 connect(ui->pb_LoadFlightPlan, &QPushButton::clicked,
this, &CFlightPlanDialog::loadFp);
24 connect(ui->comp_CallsignCompleter, &CCallsignCompleter::validCallsignEnteredDigest,
this,
25 &CFlightPlanDialog::loadFp);
32 if (callsign.
isEmpty()) {
return; }
35 ui->te_FlightPlan->setText(fp.
asHTML(
true));
36 ui->comp_CallsignCompleter->setCallsign(callsign);
37 this->setDialogTitle(callsign);
41 void CFlightPlanDialog::setDialogTitle(
const CCallsign &callsign)
45 this->setWindowTitle(
"Flight plan");
48 this->setWindowTitle(
"Flight plan for " + callsign.
asString());
51 void CFlightPlanDialog::loadFp()
53 const CCallsign cs = ui->comp_CallsignCompleter->getCallsign(
false);
const context::IContextNetwork * getIContextNetwork() const
Direct access to contexts if a CCoreFacade has been initialized.
bool isShuttingDown() const
Is application shutting down?
virtual swift::misc::aviation::CFlightPlan loadFlightPlanFromNetwork(const swift::misc::aviation::CCallsign &callsign) const =0
Load flight plan (from network)
Flight plan as dialog, also meant for other callsigns.
void showFlightPlan(const swift::misc::aviation::CCallsign &callsign)
Show a particular callsign flight plan.
virtual ~CFlightPlanDialog()
Destructor.
Value object encapsulating information of a callsign.
const QString & asString() const
Get callsign (normalized)
bool isEmpty() const
Is empty?
Value object for a flight plan.
QString asHTML(bool i18n=false) const
As HTML.
SWIFT_GUI_EXPORT swift::gui::CGuiApplication * sGui
Single instance of GUI application object.
High level reusable GUI components.
Views, mainly QTableView.