adsfolio.gui.detail_pane
Editable, reorderable metadata detail pane for a selected PDF.
- class adsfolio.gui.detail_pane.CopyableLabel(text, parent=None, copy_text=None)[source]
Bases:
PySide6.QtWidgets.QLabelSelectable metadata text that copies its complete value when clicked.
- copied
- minimumSizeHint()[source]
Allow narrow value columns to compute height-for-width at actual width.
- Return type:
- mouseReleaseEvent(event)[source]
Copy the label text after a primary-button click.
- Parameters:
event (Any)
- Return type:
None
- set_copy_text(value)[source]
Set the original text copied by a primary-button click.
- Parameters:
value (str)
- Return type:
None
- staticMetaObject = PySide6.QtCore.QMetaObject("CopyableLabel" inherits "QLabel": Methods: #42 type=Signal, signature=copied() )
- class adsfolio.gui.detail_pane.DetailLinkLabel(text, parent=None)[source]
Bases:
PySide6.QtWidgets.QLabelRequire the configured pointer gesture while retaining keyboard links.
- activated
- mouseDoubleClickEvent(event)[source]
Open once per gesture, leaving modified clicks for text selection.
- Parameters:
event (Any)
- Return type:
None
- mousePressEvent(event)[source]
Remember modified gestures even if modifiers are released first.
- Parameters:
event (Any)
- Return type:
None
- mouseReleaseEvent(event)[source]
Allow only unmodified primary gestures matching the preference.
- Parameters:
event (Any)
- Return type:
None
- staticMetaObject = PySide6.QtCore.QMetaObject("DetailLinkLabel" inherits "QLabel": Methods: #42 type=Signal, signature=activated(QString), parameters=QString )
- class adsfolio.gui.detail_pane.DetailPane(parent=None)[source]
Bases:
PySide6.QtWidgets.QWidgetDisplay editable metadata and file actions for one selected record.
- Parameters:
parent (QWidget | None)
- ads_update_requested
- copy_feedback
- label_width_changed
- manual_metadata_requested
- metadata_changed
- reset_label_width()[source]
Restore the default field width and retain automatic font sizing.
- Return type:
None
- row_order_changed
- set_action_buttons_visible(*, show_edit, show_lock)[source]
Set visibility for edit and lock buttons across detail rows.
- set_application_commands(*, pdf_viewer_command, web_browser_command)[source]
Set optional applications used by local and external links.
- set_citation_styles(styles)[source]
Configure runtime custom citation styles and rerender the current record.
- Parameters:
styles (collections.abc.Sequence[adsfolio.citations.CitationStyle])
- Return type:
None
- set_compact_rows(enabled)[source]
Use context menus while retaining the saved inline-button choices.
- Parameters:
enabled (bool)
- Return type:
None
- set_content_font(font, color)[source]
Set the appearance applied to detail values on future renders.
- Parameters:
font (PySide6.QtGui.QFont | None)
color (PySide6.QtGui.QColor | None)
- Return type:
None
- set_expand_abstracts(enabled)[source]
Set whether newly rendered abstracts start expanded.
- Parameters:
enabled (bool)
- Return type:
None
Hide configured row keys without discarding their metadata.
- set_label_bold(enabled)[source]
Set whether the left-column metadata labels use bold text.
- Parameters:
enabled (bool)
- Return type:
None
- set_label_width(width)[source]
Set the shared label width, or use the width of a common field name.
- Parameters:
width (int | None)
- Return type:
None
- set_link_activation(mode)[source]
Set pointer link activation to double (default) or single.
Keyboard link activation remains available in either mode. Existing rows update immediately, and new rows inherit the setting.
- Parameters:
mode (str)
- Return type:
None
- set_read_only(read_only, reason=None, *, allow_identifier_update=False, allow_manual_metadata=False)[source]
Set whether metadata editing is unavailable.
- Parameters:
read_only (bool) – Disable metadata editing when true.
reason (str or None, optional) – Explain why editing is unavailable. Use a generic message if omitted.
allow_identifier_update (bool, optional) – Allow Update by ID in read-only mode when the user selects a record. The caller must stop the automatic ADS recheck before the update.
allow_manual_metadata (bool, optional) – Allow Enter Details in read-only mode. The caller must stop the recheck before it opens the details dialog.
- Return type:
None
- set_record(record, root, cached_document=None)[source]
Render record, or clear the pane when it is None.
- set_row_spacing(spacing)[source]
Set the pixel separation between adjacent metadata rows.
- Parameters:
spacing (int | None)
- Return type:
None
- set_row_styles(fonts, colors)[source]
Set field-specific appearance overrides for future detail renders.
- Parameters:
fonts (dict[str, PySide6.QtGui.QFont])
colors (dict[str, PySide6.QtGui.QColor])
- Return type:
None
- set_timestamp_format(timestamp_format)[source]
Set the timestamp format used for subsequently rendered records.
- Parameters:
timestamp_format (str)
- Return type:
None
- shows(record, root, cached_document=None)[source]
Return whether the pane already renders this record state.
A True result means that set_record with the same arguments would build the same rows. Callers can then skip the rebuild.
- staticMetaObject = PySide6.QtCore.QMetaObject("DetailPane" inherits "QWidget": Methods: #33 type=Signal, signature=copy_feedback(QString), parameters=QString #34 type=Signal, signature=metadata_changed(QVariantMap), parameters=QVariantMap #35 type=Signal, signature=ads_update_requested(QString), parameters=QString #36 type=Signal, signature=manual_metadata_requested() #37 type=Signal, signature=row_order_changed(QVariantList), parameters=QVariantList #38 type=Signal, signature=label_width_changed(PyObject), parameters=PyObject )
- class adsfolio.gui.detail_pane.DragHandle(key, parent=None)[source]
Bases:
PySide6.QtWidgets.QLabelDrag a field label to reorder its metadata row.
- mouseMoveEvent(event)[source]
Start a row drag after the pointer travels beyond Qt’s threshold.
- Parameters:
event (Any)
- Return type:
None
- mousePressEvent(event)[source]
Record the starting point for an explicit row drag.
- Parameters:
event (Any)
- Return type:
None
- mouseReleaseEvent(event)[source]
Restore the normal drag-handle cursor.
- Parameters:
event (Any)
- Return type:
None
- paintEvent(event)[source]
Elide the label and keep a compact lock visible inside its column.
- Parameters:
event (Any)
- Return type:
None
- staticMetaObject = PySide6.QtCore.QMetaObject("DragHandle" inherits "QLabel": )
- class adsfolio.gui.detail_pane.MetadataRow(key, label, value, *, editable, lockable, locked, label_width, expand_abstract=False, link_html=None, parent=None)[source]
Bases:
PySide6.QtWidgets.QWidgetOne draggable metadata row with copy, edit, and lock controls.
- Parameters:
- copied
Offer copy, edit, lock, and reorder actions for a field.
- Parameters:
origin (PySide6.QtWidgets.QWidget, optional) – Value label that opened the menu. A DOI label copies that DOI. Other origins copy the full field value.
- Returns:
Actions available for this field.
- Return type:
- doi_labels: list[adsfolio.gui.detail_pane.CopyableLabel]
- edit_requested
- label_width_requested
- label_width_reset
- link_label: PySide6.QtWidgets.QLabel | None
- link_requested
- lock_changed
- minimumSizeHint()[source]
Allow horizontal shrinking to the viewport while preserving wrapped height.
- Return type:
- move_requested
- set_action_button_visibility(*, show_edit, show_lock)[source]
Set visibility for this row’s applicable edit and lock buttons.
- set_content_style(font, color)[source]
Apply the configured font and color to this row’s value.
- Parameters:
font (PySide6.QtGui.QFont | None)
color (PySide6.QtGui.QColor | None)
- Return type:
None
- set_label_bold(enabled)[source]
Set whether this row’s left-column label uses bold text.
- Parameters:
enabled (bool)
- Return type:
None
- size_changed
- staticMetaObject = PySide6.QtCore.QMetaObject("MetadataRow" inherits "QWidget": Methods: #33 type=Signal, signature=copied(QString), parameters=QString #34 type=Signal, signature=edit_requested(QString), parameters=QString #35 type=Signal, signature=lock_changed(QString,bool), parameters=QString, bool #36 type=Signal, signature=link_requested(QString), parameters=QString #37 type=Signal, signature=size_changed() #38 type=Signal, signature=move_requested(QString,int), parameters=QString, int #39 type=Signal, signature=menu_closed(QString), parameters=QString #40 type=Signal, signature=label_width_requested(int), parameters=int #41 type=Signal, signature=label_width_reset() )
- value: PySide6.QtWidgets.QLabel
- class adsfolio.gui.detail_pane.MetadataRowsContainer(parent=None)[source]
Bases:
PySide6.QtWidgets.QWidgetOwn draggable metadata rows without Qt item-widget reparenting.
- Parameters:
parent (QWidget | None)
- dragEnterEvent(event)[source]
Accept drags produced by a detail-row handle.
- Parameters:
event (Any)
- Return type:
None
- dragMoveEvent(event)[source]
Keep accepting valid detail-row drags across the container.
- Parameters:
event (Any)
- Return type:
None
- dropEvent(event)[source]
Emit the source row and its destination index.
- Parameters:
event (Any)
- Return type:
None
- minimumSizeHint()[source]
Fit within the scroll viewport width while honoring wrapped row height.
- Return type:
- resizeEvent(event)[source]
Recompute vertical size hints when the scroll viewport width changes.
- Parameters:
event (Any)
- Return type:
None
- row_dropped
- staticMetaObject = PySide6.QtCore.QMetaObject("MetadataRowsContainer" inherits "QWidget": Methods: #33 type=Signal, signature=row_dropped(QString,int), parameters=QString, int )