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

Classes

class  DBusMenuModel
 Flat model exposing ONE level of a com.canonical.dbusmenu tree at a time. More...
 
class  IconThemeResolver
 XDG Icon Theme Specification 0.13 resolver. More...
 
class  MprisHost
 
class  MprisPlayer
 
class  MprisPlayerModel
 
class  StatusNotifierHost
 The shell-side counterpart to StatusNotifierWatcher. More...
 
class  StatusNotifierItem
 One system-tray item. More...
 
class  StatusNotifierItemModel
 QAbstractListModel adapter over StatusNotifierHost::items(). More...
 
class  UPowerDevice
 
class  UPowerDeviceModel
 
class  UPowerHost
 

Functions

PHOSPHORSERVICES_EXPORT void registerQmlTypes ()
 Register every PhosphorServices QML type under the Phosphor.Services module at version 1.0.
 
PHOSPHORSERVICES_EXPORT void installImageProvider (QQmlEngine *engine)
 Mount the icon image provider on engine under the URL scheme image://phosphor-services/.
 

Function Documentation

◆ installImageProvider()

PHOSPHORSERVICES_EXPORT void PhosphorServices::installImageProvider ( QQmlEngine *  engine)

Mount the icon image provider on engine under the URL scheme image://phosphor-services/.

The provider is what makes tray-icon QImages reachable from QML's Image.source (a QUrl property — QImage doesn't auto-convert). Per-engine because QQmlEngine takes ownership of its providers and tears them down with itself.

◆ registerQmlTypes()

PHOSPHORSERVICES_EXPORT void PhosphorServices::registerQmlTypes ( )

Register every PhosphorServices QML type under the Phosphor.Services module at version 1.0.

Idempotent on repeat calls — relies on Qt's qmlRegisterType no-op behaviour for duplicate registrations.

Called from the consuming binary (typically src/shell/main.cpp) before any QQmlEngine loads a .qml file. The split — registration here, invocation in main — keeps phosphor-shell free of a hard dependency on phosphor-services for shells that don't ship a tray.