1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 from timelinelib.calendar.gregorian.gregorian import GregorianDateTime
20 from timelinelib.calendar.gregorian.time import GregorianDelta
21 from timelinelib.calendar.num.time import NumDelta
22 from timelinelib.canvas.data.db import MemoryDB
23 from timelinelib.canvas.data import TimePeriod
24
25
27
34
35 - def add_category(self, name, color, font_color, make_last_added_parent=False):
47
53
54 - def add_era(self, start_add, end_add, name):
58
59 - def add_event(self, text, description, start_add, end_add=None, hyperlink=None):
68
69 - def add_container(self, text, description, start_add, end_add=None):
73
74 - def add_subevent(self, container, text, description, start_add, end_add=None, hyperlink=None):
85
89
96
97
119
120
134
135
138
139
142
143
145 tutcreator.add_milestone(
146 1,
147 _("Start"),
148 "<",
149 )
150 tutcreator.add_milestone(
151 29,
152 _("End"),
153 ">",
154 )
155 tutcreator.add_era(
156 20, 28,
157 _("Example era"),
158 )
159 tutcreator.add_category(
160 _("Welcome"), (255, 80, 80), (0, 0, 0)
161 )
162 tutcreator.add_event(
163 _("Welcome to Timeline"), "", 4
164 )
165 tutcreator.add_category(
166 _("Intro"), (250, 250, 20), (0, 0, 0)
167 )
168 tutcreator.add_event(
169 _("This event has hyperlinks"),
170 _("Right-click for context menu where the hyperlinks can be accessed."),
171 11,
172 19,
173 "https://sourceforge.net/projects/thetimelineproj/;http://thetimelineproj.sourceforge.net/"
174 )
175 tutcreator.add_event(
176 _("Hover me!"),
177 _("Hovering events with a triangle shows the event description."),
178 5
179 )
180 tutcreator.add_category(
181 _("Features"), (100, 100, 250), (250, 250, 20)
182 )
183 tutcreator.add_event(
184 _("Scroll"),
185 _("Left click somewhere on the timeline and start dragging."
186 "\n\n"
187 "You can also use the mouse wheel."
188 "\n\n"
189 "You can also middle click with the mouse to center around that point."),
190 5,
191 10
192 )
193 container = tutcreator.add_container(
194 _("Container"),
195 _("?"),
196 5,
197 10
198 )
199 tutcreator.add_subevent(
200 container,
201 _("Resize me"),
202 _("Container Subevent 1\nClick on the event to get the resize handles"),
203 5,
204 10
205 )
206 tutcreator.add_subevent(
207 container,
208 _("Drag me"),
209 _("Container Subevent 2\n\n"
210 "Click on the event to get the drag handle and drag it.\n\n"
211 "To drag the whole container, click on it while holding down the Alt key. "
212 "Keep the Alt key down and find the drag point at the center of the container and drag it."),
213 12,
214 18
215 )
216 tutcreator.add_subevent(
217 container,
218 _("View Container demo video"),
219 _("Container Subevent 3\n\n"
220 "Select hyperlink to show demo video.\n\n"
221 "Right-click in the event and select 'Goto URL' in the popup menu and select the first (and only) link"),
222 19,
223 24,
224 "http://www.youtube.com/watch?v=dBwEQ3vqB_I"
225 )
226 tutcreator.add_event(
227 _("Zoom"),
228 _("Hold down Ctrl while scrolling the mouse wheel."
229 "\n\n"
230 "Hold down Shift while dragging with the mouse."),
231 6,
232 11
233 )
234 tutcreator.add_event(
235 _("Create event"),
236 _("Double click somewhere on the timeline."
237 "\n\n"
238 "Hold down Ctrl while dragging the mouse to select a period."),
239 12,
240 18
241 )
242 tutcreator.add_event(
243 _("Edit event"),
244 _("Double click on an event."),
245 12,
246 18
247 )
248 tutcreator.add_event(
249 _("Select event"),
250 _("Click on it."
251 "\n\n"
252 "Hold down Ctrl while clicking events to select multiple."),
253 20,
254 25
255 )
256 tutcreator.add_event(
257 _("Delete event"),
258 _("Select events to be deleted and press the Del key."),
259 19,
260 24
261 )
262 tutcreator.add_event(
263 _("Resize and move me!"),
264 _("First select me and then drag the handles."),
265 11,
266 19
267 )
268 tutcreator.add_category(
269 _("Saving"), (50, 200, 50), (0, 0, 0)
270 )
271 tutcreator.add_event(
272 _("Saving"),
273 _("This timeline is stored in memory and modifications to it will not "
274 "be persisted between sessions."
275 "\n\n"
276 "Choose File/New/File Timeline to create a timeline that is saved on "
277 "disk."),
278 23
279 )
280 return tutcreator.get_db()
281