| 32 | |
| 33 | |
| 34 | DebugControlsWidget::DebugControlsWidget(QWidget* parent, const std::string name, BinaryViewRef data) : |
| 35 | QToolBar(parent), m_name(name) |
| 36 | { |
| 37 | m_controller = DebuggerController::GetController(data); |
| 38 | if (!m_controller) |
| 39 | return; |
| 40 | |
| 41 | auto cyan = getThemeColor(CyanStandardHighlightColor); |
| 42 | auto green = getThemeColor(GreenStandardHighlightColor); |
| 43 | auto red = getThemeColor(RedStandardHighlightColor); |
| 44 | auto white = getThemeColor(WhiteStandardHighlightColor); |
| 45 | |
| 46 | m_actionRun = addAction(getColoredIcon(":/debugger_icons/icons/run.svg", red), "Launch", [this]() { |
| 47 | performLaunch(); |
| 48 | }); |
| 49 | m_actionRun->setToolTip(getToolTip("Launch")); |
| 50 | |
| 51 | m_actionPause = addAction(getColoredIcon(":/debugger_icons/icons/pause.svg", white), "Pause", [this]() { |
| 52 | performPause(); |
| 53 | }); |
| 54 | m_actionPause->setToolTip(getToolTip("Pause")); |
| 55 | |
| 56 | m_actionResume = addAction(getColoredIcon(":/debugger_icons/icons/resume.svg", green), "Resume", [this]() { |
| 57 | performResume(); |
| 58 | }); |
| 59 | m_actionResume->setToolTip(getToolTip("Resume")); |
| 60 | |
| 61 | // m_actionRun->setVisible(true); |
| 62 | m_actionPause->setVisible(false); |
| 63 | m_actionResume->setVisible(false); |
| 64 | |
| 65 | m_actionAttachPid = addAction(getColoredIcon(":/debugger_icons/icons/connect.svg", white), "Attach To Process...", [this]() { |
| 66 | performAttachPID(); |
| 67 | }); |
| 68 | m_actionAttachPid->setToolTip(getToolTip("Attach To Process...")); |
| 69 | |
| 70 | m_actionDetach = addAction(getColoredIcon(":/debugger_icons/icons/disconnect.svg", red), "Detach", [this]() { |
| 71 | performDetach(); |
| 72 | }); |
| 73 | m_actionDetach->setVisible(false); |
| 74 | m_actionDetach->setToolTip(getToolTip("Detach")); |
| 75 | |
| 76 | m_actionRestart = addAction(getColoredIcon(":/debugger_icons/icons/restart.svg", red), "Restart", [this]() { |
| 77 | performRestart(); |
| 78 | }); |
| 79 | m_actionRestart->setToolTip(getToolTip("Restart")); |
| 80 | |
| 81 | m_actionQuit = addAction(getColoredIcon(":/debugger_icons/icons/cancel.svg", red), "Kill", [this]() { |
| 82 | performQuit(); |
| 83 | }); |
| 84 | m_actionQuit->setToolTip(getToolTip("Kill")); |
| 85 | addSeparator(); |
| 86 | |
| 87 | m_actionStepInto = addAction(getColoredIcon(":/debugger_icons/icons/stepinto.svg", cyan), "Step Into", [this]() { |
| 88 | performStepInto(); |
| 89 | }); |
| 90 | m_actionStepInto->setToolTip(getToolTip("Step Into")); |
| 91 |
nothing calls this directly
no outgoing calls
no test coverage detected