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

@@ -167,7 +167,6 @@ private:
/*! /*!
* \brief Selected server from textboxes * \brief Selected server from textboxes
* \return
*/ */
BlackMisc::Network::CServer selectedServerFromTextboxes() const; BlackMisc::Network::CServer selectedServerFromTextboxes() const;
@@ -183,13 +182,11 @@ private:
/*! /*!
* \brief Context network availability check, otherwise status message * \brief Context network availability check, otherwise status message
* \return
*/ */
bool isContextNetworkAvailableCheck(); bool isContextNetworkAvailableCheck();
/*! /*!
* \brief Context voice availability check, otherwise status message * \brief Context voice availability check, otherwise status message
* \return
*/ */
bool isContextVoiceAvailableCheck(); bool isContextVoiceAvailableCheck();
@@ -200,7 +197,6 @@ private:
/*! /*!
* \brief Pending cockpit update operation * \brief Pending cockpit update operation
* \return
*/ */
bool isCockpitUpdatePending() const; bool isCockpitUpdatePending() const;
@@ -226,14 +222,13 @@ private:
/*! /*!
* \brief Private channel text message * \brief Private channel text message
* \param textMessage * \param textMessage
* \param sending * \param sending sending or receiving
*/ */
void addPrivateChannelTextMessage(const BlackMisc::Network::CTextMessage &textMessage, bool sending = false); void addPrivateChannelTextMessage(const BlackMisc::Network::CTextMessage &textMessage, bool sending = false);
/*! /*!
* Stub for sending a text message (eihter radio or private message). * Stub for sending a text message (eihter radio or private message).
* Sets sender / receiver depending on frequency / channel situation. * Sets sender / receiver depending on frequency / channel situation.
* \return
*/ */
BlackMisc::Network::CTextMessage getTextMessageStubForChannel(); BlackMisc::Network::CTextMessage getTextMessageStubForChannel();
@@ -262,7 +257,6 @@ private:
/*! /*!
* \brief Overlay info displaying status message * \brief Overlay info displaying status message
* \param message
*/ */
void displayOverlayInfo(const BlackMisc::CStatusMessage &message); void displayOverlayInfo(const BlackMisc::CStatusMessage &message);
@@ -338,22 +332,16 @@ private slots:
*/ */
bool reloadOwnAircraft(); bool reloadOwnAircraft();
/*! //! \brief Display status message
* \brief Display status message void displayStatusMessage(const BlackMisc::CStatusMessage &statusMessage);
* \param message
*/
void displayStatusMessage(const BlackMisc::CStatusMessage &message);
/*! //! \brief Display status messages
* \brief Display status messages
* \param messages
*/
void displayStatusMessages(const BlackMisc::CStatusMessageList &messages); void displayStatusMessages(const BlackMisc::CStatusMessageList &messages);
/*! /*!
* \brief Connection status changed * \brief Connection status changed
* \param from * \param from old status, as uint so it is compliant with DBus
* \param to * \param to new status, as uint so it is compliant with DBus
*/ */
void connectionStatusChanged(uint from, uint to); void connectionStatusChanged(uint from, uint to);
@@ -484,9 +472,7 @@ private slots:
*/ */
void setAudioVoiceRooms(); void setAudioVoiceRooms();
/*! //! \brief Audio volume handling and mute
* \brief Audio volume handling and mute
*/
void audioVolumes(); void audioVolumes();
/*! /*!
@@ -495,17 +481,13 @@ private slots:
*/ */
void changeWindowOpacity(int opacity = -1); void changeWindowOpacity(int opacity = -1);
/*! //! \brief Context menu for audio
* \brief Context menu for audio
*/
void audioIconContextMenu(const QPoint &position); void audioIconContextMenu(const QPoint &position);
//! \brief Context menu for message list //! \brief Context menu for message list
void messageListContextMenu(const QPoint &position); void messageListContextMenu(const QPoint &position);
/*! //! \brief Test SELCAL (code valid? play tone)
* \brief Test SELCAL (code valid? play tone)
*/
void testSelcal(); void testSelcal();
//! \brief start the MIC tests (Squelch) //! \brief start the MIC tests (Squelch)

View File

@@ -132,7 +132,7 @@ void MainWindow::audioVolumes()
return; return;
} }
// mute / umute // mute / unmute
com1.setEnabled(!muted); com1.setEnabled(!muted);
com2.setEnabled(!muted); com2.setEnabled(!muted);
this->ui->pb_SoundMute->setText(muted ? "Unmute" : "Mute"); this->ui->pb_SoundMute->setText(muted ? "Unmute" : "Mute");

View File

@@ -36,10 +36,10 @@ namespace BlackMiscTest
/* /*
* Receive variant * Receive variant
*/ */
void Testservice::receiveVariant(const QDBusVariant &variant, int localMetyType) void Testservice::receiveVariant(const QDBusVariant &variant, int localMetaType)
{ {
QVariant qv = variant.variant(); QVariant qv = variant.variant();
QVariant qvF = BlackMisc::fixQVariantFromDbusArgument(qv, localMetyType); QVariant qvF = BlackMisc::fixQVariantFromDbusArgument(qv, localMetaType);
QString s = BlackMisc::qVariantToString(qvF, true); QString s = BlackMisc::qVariantToString(qvF, true);
qDebug() << "Pid:" << ServiceTool::getPid() << "Received variant:" << s; qDebug() << "Pid:" << ServiceTool::getPid() << "Received variant:" << s;
} }

