author | zautrix <zautrix> | 2005-04-07 07:42:53 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-07 07:42:53 (UTC) |
commit | c82f9b40f6023dc7b39ac555cba8c4c313f15ca8 (patch) (unidiff) | |
tree | e9e4f0c0ed3243ec060a475983b271bd27b40d15 /kabc/phonenumber.cpp | |
parent | 76e220bf1236ae6afa9d91f18f0cd9ced730cff0 (diff) | |
download | kdepimpi-c82f9b40f6023dc7b39ac555cba8c4c313f15ca8.zip kdepimpi-c82f9b40f6023dc7b39ac555cba8c4c313f15ca8.tar.gz kdepimpi-c82f9b40f6023dc7b39ac555cba8c4c313f15ca8.tar.bz2 |
added fields to kapi
-rw-r--r-- | kabc/phonenumber.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/kabc/phonenumber.cpp b/kabc/phonenumber.cpp index 041effc..4c6231d 100644 --- a/kabc/phonenumber.cpp +++ b/kabc/phonenumber.cpp | |||
@@ -156,58 +156,57 @@ QString PhoneNumber::typeLabel() const | |||
156 | QString PhoneNumber::label() const | 156 | QString PhoneNumber::label() const |
157 | { | 157 | { |
158 | return typeLabel( type() ); | 158 | return typeLabel( type() ); |
159 | } | 159 | } |
160 | 160 | ||
161 | PhoneNumber::TypeList PhoneNumber::typeList() | 161 | PhoneNumber::TypeList PhoneNumber::typeList() |
162 | { | 162 | { |
163 | TypeList list; | 163 | TypeList list; |
164 | 164 | ||
165 | list << Home << Work << Msg << Pref << Voice << Fax << Cell << Video | 165 | list << Home << Work << Msg << Pref << Voice << Fax << Cell << Video |
166 | << Bbs << Modem << Car << Isdn << Pcs << Pager << Sip; | 166 | << Bbs << Modem << Car << Isdn << Pcs << Pager << Sip; |
167 | 167 | ||
168 | return list; | 168 | return list; |
169 | } | 169 | } |
170 | 170 | ||
171 | QString PhoneNumber::label( int type ) | 171 | QString PhoneNumber::label( int type ) |
172 | { | 172 | { |
173 | return typeLabel( type ); | 173 | return typeLabel( type ); |
174 | } | 174 | } |
175 | 175 | ||
176 | QString PhoneNumber::typeLabel( int type ) | 176 | QString PhoneNumber::typeLabel( int type ) |
177 | { | 177 | { |
178 | QString typeString; | 178 | QString typeString; |
179 | 179 | ||
180 | |||
181 | if ((type & Cell) == Cell) | ||
182 | typeString += i18n("Mobile") +" "; | ||
180 | if ((type & Home) == Home) | 183 | if ((type & Home) == Home) |
181 | typeString += i18n("Home"); | 184 | typeString += i18n("Home")+" "; |
182 | else if ((type & Work) == Work) | 185 | else if ((type & Work) == Work) |
183 | typeString += i18n("Work"); | 186 | typeString += i18n("Work")+" "; |
184 | 187 | ||
185 | if (!typeString.isEmpty()) | 188 | if ((type & Sip) == Sip) |
186 | typeString += " "; | ||
187 | if ((type & Cell) == Cell) | ||
188 | typeString += i18n("Mobile") +" "; | ||
189 | if ((type & Sip) == Sip) | ||
190 | typeString += i18n("SIP")+" "; | 189 | typeString += i18n("SIP")+" "; |
191 | if ((type & Car) == Car) | 190 | if ((type & Car) == Car) |
192 | typeString += i18n("Car")+" "; | 191 | typeString += i18n("Car")+" "; |
193 | 192 | ||
194 | if ((type & Fax) == Fax) | 193 | if ((type & Fax) == Fax) |
195 | typeString += i18n("Fax"); | 194 | typeString += i18n("Fax"); |
196 | else if ((type & Msg) == Msg) | 195 | else if ((type & Msg) == Msg) |
197 | typeString += i18n("Messenger"); | 196 | typeString += i18n("Messenger"); |
198 | else if ((type & Video) == Video) | 197 | else if ((type & Video) == Video) |
199 | typeString += i18n("Video"); | 198 | typeString += i18n("Video"); |
200 | else if ((type & Bbs) == Bbs) | 199 | else if ((type & Bbs) == Bbs) |
201 | typeString += i18n("Mailbox"); | 200 | typeString += i18n("Mailbox"); |
202 | else if ((type & Modem) == Modem) | 201 | else if ((type & Modem) == Modem) |
203 | typeString += i18n("Modem"); | 202 | typeString += i18n("Modem"); |
204 | else if ((type & Isdn) == Isdn) | 203 | else if ((type & Isdn) == Isdn) |
205 | typeString += i18n("ISDN"); | 204 | typeString += i18n("ISDN"); |
206 | else if ((type & Pcs) == Pcs) | 205 | else if ((type & Pcs) == Pcs) |
207 | typeString += i18n("PCS"); | 206 | typeString += i18n("PCS"); |
208 | else if ((type & Pager) == Pager) | 207 | else if ((type & Pager) == Pager) |
209 | typeString += i18n("Pager"); | 208 | typeString += i18n("Pager"); |
210 | // add the prefered flag | 209 | // add the prefered flag |
211 | /* | 210 | /* |
212 | if ((type & Pref) == Pref) | 211 | if ((type & Pref) == Pref) |
213 | typeString += i18n("(p)"); | 212 | typeString += i18n("(p)"); |