5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>Plugin_Time_Tracker.TimeTracker.TimeTrackEntry</h1> |
9 <h1>Plugin_Time_Tracker.TimeTracker.TimeTrackEntry</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing the time track entry class. |
11 Module implementing the time track entry class. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
|
16 <table> |
15 <table> |
17 <tr><td>None</td></tr> |
16 <tr><td>None</td></tr> |
18 </table> |
17 </table> |
|
18 |
19 <h3>Classes</h3> |
19 <h3>Classes</h3> |
20 |
20 <table> |
21 <table> |
|
22 |
|
23 <tr> |
21 <tr> |
24 <td><a href="#TimeTrackEntry">TimeTrackEntry</a></td> |
22 <td><a href="#TimeTrackEntry">TimeTrackEntry</a></td> |
25 <td>Class implementing the time track entry.</td> |
23 <td>Class implementing the time track entry.</td> |
26 </tr> |
24 </tr> |
27 </table> |
25 </table> |
|
26 |
28 <h3>Functions</h3> |
27 <h3>Functions</h3> |
29 |
|
30 <table> |
28 <table> |
31 <tr><td>None</td></tr> |
29 <tr><td>None</td></tr> |
32 </table> |
30 </table> |
|
31 |
33 <hr /> |
32 <hr /> |
34 <hr /> |
33 <hr /> |
35 <a NAME="TimeTrackEntry" ID="TimeTrackEntry"></a> |
34 <a NAME="TimeTrackEntry" ID="TimeTrackEntry"></a> |
36 <h2>TimeTrackEntry</h2> |
35 <h2>TimeTrackEntry</h2> |
37 |
|
38 <p> |
36 <p> |
39 Class implementing the time track entry. |
37 Class implementing the time track entry. |
40 </p> |
38 </p> |
|
39 |
41 <h3>Derived from</h3> |
40 <h3>Derived from</h3> |
42 None |
41 None |
43 <h3>Class Attributes</h3> |
42 <h3>Class Attributes</h3> |
44 |
43 <table> |
45 <table> |
44 <tr><td>LineMarker</td></tr> |
46 <tr><td>LineMarker</td></tr><tr><td>Separator</td></tr> |
45 <tr><td>Separator</td></tr> |
47 </table> |
46 </table> |
|
47 |
48 <h3>Class Methods</h3> |
48 <h3>Class Methods</h3> |
49 |
|
50 <table> |
49 <table> |
51 <tr><td>None</td></tr> |
50 <tr><td>None</td></tr> |
52 </table> |
51 </table> |
|
52 |
53 <h3>Methods</h3> |
53 <h3>Methods</h3> |
54 |
54 <table> |
55 <table> |
|
56 |
|
57 <tr> |
55 <tr> |
58 <td><a href="#TimeTrackEntry.__init__">TimeTrackEntry</a></td> |
56 <td><a href="#TimeTrackEntry.__init__">TimeTrackEntry</a></td> |
59 <td>Constructor</td> |
57 <td>Constructor</td> |
60 </tr> |
58 </tr> |
61 <tr> |
59 <tr> |
149 <tr> |
147 <tr> |
150 <td><a href="#TimeTrackEntry.toDict">toDict</a></td> |
148 <td><a href="#TimeTrackEntry.toDict">toDict</a></td> |
151 <td>Public method to convert the time track entry into a dictionary.</td> |
149 <td>Public method to convert the time track entry into a dictionary.</td> |
152 </tr> |
150 </tr> |
153 </table> |
151 </table> |
|
152 |
154 <h3>Static Methods</h3> |
153 <h3>Static Methods</h3> |
155 |
|
156 <table> |
154 <table> |
157 <tr><td>None</td></tr> |
155 <tr><td>None</td></tr> |
158 </table> |
156 </table> |
|
157 |
159 |
158 |
160 <a NAME="TimeTrackEntry.__init__" ID="TimeTrackEntry.__init__"></a> |
159 <a NAME="TimeTrackEntry.__init__" ID="TimeTrackEntry.__init__"></a> |
161 <h4>TimeTrackEntry (Constructor)</h4> |
160 <h4>TimeTrackEntry (Constructor)</h4> |
162 <b>TimeTrackEntry</b>(<i>plugin</i>) |
161 <b>TimeTrackEntry</b>(<i>plugin</i>) |
163 |
|
164 <p> |
162 <p> |
165 Constructor |
163 Constructor |
166 </p> |
164 </p> |
|
165 |
167 <dl> |
166 <dl> |
168 |
167 |
169 <dt><i>plugin</i> (TimeTrackerPlugin)</dt> |
168 <dt><i>plugin</i> (TimeTrackerPlugin)</dt> |
170 <dd> |
169 <dd> |
171 reference to the plugin object |
170 reference to the plugin object |
172 </dd> |
171 </dd> |
173 </dl> |
172 </dl> |
174 <a NAME="TimeTrackEntry.__calculateDuration" ID="TimeTrackEntry.__calculateDuration"></a> |
173 <a NAME="TimeTrackEntry.__calculateDuration" ID="TimeTrackEntry.__calculateDuration"></a> |
175 <h4>TimeTrackEntry.__calculateDuration</h4> |
174 <h4>TimeTrackEntry.__calculateDuration</h4> |
176 <b>__calculateDuration</b>(<i>start, stop</i>) |
175 <b>__calculateDuration</b>(<i>start, stop</i>) |
177 |
|
178 <p> |
176 <p> |
179 Private method to calculate the duration in minutes. |
177 Private method to calculate the duration in minutes. |
180 </p> |
178 </p> |
|
179 |
181 <dl> |
180 <dl> |
182 |
181 |
183 <dt><i>start</i> (QDateTime)</dt> |
182 <dt><i>start</i> (QDateTime)</dt> |
184 <dd> |
183 <dd> |
185 start date and time |
184 start date and time |
262 </dd> |
261 </dd> |
263 </dl> |
262 </dl> |
264 <a NAME="TimeTrackEntry.continue_" ID="TimeTrackEntry.continue_"></a> |
263 <a NAME="TimeTrackEntry.continue_" ID="TimeTrackEntry.continue_"></a> |
265 <h4>TimeTrackEntry.continue_</h4> |
264 <h4>TimeTrackEntry.continue_</h4> |
266 <b>continue_</b>(<i></i>) |
265 <b>continue_</b>(<i></i>) |
267 |
|
268 <p> |
266 <p> |
269 Public method to continue the entry. |
267 Public method to continue the entry. |
270 </p> |
268 </p> |
|
269 |
271 <a NAME="TimeTrackEntry.fromDict" ID="TimeTrackEntry.fromDict"></a> |
270 <a NAME="TimeTrackEntry.fromDict" ID="TimeTrackEntry.fromDict"></a> |
272 <h4>TimeTrackEntry.fromDict</h4> |
271 <h4>TimeTrackEntry.fromDict</h4> |
273 <b>fromDict</b>(<i>data</i>) |
272 <b>fromDict</b>(<i>data</i>) |
274 |
|
275 <p> |
273 <p> |
276 Public method to populate the time track entry from a dictionary. |
274 Public method to populate the time track entry from a dictionary. |
277 </p> |
275 </p> |
|
276 |
278 <dl> |
277 <dl> |
279 |
278 |
280 <dt><i>data</i> (dict)</dt> |
279 <dt><i>data</i> (dict)</dt> |
281 <dd> |
280 <dd> |
282 dictionary containing the time track entry data |
281 dictionary containing the time track entry data |
333 </dd> |
332 </dd> |
334 </dl> |
333 </dl> |
335 <a NAME="TimeTrackEntry.getEntryData" ID="TimeTrackEntry.getEntryData"></a> |
334 <a NAME="TimeTrackEntry.getEntryData" ID="TimeTrackEntry.getEntryData"></a> |
336 <h4>TimeTrackEntry.getEntryData</h4> |
335 <h4>TimeTrackEntry.getEntryData</h4> |
337 <b>getEntryData</b>(<i></i>) |
336 <b>getEntryData</b>(<i></i>) |
338 |
|
339 <p> |
337 <p> |
340 Public method to get the entry data. |
338 Public method to get the entry data. |
341 </p> |
339 </p> |
|
340 |
342 <dl> |
341 <dl> |
343 <dt>Return:</dt> |
342 <dt>Return:</dt> |
344 <dd> |
343 <dd> |
345 entry data as a dictionary with keys 'id', 'paused', |
344 entry data as a dictionary with keys 'id', 'paused', |
346 'start_date', 'start_time', 'duration', 'task' and 'comment' |
345 'start_date', 'start_time', 'duration', 'task' and 'comment' |
451 </dd> |
450 </dd> |
452 </dl> |
451 </dl> |
453 <a NAME="TimeTrackEntry.pause" ID="TimeTrackEntry.pause"></a> |
452 <a NAME="TimeTrackEntry.pause" ID="TimeTrackEntry.pause"></a> |
454 <h4>TimeTrackEntry.pause</h4> |
453 <h4>TimeTrackEntry.pause</h4> |
455 <b>pause</b>(<i></i>) |
454 <b>pause</b>(<i></i>) |
456 |
|
457 <p> |
455 <p> |
458 Public method to pause the entry. |
456 Public method to pause the entry. |
459 </p> |
457 </p> |
|
458 |
460 <a NAME="TimeTrackEntry.setComment" ID="TimeTrackEntry.setComment"></a> |
459 <a NAME="TimeTrackEntry.setComment" ID="TimeTrackEntry.setComment"></a> |
461 <h4>TimeTrackEntry.setComment</h4> |
460 <h4>TimeTrackEntry.setComment</h4> |
462 <b>setComment</b>(<i>comment</i>) |
461 <b>setComment</b>(<i>comment</i>) |
463 |
|
464 <p> |
462 <p> |
465 Public method to set a comment. |
463 Public method to set a comment. |
466 </p> |
464 </p> |
|
465 |
467 <dl> |
466 <dl> |
468 |
467 |
469 <dt><i>comment</i> (str)</dt> |
468 <dt><i>comment</i> (str)</dt> |
470 <dd> |
469 <dd> |
471 comment to set |
470 comment to set |
472 </dd> |
471 </dd> |
473 </dl> |
472 </dl> |
474 <a NAME="TimeTrackEntry.setDuration" ID="TimeTrackEntry.setDuration"></a> |
473 <a NAME="TimeTrackEntry.setDuration" ID="TimeTrackEntry.setDuration"></a> |
475 <h4>TimeTrackEntry.setDuration</h4> |
474 <h4>TimeTrackEntry.setDuration</h4> |
476 <b>setDuration</b>(<i>duration</i>) |
475 <b>setDuration</b>(<i>duration</i>) |
477 |
|
478 <p> |
476 <p> |
479 Public method to set the duration. |
477 Public method to set the duration. |
480 </p> |
478 </p> |
|
479 |
481 <dl> |
480 <dl> |
482 |
481 |
483 <dt><i>duration</i> (int)</dt> |
482 <dt><i>duration</i> (int)</dt> |
484 <dd> |
483 <dd> |
485 duration in minutes |
484 duration in minutes |
486 </dd> |
485 </dd> |
487 </dl> |
486 </dl> |
488 <a NAME="TimeTrackEntry.setID" ID="TimeTrackEntry.setID"></a> |
487 <a NAME="TimeTrackEntry.setID" ID="TimeTrackEntry.setID"></a> |
489 <h4>TimeTrackEntry.setID</h4> |
488 <h4>TimeTrackEntry.setID</h4> |
490 <b>setID</b>(<i>eid</i>) |
489 <b>setID</b>(<i>eid</i>) |
491 |
|
492 <p> |
490 <p> |
493 Public method to assign an ID to the entry. |
491 Public method to assign an ID to the entry. |
494 </p> |
492 </p> |
|
493 |
495 <dl> |
494 <dl> |
496 |
495 |
497 <dt><i>eid</i> (int)</dt> |
496 <dt><i>eid</i> (int)</dt> |
498 <dd> |
497 <dd> |
499 ID for the entry |
498 ID for the entry |
500 </dd> |
499 </dd> |
501 </dl> |
500 </dl> |
502 <a NAME="TimeTrackEntry.setStartDateTime" ID="TimeTrackEntry.setStartDateTime"></a> |
501 <a NAME="TimeTrackEntry.setStartDateTime" ID="TimeTrackEntry.setStartDateTime"></a> |
503 <h4>TimeTrackEntry.setStartDateTime</h4> |
502 <h4>TimeTrackEntry.setStartDateTime</h4> |
504 <b>setStartDateTime</b>(<i>startDateTime</i>) |
503 <b>setStartDateTime</b>(<i>startDateTime</i>) |
505 |
|
506 <p> |
504 <p> |
507 Public method to set the start date and time. |
505 Public method to set the start date and time. |
508 </p> |
506 </p> |
|
507 |
509 <dl> |
508 <dl> |
510 |
509 |
511 <dt><i>startDateTime</i> (QDateTime)</dt> |
510 <dt><i>startDateTime</i> (QDateTime)</dt> |
512 <dd> |
511 <dd> |
513 start date and time |
512 start date and time |
514 </dd> |
513 </dd> |
515 </dl> |
514 </dl> |
516 <a NAME="TimeTrackEntry.setTask" ID="TimeTrackEntry.setTask"></a> |
515 <a NAME="TimeTrackEntry.setTask" ID="TimeTrackEntry.setTask"></a> |
517 <h4>TimeTrackEntry.setTask</h4> |
516 <h4>TimeTrackEntry.setTask</h4> |
518 <b>setTask</b>(<i>description</i>) |
517 <b>setTask</b>(<i>description</i>) |
519 |
|
520 <p> |
518 <p> |
521 Public method to set the task description. |
519 Public method to set the task description. |
522 </p> |
520 </p> |
|
521 |
523 <dl> |
522 <dl> |
524 |
523 |
525 <dt><i>description</i> (str)</dt> |
524 <dt><i>description</i> (str)</dt> |
526 <dd> |
525 <dd> |
527 task description |
526 task description |
528 </dd> |
527 </dd> |
529 </dl> |
528 </dl> |
530 <a NAME="TimeTrackEntry.start" ID="TimeTrackEntry.start"></a> |
529 <a NAME="TimeTrackEntry.start" ID="TimeTrackEntry.start"></a> |
531 <h4>TimeTrackEntry.start</h4> |
530 <h4>TimeTrackEntry.start</h4> |
532 <b>start</b>(<i></i>) |
531 <b>start</b>(<i></i>) |
533 |
|
534 <p> |
532 <p> |
535 Public method to set the start time of this entry. |
533 Public method to set the start time of this entry. |
536 </p> |
534 </p> |
|
535 |
537 <a NAME="TimeTrackEntry.stop" ID="TimeTrackEntry.stop"></a> |
536 <a NAME="TimeTrackEntry.stop" ID="TimeTrackEntry.stop"></a> |
538 <h4>TimeTrackEntry.stop</h4> |
537 <h4>TimeTrackEntry.stop</h4> |
539 <b>stop</b>(<i></i>) |
538 <b>stop</b>(<i></i>) |
540 |
|
541 <p> |
539 <p> |
542 Public method to stop this entry. |
540 Public method to stop this entry. |
543 </p> |
541 </p> |
|
542 |
544 <a NAME="TimeTrackEntry.toDict" ID="TimeTrackEntry.toDict"></a> |
543 <a NAME="TimeTrackEntry.toDict" ID="TimeTrackEntry.toDict"></a> |
545 <h4>TimeTrackEntry.toDict</h4> |
544 <h4>TimeTrackEntry.toDict</h4> |
546 <b>toDict</b>(<i></i>) |
545 <b>toDict</b>(<i></i>) |
547 |
|
548 <p> |
546 <p> |
549 Public method to convert the time track entry into a dictionary. |
547 Public method to convert the time track entry into a dictionary. |
550 </p> |
548 </p> |
|
549 |
551 <dl> |
550 <dl> |
552 <dt>Return:</dt> |
551 <dt>Return:</dt> |
553 <dd> |
552 <dd> |
554 dictionary containing the time track entry data |
553 dictionary containing the time track entry data |
555 </dd> |
554 </dd> |