mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Fix bug: Only 1 EffectEngine allowed; SetColors implemented for EffectEngine
Former-commit-id: ae8141ebd530b7735ffa7818dc3c690913769070
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
// pre-declarioation
|
||||
class Effect;
|
||||
typedef struct _ts PyThreadState;
|
||||
|
||||
class EffectEngine : public QObject
|
||||
{
|
||||
@@ -34,4 +35,6 @@ private:
|
||||
std::map<std::string, std::string> _availableEffects;
|
||||
|
||||
std::list<Effect *> _activeEffects;
|
||||
|
||||
PyThreadState * _mainThreadState;
|
||||
};
|
||||
|
@@ -70,6 +70,41 @@ public:
|
||||
///
|
||||
unsigned getLedCount() const;
|
||||
|
||||
///
|
||||
/// Returns the value of a specific color transform
|
||||
///
|
||||
/// @param[in] transform The type of transform
|
||||
/// @param[in] color The color channel to which the transform applies (only applicable for
|
||||
/// Transform::THRESHOLD, Transform::GAMMA, Transform::BLACKLEVEL,
|
||||
/// Transform::WHITELEVEL)
|
||||
///
|
||||
/// @return The value of the specified color transform
|
||||
///
|
||||
double getTransform(Transform transform, Color color) const;
|
||||
|
||||
///
|
||||
/// Returns a list of active priorities
|
||||
///
|
||||
/// @return The list with priorities
|
||||
///
|
||||
QList<int> getActivePriorities() const;
|
||||
|
||||
///
|
||||
/// Returns the information of a specific priorrity channel
|
||||
///
|
||||
/// @param[in] priority The priority channel
|
||||
///
|
||||
/// @return The information of the given
|
||||
///
|
||||
/// @throw std::runtime_error when the priority channel does not exist
|
||||
///
|
||||
const InputInfo& getPriorityInfo(const int priority) const;
|
||||
|
||||
/// Get the list of available effects
|
||||
/// @return The list of available effects
|
||||
std::list<std::string> getEffects() const;
|
||||
|
||||
public slots:
|
||||
///
|
||||
/// Writes a single color to all the leds for the given time and priority
|
||||
///
|
||||
@@ -112,40 +147,6 @@ public:
|
||||
///
|
||||
void clearall();
|
||||
|
||||
///
|
||||
/// Returns the value of a specific color transform
|
||||
///
|
||||
/// @param[in] transform The type of transform
|
||||
/// @param[in] color The color channel to which the transform applies (only applicable for
|
||||
/// Transform::THRESHOLD, Transform::GAMMA, Transform::BLACKLEVEL,
|
||||
/// Transform::WHITELEVEL)
|
||||
///
|
||||
/// @return The value of the specified color transform
|
||||
///
|
||||
double getTransform(Transform transform, Color color) const;
|
||||
|
||||
///
|
||||
/// Returns a list of active priorities
|
||||
///
|
||||
/// @return The list with priorities
|
||||
///
|
||||
QList<int> getActivePriorities() const;
|
||||
|
||||
///
|
||||
/// Returns the information of a specific priorrity channel
|
||||
///
|
||||
/// @param[in] priority The priority channel
|
||||
///
|
||||
/// @return The information of the given
|
||||
///
|
||||
/// @throw std::runtime_error when the priority channel does not exist
|
||||
///
|
||||
const InputInfo& getPriorityInfo(const int priority) const;
|
||||
|
||||
/// Get the list of available effects
|
||||
/// @return The list of available effects
|
||||
std::list<std::string> getEffects() const;
|
||||
|
||||
/// Run the specified effect on the given priority channel and optionally specify a timeout
|
||||
/// @param effectName Name of the effec to run
|
||||
/// @param priority The priority channel of the effect
|
||||
|
Reference in New Issue
Block a user