summaryrefslogtreecommitdiff
path: root/core/pim/todo/todotable.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/todo/todotable.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/todo/todotable.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/pim/todo/todotable.cpp b/core/pim/todo/todotable.cpp
index d0bc61c..753c036 100644
--- a/core/pim/todo/todotable.cpp
+++ b/core/pim/todo/todotable.cpp
@@ -299,25 +299,31 @@ void TodoTable::slotClicked( int row, int col, int, const QPoint &pos )
i->toggle();
}
emit signalDoneChanged( i->isChecked() );
}
}
break;
case 1:
break;
case 2:
// may as well edit it...
// menuTimer->stop();
// emit signalEdit();
- // fall through
+ // Show detailed view of the selected entry
+ {
+ menuTimer->stop();
+ ToDoEvent *todo = todoList[static_cast<CheckItem*>(item(row, 0))];
+ emit showDetails( *todo );
+ }
+ break;
case 3:
// may as well edit it...
menuTimer->stop();
// emit signalEdit();
break;
}
}
void TodoTable::slotPressed( int row, int col, int, const QPoint &pos )
{
if ( col == 2 && cellGeometry( row, col ).contains(pos) )
menuTimer->start( 750, TRUE );
@@ -336,25 +342,25 @@ void TodoTable::slotCurrentChanged( int, int )
void TodoTable::internalAddEntries( QList<ToDoEvent> &list )
{
setNumRows( list.count() );
int row = 0;
ToDoEvent *it;
for ( it = list.first(); it; it = list.next() )
insertIntoTable( it, row++ );
}
ToDoEvent TodoTable::currentEntry() const
{
- printf ("in currentEntry\n");
+ //qWarning ("in currentEntry\n");
QTableItem *i = item( currentRow(), 0 );
if ( !i || rowHeight( currentRow() ) <= 0 )
return ToDoEvent();
ToDoEvent *todo = todoList[(CheckItem*)i];
todo->setCompleted( ( (CheckItem*)item( currentRow(), 0 ) )->isChecked() );
todo->setPriority( ( (ComboItem*)item( currentRow(), 1 ) )->text().toInt() );
return *todo;
}
void TodoTable::replaceCurrentEntry( const ToDoEvent &todo, bool fromTableItem )
{