|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.Tasks.Task</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.Task</h1> |
|
23 <p> |
|
24 Module implementing a class to store task data. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#Task">Task</a></td> |
|
34 <td>Class implementing the task data structure.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /><hr /> |
|
42 <a NAME="Task" ID="Task"></a> |
|
43 <h2>Task</h2> |
|
44 <p> |
|
45 Class implementing the task data structure. |
|
46 </p> |
|
47 <h3>Derived from</h3> |
|
48 QTreeWidgetItem |
|
49 <h3>Class Attributes</h3> |
|
50 <table> |
|
51 <tr><td>TypeFixme</td></tr><tr><td>TypeNone</td></tr><tr><td>TypeNote</td></tr><tr><td>TypeTodo</td></tr><tr><td>TypeWarning</td></tr> |
|
52 </table> |
|
53 <h3>Class Methods</h3> |
|
54 <table> |
|
55 <tr><td>None</td></tr> |
|
56 </table> |
|
57 <h3>Methods</h3> |
|
58 <table> |
|
59 <tr> |
|
60 <td><a href="#Task.__init__">Task</a></td> |
|
61 <td>Constructor</td> |
|
62 </tr><tr> |
|
63 <td><a href="#Task.colorizeTask">colorizeTask</a></td> |
|
64 <td>Public slot to set the colors of the task item.</td> |
|
65 </tr><tr> |
|
66 <td><a href="#Task.getFilename">getFilename</a></td> |
|
67 <td>Public method to retrieve the task's filename.</td> |
|
68 </tr><tr> |
|
69 <td><a href="#Task.getLineno">getLineno</a></td> |
|
70 <td>Public method to retrieve the task's linenumber.</td> |
|
71 </tr><tr> |
|
72 <td><a href="#Task.getParentUuid">getParentUuid</a></td> |
|
73 <td>Public method to get the parent task's uid.</td> |
|
74 </tr><tr> |
|
75 <td><a href="#Task.getUuid">getUuid</a></td> |
|
76 <td>Public method to get the task's uid.</td> |
|
77 </tr><tr> |
|
78 <td><a href="#Task.isCompleted">isCompleted</a></td> |
|
79 <td>Public slot to return the completion status.</td> |
|
80 </tr><tr> |
|
81 <td><a href="#Task.isFileTask">isFileTask</a></td> |
|
82 <td>Public slot to get an indication, if this task is related to a file.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#Task.isProjectFileTask">isProjectFileTask</a></td> |
|
85 <td>Public slot to get an indication, if this task is related to a project file.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#Task.isProjectTask">isProjectTask</a></td> |
|
88 <td>Public slot to return the project relation status.</td> |
|
89 </tr><tr> |
|
90 <td><a href="#Task.setCompleted">setCompleted</a></td> |
|
91 <td>Public slot to update the completed flag.</td> |
|
92 </tr><tr> |
|
93 <td><a href="#Task.setDescription">setDescription</a></td> |
|
94 <td>Public slot to update the description field.</td> |
|
95 </tr><tr> |
|
96 <td><a href="#Task.setPriority">setPriority</a></td> |
|
97 <td>Public slot to update the priority.</td> |
|
98 </tr><tr> |
|
99 <td><a href="#Task.setProjectTask">setProjectTask</a></td> |
|
100 <td>Public method to set the project relation flag.</td> |
|
101 </tr><tr> |
|
102 <td><a href="#Task.setSummary">setSummary</a></td> |
|
103 <td>Public slot to update the description.</td> |
|
104 </tr> |
|
105 </table> |
|
106 <h3>Static Methods</h3> |
|
107 <table> |
|
108 <tr><td>None</td></tr> |
|
109 </table> |
|
110 <a NAME="Task.__init__" ID="Task.__init__"></a> |
|
111 <h4>Task (Constructor)</h4> |
|
112 <b>Task</b>(<i>summary, priority=1, filename="", lineno=0, completed=False, _time=0, isProjectTask=False, taskType=TypeTodo, project=None, description="", uid="", parentUid=""</i>) |
|
113 <p> |
|
114 Constructor |
|
115 </p><dl> |
|
116 <dt><i>summary</i></dt> |
|
117 <dd> |
|
118 summary text of the task (string) |
|
119 </dd><dt><i>priority</i></dt> |
|
120 <dd> |
|
121 priority of the task (0=high, 1=normal, 2=low) |
|
122 </dd><dt><i>filename</i></dt> |
|
123 <dd> |
|
124 filename containing the task (string) |
|
125 </dd><dt><i>lineno</i></dt> |
|
126 <dd> |
|
127 line number containing the task (integer) |
|
128 </dd><dt><i>completed</i></dt> |
|
129 <dd> |
|
130 flag indicating completion status (boolean) |
|
131 </dd><dt><i>_time</i></dt> |
|
132 <dd> |
|
133 creation time of the task (float, if 0 use current time) |
|
134 </dd><dt><i>isProjectTask</i></dt> |
|
135 <dd> |
|
136 flag indicating a task related to the current |
|
137 project (boolean) |
|
138 </dd><dt><i>taskType</i></dt> |
|
139 <dd> |
|
140 type of the task (one of TypeFixme, TypeTodo, |
|
141 TypeWarning, TypeNote) |
|
142 </dd><dt><i>project</i></dt> |
|
143 <dd> |
|
144 reference to the project object (Project) |
|
145 </dd><dt><i>description</i></dt> |
|
146 <dd> |
|
147 explanatory text of the task (string) |
|
148 </dd><dt><i>uid</i></dt> |
|
149 <dd> |
|
150 unique id of the task (string) |
|
151 </dd><dt><i>parentUid</i></dt> |
|
152 <dd> |
|
153 unique id of the parent task (string) |
|
154 </dd> |
|
155 </dl><a NAME="Task.colorizeTask" ID="Task.colorizeTask"></a> |
|
156 <h4>Task.colorizeTask</h4> |
|
157 <b>colorizeTask</b>(<i></i>) |
|
158 <p> |
|
159 Public slot to set the colors of the task item. |
|
160 </p><a NAME="Task.getFilename" ID="Task.getFilename"></a> |
|
161 <h4>Task.getFilename</h4> |
|
162 <b>getFilename</b>(<i></i>) |
|
163 <p> |
|
164 Public method to retrieve the task's filename. |
|
165 </p><dl> |
|
166 <dt>Returns:</dt> |
|
167 <dd> |
|
168 filename (string) |
|
169 </dd> |
|
170 </dl><a NAME="Task.getLineno" ID="Task.getLineno"></a> |
|
171 <h4>Task.getLineno</h4> |
|
172 <b>getLineno</b>(<i></i>) |
|
173 <p> |
|
174 Public method to retrieve the task's linenumber. |
|
175 </p><dl> |
|
176 <dt>Returns:</dt> |
|
177 <dd> |
|
178 linenumber (integer) |
|
179 </dd> |
|
180 </dl><a NAME="Task.getParentUuid" ID="Task.getParentUuid"></a> |
|
181 <h4>Task.getParentUuid</h4> |
|
182 <b>getParentUuid</b>(<i></i>) |
|
183 <p> |
|
184 Public method to get the parent task's uid. |
|
185 </p><dl> |
|
186 <dt>Returns:</dt> |
|
187 <dd> |
|
188 parent uid (string) |
|
189 </dd> |
|
190 </dl><a NAME="Task.getUuid" ID="Task.getUuid"></a> |
|
191 <h4>Task.getUuid</h4> |
|
192 <b>getUuid</b>(<i></i>) |
|
193 <p> |
|
194 Public method to get the task's uid. |
|
195 </p><dl> |
|
196 <dt>Returns:</dt> |
|
197 <dd> |
|
198 uid (string) |
|
199 </dd> |
|
200 </dl><a NAME="Task.isCompleted" ID="Task.isCompleted"></a> |
|
201 <h4>Task.isCompleted</h4> |
|
202 <b>isCompleted</b>(<i></i>) |
|
203 <p> |
|
204 Public slot to return the completion status. |
|
205 </p><dl> |
|
206 <dt>Returns:</dt> |
|
207 <dd> |
|
208 flag indicating the completion status (boolean) |
|
209 </dd> |
|
210 </dl><a NAME="Task.isFileTask" ID="Task.isFileTask"></a> |
|
211 <h4>Task.isFileTask</h4> |
|
212 <b>isFileTask</b>(<i></i>) |
|
213 <p> |
|
214 Public slot to get an indication, if this task is related to a file. |
|
215 </p><dl> |
|
216 <dt>Returns:</dt> |
|
217 <dd> |
|
218 flag indicating a file task (boolean) |
|
219 </dd> |
|
220 </dl><a NAME="Task.isProjectFileTask" ID="Task.isProjectFileTask"></a> |
|
221 <h4>Task.isProjectFileTask</h4> |
|
222 <b>isProjectFileTask</b>(<i></i>) |
|
223 <p> |
|
224 Public slot to get an indication, if this task is related to a |
|
225 project file. |
|
226 </p><dl> |
|
227 <dt>Returns:</dt> |
|
228 <dd> |
|
229 flag indicating a project file task (boolean) |
|
230 </dd> |
|
231 </dl><a NAME="Task.isProjectTask" ID="Task.isProjectTask"></a> |
|
232 <h4>Task.isProjectTask</h4> |
|
233 <b>isProjectTask</b>(<i></i>) |
|
234 <p> |
|
235 Public slot to return the project relation status. |
|
236 </p><dl> |
|
237 <dt>Returns:</dt> |
|
238 <dd> |
|
239 flag indicating the project relation status (boolean) |
|
240 </dd> |
|
241 </dl><a NAME="Task.setCompleted" ID="Task.setCompleted"></a> |
|
242 <h4>Task.setCompleted</h4> |
|
243 <b>setCompleted</b>(<i>completed</i>) |
|
244 <p> |
|
245 Public slot to update the completed flag. |
|
246 </p><dl> |
|
247 <dt><i>completed</i></dt> |
|
248 <dd> |
|
249 flag indicating completion status (boolean) |
|
250 </dd> |
|
251 </dl><a NAME="Task.setDescription" ID="Task.setDescription"></a> |
|
252 <h4>Task.setDescription</h4> |
|
253 <b>setDescription</b>(<i>description</i>) |
|
254 <p> |
|
255 Public slot to update the description field. |
|
256 </p><dl> |
|
257 <dt><i>description</i></dt> |
|
258 <dd> |
|
259 descriptive text of the task (string) |
|
260 </dd> |
|
261 </dl><a NAME="Task.setPriority" ID="Task.setPriority"></a> |
|
262 <h4>Task.setPriority</h4> |
|
263 <b>setPriority</b>(<i>priority</i>) |
|
264 <p> |
|
265 Public slot to update the priority. |
|
266 </p><dl> |
|
267 <dt><i>priority</i></dt> |
|
268 <dd> |
|
269 priority of the task (0=high, 1=normal, 2=low) |
|
270 </dd> |
|
271 </dl><a NAME="Task.setProjectTask" ID="Task.setProjectTask"></a> |
|
272 <h4>Task.setProjectTask</h4> |
|
273 <b>setProjectTask</b>(<i>pt</i>) |
|
274 <p> |
|
275 Public method to set the project relation flag. |
|
276 </p><dl> |
|
277 <dt><i>pt</i></dt> |
|
278 <dd> |
|
279 flag indicating a project task (boolean) |
|
280 </dd> |
|
281 </dl><a NAME="Task.setSummary" ID="Task.setSummary"></a> |
|
282 <h4>Task.setSummary</h4> |
|
283 <b>setSummary</b>(<i>summary</i>) |
|
284 <p> |
|
285 Public slot to update the description. |
|
286 </p><dl> |
|
287 <dt><i>summary</i></dt> |
|
288 <dd> |
|
289 summary text of the task (string) |
|
290 </dd> |
|
291 </dl> |
|
292 <div align="right"><a href="#top">Up</a></div> |
|
293 <hr /> |
|
294 </body></html> |