mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 13:20:27 -06:00
Move DolphinQt2 to DolphinQt
This commit is contained in:
63
Source/Core/DolphinQt/Debugger/MemoryViewWidget.h
Normal file
63
Source/Core/DolphinQt/Debugger/MemoryViewWidget.h
Normal file
@ -0,0 +1,63 @@
|
||||
// Copyright 2018 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QTableWidget>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
class MemoryViewWidget : public QTableWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum class Type
|
||||
{
|
||||
U8,
|
||||
U16,
|
||||
U32,
|
||||
ASCII,
|
||||
Float32
|
||||
};
|
||||
|
||||
enum class BPType
|
||||
{
|
||||
ReadWrite,
|
||||
ReadOnly,
|
||||
WriteOnly
|
||||
};
|
||||
|
||||
explicit MemoryViewWidget(QWidget* parent = nullptr);
|
||||
|
||||
void Update();
|
||||
void ToggleBreakpoint();
|
||||
void ToggleRowBreakpoint(bool row);
|
||||
|
||||
void SetType(Type type);
|
||||
void SetBPType(BPType type);
|
||||
void SetAddress(u32 address);
|
||||
|
||||
void SetBPLoggingEnabled(bool enabled);
|
||||
|
||||
u32 GetContextAddress() const;
|
||||
|
||||
void resizeEvent(QResizeEvent*) override;
|
||||
void keyPressEvent(QKeyEvent* event) override;
|
||||
void mousePressEvent(QMouseEvent* event) override;
|
||||
void wheelEvent(QWheelEvent* event) override;
|
||||
|
||||
signals:
|
||||
void BreakpointsChanged();
|
||||
|
||||
private:
|
||||
void OnContextMenu();
|
||||
void OnCopyAddress();
|
||||
void OnCopyHex();
|
||||
|
||||
Type m_type = Type::U8;
|
||||
BPType m_bp_type = BPType::ReadWrite;
|
||||
bool m_do_log = true;
|
||||
u32 m_context_address;
|
||||
u32 m_address = 0;
|
||||
};
|
Reference in New Issue
Block a user