module timelinelib.canvas.data.event

timelinelib.canvas.data.event.DEFAULT_COLOR = (200, 200, 200)
timelinelib.canvas.data.event.EXPORTABLE_FIELDS = ('Text', 'Description', 'Labels', 'Start', 'End', 'Category', 'Fuzzy Start', 'Fuzzy End', 'Locked', 'Ends Today', 'Hyperlink', 'Progress', 'Progress Color', 'Done Color', 'Alert', 'Is Container', 'Is Subevent')
class timelinelib.canvas.data.event.Event[source]

Bases: timelinelib.canvas.data.base.ItemBase, timelinelib.canvas.data.item.TimelineItem

An Event is the basic data type for representing information on the timeline. It must specify where on the timeline it should be placed (when that event happened). This can be either a specific point in time or a period.

Derived classes:
__init__(db=None, id_=None, immutable_value=ImmutableEvent({ 'text': None, 'time_period': None, 'category_id': None, 'category_ids': ImmutableDict({ }), 'fuzzy': False, 'fuzzy_start': False, 'fuzzy_end': False, 'locked': False, 'ends_today': False, 'description': None, 'labels': None, 'icon': None, 'hyperlink': None, 'alert': None, 'progress': None, 'default_color': None, 'container_id': None, 'sort_order': None, }))[source]

Initialize self. See help(type(self)) for accurate signature.

property horizontal_mouse_position_factor

This factor describes the relation between the lengt of an event and the length from the start of the event up to the cursor position in the event. For point events this factor is None. The factor is used for calculation of the status-bar label that describes the time duration up to the cursor position.

duplicate(target_db=None)[source]
save()[source]
reload()[source]
delete()[source]
__eq__(other)[source]

Return self==value.

__ne__(other)[source]

Return self!=value.

__lt__(other)[source]

Return self<value.

__gt__(other)[source]

Return self>value.

__le__(other)[source]

Return self<=value.

__ge__(other)[source]

Return self>=value.

__repr__()[source]

Return repr(self).

set_end_time(time)[source]
get_text()[source]
set_text(text)[source]
property text
get_category()[source]
get_category_name()[source]
set_category(category)[source]
property category
get_categories()[source]
set_categories(categories)[source]
get_container()[source]
set_container(container)[source]
property container
get_fuzzy()[source]
set_fuzzy(fuzzy)[source]
property fuzzy
get_fuzzy_start()[source]
set_fuzzy_start(fuzzy_start)[source]
property fuzzy_start
get_fuzzy_end()[source]
set_fuzzy_end(fuzzy_end)[source]
property fuzzy_end
get_locked()[source]
set_locked(locked)[source]
property locked
get_ends_today()[source]
set_ends_today(ends_today)[source]
property ends_today
get_description()[source]
set_description(description)[source]
property description
get_labels()[source]
set_labels(value)[source]
property labels
get_icon()[source]
set_icon(icon)[source]
property icon
has_edge_icons()[source]
get_alert()[source]
set_alert(alert)[source]
property alert
get_progress()[source]
set_progress(progress)[source]
property progress
get_sort_order()[source]
set_sort_order(sort_order)[source]
property sort_order
get_default_color()[source]
set_default_color(color)[source]
property default_color
get_color()[source]
get_border_color()[source]
get_done_color()[source]
get_progress_color()[source]
update(start_time, end_time, text, category=None, fuzzy=None, locked=None, ends_today=None, fuzzy_start=None, fuzzy_end=None)[source]

Change the event data.

get_data(event_id, default=None)[source]

Return data with the given id or None if no data with that id exists.

See set_data for information how ids map to data.

set_data(event_id, data)[source]

Set data with the given id.

Here is how ids map to data:

description - string icon - wx.Bitmap

get_whole_data()[source]
set_whole_data(data)[source]
property data
has_data()[source]

Return True if the event has associated data, or False if not.

has_balloon_data()[source]

Return True if the event has associated data to be displayed in a balloon.

get_label(time_type)[source]

Returns a unicode label describing the event.

is_container()[source]
is_subevent()[source]
is_milestone()[source]
get_exportable_fields()[source]
set_milestone(value)[source]
get_milestone()[source]
timelinelib.canvas.data.event.DATA_FIELDS = ['description', 'labels', 'icon', 'hyperlink', 'alert', 'progress', 'default_color']