From 6ea80a9a6c65e6fa6ddae84f6ddb3bb7604de74f 2018-01-08 15:55:18 From: mperrinel Date: 2018-01-08 15:55:18 Subject: [PATCH] Product field now display products event list instead of only its size --- diff --git a/gui/src/Catalogue/CatalogueEventsModel.cpp b/gui/src/Catalogue/CatalogueEventsModel.cpp index e34edfc..5914d39 100644 --- a/gui/src/Catalogue/CatalogueEventsModel.cpp +++ b/gui/src/Catalogue/CatalogueEventsModel.cpp @@ -53,8 +53,14 @@ struct CatalogueEventsModel::CatalogueEventsModelPrivate { case CatalogueEventsModel::Column::TEnd: return nbEventProducts(event) > 0 ? DateUtils::dateTime(event->getTEnd()) : QVariant{}; - case CatalogueEventsModel::Column::Product: - return QString::number(nbEventProducts(event)) + " product(s)"; + case CatalogueEventsModel::Column::Product: { + auto eventProducts = event->getEventProducts(); + QStringList eventProductList; + for (auto evtProduct : eventProducts) { + eventProductList << evtProduct.getProductId(); + } + return eventProductList.join(";"); + } case CatalogueEventsModel::Column::Tags: { QString tagList; auto tags = event->getTags(); diff --git a/gui/src/Catalogue/CatalogueInspectorWidget.cpp b/gui/src/Catalogue/CatalogueInspectorWidget.cpp index 02c8616..f213318 100644 --- a/gui/src/Catalogue/CatalogueInspectorWidget.cpp +++ b/gui/src/Catalogue/CatalogueInspectorWidget.cpp @@ -148,8 +148,14 @@ void CatalogueInspectorWidget::setEvent(const std::shared_ptr &event) ui->leEventName->setEnabled(true); ui->leEventName->setText(event->getName()); ui->leEventProduct->setEnabled(false); - ui->leEventProduct->setText( - QString::number(event->getEventProducts().size()).append(" product(s)")); + + auto eventProducts = event->getEventProducts(); + QStringList eventProductList; + for (auto evtProduct : eventProducts) { + eventProductList << evtProduct.getProductId(); + } + + ui->leEventProduct->setText(eventProductList.join(";")); QString tagList; auto tags = event->getTagsNames(); diff --git a/gui/src/Visualization/VisualizationZoneWidget.cpp b/gui/src/Visualization/VisualizationZoneWidget.cpp index cadda87..fab2acc 100644 --- a/gui/src/Visualization/VisualizationZoneWidget.cpp +++ b/gui/src/Visualization/VisualizationZoneWidget.cpp @@ -270,10 +270,10 @@ VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptrsetFlags(GraphFlag::DisableAll); - qCDebug(LOG_VisualizationZoneWidget()) - << tr("TORM: Range before: ") << graphChild->graphRange(); - qCDebug(LOG_VisualizationZoneWidget()) - << tr("TORM: Range after : ") << graphChildRange; + qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: Range before: ") + << graphChild->graphRange(); + qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: Range after : ") + << graphChildRange; qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: child dt") << graphChildRange.m_TEnd - graphChildRange.m_TStart; graphChild->setGraphRange(graphChildRange);