LordGrey 2f573a117f
Hyperion "Light", Build improvements and minor fixes (#1400)
* Allow build, if no grabbers are enabled

* Align available functions to right Qt version

* Update to next development version

* Align available functions to right Qt version

* fix workflows (apt/nightly)

* Disable QNetworkConfigurationManager deprecation warnings

* Initial go on Smart Pointers

* Add Deallocation

* Correct QT_WARNING_DISABLE_DEPRECATED (available since 5.9)

* Cluster Build Variables

* Hyperion Light

* Address build warnings

* Hyperion Light - UI

* Update Protobuf to latest master

* Removed compiler warnings

* Added restart ability to systray

* Correct Protobuf

* Ignore 'no-return' warning on protobuf build

* hyperion-remote: Fix auto discovery of hyperion server

* Fix Qt version override

* Update changelog

* Remove Grabber Components, if no Grabber exists

* Standalone Grabber - Fix fps default

* Remote Control - Have Source Selction accrosswhole screen

* Enable Blackborder detection only, if relevant input sources available

* Enable Blackborder detection only, if relevant input sources available

* Remote UI - rearrange containers

* - QT5/6 path for arm64 added
- Remove ZLib Dependency
- Fix macOS bundle info details
- Cleanup

Co-authored-by: Paulchen Panther <16664240+Paulchen-Panther@users.noreply.github.com>
Co-authored-by: Paulchen Panther <Paulchen-Panter@protonmail.com>
2022-01-07 14:47:51 +01:00

76 lines
1.6 KiB
C++

#pragma once
#include <QSystemTrayIcon>
#include <QMenu>
#include <QWidget>
#include <QColorDialog>
#include <QCloseEvent>
#include <hyperion/Hyperion.h>
#include <hyperion/HyperionIManager.h>
class HyperionDaemon;
class SysTray : public QWidget
{
Q_OBJECT
public:
SysTray(HyperionDaemon *hyperiond);
~SysTray();
public slots:
void showColorDialog();
void setColor(const QColor & color);
void closeEvent(QCloseEvent *event);
void settings() const;
void setEffect();
void clearEfxColor();
void setAutorunState();
private slots:
void iconActivated(QSystemTrayIcon::ActivationReason reason);
///
/// @brief is called whenever the webserver changes the port
///
void webserverPortChanged(quint16 port) { _webPort = port; };
///
/// @brief is called whenever a hyperion instance state changes
///
void handleInstanceStateChange(InstanceState state, quint8 instance, const QString& name);
private:
void createTrayIcon();
#ifdef _WIN32
///
/// @brief Checks whether Hyperion should start at Windows system start.
/// @return True on success, otherwise false
///
bool getCurrentAutorunState();
#endif
QAction *quitAction;
QAction *restartAction;
QAction *startAction;
QAction *stopAction;
QAction *colorAction;
QAction *settingsAction;
QAction *clearAction;
#ifdef _WIN32
QAction *autorunAction;
#endif
QSystemTrayIcon *_trayIcon;
QMenu *_trayIconMenu;
QMenu *_trayIconEfxMenu;
QColorDialog _colorDlg;
HyperionDaemon *_hyperiond;
Hyperion *_hyperion;
HyperionIManager *_instanceManager;
quint16 _webPort;
};