2017-10-03 16:43:44 +00:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2017-10-03 16:43:44 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QDockWidget>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
|
|
|
class QAction;
|
2019-07-06 08:50:11 +00:00
|
|
|
class QCloseEvent;
|
|
|
|
class QShowEvent;
|
2017-10-03 16:43:44 +00:00
|
|
|
class QTableWidget;
|
|
|
|
class QToolBar;
|
|
|
|
|
|
|
|
class BreakpointWidget : public QDockWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit BreakpointWidget(QWidget* parent = nullptr);
|
|
|
|
~BreakpointWidget();
|
|
|
|
|
|
|
|
void AddBP(u32 addr);
|
2020-07-06 22:16:32 +00:00
|
|
|
void AddBP(u32 addr, bool temp, bool break_on_hit, bool log_on_hit);
|
2017-10-03 16:43:44 +00:00
|
|
|
void AddAddressMBP(u32 addr, bool on_read = true, bool on_write = true, bool do_log = true,
|
|
|
|
bool do_break = true);
|
|
|
|
void AddRangedMBP(u32 from, u32 to, bool do_read = true, bool do_write = true, bool do_log = true,
|
|
|
|
bool do_break = true);
|
2019-07-06 08:50:11 +00:00
|
|
|
void UpdateButtonsEnabled();
|
2018-02-14 22:25:01 +00:00
|
|
|
void Update();
|
2017-10-03 16:43:44 +00:00
|
|
|
|
2018-03-16 11:39:53 +00:00
|
|
|
signals:
|
|
|
|
void BreakpointsChanged();
|
2022-05-28 00:34:47 +00:00
|
|
|
void ShowCode(u32 address);
|
|
|
|
void ShowMemory(u32 address);
|
2018-03-16 11:39:53 +00:00
|
|
|
|
2017-10-03 16:43:44 +00:00
|
|
|
protected:
|
|
|
|
void closeEvent(QCloseEvent*) override;
|
2019-07-06 08:50:11 +00:00
|
|
|
void showEvent(QShowEvent* event) override;
|
2017-10-03 16:43:44 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void CreateWidgets();
|
|
|
|
|
|
|
|
void OnDelete();
|
|
|
|
void OnClear();
|
|
|
|
void OnNewBreakpoint();
|
|
|
|
void OnLoad();
|
|
|
|
void OnSave();
|
2021-02-28 08:44:03 +00:00
|
|
|
void OnContextMenu();
|
2017-10-03 16:43:44 +00:00
|
|
|
|
2018-04-11 21:43:47 +00:00
|
|
|
void UpdateIcons();
|
|
|
|
|
2017-10-03 16:43:44 +00:00
|
|
|
QToolBar* m_toolbar;
|
|
|
|
QTableWidget* m_table;
|
2018-04-11 21:43:47 +00:00
|
|
|
QAction* m_new;
|
|
|
|
QAction* m_delete;
|
|
|
|
QAction* m_clear;
|
2017-10-03 16:43:44 +00:00
|
|
|
QAction* m_load;
|
|
|
|
QAction* m_save;
|
|
|
|
};
|