-rw-r--r-- | core/pim/addressbook/TODO | 5 | ||||
-rw-r--r-- | core/pim/addressbook/abtable.cpp | 137 | ||||
-rw-r--r-- | core/pim/addressbook/abtable.h | 12 | ||||
-rw-r--r-- | core/pim/addressbook/addressbook.cpp | 5 | ||||
-rw-r--r-- | core/pim/addressbook/configdlg.cpp | 11 | ||||
-rw-r--r-- | core/pim/addressbook/contacteditor.cpp | 3 | ||||
-rw-r--r-- | core/pim/addressbook/ocontactfields.cpp | 14 |
7 files changed, 122 insertions, 65 deletions
diff --git a/core/pim/addressbook/TODO b/core/pim/addressbook/TODO index f62b075..906b462 100644 --- a/core/pim/addressbook/TODO +++ b/core/pim/addressbook/TODO | |||
@@ -5,51 +5,51 @@ Feature requests: | |||
5 | ----------------- | 5 | ----------------- |
6 | - Dial by mobile phone by tapping the number.. | 6 | - Dial by mobile phone by tapping the number.. |
7 | (Maybe using gsmtool. And we may | 7 | (Maybe using gsmtool. And we may |
8 | add a library class for this) | 8 | add a library class for this) |
9 | - dial with dtmfdial in case it's installed and there's no mobile | 9 | - dial with dtmfdial in case it's installed and there's no mobile |
10 | - 3rd column for 2. Contact | 10 | - 3rd column for 2. Contact |
11 | - Implementing additional Views (Phonebook, ...) | 11 | - Implementing additional Views (Phonebook, ...) |
12 | - Birthday & Anniversary Reminder | 12 | - Birthday & Anniversary Reminder |
13 | - Beaming of multiple contacts (current list/ by search or by category) | 13 | - Beaming of multiple contacts (current list/ by search or by category) |
14 | - Configure the letter-picker: lastname/fullname search | 14 | - Configure the letter-picker: lastname/fullname search |
15 | - User center of the joypad to switch back from card to listview ! | 15 | - User center of the joypad to switch back from card to listview ! |
16 | - Cursor-UP/Down: Should additionally scroll cardview if it is too large | 16 | - Cursor-UP/Down: Should additionally scroll cardview if it is too large |
17 | (behaviour should be selectable by configuration) | 17 | (behaviour should be selectable by configuration) |
18 | 18 | ||
19 | Known Bugs: | 19 | Known Bugs: |
20 | ----------- | 20 | ----------- |
21 | - Email-button: A lot of problems.. :( | 21 | - Default Email-button: A lot of problems: |
22 | If on second tab: The combo chooser is on the top left of the screen ! :( | ||
22 | - Default Email-Button: Sometimes not hiding the textfields completely | 23 | - Default Email-Button: Sometimes not hiding the textfields completely |
23 | 24 | ||
24 | Bugs but not in addressbook: | 25 | Bugs but not in addressbook: |
25 | ----------------------------- | 26 | ----------------------------- |
26 | - VCARD: If umlaut (äöüß) in address, the parser gets confused.. | 27 | - VCARD: If umlaut (äöüß) in address, the parser gets confused.. |
27 | 28 | ||
28 | - Exporting and reimporting of Jobtitle was reported to fail (Could not reproduce this ! (se)) | 29 | - Exporting and reimporting of Jobtitle was reported to fail (Could not reproduce this ! (se)) |
29 | 30 | ||
30 | 31 | ||
31 | Urgent: | 32 | Urgent: |
32 | -------- | 33 | -------- |
33 | ContactEditor: | 34 | ContactEditor: |
34 | - Contact-Editor is temporarely reenabled. Wait for replacement. | 35 | - Contact-Editor is temporarely reenabled. Wait for replacement. |
35 | - Redesign of Contacteditor | 36 | - Redesign of Contacteditor |
36 | - Category is on the wrong position after changing to personal and back to normal | 37 | - Category is on the wrong position after changing to personal and back to normal |
37 | ( Temporarily workaround: Category is never deactivated.. :S ) | 38 | ( Temporarily workaround: Category is never deactivated.. :S ) |
38 | 39 | ||
39 | - Personal and Business Web-page is not editable | ||
40 | 40 | ||
41 | Important: | 41 | Important: |
42 | ---------- | 42 | ---------- |
43 | 43 | ||
44 | - If new contact is added (contacteditor closed): focus (table, card) to | 44 | - If new contact is added (contacteditor closed): focus (table, card) to |
45 | this entry ! | 45 | this entry ! |
46 | - After search (Started with Return): KeyFocus should be on Tabelle | 46 | - After search (Started with Return): KeyFocus should be on Tabelle |
47 | 47 | ||
48 | - "What's this" should be added (Deleyed after Feature Freeze) | 48 | - "What's this" should be added (Deleyed after Feature Freeze) |
49 | 49 | ||
50 | Less important: | 50 | Less important: |
51 | --------------- | 51 | --------------- |
52 | - Reload if contacts were changed externally | 52 | - Reload if contacts were changed externally |
53 | - The picker (alphabetical sort widget) should be | 53 | - The picker (alphabetical sort widget) should be |
54 | placed verticaly or horizontally (configurable) | 54 | placed verticaly or horizontally (configurable) |
55 | - Find a smart solution for activating/deactivating the "send email" event | 55 | - Find a smart solution for activating/deactivating the "send email" event |
@@ -102,16 +102,17 @@ Fixed/Ready: | |||
102 | zu lange.. | 102 | zu lange.. |
103 | - VCARD: Import of Anniversary does not work correctly (currently disabled) | 103 | - VCARD: Import of Anniversary does not work correctly (currently disabled) |
104 | - Name order selected in "contacteditor" not used in list view. | 104 | - Name order selected in "contacteditor" not used in list view. |
105 | - OK-Key does not switch from Detailview (ablable) to Listview | 105 | - OK-Key does not switch from Detailview (ablable) to Listview |
106 | - Receiving of beams should open a dialog | 106 | - Receiving of beams should open a dialog |
107 | - Fix start of opie-mail | 107 | - Fix start of opie-mail |
108 | - Implement Button Pics | 108 | - Implement Button Pics |
109 | - Add a dialog to accept and optionally edit received contacts by IRDA. | 109 | - Add a dialog to accept and optionally edit received contacts by IRDA. |
110 | - Language not English (tested with german opie-translation): | 110 | - Language not English (tested with german opie-translation): |
111 | 1. Configure nicht übersetzt (alles leer). | 111 | 1. Configure nicht übersetzt (alles leer). |
112 | 2. Contacteditor nur teilweise übersetzt. | 112 | 2. Contacteditor nur teilweise übersetzt. |
113 | 3. Kategorie-Picker geht nicht. | 113 | 3. Kategorie-Picker geht nicht. |
114 | - Plugin for Today for Birthdays and Anniversaries | 114 | - Plugin for Today for Birthdays and Anniversaries |
115 | - Implement a picker/combo for the default email. | 115 | - Implement a picker/combo for the default email. |
116 | - Overview window cleanup needed.. | 116 | - Overview window cleanup needed.. |
117 | - Store last settings of combo-boxes | 117 | - Store last settings of combo-boxes |
118 | - Personal and Business Web-page is not editable | ||
diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index aec390d..55b1ba1 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp | |||
@@ -12,32 +12,33 @@ | |||
12 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 12 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
13 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 13 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
14 | ** | 14 | ** |
15 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 15 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
16 | ** | 16 | ** |
17 | ** Contact info@trolltech.com if any conditions of this licensing are | 17 | ** Contact info@trolltech.com if any conditions of this licensing are |
18 | ** not clear to you. | 18 | ** not clear to you. |
19 | ** | 19 | ** |
20 | **********************************************************************/ | 20 | **********************************************************************/ |
21 | 21 | ||
22 | 22 | ||
23 | #include <qpe/categoryselect.h> | 23 | #include <qpe/categoryselect.h> |
24 | #include <qpe/config.h> | 24 | #include <qpe/config.h> |
25 | #include <qpe/stringutil.h> | 25 | #include <qpe/stringutil.h> |
26 | #include <qpe/qcopenvelope_qws.h> | 26 | #include <qpe/qcopenvelope_qws.h> |
27 | #include <qpe/timestring.h> | 27 | #include <qpe/timestring.h> |
28 | #include <qpe/resource.h> | ||
28 | 29 | ||
29 | #include <opie/orecordlist.h> | 30 | #include <opie/orecordlist.h> |
30 | 31 | ||
31 | #include <qasciidict.h> | 32 | #include <qasciidict.h> |
32 | #include <qdatetime.h> | 33 | #include <qdatetime.h> |
33 | #include <qfile.h> | 34 | #include <qfile.h> |
34 | #include <qregexp.h> | 35 | #include <qregexp.h> |
35 | #include <qmessagebox.h> | 36 | #include <qmessagebox.h> |
36 | 37 | ||
37 | #include "abtable.h" | 38 | #include "abtable.h" |
38 | 39 | ||
39 | #include <errno.h> | 40 | #include <errno.h> |
40 | #include <fcntl.h> | 41 | #include <fcntl.h> |
41 | #include <unistd.h> | 42 | #include <unistd.h> |
42 | #include <stdlib.h> | 43 | #include <stdlib.h> |
43 | 44 | ||
@@ -201,43 +202,45 @@ bool AbTable::selectContact( int UID ) | |||
201 | } | 202 | } |
202 | } | 203 | } |
203 | 204 | ||
204 | if ( !found ){ | 205 | if ( !found ){ |
205 | ensureCellVisible( 0,0 ); | 206 | ensureCellVisible( 0,0 ); |
206 | setCurrentCell( 0, 0 ); | 207 | setCurrentCell( 0, 0 ); |
207 | } | 208 | } |
208 | 209 | ||
209 | setPaintingEnabled( TRUE ); | 210 | setPaintingEnabled( TRUE ); |
210 | 211 | ||
211 | return true; | 212 | return true; |
212 | } | 213 | } |
213 | 214 | ||
214 | void AbTable::insertIntoTable( const OContact& cnt, int row ) | 215 | void AbTable::insertIntoTable( const OContact& cnt, int row ) |
215 | { | 216 | { |
216 | //qWarning( "void AbTable::insertIntoTable( const OContact& cnt, %d )", row ); | 217 | //qWarning( "void AbTable::insertIntoTable( const OContact& cnt, %d )", row ); |
217 | QString strName, | 218 | QString strName; |
218 | strContact; | 219 | ContactItem contactItem; |
219 | 220 | ||
220 | strName = findContactName( cnt ); | 221 | strName = findContactName( cnt ); |
221 | strContact = findContactContact( cnt, row ); | 222 | contactItem = findContactContact( cnt, row ); |
222 | 223 | ||
223 | AbTableItem *ati; | 224 | AbTableItem *ati; |
224 | ati = new AbTableItem( this, QTableItem::Never, strName, strContact); | 225 | ati = new AbTableItem( this, QTableItem::Never, strName, contactItem.value ); |
225 | contactList.insert( ati, cnt ); | 226 | contactList.insert( ati, cnt ); |
226 | setItem( row, 0, ati ); | 227 | setItem( row, 0, ati ); |
227 | ati = new AbTableItem( this, QTableItem::Never, strContact, strName); | 228 | ati = new AbTableItem( this, QTableItem::Never, contactItem.value, strName); |
229 | if ( !contactItem.icon.isNull() ) | ||
230 | ati->setPixmap( contactItem.icon ); | ||
228 | setItem( row, 1, ati ); | 231 | setItem( row, 1, ati ); |
229 | 232 | ||
230 | //### cannot do this; table only has two columns at this point | 233 | //### cannot do this; table only has two columns at this point |
231 | // setItem( row, 2, new AbPickItem( this ) ); | 234 | // setItem( row, 2, new AbPickItem( this ) ); |
232 | 235 | ||
233 | } | 236 | } |
234 | 237 | ||
235 | 238 | ||
236 | 239 | ||
237 | void AbTable::columnClicked( int col ) | 240 | void AbTable::columnClicked( int col ) |
238 | { | 241 | { |
239 | if ( !sorting() ) | 242 | if ( !sorting() ) |
240 | return; | 243 | return; |
241 | 244 | ||
242 | if ( lastSortCol == -1 ) | 245 | if ( lastSortCol == -1 ) |
243 | lastSortCol = col; | 246 | lastSortCol = col; |
@@ -293,40 +296,44 @@ void AbTable::clear() | |||
293 | for ( int r = 0; r < numRows(); ++r ) { | 296 | for ( int r = 0; r < numRows(); ++r ) { |
294 | for ( int c = 0; c < numCols(); ++c ) { | 297 | for ( int c = 0; c < numCols(); ++c ) { |
295 | if ( cellWidget( r, c ) ) | 298 | if ( cellWidget( r, c ) ) |
296 | clearCellWidget( r, c ); | 299 | clearCellWidget( r, c ); |
297 | clearCell( r, c ); | 300 | clearCell( r, c ); |
298 | } | 301 | } |
299 | } | 302 | } |
300 | setNumRows( 0 ); | 303 | setNumRows( 0 ); |
301 | setPaintingEnabled( TRUE ); | 304 | setPaintingEnabled( TRUE ); |
302 | } | 305 | } |
303 | 306 | ||
304 | // Refresh updates column 2 if the contactsettings changed | 307 | // Refresh updates column 2 if the contactsettings changed |
305 | void AbTable::refresh() | 308 | void AbTable::refresh() |
306 | { | 309 | { |
307 | //qWarning( "void AbTable::refresh()" ); | 310 | //qWarning( "void AbTable::refresh()" ); |
308 | int rows = numRows(); | 311 | int rows = numRows(); |
309 | QString value; | ||
310 | AbTableItem *abi; | 312 | AbTableItem *abi; |
313 | ContactItem contactItem; | ||
311 | 314 | ||
312 | setPaintingEnabled( FALSE ); | 315 | setPaintingEnabled( FALSE ); |
313 | for ( int r = 0; r < rows; ++r ) { | 316 | for ( int r = 0; r < rows; ++r ) { |
314 | abi = static_cast<AbTableItem*>( item(r, 0) ); | 317 | abi = static_cast<AbTableItem*>( item(r, 0) ); |
315 | value = findContactContact( contactList[abi], r ); | 318 | contactItem = findContactContact( contactList[abi], r ); |
316 | static_cast<AbTableItem*>( item(r, 1) )->setItem( value, abi->text() ); | 319 | static_cast<AbTableItem*>( item(r, 1) )->setItem( contactItem.value, abi->text() ); |
320 | if ( !contactItem.icon.isNull() ) | ||
321 | static_cast<AbTableItem*>( item(r, 1) )-> | ||
322 | setPixmap( contactItem.icon ); | ||
323 | |||
317 | } | 324 | } |
318 | resort(); | 325 | resort(); |
319 | setPaintingEnabled( TRUE ); | 326 | setPaintingEnabled( TRUE ); |
320 | } | 327 | } |
321 | 328 | ||
322 | void AbTable::keyPressEvent( QKeyEvent *e ) | 329 | void AbTable::keyPressEvent( QKeyEvent *e ) |
323 | { | 330 | { |
324 | char key = toupper( e->ascii() ); | 331 | char key = toupper( e->ascii() ); |
325 | 332 | ||
326 | if ( key >= 'A' && key <= 'Z' ) | 333 | if ( key >= 'A' && key <= 'Z' ) |
327 | moveTo( key ); | 334 | moveTo( key ); |
328 | 335 | ||
329 | //qWarning("Received key .."); | 336 | //qWarning("Received key .."); |
330 | switch( e->key() ) { | 337 | switch( e->key() ) { |
331 | case Qt::Key_Space: | 338 | case Qt::Key_Space: |
332 | case Qt::Key_Return: | 339 | case Qt::Key_Return: |
@@ -605,143 +612,169 @@ void AbTable::setPaintingEnabled( bool e ) | |||
605 | //qWarning("OUT void AbTable::setPaintingEnabled( %d )->Nested: %d", e, countNested ); | 612 | //qWarning("OUT void AbTable::setPaintingEnabled( %d )->Nested: %d", e, countNested ); |
606 | } | 613 | } |
607 | 614 | ||
608 | void AbTable::viewportPaintEvent( QPaintEvent* e ) { | 615 | void AbTable::viewportPaintEvent( QPaintEvent* e ) { |
609 | //qWarning(" void AbTable::viewportPaintEvent( QPaintEvent* e ) -> %d", enablePainting); | 616 | //qWarning(" void AbTable::viewportPaintEvent( QPaintEvent* e ) -> %d", enablePainting); |
610 | if ( enablePainting ) | 617 | if ( enablePainting ) |
611 | QTable::viewportPaintEvent( e ); | 618 | QTable::viewportPaintEvent( e ); |
612 | } | 619 | } |
613 | 620 | ||
614 | 621 | ||
615 | 622 | ||
616 | void AbTable::rowHeightChanged( int row ) | 623 | void AbTable::rowHeightChanged( int row ) |
617 | { | 624 | { |
618 | if ( enablePainting ) | 625 | if ( enablePainting ) |
619 | QTable::rowHeightChanged( row ); | 626 | QTable::rowHeightChanged( row ); |
620 | } | 627 | } |
621 | QString AbTable::findContactContact( const OContact &entry, int /* row */ ) | 628 | ContactItem AbTable::findContactContact( const OContact &entry, int /* row */ ) |
622 | { | 629 | { |
623 | QString value; | 630 | |
624 | value = ""; | 631 | ContactItem item; |
632 | |||
633 | item.value = ""; | ||
634 | |||
625 | for ( QValueList<int>::ConstIterator it = intFields.begin(); | 635 | for ( QValueList<int>::ConstIterator it = intFields.begin(); |
626 | it != intFields.end(); ++it ) { | 636 | it != intFields.end(); ++it ) { |
627 | switch ( *it ) { | 637 | switch ( *it ) { |
628 | default: | 638 | default: |
629 | break; | 639 | break; |
630 | case Qtopia::Title: | 640 | case Qtopia::Title: |
631 | value = entry.title(); | 641 | item.value = entry.title(); |
632 | break; | 642 | break; |
633 | case Qtopia::Suffix: | 643 | case Qtopia::Suffix: |
634 | value = entry.suffix(); | 644 | item.value = entry.suffix(); |
635 | break; | 645 | break; |
636 | case Qtopia::FileAs: | 646 | case Qtopia::FileAs: |
637 | value = entry.fileAs(); | 647 | item.value = entry.fileAs(); |
638 | break; | 648 | break; |
639 | case Qtopia::DefaultEmail: | 649 | case Qtopia::DefaultEmail: |
640 | value = entry.defaultEmail(); | 650 | item.value = entry.defaultEmail(); |
651 | if ( !item.value.isEmpty() ) | ||
652 | item.icon = Resource::loadPixmap( "addressbook/email" ); | ||
653 | break; | ||
641 | case Qtopia::Emails: | 654 | case Qtopia::Emails: |
642 | value = entry.emails(); | 655 | item.value = entry.emails(); |
656 | if ( !item.value.isEmpty() ) | ||
657 | item.icon = Resource::loadPixmap( "addressbook/email" ); | ||
643 | break; | 658 | break; |
644 | case Qtopia::HomeStreet: | 659 | case Qtopia::HomeStreet: |
645 | value = entry.homeStreet(); | 660 | item.value = entry.homeStreet(); |
646 | break; | 661 | break; |
647 | case Qtopia::HomeCity: | 662 | case Qtopia::HomeCity: |
648 | value = entry.homeCity(); | 663 | item.value = entry.homeCity(); |
649 | break; | 664 | break; |
650 | case Qtopia::HomeState: | 665 | case Qtopia::HomeState: |
651 | value = entry.homeState(); | 666 | item.value = entry.homeState(); |
652 | break; | 667 | break; |
653 | case Qtopia::HomeZip: | 668 | case Qtopia::HomeZip: |
654 | value = entry.homeZip(); | 669 | item.value = entry.homeZip(); |
655 | break; | 670 | break; |
656 | case Qtopia::HomeCountry: | 671 | case Qtopia::HomeCountry: |
657 | value = entry.homeCountry(); | 672 | item.value = entry.homeCountry(); |
658 | break; | 673 | break; |
659 | case Qtopia::HomePhone: | 674 | case Qtopia::HomePhone: |
660 | value = entry.homePhone(); | 675 | item.value = entry.homePhone(); |
676 | if ( !item.value.isEmpty() ) | ||
677 | item.icon = Resource::loadPixmap( "addressbook/phonehome" ); | ||
661 | break; | 678 | break; |
662 | case Qtopia::HomeFax: | 679 | case Qtopia::HomeFax: |
663 | value = entry.homeFax(); | 680 | item.value = entry.homeFax(); |
681 | if ( !item.value.isEmpty() ) | ||
682 | item.icon = Resource::loadPixmap( "addressbook/faxhome" ); | ||
664 | break; | 683 | break; |
665 | case Qtopia::HomeMobile: | 684 | case Qtopia::HomeMobile: |
666 | value = entry.homeMobile(); | 685 | item.value = entry.homeMobile(); |
686 | if ( !item.value.isEmpty() ) | ||
687 | item.icon = Resource::loadPixmap( "addressbook/mobilehome" ); | ||
667 | break; | 688 | break; |
668 | case Qtopia::HomeWebPage: | 689 | case Qtopia::HomeWebPage: |
669 | value = entry.homeWebpage(); | 690 | item.value = entry.homeWebpage(); |
691 | if ( !item.value.isEmpty() ) | ||
692 | item.icon = Resource::loadPixmap( "addressbook/webpagehome" ); | ||
670 | break; | 693 | break; |
671 | case Qtopia::Company: | 694 | case Qtopia::Company: |
672 | value = entry.company(); | 695 | item.value = entry.company(); |
673 | break; | 696 | break; |
674 | case Qtopia::BusinessCity: | 697 | case Qtopia::BusinessCity: |
675 | value = entry.businessCity(); | 698 | item.value = entry.businessCity(); |
676 | break; | 699 | break; |
677 | case Qtopia::BusinessStreet: | 700 | case Qtopia::BusinessStreet: |
678 | value = entry.businessStreet(); | 701 | item.value = entry.businessStreet(); |
679 | break; | 702 | break; |
680 | case Qtopia::BusinessZip: | 703 | case Qtopia::BusinessZip: |
681 | value = entry.businessZip(); | 704 | item.value = entry.businessZip(); |
682 | break; | 705 | break; |
683 | case Qtopia::BusinessCountry: | 706 | case Qtopia::BusinessCountry: |
684 | value = entry.businessCountry(); | 707 | item.value = entry.businessCountry(); |
685 | break; | 708 | break; |
686 | case Qtopia::BusinessWebPage: | 709 | case Qtopia::BusinessWebPage: |
687 | value = entry.businessWebpage(); | 710 | item.value = entry.businessWebpage(); |
711 | if ( !item.value.isEmpty() ) | ||
712 | item.icon = Resource::loadPixmap( "addressbook/webpagework" ); | ||
688 | break; | 713 | break; |
689 | case Qtopia::JobTitle: | 714 | case Qtopia::JobTitle: |
690 | value = entry.jobTitle(); | 715 | item.value = entry.jobTitle(); |
691 | break; | 716 | break; |
692 | case Qtopia::Department: | 717 | case Qtopia::Department: |
693 | value = entry.department(); | 718 | item.value = entry.department(); |
694 | break; | 719 | break; |
695 | case Qtopia::Office: | 720 | case Qtopia::Office: |
696 | value = entry.office(); | 721 | item.value = entry.office(); |
697 | break; | 722 | break; |
698 | case Qtopia::BusinessPhone: | 723 | case Qtopia::BusinessPhone: |
699 | value = entry.businessPhone(); | 724 | item.value = entry.businessPhone(); |
725 | if ( !item.value.isEmpty() ) | ||
726 | item.icon = Resource::loadPixmap( "addressbook/phonework" ); | ||
700 | break; | 727 | break; |
701 | case Qtopia::BusinessFax: | 728 | case Qtopia::BusinessFax: |
702 | value = entry.businessFax(); | 729 | item.value = entry.businessFax(); |
730 | if ( !item.value.isEmpty() ) | ||
731 | item.icon = Resource::loadPixmap( "addressbook/faxwork" ); | ||
703 | break; | 732 | break; |
704 | case Qtopia::BusinessMobile: | 733 | case Qtopia::BusinessMobile: |
705 | value = entry.businessMobile(); | 734 | item.value = entry.businessMobile(); |
735 | if ( !item.value.isEmpty() ) | ||
736 | item.icon = Resource::loadPixmap( "addressbook/mobilework" ); | ||
706 | break; | 737 | break; |
707 | case Qtopia::BusinessPager: | 738 | case Qtopia::BusinessPager: |
708 | value = entry.businessPager(); | 739 | item.value = entry.businessPager(); |
709 | break; | 740 | break; |
710 | case Qtopia::Profession: | 741 | case Qtopia::Profession: |
711 | value = entry.profession(); | 742 | item.value = entry.profession(); |
712 | break; | 743 | break; |
713 | case Qtopia::Assistant: | 744 | case Qtopia::Assistant: |
714 | value = entry.assistant(); | 745 | item.value = entry.assistant(); |
715 | break; | 746 | break; |
716 | case Qtopia::Manager: | 747 | case Qtopia::Manager: |
717 | value = entry.manager(); | 748 | item.value = entry.manager(); |
718 | break; | 749 | break; |
719 | case Qtopia::Spouse: | 750 | case Qtopia::Spouse: |
720 | value = entry.spouse(); | 751 | item.value = entry.spouse(); |
721 | break; | 752 | break; |
722 | case Qtopia::Gender: | 753 | case Qtopia::Gender: |
723 | value = entry.gender(); | 754 | item.value = entry.gender(); |
724 | break; | 755 | break; |
725 | case Qtopia::Birthday: | 756 | case Qtopia::Birthday: |
726 | if ( ! entry.birthday().isNull() ) | 757 | if ( ! entry.birthday().isNull() ){ |
727 | value = TimeString::numberDateString( entry.birthday() ); | 758 | item.value = TimeString::numberDateString( entry.birthday() ); |
759 | } | ||
728 | break; | 760 | break; |
729 | case Qtopia::Anniversary: | 761 | case Qtopia::Anniversary: |
730 | if ( ! entry.anniversary().isNull() ) | 762 | if ( ! entry.anniversary().isNull() ){ |
731 | value = TimeString::numberDateString( entry.anniversary() ); | 763 | item.value = TimeString::numberDateString( entry.anniversary() ); |
764 | } | ||
732 | break; | 765 | break; |
733 | case Qtopia::Nickname: | 766 | case Qtopia::Nickname: |
734 | value = entry.nickname(); | 767 | item.value = entry.nickname(); |
735 | break; | 768 | break; |
736 | case Qtopia::Children: | 769 | case Qtopia::Children: |
737 | value = entry.children(); | 770 | item.value = entry.children(); |
738 | break; | 771 | break; |
739 | case Qtopia::Notes: | 772 | case Qtopia::Notes: |
740 | value = entry.notes(); | 773 | item.value = entry.notes(); |
741 | break; | 774 | break; |
742 | } | 775 | } |
743 | if ( !value.isEmpty() ) | 776 | if ( !item.value.isEmpty() ) |
744 | break; | 777 | break; |
745 | } | 778 | } |
746 | return value; | 779 | return item; |
747 | } | 780 | } |
diff --git a/core/pim/addressbook/abtable.h b/core/pim/addressbook/abtable.h index 9825665..092e86f 100644 --- a/core/pim/addressbook/abtable.h +++ b/core/pim/addressbook/abtable.h | |||
@@ -17,48 +17,58 @@ | |||
17 | ** Contact info@trolltech.com if any conditions of this licensing are | 17 | ** Contact info@trolltech.com if any conditions of this licensing are |
18 | ** not clear to you. | 18 | ** not clear to you. |
19 | ** | 19 | ** |
20 | **********************************************************************/ | 20 | **********************************************************************/ |
21 | 21 | ||
22 | #ifndef ABTABLE_H | 22 | #ifndef ABTABLE_H |
23 | #define ABTABLE_H | 23 | #define ABTABLE_H |
24 | 24 | ||
25 | #include <qpe/categories.h> | 25 | #include <qpe/categories.h> |
26 | #include <opie/ocontact.h> | 26 | #include <opie/ocontact.h> |
27 | #include <opie/ocontactaccess.h> | 27 | #include <opie/ocontactaccess.h> |
28 | 28 | ||
29 | #include <qmap.h> | 29 | #include <qmap.h> |
30 | #include <qtable.h> | 30 | #include <qtable.h> |
31 | #include <qstringlist.h> | 31 | #include <qstringlist.h> |
32 | #include <qcombobox.h> | 32 | #include <qcombobox.h> |
33 | #include <qpixmap.h> | ||
33 | 34 | ||
34 | class AbTableItem : public QTableItem | 35 | class AbTableItem : public QTableItem |
35 | { | 36 | { |
36 | public: | 37 | public: |
37 | AbTableItem( QTable *t, EditType et, const QString &s, | 38 | AbTableItem( QTable *t, EditType et, const QString &s, |
38 | const QString &secondSortKey); | 39 | const QString &secondSortKey); |
39 | QString entryKey() const; | 40 | QString entryKey() const; |
40 | void setEntryKey( const QString & k ); | 41 | void setEntryKey( const QString & k ); |
41 | virtual int alignment() const; | 42 | virtual int alignment() const; |
42 | virtual QString key() const; | 43 | virtual QString key() const; |
43 | void setItem( const QString &txt, const QString &secondKey ); | 44 | void setItem( const QString &txt, const QString &secondKey ); |
44 | 45 | ||
45 | private: | 46 | private: |
46 | QString sortKey; | 47 | QString sortKey; |
47 | }; | 48 | }; |
48 | 49 | ||
50 | // This is a simple container, storing all contact | ||
51 | // information | ||
52 | class ContactItem | ||
53 | { | ||
54 | public: | ||
55 | QPixmap icon; | ||
56 | QString value; | ||
57 | }; | ||
58 | |||
49 | class AbPickItem : public QTableItem | 59 | class AbPickItem : public QTableItem |
50 | { | 60 | { |
51 | public: | 61 | public: |
52 | AbPickItem( QTable *t ); | 62 | AbPickItem( QTable *t ); |
53 | 63 | ||
54 | QWidget *createEditor() const; | 64 | QWidget *createEditor() const; |
55 | void setContentFromEditor( QWidget *w ); | 65 | void setContentFromEditor( QWidget *w ); |
56 | 66 | ||
57 | private: | 67 | private: |
58 | QGuardedPtr<QComboBox> cb; | 68 | QGuardedPtr<QComboBox> cb; |
59 | }; | 69 | }; |
60 | 70 | ||
61 | class AbTable : public QTable | 71 | class AbTable : public QTable |
62 | { | 72 | { |
63 | Q_OBJECT | 73 | Q_OBJECT |
64 | 74 | ||
@@ -102,33 +112,33 @@ signals: | |||
102 | protected: | 112 | protected: |
103 | virtual void keyPressEvent( QKeyEvent *e ); | 113 | virtual void keyPressEvent( QKeyEvent *e ); |
104 | 114 | ||
105 | // int rowHeight( int ) const; | 115 | // int rowHeight( int ) const; |
106 | // int rowPos( int row ) const; | 116 | // int rowPos( int row ) const; |
107 | // virtual int rowAt( int pos ) const; | 117 | // virtual int rowAt( int pos ) const; |
108 | 118 | ||
109 | 119 | ||
110 | protected slots: | 120 | protected slots: |
111 | void moveTo( char ); | 121 | void moveTo( char ); |
112 | virtual void columnClicked( int col ); | 122 | virtual void columnClicked( int col ); |
113 | void itemClicked(int,int col); | 123 | void itemClicked(int,int col); |
114 | void rowHeightChanged( int row ); | 124 | void rowHeightChanged( int row ); |
115 | 125 | ||
116 | private: | 126 | private: |
117 | void insertIntoTable( const OContact &cnt, int row ); | 127 | void insertIntoTable( const OContact &cnt, int row ); |
118 | QString findContactContact( const OContact &entry, int row ); | 128 | ContactItem findContactContact( const OContact &entry, int row ); |
119 | void fitColumns(); | 129 | void fitColumns(); |
120 | void resizeRows(); | 130 | void resizeRows(); |
121 | void realignTable(); | 131 | void realignTable(); |
122 | void resort(); | 132 | void resort(); |
123 | void updateVisible(); | 133 | void updateVisible(); |
124 | 134 | ||
125 | int lastSortCol; | 135 | int lastSortCol; |
126 | bool asc; | 136 | bool asc; |
127 | QMap<AbTableItem*, OContact> contactList; | 137 | QMap<AbTableItem*, OContact> contactList; |
128 | QValueList<int> intFields; | 138 | QValueList<int> intFields; |
129 | QStringList choicenames; | 139 | QStringList choicenames; |
130 | bool enablePainting; | 140 | bool enablePainting; |
131 | bool columnVisible; | 141 | bool columnVisible; |
132 | int countNested; | 142 | int countNested; |
133 | 143 | ||
134 | OContactAccess::List m_viewList; | 144 | OContactAccess::List m_viewList; |
diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index ad8315d..881b839 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp | |||
@@ -188,46 +188,47 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, | |||
188 | 0, this, 0 ); | 188 | 0, this, 0 ); |
189 | actionBeam = a; | 189 | actionBeam = a; |
190 | connect( a, SIGNAL( activated() ), this, SLOT( slotBeam() ) ); | 190 | connect( a, SIGNAL( activated() ), this, SLOT( slotBeam() ) ); |
191 | a->addTo( edit ); | 191 | a->addTo( edit ); |
192 | a->addTo( listTools ); | 192 | a->addTo( listTools ); |
193 | } | 193 | } |
194 | 194 | ||
195 | edit->insertSeparator(); | 195 | edit->insertSeparator(); |
196 | 196 | ||
197 | a = new QAction( tr("Import vCard"), QString::null, 0, 0); | 197 | a = new QAction( tr("Import vCard"), QString::null, 0, 0); |
198 | actionPersonal = a; | 198 | actionPersonal = a; |
199 | connect( a, SIGNAL( activated() ), this, SLOT( importvCard() ) ); | 199 | connect( a, SIGNAL( activated() ), this, SLOT( importvCard() ) ); |
200 | a->addTo( edit ); | 200 | a->addTo( edit ); |
201 | 201 | ||
202 | edit->insertSeparator(); | 202 | edit->insertSeparator(); |
203 | 203 | ||
204 | a = new QAction( tr("My Personal Details"), QString::null, 0, 0, 0, TRUE ); | 204 | a = new QAction( tr("My Personal Details"), Resource::loadPixmap( "addressbook/identity" ), |
205 | QString::null, 0, this, 0 ); | ||
205 | actionPersonal = a; | 206 | actionPersonal = a; |
206 | connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) ); | 207 | connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) ); |
207 | a->addTo( edit ); | 208 | a->addTo( edit ); |
208 | 209 | ||
209 | 210 | ||
210 | #ifdef __DEBUG_RELEASE | 211 | #ifdef __DEBUG_RELEASE |
211 | // Remove this function for public Release ! This is only | 212 | // Remove this function for public Release ! This is only |
212 | // for debug purposes .. | 213 | // for debug purposes .. |
213 | a = new QAction( tr( "Save all Data"), QString::null, 0, 0 ); | 214 | a = new QAction( tr( "Save all Data"), QString::null, 0, 0 ); |
214 | connect( a, SIGNAL( activated() ), this , SLOT( slotSave() ) ); | 215 | connect( a, SIGNAL( activated() ), this , SLOT( slotSave() ) ); |
215 | a->addTo( edit ); | 216 | a->addTo( edit ); |
216 | #endif | 217 | #endif |
217 | a = new QAction( tr( "Config" ), Resource::loadPixmap( "today/config" ), QString::null, | 218 | a = new QAction( tr( "Config" ), Resource::loadPixmap( "addressbook/configure" ), QString::null, |
218 | 0, this, 0 ); | 219 | 0, this, 0 ); |
219 | connect( a, SIGNAL( activated() ), this, SLOT( slotConfig() ) ); | 220 | connect( a, SIGNAL( activated() ), this, SLOT( slotConfig() ) ); |
220 | a->addTo( edit ); | 221 | a->addTo( edit ); |
221 | 222 | ||
222 | // Create Views | 223 | // Create Views |
223 | listContainer = new QWidget( this ); | 224 | listContainer = new QWidget( this ); |
224 | QVBoxLayout *vb = new QVBoxLayout( listContainer ); | 225 | QVBoxLayout *vb = new QVBoxLayout( listContainer ); |
225 | 226 | ||
226 | m_abView = new AbView( listContainer, m_config.orderList() ); | 227 | m_abView = new AbView( listContainer, m_config.orderList() ); |
227 | vb->addWidget( m_abView ); | 228 | vb->addWidget( m_abView ); |
228 | // abList->setHScrollBarMode( QScrollView::AlwaysOff ); | 229 | // abList->setHScrollBarMode( QScrollView::AlwaysOff ); |
229 | connect( m_abView, SIGNAL( signalViewSwitched ( int ) ), | 230 | connect( m_abView, SIGNAL( signalViewSwitched ( int ) ), |
230 | this, SLOT( slotViewSwitched( int ) ) ); | 231 | this, SLOT( slotViewSwitched( int ) ) ); |
231 | 232 | ||
232 | 233 | ||
233 | QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) ); | 234 | QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) ); |
diff --git a/core/pim/addressbook/configdlg.cpp b/core/pim/addressbook/configdlg.cpp index afba688..f5c0c5b 100644 --- a/core/pim/addressbook/configdlg.cpp +++ b/core/pim/addressbook/configdlg.cpp | |||
@@ -1,35 +1,46 @@ | |||
1 | #include "configdlg.h" | 1 | #include "configdlg.h" |
2 | #include "ocontactfields.h" | 2 | #include "ocontactfields.h" |
3 | |||
3 | #include <qcheckbox.h> | 4 | #include <qcheckbox.h> |
4 | #include <qradiobutton.h> | 5 | #include <qradiobutton.h> |
5 | #include <qlistbox.h> | 6 | #include <qlistbox.h> |
6 | #include <qpushbutton.h> | 7 | #include <qpushbutton.h> |
8 | #include <qiconset.h> | ||
9 | |||
10 | #include <qpe/resource.h> | ||
7 | 11 | ||
8 | #include <opie/ocontact.h> | 12 | #include <opie/ocontact.h> |
9 | 13 | ||
10 | ConfigDlg::ConfigDlg( QWidget *parent, const char *name): | 14 | ConfigDlg::ConfigDlg( QWidget *parent, const char *name): |
11 | ConfigDlg_Base(parent, name, true ) | 15 | ConfigDlg_Base(parent, name, true ) |
12 | { | 16 | { |
13 | contFields = OContactFields::trfields(); | 17 | contFields = OContactFields::trfields(); |
14 | 18 | ||
15 | // We add all Fields into the Listbox | 19 | // We add all Fields into the Listbox |
16 | for (uint i=0; i < contFields.count(); i++) { | 20 | for (uint i=0; i < contFields.count(); i++) { |
17 | allFieldListBox->insertItem( contFields[i] ); | 21 | allFieldListBox->insertItem( contFields[i] ); |
18 | } | 22 | } |
19 | 23 | ||
24 | // Set Pics to Buttons and Tabs | ||
25 | m_upButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/up" ) ) ); | ||
26 | m_downButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/down" ) ) ); | ||
27 | m_addButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/add" ) ) ); | ||
28 | m_removeButton->setIconSet( QIconSet( Resource::loadPixmap( "addressbook/sub" ) ) ); | ||
29 | |||
30 | |||
20 | // Get the translation maps between Field ID and translated strings | 31 | // Get the translation maps between Field ID and translated strings |
21 | m_mapStrToID = OContactFields::trFieldsToId(); | 32 | m_mapStrToID = OContactFields::trFieldsToId(); |
22 | m_mapIDToStr = OContactFields::idToTrFields(); | 33 | m_mapIDToStr = OContactFields::idToTrFields(); |
23 | 34 | ||
24 | connect ( m_addButton, SIGNAL( clicked() ), this, SLOT( slotItemAdd() ) ); | 35 | connect ( m_addButton, SIGNAL( clicked() ), this, SLOT( slotItemAdd() ) ); |
25 | connect ( m_removeButton, SIGNAL( clicked() ), this, SLOT( slotItemRemove() ) ); | 36 | connect ( m_removeButton, SIGNAL( clicked() ), this, SLOT( slotItemRemove() ) ); |
26 | connect ( m_upButton, SIGNAL( clicked() ), this, SLOT( slotItemUp() ) ); | 37 | connect ( m_upButton, SIGNAL( clicked() ), this, SLOT( slotItemUp() ) ); |
27 | connect ( m_downButton, SIGNAL( clicked() ), this, SLOT( slotItemDown() ) ); | 38 | connect ( m_downButton, SIGNAL( clicked() ), this, SLOT( slotItemDown() ) ); |
28 | } | 39 | } |
29 | 40 | ||
30 | void ConfigDlg::slotItemUp() | 41 | void ConfigDlg::slotItemUp() |
31 | { | 42 | { |
32 | qWarning( "void ConfigDlg::slotItemUp()" ); | 43 | qWarning( "void ConfigDlg::slotItemUp()" ); |
33 | 44 | ||
34 | int i = fieldListBox->currentItem(); | 45 | int i = fieldListBox->currentItem(); |
35 | if ( i > 0 ) { | 46 | if ( i > 0 ) { |
diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index 9efb8c0..97573af 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp | |||
@@ -535,36 +535,35 @@ void ContactEditor::init() { | |||
535 | 535 | ||
536 | ++counter; | 536 | ++counter; |
537 | 537 | ||
538 | // Gender | 538 | // Gender |
539 | l = new QLabel( tr("Gender"), container ); | 539 | l = new QLabel( tr("Gender"), container ); |
540 | gl->addWidget( l, counter, 0 ); | 540 | gl->addWidget( l, counter, 0 ); |
541 | cmbGender = new QComboBox( container ); | 541 | cmbGender = new QComboBox( container ); |
542 | cmbGender->insertItem( "", 0 ); | 542 | cmbGender->insertItem( "", 0 ); |
543 | cmbGender->insertItem( tr("Male"), 1); | 543 | cmbGender->insertItem( tr("Male"), 1); |
544 | cmbGender->insertItem( tr("Female"), 2); | 544 | cmbGender->insertItem( tr("Female"), 2); |
545 | gl->addWidget( cmbGender, counter, 1 ); | 545 | gl->addWidget( cmbGender, counter, 1 ); |
546 | 546 | ||
547 | ++counter; | 547 | ++counter; |
548 | 548 | ||
549 | // Create Labels and lineedit fields for every dynamic entry | 549 | // Create Labels and lineedit fields for every dynamic entry |
550 | QStringList::ConstIterator it = slDynamicEntries.begin(); | 550 | QStringList::ConstIterator it = slDynamicEntries.begin(); |
551 | QStringList::ConstIterator trit = trlDynamicEntries.begin(); | ||
552 | QMap<QString, int> mapStrToID = OContactFields::untrFieldsToId(); | 551 | QMap<QString, int> mapStrToID = OContactFields::untrFieldsToId(); |
553 | QMap<int, QString> mapIdToStr = OContactFields::idToTrFields(); | 552 | QMap<int, QString> mapIdToStr = OContactFields::idToTrFields(); |
554 | for (i = counter; it != slDynamicEntries.end(); i++, ++it, ++trit) { | 553 | for (i = counter; it != slDynamicEntries.end(); i++, ++it ) { |
555 | 554 | ||
556 | if (((*it) == "Anniversary") || | 555 | if (((*it) == "Anniversary") || |
557 | ((*it) == "Birthday")|| ((*it) == "Gender")) continue; | 556 | ((*it) == "Birthday")|| ((*it) == "Gender")) continue; |
558 | 557 | ||
559 | l = new QLabel( mapIdToStr[mapStrToID[*it]].utf8() , container ); | 558 | l = new QLabel( mapIdToStr[mapStrToID[*it]].utf8() , container ); |
560 | listName.append( l ); | 559 | listName.append( l ); |
561 | gl->addWidget( l, i, 0 ); | 560 | gl->addWidget( l, i, 0 ); |
562 | QLineEdit *e = new QLineEdit( container ); | 561 | QLineEdit *e = new QLineEdit( container ); |
563 | listValue.append( e ); | 562 | listValue.append( e ); |
564 | gl->addWidget( e, i, 1); | 563 | gl->addWidget( e, i, 1); |
565 | } | 564 | } |
566 | // Fill labels with names.. | 565 | // Fill labels with names.. |
567 | //loadFields(); | 566 | //loadFields(); |
568 | 567 | ||
569 | 568 | ||
570 | tabMain->insertTab( tabViewport, tr( "Details" ) ); | 569 | tabMain->insertTab( tabViewport, tr( "Details" ) ); |
diff --git a/core/pim/addressbook/ocontactfields.cpp b/core/pim/addressbook/ocontactfields.cpp index 18b68c4..ffb88e8 100644 --- a/core/pim/addressbook/ocontactfields.cpp +++ b/core/pim/addressbook/ocontactfields.cpp | |||
@@ -59,65 +59,73 @@ QStringList OContactFields::trdetailsfields( bool sorted ) | |||
59 | return list; | 59 | return list; |
60 | } | 60 | } |
61 | 61 | ||
62 | 62 | ||
63 | /*! | 63 | /*! |
64 | \internal | 64 | \internal |
65 | Returns a translated list of phone field names for a contact. | 65 | Returns a translated list of phone field names for a contact. |
66 | */ | 66 | */ |
67 | QStringList OContactFields::trphonefields( bool sorted ) | 67 | QStringList OContactFields::trphonefields( bool sorted ) |
68 | { | 68 | { |
69 | QStringList list; | 69 | QStringList list; |
70 | QMap<int, QString> mapIdToStr = idToTrFields(); | 70 | QMap<int, QString> mapIdToStr = idToTrFields(); |
71 | 71 | ||
72 | list.append( mapIdToStr[Qtopia::BusinessPhone] ); | 72 | list.append( mapIdToStr[Qtopia::BusinessPhone] ); |
73 | list.append( mapIdToStr[Qtopia::BusinessFax] ); | 73 | list.append( mapIdToStr[Qtopia::BusinessFax] ); |
74 | list.append( mapIdToStr[Qtopia::BusinessMobile] ); | 74 | list.append( mapIdToStr[Qtopia::BusinessMobile] ); |
75 | list.append( mapIdToStr[Qtopia::BusinessPager] ); | ||
76 | list.append( mapIdToStr[Qtopia::BusinessWebPage] ); | ||
75 | 77 | ||
76 | list.append( mapIdToStr[Qtopia::DefaultEmail] ); | 78 | list.append( mapIdToStr[Qtopia::DefaultEmail] ); |
77 | list.append( mapIdToStr[Qtopia::Emails] ); | 79 | list.append( mapIdToStr[Qtopia::Emails] ); |
78 | 80 | ||
79 | list.append( mapIdToStr[Qtopia::HomePhone] ); | 81 | list.append( mapIdToStr[Qtopia::HomePhone] ); |
80 | list.append( mapIdToStr[Qtopia::HomeFax] ); | 82 | list.append( mapIdToStr[Qtopia::HomeFax] ); |
81 | list.append( mapIdToStr[Qtopia::HomeMobile] ); | 83 | list.append( mapIdToStr[Qtopia::HomeMobile] ); |
84 | // list.append( mapIdToStr[Qtopia::HomePager] ); | ||
85 | list.append( mapIdToStr[Qtopia::HomeWebPage] ); | ||
82 | 86 | ||
83 | if (sorted) list.sort(); | 87 | if (sorted) list.sort(); |
84 | 88 | ||
85 | return list; | 89 | return list; |
86 | } | 90 | } |
87 | 91 | ||
88 | 92 | ||
89 | /*! | 93 | /*! |
90 | \internal | 94 | \internal |
91 | Returns a list of phone field names for a contact. | 95 | Returns a list of phone field names for a contact. |
92 | */ | 96 | */ |
93 | QStringList OContactFields::untrphonefields( bool sorted ) | 97 | QStringList OContactFields::untrphonefields( bool sorted ) |
94 | { | 98 | { |
95 | QStringList list; | 99 | QStringList list; |
96 | QMap<int, QString> mapIdToStr = idToUntrFields(); | 100 | QMap<int, QString> mapIdToStr = idToUntrFields(); |
97 | 101 | ||
98 | list.append( mapIdToStr[ Qtopia::BusinessPhone ] ); | 102 | list.append( mapIdToStr[ Qtopia::BusinessPhone ] ); |
99 | list.append( mapIdToStr[ Qtopia::BusinessFax ] ); | 103 | list.append( mapIdToStr[ Qtopia::BusinessFax ] ); |
100 | list.append( mapIdToStr[ Qtopia::BusinessMobile ] ); | 104 | list.append( mapIdToStr[ Qtopia::BusinessMobile ] ); |
105 | list.append( mapIdToStr[ Qtopia::BusinessPager ] ); | ||
106 | list.append( mapIdToStr[ Qtopia::BusinessWebPage ] ); | ||
101 | 107 | ||
102 | list.append( mapIdToStr[ Qtopia::DefaultEmail ] ); | 108 | list.append( mapIdToStr[ Qtopia::DefaultEmail ] ); |
103 | list.append( mapIdToStr[ Qtopia::Emails ] ); | 109 | list.append( mapIdToStr[ Qtopia::Emails ] ); |
104 | 110 | ||
105 | list.append( mapIdToStr[ Qtopia::HomePhone ] ); | 111 | list.append( mapIdToStr[ Qtopia::HomePhone ] ); |
106 | list.append( mapIdToStr[ Qtopia::HomeFax ] ); | 112 | list.append( mapIdToStr[ Qtopia::HomeFax ] ); |
107 | list.append( mapIdToStr[ Qtopia::HomeMobile ] ); | 113 | list.append( mapIdToStr[ Qtopia::HomeMobile ] ); |
114 | //list.append( mapIdToStr[Qtopia::HomePager] ); | ||
115 | list.append( mapIdToStr[Qtopia::HomeWebPage] ); | ||
108 | 116 | ||
109 | if (sorted) list.sort(); | 117 | if (sorted) list.sort(); |
110 | 118 | ||
111 | return list; | 119 | return list; |
112 | } | 120 | } |
113 | 121 | ||
114 | 122 | ||
115 | /*! | 123 | /*! |
116 | \internal | 124 | \internal |
117 | Returns a translated list of field names for a contact. | 125 | Returns a translated list of field names for a contact. |
118 | */ | 126 | */ |
119 | QStringList OContactFields::trfields( bool sorted ) | 127 | QStringList OContactFields::trfields( bool sorted ) |
120 | { | 128 | { |
121 | QStringList list; | 129 | QStringList list; |
122 | QMap<int, QString> mapIdToStr = idToTrFields(); | 130 | QMap<int, QString> mapIdToStr = idToTrFields(); |
123 | 131 | ||
@@ -126,41 +134,38 @@ QStringList OContactFields::trfields( bool sorted ) | |||
126 | list.append( mapIdToStr[Qtopia::MiddleName] ); | 134 | list.append( mapIdToStr[Qtopia::MiddleName] ); |
127 | list.append( mapIdToStr[Qtopia::LastName] ); | 135 | list.append( mapIdToStr[Qtopia::LastName] ); |
128 | list.append( mapIdToStr[Qtopia::Suffix] ); | 136 | list.append( mapIdToStr[Qtopia::Suffix] ); |
129 | list.append( mapIdToStr[Qtopia::FileAs] ); | 137 | list.append( mapIdToStr[Qtopia::FileAs] ); |
130 | 138 | ||
131 | list.append( mapIdToStr[Qtopia::JobTitle] ); | 139 | list.append( mapIdToStr[Qtopia::JobTitle] ); |
132 | list.append( mapIdToStr[Qtopia::Department] ); | 140 | list.append( mapIdToStr[Qtopia::Department] ); |
133 | list.append( mapIdToStr[Qtopia::Company] ); | 141 | list.append( mapIdToStr[Qtopia::Company] ); |
134 | 142 | ||
135 | list += trphonefields( sorted ); | 143 | list += trphonefields( sorted ); |
136 | 144 | ||
137 | list.append( mapIdToStr[Qtopia::BusinessStreet] ); | 145 | list.append( mapIdToStr[Qtopia::BusinessStreet] ); |
138 | list.append( mapIdToStr[Qtopia::BusinessCity] ); | 146 | list.append( mapIdToStr[Qtopia::BusinessCity] ); |
139 | list.append( mapIdToStr[Qtopia::BusinessState] ); | 147 | list.append( mapIdToStr[Qtopia::BusinessState] ); |
140 | list.append( mapIdToStr[Qtopia::BusinessZip] ); | 148 | list.append( mapIdToStr[Qtopia::BusinessZip] ); |
141 | list.append( mapIdToStr[Qtopia::BusinessCountry] ); | 149 | list.append( mapIdToStr[Qtopia::BusinessCountry] ); |
142 | list.append( mapIdToStr[Qtopia::BusinessPager] ); | ||
143 | list.append( mapIdToStr[Qtopia::BusinessWebPage] ); | ||
144 | 150 | ||
145 | list.append( mapIdToStr[Qtopia::HomeStreet] ); | 151 | list.append( mapIdToStr[Qtopia::HomeStreet] ); |
146 | list.append( mapIdToStr[Qtopia::HomeCity] ); | 152 | list.append( mapIdToStr[Qtopia::HomeCity] ); |
147 | list.append( mapIdToStr[Qtopia::HomeState] ); | 153 | list.append( mapIdToStr[Qtopia::HomeState] ); |
148 | list.append( mapIdToStr[Qtopia::HomeZip] ); | 154 | list.append( mapIdToStr[Qtopia::HomeZip] ); |
149 | list.append( mapIdToStr[Qtopia::HomeCountry] ); | 155 | list.append( mapIdToStr[Qtopia::HomeCountry] ); |
150 | list.append( mapIdToStr[Qtopia::HomeWebPage] ); | ||
151 | 156 | ||
152 | list += trdetailsfields( sorted ); | 157 | list += trdetailsfields( sorted ); |
153 | 158 | ||
154 | list.append( mapIdToStr[Qtopia::Notes] ); | 159 | list.append( mapIdToStr[Qtopia::Notes] ); |
155 | list.append( mapIdToStr[Qtopia::Groups] ); | 160 | list.append( mapIdToStr[Qtopia::Groups] ); |
156 | 161 | ||
157 | if (sorted) list.sort(); | 162 | if (sorted) list.sort(); |
158 | 163 | ||
159 | return list; | 164 | return list; |
160 | } | 165 | } |
161 | 166 | ||
162 | /*! | 167 | /*! |
163 | \internal | 168 | \internal |
164 | Returns an untranslated list of field names for a contact. | 169 | Returns an untranslated list of field names for a contact. |
165 | */ | 170 | */ |
166 | QStringList OContactFields::untrfields( bool sorted ) | 171 | QStringList OContactFields::untrfields( bool sorted ) |
@@ -173,41 +178,38 @@ QStringList OContactFields::untrfields( bool sorted ) | |||
173 | list.append( mapIdToStr[ Qtopia::MiddleName ] ); | 178 | list.append( mapIdToStr[ Qtopia::MiddleName ] ); |
174 | list.append( mapIdToStr[ Qtopia::LastName ] ); | 179 | list.append( mapIdToStr[ Qtopia::LastName ] ); |
175 | list.append( mapIdToStr[ Qtopia::Suffix ] ); | 180 | list.append( mapIdToStr[ Qtopia::Suffix ] ); |
176 | list.append( mapIdToStr[ Qtopia::FileAs ] ); | 181 | list.append( mapIdToStr[ Qtopia::FileAs ] ); |
177 | 182 | ||
178 | list.append( mapIdToStr[ Qtopia::JobTitle ] ); | 183 | list.append( mapIdToStr[ Qtopia::JobTitle ] ); |
179 | list.append( mapIdToStr[ Qtopia::Department ] ); | 184 | list.append( mapIdToStr[ Qtopia::Department ] ); |
180 | list.append( mapIdToStr[ Qtopia::Company ] ); | 185 | list.append( mapIdToStr[ Qtopia::Company ] ); |
181 | 186 | ||
182 | list += untrphonefields( sorted ); | 187 | list += untrphonefields( sorted ); |
183 | 188 | ||
184 | list.append( mapIdToStr[ Qtopia::BusinessStreet ] ); | 189 | list.append( mapIdToStr[ Qtopia::BusinessStreet ] ); |
185 | list.append( mapIdToStr[ Qtopia::BusinessCity ] ); | 190 | list.append( mapIdToStr[ Qtopia::BusinessCity ] ); |
186 | list.append( mapIdToStr[ Qtopia::BusinessState ] ); | 191 | list.append( mapIdToStr[ Qtopia::BusinessState ] ); |
187 | list.append( mapIdToStr[ Qtopia::BusinessZip ] ); | 192 | list.append( mapIdToStr[ Qtopia::BusinessZip ] ); |
188 | list.append( mapIdToStr[ Qtopia::BusinessCountry ] ); | 193 | list.append( mapIdToStr[ Qtopia::BusinessCountry ] ); |
189 | list.append( mapIdToStr[ Qtopia::BusinessPager ] ); | ||
190 | list.append( mapIdToStr[ Qtopia::BusinessWebPage ] ); | ||
191 | 194 | ||
192 | list.append( mapIdToStr[ Qtopia::HomeStreet ] ); | 195 | list.append( mapIdToStr[ Qtopia::HomeStreet ] ); |
193 | list.append( mapIdToStr[ Qtopia::HomeCity ] ); | 196 | list.append( mapIdToStr[ Qtopia::HomeCity ] ); |
194 | list.append( mapIdToStr[ Qtopia::HomeState ] ); | 197 | list.append( mapIdToStr[ Qtopia::HomeState ] ); |
195 | list.append( mapIdToStr[ Qtopia::HomeZip ] ); | 198 | list.append( mapIdToStr[ Qtopia::HomeZip ] ); |
196 | list.append( mapIdToStr[ Qtopia::HomeCountry ] ); | 199 | list.append( mapIdToStr[ Qtopia::HomeCountry ] ); |
197 | list.append( mapIdToStr[ Qtopia::HomeWebPage] ); | ||
198 | 200 | ||
199 | list += untrdetailsfields( sorted ); | 201 | list += untrdetailsfields( sorted ); |
200 | 202 | ||
201 | list.append( mapIdToStr[ Qtopia::Notes ] ); | 203 | list.append( mapIdToStr[ Qtopia::Notes ] ); |
202 | list.append( mapIdToStr[ Qtopia::Groups ] ); | 204 | list.append( mapIdToStr[ Qtopia::Groups ] ); |
203 | 205 | ||
204 | if (sorted) list.sort(); | 206 | if (sorted) list.sort(); |
205 | 207 | ||
206 | return list; | 208 | return list; |
207 | } | 209 | } |
208 | QMap<int, QString> OContactFields::idToTrFields() | 210 | QMap<int, QString> OContactFields::idToTrFields() |
209 | { | 211 | { |
210 | QMap<int, QString> ret_map; | 212 | QMap<int, QString> ret_map; |
211 | 213 | ||
212 | ret_map.insert( Qtopia::Title, QObject::tr( "Name Title") ); | 214 | ret_map.insert( Qtopia::Title, QObject::tr( "Name Title") ); |
213 | ret_map.insert( Qtopia::FirstName, QObject::tr( "First Name" ) ); | 215 | ret_map.insert( Qtopia::FirstName, QObject::tr( "First Name" ) ); |