-rw-r--r-- | libopie/pim/opimrecord.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libopie/pim/opimrecord.h b/libopie/pim/opimrecord.h index 494c78e..563b19c 100644 --- a/libopie/pim/opimrecord.h +++ b/libopie/pim/opimrecord.h | |||
@@ -1,33 +1,38 @@ | |||
1 | #ifndef OPIE_PIM_RECORD_H | 1 | #ifndef OPIE_PIM_RECORD_H |
2 | #define OPIE_PIM_RECORD_H | 2 | #define OPIE_PIM_RECORD_H |
3 | 3 | ||
4 | #include <qdatastream.h> | 4 | #include <qdatastream.h> |
5 | #include <qmap.h> | 5 | #include <qmap.h> |
6 | #include <qstring.h> | 6 | #include <qstring.h> |
7 | #include <qstringlist.h> | 7 | #include <qstringlist.h> |
8 | 8 | ||
9 | /* | ||
10 | * we need to get customMap which is private... | ||
11 | */ | ||
12 | #define private protected | ||
9 | #include <qpe/palmtoprecord.h> | 13 | #include <qpe/palmtoprecord.h> |
14 | #undef private | ||
10 | 15 | ||
11 | #include <opie/opimxrefmanager.h> | 16 | #include <opie/opimxrefmanager.h> |
12 | 17 | ||
13 | /** | 18 | /** |
14 | * This is the base class for | 19 | * This is the base class for |
15 | * all PIM Records | 20 | * all PIM Records |
16 | * | 21 | * |
17 | */ | 22 | */ |
18 | class OPimRecord : public Qtopia::Record { | 23 | class OPimRecord : public Qtopia::Record { |
19 | public: | 24 | public: |
20 | /** | 25 | /** |
21 | * c'tor | 26 | * c'tor |
22 | * uid of 0 isEmpty | 27 | * uid of 0 isEmpty |
23 | * uid of 1 will be assigned a new one | 28 | * uid of 1 will be assigned a new one |
24 | */ | 29 | */ |
25 | OPimRecord(int uid = 0); | 30 | OPimRecord(int uid = 0); |
26 | ~OPimRecord(); | 31 | ~OPimRecord(); |
27 | 32 | ||
28 | /** | 33 | /** |
29 | * copy c'tor | 34 | * copy c'tor |
30 | */ | 35 | */ |
31 | OPimRecord( const OPimRecord& rec ); | 36 | OPimRecord( const OPimRecord& rec ); |
32 | 37 | ||
33 | /** | 38 | /** |
@@ -73,49 +78,50 @@ public: | |||
73 | virtual QString type()const = 0; | 78 | virtual QString type()const = 0; |
74 | 79 | ||
75 | /** | 80 | /** |
76 | * matches the Records the regular expression? | 81 | * matches the Records the regular expression? |
77 | */ | 82 | */ |
78 | virtual bool match( const QString ®exp ) const | 83 | virtual bool match( const QString ®exp ) const |
79 | {setLastHitField( -1 ); | 84 | {setLastHitField( -1 ); |
80 | return Qtopia::Record::match(QRegExp(regexp));}; | 85 | return Qtopia::Record::match(QRegExp(regexp));}; |
81 | 86 | ||
82 | /** | 87 | /** |
83 | * if implemented this function returns which item has been | 88 | * if implemented this function returns which item has been |
84 | * last hit by the match() function. | 89 | * last hit by the match() function. |
85 | * or -1 if not implemented or no hit has occured | 90 | * or -1 if not implemented or no hit has occured |
86 | */ | 91 | */ |
87 | int lastHitField()const; | 92 | int lastHitField()const; |
88 | 93 | ||
89 | /** | 94 | /** |
90 | * converts the internal structure to a map | 95 | * converts the internal structure to a map |
91 | */ | 96 | */ |
92 | virtual QMap<int, QString> toMap()const = 0; | 97 | virtual QMap<int, QString> toMap()const = 0; |
93 | 98 | ||
94 | /** | 99 | /** |
95 | * key value representation of extra items | 100 | * key value representation of extra items |
96 | */ | 101 | */ |
97 | virtual QMap<QString, QString> toExtraMap()const = 0; | 102 | QMap<QString, QString> toExtraMap()const; |
103 | void setExtraMap( const QMap<QString, QString>& ); | ||
98 | 104 | ||
99 | /** | 105 | /** |
100 | * the name for a recordField | 106 | * the name for a recordField |
101 | */ | 107 | */ |
102 | virtual QString recordField(int)const = 0; | 108 | virtual QString recordField(int)const = 0; |
103 | 109 | ||
104 | /** | 110 | /** |
105 | * returns a reference of the | 111 | * returns a reference of the |
106 | * Cross Reference Manager | 112 | * Cross Reference Manager |
107 | * Partner 'One' is THIS PIM RECORD! | 113 | * Partner 'One' is THIS PIM RECORD! |
108 | * 'Two' is the Partner where we link to | 114 | * 'Two' is the Partner where we link to |
109 | */ | 115 | */ |
110 | OPimXRefManager& xrefmanager(); | 116 | OPimXRefManager& xrefmanager(); |
111 | 117 | ||
112 | /** | 118 | /** |
113 | * set the uid | 119 | * set the uid |
114 | */ | 120 | */ |
115 | virtual void setUid( int uid ); | 121 | virtual void setUid( int uid ); |
116 | 122 | ||
117 | /* | 123 | /* |
118 | * used inside the Templates for casting | 124 | * used inside the Templates for casting |
119 | * REIMPLEMENT in your .... | 125 | * REIMPLEMENT in your .... |
120 | */ | 126 | */ |
121 | static int rtti(); | 127 | static int rtti(); |