From 3fb5087ea8765dac64f744aa7ad4418763084367 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sat, 23 Aug 2014 23:25:42 +0200 Subject: [PATCH] Renaming, header, Doxygen, formatting (during refs #314) --- samples/blackmisc/main.cpp | 12 +- samples/blackmisc/sampleschangeobject.cpp | 12 +- samples/blackmisc/sampleschangeobject.h | 34 +- samples/blackmisc/samplescontainer.cpp | 12 +- samples/blackmisc/samplescontainer.h | 34 +- samples/blackmisc/samplesjson.cpp | 12 +- samples/blackmisc/samplesjson.h | 35 +- samples/blackmisc/samplesmetadata.cpp | 12 +- samples/blackmisc/samplesmetadata.h | 35 +- samples/blackmiscdbus/main.cpp | 12 +- samples/blackmiscdbus/servicetool.cpp | 9 + samples/blackmiscdbus/testservice.cpp | 14 +- samples/blackmiscdbus/testservice.h | 193 ++------ .../blackmiscdbus/testservice_interface.cpp | 9 + samples/blackmiscdbus/testservice_interface.h | 13 +- src/blackcore/airspace_monitor.cpp | 12 +- src/blackcore/airspace_monitor.h | 16 +- src/blackcore/context_application_impl.h | 2 +- src/blackcore/context_network_impl.cpp | 4 +- src/blackcore/context_network_impl.h | 2 +- src/blackcore/vatsimbookingreader.cpp | 4 +- src/blackcore/vatsimbookingreader.h | 4 +- src/blackcore/vatsimdatafilereader.cpp | 4 +- src/blackcore/vatsimdatafilereader.h | 4 +- src/blackcore/voice_channel.h | 2 +- src/blackcore/voice_channel_vatlib.cpp | 2 +- src/blackcore/voice_channel_vatlib.h | 2 +- src/blackcore/voice_channel_vatlib_p.h | 2 +- src/blackgui/components/aircraftcomponent.cpp | 4 +- src/blackgui/components/aircraftcomponent.h | 8 +- .../components/atcstationcomponent.cpp | 4 +- src/blackgui/components/atcstationcomponent.h | 8 +- .../components/cockpitv1component.cpp | 4 +- src/blackgui/components/cockpitv1component.h | 8 +- .../components/flightplancomponent.cpp | 4 +- src/blackgui/components/flightplancomponent.h | 4 +- .../components/infobarstatuscomponent.cpp | 4 +- .../components/infobarstatuscomponent.h | 4 +- .../components/infowindowcomponent.cpp | 4 +- src/blackgui/components/infowindowcomponent.h | 8 +- src/blackgui/components/logcomponent.cpp | 4 +- src/blackgui/components/logcomponent.h | 4 +- .../components/maininfoareacomponent.cpp | 4 +- .../components/maininfoareacomponent.h | 4 +- .../components/runtimebasedcomponent.cpp | 4 +- .../components/runtimebasedcomponent.h | 4 +- src/blackgui/components/settingscomponent.cpp | 4 +- src/blackgui/components/settingscomponent.h | 4 +- .../components/settingsfsxcomponent.cpp | 4 +- .../components/settingsfsxcomponent.h | 8 +- .../components/simulatorcomponent.cpp | 4 +- src/blackgui/components/simulatorcomponent.h | 4 +- .../components/textmessagecomponent.cpp | 4 +- .../components/textmessagecomponent.h | 8 +- .../components/timerbasedcomponent.cpp | 4 +- src/blackgui/components/timerbasedcomponent.h | 6 +- src/blackgui/components/usercomponent.cpp | 4 +- src/blackgui/components/usercomponent.h | 6 +- src/blackgui/dockwidget.cpp | 4 +- src/blackgui/dockwidget.h | 2 +- src/blackgui/dockwidgetinfoarea.cpp | 4 +- src/blackgui/dockwidgetinfoarea.h | 2 +- src/blackgui/dockwidgetinfobar.cpp | 4 +- src/blackgui/dockwidgetinfobar.h | 2 +- src/blackgui/guiutility.cpp | 4 +- src/blackgui/guiutility.h | 4 +- src/blackgui/led.cpp | 4 +- src/blackgui/led.h | 4 +- src/blackgui/models/aircraftlistmodel.cpp | 8 +- src/blackgui/models/aircraftlistmodel.h | 4 +- src/blackgui/models/airportlistmodel.cpp | 2 +- src/blackgui/models/airportlistmodel.h | 4 +- src/blackgui/models/atcstationlistmodel.cpp | 4 +- src/blackgui/models/atcstationlistmodel.h | 4 +- src/blackgui/models/clientlistmodel.cpp | 4 +- src/blackgui/models/clientlistmodel.h | 9 +- src/blackgui/models/columns.cpp | 2 +- src/blackgui/models/columns.h | 6 +- src/blackgui/models/keyboardkeylistmodel.cpp | 4 +- src/blackgui/models/keyboardkeylistmodel.h | 6 +- src/blackgui/models/listmodelbase.cpp | 4 +- src/blackgui/models/listmodelbase.h | 4 +- .../models/namevariantpairlistmodel.cpp | 4 +- .../models/namevariantpairlistmodel.h | 6 +- src/blackgui/models/serverlistmodel.h | 16 +- .../models/statusmessagelistmodel.cpp | 9 + src/blackgui/models/statusmessagelistmodel.h | 11 + src/blackgui/models/userlistmodel.cpp | 4 +- src/blackgui/models/userlistmodel.h | 6 +- src/blackgui/selcalcodeselector.cpp | 4 +- src/blackgui/selcalcodeselector.h | 4 +- src/blackgui/stylesheetutility.cpp | 4 +- src/blackgui/stylesheetutility.h | 4 +- src/blackgui/views/aircraftview.cpp | 4 +- src/blackgui/views/aircraftview.h | 4 +- src/blackgui/views/airportview.cpp | 2 +- src/blackgui/views/airportview.h | 4 +- src/blackgui/views/atcstationview.cpp | 4 +- src/blackgui/views/atcstationview.h | 4 +- src/blackgui/views/clientview.cpp | 4 +- src/blackgui/views/clientview.h | 4 +- src/blackgui/views/keyboardkeyview.cpp | 4 +- src/blackgui/views/keyboardkeyview.h | 4 +- src/blackgui/views/namevariantpairview.cpp | 4 +- src/blackgui/views/namevariantpairview.h | 4 +- src/blackgui/views/serverview.cpp | 4 +- src/blackgui/views/serverview.h | 4 +- src/blackgui/views/statusmessageview.cpp | 4 +- src/blackgui/views/statusmessageview.h | 4 +- src/blackgui/views/userview.cpp | 4 +- src/blackgui/views/userview.h | 4 +- src/blackgui/views/viewbase.h | 4 +- src/blackmisc/audioallclasses.h | 12 +- src/blackmisc/audiodevice.cpp | 12 +- src/blackmisc/audiodevice.h | 38 +- src/blackmisc/audiodevicelist.cpp | 12 +- src/blackmisc/audiodevicelist.h | 16 +- src/blackmisc/avaircraft.cpp | 4 +- src/blackmisc/avaircraft.h | 8 +- src/blackmisc/avaircrafticao.cpp | 9 + src/blackmisc/avaircrafticao.h | 57 +-- src/blackmisc/avaircraftlist.cpp | 4 +- src/blackmisc/avaircraftlist.h | 4 +- src/blackmisc/avaircraftsituation.cpp | 9 + src/blackmisc/avaircraftsituation.h | 21 +- src/blackmisc/avaircraftsituationlist.h | 18 +- src/blackmisc/avairport.cpp | 9 + src/blackmisc/avairport.h | 12 +- src/blackmisc/avairporticao.h | 16 +- src/blackmisc/avaltitude.cpp | 4 +- src/blackmisc/avaltitude.h | 4 +- src/blackmisc/avatcstation.cpp | 9 + src/blackmisc/avatcstation.h | 12 +- src/blackmisc/avcallsign.cpp | 4 +- src/blackmisc/avcallsign.h | 4 +- src/blackmisc/avcallsignlist.cpp | 4 +- src/blackmisc/avcallsignlist.h | 6 +- src/blackmisc/avflightplan.cpp | 4 +- src/blackmisc/avflightplan.h | 4 +- src/blackmisc/avheading.cpp | 4 +- src/blackmisc/avheading.h | 4 +- src/blackmisc/avinformationmessage.cpp | 4 +- src/blackmisc/avinformationmessage.h | 4 +- src/blackmisc/avioadfsystem.h | 301 +++---------- src/blackmisc/aviocomsystem.cpp | 12 +- src/blackmisc/aviocomsystem.h | 110 ++--- src/blackmisc/aviomodulator.cpp | 12 +- src/blackmisc/aviomodulator.h | 197 ++++---- src/blackmisc/avionavsystem.h | 321 +++---------- src/blackmisc/aviotransponder.cpp | 12 +- src/blackmisc/aviotransponder.h | 126 +++--- src/blackmisc/avselcal.cpp | 4 +- src/blackmisc/avselcal.h | 4 +- src/blackmisc/avtrack.h | 49 +- src/blackmisc/blackmisc.h | 11 +- src/blackmisc/blackmiscfreefunctions.cpp | 2 +- src/blackmisc/blackmiscfreefunctions.h | 4 +- src/blackmisc/collection.h | 16 +- src/blackmisc/containerbase.h | 16 +- src/blackmisc/coordinategeodetic.cpp | 12 +- src/blackmisc/coordinategeodetic.h | 14 +- src/blackmisc/coordinatetransformation.h | 100 ++--- src/blackmisc/dictionary.h | 14 +- src/blackmisc/filedeleter.cpp | 9 + src/blackmisc/filedeleter.h | 23 +- src/blackmisc/geoearthangle.cpp | 4 +- src/blackmisc/geoearthangle.h | 102 ++--- src/blackmisc/geolatitude.h | 4 +- src/blackmisc/geolongitude.h | 4 +- src/blackmisc/hotkeyfunction.cpp | 2 +- src/blackmisc/hotkeyfunction.h | 6 +- src/blackmisc/hwkeyboardkey.cpp | 12 +- src/blackmisc/hwkeyboardkey.h | 16 +- src/blackmisc/hwkeyboardkeylist.h | 4 +- src/blackmisc/icon.cpp | 4 +- src/blackmisc/icon.h | 4 +- src/blackmisc/iconlist.cpp | 4 +- src/blackmisc/iconlist.h | 4 +- src/blackmisc/icons.h | 4 +- src/blackmisc/index_sequence.h | 12 +- src/blackmisc/indexvariantmap.cpp | 4 +- src/blackmisc/indexvariantmap.h | 4 +- src/blackmisc/mathmatrix1x3.h | 40 +- src/blackmisc/mathmatrix3x1.h | 58 +-- src/blackmisc/mathmatrix3x3.h | 118 ++--- src/blackmisc/mathvector3dbase.cpp | 12 +- src/blackmisc/mathvector3dbase.h | 395 ++++++++-------- src/blackmisc/namevariantpair.h | 4 +- src/blackmisc/namevariantpairlist.cpp | 4 +- src/blackmisc/namevariantpairlist.h | 4 +- src/blackmisc/networkutils.h | 31 +- src/blackmisc/nwaircraftmapping.cpp | 9 + src/blackmisc/nwaircraftmapping.h | 14 +- src/blackmisc/nwaircraftmappinglist.cpp | 12 +- src/blackmisc/nwaircraftmappinglist.h | 16 +- src/blackmisc/nwaircraftmodel.cpp | 9 + src/blackmisc/nwaircraftmodel.h | 11 + src/blackmisc/nwclient.cpp | 9 + src/blackmisc/nwclient.h | 19 +- src/blackmisc/nwclientlist.cpp | 12 +- src/blackmisc/nwclientlist.h | 14 +- src/blackmisc/nwserver.cpp | 9 + src/blackmisc/nwserver.h | 75 ++-- src/blackmisc/nwtextmessage.cpp | 9 + src/blackmisc/nwtextmessage.h | 16 +- src/blackmisc/nwtextmessagelist.cpp | 12 +- src/blackmisc/nwtextmessagelist.h | 84 ++-- src/blackmisc/nwuser.cpp | 6 +- src/blackmisc/nwuser.h | 40 +- src/blackmisc/nwuserlist.h | 2 +- src/blackmisc/nwvoicecapabilites.cpp | 4 +- src/blackmisc/nwvoicecapabilities.h | 4 +- src/blackmisc/pqacceleration.h | 14 +- src/blackmisc/pqangle.cpp | 4 +- src/blackmisc/pqangle.h | 10 +- src/blackmisc/pqbase.cpp | 18 +- src/blackmisc/pqbase.h | 103 ++--- src/blackmisc/pqconstants.h | 168 +++---- src/blackmisc/pqfrequency.h | 20 +- src/blackmisc/pqlength.h | 14 +- src/blackmisc/pqmass.h | 16 +- src/blackmisc/pqphysicalquantity.cpp | 4 +- src/blackmisc/pqphysicalquantity.h | 103 ++--- src/blackmisc/pqpressure.h | 16 +- src/blackmisc/pqspeed.h | 18 +- src/blackmisc/pqstring.cpp | 9 + src/blackmisc/pqstring.h | 14 +- src/blackmisc/pqtemperature.h | 16 +- src/blackmisc/pqtime.cpp | 4 +- src/blackmisc/pqtime.h | 4 +- src/blackmisc/pqunits.cpp | 4 +- src/blackmisc/pqunits.h | 422 +++++------------- src/blackmisc/range.h | 12 +- src/blackmisc/sequence.h | 30 +- src/blackmisc/setaudio.h | 14 +- src/blackmisc/setkeyboardhotkey.cpp | 2 +- src/blackmisc/setkeyboardhotkey.h | 2 +- src/blackmisc/setnetwork.h | 14 +- src/blackmisc/settingutilities.h | 11 + src/blackmisc/sharedlockablepointer.h | 2 +- src/blackmisc/statusmessage.cpp | 4 +- src/blackmisc/statusmessage.h | 6 +- src/blackmisc/statusmessagelist.cpp | 4 +- src/blackmisc/statusmessagelist.h | 4 +- src/blackmisc/threadedreader.h | 17 +- src/blackmisc/tuple.h | 12 +- src/blackmisc/tuple_private.h | 12 +- src/blackmisc/valueobject.cpp | 4 +- src/blackmisc/valueobject.h | 16 +- src/blackmisc/variant.cpp | 4 +- src/blackmisc/variant.h | 4 +- src/blackmisc/voiceroom.cpp | 12 +- src/blackmisc/voiceroom.h | 16 +- src/blackmisc/voiceroomlist.cpp | 12 +- src/blackmisc/voiceroomlist.h | 16 +- src/blacksim/fscommon/aircraftcfgentries.cpp | 18 +- src/blacksim/fscommon/aircraftcfgentries.h | 221 ++++----- .../fscommon/aircraftcfgentrieslist.cpp | 12 +- .../fscommon/aircraftcfgentrieslist.h | 35 +- src/blacksim/fscommon/aircraftmapping.cpp | 12 +- src/blacksim/fscommon/aircraftmapping.h | 109 +++-- src/blacksim/fscommon/aircraftmappinglist.h | 23 +- src/blacksim/fscommon/vpilotmodelmappings.h | 14 +- src/blacksim/fsx/fsx.h | 11 +- src/blacksim/fsx/fsxsimulatorsetup.h | 14 +- src/blacksim/fsx/simconnectutilities.h | 35 +- src/blacksim/setsimulator.cpp | 9 + src/blacksim/setsimulator.h | 12 +- src/blacksim/simulatormodelmappings.h | 14 +- src/blacksim/simulatorsetup.h | 14 +- .../fs9/blacksimplugin_freefunctions.cpp | 2 +- .../fs9/blacksimplugin_freefunctions.h | 2 +- src/plugins/simulator/fs9/callback_wrapper.h | 2 +- src/plugins/simulator/fs9/directplay_peer.cpp | 2 +- src/plugins/simulator/fs9/directplay_peer.h | 2 +- src/plugins/simulator/fs9/fs9.h | 2 +- src/plugins/simulator/fs9/fs9_client.cpp | 2 +- src/plugins/simulator/fs9/fs9_client.h | 2 +- src/plugins/simulator/fs9/fs9_host.cpp | 2 +- src/plugins/simulator/fs9/fs9_host.h | 2 +- src/plugins/simulator/fs9/host_node.cpp | 2 +- src/plugins/simulator/fs9/host_node.h | 2 +- .../fs9/multiplayer_packet_parser.cpp | 2 +- .../simulator/fs9/multiplayer_packet_parser.h | 2 +- .../simulator/fs9/multiplayer_packets.h | 2 +- src/plugins/simulator/fs9/simulator_fs9.cpp | 2 +- src/plugins/simulator/fs9/simulator_fs9.h | 2 +- src/swiftcore/main.cpp | 4 +- src/swiftgui_standard/guimodeenums.h | 4 +- src/swiftgui_standard/introwindow.h | 4 +- src/swiftgui_standard/mainwindow.cpp | 4 +- src/swiftgui_standard/mainwindow.h | 4 +- tests/blackmisc/testcontainers.cpp | 14 +- tests/blackmisc/testvalueobject.cpp | 9 + tests/blackmisc/testvalueobject.h | 78 ++-- 295 files changed, 2736 insertions(+), 3031 deletions(-) diff --git a/samples/blackmisc/main.cpp b/samples/blackmisc/main.cpp index 135a6be4a..3fd56729f 100644 --- a/samples/blackmisc/main.cpp +++ b/samples/blackmisc/main.cpp @@ -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 #include "sampleschangeobject.h" diff --git a/samples/blackmisc/sampleschangeobject.cpp b/samples/blackmisc/sampleschangeobject.cpp index cb00b5ec7..cc809ca38 100644 --- a/samples/blackmisc/sampleschangeobject.cpp +++ b/samples/blackmisc/sampleschangeobject.cpp @@ -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 "sampleschangeobject.h" #include "blackmisc/pqconstants.h" diff --git a/samples/blackmisc/sampleschangeobject.h b/samples/blackmisc/sampleschangeobject.h index 93347df35..c20004ba0 100644 --- a/samples/blackmisc/sampleschangeobject.h +++ b/samples/blackmisc/sampleschangeobject.h @@ -1,24 +1,26 @@ -/* 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 BLACKMISCTEST_SAMPLESCHANGEDATA_H #define BLACKMISCTEST_SAMPLESCHANGEDATA_H -namespace BlackMiscTest { - -/*! - * \brief Samples for metadata - */ -class CSamplesChangeObject +namespace BlackMiscTest { -public: - /*! - * \brief Run the samples - */ - static int samples(); -}; + //! Samples for metadata + class CSamplesChangeObject + { + public: + //! Run the samples + static int samples(); + }; } // namespace #endif diff --git a/samples/blackmisc/samplescontainer.cpp b/samples/blackmisc/samplescontainer.cpp index b6060afc6..f76513de2 100644 --- a/samples/blackmisc/samplescontainer.cpp +++ b/samples/blackmisc/samplescontainer.cpp @@ -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 "samplescontainer.h" #include "blackmisc/blackmiscfreefunctions.h" diff --git a/samples/blackmisc/samplescontainer.h b/samples/blackmisc/samplescontainer.h index f0ac7099e..3c687a2d8 100644 --- a/samples/blackmisc/samplescontainer.h +++ b/samples/blackmisc/samplescontainer.h @@ -1,24 +1,26 @@ -/* 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 BLACKMISCTEST_SAMPLESCONTAINER_H #define BLACKMISCTEST_SAMPLESCONTAINER_H -namespace BlackMiscTest { - -/*! - * \brief Samples for our containers - */ -class CSamplesContainer +namespace BlackMiscTest { -public: - /*! - * \brief Run the samples - */ - static int samples(); -}; + //! Samples for our containers + class CSamplesContainer + { + public: + //! Run the samples + static int samples(); + }; } // namespace #endif diff --git a/samples/blackmisc/samplesjson.cpp b/samples/blackmisc/samplesjson.cpp index c329b2ad6..72cb015d2 100644 --- a/samples/blackmisc/samplesjson.cpp +++ b/samples/blackmisc/samplesjson.cpp @@ -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 "samplesjson.h" #include "blackmisc/avatcstationlist.h" diff --git a/samples/blackmisc/samplesjson.h b/samples/blackmisc/samplesjson.h index 2ce88e7a0..3497383a2 100644 --- a/samples/blackmisc/samplesjson.h +++ b/samples/blackmisc/samplesjson.h @@ -1,24 +1,27 @@ -/* 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 BLACKMISCTEST_SAMPLESJSON_H #define BLACKMISCTEST_SAMPLESJSON_H -namespace BlackMiscTest { - -/*! - * \brief Samples for metadata - */ -class CSamplesJson +namespace BlackMiscTest { -public: - /*! - * \brief Run the samples - */ - static int samples(); -}; + + //! Samples for metadata + class CSamplesJson + { + public: + //! Run the samples + static int samples(); + }; } // namespace #endif diff --git a/samples/blackmisc/samplesmetadata.cpp b/samples/blackmisc/samplesmetadata.cpp index c82dea999..e0dc14140 100644 --- a/samples/blackmisc/samplesmetadata.cpp +++ b/samples/blackmisc/samplesmetadata.cpp @@ -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 "samplesmetadata.h" #include "blackmisc/blackmiscfreefunctions.h" diff --git a/samples/blackmisc/samplesmetadata.h b/samples/blackmisc/samplesmetadata.h index 3def8e2ce..a636a1f37 100644 --- a/samples/blackmisc/samplesmetadata.h +++ b/samples/blackmisc/samplesmetadata.h @@ -1,24 +1,27 @@ -/* 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 BLACKMISCTEST_SAMPLESMETADATA_H #define BLACKMISCTEST_SAMPLESMETADATA_H -namespace BlackMiscTest { - -/*! - * \brief Samples for metadata - */ -class CSamplesMetadata +namespace BlackMiscTest { -public: - /*! - * \brief Run the samples - */ - static int samples(); -}; + + //! Samples for metadata + class CSamplesMetadata + { + public: + //! Run the samples + static int samples(); + }; } // namespace #endif diff --git a/samples/blackmiscdbus/main.cpp b/samples/blackmiscdbus/main.cpp index 311a97d4c..e494f9789 100644 --- a/samples/blackmiscdbus/main.cpp +++ b/samples/blackmiscdbus/main.cpp @@ -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 "blackmisc/blackmiscfreefunctions.h" #include "servicetool.h" diff --git a/samples/blackmiscdbus/servicetool.cpp b/samples/blackmiscdbus/servicetool.cpp index 15013f785..95a4a0ee0 100644 --- a/samples/blackmiscdbus/servicetool.cpp +++ b/samples/blackmiscdbus/servicetool.cpp @@ -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 "servicetool.h" #include "testservice.h" #include "testservice_interface.h" diff --git a/samples/blackmiscdbus/testservice.cpp b/samples/blackmiscdbus/testservice.cpp index 51a59ba9c..52405263c 100644 --- a/samples/blackmiscdbus/testservice.cpp +++ b/samples/blackmiscdbus/testservice.cpp @@ -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 "testservice.h" #include "blackmisc/blackmiscfreefunctions.h" @@ -218,7 +222,7 @@ namespace BlackMiscTest } /* - * Ping ATC station + * Ping ATC station list */ const BlackMisc::Aviation::CAtcStationList Testservice::getAtcStationList(const qint32 number) const { diff --git a/samples/blackmiscdbus/testservice.h b/samples/blackmiscdbus/testservice.h index b069f731a..8f2eafa5a 100644 --- a/samples/blackmiscdbus/testservice.h +++ b/samples/blackmiscdbus/testservice.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 BLACKMISCKTEST_TESTSERVICEPQAV_H #define BLACKMISCKTEST_TESTSERVICEPQAV_H @@ -39,219 +45,118 @@ namespace BlackMiscTest // to the above name signals: - /*! - * \brief Send string message - * \param message - */ + //! Send string message void sendStringMessage(const QString &message); public slots: - /*! - * \brief Receive string message - * \param message - */ + //! Receive string message void receiveStringMessage(const QString &message); - /*! - * \brief Receive a QVariant - * \param variant - * \param localMetyType, works only in the same binary - */ + //! Receive a QVariant void receiveVariant(const QDBusVariant &variant, int localMetaType); - /*! - * \brief Receive speed - * \param speed - */ + //! Receive speed void receiveSpeed(const BlackMisc::PhysicalQuantities::CSpeed &speed); - /*! - * \brief Receive com unit - * \param comUnit - */ + //! Receive com unit void receiveComUnit(const BlackMisc::Aviation::CComSystem &comUnit); - /*! - * \brief Receive altitude - * \param comUnit - */ + //! Receive altitude void receiveAltitude(const BlackMisc::Aviation::CAltitude &altitude); - /*! - * \brief Receive matrix - * \param matrix - */ + //! Receive matrix void receiveMatrix(const BlackMisc::Math::CMatrix3x3 &matrix); - /*! - * \brief Receive list - * \param list - */ + //! Receive list void receiveList(const QList &list); - /*! - * \brief Receive a geo position - * \param geo - */ + //! Receive a geo position void receiveGeoPosition(const BlackMisc::Geo::CCoordinateGeodetic &geo) const; - /*! - * \brief Receive transponder - * \param transponder - */ + //! Receive transponder void receiveTransponder(const BlackMisc::Aviation::CTransponder &transponder) const; - /*! - * \brief Receive track - * \param track - */ + //! Receive track void receiveTrack(const BlackMisc::Aviation::CTrack &track) const; - /*! - * \brief Receive a length (not working) - * \param length - */ + //! Receive a length (not working) void receiveLength(const BlackMisc::PhysicalQuantities::CLength &length) const; - /*! - * \brief Receive lengths - * \param length - */ + //! Receive lengths void receiveLengthsQl(const QList &lengthsList) const; - /*! - * \brief Receive lengths - * \param length - */ + //! Receive lengths void receiveLengthsQvl(const QVariantList &lengthsVariantList) const; - /*! - * \brief Receive ATC station - * \param station - */ + //! Receive ATC station void receiveAtcStation(const BlackMisc::Aviation::CAtcStation &station) const; - /*! - * \brief Receive callsign - * \param callsign - */ + //! Receive callsign void receiveCallsign(const BlackMisc::Aviation::CCallsign &callsign) const; - - /*! - * \brief Receive ATC list - * \param atcStationList - */ + //! Receive ATC list void receiveAtcStationList(const BlackMisc::Aviation::CAtcStationList &atcStationList) const; - /*! - * \brief Receive an value map - * \param valueMap - */ + //! Receive an value map void receiveValueMap(const BlackMisc::CIndexVariantMap &valueMap) const; - /*! - * \brief Receive speed - * \param speed - */ + //! Receive speed BlackMisc::PhysicalQuantities::CSpeed pingSpeed(const BlackMisc::PhysicalQuantities::CSpeed &speed); /*! - * \brief Receive altitude + //! Receive altitude * \param comUnit */ BlackMisc::Aviation::CAltitude pingAltitude(const BlackMisc::Aviation::CAltitude &altitude); - /*! - * \brief Ping ATC station - * \param station - */ + //! Ping ATC station BlackMisc::Aviation::CAtcStation pingAtcStation(const BlackMisc::Aviation::CAtcStation &station); - /*! - * \brief Ping aircraft - * \param aircraft - * \return - */ + //! Ping aircraft BlackMisc::Aviation::CAircraft pingAircraft(const BlackMisc::Aviation::CAircraft &aircraft); - /*! - * \brief Ping ATC list - * \param atcStationList - * \return - */ + //! Ping ATC list BlackMisc::Aviation::CAtcStationList pingAtcStationList(const BlackMisc::Aviation::CAtcStationList &atcStationList) const; - /*! - * \brief Ping aircrafts list - * \param aircraftList - * \return - */ + //! Ping aircrafts list BlackMisc::Aviation::CAircraftList pingAircraftList(const BlackMisc::Aviation::CAircraftList &aircraftList); - /*! - * \brief Ping airports list - * \param airportList - * \return - */ + //! Ping airports list BlackMisc::Aviation::CAirportList pingAirportList(const BlackMisc::Aviation::CAirportList &airportList); - /*! - * \brief Ping client - * \param client - * \return - */ + //! Ping property index + BlackMisc::CPropertyIndex pingPropertyIndex(const BlackMisc::CPropertyIndex &properties); + + //! Ping index variant map + BlackMisc::CIndexVariantMap pingIndexVariantMap(const BlackMisc::CIndexVariantMap &indexVariantMap); + + //! Ping client BlackMisc::Network::CClient pingClient(const BlackMisc::Network::CClient &client); - /*! - * \brief Ping NW clients list - * \param clientList - * \return - */ + //! Ping NW clients list BlackMisc::Network::CClientList pingClientList(const BlackMisc::Network::CClientList &clientList); - /*! - * \brief Ping CVariant - * \param variant - * \return - */ + //! Ping CVariant BlackMisc::CVariant pingCVariant(const BlackMisc::Network::CClient &client); - /*! - * \brief Get speed - * \return - */ + //! Get speed BlackMisc::PhysicalQuantities::CSpeed getSpeed() const; - /*! - * \brief Get station - * \return - */ + //! Get station BlackMisc::Aviation::CAtcStation getAtcStation() const; - /*! - * \brief return n ATC stations - * \param number - * \return - */ + //! return n ATC stations const BlackMisc::Aviation::CAtcStationList getAtcStationList(const qint32 number) const; - /*! - * \brief Get object paths - * \param number - * \return - */ + //! Get object paths const QList getObjectPaths(const qint32 number) const; public: static const QString ServiceName; static const QString ServicePath; - /*! - * \brief Constructor - * \param parent - */ + //! Constructor explicit Testservice(QObject *parent = nullptr); private: diff --git a/samples/blackmiscdbus/testservice_interface.cpp b/samples/blackmiscdbus/testservice_interface.cpp index 92ac45724..632040f30 100644 --- a/samples/blackmiscdbus/testservice_interface.cpp +++ b/samples/blackmiscdbus/testservice_interface.cpp @@ -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 "testservice_interface.h" namespace BlackMiscTest diff --git a/samples/blackmiscdbus/testservice_interface.h b/samples/blackmiscdbus/testservice_interface.h index 5c8a29ec1..53c5c60b9 100644 --- a/samples/blackmiscdbus/testservice_interface.h +++ b/samples/blackmiscdbus/testservice_interface.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 BLACKMISCTEST_TESTSERVICE_INTERFACE_H #define BLACKMISCTEST_TESTSERVICE_INTERFACE_H @@ -16,7 +27,7 @@ namespace BlackMiscTest { /*! - * \brief Proxy class for interface blackmisctest.testservice + * Proxy class for interface blackmisctest.testservice */ class TestServiceInterface: public QDBusAbstractInterface { diff --git a/src/blackcore/airspace_monitor.cpp b/src/blackcore/airspace_monitor.cpp index 933af3025..2ac1ab157 100644 --- a/src/blackcore/airspace_monitor.cpp +++ b/src/blackcore/airspace_monitor.cpp @@ -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 "airspace_monitor.h" #include "blackcore/blackcorefreefunctions.h" diff --git a/src/blackcore/airspace_monitor.h b/src/blackcore/airspace_monitor.h index 74dea10f2..2a83419c0 100644 --- a/src/blackcore/airspace_monitor.h +++ b/src/blackcore/airspace_monitor.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 BLACKCORE_AIRSPACE_MONITOR_H #define BLACKCORE_AIRSPACE_MONITOR_H @@ -16,8 +22,6 @@ #include "vatsimbookingreader.h" #include "vatsimdatafilereader.h" -//! \file - namespace BlackCore { diff --git a/src/blackcore/context_application_impl.h b/src/blackcore/context_application_impl.h index e1b8c3302..5e881b57d 100644 --- a/src/blackcore/context_application_impl.h +++ b/src/blackcore/context_application_impl.h @@ -50,7 +50,7 @@ namespace BlackCore virtual bool existsFile(const QString &fileName) override; protected: - static const auto c_logContext = CRuntime::LogForApplication; + static const auto c_logContext = CRuntime::LogForApplication; //!< identifier //! Constructor CContextApplication(CRuntimeConfig::ContextMode mode, CRuntime *runtime); diff --git a/src/blackcore/context_network_impl.cpp b/src/blackcore/context_network_impl.cpp index 1e8db1703..3657f45c2 100644 --- a/src/blackcore/context_network_impl.cpp +++ b/src/blackcore/context_network_impl.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackcore/context_network_impl.h b/src/blackcore/context_network_impl.h index babff488e..15323ca63 100644 --- a/src/blackcore/context_network_impl.h +++ b/src/blackcore/context_network_impl.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/blackcore/vatsimbookingreader.cpp b/src/blackcore/vatsimbookingreader.cpp index 19e08c4be..3c45f07a5 100644 --- a/src/blackcore/vatsimbookingreader.cpp +++ b/src/blackcore/vatsimbookingreader.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackcore/vatsimbookingreader.h b/src/blackcore/vatsimbookingreader.h index 066ae7e12..f838dc374 100644 --- a/src/blackcore/vatsimbookingreader.h +++ b/src/blackcore/vatsimbookingreader.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackcore/vatsimdatafilereader.cpp b/src/blackcore/vatsimdatafilereader.cpp index 8c50bd314..f8da5c745 100644 --- a/src/blackcore/vatsimdatafilereader.cpp +++ b/src/blackcore/vatsimdatafilereader.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackcore/vatsimdatafilereader.h b/src/blackcore/vatsimdatafilereader.h index 8f9bd786a..60f05167b 100644 --- a/src/blackcore/vatsimdatafilereader.h +++ b/src/blackcore/vatsimdatafilereader.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackcore/voice_channel.h b/src/blackcore/voice_channel.h index 8118f9647..dd8cc918b 100644 --- a/src/blackcore/voice_channel.h +++ b/src/blackcore/voice_channel.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/blackcore/voice_channel_vatlib.cpp b/src/blackcore/voice_channel_vatlib.cpp index d36d74e90..dd72e72da 100644 --- a/src/blackcore/voice_channel_vatlib.cpp +++ b/src/blackcore/voice_channel_vatlib.cpp @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/blackcore/voice_channel_vatlib.h b/src/blackcore/voice_channel_vatlib.h index 307e9b03c..58e4afe5a 100644 --- a/src/blackcore/voice_channel_vatlib.h +++ b/src/blackcore/voice_channel_vatlib.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/blackcore/voice_channel_vatlib_p.h b/src/blackcore/voice_channel_vatlib_p.h index df2dedb1b..5c0717a46 100644 --- a/src/blackcore/voice_channel_vatlib_p.h +++ b/src/blackcore/voice_channel_vatlib_p.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/blackgui/components/aircraftcomponent.cpp b/src/blackgui/components/aircraftcomponent.cpp index 3db18e9a3..0abb222b4 100644 --- a/src/blackgui/components/aircraftcomponent.cpp +++ b/src/blackgui/components/aircraftcomponent.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/aircraftcomponent.h b/src/blackgui/components/aircraftcomponent.h index 325a6419b..8dbd02753 100644 --- a/src/blackgui/components/aircraftcomponent.h +++ b/src/blackgui/components/aircraftcomponent.h @@ -1,17 +1,17 @@ /* 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, + * 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_AIRCRAFTCOMPONENT_H #define BLACKGUI_AIRCRAFTCOMPONENT_H -//! \file - #include "blackgui/components/runtimebasedcomponent.h" #include "blackgui/components/timerbasedcomponent.h" #include "blackmisc/avaircraft.h" diff --git a/src/blackgui/components/atcstationcomponent.cpp b/src/blackgui/components/atcstationcomponent.cpp index a7ec968ea..c753fd4fc 100644 --- a/src/blackgui/components/atcstationcomponent.cpp +++ b/src/blackgui/components/atcstationcomponent.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/atcstationcomponent.h b/src/blackgui/components/atcstationcomponent.h index 1551a7de8..47d89b4f9 100644 --- a/src/blackgui/components/atcstationcomponent.h +++ b/src/blackgui/components/atcstationcomponent.h @@ -1,17 +1,17 @@ /* 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, + * 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_ATCSTATIONCOMPONENT_H #define BLACKGUI_ATCSTATIONCOMPONENT_H -//! \file - #include "blackgui/components/runtimebasedcomponent.h" #include "blackgui/components/timerbasedcomponent.h" #include "blackmisc/avatcstation.h" diff --git a/src/blackgui/components/cockpitv1component.cpp b/src/blackgui/components/cockpitv1component.cpp index c75536b81..fc6b9f315 100644 --- a/src/blackgui/components/cockpitv1component.cpp +++ b/src/blackgui/components/cockpitv1component.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/cockpitv1component.h b/src/blackgui/components/cockpitv1component.h index ea8db7227..0b26be864 100644 --- a/src/blackgui/components/cockpitv1component.h +++ b/src/blackgui/components/cockpitv1component.h @@ -1,17 +1,17 @@ /* 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, + * 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_COCKPITV1COMPONENT_H #define BLACKGUI_COCKPITV1COMPONENT_H -//! \file - #include "blackgui/components/runtimebasedcomponent.h" #include #include diff --git a/src/blackgui/components/flightplancomponent.cpp b/src/blackgui/components/flightplancomponent.cpp index f86da63a5..378f3fda1 100644 --- a/src/blackgui/components/flightplancomponent.cpp +++ b/src/blackgui/components/flightplancomponent.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/flightplancomponent.h b/src/blackgui/components/flightplancomponent.h index d4e401443..6580d0219 100644 --- a/src/blackgui/components/flightplancomponent.h +++ b/src/blackgui/components/flightplancomponent.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/infobarstatuscomponent.cpp b/src/blackgui/components/infobarstatuscomponent.cpp index e75e00fd3..a29d02a5c 100644 --- a/src/blackgui/components/infobarstatuscomponent.cpp +++ b/src/blackgui/components/infobarstatuscomponent.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/infobarstatuscomponent.h b/src/blackgui/components/infobarstatuscomponent.h index 551bb396a..21aed80c2 100644 --- a/src/blackgui/components/infobarstatuscomponent.h +++ b/src/blackgui/components/infobarstatuscomponent.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/infowindowcomponent.cpp b/src/blackgui/components/infowindowcomponent.cpp index f888f765b..8f136d7b2 100644 --- a/src/blackgui/components/infowindowcomponent.cpp +++ b/src/blackgui/components/infowindowcomponent.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/infowindowcomponent.h b/src/blackgui/components/infowindowcomponent.h index 290dc01b0..97a0452c4 100644 --- a/src/blackgui/components/infowindowcomponent.h +++ b/src/blackgui/components/infowindowcomponent.h @@ -1,17 +1,17 @@ /* 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, + * 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_INFOWINDOW_H #define BLACKGUI_INFOWINDOW_H -//! \file - #include "blackmisc/nwtextmessage.h" #include "blackmisc/statusmessage.h" #include "blackmisc/variant.h" diff --git a/src/blackgui/components/logcomponent.cpp b/src/blackgui/components/logcomponent.cpp index 3826c5819..297b19006 100644 --- a/src/blackgui/components/logcomponent.cpp +++ b/src/blackgui/components/logcomponent.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/logcomponent.h b/src/blackgui/components/logcomponent.h index 2120af99b..2cb426c8d 100644 --- a/src/blackgui/components/logcomponent.h +++ b/src/blackgui/components/logcomponent.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/maininfoareacomponent.cpp b/src/blackgui/components/maininfoareacomponent.cpp index b991e510b..d18743ec2 100644 --- a/src/blackgui/components/maininfoareacomponent.cpp +++ b/src/blackgui/components/maininfoareacomponent.cpp @@ -1,8 +1,8 @@ /* Copyright (C) 2014 - * 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, + * 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. */ diff --git a/src/blackgui/components/maininfoareacomponent.h b/src/blackgui/components/maininfoareacomponent.h index ef7d812ac..2337b3bf0 100644 --- a/src/blackgui/components/maininfoareacomponent.h +++ b/src/blackgui/components/maininfoareacomponent.h @@ -1,8 +1,8 @@ /* Copyright (C) 2014 - * 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, + * 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. */ diff --git a/src/blackgui/components/runtimebasedcomponent.cpp b/src/blackgui/components/runtimebasedcomponent.cpp index d85236440..57e3782c2 100644 --- a/src/blackgui/components/runtimebasedcomponent.cpp +++ b/src/blackgui/components/runtimebasedcomponent.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/runtimebasedcomponent.h b/src/blackgui/components/runtimebasedcomponent.h index 2aff68555..0258183ee 100644 --- a/src/blackgui/components/runtimebasedcomponent.h +++ b/src/blackgui/components/runtimebasedcomponent.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/settingscomponent.cpp b/src/blackgui/components/settingscomponent.cpp index b3af79efa..b1610475d 100644 --- a/src/blackgui/components/settingscomponent.cpp +++ b/src/blackgui/components/settingscomponent.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/settingscomponent.h b/src/blackgui/components/settingscomponent.h index 05fc60fce..a51cd2fff 100644 --- a/src/blackgui/components/settingscomponent.h +++ b/src/blackgui/components/settingscomponent.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/settingsfsxcomponent.cpp b/src/blackgui/components/settingsfsxcomponent.cpp index ce6b82e3c..6edf83913 100644 --- a/src/blackgui/components/settingsfsxcomponent.cpp +++ b/src/blackgui/components/settingsfsxcomponent.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/settingsfsxcomponent.h b/src/blackgui/components/settingsfsxcomponent.h index e11033436..32dd78a34 100644 --- a/src/blackgui/components/settingsfsxcomponent.h +++ b/src/blackgui/components/settingsfsxcomponent.h @@ -1,17 +1,17 @@ /* 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, + * 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_SETTINGSFSXCOMPONENT_H #define BLACKGUI_SETTINGSFSXCOMPONENT_H -//! \file - #include "blackgui/components/runtimebasedcomponent.h" #include diff --git a/src/blackgui/components/simulatorcomponent.cpp b/src/blackgui/components/simulatorcomponent.cpp index 1600bccf8..8fb4649ae 100644 --- a/src/blackgui/components/simulatorcomponent.cpp +++ b/src/blackgui/components/simulatorcomponent.cpp @@ -1,8 +1,8 @@ /* Copyright (C) 2014 - * 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, + * 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. */ diff --git a/src/blackgui/components/simulatorcomponent.h b/src/blackgui/components/simulatorcomponent.h index d2a10423e..ffd0b90ac 100644 --- a/src/blackgui/components/simulatorcomponent.h +++ b/src/blackgui/components/simulatorcomponent.h @@ -1,8 +1,8 @@ /* Copyright (C) 2014 - * 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, + * 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. */ diff --git a/src/blackgui/components/textmessagecomponent.cpp b/src/blackgui/components/textmessagecomponent.cpp index 2684b4de8..bdff45c11 100644 --- a/src/blackgui/components/textmessagecomponent.cpp +++ b/src/blackgui/components/textmessagecomponent.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/textmessagecomponent.h b/src/blackgui/components/textmessagecomponent.h index 8d2c552d2..3ac2ae2a1 100644 --- a/src/blackgui/components/textmessagecomponent.h +++ b/src/blackgui/components/textmessagecomponent.h @@ -1,17 +1,17 @@ /* 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, + * 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_TEXTMESSAGECOMPONENT_H #define BLACKGUI_TEXTMESSAGECOMPONENT_H -//! \file - #include "blackgui/components/runtimebasedcomponent.h" #include "blackgui/components/timerbasedcomponent.h" #include "blackmisc/nwtextmessage.h" diff --git a/src/blackgui/components/timerbasedcomponent.cpp b/src/blackgui/components/timerbasedcomponent.cpp index 417916a10..f0dd2bab8 100644 --- a/src/blackgui/components/timerbasedcomponent.cpp +++ b/src/blackgui/components/timerbasedcomponent.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/timerbasedcomponent.h b/src/blackgui/components/timerbasedcomponent.h index 84b3b2268..d64608aac 100644 --- a/src/blackgui/components/timerbasedcomponent.h +++ b/src/blackgui/components/timerbasedcomponent.h @@ -1,12 +1,14 @@ /* 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, + * 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_TIMERBASEDCOMPONENT_H #define BLACKGUI_TIMERBASEDCOMPONENT_H diff --git a/src/blackgui/components/usercomponent.cpp b/src/blackgui/components/usercomponent.cpp index 1f2a4df50..2cbc72368 100644 --- a/src/blackgui/components/usercomponent.cpp +++ b/src/blackgui/components/usercomponent.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/components/usercomponent.h b/src/blackgui/components/usercomponent.h index 73f26952a..171359ff0 100644 --- a/src/blackgui/components/usercomponent.h +++ b/src/blackgui/components/usercomponent.h @@ -1,12 +1,14 @@ /* 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, + * 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_USERCOMPONENT_H #define BLACKGUI_USERCOMPONENT_H diff --git a/src/blackgui/dockwidget.cpp b/src/blackgui/dockwidget.cpp index 04e9c7769..4dbce3293 100644 --- a/src/blackgui/dockwidget.cpp +++ b/src/blackgui/dockwidget.cpp @@ -1,8 +1,8 @@ /* Copyright (C) 2014 - * 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, + * 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. */ diff --git a/src/blackgui/dockwidget.h b/src/blackgui/dockwidget.h index fffb1b542..7d3e3aa18 100644 --- a/src/blackgui/dockwidget.h +++ b/src/blackgui/dockwidget.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/blackgui/dockwidgetinfoarea.cpp b/src/blackgui/dockwidgetinfoarea.cpp index bd9395863..c50b0301c 100644 --- a/src/blackgui/dockwidgetinfoarea.cpp +++ b/src/blackgui/dockwidgetinfoarea.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/dockwidgetinfoarea.h b/src/blackgui/dockwidgetinfoarea.h index 4fb26ae45..42bc36f14 100644 --- a/src/blackgui/dockwidgetinfoarea.h +++ b/src/blackgui/dockwidgetinfoarea.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/blackgui/dockwidgetinfobar.cpp b/src/blackgui/dockwidgetinfobar.cpp index 845e0306c..6a3f65a55 100644 --- a/src/blackgui/dockwidgetinfobar.cpp +++ b/src/blackgui/dockwidgetinfobar.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/dockwidgetinfobar.h b/src/blackgui/dockwidgetinfobar.h index 9166bd085..c4936386f 100644 --- a/src/blackgui/dockwidgetinfobar.h +++ b/src/blackgui/dockwidgetinfobar.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/blackgui/guiutility.cpp b/src/blackgui/guiutility.cpp index d7660bf2b..2a93f92dc 100644 --- a/src/blackgui/guiutility.cpp +++ b/src/blackgui/guiutility.cpp @@ -1,8 +1,8 @@ /* Copyright (C) 2014 - * 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, + * 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. */ diff --git a/src/blackgui/guiutility.h b/src/blackgui/guiutility.h index 5bacc4d6c..f290aef3a 100644 --- a/src/blackgui/guiutility.h +++ b/src/blackgui/guiutility.h @@ -1,8 +1,8 @@ /* Copyright (C) 2014 - * 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, + * 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. */ diff --git a/src/blackgui/led.cpp b/src/blackgui/led.cpp index 9431c4add..1b21f2e54 100644 --- a/src/blackgui/led.cpp +++ b/src/blackgui/led.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. * diff --git a/src/blackgui/led.h b/src/blackgui/led.h index eb62a86e4..d4845e719 100644 --- a/src/blackgui/led.h +++ b/src/blackgui/led.h @@ -1,8 +1,8 @@ /* 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, + * 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. * diff --git a/src/blackgui/models/aircraftlistmodel.cpp b/src/blackgui/models/aircraftlistmodel.cpp index 06af45035..aee880e03 100644 --- a/src/blackgui/models/aircraftlistmodel.cpp +++ b/src/blackgui/models/aircraftlistmodel.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ @@ -28,8 +28,8 @@ namespace BlackGui this->m_columns.addColumn(CColumn("frequency", CAircraft::IndexFrequencyCom1, Qt::AlignRight | Qt::AlignVCenter)); this->m_columns.addColumn(CColumn("model", CAircraftIcao::IndexAsString)); this->m_columns.addColumn(CColumn("transponder", CAircraft::IndexTansponderFormatted)); - this->m_columns.addColumn(CColumn("latitude", CAircraftSituation::IndexPositionLatitude, Qt::AlignRight | Qt::AlignVCenter)); - this->m_columns.addColumn(CColumn("longitude", CAircraftSituation::IndexPositionLongitude, Qt::AlignRight | Qt::AlignVCenter)); + this->m_columns.addColumn(CColumn("latitude", CAircraftSituation::IndexLatitude, Qt::AlignRight | Qt::AlignVCenter)); + this->m_columns.addColumn(CColumn("longitude", CAircraftSituation::IndexLongitude, Qt::AlignRight | Qt::AlignVCenter)); this->m_columns.addColumn(CColumn("altitude", CAircraftSituation::IndexAltitude, Qt::AlignRight | Qt::AlignVCenter)); this->m_columns.addColumn(CColumn("groundspeed", CAircraftSituation::IndexGroundspeed, Qt::AlignRight | Qt::AlignVCenter)); diff --git a/src/blackgui/models/aircraftlistmodel.h b/src/blackgui/models/aircraftlistmodel.h index 652aeb619..f1f8f2251 100644 --- a/src/blackgui/models/aircraftlistmodel.h +++ b/src/blackgui/models/aircraftlistmodel.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/models/airportlistmodel.cpp b/src/blackgui/models/airportlistmodel.cpp index bc7170b45..bf7664cfa 100644 --- a/src/blackgui/models/airportlistmodel.cpp +++ b/src/blackgui/models/airportlistmodel.cpp @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/blackgui/models/airportlistmodel.h b/src/blackgui/models/airportlistmodel.h index 51eb17f5e..f6144717a 100644 --- a/src/blackgui/models/airportlistmodel.h +++ b/src/blackgui/models/airportlistmodel.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/models/atcstationlistmodel.cpp b/src/blackgui/models/atcstationlistmodel.cpp index 5be679c46..be7f8c8be 100644 --- a/src/blackgui/models/atcstationlistmodel.cpp +++ b/src/blackgui/models/atcstationlistmodel.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/models/atcstationlistmodel.h b/src/blackgui/models/atcstationlistmodel.h index 056223daf..ef777c731 100644 --- a/src/blackgui/models/atcstationlistmodel.h +++ b/src/blackgui/models/atcstationlistmodel.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/models/clientlistmodel.cpp b/src/blackgui/models/clientlistmodel.cpp index ae5d9783d..3441e8d75 100644 --- a/src/blackgui/models/clientlistmodel.cpp +++ b/src/blackgui/models/clientlistmodel.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/models/clientlistmodel.h b/src/blackgui/models/clientlistmodel.h index 38ff8365b..0d3da51e9 100644 --- a/src/blackgui/models/clientlistmodel.h +++ b/src/blackgui/models/clientlistmodel.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ @@ -25,11 +25,10 @@ namespace BlackGui { public: - - //! \brief Constructor + //! Constructor explicit CClientListModel(QObject *parent = nullptr); - //! \brief Destructor + //! Destructor virtual ~CClientListModel() {} //! \copydoc CListModelBase::data diff --git a/src/blackgui/models/columns.cpp b/src/blackgui/models/columns.cpp index e0a2537e4..b3a1597ad 100644 --- a/src/blackgui/models/columns.cpp +++ b/src/blackgui/models/columns.cpp @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/blackgui/models/columns.h b/src/blackgui/models/columns.h index 158642ff1..22fe8adb8 100644 --- a/src/blackgui/models/columns.h +++ b/src/blackgui/models/columns.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ @@ -26,7 +26,7 @@ namespace BlackGui { public: /*! - * \brief Constructor + * Constructor * \param headerName * \param propertyIndex as in CValueObject::propertyByIndex * \param alignment Qt::Alignment diff --git a/src/blackgui/models/keyboardkeylistmodel.cpp b/src/blackgui/models/keyboardkeylistmodel.cpp index 31feec745..862b533c9 100644 --- a/src/blackgui/models/keyboardkeylistmodel.cpp +++ b/src/blackgui/models/keyboardkeylistmodel.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/models/keyboardkeylistmodel.h b/src/blackgui/models/keyboardkeylistmodel.h index c79c09ca9..4afb44714 100644 --- a/src/blackgui/models/keyboardkeylistmodel.h +++ b/src/blackgui/models/keyboardkeylistmodel.h @@ -1,12 +1,14 @@ /* 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, + * 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_KEYBOARDKEYLISTMODEL_H #define BLACKGUI_KEYBOARDKEYLISTMODEL_H diff --git a/src/blackgui/models/listmodelbase.cpp b/src/blackgui/models/listmodelbase.cpp index 5f5a826e3..88ec648ee 100644 --- a/src/blackgui/models/listmodelbase.cpp +++ b/src/blackgui/models/listmodelbase.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/models/listmodelbase.h b/src/blackgui/models/listmodelbase.h index 90476b894..e9331bd30 100644 --- a/src/blackgui/models/listmodelbase.h +++ b/src/blackgui/models/listmodelbase.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/models/namevariantpairlistmodel.cpp b/src/blackgui/models/namevariantpairlistmodel.cpp index abfc48f1f..0843a8d5e 100644 --- a/src/blackgui/models/namevariantpairlistmodel.cpp +++ b/src/blackgui/models/namevariantpairlistmodel.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/models/namevariantpairlistmodel.h b/src/blackgui/models/namevariantpairlistmodel.h index 29e1ec1a0..adcf92e59 100644 --- a/src/blackgui/models/namevariantpairlistmodel.h +++ b/src/blackgui/models/namevariantpairlistmodel.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/models/serverlistmodel.h b/src/blackgui/models/serverlistmodel.h index 873937348..b84fe462d 100644 --- a/src/blackgui/models/serverlistmodel.h +++ b/src/blackgui/models/serverlistmodel.h @@ -1,13 +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 BLACKGUI_SERVERLISTMODEL_H #define BLACKGUI_SERVERLISTMODEL_H -//! \file - #include "blackmisc/nwserverlist.h" #include "blackgui/models/listmodelbase.h" #include diff --git a/src/blackgui/models/statusmessagelistmodel.cpp b/src/blackgui/models/statusmessagelistmodel.cpp index b6700329e..9eb1becdf 100644 --- a/src/blackgui/models/statusmessagelistmodel.cpp +++ b/src/blackgui/models/statusmessagelistmodel.cpp @@ -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 "statusmessagelistmodel.h" #include "blackmisc/icon.h" #include "blackmisc/blackmiscfreefunctions.h" diff --git a/src/blackgui/models/statusmessagelistmodel.h b/src/blackgui/models/statusmessagelistmodel.h index 855b1e8bc..9f27c65e7 100644 --- a/src/blackgui/models/statusmessagelistmodel.h +++ b/src/blackgui/models/statusmessagelistmodel.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_STATUSMESSAGELISTMODEL_H #define BLACKGUI_STATUSMESSAGELISTMODEL_H diff --git a/src/blackgui/models/userlistmodel.cpp b/src/blackgui/models/userlistmodel.cpp index 95fce09c5..f0ee0d6f5 100644 --- a/src/blackgui/models/userlistmodel.cpp +++ b/src/blackgui/models/userlistmodel.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/models/userlistmodel.h b/src/blackgui/models/userlistmodel.h index e10fd7205..ad51ea8d2 100644 --- a/src/blackgui/models/userlistmodel.h +++ b/src/blackgui/models/userlistmodel.h @@ -1,12 +1,14 @@ /* 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, + * 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_USERLISTMODEL_H #define BLACKGUI_USERLISTMODEL_H diff --git a/src/blackgui/selcalcodeselector.cpp b/src/blackgui/selcalcodeselector.cpp index f424ed381..d454b4cfd 100644 --- a/src/blackgui/selcalcodeselector.cpp +++ b/src/blackgui/selcalcodeselector.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/selcalcodeselector.h b/src/blackgui/selcalcodeselector.h index 783859e47..b8e106f6d 100644 --- a/src/blackgui/selcalcodeselector.h +++ b/src/blackgui/selcalcodeselector.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/stylesheetutility.cpp b/src/blackgui/stylesheetutility.cpp index ba2bfb50e..d3401abf9 100644 --- a/src/blackgui/stylesheetutility.cpp +++ b/src/blackgui/stylesheetutility.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/stylesheetutility.h b/src/blackgui/stylesheetutility.h index ffc09df8b..fd86de643 100644 --- a/src/blackgui/stylesheetutility.h +++ b/src/blackgui/stylesheetutility.h @@ -1,8 +1,8 @@ /* Copyright (C) 2014 - * 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, + * 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. */ diff --git a/src/blackgui/views/aircraftview.cpp b/src/blackgui/views/aircraftview.cpp index 56be7b103..b24877169 100644 --- a/src/blackgui/views/aircraftview.cpp +++ b/src/blackgui/views/aircraftview.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/aircraftview.h b/src/blackgui/views/aircraftview.h index a2ebdefcb..515bc9418 100644 --- a/src/blackgui/views/aircraftview.h +++ b/src/blackgui/views/aircraftview.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/airportview.cpp b/src/blackgui/views/airportview.cpp index 1b8acdc8d..8fade1778 100644 --- a/src/blackgui/views/airportview.cpp +++ b/src/blackgui/views/airportview.cpp @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/blackgui/views/airportview.h b/src/blackgui/views/airportview.h index 6465551a3..bcd6f650d 100644 --- a/src/blackgui/views/airportview.h +++ b/src/blackgui/views/airportview.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/atcstationview.cpp b/src/blackgui/views/atcstationview.cpp index 87b902556..462ec2309 100644 --- a/src/blackgui/views/atcstationview.cpp +++ b/src/blackgui/views/atcstationview.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/atcstationview.h b/src/blackgui/views/atcstationview.h index 5d12ccef0..a81676bcb 100644 --- a/src/blackgui/views/atcstationview.h +++ b/src/blackgui/views/atcstationview.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/clientview.cpp b/src/blackgui/views/clientview.cpp index b9df5cf11..43c5a78dc 100644 --- a/src/blackgui/views/clientview.cpp +++ b/src/blackgui/views/clientview.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/clientview.h b/src/blackgui/views/clientview.h index bc46de577..8fc17cbe9 100644 --- a/src/blackgui/views/clientview.h +++ b/src/blackgui/views/clientview.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/keyboardkeyview.cpp b/src/blackgui/views/keyboardkeyview.cpp index b64cf3fef..af70dae61 100644 --- a/src/blackgui/views/keyboardkeyview.cpp +++ b/src/blackgui/views/keyboardkeyview.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/keyboardkeyview.h b/src/blackgui/views/keyboardkeyview.h index ac61472de..0ac7b21f6 100644 --- a/src/blackgui/views/keyboardkeyview.h +++ b/src/blackgui/views/keyboardkeyview.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/namevariantpairview.cpp b/src/blackgui/views/namevariantpairview.cpp index 61fcbacf8..98d35fa92 100644 --- a/src/blackgui/views/namevariantpairview.cpp +++ b/src/blackgui/views/namevariantpairview.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/namevariantpairview.h b/src/blackgui/views/namevariantpairview.h index 916a0a337..01013d055 100644 --- a/src/blackgui/views/namevariantpairview.h +++ b/src/blackgui/views/namevariantpairview.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/serverview.cpp b/src/blackgui/views/serverview.cpp index 5f16e9f07..dd80227d0 100644 --- a/src/blackgui/views/serverview.cpp +++ b/src/blackgui/views/serverview.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/serverview.h b/src/blackgui/views/serverview.h index fbc51b01b..24f66c0d0 100644 --- a/src/blackgui/views/serverview.h +++ b/src/blackgui/views/serverview.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/statusmessageview.cpp b/src/blackgui/views/statusmessageview.cpp index 10b45ebe0..f5dd80fa9 100644 --- a/src/blackgui/views/statusmessageview.cpp +++ b/src/blackgui/views/statusmessageview.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/statusmessageview.h b/src/blackgui/views/statusmessageview.h index b5b0ed761..7b8e4055b 100644 --- a/src/blackgui/views/statusmessageview.h +++ b/src/blackgui/views/statusmessageview.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/userview.cpp b/src/blackgui/views/userview.cpp index 5243761db..2971f2dc6 100644 --- a/src/blackgui/views/userview.cpp +++ b/src/blackgui/views/userview.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/userview.h b/src/blackgui/views/userview.h index dc0702051..d3f7feec4 100644 --- a/src/blackgui/views/userview.h +++ b/src/blackgui/views/userview.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackgui/views/viewbase.h b/src/blackgui/views/viewbase.h index 696ddc79e..df8e85782 100644 --- a/src/blackgui/views/viewbase.h +++ b/src/blackgui/views/viewbase.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/audioallclasses.h b/src/blackmisc/audioallclasses.h index e1e07c9d9..22e8af2cf 100644 --- a/src/blackmisc/audioallclasses.h +++ b/src/blackmisc/audioallclasses.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. + */ #ifndef BLACKMISC_VOICEALLCLASSES_H #define BLACKMISC_VOICEALLCLASSES_H diff --git a/src/blackmisc/audiodevice.cpp b/src/blackmisc/audiodevice.cpp index ed6d4d34e..1ca4aff29 100644 --- a/src/blackmisc/audiodevice.cpp +++ b/src/blackmisc/audiodevice.cpp @@ -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 "audiodevice.h" #include "blackmisc/blackmiscfreefunctions.h" diff --git a/src/blackmisc/audiodevice.h b/src/blackmisc/audiodevice.h index 26aab2dd3..c40f51e16 100644 --- a/src/blackmisc/audiodevice.h +++ b/src/blackmisc/audiodevice.h @@ -1,15 +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_AUDIODEVICE_H #define BLACKMISC_AUDIODEVICE_H -/*! - \file -*/ - #include "blackmiscfreefunctions.h" #include "valueobject.h" #include @@ -27,7 +29,7 @@ namespace BlackMisc { public: - //! \brief Type + //! Type enum DeviceType : uint { InputDevice, @@ -63,10 +65,10 @@ namespace BlackMisc //! Valid audio device object? bool isValid() const { return m_deviceIndex >= -1 && !m_deviceName.isEmpty(); } - //! \brief Equal operator == + //! Equal operator == bool operator ==(const CAudioDevice &other) const; - //! \brief Unequal operator != + //! Unequal operator != bool operator !=(const CAudioDevice &other) const; //! \copydoc CValueObject::getValueHash @@ -84,19 +86,19 @@ namespace BlackMisc //! \copydoc TupleConverter<>::jsonMembers() static const QStringList &jsonMembers(); - //! \brief Device index for default device + //! Device index for default device static qint16 defaultDeviceIndex() {return -1;} - //! \brief Invalid device index + //! Invalid device index static qint16 invalidDeviceIndex() {return -2;} - //! \brief default output device + //! Default output device static CAudioDevice getDefaultOutputDevice() { return CAudioDevice(OutputDevice, defaultDeviceIndex(), "default"); } - //! \brief default input device + //! Default input device static CAudioDevice getDefaultInputDevice() { return CAudioDevice(InputDevice, defaultDeviceIndex(), "default"); @@ -124,16 +126,16 @@ namespace BlackMisc private: BLACK_ENABLE_TUPLE_CONVERSION(CAudioDevice) - //! \brief Device type, @see CAudioDevice::DeviceType + //! Device type, @see CAudioDevice::DeviceType DeviceType m_type; /*! * deviceIndex is the number is the reference for the VVL. The device is selected by this index. * The managing class needs to take care, that indexes are valid. */ qint16 m_deviceIndex; - //! \brief Device name + //! Device name QString m_deviceName; - //! \brief We use a DBus based system. Hence an audio device can reside on a differen computers, this here is its name + //! We use a DBus based system. Hence an audio device can reside on a differen computers, this here is its name QString m_hostName; }; diff --git a/src/blackmisc/audiodevicelist.cpp b/src/blackmisc/audiodevicelist.cpp index 71230684b..db4e6dcc6 100644 --- a/src/blackmisc/audiodevicelist.cpp +++ b/src/blackmisc/audiodevicelist.cpp @@ -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 "audiodevicelist.h" #include "predicates.h" diff --git a/src/blackmisc/audiodevicelist.h b/src/blackmisc/audiodevicelist.h index 526976e66..a8d2c46e0 100644 --- a/src/blackmisc/audiodevicelist.h +++ b/src/blackmisc/audiodevicelist.h @@ -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_AUDIODEVICELIST_H #define BLACKMISC_AUDIODEVICELIST_H diff --git a/src/blackmisc/avaircraft.cpp b/src/blackmisc/avaircraft.cpp index bb23575d7..676f7fdae 100644 --- a/src/blackmisc/avaircraft.cpp +++ b/src/blackmisc/avaircraft.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/avaircraft.h b/src/blackmisc/avaircraft.h index bc39eb172..13d5d47cb 100644 --- a/src/blackmisc/avaircraft.h +++ b/src/blackmisc/avaircraft.h @@ -1,17 +1,17 @@ /* 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, + * 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_AIRCRAFT_H #define BLACKMISC_AIRCRAFT_H -//! \file - #include "nwuser.h" #include "avaircraftsituation.h" #include "avaircrafticao.h" diff --git a/src/blackmisc/avaircrafticao.cpp b/src/blackmisc/avaircrafticao.cpp index df7992106..31ee9acbc 100644 --- a/src/blackmisc/avaircrafticao.cpp +++ b/src/blackmisc/avaircrafticao.cpp @@ -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 "avaircrafticao.h" #include "blackmisc/blackmiscfreefunctions.h" diff --git a/src/blackmisc/avaircrafticao.h b/src/blackmisc/avaircrafticao.h index de2bbe520..1a59bf99c 100644 --- a/src/blackmisc/avaircrafticao.h +++ b/src/blackmisc/avaircrafticao.h @@ -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_AIRCRAFTICAO_H #define BLACKMISC_AIRCRAFTICAO_H @@ -22,6 +24,17 @@ namespace BlackMisc class CAircraftIcao : public BlackMisc::CValueObject { public: + + //! Properties by index + enum ColumnIndex + { + IndexAircraftDesignator, + IndexCombinedAircraftType, + IndexAirlineDesignator, + IndexAircraftColor, + IndexAsString + }; + //! Default constructor. CAircraftIcao() {} @@ -137,24 +150,6 @@ namespace BlackMisc //! \copydoc CValueObject::fromJson virtual void fromJson(const QJsonObject &json) override; - //! Register metadata - static void registerMetadata(); - - //! Members - static const QStringList &jsonMembers(); - - /*! - * \brief Properties by index - */ - enum ColumnIndex - { - IndexAircraftDesignator = 2000, // used, so it can be chained in aircraft - IndexCombinedAircraftType, - IndexAirlineDesignator, - IndexAircraftColor, - IndexAsString - }; - //! \copydoc CValueObject::propertyByIndex virtual QVariant propertyByIndex(int index) const override; @@ -164,6 +159,12 @@ namespace BlackMisc //! \copydoc CValueObject::setPropertyByIndex(variant, index) virtual void setPropertyByIndex(const QVariant &variant, int index) override; + //! Register metadata + static void registerMetadata(); + + //! Members + static const QStringList &jsonMembers(); + //! Valid designator? static bool isValidDesignator(const QString &designator); @@ -188,11 +189,11 @@ namespace BlackMisc private: BLACK_ENABLE_TUPLE_CONVERSION(CAircraftIcao) - QString m_aircraftDesignator; //!< "B737" + QString m_aircraftDesignator; //!< "B737" QString m_aircraftCombinedType; //!< "L2J" - QString m_airlineDesignator; //!< "DLH" + QString m_airlineDesignator; //!< "DLH" QString m_livery; - QString m_aircraftColor; //!< RGB Hex "330044" + QString m_aircraftColor; //!< RGB Hex "330044" }; } // namespace } // namespace diff --git a/src/blackmisc/avaircraftlist.cpp b/src/blackmisc/avaircraftlist.cpp index 98337bf8b..4bc96a91f 100644 --- a/src/blackmisc/avaircraftlist.cpp +++ b/src/blackmisc/avaircraftlist.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/avaircraftlist.h b/src/blackmisc/avaircraftlist.h index fada6c5da..09120e0ab 100644 --- a/src/blackmisc/avaircraftlist.h +++ b/src/blackmisc/avaircraftlist.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/avaircraftsituation.cpp b/src/blackmisc/avaircraftsituation.cpp index 0973eb8b1..e7b2aaffc 100644 --- a/src/blackmisc/avaircraftsituation.cpp +++ b/src/blackmisc/avaircraftsituation.cpp @@ -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 "avaircraftsituation.h" #include "blackmisc/blackmiscfreefunctions.h" diff --git a/src/blackmisc/avaircraftsituation.h b/src/blackmisc/avaircraftsituation.h index 31a6d10dd..f0b90691d 100644 --- a/src/blackmisc/avaircraftsituation.h +++ b/src/blackmisc/avaircraftsituation.h @@ -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_AIRCRAFTSITUATION_H #define BLACKMISC_AIRCRAFTSITUATION_H @@ -65,10 +67,7 @@ namespace BlackMisc virtual void setPropertyByIndex(const QVariant &variant, int index) override; //! \copydoc CValueObject::toQVariant - virtual QVariant toQVariant() const override - { - return QVariant::fromValue(*this); - } + virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); } //! Get position const BlackMisc::Geo::CCoordinateGeodetic &getPosition() const { return this->m_position; } diff --git a/src/blackmisc/avaircraftsituationlist.h b/src/blackmisc/avaircraftsituationlist.h index 07da38eb1..8a1a0fc48 100644 --- a/src/blackmisc/avaircraftsituationlist.h +++ b/src/blackmisc/avaircraftsituationlist.h @@ -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_AVAIRCRAFTSITUATIONLIST_H #define BLACKMISC_AVAIRCRAFTSITUATIONLIST_H @@ -17,14 +15,14 @@ namespace BlackMisc { namespace Aviation { - //! \brief Value object encapsulating a list of aircraft situations + //! Value object encapsulating a list of aircraft situations class CAircraftSituationList : public CSequence { public: - //! \brief Default constructor. + //! Default constructor. CAircraftSituationList(); - //! \brief Construct from a base class object. + //! Construct from a base class object. CAircraftSituationList(const CSequence &other); //! \copydoc CValueObject::toQVariant() @@ -34,27 +32,27 @@ namespace BlackMisc } /*! - * \brief Get a list of situations before dateTime + * Get a list of situations before dateTime * \param dateTime * \return */ CAircraftSituationList findBefore (const QDateTime& dateTime) const; /*! - * \brief Get a list of situations after dateTime + * Get a list of situations after dateTime * \param dateTime * \return */ CAircraftSituationList findAfter (const QDateTime& dateTime) const; /*! - * \brief Remove situations with timestamp before dateTime + * Remove situations with timestamp before dateTime * \param dateTime */ void removeBefore(const QDateTime& dateTime); /*! - * \brief Remove situations older than seconds + * Remove situations older than seconds * \param seconds */ void removeOlderThan(double seconds); diff --git a/src/blackmisc/avairport.cpp b/src/blackmisc/avairport.cpp index bdd41d964..185a6deef 100644 --- a/src/blackmisc/avairport.cpp +++ b/src/blackmisc/avairport.cpp @@ -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 "avairport.h" #include "blackmiscfreefunctions.h" diff --git a/src/blackmisc/avairport.h b/src/blackmisc/avairport.h index 50076d509..a101fd3ab 100644 --- a/src/blackmisc/avairport.h +++ b/src/blackmisc/avairport.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. + */ //! \file diff --git a/src/blackmisc/avairporticao.h b/src/blackmisc/avairporticao.h index b4e37c9bb..82d08ca5f 100644 --- a/src/blackmisc/avairporticao.h +++ b/src/blackmisc/avairporticao.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_AIRPORTICAO_H #define BLACKMISC_AIRPORTICAO_H @@ -11,7 +17,7 @@ namespace BlackMisc { namespace Aviation { - //! \brief Value object encapsulating information of a callsign. + //! Value object encapsulating information of a callsign. class CAirportIcao : public BlackMisc::CValueObject { diff --git a/src/blackmisc/avaltitude.cpp b/src/blackmisc/avaltitude.cpp index f06731376..76433c8d8 100644 --- a/src/blackmisc/avaltitude.cpp +++ b/src/blackmisc/avaltitude.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/avaltitude.h b/src/blackmisc/avaltitude.h index 936850fab..44021b056 100644 --- a/src/blackmisc/avaltitude.h +++ b/src/blackmisc/avaltitude.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/avatcstation.cpp b/src/blackmisc/avatcstation.cpp index 904efeb8b..4f8831f2b 100644 --- a/src/blackmisc/avatcstation.cpp +++ b/src/blackmisc/avatcstation.cpp @@ -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 "avatcstation.h" #include "aviocomsystem.h" #include "voiceroom.h" diff --git a/src/blackmisc/avatcstation.h b/src/blackmisc/avatcstation.h index ed3d1bb75..76547bb1a 100644 --- a/src/blackmisc/avatcstation.h +++ b/src/blackmisc/avatcstation.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. + */ //! \file diff --git a/src/blackmisc/avcallsign.cpp b/src/blackmisc/avcallsign.cpp index a0e17b017..27ac293b2 100644 --- a/src/blackmisc/avcallsign.cpp +++ b/src/blackmisc/avcallsign.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/avcallsign.h b/src/blackmisc/avcallsign.h index bfa84817a..96e24165e 100644 --- a/src/blackmisc/avcallsign.h +++ b/src/blackmisc/avcallsign.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/avcallsignlist.cpp b/src/blackmisc/avcallsignlist.cpp index 33f025a33..6233725d3 100644 --- a/src/blackmisc/avcallsignlist.cpp +++ b/src/blackmisc/avcallsignlist.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/avcallsignlist.h b/src/blackmisc/avcallsignlist.h index b9402e53d..808221fa9 100644 --- a/src/blackmisc/avcallsignlist.h +++ b/src/blackmisc/avcallsignlist.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ @@ -22,7 +22,7 @@ namespace BlackMisc namespace Aviation { /*! - * Value object encapsulating a list of callsign. + * Value object encapsulating a list of callsigns. */ class CCallsignList : public CSequence { diff --git a/src/blackmisc/avflightplan.cpp b/src/blackmisc/avflightplan.cpp index ba065183c..37f3972bc 100644 --- a/src/blackmisc/avflightplan.cpp +++ b/src/blackmisc/avflightplan.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/avflightplan.h b/src/blackmisc/avflightplan.h index 5eef242d1..67e6a60f7 100644 --- a/src/blackmisc/avflightplan.h +++ b/src/blackmisc/avflightplan.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/avheading.cpp b/src/blackmisc/avheading.cpp index 7e12a9d93..fa0683771 100644 --- a/src/blackmisc/avheading.cpp +++ b/src/blackmisc/avheading.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/avheading.h b/src/blackmisc/avheading.h index 3de99fef7..ba5a40d17 100644 --- a/src/blackmisc/avheading.h +++ b/src/blackmisc/avheading.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/avinformationmessage.cpp b/src/blackmisc/avinformationmessage.cpp index 85d33a7b3..1aa3bb271 100644 --- a/src/blackmisc/avinformationmessage.cpp +++ b/src/blackmisc/avinformationmessage.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/avinformationmessage.h b/src/blackmisc/avinformationmessage.h index c3bb3eb87..f8124ad53 100644 --- a/src/blackmisc/avinformationmessage.h +++ b/src/blackmisc/avinformationmessage.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/avioadfsystem.h b/src/blackmisc/avioadfsystem.h index 4651177d6..99411a0b5 100644 --- a/src/blackmisc/avioadfsystem.h +++ b/src/blackmisc/avioadfsystem.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_AVIOADFSYSTEM_H #define BLACKMISC_AVIOADFSYSTEM_H @@ -15,41 +21,69 @@ namespace BlackMisc { /*! - * \brief ADF system ("for NDBs") + * ADF system ("for NDBs") */ class CAdfSystem : public CModulator { - private: - /*! - * \brief Valid civil aviation frequency? - * \param f - * \return - */ + + public: + //! Default constructor + CAdfSystem() : CModulator() {} + + //! Constructor + CAdfSystem(const QString &name, const PhysicalQuantities::CFrequency &activeFrequency, const PhysicalQuantities::CFrequency &standbyFrequency = CModulator::FrequencyNotSet(), int digits = 3): + CModulator(name, activeFrequency, standbyFrequency == CModulator::FrequencyNotSet() ? activeFrequency : standbyFrequency, digits) + { } + + //! \copydoc CValueObject::toQVariant + virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); } + + //! Valid aviation frequency? bool isValidFrequency(PhysicalQuantities::CFrequency f) const { double fr = f.valueRounded(PhysicalQuantities::CFrequencyUnit::kHz(), this->m_digits); return fr >= 190.0 && fr <= 1750.0; } - /*! - * \brief Constructor - * \param validate - * \param name - * \param activeFrequency - * \param standbyFrequency - * \param digits - * - */ - CAdfSystem(bool validate, const QString &name, const PhysicalQuantities::CFrequency &activeFrequency, const PhysicalQuantities::CFrequency &standbyFrequency, int digits = 3): - CModulator(name, activeFrequency, standbyFrequency, digits) + //! Equal operator == + bool operator ==(const CAdfSystem &otherSystem) const { - this->validate(validate); + return this->CModulator::operator ==(otherSystem); + } + + //! Equal operator != + bool operator !=(const CAdfSystem &otherSystem) const + { + return this->CModulator::operator !=(otherSystem); + } + + + //! ADF1 unit + static CAdfSystem GetAdf1System(double activeFrequencyKHz, double standbyFrequencyKHz = -1) + { + return CAdfSystem(CModulator::NameCom1(), PhysicalQuantities::CFrequency(activeFrequencyKHz, PhysicalQuantities::CFrequencyUnit::MHz()), PhysicalQuantities::CFrequency(standbyFrequencyKHz < 0 ? activeFrequencyKHz : standbyFrequencyKHz, PhysicalQuantities::CFrequencyUnit::MHz())); + } + + //! ADF1 unit + static CAdfSystem GetAdf1System(PhysicalQuantities::CFrequency activeFrequency, PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) + { + return CAdfSystem(CModulator::NameCom1(), activeFrequency, standbyFrequency == CModulator::FrequencyNotSet() ? activeFrequency : standbyFrequency); + } + + //! ADF2 unit + static CAdfSystem GetAdf2System(double activeFrequencyKHz, double standbyFrequencyKHz = -1) + { + return CAdfSystem(CModulator::NameCom2(), PhysicalQuantities::CFrequency(activeFrequencyKHz, PhysicalQuantities::CFrequencyUnit::MHz()), PhysicalQuantities::CFrequency(standbyFrequencyKHz < 0 ? activeFrequencyKHz : standbyFrequencyKHz, PhysicalQuantities::CFrequencyUnit::MHz())); + } + + //! ADF2 unit + static CAdfSystem GetAdf2System(PhysicalQuantities::CFrequency activeFrequency, PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) + { + return CAdfSystem(CModulator::NameCom2(), activeFrequency, standbyFrequency == CModulator::FrequencyNotSet() ? activeFrequency : standbyFrequency); } protected: - /*! - * \copydoc CAvionicsBase::validValues - */ + //! \copydoc CAvionicsBase::validValues virtual bool validValues() const override { if (this->isDefaultValue()) return true; // special case @@ -58,221 +92,6 @@ namespace BlackMisc this->isValidFrequency(this->getFrequencyStandby()); } - /*! - * \brief Validate values by assert and exception - * \param strict - * \throws std::range_error - * \remarks Cannot be virtualsince already used in constructor - * \return - */ - bool validate(bool strict = true) const - { - if (this->isDefaultValue()) return true; - bool valid = this->validValues(); - if (!strict) return valid; - Q_ASSERT_X(valid, "CAdfSystem::validate", "illegal values"); - if (!valid) throw std::range_error("Illegal values in CAdfSystem::validate"); - return true; - } - - public: - /*! - * Default constructor - */ - CAdfSystem() : CModulator() {} - - /*! - * \brief Copy constructor - * \param other - */ - CAdfSystem(const CAdfSystem &other) : CModulator(other) {} - - /*! - * \brief Constructor - * \param name - * \param activeFrequency - * \param standbyFrequency - * \param digits - */ - CAdfSystem(const QString &name, const PhysicalQuantities::CFrequency &activeFrequency, const PhysicalQuantities::CFrequency &standbyFrequency = CModulator::FrequencyNotSet(), int digits = 3): - CModulator(name, activeFrequency, standbyFrequency == CModulator::FrequencyNotSet() ? activeFrequency : standbyFrequency, digits) - { - this->validate(true); - } - - /*! - * \copydoc CValueObject::toQVariant - */ - virtual QVariant toQVariant() const override - { - return QVariant::fromValue(*this); - } - - /*! - * \brief Set active frequency - * \param frequencyKHz - */ - void setFrequencyActiveKHz(double frequencyKHz) - { - this->CModulator::setFrequencyActiveKHz(frequencyKHz); - this->validate(true); - } - - /*! - * \brief Set standby frequency - * \param frequencyKHz - */ - void setFrequencyStandbyKHz(double frequencyKHz) - { - this->CModulator::setFrequencyStandbyKHz(frequencyKHz); - this->validate(true); - } - - /*! - * \brief operator == - * \param otherSystem - * \return - */ - bool operator ==(const CAdfSystem &otherSystem) const - { - return this->CModulator::operator ==(otherSystem); - } - - /*! - * \brief operator == - * \param otherSystem - * \return - */ - bool operator !=(const CAdfSystem &otherSystem) const - { - return this->CModulator::operator !=(otherSystem); - } - - /*! - * Try to get a ADF unit with given name and frequency. Returns true in case an object - * has been sucessfully created, otherwise returns a default object and false. - * \param[out] o_adfSystem - * \param name - * \param activeFrequencyKHz - * \param standbyFrequencyKHz - * \return - */ - static bool tryGetAdfSystem(CAdfSystem &o_adfSystem, const QString &name, double activeFrequencyKHz, double standbyFrequencyKHz = -1) - { - o_adfSystem = CAdfSystem(false, name, PhysicalQuantities::CFrequency(activeFrequencyKHz, PhysicalQuantities::CFrequencyUnit::MHz()), PhysicalQuantities::CFrequency(standbyFrequencyKHz < 0 ? activeFrequencyKHz : standbyFrequencyKHz, PhysicalQuantities::CFrequencyUnit::MHz())); - bool s; - if (!(s = o_adfSystem.validate(false))) o_adfSystem = CAdfSystem(); // reset to default - return s; - } - - /*! - * Try to get a ADF unit with given name and frequency. Returns true in case an object - * has been sucessfully created, otherwise returns a default object. - * \param[out] o_adfSystem - * \param name - * \param activeFrequency - * \param standbyFrequency - * \return - */ - static bool tryGetAdfSystem(CAdfSystem &o_adfSystem, const QString &name, PhysicalQuantities::CFrequency activeFrequency, PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) - { - o_adfSystem = CAdfSystem(false, name, activeFrequency, standbyFrequency); - bool s; - if (!(s = o_adfSystem.validate(false))) o_adfSystem = CAdfSystem(); // reset to default - return s; - } - - /*! - * \brief ADF1 unit - * \param activeFrequencyKHz - * \param standbyFrequencyKHz - * \return - */ - static CAdfSystem GetAdf1System(double activeFrequencyKHz, double standbyFrequencyKHz = -1) - { - return CAdfSystem(CModulator::NameCom1(), PhysicalQuantities::CFrequency(activeFrequencyKHz, PhysicalQuantities::CFrequencyUnit::MHz()), PhysicalQuantities::CFrequency(standbyFrequencyKHz < 0 ? activeFrequencyKHz : standbyFrequencyKHz, PhysicalQuantities::CFrequencyUnit::MHz())); - } - - /*! - * \brief ADF1 unit - * \param activeFrequency - * \param standbyFrequency - * \return - */ - static CAdfSystem GetAdf1System(PhysicalQuantities::CFrequency activeFrequency, PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) - { - return CAdfSystem(CModulator::NameCom1(), activeFrequency, standbyFrequency == CModulator::FrequencyNotSet() ? activeFrequency : standbyFrequency); - } - - /*! - * \brief Try to get ADF unit - * \param[out] o_adfSystem - * \param activeFrequencyKHz - * \param standbyFrequencyKHz - * \return - */ - static bool tryGetAdf1Unit(CAdfSystem &o_adfSystem, double activeFrequencyKHz, double standbyFrequencyKHz = -1) - { - return CAdfSystem::tryGetAdfSystem(o_adfSystem, CModulator::NameCom1(), activeFrequencyKHz, standbyFrequencyKHz); - } - - /*! - * \brief Try to get ADF unit - * \param[out] o_adfSystem - * \param activeFrequency - * \param standbyFrequency - * \return - */ - static bool tryGetAdf1Unit(CAdfSystem &o_adfSystem, PhysicalQuantities::CFrequency activeFrequency, PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) - { - return CAdfSystem::tryGetAdfSystem(o_adfSystem, CModulator::NameCom1(), activeFrequency, standbyFrequency); - } - - /*! - * \brief ADF2 unit - * \param activeFrequencyKHz - * \param standbyFrequencyKHz - * \return - */ - static CAdfSystem GetAdf2System(double activeFrequencyKHz, double standbyFrequencyKHz = -1) - { - return CAdfSystem(CModulator::NameCom2(), PhysicalQuantities::CFrequency(activeFrequencyKHz, PhysicalQuantities::CFrequencyUnit::MHz()), PhysicalQuantities::CFrequency(standbyFrequencyKHz < 0 ? activeFrequencyKHz : standbyFrequencyKHz, PhysicalQuantities::CFrequencyUnit::MHz())); - } - - /*! - * \brief ADF2 unit - * \param activeFrequency - * \param standbyFrequency - * \return - */ - static CAdfSystem GetAdf2System(PhysicalQuantities::CFrequency activeFrequency, PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) - { - return CAdfSystem(CModulator::NameCom2(), activeFrequency, standbyFrequency == CModulator::FrequencyNotSet() ? activeFrequency : standbyFrequency); - } - - /*! - * \brief Try to get ADF unit - * \param[out] o_adfSystem - * \param activeFrequencyKHz - * \param standbyFrequencyKHz - * \return - */ - static bool tryGetAdf2System(CAdfSystem &o_adfSystem, double activeFrequencyKHz, double standbyFrequencyKHz = -1) - { - return CAdfSystem::tryGetAdfSystem(o_adfSystem, CModulator::NameCom2(), activeFrequencyKHz, standbyFrequencyKHz); - } - - /*! - * \brief Try to get ADF unit - * \param[out] o_adfSystem - * \param activeFrequency - * \param standbyFrequency - * \return - */ - static bool tryGetAdf2System(CAdfSystem &o_adfSystem, PhysicalQuantities::CFrequency activeFrequency, PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) - { - return CAdfSystem::tryGetAdfSystem(o_adfSystem, CModulator::NameCom2(), activeFrequency, standbyFrequency); - } }; } // namespace diff --git a/src/blackmisc/aviocomsystem.cpp b/src/blackmisc/aviocomsystem.cpp index 045afad0c..fbaa89fe0 100644 --- a/src/blackmisc/aviocomsystem.cpp +++ b/src/blackmisc/aviocomsystem.cpp @@ -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/blackmiscfreefunctions.h" #include "blackmisc/aviocomsystem.h" diff --git a/src/blackmisc/aviocomsystem.h b/src/blackmisc/aviocomsystem.h index 6a24d94fd..0c9b61d49 100644 --- a/src/blackmisc/aviocomsystem.h +++ b/src/blackmisc/aviocomsystem.h @@ -1,26 +1,29 @@ -/* 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_AVIOCOMSYSTEM_H #define BLACKMISC_AVIOCOMSYSTEM_H #include "blackmisc/aviomodulator.h" -#include namespace BlackMisc { namespace Aviation { /*! - * \brief COM system (aka "radio") + * COM system (aka "radio") */ class CComSystem : public CModulator { public: - /*! - * Channel spacing frequency - */ + //! Channel spacing frequency enum ChannelSpacing { ChannelSpacing50KHz, @@ -28,34 +31,10 @@ namespace BlackMisc ChannelSpacing8_33KHz }; - private: - BLACK_ENABLE_TUPLE_CONVERSION(CComSystem) - ChannelSpacing m_channelSpacing; - - /*! - * \brief Give me channel spacing in KHz - * \remarks Just a helper method, that is why no CFrequency is returned - */ - static double channelSpacingToFrequencyKHz(ChannelSpacing channelSpacing); - - protected: - //! \copydoc CAvionicsBase::validValues - virtual bool validValues() const override; - - //! \copydoc CValueObject::marshallFromDbus() - virtual void marshallToDbus(QDBusArgument &argument) const override; - - //! \copydoc CValueObject::unmarshallFromDbus() - virtual void unmarshallFromDbus(const QDBusArgument &argument) override; - - //! \copydoc CValueObject::compareImpl - virtual int compareImpl(const CValueObject &other) const override; - - public: - //! \brief Default constructor + //! Default constructor CComSystem() : CModulator(), m_channelSpacing(ChannelSpacing25KHz) {} - //! \brief Constructor + //! Constructor CComSystem(const QString &name, const BlackMisc::PhysicalQuantities::CFrequency &activeFrequency, const BlackMisc::PhysicalQuantities::CFrequency &standbyFrequency = CModulator::FrequencyNotSet(), int digits = 3): CModulator(name, activeFrequency, standbyFrequency == CModulator::FrequencyNotSet() ? activeFrequency : standbyFrequency, digits), m_channelSpacing(ChannelSpacing25KHz) { } @@ -63,34 +42,34 @@ namespace BlackMisc //! \copydoc CValueObject::toQVariant virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); } - //! \brief Set active frequency + //! Set active frequency //! \remarks will be rounded to channel spacing void setFrequencyActiveMHz(double frequencyMHz); - //! \brief Set standby frequency + //! Set standby frequency //! \remarks will be rounded to channel spacing void setFrequencyStandbyMHz(double frequencyMHz); - //! \brief Is active frequency within 8.3383kHz channel? + //! Is active frequency within 8.3383kHz channel? bool isActiveFrequencyWithin8_33kHzChannel(const BlackMisc::PhysicalQuantities::CFrequency &comFrequency) const { return CComSystem::isWithinChannelSpacing(this->getFrequencyActive(), comFrequency, ChannelSpacing8_33KHz); } - //! \brief Is active frequency within 25kHz channel? + //! Is active frequency within 25kHz channel? bool isActiveFrequencyWithin25kHzChannel(const BlackMisc::PhysicalQuantities::CFrequency &comFrequency) const { return CComSystem::isWithinChannelSpacing(this->getFrequencyActive(), comFrequency, ChannelSpacing25KHz); } - //! \brief Set UNICOM frequency as active + //! Set UNICOM frequency as active void setActiveUnicom() { this->toggleActiveStandby(); this->setFrequencyActive(BlackMisc::PhysicalQuantities::CPhysicalQuantitiesConstants::FrequencyUnicom()); } - //! \brief Set International Air Distress 121.5MHz + //! Set International Air Distress 121.5MHz void setActiveInternationalAirDistress() { this->toggleActiveStandby(); @@ -106,59 +85,59 @@ namespace BlackMisc //! \copydoc CValueObject::fromJson virtual void fromJson(const QJsonObject &json) override; - //! \brief Members + //! Members static const QStringList &jsonMembers(); - //! \brief operator == + //! operator == bool operator ==(const CComSystem &other) const; - //! \brief operator != + //! operator != bool operator !=(const CComSystem &other) const; - //! \brief COM1 unit + //! COM1 unit static CComSystem getCom1System(double activeFrequencyMHz, double standbyFrequencyMHz = -1) { return CComSystem(CModulator::NameCom1(), BlackMisc::PhysicalQuantities::CFrequency(activeFrequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz()), BlackMisc::PhysicalQuantities::CFrequency(standbyFrequencyMHz < 0 ? activeFrequencyMHz : standbyFrequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz())); } - //! \brief COM1 unit + //! COM1 unit static CComSystem getCom1System(BlackMisc::PhysicalQuantities::CFrequency activeFrequency, BlackMisc::PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) { return CComSystem(CModulator::NameCom1(), activeFrequency, standbyFrequency == CModulator::FrequencyNotSet() ? activeFrequency : standbyFrequency); } - //! \brief COM2 unit + //! COM2 unit static CComSystem getCom2System(double activeFrequencyMHz, double standbyFrequencyMHz = -1) { return CComSystem(CModulator::NameCom2(), BlackMisc::PhysicalQuantities::CFrequency(activeFrequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz()), BlackMisc::PhysicalQuantities::CFrequency(standbyFrequencyMHz < 0 ? activeFrequencyMHz : standbyFrequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz())); } - //! \brief COM2 unit + //! COM2 unit static CComSystem getCom2System(BlackMisc::PhysicalQuantities::CFrequency activeFrequency, BlackMisc::PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) { return CComSystem(CModulator::NameCom2(), activeFrequency, standbyFrequency == CModulator::FrequencyNotSet() ? activeFrequency : standbyFrequency); } - //! \brief COM3 unit + //! COM3 unit static CComSystem getCom3System(double activeFrequencyMHz, double standbyFrequencyMHz = -1) { return CComSystem(CModulator::NameCom3(), BlackMisc::PhysicalQuantities::CFrequency(activeFrequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz()), BlackMisc::PhysicalQuantities::CFrequency(standbyFrequencyMHz < 0 ? activeFrequencyMHz : standbyFrequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz())); } - //! \brief COM3 unit + //! COM3 unit static CComSystem getCom3System(BlackMisc::PhysicalQuantities::CFrequency activeFrequency, BlackMisc::PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) { return CComSystem(CModulator::NameCom3(), activeFrequency, standbyFrequency == CModulator::FrequencyNotSet() ? activeFrequency : standbyFrequency); } - //! \brief Valid civil aviation frequency? + //! Valid civil aviation frequency? static bool isValidCivilAviationFrequency(const BlackMisc::PhysicalQuantities::CFrequency &f) { double fr = f.valueRounded(BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz(), 3); return fr >= 118.0 && fr <= 136.975; } - //! \brief Valid military aviation frequency? + //! Valid military aviation frequency? static bool isValidMilitaryFrequency(const BlackMisc::PhysicalQuantities::CFrequency &f) { double fr = f.valueRounded(BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz(), 3); @@ -166,14 +145,37 @@ namespace BlackMisc } /*! - * \brief Round to channel spacing, set MHz as unit + * Round to channel spacing, set MHz as unit * \see ChannelSpacing */ static void roundToChannelSpacing(BlackMisc::PhysicalQuantities::CFrequency &frequency, ChannelSpacing channelSpacing); - //! \brief Is compareFrequency within channel spacing of setFrequency + //! Is compareFrequency within channel spacing of setFrequency static bool isWithinChannelSpacing(const BlackMisc::PhysicalQuantities::CFrequency &setFrequency, const BlackMisc::PhysicalQuantities::CFrequency &compareFrequency, ChannelSpacing channelSpacing); + protected: + //! \copydoc CAvionicsBase::validValues + virtual bool validValues() const override; + + //! \copydoc CValueObject::marshallFromDbus() + virtual void marshallToDbus(QDBusArgument &argument) const override; + + //! \copydoc CValueObject::unmarshallFromDbus() + virtual void unmarshallFromDbus(const QDBusArgument &argument) override; + + //! \copydoc CValueObject::compareImpl + virtual int compareImpl(const CValueObject &other) const override; + + private: + BLACK_ENABLE_TUPLE_CONVERSION(CComSystem) + ChannelSpacing m_channelSpacing; + + /*! + * Give me channel spacing in KHz + * \remarks Just a helper method, that is why no CFrequency is returned + */ + static double channelSpacingToFrequencyKHz(ChannelSpacing channelSpacing); + }; } // namespace } // namespace diff --git a/src/blackmisc/aviomodulator.cpp b/src/blackmisc/aviomodulator.cpp index 218361ed3..1c6b8de42 100644 --- a/src/blackmisc/aviomodulator.cpp +++ b/src/blackmisc/aviomodulator.cpp @@ -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/aviomodulator.h" #include "blackmisc/aviocomsystem.h" diff --git a/src/blackmisc/aviomodulator.h b/src/blackmisc/aviomodulator.h index bb7503f36..b2b43bdc4 100644 --- a/src/blackmisc/aviomodulator.h +++ b/src/blackmisc/aviomodulator.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_AVIOMODULATORUNIT_H #define BLACKMISC_AVIOMODULATORUNIT_H @@ -18,27 +24,86 @@ namespace BlackMisc { /*! - * \brief Base class for COM, NAV, Squawk units. + * Base class for COM, NAV, Squawk units. */ template class CModulator : public CAvionicsBase { - private: - BLACK_ENABLE_TUPLE_CONVERSION(CModulator) - BlackMisc::PhysicalQuantities::CFrequency m_frequencyActive; //!< active frequency - BlackMisc::PhysicalQuantities::CFrequency m_frequencyStandby; //!< standby frequency - qint32 m_volumeInput; //!< volume input - qint32 m_volumeOutput; //!< volume output - bool m_enabled; //!< is enabled, used e.g. for mute etc. + + public: + //! Virtual destructor + virtual ~CModulator() {} + + //! Default value? + virtual bool isDefaultValue() const + { + return this->m_frequencyActive == CModulator::FrequencyNotSet(); + } + + //! Toggle active and standby frequencies + void toggleActiveStandby(); + + //! Active frequency + BlackMisc::PhysicalQuantities::CFrequency getFrequencyActive() const + { + return this->m_frequencyActive; + } + + //! Standby frequency + BlackMisc::PhysicalQuantities::CFrequency getFrequencyStandby() const + { + return this->m_frequencyStandby; + } + + //! Set active frequency + void setFrequencyActive(const BlackMisc::PhysicalQuantities::CFrequency &frequency) + { + this->m_frequencyActive = frequency; + } + + //! Set standby frequency + void setFrequencyStandby(const BlackMisc::PhysicalQuantities::CFrequency &frequency) + { + this->m_frequencyStandby = frequency; + } + + //! Output volume + qint32 getVolumeOutput() const { return this->m_volumeOutput; } + + //! Input volume + qint32 getVolumeInput() const { return this->m_volumeInput; } + + //! Output volume + void setVolumeOutput(qint32 volume) { this->m_volumeOutput = volume; } + + //! Input volume + void setVolumeInput(qint32 volume) { this->m_volumeInput = volume; } + + //! Enabled? + bool isEnabled() const { return this->m_enabled;} + + //! Enabled? + void setEnabled(bool enable) { this->m_enabled = enable;} + + //! \copydoc CValueObject::toJson + virtual QJsonObject toJson() const override; + + //! \copydoc CValueObject::fromJson + virtual void fromJson(const QJsonObject &json) override; + + //! Register metadata + static void registerMetadata(); + + //! Members + static const QStringList &jsonMembers(); protected: int m_digits; //!< digits used - protected: - //! \brief Default constructor + //! Default constructor CModulator() : CAvionicsBase("default"), m_volumeInput(0), m_volumeOutput(0), m_enabled(true), m_digits(2) {} - //! \brief Constructor + //! Constructor CModulator(const QString &name, const BlackMisc::PhysicalQuantities::CFrequency &activeFrequency, const BlackMisc::PhysicalQuantities::CFrequency &standbyFrequency, int digits) : CAvionicsBase(name), m_frequencyActive(activeFrequency), m_frequencyStandby(standbyFrequency), m_volumeInput(0), m_volumeOutput(0), m_enabled(true), m_digits(digits) {} @@ -51,98 +116,98 @@ namespace BlackMisc return s; } - //! \brief Set active frequency + //! Set active frequency void setFrequencyActiveKHz(double frequencyKHz) { this->m_frequencyActive = BlackMisc::PhysicalQuantities::CFrequency(frequencyKHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::kHz()); } - //! \brief Set standby frequency + //! Set standby frequency void setFrequencyStandbyKHz(double frequencyKHz) { this->m_frequencyStandby = BlackMisc::PhysicalQuantities::CFrequency(frequencyKHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::kHz()); } - //! \brief Set active frequency + //! Set active frequency void setFrequencyActiveMHz(double frequencyMHz) { frequencyMHz = CMath::round(frequencyMHz, 3); this->m_frequencyActive = BlackMisc::PhysicalQuantities::CFrequency(frequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz()); } - //! \brief Set standby frequency + //! Set standby frequency void setFrequencyStandbyMHz(double frequencyMHz) { frequencyMHz = CMath::round(frequencyMHz, 3); this->m_frequencyStandby = BlackMisc::PhysicalQuantities::CFrequency(frequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz()); } - //! \brief operator == + //! operator == bool operator ==(const CModulator &other) const; - //! \brief operator != + //! operator != bool operator !=(const CModulator &other) const; //! \copydoc CValueObject::compareImpl(otherBase) virtual int compareImpl(const CValueObject &otherBase) const override; - //! \brief COM1 + //! COM1 static const QString &NameCom1() { static QString n("COM1"); return n; } - //! \brief COM2 + //! COM2 static const QString &NameCom2() { static QString n("COM2"); return n; } - //! \brief COM3 + //! COM3 static const QString &NameCom3() { static QString n("COM3"); return n; } - //! \brief NAV1 + //! NAV1 static const QString &NameNav1() { static QString n("NAV1"); return n; } - //! \brief NAV2 + //! NAV2 static const QString &NameNav2() { static QString n("NAV2"); return n; } - //! \brief NAV3 + //! NAV3 static const QString &NameNav3() { static QString n("NAV3"); return n; } - //! \brief ADF1 + //! ADF1 static const QString &NameAdf1() { static QString n("ADF1"); return n; } - //! \brief ADF2 + //! ADF2 static const QString &NameAdf2() { static QString n("ADF2"); return n; } - //! \brief Frequency not set + //! Frequency not set static const BlackMisc::PhysicalQuantities::CFrequency &FrequencyNotSet() { static BlackMisc::PhysicalQuantities::CFrequency f; @@ -158,72 +223,14 @@ namespace BlackMisc //! \copydoc CValueObject::getValueHash() virtual uint getValueHash() const override; - public: - //! \brief Virtual destructor - virtual ~CModulator() {} + private: + BLACK_ENABLE_TUPLE_CONVERSION(CModulator) + BlackMisc::PhysicalQuantities::CFrequency m_frequencyActive; //!< active frequency + BlackMisc::PhysicalQuantities::CFrequency m_frequencyStandby; //!< standby frequency + qint32 m_volumeInput; //!< volume input + qint32 m_volumeOutput; //!< volume output + bool m_enabled; //!< is enabled, used e.g. for mute etc. - //! \brief Default value? - virtual bool isDefaultValue() const - { - return this->m_frequencyActive == CModulator::FrequencyNotSet(); - } - - //! \brief Toggle active and standby frequencies - void toggleActiveStandby(); - - //! \brief Active frequency - BlackMisc::PhysicalQuantities::CFrequency getFrequencyActive() const - { - return this->m_frequencyActive; - } - - //! \brief Standby frequency - BlackMisc::PhysicalQuantities::CFrequency getFrequencyStandby() const - { - return this->m_frequencyStandby; - } - - //! \brief Set active frequency - void setFrequencyActive(const BlackMisc::PhysicalQuantities::CFrequency &frequency) - { - this->m_frequencyActive = frequency; - } - - //! \brief Set standby frequency - void setFrequencyStandby(const BlackMisc::PhysicalQuantities::CFrequency &frequency) - { - this->m_frequencyStandby = frequency; - } - - //! \brief Output volume - qint32 getVolumeOutput() const { return this->m_volumeOutput; } - - //! \brief Input volume - qint32 getVolumeInput() const { return this->m_volumeInput; } - - //! \brief Output volume - void setVolumeOutput(qint32 volume) { this->m_volumeOutput = volume; } - - //! \brief Input volume - void setVolumeInput(qint32 volume) { this->m_volumeInput = volume; } - - //! \brief Enabled? - bool isEnabled() const { return this->m_enabled;} - - //! \brief Enabled? - void setEnabled(bool enable) { this->m_enabled = enable;} - - //! \copydoc CValueObject::toJson - virtual QJsonObject toJson() const override; - - //! \copydoc CValueObject::fromJson - virtual void fromJson(const QJsonObject &json) override; - - //! \brief Register metadata - static void registerMetadata(); - - //! \brief Members - static const QStringList &jsonMembers(); }; } // namespace diff --git a/src/blackmisc/avionavsystem.h b/src/blackmisc/avionavsystem.h index 30be110b5..e267f570b 100644 --- a/src/blackmisc/avionavsystem.h +++ b/src/blackmisc/avionavsystem.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_AVIONAVSYSTEM_H #define BLACKMISC_AVIONAVSYSTEM_H @@ -11,53 +17,86 @@ namespace BlackMisc { namespace Aviation { - - /*! - * \brief NAV system (radio navigation) - */ + //! NAV system (radio navigation) class CNavSystem : public CModulator { - private: - /*! - * \brief Valid civil aviation frequency? - * \param f - * \return - */ + + public: + //! Default constructor + CNavSystem() : CModulator() {} + + //! Constructor + CNavSystem(const QString &name, const BlackMisc::PhysicalQuantities::CFrequency &activeFrequency, const BlackMisc::PhysicalQuantities::CFrequency &standbyFrequency, int digits = 3): + CModulator(name, activeFrequency, standbyFrequency, digits) + { } + + //! \copydoc CValueObject::toQVariant + virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); } + + //! Set active frequency + void setFrequencyActiveMHz(double frequencyMHz) + { + this->CModulator::setFrequencyActiveMHz(frequencyMHz); + } + + //! Set standby frequency + void setFrequencyStandbyMHz(double frequencyMHz) + { + this->CModulator::setFrequencyStandbyMHz(frequencyMHz); + } + + //! Equal operator == + bool operator ==(const CNavSystem &other) const + { + return this->CModulator::operator ==(other); + } + + //! Unequal operator != + bool operator !=(const CNavSystem &other) const + { + return this->CModulator::operator !=(other); + } + + //! Valid civil aviation frequency? bool isValidCivilNavigationFrequency(BlackMisc::PhysicalQuantities::CFrequency f) const { double fr = f.valueRounded(BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz(), this->m_digits); return fr >= 108.0 && fr <= 117.95; } - /*! - * \brief Valid military aviation frequency? - * \param f - * \return - */ + //! Valid military aviation frequency? bool isValidMilitaryNavigationFrequency(BlackMisc::PhysicalQuantities::CFrequency f) const { double fr = f.valueRounded(BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz(), this->m_digits); return fr >= 960.0 && fr <= 1215.0; // valid TACAN frequency } - /*! - * \brief Constructor - * \param validate - * \param name - * \param activeFrequency - * \param standbyFrequency - * \param digits - */ - CNavSystem(bool validate, const QString &name, const BlackMisc::PhysicalQuantities::CFrequency &activeFrequency, const BlackMisc::PhysicalQuantities::CFrequency &standbyFrequency, int digits = 3): - CModulator(name, activeFrequency, standbyFrequency, digits) + //! NAV1 unit + static CNavSystem getNav1System(double activeFrequencyMHz, double standbyFrequencyMHz = -1) { - this->validate(validate); + return CNavSystem(CModulator::NameNav1(), BlackMisc::PhysicalQuantities::CFrequency(activeFrequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz()), BlackMisc::PhysicalQuantities::CFrequency(standbyFrequencyMHz < 0 ? activeFrequencyMHz : standbyFrequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz())); + } + + //! NAV1 unit + static CNavSystem getNav1System(BlackMisc::PhysicalQuantities::CFrequency activeFrequency, BlackMisc::PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) + { + return CNavSystem(CModulator::NameNav1(), activeFrequency, standbyFrequency == CModulator::FrequencyNotSet() ? activeFrequency : standbyFrequency); + } + + //! NAV2 unit + static CNavSystem getNav2System(double activeFrequencyMHz, double standbyFrequencyMHz = -1) + { + return CNavSystem(CModulator::NameNav2(), BlackMisc::PhysicalQuantities::CFrequency(activeFrequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz()), BlackMisc::PhysicalQuantities::CFrequency(standbyFrequencyMHz < 0 ? activeFrequencyMHz : standbyFrequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz())); + } + + //! NAV2 unit + static CNavSystem getNav2System(BlackMisc::PhysicalQuantities::CFrequency activeFrequency, BlackMisc::PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) + { + return CNavSystem(CModulator::NameNav2(), activeFrequency, standbyFrequency == CModulator::FrequencyNotSet() ? activeFrequency : standbyFrequency); } protected: - /*! - * \copydoc CAvionicsBase::validValues - */ + //! \copydoc CAvionicsBase::validValues virtual bool validValues() const override { if (this->isDefaultValue()) return true; // special case @@ -68,222 +107,6 @@ namespace BlackMisc this->isValidMilitaryNavigationFrequency(this->getFrequencyStandby())); return v; } - - /*! - * \brief Validate values by assert and exception - * \param strict - * \throws std::range_error - * \remarks Cannot be virtual because used in constructor - * \return - */ - bool validate(bool strict = true) const - { - if (this->isDefaultValue()) return true; - bool valid = this->validValues(); - if (!strict) return valid; - Q_ASSERT_X(valid, "CModulator::validate", "illegal values"); - if (!valid) throw std::range_error("Illegal values in CModulator::validate"); - return true; - } - - public: - /*! - * Default constructor - */ - CNavSystem() : CModulator() {} - - /*! - * \brief Copy constructor - * \param other - */ - CNavSystem(const CNavSystem &other) : CModulator(other) {} - - /*! - * \brief Constructor - * \param name - * \param activeFrequency - * \param standbyFrequency - * \param digits - */ - CNavSystem(const QString &name, const BlackMisc::PhysicalQuantities::CFrequency &activeFrequency, const BlackMisc::PhysicalQuantities::CFrequency &standbyFrequency, int digits = 3): - CModulator(name, activeFrequency, standbyFrequency, digits) - { - this->validate(true); - } - - /*! - * \copydoc CValueObject::toQVariant - */ - virtual QVariant toQVariant() const override - { - return QVariant::fromValue(*this); - } - - /*! - * \brief Set active frequency - * \param frequencyMHz - */ - void setFrequencyActiveMHz(double frequencyMHz) - { - this->CModulator::setFrequencyActiveMHz(frequencyMHz); - this->validate(true); - } - - /*! - * \brief Set standby frequency - * \param frequencyMHz - */ - void setFrequencyStandbyMHz(double frequencyMHz) - { - this->CModulator::setFrequencyStandbyMHz(frequencyMHz); - this->validate(true); - } - - /*! - * \brief operator == - * \param other - * \return - */ - bool operator ==(const CNavSystem &other) const - { - return this->CModulator::operator ==(other); - } - - /*! - * \brief operator == - * \param other - * \return - */ - bool operator !=(const CNavSystem &other) const - { - return this->CModulator::operator !=(other); - } - - /*! - * Try to get a NAV unit with given name and frequency. Returns true in case an object - * has been sucessfully created,otherwise returns a default object. - * \param[out] o_navSystem - * \param name - * \param activeFrequencyMHz - * \param standbyFrequencyMHz - * \return - */ - static bool tryGetNavSystem(CNavSystem &o_navSystem, const QString &name, double activeFrequencyMHz, double standbyFrequencyMHz = -1) - { - o_navSystem = CNavSystem(false, name, BlackMisc::PhysicalQuantities::CFrequency(activeFrequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz()), BlackMisc::PhysicalQuantities::CFrequency(standbyFrequencyMHz < 0 ? activeFrequencyMHz : standbyFrequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz())); - bool s; - if (!(s = o_navSystem.validate(false))) o_navSystem = CNavSystem(); // reset to default - return s; - } - - /*! - * Try to get a NAV unit with given name and frequency. Returns true in case an object - * has been sucessfully created, otherwise returns a default object. - * \param[out] o_navSystem - * \param name - * \param activeFrequency - * \param standbyFrequency - * \return - */ - static bool tryGetNavSystem(CNavSystem &o_navSystem, const QString &name, BlackMisc::PhysicalQuantities::CFrequency activeFrequency, BlackMisc::PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) - { - o_navSystem = CNavSystem(false, name, activeFrequency, standbyFrequency); - bool s; - if (!(s = o_navSystem.validate(false))) o_navSystem = CNavSystem(); // reset to default - return s; - } - - /*! - * \brief NAV1 unit - * \param activeFrequencyMHz - * \param standbyFrequencyMHz - * \return - */ - static CNavSystem getNav1System(double activeFrequencyMHz, double standbyFrequencyMHz = -1) - { - return CNavSystem(CModulator::NameNav1(), BlackMisc::PhysicalQuantities::CFrequency(activeFrequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz()), BlackMisc::PhysicalQuantities::CFrequency(standbyFrequencyMHz < 0 ? activeFrequencyMHz : standbyFrequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz())); - } - - /*! - * \brief NAV1 unit - * \param activeFrequency - * \param standbyFrequency - * \return - */ - static CNavSystem getNav1System(BlackMisc::PhysicalQuantities::CFrequency activeFrequency, BlackMisc::PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) - { - return CNavSystem(CModulator::NameNav1(), activeFrequency, standbyFrequency == CModulator::FrequencyNotSet() ? activeFrequency : standbyFrequency); - } - - /*! - * \brief Try to get NAV unit - * \param[out] o_navSystem - * \param activeFrequencyMHz - * \param standbyFrequencyMHz - * \return - */ - static bool tryGetNav1System(CNavSystem &o_navSystem, double activeFrequencyMHz, double standbyFrequencyMHz = -1) - { - return CNavSystem::tryGetNavSystem(o_navSystem, CModulator::NameNav1(), activeFrequencyMHz, standbyFrequencyMHz); - } - - /*! - * \brief Try to get NAV unit - * \param[out] o_navSystem - * \param activeFrequency - * \param standbyFrequency - * \return - */ - static bool tryGetNav1System(CNavSystem &o_navSystem, BlackMisc::PhysicalQuantities::CFrequency activeFrequency, BlackMisc::PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) - { - return CNavSystem::tryGetNavSystem(o_navSystem, CModulator::NameNav1(), activeFrequency, standbyFrequency); - } - - /*! - * \brief NAV2 unit - * \param activeFrequencyMHz - * \param standbyFrequencyMHz - * \return - */ - static CNavSystem getNav2System(double activeFrequencyMHz, double standbyFrequencyMHz = -1) - { - return CNavSystem(CModulator::NameNav2(), BlackMisc::PhysicalQuantities::CFrequency(activeFrequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz()), BlackMisc::PhysicalQuantities::CFrequency(standbyFrequencyMHz < 0 ? activeFrequencyMHz : standbyFrequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz())); - } - - /*! - * \brief NAV2 unit - * \param activeFrequency - * \param standbyFrequency - * \return - */ - static CNavSystem getNav2System(BlackMisc::PhysicalQuantities::CFrequency activeFrequency, BlackMisc::PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) - { - return CNavSystem(CModulator::NameNav2(), activeFrequency, standbyFrequency == CModulator::FrequencyNotSet() ? activeFrequency : standbyFrequency); - } - - /*! - * \brief Try to get NAV unit - * \param[out] o_navSystem - * \param activeFrequencyMHz - * \param standbyFrequencyMHz - * \return - */ - static bool tryGetNav2System(CNavSystem &o_navSystem, double activeFrequencyMHz, double standbyFrequencyMHz = -1) - { - return CNavSystem::tryGetNavSystem(o_navSystem, CModulator::NameNav2(), activeFrequencyMHz, standbyFrequencyMHz); - } - - /*! - * \brief Try to get NAV unit - * \param[out] o_navSystem - * \param activeFrequency - * \param standbyFrequency - * \return - */ - static bool tryGetNav2System(CNavSystem &o_navSystem, BlackMisc::PhysicalQuantities::CFrequency activeFrequency, BlackMisc::PhysicalQuantities::CFrequency standbyFrequency = CModulator::FrequencyNotSet()) - { - return CNavSystem::tryGetNavSystem(o_navSystem, CModulator::NameNav2(), activeFrequency, standbyFrequency); - } }; } // namespace diff --git a/src/blackmisc/aviotransponder.cpp b/src/blackmisc/aviotransponder.cpp index 349a058c2..d40b6a859 100644 --- a/src/blackmisc/aviotransponder.cpp +++ b/src/blackmisc/aviotransponder.cpp @@ -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/aviotransponder.h" #include "blackmisc/blackmiscfreefunctions.h" diff --git a/src/blackmisc/aviotransponder.h b/src/blackmisc/aviotransponder.h index a39c3e727..e7ba3fbc8 100644 --- a/src/blackmisc/aviotransponder.h +++ b/src/blackmisc/aviotransponder.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_AVIOTRANSPONDER_H #define BLACKMISC_AVIOTRANSPONDER_H @@ -13,12 +19,12 @@ namespace BlackMisc namespace Aviation { /*! - * \brief Transponder + * Transponder */ class CTransponder : public CAvionicsBase { public: - //! \brief Transponder codes + //! Transponder codes enum TransponderMode { StateStandby = 0, // not a real mode, more a state @@ -29,48 +35,26 @@ namespace BlackMisc ModeS = 20 }; - private: - BLACK_ENABLE_TUPLE_CONVERSION(CTransponder) - qint32 m_transponderCode; //m_transponderCode == 0; } - - //! \copydoc CValueObject::convertToQString - virtual QString convertToQString(bool i18n = false) const override; - - //! \copydoc CValueObject::marshallFromDbus() - virtual void marshallToDbus(QDBusArgument &argument) const override; - - //! \copydoc CValueObject::unmarshallFromDbus() - virtual void unmarshallFromDbus(const QDBusArgument &argument) override; - - //! \copydoc CValueObject::compareImpl - virtual int compareImpl(const CValueObject &other) const override; - - public: - //! \brief Default constructor + //! Default constructor CTransponder() : CAvionicsBase("transponder"), m_transponderCode(0), m_transponderMode(StateStandby) {} - //! \brief Copy constructor + //! Copy constructor CTransponder(const CTransponder &other) : CAvionicsBase(other.getName()), m_transponderCode(other.m_transponderCode), m_transponderMode(other.m_transponderMode) {} - //! \brief Constructor + //! Constructor CTransponder(const QString &name, qint32 transponderCode, TransponderMode transponderMode) : CAvionicsBase(name), m_transponderCode(transponderCode), m_transponderMode(transponderMode) { } - //! \brief Constructor with transponder mode as string + //! Constructor with transponder mode as string CTransponder(const QString &name, qint32 transponderCode, QString transponderMode) : CAvionicsBase(name), m_transponderCode(transponderCode), m_transponderMode(StateStandby) { this->setModeAsString(transponderMode); } - //! \brief Constructor, code as string + //! Constructor, code as string CTransponder(const QString &name, QString transponderCode, TransponderMode transponderMode) : CAvionicsBase(name), m_transponderCode(0), m_transponderMode(transponderMode) { @@ -79,7 +63,7 @@ namespace BlackMisc if (!ok) this->m_transponderCode = -1; // will cause assert / exception } - //! \brief Constructor + //! Constructor CTransponder(const QString &name, QString transponderCode, QString transponderMode) : CAvionicsBase(name), m_transponderCode(0), m_transponderMode(StateStandby) { @@ -98,76 +82,76 @@ namespace BlackMisc return QVariant::fromValue(*this); } - //! \brief Transponder mode as string + //! Transponder mode as string QString getModeAsString() const { return CTransponder::modeAsString(this->getTransponderMode()); } - //! \brief Transponder mode as string + //! Transponder mode as string void setModeAsString(const QString &mode) { this->setTransponderMode(CTransponder::modeFromString(mode)); } - //! \brief Transponder mode + //! Transponder mode TransponderMode getTransponderMode() const { return this->m_transponderMode; } - //! \brief Transponder mode as string + //! Transponder mode as string static const QString &modeAsString(TransponderMode mode); - //! \brief Transponder code + //! Transponder code qint32 getTransponderCode() const { return this->m_transponderCode; } - //! \brief Transponder code + //! Transponder code QString getTransponderCodeFormatted() const; - //! \brief Formatted with code / mode + //! Formatted with code / mode QString getTransponderCodeAndModeFormatted() const; - //! \brief Set transponder code + //! Set transponder code void setTransponderCode(qint32 transponderCode) { this->m_transponderCode = transponderCode; } - //! \brief Set transponder code + //! Set transponder code void setTransponderCode(const QString &transponderCode); - //! \brief Mode from string + //! Mode from string static TransponderMode modeFromString(const QString &modeString); - //! \brief Set transponder mode + //! Set transponder mode void setTransponderMode(TransponderMode mode) { this->m_transponderMode = mode ; } - //! \brief Set emergency + //! Set emergency void setEmergency() { this->m_transponderCode = 7700; } - //! \brief Set VFR + //! Set VFR void setVFR() { this->m_transponderCode = 7000; } - //! \brief Set IFR + //! Set IFR void setIFR() { this->m_transponderCode = 2000; } - //! \brief operator == + //! operator == bool operator ==(const CTransponder &other) const { return @@ -176,13 +160,13 @@ namespace BlackMisc this->CAvionicsBase::operator ==(other); } - //! \brief operator =! + //! operator =! bool operator !=(const CTransponder &other) const { return !((*this) == other); } - //! \brief Transponder unit + //! Transponder unit static CTransponder getStandardTransponder(qint32 transponderCode, TransponderMode mode) { return CTransponder("Transponder", transponderCode, mode); @@ -191,15 +175,6 @@ namespace BlackMisc //! \copydoc CValueObject::getValueHash() virtual uint getValueHash() const override; - //! \brief Is valid transponder code? - static bool isValidTransponderCode(const QString &transponderCode); - - //! \brief Is valid transponder code? - static bool isValidTransponderCode(qint32 transponderMode); - - //! \brief Register metadata - static void registerMetadata(); - //! \copydoc CValueObject::toJson virtual QJsonObject toJson() const override; @@ -208,6 +183,37 @@ namespace BlackMisc //! \copydoc TupleConverter<>::jsonMembers() static const QStringList &jsonMembers(); + + //! Is valid transponder code? + static bool isValidTransponderCode(const QString &transponderCode); + + //! Is valid transponder code? + static bool isValidTransponderCode(qint32 transponderMode); + + //! Register metadata + static void registerMetadata(); + + protected: + //! Default value? + virtual bool isDefaultValue() const { return this->m_transponderCode == 0; } + + //! \copydoc CValueObject::convertToQString + virtual QString convertToQString(bool i18n = false) const override; + + //! \copydoc CValueObject::marshallFromDbus() + virtual void marshallToDbus(QDBusArgument &argument) const override; + + //! \copydoc CValueObject::unmarshallFromDbus() + virtual void unmarshallFromDbus(const QDBusArgument &argument) override; + + //! \copydoc CValueObject::compareImpl + virtual int compareImpl(const CValueObject &other) const override; + + private: + BLACK_ENABLE_TUPLE_CONVERSION(CTransponder) + qint32 m_transponderCode; //!< Transponder code + TransponderMode m_transponderMode; //!< Transponder mode + }; } // namespace } // namespace diff --git a/src/blackmisc/avselcal.cpp b/src/blackmisc/avselcal.cpp index 530b6a8c4..dada3239e 100644 --- a/src/blackmisc/avselcal.cpp +++ b/src/blackmisc/avselcal.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/avselcal.h b/src/blackmisc/avselcal.h index f0048fd4d..ebae5158e 100644 --- a/src/blackmisc/avselcal.h +++ b/src/blackmisc/avselcal.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/avtrack.h b/src/blackmisc/avtrack.h index 0e868106f..9283fd5f5 100644 --- a/src/blackmisc/avtrack.h +++ b/src/blackmisc/avtrack.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_AVTRACK_H #define BLACKMISC_AVTRACK_H @@ -30,24 +36,6 @@ namespace BlackMisc True = 1 //!< true north }; - private: - BLACK_ENABLE_TUPLE_CONVERSION(CTrack) - ReferenceNorth m_north; //!< magnetic or true? - - protected: - //! \copydoc CValueObject::convertToQString - virtual QString convertToQString(bool i18n = false) const override; - - //! \copydoc CValueObject::marshallFromDbus() - virtual void marshallToDbus(QDBusArgument &argument) const override; - - //! \copydoc CValueObject::unmarshallFromDbus() - virtual void unmarshallFromDbus(const QDBusArgument &argument) override; - - //! \copydoc CValueObject::compareImpl - virtual int compareImpl(const CValueObject &other) const override; - - public: //! \brief Default constructor: 0 Track magnetic CTrack() : BlackMisc::PhysicalQuantities::CAngle(0, BlackMisc::PhysicalQuantities::CAngleUnit::rad()), m_north(Magnetic) {} @@ -100,6 +88,23 @@ namespace BlackMisc //! \brief Members static const QStringList &jsonMembers(); + + protected: + //! \copydoc CValueObject::convertToQString + virtual QString convertToQString(bool i18n = false) const override; + + //! \copydoc CValueObject::marshallFromDbus() + virtual void marshallToDbus(QDBusArgument &argument) const override; + + //! \copydoc CValueObject::unmarshallFromDbus() + virtual void unmarshallFromDbus(const QDBusArgument &argument) override; + + //! \copydoc CValueObject::compareImpl + virtual int compareImpl(const CValueObject &other) const override; + + private: + BLACK_ENABLE_TUPLE_CONVERSION(CTrack) + ReferenceNorth m_north; //!< magnetic or true? }; } // namespace diff --git a/src/blackmisc/blackmisc.h b/src/blackmisc/blackmisc.h index dfe9ab135..40c2a9e7d 100644 --- a/src/blackmisc/blackmisc.h +++ b/src/blackmisc/blackmisc.h @@ -1,8 +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_NAMESPACES_H #define BLACKMISC_NAMESPACES_H // just a dummy header, namespace documentation will go here -/*! \file */ +//! \file /*! * \namespace BlackMisc diff --git a/src/blackmisc/blackmiscfreefunctions.cpp b/src/blackmisc/blackmiscfreefunctions.cpp index 374a9f0ff..c940ec74c 100644 --- a/src/blackmisc/blackmiscfreefunctions.cpp +++ b/src/blackmisc/blackmiscfreefunctions.cpp @@ -210,7 +210,7 @@ bool BlackMisc::equalQVariants(const QVariant &v1, const QVariant &v2) /* * Compare values */ -int BlackMisc:: compareQVariants(const QVariant &v1, const QVariant &v2) +int BlackMisc::compareQVariants(const QVariant &v1, const QVariant &v2) { if (v1 == v2) return 0; // compares on primitives or on address diff --git a/src/blackmisc/blackmiscfreefunctions.h b/src/blackmisc/blackmiscfreefunctions.h index 663fdcf22..808cdba20 100644 --- a/src/blackmisc/blackmiscfreefunctions.h +++ b/src/blackmisc/blackmiscfreefunctions.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/collection.h b/src/blackmisc/collection.h index 7df5c1f8f..dc1643957 100644 --- a/src/blackmisc/collection.h +++ b/src/blackmisc/collection.h @@ -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_COLLECTION_H #define BLACKMISC_COLLECTION_H diff --git a/src/blackmisc/containerbase.h b/src/blackmisc/containerbase.h index 2d89aff5a..18c0ccff2 100644 --- a/src/blackmisc/containerbase.h +++ b/src/blackmisc/containerbase.h @@ -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_CONTAINERBASE_H #define BLACKMISC_CONTAINERBASE_H diff --git a/src/blackmisc/coordinategeodetic.cpp b/src/blackmisc/coordinategeodetic.cpp index d85a19f76..9a55aa37d 100644 --- a/src/blackmisc/coordinategeodetic.cpp +++ b/src/blackmisc/coordinategeodetic.cpp @@ -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/coordinategeodetic.h" #include "blackmisc/blackmiscfreefunctions.h" diff --git a/src/blackmisc/coordinategeodetic.h b/src/blackmisc/coordinategeodetic.h index 10ac35c5c..c63ab6398 100644 --- a/src/blackmisc/coordinategeodetic.h +++ b/src/blackmisc/coordinategeodetic.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_COORDINATEGEODETIC_H #define BLACKMISC_COORDINATEGEODETIC_H diff --git a/src/blackmisc/coordinatetransformation.h b/src/blackmisc/coordinatetransformation.h index 69f26ef2c..1b8ce606f 100644 --- a/src/blackmisc/coordinatetransformation.h +++ b/src/blackmisc/coordinatetransformation.h @@ -1,14 +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 incorporates work covered by the following copyright and - * permission notice: - * Copyright (c) Charles Karney (2008-2011) and licensed - * under the MIT/X11 License. For more information, see - * http://geographiclib.sourceforge.net/ -*/ + * 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_COORDINATETRANSFORMATION_H #define BLACKMISC_COORDINATETRANSFORMATION_H @@ -24,106 +23,69 @@ namespace BlackMisc namespace Geo { - /*! - * \brief Coordinate transformation class between different systems - */ + //! Coordinate transformation class between different systems class CCoordinateTransformation { + + public: + //! NED to ECEF + static CCoordinateEcef toEcef(const CCoordinateNed &ned); + + //! Geodetic to ECEF + static CCoordinateEcef toEcef(const CCoordinateGeodetic &geo); + + //! ECEF via Geodetic to NED + static CCoordinateNed toNed(const CCoordinateEcef &ecef, const CCoordinateGeodetic &referencePosition); + + //! ECEF to Geodetic + static CCoordinateGeodetic toGeodetic(const CCoordinateEcef &ecef); + private: - /*! - * \brief Equatorial radius of WGS84 ellipsoid (6378137 m) - * \return - */ + //! Equatorial radius of WGS84 ellipsoid (6378137 m) static const double &EarthRadiusMeters() { static double erm = 6378137.0; return erm; } - /*! - * \brief Flattening of WGS84 ellipsoid (1/298.257223563) - * \return - */ + //! Flattening of WGS84 ellipsoid (1/298.257223563) static const double &Flattening() { static double f = 1.0 / 298.257223563; return f; } - /*! - * \brief First eccentricity squared - * \return - */ + //! First eccentricity squared static const double &e2() { static double e2 = (Flattening() * (2 - Flattening())); return e2; } - /*! - * \brief First eccentricity to power of four - * \return - */ + //! First eccentricity to power of four static const double &e4() { static double e4 = BlackMisc::Math::CMath::square(e2()); return e4; } - /*! - * \brief First eccentricity squared absolute - * \return - */ + //! First eccentricity squared absolute static const double &e2abs() { static double e2abs = qAbs(e2()); return e2abs; } - /*! - * \brief Eccentricity e2m - * \return - */ + //! Eccentricity e2m static const double &e2m() { static double e2m = BlackMisc::Math::CMath::square(1.0 - Flattening()); return e2m; } - /*! - * \brief Default constructor, deleted - */ + //! Default constructor, deleted CCoordinateTransformation(); - public: - /*! - * \brief NED to ECEF - * \param ned - * \return - */ - static CCoordinateEcef toEcef(const CCoordinateNed &ned); - - /*! - * \brief Geodetic to ECEF - * \param geo - * \return - */ - static CCoordinateEcef toEcef(const CCoordinateGeodetic &geo); - - /*! - * \brief ECEF via Geodetic to NED - * \param ecef - * \param referencePosition - * \return - */ - static CCoordinateNed toNed(const CCoordinateEcef &ecef, const CCoordinateGeodetic &referencePosition); - - /*! - * \brief ECEF to Geodetic - * \param ecef - * \return - */ - static CCoordinateGeodetic toGeodetic(const CCoordinateEcef &ecef); }; } // namespace diff --git a/src/blackmisc/dictionary.h b/src/blackmisc/dictionary.h index 7d1012de7..1c1d54357 100644 --- a/src/blackmisc/dictionary.h +++ b/src/blackmisc/dictionary.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_DICTIONARY_H #define BLACKMISC_DICTIONARY_H diff --git a/src/blackmisc/filedeleter.cpp b/src/blackmisc/filedeleter.cpp index 20db7cd5d..650fc4ae7 100644 --- a/src/blackmisc/filedeleter.cpp +++ b/src/blackmisc/filedeleter.cpp @@ -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 #include "filedeleter.h" diff --git a/src/blackmisc/filedeleter.h b/src/blackmisc/filedeleter.h index 221d3bb69..3eb499ece 100644 --- a/src/blackmisc/filedeleter.h +++ b/src/blackmisc/filedeleter.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 BLACKMISC_CFILEDELETER_H #define BLACKMISC_CFILEDELETER_H @@ -8,7 +19,7 @@ namespace BlackMisc { /*! - * \brief Utility class, deleting files when it is destroyed + * Utility class, deleting files when it is destroyed */ class CFileDeleter { @@ -16,21 +27,21 @@ namespace BlackMisc private: QStringList m_fileNames; - //! \brief File deleter + //! File deleter CFileDeleter() {} - //! \brief add given file for deletion + //! add given file for deletion void addFile(const QString &file); public: - //! \brief file deleter + //! file deleter static CFileDeleter &fileDeleter() { static CFileDeleter f; return f;} - //! \brief add a file (name) + //! add a file (name) static void addFileForDeletion(const QString &file); - //! \brief Destructor + //! Destructor ~CFileDeleter(); }; } diff --git a/src/blackmisc/geoearthangle.cpp b/src/blackmisc/geoearthangle.cpp index 1eec7bce8..625189d0b 100644 --- a/src/blackmisc/geoearthangle.cpp +++ b/src/blackmisc/geoearthangle.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/geoearthangle.h b/src/blackmisc/geoearthangle.h index 936baa7b1..3e26c9660 100644 --- a/src/blackmisc/geoearthangle.h +++ b/src/blackmisc/geoearthangle.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ @@ -22,42 +22,6 @@ namespace BlackMisc */ template class CEarthAngle : public BlackMisc::PhysicalQuantities::CAngle { - protected: - //! Default constructor - CEarthAngle() : CAngle(0.0, BlackMisc::PhysicalQuantities::CAngleUnit::deg()) {} - - //! Init by double value - CEarthAngle(double value, const BlackMisc::PhysicalQuantities::CAngleUnit &unit) : CAngle(value, unit) {} - - //! Init by CAngle value - CEarthAngle(const BlackMisc::PhysicalQuantities::CAngle &angle) : CAngle(angle) {} - - //! \copydoc CValueObject::convertToQString - virtual QString convertToQString(bool i18n = false) const override - { - return this->valueRoundedWithUnit(BlackMisc::PhysicalQuantities::CAngleUnit::deg(), 6, i18n); - } - - //! \copydoc CValueObject::getMetaTypeId - virtual int getMetaTypeId() const override; - - //! \copydoc CValueObject::isA - virtual bool isA(int metaTypeId) const override; - - //! \copydoc CValueObject::compareImpl - virtual int compareImpl(const CValueObject &other) const override; - - //! \copydoc CValueObject::marshallToDbus - virtual void marshallToDbus(QDBusArgument &argument) const override - { - this->CAngle::marshallToDbus(argument); - } - - //! \copydoc CValueObject::unmarshallFromDbus - virtual void unmarshallFromDbus(const QDBusArgument &argument) override - { - this->CAngle::unmarshallFromDbus(argument); - } public: //! Virtual destructor @@ -89,22 +53,14 @@ namespace BlackMisc return *this; } - /*! - * Multiply operator *= - * \param multiply - * \return - */ + //! Multiply operator *= CEarthAngle operator *=(double multiply) { this->CAngle::operator *=(multiply); return *this; } - /*! - * Greater operator > - * \param latOrLon - * \return - */ + //! Greater operator > bool operator >(const CEarthAngle &latOrLon) const { return this->CAngle::operator >(latOrLon); @@ -144,11 +100,7 @@ namespace BlackMisc return l; } - /*! - * Multiply operator * - * \param multiply - * \return - */ + //! Multiply operator * LATorLON operator *(double multiply) const { LATorLON l(*this); @@ -168,6 +120,50 @@ namespace BlackMisc * \return */ static LATorLON fromWgs84(const QString &wgsCoordinate); + + protected: + //! Default constructor + CEarthAngle() : CAngle(0.0, BlackMisc::PhysicalQuantities::CAngleUnit::deg()) {} + + //! Init by double value + CEarthAngle(double value, const BlackMisc::PhysicalQuantities::CAngleUnit &unit) : CAngle(value, unit) {} + + //! Init by CAngle value + CEarthAngle(const BlackMisc::PhysicalQuantities::CAngle &angle) : CAngle(angle) {} + + //! \copydoc CValueObject::convertToQString + virtual QString convertToQString(bool i18n = false) const override + { + return this->valueRoundedWithUnit(BlackMisc::PhysicalQuantities::CAngleUnit::deg(), 6, i18n); + } + + //! \copydoc CValueObject::getMetaTypeId + virtual int getMetaTypeId() const override; + + //! \copydoc CValueObject::isA + virtual bool isA(int metaTypeId) const override; + + //! \copydoc CValueObject::compareImpl + virtual int compareImpl(const CValueObject &other) const override; + + //! \copydoc CValueObject::marshallToDbus + virtual void marshallToDbus(QDBusArgument &argument) const override + { + this->CAngle::marshallToDbus(argument); + } + + //! \copydoc CValueObject::unmarshallFromDbus + virtual void unmarshallFromDbus(const QDBusArgument &argument) override + { + this->CAngle::unmarshallFromDbus(argument); + } + + private: + //! Easy access to derived class (CRTP template parameter) + LATorLON const *derived() const { return static_cast(this); } + + //! Easy access to derived class (CRTP template parameter) + LATorLON *derived() { return static_cast(this); } }; } // namespace diff --git a/src/blackmisc/geolatitude.h b/src/blackmisc/geolatitude.h index bed5d60c4..1bef5b32f 100644 --- a/src/blackmisc/geolatitude.h +++ b/src/blackmisc/geolatitude.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/geolongitude.h b/src/blackmisc/geolongitude.h index ce54e3b24..8514ffd1e 100644 --- a/src/blackmisc/geolongitude.h +++ b/src/blackmisc/geolongitude.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/hotkeyfunction.cpp b/src/blackmisc/hotkeyfunction.cpp index 0ad887099..b0c3af89f 100644 --- a/src/blackmisc/hotkeyfunction.cpp +++ b/src/blackmisc/hotkeyfunction.cpp @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/blackmisc/hotkeyfunction.h b/src/blackmisc/hotkeyfunction.h index 8f6181131..7d9883b2c 100644 --- a/src/blackmisc/hotkeyfunction.h +++ b/src/blackmisc/hotkeyfunction.h @@ -2,18 +2,18 @@ * 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, + * 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_HOTKEYFUNCTION_H #define BLACKMISC_HOTKEYFUNCTION_H #include "valueobject.h" -//! \file - namespace BlackMisc { //! Value object representing a hotkey function. diff --git a/src/blackmisc/hwkeyboardkey.cpp b/src/blackmisc/hwkeyboardkey.cpp index 4b1064034..60508a17e 100644 --- a/src/blackmisc/hwkeyboardkey.cpp +++ b/src/blackmisc/hwkeyboardkey.cpp @@ -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 "hwkeyboardkey.h" #include "blackmiscfreefunctions.h" diff --git a/src/blackmisc/hwkeyboardkey.h b/src/blackmisc/hwkeyboardkey.h index d465599f0..3cc5b336e 100644 --- a/src/blackmisc/hwkeyboardkey.h +++ b/src/blackmisc/hwkeyboardkey.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 BLACKMISC_KEYBOARDKEY_H #define BLACKMISC_KEYBOARDKEY_H diff --git a/src/blackmisc/hwkeyboardkeylist.h b/src/blackmisc/hwkeyboardkeylist.h index ce937f682..e6be04f4d 100644 --- a/src/blackmisc/hwkeyboardkeylist.h +++ b/src/blackmisc/hwkeyboardkeylist.h @@ -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_KEYBOARDKEYLIST_H #define BLACKMISC_KEYBOARDKEYLIST_H diff --git a/src/blackmisc/icon.cpp b/src/blackmisc/icon.cpp index 61c436a99..518350595 100644 --- a/src/blackmisc/icon.cpp +++ b/src/blackmisc/icon.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/icon.h b/src/blackmisc/icon.h index c856656d9..282f57fd1 100644 --- a/src/blackmisc/icon.h +++ b/src/blackmisc/icon.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/iconlist.cpp b/src/blackmisc/iconlist.cpp index 466bab569..519b8df09 100644 --- a/src/blackmisc/iconlist.cpp +++ b/src/blackmisc/iconlist.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/iconlist.h b/src/blackmisc/iconlist.h index 46f06437b..c8d33bd55 100644 --- a/src/blackmisc/iconlist.h +++ b/src/blackmisc/iconlist.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/icons.h b/src/blackmisc/icons.h index f2b2f223b..d5be9440f 100644 --- a/src/blackmisc/icons.h +++ b/src/blackmisc/icons.h @@ -1,8 +1,8 @@ /* 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: + * 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. */ diff --git a/src/blackmisc/index_sequence.h b/src/blackmisc/index_sequence.h index 0d522c72f..9fcf27c1e 100644 --- a/src/blackmisc/index_sequence.h +++ b/src/blackmisc/index_sequence.h @@ -1,7 +1,11 @@ -/* 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. + */ #ifndef BLACKMISC_INDEX_SEQUENCE_H #define BLACKMISC_INDEX_SEQUENCE_H diff --git a/src/blackmisc/indexvariantmap.cpp b/src/blackmisc/indexvariantmap.cpp index d8563edb1..7f56b96bd 100644 --- a/src/blackmisc/indexvariantmap.cpp +++ b/src/blackmisc/indexvariantmap.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/indexvariantmap.h b/src/blackmisc/indexvariantmap.h index 9138bb618..dccc29cb7 100644 --- a/src/blackmisc/indexvariantmap.h +++ b/src/blackmisc/indexvariantmap.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/mathmatrix1x3.h b/src/blackmisc/mathmatrix1x3.h index 8bca07d50..0eb2fbf34 100644 --- a/src/blackmisc/mathmatrix1x3.h +++ b/src/blackmisc/mathmatrix1x3.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_POSMATRIX1x3_H #define BLACKMISC_POSMATRIX1x3_H @@ -14,35 +20,21 @@ namespace BlackMisc namespace Math { - /*! - * \brief Matrix 1x3 - */ + //! Matrix 1x3 class CMatrix1x3 : public CMatrixBase { public: - /*! - * \brief Constructor - */ + + //! Constructor CMatrix1x3() : CMatrixBase() {} - /*! - * \brief Copy constructor - * \param other - */ + //! Copy constructor CMatrix1x3(const CMatrix1x3 &other) : CMatrixBase(other) {} - /*! - * \brief Init by fill value - * \param fillValue - */ + //! Init by fill value explicit CMatrix1x3(double fillValue) : CMatrixBase(fillValue) {} - /*! - * \brief Constructor - * \param c1 - * \param c2 - * \param c3 - */ + //! Constructor CMatrix1x3(double c1, double c2, double c3) : CMatrixBase() { this->m_matrix(0, 0) = c1; diff --git a/src/blackmisc/mathmatrix3x1.h b/src/blackmisc/mathmatrix3x1.h index 232664d8a..ef7978630 100644 --- a/src/blackmisc/mathmatrix3x1.h +++ b/src/blackmisc/mathmatrix3x1.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_POSMATRIX3X1_H #define BLACKMISC_POSMATRIX3X1_H @@ -16,25 +22,16 @@ namespace BlackMisc class CMatrix3x3; - /*! - * \brief Matrix 3x1 - */ + //! Matrix 3x1 class CMatrix3x1 : public CMatrixBase { friend class CMatrix3x3; public: - /*! - * \brief Constructor - */ + //! Constructor CMatrix3x1() : CMatrixBase() {} - /*! - * \brief Constructor - * \param r1 - * \param r2 - * \param r3 - */ + //! Constructor CMatrix3x1(double r1, double r2, double r3) : CMatrixBase() { this->m_matrix(0, 0) = r1; @@ -42,39 +39,19 @@ namespace BlackMisc this->m_matrix(2, 0) = r3; } - /*! - * \brief Copy constructor - */ + //! Copy constructor CMatrix3x1(const CMatrix3x1 &other) : CMatrixBase(other) {} - /*! - * \brief Init by fill value - * \param fillValue - */ + //! Init by fill value explicit CMatrix3x1(double fillValue) : CMatrixBase(fillValue) {} - /*! - * \copydoc CValueObject::toQVariant - */ - virtual QVariant toQVariant() const override - { - return QVariant::fromValue(*this); - } - - - /*! - * \brief Convert to vector - * \return - */ + //! Convert to vector CVector3D toVector3D() const { return CVector3D(this->getElement(0, 0), this->getElement(1, 0), this->getElement(2, 0)); } - /*! - * \brief Convert from vector - * \return - */ + //! Convert from vector void fromVector3D(const CVector3D &vector) { this->m_matrix(0, 0) = vector.i(); @@ -82,7 +59,6 @@ namespace BlackMisc this->m_matrix(2, 0) = vector.k(); } }; - } // namespace } // namespace diff --git a/src/blackmisc/mathmatrix3x3.h b/src/blackmisc/mathmatrix3x3.h index 68d762bff..3f2dd4fe6 100644 --- a/src/blackmisc/mathmatrix3x3.h +++ b/src/blackmisc/mathmatrix3x3.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_POSMATRIX3X3_H #define BLACKMISC_POSMATRIX3X3_H @@ -14,41 +20,20 @@ namespace BlackMisc namespace Math { - /*! - * \brief 3x3 matrix - */ + //! 3x3 matrix class CMatrix3x3 : public CMatrixBase { public: - /*! - * \brief CMatrix3D - */ + //! Constructor CMatrix3x3() : CMatrixBase() {} - /*! - * \brief Copy constructor - * \param other - */ + //! Copy constructor CMatrix3x3(const CMatrix3x3 &other) : CMatrixBase(other) {} - /*! - * \brief Init by fill value - * \param fillValue - */ + //! Init by fill value explicit CMatrix3x3(double fillValue) : CMatrixBase(fillValue) {} - /*! - * \brief Stupid but handy constructor - * \param r1c1 - * \param r1c2 - * \param r1c3 - * \param r2c1 - * \param r2c2 - * \param r2c3 - * \param r3c1 - * \param r3c2 - * \param r3c3 - */ + //! Stupid, but handy constructor by single row column values explicit CMatrix3x3(double r1c1, double r1c2, double r1c3, double r2c1, double r2c2, double r2c3, double r3c1, double r3c2, double r3c3) : CMatrixBase() @@ -64,42 +49,20 @@ namespace BlackMisc this->setElement(2, 2, r3c3); } - /*! - * \copydoc CValueObject::toQVariant - */ - virtual QVariant toQVariant() const override - { - return QVariant::fromValue(*this); - } - - /*! - * \brief Calculates the determinant of the matrix - * \return - */ + //! Calculates the determinant of the matrix double determinant() const; - /*! - * \brief Calculate the inverse - * \param[out] o_isInvertible - * \return - */ + //! Calculate the inverse and mark flag if successful CMatrix3x3 inverse(bool &o_isInvertible) const; - /*! - * \brief Operator *= - * \param other - * \return - */ + //! Operator *= CMatrix3x3 &operator *=(const CMatrix3x3 &other) { this->m_matrix = this->m_matrix * other.m_matrix; return *this; } - /*! - * \brief Operator * - * \param other - * \return - */ + + //! Operator * CMatrix3x3 operator *(const CMatrix3x3 &other) const { CMatrix3x3 m(*this); @@ -107,11 +70,7 @@ namespace BlackMisc return m; } - /*! - * \brief Operator * - * \param other - * \return - */ + //! Operator * CMatrix3x1 operator *(const CMatrix3x1 &other) const { CMatrix3x1 m; @@ -119,32 +78,20 @@ namespace BlackMisc return m; } - /*! - * \brief Multiply this matrix with vector - * \param vector - * \return - */ + //! Multiply this matrix with vector CVector3D operator *(const CVector3D &vector) const { return ((*this) * CMatrix3x1(vector.toMatrix3x1())).toVector3D(); } - /*! - * \brief Multiply with factor - * \param factor - * \return - */ + //! Multiply with factor CMatrix3x3 &operator *=(double factor) { this->CMatrixBase::operator *=(factor); return *this; } - /*! - * \brief Multiply with factor - * \param factor - * \return - */ + //! Multiply with factor CMatrix3x3 operator *(double factor) const { CMatrix3x3 m(*this); @@ -152,10 +99,7 @@ namespace BlackMisc return m; } - /*! - * \brief Transposed matrix - * \return - */ + //! Transposed matrix CMatrix3x3 transposed() const { CMatrix3x3 m(0); @@ -163,18 +107,10 @@ namespace BlackMisc return m; } - /*! - * \brief Get column - * \param column - * \return - */ + //! Get column CMatrix3x1 getColumn(int column) const; - /*! - * \brief Get row - * \param row - * \return - */ + //! Get row CMatrix1x3 getRow(int row) const; }; diff --git a/src/blackmisc/mathvector3dbase.cpp b/src/blackmisc/mathvector3dbase.cpp index 971e90be9..444d8b9a5 100644 --- a/src/blackmisc/mathvector3dbase.cpp +++ b/src/blackmisc/mathvector3dbase.cpp @@ -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 "blackmisc/mathvector3d.h" #include "blackmisc/mathmatrix3x3.h" diff --git a/src/blackmisc/mathvector3dbase.h b/src/blackmisc/mathvector3dbase.h index 0956f5e77..550f0e3cd 100644 --- a/src/blackmisc/mathvector3dbase.h +++ b/src/blackmisc/mathvector3dbase.h @@ -1,13 +1,21 @@ -/* 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_MATHVECTOR3DBASE_H #define BLACKMISC_MATHVECTOR3DBASE_H #include "blackmisc/valueobject.h" #include "blackmisc/mathematics.h" +#include "blackmisc/blackmiscfreefunctions.h" + using namespace BlackMisc::Math; namespace BlackMisc @@ -16,46 +24,206 @@ namespace BlackMisc { class CMatrix3x1; - /*! - * \brief 3D vector base (x, y, z) - */ + //! 3D vector base (x, y, z) template class CVector3DBase : public CValueObject { - private: - BLACK_ENABLE_TUPLE_CONVERSION(CVector3DBase) + public: + // getter and setters are implemented in the derived classes + // as they have different names (x, i, north) - //! \brief Easy access to derived class (CRTP template parameter) - ImplVector const *derived() const + //! Virtual destructor + virtual ~CVector3DBase() {} + + //! Set zeros + void setZero(); + + //! Is zero? + bool isZero() const { - return static_cast(this); + return this->m_i == 0 && this->m_j == 0 && this->m_k == 0; } - //! \brief Easy access to derived class (CRTP template parameter) - ImplVector *derived() + //! Is zero, epsilon considered. + bool isZeroEpsilon() const { - return static_cast(this); + ImplVector v; + v += *this; + v.round(); + return v.isZero(); } + //! Set all elements the same + void fill(double value); + + //! Get element + double getElement(int row) const; + + //! Set element + void setElement(int row, double value); + + //! Operator [] + double operator[](int row) const { return this->getElement(row); } + + //! Operator [], mutable reference + double &operator[](int row) { return this->getElement(row); } + + //! Equal operator == + bool operator ==(const CVector3DBase &other) const + { + if (this == &other) return true; + return + CMath::epsilonEqual(this->m_i, other.m_i, 1E-9) && + CMath::epsilonEqual(this->m_j, other.m_j, 1E-9) && + CMath::epsilonEqual(this->m_k, other.m_k, 1E-9); + } + + //! Unequal operator != + bool operator !=(const CVector3DBase &other) const + { + return !((*this) == other); + } + + //! Operator += + CVector3DBase &operator +=(const CVector3DBase &other) + { + this->m_i += other.m_i; + this->m_j += other.m_j; + this->m_k += other.m_k; + return *this; + } + + //! Operator + + ImplVector operator +(const ImplVector &other) const + { + ImplVector v = *derived(); + v += other; + return v; + } + + //! Operator -= + CVector3DBase &operator -=(const CVector3DBase &other) + { + this->m_i -= other.m_i; + this->m_j -= other.m_j; + this->m_k -= other.m_k; + return *this; + } + + //! Operator - + ImplVector operator -(const ImplVector &other) const + { + ImplVector v = *derived(); + v -= other; + return v; + } + + //! Multiply with scalar + CVector3DBase &operator *=(double factor) + { + this->m_i *= factor; + this->m_j *= factor; + this->m_k *= factor; + return *this; + } + + //! Multiply with scalar + ImplVector operator *(double factor) const + { + ImplVector v = *derived(); + v *= factor; + return v; + } + + //! Operator to support commutative multiplication + friend ImplVector operator *(double factor, const ImplVector &other) + { + return other * factor; + } + + //! Divide by scalar + CVector3DBase &operator /=(double divisor) + { + this->m_i /= divisor; + this->m_j /= divisor; + this->m_k /= divisor; + return *this; + } + + //! Divide by scalar + ImplVector operator /(double divisor) const + { + ImplVector v = *derived(); + v /= divisor; + return v; + } + + //! Dot product + double dotProduct(const ImplVector &other) const; + + //! Cross product + ImplVector crossProduct(const ImplVector &other) const; + + //! Reciprocal value + ImplVector reciprocalValues() const + { + ImplVector v(1 / this->m_i, 1 / this->m_j, 1 / this->m_j); + return v; + } + + //! Converted to matrix + CMatrix3x1 toMatrix3x1() const; + + //! \copydoc CValueObject::getValueHash + virtual uint getValueHash() const override; + + //! length / magnitude + double length() const + { + return sqrt(this->m_i * this->m_i + this->m_j * this->m_j + this->m_k * this->m_k); + } + + //! Round this vector + void round() + { + const double epsilon = 1E-10; + this->m_i = BlackMisc::Math::CMath::roundEpsilon(this->m_i, epsilon); + this->m_j = BlackMisc::Math::CMath::roundEpsilon(this->m_j, epsilon); + this->m_k = BlackMisc::Math::CMath::roundEpsilon(this->m_k, epsilon); + } + + //! Rounded vector + ImplVector rounded() const + { + ImplVector v = *derived(); + v.round(); + return v; + } + + //! \copydoc CValueObject::toJson + virtual QJsonObject toJson() const override; + + //! \copydoc CValueObject::fromJson + void fromJson(const QJsonObject &json) override; + + //! Register metadata + static void registerMetadata(); + protected: // using own value since Qt QVector3D stores internally as float double m_i; //!< Vector data i double m_j; //!< Vector data j double m_k; //!< Vector data k - //! \brief Default constructor + //! Default constructor CVector3DBase() : m_i(0.0), m_j(0.0), m_k(0.0) {} - //! \brief Constructor by values + //! Constructor by values CVector3DBase(double i, double j, double k) : m_i(i), m_j(j), m_k(k) {} - //! \brief Constructor by value + //! Constructor by value explicit CVector3DBase(double value) : m_i(value), m_j(value), m_k(value) {} - /*! - * \brief Get element - * \param row - * \return Mutable reference - */ + //! Get mutable element double &getElement(int row); //! \copydoc CValueObject::convertToQString @@ -76,186 +244,21 @@ namespace BlackMisc //! \copydoc CValueObject::marshallToDbus virtual void marshallToDbus(QDBusArgument &argument) const override; - public: - // getter and setters are implemented in the derived classes - // as they have different names (x, i, north) + private: + BLACK_ENABLE_TUPLE_CONVERSION(CVector3DBase) - //! \brief Virtual destructor - virtual ~CVector3DBase() {} - - //! \brief Set zeros - void setZero(); - - //! \brief Is zero? - bool isZero() const + //! Easy access to derived class (CRTP template parameter) + ImplVector const *derived() const { - return this->m_i == 0 && this->m_j == 0 && this->m_k == 0; + return static_cast(this); } - //! \brief Is zero, epsilon considered. - bool isZeroEpsilon() const + //! Easy access to derived class (CRTP template parameter) + ImplVector *derived() { - ImplVector v; - v += *this; - v.round(); - return v.isZero(); + return static_cast(this); } - //! \brief Set all elements the same - void fill(double value); - - //! \brief Get element - double getElement(int row) const; - - //! \brief Set element - void setElement(int row, double value); - - //! \brief Operator [] - double operator[](int row) const { return this->getElement(row); } - - //! \brief Operator [], mutable reference - double &operator[](int row) { return this->getElement(row); } - - //! \brief Equal operator == - bool operator ==(const CVector3DBase &other) const - { - if (this == &other) return true; - return - CMath::epsilonEqual(this->m_i, other.m_i, 1E-9) && - CMath::epsilonEqual(this->m_j, other.m_j, 1E-9) && - CMath::epsilonEqual(this->m_k, other.m_k, 1E-9); - } - - //! \brief Unequal operator != - bool operator !=(const CVector3DBase &other) const - { - return !((*this) == other); - } - - //! \brief Operator += - CVector3DBase &operator +=(const CVector3DBase &other) - { - this->m_i += other.m_i; - this->m_j += other.m_j; - this->m_k += other.m_k; - return *this; - } - - //! \brief Operator + - ImplVector operator +(const ImplVector &other) const - { - ImplVector v = *derived(); - v += other; - return v; - } - - //! \brief Operator -= - CVector3DBase &operator -=(const CVector3DBase &other) - { - this->m_i -= other.m_i; - this->m_j -= other.m_j; - this->m_k -= other.m_k; - return *this; - } - - //! \brief Operator - - ImplVector operator -(const ImplVector &other) const - { - ImplVector v = *derived(); - v -= other; - return v; - } - - //! \brief Multiply with scalar - CVector3DBase &operator *=(double factor) - { - this->m_i *= factor; - this->m_j *= factor; - this->m_k *= factor; - return *this; - } - - //! \brief Multiply with scalar - ImplVector operator *(double factor) const - { - ImplVector v = *derived(); - v *= factor; - return v; - } - - //! \brief Operator to support commutative multiplication - friend ImplVector operator *(double factor, const ImplVector &other) - { - return other * factor; - } - - //! \brief Divide by scalar - CVector3DBase &operator /=(double divisor) - { - this->m_i /= divisor; - this->m_j /= divisor; - this->m_k /= divisor; - return *this; - } - - //! \brief Divide by scalar - ImplVector operator /(double divisor) const - { - ImplVector v = *derived(); - v /= divisor; - return v; - } - - //! \brief Dot product - double dotProduct(const ImplVector &other) const; - - //! \brief Cross product - ImplVector crossProduct(const ImplVector &other) const; - - //! \brief Reciprocal value - ImplVector reciprocalValues() const - { - ImplVector v(1 / this->m_i, 1 / this->m_j, 1 / this->m_j); - return v; - } - - //! \brief Converted to matrix - CMatrix3x1 toMatrix3x1() const; - - //! \copydoc CValueObject::getValueHash - virtual uint getValueHash() const override; - - //! \brief length / magnitude - double length() const - { - return sqrt(this->m_i * this->m_i + this->m_j * this->m_j + this->m_k * this->m_k); - } - - //! \brief Round this vector - void round() - { - const double epsilon = 1E-10; - this->m_i = BlackMisc::Math::CMath::roundEpsilon(this->m_i, epsilon); - this->m_j = BlackMisc::Math::CMath::roundEpsilon(this->m_j, epsilon); - this->m_k = BlackMisc::Math::CMath::roundEpsilon(this->m_k, epsilon); - } - - //! \brief Rounded vector - ImplVector rounded() const - { - ImplVector v = *derived(); - v.round(); - return v; - } - - //! \copydoc CValueObject::toJson - virtual QJsonObject toJson() const override; - - //! \copydoc CValueObject::fromJson - void fromJson(const QJsonObject &json) override; - - //! \brief Register metadata - static void registerMetadata(); }; } // namespace diff --git a/src/blackmisc/namevariantpair.h b/src/blackmisc/namevariantpair.h index f7cd8e495..5854a98e7 100644 --- a/src/blackmisc/namevariantpair.h +++ b/src/blackmisc/namevariantpair.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/namevariantpairlist.cpp b/src/blackmisc/namevariantpairlist.cpp index e824a9e5f..872c88d1e 100644 --- a/src/blackmisc/namevariantpairlist.cpp +++ b/src/blackmisc/namevariantpairlist.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/namevariantpairlist.h b/src/blackmisc/namevariantpairlist.h index 109b728df..599b456fb 100644 --- a/src/blackmisc/namevariantpairlist.h +++ b/src/blackmisc/namevariantpairlist.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/networkutils.h b/src/blackmisc/networkutils.h index 69e4948b2..c3aaf3077 100644 --- a/src/blackmisc/networkutils.h +++ b/src/blackmisc/networkutils.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_NETWORKUTILS_H #define BLACKMISC_NETWORKUTILS_H @@ -12,25 +18,20 @@ namespace BlackMisc { - /*! - * \brief Utilities, e.g. checking whether a network connection can be established - */ + //! Utilities, e.g. checking whether a network connection can be established class CNetworkUtils { - private: - // Constructor - CNetworkUtils() {} public: /*! - * \brief Is a connected interface available? + * Is a connected interface available? * \param withDebugOutput enables some debugging output * \return */ static bool hasConnectedInterface(bool withDebugOutput = false); /*! - * \brief Can connect? + * Can connect? * \param hostAddress 130.4.20.3, or myserver.com * \param port 80, 1234 * \param timeoutMs @@ -40,7 +41,7 @@ namespace BlackMisc static bool canConnect(const QString &hostAddress, quint16 port, QString &message, int timeoutMs = 1500); /*! - * \brief Can connect to server? + * Can connect to server? * \param server * \param message human readable message * \param timeoutMs @@ -60,6 +61,10 @@ namespace BlackMisc //! Valid port static bool isValidPort(const QString &port); + private: + //! Deleted constructor + CNetworkUtils() {} + }; } // namespace diff --git a/src/blackmisc/nwaircraftmapping.cpp b/src/blackmisc/nwaircraftmapping.cpp index 0b778ad59..a66fd1cf4 100644 --- a/src/blackmisc/nwaircraftmapping.cpp +++ b/src/blackmisc/nwaircraftmapping.cpp @@ -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 "nwaircraftmapping.h" using namespace BlackMisc::Aviation; diff --git a/src/blackmisc/nwaircraftmapping.h b/src/blackmisc/nwaircraftmapping.h index 3cbcbdc79..bc2c677ad 100644 --- a/src/blackmisc/nwaircraftmapping.h +++ b/src/blackmisc/nwaircraftmapping.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_NETWORK_AIRCRAFTMAPPING_H #define BLACKMISC_NETWORK_AIRCRAFTMAPPING_H diff --git a/src/blackmisc/nwaircraftmappinglist.cpp b/src/blackmisc/nwaircraftmappinglist.cpp index 61031a863..e11574dd0 100644 --- a/src/blackmisc/nwaircraftmappinglist.cpp +++ b/src/blackmisc/nwaircraftmappinglist.cpp @@ -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 "nwaircraftmappinglist.h" #include "predicates.h" diff --git a/src/blackmisc/nwaircraftmappinglist.h b/src/blackmisc/nwaircraftmappinglist.h index 7ecc72ed2..4c1c062bb 100644 --- a/src/blackmisc/nwaircraftmappinglist.h +++ b/src/blackmisc/nwaircraftmappinglist.h @@ -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_AIRCRAFTMAPPINGLIST_H #define BLACKMISC_AIRCRAFTMAPPINGLIST_H diff --git a/src/blackmisc/nwaircraftmodel.cpp b/src/blackmisc/nwaircraftmodel.cpp index d6357f1c1..b42ae2f9a 100644 --- a/src/blackmisc/nwaircraftmodel.cpp +++ b/src/blackmisc/nwaircraftmodel.cpp @@ -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 "nwaircraftmodel.h" #include diff --git a/src/blackmisc/nwaircraftmodel.h b/src/blackmisc/nwaircraftmodel.h index 46221a151..de1ca787a 100644 --- a/src/blackmisc/nwaircraftmodel.h +++ b/src/blackmisc/nwaircraftmodel.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 BLACKMISC_AIRCRAFTMODEL_H #define BLACKMISC_AIRCRAFTMODEL_H diff --git a/src/blackmisc/nwclient.cpp b/src/blackmisc/nwclient.cpp index 3cec5cd62..935ab60e3 100644 --- a/src/blackmisc/nwclient.cpp +++ b/src/blackmisc/nwclient.cpp @@ -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 "nwclient.h" #include "icon.h" #include diff --git a/src/blackmisc/nwclient.h b/src/blackmisc/nwclient.h index 00f5d8253..42330bcd9 100644 --- a/src/blackmisc/nwclient.h +++ b/src/blackmisc/nwclient.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 BLACKMISC_CLIENT_H #define BLACKMISC_CLIENT_H @@ -18,9 +29,7 @@ namespace BlackMisc { public: - /*! - * Properties by index - */ + //! Properties by index enum ColumnIndex : uint { // user @@ -42,9 +51,7 @@ namespace BlackMisc IndexVoiceCapabilitiesPixmap }; - /*! - * The Capabilities enum - */ + //! The Capabilities enum enum Capabilities { FsdWithInterimPositions, diff --git a/src/blackmisc/nwclientlist.cpp b/src/blackmisc/nwclientlist.cpp index 2bf5ee703..b42e6e7a3 100644 --- a/src/blackmisc/nwclientlist.cpp +++ b/src/blackmisc/nwclientlist.cpp @@ -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 "nwclientlist.h" #include "predicates.h" diff --git a/src/blackmisc/nwclientlist.h b/src/blackmisc/nwclientlist.h index cadecaca2..b30191a08 100644 --- a/src/blackmisc/nwclientlist.h +++ b/src/blackmisc/nwclientlist.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_CLIENTLIST_H #define BLACKMISC_CLIENTLIST_H diff --git a/src/blackmisc/nwserver.cpp b/src/blackmisc/nwserver.cpp index 48772f030..a3de28a94 100644 --- a/src/blackmisc/nwserver.cpp +++ b/src/blackmisc/nwserver.cpp @@ -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 "nwserver.h" #include "blackmisc/blackmiscfreefunctions.h" #include diff --git a/src/blackmisc/nwserver.h b/src/blackmisc/nwserver.h index b63229693..db095565e 100644 --- a/src/blackmisc/nwserver.h +++ b/src/blackmisc/nwserver.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_SERVER_H #define BLACKMISC_SERVER_H @@ -18,10 +24,22 @@ namespace BlackMisc class CServer : public BlackMisc::CValueObject { public: - //! \brief Default constructor. + + //! Properties by index + enum ColumnIndex + { + IndexName = 0, + IndexDescription, + IndexAddress, + IndexPort, + IndexUser, + IndexIsAcceptingConnections + }; + + //! Default constructor. CServer() : m_port(-1), m_isAcceptingConnections(true) {} - //! \brief Constructor. + //! Constructor. CServer(const QString &name, const QString &description, const QString &address, qint32 port, const CUser &user, bool isAcceptingConnections = true) : m_name(name), m_description(description), m_address(address), m_port(port), m_user(user), m_isAcceptingConnections(isAcceptingConnections) {} @@ -31,46 +49,46 @@ namespace BlackMisc //! Get address. const QString &getAddress() const { return m_address; } - //! \brief Set address (e.g. myserver.foo.com) + //! Set address (e.g. myserver.foo.com) void setAddress(const QString &address) { m_address = address; } //! Get user const CUser &getUser() const { return m_user; } - //! \brief Set user + //! Set user void setUser(const CUser &user) { m_user = user; } - //! \brief Get name + //! Get name const QString &getName() const { return m_name; } - //! \brief Set name + //! Set name void setName(const QString &name) { m_name = name; } - //! \brief Get description + //! Get description const QString &getDescription() const { return m_description; } - //! \brief Set description + //! Set description void setDescription(const QString &description) { m_description = description; } - //! \brief Get port + //! Get port qint32 getPort() const { return m_port; } - //! \brief Set port + //! Set port void setPort(qint32 port) { m_port = port; } - //! \brief Server is accepting connections + //! Server is accepting connections bool isAcceptingConnections() const { return m_isAcceptingConnections; } - //! \brief Set whether server is accepting connections + //! Set whether server is accepting connections void setIsAcceptingConnections(bool value) { m_isAcceptingConnections = value; } - //! \brief Is valid for login? + //! Is valid for login? bool isValidForLogin() const; - //! \brief Equal operator == + //! Equal operator == bool operator ==(const CServer &other) const; - //! \brief Unequal operator != + //! Unequal operator != bool operator !=(const CServer &other) const; //! \copydoc CValueObject::getValueHash() @@ -82,30 +100,17 @@ 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 Properties by index - enum ColumnIndex - { - IndexName = 0, - IndexDescription, - IndexAddress, - IndexPort, - IndexUserId, - IndexUserRealName, - IndexUserPassword, - IndexIsAcceptingConnections - }; - //! \copydoc CValueObject::propertyByIndex(int) - QVariant propertyByIndex(int index) const override; + QVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const override; //! \copydoc CValueObject::setPropertyByIndex(const QVariant &, int index) - void setPropertyByIndex(const QVariant &variant, int index) override; + void setPropertyByIndex(const QVariant &variant, const BlackMisc::CPropertyIndex &index) override; protected: //! \copydoc CValueObject::convertToQString() diff --git a/src/blackmisc/nwtextmessage.cpp b/src/blackmisc/nwtextmessage.cpp index 1c0e1ada4..50d0a4262 100644 --- a/src/blackmisc/nwtextmessage.cpp +++ b/src/blackmisc/nwtextmessage.cpp @@ -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 "nwtextmessage.h" #include "blackmisc/blackmiscfreefunctions.h" #include "blackmisc/pqconstants.h" diff --git a/src/blackmisc/nwtextmessage.h b/src/blackmisc/nwtextmessage.h index b335c423b..7dd0bbaf1 100644 --- a/src/blackmisc/nwtextmessage.h +++ b/src/blackmisc/nwtextmessage.h @@ -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_TEXTMESSAGE_H #define BLACKMISC_TEXTMESSAGE_H diff --git a/src/blackmisc/nwtextmessagelist.cpp b/src/blackmisc/nwtextmessagelist.cpp index fdff3aff5..95f31a347 100644 --- a/src/blackmisc/nwtextmessagelist.cpp +++ b/src/blackmisc/nwtextmessagelist.cpp @@ -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 "nwtextmessagelist.h" #include "predicates.h" diff --git a/src/blackmisc/nwtextmessagelist.h b/src/blackmisc/nwtextmessagelist.h index 9572048a1..28df19423 100644 --- a/src/blackmisc/nwtextmessagelist.h +++ b/src/blackmisc/nwtextmessagelist.h @@ -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_TEXTMESSAGELIST_H #define BLACKMISC_TEXTMESSAGELIST_H @@ -27,87 +29,51 @@ namespace BlackMisc class CTextMessageList : public CSequence { public: - /*! - * \brief Empty constructor. - */ + //! Default constructor. CTextMessageList(); - /*! - * \brief Constructor, single private message - */ + //! Constructor, single private message CTextMessageList(const QString &message, const BlackMisc::Aviation::CCallsign &recipientCallsign); - /*! - * \brief Constructor, single private message - */ + //! Constructor, single private message CTextMessageList(const QString &message, const BlackMisc::Aviation::CCallsign &senderCallsign, const BlackMisc::Aviation::CCallsign &recipientCallsign); - /*! - * \brief Constructor, single radio message - */ + //! Constructor, single radio message CTextMessageList(const QString &message, const BlackMisc::PhysicalQuantities::CFrequency &frequency, const BlackMisc::Aviation::CCallsign &senderCallsign = BlackMisc::Aviation::CCallsign()); - /*! - * \brief Constructor, single message - */ + //! Constructor, single message CTextMessageList(const CTextMessage &message); - /*! - * \brief Constructor, multi-frequency radio messages - */ + //! Constructor, multi-frequency radio messages CTextMessageList(const QString &message, const QList &frequencies, const BlackMisc::Aviation::CCallsign &sender = BlackMisc::Aviation::CCallsign()); - /*! - * \brief Construct from a base class object. - */ + //! Construct from a base class object. CTextMessageList(const CSequence &other); - /*! - * \brief QVariant, required for DBus QVariant lists - */ - virtual QVariant toQVariant() const - { - return QVariant::fromValue(*this); - } + //! \copydoc CValueObject::toQVariant + virtual QVariant toQVariant() const { return QVariant::fromValue(*this); } - /*! - * \brief Private messages - */ + //! Private messages CTextMessageList getPrivateMessages() const; - /*! - * \brief Contains private messages? - * \return - */ + //! Contains private messages? bool containsPrivateMessages() const; - /*! - * \brief Public messages - */ + //! Public messages CTextMessageList getRadioMessages() const; - /*! - * \brief Contains radio messages? - */ + //! Contains radio messages? bool containsRadioMessages() const; - /*! - * \brief Find by frequency - */ + //! Find by frequency CTextMessageList findByFrequency(const BlackMisc::PhysicalQuantities::CFrequency &frequency) const; - /*! - * \brief Toggle all sender receivers - */ + //! Toggle all sender receivers void toggleSenderRecipients(); - /*! - * \brief Register metadata - */ + //! Register metadata static void registerMetadata(); - }; - } //namespace } // namespace diff --git a/src/blackmisc/nwuser.cpp b/src/blackmisc/nwuser.cpp index 421c60b4a..39780803f 100644 --- a/src/blackmisc/nwuser.cpp +++ b/src/blackmisc/nwuser.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ @@ -138,7 +138,7 @@ namespace BlackMisc } /* - * To JSON + * From JSON */ void CUser::fromJson(const QJsonObject &json) { diff --git a/src/blackmisc/nwuser.h b/src/blackmisc/nwuser.h index c0d2d2501..0ced05699 100644 --- a/src/blackmisc/nwuser.h +++ b/src/blackmisc/nwuser.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ @@ -29,7 +29,7 @@ namespace BlackMisc public: /*! - * \brief Properties by index + * Properties by index */ enum ColumnIndex { @@ -66,7 +66,7 @@ namespace BlackMisc //! Get full name. QString getRealName() const { return m_realname; } - //! \brief setRealName + //! setRealName void setRealName(const QString &realname) { m_realname = realname.trimmed(); } //! Get password @@ -75,34 +75,34 @@ namespace BlackMisc //! Set password void setPassword(const QString &pw) { m_password = pw.trimmed(); } - //! \brief Valid user object? + //! Valid user object? bool isValid() const { return !this->m_realname.isEmpty() && !this->m_id.isEmpty(); } - //! \brief Valid credentials? + //! Valid credentials? bool hasValidCredentials() const { return this->isValid() && !this->m_password.isEmpty(); } - //! \brief Valid real name? + //! Valid real name? bool hasValidRealName() const { return !this->m_realname.isEmpty(); } - //! \brief Valid id? + //! Valid id? bool hasValidId() const { return !this->m_id.isEmpty(); } - //! \brief Has associated callsign? + //! Has associated callsign? bool hasValidCallsign() const { return !m_callsign.isEmpty(); } - //! \brief Get email. + //! Get email. QString getEmail() const { return m_email; } - //! \brief Set email. + //! Set email. void setEmail(const QString &email) { m_email = email.trimmed(); } - //! \brief Valid email? + //! Valid email? bool hasValidEmail() const { return !this->m_email.isEmpty(); } - //! \brief Get id. + //! Get id. QString getId() const { return m_id; } - //! \brief Set id + //! Set id void setId(const QString &id) { m_id = id.trimmed(); } //! Homebase @@ -111,19 +111,19 @@ namespace BlackMisc //! Set homebase void setHomebase(const BlackMisc::Aviation::CAirportIcao &homebase) { this->m_homebase = homebase; } - //! \brief Get associated callsign. + //! Get associated callsign. const BlackMisc::Aviation::CCallsign &getCallsign() const { return m_callsign; } - //! \brief Set associated callsign + //! Set associated callsign void setCallsign(const BlackMisc::Aviation::CCallsign &callsign) { m_callsign = callsign; } //! \copydoc CValueObject::toIcon() virtual BlackMisc::CIcon toIcon() const override { return this->getCallsign().toIcon(); } - //! \brief Equal operator == + //! Equal operator == bool operator ==(const CUser &other) const; - //! \brief Unequal operator != + //! Unequal operator != bool operator !=(const CUser &other) const; //! \copydoc CValueObject::getValueHash() @@ -135,10 +135,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(); /*! diff --git a/src/blackmisc/nwuserlist.h b/src/blackmisc/nwuserlist.h index 436069454..c5a563f37 100644 --- a/src/blackmisc/nwuserlist.h +++ b/src/blackmisc/nwuserlist.h @@ -21,7 +21,7 @@ namespace BlackMisc class CUserList : public CSequence { public: - //! \brief Default constructor. + //! Default constructor. CUserList(); //! Construct from a base class object. diff --git a/src/blackmisc/nwvoicecapabilites.cpp b/src/blackmisc/nwvoicecapabilites.cpp index b446b14de..75b05af98 100644 --- a/src/blackmisc/nwvoicecapabilites.cpp +++ b/src/blackmisc/nwvoicecapabilites.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/nwvoicecapabilities.h b/src/blackmisc/nwvoicecapabilities.h index 32c54e3fd..084328b80 100644 --- a/src/blackmisc/nwvoicecapabilities.h +++ b/src/blackmisc/nwvoicecapabilities.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/pqacceleration.h b/src/blackmisc/pqacceleration.h index 974a834d6..41edcdc78 100644 --- a/src/blackmisc/pqacceleration.h +++ b/src/blackmisc/pqacceleration.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_PQACCELERATION_H #define BLACKMISC_PQACCELERATION_H diff --git a/src/blackmisc/pqangle.cpp b/src/blackmisc/pqangle.cpp index c5fd8e68b..592f4df20 100644 --- a/src/blackmisc/pqangle.cpp +++ b/src/blackmisc/pqangle.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/pqangle.h b/src/blackmisc/pqangle.h index 44595fc55..a45a56662 100644 --- a/src/blackmisc/pqangle.h +++ b/src/blackmisc/pqangle.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ @@ -55,10 +55,10 @@ namespace BlackMisc degrees + minutes / 100.0, CAngleUnit::sexagesimalDegMin()) {} - //! \copydoc CValueObject::toQVariant + //! \copydoc CValueObject::toQVariant virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); } - - //! \copydoc CValueObject::toQVariant + + //! \copydoc CValueObject::toIcon virtual BlackMisc::CIcon toIcon() const override; //! Virtual destructor diff --git a/src/blackmisc/pqbase.cpp b/src/blackmisc/pqbase.cpp index 3a40c5692..594987937 100644 --- a/src/blackmisc/pqbase.cpp +++ b/src/blackmisc/pqbase.cpp @@ -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 #include "blackmisc/pqbase.h" #include "blackmisc/mathematics.h" @@ -95,8 +101,8 @@ namespace BlackMisc return 0; } - /*! - * \brief Register metadata of unit and quantity + /* + * Register metadata of unit and quantity */ void CMeasurementUnit::registerMetadata() { diff --git a/src/blackmisc/pqbase.h b/src/blackmisc/pqbase.h index 80ec73734..8a5b13a2c 100644 --- a/src/blackmisc/pqbase.h +++ b/src/blackmisc/pqbase.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_PQBASE_H #define BLACKMISC_PQBASE_H @@ -23,7 +29,7 @@ namespace BlackMisc namespace PhysicalQuantities { /*! - * \brief Base class for all units, such as meter, hertz. + * Base class for all units, such as meter, hertz. */ class CMeasurementUnit : public CValueObject { @@ -53,7 +59,7 @@ namespace BlackMisc }; /*! - * \brief Converter for default values, such as None, used with public constructor + * Converter for default values, such as None, used with public constructor */ struct NilConverter : public Converter { @@ -148,49 +154,49 @@ namespace BlackMisc { static double factor() { return 1; } //!< factor \return }; - //! \brief 2 (two) + //! 2 (two) template struct Two { static double factor() { return Policy::factor() * 2.0; } //!< factor \return }; - //! \brief 10^-3 + //! 10^-3 template struct Milli { static double factor() { return Policy::factor() / 1000.0; } //!< factor \return }; template - //! \brief 10^-2 + //! 10^-2 struct Centi { static double factor() { return Policy::factor() / 100.0; } //!< factor \return }; - //! \brief 10^2 + //! 10^2 template struct Hecto { static double factor() { return Policy::factor() * 100.0; } //!< factor \return }; - //! \brief 10^3 + //! 10^3 template struct Kilo { static double factor() { return Policy::factor() * 1000.0; } //!< factor \return }; - //! \brief 10^6 + //! 10^6 template struct Mega { static double factor() { return Policy::factor() * 1e+6; } //!< factor \return }; - //! \brief 10^9 + //! 10^9 template struct Giga { static double factor() { return Policy::factor() * 1e+9; } //!< factor \return }; - //! \brief in each hundred + //! in each hundred template struct InEachHundred { @@ -258,10 +264,8 @@ namespace BlackMisc } public: - /*! - * \brief Default constructor for meta system - * \remarks Only public because the need, to use this with the metasystem - */ + //! Default constructor for meta system + //! \remarks Only public because the need, to use this with the metasystem CMeasurementUnit() : m_name("none"), m_symbol(""), m_epsilon(0), m_displayDigits(0) {} @@ -274,27 +278,19 @@ namespace BlackMisc return QVariant::fromValue(*this); } - /*! - * \brief Equal operator == - */ + //! Equal operator == bool operator == (const CMeasurementUnit &other) const; - /*! - * \brief Unequal operator != - */ + //! Unequal operator != bool operator != (const CMeasurementUnit &other) const; - /*! - * \brief Name such as "meter" - */ + //! Name such as "meter" QString getName(bool i18n = false) const { return i18n ? QCoreApplication::translate("CMeasurementUnit", this->m_name.toStdString().c_str()) : this->m_name; } - /*! - * \brief Unit name such as "m" - */ + //! Unit name such as "m" QString getSymbol(bool i18n = false) const { return i18n ? QCoreApplication::translate("CMeasurementUnit", this->m_symbol.toStdString().c_str()) : this->m_symbol; @@ -308,48 +304,31 @@ namespace BlackMisc return qHash(this->getName()); } - /*! - * \brief Rounded value - */ + //! Rounded value double roundValue(double value, int digits = -1) const; - /*! - * Rounded string utility method, virtual so units can have - * specialized formatting - */ + //! Rounded string utility method, virtual so units can have specialized formatting virtual QString makeRoundedQString(double value, int digits = -1, bool i18n = false) const; - /*! - * \brief Value rounded with unit, e.g. "5.00m", "30kHz" - */ + //! Value rounded with unit, e.g. "5.00m", "30kHz" virtual QString makeRoundedQStringWithUnit(double value, int digits = -1, bool i18n = false) const; - /*! - * \brief Threshold for rounding - */ + //! Threshold for rounding double getEpsilon() const { return this->m_epsilon; } - /*! - * \brief getDisplayDigits - */ + //! Display digits int getDisplayDigits() const { return this->m_displayDigits; } - /*! - * Convert from other unit to this unit. - * \param value other value - * \param unit other unit - */ + //! Convert from other unit to this unit. double convertFrom(double value, const CMeasurementUnit &unit) const; - /*! - * \brief Is given value <= epsilon? - */ + //! Is given value <= epsilon? bool isEpsilon(double value) const { if (this->isNull()) return false; @@ -357,9 +336,7 @@ namespace BlackMisc return abs(value) <= this->m_epsilon; } - /*! - * \brief Is unit null? - */ + //! Is unit null? bool isNull() const { return this->m_converter.data() == nullptr; @@ -370,7 +347,7 @@ namespace BlackMisc // -------------------------------------------------------------------- /*! - * \brief Unit from symbol + * Unit from symbol * \param symbol must be a valid unit symbol (without i18n) or empty string (empty means default unit) * \param strict strict check means if unit is not found, program terminates */ @@ -387,7 +364,7 @@ namespace BlackMisc } /*! - * \brief Valid unit symbol? + * Valid unit symbol? * \param symbol to be tested * \param caseSensitivity check case sensitiv? */ @@ -403,18 +380,14 @@ namespace BlackMisc return false; } - /*! - * \brief Dimensionless unit - */ + //! Dimensionless unit static CMeasurementUnit &None() { static CMeasurementUnit none("none", "", NilConverter(), 0, 0); return none; } - /*! - * \brief Metadata, mainly needed for None - */ + //! Metadata, mainly needed for None static void registerMetadata(); }; diff --git a/src/blackmisc/pqconstants.h b/src/blackmisc/pqconstants.h index fa67d9a4e..7ac67b749 100644 --- a/src/blackmisc/pqconstants.h +++ b/src/blackmisc/pqconstants.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_PQCONSTANTS_H #define BLACKMISC_PQCONSTANTS_H @@ -10,108 +16,80 @@ namespace BlackMisc { -namespace PhysicalQuantities -{ - -/*! - * \brief Physical quantities constants - */ -class CPhysicalQuantitiesConstants -{ -public: - /*! - * \brief Tripe point of purified water, 0.01°C - * \return - */ - static const CTemperature& TemperatureTriplePointOfVSMOW() + namespace PhysicalQuantities { - static CTemperature t(-273.16, CTemperatureUnit::K()); - return t; - } - /*! - * \brief Temperature absolute Zero in °C - * \return - */ - static const CTemperature& TemperatureAbsoluteZeroC() - { - static CTemperature t(-273.15, CTemperatureUnit::C()); - return t; - } + /*! + * Physical quantities constants + */ + class CPhysicalQuantitiesConstants + { + public: + //! Triple point of purified water, 0.01°C + static const CTemperature &TemperatureTriplePointOfVSMOW() + { + static CTemperature t(-273.16, CTemperatureUnit::K()); + return t; + } - /*! - * \brief International Standard Atmosphere pressure at mean sea level, 1013.25hPa - * \return - */ - static const CPressure& ISASeaLevelPressure() - { - static CPressure p(1013.25, CPressureUnit::hPa()); - return p; - } + //! Temperature absolute Zero in °C + static const CTemperature &TemperatureAbsoluteZeroC() + { + static CTemperature t(-273.15, CTemperatureUnit::C()); + return t; + } - /*! - * \brief ICAO standard pressure datum for flight levels, 1013.2hPa - * \return - */ - static const CPressure& ICAOFlightLevelPressure() - { - static CPressure p(1013.2, CPressureUnit::hPa()); - return p; - } + //! International Standard Atmosphere pressure at mean sea level, 1013.25hPa + static const CPressure &ISASeaLevelPressure() + { + static CPressure p(1013.25, CPressureUnit::hPa()); + return p; + } - /*! - * \brief Standard pressure datum for flight levels in USA, Canada, parts of Latin America, 29.92inHg - * \return - */ - static const CPressure& USFlightLevelPressure() - { - static CPressure p(29.92, CPressureUnit::inHg()); - return p; - } + //! ICAO standard pressure datum for flight levels, 1013.2hPa + static const CPressure &ICAOFlightLevelPressure() + { + static CPressure p(1013.2, CPressureUnit::hPa()); + return p; + } - /*! - * \brief Standard pressure datum for flight levels expressed in mmHg, such as in Russia, 760mmHg - * \return - */ - static const CPressure& RuFlightLevelPressure() - { - static CPressure p(760, CPressureUnit::mmHg()); - return p; - } + //! Standard pressure datum for flight levels in USA, Canada, parts of Latin America, 29.92inHg + static const CPressure &USFlightLevelPressure() + { + static CPressure p(29.92, CPressureUnit::inHg()); + return p; + } - /*! - * \brief Unicom frequency - * \return - */ - static const CFrequency& FrequencyUnicom() - { - static CFrequency f(122.8, CFrequencyUnit::MHz()); - return f; - } + //! Standard pressure datum for flight levels expressed in mmHg, such as in Russia, 760mmHg + static const CPressure &RuFlightLevelPressure() + { + static CPressure p(760, CPressureUnit::mmHg()); + return p; + } - /*! - * \brief Civil aircraft emergency frequency - * \return - */ - static const CFrequency& FrequencyInternationalAirDistress() - { - static CFrequency f(121.5, CFrequencyUnit::MHz()); - return f; - } + //! Unicom frequency + static const CFrequency &FrequencyUnicom() + { + static CFrequency f(122.8, CFrequencyUnit::MHz()); + return f; + } - /*! - * \brief Military aircraft emergency frequency - * \return - */ + //! Civil aircraft emergency frequency + static const CFrequency &FrequencyInternationalAirDistress() + { + static CFrequency f(121.5, CFrequencyUnit::MHz()); + return f; + } - static const CFrequency& FrequencyMilitaryAirDistress() - { - static CFrequency f(243.0, CFrequencyUnit::MHz()); - return f; - } -}; + //! Military aircraft emergency frequency + static const CFrequency &FrequencyMilitaryAirDistress() + { + static CFrequency f(243.0, CFrequencyUnit::MHz()); + return f; + } + }; -} // namespace + } // namespace } // namespace #endif // guard diff --git a/src/blackmisc/pqfrequency.h b/src/blackmisc/pqfrequency.h index ca8f50ad8..6f6c3005e 100644 --- a/src/blackmisc/pqfrequency.h +++ b/src/blackmisc/pqfrequency.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_PQFREQUENCY_H #define BLACKMISC_PQFREQUENCY_H @@ -12,7 +18,7 @@ namespace BlackMisc namespace PhysicalQuantities { /*! - * \brief Physical unit frequency + * Physical unit frequency */ class CFrequency : public CPhysicalQuantity { @@ -35,9 +41,7 @@ namespace BlackMisc return QVariant::fromValue(*this); } - /*! - * \brief Virtual destructor - */ + //! Virtual destructor virtual ~CFrequency() {} }; diff --git a/src/blackmisc/pqlength.h b/src/blackmisc/pqlength.h index 91b5ec90d..d5b9a8358 100644 --- a/src/blackmisc/pqlength.h +++ b/src/blackmisc/pqlength.h @@ -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_PQLENGTH_H #define BLACKMISC_PQLENGTH_H diff --git a/src/blackmisc/pqmass.h b/src/blackmisc/pqmass.h index 2c27494a0..8254b5076 100644 --- a/src/blackmisc/pqmass.h +++ b/src/blackmisc/pqmass.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_PQMASS_H #define BLACKMISC_PQMASS_H @@ -13,7 +19,7 @@ namespace BlackMisc { /*! - * \brief Mass + * Mass */ class CMass : public CPhysicalQuantity { diff --git a/src/blackmisc/pqphysicalquantity.cpp b/src/blackmisc/pqphysicalquantity.cpp index eff0817ff..a284169af 100644 --- a/src/blackmisc/pqphysicalquantity.cpp +++ b/src/blackmisc/pqphysicalquantity.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/pqphysicalquantity.h b/src/blackmisc/pqphysicalquantity.h index 8a238678c..7f72cf4ba 100644 --- a/src/blackmisc/pqphysicalquantity.h +++ b/src/blackmisc/pqphysicalquantity.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ @@ -31,60 +31,12 @@ namespace BlackMisc */ template class CPhysicalQuantity : public BlackMisc::CValueObject { - - private: - double m_value; //!< numeric part - MU m_unit; //!< unit part - - //! Which subclass of CMeasurementUnit is used? - typedef MU UnitClass; - - //! Easy access to derived class (CRTP template parameter) - PQ const *derived() const - { - return static_cast(this); - } - - //! Easy access to derived class (CRTP template parameter) - PQ *derived() - { - return static_cast(this); - } - - protected: - //! Constructor with double - CPhysicalQuantity(double value, const MU &unit); - - //! Copy constructor - CPhysicalQuantity(const CPhysicalQuantity &other); - - //! Constructor by parsed string, e.g. 10m - CPhysicalQuantity(const QString &unitString) : m_value(0.0), m_unit(MU::nullUnit()) - { - this->parseFromString(unitString); - } - - //! \copydoc CValueObject::convertToQString - virtual QString convertToQString(bool i18n = false) const override; - - //! \copydoc CValueObject::getMetaTypeId - virtual int getMetaTypeId() const override; - - //! \copydoc CValueObject::isA - virtual bool isA(int metaTypeId) const override; - - //! \copydoc CValueObject::compareImpl - virtual int compareImpl(const CValueObject &other) const override; - public: //! Virtual destructor virtual ~CPhysicalQuantity() {} //! Unit - MU getUnit() const - { - return this->m_unit; - } + MU getUnit() const { return this->m_unit; } /*! * \brief Simply set unit, do no calclulate conversion @@ -169,10 +121,7 @@ namespace BlackMisc PQ operator *(double multiply) const; //! Operator to support commutative multiplication - friend PQ operator *(double factor, const PQ &other) - { - return other * factor; - } + friend PQ operator *(double factor, const PQ &other) { return other * factor; } //! Operator / PQ operator /(double divide) const; @@ -208,10 +157,7 @@ namespace BlackMisc PQ operator -(const PQ &other) const; //! Quantity value <= epsilon - bool isZeroEpsilonConsidered() const - { - return this->m_unit.isEpsilon(this->m_value); - } + bool isZeroEpsilonConsidered() const { return this->m_unit.isEpsilon(this->m_value); } //! Value >= 0 epsilon considered bool isPositiveWithEpsilonConsidered() const @@ -266,8 +212,45 @@ namespace BlackMisc //! Register metadata of unit and quantity static void registerMetadata(); - }; + protected: + //! Constructor with double + CPhysicalQuantity(double value, const MU &unit); + + //! Copy constructor + CPhysicalQuantity(const CPhysicalQuantity &other); + + //! Constructor by parsed string, e.g. 10m + CPhysicalQuantity(const QString &unitString) : m_value(0.0), m_unit(MU::nullUnit()) + { + this->parseFromString(unitString); + } + + //! \copydoc CValueObject::convertToQString + virtual QString convertToQString(bool i18n = false) const override; + + //! \copydoc CValueObject::getMetaTypeId + virtual int getMetaTypeId() const override; + + //! \copydoc CValueObject::isA + virtual bool isA(int metaTypeId) const override; + + //! \copydoc CValueObject::compareImpl + virtual int compareImpl(const CValueObject &other) const override; + + private: + double m_value; //!< numeric part + MU m_unit; //!< unit part + + //! Which subclass of CMeasurementUnit is used? + typedef MU UnitClass; + + //! Easy access to derived class (CRTP template parameter) + PQ const *derived() const { return static_cast(this); } + + //! Easy access to derived class (CRTP template parameter) + PQ *derived() { return static_cast(this); } + }; } // namespace } // namespace diff --git a/src/blackmisc/pqpressure.h b/src/blackmisc/pqpressure.h index 6cf2fc211..594b736f3 100644 --- a/src/blackmisc/pqpressure.h +++ b/src/blackmisc/pqpressure.h @@ -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_PQPRESSURE_H #define BLACKMISC_PQPRESSURE_H @@ -14,7 +20,7 @@ namespace BlackMisc { /*! - * \brief Physical unit distance + * Physical unit distance */ class CPressure : public CPhysicalQuantity { diff --git a/src/blackmisc/pqspeed.h b/src/blackmisc/pqspeed.h index 60ecb3c9a..2c58dc483 100644 --- a/src/blackmisc/pqspeed.h +++ b/src/blackmisc/pqspeed.h @@ -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_CSPEED_H #define BLACKMISC_CSPEED_H @@ -13,7 +19,7 @@ namespace BlackMisc { /*! - * \brief Speed class, e.g. "m/s", "NM/h", "km/h", "ft/s" + * Speed class, e.g. "m/s", "NM/h", "km/h", "ft/s" */ class CSpeed : public CPhysicalQuantity { @@ -43,4 +49,4 @@ namespace BlackMisc Q_DECLARE_METATYPE(BlackMisc::PhysicalQuantities::CSpeed) -#endif // BLACKMISC_CSPEED_H +#endif // guard diff --git a/src/blackmisc/pqstring.cpp b/src/blackmisc/pqstring.cpp index 2fd3a43f3..222100088 100644 --- a/src/blackmisc/pqstring.cpp +++ b/src/blackmisc/pqstring.cpp @@ -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 "pqstring.h" #include "tuple.h" #include "pqallquantities.h" diff --git a/src/blackmisc/pqstring.h b/src/blackmisc/pqstring.h index 2d5c6169b..ae37d5bc1 100644 --- a/src/blackmisc/pqstring.h +++ b/src/blackmisc/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_PQSTRING_H #define BLACKMISC_PQSTRING_H diff --git a/src/blackmisc/pqtemperature.h b/src/blackmisc/pqtemperature.h index 2ed01460f..d8f379629 100644 --- a/src/blackmisc/pqtemperature.h +++ b/src/blackmisc/pqtemperature.h @@ -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_CTEMPERATURE_H #define BLACKMISC_CTEMPERATURE_H @@ -13,7 +19,7 @@ namespace BlackMisc { /*! - * \brief Physical unit temperature + * Physical unit temperature */ class CTemperature : public CPhysicalQuantity { diff --git a/src/blackmisc/pqtime.cpp b/src/blackmisc/pqtime.cpp index 4188f60e8..eec988735 100644 --- a/src/blackmisc/pqtime.cpp +++ b/src/blackmisc/pqtime.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/pqtime.h b/src/blackmisc/pqtime.h index e87f52f7b..a11c27db2 100644 --- a/src/blackmisc/pqtime.h +++ b/src/blackmisc/pqtime.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/pqunits.cpp b/src/blackmisc/pqunits.cpp index 50d48fe86..8cf930360 100644 --- a/src/blackmisc/pqunits.cpp +++ b/src/blackmisc/pqunits.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/pqunits.h b/src/blackmisc/pqunits.h index b3b10e6f2..8f03c4899 100644 --- a/src/blackmisc/pqunits.h +++ b/src/blackmisc/pqunits.h @@ -1,10 +1,10 @@ /* 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, - * including this file, may be copied, modified, propagated, or distributed except according to the terms - * contained in the LICENSE file. +//! 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 @@ -32,9 +32,7 @@ namespace BlackMisc namespace PhysicalQuantities { - /*! - * Specialized class for distance units (meter, foot, nautical miles). - */ + //! Specialized class for distance units (meter, foot, nautical miles). class CLengthUnit : public CMeasurementUnit { private: @@ -55,9 +53,7 @@ namespace BlackMisc typedef One MetersToMeters; public: - /*! - * Default constructor, required for Qt Metasystem - */ + //! Default constructor, required for Qt Metasystem CLengthUnit() : CMeasurementUnit(defaultUnit()) {} /*! @@ -68,86 +64,66 @@ namespace BlackMisc return QVariant::fromValue(*this); } - /*! - * Default unit - */ + //! Default unit static const CLengthUnit &defaultUnit() { return m(); } - /*! - * Null unit - */ + //! Null unit static const CLengthUnit &nullUnit() { static CLengthUnit nu("null", "null", nullptr); return nu; } - /*! - * Meter m - */ + //! Meter m static const CLengthUnit &m() { static CLengthUnit m(QT_TRANSLATE_NOOP("CMeasurementUnit", "meter"), "m", IdentityConverter()); return m; } - /*! - * Nautical miles NM - */ + //! Nautical miles NM static const CLengthUnit &NM() { static CLengthUnit NM(QT_TRANSLATE_NOOP("CMeasurementUnit", "nautical mile"), "NM", LinearConverter(), 3); return NM; } - /*! - * Foot ft - */ + //! Foot ft static const CLengthUnit &ft() { static CLengthUnit ft(QT_TRANSLATE_NOOP("CMeasurementUnit", "foot"), "ft", LinearConverter(), 1); return ft; } - /*! - * Kilometer km - */ + //! Kilometer km static const CLengthUnit &km() { static CLengthUnit km(QT_TRANSLATE_NOOP("CMeasurementUnit", "kilometer"), "km", LinearConverter >(), 3); return km; } - /*! - * Centimeter cm - */ + //! Centimeter cm static const CLengthUnit &cm() { static CLengthUnit cm(QT_TRANSLATE_NOOP("CMeasurementUnit", "centimeter"), "cm", LinearConverter >(), 1); return cm; } - /*! - * International mile - */ + //! International mile static const CLengthUnit &mi() { static CLengthUnit mi(QT_TRANSLATE_NOOP("CMeasurementUnit", "mile"), "mi", LinearConverter(), 3); return mi; } - /*! - * Statute mile - */ + //! Statute mile static const CLengthUnit &SM() { static CLengthUnit sm(QT_TRANSLATE_NOOP("CMeasurementUnit", "statute mile"), "SM", LinearConverter(), 3); return sm; } - /*! - * All units - */ + //! All units static const QList &allUnits() { static QList u; @@ -166,9 +142,7 @@ namespace BlackMisc } protected: - /*! - * \copydoc CValueObject::unmarshallFromDbus - */ + //! \copydoc CValueObject::unmarshallFromDbus virtual void unmarshallFromDbus(const QDBusArgument &argument) override { QString unitName; @@ -177,9 +151,7 @@ namespace BlackMisc } }; - /*! - * Specialized class for angles (degrees, radian). - */ + //! Specialized class for angles (degrees, radian). class CAngleUnit : public CMeasurementUnit { private: @@ -196,9 +168,7 @@ namespace BlackMisc typedef One DegreesToDegrees; public: - /*! - * Default constructor, required for Qt Metasystem - */ + //! Default constructor, required for Qt Metasystem CAngleUnit() : CMeasurementUnit(defaultUnit()) {} /*! @@ -209,46 +179,34 @@ namespace BlackMisc return QVariant::fromValue(*this); } - /*! - * Default unit - */ + //! Default unit static const CAngleUnit &defaultUnit() { return deg(); } - /*! - * Null unit - */ + //! Null unit static const CAngleUnit &nullUnit() { static CAngleUnit nu("null", "null", nullptr); return nu; } - /*! - * \copydoc CMeasurementUnit::makeRoundedQStringWithUnit - */ + //! \copydoc CMeasurementUnit::makeRoundedQStringWithUnit virtual QString makeRoundedQStringWithUnit(double value, int digits = -1, bool i18n = false) const override; - /*! - * Radians - */ + //! Radians static const CAngleUnit &rad() { static CAngleUnit rad(QT_TRANSLATE_NOOP("CMeasurementUnit", "radian"), "rad", LinearConverter()); return rad; } - /*! - * Degrees - */ + //! Degrees static const CAngleUnit °() { static CAngleUnit deg(QT_TRANSLATE_NOOP("CMeasurementUnit", "degree"), QT_TRANSLATE_NOOP("CMeasurementUnit", "deg"), IdentityConverter()); return deg; } - /*! - * Sexagesimal degree (degrees, minutes, seconds, decimal seconds) - */ + //! Sexagesimal degree (degrees, minutes, seconds, decimal seconds) static const CAngleUnit &sexagesimalDeg() { static CAngleUnit deg(QT_TRANSLATE_NOOP("CMeasurementUnit", "degree, minute, second"), "DMS", SubdivisionConverter2 >(), 4); @@ -257,9 +215,8 @@ namespace BlackMisc (void)QT_TRANSLATE_NOOP("CMeasurementUnit", "-%L1 %L2 %L3"); } - /*! - * Sexagesimal degree (degrees, minutes, decimal minutes) - */ + + //! Sexagesimal degree (degrees, minutes, decimal minutes) static const CAngleUnit &sexagesimalDegMin() { static CAngleUnit deg(QT_TRANSLATE_NOOP("CMeasurementUnit", "degree, minute"), "MinDec", SubdivisionConverter >(), 4); @@ -268,9 +225,7 @@ namespace BlackMisc (void)QT_TRANSLATE_NOOP("CMeasurementUnit", "-%L1 %L2"); } - /*! - * All units - */ + //! All units static const QList &allUnits() { static QList u; @@ -286,9 +241,7 @@ namespace BlackMisc } protected: - /*! - * \copydoc CValueObject::unmarshallFromDbus - */ + //! \copydoc CValueObject::unmarshallFromDbus virtual void unmarshallFromDbus(const QDBusArgument &argument) override { QString unitName; @@ -297,9 +250,7 @@ namespace BlackMisc } }; - /*! - * Specialized class for frequency (hertz, mega hertz, kilo hertz). - */ + //! Specialized class for frequency (hertz, mega hertz, kilo hertz). class CFrequencyUnit : public CMeasurementUnit { private: @@ -315,9 +266,7 @@ namespace BlackMisc typedef One HertzToHertz; public: - /*! - * Default constructor, required for Qt Metasystem - */ + //! Default constructor, required for Qt Metasystem CFrequencyUnit() : CMeasurementUnit(defaultUnit()) {} /*! @@ -328,59 +277,45 @@ namespace BlackMisc return QVariant::fromValue(*this); } - /*! - * Default unit - */ + //! Default unit static const CFrequencyUnit &defaultUnit() { return Hz(); } - /*! - * Null unit - */ + //! Null unit static const CFrequencyUnit &nullUnit() { static CFrequencyUnit nu("null", "null", nullptr); return nu; } - /*! - * Hertz - */ + //! Hertz static const CFrequencyUnit &Hz() { static CFrequencyUnit Hz(QT_TRANSLATE_NOOP("CMeasurementUnit", "hertz"), "Hz", IdentityConverter()); return Hz; } - /*! - * Kilohertz - */ + //! Kilohertz static const CFrequencyUnit &kHz() { static CFrequencyUnit kHz(QT_TRANSLATE_NOOP("CMeasurementUnit", "kilohertz"), "kHz", LinearConverter >(), 1); return kHz; } - /*! - * Megahertz - */ + //! Megahertz static const CFrequencyUnit &MHz() { static CFrequencyUnit MHz(QT_TRANSLATE_NOOP("CMeasurementUnit", "megahertz"), "MHz", LinearConverter >(), 2); return MHz; } - /*! - * Gigahertz - */ + //! Gigahertz static const CFrequencyUnit &GHz() { static CFrequencyUnit GHz(QT_TRANSLATE_NOOP("CMeasurementUnit", "gigahertz"), "GHz", LinearConverter >(), 2); return GHz; } - /*! - * All units - */ + //! All units static const QList &allUnits() { static QList u; @@ -396,9 +331,7 @@ namespace BlackMisc } protected: - /*! - * \copydoc CValueObject::unmarshallFromDbus - */ + //! \copydoc CValueObject::unmarshallFromDbus virtual void unmarshallFromDbus(const QDBusArgument &argument) override { QString unitName; @@ -407,9 +340,7 @@ namespace BlackMisc } }; - /*! - * Specialized class for mass units (kg, lbs). - */ + //! Specialized class for mass units (kg, lbs). class CMassUnit : public CMeasurementUnit { private: @@ -426,9 +357,7 @@ namespace BlackMisc struct PoundsToKilograms { static double factor() { return 0.45359237; } }; public: - /*! - * Default constructor, required for Qt Metasystem - */ + //! Default constructor, required for Qt Metasystem CMassUnit() : CMeasurementUnit(defaultUnit()) {} /*! @@ -439,68 +368,52 @@ namespace BlackMisc return QVariant::fromValue(*this); } - /*! - * Default unit - */ + //! Default unit static const CMassUnit &defaultUnit() { return kg(); } - /*! - * Null unit - */ + //! Null unit static const CMassUnit &nullUnit() { static CMassUnit nu("null", "null", nullptr); return nu; } - /*! - * Kilogram, SI base unit - */ + //! Kilogram, SI base unit static const CMassUnit &kg() { static CMassUnit kg(QT_TRANSLATE_NOOP("CMeasurementUnit", "kilogram"), "kg", IdentityConverter(), 1); return kg; } - /*! - * Gram, SI unit - */ + //! Gram, SI unit static const CMassUnit &g() { static CMassUnit g(QT_TRANSLATE_NOOP("CMeasurementUnit", "gram"), "g", LinearConverter(), 0); return g; } - /*! - * Tonne, aka metric ton (1000kg) - */ + //! Tonne, aka metric ton (1000kg) static const CMassUnit &tonne() { static CMassUnit t(QT_TRANSLATE_NOOP("CMeasurementUnit", "tonne"), "t", LinearConverter >(), 3); return t; } - /*! - * Short ton (2000lb) used in the United States - */ + //! Short ton (2000lb) used in the United States static const CMassUnit &shortTon() { static CMassUnit ton(QT_TRANSLATE_NOOP("CMeasurementUnit", "short ton"), "ton", LinearConverter > >(), 3); return ton; } - /*! - * Pound, aka mass pound - */ + //! Pound, aka mass pound static const CMassUnit &lb() { static CMassUnit lbs(QT_TRANSLATE_NOOP("CMeasurementUnit", "pound"), "lb", LinearConverter(), 1); return lbs; } - /*! - * All units - */ + //! All units static const QList &allUnits() { static QList u; @@ -517,9 +430,7 @@ namespace BlackMisc } protected: - /*! - * \copydoc CValueObject::unmarshallFromDbus - */ + //! \copydoc CValueObject::unmarshallFromDbus virtual void unmarshallFromDbus(const QDBusArgument &argument) override { QString unitName; @@ -528,9 +439,7 @@ namespace BlackMisc } }; - /*! - * Specialized class for pressure (psi, hPa, bar). - */ + //! Specialized class for pressure (psi, hPa, bar). class CPressureUnit : public CMeasurementUnit { private: @@ -549,9 +458,7 @@ namespace BlackMisc struct MillimetersToHectopascals { static double factor() { return 860.142806; } }; public: - /*! - * Default constructor, required for Qt Metasystem - */ + //! Default constructor, required for Qt Metasystem CPressureUnit() : CMeasurementUnit(defaultUnit()) {} /*! @@ -562,86 +469,66 @@ namespace BlackMisc return QVariant::fromValue(*this); } - /*! - * Default unit - */ + //! Default unit static const CPressureUnit &defaultUnit() { return hPa(); } - /*! - * Null unit - */ + //! Null unit static const CPressureUnit &nullUnit() { static CPressureUnit nu("null", "null", nullptr); return nu; } - /*! - * Pascal - */ + //! Pascal static const CPressureUnit &Pa() { static CPressureUnit Pa(QT_TRANSLATE_NOOP("CMeasurementUnit", "pascal"), "Pa", LinearConverter()); return Pa; } - /*! - * Hectopascal - */ + //! Hectopascal static const CPressureUnit &hPa() { static CPressureUnit hPa(QT_TRANSLATE_NOOP("CMeasurementUnit", "hectopascal"), "hPa", IdentityConverter()); return hPa; } - /*! - * Pounds per square inch - */ + //! Pounds per square inch static const CPressureUnit &psi() { static CPressureUnit psi(QT_TRANSLATE_NOOP("CMeasurementUnit", "pound per square inch"), "psi", LinearConverter(), 2); return psi; } - /*! - * Bar - */ + //! Bar static const CPressureUnit &bar() { static CPressureUnit bar(QT_TRANSLATE_NOOP("CMeasurementUnit", "bar"), "bar", LinearConverter >(), 1); return bar; } - /*! - * Millibar, actually the same as hPa - */ + //! Millibar, actually the same as hPa static const CPressureUnit &mbar() { static CPressureUnit mbar(QT_TRANSLATE_NOOP("CMeasurementUnit", "millibar"), "mbar", IdentityConverter(), 1); return mbar; } - /*! - * Inch of mercury at 0°C - */ + //! Inch of mercury at 0°C static const CPressureUnit &inHg() { static CPressureUnit inhg(QT_TRANSLATE_NOOP("CMeasurementUnit", "inch of mercury"), "inHg", LinearConverter()); return inhg; } - /*! - * Millimeter of mercury - */ + //! Millimeter of mercury static const CPressureUnit &mmHg() { static CPressureUnit mmhg(QT_TRANSLATE_NOOP("CMeasurementUnit", "millimeter of mercury"), "mmHg", LinearConverter()); return mmhg; } - /*! - * All units - */ + //! All units static const QList &allUnits() { static QList u; @@ -659,9 +546,7 @@ namespace BlackMisc } protected: - /*! - * \copydoc CValueObject::unmarshallFromDbus - */ + //! \copydoc CValueObject::unmarshallFromDbus virtual void unmarshallFromDbus(const QDBusArgument &argument) override { QString unitName; @@ -670,9 +555,7 @@ namespace BlackMisc } }; - /*! - * Specialized class for temperatur units (kelvin, centidegree). - */ + //! Specialized class for temperatur units (kelvin, centidegree). class CTemperatureUnit : public CMeasurementUnit { private: @@ -697,9 +580,7 @@ namespace BlackMisc }; public: - /*! - * Default constructor, required for Qt Metasystem - */ + //! Default constructor, required for Qt Metasystem CTemperatureUnit() : CMeasurementUnit(defaultUnit()) {} /*! @@ -710,50 +591,38 @@ namespace BlackMisc return QVariant::fromValue(*this); } - /*! - * Default unit - */ + //! Default unit static const CTemperatureUnit &defaultUnit() { return C(); } - /*! - * Null unit - */ + //! Null unit static const CTemperatureUnit &nullUnit() { static CTemperatureUnit nu("null", "null", nullptr); return nu; } - /*! - * Kelvin - */ + //! Kelvin static const CTemperatureUnit &K() { static CTemperatureUnit K(QT_TRANSLATE_NOOP("CMeasurementUnit", "Kelvin"), "K", AffineConverter()); return K; } - /*! - * Centigrade C - */ + //! Centigrade C static const CTemperatureUnit &C() { static CTemperatureUnit C(QT_TRANSLATE_NOOP("CMeasurementUnit", "centigrade"), QT_TRANSLATE_NOOP("CMeasurementUnit", "C"), IdentityConverter()); return C; } - /*! - * Fahrenheit F - */ + //! Fahrenheit F static const CTemperatureUnit &F() { static CTemperatureUnit F(QT_TRANSLATE_NOOP("CMeasurementUnit", "Fahrenheit"), QT_TRANSLATE_NOOP("CMeasurementUnit", "F"), AffineConverter()); return F; } - /*! - * All units - */ + //! All units static const QList &allUnits() { static QList u; @@ -768,9 +637,7 @@ namespace BlackMisc } protected: - /*! - * \copydoc CValueObject::unmarshallFromDbus - */ + //! \copydoc CValueObject::unmarshallFromDbus virtual void unmarshallFromDbus(const QDBusArgument &argument) override { QString unitName; @@ -779,9 +646,7 @@ namespace BlackMisc } }; - /*! - * 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 { private: @@ -800,9 +665,8 @@ namespace BlackMisc struct FtPerMinToMps { static double factor() { return 0.3048 / 60.0; } }; public: - /*! - * Default constructor, required for Qt Metasystem - */ + + //! Default constructor, required for Qt Metasystem CSpeedUnit() : CMeasurementUnit(defaultUnit()) {} /*! @@ -813,77 +677,59 @@ namespace BlackMisc return QVariant::fromValue(*this); } - /*! - * Default unit - */ + //! Default unit static const CSpeedUnit &defaultUnit() { return m_s(); } - /*! - * Null unit - */ + //! Null unit static const CSpeedUnit &nullUnit() { static CSpeedUnit nu("null", "null", nullptr); return nu; } - /*! - * Meter/second m/s - */ + //! Meter/second m/s static const CSpeedUnit &m_s() { static CSpeedUnit ms(QT_TRANSLATE_NOOP("CMeasurementUnit", "meter per second"), "m/s", IdentityConverter()); return ms; } - /*! - * Knots - */ + //! Knots static const CSpeedUnit &kts() { static CSpeedUnit kts(QT_TRANSLATE_NOOP("CMeasurementUnit", "knot"), "kts", LinearConverter(), 1); return kts; } - /*! - * Nautical miles per hour NM/h (same as kts) - */ + //! Nautical miles per hour NM/h (same as kts) static const CSpeedUnit &NM_h() { static CSpeedUnit NMh(QT_TRANSLATE_NOOP("CMeasurementUnit", "nautical mile per hour"), "NM/h", LinearConverter(), 1); return NMh; } - /*! - * Feet/second ft/s - */ + //! Feet/second ft/s static const CSpeedUnit &ft_s() { static CSpeedUnit fts(QT_TRANSLATE_NOOP("CMeasurementUnit", "foot per second"), "ft/s", LinearConverter(), 0); return fts; } - /*! - * Feet/min ft/min - */ + //! Feet/min ft/min static const CSpeedUnit &ft_min() { static CSpeedUnit ftmin(QT_TRANSLATE_NOOP("CMeasurementUnit", "foot per minute"), "ft/min", LinearConverter(), 0); return ftmin; } - /*! - * Kilometer/hour km/h - */ + //! Kilometer/hour km/h static const CSpeedUnit &km_h() { static CSpeedUnit kmh(QT_TRANSLATE_NOOP("CMeasurementUnit", "kilometer per hour"), "km/h", LinearConverter(), 1); return kmh; } - /*! - * All units - */ + //! All units static const QList &allUnits() { static QList u; @@ -901,9 +747,8 @@ namespace BlackMisc } protected: - /*! - * \copydoc CValueObject::unmarshallFromDbus - */ + + //! \copydoc CValueObject::unmarshallFromDbus virtual void unmarshallFromDbus(const QDBusArgument &argument) override { QString unitName; @@ -912,9 +757,7 @@ namespace BlackMisc } }; - /*! - * Specialized class for time units (ms, hour, min). - */ + //! Specialized class for time units (ms, hour, min). class CTimeUnit : public CMeasurementUnit { private: @@ -933,9 +776,8 @@ namespace BlackMisc struct MinutesToSeconds { static double factor() { return 60.0; } }; public: - /*! - * Default constructor, required for Qt Metasystem - */ + + //! Default constructor, required for Qt Metasystem CTimeUnit() : CMeasurementUnit(defaultUnit()) {} /*! @@ -946,73 +788,55 @@ namespace BlackMisc return QVariant::fromValue(*this); } - /*! - * Default unit - */ + //! Default unit static const CTimeUnit &defaultUnit() { return s(); } - /*! - * Null unit - */ + //! Null unit static const CTimeUnit &nullUnit() { static CTimeUnit nu("null", "null", nullptr); return nu; } - /*! - * \copydoc CMeasurementUnit::makeRoundedQStringWithUnit - */ + //! \copydoc CMeasurementUnit::makeRoundedQStringWithUnit virtual QString makeRoundedQStringWithUnit(double value, int digits = -1, bool i18n = false) const override; - /*! - * Second s - */ + //! Second s static const CTimeUnit &s() { static CTimeUnit s(QT_TRANSLATE_NOOP("CMeasurementUnit", "second"), "s", IdentityConverter(), 1); return s; } - /*! - * Millisecond ms - */ + //! Millisecond ms static const CTimeUnit &ms() { static CTimeUnit ms(QT_TRANSLATE_NOOP("CMeasurementUnit", "millisecond"), "ms", LinearConverter >(), 0); return ms; } - /*! - * Hour - */ + //! Hour static const CTimeUnit &h() { static CTimeUnit h(QT_TRANSLATE_NOOP("CMeasurementUnit", "hour"), "h", LinearConverter(), 1); return h; } - /*! - * Minute - */ + //! Minute static const CTimeUnit &min() { static CTimeUnit minute(QT_TRANSLATE_NOOP("CMeasurementUnit", "minute"), "min", LinearConverter(), 2); return minute; } - /*! - * Day - */ + //! Day static const CTimeUnit &d() { static CTimeUnit day(QT_TRANSLATE_NOOP("CMeasurementUnit", "day"), "d", LinearConverter(), 1); return day; } - /*! - * Hours, minutes, seconds - */ + //! Hours, minutes, seconds static const CTimeUnit &hms() { static CTimeUnit hms(QT_TRANSLATE_NOOP("CMeasurementUnit", "hour, minute, second"), "hms", SubdivisionConverter2 >(), 4); @@ -1021,9 +845,7 @@ namespace BlackMisc (void)QT_TRANSLATE_NOOP("CMeasurementUnit", "%-L1h%L2m%L3s"); } - /*! - * Hours, minutes - */ + //! Hours, minutes static const CTimeUnit &hrmin() { static CTimeUnit hrmin(QT_TRANSLATE_NOOP("CMeasurementUnit", "hour, minute"), "hm", SubdivisionConverter >(), 3); @@ -1032,9 +854,7 @@ namespace BlackMisc (void)QT_TRANSLATE_NOOP("CMeasurementUnit", "-%L1h%L2m"); } - /*! - * Minutes, seconds - */ + //! Minutes, seconds static const CTimeUnit &minsec() { static CTimeUnit minsec(QT_TRANSLATE_NOOP("CMeasurementUnit", "minute, second"), "minsec", SubdivisionConverter >(), 2); @@ -1043,9 +863,7 @@ namespace BlackMisc (void)QT_TRANSLATE_NOOP("CMeasurementUnit", "-%L1m%L2s"); } - /*! - * All units - */ + //! All units static const QList &allUnits() { static QList u; @@ -1064,9 +882,7 @@ namespace BlackMisc } protected: - /*! - * \copydoc CValueObject::unmarshallFromDbus - */ + //! \copydoc CValueObject::unmarshallFromDbus virtual void unmarshallFromDbus(const QDBusArgument &argument) override { QString unitName; @@ -1075,9 +891,7 @@ namespace BlackMisc } }; - /*! - * Specialized class for acceleration units (m/s2, ft/s2). - */ + //! Specialized class for acceleration units (m/s2, ft/s2). class CAccelerationUnit : public CMeasurementUnit { private: @@ -1093,9 +907,7 @@ namespace BlackMisc struct FeetToMeters { static double factor() { return 0.3048; } }; public: - /*! - * Default constructor, required for Qt Metasystem - */ + //! Default constructor, required for Qt Metasystem CAccelerationUnit() : CMeasurementUnit(defaultUnit()) {} /*! @@ -1106,41 +918,31 @@ namespace BlackMisc return QVariant::fromValue(*this); } - /*! - * Default unit - */ + //! Default unit static const CAccelerationUnit &defaultUnit() { return m_s2(); } - /*! - * Null unit - */ + //! Null unit static const CAccelerationUnit &nullUnit() { static CAccelerationUnit nu("null", "null", nullptr); return nu; } - /*! - * Meter/second^2 (m/s^2) - */ + //! Meter/second^2 (m/s^2) static const CAccelerationUnit &m_s2() { static CAccelerationUnit ms2(QT_TRANSLATE_NOOP("CMeasurementUnit", "meter per second per second"), QT_TRANSLATE_NOOP("CMeasurementUnit", "m/s^2"), IdentityConverter(), 1); return ms2; } - /*! - * Feet/second^2 - */ + //! Feet/second^2 static const CAccelerationUnit &ft_s2() { static CAccelerationUnit fts2(QT_TRANSLATE_NOOP("CMeasurementUnit", "foot per second per second"), QT_TRANSLATE_NOOP("CMeasurementUnit", "ft/s^2"), LinearConverter(), 0); return fts2; } - /*! - * All units - */ + //! All units static const QList &allUnits() { static QList u; @@ -1154,9 +956,7 @@ namespace BlackMisc } protected: - /*! - * \copydoc CValueObject::unmarshallFromDbus - */ + //! \copydoc CValueObject::unmarshallFromDbus virtual void unmarshallFromDbus(const QDBusArgument &argument) override { QString unitName; diff --git a/src/blackmisc/range.h b/src/blackmisc/range.h index ed5d802d4..24bfcdbec 100644 --- a/src/blackmisc/range.h +++ b/src/blackmisc/range.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. + */ //! \file diff --git a/src/blackmisc/sequence.h b/src/blackmisc/sequence.h index b56776489..e196d1432 100644 --- a/src/blackmisc/sequence.h +++ b/src/blackmisc/sequence.h @@ -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_SEQUENCE_H #define BLACKMISC_SEQUENCE_H @@ -74,7 +76,7 @@ namespace BlackMisc /*! * \brief Move assignment. */ - CSequence &operator =(CSequence &&other) { m_pimpl.reset(other.m_pimpl.take()); return *this; } + CSequence &operator =(CSequence && other) { m_pimpl.reset(other.m_pimpl.take()); return *this; } /*! * \brief Create a new sequence with a specific implementation type. @@ -338,7 +340,7 @@ namespace BlackMisc template void applyIf(Predicate p, const CIndexVariantMap &newValues) { - std::for_each(begin(), end(), [ &, p ](T &value) { if (p(value)) { value.apply(newValues); } }); + std::for_each(begin(), end(), [ &, p ](T & value) { if (p(value)) { value.apply(newValues); } }); } /*! @@ -358,7 +360,7 @@ namespace BlackMisc */ void applyIf(const CIndexVariantMap &pattern, const CIndexVariantMap &newValues) { - applyIf([ & ](const T &value) { return value == pattern; }, newValues); + applyIf([ & ](const T & value) { return value == pattern; }, newValues); } /*! @@ -547,12 +549,12 @@ namespace BlackMisc size_type size() const override { return m_impl.size(); } bool empty() const override { return m_impl.empty(); } void clear() override { m_impl.clear(); } - iterator insert(iterator pos, const T &value) override { return iterator::fromImpl(m_impl.insert(*static_cast(pos.getImpl()), value)); } + iterator insert(iterator pos, const T &value) override { return iterator::fromImpl(m_impl.insert(*static_cast(pos.getImpl()), value)); } void push_back(const T &value) override { m_impl.push_back(value); } void push_back(T &&value) override { m_impl.push_back(std::move(value)); } void pop_back() override { m_impl.pop_back(); } - iterator erase(iterator pos) override { return iterator::fromImpl(m_impl.erase(*static_cast(pos.getImpl()))); } - iterator erase(iterator it1, iterator it2) override { return iterator::fromImpl(m_impl.erase(*static_cast(it1.getImpl()), *static_cast(it2.getImpl()))); } + iterator erase(iterator pos) override { return iterator::fromImpl(m_impl.erase(*static_cast(pos.getImpl()))); } + iterator erase(iterator it1, iterator it2) override { return iterator::fromImpl(m_impl.erase(*static_cast(it1.getImpl()), *static_cast(it2.getImpl()))); } bool operator ==(const PimplBase &other) const override { Pimpl copy = C(); for (auto i = other.cbegin(); i != other.cend(); ++i) copy.push_back(*i); return m_impl == copy.m_impl; } void *impl() override { return &m_impl; } private: @@ -577,4 +579,4 @@ Q_DECLARE_METATYPE(BlackMisc::CSequence) Q_DECLARE_METATYPE(BlackMisc::CSequence) Q_DECLARE_METATYPE(BlackMisc::CSequence) -#endif //BLACKMISC_SEQUENCE_H \ No newline at end of file +#endif //BLACKMISC_SEQUENCE_H diff --git a/src/blackmisc/setaudio.h b/src/blackmisc/setaudio.h index 1e1916eb9..f4d329fb6 100644 --- a/src/blackmisc/setaudio.h +++ b/src/blackmisc/setaudio.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_SETTINGS_AUDIO_H #define BLACKMISC_SETTINGS_AUDIO_H diff --git a/src/blackmisc/setkeyboardhotkey.cpp b/src/blackmisc/setkeyboardhotkey.cpp index 110c8494f..361bf79ac 100644 --- a/src/blackmisc/setkeyboardhotkey.cpp +++ b/src/blackmisc/setkeyboardhotkey.cpp @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/blackmisc/setkeyboardhotkey.h b/src/blackmisc/setkeyboardhotkey.h index afbb89091..cf3e46f1c 100644 --- a/src/blackmisc/setkeyboardhotkey.h +++ b/src/blackmisc/setkeyboardhotkey.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/blackmisc/setnetwork.h b/src/blackmisc/setnetwork.h index 87b4a56df..6973ca403 100644 --- a/src/blackmisc/setnetwork.h +++ b/src/blackmisc/setnetwork.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_SETTINGS_NETWORK_H #define BLACKMISC_SETTINGS_NETWORK_H diff --git a/src/blackmisc/settingutilities.h b/src/blackmisc/settingutilities.h index 1ae1725fd..f1461830c 100644 --- a/src/blackmisc/settingutilities.h +++ b/src/blackmisc/settingutilities.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 BLACKMISC_SETTINGUTILITIES_H #define BLACKMISC_SETTINGUTILITIES_H diff --git a/src/blackmisc/sharedlockablepointer.h b/src/blackmisc/sharedlockablepointer.h index b980f0ad3..d9003f0fb 100644 --- a/src/blackmisc/sharedlockablepointer.h +++ b/src/blackmisc/sharedlockablepointer.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/blackmisc/statusmessage.cpp b/src/blackmisc/statusmessage.cpp index 69ba8e121..e6ed7f258 100644 --- a/src/blackmisc/statusmessage.cpp +++ b/src/blackmisc/statusmessage.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/statusmessage.h b/src/blackmisc/statusmessage.h index ba92c443b..31b2306d4 100644 --- a/src/blackmisc/statusmessage.h +++ b/src/blackmisc/statusmessage.h @@ -2,16 +2,16 @@ * 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, + * 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_STATUSMESSAGE_H #define BLACKMISC_STATUSMESSAGE_H -//! \file - #include "icon.h" #include "valueobject.h" #include diff --git a/src/blackmisc/statusmessagelist.cpp b/src/blackmisc/statusmessagelist.cpp index 22bd8adc3..013dbb851 100644 --- a/src/blackmisc/statusmessagelist.cpp +++ b/src/blackmisc/statusmessagelist.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/statusmessagelist.h b/src/blackmisc/statusmessagelist.h index daf1d7913..44b5501de 100644 --- a/src/blackmisc/statusmessagelist.h +++ b/src/blackmisc/statusmessagelist.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/threadedreader.h b/src/blackmisc/threadedreader.h index 022e0143c..b90d86d3d 100644 --- a/src/blackmisc/threadedreader.h +++ b/src/blackmisc/threadedreader.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. + */ + #ifndef BLACKMISC_THREADED_READER_H #define BLACKMISC_THREADED_READER_H @@ -136,11 +145,11 @@ namespace BlackMisc } QDateTime m_updateTimestamp; //!< when was file / resource read - QTimer *m_updateTimer; //!< update times - bool m_stopped; //!< mark as stopped, threads should terminate - QFuture m_pendingFuture; //!< optional future to be stopped + QTimer *m_updateTimer; //!< update times + bool m_stopped; //!< mark as stopped, threads should terminate + QFuture m_pendingFuture; //!< optional future to be stopped QNetworkReply *m_pendingNetworkReply; //!< optional future to be stopped - mutable QReadWriteLock m_lock; //!< lock + mutable QReadWriteLock m_lock; //!< lock }; } // namespace diff --git a/src/blackmisc/tuple.h b/src/blackmisc/tuple.h index 5fa40a2bf..179064878 100644 --- a/src/blackmisc/tuple.h +++ b/src/blackmisc/tuple.h @@ -1,7 +1,11 @@ -/* 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 diff --git a/src/blackmisc/tuple_private.h b/src/blackmisc/tuple_private.h index 4a0574302..16c223c05 100644 --- a/src/blackmisc/tuple_private.h +++ b/src/blackmisc/tuple_private.h @@ -1,7 +1,11 @@ -/* 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. + */ #ifndef BLACKMISC_TUPLE_PRIVATE_H #define BLACKMISC_TUPLE_PRIVATE_H diff --git a/src/blackmisc/valueobject.cpp b/src/blackmisc/valueobject.cpp index 02a8d41c4..598535d52 100644 --- a/src/blackmisc/valueobject.cpp +++ b/src/blackmisc/valueobject.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/valueobject.h b/src/blackmisc/valueobject.h index 9fc76f488..958ee192e 100644 --- a/src/blackmisc/valueobject.h +++ b/src/blackmisc/valueobject.h @@ -1,12 +1,14 @@ /* 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, + * 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_VALUEOBJECT_H #define BLACKMISC_VALUEOBJECT_H @@ -52,7 +54,7 @@ namespace BlackMisc } /*! - * \brief Base class for value objects. + * Base class for value objects. * Public non-virtual interface with protected virtual implementation. */ class CValueObject @@ -218,7 +220,7 @@ namespace BlackMisc */ virtual QString propertyByIndexAsString(int index, bool i18n = false) const; - //! \brief The stored object as CValueObject + //! The stored object as CValueObject static const CValueObject *fromQVariant(const QVariant &qv); protected: @@ -241,7 +243,7 @@ namespace BlackMisc virtual int getMetaTypeId() const = 0; /*! - * \brief Returns true if this object is an instance of the class with the given meta type ID, + * Returns true if this object is an instance of the class with the given meta type ID, * or one of its subclasses. * \param metaTypeId * \return @@ -249,7 +251,7 @@ namespace BlackMisc virtual bool isA(int metaTypeId) const { Q_UNUSED(metaTypeId); return false; } /*! - * \brief Compare this value with another value of the same type + * Compare this value with another value of the same type * \param other * \return Less than, equal to, or greater than zero if this is * less than, equal to, or greather than other. @@ -336,7 +338,7 @@ namespace BlackMisc } /*! - * \brief Non member, non friend operator << for JSON + * Non member, non friend operator << for JSON * \param json * \param value as pair name/value * \return diff --git a/src/blackmisc/variant.cpp b/src/blackmisc/variant.cpp index fd83f2b1f..c7bbb025b 100644 --- a/src/blackmisc/variant.cpp +++ b/src/blackmisc/variant.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/variant.h b/src/blackmisc/variant.h index a5361b373..c5c498abe 100644 --- a/src/blackmisc/variant.h +++ b/src/blackmisc/variant.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/blackmisc/voiceroom.cpp b/src/blackmisc/voiceroom.cpp index 378ed8f6d..8f09bbe97 100644 --- a/src/blackmisc/voiceroom.cpp +++ b/src/blackmisc/voiceroom.cpp @@ -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 "voiceroom.h" #include "blackmisc/blackmiscfreefunctions.h" diff --git a/src/blackmisc/voiceroom.h b/src/blackmisc/voiceroom.h index 838c576b5..dd520aa23 100644 --- a/src/blackmisc/voiceroom.h +++ b/src/blackmisc/voiceroom.h @@ -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 diff --git a/src/blackmisc/voiceroomlist.cpp b/src/blackmisc/voiceroomlist.cpp index 15b68d629..045a3f29a 100644 --- a/src/blackmisc/voiceroomlist.cpp +++ b/src/blackmisc/voiceroomlist.cpp @@ -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 "voiceroomlist.h" #include "predicates.h" diff --git a/src/blackmisc/voiceroomlist.h b/src/blackmisc/voiceroomlist.h index 1ee32e114..dc7050b90 100644 --- a/src/blackmisc/voiceroomlist.h +++ b/src/blackmisc/voiceroomlist.h @@ -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_VOICEROOMLIST_H #define BLACKMISC_VOICEROOMLIST_H diff --git a/src/blacksim/fscommon/aircraftcfgentries.cpp b/src/blacksim/fscommon/aircraftcfgentries.cpp index 560fe901b..c1d318d0c 100644 --- a/src/blacksim/fscommon/aircraftcfgentries.cpp +++ b/src/blacksim/fscommon/aircraftcfgentries.cpp @@ -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 "aircraftcfgentries.h" #include "blackmisc/blackmiscfreefunctions.h" @@ -61,22 +65,16 @@ namespace BlackSim { case IndexFilePath: return this->m_filePath; - break; case IndexTitle: return this->m_title; - break; case IndexAtcType: return this->m_atcType; - break; case IndexAtcModel: return this->m_atcModel; - break; case IndexParkingCode: return this->m_atcParkingCode; - break; case IndexEntryIndex: return this->m_index; - break; default: break; } diff --git a/src/blacksim/fscommon/aircraftcfgentries.h b/src/blacksim/fscommon/aircraftcfgentries.h index fe73f5b38..dda08e571 100644 --- a/src/blacksim/fscommon/aircraftcfgentries.h +++ b/src/blacksim/fscommon/aircraftcfgentries.h @@ -1,12 +1,19 @@ -/* 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 BLACKSIM_FSCOMMON_AIRCRAFTCFGENTRY_H #define BLACKSIM_FSCOMMON_AIRCRAFTCFGENTRY_H -#include "blackmisc/valueobject.h" +#include "blackmisc/propertyindex.h" + #include namespace BlackSim @@ -15,20 +22,104 @@ namespace BlackSim { /*! - * \brief Set of aircraft.cfg entries representing an aircraft (FSX) + * Set of aircraft.cfg entries representing an aircraft (FSX) * \remarks an entry in the aircraft.cfg is title, atc type, ... This class already bundles * relevant entries, hence the class is named Entries (plural) */ class CAircraftCfgEntries: public BlackMisc::CValueObject { - private: - BLACK_ENABLE_TUPLE_CONVERSION(CAircraftCfgEntries) - qint32 m_index; //!< current index in given config - QString m_filePath; //!< file path of aircraft.cfg - QString m_title; //!< Title in aircraft.cfg - QString m_atcType; //!< ATC type - QString m_atcModel; //!< ATC model - QString m_atcParkingCode; //!< ATC parking code + public: + + //! Properties by index + enum ColumnIndex + { + IndexEntryIndex = BlackMisc::CPropertyIndex::GlobalIndexCAircraftModel, + IndexFilePath, + IndexTitle, + IndexAtcType, + IndexAtcModel, + IndexParkingCode + }; + + //! Default constructor + CAircraftCfgEntries() {} + + /*! + * Entries representing an aircraft + * \param filePath + * \param index + * \param title + * \param atcType + * \param atcModel + * \param atcParkingCode + */ + CAircraftCfgEntries(const QString &filePath, qint32 index, const QString &title, const QString &atcType, const QString &atcModel, const QString &atcParkingCode); + + //! Virtual destructor + virtual ~CAircraftCfgEntries() {} + + //! operator == + bool operator ==(const CAircraftCfgEntries &other) const; + + //! operator != + bool operator !=(const CAircraftCfgEntries &other) const; + + //! \copydoc CValueObject::propertyByIndex + QVariant propertyByIndex(int index) const; + + //! Filepath + QString getFilePath() const { return this->m_filePath; } + + //! Title + QString getTitle() const { return this->m_title; } + + //! Index + qint32 getIndex() const { return this->m_index; } + + //! ATC model + QString getAtcModel() const { return this->m_atcModel; } + + //! ATC type + QString getAtcType() const { return this->m_atcType; } + + //! ATC parking code + QString getAtcParkingCode() const { return this->m_atcParkingCode; } + + //! Filepath + void setFilePath(const QString &filePath) { this->m_filePath = filePath; } + + //! Title + void setTitle(const QString &title) { this->m_title = title; } + + //! Index + void setIndex(const qint32 index) { this->m_index = index; } + + //! ATC model + void setAtcModel(const QString &atcModel) { this->m_atcModel = atcModel; } + + //! ATC type + void setAtcType(const QString &atcType) { this->m_atcType = atcType; } + + //! Parking code + void setAtcParkingCode(const QString &parkingCode) { this->m_atcParkingCode = parkingCode; } + + //! \copydoc CValueObject::getValueHash() + virtual uint getValueHash() const override; + + //! \copydoc CValueObject::toQVariant() + virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); } + + //! \copydoc CValueObject::toJson + virtual QJsonObject toJson() const override; + + //! \copydoc CValueObject::fromJson + virtual void fromJson(const QJsonObject &json) override; + + //! Register the metatypes + static void registerMetadata(); + + //! Members + static const QStringList &jsonMembers(); protected: //! \copydoc CValueObject::convertToQString @@ -46,101 +137,15 @@ namespace BlackSim //! \copydoc CValueObject::getMetaTypeId() int getMetaTypeId() const override; - public: + private: + BLACK_ENABLE_TUPLE_CONVERSION(CAircraftCfgEntries) + qint32 m_index; //!< current index in given config + QString m_filePath; //!< file path of aircraft.cfg + QString m_title; //!< Title in aircraft.cfg + QString m_atcType; //!< ATC type + QString m_atcModel; //!< ATC model + QString m_atcParkingCode; //!< ATC parking code - //! \brief Properties by index - enum ColumnIndex - { - IndexEntryIndex = 0, - IndexFilePath, - IndexTitle, - IndexAtcType, - IndexAtcModel, - IndexParkingCode - }; - - //! \brief Default constructor - CAircraftCfgEntries() {} - - /*! - * \brief Entries representing an aircraft - * \param filePath - * \param index - * \param title - * \param atcType - * \param atcModel - * \param atcParkingCode - */ - CAircraftCfgEntries(const QString &filePath, qint32 index, const QString &title, const QString &atcType, const QString &atcModel, const QString &atcParkingCode); - - //! \brief Virtual destructor - virtual ~CAircraftCfgEntries() {} - - //! \brief operator == - bool operator ==(const CAircraftCfgEntries &other) const; - - //! \brief operator != - bool operator !=(const CAircraftCfgEntries &other) const; - - //! \copydoc CValueObject::propertyByIndex - QVariant propertyByIndex(int index) const; - - //! \brief Filepath - QString getFilePath() const { return this->m_filePath; } - - //! \brief Title - QString getTitle() const { return this->m_title; } - - //! \brief Index - qint32 getIndex() const { return this->m_index; } - - //! \brief ATC model - QString getAtcModel() const { return this->m_atcModel; } - - //! \brief ATC type - QString getAtcType() const { return this->m_atcType; } - - //! \brief ATC parking code - QString getAtcParkingCode() const { return this->m_atcParkingCode; } - - //! \brief Filepath - void setFilePath(const QString &filePath) { this->m_filePath = filePath; } - - //! \brief Title - void setTitle(const QString &title) { this->m_title = title; } - - //! \brief Index - void setIndex(const qint32 index) { this->m_index = index; } - - //! \brief ATC model - void setAtcModel(const QString &atcModel) { this->m_atcModel = atcModel; } - - //! \brief ATC type - void setAtcType(const QString &atcType) { this->m_atcType = atcType; } - - //! \brief Parking code - void setAtcParkingCode(const QString &parkingCode) { this->m_atcParkingCode = parkingCode; } - - //! \copydoc CValueObject::getValueHash() - virtual uint getValueHash() const override; - - //! \copydoc CValueObject::toQVariant() - virtual QVariant toQVariant() const override - { - return QVariant::fromValue(*this); - } - - //! \brief Register the metatypes - static void registerMetadata(); - - //! \copydoc CValueObject::toJson - virtual QJsonObject toJson() const override; - - //! \copydoc CValueObject::fromJson - virtual void fromJson(const QJsonObject &json) override; - - //! \brief Members - static const QStringList &jsonMembers(); }; } } // namespace diff --git a/src/blacksim/fscommon/aircraftcfgentrieslist.cpp b/src/blacksim/fscommon/aircraftcfgentrieslist.cpp index b013cfd17..05770d829 100644 --- a/src/blacksim/fscommon/aircraftcfgentrieslist.cpp +++ b/src/blacksim/fscommon/aircraftcfgentrieslist.cpp @@ -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 "aircraftcfgentrieslist.h" diff --git a/src/blacksim/fscommon/aircraftcfgentrieslist.h b/src/blacksim/fscommon/aircraftcfgentrieslist.h index 3964d508a..ea378f44e 100644 --- a/src/blacksim/fscommon/aircraftcfgentrieslist.h +++ b/src/blacksim/fscommon/aircraftcfgentrieslist.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 BLACKSIM_FSCOMMON_AIRCRAFTCFG_H #define BLACKSIM_FSCOMMON_AIRCRAFTCFG_H @@ -19,22 +25,22 @@ namespace BlackSim namespace FsCommon { - //! \brief Utility, providing FSX aircraft.cfg entries + //! Utility, providing FSX aircraft.cfg entries class CAircraftCfgEntriesList : public BlackMisc::CSequence { private: QString m_rootDirectory; //!< root directory reading aircraft.cfg files bool m_readForDirectory; //!< valid read for given directory - //! \brief Read all entries in one directory + //! Read all entries in one directory qint32 read(const QString &directory); public: - //! \brief Constructor + //! Constructor CAircraftCfgEntriesList(const QString &rootDirectory = "") : m_rootDirectory(rootDirectory), m_readForDirectory(false) {} - //! \brief Read all aircraft.cfg files starting from root directory + //! Read all aircraft.cfg files starting from root directory qint32 read() { if (this->m_readForDirectory) return this->size(); @@ -45,7 +51,7 @@ namespace BlackSim return this->read(this->m_rootDirectory); } - //! \brief Change the directory + //! Change the directory bool changeDirectory(const QString &directory) { if (this->m_rootDirectory != directory) @@ -56,29 +62,30 @@ namespace BlackSim return !directory.isEmpty() && this->existsDir(directory); } - //! \brief Virtual destructor + //! Virtual destructor virtual ~CAircraftCfgEntriesList() {} - //! \brief Does the directory exist? + //! Does the directory exist? bool existsDir(const QString &directory = "") const; - //! \brief Has current directory been read? + //! Has current directory been read? bool hasReadDirectory() const { return this->m_readForDirectory; } - //! \brief Current root directory + //! Current root directory QString getRootDirectory() const { return this->m_rootDirectory; } //! Contains model with title? bool containsModeWithTitle(const QString &title, Qt::CaseSensitivity caseSensitivity = Qt::CaseInsensitive); //! \brief Unknown entries + //! Unknown entries static const CAircraftCfgEntries &UnknownCfgEntries() { static CAircraftCfgEntries entries; return entries; } - //! \brief Register metadata + //! Register metadata static void registerMetadata(); }; } diff --git a/src/blacksim/fscommon/aircraftmapping.cpp b/src/blacksim/fscommon/aircraftmapping.cpp index 6cace27a8..337cb63b4 100644 --- a/src/blacksim/fscommon/aircraftmapping.cpp +++ b/src/blacksim/fscommon/aircraftmapping.cpp @@ -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 "aircraftmapping.h" #include "blackmisc/blackmiscfreefunctions.h" diff --git a/src/blacksim/fscommon/aircraftmapping.h b/src/blacksim/fscommon/aircraftmapping.h index b954e0342..00216789c 100644 --- a/src/blacksim/fscommon/aircraftmapping.h +++ b/src/blacksim/fscommon/aircraftmapping.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 BLACKSIM_FSCOMMON_AIRCRAFTMAPPING_H #define BLACKSIM_FSCOMMON_AIRCRAFTMAPPING_H @@ -17,7 +23,7 @@ namespace BlackSim namespace FsCommon { - //! \brief Aircraft mapping class, represents one particular mapping + //! Aircraft mapping class, represents one particular mapping class CAircraftMapping : public BlackMisc::CValueObject { @@ -42,20 +48,20 @@ namespace BlackSim private: BLACK_ENABLE_TUPLE_CONVERSION(CAircraftMapping) - qint32 m_mappingId; //!< Kind of primary key for this particular mapping + qint32 m_mappingId; //!< Kind of primary key for this particular mapping qint32 m_proposalId; //!< If proposal id of the proposal - QString m_fsAircraftKey; //!< Id by which the simulator can create the aircraft - QString m_aircraftDesignator; //!< Aircraft designator such as B737 - QString m_airlineDesignator; //!< Airline designator such as DLH - QString m_aircraftCombinedType; //!< Engine, type, number of engines L2J, L1P + QString m_fsAircraftKey; //!< Id by which the simulator can create the aircraft + QString m_aircraftDesignator; //!< Aircraft designator such as B737 + QString m_airlineDesignator; //!< Airline designator such as DLH + QString m_aircraftCombinedType; //!< Engine, type, number of engines L2J, L1P QString m_wakeTurbulenceCategory; //!< Wake turbulence category H, L, M QString m_aircraftColor; //!< Aircrafts painting designator, could be same as airline or specific - QString m_lastChanged; //!< Simple timestamp as YYYYMMDDhhmmss + QString m_lastChanged; //!< Simple timestamp as YYYYMMDDhhmmss BlackSim::CSimulatorInfo m_simulatorInfo; //!< Mapping is for simulator bool m_changed; //! Changed flag public: - //! \brief Columns + //! Columns enum ColumnIndex { IndexMappingId = 0, @@ -70,11 +76,11 @@ namespace BlackSim IndexSimulatorInfo }; - //! \brief Default mapping + //! Default mapping CAircraftMapping(); /*! - * \brief Complete constructor + * Complete constructor * \param mappingId * \param proposalId * \param fsAircraftKey @@ -88,117 +94,108 @@ namespace BlackSim */ CAircraftMapping(qint32 mappingId, qint32 proposalId, const QString &fsAircraftKey, const QString &icaoAircraftDesignator, const QString &icaoAirline, const QString &icaoAircraftType, const QString &icaoWakeTurbulenceCategory, const QString &painting, const QString &lastChanged, CSimulatorInfo simulator); - //! \brief Virtual destructor + //! Virtual destructor virtual ~CAircraftMapping() {} - //! \brief operator == + //! operator == bool operator ==(const CAircraftMapping &otherMapping) const; - //! \brief operator != + //! operator != bool operator !=(const CAircraftMapping &otherMapping) const; - //! \brief Mapping id + //! Mapping id qint32 getMappingId() const { return this->m_mappingId; } - //! \brief Proposal id (if proposal, otherwise <0) + //! Proposal id (if proposal, otherwise <0) qint32 getProposalId() const { return this->m_proposalId; } - //! \brief Aircraft key + //! Aircraft key QString getFsAircraftKey() const { return this->m_fsAircraftKey; } - //! \brief ICAO designator (B737) + //! ICAO designator (B737) QString getAircraftDesignator() const { return this->m_aircraftDesignator; } - //! \brief ICAO airline (DLH) + //! ICAO airline (DLH) QString getAirlineDesignator() const { return this->m_airlineDesignator; } - //! \brief ICAO aircraft type (L2J) + //! ICAO aircraft type (L2J) QString getAircraftCombinedType() const { return this->m_aircraftCombinedType; } - //! \brief ICAO wake turbulence category (L,M,H) + //! ICAO wake turbulence category (L,M,H) QString getWakeTurbulenceCategory() const { return this->m_wakeTurbulenceCategory; } - //! \brief Painting, basically the airline code for GA planes + //! Painting, basically the airline code for GA planes QString getAircraftColor() const { return this->m_aircraftColor; } - //! \brief Last changed timestamp YYYYMMDDhhmmss + //! Last changed timestamp YYYYMMDDhhmmss QString getLastChanged() const { return this->m_lastChanged; } - //! \brief Last changed timestamp YYYYMMDDhhmmss + //! Last changed timestamp YYYYMMDDhhmmss QString getLastChangedFormatted() const; - //! \brief Simulator + //! Simulator BlackSim::CSimulatorInfo getSimulatorInfo() const { return this->m_simulatorInfo; } - //! \brief Simulator + //! Simulator QString getSimulatorText() const; - //! \brief Get changed flag - bool isChanged() const { return this->m_changed; } - - //! \brief Valid data? + //! Valid data? bool isValid() const { QString v = this->validate(); return v.isEmpty(); } - //! \brief Validate and return error messages, empty string means all OK. + //! Validate and return error messages, empty string means all OK. QString validate() const; - //! \brief Set mapping id + //! Set mapping id void setMappingId(qint32 mappingId) { this->m_mappingId = mappingId; } - //! \brief Proposal id + //! Proposal id void setProposalId(qint32 proposalId) { this->m_proposalId = proposalId; } - //! \brief Aircraft key + //! Aircraft key void setFsAircraftKey(const QString &aircraftKey) { this->m_fsAircraftKey = aircraftKey; } - //! \brief ICAO designator (B737) + //! ICAO designator (B737) void setAircraftDesignator(const QString &icaoDesignator) { this->m_aircraftDesignator = icaoDesignator.toUpper(); } - //! \brief ICAO airline (DLH) + //! ICAO airline (DLH) void setAirlineDesignator(const QString &airline) { this->m_airlineDesignator = airline.toUpper(); } - //! \brief ICAO aircraft type (L2J) + //! ICAO aircraft type (L2J) void setAircraftCombinedType(const QString &aircraftType) { this->m_aircraftCombinedType = aircraftType.toUpper(); } - //! \brief ICAO wake turbulence category + //! ICAO wake turbulence category void setWakeTurbulenceCategory(const QString &wtc) { this->m_wakeTurbulenceCategory = wtc.toUpper(); } - //! \brief Painting, basically the airline code for GA planes + //! Painting, basically the airline code for GA planes void setAircraftColor(const QString &painting) { this->m_aircraftColor = painting; } - //! \brief Last changed timestamp YYYYMMDDhhmmss + //! Last changed timestamp YYYYMMDDhhmmss void setLastChanged(qint32 lastChanged) { this->m_lastChanged = lastChanged; } - //! \brief Simulator + //! Simulator void setSimulator(BlackSim::CSimulatorInfo simulator) { this->m_simulatorInfo = simulator; } - //! \brief Set simulator text + //! Set simulator text void setSimulatorText(const QString &simulator); - //! \brief Set changed flag - void setChanged(bool changed) { this->m_changed = changed; } - //! \copydoc CValueObject::propertyByIndex QVariant propertyByIndex(int index) const override; //! \copydoc CValueObject::setPropertyByIndex() - void setPropertyByIndex(const QVariant &value, int index) override; + void setPropertyByIndex(const QVariant &value, const BlackMisc::CPropertyIndex &index) override; //! \copydoc CValueObject::toQVariant() - virtual QVariant toQVariant() const override - { - return QVariant::fromValue(*this); - } + virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); } //! \copydoc CValueObject::getValueHash() virtual uint getValueHash() const override; - //! \brief Current UTC timestamp + //! Current UTC timestamp static QString currentUtcTimestamp() { QDateTime dateTime = QDateTime::currentDateTimeUtc(); @@ -212,10 +209,10 @@ namespace BlackSim //! \copydoc CValueObject::fromJson virtual void fromJson(const QJsonObject &json) override; - //! \brief Register metadata + //! Register metadata static void registerMetadata(); - //! \brief Members + //! Members static const QStringList &jsonMembers(); }; } // namespace diff --git a/src/blacksim/fscommon/aircraftmappinglist.h b/src/blacksim/fscommon/aircraftmappinglist.h index 355355be5..76cfe5c67 100644 --- a/src/blacksim/fscommon/aircraftmappinglist.h +++ b/src/blacksim/fscommon/aircraftmappinglist.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 BLACKSIM_FSCOMMON_AIRCRAFTMAPPINGS_H #define BLACKSIM_FSCOMMON_AIRCRAFTMAPPINGS_H @@ -18,25 +24,26 @@ namespace BlackSim { namespace FsCommon { - //! \brief Aircraft mappings + //! Aircraft mappings class CAircraftMappingList : public BlackMisc::CSequence { public: - //! \brief Default constructor + //! Default constructor CAircraftMappingList() {} - //! \brief Virtual destructor + //! Virtual destructor virtual ~CAircraftMappingList() {} //! \brief Unknown mapping + //! Unknown mapping static const CAircraftMapping &UnknownMapping() { static CAircraftMapping mapping; return mapping; } - //! \brief Register metadata + //! Register metadata static void registerMetadata(); }; } diff --git a/src/blacksim/fscommon/vpilotmodelmappings.h b/src/blacksim/fscommon/vpilotmodelmappings.h index cc508887c..dea0d8b50 100644 --- a/src/blacksim/fscommon/vpilotmodelmappings.h +++ b/src/blacksim/fscommon/vpilotmodelmappings.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 BLACKSIM_FSCOMMON_VPILOTMODELMAPPINGS_H #define BLACKSIM_FSCOMMON_VPILOTMODELMAPPINGS_H diff --git a/src/blacksim/fsx/fsx.h b/src/blacksim/fsx/fsx.h index d96c27e71..b223b984b 100644 --- a/src/blacksim/fsx/fsx.h +++ b/src/blacksim/fsx/fsx.h @@ -1,8 +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 FSX_NAMESPACES_H #define FSX_NAMESPACES_H // just a dummy header, namespace documentation will go here -/*! \file */ +//! \file /*! * \namespace FSX diff --git a/src/blacksim/fsx/fsxsimulatorsetup.h b/src/blacksim/fsx/fsxsimulatorsetup.h index b68c55ba8..0e5a4320a 100644 --- a/src/blacksim/fsx/fsxsimulatorsetup.h +++ b/src/blacksim/fsx/fsxsimulatorsetup.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 BLACKSIM_FSX_SIMSETUP_H #define BLACKSIM_FSX_SIMSETUP_H diff --git a/src/blacksim/fsx/simconnectutilities.h b/src/blacksim/fsx/simconnectutilities.h index 60228f59b..59eb0e9a5 100644 --- a/src/blacksim/fsx/simconnectutilities.h +++ b/src/blacksim/fsx/simconnectutilities.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 BLACKSIM_FSX_SIMCONNECTUTILITIES_H #define BLACKSIM_FSX_SIMCONNECTUTILITIES_H @@ -13,30 +24,26 @@ #endif #include #else -typedef unsigned long DWORD; +typedef unsigned long DWORD; //!< Fake Windows DWORD #endif namespace BlackSim { namespace Fsx { - //! \brief Utilities for SimConnect + //! Utilities for SimConnect class CSimConnectUtilities : public QObject { Q_OBJECT Q_ENUMS(SIMCONNECT_EXCEPTION) Q_ENUMS(SIMCONNECT_SURFACE) - private: - //! \brief CSimConnect - CSimConnectUtilities(); - public: //! Path to local config file static QString getLocalSimConnectCfgFilename(); /*! - * \brief Content for FSX simconnect.cfg file + * Content for FSX simconnect.cfg file * \param ip IP address of FSX * \param port Port of FSX (e.g. 500) * \return content for simconnect.cfg @@ -44,7 +51,7 @@ namespace BlackSim static QString simConnectCfg(const QString &ip, quint16 port = 500); /*! - * \brief Create a FSX simconnect.cfg file + * Create a FSX simconnect.cfg file * \param fileName and path * \param ip IP address of FSX * \param port Port of FSX (e.g. 500) @@ -53,14 +60,14 @@ namespace BlackSim static bool writeSimConnectCfg(const QString &fileName, const QString &ip, quint16 port = 500); /*! - * \brief Resolve SimConnect exception (based on Qt metadata). + * Resolve SimConnect exception (based on Qt metadata). * \param id enum element * \return enum element's name */ static const QString simConnectExceptionToString(const DWORD id); /*! - * \brief Resolve SimConnect surface (based on Qt metadata). + * Resolve SimConnect surface (based on Qt metadata). * \param type enum element * \param beautify remove "_" * \return @@ -141,17 +148,21 @@ namespace BlackSim SIMCONNECT_EXCEPTION_OBJECT_SCHEDULE }; - //! \brief Register metadata + //! Register metadata static void registerMetadata(); private: /*! - * \brief Resolve enum value to its cleartext (based on Qt metadata). + * Resolve enum value to its cleartext (based on Qt metadata). * \param id enum element * \param enumName name of the resolved enum * \return enum element's name */ static const QString resolveEnumToString(const DWORD id, const char *enumName); + + //! Hidden constructor + CSimConnectUtilities(); + }; } } diff --git a/src/blacksim/setsimulator.cpp b/src/blacksim/setsimulator.cpp index 5f1e55546..20059a26a 100644 --- a/src/blacksim/setsimulator.cpp +++ b/src/blacksim/setsimulator.cpp @@ -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 "setsimulator.h" using namespace BlackMisc; diff --git a/src/blacksim/setsimulator.h b/src/blacksim/setsimulator.h index 99aecd968..f57e197f1 100644 --- a/src/blacksim/setsimulator.h +++ b/src/blacksim/setsimulator.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. + */ //! \file diff --git a/src/blacksim/simulatormodelmappings.h b/src/blacksim/simulatormodelmappings.h index b352454d2..f20b887fd 100644 --- a/src/blacksim/simulatormodelmappings.h +++ b/src/blacksim/simulatormodelmappings.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 BLACKSIM_MODELMAPPINGS_H #define BLACKSIM_MODELMAPPINGS_H diff --git a/src/blacksim/simulatorsetup.h b/src/blacksim/simulatorsetup.h index 2251b9bfb..19a367068 100644 --- a/src/blacksim/simulatorsetup.h +++ b/src/blacksim/simulatorsetup.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 BLACKSIM_SIMSETUP_H #define BLACKSIM_SIMSETUP_H diff --git a/src/plugins/simulator/fs9/blacksimplugin_freefunctions.cpp b/src/plugins/simulator/fs9/blacksimplugin_freefunctions.cpp index c197b3dc7..9fb58981d 100644 --- a/src/plugins/simulator/fs9/blacksimplugin_freefunctions.cpp +++ b/src/plugins/simulator/fs9/blacksimplugin_freefunctions.cpp @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/plugins/simulator/fs9/blacksimplugin_freefunctions.h b/src/plugins/simulator/fs9/blacksimplugin_freefunctions.h index 042be15a6..4864f5ae2 100644 --- a/src/plugins/simulator/fs9/blacksimplugin_freefunctions.h +++ b/src/plugins/simulator/fs9/blacksimplugin_freefunctions.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/plugins/simulator/fs9/callback_wrapper.h b/src/plugins/simulator/fs9/callback_wrapper.h index 3b0f74bdb..8b2c1d78c 100644 --- a/src/plugins/simulator/fs9/callback_wrapper.h +++ b/src/plugins/simulator/fs9/callback_wrapper.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/plugins/simulator/fs9/directplay_peer.cpp b/src/plugins/simulator/fs9/directplay_peer.cpp index 9c6a36312..af434bd12 100644 --- a/src/plugins/simulator/fs9/directplay_peer.cpp +++ b/src/plugins/simulator/fs9/directplay_peer.cpp @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/plugins/simulator/fs9/directplay_peer.h b/src/plugins/simulator/fs9/directplay_peer.h index 855702fbb..c9c90444f 100644 --- a/src/plugins/simulator/fs9/directplay_peer.h +++ b/src/plugins/simulator/fs9/directplay_peer.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/plugins/simulator/fs9/fs9.h b/src/plugins/simulator/fs9/fs9.h index 905c06323..996cd56a5 100644 --- a/src/plugins/simulator/fs9/fs9.h +++ b/src/plugins/simulator/fs9/fs9.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/plugins/simulator/fs9/fs9_client.cpp b/src/plugins/simulator/fs9/fs9_client.cpp index b289c6ddc..80d61b07f 100644 --- a/src/plugins/simulator/fs9/fs9_client.cpp +++ b/src/plugins/simulator/fs9/fs9_client.cpp @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/plugins/simulator/fs9/fs9_client.h b/src/plugins/simulator/fs9/fs9_client.h index 2cea0af95..c929bf5d4 100644 --- a/src/plugins/simulator/fs9/fs9_client.h +++ b/src/plugins/simulator/fs9/fs9_client.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/plugins/simulator/fs9/fs9_host.cpp b/src/plugins/simulator/fs9/fs9_host.cpp index ae2e6342c..83b4205aa 100644 --- a/src/plugins/simulator/fs9/fs9_host.cpp +++ b/src/plugins/simulator/fs9/fs9_host.cpp @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/plugins/simulator/fs9/fs9_host.h b/src/plugins/simulator/fs9/fs9_host.h index 9da16e21d..9f1b00ac9 100644 --- a/src/plugins/simulator/fs9/fs9_host.h +++ b/src/plugins/simulator/fs9/fs9_host.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/plugins/simulator/fs9/host_node.cpp b/src/plugins/simulator/fs9/host_node.cpp index 7a968a439..a365c9907 100644 --- a/src/plugins/simulator/fs9/host_node.cpp +++ b/src/plugins/simulator/fs9/host_node.cpp @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/plugins/simulator/fs9/host_node.h b/src/plugins/simulator/fs9/host_node.h index 63581f482..202cf10db 100644 --- a/src/plugins/simulator/fs9/host_node.h +++ b/src/plugins/simulator/fs9/host_node.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/plugins/simulator/fs9/multiplayer_packet_parser.cpp b/src/plugins/simulator/fs9/multiplayer_packet_parser.cpp index 624a2999e..fdd28d31e 100644 --- a/src/plugins/simulator/fs9/multiplayer_packet_parser.cpp +++ b/src/plugins/simulator/fs9/multiplayer_packet_parser.cpp @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/plugins/simulator/fs9/multiplayer_packet_parser.h b/src/plugins/simulator/fs9/multiplayer_packet_parser.h index ac0958945..6084c17e4 100644 --- a/src/plugins/simulator/fs9/multiplayer_packet_parser.h +++ b/src/plugins/simulator/fs9/multiplayer_packet_parser.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/plugins/simulator/fs9/multiplayer_packets.h b/src/plugins/simulator/fs9/multiplayer_packets.h index 274757b37..85b9f2fda 100644 --- a/src/plugins/simulator/fs9/multiplayer_packets.h +++ b/src/plugins/simulator/fs9/multiplayer_packets.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/plugins/simulator/fs9/simulator_fs9.cpp b/src/plugins/simulator/fs9/simulator_fs9.cpp index de8a687ae..604addbbd 100644 --- a/src/plugins/simulator/fs9/simulator_fs9.cpp +++ b/src/plugins/simulator/fs9/simulator_fs9.cpp @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/plugins/simulator/fs9/simulator_fs9.h b/src/plugins/simulator/fs9/simulator_fs9.h index b6cc95705..076a61e8b 100644 --- a/src/plugins/simulator/fs9/simulator_fs9.h +++ b/src/plugins/simulator/fs9/simulator_fs9.h @@ -2,7 +2,7 @@ * 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, + * 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. */ diff --git a/src/swiftcore/main.cpp b/src/swiftcore/main.cpp index 75d0e7a9a..1ccb562d8 100644 --- a/src/swiftcore/main.cpp +++ b/src/swiftcore/main.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/swiftgui_standard/guimodeenums.h b/src/swiftgui_standard/guimodeenums.h index fd9f3d5e0..f87300a12 100644 --- a/src/swiftgui_standard/guimodeenums.h +++ b/src/swiftgui_standard/guimodeenums.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/swiftgui_standard/introwindow.h b/src/swiftgui_standard/introwindow.h index ca2eb0686..98c7a9b82 100644 --- a/src/swiftgui_standard/introwindow.h +++ b/src/swiftgui_standard/introwindow.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/swiftgui_standard/mainwindow.cpp b/src/swiftgui_standard/mainwindow.cpp index 2f385e29c..801789024 100644 --- a/src/swiftgui_standard/mainwindow.cpp +++ b/src/swiftgui_standard/mainwindow.cpp @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/src/swiftgui_standard/mainwindow.h b/src/swiftgui_standard/mainwindow.h index 40d22e0ca..df622869f 100644 --- a/src/swiftgui_standard/mainwindow.h +++ b/src/swiftgui_standard/mainwindow.h @@ -1,8 +1,8 @@ /* 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, + * 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. */ diff --git a/tests/blackmisc/testcontainers.cpp b/tests/blackmisc/testcontainers.cpp index 75924f14a..da3d88dde 100644 --- a/tests/blackmisc/testcontainers.cpp +++ b/tests/blackmisc/testcontainers.cpp @@ -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 #include "testcontainers.h" #include "testvalueobject.h" diff --git a/tests/blackmisc/testvalueobject.cpp b/tests/blackmisc/testvalueobject.cpp index 4f6545722..aa9da289f 100644 --- a/tests/blackmisc/testvalueobject.cpp +++ b/tests/blackmisc/testvalueobject.cpp @@ -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 "testvalueobject.h" #include "blackmisc/blackmiscfreefunctions.h" #include diff --git a/tests/blackmisc/testvalueobject.h b/tests/blackmisc/testvalueobject.h index 362bd58c3..669d4609f 100644 --- a/tests/blackmisc/testvalueobject.h +++ b/tests/blackmisc/testvalueobject.h @@ -1,12 +1,18 @@ -/* 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_SERVER_H #define BLACKMISC_SERVER_H -#include "blackmisc/valueobject.h" +#include "blackmisc/propertyindex.h" #include "blackmisc/sequence.h" #include "blackmisc/collection.h" #include "blackmisc/dictionary.h" @@ -19,35 +25,37 @@ namespace BlackMisc class CTestValueObject : public BlackMisc::CValueObject { public: - //! \brief Default constructor. + //! Properties by index + enum ColumnIndex + { + IndexName = 10000, + IndexDescription, + }; + + //! Default constructor. CTestValueObject() {} - //! \brief Constructor. + //! Constructor. CTestValueObject(const QString &name, const QString &description) : m_name(name), m_description(description) {} - //! \copydoc CValueObject::toQVariant - virtual QVariant toQVariant() const override - { - return QVariant::fromValue(*this); - } - //! \brief Get name + //! Get name const QString &getName() const { return m_name; } - //! \brief Set name + //! Set name void setName(const QString &name) { m_name = name; } - //! \brief Get description + //! Get description const QString &getDescription() const { return m_description; } - //! \brief Set description + //! Set description void setDescription(const QString &description) { m_description = description; } - //! \brief Equal operator == + //! Equal operator == bool operator ==(const CTestValueObject &other) const; - //! \brief Unequal operator != + //! Unequal operator != bool operator !=(const CTestValueObject &other) const; //! \copydoc CValueObject::getValueHash() @@ -59,27 +67,33 @@ 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 Properties by index - enum ColumnIndex - { - IndexName = 0, - IndexDescription, - }; - //! \copydoc CValueObject::propertyByIndex(int) - QVariant propertyByIndex(int index) const override; + virtual QVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const override; //! \copydoc CValueObject::setPropertyByIndex(const QVariant &, int index) - void setPropertyByIndex(const QVariant &variant, int index) override; + void setPropertyByIndex(const QVariant &variant, const BlackMisc::CPropertyIndex &index) override; - //! \copydoc CValueObject::propertyByIndexAsString() - QString propertyByIndexAsString(int index, bool i18n) const; + //! \copydoc CValueObject::toQVariant + virtual QVariant toQVariant() const override + { + return QVariant::fromValue(*this); + } + + //! \copydoc CValueObject::fromQVariant + virtual void fromQVariant(const QVariant &variant) override + { + Q_ASSERT(variant.canConvert()); + if (variant.canConvert()) + { + (*this) = variant.value(); + } + } protected: //! \copydoc CValueObject::convertToQString() @@ -142,9 +156,9 @@ Q_DECLARE_METATYPE(CNotHashableMapDictionary) // MSVC has trouble with these checks #if !defined(Q_CC_MSVC) static_assert(std::is_same::value, - "Expected CValueObjectDictionary to use QHash"); + "Expected CValueObjectDictionary to use QHash"); static_assert(std::is_same::value, - "Expected CDictionary to use QMap"); + "Expected CDictionary to use QMap"); #endif // ! Q_CC_MSVC #endif // guard