mirror of
				https://github.com/hyperion-project/hyperion.ng.git
				synced 2025-03-01 10:33:28 +00:00 
			
		
		
		
	* implement most points for a adjustable image2leds mapping * implement new adjustable led mapping type
		
			
				
	
	
		
			54 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			54 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| #pragma once
 | |
| 
 | |
| // STL includes
 | |
| #include <memory>
 | |
| 
 | |
| // QT includes
 | |
| #include <QJsonObject>
 | |
| 
 | |
| #include <hyperion/LedString.h>
 | |
| 
 | |
| // Forward class declaration
 | |
| class ImageProcessor;
 | |
| 
 | |
| ///
 | |
| /// The ImageProcessor is a singleton factor for creating ImageProcessors that translate images to
 | |
| /// led color values.
 | |
| ///
 | |
| class ImageProcessorFactory
 | |
| {
 | |
| public:
 | |
| 	///
 | |
| 	/// Returns the 'singleton' instance (creates the singleton if it does not exist)
 | |
| 	///
 | |
| 	/// @return The singleton instance of the ImageProcessorFactory
 | |
| 	///
 | |
| 	static ImageProcessorFactory& getInstance();
 | |
| 
 | |
| public:
 | |
| 	///
 | |
| 	/// Initialises this factory with the given led-configuration
 | |
| 	///
 | |
| 	/// @param[in] ledString  The led configuration
 | |
| 	/// @param[in] blackborderConfig Contains the blackborder configuration
 | |
| 	///
 | |
| 	void init(const LedString& ledString, const QJsonObject &blackborderConfig, int mappingType);
 | |
| 
 | |
| 	///
 | |
| 	/// Creates a new ImageProcessor. The onwership of the processor is transferred to the caller.
 | |
| 	///
 | |
| 	/// @return The newly created ImageProcessor
 | |
| 	///
 | |
| 	ImageProcessor* newImageProcessor() const;
 | |
| 
 | |
| private:
 | |
| 	/// The Led-string specification
 | |
| 	LedString _ledString;
 | |
| 
 | |
| 	/// Reference to the blackborder json configuration values
 | |
| 	QJsonObject _blackborderConfig;
 | |
| 
 | |
| 	// image 2 led mapping type
 | |
| 	int _mappingType;
 | |
| };
 |