Fix compiler warnings

This commit is contained in:
Lars Toenning
2019-03-03 14:55:54 +01:00
committed by Mat Sutcliffe
parent 37cdb2e246
commit decf9222ad
3 changed files with 64 additions and 61 deletions

View File

@@ -12,6 +12,9 @@
namespace BlackMisc{ namespace BlackMisc{
namespace Simulation { namespace Simulation {
namespace Flightgear { namespace Flightgear {
/*!
* Flightgear aircraft model loader
*/
class AircraftModelLoaderFlightgear : public Simulation::IAircraftModelLoader{ class AircraftModelLoaderFlightgear : public Simulation::IAircraftModelLoader{
Q_OBJECT Q_OBJECT
@@ -19,15 +22,16 @@ namespace BlackMisc{
public: public:
//Constructor //! Constructor
AircraftModelLoaderFlightgear(QObject *parent = nullptr); AircraftModelLoaderFlightgear(QObject *parent = nullptr);
//! Virtual destructor
virtual ~AircraftModelLoaderFlightgear() override; virtual ~AircraftModelLoaderFlightgear() override;
// Interface functions // Interface functions
// Parsed or injected models //! Parsed or injected models
void updateInstalledModels(const CAircraftModelList &models); void updateInstalledModels(const CAircraftModelList &models);
bool isLoadingFinished() const; bool isLoadingFinished() const override;
protected: protected:
// Interface functions // Interface functions

View File

@@ -103,94 +103,94 @@ namespace BlackSimPlugin
//! Get own aircraft situation data //! Get own aircraft situation data
void getOwnAircraftSituationData(BlackSimPlugin::Flightgear::FlightgearData *o_flightgearData); void getOwnAircraftSituationData(BlackSimPlugin::Flightgear::FlightgearData *o_flightgearData);
//! \copydoc FGSwiftBus::CService::addTextMessage //! Add a text message to the on-screen display
void addTextMessage(const QString &text); void addTextMessage(const QString &text);
//! \copydoc FGSwiftBus::CService::getAircraftModelPath //! Get full path to current aircraft model
//! @{ //! @{
QString getAircraftModelPath() const; QString getAircraftModelPath() const;
void getAircraftModelPathAsync(QString *o_modelPath); void getAircraftModelPathAsync(QString *o_modelPath);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getAircraftModelFilename //! Get base filename of current aircraft model
//! @{ //! @{
QString getAircraftModelFilename() const; QString getAircraftModelFilename() const;
void getAircraftModelFilenameAsync(QString *o_modelFilename); void getAircraftModelFilenameAsync(QString *o_modelFilename);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getAircraftLivery //! Get current aircraft livery
//! @{ //! @{
QString getAircraftLivery() const; QString getAircraftLivery() const;
void getAircraftLiveryAsync(QString *o_modelLivery); void getAircraftLiveryAsync(QString *o_modelLivery);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getAircraftIcaoCode //! Get the ICAO code of the current aircraft model
//! @{ //! @{
QString getAircraftIcaoCode() const; QString getAircraftIcaoCode() const;
void getAircraftIcaoCodeAsync(QString *o_icaoCode); void getAircraftIcaoCodeAsync(QString *o_icaoCode);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getAircraftDescription //! Get the description of the current aircraft model
//! @{ //! @{
QString getAircraftDescription() const; QString getAircraftDescription() const;
void getAircraftDescriptionAsync(QString *o_description); void getAircraftDescriptionAsync(QString *o_description);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getAircraftModelString //! Get canonical swift model string of current aircraft model
//! @{ //! @{
QString getAircraftModelString() const; QString getAircraftModelString() const;
void getAircraftModelStringAsync(QString *o_modelString); void getAircraftModelStringAsync(QString *o_modelString);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getAircraftName //! Get name of current aircraft model
//! @{ //! @{
QString getAircraftName() const; QString getAircraftName() const;
void getAircraftNameAsync(QString *o_name); void getAircraftNameAsync(QString *o_name);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::isPaused //! True if sim is paused
//! @{ //! @{
bool isPaused() const; bool isPaused() const;
void isPausedAsync(bool *o_paused); void isPausedAsync(bool *o_paused);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getLatitudeDeg //! Get aircraft latitude in degrees
//! @{ //! @{
double getLatitudeDeg() const; double getLatitudeDeg() const;
void getLatitudeDegAsync(double *o_latitude); void getLatitudeDegAsync(double *o_latitude);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getLongitudeDeg //! Get aircraft longitude in degrees
//! @{ //! @{
double getLongitudeDeg() const; double getLongitudeDeg() const;
void getLongitudeDegAsync(double *o_longitude); void getLongitudeDegAsync(double *o_longitude);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getAltitudeMslFt //! Get aircraft altitude in feet
//! @{ //! @{
double getAltitudeMslFt() const; double getAltitudeMslFt() const;
void getAltitudeMslFtAsync(double *o_altitude); void getAltitudeMslFtAsync(double *o_altitude);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getHeightAglFt //! Get aircraft height in feet
//! @{ //! @{
double getHeightAglFt() const; double getHeightAglFt() const;
void getHeightAglFtAsync(double *o_height); void getHeightAglFtAsync(double *o_height);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getGroundSpeedKts //! Get aircraft groundspeed in knots
//! @{ //! @{
double getGroundSpeedKts() const; double getGroundSpeedKts() const;
void getGroundSpeedKtsAsync(double *o_groundspeed); void getGroundSpeedKtsAsync(double *o_groundspeed);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getPitchDeg //! Get aircraft pitch in degrees above horizon
//! @{ //! @{
double getPitchDeg() const; double getPitchDeg() const;
void getPitchDegAsync(double *o_pitch); void getPitchDegAsync(double *o_pitch);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getRollDeg //! Get aircraft roll in degrees
//! @{ //! @{
double getRollDeg() const; double getRollDeg() const;
void getRollDegAsync(double *o_roll); void getRollDegAsync(double *o_roll);
@@ -202,122 +202,121 @@ namespace BlackSimPlugin
void getAllWheelsOnGroundAsync(bool *o_allWheels); void getAllWheelsOnGroundAsync(bool *o_allWheels);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getCom1ActiveKhz //! Get the current COM1 active frequency in kHz
//! @{ //! @{
int getCom1ActiveKhz() const; int getCom1ActiveKhz() const;
void getCom1ActiveKhzAsync(int *o_com1Active); void getCom1ActiveKhzAsync(int *o_com1Active);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getCom1StandbyKhz //! Get the current COM1 standby frequency in kHz
//! @{ //! @{
int getCom1StandbyKhz() const; int getCom1StandbyKhz() const;
void getCom1StandbyKhzAsync(int *o_com1Standby); void getCom1StandbyKhzAsync(int *o_com1Standby);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getCom2ActiveKhz //! Get the current COM2 active frequency in kHz
//! @{ //! @{
int getCom2ActiveKhz() const; int getCom2ActiveKhz() const;
void getCom2ActiveKhzAsync(int *o_com2Active); void getCom2ActiveKhzAsync(int *o_com2Active);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getCom2StandbyKhz //! Get the current COM2 standby frequency in kHz
//! @{ //! @{
int getCom2StandbyKhz() const; int getCom2StandbyKhz() const;
void getCom2StandbyKhzAsync(int *o_com2Standby); void getCom2StandbyKhzAsync(int *o_com2Standby);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getTransponderCode //! Get the current transponder code in decimal
//! @{ //! @{
int getTransponderCode() const; int getTransponderCode() const;
void getTransponderCodeAsync(int *o_xpdrCode); void getTransponderCodeAsync(int *o_xpdrCode);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getTransponderMode //! Get the current transponder mode (depends on the aircraft, 0 and 1 usually mean standby, >1 active)
//! @{ //! @{
int getTransponderMode() const; int getTransponderMode() const;
void getTransponderModeAsync(int *o_xpdrMode); void getTransponderModeAsync(int *o_xpdrMode);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getTransponderIdent //! Get whether we are currently squawking ident
//! @{ //! @{
bool getTransponderIdent() const; bool getTransponderIdent() const;
void getTransponderIdentAsync(bool *o_ident); void getTransponderIdentAsync(bool *o_ident);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getLandingLightsOn //! Get whether beacon lights are on
//! @{ //! @{
bool getBeaconLightsOn() const; bool getBeaconLightsOn() const;
void getBeaconLightsOnAsync(bool *o_beaconLightsOn); void getBeaconLightsOnAsync(bool *o_beaconLightsOn);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getLandingLightsOn //! Get whether landing lights are on
//! @{ //! @{
bool getLandingLightsOn() const; bool getLandingLightsOn() const;
void getLandingLightsOnAsync(bool *o_landingLightsOn); void getLandingLightsOnAsync(bool *o_landingLightsOn);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getNavLightsOn //! Get whether nav lights are on
//! @{ //! @{
bool getNavLightsOn() const; bool getNavLightsOn() const;
void getNavLightsOnAsync(bool *o_navLightsOn); void getNavLightsOnAsync(bool *o_navLightsOn);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getStrobeLightsOn //! Get whether strobe lights are on
//! @{ //! @{
bool getStrobeLightsOn() const; bool getStrobeLightsOn() const;
void getStrobeLightsOnAsync(bool *o_strobeLightsOn); void getStrobeLightsOnAsync(bool *o_strobeLightsOn);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getTaxiLightsOn //! Get whether taxi lights are on
//! @{ //! @{
bool getTaxiLightsOn() const; bool getTaxiLightsOn() const;
void getTaxiLightsOnAsync(bool *o_taxiLightsOn); void getTaxiLightsOnAsync(bool *o_taxiLightsOn);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getQNHInHg //! Get barometric pressure at sea level in inches of mercury.
//! @{ //! @{
double getQNHInHg() const; double getQNHInHg() const;
void getQNHInHgAsync(double *o_qnh); void getQNHInHgAsync(double *o_qnh);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::setCom1ActiveKhz //! Set the current COM1 active frequency in kHz
void setCom1ActiveKhz(int freq); void setCom1ActiveKhz(int freq);
//! \copydoc FGSwiftBus::CService::setCom1StandbyKhz //! Set the current COM1 standby frequency in kHz
void setCom1StandbyKhz(int freq); void setCom1StandbyKhz(int freq);
//! \copydoc FGSwiftBus::CService::setCom2ActiveKhz //! Set the current COM2 active frequency in kHz
void setCom2ActiveKhz(int freq); void setCom2ActiveKhz(int freq);
//! \copydoc FGSwiftBus::CService::setCom2StandbyKhz //! Set the current COM2 standby frequency in kHz
void setCom2StandbyKhz(int freq); void setCom2StandbyKhz(int freq);
//! \copydoc FGSwiftBus::CService::setTransponderCode //! Set the current transponder code in decimal
void setTransponderCode(int code); void setTransponderCode(int code);
//! \copydoc FGSwiftBus::CService::setTransponderMode //! Set the current transponder mode (depends on the aircraft, 0 and 1 usually mean standby, >1 active)
void setTransponderMode(int mode); void setTransponderMode(int mode);
//! \copydoc FGSwiftBus::CService::getFlapsDeployRatio //! Get flaps deploy ratio, where 0.0 is flaps fully retracted, and 1.0 is flaps fully extended.
//! @{ //! @{
double getFlapsDeployRatio() const; double getFlapsDeployRatio() const;
void getFlapsDeployRatioAsync(double *o_flapsDeployRatio); void getFlapsDeployRatioAsync(double *o_flapsDeployRatio);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getGearDeployRatio //! Get gear deploy ratio, where 0 is up and 1 is down
//! @{ //! @{
double getGearDeployRatio() const; double getGearDeployRatio() const;
void getGearDeployRatioAsync(double *o_gearDeployRatio); void getGearDeployRatioAsync(double *o_gearDeployRatio);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getEngineN1Percentage //! Get the N1 speed as percent of max (per engine)
//! @{ //! @{
QList<double> getEngineN1Percentage() const; QList<double> getEngineN1Percentage() const;
void getEngineN1PercentageAsync(QList<double> *o_engineN1Percentage); void getEngineN1PercentageAsync(QList<double> *o_engineN1Percentage);
//! @} //! @}
//! \copydoc FGSwiftBus::CService::getSpeedBrakeRatio //! Get the ratio how much the speedbrakes surfaces are extended (0.0 is fully retracted, and 1.0 is fully extended)
//! @{ //! @{
double getSpeedBrakeRatio() const; double getSpeedBrakeRatio() const;
void getSpeedBrakeRatioAsync(double *o_speedBrakeRatio); void getSpeedBrakeRatioAsync(double *o_speedBrakeRatio);

View File

@@ -153,59 +153,59 @@ namespace BlackSimPlugin
void remoteAircraftAddingFailed(const QString &callsign); void remoteAircraftAddingFailed(const QString &callsign);
public slots: public slots:
//! \copydoc FGSwiftBus::CTraffic::acquireMultiplayerPlanes //! Returns whether multiplayer planes have been acquired. If not, owner will be set to the plugin that acquired it.
MultiplayerAcquireInfo acquireMultiplayerPlanes(); MultiplayerAcquireInfo acquireMultiplayerPlanes();
//! \copydoc FGSwiftBus::CTraffic::initialize //! Initialize the multiplayer planes rendering and return true if successful
bool initialize(); bool initialize();
//! \copydoc FGSwiftBus::CTraffic::cleanup //! Reverse the actions of initialize().
void cleanup(); void cleanup();
//! \copydoc FGSwiftBus::CTraffic::loadPlanesPackage //! Load a collection of planes from the given directory and return true if successful
bool loadPlanesPackage(const QString &path); bool loadPlanesPackage(const QString &path);
//! \copydoc FGSwiftBus::CTraffic::setDefaultIcao //! Set the ICAO code to use for aircraft without a model match
void setDefaultIcao(const QString &defaultIcao); void setDefaultIcao(const QString &defaultIcao);
//! \copydoc FGSwiftBus::CTraffic::setDrawingLabels //! Set whether the plugin draws type and callsign labels above aircraft
void setDrawingLabels(bool drawing); void setDrawingLabels(bool drawing);
//! \copydoc FGSwiftBus::CTraffic::isDrawingLabels //! Get whether the plugin draws type and callsign labels above aircraft
bool isDrawingLabels() const; bool isDrawingLabels() const;
//! \copydoc FGSwiftBus::CTraffic::setMaxPlanes //! Set the maximum number of aircraft.
void setMaxPlanes(int planes); void setMaxPlanes(int planes);
//! \copydoc FGSwiftBus::CTraffic::setMaxDrawDistance //! Set the maximum distance at which to draw aircraft (nautical miles).
void setMaxDrawDistance(double nauticalMiles); void setMaxDrawDistance(double nauticalMiles);
//! \copydoc FGSwiftBus::CTraffic::addPlane //! Introduce a new traffic aircraft
void addPlane(const QString &callsign, const QString &modelName, const QString &aircraftIcao, const QString &airlineIcao, const QString &livery); void addPlane(const QString &callsign, const QString &modelName, const QString &aircraftIcao, const QString &airlineIcao, const QString &livery);
//! \copydoc FGSwiftBus::CTraffic::removePlane //! Remove a traffic aircraft
void removePlane(const QString &callsign); void removePlane(const QString &callsign);
//! \copydoc FGSwiftBus::CTraffic::removeAllPlanes //! Remove all traffic aircraft
void removeAllPlanes(); void removeAllPlanes();
//! \copydoc FGSwiftBus::CTraffic::setPlanesPositions //! Set the position of multiple traffic aircrafts
void setPlanesPositions(const BlackSimPlugin::Flightgear::PlanesPositions &planesPositions); void setPlanesPositions(const BlackSimPlugin::Flightgear::PlanesPositions &planesPositions);
//! \copydoc FGSwiftBus::CTraffic::setPlanesTransponders //! Set the transponder of multiple traffic aircraft
void setPlanesTransponders(const BlackSimPlugin::Flightgear::PlanesTransponders &planesTransponders); void setPlanesTransponders(const BlackSimPlugin::Flightgear::PlanesTransponders &planesTransponders);
//! \deprecated FGSwiftBus::CTraffic::setInterpolatorMode //! Set interpolator mode
void setInterpolatorMode(const QString &callsign, bool spline); void setInterpolatorMode(const QString &callsign, bool spline);
//! \copydoc FGSwiftBus::CTraffic::getRemoteAircraftData //! Get remote aircrafts data (lat, lon, elevation and CG)
void getRemoteAircraftData(const QStringList &callsigns, const RemoteAircraftDataCallback &setter) const; void getRemoteAircraftData(const QStringList &callsigns, const RemoteAircraftDataCallback &setter) const;
//! \copydoc FGSwiftBus::CTraffic::getElevationAtPosition //! Get the ground elevation at an arbitrary position
void getElevationAtPosition(const BlackMisc::Aviation::CCallsign &callsign, double latitudeDeg, double longitudeDeg, double altitudeMeters, void getElevationAtPosition(const BlackMisc::Aviation::CCallsign &callsign, double latitudeDeg, double longitudeDeg, double altitudeMeters,
const ElevationCallback &setter) const; const ElevationCallback &setter) const;
//! \copydoc FGSwiftBus::CTraffic::setFollowedAircraft //! Sets the aircraft with callsign to be followed in plane view
void setFollowedAircraft(const QString &callsign); void setFollowedAircraft(const QString &callsign);
private: private: