mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Fix 1181 - Effects were not started from tray (#1199)
* Fix 1181, add constants and defaults * Include #1195 changes
This commit is contained in:
@@ -21,6 +21,9 @@ class Effect : public QThread
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
static const int ENDLESS;
|
||||
|
||||
friend class EffectModule;
|
||||
|
||||
Effect(Hyperion *hyperion
|
||||
@@ -53,12 +56,11 @@ public:
|
||||
bool isInterruptionRequested();
|
||||
|
||||
///
|
||||
/// @brief Get the remaining timeout, or 0 if there
|
||||
/// is no timeout for this effect.
|
||||
/// @brief Get the remaining timeout, or indication it is endless
|
||||
///
|
||||
/// @return The flag state
|
||||
///
|
||||
int getRemaining();
|
||||
int getRemaining() const;
|
||||
|
||||
|
||||
QString getScript() const { return _script; }
|
||||
@@ -88,7 +90,7 @@ private:
|
||||
const QJsonObject _args;
|
||||
const QString _imageData;
|
||||
|
||||
int64_t _endTime;
|
||||
qint64 _endTime;
|
||||
|
||||
/// Buffer for colorData
|
||||
QVector<ColorRgb> _colors;
|
||||
|
@@ -13,6 +13,7 @@
|
||||
|
||||
// Effect engine includes
|
||||
#include <effectengine/EffectDefinition.h>
|
||||
#include <effectengine/Effect.h>
|
||||
#include <effectengine/ActiveEffectDefinition.h>
|
||||
#include <effectengine/EffectSchema.h>
|
||||
#include <utils/Logger.h>
|
||||
@@ -69,13 +70,13 @@ signals:
|
||||
|
||||
public slots:
|
||||
/// Run the specified effect on the given priority channel and optionally specify a timeout
|
||||
int runEffect(const QString &effectName, int priority, int timeout = -1, const QString &origin="System");
|
||||
int runEffect(const QString &effectName, int priority, int timeout = Effect::ENDLESS, const QString &origin="System");
|
||||
|
||||
/// Run the specified effect on the given priority channel and optionally specify a timeout
|
||||
int runEffect(const QString &effectName
|
||||
, const QJsonObject &args
|
||||
, int priority
|
||||
, int timeout = -1
|
||||
, int timeout = Effect::ENDLESS
|
||||
, const QString &pythonScript = ""
|
||||
, const QString &origin = "System"
|
||||
, unsigned smoothCfg=0
|
||||
@@ -102,7 +103,7 @@ private:
|
||||
,const QString &name
|
||||
, const QJsonObject &args
|
||||
, int priority
|
||||
, int timeout = -1
|
||||
, int timeout = Effect::ENDLESS
|
||||
, const QString &origin="System"
|
||||
, unsigned smoothCfg=0
|
||||
, const QString &imageData = ""
|
||||
|
Reference in New Issue
Block a user