mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Formatting / tweaks
This commit is contained in:
@@ -461,7 +461,7 @@ QStatusBar QLabel {
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>5</number>
|
||||
<number>4</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="pg_StatusPage">
|
||||
<property name="sizePolicy">
|
||||
@@ -571,8 +571,8 @@ QStatusBar QLabel {
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>86</width>
|
||||
<height>59</height>
|
||||
<width>326</width>
|
||||
<height>267</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@@ -614,8 +614,8 @@ QStatusBar QLabel {
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>90</width>
|
||||
<height>55</height>
|
||||
<width>326</width>
|
||||
<height>267</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
@@ -1379,7 +1379,7 @@ QStatusBar QLabel {
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tw_Settings">
|
||||
<property name="currentIndex">
|
||||
<number>3</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tb_SettingsTrafficNetwork">
|
||||
<attribute name="title">
|
||||
|
||||
@@ -27,10 +27,10 @@ namespace BlackMisc
|
||||
class CAircraft : public BlackMisc::CValueObject, public BlackMisc::Geo::ICoordinateGeodetic
|
||||
{
|
||||
public:
|
||||
//! \brief Default constructor.
|
||||
//! Default constructor.
|
||||
CAircraft() : m_distanceToPlane(0, BlackMisc::PhysicalQuantities::CLengthUnit::nullUnit()) {}
|
||||
|
||||
//! \brief Constructor.
|
||||
//! Constructor.
|
||||
CAircraft(const CCallsign &callsign, const BlackMisc::Network::CUser &user, const CAircraftSituation &situation);
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
@@ -39,73 +39,73 @@ namespace BlackMisc
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
|
||||
//! \brief Get callsign.
|
||||
//! Get callsign.
|
||||
const CCallsign &getCallsign() const { return m_callsign; }
|
||||
|
||||
//! \brief Get callsign.
|
||||
//! Get callsign.
|
||||
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); }
|
||||
|
||||
//! \brief Get situation.
|
||||
//! Get situation.
|
||||
const CAircraftSituation &getSituation() const { return m_situation; }
|
||||
|
||||
//! \brief Set situation.
|
||||
//! Set situation.
|
||||
void setSituation(const CAircraftSituation &situation) { m_situation = situation; }
|
||||
|
||||
//! \brief Get user
|
||||
//! Get user
|
||||
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(); }
|
||||
|
||||
//! \brief Get user's real id
|
||||
//! Get user's real id
|
||||
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);}
|
||||
|
||||
//! \brief Get ICAO info
|
||||
//! Get ICAO info
|
||||
const CAircraftIcao &getIcaoInfo() const { return m_icao; }
|
||||
|
||||
//! \brief Set ICAO info
|
||||
//! Set ICAO info
|
||||
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; }
|
||||
|
||||
//! \brief Set distance to own plane
|
||||
//! Set distance to own plane
|
||||
void setDistanceToPlane(const BlackMisc::PhysicalQuantities::CLength &distance) { this->m_distanceToPlane = distance; }
|
||||
|
||||
//! \brief Valid distance?
|
||||
//! Valid distance?
|
||||
bool hasValidDistance() const { return !this->m_distanceToPlane.isNegativeWithEpsilonConsidered();}
|
||||
|
||||
//! \brief Has valid realname?
|
||||
//! Has valid realname?
|
||||
bool hasValidRealName() const { return this->m_pilot.hasValidRealName(); }
|
||||
|
||||
//! \brief Has valid id?
|
||||
//! Has valid id?
|
||||
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
|
||||
*/
|
||||
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(); }
|
||||
|
||||
//! \brief Set position
|
||||
//! Set 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(); }
|
||||
|
||||
//! \brief Set altitude
|
||||
//! Set 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(); }
|
||||
|
||||
//! \copydoc ICoordinateGeodetic::latitude
|
||||
@@ -117,72 +117,72 @@ namespace BlackMisc
|
||||
//! \copydoc CCoordinateGeodetic::height
|
||||
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(); }
|
||||
|
||||
//! \brief Get pitch
|
||||
//! Get pitch
|
||||
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(); }
|
||||
|
||||
//! \brief Get COM1 system
|
||||
//! Get COM1 system
|
||||
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; }
|
||||
|
||||
//! \brief Set COM1 system
|
||||
//! Set COM1 system
|
||||
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; }
|
||||
|
||||
//! Identical COM system?
|
||||
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
|
||||
{
|
||||
return this->m_com1system.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
|
||||
{
|
||||
return this->m_com1system.isActiveFrequencyWithin25kHzChannel(comFrequency) ||
|
||||
this->m_com2system.isActiveFrequencyWithin25kHzChannel(comFrequency);
|
||||
}
|
||||
|
||||
//! \brief Get transponder
|
||||
//! Get 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; }
|
||||
|
||||
//! \brief Get transponder code
|
||||
//! Get transponder code
|
||||
QString getTransponderCodeFormatted() const { return this->m_transponder.getTransponderCodeFormatted(); }
|
||||
|
||||
//! \brief Get transponder code
|
||||
//! Get transponder code
|
||||
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(); }
|
||||
|
||||
//! \brief Is valid for login?
|
||||
//! Is valid for login?
|
||||
bool isValidForLogin() const;
|
||||
|
||||
//! \brief Meaningful default settings for COM Systems
|
||||
//! Meaningful default settings for COM Systems
|
||||
void initComSystems();
|
||||
|
||||
//! \brief Meaningful default settings for Transponder
|
||||
//! Meaningful default settings for Transponder
|
||||
void initTransponder();
|
||||
|
||||
//! \brief Equal operator ==
|
||||
//! Equal operator ==
|
||||
bool operator ==(const CAircraft &other) const;
|
||||
|
||||
//! \brief Unequal operator !=
|
||||
//! Unequal operator !=
|
||||
bool operator !=(const CAircraft &other) const;
|
||||
|
||||
//! \copydoc CValueObject::getValueHash
|
||||
@@ -194,13 +194,13 @@ namespace BlackMisc
|
||||
//! \copydoc CValueObject::fromJson
|
||||
virtual void fromJson(const QJsonObject &json) override;
|
||||
|
||||
//! \brief Register metadata
|
||||
//! Register metadata
|
||||
static void registerMetadata();
|
||||
|
||||
//! \brief Members
|
||||
//! Members
|
||||
static const QStringList &jsonMembers();
|
||||
|
||||
//! \brief Properties by index
|
||||
//! Properties by index
|
||||
enum ColumnIndex
|
||||
{
|
||||
IndexCallsign = 0,
|
||||
|
||||
Reference in New Issue
Block a user