src/platform/qt/DebuggerController.h (view raw)
1/* Copyright (c) 2013-2014 Jeffrey Pfau
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6#ifndef QGBA_DEBUGGER_CONTROLLER
7#define QGBA_DEBUGGER_CONTROLLER
8
9#include <QObject>
10
11#include <memory>
12
13struct mDebugger;
14
15namespace QGBA {
16
17class CoreController;
18
19class DebuggerController : public QObject {
20Q_OBJECT
21
22public:
23 DebuggerController(mDebugger* debugger, QObject* parent = nullptr);
24
25public:
26 bool isAttached();
27 void setController(std::shared_ptr<CoreController>);
28
29public slots:
30 virtual void attach();
31 virtual void detach();
32 virtual void breakInto();
33 virtual void shutdown();
34
35protected:
36 virtual void attachInternal();
37 virtual void shutdownInternal();
38
39 mDebugger* const m_debugger;
40 std::shared_ptr<CoreController> m_gameController;
41
42private:
43 QMetaObject::Connection m_autoattach;
44};
45
46}
47
48#endif