UI and Web updates (#1421)

* Stop Web-Capture when priority changes

* Remote control UI: Treat duration=0 as endless

* Stop Web-Capture on non-Image events changes

* LED Matrix Layout - Support vertical cabling direction

* Additional Yeelight models

* Treat http headers case insensitive

* Update change log

* Treat http headers case insensitive (consider Qt version)

* API - Consider provided format when setImage

* UI - Support Boblight configuration per LED instance

* Support multiple Boblight clients with different priorities

* Update changelog

* Simplify isGUI rules allowing for QT only builds

* Sysinfo: Fix indents

* LED-Devices: Show warning, if get properties failed

* Qt-Grabber: Fixed position handling of multiple monitors

* LED layout: Remove indention limitations

* Yeelight: Test YLTD003

* hyperion-remote: Provide image filename to muxer/UI

* Refactor PriorityMuxer and related

* Temp: Build under Windows 2019

* Yeelight: Remove YLTD003 as it is not working without additional changes

* Test Windows-latest with out removing redistributables/new MSVC

* correct workflows

* correct CI script

* Build Windows with Qt 5.15.2

* Priority Muxer: Updates after testing

* Fix Typo

* Update BGHandler

* QTGrabber - Reactivate windows code to avoid cursor issues

* Emit prioritiesChanged when autoselect was changed by user

Co-authored-by: Paulchen Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
LordGrey
2022-02-22 20:58:59 +01:00
committed by GitHub
parent 0a3df596cf
commit 160c5d0b3a
47 changed files with 775 additions and 512 deletions

View File

@@ -68,7 +68,7 @@ void JsonConnection::setColor(std::vector<QColor> colors, int priority, int dura
parseReply(reply);
}
void JsonConnection::setImage(QImage &image, int priority, int duration)
void JsonConnection::setImage(QImage &image, int priority, int duration, const QString& name)
{
Debug(_log, "Set image has size: %dx%d", image.width(), image.height());
@@ -93,6 +93,8 @@ void JsonConnection::setImage(QImage &image, int priority, int duration)
command["command"] = QString("image");
command["priority"] = priority;
command["origin"] = QString("hyperion-remote");
if (!name.isEmpty())
command["name"] = name;
command["imagewidth"] = image.width();
command["imageheight"] = image.height();
command["imagedata"] = QString(base64Image.data());

View File

@@ -41,13 +41,14 @@ public:
void setColor(std::vector<QColor> color, int priority, int duration);
///
/// Set the leds according to the given image (assume the image is stretched to the display size)
/// Set the LEDs according to the given image (assume the image is stretched to the display size)
///
/// @param image The image
/// @param priority The priority
/// @param duration The duration in milliseconds
/// @param name The image's filename
///
void setImage(QImage &image, int priority, int duration);
void setImage(QImage &image, int priority, int duration, const QString& name = "");
#if defined(ENABLE_EFFECTENGINE)
///

View File

@@ -252,7 +252,8 @@ int main(int argc, char * argv[])
}
else if (parser.isSet(argImage))
{
connection.setImage(argImage.getImage(parser), argPriority.getInt(parser), argDuration.getInt(parser));
QFileInfo imageFile {argImage.getCString(parser)};
connection.setImage(argImage.getImage(parser), argPriority.getInt(parser), argDuration.getInt(parser), imageFile.fileName());
}
#if defined(ENABLE_EFFECTENGINE)
else if (parser.isSet(argEffect))

View File

@@ -103,23 +103,7 @@ QCoreApplication* createApplication(int &argc, char *argv[])
#else
if (!forceNoGui)
{
// if x11, then test if xserver is available
#if defined(ENABLE_X11)
Display* dpy = XOpenDisplay(NULL);
if (dpy != NULL)
{
XCloseDisplay(dpy);
isGuiApp = true;
}
#elif defined(ENABLE_XCB)
int screen_num;
xcb_connection_t * connection = xcb_connect(nullptr, &screen_num);
if (!xcb_connection_has_error(connection))
{
isGuiApp = true;
}
xcb_disconnect(connection);
#endif
isGuiApp = (getenv("DISPLAY") != NULL && (getenv("XDG_SESSION_TYPE") != NULL || getenv("WAYLAND_DISPLAY") != NULL));
}
#endif
@@ -397,7 +381,7 @@ int main(int argc, char** argv)
}
}
Info(log,"Starting Hyperion - %s, %s, built: %s:%s", HYPERION_VERSION, HYPERION_BUILD_ID, __DATE__, __TIME__);
Info(log,"Starting Hyperion [%sGUI mode] - %s, %s, built: %s:%s", isGuiApp ? "": "non-", HYPERION_VERSION, HYPERION_BUILD_ID, __DATE__, __TIME__);
Debug(log,"QtVersion [%s]", QT_VERSION_STR);
if ( !readonlyMode )
@@ -423,7 +407,7 @@ int main(int argc, char** argv)
// run the application
if (isGuiApp)
{
Info(log, "start systray");
Info(log, "Start Systray menu");
QApplication::setQuitOnLastWindowClosed(false);
SysTray tray(hyperiond);
tray.hide();