-rw-r--r-- | core/pim/todo/tableview.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp index 61d1edd..cec8b5e 100644 --- a/core/pim/todo/tableview.cpp +++ b/core/pim/todo/tableview.cpp @@ -60,5 +60,5 @@ void TableView::initConfig() { TableView::TableView( MainWindow* window, QWidget* wid ) : QTable( wid ), TodoView( window ) { - + // Load icons // TODO - probably should be done globally somewhere else, @@ -84,8 +84,8 @@ TableView::TableView( MainWindow* window, QWidget* wid ) setShowDeadline( todoWindow()->showDeadline() ); - + setSorting( TRUE ); setSelectionMode( NoSelection ); - + setLeftMargin( 0 ); verticalHeader()->hide(); @@ -369,5 +369,5 @@ void TableView::paintCell(QPainter* p, int row, int col, const QRect& cr, bool if ( task.isCompleted() ) { p->drawPixmap( x + marg, y, m_pic_completed ); - } + } } break; @@ -470,5 +470,5 @@ void TableView::slotPriority() { * */ -void TableView::timerEvent( QTimerEvent* ev ) { +void TableView::timerEvent( QTimerEvent* ) { // qWarning("sorted %d", sorted().count() ); if (sorted().count() == 0 ) @@ -531,2 +531,13 @@ void TableView::contentsMouseMoveEvent( QMouseEvent* e ) { QTable::contentsMouseMoveEvent( e ); } +void TableView::keyPressEvent( QKeyEvent* event) { + switch( event->key() ) { + case Qt::Key_F33: + case Qt::Key_Enter: + case Qt::Key_Return: + showTodo( sorted().uidAt( currentRow() ) ); + break; + default: + QTable::keyPressEvent( event ); + } +} |