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/dbcontroller.hpp
"
10
#include "
dbe/TableNode.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
{
21
namespace
models
22
{
23
class
table
:
24
public
QAbstractTableModel,
25
public
model_common_impl
<table>,
26
public
model_common_async_operations
<table>
27
{
28
Q_OBJECT
29
30
MODEL_COMMON_IMPL_REQ_DEF
(
table
)
31
32
public :
33
34
typedef
TableNode
type_datum
;
35
36
explicit
table
( QObject * parent =
nullptr
);
37
~table
();
38
39
int
rowCount
( type_index
const
& parent )
const override
;
40
int
columnCount
( type_index
const
& parent )
const override
;
41
42
QVariant
data
( type_index
const
& index,
int
role )
const override
;
43
44
bool
setData
( type_index
const
& index,
const
QVariant & value,
int
role )
override
;
45
46
QVariant
headerData
(
int
section, Qt::Orientation orientation,
int
role )
const override
;
47
48
Qt::ItemFlags
flags
( type_index
const
& index )
const override
;
49
50
TableNode
*
getnode
(
const
QModelIndex & Index )
const
;
51
52
QStringList
mimeTypes
()
const override
;
53
54
Qt::DropActions
supportedDropActions
()
const override
;
55
56
bool
dropMimeData
(
const
QMimeData *
data
, Qt::DropAction action,
int
row,
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:14
dbe::model_common_async_operations< table >::model_common_async_operations
MODEL_COMMON_TYPES_TOPLEVEL_DEFINITIONS model_common_async_operations()
Definition
model_common_operations.hpp:124
dbe::model_common_impl
Definition
model_common_interface.hpp:209
dbe::models::table::type_datum
TableNode type_datum
Definition
table.hpp:34
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:319
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:481
dbe::models::table::reset
void reset(QString const &)
Definition
table.cpp:392
dbe::models::table::dropMimeData
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, type_index const &parent) override
Definition
table.cpp:217
dbe::models::table::GetTableObjects
QList< dbe::dref > * GetTableObjects()
Definition
table.cpp:476
dbe::models::table::ResetTab
void ResetTab()
dbe::models::table::supportedDropActions
Qt::DropActions supportedDropActions() const override
Definition
table.cpp:205
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:210
dbe::models::table::setheader
void setheader(dunedaq::conffwk::class_t const &)
Definition
table.cpp:406
dbe::models::table::data
QVariant data(type_index const &index, int role) const override
Definition
table.cpp:52
dbe::models::table::BuildTableFromObject
bool BuildTableFromObject(QList< QStringList > BuildList)
Definition
table.cpp:431
dbe::models::table::is_built
bool is_built() const
Definition
table.cpp:461
dbe::models::table::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Definition
table.cpp:166
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:189
dbe::models::table::~table
~table()
Definition
table.cpp:30
dbe::models::table::setData
bool setData(type_index const &index, const QVariant &value, int role) override
Definition
table.cpp:125
dbe::models::table::get_class_name
QString get_class_name() const
Definition
table.cpp:466
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_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:497
dbe::models::table::GetTableObject
tref GetTableObject(int ObjectIndex) const
Definition
table.cpp:456
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:491
dbe::models::table::BuildTableFromClass
bool BuildTableFromClass(const QString &ClassName, bool BuildSubClasses=false)
Definition
table.cpp:268
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:523
dbe::models::table::this_structure
QList< QList< TableNode * > > this_structure
Definition
table.hpp:81
dbe::treenode
Definition
treenode.hpp:20
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:22
dbe
Include QT Headers.
Definition
BatchChangeWidget.hpp:18
dbe::tref
inner::configobject::tref tref
Definition
tref.hpp:35
dbe::dref
config_object_description dref
Definition
confobject_desc.hpp:109
dunedaq::conffwk::class_t
Definition
Schema.hpp:162
Generated on
for DUNE-DAQ by
1.17.0