forked from jrosser/honeymon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetpointmodel.h
More file actions
36 lines (27 loc) · 853 Bytes
/
setpointmodel.h
File metadata and controls
36 lines (27 loc) · 853 Bytes
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
#ifndef SETPOINTMODEL_H
#define SETPOINTMODEL_H
#include <QAbstractTableModel>
class NodeNames;
class SetpointModel : public QAbstractTableModel
{
Q_OBJECT
public:
SetpointModel(QObject *parent);
int rowCount(const QModelIndex &parent = QModelIndex()) const ;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
void setNodeNameHelper(NodeNames *n);
public slots:
void newData(quint32 id0, quint32 id1, quint32 zone, float setpoint);
private:
struct record_t {
quint32 id1;
quint32 id2;
quint32 zone;
float setpoint;
};
NodeNames *nn;
QMap<QString, record_t> temperatureMap;
};
#endif // SETPOINTMODEL_H