Index: sources/storage/TreatmentLog.cpp =================================================================== diff -u -raf9b5ee3e759ca45c4e55488f46601f30143edae -rcde103b58b55aa638697152111d3fa5325afd2e7 --- sources/storage/TreatmentLog.cpp (.../TreatmentLog.cpp) (revision af9b5ee3e759ca45c4e55488f46601f30143edae) +++ sources/storage/TreatmentLog.cpp (.../TreatmentLog.cpp) (revision cde103b58b55aa638697152111d3fa5325afd2e7) @@ -138,35 +138,37 @@ /*! * \brief TreatmentLog::alarmTitle * \details prepares the alarm title and returns. - * \param vID - the alarm ID + * \param vID - the alarm ID + * \param vShowID - flag indicting whether to include the alarm ID in the returned title or not * \return the alarm title */ -QString TreatmentLog::alarmTitle(quint32 vID) { +QString TreatmentLog::alarmTitle(quint32 vID, const bool vShowID) { QString str = "%1-%2"; QString title = "undefined"; if ( _treatmentLogAlarmTitles.contains(vID) ) { title = _treatmentLogAlarmTitles[vID] .replace("," , "-") // the Txr is a csv file and any ',' in the title will break it. .replace("\n" , "-"); // removing any new line since this will break the Txr as well. } - return str.arg(vID, 3).arg(title); + return vShowID ? str.arg(vID, 3).arg(title) : title; } /*! * \brief TreatmentLog::eventTitle * \details prepares the event title and returns. - * \param vID - the event ID + * \param vID - the event ID + * \param vShowID - flag indicting whether to include the alarm ID in the returned title or not * \return the event title */ -QString TreatmentLog::eventTitle(quint32 vID) { +QString TreatmentLog::eventTitle(quint32 vID, const bool vShowID) { QString str = "%1 - %2"; QString title = "undefined"; if ( _treatmentLogEventTitles.contains(vID) ) { title = _treatmentLogEventTitles[vID] .replace("," , "-") // the Txr is a csv file and any ',' in the title will break it. .replace("\n" , "-"); // removing any new line since this will break the Txr as well. } - return str.arg(vID, 3).arg(title); + return vShowID ? str.arg(vID, 3).arg(title) : title; }