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
IDesktopWidgetFactory.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 desktop card / widget (calendar, weather, system
19
// monitor, media, shortcuts) — the kinds of things that sit on the
20
// dashboard or as standalone desktop tiles.
21
//
22
// Phase 1.3 ships this as a documented header; the consuming
23
// Dashboard / desktop-widget surface lands in Phase 4.4 (cards
24
// reused inside Control Center) and Phase 5 (standalone dashboard).
25
class
PHOSPHORREGISTRY_EXPORT
IDesktopWidgetFactory
:
public
IFactoryBase
26
{
27
public
:
28
IDesktopWidgetFactory
() =
default
;
29
~IDesktopWidgetFactory
()
override
=
default
;
30
Q_DISABLE_COPY_MOVE(
IDesktopWidgetFactory
)
31
32
// Construct a widget QQuickItem rooted at parent. engine MUST
33
// NOT be null. Same lifetime contract as
34
// IBarWidgetFactory::createWidget. Returning nullptr means the
35
// widget is unavailable in the current environment.
36
[[nodiscard]]
virtual
QQuickItem*
createWidget
(QQmlEngine* engine, QObject* parent) = 0;
37
};
38
39
}
// namespace PhosphorRegistry
IFactoryBase.h
PhosphorRegistry::IDesktopWidgetFactory::~IDesktopWidgetFactory
~IDesktopWidgetFactory() override=default
PhosphorRegistry::IDesktopWidgetFactory::IDesktopWidgetFactory
IDesktopWidgetFactory()=default
PhosphorRegistry::IDesktopWidgetFactory::createWidget
virtual QQuickItem * createWidget(QQmlEngine *engine, QObject *parent)=0
PhosphorRegistry::IFactoryBase::IFactoryBase
IFactoryBase()=default
PhosphorRegistry
Definition
IBarWidgetFactory.h:16
phosphor-registry
include
PhosphorRegistry
IDesktopWidgetFactory.h
Generated by
1.15.0