415{
420
422
423 {
424 QString name = QString::fromStdString ( attr.p_name );
425
426 if ( attr.p_is_multi_value )
427 {
428 widgets::editors::multiattr * widget = new widgets::editors::multiattr ( attr, this,
429 true );
433 connect ( widget, SIGNAL ( signal_value_change() ),
this, SLOT (
UpdateActions() ),
434 Qt::UniqueConnection );
435 connect ( widget, SIGNAL ( signal_value_change() ),
this, SLOT (
ObjectChanged() ),
436 Qt::UniqueConnection );
438 }
439 else
440 {
441 switch ( attr.p_type )
442 {
443
445
447 {
448 widgets::editors::combo * Widget = new widgets::editors::combo ( attr, this, true );
452 connect ( Widget->Combo, SIGNAL ( activated ( QString ) ),
this, SLOT (
UpdateActions() ),
453 Qt::UniqueConnection );
454 connect ( Widget, SIGNAL ( signal_value_change() ),
this, SLOT (
ObjectChanged() ),
455 Qt::UniqueConnection );
457 break;
458 }
459
461
463
465
467
469
471
473
475
477
479 {
480 widgets::editors::numericattr * Widget = new widgets::editors::numericattr ( attr, this,
481 true );
485 connect ( Widget, SIGNAL ( signal_value_change() ),
this, SLOT (
UpdateActions() ),
486 Qt::UniqueConnection );
487 connect ( Widget, SIGNAL ( signal_value_change() ),
this, SLOT (
ObjectChanged() ),
488 Qt::UniqueConnection );
490 break;
491 }
492
494
496
498 {
499 widgets::editors::stringattr * Widget = new widgets::editors::stringattr ( attr, this,
500 true );
504 connect ( Widget, SIGNAL ( signal_value_change() ),
this, SLOT (
UpdateActions() ),
505 Qt::UniqueConnection );
506 connect ( Widget, SIGNAL ( signal_value_change() ),
this, SLOT (
ObjectChanged() ),
507 Qt::UniqueConnection );
509 break;
510 }
511
513 {
514 widgets::editors::combo * Widget = new widgets::editors::combo ( attr, this, true );
518 connect ( Widget->Combo, SIGNAL ( activated ( QString ) ),
this, SLOT (
UpdateActions() ),
519 Qt::UniqueConnection );
520 connect ( Widget, SIGNAL ( signal_value_change() ),
this, SLOT (
ObjectChanged() ),
521 Qt::UniqueConnection );
523 break;
524 }
525 }
526 }
527 }
528
530 relations )
531 {
532 widgets::editors::relation * widget = new widgets::editors::relation ( arelation, this,
533 true );
534 QString name = QString::fromStdString ( arelation.p_name );
536
538 {
539 std::vector<tref> DataList;
540
542 {
543 try
544 {
545 DataList.push_back (
546 dbegraph::linked::through::relation<tref> (
Object(), arelation ) );
547 }
548 catch ( daq::dbe::config_object_retrieval_result_is_null const & e )
549 {
550
551 }
552 }
553 else
554 {
555 DataList = dbegraph::linked::through::relation<std::vector<tref>> (
Object(), arelation );
556 }
557
558 for (
tref const & i : DataList )
559 {
560 if ( not i.is_null() )
561 {
562 Data.push_back ( QString::fromStdString ( i.UID() ) );
563 }
564 }
565 }
566
567 widget->setdata ( Data );
568 widget->SetEditor();
571 connect ( widget, SIGNAL ( signal_value_change() ),
this, SLOT (
UpdateActions() ),
572 Qt::UniqueConnection );
573 connect ( widget, SIGNAL ( signal_value_change() ),
this, SLOT (
ObjectChanged() ),
574 Qt::UniqueConnection );
576 Qt::UniqueConnection );
577 connect (
this, SIGNAL (
LoadedInitials() ), widget, SLOT ( slot_set_initial_loaded() ),
578 Qt::UniqueConnection );
581 }
582}
void set_attribute_widget(dunedaq::conffwk::attribute_t const &, widgets::editors::base *)
void set_tooltip(dunedaq::conffwk::attribute_t const &, widgets::editors::base *)
void ResetObjectChanged()
void register_attribute_widget(QString const &name, widgets::editors::base *widget)
void register_relation_widget(QString const &name, widgets::editors::base *widget)
std::vector< T > attributes(tref const &item)
std::vector< T > relations(tref const &item)
bool is_simple(dunedaq::conffwk::relationship_t const &)
inner::configobject::tref tref