KMail: Fix scrolling up/down on the message viewer
[kdepim.git] / incidenceeditor-ng / korganizereditorconfig.cpp
blob1fc75833bb4802d0ae12befecea7d66681dba07c
1 /*
2 Copyright (c) 2010 Kevin Ottens <ervin@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.
19 #include "korganizereditorconfig.h"
21 #include <calendarsupport/kcalprefs.h>
23 using namespace IncidenceEditorNG;
25 KOrganizerEditorConfig::KOrganizerEditorConfig()
26 : EditorConfig()
30 KOrganizerEditorConfig::~KOrganizerEditorConfig()
34 KConfigSkeleton *KOrganizerEditorConfig::config() const
36 return CalendarSupport::KCalPrefs::instance();
39 QString KOrganizerEditorConfig::fullName() const
41 return CalendarSupport::KCalPrefs::instance()->fullName();
44 QString KOrganizerEditorConfig::email() const
46 return CalendarSupport::KCalPrefs::instance()->email();
49 bool KOrganizerEditorConfig::thatIsMe(const QString &email) const
51 return CalendarSupport::KCalPrefs::instance()->thatIsMe(email);
54 QStringList KOrganizerEditorConfig::allEmails() const
56 return CalendarSupport::KCalPrefs::instance()->allEmails();
59 QStringList KOrganizerEditorConfig::fullEmails() const
61 return CalendarSupport::KCalPrefs::instance()->fullEmails();
64 bool KOrganizerEditorConfig::showTimeZoneSelectorInIncidenceEditor() const
66 return CalendarSupport::KCalPrefs::instance()->showTimeZoneSelectorInIncidenceEditor();
69 QDateTime KOrganizerEditorConfig::defaultDuration() const
71 return CalendarSupport::KCalPrefs::instance()->defaultDuration();
74 QDateTime KOrganizerEditorConfig::startTime() const
76 return CalendarSupport::KCalPrefs::instance()->startTime();
79 bool KOrganizerEditorConfig::defaultAudioFileReminders() const
81 return CalendarSupport::KCalPrefs::instance()->defaultAudioFileReminders();
84 QUrl KOrganizerEditorConfig::audioFilePath() const
86 return CalendarSupport::KCalPrefs::instance()->audioFilePath();
89 int KOrganizerEditorConfig::reminderTime() const
91 return CalendarSupport::KCalPrefs::instance()->reminderTime();
94 int KOrganizerEditorConfig::reminderTimeUnits() const
96 return CalendarSupport::KCalPrefs::instance()->reminderTimeUnits();
99 bool KOrganizerEditorConfig::defaultTodoReminders() const
101 return CalendarSupport::KCalPrefs::instance()->defaultTodoReminders();
104 bool KOrganizerEditorConfig::defaultEventReminders() const
106 return CalendarSupport::KCalPrefs::instance()->defaultEventReminders();
109 QStringList KOrganizerEditorConfig::activeDesignerFields() const
111 return CalendarSupport::KCalPrefs::instance()->activeDesignerFields();
114 QStringList &KOrganizerEditorConfig::templates(KCalCore::IncidenceBase::IncidenceType type)
116 if (type == KCalCore::IncidenceBase::TypeEvent) {
117 //TODO remove mEventTemplates+etc from Prefs::instance()
118 return CalendarSupport::KCalPrefs::instance()->mEventTemplates;
119 } if (type == KCalCore::IncidenceBase::TypeTodo) {
120 return CalendarSupport::KCalPrefs::instance()->mTodoTemplates;
121 } if (type == KCalCore::IncidenceBase::TypeJournal) {
122 return CalendarSupport::KCalPrefs::instance()->mJournalTemplates;
124 return EditorConfig::templates(type);