Fork me on GitHub
2.15.20
FGx
A cross-platform launcher for FlightGear
xprocess.h
Go to the documentation of this file.
1 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-
2 // FGx FlightGear Launcher // xporcess.h
3 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-
4 // (c) 2010-2012
5 // Yves Sablonier, Pete Morgan
6 // Geoff McLane
7 // GNU GPLv2, see main.cpp and shipped licence.txt for further information
8 
9 #ifndef XPROCESS_H
10 #define XPROCESS_H
11 
12 #include <QObject>
13 #include <QProcess>
14 #include <QStringList>
15 
16 #include "xobjects/mainobject.h"
17 
18 class MainObject;
19 
20 class XProcess : public QObject
21 {
22 Q_OBJECT
23 public:
24  explicit XProcess(MainObject *mainObject, QString log_type_ki, QObject *parent = 0);
25 
27  QProcess *process;
28  QString log_name;
29 
30  int get_pid();
31 
32 signals:
33  void running(bool);
34 
35 public slots:
36 
37  void start(QString command_line, QStringList user_env);
38  void stop();
39 
40  void on_process_state_change(QProcess::ProcessState state);
41  void on_process_output();
42  void on_process_finished(int code, QProcess::ExitStatus status);
43  void on_process_error(QProcess::ProcessError error);
44 
45 };
46 
47 #endif // XPROCESS_H
void on_process_state_change(QProcess::ProcessState state)
Definition: xprocess.cpp:68
void on_process_finished(int code, QProcess::ExitStatus status)
Definition: xprocess.cpp:92
QProcess * process
Definition: xprocess.h:27
void running(bool)
The MainObject is an extended QObject, and the main "controller" for FGx.
Definition: mainobject.h:66
MainObject * mainObject
Definition: xprocess.h:26
void on_process_output()
Definition: xprocess.cpp:83
void start(QString command_line, QStringList user_env)
Definition: xprocess.cpp:41
int get_pid()
Definition: xprocess.cpp:131
XProcess(MainObject *mainObject, QString log_type_ki, QObject *parent=0)
Definition: xprocess.cpp:15
void on_process_error(QProcess::ProcessError error)
Definition: xprocess.cpp:100
void stop()
Definition: xprocess.cpp:60
QString log_name
Definition: xprocess.h:28