src/eric7/Tasks/Task.py

branch
eric7
changeset 10431
64157aeb0312
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10430:e440aaf179ce 10431:64157aeb0312
179 179
180 def setSummary(self, summary): 180 def setSummary(self, summary):
181 """ 181 """
182 Public slot to update the description. 182 Public slot to update the description.
183 183
184 @param summary summary text of the task (string) 184 @param summary summary text of the task
185 @type str
185 """ 186 """
186 self.summary = summary 187 self.summary = summary
187 self.setText(2, self.summary) 188 self.setText(2, self.summary)
188 189
189 def setDescription(self, description): 190 def setDescription(self, description):
233 234
234 def setCompleted(self, completed): 235 def setCompleted(self, completed):
235 """ 236 """
236 Public slot to update the completed flag. 237 Public slot to update the completed flag.
237 238
238 @param completed flag indicating completion status (boolean) 239 @param completed flag indicating completion status
240 @type bool
239 """ 241 """
240 self.completed = completed 242 self.completed = completed
241 if self.completed: 243 if self.completed:
242 self.setIcon(0, EricPixmapCache.getIcon("taskCompleted")) 244 self.setIcon(0, EricPixmapCache.getIcon("taskCompleted"))
243 strikeOut = True 245 strikeOut = True
255 257
256 def isCompleted(self): 258 def isCompleted(self):
257 """ 259 """
258 Public slot to return the completion status. 260 Public slot to return the completion status.
259 261
260 @return flag indicating the completion status (boolean) 262 @return flag indicating the completion status
263 @rtype bool
261 """ 264 """
262 return self.completed 265 return self.completed
263 266
264 def getFilename(self): 267 def getFilename(self):
265 """ 268 """
266 Public method to retrieve the task's filename. 269 Public method to retrieve the task's filename.
267 270
268 @return filename (string) 271 @return filename
272 @rtype str
269 """ 273 """
270 if self._isProjectTask and self.filename: 274 if self._isProjectTask and self.filename:
271 return os.path.join(self.project.getProjectPath(), self.filename) 275 return os.path.join(self.project.getProjectPath(), self.filename)
272 else: 276 else:
273 return self.filename 277 return self.filename
274 278
275 def isFileTask(self): 279 def isFileTask(self):
276 """ 280 """
277 Public slot to get an indication, if this task is related to a file. 281 Public slot to get an indication, if this task is related to a file.
278 282
279 @return flag indicating a file task (boolean) 283 @return flag indicating a file task
284 @rtype bool
280 """ 285 """
281 return self.filename != "" 286 return self.filename != ""
282 287
283 def getLineno(self): 288 def getLineno(self):
284 """ 289 """
285 Public method to retrieve the task's linenumber. 290 Public method to retrieve the task's linenumber.
286 291
287 @return linenumber (integer) 292 @return linenumber
293 @rtype int
288 """ 294 """
289 return self.lineno 295 return self.lineno
290 296
291 def getUuid(self): 297 def getUuid(self):
292 """ 298 """
293 Public method to get the task's uid. 299 Public method to get the task's uid.
294 300
295 @return uid (string) 301 @return uid
302 @rtype str
296 """ 303 """
297 return self.uid 304 return self.uid
298 305
299 def getParentUuid(self): 306 def getParentUuid(self):
300 """ 307 """
301 Public method to get the parent task's uid. 308 Public method to get the parent task's uid.
302 309
303 @return parent uid (string) 310 @return parent uid
311 @rtype str
304 """ 312 """
305 return self.parentUid 313 return self.parentUid
306 314
307 def setProjectTask(self, pt): 315 def setProjectTask(self, pt):
308 """ 316 """
309 Public method to set the project relation flag. 317 Public method to set the project relation flag.
310 318
311 @param pt flag indicating a project task (boolean) 319 @param pt flag indicating a project task
320 @type bool
312 """ 321 """
313 self._isProjectTask = pt 322 self._isProjectTask = pt
314 self.colorizeTask() 323 self.colorizeTask()
315 324
316 def isProjectTask(self): 325 def isProjectTask(self):
317 """ 326 """
318 Public slot to return the project relation status. 327 Public slot to return the project relation status.
319 328
320 @return flag indicating the project relation status (boolean) 329 @return flag indicating the project relation status
330 @rtype bool
321 """ 331 """
322 return self._isProjectTask 332 return self._isProjectTask
323 333
324 def isProjectFileTask(self): 334 def isProjectFileTask(self):
325 """ 335 """
326 Public slot to get an indication, if this task is related to a 336 Public slot to get an indication, if this task is related to a
327 project file. 337 project file.
328 338
329 @return flag indicating a project file task (boolean) 339 @return flag indicating a project file task
340 @rtype bool
330 """ 341 """
331 return self._isProjectTask and self.filename != "" 342 return self._isProjectTask and self.filename != ""
332 343
333 def toDict(self): 344 def toDict(self):
334 """ 345 """

eric ide

mercurial