##// END OF EJS Templates
Product field now display products event list instead of only its size
perrinel -
r1310:6ea80a9a6c65
parent child
Show More
@@ -53,8 +53,14 struct CatalogueEventsModel::CatalogueEventsModelPrivate {
53 case CatalogueEventsModel::Column::TEnd:
53 case CatalogueEventsModel::Column::TEnd:
54 return nbEventProducts(event) > 0 ? DateUtils::dateTime(event->getTEnd())
54 return nbEventProducts(event) > 0 ? DateUtils::dateTime(event->getTEnd())
55 : QVariant{};
55 : QVariant{};
56 case CatalogueEventsModel::Column::Product:
56 case CatalogueEventsModel::Column::Product: {
57 return QString::number(nbEventProducts(event)) + " product(s)";
57 auto eventProducts = event->getEventProducts();
58 QStringList eventProductList;
59 for (auto evtProduct : eventProducts) {
60 eventProductList << evtProduct.getProductId();
61 }
62 return eventProductList.join(";");
63 }
58 case CatalogueEventsModel::Column::Tags: {
64 case CatalogueEventsModel::Column::Tags: {
59 QString tagList;
65 QString tagList;
60 auto tags = event->getTags();
66 auto tags = event->getTags();
@@ -148,8 +148,14 void CatalogueInspectorWidget::setEvent(const std::shared_ptr<DBEvent> &event)
148 ui->leEventName->setEnabled(true);
148 ui->leEventName->setEnabled(true);
149 ui->leEventName->setText(event->getName());
149 ui->leEventName->setText(event->getName());
150 ui->leEventProduct->setEnabled(false);
150 ui->leEventProduct->setEnabled(false);
151 ui->leEventProduct->setText(
151
152 QString::number(event->getEventProducts().size()).append(" product(s)"));
152 auto eventProducts = event->getEventProducts();
153 QStringList eventProductList;
154 for (auto evtProduct : eventProducts) {
155 eventProductList << evtProduct.getProductId();
156 }
157
158 ui->leEventProduct->setText(eventProductList.join(";"));
153
159
154 QString tagList;
160 QString tagList;
155 auto tags = event->getTagsNames();
161 auto tags = event->getTagsNames();
@@ -270,10 +270,10 VisualizationGraphWidget *VisualizationZoneWidget::createGraph(std::shared_ptr<V
270 break;
270 break;
271 }
271 }
272 graphChild->setFlags(GraphFlag::DisableAll);
272 graphChild->setFlags(GraphFlag::DisableAll);
273 qCDebug(LOG_VisualizationZoneWidget())
273 qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: Range before: ")
274 << tr("TORM: Range before: ") << graphChild->graphRange();
274 << graphChild->graphRange();
275 qCDebug(LOG_VisualizationZoneWidget())
275 qCDebug(LOG_VisualizationZoneWidget()) << tr("TORM: Range after : ")
276 << tr("TORM: Range after : ") << graphChildRange;
276 << graphChildRange;
277 qCDebug(LOG_VisualizationZoneWidget())
277 qCDebug(LOG_VisualizationZoneWidget())
278 << tr("TORM: child dt") << graphChildRange.m_TEnd - graphChildRange.m_TStart;
278 << tr("TORM: child dt") << graphChildRange.m_TEnd - graphChildRange.m_TStart;
279 graphChild->setGraphRange(graphChildRange);
279 graphChild->setGraphRange(graphChildRange);
General Comments 0
You need to be logged in to leave comments. Login now