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

KCalCore Library

  • kcalcore
memorycalendar.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcalcore 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 */
32 #ifndef KCALCORE_MEMORYCALENDAR_H
33 #define KCALCORE_MEMORYCALENDAR_H
34 
35 #include "kcalcore_export.h"
36 #include "calendar.h"
37 
38 namespace KCalCore {
39 
40 class CalFormat;
41 
46 class KCALCORE_EXPORT MemoryCalendar : public Calendar
47 {
48  public:
49 
53  typedef QSharedPointer<MemoryCalendar> Ptr;
54 
59  explicit MemoryCalendar( const KDateTime::Spec &timeSpec );
60 
65  explicit MemoryCalendar( const QString &timeZoneId );
66 
71  ~MemoryCalendar();
72 
76  void close();
77 
82  bool deleteIncidence( const Incidence::Ptr &incidence );
83 
88  bool deleteIncidenceInstances( const Incidence::Ptr &incidence );
89 
94  bool addIncidence( const Incidence::Ptr &incidence );
95 
96  // Event Specific Methods //
97 
102  bool addEvent( const Event::Ptr &event );
103 
108  bool deleteEvent( const Event::Ptr &event );
109 
114  bool deleteEventInstances( const Event::Ptr &event );
115 
120  void deleteAllEvents();
121 
126  Event::List rawEvents(
127  EventSortField sortField = EventSortUnsorted,
128  SortDirection sortDirection = SortDirectionAscending ) const;
129 
134  Event::List rawEvents( const QDate &start, const QDate &end,
135  const KDateTime::Spec &timeSpec = KDateTime::Spec(),
136  bool inclusive = false ) const;
137 
149  Event::List rawEventsForDate(
150  const QDate &date, const KDateTime::Spec &timeSpec = KDateTime::Spec(),
151  EventSortField sortField = EventSortUnsorted,
152  SortDirection sortDirection = SortDirectionAscending ) const;
153 
158  Event::List rawEventsForDate( const KDateTime &dt ) const;
159 
164  Event::Ptr event(
165  const QString &uid,
166  const KDateTime &recurrenceId = KDateTime() ) const;
167 
172  Event::Ptr deletedEvent(
173  const QString &uid, const KDateTime &recurrenceId = KDateTime() ) const;
174 
179  Event::List deletedEvents(
180  EventSortField sortField = EventSortUnsorted,
181  SortDirection sortDirection = SortDirectionAscending ) const;
182 
187  Event::List eventInstances(
188  const Incidence::Ptr &event,
189  EventSortField sortField = EventSortUnsorted,
190  SortDirection sortDirection = SortDirectionAscending ) const;
191 
192  // To-do Specific Methods //
193 
198  bool addTodo( const Todo::Ptr &todo );
199 
204  bool deleteTodo( const Todo::Ptr &todo );
205 
210  bool deleteTodoInstances( const Todo::Ptr &todo );
211 
216  void deleteAllTodos();
217 
222  Todo::List rawTodos(
223  TodoSortField sortField = TodoSortUnsorted,
224  SortDirection sortDirection = SortDirectionAscending ) const;
225 
230  Todo::List rawTodos(
231  const QDate &start, const QDate &end,
232  const KDateTime::Spec &timespec = KDateTime::Spec(),
233  bool inclusive = false ) const;
234 
239  Todo::List rawTodosForDate( const QDate &date ) const;
240 
245  Todo::Ptr todo( const QString &uid,
246  const KDateTime &recurrenceId = KDateTime() ) const;
247 
252  Todo::Ptr deletedTodo( const QString &uid, const KDateTime &recurrenceId = KDateTime() ) const;
253 
258  Todo::List deletedTodos(
259  TodoSortField sortField = TodoSortUnsorted,
260  SortDirection sortDirection = SortDirectionAscending ) const;
261 
266  Todo::List todoInstances( const Incidence::Ptr &todo,
267  TodoSortField sortField = TodoSortUnsorted,
268  SortDirection sortDirection = SortDirectionAscending ) const;
269 
270  // Journal Specific Methods //
271 
276  bool addJournal( const Journal::Ptr &journal );
277 
282  bool deleteJournal( const Journal::Ptr &journal );
283 
288  bool deleteJournalInstances( const Journal::Ptr &journal );
289 
294  void deleteAllJournals();
295 
300  Journal::List rawJournals(
301  JournalSortField sortField = JournalSortUnsorted,
302  SortDirection sortDirection = SortDirectionAscending ) const;
303 
308  Journal::List rawJournalsForDate( const QDate &date ) const;
309 
314  Journal::Ptr journal( const QString &uid,
315  const KDateTime &recurrenceId = KDateTime() ) const;
316 
321  Journal::Ptr deletedJournal( const QString &uid,
322  const KDateTime &recurrenceId = KDateTime() ) const;
323 
328  Journal::List deletedJournals(
329  JournalSortField sortField = JournalSortUnsorted,
330  SortDirection sortDirection = SortDirectionAscending ) const;
331 
336  Journal::List journalInstances( const Incidence::Ptr &journal,
337  JournalSortField sortField = JournalSortUnsorted,
338  SortDirection sortDirection = SortDirectionAscending ) const;
339 
340  // Alarm Specific Methods //
341 
346  Alarm::List alarms( const KDateTime &from, const KDateTime &to ) const;
347 
354  Alarm::List alarmsTo( const KDateTime &to ) const;
355 
360  void incidenceUpdate( const QString &uid, const KDateTime &recurrenceId );
361 
366  void incidenceUpdated( const QString &uid, const KDateTime &recurrenceId );
367 
368  using QObject::event; // prevent warning about hidden virtual method
369 
370  protected:
375  virtual void virtual_hook( int id, void *data );
376 
377  private:
378  //@cond PRIVATE
379  class Private;
380  Private *const d;
381  //@endcond
382 
383  Q_DISABLE_COPY( MemoryCalendar )
384 };
385 
386 }
387 
388 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:24:52 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalCore Library

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

kdepimlibs-4.10.5 API Reference

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