#pragma once // STL includes #include #include #include // Hyperion includes #include #include /// /// The LedColorTransform is responsible for performing color transformation from 'raw' colors /// received as input to colors mapped to match the color-properties of the leds. /// class MultiColorAdjustment { public: MultiColorAdjustment(unsigned ledCnt); ~MultiColorAdjustment(); /** * Adds a new ColorAdjustment to this MultiColorTransform * * @param adjustment The new ColorAdjustment (ownership is transfered) */ void addAdjustment(ColorAdjustment * adjustment); void setAdjustmentForLed(const QString& id, const unsigned startLed, unsigned endLed); bool verifyAdjustments() const; void setBacklightEnabled(bool enable); /// /// Returns the identifier of all the unique ColorAdjustment /// /// @return The list with unique id's of the ColorAdjustment const QStringList & getAdjustmentIds(); /// /// Returns the pointer to the ColorAdjustment with the given id /// /// @param id The identifier of the ColorAdjustment /// /// @return The ColorAdjustment with the given id (or nullptr if it does not exist) /// ColorAdjustment* getAdjustment(const QString& id); /// /// Performs the color adjustment from raw-color to led-color /// /// @param ledColors The list with raw colors /// void applyAdjustment(std::vector& ledColors); private: /// List with transform ids QStringList _adjustmentIds; /// List with unique ColorTransforms std::vector _adjustment; /// List with a pointer to the ColorAdjustment for each individual led std::vector _ledAdjustments; // logger instance Logger * _log; };