mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
* set log flag in hints, so no lock for each aircraft is needed * as a result log functions have a bool log parameter now * highlight situation and parts changed
39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
/* Copyright (C) 2014
|
|
* swift project Community / Contributors
|
|
*
|
|
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
|
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
|
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
|
* contained in the LICENSE file.
|
|
*/
|
|
|
|
#include "blackmisc/aviation/aircraftengine.h"
|
|
#include "blackmisc/stringutils.h"
|
|
|
|
#include <QChar>
|
|
#include <QtGlobal>
|
|
|
|
namespace BlackMisc
|
|
{
|
|
namespace Aviation
|
|
{
|
|
CAircraftEngine::CAircraftEngine(int number, bool on) : m_number(number), m_on(on)
|
|
{
|
|
Q_ASSERT_X(number > 0, "CAircraftEngine", "Engine numbers have to be > 1");
|
|
}
|
|
|
|
void CAircraftEngine::setNumber(int number)
|
|
{
|
|
Q_ASSERT_X(number > 0, "setNumber", "Engine numbers have to be > 1");
|
|
m_number = number;
|
|
}
|
|
|
|
QString CAircraftEngine::convertToQString(bool i18n) const
|
|
{
|
|
Q_UNUSED(i18n);
|
|
static const QString s("%1: %2");
|
|
return s.arg(m_number).arg(BlackMisc::boolToOnOff(m_on));
|
|
}
|
|
} // namespace
|
|
} // namespace
|