kpilot Library API Documentation

pilotTodoEntry.h

00001 #ifndef _KPILOT_PILOTTODOENTRY_H
00002 #define _KPILOT_PILOTTODOENTRY_H
00003 /* pilotTodoEntry.h -*- C++ -*-     KPilot
00004 **
00005 ** Copyright (C) 1998-2001 by Dan Pilone
00006 **
00007 ** See the .cc file for an explanation of what this file is for.
00008 */
00009 
00010 /*
00011 ** This program is free software; you can redistribute it and/or modify
00012 ** it under the terms of the GNU Lesser General Public License as published by
00013 ** the Free Software Foundation; either version 2.1 of the License, or
00014 ** (at your option) any later version.
00015 **
00016 ** This program is distributed in the hope that it will be useful,
00017 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00019 ** GNU Lesser General Public License for more details.
00020 **
00021 ** You should have received a copy of the GNU Lesser General Public License
00022 ** along with this program in a file called COPYING; if not, write to
00023 ** the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00024 ** MA 02111-1307, USA.
00025 */
00026 
00027 /*
00028 ** Bug reports and questions can be sent to kde-pim@kde.org
00029 */
00030 
00031 #include <time.h>
00032 
00033 #include <pi-macros.h>
00034 #include <pi-todo.h>
00035 
00036 #include <qstring.h>
00037 
00038 #include "pilotAppCategory.h"
00039 
00040 
00041 
00042 class PilotTodoEntry : public PilotAppCategory
00043 {
00044 public:
00045     PilotTodoEntry(struct ToDoAppInfo &appInfo);
00046     PilotTodoEntry(struct ToDoAppInfo &appInfo, PilotRecord * rec);
00047 
00048   PilotTodoEntry(const PilotTodoEntry &e);
00049   ~PilotTodoEntry() { free_ToDo(&fTodoInfo); }
00050     virtual QString getTextRepresentation(bool richText=false);
00051 
00052   PilotTodoEntry& operator=(const PilotTodoEntry &e);
00053 
00054   PilotRecord* pack() { return PilotAppCategory::pack(); }
00055 
00056   struct tm getDueDate() const { return fTodoInfo.due; }
00057   void setDueDate(struct tm& d) { fTodoInfo.due = d; }
00058   const struct tm *getDueDate_p() const { return &fTodoInfo.due; }
00059 
00060   int getIndefinite() const { return fTodoInfo.indefinite; }
00061   void setIndefinite(int i) { fTodoInfo.indefinite = i; }
00062 
00063   int getPriority() const { return fTodoInfo.priority; }
00064   void setPriority(int p) { fTodoInfo.priority = p; }
00065 
00066   int getComplete() const { return fTodoInfo.complete; }
00067   void setComplete(int c) { fTodoInfo.complete = c; }
00068 
00069   void  setDescription(const QString &);
00070   QString getDescription() const; // { return fTodoInfo.description; }
00071 
00072   void  setNote(const QString &note);
00073   QString getNote() const; // { return fTodoInfo.note; }
00074 
00075     QString getCategoryLabel() const;
00076         // { return fAppInfo.category.name[getCat()]; }
00081     bool setCategory(const QString &label);
00082 
00083     static const int APP_BUFFER_SIZE;
00084 
00085 protected:
00086     void *pack(void *, int *);
00087     void unpack(const void *, int = 0) { } ;
00088 
00089     const char *getDescriptionP() const { return fTodoInfo.description; } ;
00090     void setDescriptionP(const char *, int len=-1) ;
00091     const char *getNoteP() const { return fTodoInfo.note; } ;
00092     void setNoteP(const char *, int len=-1) ;
00093 
00094 private:
00095   struct ToDo fTodoInfo;
00096     struct ToDoAppInfo &fAppInfo;
00097 };
00098 
00099 
00100 
00101 #else
00102 #ifdef DEBUG
00103 #warning "File doubly included"
00104 #endif
00105 #endif
KDE Logo
This file is part of the documentation for kpilot Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:36:49 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003