Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
SearchEntry.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 <QLatin1Char>
7#include <QString>
8#include <QStringList>
9
10namespace PhosphorControl {
11
25{
38
50
55 QString pageId;
59 QString actionId;
61 QString anchor;
63 QString title;
65 QString subtitle;
67 QString icon;
69 QStringList keywords;
77 bool advancedOnly = false;
78
89 QString foldedTitle;
91 QStringList foldedKeywords;
92
96 QString address() const
97 {
98 return anchor.isEmpty() ? pageId : (pageId + QLatin1Char('#') + anchor);
99 }
100};
101
102} // namespace PhosphorControl
Definition ApplicationController.h:21
One searchable item in the global settings search index.
Definition SearchEntry.h:25
QString subtitle
Secondary context line — typically the breadcrumb (translated).
Definition SearchEntry.h:65
QString actionId
App-defined command id for Kind::Action entries; empty otherwise.
Definition SearchEntry.h:59
Mode
Which UI mode(s) can reach this entry.
Definition SearchEntry.h:45
@ Both
Reachable in simple and advanced mode alike.
Definition SearchEntry.h:46
@ AdvancedOnly
On an AdvancedOnly page, or an advanced-gated row.
Definition SearchEntry.h:48
@ SimpleOnly
Lives on a SimpleOnly page (a condensed simple surface).
Definition SearchEntry.h:47
QString icon
Icon name (freedesktop / Kirigami theme).
Definition SearchEntry.h:67
QStringList foldedKeywords
Definition SearchEntry.h:91
QString foldedTitle
Search-folded copies of the matched fields, filled by SearchRanker::prefold.
Definition SearchEntry.h:89
QStringList keywords
Extra synonyms / search terms (translated). Not displayed.
Definition SearchEntry.h:69
Kind
Definition SearchEntry.h:26
@ Action
An app-level command rather than a destination (open an overlay, start a wizard).
Definition SearchEntry.h:36
@ Page
A navigable settings page.
Definition SearchEntry.h:27
@ Entity
A dynamic content item (rule, shader, layout, …).
Definition SearchEntry.h:30
@ Setting
An individual setting row within a page (anchor).
Definition SearchEntry.h:29
@ Section
A card / section within a page (anchor).
Definition SearchEntry.h:28
QString pageId
Navigation target page id (must be a registered page).
Definition SearchEntry.h:55
bool advancedOnly
True when the target row/card is only rendered in advanced mode, on a page that itself shows in BOTH ...
Definition SearchEntry.h:77
QString foldedSubtitle
Definition SearchEntry.h:90
Mode mode
Definition SearchEntry.h:52
QString title
Primary display label (translated).
Definition SearchEntry.h:63
QString anchor
Optional reveal anchor within the page. Empty for a plain page target.
Definition SearchEntry.h:61
QString address() const
The navigable address consumed by SettingsController::navigateTo, which splits on the FIRST '#'.
Definition SearchEntry.h:96
Kind kind
Definition SearchEntry.h:51