DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
tableselection.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/tableselection.h to include/dbe/tableselection.hpp).
5
6#ifndef TABLESELECTIONMODEL_H
7#define TABLESELECTIONMODEL_H
8
10#include "dbe/table.hpp"
11
12#include <QSortFilterProxyModel>
14#include "dbe/TableNode.hpp"
16
17namespace dbe {
18namespace models {
19
21 : public QSortFilterProxyModel
22 , public model_common_impl<tableselection>
23 , public model_common_async_operations<tableselection>
24{
25 Q_OBJECT
26
28
29public:
31
33 {
36 };
37
38 tableselection(QObject* parent = 0);
39
40 void SetFilterType(FilterType Filter);
41
42 TableNode* getnode(const QModelIndex& index) const;
43
44 bool setData(const QModelIndex& index, const QVariant& value, int role);
45
46 void ResetModel();
47
48protected:
49 bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const;
50
51 bool lessThan(const QModelIndex& left, const QModelIndex& right) const;
52
53private:
56
57private slots:
58 void slot_create_object(QString const& src, dref const& obj);
59 void slot_remove_object(QString const& src, dref const& obj);
60 void slot_update_object(QString const& src, dref const& obj);
61 void slot_rename_object(QString const& src, dref const& obj);
62};
63
64}
65// namespace models
66} // namespace dbe
67#endif // TABLESELECTIONMODEL_H
MODEL_COMMON_TYPES_TOPLEVEL_DEFINITIONS model_common_async_operations()
TableNode * getnode(const QModelIndex &index) const
void SetFilterType(FilterType Filter)
bool setData(const QModelIndex &index, const QVariant &value, int role)
bool lessThan(const QModelIndex &left, const QModelIndex &right) const
tableselection(QObject *parent=0)
void slot_update_object(QString const &src, dref const &obj)
void slot_create_object(QString const &src, dref const &obj)
void slot_rename_object(QString const &src, dref const &obj)
void slot_remove_object(QString const &src, dref const &obj)
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
#define MODEL_COMMON_IMPL_REQ_DEF(classname)
Include QT Headers.
config_object_description dref