DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
subtreeproxy.hpp
Go to the documentation of this file.
1#ifndef SUBTREEPROXYMODEL_H
2#define SUBTREEPROXYMODEL_H
3
5#include <QUuid>
6#include <QSortFilterProxyModel>
7
11
12#include <vector>
13#include "dbe/datahandler.hpp"
14
15namespace dbe
16{
17
18namespace models
19{
20
22 public QSortFilterProxyModel,
23 public TreeModelInterface,
24 public model_common_impl<subtree_proxy>,
25 public model_common_async_operations<subtree_proxy>
26{
27 Q_OBJECT
28
30
31public :
32
33 explicit subtree_proxy ( const QString & Name, const QStringList & Default,
34 QObject * parent = nullptr );
36
37 void ResetModel();
38
39 void check_view_type();
40
41 void LoadClasses();
42
43 treenode * getnode ( const QModelIndex & index ) const;
44
45protected:
46
47 bool filterAcceptsRow ( int source_row, const QModelIndex & source_parent ) const;
48
49 bool lessThan (
50 const QModelIndex & left, const QModelIndex & right ) const;
51
52private:
53 bool ApplyDefaultFilter ( int source_row, const QModelIndex & source_parent ) const;
54
55 bool ApplyUserFilter (
56 int source_row, const QModelIndex & source_parent ) const;
57
61
63
64private slots:
65 void slot_create_object ( QString const & src, dref const & obj );
66 void slot_remove_object ( QString const & src, dref const & obj );
67 void slot_update_object ( QString const & src, dref const & obj );
68 void slot_rename_object ( QString const & src, dref const & obj );
69
70};
71}
72// namespace models
73}// namespace dbe
74#endif // SUBTREEPROXYMODEL_H
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.