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 <QSortFilterProxyModel>
11#include <QUuid>
12
16
17#include "dbe/datahandler.hpp"
18#include <vector>
19
20namespace dbe {
21
22namespace models {
23
25 : public QSortFilterProxyModel
26 , public TreeModelInterface
27 , public model_common_impl<subtree_proxy>
28 , public model_common_async_operations<subtree_proxy>
29{
30 Q_OBJECT
31
33
34public:
35 explicit subtree_proxy(const QString& Name, const QStringList& Default, QObject* parent = nullptr);
37
38 void ResetModel();
39
40 void check_view_type();
41
42 void LoadClasses();
43
44 treenode* getnode(const QModelIndex& index) const;
45
46protected:
47 bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const;
48
49 bool lessThan(const QModelIndex& left, const QModelIndex& right) const;
50
51private:
52 bool ApplyDefaultFilter(int source_row, const QModelIndex& source_parent) const;
53
54 bool ApplyUserFilter(int source_row, const QModelIndex& source_parent) const;
55
59
61
62private slots:
63 void slot_create_object(QString const& src, dref const& obj);
64 void slot_remove_object(QString const& src, dref const& obj);
65 void slot_update_object(QString const& src, dref const& obj);
66 void slot_rename_object(QString const& src, dref const& obj);
67};
68}
69// namespace models
70} // namespace dbe
71#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