1515#include < QScopedPointer>
1616#include < QSharedPointer>
1717#include < QElapsedTimer>
18+ #include < QThread>
1819
1920// hyperion-utils includes
2021#include < utils/Image.h>
2526// Hyperion includes
2627#include < hyperion/LedString.h>
2728#include < hyperion/PriorityMuxer.h>
29+ #include < hyperion/MultiColorAdjustment.h>
2830#include < hyperion/ColorAdjustment.h>
2931#include < hyperion/ComponentRegister.h>
3032
33+ #include < hyperion/SettingsManager.h>
34+ #include < hyperion/CaptureCont.h>
35+ #include < hyperion/BGEffectHandler.h>
36+
37+ #include < leddevice/LedDeviceWrapper.h>
38+ #include < boblightserver/BoblightServer.h>
39+
3140#if defined(ENABLE_EFFECTENGINE)
41+ #include < effectengine/EffectEngine.h>
3242#include < effectengine/ActiveEffectDefinition.h>
3343#endif
3444
3848#include < utils/settings.h>
3949
4050// Forward class declaration
41- class HyperionDaemon ;
42- class HyperionIManager ;
4351class ImageProcessor ;
4452class LinearColorSmoothing ;
45- #if defined(ENABLE_EFFECTENGINE)
46- class EffectEngine ;
47- #endif
48- class MultiColorAdjustment ;
49- class ColorAdjustment ;
50- class SettingsManager ;
51- class BGEffectHandler ;
52- class CaptureCont ;
53- #if defined(ENABLE_BOBLIGHT_SERVER)
54- class BoblightServer ;
55- #endif
56- class LedDeviceWrapper ;
5753class Logger ;
5854
5955// /
@@ -69,9 +65,10 @@ class Hyperion : public QObject
6965 using InputInfo = PriorityMuxer::InputInfo;
7066
7167 // /
72- // / Destructor; cleans up resources
68+ // / @brief Constructs the Hyperion instance
69+ // / @param instance The instance index
7370 // /
74- ~ Hyperion () override ;
71+ explicit Hyperion (quint8 instance, QObject* parent = nullptr ) ;
7572
7673 ImageProcessor* getImageProcessor () const { return _imageProcessor.get (); }
7774
@@ -205,7 +202,7 @@ public slots:
205202 // / @brief Get a pointer to the effect engine
206203 // / @return EffectEngine instance pointer
207204 // /
208- EffectEngine* getEffectEngineInstance () const { return _effectEngine. get () ; }
205+ QSharedPointer< EffectEngine> getEffectEngineInstance () const { return _effectEngine; }
209206
210207 // / Run the specified effect on the given priority channel and optionally specify a timeout
211208 // / @param effectName Name of the effec to run
@@ -321,7 +318,7 @@ public slots:
321318 // / @brief Get the component Register
322319 // / return Component register pointer
323320 // /
324- ComponentRegister* getComponentRegister () const { return _componentRegister. get () ; }
321+ QSharedPointer< ComponentRegister> getComponentRegister () const { return _componentRegister; }
325322
326323 // /
327324 // / @brief Called from components to update their current state. DO NOT CALL FROM USERS
@@ -512,15 +509,6 @@ private slots:
512509 void handleSourceAvailability (int priority);
513510
514511private:
515- friend class HyperionDaemon ;
516-
517- // /
518- // / @brief Constructs the Hyperion instance, just accessible for HyperionIManager
519- // / @param instance The instance index
520- // /
521- explicit Hyperion (quint8 instance, QObject* parent = nullptr );
522-
523- friend class HyperionIManager ; // Grant HyperionIManager access to private members
524512
525513 void updateLedColorAdjustment (int ledCount, const QJsonObject& colors);
526514 void updateLedLayout (const QJsonArray& ledLayout);
@@ -556,7 +544,7 @@ private slots:
556544
557545#if defined(ENABLE_EFFECTENGINE)
558546 // / Effect engine
559- QScopedPointer <EffectEngine, QScopedPointerDeleteLater > _effectEngine;
547+ QSharedPointer <EffectEngine> _effectEngine;
560548#endif
561549
562550 // / Logger instance
0 commit comments