summaryrefslogtreecommitdiff
path: root/core/pim/todo/mainwindow.cpp
Unidiff
Diffstat (limited to 'core/pim/todo/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/mainwindow.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp
index 6709811..f3afa5f 100644
--- a/core/pim/todo/mainwindow.cpp
+++ b/core/pim/todo/mainwindow.cpp
@@ -26,2 +26,5 @@
26 26
27#include <opie/tododb.h>
28#include <opie/todovcalresource.h>
29
27#include <qpe/qpeapplication.h> 30#include <qpe/qpeapplication.h>
@@ -34,3 +37,3 @@
34#include <qpe/resource.h> 37#include <qpe/resource.h>
35#include <qpe/task.h> 38//#include <qpe/task.h>
36#include <qpe/qpetoolbar.h> 39#include <qpe/qpetoolbar.h>
@@ -217,3 +220,3 @@ void TodoWindow::slotNew()
217 220
218 Task todo; 221 ToDoEvent todo;
219 222
@@ -223,3 +226,3 @@ void TodoWindow::slotNew()
223 int ret = e.exec(); 226 int ret = e.exec();
224 227 qWarning("finished" );
225 if ( ret == QDialog::Accepted ) { 228 if ( ret == QDialog::Accepted ) {
@@ -227,3 +230,3 @@ void TodoWindow::slotNew()
227 todo = e.todoEntry(); 230 todo = e.todoEntry();
228 todo.assignUid(); 231 //todo.assignUid();
229 table->addEntry( todo ); 232 table->addEntry( todo );
@@ -277,3 +280,3 @@ void TodoWindow::slotEdit()
277 280
278 Task todo = table->currentEntry(); 281 ToDoEvent todo = table->currentEntry();
279 282
@@ -351,4 +354,3 @@ void TodoWindow::populateCategories()
351 354
352 int id, 355 int id, rememberId;
353 rememberId;
354 id = 1; 356 id = 1;
@@ -445,4 +447,5 @@ void TodoWindow::setDocument( const QString &filename )
445 447
446 QValueList<Task> tl = Task::readVCalendar( filename ); 448 ToDoDB todoDB(filename, new ToDoVCalResource() );
447 for( QValueList<Task>::Iterator it = tl.begin(); it != tl.end(); ++it ) { 449 QValueList<ToDoEvent> tl = todoDB.rawToDos();
450 for( QValueList<ToDoEvent>::Iterator it = tl.begin(); it != tl.end(); ++it ) {
448 table->addEntry( *it ); 451 table->addEntry( *it );
@@ -456,5 +459,7 @@ void TodoWindow::slotBeam()
456 unlink( beamfile ); // delete if exists 459 unlink( beamfile ); // delete if exists
457 Task c = table->currentEntry(); 460 ToDoEvent c = table->currentEntry();
458 mkdir("/tmp/obex/", 0755); 461 mkdir("/tmp/obex/", 0755);
459 Task::writeVCalendar( beamfile, c ); 462 ToDoDB todoDB( beamfile, new ToDoVCalResource() );
463 todoDB.addEvent( c );
464 todoDB.save();
460 Ir *ir = new Ir( this ); 465 Ir *ir = new Ir( this );