1/*
2 Copyright (C) 2009 George Kiagiadakis <gkiagia@users.sourceforge.net>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#ifndef DEBUGGERMANAGER_H
18#define DEBUGGERMANAGER_H
19
20#include <QtCore/QObject>
21
22class BacktraceGenerator;
23class Debugger;
24class AbstractDebuggerLauncher;
25
26class DebuggerManager : public QObject
27{
28 Q_OBJECT
29public:
30 DebuggerManager(const Debugger & internalDebugger,
31 const QList<Debugger> & externalDebuggers,
32 QObject *parent = 0);
33 virtual ~DebuggerManager();
34
35 bool debuggerIsRunning() const;
36 bool showExternalDebuggers() const;
37 QList<AbstractDebuggerLauncher*> availableExternalDebuggers() const;
38 BacktraceGenerator *backtraceGenerator() const;
39
40signals:
41 void debuggerStarting();
42 void debuggerFinished();
43 void debuggerRunning(bool running);
44 void externalDebuggerAdded(AbstractDebuggerLauncher *launcher);
45 void externalDebuggerRemoved(AbstractDebuggerLauncher *launcher);
46
47private slots:
48 void onDebuggerStarting();
49 void onDebuggerFinished();
50 void onDebuggerInvalidated();
51 void onDBusOldInterfaceDebuggerAvailable();
52
53private:
54 struct Private;
55 Private *const d;
56};
57
58#endif // DEBUGGERMANAGER_H
59