##// END OF EJS Templates
Displays TStart & TEnd for events
trabillard -
r1185:2ad912431473
parent child
Show More
@@ -34,9 +34,9 struct CatalogueEventsModel::CatalogueEventsModelPrivate {
34 case Column::Name:
34 case Column::Name:
35 return event->getName();
35 return event->getName();
36 case Column::TStart:
36 case Column::TStart:
37 return "Oo"; // DateUtils::dateTime(event->getTStart());
37 return DateUtils::dateTime(event->getTStart());
38 case Column::TEnd:
38 case Column::TEnd:
39 return "oO"; // DateUtils::dateTime(event->getTEnd());
39 return DateUtils::dateTime(event->getTEnd());
40 case Column::Product: {
40 case Column::Product: {
41 auto eventProductsIt = m_EventProducts.find(event.get());
41 auto eventProductsIt = m_EventProducts.find(event.get());
42 if (eventProductsIt != m_EventProducts.cend()) {
42 if (eventProductsIt != m_EventProducts.cend()) {
@@ -337,8 +337,8 QMimeData *CatalogueEventsModel::mimeData(const QModelIndexList &indexes) const
337
337
338 if (isFirst) {
338 if (isFirst) {
339 isFirst = false;
339 isFirst = false;
340 // firstTimeRange.m_TStart = event->getTStart();
340 firstTimeRange.m_TStart = event->getTStart();
341 // firstTimeRange.m_TEnd = event->getTEnd();
341 firstTimeRange.m_TEnd = event->getTEnd();
342 }
342 }
343 }
343 }
344 else if (type == ItemType::EventProduct) {
344 else if (type == ItemType::EventProduct) {
@@ -137,14 +137,15 struct CatalogueEventsWidget::CatalogueEventsWidgetPrivate {
137
137
138 if (selectedRows.count() == 1) {
138 if (selectedRows.count() == 1) {
139 auto event = m_Model->getEvent(selectedRows.first());
139 auto event = m_Model->getEvent(selectedRows.first());
140 if (event) {
140 if (m_VisualizationWidget) {
141 if (m_VisualizationWidget) {
141 if (auto tab = m_VisualizationWidget->currentTabWidget()) {
142 if (auto tab = m_VisualizationWidget->currentTabWidget()) {
142
143
143 for (auto zoneName : m_ZonesForTimeMode) {
144 for (auto zoneName : m_ZonesForTimeMode) {
144 if (auto zone = tab->getZoneWithName(zoneName)) {
145 if (auto zone = tab->getZoneWithName(zoneName)) {
145 SqpRange eventRange;
146 SqpRange eventRange;
146 // eventRange.m_TStart = event->getTStart();
147 eventRange.m_TStart = event->getTStart();
147 // eventRange.m_TEnd = event->getTEnd();
148 eventRange.m_TEnd = event->getTEnd();
148 zone->setZoneRange(eventRange);
149 zone->setZoneRange(eventRange);
149 }
150 }
150 }
151 }
@@ -159,6 +160,7 struct CatalogueEventsWidget::CatalogueEventsWidgetPrivate {
159 << "updateTimeZone: visualization widget not found";
160 << "updateTimeZone: visualization widget not found";
160 }
161 }
161 }
162 }
163 }
162 else {
164 else {
163 qCWarning(LOG_CatalogueEventsWidget())
165 qCWarning(LOG_CatalogueEventsWidget())
164 << "updateTimeZone: not compatible with multiple events selected";
166 << "updateTimeZone: not compatible with multiple events selected";
@@ -127,8 +127,8 void CatalogueInspectorWidget::setEvent(const std::shared_ptr<DBEvent> &event)
127 ui->dateTimeEventTStart->setEnabled(false);
127 ui->dateTimeEventTStart->setEnabled(false);
128 ui->dateTimeEventTEnd->setEnabled(false);
128 ui->dateTimeEventTEnd->setEnabled(false);
129
129
130 // ui->dateTimeEventTStart->setDateTime(DateUtils::dateTime(event->getTStart()));
130 ui->dateTimeEventTStart->setDateTime(DateUtils::dateTime(event->getTStart()));
131 // ui->dateTimeEventTEnd->setDateTime(DateUtils::dateTime(event->getTEnd()));
131 ui->dateTimeEventTEnd->setDateTime(DateUtils::dateTime(event->getTEnd()));
132
132
133 blockSignals(false);
133 blockSignals(false);
134 }
134 }
General Comments 3
Under Review
author

Auto status change to "Under Review"

Approved

Status change > Approved

You need to be logged in to leave comments. Login now