DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
subtreeproxy.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/subtreeproxy.h to include/dbe/subtreeproxy.hpp).
5
6#ifndef SUBTREEPROXYMODEL_H
7#define SUBTREEPROXYMODEL_H
8
10#include <QUuid>
11#include <QSortFilterProxyModel>
12
16
17#include <vector>
18#include "dbe/datahandler.hpp"
19
20namespace dbe
21{
22
23namespace models
24{
25
27 public QSortFilterProxyModel,
28 public TreeModelInterface,
29 public model_common_impl<subtree_proxy>,
30 public model_common_async_operations<subtree_proxy>
31{
32 Q_OBJECT
33
35
36public :
37
38 explicit subtree_proxy ( const QString & Name, const QStringList & Default,
39 QObject * parent = nullptr );
41
42 void ResetModel();
43
44 void check_view_type();
45
46 void LoadClasses();
47
48 treenode * getnode ( const QModelIndex & index ) const;
49
50protected:
51
52 bool filterAcceptsRow ( int source_row, const QModelIndex & source_parent ) const;
53
54 bool lessThan (
55 const QModelIndex & left, const QModelIndex & right ) const;
56
57private:
58 bool ApplyDefaultFilter ( int source_row, const QModelIndex & source_parent ) const;
59
60 bool ApplyUserFilter (
61 int source_row, const QModelIndex & source_parent ) const;
62
66
68
69private slots:
70 void slot_create_object ( QString const & src, dref const & obj );
71 void slot_remove_object ( QString const & src, dref const & obj );
72 void slot_update_object ( QString const & src, dref const & obj );
73 void slot_rename_object ( QString const & src, dref const & obj );
74
75};
76}
77// namespace models
78}// namespace dbe
79#endif // SUBTREEPROXYMODEL_H
MODEL_COMMON_TYPES_TOPLEVEL_DEFINITIONS model_common_async_operations()
treenode * getnode(const QModelIndex &index) const
void slot_create_object(QString const &src, dref const &obj)
bool lessThan(const QModelIndex &left, const QModelIndex &right) const
void slot_remove_object(QString const &src, dref const &obj)
bool ApplyDefaultFilter(int source_row, const QModelIndex &source_parent) const
void slot_update_object(QString const &src, dref const &obj)
void slot_rename_object(QString const &src, dref const &obj)
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
subtree_proxy(const QString &Name, const QStringList &Default, QObject *parent=nullptr)
Including DBE.
bool ApplyUserFilter(int source_row, const QModelIndex &source_parent) const
#define MODEL_COMMON_IMPL_REQ_DEF(classname)
Include QT Headers.
config_object_description dref