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

KCalCore Library

  • kcalcore
event.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcalcore 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 KCALCORE_EVENT_H
29 #define KCALCORE_EVENT_H
30 
31 #include "kcalcore_export.h"
32 #include "incidence.h"
33 #include "supertrait.h"
34 
35 namespace KCalCore {
36 
41 class KCALCORE_EXPORT Event : public Incidence
42 {
43 public:
47  enum Transparency {
48  Opaque,
49  Transparent
50  };
51 
55  typedef QSharedPointer<Event> Ptr;
56 
60  typedef QVector<Ptr> List;
61 
65  Event();
66 
71  Event(const Event &other);
72 
76  ~Event();
77 
82  IncidenceType type() const;
83 
88  QByteArray typeStr() const;
89 
93  Event *clone() const;
94 
101  virtual void setDtStart(const KDateTime &dt);
102 
111  void setDtEnd(const KDateTime &dtEnd);
112 
120  virtual KDateTime dtEnd() const;
121 
127  QDate dateEnd() const;
128 
134  KDE_DEPRECATED void setHasEndDate(bool b);
135 
139  bool hasEndDate() const;
140 
151  bool isMultiDay(const KDateTime::Spec &spec = KDateTime::Spec()) const;
152 
157  virtual void shiftTimes(const KDateTime::Spec &oldSpec,
158  const KDateTime::Spec &newSpec);
159 
164  void setTransparency(Transparency transparency);
165 
169  Transparency transparency() const;
170 
175  void setDuration(const Duration &duration);
176 
181  void setAllDay(bool allDay);
182 
187  KDateTime dateTime(DateTimeRole role) const;
188 
193  void setDateTime(const KDateTime &dateTime, DateTimeRole role);
194 
199  QLatin1String mimeType() const;
200 
205  QLatin1String iconName(const KDateTime &recurrenceId = KDateTime()) const;
206 
210  static QLatin1String eventMimeType();
211 
212 protected:
217  virtual bool equals(const IncidenceBase &event) const;
218 
223  virtual IncidenceBase &assign(const IncidenceBase &other);
224 
229  virtual void virtual_hook(int id, void *data);
230 
231 private:
236  bool accept(Visitor &v, IncidenceBase::Ptr incidence);
237 
244  Event &operator=(const Event &other);
245 
246  //@cond PRIVATE
247  class Private;
248  Private *const d;
249  //@endcond
250 };
251 
252 } // namespace KCalCore
253 
254 //@cond PRIVATE
255 Q_DECLARE_TYPEINFO(KCalCore::Event::Ptr, Q_MOVABLE_TYPE);
256 //@endcond
257 
258 //@cond PRIVATE
259 namespace KPIMUtils {
260 // super class trait specialization
261 template <> struct SuperClass<KCalCore::Event> : public SuperClassTrait<KCalCore::Incidence> {};
262 }
263 //@endcond
264 
265 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Fri Jan 3 2014 22:20:29 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalCore Library

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

kdepimlibs-4.11.5 API Reference

Skip menu "kdepimlibs-4.11.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