Skip to content
Phosphor
/
API Reference
Search
PlasmaZones
Libraries
Guides
Brand
Palette
About
GitHub
Discord
Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
IOSDFactory.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2026 fuddlesworth
2
// SPDX-License-Identifier: LGPL-2.1-or-later
3
#pragma once
4
5
#include <
PhosphorRegistry/IFactoryBase.h
>
6
#include <PhosphorRegistry/phosphorregistry_export.h>
7
8
#include <QtCore/qtclasshelpermacros.h>
9
10
QT_BEGIN_NAMESPACE
11
class
QObject;
12
class
QQmlEngine;
13
class
QQuickItem;
14
QT_END_NAMESPACE
15
16
namespace
PhosphorRegistry
{
17
18
// Factory for one on-screen display surface (volume, mic mute,
19
// brightness, caps-lock, num-lock). OSDs are short-lived: the host
20
// instantiates the QQuickItem when the OSD is triggered, fades it
21
// in, holds for a timeout, fades out, destroys.
22
//
23
// Phase 1.3 ships this as a documented header; the consuming OSD
24
// framework lands in Phase 3.3.
25
class
PHOSPHORREGISTRY_EXPORT
IOSDFactory
:
public
IFactoryBase
26
{
27
public
:
28
IOSDFactory
() =
default
;
29
~IOSDFactory
()
override
=
default
;
30
Q_DISABLE_COPY_MOVE(
IOSDFactory
)
31
32
// Construct an OSD QQuickItem rooted at parent. engine MUST NOT
33
// be null. The OSD host owns the item's lifetime and triggers
34
// its fade-in / fade-out via the standard PopoutHost-style
35
// open/dismissed contract that the OSD framework will define
36
// in Phase 3.3.
37
[[nodiscard]]
virtual
QQuickItem*
createOSD
(QQmlEngine* engine, QObject* parent) = 0;
38
};
39
40
}
// namespace PhosphorRegistry
IFactoryBase.h
PhosphorRegistry::IFactoryBase::IFactoryBase
IFactoryBase()=default
PhosphorRegistry::IOSDFactory::createOSD
virtual QQuickItem * createOSD(QQmlEngine *engine, QObject *parent)=0
PhosphorRegistry::IOSDFactory::IOSDFactory
IOSDFactory()=default
PhosphorRegistry::IOSDFactory::~IOSDFactory
~IOSDFactory() override=default
PhosphorRegistry
Definition
IBarWidgetFactory.h:16
phosphor-registry
include
PhosphorRegistry
IOSDFactory.h
Generated by
1.15.0