Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Systray icons added - Issue #925 #1040

Merged
merged 1 commit into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CompileHowto.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ wget -qN https://raw.github.com/hyperion-project/hyperion.ng/master/bin/scripts/

```
sudo apt-get update
sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5x11extras5-dev libusb-1.0-0-dev python3-dev libcec-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libssl-dev zlib1g-dev
sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev libqt5x11extras5-dev libusb-1.0-0-dev python3-dev libcec-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libssl-dev zlib1g-dev
```

**on RPI you need the videocore IV headers**
Expand Down
4 changes: 2 additions & 2 deletions CrossCompileHowto.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ Use a clean Raspbian Stretch Lite (on target) and Ubuntu 18/19 (on host) to exec
## On the Target system (here Raspberry Pi)
Install required additional packages.
```
sudo apt-get install qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python3-dev libcec-dev libxcb-util0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libqt5sql5-sqlite aptitude qt5-default rsync libssl-dev zlib1g-dev
sudo apt-get install qtbase5-dev libqt5serialport5-dev libqt5svg5-dev libusb-1.0-0-dev python3-dev libcec-dev libxcb-util0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libqt5sql5-sqlite aptitude qt5-default rsync libssl-dev zlib1g-dev
```
## On the Host system (here Ubuntu)
Update the Ubuntu environment to the latest stage and install required additional packages.
```
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -qq -y install git rsync cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5x11extras5-dev libusb-1.0-0-dev python3-dev libcec-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libssl-dev zlib1g-dev
sudo apt-get -qq -y install git rsync cmake build-essential qtbase5-dev libqt5serialport5-dev libqt5svg5-dev libqt5sql5-sqlite libqt5x11extras5-dev libusb-1.0-0-dev python3-dev libcec-dev libxcb-image0-dev libxcb-util0-dev libxcb-shm0-dev libxcb-render0-dev libxcb-randr0-dev libxrandr-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev libjpeg-dev libturbojpeg0-dev libssl-dev zlib1g-dev
```

Refine the target IP or hostname, plus userID as required and set-up cross-compilation environment:
Expand Down
1 change: 1 addition & 0 deletions bin/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ sudo apt-get install \
libssl-dev \
libjpeg-dev \
libqt5sql5-sqlite \
libqt5svg5-dev \
zlib1g-dev \

if [ -e /dev/vc-cma -a -e /dev/vc-mem ]
Expand Down
1 change: 1 addition & 0 deletions resources/icons/autorun.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/icons/clear.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/icons/color.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/icons/effects.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/icons/hyperion-icon-32px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/icons/quit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/icons/settings.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 8 additions & 10 deletions src/hyperiond/systray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,32 +64,29 @@ void SysTray::iconActivated(QSystemTrayIcon::ActivationReason reason)

void SysTray::createTrayIcon()
{
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);

quitAction = new QAction(tr("&Quit"), this);
QIcon quitIcon = QIcon::fromTheme("application-exit");
quitAction->setIcon(quitIcon);
quitAction->setIcon(QPixmap(":/quit.svg"));
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));

colorAction = new QAction(tr("&Color"), this);
QIcon colorIcon = QIcon::fromTheme("applications-graphics");
colorAction->setIcon(colorIcon);
colorAction->setIcon(QPixmap(":/color.svg"));
connect(colorAction, SIGNAL(triggered()), this, SLOT(showColorDialog()));

settingsAction = new QAction(tr("&Settings"), this);
QIcon settingsIcon = QIcon::fromTheme("preferences-system");
settingsAction->setIcon(settingsIcon);
settingsAction->setIcon(QPixmap(":/settings.svg"));
connect(settingsAction, SIGNAL(triggered()), this, SLOT(settings()));

clearAction = new QAction(tr("&Clear"), this);
QIcon clearIcon = QIcon::fromTheme("edit-delete");
clearAction->setIcon(clearIcon);
clearAction->setIcon(QPixmap(":/clear.svg"));
connect(clearAction, SIGNAL(triggered()), this, SLOT(clearEfxColor()));

const std::list<EffectDefinition> efxs = _hyperion->getEffects();
_trayIconMenu = new QMenu(this);
_trayIconEfxMenu = new QMenu(_trayIconMenu);
_trayIconEfxMenu->setTitle(tr("Effects"));
QIcon efxIcon = QIcon::fromTheme("media-playback-start");
_trayIconEfxMenu->setIcon(efxIcon);
_trayIconEfxMenu->setIcon(QPixmap(":/effects.svg"));
for (auto efx : efxs)
{
QAction *efxAction = new QAction(efx.name, this);
Expand All @@ -99,6 +96,7 @@ void SysTray::createTrayIcon()

#ifdef _WIN32
autorunAction = new QAction(tr("&Disable autostart"), this);
autorunAction->setIcon(QPixmap(":/autorun.svg"));
connect(autorunAction, SIGNAL(triggered()), this, SLOT(setAutorunState()));

_trayIconMenu->addAction(autorunAction);
Expand Down