DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TreeModelInterface.hpp File Reference
#include "dbe/Exceptions.hpp"
#include "dbe/treenode.hpp"
#include "conffwk/ConfigObject.hpp"
#include "conffwk/Configuration.hpp"
#include "conffwk/Schema.hpp"
#include <QModelIndex>
#include <algorithm>
#include <vector>
Include dependency graph for TreeModelInterface.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  dbe::TreeModelInterface

Namespaces

namespace  dbe
 Include QT Headers.

Macros

#define TREEMODEL_REMOVE_ROWS_DEF(classname)

Macro Definition Documentation

◆ TREEMODEL_REMOVE_ROWS_DEF

#define TREEMODEL_REMOVE_ROWS_DEF ( classname)
Value:
bool classname::removeRows(int row, int count, QModelIndex const& parent) \
{ \
\
assert(count > 0); \
\
int const last = row + count - 1; \
emit beginRemoveRows(parent, row, last); \
for (int current = last; current != row - 1; --current) { \
QModelIndex src_index = this->mapToSource(index(current, parent.column(), parent)); \
treenode* element = this->getnode(src_index); \
\
if (element != nullptr) { \
treenode* element_parent = element->GetParent(); \
if (element_parent != nullptr) { \
element_parent->RemoveChild(element); \
} \
} else { \
return false; \
} \
} \
emit endRemoveRows(); \
return true; \
}

Definition at line 32 of file TreeModelInterface.hpp.