ocontactfields.h
Go to the documentation of this file.00001 #ifndef OPIE_CONTACTS_FIELDS
00002 #define OPIE_CONTACTS_FIELDS
00003
00004 class QStringList;
00005
00006 #include <qmap.h>
00007 #include <qstring.h>
00008 #include <opie/ocontact.h>
00009
00010 #define CONTACT_FIELD_ORDER_NAME "opie-contactfield-order"
00011 #define DEFAULT_FIELD_ORDER "__________"
00012
00013 class OContactFields{
00014
00015 public:
00016 OContactFields();
00017 ~OContactFields();
00023 void setFieldOrder( int num, int index );
00024
00033 int getFieldOrder( int num, int defIndex);
00034
00036 void saveToRecord( OContact& );
00038 void loadFromRecord( const OContact& );
00039
00040 private:
00041 QString fieldOrder;
00042 QString globalFieldOrder;
00043 bool changedFieldOrder;
00044
00045 public:
00046 static QStringList personalfields( bool sorted = true, bool translated = false );
00047 static QStringList phonefields( bool sorted = true, bool translated = false );
00048 static QStringList detailsfields( bool sorted = true, bool translated = false );
00049 static QStringList fields( bool sorted = true, bool translated = false );
00050
00051 static QStringList trpersonalfields( bool sorted = true );
00052 static QStringList untrpersonalfields( bool sorted = true );
00053 static QStringList trphonefields( bool sorted = true );
00054 static QStringList untrphonefields( bool sorted = true );
00055 static QStringList trdetailsfields( bool sorted = true );
00056 static QStringList untrdetailsfields( bool sorted = true );
00057 static QStringList trfields( bool sorted = true );
00058 static QStringList untrfields( bool sorted = true );
00059
00060 static QMap<int, QString> idToTrFields();
00061 static QMap<QString, int> trFieldsToId();
00062 static QMap<int, QString> idToUntrFields();
00063 static QMap<QString, int> untrFieldsToId();
00064
00065 };
00066
00067 #endif
This file is part of the documentation for OPIE Version 1.1.