Refactor HVideoTool to support project-based workflow: introduced project management features, updated UI for project handling, and enhanced documentation in README and CLAUDE.md. The tool now organizes images and settings into projects, improving usability and detection caching.

This commit is contained in:
Leonid Pershin
2026-06-07 04:53:27 +03:00
parent 7f0121b7df
commit e27dfdf518
27 changed files with 2998 additions and 387 deletions
+9 -4
View File
@@ -18,7 +18,8 @@ class MarkerSlider(QSlider):
def __init__(self, orientation=Qt.Horizontal, parent=None) -> None:
super().__init__(orientation, parent)
self._marks: set[int] = set()
self._mark_color = QColor(220, 70, 70)
# Bright cyan stands out against both the dark track and the orange fill.
self._mark_color = QColor(0, 220, 255)
def set_marks(self, marks: Iterable[int]) -> None:
marks = set(marks)
@@ -49,11 +50,15 @@ class MarkerSlider(QSlider):
return
lo, hi = self.minimum(), self.maximum()
half = handle.width() // 2
top = groove.center().y() - 5
bottom = groove.center().y() + 5
# Span (almost) the full widget height so marks read over the fill/handle.
top = self.rect().top() + 1
bottom = self.rect().bottom() - 1
painter = QPainter(self)
painter.setPen(self._mark_color)
pen = painter.pen()
pen.setColor(self._mark_color)
pen.setWidth(2)
painter.setPen(pen)
# Many frames can collapse onto the same pixel column — dedupe to keep
# repaint cheap on big folders (tens of thousands of frames).
seen_x: set[int] = set()