summaryrefslogtreecommitdiff
path: root/libopie/pim/ocontactfields.h
Unidiff
Diffstat (limited to 'libopie/pim/ocontactfields.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/ocontactfields.h67
1 files changed, 0 insertions, 67 deletions
diff --git a/libopie/pim/ocontactfields.h b/libopie/pim/ocontactfields.h
deleted file mode 100644
index f105de7..0000000
--- a/libopie/pim/ocontactfields.h
+++ b/dev/null
@@ -1,67 +0,0 @@
1#ifndef OPIE_CONTACTS_FIELDS
2#define OPIE_CONTACTS_FIELDS
3
4class QStringList;
5
6#include <qmap.h>
7#include <qstring.h>
8#include <opie/ocontact.h>
9
10#define CONTACT_FIELD_ORDER_NAME "opie-contactfield-order"
11#define DEFAULT_FIELD_ORDER "__________"
12
13class OContactFields{
14
15 public:
16 OContactFields();
17 ~OContactFields();
18 /** Set the index for combo boxes.
19 * Sets the <b>index</b> of combo <b>num</b>.
20 * @param num selects the number of the combo
21 * @param index sets the index in the combo
22 */
23 void setFieldOrder( int num, int index );
24
25 /** Get the index for combo boxes.
26 * Returns the index of combo <b>num</b> or defindex
27 * if none was defined..
28 * @param num Selects the number of the combo
29 * @param defIndex will be returned if none was defined (either
30 * globally in the config file, nor by the contact which was used
31 * by loadFromRecord() )
32 */
33 int getFieldOrder( int num, int defIndex);
34
35 /** Store fieldorder to contact. */
36 void saveToRecord( OContact& );
37 /** Get Fieldorder from contact. */
38 void loadFromRecord( const OContact& );
39
40 private:
41 QString fieldOrder;
42 QString globalFieldOrder;
43 bool changedFieldOrder;
44
45 public:
46 static QStringList personalfields( bool sorted = true, bool translated = false );
47 static QStringList phonefields( bool sorted = true, bool translated = false );
48 static QStringList detailsfields( bool sorted = true, bool translated = false );
49 static QStringList fields( bool sorted = true, bool translated = false );
50
51 static QStringList trpersonalfields( bool sorted = true );
52 static QStringList untrpersonalfields( bool sorted = true );
53 static QStringList trphonefields( bool sorted = true );
54 static QStringList untrphonefields( bool sorted = true );
55 static QStringList trdetailsfields( bool sorted = true );
56 static QStringList untrdetailsfields( bool sorted = true );
57 static QStringList trfields( bool sorted = true );
58 static QStringList untrfields( bool sorted = true );
59
60 static QMap<int, QString> idToTrFields();
61 static QMap<QString, int> trFieldsToId();
62 static QMap<int, QString> idToUntrFields();
63 static QMap<QString, int> untrFieldsToId();
64
65};
66
67#endif