DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
apps
SchemaEditor
SchemaCustomAttributeModel.cpp
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 src/SchemaEditor/SchemaCustomAttributeModel.cpp to
5
// apps/SchemaEditor/SchemaCustomAttributeModel.cpp).
6
7
#include "
dbe/SchemaCustomAttributeModel.hpp
"
8
9
using namespace
dunedaq::oks
;
10
11
dbse::CustomAttributeModel::CustomAttributeModel
(
OksClass
* ClassInfo, QStringList Headers,
bool
Derived)
12
:
CustomModelInterface
(Headers)
13
,
SchemaClass
(ClassInfo)
14
,
SchemaDerived
(Derived)
15
{
16
setupModel
();
17
}
18
19
void
20
dbse::CustomAttributeModel::setupModel
()
21
{
22
Data
.clear();
23
const
std::list<OksAttribute*>* AttributeList;
24
25
if
(
SchemaDerived
) {
26
AttributeList =
SchemaClass
->all_attributes();
27
}
else
{
28
AttributeList =
SchemaClass
->direct_attributes();
29
}
30
31
if
(AttributeList) {
32
for
(
OksAttribute
* Attribute : *AttributeList) {
33
QStringList Row;
34
Row.append(QString::fromStdString(Attribute->get_name()));
35
Row.append(QString::fromStdString(Attribute->get_type()));
36
Data
.append(Row);
37
}
38
}
39
}
40
41
dbse::CustomAttributeModel::~CustomAttributeModel
() =
default
;
SchemaCustomAttributeModel.hpp
dbse::CustomAttributeModel::SchemaClass
dunedaq::oks::OksClass * SchemaClass
Definition
SchemaCustomAttributeModel.hpp:24
dbse::CustomAttributeModel::~CustomAttributeModel
~CustomAttributeModel()
dbse::CustomAttributeModel::SchemaDerived
bool SchemaDerived
Definition
SchemaCustomAttributeModel.hpp:25
dbse::CustomAttributeModel::CustomAttributeModel
CustomAttributeModel(dunedaq::oks::OksClass *ClassInfo, QStringList Headers, bool Derived=false)
Definition
SchemaCustomAttributeModel.cpp:11
dbse::CustomAttributeModel::setupModel
void setupModel()
Definition
SchemaCustomAttributeModel.cpp:20
dbse::CustomModelInterface::CustomModelInterface
CustomModelInterface(QStringList Headers, QObject *parent=nullptr)
Including Schema Editor.
Definition
SchemaCustomModelInterface.cpp:12
dbse::CustomModelInterface::Data
QList< QStringList > Data
Definition
SchemaCustomModelInterface.hpp:31
dunedaq::oks::OksAttribute
OKS attribute class.
Definition
attribute.hpp:94
dunedaq::oks::OksClass
The OKS class.
Definition
class.hpp:223
dunedaq::oks
Definition
SchemaCommand.hpp:17
Generated on
for DUNE-DAQ by
1.18.0