mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 21:45:34 +08:00
Ref T709, bool return value if settings changed
This commit is contained in:
committed by
Mat Sutcliffe
parent
432f7398b3
commit
77883edf9c
@@ -53,6 +53,27 @@ namespace BlackMisc
|
|||||||
this->parseXSwiftBusString(json);
|
this->parseXSwiftBusString(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CXSwiftBusSettingsQtFree::setMaxPlanes(int planes)
|
||||||
|
{
|
||||||
|
if (planes == m_maxPlanes) { return false; }
|
||||||
|
m_maxPlanes = planes;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CXSwiftBusSettingsQtFree::setFollowAircraftDistanceM(int meters)
|
||||||
|
{
|
||||||
|
if (meters == m_followAircraftDistanceM) { return false; }
|
||||||
|
m_followAircraftDistanceM = meters;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CXSwiftBusSettingsQtFree::setMaxDrawDistanceNM(double nauticalMiles)
|
||||||
|
{
|
||||||
|
if (isFuzzyEqual(nauticalMiles, m_maxDrawDistanceNM)) { return false; }
|
||||||
|
m_maxDrawDistanceNM = nauticalMiles;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool CXSwiftBusSettingsQtFree::parseXSwiftBusString(const std::string &json)
|
bool CXSwiftBusSettingsQtFree::parseXSwiftBusString(const std::string &json)
|
||||||
{
|
{
|
||||||
if (json.empty()) { return false; }
|
if (json.empty()) { return false; }
|
||||||
|
|||||||
@@ -46,13 +46,13 @@ namespace BlackMisc
|
|||||||
bool isDrawingLabels() const { return m_drawingLabels; }
|
bool isDrawingLabels() const { return m_drawingLabels; }
|
||||||
|
|
||||||
//! Set the maximum number of aircraft.
|
//! Set the maximum number of aircraft.
|
||||||
void setMaxPlanes(int planes) { m_maxPlanes = planes; }
|
bool setMaxPlanes(int planes);
|
||||||
|
|
||||||
//! Get the maximum number of aircraft.
|
//! Get the maximum number of aircraft.
|
||||||
int getMaxPlanes() const { return m_maxPlanes; }
|
int getMaxPlanes() const { return m_maxPlanes; }
|
||||||
|
|
||||||
//! Set follow aircraft distance
|
//! Set follow aircraft distance
|
||||||
void setFollowAircraftDistanceM(int meters) { m_followAircraftDistanceM = meters; }
|
bool setFollowAircraftDistanceM(int meters);
|
||||||
|
|
||||||
//! Get follow aircraft distance
|
//! Get follow aircraft distance
|
||||||
int getFollowAircraftDistanceM() const { return m_followAircraftDistanceM; }
|
int getFollowAircraftDistanceM() const { return m_followAircraftDistanceM; }
|
||||||
@@ -61,7 +61,7 @@ namespace BlackMisc
|
|||||||
double getMaxDrawDistanceNM() const { return m_maxDrawDistanceNM; }
|
double getMaxDrawDistanceNM() const { return m_maxDrawDistanceNM; }
|
||||||
|
|
||||||
//! Set the maximum distance at which to draw aircraft (nautical miles).
|
//! Set the maximum distance at which to draw aircraft (nautical miles).
|
||||||
void setMaxDrawDistanceNM(double nauticalMiles) { m_maxDrawDistanceNM = nauticalMiles; }
|
bool setMaxDrawDistanceNM(double nauticalMiles);
|
||||||
|
|
||||||
//! Load and parse config file
|
//! Load and parse config file
|
||||||
bool parseXSwiftBusString(const std::string &json);
|
bool parseXSwiftBusString(const std::string &json);
|
||||||
|
|||||||
Reference in New Issue
Block a user