summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/ocontactfields.h
Unidiff
Diffstat (limited to 'libopie2/opiepim/ocontactfields.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/ocontactfields.h32
1 files changed, 19 insertions, 13 deletions
diff --git a/libopie2/opiepim/ocontactfields.h b/libopie2/opiepim/ocontactfields.h
index 993ce3b..9e89532 100644
--- a/libopie2/opiepim/ocontactfields.h
+++ b/libopie2/opiepim/ocontactfields.h
@@ -25,24 +25,30 @@
25 If not, write to the Free Software Foundation, 25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, 26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA. 27 Boston, MA 02111-1307, USA.
28*/ 28*/
29#ifndef OPIE_CONTACTS_FIELDS 29
30#define OPIE_CONTACTS_FIELDS 30#ifndef OCONTACTFIELDS_H
31#define OCONTACTFIELDS_H
31 32
32class QStringList; 33class QStringList;
33 34
35/* OPIE */
36#include <opie2/ocontact.h>
37
38/* QT */
34#include <qmap.h> 39#include <qmap.h>
35#include <qstring.h> 40#include <qstring.h>
36#include <opie2/ocontact.h>
37 41
38#define CONTACT_FIELD_ORDER_NAME "opie-contactfield-order" 42#define CONTACT_FIELD_ORDER_NAME "opie-contactfield-order"
39#define DEFAULT_FIELD_ORDER "__________" 43#define DEFAULT_FIELD_ORDER "__________"
40
41namespace Opie {
42class OContactFields{
43 44
44 public: 45namespace Opie
46{
47class OContactFields
48{
49
50 public:
45 OContactFields(); 51 OContactFields();
46 ~OContactFields(); 52 ~OContactFields();
47 /** Set the index for combo boxes. 53 /** Set the index for combo boxes.
48 * Sets the <b>index</b> of combo <b>num</b>. 54 * Sets the <b>index</b> of combo <b>num</b>.
@@ -54,30 +60,30 @@ class OContactFields{
54 /** Get the index for combo boxes. 60 /** Get the index for combo boxes.
55 * Returns the index of combo <b>num</b> or defindex 61 * Returns the index of combo <b>num</b> or defindex
56 * if none was defined.. 62 * if none was defined..
57 * @param num Selects the number of the combo 63 * @param num Selects the number of the combo
58 * @param defIndex will be returned if none was defined (either 64 * @param defIndex will be returned if none was defined (either
59 * globally in the config file, nor by the contact which was used 65 * globally in the config file, nor by the contact which was used
60 * by loadFromRecord() ) 66 * by loadFromRecord() )
61 */ 67 */
62 int getFieldOrder( int num, int defIndex); 68 int getFieldOrder( int num, int defIndex );
63 69
64 /** Store fieldorder to contact. */ 70 /** Store fieldorder to contact. */
65 void saveToRecord( OContact& ); 71 void saveToRecord( OContact& );
66 /** Get Fieldorder from contact. */ 72 /** Get Fieldorder from contact. */
67 void loadFromRecord( const OContact& ); 73 void loadFromRecord( const OContact& );
68 74
69 private: 75 private:
70 QString fieldOrder; 76 QString fieldOrder;
71 QString globalFieldOrder; 77 QString globalFieldOrder;
72 bool changedFieldOrder; 78 bool changedFieldOrder;
73 79
74 public: 80 public:
75 static QStringList personalfields( bool sorted = true, bool translated = false ); 81 static QStringList personalfields( bool sorted = true, bool translated = false );
76 static QStringList phonefields( bool sorted = true, bool translated = false ); 82 static QStringList phonefields( bool sorted = true, bool translated = false );
77 static QStringList detailsfields( bool sorted = true, bool translated = false ); 83 static QStringList detailsfields( bool sorted = true, bool translated = false );
78 static QStringList fields( bool sorted = true, bool translated = false ); 84 static QStringList fields( bool sorted = true, bool translated = false );
79 85
80 static QStringList trpersonalfields( bool sorted = true ); 86 static QStringList trpersonalfields( bool sorted = true );
81 static QStringList untrpersonalfields( bool sorted = true ); 87 static QStringList untrpersonalfields( bool sorted = true );
82 static QStringList trphonefields( bool sorted = true ); 88 static QStringList trphonefields( bool sorted = true );
83 static QStringList untrphonefields( bool sorted = true ); 89 static QStringList untrphonefields( bool sorted = true );