summaryrefslogtreecommitdiff
path: root/core/pim/todo/textviewshow.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/todo/textviewshow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/textviewshow.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/core/pim/todo/textviewshow.cpp b/core/pim/todo/textviewshow.cpp
index fe8a9c8..35ea74b 100644
--- a/core/pim/todo/textviewshow.cpp
+++ b/core/pim/todo/textviewshow.cpp
@@ -1,4 +1,3 @@
-#include "mainwindow.h"
#include "textviewshow.h"
using namespace Todo;
@@ -20,9 +19,26 @@ QWidget* TextViewShow::widget() {
}
void TextViewShow::keyPressEvent( QKeyEvent* event ) {
switch( event->key() ) {
+ case Qt::Key_Up:
+ if ( ( visibleHeight() < contentsHeight() ) &&
+ ( verticalScrollBar()->value() > verticalScrollBar()->minValue() ) )
+ scrollBy( 0, -(visibleHeight()-20) );
+ else
+ showPrev();
+ break;
+ case Qt::Key_Down:
+ if ( ( visibleHeight() < contentsHeight() ) &&
+ ( verticalScrollBar()->value() < verticalScrollBar()->maxValue() ) )
+ scrollBy( 0, visibleHeight()-20 );
+ else
+ showNext();
+ break;
+ case Qt::Key_Left:
+ case Qt::Key_Right:
case Qt::Key_F33:
case Qt::Key_Enter:
case Qt::Key_Return:
+ case Qt::Key_Space:
escapeView();
break;
default: