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 
00051   PilotTodoEntry& operator=(const PilotTodoEntry &e);
00052   
00053   PilotRecord* pack() { return PilotAppCategory::pack(); }
00054   
00055   struct tm getDueDate() const { return fTodoInfo.due; }
00056   void setDueDate(struct tm& d) { fTodoInfo.due = d; }
00057   const struct tm *getDueDate_p() const { return &fTodoInfo.due; } 
00058   
00059   int getIndefinite() const { return fTodoInfo.indefinite; }
00060   void setIndefinite(int i) { fTodoInfo.indefinite = i; }
00061 
00062   int getPriority() const { return fTodoInfo.priority; }
00063   void setPriority(int p) { fTodoInfo.priority = p; }
00064 
00065   int getComplete() const { return fTodoInfo.complete; }
00066   void setComplete(int c) { fTodoInfo.complete = c; }
00067 
00068   void  setDescription(const QString &);
00069   QString getDescription() const; // { return fTodoInfo.description; }
00070 
00071   void  setNote(const QString &note);
00072   QString getNote() const; // { return fTodoInfo.note; }
00073   
00074         QString getCategoryLabel() const;
00075                 // { return fAppInfo.category.name[getCat()]; }
00080         bool setCategory(const QString &label);
00081 
00082         static const int APP_BUFFER_SIZE;
00083 
00084 protected:
00085         void *pack(void *, int *);
00086         void unpack(const void *, int = 0) { } ;
00087         
00088         const char *getDescriptionP() const { return fTodoInfo.description; } ;
00089         void setDescriptionP(const char *, int len=-1) ;
00090         const char *getNoteP() const { return fTodoInfo.note; } ;
00091         void setNoteP(const char *, int len=-1) ;
00092   
00093 private:
00094   struct ToDo fTodoInfo;
00095         struct ToDoAppInfo &fAppInfo;
00096 };
00097 
00098 
00099 
00100 #else
00101 #ifdef DEBUG
00102 #warning "File doubly included"
00103 #endif
00104 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:40:44 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001