DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
include
dbe
tree.hpp
Go to the documentation of this file.
1
// DUNE DAQ modification notice:
2
// This file has been modified from the original ATLAS dbe source for the DUNE DAQ project.
3
// Fork baseline commit: dbe-02-12-17 (2022-05-12).
4
// Renamed since fork: yes (from dbe/tree.h to include/dbe/tree.hpp).
5
6
#ifndef TREEMODEL_H
7
#define TREEMODEL_H
8
10
#include <QAbstractItemModel>
12
#include "
conffwk/ConfigObject.hpp
"
14
#include "
dbe/TreeModelInterface.hpp
"
15
#include "
dbe/model_common_interface.hpp
"
16
17
extern
char
const
*
const
dbe_lib_structure_version
;
18
19
namespace
dbe
20
{
21
class
treenode
;
22
23
namespace
models
24
{
25
26
class
tree
:
27
public
QAbstractItemModel,
28
public
TreeModelInterface
,
29
public
model_common_impl
<tree>,
30
public
model_common_async_operations
<tree>
31
{
32
Q_OBJECT
33
34
MODEL_COMMON_IMPL_REQ_DEF
(
tree
)
35
36
public :
37
typedef
dbe::treenode
type_datum
;
38
39
~tree
();
40
41
explicit
tree
(
const
QStringList & Headers, QObject *
parent
=
nullptr
);
42
43
44
type_index
index
(
int
row,
int
column,
const
type_index &
parent
)
const override
;
45
46
type_index
parent
(
const
type_index & child )
const override
;
47
48
type_index
mapToSource
( type_index
const
& i )
49
{
50
return
i;
51
}
52
53
int
rowCount
(
const
type_index &
parent
)
const override
;
54
55
int
columnCount
(
const
type_index &
parent
)
const override
;
56
57
Qt::ItemFlags
flags
(
const
type_index &
index
)
const override
;
58
59
QVariant
data
(
const
type_index &
index
,
int
role = Qt::DisplayRole )
const override
;
60
61
QVariant
headerData
(
int
section, Qt::Orientation orientation,
62
int
role = Qt::DisplayRole )
const override
;
63
64
bool
insertRows
(
int
position,
int
rows,
const
type_index &
parent
)
override
;
65
66
void
fetchMore
(
const
type_index &
parent
)
override
;
67
68
bool
canFetchMore
(
const
type_index &
parent
)
const override
;
69
70
bool
hasChildren
(
const
type_index &
parent
)
const override
;
71
72
bool
setData
(
const
type_index &
index
,
const
QVariant & value,
int
role )
override
;
73
74
QStringList
mimeTypes
()
const override
;
75
76
QMimeData *
mimeData
(
const
QModelIndexList & indexes )
const override
;
77
78
type_datum
*
getnode
(
const
type_index &
index
)
const override
;
79
80
type_index
getindex
(
treenode
* NodeItem,
81
type_index
const
& RootIndex = QModelIndex() )
const
;
82
83
void
ResetModel
();
84
85
void
objectsUpdated
(
const
std::vector<dbe::dref>& objects);
86
87
signals:
88
void
ObjectFile
( QString );
89
90
private
:
91
bool
abstract_classes_selectable
;
92
93
private
slots:
94
void
ToggleAbstractClassesSelectable
(
bool
);
95
96
void
slot_create_object
( QString
const
& src,
dref
const
& obj );
97
void
slot_remove_object
( QString
const
& src,
dref
const
& obj );
98
void
slot_update_object
( QString
const
& src,
dref
const
& obj );
99
void
slot_rename_object
( QString
const
& src,
dref
const
& obj );
100
};
101
102
}
103
// namespace models
104
}
// namespace dbe
105
#endif
// TREEMODEL_H
ConfigObject.hpp
TreeModelInterface.hpp
dbe::TreeModelInterface
Definition
TreeModelInterface.hpp:24
dbe::model_common_async_operations< tree >::model_common_async_operations
MODEL_COMMON_TYPES_TOPLEVEL_DEFINITIONS model_common_async_operations()
Definition
model_common_operations.hpp:124
dbe::model_common_impl
Definition
model_common_interface.hpp:209
dbe::models::tree::slot_create_object
void slot_create_object(QString const &src, dref const &obj)
dbe::models::tree::objectsUpdated
void objectsUpdated(const std::vector< dbe::dref > &objects)
Definition
tree.cpp:391
dbe::models::tree::fetchMore
void fetchMore(const type_index &parent) override
Definition
tree.cpp:220
dbe::models::tree::data
QVariant data(const type_index &index, int role=Qt::DisplayRole) const override
Definition
tree.cpp:121
dbe::models::tree::ResetModel
void ResetModel()
Definition
tree.cpp:315
dbe::models::tree::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Definition
tree.cpp:168
dbe::models::tree::type_datum
dbe::treenode type_datum
Definition
tree.hpp:37
dbe::models::tree::slot_rename_object
void slot_rename_object(QString const &src, dref const &obj)
dbe::models::tree::getindex
type_index getindex(treenode *NodeItem, type_index const &RootIndex=QModelIndex()) const
Definition
tree.cpp:291
dbe::models::tree::setData
bool setData(const type_index &index, const QVariant &value, int role) override
Definition
tree.cpp:245
dbe::models::tree::getnode
type_datum * getnode(const type_index &index) const override
Definition
tree.cpp:321
dbe::models::tree::index
type_index index(int row, int column, const type_index &parent) const override
Definition
tree.cpp:37
dbe::models::tree::canFetchMore
bool canFetchMore(const type_index &parent) const override
Definition
tree.cpp:209
dbe::models::tree::insertRows
bool insertRows(int position, int rows, const type_index &parent) override
Definition
tree.cpp:179
dbe::models::tree::abstract_classes_selectable
bool abstract_classes_selectable
Definition
tree.hpp:91
dbe::models::tree::ToggleAbstractClassesSelectable
void ToggleAbstractClassesSelectable(bool)
Definition
tree.cpp:385
dbe::models::tree::mimeTypes
QStringList mimeTypes() const override
Definition
tree.cpp:255
dbe::models::tree::hasChildren
bool hasChildren(const type_index &parent) const override
Definition
tree.cpp:234
dbe::models::tree::~tree
~tree()
Definition
tree.cpp:34
dbe::models::tree::slot_update_object
void slot_update_object(QString const &src, dref const &obj)
dbe::models::tree::columnCount
int columnCount(const type_index &parent) const override
Definition
tree.cpp:84
dbe::models::tree::parent
type_index parent(const type_index &child) const override
Definition
tree.cpp:53
dbe::models::tree::mimeData
QMimeData * mimeData(const QModelIndexList &indexes) const override
Definition
tree.cpp:262
dbe::models::tree::mapToSource
type_index mapToSource(type_index const &i)
Definition
tree.hpp:48
dbe::models::tree::ObjectFile
void ObjectFile(QString)
dbe::models::tree::tree
tree(const QStringList &Headers, QObject *parent=nullptr)
Definition
tree.cpp:18
dbe::models::tree::flags
Qt::ItemFlags flags(const type_index &index) const override
Definition
tree.cpp:98
dbe::models::tree::slot_remove_object
void slot_remove_object(QString const &src, dref const &obj)
dbe::models::tree::rowCount
int rowCount(const type_index &parent) const override
Definition
tree.cpp:68
dbe::treenode
Definition
treenode.hpp:20
model_common_interface.hpp
MODEL_COMMON_IMPL_REQ_DEF
#define MODEL_COMMON_IMPL_REQ_DEF(classname)
Definition
model_common_interface_macros.hpp:30
dbe::models
Definition
datahandler.hpp:22
dbe
Include QT Headers.
Definition
BatchChangeWidget.hpp:18
dbe::dref
config_object_description dref
Definition
confobject_desc.hpp:109
dbe_lib_structure_version
char const *const dbe_lib_structure_version
Including QT Headers.
Definition
tree.cpp:16
Generated on
for DUNE-DAQ by
1.17.0