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

Handles the systemtray icon and menu. More...

#include <trayicon.h>

Inheritance diagram for TrayIcon:
Collaboration diagram for TrayIcon:

Public Slots

void showHideParent ()
 TrayIcon::showHideParent toggle app visibility.
void iconActivated (QSystemTrayIcon::ActivationReason reason)
 TrayIcon::iconActivated you clicked on the trayicon.

Public Member Functions

 TrayIcon (QMainWindow *parent)
 TrayIcon::TrayIcon use a (system) tray icon with a nice QtPass logo on it (currently) only Quits.
void showMessage (const QString &title, const QString &msg, int time)
 TrayIcon::showMessage show a systray message for notification.
void setVisible (bool visible)
 TrayIcon::setVisible show or hide the icon.
auto getIsAllocated () -> bool
 TrayIcon::getIsAllocated return if TrayIcon is allocated.

Detailed Description

Handles the systemtray icon and menu.

Construct a TrayIcon associated with the given main window.

Parameters
parentPointer to the QMainWindow this tray icon controls and mirrors. Display a transient notification message via the tray icon.
titleTitle text of the notification.
msgBody text of the notification.
timeDuration to display the notification in milliseconds. Show or hide the tray-related UI and behavior.
visibletrue to make tray UI active/visible, false to deactivate/hide it. Report whether tray resources have been allocated and initialized.
Returns
true if resources are allocated, false otherwise. Toggle the visibility/state of the associated main window in response to user interaction. Handle activation events from the system tray icon.
Parameters
reasonThe activation reason provided by QSystemTrayIcon. Create and configure the tray menu actions (show, hide, minimize, maximize, restore, quit). Initialize the QSystemTrayIcon and its context menu, wiring actions and event handling.

Definition at line 51 of file trayicon.h.

Constructor & Destructor Documentation

◆ TrayIcon()

TrayIcon::TrayIcon ( QMainWindow * parent)
explicit

TrayIcon::TrayIcon use a (system) tray icon with a nice QtPass logo on it (currently) only Quits.

Parameters
parent

Definition at line 18 of file trayicon.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ getIsAllocated()

auto TrayIcon::getIsAllocated ( ) -> bool

TrayIcon::getIsAllocated return if TrayIcon is allocated.

Definition at line 61 of file trayicon.cpp.

◆ iconActivated

void TrayIcon::iconActivated ( QSystemTrayIcon::ActivationReason reason)
slot

TrayIcon::iconActivated you clicked on the trayicon.

Parameters
reason

Definition at line 124 of file trayicon.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setVisible()

void TrayIcon::setVisible ( bool visible)

TrayIcon::setVisible show or hide the icon.

Parameters
visible

Definition at line 50 of file trayicon.cpp.

◆ showHideParent

void TrayIcon::showHideParent ( )
slot

TrayIcon::showHideParent toggle app visibility.

Definition at line 112 of file trayicon.cpp.

Here is the caller graph for this function:

◆ showMessage()

void TrayIcon::showMessage ( const QString & title,
const QString & msg,
int time )

TrayIcon::showMessage show a systray message for notification.

Parameters
title
msg
time

Definition at line 144 of file trayicon.cpp.

Here is the caller graph for this function:

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