|
|
@ -12,7 +12,7 @@ from PySide6 import QtCore, QtGui, QtWidgets
|
|
|
|
|
|
|
|
|
|
|
|
# Classification
|
|
|
|
# Classification
|
|
|
|
|
|
|
|
|
|
|
|
class DifferenceStatus:
|
|
|
|
class DifferenceStatus(Enum):
|
|
|
|
"""Describes differences between two topologies"""
|
|
|
|
"""Describes differences between two topologies"""
|
|
|
|
NORMAL = auto()
|
|
|
|
NORMAL = auto()
|
|
|
|
MISSING = auto()
|
|
|
|
MISSING = auto()
|
|
|
@ -109,6 +109,7 @@ def assign_brushes(at):
|
|
|
|
for tags in annot.values():
|
|
|
|
for tags in annot.values():
|
|
|
|
statuses = list(filter(lambda x: isinstance(x, DifferenceStatus), tags))
|
|
|
|
statuses = list(filter(lambda x: isinstance(x, DifferenceStatus), tags))
|
|
|
|
status = statuses[-1] if len(statuses) > 0 else DifferenceStatus.DISCREPANCY # should always have something.
|
|
|
|
status = statuses[-1] if len(statuses) > 0 else DifferenceStatus.DISCREPANCY # should always have something.
|
|
|
|
|
|
|
|
print(repr(status))
|
|
|
|
color = {
|
|
|
|
color = {
|
|
|
|
DifferenceStatus.NORMAL: 'black',
|
|
|
|
DifferenceStatus.NORMAL: 'black',
|
|
|
|
DifferenceStatus.EXTRA: 'green',
|
|
|
|
DifferenceStatus.EXTRA: 'green',
|
|
|
@ -182,4 +183,5 @@ def create_qgritems(at):
|
|
|
|
|
|
|
|
|
|
|
|
line = QtWidgets.QGraphicsLineItem(rpos.x, rpos.y, npos.x, npos.y)
|
|
|
|
line = QtWidgets.QGraphicsLineItem(rpos.x, rpos.y, npos.x, npos.y)
|
|
|
|
at.link_annotations[lk].append(line)
|
|
|
|
at.link_annotations[lk].append(line)
|
|
|
|
|
|
|
|
return at
|
|
|
|
|
|
|
|
|
|
|
|