summaryrefslogtreecommitdiff
path: root/libopie/tododb.cpp
authorzecke <zecke>2002-04-13 23:18:09 (UTC)
committer zecke <zecke>2002-04-13 23:18:09 (UTC)
commit707f0d3dd81b8ecec2df4e942c0efd2ee51b7fc5 (patch) (unidiff)
treed17645bbf5e0318e6e10c3377605c107a110ebd1 /libopie/tododb.cpp
parent0f7ff8056deb70f1c32bdcf46bb2b623063bdc1c (diff)
downloadopie-707f0d3dd81b8ecec2df4e942c0efd2ee51b7fc5.zip
opie-707f0d3dd81b8ecec2df4e942c0efd2ee51b7fc5.tar.gz
opie-707f0d3dd81b8ecec2df4e942c0efd2ee51b7fc5.tar.bz2
PopupMenu for fontsize handling like on the Zaurus
Diffstat (limited to 'libopie/tododb.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/tododb.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libopie/tododb.cpp b/libopie/tododb.cpp
index 7814c4f..3f6dc30 100644
--- a/libopie/tododb.cpp
+++ b/libopie/tododb.cpp
@@ -35,32 +35,33 @@ public:
35 if( (*it).hasDate() ){ 35 if( (*it).hasDate() ){
36 map.insert("DateYear", QString::number( (*it).date().year() ) ); 36 map.insert("DateYear", QString::number( (*it).date().year() ) );
37 map.insert("DateMonth", QString::number( (*it).date().month() ) ); 37 map.insert("DateMonth", QString::number( (*it).date().month() ) );
38 map.insert("DateDay", QString::number( (*it).date().day() ) ); 38 map.insert("DateDay", QString::number( (*it).date().day() ) );
39 } 39 }
40 map.insert("Uid", QString::number( (*it).uid() ) ); 40 map.insert("Uid", QString::number( (*it).uid() ) );
41 task->setTagName("Task" ); 41 task->setTagName("Task" );
42 task->setAttributes( map ); 42 task->setAttributes( map );
43 tasks->appendChild(task); 43 tasks->appendChild(task);
44 } 44 }
45 QFile file( name); 45 QFile file( name);
46 if( file.open(IO_WriteOnly ) ){ 46 if( file.open(IO_WriteOnly ) ){
47 QTextStream stream(&file ); 47 QTextStream stream(&file );
48 stream << "<!DOCTYPE Tasks>" << endl; 48 stream << "<!DOCTYPE Tasks>" << endl;
49 tasks->save(stream ); 49 tasks->save(stream );
50 delete tasks; 50 delete tasks;
51 stream << "</Tasks>" << endl;
51 file.close(); 52 file.close();
52 return true; 53 return true;
53 } 54 }
54 return false; 55 return false;
55 } 56 }
56 QValueList<ToDoEvent> load( const QString &name ){ 57 QValueList<ToDoEvent> load( const QString &name ){
57 qWarning("loading tododb" ); 58 qWarning("loading tododb" );
58 QValueList<ToDoEvent> m_todos; 59 QValueList<ToDoEvent> m_todos;
59 XMLElement *root = XMLElement::load( name ); 60 XMLElement *root = XMLElement::load( name );
60 if(root != 0l ){ // start parsing 61 if(root != 0l ){ // start parsing
61 qWarning("ToDoDB::load tagName(): %s", root->tagName().latin1() ); 62 qWarning("ToDoDB::load tagName(): %s", root->tagName().latin1() );
62 //if( root->tagName() == QString::fromLatin1("Tasks" ) ){// Start 63 //if( root->tagName() == QString::fromLatin1("Tasks" ) ){// Start
63 XMLElement *element = root->firstChild(); 64 XMLElement *element = root->firstChild();
64 element = element->firstChild(); 65 element = element->firstChild();
65 while( element ){ 66 while( element ){
66 qWarning("ToDoDB::load element tagName() : %s", element->tagName().latin1() ); 67 qWarning("ToDoDB::load element tagName() : %s", element->tagName().latin1() );