Index: sources/model/MAbstract.cpp =================================================================== diff -u -rfef971047be21dd255a497fbf54c170316d617a9 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/model/MAbstract.cpp (.../MAbstract.cpp) (revision fef971047be21dd255a497fbf54c170316d617a9) +++ sources/model/MAbstract.cpp (.../MAbstract.cpp) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,15 +1,15 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * Copyright (c) 2020-2024 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * - * \file MAbstract.cpp - * \author (last) Behrouz NematiPour - * \date (last) 08-Sep-2020 - * \author (original) Behrouz NematiPour - * \date (original) 04-Jul-2020 + * \file MAbstract.cpp + * \author (last) Behrouz NematiPour + * \date (last) 04-Aug-2021 + * \author (original) Behrouz NemaiPour + * \date (original) 04-Jul-2020 * */ @@ -19,8 +19,11 @@ using namespace Model; -// #define ROUND_FLOATS +#define ROUND_FLOATS +const QMap MAbstract::_typeText = MAbstract::_typeText_make(); +const QMap MAbstract::_unitText = MAbstract::_unitText_make(); + /*! * \brief MAbstract::toVariantList * \details Current values of the model data will be listed in a QVariantList vData. @@ -40,7 +43,7 @@ QVariantList mParameters = parameters(); QString mString = description(); for( const auto ¶meter : mParameters ) { - if (parameter.type() == uint(QMetaType::Float)) // Qt has a mixed definition of QVariant::Type and QMetaType seems like a not fixed issue. + if (static_cast(parameter.type()) == QMetaType::Float) // Qt has a mixed definition of QVariant::Type and QMetaType seems like a not fixed issue. #ifdef ROUND_FLOATS mString += _delimiter + QString("%1").arg(parameter.toFloat(),0,'f',_precision); #else @@ -59,8 +62,7 @@ * \return String */ QString MAbstract::description() const { - // TODO: - // not all the received messages are inherited form MAbstract + // TODO : not all the received messages are inherited form MAbstract // also LOG_EVENT is adding E // so for now let LOG_EVENT add E until all the received messages inherit from MAbstract return /*_typeText[typeText()] + _delimiter +*/ _unitText[unitText()] + _delimiter + infoText();