- enum State {
- Passive,
- Active,
- NeedsAttention
- };
-
- enum Mode {
- Invalid,
- Legacy,
- StatusNotifier
- };
-
- // same as in QSystemTrayIcon
- enum MessageIcon {
- NoIcon,
- Information,
- Warning,
- Critical
- };
-
- // same as in QSystemTrayIcon
- enum ActivationReason {
- Unknown,
- Context,
- DoubleClick,
- Trigger,
- MiddleClick
- };
-
- explicit SystemTray(QWidget *parent);
- virtual ~SystemTray();
- virtual void init();
-
- inline State state() const;
- inline bool isAlerted() const;
- virtual inline bool isSystemTrayAvailable() const;
-
- void setAlert(bool alerted);
- virtual inline bool isVisible() const { return false; }
-
- QWidget *associatedWidget() const;
+ enum State {
+ Passive,
+ Active,
+ NeedsAttention
+ };
+
+ enum Mode {
+ Invalid,
+ Legacy,
+ StatusNotifier
+ };
+
+ // same as in QSystemTrayIcon
+ enum MessageIcon {
+ NoIcon,
+ Information,
+ Warning,
+ Critical
+ };
+
+ // same as in QSystemTrayIcon
+ enum ActivationReason {
+ Unknown,
+ Context,
+ DoubleClick,
+ Trigger,
+ MiddleClick
+ };
+
+ enum class AttentionBehavior {
+ DoNothing,
+ ChangeColor,
+ Blink
+ };
+
+ explicit SystemTray(QWidget *parent);
+ ~SystemTray() override;
+
+ Mode mode() const;
+ State state() const;
+ bool isVisible() const;
+ bool isAlerted() const;
+
+ virtual bool isSystemTrayAvailable() const;
+
+ QWidget *associatedWidget() const;