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

KCalCore Library

  • 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 
71  ~Todo();
72 
76  IncidenceType type() const;
77 
81  QByteArray typeStr() const;
82 
87  Todo *clone() const;
88 
98  void setDtDue( const KDateTime &dtDue, bool first = false );
99 
109  KDateTime dtDue( bool first = false ) const;
110 
115  bool hasDueDate() const;
116 
122  KDE_DEPRECATED void setHasDueDate( bool hasDueDate );
123 
128  bool hasStartDate() const;
129 
135  KDE_DEPRECATED void setHasStartDate( bool hasStartDate );
136 
140  virtual KDateTime dtStart() const;
141 
152  KDateTime dtStart( bool first ) const;
153  //TODO_KDE5: Remove (see IncidenceBase)
158  void setDtStart( const KDateTime &dtStart );
159 
167  bool isCompleted() const;
168 
177  void setCompleted( bool completed );
178 
184  int percentComplete() const;
185 
195  void setPercentComplete( int percent );
196 
203  KDateTime completed() const;
204 
211  void setCompleted( const KDateTime &completeDate );
212 
219  bool hasCompletedDate() const;
220 
233  bool isInProgress( bool first ) const;
234 
239  bool isOpenEnded() const;
240 
252  bool isNotStarted( bool first ) const;
253 
257  virtual void shiftTimes( const KDateTime::Spec &oldSpec,
258  const KDateTime::Spec &newSpec );
259 
263  void setAllDay( bool allDay );
264 
270  void setDtRecurrence( const KDateTime &dt );
271 
275  KDateTime dtRecurrence() const;
276 
286  virtual bool recursOn( const QDate &date,
287  const KDateTime::Spec &timeSpec ) const;
288 
294  bool isOverdue() const;
295 
299  KDateTime dateTime( DateTimeRole role ) const;
300 
304  void setDateTime( const KDateTime &dateTime, DateTimeRole role );
305 
309  QLatin1String mimeType() const;
310 
314  QLatin1String iconName( const KDateTime &recurrenceId = KDateTime() ) const;
315 
319  static QLatin1String todoMimeType();
320 
321  protected:
326  virtual bool equals( const IncidenceBase &todo ) const;
327 
331  virtual IncidenceBase &assign( const IncidenceBase &other );
332 
336  virtual void virtual_hook( int id, void *data );
337 
338  private:
342  bool accept( Visitor &v, IncidenceBase::Ptr incidence );
343 
350  Todo &operator=( const Todo &other );
351 
352  //@cond PRIVATE
353  class Private;
354  Private *const d;
355  //@endcond
356 };
357 
358 } // namespace KCalCore
359 
360 //@cond PRIVATE
361 Q_DECLARE_TYPEINFO( KCalCore::Todo::Ptr, Q_MOVABLE_TYPE );
362 
363 namespace KPIMUtils {
364  // super class trait specialization
365  template <> struct SuperClass<KCalCore::Todo> : public SuperClassTrait<KCalCore::Incidence>{};
366 }
367 //@endcond
368 
369 #endif
KCalCore::IncidenceBase
An abstract class that provides a common base for all calendar incidence classes. ...
Definition: incidencebase.h:107
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:119
KCalCore::IncidenceBase::Ptr
QSharedPointer< IncidenceBase > Ptr
A shared pointer to an IncidenceBase.
Definition: incidencebase.h:113
KCalCore::IncidenceBase::DateTimeRole
DateTimeRole
The different types of incidence date/times roles.
Definition: incidencebase.h:131
KCalCore::Todo::List
QVector< Ptr > List
List of to-dos.
Definition: todo.h:55
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-2013 The KDE developers.
Generated on Tue Nov 26 2013 09:02:04 by doxygen 1.8.5 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.3 API Reference

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