Go to the source code of this file.
◆ MODEL_COMMON_INTERFACE_CREATE_THAT_OBJ_IMPL()
Definition at line 412 of file tree.cpp.
413{
414 if ( treenode * classnode = confaccessor::gethandler()->getnode (
obj.class_name() ) )
415 {
417 {
418 layoutAboutToBeChanged();
419 new ObjectNode ( obj, false, classnode );
420
421
422
423 emit layoutChanged();
424 }
425 }
426}
static treenode * findchild(treenode *top, QString const &name)
◆ MODEL_COMMON_INTERFACE_DELETE_THAT_OBJ_IMPL()
Definition at line 428 of file tree.cpp.
429{
430 if (
index.isValid() )
431 {
432 this->removeRows (
index.row(), 1,
index.parent() );
433 }
434}
◆ MODEL_COMMON_INTERFACE_LOOKUP_IMPL()
Definition at line 386 of file tree.cpp.
387{
388 if ( treenode * classnode = confaccessor::gethandler()->getnode (
389 QString::fromStdString (
obj.class_name() ) ) )
390 {
391
392 auto found = [&
obj, classnode] (
int i )
393 {
394 return obj.UID() == classnode->GetChild ( i )->GetData ( 0 ).toString().toStdString();
395 };
396
397 int i = 0;
398 int const childs = classnode->ChildCount();
399
400 for ( ; i < childs and not found ( i ); ++i )
401
402 ;
403
404 QModelIndex parent_index = getindex ( classnode );
405
406 return childs == i ? QModelIndex() :
index ( i, parent_index.column(), parent_index );
407 }
408
409 return QModelIndex();
410}
◆ MODEL_COMMON_INTERFACE_RENAME_THAT_OBJ_IMPL()
Definition at line 436 of file tree.cpp.
437{
438 if (
index.isValid() )
439 {
440 treenode * child = getnode ( index );
441 child->rename ( QString::fromStdString (
obj.ref().UID() ) );
442 emit dataChanged ( index, index );
443 }
444}
◆ MODEL_COMMON_INTERFACE_UPDATE_THAT_OBJ_IMPL()
Definition at line 446 of file tree.cpp.
447{
448
449
450 if (
index.isValid() )
451 {
452
453 treenode * child = getnode ( index );
454
455 if ( treenode * parent = child->GetParent() )
456 {
457 emit layoutAboutToBeChanged();
458 parent->RemoveChild ( child );
459 new ObjectNode ( obj, false, parent );
460 emit layoutChanged();
461 }
462 }
463}
◆ dbe_lib_structure_version
Including QT Headers.
Including TDAq Including DBE
Definition at line 11 of file tree.cpp.