naturtag.controllers.taxon_controller module#

class naturtag.controllers.taxon_controller.TaxonController(settings, threadpool)#

Bases: naturtag.widgets.layouts.StylableWidget

bind_selection(taxon_cards)#

Connect click signal from each taxon card to select_taxon()

display_taxon(taxon)#
on_message#

Forward a message to status bar

on_select#

A taxon was selected

select_observation_taxon(observation_id)#

Load a taxon from an observation ID

select_taxon(taxon_id)#

Load a taxon by ID and update info display. Taxon API request will be sent from a separate thread, return to main thread, and then display info will be loaded from a separate thread.

set_search_results(taxa)#

Load search results into Results tab

staticMetaObject = PySide6.QtCore.QMetaObject("TaxonController" inherits "StylableWidget": Methods:   #34 type=Signal, signature=on_message(QString), parameters=QString   #35 type=Signal, signature=on_select(PyObject), parameters=PyObject   #36 type=Slot, signature=display_taxon(PyObject), parameters=PyObject )#
class naturtag.controllers.taxon_controller.TaxonTabs(threadpool, settings, user_taxa, parent=None)#

Bases: PySide6.QtWidgets.QTabWidget

add_tab(taxon_list, icon_str, label, tooltip)#
Return type

QWidget

display_observed(taxon_counts)#

After fetching observation taxon counts for the user, add info cards for them

display_recent(taxa)#

After fetching taxon records for recent and frequent, add info cards for them in the appropriate tabs

load_user_taxa()#
on_load#

New taxon cards were loaded

resizeEvent(event)#

On resize, show tab labels if there is enough room for at least a couple characters each (plus ‘…’), otherwise collapse to icons only

staticMetaObject = PySide6.QtCore.QMetaObject("TaxonTabs" inherits "QTabWidget": Methods:   #43 type=Signal, signature=on_load(QVariantList), parameters=QVariantList   #44 type=Slot, signature=display_recent(QVariantList), parameters=QVariantList   #45 type=Slot, signature=display_observed(QVariantList), parameters=QVariantList   #46 type=Slot, signature=update_history(PyObject), parameters=PyObject )#
update_history(taxon)#

Update history and frequent lists with the selected taxon. If it was already in one or both lists, update its position in the list(s).