-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathStackModeler.h
43 lines (39 loc) · 1.18 KB
/
StackModeler.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
#ifndef STACKMODELER_H
#define STACKMODELER_H
#include "TrainFlagged.h"
#include <QModelIndex>
#include <QStandardItemModel>
#include "modeler.h"
#include <QObject>
namespace Stack_Modulos {
enum StackColumn{
ADDRCOLUMN = 0,
OFFSETCOLUMN = 1,
NAMECOLUMN = 2,
VALUECOLUMN = 3
};
}
class StackModeler :public modeler
{
Q_OBJECT
int stackFrameColorCounter;
val_t * stackFrameColors;
public:
explicit StackModeler(QObject *parent = 0,bool* access= Q_NULLPTR);
QVariant data(const QModelIndex &index,int role) const override;
bool setData(const QModelIndex &index, const QVariant &value,
int role = Qt::EditRole) override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
QModelIndex index(int row, int column, const QModelIndex &parent) const;
QBrush stackFramePainter(mem_addr_t addr)const;
val_t colorHash(val_t val);
public slots:
void flip();
void setTopBig(bool ghost);
void stackFrameListener(mem_addr_t addr);
void increaseStackFrameCounter();
void decreaseStackFrameCounter();
private:
bool * bigTop = new bool(true);
};
#endif // STACKMODELER_H