QtHPConnect/vartablemodel.h

32 lines
849 B
C
Raw Normal View History

2019-02-10 14:43:00 +01:00
#ifndef VARTABLEMODEL_H
#define VARTABLEMODEL_H
2019-02-10 14:32:15 +01:00
2019-02-10 14:43:00 +01:00
#include <QAbstractTableModel>
2019-02-10 14:32:15 +01:00
2019-03-02 20:20:23 +01:00
#include "hpdata.h"
#include "abstractdata.h"
2019-02-10 14:43:00 +01:00
class varTableModel: public QAbstractTableModel
2019-02-10 14:32:15 +01:00
{
2019-02-10 14:43:00 +01:00
Q_OBJECT
2019-03-02 20:20:23 +01:00
private:
hpCalcData * hpcalc =nullptr;
QString filename;
hp_DataType type;
AbstractData * dataobj =nullptr;
QList<QList<double>> dataarray;
void setup();
2019-02-10 14:32:15 +01:00
public:
2019-03-02 20:20:23 +01:00
varTableModel(QObject *parent = nullptr,
hpCalcData * dataStore =nullptr,
QString file = QStringLiteral(""),
hp_DataType dtype = HP_MAIN);
2019-02-10 14:43:00 +01:00
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
2019-02-10 14:32:15 +01:00
};
2019-02-10 14:43:00 +01:00
#endif // VARTABLEMODEL_H