DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
SchemaCustomTableModel.hpp
Go to the documentation of this file.
1#ifndef CUSTOMTABLEMODEL_H
2#define CUSTOMTABLEMODEL_H
3
5#include <QAbstractTableModel>
6#include <QStringList>
7#include <QMimeData>
8
9namespace dbse
10{
11
12class CustomTableModel: public QAbstractTableModel
13{
14 Q_OBJECT
15public:
16 explicit CustomTableModel ( QStringList Headers, QObject * parent = nullptr );
18 int rowCount ( const QModelIndex & parent ) const;
19 int columnCount ( const QModelIndex & parent ) const;
20 Qt::ItemFlags flags ( const QModelIndex & index ) const;
21 QVariant headerData ( int section, Qt::Orientation orientation, int role ) const;
22 QVariant data ( const QModelIndex & index, int role ) const;
23 QStringList getRowFromIndex ( QModelIndex & index );
24 void setupModel();
26 QStringList mimeTypes() const;
27 QMimeData * mimeData ( const QModelIndexList & indexes ) const;
28private:
29 QStringList HeaderList;
30 QList<QList<QString>> Data;
31};
32
33} // namespace dbse
34#endif // CUSTOMTABLEMODEL_H
int rowCount(const QModelIndex &parent) const
QMimeData * mimeData(const QModelIndexList &indexes) const
QVariant data(const QModelIndex &index, int role) const
QVariant headerData(int section, Qt::Orientation orientation, int role) const
CustomTableModel(QStringList Headers, QObject *parent=nullptr)
int columnCount(const QModelIndex &parent) const
QStringList mimeTypes() const
Drag/Drop Handlers.
QList< QList< QString > > Data
Qt::ItemFlags flags(const QModelIndex &index) const
QStringList getRowFromIndex(QModelIndex &index)
Including QT Headers.