• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KCal Library

calendarlocal.h

Go to the documentation of this file.
00001 /*
00002   This file is part of the kcal library.
00003 
00004   Copyright (c) 1998 Preston Brown <pbrown@kde.org>
00005   Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org>
00006 
00007   This library is free software; you can redistribute it and/or
00008   modify it under the terms of the GNU Library General Public
00009   License as published by the Free Software Foundation; either
00010   version 2 of the License, or (at your option) any later version.
00011 
00012   This library is distributed in the hope that it will be useful,
00013   but WITHOUT ANY WARRANTY; without even the implied warranty of
00014   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015   Library General Public License for more details.
00016 
00017   You should have received a copy of the GNU Library General Public License
00018   along with this library; see the file COPYING.LIB.  If not, write to
00019   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020   Boston, MA 02110-1301, USA.
00021 */
00030 #ifndef KCAL_CALENDARLOCAL_H
00031 #define KCAL_CALENDARLOCAL_H
00032 
00033 #include "calendar.h"
00034 
00035 namespace KCal {
00036 
00037 class CalFormat;
00038 
00043 class KCAL_EXPORT CalendarLocal : public Calendar
00044 {
00045   public:
00050     explicit CalendarLocal( const KDateTime::Spec &timeSpec );
00051 
00056     explicit CalendarLocal( const QString &timeZoneId );
00057 
00062     ~CalendarLocal();
00063 
00080     bool load( const QString &fileName, CalFormat *format = 0 );
00081 
00087     bool reload();
00088 
00096     bool save();
00097 
00108     bool save( const QString &fileName, CalFormat *format = 0 );
00109 
00113     void close();
00114 
00115   // Event Specific Methods //
00116 
00121     bool addEvent( Event *event );
00122 
00127     bool deleteEvent( Event *event );
00128 
00133     void deleteAllEvents();
00134 
00139     Event::List rawEvents(
00140       EventSortField sortField = EventSortUnsorted,
00141       SortDirection sortDirection = SortDirectionAscending );
00142 
00147     Event::List rawEvents( const QDate &start, const QDate &end,
00148                            const KDateTime::Spec &timespec = KDateTime::Spec(),
00149                            bool inclusive = false );
00150 
00156     Event::List rawEventsForDate(
00157       const QDate &date, const KDateTime::Spec &timespec = KDateTime::Spec(),
00158       EventSortField sortField = EventSortUnsorted,
00159       SortDirection sortDirection = SortDirectionAscending );
00160 
00165     Event::List rawEventsForDate( const KDateTime &dt );
00166 
00171     Event *event( const QString &uid );
00172 
00173   // To-do Specific Methods //
00174 
00179     bool addTodo( Todo *todo );
00180 
00185     bool deleteTodo( Todo *todo );
00186 
00191     void deleteAllTodos();
00192 
00197     Todo::List rawTodos(
00198       TodoSortField sortField = TodoSortUnsorted,
00199       SortDirection sortDirection = SortDirectionAscending );
00200 
00205     Todo::List rawTodosForDate( const QDate &date );
00206 
00211     Todo *todo( const QString &uid );
00212 
00213   // Journal Specific Methods //
00214 
00219     bool addJournal( Journal *journal );
00220 
00225     bool deleteJournal( Journal *journal );
00226 
00231     void deleteAllJournals();
00232 
00237     Journal::List rawJournals(
00238       JournalSortField sortField = JournalSortUnsorted,
00239       SortDirection sortDirection = SortDirectionAscending );
00240 
00245     Journal::List rawJournalsForDate( const QDate &date );
00246 
00251     Journal *journal( const QString &uid );
00252 
00253   // Alarm Specific Methods //
00254 
00259     Alarm::List alarms( const KDateTime &from, const KDateTime &to );
00260 
00267     Alarm::List alarmsTo( const KDateTime &to );
00268 
00274     void incidenceUpdated( IncidenceBase *incidenceBase );
00275 
00276     using QObject::event;   // prevent warning about hidden virtual method
00277 
00278   private:
00279     //@cond PRIVATE
00280     Q_DISABLE_COPY( CalendarLocal )
00281     class Private;
00282     Private *const d;
00283     //@endcond
00284 };
00285 
00286 }
00287 
00288 #endif

KCal Library

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal