#ifndef TRAY_HPP #define TRAY_HPP #include #include #include "webwindow.hpp" class Tray : public QSystemTrayIcon { private: QMenu menu; QMenu settings; QAction *app_toggle; QAction *quit; struct { QAction *camera; QAction *microphone; QAction *screenshare; QAction *notifications; QAction *location; QAction *lock_mouse; } permissions; QAction *reset_storage; std::function toggle_signal; std::function quit_signal; std::function reset_cookies_signal; std::function permission_changed_signal; public: Tray(); void connect_toggle(std::function fn); void connect_quit(std::function fn); void connect_reset_cookies(std::function fn); void connect_permission_changed( std::function fn); void set_title(const QString &title); void send_notification(std::unique_ptr notification); void set_permission(QWebEnginePage::Feature feature, bool value); }; #endif