-rw-r--r-- | core/pim/todo/tableview.cpp | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp index 0d298f4..0b1c579 100644 --- a/core/pim/todo/tableview.cpp +++ b/core/pim/todo/tableview.cpp | |||
@@ -28,17 +28,18 @@ | |||
28 | #include <stdlib.h> | 28 | #include <stdlib.h> |
29 | #include <cmath> | 29 | #include <cmath> |
30 | #include <cctype> | 30 | #include <cctype> |
31 | 31 | ||
32 | #include <qcombobox.h> | 32 | #include <opie2/odebug.h> |
33 | #include <qlineedit.h> | 33 | #include <opie2/opimrecurrence.h> |
34 | #include <qtimer.h> | ||
35 | #include <qpopupmenu.h> | ||
36 | 34 | ||
37 | #include <qpe/config.h> | 35 | #include <qpe/config.h> |
38 | #include <qpe/resource.h> | 36 | #include <qpe/resource.h> |
39 | 37 | ||
40 | #include <opie2/opimrecurrence.h> | 38 | #include <qcombobox.h> |
39 | #include <qlineedit.h> | ||
40 | #include <qtimer.h> | ||
41 | #include <qpopupmenu.h> | ||
41 | 42 | ||
42 | #include "mainwindow.h" | 43 | #include "mainwindow.h" |
43 | //#include "tableitems.h" | 44 | //#include "tableitems.h" |
44 | #include "tableview.h" | 45 | #include "tableview.h" |
@@ -193,9 +194,9 @@ void TableView::showOverDue( bool ) { | |||
193 | updateView(); | 194 | updateView(); |
194 | } | 195 | } |
195 | 196 | ||
196 | void TableView::updateView( ) { | 197 | void TableView::updateView( ) { |
197 | qWarning("update view"); | 198 | Opie::Core::owarn << "update view" << oendl; |
198 | m_row = false; | 199 | m_row = false; |
199 | static int id; | 200 | static int id; |
200 | id = startTimer(4000 ); | 201 | id = startTimer(4000 ); |
201 | /* FIXME we want one page to be read! | 202 | /* FIXME we want one page to be read! |
@@ -207,9 +208,9 @@ void TableView::updateView( ) { | |||
207 | OPimTodoAccess::List::Iterator it, end; | 208 | OPimTodoAccess::List::Iterator it, end; |
208 | it = sorted().begin(); | 209 | it = sorted().begin(); |
209 | end = sorted().end(); | 210 | end = sorted().end(); |
210 | 211 | ||
211 | qWarning("setTodos"); | 212 | Opie::Core::owarn << "setTodos" << oendl; |
212 | QTime time; | 213 | QTime time; |
213 | time.start(); | 214 | time.start(); |
214 | m_enablePaint = false; | 215 | m_enablePaint = false; |
215 | setUpdatesEnabled( false ); | 216 | setUpdatesEnabled( false ); |
@@ -253,13 +254,13 @@ void TableView::replaceEvent( const OPimTodo& ev) { | |||
253 | void TableView::removeEvent( int ) { | 254 | void TableView::removeEvent( int ) { |
254 | updateView(); | 255 | updateView(); |
255 | } | 256 | } |
256 | void TableView::setShowCompleted( bool b) { | 257 | void TableView::setShowCompleted( bool b) { |
257 | qWarning("Show Completed %d" , b ); | 258 | Opie::Core::owarn << "Show Completed " << b << oendl; |
258 | updateView(); | 259 | updateView(); |
259 | } | 260 | } |
260 | void TableView::setShowDeadline( bool b ) { | 261 | void TableView::setShowDeadline( bool b ) { |
261 | qWarning( "Show DeadLine %d" , b ); | 262 | Opie::Core::owarn << "Show Deadline " << b << oendl; |
262 | if ( b ) | 263 | if ( b ) |
263 | showColumn( 3 ); | 264 | showColumn( 3 ); |
264 | else | 265 | else |
265 | hideColumn( 3 ); | 266 | hideColumn( 3 ); |
@@ -280,9 +281,9 @@ void TableView::setShowDeadline( bool b ) { | |||
280 | } | 281 | } |
281 | setColumnWidth( 2, col2width ); | 282 | setColumnWidth( 2, col2width ); |
282 | } | 283 | } |
283 | void TableView::setShowCategory( const QString& str) { | 284 | void TableView::setShowCategory( const QString& str) { |
284 | qWarning("setShowCategory"); | 285 | Opie::Core::owarn << "setShowCategory" << oendl; |
285 | if ( str != m_oleCat || m_first ) | 286 | if ( str != m_oleCat || m_first ) |
286 | updateView(); | 287 | updateView(); |
287 | 288 | ||
288 | m_oleCat = str; | 289 | m_oleCat = str; |
@@ -345,16 +346,17 @@ void TableView::slotClicked(int row, int col, int, | |||
345 | } | 346 | } |
346 | void TableView::slotPressed(int row, int col, int, | 347 | void TableView::slotPressed(int row, int col, int, |
347 | const QPoint& point) { | 348 | const QPoint& point) { |
348 | 349 | ||
349 | qWarning("pressed row %d col %d x:%d+y:%d", row,col,point.x(),point.y() ); | 350 | Opie::Core::owarn << "pressed row " << row << " col " << col << " x:" << point.x() |
351 | << "+y:" << point.y() << oendl; | ||
350 | m_prevP = point; | 352 | m_prevP = point; |
351 | /* TextColumn column */ | 353 | /* TextColumn column */ |
352 | if ( col == 2 && cellGeometry( row, col ).contains( point ) ) | 354 | if ( col == 2 && cellGeometry( row, col ).contains( point ) ) |
353 | m_menuTimer->start( 750, TRUE ); | 355 | m_menuTimer->start( 750, TRUE ); |
354 | } | 356 | } |
355 | void TableView::slotValueChanged( int, int ) { | 357 | void TableView::slotValueChanged( int, int ) { |
356 | qWarning("Value Changed"); | 358 | Opie::Core::owarn << "Value Changed" << oendl; |
357 | } | 359 | } |
358 | void TableView::slotCurrentChanged(int, int ) { | 360 | void TableView::slotCurrentChanged(int, int ) { |
359 | m_menuTimer->stop(); | 361 | m_menuTimer->stop(); |
360 | } | 362 | } |
@@ -368,9 +370,9 @@ QWidget* TableView::widget() { | |||
368 | * We event want to set the setOrder | 370 | * We event want to set the setOrder |
369 | * to a sort() and update() | 371 | * to a sort() and update() |
370 | */ | 372 | */ |
371 | void TableView::sortColumn( int col, bool asc, bool ) { | 373 | void TableView::sortColumn( int col, bool asc, bool ) { |
372 | qWarning("bool %d", asc ); | 374 | Opie::Core::owarn << "bool " << asc << oendl; |
373 | setSortOrder( col ); | 375 | setSortOrder( col ); |
374 | setAscending( asc ); | 376 | setAscending( asc ); |
375 | updateView(); | 377 | updateView(); |
376 | } | 378 | } |
@@ -491,9 +493,9 @@ QWidget* TableView::createEditor(int row, int col, bool )const { | |||
491 | return 0l; | 493 | return 0l; |
492 | } | 494 | } |
493 | } | 495 | } |
494 | void TableView::setCellContentFromEditor(int row, int col ) { | 496 | void TableView::setCellContentFromEditor(int row, int col ) { |
495 | qWarning("set cell content from editor"); | 497 | Opie::Core::owarn << "set cell content from editor" << oendl; |
496 | if ( col == 1 ) { | 498 | if ( col == 1 ) { |
497 | QWidget* wid = cellWidget(row, 1 ); | 499 | QWidget* wid = cellWidget(row, 1 ); |
498 | if ( wid->inherits("QComboBox") ) { | 500 | if ( wid->inherits("QComboBox") ) { |
499 | int pri = ((QComboBox*)wid)->currentItem() + 1; | 501 | int pri = ((QComboBox*)wid)->currentItem() + 1; |
@@ -527,9 +529,9 @@ void TableView::slotPriority() { | |||
527 | * up and down. On odd or even we will currentRow()+-4 or +-9 | 529 | * up and down. On odd or even we will currentRow()+-4 or +-9 |
528 | * | 530 | * |
529 | */ | 531 | */ |
530 | void TableView::timerEvent( QTimerEvent* ) { | 532 | void TableView::timerEvent( QTimerEvent* ) { |
531 | // qWarning("sorted %d", sorted().count() ); | 533 | // Opie::Core::owarn << "sorted " << sorted().count() << oendl; |
532 | if (sorted().count() == 0 ) | 534 | if (sorted().count() == 0 ) |
533 | return; | 535 | return; |
534 | 536 | ||
535 | int row = currentRow(); | 537 | int row = currentRow(); |
@@ -575,9 +577,9 @@ void TableView::timerEvent( QTimerEvent* ) { | |||
575 | void TableView::contentsMouseReleaseEvent( QMouseEvent* e) { | 577 | void TableView::contentsMouseReleaseEvent( QMouseEvent* e) { |
576 | int row = rowAt(m_prevP.y()); | 578 | int row = rowAt(m_prevP.y()); |
577 | int colOld = columnAt(m_prevP.x() ); | 579 | int colOld = columnAt(m_prevP.x() ); |
578 | int colNew = columnAt(e->x() ); | 580 | int colNew = columnAt(e->x() ); |
579 | qWarning("colNew: %d colOld: %d", colNew, colOld ); | 581 | Opie::Core::owarn << "colNew: " << colNew << " colOld: " << colOld << oendl; |
580 | if ( row == rowAt( e->y() ) && row != -1 && | 582 | if ( row == rowAt( e->y() ) && row != -1 && |
581 | colOld != colNew ) { | 583 | colOld != colNew ) { |
582 | TodoView::complete( sorted()[row] ); | 584 | TodoView::complete( sorted()[row] ); |
583 | return; | 585 | return; |