DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
treeselection.hpp
Go to the documentation of this file.
1#ifndef TREESELECTIONMODEL_H
2#define TREESELECTIONMODEL_H
3
4#include "dbe/treenode.hpp"
8
10
11#include <QSortFilterProxyModel>
12#include <QUuid>
13
14namespace dbe
15{
16namespace models
17{
18
20 public QSortFilterProxyModel,
21 public TreeModelInterface,
22 public model_common_impl<treeselection>,
23 public model_common_async_operations<treeselection>
24{
25 Q_OBJECT
26
28
29public:
30
32
37
39
40 explicit treeselection ( QObject * parent = 0 );
41
42
43 type_datum * getnode ( type_index const & index ) const override;
44
45 void fetchMore ( type_index const & index );
46
47 bool hasChildren ( type_index const & index ) const;
48
49 bool canFetchMore ( type_index const & index ) const;
50
51 void SetFilterType ( FilterType Filter );
52 void SetFilterRestrictionLevel ( int Levels );
53 void SetQueryObjects ( std::vector<tref> Objects );
54
55 std::vector<dbe::tref> GetQueryObjects();
56
57 void ResetQueryObjects();
58 void ResetModel();
59
60protected:
61 bool filterAcceptsRow ( int source_row, const QModelIndex & source_parent ) const;
62
63 bool lessThan ( const QModelIndex & left, const QModelIndex & right ) const;
64
65private slots:
66 void ToggleEmptyClasses ( bool HideLocal );
67
68private:
69 bool AcceptItem ( const QModelIndex & SourceIndex, int LevelRestriction ) const;
70
71 bool RegexpFilter ( int sourceRow, const QModelIndex & sourceParent ) const;
72
73 bool ObjectFilter ( int sourceRow, const QModelIndex & sourceParent ) const;
74
75 int AtDepth ( const QModelIndex & SourceParent ) const;
76
79
80 bool Hide;
81
82 std::vector<tref> QueryObjects;
83
84private slots:
85 void slot_create_object ( QString const & src, dref const & obj );
86 void slot_remove_object ( QString const & src, dref const & obj );
87 void slot_update_object ( QString const & src, dref const & obj );
88 void slot_rename_object ( QString const & src, dref const & obj );
89};
90
91}
92// namespace models
93}// namespace dbe
94#endif // TREESELECTIONMODEL_H
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.