Qt: Add buttons to memory viewer
Jeffrey Pfau jeffrey@endrift.com
Tue, 01 Nov 2016 18:04:15 -0700
2 files changed,
50 insertions(+),
0 deletions(-)
M
src/platform/qt/MemoryView.cpp
→
src/platform/qt/MemoryView.cpp
@@ -104,6 +104,11 @@ connect(controller, SIGNAL(frameAvailable(const uint32_t*)), this, SLOT(update()));
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) {
M
src/platform/qt/MemoryView.ui
→
src/platform/qt/MemoryView.ui
@@ -210,6 +210,51 @@ </layout>
</item> </layout> </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_5"> + <item> + <widget class="QPushButton" name="copy"> + <property name="text"> + <string>Copy Selection</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="paste"> + <property name="text"> + <string>Paste</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_7"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="save"> + <property name="text"> + <string>Save Selection</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="load"> + <property name="text"> + <string>Load</string> + </property> + </widget> + </item> + </layout> + </item> </layout> </widget> <customwidgets>