|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Tasks.TaskViewer</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.Tasks.TaskViewer</h1> |
|
23 <p> |
|
24 Module implementing a task viewer and associated classes. |
|
25 </p><p> |
|
26 Tasks can be defined manually or automatically. Automatically |
|
27 generated tasks are derived from a comment with a special |
|
28 introductory text. This text is configurable. |
|
29 </p> |
|
30 <h3>Global Attributes</h3> |
|
31 <table> |
|
32 <tr><td>None</td></tr> |
|
33 </table> |
|
34 <h3>Classes</h3> |
|
35 <table> |
|
36 <tr> |
|
37 <td><a href="#TaskViewer">TaskViewer</a></td> |
|
38 <td>Class implementing the task viewer.</td> |
|
39 </tr> |
|
40 </table> |
|
41 <h3>Functions</h3> |
|
42 <table> |
|
43 <tr><td>None</td></tr> |
|
44 </table> |
|
45 <hr /><hr /> |
|
46 <a NAME="TaskViewer" ID="TaskViewer"></a> |
|
47 <h2>TaskViewer</h2> |
|
48 <p> |
|
49 Class implementing the task viewer. |
|
50 </p><h3>Signals</h3> |
|
51 <dl> |
|
52 <dt>displayFile(str, int)</dt> |
|
53 <dd> |
|
54 emitted to go to a file task |
|
55 </dd> |
|
56 </dl> |
|
57 <h3>Derived from</h3> |
|
58 QTreeWidget |
|
59 <h3>Class Attributes</h3> |
|
60 <table> |
|
61 <tr><td>None</td></tr> |
|
62 </table> |
|
63 <h3>Class Methods</h3> |
|
64 <table> |
|
65 <tr><td>None</td></tr> |
|
66 </table> |
|
67 <h3>Methods</h3> |
|
68 <table> |
|
69 <tr> |
|
70 <td><a href="#TaskViewer.__init__">TaskViewer</a></td> |
|
71 <td>Constructor</td> |
|
72 </tr><tr> |
|
73 <td><a href="#TaskViewer.__activateFilter">__activateFilter</a></td> |
|
74 <td>Private slot to handle the "Filtered display" context menu entry.</td> |
|
75 </tr><tr> |
|
76 <td><a href="#TaskViewer.__configure">__configure</a></td> |
|
77 <td>Private method to open the configuration dialog.</td> |
|
78 </tr><tr> |
|
79 <td><a href="#TaskViewer.__configureFilter">__configureFilter</a></td> |
|
80 <td>Private slot to handle the "Configure filter" context menu entry.</td> |
|
81 </tr><tr> |
|
82 <td><a href="#TaskViewer.__configureProjectTasksScanOptions">__configureProjectTasksScanOptions</a></td> |
|
83 <td>Private slot to configure scan options for project tasks.</td> |
|
84 </tr><tr> |
|
85 <td><a href="#TaskViewer.__copyTask">__copyTask</a></td> |
|
86 <td>Private slot to handle the "Copy" context menu entry.</td> |
|
87 </tr><tr> |
|
88 <td><a href="#TaskViewer.__deleteCompleted">__deleteCompleted</a></td> |
|
89 <td>Private slot to handle the "Delete Completed Tasks" context menu entry.</td> |
|
90 </tr><tr> |
|
91 <td><a href="#TaskViewer.__deleteTask">__deleteTask</a></td> |
|
92 <td>Private slot to handle the "Delete Task" context menu entry.</td> |
|
93 </tr><tr> |
|
94 <td><a href="#TaskViewer.__editTaskProperties">__editTaskProperties</a></td> |
|
95 <td>Private slot to handle the "Properties" context menu entry.</td> |
|
96 </tr><tr> |
|
97 <td><a href="#TaskViewer.__goToTask">__goToTask</a></td> |
|
98 <td>Private slot to handle the "Go To" context menu entry.</td> |
|
99 </tr><tr> |
|
100 <td><a href="#TaskViewer.__markCompleted">__markCompleted</a></td> |
|
101 <td>Private slot to handle the "Mark Completed" context menu entry.</td> |
|
102 </tr><tr> |
|
103 <td><a href="#TaskViewer.__newTask">__newTask</a></td> |
|
104 <td>Private slot to handle the "New Task" context menu entry.</td> |
|
105 </tr><tr> |
|
106 <td><a href="#TaskViewer.__pasteTask">__pasteTask</a></td> |
|
107 <td>Private slot to handle the "Paste" context menu entry.</td> |
|
108 </tr><tr> |
|
109 <td><a href="#TaskViewer.__refreshDisplay">__refreshDisplay</a></td> |
|
110 <td>Private method to refresh the display.</td> |
|
111 </tr><tr> |
|
112 <td><a href="#TaskViewer.__regenerateProjectTasks">__regenerateProjectTasks</a></td> |
|
113 <td>Private slot to handle the "Regenerated project tasks" context menu entry.</td> |
|
114 </tr><tr> |
|
115 <td><a href="#TaskViewer.__resizeColumns">__resizeColumns</a></td> |
|
116 <td>Private method to resize the list columns.</td> |
|
117 </tr><tr> |
|
118 <td><a href="#TaskViewer.__resort">__resort</a></td> |
|
119 <td>Private method to resort the tree.</td> |
|
120 </tr><tr> |
|
121 <td><a href="#TaskViewer.__showContextMenu">__showContextMenu</a></td> |
|
122 <td>Private slot to show the context menu of the list.</td> |
|
123 </tr><tr> |
|
124 <td><a href="#TaskViewer.__taskItemActivated">__taskItemActivated</a></td> |
|
125 <td>Private slot to handle the activation of an item.</td> |
|
126 </tr><tr> |
|
127 <td><a href="#TaskViewer.addFileTask">addFileTask</a></td> |
|
128 <td>Public slot to add a file related task.</td> |
|
129 </tr><tr> |
|
130 <td><a href="#TaskViewer.addTask">addTask</a></td> |
|
131 <td>Public slot to add a task.</td> |
|
132 </tr><tr> |
|
133 <td><a href="#TaskViewer.clearFileTasks">clearFileTasks</a></td> |
|
134 <td>Public slot to clear all tasks related to a file.</td> |
|
135 </tr><tr> |
|
136 <td><a href="#TaskViewer.clearProjectTasks">clearProjectTasks</a></td> |
|
137 <td>Public slot to clear project related tasks.</td> |
|
138 </tr><tr> |
|
139 <td><a href="#TaskViewer.clearTasks">clearTasks</a></td> |
|
140 <td>Public slot to clear all tasks from display.</td> |
|
141 </tr><tr> |
|
142 <td><a href="#TaskViewer.getGlobalTasks">getGlobalTasks</a></td> |
|
143 <td>Public method to retrieve all non project related tasks.</td> |
|
144 </tr><tr> |
|
145 <td><a href="#TaskViewer.getProjectTasks">getProjectTasks</a></td> |
|
146 <td>Public method to retrieve all project related tasks.</td> |
|
147 </tr><tr> |
|
148 <td><a href="#TaskViewer.handlePreferencesChanged">handlePreferencesChanged</a></td> |
|
149 <td>Public slot to react to changes of the preferences.</td> |
|
150 </tr><tr> |
|
151 <td><a href="#TaskViewer.saveProjectTasks">saveProjectTasks</a></td> |
|
152 <td>Public method to write the project tasks.</td> |
|
153 </tr><tr> |
|
154 <td><a href="#TaskViewer.setProjectOpen">setProjectOpen</a></td> |
|
155 <td>Public slot to set the project status.</td> |
|
156 </tr> |
|
157 </table> |
|
158 <h3>Static Methods</h3> |
|
159 <table> |
|
160 <tr><td>None</td></tr> |
|
161 </table> |
|
162 <a NAME="TaskViewer.__init__" ID="TaskViewer.__init__"></a> |
|
163 <h4>TaskViewer (Constructor)</h4> |
|
164 <b>TaskViewer</b>(<i>parent, project</i>) |
|
165 <p> |
|
166 Constructor |
|
167 </p><dl> |
|
168 <dt><i>parent</i></dt> |
|
169 <dd> |
|
170 the parent (QWidget) |
|
171 </dd><dt><i>project</i></dt> |
|
172 <dd> |
|
173 reference to the project object |
|
174 </dd> |
|
175 </dl><a NAME="TaskViewer.__activateFilter" ID="TaskViewer.__activateFilter"></a> |
|
176 <h4>TaskViewer.__activateFilter</h4> |
|
177 <b>__activateFilter</b>(<i>on</i>) |
|
178 <p> |
|
179 Private slot to handle the "Filtered display" context menu entry. |
|
180 </p><dl> |
|
181 <dt><i>on</i></dt> |
|
182 <dd> |
|
183 flag indicating the filter state (boolean) |
|
184 </dd> |
|
185 </dl><a NAME="TaskViewer.__configure" ID="TaskViewer.__configure"></a> |
|
186 <h4>TaskViewer.__configure</h4> |
|
187 <b>__configure</b>(<i></i>) |
|
188 <p> |
|
189 Private method to open the configuration dialog. |
|
190 </p><a NAME="TaskViewer.__configureFilter" ID="TaskViewer.__configureFilter"></a> |
|
191 <h4>TaskViewer.__configureFilter</h4> |
|
192 <b>__configureFilter</b>(<i></i>) |
|
193 <p> |
|
194 Private slot to handle the "Configure filter" context menu entry. |
|
195 </p><a NAME="TaskViewer.__configureProjectTasksScanOptions" ID="TaskViewer.__configureProjectTasksScanOptions"></a> |
|
196 <h4>TaskViewer.__configureProjectTasksScanOptions</h4> |
|
197 <b>__configureProjectTasksScanOptions</b>(<i></i>) |
|
198 <p> |
|
199 Private slot to configure scan options for project tasks. |
|
200 </p><a NAME="TaskViewer.__copyTask" ID="TaskViewer.__copyTask"></a> |
|
201 <h4>TaskViewer.__copyTask</h4> |
|
202 <b>__copyTask</b>(<i></i>) |
|
203 <p> |
|
204 Private slot to handle the "Copy" context menu entry. |
|
205 </p><a NAME="TaskViewer.__deleteCompleted" ID="TaskViewer.__deleteCompleted"></a> |
|
206 <h4>TaskViewer.__deleteCompleted</h4> |
|
207 <b>__deleteCompleted</b>(<i></i>) |
|
208 <p> |
|
209 Private slot to handle the "Delete Completed Tasks" context menu entry. |
|
210 </p><a NAME="TaskViewer.__deleteTask" ID="TaskViewer.__deleteTask"></a> |
|
211 <h4>TaskViewer.__deleteTask</h4> |
|
212 <b>__deleteTask</b>(<i></i>) |
|
213 <p> |
|
214 Private slot to handle the "Delete Task" context menu entry. |
|
215 </p><a NAME="TaskViewer.__editTaskProperties" ID="TaskViewer.__editTaskProperties"></a> |
|
216 <h4>TaskViewer.__editTaskProperties</h4> |
|
217 <b>__editTaskProperties</b>(<i></i>) |
|
218 <p> |
|
219 Private slot to handle the "Properties" context menu entry. |
|
220 </p><a NAME="TaskViewer.__goToTask" ID="TaskViewer.__goToTask"></a> |
|
221 <h4>TaskViewer.__goToTask</h4> |
|
222 <b>__goToTask</b>(<i></i>) |
|
223 <p> |
|
224 Private slot to handle the "Go To" context menu entry. |
|
225 </p><a NAME="TaskViewer.__markCompleted" ID="TaskViewer.__markCompleted"></a> |
|
226 <h4>TaskViewer.__markCompleted</h4> |
|
227 <b>__markCompleted</b>(<i></i>) |
|
228 <p> |
|
229 Private slot to handle the "Mark Completed" context menu entry. |
|
230 </p><a NAME="TaskViewer.__newTask" ID="TaskViewer.__newTask"></a> |
|
231 <h4>TaskViewer.__newTask</h4> |
|
232 <b>__newTask</b>(<i></i>) |
|
233 <p> |
|
234 Private slot to handle the "New Task" context menu entry. |
|
235 </p><a NAME="TaskViewer.__pasteTask" ID="TaskViewer.__pasteTask"></a> |
|
236 <h4>TaskViewer.__pasteTask</h4> |
|
237 <b>__pasteTask</b>(<i></i>) |
|
238 <p> |
|
239 Private slot to handle the "Paste" context menu entry. |
|
240 </p><a NAME="TaskViewer.__refreshDisplay" ID="TaskViewer.__refreshDisplay"></a> |
|
241 <h4>TaskViewer.__refreshDisplay</h4> |
|
242 <b>__refreshDisplay</b>(<i></i>) |
|
243 <p> |
|
244 Private method to refresh the display. |
|
245 </p><a NAME="TaskViewer.__regenerateProjectTasks" ID="TaskViewer.__regenerateProjectTasks"></a> |
|
246 <h4>TaskViewer.__regenerateProjectTasks</h4> |
|
247 <b>__regenerateProjectTasks</b>(<i></i>) |
|
248 <p> |
|
249 Private slot to handle the "Regenerated project tasks" context menu |
|
250 entry. |
|
251 </p><a NAME="TaskViewer.__resizeColumns" ID="TaskViewer.__resizeColumns"></a> |
|
252 <h4>TaskViewer.__resizeColumns</h4> |
|
253 <b>__resizeColumns</b>(<i></i>) |
|
254 <p> |
|
255 Private method to resize the list columns. |
|
256 </p><a NAME="TaskViewer.__resort" ID="TaskViewer.__resort"></a> |
|
257 <h4>TaskViewer.__resort</h4> |
|
258 <b>__resort</b>(<i></i>) |
|
259 <p> |
|
260 Private method to resort the tree. |
|
261 </p><a NAME="TaskViewer.__showContextMenu" ID="TaskViewer.__showContextMenu"></a> |
|
262 <h4>TaskViewer.__showContextMenu</h4> |
|
263 <b>__showContextMenu</b>(<i>coord</i>) |
|
264 <p> |
|
265 Private slot to show the context menu of the list. |
|
266 </p><dl> |
|
267 <dt><i>coord</i></dt> |
|
268 <dd> |
|
269 the position of the mouse pointer (QPoint) |
|
270 </dd> |
|
271 </dl><a NAME="TaskViewer.__taskItemActivated" ID="TaskViewer.__taskItemActivated"></a> |
|
272 <h4>TaskViewer.__taskItemActivated</h4> |
|
273 <b>__taskItemActivated</b>(<i>itm, col</i>) |
|
274 <p> |
|
275 Private slot to handle the activation of an item. |
|
276 </p><dl> |
|
277 <dt><i>itm</i></dt> |
|
278 <dd> |
|
279 reference to the activated item (QTreeWidgetItem) |
|
280 </dd><dt><i>col</i></dt> |
|
281 <dd> |
|
282 column the item was activated in (integer) |
|
283 </dd> |
|
284 </dl><a NAME="TaskViewer.addFileTask" ID="TaskViewer.addFileTask"></a> |
|
285 <h4>TaskViewer.addFileTask</h4> |
|
286 <b>addFileTask</b>(<i>summary, filename, lineno, taskType=Task.TypeTodo, description=""</i>) |
|
287 <p> |
|
288 Public slot to add a file related task. |
|
289 </p><dl> |
|
290 <dt><i>summary</i></dt> |
|
291 <dd> |
|
292 summary text of the task (string) |
|
293 </dd><dt><i>filename</i></dt> |
|
294 <dd> |
|
295 filename containing the task (string) |
|
296 </dd><dt><i>lineno</i></dt> |
|
297 <dd> |
|
298 line number containing the task (integer) |
|
299 </dd><dt><i>taskType</i></dt> |
|
300 <dd> |
|
301 type of the task (one of Task.TypeFixme, Task.TypeTodo, |
|
302 Task.TypeWarning, Task.TypeNote) |
|
303 </dd><dt><i>description</i></dt> |
|
304 <dd> |
|
305 explanatory text of the task (string) |
|
306 </dd> |
|
307 </dl><a NAME="TaskViewer.addTask" ID="TaskViewer.addTask"></a> |
|
308 <h4>TaskViewer.addTask</h4> |
|
309 <b>addTask</b>(<i>summary, priority=1, filename="", lineno=0, completed=False, _time=0, isProjectTask=False, taskType=Task.TypeTodo, description=""</i>) |
|
310 <p> |
|
311 Public slot to add a task. |
|
312 </p><dl> |
|
313 <dt><i>summary</i></dt> |
|
314 <dd> |
|
315 summary text of the task (string) |
|
316 </dd><dt><i>priority</i></dt> |
|
317 <dd> |
|
318 priority of the task (0=high, 1=normal, 2=low) |
|
319 </dd><dt><i>filename</i></dt> |
|
320 <dd> |
|
321 filename containing the task (string) |
|
322 </dd><dt><i>lineno</i></dt> |
|
323 <dd> |
|
324 line number containing the task (integer) |
|
325 </dd><dt><i>completed</i></dt> |
|
326 <dd> |
|
327 flag indicating completion status (boolean) |
|
328 </dd><dt><i>_time</i></dt> |
|
329 <dd> |
|
330 creation time of the task (float, if 0 use current time) |
|
331 </dd><dt><i>isProjectTask</i></dt> |
|
332 <dd> |
|
333 flag indicating a task related to the current |
|
334 project (boolean) |
|
335 </dd><dt><i>taskType</i></dt> |
|
336 <dd> |
|
337 type of the task (one of Task.TypeFixme, Task.TypeTodo, |
|
338 Task.TypeWarning, Task.TypeNote) |
|
339 </dd><dt><i>description</i></dt> |
|
340 <dd> |
|
341 explanatory text of the task (string) |
|
342 </dd> |
|
343 </dl><a NAME="TaskViewer.clearFileTasks" ID="TaskViewer.clearFileTasks"></a> |
|
344 <h4>TaskViewer.clearFileTasks</h4> |
|
345 <b>clearFileTasks</b>(<i>filename, conditionally=False</i>) |
|
346 <p> |
|
347 Public slot to clear all tasks related to a file. |
|
348 </p><dl> |
|
349 <dt><i>filename</i></dt> |
|
350 <dd> |
|
351 name of the file (string) |
|
352 </dd><dt><i>conditionally</i></dt> |
|
353 <dd> |
|
354 flag indicating to clear the tasks of the file |
|
355 checking some conditions (boolean) |
|
356 </dd> |
|
357 </dl><a NAME="TaskViewer.clearProjectTasks" ID="TaskViewer.clearProjectTasks"></a> |
|
358 <h4>TaskViewer.clearProjectTasks</h4> |
|
359 <b>clearProjectTasks</b>(<i>fileOnly=False</i>) |
|
360 <p> |
|
361 Public slot to clear project related tasks. |
|
362 </p><dl> |
|
363 <dt><i>fileOnly=</i></dt> |
|
364 <dd> |
|
365 flag indicating to clear only file related |
|
366 project tasks (boolean) |
|
367 </dd> |
|
368 </dl><a NAME="TaskViewer.clearTasks" ID="TaskViewer.clearTasks"></a> |
|
369 <h4>TaskViewer.clearTasks</h4> |
|
370 <b>clearTasks</b>(<i></i>) |
|
371 <p> |
|
372 Public slot to clear all tasks from display. |
|
373 </p><a NAME="TaskViewer.getGlobalTasks" ID="TaskViewer.getGlobalTasks"></a> |
|
374 <h4>TaskViewer.getGlobalTasks</h4> |
|
375 <b>getGlobalTasks</b>(<i></i>) |
|
376 <p> |
|
377 Public method to retrieve all non project related tasks. |
|
378 </p><dl> |
|
379 <dt>Returns:</dt> |
|
380 <dd> |
|
381 copy of tasks (list of Task) |
|
382 </dd> |
|
383 </dl><a NAME="TaskViewer.getProjectTasks" ID="TaskViewer.getProjectTasks"></a> |
|
384 <h4>TaskViewer.getProjectTasks</h4> |
|
385 <b>getProjectTasks</b>(<i></i>) |
|
386 <p> |
|
387 Public method to retrieve all project related tasks. |
|
388 </p><dl> |
|
389 <dt>Returns:</dt> |
|
390 <dd> |
|
391 copy of tasks (list of Task) |
|
392 </dd> |
|
393 </dl><a NAME="TaskViewer.handlePreferencesChanged" ID="TaskViewer.handlePreferencesChanged"></a> |
|
394 <h4>TaskViewer.handlePreferencesChanged</h4> |
|
395 <b>handlePreferencesChanged</b>(<i></i>) |
|
396 <p> |
|
397 Public slot to react to changes of the preferences. |
|
398 </p><a NAME="TaskViewer.saveProjectTasks" ID="TaskViewer.saveProjectTasks"></a> |
|
399 <h4>TaskViewer.saveProjectTasks</h4> |
|
400 <b>saveProjectTasks</b>(<i></i>) |
|
401 <p> |
|
402 Public method to write the project tasks. |
|
403 </p><a NAME="TaskViewer.setProjectOpen" ID="TaskViewer.setProjectOpen"></a> |
|
404 <h4>TaskViewer.setProjectOpen</h4> |
|
405 <b>setProjectOpen</b>(<i>o=False</i>) |
|
406 <p> |
|
407 Public slot to set the project status. |
|
408 </p><dl> |
|
409 <dt><i>o</i></dt> |
|
410 <dd> |
|
411 flag indicating the project status |
|
412 </dd> |
|
413 </dl> |
|
414 <div align="right"><a href="#top">Up</a></div> |
|
415 <hr /> |
|
416 </body></html> |