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 Copyright (C) 2009 Allen Winter <winter@kde.org> 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00020 Boston, MA 02110-1301, USA. 00021 */ 00031 #ifndef KCAL_TODO_H 00032 #define KCAL_TODO_H 00033 00034 #include "incidence.h" 00035 #include <kpimutils/supertrait.h> 00036 #include <QtCore/QByteArray> 00037 00038 namespace KCal { 00039 00044 class KCAL_EXPORT_DEPRECATED Todo : public Incidence 00045 { 00046 public: 00050 typedef ListBase<Todo> List; 00051 00055 typedef boost::shared_ptr<Todo> Ptr; 00056 00060 typedef boost::shared_ptr<const Todo> ConstPtr; 00061 00065 Todo(); 00066 00071 Todo( const Todo &other ); 00072 00076 ~Todo(); 00077 00082 QByteArray type() const; 00083 00088 //KDE5: QString typeStr() const; 00089 00094 Todo *clone(); 00095 00105 void setDtDue( const KDateTime &dtDue, bool first = false ); 00106 00115 KDateTime dtDue( bool first = false ) const; 00116 00127 KDE_DEPRECATED QString dtDueTimeStr( 00128 bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const; 00129 00140 KDE_DEPRECATED QString dtDueDateStr( 00141 bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const; 00142 00153 KDE_DEPRECATED QString dtDueStr( 00154 bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const; 00155 00159 bool hasDueDate() const; 00160 00166 void setHasDueDate( bool hasDueDate ); 00167 00171 bool hasStartDate() const; 00172 00178 void setHasStartDate( bool hasStartDate ); 00179 00184 virtual KDateTime dtStart() const; 00185 00194 KDateTime dtStart( bool first ) const; 00195 00201 void setDtStart( const KDateTime &dtStart ); 00202 00218 KDE_DEPRECATED QString dtStartTimeStr( 00219 bool shortfmt, bool first, const KDateTime::Spec &spec = KDateTime::Spec() ) const; 00220 00225 virtual KDE_DEPRECATED QString dtStartTimeStr( 00226 bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const; 00227 00243 KDE_DEPRECATED QString dtStartDateStr( 00244 bool shortfmt, bool first, const KDateTime::Spec &spec = KDateTime::Spec() ) const; 00245 00250 virtual KDE_DEPRECATED QString dtStartDateStr( 00251 bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const; 00252 00268 KDE_DEPRECATED QString dtStartStr( 00269 bool shortfmt, bool first, const KDateTime::Spec &spec = KDateTime::Spec() ) const; 00270 00275 virtual KDE_DEPRECATED QString dtStartStr( 00276 bool shortfmt = true, const KDateTime::Spec &spec = KDateTime::Spec() ) const; 00277 00283 bool isCompleted() const; 00284 00293 void setCompleted( bool completed ); 00294 00299 int percentComplete() const; 00300 00310 void setPercentComplete( int percent ); 00311 00315 KDateTime completed() const; 00316 00323 QString completedStr( bool shortfmt = false ) const; 00324 00330 void setCompleted( const KDateTime &completeDate ); 00331 00336 bool hasCompletedDate() const; 00337 00351 bool isInProgress( bool first ) const; 00352 00358 bool isOpenEnded() const; 00359 00372 bool isNotStarted( bool first ) const; 00373 00378 virtual void shiftTimes( const KDateTime::Spec &oldSpec, 00379 const KDateTime::Spec &newSpec ); 00380 00386 void setDtRecurrence( const KDateTime &dt ); 00387 00391 KDateTime dtRecurrence() const; 00392 00402 virtual bool recursOn( const QDate &date, 00403 const KDateTime::Spec &timeSpec ) const; 00404 00410 bool isOverdue() const; 00411 00416 Todo &operator=( const Todo &other ); 00417 00422 bool operator==( const Todo &todo ) const; 00423 00424 protected: 00428 virtual KDateTime endDateRecurrenceBase() const; 00429 00430 private: 00435 bool accept( Visitor &v ) { return v.visit( this ); } 00436 00437 //@cond PRIVATE 00438 class Private; 00439 Private *const d; 00440 //@endcond 00441 }; 00442 00443 } 00444 00445 //@cond PRIVATE 00446 // super class trait specialization 00447 namespace KPIMUtils { 00448 template <> struct SuperClass<KCal::Todo> : public SuperClassTrait<KCal::Incidence>{}; 00449 } 00450 //@endcond 00451 00452 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Aug 27 2012 22:10:05 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Aug 27 2012 22:10:05 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.