stec-platform
workerthreadfb.h
1 #ifndef WORKERTHREADFB_H
2 #define WORKERTHREADFB_H
3 
4 #include "platformu_global.h"
5 #include <QThread>
6 #include <QStringList>
7 #include <QObject>
8 #include <QProcess>
9 
14 class PLATFORMUSHARED_EXPORT WorkerThreadFB : public QThread
15 {
16 
17  Q_OBJECT
18 
19 private :
20 
21  QProcess *compilerProcess;
22  QVariant userData;
23  bool finished;
24 
25 public:
26  WorkerThreadFB( QVariant UserData = QVariant(-1), QObject *parent = nullptr);
27  virtual ~WorkerThreadFB();
28  void RunProcess( QString cmd, QStringList arguments, QString WorkingDir = QString() );
29 
31  void WriteLine( QString line);
32 
33  private slots :
34 
35  void PRSlotRunCmd( QString cmd, QStringList Parameters, QString workingDir );
36  void PRSlotWrite ( QString output);
37  void slot_endCompile(int exitCode);
38  void slot_endln();
39  void slot_endlnError();
40 
41  signals :
42  void PRSigRunCmd( QString cmd, QStringList Parameters, QString workingDir );
43  void PRSigWrite( QString output);
44 
45  public slots :
46 
47  signals :
48 
50  void SignalFinishedError( QVariant UserData, QStringList stdouts );
51 
53  void SignalLineInput( QVariant UserData, QStringList stdouts );
54 
56  void SignalExit( int pgmExitValue);
57 };
58 
59 #endif // WORKERTHREADFB_H
The WorkerThreadFB class.
Definition: workerthreadfb.h:15
void SignalLineInput(QVariant UserData, QStringList stdouts)
connect here for the stderr coming from the process running
void SignalExit(int pgmExitValue)
process exited with this
void SignalFinishedError(QVariant UserData, QStringList stdouts)
connect here, for information coming in from a process running, the stdout of the process