-
Notifications
You must be signed in to change notification settings - Fork 7
/
SC_vectorlistmodel.h
48 lines (39 loc) · 1.31 KB
/
SC_vectorlistmodel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef VECTORLISTMODEL_H
#define VECTORLISTMODEL_H
#include <QAbstractTableModel>
#include "globalHeader.h"
class vectorListModel : public QAbstractTableModel
{
Q_OBJECT
public:
explicit vectorListModel(QObject *parent = 0);
int rowCount(const QModelIndex &parent = QModelIndex()) const ;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
double data(int row, int col);
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
void setPointer(ParameterInstance * currPar);
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
void setData(int row, int col, double data);
bool setData(const QModelIndex & index, const QVariant & value, int role);
Qt::ItemFlags flags(const QModelIndex & /*index*/) const;
void emitDataChanged();
/*!
* \brief setAllData
* \param inList
* Add the batch data to the model
*/
void setAllData(QVector < QVector < double > > inList) {
list = inList;
}
void setAllDst(QVector < ParameterInstance * > inDsts) {
destinations = inDsts;
}
void moveIndex(int row);
int selectedData;
private:
QVector < QVector < double > > list;
QVector < ParameterInstance * > destinations;
signals:
public slots:
};
#endif // VECTORLISTMODEL_H