mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
refs #703, moved context to subdir
* ns: Context * adjusted using classes
This commit is contained in:
150
src/blackcore/context/contextsimulatorproxy.h
Normal file
150
src/blackcore/context/contextsimulatorproxy.h
Normal file
@@ -0,0 +1,150 @@
|
||||
/* 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_CONTEXTSIMULATOR_PROXY_H
|
||||
#define BLACKCORE_CONTEXTSIMULATOR_PROXY_H
|
||||
|
||||
#include "blackcore/blackcoreexport.h"
|
||||
#include "blackcore/context/contextsimulator.h"
|
||||
#include "blackcore/corefacadeconfig.h"
|
||||
#include "blackmisc/aviation/airportlist.h"
|
||||
#include "blackmisc/pixmap.h"
|
||||
#include "blackmisc/pq/length.h"
|
||||
#include "blackmisc/pq/time.h"
|
||||
#include "blackmisc/simulation/aircraftmodellist.h"
|
||||
#include "blackmisc/simulation/simulatorplugininfo.h"
|
||||
#include "blackmisc/simulation/simulatorplugininfolist.h"
|
||||
#include "blackmisc/simulation/simulatorsetup.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
class QDBusConnection;
|
||||
namespace BlackMisc
|
||||
{
|
||||
class CGenericDBusInterface;
|
||||
namespace Simulation { class CSimulatedAircraft; }
|
||||
}
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
class CCoreFacade;
|
||||
namespace Context
|
||||
{
|
||||
//! DBus proxy for Simulator Context
|
||||
//! \ingroup dbus
|
||||
class BLACKCORE_EXPORT CContextSimulatorProxy : public IContextSimulator
|
||||
{
|
||||
Q_OBJECT
|
||||
friend class IContextSimulator;
|
||||
|
||||
public:
|
||||
//! Destructor
|
||||
~CContextSimulatorProxy() {}
|
||||
|
||||
public slots:
|
||||
//! \copydoc IContextSimulator::getSimulatorPluginInfo()
|
||||
virtual BlackMisc::Simulation::CSimulatorPluginInfo getSimulatorPluginInfo() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::getAvailableSimulatorPlugins()
|
||||
virtual BlackMisc::Simulation::CSimulatorPluginInfoList getAvailableSimulatorPlugins() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::startSimulatorPlugin()
|
||||
virtual bool startSimulatorPlugin(const BlackMisc::Simulation::CSimulatorPluginInfo &simulatorInfo) override;
|
||||
|
||||
//! \copydoc IContextSimulator::stopSimulatorPlugin()
|
||||
virtual void stopSimulatorPlugin(const BlackMisc::Simulation::CSimulatorPluginInfo &simulatorInfo) override;
|
||||
|
||||
//! \copydoc IContextSimulator::getSimulatorStatus()
|
||||
virtual int getSimulatorStatus() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::getAirportsInRange()
|
||||
virtual BlackMisc::Aviation::CAirportList getAirportsInRange() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::getInstalledModels()
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getInstalledModels() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::getInstalledModelsStartingWith
|
||||
virtual BlackMisc::Simulation::CAircraftModelList getInstalledModelsStartingWith(const QString modelString) const override;
|
||||
|
||||
//! \copydoc IContextSimulator::getInstalledModelsCount
|
||||
virtual int getInstalledModelsCount() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::reloadInstalledModels
|
||||
virtual void reloadInstalledModels() override;
|
||||
|
||||
//! \copydoc IContextSimulator::getSimulatorSetup
|
||||
virtual BlackMisc::Simulation::CSimulatorSetup getSimulatorSetup() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::setTimeSynchronization
|
||||
virtual bool setTimeSynchronization(bool enable, const BlackMisc::PhysicalQuantities::CTime &offset) override;
|
||||
|
||||
//! \copydoc IContextSimulator::isTimeSynchronized
|
||||
virtual bool isTimeSynchronized() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::getMaxRenderedAircraft
|
||||
virtual int getMaxRenderedAircraft() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::setMaxRenderedAircraft
|
||||
virtual void setMaxRenderedAircraft(int number) override;
|
||||
|
||||
//! \copydoc IContextSimulator::setMaxRenderedDistance
|
||||
virtual void setMaxRenderedDistance(const BlackMisc::PhysicalQuantities::CLength &distance) override;
|
||||
|
||||
//! \copydoc IContextSimulator::setMaxRenderedDistance
|
||||
virtual void deleteAllRenderingRestrictions() override;
|
||||
|
||||
//! \copydoc IContextSimulator::isRenderingRestricted
|
||||
virtual bool isRenderingRestricted() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::isRenderingEnabled
|
||||
virtual bool isRenderingEnabled() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::getMaxRenderedDistance
|
||||
virtual BlackMisc::PhysicalQuantities::CLength getMaxRenderedDistance() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::getRenderedDistanceBoundary
|
||||
virtual BlackMisc::PhysicalQuantities::CLength getRenderedDistanceBoundary() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::getRenderRestrictionText
|
||||
virtual QString getRenderRestrictionText() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::getTimeSynchronizationOffset
|
||||
virtual BlackMisc::PhysicalQuantities::CTime getTimeSynchronizationOffset() const override;
|
||||
|
||||
//! \copydoc IContextSimulator::iconForModel
|
||||
virtual BlackMisc::CPixmap iconForModel(const QString &modelString) const override;
|
||||
|
||||
//! \copydoc IContextSimulator::highlightAircraft
|
||||
virtual void highlightAircraft(const BlackMisc::Simulation::CSimulatedAircraft &aircraftToHighlight, bool enableHighlight, const BlackMisc::PhysicalQuantities::CTime &displayTime) override;
|
||||
|
||||
//! \copydoc IContextSimulator::requestWeatherGrid
|
||||
virtual void requestWeatherGrid(const BlackMisc::Weather::CWeatherGrid &weatherGrid, const BlackMisc::CIdentifier &identifier) override;
|
||||
|
||||
//! \copydoc ISimulator::enableDebugMessages
|
||||
virtual void enableDebugMessages(bool driver, bool interpolator) override;
|
||||
|
||||
private:
|
||||
BlackMisc::CGenericDBusInterface *m_dBusInterface;
|
||||
|
||||
//! Relay connection signals to local signals
|
||||
void relaySignals(const QString &serviceName, QDBusConnection &connection);
|
||||
|
||||
protected:
|
||||
//! Constructor
|
||||
CContextSimulatorProxy(CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime) : IContextSimulator(mode, runtime), m_dBusInterface(0) {}
|
||||
|
||||
//! DBus version constructor
|
||||
CContextSimulatorProxy(const QString &serviceName, QDBusConnection &connection, CCoreFacadeConfig::ContextMode mode, CCoreFacade *runtime);
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user