mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Merge remote-tracking branch 'origin/master' into 1804
This commit is contained in:
@@ -24,13 +24,13 @@ public:
|
||||
|
||||
friend class EffectModule;
|
||||
|
||||
Effect(Hyperion *hyperion
|
||||
, int priority
|
||||
, int timeout
|
||||
, const QString &script
|
||||
, const QString &name
|
||||
, const QJsonObject &args = QJsonObject()
|
||||
, const QString &imageData = ""
|
||||
Effect(Hyperion* hyperion
|
||||
, int priority
|
||||
, int timeout
|
||||
, const QString& script
|
||||
, const QString& name
|
||||
, const QJsonObject& args = QJsonObject()
|
||||
, const QString& imageData = ""
|
||||
);
|
||||
~Effect() override;
|
||||
|
||||
@@ -64,20 +64,20 @@ public:
|
||||
QString getScript() const { return _script; }
|
||||
QString getName() const { return _name; }
|
||||
|
||||
int getTimeout() const {return _timeout; }
|
||||
int getTimeout() const { return _timeout; }
|
||||
bool isEndless() const { return _isEndless; }
|
||||
|
||||
QJsonObject getArgs() const { return _args; }
|
||||
|
||||
signals:
|
||||
void setInput(int priority, const std::vector<ColorRgb> &ledColors, int timeout_ms, bool clearEffect);
|
||||
void setInputImage(int priority, const Image<ColorRgb> &image, int timeout_ms, bool clearEffect);
|
||||
void setInput(int priority, const std::vector<ColorRgb>& ledColors, int timeout_ms, bool clearEffect);
|
||||
void setInputImage(int priority, const Image<ColorRgb>& image, int timeout_ms, bool clearEffect);
|
||||
|
||||
private:
|
||||
void setModuleParameters();
|
||||
bool setModuleParameters();
|
||||
void addImage();
|
||||
|
||||
Hyperion *_hyperion;
|
||||
Hyperion* _hyperion;
|
||||
|
||||
const int _priority;
|
||||
|
||||
@@ -95,13 +95,13 @@ private:
|
||||
/// Buffer for colorData
|
||||
QVector<ColorRgb> _colors;
|
||||
|
||||
Logger *_log;
|
||||
Logger* _log;
|
||||
// Reflects whenever this effects should interrupt (timeout or external request)
|
||||
std::atomic<bool> _interupt {};
|
||||
std::atomic<bool> _interupt{};
|
||||
|
||||
QSize _imageSize;
|
||||
QImage _image;
|
||||
QPainter *_painter;
|
||||
QPainter* _painter;
|
||||
QVector<QImage> _imageStack;
|
||||
|
||||
double _lowestUpdateIntervalInSeconds;
|
||||
|
@@ -8,22 +8,16 @@
|
||||
|
||||
class Effect;
|
||||
|
||||
class EffectModule: public QObject
|
||||
class EffectModule : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
// Python 3 module def
|
||||
static struct PyModuleDef moduleDef;
|
||||
|
||||
// Init module
|
||||
static PyObject* PyInit_hyperion();
|
||||
|
||||
// Register module once
|
||||
static void registerHyperionExtensionModule();
|
||||
|
||||
// json 2 python
|
||||
static PyObject * json2python(const QJsonValue & jsonData);
|
||||
static PyObject* json2python(const QJsonValue& jsonData);
|
||||
|
||||
// Wrapper methods for Python interpreter extra buildin methods
|
||||
static PyMethodDef effectMethods[];
|
||||
|
Reference in New Issue
Block a user