| 26 | constexpr int STATUS_STRING_MAX_LEN = 50; |
| 27 | |
| 28 | DebuggerStatusBarWidget::DebuggerStatusBarWidget(QWidget* parent, ViewFrame* frame, BinaryViewRef data) : |
| 29 | QWidget(parent), m_parent(parent), m_view(frame) |
| 30 | { |
| 31 | m_debugger = DebuggerController::GetController(data); |
| 32 | if (!m_debugger) |
| 33 | return; |
| 34 | |
| 35 | auto* layout = new QVBoxLayout(this); |
| 36 | layout->setContentsMargins(0, 0, 0, 0); |
| 37 | layout->setSpacing(0); |
| 38 | setFont(getMonospaceFont(this)); |
| 39 | |
| 40 | m_status = new QLabel(""); |
| 41 | m_parent->setFixedWidth(m_status->sizeHint().width()); |
| 42 | |
| 43 | layout->addWidget(m_status); |
| 44 | |
| 45 | setLayout(layout); |
| 46 | |
| 47 | connect(this, &DebuggerStatusBarWidget::debuggerEvent, this, &DebuggerStatusBarWidget::updateStatusText); |
| 48 | m_debuggerEventCallback = m_debugger->RegisterEventCallback( |
| 49 | [this](const DebuggerEvent& event) { emit debuggerEvent(event); }, "Status Bar"); |
| 50 | } |
| 51 | |
| 52 | |
| 53 | DebuggerStatusBarWidget::~DebuggerStatusBarWidget() |
nothing calls this directly
no test coverage detected