DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
subtreeproxy.cpp File Reference
#include "dbe/config_ui_info.hpp"
#include "dbe/subtreeproxy.hpp"
#include "dbe/tree.hpp"
#include "dbe/treenode.hpp"
#include "dbe/confaccessor.hpp"
#include "dbe/messenger.hpp"
Include dependency graph for subtreeproxy.cpp:

Go to the source code of this file.

Functions

 MODEL_COMMON_INTERFACE_LOOKUP_IMPL (dbe::models::subtree_proxy)
 
 MODEL_COMMON_INTERFACE_CREATE_THAT_OBJ_IMPL (dbe::models::subtree_proxy)
 
 MODEL_COMMON_INTERFACE_DELETE_THAT_OBJ_IMPL (dbe::models::subtree_proxy)
 
 MODEL_COMMON_INTERFACE_RENAME_THAT_OBJ_IMPL (dbe::models::subtree_proxy)
 
 MODEL_COMMON_INTERFACE_UPDATE_THAT_OBJ_IMPL (dbe::models::subtree_proxy)
 

Function Documentation

◆ MODEL_COMMON_INTERFACE_CREATE_THAT_OBJ_IMPL()

MODEL_COMMON_INTERFACE_CREATE_THAT_OBJ_IMPL ( dbe::models::subtree_proxy )

Definition at line 246 of file subtreeproxy.cpp.

247{
248// TODO implement create object from signal for Subtreeproxymodel
249}

◆ MODEL_COMMON_INTERFACE_DELETE_THAT_OBJ_IMPL()

MODEL_COMMON_INTERFACE_DELETE_THAT_OBJ_IMPL ( dbe::models::subtree_proxy )

Definition at line 251 of file subtreeproxy.cpp.

252{
253 if ( index.isValid() )
254 {
255 this->removeRows ( index.row(), 1, index.parent() );
256 }
257}

◆ MODEL_COMMON_INTERFACE_LOOKUP_IMPL()

MODEL_COMMON_INTERFACE_LOOKUP_IMPL ( dbe::models::subtree_proxy )

Definition at line 223 of file subtreeproxy.cpp.

224{
225 if ( treenode * classnode = confaccessor::gethandler()->getnode (
226 QString::fromStdString ( obj.class_name() ) ) )
227 {
228
229 auto found = [&obj, classnode] ( int i )
230 {
231 return obj.UID() == classnode->GetChild ( i )->GetData ( 0 ).toString().toStdString();
232 };
233
234 int i = 0;
235 int const childs = classnode->ChildCount();
236
237 for ( ; i < childs and not found ( i ); ++i )
238 ;
239
240 return i == childs ? QModelIndex() : index ( i, 0, QModelIndex() );
241 }
242
243 return QModelIndex();
244}

◆ MODEL_COMMON_INTERFACE_RENAME_THAT_OBJ_IMPL()

MODEL_COMMON_INTERFACE_RENAME_THAT_OBJ_IMPL ( dbe::models::subtree_proxy )

Definition at line 259 of file subtreeproxy.cpp.

260{
261 //TODO implement rename object
262}

◆ MODEL_COMMON_INTERFACE_UPDATE_THAT_OBJ_IMPL()

MODEL_COMMON_INTERFACE_UPDATE_THAT_OBJ_IMPL ( dbe::models::subtree_proxy )

Definition at line 264 of file subtreeproxy.cpp.

265{
266// TODO implement update object from signal for Subtreeproxymodel
267}