DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
include
dbe
table.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/table.h to include/dbe/table.hpp).
5
6
#ifndef TABLEMODEL_H
7
#define TABLEMODEL_H
8
9
#include "
dbe/TableNode.hpp
"
10
#include "
dbe/dbcontroller.hpp
"
11
#include "
dbe/model_common_interface.hpp
"
12
13
#include "
conffwk/ConfigObject.hpp
"
14
15
#include <QAbstractTableModel>
16
17
#include <memory>
18
19
namespace
dbe
{
20
namespace
models
{
21
class
table
22
:
public
QAbstractTableModel
23
,
public
model_common_impl
<table>
24
,
public
model_common_async_operations
<table>
25
{
26
Q_OBJECT
27
28
MODEL_COMMON_IMPL_REQ_DEF
(
table
)
29
30
public
:
31
typedef
TableNode
type_datum
;
32
33
explicit
table
(QObject* parent =
nullptr
);
34
~table
();
35
36
int
rowCount
(type_index
const
& parent)
const override
;
37
int
columnCount
(type_index
const
& parent)
const override
;
38
39
QVariant
data
(type_index
const
& index,
int
role)
const override
;
40
41
bool
setData
(type_index
const
& index,
const
QVariant& value,
int
role)
override
;
42
43
QVariant
headerData
(
int
section, Qt::Orientation orientation,
int
role)
const override
;
44
45
Qt::ItemFlags
flags
(type_index
const
& index)
const override
;
46
47
TableNode
*
getnode
(
const
QModelIndex& Index)
const
;
48
49
QStringList
mimeTypes
()
const override
;
50
51
Qt::DropActions
supportedDropActions
()
const override
;
52
53
bool
dropMimeData
(
const
QMimeData*
data
,
54
Qt::DropAction action,
55
int
row,
56
int
column,
57
type_index
const
& parent)
override
;
58
59
void
ResetModel
();
60
61
bool
BuildTableFromClass
(
const
QString& ClassName,
bool
BuildSubClasses =
false
);
62
63
bool
BuildTableFromObject
(QList<QStringList> BuildList);
64
65
bool
is_built
()
const
;
66
QString
get_class_name
()
const
;
67
68
tref
GetTableObject
(
int
ObjectIndex)
const
;
69
70
QList<dbe::dref>*
GetTableObjects
();
71
72
void
objectsUpdated
(
const
std::vector<dbe::dref>& objects);
73
74
private
:
75
bool
enabled
;
76
QString
this_class_name
;
77
dunedaq::conffwk::class_t
class_type_info
;
78
79
QStringList
this_headers
;
80
QList<dref>
this_objects
;
81
QList<QList<TableNode*>>
this_structure
;
82
87
void
reset
(QString
const
&);
88
94
void
setheader
(
dunedaq::conffwk::class_t
const
&);
95
96
QList<type_datum*>
createrow
(
treenode
const
*);
97
98
public
slots:
99
void
slot_data_dropped
(QMimeData
const
&, Qt::DropAction);
100
101
private
slots:
102
void
slot_create_object
(QString
const
& src,
dref
const
& obj);
103
void
slot_remove_object
(QString
const
& src,
dref
const
& obj);
104
void
slot_update_object
(QString
const
& src,
dref
const
& obj);
105
void
slot_rename_object
(QString
const
& src,
dref
const
& obj);
106
107
signals:
108
void
ResetTab
();
109
};
110
111
}
112
// namespace models
113
}
// namespace dbe
114
#endif
// TABLEMODEL_H
ConfigObject.hpp
TableNode.hpp
dbe::TableNode
Definition
TableNode.hpp:13
dbe::model_common_async_operations< table >::model_common_async_operations
MODEL_COMMON_TYPES_TOPLEVEL_DEFINITIONS model_common_async_operations()
Definition
model_common_operations.hpp:125
dbe::model_common_impl
Definition
model_common_interface.hpp:204
dbe::models::table::type_datum
TableNode type_datum
Definition
table.hpp:31
dbe::models::table::table
table(QObject *parent=nullptr)
Including QT Headers.
Definition
table.cpp:23
dbe::models::table::createrow
QList< type_datum * > createrow(treenode const *)
Definition
table.cpp:293
dbe::models::table::class_type_info
dunedaq::conffwk::class_t class_type_info
Definition
table.hpp:77
dbe::models::table::getnode
TableNode * getnode(const QModelIndex &Index) const
Definition
table.cpp:442
dbe::models::table::reset
void reset(QString const &)
Definition
table.cpp:354
dbe::models::table::dropMimeData
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, type_index const &parent) override
Definition
table.cpp:204
dbe::models::table::GetTableObjects
QList< dbe::dref > * GetTableObjects()
Definition
table.cpp:436
dbe::models::table::ResetTab
void ResetTab()
dbe::models::table::supportedDropActions
Qt::DropActions supportedDropActions() const override
Definition
table.cpp:190
dbe::models::table::rowCount
int rowCount(type_index const &parent) const override
Definition
table.cpp:33
dbe::models::table::mimeTypes
QStringList mimeTypes() const override
Definition
table.cpp:196
dbe::models::table::setheader
void setheader(dunedaq::conffwk::class_t const &)
Definition
table.cpp:368
dbe::models::table::data
QVariant data(type_index const &index, int role) const override
Definition
table.cpp:53
dbe::models::table::BuildTableFromObject
bool BuildTableFromObject(QList< QStringList > BuildList)
Definition
table.cpp:388
dbe::models::table::is_built
bool is_built() const
Definition
table.cpp:418
dbe::models::table::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Definition
table.cpp:156
dbe::models::table::slot_remove_object
void slot_remove_object(QString const &src, dref const &obj)
dbe::models::table::enabled
bool enabled
Definition
table.hpp:75
dbe::models::table::slot_rename_object
void slot_rename_object(QString const &src, dref const &obj)
dbe::models::table::flags
Qt::ItemFlags flags(type_index const &index) const override
Definition
table.cpp:175
dbe::models::table::setData
bool setData(type_index const &index, const QVariant &value, int role) override
Definition
table.cpp:122
dbe::models::table::get_class_name
QString get_class_name() const
Definition
table.cpp:424
dbe::models::table::this_headers
QStringList this_headers
Definition
table.hpp:79
dbe::models::table::slot_update_object
void slot_update_object(QString const &src, dref const &obj)
dbe::models::table::this_structure
QList< QList< TableNode * > > this_structure
Definition
table.hpp:81
dbe::models::table::this_class_name
QString this_class_name
Definition
table.hpp:76
dbe::models::table::slot_create_object
void slot_create_object(QString const &src, dref const &obj)
dbe::models::table::slot_data_dropped
void slot_data_dropped(QMimeData const &, Qt::DropAction)
Definition
table.cpp:459
dbe::models::table::GetTableObject
tref GetTableObject(int ObjectIndex) const
Definition
table.cpp:412
dbe::models::table::columnCount
int columnCount(type_index const &parent) const override
Definition
table.cpp:43
dbe::models::table::ResetModel
void ResetModel()
Definition
table.cpp:452
dbe::models::table::BuildTableFromClass
bool BuildTableFromClass(const QString &ClassName, bool BuildSubClasses=false)
Definition
table.cpp:252
dbe::models::table::this_objects
QList< dref > this_objects
Definition
table.hpp:80
dbe::models::table::objectsUpdated
void objectsUpdated(const std::vector< dbe::dref > &objects)
Definition
table.cpp:486
dbe::treenode
Definition
treenode.hpp:19
dbcontroller.hpp
model_common_interface.hpp
MODEL_COMMON_IMPL_REQ_DEF
#define MODEL_COMMON_IMPL_REQ_DEF(classname)
Definition
model_common_interface_macros.hpp:30
dbe::models
Definition
datahandler.hpp:20
dbe
Include QT Headers.
Definition
BatchChangeWidget.hpp:16
dbe::tref
inner::configobject::tref tref
Definition
tref.hpp:36
dbe::dref
config_object_description dref
Definition
confobject_desc.hpp:90
dunedaq::conffwk::class_t
Definition
Schema.hpp:153
Generated on
for DUNE-DAQ by
1.18.0