Files
pilotclient/src/blackmisc/aviation/aircraftengine.cpp
Klaus Basan 62d4a94106 refs #865, further improved logging
* 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
2017-02-24 00:19:18 +00:00

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