DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dbse::CustomMethodModel Class Reference

#include <SchemaCustomMethodModel.hpp>

Inheritance diagram for dbse::CustomMethodModel:
[legend]
Collaboration diagram for dbse::CustomMethodModel:
[legend]

Public Member Functions

 CustomMethodModel (dunedaq::oks::OksClass *ClassInfo, QStringList Headers, bool Derived=false)
 
 ~CustomMethodModel ()
 
void setupModel ()
 
- Public Member Functions inherited from dbse::CustomModelInterface
 CustomModelInterface (QStringList Headers, QObject *parent=nullptr)
 Including Schema Editor.
 
 ~CustomModelInterface ()
 
int rowCount (const QModelIndex &parent) const
 
int columnCount (const QModelIndex &parent) const
 
Qt::ItemFlags flags (const QModelIndex &index) const
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const
 
QVariant data (const QModelIndex &index, int role) const
 
QStringList getRowFromIndex (QModelIndex &index)
 

Private Attributes

dunedaq::oks::OksClassSchemaClass
 
bool SchemaDerived
 

Additional Inherited Members

- Protected Attributes inherited from dbse::CustomModelInterface
QStringList HeaderList
 
QList< QStringList > Data
 

Detailed Description

Definition at line 15 of file SchemaCustomMethodModel.hpp.

Constructor & Destructor Documentation

◆ CustomMethodModel()

dbse::CustomMethodModel::CustomMethodModel ( dunedaq::oks::OksClass * ClassInfo,
QStringList Headers,
bool Derived = false )

Definition at line 5 of file SchemaCustomMethodModel.cpp.

7 : CustomModelInterface ( Headers ),
8 SchemaClass ( ClassInfo ),
9 SchemaDerived ( Derived )
10{
11 setupModel();
12}
dunedaq::oks::OksClass * SchemaClass
CustomModelInterface(QStringList Headers, QObject *parent=nullptr)
Including Schema Editor.

◆ ~CustomMethodModel()

dbse::CustomMethodModel::~CustomMethodModel ( )
default

Member Function Documentation

◆ setupModel()

void dbse::CustomMethodModel::setupModel ( )
virtual

Implements dbse::CustomModelInterface.

Definition at line 14 of file SchemaCustomMethodModel.cpp.

15{
16 Data.clear();
17 const std::list<OksMethod *> * MethodList;
18
19 if ( SchemaDerived )
20 {
21 MethodList = SchemaClass->all_methods();
22 }
23 else
24 {
25 MethodList = SchemaClass->direct_methods();
26 }
27
28 if ( MethodList )
29 {
30 for ( OksMethod * Method : *MethodList )
31 {
32 QStringList Row;
33 Row.append ( QString::fromStdString ( Method->get_name() ) );
34 Data.append ( Row );
35 }
36 }
37}
const std::list< OksMethod * > * all_methods() const noexcept
Definition class.hpp:697
const std::list< OksMethod * > * direct_methods() const noexcept
Definition class.hpp:702
OKS method class.
Definition method.hpp:153

Member Data Documentation

◆ SchemaClass

dunedaq::oks::OksClass* dbse::CustomMethodModel::SchemaClass
private

Definition at line 22 of file SchemaCustomMethodModel.hpp.

◆ SchemaDerived

bool dbse::CustomMethodModel::SchemaDerived
private

Definition at line 23 of file SchemaCustomMethodModel.hpp.


The documentation for this class was generated from the following files: