File indexing completed on 2022-11-23 12:12:12

0001 /*
0002     SPDX-FileCopyrightText: 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
0003     SPDX-FileCopyrightText: 2021 Harald Sitter <sitter@kde.org>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 #ifndef DEBUGGERMANAGER_H
0008 #define DEBUGGERMANAGER_H
0009 
0010 #include <QObject>
0011 
0012 class BacktraceGenerator;
0013 class Debugger;
0014 class AbstractDebuggerLauncher;
0015 class AbstractDrKonqiBackend;
0016 
0017 class DebuggerManager : public QObject
0018 {
0019     Q_OBJECT
0020 public:
0021     explicit DebuggerManager(const Debugger &internalDebugger, const QList<Debugger> &externalDebuggers, AbstractDrKonqiBackend *backendParent);
0022     ~DebuggerManager() override;
0023 
0024     bool debuggerIsRunning() const;
0025     bool showExternalDebuggers() const;
0026     QList<AbstractDebuggerLauncher *> availableExternalDebuggers() const;
0027     BacktraceGenerator *backtraceGenerator() const;
0028     void addDebugger(AbstractDebuggerLauncher *launcher, bool emitsignal = false);
0029 
0030 Q_SIGNALS:
0031     void debuggerStarting();
0032     void debuggerFinished();
0033     void debuggerRunning(bool running);
0034     void externalDebuggerAdded(AbstractDebuggerLauncher *launcher);
0035     void externalDebuggerRemoved(AbstractDebuggerLauncher *launcher);
0036 
0037 private Q_SLOTS:
0038     void onDebuggerStarting();
0039     void onDebuggerFinished();
0040     void onDebuggerInvalidated();
0041 
0042 private:
0043     struct Private;
0044     Private *const d;
0045 };
0046 
0047 #endif // DEBUGGERMANAGER_H