adsfolio.gui.annotation_merge
Interactive review dialog for moving annotations between PDF editions.
- class adsfolio.gui.annotation_merge.AnnotationMergeDialog(target, source, parent=None)[source]
Bases:
PySide6.QtWidgets.QDialogReview each source annotation and write a verified merged copy.
The target PDF is canonical and is never modified. Each source annotation is placed on the target, or, if its type cannot be copied, explicitly waived. The copy is saved to a new path chosen by the user.
- Parameters:
target (Path)
source (Path)
parent (QWidget | None)
- accept_and_next()[source]
Accept the visible candidate and review the next unresolved item.
- Return type:
None
- accept_suggestion()[source]
Accept the currently displayed text or sentence candidate.
- Return type:
str | None
- cleanup_originals()[source]
Let the reader remove originals after verifying the saved output.
- Return type:
None
- copy_saved
- property current: adsfolio.pdf.annotation_merge.AnnotationItem | None[source]
Return the selected source annotation.
- eventFilter(watched, event)[source]
- Parameters:
watched (PySide6.QtCore.QObject)
event (PySide6.QtCore.QEvent)
- Return type:
- exclude_source_links(confirmed=None)[source]
Waive source hyperlinks together after an explicit user decision.
- find_target_text()[source]
Show all target occurrences of the reader’s search text.
- Return type:
None
- next_unresolved()[source]
Select the next annotation that still needs a placement or waiver.
- Return type:
None
- originals_trashed
- place_area(x0, y0, x1, y1)[source]
Place the selected markup on the target words inside the dragged box.
- save_copy(output=None)[source]
Write the merged copy to a new path and show an honest summary.
- Parameters:
output (pathlib.Path | None)
- Return type:
- select_item(row)[source]
Show the selected annotation on the source page and offer a placement.
- Parameters:
row (int)
- Return type:
None
- start_sentence_matching()[source]
Find closest wording locally while the reader continues reviewing.
- Return type:
None
- staticMetaObject = PySide6.QtCore.QMetaObject("AnnotationMergeDialog" inherits "QDialog": Methods: #41 type=Signal, signature=copy_saved(QString), parameters=QString #42 type=Signal, signature=originals_trashed(PyObject), parameters=PyObject )
- toggle_links()[source]
Show source hyperlinks separately from the annotation review queue.
- Return type:
None
- class adsfolio.gui.annotation_merge.PdfPageView(parent=None)[source]
Bases:
PySide6.QtWidgets.QLabelRender one PDF page and report clicks and drags in PDF points.
- Parameters:
parent (QWidget | None)
- area_selected
- attach_scroll(scroll)[source]
Fit the page to this viewport and follow its size changes.
- Parameters:
scroll (PySide6.QtWidgets.QScrollArea)
- Return type:
None
- eventFilter(watched, event)[source]
- Parameters:
watched (PySide6.QtCore.QObject)
event (PySide6.QtCore.QEvent)
- Return type:
- mouseMoveEvent(event)[source]
- Parameters:
event (PySide6.QtGui.QMouseEvent)
- Return type:
None
- mousePressEvent(event)[source]
- Parameters:
event (PySide6.QtGui.QMouseEvent)
- Return type:
None
- mouseReleaseEvent(event)[source]
- Parameters:
event (PySide6.QtGui.QMouseEvent)
- Return type:
None
- point_clicked
- set_fit_mode(mode)[source]
Display the page at pane width, pane height, or 100 percent.
- Parameters:
mode (str)
- Return type:
None
- show_page(path, page_number)[source]
Draw a page as displayed (rotation and crop box applied).
Returns the page rectangle in the unrotated coordinates used by annotations and text; overlays and mouse events use those coordinates.
- staticMetaObject = PySide6.QtCore.QMetaObject("PdfPageView" inherits "QLabel": Methods: #42 type=Signal, signature=point_clicked(double,double), parameters=double, double #43 type=Signal, signature=area_selected(double,double,double,double), parameters=double, double, double, double )