22 using namespace swift::misc::aviation;
23 using namespace swift::misc::network;
24 using namespace swift::misc::physical_quantities;
25 using namespace swift::misc::simulation;
29 CSimulatedAircraftListModel::CSimulatedAircraftListModel(QObject *parent)
35 (void)QT_TRANSLATE_NOOP(
"ModelSimulatedAircraftList",
"callsign");
36 (void)QT_TRANSLATE_NOOP(
"ModelSimulatedAircraftList",
"pilotrealname");
37 (void)QT_TRANSLATE_NOOP(
"ModelSimulatedAircraftList",
"latitude");
38 (void)QT_TRANSLATE_NOOP(
"ModelSimulatedAircraftList",
"longitude");
39 (void)QT_TRANSLATE_NOOP(
"ModelSimulatedAircraftList",
"altitude");
40 (void)QT_TRANSLATE_NOOP(
"ModelSimulatedAircraftList",
"distance");
41 (void)QT_TRANSLATE_NOOP(
"ModelSimulatedAircraftList",
"height");
42 (void)QT_TRANSLATE_NOOP(
"ModelSimulatedAircraftList",
"transponder");
43 (void)QT_TRANSLATE_NOOP(
"ModelSimulatedAircraftList",
"groundspeed");
44 (void)QT_TRANSLATE_NOOP(
"ModelSimulatedAircraftList",
"icao");
45 (void)QT_TRANSLATE_NOOP(
"ModelSimulatedAircraftList",
"model");
50 if (m_mode == mode) {
return; }
59 CCallsign::IndexCallsignString));
61 "realname",
"pilot's real name", { CSimulatedAircraft::IndexPilot, CUser::IndexRealName }));
65 { CSimulatedAircraft::IndexSituation, CAircraftSituation::IndexAltitude },
68 { CSimulatedAircraft::IndexSituation, CAircraftSituation::IndexGroundSpeed },
71 "icao",
"icao and livery info", { CSimulatedAircraft::IndexCombinedIcaoLiveryStringNetworkModel }));
78 { CSimulatedAircraft::IndexNetworkModel, CAircraftModel::IndexLivery,
79 CLivery::IndexAirlineIcaoCode, CAirlineIcaoCode::IndexIcon },
82 CLivery::IndexAirlineIcaoCode, CAirlineIcaoCode::IndexAirlineDesignator });
86 { CSimulatedAircraft::IndexCom1System, CComSystem::IndexActiveFrequency },
90 CTransponder::IndexTransponderCodeAndModeFormatted }));
92 { CSimulatedAircraft::IndexSituation, CAircraftSituation::IndexLatitude },
95 { CSimulatedAircraft::IndexSituation, CAircraftSituation::IndexLongitude },
111 "cs.",
"callsign", { CSimulatedAircraft::IndexCallsign, CCallsign::IndexCallsignString }));
115 { CSimulatedAircraft::IndexSituation, CAircraftSituation::IndexAltitude },
120 { CSimulatedAircraft::IndexSituation, CAircraftSituation::IndexGroundSpeed },
129 "realname",
"pilot's real name", { CSimulatedAircraft::IndexPilot, CUser::IndexRealName }));
134 "type", { CSimulatedAircraft::IndexModel, CAircraftModel::IndexModelTypeAsString }));
136 "desc.",
"description", { CSimulatedAircraft::IndexModel, CAircraftModel::IndexDescription }));
138 CSimulatedAircraft::IndexNetworkModelAircraftIcaoDifference));
140 CSimulatedAircraft::IndexNetworkModelLiveryDifference));
148 default: qFatal(
"Wrong mode");
break;
static CColumn standardValueObject(const QString &headerName, const swift::misc::CPropertyIndex &propertyIndex, int alignment=CDefaultFormatter::alignDefault())
Get a standard value object formatted column.
static CColumn standardString(const QString &headerName, const swift::misc::CPropertyIndex &propertyIndex, int alignment=CDefaultFormatter::alignDefault())
Get a standard string object formatted column.
void setSortPropertyIndex(const swift::misc::CPropertyIndex &propertyIndex)
Property index used when sorting, option alternative.
void addColumnIncognito(const CColumn &column)
Add a column as incognito enabled.
void addColumn(const CColumn &column)
Add a column.
virtual bool setSortColumnByPropertyIndex(const swift::misc::CPropertyIndex &propertyIndex)
Set column for sorting.
CColumns m_columns
columns metadata
Qt::SortOrder m_sortOrder
sort order (asc/desc)
List model for callsign based objects (callsign is unique key)
@ RenderedMode
focusing on used model
@ NetworkMode
like aircraft in range
void setAircraftMode(AircraftMode mode)
Mode.
Models to be used with views, mainly QTableView.
Free functions in swift::misc.