refs #91 & #124 doxygen fixes, style/comment changes, typos, and override keywords

This commit is contained in:
Klaus Basan
2014-02-05 20:49:01 +00:00
committed by Mathew Sutcliffe
parent e7c31fbe20
commit ff5cf5ea4a
22 changed files with 157 additions and 284 deletions

View File

@@ -152,8 +152,8 @@ namespace BlackMisc
c++;
}
// normally 1 expected, as I should find one online station
// for this booking
// normally 1 expected, as I should find
// only one online station for this booking
return c;
}

View File

@@ -42,11 +42,8 @@ namespace BlackMisc
: m_callsignAsSet(callsign), m_callsign(CCallsign::unifyCallsign(callsign))
{}
/*!
* \brief Virtual method to return QVariant, used with DBUS QVariant lists
* \return
*/
virtual QVariant toQVariant() const
//! \copydoc CValueObject::toQVariant()
virtual QVariant toQVariant() const override
{
return QVariant::fromValue(*this);
}
@@ -57,73 +54,56 @@ namespace BlackMisc
return CCallsign::convertToIcon(*this);
}
/*!
* \brief Is empty?
* \return
*/
//! \brief Is empty?
bool isEmpty() const { return this->m_callsignAsSet.isEmpty(); }
/*!
* Get callsign.
* \return
*/
const QString &asString() const { return this->m_callsign; }
/*!
* Get callsign.
* \return
*/
const QString &getStringAsSet() const { return this->m_callsignAsSet; }
/*!
* \brief Get callsign pronounced
* \return
*/
const QString &getCallsignPronounced() const { return this->m_callsignPronounced; }
/*!
* \brief Get ICAO code, if this makes sense (EDDF_TWR -> EDDF)
* \return
*/
QString getIcaoCode() const { return m_callsign.left(4).toUpper(); }
/*!
* \brief Makes this callsign looking like an observer callsign (DAMBZ -> DAMBZ_OBS)
* \return
*/
QString getAsObserverCallsignString() const;
/*!
* \brief Equals callsign string?
* \param callsignString
* \return
*/
bool equalsString(const QString &callsignString) const;
/*!
* \brief Equal operator ==
* \param other
* \return
*/
bool operator ==(const CCallsign &other) const;
/*!
* \brief Unequal operator ==
* \param other
* \return
* \brief Unequal operator !=
*/
bool operator !=(const CCallsign &other) const;
/*!
* \brief Less than operator < for sorting
* \param other
* \return
*/
bool operator <(const CCallsign &other) const;
/*!
* \brief Value hash
* \return
* \brief CValueObject::getValueHash()
*/
virtual uint getValueHash() const;
@@ -134,9 +114,7 @@ namespace BlackMisc
protected:
/*!
* \brief Rounded value as string
* \param i18n
* \return
* \copydoc CValueObject::convertToQString()
*/
virtual QString convertToQString(bool i18n = false) const;
@@ -156,14 +134,12 @@ namespace BlackMisc
virtual int compareImpl(const CValueObject &other) const;
/*!
* \brief Stream to DBus <<
* \param argument
* \copydoc CValueObject::marshallToDbus()
*/
virtual void marshallToDbus(QDBusArgument &argument) const;
/*!
* \brief Stream from DBus >>
* \param argument
* \copydoc CValueObject::unmarshallFromDbus()
*/
virtual void unmarshallFromDbus(const QDBusArgument &argument);

View File

