-rw-r--r-- | libopie/pim/opimrecord.h | 4 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimrecord.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libopie/pim/opimrecord.h b/libopie/pim/opimrecord.h index de2d9f4..6e7c0da 100644 --- a/libopie/pim/opimrecord.h +++ b/libopie/pim/opimrecord.h | |||
@@ -1,140 +1,140 @@ | |||
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 | #include <qpe/palmtoprecord.h> | 9 | #include <qpe/palmtoprecord.h> |
10 | 10 | ||
11 | #include <opie/opimxrefmanager.h> | 11 | #include <opie/opimxrefmanager.h> |
12 | 12 | ||
13 | /** | 13 | /** |
14 | * This is the base class for | 14 | * This is the base class for |
15 | * all PIM Records | 15 | * all PIM Records |
16 | * | 16 | * |
17 | */ | 17 | */ |
18 | class OPimRecord : public Qtopia::Record { | 18 | class OPimRecord : public Qtopia::Record { |
19 | public: | 19 | public: |
20 | /** | 20 | /** |
21 | * c'tor | 21 | * c'tor |
22 | * uid of 0 isEmpty | 22 | * uid of 0 isEmpty |
23 | * uid of 1 will be assigned a new one | 23 | * uid of 1 will be assigned a new one |
24 | */ | 24 | */ |
25 | OPimRecord(int uid = 0); | 25 | OPimRecord(int uid = 0); |
26 | ~OPimRecord(); | 26 | ~OPimRecord(); |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * copy c'tor | 29 | * copy c'tor |
30 | */ | 30 | */ |
31 | OPimRecord( const OPimRecord& rec ); | 31 | OPimRecord( const OPimRecord& rec ); |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * copy operator | 34 | * copy operator |
35 | */ | 35 | */ |
36 | OPimRecord &operator=( const OPimRecord& ); | 36 | OPimRecord &operator=( const OPimRecord& ); |
37 | 37 | ||
38 | /** | 38 | /** |
39 | * category names resolved | 39 | * category names resolved |
40 | */ | 40 | */ |
41 | QStringList categoryNames( const QString& appname )const; | 41 | QStringList categoryNames( const QString& appname )const; |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * set category names they will be resolved | 44 | * set category names they will be resolved |
45 | */ | 45 | */ |
46 | void setCategoryNames( const QStringList& ); | 46 | void setCategoryNames( const QStringList& ); |
47 | 47 | ||
48 | /** | 48 | /** |
49 | * addCategoryName adds a name | 49 | * addCategoryName adds a name |
50 | * to the internal category list | 50 | * to the internal category list |
51 | */ | 51 | */ |
52 | void addCategoryName( const QString& ); | 52 | void addCategoryName( const QString& ); |
53 | 53 | ||
54 | /** | 54 | /** |
55 | * if a Record isEmpty | 55 | * if a Record isEmpty |
56 | * it's empty if it's 0 | 56 | * it's empty if it's 0 |
57 | */ | 57 | */ |
58 | virtual bool isEmpty()const; | 58 | virtual bool isEmpty()const; |
59 | 59 | ||
60 | /** | 60 | /** |
61 | * toRichText summary | 61 | * toRichText summary |
62 | */ | 62 | */ |
63 | virtual QString toRichText()const = 0; | 63 | virtual QString toRichText()const = 0; |
64 | 64 | ||
65 | /** | 65 | /** |
66 | * a small one line summary | 66 | * a small one line summary |
67 | */ | 67 | */ |
68 | virtual QString toShortText()const = 0; | 68 | virtual QString toShortText()const = 0; |
69 | 69 | ||
70 | /** | 70 | /** |
71 | * the name of the Record | 71 | * the name of the Record |
72 | */ | 72 | */ |
73 | virtual QString type()const = 0; | 73 | virtual QString type()const = 0; |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * matches the Records the regular expression? | 76 | * matches the Records the regular expression? |
77 | */ | 77 | */ |
78 | virtual bool match( const QString ®exp ) const {return match(QRegExp(regexp));}; | 78 | virtual bool match( const QString ®exp ) const |
79 | virtual bool match( const QRegExp ®exp ) const = 0; | 79 | {return Qtopia::Record::match(QRegExp(regexp));}; |
80 | 80 | ||
81 | /** | 81 | /** |
82 | * converts the internal structure to a map | 82 | * converts the internal structure to a map |
83 | */ | 83 | */ |
84 | virtual QMap<int, QString> toMap()const = 0; | 84 | virtual QMap<int, QString> toMap()const = 0; |
85 | 85 | ||
86 | /** | 86 | /** |
87 | * key value representation of extra items | 87 | * key value representation of extra items |
88 | */ | 88 | */ |
89 | virtual QMap<QString, QString> toExtraMap()const = 0; | 89 | virtual QMap<QString, QString> toExtraMap()const = 0; |
90 | 90 | ||
91 | /** | 91 | /** |
92 | * the name for a recordField | 92 | * the name for a recordField |
93 | */ | 93 | */ |
94 | virtual QString recordField(int)const = 0; | 94 | virtual QString recordField(int)const = 0; |
95 | 95 | ||
96 | /** | 96 | /** |
97 | * returns a reference of the | 97 | * returns a reference of the |
98 | * Cross Reference Manager | 98 | * Cross Reference Manager |
99 | * Partner 'One' is THIS PIM RECORD! | 99 | * Partner 'One' is THIS PIM RECORD! |
100 | * 'Two' is the Partner where we link to | 100 | * 'Two' is the Partner where we link to |
101 | */ | 101 | */ |
102 | OPimXRefManager& xrefmanager(); | 102 | OPimXRefManager& xrefmanager(); |
103 | 103 | ||
104 | /** | 104 | /** |
105 | * set the uid | 105 | * set the uid |
106 | */ | 106 | */ |
107 | virtual void setUid( int uid ); | 107 | virtual void setUid( int uid ); |
108 | 108 | ||
109 | /* | 109 | /* |
110 | * used inside the Templates for casting | 110 | * used inside the Templates for casting |
111 | * REIMPLEMENT in your .... | 111 | * REIMPLEMENT in your .... |
112 | */ | 112 | */ |
113 | static int rtti(); | 113 | static int rtti(); |
114 | 114 | ||
115 | /** | 115 | /** |
116 | * some marshalling and de marshalling code | 116 | * some marshalling and de marshalling code |
117 | * saves the OPimRecord | 117 | * saves the OPimRecord |
118 | * to and from a DataStream | 118 | * to and from a DataStream |
119 | */ | 119 | */ |
120 | virtual bool loadFromStream(QDataStream& ); | 120 | virtual bool loadFromStream(QDataStream& ); |
121 | virtual bool saveToStream( QDataStream& stream )const; | 121 | virtual bool saveToStream( QDataStream& stream )const; |
122 | 122 | ||
123 | protected: | 123 | protected: |
124 | Qtopia::UidGen &uidGen(); | 124 | Qtopia::UidGen &uidGen(); |
125 | // QString crossToString()const; | 125 | // QString crossToString()const; |
126 | 126 | ||
127 | private: | 127 | private: |
128 | class OPimRecordPrivate; | 128 | class OPimRecordPrivate; |
129 | OPimRecordPrivate *d; | 129 | OPimRecordPrivate *d; |
130 | OPimXRefManager m_xrefman; | 130 | OPimXRefManager m_xrefman; |
131 | static Qtopia::UidGen m_uidGen; | 131 | static Qtopia::UidGen m_uidGen; |
132 | 132 | ||
133 | private: | 133 | private: |
134 | void flush( const OPimXRefPartner&, QDataStream& stream )const; | 134 | void flush( const OPimXRefPartner&, QDataStream& stream )const; |
135 | OPimXRefPartner partner( QDataStream& ); | 135 | OPimXRefPartner partner( QDataStream& ); |
136 | }; | 136 | }; |
137 | 137 | ||
138 | 138 | ||
139 | 139 | ||
140 | #endif | 140 | #endif |
diff --git a/libopie2/opiepim/core/opimrecord.h b/libopie2/opiepim/core/opimrecord.h index de2d9f4..6e7c0da 100644 --- a/libopie2/opiepim/core/opimrecord.h +++ b/libopie2/opiepim/core/opimrecord.h | |||
@@ -1,140 +1,140 @@ | |||
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 | #include <qpe/palmtoprecord.h> | 9 | #include <qpe/palmtoprecord.h> |
10 | 10 | ||
11 | #include <opie/opimxrefmanager.h> | 11 | #include <opie/opimxrefmanager.h> |
12 | 12 | ||
13 | /** | 13 | /** |
14 | * This is the base class for | 14 | * This is the base class for |
15 | * all PIM Records | 15 | * all PIM Records |
16 | * | 16 | * |
17 | */ | 17 | */ |
18 | class OPimRecord : public Qtopia::Record { | 18 | class OPimRecord : public Qtopia::Record { |
19 | public: | 19 | public: |
20 | /** | 20 | /** |
21 | * c'tor | 21 | * c'tor |
22 | * uid of 0 isEmpty | 22 | * uid of 0 isEmpty |
23 | * uid of 1 will be assigned a new one | 23 | * uid of 1 will be assigned a new one |
24 | */ | 24 | */ |
25 | OPimRecord(int uid = 0); | 25 | OPimRecord(int uid = 0); |
26 | ~OPimRecord(); | 26 | ~OPimRecord(); |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * copy c'tor | 29 | * copy c'tor |
30 | */ | 30 | */ |
31 | OPimRecord( const OPimRecord& rec ); | 31 | OPimRecord( const OPimRecord& rec ); |
32 | 32 | ||
33 | /** | 33 | /** |
34 | * copy operator | 34 | * copy operator |
35 | */ | 35 | */ |
36 | OPimRecord &operator=( const OPimRecord& ); | 36 | OPimRecord &operator=( const OPimRecord& ); |
37 | 37 | ||
38 | /** | 38 | /** |
39 | * category names resolved | 39 | * category names resolved |
40 | */ | 40 | */ |
41 | QStringList categoryNames( const QString& appname )const; | 41 | QStringList categoryNames( const QString& appname )const; |
42 | 42 | ||
43 | /** | 43 | /** |
44 | * set category names they will be resolved | 44 | * set category names they will be resolved |
45 | */ | 45 | */ |
46 | void setCategoryNames( const QStringList& ); | 46 | void setCategoryNames( const QStringList& ); |
47 | 47 | ||
48 | /** | 48 | /** |
49 | * addCategoryName adds a name | 49 | * addCategoryName adds a name |
50 | * to the internal category list | 50 | * to the internal category list |
51 | */ | 51 | */ |
52 | void addCategoryName( const QString& ); | 52 | void addCategoryName( const QString& ); |
53 | 53 | ||
54 | /** | 54 | /** |
55 | * if a Record isEmpty | 55 | * if a Record isEmpty |
56 | * it's empty if it's 0 | 56 | * it's empty if it's 0 |
57 | */ | 57 | */ |
58 | virtual bool isEmpty()const; | 58 | virtual bool isEmpty()const; |
59 | 59 | ||
60 | /** | 60 | /** |
61 | * toRichText summary | 61 | * toRichText summary |
62 | */ | 62 | */ |
63 | virtual QString toRichText()const = 0; | 63 | virtual QString toRichText()const = 0; |
64 | 64 | ||
65 | /** | 65 | /** |
66 | * a small one line summary | 66 | * a small one line summary |
67 | */ | 67 | */ |
68 | virtual QString toShortText()const = 0; | 68 | virtual QString toShortText()const = 0; |
69 | 69 | ||
70 | /** | 70 | /** |
71 | * the name of the Record | 71 | * the name of the Record |
72 | */ | 72 | */ |
73 | virtual QString type()const = 0; | 73 | virtual QString type()const = 0; |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * matches the Records the regular expression? | 76 | * matches the Records the regular expression? |
77 | */ | 77 | */ |
78 | virtual bool match( const QString ®exp ) const {return match(QRegExp(regexp));}; | 78 | virtual bool match( const QString ®exp ) const |
79 | virtual bool match( const QRegExp ®exp ) const = 0; | 79 | {return Qtopia::Record::match(QRegExp(regexp));}; |
80 | 80 | ||
81 | /** | 81 | /** |
82 | * converts the internal structure to a map | 82 | * converts the internal structure to a map |
83 | */ | 83 | */ |
84 | virtual QMap<int, QString> toMap()const = 0; | 84 | virtual QMap<int, QString> toMap()const = 0; |
85 | 85 | ||
86 | /** | 86 | /** |
87 | * key value representation of extra items | 87 | * key value representation of extra items |
88 | */ | 88 | */ |
89 | virtual QMap<QString, QString> toExtraMap()const = 0; | 89 | virtual QMap<QString, QString> toExtraMap()const = 0; |
90 | 90 | ||
91 | /** | 91 | /** |
92 | * the name for a recordField | 92 | * the name for a recordField |
93 | */ | 93 | */ |
94 | virtual QString recordField(int)const = 0; | 94 | virtual QString recordField(int)const = 0; |
95 | 95 | ||
96 | /** | 96 | /** |
97 | * returns a reference of the | 97 | * returns a reference of the |
98 | * Cross Reference Manager | 98 | * Cross Reference Manager |
99 | * Partner 'One' is THIS PIM RECORD! | 99 | * Partner 'One' is THIS PIM RECORD! |
100 | * 'Two' is the Partner where we link to | 100 | * 'Two' is the Partner where we link to |
101 | */ | 101 | */ |
102 | OPimXRefManager& xrefmanager(); | 102 | OPimXRefManager& xrefmanager(); |
103 | 103 | ||
104 | /** | 104 | /** |
105 | * set the uid | 105 | * set the uid |
106 | */ | 106 | */ |
107 | virtual void setUid( int uid ); | 107 | virtual void setUid( int uid ); |
108 | 108 | ||
109 | /* | 109 | /* |
110 | * used inside the Templates for casting | 110 | * used inside the Templates for casting |
111 | * REIMPLEMENT in your .... | 111 | * REIMPLEMENT in your .... |
112 | */ | 112 | */ |
113 | static int rtti(); | 113 | static int rtti(); |
114 | 114 | ||
115 | /** | 115 | /** |
116 | * some marshalling and de marshalling code | 116 | * some marshalling and de marshalling code |
117 | * saves the OPimRecord | 117 | * saves the OPimRecord |
118 | * to and from a DataStream | 118 | * to and from a DataStream |
119 | */ | 119 | */ |
120 | virtual bool loadFromStream(QDataStream& ); | 120 | virtual bool loadFromStream(QDataStream& ); |
121 | virtual bool saveToStream( QDataStream& stream )const; | 121 | virtual bool saveToStream( QDataStream& stream )const; |
122 | 122 | ||
123 | protected: | 123 | protected: |
124 | Qtopia::UidGen &uidGen(); | 124 | Qtopia::UidGen &uidGen(); |
125 | // QString crossToString()const; | 125 | // QString crossToString()const; |
126 | 126 | ||
127 | private: | 127 | private: |
128 | class OPimRecordPrivate; | 128 | class OPimRecordPrivate; |
129 | OPimRecordPrivate *d; | 129 | OPimRecordPrivate *d; |
130 | OPimXRefManager m_xrefman; | 130 | OPimXRefManager m_xrefman; |
131 | static Qtopia::UidGen m_uidGen; | 131 | static Qtopia::UidGen m_uidGen; |
132 | 132 | ||
133 | private: | 133 | private: |
134 | void flush( const OPimXRefPartner&, QDataStream& stream )const; | 134 | void flush( const OPimXRefPartner&, QDataStream& stream )const; |
135 | OPimXRefPartner partner( QDataStream& ); | 135 | OPimXRefPartner partner( QDataStream& ); |
136 | }; | 136 | }; |
137 | 137 | ||
138 | 138 | ||
139 | 139 | ||
140 | #endif | 140 | #endif |