french -> French
[kdepim.git] / calendarsupport / kcalprefs.h
blobe12c005eca5a266d8ec12b56c554ef3555ed3ab1
1 /*
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>
30 #include <KDateTime>
32 namespace CalendarSupport {
34 class CALENDARSUPPORT_EXPORT KCalPrefs : public KCalPrefsBase
36 public:
37 /** Constructor disabled for public. Use instance() to create a KCalPrefs
38 object. */
39 KCalPrefs();
40 virtual ~KCalPrefs();
42 /** Get instance of KCalPrefs. It is made sure that there is only one
43 instance. */
44 static KCalPrefs *instance();
46 /** Set preferences to default values */
47 void usrSetDefaults();
49 /** Read preferences from config file */
50 void usrReadConfig();
52 /** Write preferences to config file */
53 void usrWriteConfig();
55 protected:
56 void setTimeZoneDefault();
58 /** Fill empty mail fields with default values. */
59 void fillMailDefaults();
61 public:
62 // preferences data
63 void setFullName( const QString & );
64 QString fullName();
65 void setEmail( const QString & );
66 QString email();
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;
89 private:
90 class Private;
91 Private *const d;
96 #endif