mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-30 23:08:25 +02:00
[ui] Utils: add SelectionBox and DelegateSelectionBox
- SelectionBox: generic Selection box component. - DelegateSelectionBox: specialized SelectionBox to select model delegates from an instantiator (Repeater, ListView). Also Introduce a Geom2D helper class to provide missing features for intersection testing in QML.
This commit is contained in:
parent
dfe2166942
commit
6d2e9a2ba9
5 changed files with 106 additions and 1 deletions
8
meshroom/ui/components/geom2D.py
Normal file
8
meshroom/ui/components/geom2D.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
from PySide6.QtCore import QObject, Slot, QRectF
|
||||
|
||||
|
||||
class Geom2D(QObject):
|
||||
@Slot(QRectF, QRectF, result=bool)
|
||||
def rectRectIntersect(self, rect1: QRectF, rect2: QRectF) -> bool:
|
||||
"""Check if two rectangles intersect."""
|
||||
return rect1.intersects(rect2)
|
Loading…
Add table
Add a link
Reference in a new issue