diff options
Diffstat (limited to 'src/osd/modules/debugger/qt/mainwindow.h')
-rw-r--r-- | src/osd/modules/debugger/qt/mainwindow.h | 41 |
1 files changed, 9 insertions, 32 deletions
diff --git a/src/osd/modules/debugger/qt/mainwindow.h b/src/osd/modules/debugger/qt/mainwindow.h index 919c016704c..762874b6aee 100644 --- a/src/osd/modules/debugger/qt/mainwindow.h +++ b/src/osd/modules/debugger/qt/mainwindow.h @@ -14,7 +14,7 @@ #include <QtWidgets/QVBoxLayout> #include <QtWidgets/QComboBox> -#include <vector> +#include <deque> namespace osd::debugger::qt { @@ -31,21 +31,21 @@ class MainWindow : public WindowQt Q_OBJECT public: - MainWindow(running_machine &machine, QWidget *parent = nullptr); + MainWindow(DebuggerQt &debugger, QWidget *parent = nullptr); virtual ~MainWindow(); void setProcessor(device_t *processor); - void setExiting() { m_exiting = true; } + virtual void restoreConfiguration(util::xml::data_node const &node) override; protected: virtual void saveConfigurationToNode(util::xml::data_node &node) override; // Used to intercept the user clicking 'X' in the upper corner - void closeEvent(QCloseEvent *event); + virtual void closeEvent(QCloseEvent *event) override; // Used to intercept the user hitting the up arrow in the input widget - bool eventFilter(QObject *obj, QEvent *event); + virtual bool eventFilter(QObject *obj, QEvent *event) override; private slots: void toggleBreakpointAtCursor(bool changedTo); @@ -54,6 +54,7 @@ private slots: void rightBarChanged(QAction *changedTo); void executeCommandSlot(); + void commandEditedSlot(QString const &text); void mountImage(bool changedTo); void unmountImage(bool changedTo); @@ -61,12 +62,12 @@ private slots: void dasmViewUpdated(); // Closing the main window hides the debugger and runs the emulated system - void debugActClose(); + virtual void debugActClose() override; + virtual void debuggerExit() override; private: void createImagesMenu(); - void addToHistory(const QString& command); void executeCommand(bool withClear); // Widgets and docks @@ -81,8 +82,7 @@ private: QAction *m_runToCursorAct; // Terminal history - int m_historyIndex; - std::vector<QString> m_inputHistory; + CommandHistory m_inputHistory; bool m_exiting; }; @@ -158,29 +158,6 @@ private: DebuggerView *m_processorView; }; - -//========================================================================= -// A way to store the configuration of a window long enough to read/write. -//========================================================================= -class MainWindowQtConfig : public WindowQtConfig -{ -public: - MainWindowQtConfig() : - WindowQtConfig(WINDOW_TYPE_CONSOLE), - m_rightBar(0), - m_windowState() - {} - - ~MainWindowQtConfig() {} - - // Settings - int m_rightBar; - QByteArray m_windowState; - - void applyToQWidget(QWidget *widget); - void recoverFromXmlNode(util::xml::data_node const &node); -}; - } // namespace osd::debugger::qt #endif // MAME_DEBUGGER_QT_MAINWINDOW_H |