author | zecke <zecke> | 2002-11-30 11:20:47 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-11-30 11:20:47 (UTC) |
commit | fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb (patch) (unidiff) | |
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 | 27 |
1 files changed, 12 insertions, 15 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 @@ | |||
37 | 37 | ||
38 | #include <opie/orecur.h> | ||
39 | |||
38 | #include "mainwindow.h" | 40 | #include "mainwindow.h" |
@@ -122,3 +124,3 @@ TableView::~TableView() { | |||
122 | void TableView::slotShowMenu() { | 124 | void TableView::slotShowMenu() { |
123 | QPopupMenu *menu = todoWindow()->contextMenu( current() ); | 125 | QPopupMenu *menu = todoWindow()->contextMenu( current(), sorted()[currentRow()].recurrence().doesRecur() ); |
124 | menu->exec(QCursor::pos() ); | 126 | menu->exec(QCursor::pos() ); |
@@ -131,3 +133,3 @@ int TableView::current() { | |||
131 | int uid = sorted().uidAt(currentRow() ); | 133 | int uid = sorted().uidAt(currentRow() ); |
132 | qWarning("uid %d", uid ); | 134 | |
133 | return uid; | 135 | return uid; |
@@ -135,3 +137,4 @@ int TableView::current() { | |||
135 | QString TableView::currentRepresentation() { | 137 | QString TableView::currentRepresentation() { |
136 | return text( currentRow(), 2); | 138 | OTodo to = sorted()[currentRow()]; |
139 | return to.summary().isEmpty() ? to.description().left(20) : to.summary() ; | ||
137 | } | 140 | } |
@@ -147,3 +150,3 @@ void TableView::updateView( ) { | |||
147 | static int id; | 150 | static int id; |
148 | id = startTimer(2000 ); | 151 | id = startTimer(4000 ); |
149 | /* FIXME we want one page to be read! | 152 | /* FIXME we want one page to be read! |
@@ -244,6 +247,3 @@ void TableView::slotClicked(int row, int col, int, | |||
244 | y <= ( h - BoxSize ) / 2 + BoxSize ) { | 247 | y <= ( h - BoxSize ) / 2 + BoxSize ) { |
245 | OTodo todo = sorted()[row]; | 248 | TodoView::complete(sorted()[row] ); |
246 | todo.setCompleted( !todo.isCompleted() ); | ||
247 | TodoView::update( todo.uid(), todo ); | ||
248 | updateView(); | ||
249 | } | 249 | } |
@@ -371,3 +371,3 @@ void TableView::paintCell(QPainter* p, int row, int col, const QRect& cr, bool | |||
371 | QString text = task.summary().isEmpty() ? | 371 | QString text = task.summary().isEmpty() ? |
372 | task.description() : | 372 | task.description().left(20) : |
373 | task.summary(); | 373 | task.summary(); |
@@ -464,3 +464,3 @@ void TableView::slotPriority() { | |||
464 | void TableView::timerEvent( QTimerEvent* ev ) { | 464 | void TableView::timerEvent( QTimerEvent* ev ) { |
465 | qWarning("sorted %d", sorted().count() ); | 465 | // qWarning("sorted %d", sorted().count() ); |
466 | if (sorted().count() == 0 ) | 466 | if (sorted().count() == 0 ) |
@@ -515,7 +515,4 @@ void TableView::contentsMouseReleaseEvent( QMouseEvent* e) { | |||
515 | colOld != colNew ) { | 515 | colOld != colNew ) { |
516 | OTodo todo = sorted()[row]; | 516 | TodoView::complete( sorted()[row] ); |
517 | todo.setCompleted( !todo.isCompleted() ); | 517 | return; |
518 | TodoView::update( todo.uid(), todo ); | ||
519 | updateView(); | ||
520 | return; | ||
521 | } | 518 | } |