• 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.12
  • kdepimlibs
  • 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 }
KCal::CalendarNull::event
Event * event(const QString &uid)
Definition: calendarnull.cpp:138
KCal::Journal::List
ListBase< Journal > List
List of journals.
Definition: journal.h:49
KCal::CalendarNull::incidenceUpdated
void incidenceUpdated(IncidenceBase *incidenceBase)
Definition: calendarnull.cpp:223
KCal::Todo::List
ListBase< Todo > List
List of to-dos.
Definition: todo.h:50
KCal::CalendarNull::addTodo
bool addTodo(Todo *todo)
Definition: calendarnull.cpp:144
KCal::CalendarNull::deleteJournal
bool deleteJournal(Journal *journal)
Definition: calendarnull.cpp:186
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::CalendarNull::deleteTodo
bool deleteTodo(Todo *todo)
Definition: calendarnull.cpp:150
KCal::CalendarNull::rawJournals
Journal::List rawJournals(JournalSortField sortField, SortDirection sortDirection)
Definition: calendarnull.cpp:196
KCal::CalendarNull::rawTodos
Todo::List rawTodos(TodoSortField sortField, SortDirection sortDirection)
Definition: calendarnull.cpp:160
KCal::CalendarNull::close
void close()
Definition: calendarnull.cpp:71
KCal::Event
This class provides an Event in the sense of RFC2445.
Definition: event.h:41
KCal::CalendarNull::CalendarNull
CalendarNull(const KDateTime::Spec &timeSpec)
Construct Calendar object using a time specification (time zone, etc.).
Definition: calendarnull.cpp:47
KCal::CalendarNull::alarms
Alarm::List alarms(const KDateTime &from, const KDateTime &to)
Definition: calendarnull.cpp:216
KCal::CalendarNull::addEvent
bool addEvent(Event *event)
Definition: calendarnull.cpp:85
KCal::CalendarNull::rawTodosForDate
Todo::List rawTodosForDate(const QDate &date)
Definition: calendarnull.cpp:168
KCal::CalendarNull::deleteAllEvents
void deleteAllEvents()
Definition: calendarnull.cpp:97
KCal::CalendarNull
Represents a null calendar class; that is, a calendar which contains no information and provides no c...
Definition: calendarnull.h:48
calendarnull.h
This file is part of the API for handling calendar data and defines the CalendarNull class...
KCal::ListBase
This class provides a template for lists of pointers.
Definition: listbase.h:44
KCal::Journal
Provides a Journal in the sense of RFC2445.
Definition: journal.h:43
KCal::CalendarNull::save
bool save()
Definition: calendarnull.cpp:75
KCal::Alarm::List
ListBase< Alarm > List
List of alarms.
Definition: alarm.h:83
KCal::CalendarNull::deleteAllJournals
void deleteAllJournals()
Definition: calendarnull.cpp:192
KCal::CalendarNull::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: calendarnull.cpp:120
KCal::CalendarNull::self
static CalendarNull * self()
Returns a pointer to the CalendarNull object, of which there can be only one.
Definition: calendarnull.cpp:62
KCal::CalendarNull::rawJournalsForDate
Journal::List rawJournalsForDate(const QDate &date)
Definition: calendarnull.cpp:204
KCal::CalendarNull::deleteAllTodos
void deleteAllTodos()
Definition: calendarnull.cpp:156
KCal::CalendarNull::rawEvents
Event::List rawEvents(EventSortField sortField, SortDirection sortDirection)
Definition: calendarnull.cpp:101
KCal::CalendarNull::reload
bool reload()
Definition: calendarnull.cpp:80
KCal::CalendarNull::addJournal
bool addJournal(Journal *journal)
Definition: calendarnull.cpp:180
KCal::CalendarNull::todo
Todo * todo(const QString &uid)
Definition: calendarnull.cpp:174
KCal::Event::List
ListBase< Event > List
List of events.
Definition: event.h:55
KCal::CalendarNull::~CalendarNull
~CalendarNull()
Destroys the null calendar.
Definition: calendarnull.cpp:57
KCal::CalendarNull::deleteEvent
bool deleteEvent(Event *event)
Definition: calendarnull.cpp:91
KCal::CalendarNull::journal
Journal * journal(const QString &uid)
Definition: calendarnull.cpp:210
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:57 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
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

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