12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- #include "aflightentry.h"
- #include "src/database/adatabase.h"
- #include "src/opl.h"
- #include "src/functions/atime.h"
- #include "src/classes/asettings.h"
- AFlightEntry::AFlightEntry()
- : AEntry::AEntry(DataPosition(OPL::Db::TABLE_FLIGHTS, 0))
- {}
- AFlightEntry::AFlightEntry(RowId_T row_id)
- : AEntry::AEntry(DataPosition(OPL::Db::TABLE_FLIGHTS, row_id))
- {}
- AFlightEntry::AFlightEntry(RowData_T table_data)
- : AEntry::AEntry(DataPosition(OPL::Db::TABLE_FLIGHTS, 0), table_data)
- {}
- const QString AFlightEntry::summary()
- {
- if(tableData.isEmpty())
- return QString();
- QString flight_summary;
- auto space = QLatin1Char(' ');
- flight_summary.append(tableData.value(OPL::Db::FLIGHTS_DOFT).toString() + space);
- flight_summary.append(tableData.value(OPL::Db::FLIGHTS_DEPT).toString() + space);
- flight_summary.append(ATime::toString(tableData.value(OPL::Db::FLIGHTS_TOFB).toInt())
- + space);
- flight_summary.append(ATime::toString(tableData.value(OPL::Db::FLIGHTS_TONB).toInt())
- + space);
- flight_summary.append(tableData.value(OPL::Db::FLIGHTS_DEST).toString());
- return flight_summary;
- }
|