Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorServices::StatusNotifierItem Class Reference

One system-tray item. More...

#include <phosphor-services/include/PhosphorServices/StatusNotifierItem.h>

Inheritance diagram for PhosphorServices::StatusNotifierItem:
[legend]

Public Types

enum class  Status { Passive , Active , NeedsAttention }
 

Public Slots

void activate (int x, int y)
 
void secondaryActivate (int x, int y)
 
void contextMenu (int x, int y)
 
void scroll (int delta, const QString &orientation)
 

Signals

void idChanged ()
 
void titleChanged ()
 
void categoryChanged ()
 
void statusChanged ()
 
void iconChanged ()
 
void toolTipChanged ()
 
void menuPathChanged ()
 
void validChanged ()
 

Public Member Functions

 StatusNotifierItem (const QString &dbusService, const QString &dbusPath, QObject *parent=nullptr)
 dbusServiceAndPath is the canonical form the Watcher produces: "uniqueName/object/path".
 
 ~StatusNotifierItem () override
 
QString id () const
 
QString title () const
 
QString category () const
 
Status status () const
 
QImage iconImage () const
 
QImage overlayIconImage () const
 
QImage attentionIconImage () const
 
QString toolTipTitle () const
 
QString toolTipBody () const
 
QString menuPath () const
 
bool itemIsMenu () const
 
QString dbusService () const
 
QString dbusPath () const
 
bool isValid () const
 
void setPreferredIconSize (int size)
 Preferred render size in logical pixels.
 
int preferredIconSize () const
 

Detailed Description

One system-tray item.

Owned by StatusNotifierHost. Wraps the DBus proxy + property cache + icon resolution. The host populates these from RegisteredStatusNotifierItems and refreshes them in response to per-item NewXxx signals.

Member Enumeration Documentation

◆ Status

Enumerator
Passive 

Item is dormant — could be hidden in an overflow.

Active 

Item is meaningful — show it normally.

NeedsAttention 

Use the attention icon + maybe animate.

Constructor & Destructor Documentation

◆ StatusNotifierItem()

PhosphorServices::StatusNotifierItem::StatusNotifierItem ( const QString &  dbusService,
const QString &  dbusPath,
QObject *  parent = nullptr 
)

dbusServiceAndPath is the canonical form the Watcher produces: "uniqueName/object/path".

Splitting it is the host's job before constructing.

◆ ~StatusNotifierItem()

PhosphorServices::StatusNotifierItem::~StatusNotifierItem ( )
override

Member Function Documentation

◆ activate

void PhosphorServices::StatusNotifierItem::activate ( int  x,
int  y 
)
slot

◆ attentionIconImage()

QImage PhosphorServices::StatusNotifierItem::attentionIconImage ( ) const

◆ category()

QString PhosphorServices::StatusNotifierItem::category ( ) const

◆ categoryChanged

void PhosphorServices::StatusNotifierItem::categoryChanged ( )
signal

◆ contextMenu

void PhosphorServices::StatusNotifierItem::contextMenu ( int  x,
int  y 
)
slot

◆ dbusPath()

QString PhosphorServices::StatusNotifierItem::dbusPath ( ) const

◆ dbusService()

QString PhosphorServices::StatusNotifierItem::dbusService ( ) const

◆ iconChanged

void PhosphorServices::StatusNotifierItem::iconChanged ( )
signal

◆ iconImage()

QImage PhosphorServices::StatusNotifierItem::iconImage ( ) const

◆ id()

QString PhosphorServices::StatusNotifierItem::id ( ) const

◆ idChanged

void PhosphorServices::StatusNotifierItem::idChanged ( )
signal

◆ isValid()

bool PhosphorServices::StatusNotifierItem::isValid ( ) const

◆ itemIsMenu()

bool PhosphorServices::StatusNotifierItem::itemIsMenu ( ) const

◆ menuPath()

QString PhosphorServices::StatusNotifierItem::menuPath ( ) const

◆ menuPathChanged

void PhosphorServices::StatusNotifierItem::menuPathChanged ( )
signal

◆ overlayIconImage()

QImage PhosphorServices::StatusNotifierItem::overlayIconImage ( ) const

◆ preferredIconSize()

int PhosphorServices::StatusNotifierItem::preferredIconSize ( ) const

◆ scroll

void PhosphorServices::StatusNotifierItem::scroll ( int  delta,
const QString &  orientation 
)
slot

◆ secondaryActivate

void PhosphorServices::StatusNotifierItem::secondaryActivate ( int  x,
int  y 
)
slot

◆ setPreferredIconSize()

void PhosphorServices::StatusNotifierItem::setPreferredIconSize ( int  size)

Preferred render size in logical pixels.

Passed through to the icon resolver so we don't upscale a 16×16 themed icon when the panel asks for 24×24 — XDG spec ranks "next-size-up" higher than "scaled current size".

◆ status()

Status PhosphorServices::StatusNotifierItem::status ( ) const

◆ statusChanged

void PhosphorServices::StatusNotifierItem::statusChanged ( )
signal

◆ title()

QString PhosphorServices::StatusNotifierItem::title ( ) const

◆ titleChanged

void PhosphorServices::StatusNotifierItem::titleChanged ( )
signal

◆ toolTipBody()

QString PhosphorServices::StatusNotifierItem::toolTipBody ( ) const

◆ toolTipChanged

void PhosphorServices::StatusNotifierItem::toolTipChanged ( )
signal

◆ toolTipTitle()

QString PhosphorServices::StatusNotifierItem::toolTipTitle ( ) const

◆ validChanged

void PhosphorServices::StatusNotifierItem::validChanged ( )
signal

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