-
Notifications
You must be signed in to change notification settings - Fork 0
/
cpuregistersdisplaymodel.h
31 lines (23 loc) · 909 Bytes
/
cpuregistersdisplaymodel.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
#ifndef CPUREGISTERSDISPLAYMODEL_H
#define CPUREGISTERSDISPLAYMODEL_H
#include <map>
#include <vector>
#include <string>
#include <QAbstractTableModel>
#include "processor.h"
class CPURegistersDisplayModel: public QAbstractTableModel
{
Q_OBJECT
std::map<std::string, std::string> registersData;
std::vector<std::string> registersList;
public:
CPURegistersDisplayModel(QObject *parent);
int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE ;
int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
void addRegister(std::string reg);
void updateRegister(std::string reg, uint64_t value);
void updateRegister(std::string reg, std::string value);
void updateAll(processor *cpu);
};
#endif // CPUREGISTERSDISPLAYMODEL_H