]> git.lyx.org Git - lyx.git/blob - src/support/SystemcallPrivate.h
98073dadfa7dc5739874937d57db0df75bcd2731
[lyx.git] / src / support / SystemcallPrivate.h
1 // -*- C++ -*-
2 /**
3  * \file SystemcallPrivate.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Peter Kümmel
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef LYX_SUPPORT_SYSTEMCALLPRIVATE_H
13 #define LYX_SUPPORT_SYSTEMCALLPRIVATE_H
14
15 #include <QObject>
16 #include <QProcess>
17
18 #include <string>
19
20
21 namespace lyx {
22 namespace support {
23
24 class ProgressInterface;
25
26 class SystemcallPrivate : public QObject
27 {
28         Q_OBJECT
29
30 public:
31         SystemcallPrivate();
32
33         // When waitForFinished == true :   returns the exit code of the process
34         // When waitForFinished == false:   returns 0 if the process could be started
35         int start(const std::string & cmd, bool waitForFinished);
36
37 public Q_SLOTS:
38         void newProcessOutput();
39         void processStarted();
40         void processError(QProcess::ProcessError);
41         void processFinished(int, QProcess::ExitStatus);
42         
43 private:
44         QProcess process;
45 };
46
47
48 } // namespace support
49 } // namespace lyx
50
51 #endif // LYX_SUPPORT_SYSTEMCALLPRIVATE_H