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