From ff47b17768607d8819ef5cd3316a1cab0abdcf3a Mon Sep 17 00:00:00 2001 From: zecke Date: Sat, 15 Jun 2002 16:46:37 +0000 Subject: Summary support --- (limited to 'libopie/todovcalresource.cpp') diff --git a/libopie/todovcalresource.cpp b/libopie/todovcalresource.cpp index 75f2197..80f8c60 100644 --- a/libopie/todovcalresource.cpp +++ b/libopie/todovcalresource.cpp @@ -2,24 +2,24 @@                =. This file is part of the OPIE Project              .=l. Copyright (c) 2002 Holger Freyther            .>+-= the use of vobject was inspired by libkcal - _;:,     .>    :=|. This library is free software; you can + _;:,     .>    :=|. This library is free software; you can .> <`_,   >  .   <= redistribute it and/or modify it under :`=1 )Y*s>-.--   : the terms of the GNU Library General Public .="- .-=="i,     .._ License as published by the Free Software  - .   .-<_>     .<> Foundation; either version 2 of the License,      ._= =}       : or (at your option) any later version. -    .%`+i>       _;_. -    .i_,=:_.      -       _;_. +    .i_,=:_.      -`: PARTICULAR PURPOSE. See the GNU ..}^=.=       =       ; Library General Public License for more ++=   -.     .`     .: details. - :     =  ...= . :.=- + :     =  ...= . :.=-  -.   .:....=;==+<; You should have received a copy of the GNU   -_. . .   )=.  = Library General Public License along with -    --        :-=` this library; see the file COPYING.LIB. +    --        :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -50,7 +50,7 @@ static VObject *vobjByEvent( const ToDoEvent &event ) addPropValue( task, VCPriorityProp, string.local8Bit() ); addPropValue( task, VCCategoriesProp, event.allCategories().join(";").local8Bit() ); addPropValue( task, VCDescriptionProp, event.description().local8Bit() ); - addPropValue( task, VCSummaryProp, event.description().left(15).local8Bit() ); + addPropValue( task, VCSummaryProp, event.summary().left(15).local8Bit() ); return task; }; @@ -63,7 +63,12 @@ static ToDoEvent eventByVObj( VObject *obj ){ if( ( ob = isAPropertyOf( obj, VCDescriptionProp )) != 0 ){ name = vObjectStringZValue( ob ); event.setDescription( name ); - } + } + // summary + if ( ( ob = isAPropertyOf( obj, VCSummaryProp ) ) != 0 ) { + name = vObjectStringZValue( ob ); + event.setSummary( name ); + } // completed if( ( ob = isAPropertyOf( obj, VCStatusProp )) != 0 ){ name = vObjectStringZValue( ob ); @@ -85,7 +90,7 @@ static ToDoEvent eventByVObj( VObject *obj ){ event.setHasDate( true ); name = vObjectStringZValue( ob ); event.setDate( TimeConversion::fromISO8601( name).date() ); - } + } // categories if((ob = isAPropertyOf( obj, VCCategoriesProp )) != 0 ){ name = vObjectStringZValue( ob ); @@ -96,7 +101,7 @@ static ToDoEvent eventByVObj( VObject *obj ){ }; -QValueList ToDoVCalResource::load(const QString &file) +QValueList ToDoVCalResource::load(const QString &file) { QValueList events; VObject *vcal = 0l; -- cgit v0.9.0.2