author | zautrix <zautrix> | 2005-03-27 09:46:04 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-27 09:46:04 (UTC) |
commit | b170a7414ff72016285ea207caa7ccf786530e77 (patch) (side-by-side diff) | |
tree | cb635d155fed20ecb33f877659a00d88bedb309e /korganizer/calendarview.cpp | |
parent | ee6f7d5329658c567882e8e496c65eef8874496e (diff) | |
download | kdepimpi-b170a7414ff72016285ea207caa7ccf786530e77.zip kdepimpi-b170a7414ff72016285ea207caa7ccf786530e77.tar.gz kdepimpi-b170a7414ff72016285ea207caa7ccf786530e77.tar.bz2 |
many fixes
-rw-r--r-- | korganizer/calendarview.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 3a16fe6..73aa733 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -236,5 +236,5 @@ CalendarView::CalendarView( Calendar *calendar, void CalendarView::init() { - + mNextAlarmDateTime = QDateTime::currentDateTime(); setFocusPolicy ( WheelFocus ); mViewerCallerIsSearchDialog = false; @@ -643,4 +643,5 @@ void CalendarView::addSuspendAlarm(const QDateTime &qdt, const QString ¬i ) void CalendarView::addAlarm(const QDateTime &qdt, const QString ¬i ) { + mNextAlarmDateTime = qdt; //qDebug("+++++addAlarm %s %s ", qdt.toString().latin1() , noti.latin1() ); if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { @@ -4065,2 +4066,17 @@ void CalendarView::resetFocus() mViewerCallerIsSearchDialog = false; } + +void CalendarView::showNextAlarms() +{ + QString message; + if ( mNextAlarmDateTime > QDateTime::currentDateTime() ) { + QString sum = mCalendar->nextSummary(); + QDateTime nextA = mNextAlarmDateTime; + QDateTime nextAl = mCalendar->nextAlarmEventDateTime(); + message = i18n("The next alarm is on:\n%1\nat: %2\n\n%3\n(%4)").arg( KGlobal::locale()->formatDate(nextA.date() , false)).arg( KGlobal::locale()->formatTime(nextA.time() , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ; + } else { + message = i18n("There is no next alarm."); + + } + KMessageBox::information( this, message); +} |