• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KCal Library

todo.h

Go to the documentation of this file.
00001 /*
00002   This file is part of the kcal library.
00003 
00004   Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
00005 
00006   This library is free software; you can redistribute it and/or
00007   modify it under the terms of the GNU Library General Public
00008   License as published by the Free Software Foundation; either
00009   version 2 of the License, or (at your option) any later version.
00010 
00011   This library is distributed in the hope that it will be useful,
00012   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014   Library General Public License for more details.
00015 
00016   You should have received a copy of the GNU Library General Public License
00017   along with this library; see the file COPYING.LIB.  If not, write to
00018   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019   Boston, MA 02110-1301, USA.
00020 */
00029 #ifndef KCAL_TODO_H
00030 #define KCAL_TODO_H
00031 
00032 #include "incidence.h"
00033 #include <kpimutils/supertrait.h>
00034 #include <QtCore/QByteArray>
00035 
00036 namespace KCal {
00037 
00042 class KCAL_EXPORT Todo : public Incidence
00043 {
00044   public:
00048     typedef ListBase<Todo> List;
00049 
00053     typedef boost::shared_ptr<Todo> Ptr;
00054 
00058     Todo();
00059 
00064     Todo( const Todo &other );
00065 
00069     ~Todo();
00070 
00075     QByteArray type() const;
00076 
00081     Todo *clone();
00082 
00092     void setDtDue( const KDateTime &dtDue, bool first = false );
00093 
00102     KDateTime dtDue( bool first = false ) const;
00103 
00114     KDE_DEPRECATED QString dtDueTimeStr(
00115       bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00116 
00127     KDE_DEPRECATED QString dtDueDateStr(
00128       bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00129 
00140     KDE_DEPRECATED QString dtDueStr(
00141       bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00142 
00146     bool hasDueDate() const;
00147 
00153     void setHasDueDate( bool hasDueDate );
00154 
00158     bool hasStartDate() const;
00159 
00165     void setHasStartDate( bool hasStartDate );
00166 
00171     virtual KDateTime dtStart() const;
00172 
00180     KDateTime dtStart( bool first ) const;
00181 
00187     void setDtStart( const KDateTime &dtStart );
00188 
00203     KDE_DEPRECATED QString dtStartTimeStr(
00204       bool shortfmt, bool first, const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00205 
00210     virtual KDE_DEPRECATED QString dtStartTimeStr(
00211       bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00212 
00227     KDE_DEPRECATED QString dtStartDateStr(
00228       bool shortfmt, bool first, const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00229 
00234     virtual KDE_DEPRECATED QString dtStartDateStr(
00235       bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00236 
00251     KDE_DEPRECATED QString dtStartStr(
00252       bool shortfmt, bool first, const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00253 
00258     virtual KDE_DEPRECATED QString dtStartStr(
00259       bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00260 
00266     bool isCompleted() const;
00267 
00276     void setCompleted( bool completed );
00277 
00282     int percentComplete() const;
00283 
00293     void setPercentComplete( int percent );
00294 
00298     KDateTime completed() const;
00299 
00306     QString completedStr( bool shortfmt = false ) const;
00307 
00313     void setCompleted( const KDateTime &completeDate );
00314 
00319     bool hasCompletedDate() const;
00320 
00325     virtual void shiftTimes( const KDateTime::Spec &oldSpec,
00326                              const KDateTime::Spec &newSpec );
00327 
00333     void setDtRecurrence( const KDateTime &dt );
00334 
00338     KDateTime dtRecurrence() const;
00339 
00349     virtual bool recursOn( const QDate &date,
00350                            const KDateTime::Spec &timeSpec ) const;
00351 
00356     bool isOverdue() const;
00357 
00362     Todo &operator=( const Todo &other );
00363 
00368     bool operator==( const Todo &todo ) const;
00369 
00370   protected:
00374     virtual KDateTime endDateRecurrenceBase() const;
00375 
00376   private:
00381     bool accept( Visitor &v ) { return v.visit( this ); }
00382 
00383     //@cond PRIVATE
00384     class Private;
00385     Private *const d;
00386     //@endcond
00387 };
00388 
00389 }
00390 
00391 //@cond PRIVATE
00392 // super class trait specialization
00393 namespace KPIMUtils {
00394   template <> struct SuperClass<KCal::Todo> : public SuperClassTrait<KCal::Incidence>{};
00395 }
00396 //@endcond
00397 
00398 #endif

KCal Library

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.8
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal