summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/kaddressbook/germantranslation.txt5
-rw-r--r--kabc/addressee.cpp14
-rw-r--r--kabc/addressee.h7
-rw-r--r--kabc/field.cpp12
-rw-r--r--kabc/phonenumber.cpp4
-rw-r--r--kaddressbook/xxport/csvimportdialog.cpp4
-rw-r--r--kaddressbook/xxport/csvimportdialog.h2
7 files changed, 10 insertions, 38 deletions
diff --git a/bin/kdepim/kaddressbook/germantranslation.txt b/bin/kdepim/kaddressbook/germantranslation.txt
index 06f25e9..3448dcc 100644
--- a/bin/kdepim/kaddressbook/germantranslation.txt
+++ b/bin/kdepim/kaddressbook/germantranslation.txt
@@ -728,110 +728,109 @@
728{ "Local from: ","Lokal von: " }, 728{ "Local from: ","Lokal von: " },
729{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" }, 729{ "Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n %d incoming filtered out\n %d outgoing filtered out\n","Synchronisationsübersicht:\n\n %d lokal hinzugefügt\n %d fern hinzugefügt\n %d lokal geändert\n %d fern geändert\n %d lokal gelöscht\n %d fern gelöscht\n %d eingehende ausgefiltert\n %d ausgehende ausgefiltert\n" },
730{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" }, 730{ "Local calendar changed!\n","Lokaler Kalender geändert!\n" },
731{ "Write back","Schreibe zurück" }, 731{ "Write back","Schreibe zurück" },
732{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" }, 732{ "Pi-Sync succesful!","Pi-Sync erfolgreich!" },
733{ "Received sync request","Sync Anfrage erhalten" }, 733{ "Received sync request","Sync Anfrage erhalten" },
734{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." }, 734{ "Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog.","Ferne Synchronisation ...\n\nBenutze diese Anwendung nicht!\n\nWenn das Syncen fehlschlägt kann\ndieser Dialog geschlossen werden." },
735{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." }, 735{ "Saving Data to temp file ...","Speichere Daten in temp Datei..." },
736{ "Data saved to temp file!","Daten in temp Datei gespeichert!" }, 736{ "Data saved to temp file!","Daten in temp Datei gespeichert!" },
737{ "Sending file...","Sende Datei..." }, 737{ "Sending file...","Sende Datei..." },
738{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 738{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
739{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 739{ "Receiving synced file...","Gesyncte Daten erhalten..." },
740{ "Received %1 bytes","%1 Bytes erhalten" }, 740{ "Received %1 bytes","%1 Bytes erhalten" },
741{ "Writing file to disk...","Speichere Datei..." }, 741{ "Writing file to disk...","Speichere Datei..." },
742{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 742{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
743{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 743{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
744{ "Synchronize!","Synchronisiere!" }, 744{ "Synchronize!","Synchronisiere!" },
745{ "High clock skew!","Großer Uhrzeitunterschied!" }, 745{ "High clock skew!","Großer Uhrzeitunterschied!" },
746{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 746{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
747{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, 747{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" },
748{ "Change search field enable jump bar","Ändere Suchfeld um Jumpbar anzuzeigen" }, 748{ "Change search field enable jump bar","Ändere Suchfeld um Jumpbar anzuzeigen" },
749{ "Search with '*' prefix (wildcard)","Suche mit '*' Prefix (Wildcard)" }, 749{ "Search with '*' prefix (wildcard)","Suche mit '*' Prefix (Wildcard)" },
750{ "Shrink searchfield in portrait view","Verkleinere Suchfeld im Portraitmodus" }, 750{ "Shrink searchfield in portrait view","Verkleinere Suchfeld im Portraitmodus" },
751{ "Edit new contact","Bearbeite neuen Kontakt" }, 751{ "Edit new contact","Bearbeite neuen Kontakt" },
752{ "Edit ","Bearbeite " }, 752{ "Edit ","Bearbeite " },
753{ "No contact changed!","Kein Kontakt verändert" }, 753{ "No contact changed!","Kein Kontakt verändert" },
754{ "%1 contacts changed!","%1 Kontakte geändert!" }, 754{ "%1 contacts changed!","%1 Kontakte geändert!" },
755{ "Mobile (home)","Handy (Privat)" }, 755{ "Mobile (home)","Handy (Privat)" },
756{ "Mobile (work)","Handy (Arbeit)" }, 756{ "Mobile (work)","Handy (Arbeit)" },
757{ "Def.Formatted Name","Def. Format. Name" }, 757{ "Def.Formatted Name","Def. Format. Name" },
758{ "Colors","Farben" }, 758{ "Colors","Farben" },
759{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, 759{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
760{ "Backup enabled","Backup angeschaltet" }, 760{ "Backup enabled","Backup angeschaltet" },
761{ "Use standard backup dir","Standard Backupverzeichnis" }, 761{ "Use standard backup dir","Standard Backupverzeichnis" },
762{ "Number of Backups:","Anzahl der Backups" }, 762{ "Number of Backups:","Anzahl der Backups" },
763{ "Make backup every ","Mache ein Backup alle " }, 763{ "Make backup every ","Mache ein Backup alle " },
764{ " days"," Tage" }, 764{ " days"," Tage" },
765{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, 765{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." },
766{ "Backup Failed!","Backup Problem!" }, 766{ "Backup Failed!","Backup Problem!" },
767{ "Try again now","Versuche jetzt nochmal" }, 767{ "Try again now","Versuche jetzt nochmal" },
768{ "Try again later","Versuche später nochmal" }, 768{ "Try again later","Versuche später nochmal" },
769{ "Try again tomorrow","Versuche morgen nochmal" }, 769{ "Try again tomorrow","Versuche morgen nochmal" },
770{ "Disable backup","Schalte Backup ab" }, 770{ "Disable backup","Schalte Backup ab" },
771{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, 771{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
772{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, 772{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
773{ "Choose action","Wähle Aktion" }, 773{ "Choose action","Wähle Aktion" },
774{ "&Configure KA/Pi...","Konfiguriere KA/Pi..." }, 774{ "&Configure KA/Pi...","Konfiguriere KA/Pi..." },
775{ "Global Settings...","Globale Einstellungen..." }, 775{ "Global Settings...","Globale Einstellungen..." },
776{ "Spouse","Ehegatte" }, 776{ "Spouse","Ehegatte" },
777{ "Notes","Notizen" }, 777{ "Notes","Notizen" },
778{ "Messanger","Messanger" }, 778{ "Messanger","Messanger" },
779{ "Assistant","Assistent" }, 779{ "Assistant","Assistent" },
780{ "Manager","Manager" }, 780{ "Manager","Manager" },
781{ "Secrecy","Sichtbar" }, 781{ "Secrecy","Sichtbar" },
782{ "male","männlich" }, 782{ "male","männlich" },
783{ "female","weiblich" }, 783{ "female","weiblich" },
784{ "Hide!","Verbergen!" }, 784{ "Hide!","Verbergen!" },
785{ "Show!","Anzeigen!" }, 785{ "Show!","Anzeigen!" },
786{ "Details","Details" }, 786{ "Details","Details" },
787{ "Search:","Suche:" }, 787{ "Search:","Suche:" },
788{ "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" }, 788{ "Automatically sync with KDE-Desktop\nwhen receiving sync request","Synce automatisch mit KDE-Desktop\nwenn eine Sync-Anforderung kommt" },
789{ "Pi-Sync Port Error","Pi-Sync Port Fehler" }, 789{ "Pi-Sync Port Error","Pi-Sync Port Fehler" },
790{ "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" }, 790{ "<b>Enabling Pi-Sync failed!</b> Failed to bind or listen to the port %1! Is another instance already listening to that port?","<b>Anschalten von Pi-Sync fehlgeschlagen!</b> Fehler beim Ansprechen des Ports %1! Ist bereits eine andere Anwendung dabei diesen Port zu nutzen?" },
791{ "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" }, 791{ "No valid port number:\n%1","Keine gültige Port Nummer:\n%1" },
792{ "Port number (Default: %1)\nValid range from 1 to 65535","Port Nummer (Standard: %1)\nGültiger Bereich von 1 bis 65535" }, 792{ "Port number (Default: %1)\nValid range from 1 to 65535","Port Nummer (Standard: %1)\nGültiger Bereich von 1 bis 65535" },
793{ "Pi-Sync Error","Pi-Sync Fehler" }, 793{ "Pi-Sync Error","Pi-Sync Fehler" },
794{ "Got send file request\nwith invalid password","Erhielt "sende Datei" Anfrage\nmit ungültigem Passwort" }, 794{ "Got send file request\nwith invalid password","Erhielt "sende Datei" Anfrage\nmit ungültigem Passwort" },
795{ "Got receive file request\nwith invalid password","Erhielt "empfange Datei" Anfrage\nmit ungültigem Passwort" }, 795{ "Got receive file request\nwith invalid password","Erhielt "empfange Datei" Anfrage\nmit ungültigem Passwort" },
796{ "Wrong password: Receiving remote file failed.","Falsches Passwort: Empfangen von entfernter Datei fehlgeschlagen." }, 796{ "Wrong password: Receiving remote file failed.","Falsches Passwort: Empfangen von entfernter Datei fehlgeschlagen." },
797{ "Please close error dialog on remote.","Bitte schließe Fehler-Dialog am entfernten Rechner" }, 797{ "Please close error dialog on remote.","Bitte schließe Fehler-Dialog am entfernten Rechner" },
798{ "Unknown error on remote.","Unbekannter Fehler am entfernten Rechner" }, 798{ "Unknown error on remote.","Unbekannter Fehler am entfernten Rechner" },
799{ "Pi-Sync: Connected!","Pi-Sync: Verbunden!" }, 799{ "Pi-Sync: Connected!","Pi-Sync: Verbunden!" },
800{ "Receiving file from remote...","Empfange entfernte Datei..." }, 800{ "Receiving file from remote...","Empfange entfernte Datei..." },
801{ "Sending back synced file...","Sende synchronisierte Datei zurück..." }, 801{ "Sending back synced file...","Sende synchronisierte Datei zurück..." },
802{ "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" }, 802{ "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" },
803{ "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" }, 803{ "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" },
804{ "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." }, 804{ "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." },
805{ "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" }, 805{ "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" },
806{ "Writing back file ...","Schreibe Datei zurück..." }, 806{ "Writing back file ...","Schreibe Datei zurück..." },
807{ "Sending back file ...","Sende Datei zurück..." }, 807{ "Sending back file ...","Sende Datei zurück..." },
808{ "Eeek, there I am ticklish!","Huch, da bin ich kitzlig!" }, 808{ "Eeek, there I am ticklish!","Huch, da bin ich kitzlig!" },
809{ "Save using LOCAL storage","Speichere nutze LOCAL Pfad" }, 809{ "Save using LOCAL storage","Speichere nutze LOCAL Pfad" },
810{ "...and %1 more\ncontact(s) selected","...und noch %1 Kontakte\n mehr ausgewählt" }, 810{ "...and %1 more\ncontact(s) selected","...und noch %1 Kontakte\n mehr ausgewählt" },
811{ "Do you really\nwant to delete the\nsetected contact(s)?\n\n","Möchten Sie wirklich\ndie ausgewählten\nKontakte löschen?\n\n" }, 811{ "Do you really\nwant to delete the\nsetected contact(s)?\n\n","Möchten Sie wirklich\ndie ausgewählten\nKontakte löschen?\n\n" },
812{ "%1 contacts\nsuccessfully\nimported.","%1 Kontakte\nerfolgreich\nimportiert." }, 812{ "%1 contacts\nsuccessfully\nimported.","%1 Kontakte\nerfolgreich\nimportiert." },
813{ "Import this contact?","Importiere diesen Kontakt?" }, 813{ "Import this contact?","Importiere diesen Kontakt?" },
814{ "Import all!","Importiere alle!" }, 814{ "Import all!","Importiere alle!" },
815{ "Loading addressbook data ... please wait","Lade Adressbuchdaten ... bitte warten" }, 815{ "Loading addressbook data ... please wait","Lade Adressbuchdaten ... bitte warten" },
816{ "Import Format","Import Format" }, 816{ "Import Format","Import Format" },
817{ "Select import format!\nDefault and standard is Utf8.\nLatin1 may be the right\nfor some West Europian languages.","Wähle Import Format!\nDefault und Standard ist Utf8.\nLatin1 kann das richtige für\nWesteuropäische Sprachen sein." }, 817{ "Select import format!\nDefault and standard is Utf8.\nLatin1 may be the right\nfor some West Europian languages.","Wähle Import Format!\nDefault und Standard ist Utf8.\nLatin1 kann das richtige für\nWesteuropäische Sprachen sein." },
818{ "Home2","Privat2" }, 818{ "Home2","Privat2" },
819{ "Work2","Arbeit2" }, 819{ "Work2","Arbeit2" },
820{ "Fax (Work)","Fax (Arbeit)" }, 820{ "Fax (Work)","Fax (Arbeit)" },
821{ "Fax (Home)","Fax (Privat)" }, 821{ "Fax (Home)","Fax (Privat)" },
822{ "Assistent","Sekretär(in)" }, 822{ "Assistent","Sekretär(in)" },
823{ "Company","Firma" }, 823{ "Company","Firma" },
824{ "Mobile2 (Work)","Handy2 (Arbeit)" }, 824{ "Mobile2","Handy2" },
825{ "Mobile2 (Car)","Handy2 (Auto)" },
826{ "Callback","Rückruf" }, 825{ "Callback","Rückruf" },
827{ "Fax (Other)","Fax (Sonst.)" }, 826{ "Fax (Other)","Fax (Sonst.)" },
828{ "Primary","Bevorzugt" }, 827{ "Primary","Bevorzugt" },
829{ "Mobile (Home)","Handy (Privat)" }, 828{ "Mobile","Handy" },
830{ "Unfiled","Nicht zugeordnet" }, 829{ "Unfiled","Nicht zugeordnet" },
831{ "Format.n.:","Format.N.:" }, 830{ "Format.n.:","Format.N.:" },
832{ "Other Phone","Sonst. Telefon" }, 831{ "Other Phone","Sonst. Telefon" },
833{ "","" }, 832{ "","" },
834{ "","" }, 833{ "","" },
835{ "","" }, 834{ "","" },
836{ "","" }, 835{ "","" },
837{ "","" }, \ No newline at end of file 836{ "","" }, \ No newline at end of file
diff --git a/kabc/addressee.cpp b/kabc/addressee.cpp
index 0d8e8e8..2f4a9af 100644
--- a/kabc/addressee.cpp
+++ b/kabc/addressee.cpp
@@ -962,222 +962,212 @@ QDateTime Addressee::birthday() const
962{ 962{
963 return mData->birthday; 963 return mData->birthday;
964} 964}
965 965
966QString Addressee::birthdayLabel() 966QString Addressee::birthdayLabel()
967{ 967{
968 return i18n("Birthday"); 968 return i18n("Birthday");
969} 969}
970 970
971 971
972QString Addressee::homeAddressStreetLabel() 972QString Addressee::homeAddressStreetLabel()
973{ 973{
974 return i18n("Home Address Street"); 974 return i18n("Home Address Street");
975} 975}
976 976
977 977
978QString Addressee::homeAddressLocalityLabel() 978QString Addressee::homeAddressLocalityLabel()
979{ 979{
980 return i18n("Home Address Locality"); 980 return i18n("Home Address Locality");
981} 981}
982 982
983 983
984QString Addressee::homeAddressRegionLabel() 984QString Addressee::homeAddressRegionLabel()
985{ 985{
986 return i18n("Home Address Region"); 986 return i18n("Home Address Region");
987} 987}
988 988
989 989
990QString Addressee::homeAddressPostalCodeLabel() 990QString Addressee::homeAddressPostalCodeLabel()
991{ 991{
992 return i18n("Home Address Postal Code"); 992 return i18n("Home Address Postal Code");
993} 993}
994 994
995 995
996QString Addressee::homeAddressCountryLabel() 996QString Addressee::homeAddressCountryLabel()
997{ 997{
998 return i18n("Home Address Country"); 998 return i18n("Home Address Country");
999} 999}
1000 1000
1001 1001
1002QString Addressee::homeAddressLabelLabel() 1002QString Addressee::homeAddressLabelLabel()
1003{ 1003{
1004 return i18n("Home Address Label"); 1004 return i18n("Home Address Label");
1005} 1005}
1006 1006
1007 1007
1008QString Addressee::businessAddressStreetLabel() 1008QString Addressee::businessAddressStreetLabel()
1009{ 1009{
1010 return i18n("Business Address Street"); 1010 return i18n("Business Address Street");
1011} 1011}
1012 1012
1013 1013
1014QString Addressee::businessAddressLocalityLabel() 1014QString Addressee::businessAddressLocalityLabel()
1015{ 1015{
1016 return i18n("Business Address Locality"); 1016 return i18n("Business Address Locality");
1017} 1017}
1018 1018
1019 1019
1020QString Addressee::businessAddressRegionLabel() 1020QString Addressee::businessAddressRegionLabel()
1021{ 1021{
1022 return i18n("Business Address Region"); 1022 return i18n("Business Address Region");
1023} 1023}
1024 1024
1025 1025
1026QString Addressee::businessAddressPostalCodeLabel() 1026QString Addressee::businessAddressPostalCodeLabel()
1027{ 1027{
1028 return i18n("Business Address Postal Code"); 1028 return i18n("Business Address Postal Code");
1029} 1029}
1030 1030
1031 1031
1032QString Addressee::businessAddressCountryLabel() 1032QString Addressee::businessAddressCountryLabel()
1033{ 1033{
1034 return i18n("Business Address Country"); 1034 return i18n("Business Address Country");
1035} 1035}
1036 1036
1037 1037
1038QString Addressee::businessAddressLabelLabel() 1038QString Addressee::businessAddressLabelLabel()
1039{ 1039{
1040 return i18n("Business Address Label"); 1040 return i18n("Business Address Label");
1041} 1041}
1042 1042
1043 1043
1044QString Addressee::homePhoneLabel() 1044QString Addressee::homePhoneLabel()
1045{ 1045{
1046 return i18n("Home Phone"); 1046 return i18n("Home Phone");
1047} 1047}
1048 1048
1049 1049
1050QString Addressee::businessPhoneLabel() 1050QString Addressee::businessPhoneLabel()
1051{ 1051{
1052 return i18n("Work Phone"); 1052 return i18n("Work Phone");
1053} 1053}
1054 1054
1055 1055
1056QString Addressee::mobilePhoneLabel() 1056QString Addressee::mobilePhoneLabel()
1057{ 1057{
1058 return i18n("Mobile Phone"); 1058 return i18n("Mobile");
1059} 1059}
1060QString Addressee::mobileWorkPhoneLabel() 1060QString Addressee::mobileWorkPhoneLabel()
1061{ 1061{
1062 return i18n("Mobile2 (Work)"); 1062 return i18n("Mobile2");
1063}
1064QString Addressee::mobileHomePhoneLabel()
1065{
1066 return i18n("Mobile (Home)");
1067} 1063}
1068 1064
1069 1065
1070QString Addressee::homeFaxLabel() 1066QString Addressee::homeFaxLabel()
1071{ 1067{
1072 return i18n("Fax (Home)"); 1068 return i18n("Fax (Home)");
1073} 1069}
1074 1070
1075 1071
1076QString Addressee::businessFaxLabel() 1072QString Addressee::businessFaxLabel()
1077{ 1073{
1078 return i18n("Fax (Work)"); 1074 return i18n("Fax (Work)");
1079} 1075}
1080 1076
1081 1077
1082QString Addressee::carPhoneLabel()
1083{
1084 return i18n("Mobile2 (Car)");
1085}
1086
1087
1088QString Addressee::isdnLabel() 1078QString Addressee::isdnLabel()
1089{ 1079{
1090 return i18n("ISDN"); 1080 return i18n("ISDN");
1091} 1081}
1092 1082
1093 1083
1094QString Addressee::pagerLabel() 1084QString Addressee::pagerLabel()
1095{ 1085{
1096 return i18n("Pager"); 1086 return i18n("Pager");
1097} 1087}
1098QString Addressee::otherPhoneLabel() 1088QString Addressee::otherPhoneLabel()
1099{ 1089{
1100 return i18n("Other Phone"); 1090 return i18n("Other Phone");
1101} 1091}
1102 1092
1103QString Addressee::sipLabel() 1093QString Addressee::sipLabel()
1104{ 1094{
1105 return i18n("SIP"); 1095 return i18n("SIP");
1106} 1096}
1107 1097
1108QString Addressee::emailLabel() 1098QString Addressee::emailLabel()
1109{ 1099{
1110 return i18n("Email Address"); 1100 return i18n("Email Address");
1111} 1101}
1112 1102
1113 1103
1114void Addressee::setMailer( const QString &mailer ) 1104void Addressee::setMailer( const QString &mailer )
1115{ 1105{
1116 if ( mailer == mData->mailer ) return; 1106 if ( mailer == mData->mailer ) return;
1117 detach(); 1107 detach();
1118 mData->empty = false; 1108 mData->empty = false;
1119 mData->mailer = mailer; 1109 mData->mailer = mailer;
1120} 1110}
1121 1111
1122QString Addressee::mailer() const 1112QString Addressee::mailer() const
1123{ 1113{
1124 return mData->mailer; 1114 return mData->mailer;
1125} 1115}
1126 1116
1127QString Addressee::mailerLabel() 1117QString Addressee::mailerLabel()
1128{ 1118{
1129 return i18n("Mail Client"); 1119 return i18n("Mail Client");
1130} 1120}
1131 1121
1132 1122
1133void Addressee::setTimeZone( const TimeZone &timeZone ) 1123void Addressee::setTimeZone( const TimeZone &timeZone )
1134{ 1124{
1135 if ( timeZone == mData->timeZone ) return; 1125 if ( timeZone == mData->timeZone ) return;
1136 detach(); 1126 detach();
1137 mData->empty = false; 1127 mData->empty = false;
1138 mData->timeZone = timeZone; 1128 mData->timeZone = timeZone;
1139} 1129}
1140 1130
1141TimeZone Addressee::timeZone() const 1131TimeZone Addressee::timeZone() const
1142{ 1132{
1143 return mData->timeZone; 1133 return mData->timeZone;
1144} 1134}
1145 1135
1146QString Addressee::timeZoneLabel() 1136QString Addressee::timeZoneLabel()
1147{ 1137{
1148 return i18n("Time Zone"); 1138 return i18n("Time Zone");
1149} 1139}
1150 1140
1151 1141
1152void Addressee::setGeo( const Geo &geo ) 1142void Addressee::setGeo( const Geo &geo )
1153{ 1143{
1154 if ( geo == mData->geo ) return; 1144 if ( geo == mData->geo ) return;
1155 detach(); 1145 detach();
1156 mData->empty = false; 1146 mData->empty = false;
1157 mData->geo = geo; 1147 mData->geo = geo;
1158} 1148}
1159 1149
1160Geo Addressee::geo() const 1150Geo Addressee::geo() const
1161{ 1151{
1162 return mData->geo; 1152 return mData->geo;
1163} 1153}
1164 1154
1165QString Addressee::geoLabel() 1155QString Addressee::geoLabel()
1166{ 1156{
1167 return i18n("Geographic Position"); 1157 return i18n("Geographic Position");
1168} 1158}
1169 1159
1170 1160
1171void Addressee::setTitle( const QString &title ) 1161void Addressee::setTitle( const QString &title )
1172{ 1162{
1173 if ( title == mData->title ) return; 1163 if ( title == mData->title ) return;
1174 detach(); 1164 detach();
1175 mData->empty = false; 1165 mData->empty = false;
1176 mData->title = title; 1166 mData->title = title;
1177} 1167}
1178 1168
1179QString Addressee::title() const 1169QString Addressee::title() const
1180{ 1170{
1181 return mData->title; 1171 return mData->title;
1182} 1172}
1183 1173
diff --git a/kabc/addressee.h b/kabc/addressee.h
index fcadda6..aac78dc 100644
--- a/kabc/addressee.h
+++ b/kabc/addressee.h
@@ -239,209 +239,204 @@ class Addressee
239 Return nick name. 239 Return nick name.
240 */ 240 */
241 QString nickName() const; 241 QString nickName() const;
242 /** 242 /**
243 Return translated label for nickName field. 243 Return translated label for nickName field.
244 */ 244 */
245 static QString nickNameLabel(); 245 static QString nickNameLabel();
246 246
247 /** 247 /**
248 Set birthday. 248 Set birthday.
249 */ 249 */
250 void setBirthday( const QDateTime &birthday ); 250 void setBirthday( const QDateTime &birthday );
251 /** 251 /**
252 Return birthday. 252 Return birthday.
253 */ 253 */
254 QDateTime birthday() const; 254 QDateTime birthday() const;
255 /** 255 /**
256 Return translated label for birthday field. 256 Return translated label for birthday field.
257 */ 257 */
258 static QString birthdayLabel(); 258 static QString birthdayLabel();
259 259
260 /** 260 /**
261 Return translated label for homeAddressStreet field. 261 Return translated label for homeAddressStreet field.
262 */ 262 */
263 static QString homeAddressStreetLabel(); 263 static QString homeAddressStreetLabel();
264 264
265 /** 265 /**
266 Return translated label for homeAddressLocality field. 266 Return translated label for homeAddressLocality field.
267 */ 267 */
268 static QString homeAddressLocalityLabel(); 268 static QString homeAddressLocalityLabel();
269 269
270 /** 270 /**
271 Return translated label for homeAddressRegion field. 271 Return translated label for homeAddressRegion field.
272 */ 272 */
273 static QString homeAddressRegionLabel(); 273 static QString homeAddressRegionLabel();
274 274
275 /** 275 /**
276 Return translated label for homeAddressPostalCode field. 276 Return translated label for homeAddressPostalCode field.
277 */ 277 */
278 static QString homeAddressPostalCodeLabel(); 278 static QString homeAddressPostalCodeLabel();
279 279
280 /** 280 /**
281 Return translated label for homeAddressCountry field. 281 Return translated label for homeAddressCountry field.
282 */ 282 */
283 static QString homeAddressCountryLabel(); 283 static QString homeAddressCountryLabel();
284 284
285 /** 285 /**
286 Return translated label for homeAddressLabel field. 286 Return translated label for homeAddressLabel field.
287 */ 287 */
288 static QString homeAddressLabelLabel(); 288 static QString homeAddressLabelLabel();
289 289
290 /** 290 /**
291 Return translated label for businessAddressStreet field. 291 Return translated label for businessAddressStreet field.
292 */ 292 */
293 static QString businessAddressStreetLabel(); 293 static QString businessAddressStreetLabel();
294 294
295 /** 295 /**
296 Return translated label for businessAddressLocality field. 296 Return translated label for businessAddressLocality field.
297 */ 297 */
298 static QString businessAddressLocalityLabel(); 298 static QString businessAddressLocalityLabel();
299 299
300 /** 300 /**
301 Return translated label for businessAddressRegion field. 301 Return translated label for businessAddressRegion field.
302 */ 302 */
303 static QString businessAddressRegionLabel(); 303 static QString businessAddressRegionLabel();
304 304
305 /** 305 /**
306 Return translated label for businessAddressPostalCode field. 306 Return translated label for businessAddressPostalCode field.
307 */ 307 */
308 static QString businessAddressPostalCodeLabel(); 308 static QString businessAddressPostalCodeLabel();
309 309
310 /** 310 /**
311 Return translated label for businessAddressCountry field. 311 Return translated label for businessAddressCountry field.
312 */ 312 */
313 static QString businessAddressCountryLabel(); 313 static QString businessAddressCountryLabel();
314 314
315 /** 315 /**
316 Return translated label for businessAddressLabel field. 316 Return translated label for businessAddressLabel field.
317 */ 317 */
318 static QString businessAddressLabelLabel(); 318 static QString businessAddressLabelLabel();
319 319
320 /** 320 /**
321 Return translated label for homePhone field. 321 Return translated label for homePhone field.
322 */ 322 */
323 static QString homePhoneLabel(); 323 static QString homePhoneLabel();
324 324
325 /** 325 /**
326 Return translated label for businessPhone field. 326 Return translated label for businessPhone field.
327 */ 327 */
328 static QString businessPhoneLabel(); 328 static QString businessPhoneLabel();
329 329
330 /** 330 /**
331 Return translated label for mobilePhone field. 331 Return translated label for mobilePhone field.
332 */ 332 */
333 static QString mobilePhoneLabel(); 333 static QString mobilePhoneLabel();
334 static QString mobileWorkPhoneLabel(); 334 static QString mobileWorkPhoneLabel();
335 static QString mobileHomePhoneLabel();
336 335
337 /** 336 /**
338 Return translated label for homeFax field. 337 Return translated label for homeFax field.
339 */ 338 */
340 static QString homeFaxLabel(); 339 static QString homeFaxLabel();
341 340
342 /** 341 /**
343 Return translated label for businessFax field. 342 Return translated label for businessFax field.
344 */ 343 */
345 static QString businessFaxLabel(); 344 static QString businessFaxLabel();
346 345
347 /** 346
348 Return translated label for carPhone field.
349 */
350 static QString carPhoneLabel();
351
352 /** 347 /**
353 Return translated label for isdn field. 348 Return translated label for isdn field.
354 */ 349 */
355 static QString isdnLabel(); 350 static QString isdnLabel();
356 351
357 /** 352 /**
358 Return translated label for pager field. 353 Return translated label for pager field.
359 */ 354 */
360 static QString pagerLabel(); 355 static QString pagerLabel();
361 static QString otherPhoneLabel(); 356 static QString otherPhoneLabel();
362 /** 357 /**
363 Return translated label for sip field. 358 Return translated label for sip field.
364 */ 359 */
365 static QString sipLabel(); 360 static QString sipLabel();
366 361
367 /** 362 /**
368 Return translated label for email field. 363 Return translated label for email field.
369 */ 364 */
370 static QString emailLabel(); 365 static QString emailLabel();
371 366
372 /** 367 /**
373 Set mail client. 368 Set mail client.
374 */ 369 */
375 void setMailer( const QString &mailer ); 370 void setMailer( const QString &mailer );
376 /** 371 /**
377 Return mail client. 372 Return mail client.
378 */ 373 */
379 QString mailer() const; 374 QString mailer() const;
380 /** 375 /**
381 Return translated label for mailer field. 376 Return translated label for mailer field.
382 */ 377 */
383 static QString mailerLabel(); 378 static QString mailerLabel();
384 379
385 /** 380 /**
386 Set time zone. 381 Set time zone.
387 */ 382 */
388 void setTimeZone( const TimeZone &timeZone ); 383 void setTimeZone( const TimeZone &timeZone );
389 /** 384 /**
390 Return time zone. 385 Return time zone.
391 */ 386 */
392 TimeZone timeZone() const; 387 TimeZone timeZone() const;
393 /** 388 /**
394 Return translated label for timeZone field. 389 Return translated label for timeZone field.
395 */ 390 */
396 static QString timeZoneLabel(); 391 static QString timeZoneLabel();
397 392
398 /** 393 /**
399 Set geographic position. 394 Set geographic position.
400 */ 395 */
401 void setGeo( const Geo &geo ); 396 void setGeo( const Geo &geo );
402 /** 397 /**
403 Return geographic position. 398 Return geographic position.
404 */ 399 */
405 Geo geo() const; 400 Geo geo() const;
406 /** 401 /**
407 Return translated label for geo field. 402 Return translated label for geo field.
408 */ 403 */
409 static QString geoLabel(); 404 static QString geoLabel();
410 405
411 /** 406 /**
412 Set title. 407 Set title.
413 */ 408 */
414 void setTitle( const QString &title ); 409 void setTitle( const QString &title );
415 /** 410 /**
416 Return title. 411 Return title.
417 */ 412 */
418 QString title() const; 413 QString title() const;
419 /** 414 /**
420 Return translated label for title field. 415 Return translated label for title field.
421 */ 416 */
422 static QString titleLabel(); 417 static QString titleLabel();
423 418
424 /** 419 /**
425 Set role. 420 Set role.
426 */ 421 */
427 void setRole( const QString &role ); 422 void setRole( const QString &role );
428 /** 423 /**
429 Return role. 424 Return role.
430 */ 425 */
431 QString role() const; 426 QString role() const;
432 /** 427 /**
433 Return translated label for role field. 428 Return translated label for role field.
434 */ 429 */
435 static QString roleLabel(); 430 static QString roleLabel();
436 431
437 /** 432 /**
438 Set organization. 433 Set organization.
439 */ 434 */
440 void setOrganization( const QString &organization ); 435 void setOrganization( const QString &organization );
441 /** 436 /**
442 Return organization. 437 Return organization.
443 */ 438 */
444 QString organization() const; 439 QString organization() const;
445 /** 440 /**
446 Return translated label for organization field. 441 Return translated label for organization field.
447 */ 442 */
diff --git a/kabc/field.cpp b/kabc/field.cpp
index 6f2b307..7c6d7a9 100644
--- a/kabc/field.cpp
+++ b/kabc/field.cpp
@@ -1,534 +1,522 @@
1/*** Warning! This file has been generated by the script makeaddressee ***/ 1/*** Warning! This file has been generated by the script makeaddressee ***/
2/* 2/*
3 This file is part of libkabc. 3 This file is part of libkabc.
4 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2002 Cornelius Schumacher <schumacher@kde.org>
5 5
6 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public 7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either 8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version. 9 version 2 of the License, or (at your option) any later version.
10 10
11 This library is distributed in the hope that it will be useful, 11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details. 14 Library General Public License for more details.
15 15
16 You should have received a copy of the GNU Library General Public License 16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to 17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. 19 Boston, MA 02111-1307, USA.
20*/ 20*/
21 21
22/* 22/*
23Enhanced Version of the file for platform independent KDE tools. 23Enhanced Version of the file for platform independent KDE tools.
24Copyright (c) 2004 Ulf Schenk 24Copyright (c) 2004 Ulf Schenk
25 25
26$Id$ 26$Id$
27*/ 27*/
28 28
29#include <klocale.h> 29#include <klocale.h>
30#include <kconfig.h> 30#include <kconfig.h>
31#include <kconfigbase.h> 31#include <kconfigbase.h>
32#include <kglobal.h> 32#include <kglobal.h>
33 33
34#include "field.h" 34#include "field.h"
35#include "resource.h" 35#include "resource.h"
36 36
37using namespace KABC; 37using namespace KABC;
38 38
39class Field::FieldImpl 39class Field::FieldImpl
40{ 40{
41 public: 41 public:
42 FieldImpl( int fieldId, int category = 0, 42 FieldImpl( int fieldId, int category = 0,
43 const QString &label = QString::null, 43 const QString &label = QString::null,
44 const QString &key = QString::null, 44 const QString &key = QString::null,
45 const QString &app = QString::null ) 45 const QString &app = QString::null )
46 : mFieldId( fieldId ), mCategory( category ), mLabel( label ), 46 : mFieldId( fieldId ), mCategory( category ), mLabel( label ),
47 mKey( key ), mApp( app ) {} 47 mKey( key ), mApp( app ) {}
48 48
49 enum FieldId 49 enum FieldId
50 { 50 {
51 CustomField, 51 CustomField,
52 FormattedName, 52 FormattedName,
53 FamilyName, 53 FamilyName,
54 GivenName, 54 GivenName,
55 AdditionalName, 55 AdditionalName,
56 Prefix, 56 Prefix,
57 Suffix, 57 Suffix,
58 NickName, 58 NickName,
59 Birthday, 59 Birthday,
60 Category, 60 Category,
61 HomeAddressStreet, 61 HomeAddressStreet,
62 HomeAddressLocality, 62 HomeAddressLocality,
63 HomeAddressRegion, 63 HomeAddressRegion,
64 HomeAddressPostalCode, 64 HomeAddressPostalCode,
65 HomeAddressCountry, 65 HomeAddressCountry,
66 HomeAddressLabel, 66 HomeAddressLabel,
67 BusinessAddressStreet, 67 BusinessAddressStreet,
68 BusinessAddressLocality, 68 BusinessAddressLocality,
69 BusinessAddressRegion, 69 BusinessAddressRegion,
70 BusinessAddressPostalCode, 70 BusinessAddressPostalCode,
71 BusinessAddressCountry, 71 BusinessAddressCountry,
72 BusinessAddressLabel, 72 BusinessAddressLabel,
73 HomePhone, 73 HomePhone,
74 BusinessPhone, 74 BusinessPhone,
75 MobilePhone, 75 MobilePhone,
76 HomeFax, 76 HomeFax,
77 BusinessFax, 77 BusinessFax,
78 CarPhone,
79 Isdn, 78 Isdn,
80 Pager, 79 Pager,
81 Email, 80 Email,
82 Mailer, 81 Mailer,
83 Title, 82 Title,
84 Role, 83 Role,
85 Organization, 84 Organization,
86 Note, 85 Note,
87 Url, 86 Url,
88 Resource, 87 Resource,
89 Sip, 88 Sip,
90 MobileWorkPhone, 89 MobileWorkPhone,
91 MobileHomePhone,
92 OtherPhone 90 OtherPhone
93 }; 91 };
94 92
95 int fieldId() { return mFieldId; } 93 int fieldId() { return mFieldId; }
96 int category() { return mCategory; } 94 int category() { return mCategory; }
97 95
98 QString label() { return mLabel; } 96 QString label() { return mLabel; }
99 QString key() { return mKey; } 97 QString key() { return mKey; }
100 QString app() { return mApp; } 98 QString app() { return mApp; }
101 99
102 private: 100 private:
103 int mFieldId; 101 int mFieldId;
104 int mCategory; 102 int mCategory;
105 103
106 QString mLabel; 104 QString mLabel;
107 QString mKey; 105 QString mKey;
108 QString mApp; 106 QString mApp;
109}; 107};
110 108
111 109
112Field::List Field::mAllFields; 110Field::List Field::mAllFields;
113Field::List Field::mDefaultFields; 111Field::List Field::mDefaultFields;
114Field::List Field::mCustomFields; 112Field::List Field::mCustomFields;
115 113
116 114
117Field::Field( FieldImpl *impl ) 115Field::Field( FieldImpl *impl )
118{ 116{
119 mImpl = impl; 117 mImpl = impl;
120} 118}
121 119
122Field::~Field() 120Field::~Field()
123{ 121{
124 delete mImpl; 122 delete mImpl;
125} 123}
126 124
127QString Field::label() 125QString Field::label()
128{ 126{
129 switch ( mImpl->fieldId() ) { 127 switch ( mImpl->fieldId() ) {
130 case FieldImpl::FormattedName: 128 case FieldImpl::FormattedName:
131 return Addressee::formattedNameLabel(); 129 return Addressee::formattedNameLabel();
132 case FieldImpl::FamilyName: 130 case FieldImpl::FamilyName:
133 return Addressee::familyNameLabel(); 131 return Addressee::familyNameLabel();
134 case FieldImpl::GivenName: 132 case FieldImpl::GivenName:
135 return Addressee::givenNameLabel(); 133 return Addressee::givenNameLabel();
136 case FieldImpl::AdditionalName: 134 case FieldImpl::AdditionalName:
137 return Addressee::additionalNameLabel(); 135 return Addressee::additionalNameLabel();
138 case FieldImpl::Prefix: 136 case FieldImpl::Prefix:
139 return Addressee::prefixLabel(); 137 return Addressee::prefixLabel();
140 case FieldImpl::Suffix: 138 case FieldImpl::Suffix:
141 return Addressee::suffixLabel(); 139 return Addressee::suffixLabel();
142 case FieldImpl::NickName: 140 case FieldImpl::NickName:
143 return Addressee::nickNameLabel(); 141 return Addressee::nickNameLabel();
144 case FieldImpl::Birthday: 142 case FieldImpl::Birthday:
145 return Addressee::birthdayLabel(); 143 return Addressee::birthdayLabel();
146 case FieldImpl::HomeAddressStreet: 144 case FieldImpl::HomeAddressStreet:
147 return Addressee::homeAddressStreetLabel(); 145 return Addressee::homeAddressStreetLabel();
148 case FieldImpl::HomeAddressLocality: 146 case FieldImpl::HomeAddressLocality:
149 return Addressee::homeAddressLocalityLabel(); 147 return Addressee::homeAddressLocalityLabel();
150 case FieldImpl::HomeAddressRegion: 148 case FieldImpl::HomeAddressRegion:
151 return Addressee::homeAddressRegionLabel(); 149 return Addressee::homeAddressRegionLabel();
152 case FieldImpl::HomeAddressPostalCode: 150 case FieldImpl::HomeAddressPostalCode:
153 return Addressee::homeAddressPostalCodeLabel(); 151 return Addressee::homeAddressPostalCodeLabel();
154 case FieldImpl::HomeAddressCountry: 152 case FieldImpl::HomeAddressCountry:
155 return Addressee::homeAddressCountryLabel(); 153 return Addressee::homeAddressCountryLabel();
156 case FieldImpl::HomeAddressLabel: 154 case FieldImpl::HomeAddressLabel:
157 return Addressee::homeAddressLabelLabel(); 155 return Addressee::homeAddressLabelLabel();
158 case FieldImpl::BusinessAddressStreet: 156 case FieldImpl::BusinessAddressStreet:
159 return Addressee::businessAddressStreetLabel(); 157 return Addressee::businessAddressStreetLabel();
160 case FieldImpl::BusinessAddressLocality: 158 case FieldImpl::BusinessAddressLocality:
161 return Addressee::businessAddressLocalityLabel(); 159 return Addressee::businessAddressLocalityLabel();
162 case FieldImpl::BusinessAddressRegion: 160 case FieldImpl::BusinessAddressRegion:
163 return Addressee::businessAddressRegionLabel(); 161 return Addressee::businessAddressRegionLabel();
164 case FieldImpl::BusinessAddressPostalCode: 162 case FieldImpl::BusinessAddressPostalCode:
165 return Addressee::businessAddressPostalCodeLabel(); 163 return Addressee::businessAddressPostalCodeLabel();
166 case FieldImpl::BusinessAddressCountry: 164 case FieldImpl::BusinessAddressCountry:
167 return Addressee::businessAddressCountryLabel(); 165 return Addressee::businessAddressCountryLabel();
168 case FieldImpl::BusinessAddressLabel: 166 case FieldImpl::BusinessAddressLabel:
169 return Addressee::businessAddressLabelLabel(); 167 return Addressee::businessAddressLabelLabel();
170 case FieldImpl::HomePhone: 168 case FieldImpl::HomePhone:
171 return Addressee::homePhoneLabel(); 169 return Addressee::homePhoneLabel();
172 case FieldImpl::BusinessPhone: 170 case FieldImpl::BusinessPhone:
173 return Addressee::businessPhoneLabel(); 171 return Addressee::businessPhoneLabel();
174 case FieldImpl::MobilePhone: 172 case FieldImpl::MobilePhone:
175 return Addressee::mobilePhoneLabel(); 173 return Addressee::mobilePhoneLabel();
176 case FieldImpl::MobileHomePhone:
177 return Addressee::mobileHomePhoneLabel();
178 case FieldImpl::MobileWorkPhone: 174 case FieldImpl::MobileWorkPhone:
179 return Addressee::mobileWorkPhoneLabel(); 175 return Addressee::mobileWorkPhoneLabel();
180 case FieldImpl::HomeFax: 176 case FieldImpl::HomeFax:
181 return Addressee::homeFaxLabel(); 177 return Addressee::homeFaxLabel();
182 case FieldImpl::BusinessFax: 178 case FieldImpl::BusinessFax:
183 return Addressee::businessFaxLabel(); 179 return Addressee::businessFaxLabel();
184 case FieldImpl::CarPhone:
185 return Addressee::carPhoneLabel();
186 case FieldImpl::Isdn: 180 case FieldImpl::Isdn:
187 return Addressee::isdnLabel(); 181 return Addressee::isdnLabel();
188 case FieldImpl::Pager: 182 case FieldImpl::Pager:
189 return Addressee::pagerLabel(); 183 return Addressee::pagerLabel();
190 case FieldImpl::Email: 184 case FieldImpl::Email:
191 return Addressee::emailLabel(); 185 return Addressee::emailLabel();
192 case FieldImpl::Mailer: 186 case FieldImpl::Mailer:
193 return Addressee::mailerLabel(); 187 return Addressee::mailerLabel();
194 case FieldImpl::Title: 188 case FieldImpl::Title:
195 return Addressee::titleLabel(); 189 return Addressee::titleLabel();
196 case FieldImpl::Role: 190 case FieldImpl::Role:
197 return Addressee::roleLabel(); 191 return Addressee::roleLabel();
198 case FieldImpl::Organization: 192 case FieldImpl::Organization:
199 return Addressee::organizationLabel(); 193 return Addressee::organizationLabel();
200 case FieldImpl::Note: 194 case FieldImpl::Note:
201 return Addressee::noteLabel(); 195 return Addressee::noteLabel();
202 case FieldImpl::Url: 196 case FieldImpl::Url:
203 return Addressee::urlLabel(); 197 return Addressee::urlLabel();
204 case FieldImpl::Resource: 198 case FieldImpl::Resource:
205 return Addressee::resourceLabel(); 199 return Addressee::resourceLabel();
206 case FieldImpl::Category: 200 case FieldImpl::Category:
207 return Addressee::categoryLabel(); 201 return Addressee::categoryLabel();
208 case FieldImpl::Sip: 202 case FieldImpl::Sip:
209 return Addressee::sipLabel(); 203 return Addressee::sipLabel();
210 case FieldImpl::OtherPhone: 204 case FieldImpl::OtherPhone:
211 return Addressee::otherPhoneLabel(); 205 return Addressee::otherPhoneLabel();
212 case FieldImpl::CustomField: 206 case FieldImpl::CustomField:
213 return mImpl->label(); 207 return mImpl->label();
214 default: 208 default:
215 return i18n("Unknown Field"); 209 return i18n("Unknown Field");
216 } 210 }
217} 211}
218 212
219int Field::category() 213int Field::category()
220{ 214{
221 return mImpl->category(); 215 return mImpl->category();
222} 216}
223 217
224QString Field::categoryLabel( int category ) 218QString Field::categoryLabel( int category )
225{ 219{
226 switch ( category ) { 220 switch ( category ) {
227 case All: 221 case All:
228 return i18n("All"); 222 return i18n("All");
229 case Frequent: 223 case Frequent:
230 return i18n("Frequent"); 224 return i18n("Frequent");
231 case Address: 225 case Address:
232 return i18n("Address"); 226 return i18n("Address");
233 case Email: 227 case Email:
234 return i18n("Email"); 228 return i18n("Email");
235 case Personal: 229 case Personal:
236 return i18n("Personal"); 230 return i18n("Personal");
237 case Organization: 231 case Organization:
238 return i18n("Organization"); 232 return i18n("Organization");
239 case CustomCategory: 233 case CustomCategory:
240 return i18n("Custom"); 234 return i18n("Custom");
241 default: 235 default:
242 return i18n("Undefined"); 236 return i18n("Undefined");
243 } 237 }
244} 238}
245 239
246QString Field::value( const KABC::Addressee &a ) 240QString Field::value( const KABC::Addressee &a )
247{ 241{
248 switch ( mImpl->fieldId() ) { 242 switch ( mImpl->fieldId() ) {
249 case FieldImpl::FormattedName: 243 case FieldImpl::FormattedName:
250 return a.formattedName(); 244 return a.formattedName();
251 case FieldImpl::FamilyName: 245 case FieldImpl::FamilyName:
252 return a.familyName(); 246 return a.familyName();
253 case FieldImpl::GivenName: 247 case FieldImpl::GivenName:
254 return a.givenName(); 248 return a.givenName();
255 case FieldImpl::AdditionalName: 249 case FieldImpl::AdditionalName:
256 return a.additionalName(); 250 return a.additionalName();
257 case FieldImpl::Prefix: 251 case FieldImpl::Prefix:
258 return a.prefix(); 252 return a.prefix();
259 case FieldImpl::Suffix: 253 case FieldImpl::Suffix:
260 return a.suffix(); 254 return a.suffix();
261 case FieldImpl::NickName: 255 case FieldImpl::NickName:
262 return a.nickName(); 256 return a.nickName();
263 case FieldImpl::Mailer: 257 case FieldImpl::Mailer:
264 return a.mailer(); 258 return a.mailer();
265 case FieldImpl::Title: 259 case FieldImpl::Title:
266 return a.title(); 260 return a.title();
267 case FieldImpl::Role: 261 case FieldImpl::Role:
268 return a.role(); 262 return a.role();
269 case FieldImpl::Organization: 263 case FieldImpl::Organization:
270 return a.organization(); 264 return a.organization();
271 case FieldImpl::Note: 265 case FieldImpl::Note:
272 return a.note(); 266 return a.note();
273 case FieldImpl::Email: 267 case FieldImpl::Email:
274 return a.preferredEmail(); 268 return a.preferredEmail();
275 case FieldImpl::Birthday: 269 case FieldImpl::Birthday:
276 if ( a.birthday().isValid() ) { 270 if ( a.birthday().isValid() ) {
277//the generated code had the following format: return a.birthday().date().toString( Qt::ISODate ); 271//the generated code had the following format: return a.birthday().date().toString( Qt::ISODate );
278// But Qt::IsoDate was not specified. 272// But Qt::IsoDate was not specified.
279// QString _oldFormat = KGlobal::locale()->dateFormat(); 273// QString _oldFormat = KGlobal::locale()->dateFormat();
280// KGlobal::locale()->setDateFormat("%Y-%m-%d"); // = Qt::ISODate 274// KGlobal::locale()->setDateFormat("%Y-%m-%d"); // = Qt::ISODate
281 QString dt = KGlobal::locale()->formatDate(a.birthday().date(), false, KLocale::ISODate); 275 QString dt = KGlobal::locale()->formatDate(a.birthday().date(), false, KLocale::ISODate);
282// KGlobal::locale()->setDateFormat(_oldFormat); 276// KGlobal::locale()->setDateFormat(_oldFormat);
283 return dt; 277 return dt;
284 } 278 }
285 else 279 else
286 return QString::null; 280 return QString::null;
287 case FieldImpl::Url: 281 case FieldImpl::Url:
288 return a.url().prettyURL(); 282 return a.url().prettyURL();
289//US 283//US
290 case FieldImpl::Resource: 284 case FieldImpl::Resource:
291 return a.resource()->resourceName(); 285 return a.resource()->resourceName();
292 case FieldImpl::Category: 286 case FieldImpl::Category:
293 return a.categories().join(","); 287 return a.categories().join(",");
294 case FieldImpl::HomePhone: 288 case FieldImpl::HomePhone:
295 return a.phoneNumber( PhoneNumber::Home| PhoneNumber::Pref ).number(); 289 return a.phoneNumber( PhoneNumber::Home| PhoneNumber::Pref ).number();
296 case FieldImpl::BusinessPhone: 290 case FieldImpl::BusinessPhone:
297 return a.phoneNumber( PhoneNumber::Work| PhoneNumber::Pref ).number(); 291 return a.phoneNumber( PhoneNumber::Work| PhoneNumber::Pref ).number();
298 case FieldImpl::MobilePhone: 292 case FieldImpl::MobilePhone:
299 return a.phoneNumber( PhoneNumber::Cell ).number(); 293 return a.phoneNumber( PhoneNumber::Cell ).number();
300 case FieldImpl::MobileWorkPhone: 294 case FieldImpl::MobileWorkPhone:
301 return a.phoneNumber( PhoneNumber::Car ).number(); 295 return a.phoneNumber( PhoneNumber::Car ).number();
302 case FieldImpl::MobileHomePhone:
303 return a.phoneNumber( PhoneNumber::Cell ).number();
304 case FieldImpl::HomeFax: 296 case FieldImpl::HomeFax:
305 return a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ).number(); 297 return a.phoneNumber( PhoneNumber::Home | PhoneNumber::Fax ).number();
306 case FieldImpl::BusinessFax: 298 case FieldImpl::BusinessFax:
307 return a.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ).number(); 299 return a.phoneNumber( PhoneNumber::Work | PhoneNumber::Fax ).number();
308 case FieldImpl::CarPhone:
309 return a.phoneNumber( PhoneNumber::Car ).number();
310 case FieldImpl::Isdn: 300 case FieldImpl::Isdn:
311 return a.phoneNumber( PhoneNumber::Isdn ).number(); 301 return a.phoneNumber( PhoneNumber::Isdn ).number();
312 case FieldImpl::Pager: 302 case FieldImpl::Pager:
313 return a.phoneNumber( PhoneNumber::Pager ).number(); 303 return a.phoneNumber( PhoneNumber::Pager ).number();
314 case FieldImpl::Sip: 304 case FieldImpl::Sip:
315 return a.phoneNumber( PhoneNumber::Pcs | PhoneNumber::Pref ).number(); 305 return a.phoneNumber( PhoneNumber::Pcs | PhoneNumber::Pref ).number();
316 case FieldImpl::OtherPhone: 306 case FieldImpl::OtherPhone:
317 return a.phoneNumber( PhoneNumber::Voice ).number(); 307 return a.phoneNumber( PhoneNumber::Voice ).number();
318 case FieldImpl::HomeAddressStreet: 308 case FieldImpl::HomeAddressStreet:
319 return a.address( Address::Home ).street(); 309 return a.address( Address::Home ).street();
320 case FieldImpl::HomeAddressLocality: 310 case FieldImpl::HomeAddressLocality:
321 return a.address( Address::Home ).locality(); 311 return a.address( Address::Home ).locality();
322 case FieldImpl::HomeAddressRegion: 312 case FieldImpl::HomeAddressRegion:
323 return a.address( Address::Home ).region(); 313 return a.address( Address::Home ).region();
324 case FieldImpl::HomeAddressPostalCode: 314 case FieldImpl::HomeAddressPostalCode:
325 return a.address( Address::Home ).postalCode(); 315 return a.address( Address::Home ).postalCode();
326 case FieldImpl::HomeAddressCountry: 316 case FieldImpl::HomeAddressCountry:
327 return a.address( Address::Home ).country(); 317 return a.address( Address::Home ).country();
328 case FieldImpl::BusinessAddressStreet: 318 case FieldImpl::BusinessAddressStreet:
329 return a.address( Address::Work ).street(); 319 return a.address( Address::Work ).street();
330 case FieldImpl::BusinessAddressLocality: 320 case FieldImpl::BusinessAddressLocality:
331 return a.address( Address::Work ).locality(); 321 return a.address( Address::Work ).locality();
332 case FieldImpl::BusinessAddressRegion: 322 case FieldImpl::BusinessAddressRegion:
333 return a.address( Address::Work ).region(); 323 return a.address( Address::Work ).region();
334 case FieldImpl::BusinessAddressPostalCode: 324 case FieldImpl::BusinessAddressPostalCode:
335 return a.address( Address::Work ).postalCode(); 325 return a.address( Address::Work ).postalCode();
336 case FieldImpl::BusinessAddressCountry: 326 case FieldImpl::BusinessAddressCountry:
337 return a.address( Address::Work ).country(); 327 return a.address( Address::Work ).country();
338 case FieldImpl::CustomField: 328 case FieldImpl::CustomField:
339 return a.custom( mImpl->app(), mImpl->key() ); 329 return a.custom( mImpl->app(), mImpl->key() );
340 default: 330 default:
341 return QString::null; 331 return QString::null;
342 } 332 }
343} 333}
344 334
345bool Field::setValue( KABC::Addressee &a, const QString &value ) 335bool Field::setValue( KABC::Addressee &a, const QString &value )
346{ 336{
347 switch ( mImpl->fieldId() ) { 337 switch ( mImpl->fieldId() ) {
348 case FieldImpl::FormattedName: 338 case FieldImpl::FormattedName:
349 a.setFormattedName( value ); 339 a.setFormattedName( value );
350 return true; 340 return true;
351 case FieldImpl::FamilyName: 341 case FieldImpl::FamilyName:
352 a.setFamilyName( value ); 342 a.setFamilyName( value );
353 return true; 343 return true;
354 case FieldImpl::GivenName: 344 case FieldImpl::GivenName:
355 a.setGivenName( value ); 345 a.setGivenName( value );
356 return true; 346 return true;
357 case FieldImpl::AdditionalName: 347 case FieldImpl::AdditionalName:
358 a.setAdditionalName( value ); 348 a.setAdditionalName( value );
359 return true; 349 return true;
360 case FieldImpl::Prefix: 350 case FieldImpl::Prefix:
361 a.setPrefix( value ); 351 a.setPrefix( value );
362 return true; 352 return true;
363 case FieldImpl::Suffix: 353 case FieldImpl::Suffix:
364 a.setSuffix( value ); 354 a.setSuffix( value );
365 return true; 355 return true;
366 case FieldImpl::NickName: 356 case FieldImpl::NickName:
367 a.setNickName( value ); 357 a.setNickName( value );
368 return true; 358 return true;
369 case FieldImpl::Mailer: 359 case FieldImpl::Mailer:
370 a.setMailer( value ); 360 a.setMailer( value );
371 return true; 361 return true;
372 case FieldImpl::Title: 362 case FieldImpl::Title:
373 a.setTitle( value ); 363 a.setTitle( value );
374 return true; 364 return true;
375 case FieldImpl::Role: 365 case FieldImpl::Role:
376 a.setRole( value ); 366 a.setRole( value );
377 return true; 367 return true;
378 case FieldImpl::Organization: 368 case FieldImpl::Organization:
379 a.setOrganization( value ); 369 a.setOrganization( value );
380 return true; 370 return true;
381 case FieldImpl::Note: 371 case FieldImpl::Note:
382 a.setNote( value ); 372 a.setNote( value );
383 return true; 373 return true;
384 case FieldImpl::Birthday: 374 case FieldImpl::Birthday:
385//US 375//US
386//the generated code had the following format: return a.setBirthday( QDate::fromString( value, Qt::ISODate ) ); 376//the generated code had the following format: return a.setBirthday( QDate::fromString( value, Qt::ISODate ) );
387// But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ? 377// But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ?
388 { 378 {
389 QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate 379 QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate
390 a.setBirthday(dt); 380 a.setBirthday(dt);
391 } 381 }
392 return true; 382 return true;
393 case FieldImpl::CustomField: 383 case FieldImpl::CustomField:
394 a.insertCustom( mImpl->app(), mImpl->key(), value ); 384 a.insertCustom( mImpl->app(), mImpl->key(), value );
395//US never copy the resourcename back to the adressee. 385//US never copy the resourcename back to the adressee.
396 case FieldImpl::Resource: 386 case FieldImpl::Resource:
397 default: 387 default:
398 return false; 388 return false;
399 } 389 }
400} 390}
401 391
402bool Field::isCustom() 392bool Field::isCustom()
403{ 393{
404 return mImpl->fieldId() == FieldImpl::CustomField; 394 return mImpl->fieldId() == FieldImpl::CustomField;
405} 395}
406 396
407Field::List Field::allFields() 397Field::List Field::allFields()
408{ 398{
409 if ( mAllFields.isEmpty() ) { 399 if ( mAllFields.isEmpty() ) {
410 createField( FieldImpl::FormattedName, Frequent ); 400 createField( FieldImpl::FormattedName, Frequent );
411 createField( FieldImpl::FamilyName, Frequent ); 401 createField( FieldImpl::FamilyName, Frequent );
412 createField( FieldImpl::GivenName, Frequent ); 402 createField( FieldImpl::GivenName, Frequent );
413 createField( FieldImpl::AdditionalName ); 403 createField( FieldImpl::AdditionalName );
414 createField( FieldImpl::Prefix ); 404 createField( FieldImpl::Prefix );
415 createField( FieldImpl::Suffix ); 405 createField( FieldImpl::Suffix );
416 createField( FieldImpl::NickName, Personal ); 406 createField( FieldImpl::NickName, Personal );
417 createField( FieldImpl::Birthday, Personal ); 407 createField( FieldImpl::Birthday, Personal );
418 createField( FieldImpl::Category ); 408 createField( FieldImpl::Category );
419 createField( FieldImpl::HomeAddressStreet, Address|Personal ); 409 createField( FieldImpl::HomeAddressStreet, Address|Personal );
420 createField( FieldImpl::HomeAddressLocality, Address|Personal ); 410 createField( FieldImpl::HomeAddressLocality, Address|Personal );
421 createField( FieldImpl::HomeAddressRegion, Address|Personal ); 411 createField( FieldImpl::HomeAddressRegion, Address|Personal );
422 createField( FieldImpl::HomeAddressPostalCode, Address|Personal ); 412 createField( FieldImpl::HomeAddressPostalCode, Address|Personal );
423 createField( FieldImpl::HomeAddressCountry, Address|Personal ); 413 createField( FieldImpl::HomeAddressCountry, Address|Personal );
424 createField( FieldImpl::HomeAddressLabel, Address|Personal ); 414 createField( FieldImpl::HomeAddressLabel, Address|Personal );
425 createField( FieldImpl::BusinessAddressStreet, Address|Organization ); 415 createField( FieldImpl::BusinessAddressStreet, Address|Organization );
426 createField( FieldImpl::BusinessAddressLocality, Address|Organization ); 416 createField( FieldImpl::BusinessAddressLocality, Address|Organization );
427 createField( FieldImpl::BusinessAddressRegion, Address|Organization ); 417 createField( FieldImpl::BusinessAddressRegion, Address|Organization );
428 createField( FieldImpl::BusinessAddressPostalCode, Address|Organization ); 418 createField( FieldImpl::BusinessAddressPostalCode, Address|Organization );
429 createField( FieldImpl::BusinessAddressCountry, Address|Organization ); 419 createField( FieldImpl::BusinessAddressCountry, Address|Organization );
430 createField( FieldImpl::BusinessAddressLabel, Address|Organization ); 420 createField( FieldImpl::BusinessAddressLabel, Address|Organization );
431 createField( FieldImpl::HomePhone, Personal|Frequent ); 421 createField( FieldImpl::HomePhone, Personal|Frequent );
432 createField( FieldImpl::BusinessPhone, Organization|Frequent ); 422 createField( FieldImpl::BusinessPhone, Organization|Frequent );
433 createField( FieldImpl::MobilePhone, Frequent ); 423 createField( FieldImpl::MobilePhone, Frequent );
434 createField( FieldImpl::MobileHomePhone, Frequent );
435 createField( FieldImpl::MobileWorkPhone, Frequent ); 424 createField( FieldImpl::MobileWorkPhone, Frequent );
436 createField( FieldImpl::HomeFax ); 425 createField( FieldImpl::HomeFax );
437 createField( FieldImpl::BusinessFax ); 426 createField( FieldImpl::BusinessFax );
438 createField( FieldImpl::CarPhone );
439 createField( FieldImpl::Isdn ); 427 createField( FieldImpl::Isdn );
440 createField( FieldImpl::Pager ); 428 createField( FieldImpl::Pager );
441 createField( FieldImpl::Email, Email|Frequent ); 429 createField( FieldImpl::Email, Email|Frequent );
442 createField( FieldImpl::Mailer, Email ); 430 createField( FieldImpl::Mailer, Email );
443 createField( FieldImpl::Title, Organization ); 431 createField( FieldImpl::Title, Organization );
444 createField( FieldImpl::Role, Organization ); 432 createField( FieldImpl::Role, Organization );
445 createField( FieldImpl::Organization, Organization ); 433 createField( FieldImpl::Organization, Organization );
446 createField( FieldImpl::Note ); 434 createField( FieldImpl::Note );
447 createField( FieldImpl::Url ); 435 createField( FieldImpl::Url );
448 createField( FieldImpl::Resource ); 436 createField( FieldImpl::Resource );
449 createField( FieldImpl::Sip ); 437 createField( FieldImpl::Sip );
450 createField( FieldImpl::OtherPhone ); 438 createField( FieldImpl::OtherPhone );
451 } 439 }
452 440
453 return mAllFields; 441 return mAllFields;
454} 442}
455 443
456Field::List Field::defaultFields() 444Field::List Field::defaultFields()
457{ 445{
458 if ( mDefaultFields.isEmpty() ) { 446 if ( mDefaultFields.isEmpty() ) {
459 createDefaultField( FieldImpl::GivenName ); 447 createDefaultField( FieldImpl::GivenName );
460 createDefaultField( FieldImpl::FamilyName ); 448 createDefaultField( FieldImpl::FamilyName );
461 createDefaultField( FieldImpl::Email ); 449 createDefaultField( FieldImpl::Email );
462 } 450 }
463 451
464 return mDefaultFields; 452 return mDefaultFields;
465} 453}
466 454
467void Field::createField( int id, int category ) 455void Field::createField( int id, int category )
468{ 456{
469 mAllFields.append( new Field( new FieldImpl( id, category ) ) ); 457 mAllFields.append( new Field( new FieldImpl( id, category ) ) );
470} 458}
471 459
472void Field::createDefaultField( int id, int category ) 460void Field::createDefaultField( int id, int category )
473{ 461{
474 mDefaultFields.append( new Field( new FieldImpl( id, category ) ) ); 462 mDefaultFields.append( new Field( new FieldImpl( id, category ) ) );
475} 463}
476 464
477void Field::deleteFields() 465void Field::deleteFields()
478{ 466{
479 Field::List::ConstIterator it; 467 Field::List::ConstIterator it;
480 468
481 for( it = mAllFields.begin(); it != mAllFields.end(); ++it ) { 469 for( it = mAllFields.begin(); it != mAllFields.end(); ++it ) {
482 delete (*it); 470 delete (*it);
483 } 471 }
484 mAllFields.clear(); 472 mAllFields.clear();
485 473
486 for( it = mDefaultFields.begin(); it != mDefaultFields.end(); ++it ) { 474 for( it = mDefaultFields.begin(); it != mDefaultFields.end(); ++it ) {
487 delete (*it); 475 delete (*it);
488 } 476 }
489 mDefaultFields.clear(); 477 mDefaultFields.clear();
490 478
491 for( it = mCustomFields.begin(); it != mCustomFields.end(); ++it ) { 479 for( it = mCustomFields.begin(); it != mCustomFields.end(); ++it ) {
492 delete (*it); 480 delete (*it);
493 } 481 }
494 mCustomFields.clear(); 482 mCustomFields.clear();
495} 483}
496 484
497void Field::saveFields( const QString &identifier, 485void Field::saveFields( const QString &identifier,
498 const Field::List &fields ) 486 const Field::List &fields )
499{ 487{
500 KConfig *cfg = KGlobal::config(); 488 KConfig *cfg = KGlobal::config();
501 KConfigGroupSaver( cfg, "KABCFields" ); 489 KConfigGroupSaver( cfg, "KABCFields" );
502 saveFields( cfg, identifier, fields ); 490 saveFields( cfg, identifier, fields );
503} 491}
504 492
505void Field::saveFields( KConfig *cfg, const QString &identifier, 493void Field::saveFields( KConfig *cfg, const QString &identifier,
506 const Field::List &fields ) 494 const Field::List &fields )
507{ 495{
508 QValueList<int> fieldIds; 496 QValueList<int> fieldIds;
509 497
510//US 498//US
511// qDebug("Field::saveFields to %s %s", cfg->getFileName().latin1(), identifier.latin1()); 499// qDebug("Field::saveFields to %s %s", cfg->getFileName().latin1(), identifier.latin1());
512 500
513 int custom = 0; 501 int custom = 0;
514 Field::List::ConstIterator it; 502 Field::List::ConstIterator it;
515 for( it = fields.begin(); it != fields.end(); ++it ) { 503 for( it = fields.begin(); it != fields.end(); ++it ) {
516//US 504//US
517// qDebug("Field::saveFields field:%i", (*it)->mImpl->fieldId()); 505// qDebug("Field::saveFields field:%i", (*it)->mImpl->fieldId());
518 506
519 fieldIds.append( (*it)->mImpl->fieldId() ); 507 fieldIds.append( (*it)->mImpl->fieldId() );
520 if( (*it)->isCustom() ) { 508 if( (*it)->isCustom() ) {
521 QStringList customEntry; 509 QStringList customEntry;
522 customEntry << (*it)->mImpl->label(); 510 customEntry << (*it)->mImpl->label();
523 customEntry << (*it)->mImpl->key(); 511 customEntry << (*it)->mImpl->key();
524 customEntry << (*it)->mImpl->app(); 512 customEntry << (*it)->mImpl->app();
525 cfg->writeEntry( "KABC_CustomEntry_" + identifier + "_" + 513 cfg->writeEntry( "KABC_CustomEntry_" + identifier + "_" +
526 QString::number( custom++ ), customEntry ); 514 QString::number( custom++ ), customEntry );
527 } 515 }
528 } 516 }
529 cfg->writeEntry( identifier, fieldIds ); 517 cfg->writeEntry( identifier, fieldIds );
530} 518}
531 519
532Field::List Field::restoreFields( const QString &identifier ) 520Field::List Field::restoreFields( const QString &identifier )
533{ 521{
534//US 522//US
diff --git a/kabc/phonenumber.cpp b/kabc/phonenumber.cpp
index 90cc4cf..6db1bcf 100644
--- a/kabc/phonenumber.cpp
+++ b/kabc/phonenumber.cpp
@@ -140,230 +140,230 @@ void PhoneNumber::simplifyType()
140 else if ( mType & Cell ) mType = Cell; 140 else if ( mType & Cell ) mType = Cell;
141 else if ( mType & Work ) mType = Work ; 141 else if ( mType & Work ) mType = Work ;
142 else if ( mType & Home ) mType = Home; 142 else if ( mType & Home ) mType = Home;
143 else mType = Pref; 143 else mType = Pref;
144} 144}
145bool PhoneNumber::contains( const PhoneNumber &p ) 145bool PhoneNumber::contains( const PhoneNumber &p )
146{ 146{
147 PhoneNumber myself; 147 PhoneNumber myself;
148 PhoneNumber other; 148 PhoneNumber other;
149 myself = *this; 149 myself = *this;
150 other = p; 150 other = p;
151 myself.simplifyNumber(); 151 myself.simplifyNumber();
152 other.simplifyNumber(); 152 other.simplifyNumber();
153 if ( myself.number() != other.number ()) 153 if ( myself.number() != other.number ())
154 return false; 154 return false;
155 myself.simplifyType(); 155 myself.simplifyType();
156 other.simplifyType(); 156 other.simplifyType();
157 if ( myself.type() == other.type()) 157 if ( myself.type() == other.type())
158 return true; 158 return true;
159 return false; 159 return false;
160} 160}
161 161
162void PhoneNumber::setId( const QString &id ) 162void PhoneNumber::setId( const QString &id )
163{ 163{
164 mId = id; 164 mId = id;
165} 165}
166 166
167QString PhoneNumber::id() const 167QString PhoneNumber::id() const
168{ 168{
169 return mId; 169 return mId;
170} 170}
171 171
172void PhoneNumber::setNumber( const QString &number ) 172void PhoneNumber::setNumber( const QString &number )
173{ 173{
174 mNumber = number; 174 mNumber = number;
175} 175}
176 176
177QString PhoneNumber::number() const 177QString PhoneNumber::number() const
178{ 178{
179 return mNumber; 179 return mNumber;
180} 180}
181 181
182void PhoneNumber::setType( int type ) 182void PhoneNumber::setType( int type )
183{ 183{
184 mType = type; 184 mType = type;
185} 185}
186 186
187int PhoneNumber::type() const 187int PhoneNumber::type() const
188{ 188{
189 return mType; 189 return mType;
190} 190}
191 191
192QString PhoneNumber::typeLabel() const 192QString PhoneNumber::typeLabel() const
193{ 193{
194 QString label; 194 QString label;
195 bool first = true; 195 bool first = true;
196 196
197 TypeList list = typeList(); 197 TypeList list = typeList();
198 198
199 TypeList::Iterator it; 199 TypeList::Iterator it;
200 for ( it = list.begin(); it != list.end(); ++it ) { 200 for ( it = list.begin(); it != list.end(); ++it ) {
201 if ( ( type() & (*it) ) && ( (*it) != Pref ) ) { 201 if ( ( type() & (*it) ) && ( (*it) != Pref ) ) {
202 label.append( ( first ? "" : "/" ) + typeLabel( *it ) ); 202 label.append( ( first ? "" : "/" ) + typeLabel( *it ) );
203 if ( first ) 203 if ( first )
204 first = false; 204 first = false;
205 } 205 }
206 } 206 }
207 207
208 return label; 208 return label;
209} 209}
210 210
211QString PhoneNumber::label() const 211QString PhoneNumber::label() const
212{ 212{
213 return typeLabel( type() ); 213 return typeLabel( type() );
214} 214}
215 215
216PhoneNumber::TypeList PhoneNumber::typeList() 216PhoneNumber::TypeList PhoneNumber::typeList()
217{ 217{
218 TypeList list; 218 TypeList list;
219 219
220 list << Home << Work << Msg << Pref << Voice << Fax << Cell << Video 220 list << Home << Work << Msg << Pref << Voice << Fax << Cell << Video
221 << Bbs << Modem << Car << Isdn << Pcs << Pager; 221 << Bbs << Modem << Car << Isdn << Pcs << Pager;
222 222
223 return list; 223 return list;
224} 224}
225PhoneNumber::TypeList PhoneNumber::supportedTypeList() 225PhoneNumber::TypeList PhoneNumber::supportedTypeList()
226{ 226{
227 static TypeList list; 227 static TypeList list;
228 if ( list.count() == 0 ) 228 if ( list.count() == 0 )
229 list << (Home| Pref) << (Work| Pref) << Cell <<(Pcs|Pref)<< Pcs<< Home << Work << Car << (Work| Msg | Voice) << (Work| Msg) << (Home | Fax) << (Work| Fax) << Fax<< Pager << Isdn << Video << Msg << Pref << Voice; 229 list << (Home| Pref) << (Work| Pref) << Cell <<(Pcs|Pref)<< Pcs<< Home << Work << Car << (Work| Msg | Voice) << (Work| Msg) << (Home | Fax) << (Work| Fax) << Fax<< Pager << Isdn << Video << Msg << Pref << Voice;
230 return list; 230 return list;
231} 231}
232QStringList PhoneNumber::supportedTypeListNames() 232QStringList PhoneNumber::supportedTypeListNames()
233{ 233{
234 static QStringList list; 234 static QStringList list;
235 if ( list.count() == 0 ) 235 if ( list.count() == 0 )
236 list << i18n("Home") << i18n("Work") << i18n("Mobile") << i18n("SIP") << i18n("VoIP") <<i18n("Home2")<< i18n("Work2") << i18n("Mobile2 (Work)") << i18n("Assistent") << i18n("Company") << i18n("Fax (Home)") << i18n("Fax (Work)") << i18n("Fax (Other)") << i18n("Pager") << i18n("ISDN") << i18n("Video") << i18n("Callback") << i18n("Primary")<< i18n("Other"); 236 list << i18n("Home") << i18n("Work") << i18n("Mobile") << i18n("SIP") << i18n("VoIP") <<i18n("Home2")<< i18n("Work2") << i18n("Mobile2") << i18n("Assistent") << i18n("Company") << i18n("Fax (Home)") << i18n("Fax (Work)") << i18n("Fax (Other)") << i18n("Pager") << i18n("ISDN") << i18n("Video") << i18n("Callback") << i18n("Primary")<< i18n("Other");
237 return list; 237 return list;
238} 238}
239 239
240int PhoneNumber::typeListIndex4Type(int type ) 240int PhoneNumber::typeListIndex4Type(int type )
241{ 241{
242 TypeList list = supportedTypeList(); 242 TypeList list = supportedTypeList();
243 int i = 0; 243 int i = 0;
244 while ( i < list.count() ) { 244 while ( i < list.count() ) {
245 if ( list [i] == type ) 245 if ( list [i] == type )
246 return i; 246 return i;
247 ++i; 247 ++i;
248 } 248 }
249 return list.count()-1; 249 return list.count()-1;
250} 250}
251 251
252QString PhoneNumber::label( int type ) 252QString PhoneNumber::label( int type )
253{ 253{
254 return typeLabel( type ); 254 return typeLabel( type );
255} 255}
256 256
257QString PhoneNumber::typeLabel( int type ) 257QString PhoneNumber::typeLabel( int type )
258{ 258{
259 if ((type & Cell) == Cell) 259 if ((type & Cell) == Cell)
260 return i18n("Mobile"); 260 return i18n("Mobile");
261 if ((type & Home) == Home) { 261 if ((type & Home) == Home) {
262 if ((type & Pref) == Pref) 262 if ((type & Pref) == Pref)
263 return i18n("Home"); 263 return i18n("Home");
264 if ((type & Fax) == Fax) 264 if ((type & Fax) == Fax)
265 return i18n("Fax (Home)"); 265 return i18n("Fax (Home)");
266 return i18n("Home2"); 266 return i18n("Home2");
267 } 267 }
268 268
269 if ((type & Work) == Work) { 269 if ((type & Work) == Work) {
270 if ((type & Pref) == Pref) 270 if ((type & Pref) == Pref)
271 return i18n("Work"); 271 return i18n("Work");
272 if ((type & Fax) == Fax) 272 if ((type & Fax) == Fax)
273 return i18n("Fax (Work)"); 273 return i18n("Fax (Work)");
274 if ((type & Msg) == Msg) { 274 if ((type & Msg) == Msg) {
275 if ((type & Voice) == Voice) 275 if ((type & Voice) == Voice)
276 return i18n("Assistent"); 276 return i18n("Assistent");
277 return i18n("Company"); 277 return i18n("Company");
278 } 278 }
279 return i18n("Work2"); 279 return i18n("Work2");
280 } 280 }
281 if ((type & Pcs) == Pcs) { 281 if ((type & Pcs) == Pcs) {
282 if ((type & Pref) == Pref) 282 if ((type & Pref) == Pref)
283 return i18n("SIP"); 283 return i18n("SIP");
284 return i18n("VoIP"); 284 return i18n("VoIP");
285 } 285 }
286 if ((type & Car) == Car) 286 if ((type & Car) == Car)
287 return i18n("Mobile2 (Work)"); 287 return i18n("Mobile2");
288 if ((type & Pager) == Pager) 288 if ((type & Pager) == Pager)
289 return i18n("Pager"); 289 return i18n("Pager");
290 if ((type & Isdn) == Isdn) 290 if ((type & Isdn) == Isdn)
291 return i18n("ISDN"); 291 return i18n("ISDN");
292 if ((type & Video) == Video) 292 if ((type & Video) == Video)
293 return i18n("Video"); 293 return i18n("Video");
294 294
295 if ((type & Msg) == Msg) 295 if ((type & Msg) == Msg)
296 return i18n("Callback"); 296 return i18n("Callback");
297 if ((type & Fax) == Fax) 297 if ((type & Fax) == Fax)
298 return i18n("Fax (Other)"); 298 return i18n("Fax (Other)");
299 299
300 if ((type & Pref) == Pref) 300 if ((type & Pref) == Pref)
301 return i18n("Primary"); 301 return i18n("Primary");
302 302
303 303
304 return i18n("Other"); 304 return i18n("Other");
305 305
306 306
307#if 0 307#if 0
308 308
309 309
310 310
311 QString typeString; 311 QString typeString;
312 312
313 313
314 if ((type & Cell) == Cell) 314 if ((type & Cell) == Cell)
315 typeString += i18n("Mobile") +" "; 315 typeString += i18n("Mobile") +" ";
316 if ((type & Home) == Home) 316 if ((type & Home) == Home)
317 typeString += i18n("Home")+" "; 317 typeString += i18n("Home")+" ";
318 else if ((type & Work) == Work) 318 else if ((type & Work) == Work)
319 typeString += i18n("Work")+" "; 319 typeString += i18n("Work")+" ";
320 320
321 if ((type & Sip) == Sip) 321 if ((type & Sip) == Sip)
322 typeString += i18n("SIP")+" "; 322 typeString += i18n("SIP")+" ";
323 if ((type & Car) == Car) 323 if ((type & Car) == Car)
324 typeString += i18n("Car")+" "; 324 typeString += i18n("Car")+" ";
325 325
326 if ((type & Fax) == Fax) 326 if ((type & Fax) == Fax)
327 typeString += i18n("Fax"); 327 typeString += i18n("Fax");
328 else if ((type & Msg) == Msg) 328 else if ((type & Msg) == Msg)
329 typeString += i18n("Messenger"); 329 typeString += i18n("Messenger");
330 else if ((type & Video) == Video) 330 else if ((type & Video) == Video)
331 typeString += i18n("Video"); 331 typeString += i18n("Video");
332 else if ((type & Bbs) == Bbs) 332 else if ((type & Bbs) == Bbs)
333 typeString += i18n("Mailbox"); 333 typeString += i18n("Mailbox");
334 else if ((type & Modem) == Modem) 334 else if ((type & Modem) == Modem)
335 typeString += i18n("Modem"); 335 typeString += i18n("Modem");
336 else if ((type & Isdn) == Isdn) 336 else if ((type & Isdn) == Isdn)
337 typeString += i18n("ISDN"); 337 typeString += i18n("ISDN");
338 else if ((type & Pcs) == Pcs) 338 else if ((type & Pcs) == Pcs)
339 typeString += i18n("PCS"); 339 typeString += i18n("PCS");
340 else if ((type & Pager) == Pager) 340 else if ((type & Pager) == Pager)
341 typeString += i18n("Pager"); 341 typeString += i18n("Pager");
342 // add the prefered flag 342 // add the prefered flag
343 /* 343 /*
344 if ((type & Pref) == Pref) 344 if ((type & Pref) == Pref)
345 typeString += i18n("(p)"); 345 typeString += i18n("(p)");
346 */ 346 */
347 //if we still have no match, return "other" 347 //if we still have no match, return "other"
348 if (typeString.isEmpty()) { 348 if (typeString.isEmpty()) {
349 if ((type & Voice) == Voice) 349 if ((type & Voice) == Voice)
350 return i18n("Voice"); 350 return i18n("Voice");
351 else 351 else
352 return i18n("Other"); 352 return i18n("Other");
353 } 353 }
354 354
355 return typeString.stripWhiteSpace(); 355 return typeString.stripWhiteSpace();
356#endif 356#endif
357} 357}
358 358
359QDataStream &KABC::operator<<( QDataStream &s, const PhoneNumber &phone ) 359QDataStream &KABC::operator<<( QDataStream &s, const PhoneNumber &phone )
360{ 360{
361 return s << phone.mId << phone.mType << phone.mNumber; 361 return s << phone.mId << phone.mType << phone.mNumber;
362} 362}
363 363
364QDataStream &KABC::operator>>( QDataStream &s, PhoneNumber &phone ) 364QDataStream &KABC::operator>>( QDataStream &s, PhoneNumber &phone )
365{ 365{
366 s >> phone.mId >> phone.mType >> phone.mNumber; 366 s >> phone.mId >> phone.mType >> phone.mNumber;
367 367
368 return s; 368 return s;
369} 369}
diff --git a/kaddressbook/xxport/csvimportdialog.cpp b/kaddressbook/xxport/csvimportdialog.cpp
index 4044fa8..862241e 100644
--- a/kaddressbook/xxport/csvimportdialog.cpp
+++ b/kaddressbook/xxport/csvimportdialog.cpp
@@ -19,374 +19,374 @@
19 Boston, MA 02111-1307, USA. 19 Boston, MA 02111-1307, USA.
20*/ 20*/
21 21
22/* 22/*
23Enhanced Version of the file for platform independent KDE tools. 23Enhanced Version of the file for platform independent KDE tools.
24Copyright (c) 2004 Ulf Schenk 24Copyright (c) 2004 Ulf Schenk
25 25
26$Id$ 26$Id$
27*/ 27*/
28 28
29 29
30#include <qbuttongroup.h> 30#include <qbuttongroup.h>
31#include <qcheckbox.h> 31#include <qcheckbox.h>
32#include <qcombobox.h> 32#include <qcombobox.h>
33#ifdef DESKTOP_VERSION 33#ifdef DESKTOP_VERSION
34#include <qinputdialog.h> 34#include <qinputdialog.h>
35#else 35#else
36#include <qtcompat/qinputdialog.h> 36#include <qtcompat/qinputdialog.h>
37#endif 37#endif
38#include <qlabel.h> 38#include <qlabel.h>
39#include <qlineedit.h> 39#include <qlineedit.h>
40#include <qpushbutton.h> 40#include <qpushbutton.h>
41#include <qradiobutton.h> 41#include <qradiobutton.h>
42#include <qtable.h> 42#include <qtable.h>
43#include <qlayout.h> 43#include <qlayout.h>
44#include <qtextstream.h> 44#include <qtextstream.h>
45#include <qfile.h> 45#include <qfile.h>
46 46
47#include <kapplication.h> 47#include <kapplication.h>
48#include <kdebug.h> 48#include <kdebug.h>
49#include <kdialogbase.h> 49#include <kdialogbase.h>
50#include <kfiledialog.h> 50#include <kfiledialog.h>
51#include <klineedit.h> 51#include <klineedit.h>
52#include <klocale.h> 52#include <klocale.h>
53#include <kglobal.h> 53#include <kglobal.h>
54#include <kmessagebox.h> 54#include <kmessagebox.h>
55#include <kstandarddirs.h> 55#include <kstandarddirs.h>
56#include <kurlrequester.h> 56#include <kurlrequester.h>
57 57
58#ifdef DESKTOP_VERSION 58#ifdef DESKTOP_VERSION
59#include "qtable.h" 59#include "qtable.h"
60#else 60#else
61#include "qcombotableitem.h" 61#include "qcombotableitem.h"
62#endif 62#endif
63#include "csvimportdialog.h" 63#include "csvimportdialog.h"
64 64
65CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent, 65CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent,
66 const char * name ) 66 const char * name )
67 : KDialogBase( Plain, i18n ( "CSV Import Dialog" ), Ok | Cancel | User1 | 67 : KDialogBase( Plain, i18n ( "CSV Import Dialog" ), Ok | Cancel | User1 |
68 User2, Ok, parent, name, true, true ), 68 User2, Ok, parent, name, true, true ),
69 mAdjustRows( false ), 69 mAdjustRows( false ),
70 mStartLine( 0 ), 70 mStartLine( 0 ),
71 mTextQuote( '"' ), 71 mTextQuote( '"' ),
72 mDelimiter( "," ), 72 mDelimiter( "," ),
73 mAddressBook( ab ) 73 mAddressBook( ab )
74{ 74{
75 initGUI(); 75 initGUI();
76 76
77 mTypeMap.insert( i18n( "Undefined" ), Undefined ); 77 mTypeMap.insert( i18n( "Undefined" ), Undefined );
78 mTypeMap.insert( KABC::Addressee::formattedNameLabel(), FormattedName ); 78 mTypeMap.insert( KABC::Addressee::formattedNameLabel(), FormattedName );
79 mTypeMap.insert( KABC::Addressee::familyNameLabel(), FamilyName ); 79 mTypeMap.insert( KABC::Addressee::familyNameLabel(), FamilyName );
80 mTypeMap.insert( KABC::Addressee::givenNameLabel(), GivenName ); 80 mTypeMap.insert( KABC::Addressee::givenNameLabel(), GivenName );
81 mTypeMap.insert( KABC::Addressee::additionalNameLabel(), AdditionalName ); 81 mTypeMap.insert( KABC::Addressee::additionalNameLabel(), AdditionalName );
82 mTypeMap.insert( KABC::Addressee::prefixLabel(), Prefix ); 82 mTypeMap.insert( KABC::Addressee::prefixLabel(), Prefix );
83 mTypeMap.insert( KABC::Addressee::suffixLabel(), Suffix ); 83 mTypeMap.insert( KABC::Addressee::suffixLabel(), Suffix );
84 mTypeMap.insert( KABC::Addressee::nickNameLabel(), NickName ); 84 mTypeMap.insert( KABC::Addressee::nickNameLabel(), NickName );
85 mTypeMap.insert( KABC::Addressee::birthdayLabel(), Birthday ); 85 mTypeMap.insert( KABC::Addressee::birthdayLabel(), Birthday );
86 86
87 mTypeMap.insert( KABC::Addressee::homeAddressStreetLabel(), HomeAddressStreet ); 87 mTypeMap.insert( KABC::Addressee::homeAddressStreetLabel(), HomeAddressStreet );
88 mTypeMap.insert( KABC::Addressee::homeAddressLocalityLabel(), 88 mTypeMap.insert( KABC::Addressee::homeAddressLocalityLabel(),
89 HomeAddressLocality ); 89 HomeAddressLocality );
90 mTypeMap.insert( KABC::Addressee::homeAddressRegionLabel(), HomeAddressRegion ); 90 mTypeMap.insert( KABC::Addressee::homeAddressRegionLabel(), HomeAddressRegion );
91 mTypeMap.insert( KABC::Addressee::homeAddressPostalCodeLabel(), 91 mTypeMap.insert( KABC::Addressee::homeAddressPostalCodeLabel(),
92 HomeAddressPostalCode ); 92 HomeAddressPostalCode );
93 mTypeMap.insert( KABC::Addressee::homeAddressCountryLabel(), 93 mTypeMap.insert( KABC::Addressee::homeAddressCountryLabel(),
94 HomeAddressCountry ); 94 HomeAddressCountry );
95 mTypeMap.insert( KABC::Addressee::homeAddressLabelLabel(), HomeAddressLabel ); 95 mTypeMap.insert( KABC::Addressee::homeAddressLabelLabel(), HomeAddressLabel );
96 96
97 mTypeMap.insert( KABC::Addressee::businessAddressStreetLabel(), 97 mTypeMap.insert( KABC::Addressee::businessAddressStreetLabel(),
98 BusinessAddressStreet ); 98 BusinessAddressStreet );
99 mTypeMap.insert( KABC::Addressee::businessAddressLocalityLabel(), 99 mTypeMap.insert( KABC::Addressee::businessAddressLocalityLabel(),
100 BusinessAddressLocality ); 100 BusinessAddressLocality );
101 mTypeMap.insert( KABC::Addressee::businessAddressRegionLabel(), 101 mTypeMap.insert( KABC::Addressee::businessAddressRegionLabel(),
102 BusinessAddressRegion ); 102 BusinessAddressRegion );
103 mTypeMap.insert( KABC::Addressee::businessAddressPostalCodeLabel(), 103 mTypeMap.insert( KABC::Addressee::businessAddressPostalCodeLabel(),
104 BusinessAddressPostalCode ); 104 BusinessAddressPostalCode );
105 mTypeMap.insert( KABC::Addressee::businessAddressCountryLabel(), 105 mTypeMap.insert( KABC::Addressee::businessAddressCountryLabel(),
106 BusinessAddressCountry ); 106 BusinessAddressCountry );
107 mTypeMap.insert( KABC::Addressee::businessAddressLabelLabel(), 107 mTypeMap.insert( KABC::Addressee::businessAddressLabelLabel(),
108 BusinessAddressLabel ); 108 BusinessAddressLabel );
109 109
110 mTypeMap.insert( KABC::Addressee::homePhoneLabel(), HomePhone ); 110 mTypeMap.insert( KABC::Addressee::homePhoneLabel(), HomePhone );
111 mTypeMap.insert( KABC::Addressee::businessPhoneLabel(), BusinessPhone ); 111 mTypeMap.insert( KABC::Addressee::businessPhoneLabel(), BusinessPhone );
112 mTypeMap.insert( KABC::Addressee::mobilePhoneLabel(), MobilePhone ); 112 mTypeMap.insert( KABC::Addressee::mobilePhoneLabel(), MobilePhone );
113 mTypeMap.insert( KABC::Addressee::homeFaxLabel(), HomeFax ); 113 mTypeMap.insert( KABC::Addressee::homeFaxLabel(), HomeFax );
114 mTypeMap.insert( KABC::Addressee::businessFaxLabel(), BusinessFax ); 114 mTypeMap.insert( KABC::Addressee::businessFaxLabel(), BusinessFax );
115 mTypeMap.insert( KABC::Addressee::carPhoneLabel(), CarPhone ); 115 mTypeMap.insert( KABC::Addressee::mobileWorkPhoneLabel(), MobileWorkPhone );
116 mTypeMap.insert( KABC::Addressee::isdnLabel(), Isdn ); 116 mTypeMap.insert( KABC::Addressee::isdnLabel(), Isdn );
117 mTypeMap.insert( KABC::Addressee::pagerLabel(), Pager ); 117 mTypeMap.insert( KABC::Addressee::pagerLabel(), Pager );
118 mTypeMap.insert( KABC::Addressee::emailLabel(), Email ); 118 mTypeMap.insert( KABC::Addressee::emailLabel(), Email );
119 mTypeMap.insert( KABC::Addressee::mailerLabel(), Mailer ); 119 mTypeMap.insert( KABC::Addressee::mailerLabel(), Mailer );
120 mTypeMap.insert( KABC::Addressee::titleLabel(), Title ); 120 mTypeMap.insert( KABC::Addressee::titleLabel(), Title );
121 mTypeMap.insert( KABC::Addressee::roleLabel(), Role ); 121 mTypeMap.insert( KABC::Addressee::roleLabel(), Role );
122 mTypeMap.insert( KABC::Addressee::organizationLabel(), Organization ); 122 mTypeMap.insert( KABC::Addressee::organizationLabel(), Organization );
123 mTypeMap.insert( KABC::Addressee::noteLabel(), Note ); 123 mTypeMap.insert( KABC::Addressee::noteLabel(), Note );
124 mTypeMap.insert( KABC::Addressee::urlLabel(), URL ); 124 mTypeMap.insert( KABC::Addressee::urlLabel(), URL );
125 mTypeMap.insert( KABC::Addressee::categoryLabel(), Categories ); 125 mTypeMap.insert( KABC::Addressee::categoryLabel(), Categories );
126 126
127 mCustomCounter = mTypeMap.count(); 127 mCustomCounter = mTypeMap.count();
128 int count = mCustomCounter; 128 int count = mCustomCounter;
129 129
130 KABC::Field::List fields = mAddressBook->fields( KABC::Field::CustomCategory ); 130 KABC::Field::List fields = mAddressBook->fields( KABC::Field::CustomCategory );
131 KABC::Field::List::Iterator it; 131 KABC::Field::List::Iterator it;
132 for ( it = fields.begin(); it != fields.end(); ++it, ++count ) 132 for ( it = fields.begin(); it != fields.end(); ++it, ++count )
133 mTypeMap.insert( (*it)->label(), count ); 133 mTypeMap.insert( (*it)->label(), count );
134 134
135 connect( mDelimiterBox, SIGNAL( clicked( int ) ), 135 connect( mDelimiterBox, SIGNAL( clicked( int ) ),
136 this, SLOT( delimiterClicked( int ) ) ); 136 this, SLOT( delimiterClicked( int ) ) );
137 connect( mDelimiterEdit, SIGNAL( returnPressed() ), 137 connect( mDelimiterEdit, SIGNAL( returnPressed() ),
138 this, SLOT( returnPressed() ) ); 138 this, SLOT( returnPressed() ) );
139 connect( mDelimiterEdit, SIGNAL( textChanged ( const QString& ) ), 139 connect( mDelimiterEdit, SIGNAL( textChanged ( const QString& ) ),
140 this, SLOT( textChanged ( const QString& ) ) ); 140 this, SLOT( textChanged ( const QString& ) ) );
141 connect( mComboLine, SIGNAL( activated( const QString& ) ), 141 connect( mComboLine, SIGNAL( activated( const QString& ) ),
142 this, SLOT( lineSelected( const QString& ) ) ); 142 this, SLOT( lineSelected( const QString& ) ) );
143 connect( mComboCodec, SIGNAL( activated( const QString& ) ), 143 connect( mComboCodec, SIGNAL( activated( const QString& ) ),
144 this, SLOT( codecChanged( const QString& ) ) ); 144 this, SLOT( codecChanged( const QString& ) ) );
145 connect( mComboQuote, SIGNAL( activated( const QString& ) ), 145 connect( mComboQuote, SIGNAL( activated( const QString& ) ),
146 this, SLOT( textquoteSelected( const QString& ) ) ); 146 this, SLOT( textquoteSelected( const QString& ) ) );
147 connect( mIgnoreDuplicates, SIGNAL( stateChanged( int ) ), 147 connect( mIgnoreDuplicates, SIGNAL( stateChanged( int ) ),
148 this, SLOT( ignoreDuplicatesChanged( int ) ) ); 148 this, SLOT( ignoreDuplicatesChanged( int ) ) );
149 149
150 connect( mUrlRequester, SIGNAL( returnPressed( const QString& ) ), 150 connect( mUrlRequester, SIGNAL( returnPressed( const QString& ) ),
151 this, SLOT( setFile( const QString& ) ) ); 151 this, SLOT( setFile( const QString& ) ) );
152 connect( mUrlRequester, SIGNAL( urlSelected( const QString& ) ), 152 connect( mUrlRequester, SIGNAL( urlSelected( const QString& ) ),
153 this, SLOT( setFile( const QString& ) ) ); 153 this, SLOT( setFile( const QString& ) ) );
154 connect( mUrlRequester->lineEdit(), SIGNAL( textChanged ( const QString& ) ), 154 connect( mUrlRequester->lineEdit(), SIGNAL( textChanged ( const QString& ) ),
155 this, SLOT( urlChanged( const QString& ) ) ); 155 this, SLOT( urlChanged( const QString& ) ) );
156 156
157 connect( this, SIGNAL( user1Clicked() ), 157 connect( this, SIGNAL( user1Clicked() ),
158 this, SLOT( applyTemplate() ) ); 158 this, SLOT( applyTemplate() ) );
159 159
160 connect( this, SIGNAL( user2Clicked() ), 160 connect( this, SIGNAL( user2Clicked() ),
161 this, SLOT( saveTemplate() ) ); 161 this, SLOT( saveTemplate() ) );
162 162
163 // if ( QApplication::desktop()->width() < 321 ) 163 // if ( QApplication::desktop()->width() < 321 )
164 QIconSet icon = SmallIcon("filesave"); 164 QIconSet icon = SmallIcon("filesave");
165 165
166 findButton( User2 )->setIconSet (icon ) ; 166 findButton( User2 )->setIconSet (icon ) ;
167 icon = SmallIcon("fileopen"); 167 icon = SmallIcon("fileopen");
168 findButton( User1 )->setIconSet (icon ) ; 168 findButton( User1 )->setIconSet (icon ) ;
169 int wid = findButton( User2 )->sizeHint().height(); 169 int wid = findButton( User2 )->sizeHint().height();
170 findButton( User2 )->setMaximumWidth( wid+4 ); 170 findButton( User2 )->setMaximumWidth( wid+4 );
171 findButton( User1 )->setMaximumWidth( wid+4 ); 171 findButton( User1 )->setMaximumWidth( wid+4 );
172} 172}
173 173
174CSVImportDialog::~CSVImportDialog() 174CSVImportDialog::~CSVImportDialog()
175{ 175{
176} 176}
177 177
178KABC::AddresseeList CSVImportDialog::contacts() const 178KABC::AddresseeList CSVImportDialog::contacts() const
179{ 179{
180 KABC::AddresseeList contacts; 180 KABC::AddresseeList contacts;
181 181
182 for ( int row = 1; row < mTable->numRows(); ++row ) { 182 for ( int row = 1; row < mTable->numRows(); ++row ) {
183 KABC::Addressee a; 183 KABC::Addressee a;
184 bool emptyRow = true; 184 bool emptyRow = true;
185 KABC::Address addrHome( KABC::Address::Home ); 185 KABC::Address addrHome( KABC::Address::Home );
186 KABC::Address addrWork( KABC::Address::Work ); 186 KABC::Address addrWork( KABC::Address::Work );
187 for ( int col = 0; col < mTable->numCols(); ++col ) { 187 for ( int col = 0; col < mTable->numCols(); ++col ) {
188 188
189 QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, col ) ); 189 QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, col ) );
190 190
191 if ( !item ) { 191 if ( !item ) {
192 qDebug( "ERROR: item cast failed" ); 192 qDebug( "ERROR: item cast failed" );
193 continue; 193 continue;
194 } 194 }
195 195
196 QString value = mTable->text( row, col ); 196 QString value = mTable->text( row, col );
197 if ( !value.isEmpty() ) 197 if ( !value.isEmpty() )
198 emptyRow = false; 198 emptyRow = false;
199 199
200 switch ( posToType( item->currentItem() ) ) 200 switch ( posToType( item->currentItem() ) )
201 { 201 {
202 case Undefined: 202 case Undefined:
203 continue; 203 continue;
204 break; 204 break;
205 case FormattedName: 205 case FormattedName:
206 a.setFormattedName( value ); 206 a.setFormattedName( value );
207 break; 207 break;
208 case GivenName: 208 case GivenName:
209 a.setGivenName( value ); 209 a.setGivenName( value );
210 break; 210 break;
211 case FamilyName: 211 case FamilyName:
212 a.setFamilyName( value ); 212 a.setFamilyName( value );
213 break; 213 break;
214 case AdditionalName: 214 case AdditionalName:
215 a.setAdditionalName( value ); 215 a.setAdditionalName( value );
216 break; 216 break;
217 case Prefix: 217 case Prefix:
218 a.setPrefix( value ); 218 a.setPrefix( value );
219 break; 219 break;
220 case Suffix: 220 case Suffix:
221 a.setSuffix( value ); 221 a.setSuffix( value );
222 break; 222 break;
223 case NickName: 223 case NickName:
224 a.setNickName( value ); 224 a.setNickName( value );
225 break; 225 break;
226 case Birthday: 226 case Birthday:
227//US 227//US
228//the generated code had the following format: a.setBirthday( QDate::fromString( value, Qt::ISODate ) ); 228//the generated code had the following format: a.setBirthday( QDate::fromString( value, Qt::ISODate ) );
229// But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ? 229// But Qt::IsoDate and QDate::fromString was not specified. Do I have the wrong QT version ?
230 { 230 {
231 QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate 231 QDate dt = KGlobal::locale()->readDate( value, "%Y-%m-%d"); // = Qt::ISODate
232 a.setBirthday(dt); 232 a.setBirthday(dt);
233 } 233 }
234 break; 234 break;
235 case Email: 235 case Email:
236 if ( !value.isEmpty() ) 236 if ( !value.isEmpty() )
237 a.insertEmail( value, true ); 237 a.insertEmail( value, true );
238 break; 238 break;
239 case Role: 239 case Role:
240 a.setRole( value ); 240 a.setRole( value );
241 break; 241 break;
242 case Title: 242 case Title:
243 a.setTitle( value ); 243 a.setTitle( value );
244 break; 244 break;
245 case Mailer: 245 case Mailer:
246 a.setMailer( value ); 246 a.setMailer( value );
247 break; 247 break;
248 case URL: 248 case URL:
249 a.setUrl( value ); 249 a.setUrl( value );
250 break; 250 break;
251 case Organization: 251 case Organization:
252 a.setOrganization( value ); 252 a.setOrganization( value );
253 break; 253 break;
254 case Note: 254 case Note:
255 if ( a.note().isEmpty() ) 255 if ( a.note().isEmpty() )
256 a.setNote( value ); 256 a.setNote( value );
257 else { 257 else {
258 a.setNote( a.note()+"\n"+value ); 258 a.setNote( a.note()+"\n"+value );
259 } 259 }
260 break; 260 break;
261 case Categories: 261 case Categories:
262 a.insertCategory( value ); 262 a.insertCategory( value );
263 break; 263 break;
264 case HomePhone: 264 case HomePhone:
265 if ( !value.isEmpty() ) { 265 if ( !value.isEmpty() ) {
266 KABC::PhoneNumber number( value, KABC::PhoneNumber::Home ); 266 KABC::PhoneNumber number( value, KABC::PhoneNumber::Home );
267 a.insertPhoneNumber( number ); 267 a.insertPhoneNumber( number );
268 } 268 }
269 break; 269 break;
270 case BusinessPhone: 270 case BusinessPhone:
271 if ( !value.isEmpty() ) { 271 if ( !value.isEmpty() ) {
272 KABC::PhoneNumber number( value, KABC::PhoneNumber::Work ); 272 KABC::PhoneNumber number( value, KABC::PhoneNumber::Work );
273 a.insertPhoneNumber( number ); 273 a.insertPhoneNumber( number );
274 } 274 }
275 break; 275 break;
276 case MobilePhone: 276 case MobilePhone:
277 if ( !value.isEmpty() ) { 277 if ( !value.isEmpty() ) {
278 KABC::PhoneNumber number( value, KABC::PhoneNumber::Cell ); 278 KABC::PhoneNumber number( value, KABC::PhoneNumber::Cell );
279 a.insertPhoneNumber( number ); 279 a.insertPhoneNumber( number );
280 } 280 }
281 break; 281 break;
282 case HomeFax: 282 case HomeFax:
283 if ( !value.isEmpty() ) { 283 if ( !value.isEmpty() ) {
284 KABC::PhoneNumber number( value, KABC::PhoneNumber::Home | 284 KABC::PhoneNumber number( value, KABC::PhoneNumber::Home |
285 KABC::PhoneNumber::Fax ); 285 KABC::PhoneNumber::Fax );
286 a.insertPhoneNumber( number ); 286 a.insertPhoneNumber( number );
287 } 287 }
288 break; 288 break;
289 case BusinessFax: 289 case BusinessFax:
290 if ( !value.isEmpty() ) { 290 if ( !value.isEmpty() ) {
291 KABC::PhoneNumber number( value, KABC::PhoneNumber::Work | 291 KABC::PhoneNumber number( value, KABC::PhoneNumber::Work |
292 KABC::PhoneNumber::Fax ); 292 KABC::PhoneNumber::Fax );
293 a.insertPhoneNumber( number ); 293 a.insertPhoneNumber( number );
294 } 294 }
295 break; 295 break;
296 case CarPhone: 296 case MobileWorkPhone:
297 if ( !value.isEmpty() ) { 297 if ( !value.isEmpty() ) {
298 KABC::PhoneNumber number( value, KABC::PhoneNumber::Car ); 298 KABC::PhoneNumber number( value, KABC::PhoneNumber::Car );
299 a.insertPhoneNumber( number ); 299 a.insertPhoneNumber( number );
300 } 300 }
301 break; 301 break;
302 case Isdn: 302 case Isdn:
303 if ( !value.isEmpty() ) { 303 if ( !value.isEmpty() ) {
304 KABC::PhoneNumber number( value, KABC::PhoneNumber::Isdn ); 304 KABC::PhoneNumber number( value, KABC::PhoneNumber::Isdn );
305 a.insertPhoneNumber( number ); 305 a.insertPhoneNumber( number );
306 } 306 }
307 break; 307 break;
308 case Pager: 308 case Pager:
309 if ( !value.isEmpty() ) { 309 if ( !value.isEmpty() ) {
310 KABC::PhoneNumber number( value, KABC::PhoneNumber::Pager ); 310 KABC::PhoneNumber number( value, KABC::PhoneNumber::Pager );
311 a.insertPhoneNumber( number ); 311 a.insertPhoneNumber( number );
312 } 312 }
313 break; 313 break;
314 314
315 case HomeAddressStreet: 315 case HomeAddressStreet:
316 addrHome.setStreet( value ); 316 addrHome.setStreet( value );
317 break; 317 break;
318 case HomeAddressLocality: 318 case HomeAddressLocality:
319 addrHome.setLocality( value ); 319 addrHome.setLocality( value );
320 break; 320 break;
321 case HomeAddressRegion: 321 case HomeAddressRegion:
322 addrHome.setRegion( value ); 322 addrHome.setRegion( value );
323 break; 323 break;
324 case HomeAddressPostalCode: 324 case HomeAddressPostalCode:
325 addrHome.setPostalCode( value ); 325 addrHome.setPostalCode( value );
326 break; 326 break;
327 case HomeAddressCountry: 327 case HomeAddressCountry:
328 addrHome.setCountry( value ); 328 addrHome.setCountry( value );
329 break; 329 break;
330 case HomeAddressLabel: 330 case HomeAddressLabel:
331 addrHome.setLabel( value ); 331 addrHome.setLabel( value );
332 break; 332 break;
333 333
334 case BusinessAddressStreet: 334 case BusinessAddressStreet:
335 addrWork.setStreet( value ); 335 addrWork.setStreet( value );
336 break; 336 break;
337 case BusinessAddressLocality: 337 case BusinessAddressLocality:
338 addrWork.setLocality( value ); 338 addrWork.setLocality( value );
339 break; 339 break;
340 case BusinessAddressRegion: 340 case BusinessAddressRegion:
341 addrWork.setRegion( value ); 341 addrWork.setRegion( value );
342 break; 342 break;
343 case BusinessAddressPostalCode: 343 case BusinessAddressPostalCode:
344 addrWork.setPostalCode( value ); 344 addrWork.setPostalCode( value );
345 break; 345 break;
346 case BusinessAddressCountry: 346 case BusinessAddressCountry:
347 addrWork.setCountry( value ); 347 addrWork.setCountry( value );
348 break; 348 break;
349 case BusinessAddressLabel: 349 case BusinessAddressLabel:
350 addrWork.setLabel( value ); 350 addrWork.setLabel( value );
351 break; 351 break;
352 default: 352 default:
353 KABC::Field::List fields = mAddressBook->fields( KABC::Field::CustomCategory ); 353 KABC::Field::List fields = mAddressBook->fields( KABC::Field::CustomCategory );
354 KABC::Field::List::Iterator it; 354 KABC::Field::List::Iterator it;
355 355
356 int counter = 0; 356 int counter = 0;
357 for ( it = fields.begin(); it != fields.end(); ++it ) { 357 for ( it = fields.begin(); it != fields.end(); ++it ) {
358 if ( counter == (int)( posToType( item->currentItem() ) - mCustomCounter ) ) 358 if ( counter == (int)( posToType( item->currentItem() ) - mCustomCounter ) )
359 { 359 {
360 (*it)->setValue( a, value ); 360 (*it)->setValue( a, value );
361 break; 361 break;
362 } 362 }
363 ++counter; 363 ++counter;
364 } 364 }
365 break; 365 break;
366 } 366 }
367 } 367 }
368 368
369 if ( !addrHome.isEmpty() ) 369 if ( !addrHome.isEmpty() )
370 a.insertAddress( addrHome ); 370 a.insertAddress( addrHome );
371 if ( !addrWork.isEmpty() ) 371 if ( !addrWork.isEmpty() )
372 a.insertAddress( addrWork ); 372 a.insertAddress( addrWork );
373 373
374 if ( !emptyRow && !a.isEmpty() ) 374 if ( !emptyRow && !a.isEmpty() )
375 contacts.append( a ); 375 contacts.append( a );
376 } 376 }
377 377
378 return contacts; 378 return contacts;
379} 379}
380 380
381void CSVImportDialog::initGUI() 381void CSVImportDialog::initGUI()
382{ 382{
383 QWidget* page = plainPage(); 383 QWidget* page = plainPage();
384 384
385 QGridLayout *layout = new QGridLayout( page, 1, 1, marginHintSmall(), 385 QGridLayout *layout = new QGridLayout( page, 1, 1, marginHintSmall(),
386 spacingHintSmall() ); 386 spacingHintSmall() );
387 QHBoxLayout *hbox = new QHBoxLayout(); 387 QHBoxLayout *hbox = new QHBoxLayout();
388 hbox->setSpacing( spacingHint() ); 388 hbox->setSpacing( spacingHint() );
389 389
390 QLabel *label = new QLabel( i18n( "File to import:" ), page ); 390 QLabel *label = new QLabel( i18n( "File to import:" ), page );
391 hbox->addWidget( label ); 391 hbox->addWidget( label );
392 392
diff --git a/kaddressbook/xxport/csvimportdialog.h b/kaddressbook/xxport/csvimportdialog.h
index 5f55ab2..2661420 100644
--- a/kaddressbook/xxport/csvimportdialog.h
+++ b/kaddressbook/xxport/csvimportdialog.h
@@ -1,126 +1,126 @@
1/* 1/*
2 This file is part of KAddressBook. 2 This file is part of KAddressBook.
3 Copyright (C) 2003 Tobias Koenig <tokoe@kde.org> 3 Copyright (C) 2003 Tobias Koenig <tokoe@kde.org>
4 based on the code of KSpread's CSV Import Dialog 4 based on the code of KSpread's CSV Import Dialog
5 5
6 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public 7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either 8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version. 9 version 2 of the License, or (at your option) any later version.
10 10
11 This library is distributed in the hope that it will be useful, 11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details. 14 Library General Public License for more details.
15 15
16 You should have received a copy of the GNU Library General Public License 16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to 17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. 19 Boston, MA 02111-1307, USA.
20*/ 20*/
21 21
22/* 22/*
23Enhanced Version of the file for platform independent KDE tools. 23Enhanced Version of the file for platform independent KDE tools.
24Copyright (c) 2004 Ulf Schenk 24Copyright (c) 2004 Ulf Schenk
25 25
26$Id$ 26$Id$
27*/ 27*/
28 28
29#ifndef CSV_IMPORT_DLG_H 29#ifndef CSV_IMPORT_DLG_H
30#define CSV_IMPORT_DLG_H 30#define CSV_IMPORT_DLG_H
31 31
32#include <kabc/addressbook.h> 32#include <kabc/addressbook.h>
33#include <kabc/addresseelist.h> 33#include <kabc/addresseelist.h>
34#include <kdialogbase.h> 34#include <kdialogbase.h>
35 35
36#include <qvaluelist.h> 36#include <qvaluelist.h>
37 37
38class KURLRequester; 38class KURLRequester;
39 39
40class QButtonGroup; 40class QButtonGroup;
41class QComboBox; 41class QComboBox;
42class QCheckBox; 42class QCheckBox;
43class QLineEdit; 43class QLineEdit;
44class QPushButton; 44class QPushButton;
45class QRadioButton; 45class QRadioButton;
46class QTable; 46class QTable;
47 47
48class CSVImportDialog : public KDialogBase 48class CSVImportDialog : public KDialogBase
49{ 49{
50 Q_OBJECT 50 Q_OBJECT
51 51
52 public: 52 public:
53 CSVImportDialog( KABC::AddressBook *ab, QWidget *parent, 53 CSVImportDialog( KABC::AddressBook *ab, QWidget *parent,
54 const char *name = 0 ); 54 const char *name = 0 );
55 ~CSVImportDialog(); 55 ~CSVImportDialog();
56 56
57 KABC::AddresseeList contacts() const; 57 KABC::AddresseeList contacts() const;
58 58
59 protected slots: 59 protected slots:
60 virtual void slotOk(); 60 virtual void slotOk();
61 61
62 private slots: 62 private slots:
63 void returnPressed(); 63 void returnPressed();
64 void delimiterClicked( int id ); 64 void delimiterClicked( int id );
65 void lineSelected( const QString& line ); 65 void lineSelected( const QString& line );
66 void textquoteSelected( const QString& mark ); 66 void textquoteSelected( const QString& mark );
67 void textChanged ( const QString & ); 67 void textChanged ( const QString & );
68 void ignoreDuplicatesChanged( int ); 68 void ignoreDuplicatesChanged( int );
69 void setFile( const QString& ); 69 void setFile( const QString& );
70 void urlChanged( const QString& ); 70 void urlChanged( const QString& );
71 void codecChanged ( const QString& ); 71 void codecChanged ( const QString& );
72 72
73 void applyTemplate(); 73 void applyTemplate();
74 void saveTemplate(); 74 void saveTemplate();
75 75
76 private: 76 private:
77 enum { Undefined, FormattedName, FamilyName, GivenName, AdditionalName, 77 enum { Undefined, FormattedName, FamilyName, GivenName, AdditionalName,
78 Prefix, Suffix, NickName, Birthday, 78 Prefix, Suffix, NickName, Birthday,
79 HomeAddressStreet, HomeAddressLocality, HomeAddressRegion, 79 HomeAddressStreet, HomeAddressLocality, HomeAddressRegion,
80 HomeAddressPostalCode, HomeAddressCountry, HomeAddressLabel, 80 HomeAddressPostalCode, HomeAddressCountry, HomeAddressLabel,
81 BusinessAddressStreet, BusinessAddressLocality, BusinessAddressRegion, 81 BusinessAddressStreet, BusinessAddressLocality, BusinessAddressRegion,
82 BusinessAddressPostalCode, BusinessAddressCountry, 82 BusinessAddressPostalCode, BusinessAddressCountry,
83 BusinessAddressLabel, 83 BusinessAddressLabel,
84 HomePhone, BusinessPhone, MobilePhone, HomeFax, BusinessFax, CarPhone, 84 HomePhone, BusinessPhone, MobilePhone, HomeFax, BusinessFax, MobileWorkPhone,
85 Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, URL, Categories 85 Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, URL, Categories
86 }; 86 };
87 87
88 QTable* mTable; 88 QTable* mTable;
89 QButtonGroup* mDelimiterBox; 89 QButtonGroup* mDelimiterBox;
90 QRadioButton* mRadioComma; 90 QRadioButton* mRadioComma;
91 QRadioButton* mRadioSemicolon; 91 QRadioButton* mRadioSemicolon;
92 QRadioButton* mRadioTab; 92 QRadioButton* mRadioTab;
93 QRadioButton* mRadioSpace; 93 QRadioButton* mRadioSpace;
94 QRadioButton* mRadioOther; 94 QRadioButton* mRadioOther;
95 QLineEdit* mDelimiterEdit; 95 QLineEdit* mDelimiterEdit;
96 QComboBox* mComboLine; 96 QComboBox* mComboLine;
97 QComboBox* mComboQuote; 97 QComboBox* mComboQuote;
98 QComboBox* mComboCodec; 98 QComboBox* mComboCodec;
99 QCheckBox* mIgnoreDuplicates; 99 QCheckBox* mIgnoreDuplicates;
100 KURLRequester* mUrlRequester; 100 KURLRequester* mUrlRequester;
101 101
102 void initGUI(); 102 void initGUI();
103 void fillTable(); 103 void fillTable();
104 void clearTable(); 104 void clearTable();
105 void fillComboBox(); 105 void fillComboBox();
106 void setText( int row, int col, const QString& text ); 106 void setText( int row, int col, const QString& text );
107 void adjustRows( int rows ); 107 void adjustRows( int rows );
108 QString getText( int row, int col ); 108 QString getText( int row, int col );
109 uint posToType( int pos ) const; 109 uint posToType( int pos ) const;
110 int typeToPos( uint type ) const; 110 int typeToPos( uint type ) const;
111 111
112 bool mAdjustRows; 112 bool mAdjustRows;
113 int mStartLine; 113 int mStartLine;
114 QChar mTextQuote; 114 QChar mTextQuote;
115 QString mDelimiter; 115 QString mDelimiter;
116 QString mData; 116 QString mData;
117 QByteArray mFileArray; 117 QByteArray mFileArray;
118 QMap<QString, uint> mTypeMap; 118 QMap<QString, uint> mTypeMap;
119 KABC::AddressBook *mAddressBook; 119 KABC::AddressBook *mAddressBook;
120 int mCustomCounter; 120 int mCustomCounter;
121 bool mClearTypeStore; 121 bool mClearTypeStore;
122 QValueList<int> mTypeStore; 122 QValueList<int> mTypeStore;
123 123
124}; 124};
125 125
126#endif 126#endif