AirspaceAdvisoryProvider.cc 1.83 KB
Newer Older
Gus Grubba's avatar
Gus Grubba committed
1 2 3 4 5 6 7 8 9 10 11
/****************************************************************************
 *
 *   (c) 2017 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/

#include "AirspaceAdvisoryProvider.h"

Gus Grubba's avatar
Gus Grubba committed
12 13 14 15 16
AirspaceAdvisory::AirspaceAdvisory(QObject* parent)
    : QObject(parent)
{
}

Gus Grubba's avatar
Gus Grubba committed
17 18 19 20
AirspaceAdvisoryProvider::AirspaceAdvisoryProvider(QObject *parent)
    : QObject(parent)
{
}
Gus Grubba's avatar
Gus Grubba committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46

//-- TODO: This enum is a bitmask, which implies an airspace can be any
//   combination of these types. However, I have not seen any that this
//   was the case.

QString
AirspaceAdvisory::typeStr()
{
    switch(type()) {
    case Airport:               return QString(tr("Airport")); break;
    case Controlled_airspace:   return QString(tr("Controlled Airspace")); break;
    case Special_use_airspace:  return QString(tr("Special Use Airspace")); break;
    case Tfr:                   return QString(tr("TFR")); break;
    case Wildfire:              return QString(tr("Wild Fire")); break;
    case Park:                  return QString(tr("Park")); break;
    case Power_plant:           return QString(tr("Power Plant")); break;
    case Heliport:              return QString(tr("Heliport")); break;
    case Prison:                return QString(tr("Prison")); break;
    case School:                return QString(tr("School")); break;
    case Hospital:              return QString(tr("Hospital")); break;
    case Fire:                  return QString(tr("Fire")); break;
    case Emergency:             return QString(tr("Emergency")); break;
    case Invalid:               return QString(tr("Invalid")); break;
    default:                    return QString(tr("Unknown")); break;
    }
}