Diffstat (limited to 'libopie2/opiepim/ocontactfields.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/ocontactfields.h | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/libopie2/opiepim/ocontactfields.h b/libopie2/opiepim/ocontactfields.h index f105de7..993ce3b 100644 --- a/libopie2/opiepim/ocontactfields.h +++ b/libopie2/opiepim/ocontactfields.h | |||
@@ -1,36 +1,65 @@ | |||
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 | #ifndef OPIE_CONTACTS_FIELDS | 29 | #ifndef OPIE_CONTACTS_FIELDS |
2 | #define OPIE_CONTACTS_FIELDS | 30 | #define OPIE_CONTACTS_FIELDS |
3 | 31 | ||
4 | class QStringList; | 32 | class QStringList; |
5 | 33 | ||
6 | #include <qmap.h> | 34 | #include <qmap.h> |
7 | #include <qstring.h> | 35 | #include <qstring.h> |
8 | #include <opie/ocontact.h> | 36 | #include <opie2/ocontact.h> |
9 | 37 | ||
10 | #define CONTACT_FIELD_ORDER_NAME "opie-contactfield-order" | 38 | #define CONTACT_FIELD_ORDER_NAME "opie-contactfield-order" |
11 | #define DEFAULT_FIELD_ORDER "__________" | 39 | #define DEFAULT_FIELD_ORDER "__________" |
12 | 40 | ||
41 | namespace Opie { | ||
13 | class OContactFields{ | 42 | class OContactFields{ |
14 | 43 | ||
15 | public: | 44 | public: |
16 | OContactFields(); | 45 | OContactFields(); |
17 | ~OContactFields(); | 46 | ~OContactFields(); |
18 | /** Set the index for combo boxes. | 47 | /** Set the index for combo boxes. |
19 | * Sets the <b>index</b> of combo <b>num</b>. | 48 | * Sets the <b>index</b> of combo <b>num</b>. |
20 | * @param num selects the number of the combo | 49 | * @param num selects the number of the combo |
21 | * @param index sets the index in the combo | 50 | * @param index sets the index in the combo |
22 | */ | 51 | */ |
23 | void setFieldOrder( int num, int index ); | 52 | void setFieldOrder( int num, int index ); |
24 | 53 | ||
25 | /** Get the index for combo boxes. | 54 | /** Get the index for combo boxes. |
26 | * Returns the index of combo <b>num</b> or defindex | 55 | * Returns the index of combo <b>num</b> or defindex |
27 | * if none was defined.. | 56 | * if none was defined.. |
28 | * @param num Selects the number of the combo | 57 | * @param num Selects the number of the combo |
29 | * @param defIndex will be returned if none was defined (either | 58 | * @param defIndex will be returned if none was defined (either |
30 | * globally in the config file, nor by the contact which was used | 59 | * globally in the config file, nor by the contact which was used |
31 | * by loadFromRecord() ) | 60 | * by loadFromRecord() ) |
32 | */ | 61 | */ |
33 | int getFieldOrder( int num, int defIndex); | 62 | int getFieldOrder( int num, int defIndex); |
34 | 63 | ||
35 | /** Store fieldorder to contact. */ | 64 | /** Store fieldorder to contact. */ |
36 | void saveToRecord( OContact& ); | 65 | void saveToRecord( OContact& ); |
@@ -42,26 +71,26 @@ class OContactFields{ | |||
42 | QString globalFieldOrder; | 71 | QString globalFieldOrder; |
43 | bool changedFieldOrder; | 72 | bool changedFieldOrder; |
44 | 73 | ||
45 | public: | 74 | public: |
46 | static QStringList personalfields( bool sorted = true, bool translated = false ); | 75 | static QStringList personalfields( bool sorted = true, bool translated = false ); |
47 | static QStringList phonefields( bool sorted = true, bool translated = false ); | 76 | static QStringList phonefields( bool sorted = true, bool translated = false ); |
48 | static QStringList detailsfields( bool sorted = true, bool translated = false ); | 77 | static QStringList detailsfields( bool sorted = true, bool translated = false ); |
49 | static QStringList fields( bool sorted = true, bool translated = false ); | 78 | static QStringList fields( bool sorted = true, bool translated = false ); |
50 | 79 | ||
51 | static QStringList trpersonalfields( bool sorted = true ); | 80 | static QStringList trpersonalfields( bool sorted = true ); |
52 | static QStringList untrpersonalfields( bool sorted = true ); | 81 | static QStringList untrpersonalfields( bool sorted = true ); |
53 | static QStringList trphonefields( bool sorted = true ); | 82 | static QStringList trphonefields( bool sorted = true ); |
54 | static QStringList untrphonefields( bool sorted = true ); | 83 | static QStringList untrphonefields( bool sorted = true ); |
55 | static QStringList trdetailsfields( bool sorted = true ); | 84 | static QStringList trdetailsfields( bool sorted = true ); |
56 | static QStringList untrdetailsfields( bool sorted = true ); | 85 | static QStringList untrdetailsfields( bool sorted = true ); |
57 | static QStringList trfields( bool sorted = true ); | 86 | static QStringList trfields( bool sorted = true ); |
58 | static QStringList untrfields( bool sorted = true ); | 87 | static QStringList untrfields( bool sorted = true ); |
59 | 88 | ||
60 | static QMap<int, QString> idToTrFields(); | 89 | static QMap<int, QString> idToTrFields(); |
61 | static QMap<QString, int> trFieldsToId(); | 90 | static QMap<QString, int> trFieldsToId(); |
62 | static QMap<int, QString> idToUntrFields(); | 91 | static QMap<int, QString> idToUntrFields(); |
63 | static QMap<QString, int> untrFieldsToId(); | 92 | static QMap<QString, int> untrFieldsToId(); |
64 | 93 | ||
65 | }; | 94 | }; |
66 | 95 | } | |
67 | #endif | 96 | #endif |