mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
3bd1789c42
Former-commit-id: ae8141ebd530b7735ffa7818dc3c690913769070
41 lines
831 B
C++
41 lines
831 B
C++
#pragma once
|
|
|
|
#include <hyperion/Hyperion.h>
|
|
|
|
// pre-declarioation
|
|
class Effect;
|
|
typedef struct _ts PyThreadState;
|
|
|
|
class EffectEngine : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
EffectEngine(Hyperion * hyperion);
|
|
virtual ~EffectEngine();
|
|
|
|
std::list<std::string> getEffects() const;
|
|
|
|
public slots:
|
|
/// Run the specified effect on the given priority channel and optionally specify a timeout
|
|
int runEffect(const std::string &effectName, int priority, int timeout = -1);
|
|
|
|
/// Clear any effect running on the provided channel
|
|
void channelCleared(int priority);
|
|
|
|
/// Clear all effects
|
|
void allChannelsCleared();
|
|
|
|
private slots:
|
|
void effectFinished(Effect * effect);
|
|
|
|
private:
|
|
Hyperion * _hyperion;
|
|
|
|
std::map<std::string, std::string> _availableEffects;
|
|
|
|
std::list<Effect *> _activeEffects;
|
|
|
|
PyThreadState * _mainThreadState;
|
|
};
|