mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
41 lines
523 B
C++
41 lines
523 B
C++
#pragma once
|
|
|
|
// Qt includes
|
|
#include <QThread>
|
|
|
|
// Python includes
|
|
#include <Python.h>
|
|
|
|
class Effect : public QThread
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
Effect(int priority, int timeout);
|
|
virtual ~Effect();
|
|
|
|
virtual void run();
|
|
|
|
bool isAbortedRequested() const;
|
|
|
|
int getPriority() const;
|
|
|
|
public slots:
|
|
void abort();
|
|
|
|
signals:
|
|
void effectFinished(Effect * effect);
|
|
|
|
private slots:
|
|
void effectFinished();
|
|
|
|
private:
|
|
const int _priority;
|
|
|
|
const int _timeout;
|
|
|
|
PyThreadState * _interpreterThreadState;
|
|
|
|
bool _abortRequested;
|
|
};
|