Commit | Line | Data |
---|---|---|
0203b5fd JPM |
1 | //\r |
2 | // mainwin.h: Header file\r | |
3 | //\r | |
4 | // by James Hammons\r | |
5 | // (C) 2010 Underground Software\r | |
6 | //\r | |
7 | \r | |
8 | #ifndef __MAINWIN_H__\r | |
9 | #define __MAINWIN_H__\r | |
10 | \r | |
11 | //Hrm. uh??? I thought this wasn't the way to do this stuff...???\r | |
12 | #include <QtWidgets>\r | |
13 | #include "tom.h"\r | |
14 | \r | |
15 | #define RING_BUFFER_SIZE 32\r | |
16 | \r | |
a4e46c05 | 17 | // Main windows\r |
0203b5fd JPM |
18 | class GLWidget;\r |
19 | class VideoWindow;\r | |
20 | class AboutWindow;\r | |
21 | class HelpWindow;\r | |
22 | class FilePickerWindow;\r | |
a2dfb8e5 | 23 | //class VideoOutputWindow;\r |
0203b5fd JPM |
24 | class DasmWindow;\r |
25 | class m68KDasmWindow;\r | |
26 | class GPUDasmWindow;\r | |
27 | class DSPDasmWindow;\r | |
28 | class EmuStatusWindow;\r | |
a4e46c05 JPM |
29 | \r |
30 | // Alpine\r | |
31 | class MemoryBrowserWindow;\r | |
32 | class StackBrowserWindow;\r | |
33 | class CPUBrowserWindow;\r | |
34 | class OPBrowserWindow;\r | |
35 | class M68KDasmBrowserWindow;\r | |
36 | class RISCDasmBrowserWindow;\r | |
37 | \r | |
38 | // Debugger\r | |
0203b5fd JPM |
39 | class AllWatchBrowserWindow;\r |
40 | class LocalBrowserWindow;\r | |
a4e46c05 | 41 | class CallStackBrowserWindow;\r |
0203b5fd JPM |
42 | class HeapAllocatorBrowserWindow;\r |
43 | class Memory1BrowserWindow;\r | |
44 | class BrkWindow;\r | |
45 | class ExceptionVectorTableBrowserWindow;\r | |
46 | \r | |
a4e46c05 | 47 | \r |
0203b5fd JPM |
48 | class MainWin: public QMainWindow\r |
49 | {\r | |
50 | // All Qt apps require this macro for signal/slot functionality to work\r | |
51 | Q_OBJECT\r | |
52 | \r | |
53 | public:\r | |
54 | // MainWin(QString);\r | |
55 | MainWin(bool);\r | |
56 | void LoadFile(QString);\r | |
57 | void SyncUI(void);\r | |
a4e46c05 JPM |
58 | void DebuggerRefreshWindows(void);\r |
59 | void DebuggerResetWindows(void);\r | |
0203b5fd JPM |
60 | void RefreshAlpineWindows(void);\r |
61 | \r | |
62 | protected:\r | |
63 | void closeEvent(QCloseEvent *);\r | |
64 | void keyPressEvent(QKeyEvent *);\r | |
65 | void keyReleaseEvent(QKeyEvent *);\r | |
66 | \r | |
67 | private slots:\r | |
68 | void Open(void);\r | |
69 | void Configure(void);\r | |
70 | void Timer(void);\r | |
71 | void TogglePowerState(void);\r | |
72 | void ToggleRunState(void);\r | |
73 | void SetZoom100(void);\r | |
74 | void SetZoom200(void);\r | |
75 | void SetZoom300(void);\r | |
76 | void SetNTSC(void);\r | |
77 | void SetPAL(void);\r | |
78 | void ToggleBlur(void);\r | |
79 | void ShowAboutWin(void);\r | |
80 | void ShowHelpWin(void);\r | |
81 | void InsertCart(void);\r | |
82 | void Unpause(void);\r | |
83 | void LoadSoftware(QString);\r | |
84 | void ToggleCDUsage(void);\r | |
85 | void FrameAdvance(void);\r | |
0203b5fd | 86 | void ToggleFullScreen(void);\r |
a4e46c05 | 87 | void ShowEmuStatusWin(void);\r |
25251f31 | 88 | void MakeScreenshot(void);\r |
a4e46c05 JPM |
89 | // Debugger\r |
90 | void DebuggerTraceStepOver(void);\r | |
91 | void DebuggerTraceStepInto(void);\r | |
92 | void DebuggerRestart(void);\r | |
93 | void ShowAllWatchBrowserWin(void);\r | |
94 | void ShowLocalBrowserWin(void);\r | |
95 | void ShowCallStackBrowserWin(void);\r | |
96 | void ShowHeapAllocatorBrowserWin(void);\r | |
97 | void ShowMemory1BrowserWin(int NumWin);\r | |
98 | void ShowExceptionVectorTableBrowserWin(void);\r | |
0203b5fd | 99 | void NewBreakpointFunction(void);\r |
a4e46c05 JPM |
100 | void ShowVideoOutputWin(void);\r |
101 | void ShowDasmWin(void);\r | |
102 | // Alpine\r | |
0203b5fd JPM |
103 | void ShowMemoryBrowserWin(void);\r |
104 | void ShowStackBrowserWin(void);\r | |
105 | void ShowCPUBrowserWin(void);\r | |
106 | void ShowOPBrowserWin(void);\r | |
107 | void ShowM68KDasmBrowserWin(void);\r | |
108 | void ShowRISCDasmBrowserWin(void);\r | |
0203b5fd JPM |
109 | \r |
110 | private:\r | |
111 | void HandleKeys(QKeyEvent *, bool);\r | |
112 | void HandleGamepads(void);\r | |
113 | void SetFullScreen(bool state = true);\r | |
114 | void ResizeMainWindow(void);\r | |
115 | void ReadUISettings(void);\r | |
116 | void ReadSettings(void);\r | |
117 | void WriteSettings(void);\r | |
118 | void WriteUISettings(void);\r | |
119 | \r | |
a4e46c05 | 120 | private:\r |
25251f31 | 121 | GLWidget *videoWidget;\r |
0203b5fd JPM |
122 | QMdiArea *mainWindowCentrale;\r |
123 | QMdiSubWindow *VideoOutputWindowCentrale;\r | |
124 | AboutWindow * aboutWin;\r | |
125 | HelpWindow * helpWin;\r | |
126 | FilePickerWindow * filePickWin;\r | |
127 | EmuStatusWindow * emuStatusWin;\r | |
128 | MemoryBrowserWindow * memBrowseWin;\r | |
129 | StackBrowserWindow * stackBrowseWin;\r | |
130 | CPUBrowserWindow * cpuBrowseWin;\r | |
131 | OPBrowserWindow * opBrowseWin;\r | |
132 | M68KDasmBrowserWindow * m68kDasmBrowseWin;\r | |
133 | RISCDasmBrowserWindow * riscDasmBrowseWin;\r | |
a2dfb8e5 | 134 | //VideoOutputWindow * VideoOutputWin;\r |
a4e46c05 JPM |
135 | AllWatchBrowserWindow *allWatchBrowseWin;\r |
136 | LocalBrowserWindow *LocalBrowseWin;\r | |
137 | CallStackBrowserWindow *CallStackBrowseWin;\r | |
0203b5fd JPM |
138 | ExceptionVectorTableBrowserWindow *exceptionvectortableBrowseWin;\r |
139 | HeapAllocatorBrowserWindow *heapallocatorBrowseWin;\r | |
a4e46c05 | 140 | Memory1BrowserWindow **mem1BrowseWin;\r |
0203b5fd JPM |
141 | DasmWindow * DasmWin;\r |
142 | QTabWidget *dasmtabWidget;\r | |
143 | //QDockWidget *dasmtabWidget;\r | |
144 | m68KDasmWindow *m68kDasmWin;\r | |
145 | GPUDasmWindow *GPUDasmWin;\r | |
146 | DSPDasmWindow *DSPDasmWin;\r | |
147 | BrkWindow *brkWin;\r | |
148 | QTimer * timer;\r | |
149 | bool running;\r | |
150 | int zoomLevel;\r | |
151 | bool powerButtonOn;\r | |
152 | bool showUntunedTankCircuit;\r | |
a4e46c05 | 153 | \r |
0203b5fd JPM |
154 | public:\r |
155 | bool cartridgeLoaded;\r | |
a4e46c05 | 156 | \r |
0203b5fd JPM |
157 | private:\r |
158 | bool allowUnknownSoftware;\r | |
159 | bool CDActive;\r | |
160 | // bool alpineLoadSuccessful;\r | |
161 | bool pauseForFileSelector;\r | |
162 | bool loadAndGo;\r | |
163 | bool keyHeld[8];\r | |
164 | bool fullScreen;\r | |
165 | bool scannedSoftwareFolder;\r | |
a4e46c05 | 166 | \r |
0203b5fd JPM |
167 | public:\r |
168 | bool plzDontKillMyComputer;\r | |
169 | uint32_t oldTimestamp;\r | |
170 | uint32_t ringBufferPointer;\r | |
171 | uint32_t ringBuffer[RING_BUFFER_SIZE];\r | |
a4e46c05 | 172 | \r |
0203b5fd JPM |
173 | private:\r |
174 | QPoint mainWinPosition;\r | |
175 | // QSize mainWinSize;\r | |
176 | int lastEditedProfile;\r | |
177 | QMenu * fileMenu;\r | |
178 | QMenu * helpMenu;\r | |
179 | QMenu * debugMenu, * debugWindowsMenu, *debugWindowsBrowsesMenu, *debugWindowsWatchMenu, *debugWindowOutputMenu, *debugWindowExceptionMenu, *debugWindowsMemoryMenu, *debugNewBreakpointMenu;\r | |
180 | QToolBar * toolbar;\r | |
181 | QToolBar * debugbar;\r | |
182 | QToolBar * debuggerbar;\r | |
183 | \r | |
184 | QActionGroup * zoomActs;\r | |
185 | QActionGroup * tvTypeActs;\r | |
186 | \r | |
187 | QAction * quitAppAct;\r | |
188 | QAction * powerAct;\r | |
189 | QAction * pauseAct;\r | |
190 | QAction * x1Act;\r | |
191 | QAction * x2Act;\r | |
192 | QAction * x3Act;\r | |
193 | QAction * ntscAct;\r | |
194 | QAction * palAct;\r | |
195 | QAction * blurAct;\r | |
196 | QAction * aboutAct;\r | |
197 | QAction * helpAct;\r | |
198 | QAction * filePickAct;\r | |
199 | QAction * configAct;\r | |
200 | QAction * emustatusAct;\r | |
201 | QAction * useCDAct;\r | |
202 | QAction * frameAdvanceAct;\r | |
203 | QAction *traceStepOverAct;\r | |
204 | QAction *traceStepIntoAct;\r | |
205 | QAction *restartAct;\r | |
206 | QAction * fullScreenAct;\r | |
a4e46c05 | 207 | QAction *DasmAct;\r |
25251f31 | 208 | QAction *screenshotAct;;\r |
0203b5fd | 209 | \r |
a4e46c05 | 210 | // Alpine\r |
0203b5fd JPM |
211 | QAction *memBrowseAct;\r |
212 | QAction *stackBrowseAct;\r | |
213 | QAction *cpuBrowseAct;\r | |
214 | QAction *opBrowseAct;\r | |
215 | QAction *m68kDasmBrowseAct;\r | |
216 | QAction *riscDasmBrowseAct;\r | |
a4e46c05 JPM |
217 | \r |
218 | // Debugger\r | |
0203b5fd | 219 | QAction *VideoOutputAct;\r |
0203b5fd JPM |
220 | QAction *heapallocatorBrowseAct;\r |
221 | QAction *allWatchBrowseAct;\r | |
222 | QAction *LocalBrowseAct;\r | |
a4e46c05 | 223 | QAction *CallStackBrowseAct;\r |
0203b5fd JPM |
224 | QAction **mem1BrowseAct;\r |
225 | QAction *newBreakpointFunctionAct;\r | |
226 | QAction *exceptionVectorTableBrowseAct;\r | |
227 | \r | |
228 | QIcon powerGreen;\r | |
229 | QIcon powerRed;\r | |
230 | QIcon blur;\r | |
231 | uint32_t testPattern[VIRTUAL_SCREEN_WIDTH * VIRTUAL_SCREEN_HEIGHT_PAL];\r | |
232 | uint32_t testPattern2[VIRTUAL_SCREEN_WIDTH * VIRTUAL_SCREEN_HEIGHT_PAL];\r | |
233 | };\r | |
234 | \r | |
235 | #endif // __MAINWIN_H__\r |