author | zecke <zecke> | 2002-11-30 11:20:47 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-11-30 11:20:47 (UTC) |
commit | fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb (patch) (side-by-side diff) | |
tree | 32e68b5b483dd3ce8041542e7d95f0b6d8dbf644 /core/pim/todo/tableview.cpp | |
parent | bd692f7ebe04e23151cce39baf311b925ccf91b1 (diff) | |
download | opie-fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb.zip opie-fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb.tar.gz opie-fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb.tar.bz2 |
Back from hospital with new power
This versions clean up m failure on templates with Qt... in todoview
Implements Recurrance( backends to not safe it yet )
OPimState and Maintainer mode in some ways
and much more
This one also implements the OPimMainWindow specs
and has a small Memu replacement to get the toolbar in one line
-rw-r--r-- | core/pim/todo/tableview.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp index ded2dbd..0f683c9 100644 --- a/core/pim/todo/tableview.cpp +++ b/core/pim/todo/tableview.cpp @@ -37,2 +37,4 @@ +#include <opie/orecur.h> + #include "mainwindow.h" @@ -122,3 +124,3 @@ TableView::~TableView() { void TableView::slotShowMenu() { - QPopupMenu *menu = todoWindow()->contextMenu( current() ); + QPopupMenu *menu = todoWindow()->contextMenu( current(), sorted()[currentRow()].recurrence().doesRecur() ); menu->exec(QCursor::pos() ); @@ -131,3 +133,3 @@ int TableView::current() { int uid = sorted().uidAt(currentRow() ); - qWarning("uid %d", uid ); + return uid; @@ -135,3 +137,4 @@ int TableView::current() { QString TableView::currentRepresentation() { - return text( currentRow(), 2); + OTodo to = sorted()[currentRow()]; + return to.summary().isEmpty() ? to.description().left(20) : to.summary() ; } @@ -147,3 +150,3 @@ void TableView::updateView( ) { static int id; - id = startTimer(2000 ); + id = startTimer(4000 ); /* FIXME we want one page to be read! @@ -244,6 +247,3 @@ void TableView::slotClicked(int row, int col, int, y <= ( h - BoxSize ) / 2 + BoxSize ) { - OTodo todo = sorted()[row]; - todo.setCompleted( !todo.isCompleted() ); - TodoView::update( todo.uid(), todo ); - updateView(); + TodoView::complete(sorted()[row] ); } @@ -371,3 +371,3 @@ void TableView::paintCell(QPainter* p, int row, int col, const QRect& cr, bool QString text = task.summary().isEmpty() ? - task.description() : + task.description().left(20) : task.summary(); @@ -464,3 +464,3 @@ void TableView::slotPriority() { void TableView::timerEvent( QTimerEvent* ev ) { - qWarning("sorted %d", sorted().count() ); +// qWarning("sorted %d", sorted().count() ); if (sorted().count() == 0 ) @@ -515,6 +515,3 @@ void TableView::contentsMouseReleaseEvent( QMouseEvent* e) { colOld != colNew ) { - OTodo todo = sorted()[row]; - todo.setCompleted( !todo.isCompleted() ); - TodoView::update( todo.uid(), todo ); - updateView(); + TodoView::complete( sorted()[row] ); return; |