153 for index in range(self.taskCombo.count()): |
153 for index in range(self.taskCombo.count()): |
154 tasks.append(self.taskCombo.itemText(index)) |
154 tasks.append(self.taskCombo.itemText(index)) |
155 comments = [] |
155 comments = [] |
156 for index in range(self.commentCombo.count()): |
156 for index in range(self.commentCombo.count()): |
157 comments.append(self.commentCombo.itemText(index)) |
157 comments.append(self.commentCombo.itemText(index)) |
158 dlg = TimeTrackerEntryDialog(entry, tasks, comments) |
158 dlg = TimeTrackerEntryDialog(entry, tasks, comments) |
159 if dlg.exec_() == QDialog.Accepted: |
159 if dlg.exec_() == QDialog.Accepted: |
160 start, duration, task, comment = dlg.getData() |
160 start, duration, task, comment = dlg.getData() |
161 |
161 |
162 entry.setStartDateTime(start) |
162 entry.setStartDateTime(start) |
163 entry.setDuration(duration) |
163 entry.setDuration(duration) |
164 entry.setTask(task) |
164 entry.setTask(task) |
165 entry.setComment(comment) |
165 entry.setComment(comment) |
166 self.__tracker.entryChanged() |
166 self.__tracker.entryChanged() |
167 |
167 |
168 eid, date, time, duration, task, comment, paused = entry.getEntryData() |
168 eid, date, time, duration, task, comment, paused = entry.getEntryData() |
169 itm.setText(0, self.tr("{0}, {1}", "date, time").format(date, time)) |
169 itm.setText(0, self.tr("{0}, {1}", "date, time").format(date, time)) |
170 itm.setText(1, self.tr("{0} min").format(duration)) |
170 itm.setText(1, self.tr("{0} min").format(duration)) |
171 itm.setText(2, task) |
171 itm.setText(2, task) |
172 itm.setText(3, comment) |
172 itm.setText(3, comment) |
173 self.__resizeColumns() |
173 self.__resizeColumns() |
174 |
174 |
175 def __deleteSelectedEntries(self): |
175 def __deleteSelectedEntries(self): |
176 """ |
176 """ |
177 Private slot to delete the selected tracker entries. |
177 Private slot to delete the selected tracker entries. |
178 """ |
178 """ |