Auto status change to "Under Review"
@@ -13,6 +13,7 | |||||
13 | #include <Catalogue/CatalogueSideBarWidget.h> |
|
13 | #include <Catalogue/CatalogueSideBarWidget.h> | |
14 | #include <Catalogue/CreateEventDialog.h> |
|
14 | #include <Catalogue/CreateEventDialog.h> | |
15 |
|
15 | |||
|
16 | #include <CatalogueDao.h> | |||
16 | #include <DBCatalogue.h> |
|
17 | #include <DBCatalogue.h> | |
17 | #include <DBEvent.h> |
|
18 | #include <DBEvent.h> | |
18 | #include <DBEventProduct.h> |
|
19 | #include <DBEventProduct.h> | |
@@ -106,7 +107,7 void CatalogueActionManager::installSelectionZoneActions() | |||||
106 | auto createEventAction = actionController.addSectionZoneAction( |
|
107 | auto createEventAction = actionController.addSectionZoneAction( | |
107 | {QObject::tr("Catalogues")}, QObject::tr("New Event..."), [this](auto zones) { |
|
108 | {QObject::tr("Catalogues")}, QObject::tr("New Event..."), [this](auto zones) { | |
108 | CreateEventDialog dialog( |
|
109 | CreateEventDialog dialog( | |
109 |
impl->m_CatalogueExplorer->sideBarWidget().getCatalogues( |
|
110 | impl->m_CatalogueExplorer->sideBarWidget().getCatalogues(REPOSITORY_DEFAULT)); | |
110 | dialog.hideCatalogueChoice(); |
|
111 | dialog.hideCatalogueChoice(); | |
111 | if (dialog.exec() == QDialog::Accepted) { |
|
112 | if (dialog.exec() == QDialog::Accepted) { | |
112 | impl->createEventFromZones(dialog.eventName(), zones); |
|
113 | impl->createEventFromZones(dialog.eventName(), zones); | |
@@ -117,7 +118,7 void CatalogueActionManager::installSelectionZoneActions() | |||||
117 | auto createEventInCatalogueAction = actionController.addSectionZoneAction( |
|
118 | auto createEventInCatalogueAction = actionController.addSectionZoneAction( | |
118 | {QObject::tr("Catalogues")}, QObject::tr("New Event in Catalogue..."), [this](auto zones) { |
|
119 | {QObject::tr("Catalogues")}, QObject::tr("New Event in Catalogue..."), [this](auto zones) { | |
119 | CreateEventDialog dialog( |
|
120 | CreateEventDialog dialog( | |
120 |
impl->m_CatalogueExplorer->sideBarWidget().getCatalogues( |
|
121 | impl->m_CatalogueExplorer->sideBarWidget().getCatalogues(REPOSITORY_DEFAULT)); | |
121 | if (dialog.exec() == QDialog::Accepted) { |
|
122 | if (dialog.exec() == QDialog::Accepted) { | |
122 | auto selectedCatalogue = dialog.selectedCatalogue(); |
|
123 | auto selectedCatalogue = dialog.selectedCatalogue(); | |
123 | if (!selectedCatalogue) { |
|
124 | if (!selectedCatalogue) { | |
@@ -125,7 +126,7 void CatalogueActionManager::installSelectionZoneActions() | |||||
125 | selectedCatalogue->setName(dialog.catalogueName()); |
|
126 | selectedCatalogue->setName(dialog.catalogueName()); | |
126 | // sqpApp->catalogueController().addCatalogue(selectedCatalogue); TODO |
|
127 | // sqpApp->catalogueController().addCatalogue(selectedCatalogue); TODO | |
127 | impl->m_CatalogueExplorer->sideBarWidget().addCatalogue(selectedCatalogue, |
|
128 | impl->m_CatalogueExplorer->sideBarWidget().addCatalogue(selectedCatalogue, | |
128 |
|
|
129 | REPOSITORY_DEFAULT); | |
129 | } |
|
130 | } | |
130 |
|
131 | |||
131 | impl->createEventFromZones(dialog.eventName(), zones, selectedCatalogue); |
|
132 | impl->createEventFromZones(dialog.eventName(), zones, selectedCatalogue); |
@@ -320,6 +320,7 void CatalogueEventsWidget::setEventChanges(const std::shared_ptr<DBEvent> &even | |||||
320 | auto validationIndex |
|
320 | auto validationIndex | |
321 | = eventIndex.sibling(eventIndex.row(), (int)CatalogueEventsModel::Column::Validation); |
|
321 | = eventIndex.sibling(eventIndex.row(), (int)CatalogueEventsModel::Column::Validation); | |
322 |
|
322 | |||
|
323 | if (validationIndex.isValid()) { | |||
323 | if (hasChanges) { |
|
324 | if (hasChanges) { | |
324 | if (ui->treeView->indexWidget(validationIndex) == nullptr) { |
|
325 | if (ui->treeView->indexWidget(validationIndex) == nullptr) { | |
325 | auto widget = CatalogueExplorerHelper::buildValidationWidget( |
|
326 | auto widget = CatalogueExplorerHelper::buildValidationWidget( | |
@@ -334,6 +335,7 void CatalogueEventsWidget::setEventChanges(const std::shared_ptr<DBEvent> &even | |||||
334 |
|
335 | |||
335 | impl->m_Model->setEventHasChanges(event, hasChanges); |
|
336 | impl->m_Model->setEventHasChanges(event, hasChanges); | |
336 | } |
|
337 | } | |
|
338 | } | |||
337 | else { |
|
339 | else { | |
338 | qCWarning(LOG_CatalogueEventsWidget()) |
|
340 | qCWarning(LOG_CatalogueEventsWidget()) | |
339 | << "setEventChanges: the event is not displayed in the model."; |
|
341 | << "setEventChanges: the event is not displayed in the model."; |
@@ -225,7 +225,8 void CatalogueSideBarWidget::CatalogueSideBarWidgetPrivate::configureTreeWidget( | |||||
225 | { |
|
225 | { | |
226 | auto allEventsItem = new CatalogueTextTreeItem{QIcon{":/icones/allEvents.png"}, "All Events", |
|
226 | auto allEventsItem = new CatalogueTextTreeItem{QIcon{":/icones/allEvents.png"}, "All Events", | |
227 | ALL_EVENT_ITEM_TYPE}; |
|
227 | ALL_EVENT_ITEM_TYPE}; | |
228 | m_TreeModel->addTopLevelItem(allEventsItem); |
|
228 | auto allEventIndex = m_TreeModel->addTopLevelItem(allEventsItem); | |
|
229 | treeView->setCurrentIndex(allEventIndex); | |||
229 |
|
230 | |||
230 | auto trashItem |
|
231 | auto trashItem | |
231 | = new CatalogueTextTreeItem{QIcon{":/icones/trash.png"}, "Trash", TRASH_ITEM_TYPE}; |
|
232 | = new CatalogueTextTreeItem{QIcon{":/icones/trash.png"}, "Trash", TRASH_ITEM_TYPE}; |
General Comments 3
Status change > Approved
You need to be logged in to leave comments.
Login now