AirspaceAdvisoryProvider.cc 1.6 KB
Newer Older
Gus Grubba's avatar
Gus Grubba committed
1 2
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
3
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
Gus Grubba's avatar
Gus Grubba committed
4 5 6 7 8 9 10 11
 *
 * 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

//-- 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()) {
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
    case Airport:               return tr("Airport");
    case Controlled_airspace:   return tr("Controlled Airspace");
    case Special_use_airspace:  return tr("Special Use Airspace");
    case Tfr:                   return tr("TFR");
    case Wildfire:              return tr("Wild Fire");
    case Park:                  return tr("Park");
    case Power_plant:           return tr("Power Plant");
    case Heliport:              return tr("Heliport");
    case Prison:                return tr("Prison");
    case School:                return tr("School");
    case Hospital:              return tr("Hospital");
    case Fire:                  return tr("Fire");
    case Emergency:             return tr("Emergency");
    case Invalid:               return tr("Custom");
    default:                    return tr("Unknown");
Gus Grubba's avatar
Gus Grubba committed
45 46
    }
}