DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
SchemaCustomFileModel.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/SchemaCustomFileModel.h to include/dbe/SchemaCustomFileModel.hpp).
5
6#ifndef CUSTOMFILEMODEL_H
7#define CUSTOMFILEMODEL_H
8
10#include <QAbstractTableModel>
11#include <QStringList>
12
13namespace dbse {
14
15class CustomFileModel : public QAbstractTableModel
16{
17 Q_OBJECT
18public:
19 explicit CustomFileModel(QStringList& Headers, QObject* parent = nullptr);
21 int rowCount(const QModelIndex& parent) const;
22 int columnCount(const QModelIndex& parent) const;
23 // Qt::ItemFlags flags ( const QModelIndex & index ) const;
24 QVariant headerData(int section, Qt::Orientation orientation, int role) const;
25 QVariant data(const QModelIndex& index, int role) const;
26 void setupModel();
27 QStringList getRowFromIndex(QModelIndex& index);
28
29private:
30 QStringList HeaderList;
31 QList<QStringList> Data;
32};
33
34} // namespace dbse
35#endif // CUSTOMFILEMODEL_H
QStringList getRowFromIndex(QModelIndex &index)
QVariant headerData(int section, Qt::Orientation orientation, int role) const
QVariant data(const QModelIndex &index, int role) const
int columnCount(const QModelIndex &parent) const
int rowCount(const QModelIndex &parent) const
CustomFileModel(QStringList &Headers, QObject *parent=nullptr)
Including Schema Editor.
Including QT Headers.