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
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;
00070
00071 void setNote(const QString ¬e);
00072 QString getNote() const;
00073
00074 QString getCategoryLabel() const;
00075
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
This file is part of the documentation for kdelibs Version 3.1.4.