mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
61 lines
1.5 KiB
C++
61 lines
1.5 KiB
C++
/* Copyright (C) 2013 VATSIM Community / contributors
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef BLACKMISC_AVIOBASE_H
|
|
#define BLACKMISC_AVIOBASE_H
|
|
|
|
//! \file
|
|
|
|
#include "blackmisc/valueobject.h"
|
|
#include "blackmisc/pqconstants.h"
|
|
#include <QtGlobal>
|
|
|
|
namespace BlackMisc
|
|
{
|
|
namespace Aviation
|
|
{
|
|
|
|
//! \brief Base class for avionics
|
|
class CAvionicsBase : public CValueObjectStdTuple<CAvionicsBase>
|
|
{
|
|
protected:
|
|
QString m_name; //!< name of the unit
|
|
|
|
//! \brief Constructor
|
|
CAvionicsBase(const QString &name) : m_name(name) {}
|
|
|
|
//! \brief Set name
|
|
void setName(const QString &name)
|
|
{
|
|
this->m_name = name;
|
|
}
|
|
|
|
//! \copydoc CValueObject::convertToQString
|
|
virtual QString convertToQString(bool i18n = false) const override { Q_UNUSED(i18n); return ""; }
|
|
|
|
public:
|
|
//! \brief Name
|
|
QString getName() const
|
|
{
|
|
return this->m_name;
|
|
}
|
|
|
|
//! \brief Are set values valid?
|
|
virtual bool validValues() const
|
|
{
|
|
return true;
|
|
}
|
|
|
|
private:
|
|
BLACK_ENABLE_TUPLE_CONVERSION(CAvionicsBase)
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Aviation::CAvionicsBase, (o.m_name))
|
|
|
|
#endif // guard
|