diff --git a/src/plugins/simulator/emulated/emulated.pro b/src/plugins/simulator/emulated/emulated.pro index 842d1aeb5..1c8a09a52 100644 --- a/src/plugins/simulator/emulated/emulated.pro +++ b/src/plugins/simulator/emulated/emulated.pro @@ -8,16 +8,18 @@ TEMPLATE = lib CONFIG += plugin shared CONFIG += blackmisc blackcore blackgui -DEPENDPATH += . $$SourceRoot/src +DEPENDPATH += . $$SourceRoot/src INCLUDEPATH += . $$SourceRoot/src SOURCES += *.cpp HEADERS += *.h -FORMS += *.ui +FORMS += *.ui DISTFILES += simulatoremulated.json - DESTDIR = $$DestRoot/bin/plugins/simulator +LIBS *= -lsimulatorplugincommon +addStaticLibraryDependency(simulatorplugincommon) + win32 { dlltarget.path = $$PREFIX/bin/plugins/simulator INSTALLS += dlltarget diff --git a/src/plugins/simulator/emulated/simulatoremulated.cpp b/src/plugins/simulator/emulated/simulatoremulated.cpp index 183da1615..9063169d1 100644 --- a/src/plugins/simulator/emulated/simulatoremulated.cpp +++ b/src/plugins/simulator/emulated/simulatoremulated.cpp @@ -36,7 +36,7 @@ namespace BlackSimPlugin IWeatherGridProvider *weatherGridProvider, IClientProvider *clientProvider, QObject *parent) : - CSimulatorCommon(info, ownAircraftProvider, remoteAircraftProvider, weatherGridProvider, clientProvider, parent) + CSimulatorPluginCommon(info, ownAircraftProvider, remoteAircraftProvider, weatherGridProvider, clientProvider, parent) { Q_ASSERT_X(sApp && sApp->getIContextSimulator(), Q_FUNC_INFO, "Need context"); @@ -47,6 +47,7 @@ namespace BlackSimPlugin m_monitorWidget.reset(new CSimulatorEmulatedMonitorDialog(this, sGui->mainApplicationWidget())); connect(qApp, &QApplication::aboutToQuit, this, &CSimulatorEmulated::closeMonitor); + connect(sGui, &CGuiApplication::aboutToShutdown, this, &CSimulatorEmulated::closeMonitor); connect(&m_interpolatorFetchTimer, &QTimer::timeout, this, &CSimulatorEmulated::fetchFromInterpolator); // connect own signals for monitoring @@ -180,7 +181,7 @@ namespace BlackSimPlugin bool CSimulatorEmulated::parseCommandLine(const QString &commandLine, const CIdentifier &originator) { if (canLog()) m_monitorWidget->appendReceivingCall(Q_FUNC_INFO, commandLine, originator.toQString()); - return CSimulatorCommon::parseCommandLine(commandLine, originator); + return CSimulatorPluginCommon::parseCommandLine(commandLine, originator); } void CSimulatorEmulated::registerHelp() @@ -316,7 +317,7 @@ namespace BlackSimPlugin if (parser.matchesPart(1, "show")) { m_monitorWidget->show(); return true; } if (parser.matchesPart(1, "hide")) { m_monitorWidget->hide(); return true; } } - return false; + return CSimulatorPluginCommon::parseDetails(parser); } void CSimulatorEmulated::setObjectName(const CSimulatorInfo &info) diff --git a/src/plugins/simulator/emulated/simulatoremulated.h b/src/plugins/simulator/emulated/simulatoremulated.h index 7bff81d55..c7eec489d 100644 --- a/src/plugins/simulator/emulated/simulatoremulated.h +++ b/src/plugins/simulator/emulated/simulatoremulated.h @@ -12,7 +12,7 @@ #ifndef BLACKSIMPLUGIN_EMULATED_SIMULATOREMULATED_H #define BLACKSIMPLUGIN_EMULATED_SIMULATOREMULATED_H -#include "blackcore/simulatorcommon.h" +#include "../plugincommon/simulatorplugincommon.h" #include "blackmisc/simulation/interpolatormulti.h" #include "blackmisc/simulation/interpolationrenderingsetup.h" #include "blackmisc/simulation/interpolationlogger.h" @@ -31,7 +31,7 @@ namespace BlackSimPlugin namespace Emulated { //! swift simulator implementation - class CSimulatorEmulated : public BlackCore::CSimulatorCommon + class CSimulatorEmulated : public Common::CSimulatorPluginCommon { Q_OBJECT friend class CSimulatorEmulatedMonitorDialog; //!< the monitor widget represents the simulator and needs access to internals (i.e. private/protected) diff --git a/src/plugins/simulator/fs9/fs9.pro b/src/plugins/simulator/fs9/fs9.pro index 44a86807f..12e74017a 100644 --- a/src/plugins/simulator/fs9/fs9.pro +++ b/src/plugins/simulator/fs9/fs9.pro @@ -1,20 +1,21 @@ load(common_pre) -QT += core dbus gui network xml +QT += core dbus gui network xml widgets TARGET = simulatorfs9 TEMPLATE = lib CONFIG += plugin shared -CONFIG += blackmisc blackcore +CONFIG += blackmisc blackcore blackgui DEPENDPATH += . $$SourceRoot/src INCLUDEPATH += . $$SourceRoot/src -LIBS += -lsimulatorfscommon -lfsuipc -luuid -LIBS += -ldxguid -lole32 +addStaticLibraryDependency(simulatorplugincommon) addStaticLibraryDependency(simulatorfscommon) addStaticLibraryDependency(fsuipc) +LIBS += -lsimulatorfscommon -lfsuipc -luuid -lsimulatorplugincommon +LIBS += -ldxguid -lole32 SOURCES += *.cpp HEADERS += *.h diff --git a/src/plugins/simulator/fs9/fs9client.cpp b/src/plugins/simulator/fs9/fs9client.cpp index 6f9e7c3c4..d94321b1a 100644 --- a/src/plugins/simulator/fs9/fs9client.cpp +++ b/src/plugins/simulator/fs9/fs9client.cpp @@ -31,7 +31,8 @@ namespace BlackSimPlugin { namespace Fs9 { - CFs9Client::CFs9Client(const CCallsign &callsign, const QString &modelName, const CTime &updateInterval, + CFs9Client::CFs9Client(const CCallsign &callsign, const QString &modelName, + const CTime &updateInterval, CInterpolationLogger *logger, ISimulator *simulator) : CDirectPlayPeer(simulator, callsign), m_updateInterval(updateInterval), diff --git a/src/plugins/simulator/fscommon/fscommon.pro b/src/plugins/simulator/fscommon/fscommon.pro index e0be7997a..6e1ac1d83 100644 --- a/src/plugins/simulator/fscommon/fscommon.pro +++ b/src/plugins/simulator/fscommon/fscommon.pro @@ -14,6 +14,9 @@ INCLUDEPATH += . $$SourceRoot/src SOURCES += *.cpp HEADERS += *.h +LIBS *= -lsimulatorplugincommon +addStaticLibraryDependency(simulatorplugincommon) + contains(BLACK_CONFIG, FSUIPC) { equals(WORD_SIZE,32) { DEFINES += SWIFT_USING_FSUIPC32 diff --git a/src/plugins/simulator/fscommon/simulatorfscommon.cpp b/src/plugins/simulator/fscommon/simulatorfscommon.cpp index 9c3e9bf8a..79f623b37 100644 --- a/src/plugins/simulator/fscommon/simulatorfscommon.cpp +++ b/src/plugins/simulator/fscommon/simulatorfscommon.cpp @@ -22,6 +22,7 @@ using namespace BlackMisc::Simulation; using namespace BlackMisc::Simulation::FsCommon; using namespace BlackMisc::Weather; using namespace BlackCore; +using namespace BlackSimPlugin::Common; namespace BlackSimPlugin { @@ -34,7 +35,7 @@ namespace BlackSimPlugin IWeatherGridProvider *weatherGridProvider, IClientProvider *clientProvider, QObject *parent) : - CSimulatorCommon(info, ownAircraftProvider, renderedAircraftProvider, weatherGridProvider, clientProvider, parent), + CSimulatorPluginCommon(info, ownAircraftProvider, renderedAircraftProvider, weatherGridProvider, clientProvider, parent), m_fsuipc(std::make_unique(this)) { CSimulatorFsCommon::registerHelp(); @@ -67,7 +68,7 @@ namespace BlackSimPlugin CLogMessage(this, CLogCategory::cmdLine()).info("FSUIPC is '%1'") << boolToOnOff(s); return s; } - return false; + return CSimulatorPluginCommon::parseDetails(parser); } void CSimulatorFsCommon::registerHelp() @@ -121,10 +122,7 @@ namespace BlackSimPlugin CAirportList CSimulatorFsCommon::getAirportsInRange() const { - if (!m_airportsInRangeFromSimulator.isEmpty()) - { - return m_airportsInRangeFromSimulator; - } + if (!m_airportsInRangeFromSimulator.isEmpty()) { return m_airportsInRangeFromSimulator; } return CSimulatorCommon::getAirportsInRange(); } diff --git a/src/plugins/simulator/fscommon/simulatorfscommon.h b/src/plugins/simulator/fscommon/simulatorfscommon.h index 5172184ca..a21984dc1 100644 --- a/src/plugins/simulator/fscommon/simulatorfscommon.h +++ b/src/plugins/simulator/fscommon/simulatorfscommon.h @@ -12,7 +12,7 @@ #ifndef BLACKSIMPLUGIN_FSCOMMON_SIMULATORFSCOMMON_H #define BLACKSIMPLUGIN_FSCOMMON_SIMULATORFSCOMMON_H -#include "blackcore/simulatorcommon.h" +#include "../plugincommon/simulatorplugincommon.h" #include "blackmisc/simulation/interpolator.h" #include "blackmisc/simulation/fscommon/aircraftcfgparser.h" #include "fsuipc.h" @@ -25,7 +25,7 @@ namespace BlackSimPlugin namespace FsCommon { //! Common base class for MS flight simulators - class CSimulatorFsCommon : public BlackCore::CSimulatorCommon + class CSimulatorFsCommon : public Common::CSimulatorPluginCommon { public: //! Destructor diff --git a/src/plugins/simulator/fsx/fsx.pro b/src/plugins/simulator/fsx/fsx.pro index 162bd35ba..2832e936a 100644 --- a/src/plugins/simulator/fsx/fsx.pro +++ b/src/plugins/simulator/fsx/fsx.pro @@ -2,24 +2,25 @@ load(common_pre) REQUIRES += contains(BLACK_CONFIG,FSX) -QT += core dbus gui network xml +QT += core dbus gui network xml widgets TARGET = simulatorfsx TEMPLATE = lib CONFIG += plugin shared -CONFIG += blackconfig blackmisc blackcore +CONFIG += blackconfig blackmisc blackcore blackgui DEPENDPATH += . $$SourceRoot/src INCLUDEPATH += . $$SourceRoot/src INCLUDEPATH *= $$EXTERNALSROOT/common/include/simconnect/FSX-XPack LIBS *= -L$$EXTERNALS_LIB_DIR/FSX-XPack -LIBS *= -lsimulatorfscommon -lsimulatorfsxcommon -lfsuipc -lSimConnect +LIBS *= -lsimulatorfscommon -lsimulatorfsxcommon -lfsuipc -lSimConnect -lsimulatorplugincommon LIBS += -ldxguid -lole32 addStaticLibraryDependency(simulatorfscommon) addStaticLibraryDependency(simulatorfsxcommon) addStaticLibraryDependency(fsuipc) +addStaticLibraryDependency(simulatorplugincommon) SOURCES += *.cpp HEADERS += *.h diff --git a/src/plugins/simulator/p3d/p3d.pro b/src/plugins/simulator/p3d/p3d.pro index 138b3bf75..310421600 100644 --- a/src/plugins/simulator/p3d/p3d.pro +++ b/src/plugins/simulator/p3d/p3d.pro @@ -2,13 +2,13 @@ load(common_pre) REQUIRES += contains(BLACK_CONFIG,P3D) -QT += core dbus gui network xml +QT += core dbus gui network xml widgets TARGET = simulatorp3d TEMPLATE = lib CONFIG += plugin shared -CONFIG += blackconfig blackmisc blackcore +CONFIG += blackconfig blackmisc blackcore blackgui DEPENDPATH += . $$SourceRoot/src INCLUDEPATH += . $$SourceRoot/src @@ -23,7 +23,8 @@ equals(WORD_SIZE,32) { INCLUDEPATH *= $$EXTERNALSROOT/common/include/simconnect/FSX-XPack } -LIBS += -lsimulatorfscommon -lsimulatorfsxcommon -lfsuipc +LIBS += -lsimulatorfscommon -lsimulatorfsxcommon -lfsuipc -lsimulatorplugincommon + equals(WORD_SIZE,64) { LIBS *= -L$$EXTERNALS_LIB_DIR/P3D-v4.1 LIBS *= -lAdvapi32 @@ -38,6 +39,7 @@ LIBS += -ldxguid -lole32 addStaticLibraryDependency(simulatorfscommon) addStaticLibraryDependency(simulatorfsxcommon) addStaticLibraryDependency(fsuipc) +addStaticLibraryDependency(simulatorplugincommon) # Ignore linker warning about missing pdb files from Simconnect msvc: QMAKE_LFLAGS *= /ignore:4099 diff --git a/src/plugins/simulator/plugincommon/plugincommon.pro b/src/plugins/simulator/plugincommon/plugincommon.pro new file mode 100644 index 000000000..26309645c --- /dev/null +++ b/src/plugins/simulator/plugincommon/plugincommon.pro @@ -0,0 +1,18 @@ +load(common_pre) + +QT += core dbus xml network widgets + +TARGET = simulatorplugincommon +TEMPLATE = lib + +CONFIG += staticlib +CONFIG += blackconfig blackmisc blackgui + +DEPENDPATH += . $$SourceRoot/src +INCLUDEPATH += . $$SourceRoot/src + +SOURCES += *.cpp +HEADERS += *.h +DESTDIR = $$DestRoot/lib + +load(common_post) diff --git a/src/plugins/simulator/plugincommon/simulatorplugincommon.cpp b/src/plugins/simulator/plugincommon/simulatorplugincommon.cpp new file mode 100644 index 000000000..acb64445b --- /dev/null +++ b/src/plugins/simulator/plugincommon/simulatorplugincommon.cpp @@ -0,0 +1,84 @@ +/* Copyright (C) 2018 + * swift Project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE 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 "simulatorplugincommon.h" +#include "blackgui/components/interpolationlogdisplaydialog.h" +#include "blackgui/guiapplication.h" +#include "blackmisc/simplecommandparser.h" + +using namespace BlackGui::Components; +using namespace BlackCore; +using namespace BlackMisc; +using namespace BlackMisc::Network; +using namespace BlackMisc::Simulation; +using namespace BlackMisc::Weather; + +namespace BlackSimPlugin +{ + namespace Common + { + CSimulatorPluginCommon::CSimulatorPluginCommon( + const CSimulatorPluginInfo &info, + IOwnAircraftProvider *ownAircraftProvider, + IRemoteAircraftProvider *renderedAircraftProvider, + IWeatherGridProvider *weatherGridProvider, + IClientProvider *clientProvider, + QObject *parent) : + CSimulatorCommon(info, ownAircraftProvider, renderedAircraftProvider, weatherGridProvider, clientProvider, parent) + { + CSimulatorPluginCommon::registerHelp(); + } + + CSimulatorPluginCommon::~CSimulatorPluginCommon() + { + if (m_interpolationDisplay) + { + m_interpolationDisplay->deleteLater(); + } + } + + void CSimulatorPluginCommon::showInterpolationDisplay() + { + if (!m_interpolationDisplay) + { + QWidget *parentWidget = sGui ? sGui->mainApplicationWidget() : nullptr; + CInterpolationLogDisplayDialog *dialog = new CInterpolationLogDisplayDialog(this, parentWidget); + m_interpolationDisplay = dialog; + } + m_interpolationDisplay->show(); + } + + bool CSimulatorPluginCommon::parseDetails(const CSimpleCommandParser &parser) + { + // .driver fsuipc on|off + if (parser.matchesPart(1, "intdisplay")) + { + this->showInterpolationDisplay(); + return true; + } + return CSimulatorCommon::parseDetails(parser); + } + + void CSimulatorPluginCommon::unload() + { + if (m_interpolationDisplay) + { + m_interpolationDisplay->hide(); + m_interpolationDisplay->deleteLater(); + } + CSimulatorCommon::unload(); + } + + void CSimulatorPluginCommon::registerHelp() + { + if (CSimpleCommandParser::registered("BlackSimPlugin::Common::CSimulatorPluginCommon")) { return; } + CSimpleCommandParser::registerCommand({".drv intdisplay", "interpolation display"}); + } + } // namespace +} // namespace diff --git a/src/plugins/simulator/plugincommon/simulatorplugincommon.h b/src/plugins/simulator/plugincommon/simulatorplugincommon.h new file mode 100644 index 000000000..eb256a31a --- /dev/null +++ b/src/plugins/simulator/plugincommon/simulatorplugincommon.h @@ -0,0 +1,63 @@ +/* Copyright (C) 2018 + * swift Project Community / Contributors + * + * This file is part of swift project. It is subject to the license terms in the LICENSE 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_COMMON_SIMULATORPLUGINCOMMON_H +#define BLACKSIMPLUGIN_COMMON_SIMULATORPLUGINCOMMON_H + +#include "blackcore/simulatorcommon.h" +#include +#include + +namespace BlackGui { namespace Components { class CInterpolationLogDisplayDialog; }} +namespace BlackSimPlugin +{ + namespace Common + { + //! Common base class for simulator plugins + class CSimulatorPluginCommon : public BlackCore::CSimulatorCommon + { + public: + //! Destructor + virtual ~CSimulatorPluginCommon(); + + protected: + //! Constructor + CSimulatorPluginCommon(const BlackMisc::Simulation::CSimulatorPluginInfo &info, + BlackMisc::Simulation::IOwnAircraftProvider *ownAircraftProvider, + BlackMisc::Simulation::IRemoteAircraftProvider *renderedAircraftProvider, + BlackMisc::Weather::IWeatherGridProvider *weatherGridProvider, + BlackMisc::Network::IClientProvider *clientProvider, + QObject *parent = nullptr); + + //! \addtogroup swiftdotcommands + //! @{ + //!
+            //! .drv intdisplay interpolation log display
+            //! 
+ //! @} + virtual bool parseDetails(const BlackMisc::CSimpleCommandParser &parser) override; + + // interface implementations + virtual void unload() override; + + //! Register help + static void registerHelp(); + + private: + //! Show the interpolator display + void showInterpolationDisplay(); + + QPointer m_interpolationDisplay; //!< can be owned by main window after setting a parent + }; + } // namespace +} // namespace + +#endif // guard diff --git a/src/plugins/simulator/simulator.pro b/src/plugins/simulator/simulator.pro index 3dcf34783..72a0444e3 100644 --- a/src/plugins/simulator/simulator.pro +++ b/src/plugins/simulator/simulator.pro @@ -3,6 +3,7 @@ load(common_pre) TEMPLATE = subdirs CONFIG += ordered +SUBDIRS += plugincommon SUBDIRS += emulated SUBDIRS += emulatedconfig diff --git a/src/plugins/simulator/xplane/simulatorxplane.cpp b/src/plugins/simulator/xplane/simulatorxplane.cpp index d8f7e0c5b..4b11533c3 100644 --- a/src/plugins/simulator/xplane/simulatorxplane.cpp +++ b/src/plugins/simulator/xplane/simulatorxplane.cpp @@ -8,33 +8,11 @@ */ #include "simulatorxplane.h" +#include "qcompilerdetection.h" +#include "xswiftbusserviceproxy.h" +#include "xswiftbustrafficproxy.h" +#include "xswiftbusweatherproxy.h" #include "blackcore/aircraftmatcher.h" -#include "blackmisc/aviation/aircraftengine.h" -#include "blackmisc/aviation/aircraftenginelist.h" -#include "blackmisc/aviation/aircrafticaocode.h" -#include "blackmisc/aviation/aircraftparts.h" -#include "blackmisc/aviation/aircraftsituation.h" -#include "blackmisc/aviation/airlineicaocode.h" -#include "blackmisc/aviation/altitude.h" -#include "blackmisc/aviation/callsign.h" -#include "blackmisc/aviation/comsystem.h" -#include "blackmisc/aviation/heading.h" -#include "blackmisc/aviation/livery.h" -#include "blackmisc/aviation/transponder.h" -#include "blackmisc/compare.h" -#include "blackmisc/dbusserver.h" -#include "blackmisc/geo/coordinategeodetic.h" -#include "blackmisc/geo/latitude.h" -#include "blackmisc/geo/longitude.h" -#include "blackmisc/iterator.h" -#include "blackmisc/logmessage.h" -#include "blackmisc/network/textmessage.h" -#include "blackmisc/pq/angle.h" -#include "blackmisc/pq/frequency.h" -#include "blackmisc/pq/length.h" -#include "blackmisc/pq/pressure.h" -#include "blackmisc/pq/speed.h" -#include "blackmisc/pq/temperature.h" #include "blackmisc/simulation/aircraftmodel.h" #include "blackmisc/simulation/simulatedaircraft.h" #include "blackmisc/simulation/simulatedaircraftlist.h" @@ -47,10 +25,32 @@ #include "blackmisc/weather/visibilitylayerlist.h" #include "blackmisc/weather/windlayer.h" #include "blackmisc/weather/windlayerlist.h" -#include "qcompilerdetection.h" -#include "xswiftbusserviceproxy.h" -#include "xswiftbustrafficproxy.h" -#include "xswiftbusweatherproxy.h" +#include "blackmisc/aviation/aircraftengine.h" +#include "blackmisc/aviation/aircraftenginelist.h" +#include "blackmisc/aviation/aircrafticaocode.h" +#include "blackmisc/aviation/aircraftparts.h" +#include "blackmisc/aviation/aircraftsituation.h" +#include "blackmisc/aviation/airlineicaocode.h" +#include "blackmisc/aviation/altitude.h" +#include "blackmisc/aviation/callsign.h" +#include "blackmisc/aviation/comsystem.h" +#include "blackmisc/aviation/heading.h" +#include "blackmisc/aviation/livery.h" +#include "blackmisc/aviation/transponder.h" +#include "blackmisc/network/textmessage.h" +#include "blackmisc/geo/coordinategeodetic.h" +#include "blackmisc/geo/latitude.h" +#include "blackmisc/geo/longitude.h" +#include "blackmisc/pq/angle.h" +#include "blackmisc/pq/frequency.h" +#include "blackmisc/pq/length.h" +#include "blackmisc/pq/pressure.h" +#include "blackmisc/pq/speed.h" +#include "blackmisc/pq/temperature.h" +#include "blackmisc/compare.h" +#include "blackmisc/dbusserver.h" +#include "blackmisc/iterator.h" +#include "blackmisc/logmessage.h" #include #include @@ -86,7 +86,7 @@ namespace BlackSimPlugin IWeatherGridProvider *weatherGridProvider, IClientProvider *clientProvider, QObject *parent) : - CSimulatorCommon(info, ownAircraftProvider, remoteAircraftProvider, weatherGridProvider, clientProvider, parent) + CSimulatorPluginCommon(info, ownAircraftProvider, remoteAircraftProvider, weatherGridProvider, clientProvider, parent) { m_watcher = new QDBusServiceWatcher(this); m_watcher->setWatchMode(QDBusServiceWatcher::WatchForUnregistration); @@ -112,7 +112,7 @@ namespace BlackSimPlugin void CSimulatorXPlane::unload() { - CSimulatorCommon::unload(); + CSimulatorPluginCommon::unload(); delete m_watcher; m_watcher = nullptr; } diff --git a/src/plugins/simulator/xplane/simulatorxplane.h b/src/plugins/simulator/xplane/simulatorxplane.h index d21276385..dc998fc1e 100644 --- a/src/plugins/simulator/xplane/simulatorxplane.h +++ b/src/plugins/simulator/xplane/simulatorxplane.h @@ -13,20 +13,21 @@ #define BLACKSIMPLUGIN_SIMULATOR_XPLANE_H #include "xplanempaircraft.h" +#include "plugins/simulator/xplaneconfig/simulatorxplaneconfig.h" +#include "plugins/simulator/plugincommon/simulatorplugincommon.h" #include "blackcore/simulator.h" #include "blackcore/simulatorcommon.h" -#include "plugins/simulator/xplaneconfig/simulatorxplaneconfig.h" -#include "blackmisc/aviation/airportlist.h" -#include "blackmisc/aviation/callsignset.h" -#include "blackmisc/geo/coordinategeodetic.h" -#include "blackmisc/pq/time.h" -#include "blackmisc/pq/units.h" #include "blackmisc/simulation/aircraftmodellist.h" #include "blackmisc/simulation/data/modelcaches.h" #include "blackmisc/simulation/settings/simulatorsettings.h" #include "blackmisc/simulation/settings/xswiftbussettings.h" #include "blackmisc/simulation/simulatedaircraftlist.h" #include "blackmisc/weather/weathergrid.h" +#include "blackmisc/aviation/airportlist.h" +#include "blackmisc/aviation/callsignset.h" +#include "blackmisc/geo/coordinategeodetic.h" +#include "blackmisc/pq/time.h" +#include "blackmisc/pq/units.h" #include "blackmisc/settingscache.h" #include "blackmisc/statusmessage.h" #include "blackmisc/identifier.h" @@ -103,7 +104,7 @@ namespace BlackSimPlugin }; //! X-Plane ISimulator implementation - class CSimulatorXPlane : public BlackCore::CSimulatorCommon + class CSimulatorXPlane : public Common::CSimulatorPluginCommon { Q_OBJECT diff --git a/src/plugins/simulator/xplane/xplane.pro b/src/plugins/simulator/xplane/xplane.pro index d775ffb49..f68f0a983 100644 --- a/src/plugins/simulator/xplane/xplane.pro +++ b/src/plugins/simulator/xplane/xplane.pro @@ -1,12 +1,12 @@ load(common_pre) -QT += core dbus network +QT += core dbus network widgets TARGET = simulatorxplane TEMPLATE = lib CONFIG += plugin shared -CONFIG += blackmisc blackcore +CONFIG += blackmisc blackcore blackgui DEPENDPATH += . $$SourceRoot/src INCLUDEPATH += . $$SourceRoot/src @@ -14,9 +14,11 @@ INCLUDEPATH += . $$SourceRoot/src SOURCES += *.cpp HEADERS += *.h DISTFILES += simulatorxplane.json - DESTDIR = $$DestRoot/bin/plugins/simulator +LIBS *= -lsimulatorplugincommon +addStaticLibraryDependency(simulatorplugincommon) + win32 { dlltarget.path = $$PREFIX/bin/plugins/simulator INSTALLS += dlltarget