2014-09-02 08:21:17 +00:00
|
|
|
#ifndef CSM_DOC_RUNNER_H
|
|
|
|
#define CSM_DOC_RUNNER_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QProcess>
|
|
|
|
|
|
|
|
namespace CSMDoc
|
|
|
|
{
|
|
|
|
class Runner : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
QProcess mProcess;
|
2014-09-02 09:56:35 +00:00
|
|
|
bool mRunning;
|
2014-09-02 08:21:17 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
Runner();
|
|
|
|
|
|
|
|
void start();
|
|
|
|
|
|
|
|
void stop();
|
|
|
|
|
2014-09-02 09:56:35 +00:00
|
|
|
/// \note Running state is entered when the start function is called. This
|
|
|
|
/// is not necessarily identical to the moment the child process is started.
|
|
|
|
bool isRunning() const;
|
|
|
|
|
2014-09-02 08:21:17 +00:00
|
|
|
signals:
|
|
|
|
|
2014-09-02 09:56:35 +00:00
|
|
|
void runStateChanged();
|
2014-09-02 08:21:17 +00:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
void finished (int exitCode, QProcess::ExitStatus exitStatus);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|