X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fgui%2Fmainwin.h;h=4263cb1cb2ad48e6607c58535cb59b1345128000;hb=1249f1ad7191432e9fb8b3162ebb1d66a94fdcb9;hp=a3a26cccf95b2ebb3624fa4d680a6f452dbc4476;hpb=e6b7d61963423b7f9cb4c6c24d2befca50328d4f;p=virtualjaguar diff --git a/src/gui/mainwin.h b/src/gui/mainwin.h index a3a26cc..4263cb1 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 // @@ -10,13 +10,20 @@ //Hrm. uh??? I thought this wasn't the way to do this stuff...??? #include +#include "tom.h" -// Forward declarations +#define RING_BUFFER_SIZE 32 +// Forward declarations class GLWidget; class AboutWindow; -//class EditWindow; -//class CharWindow; +class HelpWindow; +class FilePickerWindow; +class MemoryBrowserWindow; +class CPUBrowserWindow; +class OPBrowserWindow; +class M68KDasmBrowserWindow; +class RISCDasmBrowserWindow; class MainWin: public QMainWindow { @@ -24,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); @@ -40,27 +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,6 +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__