KCalCore Library
todo.h
Go to the documentation of this file.
00001 /* 00002 This file is part of the kcalcore 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 KCALCORE_TODO_H 00032 #define KCALCORE_TODO_H 00033 00034 #include "kcalcore_export.h" 00035 #include "incidence.h" 00036 #include "supertrait.h" 00037 00038 namespace KCalCore { 00039 00044 class KCALCORE_EXPORT Todo : public Incidence 00045 { 00046 public: 00050 typedef QSharedPointer<Todo> Ptr; 00051 00055 typedef QVector<Ptr> List; 00056 00060 Todo(); 00061 00066 Todo( const Todo &other ); 00067 00071 ~Todo(); 00072 00077 IncidenceType type() const; 00078 00083 QByteArray typeStr() const; 00084 00089 Todo *clone() const; 00090 00100 void setDtDue( const KDateTime &dtDue, bool first = false ); 00101 00110 KDateTime dtDue( bool first = false ) const; 00111 00115 bool hasDueDate() const; 00116 00122 void setHasDueDate( bool hasDueDate ); 00123 00127 bool hasStartDate() const; 00128 00134 void setHasStartDate( bool hasStartDate ); 00135 00140 virtual KDateTime dtStart() const; 00141 00150 KDateTime dtStart( bool first ) const; 00151 00157 void setDtStart( const KDateTime &dtStart ); 00158 00164 bool isCompleted() const; 00165 00174 void setCompleted( bool completed ); 00175 00180 int percentComplete() const; 00181 00191 void setPercentComplete( int percent ); 00192 00196 KDateTime completed() const; 00197 00203 void setCompleted( const KDateTime &completeDate ); 00204 00209 bool hasCompletedDate() const; 00210 00223 bool isInProgress( bool first ) const; 00224 00229 bool isOpenEnded() const; 00230 00242 bool isNotStarted( bool first ) const; 00243 00248 virtual void shiftTimes( const KDateTime::Spec &oldSpec, 00249 const KDateTime::Spec &newSpec ); 00250 00255 void setAllDay( bool allDay ); 00256 00262 void setDtRecurrence( const KDateTime &dt ); 00263 00267 KDateTime dtRecurrence() const; 00268 00278 virtual bool recursOn( const QDate &date, 00279 const KDateTime::Spec &timeSpec ) const; 00280 00286 bool isOverdue() const; 00287 00292 KDateTime dateTime( DateTimeRole role ) const; 00293 00298 void setDateTime( const KDateTime &dateTime, DateTimeRole role ); 00299 00304 QLatin1String mimeType() const; 00305 00310 QLatin1String iconName( const KDateTime &recurrenceId = KDateTime() ) const; 00311 00315 static QLatin1String todoMimeType(); 00316 protected: 00321 virtual bool equals( const IncidenceBase &todo ) const; 00322 00327 virtual IncidenceBase &assign( const IncidenceBase &other ); 00328 00333 virtual void virtual_hook( int id, void *data ); 00334 00335 private: 00340 bool accept( Visitor &v, IncidenceBase::Ptr incidence ); 00341 00348 Todo &operator=( const Todo &other ); 00349 00350 //@cond PRIVATE 00351 class Private; 00352 Private *const d; 00353 //@endcond 00354 }; 00355 00356 } // namespace KCalCore 00357 00358 Q_DECLARE_TYPEINFO( KCalCore::Todo::Ptr, Q_MOVABLE_TYPE ); 00359 00360 //@cond PRIVATE 00361 namespace KPIMUtils { 00362 // super class trait specialization 00363 template <> struct SuperClass<KCalCore::Todo> : public SuperClassTrait<KCalCore::Incidence>{}; 00364 } 00365 //@endcond 00366 00367 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu Aug 2 2012 15:24:12 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu Aug 2 2012 15:24:12 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.