Display the structure's members in the Local variables window
[clinton/Virtual-Jaguar-Rx.git] / src / debugger / localbrowser.h
1 //
2 // localbrowser.h: Local variables
3 //
4 // by Jean-Paul Mari
5 //
6
7 #ifndef __LOCALBROWSER_H__
8 #define __LOCALBROWSER_H__
9
10 //#define LOCAL_FONTS // Support for fonts modifications
11
12 #include <QtWidgets/QtWidgets>
13 #include <stdint.h>
14
15 // Error code definitions
16 #define LOCAL_NOERROR 0x00
17 #define LOCAL_WARNING 0x40
18 #define LOCAL_ERROR 0x80
19 #define LOCAL_NOLOCALS (0x01 | LOCAL_WARNING)
20
21 //
22 class LocalBrowserWindow: public QWidget
23 {
24 Q_OBJECT
25
26 //
27 typedef struct LocalInfo
28 {
29 size_t Adr;
30 char *PtrCPURegisterName;
31 void *PtrVariable;
32 }
33 S_LocalInfo;
34
35 public:
36 LocalBrowserWindow(QWidget *parent = 0);
37 ~LocalBrowserWindow(void);
38
39 public slots:
40 void RefreshContents(void);
41 bool UpdateInfos(void);
42
43 protected:
44 QList<QStandardItem *> prepareRow(void* Info);
45 void setValueRow(QStandardItem *Row, size_t Adr, char* Value, void* Info);
46 void keyPressEvent(QKeyEvent *);
47
48 private:
49 QVBoxLayout *layout;
50 QTreeView *TableView;
51 QStandardItemModel *model;
52 S_LocalInfo *LocalInfo;
53 QStatusBar *statusbar;
54 size_t NbLocal;
55 char *FuncName;
56 };
57
58 #endif // __LOCALBROWSER_H__