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.QLabel

Selectable metadata text that copies its complete value when clicked.

Parameters:
copied
minimumSizeHint()[source]

Allow narrow value columns to compute height-for-width at actual width.

Return type:

PySide6.QtCore.QSize

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.QLabel

Require the configured pointer gesture while retaining keyboard links.

Parameters:
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.QWidget

Display editable metadata and file actions for one selected record.

Parameters:

parent (QWidget | None)

ads_update_requested
available_rows()[source]

Return selectable detail rows known for the current record.

Return type:

list[tuple[str, str]]

copy_feedback
label_width_changed
manual_metadata_requested
metadata_changed
move_row(key, destination)[source]

Move key to a final row index and persist the resulting order.

Parameters:
Return type:

None

reset_label_width()[source]

Restore the default field width and retain automatic font sizing.

Return type:

None

resizeEvent(event)[source]
Parameters:

event (Any)

Return type:

None

row_keys()[source]

Return the current metadata-row order.

Return type:

list[str]

row_label(key)[source]

Return the visible label for one metadata-row key.

Parameters:

key (str)

Return type:

str

row_order_changed
saved_row_order()[source]

Return the persisted row order even while no record is selected.

Return type:

list[str]

set_action_buttons_visible(*, show_edit, show_lock)[source]

Set visibility for edit and lock buttons across detail rows.

Parameters:
Return type:

None

set_application_commands(*, pdf_viewer_command, web_browser_command)[source]

Set optional applications used by local and external links.

Parameters:
  • pdf_viewer_command (str | None)

  • web_browser_command (str | None)

Return type:

None

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:
Return type:

None

set_expand_abstracts(enabled)[source]

Set whether newly rendered abstracts start expanded.

Parameters:

enabled (bool)

Return type:

None

set_hidden_rows(rows)[source]

Hide configured row keys without discarding their metadata.

Parameters:

rows (list[str])

Return type:

None

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 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.

Parameters:
Return type:

None

set_row_order(order)[source]

Set persisted row order, retaining unknown future field keys.

Parameters:

order (list[str])

Return type:

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:
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.

Parameters:
Return type:

bool

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.QLabel

Drag a field label to reorder its metadata row.

Parameters:
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.QWidget

One draggable metadata row with copy, edit, and lock controls.

Parameters:
copied
create_context_menu(origin=None)[source]

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:

PySide6.QtWidgets.QMenu

doi_labels: list[adsfolio.gui.detail_pane.CopyableLabel]
edit_requested
keyPressEvent(event)[source]
Parameters:

event (Any)

Return type:

None

label_width_requested
label_width_reset
lock_changed
menu_closed
minimumSizeHint()[source]

Allow horizontal shrinking to the viewport while preserving wrapped height.

Return type:

PySide6.QtCore.QSize

move_requested
paintEvent(event)[source]
Parameters:

event (Any)

Return type:

None

set_action_button_visibility(*, show_edit, show_lock)[source]

Set visibility for this row’s applicable edit and lock buttons.

Parameters:
Return type:

None

set_content_style(font, color)[source]

Apply the configured font and color to this row’s value.

Parameters:
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.QWidget

Own 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:

PySide6.QtCore.QSize

resizeEvent(event)[source]

Recompute vertical size hints when the scroll viewport width changes.

Parameters:

event (Any)

Return type:

None

row_dropped
sizeHint()[source]

Report height-for-width when laid out inside the scroll viewport.

Return type:

PySide6.QtCore.QSize

staticMetaObject = PySide6.QtCore.QMetaObject("MetadataRowsContainer" inherits "QWidget": Methods:   #33 type=Signal, signature=row_dropped(QString,int), parameters=QString, int )