Search feature in the all watches window
[clinton/Virtual-Jaguar-Rx.git] / src / debugger / allwatchbrowser.h
1 //
2 // allwatchbrowser.h: All Watch
3 //
4 // by Jean-Paul Mari
5 //
6
7 #ifndef __ALLWATCHBROWSER_H__
8 #define __ALLWATCHBROWSER_H__
9
10 //#define AW_LAYOUTTEXTS // Use a layout with just texts
11 //#define AW_SUPPORTARRAY // Support array
12 //#define AW_SUPPORTSTRUCTURE // Support structure
13
14 #include <QtWidgets/QtWidgets>
15 #include <stdint.h>
16
17 // Error code definitions
18 #define AW_NOERROR 0x00
19 #define AW_ERROR 0x80
20 #define AW_WARNING 0x40
21 #define AW_NOALLWATCH (0x01 | AW_WARNING)
22
23
24 //
25 class AllWatchBrowserWindow: public QWidget
26 {
27 Q_OBJECT
28
29 //
30 typedef struct WatchInfo
31 {
32 #ifdef AW_LAYOUTTEXTS
33 size_t addr;
34 #endif
35 size_t TypeTag;
36 char *PtrVariableName;
37 char *PtrVariableBaseTypeName;
38 }S_WatchInfo;
39
40 public:
41 AllWatchBrowserWindow(QWidget *parent = 0);
42 ~AllWatchBrowserWindow(void);
43 void Reset(void);
44
45 public slots:
46 void RefreshContents(void);
47
48 protected:
49 void keyPressEvent(QKeyEvent *);
50
51 protected slots:
52 void SearchSymbol(void);
53 void SelectSearchSymbol(void);
54
55 private:
56 QVBoxLayout *layout;
57 #ifdef AW_LAYOUTTEXTS
58 QTextBrowser *text;
59 #else
60 QTableView *TableView;
61 QStandardItemModel *model;
62 #endif
63 QStatusBar *statusbar;
64 WatchInfo *PtrWatchInfo;
65 size_t NbWatch;
66 QPushButton *search;
67 QLineEdit* symbol;
68 size_t CurrentWatch;
69 };
70
71 #endif // __ALLWATCHBROWSER_H__