13 from PyQt4.QtGui import QWidget, QMenu, QTreeWidgetItem, QCursor, QDialog |
13 from PyQt4.QtGui import QWidget, QMenu, QTreeWidgetItem, QCursor, QDialog |
14 |
14 |
15 from E5Gui import E5MessageBox, E5FileDialog |
15 from E5Gui import E5MessageBox, E5FileDialog |
16 |
16 |
17 from .Ui_TimeTrackerWidget import Ui_TimeTrackerWidget |
17 from .Ui_TimeTrackerWidget import Ui_TimeTrackerWidget |
18 |
|
19 from .TimeTrackerEntryDialog import TimeTrackerEntryDialog |
|
20 |
18 |
21 import Preferences |
19 import Preferences |
22 import Utilities |
20 import Utilities |
23 |
21 |
24 |
22 |
135 |
133 |
136 def __addEntry(self): |
134 def __addEntry(self): |
137 """ |
135 """ |
138 Private slot to manually add an entry. |
136 Private slot to manually add an entry. |
139 """ |
137 """ |
|
138 from .TimeTrackerEntryDialog import TimeTrackerEntryDialog |
|
139 |
140 tasks = [] |
140 tasks = [] |
141 for index in range(self.taskCombo.count()): |
141 for index in range(self.taskCombo.count()): |
142 tasks.append(self.taskCombo.itemText(index)) |
142 tasks.append(self.taskCombo.itemText(index)) |
143 comments = [] |
143 comments = [] |
144 for index in range(self.commentCombo.count()): |
144 for index in range(self.commentCombo.count()): |
155 eid = itm.data(0, Qt.UserRole) |
155 eid = itm.data(0, Qt.UserRole) |
156 if eid > -1: |
156 if eid > -1: |
157 # the current entry is edited via the elements of this widget |
157 # the current entry is edited via the elements of this widget |
158 entry = self.__tracker.getEntry(eid) |
158 entry = self.__tracker.getEntry(eid) |
159 if entry is not None: |
159 if entry is not None: |
|
160 from .TimeTrackerEntryDialog import TimeTrackerEntryDialog |
|
161 |
160 tasks = [] |
162 tasks = [] |
161 for index in range(self.taskCombo.count()): |
163 for index in range(self.taskCombo.count()): |
162 tasks.append(self.taskCombo.itemText(index)) |
164 tasks.append(self.taskCombo.itemText(index)) |
163 comments = [] |
165 comments = [] |
164 for index in range(self.commentCombo.count()): |
166 for index in range(self.commentCombo.count()): |