summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/main.cpp4
-rw-r--r--core/pim/todo/mainwindow.cpp19
-rw-r--r--core/pim/todo/opie-todo.control2
-rw-r--r--core/pim/todo/otaskeditor.cpp4
-rw-r--r--core/pim/todo/tableview.cpp34
-rw-r--r--core/pim/todo/templatedialog.cpp10
-rw-r--r--core/pim/todo/todoeditor.cpp5
-rw-r--r--core/pim/todo/todomanager.cpp7
-rw-r--r--core/pim/todo/todotemplatemanager.cpp7
-rw-r--r--core/pim/todo/todoview.cpp6
10 files changed, 56 insertions, 42 deletions
diff --git a/core/pim/todo/main.cpp b/core/pim/todo/main.cpp
index 7763169..d070ff8 100644
--- a/core/pim/todo/main.cpp
+++ b/core/pim/todo/main.cpp
@@ -17,13 +17,13 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "mainwindow.h" 21#include "mainwindow.h"
22 22
23 23#include <opie2/odebug.h>
24 24
25#include <qpe/qpeapplication.h> 25#include <qpe/qpeapplication.h>
26 26
27void myMessages( QtMsgType, const char* ) { 27void myMessages( QtMsgType, const char* ) {
28 28
29} 29}
@@ -34,13 +34,13 @@ int main( int argc, char **argv )
34 QPEApplication a( argc, argv ); 34 QPEApplication a( argc, argv );
35 35
36 QTime time; 36 QTime time;
37 time.start(); 37 time.start();
38 Todo::MainWindow mw; 38 Todo::MainWindow mw;
39 int t = time.elapsed(); 39 int t = time.elapsed();
40 qWarning("QTime %d", t/1000 ); 40 Opie::Core::owarn << "QTime " << t/1000 << oendl;
41 mw.setCaption( QObject::tr("Opie Todolist")); 41 mw.setCaption( QObject::tr("Opie Todolist"));
42 QObject::connect( &a, SIGNAL( flush() ), &mw, SLOT( slotFlush() ) ); 42 QObject::connect( &a, SIGNAL( flush() ), &mw, SLOT( slotFlush() ) );
43 QObject::connect( &a, SIGNAL( reload() ), &mw, SLOT( slotReload() ) ); 43 QObject::connect( &a, SIGNAL( reload() ), &mw, SLOT( slotReload() ) );
44 44
45 a.showMainWidget(&mw); 45 a.showMainWidget(&mw);
46 46
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp
index f0642c4..d552928 100644
--- a/core/pim/todo/mainwindow.cpp
+++ b/core/pim/todo/mainwindow.cpp
@@ -25,12 +25,13 @@
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29#include <unistd.h> 29#include <unistd.h>
30 30
31#include <opie2/odebug.h>
31#include <opie2/opimrecurrence.h> 32#include <opie2/opimrecurrence.h>
32#include <opie2/opimnotifymanager.h> 33#include <opie2/opimnotifymanager.h>
33#include <opie2/otodoaccessvcal.h> 34#include <opie2/otodoaccessvcal.h>
34#include <opie2/oapplicationfactory.h> 35#include <opie2/oapplicationfactory.h>
35 36
36#include <qpe/applnk.h> 37#include <qpe/applnk.h>
@@ -292,13 +293,13 @@ QPopupMenu* MainWindow::contextMenu( int , bool recur ) {
292 ; // FIXME 293 ; // FIXME
293 } 294 }
294 295
295 return menu; 296 return menu;
296} 297}
297QPopupMenu* MainWindow::options() { 298QPopupMenu* MainWindow::options() {
298 qWarning("Options"); 299 Opie::Core::owarn << "Options" << oendl;
299 return m_options; 300 return m_options;
300} 301}
301QPopupMenu* MainWindow::edit() { 302QPopupMenu* MainWindow::edit() {
302 return m_edit; 303 return m_edit;
303} 304}
304QToolBar* MainWindow::toolbar() { 305QToolBar* MainWindow::toolbar() {
@@ -311,13 +312,13 @@ OPimTodoAccess::List MainWindow::sorted( bool asc, int sortOrder ) {
311 int cat = 0; 312 int cat = 0;
312 if ( m_curCat != QWidget::tr("All Categories") ) 313 if ( m_curCat != QWidget::tr("All Categories") )
313 cat = currentCatId(); 314 cat = currentCatId();
314 if ( m_curCat == QWidget::tr("Unfiled") ) 315 if ( m_curCat == QWidget::tr("Unfiled") )
315 cat = -1; 316 cat = -1;
316 317
317 qWarning(" Category %d %s", cat, m_curCat.latin1() ); 318 Opie::Core::owarn << " Category " << cat << " " << m_curCat << oendl;
318 319
319 int filter = 1; 320 int filter = 1;
320 321
321 if (!m_completed ) 322 if (!m_completed )
322 filter |= 4; 323 filter |= 4;
323 if (m_overdue) 324 if (m_overdue)
@@ -370,13 +371,13 @@ void MainWindow::closeEvent( QCloseEvent* e ) {
370 if (m_syncing ) { 371 if (m_syncing ) {
371 e->accept(); 372 e->accept();
372 return; 373 return;
373 } 374 }
374 bool quit = false; 375 bool quit = false;
375 if ( m_todoMgr.saveAll() ){ 376 if ( m_todoMgr.saveAll() ){
376 qWarning("saved"); 377 Opie::Core::owarn << "saved" << oendl;
377 quit = true; 378 quit = true;
378 }else { 379 }else {
379 if ( QMessageBox::critical( this, QWidget::tr("Out of space"), 380 if ( QMessageBox::critical( this, QWidget::tr("Out of space"),
380 QWidget::tr("Todo was unable\n" 381 QWidget::tr("Todo was unable\n"
381 "to save your changes.\n" 382 "to save your changes.\n"
382 "Free up some space\n" 383 "Free up some space\n"
@@ -533,13 +534,13 @@ void MainWindow::slotEdit() {
533 * set the category 534 * set the category
534 */ 535 */
535void MainWindow::setCategory( int c) { 536void MainWindow::setCategory( int c) {
536 if ( c <= 0 ) return; 537 if ( c <= 0 ) return;
537 538
538 539
539 qWarning("Iterating over cats %d", c ); 540 Opie::Core::owarn << "Iterating over cats " << c << oendl;
540 for ( unsigned int i = 1; i < m_catMenu->count(); i++ ) 541 for ( unsigned int i = 1; i < m_catMenu->count(); i++ )
541 m_catMenu->setItemChecked(i, c == (int)i ); 542 m_catMenu->setItemChecked(i, c == (int)i );
542 543
543 if (c == 1 ) { 544 if (c == 1 ) {
544 m_curCat = QString::null; 545 m_curCat = QString::null;
545 setCaption( QWidget::tr("Todo") + " - " + QWidget::tr("All Categories" ) ); 546 setCaption( QWidget::tr("Todo") + " - " + QWidget::tr("All Categories" ) );
@@ -677,13 +678,13 @@ void MainWindow::slotShowDue(bool ov) {
677 m_overdue = ov; 678 m_overdue = ov;
678 currentView()->showOverDue( ov ); 679 currentView()->showOverDue( ov );
679 raiseCurrentView(); 680 raiseCurrentView();
680} 681}
681void MainWindow::slotShow( int uid ) { 682void MainWindow::slotShow( int uid ) {
682 if ( uid == 0 ) return; 683 if ( uid == 0 ) return;
683 qWarning("slotShow"); 684 Opie::Core::owarn << "slotShow" << oendl;
684 currentShow()->slotShow( event( uid ) ); 685 currentShow()->slotShow( event( uid ) );
685 m_stack->raiseWidget( currentShow()->widget() ); 686 m_stack->raiseWidget( currentShow()->widget() );
686} 687}
687void MainWindow::slotShowNext() { 688void MainWindow::slotShowNext() {
688 int l = currentView()->next(); 689 int l = currentView()->next();
689 if (l!=0) 690 if (l!=0)
@@ -736,13 +737,13 @@ void MainWindow::updateList() {
736} 737}
737void MainWindow::setReadAhead( uint count ) { 738void MainWindow::setReadAhead( uint count ) {
738 if (m_todoMgr.todoDB() ) 739 if (m_todoMgr.todoDB() )
739 m_todoMgr.todoDB()->setReadAhead( count ); 740 m_todoMgr.todoDB()->setReadAhead( count );
740} 741}
741void MainWindow::slotQuickEntered() { 742void MainWindow::slotQuickEntered() {
742 qWarning("entered"); 743 Opie::Core::owarn << "entered" << oendl;
743 OPimTodo todo = quickEditor()->todo(); 744 OPimTodo todo = quickEditor()->todo();
744 if (todo.isEmpty() ) 745 if (todo.isEmpty() )
745 return; 746 return;
746 747
747 m_todoMgr.add( todo ); 748 m_todoMgr.add( todo );
748 currentView()->addEvent( todo ); 749 currentView()->addEvent( todo );
@@ -783,13 +784,13 @@ void MainWindow::slotComplete( const OPimTodo& todo ) {
783 * if there is a next occurence 784 * if there is a next occurence
784 * from the duedate of the last recurrance 785 * from the duedate of the last recurrance
785 */ 786 */
786 QDate date; 787 QDate date;
787 if ( to2.recurrence().nextOcurrence( to2.dueDate().addDays(1), date ) ) { 788 if ( to2.recurrence().nextOcurrence( to2.dueDate().addDays(1), date ) ) {
788 int dayDiff = to.dueDate().daysTo( date ); 789 int dayDiff = to.dueDate().daysTo( date );
789 qWarning("day diff is %d", dayDiff ); 790 Opie::Core::owarn << "day diff is " << dayDiff << oendl;
790 QDate inval; 791 QDate inval;
791 /* generate a new uid for the old record */ 792 /* generate a new uid for the old record */
792 to.setUid( 1 ); 793 to.setUid( 1 );
793 794
794 /* add the old one cause it has a new UID here cause it was spin off */ 795 /* add the old one cause it has a new UID here cause it was spin off */
795 m_todoMgr.add( to ); 796 m_todoMgr.add( to );
@@ -946,21 +947,21 @@ namespace {
946 } 947 }
947 return nonMatching; 948 return nonMatching;
948 } 949 }
949 void addAlarms( const OPimNotifyManager::Alarms& als, int uid ) { 950 void addAlarms( const OPimNotifyManager::Alarms& als, int uid ) {
950 OPimNotifyManager::Alarms::ConstIterator it; 951 OPimNotifyManager::Alarms::ConstIterator it;
951 for ( it = als.begin(); it != als.end(); ++it ) { 952 for ( it = als.begin(); it != als.end(); ++it ) {
952 qWarning("Adding alarm for %s", (*it).dateTime().toString().latin1() ); 953 Opie::Core::owarn << "Adding alarm for " << (*it).dateTime().toString() << oendl;
953 AlarmServer::addAlarm( (*it).dateTime(), "QPE/Application/todolist", "alarm(QDateTime,int)", uid ); 954 AlarmServer::addAlarm( (*it).dateTime(), "QPE/Application/todolist", "alarm(QDateTime,int)", uid );
954 } 955 }
955 956
956 } 957 }
957 void removeAlarms( const OPimNotifyManager::Alarms& als, int uid ) { 958 void removeAlarms( const OPimNotifyManager::Alarms& als, int uid ) {
958 OPimNotifyManager::Alarms::ConstIterator it; 959 OPimNotifyManager::Alarms::ConstIterator it;
959 for ( it = als.begin(); it != als.end(); ++it ) { 960 for ( it = als.begin(); it != als.end(); ++it ) {
960 qWarning("Removinf alarm for %s", (*it).dateTime().toString().latin1() ); 961 Opie::Core::owarn << "Removinf alarm for " << (*it).dateTime().toString() << oendl;
961 AlarmServer::deleteAlarm( (*it).dateTime(), "QPE/Application/todolist", "alarm(QDateTime,int)", uid ); 962 AlarmServer::deleteAlarm( (*it).dateTime(), "QPE/Application/todolist", "alarm(QDateTime,int)", uid );
962 } 963 }
963 } 964 }
964} 965}
965 966
966void MainWindow::handleAlarms( const OPimTodo& oldTodo, const OPimTodo& newTodo) { 967void MainWindow::handleAlarms( const OPimTodo& oldTodo, const OPimTodo& newTodo) {
diff --git a/core/pim/todo/opie-todo.control b/core/pim/todo/opie-todo.control
index 47c2b67..3a65c04 100644
--- a/core/pim/todo/opie-todo.control
+++ b/core/pim/todo/opie-todo.control
@@ -1,10 +1,10 @@
1Package: opie-todo 1Package: opie-todo
2Files: plugins/application/libtodolist.so* bin/todolist apps/1Pim/todo.desktop 2Files: plugins/application/libtodolist.so* bin/todolist apps/1Pim/todo.desktop
3Priority: optional 3Priority: optional
4Section: opie/pim 4Section: opie/pim
5Maintainer: Holger 'zecke' Freyther <zecke@handhelds.org> 5Maintainer: Holger 'zecke' Freyther <zecke@handhelds.org>
6Architecture: arm 6Architecture: arm
7Depends: task-opie-minimal, libopiecore2, libopieui2, libopiepim2, opie-pics, libopiedb2 7Depends: task-opie-minimal, libopiecore2, libopieui2, libopiepim2, opie-pics
8Description: Todo list manager 8Description: Todo list manager
9 A Todo list manager for the Opie environment. 9 A Todo list manager for the Opie environment.
10Version: $QPE_VERSION$EXTRAVERSION 10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp
index a8349c1..55a3dd5 100644
--- a/core/pim/todo/otaskeditor.cpp
+++ b/core/pim/todo/otaskeditor.cpp
@@ -1,8 +1,10 @@
1#include <qlayout.h> 1#include <qlayout.h>
2 2
3#include <opie2/odebug.h>
4
3#include "taskeditoroverview.h" 5#include "taskeditoroverview.h"
4#include "taskeditorstatus.h" 6#include "taskeditorstatus.h"
5#include "taskeditoralarms.h" 7#include "taskeditoralarms.h"
6 8
7#include "otaskeditor.h" 9#include "otaskeditor.h"
8 10
@@ -30,13 +32,13 @@ void OTaskEditor::init( int cur ) {
30 load(to); 32 load(to);
31} 33}
32void OTaskEditor::init( const OPimTodo& to ) { 34void OTaskEditor::init( const OPimTodo& to ) {
33 load( to ); 35 load( to );
34} 36}
35OPimTodo OTaskEditor::todo()const{ 37OPimTodo OTaskEditor::todo()const{
36 qWarning("saving!"); 38 Opie::Core::owarn << "saving!" << oendl;
37 OPimTodo to ( m_todo ); 39 OPimTodo to ( m_todo );
38 m_overView->save( to ); 40 m_overView->save( to );
39 m_stat->save( to ); 41 m_stat->save( to );
40 to.setRecurrence( m_rec->recurrence() ); 42 to.setRecurrence( m_rec->recurrence() );
41 m_alarm->save( to ); 43 m_alarm->save( to );
42 44
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
@@ -26,21 +26,22 @@
26 26
27*/ 27*/
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"
45 46
46using namespace Todo; 47using namespace Todo;
@@ -191,13 +192,13 @@ QString TableView::currentRepresentation() {
191void TableView::showOverDue( bool ) { 192void TableView::showOverDue( bool ) {
192 clear(); 193 clear();
193 updateView(); 194 updateView();
194} 195}
195 196
196void TableView::updateView( ) { 197void 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!
202 * 203 *
203 * Calculate that screensize 204 * Calculate that screensize
@@ -205,13 +206,13 @@ void TableView::updateView( ) {
205 todoWindow()->setReadAhead( 4 ); 206 todoWindow()->setReadAhead( 4 );
206 sort(); 207 sort();
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 );
216 viewport()->setUpdatesEnabled( false ); 217 viewport()->setUpdatesEnabled( false );
217 218
@@ -251,17 +252,17 @@ void TableView::replaceEvent( const OPimTodo& ev) {
251 * either this or the old align table 252 * either this or the old align table
252 */ 253 */
253void TableView::removeEvent( int ) { 254void TableView::removeEvent( int ) {
254 updateView(); 255 updateView();
255} 256}
256void TableView::setShowCompleted( bool b) { 257void TableView::setShowCompleted( bool b) {
257 qWarning("Show Completed %d" , b ); 258 Opie::Core::owarn << "Show Completed " << b << oendl;
258 updateView(); 259 updateView();
259} 260}
260void TableView::setShowDeadline( bool b ) { 261void 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 );
266 267
267 // Try to intelligently size columns 268 // Try to intelligently size columns
@@ -278,13 +279,13 @@ void TableView::setShowDeadline( bool b ) {
278 setColumnWidth( 3, width ); 279 setColumnWidth( 3, width );
279 col2width -= width; 280 col2width -= width;
280 } 281 }
281 setColumnWidth( 2, col2width ); 282 setColumnWidth( 2, col2width );
282} 283}
283void TableView::setShowCategory( const QString& str) { 284void 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;
289 m_first = false; 290 m_first = false;
290 291
@@ -343,20 +344,21 @@ void TableView::slotClicked(int row, int col, int,
343 344
344 345
345} 346}
346void TableView::slotPressed(int row, int col, int, 347void 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}
355void TableView::slotValueChanged( int, int ) { 357void TableView::slotValueChanged( int, int ) {
356 qWarning("Value Changed"); 358 Opie::Core::owarn << "Value Changed" << oendl;
357} 359}
358void TableView::slotCurrentChanged(int, int ) { 360void TableView::slotCurrentChanged(int, int ) {
359 m_menuTimer->stop(); 361 m_menuTimer->stop();
360} 362}
361QWidget* TableView::widget() { 363QWidget* TableView::widget() {
362 return this; 364 return this;
@@ -366,13 +368,13 @@ QWidget* TableView::widget() {
366 * because we want to sort whole row 368 * because we want to sort whole row
367 * based 369 * based
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 */
371void TableView::sortColumn( int col, bool asc, bool ) { 373void 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}
377void TableView::viewportPaintEvent( QPaintEvent* e) { 379void TableView::viewportPaintEvent( QPaintEvent* e) {
378 if (m_enablePaint ) 380 if (m_enablePaint )
@@ -489,13 +491,13 @@ QWidget* TableView::createEditor(int row, int col, bool )const {
489 case 0: 491 case 0:
490 default: 492 default:
491 return 0l; 493 return 0l;
492 } 494 }
493} 495}
494void TableView::setCellContentFromEditor(int row, int col ) { 496void 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;
500 OPimTodo todo = sorted()[row]; 502 OPimTodo todo = sorted()[row];
501 if ( todo.priority() != pri ) { 503 if ( todo.priority() != pri ) {
@@ -525,13 +527,13 @@ void TableView::slotPriority() {
525 * filled enough. 527 * filled enough.
526 * We will try to read ahead 4 items in both ways 528 * We will try to read ahead 4 items in both ways
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 */
530void TableView::timerEvent( QTimerEvent* ) { 532void 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();
536 if ( m_row ) { 538 if ( m_row ) {
537 int ro = row-4; 539 int ro = row-4;
@@ -573,13 +575,13 @@ void TableView::timerEvent( QTimerEvent* ) {
573 * row and two columns! 575 * row and two columns!
574 */ 576 */
575void TableView::contentsMouseReleaseEvent( QMouseEvent* e) { 577void 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;
584 } 586 }
585 QTable::contentsMouseReleaseEvent( e ); 587 QTable::contentsMouseReleaseEvent( e );
diff --git a/core/pim/todo/templatedialog.cpp b/core/pim/todo/templatedialog.cpp
index 8dfbd0b..32327a6 100644
--- a/core/pim/todo/templatedialog.cpp
+++ b/core/pim/todo/templatedialog.cpp
@@ -1,6 +1,8 @@
1#include <opie2/odebug.h>
2
1#include <qpushbutton.h> 3#include <qpushbutton.h>
2#include <qhbox.h> 4#include <qhbox.h>
3#include <qlayout.h> 5#include <qlayout.h>
4#include <qlistview.h> 6#include <qlistview.h>
5#include <qlineedit.h> 7#include <qlineedit.h>
6 8
@@ -46,17 +48,17 @@ QListView* TemplateDialog::listView() {
46 return m_list; 48 return m_list;
47} 49}
48QLineEdit* TemplateDialog::edit() { 50QLineEdit* TemplateDialog::edit() {
49 return m_lne; 51 return m_lne;
50} 52}
51void TemplateDialog::slotAdd() { 53void TemplateDialog::slotAdd() {
52 qWarning("Not Implemented here"); 54 Opie::Core::owarn << "Not Implemented here" << oendl;
53} 55}
54void TemplateDialog::slotRemove() { 56void TemplateDialog::slotRemove() {
55 qWarning("Not Implemented here"); 57 Opie::Core::owarn << "Not Implemented here" << oendl;
56} 58}
57void TemplateDialog::slotEdit() { 59void TemplateDialog::slotEdit() {
58 qWarning("Not Implemented here"); 60 Opie::Core::owarn << "Not Implemented here" << oendl;
59} 61}
60void TemplateDialog::slotReturn() { 62void TemplateDialog::slotReturn() {
61 qWarning("Not Implemented here"); 63 Opie::Core::owarn << "Not Implemented here" << oendl;
62} 64}
diff --git a/core/pim/todo/todoeditor.cpp b/core/pim/todo/todoeditor.cpp
index 4b5ecb1..7857d52 100644
--- a/core/pim/todo/todoeditor.cpp
+++ b/core/pim/todo/todoeditor.cpp
@@ -1,6 +1,7 @@
1#include <opie2/odebug.h>
1 2
2#include <qpe/qpeapplication.h> 3#include <qpe/qpeapplication.h>
3 4
4#include "otaskeditor.h" 5#include "otaskeditor.h"
5#include "todoeditor.h" 6#include "todoeditor.h"
6 7
@@ -27,14 +28,14 @@ OPimTodo Editor::newTodo( int cur,
27 if ( QDialog::Accepted == ret ) { 28 if ( QDialog::Accepted == ret ) {
28 m_accepted = true; 29 m_accepted = true;
29 }else 30 }else
30 m_accepted = false; 31 m_accepted = false;
31 32
32 OPimTodo ev = e->todo(); 33 OPimTodo ev = e->todo();
33 qWarning("Todo uid"); 34 Opie::Core::owarn << "Todo uid" << oendl;
34 qWarning("Todo %s %d %d", ev.summary().latin1(), ev.progress(), ev.isCompleted() ); 35 Opie::Core::owarn << "Todo " << ev.summary() << " " << ev.progress() << " " << ev.isCompleted() << oendl;
35 ev.setUid(1); 36 ev.setUid(1);
36 37
37 return ev; 38 return ev;
38} 39}
39OPimTodo Editor::edit( QWidget *, 40OPimTodo Editor::edit( QWidget *,
40 const OPimTodo& todo ) { 41 const OPimTodo& todo ) {
diff --git a/core/pim/todo/todomanager.cpp b/core/pim/todo/todomanager.cpp
index 21e1d0c..7826747 100644
--- a/core/pim/todo/todomanager.cpp
+++ b/core/pim/todo/todomanager.cpp
@@ -22,34 +22,37 @@
22    --        :-=` this library; see the file COPYING.LIB. 22    --        :-=` this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation, 23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330, 24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28
29#include <opie2/odebug.h>
30
28#include <qpe/categoryselect.h> 31#include <qpe/categoryselect.h>
29 32
30#include "todomanager.h" 33#include "todomanager.h"
31 34
32using namespace Todo; 35using namespace Todo;
33 36
34TodoManager::TodoManager( QObject *obj ) 37TodoManager::TodoManager( QObject *obj )
35 : QObject( obj ) { 38 : QObject( obj ) {
36 m_db = 0l; 39 m_db = 0l;
37 QTime time; 40 QTime time;
38 time.start(); 41 time.start();
39 int el = time.elapsed(); 42 int el = time.elapsed();
40 qWarning("QTimer for loading %d", el/1000 ); 43 Opie::Core::owarn << "QTimer for loading " << el/1000 << oendl;
41} 44}
42TodoManager::~TodoManager() { 45TodoManager::~TodoManager() {
43 delete m_db; 46 delete m_db;
44} 47}
45OPimTodo TodoManager::event(int uid ) { 48OPimTodo TodoManager::event(int uid ) {
46 return m_db->find( uid ); 49 return m_db->find( uid );
47} 50}
48void TodoManager::updateList() { 51void TodoManager::updateList() {
49 qWarning("update list"); 52 Opie::Core::owarn << "update lists" << oendl;
50 m_list = m_db->allRecords(); 53 m_list = m_db->allRecords();
51} 54}
52OPimTodoAccess::List TodoManager::list() const{ 55OPimTodoAccess::List TodoManager::list() const{
53 return m_list; 56 return m_list;
54} 57}
55OPimTodoAccess::List TodoManager::sorted( bool asc, int so, int f, int cat ) { 58OPimTodoAccess::List TodoManager::sorted( bool asc, int so, int f, int cat ) {
diff --git a/core/pim/todo/todotemplatemanager.cpp b/core/pim/todo/todotemplatemanager.cpp
index eeac51b..0b20d5a 100644
--- a/core/pim/todo/todotemplatemanager.cpp
+++ b/core/pim/todo/todotemplatemanager.cpp
@@ -1,6 +1,7 @@
1#include <opie2/odebug.h>
1#include <opie2/otodoaccess.h> 2#include <opie2/otodoaccess.h>
2#include <opie2/otodoaccessxml.h> 3#include <opie2/otodoaccessxml.h>
3 4
4#include <qpe/config.h> 5#include <qpe/config.h>
5#include <qpe/global.h> 6#include <qpe/global.h>
6 7
@@ -32,13 +33,13 @@ void TemplateManager::load() {
32 continue; 33 continue;
33 34
34 m_templates.insert( str, ev ); 35 m_templates.insert( str, ev );
35 } 36 }
36} 37}
37void TemplateManager::save() { 38void TemplateManager::save() {
38 qWarning("Saving!!!!"); 39 Opie::Core::owarn << "Saving!!!!" << oendl;
39 Config conf("todolist_templates"); 40 Config conf("todolist_templates");
40 41
41 OPimTodoAccessXML *res = new OPimTodoAccessXML( "template", 42 OPimTodoAccessXML *res = new OPimTodoAccessXML( "template",
42 m_path ); 43 m_path );
43 OPimTodoAccess db(res); 44 OPimTodoAccess db(res);
44 db.load(); 45 db.load();
@@ -46,21 +47,21 @@ void TemplateManager::save() {
46 47
47 48
48 QMap<QString, OPimTodo>::Iterator it; 49 QMap<QString, OPimTodo>::Iterator it;
49 for ( it = m_templates.begin(); it != m_templates.end(); ++it ) { 50 for ( it = m_templates.begin(); it != m_templates.end(); ++it ) {
50 OPimTodo ev = it.data(); 51 OPimTodo ev = it.data();
51 conf.setGroup( QString::number( ev.uid() ) ); 52 conf.setGroup( QString::number( ev.uid() ) );
52 qWarning("Name" + it.key() ); 53 Opie::Core::owarn << "Name " << it.key() << oendl;
53 conf.writeEntry("Name", it.key() ); 54 conf.writeEntry("Name", it.key() );
54 db.add( ev ); 55 db.add( ev );
55 } 56 }
56 db.save(); 57 db.save();
57} 58}
58void TemplateManager::addEvent( const QString& str, 59void TemplateManager::addEvent( const QString& str,
59 const OPimTodo& ev) { 60 const OPimTodo& ev) {
60 qWarning("AddEvent"+ str ); 61 Opie::Core::owarn << "AddEvent " << str << oendl;
61 OPimTodo todo = ev; 62 OPimTodo todo = ev;
62 if( ev.uid() == 0 ) 63 if( ev.uid() == 0 )
63 todo.setUid(1); // generate a new uid 64 todo.setUid(1); // generate a new uid
64 65
65 m_templates.replace( str, todo ); 66 m_templates.replace( str, todo );
66} 67}
diff --git a/core/pim/todo/todoview.cpp b/core/pim/todo/todoview.cpp
index d99cf77..03e1060 100644
--- a/core/pim/todo/todoview.cpp
+++ b/core/pim/todo/todoview.cpp
@@ -1,8 +1,10 @@
1#include "mainwindow.h" 1#include "mainwindow.h"
2 2
3#include <opie2/odebug.h>
4
3#include "todoview.h" 5#include "todoview.h"
4 6
5using namespace Todo; 7using namespace Todo;
6 8
7 9
8 10
@@ -28,22 +30,22 @@ OPimTodoAccess::List TodoView::list(){
28} 30}
29OPimTodoAccess::List TodoView::sorted()const{ 31OPimTodoAccess::List TodoView::sorted()const{
30 return m_sort; 32 return m_sort;
31} 33}
32void TodoView::sort() { 34void TodoView::sort() {
33 m_sort = todoWindow()->sorted(m_asc,m_sortOrder ); 35 m_sort = todoWindow()->sorted(m_asc,m_sortOrder );
34 qWarning("m_sort.count() = %d", m_sort.count() ); 36 Opie::Core::owarn << "m_sort.count() = " << m_sort.count() << oendl;
35} 37}
36void TodoView::sort(int sort) { 38void TodoView::sort(int sort) {
37 m_sort = todoWindow()->sorted(m_asc, m_sortOrder, sort ); 39 m_sort = todoWindow()->sorted(m_asc, m_sortOrder, sort );
38} 40}
39void TodoView::setSortOrder( int order ) { 41void TodoView::setSortOrder( int order ) {
40 m_sortOrder = order; 42 m_sortOrder = order;
41} 43}
42void TodoView::setAscending( bool b ) { 44void TodoView::setAscending( bool b ) {
43 qWarning("setAscending %d", b ); 45 Opie::Core::owarn << "setAscending " << b << oendl;
44 m_asc = b; 46 m_asc = b;
45} 47}
46void TodoView::update(int, const SmallTodo& ) { 48void TodoView::update(int, const SmallTodo& ) {
47 //m_main->slotUpate1( uid, to ); 49 //m_main->slotUpate1( uid, to );
48} 50}
49void TodoView::update(int , const OPimTodo& ev ) { 51void TodoView::update(int , const OPimTodo& ev ) {