• 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
incidencebase.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcal library.
3 
4  Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (c) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6  Copyright (c) 2005 Rafal Rzepecki <divide@users.sourceforge.net>
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public
10  License as published by the Free Software Foundation; either
11  version 2 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public License
19  along with this library; see the file COPYING.LIB. If not, write to
20  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA.
22 */
54 #ifndef KCAL_INCIDENCEBASE_H
55 #define KCAL_INCIDENCEBASE_H
56 
57 #include "attendee.h"
58 #include "customproperties.h"
59 #include "duration.h"
60 #include "sortablelist.h"
61 
62 #include <kdatetime.h>
63 
64 #include <QtCore/QStringList>
65 #include <QtCore/QByteArray>
66 
67 class KUrl;
68 
69 namespace KCal {
70 
72 typedef SortableList<QDate> DateList;
74 typedef SortableList<KDateTime> DateTimeList;
75 class Event;
76 class Todo;
77 class Journal;
78 class FreeBusy;
79 
102 class KCAL_DEPRECATED_EXPORT IncidenceBase : public CustomProperties
103 {
104  public:
112  class KCAL_DEPRECATED_EXPORT Visitor //krazy:exclude=dpointer
113  {
114  public:
116  virtual ~Visitor() {}
117 
123  virtual bool visit( Event *event );
124 
130  virtual bool visit( Todo *todo );
131 
137  virtual bool visit( Journal *journal );
138 
144  virtual bool visit( FreeBusy *freebusy );
145 
146  protected:
151  Visitor() {}
152  };
153 
157  class IncidenceObserver
158  {
159  public:
160 
164  virtual ~IncidenceObserver() {}
165 
171  virtual void incidenceUpdated( IncidenceBase *incidenceBase ) = 0;
172  };
173 
177  IncidenceBase();
178 
185  IncidenceBase( const IncidenceBase &ib );
186 
190  virtual ~IncidenceBase();
191 
203  // KDE5: make protected to prevent accidental usage
204  IncidenceBase &operator=( const IncidenceBase &other );
205 
216  // KDE5: make protected to prevent accidental usage
217  bool operator==( const IncidenceBase &ib ) const;
218 
228  virtual bool accept( Visitor &v )
229  {
230  Q_UNUSED( v );
231  return false;
232  }
233 
237  virtual QByteArray type() const = 0;
238 
242  //KDE5: virtual QString typeStr() const = 0;
243 
251  void setUid( const QString &uid );
252 
258  QString uid() const;
259 
263  KUrl uri() const;
264 
273  void setLastModified( const KDateTime &lm );
274 
280  KDateTime lastModified() const;
281 
288  void setOrganizer( const Person &organizer );
289 
296  void setOrganizer( const QString &organizer );
297 
303  Person organizer() const;
304 
312  virtual void setReadOnly( bool readOnly );
313 
318  bool isReadOnly() const { return mReadOnly; }
319 
328  virtual void setDtStart( const KDateTime &dtStart );
329 
334  virtual KDateTime dtStart() const;
335 
347  virtual KCAL_DEPRECATED QString dtStartTimeStr(
348  bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const;
349 
361  virtual KCAL_DEPRECATED QString dtStartDateStr(
362  bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const;
363 
375  virtual KCAL_DEPRECATED QString dtStartStr(
376  bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const;
377 
385  virtual void setDuration( const Duration &duration );
386 
392  Duration duration() const;
393 
401  void setHasDuration( bool hasDuration );
402 
408  bool hasDuration() const;
409 
416  bool allDay() const;
417 
426  void setAllDay( bool allDay );
427 
442  virtual void shiftTimes( const KDateTime::Spec &oldSpec,
443  const KDateTime::Spec &newSpec );
444 
452  void addComment( const QString &comment );
453 
462  bool removeComment( const QString &comment );
463 
467  void clearComments();
468 
472  QStringList comments() const;
473 
481  void addAttendee( Attendee *attendee, bool doUpdate = true );
482 
486  void clearAttendees();
487 
491  const Attendee::List &attendees() const;
492 
496  int attendeeCount() const;
497 
505  Attendee *attendeeByMail( const QString &email ) const;
506 
517  Attendee *attendeeByMails( const QStringList &emails,
518  const QString &email = QString() ) const;
519 
526  Attendee *attendeeByUid( const QString &uid ) const;
527 
536  void registerObserver( IncidenceObserver *observer );
537 
545  void unRegisterObserver( IncidenceObserver *observer );
546 
551  void updated();
552 
558  void startUpdates();
559 
565  void endUpdates();
566 
567  protected:
572  virtual void customPropertyUpdated();
573 
577  bool mReadOnly;
578 
579  private:
580  //@cond PRIVATE
581  class Private;
582  Private *const d;
583  //@endcond
584 };
585 
586 }
587 
588 #endif
attendee.h
This file is part of the API for handling calendar data and defines the Attendee class.
KCal::IncidenceBase::isReadOnly
bool isReadOnly() const
Returns true the object is read-only; false otherwise.
Definition: incidencebase.h:318
KCal::CustomProperties
A class to manage custom calendar properties.
Definition: customproperties.h:52
KCal::IncidenceBase::Visitor::Visitor
Visitor()
Constructor is protected to prevent direct creation of visitor base class.
Definition: incidencebase.h:151
customproperties.h
This file is part of the API for handling calendar data and defines the CustomProperties class...
KCal::Todo
Provides a To-do in the sense of RFC2445.
Definition: todo.h:44
KCal::IncidenceBase
An abstract class that provides a common base for all calendar incidence classes. ...
Definition: incidencebase.h:102
sortablelist.h
This file is part of the API for handling calendar data and defines the Sortable List class...
KCal::Attendee
Represents information related to an attendee of an Calendar Incidence, typically a meeting or task (...
Definition: attendee.h:58
KCal::Event
This class provides an Event in the sense of RFC2445.
Definition: event.h:41
KCal::IncidenceBase::IncidenceObserver
The IncidenceObserver class.
Definition: incidencebase.h:157
KCal::IncidenceBase::Visitor
This class provides the interface for a visitor of calendar components.
Definition: incidencebase.h:112
KCal::IncidenceBase::IncidenceObserver::~IncidenceObserver
virtual ~IncidenceObserver()
Destroys the IncidenceObserver.
Definition: incidencebase.h:164
KCal::Person
Represents a person, by name ane email address.
Definition: person.h:48
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::IncidenceBase::accept
virtual bool accept(Visitor &v)
Accept IncidenceVisitor.
Definition: incidencebase.h:228
duration.h
This file is part of the API for handling calendar data and defines the Duration class.
KCal::IncidenceBase::Visitor::~Visitor
virtual ~Visitor()
Destruct Incidence::Visitor.
Definition: incidencebase.h:116
KCal::Duration
Represents a span of time measured in seconds or days.
Definition: duration.h:52
KCal::IncidenceBase::mReadOnly
bool mReadOnly
Identifies a read-only incidence.
Definition: incidencebase.h:577
KCal::FreeBusy
Provides information about the free/busy time of a calendar.
Definition: freebusy.h:50
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