Added File/Close menu options to Qt debugger, ppu viewer, and name table viewer.

This commit is contained in:
mjbudd77 2021-02-21 18:21:00 -05:00
parent 348c26d78c
commit 7c4e8cfeec
3 changed files with 36 additions and 3 deletions

View File

@ -88,7 +88,7 @@ ConsoleDebugger::ConsoleDebugger(QWidget *parent)
QFrame *frame;
QLabel *lbl;
QMenuBar *menuBar;
QMenu *debugMenu, *optMenu, *subMenu;
QMenu *fileMenu, *debugMenu, *optMenu, *subMenu;
QActionGroup *actGroup;
QAction *act;
float fontCharWidth;
@ -117,6 +117,17 @@ ConsoleDebugger::ConsoleDebugger(QWidget *parent)
//-----------------------------------------------------------------------
// Menu Start
//-----------------------------------------------------------------------
// File
fileMenu = menuBar->addMenu(tr("&File"));
// File -> Close
act = new QAction(tr("&Close"), this);
act->setShortcut(QKeySequence::Close);
act->setStatusTip(tr("Close Window"));
connect(act, SIGNAL(triggered()), this, SLOT(closeWindow(void)) );
fileMenu->addAction(act);
// Debug
debugMenu = menuBar->addMenu(tr("&Debug"));

View File

@ -123,7 +123,7 @@ ppuNameTableViewerDialog_t::ppuNameTableViewerDialog_t(QWidget *parent)
QGridLayout *grid;
QGroupBox *frame;
QMenuBar *menuBar;
QMenu *viewMenu, *colorMenu, *subMenu;
QMenu *fileMenu, *viewMenu, *colorMenu, *subMenu;
QAction *act;
QActionGroup *group;
QLabel *lbl;
@ -148,6 +148,17 @@ ppuNameTableViewerDialog_t::ppuNameTableViewerDialog_t(QWidget *parent)
//-----------------------------------------------------------------------
// Menu
//-----------------------------------------------------------------------
// File
fileMenu = menuBar->addMenu(tr("&File"));
// File -> Close
act = new QAction(tr("&Close"), this);
act->setShortcut(QKeySequence::Close);
act->setStatusTip(tr("Close Window"));
connect(act, SIGNAL(triggered()), this, SLOT(closeWindow(void)) );
fileMenu->addAction(act);
// View
viewMenu = menuBar->addMenu(tr("&View"));

View File

@ -117,7 +117,7 @@ ppuViewerDialog_t::ppuViewerDialog_t(QWidget *parent)
QHBoxLayout *hbox;
QGridLayout *grid;
QActionGroup *group;
QMenu *viewMenu, *colorMenu, *optMenu, *subMenu;
QMenu *fileMenu, *viewMenu, *colorMenu, *optMenu, *subMenu;
QAction *act;
char stmp[64];
int useNativeMenuBar;
@ -233,6 +233,17 @@ ppuViewerDialog_t::ppuViewerDialog_t(QWidget *parent)
//-----------------------------------------------------------------------
// Menu
//-----------------------------------------------------------------------
// File
fileMenu = menuBar->addMenu(tr("&File"));
// File -> Close
act = new QAction(tr("&Close"), this);
act->setShortcut(QKeySequence::Close);
act->setStatusTip(tr("Close Window"));
connect(act, SIGNAL(triggered()), this, SLOT(closeWindow(void)) );
fileMenu->addAction(act);
// View1
viewMenu = menuBar->addMenu(tr("View&1"));