|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.Tasks.Task</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.Tasks.Task</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing a class to store task data. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#Task">Task</a></td> |
|
25 <td>Class implementing the task data structure.</td> |
|
26 </tr> |
|
27 <tr> |
|
28 <td><a href="#TaskPriority">TaskPriority</a></td> |
|
29 <td>Class defining the task priorities.</td> |
|
30 </tr> |
|
31 <tr> |
|
32 <td><a href="#TaskType">TaskType</a></td> |
|
33 <td>Class defining the task types.</td> |
|
34 </tr> |
|
35 </table> |
|
36 <h3>Functions</h3> |
|
37 |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /> |
|
42 <hr /> |
|
43 <a NAME="Task" ID="Task"></a> |
|
44 <h2>Task</h2> |
|
45 |
|
46 <p> |
|
47 Class implementing the task data structure. |
|
48 </p> |
|
49 <h3>Derived from</h3> |
|
50 QTreeWidgetItem |
|
51 <h3>Class Attributes</h3> |
|
52 |
|
53 <table> |
|
54 <tr><td>TaskType2ColorName</td></tr><tr><td>TaskType2IconName</td></tr><tr><td>TaskType2MarkersName</td></tr> |
|
55 </table> |
|
56 <h3>Class Methods</h3> |
|
57 |
|
58 <table> |
|
59 <tr><td>None</td></tr> |
|
60 </table> |
|
61 <h3>Methods</h3> |
|
62 |
|
63 <table> |
|
64 |
|
65 <tr> |
|
66 <td><a href="#Task.__init__">Task</a></td> |
|
67 <td>Constructor</td> |
|
68 </tr> |
|
69 <tr> |
|
70 <td><a href="#Task.colorizeTask">colorizeTask</a></td> |
|
71 <td>Public slot to set the colors of the task item.</td> |
|
72 </tr> |
|
73 <tr> |
|
74 <td><a href="#Task.getFilename">getFilename</a></td> |
|
75 <td>Public method to retrieve the task's filename.</td> |
|
76 </tr> |
|
77 <tr> |
|
78 <td><a href="#Task.getLineno">getLineno</a></td> |
|
79 <td>Public method to retrieve the task's linenumber.</td> |
|
80 </tr> |
|
81 <tr> |
|
82 <td><a href="#Task.getParentUuid">getParentUuid</a></td> |
|
83 <td>Public method to get the parent task's uid.</td> |
|
84 </tr> |
|
85 <tr> |
|
86 <td><a href="#Task.getUuid">getUuid</a></td> |
|
87 <td>Public method to get the task's uid.</td> |
|
88 </tr> |
|
89 <tr> |
|
90 <td><a href="#Task.isCompleted">isCompleted</a></td> |
|
91 <td>Public slot to return the completion status.</td> |
|
92 </tr> |
|
93 <tr> |
|
94 <td><a href="#Task.isFileTask">isFileTask</a></td> |
|
95 <td>Public slot to get an indication, if this task is related to a file.</td> |
|
96 </tr> |
|
97 <tr> |
|
98 <td><a href="#Task.isProjectFileTask">isProjectFileTask</a></td> |
|
99 <td>Public slot to get an indication, if this task is related to a project file.</td> |
|
100 </tr> |
|
101 <tr> |
|
102 <td><a href="#Task.isProjectTask">isProjectTask</a></td> |
|
103 <td>Public slot to return the project relation status.</td> |
|
104 </tr> |
|
105 <tr> |
|
106 <td><a href="#Task.setCompleted">setCompleted</a></td> |
|
107 <td>Public slot to update the completed flag.</td> |
|
108 </tr> |
|
109 <tr> |
|
110 <td><a href="#Task.setDescription">setDescription</a></td> |
|
111 <td>Public slot to update the description field.</td> |
|
112 </tr> |
|
113 <tr> |
|
114 <td><a href="#Task.setPriority">setPriority</a></td> |
|
115 <td>Public slot to update the priority.</td> |
|
116 </tr> |
|
117 <tr> |
|
118 <td><a href="#Task.setProjectTask">setProjectTask</a></td> |
|
119 <td>Public method to set the project relation flag.</td> |
|
120 </tr> |
|
121 <tr> |
|
122 <td><a href="#Task.setSummary">setSummary</a></td> |
|
123 <td>Public slot to update the description.</td> |
|
124 </tr> |
|
125 <tr> |
|
126 <td><a href="#Task.setTaskType">setTaskType</a></td> |
|
127 <td>Public method to update the task type.</td> |
|
128 </tr> |
|
129 <tr> |
|
130 <td><a href="#Task.toDict">toDict</a></td> |
|
131 <td>Public method to convert the task data to a dictionary.</td> |
|
132 </tr> |
|
133 </table> |
|
134 <h3>Static Methods</h3> |
|
135 |
|
136 <table> |
|
137 <tr><td>None</td></tr> |
|
138 </table> |
|
139 |
|
140 <a NAME="Task.__init__" ID="Task.__init__"></a> |
|
141 <h4>Task (Constructor)</h4> |
|
142 <b>Task</b>(<i>summary, priority=TaskPriority.NORMAL, filename="", lineno=0, completed=False, _time=0, isProjectTask=False, taskType=TaskType.TODO, project=None, description="", uid="", parentUid=""</i>) |
|
143 |
|
144 <p> |
|
145 Constructor |
|
146 </p> |
|
147 <dl> |
|
148 |
|
149 <dt><i>summary</i> (str)</dt> |
|
150 <dd> |
|
151 summary text of the task |
|
152 </dd> |
|
153 <dt><i>priority</i> (TaskPriority)</dt> |
|
154 <dd> |
|
155 priority of the task |
|
156 </dd> |
|
157 <dt><i>filename</i> (str)</dt> |
|
158 <dd> |
|
159 filename containing the task |
|
160 </dd> |
|
161 <dt><i>lineno</i> (int)</dt> |
|
162 <dd> |
|
163 line number containing the task |
|
164 </dd> |
|
165 <dt><i>completed</i> (bool)</dt> |
|
166 <dd> |
|
167 flag indicating completion status |
|
168 </dd> |
|
169 <dt><i>_time</i> (float)</dt> |
|
170 <dd> |
|
171 creation time of the task (if 0 use current time) |
|
172 </dd> |
|
173 <dt><i>isProjectTask</i> (bool)</dt> |
|
174 <dd> |
|
175 flag indicating a task related to the current |
|
176 project |
|
177 </dd> |
|
178 <dt><i>taskType</i> (TaskType)</dt> |
|
179 <dd> |
|
180 type of the task |
|
181 </dd> |
|
182 <dt><i>project</i> (Project)</dt> |
|
183 <dd> |
|
184 reference to the project object |
|
185 </dd> |
|
186 <dt><i>description</i> (str)</dt> |
|
187 <dd> |
|
188 explanatory text of the task |
|
189 </dd> |
|
190 <dt><i>uid</i> (str)</dt> |
|
191 <dd> |
|
192 unique id of the task |
|
193 </dd> |
|
194 <dt><i>parentUid</i> (str)</dt> |
|
195 <dd> |
|
196 unique id of the parent task |
|
197 </dd> |
|
198 </dl> |
|
199 <a NAME="Task.colorizeTask" ID="Task.colorizeTask"></a> |
|
200 <h4>Task.colorizeTask</h4> |
|
201 <b>colorizeTask</b>(<i></i>) |
|
202 |
|
203 <p> |
|
204 Public slot to set the colors of the task item. |
|
205 </p> |
|
206 <a NAME="Task.getFilename" ID="Task.getFilename"></a> |
|
207 <h4>Task.getFilename</h4> |
|
208 <b>getFilename</b>(<i></i>) |
|
209 |
|
210 <p> |
|
211 Public method to retrieve the task's filename. |
|
212 </p> |
|
213 <dl> |
|
214 <dt>Return:</dt> |
|
215 <dd> |
|
216 filename (string) |
|
217 </dd> |
|
218 </dl> |
|
219 <a NAME="Task.getLineno" ID="Task.getLineno"></a> |
|
220 <h4>Task.getLineno</h4> |
|
221 <b>getLineno</b>(<i></i>) |
|
222 |
|
223 <p> |
|
224 Public method to retrieve the task's linenumber. |
|
225 </p> |
|
226 <dl> |
|
227 <dt>Return:</dt> |
|
228 <dd> |
|
229 linenumber (integer) |
|
230 </dd> |
|
231 </dl> |
|
232 <a NAME="Task.getParentUuid" ID="Task.getParentUuid"></a> |
|
233 <h4>Task.getParentUuid</h4> |
|
234 <b>getParentUuid</b>(<i></i>) |
|
235 |
|
236 <p> |
|
237 Public method to get the parent task's uid. |
|
238 </p> |
|
239 <dl> |
|
240 <dt>Return:</dt> |
|
241 <dd> |
|
242 parent uid (string) |
|
243 </dd> |
|
244 </dl> |
|
245 <a NAME="Task.getUuid" ID="Task.getUuid"></a> |
|
246 <h4>Task.getUuid</h4> |
|
247 <b>getUuid</b>(<i></i>) |
|
248 |
|
249 <p> |
|
250 Public method to get the task's uid. |
|
251 </p> |
|
252 <dl> |
|
253 <dt>Return:</dt> |
|
254 <dd> |
|
255 uid (string) |
|
256 </dd> |
|
257 </dl> |
|
258 <a NAME="Task.isCompleted" ID="Task.isCompleted"></a> |
|
259 <h4>Task.isCompleted</h4> |
|
260 <b>isCompleted</b>(<i></i>) |
|
261 |
|
262 <p> |
|
263 Public slot to return the completion status. |
|
264 </p> |
|
265 <dl> |
|
266 <dt>Return:</dt> |
|
267 <dd> |
|
268 flag indicating the completion status (boolean) |
|
269 </dd> |
|
270 </dl> |
|
271 <a NAME="Task.isFileTask" ID="Task.isFileTask"></a> |
|
272 <h4>Task.isFileTask</h4> |
|
273 <b>isFileTask</b>(<i></i>) |
|
274 |
|
275 <p> |
|
276 Public slot to get an indication, if this task is related to a file. |
|
277 </p> |
|
278 <dl> |
|
279 <dt>Return:</dt> |
|
280 <dd> |
|
281 flag indicating a file task (boolean) |
|
282 </dd> |
|
283 </dl> |
|
284 <a NAME="Task.isProjectFileTask" ID="Task.isProjectFileTask"></a> |
|
285 <h4>Task.isProjectFileTask</h4> |
|
286 <b>isProjectFileTask</b>(<i></i>) |
|
287 |
|
288 <p> |
|
289 Public slot to get an indication, if this task is related to a |
|
290 project file. |
|
291 </p> |
|
292 <dl> |
|
293 <dt>Return:</dt> |
|
294 <dd> |
|
295 flag indicating a project file task (boolean) |
|
296 </dd> |
|
297 </dl> |
|
298 <a NAME="Task.isProjectTask" ID="Task.isProjectTask"></a> |
|
299 <h4>Task.isProjectTask</h4> |
|
300 <b>isProjectTask</b>(<i></i>) |
|
301 |
|
302 <p> |
|
303 Public slot to return the project relation status. |
|
304 </p> |
|
305 <dl> |
|
306 <dt>Return:</dt> |
|
307 <dd> |
|
308 flag indicating the project relation status (boolean) |
|
309 </dd> |
|
310 </dl> |
|
311 <a NAME="Task.setCompleted" ID="Task.setCompleted"></a> |
|
312 <h4>Task.setCompleted</h4> |
|
313 <b>setCompleted</b>(<i>completed</i>) |
|
314 |
|
315 <p> |
|
316 Public slot to update the completed flag. |
|
317 </p> |
|
318 <dl> |
|
319 |
|
320 <dt><i>completed</i></dt> |
|
321 <dd> |
|
322 flag indicating completion status (boolean) |
|
323 </dd> |
|
324 </dl> |
|
325 <a NAME="Task.setDescription" ID="Task.setDescription"></a> |
|
326 <h4>Task.setDescription</h4> |
|
327 <b>setDescription</b>(<i>description</i>) |
|
328 |
|
329 <p> |
|
330 Public slot to update the description field. |
|
331 </p> |
|
332 <dl> |
|
333 |
|
334 <dt><i>description</i> (str)</dt> |
|
335 <dd> |
|
336 descriptive text of the task |
|
337 </dd> |
|
338 </dl> |
|
339 <a NAME="Task.setPriority" ID="Task.setPriority"></a> |
|
340 <h4>Task.setPriority</h4> |
|
341 <b>setPriority</b>(<i>priority</i>) |
|
342 |
|
343 <p> |
|
344 Public slot to update the priority. |
|
345 </p> |
|
346 <dl> |
|
347 |
|
348 <dt><i>priority</i> (TaskPriority)</dt> |
|
349 <dd> |
|
350 priority of the task |
|
351 </dd> |
|
352 </dl> |
|
353 <a NAME="Task.setProjectTask" ID="Task.setProjectTask"></a> |
|
354 <h4>Task.setProjectTask</h4> |
|
355 <b>setProjectTask</b>(<i>pt</i>) |
|
356 |
|
357 <p> |
|
358 Public method to set the project relation flag. |
|
359 </p> |
|
360 <dl> |
|
361 |
|
362 <dt><i>pt</i></dt> |
|
363 <dd> |
|
364 flag indicating a project task (boolean) |
|
365 </dd> |
|
366 </dl> |
|
367 <a NAME="Task.setSummary" ID="Task.setSummary"></a> |
|
368 <h4>Task.setSummary</h4> |
|
369 <b>setSummary</b>(<i>summary</i>) |
|
370 |
|
371 <p> |
|
372 Public slot to update the description. |
|
373 </p> |
|
374 <dl> |
|
375 |
|
376 <dt><i>summary</i></dt> |
|
377 <dd> |
|
378 summary text of the task (string) |
|
379 </dd> |
|
380 </dl> |
|
381 <a NAME="Task.setTaskType" ID="Task.setTaskType"></a> |
|
382 <h4>Task.setTaskType</h4> |
|
383 <b>setTaskType</b>(<i>taskType</i>) |
|
384 |
|
385 <p> |
|
386 Public method to update the task type. |
|
387 </p> |
|
388 <dl> |
|
389 |
|
390 <dt><i>taskType</i> (TaskType)</dt> |
|
391 <dd> |
|
392 type of the task |
|
393 </dd> |
|
394 </dl> |
|
395 <a NAME="Task.toDict" ID="Task.toDict"></a> |
|
396 <h4>Task.toDict</h4> |
|
397 <b>toDict</b>(<i></i>) |
|
398 |
|
399 <p> |
|
400 Public method to convert the task data to a dictionary. |
|
401 </p> |
|
402 <dl> |
|
403 <dt>Return:</dt> |
|
404 <dd> |
|
405 dictionary containing the task data |
|
406 </dd> |
|
407 </dl> |
|
408 <dl> |
|
409 <dt>Return Type:</dt> |
|
410 <dd> |
|
411 dict |
|
412 </dd> |
|
413 </dl> |
|
414 <div align="right"><a href="#top">Up</a></div> |
|
415 <hr /> |
|
416 <hr /> |
|
417 <a NAME="TaskPriority" ID="TaskPriority"></a> |
|
418 <h2>TaskPriority</h2> |
|
419 |
|
420 <p> |
|
421 Class defining the task priorities. |
|
422 </p> |
|
423 <h3>Derived from</h3> |
|
424 enum.IntEnum |
|
425 <h3>Class Attributes</h3> |
|
426 |
|
427 <table> |
|
428 <tr><td>HIGH</td></tr><tr><td>LOW</td></tr><tr><td>NORMAL</td></tr> |
|
429 </table> |
|
430 <h3>Class Methods</h3> |
|
431 |
|
432 <table> |
|
433 <tr><td>None</td></tr> |
|
434 </table> |
|
435 <h3>Methods</h3> |
|
436 |
|
437 <table> |
|
438 <tr><td>None</td></tr> |
|
439 </table> |
|
440 <h3>Static Methods</h3> |
|
441 |
|
442 <table> |
|
443 <tr><td>None</td></tr> |
|
444 </table> |
|
445 |
|
446 <div align="right"><a href="#top">Up</a></div> |
|
447 <hr /> |
|
448 <hr /> |
|
449 <a NAME="TaskType" ID="TaskType"></a> |
|
450 <h2>TaskType</h2> |
|
451 |
|
452 <p> |
|
453 Class defining the task types. |
|
454 </p> |
|
455 <h3>Derived from</h3> |
|
456 enum.IntEnum |
|
457 <h3>Class Attributes</h3> |
|
458 |
|
459 <table> |
|
460 <tr><td>DOCU</td></tr><tr><td>FIXME</td></tr><tr><td>NONE</td></tr><tr><td>NOTE</td></tr><tr><td>TEST</td></tr><tr><td>TODO</td></tr><tr><td>WARNING</td></tr> |
|
461 </table> |
|
462 <h3>Class Methods</h3> |
|
463 |
|
464 <table> |
|
465 <tr><td>None</td></tr> |
|
466 </table> |
|
467 <h3>Methods</h3> |
|
468 |
|
469 <table> |
|
470 <tr><td>None</td></tr> |
|
471 </table> |
|
472 <h3>Static Methods</h3> |
|
473 |
|
474 <table> |
|
475 <tr><td>None</td></tr> |
|
476 </table> |
|
477 |
|
478 <div align="right"><a href="#top">Up</a></div> |
|
479 <hr /> |
|
480 </body></html> |