@@ -30,7 +30,6 @@ namespace BlackMisc
*/
namespace PhysicalQuantities
{
/*!
* \brief Register all metadata for PQs
*/
@@ -43,7 +42,6 @@ namespace BlackMisc
*/
namespace Aviation
{
/*!
* \brief Register metadata for aviation
*/
@@ -103,14 +101,14 @@ namespace BlackMisc
void registerMetadata();
/*!
* Deals with the issue that the BlackMisc metatype does not always start with
* the same id, e.g. with GUI enabled:
* Deals with the issue, that the BlackMisc metatypes do not always start with
* the same id, but dependent on enabled Qt modules. E.g. with GUI enabled:
* type: 1024 name: QPaintBufferCacheEntry
* type: 1025 .... some classes I cannot foresee
* type: 1027 name: BlackMisc::CValueMap
*
* This is important when marshalling Variants via DBus among different
* binaries, as the offset has to be considered
* binaries, as an offset has to be considered
*
* \return
*/
@@ -123,8 +121,6 @@ namespace BlackMisc
/*!
* \brief Compare 2 QVariants
* \param v1
* \param v2
*/
bool equalQVariants(const QVariant &v1, const QVariant &v2);
@@ -132,13 +128,13 @@ namespace BlackMisc
* \brief Compare QVariants
* \param v1
* \param v2
* \return
* \return same return values as in QString::compare()
*/
int compareQVariants(const QVariant &v1, const QVariant &v2);
/*!
* \brief QVariant to string, allows to stringify CValueObject
* \param qv
* \brief QVariant to QString, allows to stringify CValueObject
* \param qv QVariant containing any CValueObject
* \param i18n
* \return
*/
@@ -156,23 +152,24 @@ namespace BlackMisc
/*!
* Convert a QDBusArgument back to a concrete type if required
* This is a workaround if a QVariant is sent via DBus, QDBusArgument is
* received and Qt is nor able to get the original QVariant back
* \param argument
* \param type
* \return
* received and Qt is not able to get the original QVariant back
* \param argument send via DBus
* \param type Metatype
* \return QVariant generated from the above
* \todo To be removed if a better solution is found
*/
// TODO: To be removed if a better solution is found
QVariant complexQtTypeFromDbusArgument(const QDBusArgument &argument, int type);
/*!
* \brief displayAllUserTypes
* \brief Display all user metatypes
* \remarks Used in order to debug code, do not remove
*/
void displayAllUserMetatypesTypes();
/*!
* \brief Add several hash values
* \brief Calculate a single hash value based on a list of individual hash values
* \param values
* \param classTypeId
* \param classTypeId add a hash value for class name on top
* \return
*/
uint calculateHash(const QList<uint> &values, const char *className);

View File

@@ -44,7 +44,6 @@ namespace BlackMisc
/*!
* \brief Copy constructor
* \param otherMatrix
*/
CMatrix3x1(const CMatrix3x1 &other) : CMatrixBase(other) {}

View File

@@ -179,8 +179,7 @@ namespace BlackMisc
}
/*!
* \brief Stream to DBus
* \param argument
* \copydoc CValueObject::getValueHash()
*/
template <class ImplVector> uint CVector3DBase<ImplVector>::getValueHash() const
{

View File

@@ -276,9 +276,6 @@ namespace BlackMisc
/*!
* \brief Operator to support commutative multiplication
* \param factor
* \param otherVector
* \return
*/
friend ImplVector operator *(double factor, const ImplVector &other)
{

View File

@@ -171,49 +171,29 @@ namespace BlackMisc
*/
void syncronizeData(CUser &otherUser);
/*!
* \copydoc CValueObject::propertyByIndex(int)
*/
//! \copydoc CValueObject::propertyByIndex(int)
QVariant propertyByIndex(int index) const;
/*!
* \copydoc CValueObject::propertyByIndex(const QVariant, int)
*/
//! \copydoc CValueObject::propertyByIndex(const QVariant, int)
void propertyByIndex(const QVariant &variant, int index);
protected:
/*!
* \brief Rounded value as string
* \param i18n
* \return
*/
//! \copydoc CValueObject::convertToQString
virtual QString convertToQString(bool i18n = false) const;
/*!
* \copydoc CValueObject::getMetaTypeId
*/
//! \copydoc CValueObject::getMetaTypeId
virtual int getMetaTypeId() const;
/*!
* \copydoc CValueObject::isA
*/
//! \copydoc CValueObject::isA
virtual bool isA(int metaTypeId) const;
/*!
* \copydoc CValueObject::compareImpl
*/
//! \copydoc CValueObject::compareImpl
virtual int compareImpl(const CValueObject &other) const;
/*!
* \brief Stream to DBus <<
* \param argument
*/
//! \copydoc CValueObject::marshallToDbus
virtual void marshallToDbus(QDBusArgument &argument) const;
/*!
* \brief Stream from DBus >>
* \param argument
*/
//! \copydoc CValueObject::unmarshallFromDbus
virtual void unmarshallFromDbus(const QDBusArgument &argument);
private:

View File

@@ -7,6 +7,9 @@ namespace BlackMisc
{
namespace Settings
{
/*!
* \brief Helper / utility methods for settings
*/
class CSettingUtilities
{
private:

View File

@@ -14,7 +14,7 @@ namespace BlackMisc
{
public:
/*!
* \brief The StatusType enum
* \brief Status types
*/
enum StatusType
{
@@ -28,6 +28,9 @@ namespace BlackMisc
TypeGui
};
/*!
* \brief Status severities
*/
enum StatusSeverity
{
SeverityInfo,
@@ -55,58 +58,35 @@ namespace BlackMisc
QDateTime m_timestamp;
public:
/*!
* \brief StatusMessage
*/
CStatusMessage() :
m_type(TypeUnknown), m_severity(SeverityInfo) {}
//! \brief Constructor
CStatusMessage() : m_type(TypeUnknown), m_severity(SeverityInfo) {}
/*!
* \brief StatusMessage
* \param type
* \param severity
* \param message
*/
//! \brief Constructor
CStatusMessage(StatusType type, StatusSeverity severity, const QString &message);
/*!
* \brief Status type
* \return
*/
//! \brief Status type
StatusType getType() const
{
return this->m_type;
}
/*!
* \brief Status severity
* \return
*/
//! \brief Status severity
StatusSeverity getSeverity() const
{
return this->m_severity;
}
/*!
* \brief Message
* \return
*/
//! \brief Message
QString getMessage() const
{
return this->m_message;
}
/*!
* \brief Value hash
* \return
*/
//! \copydoc CValueObject::getValueHash()
virtual uint getValueHash() const;
/*!
* \brief As QVariant
* \return
*/
QVariant toQVariant() const
//! \copydoc CValueObject::toQVariant()
virtual QVariant toQVariant() const override
{
return QVariant::fromValue(*this);
}
@@ -121,86 +101,51 @@ namespace BlackMisc
const QString &getSeverityAsString() const;
//! \copydoc CValueObject::propertyByIndex(int)
QVariant propertyByIndex(int index) const;
virtual QVariant propertyByIndex(int index) const override;
//! \copydoc CValueObject::propertyByIndex(const QVariant, int)
void propertyByIndex(const QVariant &variant, int index);
virtual void setPropertyByIndex(const QVariant &variant, int index) override;
//! \copydoc CValueObject::propertyByIndexAsString
QString propertyByIndexAsString(int index, bool i18n) const;
virtual QString propertyByIndexAsString(int index, bool i18n) const override;
/*!
* \brief Equal operator ==
* \param other
* @return
*/
//! \brief Equal operator ==
bool operator ==(const CStatusMessage &other) const;
/*!
* \brief Unequal operator ==
* \param other
* @return
*/
//! \brief Unequal operator !=
bool operator !=(const CStatusMessage &other) const;
/*!
* \brief Register metadata
*/
//! \brief Register metadata
static void registerMetadata();
/*!
* \brief Validation error
* \param message
* \return
*/
//! \brief Validation error
static CStatusMessage getValidationError(const QString &message);
/*!
* \brief Unspecific info message
* \param message
* \return
*/
//! \brief Unspecific info message
static CStatusMessage getInfoMessage(const QString &message);
//! \representing icon
static const QPixmap &convertToIcon(const CStatusMessage &statusMessage);
protected:
/*!
* \brief Marshall to DBus
* \param argument
*/
virtual void marshallToDbus(QDBusArgument &arg) const;
//! \copydoc CValueObject::marshallToDbus
virtual void marshallToDbus(QDBusArgument &arg) const override;
/*!
* \brief Unmarshall from DBus
* \param argument
*/
virtual void unmarshallFromDbus(const QDBusArgument &arg);
//! \copydoc CValueObject::unmarshallFromDbus
virtual void unmarshallFromDbus(const QDBusArgument &arg) override;
/*!
* \brief Convert to String
* \param i18n
* \return
*/
virtual QString convertToQString(bool i18n = false) const;
//! \copydoc CValueObject::convertToQString
virtual QString convertToQString(bool i18n = false) const override;
/*!
* \copydoc CValueObject::getMetaTypeId
*/
virtual int getMetaTypeId() const;
//! \copydoc CValueObject::getMetaTypeId
virtual int getMetaTypeId() const override;
/*!
* \copydoc CValueObject::isA
*/
virtual bool isA(int metaTypeId) const;
//! \copydoc CValueObject::isA
virtual bool isA(int metaTypeId) const override;
/*!
* \copydoc CValueObject::compareImpl
*/
virtual int compareImpl(const CValueObject &other) const;
//! \copydoc CValueObject::compareImpl
virtual int compareImpl(const CValueObject &other) const override;
};
}
Q_DECLARE_METATYPE(BlackMisc::CStatusMessage)

View File

@@ -20,37 +20,25 @@ namespace BlackMisc
class CStatusMessageList : public CSequence<CStatusMessage>
{
public:
/*!
* \brief StatusMessage
*/
//! \brief Constructor
CStatusMessageList() {}
/*!
* \brief Find by type
* \param type
* \return
*/
//! \brief Construct from a base class object.
CStatusMessageList(const CSequence<CStatusMessage> &other);
//! \brief Find by type
CStatusMessageList findByType(CStatusMessage::StatusType type) const;
/*!
* \brief Find by type
* \param type
* \return
*/
//! \brief Find by severity
CStatusMessageList findBySeverity(CStatusMessage::StatusSeverity severity) const;
/*!
* \brief As QVariant
* \return
*/
//! \copydoc CValueObject::asQVariant
virtual QVariant asQVariant() const
{
return QVariant::fromValue(*this);
}
/*!
* \brief Register metadata of unit and quantity
*/
//! \brief Register metadata of unit and quantity
static void registerMetadata();
};

View File

@@ -121,8 +121,8 @@ namespace BlackMisc
static void registerMetadata();
protected:
QMap<int, QVariant> m_values; /*!< values */
bool m_wildcard;
QMap<int, QVariant> m_values; //!< values
bool m_wildcard; //!< wildcard
/*!
* \brief Meaningful string representation

View File

@@ -75,34 +75,19 @@ namespace BlackMisc
*/
DeviceType getType() const { return m_type; }
/*!
* \brief Valid audio device object?
* \return
*/
//! \brief Valid audio device object?
bool isValid() const { return m_deviceIndex >= -1 && !m_deviceName.isEmpty(); }
/*!
* \brief Equal operator ==
* \param other
* @return
*/
//! \brief Equal operator ==
bool operator ==(const CAudioDevice &other) const;
/*!
* \brief Unequal operator ==
* \param other
* @return
*/
//! \brief Unequal operator !=
bool operator !=(const CAudioDevice &other) const;
/*!
* \brief Value hash
*/
//! \copydoc CValueObject::getValueHash
virtual uint getValueHash() const;
/*!
* \brief Register metadata
*/
//! \brief Register metadata
static void registerMetadata();
//! \brief Device index for default device