319{
320 std::vector<dref> Objects;
321
322 BOOST_SCOPE_EXIT(&Objects, this_)
323 {
324 QList<QPair<QString, QString>> objs;
325 for(const auto& o : Objects) {
326 objs.append(QPair<QString, QString>(QString::fromStdString(o.class_name()),
327 QString::fromStdString(o.UID())));
328 }
329
331
332
333 QApplication::restoreOverrideCursor();
334 this_->ui->ChangeButton->setEnabled(true);
336 }
337 BOOST_SCOPE_EXIT_END
338
339 ui->ChangeButton->setEnabled(
false);
340 QApplication::setOverrideCursor(Qt::WaitCursor);
342
343 bool SubClasses =
ui->SubclassesCheckBox->isChecked();
344 QString ClassName =
ui->ClassCombo->currentText();
345
346 std::unique_ptr<dbe::interface::messenger::batch_guard> batchmode (
348
350
352 {
354 ClassName.toStdString(), SubClasses );
355
356 std::copy ( tmprefs.begin(), tmprefs.end(), std::back_inserter ( Objects ) );
357
358 if ( not Objects.empty() )
359 {
360 filter ( Objects, ClassName );
361 }
362 }
363 else
364 {
366 }
367
368 if ( Objects.empty() ) QMessageBox::information ( this, tr ( "Message" ),
369 tr ( "No objects match filter!" ) );
370 else
371 {
373 ClassName.toStdString(), false );
374 const std::vector<dunedaq::conffwk::attribute_t> AttributeList = ClassInfo.
p_attributes;
375 const std::vector<dunedaq::conffwk::relationship_t> RelationshipList = ClassInfo
377 dunedaq::conffwk::attribute_t AttributeChange;
378 dunedaq::conffwk::relationship_t RelationshipChange;
379
380 for ( dunedaq::conffwk::attribute_t i : AttributeList )
381 if ( i.p_name ==
ui->NewAttributeComboBox->currentText().toStdString() )
382 {
383 AttributeChange = i;
384 break;
385 }
386
387 for ( dunedaq::conffwk::relationship_t i : RelationshipList )
388 if ( i.p_name ==
ui->NewRelationshipComboBox->currentText().toStdString() )
389 {
390 RelationshipChange = i;
391 break;
392 }
393
394 QStringList AttributeChangeList;
395
396 if ( !
ui->AttributeEdit->text().isEmpty() ) AttributeChangeList
397 <<
ui->AttributeEdit->text();
398
399 for ( auto objects_iter = Objects.begin(); objects_iter != Objects.end(); ++objects_iter )
400 {
401 tref Object = objects_iter->
ref();
402
403 QStringList RelationshipChangeList;
404
405 if (
ui->ChangeAtrributeCheckBox->isChecked() )
406 {
407 if ( !AttributeChangeList.isEmpty() )
408 {
410 }
411 }
412
413 if (
ui->ChangeRelationshipCheckBox->isChecked() )
414 {
415 if (
ui->AddCheckBox->isChecked() )
416 {
417 RelationshipChangeList =
419 Object, RelationshipChange );
420 }
421
422 RelationshipChangeList <<
ui->RelationshipEdit->currentText();
424 }
425 }
426 }
427}
static confaccessor & ref()
dunedaq::conffwk::ConfigObject & ref(bool check_null=true) const
static std::unique_ptr< batch_guard > batchmode()
void relation(dbe::inner::configobject::tref src, dunedaq::conffwk::relationship_t const &edge, QStringList const &targets)
void attribute(dbe::inner::configobject::tref objectref, dunedaq::conffwk::attribute_t const &attribute_info, QStringList const &attribute_values)
inner::configobject::tref tref