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#pragma once
7
8#include <QObject>
9
10#include <memory>
11
12struct mDebugger;
13
14namespace QGBA {
15
16class CoreController;
17
18class DebuggerController : public QObject {
19Q_OBJECT
20
21public:
22 DebuggerController(mDebugger* debugger, QObject* parent = nullptr);
23
24public:
25 bool isAttached();
26 void setController(std::shared_ptr<CoreController>);
27
28public slots:
29 virtual void attach();
30 virtual void detach();
31 virtual void breakInto();
32 virtual void shutdown();
33
34protected:
35 virtual void attachInternal();
36 virtual void shutdownInternal();
37
38 mDebugger* const m_debugger;
39 std::shared_ptr<CoreController> m_gameController;
40
41private:
42 QMetaObject::Connection m_autoattach;
43};
44
45}