Re-implement events
The current code is awkward, because it has been conceived around the idea of a “group” of annotations, which was meant to be an entity of code with special features, like having a list of annotations associated to it. This concept has evolved to become an “event”. Each event must have a unique label, which appears as the label of the annotation rectangle on the timeline. Each event in a given timeline should have a specific color, in order to improve the visualization experience, but this is not mandatory.
In the current implementation, each timeline contains a list of events, stored as a field of the Timeline
class. It will be more logical to store the events as a dictionary, where the label is the dictionary key. The dictionary can be abstracted by the creation of a new class named, for instance, EventCollection
. Each element of this dictionary would also be a dictionary, with fields color
and description
. This later would help users to know what an event is intended to code (for instance, the event with label 1
would have a description like “look on the left side”).
N.B.: a change like that will imply a bump in the FORMAT version.
Finally, the code in the classes EventDialog
, ChooseEvent
and ChangeEvent
must be unified.
Notice that, in the case where this issue is addressed, then issue #100 (closed) may become obsolete.