|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' |
|
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> |
|
4 <html><head> |
|
5 <title>Plugin_Time_Tracker.TimeTracker.TimeTrackerWidget</title> |
|
6 <style> |
|
7 body { |
|
8 background: #EDECE6; |
|
9 margin: 0em 1em 10em 1em; |
|
10 color: black; |
|
11 } |
|
12 |
|
13 h1 { color: white; background: #85774A; } |
|
14 h2 { color: white; background: #85774A; } |
|
15 h3 { color: white; background: #9D936E; } |
|
16 h4 { color: white; background: #9D936E; } |
|
17 |
|
18 a { color: #BA6D36; } |
|
19 |
|
20 </style> |
|
21 </head> |
|
22 <body><a NAME="top" ID="top"></a> |
|
23 <h1>Plugin_Time_Tracker.TimeTracker.TimeTrackerWidget</h1> |
|
24 <p> |
|
25 Module implementing the time tracker widget. |
|
26 </p> |
|
27 <h3>Global Attributes</h3> |
|
28 <table> |
|
29 <tr><td>None</td></tr> |
|
30 </table> |
|
31 <h3>Classes</h3> |
|
32 <table> |
|
33 <tr> |
|
34 <td><a href="#TimeTrackerWidget">TimeTrackerWidget</a></td> |
|
35 <td>Class implementing the time tracker widget.</td> |
|
36 </tr> |
|
37 </table> |
|
38 <h3>Functions</h3> |
|
39 <table> |
|
40 <tr><td>None</td></tr> |
|
41 </table> |
|
42 <hr /><hr /> |
|
43 <a NAME="TimeTrackerWidget" ID="TimeTrackerWidget"></a> |
|
44 <h2>TimeTrackerWidget</h2> |
|
45 <p> |
|
46 Class implementing the time tracker widget. |
|
47 </p> |
|
48 <h3>Derived from</h3> |
|
49 QWidget, Ui_TimeTrackerWidget |
|
50 <h3>Class Attributes</h3> |
|
51 <table> |
|
52 <tr><td>CommentColumn</td></tr><tr><td>DurationColumn</td></tr><tr><td>TaskColumn</td></tr> |
|
53 </table> |
|
54 <h3>Class Methods</h3> |
|
55 <table> |
|
56 <tr><td>None</td></tr> |
|
57 </table> |
|
58 <h3>Methods</h3> |
|
59 <table> |
|
60 <tr> |
|
61 <td><a href="#TimeTrackerWidget.__init__">TimeTrackerWidget</a></td> |
|
62 <td>Constructor</td> |
|
63 </tr><tr> |
|
64 <td><a href="#TimeTrackerWidget.__addEntry">__addEntry</a></td> |
|
65 <td>Private slot to manually add an entry.</td> |
|
66 </tr><tr> |
|
67 <td><a href="#TimeTrackerWidget.__deleteSelectedEntries">__deleteSelectedEntries</a></td> |
|
68 <td>Private slot to delete the selected tracker entries.</td> |
|
69 </tr><tr> |
|
70 <td><a href="#TimeTrackerWidget.__editEntry">__editEntry</a></td> |
|
71 <td>Private slot to edit the selected tracker entry.</td> |
|
72 </tr><tr> |
|
73 <td><a href="#TimeTrackerWidget.__exportEntries">__exportEntries</a></td> |
|
74 <td>Private method to export all or selected entries.</td> |
|
75 </tr><tr> |
|
76 <td><a href="#TimeTrackerWidget.__exportSelectedEntries">__exportSelectedEntries</a></td> |
|
77 <td>Private slot to export the selected tracker entries.</td> |
|
78 </tr><tr> |
|
79 <td><a href="#TimeTrackerWidget.__importEntries">__importEntries</a></td> |
|
80 <td>Private slot to import tracker entries.</td> |
|
81 </tr><tr> |
|
82 <td><a href="#TimeTrackerWidget.__insertEntry">__insertEntry</a></td> |
|
83 <td>Private method to insert a tracker entry into the list.</td> |
|
84 </tr><tr> |
|
85 <td><a href="#TimeTrackerWidget.__mergeDuplicates">__mergeDuplicates</a></td> |
|
86 <td>Private slot to merge duplicate entries.</td> |
|
87 </tr><tr> |
|
88 <td><a href="#TimeTrackerWidget.__removeDuplicates">__removeDuplicates</a></td> |
|
89 <td>Private slot to remove duplicate entries.</td> |
|
90 </tr><tr> |
|
91 <td><a href="#TimeTrackerWidget.__resizeColumns">__resizeColumns</a></td> |
|
92 <td>Private slot to resize the columns of the entries list.</td> |
|
93 </tr><tr> |
|
94 <td><a href="#TimeTrackerWidget.__saveEntries">__saveEntries</a></td> |
|
95 <td>Private slot to save the tracker entries.</td> |
|
96 </tr><tr> |
|
97 <td><a href="#TimeTrackerWidget.clear">clear</a></td> |
|
98 <td>Public method to clear all the data.</td> |
|
99 </tr><tr> |
|
100 <td><a href="#TimeTrackerWidget.on_commentCombo_editTextChanged">on_commentCombo_editTextChanged</a></td> |
|
101 <td>Private slot handling changes of the comment of the current entry.</td> |
|
102 </tr><tr> |
|
103 <td><a href="#TimeTrackerWidget.on_entriesList_customContextMenuRequested">on_entriesList_customContextMenuRequested</a></td> |
|
104 <td>Private slot to create the context menu and show it.</td> |
|
105 </tr><tr> |
|
106 <td><a href="#TimeTrackerWidget.on_newButton_clicked">on_newButton_clicked</a></td> |
|
107 <td>Private slot to end the current timer and start a new one.</td> |
|
108 </tr><tr> |
|
109 <td><a href="#TimeTrackerWidget.on_pauseButton_toggled">on_pauseButton_toggled</a></td> |
|
110 <td>Private slot to pause the current timing.</td> |
|
111 </tr><tr> |
|
112 <td><a href="#TimeTrackerWidget.on_taskCombo_editTextChanged">on_taskCombo_editTextChanged</a></td> |
|
113 <td>Private slot handling changes of the task description of the current entry.</td> |
|
114 </tr><tr> |
|
115 <td><a href="#TimeTrackerWidget.setCurrentEntry">setCurrentEntry</a></td> |
|
116 <td>Public method to set the current entry.</td> |
|
117 </tr><tr> |
|
118 <td><a href="#TimeTrackerWidget.showTrackerEntries">showTrackerEntries</a></td> |
|
119 <td>Public method to show the tracker entries of the current project.</td> |
|
120 </tr> |
|
121 </table> |
|
122 <h3>Static Methods</h3> |
|
123 <table> |
|
124 <tr><td>None</td></tr> |
|
125 </table> |
|
126 <a NAME="TimeTrackerWidget.__init__" ID="TimeTrackerWidget.__init__"></a> |
|
127 <h4>TimeTrackerWidget (Constructor)</h4> |
|
128 <b>TimeTrackerWidget</b>(<i>tracker, parent=None</i>) |
|
129 <p> |
|
130 Constructor |
|
131 </p><dl> |
|
132 <dt><i>tracker</i></dt> |
|
133 <dd> |
|
134 reference to the time tracker (TimeTracker) |
|
135 </dd><dt><i>parent</i></dt> |
|
136 <dd> |
|
137 reference to the parent widget (QWidget) |
|
138 </dd> |
|
139 </dl><a NAME="TimeTrackerWidget.__addEntry" ID="TimeTrackerWidget.__addEntry"></a> |
|
140 <h4>TimeTrackerWidget.__addEntry</h4> |
|
141 <b>__addEntry</b>(<i></i>) |
|
142 <p> |
|
143 Private slot to manually add an entry. |
|
144 </p><a NAME="TimeTrackerWidget.__deleteSelectedEntries" ID="TimeTrackerWidget.__deleteSelectedEntries"></a> |
|
145 <h4>TimeTrackerWidget.__deleteSelectedEntries</h4> |
|
146 <b>__deleteSelectedEntries</b>(<i></i>) |
|
147 <p> |
|
148 Private slot to delete the selected tracker entries. |
|
149 </p><a NAME="TimeTrackerWidget.__editEntry" ID="TimeTrackerWidget.__editEntry"></a> |
|
150 <h4>TimeTrackerWidget.__editEntry</h4> |
|
151 <b>__editEntry</b>(<i></i>) |
|
152 <p> |
|
153 Private slot to edit the selected tracker entry. |
|
154 </p><a NAME="TimeTrackerWidget.__exportEntries" ID="TimeTrackerWidget.__exportEntries"></a> |
|
155 <h4>TimeTrackerWidget.__exportEntries</h4> |
|
156 <b>__exportEntries</b>(<i>ids=[]</i>) |
|
157 <p> |
|
158 Private method to export all or selected entries. |
|
159 </p><dl> |
|
160 <dt><i>ids=</i></dt> |
|
161 <dd> |
|
162 list of IDs to export or all if empty (list of integer) |
|
163 </dd> |
|
164 </dl><a NAME="TimeTrackerWidget.__exportSelectedEntries" ID="TimeTrackerWidget.__exportSelectedEntries"></a> |
|
165 <h4>TimeTrackerWidget.__exportSelectedEntries</h4> |
|
166 <b>__exportSelectedEntries</b>(<i></i>) |
|
167 <p> |
|
168 Private slot to export the selected tracker entries. |
|
169 </p><a NAME="TimeTrackerWidget.__importEntries" ID="TimeTrackerWidget.__importEntries"></a> |
|
170 <h4>TimeTrackerWidget.__importEntries</h4> |
|
171 <b>__importEntries</b>(<i></i>) |
|
172 <p> |
|
173 Private slot to import tracker entries. |
|
174 </p><a NAME="TimeTrackerWidget.__insertEntry" ID="TimeTrackerWidget.__insertEntry"></a> |
|
175 <h4>TimeTrackerWidget.__insertEntry</h4> |
|
176 <b>__insertEntry</b>(<i>entry, index=-1</i>) |
|
177 <p> |
|
178 Private method to insert a tracker entry into the list. |
|
179 </p><dl> |
|
180 <dt><i>entry</i></dt> |
|
181 <dd> |
|
182 reference to the tracker entry (TimeTrackEntry) |
|
183 </dd><dt><i>index</i></dt> |
|
184 <dd> |
|
185 index the entry is to be inserted; -1 for at the end |
|
186 (integer) |
|
187 </dd> |
|
188 </dl><a NAME="TimeTrackerWidget.__mergeDuplicates" ID="TimeTrackerWidget.__mergeDuplicates"></a> |
|
189 <h4>TimeTrackerWidget.__mergeDuplicates</h4> |
|
190 <b>__mergeDuplicates</b>(<i></i>) |
|
191 <p> |
|
192 Private slot to merge duplicate entries. |
|
193 </p><a NAME="TimeTrackerWidget.__removeDuplicates" ID="TimeTrackerWidget.__removeDuplicates"></a> |
|
194 <h4>TimeTrackerWidget.__removeDuplicates</h4> |
|
195 <b>__removeDuplicates</b>(<i></i>) |
|
196 <p> |
|
197 Private slot to remove duplicate entries. |
|
198 </p><a NAME="TimeTrackerWidget.__resizeColumns" ID="TimeTrackerWidget.__resizeColumns"></a> |
|
199 <h4>TimeTrackerWidget.__resizeColumns</h4> |
|
200 <b>__resizeColumns</b>(<i></i>) |
|
201 <p> |
|
202 Private slot to resize the columns of the entries list. |
|
203 </p><a NAME="TimeTrackerWidget.__saveEntries" ID="TimeTrackerWidget.__saveEntries"></a> |
|
204 <h4>TimeTrackerWidget.__saveEntries</h4> |
|
205 <b>__saveEntries</b>(<i></i>) |
|
206 <p> |
|
207 Private slot to save the tracker entries. |
|
208 </p><a NAME="TimeTrackerWidget.clear" ID="TimeTrackerWidget.clear"></a> |
|
209 <h4>TimeTrackerWidget.clear</h4> |
|
210 <b>clear</b>(<i></i>) |
|
211 <p> |
|
212 Public method to clear all the data. |
|
213 </p><a NAME="TimeTrackerWidget.on_commentCombo_editTextChanged" ID="TimeTrackerWidget.on_commentCombo_editTextChanged"></a> |
|
214 <h4>TimeTrackerWidget.on_commentCombo_editTextChanged</h4> |
|
215 <b>on_commentCombo_editTextChanged</b>(<i>txt</i>) |
|
216 <p> |
|
217 Private slot handling changes of the comment of the current entry. |
|
218 </p><dl> |
|
219 <dt><i>txt</i></dt> |
|
220 <dd> |
|
221 new comment (string) |
|
222 </dd> |
|
223 </dl><a NAME="TimeTrackerWidget.on_entriesList_customContextMenuRequested" ID="TimeTrackerWidget.on_entriesList_customContextMenuRequested"></a> |
|
224 <h4>TimeTrackerWidget.on_entriesList_customContextMenuRequested</h4> |
|
225 <b>on_entriesList_customContextMenuRequested</b>(<i>pos</i>) |
|
226 <p> |
|
227 Private slot to create the context menu and show it. |
|
228 </p><dl> |
|
229 <dt><i>pos</i></dt> |
|
230 <dd> |
|
231 position the menu should be shown at (QPoint) |
|
232 </dd> |
|
233 </dl><a NAME="TimeTrackerWidget.on_newButton_clicked" ID="TimeTrackerWidget.on_newButton_clicked"></a> |
|
234 <h4>TimeTrackerWidget.on_newButton_clicked</h4> |
|
235 <b>on_newButton_clicked</b>(<i></i>) |
|
236 <p> |
|
237 Private slot to end the current timer and start a new one. |
|
238 </p><a NAME="TimeTrackerWidget.on_pauseButton_toggled" ID="TimeTrackerWidget.on_pauseButton_toggled"></a> |
|
239 <h4>TimeTrackerWidget.on_pauseButton_toggled</h4> |
|
240 <b>on_pauseButton_toggled</b>(<i>checked</i>) |
|
241 <p> |
|
242 Private slot to pause the current timing. |
|
243 </p><a NAME="TimeTrackerWidget.on_taskCombo_editTextChanged" ID="TimeTrackerWidget.on_taskCombo_editTextChanged"></a> |
|
244 <h4>TimeTrackerWidget.on_taskCombo_editTextChanged</h4> |
|
245 <b>on_taskCombo_editTextChanged</b>(<i>txt</i>) |
|
246 <p> |
|
247 Private slot handling changes of the task description of the current entry. |
|
248 </p><dl> |
|
249 <dt><i>txt</i></dt> |
|
250 <dd> |
|
251 new task description (string) |
|
252 </dd> |
|
253 </dl><a NAME="TimeTrackerWidget.setCurrentEntry" ID="TimeTrackerWidget.setCurrentEntry"></a> |
|
254 <h4>TimeTrackerWidget.setCurrentEntry</h4> |
|
255 <b>setCurrentEntry</b>(<i>entry</i>) |
|
256 <p> |
|
257 Public method to set the current entry. |
|
258 </p><dl> |
|
259 <dt><i>entry</i></dt> |
|
260 <dd> |
|
261 current entry (TimeTrackEntry) |
|
262 </dd> |
|
263 </dl><a NAME="TimeTrackerWidget.showTrackerEntries" ID="TimeTrackerWidget.showTrackerEntries"></a> |
|
264 <h4>TimeTrackerWidget.showTrackerEntries</h4> |
|
265 <b>showTrackerEntries</b>(<i>entries</i>) |
|
266 <p> |
|
267 Public method to show the tracker entries of the current project. |
|
268 </p><dl> |
|
269 <dt><i>entries</i></dt> |
|
270 <dd> |
|
271 list of tracker entries (list of TimeTrackEntry) |
|
272 </dd> |
|
273 </dl> |
|
274 <div align="right"><a href="#top">Up</a></div> |
|
275 <hr /> |
|
276 </body></html> |