mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 10:15:38 +08:00
Formatting, headers, Doxygen
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
* 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/. */
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKCORE_CONTEXTNETWORK_H
|
||||
#define BLACKCORE_CONTEXTNETWORK_H
|
||||
|
||||
//! \file
|
||||
|
||||
#include "blackcore/context.h"
|
||||
#include "blackmisc/avallclasses.h"
|
||||
#include "blackmisc/statusmessage.h"
|
||||
|
||||
@@ -23,7 +23,6 @@ namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
{
|
||||
|
||||
//! Aircraft widget
|
||||
class CAircraftComponent : public QTabWidget, public CRuntimeBasedComponent
|
||||
{
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_FLIGHTPLANCOMPONENT_H
|
||||
#define BLACKGUI_FLIGHTPLANCOMPONENT_H
|
||||
|
||||
//! \file
|
||||
|
||||
#include "blackgui/components/runtimebasedcomponent.h"
|
||||
#include "blackmisc/avaircraft.h"
|
||||
#include "blackmisc/avflightplan.h"
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_MAININFOAREACOMPONENT_H
|
||||
#define BLACKGUI_MAININFOAREACOMPONENT_H
|
||||
|
||||
//! \file
|
||||
|
||||
#include "../dockwidgetinfoarea.h"
|
||||
#include "atcstationcomponent.h"
|
||||
#include "aircraftcomponent.h"
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_SIMULATORCOMPONENT_H
|
||||
#define BLACKGUI_SIMULATORCOMPONENT_H
|
||||
|
||||
//! \file
|
||||
|
||||
#include "runtimebasedcomponent.h"
|
||||
#include <QTabWidget>
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_DOCKWIDGET_H
|
||||
#define BLACKGUI_DOCKWIDGET_H
|
||||
|
||||
//! \file
|
||||
|
||||
#include <QDockWidget>
|
||||
#include <QTabWidget>
|
||||
#include <QMenu>
|
||||
@@ -59,6 +59,8 @@ namespace BlackGui
|
||||
//! Show the window title when docked
|
||||
void showTitleWhenDocked(bool show);
|
||||
|
||||
|
||||
|
||||
public slots:
|
||||
//! Toggle floating
|
||||
void toggleFloating();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Copyright (C) 2013
|
||||
* Swift Project Community / Contributors
|
||||
* 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,
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_DOCKWIDGETINFOAREA_H
|
||||
#define BLACKGUI_DOCKWIDGETINFOAREA_H
|
||||
|
||||
//! \file
|
||||
|
||||
#include "blackgui/dockwidget.h"
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
|
||||
//! Class for dock widgets in the info area, containing some specialized functionality
|
||||
//! Class for dock widgets serving as info bar
|
||||
class CDockWidgetInfoArea : public CDockWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -29,7 +29,6 @@ namespace BlackGui
|
||||
protected:
|
||||
//! Contribute to menu
|
||||
virtual void addToContextMenu(QMenu *contextMenu) const override;
|
||||
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010 by P. Sereno *
|
||||
* http://www.sereno-online.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License *
|
||||
* version 2.1 as published by the Free Software Foundation *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. *
|
||||
***************************************************************************/
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*
|
||||
* Copyright (C) 2010 by P. Sereno
|
||||
* http://www.sereno-online.com
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License
|
||||
* version 2.1 as published by the Free Software Foundation
|
||||
*/
|
||||
|
||||
#include "led.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QtGlobal>
|
||||
@@ -20,7 +23,6 @@
|
||||
#include <QtSvg>
|
||||
#include <QSvgRenderer>
|
||||
|
||||
#include "led.h"
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2010 by P. Sereno *
|
||||
* http://www.sereno-online.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Lesser General Public License *
|
||||
* version 2.1 as published by the Free Software Foundation *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. *
|
||||
***************************************************************************/
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*
|
||||
* Copyright (C) 2010 by P. Sereno
|
||||
* http://www.sereno-online.com
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License
|
||||
* version 2.1 as published by the Free Software Foundation
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_LED_H
|
||||
#define BLACKGUI_LED_H
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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 "atcstationlistmodel.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
/* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\file
|
||||
*/
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_ATCLISTMODEL_H
|
||||
#define BLACKGUI_ATCLISTMODEL_H
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_COLUMNS_H
|
||||
#define BLACKGUI_COLUMNS_H
|
||||
|
||||
//! \file
|
||||
|
||||
#include "blackmisc/valueobject.h" // for qHash overload, include before Qt stuff due GCC issue
|
||||
#include "blackmisc/collection.h"
|
||||
#include <QObject>
|
||||
|
||||
@@ -120,7 +120,6 @@ namespace BlackGui
|
||||
return this->m_container.size();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Update
|
||||
*/
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_LISTMODELBASE_H
|
||||
#define BLACKGUI_LISTMODELBASE_H
|
||||
|
||||
@@ -118,7 +120,7 @@ namespace BlackGui
|
||||
//! \copydoc QAbstractTableModel::flags
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||
|
||||
//! Update by new list
|
||||
//! Update by new container
|
||||
virtual int update(const ContainerType &container);
|
||||
|
||||
//! Update single element
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
/* Copyright (C) 2013
|
||||
* 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 "selcalcodeselector.h"
|
||||
#include "ui_selcalcodeselector.h"
|
||||
#include "blackmisc/avselcal.h"
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_SELCALCODESELECTOR_H
|
||||
#define BLACKGUI_SELCALCODESELECTOR_H
|
||||
|
||||
@@ -7,9 +18,7 @@ namespace Ui { class CSelcalCodeSelector; }
|
||||
namespace BlackGui
|
||||
{
|
||||
|
||||
/*!
|
||||
* \brief SELCAL mode selector
|
||||
*/
|
||||
//! SELCAL mode selector
|
||||
class CSelcalCodeSelector : public QFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_NAMEVARIANTPAIRVIEW_H
|
||||
#define BLACKGUI_NAMEVARIANTPAIRVIEW_H
|
||||
|
||||
//! \file
|
||||
|
||||
#include "viewbase.h"
|
||||
#include "../models/namevariantpairlistmodel.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / authors
|
||||
* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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 "avaircraftlist.h"
|
||||
#include "nwuser.h"
|
||||
@@ -15,7 +19,7 @@ namespace BlackMisc
|
||||
namespace Aviation
|
||||
{
|
||||
/*
|
||||
* Empty constructor
|
||||
* Default constructor
|
||||
*/
|
||||
CAircraftList::CAircraftList() { }
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / authors
|
||||
* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
|
||||
@@ -27,10 +27,10 @@ namespace BlackMisc
|
||||
class CAircraftSituation : public BlackMisc::CValueObject, public BlackMisc::Geo::ICoordinateGeodetic
|
||||
{
|
||||
public:
|
||||
//! \brief Default constructor.
|
||||
//! Default constructor.
|
||||
CAircraftSituation() : m_timestamp(QDateTime::currentDateTimeUtc()) {}
|
||||
|
||||
//! \brief Comprehensive Constructor
|
||||
//! Comprehensive Constructor
|
||||
CAircraftSituation(const BlackMisc::Geo::CCoordinateGeodetic &position, const BlackMisc::Aviation::CAltitude &altitude,
|
||||
const BlackMisc::Aviation::CHeading &heading = BlackMisc::Aviation::CHeading(),
|
||||
const BlackMisc::PhysicalQuantities::CAngle &pitch = BlackMisc::PhysicalQuantities::CAngle(),
|
||||
@@ -39,7 +39,7 @@ namespace BlackMisc
|
||||
: m_position(position), m_altitude(altitude), m_heading(heading), m_pitch(pitch),
|
||||
m_bank(bank), m_groundspeed(gs), m_timestamp(QDateTime::currentDateTimeUtc()) {}
|
||||
|
||||
//! \brief Properties by index
|
||||
//! Properties by index
|
||||
enum ColumnIndex
|
||||
{
|
||||
IndexPosition = 1000, // used, so it can be chained in aircraft
|
||||
@@ -70,10 +70,10 @@ namespace BlackMisc
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
|
||||
//! \brief Get position
|
||||
//! Get position
|
||||
const BlackMisc::Geo::CCoordinateGeodetic &getPosition() const { return this->m_position; }
|
||||
|
||||
//! \brief Set position
|
||||
//! Set position
|
||||
void setPosition(const BlackMisc::Geo::CCoordinateGeodetic &position) { this->m_position = position; }
|
||||
|
||||
//! \copydoc ICoordinateGeodetic::latitude()
|
||||
@@ -85,52 +85,52 @@ namespace BlackMisc
|
||||
//! \copydoc CCoordinateGeodetic::height
|
||||
const BlackMisc::PhysicalQuantities::CLength &getHeight() const { return this->m_position.geodeticHeight(); }
|
||||
|
||||
//! \brief Set height
|
||||
//! Set height
|
||||
void setHeight(const BlackMisc::PhysicalQuantities::CLength &height) { this->m_position.setGeodeticHeight(height); }
|
||||
|
||||
//! \brief Get heading
|
||||
//! Get heading
|
||||
const BlackMisc::Aviation::CHeading &getHeading() const { return this->m_heading; }
|
||||
|
||||
//! \brief Set heading
|
||||
//! Set heading
|
||||
void setHeading(const BlackMisc::Aviation::CHeading &heading) { this->m_heading = heading; }
|
||||
|
||||
//! \brief Get altitude (true)
|
||||
//! Get altitude (true)
|
||||
const BlackMisc::Aviation::CAltitude &getAltitude() const { return this->m_altitude; }
|
||||
|
||||
//! \brief Set altitude
|
||||
//! Set altitude
|
||||
void setAltitude(const BlackMisc::Aviation::CAltitude &altitude) { this->m_altitude = altitude; }
|
||||
|
||||
//! \brief Get pitch
|
||||
//! Get pitch
|
||||
const BlackMisc::PhysicalQuantities::CAngle &getPitch() const { return this->m_pitch; }
|
||||
|
||||
//! \brief Set pitch
|
||||
//! Set pitch
|
||||
void setPitch(const BlackMisc::PhysicalQuantities::CAngle &pitch) { this->m_pitch = pitch; }
|
||||
|
||||
//! Get bank (angle)
|
||||
const BlackMisc::PhysicalQuantities::CAngle &getBank() const { return this->m_bank; }
|
||||
|
||||
//! \brief Set bank (angle)
|
||||
//! Set bank (angle)
|
||||
void setBank(const BlackMisc::PhysicalQuantities::CAngle &bank) { this->m_bank = bank; }
|
||||
|
||||
//! \brief Get groundspeed
|
||||
//! Get groundspeed
|
||||
const BlackMisc::PhysicalQuantities::CSpeed &getGroundSpeed() const { return this->m_groundspeed; }
|
||||
|
||||
//! \brief Set groundspeed
|
||||
//! Set groundspeed
|
||||
void setGroundspeed(const BlackMisc::PhysicalQuantities::CSpeed &groundspeed) { this->m_groundspeed = groundspeed; }
|
||||
|
||||
//! \brief Timestamp
|
||||
//! Timestamp
|
||||
const QDateTime &getTimestamp() const { return this->m_timestamp;}
|
||||
|
||||
//! \brief Equal operator ==
|
||||
//! Equal operator ==
|
||||
bool operator ==(const CAircraftSituation &other) const;
|
||||
|
||||
//! \brief Unequal operator !=
|
||||
//! Unequal operator !=
|
||||
bool operator !=(const CAircraftSituation &other) const;
|
||||
|
||||
//! \copydoc CValueObject::getValueHash
|
||||
virtual uint getValueHash() const override;
|
||||
|
||||
//! \brief Register metadata
|
||||
//! Register metadata
|
||||
static void registerMetadata();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* Copyright (C) 2013 VATSIM Community
|
||||
* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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 "avaltitude.h"
|
||||
#include "pqstring.h"
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_AVALTITUDE_H
|
||||
#define BLACKMISC_AVALTITUDE_H
|
||||
@@ -12,7 +18,7 @@ namespace BlackMisc
|
||||
namespace Aviation
|
||||
{
|
||||
/*!
|
||||
* \brief Altitude as used in aviation, can be AGL or MSL altitude
|
||||
* Altitude as used in aviation, can be AGL or MSL altitude
|
||||
* \remarks Intentionally allowing +/- CLength , and >= / <= CLength.
|
||||
*/
|
||||
class CAltitude : public BlackMisc::PhysicalQuantities::CLength
|
||||
@@ -56,7 +62,7 @@ namespace BlackMisc
|
||||
CAltitude() : BlackMisc::PhysicalQuantities::CLength(0, BlackMisc::PhysicalQuantities::CLengthUnit::m()), m_datum(MeanSeaLevel) {}
|
||||
|
||||
/*!
|
||||
* \brief Constructor
|
||||
* Constructor
|
||||
* \param value
|
||||
* \param datum MSL or AGL?
|
||||
* \param unit
|
||||
|
||||
@@ -37,10 +37,7 @@ namespace BlackMisc
|
||||
{}
|
||||
|
||||
//! \copydoc CValueObject::toQVariant()
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
//! \copydoc CValueObject::toIcon()
|
||||
virtual const QPixmap &toIcon() const override
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / authors
|
||||
* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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 "avflightplan.h"
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
/* Copyright (C) 2014 VATSIM Community / authors
|
||||
* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\file
|
||||
*/
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_AVFLIGHTPLAN_H
|
||||
#define BLACKMISC_AVFLIGHTPLAN_H
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_AVHEADING_H
|
||||
#define BLACKMISC_AVHEADING_H
|
||||
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
/* Copyright (C) 2013
|
||||
* 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 "avselcal.h"
|
||||
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / authors
|
||||
* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_SELCAL_H
|
||||
#define BLACKMISC_SELCAL_H
|
||||
|
||||
#include "blackmisc/pqfrequency.h"
|
||||
#include "valueobject.h"
|
||||
|
||||
@@ -21,10 +28,10 @@ namespace BlackMisc
|
||||
{
|
||||
|
||||
public:
|
||||
//! \brief Default constructor.
|
||||
//! Default constructor.
|
||||
CSelcal() {}
|
||||
|
||||
//! \brief Constructor.
|
||||
//! Constructor.
|
||||
CSelcal(const QString &code) : m_code(code.trimmed()) {}
|
||||
|
||||
/*!
|
||||
@@ -39,22 +46,22 @@ namespace BlackMisc
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
|
||||
//! \brief Is valid?
|
||||
//! Is valid?
|
||||
bool isValid() const { return CSelcal::isValidCode(this->m_code); }
|
||||
|
||||
//! \brief Get SELCAL code
|
||||
//! Get SELCAL code
|
||||
const QString &getCode() const { return this->m_code; }
|
||||
|
||||
/*!
|
||||
* \brief List of 4 frequencies, if list is empty SELCAL code is not valid
|
||||
* List of 4 frequencies, if list is empty SELCAL code is not valid
|
||||
* \return either 4 frequencies, or empty list
|
||||
*/
|
||||
QList<BlackMisc::PhysicalQuantities::CFrequency> getFrequencies() const;
|
||||
|
||||
//! \brief Equal operator ==
|
||||
//! Equal operator ==
|
||||
bool operator ==(const CSelcal &other) const;
|
||||
|
||||
//! \brief Unequal operator !=
|
||||
//! Unequal operator !=
|
||||
bool operator !=(const CSelcal &other) const;
|
||||
|
||||
//! \copydoc CValueObject::getValueHash
|
||||
@@ -66,28 +73,28 @@ namespace BlackMisc
|
||||
//! \copydoc CValueObject::fromJson
|
||||
void fromJson(const QJsonObject &json) override;
|
||||
|
||||
//! \brief Register metadata
|
||||
//! Register metadata
|
||||
static void registerMetadata();
|
||||
|
||||
//! \copydoc TupleConverter<>::jsonMembers()
|
||||
static const QStringList &jsonMembers();
|
||||
|
||||
//! \brief Equals given string
|
||||
//! Equals given string
|
||||
bool equalsString(const QString &code) const;
|
||||
|
||||
//! \brief Valid SELCAL characters
|
||||
//! Valid SELCAL characters
|
||||
static const QString &validCharacters();
|
||||
|
||||
//! \brief Is given character a valid SELCAL characer?
|
||||
//! Is given character a valid SELCAL characer?
|
||||
static bool isValidCharacter(QChar c);
|
||||
|
||||
//! \brief Valid SELCAL code?
|
||||
//! Valid SELCAL code?
|
||||
static bool isValidCode(const QString &code);
|
||||
|
||||
//! \brief Audio frequency for character
|
||||
//! Audio frequency for character
|
||||
static const BlackMisc::PhysicalQuantities::CFrequency &audioFrequencyEquivalent(QChar c);
|
||||
|
||||
//! \brief All valid code pairs: AB, AC, AD ...
|
||||
//! All valid code pairs: AB, AC, AD ...
|
||||
static const QStringList &codePairs();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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 "blackmiscfreefunctions.h"
|
||||
#include "avallclasses.h"
|
||||
@@ -119,7 +123,7 @@ void BlackMisc::Settings::registerMetadata()
|
||||
}
|
||||
|
||||
/*
|
||||
* Metadata for Voice
|
||||
* Metadata for Audio
|
||||
*/
|
||||
void BlackMisc::Audio::registerMetadata()
|
||||
{
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_FREEFUNCTIONS_H
|
||||
#define BLACKMISC_FREEFUNCTIONS_H
|
||||
@@ -16,9 +22,12 @@
|
||||
* Workaround, to call initResource from namespace. Used in BlackMisc::initResources().
|
||||
* Q_INIT_RESOURCE adds resource, here the translation files.
|
||||
*/
|
||||
// cannot be declared within namespace, see docu
|
||||
// hence BlackMisc::initResources() calls this inline function
|
||||
inline void initBlackMiscResources() { Q_INIT_RESOURCE(blackmisc); }
|
||||
inline void initBlackMiscResources()
|
||||
{
|
||||
// cannot be declared within namespace, see docu
|
||||
// hence BlackMisc::initResources() calls this inline function
|
||||
Q_INIT_RESOURCE(blackmisc);
|
||||
}
|
||||
|
||||
/*!
|
||||
* Free functions in BlackMisc
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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/geoearthangle.h"
|
||||
#include "blackmisc/geolatitude.h"
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_GEOEARTHANGLE_H
|
||||
#define BLACKMISC_GEOEARTHANGLE_H
|
||||
@@ -12,18 +18,18 @@ namespace BlackMisc
|
||||
namespace Geo
|
||||
{
|
||||
/*!
|
||||
* \brief Base class for latitude / longitude
|
||||
* Base class for latitude / longitude
|
||||
*/
|
||||
template <class LATorLON> class CEarthAngle : public BlackMisc::PhysicalQuantities::CAngle
|
||||
{
|
||||
protected:
|
||||
//! \brief Default constructor
|
||||
//! Default constructor
|
||||
CEarthAngle() : CAngle(0.0, BlackMisc::PhysicalQuantities::CAngleUnit::deg()) {}
|
||||
|
||||
//! \brief Init by double value
|
||||
//! Init by double value
|
||||
CEarthAngle(double value, const BlackMisc::PhysicalQuantities::CAngleUnit &unit) : CAngle(value, unit) {}
|
||||
|
||||
//! \brief Init by CAngle value
|
||||
//! Init by CAngle value
|
||||
CEarthAngle(const BlackMisc::PhysicalQuantities::CAngle &angle) : CAngle(angle) {}
|
||||
|
||||
//! \copydoc CValueObject::convertToQString
|
||||
@@ -54,29 +60,29 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
public:
|
||||
//! \brief Virtual destructor
|
||||
//! Virtual destructor
|
||||
virtual ~CEarthAngle() {}
|
||||
|
||||
//! \brief Equal operator ==
|
||||
//! Equal operator ==
|
||||
bool operator==(const CEarthAngle &latOrLon) const
|
||||
{
|
||||
return this->CAngle::operator ==(latOrLon);
|
||||
}
|
||||
|
||||
//! \brief Not equal operator !=
|
||||
//! Not equal operator !=
|
||||
bool operator!=(const CEarthAngle &latOrLon) const
|
||||
{
|
||||
return this->CAngle::operator !=(latOrLon);
|
||||
}
|
||||
|
||||
//! \brief Plus operator +=
|
||||
//! Plus operator +=
|
||||
CEarthAngle &operator +=(const CEarthAngle &latOrLon)
|
||||
{
|
||||
this->CAngle::operator +=(latOrLon);
|
||||
return *this;
|
||||
}
|
||||
|
||||
//! \brief Minus operator-=
|
||||
//! Minus operator-=
|
||||
CEarthAngle &operator -=(const CEarthAngle &latOrLon)
|
||||
{
|
||||
this->CAngle::operator -=(latOrLon);
|
||||
@@ -84,7 +90,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Multiply operator *=
|
||||
* Multiply operator *=
|
||||
* \param multiply
|
||||
* \return
|
||||
*/
|
||||
@@ -95,7 +101,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Greater operator >
|
||||
* Greater operator >
|
||||
* \param latOrLon
|
||||
* \return
|
||||
*/
|
||||
@@ -104,25 +110,25 @@ namespace BlackMisc
|
||||
return this->CAngle::operator >(latOrLon);
|
||||
}
|
||||
|
||||
//! \brief Less operator <
|
||||
//! Less operator <
|
||||
bool operator <(const CEarthAngle &latOrLon) const
|
||||
{
|
||||
return this->CAngle::operator >(latOrLon);
|
||||
}
|
||||
|
||||
//! \brief Less equal operator <=
|
||||
//! Less equal operator <=
|
||||
bool operator <=(const CEarthAngle &latOrLon) const
|
||||
{
|
||||
return this->CAngle::operator <=(latOrLon);
|
||||
}
|
||||
|
||||
//! \brief Greater equal operator >=
|
||||
//! Greater equal operator >=
|
||||
bool operator >=(const CEarthAngle &latOrLon) const
|
||||
{
|
||||
return this->CAngle::operator >=(latOrLon);
|
||||
}
|
||||
|
||||
//! \brief Plus operator +
|
||||
//! Plus operator +
|
||||
LATorLON operator +(const CEarthAngle &latOrLon) const
|
||||
{
|
||||
LATorLON l(*this);
|
||||
@@ -130,7 +136,7 @@ namespace BlackMisc
|
||||
return l;
|
||||
}
|
||||
|
||||
//! \brief Minus operator -
|
||||
//! Minus operator -
|
||||
LATorLON operator -(const CEarthAngle &latOrLon) const
|
||||
{
|
||||
LATorLON l(*this);
|
||||
@@ -139,7 +145,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Multiply operator *
|
||||
* Multiply operator *
|
||||
* \param multiply
|
||||
* \return
|
||||
*/
|
||||
@@ -150,11 +156,12 @@ namespace BlackMisc
|
||||
return l;
|
||||
}
|
||||
|
||||
//! \brief Register metadata
|
||||
|
||||
//! Register metadata
|
||||
static void registerMetadata();
|
||||
|
||||
/*!
|
||||
* \brief Latitude / Longitude from a WGS string such as
|
||||
* Latitude / Longitude from a WGS string such as
|
||||
* \param wgsCoordinate 50° 2′ 0″ N / 8° 34′ 14″ E
|
||||
* \return
|
||||
*/
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_GEOLATITUDE_H
|
||||
#define BLACKMISC_GEOLATITUDE_H
|
||||
|
||||
@@ -9,55 +20,35 @@ namespace BlackMisc
|
||||
namespace Geo
|
||||
{
|
||||
|
||||
/*!
|
||||
* \brief Latitude
|
||||
*/
|
||||
//! Latitude
|
||||
class CLatitude : public CEarthAngle<CLatitude>
|
||||
{
|
||||
protected:
|
||||
/*!
|
||||
* \brief Specific string representation
|
||||
* \param i18n
|
||||
* \return
|
||||
*/
|
||||
//! \copydoc CValueObject::convertToQString
|
||||
virtual QString convertToQString(bool i18n = false) const
|
||||
{
|
||||
QString s(CEarthAngle::convertToQString(i18n));
|
||||
if (!this->isZeroEpsilonConsidered())
|
||||
{
|
||||
s.append(this->isNegativeWithEpsilonConsidered() ? " S" : " N");
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
public:
|
||||
/*!
|
||||
* \brief Default constructor
|
||||
*/
|
||||
//! Default constructor
|
||||
CLatitude() : CEarthAngle() {}
|
||||
|
||||
/*!
|
||||
* \brief Constructor
|
||||
* \param angle
|
||||
*/
|
||||
//! Constructor
|
||||
explicit CLatitude(const BlackMisc::PhysicalQuantities::CAngle &angle) : CEarthAngle(angle) {}
|
||||
|
||||
/*!
|
||||
* \brief Init by double value
|
||||
* \param value
|
||||
* \param unit
|
||||
*/
|
||||
//! Init by double value
|
||||
CLatitude(double value, const BlackMisc::PhysicalQuantities::CAngleUnit &unit) : CEarthAngle(value, unit) {}
|
||||
|
||||
/*!
|
||||
* \copydoc CValueObject::toQVariant
|
||||
*/
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
/*!
|
||||
* \brief Virtual destructor
|
||||
*/
|
||||
//! Virtual destructor
|
||||
virtual ~CLatitude() {}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_GEOLONGITUDE_H
|
||||
#define BLACKMISC_GEOLONGITUDE_H
|
||||
|
||||
#include "blackmisc/geoearthangle.h"
|
||||
|
||||
namespace BlackMisc
|
||||
@@ -7,17 +19,11 @@ namespace BlackMisc
|
||||
namespace Geo
|
||||
{
|
||||
|
||||
/*!
|
||||
* \brief Longitude
|
||||
*/
|
||||
//! Longitude
|
||||
class CLongitude : public CEarthAngle<CLongitude>
|
||||
{
|
||||
protected:
|
||||
/*!
|
||||
* \brief Specific string representation
|
||||
* \param i18n
|
||||
* \return
|
||||
*/
|
||||
//! \copydoc CValueObject::convertToQString
|
||||
virtual QString convertToQString(bool i18n = false) const
|
||||
{
|
||||
QString s(CEarthAngle::convertToQString(i18n));
|
||||
@@ -27,35 +33,22 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
public:
|
||||
/*!
|
||||
* \brief Default constructor
|
||||
*/
|
||||
//! Default constructor
|
||||
CLongitude() : CEarthAngle() {}
|
||||
|
||||
/*!
|
||||
* \brief Constructor
|
||||
* \param angle
|
||||
*/
|
||||
//! Constructor
|
||||
explicit CLongitude(const BlackMisc::PhysicalQuantities::CAngle &angle) : CEarthAngle(angle) {}
|
||||
|
||||
/*!
|
||||
* \brief Init by double value
|
||||
* \param value
|
||||
* \param unit
|
||||
*/
|
||||
//! Init by double value
|
||||
CLongitude(double value, const BlackMisc::PhysicalQuantities::CAngleUnit &unit) : CEarthAngle(value, unit) {}
|
||||
|
||||
/*!
|
||||
* \copydoc CValueObject::toQVariant
|
||||
*/
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Virtual destructor
|
||||
*/
|
||||
//! Virtual destructor
|
||||
virtual ~CLongitude() {}
|
||||
};
|
||||
|
||||
|
||||
@@ -30,10 +30,7 @@ namespace BlackMisc
|
||||
CNameVariantPair(const QString &name, const CVariant &variant);
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
//! Get name.
|
||||
const QString &getName() const { return m_name; }
|
||||
|
||||
@@ -34,7 +34,6 @@ namespace BlackMisc
|
||||
bool CServer::isA(int metaTypeId) const
|
||||
{
|
||||
if (metaTypeId == qMetaTypeId<CServer>()) { return true; }
|
||||
|
||||
return this->CValueObject::isA(metaTypeId);
|
||||
}
|
||||
|
||||
@@ -44,7 +43,6 @@ namespace BlackMisc
|
||||
int CServer::compareImpl(const CValueObject &otherBase) const
|
||||
{
|
||||
const auto &other = static_cast<const CServer &>(otherBase);
|
||||
|
||||
return compare(TupleConverter<CServer>::toTuple(*this), TupleConverter<CServer>::toTuple(other));
|
||||
}
|
||||
|
||||
|
||||
@@ -26,10 +26,7 @@ namespace BlackMisc
|
||||
: m_name(name), m_description(description), m_address(address), m_port(port), m_user(user), m_isAcceptingConnections(isAcceptingConnections) {}
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
//! Get address.
|
||||
const QString &getAddress() const { return m_address; }
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
/* Copyright (C) 2013
|
||||
* 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 "nwuser.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include <tuple>
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / authors
|
||||
* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_USER_H
|
||||
#define BLACKMISC_USER_H
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
/* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_PQANGLE_H
|
||||
#define BLACKMISC_PQANGLE_H
|
||||
|
||||
#include "blackmisc/pqphysicalquantity.h"
|
||||
#include "blackmisc/mathematics.h"
|
||||
|
||||
@@ -12,10 +19,7 @@ namespace BlackMisc
|
||||
{
|
||||
namespace PhysicalQuantities
|
||||
{
|
||||
|
||||
/*!
|
||||
* \brief Physical unit angle (radians, degrees)
|
||||
*/
|
||||
//! Physical unit angle (radians, degrees)
|
||||
class CAngle : public CPhysicalQuantity<CAngleUnit, CAngle>
|
||||
{
|
||||
public:
|
||||
@@ -52,35 +56,21 @@ namespace BlackMisc
|
||||
CAngleUnit::sexagesimalDegMin()) {}
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
/*!
|
||||
* \brief Virtual destructor
|
||||
*/
|
||||
|
||||
//! Virtual destructor
|
||||
virtual ~CAngle() {}
|
||||
|
||||
/*!
|
||||
* \brief Value as factor of PI (e.g. 0.5PI)
|
||||
* \return
|
||||
*/
|
||||
double piFactor() const
|
||||
{
|
||||
return BlackMisc::Math::CMath::round(this->value(CAngleUnit::rad()) / BlackMisc::Math::CMath::PI() , 6);
|
||||
}
|
||||
//! Value as factor of PI (e.g. 0.5PI)
|
||||
double piFactor() const;
|
||||
|
||||
//! PI as convenience method
|
||||
static const double &PI();
|
||||
|
||||
private:
|
||||
|
||||
/*!
|
||||
* \brief PI as convenience method
|
||||
* \return
|
||||
*/
|
||||
static const double &PI()
|
||||
{
|
||||
return BlackMisc::Math::CMath::PI();
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
/* Copyright (C) 2013
|
||||
* 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 "pqtime.h"
|
||||
|
||||
namespace BlackMisc
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/* Copyright (C) 2013 VATSIM Community
|
||||
* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_PQTIME_H
|
||||
#define BLACKMISC_PQTIME_H
|
||||
@@ -14,7 +20,7 @@ namespace BlackMisc
|
||||
{
|
||||
|
||||
/*!
|
||||
* \brief Time class, e.g. "ms", "hour", "s", "day"
|
||||
* Time class, e.g. "ms", "hour", "s", "day"
|
||||
*/
|
||||
class CTime : public CPhysicalQuantity<CTimeUnit, CTime>
|
||||
{
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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/pqunits.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_PQUNITS_H
|
||||
#define BLACKMISC_PQUNITS_H
|
||||
@@ -27,7 +33,7 @@ namespace BlackMisc
|
||||
{
|
||||
|
||||
/*!
|
||||
* \brief Specialized class for distance units (meter, foot, nautical miles).
|
||||
* Specialized class for distance units (meter, foot, nautical miles).
|
||||
*/
|
||||
class CLengthUnit : public CMeasurementUnit
|
||||
{
|
||||
@@ -63,12 +69,12 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Default unit
|
||||
* Default unit
|
||||
*/
|
||||
static const CLengthUnit &defaultUnit() { return m(); }
|
||||
|
||||
/*!
|
||||
* \brief Null unit
|
||||
* Null unit
|
||||
*/
|
||||
static const CLengthUnit &nullUnit()
|
||||
{
|
||||
@@ -77,7 +83,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Meter m
|
||||
* Meter m
|
||||
*/
|
||||
static const CLengthUnit &m()
|
||||
{
|
||||
@@ -86,7 +92,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Nautical miles NM
|
||||
* Nautical miles NM
|
||||
*/
|
||||
static const CLengthUnit &NM()
|
||||
{
|
||||
@@ -95,7 +101,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Foot ft
|
||||
* Foot ft
|
||||
*/
|
||||
static const CLengthUnit &ft()
|
||||
{
|
||||
@@ -104,7 +110,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Kilometer km
|
||||
* Kilometer km
|
||||
*/
|
||||
static const CLengthUnit &km()
|
||||
{
|
||||
@@ -113,7 +119,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Centimeter cm
|
||||
* Centimeter cm
|
||||
*/
|
||||
static const CLengthUnit &cm()
|
||||
{
|
||||
@@ -122,7 +128,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief International mile
|
||||
* International mile
|
||||
*/
|
||||
static const CLengthUnit &mi()
|
||||
{
|
||||
@@ -131,7 +137,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Statute mile
|
||||
* Statute mile
|
||||
*/
|
||||
static const CLengthUnit &SM()
|
||||
{
|
||||
@@ -140,7 +146,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief All units
|
||||
* All units
|
||||
*/
|
||||
static const QList<CLengthUnit> &allUnits()
|
||||
{
|
||||
@@ -172,7 +178,7 @@ namespace BlackMisc
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Specialized class for angles (degrees, radian).
|
||||
* Specialized class for angles (degrees, radian).
|
||||
*/
|
||||
class CAngleUnit : public CMeasurementUnit
|
||||
{
|
||||
@@ -204,12 +210,12 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Default unit
|
||||
* Default unit
|
||||
*/
|
||||
static const CAngleUnit &defaultUnit() { return deg(); }
|
||||
|
||||
/*!
|
||||
* \brief Null unit
|
||||
* Null unit
|
||||
*/
|
||||
static const CAngleUnit &nullUnit()
|
||||
{
|
||||
@@ -223,7 +229,7 @@ namespace BlackMisc
|
||||
virtual QString makeRoundedQStringWithUnit(double value, int digits = -1, bool i18n = false) const override;
|
||||
|
||||
/*!
|
||||
* \brief Radians
|
||||
* Radians
|
||||
*/
|
||||
static const CAngleUnit &rad()
|
||||
{
|
||||
@@ -232,7 +238,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Degrees
|
||||
* Degrees
|
||||
*/
|
||||
static const CAngleUnit °()
|
||||
{
|
||||
@@ -241,7 +247,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Sexagesimal degree (degrees, minutes, seconds, decimal seconds)
|
||||
* Sexagesimal degree (degrees, minutes, seconds, decimal seconds)
|
||||
*/
|
||||
static const CAngleUnit &sexagesimalDeg()
|
||||
{
|
||||
@@ -252,7 +258,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Sexagesimal degree (degrees, minutes, decimal minutes)
|
||||
* Sexagesimal degree (degrees, minutes, decimal minutes)
|
||||
*/
|
||||
static const CAngleUnit &sexagesimalDegMin()
|
||||
{
|
||||
@@ -263,7 +269,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief All units
|
||||
* All units
|
||||
*/
|
||||
static const QList<CAngleUnit> &allUnits()
|
||||
{
|
||||
@@ -292,7 +298,7 @@ namespace BlackMisc
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Specialized class for frequency (hertz, mega hertz, kilo hertz).
|
||||
* Specialized class for frequency (hertz, mega hertz, kilo hertz).
|
||||
*/
|
||||
class CFrequencyUnit : public CMeasurementUnit
|
||||
{
|
||||
@@ -323,12 +329,12 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Default unit
|
||||
* Default unit
|
||||
*/
|
||||
static const CFrequencyUnit &defaultUnit() { return Hz(); }
|
||||
|
||||
/*!
|
||||
* \brief Null unit
|
||||
* Null unit
|
||||
*/
|
||||
static const CFrequencyUnit &nullUnit()
|
||||
{
|
||||
@@ -337,7 +343,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Hertz
|
||||
* Hertz
|
||||
*/
|
||||
static const CFrequencyUnit &Hz()
|
||||
{
|
||||
@@ -346,7 +352,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Kilohertz
|
||||
* Kilohertz
|
||||
*/
|
||||
static const CFrequencyUnit &kHz()
|
||||
{
|
||||
@@ -355,7 +361,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Megahertz
|
||||
* Megahertz
|
||||
*/
|
||||
static const CFrequencyUnit &MHz()
|
||||
{
|
||||
@@ -364,7 +370,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Gigahertz
|
||||
* Gigahertz
|
||||
*/
|
||||
static const CFrequencyUnit &GHz()
|
||||
{
|
||||
@@ -373,7 +379,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief All units
|
||||
* All units
|
||||
*/
|
||||
static const QList<CFrequencyUnit> &allUnits()
|
||||
{
|
||||
@@ -402,7 +408,7 @@ namespace BlackMisc
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Specialized class for mass units (kg, lbs).
|
||||
* Specialized class for mass units (kg, lbs).
|
||||
*/
|
||||
class CMassUnit : public CMeasurementUnit
|
||||
{
|
||||
@@ -434,12 +440,12 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Default unit
|
||||
* Default unit
|
||||
*/
|
||||
static const CMassUnit &defaultUnit() { return kg(); }
|
||||
|
||||
/*!
|
||||
* \brief Null unit
|
||||
* Null unit
|
||||
*/
|
||||
static const CMassUnit &nullUnit()
|
||||
{
|
||||
@@ -448,7 +454,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Kilogram, SI base unit
|
||||
* Kilogram, SI base unit
|
||||
*/
|
||||
static const CMassUnit &kg()
|
||||
{
|
||||
@@ -457,7 +463,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Gram, SI unit
|
||||
* Gram, SI unit
|
||||
*/
|
||||
static const CMassUnit &g()
|
||||
{
|
||||
@@ -466,7 +472,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Tonne, aka metric ton (1000kg)
|
||||
* Tonne, aka metric ton (1000kg)
|
||||
*/
|
||||
static const CMassUnit &tonne()
|
||||
{
|
||||
@@ -475,7 +481,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Short ton (2000lb) used in the United States
|
||||
* Short ton (2000lb) used in the United States
|
||||
*/
|
||||
static const CMassUnit &shortTon()
|
||||
{
|
||||
@@ -484,7 +490,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Pound, aka mass pound
|
||||
* Pound, aka mass pound
|
||||
*/
|
||||
static const CMassUnit &lb()
|
||||
{
|
||||
@@ -493,7 +499,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief All units
|
||||
* All units
|
||||
*/
|
||||
static const QList<CMassUnit> &allUnits()
|
||||
{
|
||||
@@ -523,7 +529,7 @@ namespace BlackMisc
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Specialized class for pressure (psi, hPa, bar).
|
||||
* Specialized class for pressure (psi, hPa, bar).
|
||||
*/
|
||||
class CPressureUnit : public CMeasurementUnit
|
||||
{
|
||||
@@ -557,12 +563,12 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Default unit
|
||||
* Default unit
|
||||
*/
|
||||
static const CPressureUnit &defaultUnit() { return hPa(); }
|
||||
|
||||
/*!
|
||||
* \brief Null unit
|
||||
* Null unit
|
||||
*/
|
||||
static const CPressureUnit &nullUnit()
|
||||
{
|
||||
@@ -571,7 +577,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Pascal
|
||||
* Pascal
|
||||
*/
|
||||
static const CPressureUnit &Pa()
|
||||
{
|
||||
@@ -580,7 +586,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Hectopascal
|
||||
* Hectopascal
|
||||
*/
|
||||
static const CPressureUnit &hPa()
|
||||
{
|
||||
@@ -589,7 +595,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Pounds per square inch
|
||||
* Pounds per square inch
|
||||
*/
|
||||
static const CPressureUnit &psi()
|
||||
{
|
||||
@@ -598,7 +604,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Bar
|
||||
* Bar
|
||||
*/
|
||||
static const CPressureUnit &bar()
|
||||
{
|
||||
@@ -607,7 +613,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Millibar, actually the same as hPa
|
||||
* Millibar, actually the same as hPa
|
||||
*/
|
||||
static const CPressureUnit &mbar()
|
||||
{
|
||||
@@ -616,7 +622,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Inch of mercury at 0°C
|
||||
* Inch of mercury at 0°C
|
||||
*/
|
||||
static const CPressureUnit &inHg()
|
||||
{
|
||||
@@ -625,7 +631,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Millimeter of mercury
|
||||
* Millimeter of mercury
|
||||
*/
|
||||
static const CPressureUnit &mmHg()
|
||||
{
|
||||
@@ -634,7 +640,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief All units
|
||||
* All units
|
||||
*/
|
||||
static const QList<CPressureUnit> &allUnits()
|
||||
{
|
||||
@@ -665,7 +671,7 @@ namespace BlackMisc
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Specialized class for temperatur units (kelvin, centidegree).
|
||||
* Specialized class for temperatur units (kelvin, centidegree).
|
||||
*/
|
||||
class CTemperatureUnit : public CMeasurementUnit
|
||||
{
|
||||
@@ -705,12 +711,12 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Default unit
|
||||
* Default unit
|
||||
*/
|
||||
static const CTemperatureUnit &defaultUnit() { return C(); }
|
||||
|
||||
/*!
|
||||
* \brief Null unit
|
||||
* Null unit
|
||||
*/
|
||||
static const CTemperatureUnit &nullUnit()
|
||||
{
|
||||
@@ -719,7 +725,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Kelvin
|
||||
* Kelvin
|
||||
*/
|
||||
static const CTemperatureUnit &K()
|
||||
{
|
||||
@@ -728,7 +734,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Centigrade C
|
||||
* Centigrade C
|
||||
*/
|
||||
static const CTemperatureUnit &C()
|
||||
{
|
||||
@@ -737,7 +743,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Fahrenheit F
|
||||
* Fahrenheit F
|
||||
*/
|
||||
static const CTemperatureUnit &F()
|
||||
{
|
||||
@@ -746,7 +752,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief All units
|
||||
* All units
|
||||
*/
|
||||
static const QList<CTemperatureUnit> &allUnits()
|
||||
{
|
||||
@@ -774,7 +780,7 @@ namespace BlackMisc
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Specialized class for speed units (m/s, ft/s, NM/h).
|
||||
* Specialized class for speed units (m/s, ft/s, NM/h).
|
||||
*/
|
||||
class CSpeedUnit : public CMeasurementUnit
|
||||
{
|
||||
@@ -822,7 +828,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Meter/second m/s
|
||||
* Meter/second m/s
|
||||
*/
|
||||
static const CSpeedUnit &m_s()
|
||||
{
|
||||
@@ -831,7 +837,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Knots
|
||||
* Knots
|
||||
*/
|
||||
static const CSpeedUnit &kts()
|
||||
{
|
||||
@@ -840,7 +846,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Nautical miles per hour NM/h (same as kts)
|
||||
* Nautical miles per hour NM/h (same as kts)
|
||||
*/
|
||||
static const CSpeedUnit &NM_h()
|
||||
{
|
||||
@@ -849,7 +855,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Feet/second ft/s
|
||||
* Feet/second ft/s
|
||||
*/
|
||||
static const CSpeedUnit &ft_s()
|
||||
{
|
||||
@@ -858,7 +864,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Feet/min ft/min
|
||||
* Feet/min ft/min
|
||||
*/
|
||||
static const CSpeedUnit &ft_min()
|
||||
{
|
||||
@@ -867,7 +873,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Kilometer/hour km/h
|
||||
* Kilometer/hour km/h
|
||||
*/
|
||||
static const CSpeedUnit &km_h()
|
||||
{
|
||||
@@ -876,7 +882,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief All units
|
||||
* All units
|
||||
*/
|
||||
static const QList<CSpeedUnit> &allUnits()
|
||||
{
|
||||
@@ -907,7 +913,7 @@ namespace BlackMisc
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Specialized class for time units (ms, hour, min).
|
||||
* Specialized class for time units (ms, hour, min).
|
||||
*/
|
||||
class CTimeUnit : public CMeasurementUnit
|
||||
{
|
||||
@@ -960,7 +966,7 @@ namespace BlackMisc
|
||||
virtual QString makeRoundedQStringWithUnit(double value, int digits = -1, bool i18n = false) const override;
|
||||
|
||||
/*!
|
||||
* \brief Second s
|
||||
* Second s
|
||||
*/
|
||||
static const CTimeUnit &s()
|
||||
{
|
||||
@@ -969,7 +975,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Millisecond ms
|
||||
* Millisecond ms
|
||||
*/
|
||||
static const CTimeUnit &ms()
|
||||
{
|
||||
@@ -978,7 +984,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Hour
|
||||
* Hour
|
||||
*/
|
||||
static const CTimeUnit &h()
|
||||
{
|
||||
@@ -987,7 +993,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Minute
|
||||
* Minute
|
||||
*/
|
||||
static const CTimeUnit &min()
|
||||
{
|
||||
@@ -996,7 +1002,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Day
|
||||
* Day
|
||||
*/
|
||||
static const CTimeUnit &d()
|
||||
{
|
||||
@@ -1005,7 +1011,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Hours, minutes, seconds
|
||||
* Hours, minutes, seconds
|
||||
*/
|
||||
static const CTimeUnit &hms()
|
||||
{
|
||||
@@ -1016,7 +1022,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Hours, minutes
|
||||
* Hours, minutes
|
||||
*/
|
||||
static const CTimeUnit &hrmin()
|
||||
{
|
||||
@@ -1027,7 +1033,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Minutes, seconds
|
||||
* Minutes, seconds
|
||||
*/
|
||||
static const CTimeUnit &minsec()
|
||||
{
|
||||
@@ -1038,7 +1044,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief All units
|
||||
* All units
|
||||
*/
|
||||
static const QList<CTimeUnit> &allUnits()
|
||||
{
|
||||
@@ -1070,7 +1076,7 @@ namespace BlackMisc
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Specialized class for acceleration units (m/s2, ft/s2).
|
||||
* Specialized class for acceleration units (m/s2, ft/s2).
|
||||
*/
|
||||
class CAccelerationUnit : public CMeasurementUnit
|
||||
{
|
||||
@@ -1115,7 +1121,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Meter/second^2 (m/s^2)
|
||||
* Meter/second^2 (m/s^2)
|
||||
*/
|
||||
static const CAccelerationUnit &m_s2()
|
||||
{
|
||||
@@ -1124,7 +1130,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Feet/second^2
|
||||
* Feet/second^2
|
||||
*/
|
||||
static const CAccelerationUnit &ft_s2()
|
||||
{
|
||||
@@ -1133,7 +1139,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief All units
|
||||
* All units
|
||||
*/
|
||||
static const QList<CAccelerationUnit> &allUnits()
|
||||
{
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / authors
|
||||
* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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 "statusmessagelist.h"
|
||||
#include "statusmessage.h"
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / authors
|
||||
* 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/. */
|
||||
/* Copyright (C) 2013
|
||||
* 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.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_STATUSMESSAGELIST_H
|
||||
#define BLACKMISC_STATUSMESSAGELIST_H
|
||||
@@ -15,31 +21,30 @@ namespace BlackMisc
|
||||
{
|
||||
|
||||
/*!
|
||||
* \brief Status messages, e.g. from Core -> GUI
|
||||
* Status messages, e.g. from Core -> GUI
|
||||
*/
|
||||
class CStatusMessageList : public CSequence<CStatusMessage>
|
||||
{
|
||||
public:
|
||||
//! \brief Constructor
|
||||
//! Constructor
|
||||
CStatusMessageList() {}
|
||||
|
||||
//! \brief Construct from a base class object.
|
||||
//! Construct from a base class object.
|
||||
CStatusMessageList(const CSequence<CStatusMessage> &other);
|
||||
|
||||
//! \brief Find by type
|
||||
//! Find by type
|
||||
CStatusMessageList findByType(CStatusMessage::StatusType type) const;
|
||||
|
||||
//! \brief Find by severity
|
||||
//! Find by severity
|
||||
CStatusMessageList findBySeverity(CStatusMessage::StatusSeverity severity) const;
|
||||
|
||||
//! \copydoc CValueObject::asQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
//! \brief Register metadata of unit and quantity
|
||||
//! Register metadata of unit and quantity
|
||||
static void registerMetadata();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::CStatusMessageList)
|
||||
|
||||
@@ -27,7 +27,9 @@ class QTimer;
|
||||
|
||||
//! Typedef needed to use QList<double> as a DBus argument
|
||||
typedef QList<double> QDoubleList;
|
||||
Q_DECLARE_METATYPE(QDoubleList);
|
||||
|
||||
//! Typedef needed to use QList<double> as a DBus argument
|
||||
Q_DECLARE_METATYPE(QDoubleList)
|
||||
|
||||
namespace XBus
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user