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

View File

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

View File

@@ -1,14 +1,17 @@
/* Copyright (C) 2013 VATSIM Community / authors /* 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
\file * contained in the LICENSE file.
*/ */
#ifndef BLACKMISC_AIRCRAFT_H #ifndef BLACKMISC_AIRCRAFT_H
#define BLACKMISC_AIRCRAFT_H #define BLACKMISC_AIRCRAFT_H
//! \file
#include "nwuser.h" #include "nwuser.h"
#include "avaircraftsituation.h" #include "avaircraftsituation.h"
#include "avaircrafticao.h" #include "avaircrafticao.h"
@@ -219,6 +222,7 @@ namespace BlackMisc
enum ColumnIndex enum ColumnIndex
{ {
IndexCallsign = 0, IndexCallsign = 0,
IndexIcon,
IndexCallsignAsString, IndexCallsignAsString,
IndexCallsignAsStringAsSet, IndexCallsignAsStringAsSet,
IndexPilotId, IndexPilotId,

View File

@@ -3,9 +3,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*! //! \file
\file
*/
#ifndef BLACKMISC_AIRCRAFTLIST_H #ifndef BLACKMISC_AIRCRAFTLIST_H
#define BLACKMISC_AIRCRAFTLIST_H #define BLACKMISC_AIRCRAFTLIST_H

View File

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

View File

@@ -36,9 +36,9 @@ namespace BlackMisc
enum ColumnIndex enum ColumnIndex
{ {
IndexCallsign = 0, IndexCallsign = 0,
IndexIcon, // representing icon
IndexCallsignAsString, IndexCallsignAsString,
IndexCallsignAsStringAsSet, IndexCallsignAsStringAsSet,
IndexCallsignIcon,
IndexController, IndexController,
IndexControllerRealName, IndexControllerRealName,
IndexControllerId, 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 "avcallsign.h"
#include "iconsnetwork.h"
namespace BlackMisc namespace BlackMisc
{ {
@@ -27,34 +37,24 @@ namespace BlackMisc
*/ */
const QPixmap &CCallsign::convertToIcon(const CCallsign &callsign) 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(); QString t = callsign.asString().toUpper();
if (t.length() < 3) return unknown; if (t.length() < 3) return CIconsNetworkAndAviation::roleUnknown();
t = t.right(3); t = t.right(3);
if (callsign.getStringAsSet().contains("_")) if (callsign.getStringAsSet().contains("_"))
{ {
if ("APP" == t) return app; if ("APP" == t) return CIconsNetworkAndAviation::roleApproach();
if ("GND" == t) return gnd; if ("GND" == t) return CIconsNetworkAndAviation::roleGround();
if ("TWR" == t) return twr; if ("TWR" == t) return CIconsNetworkAndAviation::roleTower();
if ("DEL" == t) return del; if ("DEL" == t) return CIconsNetworkAndAviation::roleDelivery();
if ("SUP" == t) return sup; if ("CTR" == t) return CIconsNetworkAndAviation::roleCenter();
if ("CTR" == t) return ctr; if ("SUP" == t) return CIconsNetworkAndAviation::roleSup();
if ("OBS" == t) return obs; if ("OBS" == t) return CIconsNetworkAndAviation::roleObs();
return unknown; return CIconsNetworkAndAviation::roleUnknown();
} }
else else
{ {
return pilot; return CIconsNetworkAndAviation::rolePilot();
} }
} }

View File

@@ -1,17 +1,24 @@
/* Copyright (C) 2013 VATSIM Community / authors /* 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.
*/
//! \file
#ifndef BLACKMISC_CALLSIGN_H #ifndef BLACKMISC_CALLSIGN_H
#define BLACKMISC_CALLSIGN_H #define BLACKMISC_CALLSIGN_H
#include "valueobject.h" #include "valueobject.h"
namespace BlackMisc namespace BlackMisc
{ {
namespace Aviation namespace Aviation
{ {
//! \brief Value object encapsulating information of a callsign. //! Value object encapsulating information of a callsign.
class CCallsign : public BlackMisc::CValueObject class CCallsign : public BlackMisc::CValueObject
{ {

View File

@@ -1,7 +1,11 @@
/* Copyright (C) 2013 VATSIM Community / authors /* 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 "avcallsignlist.h" #include "avcallsignlist.h"
#include "predicates.h" #include "predicates.h"

View File

@@ -1,11 +1,13 @@
/* Copyright (C) 2013 VATSIM Community / authors /* 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.
*/
/*! //! \file
\file
*/
#ifndef BLACKMISC_CALLSIGNLIST_H #ifndef BLACKMISC_CALLSIGNLIST_H
#define BLACKMISC_CALLSIGNLIST_H #define BLACKMISC_CALLSIGNLIST_H

View File

@@ -1,7 +1,11 @@
/* Copyright (C) 2013 VATSIM Community /* 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 "blackmiscfreefunctions.h" #include "blackmiscfreefunctions.h"
#include "avheading.h" #include "avheading.h"

View File

@@ -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.
*/
#ifndef BLACKMISC_AVHEADING_H #ifndef BLACKMISC_AVHEADING_H
#define 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 "avinformationmessage.h"
#include "blackmiscfreefunctions.h" #include "blackmiscfreefunctions.h"

View File

@@ -1,11 +1,13 @@
/* Copyright (C) 2013 VATSIM Community / authors /* 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.
*/
/*! //! \file
\file
*/
#ifndef BLACKMISC_INFORMATIONMESSAGE_H #ifndef BLACKMISC_INFORMATIONMESSAGE_H
#define BLACKMISC_INFORMATIONMESSAGE_H #define BLACKMISC_INFORMATIONMESSAGE_H

View File

@@ -27,9 +27,7 @@ namespace BlackMisc
{ {
namespace PhysicalQuantities namespace PhysicalQuantities
{ {
/*! //! Register all metadata for PQs
* \brief Register all metadata for PQs
*/
void registerMetadata(); void registerMetadata();
} // PQ } // 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 "indexvariantmap.h"
#include "blackmiscfreefunctions.h" #include "blackmiscfreefunctions.h"
#include "avaltitude.h" #include "avaltitude.h"

View File

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

View File

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

View File

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

View File

@@ -1,7 +1,13 @@
/* 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.
*/
//! \file
#ifndef BLACKMISC_PQPHYSICALQUANTITY_H #ifndef BLACKMISC_PQPHYSICALQUANTITY_H
#define BLACKMISC_PQPHYSICALQUANTITY_H #define BLACKMISC_PQPHYSICALQUANTITY_H
@@ -21,7 +27,7 @@ namespace BlackMisc
namespace PhysicalQuantities 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 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 "statusmessage.h"
#include "blackmiscfreefunctions.h" #include "blackmiscfreefunctions.h"
#include <QMetaEnum> #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 #ifndef BLACKMISC_STATUSMESSAGE_H
#define BLACKMISC_STATUSMESSAGE_H #define BLACKMISC_STATUSMESSAGE_H
//! \file
#include "valueobject.h" #include "valueobject.h"
#include <QDateTime> #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 class CStatusMessage : public CValueObject
{ {
public: public:
/*! //! Status types
* \brief Status types
*/
enum StatusType enum StatusType
{ {
TypeUnknown, // not set 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 "valueobject.h"
#include "indexvariantmap.h" #include "indexvariantmap.h"
#include "blackmiscfreefunctions.h" #include "blackmiscfreefunctions.h"
@@ -79,7 +88,7 @@ namespace BlackMisc
if (ut <= QVariant::UserType) return nullptr; // complex Qt type if (ut <= QVariant::UserType) return nullptr; // complex Qt type
if (qv.canConvert<QDBusArgument>()) return nullptr; // not unstreamed yet 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()); const CValueObject *vo = static_cast<const CValueObject *>(qv.constData());
return vo; 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 #ifndef BLACKMISC_VALUEOBJECT_H
#define BLACKMISC_VALUEOBJECT_H #define BLACKMISC_VALUEOBJECT_H
@@ -315,12 +324,7 @@ namespace BlackMisc
return json; return json;
} }
/*! //! Non member, non friend operator << for JSON
* \brief Non member, non friend operator >> for JSON
* \param json
* \param value
* \return
*/
inline QJsonArray &operator<<(QJsonArray &json, const CValueObject &value) inline QJsonArray &operator<<(QJsonArray &json, const CValueObject &value)
{ {
json.append(value.toJson()); 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 json
* \param value as pair name/value * \param value as pair name/value
* \return * \return

View File

@@ -1,11 +1,13 @@
/* Copyright (C) 2014 VATSIM Community / authors /* 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.
*/
/*! //! \file
\file
*/
#ifndef BLACKMISC_VARIANT_H #ifndef BLACKMISC_VARIANT_H
#define BLACKMISC_VARIANT_H #define BLACKMISC_VARIANT_H