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