Code_TYMPAN  4.4.0
Industrial site acoustic simulation
Public Slots | Signals | Public Member Functions | Private Attributes | List of all members
PythonRunner Class Reference

Runs the blocking python(...) computation in a worker thread. More...

#include <PythonRunner.h>

Inheritance diagram for PythonRunner:
Inheritance graph
[legend]
Collaboration diagram for PythonRunner:
Collaboration graph
[legend]

Public Slots

void run ()
 Call this slot to start the computation (meant to be invoked from the worker thread). More...
 

Signals

void finished (bool ok, QString errorMsg)
 Emitted when the computation completes. More...
 

Public Member Functions

 PythonRunner (QStringList args, QObject *parent=nullptr)
 

Private Attributes

QStringList m_args
 

Detailed Description

Runs the blocking python(...) computation in a worker thread.

The object lives in a QThread. Call the slot run() (e.g., on QThread::started). When finished, it emits finished(bool ok, QString errorMsg).

User-facing messages remain in French (they are produced inside python()).

Definition at line 35 of file PythonRunner.h.

Constructor & Destructor Documentation

◆ PythonRunner()

PythonRunner::PythonRunner ( QStringList  args,
QObject *  parent = nullptr 
)
explicit

Definition at line 24 of file PythonRunner.cpp.

Member Function Documentation

◆ finished

void PythonRunner::finished ( bool  ok,
QString  errorMsg 
)
signal

Emitted when the computation completes.

Parameters
oktrue on success, false otherwise.
errorMsgHuman-readable message (French) set on failure.
Here is the caller graph for this function:

◆ run

void PythonRunner::run ( )
slot

Call this slot to start the computation (meant to be invoked from the worker thread).

Definition at line 26 of file PythonRunner.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ m_args

QStringList PythonRunner::m_args
private

Definition at line 54 of file PythonRunner.h.


The documentation for this class was generated from the following files: