author | drw <drw> | 2004-04-02 22:15:36 (UTC) |
---|---|---|
committer | drw <drw> | 2004-04-02 22:15:36 (UTC) |
commit | edd008d91ca57453601d0c2098936287d98975e6 (patch) (side-by-side diff) | |
tree | ffdc1d494333537e33a3ad0390f83968cb884966 /core/pim/todo/tableview.cpp | |
parent | 6f335843b89f60fe009b43a4134e9b3753fff974 (diff) | |
download | opie-edd008d91ca57453601d0c2098936287d98975e6.zip opie-edd008d91ca57453601d0c2098936287d98975e6.tar.gz opie-edd008d91ca57453601d0c2098936287d98975e6.tar.bz2 |
Use ODebug (another 35 down...) - all of core/pim is converted.
-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 @@ -24,25 +24,26 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <stdlib.h> #include <cmath> #include <cctype> -#include <qcombobox.h> -#include <qlineedit.h> -#include <qtimer.h> -#include <qpopupmenu.h> +#include <opie2/odebug.h> +#include <opie2/opimrecurrence.h> #include <qpe/config.h> #include <qpe/resource.h> -#include <opie2/opimrecurrence.h> +#include <qcombobox.h> +#include <qlineedit.h> +#include <qtimer.h> +#include <qpopupmenu.h> #include "mainwindow.h" //#include "tableitems.h" #include "tableview.h" using namespace Todo; namespace { @@ -189,31 +190,31 @@ QString TableView::currentRepresentation() { } /* show overdue */ void TableView::showOverDue( bool ) { clear(); updateView(); } void TableView::updateView( ) { - qWarning("update view"); + Opie::Core::owarn << "update view" << oendl; m_row = false; static int id; id = startTimer(4000 ); /* FIXME we want one page to be read! * * Calculate that screensize */ todoWindow()->setReadAhead( 4 ); sort(); OPimTodoAccess::List::Iterator it, end; it = sorted().begin(); end = sorted().end(); - qWarning("setTodos"); + Opie::Core::owarn << "setTodos" << oendl; QTime time; time.start(); m_enablePaint = false; setUpdatesEnabled( false ); viewport()->setUpdatesEnabled( false ); setNumRows( it.count() ); if ( it.count() == 0 ) @@ -249,21 +250,21 @@ void TableView::replaceEvent( const OPimTodo& ev) { * re aligning table can be slow too * FIXME: look what performs better * either this or the old align table */ void TableView::removeEvent( int ) { updateView(); } void TableView::setShowCompleted( bool b) { - qWarning("Show Completed %d" , b ); + Opie::Core::owarn << "Show Completed " << b << oendl; updateView(); } void TableView::setShowDeadline( bool b ) { - qWarning( "Show DeadLine %d" , b ); + Opie::Core::owarn << "Show Deadline " << b << oendl; if ( b ) showColumn( 3 ); else hideColumn( 3 ); // Try to intelligently size columns // TODO - would use width() below, but doesn't have valid value at time of c'tor int col2width = 238; @@ -276,17 +277,17 @@ void TableView::setShowDeadline( bool b ) { if ( b ) { width = fontMetrics().boundingRect( horizontalHeader()->label( 3 ) ).width() + 8; setColumnWidth( 3, width ); col2width -= width; } setColumnWidth( 2, col2width ); } void TableView::setShowCategory( const QString& str) { - qWarning("setShowCategory"); + Opie::Core::owarn << "setShowCategory" << oendl; if ( str != m_oleCat || m_first ) updateView(); m_oleCat = str; m_first = false; } void TableView::clear() { @@ -341,40 +342,41 @@ void TableView::slotClicked(int row, int col, int, } } } void TableView::slotPressed(int row, int col, int, const QPoint& point) { - qWarning("pressed row %d col %d x:%d+y:%d", row,col,point.x(),point.y() ); + Opie::Core::owarn << "pressed row " << row << " col " << col << " x:" << point.x() + << "+y:" << point.y() << oendl; m_prevP = point; /* TextColumn column */ if ( col == 2 && cellGeometry( row, col ).contains( point ) ) m_menuTimer->start( 750, TRUE ); } void TableView::slotValueChanged( int, int ) { - qWarning("Value Changed"); + Opie::Core::owarn << "Value Changed" << oendl; } void TableView::slotCurrentChanged(int, int ) { m_menuTimer->stop(); } QWidget* TableView::widget() { return this; } /* * We need to overwrite sortColumn * because we want to sort whole row * based * We event want to set the setOrder * to a sort() and update() */ void TableView::sortColumn( int col, bool asc, bool ) { - qWarning("bool %d", asc ); + Opie::Core::owarn << "bool " << asc << oendl; setSortOrder( col ); setAscending( asc ); updateView(); } void TableView::viewportPaintEvent( QPaintEvent* e) { if (m_enablePaint ) QTable::viewportPaintEvent( e ); } @@ -487,17 +489,17 @@ QWidget* TableView::createEditor(int row, int col, bool )const { return edit; } case 0: default: return 0l; } } void TableView::setCellContentFromEditor(int row, int col ) { - qWarning("set cell content from editor"); + Opie::Core::owarn << "set cell content from editor" << oendl; if ( col == 1 ) { QWidget* wid = cellWidget(row, 1 ); if ( wid->inherits("QComboBox") ) { int pri = ((QComboBox*)wid)->currentItem() + 1; OPimTodo todo = sorted()[row]; if ( todo.priority() != pri ) { todo.setPriority( pri ); TodoView::update( todo.uid(), todo ); @@ -523,17 +525,17 @@ void TableView::slotPriority() { /* * We'll use the TimerEvent to read ahead or to keep the cahce always * filled enough. * We will try to read ahead 4 items in both ways * up and down. On odd or even we will currentRow()+-4 or +-9 * */ void TableView::timerEvent( QTimerEvent* ) { -// qWarning("sorted %d", sorted().count() ); +// Opie::Core::owarn << "sorted " << sorted().count() << oendl; if (sorted().count() == 0 ) return; int row = currentRow(); if ( m_row ) { int ro = row-4; if (ro < 0 ) ro = 0; sorted()[ro]; @@ -571,17 +573,17 @@ void TableView::timerEvent( QTimerEvent* ) { * m_completeStrokeWidth criteria * WORKAROUND: strike through needs to strike through the same * row and two columns! */ void TableView::contentsMouseReleaseEvent( QMouseEvent* e) { int row = rowAt(m_prevP.y()); int colOld = columnAt(m_prevP.x() ); int colNew = columnAt(e->x() ); - qWarning("colNew: %d colOld: %d", colNew, colOld ); + Opie::Core::owarn << "colNew: " << colNew << " colOld: " << colOld << oendl; if ( row == rowAt( e->y() ) && row != -1 && colOld != colNew ) { TodoView::complete( sorted()[row] ); return; } QTable::contentsMouseReleaseEvent( e ); } void TableView::contentsMouseMoveEvent( QMouseEvent* e ) { |