From ff5cf5ea4a6521b0af2c9c18190704db0806e659 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Wed, 5 Feb 2014 20:49:01 +0000 Subject: [PATCH] refs #91 & #124 doxygen fixes, style/comment changes, typos, and override keywords --- samples/blackgui/mainwindow.h | 36 ++------ samples/blackgui/mainwindow_voice.cpp | 2 +- samples/blackmiscdbus/testservice.cpp | 4 +- samples/blackmiscdbus/testservice.h | 2 +- src/blackcore/context_network.cpp | 2 +- src/blackcore/context_network.h | 24 ++--- src/blackcore/voice.h | 18 +++- src/blackcore/voice_vatlib.h | 39 +++++++- src/blackgui/listmodelbase.h | 4 +- src/blackgui/userlistmodel.h | 9 +- src/blackmisc/avatcstationlist.cpp | 4 +- src/blackmisc/avcallsign.h | 40 ++------ src/blackmisc/blackmiscfreefunctions.h | 33 +++---- src/blackmisc/mathmatrix3x1.h | 1 - src/blackmisc/mathvector3dbase.cpp | 3 +- src/blackmisc/mathvector3dbase.h | 3 - src/blackmisc/nwuser.h | 36 ++------ src/blackmisc/settingutilities.h | 3 + src/blackmisc/statusmessage.h | 121 +++++++------------------ src/blackmisc/statusmessagelist.h | 28 ++---- src/blackmisc/valuemap.h | 4 +- src/blackmisc/vaudiodevice.h | 25 +---- 22 files changed, 157 insertions(+), 284 deletions(-) diff --git a/samples/blackgui/mainwindow.h b/samples/blackgui/mainwindow.h index eab3f0fde..6345e406f 100644 --- a/samples/blackgui/mainwindow.h +++ b/samples/blackgui/mainwindow.h @@ -167,7 +167,6 @@ private: /*! * \brief Selected server from textboxes - * \return */ BlackMisc::Network::CServer selectedServerFromTextboxes() const; @@ -183,13 +182,11 @@ private: /*! * \brief Context network availability check, otherwise status message - * \return */ bool isContextNetworkAvailableCheck(); /*! * \brief Context voice availability check, otherwise status message - * \return */ bool isContextVoiceAvailableCheck(); @@ -200,7 +197,6 @@ private: /*! * \brief Pending cockpit update operation - * \return */ bool isCockpitUpdatePending() const; @@ -226,14 +222,13 @@ private: /*! * \brief Private channel text message * \param textMessage - * \param sending + * \param sending sending or receiving */ void addPrivateChannelTextMessage(const BlackMisc::Network::CTextMessage &textMessage, bool sending = false); /*! * Stub for sending a text message (eihter radio or private message). * Sets sender / receiver depending on frequency / channel situation. - * \return */ BlackMisc::Network::CTextMessage getTextMessageStubForChannel(); @@ -262,7 +257,6 @@ private: /*! * \brief Overlay info displaying status message - * \param message */ void displayOverlayInfo(const BlackMisc::CStatusMessage &message); @@ -338,22 +332,16 @@ private slots: */ bool reloadOwnAircraft(); - /*! - * \brief Display status message - * \param message - */ - void displayStatusMessage(const BlackMisc::CStatusMessage &message); + //! \brief Display status message + void displayStatusMessage(const BlackMisc::CStatusMessage &statusMessage); - /*! - * \brief Display status messages - * \param messages - */ + //! \brief Display status messages void displayStatusMessages(const BlackMisc::CStatusMessageList &messages); /*! * \brief Connection status changed - * \param from - * \param to + * \param from old status, as uint so it is compliant with DBus + * \param to new status, as uint so it is compliant with DBus */ void connectionStatusChanged(uint from, uint to); @@ -484,9 +472,7 @@ private slots: */ void setAudioVoiceRooms(); - /*! - * \brief Audio volume handling and mute - */ + //! \brief Audio volume handling and mute void audioVolumes(); /*! @@ -495,17 +481,13 @@ private slots: */ void changeWindowOpacity(int opacity = -1); - /*! - * \brief Context menu for audio - */ + //! \brief Context menu for audio void audioIconContextMenu(const QPoint &position); //! \brief Context menu for message list void messageListContextMenu(const QPoint &position); - /*! - * \brief Test SELCAL (code valid? play tone) - */ + //! \brief Test SELCAL (code valid? play tone) void testSelcal(); //! \brief start the MIC tests (Squelch) diff --git a/samples/blackgui/mainwindow_voice.cpp b/samples/blackgui/mainwindow_voice.cpp index af6b45367..c3210656e 100644 --- a/samples/blackgui/mainwindow_voice.cpp +++ b/samples/blackgui/mainwindow_voice.cpp @@ -132,7 +132,7 @@ void MainWindow::audioVolumes() return; } - // mute / umute + // mute / unmute com1.setEnabled(!muted); com2.setEnabled(!muted); this->ui->pb_SoundMute->setText(muted ? "Unmute" : "Mute"); diff --git a/samples/blackmiscdbus/testservice.cpp b/samples/blackmiscdbus/testservice.cpp index 6c36c4556..6348f730d 100644 --- a/samples/blackmiscdbus/testservice.cpp +++ b/samples/blackmiscdbus/testservice.cpp @@ -36,10 +36,10 @@ namespace BlackMiscTest /* * Receive variant */ - void Testservice::receiveVariant(const QDBusVariant &variant, int localMetyType) + void Testservice::receiveVariant(const QDBusVariant &variant, int localMetaType) { QVariant qv = variant.variant(); - QVariant qvF = BlackMisc::fixQVariantFromDbusArgument(qv, localMetyType); + QVariant qvF = BlackMisc::fixQVariantFromDbusArgument(qv, localMetaType); QString s = BlackMisc::qVariantToString(qvF, true); qDebug() << "Pid:" << ServiceTool::getPid() << "Received variant:" << s; } diff --git a/samples/blackmiscdbus/testservice.h b/samples/blackmiscdbus/testservice.h index 3f69eec69..cab3472be 100644 --- a/samples/blackmiscdbus/testservice.h +++ b/samples/blackmiscdbus/testservice.h @@ -65,7 +65,7 @@ namespace BlackMiscTest * \param variant * \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 diff --git a/src/blackcore/context_network.cpp b/src/blackcore/context_network.cpp index e2f281d27..bcbd78382 100644 --- a/src/blackcore/context_network.cpp +++ b/src/blackcore/context_network.cpp @@ -173,7 +173,7 @@ namespace BlackCore CStatusMessageList msgs; 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 { diff --git a/src/blackcore/context_network.h b/src/blackcore/context_network.h index 647228510..84951875a 100644 --- a/src/blackcore/context_network.h +++ b/src/blackcore/context_network.h @@ -138,37 +138,25 @@ namespace BlackCore */ 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; - /*! - * \copydoc IContextNetwork::sendTextMessages() - */ + //! \copydoc IContextNetwork::sendTextMessages() virtual void sendTextMessages(const BlackMisc::Network::CTextMessageList &textMessages); - /*! - * \copydoc IContextNetwork::getMetar() - */ + //! \copydoc IContextNetwork::getMetar() virtual BlackMisc::Aviation::CInformationMessage getMetar(const QString &airportIcaoCode); - /*! - * \copydoc IContextNetwork::getSelectedVoiceRooms() - */ + //! \copydoc IContextNetwork::getSelectedVoiceRooms() virtual BlackMisc::Voice::CVoiceRoomList getSelectedVoiceRooms() const; //! \copydoc IContextNetwork::getSelectedAtcStations virtual BlackMisc::Aviation::CAtcStationList getSelectedAtcStations() const; - /*! - * \copydoc IContextNetwork::getUsers() - */ + //! \copydoc IContextNetwork::getUsers() virtual BlackMisc::Network::CUserList getUsers() const; - /*! - * \copydoc IContextNetwork::getUsersForCallsigns - */ + //! \copydoc IContextNetwork::getUsersForCallsigns virtual BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns) const; private: diff --git a/src/blackcore/voice.h b/src/blackcore/voice.h index d16466da5..ebd0a5020 100644 --- a/src/blackcore/voice.h +++ b/src/blackcore/voice.h @@ -48,8 +48,9 @@ namespace BlackCore public: - //! ComUnit - /*! IVoiceClient currently supports two different com units */ + /*! + * \brief IVoice currently supports two different com units + */ enum ComUnit { COM1 = 0, /*!< ComUnit 1 */ @@ -85,7 +86,7 @@ namespace BlackCore /************************************************ * SETUP TESTS - * *********************************************/ + ***********************************************/ /*! * \brief Runs a 5 seconds test, measuring your background noise. @@ -183,7 +184,6 @@ namespace BlackCore /*! * \brief Get voice room callsings - * \param comUnit * \return */ virtual BlackMisc::Aviation::CCallsignList getVoiceRoomCallsigns(const ComUnit comUnit) const = 0; @@ -225,11 +225,20 @@ namespace BlackCore * \brief Audio for given unit started */ void audioStarted(const ComUnit comUnit); + /*! * \brief Audio for given unit stopped */ void audioStopped(const ComUnit comUnit); + + /*! + * \brief Audio started + */ void globalAudioStarted(); + + /*! + * \brief Audio stopped + */ void globalAudioStopped(); // Test signals @@ -237,6 +246,7 @@ namespace BlackCore * \brief Squelch test completed */ void squelchTestFinished(); + /*! * \brief Microphone test completed */ diff --git a/src/blackcore/voice_vatlib.h b/src/blackcore/voice_vatlib.h index d20a74007..752d28de1 100644 --- a/src/blackcore/voice_vatlib.h +++ b/src/blackcore/voice_vatlib.h @@ -27,7 +27,7 @@ namespace BlackCore { /*! - * Vatlib implementation of the IVoiceClient interface. + * Vatlib implementation of the IVoice interface. */ class CVoiceVatlib : public IVoice { @@ -49,20 +49,49 @@ namespace BlackCore // 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 // and ATC to headspeakers. Is not important to implement that now, if ever. + + /*! + * \copydoc IVoice::audioDevices() + */ virtual const BlackMisc::Voice::CAudioDeviceList &audioDevices() const ; + + /*! + * \copydoc IVoice::defaultAudioInputDevice() + */ virtual const BlackMisc::Voice::CAudioDevice defaultAudioInputDevice() const; + + /*! + * \copydoc IVoice::defaultAudioOutputDevice() + */ virtual const BlackMisc::Voice::CAudioDevice defaultAudioOutputDevice() const; /************************************************ * SETUP TESTS * *********************************************/ - // Mic tests + /*! + * \copydoc IVoice::runSquelchTest + */ virtual void runSquelchTest(); + + /*! + * \copydoc IVoice::runMicTest + */ virtual void runMicTest(); + /*! + * \copydoc IVoice::inputSquelch + */ virtual float inputSquelch() const; + + /*! + * \copydoc IVoice::micTestResult() + */ virtual qint32 micTestResult() const; + + /*! + * \copydoc IVoice::micTestResultAsString + */ virtual QString micTestResultAsString() const; public slots: @@ -145,7 +174,7 @@ namespace BlackCore virtual void switchAudioOutput(const ComUnit comUnit, bool enable); /*! - * \brief Muted? + * \copydoc IVoice::isMuted */ virtual bool isMuted() const { @@ -197,7 +226,9 @@ namespace BlackCore void onEndFindSquelch(); void onEndMicTest(); - // slot to handle users + /*! + * \brief User (identified by callsign) joined or left voice room + */ void onUserJoinedLeft(const ComUnit comUnit); private: diff --git a/src/blackgui/listmodelbase.h b/src/blackgui/listmodelbase.h index e8d13af08..f69cb23aa 100644 --- a/src/blackgui/listmodelbase.h +++ b/src/blackgui/listmodelbase.h @@ -150,9 +150,7 @@ namespace BlackGui } } - /*! - * \copydoc QAbstractListModel::sort() - */ + //! \copydoc QAbstractListModel::sort() virtual void sort(int column, Qt::SortOrder order); //! \brief Similar to ListType::push_back diff --git a/src/blackgui/userlistmodel.h b/src/blackgui/userlistmodel.h index 62f6709c2..1613b56cc 100644 --- a/src/blackgui/userlistmodel.h +++ b/src/blackgui/userlistmodel.h @@ -16,15 +16,10 @@ namespace BlackGui public: - /*! - * \brief Constructor - * \param parent - */ + //! \brief Constructor explicit CUserListModel(QObject *parent = nullptr); - /*! - * \brief Destructor - */ + //! \brief Destructor virtual ~CUserListModel() {} //! \copydoc CListModelBase::data diff --git a/src/blackmisc/avatcstationlist.cpp b/src/blackmisc/avatcstationlist.cpp index 0e6dd146b..2df966feb 100644 --- a/src/blackmisc/avatcstationlist.cpp +++ b/src/blackmisc/avatcstationlist.cpp @@ -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; } diff --git a/src/blackmisc/avcallsign.h b/src/blackmisc/avcallsign.h index ec10320da..782d25834 100644 --- a/src/blackmisc/avcallsign.h +++ b/src/blackmisc/avcallsign.h @@ -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); diff --git a/src/blackmisc/blackmiscfreefunctions.h b/src/blackmisc/blackmiscfreefunctions.h index e2fe2a2d3..31ca54f9c 100644 --- a/src/blackmisc/blackmiscfreefunctions.h +++ b/src/blackmisc/blackmiscfreefunctions.h @@ -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 &values, const char *className); diff --git a/src/blackmisc/mathmatrix3x1.h b/src/blackmisc/mathmatrix3x1.h index 8b4d65a78..5d08b4430 100644 --- a/src/blackmisc/mathmatrix3x1.h +++ b/src/blackmisc/mathmatrix3x1.h @@ -44,7 +44,6 @@ namespace BlackMisc /*! * \brief Copy constructor - * \param otherMatrix */ CMatrix3x1(const CMatrix3x1 &other) : CMatrixBase(other) {} diff --git a/src/blackmisc/mathvector3dbase.cpp b/src/blackmisc/mathvector3dbase.cpp index 133eb3b66..d73e2ca74 100644 --- a/src/blackmisc/mathvector3dbase.cpp +++ b/src/blackmisc/mathvector3dbase.cpp @@ -179,8 +179,7 @@ namespace BlackMisc } /*! - * \brief Stream to DBus - * \param argument + * \copydoc CValueObject::getValueHash() */ template uint CVector3DBase::getValueHash() const { diff --git a/src/blackmisc/mathvector3dbase.h b/src/blackmisc/mathvector3dbase.h index 2d65ebe15..7552134b9 100644 --- a/src/blackmisc/mathvector3dbase.h +++ b/src/blackmisc/mathvector3dbase.h @@ -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) { diff --git a/src/blackmisc/nwuser.h b/src/blackmisc/nwuser.h index c937f34be..de13e1bc6 100644 --- a/src/blackmisc/nwuser.h +++ b/src/blackmisc/nwuser.h @@ -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: diff --git a/src/blackmisc/settingutilities.h b/src/blackmisc/settingutilities.h index 6bdceb5e6..3c4dec9ab 100644 --- a/src/blackmisc/settingutilities.h +++ b/src/blackmisc/settingutilities.h @@ -7,6 +7,9 @@ namespace BlackMisc { namespace Settings { + /*! + * \brief Helper / utility methods for settings + */ class CSettingUtilities { private: diff --git a/src/blackmisc/statusmessage.h b/src/blackmisc/statusmessage.h index 9fad5a348..09bd942db 100644 --- a/src/blackmisc/statusmessage.h +++ b/src/blackmisc/statusmessage.h @@ -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) diff --git a/src/blackmisc/statusmessagelist.h b/src/blackmisc/statusmessagelist.h index 80c2c31f9..71c3301da 100644 --- a/src/blackmisc/statusmessagelist.h +++ b/src/blackmisc/statusmessagelist.h @@ -20,37 +20,25 @@ namespace BlackMisc class CStatusMessageList : public CSequence { public: - /*! - * \brief StatusMessage - */ + //! \brief Constructor CStatusMessageList() {} - /*! - * \brief Find by type - * \param type - * \return - */ + //! \brief Construct from a base class object. + CStatusMessageList(const CSequence &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(); }; diff --git a/src/blackmisc/valuemap.h b/src/blackmisc/valuemap.h index 02f9a19f9..90447fe50 100644 --- a/src/blackmisc/valuemap.h +++ b/src/blackmisc/valuemap.h @@ -121,8 +121,8 @@ namespace BlackMisc static void registerMetadata(); protected: - QMap m_values; /*!< values */ - bool m_wildcard; + QMap m_values; //!< values + bool m_wildcard; //!< wildcard /*! * \brief Meaningful string representation diff --git a/src/blackmisc/vaudiodevice.h b/src/blackmisc/vaudiodevice.h index b70e6675d..499936dea 100644 --- a/src/blackmisc/vaudiodevice.h +++ b/src/blackmisc/vaudiodevice.h @@ -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