mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
refs #192, Doxygen and other cosmetic changes
This commit is contained in:
@@ -34,25 +34,15 @@ namespace BlackMisc
|
||||
int m_digits; //!< digits used
|
||||
|
||||
protected:
|
||||
/*!
|
||||
* \brief Default constructor
|
||||
*/
|
||||
//! \brief Default constructor
|
||||
CModulator() :
|
||||
CAvionicsBase("default"), m_volumeInput(0), m_volumeOutput(0), m_enabled(true), m_digits(2) {}
|
||||
|
||||
/*!
|
||||
* \brief Constructor
|
||||
* \param name
|
||||
* \param activeFrequency
|
||||
* \param standbyFrequency
|
||||
* \param digits
|
||||
*/
|
||||
//! \brief Constructor
|
||||
CModulator(const QString &name, const BlackMisc::PhysicalQuantities::CFrequency &activeFrequency, const BlackMisc::PhysicalQuantities::CFrequency &standbyFrequency, int digits) :
|
||||
CAvionicsBase(name), m_frequencyActive(activeFrequency), m_frequencyStandby(standbyFrequency), m_volumeInput(0), m_volumeOutput(0), m_enabled(true), m_digits(digits) {}
|
||||
|
||||
/*!
|
||||
* \copydoc CValueObject::convertToQString
|
||||
*/
|
||||
//! \copydoc CValueObject::convertToQString
|
||||
virtual QString convertToQString(bool i18n = false) const override
|
||||
{
|
||||
QString s(this->getName());
|
||||
@@ -61,254 +51,166 @@ namespace BlackMisc
|
||||
return s;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set active frequency
|
||||
* \param frequencyKHz
|
||||
*/
|
||||
//! \brief Set active frequency
|
||||
void setFrequencyActiveKHz(double frequencyKHz)
|
||||
{
|
||||
this->m_frequencyActive = BlackMisc::PhysicalQuantities::CFrequency(frequencyKHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::kHz());
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set standby frequency
|
||||
* \param frequencyKHz
|
||||
*/
|
||||
//! \brief Set standby frequency
|
||||
void setFrequencyStandbyKHz(double frequencyKHz)
|
||||
{
|
||||
this->m_frequencyStandby = BlackMisc::PhysicalQuantities::CFrequency(frequencyKHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::kHz());
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set active frequency
|
||||
* \param frequencyMHz
|
||||
*/
|
||||
//! \brief Set active frequency
|
||||
void setFrequencyActiveMHz(double frequencyMHz)
|
||||
{
|
||||
frequencyMHz = CMath::round(frequencyMHz, 3);
|
||||
this->m_frequencyActive = BlackMisc::PhysicalQuantities::CFrequency(frequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz());
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set standby frequency
|
||||
* \param frequencyMHz
|
||||
*/
|
||||
//! \brief Set standby frequency
|
||||
void setFrequencyStandbyMHz(double frequencyMHz)
|
||||
{
|
||||
frequencyMHz = CMath::round(frequencyMHz, 3);
|
||||
this->m_frequencyStandby = BlackMisc::PhysicalQuantities::CFrequency(frequencyMHz, BlackMisc::PhysicalQuantities::CFrequencyUnit::MHz());
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief operator ==
|
||||
* \param other
|
||||
* \return
|
||||
*/
|
||||
//! \brief operator ==
|
||||
bool operator ==(const CModulator &other) const;
|
||||
|
||||
/*!
|
||||
* \brief operator !=
|
||||
* \param other
|
||||
* \return
|
||||
*/
|
||||
//! \brief operator !=
|
||||
bool operator !=(const CModulator &other) const;
|
||||
|
||||
/*!
|
||||
* \copydoc CValueObject::compareImpl(otherBase)
|
||||
*/
|
||||
//! \copydoc CValueObject::compareImpl(otherBase)
|
||||
virtual int compareImpl(const CValueObject &otherBase) const override;
|
||||
|
||||
/*!
|
||||
* \brief COM1
|
||||
* \return
|
||||
*/
|
||||
//! \brief COM1
|
||||
static const QString &NameCom1()
|
||||
{
|
||||
static QString n("COM1");
|
||||
return n;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief COM2
|
||||
* \return
|
||||
*/
|
||||
//! \brief COM2
|
||||
static const QString &NameCom2()
|
||||
{
|
||||
static QString n("COM2");
|
||||
return n;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief COM3
|
||||
* \return
|
||||
*/
|
||||
//! \brief COM3
|
||||
static const QString &NameCom3()
|
||||
{
|
||||
static QString n("COM3");
|
||||
return n;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief NAV1
|
||||
* \return
|
||||
*/
|
||||
//! \brief NAV1
|
||||
static const QString &NameNav1()
|
||||
{
|
||||
static QString n("NAV1");
|
||||
return n;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief NAV2
|
||||
* \return
|
||||
*/
|
||||
//! \brief NAV2
|
||||
static const QString &NameNav2()
|
||||
{
|
||||
static QString n("NAV2");
|
||||
return n;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief NAV2
|
||||
* \return
|
||||
*/
|
||||
//! \brief NAV3
|
||||
static const QString &NameNav3()
|
||||
{
|
||||
static QString n("NAV3");
|
||||
return n;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief ADF1
|
||||
* \return
|
||||
*/
|
||||
//! \brief ADF1
|
||||
static const QString &NameAdf1()
|
||||
{
|
||||
static QString n("ADF1");
|
||||
return n;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief ADF2
|
||||
* \return
|
||||
*/
|
||||
//! \brief ADF2
|
||||
static const QString &NameAdf2()
|
||||
{
|
||||
static QString n("ADF2");
|
||||
return n;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Frequency not set
|
||||
* \return
|
||||
*/
|
||||
//! \brief Frequency not set
|
||||
static const BlackMisc::PhysicalQuantities::CFrequency &FrequencyNotSet()
|
||||
{
|
||||
static BlackMisc::PhysicalQuantities::CFrequency f;
|
||||
return f;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \copydoc CValueObject::marshallFromDbus()
|
||||
*/
|
||||
//! \copydoc CValueObject::marshallFromDbus()
|
||||
virtual void marshallToDbus(QDBusArgument &argument) const override;
|
||||
|
||||
/*!
|
||||
* \copydoc CValueObject::unmarshallFromDbus()
|
||||
*/
|
||||
//! \copydoc CValueObject::unmarshallFromDbus()
|
||||
virtual void unmarshallFromDbus(const QDBusArgument &argument) override;
|
||||
|
||||
/*!
|
||||
* \copydoc CValueObject::getValueHash()
|
||||
*/
|
||||
//! \copydoc CValueObject::getValueHash()
|
||||
virtual uint getValueHash() const override;
|
||||
|
||||
public:
|
||||
/*!
|
||||
* \brief Virtual destructor
|
||||
*/
|
||||
//! \brief Virtual destructor
|
||||
virtual ~CModulator() {}
|
||||
|
||||
/*!
|
||||
* \brief Default value
|
||||
* \return
|
||||
*/
|
||||
//! \brief Default value?
|
||||
virtual bool isDefaultValue() const
|
||||
{
|
||||
return this->m_frequencyActive == CModulator::FrequencyNotSet();
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Toggle active and standby frequencies
|
||||
*/
|
||||
//! \brief Toggle active and standby frequencies
|
||||
void toggleActiveStandby();
|
||||
|
||||
/*!
|
||||
* \brief Active frequency
|
||||
* \return
|
||||
*/
|
||||
//! \brief Active frequency
|
||||
BlackMisc::PhysicalQuantities::CFrequency getFrequencyActive() const
|
||||
{
|
||||
return this->m_frequencyActive;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Standby frequency
|
||||
* \return
|
||||
*/
|
||||
//! \brief Standby frequency
|
||||
BlackMisc::PhysicalQuantities::CFrequency getFrequencyStandby() const
|
||||
{
|
||||
return this->m_frequencyStandby;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set active frequency
|
||||
* \param frequency
|
||||
*/
|
||||
//! \brief Set active frequency
|
||||
void setFrequencyActive(const BlackMisc::PhysicalQuantities::CFrequency &frequency)
|
||||
{
|
||||
this->m_frequencyActive = frequency;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set standby frequency
|
||||
* \param frequency
|
||||
*/
|
||||
//! \brief Set standby frequency
|
||||
void setFrequencyStandby(const BlackMisc::PhysicalQuantities::CFrequency &frequency)
|
||||
{
|
||||
this->m_frequencyStandby = frequency;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Output volume
|
||||
* \return
|
||||
*/
|
||||
//! \brief Output volume
|
||||
qint32 getVolumeOutput() const { return this->m_volumeOutput; }
|
||||
|
||||
/*!
|
||||
* \brief Input volume
|
||||
* \return
|
||||
*/
|
||||
//! \brief Input volume
|
||||
qint32 getVolumeInput() const { return this->m_volumeInput; }
|
||||
|
||||
/*!
|
||||
* \brief Output volume
|
||||
*/
|
||||
//! \brief Output volume
|
||||
void setVolumeOutput(qint32 volume) { this->m_volumeOutput = volume; }
|
||||
|
||||
/*!
|
||||
* \brief Input volume
|
||||
*/
|
||||
//! \brief Input volume
|
||||
void setVolumeInput(qint32 volume) { this->m_volumeInput = volume; }
|
||||
|
||||
/*!
|
||||
* \brief Enabled?
|
||||
*/
|
||||
//! \brief Enabled?
|
||||
bool isEnabled() const { return this->m_enabled;}
|
||||
|
||||
/*!
|
||||
* \brief Enabled?
|
||||
*/
|
||||
//! \brief Enabled?
|
||||
void setEnabled(bool enable) { this->m_enabled = enable;}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user