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 | |||
@@ -556,85 +556,88 @@ 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 | /*! |
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 | |||
@@ -312,64 +312,64 @@ inline void Event::setRepeatType(RepeatType t) | |||
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 |