Previous 199869 Revisions Next

r21970 Tuesday 19th March, 2013 at 16:55:21 UTC by Andrew Gardner
QT Debugger fixes:
 - New memory windows start focused on the active CPU.
 - Opening a utility window, closing it, and stepping no longer re-opens the window.
   [Andrew Gardner]
 
 
[src/osd/sdl]debugqtdasmwindow.c debugqtlogwindow.c debugqtmainwindow.c debugqtmemorywindow.c debugqtmemorywindow.h debugqtview.c debugqtview.h debugqtwindow.c

trunk/src/osd/sdl/debugqtwindow.c
r21969r21970
1212bool WindowQt::s_hideAll = false;
1313
1414
15// Since all debug windows are intended to be top-level, this inherited
16// constructor is always called with a NULL parent.  The passed-in parent widget,
17// however, is often used to place each child window & the code to do this can
18// be found in most of the inherited classes.
19
1520WindowQt::WindowQt(running_machine* machine, QWidget* parent) :
1621   QMainWindow(parent),
1722   m_machine(machine)
1823{
19   //setAttribute(Qt::WA_DeleteOnClose, true);
24   setAttribute(Qt::WA_DeleteOnClose, true);
2025
2126   // The Debug menu bar
2227   QAction* debugActOpenMemory = new QAction("New &Memory Window", this);
trunk/src/osd/sdl/debugqtlogwindow.c
r21969r21970
66
77
88LogWindow::LogWindow(running_machine* machine, QWidget* parent) :
9   WindowQt(machine, parent)
9   WindowQt(machine, NULL)
1010{
1111   setWindowTitle("Debug: Machine Log");
1212
trunk/src/osd/sdl/debugqtview.c
r21969r21970
2828}
2929
3030
31DebuggerView::~DebuggerView()
32{
33    if (m_machine && m_view)
34        m_machine->debug_view().free_view(*m_view);
35}
36
37
3138void DebuggerView::paintEvent(QPaintEvent* event)
3239{
3340   // Tell the MAME debug view how much real estate is available
trunk/src/osd/sdl/debugqtdasmwindow.c
r21969r21970
66
77
88DasmWindow::DasmWindow(running_machine* machine, QWidget* parent) :
9   WindowQt(machine, parent)
9   WindowQt(machine, NULL)
1010{
1111   setWindowTitle("Debug: Disassembly View");
1212
trunk/src/osd/sdl/debugqtview.h
r21969r21970
1414   DebuggerView(const debug_view_type& type,
1515               running_machine* machine,
1616               QWidget* parent=NULL);
17   virtual ~DebuggerView() {}
17   virtual ~DebuggerView();
1818
1919   void paintEvent(QPaintEvent* event);
2020
trunk/src/osd/sdl/debugqtmemorywindow.c
r21969r21970
66
77
88MemoryWindow::MemoryWindow(running_machine* machine, QWidget* parent) :
9   WindowQt(machine, parent)
9   WindowQt(machine, NULL)
1010{
1111   setWindowTitle("Debug: Memory View");
1212
r21969r21970
4141   // Populate the combo box
4242   populateComboBox();
4343
44   // Set to the current CPU's memory view
45    setToCurrentCpu();
4446
4547   // Layout
4648   QHBoxLayout* subLayout = new QHBoxLayout(topSubFrame);
r21969r21970
212214   {
213215      m_memoryComboBox->addItem(source->name());
214216   }
217}
215218
216   // TODO: Set to the proper memory view
217   //const debug_view_source *source = mem->views[0]->view->source_list().match_device(curcpu);
218   //gtk_combo_box_set_active(zone_w, mem->views[0]->view->source_list().index(*source));
219   //mem->views[0]->view->set_source(*source);
219
220void MemoryWindow::setToCurrentCpu()
221{
222   device_t* curCpu = debug_cpu_get_visible_cpu(*m_machine);
223   const debug_view_source *source = m_memTable->view()->source_list().match_device(curCpu);
224    const int listIndex = m_memTable->view()->source_list().index(*source);
225    m_memoryComboBox->setCurrentIndex(listIndex);
220226}
trunk/src/osd/sdl/debugqtmemorywindow.h
r21969r21970
3131
3232private:
3333   void populateComboBox();
34   void setToCurrentCpu();
3435
3536
3637private:
trunk/src/osd/sdl/debugqtmainwindow.c
r21969r21970
55
66
77MainWindow::MainWindow(running_machine* machine, QWidget* parent) :
8   WindowQt(machine, parent),
8   WindowQt(machine, NULL),
99   m_historyIndex(0),
1010   m_inputHistory()
1111{

Previous 199869 Revisions Next


© 1997-2024 The MAME Team