Incidenceeditor

korganizereditorconfig.cpp
1 /*
2  SPDX-FileCopyrightText: 2010 Kevin Ottens <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #include "korganizereditorconfig.h"
8 
9 #include <CalendarSupport/KCalPrefs>
10 
11 using namespace IncidenceEditorNG;
12 
13 KOrganizerEditorConfig::KOrganizerEditorConfig()
14  : EditorConfig()
15 {
16 }
17 
18 KOrganizerEditorConfig::~KOrganizerEditorConfig() = default;
19 
20 KConfigSkeleton *KOrganizerEditorConfig::config() const
21 {
22  return CalendarSupport::KCalPrefs::instance();
23 }
24 
26 {
27  return CalendarSupport::KCalPrefs::instance()->fullName();
28 }
29 
31 {
32  return CalendarSupport::KCalPrefs::instance()->email();
33 }
34 
35 bool KOrganizerEditorConfig::thatIsMe(const QString &email) const
36 {
37  return CalendarSupport::KCalPrefs::instance()->thatIsMe(email);
38 }
39 
41 {
42  return CalendarSupport::KCalPrefs::instance()->allEmails();
43 }
44 
46 {
47  return CalendarSupport::KCalPrefs::instance()->fullEmails();
48 }
49 
51 {
52  return CalendarSupport::KCalPrefs::instance()->showTimeZoneSelectorInIncidenceEditor();
53 }
54 
55 QDateTime KOrganizerEditorConfig::defaultDuration() const
56 {
57  return CalendarSupport::KCalPrefs::instance()->defaultDuration();
58 }
59 
60 QDateTime KOrganizerEditorConfig::startTime() const
61 {
62  return CalendarSupport::KCalPrefs::instance()->startTime();
63 }
64 
65 bool KOrganizerEditorConfig::defaultAudioFileReminders() const
66 {
67  return CalendarSupport::KCalPrefs::instance()->defaultAudioFileReminders();
68 }
69 
70 QUrl KOrganizerEditorConfig::audioFilePath() const
71 {
72  return QUrl::fromLocalFile(CalendarSupport::KCalPrefs::instance()->audioFilePath());
73 }
74 
75 int KOrganizerEditorConfig::reminderTime() const
76 {
77  return CalendarSupport::KCalPrefs::instance()->reminderTime();
78 }
79 
80 int KOrganizerEditorConfig::reminderTimeUnits() const
81 {
82  return CalendarSupport::KCalPrefs::instance()->reminderTimeUnits();
83 }
84 
85 bool KOrganizerEditorConfig::defaultTodoReminders() const
86 {
87  return CalendarSupport::KCalPrefs::instance()->defaultTodoReminders();
88 }
89 
90 bool KOrganizerEditorConfig::defaultEventReminders() const
91 {
92  return CalendarSupport::KCalPrefs::instance()->defaultEventReminders();
93 }
94 
95 QStringList KOrganizerEditorConfig::activeDesignerFields() const
96 {
97  return CalendarSupport::KCalPrefs::instance()->activeDesignerFields();
98 }
99 
100 QStringList &KOrganizerEditorConfig::templates(KCalendarCore::IncidenceBase::IncidenceType type)
101 {
103  // TODO remove mEventTemplates+etc from Prefs::instance()
104  return CalendarSupport::KCalPrefs::instance()->mEventTemplates;
105  }
107  return CalendarSupport::KCalPrefs::instance()->mTodoTemplates;
108  }
110  return CalendarSupport::KCalPrefs::instance()->mJournalTemplates;
111  }
112  return EditorConfig::templates(type);
113 }
QString email() const override
Return the own mail address.
QString fullName() const override
Return the own full name.
ItemEditorPrivate.
Definition: alarmdialog.h:19
QStringList allEmails() const override
Returns all email addresses for the user.
QUrl fromLocalFile(const QString &localFile)
bool thatIsMe(const QString &email) const override
Return true if the given email belongs to the user.
bool showTimeZoneSelectorInIncidenceEditor() const override
Show timezone selectors in the event and todo editor dialog.
QStringList fullEmails() const override
Returns all email addresses together with the full username for the user.
Configuration details.
Definition: editorconfig.h:31
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri May 20 2022 04:12:40 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.