##// END OF EJS Templates
Edition of tags
trabillard -
r1186:1b3babc39fe2
parent child
Show More
@@ -63,6 +63,19 void CatalogueInspectorWidget::CatalogueInspectorWidgetPrivate::connectEventUpda
63 }
63 }
64 });
64 });
65
65
66 connect(ui->leEventTags, &QLineEdit::editingFinished, [ui, inspector, this]() {
67 auto tags = ui->leEventTags->text().split(QRegExp("\\s+"));
68 std::list<QString> tagNames;
69 for (auto tag : tags) {
70 tagNames.push_back(tag);
71 }
72
73 if (m_DisplayedEvent->getTagsNames() != tagNames) {
74 m_DisplayedEvent->setTagsNames(tagNames);
75 emit inspector->eventUpdated(m_DisplayedEvent);
76 }
77 });
78
66 connect(ui->leEventProduct, &QLineEdit::editingFinished, [ui, inspector, this]() {
79 connect(ui->leEventProduct, &QLineEdit::editingFinished, [ui, inspector, this]() {
67 if (ui->leEventProduct->text() != m_DisplayedEventProduct->getProductId()) {
80 if (ui->leEventProduct->text() != m_DisplayedEventProduct->getProductId()) {
68 m_DisplayedEventProduct->setProductId(ui->leEventProduct->text());
81 m_DisplayedEventProduct->setProductId(ui->leEventProduct->text());
@@ -70,10 +83,6 void CatalogueInspectorWidget::CatalogueInspectorWidgetPrivate::connectEventUpda
70 }
83 }
71 });
84 });
72
85
73 connect(ui->leEventTags, &QLineEdit::editingFinished, [ui, inspector, this]() {
74 // TODO
75 });
76
77 connect(ui->dateTimeEventTStart, &QDateTimeEdit::editingFinished, [ui, inspector, this]() {
86 connect(ui->dateTimeEventTStart, &QDateTimeEdit::editingFinished, [ui, inspector, this]() {
78 auto time = DateUtils::secondsSinceEpoch(ui->dateTimeEventTStart->dateTime());
87 auto time = DateUtils::secondsSinceEpoch(ui->dateTimeEventTStart->dateTime());
79 if (time != m_DisplayedEventProduct->getTStart()) {
88 if (time != m_DisplayedEventProduct->getTStart()) {
@@ -115,9 +124,9 void CatalogueInspectorWidget::setEvent(const std::shared_ptr<DBEvent> &event)
115 QString::number(event->getEventProducts().size()).append(" product(s)"));
124 QString::number(event->getEventProducts().size()).append(" product(s)"));
116
125
117 QString tagList;
126 QString tagList;
118 auto tags = event->getTags();
127 auto tags = event->getTagsNames();
119 for (auto tag : tags) {
128 for (auto tag : tags) {
120 tagList += tag.getName();
129 tagList += tag;
121 tagList += ' ';
130 tagList += ' ';
122 }
131 }
123
132
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