Diffstat (limited to 'libopie2/opiepim/core/opimrecord.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimrecord.h | 66 |
1 files changed, 36 insertions, 30 deletions
diff --git a/libopie2/opiepim/core/opimrecord.h b/libopie2/opiepim/core/opimrecord.h index 63a3a98..4981a41 100644 --- a/libopie2/opiepim/core/opimrecord.h +++ b/libopie2/opiepim/core/opimrecord.h | |||
@@ -28,10 +28,8 @@ | |||
28 | */ | 28 | */ |
29 | #ifndef OPIE_PIM_RECORD_H | ||
30 | #define OPIE_PIM_RECORD_H | ||
31 | 29 | ||
32 | #include <qdatastream.h> | 30 | #ifndef OPIMRECORD_H |
33 | #include <qmap.h> | 31 | #define OPIMRECORD_H |
34 | #include <qstring.h> | ||
35 | #include <qstringlist.h> | ||
36 | 32 | ||
33 | /* OPIE */ | ||
34 | #include <opie2/opimxrefmanager.h> | ||
37 | /* | 35 | /* |
@@ -43,5 +41,10 @@ | |||
43 | 41 | ||
44 | #include <opie2/opimxrefmanager.h> | 42 | /* QT */ |
43 | #include <qdatastream.h> | ||
44 | #include <qmap.h> | ||
45 | #include <qstring.h> | ||
46 | #include <qstringlist.h> | ||
45 | 47 | ||
46 | namespace Opie { | 48 | namespace Opie |
49 | { | ||
47 | /** | 50 | /** |
@@ -51,4 +54,5 @@ namespace Opie { | |||
51 | */ | 54 | */ |
52 | class OPimRecord : public Qtopia::Record { | 55 | class OPimRecord : public Qtopia::Record |
53 | public: | 56 | { |
57 | public: | ||
54 | /** | 58 | /** |
@@ -58,3 +62,3 @@ public: | |||
58 | */ | 62 | */ |
59 | OPimRecord(int uid = 0); | 63 | OPimRecord( int uid = 0 ); |
60 | ~OPimRecord(); | 64 | ~OPimRecord(); |
@@ -74,3 +78,3 @@ public: | |||
74 | */ | 78 | */ |
75 | QStringList categoryNames( const QString& appname )const; | 79 | QStringList categoryNames( const QString& appname ) const; |
76 | 80 | ||
@@ -91,3 +95,3 @@ public: | |||
91 | */ | 95 | */ |
92 | virtual bool isEmpty()const; | 96 | virtual bool isEmpty() const; |
93 | 97 | ||
@@ -96,3 +100,3 @@ public: | |||
96 | */ | 100 | */ |
97 | virtual QString toRichText()const = 0; | 101 | virtual QString toRichText() const = 0; |
98 | 102 | ||
@@ -101,3 +105,3 @@ public: | |||
101 | */ | 105 | */ |
102 | virtual QString toShortText()const = 0; | 106 | virtual QString toShortText() const = 0; |
103 | 107 | ||
@@ -106,3 +110,3 @@ public: | |||
106 | */ | 110 | */ |
107 | virtual QString type()const = 0; | 111 | virtual QString type() const = 0; |
108 | 112 | ||
@@ -112,4 +116,6 @@ public: | |||
112 | virtual bool match( const QString ®exp ) const | 116 | virtual bool match( const QString ®exp ) const |
113 | {setLastHitField( -1 ); | 117 | { |
114 | return Qtopia::Record::match(QRegExp(regexp));}; | 118 | setLastHitField( -1 ); |
119 | return Qtopia::Record::match( QRegExp( regexp ) ); | ||
120 | }; | ||
115 | 121 | ||
@@ -120,3 +126,3 @@ public: | |||
120 | */ | 126 | */ |
121 | int lastHitField()const; | 127 | int lastHitField() const; |
122 | 128 | ||
@@ -125,3 +131,3 @@ public: | |||
125 | */ | 131 | */ |
126 | virtual QMap<int, QString> toMap()const = 0; | 132 | virtual QMap<int, QString> toMap() const = 0; |
127 | // virtual fromMap( const <int, QString>& map ) = 0; // Should be added in the future (eilers) | 133 | // virtual fromMap( const <int, QString>& map ) = 0; // Should be added in the future (eilers) |
@@ -131,3 +137,3 @@ public: | |||
131 | */ | 137 | */ |
132 | QMap<QString, QString> toExtraMap()const; | 138 | QMap<QString, QString> toExtraMap() const; |
133 | void setExtraMap( const QMap<QString, QString>& ); | 139 | void setExtraMap( const QMap<QString, QString>& ); |
@@ -137,3 +143,3 @@ public: | |||
137 | */ | 143 | */ |
138 | virtual QString recordField(int)const = 0; | 144 | virtual QString recordField( int ) const = 0; |
139 | 145 | ||
@@ -163,13 +169,13 @@ public: | |||
163 | */ | 169 | */ |
164 | virtual bool loadFromStream(QDataStream& ); | 170 | virtual bool loadFromStream( QDataStream& ); |
165 | virtual bool saveToStream( QDataStream& stream )const; | 171 | virtual bool saveToStream( QDataStream& stream ) const; |
166 | 172 | ||
167 | protected: | 173 | protected: |
168 | // need to be const cause it is called from const methods | 174 | // need to be const cause it is called from const methods |
169 | mutable int m_lastHit; | 175 | mutable int m_lastHit; |
170 | void setLastHitField( int lastHit )const; | 176 | void setLastHitField( int lastHit ) const; |
171 | Qtopia::UidGen &uidGen(); | 177 | Qtopia::UidGen &uidGen(); |
172 | // QString crossToString()const; | 178 | // QString crossToString()const; |
173 | 179 | ||
174 | private: | 180 | private: |
175 | class OPimRecordPrivate; | 181 | class OPimRecordPrivate; |
@@ -179,4 +185,4 @@ private: | |||
179 | 185 | ||
180 | private: | 186 | private: |
181 | void flush( const OPimXRefPartner&, QDataStream& stream )const; | 187 | void flush( const OPimXRefPartner&, QDataStream& stream ) const; |
182 | OPimXRefPartner partner( QDataStream& ); | 188 | OPimXRefPartner partner( QDataStream& ); |