summaryrefslogtreecommitdiffabout
path: root/korganizer/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 95b836c..7a4275b 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -590,7 +590,7 @@ void MainWindow::initActions()
mWeekFont.setPointSize( fontPoint );
QFontMetrics f( mWeekFont );
fontWid = f.width( "30" );
- qDebug("dec-- ");
+ //qDebug("dec-- ");
}
connect( mWeekAction, SIGNAL( activated() ),
@@ -1748,7 +1748,10 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
mView->toggleExpand();
break;
case Qt::Key_A:
- mView->toggleAllDaySize();
+ if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton )
+ mView->showNextAlarms();
+ else
+ mView->toggleAllDaySize();
break;
case Qt::Key_T:
if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
@@ -2133,3 +2136,15 @@ void MainWindow::weekAction()
}
delete popup;
}
+
+void MainWindow::hideEvent ( QHideEvent * )
+{
+ QString message;
+ QDateTime nextA = mCalendar->nextAlarmEventDateTime();
+ if ( nextA.isValid() ) {
+ QString sum = mCalendar->nextSummary();
+
+ message = i18n("%1 %2 - %3 (next event/todo with alarm)").arg( KGlobal::locale()->formatTime(nextA.time() , false)).arg(sum ).arg( KGlobal::locale()->formatDate(nextA.date() , false));
+ setCaption( message );
+ }
+}