28 lines
716 B
C++
28 lines
716 B
C++
#ifndef CURRENTTABLEMODEL_H
|
|
#define CURRENTTABLEMODEL_H
|
|
|
|
#include <QAbstractTableModel>
|
|
|
|
class CurrentTableModel : public QAbstractTableModel
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit CurrentTableModel(QObject* parent = nullptr);
|
|
~CurrentTableModel();
|
|
|
|
Q_INVOKABLE void setCurrentData(const QVariantList& data);
|
|
void setCurrentData(const QList<QList<float>>& data);
|
|
|
|
int rowCount(const QModelIndex& = QModelIndex()) const override;
|
|
int columnCount(const QModelIndex& = QModelIndex()) const override;
|
|
|
|
QVariant data(const QModelIndex& index, int role) const override;
|
|
QHash<int, QByteArray> roleNames() const override;
|
|
|
|
private:
|
|
QList<QList<float>> data_;
|
|
};
|
|
|
|
#endif // CURRENTTABLEMODEL_H
|