kpilot/lib
pilotTodoEntry.h00001 #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
00032
00033 #include <time.h>
00034
00035 #include <pi-macros.h>
00036 #include <pi-todo.h>
00037
00038 #include <qstring.h>
00039
00040 #include "pilotRecord.h"
00041 #include "pilotAppInfo.h"
00042
00048 class KDE_EXPORT PilotTodoEntry : public PilotRecordBase
00049 {
00050 public:
00052 PilotTodoEntry(struct ToDoAppInfo &appInfo);
00053
00055 PilotTodoEntry(struct ToDoAppInfo &appInfo, PilotRecord * rec);
00056
00058 PilotTodoEntry(const PilotTodoEntry &e);
00059
00061 ~PilotTodoEntry() { free_ToDo(&fTodoInfo); }
00062
00066 QString getTextRepresentation(bool richText=false);
00067
00069 PilotTodoEntry& operator=(const PilotTodoEntry &e);
00070
00072 struct tm getDueDate() const { return fTodoInfo.due; }
00073
00075 void setDueDate(struct tm& d) { fTodoInfo.due = d; }
00076
00081 int getIndefinite() const { return fTodoInfo.indefinite; }
00082
00084 void setIndefinite(int i) { fTodoInfo.indefinite = i; }
00085
00090 int getPriority() const { return fTodoInfo.priority; }
00091
00093 void setPriority(int p) { fTodoInfo.priority = p; }
00094
00096 int getComplete() const { return fTodoInfo.complete; }
00097
00099 void setComplete(int c) { fTodoInfo.complete = c; }
00100
00104 QString getDescription() const;
00106 void setDescription(const QString &);
00107
00111 QString getNote() const;
00112
00114 void setNote(const QString ¬e);
00115
00117 QString getCategoryLabel() const;
00118
00119
00123 inline bool setCategory(const QString &label) { return Pilot::insertCategory(&fAppInfo.category,label,false) >= 0; };
00124
00125 PilotRecord *pack() const;
00126
00127 protected:
00128 const char *getDescriptionP() const { return fTodoInfo.description; } ;
00129 void setDescriptionP(const char *, int len=-1) ;
00130 const char *getNoteP() const { return fTodoInfo.note; } ;
00131 void setNoteP(const char *, int len=-1) ;
00132
00133 private:
00134 struct ToDo fTodoInfo;
00135 struct ToDoAppInfo &fAppInfo;
00136 };
00137
00138 typedef PilotAppInfo<ToDoAppInfo,unpack_ToDoAppInfo, pack_ToDoAppInfo> PilotToDoInfo;
00139
00140
00141 #endif
00142
|