CalendarSupport

kcalprefs.h
1/*
2 SPDX-FileCopyrightText: 2000, 2001 Cornelius Schumacher <schumacher@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
5*/
6#pragma once
7
8#include "calendarsupport_export.h"
9#include "kcalprefs_base.h"
10
11#include <Akonadi/Collection>
12
13#include <memory>
14
15namespace CalendarSupport
16{
17class KCalPrefsPrivate;
18
19class CALENDARSUPPORT_EXPORT KCalPrefs : public KCalPrefsBase
20{
21 Q_OBJECT
22public:
23 /** Constructor disabled for public. Use instance() to create a KCalPrefs
24 object. */
25 KCalPrefs();
26 ~KCalPrefs() override;
27
28 /** Get instance of KCalPrefs. It is made sure that there is only one
29 instance. */
30 static KCalPrefs *instance();
31
32 /** Set preferences to default values */
33 void usrSetDefaults() override;
34
35 /** Read preferences from config file */
36 void usrRead() override;
37
38 /** Write preferences to config file */
39 bool usrSave() override;
40
41 /** Fill empty mail fields with default values. */
42 void fillMailDefaults();
43
44public:
45 // preferences data
47 QString email();
48 /// Returns all email addresses for the user.
49 QStringList allEmails();
50 /// Returns all email addresses together with the full username for the user.
51 QStringList fullEmails();
52 /// Return true if the given email belongs to the user
53 bool thatIsMe(const QString &email);
54
55 Akonadi::Collection::Id defaultCalendarId() const;
56 void setDefaultCalendarId(Akonadi::Collection::Id);
57
58 void setDayBegins(const QDateTime &dateTime);
59 QDateTime dayBegins() const;
60
61private:
62 std::unique_ptr<KCalPrefsPrivate> const d;
63};
64}
QString fullName(const PartType &type)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:05:28 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.