Diffstat (limited to 'core/pim/datebook/datebook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebook.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp index 8614b3f..2c2965e 100644 --- a/core/pim/datebook/datebook.cpp +++ b/core/pim/datebook/datebook.cpp | |||
@@ -78,13 +78,14 @@ | |||
78 | DateBook::DateBook( QWidget *parent, const char *, WFlags f ) | 78 | DateBook::DateBook( QWidget *parent, const char *, WFlags f ) |
79 | : QMainWindow( parent, "datebook", f ), | 79 | : QMainWindow( parent, "datebook", f ), |
80 | aPreset( FALSE ), | 80 | aPreset( FALSE ), |
81 | presetTime( -1 ), | 81 | presetTime( -1 ), |
82 | startTime( 8 ), // an acceptable default | 82 | startTime( 8 ), // an acceptable default |
83 | syncing(FALSE), | 83 | syncing(FALSE), |
84 | inSearch(FALSE) | 84 | inSearch(FALSE), |
85 | alarmCounter(0) | ||
85 | { | 86 | { |
86 | QTime t; | 87 | QTime t; |
87 | t.start(); | 88 | t.start(); |
88 | db = new DateBookDBHack; | 89 | db = new DateBookDBHack; |
89 | qDebug("loading db t=%d", t.elapsed() ); | 90 | qDebug("loading db t=%d", t.elapsed() ); |
90 | loadSettings(); | 91 | loadSettings(); |
@@ -611,12 +612,13 @@ void DateBook::appMessage(const QCString& msg, const QByteArray& data) | |||
611 | } | 612 | } |
612 | } | 613 | } |
613 | } | 614 | } |
614 | if ( found ) { | 615 | if ( found ) { |
615 | if ( bSound ) { | 616 | if ( bSound ) { |
616 | Sound::soundAlarm(); | 617 | Sound::soundAlarm(); |
618 | alarmCounter = 0; | ||
617 | stopTimer = startTimer( 5000 ); | 619 | stopTimer = startTimer( 5000 ); |
618 | } | 620 | } |
619 | 621 | ||
620 | QDialog dlg( this, 0, TRUE ); | 622 | QDialog dlg( this, 0, TRUE ); |
621 | QVBoxLayout *vb = new QVBoxLayout( &dlg ); | 623 | QVBoxLayout *vb = new QVBoxLayout( &dlg ); |
622 | QScrollView *view = new QScrollView( &dlg, "scrollView"); | 624 | QScrollView *view = new QScrollView( &dlg, "scrollView"); |
@@ -680,20 +682,18 @@ void DateBook::flush() | |||
680 | syncing = TRUE; | 682 | syncing = TRUE; |
681 | db->save(); | 683 | db->save(); |
682 | } | 684 | } |
683 | 685 | ||
684 | void DateBook::timerEvent( QTimerEvent *e ) | 686 | void DateBook::timerEvent( QTimerEvent *e ) |
685 | { | 687 | { |
686 | static int stop = 0; | 688 | if ( alarmCounter < 10 ) { |
687 | if ( stop < 10 ) { | 689 | alarmCounter++; |
688 | Sound::soundAlarm(); | 690 | Sound::soundAlarm(); |
689 | stop++; | 691 | } |
690 | } else { | 692 | else |
691 | stop = 0; | ||
692 | killTimer( e->timerId() ); | 693 | killTimer( e->timerId() ); |
693 | } | ||
694 | } | 694 | } |
695 | 695 | ||
696 | void DateBook::changeClock( bool newClock ) | 696 | void DateBook::changeClock( bool newClock ) |
697 | { | 697 | { |
698 | ampm = newClock; | 698 | ampm = newClock; |
699 | // repaint the affected objects... | 699 | // repaint the affected objects... |