X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fmainwin.h;h=a29dbc6119343f2edd1f1a8fdf81e45a36bc84b4;hb=32f569e1bd09f5d7f07005d119f6408805106381;hp=fb07549119b5a447225d62a9596ffd32fcf31460;hpb=7611a21d2b36def66216598617d647acfc657e3e;p=virtualjaguar diff --git a/src/gui/mainwin.h b/src/gui/mainwin.h index fb07549..a29dbc6 100644 --- a/src/gui/mainwin.h +++ b/src/gui/mainwin.h @@ -1,7 +1,7 @@ // // mainwin.h: Header file // -// by James L. Hammons +// by James Hammons // (C) 2010 Underground Software // @@ -9,12 +9,21 @@ #define __MAINWIN_H__ //Hrm. uh??? I thought this wasn't the way to do this stuff...??? -#include +#include +#include "tom.h" + +#define RING_BUFFER_SIZE 32 // Forward declarations class GLWidget; class AboutWindow; +class HelpWindow; class FilePickerWindow; +class MemoryBrowserWindow; +class CPUBrowserWindow; +class OPBrowserWindow; +class M68KDasmBrowserWindow; +class RISCDasmBrowserWindow; class MainWin: public QMainWindow { @@ -22,14 +31,21 @@ class MainWin: public QMainWindow Q_OBJECT public: - MainWin(); +// MainWin(QString); + MainWin(bool); + void LoadFile(QString); + void SyncUI(void); protected: - void closeEvent(QCloseEvent * event); + void closeEvent(QCloseEvent *); + void keyPressEvent(QKeyEvent *); + void keyReleaseEvent(QKeyEvent *); private slots: void Open(void); + void Configure(void); void Timer(void); + void TogglePowerState(void); void ToggleRunState(void); void SetZoom100(void); void SetZoom200(void); @@ -38,29 +54,76 @@ class MainWin: public QMainWindow void SetPAL(void); void ToggleBlur(void); void ShowAboutWin(void); + void ShowHelpWin(void); void InsertCart(void); + void Unpause(void); + void LoadSoftware(QString); + void ToggleCDUsage(void); + void FrameAdvance(void); + void ToggleFullScreen(void); + + void ShowMemoryBrowserWin(void); + void ShowCPUBrowserWin(void); + void ShowOPBrowserWin(void); + void ShowM68KDasmBrowserWin(void); + void ShowRISCDasmBrowserWin(void); private: + void HandleKeys(QKeyEvent *, bool); + void HandleGamepads(void); + void SetFullScreen(bool state = true); void ResizeMainWindow(void); void ReadSettings(void); void WriteSettings(void); + void WriteUISettings(void); // public: GLWidget * videoWidget; AboutWindow * aboutWin; + HelpWindow * helpWin; FilePickerWindow * filePickWin; + MemoryBrowserWindow * memBrowseWin; + CPUBrowserWindow * cpuBrowseWin; + OPBrowserWindow * opBrowseWin; + M68KDasmBrowserWindow * m68kDasmBrowseWin; + RISCDasmBrowserWindow * riscDasmBrowseWin; QTimer * timer; bool running; int zoomLevel; - + bool powerButtonOn; + bool showUntunedTankCircuit; + public: + bool cartridgeLoaded; + private: + bool allowUnknownSoftware; + bool CDActive; +// bool alpineLoadSuccessful; + bool pauseForFileSelector; + bool loadAndGo; + bool keyHeld[8]; + bool fullScreen; + bool scannedSoftwareFolder; + public: + bool plzDontKillMyComputer; + uint32_t oldTimestamp; + uint32_t ringBufferPointer; + uint32_t ringBuffer[RING_BUFFER_SIZE]; + private: + QPoint mainWinPosition; +// QSize mainWinSize; + int lastEditedProfile; QMenu * fileMenu; QMenu * helpMenu; + QMenu * debugMenu; + QToolBar * toolbar; + QToolBar * debugbar; QActionGroup * zoomActs; QActionGroup * tvTypeActs; QAction * quitAppAct; QAction * powerAct; + QAction * pauseAct; QAction * x1Act; QAction * x2Act; QAction * x3Act; @@ -68,7 +131,23 @@ class MainWin: public QMainWindow QAction * palAct; QAction * blurAct; QAction * aboutAct; + QAction * helpAct; QAction * filePickAct; + QAction * configAct; + QAction * useCDAct; + QAction * frameAdvanceAct; + QAction * fullScreenAct; + + QAction * memBrowseAct; + QAction * cpuBrowseAct; + QAction * opBrowseAct; + QAction * m68kDasmBrowseAct; + QAction * riscDasmBrowseAct; + + QIcon powerGreen; + QIcon powerRed; + uint32_t testPattern[VIRTUAL_SCREEN_WIDTH * VIRTUAL_SCREEN_HEIGHT_PAL]; + uint32_t testPattern2[VIRTUAL_SCREEN_WIDTH * VIRTUAL_SCREEN_HEIGHT_PAL]; }; #endif // __MAINWIN_H__