Update Hyperion.h

Former-commit-id: 932b50f14d2d2365d158f21290ddbf95cf7df0af
This commit is contained in:
AEtHeLsYn 2015-12-22 10:09:47 +01:00
parent 27c41acdee
commit 257532df74

View File

@ -13,6 +13,8 @@
// Hyperion includes
#include <hyperion/LedString.h>
#include <hyperion/PriorityMuxer.h>
#include <hyperion/ColorTransform.h>
#include <hyperion/ColorCorrection.h>
// Effect engine includes
#include <effectengine/EffectDefinition.h>
@ -22,8 +24,12 @@ class LedDevice;
class ColorTransform;
class EffectEngine;
class HsvTransform;
class HslTransform;
class RgbChannelTransform;
class RgbChannelCorrection;
class MultiColorTransform;
class MultiColorCorrection;
class MultiColorTemperature;
///
/// The main class of Hyperion. This gives other 'users' access to the attached LedDevice through
@ -115,15 +121,30 @@ public slots:
/// @return The list with transform identifiers
///
const std::vector<std::string> & getTransformIds() const;
///
/// Returns the list with unique transform identifiers
/// @return The list with correction identifiers
///
const std::vector<std::string> & getCorrectionIds() const;
///
/// Returns the ColorTransform with the given identifier
/// @return The transform with the given identifier (or nullptr if the identifier does not exist)
///
ColorTransform * getTransform(const std::string& id);
///
/// Returns the ColorTransform with the given identifier
/// @return The transform with the given identifier (or nullptr if the identifier does not exist)
///
ColorCorrection * getCorrection(const std::string& id);
/// Tell Hyperion that the transforms have changed and the leds need to be updated
void transformsUpdated();
/// Tell Hyperion that the corrections have changed and the leds need to be updated
void correctionsUpdated();
///
/// Clears the given priority channel. This will switch the led-colors to the colors of the next
@ -163,9 +184,14 @@ public:
static LedString createLedString(const Json::Value & ledsConfig, const ColorOrder deviceOrder);
static MultiColorTransform * createLedColorsTransform(const unsigned ledCnt, const Json::Value & colorTransformConfig);
static MultiColorCorrection * createLedColorsCorrection(const unsigned ledCnt, const Json::Value & colorCorrectionConfig);
static MultiColorCorrection * createLedColorsTemperature(const unsigned ledCnt, const Json::Value & colorTemperatureConfig);
static ColorTransform * createColorTransform(const Json::Value & transformConfig);
static ColorCorrection * createColorCorrection(const Json::Value & correctionConfig);
static HsvTransform * createHsvTransform(const Json::Value & hsvConfig);
static HslTransform * createHslTransform(const Json::Value & hslConfig);
static RgbChannelTransform * createRgbChannelTransform(const Json::Value& colorConfig);
static RgbChannelCorrection * createRgbChannelCorrection(const Json::Value& colorConfig);
static LedDevice * createColorSmoothing(const Json::Value & smoothingConfig, LedDevice * ledDevice);
@ -192,9 +218,15 @@ private:
/// The priority muxer
PriorityMuxer _muxer;
/// The transformation from raw colors to led colors
/// The transformation from corrected colors to led colors
MultiColorTransform * _raw2ledTransform;
/// The correction from raw colors to led colors
MultiColorCorrection * _raw2ledCorrection;
/// The temperature from corrected colors to led colors
MultiColorCorrection * _raw2ledTemperature;
/// The actual LedDevice
LedDevice * _device;