6#include "phosphorscreenscore_export.h"
53namespace ScreenIdentity {
72PHOSPHORSCREENSCORE_EXPORT
void reset();
150 return !identifier.isEmpty() && !identifier.contains(QLatin1Char(
':'));
154PHOSPHORSCREENSCORE_EXPORT QString
idForName(
const QString& connectorName);
157PHOSPHORSCREENSCORE_EXPORT QString
nameForId(
const QString& screenId);
179 QStringList variants;
180 if (screenIdOrName.isEmpty()) {
183 variants.append(screenIdOrName);
185 const QString resolved =
idForName(screenIdOrName);
186 if (!resolved.isEmpty() && resolved != screenIdOrName) {
187 variants.append(resolved);
190 const QString connector =
nameForId(screenIdOrName);
191 if (!connector.isEmpty() && connector != screenIdOrName) {
192 variants.append(connector);
206PHOSPHORSCREENSCORE_EXPORT
bool screensMatch(
const QString& a,
const QString& b);
bool isConnectorName(const QString &identifier)
True if the identifier looks like a connector name (no ':').
Definition ScreenIdentity.h:148
PHOSPHORSCREENSCORE_EXPORT QString nameForId(const QString &screenId)
Convert a screen identifier back to its current connector name.
QStringList variantsFor(const QString &screenIdOrName)
Return every equivalent form of screenIdOrName.
Definition ScreenIdentity.h:177
PHOSPHORSCREENSCORE_EXPORT void reset()
Unconditionally drop every cache this namespace holds (local identifier caches AND the cross-process ...
PHOSPHORSCREENSCORE_EXPORT bool screensMatch(const QString &a, const QString &b)
Tolerance-aware equality between two screen identifiers.
PHOSPHORSCREENSCORE_EXPORT QScreen * findByIdOrName(const QString &identifier)
Resolve an identifier (connector name OR EDID-style ID, with or without "/vs:N" virtual-screen suffix...
PHOSPHORSCREENSCORE_EXPORT QString baseIdentifierFor(const QScreen *screen)
Compute the EDID-based base ID for a QScreen*.
PHOSPHORSCREENSCORE_EXPORT QString idForName(const QString &connectorName)
Convert a connector name to its current screen identifier.
PHOSPHORSCREENSCORE_EXPORT void invalidateEdidCache(const QString &connectorName=QString())
Drop the QScreen-keyed identifier caches AND the underlying EDID-serial cache (cascades to PhosphorId...
PHOSPHORSCREENSCORE_EXPORT void invalidateComputedIdentifiers()
Drop the computed-identifier and reverse-lookup caches without touching the EDID-serial cache.
PHOSPHORSCREENSCORE_EXPORT QString identifierFor(const QScreen *screen)
Compute the canonical identifier for a QScreen*.
PHOSPHORSCREENSCORE_EXPORT bool belongsToPhysicalScreen(const QString &storedScreenId, const QString &physicalScreenId)
Whether storedScreenId belongs to the physical screen physicalScreenId.
Definition IWindowTrackingService.h:26