summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger/qt/windowqt.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2022-09-16 22:09:58 +1000
committer Vas Crabb <vas@vastheman.com>2022-09-16 22:23:34 +1000
commitc76cf754b3cb1a07f8d3ca585bb3a055d78f25be (patch)
tree833fa7b23f8a84a79fd052008a6ad7c3847b46da /src/osd/modules/debugger/qt/windowqt.cpp
parent1aae44005b59aa712fb60f639ddbb9e8e5e7a357 (diff)
debugger/win: Added capability to save/restore window arrangement.
* Format is mostly compatible with the Cocoa debugger, besides reversed vertical positioning. * Made Qt debugger more compatible with configuration format used by Win32 and Cocoa debuggers. * emu/config.cpp: Preserve elements with no registered handlers in default and system configuation files.
Diffstat (limited to 'src/osd/modules/debugger/qt/windowqt.cpp')
-rw-r--r--src/osd/modules/debugger/qt/windowqt.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/osd/modules/debugger/qt/windowqt.cpp b/src/osd/modules/debugger/qt/windowqt.cpp
index 852d1f5449c..1d7ba70b5a6 100644
--- a/src/osd/modules/debugger/qt/windowqt.cpp
+++ b/src/osd/modules/debugger/qt/windowqt.cpp
@@ -12,6 +12,8 @@
#include "debug/debugcon.h"
#include "debug/debugcpu.h"
+#include "util/xmlfile.h"
+
#include <QtWidgets/QMenu>
#include <QtWidgets/QMenuBar>
@@ -35,15 +37,15 @@ WindowQt::WindowQt(running_machine &machine, QWidget *parent) :
debugActOpenMemory->setShortcut(QKeySequence("Ctrl+M"));
connect(debugActOpenMemory, &QAction::triggered, this, &WindowQt::debugActOpenMemory);
- QAction *debugActOpenDasm = new QAction("New &Dasm Window", this);
+ QAction *debugActOpenDasm = new QAction("New &Disassembly Window", this);
debugActOpenDasm->setShortcut(QKeySequence("Ctrl+D"));
connect(debugActOpenDasm, &QAction::triggered, this, &WindowQt::debugActOpenDasm);
- QAction *debugActOpenLog = new QAction("New &Log Window", this);
+ QAction *debugActOpenLog = new QAction("New Error &Log Window", this);
debugActOpenLog->setShortcut(QKeySequence("Ctrl+L"));
connect(debugActOpenLog, &QAction::triggered, this, &WindowQt::debugActOpenLog);
- QAction *debugActOpenPoints = new QAction("New &Break|Watchpoints Window", this);
+ QAction *debugActOpenPoints = new QAction("New (&Break|Watch)points Window", this);
debugActOpenPoints->setShortcut(QKeySequence("Ctrl+B"));
connect(debugActOpenPoints, &QAction::triggered, this, &WindowQt::debugActOpenPoints);
@@ -261,19 +263,19 @@ void WindowQtConfig::applyToQWidget(QWidget *widget)
void WindowQtConfig::addToXmlDataNode(util::xml::data_node &node) const
{
- node.set_attribute_int("type", m_type);
- node.set_attribute_int("position_x", m_position.x());
- node.set_attribute_int("position_y", m_position.y());
- node.set_attribute_int("size_x", m_size.x());
- node.set_attribute_int("size_y", m_size.y());
+ node.set_attribute_int(osd::debugger::ATTR_WINDOW_TYPE, m_type);
+ node.set_attribute_int(osd::debugger::ATTR_WINDOW_POSITION_X, m_position.x());
+ node.set_attribute_int(osd::debugger::ATTR_WINDOW_POSITION_Y, m_position.y());
+ node.set_attribute_int(osd::debugger::ATTR_WINDOW_WIDTH, m_size.x());
+ node.set_attribute_int(osd::debugger::ATTR_WINDOW_HEIGHT, m_size.y());
}
void WindowQtConfig::recoverFromXmlNode(util::xml::data_node const &node)
{
- m_size.setX(node.get_attribute_int("size_x", m_size.x()));
- m_size.setY(node.get_attribute_int("size_y", m_size.y()));
- m_position.setX(node.get_attribute_int("position_x", m_position.x()));
- m_position.setY(node.get_attribute_int("position_y", m_position.y()));
- m_type = (WindowQtConfig::WindowType)node.get_attribute_int("type", m_type);
+ m_size.setX(node.get_attribute_int(osd::debugger::ATTR_WINDOW_WIDTH, m_size.x()));
+ m_size.setY(node.get_attribute_int(osd::debugger::ATTR_WINDOW_HEIGHT, m_size.y()));
+ m_position.setX(node.get_attribute_int(osd::debugger::ATTR_WINDOW_POSITION_X, m_position.x()));
+ m_position.setY(node.get_attribute_int(osd::debugger::ATTR_WINDOW_POSITION_Y, m_position.y()));
+ m_type = (WindowQtConfig::WindowType)node.get_attribute_int(osd::debugger::ATTR_WINDOW_TYPE, m_type);
}