trunk/src/osd/modules/debugger/qt/dasmwindow.c
r248553 | r248554 | |
2 | 2 | // copyright-holders:Andrew Gardner |
3 | 3 | #define NO_MEM_TRACKING |
4 | 4 | |
| 5 | #include <QtWidgets/QHBoxLayout> |
| 6 | #include <QtWidgets/QVBoxLayout> |
| 7 | #include <QtWidgets/QAction> |
| 8 | #include <QtWidgets/QMenu> |
| 9 | #include <QtWidgets/QMenuBar> |
| 10 | |
5 | 11 | #include "dasmwindow.h" |
6 | 12 | |
7 | 13 | #include "debug/debugcon.h" |
r248553 | r248554 | |
30 | 36 | |
31 | 37 | // The input edit |
32 | 38 | m_inputEdit = new QLineEdit(topSubFrame); |
33 | | connect(m_inputEdit, SIGNAL(returnPressed()), this, SLOT(expressionSubmitted())); |
| 39 | connect(m_inputEdit, &QLineEdit::returnPressed, this, &DasmWindow::expressionSubmitted); |
34 | 40 | |
35 | 41 | // The cpu combo box |
36 | 42 | m_cpuComboBox = new QComboBox(topSubFrame); |
37 | 43 | m_cpuComboBox->setObjectName("cpu"); |
38 | 44 | m_cpuComboBox->setMinimumWidth(300); |
39 | | connect(m_cpuComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(cpuChanged(int))); |
| 45 | connect(m_cpuComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &DasmWindow::cpuChanged); |
40 | 46 | |
41 | 47 | // The main disasm window |
42 | 48 | m_dasmView = new DebuggerView(DVT_DISASSEMBLY, m_machine, this); |
43 | | connect(m_dasmView, SIGNAL(updated()), this, SLOT(dasmViewUpdated())); |
| 49 | connect(m_dasmView, &DebuggerView::updated, this, &DasmWindow::dasmViewUpdated); |
44 | 50 | |
45 | 51 | // Force a recompute of the disassembly region |
46 | 52 | downcast<debug_view_disasm*>(m_dasmView->view())->set_expression("curpc"); |
r248553 | r248554 | |
77 | 83 | m_breakpointToggleAct->setShortcut(Qt::Key_F9); |
78 | 84 | m_breakpointEnableAct->setShortcut(Qt::SHIFT + Qt::Key_F9); |
79 | 85 | m_runToCursorAct->setShortcut(Qt::Key_F4); |
80 | | connect(m_breakpointToggleAct, SIGNAL(triggered(bool)), this, SLOT(toggleBreakpointAtCursor(bool))); |
81 | | connect(m_breakpointEnableAct, SIGNAL(triggered(bool)), this, SLOT(enableBreakpointAtCursor(bool))); |
82 | | connect(m_runToCursorAct, SIGNAL(triggered(bool)), this, SLOT(runToCursor(bool))); |
| 86 | connect(m_breakpointToggleAct, &QAction::triggered, this, &DasmWindow::toggleBreakpointAtCursor); |
| 87 | connect(m_breakpointEnableAct, &QAction::triggered, this, &DasmWindow::enableBreakpointAtCursor); |
| 88 | connect(m_runToCursorAct, &QAction::triggered, this, &DasmWindow::runToCursor); |
83 | 89 | |
84 | 90 | // Right bar options |
85 | 91 | QActionGroup* rightBarGroup = new QActionGroup(this); |
r248553 | r248554 | |
97 | 103 | rightActEncrypted->setShortcut(QKeySequence("Ctrl+E")); |
98 | 104 | rightActComments->setShortcut(QKeySequence("Ctrl+C")); |
99 | 105 | rightActRaw->setChecked(true); |
100 | | connect(rightBarGroup, SIGNAL(triggered(QAction*)), this, SLOT(rightBarChanged(QAction*))); |
| 106 | connect(rightBarGroup, &QActionGroup::triggered, this, &DasmWindow::rightBarChanged); |
101 | 107 | |
102 | 108 | // Assemble the options menu |
103 | 109 | QMenu* optionsMenu = menuBar()->addMenu("&Options"); |
trunk/src/osd/modules/debugger/qt/debuggerview.c
r248553 | r248554 | |
2 | 2 | // copyright-holders:Andrew Gardner |
3 | 3 | #define NO_MEM_TRACKING |
4 | 4 | |
| 5 | #include <QtWidgets/QScrollBar> |
| 6 | #include <QtWidgets/QApplication> |
| 7 | #include <QtGui/QPainter> |
| 8 | #include <QtGui/QKeyEvent> |
| 9 | |
5 | 10 | #include "debuggerview.h" |
6 | 11 | |
7 | 12 | #include "modules/lib/osdobj_common.h" |
r248553 | r248554 | |
28 | 33 | DebuggerView::debuggerViewUpdate, |
29 | 34 | this); |
30 | 35 | |
31 | | connect(verticalScrollBar(), SIGNAL(valueChanged(int)), |
32 | | this, SLOT(verticalScrollSlot(int))); |
33 | | connect(horizontalScrollBar(), SIGNAL(valueChanged(int)), |
34 | | this, SLOT(horizontalScrollSlot(int))); |
| 36 | connect(verticalScrollBar(), &QScrollBar::valueChanged, |
| 37 | this, &DebuggerView::verticalScrollSlot); |
| 38 | connect(horizontalScrollBar(), &QScrollBar::valueChanged, |
| 39 | this, &DebuggerView::horizontalScrollSlot); |
35 | 40 | } |
36 | 41 | |
37 | 42 | |
r248553 | r248554 | |
41 | 46 | m_machine->debug_view().free_view(*m_view); |
42 | 47 | } |
43 | 48 | |
44 | | // TODO: remove this version no later than January 1, 2015 |
45 | | #if QT_VERSION < QT_VERSION_CHECK(4, 7, 0) |
46 | 49 | void DebuggerView::paintEvent(QPaintEvent* event) |
47 | 50 | { |
48 | 51 | // Tell the MAME debug view how much real estate is available |
49 | 52 | QFontMetrics actualFont = fontMetrics(); |
50 | | const int fontWidth = MAX(1, actualFont.width('_')); |
51 | | const int fontHeight = MAX(1, actualFont.height()); |
52 | | m_view->set_visible_size(debug_view_xy(width()/fontWidth, height()/fontHeight)); |
53 | | |
54 | | |
55 | | // Handle the scroll bars |
56 | | const int horizontalScrollCharDiff = m_view->total_size().x - m_view->visible_size().x; |
57 | | const int horizontalScrollSize = horizontalScrollCharDiff < 0 ? 0 : horizontalScrollCharDiff; |
58 | | horizontalScrollBar()->setRange(0, horizontalScrollSize); |
59 | | |
60 | | // If the horizontal scroll bar appears, make sure to adjust the vertical scrollbar accordingly |
61 | | const int verticalScrollAdjust = horizontalScrollSize > 0 ? 1 : 0; |
62 | | |
63 | | const int verticalScrollCharDiff = m_view->total_size().y - m_view->visible_size().y; |
64 | | const int verticalScrollSize = verticalScrollCharDiff < 0 ? 0 : verticalScrollCharDiff+verticalScrollAdjust; |
65 | | bool atEnd = false; |
66 | | if (verticalScrollBar()->value() == verticalScrollBar()->maximum()) |
67 | | { |
68 | | atEnd = true; |
69 | | } |
70 | | verticalScrollBar()->setRange(0, verticalScrollSize); |
71 | | if (m_preferBottom && atEnd) |
72 | | { |
73 | | verticalScrollBar()->setValue(verticalScrollSize); |
74 | | } |
75 | | |
76 | | |
77 | | // Draw the viewport widget |
78 | | QPainter painter(viewport()); |
79 | | painter.fillRect(0, 0, width(), height(), QBrush(Qt::white)); |
80 | | painter.setBackgroundMode(Qt::OpaqueMode); |
81 | | painter.setBackground(QColor(255,255,255)); |
82 | | |
83 | | // Background control |
84 | | QBrush bgBrush; |
85 | | bgBrush.setStyle(Qt::SolidPattern); |
86 | | painter.setPen(QPen(QColor(0,0,0))); |
87 | | |
88 | | size_t viewDataOffset = 0; |
89 | | const debug_view_xy& visibleCharDims = m_view->visible_size(); |
90 | | for (int y = 0; y < visibleCharDims.y; y++) |
91 | | { |
92 | | for (int x = 0; x < visibleCharDims.x; x++) |
93 | | { |
94 | | const unsigned char textAttr = m_view->viewdata()[viewDataOffset].attrib; |
95 | | |
96 | | if (x == 0 || textAttr != m_view->viewdata()[viewDataOffset-1].attrib) |
97 | | { |
98 | | // Text color handling |
99 | | QColor fgColor(0,0,0); |
100 | | QColor bgColor(255,255,255); |
101 | | |
102 | | if(textAttr & DCA_VISITED) |
103 | | { |
104 | | bgColor.setRgb(0xc6, 0xe2, 0xff); |
105 | | } |
106 | | if(textAttr & DCA_ANCILLARY) |
107 | | { |
108 | | bgColor.setRgb(0xe0, 0xe0, 0xe0); |
109 | | } |
110 | | if(textAttr & DCA_SELECTED) |
111 | | { |
112 | | bgColor.setRgb(0xff, 0x80, 0x80); |
113 | | } |
114 | | if(textAttr & DCA_CURRENT) |
115 | | { |
116 | | bgColor.setRgb(0xff, 0xff, 0x00); |
117 | | } |
118 | | if ((textAttr & DCA_SELECTED) && (textAttr & DCA_CURRENT)) |
119 | | { |
120 | | bgColor.setRgb(0xff,0xc0,0x80); |
121 | | } |
122 | | if(textAttr & DCA_CHANGED) |
123 | | { |
124 | | fgColor.setRgb(0xff, 0x00, 0x00); |
125 | | } |
126 | | if(textAttr & DCA_INVALID) |
127 | | { |
128 | | fgColor.setRgb(0x00, 0x00, 0xff); |
129 | | } |
130 | | if(textAttr & DCA_DISABLED) |
131 | | { |
132 | | fgColor.setRgb((fgColor.red() + bgColor.red()) >> 1, |
133 | | (fgColor.green() + bgColor.green()) >> 1, |
134 | | (fgColor.blue() + bgColor.blue()) >> 1); |
135 | | } |
136 | | if(textAttr & DCA_COMMENT) |
137 | | { |
138 | | fgColor.setRgb(0x00, 0x80, 0x00); |
139 | | } |
140 | | |
141 | | bgBrush.setColor(bgColor); |
142 | | painter.setBackground(bgBrush); |
143 | | painter.setPen(QPen(fgColor)); |
144 | | } |
145 | | |
146 | | // Your character is not guaranteed to take up the entire fontWidth x fontHeight, so fill before. |
147 | | painter.fillRect(x*fontWidth, y*fontHeight, fontWidth, fontHeight, bgBrush); |
148 | | |
149 | | // There is a touchy interplay between font height, drawing difference, visible position, etc |
150 | | // Fonts don't get drawn "down and to the left" like boxes, so some wiggling is needed. |
151 | | painter.drawText(x*fontWidth, |
152 | | (y*fontHeight + (fontHeight*0.80)), |
153 | | QString(m_view->viewdata()[viewDataOffset].byte)); |
154 | | viewDataOffset++; |
155 | | } |
156 | | } |
157 | | } |
158 | | #else |
159 | | void DebuggerView::paintEvent(QPaintEvent* event) |
160 | | { |
161 | | // Tell the MAME debug view how much real estate is available |
162 | | QFontMetrics actualFont = fontMetrics(); |
163 | 53 | const double fontWidth = actualFont.width(QString(100, '_')) / 100.; |
164 | | const int fontHeight = MAX(1, actualFont.height()); |
| 54 | const int fontHeight = MAX(1, actualFont.lineSpacing()); |
165 | 55 | m_view->set_visible_size(debug_view_xy(width()/fontWidth, height()/fontHeight)); |
166 | 56 | |
167 | 57 | |
r248553 | r248554 | |
272 | 162 | } |
273 | 163 | } |
274 | 164 | } |
275 | | #endif |
276 | 165 | |
277 | 166 | void DebuggerView::keyPressEvent(QKeyEvent* event) |
278 | 167 | { |
trunk/src/osd/modules/debugger/qt/mainwindow.c
r248553 | r248554 | |
2 | 2 | // copyright-holders:Andrew Gardner |
3 | 3 | #define NO_MEM_TRACKING |
4 | 4 | |
| 5 | #include <QtWidgets/QAction> |
| 6 | #include <QtWidgets/QMenu> |
| 7 | #include <QtWidgets/QMenuBar> |
| 8 | #include <QtWidgets/QDockWidget> |
| 9 | #include <QtWidgets/QScrollBar> |
| 10 | #include <QtWidgets/QFileDialog> |
| 11 | #include <QtGui/QCloseEvent> |
| 12 | |
5 | 13 | #include "mainwindow.h" |
6 | 14 | |
7 | 15 | #include "debug/debugcon.h" |
r248553 | r248554 | |
23 | 31 | |
24 | 32 | // The input line |
25 | 33 | m_inputEdit = new QLineEdit(mainWindowFrame); |
26 | | connect(m_inputEdit, SIGNAL(returnPressed()), this, SLOT(executeCommand())); |
| 34 | connect(m_inputEdit, &QLineEdit::returnPressed, this, &MainWindow::executeCommandSlot); |
27 | 35 | m_inputEdit->installEventFilter(this); |
28 | 36 | |
29 | 37 | |
r248553 | r248554 | |
52 | 60 | m_breakpointToggleAct->setShortcut(Qt::Key_F9); |
53 | 61 | m_breakpointEnableAct->setShortcut(Qt::SHIFT + Qt::Key_F9); |
54 | 62 | m_runToCursorAct->setShortcut(Qt::Key_F4); |
55 | | connect(m_breakpointToggleAct, SIGNAL(triggered(bool)), this, SLOT(toggleBreakpointAtCursor(bool))); |
56 | | connect(m_breakpointEnableAct, SIGNAL(triggered(bool)), this, SLOT(enableBreakpointAtCursor(bool))); |
57 | | connect(m_runToCursorAct, SIGNAL(triggered(bool)), this, SLOT(runToCursor(bool))); |
| 63 | connect(m_breakpointToggleAct, &QAction::triggered, this, &MainWindow::toggleBreakpointAtCursor); |
| 64 | connect(m_breakpointEnableAct, &QAction::triggered, this, &MainWindow::enableBreakpointAtCursor); |
| 65 | connect(m_runToCursorAct, &QAction::triggered, this, &MainWindow::runToCursor); |
58 | 66 | |
59 | 67 | // Right bar options |
60 | 68 | QActionGroup* rightBarGroup = new QActionGroup(this); |
r248553 | r248554 | |
72 | 80 | rightActEncrypted->setShortcut(QKeySequence("Ctrl+E")); |
73 | 81 | rightActComments->setShortcut(QKeySequence("Ctrl+C")); |
74 | 82 | rightActRaw->setChecked(true); |
75 | | connect(rightBarGroup, SIGNAL(triggered(QAction*)), this, SLOT(rightBarChanged(QAction*))); |
| 83 | connect(rightBarGroup, &QActionGroup::triggered, this, &MainWindow::rightBarChanged); |
76 | 84 | |
77 | 85 | // Assemble the options menu |
78 | 86 | QMenu* optionsMenu = menuBar()->addMenu("&Options"); |
r248553 | r248554 | |
115 | 123 | dasmDock->setAllowedAreas(Qt::TopDockWidgetArea); |
116 | 124 | m_dasmFrame = new DasmDockWidget(m_machine, dasmDock); |
117 | 125 | dasmDock->setWidget(m_dasmFrame); |
118 | | connect(m_dasmFrame->view(), SIGNAL(updated()), this, SLOT(dasmViewUpdated())); |
| 126 | connect(m_dasmFrame->view(), &DebuggerView::updated, this, &MainWindow::dasmViewUpdated); |
119 | 127 | |
120 | 128 | addDockWidget(Qt::TopDockWidgetArea, dasmDock); |
121 | 129 | dockMenu->addAction(dasmDock->toggleViewAction()); |
r248553 | r248554 | |
300 | 308 | m_dasmFrame->view()->viewport()->update(); |
301 | 309 | } |
302 | 310 | |
| 311 | void MainWindow::executeCommandSlot() |
| 312 | { |
| 313 | executeCommand(true); |
| 314 | } |
303 | 315 | |
304 | 316 | void MainWindow::executeCommand(bool withClear) |
305 | 317 | { |
r248553 | r248554 | |
477 | 489 | mountAct->setData(QVariant(interfaceIndex)); |
478 | 490 | unmountAct->setObjectName("unmount"); |
479 | 491 | unmountAct->setData(QVariant(interfaceIndex)); |
480 | | connect(mountAct, SIGNAL(triggered(bool)), this, SLOT(mountImage(bool))); |
481 | | connect(unmountAct, SIGNAL(triggered(bool)), this, SLOT(unmountImage(bool))); |
| 492 | connect(mountAct, &QAction::triggered, this, &MainWindow::mountImage); |
| 493 | connect(unmountAct, &QAction::triggered, this, &MainWindow::unmountImage); |
482 | 494 | |
483 | 495 | if (!img->exists()) |
484 | 496 | unmountAct->setEnabled(false); |
trunk/src/osd/modules/debugger/qt/memorywindow.c
r248553 | r248554 | |
2 | 2 | // copyright-holders:Andrew Gardner |
3 | 3 | #define NO_MEM_TRACKING |
4 | 4 | |
| 5 | #include <QtGui/QClipboard> |
| 6 | #include <QtGui/QMouseEvent> |
| 7 | #include <QtWidgets/QActionGroup> |
| 8 | #include <QtWidgets/QApplication> |
| 9 | #include <QtWidgets/QHBoxLayout> |
| 10 | #include <QtWidgets/QMenu> |
| 11 | #include <QtWidgets/QMenuBar> |
| 12 | #include <QtWidgets/QScrollBar> |
| 13 | #include <QtWidgets/QToolTip> |
| 14 | #include <QtWidgets/QVBoxLayout> |
| 15 | |
5 | 16 | #include "memorywindow.h" |
6 | 17 | |
7 | 18 | #include "debug/dvmemory.h" |
r248553 | r248554 | |
30 | 41 | |
31 | 42 | // The input edit |
32 | 43 | m_inputEdit = new QLineEdit(topSubFrame); |
33 | | connect(m_inputEdit, SIGNAL(returnPressed()), this, SLOT(expressionSubmitted())); |
| 44 | connect(m_inputEdit, &QLineEdit::returnPressed, this, &MemoryWindow::expressionSubmitted); |
34 | 45 | |
35 | 46 | // The memory space combo box |
36 | 47 | m_memoryComboBox = new QComboBox(topSubFrame); |
37 | 48 | m_memoryComboBox->setObjectName("memoryregion"); |
38 | 49 | m_memoryComboBox->setMinimumWidth(300); |
39 | | connect(m_memoryComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(memoryRegionChanged(int))); |
| 50 | connect(m_memoryComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &MemoryWindow::memoryRegionChanged); |
40 | 51 | |
41 | 52 | // The main memory window |
42 | 53 | m_memTable = new DebuggerMemView(DVT_MEMORY, m_machine, this); |
r248553 | r248554 | |
78 | 89 | chunkActTwo->setShortcut(QKeySequence("Ctrl+2")); |
79 | 90 | chunkActFour->setShortcut(QKeySequence("Ctrl+4")); |
80 | 91 | chunkActOne->setChecked(true); |
81 | | connect(chunkGroup, SIGNAL(triggered(QAction*)), this, SLOT(chunkChanged(QAction*))); |
| 92 | connect(chunkGroup, &QActionGroup::triggered, this, &MemoryWindow::chunkChanged); |
82 | 93 | |
83 | 94 | // Create a address display group |
84 | 95 | QActionGroup* addressGroup = new QActionGroup(this); |
r248553 | r248554 | |
92 | 103 | addressActLogical->setShortcut(QKeySequence("Ctrl+G")); |
93 | 104 | addressActPhysical->setShortcut(QKeySequence("Ctrl+Y")); |
94 | 105 | addressActLogical->setChecked(true); |
95 | | connect(addressGroup, SIGNAL(triggered(QAction*)), this, SLOT(addressChanged(QAction*))); |
| 106 | connect(addressGroup, &QActionGroup::triggered, this, &MemoryWindow::addressChanged); |
96 | 107 | |
97 | 108 | // Create a reverse view radio |
98 | 109 | QAction* reverseAct = new QAction("Reverse View", this); |
99 | 110 | reverseAct->setObjectName("reverse"); |
100 | 111 | reverseAct->setCheckable(true); |
101 | 112 | reverseAct->setShortcut(QKeySequence("Ctrl+R")); |
102 | | connect(reverseAct, SIGNAL(toggled(bool)), this, SLOT(reverseChanged(bool))); |
| 113 | connect(reverseAct, &QAction::toggled, this, &MemoryWindow::reverseChanged); |
103 | 114 | |
104 | 115 | // Create increase and decrease bytes-per-line actions |
105 | 116 | QAction* increaseBplAct = new QAction("Increase Bytes Per Line", this); |
106 | 117 | QAction* decreaseBplAct = new QAction("Decrease Bytes Per Line", this); |
107 | 118 | increaseBplAct->setShortcut(QKeySequence("Ctrl+P")); |
108 | 119 | decreaseBplAct->setShortcut(QKeySequence("Ctrl+O")); |
109 | | connect(increaseBplAct, SIGNAL(triggered(bool)), this, SLOT(increaseBytesPerLine(bool))); |
110 | | connect(decreaseBplAct, SIGNAL(triggered(bool)), this, SLOT(decreaseBytesPerLine(bool))); |
| 120 | connect(increaseBplAct, &QAction::triggered, this, &MemoryWindow::increaseBytesPerLine); |
| 121 | connect(decreaseBplAct, &QAction::triggered, this, &MemoryWindow::decreaseBytesPerLine); |
111 | 122 | |
112 | 123 | // Assemble the options menu |
113 | 124 | QMenu* optionsMenu = menuBar()->addMenu("&Options"); |
trunk/src/osd/modules/debugger/qt/windowqt.c
r248553 | r248554 | |
2 | 2 | // copyright-holders:Andrew Gardner |
3 | 3 | #define NO_MEM_TRACKING |
4 | 4 | |
| 5 | #include <QtWidgets/QMenu> |
| 6 | #include <QtWidgets/QMenuBar> |
| 7 | |
5 | 8 | #include "windowqt.h" |
6 | 9 | #include "logwindow.h" |
7 | 10 | #include "dasmwindow.h" |
r248553 | r248554 | |
27 | 30 | // The Debug menu bar |
28 | 31 | QAction* debugActOpenMemory = new QAction("New &Memory Window", this); |
29 | 32 | debugActOpenMemory->setShortcut(QKeySequence("Ctrl+M")); |
30 | | connect(debugActOpenMemory, SIGNAL(triggered()), this, SLOT(debugActOpenMemory())); |
| 33 | connect(debugActOpenMemory, &QAction::triggered, this, &WindowQt::debugActOpenMemory); |
31 | 34 | |
32 | 35 | QAction* debugActOpenDasm = new QAction("New &Dasm Window", this); |
33 | 36 | debugActOpenDasm->setShortcut(QKeySequence("Ctrl+D")); |
34 | | connect(debugActOpenDasm, SIGNAL(triggered()), this, SLOT(debugActOpenDasm())); |
| 37 | connect(debugActOpenDasm, &QAction::triggered, this, &WindowQt::debugActOpenDasm); |
35 | 38 | |
36 | 39 | QAction* debugActOpenLog = new QAction("New &Log Window", this); |
37 | 40 | debugActOpenLog->setShortcut(QKeySequence("Ctrl+L")); |
38 | | connect(debugActOpenLog, SIGNAL(triggered()), this, SLOT(debugActOpenLog())); |
| 41 | connect(debugActOpenLog, &QAction::triggered, this, &WindowQt::debugActOpenLog); |
39 | 42 | |
40 | 43 | QAction* debugActOpenPoints = new QAction("New &Break|Watchpoints Window", this); |
41 | 44 | debugActOpenPoints->setShortcut(QKeySequence("Ctrl+B")); |
42 | | connect(debugActOpenPoints, SIGNAL(triggered()), this, SLOT(debugActOpenPoints())); |
| 45 | connect(debugActOpenPoints, &QAction::triggered, this, &WindowQt::debugActOpenPoints); |
43 | 46 | |
44 | 47 | QAction* debugActOpenDevices = new QAction("New D&evices Window", this); |
45 | 48 | debugActOpenDevices->setShortcut(QKeySequence("Shift+Ctrl+D")); |
46 | | connect(debugActOpenDevices, SIGNAL(triggered()), this, SLOT(debugActOpenDevices())); |
| 49 | connect(debugActOpenDevices, &QAction::triggered, this, &WindowQt::debugActOpenDevices); |
47 | 50 | |
48 | 51 | QAction* dbgActRun = new QAction("Run", this); |
49 | 52 | dbgActRun->setShortcut(Qt::Key_F5); |
50 | | connect(dbgActRun, SIGNAL(triggered()), this, SLOT(debugActRun())); |
| 53 | connect(dbgActRun, &QAction::triggered, this, &WindowQt::debugActRun); |
51 | 54 | |
52 | 55 | QAction* dbgActRunAndHide = new QAction("Run And Hide Debugger", this); |
53 | 56 | dbgActRunAndHide->setShortcut(Qt::Key_F12); |
54 | | connect(dbgActRunAndHide, SIGNAL(triggered()), this, SLOT(debugActRunAndHide())); |
| 57 | connect(dbgActRunAndHide, &QAction::triggered, this, &WindowQt::debugActRunAndHide); |
55 | 58 | |
56 | 59 | QAction* dbgActRunToNextCpu = new QAction("Run to Next CPU", this); |
57 | 60 | dbgActRunToNextCpu->setShortcut(Qt::Key_F6); |
58 | | connect(dbgActRunToNextCpu, SIGNAL(triggered()), this, SLOT(debugActRunToNextCpu())); |
| 61 | connect(dbgActRunToNextCpu, &QAction::triggered, this, &WindowQt::debugActRunToNextCpu); |
59 | 62 | |
60 | 63 | QAction* dbgActRunNextInt = new QAction("Run to Next Interrupt on This CPU", this); |
61 | 64 | dbgActRunNextInt->setShortcut(Qt::Key_F7); |
62 | | connect(dbgActRunNextInt, SIGNAL(triggered()), this, SLOT(debugActRunNextInt())); |
| 65 | connect(dbgActRunNextInt, &QAction::triggered, this, &WindowQt::debugActRunNextInt); |
63 | 66 | |
64 | 67 | QAction* dbgActRunNextVBlank = new QAction("Run to Next VBlank", this); |
65 | 68 | dbgActRunNextVBlank->setShortcut(Qt::Key_F8); |
66 | | connect(dbgActRunNextVBlank, SIGNAL(triggered()), this, SLOT(debugActRunNextVBlank())); |
| 69 | connect(dbgActRunNextVBlank, &QAction::triggered, this, &WindowQt::debugActRunNextVBlank); |
67 | 70 | |
68 | 71 | QAction* dbgActStepInto = new QAction("Step Into", this); |
69 | 72 | dbgActStepInto->setShortcut(Qt::Key_F11); |
70 | | connect(dbgActStepInto, SIGNAL(triggered()), this, SLOT(debugActStepInto())); |
| 73 | connect(dbgActStepInto, &QAction::triggered, this, &WindowQt::debugActStepInto); |
71 | 74 | |
72 | 75 | QAction* dbgActStepOver = new QAction("Step Over", this); |
73 | 76 | dbgActStepOver->setShortcut(Qt::Key_F10); |
74 | | connect(dbgActStepOver, SIGNAL(triggered()), this, SLOT(debugActStepOver())); |
| 77 | connect(dbgActStepOver, &QAction::triggered, this, &WindowQt::debugActStepOver); |
75 | 78 | |
76 | 79 | QAction* dbgActStepOut = new QAction("Step Out", this); |
77 | 80 | dbgActStepOut->setShortcut(QKeySequence("Shift+F11")); |
78 | | connect(dbgActStepOut, SIGNAL(triggered()), this, SLOT(debugActStepOut())); |
| 81 | connect(dbgActStepOut, &QAction::triggered, this, &WindowQt::debugActStepOut); |
79 | 82 | |
80 | 83 | QAction* dbgActSoftReset = new QAction("Soft Reset", this); |
81 | 84 | dbgActSoftReset->setShortcut(Qt::Key_F3); |
82 | | connect(dbgActSoftReset, SIGNAL(triggered()), this, SLOT(debugActSoftReset())); |
| 85 | connect(dbgActSoftReset, &QAction::triggered, this, &WindowQt::debugActSoftReset); |
83 | 86 | |
84 | 87 | QAction* dbgActHardReset = new QAction("Hard Reset", this); |
85 | 88 | dbgActHardReset->setShortcut(QKeySequence("Shift+F3")); |
86 | | connect(dbgActHardReset, SIGNAL(triggered()), this, SLOT(debugActHardReset())); |
| 89 | connect(dbgActHardReset, &QAction::triggered, this, &WindowQt::debugActHardReset); |
87 | 90 | |
88 | 91 | QAction* dbgActClose = new QAction("Close &Window", this); |
89 | 92 | dbgActClose->setShortcut(QKeySequence::Close); |
90 | | connect(dbgActClose, SIGNAL(triggered()), this, SLOT(debugActClose())); |
| 93 | connect(dbgActClose, &QAction::triggered, this, &WindowQt::debugActClose); |
91 | 94 | |
92 | 95 | QAction* dbgActQuit = new QAction("&Quit", this); |
93 | 96 | dbgActQuit->setShortcut(QKeySequence::Quit); |
94 | | connect(dbgActQuit, SIGNAL(triggered()), this, SLOT(debugActQuit())); |
| 97 | connect(dbgActQuit, &QAction::triggered, this, &WindowQt::debugActQuit); |
95 | 98 | |
96 | 99 | // Construct the menu |
97 | 100 | QMenu* debugMenu = menuBar()->addMenu("&Debug"); |