Line data Source code
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/SchemaCustomSubClassModel.cpp to
5 : // apps/SchemaEditor/SchemaCustomSubClassModel.cpp).
6 :
7 : #include "dbe/SchemaCustomSubClassModel.hpp"
8 :
9 : using namespace dunedaq::oks;
10 :
11 0 : dbse::CustomSubClassModel::CustomSubClassModel(OksClass* ClassInfo, QStringList Headers)
12 : : CustomModelInterface(Headers)
13 0 : , SchemaClass(ClassInfo)
14 : {
15 0 : setupModel();
16 0 : }
17 :
18 : void
19 0 : dbse::CustomSubClassModel::setupModel()
20 : {
21 0 : Data.clear();
22 :
23 0 : const OksClass::FList* allClasses = SchemaClass->all_sub_classes();
24 0 : if (allClasses != nullptr) {
25 0 : for (const OksClass* cl : *allClasses) {
26 0 : QStringList Row;
27 0 : Row.append(QString::fromStdString(cl->get_name()));
28 0 : Data.append(Row);
29 0 : }
30 : }
31 0 : }
32 :
33 0 : dbse::CustomSubClassModel::~CustomSubClassModel() = default;
|