swift
facilitytype.cpp
1 // SPDX-FileCopyrightText: Copyright (C) 2019 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 SWIFT_DEFINE_VALUEOBJECT_MIXINS(swift::misc::network, CFacilityType)
7 
8 namespace swift::misc::network
9 {
10  QString CFacilityType::convertToQString(bool i18n) const
11  {
12  Q_UNUSED(i18n)
13 
14  switch (m_facilityType)
15  {
16  case OBS: return QStringLiteral("OBS");
17  case FSS: return QStringLiteral("FSS");
18  case DEL: return QStringLiteral("DEL");
19  case GND: return QStringLiteral("GND");
20  case TWR: return QStringLiteral("TWR");
21  case APP: return QStringLiteral("APP");
22  case CTR: return QStringLiteral("CTR");
23  case Unknown: return QStringLiteral("Unknown");
24  }
25 
26  Q_UNREACHABLE();
27  return QStringLiteral("Unknown");
28  }
29 
30 } // namespace swift::misc::network
QString convertToQString(bool i18n=false) const
Cast as QString.
#define SWIFT_DEFINE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template definition of mixins for a CValueObject subclass.
Definition: valueobject.h:67