mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
e149ad4f0a
SPDX standardizes how source code conveys its copyright and licensing information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX tags are adopted in many large projects, including things like the Linux kernel.
65 lines
1.1 KiB
C++
65 lines
1.1 KiB
C++
// Copyright 2017 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#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 OnDelete();
|
|
void OnClear();
|
|
void OnNewWatch();
|
|
|
|
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_new;
|
|
QAction* m_delete;
|
|
QAction* m_clear;
|
|
QAction* m_load;
|
|
QAction* m_save;
|
|
QToolBar* m_toolbar;
|
|
QTableWidget* m_table;
|
|
|
|
bool m_updating = false;
|
|
|
|
static constexpr int NUM_COLUMNS = 6;
|
|
};
|