• 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
event.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 
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 */
28 #ifndef KCAL_EVENT_H
29 #define KCAL_EVENT_H
30 
31 #include "incidence.h"
32 #include <kpimutils/supertrait.h>
33 #include <QtCore/QByteArray>
34 
35 namespace KCal {
36 
41 class KCAL_DEPRECATED_EXPORT Event : public Incidence
42 {
43  public:
47  enum Transparency {
48  Opaque,
49  Transparent
50  };
51 
55  typedef ListBase<Event> List;
56 
60  typedef boost::shared_ptr<Event> Ptr;
61 
65  typedef boost::shared_ptr<const Event> ConstPtr;
66 
70  Event();
71 
76  Event( const Event &other );
77 
81  ~Event();
82 
87  Event &operator=( const Event &other );
88 
93  bool operator==( const Event &event ) const;
94 
99  QByteArray type() const;
100 
105  //KDE5: QString typeStr() const;
106 
110  Event *clone();
111 
117  void setDtEnd( const KDateTime &dtEnd );
118 
123  virtual KDateTime dtEnd() const;
124 
130  QDate dateEnd() const;
131 
142  KCAL_DEPRECATED QString dtEndTimeStr(
143  bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const;
144 
155  KCAL_DEPRECATED QString dtEndDateStr(
156  bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const;
157 
168  KCAL_DEPRECATED QString dtEndStr(
169  bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const;
170 
175  void setHasEndDate( bool b );
176 
180  bool hasEndDate() const;
181 
188  bool isMultiDay( const KDateTime::Spec &spec = KDateTime::Spec() ) const;
189 
194  virtual void shiftTimes( const KDateTime::Spec &oldSpec,
195  const KDateTime::Spec &newSpec );
196 
201  void setTransparency( Transparency transparency );
202 
206  Transparency transparency() const;
207 
212  void setDuration( const Duration &duration );
213 
214  protected:
218  virtual KDateTime endDateRecurrenceBase() const;
219 
220  private:
225  bool accept( Visitor &v ) { return v.visit( this ); }
226 
227  //@cond PRIVATE
228  class Private;
229  Private *const d;
230  //@endcond
231 };
232 
233 }
234 
235 //@cond PRIVATE
236 // super class trait specialization
237 namespace KPIMUtils {
238  template <> struct SuperClass<KCal::Event> : public SuperClassTrait<KCal::Incidence>{};
239 }
240 //@endcond
241 
242 #endif
KCal::Event
This class provides an Event in the sense of RFC2445.
Definition: event.h:41
KCal::Event::ConstPtr
boost::shared_ptr< const Event > ConstPtr
A shared pointer to a non-mutable Event.
Definition: event.h:65
KCal::Event::Ptr
boost::shared_ptr< Event > Ptr
A shared pointer to an Event object.
Definition: event.h:60
KCal::IncidenceBase::Visitor
This class provides the interface for a visitor of calendar components.
Definition: incidencebase.h:112
KCal::Incidence
Provides the abstract base class common to non-FreeBusy (Events, To-dos, Journals) calendar component...
Definition: incidence.h:68
KCal::ListBase
This class provides a template for lists of pointers.
Definition: listbase.h:44
KCal::Event::Opaque
Event appears in free/busy time.
Definition: event.h:48
KCal::Event::Transparency
Transparency
The different Event transparency types.
Definition: event.h:47
incidence.h
This file is part of the API for handling calendar data and defines the Incidence class...
KCal::Duration
Represents a span of time measured in seconds or days.
Definition: duration.h:52
KCal::Event::List
ListBase< Event > List
List of events.
Definition: event.h:55
KCal::IncidenceBase::Visitor::visit
virtual bool visit(Event *event)
Reimplement this function in your concrete subclass of IncidenceBase::Visitor to perform actions on a...
Definition: incidencebase.cpp:513
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