• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

KCal Library

  • kcal
calendarlocal.h
Go to the documentation of this file.
1/*
2 This file is part of the kcal library.
3
4 Copyright (c) 1998 Preston Brown <pbrown@kde.org>
5 Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org>
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
21*/
30#ifndef KCAL_CALENDARLOCAL_H
31#define KCAL_CALENDARLOCAL_H
32
33#include "calendar.h"
34
35namespace KCal {
36
37class CalFormat;
38
43class KCAL_DEPRECATED_EXPORT CalendarLocal : public Calendar
44{
45 public:
50 explicit CalendarLocal( const KDateTime::Spec &timeSpec );
51
56 explicit CalendarLocal( const QString &timeZoneId );
57
62 ~CalendarLocal();
63
80 bool load( const QString &fileName, CalFormat *format = 0 );
81
87 bool reload();
88
96 bool save();
97
108 bool save( const QString &fileName, CalFormat *format = 0 );
109
113 void close();
114
115 // Event Specific Methods //
116
121 bool addEvent( Event *event );
122
127 bool deleteEvent( Event *event );
128
133 void deleteAllEvents();
134
139 Event::List rawEvents(
140 EventSortField sortField = EventSortUnsorted,
141 SortDirection sortDirection = SortDirectionAscending );
142
147 Event::List rawEvents( const QDate &start, const QDate &end,
148 const KDateTime::Spec &timeSpec = KDateTime::Spec(),
149 bool inclusive = false );
150
162 Event::List rawEventsForDate(
163 const QDate &date, const KDateTime::Spec &timeSpec = KDateTime::Spec(),
164 EventSortField sortField = EventSortUnsorted,
165 SortDirection sortDirection = SortDirectionAscending );
166
171 Event::List rawEventsForDate( const KDateTime &dt );
172
177 Event *event( const QString &uid );
178
179 // To-do Specific Methods //
180
185 bool addTodo( Todo *todo );
186
191 bool deleteTodo( Todo *todo );
192
197 void deleteAllTodos();
198
203 Todo::List rawTodos(
204 TodoSortField sortField = TodoSortUnsorted,
205 SortDirection sortDirection = SortDirectionAscending );
206
211 Todo::List rawTodosForDate( const QDate &date );
212
217 Todo *todo( const QString &uid );
218
219 // Journal Specific Methods //
220
225 bool addJournal( Journal *journal );
226
231 bool deleteJournal( Journal *journal );
232
237 void deleteAllJournals();
238
243 Journal::List rawJournals(
244 JournalSortField sortField = JournalSortUnsorted,
245 SortDirection sortDirection = SortDirectionAscending );
246
251 Journal::List rawJournalsForDate( const QDate &date );
252
257 Journal *journal( const QString &uid );
258
259 // Alarm Specific Methods //
260
265 Alarm::List alarms( const KDateTime &from, const KDateTime &to );
266
273 Alarm::List alarmsTo( const KDateTime &to );
274
280 void incidenceUpdated( IncidenceBase *incidenceBase );
281
282 using QObject::event; // prevent warning about hidden virtual method
283
284 private:
285 //@cond PRIVATE
286 Q_DISABLE_COPY( CalendarLocal )
287 class Private;
288 Private *const d;
289 //@endcond
290};
291
292}
293
294#endif
calendar.h
This file is part of the API for handling calendar data and defines the Calendar class.
KCal::TodoSortField
TodoSortField
Calendar Todo sort keys.
Definition calendar.h:79
KCal::TodoSortUnsorted
@ TodoSortUnsorted
Do not sort Todos.
Definition calendar.h:80
KCal::JournalSortField
JournalSortField
Calendar Journal sort keys.
Definition calendar.h:91
KCal::JournalSortUnsorted
@ JournalSortUnsorted
Do not sort Journals.
Definition calendar.h:92
KCal::EventSortField
EventSortField
Calendar Event sort keys.
Definition calendar.h:69
KCal::EventSortUnsorted
@ EventSortUnsorted
Do not sort Events.
Definition calendar.h:70
KCal::SortDirection
SortDirection
Calendar Incidence sort directions.
Definition calendar.h:61
KCal::SortDirectionAscending
@ SortDirectionAscending
Sort in ascending order (first to last)
Definition calendar.h:62
KCal::Alarm::List
ListBase< Alarm > List
List of alarms.
Definition alarm.h:83
KCal::CalFormat
An abstract base class that provides an interface to various calendar formats.
Definition calformat.h:52
KCal::CalendarLocal::incidenceUpdated
void incidenceUpdated(IncidenceBase *incidenceBase)
Notify the IncidenceBase::Observer that the incidence has been updated.
Definition calendarlocal.cpp:380
KCal::CalendarLocal::event
Event * event(const QString &uid)
Definition calendarlocal.cpp:217
KCal::CalendarLocal::addJournal
bool addJournal(Journal *journal)
Definition calendarlocal.cpp:553
KCal::CalendarLocal::rawJournalsForDate
Journal::List rawJournalsForDate(const QDate &date)
Definition calendarlocal.cpp:629
KCal::CalendarLocal::deleteTodo
bool deleteTodo(Todo *todo)
Definition calendarlocal.cpp:258
KCal::CalendarLocal::addTodo
bool addTodo(Todo *todo)
Definition calendarlocal.cpp:222
KCal::CalendarLocal::rawEvents
Event::List rawEvents(EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
Definition calendarlocal.cpp:541
KCal::CalendarLocal::load
bool load(const QString &fileName, CalFormat *format=0)
Loads a calendar on disk in vCalendar or iCalendar format into the current calendar.
Definition calendarlocal.cpp:115
KCal::CalendarLocal::deleteEvent
bool deleteEvent(Event *event)
Definition calendarlocal.cpp:185
KCal::CalendarLocal::deleteAllJournals
void deleteAllJournals()
Definition calendarlocal.cpp:597
KCal::CalendarLocal::deleteAllTodos
void deleteAllTodos()
Definition calendarlocal.cpp:277
KCal::CalendarLocal::rawTodos
Todo::List rawTodos(TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
Definition calendarlocal.cpp:297
KCal::CalendarLocal::save
bool save()
Writes the calendar to disk.
Definition calendarlocal.cpp:132
KCal::CalendarLocal::CalendarLocal
CalendarLocal(const KDateTime::Spec &timeSpec)
Definition calendarlocal.cpp:97
KCal::CalendarLocal::addEvent
bool addEvent(Event *event)
Definition calendarlocal.cpp:172
KCal::CalendarLocal::close
void close()
Clears out the current calendar, freeing all used memory etc.
Definition calendarlocal.cpp:158
KCal::CalendarLocal::rawTodosForDate
Todo::List rawTodosForDate(const QDate &date)
Definition calendarlocal.cpp:309
KCal::CalendarLocal::alarms
Alarm::List alarms(const KDateTime &from, const KDateTime &to)
Definition calendarlocal.cpp:329
KCal::CalendarLocal::rawJournals
Journal::List rawJournals(JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
Definition calendarlocal.cpp:617
KCal::CalendarLocal::rawEventsForDate
Event::List rawEventsForDate(const QDate &date, const KDateTime::Spec &timeSpec=KDateTime::Spec(), EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
Returns an unfiltered list of all Events which occur on the given date.
Definition calendarlocal.cpp:417
KCal::CalendarLocal::deleteAllEvents
void deleteAllEvents()
Definition calendarlocal.cpp:202
KCal::CalendarLocal::journal
Journal * journal(const QString &uid)
Definition calendarlocal.cpp:612
KCal::CalendarLocal::alarmsTo
Alarm::List alarmsTo(const KDateTime &to)
Return a list of Alarms that occur before the specified timestamp.
Definition calendarlocal.cpp:324
KCal::CalendarLocal::reload
bool reload()
Reloads the contents of the storage into memory.
Definition calendarlocal.cpp:122
KCal::CalendarLocal::todo
Todo * todo(const QString &uid)
Definition calendarlocal.cpp:292
KCal::CalendarLocal::deleteJournal
bool deleteJournal(Journal *journal)
Definition calendarlocal.cpp:583
KCal::Calendar::Calendar
Calendar(const KDateTime::Spec &timeSpec)
Constructs a calendar with a specified time zone timeZoneid.
Definition calendar.cpp:106
KCal::Calendar::timeZoneId
QString timeZoneId() const
Returns the time zone ID used for creating or modifying incidences in the calendar.
Definition calendar.cpp:189
KCal::Calendar::timeSpec
KDateTime::Spec timeSpec() const
Get the time specification (time zone etc.) used for creating or modifying incidences in the Calendar...
Definition calendar.cpp:145
KCal::Event
This class provides an Event in the sense of RFC2445.
Definition event.h:42
KCal::Event::List
ListBase< Event > List
List of events.
Definition event.h:55
KCal::IncidenceBase
An abstract class that provides a common base for all calendar incidence classes.
Definition incidencebase.h:103
KCal::Journal
Provides a Journal in the sense of RFC2445.
Definition journal.h:44
KCal::Journal::List
ListBase< Journal > List
List of journals.
Definition journal.h:49
KCal::Todo
Provides a To-do in the sense of RFC2445.
Definition todo.h:45
KCal::Todo::List
ListBase< Todo > List
List of to-dos.
Definition todo.h:50
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCal Library

Skip menu "KCal Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal