Worked started for the source tracing
[clinton/Virtual-Jaguar-Rx.git] / src / debugger / SourcesWin.h
1 //
2 // SourcesWin.h: Sources tracing window
3 //
4 // JPM = Jean-Paul Mari <djipi.mari@gmail.com>
5 //
6 // Who When What
7 // --- ---------- -------------------------------------------------------------
8 // JPM 08/23/2019 Created this file
9 //
10
11 #ifndef __SOURCESWIN_H__
12 #define __SOURCESWIN_H__
13
14 #include <QtWidgets>
15 //#include <stdint.h>
16
17 class SourceCWindow;
18
19 class SourcesWindow : public QWidget
20 {
21 Q_OBJECT
22
23 typedef struct S_SOURCESINFOS
24 {
25 int IndexTab;
26 char *Filename;
27 char **SourceText;
28 size_t NbLinesText[2];
29 size_t *NumLinesUsed;
30 size_t Language;
31 SourceCWindow *sourceCtab;
32 int CurrentNumLineSrc;
33 }
34 SourcesInfos;
35
36 public:
37 SourcesWindow(QWidget * parent = 0);
38 void Init(void);
39 void Close(void);
40 void Reset(void);
41 bool GetTraceStatus(void);
42 bool CheckChangeLine(void);
43
44 public slots:
45 void RefreshContents(void);
46 void SelectTab(const int);
47 void CloseTab(const int);
48
49 protected:
50 void keyPressEvent(QKeyEvent * e);
51 void CloseCurrentTab(void);
52
53 private:
54 QVBoxLayout *layout;
55 QTabWidget *sourcestabWidget;
56 SourcesInfos *sourcesinfostab;
57 size_t NbSourcesInfos;
58 size_t CurrentTab;
59 size_t OldCurrentNumLineSrc;
60 size_t OldCurrentTab;
61 int indexErrorTab;
62 SourceCWindow *sourceErrorTab;
63 };
64
65 #endif // __SOURCESWIN_H__