View File

@@ -65,7 +65,7 @@ namespace BlackMiscTest
* \param variant * \param variant
* \param localMetyType, works only in the same binary * \param localMetyType, works only in the same binary
*/ */
void receiveVariant(const QDBusVariant &variant, int localMetyType); void receiveVariant(const QDBusVariant &variant, int localMetaType);
/*! /*!
* \brief Receive speed * \brief Receive speed

View File

@@ -173,7 +173,7 @@ namespace BlackCore
CStatusMessageList msgs; CStatusMessageList msgs;
if (this->m_network->isConnected()) if (this->m_network->isConnected())
{ {
msgs.push_back(CStatusMessage(CStatusMessage::TypeTrafficNetwork, CStatusMessage::SeverityError, "Cannot set plane info, network already connected")); msgs.push_back(CStatusMessage(CStatusMessage::TypeTrafficNetwork, CStatusMessage::SeverityError, "Cannot set aircraft info, network already connected"));
} }
else else
{ {

View File

@@ -138,37 +138,25 @@ namespace BlackCore
*/ */
virtual void updateOwnCockpit(const BlackMisc::Aviation::CComSystem &com1, const BlackMisc::Aviation::CComSystem &com2, const BlackMisc::Aviation::CTransponder &transponder); virtual void updateOwnCockpit(const BlackMisc::Aviation::CComSystem &com1, const BlackMisc::Aviation::CComSystem &com2, const BlackMisc::Aviation::CTransponder &transponder);
/*! //! \copydoc IContextNetwork::getOwnAircraft()
* \copydoc IContextNetwork::getOwnAircraft()
*/
virtual BlackMisc::Aviation::CAircraft getOwnAircraft() const; virtual BlackMisc::Aviation::CAircraft getOwnAircraft() const;
/*! //! \copydoc IContextNetwork::sendTextMessages()
* \copydoc IContextNetwork::sendTextMessages()
*/
virtual void sendTextMessages(const BlackMisc::Network::CTextMessageList &textMessages); virtual void sendTextMessages(const BlackMisc::Network::CTextMessageList &textMessages);
/*! //! \copydoc IContextNetwork::getMetar()
* \copydoc IContextNetwork::getMetar()
*/
virtual BlackMisc::Aviation::CInformationMessage getMetar(const QString &airportIcaoCode); virtual BlackMisc::Aviation::CInformationMessage getMetar(const QString &airportIcaoCode);
/*! //! \copydoc IContextNetwork::getSelectedVoiceRooms()
* \copydoc IContextNetwork::getSelectedVoiceRooms()
*/
virtual BlackMisc::Voice::CVoiceRoomList getSelectedVoiceRooms() const; virtual BlackMisc::Voice::CVoiceRoomList getSelectedVoiceRooms() const;
//! \copydoc IContextNetwork::getSelectedAtcStations //! \copydoc IContextNetwork::getSelectedAtcStations
virtual BlackMisc::Aviation::CAtcStationList getSelectedAtcStations() const; virtual BlackMisc::Aviation::CAtcStationList getSelectedAtcStations() const;
/*! //! \copydoc IContextNetwork::getUsers()
* \copydoc IContextNetwork::getUsers()
*/
virtual BlackMisc::Network::CUserList getUsers() const; virtual BlackMisc::Network::CUserList getUsers() const;
/*! //! \copydoc IContextNetwork::getUsersForCallsigns
* \copydoc IContextNetwork::getUsersForCallsigns
*/
virtual BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns) const; virtual BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns) const;
private: private:

View File

