MCPcopy Create free account
hub / github.com/TASEmulators/fceux / buildMenuBar

Method buildMenuBar

src/drivers/Qt/ConsoleDebugger.cpp:381–923  ·  view source on GitHub ↗

----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

379}
380//----------------------------------------------------------------------------
381QMenuBar *ConsoleDebugger::buildMenuBar(void)
382{
383 QMenu *fileMenu, *viewMenu, *debugMenu,
384 *optMenu, *symMenu, *subMenu, *visMenu;
385 QActionGroup *actGroup;
386 QAction *act;
387 int opt, useNativeMenuBar=0;
388
389 QMenuBar *menuBar = new QMenuBar(this);
390
391 // This is needed for menu bar to show up on MacOS
392 g_config->getOption( "SDL.UseNativeMenuBar", &useNativeMenuBar );
393
394 menuBar->setNativeMenuBar( useNativeMenuBar ? true : false );
395
396 //-----------------------------------------------------------------------
397 // Menu Start
398 //-----------------------------------------------------------------------
399 // File
400 fileMenu = menuBar->addMenu(tr("&File"));
401
402 // File -> Import ld65 dbg
403 act = new QAction(tr("&Import ld65 dbg file"), this);
404 //act->setShortcut(QKeySequence::Close);
405 act->setStatusTip(tr("Import ld65 Debug File"));
406 connect(act, SIGNAL(triggered()), this, SLOT(ld65ImportDebug(void)) );
407
408 fileMenu->addAction(act);
409
410 // File -> Close
411 act = new QAction(tr("&Close"), this);
412 act->setShortcut(QKeySequence::Close);
413 act->setStatusTip(tr("Close Window"));
414 connect(act, SIGNAL(triggered()), this, SLOT(closeWindow(void)) );
415
416 fileMenu->addAction(act);
417
418 // View
419 viewMenu = menuBar->addMenu(tr("&View"));
420
421 // View -> Go to Address
422 act = new QAction(tr("&Go to Address"), this);
423 act->setShortcut( QKeySequence(tr("Ctrl+A") ));
424 act->setStatusTip(tr("&Go to Address"));
425 //act->setIcon( QIcon(":icons/find.png") );
426 act->setIcon( QIcon(":icons/JumpTarget.png") );
427 connect(act, SIGNAL(triggered()), this, SLOT(openGotoAddrDialog(void)) );
428
429 viewMenu->addAction(act);
430
431 // View -> Go to PC
432 act = new QAction(tr("Go to &PC"), this);
433 act->setShortcut( QKeySequence(tr("Ctrl+G") ));
434 act->setStatusTip(tr("Go to &PC"));
435 //act->setIcon( QIcon(":icons/JumpTarget.png") );
436 connect(act, SIGNAL(triggered()), this, SLOT(seekPCCB(void)) );
437
438 viewMenu->addAction(act);

Callers

nothing calls this directly

Calls 9

seekPCCBFunction · 0.85
debugRunCBFunction · 0.85
debugStepIntoCBFunction · 0.85
debugStepOutCBFunction · 0.85
debugStepOverCBFunction · 0.85
debugRunLineCBFunction · 0.85
debugRunLine128CBFunction · 0.85
getOptionMethod · 0.80
trFunction · 0.50

Tested by

no test coverage detected