aqt.browser.table.table#

Classes#

Module Contents#

class aqt.browser.table.table.Table(browser: aqt.browser.Browser)#
SELECTION_LIMIT: int = 500#
browser#
col: anki.collection.Collection#
set_view(view: QTableView) None#
cleanup() None#
len() int#
len_selection(refresh: bool = False) int#
has_current() bool#
has_previous() bool#
has_next() bool#
is_notes_mode() bool#
get_current_card() anki.cards.Card | None#
get_current_note() anki.notes.Note | None#
get_single_selected_card() anki.cards.Card | None#

If there is only one row selected return its card, else None. This may be a different one than the current card.

get_selected_card_ids() collections.abc.Sequence[anki.cards.CardId]#
get_selected_note_ids() collections.abc.Sequence[anki.notes.NoteId]#
get_card_ids_from_selected_note_ids() collections.abc.Sequence[anki.cards.CardId]#
select_all() None#
clear_selection() None#
invert_selection() None#
select_single_card(card_id: anki.cards.CardId, scroll_even_if_visible: bool = True) None#

Try to set the selection to the item corresponding to the given card.

reset() None#

Reload table data from collection and redraw.

begin_reset() None#
end_reset() None#
on_backend_will_block() None#
on_backend_did_block() None#
redraw_cells() None#
op_executed(changes: anki.collection.OpChanges, handler: object | None, focused: bool) None#
search(txt: str) None#
toggle_state(is_notes_mode: bool, last_search: str) None#
to_previous_row() None#
to_next_row() None#
to_first_row() None#
to_last_row() None#
to_row_of_unselected_note() collections.abc.Sequence[anki.notes.NoteId]#

Select and set focus to a row whose note is not selected, trying the rows below the bottomost, then above the topmost selected row. If that’s not possible, clear selection. Return previously selected note ids.

clear_current() None#
class aqt.browser.table.table.StatusDelegate(browser: aqt.browser.Browser, model: aqt.browser.table.model.DataModel)#

Bases: QItemDelegate

paint(painter: QPainter | None, option: QStyleOptionViewItem, index: QModelIndex) None#