Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
DirectionalNeighbor.h File Reference
#include "phosphorgeometry_export.h"
#include <QList>
#include <QRectF>
#include <QStringView>
#include <optional>

Go to the source code of this file.

Namespaces

namespace  PhosphorGeometry
 

Enumerations

enum class  PhosphorGeometry::Direction { PhosphorGeometry::Left , PhosphorGeometry::Right , PhosphorGeometry::Up , PhosphorGeometry::Down }
 Cardinal navigation direction in screen space (y grows downward). More...
 

Functions

PHOSPHORGEOMETRY_EXPORT std::optional< DirectionPhosphorGeometry::directionFromString (QStringView token)
 Parse a lower-case direction token ("left"/"right"/"up"/"down") into a Direction.
 
PHOSPHORGEOMETRY_EXPORT int PhosphorGeometry::directionalNeighbor (const QRectF &focus, const QList< QRectF > &candidates, Direction direction, bool requireOverlap=false)
 Pick the spatial neighbour of focus among candidates in direction.
 
PHOSPHORGEOMETRY_EXPORT int PhosphorGeometry::neighborDesktopInDirection (int currentDesktop, int desktopCount, int rows, Direction direction)
 The virtual desktop reached by stepping direction from currentDesktop on a rows-high desktop grid.