• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.10.5 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 
77  IncidenceType type() const;
78 
83  QByteArray typeStr() const;
84 
89  Todo *clone() const;
90 
100  void setDtDue( const KDateTime &dtDue, bool first = false );
101 
110  KDateTime dtDue( bool first = false ) const;
111 
115  bool hasDueDate() const;
116 
122  void setHasDueDate( bool hasDueDate );
123 
127  bool hasStartDate() const;
128 
134  void setHasStartDate( bool hasStartDate );
135 
140  virtual KDateTime dtStart() const;
141 
150  KDateTime dtStart( bool first ) const;
151 
157  void setDtStart( const KDateTime &dtStart );
158 
164  bool isCompleted() const;
165 
174  void setCompleted( bool completed );
175 
180  int percentComplete() const;
181 
191  void setPercentComplete( int percent );
192 
196  KDateTime completed() const;
197 
203  void setCompleted( const KDateTime &completeDate );
204 
209  bool hasCompletedDate() const;
210 
223  bool isInProgress( bool first ) const;
224 
229  bool isOpenEnded() const;
230 
242  bool isNotStarted( bool first ) const;
243 
248  virtual void shiftTimes( const KDateTime::Spec &oldSpec,
249  const KDateTime::Spec &newSpec );
250 
255  void setAllDay( bool allDay );
256 
262  void setDtRecurrence( const KDateTime &dt );
263 
267  KDateTime dtRecurrence() const;
268 
278  virtual bool recursOn( const QDate &date,
279  const KDateTime::Spec &timeSpec ) const;
280 
286  bool isOverdue() const;
287 
292  KDateTime dateTime( DateTimeRole role ) const;
293 
298  void setDateTime( const KDateTime &dateTime, DateTimeRole role );
299 
304  QLatin1String mimeType() const;
305 
310  QLatin1String iconName( const KDateTime &recurrenceId = KDateTime() ) const;
311 
315  static QLatin1String todoMimeType();
316  protected:
321  virtual bool equals( const IncidenceBase &todo ) const;
322 
327  virtual IncidenceBase &assign( const IncidenceBase &other );
328 
333  virtual void virtual_hook( int id, void *data );
334 
335  private:
340  bool accept( Visitor &v, IncidenceBase::Ptr incidence );
341 
348  Todo &operator=( const Todo &other );
349 
350  //@cond PRIVATE
351  class Private;
352  Private *const d;
353  //@endcond
354 };
355 
356 } // namespace KCalCore
357 
358 Q_DECLARE_TYPEINFO( KCalCore::Todo::Ptr, Q_MOVABLE_TYPE );
359 
360 //@cond PRIVATE
361 namespace KPIMUtils {
362  // super class trait specialization
363  template <> struct SuperClass<KCalCore::Todo> : public SuperClassTrait<KCalCore::Incidence>{};
364 }
365 //@endcond
366 
367 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:24:52 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.10.5 API Reference

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