Added a debug pause button to the Qt debugger tool bar.
This commit is contained in:
parent
e0bc4ab67b
commit
0a70f46a9f
Binary file not shown.
After ![]() (image error) Size: 464 B |
|
@ -15,6 +15,7 @@
|
||||||
<file>icons/camera.png</file>
|
<file>icons/camera.png</file>
|
||||||
<file>icons/reticle.png</file>
|
<file>icons/reticle.png</file>
|
||||||
<file>icons/debug-run.png</file>
|
<file>icons/debug-run.png</file>
|
||||||
|
<file>icons/debug-pause.png</file>
|
||||||
<file>icons/StepInto.png</file>
|
<file>icons/StepInto.png</file>
|
||||||
<file>icons/StepOver.png</file>
|
<file>icons/StepOver.png</file>
|
||||||
<file>icons/StepOut.png</file>
|
<file>icons/StepOut.png</file>
|
||||||
|
|
|
@ -530,7 +530,7 @@ QMenuBar *ConsoleDebugger::buildMenuBar(void)
|
||||||
debugMenu = menuBar->addMenu(tr("&Debug"));
|
debugMenu = menuBar->addMenu(tr("&Debug"));
|
||||||
|
|
||||||
// Debug -> Run
|
// Debug -> Run
|
||||||
act = new QAction(tr("&Run"), this);
|
dbgRunAct[0] = act = new QAction(tr("&Run"), this);
|
||||||
act->setShortcut(QKeySequence( tr("F5") ) );
|
act->setShortcut(QKeySequence( tr("F5") ) );
|
||||||
act->setStatusTip(tr("Run"));
|
act->setStatusTip(tr("Run"));
|
||||||
//act->setIcon( style()->standardIcon( QStyle::SP_MediaPlay ) );
|
//act->setIcon( style()->standardIcon( QStyle::SP_MediaPlay ) );
|
||||||
|
@ -539,6 +539,16 @@ QMenuBar *ConsoleDebugger::buildMenuBar(void)
|
||||||
|
|
||||||
debugMenu->addAction(act);
|
debugMenu->addAction(act);
|
||||||
|
|
||||||
|
// Debug -> Pause
|
||||||
|
dbgPauseAct[0] = act = new QAction(tr("&Pause"), this);
|
||||||
|
act->setShortcut(QKeySequence( tr("F6") ) );
|
||||||
|
act->setStatusTip(tr("Pause"));
|
||||||
|
//act->setIcon( style()->standardIcon( QStyle::SP_MediaPause ) );
|
||||||
|
act->setIcon( QIcon(":icons/debug-pause.png") );
|
||||||
|
connect( act, SIGNAL(triggered()), this, SLOT(debugStepIntoCB(void)) );
|
||||||
|
|
||||||
|
debugMenu->addAction(act);
|
||||||
|
|
||||||
// Debug -> Step Into
|
// Debug -> Step Into
|
||||||
act = new QAction(tr("Step &Into"), this);
|
act = new QAction(tr("Step &Into"), this);
|
||||||
act->setShortcut(QKeySequence( tr("F11") ) );
|
act->setShortcut(QKeySequence( tr("F11") ) );
|
||||||
|
@ -577,7 +587,7 @@ QMenuBar *ConsoleDebugger::buildMenuBar(void)
|
||||||
|
|
||||||
// Debug -> Run Line
|
// Debug -> Run Line
|
||||||
act = new QAction(tr("Run &Line"), this);
|
act = new QAction(tr("Run &Line"), this);
|
||||||
act->setShortcut(QKeySequence( tr("F6") ) );
|
act->setShortcut(QKeySequence( tr("F7") ) );
|
||||||
act->setStatusTip(tr("Run Line"));
|
act->setStatusTip(tr("Run Line"));
|
||||||
act->setIcon( QIcon(":icons/RunPpuScanline.png") );
|
act->setIcon( QIcon(":icons/RunPpuScanline.png") );
|
||||||
connect( act, SIGNAL(triggered()), this, SLOT(debugRunLineCB(void)) );
|
connect( act, SIGNAL(triggered()), this, SLOT(debugRunLineCB(void)) );
|
||||||
|
@ -586,7 +596,7 @@ QMenuBar *ConsoleDebugger::buildMenuBar(void)
|
||||||
|
|
||||||
// Debug -> Run 128 Lines
|
// Debug -> Run 128 Lines
|
||||||
act = new QAction(tr("Run &128 Lines"), this);
|
act = new QAction(tr("Run &128 Lines"), this);
|
||||||
act->setShortcut(QKeySequence( tr("F7") ) );
|
act->setShortcut(QKeySequence( tr("F8") ) );
|
||||||
act->setStatusTip(tr("Run 128 Lines"));
|
act->setStatusTip(tr("Run 128 Lines"));
|
||||||
act->setIcon( QIcon(":icons/RunPpuFrame.png") );
|
act->setIcon( QIcon(":icons/RunPpuFrame.png") );
|
||||||
connect( act, SIGNAL(triggered()), this, SLOT(debugRunLine128CB(void)) );
|
connect( act, SIGNAL(triggered()), this, SLOT(debugRunLine128CB(void)) );
|
||||||
|
@ -763,7 +773,7 @@ QToolBar *ConsoleDebugger::buildToolBar(void)
|
||||||
toolBar->addSeparator();
|
toolBar->addSeparator();
|
||||||
|
|
||||||
// Debug -> Run
|
// Debug -> Run
|
||||||
act = new QAction(tr("&Run (F5)"), this);
|
dbgRunAct[1] = act = new QAction(tr("&Run (F5)"), this);
|
||||||
//act->setShortcut(QKeySequence( tr("F5") ) );
|
//act->setShortcut(QKeySequence( tr("F5") ) );
|
||||||
act->setStatusTip(tr("Run"));
|
act->setStatusTip(tr("Run"));
|
||||||
//act->setIcon( style()->standardIcon( QStyle::SP_MediaPlay ) );
|
//act->setIcon( style()->standardIcon( QStyle::SP_MediaPlay ) );
|
||||||
|
@ -772,6 +782,16 @@ QToolBar *ConsoleDebugger::buildToolBar(void)
|
||||||
|
|
||||||
toolBar->addAction(act);
|
toolBar->addAction(act);
|
||||||
|
|
||||||
|
// Debug -> Pause
|
||||||
|
dbgPauseAct[1] = act = new QAction(tr("&Pause (F6)"), this);
|
||||||
|
//act->setShortcut(QKeySequence( tr("F6") ) );
|
||||||
|
act->setStatusTip(tr("Pause"));
|
||||||
|
//act->setIcon( style()->standardIcon( QStyle::SP_MediaPause ) );
|
||||||
|
act->setIcon( QIcon(":icons/debug-pause.png") );
|
||||||
|
connect( act, SIGNAL(triggered()), this, SLOT(debugStepIntoCB(void)) );
|
||||||
|
|
||||||
|
toolBar->addAction(act);
|
||||||
|
|
||||||
// Debug -> Step Into
|
// Debug -> Step Into
|
||||||
act = new QAction(tr("Step &Into (F11)"), this);
|
act = new QAction(tr("Step &Into (F11)"), this);
|
||||||
//act->setShortcut(QKeySequence( tr("F11") ) );
|
//act->setShortcut(QKeySequence( tr("F11") ) );
|
||||||
|
@ -802,8 +822,8 @@ QToolBar *ConsoleDebugger::buildToolBar(void)
|
||||||
toolBar->addSeparator();
|
toolBar->addSeparator();
|
||||||
|
|
||||||
// Debug -> Run Line
|
// Debug -> Run Line
|
||||||
act = new QAction(tr("Run &Line (F6)"), this);
|
act = new QAction(tr("Run &Line (F7)"), this);
|
||||||
//act->setShortcut(QKeySequence( tr("F6") ) );
|
//act->setShortcut(QKeySequence( tr("F7") ) );
|
||||||
act->setStatusTip(tr("Run Line"));
|
act->setStatusTip(tr("Run Line"));
|
||||||
act->setIcon( QIcon(":icons/RunPpuScanline.png") );
|
act->setIcon( QIcon(":icons/RunPpuScanline.png") );
|
||||||
connect( act, SIGNAL(triggered()), this, SLOT(debugRunLineCB(void)) );
|
connect( act, SIGNAL(triggered()), this, SLOT(debugRunLineCB(void)) );
|
||||||
|
@ -811,8 +831,8 @@ QToolBar *ConsoleDebugger::buildToolBar(void)
|
||||||
toolBar->addAction(act);
|
toolBar->addAction(act);
|
||||||
|
|
||||||
// Debug -> Run 128 Lines
|
// Debug -> Run 128 Lines
|
||||||
act = new QAction(tr("Run &128 Lines (F7)"), this);
|
act = new QAction(tr("Run &128 Lines (F8)"), this);
|
||||||
//act->setShortcut(QKeySequence( tr("F7") ) );
|
//act->setShortcut(QKeySequence( tr("F8") ) );
|
||||||
act->setStatusTip(tr("Run 128 Lines"));
|
act->setStatusTip(tr("Run 128 Lines"));
|
||||||
act->setIcon( QIcon(":icons/RunPpuFrame.png") );
|
act->setIcon( QIcon(":icons/RunPpuFrame.png") );
|
||||||
connect( act, SIGNAL(triggered()), this, SLOT(debugRunLine128CB(void)) );
|
connect( act, SIGNAL(triggered()), this, SLOT(debugRunLine128CB(void)) );
|
||||||
|
@ -4009,6 +4029,21 @@ void ConsoleDebugger::updatePeriodic(void)
|
||||||
emuStatLbl->setStyleSheet("background-color: green; color: white;");
|
emuStatLbl->setStyleSheet("background-color: green; color: white;");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( FCEUI_EmulationPaused() )
|
||||||
|
{
|
||||||
|
dbgRunAct[0]->setEnabled(true);
|
||||||
|
dbgRunAct[1]->setEnabled(true);
|
||||||
|
dbgPauseAct[0]->setEnabled(false);
|
||||||
|
dbgPauseAct[1]->setEnabled(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dbgRunAct[0]->setEnabled(false);
|
||||||
|
dbgRunAct[1]->setEnabled(false);
|
||||||
|
dbgPauseAct[0]->setEnabled(true);
|
||||||
|
dbgPauseAct[1]->setEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
if ( waitingAtBp && (lastBpIdx == BREAK_TYPE_CYCLES_EXCEED) )
|
if ( waitingAtBp && (lastBpIdx == BREAK_TYPE_CYCLES_EXCEED) )
|
||||||
{
|
{
|
||||||
cpuCyclesLbl1->setStyleSheet("background-color: blue; color: white;");
|
cpuCyclesLbl1->setStyleSheet("background-color: blue; color: white;");
|
||||||
|
|
|
@ -446,6 +446,8 @@ class ConsoleDebugger : public QDialog
|
||||||
//void keyReleaseEvent(QKeyEvent *event) override;
|
//void keyReleaseEvent(QKeyEvent *event) override;
|
||||||
|
|
||||||
//QTreeWidget *tree;
|
//QTreeWidget *tree;
|
||||||
|
QAction *dbgRunAct[2];
|
||||||
|
QAction *dbgPauseAct[2];
|
||||||
QToolBar *toolBar;
|
QToolBar *toolBar;
|
||||||
QScrollBar *vbar;
|
QScrollBar *vbar;
|
||||||
QScrollBar *hbar;
|
QScrollBar *hbar;
|
||||||
|
|
Loading…
Reference in New Issue