-rw-r--r-- | libkcal/vcalformat.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp index 72a781a..1167e58 100644 --- a/libkcal/vcalformat.cpp +++ b/libkcal/vcalformat.cpp | |||
@@ -165,6 +165,25 @@ bool VCalFormat::fromString( Calendar *calendar, const QString &text ) | |||
165 | return true; | 165 | return true; |
166 | } | 166 | } |
167 | 167 | ||
168 | QString VCalFormat::eventToString( Event * event) | ||
169 | { | ||
170 | if ( !event ) return QString::null; | ||
171 | VObject *vevent = eventToVEvent( event ); | ||
172 | char *buf = writeMemVObject( 0, 0, vevent ); | ||
173 | QString result( buf ); | ||
174 | cleanVObject( vevent ); | ||
175 | return result; | ||
176 | } | ||
177 | QString VCalFormat::todoToString( Todo * todo ) | ||
178 | { | ||
179 | if ( !todo ) return QString::null; | ||
180 | VObject *vevent = eventToVTodo( todo ); | ||
181 | char *buf = writeMemVObject( 0, 0, vevent ); | ||
182 | QString result( buf ); | ||
183 | cleanVObject( vevent ); | ||
184 | return result; | ||
185 | } | ||
186 | |||
168 | QString VCalFormat::toString( Calendar *calendar ) | 187 | QString VCalFormat::toString( Calendar *calendar ) |
169 | { | 188 | { |
170 | // TODO: Factor out VCalFormat::asString() | 189 | // TODO: Factor out VCalFormat::asString() |