DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
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"
12#include "dbe/dbcontroller.hpp"
13
15
16#include <QSortFilterProxyModel>
17#include <QUuid>
18
19namespace dbe
20{
21namespace models
22{
23
25 public QSortFilterProxyModel,
26 public TreeModelInterface,
27 public model_common_impl<treeselection>,
28 public model_common_async_operations<treeselection>
29{
30 Q_OBJECT
31
33
34public:
35
37
42
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
65protected:
66 bool filterAcceptsRow ( int source_row, const QModelIndex & source_parent ) const;
67
68 bool lessThan ( const QModelIndex & left, const QModelIndex & right ) const;
69
70private slots:
71 void ToggleEmptyClasses ( bool HideLocal );
72
73private:
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
84
85 bool Hide;
86
87 std::vector<tref> QueryObjects;
88
89private 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
MODEL_COMMON_TYPES_TOPLEVEL_DEFINITIONS model_common_async_operations()
void slot_update_object(QString const &src, dref const &obj)
void slot_remove_object(QString const &src, dref const &obj)
int AtDepth(const QModelIndex &SourceParent) const
void SetFilterType(FilterType Filter)
bool canFetchMore(type_index const &index) const
treeselection(QObject *parent=0)
Including DBE.
std::vector< tref > QueryObjects
bool hasChildren(type_index const &index) const
bool RegexpFilter(int sourceRow, const QModelIndex &sourceParent) const
std::vector< dbe::tref > GetQueryObjects()
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
type_datum * getnode(type_index const &index) const override
bool ObjectFilter(int sourceRow, const QModelIndex &sourceParent) const
void ToggleEmptyClasses(bool HideLocal)
void SetQueryObjects(std::vector< tref > Objects)
bool lessThan(const QModelIndex &left, const QModelIndex &right) const
void slot_create_object(QString const &src, dref const &obj)
void SetFilterRestrictionLevel(int Levels)
bool AcceptItem(const QModelIndex &SourceIndex, int LevelRestriction) const
void fetchMore(type_index const &index)
void slot_rename_object(QString const &src, dref const &obj)
#define MODEL_COMMON_IMPL_REQ_DEF(classname)
Include QT Headers.
config_object_description dref