pilotTodoEntry.h
00001 #ifndef _KPILOT_PILOTTODOENTRY_H
00002 #define _KPILOT_PILOTTODOENTRY_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
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;
00071
00072 void setNote(const QString ¬e);
00073 QString getNote() const;
00074
00075 QString getCategoryLabel() const;
00076
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
This file is part of the documentation for kpilot Library Version 3.2.2.