QtPass 1.7.0
Multi-platform GUI for pass, the standard unix password manager.
Loading...
Searching...
No Matches
TrayIcon Class Reference

Handles the system tray icon and menu. More...

#include <trayicon.h>

Inheritance diagram for TrayIcon:
Collaboration diagram for TrayIcon:

Public Slots

void showHideParent ()
 Toggle the visibility of the associated main window.
void iconActivated (QSystemTrayIcon::ActivationReason reason)
 Handle activation events from the system tray icon.

Public Member Functions

 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.

Detailed Description

Handles the system tray icon and menu.

Definition at line 17 of file trayicon.h.

Constructor & Destructor Documentation

◆ TrayIcon()

TrayIcon::TrayIcon ( QMainWindow * parent)
explicit

Construct a TrayIcon associated with the given main window.

Parameters
parentPointer to the QMainWindow this tray icon controls.

Member Function Documentation

◆ 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
reasonThe activation reason provided by QSystemTrayIcon.

◆ setVisible()

void TrayIcon::setVisible ( bool visible)

Show or hide the tray icon and its associated UI.

Parameters
visibletrue 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
titleTitle text of the notification.
msgBody text of the notification.
timeDuration to display the notification in milliseconds.

The documentation for this class was generated from the following file: