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

KCal Library

  • kcal
calendarnull.cpp
Go to the documentation of this file.
1 /*
2  This file is part of the kcal library.
3 
4  Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
32 #include "calendarnull.h"
33 
34 using namespace KCal;
35 
40 //@cond PRIVATE
41 class KCal::CalendarNull::Private
42 {
43 };
44 static CalendarNull *mSelf = 0;
45 //@endcond
46 
47 CalendarNull::CalendarNull( const KDateTime::Spec &timeSpec )
48  : Calendar( timeSpec ),
49  d( new KCal::CalendarNull::Private )
50 {}
51 
52 CalendarNull::CalendarNull( const QString &timeZoneId )
53  : Calendar( timeZoneId ),
54  d( new KCal::CalendarNull::Private )
55 {}
56 
57 CalendarNull::~CalendarNull()
58 {
59  delete d;
60 }
61 
62 CalendarNull *CalendarNull::self()
63 {
64  if ( !mSelf ) {
65  mSelf = new CalendarNull( KDateTime::UTC );
66  }
67 
68  return mSelf;
69 }
70 
71 void CalendarNull::close()
72 {
73 }
74 
75 bool CalendarNull::save()
76 {
77  return true;
78 }
79 
80 bool CalendarNull::reload()
81 {
82  return true;
83 }
84 
85 bool CalendarNull::addEvent( Event *event )
86 {
87  Q_UNUSED ( event );
88  return false;
89 }
90 
91 bool CalendarNull::deleteEvent( Event *event )
92 {
93  Q_UNUSED( event );
94  return false;
95 }
96 
97 void CalendarNull::deleteAllEvents()
98 {
99 }
100 
101 Event::List CalendarNull::rawEvents( EventSortField sortField,
102  SortDirection sortDirection )
103 {
104  Q_UNUSED( sortField );
105  Q_UNUSED( sortDirection );
106  return Event::List();
107 }
108 
109 Event::List CalendarNull::rawEvents( const QDate &start, const QDate &end,
110  const KDateTime::Spec &timeSpec,
111  bool inclusive )
112 {
113  Q_UNUSED( start );
114  Q_UNUSED( end );
115  Q_UNUSED( timeSpec );
116  Q_UNUSED( inclusive );
117  return Event::List();
118 }
119 
120 Event::List CalendarNull::rawEventsForDate( const QDate &date,
121  const KDateTime::Spec &timeSpec,
122  EventSortField sortField,
123  SortDirection sortDirection )
124 {
125  Q_UNUSED( date );
126  Q_UNUSED( timeSpec );
127  Q_UNUSED( sortField );
128  Q_UNUSED( sortDirection );
129  return Event::List();
130 }
131 
132 Event::List CalendarNull::rawEventsForDate( const KDateTime &dt )
133 {
134  Q_UNUSED( dt );
135  return Event::List();
136 }
137 
138 Event *CalendarNull::event( const QString &uid )
139 {
140  Q_UNUSED( uid );
141  return 0;
142 }
143 
144 bool CalendarNull::addTodo( Todo *todo )
145 {
146  Q_UNUSED( todo );
147  return false;
148 }
149 
150 bool CalendarNull::deleteTodo( Todo *todo )
151 {
152  Q_UNUSED( todo );
153  return false;
154 }
155 
156 void CalendarNull::deleteAllTodos()
157 {
158 }
159 
160 Todo::List CalendarNull::rawTodos( TodoSortField sortField,
161  SortDirection sortDirection )
162 {
163  Q_UNUSED( sortField );
164  Q_UNUSED( sortDirection );
165  return Todo::List();
166 }
167 
168 Todo::List CalendarNull::rawTodosForDate( const QDate &date )
169 {
170  Q_UNUSED( date );
171  return Todo::List();
172 }
173 
174 Todo *CalendarNull::todo( const QString &uid )
175 {
176  Q_UNUSED( uid );
177  return 0;
178 }
179 
180 bool CalendarNull::addJournal( Journal *journal )
181 {
182  Q_UNUSED( journal );
183  return false;
184 }
185 
186 bool CalendarNull::deleteJournal( Journal *journal )
187 {
188  Q_UNUSED( journal );
189  return false;
190 }
191 
192 void CalendarNull::deleteAllJournals()
193 {
194 }
195 
196 Journal::List CalendarNull::rawJournals( JournalSortField sortField,
197  SortDirection sortDirection )
198 {
199  Q_UNUSED( sortField );
200  Q_UNUSED( sortDirection );
201  return Journal::List();
202 }
203 
204 Journal::List CalendarNull::rawJournalsForDate( const QDate &date )
205 {
206  Q_UNUSED( date );
207  return Journal::List();
208 }
209 
210 Journal *CalendarNull::journal( const QString &uid )
211 {
212  Q_UNUSED( uid );
213  return 0;
214 }
215 
216 Alarm::List CalendarNull::alarms( const KDateTime &from, const KDateTime &to )
217 {
218  Q_UNUSED( from );
219  Q_UNUSED( to );
220  return Alarm::List();
221 }
222 
223 void CalendarNull::incidenceUpdated( IncidenceBase *incidenceBase )
224 {
225  Q_UNUSED( incidenceBase );
226 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:29:13 by doxygen 1.8.3.1 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
  • 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