394{
395 dunedaq::conffwk::class_t const & classdef =
399
400 for ( dunedaq::conffwk::attribute_t const & attr : attributes )
401
402 {
403 QString name = QString::fromStdString ( attr.p_name );
404
405 if ( attr.p_is_multi_value )
406 {
407 widgets::editors::multiattr * widget = new widgets::editors::multiattr ( attr, this,
408 true );
410
413 connect ( widget, SIGNAL ( signal_value_change() ),
this, SLOT (
UpdateActions() ),
414 Qt::UniqueConnection );
415 connect ( widget, SIGNAL ( signal_value_change() ),
this, SLOT (
ObjectChanged() ),
416 Qt::UniqueConnection );
418 }
419 else
420 {
421 switch ( attr.p_type )
422 {
423
425
427 {
428 widgets::editors::combo * Widget = new widgets::editors::combo ( attr, this, true );
432 connect ( Widget->Combo, SIGNAL ( activated ( QString ) ),
this, SLOT (
UpdateActions() ),
433 Qt::UniqueConnection );
434 connect ( Widget, SIGNAL ( signal_value_change() ),
this, SLOT (
ObjectChanged() ),
435 Qt::UniqueConnection );
437 break;
438 }
439
441
443
445
447
449
451
453
455
457
459 {
460 widgets::editors::numericattr * Widget = new widgets::editors::numericattr ( attr, this,
461 true );
465 connect ( Widget, SIGNAL ( signal_value_change() ),
this, SLOT (
UpdateActions() ),
466 Qt::UniqueConnection );
467 connect ( Widget, SIGNAL ( signal_value_change() ),
this, SLOT (
ObjectChanged() ),
468 Qt::UniqueConnection );
470 break;
471 }
472
474
476
478 {
479 widgets::editors::stringattr * Widget = new widgets::editors::stringattr ( attr, this,
480 true );
484 connect ( Widget, SIGNAL ( signal_value_change() ),
this, SLOT (
UpdateActions() ),
485 Qt::UniqueConnection );
486 connect ( Widget, SIGNAL ( signal_value_change() ),
this, SLOT (
ObjectChanged() ),
487 Qt::UniqueConnection );
489 break;
490 }
491
493 {
494 widgets::editors::combo * Widget = new widgets::editors::combo ( attr, this, true );
498 connect ( Widget->Combo, SIGNAL ( activated ( QString ) ),
this, SLOT (
UpdateActions() ),
499 Qt::UniqueConnection );
500 connect ( Widget, SIGNAL ( signal_value_change() ),
this, SLOT (
ObjectChanged() ),
501 Qt::UniqueConnection );
503 break;
504 }
505 }
506 }
507 }
508
509 for ( dunedaq::conffwk::relationship_t const & arelation :
510 relations )
511 {
512 widgets::editors::relation * widget = new widgets::editors::relation ( arelation, this,
513 true );
514 QString name = QString::fromStdString ( arelation.p_name );
516
518 {
519 std::vector<tref> DataList;
520
522 {
523 try
524 {
525 DataList.push_back (
527 }
528 catch ( daq::dbe::config_object_retrieval_result_is_null const & e )
529 {
530
531 }
532 }
533 else
534 {
536 }
537
538 for (
tref const & i : DataList )
539 {
540 if ( not i.is_null() )
541 {
542 Data.push_back ( QString::fromStdString ( i.UID() ) );
543 }
544 }
545 }
546
547 widget->setdata ( Data );
548 widget->SetEditor();
551 connect ( widget, SIGNAL ( signal_value_change() ),
this, SLOT (
UpdateActions() ),
552 Qt::UniqueConnection );
553 connect ( widget, SIGNAL ( signal_value_change() ),
this, SLOT (
ObjectChanged() ),
554 Qt::UniqueConnection );
556 Qt::UniqueConnection );
557 connect (
this, SIGNAL (
LoadedInitials() ), widget, SLOT ( slot_set_initial_loaded() ),
558 Qt::UniqueConnection );
561 }
562}
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)
static dunedaq::conffwk::class_t definition(std::string const &cn, bool direct_only)
std::vector< T > attributes(tref const &item)
tref relation< tref >(tref object, dunedaq::conffwk::relationship_t const &r)
T relation(tref item, dunedaq::conffwk::relationship_t const &relation)
std::vector< T > relations(tref const &item)
bool is_simple(dunedaq::conffwk::relationship_t const &)
inner::configobject::tref tref
const std::vector< attribute_t > p_attributes
const std::vector< relationship_t > p_relationships