71 m_adjacentThreshold = px;
75 return m_adjacentThreshold;
104 QRectF combineZoneGeometries(
const QVector<Zone*>& zones)
const;
105 bool areZonesAdjacent(
Zone* zone1,
Zone* zone2)
const;
106 qreal distanceToZoneEdge(
const QPointF& point,
Zone* zone)
const;
107 Zone* resolveOverlappingZone(
const QPointF& point)
const;
109 Layout* m_layout =
nullptr;
113 std::unique_ptr<class ZoneHighlighter> m_highlighter;
Abstract interface for zone detection + highlight lifecycle.
Definition IZoneDetector.h:84
Represents a collection of zones that form a layout.
Definition Layout.h:74
Efficient zone detection for window snapping.
Definition ZoneDetector.h:38
void highlightZone(Zone *zone) override
Layout * layout() const override
Definition ZoneDetector.h:51
Zone * nearestZone(const QPointF &point) const override
ZoneDetector(QObject *parent=nullptr)
void setLayout(Layout *layout) override
void highlightZones(const QVector< Zone * > &zones) override
int adjacentThreshold() const
Definition ZoneDetector.h:73
Zone * zoneAtPoint(const QPointF &point) const override
QVector< Zone * > expandPaintedZonesToRect(const QVector< Zone * > &seedZones) const override
Expand painted zones to include all zones that intersect the bounding rect.
void clearHighlights() override
ZoneDetectionResult detectMultiZone(const QPointF &cursorPos) const override
void setAdjacentThreshold(int px)
Set the adjacency threshold used by detectMultiZone / areZonesAdjacent.
Definition ZoneDetector.h:69
ZoneDetectionResult detectZone(const QPointF &cursorPos) const override
Represents a single zone within a layout.
Definition Zone.h:44
constexpr int AdjacentThreshold
Pixel distance considered "adjacent" for multi-zone span detection.
Definition ZoneDefaults.h:41
Definition IWindowTrackingService.h:22
Result of zone detection.
Definition IZoneDetector.h:32