#ifndef STRAWBERRY_APP_TRAY_HPP #define STRAWBERRY_APP_TRAY_HPP #include "tray_state.hpp" #include #include class QAction; class QSystemTrayIcon; namespace strawberry::app { /// Tray indicator (StatusNotifierItem on sway/waybar) with a control menu. class Tray : public QObject { Q_OBJECT public: explicit Tray(QObject* parent = nullptr); void show(); void apply(const TrayState& state); void set_controls_enabled(bool enabled); /// Reflect the autostart state in the menu (no signal emitted). void set_autostart_checked(bool enabled); static QIcon icon_for(TrayLevel level); QSystemTrayIcon* system_icon() const { return icon_; } signals: void open_requested(); void command_requested(const QString& verb); void mark_all_seen_requested(); void autostart_toggled(bool enable); void quit_requested(); private: QSystemTrayIcon* icon_ = nullptr; QAction* reload_action_ = nullptr; QAction* rescan_action_ = nullptr; QAction* autostart_action_ = nullptr; TrayLevel level_ = TrayLevel::unknown; bool level_applied_ = false; }; } // namespace strawberry::app #endif // STRAWBERRY_APP_TRAY_HPP