DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
apps
SchemaEditor
SchemaCustomAttributeModel.cpp
Go to the documentation of this file.
1
#include "
dbe/SchemaCustomAttributeModel.hpp
"
2
3
using namespace
dunedaq::oks
;
4
5
dbse::CustomAttributeModel::CustomAttributeModel
(
OksClass
* ClassInfo,
6
QStringList Headers,
7
bool
Derived )
8
:
CustomModelInterface
( Headers ),
9
SchemaClass
( ClassInfo ),
10
SchemaDerived
( Derived )
11
{
12
setupModel
();
13
}
14
15
void
dbse::CustomAttributeModel::setupModel
()
16
{
17
Data
.clear();
18
const
std::list<OksAttribute *> * AttributeList;
19
20
if
(
SchemaDerived
)
21
{
22
AttributeList =
SchemaClass
->all_attributes();
23
}
24
else
25
{
26
AttributeList =
SchemaClass
->direct_attributes();
27
}
28
29
if
( AttributeList )
30
{
31
for
(
OksAttribute
* Attribute : *AttributeList )
32
{
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:19
dbse::CustomAttributeModel::~CustomAttributeModel
~CustomAttributeModel()
dbse::CustomAttributeModel::SchemaDerived
bool SchemaDerived
Definition
SchemaCustomAttributeModel.hpp:20
dbse::CustomAttributeModel::CustomAttributeModel
CustomAttributeModel(dunedaq::oks::OksClass *ClassInfo, QStringList Headers, bool Derived=false)
Definition
SchemaCustomAttributeModel.cpp:5
dbse::CustomAttributeModel::setupModel
void setupModel()
Definition
SchemaCustomAttributeModel.cpp:15
dbse::CustomModelInterface::CustomModelInterface
CustomModelInterface(QStringList Headers, QObject *parent=nullptr)
Including Schema Editor.
Definition
SchemaCustomModelInterface.cpp:5
dbse::CustomModelInterface::Data
QList< QStringList > Data
Definition
SchemaCustomModelInterface.hpp:26
dunedaq::oks::OksAttribute
OKS attribute class.
Definition
attribute.hpp:102
dunedaq::oks::OksClass
The OKS class.
Definition
class.hpp:200
dunedaq::oks
Definition
OksConfiguration.hpp:17
Generated on
for DUNE-DAQ by
1.16.1