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.
-
__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.
-
property
text
¶
-
property
category
¶
-
property
container
¶
-
property
fuzzy
¶
-
property
fuzzy_start
¶
-
property
fuzzy_end
¶
-
property
locked
¶
-
property
ends_today
¶
-
property
description
¶
-
property
labels
¶
-
property
icon
¶
-
property
hyperlink
¶
-
property
alert
¶
-
property
progress
¶
-
property
sort_order
¶
-
property
default_color
¶
-
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
-
property
data
¶
-
-
timelinelib.canvas.data.event.
DATA_FIELDS
= ['description', 'labels', 'icon', 'hyperlink', 'alert', 'progress', 'default_color']¶