Public-by-value view of a registry entry. More...
#include <PhosphorControl/PageRegistry.h>
Public Attributes | |
| QString | id |
| QString | parentId |
| QString | title |
| QString | iconSource |
| QUrl | qmlSource |
| QPointer< PageController > | controller |
| bool | isCollapsible = false |
| When true, the Sidebar renders this entry as an inline-expandable category header rather than a drill-down target — its children appear indented under it (toggleable) instead of replacing the list. | |
| bool | hasDividerAfter = false |
| When true, the Sidebar draws a horizontal divider line in the row slot immediately after this entry. | |
| PageVisibility | visibility = PageVisibility::Always |
| Simple/advanced tier for this page. | |
| QString | counterpartId {} |
| Optional id of this page's other-mode counterpart. | |
| bool | passesContext = false |
| The page's QML root declares controller and settingsApp, and PageHost sets them when it creates the page, before any binding runs, so the page may declare them required. | |
Public-by-value view of a registry entry.
Consumers receive copies via topLevelPages() / childPages() / allPages() / entry(); they may NOT mutate the underlying controller pointer to detach it from the registry. The QPointer surface is read-only by convention — the registry is the only writer. allPagesRef() hands out the live list by const reference instead of a copy, for read-only whole-list walks; see its invalidation note (the reference does not survive the next registry mutation).
Code that needs to act on the controller should prefer the explicit controller(id) accessor (which performs the live-pointer null-check) over Entry.controller. The field is public because Entry is a plain value type, and C++ walks such as ApplicationController::dirtyPageIds read it directly to avoid a second lookup.
| QPointer<PageController> PhosphorControl::PageRegistry::Entry::controller |
| QString PhosphorControl::PageRegistry::Entry::counterpartId {} |
Optional id of this page's other-mode counterpart.
When a mode flip (or a deep link) hides this page, the app's navigation gate should land on the counterpart instead of a generic fallback — e.g. a purpose-built SimpleOnly page and the AdvancedOnly page it condenses point at each other. Empty means "no counterpart; use the app fallback". The registry stores the mapping; it does not act on it. Braced default, so an aggregate initialization that stops before this field does not trip -Wmissing-field-initializers.
| bool PhosphorControl::PageRegistry::Entry::hasDividerAfter = false |
When true, the Sidebar draws a horizontal divider line in the row slot immediately after this entry.
Used to break up the vertical rhythm of long sidebars without grouping items under a category header. Suppressed while a search filter is active — dividers are navigation ornament, not match metadata.
| QString PhosphorControl::PageRegistry::Entry::iconSource |
| QString PhosphorControl::PageRegistry::Entry::id |
| bool PhosphorControl::PageRegistry::Entry::isCollapsible = false |
When true, the Sidebar renders this entry as an inline-expandable category header rather than a drill-down target — its children appear indented under it (toggleable) instead of replacing the list.
Useful for shallow grouping ("Display", "Rules", *-cat buckets) inside an otherwise drill-down sidebar.
| QString PhosphorControl::PageRegistry::Entry::parentId |
| bool PhosphorControl::PageRegistry::Entry::passesContext = false |
The page's QML root declares controller and settingsApp, and PageHost sets them when it creates the page, before any binding runs, so the page may declare them required.
A page without the flag gets them assigned after creation, if it declares them. Every page bound with bindPage() has it: it is part of the control module contract.
PageHost reads the flag only when it creates the page, and nothing announces a change of it. So changing it for a page already built does nothing to that page; it counts the next time PageHost creates the page: its first visit, or a bind that gives it other QML. Clearing it for a page whose QML declares the properties required (every module page) makes that creation fail.
| QUrl PhosphorControl::PageRegistry::Entry::qmlSource |
| QString PhosphorControl::PageRegistry::Entry::title |
| PageVisibility PhosphorControl::PageRegistry::Entry::visibility = PageVisibility::Always |
Simple/advanced tier for this page.
Declared at registration (set it on the Entry passed to registerPage); defaults to Always so unclassified pages show in both modes. See PageVisibility. setPageVisibility() remains for late reclassification but registration-time declaration is the canonical path — it has NO in-tree caller and is retained for plugin-style registration, where a host registers a page before it knows the tier. Do not delete it as dead code: its visibleSetChanged emit is the only reason that signal exists separately from showAdvancedChanged.