kpilot/lib
pilotMemo.h00001 #ifndef _KPILOT_PILOTMEMO_H
00002 #define _KPILOT_PILOTMEMO_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 <qstring.h>
00032
00033 #include <pi-memo.h>
00034
00035 #include "pilotAppCategory.h"
00036 #include "pilotDatabase.h"
00037
00038
00039 class KDE_EXPORT PilotMemo : public PilotAppCategory
00040 {
00041 public:
00042 PilotMemo(void) : PilotAppCategory() { } ;
00043 PilotMemo(const QString &s) : PilotAppCategory() { setText(s); } ;
00044 PilotMemo(const PilotRecord* rec);
00045 PilotMemo(void *buf) : PilotAppCategory() { unpack(buf, 1); } ;
00046 PilotMemo(void *buf, int attr, recordid_t id, int category)
00047 : PilotAppCategory(attr, id, category) { unpack(buf, 1); } ;
00048 ~PilotMemo() { } ;
00049
00050 virtual QString getTextRepresentation(bool richText=false);
00051 QString text(void) const { return fText; } ;
00052 void setText(const QString &text) { fText = text; } ;
00053 QString getTitle(void) const ;
00054 PilotRecord* pack();
00055
00056 static const int MAX_MEMO_LEN=8192;
00057
00064 QString shortTitle() const;
00065
00070 QString sensibleTitle() const;
00071
00072 protected:
00073 void *pack_(void *, int *);
00074 void unpack(const void *, int = 0);
00075
00076 private:
00077 QString fText;
00078 };
00079
00080 typedef PilotAppInfo<MemoAppInfo,unpack_MemoAppInfo, pack_MemoAppInfo> PilotMemoInfo;
00081
00082 #endif
|