DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
SchemaCustomModelInterface.hpp
Go to the documentation of this file.
1#ifndef CUSTOMMODELINTERFACE_H
2#define CUSTOMMODELINTERFACE_H
3
5#include <QAbstractTableModel>
6#include <QStringList>
7
8namespace dbse
9{
10
11class CustomModelInterface: public QAbstractTableModel
12{
13 Q_OBJECT
14public:
15 explicit CustomModelInterface ( QStringList Headers, QObject * parent = nullptr );
17 int rowCount ( const QModelIndex & parent ) const;
18 int columnCount ( const QModelIndex & parent ) const;
19 Qt::ItemFlags flags ( const QModelIndex & index ) const;
20 QVariant headerData ( int section, Qt::Orientation orientation, int role ) const;
21 QVariant data ( const QModelIndex & index, int role ) const;
22 QStringList getRowFromIndex ( QModelIndex & index );
23 virtual void setupModel() = 0;
24protected:
25 QStringList HeaderList;
26 QList<QStringList> Data;
27};
28
29} // namespace dbse
30#endif // CUSTOMMODELINTERFACE_H
QVariant data(const QModelIndex &index, int role) const
int rowCount(const QModelIndex &parent) const
QVariant headerData(int section, Qt::Orientation orientation, int role) const
QStringList getRowFromIndex(QModelIndex &index)
Qt::ItemFlags flags(const QModelIndex &index) const
virtual void setupModel()=0
CustomModelInterface(QStringList Headers, QObject *parent=nullptr)
Including Schema Editor.
int columnCount(const QModelIndex &parent) const
Including QT Headers.