mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
refs #507, split up blackmiscfreefunctions
* single register metadata functions * string utils * metadata utils * some formatting / license header where applicable
This commit is contained in:
@@ -21,12 +21,6 @@ namespace BlackSimPlugin
|
||||
{
|
||||
namespace Fs9
|
||||
{
|
||||
void registerMetadata()
|
||||
{
|
||||
qRegisterMetaType<CFs9Host::HostStatus>();
|
||||
qRegisterMetaType<CFs9Client::ClientStatus>();
|
||||
}
|
||||
|
||||
CAircraftSituation aircraftSituationfromFS9(const MPPositionVelocity &positionVelocity)
|
||||
{
|
||||
CAircraftSituation situation;
|
||||
|
||||
@@ -46,9 +46,6 @@ namespace BlackSimPlugin
|
||||
pT = nullptr;
|
||||
}
|
||||
|
||||
//! Register all relevant metadata in BlackMisc
|
||||
void registerMetadata();
|
||||
|
||||
//! Convert FS9 struct to aircraft situation
|
||||
BlackMisc::Aviation::CAircraftSituation aircraftSituationfromFS9(const MPPositionVelocity &positionVelocity);
|
||||
|
||||
@@ -63,7 +60,7 @@ namespace BlackSimPlugin
|
||||
//! Print the direct play error
|
||||
HRESULT logDirectPlayError(HRESULT error);
|
||||
|
||||
}
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
|
||||
24
src/plugins/simulator/fs9/registermetadata.cpp
Normal file
24
src/plugins/simulator/fs9/registermetadata.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Copyright (C) 2015
|
||||
* swift project community / contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE 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 "registermetadata.h"
|
||||
#include "fs9_host.h"
|
||||
#include "fs9_client.h"
|
||||
|
||||
namespace BlackSimPlugin
|
||||
{
|
||||
namespace Fs9
|
||||
{
|
||||
void registerMetadata()
|
||||
{
|
||||
qRegisterMetaType<CFs9Host::HostStatus>();
|
||||
qRegisterMetaType<CFs9Client::ClientStatus>();
|
||||
}
|
||||
}
|
||||
}
|
||||
24
src/plugins/simulator/fs9/registermetadata.h
Normal file
24
src/plugins/simulator/fs9/registermetadata.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Copyright (C) 2015
|
||||
* swift project community / contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE 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 BLACKSIMPLUGIN_REGISTERMETADATA_H
|
||||
#define BLACKSIMPLUGIN_REGISTERMETADATA_H
|
||||
|
||||
namespace BlackSimPlugin
|
||||
{
|
||||
namespace Fs9
|
||||
{
|
||||
//! Register all relevant metadata in plugin
|
||||
void registerMetadata();
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "fs9_client.h"
|
||||
#include "multiplayer_packets.h"
|
||||
#include "multiplayer_packet_parser.h"
|
||||
#include "registermetadata.h"
|
||||
#include "blackcore/interpolator_linear.h"
|
||||
#include "blackmisc/simulation/simulatorplugininfo.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
|
||||
@@ -1,8 +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) 2014
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE 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 NOMINMAX
|
||||
#define NOMINMAX
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "simulator_fsx.h"
|
||||
#include "blackcore/interpolator_linear.h"
|
||||
#include "blackcore/blackcorefreefunctions.h"
|
||||
#include "blackcore/registermetadata.h"
|
||||
#include "blackmisc/simulation/fscommon/bcdconversions.h"
|
||||
#include "blackmisc/simulation/fsx/simconnectutilities.h"
|
||||
#include "blackmisc/simulation/fsx/fsxsimulatorsetup.h"
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "blackmisc/project.h"
|
||||
#include "blackmisc/aviation/airportlist.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/threadutilities.h"
|
||||
#include "blackmisc/threadutils.h"
|
||||
#include "blackmisc/simulation/fscommon/fscommonutil.h"
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "ui_simulatorxplaneconfigwindow.h"
|
||||
#include "blackcore/dbus_server.h"
|
||||
#include "blackmisc/simulation/xplane/xplaneutil.h"
|
||||
#include "blackmisc/fileutilities.h"
|
||||
#include "blackmisc/fileutils.h"
|
||||
#include <QStringBuilder>
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
|
||||
Reference in New Issue
Block a user