libretro-dolphin/Source/Core/DolphinQt/Debugger/WatchWidget.h
Sepalani 39d34e133f Debugger: Add a Thread widget
DebugInterface: Add GetThreads

WatchWidget: Update widget on AddWatch
2020-05-03 20:48:30 +04:00

59 lines
1.1 KiB
C++

// 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 QCloseEvent;
class QShowEvent;
class QTableWidget;
class QTableWidgetItem;
class QToolBar;
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;
private:
void CreateWidgets();
void ConnectWidgets();
void OnLoad();
void OnSave();
void UpdateButtonsEnabled();
void Update();
void ShowContextMenu();
void OnItemChanged(QTableWidgetItem* item);
void DeleteWatch(int row);
void AddWatchBreakpoint(int row);
void UpdateIcons();
QAction* m_load;
QAction* m_save;
QToolBar* m_toolbar;
QTableWidget* m_table;
bool m_updating = false;
static constexpr int NUM_COLUMNS = 6;
};