summaryrefslogtreecommitdiffstats
path: root/src/osd/modules/debugger/qt/mainwindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/debugger/qt/mainwindow.h')
-rw-r--r--src/osd/modules/debugger/qt/mainwindow.h110
1 files changed, 40 insertions, 70 deletions
diff --git a/src/osd/modules/debugger/qt/mainwindow.h b/src/osd/modules/debugger/qt/mainwindow.h
index 95a4e53ca99..6c1e9baefcb 100644
--- a/src/osd/modules/debugger/qt/mainwindow.h
+++ b/src/osd/modules/debugger/qt/mainwindow.h
@@ -1,18 +1,19 @@
// license:BSD-3-Clause
// copyright-holders:Andrew Gardner
-#ifndef __DEBUG_QT_MAIN_WINDOW_H__
-#define __DEBUG_QT_MAIN_WINDOW_H__
+#ifndef MAME_DEBUGGER_QT_MAINWINDOW_H
+#define MAME_DEBUGGER_QT_MAINWINDOW_H
-#include <vector>
+#include "debuggerview.h"
+#include "windowqt.h"
+
+#include "debug/dvdisasm.h"
#include <QtWidgets/QLineEdit>
#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QComboBox>
-#include "debug/dvdisasm.h"
+#include <vector>
-#include "debuggerview.h"
-#include "windowqt.h"
class DasmDockWidget;
class ProcessorDockWidget;
@@ -26,25 +27,24 @@ class MainWindow : public WindowQt
Q_OBJECT
public:
- MainWindow(running_machine* machine, QWidget* parent=nullptr);
+ MainWindow(running_machine &machine, QWidget *parent = nullptr);
virtual ~MainWindow();
- void setProcessor(device_t* processor);
+ void setProcessor(device_t *processor);
protected:
// Used to intercept the user clicking 'X' in the upper corner
- void closeEvent(QCloseEvent* event);
+ void closeEvent(QCloseEvent *event);
// Used to intercept the user hitting the up arrow in the input widget
- bool eventFilter(QObject* obj, QEvent* event);
-
+ bool eventFilter(QObject *obj, QEvent *event);
private slots:
void toggleBreakpointAtCursor(bool changedTo);
void enableBreakpointAtCursor(bool changedTo);
void runToCursor(bool changedTo);
- void rightBarChanged(QAction* changedTo);
+ void rightBarChanged(QAction *changedTo);
void executeCommandSlot();
@@ -61,15 +61,15 @@ private:
void createImagesMenu();
// Widgets and docks
- QLineEdit* m_inputEdit;
- DebuggerView* m_consoleView;
- ProcessorDockWidget* m_procFrame;
- DasmDockWidget* m_dasmFrame;
+ QLineEdit *m_inputEdit;
+ DebuggerView *m_consoleView;
+ ProcessorDockWidget *m_procFrame;
+ DasmDockWidget *m_dasmFrame;
// Menu items
- QAction* m_breakpointToggleAct;
- QAction* m_breakpointEnableAct;
- QAction* m_runToCursorAct;
+ QAction *m_breakpointToggleAct;
+ QAction *m_breakpointEnableAct;
+ QAction *m_runToCursorAct;
// Terminal history
int m_historyIndex;
@@ -87,45 +87,31 @@ class DasmDockWidget : public QWidget
Q_OBJECT
public:
- DasmDockWidget(running_machine* machine, QWidget* parent=nullptr) :
+ DasmDockWidget(running_machine &machine, QWidget *parent = nullptr) :
QWidget(parent),
m_machine(machine)
{
- m_dasmView = new DebuggerView(DVT_DISASSEMBLY,
- m_machine,
- this);
+ m_dasmView = new DebuggerView(DVT_DISASSEMBLY, m_machine, this);
// Force a recompute of the disassembly region
downcast<debug_view_disasm*>(m_dasmView->view())->set_expression("curpc");
- QVBoxLayout* dvLayout = new QVBoxLayout(this);
+ QVBoxLayout *dvLayout = new QVBoxLayout(this);
dvLayout->addWidget(m_dasmView);
dvLayout->setContentsMargins(4,0,4,0);
}
-
virtual ~DasmDockWidget();
+ DebuggerView *view() { return m_dasmView; }
- DebuggerView* view() { return m_dasmView; }
-
-
- QSize minimumSizeHint() const
- {
- return QSize(150,150);
- }
-
-
- QSize sizeHint() const
- {
- return QSize(150,200);
- }
-
+ QSize minimumSizeHint() const { return QSize(150, 150); }
+ QSize sizeHint() const { return QSize(150, 200); }
private:
- DebuggerView* m_dasmView;
+ running_machine &m_machine;
- running_machine* m_machine;
+ DebuggerView *m_dasmView;
};
@@ -137,45 +123,30 @@ class ProcessorDockWidget : public QWidget
Q_OBJECT
public:
- ProcessorDockWidget(running_machine* machine,
- QWidget* parent=nullptr) :
+ ProcessorDockWidget(running_machine &machine, QWidget *parent = nullptr) :
QWidget(parent),
- m_processorView(nullptr),
- m_machine(machine)
+ m_machine(machine),
+ m_processorView(nullptr)
{
- m_processorView = new DebuggerView(DVT_STATE,
- m_machine,
- this);
+ m_processorView = new DebuggerView(DVT_STATE, m_machine, this);
m_processorView->setFocusPolicy(Qt::NoFocus);
- QVBoxLayout* cvLayout = new QVBoxLayout(this);
+ QVBoxLayout *cvLayout = new QVBoxLayout(this);
cvLayout->addWidget(m_processorView);
cvLayout->setContentsMargins(4,0,4,2);
}
-
virtual ~ProcessorDockWidget();
+ DebuggerView *view() { return m_processorView; }
- DebuggerView* view() { return m_processorView; }
-
-
- QSize minimumSizeHint() const
- {
- return QSize(150,300);
- }
-
-
- QSize sizeHint() const
- {
- return QSize(200,300);
- }
-
+ QSize minimumSizeHint() const { return QSize(150, 300); }
+ QSize sizeHint() const { return QSize(200, 300); }
private:
- DebuggerView* m_processorView;
+ running_machine &m_machine;
- running_machine* m_machine;
+ DebuggerView *m_processorView;
};
@@ -197,12 +168,11 @@ public:
int m_rightBar;
QByteArray m_windowState;
- void buildFromQWidget(QWidget* widget);
- void applyToQWidget(QWidget* widget);
+ void buildFromQWidget(QWidget *widget);
+ void applyToQWidget(QWidget *widget);
void addToXmlDataNode(util::xml::data_node &node) const;
void recoverFromXmlNode(util::xml::data_node const &node);
};
-
-#endif
+#endif // MAME_DEBUGGER_QT_MAINWINDOW_H