@@ -48,8 +48,9 @@ namespace BlackCore
public: public:
//! ComUnit /*!
/*! IVoiceClient currently supports two different com units */ * \brief IVoice currently supports two different com units
*/
enum ComUnit enum ComUnit
{ {
COM1 = 0, /*!< ComUnit 1 */ COM1 = 0, /*!< ComUnit 1 */
@@ -85,7 +86,7 @@ namespace BlackCore
/************************************************ /************************************************
* SETUP TESTS * SETUP TESTS
* *********************************************/ ***********************************************/
/*! /*!
* \brief Runs a 5 seconds test, measuring your background noise. * \brief Runs a 5 seconds test, measuring your background noise.
@@ -183,7 +184,6 @@ namespace BlackCore
/*! /*!
* \brief Get voice room callsings * \brief Get voice room callsings
* \param comUnit
* \return * \return
*/ */
virtual BlackMisc::Aviation::CCallsignList getVoiceRoomCallsigns(const ComUnit comUnit) const = 0; virtual BlackMisc::Aviation::CCallsignList getVoiceRoomCallsigns(const ComUnit comUnit) const = 0;
@@ -225,11 +225,20 @@ namespace BlackCore
* \brief Audio for given unit started * \brief Audio for given unit started
*/ */
void audioStarted(const ComUnit comUnit); void audioStarted(const ComUnit comUnit);
/*! /*!
* \brief Audio for given unit stopped * \brief Audio for given unit stopped
*/ */
void audioStopped(const ComUnit comUnit); void audioStopped(const ComUnit comUnit);
/*!
* \brief Audio started
*/
void globalAudioStarted(); void globalAudioStarted();
/*!
* \brief Audio stopped
*/
void globalAudioStopped(); void globalAudioStopped();
// Test signals // Test signals
@@ -237,6 +246,7 @@ namespace BlackCore
* \brief Squelch test completed * \brief Squelch test completed
*/ */
void squelchTestFinished(); void squelchTestFinished();
/*! /*!
* \brief Microphone test completed * \brief Microphone test completed
*/ */

View File

@@ -27,7 +27,7 @@
namespace BlackCore namespace BlackCore
{ {
/*! /*!
* Vatlib implementation of the IVoiceClient interface. * Vatlib implementation of the IVoice interface.
*/ */
class CVoiceVatlib : public IVoice class CVoiceVatlib : public IVoice
{ {
@@ -49,20 +49,49 @@ namespace BlackCore
// TODO: Vatlib supports multiple output devices. That basically means, you could connect // TODO: Vatlib supports multiple output devices. That basically means, you could connect
// to different voice rooms and send their audio to different devices, e.g. ATIS to loudspeakers // to different voice rooms and send their audio to different devices, e.g. ATIS to loudspeakers
// and ATC to headspeakers. Is not important to implement that now, if ever. // and ATC to headspeakers. Is not important to implement that now, if ever.
/*!
* \copydoc IVoice::audioDevices()
*/
virtual const BlackMisc::Voice::CAudioDeviceList &audioDevices() const ; virtual const BlackMisc::Voice::CAudioDeviceList &audioDevices() const ;
/*!
* \copydoc IVoice::defaultAudioInputDevice()
*/
virtual const BlackMisc::Voice::CAudioDevice defaultAudioInputDevice() const; virtual const BlackMisc::Voice::CAudioDevice defaultAudioInputDevice() const;
/*!
* \copydoc IVoice::defaultAudioOutputDevice()
*/
virtual const BlackMisc::Voice::CAudioDevice defaultAudioOutputDevice() const; virtual const BlackMisc::Voice::CAudioDevice defaultAudioOutputDevice() const;
/************************************************ /************************************************
* SETUP TESTS * SETUP TESTS
* *********************************************/ * *********************************************/
// Mic tests /*!
* \copydoc IVoice::runSquelchTest
*/
virtual void runSquelchTest(); virtual void runSquelchTest();
/*!
* \copydoc IVoice::runMicTest
*/
virtual void runMicTest(); virtual void runMicTest();
/*!
* \copydoc IVoice::inputSquelch
*/
virtual float inputSquelch() const; virtual float inputSquelch() const;
/*!
* \copydoc IVoice::micTestResult()
*/
virtual qint32 micTestResult() const; virtual qint32 micTestResult() const;
/*!
* \copydoc IVoice::micTestResultAsString
*/
virtual QString micTestResultAsString() const; virtual QString micTestResultAsString() const;
public slots: public slots:
@@ -145,7 +174,7 @@ namespace BlackCore
virtual void switchAudioOutput(const ComUnit comUnit, bool enable); virtual void switchAudioOutput(const ComUnit comUnit, bool enable);
/*! /*!
* \brief Muted? * \copydoc IVoice::isMuted
*/ */
virtual bool isMuted() const virtual bool isMuted() const
{ {
@@ -197,7 +226,9 @@ namespace BlackCore
void onEndFindSquelch(); void onEndFindSquelch();
void onEndMicTest(); void onEndMicTest();
// slot to handle users /*!
* \brief User (identified by callsign) joined or left voice room
*/
void onUserJoinedLeft(const ComUnit comUnit); void onUserJoinedLeft(const ComUnit comUnit);
private: private:

View File

@@ -150,9 +150,7 @@ namespace BlackGui
} }
} }
/*! //! \copydoc QAbstractListModel::sort()
* \copydoc QAbstractListModel::sort()
*/
virtual void sort(int column, Qt::SortOrder order); virtual void sort(int column, Qt::SortOrder order);
//! \brief Similar to ListType::push_back //! \brief Similar to ListType::push_back

View File

@@ -16,15 +16,10 @@ namespace BlackGui
public: public:
/*! //! \brief Constructor
* \brief Constructor
* \param parent
*/
explicit CUserListModel(QObject *parent = nullptr); explicit CUserListModel(QObject *parent = nullptr);
/*! //! \brief Destructor
* \brief Destructor
*/
virtual ~CUserListModel() {} virtual ~CUserListModel() {}
//! \copydoc CListModelBase::data //! \copydoc CListModelBase::data

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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