-rw-r--r-- | core/pim/todo/tableview.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp index d980a24..5bbf880 100644 --- a/core/pim/todo/tableview.cpp +++ b/core/pim/todo/tableview.cpp @@ -34,13 +34,13 @@ #include <qtimer.h> #include <qpopupmenu.h> #include <qpe/config.h> #include <qpe/resource.h> -#include <opie/orecur.h> +#include <opie2/opimrecurrence.h> #include "mainwindow.h" //#include "tableitems.h" #include "tableview.h" using namespace Todo; @@ -181,13 +181,13 @@ int TableView::prev() { if ( currentRow() - 1 < 0 ) return 0; setCurrentCell( currentRow() -1, currentColumn() ); return sorted().uidAt( currentRow() ); } QString TableView::currentRepresentation() { - OTodo to = sorted()[currentRow()]; + OPimTodo to = sorted()[currentRow()]; return to.summary().isEmpty() ? to.description().left(20) : to.summary() ; } /* show overdue */ void TableView::showOverDue( bool ) { clear(); updateView(); @@ -201,13 +201,13 @@ void TableView::updateView( ) { /* FIXME we want one page to be read! * * Calculate that screensize */ todoWindow()->setReadAhead( 4 ); sort(); - OTodoAccess::List::Iterator it, end; + OPimTodoAccess::List::Iterator it, end; it = sorted().begin(); end = sorted().end(); qWarning("setTodos"); QTime time; time.start(); @@ -224,28 +224,28 @@ void TableView::updateView( ) { viewport()->setUpdatesEnabled( true ); viewport()->update(); m_enablePaint = true; // int el = time.elapsed(); } -void TableView::setTodo( int, const OTodo&) { +void TableView::setTodo( int, const OPimTodo&) { sort(); /* repaint */ repaint(); } -void TableView::addEvent( const OTodo&) { +void TableView::addEvent( const OPimTodo&) { /* fix problems of not showing the 'Haken' */ updateView(); } /* * find the event * and then replace the complete row */ -void TableView::replaceEvent( const OTodo& ev) { +void TableView::replaceEvent( const OPimTodo& ev) { addEvent( ev ); } /* * re aligning table can be slow too * FIXME: look what performs better * either this or the old align table @@ -385,13 +385,13 @@ void TableView::viewportPaintEvent( QPaintEvent* e) { */ void TableView::paintCell(QPainter* p, int row, int col, const QRect& cr, bool ) { const QColorGroup &cg = colorGroup(); p->save(); - OTodo task = sorted()[row]; + OPimTodo task = sorted()[row]; // TODO - give user option for grid or bars? // Paint alternating background bars if ( (row % 2 ) == 0 ) { p->fillRect( 0, 0, cr.width(), cr.height(), cg.brush( QColorGroup::Base ) ); @@ -494,24 +494,24 @@ QWidget* TableView::createEditor(int row, int col, bool )const { void TableView::setCellContentFromEditor(int row, int col ) { qWarning("set cell content from editor"); if ( col == 1 ) { QWidget* wid = cellWidget(row, 1 ); if ( wid->inherits("QComboBox") ) { int pri = ((QComboBox*)wid)->currentItem() + 1; - OTodo todo = sorted()[row]; + OPimTodo todo = sorted()[row]; if ( todo.priority() != pri ) { todo.setPriority( pri ); TodoView::update( todo.uid(), todo ); updateView(); } } }else if ( col == 2) { QWidget* wid = cellWidget(row, 2); if ( wid->inherits("QLineEdit") ) { QString text = ((QLineEdit*)wid)->text(); - OTodo todo = sorted()[row]; + OPimTodo todo = sorted()[row]; if ( todo.summary() != text ) { todo.setSummary( text ); TodoView::update( todo.uid(), todo ); updateView(); } } |