Formatting: Icon names, headers, Doxygen

This commit is contained in:
Klaus Basan
2014-07-26 23:24:33 +02:00
parent 9cb3663b79
commit ae5c677cfe
27 changed files with 243 additions and 123 deletions

View File

@@ -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 "context_network_impl.h"
#include "context_runtime.h"

View File

@@ -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.
*/
#ifndef BLACKCORE_CONTEXTNETWORK_IMPL_H
#define BLACKCORE_CONTEXTNETWORK_IMPL_H

View File

@@ -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 "avaircraft.h"
#include "blackmisc/blackmiscfreefunctions.h"
#include "blackmisc/pqconstants.h"
@@ -198,6 +207,8 @@ namespace BlackMisc
{
case IndexCallsign:
return QVariant::fromValue(this->m_callsign);
case IndexIcon:
return QVariant(this->m_callsign.toIcon());
case IndexCallsignAsString:
return QVariant::fromValue(this->m_callsign.toQString(true));
case IndexCallsignAsStringAsSet:
@@ -236,8 +247,8 @@ namespace BlackMisc
{
QVariant qv = this->propertyByIndex(index);
// special treatment
// this is required as it is possible an ATC station is not containing all
// properties
// this is required, as it is possible that an aircraft is not
// containing all properties
switch (index)
{
case IndexFrequencyCom1:

View File

@@ -1,14 +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/. */
/*!
\file
*/
/* 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.
*/
#ifndef BLACKMISC_AIRCRAFT_H
#define BLACKMISC_AIRCRAFT_H
//! \file
#include "nwuser.h"
#include "avaircraftsituation.h"
#include "avaircrafticao.h"
@@ -219,6 +222,7 @@ namespace BlackMisc
enum ColumnIndex
{
IndexCallsign = 0,
IndexIcon,
IndexCallsignAsString,
IndexCallsignAsStringAsSet,
IndexPilotId,

View File

@@ -3,9 +3,7 @@
* 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
*/
//! \file
#ifndef BLACKMISC_AIRCRAFTLIST_H
#define BLACKMISC_AIRCRAFTLIST_H

View File

@@ -319,7 +319,7 @@ namespace BlackMisc
return QVariant(this->m_callsign.asString());
case IndexCallsignAsStringAsSet:
return QVariant(this->m_callsign.getStringAsSet());
case IndexCallsignIcon:
case IndexIcon:
return QVariant(this->m_callsign.toIcon());
case IndexController:
return this->m_controller.toQVariant();

View File

@@ -36,9 +36,9 @@ namespace BlackMisc
enum ColumnIndex
{
IndexCallsign = 0,
IndexIcon, // representing icon
IndexCallsignAsString,
IndexCallsignAsStringAsSet,
IndexCallsignIcon,
IndexController,
IndexControllerRealName,
IndexControllerId,

View File

@@ -1,4 +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.
*/
#include "avcallsign.h"
#include "iconsnetwork.h"
namespace BlackMisc
{
@@ -27,34 +37,24 @@ namespace BlackMisc
*/
const QPixmap &CCallsign::convertToIcon(const CCallsign &callsign)
{
static const QPixmap app(QPixmap(":/blackmisc/icons/aircraft_arrival.jpg").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap gnd(QPixmap(":/blackmisc/icons/gnd_framed.jpg").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap del(QPixmap(":/blackmisc/icons/aircraft_departure.jpg").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap twr(QPixmap(":/blackmisc/icons/tower_framed.jpg").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap ctr(QPixmap(":/blackmisc/icons/sky.jpg").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap pilot(QPixmap(":/blackmisc/icons/aeropuerto.png").scaledToWidth(16, Qt::SmoothTransformation));
static const QPixmap sup(":/blackmisc/icons/SUP.png");
static const QPixmap obs(":/blackmisc/icons/OBS.png");
static const QPixmap unknown(QPixmap(":/blackmisc/icons/question.png").scaledToWidth(16, Qt::SmoothTransformation));
QString t = callsign.asString().toUpper();
if (t.length() < 3) return unknown;
if (t.length() < 3) return CIconsNetworkAndAviation::roleUnknown();
t = t.right(3);
if (callsign.getStringAsSet().contains("_"))
{
if ("APP" == t) return app;
if ("GND" == t) return gnd;
if ("TWR" == t) return twr;
if ("DEL" == t) return del;
if ("SUP" == t) return sup;
if ("CTR" == t) return ctr;
if ("OBS" == t) return obs;
return unknown;
if ("APP" == t) return CIconsNetworkAndAviation::roleApproach();
if ("GND" == t) return CIconsNetworkAndAviation::roleGround();
if ("TWR" == t) return CIconsNetworkAndAviation::roleTower();
if ("DEL" == t) return CIconsNetworkAndAviation::roleDelivery();
if ("CTR" == t) return CIconsNetworkAndAviation::roleCenter();
if ("SUP" == t) return CIconsNetworkAndAviation::roleSup();
if ("OBS" == t) return CIconsNetworkAndAviation::roleObs();
return CIconsNetworkAndAviation::roleUnknown();
}
else
{
return pilot;
return CIconsNetworkAndAviation::rolePilot();
}
}

View File

@@ -1,17 +1,24 @@
/* 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_CALLSIGN_H
#define BLACKMISC_CALLSIGN_H
#include "valueobject.h"
namespace BlackMisc
{
namespace Aviation
{
//! \brief Value object encapsulating information of a callsign.
//! Value object encapsulating information of a callsign.
class CCallsign : public BlackMisc::CValueObject
{

View File

@@ -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 "avcallsignlist.h"
#include "predicates.h"

View File

@@ -1,11 +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
*/
//! \file
#ifndef BLACKMISC_CALLSIGNLIST_H
#define BLACKMISC_CALLSIGNLIST_H

View File

@@ -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 "blackmiscfreefunctions.h"
#include "avheading.h"

View File

@@ -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.
*/
#ifndef BLACKMISC_AVHEADING_H
#define BLACKMISC_AVHEADING_H

View File

@@ -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 "avinformationmessage.h"
#include "blackmiscfreefunctions.h"

View File

@@ -1,11 +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
*/
//! \file
#ifndef BLACKMISC_INFORMATIONMESSAGE_H
#define BLACKMISC_INFORMATIONMESSAGE_H

View File

@@ -27,9 +27,7 @@ namespace BlackMisc
{
namespace PhysicalQuantities
{
/*!
* \brief Register all metadata for PQs
*/
//! Register all metadata for PQs
void registerMetadata();
} // PQ

View File

@@ -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 "indexvariantmap.h"
#include "blackmiscfreefunctions.h"
#include "avaltitude.h"

View File

@@ -1,11 +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
*/
//! \file
#include "valueobject.h"
#include "variant.h"
@@ -27,7 +29,7 @@ namespace BlackMisc
public:
/*!
* \brief Constructor
* Constructor
* \param wildcard when used in search, for setting values irrelevant
*/
CIndexVariantMap(bool wildcard = false);
@@ -65,10 +67,10 @@ namespace BlackMisc
//! values
QList<CVariant> values() const { return this->m_values.values(); }
//! \brief Wildcard, only relevant when used in search
//! Wildcard, only relevant when used in search
bool isWildcard() const { return this->m_wildcard; }
//! \brief Wildcard, only relevant when used in search
//! Wildcard, only relevant when used in search
void setWildcard(bool wildcard) { this->m_wildcard = wildcard; }
//! clear

View File

@@ -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 "blackmisc/nwvoicecapabilities.h"
#include "blackmisc/blackmiscfreefunctions.h"
#include <tuple>

View File

@@ -1,11 +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.
*/
#ifndef BLACKMISC_VOICECAPABILITIES_H
#define BLACKMISC_VOICECAPABILITIES_H
//! \file
#include "valueobject.h"
namespace BlackMisc
@@ -50,10 +56,10 @@ namespace BlackMisc
//! \copydoc CValueObject::toIcon()
virtual const QPixmap &toIcon() const override;
//! \brief Equal operator ==
//! Equal operator ==
bool operator ==(const CVoiceCapabilities &other) const;
//! \brief Unequal operator !=
//! Unequal operator !=
bool operator !=(const CVoiceCapabilities &other) const;
//! \copydoc CValueObject::getValueHash()
@@ -65,10 +71,10 @@ namespace BlackMisc
//! \copydoc CValueObject::fromJson
void fromJson(const QJsonObject &json) override;
//! \brief Register metadata
//! Register metadata
static void registerMetadata();
//! \brief Members
//! Members
static const QStringList &jsonMembers();
protected:

View File

@@ -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/pqallquantities.h"
#include "blackmiscfreefunctions.h"

View File

@@ -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_PQPHYSICALQUANTITY_H
#define BLACKMISC_PQPHYSICALQUANTITY_H
@@ -21,7 +27,7 @@ namespace BlackMisc
namespace PhysicalQuantities
{
/*!
* \brief A physical quantity such as "5m", "20s", "1500ft/s"
* A physical quantity such as "5m", "20s", "1500ft/s"
*/
template <class MU, class PQ> class CPhysicalQuantity : public BlackMisc::CValueObject
{

View File

@@ -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 "statusmessage.h"
#include "blackmiscfreefunctions.h"
#include <QMetaEnum>

View File

@@ -1,6 +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.
*/
#ifndef BLACKMISC_STATUSMESSAGE_H
#define BLACKMISC_STATUSMESSAGE_H
//! \file
#include "valueobject.h"
#include <QDateTime>
@@ -8,14 +19,12 @@ namespace BlackMisc
{
/*!
* \brief Streamable status message, e.g. from Core -> GUI
* Streamable status message, e.g. from Core -> GUI
*/
class CStatusMessage : public CValueObject
{
public:
/*!
* \brief Status types
*/
//! Status types
enum StatusType
{
TypeUnknown, // not set

View File

@@ -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 "valueobject.h"
#include "indexvariantmap.h"
#include "blackmiscfreefunctions.h"
@@ -79,7 +88,7 @@ namespace BlackMisc
if (ut <= QVariant::UserType) return nullptr; // complex Qt type
if (qv.canConvert<QDBusArgument>()) return nullptr; // not unstreamed yet
// this cast cannot be dynamic, so the aboce conditions are crucical
// this cast cannot be dynamic, so the above conditions are crucical
const CValueObject *vo = static_cast<const CValueObject *>(qv.constData());
return vo;
}

View File

@@ -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.
*/
#ifndef BLACKMISC_VALUEOBJECT_H
#define BLACKMISC_VALUEOBJECT_H
@@ -315,12 +324,7 @@ namespace BlackMisc
return json;
}
/*!
* \brief Non member, non friend operator >> for JSON
* \param json
* \param value
* \return
*/
//! Non member, non friend operator << for JSON
inline QJsonArray &operator<<(QJsonArray &json, const CValueObject &value)
{
json.append(value.toJson());
@@ -328,7 +332,7 @@ namespace BlackMisc
}
/*!
* \brief Non member, non friend operator >> for JSON
* \brief Non member, non friend operator << for JSON
* \param json
* \param value as pair name/value
* \return

View File

@@ -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_VARIANT_H
#define BLACKMISC_VARIANT_H