mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Cleanup
This commit is contained in:
@@ -1,17 +1,6 @@
|
||||
// stl includes
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <cmath>
|
||||
|
||||
// Qt includes
|
||||
#include <QDateTime>
|
||||
#include <QFile>
|
||||
#include <Qt>
|
||||
#include <QLinearGradient>
|
||||
#include <QConicalGradient>
|
||||
#include <QRadialGradient>
|
||||
#include <QRect>
|
||||
#include <QImageReader>
|
||||
#include <QResource>
|
||||
|
||||
// effect engin eincludes
|
||||
@@ -20,11 +9,8 @@
|
||||
#include <utils/Logger.h>
|
||||
#include <hyperion/Hyperion.h>
|
||||
|
||||
// python utils/ global mainthread
|
||||
// python utils
|
||||
#include <python/PythonProgram.h>
|
||||
#include <python/PythonUtils.h>
|
||||
//impl
|
||||
PyThreadState* mainThreadState;
|
||||
|
||||
Effect::Effect(Hyperion *hyperion, int priority, int timeout, const QString &script, const QString &name, const QJsonObject &args, const QString &imageData)
|
||||
: QThread()
|
||||
@@ -100,19 +86,13 @@ void Effect::run()
|
||||
|
||||
// Run the effect script
|
||||
QFile file (_script);
|
||||
QByteArray python_code;
|
||||
if (file.open(QIODevice::ReadOnly))
|
||||
{
|
||||
python_code = file.readAll();
|
||||
program.execute(file.readAll());
|
||||
}
|
||||
else
|
||||
{
|
||||
Error(_log, "Unable to open script file %s.", QSTRING_CSTR(_script));
|
||||
}
|
||||
file.close();
|
||||
|
||||
if (!python_code.isEmpty())
|
||||
{
|
||||
program.execute(python_code);
|
||||
}
|
||||
}
|
||||
|
@@ -4,10 +4,6 @@
|
||||
|
||||
// Qt includes
|
||||
#include <QResource>
|
||||
#include <QMetaType>
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
#include <QMap>
|
||||
|
||||
// hyperion util includes
|
||||
#include <utils/jsonschema/QJsonSchemaChecker.h>
|
||||
|
Reference in New Issue
Block a user