Add annotation list filtering and search

This commit is contained in:
2026-06-30 13:46:28 +08:00
parent 48249e7280
commit b388d21215
3 changed files with 73 additions and 7 deletions
+9 -1
View File
@@ -126,7 +126,13 @@ class RightToolsPanel(QWidget):
self.sections[section_id] = section
return section
def add_annotation_list(self, title: str, annotation_list: QListWidget, section_id: str) -> None:
def add_annotation_list(
self,
title: str,
annotation_list: QListWidget,
section_id: str,
controls: Iterable[QWidget] | None = None,
) -> None:
section = QFrame()
section.setObjectName("toolSection")
@@ -137,6 +143,8 @@ class RightToolsPanel(QWidget):
label = QLabel(title)
label.setObjectName("toolSectionLabel")
layout.addWidget(label)
for control in controls or []:
layout.addWidget(control)
layout.addWidget(annotation_list)
annotation_list.setObjectName("rightAnnotationList")