6#include "phosphorgeometry_export.h"
115 Direction direction,
bool requireOverlap =
false);
Definition DirectionalNeighbor.h:14
constexpr Direction opposite(Direction direction)
The reverse of direction.
Definition DirectionalNeighbor.h:33
PHOSPHORGEOMETRY_EXPORT int edgeMostRect(const QList< QRectF > &candidates, Direction edge)
Index of the candidate whose edge-facing side is most extreme toward that edge.
PHOSPHORGEOMETRY_EXPORT int directionalNeighbor(const QRectF &focus, const QList< QRectF > &candidates, Direction direction, bool requireOverlap=false)
Pick the spatial neighbour of focus among candidates in direction.
Direction
Cardinal navigation direction in screen space (y grows downward).
Definition DirectionalNeighbor.h:17
PHOSPHORGEOMETRY_EXPORT std::optional< Direction > directionFromString(QStringView token)
Parse a lower-case direction token ("left"/"right"/"up"/"down") into a Direction.
PHOSPHORGEOMETRY_EXPORT int neighborDesktopInDirection(int currentDesktop, int desktopCount, int rows, Direction direction)
The virtual desktop reached by stepping direction from currentDesktop on a rows-high desktop grid.