mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Pass primitive types by value (#935)
This commit is contained in:
@@ -38,25 +38,25 @@ public:
|
||||
/// @brief Get the unique id (imported from removed class 'Stats')
|
||||
/// @return The unique id
|
||||
///
|
||||
const QString &getID() { return _uuid; };
|
||||
const QString &getID() const { return _uuid; };
|
||||
|
||||
///
|
||||
/// @brief Check authorization is required according to the user setting
|
||||
/// @return True if authorization required else false
|
||||
///
|
||||
const bool &isAuthRequired() { return _authRequired; };
|
||||
bool isAuthRequired() const { return _authRequired; };
|
||||
|
||||
///
|
||||
/// @brief Check if authorization is required for local network connections
|
||||
/// @return True if authorization required else false
|
||||
///
|
||||
const bool &isLocalAuthRequired() { return _localAuthRequired; };
|
||||
bool isLocalAuthRequired() const { return _localAuthRequired; };
|
||||
|
||||
///
|
||||
/// @brief Check if authorization is required for local network connections for admin access
|
||||
/// @return True if authorization required else false
|
||||
///
|
||||
const bool &isLocalAdminAuthRequired() { return _localAdminAuthRequired; };
|
||||
bool isLocalAdminAuthRequired() const { return _localAdminAuthRequired; };
|
||||
|
||||
///
|
||||
/// @brief Reset Hyperion user
|
||||
@@ -158,7 +158,7 @@ public slots:
|
||||
/// @param id The id of the request
|
||||
/// @param accept The accept or deny the request
|
||||
///
|
||||
void handlePendingTokenRequest(const QString &id, const bool &accept);
|
||||
void handlePendingTokenRequest(const QString &id, bool accept);
|
||||
|
||||
///
|
||||
/// @brief Get pending requests
|
||||
@@ -183,7 +183,7 @@ public slots:
|
||||
/// @param type settings type from enum
|
||||
/// @param config configuration object
|
||||
///
|
||||
void handleSettingsUpdate(const settings::type &type, const QJsonDocument &config);
|
||||
void handleSettingsUpdate(settings::type type, const QJsonDocument &config);
|
||||
|
||||
signals:
|
||||
///
|
||||
@@ -201,7 +201,7 @@ signals:
|
||||
/// @param comment The comment that was part of the request
|
||||
/// @param id The id that was part of the request
|
||||
///
|
||||
void tokenResponse(const bool &success, QObject *caller, const QString &token, const QString &comment, const QString &id);
|
||||
void tokenResponse(bool success, QObject *caller, const QString &token, const QString &comment, const QString &id);
|
||||
|
||||
///
|
||||
/// @brief Emits whenever the token list changes
|
||||
@@ -214,7 +214,7 @@ private:
|
||||
/// @brief Increment counter for token/user auth
|
||||
/// @param user If true we increment USER auth instead of token
|
||||
///
|
||||
void setAuthBlock(const bool &user = false);
|
||||
void setAuthBlock(bool user = false);
|
||||
|
||||
/// Database interface for auth table
|
||||
AuthTable *_authTable;
|
||||
|
@@ -29,7 +29,7 @@ private slots:
|
||||
/// @param type settingyType from enum
|
||||
/// @param config configuration object
|
||||
///
|
||||
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config)
|
||||
void handleSettingsUpdate(settings::type type, const QJsonDocument& config)
|
||||
{
|
||||
if(type == settings::BGEFFECT)
|
||||
{
|
||||
|
@@ -18,8 +18,8 @@ class CaptureCont : public QObject
|
||||
public:
|
||||
CaptureCont(Hyperion* hyperion);
|
||||
|
||||
void setSystemCaptureEnable(const bool& enable);
|
||||
void setV4LCaptureEnable(const bool& enable);
|
||||
void setSystemCaptureEnable(bool enable);
|
||||
void setV4LCaptureEnable(bool enable);
|
||||
|
||||
private slots:
|
||||
///
|
||||
@@ -27,14 +27,14 @@ private slots:
|
||||
/// @param component The component from enum
|
||||
/// @param enable The new state
|
||||
///
|
||||
void handleCompStateChangeRequest(const hyperion::Components component, bool enable);
|
||||
void handleCompStateChangeRequest(hyperion::Components component, bool enable);
|
||||
|
||||
///
|
||||
/// @brief Handle settings update from Hyperion Settingsmanager emit or this constructor
|
||||
/// @param type settingyType from enum
|
||||
/// @param config configuration object
|
||||
///
|
||||
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
|
||||
void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
|
||||
|
||||
///
|
||||
/// @brief forward system image
|
||||
|
@@ -27,7 +27,7 @@ public:
|
||||
/// @param comp The component from enum
|
||||
/// @return True if component is running else false. Not found is -1
|
||||
///
|
||||
int isComponentEnabled(const hyperion::Components& comp) const;
|
||||
int isComponentEnabled(hyperion::Components comp) const;
|
||||
|
||||
/// contains all components and their state
|
||||
std::map<hyperion::Components, bool> getRegister() const { return _componentStates; };
|
||||
@@ -38,7 +38,7 @@ signals:
|
||||
/// @param comp The component
|
||||
/// @param state The new state of the component
|
||||
///
|
||||
void updatedComponentState(const hyperion::Components comp, const bool state);
|
||||
void updatedComponentState(hyperion::Components comp, bool state);
|
||||
|
||||
public slots:
|
||||
///
|
||||
@@ -46,13 +46,13 @@ public slots:
|
||||
/// @param comp The component
|
||||
/// @param state The new state of the component
|
||||
///
|
||||
void setNewComponentState(const hyperion::Components comp, const bool activated);
|
||||
void setNewComponentState(hyperion::Components comp, bool activated);
|
||||
|
||||
private slots:
|
||||
///
|
||||
/// @brief Handle COMP_ALL changes from Hyperion->compStateChangeRequest
|
||||
///
|
||||
void handleCompStateChangeRequest(const hyperion::Components comps, const bool activated);
|
||||
void handleCompStateChangeRequest(hyperion::Components comps, bool activated);
|
||||
|
||||
private:
|
||||
/// Hyperion instance
|
||||
|
@@ -29,7 +29,7 @@ class GrabberWrapper : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
GrabberWrapper(QString grabberName, Grabber * ggrabber, unsigned width, unsigned height, const unsigned updateRate_Hz = 0);
|
||||
GrabberWrapper(QString grabberName, Grabber * ggrabber, unsigned width, unsigned height, unsigned updateRate_Hz = 0);
|
||||
|
||||
virtual ~GrabberWrapper();
|
||||
|
||||
@@ -122,7 +122,7 @@ public slots:
|
||||
/// Set the video mode (2D/3D)
|
||||
/// @param[in] mode The new video mode
|
||||
///
|
||||
virtual void setVideoMode(const VideoMode& videoMode);
|
||||
virtual void setVideoMode(VideoMode videoMode);
|
||||
|
||||
///
|
||||
/// Set the crop values
|
||||
@@ -138,7 +138,7 @@ public slots:
|
||||
/// @param type settingyType from enum
|
||||
/// @param config configuration object
|
||||
///
|
||||
virtual void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
|
||||
virtual void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
|
||||
|
||||
signals:
|
||||
///
|
||||
@@ -149,7 +149,7 @@ signals:
|
||||
private slots:
|
||||
/// @brief Handle a source request event from Hyperion.
|
||||
/// Will start and stop grabber based on active listeners count
|
||||
void handleSourceRequest(const hyperion::Components& component, const int hyperionInd, const bool listen);
|
||||
void handleSourceRequest(hyperion::Components component, int hyperionInd, bool listen);
|
||||
|
||||
///
|
||||
/// @brief Update Update capture rate
|
||||
|
@@ -120,7 +120,7 @@ public slots:
|
||||
/// @param[in] owner Specific owner string, might be empty
|
||||
/// @param[in] smooth_cfg The smooth id to use
|
||||
///
|
||||
void registerInput(const int priority, const hyperion::Components& component, const QString& origin = "System", const QString& owner = "", unsigned smooth_cfg = 0);
|
||||
void registerInput(int priority, hyperion::Components component, const QString& origin = "System", const QString& owner = "", unsigned smooth_cfg = 0);
|
||||
|
||||
///
|
||||
/// @brief Update the current color of a priority (prev registered with registerInput())
|
||||
@@ -131,7 +131,7 @@ public slots:
|
||||
/// @param clearEffect Should be true when NOT called from an effect
|
||||
/// @return True on success, false when priority is not found
|
||||
///
|
||||
bool setInput(const int priority, const std::vector<ColorRgb>& ledColors, const int timeout_ms = -1, const bool& clearEffect = true);
|
||||
bool setInput(int priority, const std::vector<ColorRgb>& ledColors, int timeout_ms = -1, bool clearEffect = true);
|
||||
|
||||
///
|
||||
/// @brief Update the current image of a priority (prev registered with registerInput())
|
||||
@@ -142,7 +142,7 @@ public slots:
|
||||
/// @param clearEffect Should be true when NOT called from an effect
|
||||
/// @return True on success, false when priority is not found
|
||||
///
|
||||
bool setInputImage(const int priority, const Image<ColorRgb>& image, const int64_t timeout_ms = -1, const bool& clearEffect = true);
|
||||
bool setInputImage(int priority, const Image<ColorRgb>& image, int64_t timeout_ms = -1, bool clearEffect = true);
|
||||
|
||||
///
|
||||
/// Writes a single color to all the leds for the given time and priority
|
||||
@@ -155,14 +155,14 @@ public slots:
|
||||
/// @param[in] origin The setter
|
||||
/// @param clearEffect Should be true when NOT called from an effect
|
||||
///
|
||||
void setColor(const int priority, const std::vector<ColorRgb> &ledColors, const int timeout_ms = -1, const QString& origin = "System" ,bool clearEffects = true);
|
||||
void setColor(int priority, const std::vector<ColorRgb> &ledColors, int timeout_ms = -1, const QString& origin = "System" ,bool clearEffects = true);
|
||||
|
||||
///
|
||||
/// @brief Set the given priority to inactive
|
||||
/// @param priority The priority
|
||||
/// @return True on success false if not found
|
||||
///
|
||||
bool setInputInactive(const quint8& priority);
|
||||
bool setInputInactive(quint8 priority);
|
||||
|
||||
///
|
||||
/// Returns the list with unique adjustment identifiers
|
||||
@@ -187,7 +187,7 @@ public slots:
|
||||
/// @param[in] forceClearAll Force the clear
|
||||
/// @return True on success else false (not found)
|
||||
///
|
||||
bool clear(const int priority, bool forceClearAll=false);
|
||||
bool clear(int priority, bool forceClearAll=false);
|
||||
|
||||
/// #############
|
||||
// EFFECTENGINE
|
||||
@@ -255,14 +255,14 @@ public slots:
|
||||
/// @brief enable/disable automatic/priorized source selection
|
||||
/// @param state The new state
|
||||
///
|
||||
void setSourceAutoSelect(const bool state);
|
||||
void setSourceAutoSelect(bool state);
|
||||
|
||||
///
|
||||
/// @brief set current input source to visible
|
||||
/// @param priority the priority channel which should be vidible
|
||||
/// @return true if success, false on error
|
||||
///
|
||||
bool setVisiblePriority(const int& priority);
|
||||
bool setVisiblePriority(int priority);
|
||||
|
||||
/// gets current state of automatic/priorized source selection
|
||||
/// @return the state
|
||||
@@ -280,7 +280,7 @@ public slots:
|
||||
///
|
||||
/// @return bool
|
||||
///
|
||||
bool isCurrentPriority(const int priority) const;
|
||||
bool isCurrentPriority(int priority) const;
|
||||
|
||||
///
|
||||
/// Returns a list of all registered priorities
|
||||
@@ -296,7 +296,7 @@ public slots:
|
||||
///
|
||||
/// @return The information of the given, a not found priority will return lowest priority as fallback
|
||||
///
|
||||
InputInfo getPriorityInfo(const int priority) const;
|
||||
InputInfo getPriorityInfo(int priority) const;
|
||||
|
||||
/// #############
|
||||
/// SETTINGSMANAGER
|
||||
@@ -305,7 +305,7 @@ public slots:
|
||||
/// @param type The settingsType from enum
|
||||
/// @return Data Document
|
||||
///
|
||||
QJsonDocument getSetting(const settings::type& type) const;
|
||||
QJsonDocument getSetting(settings::type type) const;
|
||||
|
||||
/// gets the current json config object from SettingsManager
|
||||
/// @return json config
|
||||
@@ -317,7 +317,7 @@ public slots:
|
||||
/// @param correct If true will correct json against schema before save
|
||||
/// @return True on success else false
|
||||
///
|
||||
bool saveSettings(QJsonObject config, const bool& correct = false);
|
||||
bool saveSettings(QJsonObject config, bool correct = false);
|
||||
|
||||
/// ############
|
||||
/// COMPONENTREGISTER
|
||||
@@ -332,7 +332,7 @@ public slots:
|
||||
/// @param[in] component The component from enum
|
||||
/// @param[in] state The state of the component [true | false]
|
||||
///
|
||||
void setNewComponentState(const hyperion::Components& component, const bool& state);
|
||||
void setNewComponentState(hyperion::Components component, bool state);
|
||||
|
||||
///
|
||||
/// @brief Get a list of all contrable components and their current state
|
||||
@@ -345,16 +345,16 @@ public slots:
|
||||
/// @param The component to test
|
||||
/// @return Component state
|
||||
///
|
||||
int isComponentEnabled(const hyperion::Components& comp);
|
||||
int isComponentEnabled(hyperion::Components comp);
|
||||
|
||||
/// sets the methode how image is maped to leds at ImageProcessor
|
||||
void setLedMappingType(const int& mappingType);
|
||||
void setLedMappingType(int mappingType);
|
||||
|
||||
///
|
||||
/// Set the video mode (2D/3D)
|
||||
/// @param[in] mode The new video mode
|
||||
///
|
||||
void setVideoMode(const VideoMode& mode);
|
||||
void setVideoMode(VideoMode mode);
|
||||
|
||||
///
|
||||
/// @brief Init after thread start
|
||||
@@ -383,13 +383,13 @@ signals:
|
||||
/// @param component The component from enum
|
||||
/// @param enabled The new state of the component
|
||||
///
|
||||
void compStateChangeRequest(const hyperion::Components component, bool enabled);
|
||||
void compStateChangeRequest(hyperion::Components component, bool enabled);
|
||||
|
||||
///
|
||||
/// @brief Emits whenever the imageToLedsMapping has changed
|
||||
/// @param mappingType The new mapping type
|
||||
///
|
||||
void imageToLedsMappingChanged(const int& mappingType);
|
||||
void imageToLedsMappingChanged(int mappingType);
|
||||
|
||||
///
|
||||
/// @brief Emits whenever the visible priority delivers a image which is applied in update()
|
||||
@@ -410,19 +410,19 @@ signals:
|
||||
///
|
||||
/// @brief Is emitted from clients who request a videoMode change
|
||||
///
|
||||
void videoMode(const VideoMode& mode);
|
||||
void videoMode(VideoMode mode);
|
||||
|
||||
///
|
||||
/// @brief A new videoMode was requested (called from Daemon!)
|
||||
///
|
||||
void newVideoMode(const VideoMode& mode);
|
||||
void newVideoMode(VideoMode mode);
|
||||
|
||||
///
|
||||
/// @brief Emits whenever a config part changed. SIGNAL PIPE helper for SettingsManager -> HyperionDaemon
|
||||
/// @param type The settings type from enum
|
||||
/// @param data The data as QJsonDocument
|
||||
///
|
||||
void settingsChanged(const settings::type& type, const QJsonDocument& data);
|
||||
void settingsChanged(settings::type type, const QJsonDocument& data);
|
||||
|
||||
///
|
||||
/// @brief Emits whenever the adjustments have been updated
|
||||
@@ -459,19 +459,19 @@ private slots:
|
||||
/// @brief Handle whenever the visible component changed
|
||||
/// @param comp The new component
|
||||
///
|
||||
void handleVisibleComponentChanged(const hyperion::Components& comp);
|
||||
void handleVisibleComponentChanged(hyperion::Components comp);
|
||||
|
||||
///
|
||||
/// @brief Apply settings updates for LEDS and COLOR
|
||||
/// @param type The type from enum
|
||||
/// @param config The configuration
|
||||
///
|
||||
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
|
||||
void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
|
||||
|
||||
///
|
||||
/// @brief Apply new videoMode from Daemon to _currVideoMode
|
||||
///
|
||||
void handleNewVideoMode(const VideoMode& mode) { _currVideoMode = mode; }
|
||||
void handleNewVideoMode(VideoMode mode) { _currVideoMode = mode; }
|
||||
|
||||
private:
|
||||
friend class HyperionDaemon;
|
||||
@@ -481,7 +481,7 @@ private:
|
||||
/// @brief Constructs the Hyperion instance, just accessible for HyperionIManager
|
||||
/// @param instance The instance index
|
||||
///
|
||||
Hyperion(const quint8& instance);
|
||||
Hyperion(quint8 instance);
|
||||
|
||||
/// instance index
|
||||
const quint8 _instIndex;
|
||||
|
@@ -38,14 +38,14 @@ public slots:
|
||||
/// @param inst The instance to check
|
||||
/// @return True when running else false
|
||||
///
|
||||
bool IsInstanceRunning(const quint8& inst) { return _runningInstances.contains(inst); }
|
||||
bool IsInstanceRunning(quint8 inst) { return _runningInstances.contains(inst); }
|
||||
|
||||
///
|
||||
/// @brief Get a Hyperion instance by index
|
||||
/// @param intance the index
|
||||
/// @return Hyperion instance, if index is not found returns instance 0
|
||||
///
|
||||
Hyperion* getHyperionInstance(const quint8& instance = 0);
|
||||
Hyperion* getHyperionInstance(quint8 instance = 0);
|
||||
|
||||
///
|
||||
/// @brief Get instance data of all instaces in db + running state
|
||||
@@ -58,20 +58,20 @@ public slots:
|
||||
/// @param block If true return when thread has been started
|
||||
/// @return Return true on success, false if not found in db
|
||||
///
|
||||
bool startInstance(const quint8& inst, const bool& block = false);
|
||||
bool startInstance(quint8 inst, bool block = false);
|
||||
|
||||
///
|
||||
/// @brief Stop a Hyperion instance
|
||||
/// @param instance Instance index
|
||||
/// @return Return true on success, false if not found in db
|
||||
///
|
||||
bool stopInstance(const quint8& inst);
|
||||
bool stopInstance(quint8 inst);
|
||||
|
||||
///
|
||||
/// @brief Toggle the state of all Hyperion instances
|
||||
/// @param pause If true all instances toggle to pause, else to resume
|
||||
///
|
||||
void toggleStateAllInstances(const bool& pause = false);
|
||||
void toggleStateAllInstances(bool pause = false);
|
||||
|
||||
///
|
||||
/// @brief Create a new Hyperion instance entry in db
|
||||
@@ -79,14 +79,14 @@ public slots:
|
||||
/// @param start If true it will be started after creation (async)
|
||||
/// @return Return true on success false if name is already in use or a db error occurred
|
||||
///
|
||||
bool createInstance(const QString& name, const bool& start = false);
|
||||
bool createInstance(const QString& name, bool start = false);
|
||||
|
||||
///
|
||||
/// @brief Delete Hyperion instance entry in db. Cleanup also all associated table data for this instance
|
||||
/// @param inst The instance index
|
||||
/// @return Return true on success, false if not found or not allowed
|
||||
///
|
||||
bool deleteInstance(const quint8& inst);
|
||||
bool deleteInstance(quint8 inst);
|
||||
|
||||
///
|
||||
/// @brief Assign a new name to the given instance
|
||||
@@ -94,7 +94,7 @@ public slots:
|
||||
/// @param name The instance name index
|
||||
/// @return Return true on success, false if not found
|
||||
///
|
||||
bool saveName(const quint8& inst, const QString& name);
|
||||
bool saveName(quint8 inst, const QString& name);
|
||||
|
||||
signals:
|
||||
///
|
||||
@@ -103,7 +103,7 @@ signals:
|
||||
/// @param instance The index of instance
|
||||
/// @param name The name of the instance, just available with H_CREATED
|
||||
///
|
||||
void instanceStateChanged(const InstanceState& state, const quint8& instance, const QString& name = QString());
|
||||
void instanceStateChanged(InstanceState state, quint8 instance, const QString& name = QString());
|
||||
|
||||
///
|
||||
/// @brief Emits whenever something changes, the lazy version of instanceStateChanged (- H_ON_STOP) + saveName() emit
|
||||
@@ -118,7 +118,7 @@ signals:
|
||||
///
|
||||
/// @brief PIPE videoMode back to Hyperion
|
||||
///
|
||||
void newVideoMode(const VideoMode& mode);
|
||||
void newVideoMode(VideoMode mode);
|
||||
|
||||
///////////////////////////////////////
|
||||
/// FROM HYPERION TO HYPERIONDAEMON ///
|
||||
@@ -127,17 +127,17 @@ signals:
|
||||
///
|
||||
/// @brief PIPE settings events from Hyperion
|
||||
///
|
||||
void settingsChanged(const settings::type& type, const QJsonDocument& data);
|
||||
void settingsChanged(settings::type type, const QJsonDocument& data);
|
||||
|
||||
///
|
||||
/// @brief PIPE videoMode request changes from Hyperion to HyperionDaemon
|
||||
///
|
||||
void requestVideoMode(const VideoMode& mode);
|
||||
void requestVideoMode(VideoMode mode);
|
||||
|
||||
///
|
||||
/// @brief PIPE component state changes from Hyperion to HyperionDaemon
|
||||
///
|
||||
void compStateChangeRequest(const hyperion::Components component, bool enable);
|
||||
void compStateChangeRequest(hyperion::Components component, bool enable);
|
||||
|
||||
private slots:
|
||||
///
|
||||
@@ -172,7 +172,7 @@ private:
|
||||
/// @brief check if a instance is allowed for management. Instance 0 represents the root instance
|
||||
/// @apram inst The instance to check
|
||||
///
|
||||
bool isInstAllowed(const quint8& inst) { return (inst > 0); }
|
||||
bool isInstAllowed(quint8 inst) { return (inst > 0); }
|
||||
|
||||
private:
|
||||
Logger* _log;
|
||||
|
@@ -46,7 +46,7 @@ public:
|
||||
/// @param[in] width The new width of the buffer-image
|
||||
/// @param[in] height The new height of the buffer-image
|
||||
///
|
||||
void setSize(const unsigned width, const unsigned height);
|
||||
void setSize(unsigned width, unsigned height);
|
||||
|
||||
///
|
||||
/// @brief Update the led string (eg on settings change)
|
||||
@@ -57,10 +57,10 @@ public:
|
||||
bool blackBorderDetectorEnabled();
|
||||
|
||||
/// Returns the current _userMappingType, this may not be the current applied type!
|
||||
const int & getUserLedMappingType() { return _userMappingType; };
|
||||
int getUserLedMappingType() { return _userMappingType; };
|
||||
|
||||
/// Returns the current _mappingType
|
||||
const int & ledMappingType() { return _mappingType; };
|
||||
int ledMappingType() { return _mappingType; };
|
||||
|
||||
static int mappingTypeToInt(QString mappingType);
|
||||
static QString mappingTypeToStr(int mappingType);
|
||||
@@ -215,7 +215,7 @@ private:
|
||||
}
|
||||
|
||||
private slots:
|
||||
void handleSettingsUpdate(const settings::type& type, const QJsonDocument& config);
|
||||
void handleSettingsUpdate(settings::type type, const QJsonDocument& config);
|
||||
|
||||
private:
|
||||
Logger * _log;
|
||||
|
@@ -45,20 +45,20 @@ private slots:
|
||||
/// @param type settingyType from enum
|
||||
/// @param config configuration object
|
||||
///
|
||||
void handleSettingsUpdate(const settings::type &type, const QJsonDocument &config);
|
||||
void handleSettingsUpdate(settings::type type, const QJsonDocument &config);
|
||||
|
||||
///
|
||||
/// @brief Handle component state change MessageForwarder
|
||||
/// @param component The component from enum
|
||||
/// @param enable The new state
|
||||
///
|
||||
void handleCompStateChangeRequest(const hyperion::Components component, bool enable);
|
||||
void handleCompStateChangeRequest(hyperion::Components component, bool enable);
|
||||
|
||||
///
|
||||
/// @brief Handle priority updates from Priority Muxer
|
||||
/// @param priority The new visible priority
|
||||
///
|
||||
void handlePriorityChanges(const quint8 &priority);
|
||||
void handlePriorityChanges(quint8 priority);
|
||||
|
||||
///
|
||||
/// @brief Forward message to all json slaves
|
||||
|
@@ -16,7 +16,7 @@
|
||||
class MultiColorAdjustment
|
||||
{
|
||||
public:
|
||||
MultiColorAdjustment(const unsigned ledCnt);
|
||||
MultiColorAdjustment(unsigned ledCnt);
|
||||
~MultiColorAdjustment();
|
||||
|
||||
/**
|
||||
|
@@ -74,14 +74,14 @@ public:
|
||||
/// @brief Start/Stop the PriorityMuxer update timer; On disabled no priority and timeout updates will be performend
|
||||
/// @param enable The new state
|
||||
///
|
||||
void setEnable(const bool& enable);
|
||||
void setEnable(bool enable);
|
||||
|
||||
/// @brief Enable or disable auto source selection
|
||||
/// @param enable True if it should be enabled else false
|
||||
/// @param update True to update _currentPriority - INTERNAL usage.
|
||||
/// @return True if changed has been applied, false if the state is unchanged
|
||||
///
|
||||
bool setSourceAutoSelectEnabled(const bool& enabel, const bool& update = true);
|
||||
bool setSourceAutoSelectEnabled(bool enabel, bool update = true);
|
||||
|
||||
///
|
||||
/// @brief Get the state of source auto selection
|
||||
@@ -94,13 +94,13 @@ public:
|
||||
/// @param priority The
|
||||
/// @return True on success, false if priority not found
|
||||
///
|
||||
bool setPriority(const uint8_t priority);
|
||||
bool setPriority(uint8_t priority);
|
||||
|
||||
///
|
||||
/// @brief Update all ledColos with min length of >= 1 to fit the new led length
|
||||
/// @param[in] ledCount The count of leds
|
||||
///
|
||||
void updateLedColorsLength(const int& ledCount);
|
||||
void updateLedColorsLength(int ledCount);
|
||||
|
||||
///
|
||||
/// Returns the current priority
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
/// @param priority The priority channel
|
||||
/// @return True if the priority channel exists else false
|
||||
///
|
||||
bool hasPriority(const int priority) const;
|
||||
bool hasPriority(int priority) const;
|
||||
|
||||
///
|
||||
/// Returns the number of active priorities
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
///
|
||||
/// @return The information for the specified priority channel
|
||||
///
|
||||
const InputInfo getInputInfo(const int priority) const;
|
||||
InputInfo getInputInfo(int priority) const;
|
||||
|
||||
///
|
||||
/// @brief Register a new input by priority, the priority is not active (timeout -100 isn't muxer recognized) until you start to update the data with setInput()
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
/// @param[in] owner Speicifc owner string, might be empty
|
||||
/// @param[in] smooth_cfg The smooth id to use
|
||||
///
|
||||
void registerInput(const int priority, const hyperion::Components& component, const QString& origin = "System", const QString& owner = "", unsigned smooth_cfg = SMOOTHING_MODE_DEFAULT);
|
||||
void registerInput(int priority, hyperion::Components component, const QString& origin = "System", const QString& owner = "", unsigned smooth_cfg = SMOOTHING_MODE_DEFAULT);
|
||||
|
||||
///
|
||||
/// @brief Update the current color of a priority (prev registered with registerInput())
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
/// @param timeout_ms The new timeout (defaults to -1 endless)
|
||||
/// @return True on success, false when priority is not found
|
||||
///
|
||||
bool setInput(const int priority, const std::vector<ColorRgb>& ledColors, int64_t timeout_ms = -1);
|
||||
bool setInput(int priority, const std::vector<ColorRgb>& ledColors, int64_t timeout_ms = -1);
|
||||
|
||||
///
|
||||
/// @brief Update the current image of a priority (prev registered with registerInput())
|
||||
@@ -160,14 +160,14 @@ public:
|
||||
/// @param timeout_ms The new timeout (defaults to -1 endless)
|
||||
/// @return True on success, false when priority is not found
|
||||
///
|
||||
bool setInputImage(const int priority, const Image<ColorRgb>& image, int64_t timeout_ms = -1);
|
||||
bool setInputImage(int priority, const Image<ColorRgb>& image, int64_t timeout_ms = -1);
|
||||
|
||||
///
|
||||
/// @brief Set the given priority to inactive
|
||||
/// @param priority The priority
|
||||
/// @return True on success false if not found
|
||||
///
|
||||
bool setInputInactive(const quint8& priority);
|
||||
bool setInputInactive(quint8 priority);
|
||||
|
||||
///
|
||||
/// Clears the specified priority channel and update _currentPriority on success
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
/// @param[in] priority The priority of the channel to clear
|
||||
/// @return True if priority has been cleared else false (not found)
|
||||
///
|
||||
bool clearInput(const uint8_t priority);
|
||||
bool clearInput(uint8_t priority);
|
||||
|
||||
///
|
||||
/// Clears all priority channels
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
///
|
||||
/// @brief Queue a manual push where muxer doesn't recognize them (e.g. continous single color pushes)
|
||||
///
|
||||
void queuePush(void){ emit timeRunner(); };
|
||||
void queuePush(){ emit timeRunner(); };
|
||||
|
||||
signals:
|
||||
///
|
||||
@@ -198,38 +198,38 @@ signals:
|
||||
/// @param priority The priority which has changed
|
||||
/// @param state If true it was added else it was removed!
|
||||
///
|
||||
void priorityChanged(const quint8& priority, const bool& state);
|
||||
void priorityChanged(quint8 priority, bool state);
|
||||
|
||||
///
|
||||
/// @brief Emits whenever the visible priority has changed
|
||||
/// @param priority The new visible priority
|
||||
///
|
||||
void visiblePriorityChanged(const quint8& priority);
|
||||
void visiblePriorityChanged(quint8 priority);
|
||||
|
||||
///
|
||||
/// @brief Emits whenever the current visible component changed
|
||||
/// @param comp The new component
|
||||
///
|
||||
void visibleComponentChanged(const hyperion::Components& comp);
|
||||
void visibleComponentChanged(hyperion::Components comp);
|
||||
|
||||
///
|
||||
/// @brief Emits whenever a priority changes active state
|
||||
/// @param priority The priority who changed the active state
|
||||
/// @param state The new state, state true = active else false
|
||||
///
|
||||
void activeStateChanged(const quint8& priority, const bool& state);
|
||||
void activeStateChanged(quint8 priority, bool state);
|
||||
|
||||
///
|
||||
/// @brief Emits whenever the auto selection state has been changed
|
||||
/// @param state The new state of auto selection; True enabled else false
|
||||
///
|
||||
void autoSelectChanged(const bool& state);
|
||||
void autoSelectChanged(bool state);
|
||||
|
||||
///
|
||||
/// @brief Emits whenever something changes which influences the priorities listing
|
||||
/// Emits also in 1s interval when a COLOR or EFFECT is running with a timeout > -1
|
||||
///
|
||||
void prioritiesChanged(void);
|
||||
void prioritiesChanged();
|
||||
|
||||
///
|
||||
/// internal used signal to resolve treading issues with timer
|
||||
@@ -246,14 +246,14 @@ private slots:
|
||||
/// Updates the current time. Channels with a configured time out will be checked and cleared if
|
||||
/// required.
|
||||
///
|
||||
void setCurrentTime(void);
|
||||
void setCurrentTime();
|
||||
|
||||
private:
|
||||
///
|
||||
/// @brief Get the component of the given priority
|
||||
/// @return The component
|
||||
///
|
||||
hyperion::Components getComponentOfPriority(const int& priority);
|
||||
hyperion::Components getComponentOfPriority(int priority);
|
||||
|
||||
/// Logger instance
|
||||
Logger* _log;
|
||||
|
@@ -21,7 +21,7 @@ public:
|
||||
/// @params instance Instance index of HyperionInstanceManager
|
||||
/// @params parent The parent hyperion instance
|
||||
///
|
||||
SettingsManager(const quint8& instance, QObject* parent = nullptr);
|
||||
SettingsManager(quint8 instance, QObject* parent = nullptr);
|
||||
|
||||
///
|
||||
/// @brief Save a complete json config
|
||||
@@ -29,20 +29,20 @@ public:
|
||||
/// @param correct If true will correct json against schema before save
|
||||
/// @return True on success else false
|
||||
///
|
||||
bool saveSettings(QJsonObject config, const bool& correct = false);
|
||||
bool saveSettings(QJsonObject config, bool correct = false);
|
||||
|
||||
///
|
||||
/// @brief get a single setting json from config
|
||||
/// @param type The settings::type from enum
|
||||
/// @return The requested json data as QJsonDocument
|
||||
///
|
||||
const QJsonDocument getSetting(const settings::type& type);
|
||||
QJsonDocument getSetting(settings::type type) const;
|
||||
|
||||
///
|
||||
/// @brief get the full settings object of this instance (with global settings)
|
||||
/// @return The requested json
|
||||
///
|
||||
const QJsonObject & getSettings() { return _qconfig; };
|
||||
const QJsonObject & getSettings() const { return _qconfig; };
|
||||
|
||||
signals:
|
||||
///
|
||||
@@ -50,7 +50,7 @@ signals:
|
||||
/// @param type The settings type from enum
|
||||
/// @param data The data as QJsonDocument
|
||||
///
|
||||
void settingsChanged(const settings::type& type, const QJsonDocument& data);
|
||||
void settingsChanged(settings::type type, const QJsonDocument& data);
|
||||
|
||||
private:
|
||||
///
|
||||
|
Reference in New Issue
Block a user