mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Some fixes and formatting
* CTime::switchUnit(CTimeUnit::hms()); * Coordinate canHandleIndex protected * copyright
This commit is contained in:
committed by
Mathew Sutcliffe
parent
edf8191969
commit
4fcf9efab7
@@ -38,10 +38,7 @@ namespace BlackCore
|
|||||||
OutputVoiceChannel2,
|
OutputVoiceChannel2,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
//! Default constructor
|
||||||
* \brief Default constructor with parent
|
|
||||||
* \param parent
|
|
||||||
*/
|
|
||||||
IAudioMixer(QObject *parent = nullptr);
|
IAudioMixer(QObject *parent = nullptr);
|
||||||
|
|
||||||
//! Virtual destructor.
|
//! Virtual destructor.
|
||||||
|
|||||||
@@ -262,6 +262,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
void CAtcStationComponent::updateTreeView()
|
void CAtcStationComponent::updateTreeView()
|
||||||
{
|
{
|
||||||
|
// EXPERIMENTAL CODE
|
||||||
QAbstractItemModel *old = (this->ui->tvp_AtcStationsOnlineTree->model());
|
QAbstractItemModel *old = (this->ui->tvp_AtcStationsOnlineTree->model());
|
||||||
this->ui->tvp_AtcStationsOnlineTree->setModel(
|
this->ui->tvp_AtcStationsOnlineTree->setModel(
|
||||||
this->ui->tvp_AtcStationsOnline->derivedModel()->toAtcGroupModel()
|
this->ui->tvp_AtcStationsOnline->derivedModel()->toAtcGroupModel()
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
/* Copyright (C) 2013 VATSIM Community / contributors
|
/* Copyright (C) 2013
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* swift Project Community / Contributors
|
||||||
* 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/. */
|
* 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 "serverlistmodel.h"
|
#include "serverlistmodel.h"
|
||||||
#include "blackmisc/blackmiscfreefunctions.h"
|
#include "blackmisc/blackmiscfreefunctions.h"
|
||||||
|
|||||||
@@ -95,6 +95,12 @@ namespace BlackMisc
|
|||||||
return Geo::calculateBearing((*this), otherCoordinate);
|
return Geo::calculateBearing((*this), otherCoordinate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ICoordinateGeodetic::canHandleIndex(const CPropertyIndex &index)
|
||||||
|
{
|
||||||
|
int i = index.frontCasted<int>();
|
||||||
|
return (i >= static_cast<int>(IndexLatitude)) && (i <= static_cast<int>(IndexGeodeticHeightAsString));
|
||||||
|
}
|
||||||
|
|
||||||
CVariant ICoordinateGeodetic::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
|
CVariant ICoordinateGeodetic::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
|
||||||
{
|
{
|
||||||
if (!index.isMyself())
|
if (!index.isMyself())
|
||||||
|
|||||||
@@ -74,12 +74,9 @@ namespace BlackMisc
|
|||||||
//! Initial bearing
|
//! Initial bearing
|
||||||
BlackMisc::PhysicalQuantities::CAngle bearing(const ICoordinateGeodetic &otherCoordinate) const;
|
BlackMisc::PhysicalQuantities::CAngle bearing(const ICoordinateGeodetic &otherCoordinate) const;
|
||||||
|
|
||||||
//! Can given index be handled
|
protected:
|
||||||
static bool canHandleIndex(const BlackMisc::CPropertyIndex &index)
|
//! Can given index be handled?
|
||||||
{
|
static bool canHandleIndex(const BlackMisc::CPropertyIndex &index);
|
||||||
int i = index.frontCasted<int>();
|
|
||||||
return (i >= static_cast<int>(IndexLatitude)) && (i <= static_cast<int>(IndexGeodeticHeightAsString));
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Great circle distance between points
|
//! Great circle distance between points
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ namespace BlackMisc
|
|||||||
QTime CTime::toQTime() const
|
QTime CTime::toQTime() const
|
||||||
{
|
{
|
||||||
CTime copy(*this);
|
CTime copy(*this);
|
||||||
copy.setUnit(CTimeUnit::hms());
|
copy.switchUnit(CTimeUnit::hms());
|
||||||
|
|
||||||
// QTime is not defined for negative numbers
|
// QTime is not defined for negative numbers
|
||||||
// so we use the absolute value here
|
// so we use the absolute value here
|
||||||
|
|||||||
@@ -16,13 +16,11 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
namespace Simulation
|
namespace Simulation
|
||||||
{
|
{
|
||||||
|
|
||||||
IModelMappingsProvider::IModelMappingsProvider(QObject *parent) : QObject(parent) {}
|
IModelMappingsProvider::IModelMappingsProvider(QObject *parent) : QObject(parent) {}
|
||||||
|
|
||||||
const CAircraftMappingList &IModelMappingsProvider::getMappingList() const
|
const CAircraftMappingList &IModelMappingsProvider::getMappingList() const
|
||||||
{
|
{
|
||||||
return this->m_mappings;
|
return m_mappings;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace BlackMisc
|
|||||||
const BlackMisc::Network::CAircraftMappingList &getMappingList() const;
|
const BlackMisc::Network::CAircraftMappingList &getMappingList() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BlackMisc::Network::CAircraftMappingList m_mappings; //!< Mappings
|
BlackMisc::Network::CAircraftMappingList m_mappings; //!< mappings
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Model mappings dummy
|
//! Model mappings dummy
|
||||||
|
|||||||
Reference in New Issue
Block a user