File indexing completed on 2024-04-28 15:18:57
0001 /* 0002 This file is part of the kcalcore library. 0003 0004 SPDX-FileCopyrightText: 2003 Cornelius Schumacher <schumacher@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #include "event.h" 0010 #include "icalformat.h" 0011 0012 #include <QDebug> 0013 0014 #include <iostream> 0015 0016 using namespace KCalendarCore; 0017 0018 int main(int, char **) 0019 { 0020 // std::cout << "Hello World!" << std::endl; 0021 Event::Ptr ev = Event::Ptr(new Event); 0022 ev->setSummary(QStringLiteral("Griazi")); 0023 ICalFormat iformat; 0024 QString icalstr = iformat.toICalString(ev); 0025 qDebug() << icalstr; 0026 Incidence::Ptr ev2 = iformat.fromString(icalstr); 0027 qDebug() << "Event reread!"; 0028 0029 if (ev2) { 0030 qDebug() << iformat.toICalString(ev2); 0031 } else { 0032 qDebug() << "Could not read incidence"; 0033 } 0034 }