libkcal Library API Documentation

todo.h

00001 /* 00002 This file is part of libkcal. 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., 59 Temple Place - Suite 330, 00019 Boston, MA 02111-1307, USA. 00020 */ 00021 #ifndef KCAL_TODO_H 00022 #define KCAL_TODO_H 00023 00024 #include "incidence.h" 00025 00026 namespace KCal { 00027 00031 class Todo : public Incidence 00032 { 00033 public: 00034 typedef ListBase<Todo> List; 00035 00036 Todo(); 00037 Todo( const Todo & ); 00038 ~Todo(); 00039 bool operator==( const Todo& ) const; 00040 00041 QCString type() const { return "Todo"; } 00042 00047 Todo *clone(); 00048 00055 void setDtDue(const QDateTime &dtDue, bool first = false); 00064 QDateTime dtDue( bool first = false ) const; 00069 QString dtDueTimeStr() const; 00077 QString dtDueDateStr( bool shortfmt = true ) const; 00082 QString dtDueStr() const; 00083 00087 bool hasDueDate() const; 00093 void setHasDueDate( bool hasDueDate ); 00094 00098 bool hasStartDate() const; 00104 void setHasStartDate( bool hasStartDate ); 00105 00113 QDateTime dtStart( bool first = false ) const; 00114 00118 void setDtStart( const QDateTime &dtStart ); 00119 00127 QString dtStartTimeStr( bool first = false ) const; 00135 QString dtStartDateStr( bool shortfmt = true, bool first = false ) const; 00143 QString dtStartStr( bool first = false ) const; 00144 00148 bool isCompleted() const; 00155 void setCompleted( bool completed ); 00156 00161 int percentComplete() const; 00166 void setPercentComplete( int ); 00167 00171 QDateTime completed() const; 00176 QString completedStr() const; 00180 void setCompleted( const QDateTime &completed ); 00181 00186 bool hasCompletedDate() const; 00187 00191 void setDtRecurrence( const QDateTime &dt ); 00192 00196 QDateTime dtRecurrence() const; 00197 00198 private: 00199 bool accept(Visitor &v) { return v.visit( this ); } 00200 00201 QDateTime mDtDue; // due date of todo 00202 // (first occurence if recurrent) 00203 QDateTime mDtRecurrence; // due date of recurrence 00204 00205 bool mHasDueDate; // if todo has associated due date 00206 bool mHasStartDate; // if todo has associated start date 00207 00208 QDateTime mCompleted; 00209 bool mHasCompletedDate; 00210 00211 int mPercentComplete; 00212 00213 class Private; 00214 Private *d; 00215 }; 00216 00217 } 00218 00219 #endif
KDE Logo
This file is part of the documentation for libkcal Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Oct 21 19:46:20 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003