author | zecke <zecke> | 2002-03-21 00:26:39 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-03-21 00:26:39 (UTC) |
commit | 8bfe366ce8667addc539f11fc560250c306340ae (patch) (side-by-side diff) | |
tree | 4b890a47d86621d3e1f0aacde2485457862f02c8 /core/pim/todo/mainwindow.cpp | |
parent | e8f15a98c611b0c6030e8210672b249b42107526 (diff) | |
download | opie-8bfe366ce8667addc539f11fc560250c306340ae.zip opie-8bfe366ce8667addc539f11fc560250c306340ae.tar.gz opie-8bfe366ce8667addc539f11fc560250c306340ae.tar.bz2 |
Move todolist to tododb
Please test todolist
Diffstat (limited to 'core/pim/todo/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/mainwindow.cpp | 27 |
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 @@ +#include <opie/tododb.h> +#include <opie/todovcalresource.h> + #include <qpe/qpeapplication.h> @@ -34,3 +37,3 @@ #include <qpe/resource.h> -#include <qpe/task.h> +//#include <qpe/task.h> #include <qpe/qpetoolbar.h> @@ -217,3 +220,3 @@ void TodoWindow::slotNew() - Task todo; + ToDoEvent todo; @@ -223,3 +226,3 @@ void TodoWindow::slotNew() int ret = e.exec(); - + qWarning("finished" ); if ( ret == QDialog::Accepted ) { @@ -227,3 +230,3 @@ void TodoWindow::slotNew() todo = e.todoEntry(); - todo.assignUid(); + //todo.assignUid(); table->addEntry( todo ); @@ -277,3 +280,3 @@ void TodoWindow::slotEdit() - Task todo = table->currentEntry(); + ToDoEvent todo = table->currentEntry(); @@ -351,4 +354,3 @@ void TodoWindow::populateCategories() - int id, - rememberId; + int id, rememberId; id = 1; @@ -445,4 +447,5 @@ void TodoWindow::setDocument( const QString &filename ) - QValueList<Task> tl = Task::readVCalendar( filename ); - for( QValueList<Task>::Iterator it = tl.begin(); it != tl.end(); ++it ) { + ToDoDB todoDB(filename, new ToDoVCalResource() ); + QValueList<ToDoEvent> tl = todoDB.rawToDos(); + for( QValueList<ToDoEvent>::Iterator it = tl.begin(); it != tl.end(); ++it ) { table->addEntry( *it ); @@ -456,5 +459,7 @@ void TodoWindow::slotBeam() unlink( beamfile ); // delete if exists - Task c = table->currentEntry(); + ToDoEvent c = table->currentEntry(); mkdir("/tmp/obex/", 0755); - Task::writeVCalendar( beamfile, c ); + ToDoDB todoDB( beamfile, new ToDoVCalResource() ); + todoDB.addEvent( c ); + todoDB.save(); Ir *ir = new Ir( this ); |