refs #712, completers and load from disk for flight plan

This commit is contained in:
Klaus Basan
2016-07-19 04:29:11 +02:00
parent 0357dbde8f
commit e2f8f097e0
5 changed files with 465 additions and 273 deletions

View File

@@ -9,6 +9,8 @@
#include "blackcore/context/contextnetwork.h"
#include "blackcore/context/contextownaircraft.h"
#include "blackcore/webdataservices.h"
#include "blackgui/uppercasevalidator.h"
#include "blackgui/components/flightplancomponent.h"
#include "blackgui/components/selcalcodeselector.h"
#include "blackgui/guiapplication.h"
@@ -18,6 +20,7 @@
#include "blackmisc/aviation/callsign.h"
#include "blackmisc/logcategory.h"
#include "blackmisc/logmessage.h"
#include "blackconfig/buildconfig.h"
#include "blackmisc/network/user.h"
#include "blackmisc/pq/pqstring.h"
#include "blackmisc/pq/speed.h"
@@ -36,6 +39,7 @@
#include <QRadioButton>
#include <QRegExp>
#include <QTabBar>
#include <QCompleter>
#include <Qt>
using namespace BlackMisc;
@@ -43,6 +47,8 @@ using namespace BlackMisc::Aviation;
using namespace BlackMisc::Simulation;
using namespace BlackMisc::PhysicalQuantities;
using namespace BlackGui;
using namespace BlackCore;
using namespace BlackConfig;
namespace BlackGui
{
@@ -52,11 +58,19 @@ namespace BlackGui
QTabWidget(parent),
ui(new Ui::CFlightPlanComponent)
{
Q_ASSERT_X(sGui, Q_FUNC_INFO, "missing sGui");
// UI
ui->setupUi(this);
// fix style
this->tabBar()->setExpanding(false);
// validators
CUpperCaseValidator *ucv = new CUpperCaseValidator(this);
ui->le_Callsign->setValidator(ucv);
ui->le_AircraftType->setValidator(ucv);
// connect
connect(this->ui->pb_Send, &QPushButton::pressed, this, &CFlightPlanComponent::ps_sendFlightPlan);
connect(this->ui->pb_Load, &QPushButton::pressed, this, &CFlightPlanComponent::ps_loadFlightPlanFromNetwork);
@@ -69,12 +83,15 @@ namespace BlackGui
connect(this->ui->cb_PilotRating, &QComboBox::currentTextChanged, this, &CFlightPlanComponent::ps_currentTextChangedToBuildRemarks);
connect(this->ui->cb_RequiredNavigationPerformance, &QComboBox::currentTextChanged, this, &CFlightPlanComponent::ps_currentTextChangedToBuildRemarks);
connect(this->ui->pb_LoadDisk, &QPushButton::clicked, this, &CFlightPlanComponent::ps_loadFromDisk);
connect(this->ui->pb_SaveDisk, &QPushButton::clicked, this, &CFlightPlanComponent::ps_saveToDisk);
bool c = connect(this->ui->le_AircraftRegistration, SIGNAL(textChanged(QString)), this, SLOT(ps_buildRemarksString()));
Q_ASSERT(c);
Q_ASSERT_X(c, Q_FUNC_INFO, "failed connect");
c = connect(this->ui->cb_NoSidsStarts, SIGNAL(toggled(bool)), this, SLOT(ps_buildRemarksString()));
Q_ASSERT(c);
Q_ASSERT_X(c, Q_FUNC_INFO, "failed connect");
c = connect(this->ui->le_AirlineOperator, SIGNAL(textChanged(QString)), this, SLOT(ps_buildRemarksString()));
Q_ASSERT(c);
Q_ASSERT_X(c, Q_FUNC_INFO, "failed connect");
Q_UNUSED(c);
connect(this->ui->pte_AdditionalRemarks, &QPlainTextEdit::textChanged, this, &CFlightPlanComponent::ps_buildRemarksString);
@@ -83,6 +100,10 @@ namespace BlackGui
connect(this->ui->pb_CopyOver, &QPushButton::pressed, this, &CFlightPlanComponent::ps_copyRemarks);
connect(this->ui->pb_RemarksGenerator, &QPushButton::clicked, this, &CFlightPlanComponent::ps_currentTabGenerator);
// web services
connect(sGui->getWebDataServices(), &CWebDataServices::allSwiftDbDataRead, this, &CFlightPlanComponent::ps_swiftDataRead);
// init GUI
this->ps_resetFlightPlan();
this->ps_buildRemarksString();
}
@@ -117,8 +138,8 @@ namespace BlackGui
void CFlightPlanComponent::fillWithFlightPlanData(const BlackMisc::Aviation::CFlightPlan &flightPlan)
{
this->ui->le_AlternateAirport->setText(flightPlan.getAlternateAirportIcao().asString());
this->ui->le_DestinationAirport->setText(flightPlan.getAlternateAirportIcao().asString());
this->ui->le_OriginAirport->setText(flightPlan.getAlternateAirportIcao().asString());
this->ui->le_DestinationAirport->setText(flightPlan.getDestinationAirportIcao().asString());
this->ui->le_OriginAirport->setText(flightPlan.getOriginAirportIcao().asString());
this->ui->pte_Route->setPlainText(flightPlan.getRoute());
this->ui->pte_Remarks->setPlainText(flightPlan.getRemarks());
this->ui->le_TakeOffTimePlanned->setText(flightPlan.getTakeoffTimePlannedHourMin());
@@ -126,7 +147,7 @@ namespace BlackGui
this->ui->le_EstimatedTimeEnroute->setText(flightPlan.getEnrouteTimeHourMin());
this->ui->le_CruiseTrueAirspeed->setText(flightPlan.getCruiseTrueAirspeed().valueRoundedWithUnit(BlackMisc::PhysicalQuantities::CSpeedUnit::kts(), 0));
CAltitude cruiseAlt = flightPlan.getCruiseAltitude();
const CAltitude cruiseAlt = flightPlan.getCruiseAltitude();
if (cruiseAlt.isFlightLevel())
{
this->ui->le_CrusingAltitude->setText(cruiseAlt.toQString());
@@ -244,7 +265,7 @@ namespace BlackGui
if (v.isEmpty() || v.endsWith(defaultIcao(), Qt::CaseInsensitive))
{
messages.push_back(CLogMessage().validationWarning("Missing %1") << this->ui->lbl_AlternateAirport->text());
flightPlan.setAlternateAirportIcao(defaultIcao());
flightPlan.setAlternateAirportIcao(QString(""));
}
else
{
@@ -255,7 +276,7 @@ namespace BlackGui
if (v.isEmpty() || v.endsWith(defaultIcao(), Qt::CaseInsensitive))
{
messages.push_back(CLogMessage().validationWarning("Missing %1") << this->ui->lbl_DestinationAirport->text());
flightPlan.setDestinationAirportIcao(defaultIcao());
flightPlan.setDestinationAirportIcao(QString(""));
}
else
{
@@ -333,14 +354,79 @@ namespace BlackGui
this->ui->le_CruiseTrueAirspeed->setText("100 kts");
this->ui->pte_Remarks->clear();
this->ui->pte_Route->clear();
this->ui->le_AlternateAirport->setText(defaultIcao());
this->ui->le_DestinationAirport->setText(defaultIcao());
this->ui->le_OriginAirport->setText(defaultIcao());
this->ui->le_AlternateAirport->clear();
this->ui->le_DestinationAirport->clear();
this->ui->le_OriginAirport->clear();
this->ui->le_FuelOnBoard->setText(defaultTime());
this->ui->le_EstimatedTimeEnroute->setText(defaultTime());
this->ui->le_TakeOffTimePlanned->setText(QDateTime::currentDateTimeUtc().addSecs(30 * 60).toString("hh:mm"));
}
void CFlightPlanComponent::ps_loadFromDisk()
{
CStatusMessage m;
const QString fileName = QFileDialog::getOpenFileName(nullptr,
tr("Load flight plan"), getDefaultFilename(true),
tr("swift (*.json *.txt)"));
do
{
if (fileName.isEmpty())
{
m = CStatusMessage(this, CStatusMessage::SeverityDebug, "Load canceled", true);
break;
}
const QString json(CFileUtils::readFileToString(fileName));
if (json.isEmpty())
{
m = CStatusMessage(this, CStatusMessage::SeverityWarning, "Reading " + fileName + " yields no data", true);
break;
}
CFlightPlan fp;
fp.convertFromJson(json);
this->fillWithFlightPlanData(fp);
}
while (false);
if (m.isFailure())
{
CLogMessage::preformatted(m);
}
}
void CFlightPlanComponent::ps_saveToDisk()
{
CStatusMessage m;
const QString fileName = QFileDialog::getSaveFileName(nullptr,
tr("Save flight plan"), getDefaultFilename(false),
tr("swift (*.json *.txt)"));
do
{
if (fileName.isEmpty())
{
m = CStatusMessage(this, CStatusMessage::SeverityDebug, "Save canceled", true);
break;
}
CFlightPlan fp;
this->validateAndInitializeFlightPlan(fp);
const QString json(fp.toJsonString());
bool ok = CFileUtils::writeStringToFile(json, fileName);
if (ok)
{
m = CStatusMessage(this, CStatusMessage::SeverityInfo, "Written " + fileName, true);
}
else
{
m = CStatusMessage(this, CStatusMessage::SeverityError, "Writing " + fileName + " failed", true);
}
}
while (false);
if (m.isFailure())
{
CLogMessage::preformatted(m);
}
}
void CFlightPlanComponent::ps_setSelcalInOwnAircraft()
{
if (!sGui->getIContextOwnAircraft()) return;
@@ -438,11 +524,46 @@ namespace BlackGui
this->setCurrentWidget(this->ui->tb_RemarksGenerator);
}
void CFlightPlanComponent::ps_swiftDataRead()
{
this->initCompleters();
}
CIdentifier CFlightPlanComponent::flightPlanIdentifier()
{
if (m_identifier.getName().isEmpty()) { m_identifier = CIdentifier(QStringLiteral("FLIGHTPLANCOMPONENT")); }
return m_identifier;
}
void CFlightPlanComponent::initCompleters()
{
if (!sGui || !sGui->getWebDataServices()) { return; }
QStringList aircraft = sGui->getWebDataServices()->getAircraftIcaoCodes().allIcaoCodes();
ui->le_AircraftType->setCompleter(new QCompleter(aircraft, this));
}
QString CFlightPlanComponent::getDefaultFilename(bool load)
{
// some logic to find a useful default name
QString dir = CBuildConfig::getDocumentationDirectory();
if (load)
{
return CFileUtils::appendFilePaths(dir, CFileUtils::jsonWildcardAppendix());
}
// Save file path
QString name("Flight plan");
if (!ui->le_DestinationAirport->text().isEmpty() && !ui->le_OriginAirport->text().isEmpty())
{
name.append(" ").append(ui->le_OriginAirport->text()).append("-").append(ui->le_DestinationAirport->text());
}
if (!name.endsWith(CFileUtils::jsonAppendix(), Qt::CaseInsensitive))
{
name += CFileUtils::jsonAppendix();
}
return CFileUtils::appendFilePaths(dir, name);
}
} // namespace
} // namespace

View File

@@ -22,6 +22,7 @@
#include <QString>
#include <QTabWidget>
#include <QtGlobal>
#include <QFileDialog>
class QWidget;
@@ -32,10 +33,8 @@ namespace BlackGui
{
namespace Components
{
//! Flight plan widget
class BLACKGUI_EXPORT CFlightPlanComponent :
public QTabWidget
class BLACKGUI_EXPORT CFlightPlanComponent : public QTabWidget
{
Q_OBJECT
@@ -80,6 +79,11 @@ namespace BlackGui
//! Identifier
BlackMisc::CIdentifier flightPlanIdentifier();
//! Set completers
void initCompleters();
QString getDefaultFilename(bool load);
private slots:
//! Call \sa ps_buildRemarksString from combo box signal
void ps_currentTextChangedToBuildRemarks(const QString &text) { this->ps_buildRemarksString(); Q_UNUSED(text); }
@@ -90,6 +94,12 @@ namespace BlackGui
//! Reset Flightplan
void ps_resetFlightPlan();
//! Load from disk
void ps_loadFromDisk();
//! Save to disk
void ps_saveToDisk();
//! Set SELCAL in own aircrafr
void ps_setSelcalInOwnAircraft();
@@ -108,7 +118,9 @@ namespace BlackGui
//! Show generator tab page
void ps_currentTabGenerator();
//! GUI init complete
void ps_swiftDataRead();
};
}
}
} // ns
} // ns
#endif // guard

