1 /**************************************************************************
3 ** This file is part of Qt Creator
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
7 ** Contact: Nokia Corporation (qt-info@nokia.com)
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
16 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 ** In addition, as a special exception, Nokia gives you certain additional
26 ** rights. These rights are described in the Nokia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 ** If you have questions regarding the use of this file, please contact
30 ** Nokia at qt-info@nokia.com.
32 **************************************************************************/
34 #ifndef DEBUGGERRUNNER_H
35 #define DEBUGGERRUNNER_H
37 #include "debugger_global.h"
38 #include "debuggerconstants.h"
40 #include <projectexplorer/abi.h>
41 #include <projectexplorer/runconfiguration.h>
43 #include <QtCore/QScopedPointer>
44 #include <QtCore/QPair>
45 #include <QtCore/QStringList>
53 class DebuggerRunControl;
54 class DebuggerStartParameters;
57 class DebuggerRunControlPrivate;
58 class DebuggerRunControlFactory;
59 } // namespace Internal
62 class DEBUGGER_EXPORT ConfigurationCheck
66 operator bool() const;
67 QString errorDetailsString() const;
70 QStringList errorDetails;
71 QString settingsCategory;
73 QPair<DebuggerEngineType, DebuggerEngineType> masterSlaveEngineTypes;
76 DEBUGGER_EXPORT ConfigurationCheck checkDebugConfiguration(const DebuggerStartParameters &sp);
78 // This is a job description containing all data "local" to the jobs, including
79 // the models of the individual debugger views.
80 class DEBUGGER_EXPORT DebuggerRunControl
81 : public ProjectExplorer::RunControl
86 typedef ProjectExplorer::RunConfiguration RunConfiguration;
87 explicit DebuggerRunControl(RunConfiguration *runConfiguration,
88 const DebuggerStartParameters &sp,
89 const QPair<DebuggerEngineType, DebuggerEngineType> &masterSlaveEngineTypes);
91 ~DebuggerRunControl();
93 // ProjectExplorer::RunControl
95 bool promptToStop(bool *prompt = 0) const;
96 StopResult stop(); // Called from SnapshotWindow.
97 bool isRunning() const;
98 QString displayName() const;
100 void setCustomEnvironment(Utils::Environment env);
102 void debuggingFinished();
103 RunConfiguration *runConfiguration() const;
104 DebuggerEngine *engine(); // FIXME: Remove. Only used by Maemo support.
106 void showMessage(const QString &msg, int channel);
109 void engineRequestSetup();
112 void handleFinished();
115 const DebuggerStartParameters &startParameters() const;
118 friend class Internal::DebuggerRunControlFactory;
119 QScopedPointer<Internal::DebuggerRunControlPrivate> d;
122 } // namespace Debugger
124 #endif // DEBUGGERRUNNER_H