From 9972ff5019484ae421d1c4079070e9ea0fc469e6 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Tue, 1 Nov 2016 18:04:15 -0700 Subject: [PATCH] Qt: Add buttons to memory viewer --- src/platform/qt/MemoryView.cpp | 5 ++++ src/platform/qt/MemoryView.ui | 45 ++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/src/platform/qt/MemoryView.cpp b/src/platform/qt/MemoryView.cpp index f6ea61016..92e971768 100644 --- a/src/platform/qt/MemoryView.cpp +++ b/src/platform/qt/MemoryView.cpp @@ -104,6 +104,11 @@ MemoryView::MemoryView(GameController* controller, QWidget* parent) connect(controller, SIGNAL(gamePaused(mCoreThread*)), this, SLOT(update())); connect(controller, SIGNAL(stateLoaded(mCoreThread*)), this, SLOT(update())); connect(controller, SIGNAL(rewound(mCoreThread*)), this, SLOT(update())); + + connect(m_ui.copy, SIGNAL(clicked()), m_ui.hexfield, SLOT(copy())); + connect(m_ui.save, SIGNAL(clicked()), m_ui.hexfield, SLOT(save())); + connect(m_ui.paste, SIGNAL(clicked()), m_ui.hexfield, SLOT(paste())); + connect(m_ui.load, SIGNAL(clicked()), m_ui.hexfield, SLOT(load())); } void MemoryView::setIndex(int index) { diff --git a/src/platform/qt/MemoryView.ui b/src/platform/qt/MemoryView.ui index 64f23f104..45bf326bb 100644 --- a/src/platform/qt/MemoryView.ui +++ b/src/platform/qt/MemoryView.ui @@ -210,6 +210,51 @@ + + + + + + Copy Selection + + + + + + + Paste + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Save Selection + + + + + + + Load + + + + +