1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
---|---|
2 | // |
3 | // SPDX-License-Identifier: GPL-3.0-or-later |
4 | |
5 | #ifndef MENUMANAGER_H |
6 | #define MENUMANAGER_H |
7 | |
8 | #include <dap/dapdebugger.h> |
9 | |
10 | #include <QObject> |
11 | #include <QAction> |
12 | |
13 | namespace dpfservice { |
14 | class WindowService; |
15 | } |
16 | |
17 | class MenuManager : public QObject |
18 | { |
19 | Q_OBJECT |
20 | public: |
21 | explicit MenuManager(QObject *parent = nullptr); |
22 | |
23 | void initialize(dpfservice::WindowService *service); |
24 | |
25 | void handleRunStateChanged(AbstractDebugger::RunState state); |
26 | |
27 | signals: |
28 | |
29 | public slots: |
30 | |
31 | |
32 | private: |
33 | QSharedPointer<QAction> startDebugging; |
34 | QSharedPointer<QAction> detachDebugger; |
35 | QSharedPointer<QAction> interrupt; |
36 | QSharedPointer<QAction> continueDebugging; |
37 | QSharedPointer<QAction> abortDebugging; |
38 | QSharedPointer<QAction> restartDebugging; |
39 | QSharedPointer<QAction> stepOver; |
40 | QSharedPointer<QAction> stepIn; |
41 | QSharedPointer<QAction> stepOut; |
42 | }; |
43 | |
44 | #endif // MENUMANAGER_H |
45 |