mirror of
https://github.com/Indy970/QtHPConnect
synced 2024-12-29 10:23:24 +01:00
40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
#ifndef VARTABLEMODEL_H
|
|
#define VARTABLEMODEL_H
|
|
|
|
#include <QAbstractTableModel>
|
|
#include <QStringList>
|
|
|
|
#include "hpdata.h"
|
|
#include "abstractdata.h"
|
|
|
|
class varTableModel: public QAbstractTableModel
|
|
{
|
|
Q_OBJECT
|
|
|
|
|
|
private:
|
|
QObject * q_parent;
|
|
const static QStringList real_header;
|
|
const static QStringList complex_header;
|
|
hpCalcData * hpcalc =nullptr;
|
|
QString filename;
|
|
hp_DataType type;
|
|
AbstractData * dataobj =nullptr;
|
|
QList<QList<double>> dataarray;
|
|
void setup();
|
|
|
|
public:
|
|
varTableModel(QObject *parent = nullptr,
|
|
hpCalcData * dataStore =nullptr,
|
|
QString file = QStringLiteral(""),
|
|
hp_DataType dtype = HP_MAIN);
|
|
QModelIndex parent(const QModelIndex &index) const;
|
|
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
|
|
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;
|
|
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
|
~varTableModel();
|
|
};
|
|
|
|
#endif // VARTABLEMODEL_H
|