DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
include
dbe
treeselection.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/treeselection.h to include/dbe/treeselection.hpp).
5
6
#ifndef TREESELECTIONMODEL_H
7
#define TREESELECTIONMODEL_H
8
9
#include "
dbe/TreeModelInterface.hpp
"
10
#include "
dbe/dbcontroller.hpp
"
11
#include "
dbe/model_common_interface.hpp
"
12
#include "
dbe/treenode.hpp
"
13
14
#include "
conffwk/ConfigObject.hpp
"
15
16
#include <QSortFilterProxyModel>
17
#include <QUuid>
18
19
namespace
dbe
{
20
namespace
models
{
21
22
class
treeselection
23
:
public
QSortFilterProxyModel
24
,
public
TreeModelInterface
25
,
public
model_common_impl
<treeselection>
26
,
public
model_common_async_operations
<treeselection>
27
{
28
Q_OBJECT
29
30
MODEL_COMMON_IMPL_REQ_DEF
(
treeselection
)
31
32
public
:
33
typedef
treenode
type_datum
;
34
35
enum
FilterType
36
{
37
RegExpFilterType
= 1,
38
ObjectFilterType
= 2
39
};
40
41
~treeselection
();
42
43
explicit
treeselection
(QObject* parent = 0);
44
45
type_datum
*
getnode
(type_index
const
& index)
const override
;
46
47
void
fetchMore
(type_index
const
& index);
48
49
bool
hasChildren
(type_index
const
& index)
const
;
50
51
bool
canFetchMore
(type_index
const
& index)
const
;
52
53
void
SetFilterType
(
FilterType
Filter);
54
void
SetFilterRestrictionLevel
(
int
Levels);
55
void
SetQueryObjects
(std::vector<tref> Objects);
56
57
std::vector<dbe::tref>
GetQueryObjects
();
58
59
void
ResetQueryObjects
();
60
void
ResetModel
();
61
62
protected
:
63
bool
filterAcceptsRow
(
int
source_row,
const
QModelIndex& source_parent)
const
;
64
65
bool
lessThan
(
const
QModelIndex& left,
const
QModelIndex& right)
const
;
66
67
private
slots:
68
void
ToggleEmptyClasses
(
bool
HideLocal);
69
70
private
:
71
bool
AcceptItem
(
const
QModelIndex& SourceIndex,
int
LevelRestriction
)
const
;
72
73
bool
RegexpFilter
(
int
sourceRow,
const
QModelIndex& sourceParent)
const
;
74
75
bool
ObjectFilter
(
int
sourceRow,
const
QModelIndex& sourceParent)
const
;
76
77
int
AtDepth
(
const
QModelIndex& SourceParent)
const
;
78
79
FilterType
Type
;
80
int
LevelRestriction
;
81
82
bool
Hide
;
83
84
std::vector<tref>
QueryObjects
;
85
86
private
slots:
87
void
slot_create_object
(QString
const
& src,
dref
const
& obj);
88
void
slot_remove_object
(QString
const
& src,
dref
const
& obj);
89
void
slot_update_object
(QString
const
& src,
dref
const
& obj);
90
void
slot_rename_object
(QString
const
& src,
dref
const
& obj);
91
};
92
93
}
94
// namespace models
95
}
// namespace dbe
96
#endif
// TREESELECTIONMODEL_H
ConfigObject.hpp
TreeModelInterface.hpp
dbe::TreeModelInterface
Definition
TreeModelInterface.hpp:23
dbe::model_common_async_operations< treeselection >::model_common_async_operations
MODEL_COMMON_TYPES_TOPLEVEL_DEFINITIONS model_common_async_operations()
Definition
model_common_operations.hpp:125
dbe::model_common_impl
Definition
model_common_interface.hpp:204
dbe::models::treeselection
Definition
treeselection.hpp:27
dbe::models::treeselection::slot_update_object
void slot_update_object(QString const &src, dref const &obj)
dbe::models::treeselection::slot_remove_object
void slot_remove_object(QString const &src, dref const &obj)
dbe::models::treeselection::AtDepth
int AtDepth(const QModelIndex &SourceParent) const
Definition
treeselection.cpp:260
dbe::models::treeselection::SetFilterType
void SetFilterType(FilterType Filter)
Definition
treeselection.cpp:58
dbe::models::treeselection::Type
FilterType Type
Definition
treeselection.hpp:79
dbe::models::treeselection::canFetchMore
bool canFetchMore(type_index const &index) const
Definition
treeselection.cpp:34
dbe::models::treeselection::treeselection
treeselection(QObject *parent=0)
Including DBE.
Definition
treeselection.cpp:11
dbe::models::treeselection::QueryObjects
std::vector< tref > QueryObjects
Definition
treeselection.hpp:84
dbe::models::treeselection::FilterType
FilterType
Definition
treeselection.hpp:36
dbe::models::treeselection::ObjectFilterType
@ ObjectFilterType
Definition
treeselection.hpp:38
dbe::models::treeselection::RegExpFilterType
@ RegExpFilterType
Definition
treeselection.hpp:37
dbe::models::treeselection::Hide
bool Hide
Definition
treeselection.hpp:82
dbe::models::treeselection::hasChildren
bool hasChildren(type_index const &index) const
Definition
treeselection.cpp:23
dbe::models::treeselection::RegexpFilter
bool RegexpFilter(int sourceRow, const QModelIndex &sourceParent) const
Definition
treeselection.cpp:220
dbe::models::treeselection::type_datum
treenode type_datum
Definition
treeselection.hpp:33
dbe::models::treeselection::GetQueryObjects
std::vector< dbe::tref > GetQueryObjects()
Definition
treeselection.cpp:70
dbe::models::treeselection::filterAcceptsRow
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
Definition
treeselection.cpp:137
dbe::models::treeselection::getnode
type_datum * getnode(type_index const &index) const override
Definition
treeselection.cpp:76
dbe::models::treeselection::LevelRestriction
int LevelRestriction
Definition
treeselection.hpp:80
dbe::models::treeselection::ObjectFilter
bool ObjectFilter(int sourceRow, const QModelIndex &sourceParent) const
Definition
treeselection.cpp:231
dbe::models::treeselection::ToggleEmptyClasses
void ToggleEmptyClasses(bool HideLocal)
Definition
treeselection.cpp:274
dbe::models::treeselection::SetQueryObjects
void SetQueryObjects(std::vector< tref > Objects)
Definition
treeselection.cpp:64
dbe::models::treeselection::ResetModel
void ResetModel()
Definition
treeselection.cpp:130
dbe::models::treeselection::lessThan
bool lessThan(const QModelIndex &left, const QModelIndex &right) const
Definition
treeselection.cpp:168
dbe::models::treeselection::slot_create_object
void slot_create_object(QString const &src, dref const &obj)
dbe::models::treeselection::SetFilterRestrictionLevel
void SetFilterRestrictionLevel(int Levels)
Definition
treeselection.cpp:52
dbe::models::treeselection::ResetQueryObjects
void ResetQueryObjects()
Definition
treeselection.cpp:124
dbe::models::treeselection::AcceptItem
bool AcceptItem(const QModelIndex &SourceIndex, int LevelRestriction) const
Definition
treeselection.cpp:196
dbe::models::treeselection::fetchMore
void fetchMore(type_index const &index)
Definition
treeselection.cpp:45
dbe::models::treeselection::slot_rename_object
void slot_rename_object(QString const &src, dref const &obj)
dbe::treenode
Definition
treenode.hpp:19
dbcontroller.hpp
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:20
dbe
Include QT Headers.
Definition
BatchChangeWidget.hpp:16
dbe::dref
config_object_description dref
Definition
confobject_desc.hpp:90
treenode.hpp
Generated on
for DUNE-DAQ by
1.18.0