mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 02:55:44 +08:00
Formatting / tweaks
This commit is contained in:
@@ -461,7 +461,7 @@ QStatusBar QLabel {
|
|||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>5</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="pg_StatusPage">
|
<widget class="QWidget" name="pg_StatusPage">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -571,8 +571,8 @@ QStatusBar QLabel {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>86</width>
|
<width>326</width>
|
||||||
<height>59</height>
|
<height>267</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="label">
|
<attribute name="label">
|
||||||
@@ -614,8 +614,8 @@ QStatusBar QLabel {
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>90</width>
|
<width>326</width>
|
||||||
<height>55</height>
|
<height>267</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="label">
|
<attribute name="label">
|
||||||
@@ -1379,7 +1379,7 @@ QStatusBar QLabel {
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tw_Settings">
|
<widget class="QTabWidget" name="tw_Settings">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>3</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tb_SettingsTrafficNetwork">
|
<widget class="QWidget" name="tb_SettingsTrafficNetwork">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ namespace BlackMisc
|
|||||||
class CAircraft : public BlackMisc::CValueObject, public BlackMisc::Geo::ICoordinateGeodetic
|
class CAircraft : public BlackMisc::CValueObject, public BlackMisc::Geo::ICoordinateGeodetic
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! \brief Default constructor.
|
//! Default constructor.
|
||||||
CAircraft() : m_distanceToPlane(0, BlackMisc::PhysicalQuantities::CLengthUnit::nullUnit()) {}
|
CAircraft() : m_distanceToPlane(0, BlackMisc::PhysicalQuantities::CLengthUnit::nullUnit()) {}
|
||||||
|
|
||||||
//! \brief Constructor.
|
//! Constructor.
|
||||||
CAircraft(const CCallsign &callsign, const BlackMisc::Network::CUser &user, const CAircraftSituation &situation);
|
CAircraft(const CCallsign &callsign, const BlackMisc::Network::CUser &user, const CAircraftSituation &situation);
|
||||||
|
|
||||||
//! \copydoc CValueObject::toQVariant
|
//! \copydoc CValueObject::toQVariant
|
||||||
@@ -39,73 +39,73 @@ namespace BlackMisc
|
|||||||
return QVariant::fromValue(*this);
|
return QVariant::fromValue(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Get callsign.
|
//! Get callsign.
|
||||||
const CCallsign &getCallsign() const { return m_callsign; }
|
const CCallsign &getCallsign() const { return m_callsign; }
|
||||||
|
|
||||||
//! \brief Get callsign.
|
//! Get callsign.
|
||||||
QString getCallsignAsString() const { return m_callsign.asString(); }
|
QString getCallsignAsString() const { return m_callsign.asString(); }
|
||||||
|
|
||||||
//! \brief Set callsign
|
//! Set callsign
|
||||||
void setCallsign(const CCallsign &callsign) { this->m_callsign = callsign; this->m_pilot.setCallsign(callsign); }
|
void setCallsign(const CCallsign &callsign) { this->m_callsign = callsign; this->m_pilot.setCallsign(callsign); }
|
||||||
|
|
||||||
//! \brief Get situation.
|
//! Get situation.
|
||||||
const CAircraftSituation &getSituation() const { return m_situation; }
|
const CAircraftSituation &getSituation() const { return m_situation; }
|
||||||
|
|
||||||
//! \brief Set situation.
|
//! Set situation.
|
||||||
void setSituation(const CAircraftSituation &situation) { m_situation = situation; }
|
void setSituation(const CAircraftSituation &situation) { m_situation = situation; }
|
||||||
|
|
||||||
//! \brief Get user
|
//! Get user
|
||||||
const BlackMisc::Network::CUser &getPilot() const { return m_pilot; }
|
const BlackMisc::Network::CUser &getPilot() const { return m_pilot; }
|
||||||
|
|
||||||
//! \brief Get user's real name
|
//! Get user's real name
|
||||||
QString getPilotRealname() { return m_pilot.getRealName(); }
|
QString getPilotRealname() { return m_pilot.getRealName(); }
|
||||||
|
|
||||||
//! \brief Get user's real id
|
//! Get user's real id
|
||||||
QString getPilotId() { return m_pilot.getId(); }
|
QString getPilotId() { return m_pilot.getId(); }
|
||||||
|
|
||||||
//! \brief Set user
|
//! Set user
|
||||||
void setPilot(const BlackMisc::Network::CUser &user) { m_pilot = user; this->m_pilot.setCallsign(this->m_callsign);}
|
void setPilot(const BlackMisc::Network::CUser &user) { m_pilot = user; this->m_pilot.setCallsign(this->m_callsign);}
|
||||||
|
|
||||||
//! \brief Get ICAO info
|
//! Get ICAO info
|
||||||
const CAircraftIcao &getIcaoInfo() const { return m_icao; }
|
const CAircraftIcao &getIcaoInfo() const { return m_icao; }
|
||||||
|
|
||||||
//! \brief Set ICAO info
|
//! Set ICAO info
|
||||||
void setIcaoInfo(const CAircraftIcao &icao) { m_icao = icao; }
|
void setIcaoInfo(const CAircraftIcao &icao) { m_icao = icao; }
|
||||||
|
|
||||||
//! \brief Get the distance to own plane
|
//! Get the distance to own plane
|
||||||
const BlackMisc::PhysicalQuantities::CLength &getDistanceToPlane() const { return m_distanceToPlane; }
|
const BlackMisc::PhysicalQuantities::CLength &getDistanceToPlane() const { return m_distanceToPlane; }
|
||||||
|
|
||||||
//! \brief Set distance to own plane
|
//! Set distance to own plane
|
||||||
void setDistanceToPlane(const BlackMisc::PhysicalQuantities::CLength &distance) { this->m_distanceToPlane = distance; }
|
void setDistanceToPlane(const BlackMisc::PhysicalQuantities::CLength &distance) { this->m_distanceToPlane = distance; }
|
||||||
|
|
||||||
//! \brief Valid distance?
|
//! Valid distance?
|
||||||
bool hasValidDistance() const { return !this->m_distanceToPlane.isNegativeWithEpsilonConsidered();}
|
bool hasValidDistance() const { return !this->m_distanceToPlane.isNegativeWithEpsilonConsidered();}
|
||||||
|
|
||||||
//! \brief Has valid realname?
|
//! Has valid realname?
|
||||||
bool hasValidRealName() const { return this->m_pilot.hasValidRealName(); }
|
bool hasValidRealName() const { return this->m_pilot.hasValidRealName(); }
|
||||||
|
|
||||||
//! \brief Has valid id?
|
//! Has valid id?
|
||||||
bool hasValidId() const { return this->m_pilot.hasValidId(); }
|
bool hasValidId() const { return this->m_pilot.hasValidId(); }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Calculcate distance to plane, set it, and also return it
|
* Calculcate distance to plane, set it, and also return it
|
||||||
* \param position calculated from this postion to my own aircraft
|
* \param position calculated from this postion to my own aircraft
|
||||||
*/
|
*/
|
||||||
const BlackMisc::PhysicalQuantities::CLength &calculcateDistanceToPlane(const BlackMisc::Geo::CCoordinateGeodetic &position);
|
const BlackMisc::PhysicalQuantities::CLength &calculcateDistanceToPlane(const BlackMisc::Geo::CCoordinateGeodetic &position);
|
||||||
|
|
||||||
//! \brief Get position
|
//! Get position
|
||||||
BlackMisc::Geo::CCoordinateGeodetic getPosition() const { return this->m_situation.getPosition(); }
|
BlackMisc::Geo::CCoordinateGeodetic getPosition() const { return this->m_situation.getPosition(); }
|
||||||
|
|
||||||
//! \brief Set position
|
//! Set position
|
||||||
void setPosition(const BlackMisc::Geo::CCoordinateGeodetic &position) { this->m_situation.setPosition(position); }
|
void setPosition(const BlackMisc::Geo::CCoordinateGeodetic &position) { this->m_situation.setPosition(position); }
|
||||||
|
|
||||||
//! \brief Get altitude
|
//! Get altitude
|
||||||
const BlackMisc::Aviation::CAltitude &getAltitude() const { return this->m_situation.getAltitude(); }
|
const BlackMisc::Aviation::CAltitude &getAltitude() const { return this->m_situation.getAltitude(); }
|
||||||
|
|
||||||
//! \brief Set altitude
|
//! Set altitude
|
||||||
void setAltitude(const BlackMisc::Aviation::CAltitude &altitude) { this->m_situation.setAltitude(altitude); }
|
void setAltitude(const BlackMisc::Aviation::CAltitude &altitude) { this->m_situation.setAltitude(altitude); }
|
||||||
|
|
||||||
//! \brief Get groundspeed
|
//! Get groundspeed
|
||||||
const BlackMisc::PhysicalQuantities::CSpeed &getGroundSpeed() const { return this->m_situation.getGroundSpeed(); }
|
const BlackMisc::PhysicalQuantities::CSpeed &getGroundSpeed() const { return this->m_situation.getGroundSpeed(); }
|
||||||
|
|
||||||
//! \copydoc ICoordinateGeodetic::latitude
|
//! \copydoc ICoordinateGeodetic::latitude
|
||||||
@@ -117,72 +117,72 @@ namespace BlackMisc
|
|||||||
//! \copydoc CCoordinateGeodetic::height
|
//! \copydoc CCoordinateGeodetic::height
|
||||||
const BlackMisc::PhysicalQuantities::CLength &getHeight() const { return this->m_situation.getHeight(); }
|
const BlackMisc::PhysicalQuantities::CLength &getHeight() const { return this->m_situation.getHeight(); }
|
||||||
|
|
||||||
//! \brief Get heading
|
//! Get heading
|
||||||
const BlackMisc::Aviation::CHeading &getHeading() const { return this->m_situation.getHeading(); }
|
const BlackMisc::Aviation::CHeading &getHeading() const { return this->m_situation.getHeading(); }
|
||||||
|
|
||||||
//! \brief Get pitch
|
//! Get pitch
|
||||||
const BlackMisc::PhysicalQuantities::CAngle &getPitch() const { return this->m_situation.getPitch(); }
|
const BlackMisc::PhysicalQuantities::CAngle &getPitch() const { return this->m_situation.getPitch(); }
|
||||||
|
|
||||||
//! \brief Get bank
|
//! Get bank
|
||||||
const BlackMisc::PhysicalQuantities::CAngle &getBank() const { return this->m_situation.getBank(); }
|
const BlackMisc::PhysicalQuantities::CAngle &getBank() const { return this->m_situation.getBank(); }
|
||||||
|
|
||||||
//! \brief Get COM1 system
|
//! Get COM1 system
|
||||||
const BlackMisc::Aviation::CComSystem &getCom1System() const { return this->m_com1system; }
|
const BlackMisc::Aviation::CComSystem &getCom1System() const { return this->m_com1system; }
|
||||||
|
|
||||||
//! \brief Get COM2 system
|
//! Get COM2 system
|
||||||
const BlackMisc::Aviation::CComSystem &getCom2System() const { return this->m_com2system; }
|
const BlackMisc::Aviation::CComSystem &getCom2System() const { return this->m_com2system; }
|
||||||
|
|
||||||
//! \brief Set COM1 system
|
//! Set COM1 system
|
||||||
void setCom1System(const CComSystem &comSystem) { this->m_com1system = comSystem; }
|
void setCom1System(const CComSystem &comSystem) { this->m_com1system = comSystem; }
|
||||||
|
|
||||||
//! \brief Set COM2 system
|
//! Set COM2 system
|
||||||
void setCom2System(const CComSystem &comSystem) { this->m_com2system = comSystem; }
|
void setCom2System(const CComSystem &comSystem) { this->m_com2system = comSystem; }
|
||||||
|
|
||||||
//! Identical COM system?
|
//! Identical COM system?
|
||||||
bool hasSameComData(const CComSystem &com1, const CComSystem &com2, const CTransponder &transponder);
|
bool hasSameComData(const CComSystem &com1, const CComSystem &com2, const CTransponder &transponder);
|
||||||
|
|
||||||
//! \brief Is any (COM1/2) active frequency within 8.3383kHz channel?
|
//! Is any (COM1/2) active frequency within 8.3383kHz channel?
|
||||||
bool isActiveFrequencyWithin8_33kHzChannel(const BlackMisc::PhysicalQuantities::CFrequency &comFrequency) const
|
bool isActiveFrequencyWithin8_33kHzChannel(const BlackMisc::PhysicalQuantities::CFrequency &comFrequency) const
|
||||||
{
|
{
|
||||||
return this->m_com1system.isActiveFrequencyWithin8_33kHzChannel(comFrequency) ||
|
return this->m_com1system.isActiveFrequencyWithin8_33kHzChannel(comFrequency) ||
|
||||||
this->m_com2system.isActiveFrequencyWithin8_33kHzChannel(comFrequency);
|
this->m_com2system.isActiveFrequencyWithin8_33kHzChannel(comFrequency);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Is any (COM1/2) active frequency within 25kHz channel?
|
//! Is any (COM1/2) active frequency within 25kHz channel?
|
||||||
bool isActiveFrequencyWithin25kHzChannel(const BlackMisc::PhysicalQuantities::CFrequency &comFrequency) const
|
bool isActiveFrequencyWithin25kHzChannel(const BlackMisc::PhysicalQuantities::CFrequency &comFrequency) const
|
||||||
{
|
{
|
||||||
return this->m_com1system.isActiveFrequencyWithin25kHzChannel(comFrequency) ||
|
return this->m_com1system.isActiveFrequencyWithin25kHzChannel(comFrequency) ||
|
||||||
this->m_com2system.isActiveFrequencyWithin25kHzChannel(comFrequency);
|
this->m_com2system.isActiveFrequencyWithin25kHzChannel(comFrequency);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Get transponder
|
//! Get transponder
|
||||||
const BlackMisc::Aviation::CTransponder &getTransponder() const { return this->m_transponder; }
|
const BlackMisc::Aviation::CTransponder &getTransponder() const { return this->m_transponder; }
|
||||||
|
|
||||||
//! \brief Set transponder
|
//! Set transponder
|
||||||
void setTransponder(const CTransponder &transponder) { this->m_transponder = transponder; }
|
void setTransponder(const CTransponder &transponder) { this->m_transponder = transponder; }
|
||||||
|
|
||||||
//! \brief Get transponder code
|
//! Get transponder code
|
||||||
QString getTransponderCodeFormatted() const { return this->m_transponder.getTransponderCodeFormatted(); }
|
QString getTransponderCodeFormatted() const { return this->m_transponder.getTransponderCodeFormatted(); }
|
||||||
|
|
||||||
//! \brief Get transponder code
|
//! Get transponder code
|
||||||
qint32 getTransponderCode() const { return this->m_transponder.getTransponderCode(); }
|
qint32 getTransponderCode() const { return this->m_transponder.getTransponderCode(); }
|
||||||
|
|
||||||
//! \brief Get transponder mode
|
//! Get transponder mode
|
||||||
BlackMisc::Aviation::CTransponder::TransponderMode getTransponderMode() const { return this->m_transponder.getTransponderMode(); }
|
BlackMisc::Aviation::CTransponder::TransponderMode getTransponderMode() const { return this->m_transponder.getTransponderMode(); }
|
||||||
|
|
||||||
//! \brief Is valid for login?
|
//! Is valid for login?
|
||||||
bool isValidForLogin() const;
|
bool isValidForLogin() const;
|
||||||
|
|
||||||
//! \brief Meaningful default settings for COM Systems
|
//! Meaningful default settings for COM Systems
|
||||||
void initComSystems();
|
void initComSystems();
|
||||||
|
|
||||||
//! \brief Meaningful default settings for Transponder
|
//! Meaningful default settings for Transponder
|
||||||
void initTransponder();
|
void initTransponder();
|
||||||
|
|
||||||
//! \brief Equal operator ==
|
//! Equal operator ==
|
||||||
bool operator ==(const CAircraft &other) const;
|
bool operator ==(const CAircraft &other) const;
|
||||||
|
|
||||||
//! \brief Unequal operator !=
|
//! Unequal operator !=
|
||||||
bool operator !=(const CAircraft &other) const;
|
bool operator !=(const CAircraft &other) const;
|
||||||
|
|
||||||
//! \copydoc CValueObject::getValueHash
|
//! \copydoc CValueObject::getValueHash
|
||||||
@@ -194,13 +194,13 @@ namespace BlackMisc
|
|||||||
//! \copydoc CValueObject::fromJson
|
//! \copydoc CValueObject::fromJson
|
||||||
virtual void fromJson(const QJsonObject &json) override;
|
virtual void fromJson(const QJsonObject &json) override;
|
||||||
|
|
||||||
//! \brief Register metadata
|
//! Register metadata
|
||||||
static void registerMetadata();
|
static void registerMetadata();
|
||||||
|
|
||||||
//! \brief Members
|
//! Members
|
||||||
static const QStringList &jsonMembers();
|
static const QStringList &jsonMembers();
|
||||||
|
|
||||||
//! \brief Properties by index
|
//! Properties by index
|
||||||
enum ColumnIndex
|
enum ColumnIndex
|
||||||
{
|
{
|
||||||
IndexCallsign = 0,
|
IndexCallsign = 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user