48 Private slot handling changes of the task description of the current entry. |
48 Private slot handling changes of the task description of the current entry. |
49 |
49 |
50 @param txt new task description (string) |
50 @param txt new task description (string) |
51 """ |
51 """ |
52 itm = self.entriesList.topLevelItem(0) |
52 itm = self.entriesList.topLevelItem(0) |
53 itm.setText(self.TaskColumn, txt) |
53 if itm: |
54 self.entriesList.resizeColumnToContents(self.TaskColumn) |
54 itm.setText(self.TaskColumn, txt) |
|
55 self.entriesList.resizeColumnToContents(self.TaskColumn) |
55 |
56 |
56 entry = self.__tracker.getCurrentEntry() |
57 entry = self.__tracker.getCurrentEntry() |
57 entry.setTask(txt) |
58 if entry: |
|
59 entry.setTask(txt) |
58 |
60 |
59 @pyqtSlot(str) |
61 @pyqtSlot(str) |
60 def on_commentCombo_editTextChanged(self, txt): |
62 def on_commentCombo_editTextChanged(self, txt): |
61 """ |
63 """ |
62 Private slot handling changes of the comment of the current entry. |
64 Private slot handling changes of the comment of the current entry. |
63 |
65 |
64 @param txt new comment (string) |
66 @param txt new comment (string) |
65 """ |
67 """ |
66 itm = self.entriesList.topLevelItem(0) |
68 itm = self.entriesList.topLevelItem(0) |
67 itm.setText(self.CommentColumn, txt) |
69 if itm: |
68 self.entriesList.resizeColumnToContents(self.CommentColumn) |
70 itm.setText(self.CommentColumn, txt) |
|
71 self.entriesList.resizeColumnToContents(self.CommentColumn) |
69 |
72 |
70 entry = self.__tracker.getCurrentEntry() |
73 entry = self.__tracker.getCurrentEntry() |
71 entry.setComment(txt) |
74 if entry: |
|
75 entry.setComment(txt) |
72 |
76 |
73 @pyqtSlot(bool) |
77 @pyqtSlot(bool) |
74 def on_pauseButton_toggled(self, checked): |
78 def on_pauseButton_toggled(self, checked): |
75 """ |
79 """ |
76 Private slot to pause the current timing. |
80 Private slot to pause the current timing. |