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
SidebarRows.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2026 fuddlesworth
2
// SPDX-License-Identifier: LGPL-2.1-or-later
3
4
#pragma once
5
6
#include "phosphorcontrol_export.h"
7
8
// Full definition, not a forward declaration: the QPointer<PageRegistry>
9
// member and the QML-registered Q_PROPERTY over PageRegistry* both need the
10
// complete type, not just a forward declaration.
11
#include "
PageRegistry.h
"
12
13
#include <QObject>
14
#include <QPointer>
15
#include <QString>
16
#include <QVariantList>
17
#include <QVariantMap>
18
#include <QtQml/qqmlregistration.h>
19
20
namespace
PhosphorControl
{
21
57
class
PHOSPHORCONTROL_EXPORT
SidebarRows
:
public
QObject
58
{
59
Q_OBJECT
60
QML_NAMED_ELEMENT(
SidebarRows
)
61
Q_PROPERTY(
PhosphorControl::PageRegistry
*
registry
READ
registry
WRITE
setRegistry
NOTIFY
registryChanged
)
62
63
public
:
64
explicit
SidebarRows
(QObject* parent =
nullptr
);
65
~SidebarRows
()
override
;
66
67
PageRegistry
*
registry
()
const
;
68
void
setRegistry
(
PageRegistry
*
registry
);
69
74
Q_INVOKABLE
static
QString
dividerPrefix
();
75
98
Q_INVOKABLE QVariantList
build
(
bool
flattenTree,
const
QString& searchText,
const
QString& currentParentId,
99
const
QVariantMap& expandedCategories,
const
QVariantMap& flatTitleOverrides)
const
;
100
111
Q_INVOKABLE QVariantMap
flatPageData
(
const
QString& pageId,
const
QVariantMap& flatTitleOverrides)
const
;
112
133
Q_INVOKABLE QString
resolveDrillScope
(
const
QString& currentParentId)
const
;
134
135
Q_SIGNALS:
136
void
registryChanged
();
137
138
private
:
145
QPointer<PageRegistry> m_registry;
151
QMetaObject::Connection m_registryDestroyed;
152
};
153
154
}
// namespace PhosphorControl
PageRegistry.h
PhosphorControl::PageRegistry
Holds the catalogue of pages an application has registered.
Definition
PageRegistry.h:46
PhosphorControl::SidebarRows::resolveDrillScope
QString resolveDrillScope(const QString ¤tParentId) const
The drill scope the rail should actually be in, given currentParentId.
PhosphorControl::SidebarRows::setRegistry
void setRegistry(PageRegistry *registry)
PhosphorControl::SidebarRows::flatPageData
QVariantMap flatPageData(const QString &pageId, const QVariantMap &flatTitleOverrides) const
Registry page-data for pageId with its flat-mode title override applied, or an empty map for an unkno...
PhosphorControl::SidebarRows::SidebarRows
SidebarRows(QObject *parent=nullptr)
PhosphorControl::SidebarRows::~SidebarRows
~SidebarRows() override
PhosphorControl::SidebarRows::registryChanged
void registryChanged()
PhosphorControl::SidebarRows::registry
PageRegistry * registry() const
PhosphorControl::SidebarRows::build
QVariantList build(bool flattenTree, const QString &searchText, const QString ¤tParentId, const QVariantMap &expandedCategories, const QVariantMap &flatTitleOverrides) const
Build the visible row list.
PhosphorControl::SidebarRows::dividerPrefix
static QString dividerPrefix()
The prefix stamped onto a synthetic divider row's pageId.
PhosphorControl
Definition
ApplicationController.h:21
phosphor-control
include
PhosphorControl
SidebarRows.h
Generated by
1.15.0