Handles the system tray icon and menu.
More...
#include <trayicon.h>
|
|
void | showHideParent () |
| | Toggle the visibility of the associated main window.
|
| void | iconActivated (QSystemTrayIcon::ActivationReason reason) |
| | Handle activation events from the system tray icon.
|
|
| | TrayIcon (QMainWindow *parent) |
| | Construct a TrayIcon associated with the given main window.
|
| void | showMessage (const QString &title, const QString &msg, int time) |
| | Display a transient notification message via the tray icon.
|
| void | setVisible (bool visible) |
| | Show or hide the tray icon and its associated UI.
|
| auto | getIsAllocated () -> bool |
| | Check whether tray resources have been allocated and initialized.
|
Handles the system tray icon and menu.
Definition at line 17 of file trayicon.h.
◆ TrayIcon()
| TrayIcon::TrayIcon |
( |
QMainWindow * | parent | ) |
|
|
explicit |
Construct a TrayIcon associated with the given main window.
- Parameters
-
| parent | Pointer to the QMainWindow this tray icon controls. |
◆ getIsAllocated()
| auto TrayIcon::getIsAllocated |
( |
| ) |
-> bool |
Check whether tray resources have been allocated and initialized.
- Returns
- true if tray resources are allocated and initialized.
◆ iconActivated
| void TrayIcon::iconActivated |
( |
QSystemTrayIcon::ActivationReason | reason | ) |
|
|
slot |
Handle activation events from the system tray icon.
- Parameters
-
| reason | The activation reason provided by QSystemTrayIcon. |
◆ setVisible()
| void TrayIcon::setVisible |
( |
bool | visible | ) |
|
Show or hide the tray icon and its associated UI.
- Parameters
-
| visible | true to make the tray icon visible, false to hide it. |
◆ showMessage()
| void TrayIcon::showMessage |
( |
const QString & | title, |
|
|
const QString & | msg, |
|
|
int | time ) |
Display a transient notification message via the tray icon.
- Parameters
-
| title | Title text of the notification. |
| msg | Body text of the notification. |
| time | Duration to display the notification in milliseconds. |
The documentation for this class was generated from the following file: