mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 10:25:36 +08:00
refs #242, allows to change FSX cockpit from context
* Data definitions for FSX events * BCD conversion for COM and transponder * Update Cockpit method in context * Renamed setOwnAircraft -> updateOwnAircraftFromSim
This commit is contained in:
@@ -80,8 +80,15 @@ namespace BlackCore
|
||||
}
|
||||
|
||||
private slots:
|
||||
//! \copydoc IContextSimulator::updateOwnAircraft()
|
||||
virtual void updateOwnAircraft();
|
||||
//! Update own aircraft, because simulator has changed something
|
||||
void updateOwnAircraft();
|
||||
|
||||
//! \copydoc ISimulator::addAircraftSituation
|
||||
void addAircraftSituation(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CAircraftSituation &initialSituation);
|
||||
|
||||
//! Update cockpit from context, because someone else has changed cockpit (e.g. GUI, 3rd party)
|
||||
//! \remarks set by runtime, only locally
|
||||
void updateCockpitFromContext(const BlackMisc::Aviation::CAircraft &ownAircraft, const QString &originator);
|
||||
|
||||
//! Set new connection status
|
||||
void setConnectionStatus(ISimulator::Status status);
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace BlackCore
|
||||
class ISimulator : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
//! \brief Simulator connection
|
||||
@@ -68,15 +69,15 @@ namespace BlackCore
|
||||
//! Remove remote aircraft from simulator
|
||||
virtual void removeRemoteAircraft(const BlackMisc::Aviation::CCallsign &callsign) = 0;
|
||||
|
||||
//! Update own aircraft cockpit (usually from context)
|
||||
virtual bool updateOwnCockpit(const BlackMisc::Aviation::CAircraft &aircraft) = 0;
|
||||
|
||||
//! Simulator info
|
||||
virtual BlackSim::CSimulatorInfo getSimulatorInfo() const = 0;
|
||||
|
||||
signals:
|
||||
//! Emitted when the connection status has changed
|
||||
void statusChanged(ISimulator::Status status);
|
||||
|
||||
//! Emitted when new a new data object of the user aircraft is received
|
||||
void ownAircraftReceived(BlackMisc::Aviation::CAircraft aircraft);
|
||||
};
|
||||
|
||||
//! Factory pattern class to create instances of ISimulator
|
||||
@@ -100,6 +101,7 @@ namespace BlackCore
|
||||
|
||||
} // namespace BlackCore
|
||||
|
||||
// TODO: Use CProject to store this string
|
||||
Q_DECLARE_INTERFACE(BlackCore::ISimulatorFactory, "net.vatsim.PilotClient.BlackCore.SimulatorInterface")
|
||||
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user