polychron.views.DatingResultsView
Module
DatingResultsView
Bases: FrameView
View for displaying post-calibration "Dating Results" for a model.
I.e. the "Dating Results" tab
Formerly part of PageOne
tree_phases
instance-attribute
tree_phases = None
Table tree, doenst' always exist
results_text
instance-attribute
results_text = None
tkinter text handle within the littlecanvas3.
canvas_plt
instance-attribute
canvas_plt: FigureCanvasTkAgg | None = None
Canvas which cotnains a plot
toolbar
instance-attribute
toolbar: NavigationToolbar2Tk | None = None
Matplotlib toolkbar for the canvas_plt if it exists
__init__
__init__(parent: Frame) -> None
Construct the view, without binding any callbacks
get_testmenu2_selection
get_testmenu2_selection() -> str
Return the most recent value for the testmenu
set_testmenu2_selection
set_testmenu2_selection(value: str) -> None
Set the value for the testmenu
bind_testmenu2_commands
bind_testmenu2_commands(callback: Callable[[], Any]) -> None
Bind the callback for the stratigraphic graph right-click menu
ttk.OptionMenu doesn not accept commadns to .config, only on the constructor? So in this case the view contains a reference to the callback
bind_sasd_tab_button
bind_sasd_tab_button(callback: Callable[[], Any]) -> None
Bind the callback for when the sasd_tab_button is pressed
bind_dr_tab_button
bind_dr_tab_button(callback: Callable[[], Any]) -> None
Bind the callback for when the dr_tab_button is pressed
bind_posterior_densities_button
bind_posterior_densities_button(callback: Callable[[], Any]) -> None
Bind the callback for when the posterior_densities_button is pressed
bind_hpd_button
bind_hpd_button(callback: Callable[[], Any]) -> None
Bind the callback for when the hpd_button is pressed
bind_clear_list_button
bind_clear_list_button(callback: Callable[[], Any]) -> None
Bind the callback for when the clear_list_button is pressed
bind_littlecanvas2_callback
bind_littlecanvas2_callback(sequence: str, callback: Callable[[], Any])
Bind a single callback to the specified sequence on the littlecanvas2. This is an alternative to an all in one bind method, as the canvas repeatedly gets cleared
unbind_littlecanvas2_callback
unbind_littlecanvas2_callback(sequence: str)
Unbind a single callback to the specified sequence on the littlecanvas2. This is an alternative to an all in one bind method, as the canvas repeatedly gets cleared
bind_littlecanvas2_events
bind_littlecanvas2_events(callback_wheel: Callable[[], Any], callback_rightclick: Callable[[], Any], callback_move_from: Callable[[], Any], callback_move_to: Callable[[], Any]) -> None
Bind mouse callback events for interacting with the graph canvas
build_file_menu
build_file_menu(items: List[Tuple[str, Callable[[], Any]] | None]) -> None
Builds the 'file' menu element with labels and callback functions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
items
|
List[Tuple[str, Callable[[], Any]] | None]
|
A List of menu entries to add, which may be None to identify a separator, or a tuple containing a label anf callback fucntion. |
required |
build_view_menu
build_view_menu(items: List[Tuple[str, Callable[[], Any]] | None]) -> None
Builds the 'view' menu element with labels and callback functions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
items
|
List[Tuple[str, Callable[[], Any]] | None]
|
A List of menu entries to add, which may be None to identify a separator, or a tuple containing a label anf callback fucntion. |
required |
build_tool_menu
build_tool_menu(items: List[Tuple[str, Callable[[], Any]] | None]) -> None
Builds the 'tools' menu element with labels and callback functions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
items
|
List[Tuple[str, Callable[[], Any]] | None]
|
A List of menu entries to add, which may be None to identify a separator, or a tuple containing a label anf callback fucntion. |
required |
update_littlecanvas2
update_littlecanvas2(image)
Update the image within the littlecanvas2 element - i.e. the chronological graph.
Formerly part of PageOne.chornograph_render_post
show_image2
show_image2()
Show image on the 2nd Canvas
wheel2
wheel2(event)
Zoom with mouse wheel for the stratigraphic image canvas
Formerly (part of) PageOne.wheel
show_testmenu
show_testmenu(has_image: bool) -> Tuple[int | None, int | None]
Show the test menu within the little canvas2 at the cursors' coordinates
Formerly part of PageOne.onRight
Parameters:
Name | Type | Description | Default |
---|---|---|---|
has_image
|
bool
|
If the littlecanvas2 has been rendered with an image or not. |
required |
update_hpd_interval
update_hpd_interval(USER_INP: str, intervals: List[Tuple[str, str]]) -> None
UI parts of loads hpd intervals into the results page
Formerly PageOne.get_hpd_interval
update_hpd_interval_3col
update_hpd_interval_3col(intervals: List[Tuple[str, str, str]]) -> None
UI parts of loads hpd intervals into the results page, with 3 clumsn this time?
Formerly PageOne.get_hpd_interval
append_testmenu2_entry
append_testmenu2_entry(text) -> None
Append an entry to the end of the right click testmenu2.
remove_testmenu2_entry
remove_testmenu2_entry(text) -> None
Remove an entry to the end of the right click testmenu2.
clear_littlecanvas3
clear_littlecanvas3(id: bool = False)
Clear the littlecanvas3, always delting results_text, and sometiems littelcanvas3_id
update_littlecanvas3
update_littlecanvas3(results_list: List[str]) -> None
Update the contents of littlecanvas3
Formerly part of PageOne.chornograph_render_post
Parameters:
Name | Type | Description | Default |
---|---|---|---|
results_list
|
List[str]
|
a ordered list of (unique) node labels |
required |
show_canvas_plot_with_toolbar
show_canvas_plot_with_toolbar(fig: Figure) -> None
Add (or replace) the visible plot with the provided figure
Parameters:
Name | Type | Description | Default |
---|---|---|---|
fig
|
Figure
|
The matplotlib Figure to be displayed in the interactive canvas |
required |