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

KCal Library

  • sources
  • kde-4.14
  • kdepimlibs
  • 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 
35 namespace KCal {
36 
37 class CalFormat;
38 
43 class 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
KCal::Todo
Provides a To-do in the sense of RFC2445.
Definition: todo.h:44
KCal::Calendar
Represents the main calendar class.
Definition: calendar.h:119
KCal::IncidenceBase
An abstract class that provides a common base for all calendar incidence classes. ...
Definition: incidencebase.h:102
KCal::Event
This class provides an Event in the sense of RFC2445.
Definition: event.h:41
KCal::CalendarLocal
This class provides a calendar stored as a local file.
Definition: calendarlocal.h:43
QObject::event
virtual bool event(QEvent *e)
KCal::CalFormat
An abstract base class that provides an interface to various calendar formats.
Definition: calformat.h:51
calendar.h
This file is part of the API for handling calendar data and defines the Calendar class.
QDate
KCal::ListBase
This class provides a template for lists of pointers.
Definition: listbase.h:44
QString
KCal::Journal
Provides a Journal in the sense of RFC2445.
Definition: journal.h:43
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:29 by doxygen 1.8.7 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 API Reference

Skip menu "kdepimlibs 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

Search



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