Fix no newlines warnings. Patch by Peter Oberndorfer
[kdevelopdvcssupport.git] / interfaces / iruncontroller.h
blob0abf4d9c5899ddc2e1313dd26571043284865bb7
1 /* This file is part of KDevelop
2 Copyright 2007-2008 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.
20 #ifndef IRUNCONTROLLER_H
21 #define IRUNCONTROLLER_H
23 #include <QtCore/QObject>
25 #include <kjobtrackerinterface.h>
27 #include "interfacesexport.h"
29 namespace KDevelop
32 class IRun;
34 /**
35 * The main controller for running processes.
37 class KDEVPLATFORMINTERFACES_EXPORT IRunController : public KJobTrackerInterface
39 Q_OBJECT
40 Q_ENUMS(State)
41 public:
42 ///Constructor.
43 IRunController(QObject *parent);
45 /**
46 * Request the provided \a run object to be executed.
48 * \return the serial number for the run job, or -1 if \a run could not be executed.
50 Q_SCRIPTABLE virtual KJob* execute(const IRun& run) = 0;
52 /**
53 * Provide the default run object.
55 virtual IRun defaultRun() const = 0;
57 /**
58 * Interrogate the current managed jobs
60 Q_SCRIPTABLE virtual QList<KJob*> currentJobs() const = 0;
62 /**
63 * An enumeration of the possible states for the run controller.
65 enum State {
66 Idle /**< No processes are currently running */,
67 Running /**< processes are currently running */
70 public Q_SLOTS:
71 /**
72 * Request for all running processes to be killed.
74 virtual void stopAllProcesses() = 0;
76 Q_SIGNALS:
77 /**
78 * Notify that the state of the run controller has changed to \a {state}.
80 void runStateChanged(State state);
82 /**
83 * Notify that a new job has been registered.
85 void jobRegistered(KJob* job);
87 /**
88 * Notify that a job has been unregistered.
90 void jobUnregistered(KJob* job);
95 #endif // IRUNCONTROLLER_H