00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef _OCONTACTACCESS_H
00035 #define _OCONTACTACCESS_H
00036
00037 #include <qobject.h>
00038
00039 #include <qpe/qcopenvelope_qws.h>
00040
00041 #include <qvaluelist.h>
00042 #include <qfileinfo.h>
00043
00044 #include <opie2/opimcontact.h>
00045 #include <opie2/ocontactaccessbackend.h>
00046 #include <opie2/opimaccesstemplate.h>
00047
00048 namespace Opie {
00058 class OPimContactAccess: public QObject, public OPimAccessTemplate<OPimContact>
00059 {
00060 Q_OBJECT
00061
00062 public:
00067 enum SortFilter {
00069 DoNotShowWithoutChildren = FilterCustom<<1,
00071 DoNotShowWithoutAnniversary = FilterCustom<<2,
00073 DoNotShowWithoutBirthday = FilterCustom<<3,
00075 DoNotShowWithoutHomeAddress = FilterCustom<<4,
00077 DoNotShowWithoutBusinessAddress = FilterCustom<<5,
00079 DoNotShowWithCategory = FilterCustom << 6
00080 };
00081
00086 enum SortOrder {
00087 SortTitle = SortCustom,
00088 SortFirstName,
00089 SortMiddleName,
00090 SortLastName,
00091 SortSuffix,
00092 SortEmail,
00093 SortNickname,
00094 SortFileAsName,
00095 SortAnniversary,
00096 SortBirthday,
00097 SortGender,
00098 SortBirthdayWithoutYear,
00099 SortAnniversaryWithoutYear
00100 };
00101
00116 OPimContactAccess (const QString appname, const QString filename = 0l,
00117 OPimContactAccessBackend* backend = 0l, bool handlesync = true);
00118 ~OPimContactAccess ();
00119
00120
00125 bool wasChangedExternally()const;
00126
00127
00132 bool save();
00133
00137 int rtti() const;
00138
00139 signals:
00140
00141
00142
00143
00144
00145
00146 void signalChanged ( const OPimContactAccess *which );
00147
00148
00149 private:
00150 OPimContactAccessBackend *m_backEnd;
00151 bool m_loading:1;
00152
00153 private slots:
00154 void copMessage( const QCString &msg, const QByteArray &data );
00155
00156 private:
00157 class Private;
00158 Private *d;
00159
00160 };
00161
00162 }
00163
00164 #endif