summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/ocontactfields.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/ocontactfields.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/ocontactfields.cpp35
1 files changed, 33 insertions, 2 deletions
diff --git a/libopie2/opiepim/ocontactfields.cpp b/libopie2/opiepim/ocontactfields.cpp
index 0f08a5a..deaa1e5 100644
--- a/libopie2/opiepim/ocontactfields.cpp
+++ b/libopie2/opiepim/ocontactfields.cpp
@@ -1,23 +1,52 @@
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 29
2#include "ocontactfields.h" 30#include <opie2/ocontactfields.h>
3 31
4#include <qstringlist.h> 32#include <qstringlist.h>
5#include <qobject.h> 33#include <qobject.h>
6 34
7// We should use our own enum in the future .. 35// We should use our own enum in the future ..
8#include <qpe/recordfields.h> 36#include <qpe/recordfields.h>
9#include <qpe/config.h> 37#include <qpe/config.h>
10#include <opie/ocontact.h> 38#include <opie2/ocontact.h>
11 39
40namespace Opie {
12/*! 41/*!
13 \internal 42 \internal
14 Returns a list of personal field names for a contact. 43 Returns a list of personal field names for a contact.
15*/ 44*/
16QStringList OContactFields::personalfields( bool sorted, bool translated ) 45QStringList OContactFields::personalfields( bool sorted, bool translated )
17{ 46{
18 QStringList list; 47 QStringList list;
19 QMap<int, QString> mapIdToStr; 48 QMap<int, QString> mapIdToStr;
20 if ( translated ) 49 if ( translated )
21 mapIdToStr = idToTrFields(); 50 mapIdToStr = idToTrFields();
22 else 51 else
23 mapIdToStr = idToUntrFields(); 52 mapIdToStr = idToUntrFields();
@@ -466,12 +495,14 @@ int OContactFields::getFieldOrder( int num, int defIndex ){
466 else 495 else
467 ok = false; 496 ok = false;
468 497
469 // Return default value if index for 498 // Return default value if index for
470 // num was not set or if anything else happened.. 499 // num was not set or if anything else happened..
471 if ( !ok ) ret = defIndex; 500 if ( !ok ) ret = defIndex;
472 501
473 qDebug("returning >%i<",ret); 502 qDebug("returning >%i<",ret);
474 503
475 return ret; 504 return ret;
476 505
477} 506}
507
508}