1 /* This file is part of KDevelop
2 Copyright 2007 Hamish Rodda <rodda@kde.org>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 This library 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 GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
23 #include <QtCore/QObject>
24 #include <QtCore/QSharedDataPointer>
28 #include "interfacesexport.h"
32 class ProjectBaseItem
;
35 * This class holds all properties which specify a run session.
37 class KDEVPLATFORMINTERFACES_EXPORT IRun
41 IRun(const IRun
& rhs
);
42 IRun
& operator=(const IRun
& rhs
);
46 * The executable for this session.
48 KUrl
executable() const;
51 * Set the \a executable to be run.
53 void setExecutable(const QString
& executable
);
56 * The working directory for this session.
58 KUrl
workingDirectory() const;
61 * Set the \a workingDirectory for this run session.
63 void setWorkingDirectory(const QString
& workingDirectory
);
66 * The key which references the environment under which to run the executable.
68 QString
environmentKey() const;
71 * Set the environment under which the executable should be run.
73 void setEnvironmentKey(const QString
& environmentKey
);
76 * The argument list to pass to the executable.
78 QStringList
arguments() const;
81 * Add an argument to pass to the executable.
83 void addArgument(const QString
& argument
);
86 * Set the arguments which should be passed to the executable.
88 void setArguments(const QStringList
& arguments
);
91 * Clear all arguments.
93 void clearArguments();
96 * The requested instrumentor, usually one of 'default', 'gdb', 'memcheck' etc.
98 QString
instrumentor() const;
101 * Set which instrumentor should be used to run the executable.
103 void setInstrumentor(const QString
& instrumentor
);
106 * The argument list to pass to the executable.
108 QStringList
instrumentorArguments() const;
111 * Add an argument to pass to the executable.
113 void addInstrumentorArgument(const QString
& argument
);
116 * Set the arguments which should be passed to the executable.
118 void setInstrumentorArguments(const QStringList
& arguments
);
121 * Clear all arguments.
123 void clearInstrumentorArguments();
126 * Set the project items that should be compiled before executing
128 void setCompilationDependencies(const QList
<ProjectBaseItem
*>& c
);
131 * Clear all compilation dependencies.
133 void clearCompilationDependencies();
136 * The requested compilation dependencies
138 QList
<ProjectBaseItem
*> compilationDependencies() const;
143 QSharedDataPointer
<IRunPrivate
> d
;