Diffstat (limited to 'libopie2/opiepim/core/opimrecord.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimrecord.cpp | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/libopie2/opiepim/core/opimrecord.cpp b/libopie2/opiepim/core/opimrecord.cpp index 2365748..72bb372 100644 --- a/libopie2/opiepim/core/opimrecord.cpp +++ b/libopie2/opiepim/core/opimrecord.cpp | |||
@@ -1,31 +1,60 @@ | |||
1 | /* | ||
2 | This file is part of the Opie Project | ||
3 | Copyright (C) The Main Author <main-author@whereever.org> | ||
4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> | ||
5 | .=l. | ||
6 | .>+-= | ||
7 | _;:, .> :=|. This program is free software; you can | ||
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This program is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
19 | ..}^=.= = ; Library General Public License for more | ||
20 | ++= -. .` .: details. | ||
21 | : = ...= . :.=- | ||
22 | -. .:....=;==+<; You should have received a copy of the GNU | ||
23 | -_. . . )=. = Library General Public License along with | ||
24 | -- :-=` this library; see the file COPYING.LIB. | ||
25 | If not, write to the Free Software Foundation, | ||
26 | Inc., 59 Temple Place - Suite 330, | ||
27 | Boston, MA 02111-1307, USA. | ||
28 | */ | ||
1 | #include <qarray.h> | 29 | #include <qarray.h> |
2 | 30 | ||
3 | #include <qpe/categories.h> | 31 | #include <qpe/categories.h> |
4 | #include <qpe/categoryselect.h> | 32 | #include <qpe/categoryselect.h> |
5 | 33 | ||
6 | #include "opimrecord.h" | 34 | #include <opie2/opimrecord.h> |
7 | 35 | ||
36 | namespace Opie { | ||
8 | Qtopia::UidGen OPimRecord::m_uidGen( Qtopia::UidGen::Qtopia ); | 37 | Qtopia::UidGen OPimRecord::m_uidGen( Qtopia::UidGen::Qtopia ); |
9 | 38 | ||
10 | 39 | ||
11 | OPimRecord::OPimRecord( int uid ) | 40 | OPimRecord::OPimRecord( int uid ) |
12 | : Qtopia::Record() { | 41 | : Qtopia::Record() { |
13 | 42 | ||
14 | m_lastHit = -1; | 43 | m_lastHit = -1; |
15 | setUid( uid ); | 44 | setUid( uid ); |
16 | } | 45 | } |
17 | OPimRecord::~OPimRecord() { | 46 | OPimRecord::~OPimRecord() { |
18 | } | 47 | } |
19 | OPimRecord::OPimRecord( const OPimRecord& rec ) | 48 | OPimRecord::OPimRecord( const OPimRecord& rec ) |
20 | : Qtopia::Record( rec ) | 49 | : Qtopia::Record( rec ) |
21 | { | 50 | { |
22 | (*this) = rec; | 51 | (*this) = rec; |
23 | } | 52 | } |
24 | 53 | ||
25 | OPimRecord &OPimRecord::operator=( const OPimRecord& rec) { | 54 | OPimRecord &OPimRecord::operator=( const OPimRecord& rec) { |
26 | if ( this == &rec ) return *this; | 55 | if ( this == &rec ) return *this; |
27 | 56 | ||
28 | Qtopia::Record::operator=( rec ); | 57 | Qtopia::Record::operator=( rec ); |
29 | m_xrefman = rec.m_xrefman; | 58 | m_xrefman = rec.m_xrefman; |
30 | m_lastHit = rec.m_lastHit; | 59 | m_lastHit = rec.m_lastHit; |
31 | 60 | ||
@@ -159,24 +188,26 @@ OPimXRefPartner OPimRecord::partner( QDataStream& stream ) { | |||
159 | 188 | ||
160 | stream >> str; | 189 | stream >> str; |
161 | par.setService( str ); | 190 | par.setService( str ); |
162 | 191 | ||
163 | stream >> i; | 192 | stream >> i; |
164 | par.setUid( i ); | 193 | par.setUid( i ); |
165 | 194 | ||
166 | stream >> i ; | 195 | stream >> i ; |
167 | par.setField( i ); | 196 | par.setField( i ); |
168 | 197 | ||
169 | return par; | 198 | return par; |
170 | } | 199 | } |
171 | void OPimRecord::setLastHitField( int lastHit )const { | 200 | void OPimRecord::setLastHitField( int lastHit )const { |
172 | m_lastHit = lastHit; | 201 | m_lastHit = lastHit; |
173 | } | 202 | } |
174 | int OPimRecord::lastHitField()const{ | 203 | int OPimRecord::lastHitField()const{ |
175 | return m_lastHit; | 204 | return m_lastHit; |
176 | } | 205 | } |
177 | QMap<QString, QString> OPimRecord::toExtraMap()const { | 206 | QMap<QString, QString> OPimRecord::toExtraMap()const { |
178 | return customMap; | 207 | return customMap; |
179 | } | 208 | } |
180 | void OPimRecord::setExtraMap( const QMap<QString, QString>& map) { | 209 | void OPimRecord::setExtraMap( const QMap<QString, QString>& map) { |
181 | customMap = map; | 210 | customMap = map; |
182 | } | 211 | } |
212 | |||
213 | } | ||