Skip to content

Libs/Application/Job/PythonWorker.h

Namespaces

Name
shapeworks
User usage reporting (telemetry)

Classes

Name
class shapeworks::PythonWorker

Source code

```cpp

pragma once

// qt

include

include

// vtk

include

// studio

include

include

namespace shapeworks { class PythonLogger;

class PythonWorker : public QObject { Q_OBJECT

public: constexpr static const char* python_api_version = "6.7";

PythonWorker(); ~PythonWorker();

void set_vtk_output_window(vtkSmartPointer output_window); void set_cli_mode(bool cli_mode);

void run_job(QSharedPointer job); void set_current_job(QSharedPointer job);

void incoming_python_message(std::string message_string); void incoming_python_progress(double value, std::string message);

void end_python();

void abort_job();

public Q_SLOTS:

bool init();

void start_job(QSharedPointer job);

void finalize_python();

Q_SIGNALS:

void result_ready(); void finished();

private: bool initialized_ = false; bool initialized_success_ = false;

vtkSmartPointer studio_vtk_output_window_;

QSharedPointer python_logger_;

QSharedPointer current_job_;

QThread* thread_{nullptr}; }; } // namespace shapeworks ```


Updated on 2026-03-31 at 16:02:11 +0000