• Skip to content
  • Skip to link menu
KDE 4.2 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 <QtCore/QByteArray>
00034 
00035 namespace KCal {
00036 
00041 class KCAL_EXPORT Todo : public Incidence
00042 {
00043   public:
00047     typedef ListBase<Todo> List;
00048 
00052     Todo();
00053 
00058     Todo( const Todo &other );
00059 
00063     ~Todo();
00064 
00069     QByteArray type() const;
00070 
00075     Todo *clone();
00076 
00086     void setDtDue( const KDateTime &dtDue, bool first = false );
00087 
00096     KDateTime dtDue( bool first = false ) const;
00097 
00106     QString dtDueTimeStr( bool shortfmt = true,
00107                           const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00108 
00117     QString dtDueDateStr( bool shortfmt = true,
00118                           const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00119 
00128     QString dtDueStr( bool shortfmt = true,
00129                       const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00130 
00134     bool hasDueDate() const;
00135 
00141     void setHasDueDate( bool hasDueDate );
00142 
00146     bool hasStartDate() const;
00147 
00153     void setHasStartDate( bool hasStartDate );
00154 
00159     virtual KDateTime dtStart() const;
00160 
00168     KDateTime dtStart( bool first ) const;
00169 
00175     void setDtStart( const KDateTime &dtStart );
00176 
00189     QString dtStartTimeStr( bool shortfmt, bool first,
00190                             const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00191 
00196     virtual QString dtStartTimeStr( bool shortfmt = true,
00197                                     const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00198 
00211     QString dtStartDateStr( bool shortfmt, bool first,
00212                             const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00213 
00218     virtual QString dtStartDateStr( bool shortfmt = true,
00219                                     const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00220 
00233     QString dtStartStr( bool shortfmt, bool first,
00234                         const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00235 
00240     virtual QString dtStartStr( bool shortfmt = true,
00241                                 const KDateTime::Spec &spec = KDateTime::Spec() ) const;
00242 
00248     bool isCompleted() const;
00249 
00258     void setCompleted( bool completed );
00259 
00264     int percentComplete() const;
00265 
00275     void setPercentComplete( int percent );
00276 
00280     KDateTime completed() const;
00281 
00288     QString completedStr( bool shortfmt = false ) const;
00289 
00295     void setCompleted( const KDateTime &completeDate );
00296 
00301     bool hasCompletedDate() const;
00302 
00307     virtual void shiftTimes( const KDateTime::Spec &oldSpec,
00308                              const KDateTime::Spec &newSpec );
00309 
00315     void setDtRecurrence( const KDateTime &dt );
00316 
00320     KDateTime dtRecurrence() const;
00321 
00331     virtual bool recursOn( const QDate &date,
00332                            const KDateTime::Spec &timeSpec ) const;
00333 
00338     bool isOverdue() const;
00339 
00343     Todo &operator=( const Todo &other );
00344 
00350     bool operator==( const Todo &todo ) const;
00351 
00352   protected:
00356     virtual KDateTime endDateRecurrenceBase() const;
00357 
00358   private:
00363     bool accept( Visitor &v ) { return v.visit( this ); }
00364 
00365     //@cond PRIVATE
00366     class Private;
00367     Private *const d;
00368     //@endcond
00369 };
00370 
00371 }
00372 
00373 #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
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • 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