Adds support for xdg_activation_v1 when calling the application from the system tray by using KStatusNotifier which supports it. Listens to XDG_ACTIVATION_TOKEN as it's passed when we are started from dbus.
20 lines
339 B
C++
20 lines
339 B
C++
// SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@kde.org>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#pragma once
|
|
|
|
#include <KStatusNotifierItem>
|
|
|
|
class TrayIcon : public KStatusNotifierItem
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
TrayIcon(QObject *parent = nullptr);
|
|
|
|
void show();
|
|
void hide();
|
|
|
|
Q_SIGNALS:
|
|
void showWindow();
|
|
};
|