Fix 1181 - Effects were not started from tray (#1199)

* Fix 1181, add constants and defaults

* Include #1195 changes
This commit is contained in:
LordGrey
2021-03-19 22:52:41 +01:00
committed by GitHub
parent 41af5c1b9e
commit 94d9b02734
12 changed files with 40 additions and 98 deletions

View File

@@ -15,7 +15,9 @@
#include <utils/ColorRgb.h>
#include <effectengine/EffectDefinition.h>
#include <effectengine/Effect.h>
#include <webserver/WebServer.h>
#include <hyperion/PriorityMuxer.h>
#include "hyperiond.h"
#include "systray.h"
@@ -165,7 +167,7 @@ void SysTray::closeEvent(QCloseEvent *event)
event->ignore();
}
void SysTray::settings()
void SysTray::settings() const
{
#ifndef _WIN32
// Hide error messages when opening webbrowser
@@ -201,7 +203,7 @@ void SysTray::settings()
void SysTray::setEffect()
{
QString efxName = qobject_cast<QAction*>(sender())->text();
_hyperion->setEffect(efxName, 1);
_hyperion->setEffect(efxName, PriorityMuxer::FG_PRIORITY, Effect::ENDLESS);
}
void SysTray::clearEfxColor()
@@ -209,7 +211,7 @@ void SysTray::clearEfxColor()
_hyperion->clear(1);
}
void SysTray::handleInstanceStateChange(InstanceState state, quint8 instance, const QString& name)
void SysTray::handleInstanceStateChange(InstanceState state, quint8 instance, const QString& /*name*/)
{
switch(state){
case InstanceState::H_STARTED:

View File

@@ -24,7 +24,7 @@ public slots:
void showColorDialog();
void setColor(const QColor & color);
void closeEvent(QCloseEvent *event);
void settings();
void settings() const;
void setEffect();
void clearEfxColor();
void setAutorunState();