summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/ocontact.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/ocontact.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/ocontact.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/libopie2/opiepim/ocontact.cpp b/libopie2/opiepim/ocontact.cpp
index 96a5f65..a38b62b 100644
--- a/libopie2/opiepim/ocontact.cpp
+++ b/libopie2/opiepim/ocontact.cpp
@@ -902,105 +902,96 @@ QStringList OContact::fields()
902 list.append( "BusinessWebPage" ); 902 list.append( "BusinessWebPage" );
903 903
904 list.append( "Office" ); 904 list.append( "Office" );
905 list.append( "Profession" ); 905 list.append( "Profession" );
906 list.append( "Assistant" ); 906 list.append( "Assistant" );
907 list.append( "Manager" ); 907 list.append( "Manager" );
908 908
909 list.append( "HomeStreet" ); 909 list.append( "HomeStreet" );
910 list.append( "HomeCity" ); 910 list.append( "HomeCity" );
911 list.append( "HomeState" ); 911 list.append( "HomeState" );
912 list.append( "HomeZip" ); 912 list.append( "HomeZip" );
913 list.append( "HomeCountry" ); 913 list.append( "HomeCountry" );
914 list.append( "HomeWebPage" ); 914 list.append( "HomeWebPage" );
915 915
916 list.append( "Spouse" ); 916 list.append( "Spouse" );
917 list.append( "Gender" ); 917 list.append( "Gender" );
918 list.append( "Birthday" ); 918 list.append( "Birthday" );
919 list.append( "Anniversary" ); 919 list.append( "Anniversary" );
920 list.append( "Nickname" ); 920 list.append( "Nickname" );
921 list.append( "Children" ); 921 list.append( "Children" );
922 922
923 list.append( "Notes" ); 923 list.append( "Notes" );
924 list.append( "Groups" ); 924 list.append( "Groups" );
925 925
926 return list; 926 return list;
927} 927}
928 928
929 929
930/*! 930/*!
931 Sets the list of email address for contact to those contained in \a str. 931 Sets the list of email address for contact to those contained in \a str.
932 Email address should be separated by ';'s. 932 Email address should be separated by ';'s.
933*/ 933*/
934void OContact::setEmails( const QString &str ) 934void OContact::setEmails( const QString &str )
935{ 935{
936 replace( Qtopia::Emails, str ); 936 replace( Qtopia::Emails, str );
937 if ( str.isEmpty() ) 937 if ( str.isEmpty() )
938 setDefaultEmail( QString::null ); 938 setDefaultEmail( QString::null );
939} 939}
940 940
941/*! 941/*!
942 Sets the list of children for the contact to those contained in \a str. 942 Sets the list of children for the contact to those contained in \a str.
943*/ 943*/
944void OContact::setChildren( const QString &str ) 944void OContact::setChildren( const QString &str )
945{ 945{
946 replace( Qtopia::Children, str ); 946 replace( Qtopia::Children, str );
947} 947}
948 948
949/*! 949/*!
950 Returns TRUE if the contact matches the regular expression \a regexp.
951 Otherwise returns FALSE.
952*/
953bool OContact::match( const QString &regexp ) const
954{
955 return match(QRegExp(regexp));
956}
957
958/*!
959 \overload 950 \overload
960 Returns TRUE if the contact matches the regular expression \a regexp. 951 Returns TRUE if the contact matches the regular expression \a regexp.
961 Otherwise returns FALSE. 952 Otherwise returns FALSE.
962*/ 953*/
963bool OContact::match( const QRegExp &r ) const 954bool OContact::match( const QRegExp &r ) const
964{ 955{
965 bool match; 956 bool match;
966 match = false; 957 match = false;
967 QMap<int, QString>::ConstIterator it; 958 QMap<int, QString>::ConstIterator it;
968 for ( it = mMap.begin(); it != mMap.end(); ++it ) { 959 for ( it = mMap.begin(); it != mMap.end(); ++it ) {
969 if ( (*it).find( r ) > -1 ) { 960 if ( (*it).find( r ) > -1 ) {
970 match = true; 961 match = true;
971 break; 962 break;
972 } 963 }
973 } 964 }
974 return match; 965 return match;
975} 966}
976 967
977 968
978QString OContact::toShortText() const 969QString OContact::toShortText() const
979{ 970{
980 return ( fullName() ); 971 return ( fullName() );
981} 972}
982QString OContact::type() const 973QString OContact::type() const
983{ 974{
984 return QString::fromLatin1( "OContact" ); 975 return QString::fromLatin1( "OContact" );
985} 976}
986 977
987// Definition is missing ! (se) 978// Definition is missing ! (se)
988QMap<QString,QString> OContact::toExtraMap() const 979QMap<QString,QString> OContact::toExtraMap() const
989{ 980{
990 qWarning ("Function not implemented: OContact::toExtraMap()"); 981 qWarning ("Function not implemented: OContact::toExtraMap()");
991 QMap <QString,QString> useless; 982 QMap <QString,QString> useless;
992 return useless; 983 return useless;
993} 984}
994 985
995class QString OContact::recordField( int pos ) const 986class QString OContact::recordField( int pos ) const
996{ 987{
997 QStringList SLFIELDS = fields(); // ?? why this ? (se) 988 QStringList SLFIELDS = fields(); // ?? why this ? (se)
998 return SLFIELDS[pos]; 989 return SLFIELDS[pos];
999} 990}
1000 991
1001// In future releases, we should store birthday and anniversary 992// In future releases, we should store birthday and anniversary
1002// internally as QDate instead of QString ! 993// internally as QDate instead of QString !
1003// QString is always too complicate to interprete (DD.MM.YY, DD/MM/YY, MM/DD/YY, etc..)(se) 994// QString is always too complicate to interprete (DD.MM.YY, DD/MM/YY, MM/DD/YY, etc..)(se)
1004 995
1005/*! \fn void OContact::setBirthday( const QDate& date ) 996/*! \fn void OContact::setBirthday( const QDate& date )
1006 Sets the birthday for the contact to \a date. If date is null 997 Sets the birthday for the contact to \a date. If date is null