2 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 As a special exception, permission is given to link this program
19 with any edition of Qt, and distribute the resulting executable,
20 without including the source code for Qt in the source distribution.
22 #ifndef CALENDARSUPPORT_KCALPREFS_H
23 #define CALENDARSUPPORT_KCALPREFS_H
25 #include "calendarsupport_export.h"
26 #include "kcalprefs_base.h"
28 #include <Akonadi/Entity>
32 namespace CalendarSupport
{
34 class CALENDARSUPPORT_EXPORT KCalPrefs
: public KCalPrefsBase
37 /** Constructor disabled for public. Use instance() to create a KCalPrefs
42 /** Get instance of KCalPrefs. It is made sure that there is only one
44 static KCalPrefs
*instance();
46 /** Set preferences to default values */
47 void usrSetDefaults();
49 /** Read preferences from config file */
52 /** Write preferences to config file */
53 void usrWriteConfig();
56 void setTimeZoneDefault();
58 /** Fill empty mail fields with default values. */
59 void fillMailDefaults();
63 void setFullName( const QString
& );
65 void setEmail( const QString
& );
67 /// Returns all email addresses for the user.
68 QStringList
allEmails();
69 /// Returns all email addresses together with the full username for the user.
70 QStringList
fullEmails();
71 /// Return true if the given email belongs to the user
72 bool thatIsMe( const QString
&email
);
74 void setTimeSpec( const KDateTime::Spec
&spec
);
75 KDateTime::Spec
timeSpec();
77 QString
mailTransport() const;
79 Akonadi::Entity::Id
defaultCalendarId() const;
80 void setDefaultCalendarId( const Akonadi::Entity::Id
);
82 void setCategoryColor( const QString
&cat
, const QColor
&color
);
83 QColor
categoryColor( const QString
&cat
) const;
84 bool hasCategoryColor( const QString
&cat
) const;
86 void setDayBegins( const QDateTime
&dateTime
);
87 QDateTime
dayBegins() const;