2
This file is part of the kcal library.
4
Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
6
This library is free software; you can redistribute it and/or
7
modify it under the terms of the GNU Library General Public
8
License as published by the Free Software Foundation; either
9
version 2 of the License, or (at your option) any later version.
11
This library is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
Library General Public License for more details.
16
You should have received a copy of the GNU Library General Public License
17
along with this library; see the file COPYING.LIB. If not, write to
18
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
Boston, MA 02110-1301, USA.
24
#include <kapplication.h>
27
#include "calformat.h"
31
//TODO: change strings to use "kcal" instead of "libkcal"?
32
QString CalFormat::mApplication = QLatin1String("libkcal");
33
QString CalFormat::mProductId = QLatin1String("-//K Desktop Environment//NONSGML libkcal 3.5//EN");
36
CalFormat::CalFormat()
41
CalFormat::~CalFormat()
46
void CalFormat::clearException()
52
void CalFormat::setException(ErrorFormat *exception)
55
mException = exception;
58
ErrorFormat *CalFormat::exception()
63
void CalFormat::setApplication(const QString& application, const QString& productID)
65
mApplication = application;
66
mProductId = productID;
69
QString CalFormat::createUniqueId()
71
int hashTime = QTime::currentTime().hour() +
72
QTime::currentTime().minute() + QTime::currentTime().second() +
73
QTime::currentTime().msec();
74
QString uidStr = QString("%1-%2.%3")
76
.arg(KRandom::random())