1
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
2
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4
<title>eric3.UI.TaskViewer</title>
6
<body bgcolor="#FFFFFF"><a NAME="top" ID="top"></a>
7
<h1><font color="#0000FF">eric3.UI.TaskViewer</font></h1>
9
Module implementing a task viewer and associated classes.
11
Tasks can be defined manually or automatically. Automatically
12
generated tasks are derived from a comment with a specially
13
introductory text. This text is configurable.
15
<h3><font color="#FF0000">Classes</font></h3>
18
<td><a href="#Task">Task</a></td>
19
<td>Class implementing the task data structure.</td>
21
<td><a href="#TaskViewer">TaskViewer</a></td>
22
<td>Class implementing the task viewer.</td>
25
<h3><font color="#FF0000">Functions</font></h3>
27
<tr><td>None</td></tr>
30
<a NAME="Task" ID="Task"></a>
31
<h2><font color="#0000FF">Task</font></h2>
33
Class implementing the task data structure.
35
<h3><font color="#FF0000">Derived from</font></h3>
37
<h3><font color="#FF0000">Methods</font></h3>
40
<td><a href="#Task.__init__">Task</a></td>
43
<td><a href="#Task.getFilename">getFilename</a></td>
44
<td>Public method to retrieve the tasks filename.</td>
46
<td><a href="#Task.getLineno">getLineno</a></td>
47
<td>Public method to retrieve the tasks linenumber.</td>
49
<td><a href="#Task.isCompleted">isCompleted</a></td>
50
<td>Public slot to return the completion status.</td>
52
<td><a href="#Task.isProjectTask">isProjectTask</a></td>
53
<td>Public slot to return the project relation status.</td>
55
<td><a href="#Task.paintCell">paintCell</a></td>
56
<td>Overwritten class to set a different text color, if bold is true.</td>
58
<td><a href="#Task.setCompleted">setCompleted</a></td>
59
<td>Public slot to update the completed flag.</td>
61
<td><a href="#Task.setDescription">setDescription</a></td>
62
<td>Public slot to update the description.</td>
64
<td><a href="#Task.setPriority">setPriority</a></td>
65
<td>Public slot to update the priority.</td>
67
<td><a href="#Task.setProjectTask">setProjectTask</a></td>
68
<td>Public method to set the project relation flag.</td>
71
<p><a NAME="Task.__init__" ID="Task__init__"></a>
72
<h3><font color="#0000FF">Task (Constructor)</font></h3>
73
<b>Task</b>(<i>parent, description, priority=1, filename="", lineno=0, completed=0, _time=0, isProjectTask=0, isBugfixTask=0, ppath=""</i>)
77
<dt><i>parent</i></dt>
79
parent widget of the task (QWidget)
80
</dd><dt><i>description</i></dt>
82
descriptive text of the task (string or QString)
83
</dd><dt><i>priority</i></dt>
85
priority of the task (0=high, 1=normal, 2=low)
86
</dd><dt><i>filename</i></dt>
88
filename containing the task (string or QString)
89
</dd><dt><i>lineno</i></dt>
91
line number containing the task (integer)
92
</dd><dt><i>completed</i></dt>
94
flag indicating completion status (boolean)
95
</dd><dt><i>_time</i></dt>
97
creation time of the task (float, if 0 use current time)
98
</dd><dt><i>isProjectTask</i></dt>
100
flag indicating a task related to the current project (boolean)
101
</dd><dt><i>isBugfixTask</i></dt>
103
flag indicating a bugfix task (boolean)
104
</dd><dt><i>ppath</i></dt>
106
the project path (string or QString)
108
</dl><a NAME="Task.getFilename" ID="TaskgetFilename"></a>
109
<h3><font color="#0000FF">Task.getFilename</font></h3>
110
<b>getFilename</b>(<i></i>)
112
Public method to retrieve the tasks filename.
118
</dl><a NAME="Task.getLineno" ID="TaskgetLineno"></a>
119
<h3><font color="#0000FF">Task.getLineno</font></h3>
120
<b>getLineno</b>(<i></i>)
122
Public method to retrieve the tasks linenumber.
128
</dl><a NAME="Task.isCompleted" ID="TaskisCompleted"></a>
129
<h3><font color="#0000FF">Task.isCompleted</font></h3>
130
<b>isCompleted</b>(<i></i>)
132
Public slot to return the completion status.
136
flag indicating the completion status (boolean)
138
</dl><a NAME="Task.isProjectTask" ID="TaskisProjectTask"></a>
139
<h3><font color="#0000FF">Task.isProjectTask</font></h3>
140
<b>isProjectTask</b>(<i></i>)
142
Public slot to return the project relation status.
146
flag indicating the project relation status (boolean)
148
</dl><a NAME="Task.paintCell" ID="TaskpaintCell"></a>
149
<h3><font color="#0000FF">Task.paintCell</font></h3>
150
<b>paintCell</b>(<i>p, cg, column, width, alignment</i>)
152
Overwritten class to set a different text color, if bold is true.
156
the painter (QPainter)
157
</dd><dt><i>cg</i></dt>
159
the color group (QColorGroup)
160
</dd><dt><i>column</i></dt>
163
</dd><dt><i>width</i></dt>
165
width of the cell (int)
166
</dd><dt><i>alignment</i></dt>
168
alignment of the cell (int)
170
</dl><a NAME="Task.setCompleted" ID="TasksetCompleted"></a>
171
<h3><font color="#0000FF">Task.setCompleted</font></h3>
172
<b>setCompleted</b>(<i>completed</i>)
174
Public slot to update the completed flag.
176
<dt><i>completed</i></dt>
178
flag indicating completion status (boolean)
180
</dl><a NAME="Task.setDescription" ID="TasksetDescription"></a>
181
<h3><font color="#0000FF">Task.setDescription</font></h3>
182
<b>setDescription</b>(<i>description</i>)
184
Public slot to update the description.
186
<dt><i>decsription</i></dt>
188
descriptive text of the task (string or QString)
190
</dl><a NAME="Task.setPriority" ID="TasksetPriority"></a>
191
<h3><font color="#0000FF">Task.setPriority</font></h3>
192
<b>setPriority</b>(<i>priority</i>)
194
Public slot to update the priority.
196
<dt><i>priority</i></dt>
198
priority of the task (0=high, 1=normal, 2=low)
200
</dl><a NAME="Task.setProjectTask" ID="TasksetProjectTask"></a>
201
<h3><font color="#0000FF">Task.setProjectTask</font></h3>
202
<b>setProjectTask</b>(<i>pt</i>)
204
Public method to set the project relation flag.
208
flag indicating a project task (boolean)
211
<div align="right"><a href="#top">Up</a></div>
213
<a NAME="TaskViewer" ID="TaskViewer"></a>
214
<h2><font color="#0000FF">TaskViewer</font></h2>
216
Class implementing the task viewer.
219
<dt>displayFile(string, integer)</dt>
221
emitted to go to a file task
224
<h3><font color="#FF0000">Derived from</font></h3>
226
<h3><font color="#FF0000">Methods</font></h3>
229
<td><a href="#TaskViewer.__init__">TaskViewer</a></td>
232
<td><a href="#TaskViewer.addFileTask">addFileTask</a></td>
233
<td>Public slot to add a file related task.</td>
235
<td><a href="#TaskViewer.addTask">addTask</a></td>
236
<td>Public slot to add a task.</td>
238
<td><a href="#TaskViewer.clearFileTasks">clearFileTasks</a></td>
239
<td>Public slot to clear all task related to a file.</td>
241
<td><a href="#TaskViewer.clearProjectTasks">clearProjectTasks</a></td>
242
<td>Public slot to clear project related tasks.</td>
244
<td><a href="#TaskViewer.clearTasks">clearTasks</a></td>
245
<td>Public slot to clear all tasks from display.</td>
247
<td><a href="#TaskViewer.contentsMouseDoubleClickEvent">contentsMouseDoubleClickEvent</a></td>
248
<td>Protected method of QListView.</td>
250
<td><a href="#TaskViewer.getGlobalTasks">getGlobalTasks</a></td>
251
<td>Public method to retrieve all non project related tasks.</td>
253
<td><a href="#TaskViewer.getProjectTasks">getProjectTasks</a></td>
254
<td>Public method to retrieve all project related tasks.</td>
256
<td><a href="#TaskViewer.handleCompleted">handleCompleted</a></td>
257
<td>Private slot to handle the "Mark Completed" context menu entry.</td>
259
<td><a href="#TaskViewer.handleContextMenu">handleContextMenu</a></td>
260
<td>Private slot to show the context menu of the listview.</td>
262
<td><a href="#TaskViewer.handleCopy">handleCopy</a></td>
263
<td>Private slot to handle the "Copy" context menu entry.</td>
265
<td><a href="#TaskViewer.handleDelete">handleDelete</a></td>
266
<td>Private slot to handle the "Delete Task" context menu entry.</td>
268
<td><a href="#TaskViewer.handleDeleteCompleted">handleDeleteCompleted</a></td>
269
<td>Private slot to handle the "Delete Completed Tasks" context menu entry.</td>
271
<td><a href="#TaskViewer.handleGoTo">handleGoTo</a></td>
272
<td>Private slot to handle the "Go To" context menu entry.</td>
274
<td><a href="#TaskViewer.handleNewTask">handleNewTask</a></td>
275
<td>Private slot to handle the "New Task" context menu entry.</td>
277
<td><a href="#TaskViewer.handlePaste">handlePaste</a></td>
278
<td>Private slot to handle the "Paste" context menu entry.</td>
280
<td><a href="#TaskViewer.handlePreferencesChanged">handlePreferencesChanged</a></td>
281
<td>Private slot to react to changes of the preferences.</td>
283
<td><a href="#TaskViewer.handleProperties">handleProperties</a></td>
284
<td>Private slot to handle the "Properties" context menu entry</td>
286
<td><a href="#TaskViewer.setProjectOpen">setProjectOpen</a></td>
287
<td>Public slot to set the project status.</td>
290
<p><a NAME="TaskViewer.__init__" ID="TaskViewer__init__"></a>
291
<h3><font color="#0000FF">TaskViewer (Constructor)</font></h3>
292
<b>TaskViewer</b>(<i>parent, project</i>)
296
<dt><i>parent</i></dt>
299
</dd><dt><i>project</i></dt>
301
reference to the project object
303
</dl><a NAME="TaskViewer.addFileTask" ID="TaskVieweraddFileTask"></a>
304
<h3><font color="#0000FF">TaskViewer.addFileTask</font></h3>
305
<b>addFileTask</b>(<i>description, filename, lineno, isBugfixTask=0</i>)
307
Public slot to add a file related task.
309
<dt><i>description</i></dt>
311
descriptive text of the task (string or QString)
312
</dd><dt><i>filename</i></dt>
314
filename containing the task (string or QString)
315
</dd><dt><i>lineno</i></dt>
317
line number containing the task (integer)
318
</dd><dt><i>isBugfixTask</i></dt>
320
flag indicating a bugfix task (boolean)
322
</dl><a NAME="TaskViewer.addTask" ID="TaskVieweraddTask"></a>
323
<h3><font color="#0000FF">TaskViewer.addTask</font></h3>
324
<b>addTask</b>(<i>description, priority=1, filename="", lineno=0, completed=0, _time=0, isProjectTask=0, isBugfixTask=0</i>)
326
Public slot to add a task.
328
<dt><i>description</i></dt>
330
descriptive text of the task (string or QString)
331
</dd><dt><i>priority</i></dt>
333
priority of the task (0=high, 1=normal, 2=low)
334
</dd><dt><i>filename</i></dt>
336
filename containing the task (string or QString)
337
</dd><dt><i>lineno</i></dt>
339
line number containing the task (integer)
340
</dd><dt><i>completed</i></dt>
342
flag indicating completion status (boolean)
343
</dd><dt><i>_time</i></dt>
345
creation time of the task (float, if 0 use current time)
346
</dd><dt><i>isProjectTask</i></dt>
348
flag indicating a task related to the current project (boolean)
349
</dd><dt><i>isBugfixTask</i></dt>
351
flag indicating a bugfix task (boolean)
353
</dl><a NAME="TaskViewer.clearFileTasks" ID="TaskViewerclearFileTasks"></a>
354
<h3><font color="#0000FF">TaskViewer.clearFileTasks</font></h3>
355
<b>clearFileTasks</b>(<i>filename</i>)
357
Public slot to clear all task related to a file.
359
<dt><i>filename</i></dt>
361
name of the file (string or QString)
363
</dl><a NAME="TaskViewer.clearProjectTasks" ID="TaskViewerclearProjectTasks"></a>
364
<h3><font color="#0000FF">TaskViewer.clearProjectTasks</font></h3>
365
<b>clearProjectTasks</b>(<i></i>)
367
Public slot to clear project related tasks.
368
</p><a NAME="TaskViewer.clearTasks" ID="TaskViewerclearTasks"></a>
369
<h3><font color="#0000FF">TaskViewer.clearTasks</font></h3>
370
<b>clearTasks</b>(<i></i>)
372
Public slot to clear all tasks from display.
373
</p><a NAME="TaskViewer.contentsMouseDoubleClickEvent" ID="TaskViewercontentsMouseDoubleClickEvent"></a>
374
<h3><font color="#0000FF">TaskViewer.contentsMouseDoubleClickEvent</font></h3>
375
<b>contentsMouseDoubleClickEvent</b>(<i>mouseEvent</i>)
377
Protected method of QListView.
379
Reimplemented to disable expanding/collapsing
380
of items when double-clicking. Instead the double-clicked entry is opened.
382
<dt><i>mouseEvent</i></dt>
384
the mouse event (QMouseEvent)
386
</dl><a NAME="TaskViewer.getGlobalTasks" ID="TaskViewergetGlobalTasks"></a>
387
<h3><font color="#0000FF">TaskViewer.getGlobalTasks</font></h3>
388
<b>getGlobalTasks</b>(<i></i>)
390
Public method to retrieve all non project related tasks.
394
copy of tasks (list of Task)
396
</dl><a NAME="TaskViewer.getProjectTasks" ID="TaskViewergetProjectTasks"></a>
397
<h3><font color="#0000FF">TaskViewer.getProjectTasks</font></h3>
398
<b>getProjectTasks</b>(<i></i>)
400
Public method to retrieve all project related tasks.
404
copy of tasks (list of Task)
406
</dl><a NAME="TaskViewer.handleCompleted" ID="TaskViewerhandleCompleted"></a>
407
<h3><font color="#0000FF">TaskViewer.handleCompleted</font></h3>
408
<b>handleCompleted</b>(<i></i>)
410
Private slot to handle the "Mark Completed" context menu entry.
411
</p><a NAME="TaskViewer.handleContextMenu" ID="TaskViewerhandleContextMenu"></a>
412
<h3><font color="#0000FF">TaskViewer.handleContextMenu</font></h3>
413
<b>handleContextMenu</b>(<i>itm, coord, col</i>)
415
Private slot to show the context menu of the listview.
419
the selected listview item (QListViewItem)
420
</dd><dt><i>coord</i></dt>
422
the position of the mouse pointer (QPoint)
423
</dd><dt><i>col</i></dt>
425
the column of the mouse pointer (int)
427
</dl><a NAME="TaskViewer.handleCopy" ID="TaskViewerhandleCopy"></a>
428
<h3><font color="#0000FF">TaskViewer.handleCopy</font></h3>
429
<b>handleCopy</b>(<i></i>)
431
Private slot to handle the "Copy" context menu entry.
432
</p><a NAME="TaskViewer.handleDelete" ID="TaskViewerhandleDelete"></a>
433
<h3><font color="#0000FF">TaskViewer.handleDelete</font></h3>
434
<b>handleDelete</b>(<i></i>)
436
Private slot to handle the "Delete Task" context menu entry.
437
</p><a NAME="TaskViewer.handleDeleteCompleted" ID="TaskViewerhandleDeleteCompleted"></a>
438
<h3><font color="#0000FF">TaskViewer.handleDeleteCompleted</font></h3>
439
<b>handleDeleteCompleted</b>(<i></i>)
441
Private slot to handle the "Delete Completed Tasks" context menu entry.
442
</p><a NAME="TaskViewer.handleGoTo" ID="TaskViewerhandleGoTo"></a>
443
<h3><font color="#0000FF">TaskViewer.handleGoTo</font></h3>
444
<b>handleGoTo</b>(<i></i>)
446
Private slot to handle the "Go To" context menu entry.
447
</p><a NAME="TaskViewer.handleNewTask" ID="TaskViewerhandleNewTask"></a>
448
<h3><font color="#0000FF">TaskViewer.handleNewTask</font></h3>
449
<b>handleNewTask</b>(<i></i>)
451
Private slot to handle the "New Task" context menu entry.
452
</p><a NAME="TaskViewer.handlePaste" ID="TaskViewerhandlePaste"></a>
453
<h3><font color="#0000FF">TaskViewer.handlePaste</font></h3>
454
<b>handlePaste</b>(<i></i>)
456
Private slot to handle the "Paste" context menu entry.
457
</p><a NAME="TaskViewer.handlePreferencesChanged" ID="TaskViewerhandlePreferencesChanged"></a>
458
<h3><font color="#0000FF">TaskViewer.handlePreferencesChanged</font></h3>
459
<b>handlePreferencesChanged</b>(<i></i>)
461
Private slot to react to changes of the preferences.
462
</p><a NAME="TaskViewer.handleProperties" ID="TaskViewerhandleProperties"></a>
463
<h3><font color="#0000FF">TaskViewer.handleProperties</font></h3>
464
<b>handleProperties</b>(<i></i>)
466
Private slot to handle the "Properties" context menu entry
467
</p><a NAME="TaskViewer.setProjectOpen" ID="TaskViewersetProjectOpen"></a>
468
<h3><font color="#0000FF">TaskViewer.setProjectOpen</font></h3>
469
<b>setProjectOpen</b>(<i>o=0</i>)
471
Public slot to set the project status.
475
flag indicating the project status
478
<div align="right"><a href="#top">Up</a></div>
b'\\ No newline at end of file'