author | zecke <zecke> | 2002-09-21 11:06:13 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-21 11:06:13 (UTC) |
commit | 90b5f15ac863d5eb833d2d9e832b43d05c4079a4 (patch) (unidiff) | |
tree | 7ef87033f2e204d29090f0fe40b9ae0c296a1b5f | |
parent | 51f94f502b2b9a92d562a3ad726ad58372860c5e (diff) | |
download | opie-90b5f15ac863d5eb833d2d9e832b43d05c4079a4.zip opie-90b5f15ac863d5eb833d2d9e832b43d05c4079a4.tar.gz opie-90b5f15ac863d5eb833d2d9e832b43d05c4079a4.tar.bz2 |
Make end inline again
-rw-r--r-- | library/backend/event.cpp | 5 | ||||
-rw-r--r-- | library/backend/event.h | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/library/backend/event.cpp b/library/backend/event.cpp index 8f3f780..7cac314 100644 --- a/library/backend/event.cpp +++ b/library/backend/event.cpp | |||
@@ -460,277 +460,280 @@ void Event::setRepeat( const RepeatPattern &p ) | |||
460 | } | 460 | } |
461 | 461 | ||
462 | /*! | 462 | /*! |
463 | Sets the description of the event to \a s. | 463 | Sets the description of the event to \a s. |
464 | */ | 464 | */ |
465 | void Event::setDescription( const QString &s ) | 465 | void Event::setDescription( const QString &s ) |
466 | { | 466 | { |
467 | descript = s; | 467 | descript = s; |
468 | } | 468 | } |
469 | 469 | ||
470 | /*! | 470 | /*! |
471 | Sets the location of the event to \a s. | 471 | Sets the location of the event to \a s. |
472 | */ | 472 | */ |
473 | void Event::setLocation( const QString &s ) | 473 | void Event::setLocation( const QString &s ) |
474 | { | 474 | { |
475 | locat = s; | 475 | locat = s; |
476 | } | 476 | } |
477 | 477 | ||
478 | // void Event::setCategory( const QString &s ) | 478 | // void Event::setCategory( const QString &s ) |
479 | // { | 479 | // { |
480 | // categ = s; | 480 | // categ = s; |
481 | // } | 481 | // } |
482 | 482 | ||
483 | /*! | 483 | /*! |
484 | \internal | 484 | \internal |
485 | */ | 485 | */ |
486 | void Event::setType( Type t ) | 486 | void Event::setType( Type t ) |
487 | { | 487 | { |
488 | typ = t; | 488 | typ = t; |
489 | } | 489 | } |
490 | 490 | ||
491 | /*! | 491 | /*! |
492 | Sets the start date and time of the first or only occurance of this event | 492 | Sets the start date and time of the first or only occurance of this event |
493 | to the date and time \a d. \a d should be in local time. | 493 | to the date and time \a d. \a d should be in local time. |
494 | */ | 494 | */ |
495 | void Event::setStart( const QDateTime &d ) | 495 | void Event::setStart( const QDateTime &d ) |
496 | { | 496 | { |
497 | startUTC = TimeConversion::toUTC( d ); | 497 | startUTC = TimeConversion::toUTC( d ); |
498 | } | 498 | } |
499 | 499 | ||
500 | /*! | 500 | /*! |
501 | \internal | 501 | \internal |
502 | */ | 502 | */ |
503 | void Event::setStart( time_t time ) | 503 | void Event::setStart( time_t time ) |
504 | { | 504 | { |
505 | startUTC = time; | 505 | startUTC = time; |
506 | } | 506 | } |
507 | 507 | ||
508 | /*! | 508 | /*! |
509 | Sets the end date and time of the first or only occurance of this event | 509 | Sets the end date and time of the first or only occurance of this event |
510 | to the date and time \a d. \a d should be in local time. | 510 | to the date and time \a d. \a d should be in local time. |
511 | */ | 511 | */ |
512 | void Event::setEnd( const QDateTime &d ) | 512 | void Event::setEnd( const QDateTime &d ) |
513 | { | 513 | { |
514 | endUTC = TimeConversion::toUTC( d ); | 514 | endUTC = TimeConversion::toUTC( d ); |
515 | } | 515 | } |
516 | 516 | ||
517 | /*! | 517 | /*! |
518 | \internal | 518 | \internal |
519 | */ | 519 | */ |
520 | void Event::setEnd( time_t time ) | 520 | void Event::setEnd( time_t time ) |
521 | { | 521 | { |
522 | endUTC = time; | 522 | endUTC = time; |
523 | } | 523 | } |
524 | 524 | ||
525 | /*! | 525 | /*! |
526 | \internal | 526 | \internal |
527 | */ | 527 | */ |
528 | void Event::setTimeZone( const QString &z ) | 528 | void Event::setTimeZone( const QString &z ) |
529 | { | 529 | { |
530 | tz = z; | 530 | tz = z; |
531 | } | 531 | } |
532 | 532 | ||
533 | /*! | 533 | /*! |
534 | \internal | 534 | \internal |
535 | */ | 535 | */ |
536 | void Event::setAlarm( bool b, int minutes, SoundTypeChoice s ) | 536 | void Event::setAlarm( bool b, int minutes, SoundTypeChoice s ) |
537 | { | 537 | { |
538 | hAlarm = b; | 538 | hAlarm = b; |
539 | aMinutes = minutes; | 539 | aMinutes = minutes; |
540 | aSound = s; | 540 | aSound = s; |
541 | } | 541 | } |
542 | 542 | ||
543 | /*! | 543 | /*! |
544 | \internal | 544 | \internal |
545 | */ | 545 | */ |
546 | void Event::setRepeat( bool b, const RepeatPattern &p ) | 546 | void Event::setRepeat( bool b, const RepeatPattern &p ) |
547 | { | 547 | { |
548 | hRepeat = b; | 548 | hRepeat = b; |
549 | pattern = p; | 549 | pattern = p; |
550 | } | 550 | } |
551 | 551 | ||
552 | /*! | 552 | /*! |
553 | Sets the notes for the event to \a n. | 553 | Sets the notes for the event to \a n. |
554 | */ | 554 | */ |
555 | void Event::setNotes( const QString &n ) | 555 | void Event::setNotes( const QString &n ) |
556 | { | 556 | { |
557 | note = n; | 557 | note = n; |
558 | } | 558 | } |
559 | 559 | ||
560 | /*! | 560 | /*! |
561 | Returns the description of the event. | 561 | Returns the description of the event. |
562 | */ | 562 | */ |
563 | const QString &Event::description() const | 563 | const QString &Event::description() const |
564 | { | 564 | { |
565 | return descript; | 565 | return descript; |
566 | } | 566 | } |
567 | 567 | ||
568 | /*! | 568 | /*! |
569 | Returns the location of the event. | 569 | Returns the location of the event. |
570 | */ | 570 | */ |
571 | const QString &Event::location() const | 571 | const QString &Event::location() const |
572 | { | 572 | { |
573 | return locat; | 573 | return locat; |
574 | } | 574 | } |
575 | 575 | ||
576 | // QString Event::category() const | 576 | // QString Event::category() const |
577 | // { | 577 | // { |
578 | // return categ; | 578 | // return categ; |
579 | // } | 579 | // } |
580 | 580 | ||
581 | /*! | 581 | /*! |
582 | \internal | 582 | \internal |
583 | */ | 583 | */ |
584 | Event::Type Event::type() const | 584 | Event::Type Event::type() const |
585 | { | 585 | { |
586 | return typ; | 586 | return typ; |
587 | } | 587 | } |
588 | /* | ||
588 | QDateTime Event::start() const { | 589 | QDateTime Event::start() const { |
589 | return start( TRUE ); | 590 | return start( TRUE ); |
590 | } | 591 | } |
592 | */ | ||
591 | /*! | 593 | /*! |
592 | \internal | 594 | \internal |
593 | */ | 595 | */ |
594 | QDateTime Event::start( bool actual ) const | 596 | QDateTime Event::start( bool actual ) const |
595 | { | 597 | { |
596 | QDateTime dt = (startUTC > 0) ? TimeConversion::fromUTC( startUTC ) : QDateTime::currentDateTime(); | 598 | QDateTime dt = (startUTC > 0) ? TimeConversion::fromUTC( startUTC ) : QDateTime::currentDateTime(); |
597 | 599 | ||
598 | if ( actual && typ == AllDay ) { | 600 | if ( actual && typ == AllDay ) { |
599 | QTime t = dt.time(); | 601 | QTime t = dt.time(); |
600 | t.setHMS( 0, 0, 0 ); | 602 | t.setHMS( 0, 0, 0 ); |
601 | dt.setTime( t ); | 603 | dt.setTime( t ); |
602 | } | 604 | } |
603 | return dt; | 605 | return dt; |
604 | } | 606 | } |
605 | 607 | /* | |
606 | QDateTime Event::end() const { | 608 | QDateTime Event::end() const { |
607 | return end( TRUE ); | 609 | return end( TRUE ); |
608 | } | 610 | } |
611 | */ | ||
609 | /*! | 612 | /*! |
610 | \internal | 613 | \internal |
611 | */ | 614 | */ |
612 | QDateTime Event::end( bool actual ) const | 615 | QDateTime Event::end( bool actual ) const |
613 | { | 616 | { |
614 | QDateTime dt = (endUTC > 0) ? TimeConversion::fromUTC( endUTC ) : QDateTime::currentDateTime(); | 617 | QDateTime dt = (endUTC > 0) ? TimeConversion::fromUTC( endUTC ) : QDateTime::currentDateTime(); |
615 | 618 | ||
616 | if ( actual && typ == AllDay ) { | 619 | if ( actual && typ == AllDay ) { |
617 | QTime t = dt.time(); | 620 | QTime t = dt.time(); |
618 | t.setHMS( 23, 59, 59 ); | 621 | t.setHMS( 23, 59, 59 ); |
619 | dt.setTime( t ); | 622 | dt.setTime( t ); |
620 | } | 623 | } |
621 | return dt; | 624 | return dt; |
622 | } | 625 | } |
623 | 626 | ||
624 | /*! | 627 | /*! |
625 | \internal | 628 | \internal |
626 | */ | 629 | */ |
627 | const QString &Event::timeZone() const | 630 | const QString &Event::timeZone() const |
628 | { | 631 | { |
629 | return tz; | 632 | return tz; |
630 | } | 633 | } |
631 | 634 | ||
632 | /*! | 635 | /*! |
633 | \internal | 636 | \internal |
634 | */ | 637 | */ |
635 | bool Event::hasAlarm() const | 638 | bool Event::hasAlarm() const |
636 | { | 639 | { |
637 | return hAlarm; | 640 | return hAlarm; |
638 | } | 641 | } |
639 | 642 | ||
640 | /*! | 643 | /*! |
641 | \internal | 644 | \internal |
642 | */ | 645 | */ |
643 | int Event::alarmTime() const | 646 | int Event::alarmTime() const |
644 | { | 647 | { |
645 | return aMinutes; | 648 | return aMinutes; |
646 | } | 649 | } |
647 | 650 | ||
648 | /*! | 651 | /*! |
649 | Returns the sound type for the alarm of this event. | 652 | Returns the sound type for the alarm of this event. |
650 | */ | 653 | */ |
651 | Event::SoundTypeChoice Event::alarmSound() const | 654 | Event::SoundTypeChoice Event::alarmSound() const |
652 | { | 655 | { |
653 | return aSound; | 656 | return aSound; |
654 | } | 657 | } |
655 | 658 | ||
656 | /*! | 659 | /*! |
657 | \internal | 660 | \internal |
658 | */ | 661 | */ |
659 | bool Event::hasRepeat() const | 662 | bool Event::hasRepeat() const |
660 | { | 663 | { |
661 | return doRepeat(); | 664 | return doRepeat(); |
662 | } | 665 | } |
663 | 666 | ||
664 | /*! | 667 | /*! |
665 | \internal | 668 | \internal |
666 | */ | 669 | */ |
667 | const Event::RepeatPattern &Event::repeatPattern() const | 670 | const Event::RepeatPattern &Event::repeatPattern() const |
668 | { | 671 | { |
669 | return pattern; | 672 | return pattern; |
670 | } | 673 | } |
671 | 674 | ||
672 | /*! | 675 | /*! |
673 | \internal | 676 | \internal |
674 | */ | 677 | */ |
675 | Event::RepeatPattern &Event::repeatPattern() | 678 | Event::RepeatPattern &Event::repeatPattern() |
676 | { | 679 | { |
677 | return pattern; | 680 | return pattern; |
678 | } | 681 | } |
679 | 682 | ||
680 | /*! | 683 | /*! |
681 | Returns the notes for the event. | 684 | Returns the notes for the event. |
682 | */ | 685 | */ |
683 | const QString &Event::notes() const | 686 | const QString &Event::notes() const |
684 | { | 687 | { |
685 | return note; | 688 | return note; |
686 | } | 689 | } |
687 | 690 | ||
688 | /*! | 691 | /*! |
689 | \internal | 692 | \internal |
690 | */ | 693 | */ |
691 | bool Event::operator==( const Event &e ) const | 694 | bool Event::operator==( const Event &e ) const |
692 | { | 695 | { |
693 | if ( uid() && e.uid() == uid() ) | 696 | if ( uid() && e.uid() == uid() ) |
694 | return TRUE; | 697 | return TRUE; |
695 | return ( e.descript == descript && | 698 | return ( e.descript == descript && |
696 | e.locat == locat && | 699 | e.locat == locat && |
697 | e.categ == categ && | 700 | e.categ == categ && |
698 | e.typ == typ && | 701 | e.typ == typ && |
699 | e.startUTC == startUTC && | 702 | e.startUTC == startUTC && |
700 | e.endUTC == endUTC && | 703 | e.endUTC == endUTC && |
701 | e.tz == tz && | 704 | e.tz == tz && |
702 | e.hAlarm == hAlarm && | 705 | e.hAlarm == hAlarm && |
703 | e.aMinutes == aMinutes && | 706 | e.aMinutes == aMinutes && |
704 | e.aSound == aSound && | 707 | e.aSound == aSound && |
705 | e.hRepeat == hRepeat && | 708 | e.hRepeat == hRepeat && |
706 | e.pattern == pattern && | 709 | e.pattern == pattern && |
707 | e.note == note ); | 710 | e.note == note ); |
708 | } | 711 | } |
709 | 712 | ||
710 | /*! | 713 | /*! |
711 | \internal | 714 | \internal |
712 | Appends the contact information to \a buf. | 715 | Appends the contact information to \a buf. |
713 | */ | 716 | */ |
714 | void Event::save( QString& buf ) | 717 | void Event::save( QString& buf ) |
715 | { | 718 | { |
716 | buf += " description=\"" + Qtopia::escapeString(descript) + "\""; | 719 | buf += " description=\"" + Qtopia::escapeString(descript) + "\""; |
717 | if ( !locat.isEmpty() ) | 720 | if ( !locat.isEmpty() ) |
718 | buf += " location=\"" + Qtopia::escapeString(locat) + "\""; | 721 | buf += " location=\"" + Qtopia::escapeString(locat) + "\""; |
719 | // save the categoies differently.... | 722 | // save the categoies differently.... |
720 | QString strCats = idsToString( categories() ); | 723 | QString strCats = idsToString( categories() ); |
721 | buf += " categories=\"" + Qtopia::escapeString(strCats) + "\""; | 724 | buf += " categories=\"" + Qtopia::escapeString(strCats) + "\""; |
722 | buf += " uid=\"" + QString::number( uid() ) + "\""; | 725 | buf += " uid=\"" + QString::number( uid() ) + "\""; |
723 | if ( (Type)typ != Normal ) | 726 | if ( (Type)typ != Normal ) |
724 | buf += " type=\"AllDay\""; | 727 | buf += " type=\"AllDay\""; |
725 | if ( hAlarm ) { | 728 | if ( hAlarm ) { |
726 | buf += " alarm=\"" + QString::number( aMinutes ) + "\" sound=\""; | 729 | buf += " alarm=\"" + QString::number( aMinutes ) + "\" sound=\""; |
727 | if ( aSound == Event::Loud ) | 730 | if ( aSound == Event::Loud ) |
728 | buf += "loud"; | 731 | buf += "loud"; |
729 | else | 732 | else |
730 | buf += "silent"; | 733 | buf += "silent"; |
731 | buf += "\""; | 734 | buf += "\""; |
732 | } | 735 | } |
733 | if ( hRepeat ) | 736 | if ( hRepeat ) |
734 | write( buf, pattern ); | 737 | write( buf, pattern ); |
735 | 738 | ||
736 | buf += " start=\"" | 739 | buf += " start=\"" |
diff --git a/library/backend/event.h b/library/backend/event.h index 2b275a4..4610d85 100644 --- a/library/backend/event.h +++ b/library/backend/event.h | |||
@@ -216,160 +216,160 @@ public: | |||
216 | bool operator<( const EffectiveEvent &e ) const; | 216 | bool operator<( const EffectiveEvent &e ) const; |
217 | bool operator<=( const EffectiveEvent &e ) const; | 217 | bool operator<=( const EffectiveEvent &e ) const; |
218 | bool operator==( const EffectiveEvent &e ) const; | 218 | bool operator==( const EffectiveEvent &e ) const; |
219 | bool operator!=( const EffectiveEvent &e ) const; | 219 | bool operator!=( const EffectiveEvent &e ) const; |
220 | bool operator>( const EffectiveEvent &e ) const; | 220 | bool operator>( const EffectiveEvent &e ) const; |
221 | bool operator>= ( const EffectiveEvent &e ) const; | 221 | bool operator>= ( const EffectiveEvent &e ) const; |
222 | 222 | ||
223 | void setStart( const QTime &start ); | 223 | void setStart( const QTime &start ); |
224 | void setEnd( const QTime &end ); | 224 | void setEnd( const QTime &end ); |
225 | void setEvent( Event e ); | 225 | void setEvent( Event e ); |
226 | void setDate( const QDate &date ); | 226 | void setDate( const QDate &date ); |
227 | void setEffectiveDates( const QDate &from, const QDate &to ); | 227 | void setEffectiveDates( const QDate &from, const QDate &to ); |
228 | 228 | ||
229 | // QString category() const; | 229 | // QString category() const; |
230 | const QString &description() const; | 230 | const QString &description() const; |
231 | const QString &location() const; | 231 | const QString &location() const; |
232 | const QString ¬es() const; | 232 | const QString ¬es() const; |
233 | const Event &event() const; | 233 | const Event &event() const; |
234 | const QTime &start() const; | 234 | const QTime &start() const; |
235 | const QTime &end() const; | 235 | const QTime &end() const; |
236 | const QDate &date() const; | 236 | const QDate &date() const; |
237 | int length() const; | 237 | int length() const; |
238 | int size() const; | 238 | int size() const; |
239 | 239 | ||
240 | QDate startDate() const; | 240 | QDate startDate() const; |
241 | QDate endDate() const; | 241 | QDate endDate() const; |
242 | 242 | ||
243 | private: | 243 | private: |
244 | class EffectiveEventPrivate *d; | 244 | class EffectiveEventPrivate *d; |
245 | Event mEvent; | 245 | Event mEvent; |
246 | QDate mDate; | 246 | QDate mDate; |
247 | QTime mStart, | 247 | QTime mStart, |
248 | mEnd; | 248 | mEnd; |
249 | 249 | ||
250 | }; | 250 | }; |
251 | 251 | ||
252 | inline void Event::setAlarm( int minutes, SoundTypeChoice s ) | 252 | inline void Event::setAlarm( int minutes, SoundTypeChoice s ) |
253 | { | 253 | { |
254 | setAlarm(TRUE, minutes, s); | 254 | setAlarm(TRUE, minutes, s); |
255 | } | 255 | } |
256 | 256 | ||
257 | inline void Event::clearAlarm() | 257 | inline void Event::clearAlarm() |
258 | { | 258 | { |
259 | setAlarm(FALSE, 0, Silent); | 259 | setAlarm(FALSE, 0, Silent); |
260 | } | 260 | } |
261 | 261 | ||
262 | inline int Event::alarmDelay() const | 262 | inline int Event::alarmDelay() const |
263 | { | 263 | { |
264 | return alarmTime(); | 264 | return alarmTime(); |
265 | } | 265 | } |
266 | 266 | ||
267 | inline void Event::setAllDay(bool enable) | 267 | inline void Event::setAllDay(bool enable) |
268 | { | 268 | { |
269 | if (enable) | 269 | if (enable) |
270 | setType(AllDay); | 270 | setType(AllDay); |
271 | else | 271 | else |
272 | setType(Normal); | 272 | setType(Normal); |
273 | }; | 273 | }; |
274 | 274 | ||
275 | inline bool Event::isAllDay() const | 275 | inline bool Event::isAllDay() const |
276 | { | 276 | { |
277 | return type() == AllDay; | 277 | return type() == AllDay; |
278 | } | 278 | } |
279 | 279 | ||
280 | inline Event::RepeatType Event::repeatType() const | 280 | inline Event::RepeatType Event::repeatType() const |
281 | { | 281 | { |
282 | return repeatPattern().type; | 282 | return repeatPattern().type; |
283 | } | 283 | } |
284 | 284 | ||
285 | inline int Event::frequency() const | 285 | inline int Event::frequency() const |
286 | { | 286 | { |
287 | return repeatPattern().frequency; | 287 | return repeatPattern().frequency; |
288 | } | 288 | } |
289 | 289 | ||
290 | inline int Event::weekOffset() const | 290 | inline int Event::weekOffset() const |
291 | { | 291 | { |
292 | if (start().date().day() == 1) | 292 | if (start().date().day() == 1) |
293 | return 1; | 293 | return 1; |
294 | return (start().date().day() - 1) / 7 + 1; | 294 | return (start().date().day() - 1) / 7 + 1; |
295 | } | 295 | } |
296 | 296 | ||
297 | inline QDate Event::repeatTill() const | 297 | inline QDate Event::repeatTill() const |
298 | { | 298 | { |
299 | return repeatPattern().endDate(); | 299 | return repeatPattern().endDate(); |
300 | } | 300 | } |
301 | 301 | ||
302 | inline bool Event::repeatForever() const | 302 | inline bool Event::repeatForever() const |
303 | { | 303 | { |
304 | return !repeatPattern().hasEndDate; | 304 | return !repeatPattern().hasEndDate; |
305 | } | 305 | } |
306 | 306 | ||
307 | inline void Event::setRepeatType(RepeatType t) | 307 | inline void Event::setRepeatType(RepeatType t) |
308 | { | 308 | { |
309 | pattern.type = t; | 309 | pattern.type = t; |
310 | } | 310 | } |
311 | 311 | ||
312 | inline void Event::setFrequency(int f) | 312 | inline void Event::setFrequency(int f) |
313 | { | 313 | { |
314 | pattern.frequency = f; | 314 | pattern.frequency = f; |
315 | } | 315 | } |
316 | 316 | ||
317 | inline void Event::setRepeatTill(const QDate &d) | 317 | inline void Event::setRepeatTill(const QDate &d) |
318 | { | 318 | { |
319 | pattern.setEndDate(d); | 319 | pattern.setEndDate(d); |
320 | pattern.hasEndDate = TRUE; | 320 | pattern.hasEndDate = TRUE; |
321 | } | 321 | } |
322 | 322 | ||
323 | inline void Event::setRepeatForever(bool b) | 323 | inline void Event::setRepeatForever(bool b) |
324 | { | 324 | { |
325 | if (!b == pattern.hasEndDate) | 325 | if (!b == pattern.hasEndDate) |
326 | return; | 326 | return; |
327 | if (!b && !pattern.hasEndDate) | 327 | if (!b && !pattern.hasEndDate) |
328 | pattern.setEndDate(end().date()); | 328 | pattern.setEndDate(end().date()); |
329 | pattern.hasEndDate = !b; | 329 | pattern.hasEndDate = !b; |
330 | } | 330 | } |
331 | 331 | ||
332 | inline bool Event::repeatOnWeekDay(int day) const | 332 | inline bool Event::repeatOnWeekDay(int day) const |
333 | { | 333 | { |
334 | if (pattern.type != Weekly) | 334 | if (pattern.type != Weekly) |
335 | return FALSE; | 335 | return FALSE; |
336 | return ( (1 << (day - 1)) & pattern.days ) != 0; | 336 | return ( (1 << (day - 1)) & pattern.days ) != 0; |
337 | } | 337 | } |
338 | 338 | ||
339 | inline void Event::setRepeatOnWeekDay(int day, bool enable) | 339 | inline void Event::setRepeatOnWeekDay(int day, bool enable) |
340 | { | 340 | { |
341 | if ( repeatOnWeekDay( day ) != enable ) | 341 | if ( repeatOnWeekDay( day ) != enable ) |
342 | pattern.days ^= 1 << (day - 1); | 342 | pattern.days ^= 1 << (day - 1); |
343 | } | 343 | } |
344 | /* | 344 | |
345 | inline QDateTime Event::start( ) const | 345 | inline QDateTime Event::start( ) const |
346 | { | 346 | { |
347 | return start(FALSE); | 347 | return start(FALSE); |
348 | } | 348 | } |
349 | 349 | ||
350 | inline QDateTime Event::end( ) const | 350 | inline QDateTime Event::end( ) const |
351 | { | 351 | { |
352 | return end(FALSE); | 352 | return end(FALSE); |
353 | } | 353 | } |
354 | */ | 354 | |
355 | #ifdef PALMTOPCENTER | 355 | #ifdef PALMTOPCENTER |
356 | class QPC_EXPORT EffectiveEventSizeSorter : public QSorter<EffectiveEvent> | 356 | class QPC_EXPORT EffectiveEventSizeSorter : public QSorter<EffectiveEvent> |
357 | { | 357 | { |
358 | public: | 358 | public: |
359 | int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const | 359 | int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const |
360 | { | 360 | { |
361 | return a.size() - b.size(); | 361 | return a.size() - b.size(); |
362 | } | 362 | } |
363 | }; | 363 | }; |
364 | 364 | ||
365 | class QPC_EXPORT EffectiveEventTimeSorter : public QSorter<EffectiveEvent> | 365 | class QPC_EXPORT EffectiveEventTimeSorter : public QSorter<EffectiveEvent> |
366 | { | 366 | { |
367 | public: | 367 | public: |
368 | int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const | 368 | int compare( const EffectiveEvent& a, const EffectiveEvent& b ) const |
369 | { | 369 | { |
370 | return a.start().secsTo( b.start() ); | 370 | return a.start().secsTo( b.start() ); |
371 | } | 371 | } |
372 | }; | 372 | }; |
373 | #endif | 373 | #endif |
374 | 374 | ||
375 | #endif | 375 | #endif |