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

KCalCore Library

  • sources
  • kde-4.14
  • kdepimlibs
  • kcalcore
todo.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  Copyright (C) 2009 Allen Winter <winter@kde.org>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
31 #ifndef KCALCORE_TODO_H
32 #define KCALCORE_TODO_H
33 
34 #include "kcalcore_export.h"
35 #include "incidence.h"
36 #include "supertrait.h"
37 
38 namespace KCalCore {
39 
44 class KCALCORE_EXPORT Todo : public Incidence
45 {
46 public:
50  typedef QSharedPointer<Todo> Ptr;
51 
55  typedef QVector<Ptr> List;
56 
60  Todo();
61 
66  Todo(const Todo &other);
67 
74  Todo(const Incidence &other);
75 
79  ~Todo();
80 
84  IncidenceType type() const;
85 
89  QByteArray typeStr() const;
90 
95  Todo *clone() const;
96 
106  void setDtDue(const KDateTime &dtDue, bool first = false);
107 
117  KDateTime dtDue(bool first = false) const;
118 
123  bool hasDueDate() const;
124 
130  KCALCORE_DEPRECATED void setHasDueDate(bool hasDueDate);
131 
136  bool hasStartDate() const;
137 
143  KCALCORE_DEPRECATED void setHasStartDate(bool hasStartDate);
144 
148  virtual KDateTime dtStart() const;
149 
160  KDateTime dtStart(bool first) const;
161  //TODO_KDE5: Remove (see IncidenceBase)
166  void setDtStart(const KDateTime &dtStart);
167 
175  bool isCompleted() const;
176 
185  void setCompleted(bool completed);
186 
192  int percentComplete() const;
193 
203  void setPercentComplete(int percent);
204 
211  KDateTime completed() const;
212 
219  void setCompleted(const KDateTime &completeDate);
220 
227  bool hasCompletedDate() const;
228 
241  bool isInProgress(bool first) const;
242 
247  bool isOpenEnded() const;
248 
260  bool isNotStarted(bool first) const;
261 
265  virtual void shiftTimes(const KDateTime::Spec &oldSpec,
266  const KDateTime::Spec &newSpec);
267 
271  void setAllDay(bool allDay);
272 
278  void setDtRecurrence(const KDateTime &dt);
279 
283  KDateTime dtRecurrence() const;
284 
294  virtual bool recursOn(const QDate &date,
295  const KDateTime::Spec &timeSpec) const;
296 
302  bool isOverdue() const;
303 
307  KDateTime dateTime(DateTimeRole role) const;
308 
312  void setDateTime(const KDateTime &dateTime, DateTimeRole role);
313 
317  QLatin1String mimeType() const;
318 
322  QLatin1String iconName(const KDateTime &recurrenceId = KDateTime()) const;
323 
327  static QLatin1String todoMimeType();
328 
329 protected:
334  virtual bool equals(const IncidenceBase &todo) const;
335 
339  virtual IncidenceBase &assign(const IncidenceBase &other);
340 
344  virtual void virtual_hook(int id, void *data);
345 
346 private:
350  bool accept(Visitor &v, IncidenceBase::Ptr incidence);
351 
358  Todo &operator=(const Todo &other);
359 
360  // For polymorfic serialization
361  void serialize(QDataStream &out);
362  void deserialize(QDataStream &in);
363 
364  //@cond PRIVATE
365  class Private;
366  Private *const d;
367  //@endcond
368 };
369 
370 } // namespace KCalCore
371 
372 //@cond PRIVATE
373 Q_DECLARE_TYPEINFO(KCalCore::Todo::Ptr, Q_MOVABLE_TYPE);
374 Q_DECLARE_METATYPE(KCalCore::Todo::Ptr)
375 
376 namespace KPIMUtils {
377 // super class trait specialization
378 template <> struct SuperClass<KCalCore::Todo> : public SuperClassTrait<KCalCore::Incidence> {};
379 }
380 //@endcond
381 
382 #endif
QByteArray
QDataStream
KCalCore::IncidenceBase
An abstract class that provides a common base for all calendar incidence classes. ...
Definition: incidencebase.h:109
KCalCore::Visitor
This class provides the interface for a visitor of calendar components.
Definition: visitor.h:43
KCalCore::IncidenceBase::IncidenceType
IncidenceType
The different types of incidences, per RFC2445.
Definition: incidencebase.h:121
QSharedPointer
QDate
KCalCore::IncidenceBase::DateTimeRole
DateTimeRole
The different types of incidence date/times roles.
Definition: incidencebase.h:133
KCalCore::Todo::List
QVector< Ptr > List
List of to-dos.
Definition: todo.h:55
QVector
QLatin1String
incidence.h
This file is part of the API for handling calendar data and defines the Incidence class...
KCalCore::Todo
Provides a To-do in the sense of RFC2445.
Definition: todo.h:44
KCalCore::Todo::Ptr
QSharedPointer< Todo > Ptr
A shared pointer to a Todo object.
Definition: todo.h:50
KCalCore::Incidence
Provides the abstract base class common to non-FreeBusy (Events, To-dos, Journals) calendar component...
Definition: incidence.h:68
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:36:53 by doxygen 1.8.7 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 API Reference

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

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