View File

@@ -6,16 +6,10 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>400</height>
<width>600</width>
<height>500</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>TabWidget</string>
</property>
@@ -69,9 +63,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-77</y>
<width>373</width>
<height>447</height>
<y>0</y>
<width>592</width>
<height>469</height>
</rect>
</property>
<property name="sizePolicy">
@@ -113,198 +107,17 @@
<property name="horizontalSpacing">
<number>6</number>
</property>
<item row="2" column="2">
<widget class="QLabel" name="lbl_TakeOffTimePlanned">
<property name="text">
<string>6. Departure time</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="12" column="2">
<widget class="QPushButton" name="pb_Load">
<property name="text">
<string>Load plan</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="lbl_CruiseTrueAirspeed">
<property name="text">
<string>4. True airspeed</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QPushButton" name="pb_Reset">
<property name="text">
<string>Reset plan</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="lbl_EstimatedTimeEnroute">
<property name="text">
<string>10. Estimated time enroute</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="0">
<layout class="QGridLayout" name="gl_Remarks">
<item row="0" column="0">
<widget class="QLabel" name="lbl_Remarks">
<property name="text">
<string>11. Remarks</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pb_RemarksGenerator">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: transparent;
border: none;
text-align: left;
text-decoration: underline;
}</string>
</property>
<property name="inputMethodHints">
<set>Qt::ImhNone</set>
</property>
<property name="text">
<string>Generator</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="9" column="1" colspan="2">
<widget class="QLineEdit" name="le_PilotsName">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="3">
<widget class="QLabel" name="lbl_AlternateAirport">
<property name="text">
<string>13. Alternate airport</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="12" column="3">
<widget class="QPushButton" name="pb_Send">
<property name="text">
<string>Send plan</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QLineEdit" name="le_CrusingAltitude">
<property name="maxLength">
<number>40</number>
</property>
</widget>
</item>
<item row="7" column="3">
<widget class="QLineEdit" name="le_AlternateAirport">
<property name="inputMask">
<string>&gt;AAAA</string>
<item row="13" column="3">
<widget class="QPushButton" name="pb_SaveDisk">
<property name="toolTip">
<string>Save to disk</string>
</property>
<property name="text">
<string>ICAO</string>
<string>Save</string>
</property>
</widget>
</item>
<item row="9" column="3">
<widget class="QLineEdit" name="le_PilotsHomebase"/>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="le_Callsign">
<property name="inputMask">
<string/>
</property>
<property name="text">
<string/>
</property>
<property name="maxLength">
<number>40</number>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lbl_Type">
<property name="text">
<string>1. Type</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLineEdit" name="le_TakeOffTimePlanned">
<property name="inputMask">
<string>99:99</string>
</property>
<property name="text">
<string>00:00</string>
</property>
<property name="maxLength">
<number>5</number>
</property>
</widget>
</item>
<item row="5" column="0" colspan="4">
<widget class="QPlainTextEdit" name="pte_Route">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>75</height>
</size>
</property>
</widget>
</item>
<item row="4" column="0" colspan="4">
<widget class="QLabel" name="lbl_Route">
<property name="text">
<string>8. Route</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="le_AircraftType"/>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="le_OriginAirport">
<property name="inputMask">
<string>&gt;AAAA</string>
</property>
<property name="text">
<string>ICAO</string>
</property>
<property name="maxLength">
<number>4</number>
<property name="icon">
<iconset resource="../../blackmisc/blackmisc.qrc">
<normaloff>:/pastel/icons/pastel/16/disk.png</normaloff>:/pastel/icons/pastel/16/disk.png</iconset>
</property>
</widget>
</item>
@@ -315,13 +128,16 @@
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLineEdit" name="le_CruiseTrueAirspeed">
<property name="text">
<string>0 kts</string>
<item row="3" column="1">
<widget class="QLineEdit" name="le_OriginAirport">
<property name="inputMask">
<string>&gt;AAAA</string>
</property>
<property name="maxLength">
<number>40</number>
<number>4</number>
</property>
<property name="placeholderText">
<string>ICAO, e.g. EDDF</string>
</property>
</widget>
</item>
@@ -335,6 +151,29 @@
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLineEdit" name="le_CruiseTrueAirspeed">
<property name="maxLength">
<number>40</number>
</property>
<property name="placeholderText">
<string>e.g. 100 kts</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="lbl_Callsign">
<property name="text">
<string>2. Callsign</string>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="lbl_Aircraft_Type">
<property name="text">
@@ -392,16 +231,6 @@
</layout>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="lbl_OriginAirport">
<property name="text">
<string>5. Departure airport</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="lbl_LastSent">
<property name="text">
@@ -409,13 +238,10 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="lbl_Callsign">
<item row="2" column="1">
<widget class="QLabel" name="lbl_OriginAirport">
<property name="text">
<string>2. Callsign</string>
</property>
<property name="scaledContents">
<bool>false</bool>
<string>5. Departure airport</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -432,16 +258,6 @@
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QLabel" name="lbl_CrusingAltitude">
<property name="text">
<string>7. Cruising altitude</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLineEdit" name="le_EstimatedTimeEnroute">
<property name="inputMask">
@@ -450,6 +266,9 @@
<property name="text">
<string>00:00</string>
</property>
<property name="placeholderText">
<string>hh:mm e.g. 02:30</string>
</property>
</widget>
</item>
<item row="10" column="1" colspan="3">
@@ -459,20 +278,10 @@
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLineEdit" name="le_DestinationAirport">
<property name="inputMask">
<string>&gt;AAAA</string>
</property>
<item row="2" column="3">
<widget class="QLabel" name="lbl_CrusingAltitude">
<property name="text">
<string>ICAO</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="lbl_DestinationAirport">
<property name="text">
<string>9.Destination airport</string>
<string>7. Cruising altitude</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -498,16 +307,33 @@
</property>
</widget>
</item>
<item row="7" column="2">
<widget class="QLineEdit" name="le_FuelOnBoard">
<property name="inputMask">
<string>99:99</string>
</property>
<item row="6" column="0">
<widget class="QLabel" name="lbl_DestinationAirport">
<property name="text">
<string>00:00</string>
<string>9.Destination airport</string>
</property>
<property name="maxLength">
<number>5</number>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="lbl_TakeOffTimePlanned">
<property name="text">
<string>6. Departure time</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QLabel" name="lbl_EstimatedTimeEnroute">
<property name="text">
<string>10. Estimated time enroute</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
@@ -527,6 +353,226 @@
</property>
</spacer>
</item>
<item row="7" column="2">
<widget class="QLineEdit" name="le_FuelOnBoard">
<property name="inputMask">
<string>99:99</string>
</property>
<property name="text">
<string>00:00</string>
</property>
<property name="maxLength">
<number>5</number>
</property>
<property name="placeholderText">
<string>hh:mm e.g. 02:30</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLineEdit" name="le_DestinationAirport">
<property name="inputMask">
<string>&gt;AAAA</string>
</property>
<property name="placeholderText">
<string>ICAO, e.g. EDDF</string>
</property>
</widget>
</item>
<item row="12" column="1">
<widget class="QPushButton" name="pb_Reset">
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item row="12" column="2">
<widget class="QPushButton" name="pb_Load">
<property name="toolTip">
<string>Load flight plan from network</string>
</property>
<property name="text">
<string>Load</string>
</property>
<property name="icon">
<iconset resource="../../blackmisc/blackmisc.qrc">
<normaloff>:/diagona/icons/diagona/icons/network-cloud.png</normaloff>:/diagona/icons/diagona/icons/network-cloud.png</iconset>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="lbl_CruiseTrueAirspeed">
<property name="text">
<string>4. True airspeed</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="8" column="0">
<layout class="QGridLayout" name="gl_Remarks">
<item row="0" column="0">
<widget class="QLabel" name="lbl_Remarks">
<property name="text">
<string>11. Remarks</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pb_RemarksGenerator">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: transparent;
border: none;
text-align: left;
text-decoration: underline;
}</string>
</property>
<property name="inputMethodHints">
<set>Qt::ImhNone</set>
</property>
<property name="text">
<string>Generator</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="9" column="1" colspan="2">
<widget class="QLineEdit" name="le_PilotsName">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="9" column="3">
<widget class="QLineEdit" name="le_PilotsHomebase"/>
</item>
<item row="6" column="3">
<widget class="QLabel" name="lbl_AlternateAirport">
<property name="text">
<string>13. Alternate airport</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QLineEdit" name="le_CrusingAltitude">
<property name="maxLength">
<number>40</number>
</property>
<property name="placeholderText">
<string>e.g. FL70</string>
</property>
</widget>
</item>
<item row="7" column="3">
<widget class="QLineEdit" name="le_AlternateAirport">
<property name="inputMask">
<string>&gt;AAAA</string>
</property>
<property name="placeholderText">
<string>ICAO, e.g. EDDF</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lbl_Type">
<property name="text">
<string>1. Type</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="le_Callsign">
<property name="maxLength">
<number>40</number>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="placeholderText">
<string>e.g. DLH1331</string>
</property>
</widget>
</item>
<item row="12" column="3">
<widget class="QPushButton" name="pb_Send">
<property name="toolTip">
<string>Send flight plan to network</string>
</property>
<property name="text">
<string>Send</string>
</property>
<property name="icon">
<iconset resource="../../blackmisc/blackmisc.qrc">
<normaloff>:/diagona/icons/diagona/icons/network-cloud.png</normaloff>:/diagona/icons/diagona/icons/network-cloud.png</iconset>
</property>
</widget>
</item>
<item row="4" column="0" colspan="4">
<widget class="QLabel" name="lbl_Route">
<property name="text">
<string>8. Route</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLineEdit" name="le_TakeOffTimePlanned">
<property name="inputMask">
<string>99:99</string>
</property>
<property name="text">
<string>00:00</string>
</property>
<property name="maxLength">
<number>5</number>
</property>
</widget>
</item>
<item row="5" column="0" colspan="4">
<widget class="QPlainTextEdit" name="pte_Route">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>75</height>
</size>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="le_AircraftType">
<property name="placeholderText">
<string>ICAO, e.g. A321</string>
</property>
</widget>
</item>
<item row="13" column="2">
<widget class="QPushButton" name="pb_LoadDisk">
<property name="toolTip">
<string>Load from disk</string>
</property>
<property name="text">
<string>Load</string>
</property>
<property name="icon">
<iconset resource="../../blackmisc/blackmisc.qrc">
<normaloff>:/pastel/icons/pastel/16/disk.png</normaloff>:/pastel/icons/pastel/16/disk.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
</layout>
@@ -571,8 +617,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>302</width>
<height>468</height>
<width>578</width>
<height>472</height>
</rect>
</property>
<layout class="QVBoxLayout" name="vl_RemarksGeneratorScroll">
@@ -985,6 +1031,8 @@
<tabstop>cb_NavigationEquipment</tabstop>
<tabstop>cb_NoSidsStarts</tabstop>
</tabstops>
<resources/>
<resources>
<include location="../../blackmisc/blackmisc.qrc"/>
</resources>
<connections/>
</ui>

