summaryrefslogtreecommitdiff
path: root/core/pim/todo/tableview.cpp
authorzecke <zecke>2003-02-11 18:42:42 (UTC)
committer zecke <zecke>2003-02-11 18:42:42 (UTC)
commit986afbabdd7c291f2fcbecd865e8c7075623bbf8 (patch) (unidiff)
tree7b00ad1e26a47666c05b7040d2218d134f698007 /core/pim/todo/tableview.cpp
parentcb85b004afe2750733cef1663961539f6a3968e6 (diff)
downloadopie-986afbabdd7c291f2fcbecd865e8c7075623bbf8.zip
opie-986afbabdd7c291f2fcbecd865e8c7075623bbf8.tar.gz
opie-986afbabdd7c291f2fcbecd865e8c7075623bbf8.tar.bz2
Add switching the views with the ActionKey..
Diffstat (limited to 'core/pim/todo/tableview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/tableview.cpp21
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
@@ -59,7 +59,7 @@ void TableView::initConfig() {
59 59
60TableView::TableView( MainWindow* window, QWidget* wid ) 60TableView::TableView( MainWindow* window, QWidget* wid )
61 : QTable( wid ), TodoView( window ) { 61 : QTable( wid ), TodoView( window ) {
62 62
63 // Load icons 63 // Load icons
64 // TODO - probably should be done globally somewhere else, 64 // TODO - probably should be done globally somewhere else,
65 // see also quickeditimpl.cpp/h, taskeditoroverview.cpp/h 65 // see also quickeditimpl.cpp/h, taskeditoroverview.cpp/h
@@ -83,10 +83,10 @@ TableView::TableView( MainWindow* window, QWidget* wid )
83 horizontalHeader()->setLabel( 3, QWidget::tr("Deadline") ); 83 horizontalHeader()->setLabel( 3, QWidget::tr("Deadline") );
84 84
85 setShowDeadline( todoWindow()->showDeadline() ); 85 setShowDeadline( todoWindow()->showDeadline() );
86 86
87 setSorting( TRUE ); 87 setSorting( TRUE );
88 setSelectionMode( NoSelection ); 88 setSelectionMode( NoSelection );
89 89
90 setLeftMargin( 0 ); 90 setLeftMargin( 0 );
91 verticalHeader()->hide(); 91 verticalHeader()->hide();
92 92
@@ -368,7 +368,7 @@ void TableView::paintCell(QPainter* p, int row, int col, const QRect& cr, bool
368 //p->drawRect( x + marg+1, y+1, BoxSize-2, BoxSize-2 ); 368 //p->drawRect( x + marg+1, y+1, BoxSize-2, BoxSize-2 );
369 if ( task.isCompleted() ) { 369 if ( task.isCompleted() ) {
370 p->drawPixmap( x + marg, y, m_pic_completed ); 370 p->drawPixmap( x + marg, y, m_pic_completed );
371 } 371 }
372 } 372 }
373 break; 373 break;
374 case 1: // priority field 374 case 1: // priority field
@@ -469,7 +469,7 @@ void TableView::slotPriority() {
469 * up and down. On odd or even we will currentRow()+-4 or +-9 469 * up and down. On odd or even we will currentRow()+-4 or +-9
470 * 470 *
471 */ 471 */
472void TableView::timerEvent( QTimerEvent* ev ) { 472void TableView::timerEvent( QTimerEvent* ) {
473// qWarning("sorted %d", sorted().count() ); 473// qWarning("sorted %d", sorted().count() );
474 if (sorted().count() == 0 ) 474 if (sorted().count() == 0 )
475 return; 475 return;
@@ -530,3 +530,14 @@ void TableView::contentsMouseMoveEvent( QMouseEvent* e ) {
530 m_menuTimer->stop(); 530 m_menuTimer->stop();
531 QTable::contentsMouseMoveEvent( e ); 531 QTable::contentsMouseMoveEvent( e );
532} 532}
533void TableView::keyPressEvent( QKeyEvent* event) {
534 switch( event->key() ) {
535 case Qt::Key_F33:
536 case Qt::Key_Enter:
537 case Qt::Key_Return:
538 showTodo( sorted().uidAt( currentRow() ) );
539 break;
540 default:
541 QTable::keyPressEvent( event );
542 }
543}