m_pToolBar->addWidget(m_pPlayButton);\r
connect(m_pPlayButton, SIGNAL(clicked()), this, SLOT(onPlayButtonClicked()));\r
\r
+ m_pStepButton = new QToolButton(m_pToolBar);\r
+ m_pStepButton->setText("Step");\r
+ m_pStepButton->setEnabled(true);\r
+ m_pToolBar->addWidget(m_pStepButton);\r
+ connect(m_pStepButton, SIGNAL(clicked()), this, SLOT(onStepButtonClicked()));\r
+\r
m_pPauseButton = new QToolButton(m_pToolBar);\r
m_pPauseButton->setText("Pause");\r
m_pPauseButton->setEnabled(false);\r
pLayout->addWidget(m_pReplayWindow);\r
\r
connect(this, SIGNAL(PlayButtonClicked()), m_pWorker, SLOT(StartReplay()));\r
+ connect(this, SIGNAL(StepButtonClicked()), m_pWorker, SLOT(StepReplay()));\r
connect(this, SIGNAL(PauseButtonClicked()), m_pWorker, SLOT(PauseReplay()));\r
connect(this, SIGNAL(ContinueButtonClicked()), m_pWorker, SLOT(ContinueReplay()));\r
connect(this, SIGNAL(StopButtonClicked()), m_pWorker, SLOT(StopReplay()));\r
\r
// connect worker signals to widget actions\r
connect(m_pWorker, SIGNAL(ReplayStarted()), this, SLOT(slotReplayStarted()));\r
+ connect(m_pWorker, SIGNAL(ReplayStepped()), this, SLOT(slotReplayStepped()));\r
connect(m_pWorker, SIGNAL(ReplayPaused(uint64_t)), this, SLOT(slotReplayPaused(uint64_t)));\r
connect(m_pWorker, SIGNAL(ReplayContinued()), this, SLOT(slotReplayContinued()));\r
connect(m_pWorker, SIGNAL(ReplayStopped(uint64_t)), this, SLOT(slotReplayStopped(uint64_t)));\r
\r
signals:\r
void PlayButtonClicked();\r
+ void StepButtonClicked();\r
void PauseButtonClicked();\r
void ContinueButtonClicked();\r
void StopButtonClicked();\r
void slotReplayStarted()\r
{\r
m_pPlayButton->setEnabled(false);\r
+ m_pStepButton->setEnabled(false);\r
m_pPauseButton->setEnabled(true);\r
m_pContinueButton->setEnabled(false);\r
m_pStopButton->setEnabled(true);\r
}\r
\r
+ void slotReplayStepped()\r
+ {\r
+ // treated the same as continue\r
+ slotReplayContinued();\r
+ }\r
+\r
void slotReplayPaused(uint64_t)\r
{\r
m_pPlayButton->setEnabled(false);\r
+ m_pStepButton->setEnabled(true);\r
m_pPauseButton->setEnabled(false);\r
m_pContinueButton->setEnabled(true);\r
m_pStopButton->setEnabled(false);\r
void slotReplayContinued()\r
{\r
m_pPlayButton->setEnabled(false);\r
+ m_pStepButton->setEnabled(false);\r
m_pPauseButton->setEnabled(true);\r
m_pContinueButton->setEnabled(false);\r
m_pStopButton->setEnabled(true);\r
void slotReplayStopped(uint64_t)\r
{\r
m_pPlayButton->setEnabled(true);\r
+ m_pStepButton->setEnabled(true);\r
m_pPauseButton->setEnabled(false);\r
m_pContinueButton->setEnabled(false);\r
m_pStopButton->setEnabled(false);\r
void slotReplayFinished()\r
{\r
m_pPlayButton->setEnabled(true);\r
+ m_pStepButton->setEnabled(true);\r
m_pPauseButton->setEnabled(false);\r
m_pContinueButton->setEnabled(false);\r
m_pStopButton->setEnabled(false);\r
emit PlayButtonClicked();\r
}\r
\r
+ void onStepButtonClicked()\r
+ {\r
+ emit StepButtonClicked();\r
+ }\r
+\r
void onPauseButtonClicked()\r
{\r
m_pPlayButton->setEnabled(false);\r
QWidget* m_pReplayWindow;\r
QToolBar* m_pToolBar;\r
QToolButton* m_pPlayButton;\r
+ QToolButton* m_pStepButton;\r
QToolButton* m_pPauseButton;\r
QToolButton* m_pContinueButton;\r
QToolButton* m_pStopButton;\r