This commit is contained in:
Paulchen-Panther
2018-12-31 15:48:29 +01:00
parent 0e3ddb7eca
commit d6b2cfaf9d
49 changed files with 899 additions and 535 deletions

View File

@@ -54,6 +54,11 @@ private slots:
///
void setV4lInactive();
///
/// @brief Is called from _systemInactiveTimer to set source after specific time to inactive
///
void setSystemInactive();
private:
/// Hyperion instance
Hyperion* _hyperion;
@@ -61,6 +66,7 @@ private:
/// Reflect state of System capture and prio
bool _systemCaptEnabled;
quint8 _systemCaptPrio;
QTimer* _systemInactiveTimer;
/// Reflect state of v4l capture and prio
bool _v4lCaptEnabled;

View File

@@ -163,8 +163,21 @@ public:
///
const InputInfo getPriorityInfo(const int priority) const;
/// Reload the list of available effects
void reloadEffects();
///
/// @brief Save an effect
/// @param obj The effect args
/// @param[out] resultMsg The feedback message
/// @return True on success else false
///
const bool saveEffect(const QJsonObject& obj, QString& resultMsg);
///
/// @brief Delete an effect by name.
/// @param[in] effectName The effect name to delete
/// @param[out] resultMsg The message on error
/// @return True on success else false
///
const bool deleteEffect(const QString& effectName, QString& resultMsg);
/// Get the list of available effects
/// @return The list of available effects
@@ -215,12 +228,6 @@ public:
/// @return the state
bool sourceAutoSelectEnabled();
///
/// @brief Get the last untransformed/unadjusted led colors
/// @return The _rawLedBuffer leds
///
const std::vector<ColorRgb>& getRawLedBuffer() { return _rawLedBuffer; };
///
/// @brief Enable/Disable components during runtime, called from external API (requests)
///
@@ -433,6 +440,11 @@ signals:
///
void v4lImage(const Image<ColorRgb> & image);
///
/// @brief Emits whenever new untransformed ledColos data is available, reflects the current visible device
///
void rawLedColors(const std::vector<ColorRgb>& ledValues);
private slots:
///
/// Updates the priority muxer with the current time and (re)writes the led color with applied
@@ -548,8 +560,6 @@ private:
/// buffer for leds (with adjustment)
std::vector<ColorRgb> _ledBuffer;
/// buffer for leds (without adjustment)
std::vector<ColorRgb> _rawLedBuffer;
/// Boblight instance
BoblightServer* _boblightServer;

View File

@@ -9,7 +9,7 @@
class Hyperion;
///
/// @brief Manage the settings read write from/to database, on settings changed will emit a signal to update components accordingly
/// @brief Manage the settings read write from/to config file, on settings changed will emit a signal to update components accordingly
///
class SettingsManager : public QObject
{
@@ -37,7 +37,7 @@ public:
const bool saveSettings(QJsonObject config, const bool& correct = false);
///
/// @brief get a single setting json from database
/// @brief get a single setting json from config
/// @param type The settings::type from enum
/// @return The requested json data as QJsonDocument
///
@@ -51,7 +51,7 @@ public:
signals:
///
/// @brief Emits whenever a config part changed. Comparison of database and new data to prevent false positive
/// @brief Emits whenever a config part changed.
/// @param type The settings type from enum
/// @param data The data as QJsonDocument
///
@@ -60,10 +60,13 @@ signals:
private:
/// Hyperion instance
Hyperion* _hyperion;
/// Logger instance
Logger* _log;
/// the schema
static QJsonObject schemaJson;
/// the current config of this instance
QJsonObject _qconfig;
};