module timelinelib.wxgui.frames.mainframe.mainframecontroller¶
-
class
timelinelib.wxgui.frames.mainframe.mainframecontroller.
MainFrameController
[source]¶ Bases:
object
Controller for
MainFrame
. It is responsible for the business logic.-
__init__
(main_frame, db_open_fn, config)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
populate
()[source]¶ Find out if there is info saved in the config object of a last used timeline. If so open that timeline.
-
open_timeline_if_exists
(path)[source]¶ Open the timeline file given by path. If the file doesn’t exist an error message is displayed.
-
get_readonly_text_in_status_bar
()[source]¶ Return the text to be displayed in the third column of the status bar.
-
create_new_timeline
(timetype=None)[source]¶ File menu New-action handler that creates a new timline.
-
save_as
()[source]¶ File menu SaveAs-action handler to save the current timeline with a different name.
-
measure_distance_between_two_events
()[source]¶ Display an information message box that describes the distance between two selected events in the timeline.
-
open_gregorian_tutorial_timeline
(*args, **kwargs)[source]¶ Help menu action handler to open a sample Gregorian timeline, in read-only mode.
-
open_numeric_tutorial_timeline
(*args, **kwargs)[source]¶ Help menu action handler to open a sample Numeric timeline, in read-only mode.
-
get_visible_categories
()[source]¶ Used by the function export-to-listbox to select events to export.
filtered_listbox_export is a flag that can be set in the settings dialog and decides if the export function shall filter out events having categories that are not shown in the timeline.
- Returns:
list: A list of categories
-
get_start_and_end_for_all_visible_events
()[source]¶ Return start time for the first visible event and the end time for the last visible event.
-