dolphin/Source/Core/DolphinQt/Debugger/WatchWidget.h

59 lines
1.1 KiB
C
Raw Normal View History

2017-09-27 06:53:05 +00:00
// Copyright 2017 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <QDockWidget>
#include "Common/CommonTypes.h"
class QAction;
class QTableWidget;
class QTableWidgetItem;
class QToolBar;
class QCloseEvent;
class QShowEvent;
2017-09-27 06:53:05 +00:00
class WatchWidget : public QDockWidget
{
Q_OBJECT
public:
explicit WatchWidget(QWidget* parent = nullptr);
~WatchWidget();
void AddWatch(QString name, u32 addr);
signals:
void RequestMemoryBreakpoint(u32 addr);
protected:
void closeEvent(QCloseEvent*) override;
void showEvent(QShowEvent* event) override;
2017-09-27 06:53:05 +00:00
private:
void CreateWidgets();
void ConnectWidgets();
void OnLoad();
void OnSave();
void UpdateButtonsEnabled();
2017-09-27 06:53:05 +00:00
void Update();
void ShowContextMenu();
void OnItemChanged(QTableWidgetItem* item);
void DeleteWatch(int row);
void AddWatchBreakpoint(int row);
2018-04-11 21:43:47 +00:00
void UpdateIcons();
2017-09-27 06:53:05 +00:00
QAction* m_load;
QAction* m_save;
QToolBar* m_toolbar;
QTableWidget* m_table;
bool m_updating = false;
2019-06-28 21:04:23 +00:00
static constexpr size_t NUM_COLUMNS = 6;
2017-09-27 06:53:05 +00:00
};