View File

@@ -15,7 +15,6 @@ namespace BlackMisc
{
namespace Aviation
{
QString CFlightPlan::convertToQString(bool i18n) const
{
QString s;
@@ -45,6 +44,5 @@ namespace BlackMisc
{
return BlackMisc::CIconList::iconByIndex(CIcons::StandardIconAppFlightPlan16);
}
} // namespace
} // namespace

View File

@@ -372,6 +372,19 @@
<file>icons/diagona/icons/table-insert.png</file>
<file>icons/diagona/icons/table-insert-column.png</file>
<file>icons/diagona/icons/table-insert-row.png</file>
<file>icons/diagona/icons/network.png</file>
<file>icons/diagona/icons/network-wireless.png</file>
<file>icons/diagona/icons/network-status.png</file>
<file>icons/diagona/icons/network-status-offline.png</file>
<file>icons/diagona/icons/network-status-busy.png</file>
<file>icons/diagona/icons/network-status-away.png</file>
<file>icons/diagona/icons/network-ip.png</file>
<file>icons/diagona/icons/network-ip-local.png</file>
<file>icons/diagona/icons/network-hub.png</file>
<file>icons/diagona/icons/network-firewall.png</file>
<file>icons/diagona/icons/network-ethernet.png</file>
<file>icons/diagona/icons/network-clouds.png</file>
<file>icons/diagona/icons/network-cloud.png</file>
</qresource>
<qresource prefix="/own">
<file>icons/own/app.jpg</file>