33 completed=False, _time=0, isProjectTask=False, |
33 completed=False, _time=0, isProjectTask=False, |
34 taskType=TypeTodo, project=None, description=""): |
34 taskType=TypeTodo, project=None, description=""): |
35 """ |
35 """ |
36 Constructor |
36 Constructor |
37 |
37 |
38 @param parent parent widget of the task (QWidget) |
|
39 @param summary summary text of the task (string) |
38 @param summary summary text of the task (string) |
40 @param priority priority of the task (0=high, 1=normal, 2=low) |
39 @param priority priority of the task (0=high, 1=normal, 2=low) |
41 @param filename filename containing the task (string) |
40 @param filename filename containing the task (string) |
42 @param lineno line number containing the task (integer) |
41 @param lineno line number containing the task (integer) |
43 @param completed flag indicating completion status (boolean) |
42 @param completed flag indicating completion status (boolean) |
44 @param _time creation time of the task (float, if 0 use current time) |
43 @param _time creation time of the task (float, if 0 use current time) |
45 @param isProjectTask flag indicating a task related to the current project |
44 @param isProjectTask flag indicating a task related to the current |
46 (boolean) |
45 project (boolean) |
47 @param taskType type of the task (one of TypeFixme, TypeTodo, |
46 @param taskType type of the task (one of TypeFixme, TypeTodo, |
48 TypeWarning, TypeNote) |
47 TypeWarning, TypeNote) |
49 @param project reference to the project object (Project) |
48 @param project reference to the project object (Project) |
50 @param description explanatory text of the task (string) |
49 @param description explanatory text of the task (string) |
51 """ |
50 """ |
112 """ |
111 """ |
113 boldFont = self.font(0) |
112 boldFont = self.font(0) |
114 boldFont.setBold(True) |
113 boldFont.setBold(True) |
115 for col in range(5): |
114 for col in range(5): |
116 if self.taskType == Task.TypeFixme: |
115 if self.taskType == Task.TypeFixme: |
117 self.setBackgroundColor(col, Preferences.getTasks("TasksFixmeColor")) |
116 self.setBackgroundColor( |
|
117 col, Preferences.getTasks("TasksFixmeColor")) |
118 elif self.taskType == Task.TypeWarning: |
118 elif self.taskType == Task.TypeWarning: |
119 self.setBackgroundColor(col, Preferences.getTasks("TasksWarningColor")) |
119 self.setBackgroundColor( |
|
120 col, Preferences.getTasks("TasksWarningColor")) |
120 elif self.taskType == Task.TypeTodo: |
121 elif self.taskType == Task.TypeTodo: |
121 self.setBackgroundColor(col, Preferences.getTasks("TasksTodoColor")) |
122 self.setBackgroundColor( |
|
123 col, Preferences.getTasks("TasksTodoColor")) |
122 else: |
124 else: |
123 self.setBackgroundColor(col, Preferences.getTasks("TasksNoteColor")) |
125 self.setBackgroundColor( |
|
126 col, Preferences.getTasks("TasksNoteColor")) |
124 if self._isProjectTask: |
127 if self._isProjectTask: |
125 self.setFont(col, boldFont) |
128 self.setFont(col, boldFont) |
126 |
129 |
127 def setSummary(self, summary): |
130 def setSummary(self, summary): |
128 """ |
131 """ |
223 """ |
226 """ |
224 return self._isProjectTask |
227 return self._isProjectTask |
225 |
228 |
226 def isProjectFileTask(self): |
229 def isProjectFileTask(self): |
227 """ |
230 """ |
228 Public slot to get an indication, if this task is related to a project file. |
231 Public slot to get an indication, if this task is related to a |
|
232 project file. |
229 |
233 |
230 @return flag indicating a project file task (boolean) |
234 @return flag indicating a project file task (boolean) |
231 """ |
235 """ |
232 return self._isProjectTask and self.filename != "" |
236 return self._isProjectTask and self.filename != "" |