ui: show clip position counter in window title
This commit is contained in:
@@ -148,6 +148,15 @@ class Annotator(QMainWindow):
|
||||
return None
|
||||
return self._json_read(meta_path)
|
||||
|
||||
# ── helpers ────────────────────────────────────────────────────
|
||||
def _update_window_title(self):
|
||||
total = len(self.selector.clips)
|
||||
try:
|
||||
idx = self.selector.clips.index(self.filename) + 1
|
||||
except ValueError:
|
||||
idx = "?"
|
||||
self.setWindowTitle(f"Clip Annotator ({idx} / {total})")
|
||||
|
||||
# ── UI setup ───────────────────────────────────────────────────
|
||||
def _init_ui(self):
|
||||
self.mc = MaskCanvas(self.frames, self.dh, self.dw)
|
||||
@@ -265,6 +274,8 @@ class Annotator(QMainWindow):
|
||||
self._set_answers(self._pending_answers)
|
||||
self._pending_answers = None
|
||||
|
||||
self._update_window_title()
|
||||
|
||||
def _build_question_panel(self) -> QVBoxLayout:
|
||||
vbox = QVBoxLayout()
|
||||
for section, qs in self.cfg.get_questions():
|
||||
@@ -409,6 +420,7 @@ class Annotator(QMainWindow):
|
||||
self._set_answers(self._pending_answers)
|
||||
self._pending_answers = None
|
||||
self.btn_prev.setEnabled(self.history_pos > 0)
|
||||
self._update_window_title()
|
||||
|
||||
def _advance_clip(self):
|
||||
if self.history_pos < len(self.history) - 1:
|
||||
|
||||
Reference in New Issue
Block a user