TimeTracker/Documentation/source/Plugin_Time_Tracker.TimeTracker.TimeTrackEntry.html

branch
eric7
changeset 98
693e42176007
parent 95
7449695cf655
child 106
6deb942739dc
equal deleted inserted replaced
97:44ec4168b442 98:693e42176007
91 <tr> 91 <tr>
92 <td><a href="#TimeTrackEntry.continue_">continue_</a></td> 92 <td><a href="#TimeTrackEntry.continue_">continue_</a></td>
93 <td>Public method to continue the entry.</td> 93 <td>Public method to continue the entry.</td>
94 </tr> 94 </tr>
95 <tr> 95 <tr>
96 <td><a href="#TimeTrackEntry.fromString">fromString</a></td> 96 <td><a href="#TimeTrackEntry.fromDict">fromDict</a></td>
97 <td>Public method to populate the entry from the given string.</td> 97 <td>Public method to populate the time track entry from a dictionary.</td>
98 </tr> 98 </tr>
99 <tr> 99 <tr>
100 <td><a href="#TimeTrackEntry.getComment">getComment</a></td> 100 <td><a href="#TimeTrackEntry.getComment">getComment</a></td>
101 <td>Public method to get the comment.</td> 101 <td>Public method to get the comment.</td>
102 </tr> 102 </tr>
159 <tr> 159 <tr>
160 <td><a href="#TimeTrackEntry.stop">stop</a></td> 160 <td><a href="#TimeTrackEntry.stop">stop</a></td>
161 <td>Public method to stop this entry.</td> 161 <td>Public method to stop this entry.</td>
162 </tr> 162 </tr>
163 <tr> 163 <tr>
164 <td><a href="#TimeTrackEntry.toString">toString</a></td> 164 <td><a href="#TimeTrackEntry.toDict">toDict</a></td>
165 <td>Public method to get a string representation of the entry.</td> 165 <td>Public method to convert the time track entry into a dictionary.</td>
166 </tr> 166 </tr>
167 </table> 167 </table>
168 <h3>Static Methods</h3> 168 <h3>Static Methods</h3>
169 169
170 <table> 170 <table>
178 <p> 178 <p>
179 Constructor 179 Constructor
180 </p> 180 </p>
181 <dl> 181 <dl>
182 182
183 <dt><i>plugin</i></dt> 183 <dt><i>plugin</i> (TimeTrackerPlugin)</dt>
184 <dd> 184 <dd>
185 reference to the plugin object (TimeTrackerPlugin) 185 reference to the plugin object
186 </dd> 186 </dd>
187 </dl> 187 </dl>
188 <a NAME="TimeTrackEntry.__calculateDuration" ID="TimeTrackEntry.__calculateDuration"></a> 188 <a NAME="TimeTrackEntry.__calculateDuration" ID="TimeTrackEntry.__calculateDuration"></a>
189 <h4>TimeTrackEntry.__calculateDuration</h4> 189 <h4>TimeTrackEntry.__calculateDuration</h4>
190 <b>__calculateDuration</b>(<i>start, stop</i>) 190 <b>__calculateDuration</b>(<i>start, stop</i>)
192 <p> 192 <p>
193 Private method to calculate the duration in minutes. 193 Private method to calculate the duration in minutes.
194 </p> 194 </p>
195 <dl> 195 <dl>
196 196
197 <dt><i>start</i></dt> 197 <dt><i>start</i> (QDateTime)</dt>
198 <dd> 198 <dd>
199 start date and time (QDateTime) 199 start date and time
200 </dd> 200 </dd>
201 <dt><i>stop</i></dt> 201 <dt><i>stop</i> (QDateTime)</dt>
202 <dd> 202 <dd>
203 end date and time (QDateTime) 203 end date and time
204 </dd> 204 </dd>
205 </dl> 205 </dl>
206 <dl> 206 <dl>
207 <dt>Return:</dt> 207 <dt>Return:</dt>
208 <dd> 208 <dd>
209 duration in minutes (int) 209 duration in minutes
210 </dd>
211 </dl>
212 <dl>
213 <dt>Return Type:</dt>
214 <dd>
215 int
210 </dd> 216 </dd>
211 </dl> 217 </dl>
212 <a NAME="TimeTrackEntry.__currentDateTime" ID="TimeTrackEntry.__currentDateTime"></a> 218 <a NAME="TimeTrackEntry.__currentDateTime" ID="TimeTrackEntry.__currentDateTime"></a>
213 <h4>TimeTrackEntry.__currentDateTime</h4> 219 <h4>TimeTrackEntry.__currentDateTime</h4>
214 <b>__currentDateTime</b>(<i></i>) 220 <b>__currentDateTime</b>(<i></i>)
217 Private method to get the current date and time without milliseconds. 223 Private method to get the current date and time without milliseconds.
218 </p> 224 </p>
219 <dl> 225 <dl>
220 <dt>Return:</dt> 226 <dt>Return:</dt>
221 <dd> 227 <dd>
222 current date and time (QDateTime) 228 current date and time
229 </dd>
230 </dl>
231 <dl>
232 <dt>Return Type:</dt>
233 <dd>
234 QDateTime
223 </dd> 235 </dd>
224 </dl> 236 </dl>
225 <a NAME="TimeTrackEntry.__lt__" ID="TimeTrackEntry.__lt__"></a> 237 <a NAME="TimeTrackEntry.__lt__" ID="TimeTrackEntry.__lt__"></a>
226 <h4>TimeTrackEntry.__lt__</h4> 238 <h4>TimeTrackEntry.__lt__</h4>
227 <b>__lt__</b>(<i>other</i>) 239 <b>__lt__</b>(<i>other</i>)
229 <p> 241 <p>
230 Special method implementing the less than function. 242 Special method implementing the less than function.
231 </p> 243 </p>
232 <dl> 244 <dl>
233 245
234 <dt><i>other</i></dt> 246 <dt><i>other</i> (TimeTrackEntry)</dt>
235 <dd> 247 <dd>
236 reference to the other object (TimeTrackEntry) 248 reference to the other object
237 </dd> 249 </dd>
238 </dl> 250 </dl>
239 <dl> 251 <dl>
240 <dt>Return:</dt> 252 <dt>Return:</dt>
241 <dd> 253 <dd>
242 flag indicating that self is less than other (boolean) 254 flag indicating that self is less than other
255 </dd>
256 </dl>
257 <dl>
258 <dt>Return Type:</dt>
259 <dd>
260 bool
243 </dd> 261 </dd>
244 </dl> 262 </dl>
245 <a NAME="TimeTrackEntry.addDuration" ID="TimeTrackEntry.addDuration"></a> 263 <a NAME="TimeTrackEntry.addDuration" ID="TimeTrackEntry.addDuration"></a>
246 <h4>TimeTrackEntry.addDuration</h4> 264 <h4>TimeTrackEntry.addDuration</h4>
247 <b>addDuration</b>(<i>duration</i>) 265 <b>addDuration</b>(<i>duration</i>)
249 <p> 267 <p>
250 Public method to add a duration. 268 Public method to add a duration.
251 </p> 269 </p>
252 <dl> 270 <dl>
253 271
254 <dt><i>duration</i></dt> 272 <dt><i>duration</i> (int)</dt>
255 <dd> 273 <dd>
256 duration to be added in minutes (integer). Negative 274 duration to be added in minutes. Negative values are
257 values are ignored. 275 ignored.
258 </dd> 276 </dd>
259 </dl> 277 </dl>
260 <a NAME="TimeTrackEntry.continue_" ID="TimeTrackEntry.continue_"></a> 278 <a NAME="TimeTrackEntry.continue_" ID="TimeTrackEntry.continue_"></a>
261 <h4>TimeTrackEntry.continue_</h4> 279 <h4>TimeTrackEntry.continue_</h4>
262 <b>continue_</b>(<i></i>) 280 <b>continue_</b>(<i></i>)
263 281
264 <p> 282 <p>
265 Public method to continue the entry. 283 Public method to continue the entry.
266 </p> 284 </p>
267 <a NAME="TimeTrackEntry.fromString" ID="TimeTrackEntry.fromString"></a> 285 <a NAME="TimeTrackEntry.fromDict" ID="TimeTrackEntry.fromDict"></a>
268 <h4>TimeTrackEntry.fromString</h4> 286 <h4>TimeTrackEntry.fromDict</h4>
269 <b>fromString</b>(<i>line</i>) 287 <b>fromDict</b>(<i>data</i>)
270 288
271 <p> 289 <p>
272 Public method to populate the entry from the given string. 290 Public method to populate the time track entry from a dictionary.
273 </p> 291 </p>
274 <dl> 292 <dl>
275 293
276 <dt><i>line</i></dt> 294 <dt><i>data</i> (dict)</dt>
277 <dd> 295 <dd>
278 stringified entry data as generated by toString() (string) 296 dictionary containing the time track entry data
279 </dd> 297 </dd>
280 </dl> 298 </dl>
281 <dl> 299 <dl>
282 <dt>Return:</dt> 300 <dt>Return:</dt>
283 <dd> 301 <dd>
284 ID of the tracker entry; -1 indicates an error (integer) 302 ID of the tracker entry; -1 indicates an error
303 </dd>
304 </dl>
305 <dl>
306 <dt>Return Type:</dt>
307 <dd>
308 int
285 </dd> 309 </dd>
286 </dl> 310 </dl>
287 <a NAME="TimeTrackEntry.getComment" ID="TimeTrackEntry.getComment"></a> 311 <a NAME="TimeTrackEntry.getComment" ID="TimeTrackEntry.getComment"></a>
288 <h4>TimeTrackEntry.getComment</h4> 312 <h4>TimeTrackEntry.getComment</h4>
289 <b>getComment</b>(<i></i>) 313 <b>getComment</b>(<i></i>)
292 Public method to get the comment. 316 Public method to get the comment.
293 </p> 317 </p>
294 <dl> 318 <dl>
295 <dt>Return:</dt> 319 <dt>Return:</dt>
296 <dd> 320 <dd>
297 comment (string) 321 comment
322 </dd>
323 </dl>
324 <dl>
325 <dt>Return Type:</dt>
326 <dd>
327 str
298 </dd> 328 </dd>
299 </dl> 329 </dl>
300 <a NAME="TimeTrackEntry.getDuration" ID="TimeTrackEntry.getDuration"></a> 330 <a NAME="TimeTrackEntry.getDuration" ID="TimeTrackEntry.getDuration"></a>
301 <h4>TimeTrackEntry.getDuration</h4> 331 <h4>TimeTrackEntry.getDuration</h4>
302 <b>getDuration</b>(<i></i>) 332 <b>getDuration</b>(<i></i>)
305 Public slot to get the duration. 335 Public slot to get the duration.
306 </p> 336 </p>
307 <dl> 337 <dl>
308 <dt>Return:</dt> 338 <dt>Return:</dt>
309 <dd> 339 <dd>
310 duration (integer) 340 duration
341 </dd>
342 </dl>
343 <dl>
344 <dt>Return Type:</dt>
345 <dd>
346 int
311 </dd> 347 </dd>
312 </dl> 348 </dl>
313 <a NAME="TimeTrackEntry.getEntryData" ID="TimeTrackEntry.getEntryData"></a> 349 <a NAME="TimeTrackEntry.getEntryData" ID="TimeTrackEntry.getEntryData"></a>
314 <h4>TimeTrackEntry.getEntryData</h4> 350 <h4>TimeTrackEntry.getEntryData</h4>
315 <b>getEntryData</b>(<i></i>) 351 <b>getEntryData</b>(<i></i>)
318 Public method to get the entry data. 354 Public method to get the entry data.
319 </p> 355 </p>
320 <dl> 356 <dl>
321 <dt>Return:</dt> 357 <dt>Return:</dt>
322 <dd> 358 <dd>
323 entry data as a tuple of start date (string), start time 359 entry data as a dictionary with keys 'id', 'paused',
324 (string), duration (integer), task (string), comment (string) 360 'start_date', 'start_time', 'duration', 'task' and 'comment'
325 and flag indicating a paused state (boolean) 361 containing the entry ID, a flag indicating a paused
362 state, the start date as a string, the start time as a string,
363 the duration, the task and a comment
364 </dd>
365 </dl>
366 <dl>
367 <dt>Return Type:</dt>
368 <dd>
369 dict
326 </dd> 370 </dd>
327 </dl> 371 </dl>
328 <a NAME="TimeTrackEntry.getID" ID="TimeTrackEntry.getID"></a> 372 <a NAME="TimeTrackEntry.getID" ID="TimeTrackEntry.getID"></a>
329 <h4>TimeTrackEntry.getID</h4> 373 <h4>TimeTrackEntry.getID</h4>
330 <b>getID</b>(<i></i>) 374 <b>getID</b>(<i></i>)
333 Public method to get the ID of the entry. 377 Public method to get the ID of the entry.
334 </p> 378 </p>
335 <dl> 379 <dl>
336 <dt>Return:</dt> 380 <dt>Return:</dt>
337 <dd> 381 <dd>
338 ID of the entry (integer) 382 ID of the entry
383 </dd>
384 </dl>
385 <dl>
386 <dt>Return Type:</dt>
387 <dd>
388 int
339 </dd> 389 </dd>
340 </dl> 390 </dl>
341 <a NAME="TimeTrackEntry.getStartDateTime" ID="TimeTrackEntry.getStartDateTime"></a> 391 <a NAME="TimeTrackEntry.getStartDateTime" ID="TimeTrackEntry.getStartDateTime"></a>
342 <h4>TimeTrackEntry.getStartDateTime</h4> 392 <h4>TimeTrackEntry.getStartDateTime</h4>
343 <b>getStartDateTime</b>(<i></i>) 393 <b>getStartDateTime</b>(<i></i>)
346 Public method to get the start date and time. 396 Public method to get the start date and time.
347 </p> 397 </p>
348 <dl> 398 <dl>
349 <dt>Return:</dt> 399 <dt>Return:</dt>
350 <dd> 400 <dd>
351 start date and time (QDateTime) 401 start date and time
402 </dd>
403 </dl>
404 <dl>
405 <dt>Return Type:</dt>
406 <dd>
407 QDateTime
352 </dd> 408 </dd>
353 </dl> 409 </dl>
354 <a NAME="TimeTrackEntry.getTask" ID="TimeTrackEntry.getTask"></a> 410 <a NAME="TimeTrackEntry.getTask" ID="TimeTrackEntry.getTask"></a>
355 <h4>TimeTrackEntry.getTask</h4> 411 <h4>TimeTrackEntry.getTask</h4>
356 <b>getTask</b>(<i></i>) 412 <b>getTask</b>(<i></i>)
359 Public method to get the task description. 415 Public method to get the task description.
360 </p> 416 </p>
361 <dl> 417 <dl>
362 <dt>Return:</dt> 418 <dt>Return:</dt>
363 <dd> 419 <dd>
364 task description (string) 420 task description
421 </dd>
422 </dl>
423 <dl>
424 <dt>Return Type:</dt>
425 <dd>
426 str
365 </dd> 427 </dd>
366 </dl> 428 </dl>
367 <a NAME="TimeTrackEntry.isPaused" ID="TimeTrackEntry.isPaused"></a> 429 <a NAME="TimeTrackEntry.isPaused" ID="TimeTrackEntry.isPaused"></a>
368 <h4>TimeTrackEntry.isPaused</h4> 430 <h4>TimeTrackEntry.isPaused</h4>
369 <b>isPaused</b>(<i></i>) 431 <b>isPaused</b>(<i></i>)
372 Public method to check for a paused state. 434 Public method to check for a paused state.
373 </p> 435 </p>
374 <dl> 436 <dl>
375 <dt>Return:</dt> 437 <dt>Return:</dt>
376 <dd> 438 <dd>
377 flag indicating a paused state (boolean) 439 flag indicating a paused state
440 </dd>
441 </dl>
442 <dl>
443 <dt>Return Type:</dt>
444 <dd>
445 bool
378 </dd> 446 </dd>
379 </dl> 447 </dl>
380 <a NAME="TimeTrackEntry.isValid" ID="TimeTrackEntry.isValid"></a> 448 <a NAME="TimeTrackEntry.isValid" ID="TimeTrackEntry.isValid"></a>
381 <h4>TimeTrackEntry.isValid</h4> 449 <h4>TimeTrackEntry.isValid</h4>
382 <b>isValid</b>(<i></i>) 450 <b>isValid</b>(<i></i>)
385 Public method to check the validity of the entry. 453 Public method to check the validity of the entry.
386 </p> 454 </p>
387 <dl> 455 <dl>
388 <dt>Return:</dt> 456 <dt>Return:</dt>
389 <dd> 457 <dd>
390 validity of the entry (boolean) 458 validity of the entry
459 </dd>
460 </dl>
461 <dl>
462 <dt>Return Type:</dt>
463 <dd>
464 bool
391 </dd> 465 </dd>
392 </dl> 466 </dl>
393 <a NAME="TimeTrackEntry.pause" ID="TimeTrackEntry.pause"></a> 467 <a NAME="TimeTrackEntry.pause" ID="TimeTrackEntry.pause"></a>
394 <h4>TimeTrackEntry.pause</h4> 468 <h4>TimeTrackEntry.pause</h4>
395 <b>pause</b>(<i></i>) 469 <b>pause</b>(<i></i>)
404 <p> 478 <p>
405 Public method to set a comment. 479 Public method to set a comment.
406 </p> 480 </p>
407 <dl> 481 <dl>
408 482
409 <dt><i>comment</i></dt> 483 <dt><i>comment</i> (str)</dt>
410 <dd> 484 <dd>
411 comment to set (string) 485 comment to set
412 </dd> 486 </dd>
413 </dl> 487 </dl>
414 <a NAME="TimeTrackEntry.setDuration" ID="TimeTrackEntry.setDuration"></a> 488 <a NAME="TimeTrackEntry.setDuration" ID="TimeTrackEntry.setDuration"></a>
415 <h4>TimeTrackEntry.setDuration</h4> 489 <h4>TimeTrackEntry.setDuration</h4>
416 <b>setDuration</b>(<i>duration</i>) 490 <b>setDuration</b>(<i>duration</i>)
418 <p> 492 <p>
419 Public method to set the duration. 493 Public method to set the duration.
420 </p> 494 </p>
421 <dl> 495 <dl>
422 496
423 <dt><i>duration</i></dt> 497 <dt><i>duration</i> (int)</dt>
424 <dd> 498 <dd>
425 duration in minutes (integer) 499 duration in minutes
426 </dd> 500 </dd>
427 </dl> 501 </dl>
428 <a NAME="TimeTrackEntry.setID" ID="TimeTrackEntry.setID"></a> 502 <a NAME="TimeTrackEntry.setID" ID="TimeTrackEntry.setID"></a>
429 <h4>TimeTrackEntry.setID</h4> 503 <h4>TimeTrackEntry.setID</h4>
430 <b>setID</b>(<i>eid</i>) 504 <b>setID</b>(<i>eid</i>)
432 <p> 506 <p>
433 Public method to assign an ID to the entry. 507 Public method to assign an ID to the entry.
434 </p> 508 </p>
435 <dl> 509 <dl>
436 510
437 <dt><i>eid</i></dt> 511 <dt><i>eid</i> (int)</dt>
438 <dd> 512 <dd>
439 ID for the entry (integer) 513 ID for the entry
440 </dd> 514 </dd>
441 </dl> 515 </dl>
442 <a NAME="TimeTrackEntry.setStartDateTime" ID="TimeTrackEntry.setStartDateTime"></a> 516 <a NAME="TimeTrackEntry.setStartDateTime" ID="TimeTrackEntry.setStartDateTime"></a>
443 <h4>TimeTrackEntry.setStartDateTime</h4> 517 <h4>TimeTrackEntry.setStartDateTime</h4>
444 <b>setStartDateTime</b>(<i>startDateTime</i>) 518 <b>setStartDateTime</b>(<i>startDateTime</i>)
446 <p> 520 <p>
447 Public method to set the start date and time. 521 Public method to set the start date and time.
448 </p> 522 </p>
449 <dl> 523 <dl>
450 524
451 <dt><i>startDateTime</i></dt> 525 <dt><i>startDateTime</i> (QDateTime)</dt>
452 <dd> 526 <dd>
453 start date and time (QDateTime) 527 start date and time
454 </dd> 528 </dd>
455 </dl> 529 </dl>
456 <a NAME="TimeTrackEntry.setTask" ID="TimeTrackEntry.setTask"></a> 530 <a NAME="TimeTrackEntry.setTask" ID="TimeTrackEntry.setTask"></a>
457 <h4>TimeTrackEntry.setTask</h4> 531 <h4>TimeTrackEntry.setTask</h4>
458 <b>setTask</b>(<i>description</i>) 532 <b>setTask</b>(<i>description</i>)
460 <p> 534 <p>
461 Public method to set the task description. 535 Public method to set the task description.
462 </p> 536 </p>
463 <dl> 537 <dl>
464 538
465 <dt><i>description</i></dt> 539 <dt><i>description</i> (str)</dt>
466 <dd> 540 <dd>
467 task description (string) 541 task description
468 </dd> 542 </dd>
469 </dl> 543 </dl>
470 <a NAME="TimeTrackEntry.start" ID="TimeTrackEntry.start"></a> 544 <a NAME="TimeTrackEntry.start" ID="TimeTrackEntry.start"></a>
471 <h4>TimeTrackEntry.start</h4> 545 <h4>TimeTrackEntry.start</h4>
472 <b>start</b>(<i></i>) 546 <b>start</b>(<i></i>)
479 <b>stop</b>(<i></i>) 553 <b>stop</b>(<i></i>)
480 554
481 <p> 555 <p>
482 Public method to stop this entry. 556 Public method to stop this entry.
483 </p> 557 </p>
484 <a NAME="TimeTrackEntry.toString" ID="TimeTrackEntry.toString"></a> 558 <a NAME="TimeTrackEntry.toDict" ID="TimeTrackEntry.toDict"></a>
485 <h4>TimeTrackEntry.toString</h4> 559 <h4>TimeTrackEntry.toDict</h4>
486 <b>toString</b>(<i></i>) 560 <b>toDict</b>(<i></i>)
487 561
488 <p> 562 <p>
489 Public method to get a string representation of the entry. 563 Public method to convert the time track entry into a dictionary.
490 </p> 564 </p>
491 <dl> 565 <dl>
492 <dt>Return:</dt> 566 <dt>Return:</dt>
493 <dd> 567 <dd>
494 string representation of the entry (string) 568 dictionary containing the time track entry data
569 </dd>
570 </dl>
571 <dl>
572 <dt>Return Type:</dt>
573 <dd>
574 dict
495 </dd> 575 </dd>
496 </dl> 576 </dl>
497 <div align="right"><a href="#top">Up</a></div> 577 <div align="right"><a href="#top">Up</a></div>
498 <hr /> 578 <hr />
499 </body></html> 579 </body></html>

eric ide

mercurial